@tempots/ui 0.23.0-next.1 → 0.23.0-next.11

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 +313 -288
  3. package/package.json +2 -2
package/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { makeProviderMark as Mt, Fragment as X, OnBrowserCtx as pt, Async as Ot, OnHeadlessCtx as ie, UseProvider as Nt, makeProp as W, renderableOfTNode as rt, getWindow as gt, Signal as Vt, html as $t, on as Ht, Value as it, attr as zt, WithProvider as se, OnDispose as yt, Empty as ht, OneOfType as Bt, makeSignal as ce, OnElement as q, Portal as Ut, When as It, OneOfTuple as le, makeComputedOf as ae, Prop as ue } from "@tempots/dom";
2
- const fe = (t) => {
1
+ import { makeProviderMark as $t, Fragment as X, OnBrowserCtx as wt, Async as St, OnHeadlessCtx as ce, UseProvider as Ht, makeProp as W, renderableOfTNode as rt, getWindow as xt, Signal as zt, html as Bt, on as Ut, Value as it, attr as It, WithProvider as le, OnDispose as vt, Empty as dt, OneOfType as _t, makeSignal as ae, OnElement as q, Portal as jt, When as Yt, OneOfTuple as ue, makeComputedOf as fe, Prop as he } from "@tempots/dom";
2
+ const de = (t) => {
3
3
  const e = t.split("/").pop();
4
4
  if (e == null || e.startsWith(".")) return;
5
5
  const n = e.split(".") || [];
6
6
  return n.length > 1 ? "." + n.pop() : void 0;
7
- }, he = (t, e) => {
8
- const n = fe(e);
7
+ }, me = (t, e) => {
8
+ const n = de(e);
9
9
  return n != null && (t.length === 0 || !t.some((o) => n == o));
10
- }, me = (t, e, n, o) => {
10
+ }, pe = (t, e, n, o) => {
11
11
  let r = t.target;
12
12
  for (; r != null && !(r instanceof HTMLAnchorElement); )
13
13
  r = r.parentElement;
@@ -22,8 +22,8 @@ const fe = (t) => {
22
22
  if (!(u != null && u.startsWith("#")) && u !== l)
23
23
  return !0;
24
24
  }
25
- return e ? !1 : he(n, s);
26
- }, de = (t, e = {
25
+ return e ? !1 : me(n, s);
26
+ }, ge = (t, e = {
27
27
  ignoreUrlWithExtension: !0,
28
28
  allowedExtensions: [],
29
29
  ignoreExternalUrl: !0
@@ -32,92 +32,92 @@ const fe = (t) => {
32
32
  (o) => o.startsWith(".") ? o : "." + o
33
33
  ) : [];
34
34
  return (o) => {
35
- me(
35
+ pe(
36
36
  o,
37
37
  e.ignoreUrlWithExtension ?? !0,
38
38
  n,
39
39
  e.ignoreExternalUrl ?? !0
40
40
  ) || t() && o.preventDefault();
41
41
  };
42
- }, pe = Mt("LocationProvider"), hn = (t) => X(
43
- pt((e) => Ot(
42
+ }, ye = $t("LocationProvider"), mn = (t) => X(
43
+ wt((e) => St(
44
44
  import("./browser-location-12vUH3Kv.js").then((n) => n.ProvideBrowserLocation),
45
45
  (n) => n(t)
46
46
  )(e)),
47
- ie((e) => Ot(
47
+ ce((e) => St(
48
48
  import("./headless-location-Ba_ht5ZQ.js").then((n) => n.ProvideHeadlessLocation),
49
49
  (n) => n(e.container.currentURL, t)
50
50
  )(e))
51
- ), _t = (t) => Nt(pe, (e) => (n) => {
51
+ ), Xt = (t) => Ht(ye, (e) => (n) => {
52
52
  const o = W(e.value, e.equals);
53
53
  e.feedProp(o), o.on(e.set);
54
54
  const r = rt(t(o))(n);
55
55
  return (i) => {
56
56
  o.dispose(), r(i);
57
57
  };
58
- }), mn = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, ge = (t, e) => {
58
+ }), pn = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, we = (t, e) => {
59
59
  var i;
60
- const n = new URL(t, e ?? ((i = gt()) == null ? void 0 : i.location.toString())), o = Object.fromEntries(n.searchParams.entries());
60
+ const n = new URL(t, e ?? ((i = xt()) == null ? void 0 : i.location.toString())), o = Object.fromEntries(n.searchParams.entries());
61
61
  let r = n.hash;
62
62
  return r.startsWith("#") && (r = r.substring(1)), {
63
63
  pathname: n.pathname,
64
64
  search: o,
65
65
  hash: r === "" ? void 0 : r
66
66
  };
67
- }, ye = (t, e) => {
68
- const n = ge(e);
67
+ }, xe = (t, e) => {
68
+ const n = we(e);
69
69
  return t.set(n), t;
70
- }, dn = (t) => {
70
+ }, gn = (t) => {
71
71
  const n = new URLSearchParams(t.search).toString(), o = t.hash;
72
72
  return `${t.pathname}${n ? `?${n}` : ""}${o ? `#${o}` : ""}`;
73
- }, we = (t, ...e) => {
74
- if (typeof t == "string" || Vt.is(t))
75
- return we({ href: t }, ...e);
73
+ }, ve = (t, ...e) => {
74
+ if (typeof t == "string" || zt.is(t))
75
+ return ve({ href: t }, ...e);
76
76
  const { href: n, ...o } = t;
77
- return _t((r) => $t.a(
78
- Ht.click(
79
- de(() => (ye(r, it.get(n)), !0), o)
77
+ return Xt((r) => Bt.a(
78
+ Ut.click(
79
+ ge(() => (xe(r, it.get(n)), !0), o)
80
80
  ),
81
- zt.href(n),
81
+ It.href(n),
82
82
  ...e
83
83
  ));
84
- }, jt = Mt("Appearance"), pn = (t) => {
85
- const e = gt(), n = e != null && e.matchMedia != null && e.matchMedia("(prefers-color-scheme: dark)").matches, o = W(n ? "dark" : "light"), r = (s) => {
84
+ }, qt = $t("Appearance"), yn = (t) => {
85
+ const e = xt(), n = e != null && e.matchMedia != null && e.matchMedia("(prefers-color-scheme: dark)").matches, o = W(n ? "dark" : "light"), r = (s) => {
86
86
  o.set(s.matches ? "dark" : "light");
87
87
  }, i = e != null && e.matchMedia != null ? e.matchMedia("(prefers-color-scheme: dark)") : void 0;
88
88
  return i == null || i.addEventListener("change", r), X(
89
- se(jt, o, t),
90
- yt(() => i == null ? void 0 : i.removeEventListener("change", r))
89
+ le(qt, o, t),
90
+ vt(() => i == null ? void 0 : i.removeEventListener("change", r))
91
91
  );
92
- }, gn = (t) => Nt(jt, t), xe = (t, e) => {
92
+ }, wn = (t) => Ht(qt, t), be = (t, e) => {
93
93
  if (typeof e == "function")
94
- return xe(t, { success: e });
94
+ return be(t, { success: e });
95
95
  const n = e.failure ?? ((s) => X(
96
- yt(s.on(console.error)),
96
+ vt(s.on(console.error)),
97
97
  s.map((c) => `Error: ${c}`)
98
- )), o = e.success, r = e.loading ?? (() => ht), i = e.notAsked ?? (() => ht);
99
- return Bt(it.toSignal(t), {
98
+ )), o = e.success, r = e.loading ?? (() => dt), i = e.notAsked ?? (() => dt);
99
+ return _t(it.toSignal(t), {
100
100
  AsyncSuccess: (s) => o(s.$.value),
101
101
  AsyncFailure: (s) => n(s.$.error),
102
- Loading: (s) => r(s.$.previousValue ?? ce(void 0)),
102
+ Loading: (s) => r(s.$.previousValue ?? ae(void 0)),
103
103
  NotAsked: i
104
104
  });
105
- }, yn = (t = 10) => q((e) => {
105
+ }, xn = (t = 10) => q((e) => {
106
106
  const n = setTimeout(() => {
107
107
  e == null || e.focus();
108
108
  }, t);
109
109
  return () => clearTimeout(n);
110
- }), wn = (t = 10) => q((e) => {
110
+ }), vn = (t = 10) => q((e) => {
111
111
  const n = setTimeout(() => {
112
112
  e == null || e.select();
113
113
  }, t);
114
114
  return () => clearTimeout(n);
115
- }), xn = q((t) => {
115
+ }), bn = q((t) => {
116
116
  const e = t.style.getPropertyValue(":empty");
117
117
  return t.style.setProperty(":empty", "display:none"), (n) => {
118
118
  n && t.style.setProperty(":empty", e);
119
119
  };
120
- }), vn = (t) => Ut("head > title", zt.innerText(t)), ve = {
120
+ }), An = (t) => jt("head > title", It.innerText(t)), Ae = {
121
121
  partial: {
122
122
  root: null,
123
123
  rootMargin: "0px",
@@ -135,19 +135,19 @@ const fe = (t) => {
135
135
  partial: null,
136
136
  full: null
137
137
  };
138
- function be(t) {
138
+ function Ee(t) {
139
139
  return _[t] == null && (_[t] = new IntersectionObserver((e) => {
140
140
  e.forEach((n) => {
141
141
  const o = Q[t].get(n.target);
142
142
  o == null || o.set(n.isIntersecting);
143
143
  });
144
- }, ve[t])), _[t];
144
+ }, Ae[t])), _[t];
145
145
  }
146
- const Ae = (t, e) => {
146
+ const Re = (t, e) => {
147
147
  const n = W(!1);
148
148
  return X(
149
149
  q((o) => {
150
- const r = typeof IntersectionObserver < "u" ? be(t) : null;
150
+ const r = typeof IntersectionObserver < "u" ? Ee(t) : null;
151
151
  return Q[t].set(o, n), r == null || r.observe(o), () => {
152
152
  var i;
153
153
  n.dispose(), r == null || r.unobserve(o), Q[t].delete(o), Q[t].size === 0 && ((i = _[t]) == null || i.disconnect(), _[t] = null);
@@ -155,19 +155,19 @@ const Ae = (t, e) => {
155
155
  }),
156
156
  rt(e(n))
157
157
  );
158
- }, bn = (t, e, n) => Ae(t, (o) => It(o, e, n ?? ht)), Z = Math.min, D = Math.max, tt = Math.round, G = Math.floor, C = (t) => ({
158
+ }, En = (t, e, n) => Re(t, (o) => Yt(o, e, n ?? dt)), Z = Math.min, D = Math.max, tt = Math.round, G = Math.floor, C = (t) => ({
159
159
  x: t,
160
160
  y: t
161
- }), Ee = {
161
+ }), Oe = {
162
162
  left: "right",
163
163
  right: "left",
164
164
  bottom: "top",
165
165
  top: "bottom"
166
- }, Re = {
166
+ }, Le = {
167
167
  start: "end",
168
168
  end: "start"
169
169
  };
170
- function Lt(t, e, n) {
170
+ function Ct(t, e, n) {
171
171
  return D(t, Z(e, n));
172
172
  }
173
173
  function st(t, e) {
@@ -179,32 +179,32 @@ function F(t) {
179
179
  function ct(t) {
180
180
  return t.split("-")[1];
181
181
  }
182
- function Yt(t) {
182
+ function Kt(t) {
183
183
  return t === "x" ? "y" : "x";
184
184
  }
185
- function Xt(t) {
185
+ function Jt(t) {
186
186
  return t === "y" ? "height" : "width";
187
187
  }
188
188
  function H(t) {
189
189
  return ["top", "bottom"].includes(F(t)) ? "y" : "x";
190
190
  }
191
- function qt(t) {
192
- return Yt(H(t));
191
+ function Gt(t) {
192
+ return Kt(H(t));
193
193
  }
194
- function Oe(t, e, n) {
194
+ function Te(t, e, n) {
195
195
  n === void 0 && (n = !1);
196
- const o = ct(t), r = qt(t), i = Xt(r);
196
+ const o = ct(t), r = Gt(t), i = Jt(r);
197
197
  let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
198
198
  return e.reference[i] > e.floating[i] && (s = et(s)), [s, et(s)];
199
199
  }
200
- function Le(t) {
200
+ function Se(t) {
201
201
  const e = et(t);
202
202
  return [mt(t), e, mt(e)];
203
203
  }
204
204
  function mt(t) {
205
- return t.replace(/start|end/g, (e) => Re[e]);
205
+ return t.replace(/start|end/g, (e) => Le[e]);
206
206
  }
207
- function Te(t, e, n) {
207
+ function Ce(t, e, n) {
208
208
  const o = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
209
209
  switch (t) {
210
210
  case "top":
@@ -217,15 +217,15 @@ function Te(t, e, n) {
217
217
  return [];
218
218
  }
219
219
  }
220
- function Se(t, e, n, o) {
220
+ function ke(t, e, n, o) {
221
221
  const r = ct(t);
222
- let i = Te(F(t), n === "start", o);
222
+ let i = Ce(F(t), n === "start", o);
223
223
  return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(mt)))), i;
224
224
  }
225
225
  function et(t) {
226
- return t.replace(/left|right|bottom|top/g, (e) => Ee[e]);
226
+ return t.replace(/left|right|bottom|top/g, (e) => Oe[e]);
227
227
  }
228
- function Ce(t) {
228
+ function Pe(t) {
229
229
  return {
230
230
  top: 0,
231
231
  right: 0,
@@ -234,8 +234,8 @@ function Ce(t) {
234
234
  ...t
235
235
  };
236
236
  }
237
- function ke(t) {
238
- return typeof t != "number" ? Ce(t) : {
237
+ function De(t) {
238
+ return typeof t != "number" ? Pe(t) : {
239
239
  top: t,
240
240
  right: t,
241
241
  bottom: t,
@@ -260,12 +260,12 @@ function nt(t) {
260
260
  y: n
261
261
  };
262
262
  }
263
- function Tt(t, e, n) {
263
+ function kt(t, e, n) {
264
264
  let {
265
265
  reference: o,
266
266
  floating: r
267
267
  } = t;
268
- const i = H(e), s = qt(e), c = Xt(s), a = F(e), l = i === "y", u = o.x + o.width / 2 - r.width / 2, f = o.y + o.height / 2 - r.height / 2, d = o[c] / 2 - r[c] / 2;
268
+ const i = H(e), s = Gt(e), c = Jt(s), a = F(e), l = i === "y", u = o.x + o.width / 2 - r.width / 2, f = o.y + o.height / 2 - r.height / 2, d = o[c] / 2 - r[c] / 2;
269
269
  let h;
270
270
  switch (a) {
271
271
  case "top":
@@ -308,7 +308,7 @@ function Tt(t, e, n) {
308
308
  }
309
309
  return h;
310
310
  }
311
- const Pe = async (t, e, n) => {
311
+ const We = async (t, e, n) => {
312
312
  const {
313
313
  placement: o = "bottom",
314
314
  strategy: r = "absolute",
@@ -322,7 +322,7 @@ const Pe = async (t, e, n) => {
322
322
  }), {
323
323
  x: u,
324
324
  y: f
325
- } = Tt(l, o, a), d = o, h = {}, p = 0;
325
+ } = kt(l, o, a), d = o, h = {}, p = 0;
326
326
  for (let g = 0; g < c.length; g++) {
327
327
  const {
328
328
  name: y,
@@ -359,7 +359,7 @@ const Pe = async (t, e, n) => {
359
359
  }) : v.rects), {
360
360
  x: u,
361
361
  y: f
362
- } = Tt(l, d, a)), g = -1);
362
+ } = kt(l, d, a)), g = -1);
363
363
  }
364
364
  return {
365
365
  x: u,
@@ -369,7 +369,7 @@ const Pe = async (t, e, n) => {
369
369
  middlewareData: h
370
370
  };
371
371
  };
372
- async function Kt(t, e) {
372
+ async function Qt(t, e) {
373
373
  var n;
374
374
  e === void 0 && (e = {});
375
375
  const {
@@ -385,7 +385,7 @@ async function Kt(t, e) {
385
385
  elementContext: f = "floating",
386
386
  altBoundary: d = !1,
387
387
  padding: h = 0
388
- } = st(e, t), p = ke(h), y = c[d ? f === "floating" ? "reference" : "floating" : f], m = nt(await i.getClippingRect({
388
+ } = st(e, t), p = De(h), y = c[d ? f === "floating" ? "reference" : "floating" : f], m = nt(await i.getClippingRect({
389
389
  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)),
390
390
  boundary: l,
391
391
  rootBoundary: u,
@@ -414,7 +414,7 @@ async function Kt(t, e) {
414
414
  right: (v.right - m.right + p.right) / b.x
415
415
  };
416
416
  }
417
- const De = function(t) {
417
+ const Fe = function(t) {
418
418
  return t === void 0 && (t = {}), {
419
419
  name: "flip",
420
420
  options: t,
@@ -438,36 +438,36 @@ const De = function(t) {
438
438
  } = st(t, e);
439
439
  if ((n = i.arrow) != null && n.alignmentOffset)
440
440
  return {};
441
- const m = F(r), w = H(c), x = F(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), v = d || (x || !g ? [et(c)] : Le(c)), N = p !== "none";
442
- !d && N && v.push(...Se(c, g, p, b));
443
- const oe = [c, ...v], ut = await Kt(e, y), J = [];
441
+ const m = F(r), w = H(c), x = F(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), v = d || (x || !g ? [et(c)] : Se(c)), N = p !== "none";
442
+ !d && N && v.push(...ke(c, g, p, b));
443
+ const ie = [c, ...v], ft = await Qt(e, y), J = [];
444
444
  let U = ((o = i.flip) == null ? void 0 : o.overflows) || [];
445
- if (u && J.push(ut[m]), f) {
446
- const P = Oe(r, s, b);
447
- J.push(ut[P[0]], ut[P[1]]);
445
+ if (u && J.push(ft[m]), f) {
446
+ const P = Te(r, s, b);
447
+ J.push(ft[P[0]], ft[P[1]]);
448
448
  }
449
449
  if (U = [...U, {
450
450
  placement: r,
451
451
  overflows: J
452
452
  }], !J.every((P) => P <= 0)) {
453
- var bt, At;
454
- const P = (((bt = i.flip) == null ? void 0 : bt.index) || 0) + 1, Rt = oe[P];
455
- if (Rt)
453
+ var Rt, Ot;
454
+ const P = (((Rt = i.flip) == null ? void 0 : Rt.index) || 0) + 1, Tt = ie[P];
455
+ if (Tt)
456
456
  return {
457
457
  data: {
458
458
  index: P,
459
459
  overflows: U
460
460
  },
461
461
  reset: {
462
- placement: Rt
462
+ placement: Tt
463
463
  }
464
464
  };
465
- let I = (At = U.filter((V) => V.overflows[0] <= 0).sort((V, T) => V.overflows[1] - T.overflows[1])[0]) == null ? void 0 : At.placement;
465
+ let I = (Ot = U.filter((V) => V.overflows[0] <= 0).sort((V, T) => V.overflows[1] - T.overflows[1])[0]) == null ? void 0 : Ot.placement;
466
466
  if (!I)
467
467
  switch (h) {
468
468
  case "bestFit": {
469
- var Et;
470
- const V = (Et = U.filter((T) => {
469
+ var Lt;
470
+ const V = (Lt = U.filter((T) => {
471
471
  if (N) {
472
472
  const S = H(T.placement);
473
473
  return S === w || // Create a bias to the `y` side axis due to horizontal
@@ -475,7 +475,7 @@ const De = function(t) {
475
475
  S === "y";
476
476
  }
477
477
  return !0;
478
- }).map((T) => [T.placement, T.overflows.filter((S) => S > 0).reduce((S, re) => S + re, 0)]).sort((T, S) => T[1] - S[1])[0]) == null ? void 0 : Et[0];
478
+ }).map((T) => [T.placement, T.overflows.filter((S) => S > 0).reduce((S, se) => S + se, 0)]).sort((T, S) => T[1] - S[1])[0]) == null ? void 0 : Lt[0];
479
479
  V && (I = V);
480
480
  break;
481
481
  }
@@ -494,7 +494,7 @@ const De = function(t) {
494
494
  }
495
495
  };
496
496
  };
497
- async function We(t, e) {
497
+ async function Me(t, e) {
498
498
  const {
499
499
  placement: n,
500
500
  platform: o,
@@ -509,10 +509,9 @@ async function We(t, e) {
509
509
  crossAxis: 0,
510
510
  alignmentAxis: null
511
511
  } : {
512
- mainAxis: 0,
513
- crossAxis: 0,
514
- alignmentAxis: null,
515
- ...f
512
+ mainAxis: f.mainAxis || 0,
513
+ crossAxis: f.crossAxis || 0,
514
+ alignmentAxis: f.alignmentAxis
516
515
  };
517
516
  return c && typeof p == "number" && (h = c === "end" ? p * -1 : p), a ? {
518
517
  x: h * u,
@@ -522,7 +521,7 @@ async function We(t, e) {
522
521
  y: h * u
523
522
  };
524
523
  }
525
- const Fe = function(t) {
524
+ const Ne = function(t) {
526
525
  return t === void 0 && (t = 0), {
527
526
  name: "offset",
528
527
  options: t,
@@ -533,7 +532,7 @@ const Fe = function(t) {
533
532
  y: i,
534
533
  placement: s,
535
534
  middlewareData: c
536
- } = e, a = await We(e, t);
535
+ } = e, a = await Me(e, t);
537
536
  return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
538
537
  x: r + a.x,
539
538
  y: i + a.y,
@@ -544,7 +543,7 @@ const Fe = function(t) {
544
543
  };
545
544
  }
546
545
  };
547
- }, Me = function(t) {
546
+ }, Ve = function(t) {
548
547
  return t === void 0 && (t = {}), {
549
548
  name: "shift",
550
549
  options: t,
@@ -572,15 +571,15 @@ const Fe = function(t) {
572
571
  } = st(t, e), l = {
573
572
  x: n,
574
573
  y: o
575
- }, u = await Kt(e, a), f = H(F(r)), d = Yt(f);
574
+ }, u = await Qt(e, a), f = H(F(r)), d = Kt(f);
576
575
  let h = l[d], p = l[f];
577
576
  if (i) {
578
577
  const y = d === "y" ? "top" : "left", m = d === "y" ? "bottom" : "right", w = h + u[y], x = h - u[m];
579
- h = Lt(w, h, x);
578
+ h = Ct(w, h, x);
580
579
  }
581
580
  if (s) {
582
581
  const y = f === "y" ? "top" : "left", m = f === "y" ? "bottom" : "right", w = p + u[y], x = p - u[m];
583
- p = Lt(w, p, x);
582
+ p = Ct(w, p, x);
584
583
  }
585
584
  const g = c.fn({
586
585
  ...e,
@@ -591,14 +590,21 @@ const Fe = function(t) {
591
590
  ...g,
592
591
  data: {
593
592
  x: g.x - n,
594
- y: g.y - o
593
+ y: g.y - o,
594
+ enabled: {
595
+ [d]: i,
596
+ [f]: s
597
+ }
595
598
  }
596
599
  };
597
600
  }
598
601
  };
599
602
  };
603
+ function lt() {
604
+ return typeof window < "u";
605
+ }
600
606
  function B(t) {
601
- return Jt(t) ? (t.nodeName || "").toLowerCase() : "#document";
607
+ return Zt(t) ? (t.nodeName || "").toLowerCase() : "#document";
602
608
  }
603
609
  function A(t) {
604
610
  var e;
@@ -606,19 +612,19 @@ function A(t) {
606
612
  }
607
613
  function L(t) {
608
614
  var e;
609
- return (e = (Jt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
615
+ return (e = (Zt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
610
616
  }
611
- function Jt(t) {
612
- return t instanceof Node || t instanceof A(t).Node;
617
+ function Zt(t) {
618
+ return lt() ? t instanceof Node || t instanceof A(t).Node : !1;
613
619
  }
614
- function R(t) {
615
- return t instanceof Element || t instanceof A(t).Element;
620
+ function E(t) {
621
+ return lt() ? t instanceof Element || t instanceof A(t).Element : !1;
616
622
  }
617
623
  function O(t) {
618
- return t instanceof HTMLElement || t instanceof A(t).HTMLElement;
624
+ return lt() ? t instanceof HTMLElement || t instanceof A(t).HTMLElement : !1;
619
625
  }
620
- function St(t) {
621
- return typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
626
+ function Pt(t) {
627
+ return !lt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
622
628
  }
623
629
  function K(t) {
624
630
  const {
@@ -626,13 +632,13 @@ function K(t) {
626
632
  overflowX: n,
627
633
  overflowY: o,
628
634
  display: r
629
- } = E(t);
635
+ } = R(t);
630
636
  return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(r);
631
637
  }
632
- function Ne(t) {
638
+ function $e(t) {
633
639
  return ["table", "td", "th"].includes(B(t));
634
640
  }
635
- function lt(t) {
641
+ function at(t) {
636
642
  return [":popover-open", ":modal"].some((e) => {
637
643
  try {
638
644
  return t.matches(e);
@@ -641,32 +647,32 @@ function lt(t) {
641
647
  }
642
648
  });
643
649
  }
644
- function wt(t) {
645
- const e = xt(), n = E(t);
650
+ function bt(t) {
651
+ const e = At(), n = E(t) ? R(t) : t;
646
652
  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));
647
653
  }
648
- function Ve(t) {
654
+ function He(t) {
649
655
  let e = k(t);
650
656
  for (; O(e) && !z(e); ) {
651
- if (lt(e))
652
- return null;
653
- if (wt(e))
657
+ if (bt(e))
654
658
  return e;
659
+ if (at(e))
660
+ return null;
655
661
  e = k(e);
656
662
  }
657
663
  return null;
658
664
  }
659
- function xt() {
665
+ function At() {
660
666
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
661
667
  }
662
668
  function z(t) {
663
669
  return ["html", "body", "#document"].includes(B(t));
664
670
  }
665
- function E(t) {
671
+ function R(t) {
666
672
  return A(t).getComputedStyle(t);
667
673
  }
668
- function at(t) {
669
- return R(t) ? {
674
+ function ut(t) {
675
+ return E(t) ? {
670
676
  scrollLeft: t.scrollLeft,
671
677
  scrollTop: t.scrollTop
672
678
  } : {
@@ -681,23 +687,30 @@ function k(t) {
681
687
  // Step into the shadow DOM of the parent of a slotted node.
682
688
  t.assignedSlot || // DOM Element detected.
683
689
  t.parentNode || // ShadowRoot detected.
684
- St(t) && t.host || // Fallback.
690
+ Pt(t) && t.host || // Fallback.
685
691
  L(t)
686
692
  );
687
- return St(e) ? e.host : e;
693
+ return Pt(e) ? e.host : e;
688
694
  }
689
- function Gt(t) {
695
+ function te(t) {
690
696
  const e = k(t);
691
- return z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : O(e) && K(e) ? e : Gt(e);
697
+ return z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : O(e) && K(e) ? e : te(e);
692
698
  }
693
699
  function j(t, e, n) {
694
700
  var o;
695
701
  e === void 0 && (e = []), n === void 0 && (n = !0);
696
- const r = Gt(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = A(r);
697
- return i ? e.concat(s, s.visualViewport || [], K(r) ? r : [], s.frameElement && n ? j(s.frameElement) : []) : e.concat(r, j(r, [], n));
702
+ const r = te(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = A(r);
703
+ if (i) {
704
+ const c = pt(s);
705
+ return e.concat(s, s.visualViewport || [], K(r) ? r : [], c && n ? j(c) : []);
706
+ }
707
+ return e.concat(r, j(r, [], n));
698
708
  }
699
- function Qt(t) {
700
- const e = E(t);
709
+ function pt(t) {
710
+ return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
711
+ }
712
+ function ee(t) {
713
+ const e = R(t);
701
714
  let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
702
715
  const r = O(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = tt(n) !== i || tt(o) !== s;
703
716
  return c && (n = i, o = s), {
@@ -706,48 +719,48 @@ function Qt(t) {
706
719
  $: c
707
720
  };
708
721
  }
709
- function vt(t) {
710
- return R(t) ? t : t.contextElement;
722
+ function Et(t) {
723
+ return E(t) ? t : t.contextElement;
711
724
  }
712
725
  function $(t) {
713
- const e = vt(t);
726
+ const e = Et(t);
714
727
  if (!O(e))
715
728
  return C(1);
716
729
  const n = e.getBoundingClientRect(), {
717
730
  width: o,
718
731
  height: r,
719
732
  $: i
720
- } = Qt(e);
733
+ } = ee(e);
721
734
  let s = (i ? tt(n.width) : n.width) / o, c = (i ? tt(n.height) : n.height) / r;
722
735
  return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
723
736
  x: s,
724
737
  y: c
725
738
  };
726
739
  }
727
- const $e = /* @__PURE__ */ C(0);
728
- function Zt(t) {
740
+ const ze = /* @__PURE__ */ C(0);
741
+ function ne(t) {
729
742
  const e = A(t);
730
- return !xt() || !e.visualViewport ? $e : {
743
+ return !At() || !e.visualViewport ? ze : {
731
744
  x: e.visualViewport.offsetLeft,
732
745
  y: e.visualViewport.offsetTop
733
746
  };
734
747
  }
735
- function He(t, e, n) {
748
+ function Be(t, e, n) {
736
749
  return e === void 0 && (e = !1), !n || e && n !== A(t) ? !1 : e;
737
750
  }
738
751
  function M(t, e, n, o) {
739
752
  e === void 0 && (e = !1), n === void 0 && (n = !1);
740
- const r = t.getBoundingClientRect(), i = vt(t);
753
+ const r = t.getBoundingClientRect(), i = Et(t);
741
754
  let s = C(1);
742
- e && (o ? R(o) && (s = $(o)) : s = $(t));
743
- const c = He(i, n, o) ? Zt(i) : C(0);
755
+ e && (o ? E(o) && (s = $(o)) : s = $(t));
756
+ const c = Be(i, n, o) ? ne(i) : C(0);
744
757
  let a = (r.left + c.x) / s.x, l = (r.top + c.y) / s.y, u = r.width / s.x, f = r.height / s.y;
745
758
  if (i) {
746
- const d = A(i), h = o && R(o) ? A(o) : o;
747
- let p = d, g = p.frameElement;
759
+ const d = A(i), h = o && E(o) ? A(o) : o;
760
+ let p = d, g = pt(p);
748
761
  for (; g && o && h !== p; ) {
749
- const y = $(g), m = g.getBoundingClientRect(), w = E(g), x = m.left + (g.clientLeft + parseFloat(w.paddingLeft)) * y.x, b = m.top + (g.clientTop + parseFloat(w.paddingTop)) * y.y;
750
- a *= y.x, l *= y.y, u *= y.x, f *= y.y, a += x, l += b, p = A(g), g = p.frameElement;
762
+ const y = $(g), m = g.getBoundingClientRect(), w = R(g), x = m.left + (g.clientLeft + parseFloat(w.paddingLeft)) * y.x, b = m.top + (g.clientTop + parseFloat(w.paddingTop)) * y.y;
763
+ a *= y.x, l *= y.y, u *= y.x, f *= y.y, a += x, l += b, p = A(g), g = pt(p);
751
764
  }
752
765
  }
753
766
  return nt({
@@ -757,14 +770,14 @@ function M(t, e, n, o) {
757
770
  y: l
758
771
  });
759
772
  }
760
- function ze(t) {
773
+ function Ue(t) {
761
774
  let {
762
775
  elements: e,
763
776
  rect: n,
764
777
  offsetParent: o,
765
778
  strategy: r
766
779
  } = t;
767
- const i = r === "fixed", s = L(o), c = e ? lt(e.floating) : !1;
780
+ const i = r === "fixed", s = L(o), c = e ? at(e.floating) : !1;
768
781
  if (o === s || c && i)
769
782
  return n;
770
783
  let a = {
@@ -772,7 +785,7 @@ function ze(t) {
772
785
  scrollTop: 0
773
786
  }, l = C(1);
774
787
  const u = C(0), f = O(o);
775
- if ((f || !f && !i) && ((B(o) !== "body" || K(s)) && (a = at(o)), O(o))) {
788
+ if ((f || !f && !i) && ((B(o) !== "body" || K(s)) && (a = ut(o)), O(o))) {
776
789
  const d = M(o);
777
790
  l = $(o), u.x = d.x + o.clientLeft, u.y = d.y + o.clientTop;
778
791
  }
@@ -783,29 +796,30 @@ function ze(t) {
783
796
  y: n.y * l.y - a.scrollTop * l.y + u.y
784
797
  };
785
798
  }
786
- function Be(t) {
799
+ function Ie(t) {
787
800
  return Array.from(t.getClientRects());
788
801
  }
789
- function te(t) {
790
- return M(L(t)).left + at(t).scrollLeft;
802
+ function gt(t, e) {
803
+ const n = ut(t).scrollLeft;
804
+ return e ? e.left + n : M(L(t)).left + n;
791
805
  }
792
- function Ue(t) {
793
- const e = L(t), n = at(t), o = t.ownerDocument.body, r = D(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = D(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
794
- let s = -n.scrollLeft + te(t);
806
+ function _e(t) {
807
+ const e = L(t), n = ut(t), o = t.ownerDocument.body, r = D(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = D(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
808
+ let s = -n.scrollLeft + gt(t);
795
809
  const c = -n.scrollTop;
796
- return E(o).direction === "rtl" && (s += D(e.clientWidth, o.clientWidth) - r), {
810
+ return R(o).direction === "rtl" && (s += D(e.clientWidth, o.clientWidth) - r), {
797
811
  width: r,
798
812
  height: i,
799
813
  x: s,
800
814
  y: c
801
815
  };
802
816
  }
803
- function Ie(t, e) {
817
+ function je(t, e) {
804
818
  const n = A(t), o = L(t), r = n.visualViewport;
805
819
  let i = o.clientWidth, s = o.clientHeight, c = 0, a = 0;
806
820
  if (r) {
807
821
  i = r.width, s = r.height;
808
- const l = xt();
822
+ const l = At();
809
823
  (!l || l && e === "fixed") && (c = r.offsetLeft, a = r.offsetTop);
810
824
  }
811
825
  return {
@@ -815,7 +829,7 @@ function Ie(t, e) {
815
829
  y: a
816
830
  };
817
831
  }
818
- function _e(t, e) {
832
+ function Ye(t, e) {
819
833
  const n = M(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = O(t) ? $(t) : C(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, a = r * i.x, l = o * i.y;
820
834
  return {
821
835
  width: s,
@@ -824,16 +838,16 @@ function _e(t, e) {
824
838
  y: l
825
839
  };
826
840
  }
827
- function Ct(t, e, n) {
841
+ function Dt(t, e, n) {
828
842
  let o;
829
843
  if (e === "viewport")
830
- o = Ie(t, n);
844
+ o = je(t, n);
831
845
  else if (e === "document")
832
- o = Ue(L(t));
833
- else if (R(e))
834
- o = _e(e, n);
846
+ o = _e(L(t));
847
+ else if (E(e))
848
+ o = Ye(e, n);
835
849
  else {
836
- const r = Zt(t);
850
+ const r = ne(t);
837
851
  o = {
838
852
  ...e,
839
853
  x: e.x - r.x,
@@ -842,34 +856,34 @@ function Ct(t, e, n) {
842
856
  }
843
857
  return nt(o);
844
858
  }
845
- function ee(t, e) {
859
+ function oe(t, e) {
846
860
  const n = k(t);
847
- return n === e || !R(n) || z(n) ? !1 : E(n).position === "fixed" || ee(n, e);
861
+ return n === e || !E(n) || z(n) ? !1 : R(n).position === "fixed" || oe(n, e);
848
862
  }
849
- function je(t, e) {
863
+ function Xe(t, e) {
850
864
  const n = e.get(t);
851
865
  if (n)
852
866
  return n;
853
- let o = j(t, [], !1).filter((c) => R(c) && B(c) !== "body"), r = null;
854
- const i = E(t).position === "fixed";
867
+ let o = j(t, [], !1).filter((c) => E(c) && B(c) !== "body"), r = null;
868
+ const i = R(t).position === "fixed";
855
869
  let s = i ? k(t) : t;
856
- for (; R(s) && !z(s); ) {
857
- const c = E(s), a = wt(s);
858
- !a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || K(s) && !a && ee(t, s)) ? o = o.filter((u) => u !== s) : r = c, s = k(s);
870
+ for (; E(s) && !z(s); ) {
871
+ const c = R(s), a = bt(s);
872
+ !a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || K(s) && !a && oe(t, s)) ? o = o.filter((u) => u !== s) : r = c, s = k(s);
859
873
  }
860
874
  return e.set(t, o), o;
861
875
  }
862
- function Ye(t) {
876
+ function qe(t) {
863
877
  let {
864
878
  element: e,
865
879
  boundary: n,
866
880
  rootBoundary: o,
867
881
  strategy: r
868
882
  } = t;
869
- const s = [...n === "clippingAncestors" ? lt(e) ? [] : je(e, this._c) : [].concat(n), o], c = s[0], a = s.reduce((l, u) => {
870
- const f = Ct(e, u, r);
883
+ const s = [...n === "clippingAncestors" ? at(e) ? [] : Xe(e, this._c) : [].concat(n), o], c = s[0], a = s.reduce((l, u) => {
884
+ const f = Dt(e, u, r);
871
885
  return l.top = D(f.top, l.top), l.right = Z(f.right, l.right), l.bottom = Z(f.bottom, l.bottom), l.left = D(f.left, l.left), l;
872
- }, Ct(e, c, r));
886
+ }, Dt(e, c, r));
873
887
  return {
874
888
  width: a.right - a.left,
875
889
  height: a.bottom - a.top,
@@ -877,17 +891,17 @@ function Ye(t) {
877
891
  y: a.top
878
892
  };
879
893
  }
880
- function Xe(t) {
894
+ function Ke(t) {
881
895
  const {
882
896
  width: e,
883
897
  height: n
884
- } = Qt(t);
898
+ } = ee(t);
885
899
  return {
886
900
  width: e,
887
901
  height: n
888
902
  };
889
903
  }
890
- function qe(t, e, n) {
904
+ function Je(t, e, n) {
891
905
  const o = O(e), r = L(e), i = n === "fixed", s = M(t, !0, i, e);
892
906
  let c = {
893
907
  scrollLeft: 0,
@@ -895,46 +909,57 @@ function qe(t, e, n) {
895
909
  };
896
910
  const a = C(0);
897
911
  if (o || !o && !i)
898
- if ((B(e) !== "body" || K(r)) && (c = at(e)), o) {
899
- const f = M(e, !0, i, e);
900
- a.x = f.x + e.clientLeft, a.y = f.y + e.clientTop;
901
- } else r && (a.x = te(r));
902
- const l = s.left + c.scrollLeft - a.x, u = s.top + c.scrollTop - a.y;
912
+ if ((B(e) !== "body" || K(r)) && (c = ut(e)), o) {
913
+ const h = M(e, !0, i, e);
914
+ a.x = h.x + e.clientLeft, a.y = h.y + e.clientTop;
915
+ } else r && (a.x = gt(r));
916
+ let l = 0, u = 0;
917
+ if (r && !o && !i) {
918
+ const h = r.getBoundingClientRect();
919
+ u = h.top + c.scrollTop, l = h.left + c.scrollLeft - // RTL <body> scrollbar.
920
+ gt(r, h);
921
+ }
922
+ const f = s.left + c.scrollLeft - a.x - l, d = s.top + c.scrollTop - a.y - u;
903
923
  return {
904
- x: l,
905
- y: u,
924
+ x: f,
925
+ y: d,
906
926
  width: s.width,
907
927
  height: s.height
908
928
  };
909
929
  }
910
- function ft(t) {
911
- return E(t).position === "static";
930
+ function ht(t) {
931
+ return R(t).position === "static";
912
932
  }
913
- function kt(t, e) {
914
- return !O(t) || E(t).position === "fixed" ? null : e ? e(t) : t.offsetParent;
933
+ function Wt(t, e) {
934
+ if (!O(t) || R(t).position === "fixed")
935
+ return null;
936
+ if (e)
937
+ return e(t);
938
+ let n = t.offsetParent;
939
+ return L(t) === n && (n = n.ownerDocument.body), n;
915
940
  }
916
- function ne(t, e) {
941
+ function re(t, e) {
917
942
  const n = A(t);
918
- if (lt(t))
943
+ if (at(t))
919
944
  return n;
920
945
  if (!O(t)) {
921
946
  let r = k(t);
922
947
  for (; r && !z(r); ) {
923
- if (R(r) && !ft(r))
948
+ if (E(r) && !ht(r))
924
949
  return r;
925
950
  r = k(r);
926
951
  }
927
952
  return n;
928
953
  }
929
- let o = kt(t, e);
930
- for (; o && Ne(o) && ft(o); )
931
- o = kt(o, e);
932
- return o && z(o) && ft(o) && !wt(o) ? n : o || Ve(t) || n;
954
+ let o = Wt(t, e);
955
+ for (; o && $e(o) && ht(o); )
956
+ o = Wt(o, e);
957
+ return o && z(o) && ht(o) && !bt(o) ? n : o || He(t) || n;
933
958
  }
934
- const Ke = async function(t) {
935
- const e = this.getOffsetParent || ne, n = this.getDimensions, o = await n(t.floating);
959
+ const Ge = async function(t) {
960
+ const e = this.getOffsetParent || re, n = this.getDimensions, o = await n(t.floating);
936
961
  return {
937
- reference: qe(t.reference, await e(t.floating), t.strategy),
962
+ reference: Je(t.reference, await e(t.floating), t.strategy),
938
963
  floating: {
939
964
  x: 0,
940
965
  y: 0,
@@ -943,22 +968,22 @@ const Ke = async function(t) {
943
968
  }
944
969
  };
945
970
  };
946
- function Je(t) {
947
- return E(t).direction === "rtl";
971
+ function Qe(t) {
972
+ return R(t).direction === "rtl";
948
973
  }
949
- const Ge = {
950
- convertOffsetParentRelativeRectToViewportRelativeRect: ze,
974
+ const Ze = {
975
+ convertOffsetParentRelativeRectToViewportRelativeRect: Ue,
951
976
  getDocumentElement: L,
952
- getClippingRect: Ye,
953
- getOffsetParent: ne,
954
- getElementRects: Ke,
955
- getClientRects: Be,
956
- getDimensions: Xe,
977
+ getClippingRect: qe,
978
+ getOffsetParent: re,
979
+ getElementRects: Ge,
980
+ getClientRects: Ie,
981
+ getDimensions: Ke,
957
982
  getScale: $,
958
- isElement: R,
959
- isRTL: Je
983
+ isElement: E,
984
+ isRTL: Qe
960
985
  };
961
- function Qe(t, e) {
986
+ function tn(t, e) {
962
987
  let n = null, o;
963
988
  const r = L(t);
964
989
  function i() {
@@ -1004,7 +1029,7 @@ function Qe(t, e) {
1004
1029
  }
1005
1030
  return s(!0), i;
1006
1031
  }
1007
- function Ze(t, e, n, o) {
1032
+ function en(t, e, n, o) {
1008
1033
  o === void 0 && (o = {});
1009
1034
  const {
1010
1035
  ancestorScroll: r = !0,
@@ -1012,13 +1037,13 @@ function Ze(t, e, n, o) {
1012
1037
  elementResize: s = typeof ResizeObserver == "function",
1013
1038
  layoutShift: c = typeof IntersectionObserver == "function",
1014
1039
  animationFrame: a = !1
1015
- } = o, l = vt(t), u = r || i ? [...l ? j(l) : [], ...j(e)] : [];
1040
+ } = o, l = Et(t), u = r || i ? [...l ? j(l) : [], ...j(e)] : [];
1016
1041
  u.forEach((m) => {
1017
1042
  r && m.addEventListener("scroll", n, {
1018
1043
  passive: !0
1019
1044
  }), i && m.addEventListener("resize", n);
1020
1045
  });
1021
- const f = l && c ? Qe(l, n) : null;
1046
+ const f = l && c ? tn(l, n) : null;
1022
1047
  let d = -1, h = null;
1023
1048
  s && (h = new ResizeObserver((m) => {
1024
1049
  let [w] = m;
@@ -1040,41 +1065,41 @@ function Ze(t, e, n, o) {
1040
1065
  }), f == null || f(), (m = h) == null || m.disconnect(), h = null, a && cancelAnimationFrame(p);
1041
1066
  };
1042
1067
  }
1043
- const tn = Fe, en = Me, Pt = De, nn = (t, e, n) => {
1068
+ const nn = Ne, on = Ve, Ft = Fe, rn = (t, e, n) => {
1044
1069
  const o = /* @__PURE__ */ new Map(), r = {
1045
- platform: Ge,
1070
+ platform: Ze,
1046
1071
  ...n
1047
1072
  }, i = {
1048
1073
  ...r.platform,
1049
1074
  _c: o
1050
1075
  };
1051
- return Pe(t, e, {
1076
+ return We(t, e, {
1052
1077
  ...r,
1053
1078
  platform: i
1054
1079
  });
1055
- }, An = ({
1080
+ }, Rn = ({
1056
1081
  content: t,
1057
1082
  open: e,
1058
1083
  placement: n,
1059
1084
  offset: { mainAxis: o, crossAxis: r } = { mainAxis: 0, crossAxis: 0 }
1060
- }) => pt((i) => {
1085
+ }) => wt((i) => {
1061
1086
  const s = it.toSignal(e), c = i.element;
1062
- return It(
1087
+ return Yt(
1063
1088
  s,
1064
- Ut(
1089
+ jt(
1065
1090
  "body",
1066
- $t.div(
1091
+ Bt.div(
1067
1092
  q((a) => {
1068
1093
  const l = a;
1069
- return l.style.position = "absolute", Ze(c, l, () => {
1070
- nn(c, l, {
1094
+ return l.style.position = "absolute", en(c, l, () => {
1095
+ rn(c, l, {
1071
1096
  placement: n,
1072
1097
  strategy: "absolute",
1073
1098
  middleware: [
1074
- Pt(),
1075
- tn({ mainAxis: o, crossAxis: r }),
1076
- en(),
1077
- Pt()
1099
+ Ft(),
1100
+ nn({ mainAxis: o, crossAxis: r }),
1101
+ on(),
1102
+ Ft()
1078
1103
  ]
1079
1104
  }).then(({ x: u, y: f }) => {
1080
1105
  l.style.top = `${f}px`, l.style.left = `${u}px`;
@@ -1085,21 +1110,21 @@ const tn = Fe, en = Me, Pt = De, nn = (t, e, n) => {
1085
1110
  )
1086
1111
  )
1087
1112
  )(i);
1088
- }), on = (t, e) => {
1113
+ }), sn = (t, e) => {
1089
1114
  if (typeof e == "function")
1090
- return on(t, { success: e });
1115
+ return sn(t, { success: e });
1091
1116
  const n = e.failure ?? ((r) => X(
1092
- yt(r.on(console.error)),
1117
+ vt(r.on(console.error)),
1093
1118
  r.map((i) => `Error: ${i}`)
1094
1119
  )), o = e.success;
1095
- return Bt(it.toSignal(t), {
1120
+ return _t(it.toSignal(t), {
1096
1121
  Success: (r) => o(r.$.value),
1097
1122
  Failure: (r) => n(r.$.error)
1098
1123
  });
1099
- }, En = () => Ht.focus((t) => {
1124
+ }, On = () => Ut.focus((t) => {
1100
1125
  var e;
1101
1126
  return (e = t.target) == null ? void 0 : e.select();
1102
- }), Rn = (t) => pt((e) => {
1127
+ }), Ln = (t) => wt((e) => {
1103
1128
  const { element: n } = e, o = W({
1104
1129
  width: n.clientWidth,
1105
1130
  height: n.clientHeight
@@ -1110,8 +1135,8 @@ const tn = Fe, en = Me, Pt = De, nn = (t, e, n) => {
1110
1135
  return typeof ResizeObserver == "function" && (s = new ResizeObserver(i), s.observe(n)), (c) => {
1111
1136
  s == null || s.disconnect(), r(c);
1112
1137
  };
1113
- }), On = (t) => (e) => {
1114
- const n = gt(), o = W({
1138
+ }), Tn = (t) => (e) => {
1139
+ const n = xt(), o = W({
1115
1140
  width: (n == null ? void 0 : n.innerWidth) ?? 0,
1116
1141
  height: (n == null ? void 0 : n.innerHeight) ?? 0
1117
1142
  }), r = rt(t(o))(e), i = () => {
@@ -1123,7 +1148,7 @@ const tn = Fe, en = Me, Pt = De, nn = (t, e, n) => {
1123
1148
  return n == null || n.addEventListener("resize", i), (s) => {
1124
1149
  n == null || n.removeEventListener("resize", i), r(s);
1125
1150
  };
1126
- }, rn = (t, e) => {
1151
+ }, cn = (t, e) => {
1127
1152
  const n = e.split("/").filter((r) => r !== ""), o = {};
1128
1153
  for (let r = 0; r < t.length; r++) {
1129
1154
  const i = t[r], s = n[r];
@@ -1138,22 +1163,22 @@ const tn = Fe, en = Me, Pt = De, nn = (t, e, n) => {
1138
1163
  return { params: o, path: e };
1139
1164
  }
1140
1165
  return n.length !== t.length ? null : { params: o, path: e };
1141
- }, sn = (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 !== ""), cn = (t) => {
1166
+ }, 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 !== ""), an = (t) => {
1142
1167
  const e = t.map((n) => {
1143
- const o = sn(n);
1168
+ const o = ln(n);
1144
1169
  return { route: n, segments: o };
1145
1170
  });
1146
1171
  return function(o) {
1147
1172
  for (const { segments: r, route: i } of e) {
1148
- const s = rn(r, o);
1173
+ const s = cn(r, o);
1149
1174
  if (s)
1150
1175
  return { ...s, route: i };
1151
1176
  }
1152
1177
  return null;
1153
1178
  };
1154
- }, Ln = (t) => {
1155
- const e = cn(Object.keys(t));
1156
- return _t((n) => {
1179
+ }, Sn = (t) => {
1180
+ const e = an(Object.keys(t));
1181
+ return Xt((n) => {
1157
1182
  const o = n.map((r) => {
1158
1183
  const i = e(r.pathname);
1159
1184
  if (i == null)
@@ -1166,13 +1191,13 @@ const tn = Fe, en = Me, Pt = De, nn = (t, e, n) => {
1166
1191
  hash: r.hash
1167
1192
  };
1168
1193
  });
1169
- return le(
1194
+ return ue(
1170
1195
  o.map((r) => [r.route, r]),
1171
1196
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1172
1197
  t
1173
1198
  );
1174
1199
  });
1175
- }, ot = 60 * 1e3, dt = 60 * ot, Y = 24 * dt, Dt = 7 * Y, Wt = 30 * Y, ln = 365 * Y, an = [
1200
+ }, ot = 60 * 1e3, yt = 60 * ot, Y = 24 * yt, Mt = 7 * Y, Nt = 30 * Y, un = 365 * Y, fn = [
1176
1201
  {
1177
1202
  max: ot * 90,
1178
1203
  value: ot,
@@ -1181,8 +1206,8 @@ const tn = Fe, en = Me, Pt = De, nn = (t, e, n) => {
1181
1206
  future: { singular: "in a minute", plural: "in {} minutes" }
1182
1207
  },
1183
1208
  {
1184
- max: dt * 36,
1185
- value: dt,
1209
+ max: yt * 36,
1210
+ value: yt,
1186
1211
  name: "hour",
1187
1212
  past: { singular: "an hour ago", plural: "{} hours ago" },
1188
1213
  future: { singular: "in an hour", plural: "in {} hours" }
@@ -1195,28 +1220,28 @@ const tn = Fe, en = Me, Pt = De, nn = (t, e, n) => {
1195
1220
  future: { singular: "tomorrow", plural: "in {} days" }
1196
1221
  },
1197
1222
  {
1198
- max: Dt * 6,
1199
- value: Dt,
1223
+ max: Mt * 6,
1224
+ value: Mt,
1200
1225
  name: "week",
1201
1226
  past: { singular: "last week", plural: "{} weeks ago" },
1202
1227
  future: { singular: "in a week", plural: "in {} weeks" }
1203
1228
  },
1204
1229
  {
1205
- max: Wt * 18,
1206
- value: Wt,
1230
+ max: Nt * 18,
1231
+ value: Nt,
1207
1232
  name: "month",
1208
1233
  past: { singular: "last month", plural: "{} months ago" },
1209
1234
  future: { singular: "in a month", plural: "in {} months" }
1210
1235
  },
1211
1236
  {
1212
1237
  max: 1 / 0,
1213
- value: ln,
1238
+ value: un,
1214
1239
  name: "year",
1215
1240
  past: { singular: "last year", plural: "{} years ago" },
1216
1241
  future: { singular: "in a year", plural: "in {} years" }
1217
1242
  }
1218
1243
  ];
1219
- function Ft(t, e, n, o) {
1244
+ function Vt(t, e, n, o) {
1220
1245
  const r = Math.round(t / e);
1221
1246
  return r <= 1 ? n : o.replace(
1222
1247
  "{}",
@@ -1226,58 +1251,58 @@ function Ft(t, e, n, o) {
1226
1251
  })
1227
1252
  );
1228
1253
  }
1229
- function un(t) {
1254
+ function hn(t) {
1230
1255
  const e = Math.abs(t);
1231
1256
  if (e < ot)
1232
1257
  return t < 0 ? "just now" : "in a moment";
1233
- for (const n of an)
1258
+ for (const n of fn)
1234
1259
  if (e < n.max)
1235
- return t < 0 ? Ft(e, n.value, n.past.singular, n.past.plural) : Ft(e, n.value, n.future.singular, n.future.plural);
1260
+ return t < 0 ? Vt(e, n.value, n.past.singular, n.past.plural) : Vt(e, n.value, n.future.singular, n.future.plural);
1236
1261
  throw new Error("unreachable");
1237
1262
  }
1238
- const Tn = (t, e) => {
1239
- const n = e != null ? Vt.is(e) ? e.map((i) => i) : W(e) : W(/* @__PURE__ */ new Date()), o = ae(
1263
+ const Cn = (t, e) => {
1264
+ const n = e != null ? zt.is(e) ? e.map((i) => i) : W(e) : W(/* @__PURE__ */ new Date()), o = fe(
1240
1265
  t,
1241
1266
  n
1242
1267
  )((i, s) => {
1243
1268
  const c = i.getTime() - s.getTime();
1244
- return un(c);
1245
- }), r = ue.is(n) ? setInterval(() => n.set(/* @__PURE__ */ new Date()), 5e3) : void 0;
1269
+ return hn(c);
1270
+ }), r = he.is(n) ? setInterval(() => n.set(/* @__PURE__ */ new Date()), 5e3) : void 0;
1246
1271
  return o.onDispose(() => {
1247
1272
  r != null && clearInterval(r), n.dispose();
1248
1273
  }), o;
1249
1274
  };
1250
1275
  export {
1251
- we as Anchor,
1252
- xe as AsyncResultView,
1253
- yn as AutoFocus,
1254
- wn as AutoSelect,
1255
- Rn as ElementSize,
1256
- vn as HTMLTitle,
1257
- xn as HiddenWhenEmpty,
1258
- Ae as InViewport,
1259
- pe as LocationProviderMarker,
1260
- An as PopOver,
1261
- pn as ProvideAppearance,
1262
- hn as ProvideLocation,
1263
- on as ResultView,
1264
- Ln as Router,
1265
- En as SelectOnFocus,
1266
- gn as UseAppearance,
1267
- _t as UseLocation,
1268
- bn as WhenInViewport,
1269
- On as WindowSize,
1270
- he as _checkExtensionCondition,
1271
- fe as _getExtension,
1272
- cn as _makeRouteMatcher,
1273
- sn as _parseRouteSegments,
1274
- jt as appearanceMarker,
1275
- mn as areLocationsEqual,
1276
- de as handleAnchorClick,
1277
- ge as locationFromURL,
1278
- Tn as makeRelativeTime,
1279
- rn as matchesRoute,
1280
- ye as setLocationFromUrl,
1281
- un as timeDiffToString,
1282
- dn as urlFromLocation
1276
+ ve as Anchor,
1277
+ be as AsyncResultView,
1278
+ xn as AutoFocus,
1279
+ vn as AutoSelect,
1280
+ Ln as ElementSize,
1281
+ An as HTMLTitle,
1282
+ bn as HiddenWhenEmpty,
1283
+ Re as InViewport,
1284
+ ye as LocationProviderMarker,
1285
+ Rn as PopOver,
1286
+ yn as ProvideAppearance,
1287
+ mn as ProvideLocation,
1288
+ sn as ResultView,
1289
+ Sn as Router,
1290
+ On as SelectOnFocus,
1291
+ wn as UseAppearance,
1292
+ Xt as UseLocation,
1293
+ En as WhenInViewport,
1294
+ Tn as WindowSize,
1295
+ me as _checkExtensionCondition,
1296
+ de as _getExtension,
1297
+ an as _makeRouteMatcher,
1298
+ ln as _parseRouteSegments,
1299
+ qt as appearanceMarker,
1300
+ pn as areLocationsEqual,
1301
+ ge as handleAnchorClick,
1302
+ we as locationFromURL,
1303
+ Cn as makeRelativeTime,
1304
+ cn as matchesRoute,
1305
+ xe as setLocationFromUrl,
1306
+ hn as timeDiffToString,
1307
+ gn as urlFromLocation
1283
1308
  };