@tempots/ui 4.2.2 → 4.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.cjs +1 -1
  2. package/index.js +551 -542
  3. package/package.json +2 -2
package/index.js CHANGED
@@ -1,17 +1,17 @@
1
- var ge = Object.defineProperty;
2
- var ye = (t, e, n) => e in t ? ge(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var pt = (t, e, n) => ye(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { getWindow as J, prop as W, makeProviderMark as _t, Signal as It, Use as jt, html as Yt, on as qt, Value as L, attr as Kt, Empty as yt, OneOfType as Xt, WithElement as G, OnDispose as F, Portal as Jt, Fragment as At, renderableOfTNode as Rt, When as Gt, WithBrowserCtx as Qt, effectOf as we, OneOfTuple as xe, computedOf as ve, Prop as be } from "@tempots/dom";
5
- import { delayed as Zt, AsyncResult as D, nearEqual as tt, interval as Ae } from "@tempots/std";
6
- const Re = (t) => {
1
+ var ye = Object.defineProperty;
2
+ var we = (t, e, n) => e in t ? ye(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var yt = (t, e, n) => we(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { getWindow as G, prop as F, makeProviderMark as It, Signal as jt, Use as Yt, html as qt, on as Kt, Value as O, attr as Xt, Empty as xt, OneOfType as Jt, WithElement as Q, OnDispose as M, Portal as Gt, Fragment as Et, renderableOfTNode as Lt, When as Qt, WithBrowserCtx as Zt, effectOf as xe, OneOfTuple as ve, computedOf as be, Prop as Ae } from "@tempots/dom";
5
+ import { delayed as te, AsyncResult as D, nearEqual as et, interval as Re } from "@tempots/std";
6
+ const Ee = (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
- }, Ee = (t, e) => {
12
- const n = Re(e);
11
+ }, Le = (t, e) => {
12
+ const n = Ee(e);
13
13
  return n != null && (t.length === 0 || !t.some((o) => n == o));
14
- }, Le = (t, e, n, o) => {
14
+ }, Oe = (t, e, n, o) => {
15
15
  let s = t.target;
16
16
  for (; s != null && !(s instanceof HTMLAnchorElement); )
17
17
  s = s.parentElement;
@@ -22,12 +22,12 @@ const Re = (t) => {
22
22
  return !0;
23
23
  const { pathname: r, search: c, hash: l } = i;
24
24
  if (o) {
25
- const a = r + c + l, f = i.getAttribute("href");
26
- if (!(f != null && f.startsWith("#")) && f !== a)
25
+ const a = r + c + l, h = i.getAttribute("href");
26
+ if (!(h != null && h.startsWith("#")) && h !== a)
27
27
  return !0;
28
28
  }
29
- return e ? !1 : Ee(n, r);
30
- }, Oe = (t, e = {
29
+ return e ? !1 : Le(n, r);
30
+ }, Se = (t, e = {
31
31
  ignoreUrlWithExtension: !0,
32
32
  allowedExtensions: [],
33
33
  ignoreExternalUrl: !0
@@ -36,41 +36,41 @@ const Re = (t) => {
36
36
  (o) => o.startsWith(".") ? o : "." + o
37
37
  ) : [];
38
38
  return (o) => {
39
- Le(
39
+ Oe(
40
40
  o,
41
41
  e.ignoreUrlWithExtension ?? !0,
42
42
  n,
43
43
  e.ignoreExternalUrl ?? !0
44
44
  ) || t() && o.preventDefault();
45
45
  };
46
- }, Se = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, te = (t, e) => {
46
+ }, Te = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, ee = (t, e) => {
47
47
  var i;
48
- const n = new URL(t, e ?? ((i = J()) == null ? void 0 : i.location.toString())), o = Object.fromEntries(n.searchParams.entries());
48
+ const n = new URL(t, e ?? ((i = G()) == null ? void 0 : i.location.toString())), o = Object.fromEntries(n.searchParams.entries());
49
49
  let s = n.hash;
50
50
  return s.startsWith("#") && (s = s.substring(1)), {
51
51
  pathname: n.pathname,
52
52
  search: o,
53
53
  hash: s === "" ? void 0 : s
54
54
  };
55
- }, Pt = (t, e) => {
56
- const n = te(e);
55
+ }, Wt = (t, e) => {
56
+ const n = ee(e);
57
57
  return t.set(n), t;
58
- }, wt = (t) => {
58
+ }, vt = (t) => {
59
59
  const n = new URLSearchParams(t.search).toString(), o = t.hash;
60
60
  return `${t.pathname}${n ? `?${n}` : ""}${o ? `#${o}` : ""}`;
61
- }, Te = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), ke = (t) => {
61
+ }, ke = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), Ce = (t) => {
62
62
  const e = t.container.currentURL, n = e.iso(
63
- (o) => te(o),
63
+ (o) => ee(o),
64
64
  (o) => {
65
- if (Te(o.pathname))
66
- return wt(o);
65
+ if (ke(o.pathname))
66
+ return vt(o);
67
67
  const s = new URL(o.pathname, e.value), i = s.origin + s.pathname;
68
- return wt({ ...o, pathname: i });
68
+ return vt({ ...o, pathname: i });
69
69
  }
70
70
  );
71
71
  return { value: n, dispose: n.dispose };
72
- }, Ce = () => {
73
- const t = J(), e = (t == null ? void 0 : t.location.hash) === "" ? void 0 : (t == null ? void 0 : t.location.hash.substring(1)) ?? void 0;
72
+ }, De = () => {
73
+ const t = G(), e = (t == null ? void 0 : t.location.hash) === "" ? void 0 : (t == null ? void 0 : t.location.hash.substring(1)) ?? void 0;
74
74
  return {
75
75
  pathname: (t == null ? void 0 : t.location.pathname) ?? "",
76
76
  search: Object.fromEntries(
@@ -78,8 +78,8 @@ const Re = (t) => {
78
78
  ),
79
79
  hash: e
80
80
  };
81
- }, De = () => {
82
- const t = W(Ce(), Se), e = J(), n = () => {
81
+ }, Pe = () => {
82
+ const t = F(De(), Te), e = G(), n = () => {
83
83
  let o = (e == null ? void 0 : e.location.hash) ?? "";
84
84
  o.startsWith("#") && (o = o.substring(1));
85
85
  const s = {
@@ -94,72 +94,72 @@ const Re = (t) => {
94
94
  return e == null || e.addEventListener("popstate", n), t.onDispose(() => {
95
95
  e == null || e.removeEventListener("popstate", n);
96
96
  }), t.on((o) => {
97
- e == null || e.history.pushState({}, "", wt(o));
97
+ e == null || e.history.pushState({}, "", vt(o));
98
98
  }), {
99
99
  value: t,
100
100
  dispose: t.dispose
101
101
  };
102
- }, ee = {
103
- mark: _t("LocationProvider"),
102
+ }, ne = {
103
+ mark: It("LocationProvider"),
104
104
  create: (t, e) => {
105
105
  if (e.isBrowser())
106
- return De();
106
+ return Pe();
107
107
  if (e.isHeadless())
108
- return ke(e);
108
+ return Ce(e);
109
109
  throw new Error("Unknown context");
110
110
  }
111
- }, Pe = (t) => {
111
+ }, We = (t) => {
112
112
  document.startViewTransition ? document.startViewTransition(t) : t();
113
- }, We = (t, ...e) => {
114
- if (typeof t == "string" || It.is(t))
115
- return We({ href: t }, ...e);
113
+ }, Fe = (t, ...e) => {
114
+ if (typeof t == "string" || jt.is(t))
115
+ return Fe({ href: t }, ...e);
116
116
  const {
117
117
  href: n,
118
118
  withViewTransition: o,
119
119
  ...s
120
120
  } = t;
121
- return jt(ee, (i) => Yt.a(
122
- qt.click(
123
- Oe(() => (o == !0 ? Pe(() => {
124
- Pt(i, L.get(n));
125
- }) : Pt(i, L.get(n)), !0), s)
121
+ return Yt(ne, (i) => qt.a(
122
+ Kt.click(
123
+ Se(() => (o == !0 ? We(() => {
124
+ Wt(i, O.get(n));
125
+ }) : Wt(i, O.get(n)), !0), s)
126
126
  ),
127
- Kt.href(n),
127
+ Xt.href(n),
128
128
  ...e
129
129
  ));
130
- }, Vn = {
131
- mark: _t("Appearance"),
130
+ }, Nn = {
131
+ mark: It("Appearance"),
132
132
  create: () => {
133
- const t = Fe();
133
+ const t = Me();
134
134
  return {
135
135
  value: t,
136
136
  dispose: t.dispose
137
137
  };
138
138
  }
139
139
  };
140
- function Fe() {
141
- const t = J(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, n = (e == null ? void 0 : e.matches) ?? !1, o = W(n ? "dark" : "light"), s = (i) => o.set(i.matches ? "dark" : "light");
140
+ function Me() {
141
+ const t = G(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, n = (e == null ? void 0 : e.matches) ?? !1, o = F(n ? "dark" : "light"), s = (i) => o.set(i.matches ? "dark" : "light");
142
142
  return e == null || e.addEventListener("change", s), o.onDispose(() => e == null ? void 0 : e.removeEventListener("change", s)), o;
143
143
  }
144
- const ne = (t, e) => {
144
+ const oe = (t, e) => {
145
145
  if (typeof e == "function")
146
- return ne(t, { success: e });
147
- const n = e.failure ?? ((r) => r.map((c) => `Error: ${c}`)), o = e.success, s = e.loading ?? (() => yt), i = e.notAsked ?? (() => yt);
148
- return Xt(L.toSignal(t), {
146
+ return oe(t, { success: e });
147
+ const n = e.failure ?? ((r) => r.map((c) => `Error: ${c}`)), o = e.success, s = e.loading ?? (() => xt), i = e.notAsked ?? (() => xt);
148
+ return Jt(O.toSignal(t), {
149
149
  AsyncSuccess: (r) => o(r.$.value),
150
150
  AsyncFailure: (r) => n(r.$.error),
151
151
  Loading: (r) => s(r.map((c) => c.previousValue)),
152
152
  NotAsked: i
153
153
  });
154
- }, Nn = (t = 10) => G((e) => F(Zt(() => e == null ? void 0 : e.focus(), t))), $n = (t = 10) => G((e) => {
155
- const n = Zt(() => e.select(), t);
156
- return F(n);
157
- }), Bn = G((t) => {
154
+ }, $n = (t = 10) => Q((e) => M(te(() => e == null ? void 0 : e.focus(), t))), Bn = (t = 10) => Q((e) => {
155
+ const n = te(() => e.select(), t);
156
+ return M(n);
157
+ }), Un = Q((t) => {
158
158
  const e = t.style.getPropertyValue(":empty");
159
- return t.style.setProperty(":empty", "display:none"), F((n) => {
159
+ return t.style.setProperty(":empty", "display:none"), M((n) => {
160
160
  n && t.style.setProperty(":empty", e);
161
161
  });
162
- }), Un = (t) => Jt("head > title", Kt.innerText(t)), Me = {
162
+ }), Hn = (t) => Gt("head > title", Xt.innerText(t)), Ve = {
163
163
  partial: {
164
164
  root: null,
165
165
  rootMargin: "0px",
@@ -170,90 +170,90 @@ const ne = (t, e) => {
170
170
  rootMargin: "0px",
171
171
  threshold: 1
172
172
  }
173
- }, nt = {
173
+ }, ot = {
174
174
  partial: /* @__PURE__ */ new Map(),
175
175
  full: /* @__PURE__ */ new Map()
176
- }, q = {
176
+ }, K = {
177
177
  partial: null,
178
178
  full: null
179
179
  };
180
- function Ve(t) {
181
- return q[t] == null && (q[t] = new IntersectionObserver((e) => {
180
+ function Ne(t) {
181
+ return K[t] == null && (K[t] = new IntersectionObserver((e) => {
182
182
  e.forEach((n) => {
183
- const o = nt[t].get(n.target);
183
+ const o = ot[t].get(n.target);
184
184
  o == null || o.set(n.isIntersecting);
185
185
  });
186
- }, Me[t])), q[t];
187
- }
188
- const Ne = ({ mode: t = "partial", once: e = !1 }, n) => {
189
- const o = W(!1);
190
- return At(
191
- G((s) => {
192
- const i = typeof IntersectionObserver < "u" ? Ve(t) : null;
193
- nt[t].set(s, o), i == null || i.observe(s);
186
+ }, Ve[t])), K[t];
187
+ }
188
+ const $e = ({ mode: t = "partial", once: e = !1 }, n) => {
189
+ const o = F(!1);
190
+ return Et(
191
+ Q((s) => {
192
+ const i = typeof IntersectionObserver < "u" ? Ne(t) : null;
193
+ ot[t].set(s, o), i == null || i.observe(s);
194
194
  function r() {
195
195
  var l;
196
- i == null || i.unobserve(s), nt[t].delete(s), nt[t].size === 0 && ((l = q[t]) == null || l.disconnect(), q[t] = null);
196
+ i == null || i.unobserve(s), ot[t].delete(s), ot[t].size === 0 && ((l = K[t]) == null || l.disconnect(), K[t] = null);
197
197
  }
198
198
  let c = null;
199
199
  return e && (c = o.on((l) => {
200
200
  l && r();
201
- })), F(() => {
201
+ })), M(() => {
202
202
  o.dispose(), r(), c == null || c();
203
203
  });
204
204
  }),
205
- Rt(n(o))
205
+ Lt(n(o))
206
206
  );
207
- }, Hn = (t, e, n) => Ne(t, (o) => Gt(o, e, n ?? (() => yt))), ot = Math.min, V = Math.max, st = Math.round, et = Math.floor, O = (t) => ({
207
+ }, zn = (t, e, n) => $e(t, (o) => Qt(o, e, n ?? (() => xt))), st = Math.min, $ = Math.max, it = Math.round, nt = Math.floor, S = (t) => ({
208
208
  x: t,
209
209
  y: t
210
- }), $e = {
210
+ }), Be = {
211
211
  left: "right",
212
212
  right: "left",
213
213
  bottom: "top",
214
214
  top: "bottom"
215
- }, Be = {
215
+ }, Ue = {
216
216
  start: "end",
217
217
  end: "start"
218
218
  };
219
- function Wt(t, e, n) {
220
- return V(t, ot(e, n));
219
+ function Ft(t, e, n) {
220
+ return $(t, st(e, n));
221
221
  }
222
- function lt(t, e) {
222
+ function at(t, e) {
223
223
  return typeof t == "function" ? t(e) : t;
224
224
  }
225
- function N(t) {
225
+ function B(t) {
226
226
  return t.split("-")[0];
227
227
  }
228
- function at(t) {
228
+ function ut(t) {
229
229
  return t.split("-")[1];
230
230
  }
231
- function oe(t) {
231
+ function se(t) {
232
232
  return t === "x" ? "y" : "x";
233
233
  }
234
- function se(t) {
234
+ function ie(t) {
235
235
  return t === "y" ? "height" : "width";
236
236
  }
237
- function z(t) {
238
- return ["top", "bottom"].includes(N(t)) ? "y" : "x";
237
+ function P(t) {
238
+ return ["top", "bottom"].includes(B(t)) ? "y" : "x";
239
239
  }
240
- function ie(t) {
241
- return oe(z(t));
240
+ function re(t) {
241
+ return se(P(t));
242
242
  }
243
- function Ue(t, e, n) {
243
+ function He(t, e, n) {
244
244
  n === void 0 && (n = !1);
245
- const o = at(t), s = ie(t), i = se(s);
245
+ const o = ut(t), s = re(t), i = ie(s);
246
246
  let r = s === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
247
- return e.reference[i] > e.floating[i] && (r = it(r)), [r, it(r)];
247
+ return e.reference[i] > e.floating[i] && (r = rt(r)), [r, rt(r)];
248
248
  }
249
- function He(t) {
250
- const e = it(t);
251
- return [xt(t), e, xt(e)];
249
+ function ze(t) {
250
+ const e = rt(t);
251
+ return [bt(t), e, bt(e)];
252
252
  }
253
- function xt(t) {
254
- return t.replace(/start|end/g, (e) => Be[e]);
253
+ function bt(t) {
254
+ return t.replace(/start|end/g, (e) => Ue[e]);
255
255
  }
256
- function ze(t, e, n) {
256
+ function _e(t, e, n) {
257
257
  const o = ["left", "right"], s = ["right", "left"], i = ["top", "bottom"], r = ["bottom", "top"];
258
258
  switch (t) {
259
259
  case "top":
@@ -266,15 +266,15 @@ function ze(t, e, n) {
266
266
  return [];
267
267
  }
268
268
  }
269
- function _e(t, e, n, o) {
270
- const s = at(t);
271
- let i = ze(N(t), n === "start", o);
272
- return s && (i = i.map((r) => r + "-" + s), e && (i = i.concat(i.map(xt)))), i;
269
+ function Ie(t, e, n, o) {
270
+ const s = ut(t);
271
+ let i = _e(B(t), n === "start", o);
272
+ return s && (i = i.map((r) => r + "-" + s), e && (i = i.concat(i.map(bt)))), i;
273
273
  }
274
- function it(t) {
275
- return t.replace(/left|right|bottom|top/g, (e) => $e[e]);
274
+ function rt(t) {
275
+ return t.replace(/left|right|bottom|top/g, (e) => Be[e]);
276
276
  }
277
- function Ie(t) {
277
+ function je(t) {
278
278
  return {
279
279
  top: 0,
280
280
  right: 0,
@@ -283,15 +283,15 @@ function Ie(t) {
283
283
  ...t
284
284
  };
285
285
  }
286
- function je(t) {
287
- return typeof t != "number" ? Ie(t) : {
286
+ function Ye(t) {
287
+ return typeof t != "number" ? je(t) : {
288
288
  top: t,
289
289
  right: t,
290
290
  bottom: t,
291
291
  left: t
292
292
  };
293
293
  }
294
- function rt(t) {
294
+ function ct(t) {
295
295
  const {
296
296
  x: e,
297
297
  y: n,
@@ -309,55 +309,55 @@ function rt(t) {
309
309
  y: n
310
310
  };
311
311
  }
312
- function Ft(t, e, n) {
312
+ function Mt(t, e, n) {
313
313
  let {
314
314
  reference: o,
315
315
  floating: s
316
316
  } = t;
317
- const i = z(e), r = ie(e), c = se(r), l = N(e), a = i === "y", f = o.x + o.width / 2 - s.width / 2, u = o.y + o.height / 2 - s.height / 2, d = o[c] / 2 - s[c] / 2;
318
- let h;
317
+ const i = P(e), r = re(e), c = ie(r), l = B(e), a = i === "y", h = o.x + o.width / 2 - s.width / 2, u = o.y + o.height / 2 - s.height / 2, d = o[c] / 2 - s[c] / 2;
318
+ let f;
319
319
  switch (l) {
320
320
  case "top":
321
- h = {
322
- x: f,
321
+ f = {
322
+ x: h,
323
323
  y: o.y - s.height
324
324
  };
325
325
  break;
326
326
  case "bottom":
327
- h = {
328
- x: f,
327
+ f = {
328
+ x: h,
329
329
  y: o.y + o.height
330
330
  };
331
331
  break;
332
332
  case "right":
333
- h = {
333
+ f = {
334
334
  x: o.x + o.width,
335
335
  y: u
336
336
  };
337
337
  break;
338
338
  case "left":
339
- h = {
339
+ f = {
340
340
  x: o.x - s.width,
341
341
  y: u
342
342
  };
343
343
  break;
344
344
  default:
345
- h = {
345
+ f = {
346
346
  x: o.x,
347
347
  y: o.y
348
348
  };
349
349
  }
350
- switch (at(e)) {
350
+ switch (ut(e)) {
351
351
  case "start":
352
- h[r] -= d * (n && a ? -1 : 1);
352
+ f[r] -= d * (n && a ? -1 : 1);
353
353
  break;
354
354
  case "end":
355
- h[r] += d * (n && a ? -1 : 1);
355
+ f[r] += d * (n && a ? -1 : 1);
356
356
  break;
357
357
  }
358
- return h;
358
+ return f;
359
359
  }
360
- const Ye = async (t, e, n) => {
360
+ const qe = async (t, e, n) => {
361
361
  const {
362
362
  placement: o = "bottom",
363
363
  strategy: s = "absolute",
@@ -369,25 +369,25 @@ const Ye = async (t, e, n) => {
369
369
  floating: e,
370
370
  strategy: s
371
371
  }), {
372
- x: f,
372
+ x: h,
373
373
  y: u
374
- } = Ft(a, o, l), d = o, h = {}, m = 0;
375
- for (let p = 0; p < c.length; p++) {
374
+ } = Mt(a, o, l), d = o, f = {}, m = 0;
375
+ for (let g = 0; g < c.length; g++) {
376
376
  const {
377
377
  name: y,
378
- fn: g
379
- } = c[p], {
378
+ fn: p
379
+ } = c[g], {
380
380
  x: w,
381
381
  y: x,
382
382
  data: b,
383
383
  reset: v
384
- } = await g({
385
- x: f,
384
+ } = await p({
385
+ x: h,
386
386
  y: u,
387
387
  initialPlacement: o,
388
388
  placement: d,
389
389
  strategy: s,
390
- middlewareData: h,
390
+ middlewareData: f,
391
391
  rects: a,
392
392
  platform: r,
393
393
  elements: {
@@ -395,10 +395,10 @@ const Ye = async (t, e, n) => {
395
395
  floating: e
396
396
  }
397
397
  });
398
- f = w ?? f, u = x ?? u, h = {
399
- ...h,
398
+ h = w ?? h, u = x ?? u, f = {
399
+ ...f,
400
400
  [y]: {
401
- ...h[y],
401
+ ...f[y],
402
402
  ...b
403
403
  }
404
404
  }, v && m <= 50 && (m++, typeof v == "object" && (v.placement && (d = v.placement), v.rects && (a = v.rects === !0 ? await r.getElementRects({
@@ -406,19 +406,19 @@ const Ye = async (t, e, n) => {
406
406
  floating: e,
407
407
  strategy: s
408
408
  }) : v.rects), {
409
- x: f,
409
+ x: h,
410
410
  y: u
411
- } = Ft(a, d, l)), p = -1);
411
+ } = Mt(a, d, l)), g = -1);
412
412
  }
413
413
  return {
414
- x: f,
414
+ x: h,
415
415
  y: u,
416
416
  placement: d,
417
417
  strategy: s,
418
- middlewareData: h
418
+ middlewareData: f
419
419
  };
420
420
  };
421
- async function re(t, e) {
421
+ async function ce(t, e) {
422
422
  var n;
423
423
  e === void 0 && (e = {});
424
424
  const {
@@ -430,14 +430,14 @@ async function re(t, e) {
430
430
  strategy: l
431
431
  } = t, {
432
432
  boundary: a = "clippingAncestors",
433
- rootBoundary: f = "viewport",
433
+ rootBoundary: h = "viewport",
434
434
  elementContext: u = "floating",
435
435
  altBoundary: d = !1,
436
- padding: h = 0
437
- } = lt(e, t), m = je(h), y = c[d ? u === "floating" ? "reference" : "floating" : u], g = rt(await i.getClippingRect({
436
+ padding: f = 0
437
+ } = at(e, t), m = Ye(f), y = c[d ? u === "floating" ? "reference" : "floating" : u], p = ct(await i.getClippingRect({
438
438
  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)),
439
439
  boundary: a,
440
- rootBoundary: f,
440
+ rootBoundary: h,
441
441
  strategy: l
442
442
  })), w = u === "floating" ? {
443
443
  x: o,
@@ -450,20 +450,20 @@ async function re(t, e) {
450
450
  } : {
451
451
  x: 1,
452
452
  y: 1
453
- }, v = rt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
453
+ }, v = ct(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
454
454
  elements: c,
455
455
  rect: w,
456
456
  offsetParent: x,
457
457
  strategy: l
458
458
  }) : w);
459
459
  return {
460
- top: (g.top - v.top + m.top) / b.y,
461
- bottom: (v.bottom - g.bottom + m.bottom) / b.y,
462
- left: (g.left - v.left + m.left) / b.x,
463
- right: (v.right - g.right + m.right) / b.x
460
+ top: (p.top - v.top + m.top) / b.y,
461
+ bottom: (v.bottom - p.bottom + m.bottom) / b.y,
462
+ left: (p.left - v.left + m.left) / b.x,
463
+ right: (v.right - p.right + m.right) / b.x
464
464
  };
465
465
  }
466
- const qe = function(t) {
466
+ const Ke = function(t) {
467
467
  return t === void 0 && (t = {}), {
468
468
  name: "flip",
469
469
  options: t,
@@ -477,65 +477,67 @@ const qe = function(t) {
477
477
  platform: l,
478
478
  elements: a
479
479
  } = e, {
480
- mainAxis: f = !0,
480
+ mainAxis: h = !0,
481
481
  crossAxis: u = !0,
482
482
  fallbackPlacements: d,
483
- fallbackStrategy: h = "bestFit",
483
+ fallbackStrategy: f = "bestFit",
484
484
  fallbackAxisSideDirection: m = "none",
485
- flipAlignment: p = !0,
485
+ flipAlignment: g = !0,
486
486
  ...y
487
- } = lt(t, e);
487
+ } = at(t, e);
488
488
  if ((n = i.arrow) != null && n.alignmentOffset)
489
489
  return {};
490
- const g = N(s), w = z(c), x = N(c) === c, b = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), v = d || (x || !p ? [it(c)] : He(c)), B = m !== "none";
491
- !d && B && v.push(..._e(c, p, m, b));
492
- const me = [c, ...v], mt = await re(e, y), Z = [];
493
- let j = ((o = i.flip) == null ? void 0 : o.overflows) || [];
494
- if (f && Z.push(mt[g]), u) {
495
- const M = Ue(s, r, b);
496
- Z.push(mt[M[0]], mt[M[1]]);
490
+ const p = B(s), w = P(c), x = B(c) === c, b = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), v = d || (x || !g ? [rt(c)] : ze(c)), Y = m !== "none";
491
+ !d && Y && v.push(...Ie(c, g, m, b));
492
+ const H = [c, ...v], pt = await ce(e, y), tt = [];
493
+ let z = ((o = i.flip) == null ? void 0 : o.overflows) || [];
494
+ if (h && tt.push(pt[p]), u) {
495
+ const V = He(s, r, b);
496
+ tt.push(pt[V[0]], pt[V[1]]);
497
497
  }
498
- if (j = [...j, {
498
+ if (z = [...z, {
499
499
  placement: s,
500
- overflows: Z
501
- }], !Z.every((M) => M <= 0)) {
502
- var Tt, kt;
503
- const M = (((Tt = i.flip) == null ? void 0 : Tt.index) || 0) + 1, Dt = me[M];
504
- if (Dt)
500
+ overflows: tt
501
+ }], !tt.every((V) => V <= 0)) {
502
+ var Ct, Dt;
503
+ const V = (((Ct = i.flip) == null ? void 0 : Ct.index) || 0) + 1, gt = H[V];
504
+ if (gt && (!(u === "alignment" ? w !== P(gt) : !1) || // We leave the current main axis only if every placement on that axis
505
+ // overflows the main axis.
506
+ z.every((R) => R.overflows[0] > 0 && P(R.placement) === w)))
505
507
  return {
506
508
  data: {
507
- index: M,
508
- overflows: j
509
+ index: V,
510
+ overflows: z
509
511
  },
510
512
  reset: {
511
- placement: Dt
513
+ placement: gt
512
514
  }
513
515
  };
514
- let Y = (kt = j.filter((U) => U.overflows[0] <= 0).sort((U, k) => U.overflows[1] - k.overflows[1])[0]) == null ? void 0 : kt.placement;
515
- if (!Y)
516
- switch (h) {
516
+ let q = (Dt = z.filter((N) => N.overflows[0] <= 0).sort((N, R) => N.overflows[1] - R.overflows[1])[0]) == null ? void 0 : Dt.placement;
517
+ if (!q)
518
+ switch (f) {
517
519
  case "bestFit": {
518
- var Ct;
519
- const U = (Ct = j.filter((k) => {
520
- if (B) {
521
- const C = z(k.placement);
520
+ var Pt;
521
+ const N = (Pt = z.filter((R) => {
522
+ if (Y) {
523
+ const C = P(R.placement);
522
524
  return C === w || // Create a bias to the `y` side axis due to horizontal
523
525
  // reading directions favoring greater width.
524
526
  C === "y";
525
527
  }
526
528
  return !0;
527
- }).map((k) => [k.placement, k.overflows.filter((C) => C > 0).reduce((C, pe) => C + pe, 0)]).sort((k, C) => k[1] - C[1])[0]) == null ? void 0 : Ct[0];
528
- U && (Y = U);
529
+ }).map((R) => [R.placement, R.overflows.filter((C) => C > 0).reduce((C, ge) => C + ge, 0)]).sort((R, C) => R[1] - C[1])[0]) == null ? void 0 : Pt[0];
530
+ N && (q = N);
529
531
  break;
530
532
  }
531
533
  case "initialPlacement":
532
- Y = c;
534
+ q = c;
533
535
  break;
534
536
  }
535
- if (s !== Y)
537
+ if (s !== q)
536
538
  return {
537
539
  reset: {
538
- placement: Y
540
+ placement: q
539
541
  }
540
542
  };
541
543
  }
@@ -543,15 +545,15 @@ const qe = function(t) {
543
545
  }
544
546
  };
545
547
  };
546
- async function Ke(t, e) {
548
+ async function Xe(t, e) {
547
549
  const {
548
550
  placement: n,
549
551
  platform: o,
550
552
  elements: s
551
- } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), r = N(n), c = at(n), l = z(n) === "y", a = ["left", "top"].includes(r) ? -1 : 1, f = i && l ? -1 : 1, u = lt(e, t);
553
+ } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), r = B(n), c = ut(n), l = P(n) === "y", a = ["left", "top"].includes(r) ? -1 : 1, h = i && l ? -1 : 1, u = at(e, t);
552
554
  let {
553
555
  mainAxis: d,
554
- crossAxis: h,
556
+ crossAxis: f,
555
557
  alignmentAxis: m
556
558
  } = typeof u == "number" ? {
557
559
  mainAxis: u,
@@ -562,15 +564,15 @@ async function Ke(t, e) {
562
564
  crossAxis: u.crossAxis || 0,
563
565
  alignmentAxis: u.alignmentAxis
564
566
  };
565
- return c && typeof m == "number" && (h = c === "end" ? m * -1 : m), l ? {
566
- x: h * f,
567
+ return c && typeof m == "number" && (f = c === "end" ? m * -1 : m), l ? {
568
+ x: f * h,
567
569
  y: d * a
568
570
  } : {
569
571
  x: d * a,
570
- y: h * f
572
+ y: f * h
571
573
  };
572
574
  }
573
- const Xe = function(t) {
575
+ const Je = function(t) {
574
576
  return t === void 0 && (t = 0), {
575
577
  name: "offset",
576
578
  options: t,
@@ -581,7 +583,7 @@ const Xe = function(t) {
581
583
  y: i,
582
584
  placement: r,
583
585
  middlewareData: c
584
- } = e, l = await Ke(e, t);
586
+ } = e, l = await Xe(e, t);
585
587
  return r === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
586
588
  x: s + l.x,
587
589
  y: i + l.y,
@@ -592,7 +594,7 @@ const Xe = function(t) {
592
594
  };
593
595
  }
594
596
  };
595
- }, Je = function(t) {
597
+ }, Ge = function(t) {
596
598
  return t === void 0 && (t = {}), {
597
599
  name: "shift",
598
600
  options: t,
@@ -607,39 +609,39 @@ const Xe = function(t) {
607
609
  limiter: c = {
608
610
  fn: (y) => {
609
611
  let {
610
- x: g,
612
+ x: p,
611
613
  y: w
612
614
  } = y;
613
615
  return {
614
- x: g,
616
+ x: p,
615
617
  y: w
616
618
  };
617
619
  }
618
620
  },
619
621
  ...l
620
- } = lt(t, e), a = {
622
+ } = at(t, e), a = {
621
623
  x: n,
622
624
  y: o
623
- }, f = await re(e, l), u = z(N(s)), d = oe(u);
624
- let h = a[d], m = a[u];
625
+ }, h = await ce(e, l), u = P(B(s)), d = se(u);
626
+ let f = a[d], m = a[u];
625
627
  if (i) {
626
- const y = d === "y" ? "top" : "left", g = d === "y" ? "bottom" : "right", w = h + f[y], x = h - f[g];
627
- h = Wt(w, h, x);
628
+ const y = d === "y" ? "top" : "left", p = d === "y" ? "bottom" : "right", w = f + h[y], x = f - h[p];
629
+ f = Ft(w, f, x);
628
630
  }
629
631
  if (r) {
630
- const y = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", w = m + f[y], x = m - f[g];
631
- m = Wt(w, m, x);
632
+ const y = u === "y" ? "top" : "left", p = u === "y" ? "bottom" : "right", w = m + h[y], x = m - h[p];
633
+ m = Ft(w, m, x);
632
634
  }
633
- const p = c.fn({
635
+ const g = c.fn({
634
636
  ...e,
635
- [d]: h,
637
+ [d]: f,
636
638
  [u]: m
637
639
  });
638
640
  return {
639
- ...p,
641
+ ...g,
640
642
  data: {
641
- x: p.x - n,
642
- y: p.y - o,
643
+ x: g.x - n,
644
+ y: g.y - o,
643
645
  enabled: {
644
646
  [d]: i,
645
647
  [u]: r
@@ -649,45 +651,45 @@ const Xe = function(t) {
649
651
  }
650
652
  };
651
653
  };
652
- function ut() {
654
+ function ft() {
653
655
  return typeof window < "u";
654
656
  }
655
- function I(t) {
656
- return ce(t) ? (t.nodeName || "").toLowerCase() : "#document";
657
+ function j(t) {
658
+ return le(t) ? (t.nodeName || "").toLowerCase() : "#document";
657
659
  }
658
660
  function A(t) {
659
661
  var e;
660
662
  return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
661
663
  }
662
- function T(t) {
664
+ function k(t) {
663
665
  var e;
664
- return (e = (ce(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
666
+ return (e = (le(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
665
667
  }
666
- function ce(t) {
667
- return ut() ? t instanceof Node || t instanceof A(t).Node : !1;
668
+ function le(t) {
669
+ return ft() ? t instanceof Node || t instanceof A(t).Node : !1;
668
670
  }
669
- function R(t) {
670
- return ut() ? t instanceof Element || t instanceof A(t).Element : !1;
671
+ function E(t) {
672
+ return ft() ? t instanceof Element || t instanceof A(t).Element : !1;
671
673
  }
672
- function S(t) {
673
- return ut() ? t instanceof HTMLElement || t instanceof A(t).HTMLElement : !1;
674
+ function T(t) {
675
+ return ft() ? t instanceof HTMLElement || t instanceof A(t).HTMLElement : !1;
674
676
  }
675
- function Mt(t) {
676
- return !ut() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
677
+ function Vt(t) {
678
+ return !ft() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
677
679
  }
678
- function Q(t) {
680
+ function Z(t) {
679
681
  const {
680
682
  overflow: e,
681
683
  overflowX: n,
682
684
  overflowY: o,
683
685
  display: s
684
- } = E(t);
686
+ } = L(t);
685
687
  return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(s);
686
688
  }
687
- function Ge(t) {
688
- return ["table", "td", "th"].includes(I(t));
689
+ function Qe(t) {
690
+ return ["table", "td", "th"].includes(j(t));
689
691
  }
690
- function ft(t) {
692
+ function ht(t) {
691
693
  return [":popover-open", ":modal"].some((e) => {
692
694
  try {
693
695
  return t.matches(e);
@@ -696,32 +698,32 @@ function ft(t) {
696
698
  }
697
699
  });
698
700
  }
699
- function Et(t) {
700
- const e = Lt(), n = R(t) ? E(t) : t;
701
- 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));
701
+ function Ot(t) {
702
+ const e = St(), n = E(t) ? L(t) : t;
703
+ return ["transform", "translate", "scale", "rotate", "perspective"].some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
702
704
  }
703
- function Qe(t) {
704
- let e = P(t);
705
- for (; S(e) && !_(e); ) {
706
- if (Et(e))
705
+ function Ze(t) {
706
+ let e = W(t);
707
+ for (; T(e) && !I(e); ) {
708
+ if (Ot(e))
707
709
  return e;
708
- if (ft(e))
710
+ if (ht(e))
709
711
  return null;
710
- e = P(e);
712
+ e = W(e);
711
713
  }
712
714
  return null;
713
715
  }
714
- function Lt() {
716
+ function St() {
715
717
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
716
718
  }
717
- function _(t) {
718
- return ["html", "body", "#document"].includes(I(t));
719
+ function I(t) {
720
+ return ["html", "body", "#document"].includes(j(t));
719
721
  }
720
- function E(t) {
722
+ function L(t) {
721
723
  return A(t).getComputedStyle(t);
722
724
  }
723
- function ht(t) {
724
- return R(t) ? {
725
+ function dt(t) {
726
+ return E(t) ? {
725
727
  scrollLeft: t.scrollLeft,
726
728
  scrollTop: t.scrollTop
727
729
  } : {
@@ -729,158 +731,158 @@ function ht(t) {
729
731
  scrollTop: t.scrollY
730
732
  };
731
733
  }
732
- function P(t) {
733
- if (I(t) === "html")
734
+ function W(t) {
735
+ if (j(t) === "html")
734
736
  return t;
735
737
  const e = (
736
738
  // Step into the shadow DOM of the parent of a slotted node.
737
739
  t.assignedSlot || // DOM Element detected.
738
740
  t.parentNode || // ShadowRoot detected.
739
- Mt(t) && t.host || // Fallback.
740
- T(t)
741
+ Vt(t) && t.host || // Fallback.
742
+ k(t)
741
743
  );
742
- return Mt(e) ? e.host : e;
744
+ return Vt(e) ? e.host : e;
743
745
  }
744
- function le(t) {
745
- const e = P(t);
746
- return _(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : S(e) && Q(e) ? e : le(e);
746
+ function ae(t) {
747
+ const e = W(t);
748
+ return I(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : T(e) && Z(e) ? e : ae(e);
747
749
  }
748
- function K(t, e, n) {
750
+ function X(t, e, n) {
749
751
  var o;
750
752
  e === void 0 && (e = []), n === void 0 && (n = !0);
751
- const s = le(t), i = s === ((o = t.ownerDocument) == null ? void 0 : o.body), r = A(s);
753
+ const s = ae(t), i = s === ((o = t.ownerDocument) == null ? void 0 : o.body), r = A(s);
752
754
  if (i) {
753
- const c = vt(r);
754
- return e.concat(r, r.visualViewport || [], Q(s) ? s : [], c && n ? K(c) : []);
755
+ const c = At(r);
756
+ return e.concat(r, r.visualViewport || [], Z(s) ? s : [], c && n ? X(c) : []);
755
757
  }
756
- return e.concat(s, K(s, [], n));
758
+ return e.concat(s, X(s, [], n));
757
759
  }
758
- function vt(t) {
760
+ function At(t) {
759
761
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
760
762
  }
761
- function ae(t) {
762
- const e = E(t);
763
+ function ue(t) {
764
+ const e = L(t);
763
765
  let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
764
- const s = S(t), i = s ? t.offsetWidth : n, r = s ? t.offsetHeight : o, c = st(n) !== i || st(o) !== r;
766
+ const s = T(t), i = s ? t.offsetWidth : n, r = s ? t.offsetHeight : o, c = it(n) !== i || it(o) !== r;
765
767
  return c && (n = i, o = r), {
766
768
  width: n,
767
769
  height: o,
768
770
  $: c
769
771
  };
770
772
  }
771
- function Ot(t) {
772
- return R(t) ? t : t.contextElement;
773
+ function Tt(t) {
774
+ return E(t) ? t : t.contextElement;
773
775
  }
774
- function H(t) {
775
- const e = Ot(t);
776
- if (!S(e))
777
- return O(1);
776
+ function _(t) {
777
+ const e = Tt(t);
778
+ if (!T(e))
779
+ return S(1);
778
780
  const n = e.getBoundingClientRect(), {
779
781
  width: o,
780
782
  height: s,
781
783
  $: i
782
- } = ae(e);
783
- let r = (i ? st(n.width) : n.width) / o, c = (i ? st(n.height) : n.height) / s;
784
+ } = ue(e);
785
+ let r = (i ? it(n.width) : n.width) / o, c = (i ? it(n.height) : n.height) / s;
784
786
  return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
785
787
  x: r,
786
788
  y: c
787
789
  };
788
790
  }
789
- const Ze = /* @__PURE__ */ O(0);
790
- function ue(t) {
791
+ const tn = /* @__PURE__ */ S(0);
792
+ function fe(t) {
791
793
  const e = A(t);
792
- return !Lt() || !e.visualViewport ? Ze : {
794
+ return !St() || !e.visualViewport ? tn : {
793
795
  x: e.visualViewport.offsetLeft,
794
796
  y: e.visualViewport.offsetTop
795
797
  };
796
798
  }
797
- function tn(t, e, n) {
799
+ function en(t, e, n) {
798
800
  return e === void 0 && (e = !1), !n || e && n !== A(t) ? !1 : e;
799
801
  }
800
- function $(t, e, n, o) {
802
+ function U(t, e, n, o) {
801
803
  e === void 0 && (e = !1), n === void 0 && (n = !1);
802
- const s = t.getBoundingClientRect(), i = Ot(t);
803
- let r = O(1);
804
- e && (o ? R(o) && (r = H(o)) : r = H(t));
805
- const c = tn(i, n, o) ? ue(i) : O(0);
806
- let l = (s.left + c.x) / r.x, a = (s.top + c.y) / r.y, f = s.width / r.x, u = s.height / r.y;
804
+ const s = t.getBoundingClientRect(), i = Tt(t);
805
+ let r = S(1);
806
+ e && (o ? E(o) && (r = _(o)) : r = _(t));
807
+ const c = en(i, n, o) ? fe(i) : S(0);
808
+ let l = (s.left + c.x) / r.x, a = (s.top + c.y) / r.y, h = s.width / r.x, u = s.height / r.y;
807
809
  if (i) {
808
- const d = A(i), h = o && R(o) ? A(o) : o;
809
- let m = d, p = vt(m);
810
- for (; p && o && h !== m; ) {
811
- const y = H(p), g = p.getBoundingClientRect(), w = E(p), x = g.left + (p.clientLeft + parseFloat(w.paddingLeft)) * y.x, b = g.top + (p.clientTop + parseFloat(w.paddingTop)) * y.y;
812
- l *= y.x, a *= y.y, f *= y.x, u *= y.y, l += x, a += b, m = A(p), p = vt(m);
810
+ const d = A(i), f = o && E(o) ? A(o) : o;
811
+ let m = d, g = At(m);
812
+ for (; g && o && f !== m; ) {
813
+ const y = _(g), p = g.getBoundingClientRect(), w = L(g), x = p.left + (g.clientLeft + parseFloat(w.paddingLeft)) * y.x, b = p.top + (g.clientTop + parseFloat(w.paddingTop)) * y.y;
814
+ l *= y.x, a *= y.y, h *= y.x, u *= y.y, l += x, a += b, m = A(g), g = At(m);
813
815
  }
814
816
  }
815
- return rt({
816
- width: f,
817
+ return ct({
818
+ width: h,
817
819
  height: u,
818
820
  x: l,
819
821
  y: a
820
822
  });
821
823
  }
822
- function St(t, e) {
823
- const n = ht(t).scrollLeft;
824
- return e ? e.left + n : $(T(t)).left + n;
824
+ function kt(t, e) {
825
+ const n = dt(t).scrollLeft;
826
+ return e ? e.left + n : U(k(t)).left + n;
825
827
  }
826
- function fe(t, e, n) {
828
+ function he(t, e, n) {
827
829
  n === void 0 && (n = !1);
828
830
  const o = t.getBoundingClientRect(), s = o.left + e.scrollLeft - (n ? 0 : (
829
831
  // RTL <body> scrollbar.
830
- St(t, o)
832
+ kt(t, o)
831
833
  )), i = o.top + e.scrollTop;
832
834
  return {
833
835
  x: s,
834
836
  y: i
835
837
  };
836
838
  }
837
- function en(t) {
839
+ function nn(t) {
838
840
  let {
839
841
  elements: e,
840
842
  rect: n,
841
843
  offsetParent: o,
842
844
  strategy: s
843
845
  } = t;
844
- const i = s === "fixed", r = T(o), c = e ? ft(e.floating) : !1;
846
+ const i = s === "fixed", r = k(o), c = e ? ht(e.floating) : !1;
845
847
  if (o === r || c && i)
846
848
  return n;
847
849
  let l = {
848
850
  scrollLeft: 0,
849
851
  scrollTop: 0
850
- }, a = O(1);
851
- const f = O(0), u = S(o);
852
- if ((u || !u && !i) && ((I(o) !== "body" || Q(r)) && (l = ht(o)), S(o))) {
853
- const h = $(o);
854
- a = H(o), f.x = h.x + o.clientLeft, f.y = h.y + o.clientTop;
852
+ }, a = S(1);
853
+ const h = S(0), u = T(o);
854
+ if ((u || !u && !i) && ((j(o) !== "body" || Z(r)) && (l = dt(o)), T(o))) {
855
+ const f = U(o);
856
+ a = _(o), h.x = f.x + o.clientLeft, h.y = f.y + o.clientTop;
855
857
  }
856
- const d = r && !u && !i ? fe(r, l, !0) : O(0);
858
+ const d = r && !u && !i ? he(r, l, !0) : S(0);
857
859
  return {
858
860
  width: n.width * a.x,
859
861
  height: n.height * a.y,
860
- x: n.x * a.x - l.scrollLeft * a.x + f.x + d.x,
861
- y: n.y * a.y - l.scrollTop * a.y + f.y + d.y
862
+ x: n.x * a.x - l.scrollLeft * a.x + h.x + d.x,
863
+ y: n.y * a.y - l.scrollTop * a.y + h.y + d.y
862
864
  };
863
865
  }
864
- function nn(t) {
866
+ function on(t) {
865
867
  return Array.from(t.getClientRects());
866
868
  }
867
- function on(t) {
868
- const e = T(t), n = ht(t), o = t.ownerDocument.body, s = V(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = V(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
869
- let r = -n.scrollLeft + St(t);
869
+ function sn(t) {
870
+ const e = k(t), n = dt(t), o = t.ownerDocument.body, s = $(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = $(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
871
+ let r = -n.scrollLeft + kt(t);
870
872
  const c = -n.scrollTop;
871
- return E(o).direction === "rtl" && (r += V(e.clientWidth, o.clientWidth) - s), {
873
+ return L(o).direction === "rtl" && (r += $(e.clientWidth, o.clientWidth) - s), {
872
874
  width: s,
873
875
  height: i,
874
876
  x: r,
875
877
  y: c
876
878
  };
877
879
  }
878
- function sn(t, e) {
879
- const n = A(t), o = T(t), s = n.visualViewport;
880
+ function rn(t, e) {
881
+ const n = A(t), o = k(t), s = n.visualViewport;
880
882
  let i = o.clientWidth, r = o.clientHeight, c = 0, l = 0;
881
883
  if (s) {
882
884
  i = s.width, r = s.height;
883
- const a = Lt();
885
+ const a = St();
884
886
  (!a || a && e === "fixed") && (c = s.offsetLeft, l = s.offsetTop);
885
887
  }
886
888
  return {
@@ -890,8 +892,8 @@ function sn(t, e) {
890
892
  y: l
891
893
  };
892
894
  }
893
- function rn(t, e) {
894
- const n = $(t, !0, e === "fixed"), o = n.top + t.clientTop, s = n.left + t.clientLeft, i = S(t) ? H(t) : O(1), r = t.clientWidth * i.x, c = t.clientHeight * i.y, l = s * i.x, a = o * i.y;
895
+ function cn(t, e) {
896
+ const n = U(t, !0, e === "fixed"), o = n.top + t.clientTop, s = n.left + t.clientLeft, i = T(t) ? _(t) : S(1), r = t.clientWidth * i.x, c = t.clientHeight * i.y, l = s * i.x, a = o * i.y;
895
897
  return {
896
898
  width: r,
897
899
  height: c,
@@ -899,16 +901,16 @@ function rn(t, e) {
899
901
  y: a
900
902
  };
901
903
  }
902
- function Vt(t, e, n) {
904
+ function Nt(t, e, n) {
903
905
  let o;
904
906
  if (e === "viewport")
905
- o = sn(t, n);
907
+ o = rn(t, n);
906
908
  else if (e === "document")
907
- o = on(T(t));
908
- else if (R(e))
909
- o = rn(e, n);
909
+ o = sn(k(t));
910
+ else if (E(e))
911
+ o = cn(e, n);
910
912
  else {
911
- const s = ue(t);
913
+ const s = fe(t);
912
914
  o = {
913
915
  x: e.x - s.x,
914
916
  y: e.y - s.y,
@@ -916,36 +918,36 @@ function Vt(t, e, n) {
916
918
  height: e.height
917
919
  };
918
920
  }
919
- return rt(o);
921
+ return ct(o);
920
922
  }
921
- function he(t, e) {
922
- const n = P(t);
923
- return n === e || !R(n) || _(n) ? !1 : E(n).position === "fixed" || he(n, e);
923
+ function de(t, e) {
924
+ const n = W(t);
925
+ return n === e || !E(n) || I(n) ? !1 : L(n).position === "fixed" || de(n, e);
924
926
  }
925
- function cn(t, e) {
927
+ function ln(t, e) {
926
928
  const n = e.get(t);
927
929
  if (n)
928
930
  return n;
929
- let o = K(t, [], !1).filter((c) => R(c) && I(c) !== "body"), s = null;
930
- const i = E(t).position === "fixed";
931
- let r = i ? P(t) : t;
932
- for (; R(r) && !_(r); ) {
933
- const c = E(r), l = Et(r);
934
- !l && c.position === "fixed" && (s = null), (i ? !l && !s : !l && c.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || Q(r) && !l && he(t, r)) ? o = o.filter((f) => f !== r) : s = c, r = P(r);
931
+ let o = X(t, [], !1).filter((c) => E(c) && j(c) !== "body"), s = null;
932
+ const i = L(t).position === "fixed";
933
+ let r = i ? W(t) : t;
934
+ for (; E(r) && !I(r); ) {
935
+ const c = L(r), l = Ot(r);
936
+ !l && c.position === "fixed" && (s = null), (i ? !l && !s : !l && c.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || Z(r) && !l && de(t, r)) ? o = o.filter((h) => h !== r) : s = c, r = W(r);
935
937
  }
936
938
  return e.set(t, o), o;
937
939
  }
938
- function ln(t) {
940
+ function an(t) {
939
941
  let {
940
942
  element: e,
941
943
  boundary: n,
942
944
  rootBoundary: o,
943
945
  strategy: s
944
946
  } = t;
945
- const r = [...n === "clippingAncestors" ? ft(e) ? [] : cn(e, this._c) : [].concat(n), o], c = r[0], l = r.reduce((a, f) => {
946
- const u = Vt(e, f, s);
947
- return a.top = V(u.top, a.top), a.right = ot(u.right, a.right), a.bottom = ot(u.bottom, a.bottom), a.left = V(u.left, a.left), a;
948
- }, Vt(e, c, s));
947
+ const r = [...n === "clippingAncestors" ? ht(e) ? [] : ln(e, this._c) : [].concat(n), o], c = r[0], l = r.reduce((a, h) => {
948
+ const u = Nt(e, h, s);
949
+ return a.top = $(u.top, a.top), a.right = st(u.right, a.right), a.bottom = st(u.bottom, a.bottom), a.left = $(u.left, a.left), a;
950
+ }, Nt(e, c, s));
949
951
  return {
950
952
  width: l.right - l.left,
951
953
  height: l.bottom - l.top,
@@ -953,69 +955,73 @@ function ln(t) {
953
955
  y: l.top
954
956
  };
955
957
  }
956
- function an(t) {
958
+ function un(t) {
957
959
  const {
958
960
  width: e,
959
961
  height: n
960
- } = ae(t);
962
+ } = ue(t);
961
963
  return {
962
964
  width: e,
963
965
  height: n
964
966
  };
965
967
  }
966
- function un(t, e, n) {
967
- const o = S(e), s = T(e), i = n === "fixed", r = $(t, !0, i, e);
968
+ function fn(t, e, n) {
969
+ const o = T(e), s = k(e), i = n === "fixed", r = U(t, !0, i, e);
968
970
  let c = {
969
971
  scrollLeft: 0,
970
972
  scrollTop: 0
971
973
  };
972
- const l = O(0);
974
+ const l = S(0);
975
+ function a() {
976
+ l.x = kt(s);
977
+ }
973
978
  if (o || !o && !i)
974
- if ((I(e) !== "body" || Q(s)) && (c = ht(e)), o) {
975
- const d = $(e, !0, i, e);
976
- l.x = d.x + e.clientLeft, l.y = d.y + e.clientTop;
977
- } else s && (l.x = St(s));
978
- const a = s && !o && !i ? fe(s, c) : O(0), f = r.left + c.scrollLeft - l.x - a.x, u = r.top + c.scrollTop - l.y - a.y;
979
+ if ((j(e) !== "body" || Z(s)) && (c = dt(e)), o) {
980
+ const f = U(e, !0, i, e);
981
+ l.x = f.x + e.clientLeft, l.y = f.y + e.clientTop;
982
+ } else s && a();
983
+ i && !o && s && a();
984
+ const h = s && !o && !i ? he(s, c) : S(0), u = r.left + c.scrollLeft - l.x - h.x, d = r.top + c.scrollTop - l.y - h.y;
979
985
  return {
980
- x: f,
981
- y: u,
986
+ x: u,
987
+ y: d,
982
988
  width: r.width,
983
989
  height: r.height
984
990
  };
985
991
  }
986
- function gt(t) {
987
- return E(t).position === "static";
992
+ function wt(t) {
993
+ return L(t).position === "static";
988
994
  }
989
- function Nt(t, e) {
990
- if (!S(t) || E(t).position === "fixed")
995
+ function $t(t, e) {
996
+ if (!T(t) || L(t).position === "fixed")
991
997
  return null;
992
998
  if (e)
993
999
  return e(t);
994
1000
  let n = t.offsetParent;
995
- return T(t) === n && (n = n.ownerDocument.body), n;
1001
+ return k(t) === n && (n = n.ownerDocument.body), n;
996
1002
  }
997
- function de(t, e) {
1003
+ function me(t, e) {
998
1004
  const n = A(t);
999
- if (ft(t))
1005
+ if (ht(t))
1000
1006
  return n;
1001
- if (!S(t)) {
1002
- let s = P(t);
1003
- for (; s && !_(s); ) {
1004
- if (R(s) && !gt(s))
1007
+ if (!T(t)) {
1008
+ let s = W(t);
1009
+ for (; s && !I(s); ) {
1010
+ if (E(s) && !wt(s))
1005
1011
  return s;
1006
- s = P(s);
1012
+ s = W(s);
1007
1013
  }
1008
1014
  return n;
1009
1015
  }
1010
- let o = Nt(t, e);
1011
- for (; o && Ge(o) && gt(o); )
1012
- o = Nt(o, e);
1013
- return o && _(o) && gt(o) && !Et(o) ? n : o || Qe(t) || n;
1016
+ let o = $t(t, e);
1017
+ for (; o && Qe(o) && wt(o); )
1018
+ o = $t(o, e);
1019
+ return o && I(o) && wt(o) && !Ot(o) ? n : o || Ze(t) || n;
1014
1020
  }
1015
- const fn = async function(t) {
1016
- const e = this.getOffsetParent || de, n = this.getDimensions, o = await n(t.floating);
1021
+ const hn = async function(t) {
1022
+ const e = this.getOffsetParent || me, n = this.getDimensions, o = await n(t.floating);
1017
1023
  return {
1018
- reference: un(t.reference, await e(t.floating), t.strategy),
1024
+ reference: fn(t.reference, await e(t.floating), t.strategy),
1019
1025
  floating: {
1020
1026
  x: 0,
1021
1027
  y: 0,
@@ -1024,68 +1030,71 @@ const fn = async function(t) {
1024
1030
  }
1025
1031
  };
1026
1032
  };
1027
- function hn(t) {
1028
- return E(t).direction === "rtl";
1029
- }
1030
- const dn = {
1031
- convertOffsetParentRelativeRectToViewportRelativeRect: en,
1032
- getDocumentElement: T,
1033
- getClippingRect: ln,
1034
- getOffsetParent: de,
1035
- getElementRects: fn,
1036
- getClientRects: nn,
1037
- getDimensions: an,
1038
- getScale: H,
1039
- isElement: R,
1040
- isRTL: hn
1033
+ function dn(t) {
1034
+ return L(t).direction === "rtl";
1035
+ }
1036
+ const mn = {
1037
+ convertOffsetParentRelativeRectToViewportRelativeRect: nn,
1038
+ getDocumentElement: k,
1039
+ getClippingRect: an,
1040
+ getOffsetParent: me,
1041
+ getElementRects: hn,
1042
+ getClientRects: on,
1043
+ getDimensions: un,
1044
+ getScale: _,
1045
+ isElement: E,
1046
+ isRTL: dn
1041
1047
  };
1042
- function mn(t, e) {
1048
+ function pe(t, e) {
1049
+ return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1050
+ }
1051
+ function pn(t, e) {
1043
1052
  let n = null, o;
1044
- const s = T(t);
1053
+ const s = k(t);
1045
1054
  function i() {
1046
1055
  var c;
1047
1056
  clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
1048
1057
  }
1049
1058
  function r(c, l) {
1050
1059
  c === void 0 && (c = !1), l === void 0 && (l = 1), i();
1051
- const {
1052
- left: a,
1053
- top: f,
1054
- width: u,
1055
- height: d
1056
- } = t.getBoundingClientRect();
1057
- if (c || e(), !u || !d)
1060
+ const a = t.getBoundingClientRect(), {
1061
+ left: h,
1062
+ top: u,
1063
+ width: d,
1064
+ height: f
1065
+ } = a;
1066
+ if (c || e(), !d || !f)
1058
1067
  return;
1059
- const h = et(f), m = et(s.clientWidth - (a + u)), p = et(s.clientHeight - (f + d)), y = et(a), w = {
1060
- rootMargin: -h + "px " + -m + "px " + -p + "px " + -y + "px",
1061
- threshold: V(0, ot(1, l)) || 1
1068
+ const m = nt(u), g = nt(s.clientWidth - (h + d)), y = nt(s.clientHeight - (u + f)), p = nt(h), x = {
1069
+ rootMargin: -m + "px " + -g + "px " + -y + "px " + -p + "px",
1070
+ threshold: $(0, st(1, l)) || 1
1062
1071
  };
1063
- let x = !0;
1064
- function b(v) {
1065
- const B = v[0].intersectionRatio;
1066
- if (B !== l) {
1067
- if (!x)
1072
+ let b = !0;
1073
+ function v(Y) {
1074
+ const H = Y[0].intersectionRatio;
1075
+ if (H !== l) {
1076
+ if (!b)
1068
1077
  return r();
1069
- B ? r(!1, B) : o = setTimeout(() => {
1078
+ H ? r(!1, H) : o = setTimeout(() => {
1070
1079
  r(!1, 1e-7);
1071
1080
  }, 1e3);
1072
1081
  }
1073
- x = !1;
1082
+ H === 1 && !pe(a, t.getBoundingClientRect()) && r(), b = !1;
1074
1083
  }
1075
1084
  try {
1076
- n = new IntersectionObserver(b, {
1077
- ...w,
1085
+ n = new IntersectionObserver(v, {
1086
+ ...x,
1078
1087
  // Handle <iframe>s
1079
1088
  root: s.ownerDocument
1080
1089
  });
1081
1090
  } catch {
1082
- n = new IntersectionObserver(b, w);
1091
+ n = new IntersectionObserver(v, x);
1083
1092
  }
1084
1093
  n.observe(t);
1085
1094
  }
1086
1095
  return r(!0), i;
1087
1096
  }
1088
- function pn(t, e, n, o) {
1097
+ function gn(t, e, n, o) {
1089
1098
  o === void 0 && (o = {});
1090
1099
  const {
1091
1100
  ancestorScroll: s = !0,
@@ -1093,84 +1102,84 @@ function pn(t, e, n, o) {
1093
1102
  elementResize: r = typeof ResizeObserver == "function",
1094
1103
  layoutShift: c = typeof IntersectionObserver == "function",
1095
1104
  animationFrame: l = !1
1096
- } = o, a = Ot(t), f = s || i ? [...a ? K(a) : [], ...K(e)] : [];
1097
- f.forEach((g) => {
1098
- s && g.addEventListener("scroll", n, {
1105
+ } = o, a = Tt(t), h = s || i ? [...a ? X(a) : [], ...X(e)] : [];
1106
+ h.forEach((p) => {
1107
+ s && p.addEventListener("scroll", n, {
1099
1108
  passive: !0
1100
- }), i && g.addEventListener("resize", n);
1109
+ }), i && p.addEventListener("resize", n);
1101
1110
  });
1102
- const u = a && c ? mn(a, n) : null;
1103
- let d = -1, h = null;
1104
- r && (h = new ResizeObserver((g) => {
1105
- let [w] = g;
1106
- w && w.target === a && h && (h.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
1111
+ const u = a && c ? pn(a, n) : null;
1112
+ let d = -1, f = null;
1113
+ r && (f = new ResizeObserver((p) => {
1114
+ let [w] = p;
1115
+ w && w.target === a && f && (f.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
1107
1116
  var x;
1108
- (x = h) == null || x.observe(e);
1117
+ (x = f) == null || x.observe(e);
1109
1118
  })), n();
1110
- }), a && !l && h.observe(a), h.observe(e));
1111
- let m, p = l ? $(t) : null;
1119
+ }), a && !l && f.observe(a), f.observe(e));
1120
+ let m, g = l ? U(t) : null;
1112
1121
  l && y();
1113
1122
  function y() {
1114
- const g = $(t);
1115
- p && (g.x !== p.x || g.y !== p.y || g.width !== p.width || g.height !== p.height) && n(), p = g, m = requestAnimationFrame(y);
1123
+ const p = U(t);
1124
+ g && !pe(g, p) && n(), g = p, m = requestAnimationFrame(y);
1116
1125
  }
1117
1126
  return n(), () => {
1118
- var g;
1119
- f.forEach((w) => {
1127
+ var p;
1128
+ h.forEach((w) => {
1120
1129
  s && w.removeEventListener("scroll", n), i && w.removeEventListener("resize", n);
1121
- }), u == null || u(), (g = h) == null || g.disconnect(), h = null, l && cancelAnimationFrame(m);
1130
+ }), u == null || u(), (p = f) == null || p.disconnect(), f = null, l && cancelAnimationFrame(m);
1122
1131
  };
1123
1132
  }
1124
- const gn = Xe, yn = Je, $t = qe, wn = (t, e, n) => {
1133
+ const yn = Je, wn = Ge, Bt = Ke, xn = (t, e, n) => {
1125
1134
  const o = /* @__PURE__ */ new Map(), s = {
1126
- platform: dn,
1135
+ platform: mn,
1127
1136
  ...n
1128
1137
  }, i = {
1129
1138
  ...s.platform,
1130
1139
  _c: o
1131
1140
  };
1132
- return Ye(t, e, {
1141
+ return qe(t, e, {
1133
1142
  ...s,
1134
1143
  platform: i
1135
1144
  });
1136
- }, zn = ({
1145
+ }, _n = ({
1137
1146
  content: t,
1138
1147
  open: e,
1139
1148
  placement: n,
1140
1149
  offset: o = { mainAxis: 0, crossAxis: 0 }
1141
- }) => Qt((s) => {
1142
- const i = L.toSignal(e), r = s.element, c = L.toSignal(o), l = c.$.mainAxis.map((u) => u ?? 0), a = c.$.crossAxis.map((u) => u ?? 0), f = L.toSignal(n ?? "top");
1143
- return Gt(
1150
+ }) => Zt((s) => {
1151
+ const i = O.toSignal(e), r = s.element, c = O.toSignal(o), l = c.$.mainAxis.map((u) => u ?? 0), a = c.$.crossAxis.map((u) => u ?? 0), h = O.toSignal(n ?? "top");
1152
+ return Qt(
1144
1153
  i,
1145
- () => Jt(
1154
+ () => Gt(
1146
1155
  "body",
1147
- Yt.div(
1148
- G((u) => {
1156
+ qt.div(
1157
+ Q((u) => {
1149
1158
  const d = u;
1150
1159
  d.style.position = "absolute";
1151
- async function h() {
1152
- const { x: p, y } = await wn(r, d, {
1153
- placement: f.get(),
1160
+ async function f() {
1161
+ const { x: g, y } = await xn(r, d, {
1162
+ placement: h.get(),
1154
1163
  strategy: "absolute",
1155
1164
  middleware: [
1156
- $t(),
1157
- gn({
1165
+ Bt(),
1166
+ yn({
1158
1167
  mainAxis: l.get(),
1159
1168
  crossAxis: a.get()
1160
1169
  }),
1161
- yn(),
1162
- $t()
1170
+ wn(),
1171
+ Bt()
1163
1172
  ]
1164
1173
  });
1165
- d.style.top = `${y}px`, d.style.left = `${p}px`;
1174
+ d.style.top = `${y}px`, d.style.left = `${g}px`;
1166
1175
  }
1167
- const m = we(
1176
+ const m = xe(
1168
1177
  l,
1169
1178
  a,
1170
- f
1171
- )(h);
1172
- return F(
1173
- pn(r, d, h),
1179
+ h
1180
+ )(f);
1181
+ return M(
1182
+ gn(r, d, f),
1174
1183
  m
1175
1184
  );
1176
1185
  }),
@@ -1178,8 +1187,8 @@ const gn = Xe, yn = Je, $t = qe, wn = (t, e, n) => {
1178
1187
  )
1179
1188
  )
1180
1189
  );
1181
- }), xn = (t, e, n) => {
1182
- const o = W(D.notAsked), s = o.map(
1190
+ }), vn = (t, e, n) => {
1191
+ const o = F(D.notAsked), s = o.map(
1183
1192
  (u) => D.isSuccess(u) ? u.value : void 0
1184
1193
  ), i = o.map(
1185
1194
  (u) => D.isFailure(u) ? u.error : void 0
@@ -1187,58 +1196,58 @@ const gn = Xe, yn = Je, $t = qe, wn = (t, e, n) => {
1187
1196
  let c;
1188
1197
  const l = async (u) => {
1189
1198
  c == null || c.abort(), c = new AbortController();
1190
- const d = c.signal, h = o.get();
1191
- o.set(D.loading(D.getOrUndefined(h)));
1199
+ const d = c.signal, f = o.get();
1200
+ o.set(D.loading(D.getOrUndefined(f)));
1192
1201
  try {
1193
- const m = await e({ request: u, abortSignal: d, previous: h });
1202
+ const m = await e({ request: u, abortSignal: d, previous: f });
1194
1203
  await Promise.resolve(), c = void 0, o.set(D.success(m));
1195
1204
  } catch (m) {
1196
1205
  c = void 0, o.set(D.failure(n(m)));
1197
1206
  }
1198
- }, a = () => l(L.get(t)), f = () => {
1207
+ }, a = () => l(O.get(t)), h = () => {
1199
1208
  c == null || c.abort(), c = void 0, o.dispose();
1200
1209
  };
1201
- return o.onDispose(L.on(t, l)), {
1210
+ return o.onDispose(O.on(t, l)), {
1202
1211
  status: o,
1203
1212
  value: s,
1204
1213
  error: i,
1205
1214
  loading: r,
1206
1215
  reload: a,
1207
- dispose: f
1216
+ dispose: h
1208
1217
  };
1209
- }, vn = (t, e) => {
1218
+ }, bn = (t, e) => {
1210
1219
  const { status: n, dispose: o, reload: s } = t, { loading: i, failure: r, success: c } = e;
1211
- return At(
1212
- F(o),
1213
- ne(n, {
1220
+ return Et(
1221
+ M(o),
1222
+ oe(n, {
1214
1223
  loading: i != null ? (l) => i(l, s) : void 0,
1215
1224
  failure: r != null ? (l) => r(l, s) : void 0,
1216
1225
  success: (l) => c(l, s)
1217
1226
  })
1218
1227
  );
1219
- }, _n = ({
1228
+ }, In = ({
1220
1229
  request: t,
1221
1230
  load: e,
1222
1231
  mapError: n = (o) => o
1223
1232
  }) => {
1224
- const o = xn(t, e, n);
1225
- return (s) => vn(o, s);
1226
- }, bn = (t, e) => {
1233
+ const o = vn(t, e, n);
1234
+ return (s) => bn(o, s);
1235
+ }, An = (t, e) => {
1227
1236
  if (typeof e == "function")
1228
- return bn(t, { success: e });
1229
- const n = e.failure ?? ((s) => At(
1230
- F(s.on(console.error)),
1237
+ return An(t, { success: e });
1238
+ const n = e.failure ?? ((s) => Et(
1239
+ M(s.on(console.error)),
1231
1240
  s.map((i) => `Error: ${i}`)
1232
1241
  )), o = e.success;
1233
- return Xt(L.toSignal(t), {
1242
+ return Jt(O.toSignal(t), {
1234
1243
  Success: (s) => o(s.$.value),
1235
1244
  Failure: (s) => n(s.$.error)
1236
1245
  });
1237
- }, In = () => qt.focus((t) => {
1246
+ }, jn = () => Kt.focus((t) => {
1238
1247
  var e;
1239
1248
  return (e = t.target) == null ? void 0 : e.select();
1240
1249
  });
1241
- class dt {
1250
+ class mt {
1242
1251
  /**
1243
1252
  * Creates a new Rect instance.
1244
1253
  *
@@ -1277,7 +1286,7 @@ class dt {
1277
1286
  * console.log(rect1.equals(rect3)); // true (within tolerance)
1278
1287
  * ```
1279
1288
  */
1280
- pt(this, "equals", (e) => tt(this.left, e.left) && tt(this.top, e.top) && tt(this.width, e.width) && tt(this.height, e.height));
1289
+ yt(this, "equals", (e) => et(this.left, e.left) && et(this.top, e.top) && et(this.width, e.width) && et(this.height, e.height));
1281
1290
  this.left = e, this.top = n, this.width = o, this.height = s;
1282
1291
  }
1283
1292
  /**
@@ -1311,7 +1320,7 @@ class dt {
1311
1320
  width: o = 0,
1312
1321
  height: s = 0
1313
1322
  }) {
1314
- return new dt(e, n, o, s);
1323
+ return new mt(e, n, o, s);
1315
1324
  }
1316
1325
  /**
1317
1326
  * Gets the x-coordinate of the right edge of the rectangle.
@@ -1377,28 +1386,28 @@ class dt {
1377
1386
  return { width: this.width, height: this.height };
1378
1387
  }
1379
1388
  }
1380
- function Bt(t) {
1389
+ function Ut(t) {
1381
1390
  const e = t.getBoundingClientRect();
1382
- return dt.of({
1391
+ return mt.of({
1383
1392
  top: e.top + window.scrollY,
1384
1393
  left: e.left + window.scrollX,
1385
1394
  width: e.width,
1386
1395
  height: e.height
1387
1396
  });
1388
1397
  }
1389
- const An = (t) => Qt((e) => {
1390
- const { element: n } = e, o = W(Bt(n)), s = Rt(t(o))(e), i = () => {
1391
- o.set(dt.of(Bt(n)));
1398
+ const Rn = (t) => Zt((e) => {
1399
+ const { element: n } = e, o = F(Ut(n)), s = Lt(t(o))(e), i = () => {
1400
+ o.set(mt.of(Ut(n)));
1392
1401
  };
1393
1402
  let r;
1394
- return typeof ResizeObserver == "function" && (r = new ResizeObserver(i), r.observe(n)), F((c) => {
1403
+ return typeof ResizeObserver == "function" && (r = new ResizeObserver(i), r.observe(n)), M((c) => {
1395
1404
  r == null || r.disconnect(), s(c);
1396
1405
  });
1397
- }), jn = (t) => An(t), Yn = (t) => (e) => {
1398
- const n = J(), o = W({
1406
+ }), Yn = (t) => Rn(t), qn = (t) => (e) => {
1407
+ const n = G(), o = F({
1399
1408
  width: (n == null ? void 0 : n.innerWidth) ?? 0,
1400
1409
  height: (n == null ? void 0 : n.innerHeight) ?? 0
1401
- }), s = Rt(t(o))(e), i = () => {
1410
+ }), s = Lt(t(o))(e), i = () => {
1402
1411
  o.set({
1403
1412
  width: (n == null ? void 0 : n.innerWidth) ?? 0,
1404
1413
  height: (n == null ? void 0 : n.innerHeight) ?? 0
@@ -1407,7 +1416,7 @@ const An = (t) => Qt((e) => {
1407
1416
  return n == null || n.addEventListener("resize", i), (r) => {
1408
1417
  n == null || n.removeEventListener("resize", i), s(r);
1409
1418
  };
1410
- }, Rn = (t, e) => {
1419
+ }, En = (t, e) => {
1411
1420
  const n = e.split("/").filter((s) => s !== ""), o = {};
1412
1421
  for (let s = 0; s < t.length; s++) {
1413
1422
  const i = t[s], r = n[s];
@@ -1422,22 +1431,22 @@ const An = (t) => Qt((e) => {
1422
1431
  return { params: o, path: e };
1423
1432
  }
1424
1433
  return n.length !== t.length ? null : { params: o, path: e };
1425
- }, En = (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 !== ""), Ln = (t) => {
1434
+ }, Ln = (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 !== ""), On = (t) => {
1426
1435
  const e = t.map((n) => {
1427
- const o = En(n);
1436
+ const o = Ln(n);
1428
1437
  return { route: n, segments: o };
1429
1438
  });
1430
1439
  return function(o) {
1431
1440
  for (const { segments: s, route: i } of e) {
1432
- const r = Rn(s, o);
1441
+ const r = En(s, o);
1433
1442
  if (r)
1434
1443
  return { ...r, route: i };
1435
1444
  }
1436
1445
  return null;
1437
1446
  };
1438
- }, qn = (t) => {
1439
- const e = Ln(Object.keys(t));
1440
- return jt(ee, (n) => {
1447
+ }, Kn = (t) => {
1448
+ const e = On(Object.keys(t));
1449
+ return Yt(ne, (n) => {
1441
1450
  const o = n.map((s) => {
1442
1451
  const i = e(s.pathname);
1443
1452
  if (i == null)
@@ -1450,57 +1459,57 @@ const An = (t) => Qt((e) => {
1450
1459
  hash: s.hash
1451
1460
  };
1452
1461
  });
1453
- return xe(
1462
+ return ve(
1454
1463
  o.map((s) => [s.route, s]),
1455
1464
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1456
1465
  t
1457
1466
  );
1458
1467
  });
1459
- }, ct = 60 * 1e3, bt = 60 * ct, X = 24 * bt, Ut = 7 * X, Ht = 30 * X, On = 365 * X, Sn = [
1468
+ }, lt = 60 * 1e3, Rt = 60 * lt, J = 24 * Rt, Ht = 7 * J, zt = 30 * J, Sn = 365 * J, Tn = [
1460
1469
  {
1461
- max: ct * 90,
1462
- value: ct,
1470
+ max: lt * 90,
1471
+ value: lt,
1463
1472
  name: "minute",
1464
1473
  past: { singular: "a minute ago", plural: "{} minutes ago" },
1465
1474
  future: { singular: "in a minute", plural: "in {} minutes" }
1466
1475
  },
1467
1476
  {
1468
- max: bt * 36,
1469
- value: bt,
1477
+ max: Rt * 36,
1478
+ value: Rt,
1470
1479
  name: "hour",
1471
1480
  past: { singular: "an hour ago", plural: "{} hours ago" },
1472
1481
  future: { singular: "in an hour", plural: "in {} hours" }
1473
1482
  },
1474
1483
  {
1475
- max: X * 10,
1476
- value: X,
1484
+ max: J * 10,
1485
+ value: J,
1477
1486
  name: "day",
1478
1487
  past: { singular: "yesterday", plural: "{} days ago" },
1479
1488
  future: { singular: "tomorrow", plural: "in {} days" }
1480
1489
  },
1481
1490
  {
1482
- max: Ut * 6,
1483
- value: Ut,
1491
+ max: Ht * 6,
1492
+ value: Ht,
1484
1493
  name: "week",
1485
1494
  past: { singular: "last week", plural: "{} weeks ago" },
1486
1495
  future: { singular: "in a week", plural: "in {} weeks" }
1487
1496
  },
1488
1497
  {
1489
- max: Ht * 18,
1490
- value: Ht,
1498
+ max: zt * 18,
1499
+ value: zt,
1491
1500
  name: "month",
1492
1501
  past: { singular: "last month", plural: "{} months ago" },
1493
1502
  future: { singular: "in a month", plural: "in {} months" }
1494
1503
  },
1495
1504
  {
1496
1505
  max: 1 / 0,
1497
- value: On,
1506
+ value: Sn,
1498
1507
  name: "year",
1499
1508
  past: { singular: "last year", plural: "{} years ago" },
1500
1509
  future: { singular: "in a year", plural: "in {} years" }
1501
1510
  }
1502
1511
  ];
1503
- function zt(t, e, n, o) {
1512
+ function _t(t, e, n, o) {
1504
1513
  const s = Math.round(t / e);
1505
1514
  return s <= 1 ? n : o.replace(
1506
1515
  "{}",
@@ -1510,77 +1519,77 @@ function zt(t, e, n, o) {
1510
1519
  })
1511
1520
  );
1512
1521
  }
1513
- const Tn = (t = 1e3) => {
1514
- const e = W(/* @__PURE__ */ new Date()), n = Ae(() => e.set(/* @__PURE__ */ new Date()), t);
1522
+ const kn = (t = 1e3) => {
1523
+ const e = F(/* @__PURE__ */ new Date()), n = Re(() => e.set(/* @__PURE__ */ new Date()), t);
1515
1524
  return e.onDispose(n), e;
1516
- }, kn = (t) => {
1525
+ }, Cn = (t) => {
1517
1526
  const e = Math.abs(t);
1518
- if (e < ct)
1527
+ if (e < lt)
1519
1528
  return t < 0 ? "just now" : "in a moment";
1520
- for (const n of Sn)
1529
+ for (const n of Tn)
1521
1530
  if (e < n.max)
1522
- return t < 0 ? zt(e, n.value, n.past.singular, n.past.plural) : zt(e, n.value, n.future.singular, n.future.plural);
1531
+ return t < 0 ? _t(e, n.value, n.past.singular, n.past.plural) : _t(e, n.value, n.future.singular, n.future.plural);
1523
1532
  throw new Error("unreachable");
1524
- }, Cn = (t, { now: e, frequency: n = 1e4 } = {}) => {
1525
- const o = e != null ? It.is(e) ? e.derive() : W(e) : Tn(n), s = ve(
1533
+ }, Dn = (t, { now: e, frequency: n = 1e4 } = {}) => {
1534
+ const o = e != null ? jt.is(e) ? e.derive() : F(e) : kn(n), s = be(
1526
1535
  t,
1527
1536
  o
1528
1537
  )((i, r) => i.getTime() - r.getTime());
1529
- return s.onDispose(() => L.dispose(o)), s;
1530
- }, Dn = (t, e = {}) => {
1531
- const n = Cn(t, e), o = n.map(kn);
1538
+ return s.onDispose(() => O.dispose(o)), s;
1539
+ }, Pn = (t, e = {}) => {
1540
+ const n = Dn(t, e), o = n.map(Cn);
1532
1541
  return o.onDispose(n.dispose), o;
1533
- }, Kn = (t, e = {}) => Dn(t, e);
1534
- class Pn extends be {
1542
+ }, Xn = (t, e = {}) => Pn(t, e);
1543
+ class Wn extends Ae {
1535
1544
  constructor() {
1536
1545
  super(...arguments);
1537
1546
  /**
1538
1547
  * Triggers an update of the Ticker by incrementing its internal value.
1539
1548
  * @returns void
1540
1549
  */
1541
- pt(this, "tick", () => this.update((n) => n + 1));
1550
+ yt(this, "tick", () => this.update((n) => n + 1));
1542
1551
  }
1543
1552
  }
1544
- const Xn = (t = 0) => new Pn(t, (e, n) => e === n);
1553
+ const Jn = (t = 0) => new Wn(t, (e, n) => e === n);
1545
1554
  export {
1546
- We as Anchor,
1547
- Vn as Appearance,
1548
- ne as AsyncResultView,
1549
- Nn as AutoFocus,
1550
- $n as AutoSelect,
1551
- An as ElementRect,
1552
- jn as ElementSize,
1553
- Un as HTMLTitle,
1554
- Bn as HiddenWhenEmpty,
1555
- Ne as InViewport,
1556
- ee as Location,
1557
- zn as PopOver,
1558
- dt as Rect,
1559
- _n as Resource,
1560
- vn as ResourceDisplay,
1561
- bn as ResultView,
1562
- qn as Router,
1563
- In as SelectOnFocus,
1564
- Pn as Ticker,
1565
- Hn as WhenInViewport,
1566
- Yn as WindowSize,
1567
- Ee as _checkExtensionCondition,
1568
- Re as _getExtension,
1569
- Ln as _makeRouteMatcher,
1570
- En as _parseRouteSegments,
1571
- Se as areLocationsEqual,
1572
- Bt as getAbsoluteRect,
1573
- Oe as handleAnchorClick,
1574
- te as locationFromURL,
1575
- xn as makeResource,
1576
- Rn as matchesRoute,
1577
- Tn as nowSignal,
1578
- Kn as relativeTime,
1579
- Cn as relativeTimeMillisSignal,
1580
- Dn as relativeTimeSignal,
1581
- Pt as setLocationFromUrl,
1582
- Xn as ticker,
1583
- kn as timeDiffToString,
1584
- wt as urlFromLocation,
1585
- Fe as useAppearance
1555
+ Fe as Anchor,
1556
+ Nn as Appearance,
1557
+ oe as AsyncResultView,
1558
+ $n as AutoFocus,
1559
+ Bn as AutoSelect,
1560
+ Rn as ElementRect,
1561
+ Yn as ElementSize,
1562
+ Hn as HTMLTitle,
1563
+ Un as HiddenWhenEmpty,
1564
+ $e as InViewport,
1565
+ ne as Location,
1566
+ _n as PopOver,
1567
+ mt as Rect,
1568
+ In as Resource,
1569
+ bn as ResourceDisplay,
1570
+ An as ResultView,
1571
+ Kn as Router,
1572
+ jn as SelectOnFocus,
1573
+ Wn as Ticker,
1574
+ zn as WhenInViewport,
1575
+ qn as WindowSize,
1576
+ Le as _checkExtensionCondition,
1577
+ Ee as _getExtension,
1578
+ On as _makeRouteMatcher,
1579
+ Ln as _parseRouteSegments,
1580
+ Te as areLocationsEqual,
1581
+ Ut as getAbsoluteRect,
1582
+ Se as handleAnchorClick,
1583
+ ee as locationFromURL,
1584
+ vn as makeResource,
1585
+ En as matchesRoute,
1586
+ kn as nowSignal,
1587
+ Xn as relativeTime,
1588
+ Dn as relativeTimeMillisSignal,
1589
+ Pn as relativeTimeSignal,
1590
+ Wt as setLocationFromUrl,
1591
+ Jn as ticker,
1592
+ Cn as timeDiffToString,
1593
+ vt as urlFromLocation,
1594
+ Me as useAppearance
1586
1595
  };