@tempots/ui 7.0.2 → 8.0.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/README.md +21 -12
- package/index.cjs +1 -1
- package/index.d.ts +2 -2
- package/index.js +547 -522
- package/package.json +3 -3
- package/renderables/mutation.d.ts +69 -0
- package/renderables/{resource.d.ts → query.d.ts} +58 -41
- package/renderables/size.d.ts +1 -1
- package/utils/mutation-resource.d.ts +59 -0
- package/utils/query-resource.d.ts +67 -0
- package/utils/resource.d.ts +0 -54
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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 ee, Use as
|
|
5
|
-
import { delayed as ae, AsyncResult as
|
|
3
|
+
var At = (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 rt, html as Et, on as ne, Value as O, attr as Ft, Empty as Lt, OneOfType as oe, WithElement as H, OnDispose as M, Fragment as q, Portal as se, renderableOfTNode as Mt, When as re, effectOf as Te, computedOf as ie, WithBrowserCtx as Se, Provide as ke, OneOfTuple as ce, Prop as Ce } from "@tempots/dom";
|
|
5
|
+
import { delayed as ae, AsyncResult as B, nearEqual as ht, interval as De } from "@tempots/std";
|
|
6
6
|
const We = (t) => {
|
|
7
7
|
const e = t.split("/").pop();
|
|
8
8
|
if (e == null || e.startsWith(".")) return;
|
|
@@ -12,21 +12,21 @@ const We = (t) => {
|
|
|
12
12
|
const o = We(e);
|
|
13
13
|
return o != null && (t.length === 0 || !t.some((n) => o == n));
|
|
14
14
|
}, Me = (t, e, o, n) => {
|
|
15
|
-
let
|
|
16
|
-
for (;
|
|
17
|
-
|
|
18
|
-
if (
|
|
15
|
+
let s = t.target;
|
|
16
|
+
for (; s != null && !(s instanceof HTMLAnchorElement); )
|
|
17
|
+
s = s.parentElement;
|
|
18
|
+
if (s == null)
|
|
19
19
|
return !0;
|
|
20
|
-
const
|
|
21
|
-
if (t.button !== 0 || t.ctrlKey || t.metaKey ||
|
|
20
|
+
const i = s;
|
|
21
|
+
if (t.button !== 0 || t.ctrlKey || t.metaKey || i.target !== "_self" && i.target !== "" || i.getAttribute("download") != null)
|
|
22
22
|
return !0;
|
|
23
|
-
const { pathname:
|
|
23
|
+
const { pathname: r, search: c, hash: a } = i;
|
|
24
24
|
if (n) {
|
|
25
|
-
const l =
|
|
26
|
-
if (!(
|
|
25
|
+
const l = r + c + a, f = i.getAttribute("href");
|
|
26
|
+
if (!(f != null && f.startsWith("#")) && f !== l)
|
|
27
27
|
return !0;
|
|
28
28
|
}
|
|
29
|
-
return e ? !1 : Fe(o,
|
|
29
|
+
return e ? !1 : Fe(o, r);
|
|
30
30
|
}, Ne = (t, e = {
|
|
31
31
|
ignoreUrlWithExtension: !0,
|
|
32
32
|
allowedExtensions: [],
|
|
@@ -44,13 +44,13 @@ const We = (t) => {
|
|
|
44
44
|
) || t() && n.preventDefault();
|
|
45
45
|
};
|
|
46
46
|
}, Ve = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, le = (t, e) => {
|
|
47
|
-
var
|
|
48
|
-
const o = new URL(t, e ?? ((
|
|
49
|
-
let
|
|
50
|
-
return
|
|
47
|
+
var i, r;
|
|
48
|
+
const o = new URL(t, e ?? ((i = at()) == null ? void 0 : i.location.toString())), n = Object.fromEntries(((r = o.searchParams) == null ? void 0 : r.entries()) ?? []);
|
|
49
|
+
let s = o.hash;
|
|
50
|
+
return s.startsWith("#") && (s = s.substring(1)), {
|
|
51
51
|
pathname: o.pathname,
|
|
52
52
|
search: n,
|
|
53
|
-
hash:
|
|
53
|
+
hash: s === "" ? void 0 : s
|
|
54
54
|
};
|
|
55
55
|
}, Kt = (t, e) => {
|
|
56
56
|
const o = le(e);
|
|
@@ -64,8 +64,8 @@ const We = (t) => {
|
|
|
64
64
|
(n) => {
|
|
65
65
|
if ($e(n.pathname))
|
|
66
66
|
return Pt(n);
|
|
67
|
-
const
|
|
68
|
-
return Pt({ ...n, pathname:
|
|
67
|
+
const s = new URL(n.pathname, e.value), i = s.origin + s.pathname;
|
|
68
|
+
return Pt({ ...n, pathname: i });
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
return { value: o, dispose: o.dispose };
|
|
@@ -82,14 +82,14 @@ const We = (t) => {
|
|
|
82
82
|
const t = F(He(), Ve), e = at(), o = () => {
|
|
83
83
|
let n = (e == null ? void 0 : e.location.hash) ?? "";
|
|
84
84
|
n.startsWith("#") && (n = n.substring(1));
|
|
85
|
-
const
|
|
85
|
+
const s = {
|
|
86
86
|
pathname: (e == null ? void 0 : e.location.pathname) ?? "",
|
|
87
87
|
search: Object.fromEntries(
|
|
88
88
|
new URLSearchParams((e == null ? void 0 : e.location.search) ?? "").entries()
|
|
89
89
|
),
|
|
90
90
|
hash: n === "" ? void 0 : n
|
|
91
91
|
};
|
|
92
|
-
t.set(
|
|
92
|
+
t.set(s);
|
|
93
93
|
};
|
|
94
94
|
return e == null || e.addEventListener("popstate", o), t.onDispose(() => {
|
|
95
95
|
e == null || e.removeEventListener("popstate", o);
|
|
@@ -116,13 +116,13 @@ const We = (t) => {
|
|
|
116
116
|
const {
|
|
117
117
|
href: o,
|
|
118
118
|
withViewTransition: n,
|
|
119
|
-
...
|
|
119
|
+
...s
|
|
120
120
|
} = t;
|
|
121
|
-
return
|
|
121
|
+
return rt(Nt, (i) => Et.a(
|
|
122
122
|
ne.click(
|
|
123
123
|
Ne(() => (n === !0 ? ze(() => {
|
|
124
|
-
Kt(
|
|
125
|
-
}) : Kt(
|
|
124
|
+
Kt(i, O.get(o));
|
|
125
|
+
}) : Kt(i, O.get(o)), !0), s)
|
|
126
126
|
),
|
|
127
127
|
Ft.href(o),
|
|
128
128
|
...e
|
|
@@ -139,37 +139,37 @@ const We = (t) => {
|
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
141
|
function je() {
|
|
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"),
|
|
143
|
-
return e == null || e.addEventListener("change",
|
|
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"), s = (i) => n.set(i.matches ? "dark" : "light");
|
|
143
|
+
return e == null || e.addEventListener("change", s), n.onDispose(() => e == null ? void 0 : e.removeEventListener("change", s)), n;
|
|
144
144
|
}
|
|
145
145
|
const ue = (t, e) => {
|
|
146
146
|
if (typeof e == "function")
|
|
147
147
|
return ue(t, { success: e });
|
|
148
|
-
const o = e.failure ?? ((
|
|
149
|
-
return oe(
|
|
150
|
-
AsyncSuccess: (
|
|
151
|
-
AsyncFailure: (
|
|
152
|
-
Loading: (
|
|
153
|
-
NotAsked:
|
|
148
|
+
const o = e.failure ?? ((r) => r.map((c) => `Error: ${c}`)), n = e.success, s = e.loading ?? (() => Lt), i = e.notAsked ?? (() => Lt);
|
|
149
|
+
return oe(O.toSignal(t), {
|
|
150
|
+
AsyncSuccess: (r) => n(r.$.value),
|
|
151
|
+
AsyncFailure: (r) => o(r.$.error),
|
|
152
|
+
Loading: (r) => s(r.map((c) => c.previousValue)),
|
|
153
|
+
NotAsked: i
|
|
154
154
|
});
|
|
155
|
-
}, qn = (t = 10) =>
|
|
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
|
|
159
|
+
function Qn(t) {
|
|
160
160
|
const e = Object.entries(t);
|
|
161
161
|
return q(
|
|
162
162
|
...e.map(
|
|
163
|
-
([o, n]) => Ft.class(
|
|
163
|
+
([o, n]) => Ft.class(O.map(n, (s) => s ? o : void 0))
|
|
164
164
|
)
|
|
165
165
|
);
|
|
166
166
|
}
|
|
167
|
-
const
|
|
167
|
+
const Jn = H((t) => {
|
|
168
168
|
const e = t.style.getPropertyValue(":empty");
|
|
169
169
|
return t.style.setProperty(":empty", "display:none"), M((o) => {
|
|
170
170
|
o && t.style.setProperty(":empty", e);
|
|
171
171
|
});
|
|
172
|
-
}),
|
|
172
|
+
}), Gn = (t) => se("head > title", Ft.innerText(t)), _e = {
|
|
173
173
|
partial: {
|
|
174
174
|
root: null,
|
|
175
175
|
rootMargin: "0px",
|
|
@@ -183,40 +183,40 @@ const Gn = B((t) => {
|
|
|
183
183
|
}, mt = {
|
|
184
184
|
partial: /* @__PURE__ */ new Map(),
|
|
185
185
|
full: /* @__PURE__ */ new Map()
|
|
186
|
-
},
|
|
186
|
+
}, st = {
|
|
187
187
|
partial: null,
|
|
188
188
|
full: null
|
|
189
189
|
};
|
|
190
190
|
function Ie(t) {
|
|
191
|
-
return
|
|
191
|
+
return st[t] == null && (st[t] = new IntersectionObserver((e) => {
|
|
192
192
|
e.forEach((o) => {
|
|
193
193
|
const n = mt[t].get(o.target);
|
|
194
194
|
n == null || n.set(o.isIntersecting);
|
|
195
195
|
});
|
|
196
|
-
}, _e[t])),
|
|
196
|
+
}, _e[t])), st[t];
|
|
197
197
|
}
|
|
198
198
|
const Ye = ({ mode: t = "partial", once: e = !1 }, o) => {
|
|
199
199
|
const n = F(!1);
|
|
200
200
|
return q(
|
|
201
|
-
|
|
202
|
-
const
|
|
203
|
-
mt[t].set(
|
|
204
|
-
function
|
|
201
|
+
H((s) => {
|
|
202
|
+
const i = typeof IntersectionObserver < "u" ? Ie(t) : null;
|
|
203
|
+
mt[t].set(s, n), i == null || i.observe(s);
|
|
204
|
+
function r() {
|
|
205
205
|
var a;
|
|
206
|
-
|
|
206
|
+
i == null || i.unobserve(s), mt[t].delete(s), mt[t].size === 0 && ((a = st[t]) == null || a.disconnect(), st[t] = null);
|
|
207
207
|
}
|
|
208
208
|
let c = null;
|
|
209
209
|
return e && (c = n.on((a) => {
|
|
210
|
-
a &&
|
|
210
|
+
a && r();
|
|
211
211
|
})), M(() => {
|
|
212
|
-
n.dispose(),
|
|
212
|
+
n.dispose(), r(), c == null || c();
|
|
213
213
|
});
|
|
214
214
|
}),
|
|
215
215
|
Mt(o(n))
|
|
216
216
|
);
|
|
217
|
-
}, Zn = (t, e, o) => Ye(t, (n) =>
|
|
217
|
+
}, Zn = (t, e, o) => Ye(t, (n) => re(n, e, o ?? (() => Lt)));
|
|
218
218
|
function qe(t) {
|
|
219
|
-
return
|
|
219
|
+
return H((e) => {
|
|
220
220
|
const o = (n) => {
|
|
221
221
|
e.contains(n.target) || t(n);
|
|
222
222
|
};
|
|
@@ -225,9 +225,9 @@ function qe(t) {
|
|
|
225
225
|
});
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
|
-
const
|
|
228
|
+
const G = (t, e) => t === void 0 || t === e, jt = (t, e) => t === void 0 || t === e;
|
|
229
229
|
function Xe(t, e) {
|
|
230
|
-
return typeof t == "string" ? e.key === t : jt(t.key, e.key) && jt(t.code, e.code) &&
|
|
230
|
+
return typeof t == "string" ? e.key === t : jt(t.key, e.key) && jt(t.code, e.code) && G(t.ctrlKey, e.ctrlKey) && G(t.altKey, e.altKey) && G(t.shiftKey, e.shiftKey) && G(t.metaKey, e.metaKey) && G(t.repeat, e.repeat) && G(
|
|
231
231
|
t.commandOrControlKey,
|
|
232
232
|
e.metaKey || e.ctrlKey
|
|
233
233
|
);
|
|
@@ -236,12 +236,12 @@ function fe({
|
|
|
236
236
|
allowedKeys: t,
|
|
237
237
|
handler: e
|
|
238
238
|
}) {
|
|
239
|
-
return
|
|
240
|
-
const n = (
|
|
241
|
-
if (o.contains(
|
|
242
|
-
for (const
|
|
243
|
-
if (Xe(
|
|
244
|
-
e(
|
|
239
|
+
return H((o) => {
|
|
240
|
+
const n = (s) => {
|
|
241
|
+
if (o.contains(s.target)) {
|
|
242
|
+
for (const i of t)
|
|
243
|
+
if (Xe(i, s)) {
|
|
244
|
+
e(s);
|
|
245
245
|
break;
|
|
246
246
|
}
|
|
247
247
|
}
|
|
@@ -260,22 +260,22 @@ function eo(t) {
|
|
|
260
260
|
const tt = Math.min, X = Math.max, gt = Math.round, dt = Math.floor, D = (t) => ({
|
|
261
261
|
x: t,
|
|
262
262
|
y: t
|
|
263
|
-
}),
|
|
263
|
+
}), Qe = {
|
|
264
264
|
left: "right",
|
|
265
265
|
right: "left",
|
|
266
266
|
bottom: "top",
|
|
267
267
|
top: "bottom"
|
|
268
|
-
},
|
|
268
|
+
}, Je = {
|
|
269
269
|
start: "end",
|
|
270
270
|
end: "start"
|
|
271
271
|
};
|
|
272
|
-
function
|
|
272
|
+
function Tt(t, e, o) {
|
|
273
273
|
return X(t, tt(e, o));
|
|
274
274
|
}
|
|
275
275
|
function lt(t, e) {
|
|
276
276
|
return typeof t == "function" ? t(e) : t;
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function Q(t) {
|
|
279
279
|
return t.split("-")[0];
|
|
280
280
|
}
|
|
281
281
|
function ut(t) {
|
|
@@ -288,44 +288,44 @@ function Vt(t) {
|
|
|
288
288
|
return t === "y" ? "height" : "width";
|
|
289
289
|
}
|
|
290
290
|
function z(t) {
|
|
291
|
-
return ["top", "bottom"].includes(
|
|
291
|
+
return ["top", "bottom"].includes(Q(t)) ? "y" : "x";
|
|
292
292
|
}
|
|
293
293
|
function $t(t) {
|
|
294
294
|
return he(z(t));
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function Ge(t, e, o) {
|
|
297
297
|
o === void 0 && (o = !1);
|
|
298
|
-
const n = ut(t),
|
|
299
|
-
let
|
|
300
|
-
return e.reference[
|
|
298
|
+
const n = ut(t), s = $t(t), i = Vt(s);
|
|
299
|
+
let r = s === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
300
|
+
return e.reference[i] > e.floating[i] && (r = pt(r)), [r, pt(r)];
|
|
301
301
|
}
|
|
302
302
|
function Ze(t) {
|
|
303
303
|
const e = pt(t);
|
|
304
|
-
return [
|
|
304
|
+
return [St(t), e, St(e)];
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
return t.replace(/start|end/g, (e) =>
|
|
306
|
+
function St(t) {
|
|
307
|
+
return t.replace(/start|end/g, (e) => Je[e]);
|
|
308
308
|
}
|
|
309
309
|
function tn(t, e, o) {
|
|
310
|
-
const n = ["left", "right"],
|
|
310
|
+
const n = ["left", "right"], s = ["right", "left"], i = ["top", "bottom"], r = ["bottom", "top"];
|
|
311
311
|
switch (t) {
|
|
312
312
|
case "top":
|
|
313
313
|
case "bottom":
|
|
314
|
-
return o ? e ?
|
|
314
|
+
return o ? e ? s : n : e ? n : s;
|
|
315
315
|
case "left":
|
|
316
316
|
case "right":
|
|
317
|
-
return e ?
|
|
317
|
+
return e ? i : r;
|
|
318
318
|
default:
|
|
319
319
|
return [];
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
function en(t, e, o, n) {
|
|
323
|
-
const
|
|
324
|
-
let
|
|
325
|
-
return
|
|
323
|
+
const s = ut(t);
|
|
324
|
+
let i = tn(Q(t), o === "start", n);
|
|
325
|
+
return s && (i = i.map((r) => r + "-" + s), e && (i = i.concat(i.map(St)))), i;
|
|
326
326
|
}
|
|
327
327
|
function pt(t) {
|
|
328
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
328
|
+
return t.replace(/left|right|bottom|top/g, (e) => Qe[e]);
|
|
329
329
|
}
|
|
330
330
|
function nn(t) {
|
|
331
331
|
return {
|
|
@@ -349,15 +349,15 @@ function wt(t) {
|
|
|
349
349
|
x: e,
|
|
350
350
|
y: o,
|
|
351
351
|
width: n,
|
|
352
|
-
height:
|
|
352
|
+
height: s
|
|
353
353
|
} = t;
|
|
354
354
|
return {
|
|
355
355
|
width: n,
|
|
356
|
-
height:
|
|
356
|
+
height: s,
|
|
357
357
|
top: o,
|
|
358
358
|
left: e,
|
|
359
359
|
right: e + n,
|
|
360
|
-
bottom: o +
|
|
360
|
+
bottom: o + s,
|
|
361
361
|
x: e,
|
|
362
362
|
y: o
|
|
363
363
|
};
|
|
@@ -365,33 +365,33 @@ function wt(t) {
|
|
|
365
365
|
function _t(t, e, o) {
|
|
366
366
|
let {
|
|
367
367
|
reference: n,
|
|
368
|
-
floating:
|
|
368
|
+
floating: s
|
|
369
369
|
} = t;
|
|
370
|
-
const
|
|
370
|
+
const i = z(e), r = $t(e), c = Vt(r), a = Q(e), l = i === "y", f = n.x + n.width / 2 - s.width / 2, h = n.y + n.height / 2 - s.height / 2, m = n[c] / 2 - s[c] / 2;
|
|
371
371
|
let u;
|
|
372
372
|
switch (a) {
|
|
373
373
|
case "top":
|
|
374
374
|
u = {
|
|
375
|
-
x:
|
|
376
|
-
y: n.y -
|
|
375
|
+
x: f,
|
|
376
|
+
y: n.y - s.height
|
|
377
377
|
};
|
|
378
378
|
break;
|
|
379
379
|
case "bottom":
|
|
380
380
|
u = {
|
|
381
|
-
x:
|
|
381
|
+
x: f,
|
|
382
382
|
y: n.y + n.height
|
|
383
383
|
};
|
|
384
384
|
break;
|
|
385
385
|
case "right":
|
|
386
386
|
u = {
|
|
387
387
|
x: n.x + n.width,
|
|
388
|
-
y:
|
|
388
|
+
y: h
|
|
389
389
|
};
|
|
390
390
|
break;
|
|
391
391
|
case "left":
|
|
392
392
|
u = {
|
|
393
|
-
x: n.x -
|
|
394
|
-
y:
|
|
393
|
+
x: n.x - s.width,
|
|
394
|
+
y: h
|
|
395
395
|
};
|
|
396
396
|
break;
|
|
397
397
|
default:
|
|
@@ -402,10 +402,10 @@ function _t(t, e, o) {
|
|
|
402
402
|
}
|
|
403
403
|
switch (ut(e)) {
|
|
404
404
|
case "start":
|
|
405
|
-
u[
|
|
405
|
+
u[r] -= m * (o && l ? -1 : 1);
|
|
406
406
|
break;
|
|
407
407
|
case "end":
|
|
408
|
-
u[
|
|
408
|
+
u[r] += m * (o && l ? -1 : 1);
|
|
409
409
|
break;
|
|
410
410
|
}
|
|
411
411
|
return u;
|
|
@@ -413,61 +413,61 @@ function _t(t, e, o) {
|
|
|
413
413
|
const on = async (t, e, o) => {
|
|
414
414
|
const {
|
|
415
415
|
placement: n = "bottom",
|
|
416
|
-
strategy:
|
|
417
|
-
middleware:
|
|
418
|
-
platform:
|
|
419
|
-
} = o, c =
|
|
420
|
-
let l = await
|
|
416
|
+
strategy: s = "absolute",
|
|
417
|
+
middleware: i = [],
|
|
418
|
+
platform: r
|
|
419
|
+
} = o, c = i.filter(Boolean), a = await (r.isRTL == null ? void 0 : r.isRTL(e));
|
|
420
|
+
let l = await r.getElementRects({
|
|
421
421
|
reference: t,
|
|
422
422
|
floating: e,
|
|
423
|
-
strategy:
|
|
423
|
+
strategy: s
|
|
424
424
|
}), {
|
|
425
|
-
x:
|
|
426
|
-
y:
|
|
427
|
-
} = _t(l, n, a), m = n, u = {},
|
|
428
|
-
for (let
|
|
425
|
+
x: f,
|
|
426
|
+
y: h
|
|
427
|
+
} = _t(l, n, a), m = n, u = {}, g = 0;
|
|
428
|
+
for (let w = 0; w < c.length; w++) {
|
|
429
429
|
const {
|
|
430
|
-
name:
|
|
431
|
-
fn:
|
|
432
|
-
} = c[
|
|
430
|
+
name: d,
|
|
431
|
+
fn: p
|
|
432
|
+
} = c[w], {
|
|
433
433
|
x,
|
|
434
434
|
y,
|
|
435
435
|
data: b,
|
|
436
436
|
reset: v
|
|
437
|
-
} = await
|
|
438
|
-
x:
|
|
439
|
-
y:
|
|
437
|
+
} = await p({
|
|
438
|
+
x: f,
|
|
439
|
+
y: h,
|
|
440
440
|
initialPlacement: n,
|
|
441
441
|
placement: m,
|
|
442
|
-
strategy:
|
|
442
|
+
strategy: s,
|
|
443
443
|
middlewareData: u,
|
|
444
444
|
rects: l,
|
|
445
|
-
platform:
|
|
445
|
+
platform: r,
|
|
446
446
|
elements: {
|
|
447
447
|
reference: t,
|
|
448
448
|
floating: e
|
|
449
449
|
}
|
|
450
450
|
});
|
|
451
|
-
|
|
451
|
+
f = x ?? f, h = y ?? h, u = {
|
|
452
452
|
...u,
|
|
453
|
-
[
|
|
454
|
-
...u[
|
|
453
|
+
[d]: {
|
|
454
|
+
...u[d],
|
|
455
455
|
...b
|
|
456
456
|
}
|
|
457
|
-
}, v &&
|
|
457
|
+
}, v && g <= 50 && (g++, typeof v == "object" && (v.placement && (m = v.placement), v.rects && (l = v.rects === !0 ? await r.getElementRects({
|
|
458
458
|
reference: t,
|
|
459
459
|
floating: e,
|
|
460
|
-
strategy:
|
|
460
|
+
strategy: s
|
|
461
461
|
}) : v.rects), {
|
|
462
|
-
x:
|
|
463
|
-
y:
|
|
464
|
-
} = _t(l, m, a)),
|
|
462
|
+
x: f,
|
|
463
|
+
y: h
|
|
464
|
+
} = _t(l, m, a)), w = -1);
|
|
465
465
|
}
|
|
466
466
|
return {
|
|
467
|
-
x:
|
|
468
|
-
y:
|
|
467
|
+
x: f,
|
|
468
|
+
y: h,
|
|
469
469
|
placement: m,
|
|
470
|
-
strategy:
|
|
470
|
+
strategy: s,
|
|
471
471
|
middlewareData: u
|
|
472
472
|
};
|
|
473
473
|
};
|
|
@@ -476,155 +476,155 @@ async function me(t, e) {
|
|
|
476
476
|
e === void 0 && (e = {});
|
|
477
477
|
const {
|
|
478
478
|
x: n,
|
|
479
|
-
y:
|
|
480
|
-
platform:
|
|
481
|
-
rects:
|
|
479
|
+
y: s,
|
|
480
|
+
platform: i,
|
|
481
|
+
rects: r,
|
|
482
482
|
elements: c,
|
|
483
483
|
strategy: a
|
|
484
484
|
} = t, {
|
|
485
485
|
boundary: l = "clippingAncestors",
|
|
486
|
-
rootBoundary:
|
|
487
|
-
elementContext:
|
|
486
|
+
rootBoundary: f = "viewport",
|
|
487
|
+
elementContext: h = "floating",
|
|
488
488
|
altBoundary: m = !1,
|
|
489
489
|
padding: u = 0
|
|
490
|
-
} = lt(e, t),
|
|
491
|
-
element: (o = await (
|
|
490
|
+
} = lt(e, t), g = de(u), d = c[m ? h === "floating" ? "reference" : "floating" : h], p = wt(await i.getClippingRect({
|
|
491
|
+
element: (o = await (i.isElement == null ? void 0 : i.isElement(d))) == null || o ? d : d.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
492
492
|
boundary: l,
|
|
493
|
-
rootBoundary:
|
|
493
|
+
rootBoundary: f,
|
|
494
494
|
strategy: a
|
|
495
|
-
})), x =
|
|
495
|
+
})), x = h === "floating" ? {
|
|
496
496
|
x: n,
|
|
497
|
-
y:
|
|
498
|
-
width:
|
|
499
|
-
height:
|
|
500
|
-
} :
|
|
497
|
+
y: s,
|
|
498
|
+
width: r.floating.width,
|
|
499
|
+
height: r.floating.height
|
|
500
|
+
} : r.reference, y = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), b = await (i.isElement == null ? void 0 : i.isElement(y)) ? await (i.getScale == null ? void 0 : i.getScale(y)) || {
|
|
501
501
|
x: 1,
|
|
502
502
|
y: 1
|
|
503
503
|
} : {
|
|
504
504
|
x: 1,
|
|
505
505
|
y: 1
|
|
506
|
-
}, v = wt(
|
|
506
|
+
}, v = wt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
507
507
|
elements: c,
|
|
508
508
|
rect: x,
|
|
509
509
|
offsetParent: y,
|
|
510
510
|
strategy: a
|
|
511
511
|
}) : x);
|
|
512
512
|
return {
|
|
513
|
-
top: (
|
|
514
|
-
bottom: (v.bottom -
|
|
515
|
-
left: (
|
|
516
|
-
right: (v.right -
|
|
513
|
+
top: (p.top - v.top + g.top) / b.y,
|
|
514
|
+
bottom: (v.bottom - p.bottom + g.bottom) / b.y,
|
|
515
|
+
left: (p.left - v.left + g.left) / b.x,
|
|
516
|
+
right: (v.right - p.right + g.right) / b.x
|
|
517
517
|
};
|
|
518
518
|
}
|
|
519
|
-
const
|
|
519
|
+
const sn = (t) => ({
|
|
520
520
|
name: "arrow",
|
|
521
521
|
options: t,
|
|
522
522
|
async fn(e) {
|
|
523
523
|
const {
|
|
524
524
|
x: o,
|
|
525
525
|
y: n,
|
|
526
|
-
placement:
|
|
527
|
-
rects:
|
|
528
|
-
platform:
|
|
526
|
+
placement: s,
|
|
527
|
+
rects: i,
|
|
528
|
+
platform: r,
|
|
529
529
|
elements: c,
|
|
530
530
|
middlewareData: a
|
|
531
531
|
} = e, {
|
|
532
532
|
element: l,
|
|
533
|
-
padding:
|
|
533
|
+
padding: f = 0
|
|
534
534
|
} = lt(t, e) || {};
|
|
535
535
|
if (l == null)
|
|
536
536
|
return {};
|
|
537
|
-
const
|
|
537
|
+
const h = de(f), m = {
|
|
538
538
|
x: o,
|
|
539
539
|
y: n
|
|
540
|
-
}, u = $t(
|
|
540
|
+
}, u = $t(s), g = Vt(u), w = await r.getDimensions(l), d = u === "y", p = d ? "top" : "left", x = d ? "bottom" : "right", y = d ? "clientHeight" : "clientWidth", b = i.reference[g] + i.reference[u] - m[u] - i.floating[g], v = m[u] - i.reference[u], L = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l));
|
|
541
541
|
let R = L ? L[y] : 0;
|
|
542
|
-
(!R || !await (
|
|
543
|
-
const j = b / 2 - v / 2, V = R / 2 -
|
|
542
|
+
(!R || !await (r.isElement == null ? void 0 : r.isElement(L))) && (R = c.floating[y] || i.floating[g]);
|
|
543
|
+
const j = b / 2 - v / 2, V = R / 2 - w[g] / 2 - 1, P = tt(h[p], V), _ = tt(h[x], V), I = P, ot = R - w[g] - _, A = R / 2 - w[g] / 2 + j, Y = Tt(I, A, ot), $ = !a.arrow && ut(s) != null && A !== Y && i.reference[g] / 2 - (A < I ? P : _) - w[g] / 2 < 0, T = $ ? A < I ? A - I : A - ot : 0;
|
|
544
544
|
return {
|
|
545
|
-
[u]: m[u] +
|
|
545
|
+
[u]: m[u] + T,
|
|
546
546
|
data: {
|
|
547
547
|
[u]: Y,
|
|
548
|
-
centerOffset:
|
|
548
|
+
centerOffset: A - Y - T,
|
|
549
549
|
...$ && {
|
|
550
|
-
alignmentOffset:
|
|
550
|
+
alignmentOffset: T
|
|
551
551
|
}
|
|
552
552
|
},
|
|
553
553
|
reset: $
|
|
554
554
|
};
|
|
555
555
|
}
|
|
556
|
-
}),
|
|
556
|
+
}), rn = function(t) {
|
|
557
557
|
return t === void 0 && (t = {}), {
|
|
558
558
|
name: "flip",
|
|
559
559
|
options: t,
|
|
560
560
|
async fn(e) {
|
|
561
561
|
var o, n;
|
|
562
562
|
const {
|
|
563
|
-
placement:
|
|
564
|
-
middlewareData:
|
|
565
|
-
rects:
|
|
563
|
+
placement: s,
|
|
564
|
+
middlewareData: i,
|
|
565
|
+
rects: r,
|
|
566
566
|
initialPlacement: c,
|
|
567
567
|
platform: a,
|
|
568
568
|
elements: l
|
|
569
569
|
} = e, {
|
|
570
|
-
mainAxis:
|
|
571
|
-
crossAxis:
|
|
570
|
+
mainAxis: f = !0,
|
|
571
|
+
crossAxis: h = !0,
|
|
572
572
|
fallbackPlacements: m,
|
|
573
573
|
fallbackStrategy: u = "bestFit",
|
|
574
|
-
fallbackAxisSideDirection:
|
|
575
|
-
flipAlignment:
|
|
576
|
-
...
|
|
574
|
+
fallbackAxisSideDirection: g = "none",
|
|
575
|
+
flipAlignment: w = !0,
|
|
576
|
+
...d
|
|
577
577
|
} = lt(t, e);
|
|
578
|
-
if ((o =
|
|
578
|
+
if ((o = i.arrow) != null && o.alignmentOffset)
|
|
579
579
|
return {};
|
|
580
|
-
const
|
|
581
|
-
!m && L && v.push(...en(c,
|
|
582
|
-
const R = [c, ...v], j = await me(e,
|
|
583
|
-
let P = ((n =
|
|
584
|
-
if (
|
|
585
|
-
const
|
|
586
|
-
V.push(j[
|
|
580
|
+
const p = Q(s), x = z(c), y = Q(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), v = m || (y || !w ? [pt(c)] : Ze(c)), L = g !== "none";
|
|
581
|
+
!m && L && v.push(...en(c, w, g, b));
|
|
582
|
+
const R = [c, ...v], j = await me(e, d), V = [];
|
|
583
|
+
let P = ((n = i.flip) == null ? void 0 : n.overflows) || [];
|
|
584
|
+
if (f && V.push(j[p]), h) {
|
|
585
|
+
const A = Ge(s, r, b);
|
|
586
|
+
V.push(j[A[0]], j[A[1]]);
|
|
587
587
|
}
|
|
588
588
|
if (P = [...P, {
|
|
589
|
-
placement:
|
|
589
|
+
placement: s,
|
|
590
590
|
overflows: V
|
|
591
|
-
}], !V.every((
|
|
591
|
+
}], !V.every((A) => A <= 0)) {
|
|
592
592
|
var _, I;
|
|
593
|
-
const
|
|
594
|
-
if (Y && (!(
|
|
593
|
+
const A = (((_ = i.flip) == null ? void 0 : _.index) || 0) + 1, Y = R[A];
|
|
594
|
+
if (Y && (!(h === "alignment" ? x !== z(Y) : !1) || // We leave the current main axis only if every placement on that axis
|
|
595
595
|
// overflows the main axis.
|
|
596
|
-
P.every((
|
|
596
|
+
P.every((S) => S.overflows[0] > 0 && z(S.placement) === x)))
|
|
597
597
|
return {
|
|
598
598
|
data: {
|
|
599
|
-
index:
|
|
599
|
+
index: A,
|
|
600
600
|
overflows: P
|
|
601
601
|
},
|
|
602
602
|
reset: {
|
|
603
603
|
placement: Y
|
|
604
604
|
}
|
|
605
605
|
};
|
|
606
|
-
let $ = (I = P.filter((
|
|
606
|
+
let $ = (I = P.filter((T) => T.overflows[0] <= 0).sort((T, S) => T.overflows[1] - S.overflows[1])[0]) == null ? void 0 : I.placement;
|
|
607
607
|
if (!$)
|
|
608
608
|
switch (u) {
|
|
609
609
|
case "bestFit": {
|
|
610
610
|
var ot;
|
|
611
|
-
const
|
|
611
|
+
const T = (ot = P.filter((S) => {
|
|
612
612
|
if (L) {
|
|
613
|
-
const
|
|
614
|
-
return
|
|
613
|
+
const U = z(S.placement);
|
|
614
|
+
return U === x || // Create a bias to the `y` side axis due to horizontal
|
|
615
615
|
// reading directions favoring greater width.
|
|
616
|
-
|
|
616
|
+
U === "y";
|
|
617
617
|
}
|
|
618
618
|
return !0;
|
|
619
|
-
}).map((
|
|
620
|
-
|
|
619
|
+
}).map((S) => [S.placement, S.overflows.filter((U) => U > 0).reduce((U, Ee) => U + Ee, 0)]).sort((S, U) => S[1] - U[1])[0]) == null ? void 0 : ot[0];
|
|
620
|
+
T && ($ = T);
|
|
621
621
|
break;
|
|
622
622
|
}
|
|
623
623
|
case "initialPlacement":
|
|
624
624
|
$ = c;
|
|
625
625
|
break;
|
|
626
626
|
}
|
|
627
|
-
if (
|
|
627
|
+
if (s !== $)
|
|
628
628
|
return {
|
|
629
629
|
reset: {
|
|
630
630
|
placement: $
|
|
@@ -639,27 +639,27 @@ async function cn(t, e) {
|
|
|
639
639
|
const {
|
|
640
640
|
placement: o,
|
|
641
641
|
platform: n,
|
|
642
|
-
elements:
|
|
643
|
-
} = t,
|
|
642
|
+
elements: s
|
|
643
|
+
} = t, i = await (n.isRTL == null ? void 0 : n.isRTL(s.floating)), r = Q(o), c = ut(o), a = z(o) === "y", l = ["left", "top"].includes(r) ? -1 : 1, f = i && a ? -1 : 1, h = lt(e, t);
|
|
644
644
|
let {
|
|
645
645
|
mainAxis: m,
|
|
646
646
|
crossAxis: u,
|
|
647
|
-
alignmentAxis:
|
|
648
|
-
} = typeof
|
|
649
|
-
mainAxis:
|
|
647
|
+
alignmentAxis: g
|
|
648
|
+
} = typeof h == "number" ? {
|
|
649
|
+
mainAxis: h,
|
|
650
650
|
crossAxis: 0,
|
|
651
651
|
alignmentAxis: null
|
|
652
652
|
} : {
|
|
653
|
-
mainAxis:
|
|
654
|
-
crossAxis:
|
|
655
|
-
alignmentAxis:
|
|
653
|
+
mainAxis: h.mainAxis || 0,
|
|
654
|
+
crossAxis: h.crossAxis || 0,
|
|
655
|
+
alignmentAxis: h.alignmentAxis
|
|
656
656
|
};
|
|
657
|
-
return c && typeof
|
|
658
|
-
x: u *
|
|
657
|
+
return c && typeof g == "number" && (u = c === "end" ? g * -1 : g), a ? {
|
|
658
|
+
x: u * f,
|
|
659
659
|
y: m * l
|
|
660
660
|
} : {
|
|
661
661
|
x: m * l,
|
|
662
|
-
y: u *
|
|
662
|
+
y: u * f
|
|
663
663
|
};
|
|
664
664
|
}
|
|
665
665
|
const an = function(t) {
|
|
@@ -669,17 +669,17 @@ const an = function(t) {
|
|
|
669
669
|
async fn(e) {
|
|
670
670
|
var o, n;
|
|
671
671
|
const {
|
|
672
|
-
x:
|
|
673
|
-
y:
|
|
674
|
-
placement:
|
|
672
|
+
x: s,
|
|
673
|
+
y: i,
|
|
674
|
+
placement: r,
|
|
675
675
|
middlewareData: c
|
|
676
676
|
} = e, a = await cn(e, t);
|
|
677
|
-
return
|
|
678
|
-
x:
|
|
679
|
-
y:
|
|
677
|
+
return r === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
|
|
678
|
+
x: s + a.x,
|
|
679
|
+
y: i + a.y,
|
|
680
680
|
data: {
|
|
681
681
|
...a,
|
|
682
|
-
placement:
|
|
682
|
+
placement: r
|
|
683
683
|
}
|
|
684
684
|
};
|
|
685
685
|
}
|
|
@@ -692,18 +692,18 @@ const an = function(t) {
|
|
|
692
692
|
const {
|
|
693
693
|
x: o,
|
|
694
694
|
y: n,
|
|
695
|
-
placement:
|
|
695
|
+
placement: s
|
|
696
696
|
} = e, {
|
|
697
|
-
mainAxis:
|
|
698
|
-
crossAxis:
|
|
697
|
+
mainAxis: i = !0,
|
|
698
|
+
crossAxis: r = !1,
|
|
699
699
|
limiter: c = {
|
|
700
|
-
fn: (
|
|
700
|
+
fn: (d) => {
|
|
701
701
|
let {
|
|
702
|
-
x:
|
|
702
|
+
x: p,
|
|
703
703
|
y: x
|
|
704
|
-
} =
|
|
704
|
+
} = d;
|
|
705
705
|
return {
|
|
706
|
-
x:
|
|
706
|
+
x: p,
|
|
707
707
|
y: x
|
|
708
708
|
};
|
|
709
709
|
}
|
|
@@ -712,29 +712,29 @@ const an = function(t) {
|
|
|
712
712
|
} = lt(t, e), l = {
|
|
713
713
|
x: o,
|
|
714
714
|
y: n
|
|
715
|
-
},
|
|
716
|
-
let u = l[m],
|
|
717
|
-
if (s) {
|
|
718
|
-
const w = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", x = u + h[w], y = u - h[g];
|
|
719
|
-
u = St(x, u, y);
|
|
720
|
-
}
|
|
715
|
+
}, f = await me(e, a), h = z(Q(s)), m = he(h);
|
|
716
|
+
let u = l[m], g = l[h];
|
|
721
717
|
if (i) {
|
|
722
|
-
const
|
|
723
|
-
|
|
718
|
+
const d = m === "y" ? "top" : "left", p = m === "y" ? "bottom" : "right", x = u + f[d], y = u - f[p];
|
|
719
|
+
u = Tt(x, u, y);
|
|
720
|
+
}
|
|
721
|
+
if (r) {
|
|
722
|
+
const d = h === "y" ? "top" : "left", p = h === "y" ? "bottom" : "right", x = g + f[d], y = g - f[p];
|
|
723
|
+
g = Tt(x, g, y);
|
|
724
724
|
}
|
|
725
|
-
const
|
|
725
|
+
const w = c.fn({
|
|
726
726
|
...e,
|
|
727
727
|
[m]: u,
|
|
728
|
-
[
|
|
728
|
+
[h]: g
|
|
729
729
|
});
|
|
730
730
|
return {
|
|
731
|
-
...
|
|
731
|
+
...w,
|
|
732
732
|
data: {
|
|
733
|
-
x:
|
|
734
|
-
y:
|
|
733
|
+
x: w.x - o,
|
|
734
|
+
y: w.y - n,
|
|
735
735
|
enabled: {
|
|
736
|
-
[m]:
|
|
737
|
-
[
|
|
736
|
+
[m]: i,
|
|
737
|
+
[h]: r
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
740
|
};
|
|
@@ -772,9 +772,9 @@ function ft(t) {
|
|
|
772
772
|
overflow: e,
|
|
773
773
|
overflowX: o,
|
|
774
774
|
overflowY: n,
|
|
775
|
-
display:
|
|
775
|
+
display: s
|
|
776
776
|
} = C(t);
|
|
777
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(
|
|
777
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(s);
|
|
778
778
|
}
|
|
779
779
|
function un(t) {
|
|
780
780
|
return ["table", "td", "th"].includes(nt(t));
|
|
@@ -840,12 +840,12 @@ function pe(t) {
|
|
|
840
840
|
function it(t, e, o) {
|
|
841
841
|
var n;
|
|
842
842
|
e === void 0 && (e = []), o === void 0 && (o = !0);
|
|
843
|
-
const
|
|
844
|
-
if (
|
|
845
|
-
const c = kt(
|
|
846
|
-
return e.concat(
|
|
843
|
+
const s = pe(t), i = s === ((n = t.ownerDocument) == null ? void 0 : n.body), r = E(s);
|
|
844
|
+
if (i) {
|
|
845
|
+
const c = kt(r);
|
|
846
|
+
return e.concat(r, r.visualViewport || [], ft(s) ? s : [], c && o ? it(c) : []);
|
|
847
847
|
}
|
|
848
|
-
return e.concat(
|
|
848
|
+
return e.concat(s, it(s, [], o));
|
|
849
849
|
}
|
|
850
850
|
function kt(t) {
|
|
851
851
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
@@ -853,8 +853,8 @@ function kt(t) {
|
|
|
853
853
|
function we(t) {
|
|
854
854
|
const e = C(t);
|
|
855
855
|
let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
|
|
856
|
-
const
|
|
857
|
-
return c && (o =
|
|
856
|
+
const s = W(t), i = s ? t.offsetWidth : o, r = s ? t.offsetHeight : n, c = gt(o) !== i || gt(n) !== r;
|
|
857
|
+
return c && (o = i, n = r), {
|
|
858
858
|
width: o,
|
|
859
859
|
height: n,
|
|
860
860
|
$: c
|
|
@@ -869,12 +869,12 @@ function Z(t) {
|
|
|
869
869
|
return D(1);
|
|
870
870
|
const o = e.getBoundingClientRect(), {
|
|
871
871
|
width: n,
|
|
872
|
-
height:
|
|
873
|
-
$:
|
|
872
|
+
height: s,
|
|
873
|
+
$: i
|
|
874
874
|
} = we(e);
|
|
875
|
-
let
|
|
876
|
-
return (!
|
|
877
|
-
x:
|
|
875
|
+
let r = (i ? gt(o.width) : o.width) / n, c = (i ? gt(o.height) : o.height) / s;
|
|
876
|
+
return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
877
|
+
x: r,
|
|
878
878
|
y: c
|
|
879
879
|
};
|
|
880
880
|
}
|
|
@@ -889,41 +889,41 @@ function ye(t) {
|
|
|
889
889
|
function dn(t, e, o) {
|
|
890
890
|
return e === void 0 && (e = !1), !o || e && o !== E(t) ? !1 : e;
|
|
891
891
|
}
|
|
892
|
-
function
|
|
892
|
+
function J(t, e, o, n) {
|
|
893
893
|
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
894
|
-
const
|
|
895
|
-
let
|
|
896
|
-
e && (n ? k(n) && (
|
|
897
|
-
const c = dn(
|
|
898
|
-
let a = (
|
|
899
|
-
if (
|
|
900
|
-
const m = E(
|
|
901
|
-
let
|
|
902
|
-
for (;
|
|
903
|
-
const
|
|
904
|
-
a *=
|
|
894
|
+
const s = t.getBoundingClientRect(), i = Ut(t);
|
|
895
|
+
let r = D(1);
|
|
896
|
+
e && (n ? k(n) && (r = Z(n)) : r = Z(t));
|
|
897
|
+
const c = dn(i, o, n) ? ye(i) : D(0);
|
|
898
|
+
let a = (s.left + c.x) / r.x, l = (s.top + c.y) / r.y, f = s.width / r.x, h = s.height / r.y;
|
|
899
|
+
if (i) {
|
|
900
|
+
const m = E(i), u = n && k(n) ? E(n) : n;
|
|
901
|
+
let g = m, w = kt(g);
|
|
902
|
+
for (; w && n && u !== g; ) {
|
|
903
|
+
const d = Z(w), p = w.getBoundingClientRect(), x = C(w), y = p.left + (w.clientLeft + parseFloat(x.paddingLeft)) * d.x, b = p.top + (w.clientTop + parseFloat(x.paddingTop)) * d.y;
|
|
904
|
+
a *= d.x, l *= d.y, f *= d.x, h *= d.y, a += y, l += b, g = E(w), w = kt(g);
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
907
|
return wt({
|
|
908
|
-
width:
|
|
909
|
-
height:
|
|
908
|
+
width: f,
|
|
909
|
+
height: h,
|
|
910
910
|
x: a,
|
|
911
911
|
y: l
|
|
912
912
|
});
|
|
913
913
|
}
|
|
914
914
|
function zt(t, e) {
|
|
915
915
|
const o = bt(t).scrollLeft;
|
|
916
|
-
return e ? e.left + o :
|
|
916
|
+
return e ? e.left + o : J(N(t)).left + o;
|
|
917
917
|
}
|
|
918
918
|
function xe(t, e, o) {
|
|
919
919
|
o === void 0 && (o = !1);
|
|
920
|
-
const n = t.getBoundingClientRect(),
|
|
920
|
+
const n = t.getBoundingClientRect(), s = n.left + e.scrollLeft - (o ? 0 : (
|
|
921
921
|
// RTL <body> scrollbar.
|
|
922
922
|
zt(t, n)
|
|
923
|
-
)),
|
|
923
|
+
)), i = n.top + e.scrollTop;
|
|
924
924
|
return {
|
|
925
|
-
x:
|
|
926
|
-
y:
|
|
925
|
+
x: s,
|
|
926
|
+
y: i
|
|
927
927
|
};
|
|
928
928
|
}
|
|
929
929
|
function mn(t) {
|
|
@@ -931,61 +931,61 @@ function mn(t) {
|
|
|
931
931
|
elements: e,
|
|
932
932
|
rect: o,
|
|
933
933
|
offsetParent: n,
|
|
934
|
-
strategy:
|
|
934
|
+
strategy: s
|
|
935
935
|
} = t;
|
|
936
|
-
const
|
|
937
|
-
if (n ===
|
|
936
|
+
const i = s === "fixed", r = N(n), c = e ? vt(e.floating) : !1;
|
|
937
|
+
if (n === r || c && i)
|
|
938
938
|
return o;
|
|
939
939
|
let a = {
|
|
940
940
|
scrollLeft: 0,
|
|
941
941
|
scrollTop: 0
|
|
942
942
|
}, l = D(1);
|
|
943
|
-
const
|
|
944
|
-
if ((
|
|
945
|
-
const u =
|
|
946
|
-
l = Z(n),
|
|
943
|
+
const f = D(0), h = W(n);
|
|
944
|
+
if ((h || !h && !i) && ((nt(n) !== "body" || ft(r)) && (a = bt(n)), W(n))) {
|
|
945
|
+
const u = J(n);
|
|
946
|
+
l = Z(n), f.x = u.x + n.clientLeft, f.y = u.y + n.clientTop;
|
|
947
947
|
}
|
|
948
|
-
const m =
|
|
948
|
+
const m = r && !h && !i ? xe(r, a, !0) : D(0);
|
|
949
949
|
return {
|
|
950
950
|
width: o.width * l.x,
|
|
951
951
|
height: o.height * l.y,
|
|
952
|
-
x: o.x * l.x - a.scrollLeft * l.x +
|
|
953
|
-
y: o.y * l.y - a.scrollTop * l.y +
|
|
952
|
+
x: o.x * l.x - a.scrollLeft * l.x + f.x + m.x,
|
|
953
|
+
y: o.y * l.y - a.scrollTop * l.y + f.y + m.y
|
|
954
954
|
};
|
|
955
955
|
}
|
|
956
956
|
function gn(t) {
|
|
957
957
|
return Array.from(t.getClientRects());
|
|
958
958
|
}
|
|
959
959
|
function pn(t) {
|
|
960
|
-
const e = N(t), o = bt(t), n = t.ownerDocument.body,
|
|
961
|
-
let
|
|
960
|
+
const e = N(t), o = bt(t), n = t.ownerDocument.body, s = X(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = X(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
|
|
961
|
+
let r = -o.scrollLeft + zt(t);
|
|
962
962
|
const c = -o.scrollTop;
|
|
963
|
-
return C(n).direction === "rtl" && (
|
|
964
|
-
width:
|
|
965
|
-
height:
|
|
966
|
-
x:
|
|
963
|
+
return C(n).direction === "rtl" && (r += X(e.clientWidth, n.clientWidth) - s), {
|
|
964
|
+
width: s,
|
|
965
|
+
height: i,
|
|
966
|
+
x: r,
|
|
967
967
|
y: c
|
|
968
968
|
};
|
|
969
969
|
}
|
|
970
970
|
function wn(t, e) {
|
|
971
|
-
const o = E(t), n = N(t),
|
|
972
|
-
let
|
|
973
|
-
if (
|
|
974
|
-
|
|
971
|
+
const o = E(t), n = N(t), s = o.visualViewport;
|
|
972
|
+
let i = n.clientWidth, r = n.clientHeight, c = 0, a = 0;
|
|
973
|
+
if (s) {
|
|
974
|
+
i = s.width, r = s.height;
|
|
975
975
|
const l = Ht();
|
|
976
|
-
(!l || l && e === "fixed") && (c =
|
|
976
|
+
(!l || l && e === "fixed") && (c = s.offsetLeft, a = s.offsetTop);
|
|
977
977
|
}
|
|
978
978
|
return {
|
|
979
|
-
width:
|
|
980
|
-
height:
|
|
979
|
+
width: i,
|
|
980
|
+
height: r,
|
|
981
981
|
x: c,
|
|
982
982
|
y: a
|
|
983
983
|
};
|
|
984
984
|
}
|
|
985
985
|
function yn(t, e) {
|
|
986
|
-
const o =
|
|
986
|
+
const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop, s = o.left + t.clientLeft, i = W(t) ? Z(t) : D(1), r = t.clientWidth * i.x, c = t.clientHeight * i.y, a = s * i.x, l = n * i.y;
|
|
987
987
|
return {
|
|
988
|
-
width:
|
|
988
|
+
width: r,
|
|
989
989
|
height: c,
|
|
990
990
|
x: a,
|
|
991
991
|
y: l
|
|
@@ -1000,10 +1000,10 @@ function Yt(t, e, o) {
|
|
|
1000
1000
|
else if (k(e))
|
|
1001
1001
|
n = yn(e, o);
|
|
1002
1002
|
else {
|
|
1003
|
-
const
|
|
1003
|
+
const s = ye(t);
|
|
1004
1004
|
n = {
|
|
1005
|
-
x: e.x -
|
|
1006
|
-
y: e.y -
|
|
1005
|
+
x: e.x - s.x,
|
|
1006
|
+
y: e.y - s.y,
|
|
1007
1007
|
width: e.width,
|
|
1008
1008
|
height: e.height
|
|
1009
1009
|
};
|
|
@@ -1018,12 +1018,12 @@ function xn(t, e) {
|
|
|
1018
1018
|
const o = e.get(t);
|
|
1019
1019
|
if (o)
|
|
1020
1020
|
return o;
|
|
1021
|
-
let n = it(t, [], !1).filter((c) => k(c) && nt(c) !== "body"),
|
|
1022
|
-
const
|
|
1023
|
-
let
|
|
1024
|
-
for (; k(
|
|
1025
|
-
const c = C(
|
|
1026
|
-
!a && c.position === "fixed" && (
|
|
1021
|
+
let n = it(t, [], !1).filter((c) => k(c) && nt(c) !== "body"), s = null;
|
|
1022
|
+
const i = C(t).position === "fixed";
|
|
1023
|
+
let r = i ? K(t) : t;
|
|
1024
|
+
for (; k(r) && !et(r); ) {
|
|
1025
|
+
const c = C(r), a = Bt(r);
|
|
1026
|
+
!a && c.position === "fixed" && (s = null), (i ? !a && !s : !a && c.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ft(r) && !a && ve(t, r)) ? n = n.filter((f) => f !== r) : s = c, r = K(r);
|
|
1027
1027
|
}
|
|
1028
1028
|
return e.set(t, n), n;
|
|
1029
1029
|
}
|
|
@@ -1032,12 +1032,12 @@ function vn(t) {
|
|
|
1032
1032
|
element: e,
|
|
1033
1033
|
boundary: o,
|
|
1034
1034
|
rootBoundary: n,
|
|
1035
|
-
strategy:
|
|
1035
|
+
strategy: s
|
|
1036
1036
|
} = t;
|
|
1037
|
-
const
|
|
1038
|
-
const
|
|
1039
|
-
return l.top = X(
|
|
1040
|
-
}, Yt(e, c,
|
|
1037
|
+
const r = [...o === "clippingAncestors" ? vt(e) ? [] : xn(e, this._c) : [].concat(o), n], c = r[0], a = r.reduce((l, f) => {
|
|
1038
|
+
const h = Yt(e, f, s);
|
|
1039
|
+
return l.top = X(h.top, l.top), l.right = tt(h.right, l.right), l.bottom = tt(h.bottom, l.bottom), l.left = X(h.left, l.left), l;
|
|
1040
|
+
}, Yt(e, c, s));
|
|
1041
1041
|
return {
|
|
1042
1042
|
width: a.right - a.left,
|
|
1043
1043
|
height: a.bottom - a.top,
|
|
@@ -1056,30 +1056,30 @@ function bn(t) {
|
|
|
1056
1056
|
};
|
|
1057
1057
|
}
|
|
1058
1058
|
function Rn(t, e, o) {
|
|
1059
|
-
const n = W(e),
|
|
1059
|
+
const n = W(e), s = N(e), i = o === "fixed", r = J(t, !0, i, e);
|
|
1060
1060
|
let c = {
|
|
1061
1061
|
scrollLeft: 0,
|
|
1062
1062
|
scrollTop: 0
|
|
1063
1063
|
};
|
|
1064
1064
|
const a = D(0);
|
|
1065
1065
|
function l() {
|
|
1066
|
-
a.x = zt(
|
|
1066
|
+
a.x = zt(s);
|
|
1067
1067
|
}
|
|
1068
|
-
if (n || !n && !
|
|
1069
|
-
if ((nt(e) !== "body" || ft(
|
|
1070
|
-
const u =
|
|
1068
|
+
if (n || !n && !i)
|
|
1069
|
+
if ((nt(e) !== "body" || ft(s)) && (c = bt(e)), n) {
|
|
1070
|
+
const u = J(e, !0, i, e);
|
|
1071
1071
|
a.x = u.x + e.clientLeft, a.y = u.y + e.clientTop;
|
|
1072
|
-
} else
|
|
1073
|
-
|
|
1074
|
-
const
|
|
1072
|
+
} else s && l();
|
|
1073
|
+
i && !n && s && l();
|
|
1074
|
+
const f = s && !n && !i ? xe(s, c) : D(0), h = r.left + c.scrollLeft - a.x - f.x, m = r.top + c.scrollTop - a.y - f.y;
|
|
1075
1075
|
return {
|
|
1076
|
-
x:
|
|
1076
|
+
x: h,
|
|
1077
1077
|
y: m,
|
|
1078
|
-
width:
|
|
1079
|
-
height:
|
|
1078
|
+
width: r.width,
|
|
1079
|
+
height: r.height
|
|
1080
1080
|
};
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1082
|
+
function Ot(t) {
|
|
1083
1083
|
return C(t).position === "static";
|
|
1084
1084
|
}
|
|
1085
1085
|
function qt(t, e) {
|
|
@@ -1095,20 +1095,20 @@ function be(t, e) {
|
|
|
1095
1095
|
if (vt(t))
|
|
1096
1096
|
return o;
|
|
1097
1097
|
if (!W(t)) {
|
|
1098
|
-
let
|
|
1099
|
-
for (;
|
|
1100
|
-
if (k(
|
|
1101
|
-
return
|
|
1102
|
-
|
|
1098
|
+
let s = K(t);
|
|
1099
|
+
for (; s && !et(s); ) {
|
|
1100
|
+
if (k(s) && !Ot(s))
|
|
1101
|
+
return s;
|
|
1102
|
+
s = K(s);
|
|
1103
1103
|
}
|
|
1104
1104
|
return o;
|
|
1105
1105
|
}
|
|
1106
1106
|
let n = qt(t, e);
|
|
1107
|
-
for (; n && un(n) &&
|
|
1107
|
+
for (; n && un(n) && Ot(n); )
|
|
1108
1108
|
n = qt(n, e);
|
|
1109
|
-
return n && et(n) &&
|
|
1109
|
+
return n && et(n) && Ot(n) && !Bt(n) ? o : n || fn(t) || o;
|
|
1110
1110
|
}
|
|
1111
|
-
const
|
|
1111
|
+
const An = async function(t) {
|
|
1112
1112
|
const e = this.getOffsetParent || be, o = this.getDimensions, n = await o(t.floating);
|
|
1113
1113
|
return {
|
|
1114
1114
|
reference: Rn(t.reference, await e(t.floating), t.strategy),
|
|
@@ -1120,7 +1120,7 @@ const On = async function(t) {
|
|
|
1120
1120
|
}
|
|
1121
1121
|
};
|
|
1122
1122
|
};
|
|
1123
|
-
function
|
|
1123
|
+
function On(t) {
|
|
1124
1124
|
return C(t).direction === "rtl";
|
|
1125
1125
|
}
|
|
1126
1126
|
const En = {
|
|
@@ -1128,35 +1128,35 @@ const En = {
|
|
|
1128
1128
|
getDocumentElement: N,
|
|
1129
1129
|
getClippingRect: vn,
|
|
1130
1130
|
getOffsetParent: be,
|
|
1131
|
-
getElementRects:
|
|
1131
|
+
getElementRects: An,
|
|
1132
1132
|
getClientRects: gn,
|
|
1133
1133
|
getDimensions: bn,
|
|
1134
1134
|
getScale: Z,
|
|
1135
1135
|
isElement: k,
|
|
1136
|
-
isRTL:
|
|
1136
|
+
isRTL: On
|
|
1137
1137
|
};
|
|
1138
1138
|
function Re(t, e) {
|
|
1139
1139
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1140
1140
|
}
|
|
1141
1141
|
function Ln(t, e) {
|
|
1142
1142
|
let o = null, n;
|
|
1143
|
-
const
|
|
1144
|
-
function
|
|
1143
|
+
const s = N(t);
|
|
1144
|
+
function i() {
|
|
1145
1145
|
var c;
|
|
1146
1146
|
clearTimeout(n), (c = o) == null || c.disconnect(), o = null;
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1149
|
-
c === void 0 && (c = !1), a === void 0 && (a = 1),
|
|
1148
|
+
function r(c, a) {
|
|
1149
|
+
c === void 0 && (c = !1), a === void 0 && (a = 1), i();
|
|
1150
1150
|
const l = t.getBoundingClientRect(), {
|
|
1151
|
-
left:
|
|
1152
|
-
top:
|
|
1151
|
+
left: f,
|
|
1152
|
+
top: h,
|
|
1153
1153
|
width: m,
|
|
1154
1154
|
height: u
|
|
1155
1155
|
} = l;
|
|
1156
1156
|
if (c || e(), !m || !u)
|
|
1157
1157
|
return;
|
|
1158
|
-
const
|
|
1159
|
-
rootMargin: -
|
|
1158
|
+
const g = dt(h), w = dt(s.clientWidth - (f + m)), d = dt(s.clientHeight - (h + u)), p = dt(f), y = {
|
|
1159
|
+
rootMargin: -g + "px " + -w + "px " + -d + "px " + -p + "px",
|
|
1160
1160
|
threshold: X(0, tt(1, a)) || 1
|
|
1161
1161
|
};
|
|
1162
1162
|
let b = !0;
|
|
@@ -1164,73 +1164,73 @@ function Ln(t, e) {
|
|
|
1164
1164
|
const R = L[0].intersectionRatio;
|
|
1165
1165
|
if (R !== a) {
|
|
1166
1166
|
if (!b)
|
|
1167
|
-
return
|
|
1168
|
-
R ?
|
|
1169
|
-
|
|
1167
|
+
return r();
|
|
1168
|
+
R ? r(!1, R) : n = setTimeout(() => {
|
|
1169
|
+
r(!1, 1e-7);
|
|
1170
1170
|
}, 1e3);
|
|
1171
1171
|
}
|
|
1172
|
-
R === 1 && !Re(l, t.getBoundingClientRect()) &&
|
|
1172
|
+
R === 1 && !Re(l, t.getBoundingClientRect()) && r(), b = !1;
|
|
1173
1173
|
}
|
|
1174
1174
|
try {
|
|
1175
1175
|
o = new IntersectionObserver(v, {
|
|
1176
1176
|
...y,
|
|
1177
1177
|
// Handle <iframe>s
|
|
1178
|
-
root:
|
|
1178
|
+
root: s.ownerDocument
|
|
1179
1179
|
});
|
|
1180
1180
|
} catch {
|
|
1181
1181
|
o = new IntersectionObserver(v, y);
|
|
1182
1182
|
}
|
|
1183
1183
|
o.observe(t);
|
|
1184
1184
|
}
|
|
1185
|
-
return
|
|
1185
|
+
return r(!0), i;
|
|
1186
1186
|
}
|
|
1187
1187
|
function Pn(t, e, o, n) {
|
|
1188
1188
|
n === void 0 && (n = {});
|
|
1189
1189
|
const {
|
|
1190
|
-
ancestorScroll:
|
|
1191
|
-
ancestorResize:
|
|
1192
|
-
elementResize:
|
|
1190
|
+
ancestorScroll: s = !0,
|
|
1191
|
+
ancestorResize: i = !0,
|
|
1192
|
+
elementResize: r = typeof ResizeObserver == "function",
|
|
1193
1193
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1194
1194
|
animationFrame: a = !1
|
|
1195
|
-
} = n, l = Ut(t),
|
|
1196
|
-
|
|
1197
|
-
|
|
1195
|
+
} = n, l = Ut(t), f = s || i ? [...l ? it(l) : [], ...it(e)] : [];
|
|
1196
|
+
f.forEach((p) => {
|
|
1197
|
+
s && p.addEventListener("scroll", o, {
|
|
1198
1198
|
passive: !0
|
|
1199
|
-
}),
|
|
1199
|
+
}), i && p.addEventListener("resize", o);
|
|
1200
1200
|
});
|
|
1201
|
-
const
|
|
1201
|
+
const h = l && c ? Ln(l, o) : null;
|
|
1202
1202
|
let m = -1, u = null;
|
|
1203
|
-
|
|
1204
|
-
let [x] =
|
|
1203
|
+
r && (u = new ResizeObserver((p) => {
|
|
1204
|
+
let [x] = p;
|
|
1205
1205
|
x && x.target === l && u && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1206
1206
|
var y;
|
|
1207
1207
|
(y = u) == null || y.observe(e);
|
|
1208
1208
|
})), o();
|
|
1209
1209
|
}), l && !a && u.observe(l), u.observe(e));
|
|
1210
|
-
let
|
|
1211
|
-
a &&
|
|
1212
|
-
function
|
|
1213
|
-
const
|
|
1214
|
-
|
|
1210
|
+
let g, w = a ? J(t) : null;
|
|
1211
|
+
a && d();
|
|
1212
|
+
function d() {
|
|
1213
|
+
const p = J(t);
|
|
1214
|
+
w && !Re(w, p) && o(), w = p, g = requestAnimationFrame(d);
|
|
1215
1215
|
}
|
|
1216
1216
|
return o(), () => {
|
|
1217
|
-
var
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
}),
|
|
1217
|
+
var p;
|
|
1218
|
+
f.forEach((x) => {
|
|
1219
|
+
s && x.removeEventListener("scroll", o), i && x.removeEventListener("resize", o);
|
|
1220
|
+
}), h == null || h(), (p = u) == null || p.disconnect(), u = null, a && cancelAnimationFrame(g);
|
|
1221
1221
|
};
|
|
1222
1222
|
}
|
|
1223
|
-
const
|
|
1224
|
-
const n = /* @__PURE__ */ new Map(),
|
|
1223
|
+
const Tn = an, Sn = ln, Xt = rn, kn = sn, Cn = (t, e, o) => {
|
|
1224
|
+
const n = /* @__PURE__ */ new Map(), s = {
|
|
1225
1225
|
platform: En,
|
|
1226
1226
|
...o
|
|
1227
|
-
},
|
|
1228
|
-
...
|
|
1227
|
+
}, i = {
|
|
1228
|
+
...s.platform,
|
|
1229
1229
|
_c: n
|
|
1230
1230
|
};
|
|
1231
1231
|
return on(t, e, {
|
|
1232
|
-
...
|
|
1233
|
-
platform:
|
|
1232
|
+
...s,
|
|
1233
|
+
platform: i
|
|
1234
1234
|
});
|
|
1235
1235
|
}, no = [
|
|
1236
1236
|
"top",
|
|
@@ -1248,39 +1248,39 @@ const Sn = an, Tn = ln, Xt = sn, kn = rn, Cn = (t, e, o) => {
|
|
|
1248
1248
|
], oo = (t, e = { isOpen: !1 }) => {
|
|
1249
1249
|
const o = [];
|
|
1250
1250
|
let n = null;
|
|
1251
|
-
const
|
|
1252
|
-
function
|
|
1253
|
-
n = c,
|
|
1251
|
+
const s = O.deriveProp(e.isOpen);
|
|
1252
|
+
function i(c) {
|
|
1253
|
+
n = c, s.set(!0);
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1256
|
-
|
|
1255
|
+
function r() {
|
|
1256
|
+
s.set(!1), o.forEach((c) => c()), o.length = 0;
|
|
1257
1257
|
}
|
|
1258
1258
|
return q(
|
|
1259
|
-
t(
|
|
1260
|
-
|
|
1261
|
-
|
|
1259
|
+
t(i, r),
|
|
1260
|
+
re(
|
|
1261
|
+
s,
|
|
1262
1262
|
() => q(
|
|
1263
1263
|
(n == null ? void 0 : n.onClickOutside) != null ? qe(n.onClickOutside) : null,
|
|
1264
|
-
|
|
1265
|
-
(c) =>
|
|
1264
|
+
H(
|
|
1265
|
+
(c) => se(
|
|
1266
1266
|
"body",
|
|
1267
1267
|
Et.div(
|
|
1268
|
-
|
|
1268
|
+
H((a) => {
|
|
1269
1269
|
a.style.position = "absolute";
|
|
1270
1270
|
const l = typeof (n == null ? void 0 : n.target) == "string" ? c.querySelector(
|
|
1271
1271
|
n.target
|
|
1272
1272
|
) : (n == null ? void 0 : n.target) ?? c;
|
|
1273
1273
|
if (l == null)
|
|
1274
1274
|
throw new Error(`Target not found: ${n == null ? void 0 : n.target}`);
|
|
1275
|
-
let
|
|
1276
|
-
const
|
|
1275
|
+
let f = null;
|
|
1276
|
+
const h = O.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), m = O.toSignal(
|
|
1277
1277
|
(n == null ? void 0 : n.crossAxisOffset) ?? 0
|
|
1278
|
-
), u =
|
|
1278
|
+
), u = O.toSignal(
|
|
1279
1279
|
/* c8 ignore next 3 */
|
|
1280
1280
|
(n == null ? void 0 : n.placement) ?? "top"
|
|
1281
|
-
),
|
|
1281
|
+
), g = O.toSignal(
|
|
1282
1282
|
(n == null ? void 0 : n.arrowPadding) ?? 0
|
|
1283
|
-
),
|
|
1283
|
+
), w = n == null ? void 0 : n.arrow, d = F({
|
|
1284
1284
|
centerOffset: 0,
|
|
1285
1285
|
alignmentOffset: 0,
|
|
1286
1286
|
containerWidth: 0,
|
|
@@ -1288,20 +1288,20 @@ const Sn = an, Tn = ln, Xt = sn, kn = rn, Cn = (t, e, o) => {
|
|
|
1288
1288
|
x: void 0,
|
|
1289
1289
|
y: void 0
|
|
1290
1290
|
});
|
|
1291
|
-
async function
|
|
1291
|
+
async function p() {
|
|
1292
1292
|
const y = [
|
|
1293
1293
|
Xt(),
|
|
1294
|
-
|
|
1295
|
-
mainAxis:
|
|
1294
|
+
Tn({
|
|
1295
|
+
mainAxis: h.get(),
|
|
1296
1296
|
crossAxis: m.get()
|
|
1297
1297
|
}),
|
|
1298
|
-
|
|
1298
|
+
Sn(),
|
|
1299
1299
|
Xt()
|
|
1300
1300
|
];
|
|
1301
|
-
|
|
1301
|
+
w != null && f != null && y.push(
|
|
1302
1302
|
kn({
|
|
1303
|
-
element:
|
|
1304
|
-
padding:
|
|
1303
|
+
element: f,
|
|
1304
|
+
padding: g.get()
|
|
1305
1305
|
})
|
|
1306
1306
|
);
|
|
1307
1307
|
const b = await Cn(l, a, {
|
|
@@ -1309,14 +1309,14 @@ const Sn = an, Tn = ln, Xt = sn, kn = rn, Cn = (t, e, o) => {
|
|
|
1309
1309
|
strategy: "absolute",
|
|
1310
1310
|
middleware: y
|
|
1311
1311
|
}), { x: v, y: L, middlewareData: R } = b;
|
|
1312
|
-
if (a.style.top = `${L}px`, a.style.left = `${v}px`,
|
|
1312
|
+
if (a.style.top = `${L}px`, a.style.left = `${v}px`, f != null && R.arrow != null) {
|
|
1313
1313
|
const {
|
|
1314
1314
|
x: j,
|
|
1315
1315
|
y: V,
|
|
1316
1316
|
centerOffset: P,
|
|
1317
1317
|
alignmentOffset: _
|
|
1318
1318
|
} = R.arrow;
|
|
1319
|
-
|
|
1319
|
+
d.set({
|
|
1320
1320
|
x: j,
|
|
1321
1321
|
y: V,
|
|
1322
1322
|
centerOffset: P,
|
|
@@ -1326,30 +1326,30 @@ const Sn = an, Tn = ln, Xt = sn, kn = rn, Cn = (t, e, o) => {
|
|
|
1326
1326
|
});
|
|
1327
1327
|
}
|
|
1328
1328
|
}
|
|
1329
|
-
const x =
|
|
1330
|
-
|
|
1329
|
+
const x = Te(
|
|
1330
|
+
h,
|
|
1331
1331
|
m,
|
|
1332
1332
|
u
|
|
1333
|
-
)(
|
|
1333
|
+
)(p);
|
|
1334
1334
|
return q(
|
|
1335
1335
|
n == null ? void 0 : n.content,
|
|
1336
1336
|
(n == null ? void 0 : n.arrow) != null ? Et.div(
|
|
1337
1337
|
n == null ? void 0 : n.arrow(
|
|
1338
1338
|
ie(
|
|
1339
|
-
|
|
1339
|
+
d,
|
|
1340
1340
|
u
|
|
1341
1341
|
)((y, b) => ({
|
|
1342
1342
|
...y,
|
|
1343
1343
|
placement: b
|
|
1344
1344
|
}))
|
|
1345
1345
|
),
|
|
1346
|
-
|
|
1347
|
-
|
|
1346
|
+
H((y) => {
|
|
1347
|
+
f = y, p();
|
|
1348
1348
|
})
|
|
1349
1349
|
) : null,
|
|
1350
1350
|
M(
|
|
1351
|
-
|
|
1352
|
-
Pn(l, a,
|
|
1351
|
+
d.dispose,
|
|
1352
|
+
Pn(l, a, p),
|
|
1353
1353
|
x
|
|
1354
1354
|
)
|
|
1355
1355
|
);
|
|
@@ -1360,63 +1360,88 @@ const Sn = an, Tn = ln, Xt = sn, kn = rn, Cn = (t, e, o) => {
|
|
|
1360
1360
|
)
|
|
1361
1361
|
)
|
|
1362
1362
|
);
|
|
1363
|
-
}, Dn = (
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1363
|
+
}, Dn = ({
|
|
1364
|
+
request: t,
|
|
1365
|
+
load: e,
|
|
1366
|
+
convertError: o,
|
|
1367
|
+
onSuccess: n,
|
|
1368
|
+
onError: s,
|
|
1369
|
+
onSettled: i
|
|
1370
|
+
}) => {
|
|
1371
|
+
let r;
|
|
1372
|
+
const c = F(B.notAsked), a = c.map(
|
|
1373
|
+
(d) => B.isSuccess(d) ? d.value : void 0
|
|
1374
|
+
), l = c.map(
|
|
1375
|
+
(d) => B.isFailure(d) ? d.error : void 0
|
|
1376
|
+
), f = c.map((d) => B.isLoading(d)), h = () => {
|
|
1377
|
+
r == null || r.abort(), r = void 0;
|
|
1378
|
+
}, m = (d) => {
|
|
1379
|
+
h(), c.set(d ?? B.notAsked);
|
|
1380
|
+
}, u = async (d) => {
|
|
1381
|
+
h(), r = new AbortController();
|
|
1382
|
+
const p = r.signal, x = c.get();
|
|
1383
|
+
c.set(B.loading(B.getOrUndefined(x)));
|
|
1374
1384
|
try {
|
|
1375
|
-
const
|
|
1376
|
-
await Promise.resolve(),
|
|
1377
|
-
} catch (
|
|
1378
|
-
|
|
1385
|
+
const y = await e({ request: d, abortSignal: p, previous: x });
|
|
1386
|
+
await Promise.resolve(), r = void 0, c.set(B.success(y)), n == null || n(y, d);
|
|
1387
|
+
} catch (y) {
|
|
1388
|
+
r = void 0, c.set(B.failure(o(y))), s == null || s(o(y), d);
|
|
1379
1389
|
}
|
|
1380
|
-
|
|
1381
|
-
|
|
1390
|
+
i == null || i(c.get(), d);
|
|
1391
|
+
}, g = () => u(O.get(t)), w = () => {
|
|
1392
|
+
r == null || r.abort(), r = void 0, c.dispose();
|
|
1382
1393
|
};
|
|
1383
|
-
return
|
|
1384
|
-
status:
|
|
1385
|
-
value:
|
|
1386
|
-
error:
|
|
1387
|
-
loading:
|
|
1388
|
-
|
|
1389
|
-
|
|
1394
|
+
return c.onDispose(O.on(t, u)), {
|
|
1395
|
+
status: c,
|
|
1396
|
+
value: a,
|
|
1397
|
+
error: l,
|
|
1398
|
+
loading: f,
|
|
1399
|
+
cancel: m,
|
|
1400
|
+
reload: g,
|
|
1401
|
+
dispose: w
|
|
1390
1402
|
};
|
|
1391
1403
|
}, Wn = (t, e) => {
|
|
1392
|
-
const { status: o, dispose: n, reload:
|
|
1404
|
+
const { status: o, dispose: n, reload: s } = t, { pending: i, failure: r, success: c } = e;
|
|
1393
1405
|
return q(
|
|
1394
1406
|
M(n),
|
|
1395
1407
|
ue(o, {
|
|
1396
|
-
loading:
|
|
1397
|
-
failure:
|
|
1398
|
-
success: (a) => c(a,
|
|
1408
|
+
loading: i != null ? (a) => i({ previous: a, reload: s, cancel: t.cancel }) : void 0,
|
|
1409
|
+
failure: r != null ? (a) => r({ error: a, reload: s }) : void 0,
|
|
1410
|
+
success: (a) => c({ value: a, reload: s })
|
|
1399
1411
|
})
|
|
1400
1412
|
);
|
|
1401
|
-
},
|
|
1413
|
+
}, so = ({
|
|
1402
1414
|
request: t,
|
|
1403
1415
|
load: e,
|
|
1404
|
-
|
|
1416
|
+
convertError: o = (l) => l,
|
|
1417
|
+
onSuccess: n,
|
|
1418
|
+
onError: s,
|
|
1419
|
+
onSettled: i,
|
|
1420
|
+
success: r,
|
|
1421
|
+
pending: c,
|
|
1422
|
+
failure: a
|
|
1405
1423
|
}) => {
|
|
1406
|
-
const
|
|
1407
|
-
|
|
1424
|
+
const l = Dn({
|
|
1425
|
+
request: t,
|
|
1426
|
+
load: e,
|
|
1427
|
+
convertError: o,
|
|
1428
|
+
onSuccess: n,
|
|
1429
|
+
onError: s,
|
|
1430
|
+
onSettled: i
|
|
1431
|
+
});
|
|
1432
|
+
return Wn(l, { success: r, pending: c, failure: a });
|
|
1408
1433
|
}, Fn = (t, e) => {
|
|
1409
1434
|
if (typeof e == "function")
|
|
1410
1435
|
return Fn(t, { success: e });
|
|
1411
|
-
const o = e.failure ?? ((
|
|
1412
|
-
M(
|
|
1413
|
-
|
|
1436
|
+
const o = e.failure ?? ((s) => q(
|
|
1437
|
+
M(s.on(console.error)),
|
|
1438
|
+
s.map((i) => `Error: ${i}`)
|
|
1414
1439
|
)), n = e.success;
|
|
1415
|
-
return oe(
|
|
1416
|
-
Success: (
|
|
1417
|
-
Failure: (
|
|
1440
|
+
return oe(O.toSignal(t), {
|
|
1441
|
+
Success: (s) => n(s.$.value),
|
|
1442
|
+
Failure: (s) => o(s.$.error)
|
|
1418
1443
|
});
|
|
1419
|
-
},
|
|
1444
|
+
}, ro = () => ne.focus((t) => {
|
|
1420
1445
|
var e;
|
|
1421
1446
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1422
1447
|
});
|
|
@@ -1438,7 +1463,7 @@ class Rt {
|
|
|
1438
1463
|
* console.log(rect.height); // 50
|
|
1439
1464
|
* ```
|
|
1440
1465
|
*/
|
|
1441
|
-
constructor(e, o, n,
|
|
1466
|
+
constructor(e, o, n, s, i, r) {
|
|
1442
1467
|
/**
|
|
1443
1468
|
* Compares this rectangle with another rectangle for equality.
|
|
1444
1469
|
*
|
|
@@ -1459,8 +1484,8 @@ class Rt {
|
|
|
1459
1484
|
* console.log(rect1.equals(rect3)); // true (within tolerance)
|
|
1460
1485
|
* ```
|
|
1461
1486
|
*/
|
|
1462
|
-
|
|
1463
|
-
this.left = e, this.top = o, this.width = n, this.height =
|
|
1487
|
+
At(this, "equals", (e) => ht(this.left, e.left) && ht(this.top, e.top) && ht(this.width, e.width) && ht(this.height, e.height));
|
|
1488
|
+
this.left = e, this.top = o, this.width = n, this.height = s, this.localLeft = i, this.localTop = r;
|
|
1464
1489
|
}
|
|
1465
1490
|
/**
|
|
1466
1491
|
* Creates a new Rect instance using an object with optional properties.
|
|
@@ -1491,11 +1516,11 @@ class Rt {
|
|
|
1491
1516
|
left: e = 0,
|
|
1492
1517
|
top: o = 0,
|
|
1493
1518
|
width: n = 0,
|
|
1494
|
-
height:
|
|
1495
|
-
localLeft:
|
|
1496
|
-
localTop:
|
|
1519
|
+
height: s = 0,
|
|
1520
|
+
localLeft: i = 0,
|
|
1521
|
+
localTop: r = 0
|
|
1497
1522
|
}) {
|
|
1498
|
-
return new Rt(e, o, n,
|
|
1523
|
+
return new Rt(e, o, n, s, i, r);
|
|
1499
1524
|
}
|
|
1500
1525
|
/**
|
|
1501
1526
|
* Gets the x-coordinate of the right edge of the rectangle.
|
|
@@ -1608,25 +1633,25 @@ class Rt {
|
|
|
1608
1633
|
return { width: this.width, height: this.height };
|
|
1609
1634
|
}
|
|
1610
1635
|
}
|
|
1611
|
-
function
|
|
1636
|
+
function Qt(t) {
|
|
1612
1637
|
const e = t.getBoundingClientRect();
|
|
1613
1638
|
return Rt.of({
|
|
1614
1639
|
top: e.top + window.scrollY,
|
|
1615
1640
|
left: e.left + window.scrollX,
|
|
1616
1641
|
width: e.width,
|
|
1617
1642
|
height: e.height,
|
|
1618
|
-
localLeft:
|
|
1619
|
-
localTop:
|
|
1643
|
+
localLeft: t.offsetLeft,
|
|
1644
|
+
localTop: t.offsetTop
|
|
1620
1645
|
});
|
|
1621
1646
|
}
|
|
1622
|
-
const io = (t) =>
|
|
1623
|
-
const { element: o } = e, n = F(
|
|
1624
|
-
let
|
|
1625
|
-
return typeof ResizeObserver < "u" && (
|
|
1626
|
-
|
|
1647
|
+
const io = (t) => Se((e) => {
|
|
1648
|
+
const { element: o } = e, n = F(Qt(o), (c, a) => c.equals(a)), s = Mt(t(n))(e), i = () => n.set(Rt.of(Qt(o)));
|
|
1649
|
+
let r = null;
|
|
1650
|
+
return typeof ResizeObserver < "u" && (r = new ResizeObserver(i)), r == null || r.observe(o), M((c) => {
|
|
1651
|
+
r == null || r.disconnect(), s(c);
|
|
1627
1652
|
});
|
|
1628
1653
|
});
|
|
1629
|
-
function
|
|
1654
|
+
function Jt(t) {
|
|
1630
1655
|
return {
|
|
1631
1656
|
/* c8 ignore next 6 */
|
|
1632
1657
|
width: (t == null ? void 0 : t.innerWidth) ?? 0,
|
|
@@ -1635,37 +1660,37 @@ function Gt(t) {
|
|
|
1635
1660
|
}
|
|
1636
1661
|
const co = (t) => (e) => {
|
|
1637
1662
|
const o = at(), n = F(
|
|
1638
|
-
|
|
1639
|
-
(
|
|
1640
|
-
),
|
|
1641
|
-
return o == null || o.addEventListener("resize",
|
|
1642
|
-
o == null || o.removeEventListener("resize",
|
|
1663
|
+
Jt(o),
|
|
1664
|
+
(r, c) => r.width === c.width && r.height === c.height
|
|
1665
|
+
), s = Mt(t(n))(e), i = () => n.set(Jt(o));
|
|
1666
|
+
return o == null || o.addEventListener("resize", i), (r) => {
|
|
1667
|
+
o == null || o.removeEventListener("resize", i), s(r);
|
|
1643
1668
|
};
|
|
1644
1669
|
}, Mn = (t, e) => {
|
|
1645
|
-
const o = e.split("/").filter((
|
|
1646
|
-
for (let
|
|
1647
|
-
const
|
|
1648
|
-
if (!
|
|
1670
|
+
const o = e.split("/").filter((s) => s !== ""), n = {};
|
|
1671
|
+
for (let s = 0; s < t.length; s++) {
|
|
1672
|
+
const i = t[s], r = o[s];
|
|
1673
|
+
if (!r && i.type !== "catch-all")
|
|
1649
1674
|
return null;
|
|
1650
|
-
if (
|
|
1651
|
-
if (
|
|
1675
|
+
if (i.type === "literal") {
|
|
1676
|
+
if (i.value !== r)
|
|
1652
1677
|
return null;
|
|
1653
|
-
} else if (
|
|
1654
|
-
n[
|
|
1655
|
-
else if (
|
|
1678
|
+
} else if (i.type === "param")
|
|
1679
|
+
n[i.name] = r;
|
|
1680
|
+
else if (i.type === "catch-all")
|
|
1656
1681
|
return { params: n, path: e };
|
|
1657
1682
|
}
|
|
1658
1683
|
return o.length !== t.length ? null : { params: n, path: e };
|
|
1659
|
-
},
|
|
1684
|
+
}, Ae = (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) => {
|
|
1660
1685
|
const e = t.map((o) => {
|
|
1661
|
-
const n =
|
|
1686
|
+
const n = Ae(o);
|
|
1662
1687
|
return { route: o, segments: n };
|
|
1663
1688
|
});
|
|
1664
1689
|
return function(n) {
|
|
1665
|
-
for (const { segments:
|
|
1666
|
-
const
|
|
1667
|
-
if (
|
|
1668
|
-
return { ...
|
|
1690
|
+
for (const { segments: s, route: i } of e) {
|
|
1691
|
+
const r = Mn(s, n);
|
|
1692
|
+
if (r)
|
|
1693
|
+
return { ...r, route: i };
|
|
1669
1694
|
}
|
|
1670
1695
|
return null;
|
|
1671
1696
|
};
|
|
@@ -1679,89 +1704,89 @@ const co = (t) => (e) => {
|
|
|
1679
1704
|
};
|
|
1680
1705
|
}
|
|
1681
1706
|
}, Nn = (t, e, o) => {
|
|
1682
|
-
const n = o.split("/").filter((
|
|
1683
|
-
let
|
|
1684
|
-
for (let
|
|
1685
|
-
const c = t[
|
|
1707
|
+
const n = o.split("/").filter((r) => r !== ""), s = {};
|
|
1708
|
+
let i = 0;
|
|
1709
|
+
for (let r = 0; r < t.length; r++) {
|
|
1710
|
+
const c = t[r], a = n[r];
|
|
1686
1711
|
if (!a && c.type !== "catch-all")
|
|
1687
1712
|
return null;
|
|
1688
1713
|
if (c.type === "literal") {
|
|
1689
1714
|
if (c.value !== a)
|
|
1690
1715
|
return null;
|
|
1691
|
-
|
|
1716
|
+
i++;
|
|
1692
1717
|
} else if (c.type === "param")
|
|
1693
|
-
|
|
1718
|
+
s[c.name] = a, i++;
|
|
1694
1719
|
else if (c.type === "catch-all") {
|
|
1695
|
-
const l = "/" + n.slice(0,
|
|
1720
|
+
const l = "/" + n.slice(0, i).join("/"), f = "/" + n.slice(i).join("/");
|
|
1696
1721
|
return {
|
|
1697
|
-
params:
|
|
1722
|
+
params: s,
|
|
1698
1723
|
matchedPath: l === "/" ? "" : l,
|
|
1699
|
-
remainingPath:
|
|
1724
|
+
remainingPath: f === "/" ? "" : f,
|
|
1700
1725
|
route: e
|
|
1701
1726
|
};
|
|
1702
1727
|
}
|
|
1703
1728
|
}
|
|
1704
1729
|
if (n.length === t.length) {
|
|
1705
|
-
const
|
|
1730
|
+
const r = "/" + n.join("/");
|
|
1706
1731
|
return {
|
|
1707
|
-
params:
|
|
1708
|
-
matchedPath:
|
|
1732
|
+
params: s,
|
|
1733
|
+
matchedPath: r === "/" ? "" : r,
|
|
1709
1734
|
remainingPath: "",
|
|
1710
1735
|
route: e
|
|
1711
1736
|
};
|
|
1712
1737
|
}
|
|
1713
1738
|
return null;
|
|
1714
|
-
},
|
|
1739
|
+
}, Oe = (t) => {
|
|
1715
1740
|
const e = t.map((o) => {
|
|
1716
|
-
const n =
|
|
1741
|
+
const n = Ae(o);
|
|
1717
1742
|
return { route: o, segments: n };
|
|
1718
1743
|
});
|
|
1719
1744
|
return function(n) {
|
|
1720
|
-
for (const { segments:
|
|
1721
|
-
const
|
|
1722
|
-
if (
|
|
1723
|
-
return
|
|
1745
|
+
for (const { segments: s, route: i } of e) {
|
|
1746
|
+
const r = Nn(s, i, n);
|
|
1747
|
+
if (r)
|
|
1748
|
+
return r;
|
|
1724
1749
|
}
|
|
1725
1750
|
return null;
|
|
1726
1751
|
};
|
|
1727
1752
|
}, lo = (t) => {
|
|
1728
|
-
const e =
|
|
1753
|
+
const e = Oe(Object.keys(t));
|
|
1729
1754
|
return ke(
|
|
1730
1755
|
Ct,
|
|
1731
1756
|
{},
|
|
1732
|
-
() =>
|
|
1733
|
-
const
|
|
1734
|
-
const
|
|
1735
|
-
if (
|
|
1736
|
-
throw console.error("No route found for",
|
|
1757
|
+
() => rt(Nt, (o) => rt(Ct, (n) => {
|
|
1758
|
+
const s = o.map((i) => {
|
|
1759
|
+
const r = e(i.pathname);
|
|
1760
|
+
if (r == null)
|
|
1761
|
+
throw console.error("No route found for", i), new Error("No route found");
|
|
1737
1762
|
const c = {
|
|
1738
|
-
matchedPath:
|
|
1739
|
-
remainingPath:
|
|
1740
|
-
fullPath:
|
|
1741
|
-
params:
|
|
1763
|
+
matchedPath: r.matchedPath,
|
|
1764
|
+
remainingPath: r.remainingPath,
|
|
1765
|
+
fullPath: i.pathname,
|
|
1766
|
+
params: r.params
|
|
1742
1767
|
};
|
|
1743
1768
|
return n.value = [...n.value, c], {
|
|
1744
|
-
params:
|
|
1745
|
-
route:
|
|
1746
|
-
path:
|
|
1747
|
-
search:
|
|
1748
|
-
hash:
|
|
1769
|
+
params: r.params,
|
|
1770
|
+
route: r.route,
|
|
1771
|
+
path: r.matchedPath || i.pathname,
|
|
1772
|
+
search: i.search,
|
|
1773
|
+
hash: i.hash
|
|
1749
1774
|
};
|
|
1750
1775
|
});
|
|
1751
1776
|
return ce(
|
|
1752
|
-
|
|
1777
|
+
s.map((i) => [i.route, i]),
|
|
1753
1778
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1754
1779
|
t
|
|
1755
1780
|
);
|
|
1756
1781
|
}))
|
|
1757
1782
|
);
|
|
1758
1783
|
}, uo = (t) => {
|
|
1759
|
-
const e =
|
|
1760
|
-
return
|
|
1761
|
-
const
|
|
1762
|
-
const
|
|
1784
|
+
const e = Oe(Object.keys(t));
|
|
1785
|
+
return rt(Ct, (o) => rt(Nt, (n) => {
|
|
1786
|
+
const s = o.map((i) => {
|
|
1787
|
+
const r = i[i.length - 1], c = (r == null ? void 0 : r.remainingPath) || "";
|
|
1763
1788
|
if (c === "")
|
|
1764
|
-
throw console.error("No remaining path for SubRouter",
|
|
1789
|
+
throw console.error("No remaining path for SubRouter", i), new Error("No remaining path for SubRouter");
|
|
1765
1790
|
const a = e(c);
|
|
1766
1791
|
if (a == null)
|
|
1767
1792
|
throw console.error("No route found for remaining path", c), new Error("No route found");
|
|
@@ -1775,12 +1800,12 @@ const co = (t) => (e) => {
|
|
|
1775
1800
|
};
|
|
1776
1801
|
});
|
|
1777
1802
|
return ce(
|
|
1778
|
-
|
|
1803
|
+
s.map((i) => [i.route, i]),
|
|
1779
1804
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1780
1805
|
t
|
|
1781
1806
|
);
|
|
1782
1807
|
}));
|
|
1783
|
-
}, yt = 60 * 1e3, Dt = 60 * yt, ct = 24 * Dt,
|
|
1808
|
+
}, yt = 60 * 1e3, Dt = 60 * yt, ct = 24 * Dt, Gt = 7 * ct, Zt = 30 * ct, Vn = 365 * ct, $n = [
|
|
1784
1809
|
{
|
|
1785
1810
|
max: yt * 90,
|
|
1786
1811
|
value: yt,
|
|
@@ -1803,8 +1828,8 @@ const co = (t) => (e) => {
|
|
|
1803
1828
|
future: { singular: "tomorrow", plural: "in {} days" }
|
|
1804
1829
|
},
|
|
1805
1830
|
{
|
|
1806
|
-
max:
|
|
1807
|
-
value:
|
|
1831
|
+
max: Gt * 6,
|
|
1832
|
+
value: Gt,
|
|
1808
1833
|
name: "week",
|
|
1809
1834
|
past: { singular: "last week", plural: "{} weeks ago" },
|
|
1810
1835
|
future: { singular: "in a week", plural: "in {} weeks" }
|
|
@@ -1825,10 +1850,10 @@ const co = (t) => (e) => {
|
|
|
1825
1850
|
}
|
|
1826
1851
|
];
|
|
1827
1852
|
function te(t, e, o, n) {
|
|
1828
|
-
const
|
|
1829
|
-
return
|
|
1853
|
+
const s = Math.round(t / e);
|
|
1854
|
+
return s <= 1 ? o : n.replace(
|
|
1830
1855
|
"{}",
|
|
1831
|
-
|
|
1856
|
+
s.toLocaleString(void 0, {
|
|
1832
1857
|
maximumFractionDigits: 0,
|
|
1833
1858
|
minimumFractionDigits: 0
|
|
1834
1859
|
})
|
|
@@ -1846,11 +1871,11 @@ const Bn = (t = 1e3) => {
|
|
|
1846
1871
|
return t < 0 ? te(e, o.value, o.past.singular, o.past.plural) : te(e, o.value, o.future.singular, o.future.plural);
|
|
1847
1872
|
throw new Error("unreachable");
|
|
1848
1873
|
}, Un = (t, { now: e, frequency: o = 1e4 } = {}) => {
|
|
1849
|
-
const n = e != null ? ee.is(e) ? e.derive() : F(e) : Bn(o),
|
|
1874
|
+
const n = e != null ? ee.is(e) ? e.derive() : F(e) : Bn(o), s = ie(
|
|
1850
1875
|
t,
|
|
1851
1876
|
n
|
|
1852
|
-
)((
|
|
1853
|
-
return
|
|
1877
|
+
)((i, r) => i.getTime() - r.getTime());
|
|
1878
|
+
return s.onDispose(() => O.dispose(n)), s;
|
|
1854
1879
|
}, zn = (t, e = {}) => {
|
|
1855
1880
|
const o = Un(t, e), n = o.map(Hn);
|
|
1856
1881
|
return n.onDispose(o.dispose), n;
|
|
@@ -1862,7 +1887,7 @@ class Kn extends Ce {
|
|
|
1862
1887
|
* Triggers an update of the Ticker by incrementing its internal value.
|
|
1863
1888
|
* @returns void
|
|
1864
1889
|
*/
|
|
1865
|
-
|
|
1890
|
+
At(this, "tick", () => this.update((o) => o + 1));
|
|
1866
1891
|
}
|
|
1867
1892
|
}
|
|
1868
1893
|
const ho = (t = 0) => new Kn(t, (e, o) => e === o);
|
|
@@ -1874,8 +1899,8 @@ export {
|
|
|
1874
1899
|
Xn as AutoSelect,
|
|
1875
1900
|
uo as ChildRouter,
|
|
1876
1901
|
io as ElementRect,
|
|
1877
|
-
|
|
1878
|
-
|
|
1902
|
+
Gn as HTMLTitle,
|
|
1903
|
+
Jn as HiddenWhenEmpty,
|
|
1879
1904
|
Ye as InViewport,
|
|
1880
1905
|
Nt as Location,
|
|
1881
1906
|
qe as OnClickOutside,
|
|
@@ -1883,27 +1908,27 @@ export {
|
|
|
1883
1908
|
eo as OnEscapeKey,
|
|
1884
1909
|
fe as OnKeyPressed,
|
|
1885
1910
|
oo as PopOver,
|
|
1911
|
+
so as Query,
|
|
1912
|
+
Wn as QueryDisplay,
|
|
1886
1913
|
Rt as Rect,
|
|
1887
|
-
ro as Resource,
|
|
1888
|
-
Wn as ResourceDisplay,
|
|
1889
1914
|
Fn as ResultView,
|
|
1890
1915
|
lo as RootRouter,
|
|
1891
1916
|
Ct as RouterContextProvider,
|
|
1892
|
-
|
|
1917
|
+
ro as SelectOnFocus,
|
|
1893
1918
|
Kn as Ticker,
|
|
1894
1919
|
Zn as WhenInViewport,
|
|
1895
1920
|
co as WindowSize,
|
|
1896
1921
|
Fe as _checkExtensionCondition,
|
|
1897
1922
|
We as _getExtension,
|
|
1898
1923
|
ao as _makeRouteMatcher,
|
|
1899
|
-
|
|
1924
|
+
Ae as _parseRouteSegments,
|
|
1900
1925
|
no as allPlacements,
|
|
1901
1926
|
Ve as areLocationsEqual,
|
|
1902
|
-
|
|
1903
|
-
|
|
1927
|
+
Qn as classes,
|
|
1928
|
+
Qt as getAbsoluteRect,
|
|
1904
1929
|
Ne as handleAnchorClick,
|
|
1905
1930
|
le as locationFromURL,
|
|
1906
|
-
Dn as
|
|
1931
|
+
Dn as makeQueryResource,
|
|
1907
1932
|
Xe as matchesKeyCombo,
|
|
1908
1933
|
Mn as matchesRoute,
|
|
1909
1934
|
Bn as nowSignal,
|