@tempots/ui 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,17 +1,17 @@
1
- var ue = Object.defineProperty;
2
- var fe = (t, e, n) => e in t ? ue(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var Tt = (t, e, n) => fe(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { makeProviderMark as Ht, Fragment as K, OnBrowserCtx as wt, Async as St, OnHeadlessCtx as he, UseProvider as zt, makeProp as N, renderableOfTNode as st, getWindow as xt, Signal as Bt, html as Ut, on as _t, Value as X, attr as It, WithProvider as de, OnDispose as T, Empty as mt, OneOfType as jt, makeSignal as me, OnElement as J, Portal as Yt, When as qt, OneOfTuple as pe, makeComputedOf as ge, Prop as ye } from "@tempots/dom";
5
- import { delayed as Kt, interval as we } from "@tempots/std";
6
- const xe = (t) => {
1
+ var fe = Object.defineProperty;
2
+ var de = (t, e, n) => e in t ? fe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var Ct = (t, e, n) => de(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { makeProviderMark as Bt, Fragment as _, OnBrowserCtx as xt, Async as Pt, OnHeadlessCtx as he, UseProvider as Ut, makeProp as W, renderableOfTNode as lt, getWindow as vt, Signal as _t, html as It, on as jt, Value as J, attr as Yt, WithProvider as me, OnDispose as k, Empty as nt, OneOfType as bt, makeSignal as pe, OnElement as G, Portal as qt, When as Kt, Ensure as ge, OneOfTuple as ye, makeComputedOf as we, Prop as xe } from "@tempots/dom";
5
+ import { delayed as Xt, AsyncResult as P, interval as ve } from "@tempots/std";
6
+ const be = (t) => {
7
7
  const e = t.split("/").pop();
8
8
  if (e == null || e.startsWith(".")) return;
9
9
  const n = e.split(".") || [];
10
10
  return n.length > 1 ? "." + n.pop() : void 0;
11
- }, ve = (t, e) => {
12
- const n = xe(e);
11
+ }, Ae = (t, e) => {
12
+ const n = be(e);
13
13
  return n != null && (t.length === 0 || !t.some((o) => n == o));
14
- }, be = (t, e, n, o) => {
14
+ }, Re = (t, e, n, o) => {
15
15
  let r = t.target;
16
16
  for (; r != null && !(r instanceof HTMLAnchorElement); )
17
17
  r = r.parentElement;
@@ -26,8 +26,8 @@ const xe = (t) => {
26
26
  if (!(f != null && f.startsWith("#")) && f !== l)
27
27
  return !0;
28
28
  }
29
- return e ? !1 : ve(n, s);
30
- }, Ae = (t, e = {
29
+ return e ? !1 : Ae(n, s);
30
+ }, Ee = (t, e = {
31
31
  ignoreUrlWithExtension: !0,
32
32
  allowedExtensions: [],
33
33
  ignoreExternalUrl: !0
@@ -36,85 +36,85 @@ const xe = (t) => {
36
36
  (o) => o.startsWith(".") ? o : "." + o
37
37
  ) : [];
38
38
  return (o) => {
39
- be(
39
+ Re(
40
40
  o,
41
41
  e.ignoreUrlWithExtension ?? !0,
42
42
  n,
43
43
  e.ignoreExternalUrl ?? !0
44
44
  ) || t() && o.preventDefault();
45
45
  };
46
- }, Re = Ht("LocationProvider"), Ln = (t) => K(
47
- wt(() => St(
46
+ }, Oe = Bt("LocationProvider"), Cn = (t) => _(
47
+ xt(() => Pt(
48
48
  import("./browser-location-12vUH3Kv.js").then((e) => e.ProvideBrowserLocation),
49
49
  (e) => e(t)
50
50
  )),
51
- he((e) => St(
51
+ he((e) => Pt(
52
52
  import("./headless-location-Ba_ht5ZQ.js").then((n) => n.ProvideHeadlessLocation),
53
53
  (n) => n(e.container.currentURL, t)
54
54
  ))
55
- ), Xt = (t) => zt(Re, (e) => (n) => {
56
- const o = N(e.value, e.equals);
55
+ ), Jt = (t) => Ut(Oe, (e) => (n) => {
56
+ const o = W(e.value, e.equals);
57
57
  e.feedProp(o), o.on(e.set);
58
- const r = st(t(o))(n);
58
+ const r = lt(t(o))(n);
59
59
  return (i) => {
60
60
  o.dispose(), r(i);
61
61
  };
62
- }), kn = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, Ee = (t, e) => {
62
+ }), Pn = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, Le = (t, e) => {
63
63
  var i;
64
- const n = new URL(t, e ?? ((i = xt()) == null ? void 0 : i.location.toString())), o = Object.fromEntries(n.searchParams.entries());
64
+ const n = new URL(t, e ?? ((i = vt()) == null ? void 0 : i.location.toString())), o = Object.fromEntries(n.searchParams.entries());
65
65
  let r = n.hash;
66
66
  return r.startsWith("#") && (r = r.substring(1)), {
67
67
  pathname: n.pathname,
68
68
  search: o,
69
69
  hash: r === "" ? void 0 : r
70
70
  };
71
- }, Oe = (t, e) => {
72
- const n = Ee(e);
71
+ }, ke = (t, e) => {
72
+ const n = Le(e);
73
73
  return t.set(n), t;
74
- }, Tn = (t) => {
74
+ }, Dn = (t) => {
75
75
  const n = new URLSearchParams(t.search).toString(), o = t.hash;
76
76
  return `${t.pathname}${n ? `?${n}` : ""}${o ? `#${o}` : ""}`;
77
- }, Le = (t, ...e) => {
78
- if (typeof t == "string" || Bt.is(t))
79
- return Le({ href: t }, ...e);
77
+ }, Se = (t, ...e) => {
78
+ if (typeof t == "string" || _t.is(t))
79
+ return Se({ href: t }, ...e);
80
80
  const { href: n, ...o } = t;
81
- return Xt((r) => Ut.a(
82
- _t.click(
83
- Ae(() => (Oe(r, X.get(n)), !0), o)
81
+ return Jt((r) => It.a(
82
+ jt.click(
83
+ Ee(() => (ke(r, J.get(n)), !0), o)
84
84
  ),
85
- It.href(n),
85
+ Yt.href(n),
86
86
  ...e
87
87
  ));
88
- }, Jt = Ht("Appearance"), Sn = (t) => {
89
- const e = xt(), n = e != null && e.matchMedia != null && e.matchMedia("(prefers-color-scheme: dark)").matches, o = N(n ? "dark" : "light"), r = (s) => {
88
+ }, Gt = Bt("Appearance"), Wn = (t) => {
89
+ const e = vt(), n = e != null && e.matchMedia != null && e.matchMedia("(prefers-color-scheme: dark)").matches, o = W(n ? "dark" : "light"), r = (s) => {
90
90
  o.set(s.matches ? "dark" : "light");
91
91
  }, i = e != null && e.matchMedia != null ? e.matchMedia("(prefers-color-scheme: dark)") : void 0;
92
- return i == null || i.addEventListener("change", r), K(
93
- de(Jt, o, t),
94
- T(() => i == null ? void 0 : i.removeEventListener("change", r))
92
+ return i == null || i.addEventListener("change", r), _(
93
+ me(Gt, o, t),
94
+ k(() => i == null ? void 0 : i.removeEventListener("change", r))
95
95
  );
96
- }, Cn = (t) => zt(Jt, t), ke = (t, e) => {
96
+ }, Fn = (t) => Ut(Gt, t), Te = (t, e) => {
97
97
  if (typeof e == "function")
98
- return ke(t, { success: e });
99
- const n = e.failure ?? ((s) => K(
100
- T(s.on(console.error)),
98
+ return Te(t, { success: e });
99
+ const n = e.failure ?? ((s) => _(
100
+ k(s.on(console.error)),
101
101
  s.map((c) => `Error: ${c}`)
102
- )), o = e.success, r = e.loading ?? (() => mt), i = e.notAsked ?? (() => mt);
103
- return jt(X.toSignal(t), {
102
+ )), o = e.success, r = e.loading ?? (() => nt), i = e.notAsked ?? (() => nt);
103
+ return bt(J.toSignal(t), {
104
104
  AsyncSuccess: (s) => o(s.$.value),
105
105
  AsyncFailure: (s) => n(s.$.error),
106
- Loading: (s) => r(s.$.previousValue ?? me(void 0)),
106
+ Loading: (s) => r(s.$.previousValue ?? pe(void 0)),
107
107
  NotAsked: i
108
108
  });
109
- }, Pn = (t = 10) => J((e) => T(Kt(() => e == null ? void 0 : e.focus(), t))), Dn = (t = 10) => J((e) => {
110
- const n = Kt(() => e.select(), t);
111
- return T(n);
112
- }), Wn = J((t) => {
109
+ }, Mn = (t = 10) => G((e) => k(Xt(() => e == null ? void 0 : e.focus(), t))), Nn = (t = 10) => G((e) => {
110
+ const n = Xt(() => e.select(), t);
111
+ return k(n);
112
+ }), $n = G((t) => {
113
113
  const e = t.style.getPropertyValue(":empty");
114
- return t.style.setProperty(":empty", "display:none"), T((n) => {
114
+ return t.style.setProperty(":empty", "display:none"), k((n) => {
115
115
  n && t.style.setProperty(":empty", e);
116
116
  });
117
- }), Mn = (t) => Yt("head > title", It.innerText(t)), Te = {
117
+ }), Vn = (t) => qt("head > title", Yt.innerText(t)), Ce = {
118
118
  partial: {
119
119
  root: null,
120
120
  rootMargin: "0px",
@@ -125,83 +125,83 @@ const xe = (t) => {
125
125
  rootMargin: "0px",
126
126
  threshold: 1
127
127
  }
128
- }, tt = {
128
+ }, et = {
129
129
  partial: /* @__PURE__ */ new Map(),
130
130
  full: /* @__PURE__ */ new Map()
131
- }, j = {
131
+ }, q = {
132
132
  partial: null,
133
133
  full: null
134
134
  };
135
- function Se(t) {
136
- return j[t] == null && (j[t] = new IntersectionObserver((e) => {
135
+ function Pe(t) {
136
+ return q[t] == null && (q[t] = new IntersectionObserver((e) => {
137
137
  e.forEach((n) => {
138
- const o = tt[t].get(n.target);
138
+ const o = et[t].get(n.target);
139
139
  o == null || o.set(n.isIntersecting);
140
140
  });
141
- }, Te[t])), j[t];
142
- }
143
- const Ce = (t, e) => {
144
- const n = N(!1);
145
- return K(
146
- J((o) => {
147
- const r = typeof IntersectionObserver < "u" ? Se(t) : null;
148
- return tt[t].set(o, n), r == null || r.observe(o), T(() => {
141
+ }, Ce[t])), q[t];
142
+ }
143
+ const De = (t, e) => {
144
+ const n = W(!1);
145
+ return _(
146
+ G((o) => {
147
+ const r = typeof IntersectionObserver < "u" ? Pe(t) : null;
148
+ return et[t].set(o, n), r == null || r.observe(o), k(() => {
149
149
  var i;
150
- n.dispose(), r == null || r.unobserve(o), tt[t].delete(o), tt[t].size === 0 && ((i = j[t]) == null || i.disconnect(), j[t] = null);
150
+ n.dispose(), r == null || r.unobserve(o), et[t].delete(o), et[t].size === 0 && ((i = q[t]) == null || i.disconnect(), q[t] = null);
151
151
  });
152
152
  }),
153
- st(e(n))
153
+ lt(e(n))
154
154
  );
155
- }, Fn = (t, e, n) => Ce(t, (o) => qt(o, e, n ?? (() => mt))), et = Math.min, W = Math.max, nt = Math.round, Z = Math.floor, O = (t) => ({
155
+ }, Hn = (t, e, n) => De(t, (o) => Kt(o, e, n ?? (() => nt))), ot = Math.min, M = Math.max, rt = Math.round, tt = Math.floor, O = (t) => ({
156
156
  x: t,
157
157
  y: t
158
- }), Pe = {
158
+ }), We = {
159
159
  left: "right",
160
160
  right: "left",
161
161
  bottom: "top",
162
162
  top: "bottom"
163
- }, De = {
163
+ }, Fe = {
164
164
  start: "end",
165
165
  end: "start"
166
166
  };
167
- function Ct(t, e, n) {
168
- return W(t, et(e, n));
167
+ function Dt(t, e, n) {
168
+ return M(t, ot(e, n));
169
169
  }
170
- function ct(t, e) {
170
+ function at(t, e) {
171
171
  return typeof t == "function" ? t(e) : t;
172
172
  }
173
- function M(t) {
173
+ function N(t) {
174
174
  return t.split("-")[0];
175
175
  }
176
- function lt(t) {
176
+ function ut(t) {
177
177
  return t.split("-")[1];
178
178
  }
179
- function Gt(t) {
179
+ function Qt(t) {
180
180
  return t === "x" ? "y" : "x";
181
181
  }
182
- function Qt(t) {
182
+ function Zt(t) {
183
183
  return t === "y" ? "height" : "width";
184
184
  }
185
- function z(t) {
186
- return ["top", "bottom"].includes(M(t)) ? "y" : "x";
185
+ function B(t) {
186
+ return ["top", "bottom"].includes(N(t)) ? "y" : "x";
187
187
  }
188
- function Zt(t) {
189
- return Gt(z(t));
188
+ function te(t) {
189
+ return Qt(B(t));
190
190
  }
191
- function We(t, e, n) {
191
+ function Me(t, e, n) {
192
192
  n === void 0 && (n = !1);
193
- const o = lt(t), r = Zt(t), i = Qt(r);
193
+ const o = ut(t), r = te(t), i = Zt(r);
194
194
  let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
195
- return e.reference[i] > e.floating[i] && (s = ot(s)), [s, ot(s)];
195
+ return e.reference[i] > e.floating[i] && (s = it(s)), [s, it(s)];
196
196
  }
197
- function Me(t) {
198
- const e = ot(t);
199
- return [pt(t), e, pt(e)];
197
+ function Ne(t) {
198
+ const e = it(t);
199
+ return [gt(t), e, gt(e)];
200
200
  }
201
- function pt(t) {
202
- return t.replace(/start|end/g, (e) => De[e]);
201
+ function gt(t) {
202
+ return t.replace(/start|end/g, (e) => Fe[e]);
203
203
  }
204
- function Fe(t, e, n) {
204
+ function $e(t, e, n) {
205
205
  const o = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
206
206
  switch (t) {
207
207
  case "top":
@@ -214,15 +214,15 @@ function Fe(t, e, n) {
214
214
  return [];
215
215
  }
216
216
  }
217
- function Ne(t, e, n, o) {
218
- const r = lt(t);
219
- let i = Fe(M(t), n === "start", o);
220
- return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(pt)))), i;
217
+ function Ve(t, e, n, o) {
218
+ const r = ut(t);
219
+ let i = $e(N(t), n === "start", o);
220
+ return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(gt)))), i;
221
221
  }
222
- function ot(t) {
223
- return t.replace(/left|right|bottom|top/g, (e) => Pe[e]);
222
+ function it(t) {
223
+ return t.replace(/left|right|bottom|top/g, (e) => We[e]);
224
224
  }
225
- function Ve(t) {
225
+ function He(t) {
226
226
  return {
227
227
  top: 0,
228
228
  right: 0,
@@ -231,15 +231,15 @@ function Ve(t) {
231
231
  ...t
232
232
  };
233
233
  }
234
- function $e(t) {
235
- return typeof t != "number" ? Ve(t) : {
234
+ function ze(t) {
235
+ return typeof t != "number" ? He(t) : {
236
236
  top: t,
237
237
  right: t,
238
238
  bottom: t,
239
239
  left: t
240
240
  };
241
241
  }
242
- function rt(t) {
242
+ function st(t) {
243
243
  const {
244
244
  x: e,
245
245
  y: n,
@@ -257,55 +257,55 @@ function rt(t) {
257
257
  y: n
258
258
  };
259
259
  }
260
- function Pt(t, e, n) {
260
+ function Wt(t, e, n) {
261
261
  let {
262
262
  reference: o,
263
263
  floating: r
264
264
  } = t;
265
- const i = z(e), s = Zt(e), c = Qt(s), a = M(e), l = i === "y", f = o.x + o.width / 2 - r.width / 2, u = o.y + o.height / 2 - r.height / 2, d = o[c] / 2 - r[c] / 2;
266
- let h;
265
+ const i = B(e), s = te(e), c = Zt(s), a = N(e), l = i === "y", f = o.x + o.width / 2 - r.width / 2, u = o.y + o.height / 2 - r.height / 2, h = o[c] / 2 - r[c] / 2;
266
+ let d;
267
267
  switch (a) {
268
268
  case "top":
269
- h = {
269
+ d = {
270
270
  x: f,
271
271
  y: o.y - r.height
272
272
  };
273
273
  break;
274
274
  case "bottom":
275
- h = {
275
+ d = {
276
276
  x: f,
277
277
  y: o.y + o.height
278
278
  };
279
279
  break;
280
280
  case "right":
281
- h = {
281
+ d = {
282
282
  x: o.x + o.width,
283
283
  y: u
284
284
  };
285
285
  break;
286
286
  case "left":
287
- h = {
287
+ d = {
288
288
  x: o.x - r.width,
289
289
  y: u
290
290
  };
291
291
  break;
292
292
  default:
293
- h = {
293
+ d = {
294
294
  x: o.x,
295
295
  y: o.y
296
296
  };
297
297
  }
298
- switch (lt(e)) {
298
+ switch (ut(e)) {
299
299
  case "start":
300
- h[s] -= d * (n && l ? -1 : 1);
300
+ d[s] -= h * (n && l ? -1 : 1);
301
301
  break;
302
302
  case "end":
303
- h[s] += d * (n && l ? -1 : 1);
303
+ d[s] += h * (n && l ? -1 : 1);
304
304
  break;
305
305
  }
306
- return h;
306
+ return d;
307
307
  }
308
- const He = async (t, e, n) => {
308
+ const Be = async (t, e, n) => {
309
309
  const {
310
310
  placement: o = "bottom",
311
311
  strategy: r = "absolute",
@@ -319,23 +319,23 @@ const He = async (t, e, n) => {
319
319
  }), {
320
320
  x: f,
321
321
  y: u
322
- } = Pt(l, o, a), d = o, h = {}, p = 0;
322
+ } = Wt(l, o, a), h = o, d = {}, m = 0;
323
323
  for (let g = 0; g < c.length; g++) {
324
324
  const {
325
325
  name: y,
326
- fn: m
326
+ fn: p
327
327
  } = c[g], {
328
328
  x: w,
329
329
  y: x,
330
330
  data: b,
331
331
  reset: v
332
- } = await m({
332
+ } = await p({
333
333
  x: f,
334
334
  y: u,
335
335
  initialPlacement: o,
336
- placement: d,
336
+ placement: h,
337
337
  strategy: r,
338
- middlewareData: h,
338
+ middlewareData: d,
339
339
  rects: l,
340
340
  platform: s,
341
341
  elements: {
@@ -343,30 +343,30 @@ const He = async (t, e, n) => {
343
343
  floating: e
344
344
  }
345
345
  });
346
- f = w ?? f, u = x ?? u, h = {
347
- ...h,
346
+ f = w ?? f, u = x ?? u, d = {
347
+ ...d,
348
348
  [y]: {
349
- ...h[y],
349
+ ...d[y],
350
350
  ...b
351
351
  }
352
- }, v && p <= 50 && (p++, typeof v == "object" && (v.placement && (d = v.placement), v.rects && (l = v.rects === !0 ? await s.getElementRects({
352
+ }, v && m <= 50 && (m++, typeof v == "object" && (v.placement && (h = v.placement), v.rects && (l = v.rects === !0 ? await s.getElementRects({
353
353
  reference: t,
354
354
  floating: e,
355
355
  strategy: r
356
356
  }) : v.rects), {
357
357
  x: f,
358
358
  y: u
359
- } = Pt(l, d, a)), g = -1);
359
+ } = Wt(l, h, a)), g = -1);
360
360
  }
361
361
  return {
362
362
  x: f,
363
363
  y: u,
364
- placement: d,
364
+ placement: h,
365
365
  strategy: r,
366
- middlewareData: h
366
+ middlewareData: d
367
367
  };
368
368
  };
369
- async function te(t, e) {
369
+ async function ee(t, e) {
370
370
  var n;
371
371
  e === void 0 && (e = {});
372
372
  const {
@@ -380,9 +380,9 @@ async function te(t, e) {
380
380
  boundary: l = "clippingAncestors",
381
381
  rootBoundary: f = "viewport",
382
382
  elementContext: u = "floating",
383
- altBoundary: d = !1,
384
- padding: h = 0
385
- } = ct(e, t), p = $e(h), y = c[d ? u === "floating" ? "reference" : "floating" : u], m = rt(await i.getClippingRect({
383
+ altBoundary: h = !1,
384
+ padding: d = 0
385
+ } = at(e, t), m = ze(d), y = c[h ? u === "floating" ? "reference" : "floating" : u], p = st(await i.getClippingRect({
386
386
  element: (n = await (i.isElement == null ? void 0 : i.isElement(y))) == null || n ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
387
387
  boundary: l,
388
388
  rootBoundary: f,
@@ -398,20 +398,20 @@ async function te(t, e) {
398
398
  } : {
399
399
  x: 1,
400
400
  y: 1
401
- }, v = rt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
401
+ }, v = st(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
402
402
  elements: c,
403
403
  rect: w,
404
404
  offsetParent: x,
405
405
  strategy: a
406
406
  }) : w);
407
407
  return {
408
- top: (m.top - v.top + p.top) / b.y,
409
- bottom: (v.bottom - m.bottom + p.bottom) / b.y,
410
- left: (m.left - v.left + p.left) / b.x,
411
- right: (v.right - m.right + p.right) / b.x
408
+ top: (p.top - v.top + m.top) / b.y,
409
+ bottom: (v.bottom - p.bottom + m.bottom) / b.y,
410
+ left: (p.left - v.left + m.left) / b.x,
411
+ right: (v.right - p.right + m.right) / b.x
412
412
  };
413
413
  }
414
- const ze = function(t) {
414
+ const Ue = function(t) {
415
415
  return t === void 0 && (t = {}), {
416
416
  name: "flip",
417
417
  options: t,
@@ -427,63 +427,63 @@ const ze = function(t) {
427
427
  } = e, {
428
428
  mainAxis: f = !0,
429
429
  crossAxis: u = !0,
430
- fallbackPlacements: d,
431
- fallbackStrategy: h = "bestFit",
432
- fallbackAxisSideDirection: p = "none",
430
+ fallbackPlacements: h,
431
+ fallbackStrategy: d = "bestFit",
432
+ fallbackAxisSideDirection: m = "none",
433
433
  flipAlignment: g = !0,
434
434
  ...y
435
- } = ct(t, e);
435
+ } = at(t, e);
436
436
  if ((n = i.arrow) != null && n.alignmentOffset)
437
437
  return {};
438
- const m = M(r), w = z(c), x = M(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), v = d || (x || !g ? [ot(c)] : Me(c)), V = p !== "none";
439
- !d && V && v.push(...Ne(c, g, p, b));
440
- const le = [c, ...v], ht = await te(e, y), Q = [];
441
- let _ = ((o = i.flip) == null ? void 0 : o.overflows) || [];
442
- if (f && Q.push(ht[m]), u) {
443
- const D = We(r, s, b);
444
- Q.push(ht[D[0]], ht[D[1]]);
438
+ const p = N(r), w = B(c), x = N(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), v = h || (x || !g ? [it(c)] : Ne(c)), V = m !== "none";
439
+ !h && V && v.push(...Ve(c, g, m, b));
440
+ const ae = [c, ...v], mt = await ee(e, y), Z = [];
441
+ let j = ((o = i.flip) == null ? void 0 : o.overflows) || [];
442
+ if (f && Z.push(mt[p]), u) {
443
+ const F = Me(r, s, b);
444
+ Z.push(mt[F[0]], mt[F[1]]);
445
445
  }
446
- if (_ = [..._, {
446
+ if (j = [...j, {
447
447
  placement: r,
448
- overflows: Q
449
- }], !Q.every((D) => D <= 0)) {
450
- var Et, Ot;
451
- const D = (((Et = i.flip) == null ? void 0 : Et.index) || 0) + 1, kt = le[D];
452
- if (kt)
448
+ overflows: Z
449
+ }], !Z.every((F) => F <= 0)) {
450
+ var Lt, kt;
451
+ const F = (((Lt = i.flip) == null ? void 0 : Lt.index) || 0) + 1, Tt = ae[F];
452
+ if (Tt)
453
453
  return {
454
454
  data: {
455
- index: D,
456
- overflows: _
455
+ index: F,
456
+ overflows: j
457
457
  },
458
458
  reset: {
459
- placement: kt
459
+ placement: Tt
460
460
  }
461
461
  };
462
- let I = (Ot = _.filter(($) => $.overflows[0] <= 0).sort(($, S) => $.overflows[1] - S.overflows[1])[0]) == null ? void 0 : Ot.placement;
463
- if (!I)
464
- switch (h) {
462
+ let Y = (kt = j.filter((H) => H.overflows[0] <= 0).sort((H, T) => H.overflows[1] - T.overflows[1])[0]) == null ? void 0 : kt.placement;
463
+ if (!Y)
464
+ switch (d) {
465
465
  case "bestFit": {
466
- var Lt;
467
- const $ = (Lt = _.filter((S) => {
466
+ var St;
467
+ const H = (St = j.filter((T) => {
468
468
  if (V) {
469
- const C = z(S.placement);
469
+ const C = B(T.placement);
470
470
  return C === w || // Create a bias to the `y` side axis due to horizontal
471
471
  // reading directions favoring greater width.
472
472
  C === "y";
473
473
  }
474
474
  return !0;
475
- }).map((S) => [S.placement, S.overflows.filter((C) => C > 0).reduce((C, ae) => C + ae, 0)]).sort((S, C) => S[1] - C[1])[0]) == null ? void 0 : Lt[0];
476
- $ && (I = $);
475
+ }).map((T) => [T.placement, T.overflows.filter((C) => C > 0).reduce((C, ue) => C + ue, 0)]).sort((T, C) => T[1] - C[1])[0]) == null ? void 0 : St[0];
476
+ H && (Y = H);
477
477
  break;
478
478
  }
479
479
  case "initialPlacement":
480
- I = c;
480
+ Y = c;
481
481
  break;
482
482
  }
483
- if (r !== I)
483
+ if (r !== Y)
484
484
  return {
485
485
  reset: {
486
- placement: I
486
+ placement: Y
487
487
  }
488
488
  };
489
489
  }
@@ -491,16 +491,16 @@ const ze = function(t) {
491
491
  }
492
492
  };
493
493
  };
494
- async function Be(t, e) {
494
+ async function _e(t, e) {
495
495
  const {
496
496
  placement: n,
497
497
  platform: o,
498
498
  elements: r
499
- } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = M(n), c = lt(n), a = z(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, f = i && a ? -1 : 1, u = ct(e, t);
499
+ } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = N(n), c = ut(n), a = B(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, f = i && a ? -1 : 1, u = at(e, t);
500
500
  let {
501
- mainAxis: d,
502
- crossAxis: h,
503
- alignmentAxis: p
501
+ mainAxis: h,
502
+ crossAxis: d,
503
+ alignmentAxis: m
504
504
  } = typeof u == "number" ? {
505
505
  mainAxis: u,
506
506
  crossAxis: 0,
@@ -510,15 +510,15 @@ async function Be(t, e) {
510
510
  crossAxis: u.crossAxis || 0,
511
511
  alignmentAxis: u.alignmentAxis
512
512
  };
513
- return c && typeof p == "number" && (h = c === "end" ? p * -1 : p), a ? {
514
- x: h * f,
515
- y: d * l
513
+ return c && typeof m == "number" && (d = c === "end" ? m * -1 : m), a ? {
514
+ x: d * f,
515
+ y: h * l
516
516
  } : {
517
- x: d * l,
518
- y: h * f
517
+ x: h * l,
518
+ y: d * f
519
519
  };
520
520
  }
521
- const Ue = function(t) {
521
+ const Ie = function(t) {
522
522
  return t === void 0 && (t = 0), {
523
523
  name: "offset",
524
524
  options: t,
@@ -529,7 +529,7 @@ const Ue = function(t) {
529
529
  y: i,
530
530
  placement: s,
531
531
  middlewareData: c
532
- } = e, a = await Be(e, t);
532
+ } = e, a = await _e(e, t);
533
533
  return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
534
534
  x: r + a.x,
535
535
  y: i + a.y,
@@ -540,7 +540,7 @@ const Ue = function(t) {
540
540
  };
541
541
  }
542
542
  };
543
- }, _e = function(t) {
543
+ }, je = function(t) {
544
544
  return t === void 0 && (t = {}), {
545
545
  name: "shift",
546
546
  options: t,
@@ -555,33 +555,33 @@ const Ue = function(t) {
555
555
  limiter: c = {
556
556
  fn: (y) => {
557
557
  let {
558
- x: m,
558
+ x: p,
559
559
  y: w
560
560
  } = y;
561
561
  return {
562
- x: m,
562
+ x: p,
563
563
  y: w
564
564
  };
565
565
  }
566
566
  },
567
567
  ...a
568
- } = ct(t, e), l = {
568
+ } = at(t, e), l = {
569
569
  x: n,
570
570
  y: o
571
- }, f = await te(e, a), u = z(M(r)), d = Gt(u);
572
- let h = l[d], p = l[u];
571
+ }, f = await ee(e, a), u = B(N(r)), h = Qt(u);
572
+ let d = l[h], m = l[u];
573
573
  if (i) {
574
- const y = d === "y" ? "top" : "left", m = d === "y" ? "bottom" : "right", w = h + f[y], x = h - f[m];
575
- h = Ct(w, h, x);
574
+ const y = h === "y" ? "top" : "left", p = h === "y" ? "bottom" : "right", w = d + f[y], x = d - f[p];
575
+ d = Dt(w, d, x);
576
576
  }
577
577
  if (s) {
578
- const y = u === "y" ? "top" : "left", m = u === "y" ? "bottom" : "right", w = p + f[y], x = p - f[m];
579
- p = Ct(w, p, x);
578
+ const y = u === "y" ? "top" : "left", p = u === "y" ? "bottom" : "right", w = m + f[y], x = m - f[p];
579
+ m = Dt(w, m, x);
580
580
  }
581
581
  const g = c.fn({
582
582
  ...e,
583
- [d]: h,
584
- [u]: p
583
+ [h]: d,
584
+ [u]: m
585
585
  });
586
586
  return {
587
587
  ...g,
@@ -589,7 +589,7 @@ const Ue = function(t) {
589
589
  x: g.x - n,
590
590
  y: g.y - o,
591
591
  enabled: {
592
- [d]: i,
592
+ [h]: i,
593
593
  [u]: s
594
594
  }
595
595
  }
@@ -597,33 +597,33 @@ const Ue = function(t) {
597
597
  }
598
598
  };
599
599
  };
600
- function at() {
600
+ function ft() {
601
601
  return typeof window < "u";
602
602
  }
603
- function U(t) {
604
- return ee(t) ? (t.nodeName || "").toLowerCase() : "#document";
603
+ function I(t) {
604
+ return ne(t) ? (t.nodeName || "").toLowerCase() : "#document";
605
605
  }
606
606
  function A(t) {
607
607
  var e;
608
608
  return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
609
609
  }
610
- function k(t) {
610
+ function S(t) {
611
611
  var e;
612
- return (e = (ee(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
612
+ return (e = (ne(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
613
613
  }
614
- function ee(t) {
615
- return at() ? t instanceof Node || t instanceof A(t).Node : !1;
614
+ function ne(t) {
615
+ return ft() ? t instanceof Node || t instanceof A(t).Node : !1;
616
616
  }
617
617
  function R(t) {
618
- return at() ? t instanceof Element || t instanceof A(t).Element : !1;
618
+ return ft() ? t instanceof Element || t instanceof A(t).Element : !1;
619
619
  }
620
620
  function L(t) {
621
- return at() ? t instanceof HTMLElement || t instanceof A(t).HTMLElement : !1;
621
+ return ft() ? t instanceof HTMLElement || t instanceof A(t).HTMLElement : !1;
622
622
  }
623
- function Dt(t) {
624
- return !at() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
623
+ function Ft(t) {
624
+ return !ft() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
625
625
  }
626
- function G(t) {
626
+ function Q(t) {
627
627
  const {
628
628
  overflow: e,
629
629
  overflowX: n,
@@ -632,10 +632,10 @@ function G(t) {
632
632
  } = E(t);
633
633
  return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(r);
634
634
  }
635
- function Ie(t) {
636
- return ["table", "td", "th"].includes(U(t));
635
+ function Ye(t) {
636
+ return ["table", "td", "th"].includes(I(t));
637
637
  }
638
- function ut(t) {
638
+ function dt(t) {
639
639
  return [":popover-open", ":modal"].some((e) => {
640
640
  try {
641
641
  return t.matches(e);
@@ -644,31 +644,31 @@ function ut(t) {
644
644
  }
645
645
  });
646
646
  }
647
- function vt(t) {
648
- const e = bt(), n = R(t) ? E(t) : t;
647
+ function At(t) {
648
+ const e = Rt(), n = R(t) ? E(t) : t;
649
649
  return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
650
650
  }
651
- function je(t) {
652
- let e = P(t);
653
- for (; L(e) && !B(e); ) {
654
- if (vt(e))
651
+ function qe(t) {
652
+ let e = D(t);
653
+ for (; L(e) && !U(e); ) {
654
+ if (At(e))
655
655
  return e;
656
- if (ut(e))
656
+ if (dt(e))
657
657
  return null;
658
- e = P(e);
658
+ e = D(e);
659
659
  }
660
660
  return null;
661
661
  }
662
- function bt() {
662
+ function Rt() {
663
663
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
664
664
  }
665
- function B(t) {
666
- return ["html", "body", "#document"].includes(U(t));
665
+ function U(t) {
666
+ return ["html", "body", "#document"].includes(I(t));
667
667
  }
668
668
  function E(t) {
669
669
  return A(t).getComputedStyle(t);
670
670
  }
671
- function ft(t) {
671
+ function ht(t) {
672
672
  return R(t) ? {
673
673
  scrollLeft: t.scrollLeft,
674
674
  scrollTop: t.scrollTop
@@ -677,119 +677,119 @@ function ft(t) {
677
677
  scrollTop: t.scrollY
678
678
  };
679
679
  }
680
- function P(t) {
681
- if (U(t) === "html")
680
+ function D(t) {
681
+ if (I(t) === "html")
682
682
  return t;
683
683
  const e = (
684
684
  // Step into the shadow DOM of the parent of a slotted node.
685
685
  t.assignedSlot || // DOM Element detected.
686
686
  t.parentNode || // ShadowRoot detected.
687
- Dt(t) && t.host || // Fallback.
688
- k(t)
687
+ Ft(t) && t.host || // Fallback.
688
+ S(t)
689
689
  );
690
- return Dt(e) ? e.host : e;
690
+ return Ft(e) ? e.host : e;
691
691
  }
692
- function ne(t) {
693
- const e = P(t);
694
- return B(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : L(e) && G(e) ? e : ne(e);
692
+ function oe(t) {
693
+ const e = D(t);
694
+ return U(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : L(e) && Q(e) ? e : oe(e);
695
695
  }
696
- function Y(t, e, n) {
696
+ function K(t, e, n) {
697
697
  var o;
698
698
  e === void 0 && (e = []), n === void 0 && (n = !0);
699
- const r = ne(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = A(r);
699
+ const r = oe(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = A(r);
700
700
  if (i) {
701
- const c = gt(s);
702
- return e.concat(s, s.visualViewport || [], G(r) ? r : [], c && n ? Y(c) : []);
701
+ const c = yt(s);
702
+ return e.concat(s, s.visualViewport || [], Q(r) ? r : [], c && n ? K(c) : []);
703
703
  }
704
- return e.concat(r, Y(r, [], n));
704
+ return e.concat(r, K(r, [], n));
705
705
  }
706
- function gt(t) {
706
+ function yt(t) {
707
707
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
708
708
  }
709
- function oe(t) {
709
+ function re(t) {
710
710
  const e = E(t);
711
711
  let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
712
- const r = L(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = nt(n) !== i || nt(o) !== s;
712
+ const r = L(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = rt(n) !== i || rt(o) !== s;
713
713
  return c && (n = i, o = s), {
714
714
  width: n,
715
715
  height: o,
716
716
  $: c
717
717
  };
718
718
  }
719
- function At(t) {
719
+ function Et(t) {
720
720
  return R(t) ? t : t.contextElement;
721
721
  }
722
- function H(t) {
723
- const e = At(t);
722
+ function z(t) {
723
+ const e = Et(t);
724
724
  if (!L(e))
725
725
  return O(1);
726
726
  const n = e.getBoundingClientRect(), {
727
727
  width: o,
728
728
  height: r,
729
729
  $: i
730
- } = oe(e);
731
- let s = (i ? nt(n.width) : n.width) / o, c = (i ? nt(n.height) : n.height) / r;
730
+ } = re(e);
731
+ let s = (i ? rt(n.width) : n.width) / o, c = (i ? rt(n.height) : n.height) / r;
732
732
  return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
733
733
  x: s,
734
734
  y: c
735
735
  };
736
736
  }
737
- const Ye = /* @__PURE__ */ O(0);
738
- function re(t) {
737
+ const Ke = /* @__PURE__ */ O(0);
738
+ function ie(t) {
739
739
  const e = A(t);
740
- return !bt() || !e.visualViewport ? Ye : {
740
+ return !Rt() || !e.visualViewport ? Ke : {
741
741
  x: e.visualViewport.offsetLeft,
742
742
  y: e.visualViewport.offsetTop
743
743
  };
744
744
  }
745
- function qe(t, e, n) {
745
+ function Xe(t, e, n) {
746
746
  return e === void 0 && (e = !1), !n || e && n !== A(t) ? !1 : e;
747
747
  }
748
- function F(t, e, n, o) {
748
+ function $(t, e, n, o) {
749
749
  e === void 0 && (e = !1), n === void 0 && (n = !1);
750
- const r = t.getBoundingClientRect(), i = At(t);
750
+ const r = t.getBoundingClientRect(), i = Et(t);
751
751
  let s = O(1);
752
- e && (o ? R(o) && (s = H(o)) : s = H(t));
753
- const c = qe(i, n, o) ? re(i) : O(0);
752
+ e && (o ? R(o) && (s = z(o)) : s = z(t));
753
+ const c = Xe(i, n, o) ? ie(i) : O(0);
754
754
  let a = (r.left + c.x) / s.x, l = (r.top + c.y) / s.y, f = r.width / s.x, u = r.height / s.y;
755
755
  if (i) {
756
- const d = A(i), h = o && R(o) ? A(o) : o;
757
- let p = d, g = gt(p);
758
- for (; g && o && h !== p; ) {
759
- const y = H(g), m = g.getBoundingClientRect(), w = E(g), x = m.left + (g.clientLeft + parseFloat(w.paddingLeft)) * y.x, b = m.top + (g.clientTop + parseFloat(w.paddingTop)) * y.y;
760
- a *= y.x, l *= y.y, f *= y.x, u *= y.y, a += x, l += b, p = A(g), g = gt(p);
756
+ const h = A(i), d = o && R(o) ? A(o) : o;
757
+ let m = h, g = yt(m);
758
+ for (; g && o && d !== m; ) {
759
+ const y = z(g), p = g.getBoundingClientRect(), w = E(g), x = p.left + (g.clientLeft + parseFloat(w.paddingLeft)) * y.x, b = p.top + (g.clientTop + parseFloat(w.paddingTop)) * y.y;
760
+ a *= y.x, l *= y.y, f *= y.x, u *= y.y, a += x, l += b, m = A(g), g = yt(m);
761
761
  }
762
762
  }
763
- return rt({
763
+ return st({
764
764
  width: f,
765
765
  height: u,
766
766
  x: a,
767
767
  y: l
768
768
  });
769
769
  }
770
- function Rt(t, e) {
771
- const n = ft(t).scrollLeft;
772
- return e ? e.left + n : F(k(t)).left + n;
770
+ function Ot(t, e) {
771
+ const n = ht(t).scrollLeft;
772
+ return e ? e.left + n : $(S(t)).left + n;
773
773
  }
774
- function ie(t, e, n) {
774
+ function se(t, e, n) {
775
775
  n === void 0 && (n = !1);
776
776
  const o = t.getBoundingClientRect(), r = o.left + e.scrollLeft - (n ? 0 : (
777
777
  // RTL <body> scrollbar.
778
- Rt(t, o)
778
+ Ot(t, o)
779
779
  )), i = o.top + e.scrollTop;
780
780
  return {
781
781
  x: r,
782
782
  y: i
783
783
  };
784
784
  }
785
- function Ke(t) {
785
+ function Je(t) {
786
786
  let {
787
787
  elements: e,
788
788
  rect: n,
789
789
  offsetParent: o,
790
790
  strategy: r
791
791
  } = t;
792
- const i = r === "fixed", s = k(o), c = e ? ut(e.floating) : !1;
792
+ const i = r === "fixed", s = S(o), c = e ? dt(e.floating) : !1;
793
793
  if (o === s || c && i)
794
794
  return n;
795
795
  let a = {
@@ -797,38 +797,38 @@ function Ke(t) {
797
797
  scrollTop: 0
798
798
  }, l = O(1);
799
799
  const f = O(0), u = L(o);
800
- if ((u || !u && !i) && ((U(o) !== "body" || G(s)) && (a = ft(o)), L(o))) {
801
- const h = F(o);
802
- l = H(o), f.x = h.x + o.clientLeft, f.y = h.y + o.clientTop;
800
+ if ((u || !u && !i) && ((I(o) !== "body" || Q(s)) && (a = ht(o)), L(o))) {
801
+ const d = $(o);
802
+ l = z(o), f.x = d.x + o.clientLeft, f.y = d.y + o.clientTop;
803
803
  }
804
- const d = s && !u && !i ? ie(s, a, !0) : O(0);
804
+ const h = s && !u && !i ? se(s, a, !0) : O(0);
805
805
  return {
806
806
  width: n.width * l.x,
807
807
  height: n.height * l.y,
808
- x: n.x * l.x - a.scrollLeft * l.x + f.x + d.x,
809
- y: n.y * l.y - a.scrollTop * l.y + f.y + d.y
808
+ x: n.x * l.x - a.scrollLeft * l.x + f.x + h.x,
809
+ y: n.y * l.y - a.scrollTop * l.y + f.y + h.y
810
810
  };
811
811
  }
812
- function Xe(t) {
812
+ function Ge(t) {
813
813
  return Array.from(t.getClientRects());
814
814
  }
815
- function Je(t) {
816
- const e = k(t), n = ft(t), o = t.ownerDocument.body, r = W(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = W(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
817
- let s = -n.scrollLeft + Rt(t);
815
+ function Qe(t) {
816
+ const e = S(t), n = ht(t), o = t.ownerDocument.body, r = M(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = M(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
817
+ let s = -n.scrollLeft + Ot(t);
818
818
  const c = -n.scrollTop;
819
- return E(o).direction === "rtl" && (s += W(e.clientWidth, o.clientWidth) - r), {
819
+ return E(o).direction === "rtl" && (s += M(e.clientWidth, o.clientWidth) - r), {
820
820
  width: r,
821
821
  height: i,
822
822
  x: s,
823
823
  y: c
824
824
  };
825
825
  }
826
- function Ge(t, e) {
827
- const n = A(t), o = k(t), r = n.visualViewport;
826
+ function Ze(t, e) {
827
+ const n = A(t), o = S(t), r = n.visualViewport;
828
828
  let i = o.clientWidth, s = o.clientHeight, c = 0, a = 0;
829
829
  if (r) {
830
830
  i = r.width, s = r.height;
831
- const l = bt();
831
+ const l = Rt();
832
832
  (!l || l && e === "fixed") && (c = r.offsetLeft, a = r.offsetTop);
833
833
  }
834
834
  return {
@@ -838,8 +838,8 @@ function Ge(t, e) {
838
838
  y: a
839
839
  };
840
840
  }
841
- function Qe(t, e) {
842
- const n = F(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = L(t) ? H(t) : O(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, a = r * i.x, l = o * i.y;
841
+ function tn(t, e) {
842
+ const n = $(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = L(t) ? z(t) : O(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, a = r * i.x, l = o * i.y;
843
843
  return {
844
844
  width: s,
845
845
  height: c,
@@ -847,16 +847,16 @@ function Qe(t, e) {
847
847
  y: l
848
848
  };
849
849
  }
850
- function Wt(t, e, n) {
850
+ function Mt(t, e, n) {
851
851
  let o;
852
852
  if (e === "viewport")
853
- o = Ge(t, n);
853
+ o = Ze(t, n);
854
854
  else if (e === "document")
855
- o = Je(k(t));
855
+ o = Qe(S(t));
856
856
  else if (R(e))
857
- o = Qe(e, n);
857
+ o = tn(e, n);
858
858
  else {
859
- const r = re(t);
859
+ const r = ie(t);
860
860
  o = {
861
861
  x: e.x - r.x,
862
862
  y: e.y - r.y,
@@ -864,36 +864,36 @@ function Wt(t, e, n) {
864
864
  height: e.height
865
865
  };
866
866
  }
867
- return rt(o);
867
+ return st(o);
868
868
  }
869
- function se(t, e) {
870
- const n = P(t);
871
- return n === e || !R(n) || B(n) ? !1 : E(n).position === "fixed" || se(n, e);
869
+ function ce(t, e) {
870
+ const n = D(t);
871
+ return n === e || !R(n) || U(n) ? !1 : E(n).position === "fixed" || ce(n, e);
872
872
  }
873
- function Ze(t, e) {
873
+ function en(t, e) {
874
874
  const n = e.get(t);
875
875
  if (n)
876
876
  return n;
877
- let o = Y(t, [], !1).filter((c) => R(c) && U(c) !== "body"), r = null;
877
+ let o = K(t, [], !1).filter((c) => R(c) && I(c) !== "body"), r = null;
878
878
  const i = E(t).position === "fixed";
879
- let s = i ? P(t) : t;
880
- for (; R(s) && !B(s); ) {
881
- const c = E(s), a = vt(s);
882
- !a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || G(s) && !a && se(t, s)) ? o = o.filter((f) => f !== s) : r = c, s = P(s);
879
+ let s = i ? D(t) : t;
880
+ for (; R(s) && !U(s); ) {
881
+ const c = E(s), a = At(s);
882
+ !a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || Q(s) && !a && ce(t, s)) ? o = o.filter((f) => f !== s) : r = c, s = D(s);
883
883
  }
884
884
  return e.set(t, o), o;
885
885
  }
886
- function tn(t) {
886
+ function nn(t) {
887
887
  let {
888
888
  element: e,
889
889
  boundary: n,
890
890
  rootBoundary: o,
891
891
  strategy: r
892
892
  } = t;
893
- const s = [...n === "clippingAncestors" ? ut(e) ? [] : Ze(e, this._c) : [].concat(n), o], c = s[0], a = s.reduce((l, f) => {
894
- const u = Wt(e, f, r);
895
- return l.top = W(u.top, l.top), l.right = et(u.right, l.right), l.bottom = et(u.bottom, l.bottom), l.left = W(u.left, l.left), l;
896
- }, Wt(e, c, r));
893
+ const s = [...n === "clippingAncestors" ? dt(e) ? [] : en(e, this._c) : [].concat(n), o], c = s[0], a = s.reduce((l, f) => {
894
+ const u = Mt(e, f, r);
895
+ return l.top = M(u.top, l.top), l.right = ot(u.right, l.right), l.bottom = ot(u.bottom, l.bottom), l.left = M(u.left, l.left), l;
896
+ }, Mt(e, c, r));
897
897
  return {
898
898
  width: a.right - a.left,
899
899
  height: a.bottom - a.top,
@@ -901,29 +901,29 @@ function tn(t) {
901
901
  y: a.top
902
902
  };
903
903
  }
904
- function en(t) {
904
+ function on(t) {
905
905
  const {
906
906
  width: e,
907
907
  height: n
908
- } = oe(t);
908
+ } = re(t);
909
909
  return {
910
910
  width: e,
911
911
  height: n
912
912
  };
913
913
  }
914
- function nn(t, e, n) {
915
- const o = L(e), r = k(e), i = n === "fixed", s = F(t, !0, i, e);
914
+ function rn(t, e, n) {
915
+ const o = L(e), r = S(e), i = n === "fixed", s = $(t, !0, i, e);
916
916
  let c = {
917
917
  scrollLeft: 0,
918
918
  scrollTop: 0
919
919
  };
920
920
  const a = O(0);
921
921
  if (o || !o && !i)
922
- if ((U(e) !== "body" || G(r)) && (c = ft(e)), o) {
923
- const d = F(e, !0, i, e);
924
- a.x = d.x + e.clientLeft, a.y = d.y + e.clientTop;
925
- } else r && (a.x = Rt(r));
926
- const l = r && !o && !i ? ie(r, c) : O(0), f = s.left + c.scrollLeft - a.x - l.x, u = s.top + c.scrollTop - a.y - l.y;
922
+ if ((I(e) !== "body" || Q(r)) && (c = ht(e)), o) {
923
+ const h = $(e, !0, i, e);
924
+ a.x = h.x + e.clientLeft, a.y = h.y + e.clientTop;
925
+ } else r && (a.x = Ot(r));
926
+ const l = r && !o && !i ? se(r, c) : O(0), f = s.left + c.scrollLeft - a.x - l.x, u = s.top + c.scrollTop - a.y - l.y;
927
927
  return {
928
928
  x: f,
929
929
  y: u,
@@ -931,39 +931,39 @@ function nn(t, e, n) {
931
931
  height: s.height
932
932
  };
933
933
  }
934
- function dt(t) {
934
+ function pt(t) {
935
935
  return E(t).position === "static";
936
936
  }
937
- function Mt(t, e) {
937
+ function Nt(t, e) {
938
938
  if (!L(t) || E(t).position === "fixed")
939
939
  return null;
940
940
  if (e)
941
941
  return e(t);
942
942
  let n = t.offsetParent;
943
- return k(t) === n && (n = n.ownerDocument.body), n;
943
+ return S(t) === n && (n = n.ownerDocument.body), n;
944
944
  }
945
- function ce(t, e) {
945
+ function le(t, e) {
946
946
  const n = A(t);
947
- if (ut(t))
947
+ if (dt(t))
948
948
  return n;
949
949
  if (!L(t)) {
950
- let r = P(t);
951
- for (; r && !B(r); ) {
952
- if (R(r) && !dt(r))
950
+ let r = D(t);
951
+ for (; r && !U(r); ) {
952
+ if (R(r) && !pt(r))
953
953
  return r;
954
- r = P(r);
954
+ r = D(r);
955
955
  }
956
956
  return n;
957
957
  }
958
- let o = Mt(t, e);
959
- for (; o && Ie(o) && dt(o); )
960
- o = Mt(o, e);
961
- return o && B(o) && dt(o) && !vt(o) ? n : o || je(t) || n;
958
+ let o = Nt(t, e);
959
+ for (; o && Ye(o) && pt(o); )
960
+ o = Nt(o, e);
961
+ return o && U(o) && pt(o) && !At(o) ? n : o || qe(t) || n;
962
962
  }
963
- const on = async function(t) {
964
- const e = this.getOffsetParent || ce, n = this.getDimensions, o = await n(t.floating);
963
+ const sn = async function(t) {
964
+ const e = this.getOffsetParent || le, n = this.getDimensions, o = await n(t.floating);
965
965
  return {
966
- reference: nn(t.reference, await e(t.floating), t.strategy),
966
+ reference: rn(t.reference, await e(t.floating), t.strategy),
967
967
  floating: {
968
968
  x: 0,
969
969
  y: 0,
@@ -972,24 +972,24 @@ const on = async function(t) {
972
972
  }
973
973
  };
974
974
  };
975
- function rn(t) {
975
+ function cn(t) {
976
976
  return E(t).direction === "rtl";
977
977
  }
978
- const sn = {
979
- convertOffsetParentRelativeRectToViewportRelativeRect: Ke,
980
- getDocumentElement: k,
981
- getClippingRect: tn,
982
- getOffsetParent: ce,
983
- getElementRects: on,
984
- getClientRects: Xe,
985
- getDimensions: en,
986
- getScale: H,
978
+ const ln = {
979
+ convertOffsetParentRelativeRectToViewportRelativeRect: Je,
980
+ getDocumentElement: S,
981
+ getClippingRect: nn,
982
+ getOffsetParent: le,
983
+ getElementRects: sn,
984
+ getClientRects: Ge,
985
+ getDimensions: on,
986
+ getScale: z,
987
987
  isElement: R,
988
- isRTL: rn
988
+ isRTL: cn
989
989
  };
990
- function cn(t, e) {
990
+ function an(t, e) {
991
991
  let n = null, o;
992
- const r = k(t);
992
+ const r = S(t);
993
993
  function i() {
994
994
  var c;
995
995
  clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
@@ -1000,13 +1000,13 @@ function cn(t, e) {
1000
1000
  left: l,
1001
1001
  top: f,
1002
1002
  width: u,
1003
- height: d
1003
+ height: h
1004
1004
  } = t.getBoundingClientRect();
1005
- if (c || e(), !u || !d)
1005
+ if (c || e(), !u || !h)
1006
1006
  return;
1007
- const h = Z(f), p = Z(r.clientWidth - (l + u)), g = Z(r.clientHeight - (f + d)), y = Z(l), w = {
1008
- rootMargin: -h + "px " + -p + "px " + -g + "px " + -y + "px",
1009
- threshold: W(0, et(1, a)) || 1
1007
+ const d = tt(f), m = tt(r.clientWidth - (l + u)), g = tt(r.clientHeight - (f + h)), y = tt(l), w = {
1008
+ rootMargin: -d + "px " + -m + "px " + -g + "px " + -y + "px",
1009
+ threshold: M(0, ot(1, a)) || 1
1010
1010
  };
1011
1011
  let x = !0;
1012
1012
  function b(v) {
@@ -1033,7 +1033,7 @@ function cn(t, e) {
1033
1033
  }
1034
1034
  return s(!0), i;
1035
1035
  }
1036
- function ln(t, e, n, o) {
1036
+ function un(t, e, n, o) {
1037
1037
  o === void 0 && (o = {});
1038
1038
  const {
1039
1039
  ancestorScroll: r = !0,
@@ -1041,70 +1041,70 @@ function ln(t, e, n, o) {
1041
1041
  elementResize: s = typeof ResizeObserver == "function",
1042
1042
  layoutShift: c = typeof IntersectionObserver == "function",
1043
1043
  animationFrame: a = !1
1044
- } = o, l = At(t), f = r || i ? [...l ? Y(l) : [], ...Y(e)] : [];
1045
- f.forEach((m) => {
1046
- r && m.addEventListener("scroll", n, {
1044
+ } = o, l = Et(t), f = r || i ? [...l ? K(l) : [], ...K(e)] : [];
1045
+ f.forEach((p) => {
1046
+ r && p.addEventListener("scroll", n, {
1047
1047
  passive: !0
1048
- }), i && m.addEventListener("resize", n);
1048
+ }), i && p.addEventListener("resize", n);
1049
1049
  });
1050
- const u = l && c ? cn(l, n) : null;
1051
- let d = -1, h = null;
1052
- s && (h = new ResizeObserver((m) => {
1053
- let [w] = m;
1054
- w && w.target === l && h && (h.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
1050
+ const u = l && c ? an(l, n) : null;
1051
+ let h = -1, d = null;
1052
+ s && (d = new ResizeObserver((p) => {
1053
+ let [w] = p;
1054
+ w && w.target === l && d && (d.unobserve(e), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
1055
1055
  var x;
1056
- (x = h) == null || x.observe(e);
1056
+ (x = d) == null || x.observe(e);
1057
1057
  })), n();
1058
- }), l && !a && h.observe(l), h.observe(e));
1059
- let p, g = a ? F(t) : null;
1058
+ }), l && !a && d.observe(l), d.observe(e));
1059
+ let m, g = a ? $(t) : null;
1060
1060
  a && y();
1061
1061
  function y() {
1062
- const m = F(t);
1063
- g && (m.x !== g.x || m.y !== g.y || m.width !== g.width || m.height !== g.height) && n(), g = m, p = requestAnimationFrame(y);
1062
+ const p = $(t);
1063
+ g && (p.x !== g.x || p.y !== g.y || p.width !== g.width || p.height !== g.height) && n(), g = p, m = requestAnimationFrame(y);
1064
1064
  }
1065
1065
  return n(), () => {
1066
- var m;
1066
+ var p;
1067
1067
  f.forEach((w) => {
1068
1068
  r && w.removeEventListener("scroll", n), i && w.removeEventListener("resize", n);
1069
- }), u == null || u(), (m = h) == null || m.disconnect(), h = null, a && cancelAnimationFrame(p);
1069
+ }), u == null || u(), (p = d) == null || p.disconnect(), d = null, a && cancelAnimationFrame(m);
1070
1070
  };
1071
1071
  }
1072
- const an = Ue, un = _e, Ft = ze, fn = (t, e, n) => {
1072
+ const fn = Ie, dn = je, $t = Ue, hn = (t, e, n) => {
1073
1073
  const o = /* @__PURE__ */ new Map(), r = {
1074
- platform: sn,
1074
+ platform: ln,
1075
1075
  ...n
1076
1076
  }, i = {
1077
1077
  ...r.platform,
1078
1078
  _c: o
1079
1079
  };
1080
- return He(t, e, {
1080
+ return Be(t, e, {
1081
1081
  ...r,
1082
1082
  platform: i
1083
1083
  });
1084
- }, Nn = ({
1084
+ }, zn = ({
1085
1085
  content: t,
1086
1086
  open: e,
1087
1087
  placement: n,
1088
1088
  offset: { mainAxis: o, crossAxis: r } = { mainAxis: 0, crossAxis: 0 }
1089
- }) => wt((i) => {
1090
- const s = X.toSignal(e), c = i.element;
1091
- return qt(
1089
+ }) => xt((i) => {
1090
+ const s = J.toSignal(e), c = i.element;
1091
+ return Kt(
1092
1092
  s,
1093
- () => Yt(
1093
+ () => qt(
1094
1094
  "body",
1095
- Ut.div(
1096
- J((a) => {
1095
+ It.div(
1096
+ G((a) => {
1097
1097
  const l = a;
1098
- return l.style.position = "absolute", T(
1099
- ln(c, l, async () => {
1100
- const { x: f, y: u } = await fn(c, l, {
1098
+ return l.style.position = "absolute", k(
1099
+ un(c, l, async () => {
1100
+ const { x: f, y: u } = await hn(c, l, {
1101
1101
  placement: n,
1102
1102
  strategy: "absolute",
1103
1103
  middleware: [
1104
- Ft(),
1105
- an({ mainAxis: o, crossAxis: r }),
1106
- un(),
1107
- Ft()
1104
+ $t(),
1105
+ fn({ mainAxis: o, crossAxis: r }),
1106
+ dn(),
1107
+ $t()
1108
1108
  ]
1109
1109
  });
1110
1110
  l.style.top = `${u}px`, l.style.left = `${f}px`;
@@ -1115,36 +1115,88 @@ const an = Ue, un = _e, Ft = ze, fn = (t, e, n) => {
1115
1115
  )
1116
1116
  )
1117
1117
  );
1118
- }), hn = (t, e) => {
1118
+ }), mn = ({
1119
+ request: t,
1120
+ load: e,
1121
+ convertError: n
1122
+ }) => {
1123
+ const o = W(P.notAsked), r = o.map(
1124
+ (u) => P.isSuccess(u) ? u.value : void 0
1125
+ ), i = o.map(
1126
+ (u) => P.isFailure(u) ? u.error : void 0
1127
+ ), s = o.map((u) => P.isLoading(u));
1128
+ let c;
1129
+ const a = async (u) => {
1130
+ c == null || c.abort(), c = new AbortController();
1131
+ const h = c.signal, d = o.get();
1132
+ o.set(P.loading(P.getOrUndefined(d)));
1133
+ try {
1134
+ const m = await e({ request: u, abortSignal: h, previous: d });
1135
+ c = void 0, o.set(P.success(m));
1136
+ } catch (m) {
1137
+ c = void 0, o.set(P.failure(n(m)));
1138
+ }
1139
+ }, l = () => a(t.get()), f = () => {
1140
+ c == null || c.abort(), c = void 0, o.dispose();
1141
+ };
1142
+ return o.onDispose(t.on(a)), {
1143
+ status: o,
1144
+ value: r,
1145
+ error: i,
1146
+ loading: s,
1147
+ reload: l,
1148
+ dispose: f
1149
+ };
1150
+ }, pn = (t, e) => {
1151
+ const { status: n, dispose: o, reload: r } = t, { notAsked: i, loading: s, error: c, success: a } = e;
1152
+ return _(
1153
+ k(o),
1154
+ bt(n, {
1155
+ NotAsked: () => i != null ? i(r) : void 0,
1156
+ Loading: (l) => s != null ? s(l.$.previousValue, r) : ge(
1157
+ l.$.previousValue,
1158
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1159
+ (f) => a(f, r),
1160
+ // TODO unsure why this is needed
1161
+ () => nt
1162
+ ),
1163
+ AsyncFailure: (l) => c != null ? c(l.$.error, r) : void 0,
1164
+ AsyncSuccess: (l) => a(l.$.value, r)
1165
+ })
1166
+ );
1167
+ }, Bn = (t) => {
1168
+ const e = mn(t);
1169
+ return pn(e, t);
1170
+ }, gn = (t, e) => {
1119
1171
  if (typeof e == "function")
1120
- return hn(t, { success: e });
1121
- const n = e.failure ?? ((r) => K(
1122
- T(r.on(console.error)),
1172
+ return gn(t, { success: e });
1173
+ const n = e.failure ?? ((r) => _(
1174
+ k(r.on(console.error)),
1123
1175
  r.map((i) => `Error: ${i}`)
1124
1176
  )), o = e.success;
1125
- return jt(X.toSignal(t), {
1177
+ return bt(J.toSignal(t), {
1126
1178
  Success: (r) => o(r.$.value),
1127
1179
  Failure: (r) => n(r.$.error)
1128
1180
  });
1129
- }, Vn = () => _t.focus((t) => {
1181
+ }, Un = () => jt.focus((t) => {
1130
1182
  var e;
1131
1183
  return (e = t.target) == null ? void 0 : e.select();
1132
- }), $n = (t) => wt((e) => {
1133
- const { element: n } = e, o = N({
1184
+ }), _n = (t) => xt((e) => {
1185
+ const { element: n } = e, o = W({
1134
1186
  width: n.clientWidth,
1135
1187
  height: n.clientHeight
1136
- }), r = st(t(o))(e), i = () => {
1188
+ }), r = lt(t(o))(e), i = () => {
1137
1189
  o.set({ width: n.clientWidth, height: n.clientHeight });
1138
1190
  };
1139
1191
  let s;
1140
- return typeof ResizeObserver == "function" && (s = new ResizeObserver(i), s.observe(n)), T((c) => {
1192
+ return typeof ResizeObserver == "function" && (s = new ResizeObserver(i), s.observe(n)), k((c) => {
1141
1193
  s == null || s.disconnect(), r(c);
1142
1194
  });
1143
- }), Hn = (t) => (e) => {
1144
- const n = xt(), o = N({
1195
+ }), In = (t) => (e) => {
1196
+ const n = vt(), o = W({
1145
1197
  width: (n == null ? void 0 : n.innerWidth) ?? 0,
1146
1198
  height: (n == null ? void 0 : n.innerHeight) ?? 0
1147
- }), r = st(t(o))(e), i = () => {
1199
+ }), r = lt(t(o))(e), i = () => {
1148
1200
  o.set({
1149
1201
  width: (n == null ? void 0 : n.innerWidth) ?? 0,
1150
1202
  height: (n == null ? void 0 : n.innerHeight) ?? 0
@@ -1153,7 +1205,7 @@ const an = Ue, un = _e, Ft = ze, fn = (t, e, n) => {
1153
1205
  return n == null || n.addEventListener("resize", i), (s) => {
1154
1206
  n == null || n.removeEventListener("resize", i), r(s);
1155
1207
  };
1156
- }, dn = (t, e) => {
1208
+ }, yn = (t, e) => {
1157
1209
  const n = e.split("/").filter((r) => r !== ""), o = {};
1158
1210
  for (let r = 0; r < t.length; r++) {
1159
1211
  const i = t[r], s = n[r];
@@ -1168,22 +1220,22 @@ const an = Ue, un = _e, Ft = ze, fn = (t, e, n) => {
1168
1220
  return { params: o, path: e };
1169
1221
  }
1170
1222
  return n.length !== t.length ? null : { params: o, path: e };
1171
- }, mn = (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 !== ""), pn = (t) => {
1223
+ }, wn = (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 !== ""), xn = (t) => {
1172
1224
  const e = t.map((n) => {
1173
- const o = mn(n);
1225
+ const o = wn(n);
1174
1226
  return { route: n, segments: o };
1175
1227
  });
1176
1228
  return function(o) {
1177
1229
  for (const { segments: r, route: i } of e) {
1178
- const s = dn(r, o);
1230
+ const s = yn(r, o);
1179
1231
  if (s)
1180
1232
  return { ...s, route: i };
1181
1233
  }
1182
1234
  return null;
1183
1235
  };
1184
- }, zn = (t) => {
1185
- const e = pn(Object.keys(t));
1186
- return Xt((n) => {
1236
+ }, jn = (t) => {
1237
+ const e = xn(Object.keys(t));
1238
+ return Jt((n) => {
1187
1239
  const o = n.map((r) => {
1188
1240
  const i = e(r.pathname);
1189
1241
  if (i == null)
@@ -1196,57 +1248,57 @@ const an = Ue, un = _e, Ft = ze, fn = (t, e, n) => {
1196
1248
  hash: r.hash
1197
1249
  };
1198
1250
  });
1199
- return pe(
1251
+ return ye(
1200
1252
  o.map((r) => [r.route, r]),
1201
1253
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1202
1254
  t
1203
1255
  );
1204
1256
  });
1205
- }, it = 60 * 1e3, yt = 60 * it, q = 24 * yt, Nt = 7 * q, Vt = 30 * q, gn = 365 * q, yn = [
1257
+ }, ct = 60 * 1e3, wt = 60 * ct, X = 24 * wt, Vt = 7 * X, Ht = 30 * X, vn = 365 * X, bn = [
1206
1258
  {
1207
- max: it * 90,
1208
- value: it,
1259
+ max: ct * 90,
1260
+ value: ct,
1209
1261
  name: "minute",
1210
1262
  past: { singular: "a minute ago", plural: "{} minutes ago" },
1211
1263
  future: { singular: "in a minute", plural: "in {} minutes" }
1212
1264
  },
1213
1265
  {
1214
- max: yt * 36,
1215
- value: yt,
1266
+ max: wt * 36,
1267
+ value: wt,
1216
1268
  name: "hour",
1217
1269
  past: { singular: "an hour ago", plural: "{} hours ago" },
1218
1270
  future: { singular: "in an hour", plural: "in {} hours" }
1219
1271
  },
1220
1272
  {
1221
- max: q * 10,
1222
- value: q,
1273
+ max: X * 10,
1274
+ value: X,
1223
1275
  name: "day",
1224
1276
  past: { singular: "yesterday", plural: "{} days ago" },
1225
1277
  future: { singular: "tomorrow", plural: "in {} days" }
1226
1278
  },
1227
1279
  {
1228
- max: Nt * 6,
1229
- value: Nt,
1280
+ max: Vt * 6,
1281
+ value: Vt,
1230
1282
  name: "week",
1231
1283
  past: { singular: "last week", plural: "{} weeks ago" },
1232
1284
  future: { singular: "in a week", plural: "in {} weeks" }
1233
1285
  },
1234
1286
  {
1235
- max: Vt * 18,
1236
- value: Vt,
1287
+ max: Ht * 18,
1288
+ value: Ht,
1237
1289
  name: "month",
1238
1290
  past: { singular: "last month", plural: "{} months ago" },
1239
1291
  future: { singular: "in a month", plural: "in {} months" }
1240
1292
  },
1241
1293
  {
1242
1294
  max: 1 / 0,
1243
- value: gn,
1295
+ value: vn,
1244
1296
  name: "year",
1245
1297
  past: { singular: "last year", plural: "{} years ago" },
1246
1298
  future: { singular: "in a year", plural: "in {} years" }
1247
1299
  }
1248
1300
  ];
1249
- function $t(t, e, n, o) {
1301
+ function zt(t, e, n, o) {
1250
1302
  const r = Math.round(t / e);
1251
1303
  return r <= 1 ? n : o.replace(
1252
1304
  "{}",
@@ -1256,74 +1308,77 @@ function $t(t, e, n, o) {
1256
1308
  })
1257
1309
  );
1258
1310
  }
1259
- const wn = (t = 1e3) => {
1260
- const e = N(/* @__PURE__ */ new Date()), n = we(() => e.set(/* @__PURE__ */ new Date()), t);
1311
+ const An = (t = 1e3) => {
1312
+ const e = W(/* @__PURE__ */ new Date()), n = ve(() => e.set(/* @__PURE__ */ new Date()), t);
1261
1313
  return e.onDispose(n), e;
1262
- }, xn = (t) => {
1314
+ }, Rn = (t) => {
1263
1315
  const e = Math.abs(t);
1264
- if (e < it)
1316
+ if (e < ct)
1265
1317
  return t < 0 ? "just now" : "in a moment";
1266
- for (const n of yn)
1318
+ for (const n of bn)
1267
1319
  if (e < n.max)
1268
- return t < 0 ? $t(e, n.value, n.past.singular, n.past.plural) : $t(e, n.value, n.future.singular, n.future.plural);
1320
+ return t < 0 ? zt(e, n.value, n.past.singular, n.past.plural) : zt(e, n.value, n.future.singular, n.future.plural);
1269
1321
  throw new Error("unreachable");
1270
- }, vn = (t, { now: e, frequency: n = 1e4 } = {}) => {
1271
- const o = e != null ? Bt.is(e) ? e.derive() : N(e) : wn(n), r = ge(
1322
+ }, En = (t, { now: e, frequency: n = 1e4 } = {}) => {
1323
+ const o = e != null ? _t.is(e) ? e.derive() : W(e) : An(n), r = we(
1272
1324
  t,
1273
1325
  o
1274
1326
  )((i, s) => i.getTime() - s.getTime());
1275
- return r.onDispose(() => X.dispose(o)), r;
1276
- }, bn = (t, e = {}) => {
1277
- const n = vn(t, e), o = n.map(xn);
1327
+ return r.onDispose(() => J.dispose(o)), r;
1328
+ }, On = (t, e = {}) => {
1329
+ const n = En(t, e), o = n.map(Rn);
1278
1330
  return o.onDispose(n.dispose), o;
1279
- }, Bn = (t, e = {}) => bn(t, e);
1280
- class An extends ye {
1331
+ }, Yn = (t, e = {}) => On(t, e);
1332
+ class Ln extends xe {
1281
1333
  constructor() {
1282
1334
  super(...arguments);
1283
1335
  /**
1284
1336
  * Triggers an update of the Ticker by incrementing its internal value.
1285
1337
  * @returns void
1286
1338
  */
1287
- Tt(this, "tick", () => this.update((n) => n + 1));
1339
+ Ct(this, "tick", () => this.update((n) => n + 1));
1288
1340
  }
1289
1341
  }
1290
- const Un = (t = 0) => new An(t, (e, n) => e === n);
1342
+ const qn = (t = 0) => new Ln(t, (e, n) => e === n);
1291
1343
  export {
1292
- Le as Anchor,
1293
- ke as AsyncResultView,
1294
- Pn as AutoFocus,
1295
- Dn as AutoSelect,
1296
- $n as ElementSize,
1297
- Mn as HTMLTitle,
1298
- Wn as HiddenWhenEmpty,
1299
- Ce as InViewport,
1300
- Re as LocationProviderMarker,
1301
- Nn as PopOver,
1302
- Sn as ProvideAppearance,
1303
- Ln as ProvideLocation,
1304
- hn as ResultView,
1305
- zn as Router,
1306
- Vn as SelectOnFocus,
1307
- An as Ticker,
1308
- Cn as UseAppearance,
1309
- Xt as UseLocation,
1310
- Fn as WhenInViewport,
1311
- Hn as WindowSize,
1312
- ve as _checkExtensionCondition,
1313
- xe as _getExtension,
1314
- pn as _makeRouteMatcher,
1315
- mn as _parseRouteSegments,
1316
- Jt as appearanceMarker,
1317
- kn as areLocationsEqual,
1318
- Ae as handleAnchorClick,
1319
- Ee as locationFromURL,
1320
- wn as makeNowSignal,
1321
- Bn as makeRelativeTime,
1322
- vn as makeRelativeTimeMillisSignal,
1323
- bn as makeRelativeTimeSignal,
1324
- Un as makeTicker,
1325
- dn as matchesRoute,
1326
- Oe as setLocationFromUrl,
1327
- xn as timeDiffToString,
1328
- Tn as urlFromLocation
1344
+ Se as Anchor,
1345
+ Te as AsyncResultView,
1346
+ Mn as AutoFocus,
1347
+ Nn as AutoSelect,
1348
+ _n as ElementSize,
1349
+ Vn as HTMLTitle,
1350
+ $n as HiddenWhenEmpty,
1351
+ De as InViewport,
1352
+ Oe as LocationProviderMarker,
1353
+ zn as PopOver,
1354
+ Wn as ProvideAppearance,
1355
+ Cn as ProvideLocation,
1356
+ Bn as Resource,
1357
+ pn as ResourceDisplay,
1358
+ gn as ResultView,
1359
+ jn as Router,
1360
+ Un as SelectOnFocus,
1361
+ Ln as Ticker,
1362
+ Fn as UseAppearance,
1363
+ Jt as UseLocation,
1364
+ Hn as WhenInViewport,
1365
+ In as WindowSize,
1366
+ Ae as _checkExtensionCondition,
1367
+ be as _getExtension,
1368
+ xn as _makeRouteMatcher,
1369
+ wn as _parseRouteSegments,
1370
+ Gt as appearanceMarker,
1371
+ Pn as areLocationsEqual,
1372
+ Ee as handleAnchorClick,
1373
+ Le as locationFromURL,
1374
+ An as makeNowSignal,
1375
+ Yn as makeRelativeTime,
1376
+ En as makeRelativeTimeMillisSignal,
1377
+ On as makeRelativeTimeSignal,
1378
+ mn as makeResource,
1379
+ qn as makeTicker,
1380
+ yn as matchesRoute,
1381
+ ke as setLocationFromUrl,
1382
+ Rn as timeDiffToString,
1383
+ Dn as urlFromLocation
1329
1384
  };