@tempots/ui 6.1.0 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +1 -1
- package/index.d.ts +1 -0
- package/index.js +377 -360
- package/package.json +1 -1
- package/renderables/classes.d.ts +8 -0
- package/renderables/pop-over.d.ts +4 -0
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Le = Object.defineProperty;
|
|
2
2
|
var Pe = (t, e, o) => e in t ? Le(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
3
|
-
var
|
|
4
|
-
import { getWindow as at, prop as F, makeProviderMark as Wt, Signal as
|
|
3
|
+
var Ot = (t, e, o) => Pe(t, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
+
import { getWindow as at, prop as F, makeProviderMark as Wt, Signal as ee, Use as st, html as Et, on as ne, Value as A, attr as Ft, Empty as Lt, OneOfType as oe, WithElement as H, OnDispose as M, Fragment as q, Portal as re, renderableOfTNode as Mt, When as se, effectOf as Se, computedOf as ie, WithBrowserCtx as Te, Provide as ke, OneOfTuple as ce, Prop as Ce } from "@tempots/dom";
|
|
5
5
|
import { delayed as ae, AsyncResult as U, nearEqual as ht, interval as De } from "@tempots/std";
|
|
6
6
|
const We = (t) => {
|
|
7
7
|
const e = t.split("/").pop();
|
|
@@ -52,7 +52,7 @@ const We = (t) => {
|
|
|
52
52
|
search: n,
|
|
53
53
|
hash: r === "" ? void 0 : r
|
|
54
54
|
};
|
|
55
|
-
},
|
|
55
|
+
}, Kt = (t, e) => {
|
|
56
56
|
const o = le(e);
|
|
57
57
|
return t.set(o), t;
|
|
58
58
|
}, Pt = (t) => {
|
|
@@ -99,7 +99,7 @@ const We = (t) => {
|
|
|
99
99
|
value: t,
|
|
100
100
|
dispose: t.dispose
|
|
101
101
|
};
|
|
102
|
-
},
|
|
102
|
+
}, Nt = {
|
|
103
103
|
mark: Wt("Location"),
|
|
104
104
|
create: (t, e) => {
|
|
105
105
|
if (e.isBrowser())
|
|
@@ -111,34 +111,34 @@ const We = (t) => {
|
|
|
111
111
|
}, ze = (t) => {
|
|
112
112
|
document.startViewTransition ? document.startViewTransition(t) : t();
|
|
113
113
|
}, Ke = (t, ...e) => {
|
|
114
|
-
if (typeof t == "string" ||
|
|
114
|
+
if (typeof t == "string" || ee.is(t))
|
|
115
115
|
return Ke({ href: t }, ...e);
|
|
116
116
|
const {
|
|
117
117
|
href: o,
|
|
118
118
|
withViewTransition: n,
|
|
119
119
|
...r
|
|
120
120
|
} = t;
|
|
121
|
-
return
|
|
122
|
-
|
|
121
|
+
return st(Nt, (s) => Et.a(
|
|
122
|
+
ne.click(
|
|
123
123
|
Ne(() => (n === !0 ? ze(() => {
|
|
124
|
-
|
|
125
|
-
}) :
|
|
124
|
+
Kt(s, A.get(o));
|
|
125
|
+
}) : Kt(s, A.get(o)), !0), r)
|
|
126
126
|
),
|
|
127
|
-
|
|
127
|
+
Ft.href(o),
|
|
128
128
|
...e
|
|
129
129
|
/* c8 ignore next 2 */
|
|
130
130
|
));
|
|
131
|
-
},
|
|
131
|
+
}, Yn = {
|
|
132
132
|
mark: Wt("Appearance"),
|
|
133
133
|
create: () => {
|
|
134
|
-
const t =
|
|
134
|
+
const t = je();
|
|
135
135
|
return {
|
|
136
136
|
value: t,
|
|
137
137
|
dispose: t.dispose
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
|
-
function
|
|
141
|
+
function je() {
|
|
142
142
|
const t = at(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, o = (e == null ? void 0 : e.matches) ?? !1, n = F(o ? "dark" : "light"), r = (s) => n.set(s.matches ? "dark" : "light");
|
|
143
143
|
return e == null || e.addEventListener("change", r), n.onDispose(() => e == null ? void 0 : e.removeEventListener("change", r)), n;
|
|
144
144
|
}
|
|
@@ -146,21 +146,30 @@ const ue = (t, e) => {
|
|
|
146
146
|
if (typeof e == "function")
|
|
147
147
|
return ue(t, { success: e });
|
|
148
148
|
const o = e.failure ?? ((i) => i.map((c) => `Error: ${c}`)), n = e.success, r = e.loading ?? (() => Lt), s = e.notAsked ?? (() => Lt);
|
|
149
|
-
return oe(
|
|
149
|
+
return oe(A.toSignal(t), {
|
|
150
150
|
AsyncSuccess: (i) => n(i.$.value),
|
|
151
151
|
AsyncFailure: (i) => o(i.$.error),
|
|
152
152
|
Loading: (i) => r(i.map((c) => c.previousValue)),
|
|
153
153
|
NotAsked: s
|
|
154
154
|
});
|
|
155
|
-
},
|
|
155
|
+
}, qn = (t = 10) => H((e) => M(ae(() => e == null ? void 0 : e.focus(), t))), Xn = (t = 10) => H((e) => {
|
|
156
156
|
const o = ae(() => e.select(), t);
|
|
157
157
|
return M(o);
|
|
158
|
-
})
|
|
158
|
+
});
|
|
159
|
+
function Jn(t) {
|
|
160
|
+
const e = Object.entries(t);
|
|
161
|
+
return q(
|
|
162
|
+
...e.map(
|
|
163
|
+
([o, n]) => Ft.class(A.map(n, (r) => r ? o : void 0))
|
|
164
|
+
)
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
const Gn = H((t) => {
|
|
159
168
|
const e = t.style.getPropertyValue(":empty");
|
|
160
169
|
return t.style.setProperty(":empty", "display:none"), M((o) => {
|
|
161
170
|
o && t.style.setProperty(":empty", e);
|
|
162
171
|
});
|
|
163
|
-
}),
|
|
172
|
+
}), Qn = (t) => re("head > title", Ft.innerText(t)), _e = {
|
|
164
173
|
partial: {
|
|
165
174
|
root: null,
|
|
166
175
|
rootMargin: "0px",
|
|
@@ -174,27 +183,27 @@ const ue = (t, e) => {
|
|
|
174
183
|
}, mt = {
|
|
175
184
|
partial: /* @__PURE__ */ new Map(),
|
|
176
185
|
full: /* @__PURE__ */ new Map()
|
|
177
|
-
},
|
|
186
|
+
}, rt = {
|
|
178
187
|
partial: null,
|
|
179
188
|
full: null
|
|
180
189
|
};
|
|
181
190
|
function Ie(t) {
|
|
182
|
-
return
|
|
191
|
+
return rt[t] == null && (rt[t] = new IntersectionObserver((e) => {
|
|
183
192
|
e.forEach((o) => {
|
|
184
193
|
const n = mt[t].get(o.target);
|
|
185
194
|
n == null || n.set(o.isIntersecting);
|
|
186
195
|
});
|
|
187
|
-
},
|
|
196
|
+
}, _e[t])), rt[t];
|
|
188
197
|
}
|
|
189
198
|
const Ye = ({ mode: t = "partial", once: e = !1 }, o) => {
|
|
190
199
|
const n = F(!1);
|
|
191
|
-
return
|
|
200
|
+
return q(
|
|
192
201
|
H((r) => {
|
|
193
202
|
const s = typeof IntersectionObserver < "u" ? Ie(t) : null;
|
|
194
203
|
mt[t].set(r, n), s == null || s.observe(r);
|
|
195
204
|
function i() {
|
|
196
205
|
var a;
|
|
197
|
-
s == null || s.unobserve(r), mt[t].delete(r), mt[t].size === 0 && ((a =
|
|
206
|
+
s == null || s.unobserve(r), mt[t].delete(r), mt[t].size === 0 && ((a = rt[t]) == null || a.disconnect(), rt[t] = null);
|
|
198
207
|
}
|
|
199
208
|
let c = null;
|
|
200
209
|
return e && (c = n.on((a) => {
|
|
@@ -203,10 +212,10 @@ const Ye = ({ mode: t = "partial", once: e = !1 }, o) => {
|
|
|
203
212
|
n.dispose(), i(), c == null || c();
|
|
204
213
|
});
|
|
205
214
|
}),
|
|
206
|
-
|
|
215
|
+
Mt(o(n))
|
|
207
216
|
);
|
|
208
|
-
},
|
|
209
|
-
function
|
|
217
|
+
}, Zn = (t, e, o) => Ye(t, (n) => se(n, e, o ?? (() => Lt)));
|
|
218
|
+
function qe(t) {
|
|
210
219
|
return H((e) => {
|
|
211
220
|
const o = (n) => {
|
|
212
221
|
e.contains(n.target) || t(n);
|
|
@@ -216,9 +225,9 @@ function Qn(t) {
|
|
|
216
225
|
});
|
|
217
226
|
});
|
|
218
227
|
}
|
|
219
|
-
const
|
|
220
|
-
function
|
|
221
|
-
return typeof t == "string" ? e.key === t :
|
|
228
|
+
const Q = (t, e) => t === void 0 || t === e, jt = (t, e) => t === void 0 || t === e;
|
|
229
|
+
function Xe(t, e) {
|
|
230
|
+
return typeof t == "string" ? e.key === t : jt(t.key, e.key) && jt(t.code, e.code) && Q(t.ctrlKey, e.ctrlKey) && Q(t.altKey, e.altKey) && Q(t.shiftKey, e.shiftKey) && Q(t.metaKey, e.metaKey) && Q(t.repeat, e.repeat) && Q(
|
|
222
231
|
t.commandOrControlKey,
|
|
223
232
|
e.metaKey || e.ctrlKey
|
|
224
233
|
);
|
|
@@ -231,7 +240,7 @@ function fe({
|
|
|
231
240
|
const n = (r) => {
|
|
232
241
|
if (o.contains(r.target)) {
|
|
233
242
|
for (const s of t)
|
|
234
|
-
if (
|
|
243
|
+
if (Xe(s, r)) {
|
|
235
244
|
e(r);
|
|
236
245
|
break;
|
|
237
246
|
}
|
|
@@ -242,31 +251,31 @@ function fe({
|
|
|
242
251
|
});
|
|
243
252
|
});
|
|
244
253
|
}
|
|
245
|
-
function
|
|
254
|
+
function to(t) {
|
|
246
255
|
return fe({ allowedKeys: ["Enter"], handler: t });
|
|
247
256
|
}
|
|
248
|
-
function
|
|
257
|
+
function eo(t) {
|
|
249
258
|
return fe({ allowedKeys: ["Escape"], handler: t });
|
|
250
259
|
}
|
|
251
|
-
const
|
|
260
|
+
const tt = Math.min, X = Math.max, gt = Math.round, dt = Math.floor, D = (t) => ({
|
|
252
261
|
x: t,
|
|
253
262
|
y: t
|
|
254
|
-
}),
|
|
263
|
+
}), Je = {
|
|
255
264
|
left: "right",
|
|
256
265
|
right: "left",
|
|
257
266
|
bottom: "top",
|
|
258
267
|
top: "bottom"
|
|
259
|
-
},
|
|
268
|
+
}, Ge = {
|
|
260
269
|
start: "end",
|
|
261
270
|
end: "start"
|
|
262
271
|
};
|
|
263
272
|
function St(t, e, o) {
|
|
264
|
-
return
|
|
273
|
+
return X(t, tt(e, o));
|
|
265
274
|
}
|
|
266
275
|
function lt(t, e) {
|
|
267
276
|
return typeof t == "function" ? t(e) : t;
|
|
268
277
|
}
|
|
269
|
-
function
|
|
278
|
+
function J(t) {
|
|
270
279
|
return t.split("-")[0];
|
|
271
280
|
}
|
|
272
281
|
function ut(t) {
|
|
@@ -275,29 +284,29 @@ function ut(t) {
|
|
|
275
284
|
function he(t) {
|
|
276
285
|
return t === "x" ? "y" : "x";
|
|
277
286
|
}
|
|
278
|
-
function
|
|
287
|
+
function Vt(t) {
|
|
279
288
|
return t === "y" ? "height" : "width";
|
|
280
289
|
}
|
|
281
290
|
function z(t) {
|
|
282
|
-
return ["top", "bottom"].includes(
|
|
291
|
+
return ["top", "bottom"].includes(J(t)) ? "y" : "x";
|
|
283
292
|
}
|
|
284
|
-
function
|
|
293
|
+
function $t(t) {
|
|
285
294
|
return he(z(t));
|
|
286
295
|
}
|
|
287
|
-
function
|
|
296
|
+
function Qe(t, e, o) {
|
|
288
297
|
o === void 0 && (o = !1);
|
|
289
|
-
const n = ut(t), r =
|
|
298
|
+
const n = ut(t), r = $t(t), s = Vt(r);
|
|
290
299
|
let i = r === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
291
300
|
return e.reference[s] > e.floating[s] && (i = pt(i)), [i, pt(i)];
|
|
292
301
|
}
|
|
293
|
-
function
|
|
302
|
+
function Ze(t) {
|
|
294
303
|
const e = pt(t);
|
|
295
304
|
return [Tt(t), e, Tt(e)];
|
|
296
305
|
}
|
|
297
306
|
function Tt(t) {
|
|
298
|
-
return t.replace(/start|end/g, (e) =>
|
|
307
|
+
return t.replace(/start|end/g, (e) => Ge[e]);
|
|
299
308
|
}
|
|
300
|
-
function
|
|
309
|
+
function tn(t, e, o) {
|
|
301
310
|
const n = ["left", "right"], r = ["right", "left"], s = ["top", "bottom"], i = ["bottom", "top"];
|
|
302
311
|
switch (t) {
|
|
303
312
|
case "top":
|
|
@@ -310,15 +319,15 @@ function Ze(t, e, o) {
|
|
|
310
319
|
return [];
|
|
311
320
|
}
|
|
312
321
|
}
|
|
313
|
-
function
|
|
322
|
+
function en(t, e, o, n) {
|
|
314
323
|
const r = ut(t);
|
|
315
|
-
let s =
|
|
324
|
+
let s = tn(J(t), o === "start", n);
|
|
316
325
|
return r && (s = s.map((i) => i + "-" + r), e && (s = s.concat(s.map(Tt)))), s;
|
|
317
326
|
}
|
|
318
327
|
function pt(t) {
|
|
319
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
328
|
+
return t.replace(/left|right|bottom|top/g, (e) => Je[e]);
|
|
320
329
|
}
|
|
321
|
-
function
|
|
330
|
+
function nn(t) {
|
|
322
331
|
return {
|
|
323
332
|
top: 0,
|
|
324
333
|
right: 0,
|
|
@@ -328,7 +337,7 @@ function en(t) {
|
|
|
328
337
|
};
|
|
329
338
|
}
|
|
330
339
|
function de(t) {
|
|
331
|
-
return typeof t != "number" ?
|
|
340
|
+
return typeof t != "number" ? nn(t) : {
|
|
332
341
|
top: t,
|
|
333
342
|
right: t,
|
|
334
343
|
bottom: t,
|
|
@@ -358,7 +367,7 @@ function _t(t, e, o) {
|
|
|
358
367
|
reference: n,
|
|
359
368
|
floating: r
|
|
360
369
|
} = t;
|
|
361
|
-
const s = z(e), i =
|
|
370
|
+
const s = z(e), i = $t(e), c = Vt(i), a = J(e), l = s === "y", h = n.x + n.width / 2 - r.width / 2, f = n.y + n.height / 2 - r.height / 2, m = n[c] / 2 - r[c] / 2;
|
|
362
371
|
let u;
|
|
363
372
|
switch (a) {
|
|
364
373
|
case "top":
|
|
@@ -401,7 +410,7 @@ function _t(t, e, o) {
|
|
|
401
410
|
}
|
|
402
411
|
return u;
|
|
403
412
|
}
|
|
404
|
-
const
|
|
413
|
+
const on = async (t, e, o) => {
|
|
405
414
|
const {
|
|
406
415
|
placement: n = "bottom",
|
|
407
416
|
strategy: r = "absolute",
|
|
@@ -507,7 +516,7 @@ async function me(t, e) {
|
|
|
507
516
|
right: (v.right - g.right + d.right) / b.x
|
|
508
517
|
};
|
|
509
518
|
}
|
|
510
|
-
const
|
|
519
|
+
const rn = (t) => ({
|
|
511
520
|
name: "arrow",
|
|
512
521
|
options: t,
|
|
513
522
|
async fn(e) {
|
|
@@ -528,15 +537,15 @@ const on = (t) => ({
|
|
|
528
537
|
const f = de(h), m = {
|
|
529
538
|
x: o,
|
|
530
539
|
y: n
|
|
531
|
-
}, u =
|
|
540
|
+
}, u = $t(r), d = Vt(u), p = await i.getDimensions(l), w = u === "y", g = w ? "top" : "left", x = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = s.reference[d] + s.reference[u] - m[u] - s.floating[d], v = m[u] - s.reference[u], L = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l));
|
|
532
541
|
let R = L ? L[y] : 0;
|
|
533
542
|
(!R || !await (i.isElement == null ? void 0 : i.isElement(L))) && (R = c.floating[y] || s.floating[d]);
|
|
534
|
-
const
|
|
543
|
+
const j = b / 2 - v / 2, V = R / 2 - p[d] / 2 - 1, P = tt(f[g], V), _ = tt(f[x], V), I = P, ot = R - p[d] - _, O = R / 2 - p[d] / 2 + j, Y = St(I, O, ot), $ = !a.arrow && ut(r) != null && O !== Y && s.reference[d] / 2 - (O < I ? P : _) - p[d] / 2 < 0, S = $ ? O < I ? O - I : O - ot : 0;
|
|
535
544
|
return {
|
|
536
545
|
[u]: m[u] + S,
|
|
537
546
|
data: {
|
|
538
547
|
[u]: Y,
|
|
539
|
-
centerOffset:
|
|
548
|
+
centerOffset: O - Y - S,
|
|
540
549
|
...$ && {
|
|
541
550
|
alignmentOffset: S
|
|
542
551
|
}
|
|
@@ -544,7 +553,7 @@ const on = (t) => ({
|
|
|
544
553
|
reset: $
|
|
545
554
|
};
|
|
546
555
|
}
|
|
547
|
-
}),
|
|
556
|
+
}), sn = function(t) {
|
|
548
557
|
return t === void 0 && (t = {}), {
|
|
549
558
|
name: "flip",
|
|
550
559
|
options: t,
|
|
@@ -568,26 +577,26 @@ const on = (t) => ({
|
|
|
568
577
|
} = lt(t, e);
|
|
569
578
|
if ((o = s.arrow) != null && o.alignmentOffset)
|
|
570
579
|
return {};
|
|
571
|
-
const g =
|
|
572
|
-
!m && L && v.push(...
|
|
573
|
-
const R = [c, ...v],
|
|
580
|
+
const g = J(r), x = z(c), y = J(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), v = m || (y || !p ? [pt(c)] : Ze(c)), L = d !== "none";
|
|
581
|
+
!m && L && v.push(...en(c, p, d, b));
|
|
582
|
+
const R = [c, ...v], j = await me(e, w), V = [];
|
|
574
583
|
let P = ((n = s.flip) == null ? void 0 : n.overflows) || [];
|
|
575
|
-
if (h && V.push(
|
|
576
|
-
const
|
|
577
|
-
V.push(
|
|
584
|
+
if (h && V.push(j[g]), f) {
|
|
585
|
+
const O = Qe(r, i, b);
|
|
586
|
+
V.push(j[O[0]], j[O[1]]);
|
|
578
587
|
}
|
|
579
588
|
if (P = [...P, {
|
|
580
589
|
placement: r,
|
|
581
590
|
overflows: V
|
|
582
|
-
}], !V.every((
|
|
583
|
-
var
|
|
584
|
-
const
|
|
591
|
+
}], !V.every((O) => O <= 0)) {
|
|
592
|
+
var _, I;
|
|
593
|
+
const O = (((_ = s.flip) == null ? void 0 : _.index) || 0) + 1, Y = R[O];
|
|
585
594
|
if (Y && (!(f === "alignment" ? x !== z(Y) : !1) || // We leave the current main axis only if every placement on that axis
|
|
586
595
|
// overflows the main axis.
|
|
587
596
|
P.every((T) => T.overflows[0] > 0 && z(T.placement) === x)))
|
|
588
597
|
return {
|
|
589
598
|
data: {
|
|
590
|
-
index:
|
|
599
|
+
index: O,
|
|
591
600
|
overflows: P
|
|
592
601
|
},
|
|
593
602
|
reset: {
|
|
@@ -598,8 +607,8 @@ const on = (t) => ({
|
|
|
598
607
|
if (!$)
|
|
599
608
|
switch (u) {
|
|
600
609
|
case "bestFit": {
|
|
601
|
-
var
|
|
602
|
-
const S = (
|
|
610
|
+
var ot;
|
|
611
|
+
const S = (ot = P.filter((T) => {
|
|
603
612
|
if (L) {
|
|
604
613
|
const B = z(T.placement);
|
|
605
614
|
return B === x || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -607,7 +616,7 @@ const on = (t) => ({
|
|
|
607
616
|
B === "y";
|
|
608
617
|
}
|
|
609
618
|
return !0;
|
|
610
|
-
}).map((T) => [T.placement, T.overflows.filter((B) => B > 0).reduce((B, Ee) => B + Ee, 0)]).sort((T, B) => T[1] - B[1])[0]) == null ? void 0 :
|
|
619
|
+
}).map((T) => [T.placement, T.overflows.filter((B) => B > 0).reduce((B, Ee) => B + Ee, 0)]).sort((T, B) => T[1] - B[1])[0]) == null ? void 0 : ot[0];
|
|
611
620
|
S && ($ = S);
|
|
612
621
|
break;
|
|
613
622
|
}
|
|
@@ -626,12 +635,12 @@ const on = (t) => ({
|
|
|
626
635
|
}
|
|
627
636
|
};
|
|
628
637
|
};
|
|
629
|
-
async function
|
|
638
|
+
async function cn(t, e) {
|
|
630
639
|
const {
|
|
631
640
|
placement: o,
|
|
632
641
|
platform: n,
|
|
633
642
|
elements: r
|
|
634
|
-
} = t, s = await (n.isRTL == null ? void 0 : n.isRTL(r.floating)), i =
|
|
643
|
+
} = t, s = await (n.isRTL == null ? void 0 : n.isRTL(r.floating)), i = J(o), c = ut(o), a = z(o) === "y", l = ["left", "top"].includes(i) ? -1 : 1, h = s && a ? -1 : 1, f = lt(e, t);
|
|
635
644
|
let {
|
|
636
645
|
mainAxis: m,
|
|
637
646
|
crossAxis: u,
|
|
@@ -653,7 +662,7 @@ async function sn(t, e) {
|
|
|
653
662
|
y: u * h
|
|
654
663
|
};
|
|
655
664
|
}
|
|
656
|
-
const
|
|
665
|
+
const an = function(t) {
|
|
657
666
|
return t === void 0 && (t = 0), {
|
|
658
667
|
name: "offset",
|
|
659
668
|
options: t,
|
|
@@ -664,7 +673,7 @@ const cn = function(t) {
|
|
|
664
673
|
y: s,
|
|
665
674
|
placement: i,
|
|
666
675
|
middlewareData: c
|
|
667
|
-
} = e, a = await
|
|
676
|
+
} = e, a = await cn(e, t);
|
|
668
677
|
return i === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
|
|
669
678
|
x: r + a.x,
|
|
670
679
|
y: s + a.y,
|
|
@@ -675,7 +684,7 @@ const cn = function(t) {
|
|
|
675
684
|
};
|
|
676
685
|
}
|
|
677
686
|
};
|
|
678
|
-
},
|
|
687
|
+
}, ln = function(t) {
|
|
679
688
|
return t === void 0 && (t = {}), {
|
|
680
689
|
name: "shift",
|
|
681
690
|
options: t,
|
|
@@ -703,7 +712,7 @@ const cn = function(t) {
|
|
|
703
712
|
} = lt(t, e), l = {
|
|
704
713
|
x: o,
|
|
705
714
|
y: n
|
|
706
|
-
}, h = await me(e, a), f = z(
|
|
715
|
+
}, h = await me(e, a), f = z(J(r)), m = he(f);
|
|
707
716
|
let u = l[m], d = l[f];
|
|
708
717
|
if (s) {
|
|
709
718
|
const w = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", x = u + h[w], y = u - h[g];
|
|
@@ -735,10 +744,10 @@ const cn = function(t) {
|
|
|
735
744
|
function xt() {
|
|
736
745
|
return typeof window < "u";
|
|
737
746
|
}
|
|
738
|
-
function
|
|
747
|
+
function nt(t) {
|
|
739
748
|
return ge(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
740
749
|
}
|
|
741
|
-
function
|
|
750
|
+
function E(t) {
|
|
742
751
|
var e;
|
|
743
752
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
744
753
|
}
|
|
@@ -747,16 +756,16 @@ function N(t) {
|
|
|
747
756
|
return (e = (ge(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
748
757
|
}
|
|
749
758
|
function ge(t) {
|
|
750
|
-
return xt() ? t instanceof Node || t instanceof
|
|
759
|
+
return xt() ? t instanceof Node || t instanceof E(t).Node : !1;
|
|
751
760
|
}
|
|
752
761
|
function k(t) {
|
|
753
|
-
return xt() ? t instanceof Element || t instanceof
|
|
762
|
+
return xt() ? t instanceof Element || t instanceof E(t).Element : !1;
|
|
754
763
|
}
|
|
755
764
|
function W(t) {
|
|
756
|
-
return xt() ? t instanceof HTMLElement || t instanceof
|
|
765
|
+
return xt() ? t instanceof HTMLElement || t instanceof E(t).HTMLElement : !1;
|
|
757
766
|
}
|
|
758
|
-
function
|
|
759
|
-
return !xt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof
|
|
767
|
+
function It(t) {
|
|
768
|
+
return !xt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof E(t).ShadowRoot;
|
|
760
769
|
}
|
|
761
770
|
function ft(t) {
|
|
762
771
|
const {
|
|
@@ -767,8 +776,8 @@ function ft(t) {
|
|
|
767
776
|
} = C(t);
|
|
768
777
|
return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(r);
|
|
769
778
|
}
|
|
770
|
-
function
|
|
771
|
-
return ["table", "td", "th"].includes(
|
|
779
|
+
function un(t) {
|
|
780
|
+
return ["table", "td", "th"].includes(nt(t));
|
|
772
781
|
}
|
|
773
782
|
function vt(t) {
|
|
774
783
|
return [":popover-open", ":modal"].some((e) => {
|
|
@@ -779,14 +788,14 @@ function vt(t) {
|
|
|
779
788
|
}
|
|
780
789
|
});
|
|
781
790
|
}
|
|
782
|
-
function
|
|
783
|
-
const e =
|
|
791
|
+
function Ht(t) {
|
|
792
|
+
const e = Bt(), o = k(t) ? C(t) : t;
|
|
784
793
|
return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => o[n] ? o[n] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (o.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (o.contain || "").includes(n));
|
|
785
794
|
}
|
|
786
|
-
function
|
|
795
|
+
function fn(t) {
|
|
787
796
|
let e = K(t);
|
|
788
|
-
for (; W(e) && !
|
|
789
|
-
if (
|
|
797
|
+
for (; W(e) && !et(e); ) {
|
|
798
|
+
if (Ht(e))
|
|
790
799
|
return e;
|
|
791
800
|
if (vt(e))
|
|
792
801
|
return null;
|
|
@@ -794,14 +803,14 @@ function un(t) {
|
|
|
794
803
|
}
|
|
795
804
|
return null;
|
|
796
805
|
}
|
|
797
|
-
function
|
|
806
|
+
function Bt() {
|
|
798
807
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
799
808
|
}
|
|
800
|
-
function
|
|
801
|
-
return ["html", "body", "#document"].includes(
|
|
809
|
+
function et(t) {
|
|
810
|
+
return ["html", "body", "#document"].includes(nt(t));
|
|
802
811
|
}
|
|
803
812
|
function C(t) {
|
|
804
|
-
return
|
|
813
|
+
return E(t).getComputedStyle(t);
|
|
805
814
|
}
|
|
806
815
|
function bt(t) {
|
|
807
816
|
return k(t) ? {
|
|
@@ -813,25 +822,25 @@ function bt(t) {
|
|
|
813
822
|
};
|
|
814
823
|
}
|
|
815
824
|
function K(t) {
|
|
816
|
-
if (
|
|
825
|
+
if (nt(t) === "html")
|
|
817
826
|
return t;
|
|
818
827
|
const e = (
|
|
819
828
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
820
829
|
t.assignedSlot || // DOM Element detected.
|
|
821
830
|
t.parentNode || // ShadowRoot detected.
|
|
822
|
-
|
|
831
|
+
It(t) && t.host || // Fallback.
|
|
823
832
|
N(t)
|
|
824
833
|
);
|
|
825
|
-
return
|
|
834
|
+
return It(e) ? e.host : e;
|
|
826
835
|
}
|
|
827
836
|
function pe(t) {
|
|
828
837
|
const e = K(t);
|
|
829
|
-
return
|
|
838
|
+
return et(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : W(e) && ft(e) ? e : pe(e);
|
|
830
839
|
}
|
|
831
840
|
function it(t, e, o) {
|
|
832
841
|
var n;
|
|
833
842
|
e === void 0 && (e = []), o === void 0 && (o = !0);
|
|
834
|
-
const r = pe(t), s = r === ((n = t.ownerDocument) == null ? void 0 : n.body), i =
|
|
843
|
+
const r = pe(t), s = r === ((n = t.ownerDocument) == null ? void 0 : n.body), i = E(r);
|
|
835
844
|
if (s) {
|
|
836
845
|
const c = kt(i);
|
|
837
846
|
return e.concat(i, i.visualViewport || [], ft(r) ? r : [], c && o ? it(c) : []);
|
|
@@ -851,11 +860,11 @@ function we(t) {
|
|
|
851
860
|
$: c
|
|
852
861
|
};
|
|
853
862
|
}
|
|
854
|
-
function
|
|
863
|
+
function Ut(t) {
|
|
855
864
|
return k(t) ? t : t.contextElement;
|
|
856
865
|
}
|
|
857
|
-
function
|
|
858
|
-
const e =
|
|
866
|
+
function Z(t) {
|
|
867
|
+
const e = Ut(t);
|
|
859
868
|
if (!W(e))
|
|
860
869
|
return D(1);
|
|
861
870
|
const o = e.getBoundingClientRect(), {
|
|
@@ -869,30 +878,30 @@ function Q(t) {
|
|
|
869
878
|
y: c
|
|
870
879
|
};
|
|
871
880
|
}
|
|
872
|
-
const
|
|
881
|
+
const hn = /* @__PURE__ */ D(0);
|
|
873
882
|
function ye(t) {
|
|
874
|
-
const e =
|
|
875
|
-
return !
|
|
883
|
+
const e = E(t);
|
|
884
|
+
return !Bt() || !e.visualViewport ? hn : {
|
|
876
885
|
x: e.visualViewport.offsetLeft,
|
|
877
886
|
y: e.visualViewport.offsetTop
|
|
878
887
|
};
|
|
879
888
|
}
|
|
880
|
-
function
|
|
881
|
-
return e === void 0 && (e = !1), !o || e && o !==
|
|
889
|
+
function dn(t, e, o) {
|
|
890
|
+
return e === void 0 && (e = !1), !o || e && o !== E(t) ? !1 : e;
|
|
882
891
|
}
|
|
883
|
-
function
|
|
892
|
+
function G(t, e, o, n) {
|
|
884
893
|
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
885
|
-
const r = t.getBoundingClientRect(), s =
|
|
894
|
+
const r = t.getBoundingClientRect(), s = Ut(t);
|
|
886
895
|
let i = D(1);
|
|
887
|
-
e && (n ? k(n) && (i =
|
|
888
|
-
const c =
|
|
896
|
+
e && (n ? k(n) && (i = Z(n)) : i = Z(t));
|
|
897
|
+
const c = dn(s, o, n) ? ye(s) : D(0);
|
|
889
898
|
let a = (r.left + c.x) / i.x, l = (r.top + c.y) / i.y, h = r.width / i.x, f = r.height / i.y;
|
|
890
899
|
if (s) {
|
|
891
|
-
const m =
|
|
900
|
+
const m = E(s), u = n && k(n) ? E(n) : n;
|
|
892
901
|
let d = m, p = kt(d);
|
|
893
902
|
for (; p && n && u !== d; ) {
|
|
894
|
-
const w =
|
|
895
|
-
a *= w.x, l *= w.y, h *= w.x, f *= w.y, a += y, l += b, d =
|
|
903
|
+
const w = Z(p), g = p.getBoundingClientRect(), x = C(p), y = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * w.x, b = g.top + (p.clientTop + parseFloat(x.paddingTop)) * w.y;
|
|
904
|
+
a *= w.x, l *= w.y, h *= w.x, f *= w.y, a += y, l += b, d = E(p), p = kt(d);
|
|
896
905
|
}
|
|
897
906
|
}
|
|
898
907
|
return wt({
|
|
@@ -902,22 +911,22 @@ function J(t, e, o, n) {
|
|
|
902
911
|
y: l
|
|
903
912
|
});
|
|
904
913
|
}
|
|
905
|
-
function
|
|
914
|
+
function zt(t, e) {
|
|
906
915
|
const o = bt(t).scrollLeft;
|
|
907
|
-
return e ? e.left + o :
|
|
916
|
+
return e ? e.left + o : G(N(t)).left + o;
|
|
908
917
|
}
|
|
909
918
|
function xe(t, e, o) {
|
|
910
919
|
o === void 0 && (o = !1);
|
|
911
920
|
const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - (o ? 0 : (
|
|
912
921
|
// RTL <body> scrollbar.
|
|
913
|
-
|
|
922
|
+
zt(t, n)
|
|
914
923
|
)), s = n.top + e.scrollTop;
|
|
915
924
|
return {
|
|
916
925
|
x: r,
|
|
917
926
|
y: s
|
|
918
927
|
};
|
|
919
928
|
}
|
|
920
|
-
function
|
|
929
|
+
function mn(t) {
|
|
921
930
|
let {
|
|
922
931
|
elements: e,
|
|
923
932
|
rect: o,
|
|
@@ -932,9 +941,9 @@ function dn(t) {
|
|
|
932
941
|
scrollTop: 0
|
|
933
942
|
}, l = D(1);
|
|
934
943
|
const h = D(0), f = W(n);
|
|
935
|
-
if ((f || !f && !s) && ((
|
|
936
|
-
const u =
|
|
937
|
-
l =
|
|
944
|
+
if ((f || !f && !s) && ((nt(n) !== "body" || ft(i)) && (a = bt(n)), W(n))) {
|
|
945
|
+
const u = G(n);
|
|
946
|
+
l = Z(n), h.x = u.x + n.clientLeft, h.y = u.y + n.clientTop;
|
|
938
947
|
}
|
|
939
948
|
const m = i && !f && !s ? xe(i, a, !0) : D(0);
|
|
940
949
|
return {
|
|
@@ -944,26 +953,26 @@ function dn(t) {
|
|
|
944
953
|
y: o.y * l.y - a.scrollTop * l.y + h.y + m.y
|
|
945
954
|
};
|
|
946
955
|
}
|
|
947
|
-
function
|
|
956
|
+
function gn(t) {
|
|
948
957
|
return Array.from(t.getClientRects());
|
|
949
958
|
}
|
|
950
|
-
function
|
|
951
|
-
const e = N(t), o = bt(t), n = t.ownerDocument.body, r =
|
|
952
|
-
let i = -o.scrollLeft +
|
|
959
|
+
function pn(t) {
|
|
960
|
+
const e = N(t), o = bt(t), n = t.ownerDocument.body, r = X(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), s = X(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
|
|
961
|
+
let i = -o.scrollLeft + zt(t);
|
|
953
962
|
const c = -o.scrollTop;
|
|
954
|
-
return C(n).direction === "rtl" && (i +=
|
|
963
|
+
return C(n).direction === "rtl" && (i += X(e.clientWidth, n.clientWidth) - r), {
|
|
955
964
|
width: r,
|
|
956
965
|
height: s,
|
|
957
966
|
x: i,
|
|
958
967
|
y: c
|
|
959
968
|
};
|
|
960
969
|
}
|
|
961
|
-
function
|
|
962
|
-
const o =
|
|
970
|
+
function wn(t, e) {
|
|
971
|
+
const o = E(t), n = N(t), r = o.visualViewport;
|
|
963
972
|
let s = n.clientWidth, i = n.clientHeight, c = 0, a = 0;
|
|
964
973
|
if (r) {
|
|
965
974
|
s = r.width, i = r.height;
|
|
966
|
-
const l =
|
|
975
|
+
const l = Bt();
|
|
967
976
|
(!l || l && e === "fixed") && (c = r.offsetLeft, a = r.offsetTop);
|
|
968
977
|
}
|
|
969
978
|
return {
|
|
@@ -973,8 +982,8 @@ function pn(t, e) {
|
|
|
973
982
|
y: a
|
|
974
983
|
};
|
|
975
984
|
}
|
|
976
|
-
function
|
|
977
|
-
const o =
|
|
985
|
+
function yn(t, e) {
|
|
986
|
+
const o = G(t, !0, e === "fixed"), n = o.top + t.clientTop, r = o.left + t.clientLeft, s = W(t) ? Z(t) : D(1), i = t.clientWidth * s.x, c = t.clientHeight * s.y, a = r * s.x, l = n * s.y;
|
|
978
987
|
return {
|
|
979
988
|
width: i,
|
|
980
989
|
height: c,
|
|
@@ -982,14 +991,14 @@ function wn(t, e) {
|
|
|
982
991
|
y: l
|
|
983
992
|
};
|
|
984
993
|
}
|
|
985
|
-
function
|
|
994
|
+
function Yt(t, e, o) {
|
|
986
995
|
let n;
|
|
987
996
|
if (e === "viewport")
|
|
988
|
-
n =
|
|
997
|
+
n = wn(t, o);
|
|
989
998
|
else if (e === "document")
|
|
990
|
-
n =
|
|
999
|
+
n = pn(N(t));
|
|
991
1000
|
else if (k(e))
|
|
992
|
-
n =
|
|
1001
|
+
n = yn(e, o);
|
|
993
1002
|
else {
|
|
994
1003
|
const r = ye(t);
|
|
995
1004
|
n = {
|
|
@@ -1003,32 +1012,32 @@ function It(t, e, o) {
|
|
|
1003
1012
|
}
|
|
1004
1013
|
function ve(t, e) {
|
|
1005
1014
|
const o = K(t);
|
|
1006
|
-
return o === e || !k(o) ||
|
|
1015
|
+
return o === e || !k(o) || et(o) ? !1 : C(o).position === "fixed" || ve(o, e);
|
|
1007
1016
|
}
|
|
1008
|
-
function
|
|
1017
|
+
function xn(t, e) {
|
|
1009
1018
|
const o = e.get(t);
|
|
1010
1019
|
if (o)
|
|
1011
1020
|
return o;
|
|
1012
|
-
let n = it(t, [], !1).filter((c) => k(c) &&
|
|
1021
|
+
let n = it(t, [], !1).filter((c) => k(c) && nt(c) !== "body"), r = null;
|
|
1013
1022
|
const s = C(t).position === "fixed";
|
|
1014
1023
|
let i = s ? K(t) : t;
|
|
1015
|
-
for (; k(i) && !
|
|
1016
|
-
const c = C(i), a =
|
|
1024
|
+
for (; k(i) && !et(i); ) {
|
|
1025
|
+
const c = C(i), a = Ht(i);
|
|
1017
1026
|
!a && c.position === "fixed" && (r = null), (s ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || ft(i) && !a && ve(t, i)) ? n = n.filter((h) => h !== i) : r = c, i = K(i);
|
|
1018
1027
|
}
|
|
1019
1028
|
return e.set(t, n), n;
|
|
1020
1029
|
}
|
|
1021
|
-
function
|
|
1030
|
+
function vn(t) {
|
|
1022
1031
|
let {
|
|
1023
1032
|
element: e,
|
|
1024
1033
|
boundary: o,
|
|
1025
1034
|
rootBoundary: n,
|
|
1026
1035
|
strategy: r
|
|
1027
1036
|
} = t;
|
|
1028
|
-
const i = [...o === "clippingAncestors" ? vt(e) ? [] :
|
|
1029
|
-
const f =
|
|
1030
|
-
return l.top =
|
|
1031
|
-
},
|
|
1037
|
+
const i = [...o === "clippingAncestors" ? vt(e) ? [] : xn(e, this._c) : [].concat(o), n], c = i[0], a = i.reduce((l, h) => {
|
|
1038
|
+
const f = Yt(e, h, r);
|
|
1039
|
+
return l.top = X(f.top, l.top), l.right = tt(f.right, l.right), l.bottom = tt(f.bottom, l.bottom), l.left = X(f.left, l.left), l;
|
|
1040
|
+
}, Yt(e, c, r));
|
|
1032
1041
|
return {
|
|
1033
1042
|
width: a.right - a.left,
|
|
1034
1043
|
height: a.bottom - a.top,
|
|
@@ -1036,7 +1045,7 @@ function xn(t) {
|
|
|
1036
1045
|
y: a.top
|
|
1037
1046
|
};
|
|
1038
1047
|
}
|
|
1039
|
-
function
|
|
1048
|
+
function bn(t) {
|
|
1040
1049
|
const {
|
|
1041
1050
|
width: e,
|
|
1042
1051
|
height: o
|
|
@@ -1046,19 +1055,19 @@ function vn(t) {
|
|
|
1046
1055
|
height: o
|
|
1047
1056
|
};
|
|
1048
1057
|
}
|
|
1049
|
-
function
|
|
1050
|
-
const n = W(e), r = N(e), s = o === "fixed", i =
|
|
1058
|
+
function Rn(t, e, o) {
|
|
1059
|
+
const n = W(e), r = N(e), s = o === "fixed", i = G(t, !0, s, e);
|
|
1051
1060
|
let c = {
|
|
1052
1061
|
scrollLeft: 0,
|
|
1053
1062
|
scrollTop: 0
|
|
1054
1063
|
};
|
|
1055
1064
|
const a = D(0);
|
|
1056
1065
|
function l() {
|
|
1057
|
-
a.x =
|
|
1066
|
+
a.x = zt(r);
|
|
1058
1067
|
}
|
|
1059
1068
|
if (n || !n && !s)
|
|
1060
|
-
if ((
|
|
1061
|
-
const u =
|
|
1069
|
+
if ((nt(e) !== "body" || ft(r)) && (c = bt(e)), n) {
|
|
1070
|
+
const u = G(e, !0, s, e);
|
|
1062
1071
|
a.x = u.x + e.clientLeft, a.y = u.y + e.clientTop;
|
|
1063
1072
|
} else r && l();
|
|
1064
1073
|
s && !n && r && l();
|
|
@@ -1070,10 +1079,10 @@ function bn(t, e, o) {
|
|
|
1070
1079
|
height: i.height
|
|
1071
1080
|
};
|
|
1072
1081
|
}
|
|
1073
|
-
function
|
|
1082
|
+
function At(t) {
|
|
1074
1083
|
return C(t).position === "static";
|
|
1075
1084
|
}
|
|
1076
|
-
function
|
|
1085
|
+
function qt(t, e) {
|
|
1077
1086
|
if (!W(t) || C(t).position === "fixed")
|
|
1078
1087
|
return null;
|
|
1079
1088
|
if (e)
|
|
@@ -1082,27 +1091,27 @@ function Yt(t, e) {
|
|
|
1082
1091
|
return N(t) === o && (o = o.ownerDocument.body), o;
|
|
1083
1092
|
}
|
|
1084
1093
|
function be(t, e) {
|
|
1085
|
-
const o =
|
|
1094
|
+
const o = E(t);
|
|
1086
1095
|
if (vt(t))
|
|
1087
1096
|
return o;
|
|
1088
1097
|
if (!W(t)) {
|
|
1089
1098
|
let r = K(t);
|
|
1090
|
-
for (; r && !
|
|
1091
|
-
if (k(r) && !
|
|
1099
|
+
for (; r && !et(r); ) {
|
|
1100
|
+
if (k(r) && !At(r))
|
|
1092
1101
|
return r;
|
|
1093
1102
|
r = K(r);
|
|
1094
1103
|
}
|
|
1095
1104
|
return o;
|
|
1096
1105
|
}
|
|
1097
|
-
let n =
|
|
1098
|
-
for (; n &&
|
|
1099
|
-
n =
|
|
1100
|
-
return n &&
|
|
1106
|
+
let n = qt(t, e);
|
|
1107
|
+
for (; n && un(n) && At(n); )
|
|
1108
|
+
n = qt(n, e);
|
|
1109
|
+
return n && et(n) && At(n) && !Ht(n) ? o : n || fn(t) || o;
|
|
1101
1110
|
}
|
|
1102
|
-
const
|
|
1111
|
+
const On = async function(t) {
|
|
1103
1112
|
const e = this.getOffsetParent || be, o = this.getDimensions, n = await o(t.floating);
|
|
1104
1113
|
return {
|
|
1105
|
-
reference:
|
|
1114
|
+
reference: Rn(t.reference, await e(t.floating), t.strategy),
|
|
1106
1115
|
floating: {
|
|
1107
1116
|
x: 0,
|
|
1108
1117
|
y: 0,
|
|
@@ -1114,22 +1123,22 @@ const Rn = async function(t) {
|
|
|
1114
1123
|
function An(t) {
|
|
1115
1124
|
return C(t).direction === "rtl";
|
|
1116
1125
|
}
|
|
1117
|
-
const
|
|
1118
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1126
|
+
const En = {
|
|
1127
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: mn,
|
|
1119
1128
|
getDocumentElement: N,
|
|
1120
|
-
getClippingRect:
|
|
1129
|
+
getClippingRect: vn,
|
|
1121
1130
|
getOffsetParent: be,
|
|
1122
|
-
getElementRects:
|
|
1123
|
-
getClientRects:
|
|
1124
|
-
getDimensions:
|
|
1125
|
-
getScale:
|
|
1131
|
+
getElementRects: On,
|
|
1132
|
+
getClientRects: gn,
|
|
1133
|
+
getDimensions: bn,
|
|
1134
|
+
getScale: Z,
|
|
1126
1135
|
isElement: k,
|
|
1127
1136
|
isRTL: An
|
|
1128
1137
|
};
|
|
1129
1138
|
function Re(t, e) {
|
|
1130
1139
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1131
1140
|
}
|
|
1132
|
-
function
|
|
1141
|
+
function Ln(t, e) {
|
|
1133
1142
|
let o = null, n;
|
|
1134
1143
|
const r = N(t);
|
|
1135
1144
|
function s() {
|
|
@@ -1148,7 +1157,7 @@ function En(t, e) {
|
|
|
1148
1157
|
return;
|
|
1149
1158
|
const d = dt(f), p = dt(r.clientWidth - (h + m)), w = dt(r.clientHeight - (f + u)), g = dt(h), y = {
|
|
1150
1159
|
rootMargin: -d + "px " + -p + "px " + -w + "px " + -g + "px",
|
|
1151
|
-
threshold:
|
|
1160
|
+
threshold: X(0, tt(1, a)) || 1
|
|
1152
1161
|
};
|
|
1153
1162
|
let b = !0;
|
|
1154
1163
|
function v(L) {
|
|
@@ -1175,7 +1184,7 @@ function En(t, e) {
|
|
|
1175
1184
|
}
|
|
1176
1185
|
return i(!0), s;
|
|
1177
1186
|
}
|
|
1178
|
-
function
|
|
1187
|
+
function Pn(t, e, o, n) {
|
|
1179
1188
|
n === void 0 && (n = {});
|
|
1180
1189
|
const {
|
|
1181
1190
|
ancestorScroll: r = !0,
|
|
@@ -1183,13 +1192,13 @@ function Ln(t, e, o, n) {
|
|
|
1183
1192
|
elementResize: i = typeof ResizeObserver == "function",
|
|
1184
1193
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1185
1194
|
animationFrame: a = !1
|
|
1186
|
-
} = n, l =
|
|
1195
|
+
} = n, l = Ut(t), h = r || s ? [...l ? it(l) : [], ...it(e)] : [];
|
|
1187
1196
|
h.forEach((g) => {
|
|
1188
1197
|
r && g.addEventListener("scroll", o, {
|
|
1189
1198
|
passive: !0
|
|
1190
1199
|
}), s && g.addEventListener("resize", o);
|
|
1191
1200
|
});
|
|
1192
|
-
const f = l && c ?
|
|
1201
|
+
const f = l && c ? Ln(l, o) : null;
|
|
1193
1202
|
let m = -1, u = null;
|
|
1194
1203
|
i && (u = new ResizeObserver((g) => {
|
|
1195
1204
|
let [x] = g;
|
|
@@ -1198,10 +1207,10 @@ function Ln(t, e, o, n) {
|
|
|
1198
1207
|
(y = u) == null || y.observe(e);
|
|
1199
1208
|
})), o();
|
|
1200
1209
|
}), l && !a && u.observe(l), u.observe(e));
|
|
1201
|
-
let d, p = a ?
|
|
1210
|
+
let d, p = a ? G(t) : null;
|
|
1202
1211
|
a && w();
|
|
1203
1212
|
function w() {
|
|
1204
|
-
const g =
|
|
1213
|
+
const g = G(t);
|
|
1205
1214
|
p && !Re(p, g) && o(), p = g, d = requestAnimationFrame(w);
|
|
1206
1215
|
}
|
|
1207
1216
|
return o(), () => {
|
|
@@ -1211,19 +1220,19 @@ function Ln(t, e, o, n) {
|
|
|
1211
1220
|
}), f == null || f(), (g = u) == null || g.disconnect(), u = null, a && cancelAnimationFrame(d);
|
|
1212
1221
|
};
|
|
1213
1222
|
}
|
|
1214
|
-
const
|
|
1223
|
+
const Sn = an, Tn = ln, Xt = sn, kn = rn, Cn = (t, e, o) => {
|
|
1215
1224
|
const n = /* @__PURE__ */ new Map(), r = {
|
|
1216
|
-
platform:
|
|
1225
|
+
platform: En,
|
|
1217
1226
|
...o
|
|
1218
1227
|
}, s = {
|
|
1219
1228
|
...r.platform,
|
|
1220
1229
|
_c: n
|
|
1221
1230
|
};
|
|
1222
|
-
return
|
|
1231
|
+
return on(t, e, {
|
|
1223
1232
|
...r,
|
|
1224
1233
|
platform: s
|
|
1225
1234
|
});
|
|
1226
|
-
},
|
|
1235
|
+
}, no = [
|
|
1227
1236
|
"top",
|
|
1228
1237
|
"top-start",
|
|
1229
1238
|
"top-end",
|
|
@@ -1236,115 +1245,122 @@ const Pn = cn, Sn = an, qt = rn, Tn = on, kn = (t, e, o) => {
|
|
|
1236
1245
|
"left",
|
|
1237
1246
|
"left-start",
|
|
1238
1247
|
"left-end"
|
|
1239
|
-
],
|
|
1248
|
+
], oo = (t, e = { isOpen: !1 }) => {
|
|
1240
1249
|
const o = [];
|
|
1241
1250
|
let n = null;
|
|
1242
|
-
const r =
|
|
1251
|
+
const r = A.deriveProp(e.isOpen);
|
|
1243
1252
|
function s(c) {
|
|
1244
1253
|
n = c, r.set(!0);
|
|
1245
1254
|
}
|
|
1246
1255
|
function i() {
|
|
1247
1256
|
r.set(!1), o.forEach((c) => c()), o.length = 0;
|
|
1248
1257
|
}
|
|
1249
|
-
return
|
|
1258
|
+
return q(
|
|
1250
1259
|
t(s, i),
|
|
1251
1260
|
se(
|
|
1252
1261
|
r,
|
|
1253
|
-
() =>
|
|
1254
|
-
(
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
(n == null ? void 0 : n.
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
const {
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
} = R.arrow
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1262
|
+
() => q(
|
|
1263
|
+
(n == null ? void 0 : n.onClickOutside) != null ? qe(n.onClickOutside) : null,
|
|
1264
|
+
H(
|
|
1265
|
+
(c) => re(
|
|
1266
|
+
"body",
|
|
1267
|
+
Et.div(
|
|
1268
|
+
H((a) => {
|
|
1269
|
+
a.style.position = "absolute";
|
|
1270
|
+
const l = typeof (n == null ? void 0 : n.target) == "string" ? c.querySelector(
|
|
1271
|
+
n.target
|
|
1272
|
+
) : (n == null ? void 0 : n.target) ?? c;
|
|
1273
|
+
if (l == null)
|
|
1274
|
+
throw new Error(`Target not found: ${n == null ? void 0 : n.target}`);
|
|
1275
|
+
let h = null;
|
|
1276
|
+
const f = A.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), m = A.toSignal(
|
|
1277
|
+
(n == null ? void 0 : n.crossAxisOffset) ?? 0
|
|
1278
|
+
), u = A.toSignal(
|
|
1279
|
+
/* c8 ignore next 3 */
|
|
1280
|
+
(n == null ? void 0 : n.placement) ?? "top"
|
|
1281
|
+
), d = A.toSignal(
|
|
1282
|
+
(n == null ? void 0 : n.arrowPadding) ?? 0
|
|
1283
|
+
), p = n == null ? void 0 : n.arrow, w = F({
|
|
1284
|
+
centerOffset: 0,
|
|
1285
|
+
alignmentOffset: 0,
|
|
1286
|
+
containerWidth: 0,
|
|
1287
|
+
containerHeight: 0,
|
|
1288
|
+
x: void 0,
|
|
1289
|
+
y: void 0
|
|
1290
|
+
});
|
|
1291
|
+
async function g() {
|
|
1292
|
+
const y = [
|
|
1293
|
+
Xt(),
|
|
1294
|
+
Sn({
|
|
1295
|
+
mainAxis: f.get(),
|
|
1296
|
+
crossAxis: m.get()
|
|
1297
|
+
}),
|
|
1298
|
+
Tn(),
|
|
1299
|
+
Xt()
|
|
1300
|
+
];
|
|
1301
|
+
p != null && h != null && y.push(
|
|
1302
|
+
kn({
|
|
1303
|
+
element: h,
|
|
1304
|
+
padding: d.get()
|
|
1305
|
+
})
|
|
1306
|
+
);
|
|
1307
|
+
const b = await Cn(l, a, {
|
|
1308
|
+
placement: u.get(),
|
|
1309
|
+
strategy: "absolute",
|
|
1310
|
+
middleware: y
|
|
1311
|
+
}), { x: v, y: L, middlewareData: R } = b;
|
|
1312
|
+
if (a.style.top = `${L}px`, a.style.left = `${v}px`, h != null && R.arrow != null) {
|
|
1313
|
+
const {
|
|
1314
|
+
x: j,
|
|
1315
|
+
y: V,
|
|
1316
|
+
centerOffset: P,
|
|
1317
|
+
alignmentOffset: _
|
|
1318
|
+
} = R.arrow;
|
|
1319
|
+
w.set({
|
|
1320
|
+
x: j,
|
|
1321
|
+
y: V,
|
|
1322
|
+
centerOffset: P,
|
|
1323
|
+
alignmentOffset: _,
|
|
1324
|
+
containerWidth: a.offsetWidth,
|
|
1325
|
+
containerHeight: a.offsetHeight
|
|
1326
|
+
});
|
|
1327
|
+
}
|
|
1312
1328
|
}
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
)
|
|
1340
|
-
)
|
|
1341
|
-
|
|
1329
|
+
const x = Se(
|
|
1330
|
+
f,
|
|
1331
|
+
m,
|
|
1332
|
+
u
|
|
1333
|
+
)(g);
|
|
1334
|
+
return q(
|
|
1335
|
+
n == null ? void 0 : n.content,
|
|
1336
|
+
(n == null ? void 0 : n.arrow) != null ? Et.div(
|
|
1337
|
+
n == null ? void 0 : n.arrow(
|
|
1338
|
+
ie(
|
|
1339
|
+
w,
|
|
1340
|
+
u
|
|
1341
|
+
)((y, b) => ({
|
|
1342
|
+
...y,
|
|
1343
|
+
placement: b
|
|
1344
|
+
}))
|
|
1345
|
+
),
|
|
1346
|
+
H((y) => {
|
|
1347
|
+
h = y, g();
|
|
1348
|
+
})
|
|
1349
|
+
) : null,
|
|
1350
|
+
M(
|
|
1351
|
+
w.dispose,
|
|
1352
|
+
Pn(l, a, g),
|
|
1353
|
+
x
|
|
1354
|
+
)
|
|
1355
|
+
);
|
|
1356
|
+
})
|
|
1357
|
+
)
|
|
1342
1358
|
)
|
|
1343
1359
|
)
|
|
1344
1360
|
)
|
|
1345
1361
|
)
|
|
1346
1362
|
);
|
|
1347
|
-
},
|
|
1363
|
+
}, Dn = (t, e, o) => {
|
|
1348
1364
|
const n = F(U.notAsked), r = n.map(
|
|
1349
1365
|
(f) => U.isSuccess(f) ? f.value : void 0
|
|
1350
1366
|
), s = n.map(
|
|
@@ -1361,10 +1377,10 @@ const Pn = cn, Sn = an, qt = rn, Tn = on, kn = (t, e, o) => {
|
|
|
1361
1377
|
} catch (d) {
|
|
1362
1378
|
c = void 0, n.set(U.failure(o(d)));
|
|
1363
1379
|
}
|
|
1364
|
-
}, l = () => a(
|
|
1380
|
+
}, l = () => a(A.get(t)), h = () => {
|
|
1365
1381
|
c == null || c.abort(), c = void 0, n.dispose();
|
|
1366
1382
|
};
|
|
1367
|
-
return n.onDispose(
|
|
1383
|
+
return n.onDispose(A.on(t, a)), {
|
|
1368
1384
|
status: n,
|
|
1369
1385
|
value: r,
|
|
1370
1386
|
error: s,
|
|
@@ -1372,9 +1388,9 @@ const Pn = cn, Sn = an, qt = rn, Tn = on, kn = (t, e, o) => {
|
|
|
1372
1388
|
reload: l,
|
|
1373
1389
|
dispose: h
|
|
1374
1390
|
};
|
|
1375
|
-
},
|
|
1391
|
+
}, Wn = (t, e) => {
|
|
1376
1392
|
const { status: o, dispose: n, reload: r } = t, { loading: s, failure: i, success: c } = e;
|
|
1377
|
-
return
|
|
1393
|
+
return q(
|
|
1378
1394
|
M(n),
|
|
1379
1395
|
ue(o, {
|
|
1380
1396
|
loading: s != null ? (a) => s(a, r) : void 0,
|
|
@@ -1382,25 +1398,25 @@ const Pn = cn, Sn = an, qt = rn, Tn = on, kn = (t, e, o) => {
|
|
|
1382
1398
|
success: (a) => c(a, r)
|
|
1383
1399
|
})
|
|
1384
1400
|
);
|
|
1385
|
-
},
|
|
1401
|
+
}, ro = ({
|
|
1386
1402
|
request: t,
|
|
1387
1403
|
load: e,
|
|
1388
1404
|
mapError: o = (n) => n
|
|
1389
1405
|
}) => {
|
|
1390
|
-
const n =
|
|
1391
|
-
return (r) =>
|
|
1392
|
-
},
|
|
1406
|
+
const n = Dn(t, e, o);
|
|
1407
|
+
return (r) => Wn(n, r);
|
|
1408
|
+
}, Fn = (t, e) => {
|
|
1393
1409
|
if (typeof e == "function")
|
|
1394
|
-
return
|
|
1395
|
-
const o = e.failure ?? ((r) =>
|
|
1410
|
+
return Fn(t, { success: e });
|
|
1411
|
+
const o = e.failure ?? ((r) => q(
|
|
1396
1412
|
M(r.on(console.error)),
|
|
1397
1413
|
r.map((s) => `Error: ${s}`)
|
|
1398
1414
|
)), n = e.success;
|
|
1399
|
-
return oe(
|
|
1415
|
+
return oe(A.toSignal(t), {
|
|
1400
1416
|
Success: (r) => n(r.$.value),
|
|
1401
1417
|
Failure: (r) => o(r.$.error)
|
|
1402
1418
|
});
|
|
1403
|
-
},
|
|
1419
|
+
}, so = () => ne.focus((t) => {
|
|
1404
1420
|
var e;
|
|
1405
1421
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1406
1422
|
});
|
|
@@ -1443,7 +1459,7 @@ class Rt {
|
|
|
1443
1459
|
* console.log(rect1.equals(rect3)); // true (within tolerance)
|
|
1444
1460
|
* ```
|
|
1445
1461
|
*/
|
|
1446
|
-
|
|
1462
|
+
Ot(this, "equals", (e) => ht(this.left, e.left) && ht(this.top, e.top) && ht(this.width, e.width) && ht(this.height, e.height));
|
|
1447
1463
|
this.left = e, this.top = o, this.width = n, this.height = r;
|
|
1448
1464
|
}
|
|
1449
1465
|
/**
|
|
@@ -1543,7 +1559,7 @@ class Rt {
|
|
|
1543
1559
|
return { width: this.width, height: this.height };
|
|
1544
1560
|
}
|
|
1545
1561
|
}
|
|
1546
|
-
function
|
|
1562
|
+
function Jt(t) {
|
|
1547
1563
|
const e = t.getBoundingClientRect();
|
|
1548
1564
|
return Rt.of({
|
|
1549
1565
|
top: e.top + window.scrollY,
|
|
@@ -1552,29 +1568,29 @@ function Xt(t) {
|
|
|
1552
1568
|
height: e.height
|
|
1553
1569
|
});
|
|
1554
1570
|
}
|
|
1555
|
-
const
|
|
1556
|
-
const { element: o } = e, n = F(
|
|
1571
|
+
const io = (t) => Te((e) => {
|
|
1572
|
+
const { element: o } = e, n = F(Jt(o), (c, a) => c.equals(a)), r = Mt(t(n))(e), s = () => n.set(Rt.of(Jt(o)));
|
|
1557
1573
|
let i = null;
|
|
1558
1574
|
return typeof ResizeObserver < "u" && (i = new ResizeObserver(s)), i == null || i.observe(o), M((c) => {
|
|
1559
1575
|
i == null || i.disconnect(), r(c);
|
|
1560
1576
|
});
|
|
1561
1577
|
});
|
|
1562
|
-
function
|
|
1578
|
+
function Gt(t) {
|
|
1563
1579
|
return {
|
|
1564
1580
|
/* c8 ignore next 6 */
|
|
1565
1581
|
width: (t == null ? void 0 : t.innerWidth) ?? 0,
|
|
1566
1582
|
height: (t == null ? void 0 : t.innerHeight) ?? 0
|
|
1567
1583
|
};
|
|
1568
1584
|
}
|
|
1569
|
-
const
|
|
1585
|
+
const co = (t) => (e) => {
|
|
1570
1586
|
const o = at(), n = F(
|
|
1571
|
-
|
|
1587
|
+
Gt(o),
|
|
1572
1588
|
(i, c) => i.width === c.width && i.height === c.height
|
|
1573
|
-
), r =
|
|
1589
|
+
), r = Mt(t(n))(e), s = () => n.set(Gt(o));
|
|
1574
1590
|
return o == null || o.addEventListener("resize", s), (i) => {
|
|
1575
1591
|
o == null || o.removeEventListener("resize", s), r(i);
|
|
1576
1592
|
};
|
|
1577
|
-
},
|
|
1593
|
+
}, Mn = (t, e) => {
|
|
1578
1594
|
const o = e.split("/").filter((r) => r !== ""), n = {};
|
|
1579
1595
|
for (let r = 0; r < t.length; r++) {
|
|
1580
1596
|
const s = t[r], i = o[r];
|
|
@@ -1589,14 +1605,14 @@ const io = (t) => (e) => {
|
|
|
1589
1605
|
return { params: n, path: e };
|
|
1590
1606
|
}
|
|
1591
1607
|
return o.length !== t.length ? null : { params: n, path: e };
|
|
1592
|
-
},
|
|
1608
|
+
}, Oe = (t) => t.split("/").map((e) => e.startsWith(":") ? { type: "param", name: e.slice(1) } : e === "*" ? { type: "catch-all" } : { type: "literal", value: e }).filter((e) => e.type !== "literal" || e.value !== ""), ao = (t) => {
|
|
1593
1609
|
const e = t.map((o) => {
|
|
1594
|
-
const n =
|
|
1610
|
+
const n = Oe(o);
|
|
1595
1611
|
return { route: o, segments: n };
|
|
1596
1612
|
});
|
|
1597
1613
|
return function(n) {
|
|
1598
1614
|
for (const { segments: r, route: s } of e) {
|
|
1599
|
-
const i =
|
|
1615
|
+
const i = Mn(r, n);
|
|
1600
1616
|
if (i)
|
|
1601
1617
|
return { ...i, route: s };
|
|
1602
1618
|
}
|
|
@@ -1611,7 +1627,7 @@ const io = (t) => (e) => {
|
|
|
1611
1627
|
dispose: () => t.dispose()
|
|
1612
1628
|
};
|
|
1613
1629
|
}
|
|
1614
|
-
},
|
|
1630
|
+
}, Nn = (t, e, o) => {
|
|
1615
1631
|
const n = o.split("/").filter((i) => i !== ""), r = {};
|
|
1616
1632
|
let s = 0;
|
|
1617
1633
|
for (let i = 0; i < t.length; i++) {
|
|
@@ -1644,25 +1660,25 @@ const io = (t) => (e) => {
|
|
|
1644
1660
|
};
|
|
1645
1661
|
}
|
|
1646
1662
|
return null;
|
|
1647
|
-
},
|
|
1663
|
+
}, Ae = (t) => {
|
|
1648
1664
|
const e = t.map((o) => {
|
|
1649
|
-
const n =
|
|
1665
|
+
const n = Oe(o);
|
|
1650
1666
|
return { route: o, segments: n };
|
|
1651
1667
|
});
|
|
1652
1668
|
return function(n) {
|
|
1653
1669
|
for (const { segments: r, route: s } of e) {
|
|
1654
|
-
const i =
|
|
1670
|
+
const i = Nn(r, s, n);
|
|
1655
1671
|
if (i)
|
|
1656
1672
|
return i;
|
|
1657
1673
|
}
|
|
1658
1674
|
return null;
|
|
1659
1675
|
};
|
|
1660
|
-
},
|
|
1661
|
-
const e =
|
|
1676
|
+
}, lo = (t) => {
|
|
1677
|
+
const e = Ae(Object.keys(t));
|
|
1662
1678
|
return ke(
|
|
1663
1679
|
Ct,
|
|
1664
1680
|
{},
|
|
1665
|
-
() =>
|
|
1681
|
+
() => st(Nt, (o) => st(Ct, (n) => {
|
|
1666
1682
|
const r = o.map((s) => {
|
|
1667
1683
|
const i = e(s.pathname);
|
|
1668
1684
|
if (i == null)
|
|
@@ -1688,9 +1704,9 @@ const io = (t) => (e) => {
|
|
|
1688
1704
|
);
|
|
1689
1705
|
}))
|
|
1690
1706
|
);
|
|
1691
|
-
},
|
|
1692
|
-
const e =
|
|
1693
|
-
return
|
|
1707
|
+
}, uo = (t) => {
|
|
1708
|
+
const e = Ae(Object.keys(t));
|
|
1709
|
+
return st(Ct, (o) => st(Nt, (n) => {
|
|
1694
1710
|
const r = o.map((s) => {
|
|
1695
1711
|
const i = s[s.length - 1], c = (i == null ? void 0 : i.remainingPath) || "";
|
|
1696
1712
|
if (c === "")
|
|
@@ -1713,7 +1729,7 @@ const io = (t) => (e) => {
|
|
|
1713
1729
|
t
|
|
1714
1730
|
);
|
|
1715
1731
|
}));
|
|
1716
|
-
}, yt = 60 * 1e3, Dt = 60 * yt, ct = 24 * Dt,
|
|
1732
|
+
}, yt = 60 * 1e3, Dt = 60 * yt, ct = 24 * Dt, Qt = 7 * ct, Zt = 30 * ct, Vn = 365 * ct, $n = [
|
|
1717
1733
|
{
|
|
1718
1734
|
max: yt * 90,
|
|
1719
1735
|
value: yt,
|
|
@@ -1736,28 +1752,28 @@ const io = (t) => (e) => {
|
|
|
1736
1752
|
future: { singular: "tomorrow", plural: "in {} days" }
|
|
1737
1753
|
},
|
|
1738
1754
|
{
|
|
1739
|
-
max:
|
|
1740
|
-
value:
|
|
1755
|
+
max: Qt * 6,
|
|
1756
|
+
value: Qt,
|
|
1741
1757
|
name: "week",
|
|
1742
1758
|
past: { singular: "last week", plural: "{} weeks ago" },
|
|
1743
1759
|
future: { singular: "in a week", plural: "in {} weeks" }
|
|
1744
1760
|
},
|
|
1745
1761
|
{
|
|
1746
|
-
max:
|
|
1747
|
-
value:
|
|
1762
|
+
max: Zt * 18,
|
|
1763
|
+
value: Zt,
|
|
1748
1764
|
name: "month",
|
|
1749
1765
|
past: { singular: "last month", plural: "{} months ago" },
|
|
1750
1766
|
future: { singular: "in a month", plural: "in {} months" }
|
|
1751
1767
|
},
|
|
1752
1768
|
{
|
|
1753
1769
|
max: 1 / 0,
|
|
1754
|
-
value:
|
|
1770
|
+
value: Vn,
|
|
1755
1771
|
name: "year",
|
|
1756
1772
|
past: { singular: "last year", plural: "{} years ago" },
|
|
1757
1773
|
future: { singular: "in a year", plural: "in {} years" }
|
|
1758
1774
|
}
|
|
1759
1775
|
];
|
|
1760
|
-
function
|
|
1776
|
+
function te(t, e, o, n) {
|
|
1761
1777
|
const r = Math.round(t / e);
|
|
1762
1778
|
return r <= 1 ? o : n.replace(
|
|
1763
1779
|
"{}",
|
|
@@ -1767,84 +1783,85 @@ function Zt(t, e, o, n) {
|
|
|
1767
1783
|
})
|
|
1768
1784
|
);
|
|
1769
1785
|
}
|
|
1770
|
-
const
|
|
1786
|
+
const Hn = (t = 1e3) => {
|
|
1771
1787
|
const e = F(/* @__PURE__ */ new Date()), o = De(() => e.set(/* @__PURE__ */ new Date()), t);
|
|
1772
1788
|
return e.onDispose(o), e;
|
|
1773
|
-
},
|
|
1789
|
+
}, Bn = (t) => {
|
|
1774
1790
|
const e = Math.abs(t);
|
|
1775
1791
|
if (e < yt)
|
|
1776
1792
|
return t < 0 ? "just now" : "in a moment";
|
|
1777
|
-
for (const o of
|
|
1793
|
+
for (const o of $n)
|
|
1778
1794
|
if (e < o.max)
|
|
1779
|
-
return t < 0 ?
|
|
1795
|
+
return t < 0 ? te(e, o.value, o.past.singular, o.past.plural) : te(e, o.value, o.future.singular, o.future.plural);
|
|
1780
1796
|
throw new Error("unreachable");
|
|
1781
|
-
},
|
|
1782
|
-
const n = e != null ?
|
|
1797
|
+
}, Un = (t, { now: e, frequency: o = 1e4 } = {}) => {
|
|
1798
|
+
const n = e != null ? ee.is(e) ? e.derive() : F(e) : Hn(o), r = ie(
|
|
1783
1799
|
t,
|
|
1784
1800
|
n
|
|
1785
1801
|
)((s, i) => s.getTime() - i.getTime());
|
|
1786
|
-
return r.onDispose(() =>
|
|
1787
|
-
},
|
|
1788
|
-
const o =
|
|
1802
|
+
return r.onDispose(() => A.dispose(n)), r;
|
|
1803
|
+
}, zn = (t, e = {}) => {
|
|
1804
|
+
const o = Un(t, e), n = o.map(Bn);
|
|
1789
1805
|
return n.onDispose(o.dispose), n;
|
|
1790
|
-
},
|
|
1791
|
-
class
|
|
1806
|
+
}, fo = (t, e = {}) => zn(t, e);
|
|
1807
|
+
class Kn extends Ce {
|
|
1792
1808
|
constructor() {
|
|
1793
1809
|
super(...arguments);
|
|
1794
1810
|
/**
|
|
1795
1811
|
* Triggers an update of the Ticker by incrementing its internal value.
|
|
1796
1812
|
* @returns void
|
|
1797
1813
|
*/
|
|
1798
|
-
|
|
1814
|
+
Ot(this, "tick", () => this.update((o) => o + 1));
|
|
1799
1815
|
}
|
|
1800
1816
|
}
|
|
1801
|
-
const
|
|
1817
|
+
const ho = (t = 0) => new Kn(t, (e, o) => e === o);
|
|
1802
1818
|
export {
|
|
1803
1819
|
Ke as Anchor,
|
|
1804
|
-
|
|
1820
|
+
Yn as Appearance,
|
|
1805
1821
|
ue as AsyncResultView,
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1822
|
+
qn as AutoFocus,
|
|
1823
|
+
Xn as AutoSelect,
|
|
1824
|
+
uo as ChildRouter,
|
|
1825
|
+
io as ElementRect,
|
|
1826
|
+
Qn as HTMLTitle,
|
|
1827
|
+
Gn as HiddenWhenEmpty,
|
|
1812
1828
|
Ye as InViewport,
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1829
|
+
Nt as Location,
|
|
1830
|
+
qe as OnClickOutside,
|
|
1831
|
+
to as OnEnterKey,
|
|
1832
|
+
eo as OnEscapeKey,
|
|
1817
1833
|
fe as OnKeyPressed,
|
|
1818
|
-
|
|
1834
|
+
oo as PopOver,
|
|
1819
1835
|
Rt as Rect,
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1836
|
+
ro as Resource,
|
|
1837
|
+
Wn as ResourceDisplay,
|
|
1838
|
+
Fn as ResultView,
|
|
1839
|
+
lo as RootRouter,
|
|
1824
1840
|
Ct as RouterContextProvider,
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1841
|
+
so as SelectOnFocus,
|
|
1842
|
+
Kn as Ticker,
|
|
1843
|
+
Zn as WhenInViewport,
|
|
1844
|
+
co as WindowSize,
|
|
1829
1845
|
Fe as _checkExtensionCondition,
|
|
1830
1846
|
We as _getExtension,
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1847
|
+
ao as _makeRouteMatcher,
|
|
1848
|
+
Oe as _parseRouteSegments,
|
|
1849
|
+
no as allPlacements,
|
|
1834
1850
|
Ve as areLocationsEqual,
|
|
1835
|
-
|
|
1851
|
+
Jn as classes,
|
|
1852
|
+
Jt as getAbsoluteRect,
|
|
1836
1853
|
Ne as handleAnchorClick,
|
|
1837
1854
|
le as locationFromURL,
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1855
|
+
Dn as makeResource,
|
|
1856
|
+
Xe as matchesKeyCombo,
|
|
1857
|
+
Mn as matchesRoute,
|
|
1858
|
+
Hn as nowSignal,
|
|
1859
|
+
fo as relativeTime,
|
|
1860
|
+
Un as relativeTimeMillisSignal,
|
|
1861
|
+
zn as relativeTimeSignal,
|
|
1862
|
+
Kt as setLocationFromUrl,
|
|
1863
|
+
ho as ticker,
|
|
1864
|
+
Bn as timeDiffToString,
|
|
1848
1865
|
Pt as urlFromLocation,
|
|
1849
|
-
|
|
1866
|
+
je as useAppearance
|
|
1850
1867
|
};
|