@tempots/ui 4.3.1 → 4.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,8 +1,8 @@
1
- var ye = Object.defineProperty;
2
- var xe = (t, e, n) => e in t ? ye(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
1
+ var we = Object.defineProperty;
2
+ var xe = (t, e, n) => e in t ? we(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var bt = (t, e, n) => xe(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { getWindow as it, prop as H, makeProviderMark as qt, Signal as Xt, Use as Kt, html as Rt, on as Jt, Value as C, attr as Gt, Empty as Et, OneOfType as Qt, WithElement as K, OnDispose as U, Portal as Zt, Fragment as gt, renderableOfTNode as Ct, When as te, WithBrowserCtx as ee, effectOf as ve, OneOfTuple as be, computedOf as Ae, Prop as Re } from "@tempots/dom";
5
- import { delayed as ne, AsyncResult as $, nearEqual as at, interval as Ee } from "@tempots/std";
4
+ import { getWindow as it, prop as $, makeProviderMark as qt, Signal as Xt, Use as Kt, html as Rt, on as Jt, Value as P, attr as Gt, Empty as Et, OneOfType as Qt, WithElement as G, OnDispose as _, Portal as Zt, Fragment as pt, renderableOfTNode as Ct, When as te, WithBrowserCtx as ee, effectOf as ve, OneOfTuple as be, computedOf as Ae, Prop as Re } from "@tempots/dom";
5
+ import { delayed as ne, AsyncResult as B, nearEqual as at, interval as Ee } from "@tempots/std";
6
6
  const Le = (t) => {
7
7
  const e = t.split("/").pop();
8
8
  if (e == null || e.startsWith(".")) return;
@@ -52,7 +52,7 @@ const Le = (t) => {
52
52
  search: o,
53
53
  hash: s === "" ? void 0 : s
54
54
  };
55
- }, $t = (t, e) => {
55
+ }, Nt = (t, e) => {
56
56
  const n = oe(e);
57
57
  return t.set(n), t;
58
58
  }, Lt = (t) => {
@@ -79,7 +79,7 @@ const Le = (t) => {
79
79
  hash: e
80
80
  };
81
81
  }, We = () => {
82
- const t = H(De(), ke), e = it(), n = () => {
82
+ const t = $(De(), ke), e = it(), n = () => {
83
83
  let o = (e == null ? void 0 : e.location.hash) ?? "";
84
84
  o.startsWith("#") && (o = o.substring(1));
85
85
  const s = {
@@ -121,13 +121,13 @@ const Le = (t) => {
121
121
  return Kt(se, (i) => Rt.a(
122
122
  Jt.click(
123
123
  Te(() => (o == !0 ? Fe(() => {
124
- $t(i, C.get(n));
125
- }) : $t(i, C.get(n)), !0), s)
124
+ Nt(i, P.get(n));
125
+ }) : Nt(i, P.get(n)), !0), s)
126
126
  ),
127
127
  Gt.href(n),
128
128
  ...e
129
129
  ));
130
- }, Bn = {
130
+ }, Hn = {
131
131
  mark: qt("Appearance"),
132
132
  create: () => {
133
133
  const t = Ve();
@@ -138,28 +138,28 @@ const Le = (t) => {
138
138
  }
139
139
  };
140
140
  function Ve() {
141
- const t = it(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, n = (e == null ? void 0 : e.matches) ?? !1, o = H(n ? "dark" : "light"), s = (i) => o.set(i.matches ? "dark" : "light");
141
+ const t = it(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, n = (e == null ? void 0 : e.matches) ?? !1, o = $(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
144
  const ie = (t, e) => {
145
145
  if (typeof e == "function")
146
146
  return ie(t, { success: e });
147
147
  const n = e.failure ?? ((r) => r.map((c) => `Error: ${c}`)), o = e.success, s = e.loading ?? (() => Et), i = e.notAsked ?? (() => Et);
148
- return Qt(C.toSignal(t), {
148
+ return Qt(P.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
- }, Hn = (t = 10) => K((e) => U(ne(() => e == null ? void 0 : e.focus(), t))), Un = (t = 10) => K((e) => {
154
+ }, Bn = (t = 10) => G((e) => _(ne(() => e == null ? void 0 : e.focus(), t))), Un = (t = 10) => G((e) => {
155
155
  const n = ne(() => e.select(), t);
156
- return U(n);
157
- }), zn = K((t) => {
156
+ return _(n);
157
+ }), zn = G((t) => {
158
158
  const e = t.style.getPropertyValue(":empty");
159
- return t.style.setProperty(":empty", "display:none"), U((n) => {
159
+ return t.style.setProperty(":empty", "display:none"), _((n) => {
160
160
  n && t.style.setProperty(":empty", e);
161
161
  });
162
- }), _n = (t) => Zt("head > title", Gt.innerText(t)), $e = {
162
+ }), _n = (t) => Zt("head > title", Gt.innerText(t)), Ne = {
163
163
  partial: {
164
164
  root: null,
165
165
  rootMargin: "0px",
@@ -177,19 +177,19 @@ const ie = (t, e) => {
177
177
  partial: null,
178
178
  full: null
179
179
  };
180
- function Ne(t) {
180
+ function $e(t) {
181
181
  return nt[t] == null && (nt[t] = new IntersectionObserver((e) => {
182
182
  e.forEach((n) => {
183
183
  const o = ft[t].get(n.target);
184
184
  o == null || o.set(n.isIntersecting);
185
185
  });
186
- }, $e[t])), nt[t];
186
+ }, Ne[t])), nt[t];
187
187
  }
188
- const Be = ({ mode: t = "partial", once: e = !1 }, n) => {
189
- const o = H(!1);
190
- return gt(
191
- K((s) => {
192
- const i = typeof IntersectionObserver < "u" ? Ne(t) : null;
188
+ const He = ({ mode: t = "partial", once: e = !1 }, n) => {
189
+ const o = $(!1);
190
+ return pt(
191
+ G((s) => {
192
+ const i = typeof IntersectionObserver < "u" ? $e(t) : null;
193
193
  ft[t].set(s, o), i == null || i.observe(s);
194
194
  function r() {
195
195
  var l;
@@ -198,16 +198,16 @@ const Be = ({ mode: t = "partial", once: e = !1 }, n) => {
198
198
  let c = null;
199
199
  return e && (c = o.on((l) => {
200
200
  l && r();
201
- })), U(() => {
201
+ })), _(() => {
202
202
  o.dispose(), r(), c == null || c();
203
203
  });
204
204
  }),
205
205
  Ct(n(o))
206
206
  );
207
- }, jn = (t, e, n) => Be(t, (o) => te(o, e, n ?? (() => Et))), J = Math.min, I = Math.max, ht = Math.round, ut = Math.floor, P = (t) => ({
207
+ }, In = (t, e, n) => He(t, (o) => te(o, e, n ?? (() => Et))), Q = Math.min, q = Math.max, ht = Math.round, ut = Math.floor, D = (t) => ({
208
208
  x: t,
209
209
  y: t
210
- }), He = {
210
+ }), Be = {
211
211
  left: "right",
212
212
  right: "left",
213
213
  bottom: "top",
@@ -217,12 +217,12 @@ const Be = ({ mode: t = "partial", once: e = !1 }, n) => {
217
217
  end: "start"
218
218
  };
219
219
  function Ot(t, e, n) {
220
- return I(t, J(e, n));
220
+ return q(t, Q(e, n));
221
221
  }
222
222
  function rt(t, e) {
223
223
  return typeof t == "function" ? t(e) : t;
224
224
  }
225
- function Y(t) {
225
+ function X(t) {
226
226
  return t.split("-")[0];
227
227
  }
228
228
  function ct(t) {
@@ -234,11 +234,11 @@ function re(t) {
234
234
  function Pt(t) {
235
235
  return t === "y" ? "height" : "width";
236
236
  }
237
- function N(t) {
238
- return ["top", "bottom"].includes(Y(t)) ? "y" : "x";
237
+ function U(t) {
238
+ return ["top", "bottom"].includes(X(t)) ? "y" : "x";
239
239
  }
240
240
  function Dt(t) {
241
- return re(N(t));
241
+ return re(U(t));
242
242
  }
243
243
  function ze(t, e, n) {
244
244
  n === void 0 && (n = !1);
@@ -253,7 +253,7 @@ function _e(t) {
253
253
  function St(t) {
254
254
  return t.replace(/start|end/g, (e) => Ue[e]);
255
255
  }
256
- function je(t, e, n) {
256
+ function Ie(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,13 +266,13 @@ function je(t, e, n) {
266
266
  return [];
267
267
  }
268
268
  }
269
- function Ie(t, e, n, o) {
269
+ function je(t, e, n, o) {
270
270
  const s = ct(t);
271
- let i = je(Y(t), n === "start", o);
271
+ let i = Ie(X(t), n === "start", o);
272
272
  return s && (i = i.map((r) => r + "-" + s), e && (i = i.concat(i.map(St)))), i;
273
273
  }
274
274
  function dt(t) {
275
- return t.replace(/left|right|bottom|top/g, (e) => He[e]);
275
+ return t.replace(/left|right|bottom|top/g, (e) => Be[e]);
276
276
  }
277
277
  function Ye(t) {
278
278
  return {
@@ -309,12 +309,12 @@ function mt(t) {
309
309
  y: n
310
310
  };
311
311
  }
312
- function Nt(t, e, n) {
312
+ function $t(t, e, n) {
313
313
  let {
314
314
  reference: o,
315
315
  floating: s
316
316
  } = t;
317
- const i = N(e), r = Dt(e), c = Pt(r), l = Y(e), a = i === "y", h = o.x + o.width / 2 - s.width / 2, f = o.y + o.height / 2 - s.height / 2, m = o[c] / 2 - s[c] / 2;
317
+ const i = U(e), r = Dt(e), c = Pt(r), l = X(e), a = i === "y", h = o.x + o.width / 2 - s.width / 2, f = o.y + o.height / 2 - s.height / 2, m = o[c] / 2 - s[c] / 2;
318
318
  let u;
319
319
  switch (l) {
320
320
  case "top":
@@ -371,17 +371,17 @@ const qe = async (t, e, n) => {
371
371
  }), {
372
372
  x: h,
373
373
  y: f
374
- } = Nt(a, o, l), m = o, u = {}, d = 0;
374
+ } = $t(a, o, l), m = o, u = {}, d = 0;
375
375
  for (let g = 0; g < c.length; g++) {
376
376
  const {
377
- name: w,
378
- fn: p
377
+ name: p,
378
+ fn: y
379
379
  } = c[g], {
380
- x: y,
380
+ x: w,
381
381
  y: x,
382
382
  data: b,
383
383
  reset: v
384
- } = await p({
384
+ } = await y({
385
385
  x: h,
386
386
  y: f,
387
387
  initialPlacement: o,
@@ -395,10 +395,10 @@ const qe = async (t, e, n) => {
395
395
  floating: e
396
396
  }
397
397
  });
398
- h = y ?? h, f = x ?? f, u = {
398
+ h = w ?? h, f = x ?? f, u = {
399
399
  ...u,
400
- [w]: {
401
- ...u[w],
400
+ [p]: {
401
+ ...u[p],
402
402
  ...b
403
403
  }
404
404
  }, v && d <= 50 && (d++, typeof v == "object" && (v.placement && (m = v.placement), v.rects && (a = v.rects === !0 ? await r.getElementRects({
@@ -408,7 +408,7 @@ const qe = async (t, e, n) => {
408
408
  }) : v.rects), {
409
409
  x: h,
410
410
  y: f
411
- } = Nt(a, m, l)), g = -1);
411
+ } = $t(a, m, l)), g = -1);
412
412
  }
413
413
  return {
414
414
  x: h,
@@ -434,12 +434,12 @@ async function le(t, e) {
434
434
  elementContext: f = "floating",
435
435
  altBoundary: m = !1,
436
436
  padding: u = 0
437
- } = rt(e, t), d = ce(u), w = c[m ? f === "floating" ? "reference" : "floating" : f], p = mt(await i.getClippingRect({
438
- element: (n = await (i.isElement == null ? void 0 : i.isElement(w))) == null || n ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
437
+ } = rt(e, t), d = ce(u), p = c[m ? f === "floating" ? "reference" : "floating" : f], y = mt(await i.getClippingRect({
438
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(p))) == null || n ? p : p.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
439
439
  boundary: a,
440
440
  rootBoundary: h,
441
441
  strategy: l
442
- })), y = f === "floating" ? {
442
+ })), w = f === "floating" ? {
443
443
  x: o,
444
444
  y: s,
445
445
  width: r.floating.width,
@@ -452,15 +452,15 @@ async function le(t, e) {
452
452
  y: 1
453
453
  }, v = mt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
454
454
  elements: c,
455
- rect: y,
455
+ rect: w,
456
456
  offsetParent: x,
457
457
  strategy: l
458
- }) : y);
458
+ }) : w);
459
459
  return {
460
- top: (p.top - v.top + d.top) / b.y,
461
- bottom: (v.bottom - p.bottom + d.bottom) / b.y,
462
- left: (p.left - v.left + d.left) / b.x,
463
- right: (v.right - p.right + d.right) / b.x
460
+ top: (y.top - v.top + d.top) / b.y,
461
+ bottom: (v.bottom - y.bottom + d.bottom) / b.y,
462
+ left: (y.left - v.left + d.left) / b.x,
463
+ right: (v.right - y.right + d.right) / b.x
464
464
  };
465
465
  }
466
466
  const Xe = (t) => ({
@@ -484,20 +484,20 @@ const Xe = (t) => ({
484
484
  const f = ce(h), m = {
485
485
  x: n,
486
486
  y: o
487
- }, u = Dt(s), d = Pt(u), g = await r.getDimensions(a), w = u === "y", p = w ? "top" : "left", y = w ? "bottom" : "right", x = w ? "clientHeight" : "clientWidth", b = i.reference[d] + i.reference[u] - m[u] - i.floating[d], v = m[u] - i.reference[u], L = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a));
487
+ }, u = Dt(s), d = Pt(u), g = await r.getDimensions(a), p = u === "y", y = p ? "top" : "left", w = p ? "bottom" : "right", x = p ? "clientHeight" : "clientWidth", b = i.reference[d] + i.reference[u] - m[u] - i.floating[d], v = m[u] - i.reference[u], L = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a));
488
488
  let A = L ? L[x] : 0;
489
489
  (!A || !await (r.isElement == null ? void 0 : r.isElement(L))) && (A = c.floating[x] || i.floating[d]);
490
- const Z = b / 2 - v / 2, z = A / 2 - g[d] / 2 - 1, F = J(f[p], z), tt = J(f[y], z), _ = F, et = A - g[d] - tt, R = A / 2 - g[d] / 2 + Z, j = Ot(_, R, et), M = !l.arrow && ct(s) != null && R !== j && i.reference[d] / 2 - (R < _ ? F : tt) - g[d] / 2 < 0, O = M ? R < _ ? R - _ : R - et : 0;
490
+ const I = b / 2 - v / 2, M = A / 2 - g[d] / 2 - 1, O = Q(f[y], M), j = Q(f[w], M), V = O, et = A - g[d] - j, R = A / 2 - g[d] / 2 + I, Y = Ot(V, R, et), N = !l.arrow && ct(s) != null && R !== Y && i.reference[d] / 2 - (R < V ? O : j) - g[d] / 2 < 0, S = N ? R < V ? R - V : R - et : 0;
491
491
  return {
492
- [u]: m[u] + O,
492
+ [u]: m[u] + S,
493
493
  data: {
494
- [u]: j,
495
- centerOffset: R - j - O,
496
- ...M && {
497
- alignmentOffset: O
494
+ [u]: Y,
495
+ centerOffset: R - Y - S,
496
+ ...N && {
497
+ alignmentOffset: S
498
498
  }
499
499
  },
500
- reset: M
500
+ reset: N
501
501
  };
502
502
  }
503
503
  }), Ke = function(t) {
@@ -520,61 +520,61 @@ const Xe = (t) => ({
520
520
  fallbackStrategy: u = "bestFit",
521
521
  fallbackAxisSideDirection: d = "none",
522
522
  flipAlignment: g = !0,
523
- ...w
523
+ ...p
524
524
  } = rt(t, e);
525
525
  if ((n = i.arrow) != null && n.alignmentOffset)
526
526
  return {};
527
- const p = Y(s), y = N(c), x = Y(c) === c, b = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), v = m || (x || !g ? [dt(c)] : _e(c)), L = d !== "none";
528
- !m && L && v.push(...Ie(c, g, d, b));
529
- const A = [c, ...v], Z = await le(e, w), z = [];
530
- let F = ((o = i.flip) == null ? void 0 : o.overflows) || [];
531
- if (h && z.push(Z[p]), f) {
527
+ const y = X(s), w = U(c), x = X(c) === c, b = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), v = m || (x || !g ? [dt(c)] : _e(c)), L = d !== "none";
528
+ !m && L && v.push(...je(c, g, d, b));
529
+ const A = [c, ...v], I = await le(e, p), M = [];
530
+ let O = ((o = i.flip) == null ? void 0 : o.overflows) || [];
531
+ if (h && M.push(I[y]), f) {
532
532
  const R = ze(s, r, b);
533
- z.push(Z[R[0]], Z[R[1]]);
533
+ M.push(I[R[0]], I[R[1]]);
534
534
  }
535
- if (F = [...F, {
535
+ if (O = [...O, {
536
536
  placement: s,
537
- overflows: z
538
- }], !z.every((R) => R <= 0)) {
539
- var tt, _;
540
- const R = (((tt = i.flip) == null ? void 0 : tt.index) || 0) + 1, j = A[R];
541
- if (j && (!(f === "alignment" ? y !== N(j) : !1) || // We leave the current main axis only if every placement on that axis
537
+ overflows: M
538
+ }], !M.every((R) => R <= 0)) {
539
+ var j, V;
540
+ const R = (((j = i.flip) == null ? void 0 : j.index) || 0) + 1, Y = A[R];
541
+ if (Y && (!(f === "alignment" ? w !== U(Y) : !1) || // We leave the current main axis only if every placement on that axis
542
542
  // overflows the main axis.
543
- F.every((S) => S.overflows[0] > 0 && N(S.placement) === y)))
543
+ O.every((T) => T.overflows[0] > 0 && U(T.placement) === w)))
544
544
  return {
545
545
  data: {
546
546
  index: R,
547
- overflows: F
547
+ overflows: O
548
548
  },
549
549
  reset: {
550
- placement: j
550
+ placement: Y
551
551
  }
552
552
  };
553
- let M = (_ = F.filter((O) => O.overflows[0] <= 0).sort((O, S) => O.overflows[1] - S.overflows[1])[0]) == null ? void 0 : _.placement;
554
- if (!M)
553
+ let N = (V = O.filter((S) => S.overflows[0] <= 0).sort((S, T) => S.overflows[1] - T.overflows[1])[0]) == null ? void 0 : V.placement;
554
+ if (!N)
555
555
  switch (u) {
556
556
  case "bestFit": {
557
557
  var et;
558
- const O = (et = F.filter((S) => {
558
+ const S = (et = O.filter((T) => {
559
559
  if (L) {
560
- const V = N(S.placement);
561
- return V === y || // Create a bias to the `y` side axis due to horizontal
560
+ const H = U(T.placement);
561
+ return H === w || // Create a bias to the `y` side axis due to horizontal
562
562
  // reading directions favoring greater width.
563
- V === "y";
563
+ H === "y";
564
564
  }
565
565
  return !0;
566
- }).map((S) => [S.placement, S.overflows.filter((V) => V > 0).reduce((V, we) => V + we, 0)]).sort((S, V) => S[1] - V[1])[0]) == null ? void 0 : et[0];
567
- O && (M = O);
566
+ }).map((T) => [T.placement, T.overflows.filter((H) => H > 0).reduce((H, ye) => H + ye, 0)]).sort((T, H) => T[1] - H[1])[0]) == null ? void 0 : et[0];
567
+ S && (N = S);
568
568
  break;
569
569
  }
570
570
  case "initialPlacement":
571
- M = c;
571
+ N = c;
572
572
  break;
573
573
  }
574
- if (s !== M)
574
+ if (s !== N)
575
575
  return {
576
576
  reset: {
577
- placement: M
577
+ placement: N
578
578
  }
579
579
  };
580
580
  }
@@ -587,7 +587,7 @@ async function Je(t, e) {
587
587
  placement: n,
588
588
  platform: o,
589
589
  elements: s
590
- } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), r = Y(n), c = ct(n), l = N(n) === "y", a = ["left", "top"].includes(r) ? -1 : 1, h = i && l ? -1 : 1, f = rt(e, t);
590
+ } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), r = X(n), c = ct(n), l = U(n) === "y", a = ["left", "top"].includes(r) ? -1 : 1, h = i && l ? -1 : 1, f = rt(e, t);
591
591
  let {
592
592
  mainAxis: m,
593
593
  crossAxis: u,
@@ -644,14 +644,14 @@ const Ge = function(t) {
644
644
  mainAxis: i = !0,
645
645
  crossAxis: r = !1,
646
646
  limiter: c = {
647
- fn: (w) => {
647
+ fn: (p) => {
648
648
  let {
649
- x: p,
650
- y
651
- } = w;
649
+ x: y,
650
+ y: w
651
+ } = p;
652
652
  return {
653
- x: p,
654
- y
653
+ x: y,
654
+ y: w
655
655
  };
656
656
  }
657
657
  },
@@ -659,15 +659,15 @@ const Ge = function(t) {
659
659
  } = rt(t, e), a = {
660
660
  x: n,
661
661
  y: o
662
- }, h = await le(e, l), f = N(Y(s)), m = re(f);
662
+ }, h = await le(e, l), f = U(X(s)), m = re(f);
663
663
  let u = a[m], d = a[f];
664
664
  if (i) {
665
- const w = m === "y" ? "top" : "left", p = m === "y" ? "bottom" : "right", y = u + h[w], x = u - h[p];
666
- u = Ot(y, u, x);
665
+ const p = m === "y" ? "top" : "left", y = m === "y" ? "bottom" : "right", w = u + h[p], x = u - h[y];
666
+ u = Ot(w, u, x);
667
667
  }
668
668
  if (r) {
669
- const w = f === "y" ? "top" : "left", p = f === "y" ? "bottom" : "right", y = d + h[w], x = d - h[p];
670
- d = Ot(y, d, x);
669
+ const p = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", w = d + h[p], x = d - h[y];
670
+ d = Ot(w, d, x);
671
671
  }
672
672
  const g = c.fn({
673
673
  ...e,
@@ -688,31 +688,31 @@ const Ge = function(t) {
688
688
  }
689
689
  };
690
690
  };
691
- function wt() {
691
+ function yt() {
692
692
  return typeof window < "u";
693
693
  }
694
- function Q(t) {
694
+ function tt(t) {
695
695
  return ae(t) ? (t.nodeName || "").toLowerCase() : "#document";
696
696
  }
697
697
  function E(t) {
698
698
  var e;
699
699
  return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
700
700
  }
701
- function W(t) {
701
+ function F(t) {
702
702
  var e;
703
703
  return (e = (ae(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
704
704
  }
705
705
  function ae(t) {
706
- return wt() ? t instanceof Node || t instanceof E(t).Node : !1;
706
+ return yt() ? t instanceof Node || t instanceof E(t).Node : !1;
707
707
  }
708
- function T(t) {
709
- return wt() ? t instanceof Element || t instanceof E(t).Element : !1;
708
+ function k(t) {
709
+ return yt() ? t instanceof Element || t instanceof E(t).Element : !1;
710
710
  }
711
- function D(t) {
712
- return wt() ? t instanceof HTMLElement || t instanceof E(t).HTMLElement : !1;
711
+ function W(t) {
712
+ return yt() ? t instanceof HTMLElement || t instanceof E(t).HTMLElement : !1;
713
713
  }
714
- function Bt(t) {
715
- return !wt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof E(t).ShadowRoot;
714
+ function Ht(t) {
715
+ return !yt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof E(t).ShadowRoot;
716
716
  }
717
717
  function lt(t) {
718
718
  const {
@@ -720,13 +720,13 @@ function lt(t) {
720
720
  overflowX: n,
721
721
  overflowY: o,
722
722
  display: s
723
- } = k(t);
723
+ } = C(t);
724
724
  return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(s);
725
725
  }
726
726
  function Ze(t) {
727
- return ["table", "td", "th"].includes(Q(t));
727
+ return ["table", "td", "th"].includes(tt(t));
728
728
  }
729
- function yt(t) {
729
+ function wt(t) {
730
730
  return [":popover-open", ":modal"].some((e) => {
731
731
  try {
732
732
  return t.matches(e);
@@ -736,31 +736,31 @@ function yt(t) {
736
736
  });
737
737
  }
738
738
  function Wt(t) {
739
- const e = Ft(), n = T(t) ? k(t) : t;
739
+ const e = Ft(), n = k(t) ? C(t) : t;
740
740
  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));
741
741
  }
742
742
  function tn(t) {
743
- let e = B(t);
744
- for (; D(e) && !G(e); ) {
743
+ let e = z(t);
744
+ for (; W(e) && !Z(e); ) {
745
745
  if (Wt(e))
746
746
  return e;
747
- if (yt(e))
747
+ if (wt(e))
748
748
  return null;
749
- e = B(e);
749
+ e = z(e);
750
750
  }
751
751
  return null;
752
752
  }
753
753
  function Ft() {
754
754
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
755
755
  }
756
- function G(t) {
757
- return ["html", "body", "#document"].includes(Q(t));
756
+ function Z(t) {
757
+ return ["html", "body", "#document"].includes(tt(t));
758
758
  }
759
- function k(t) {
759
+ function C(t) {
760
760
  return E(t).getComputedStyle(t);
761
761
  }
762
762
  function xt(t) {
763
- return T(t) ? {
763
+ return k(t) ? {
764
764
  scrollLeft: t.scrollLeft,
765
765
  scrollTop: t.scrollTop
766
766
  } : {
@@ -768,21 +768,21 @@ function xt(t) {
768
768
  scrollTop: t.scrollY
769
769
  };
770
770
  }
771
- function B(t) {
772
- if (Q(t) === "html")
771
+ function z(t) {
772
+ if (tt(t) === "html")
773
773
  return t;
774
774
  const e = (
775
775
  // Step into the shadow DOM of the parent of a slotted node.
776
776
  t.assignedSlot || // DOM Element detected.
777
777
  t.parentNode || // ShadowRoot detected.
778
- Bt(t) && t.host || // Fallback.
779
- W(t)
778
+ Ht(t) && t.host || // Fallback.
779
+ F(t)
780
780
  );
781
- return Bt(e) ? e.host : e;
781
+ return Ht(e) ? e.host : e;
782
782
  }
783
783
  function ue(t) {
784
- const e = B(t);
785
- return G(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : D(e) && lt(e) ? e : ue(e);
784
+ const e = z(t);
785
+ return Z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : W(e) && lt(e) ? e : ue(e);
786
786
  }
787
787
  function ot(t, e, n) {
788
788
  var o;
@@ -798,9 +798,9 @@ function Tt(t) {
798
798
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
799
799
  }
800
800
  function fe(t) {
801
- const e = k(t);
801
+ const e = C(t);
802
802
  let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
803
- const s = D(t), i = s ? t.offsetWidth : n, r = s ? t.offsetHeight : o, c = ht(n) !== i || ht(o) !== r;
803
+ const s = W(t), i = s ? t.offsetWidth : n, r = s ? t.offsetHeight : o, c = ht(n) !== i || ht(o) !== r;
804
804
  return c && (n = i, o = r), {
805
805
  width: n,
806
806
  height: o,
@@ -808,12 +808,12 @@ function fe(t) {
808
808
  };
809
809
  }
810
810
  function Mt(t) {
811
- return T(t) ? t : t.contextElement;
811
+ return k(t) ? t : t.contextElement;
812
812
  }
813
- function X(t) {
813
+ function J(t) {
814
814
  const e = Mt(t);
815
- if (!D(e))
816
- return P(1);
815
+ if (!W(e))
816
+ return D(1);
817
817
  const n = e.getBoundingClientRect(), {
818
818
  width: o,
819
819
  height: s,
@@ -825,7 +825,7 @@ function X(t) {
825
825
  y: c
826
826
  };
827
827
  }
828
- const en = /* @__PURE__ */ P(0);
828
+ const en = /* @__PURE__ */ D(0);
829
829
  function he(t) {
830
830
  const e = E(t);
831
831
  return !Ft() || !e.visualViewport ? en : {
@@ -836,19 +836,19 @@ function he(t) {
836
836
  function nn(t, e, n) {
837
837
  return e === void 0 && (e = !1), !n || e && n !== E(t) ? !1 : e;
838
838
  }
839
- function q(t, e, n, o) {
839
+ function K(t, e, n, o) {
840
840
  e === void 0 && (e = !1), n === void 0 && (n = !1);
841
841
  const s = t.getBoundingClientRect(), i = Mt(t);
842
- let r = P(1);
843
- e && (o ? T(o) && (r = X(o)) : r = X(t));
844
- const c = nn(i, n, o) ? he(i) : P(0);
842
+ let r = D(1);
843
+ e && (o ? k(o) && (r = J(o)) : r = J(t));
844
+ const c = nn(i, n, o) ? he(i) : D(0);
845
845
  let l = (s.left + c.x) / r.x, a = (s.top + c.y) / r.y, h = s.width / r.x, f = s.height / r.y;
846
846
  if (i) {
847
- const m = E(i), u = o && T(o) ? E(o) : o;
847
+ const m = E(i), u = o && k(o) ? E(o) : o;
848
848
  let d = m, g = Tt(d);
849
849
  for (; g && o && u !== d; ) {
850
- const w = X(g), p = g.getBoundingClientRect(), y = k(g), x = p.left + (g.clientLeft + parseFloat(y.paddingLeft)) * w.x, b = p.top + (g.clientTop + parseFloat(y.paddingTop)) * w.y;
851
- l *= w.x, a *= w.y, h *= w.x, f *= w.y, l += x, a += b, d = E(g), g = Tt(d);
850
+ const p = J(g), y = g.getBoundingClientRect(), w = C(g), x = y.left + (g.clientLeft + parseFloat(w.paddingLeft)) * p.x, b = y.top + (g.clientTop + parseFloat(w.paddingTop)) * p.y;
851
+ l *= p.x, a *= p.y, h *= p.x, f *= p.y, l += x, a += b, d = E(g), g = Tt(d);
852
852
  }
853
853
  }
854
854
  return mt({
@@ -860,7 +860,7 @@ function q(t, e, n, o) {
860
860
  }
861
861
  function Vt(t, e) {
862
862
  const n = xt(t).scrollLeft;
863
- return e ? e.left + n : q(W(t)).left + n;
863
+ return e ? e.left + n : K(F(t)).left + n;
864
864
  }
865
865
  function de(t, e, n) {
866
866
  n === void 0 && (n = !1);
@@ -880,19 +880,19 @@ function on(t) {
880
880
  offsetParent: o,
881
881
  strategy: s
882
882
  } = t;
883
- const i = s === "fixed", r = W(o), c = e ? yt(e.floating) : !1;
883
+ const i = s === "fixed", r = F(o), c = e ? wt(e.floating) : !1;
884
884
  if (o === r || c && i)
885
885
  return n;
886
886
  let l = {
887
887
  scrollLeft: 0,
888
888
  scrollTop: 0
889
- }, a = P(1);
890
- const h = P(0), f = D(o);
891
- if ((f || !f && !i) && ((Q(o) !== "body" || lt(r)) && (l = xt(o)), D(o))) {
892
- const u = q(o);
893
- a = X(o), h.x = u.x + o.clientLeft, h.y = u.y + o.clientTop;
889
+ }, a = D(1);
890
+ const h = D(0), f = W(o);
891
+ if ((f || !f && !i) && ((tt(o) !== "body" || lt(r)) && (l = xt(o)), W(o))) {
892
+ const u = K(o);
893
+ a = J(o), h.x = u.x + o.clientLeft, h.y = u.y + o.clientTop;
894
894
  }
895
- const m = r && !f && !i ? de(r, l, !0) : P(0);
895
+ const m = r && !f && !i ? de(r, l, !0) : D(0);
896
896
  return {
897
897
  width: n.width * a.x,
898
898
  height: n.height * a.y,
@@ -904,10 +904,10 @@ function sn(t) {
904
904
  return Array.from(t.getClientRects());
905
905
  }
906
906
  function rn(t) {
907
- const e = W(t), n = xt(t), o = t.ownerDocument.body, s = I(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = I(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
907
+ const e = F(t), n = xt(t), o = t.ownerDocument.body, s = q(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = q(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
908
908
  let r = -n.scrollLeft + Vt(t);
909
909
  const c = -n.scrollTop;
910
- return k(o).direction === "rtl" && (r += I(e.clientWidth, o.clientWidth) - s), {
910
+ return C(o).direction === "rtl" && (r += q(e.clientWidth, o.clientWidth) - s), {
911
911
  width: s,
912
912
  height: i,
913
913
  x: r,
@@ -915,7 +915,7 @@ function rn(t) {
915
915
  };
916
916
  }
917
917
  function cn(t, e) {
918
- const n = E(t), o = W(t), s = n.visualViewport;
918
+ const n = E(t), o = F(t), s = n.visualViewport;
919
919
  let i = o.clientWidth, r = o.clientHeight, c = 0, l = 0;
920
920
  if (s) {
921
921
  i = s.width, r = s.height;
@@ -930,7 +930,7 @@ function cn(t, e) {
930
930
  };
931
931
  }
932
932
  function ln(t, e) {
933
- const n = q(t, !0, e === "fixed"), o = n.top + t.clientTop, s = n.left + t.clientLeft, i = D(t) ? X(t) : P(1), r = t.clientWidth * i.x, c = t.clientHeight * i.y, l = s * i.x, a = o * i.y;
933
+ const n = K(t, !0, e === "fixed"), o = n.top + t.clientTop, s = n.left + t.clientLeft, i = W(t) ? J(t) : D(1), r = t.clientWidth * i.x, c = t.clientHeight * i.y, l = s * i.x, a = o * i.y;
934
934
  return {
935
935
  width: r,
936
936
  height: c,
@@ -938,13 +938,13 @@ function ln(t, e) {
938
938
  y: a
939
939
  };
940
940
  }
941
- function Ht(t, e, n) {
941
+ function Bt(t, e, n) {
942
942
  let o;
943
943
  if (e === "viewport")
944
944
  o = cn(t, n);
945
945
  else if (e === "document")
946
- o = rn(W(t));
947
- else if (T(e))
946
+ o = rn(F(t));
947
+ else if (k(e))
948
948
  o = ln(e, n);
949
949
  else {
950
950
  const s = he(t);
@@ -958,19 +958,19 @@ function Ht(t, e, n) {
958
958
  return mt(o);
959
959
  }
960
960
  function me(t, e) {
961
- const n = B(t);
962
- return n === e || !T(n) || G(n) ? !1 : k(n).position === "fixed" || me(n, e);
961
+ const n = z(t);
962
+ return n === e || !k(n) || Z(n) ? !1 : C(n).position === "fixed" || me(n, e);
963
963
  }
964
964
  function an(t, e) {
965
965
  const n = e.get(t);
966
966
  if (n)
967
967
  return n;
968
- let o = ot(t, [], !1).filter((c) => T(c) && Q(c) !== "body"), s = null;
969
- const i = k(t).position === "fixed";
970
- let r = i ? B(t) : t;
971
- for (; T(r) && !G(r); ) {
972
- const c = k(r), l = Wt(r);
973
- !l && c.position === "fixed" && (s = null), (i ? !l && !s : !l && c.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || lt(r) && !l && me(t, r)) ? o = o.filter((h) => h !== r) : s = c, r = B(r);
968
+ let o = ot(t, [], !1).filter((c) => k(c) && tt(c) !== "body"), s = null;
969
+ const i = C(t).position === "fixed";
970
+ let r = i ? z(t) : t;
971
+ for (; k(r) && !Z(r); ) {
972
+ const c = C(r), l = Wt(r);
973
+ !l && c.position === "fixed" && (s = null), (i ? !l && !s : !l && c.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || lt(r) && !l && me(t, r)) ? o = o.filter((h) => h !== r) : s = c, r = z(r);
974
974
  }
975
975
  return e.set(t, o), o;
976
976
  }
@@ -981,10 +981,10 @@ function un(t) {
981
981
  rootBoundary: o,
982
982
  strategy: s
983
983
  } = t;
984
- const r = [...n === "clippingAncestors" ? yt(e) ? [] : an(e, this._c) : [].concat(n), o], c = r[0], l = r.reduce((a, h) => {
985
- const f = Ht(e, h, s);
986
- return a.top = I(f.top, a.top), a.right = J(f.right, a.right), a.bottom = J(f.bottom, a.bottom), a.left = I(f.left, a.left), a;
987
- }, Ht(e, c, s));
984
+ const r = [...n === "clippingAncestors" ? wt(e) ? [] : an(e, this._c) : [].concat(n), o], c = r[0], l = r.reduce((a, h) => {
985
+ const f = Bt(e, h, s);
986
+ return a.top = q(f.top, a.top), a.right = Q(f.right, a.right), a.bottom = Q(f.bottom, a.bottom), a.left = q(f.left, a.left), a;
987
+ }, Bt(e, c, s));
988
988
  return {
989
989
  width: l.right - l.left,
990
990
  height: l.bottom - l.top,
@@ -1003,22 +1003,22 @@ function fn(t) {
1003
1003
  };
1004
1004
  }
1005
1005
  function hn(t, e, n) {
1006
- const o = D(e), s = W(e), i = n === "fixed", r = q(t, !0, i, e);
1006
+ const o = W(e), s = F(e), i = n === "fixed", r = K(t, !0, i, e);
1007
1007
  let c = {
1008
1008
  scrollLeft: 0,
1009
1009
  scrollTop: 0
1010
1010
  };
1011
- const l = P(0);
1011
+ const l = D(0);
1012
1012
  function a() {
1013
1013
  l.x = Vt(s);
1014
1014
  }
1015
1015
  if (o || !o && !i)
1016
- if ((Q(e) !== "body" || lt(s)) && (c = xt(e)), o) {
1017
- const u = q(e, !0, i, e);
1016
+ if ((tt(e) !== "body" || lt(s)) && (c = xt(e)), o) {
1017
+ const u = K(e, !0, i, e);
1018
1018
  l.x = u.x + e.clientLeft, l.y = u.y + e.clientTop;
1019
1019
  } else s && a();
1020
1020
  i && !o && s && a();
1021
- const h = s && !o && !i ? de(s, c) : P(0), f = r.left + c.scrollLeft - l.x - h.x, m = r.top + c.scrollTop - l.y - h.y;
1021
+ const h = s && !o && !i ? de(s, c) : D(0), f = r.left + c.scrollLeft - l.x - h.x, m = r.top + c.scrollTop - l.y - h.y;
1022
1022
  return {
1023
1023
  x: f,
1024
1024
  y: m,
@@ -1027,36 +1027,36 @@ function hn(t, e, n) {
1027
1027
  };
1028
1028
  }
1029
1029
  function At(t) {
1030
- return k(t).position === "static";
1030
+ return C(t).position === "static";
1031
1031
  }
1032
1032
  function Ut(t, e) {
1033
- if (!D(t) || k(t).position === "fixed")
1033
+ if (!W(t) || C(t).position === "fixed")
1034
1034
  return null;
1035
1035
  if (e)
1036
1036
  return e(t);
1037
1037
  let n = t.offsetParent;
1038
- return W(t) === n && (n = n.ownerDocument.body), n;
1038
+ return F(t) === n && (n = n.ownerDocument.body), n;
1039
1039
  }
1040
- function pe(t, e) {
1040
+ function ge(t, e) {
1041
1041
  const n = E(t);
1042
- if (yt(t))
1042
+ if (wt(t))
1043
1043
  return n;
1044
- if (!D(t)) {
1045
- let s = B(t);
1046
- for (; s && !G(s); ) {
1047
- if (T(s) && !At(s))
1044
+ if (!W(t)) {
1045
+ let s = z(t);
1046
+ for (; s && !Z(s); ) {
1047
+ if (k(s) && !At(s))
1048
1048
  return s;
1049
- s = B(s);
1049
+ s = z(s);
1050
1050
  }
1051
1051
  return n;
1052
1052
  }
1053
1053
  let o = Ut(t, e);
1054
1054
  for (; o && Ze(o) && At(o); )
1055
1055
  o = Ut(o, e);
1056
- return o && G(o) && At(o) && !Wt(o) ? n : o || tn(t) || n;
1056
+ return o && Z(o) && At(o) && !Wt(o) ? n : o || tn(t) || n;
1057
1057
  }
1058
1058
  const dn = async function(t) {
1059
- const e = this.getOffsetParent || pe, n = this.getDimensions, o = await n(t.floating);
1059
+ const e = this.getOffsetParent || ge, n = this.getDimensions, o = await n(t.floating);
1060
1060
  return {
1061
1061
  reference: hn(t.reference, await e(t.floating), t.strategy),
1062
1062
  floating: {
@@ -1068,26 +1068,26 @@ const dn = async function(t) {
1068
1068
  };
1069
1069
  };
1070
1070
  function mn(t) {
1071
- return k(t).direction === "rtl";
1071
+ return C(t).direction === "rtl";
1072
1072
  }
1073
- const pn = {
1073
+ const gn = {
1074
1074
  convertOffsetParentRelativeRectToViewportRelativeRect: on,
1075
- getDocumentElement: W,
1075
+ getDocumentElement: F,
1076
1076
  getClippingRect: un,
1077
- getOffsetParent: pe,
1077
+ getOffsetParent: ge,
1078
1078
  getElementRects: dn,
1079
1079
  getClientRects: sn,
1080
1080
  getDimensions: fn,
1081
- getScale: X,
1082
- isElement: T,
1081
+ getScale: J,
1082
+ isElement: k,
1083
1083
  isRTL: mn
1084
1084
  };
1085
- function ge(t, e) {
1085
+ function pe(t, e) {
1086
1086
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1087
1087
  }
1088
- function gn(t, e) {
1088
+ function pn(t, e) {
1089
1089
  let n = null, o;
1090
- const s = W(t);
1090
+ const s = F(t);
1091
1091
  function i() {
1092
1092
  var c;
1093
1093
  clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
@@ -1102,9 +1102,9 @@ function gn(t, e) {
1102
1102
  } = a;
1103
1103
  if (c || e(), !m || !u)
1104
1104
  return;
1105
- const d = ut(f), g = ut(s.clientWidth - (h + m)), w = ut(s.clientHeight - (f + u)), p = ut(h), x = {
1106
- rootMargin: -d + "px " + -g + "px " + -w + "px " + -p + "px",
1107
- threshold: I(0, J(1, l)) || 1
1105
+ const d = ut(f), g = ut(s.clientWidth - (h + m)), p = ut(s.clientHeight - (f + u)), y = ut(h), x = {
1106
+ rootMargin: -d + "px " + -g + "px " + -p + "px " + -y + "px",
1107
+ threshold: q(0, Q(1, l)) || 1
1108
1108
  };
1109
1109
  let b = !0;
1110
1110
  function v(L) {
@@ -1116,7 +1116,7 @@ function gn(t, e) {
1116
1116
  r(!1, 1e-7);
1117
1117
  }, 1e3);
1118
1118
  }
1119
- A === 1 && !ge(a, t.getBoundingClientRect()) && r(), b = !1;
1119
+ A === 1 && !pe(a, t.getBoundingClientRect()) && r(), b = !1;
1120
1120
  }
1121
1121
  try {
1122
1122
  n = new IntersectionObserver(v, {
@@ -1131,7 +1131,7 @@ function gn(t, e) {
1131
1131
  }
1132
1132
  return r(!0), i;
1133
1133
  }
1134
- function wn(t, e, n, o) {
1134
+ function yn(t, e, n, o) {
1135
1135
  o === void 0 && (o = {});
1136
1136
  const {
1137
1137
  ancestorScroll: s = !0,
@@ -1140,36 +1140,36 @@ function wn(t, e, n, o) {
1140
1140
  layoutShift: c = typeof IntersectionObserver == "function",
1141
1141
  animationFrame: l = !1
1142
1142
  } = o, a = Mt(t), h = s || i ? [...a ? ot(a) : [], ...ot(e)] : [];
1143
- h.forEach((p) => {
1144
- s && p.addEventListener("scroll", n, {
1143
+ h.forEach((y) => {
1144
+ s && y.addEventListener("scroll", n, {
1145
1145
  passive: !0
1146
- }), i && p.addEventListener("resize", n);
1146
+ }), i && y.addEventListener("resize", n);
1147
1147
  });
1148
- const f = a && c ? gn(a, n) : null;
1148
+ const f = a && c ? pn(a, n) : null;
1149
1149
  let m = -1, u = null;
1150
- r && (u = new ResizeObserver((p) => {
1151
- let [y] = p;
1152
- y && y.target === a && u && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1150
+ r && (u = new ResizeObserver((y) => {
1151
+ let [w] = y;
1152
+ w && w.target === a && u && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1153
1153
  var x;
1154
1154
  (x = u) == null || x.observe(e);
1155
1155
  })), n();
1156
1156
  }), a && !l && u.observe(a), u.observe(e));
1157
- let d, g = l ? q(t) : null;
1158
- l && w();
1159
- function w() {
1160
- const p = q(t);
1161
- g && !ge(g, p) && n(), g = p, d = requestAnimationFrame(w);
1157
+ let d, g = l ? K(t) : null;
1158
+ l && p();
1159
+ function p() {
1160
+ const y = K(t);
1161
+ g && !pe(g, y) && n(), g = y, d = requestAnimationFrame(p);
1162
1162
  }
1163
1163
  return n(), () => {
1164
- var p;
1165
- h.forEach((y) => {
1166
- s && y.removeEventListener("scroll", n), i && y.removeEventListener("resize", n);
1167
- }), f == null || f(), (p = u) == null || p.disconnect(), u = null, l && cancelAnimationFrame(d);
1164
+ var y;
1165
+ h.forEach((w) => {
1166
+ s && w.removeEventListener("scroll", n), i && w.removeEventListener("resize", n);
1167
+ }), f == null || f(), (y = u) == null || y.disconnect(), u = null, l && cancelAnimationFrame(d);
1168
1168
  };
1169
1169
  }
1170
- const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, n) => {
1170
+ const wn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, n) => {
1171
1171
  const o = /* @__PURE__ */ new Map(), s = {
1172
- platform: pn,
1172
+ platform: gn,
1173
1173
  ...n
1174
1174
  }, i = {
1175
1175
  ...s.platform,
@@ -1179,65 +1179,88 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, n) => {
1179
1179
  ...s,
1180
1180
  platform: i
1181
1181
  });
1182
- }, In = ({
1182
+ }, jn = ({
1183
1183
  content: t,
1184
1184
  open: e,
1185
1185
  placement: n,
1186
1186
  offset: o = { mainAxis: 0, crossAxis: 0 },
1187
1187
  arrow: s
1188
1188
  }) => ee((i) => {
1189
- const r = C.toSignal(e), c = i.element, l = C.toSignal(o), a = l.$.mainAxis.map((m) => m ?? 0), h = l.$.crossAxis.map((m) => m ?? 0), f = C.toSignal(n ?? "top");
1189
+ const r = P.toSignal(e), c = i.element, l = P.toSignal(o), a = l.$.mainAxis.map((u) => u ?? 0), h = l.$.crossAxis.map((u) => u ?? 0), f = P.toSignal(n ?? "top"), m = $({
1190
+ centerOffset: 0,
1191
+ alignmentOffset: 0,
1192
+ containerWidth: 0,
1193
+ containerHeight: 0,
1194
+ placement: "top",
1195
+ x: 0,
1196
+ y: void 0
1197
+ });
1190
1198
  return te(
1191
1199
  r,
1192
1200
  () => Zt(
1193
1201
  "body",
1194
1202
  Rt.div(
1195
- K((m) => {
1196
- const u = m;
1197
- u.style.position = "absolute";
1198
- let d = null;
1199
- async function g() {
1200
- const p = [
1203
+ G((u) => {
1204
+ var w;
1205
+ const d = u;
1206
+ d.style.position = "absolute";
1207
+ let g = null;
1208
+ async function p() {
1209
+ const x = [
1201
1210
  zt(),
1202
- yn({
1211
+ wn({
1203
1212
  mainAxis: a.get(),
1204
1213
  crossAxis: h.get()
1205
1214
  }),
1206
1215
  xn(),
1207
1216
  zt()
1208
1217
  ];
1209
- s != null && d != null && p.push(
1218
+ s != null && g != null && x.push(
1210
1219
  vn({
1211
- element: d,
1220
+ element: g,
1212
1221
  padding: (s == null ? void 0 : s.padding) ?? 0
1213
1222
  })
1214
1223
  );
1215
- const y = await bn(c, u, {
1224
+ const b = await bn(c, d, {
1216
1225
  placement: f.get(),
1217
1226
  strategy: "absolute",
1218
- middleware: p
1219
- }), { x, y: b, middlewareData: v } = y;
1220
- if (u.style.top = `${b}px`, u.style.left = `${x}px`, d && v.arrow) {
1221
- const { x: L, y: A } = v.arrow;
1222
- Object.assign(d.style, {
1223
- left: L != null ? `${L}px` : "",
1224
- top: A != null ? `${A}px` : ""
1225
- });
1227
+ middleware: x
1228
+ }), { x: v, y: L, middlewareData: A } = b;
1229
+ if (d.style.top = `${L}px`, d.style.left = `${v}px`, g && A.arrow) {
1230
+ const {
1231
+ x: I,
1232
+ y: M,
1233
+ centerOffset: O,
1234
+ alignmentOffset: j
1235
+ } = A.arrow, V = {
1236
+ x: I,
1237
+ y: M,
1238
+ centerOffset: O,
1239
+ alignmentOffset: j,
1240
+ placement: f.get(),
1241
+ containerWidth: d.offsetWidth,
1242
+ containerHeight: d.offsetHeight
1243
+ };
1244
+ m.set(V);
1226
1245
  }
1227
1246
  }
1228
- const w = ve(
1247
+ const y = ve(
1229
1248
  a,
1230
1249
  h,
1231
1250
  f
1232
- )(g);
1233
- return gt(
1251
+ )(p);
1252
+ return pt(
1234
1253
  s != null ? Rt.div(
1235
- s.content,
1236
- K((p) => {
1237
- d = p, g();
1254
+ (w = s.content) == null ? void 0 : w.call(s, m),
1255
+ G((x) => {
1256
+ g = x, p();
1238
1257
  })
1239
1258
  ) : null,
1240
- U(wn(c, u, g), w)
1259
+ _(
1260
+ m.dispose,
1261
+ yn(c, d, p),
1262
+ y
1263
+ )
1241
1264
  );
1242
1265
  }),
1243
1266
  t()
@@ -1245,26 +1268,26 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, n) => {
1245
1268
  )
1246
1269
  );
1247
1270
  }), An = (t, e, n) => {
1248
- const o = H($.notAsked), s = o.map(
1249
- (f) => $.isSuccess(f) ? f.value : void 0
1271
+ const o = $(B.notAsked), s = o.map(
1272
+ (f) => B.isSuccess(f) ? f.value : void 0
1250
1273
  ), i = o.map(
1251
- (f) => $.isFailure(f) ? f.error : void 0
1252
- ), r = o.map((f) => $.isLoading(f));
1274
+ (f) => B.isFailure(f) ? f.error : void 0
1275
+ ), r = o.map((f) => B.isLoading(f));
1253
1276
  let c;
1254
1277
  const l = async (f) => {
1255
1278
  c == null || c.abort(), c = new AbortController();
1256
1279
  const m = c.signal, u = o.get();
1257
- o.set($.loading($.getOrUndefined(u)));
1280
+ o.set(B.loading(B.getOrUndefined(u)));
1258
1281
  try {
1259
1282
  const d = await e({ request: f, abortSignal: m, previous: u });
1260
- await Promise.resolve(), c = void 0, o.set($.success(d));
1283
+ await Promise.resolve(), c = void 0, o.set(B.success(d));
1261
1284
  } catch (d) {
1262
- c = void 0, o.set($.failure(n(d)));
1285
+ c = void 0, o.set(B.failure(n(d)));
1263
1286
  }
1264
- }, a = () => l(C.get(t)), h = () => {
1287
+ }, a = () => l(P.get(t)), h = () => {
1265
1288
  c == null || c.abort(), c = void 0, o.dispose();
1266
1289
  };
1267
- return o.onDispose(C.on(t, l)), {
1290
+ return o.onDispose(P.on(t, l)), {
1268
1291
  status: o,
1269
1292
  value: s,
1270
1293
  error: i,
@@ -1274,8 +1297,8 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, n) => {
1274
1297
  };
1275
1298
  }, Rn = (t, e) => {
1276
1299
  const { status: n, dispose: o, reload: s } = t, { loading: i, failure: r, success: c } = e;
1277
- return gt(
1278
- U(o),
1300
+ return pt(
1301
+ _(o),
1279
1302
  ie(n, {
1280
1303
  loading: i != null ? (l) => i(l, s) : void 0,
1281
1304
  failure: r != null ? (l) => r(l, s) : void 0,
@@ -1292,11 +1315,11 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, n) => {
1292
1315
  }, En = (t, e) => {
1293
1316
  if (typeof e == "function")
1294
1317
  return En(t, { success: e });
1295
- const n = e.failure ?? ((s) => gt(
1296
- U(s.on(console.error)),
1318
+ const n = e.failure ?? ((s) => pt(
1319
+ _(s.on(console.error)),
1297
1320
  s.map((i) => `Error: ${i}`)
1298
1321
  )), o = e.success;
1299
- return Qt(C.toSignal(t), {
1322
+ return Qt(P.toSignal(t), {
1300
1323
  Success: (s) => o(s.$.value),
1301
1324
  Failure: (s) => n(s.$.error)
1302
1325
  });
@@ -1453,15 +1476,15 @@ function _t(t) {
1453
1476
  });
1454
1477
  }
1455
1478
  const Ln = (t) => ee((e) => {
1456
- const { element: n } = e, o = H(_t(n)), s = Ct(t(o))(e), i = () => {
1479
+ const { element: n } = e, o = $(_t(n)), s = Ct(t(o))(e), i = () => {
1457
1480
  o.set(vt.of(_t(n)));
1458
1481
  };
1459
1482
  let r;
1460
- return typeof ResizeObserver == "function" && (r = new ResizeObserver(i), r.observe(n)), U((c) => {
1483
+ return typeof ResizeObserver == "function" && (r = new ResizeObserver(i), r.observe(n)), _((c) => {
1461
1484
  r == null || r.disconnect(), s(c);
1462
1485
  });
1463
1486
  }), Xn = (t) => Ln(t), Kn = (t) => (e) => {
1464
- const n = it(), o = H({
1487
+ const n = it(), o = $({
1465
1488
  width: (n == null ? void 0 : n.innerWidth) ?? 0,
1466
1489
  height: (n == null ? void 0 : n.innerHeight) ?? 0
1467
1490
  }), s = Ct(t(o))(e), i = () => {
@@ -1522,10 +1545,10 @@ const Ln = (t) => ee((e) => {
1522
1545
  t
1523
1546
  );
1524
1547
  });
1525
- }, pt = 60 * 1e3, kt = 60 * pt, st = 24 * kt, jt = 7 * st, It = 30 * st, kn = 365 * st, Cn = [
1548
+ }, gt = 60 * 1e3, kt = 60 * gt, st = 24 * kt, It = 7 * st, jt = 30 * st, kn = 365 * st, Cn = [
1526
1549
  {
1527
- max: pt * 90,
1528
- value: pt,
1550
+ max: gt * 90,
1551
+ value: gt,
1529
1552
  name: "minute",
1530
1553
  past: { singular: "a minute ago", plural: "{} minutes ago" },
1531
1554
  future: { singular: "in a minute", plural: "in {} minutes" }
@@ -1545,15 +1568,15 @@ const Ln = (t) => ee((e) => {
1545
1568
  future: { singular: "tomorrow", plural: "in {} days" }
1546
1569
  },
1547
1570
  {
1548
- max: jt * 6,
1549
- value: jt,
1571
+ max: It * 6,
1572
+ value: It,
1550
1573
  name: "week",
1551
1574
  past: { singular: "last week", plural: "{} weeks ago" },
1552
1575
  future: { singular: "in a week", plural: "in {} weeks" }
1553
1576
  },
1554
1577
  {
1555
- max: It * 18,
1556
- value: It,
1578
+ max: jt * 18,
1579
+ value: jt,
1557
1580
  name: "month",
1558
1581
  past: { singular: "last month", plural: "{} months ago" },
1559
1582
  future: { singular: "in a month", plural: "in {} months" }
@@ -1577,22 +1600,22 @@ function Yt(t, e, n, o) {
1577
1600
  );
1578
1601
  }
1579
1602
  const Pn = (t = 1e3) => {
1580
- const e = H(/* @__PURE__ */ new Date()), n = Ee(() => e.set(/* @__PURE__ */ new Date()), t);
1603
+ const e = $(/* @__PURE__ */ new Date()), n = Ee(() => e.set(/* @__PURE__ */ new Date()), t);
1581
1604
  return e.onDispose(n), e;
1582
1605
  }, Dn = (t) => {
1583
1606
  const e = Math.abs(t);
1584
- if (e < pt)
1607
+ if (e < gt)
1585
1608
  return t < 0 ? "just now" : "in a moment";
1586
1609
  for (const n of Cn)
1587
1610
  if (e < n.max)
1588
1611
  return t < 0 ? Yt(e, n.value, n.past.singular, n.past.plural) : Yt(e, n.value, n.future.singular, n.future.plural);
1589
1612
  throw new Error("unreachable");
1590
1613
  }, Wn = (t, { now: e, frequency: n = 1e4 } = {}) => {
1591
- const o = e != null ? Xt.is(e) ? e.derive() : H(e) : Pn(n), s = Ae(
1614
+ const o = e != null ? Xt.is(e) ? e.derive() : $(e) : Pn(n), s = Ae(
1592
1615
  t,
1593
1616
  o
1594
1617
  )((i, r) => i.getTime() - r.getTime());
1595
- return s.onDispose(() => C.dispose(o)), s;
1618
+ return s.onDispose(() => P.dispose(o)), s;
1596
1619
  }, Fn = (t, e = {}) => {
1597
1620
  const n = Wn(t, e), o = n.map(Dn);
1598
1621
  return o.onDispose(n.dispose), o;
@@ -1610,17 +1633,17 @@ class Mn extends Re {
1610
1633
  const Qn = (t = 0) => new Mn(t, (e, n) => e === n);
1611
1634
  export {
1612
1635
  Me as Anchor,
1613
- Bn as Appearance,
1636
+ Hn as Appearance,
1614
1637
  ie as AsyncResultView,
1615
- Hn as AutoFocus,
1638
+ Bn as AutoFocus,
1616
1639
  Un as AutoSelect,
1617
1640
  Ln as ElementRect,
1618
1641
  Xn as ElementSize,
1619
1642
  _n as HTMLTitle,
1620
1643
  zn as HiddenWhenEmpty,
1621
- Be as InViewport,
1644
+ He as InViewport,
1622
1645
  se as Location,
1623
- In as PopOver,
1646
+ jn as PopOver,
1624
1647
  vt as Rect,
1625
1648
  Yn as Resource,
1626
1649
  Rn as ResourceDisplay,
@@ -1628,7 +1651,7 @@ export {
1628
1651
  Jn as Router,
1629
1652
  qn as SelectOnFocus,
1630
1653
  Mn as Ticker,
1631
- jn as WhenInViewport,
1654
+ In as WhenInViewport,
1632
1655
  Kn as WindowSize,
1633
1656
  Oe as _checkExtensionCondition,
1634
1657
  Le as _getExtension,
@@ -1644,7 +1667,7 @@ export {
1644
1667
  Gn as relativeTime,
1645
1668
  Wn as relativeTimeMillisSignal,
1646
1669
  Fn as relativeTimeSignal,
1647
- $t as setLocationFromUrl,
1670
+ Nt as setLocationFromUrl,
1648
1671
  Qn as ticker,
1649
1672
  Dn as timeDiffToString,
1650
1673
  Lt as urlFromLocation,