@tempots/ui 12.0.0 → 13.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/index.cjs +1 -1
- package/index.js +564 -562
- package/package.json +2 -2
- package/renderables/size.d.ts +2 -2
- package/utils/make-relative-time.d.ts +3 -3
package/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { getWindow as st, prop as M, makeProviderMark as Ft, computedOf as Mt, Signal as
|
|
2
|
-
import { delayed as pe, AsyncResult as R, nearEqual as mt, interval as
|
|
3
|
-
const
|
|
1
|
+
import { getWindow as st, prop as M, makeProviderMark as Ft, computedOf as Mt, Signal as ce, Use as ct, html as Et, on as le, Value as C, attr as Nt, Empty as Pt, OneOfType as ue, WithElement as _, OnDispose as N, Fragment as Y, Portal as fe, renderableOfTNode as he, When as de, previousSignal as He, effectOf as We, WithBrowserCtx as Fe, WithCtx as Me, Provide as Ne, OneOfTuple as me, Prop as Ve } from "@tempots/dom";
|
|
2
|
+
import { delayed as pe, AsyncResult as R, nearEqual as mt, interval as $e } from "@tempots/std";
|
|
3
|
+
const ze = (t) => {
|
|
4
4
|
const e = t.split("/").pop();
|
|
5
5
|
if (e == null || e.startsWith(".")) return;
|
|
6
6
|
const n = e.split(".") || [];
|
|
7
7
|
return n.length > 1 ? "." + n.pop() : void 0;
|
|
8
|
-
},
|
|
9
|
-
const n =
|
|
8
|
+
}, Be = (t, e) => {
|
|
9
|
+
const n = ze(e);
|
|
10
10
|
return n != null && (t.length === 0 || !t.some((o) => n == o));
|
|
11
|
-
},
|
|
12
|
-
let
|
|
13
|
-
for (;
|
|
14
|
-
|
|
15
|
-
if (
|
|
11
|
+
}, _e = (t, e, n, o) => {
|
|
12
|
+
let s = t.target;
|
|
13
|
+
for (; s != null && !(s instanceof HTMLAnchorElement); )
|
|
14
|
+
s = s.parentElement;
|
|
15
|
+
if (s == null)
|
|
16
16
|
return !0;
|
|
17
|
-
const i =
|
|
17
|
+
const i = s;
|
|
18
18
|
if (t.button !== 0 || t.ctrlKey || t.metaKey || i.target !== "_self" && i.target !== "" || i.getAttribute("download") != null)
|
|
19
19
|
return !0;
|
|
20
|
-
const { pathname:
|
|
20
|
+
const { pathname: r, search: a, hash: c } = i;
|
|
21
21
|
if (o) {
|
|
22
|
-
const l =
|
|
22
|
+
const l = r + a + c, u = i.getAttribute("href");
|
|
23
23
|
if (!u?.startsWith("#") && u !== l)
|
|
24
24
|
return !0;
|
|
25
25
|
}
|
|
26
|
-
return e ? !1 :
|
|
27
|
-
},
|
|
26
|
+
return e ? !1 : Be(n, r);
|
|
27
|
+
}, Ue = (t, e = {
|
|
28
28
|
ignoreUrlWithExtension: !0,
|
|
29
29
|
allowedExtensions: [],
|
|
30
30
|
ignoreExternalUrl: !0
|
|
@@ -33,27 +33,27 @@ const $e = (t) => {
|
|
|
33
33
|
(o) => o.startsWith(".") ? o : "." + o
|
|
34
34
|
) : [];
|
|
35
35
|
return (o) => {
|
|
36
|
-
|
|
36
|
+
_e(
|
|
37
37
|
o,
|
|
38
38
|
e.ignoreUrlWithExtension ?? !0,
|
|
39
39
|
n,
|
|
40
40
|
e.ignoreExternalUrl ?? !0
|
|
41
41
|
) || t() && o.preventDefault();
|
|
42
42
|
};
|
|
43
|
-
},
|
|
43
|
+
}, Ke = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, Lt = (t, e) => {
|
|
44
44
|
const n = new URL(t, e ?? st()?.location.toString()), o = Object.fromEntries(n.searchParams?.entries() ?? []);
|
|
45
|
-
let
|
|
46
|
-
return
|
|
45
|
+
let s = n.hash;
|
|
46
|
+
return s.startsWith("#") && (s = s.substring(1)), {
|
|
47
47
|
pathname: n.pathname,
|
|
48
48
|
search: o,
|
|
49
|
-
hash:
|
|
49
|
+
hash: s === "" ? void 0 : s
|
|
50
50
|
};
|
|
51
51
|
}, et = (t) => {
|
|
52
52
|
const n = new URLSearchParams(t.search).toString(), o = t.hash;
|
|
53
53
|
return `${t.pathname}${n ? `?${n}` : ""}${o ? `#${o}` : ""}`;
|
|
54
|
-
},
|
|
54
|
+
}, je = (t) => {
|
|
55
55
|
document.startViewTransition ? document.startViewTransition(t) : t();
|
|
56
|
-
},
|
|
56
|
+
}, jt = () => {
|
|
57
57
|
const t = st(), e = t?.location.hash ?? "";
|
|
58
58
|
return {
|
|
59
59
|
pathname: t?.location.pathname ?? "",
|
|
@@ -62,52 +62,52 @@ const $e = (t) => {
|
|
|
62
62
|
),
|
|
63
63
|
hash: e.startsWith("#") ? e.substring(1) || void 0 : e === "" ? void 0 : e
|
|
64
64
|
};
|
|
65
|
-
},
|
|
65
|
+
}, It = (t) => {
|
|
66
66
|
if (t?.scroll !== "auto")
|
|
67
67
|
return;
|
|
68
68
|
const e = st();
|
|
69
69
|
e && e.requestAnimationFrame(
|
|
70
70
|
() => e.scrollTo({ top: 0, left: 0, behavior: "auto" })
|
|
71
71
|
);
|
|
72
|
-
},
|
|
73
|
-
e?.viewTransition ?
|
|
74
|
-
},
|
|
75
|
-
const t = M(
|
|
76
|
-
t.set(
|
|
72
|
+
}, Yt = (t, e) => {
|
|
73
|
+
e?.viewTransition ? je(t) : t();
|
|
74
|
+
}, Ie = () => {
|
|
75
|
+
const t = M(jt(), Ke), e = st(), n = () => {
|
|
76
|
+
t.set(jt());
|
|
77
77
|
};
|
|
78
78
|
e?.addEventListener("popstate", n), e?.addEventListener("hashchange", n);
|
|
79
79
|
const o = (c, l, u) => {
|
|
80
|
-
|
|
80
|
+
Yt(() => {
|
|
81
81
|
if (e) {
|
|
82
82
|
const h = et(c), g = l?.state ?? {};
|
|
83
83
|
u === "replaceState" || l?.replace ? e.history.replaceState(g, "", h) : e.history.pushState(g, "", h);
|
|
84
84
|
}
|
|
85
85
|
t.set(c);
|
|
86
|
-
}, l),
|
|
87
|
-
},
|
|
88
|
-
|
|
86
|
+
}, l), It(l);
|
|
87
|
+
}, s = (c, l) => {
|
|
88
|
+
Yt(() => {
|
|
89
89
|
e?.history.go(c);
|
|
90
|
-
}, l),
|
|
90
|
+
}, l), It(l);
|
|
91
91
|
};
|
|
92
92
|
return {
|
|
93
93
|
location: t,
|
|
94
94
|
commit: o,
|
|
95
|
-
go:
|
|
96
|
-
back: (c) =>
|
|
97
|
-
forward: (c) =>
|
|
95
|
+
go: s,
|
|
96
|
+
back: (c) => s(-1, c),
|
|
97
|
+
forward: (c) => s(1, c),
|
|
98
98
|
resolve: (c) => Lt(c),
|
|
99
99
|
dispose: () => {
|
|
100
100
|
e?.removeEventListener("popstate", n), e?.removeEventListener("hashchange", n), t.dispose();
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
|
-
},
|
|
103
|
+
}, Ye = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), qe = (t) => {
|
|
104
104
|
const e = t.container.currentURL, n = e.iso(
|
|
105
|
-
(
|
|
106
|
-
(
|
|
107
|
-
if (
|
|
108
|
-
return et(
|
|
109
|
-
const a = new URL(
|
|
110
|
-
return et({ ...
|
|
105
|
+
(r) => Lt(r, e.value),
|
|
106
|
+
(r) => {
|
|
107
|
+
if (Ye(r.pathname))
|
|
108
|
+
return et(r);
|
|
109
|
+
const a = new URL(r.pathname, e.value), c = a.origin + a.pathname;
|
|
110
|
+
return et({ ...r, pathname: c });
|
|
111
111
|
}
|
|
112
112
|
);
|
|
113
113
|
return {
|
|
@@ -115,18 +115,18 @@ const $e = (t) => {
|
|
|
115
115
|
dispose: () => {
|
|
116
116
|
n.dispose();
|
|
117
117
|
},
|
|
118
|
-
commit: (
|
|
119
|
-
n.set(
|
|
118
|
+
commit: (r, a, c) => {
|
|
119
|
+
n.set(r);
|
|
120
120
|
},
|
|
121
|
-
go: (
|
|
121
|
+
go: (r, a) => {
|
|
122
122
|
},
|
|
123
123
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
124
|
-
back: (
|
|
124
|
+
back: (r) => {
|
|
125
125
|
},
|
|
126
126
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
127
|
-
forward: (
|
|
127
|
+
forward: (r) => {
|
|
128
128
|
},
|
|
129
|
-
resolve: (
|
|
129
|
+
resolve: (r) => Lt(r, e.value)
|
|
130
130
|
};
|
|
131
131
|
}, it = (t) => ({
|
|
132
132
|
pathname: t.pathname,
|
|
@@ -138,32 +138,32 @@ const $e = (t) => {
|
|
|
138
138
|
return e === "" ? void 0 : e;
|
|
139
139
|
}, ge = (t, e) => {
|
|
140
140
|
const n = { ...t };
|
|
141
|
-
for (const [o,
|
|
142
|
-
|
|
141
|
+
for (const [o, s] of Object.entries(e))
|
|
142
|
+
s == null ? delete n[o] : n[o] = s;
|
|
143
143
|
return n;
|
|
144
|
-
},
|
|
145
|
-
const n = e?.includeSearch ?? !0, o = e?.includeHash ?? !0,
|
|
144
|
+
}, Xe = (t, e) => {
|
|
145
|
+
const n = e?.includeSearch ?? !0, o = e?.includeHash ?? !0, s = e?.ignoreSearchParams ?? [];
|
|
146
146
|
let i;
|
|
147
147
|
if (!n)
|
|
148
148
|
i = {};
|
|
149
|
-
else if (
|
|
149
|
+
else if (s.length === 0)
|
|
150
150
|
i = { ...t.search };
|
|
151
151
|
else {
|
|
152
|
-
const
|
|
152
|
+
const r = new Set(s);
|
|
153
153
|
i = {};
|
|
154
154
|
for (const [a, c] of Object.entries(t.search))
|
|
155
|
-
|
|
155
|
+
r.has(a) || (i[a] = c);
|
|
156
156
|
}
|
|
157
157
|
return {
|
|
158
158
|
pathname: t.pathname,
|
|
159
159
|
search: i,
|
|
160
160
|
hash: o ? t.hash : void 0
|
|
161
161
|
};
|
|
162
|
-
},
|
|
163
|
-
const o =
|
|
162
|
+
}, qt = (t, e, n) => {
|
|
163
|
+
const o = Xe(t, n);
|
|
164
164
|
return typeof e == "string" ? et(o) === e : e instanceof RegExp ? ((e.global || e.sticky) && (e.lastIndex = 0), e.test(et(o))) : e(o);
|
|
165
165
|
};
|
|
166
|
-
class
|
|
166
|
+
class Qe {
|
|
167
167
|
constructor(e) {
|
|
168
168
|
this.current = e;
|
|
169
169
|
}
|
|
@@ -182,8 +182,8 @@ class Xe {
|
|
|
182
182
|
setHash(e) {
|
|
183
183
|
const n = kt(e);
|
|
184
184
|
if (n == null) {
|
|
185
|
-
const { hash: o, ...
|
|
186
|
-
this.current =
|
|
185
|
+
const { hash: o, ...s } = this.current;
|
|
186
|
+
this.current = s;
|
|
187
187
|
} else
|
|
188
188
|
this.current = {
|
|
189
189
|
...this.current,
|
|
@@ -211,12 +211,12 @@ class Xe {
|
|
|
211
211
|
}, this;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
const
|
|
215
|
-
const e = t.location, n = e.map(et), o = e.map((p) => p.pathname),
|
|
214
|
+
const Je = (t, e) => t?.replace ? "replaceState" : e, Ge = (t) => {
|
|
215
|
+
const e = t.location, n = e.map(et), o = e.map((p) => p.pathname), s = e.map((p) => ({ ...p.search })), i = e.map((p) => p.hash), r = (p, x) => qt(t.location.value, p, x), a = (p, x) => Mt(
|
|
216
216
|
e,
|
|
217
217
|
p
|
|
218
218
|
)(
|
|
219
|
-
(S, P) =>
|
|
219
|
+
(S, P) => qt(S, P, x)
|
|
220
220
|
), c = (p, x, S) => {
|
|
221
221
|
const P = it({
|
|
222
222
|
...p,
|
|
@@ -224,7 +224,7 @@ const Qe = (t, e) => t?.replace ? "replaceState" : e, Je = (t) => {
|
|
|
224
224
|
});
|
|
225
225
|
t.commit(P, x, S);
|
|
226
226
|
}, l = (p, x) => {
|
|
227
|
-
const S =
|
|
227
|
+
const S = Je(x, "pushState");
|
|
228
228
|
c(p, x, S);
|
|
229
229
|
}, u = (p, x) => {
|
|
230
230
|
const S = p(it(t.location.value));
|
|
@@ -256,7 +256,7 @@ const Qe = (t, e) => t?.replace ? "replaceState" : e, Je = (t) => {
|
|
|
256
256
|
location: e,
|
|
257
257
|
url: n,
|
|
258
258
|
pathname: o,
|
|
259
|
-
search:
|
|
259
|
+
search: s,
|
|
260
260
|
hash: i,
|
|
261
261
|
setLocation: l,
|
|
262
262
|
updateLocation: u,
|
|
@@ -279,43 +279,43 @@ const Qe = (t, e) => t?.replace ? "replaceState" : e, Je = (t) => {
|
|
|
279
279
|
),
|
|
280
280
|
queryParam: (p) => e.map((x) => x.search[p]),
|
|
281
281
|
run: (p, x) => {
|
|
282
|
-
const S = new
|
|
282
|
+
const S = new Qe(
|
|
283
283
|
it(t.location.value)
|
|
284
284
|
);
|
|
285
285
|
p(S), l(it(S.location), x);
|
|
286
286
|
},
|
|
287
|
-
match:
|
|
287
|
+
match: r,
|
|
288
288
|
matchSignal: a
|
|
289
289
|
},
|
|
290
290
|
dispose: () => {
|
|
291
|
-
t.dispose(), n.dispose(), o.dispose(),
|
|
291
|
+
t.dispose(), n.dispose(), o.dispose(), s.dispose(), i.dispose();
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
|
-
},
|
|
294
|
+
}, Ze = (t) => {
|
|
295
295
|
if (t.isBrowser())
|
|
296
|
-
return
|
|
296
|
+
return Ie();
|
|
297
297
|
if (t.isHeadless())
|
|
298
|
-
return
|
|
298
|
+
return qe(t);
|
|
299
299
|
throw new Error("Unknown context");
|
|
300
|
-
},
|
|
300
|
+
}, Vt = {
|
|
301
301
|
mark: Ft("Location"),
|
|
302
302
|
create: (t, e) => {
|
|
303
|
-
const n =
|
|
303
|
+
const n = Ze(e), { handle: o, dispose: s } = Ge(n);
|
|
304
304
|
return {
|
|
305
305
|
value: o,
|
|
306
|
-
dispose:
|
|
306
|
+
dispose: s
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
|
-
},
|
|
310
|
-
if (typeof t == "string" ||
|
|
311
|
-
return
|
|
312
|
-
const { href: n, state: o, scroll:
|
|
313
|
-
return ct(
|
|
314
|
-
|
|
315
|
-
|
|
309
|
+
}, tn = (t, ...e) => {
|
|
310
|
+
if (typeof t == "string" || ce.is(t))
|
|
311
|
+
return tn({ href: t }, ...e);
|
|
312
|
+
const { href: n, state: o, scroll: s, viewTransition: i, replace: r, ...a } = t;
|
|
313
|
+
return ct(Vt, (c) => Et.a(
|
|
314
|
+
le.click(
|
|
315
|
+
Ue(() => {
|
|
316
316
|
let l = !1;
|
|
317
317
|
const u = {};
|
|
318
|
-
return o !== void 0 && (u.state = o, l = !0),
|
|
318
|
+
return o !== void 0 && (u.state = o, l = !0), s !== void 0 && (u.scroll = s, l = !0), i !== void 0 && (u.viewTransition = i, l = !0), r !== void 0 && (u.replace = r, l = !0), c.navigate(
|
|
319
319
|
C.get(n),
|
|
320
320
|
l ? u : void 0
|
|
321
321
|
), !0;
|
|
@@ -325,48 +325,48 @@ const Qe = (t, e) => t?.replace ? "replaceState" : e, Je = (t) => {
|
|
|
325
325
|
...e
|
|
326
326
|
/* c8 ignore next 2 */
|
|
327
327
|
));
|
|
328
|
-
},
|
|
328
|
+
}, yo = {
|
|
329
329
|
mark: Ft("Appearance"),
|
|
330
330
|
create: () => {
|
|
331
|
-
const t =
|
|
331
|
+
const t = en();
|
|
332
332
|
return {
|
|
333
333
|
value: t,
|
|
334
334
|
dispose: t.dispose
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
337
|
};
|
|
338
|
-
function
|
|
339
|
-
const t = st(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, n = e?.matches ?? !1, o = M(n ? "dark" : "light"),
|
|
340
|
-
return e?.addEventListener("change",
|
|
338
|
+
function en() {
|
|
339
|
+
const t = st(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, n = e?.matches ?? !1, o = M(n ? "dark" : "light"), s = (i) => o.set(i.matches ? "dark" : "light");
|
|
340
|
+
return e?.addEventListener("change", s), o.onDispose(() => e?.removeEventListener("change", s)), o;
|
|
341
341
|
}
|
|
342
342
|
const we = (t, e) => {
|
|
343
343
|
if (typeof e == "function")
|
|
344
344
|
return we(t, { success: e });
|
|
345
|
-
const n = e.failure ?? ((
|
|
346
|
-
return
|
|
347
|
-
AsyncSuccess: (
|
|
348
|
-
AsyncFailure: (
|
|
349
|
-
Loading: (
|
|
345
|
+
const n = e.failure ?? ((r) => r.map((a) => `Error: ${a}`)), o = e.success, s = e.loading ?? (() => Pt), i = e.notAsked ?? (() => Pt);
|
|
346
|
+
return ue(C.toSignal(t), {
|
|
347
|
+
AsyncSuccess: (r) => o(r.$.value),
|
|
348
|
+
AsyncFailure: (r) => n(r.$.error),
|
|
349
|
+
Loading: (r) => s(r.map((a) => a.previousValue)),
|
|
350
350
|
NotAsked: i
|
|
351
351
|
});
|
|
352
|
-
},
|
|
352
|
+
}, xo = (t = 10) => _((e) => N(pe(() => e?.focus(), t))), bo = (t = 10) => _((e) => {
|
|
353
353
|
const n = pe(() => e.select(), t);
|
|
354
354
|
return N(n);
|
|
355
355
|
});
|
|
356
|
-
function
|
|
356
|
+
function So(t) {
|
|
357
357
|
const e = Object.entries(t);
|
|
358
358
|
return Y(
|
|
359
359
|
...e.map(
|
|
360
|
-
([n, o]) => Nt.class(C.map(o, (
|
|
360
|
+
([n, o]) => Nt.class(C.map(o, (s) => s ? n : void 0))
|
|
361
361
|
)
|
|
362
362
|
);
|
|
363
363
|
}
|
|
364
|
-
const
|
|
364
|
+
const Oo = _((t) => {
|
|
365
365
|
const e = t.style.getPropertyValue(":empty");
|
|
366
366
|
return t.style.setProperty(":empty", "display:none"), N((n) => {
|
|
367
367
|
n && t.style.setProperty(":empty", e);
|
|
368
368
|
});
|
|
369
|
-
}),
|
|
369
|
+
}), Ao = (t) => fe("head > title", Nt.innerText(t)), nn = {
|
|
370
370
|
partial: {
|
|
371
371
|
root: null,
|
|
372
372
|
rootMargin: "0px",
|
|
@@ -384,33 +384,33 @@ const So = _((t) => {
|
|
|
384
384
|
partial: null,
|
|
385
385
|
full: null
|
|
386
386
|
};
|
|
387
|
-
function
|
|
387
|
+
function on(t) {
|
|
388
388
|
return at[t] == null && (at[t] = new IntersectionObserver((e) => {
|
|
389
389
|
e.forEach((n) => {
|
|
390
390
|
gt[t].get(n.target)?.set(n.isIntersecting);
|
|
391
391
|
});
|
|
392
|
-
},
|
|
392
|
+
}, nn[t])), at[t];
|
|
393
393
|
}
|
|
394
|
-
const
|
|
394
|
+
const sn = ({ mode: t = "partial", once: e = !1 }, n) => {
|
|
395
395
|
const o = M(!1);
|
|
396
396
|
return Y(
|
|
397
|
-
_((
|
|
398
|
-
const i = typeof IntersectionObserver < "u" ?
|
|
399
|
-
gt[t].set(
|
|
400
|
-
function
|
|
401
|
-
i?.unobserve(
|
|
397
|
+
_((s) => {
|
|
398
|
+
const i = typeof IntersectionObserver < "u" ? on(t) : null;
|
|
399
|
+
gt[t].set(s, o), i?.observe(s);
|
|
400
|
+
function r() {
|
|
401
|
+
i?.unobserve(s), gt[t].delete(s), gt[t].size === 0 && (at[t]?.disconnect(), at[t] = null);
|
|
402
402
|
}
|
|
403
403
|
let a = null;
|
|
404
404
|
return e && (a = o.on((c) => {
|
|
405
|
-
c &&
|
|
405
|
+
c && r();
|
|
406
406
|
})), N(() => {
|
|
407
|
-
o.dispose(),
|
|
407
|
+
o.dispose(), r(), a?.();
|
|
408
408
|
});
|
|
409
409
|
}),
|
|
410
|
-
|
|
410
|
+
he(n(o))
|
|
411
411
|
);
|
|
412
|
-
},
|
|
413
|
-
function
|
|
412
|
+
}, Ro = (t, e, n) => sn(t, (o) => de(o, e, n ?? (() => Pt)));
|
|
413
|
+
function rn(t) {
|
|
414
414
|
return _((e) => {
|
|
415
415
|
const n = (o) => {
|
|
416
416
|
e.contains(o.target) || t(o);
|
|
@@ -420,9 +420,9 @@ function sn(t) {
|
|
|
420
420
|
});
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
|
-
const Z = (t, e) => t === void 0 || t === e,
|
|
424
|
-
function
|
|
425
|
-
return typeof t == "string" ? e.key === t :
|
|
423
|
+
const Z = (t, e) => t === void 0 || t === e, Xt = (t, e) => t === void 0 || t === e;
|
|
424
|
+
function an(t, e) {
|
|
425
|
+
return typeof t == "string" ? e.key === t : Xt(t.key, e.key) && Xt(t.code, e.code) && Z(t.ctrlKey, e.ctrlKey) && Z(t.altKey, e.altKey) && Z(t.shiftKey, e.shiftKey) && Z(t.metaKey, e.metaKey) && Z(t.repeat, e.repeat) && Z(
|
|
426
426
|
t.commandOrControlKey,
|
|
427
427
|
e.metaKey || e.ctrlKey
|
|
428
428
|
);
|
|
@@ -432,11 +432,11 @@ function ve({
|
|
|
432
432
|
handler: e
|
|
433
433
|
}) {
|
|
434
434
|
return _((n) => {
|
|
435
|
-
const o = (
|
|
436
|
-
if (n.contains(
|
|
435
|
+
const o = (s) => {
|
|
436
|
+
if (n.contains(s.target)) {
|
|
437
437
|
for (const i of t)
|
|
438
|
-
if (
|
|
439
|
-
e(
|
|
438
|
+
if (an(i, s)) {
|
|
439
|
+
e(s);
|
|
440
440
|
break;
|
|
441
441
|
}
|
|
442
442
|
}
|
|
@@ -446,90 +446,90 @@ function ve({
|
|
|
446
446
|
});
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function Eo(t) {
|
|
450
450
|
return ve({ allowedKeys: ["Enter"], handler: t });
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function Po(t) {
|
|
453
453
|
return ve({ allowedKeys: ["Escape"], handler: t });
|
|
454
454
|
}
|
|
455
|
-
const
|
|
455
|
+
const cn = ({
|
|
456
456
|
mutate: t,
|
|
457
457
|
convertError: e,
|
|
458
458
|
onSuccess: n,
|
|
459
459
|
onError: o,
|
|
460
|
-
onSettled:
|
|
460
|
+
onSettled: s
|
|
461
461
|
}) => {
|
|
462
462
|
let i;
|
|
463
|
-
const
|
|
463
|
+
const r = M(R.notAsked), a = r.map(
|
|
464
464
|
(d) => R.isSuccess(d) ? d.value : void 0
|
|
465
|
-
), c =
|
|
465
|
+
), c = r.map(
|
|
466
466
|
(d) => R.isFailure(d) ? d.error : void 0
|
|
467
|
-
), l =
|
|
467
|
+
), l = r.map((d) => R.isLoading(d)), u = () => {
|
|
468
468
|
i?.abort(), i = void 0;
|
|
469
469
|
};
|
|
470
470
|
return {
|
|
471
|
-
status:
|
|
471
|
+
status: r,
|
|
472
472
|
value: a,
|
|
473
473
|
error: c,
|
|
474
474
|
pending: l,
|
|
475
475
|
execute: async (d, y) => {
|
|
476
476
|
u(), i = new AbortController();
|
|
477
|
-
const m = i.signal, v =
|
|
478
|
-
b != null ?
|
|
477
|
+
const m = i.signal, v = r.get(), b = y?.optimisticValue ?? (y?.optimisticFromRequest != null ? y.optimisticFromRequest(d) : void 0);
|
|
478
|
+
b != null ? r.set(R.loading(b)) : r.set(R.loading(R.getOrUndefined(v)));
|
|
479
479
|
try {
|
|
480
480
|
const w = await t({ request: d, abortSignal: m, previous: v });
|
|
481
|
-
i = void 0,
|
|
481
|
+
i = void 0, r.set(R.success(w)), n?.(w, d);
|
|
482
482
|
} catch (w) {
|
|
483
|
-
i = void 0,
|
|
483
|
+
i = void 0, r.set(R.failure(e(w))), o?.(e(w), d);
|
|
484
484
|
}
|
|
485
|
-
|
|
485
|
+
s?.(r.get(), d);
|
|
486
486
|
},
|
|
487
487
|
cancel: (d) => {
|
|
488
|
-
u(),
|
|
488
|
+
u(), r.set(d ?? R.notAsked);
|
|
489
489
|
},
|
|
490
490
|
dispose: () => {
|
|
491
|
-
i?.abort(), i = void 0,
|
|
491
|
+
i?.abort(), i = void 0, r.dispose();
|
|
492
492
|
}
|
|
493
493
|
};
|
|
494
|
-
},
|
|
495
|
-
const { status: n, dispose: o, execute:
|
|
494
|
+
}, ln = (t, e) => {
|
|
495
|
+
const { status: n, dispose: o, execute: s, cancel: i, pending: r, error: a, value: c } = t, { content: l } = e, u = He(c);
|
|
496
496
|
return Y(
|
|
497
497
|
N(o),
|
|
498
498
|
l({
|
|
499
499
|
previous: u,
|
|
500
|
-
execute:
|
|
500
|
+
execute: s,
|
|
501
501
|
cancel: i,
|
|
502
|
-
pending:
|
|
502
|
+
pending: r,
|
|
503
503
|
error: a,
|
|
504
504
|
value: c,
|
|
505
505
|
status: n
|
|
506
506
|
})
|
|
507
507
|
);
|
|
508
|
-
},
|
|
508
|
+
}, Lo = ({
|
|
509
509
|
mutate: t,
|
|
510
|
-
convertError: e = (
|
|
510
|
+
convertError: e = (r) => r,
|
|
511
511
|
onSuccess: n,
|
|
512
512
|
onError: o,
|
|
513
|
-
onSettled:
|
|
513
|
+
onSettled: s,
|
|
514
514
|
content: i
|
|
515
515
|
}) => {
|
|
516
|
-
const
|
|
516
|
+
const r = cn({
|
|
517
517
|
mutate: t,
|
|
518
518
|
convertError: e,
|
|
519
519
|
onSuccess: n,
|
|
520
520
|
onError: o,
|
|
521
|
-
onSettled:
|
|
521
|
+
onSettled: s
|
|
522
522
|
});
|
|
523
|
-
return
|
|
523
|
+
return ln(r, { content: i });
|
|
524
524
|
}, nt = Math.min, Q = Math.max, wt = Math.round, pt = Math.floor, V = (t) => ({
|
|
525
525
|
x: t,
|
|
526
526
|
y: t
|
|
527
|
-
}),
|
|
527
|
+
}), un = {
|
|
528
528
|
left: "right",
|
|
529
529
|
right: "left",
|
|
530
530
|
bottom: "top",
|
|
531
531
|
top: "bottom"
|
|
532
|
-
},
|
|
532
|
+
}, fn = {
|
|
533
533
|
start: "end",
|
|
534
534
|
end: "start"
|
|
535
535
|
};
|
|
@@ -548,51 +548,51 @@ function ht(t) {
|
|
|
548
548
|
function ye(t) {
|
|
549
549
|
return t === "x" ? "y" : "x";
|
|
550
550
|
}
|
|
551
|
-
function
|
|
551
|
+
function $t(t) {
|
|
552
552
|
return t === "y" ? "height" : "width";
|
|
553
553
|
}
|
|
554
|
-
const
|
|
554
|
+
const hn = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
555
555
|
function I(t) {
|
|
556
|
-
return
|
|
556
|
+
return hn.has(J(t)) ? "y" : "x";
|
|
557
557
|
}
|
|
558
|
-
function
|
|
558
|
+
function zt(t) {
|
|
559
559
|
return ye(I(t));
|
|
560
560
|
}
|
|
561
|
-
function
|
|
561
|
+
function dn(t, e, n) {
|
|
562
562
|
n === void 0 && (n = !1);
|
|
563
|
-
const o = ht(t),
|
|
564
|
-
let
|
|
565
|
-
return e.reference[i] > e.floating[i] && (
|
|
563
|
+
const o = ht(t), s = zt(t), i = $t(s);
|
|
564
|
+
let r = s === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
565
|
+
return e.reference[i] > e.floating[i] && (r = vt(r)), [r, vt(r)];
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function mn(t) {
|
|
568
568
|
const e = vt(t);
|
|
569
569
|
return [Ct(t), e, Ct(e)];
|
|
570
570
|
}
|
|
571
571
|
function Ct(t) {
|
|
572
|
-
return t.replace(/start|end/g, (e) =>
|
|
572
|
+
return t.replace(/start|end/g, (e) => fn[e]);
|
|
573
573
|
}
|
|
574
|
-
const
|
|
575
|
-
function
|
|
574
|
+
const Qt = ["left", "right"], Jt = ["right", "left"], pn = ["top", "bottom"], gn = ["bottom", "top"];
|
|
575
|
+
function wn(t, e, n) {
|
|
576
576
|
switch (t) {
|
|
577
577
|
case "top":
|
|
578
578
|
case "bottom":
|
|
579
|
-
return n ? e ?
|
|
579
|
+
return n ? e ? Jt : Qt : e ? Qt : Jt;
|
|
580
580
|
case "left":
|
|
581
581
|
case "right":
|
|
582
|
-
return e ?
|
|
582
|
+
return e ? pn : gn;
|
|
583
583
|
default:
|
|
584
584
|
return [];
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
function
|
|
588
|
-
const
|
|
589
|
-
let i =
|
|
590
|
-
return
|
|
587
|
+
function vn(t, e, n, o) {
|
|
588
|
+
const s = ht(t);
|
|
589
|
+
let i = wn(J(t), n === "start", o);
|
|
590
|
+
return s && (i = i.map((r) => r + "-" + s), e && (i = i.concat(i.map(Ct)))), i;
|
|
591
591
|
}
|
|
592
592
|
function vt(t) {
|
|
593
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
593
|
+
return t.replace(/left|right|bottom|top/g, (e) => un[e]);
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function yn(t) {
|
|
596
596
|
return {
|
|
597
597
|
top: 0,
|
|
598
598
|
right: 0,
|
|
@@ -602,7 +602,7 @@ function vn(t) {
|
|
|
602
602
|
};
|
|
603
603
|
}
|
|
604
604
|
function xe(t) {
|
|
605
|
-
return typeof t != "number" ?
|
|
605
|
+
return typeof t != "number" ? yn(t) : {
|
|
606
606
|
top: t,
|
|
607
607
|
right: t,
|
|
608
608
|
bottom: t,
|
|
@@ -614,31 +614,31 @@ function yt(t) {
|
|
|
614
614
|
x: e,
|
|
615
615
|
y: n,
|
|
616
616
|
width: o,
|
|
617
|
-
height:
|
|
617
|
+
height: s
|
|
618
618
|
} = t;
|
|
619
619
|
return {
|
|
620
620
|
width: o,
|
|
621
|
-
height:
|
|
621
|
+
height: s,
|
|
622
622
|
top: n,
|
|
623
623
|
left: e,
|
|
624
624
|
right: e + o,
|
|
625
|
-
bottom: n +
|
|
625
|
+
bottom: n + s,
|
|
626
626
|
x: e,
|
|
627
627
|
y: n
|
|
628
628
|
};
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function Gt(t, e, n) {
|
|
631
631
|
let {
|
|
632
632
|
reference: o,
|
|
633
|
-
floating:
|
|
633
|
+
floating: s
|
|
634
634
|
} = t;
|
|
635
|
-
const i = I(e),
|
|
635
|
+
const i = I(e), r = zt(e), a = $t(r), c = J(e), l = i === "y", u = o.x + o.width / 2 - s.width / 2, h = o.y + o.height / 2 - s.height / 2, g = o[a] / 2 - s[a] / 2;
|
|
636
636
|
let f;
|
|
637
637
|
switch (c) {
|
|
638
638
|
case "top":
|
|
639
639
|
f = {
|
|
640
640
|
x: u,
|
|
641
|
-
y: o.y -
|
|
641
|
+
y: o.y - s.height
|
|
642
642
|
};
|
|
643
643
|
break;
|
|
644
644
|
case "bottom":
|
|
@@ -655,7 +655,7 @@ function Zt(t, e, n) {
|
|
|
655
655
|
break;
|
|
656
656
|
case "left":
|
|
657
657
|
f = {
|
|
658
|
-
x: o.x -
|
|
658
|
+
x: o.x - s.width,
|
|
659
659
|
y: h
|
|
660
660
|
};
|
|
661
661
|
break;
|
|
@@ -667,29 +667,29 @@ function Zt(t, e, n) {
|
|
|
667
667
|
}
|
|
668
668
|
switch (ht(e)) {
|
|
669
669
|
case "start":
|
|
670
|
-
f[
|
|
670
|
+
f[r] -= g * (n && l ? -1 : 1);
|
|
671
671
|
break;
|
|
672
672
|
case "end":
|
|
673
|
-
f[
|
|
673
|
+
f[r] += g * (n && l ? -1 : 1);
|
|
674
674
|
break;
|
|
675
675
|
}
|
|
676
676
|
return f;
|
|
677
677
|
}
|
|
678
|
-
const
|
|
678
|
+
const xn = async (t, e, n) => {
|
|
679
679
|
const {
|
|
680
680
|
placement: o = "bottom",
|
|
681
|
-
strategy:
|
|
681
|
+
strategy: s = "absolute",
|
|
682
682
|
middleware: i = [],
|
|
683
|
-
platform:
|
|
684
|
-
} = n, a = i.filter(Boolean), c = await (
|
|
685
|
-
let l = await
|
|
683
|
+
platform: r
|
|
684
|
+
} = n, a = i.filter(Boolean), c = await (r.isRTL == null ? void 0 : r.isRTL(e));
|
|
685
|
+
let l = await r.getElementRects({
|
|
686
686
|
reference: t,
|
|
687
687
|
floating: e,
|
|
688
|
-
strategy:
|
|
688
|
+
strategy: s
|
|
689
689
|
}), {
|
|
690
690
|
x: u,
|
|
691
691
|
y: h
|
|
692
|
-
} =
|
|
692
|
+
} = Gt(l, o, c), g = o, f = {}, d = 0;
|
|
693
693
|
for (let y = 0; y < a.length; y++) {
|
|
694
694
|
const {
|
|
695
695
|
name: m,
|
|
@@ -704,10 +704,10 @@ const yn = async (t, e, n) => {
|
|
|
704
704
|
y: h,
|
|
705
705
|
initialPlacement: o,
|
|
706
706
|
placement: g,
|
|
707
|
-
strategy:
|
|
707
|
+
strategy: s,
|
|
708
708
|
middlewareData: f,
|
|
709
709
|
rects: l,
|
|
710
|
-
platform:
|
|
710
|
+
platform: r,
|
|
711
711
|
elements: {
|
|
712
712
|
reference: t,
|
|
713
713
|
floating: e
|
|
@@ -719,20 +719,20 @@ const yn = async (t, e, n) => {
|
|
|
719
719
|
...f[m],
|
|
720
720
|
...A
|
|
721
721
|
}
|
|
722
|
-
}, O && d <= 50 && (d++, typeof O == "object" && (O.placement && (g = O.placement), O.rects && (l = O.rects === !0 ? await
|
|
722
|
+
}, O && d <= 50 && (d++, typeof O == "object" && (O.placement && (g = O.placement), O.rects && (l = O.rects === !0 ? await r.getElementRects({
|
|
723
723
|
reference: t,
|
|
724
724
|
floating: e,
|
|
725
|
-
strategy:
|
|
725
|
+
strategy: s
|
|
726
726
|
}) : O.rects), {
|
|
727
727
|
x: u,
|
|
728
728
|
y: h
|
|
729
|
-
} =
|
|
729
|
+
} = Gt(l, g, c)), y = -1);
|
|
730
730
|
}
|
|
731
731
|
return {
|
|
732
732
|
x: u,
|
|
733
733
|
y: h,
|
|
734
734
|
placement: g,
|
|
735
|
-
strategy:
|
|
735
|
+
strategy: s,
|
|
736
736
|
middlewareData: f
|
|
737
737
|
};
|
|
738
738
|
};
|
|
@@ -741,9 +741,9 @@ async function be(t, e) {
|
|
|
741
741
|
e === void 0 && (e = {});
|
|
742
742
|
const {
|
|
743
743
|
x: o,
|
|
744
|
-
y:
|
|
744
|
+
y: s,
|
|
745
745
|
platform: i,
|
|
746
|
-
rects:
|
|
746
|
+
rects: r,
|
|
747
747
|
elements: a,
|
|
748
748
|
strategy: c
|
|
749
749
|
} = t, {
|
|
@@ -759,10 +759,10 @@ async function be(t, e) {
|
|
|
759
759
|
strategy: c
|
|
760
760
|
})), b = h === "floating" ? {
|
|
761
761
|
x: o,
|
|
762
|
-
y:
|
|
763
|
-
width:
|
|
764
|
-
height:
|
|
765
|
-
} :
|
|
762
|
+
y: s,
|
|
763
|
+
width: r.floating.width,
|
|
764
|
+
height: r.floating.height
|
|
765
|
+
} : r.reference, w = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), A = await (i.isElement == null ? void 0 : i.isElement(w)) ? await (i.getScale == null ? void 0 : i.getScale(w)) || {
|
|
766
766
|
x: 1,
|
|
767
767
|
y: 1
|
|
768
768
|
} : {
|
|
@@ -781,16 +781,16 @@ async function be(t, e) {
|
|
|
781
781
|
right: (O.right - v.right + d.right) / A.x
|
|
782
782
|
};
|
|
783
783
|
}
|
|
784
|
-
const
|
|
784
|
+
const bn = (t) => ({
|
|
785
785
|
name: "arrow",
|
|
786
786
|
options: t,
|
|
787
787
|
async fn(e) {
|
|
788
788
|
const {
|
|
789
789
|
x: n,
|
|
790
790
|
y: o,
|
|
791
|
-
placement:
|
|
791
|
+
placement: s,
|
|
792
792
|
rects: i,
|
|
793
|
-
platform:
|
|
793
|
+
platform: r,
|
|
794
794
|
elements: a,
|
|
795
795
|
middlewareData: c
|
|
796
796
|
} = e, {
|
|
@@ -802,10 +802,10 @@ const xn = (t) => ({
|
|
|
802
802
|
const h = xe(u), g = {
|
|
803
803
|
x: n,
|
|
804
804
|
y: o
|
|
805
|
-
}, f =
|
|
805
|
+
}, f = zt(s), d = $t(f), y = await r.getDimensions(l), m = f === "y", v = m ? "top" : "left", b = m ? "bottom" : "right", w = m ? "clientHeight" : "clientWidth", A = i.reference[d] + i.reference[f] - g[f] - i.floating[d], O = g[f] - i.reference[f], T = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l));
|
|
806
806
|
let E = T ? T[w] : 0;
|
|
807
|
-
(!E || !await (
|
|
808
|
-
const U = A / 2 - O / 2, p = E / 2 - y[d] / 2 - 1, x = nt(h[v], p), S = nt(h[b], p), P = x, K = E - y[d] - S, L = E / 2 - y[d] / 2 + U, X = Tt(P, L, K), B = !c.arrow && ht(
|
|
807
|
+
(!E || !await (r.isElement == null ? void 0 : r.isElement(T))) && (E = a.floating[w] || i.floating[d]);
|
|
808
|
+
const U = A / 2 - O / 2, p = E / 2 - y[d] / 2 - 1, x = nt(h[v], p), S = nt(h[b], p), P = x, K = E - y[d] - S, L = E / 2 - y[d] / 2 + U, X = Tt(P, L, K), B = !c.arrow && ht(s) != null && L !== X && i.reference[d] / 2 - (L < P ? x : S) - y[d] / 2 < 0, D = B ? L < P ? L - P : L - K : 0;
|
|
809
809
|
return {
|
|
810
810
|
[f]: g[f] + D,
|
|
811
811
|
data: {
|
|
@@ -818,16 +818,16 @@ const xn = (t) => ({
|
|
|
818
818
|
reset: B
|
|
819
819
|
};
|
|
820
820
|
}
|
|
821
|
-
}),
|
|
821
|
+
}), Sn = function(t) {
|
|
822
822
|
return t === void 0 && (t = {}), {
|
|
823
823
|
name: "flip",
|
|
824
824
|
options: t,
|
|
825
825
|
async fn(e) {
|
|
826
826
|
var n, o;
|
|
827
827
|
const {
|
|
828
|
-
placement:
|
|
828
|
+
placement: s,
|
|
829
829
|
middlewareData: i,
|
|
830
|
-
rects:
|
|
830
|
+
rects: r,
|
|
831
831
|
initialPlacement: a,
|
|
832
832
|
platform: c,
|
|
833
833
|
elements: l
|
|
@@ -842,16 +842,16 @@ const xn = (t) => ({
|
|
|
842
842
|
} = ft(t, e);
|
|
843
843
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
844
844
|
return {};
|
|
845
|
-
const v = J(
|
|
846
|
-
!g && T && O.push(...
|
|
845
|
+
const v = J(s), b = I(a), w = J(a) === a, A = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), O = g || (w || !y ? [vt(a)] : mn(a)), T = d !== "none";
|
|
846
|
+
!g && T && O.push(...vn(a, y, d, A));
|
|
847
847
|
const E = [a, ...O], U = await be(e, m), p = [];
|
|
848
848
|
let x = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
849
849
|
if (u && p.push(U[v]), h) {
|
|
850
|
-
const L =
|
|
850
|
+
const L = dn(s, r, A);
|
|
851
851
|
p.push(U[L[0]], U[L[1]]);
|
|
852
852
|
}
|
|
853
853
|
if (x = [...x, {
|
|
854
|
-
placement:
|
|
854
|
+
placement: s,
|
|
855
855
|
overflows: p
|
|
856
856
|
}], !p.every((L) => L <= 0)) {
|
|
857
857
|
var S, P;
|
|
@@ -889,7 +889,7 @@ const xn = (t) => ({
|
|
|
889
889
|
B = a;
|
|
890
890
|
break;
|
|
891
891
|
}
|
|
892
|
-
if (
|
|
892
|
+
if (s !== B)
|
|
893
893
|
return {
|
|
894
894
|
reset: {
|
|
895
895
|
placement: B
|
|
@@ -899,13 +899,13 @@ const xn = (t) => ({
|
|
|
899
899
|
return {};
|
|
900
900
|
}
|
|
901
901
|
};
|
|
902
|
-
},
|
|
903
|
-
async function
|
|
902
|
+
}, On = /* @__PURE__ */ new Set(["left", "top"]);
|
|
903
|
+
async function An(t, e) {
|
|
904
904
|
const {
|
|
905
905
|
placement: n,
|
|
906
906
|
platform: o,
|
|
907
|
-
elements:
|
|
908
|
-
} = t, i = await (o.isRTL == null ? void 0 : o.isRTL(
|
|
907
|
+
elements: s
|
|
908
|
+
} = t, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), r = J(n), a = ht(n), c = I(n) === "y", l = On.has(r) ? -1 : 1, u = i && c ? -1 : 1, h = ft(e, t);
|
|
909
909
|
let {
|
|
910
910
|
mainAxis: g,
|
|
911
911
|
crossAxis: f,
|
|
@@ -927,29 +927,29 @@ async function On(t, e) {
|
|
|
927
927
|
y: f * u
|
|
928
928
|
};
|
|
929
929
|
}
|
|
930
|
-
const
|
|
930
|
+
const Rn = function(t) {
|
|
931
931
|
return t === void 0 && (t = 0), {
|
|
932
932
|
name: "offset",
|
|
933
933
|
options: t,
|
|
934
934
|
async fn(e) {
|
|
935
935
|
var n, o;
|
|
936
936
|
const {
|
|
937
|
-
x:
|
|
937
|
+
x: s,
|
|
938
938
|
y: i,
|
|
939
|
-
placement:
|
|
939
|
+
placement: r,
|
|
940
940
|
middlewareData: a
|
|
941
|
-
} = e, c = await
|
|
942
|
-
return
|
|
943
|
-
x:
|
|
941
|
+
} = e, c = await An(e, t);
|
|
942
|
+
return r === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
|
|
943
|
+
x: s + c.x,
|
|
944
944
|
y: i + c.y,
|
|
945
945
|
data: {
|
|
946
946
|
...c,
|
|
947
|
-
placement:
|
|
947
|
+
placement: r
|
|
948
948
|
}
|
|
949
949
|
};
|
|
950
950
|
}
|
|
951
951
|
};
|
|
952
|
-
},
|
|
952
|
+
}, En = function(t) {
|
|
953
953
|
return t === void 0 && (t = {}), {
|
|
954
954
|
name: "shift",
|
|
955
955
|
options: t,
|
|
@@ -957,10 +957,10 @@ const An = function(t) {
|
|
|
957
957
|
const {
|
|
958
958
|
x: n,
|
|
959
959
|
y: o,
|
|
960
|
-
placement:
|
|
960
|
+
placement: s
|
|
961
961
|
} = e, {
|
|
962
962
|
mainAxis: i = !0,
|
|
963
|
-
crossAxis:
|
|
963
|
+
crossAxis: r = !1,
|
|
964
964
|
limiter: a = {
|
|
965
965
|
fn: (m) => {
|
|
966
966
|
let {
|
|
@@ -977,13 +977,13 @@ const An = function(t) {
|
|
|
977
977
|
} = ft(t, e), l = {
|
|
978
978
|
x: n,
|
|
979
979
|
y: o
|
|
980
|
-
}, u = await be(e, c), h = I(J(
|
|
980
|
+
}, u = await be(e, c), h = I(J(s)), g = ye(h);
|
|
981
981
|
let f = l[g], d = l[h];
|
|
982
982
|
if (i) {
|
|
983
983
|
const m = g === "y" ? "top" : "left", v = g === "y" ? "bottom" : "right", b = f + u[m], w = f - u[v];
|
|
984
984
|
f = Tt(b, f, w);
|
|
985
985
|
}
|
|
986
|
-
if (
|
|
986
|
+
if (r) {
|
|
987
987
|
const m = h === "y" ? "top" : "left", v = h === "y" ? "bottom" : "right", b = d + u[m], w = d - u[v];
|
|
988
988
|
d = Tt(b, d, w);
|
|
989
989
|
}
|
|
@@ -999,7 +999,7 @@ const An = function(t) {
|
|
|
999
999
|
y: y.y - o,
|
|
1000
1000
|
enabled: {
|
|
1001
1001
|
[g]: i,
|
|
1002
|
-
[h]:
|
|
1002
|
+
[h]: r
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
1005
|
};
|
|
@@ -1029,26 +1029,26 @@ function W(t) {
|
|
|
1029
1029
|
function $(t) {
|
|
1030
1030
|
return bt() ? t instanceof HTMLElement || t instanceof k(t).HTMLElement : !1;
|
|
1031
1031
|
}
|
|
1032
|
-
function
|
|
1032
|
+
function Zt(t) {
|
|
1033
1033
|
return !bt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof k(t).ShadowRoot;
|
|
1034
1034
|
}
|
|
1035
|
-
const
|
|
1035
|
+
const Pn = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
1036
1036
|
function dt(t) {
|
|
1037
1037
|
const {
|
|
1038
1038
|
overflow: e,
|
|
1039
1039
|
overflowX: n,
|
|
1040
1040
|
overflowY: o,
|
|
1041
|
-
display:
|
|
1041
|
+
display: s
|
|
1042
1042
|
} = F(t);
|
|
1043
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !
|
|
1043
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !Pn.has(s);
|
|
1044
1044
|
}
|
|
1045
|
-
const
|
|
1046
|
-
function
|
|
1047
|
-
return
|
|
1045
|
+
const Ln = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
1046
|
+
function kn(t) {
|
|
1047
|
+
return Ln.has(rt(t));
|
|
1048
1048
|
}
|
|
1049
|
-
const
|
|
1049
|
+
const Tn = [":popover-open", ":modal"];
|
|
1050
1050
|
function St(t) {
|
|
1051
|
-
return
|
|
1051
|
+
return Tn.some((e) => {
|
|
1052
1052
|
try {
|
|
1053
1053
|
return t.matches(e);
|
|
1054
1054
|
} catch {
|
|
@@ -1056,15 +1056,15 @@ function St(t) {
|
|
|
1056
1056
|
}
|
|
1057
1057
|
});
|
|
1058
1058
|
}
|
|
1059
|
-
const
|
|
1060
|
-
function
|
|
1061
|
-
const e =
|
|
1062
|
-
return
|
|
1059
|
+
const Cn = ["transform", "translate", "scale", "rotate", "perspective"], Dn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Hn = ["paint", "layout", "strict", "content"];
|
|
1060
|
+
function Bt(t) {
|
|
1061
|
+
const e = _t(), n = W(t) ? F(t) : t;
|
|
1062
|
+
return Cn.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || Dn.some((o) => (n.willChange || "").includes(o)) || Hn.some((o) => (n.contain || "").includes(o));
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function Wn(t) {
|
|
1065
1065
|
let e = q(t);
|
|
1066
1066
|
for (; $(e) && !ot(e); ) {
|
|
1067
|
-
if (
|
|
1067
|
+
if (Bt(e))
|
|
1068
1068
|
return e;
|
|
1069
1069
|
if (St(e))
|
|
1070
1070
|
return null;
|
|
@@ -1072,12 +1072,12 @@ function Hn(t) {
|
|
|
1072
1072
|
}
|
|
1073
1073
|
return null;
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1075
|
+
function _t() {
|
|
1076
1076
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1077
1077
|
}
|
|
1078
|
-
const
|
|
1078
|
+
const Fn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
1079
1079
|
function ot(t) {
|
|
1080
|
-
return
|
|
1080
|
+
return Fn.has(rt(t));
|
|
1081
1081
|
}
|
|
1082
1082
|
function F(t) {
|
|
1083
1083
|
return k(t).getComputedStyle(t);
|
|
@@ -1098,10 +1098,10 @@ function q(t) {
|
|
|
1098
1098
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1099
1099
|
t.assignedSlot || // DOM Element detected.
|
|
1100
1100
|
t.parentNode || // ShadowRoot detected.
|
|
1101
|
-
|
|
1101
|
+
Zt(t) && t.host || // Fallback.
|
|
1102
1102
|
z(t)
|
|
1103
1103
|
);
|
|
1104
|
-
return
|
|
1104
|
+
return Zt(e) ? e.host : e;
|
|
1105
1105
|
}
|
|
1106
1106
|
function Oe(t) {
|
|
1107
1107
|
const e = q(t);
|
|
@@ -1110,12 +1110,12 @@ function Oe(t) {
|
|
|
1110
1110
|
function lt(t, e, n) {
|
|
1111
1111
|
var o;
|
|
1112
1112
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
1113
|
-
const
|
|
1113
|
+
const s = Oe(t), i = s === ((o = t.ownerDocument) == null ? void 0 : o.body), r = k(s);
|
|
1114
1114
|
if (i) {
|
|
1115
|
-
const a = Dt(
|
|
1116
|
-
return e.concat(
|
|
1115
|
+
const a = Dt(r);
|
|
1116
|
+
return e.concat(r, r.visualViewport || [], dt(s) ? s : [], a && n ? lt(a) : []);
|
|
1117
1117
|
}
|
|
1118
|
-
return e.concat(
|
|
1118
|
+
return e.concat(s, lt(s, [], n));
|
|
1119
1119
|
}
|
|
1120
1120
|
function Dt(t) {
|
|
1121
1121
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
@@ -1123,49 +1123,49 @@ function Dt(t) {
|
|
|
1123
1123
|
function Ae(t) {
|
|
1124
1124
|
const e = F(t);
|
|
1125
1125
|
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
1126
|
-
const
|
|
1127
|
-
return a && (n = i, o =
|
|
1126
|
+
const s = $(t), i = s ? t.offsetWidth : n, r = s ? t.offsetHeight : o, a = wt(n) !== i || wt(o) !== r;
|
|
1127
|
+
return a && (n = i, o = r), {
|
|
1128
1128
|
width: n,
|
|
1129
1129
|
height: o,
|
|
1130
1130
|
$: a
|
|
1131
1131
|
};
|
|
1132
1132
|
}
|
|
1133
|
-
function
|
|
1133
|
+
function Ut(t) {
|
|
1134
1134
|
return W(t) ? t : t.contextElement;
|
|
1135
1135
|
}
|
|
1136
1136
|
function tt(t) {
|
|
1137
|
-
const e =
|
|
1137
|
+
const e = Ut(t);
|
|
1138
1138
|
if (!$(e))
|
|
1139
1139
|
return V(1);
|
|
1140
1140
|
const n = e.getBoundingClientRect(), {
|
|
1141
1141
|
width: o,
|
|
1142
|
-
height:
|
|
1142
|
+
height: s,
|
|
1143
1143
|
$: i
|
|
1144
1144
|
} = Ae(e);
|
|
1145
|
-
let
|
|
1146
|
-
return (!
|
|
1147
|
-
x:
|
|
1145
|
+
let r = (i ? wt(n.width) : n.width) / o, a = (i ? wt(n.height) : n.height) / s;
|
|
1146
|
+
return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
1147
|
+
x: r,
|
|
1148
1148
|
y: a
|
|
1149
1149
|
};
|
|
1150
1150
|
}
|
|
1151
|
-
const
|
|
1151
|
+
const Mn = /* @__PURE__ */ V(0);
|
|
1152
1152
|
function Re(t) {
|
|
1153
1153
|
const e = k(t);
|
|
1154
|
-
return !
|
|
1154
|
+
return !_t() || !e.visualViewport ? Mn : {
|
|
1155
1155
|
x: e.visualViewport.offsetLeft,
|
|
1156
1156
|
y: e.visualViewport.offsetTop
|
|
1157
1157
|
};
|
|
1158
1158
|
}
|
|
1159
|
-
function
|
|
1159
|
+
function Nn(t, e, n) {
|
|
1160
1160
|
return e === void 0 && (e = !1), !n || e && n !== k(t) ? !1 : e;
|
|
1161
1161
|
}
|
|
1162
1162
|
function G(t, e, n, o) {
|
|
1163
1163
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
1164
|
-
const
|
|
1165
|
-
let
|
|
1166
|
-
e && (o ? W(o) && (
|
|
1167
|
-
const a =
|
|
1168
|
-
let c = (
|
|
1164
|
+
const s = t.getBoundingClientRect(), i = Ut(t);
|
|
1165
|
+
let r = V(1);
|
|
1166
|
+
e && (o ? W(o) && (r = tt(o)) : r = tt(t));
|
|
1167
|
+
const a = Nn(i, n, o) ? Re(i) : V(0);
|
|
1168
|
+
let c = (s.left + a.x) / r.x, l = (s.top + a.y) / r.y, u = s.width / r.x, h = s.height / r.y;
|
|
1169
1169
|
if (i) {
|
|
1170
1170
|
const g = k(i), f = o && W(o) ? k(o) : o;
|
|
1171
1171
|
let d = g, y = Dt(d);
|
|
@@ -1181,41 +1181,41 @@ function G(t, e, n, o) {
|
|
|
1181
1181
|
y: l
|
|
1182
1182
|
});
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1184
|
+
function Kt(t, e) {
|
|
1185
1185
|
const n = Ot(t).scrollLeft;
|
|
1186
1186
|
return e ? e.left + n : G(z(t)).left + n;
|
|
1187
1187
|
}
|
|
1188
1188
|
function Ee(t, e, n) {
|
|
1189
1189
|
n === void 0 && (n = !1);
|
|
1190
|
-
const o = t.getBoundingClientRect(),
|
|
1190
|
+
const o = t.getBoundingClientRect(), s = o.left + e.scrollLeft - (n ? 0 : (
|
|
1191
1191
|
// RTL <body> scrollbar.
|
|
1192
|
-
|
|
1192
|
+
Kt(t, o)
|
|
1193
1193
|
)), i = o.top + e.scrollTop;
|
|
1194
1194
|
return {
|
|
1195
|
-
x:
|
|
1195
|
+
x: s,
|
|
1196
1196
|
y: i
|
|
1197
1197
|
};
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1199
|
+
function Vn(t) {
|
|
1200
1200
|
let {
|
|
1201
1201
|
elements: e,
|
|
1202
1202
|
rect: n,
|
|
1203
1203
|
offsetParent: o,
|
|
1204
|
-
strategy:
|
|
1204
|
+
strategy: s
|
|
1205
1205
|
} = t;
|
|
1206
|
-
const i =
|
|
1207
|
-
if (o ===
|
|
1206
|
+
const i = s === "fixed", r = z(o), a = e ? St(e.floating) : !1;
|
|
1207
|
+
if (o === r || a && i)
|
|
1208
1208
|
return n;
|
|
1209
1209
|
let c = {
|
|
1210
1210
|
scrollLeft: 0,
|
|
1211
1211
|
scrollTop: 0
|
|
1212
1212
|
}, l = V(1);
|
|
1213
1213
|
const u = V(0), h = $(o);
|
|
1214
|
-
if ((h || !h && !i) && ((rt(o) !== "body" || dt(
|
|
1214
|
+
if ((h || !h && !i) && ((rt(o) !== "body" || dt(r)) && (c = Ot(o)), $(o))) {
|
|
1215
1215
|
const f = G(o);
|
|
1216
1216
|
l = tt(o), u.x = f.x + o.clientLeft, u.y = f.y + o.clientTop;
|
|
1217
1217
|
}
|
|
1218
|
-
const g =
|
|
1218
|
+
const g = r && !h && !i ? Ee(r, c, !0) : V(0);
|
|
1219
1219
|
return {
|
|
1220
1220
|
width: n.width * l.x,
|
|
1221
1221
|
height: n.height * l.y,
|
|
@@ -1223,57 +1223,57 @@ function Nn(t) {
|
|
|
1223
1223
|
y: n.y * l.y - c.scrollTop * l.y + u.y + g.y
|
|
1224
1224
|
};
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function $n(t) {
|
|
1227
1227
|
return Array.from(t.getClientRects());
|
|
1228
1228
|
}
|
|
1229
|
-
function
|
|
1230
|
-
const e = z(t), n = Ot(t), o = t.ownerDocument.body,
|
|
1231
|
-
let
|
|
1229
|
+
function zn(t) {
|
|
1230
|
+
const e = z(t), n = Ot(t), o = t.ownerDocument.body, s = Q(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = Q(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
1231
|
+
let r = -n.scrollLeft + Kt(t);
|
|
1232
1232
|
const a = -n.scrollTop;
|
|
1233
|
-
return F(o).direction === "rtl" && (
|
|
1234
|
-
width:
|
|
1233
|
+
return F(o).direction === "rtl" && (r += Q(e.clientWidth, o.clientWidth) - s), {
|
|
1234
|
+
width: s,
|
|
1235
1235
|
height: i,
|
|
1236
|
-
x:
|
|
1236
|
+
x: r,
|
|
1237
1237
|
y: a
|
|
1238
1238
|
};
|
|
1239
1239
|
}
|
|
1240
|
-
function
|
|
1241
|
-
const n = k(t), o = z(t),
|
|
1242
|
-
let i = o.clientWidth,
|
|
1243
|
-
if (
|
|
1244
|
-
i =
|
|
1245
|
-
const l =
|
|
1246
|
-
(!l || l && e === "fixed") && (a =
|
|
1240
|
+
function Bn(t, e) {
|
|
1241
|
+
const n = k(t), o = z(t), s = n.visualViewport;
|
|
1242
|
+
let i = o.clientWidth, r = o.clientHeight, a = 0, c = 0;
|
|
1243
|
+
if (s) {
|
|
1244
|
+
i = s.width, r = s.height;
|
|
1245
|
+
const l = _t();
|
|
1246
|
+
(!l || l && e === "fixed") && (a = s.offsetLeft, c = s.offsetTop);
|
|
1247
1247
|
}
|
|
1248
1248
|
return {
|
|
1249
1249
|
width: i,
|
|
1250
|
-
height:
|
|
1250
|
+
height: r,
|
|
1251
1251
|
x: a,
|
|
1252
1252
|
y: c
|
|
1253
1253
|
};
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1256
|
-
const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop,
|
|
1255
|
+
function _n(t, e) {
|
|
1256
|
+
const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop, s = n.left + t.clientLeft, i = $(t) ? tt(t) : V(1), r = t.clientWidth * i.x, a = t.clientHeight * i.y, c = s * i.x, l = o * i.y;
|
|
1257
1257
|
return {
|
|
1258
|
-
width:
|
|
1258
|
+
width: r,
|
|
1259
1259
|
height: a,
|
|
1260
1260
|
x: c,
|
|
1261
1261
|
y: l
|
|
1262
1262
|
};
|
|
1263
1263
|
}
|
|
1264
|
-
function
|
|
1264
|
+
function te(t, e, n) {
|
|
1265
1265
|
let o;
|
|
1266
1266
|
if (e === "viewport")
|
|
1267
|
-
o =
|
|
1267
|
+
o = Bn(t, n);
|
|
1268
1268
|
else if (e === "document")
|
|
1269
|
-
o =
|
|
1269
|
+
o = zn(z(t));
|
|
1270
1270
|
else if (W(e))
|
|
1271
|
-
o =
|
|
1271
|
+
o = _n(e, n);
|
|
1272
1272
|
else {
|
|
1273
|
-
const
|
|
1273
|
+
const s = Re(t);
|
|
1274
1274
|
o = {
|
|
1275
|
-
x: e.x -
|
|
1276
|
-
y: e.y -
|
|
1275
|
+
x: e.x - s.x,
|
|
1276
|
+
y: e.y - s.y,
|
|
1277
1277
|
width: e.width,
|
|
1278
1278
|
height: e.height
|
|
1279
1279
|
};
|
|
@@ -1284,30 +1284,30 @@ function Pe(t, e) {
|
|
|
1284
1284
|
const n = q(t);
|
|
1285
1285
|
return n === e || !W(n) || ot(n) ? !1 : F(n).position === "fixed" || Pe(n, e);
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1287
|
+
function Un(t, e) {
|
|
1288
1288
|
const n = e.get(t);
|
|
1289
1289
|
if (n)
|
|
1290
1290
|
return n;
|
|
1291
|
-
let o = lt(t, [], !1).filter((a) => W(a) && rt(a) !== "body"),
|
|
1291
|
+
let o = lt(t, [], !1).filter((a) => W(a) && rt(a) !== "body"), s = null;
|
|
1292
1292
|
const i = F(t).position === "fixed";
|
|
1293
|
-
let
|
|
1294
|
-
for (; W(
|
|
1295
|
-
const a = F(
|
|
1296
|
-
!c && a.position === "fixed" && (
|
|
1293
|
+
let r = i ? q(t) : t;
|
|
1294
|
+
for (; W(r) && !ot(r); ) {
|
|
1295
|
+
const a = F(r), c = Bt(r);
|
|
1296
|
+
!c && a.position === "fixed" && (s = null), (i ? !c && !s : !c && a.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || dt(r) && !c && Pe(t, r)) ? o = o.filter((u) => u !== r) : s = a, r = q(r);
|
|
1297
1297
|
}
|
|
1298
1298
|
return e.set(t, o), o;
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1300
|
+
function Kn(t) {
|
|
1301
1301
|
let {
|
|
1302
1302
|
element: e,
|
|
1303
1303
|
boundary: n,
|
|
1304
1304
|
rootBoundary: o,
|
|
1305
|
-
strategy:
|
|
1305
|
+
strategy: s
|
|
1306
1306
|
} = t;
|
|
1307
|
-
const
|
|
1308
|
-
const h =
|
|
1307
|
+
const r = [...n === "clippingAncestors" ? St(e) ? [] : Un(e, this._c) : [].concat(n), o], a = r[0], c = r.reduce((l, u) => {
|
|
1308
|
+
const h = te(e, u, s);
|
|
1309
1309
|
return l.top = Q(h.top, l.top), l.right = nt(h.right, l.right), l.bottom = nt(h.bottom, l.bottom), l.left = Q(h.left, l.left), l;
|
|
1310
|
-
},
|
|
1310
|
+
}, te(e, a, s));
|
|
1311
1311
|
return {
|
|
1312
1312
|
width: c.right - c.left,
|
|
1313
1313
|
height: c.bottom - c.top,
|
|
@@ -1315,7 +1315,7 @@ function Un(t) {
|
|
|
1315
1315
|
y: c.top
|
|
1316
1316
|
};
|
|
1317
1317
|
}
|
|
1318
|
-
function
|
|
1318
|
+
function jn(t) {
|
|
1319
1319
|
const {
|
|
1320
1320
|
width: e,
|
|
1321
1321
|
height: n
|
|
@@ -1325,34 +1325,34 @@ function Kn(t) {
|
|
|
1325
1325
|
height: n
|
|
1326
1326
|
};
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1329
|
-
const o = $(e),
|
|
1328
|
+
function In(t, e, n) {
|
|
1329
|
+
const o = $(e), s = z(e), i = n === "fixed", r = G(t, !0, i, e);
|
|
1330
1330
|
let a = {
|
|
1331
1331
|
scrollLeft: 0,
|
|
1332
1332
|
scrollTop: 0
|
|
1333
1333
|
};
|
|
1334
1334
|
const c = V(0);
|
|
1335
1335
|
function l() {
|
|
1336
|
-
c.x =
|
|
1336
|
+
c.x = Kt(s);
|
|
1337
1337
|
}
|
|
1338
1338
|
if (o || !o && !i)
|
|
1339
|
-
if ((rt(e) !== "body" || dt(
|
|
1339
|
+
if ((rt(e) !== "body" || dt(s)) && (a = Ot(e)), o) {
|
|
1340
1340
|
const f = G(e, !0, i, e);
|
|
1341
1341
|
c.x = f.x + e.clientLeft, c.y = f.y + e.clientTop;
|
|
1342
|
-
} else
|
|
1343
|
-
i && !o &&
|
|
1344
|
-
const u =
|
|
1342
|
+
} else s && l();
|
|
1343
|
+
i && !o && s && l();
|
|
1344
|
+
const u = s && !o && !i ? Ee(s, a) : V(0), h = r.left + a.scrollLeft - c.x - u.x, g = r.top + a.scrollTop - c.y - u.y;
|
|
1345
1345
|
return {
|
|
1346
1346
|
x: h,
|
|
1347
1347
|
y: g,
|
|
1348
|
-
width:
|
|
1349
|
-
height:
|
|
1348
|
+
width: r.width,
|
|
1349
|
+
height: r.height
|
|
1350
1350
|
};
|
|
1351
1351
|
}
|
|
1352
1352
|
function Rt(t) {
|
|
1353
1353
|
return F(t).position === "static";
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1355
|
+
function ee(t, e) {
|
|
1356
1356
|
if (!$(t) || F(t).position === "fixed")
|
|
1357
1357
|
return null;
|
|
1358
1358
|
if (e)
|
|
@@ -1365,23 +1365,23 @@ function Le(t, e) {
|
|
|
1365
1365
|
if (St(t))
|
|
1366
1366
|
return n;
|
|
1367
1367
|
if (!$(t)) {
|
|
1368
|
-
let
|
|
1369
|
-
for (;
|
|
1370
|
-
if (W(
|
|
1371
|
-
return
|
|
1372
|
-
|
|
1368
|
+
let s = q(t);
|
|
1369
|
+
for (; s && !ot(s); ) {
|
|
1370
|
+
if (W(s) && !Rt(s))
|
|
1371
|
+
return s;
|
|
1372
|
+
s = q(s);
|
|
1373
1373
|
}
|
|
1374
1374
|
return n;
|
|
1375
1375
|
}
|
|
1376
|
-
let o =
|
|
1377
|
-
for (; o &&
|
|
1378
|
-
o =
|
|
1379
|
-
return o && ot(o) && Rt(o) && !
|
|
1376
|
+
let o = ee(t, e);
|
|
1377
|
+
for (; o && kn(o) && Rt(o); )
|
|
1378
|
+
o = ee(o, e);
|
|
1379
|
+
return o && ot(o) && Rt(o) && !Bt(o) ? n : o || Wn(t) || n;
|
|
1380
1380
|
}
|
|
1381
|
-
const
|
|
1381
|
+
const Yn = async function(t) {
|
|
1382
1382
|
const e = this.getOffsetParent || Le, n = this.getDimensions, o = await n(t.floating);
|
|
1383
1383
|
return {
|
|
1384
|
-
reference:
|
|
1384
|
+
reference: In(t.reference, await e(t.floating), t.strategy),
|
|
1385
1385
|
floating: {
|
|
1386
1386
|
x: 0,
|
|
1387
1387
|
y: 0,
|
|
@@ -1390,32 +1390,32 @@ const In = async function(t) {
|
|
|
1390
1390
|
}
|
|
1391
1391
|
};
|
|
1392
1392
|
};
|
|
1393
|
-
function
|
|
1393
|
+
function qn(t) {
|
|
1394
1394
|
return F(t).direction === "rtl";
|
|
1395
1395
|
}
|
|
1396
|
-
const
|
|
1397
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1396
|
+
const Xn = {
|
|
1397
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Vn,
|
|
1398
1398
|
getDocumentElement: z,
|
|
1399
|
-
getClippingRect:
|
|
1399
|
+
getClippingRect: Kn,
|
|
1400
1400
|
getOffsetParent: Le,
|
|
1401
|
-
getElementRects:
|
|
1402
|
-
getClientRects:
|
|
1403
|
-
getDimensions:
|
|
1401
|
+
getElementRects: Yn,
|
|
1402
|
+
getClientRects: $n,
|
|
1403
|
+
getDimensions: jn,
|
|
1404
1404
|
getScale: tt,
|
|
1405
1405
|
isElement: W,
|
|
1406
|
-
isRTL:
|
|
1406
|
+
isRTL: qn
|
|
1407
1407
|
};
|
|
1408
1408
|
function ke(t, e) {
|
|
1409
1409
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1411
|
+
function Qn(t, e) {
|
|
1412
1412
|
let n = null, o;
|
|
1413
|
-
const
|
|
1413
|
+
const s = z(t);
|
|
1414
1414
|
function i() {
|
|
1415
1415
|
var a;
|
|
1416
1416
|
clearTimeout(o), (a = n) == null || a.disconnect(), n = null;
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1418
|
+
function r(a, c) {
|
|
1419
1419
|
a === void 0 && (a = !1), c === void 0 && (c = 1), i();
|
|
1420
1420
|
const l = t.getBoundingClientRect(), {
|
|
1421
1421
|
left: u,
|
|
@@ -1425,7 +1425,7 @@ function Xn(t, e) {
|
|
|
1425
1425
|
} = l;
|
|
1426
1426
|
if (a || e(), !g || !f)
|
|
1427
1427
|
return;
|
|
1428
|
-
const d = pt(h), y = pt(
|
|
1428
|
+
const d = pt(h), y = pt(s.clientWidth - (u + g)), m = pt(s.clientHeight - (h + f)), v = pt(u), w = {
|
|
1429
1429
|
rootMargin: -d + "px " + -y + "px " + -m + "px " + -v + "px",
|
|
1430
1430
|
threshold: Q(0, nt(1, c)) || 1
|
|
1431
1431
|
};
|
|
@@ -1434,43 +1434,43 @@ function Xn(t, e) {
|
|
|
1434
1434
|
const E = T[0].intersectionRatio;
|
|
1435
1435
|
if (E !== c) {
|
|
1436
1436
|
if (!A)
|
|
1437
|
-
return
|
|
1438
|
-
E ?
|
|
1439
|
-
|
|
1437
|
+
return r();
|
|
1438
|
+
E ? r(!1, E) : o = setTimeout(() => {
|
|
1439
|
+
r(!1, 1e-7);
|
|
1440
1440
|
}, 1e3);
|
|
1441
1441
|
}
|
|
1442
|
-
E === 1 && !ke(l, t.getBoundingClientRect()) &&
|
|
1442
|
+
E === 1 && !ke(l, t.getBoundingClientRect()) && r(), A = !1;
|
|
1443
1443
|
}
|
|
1444
1444
|
try {
|
|
1445
1445
|
n = new IntersectionObserver(O, {
|
|
1446
1446
|
...w,
|
|
1447
1447
|
// Handle <iframe>s
|
|
1448
|
-
root:
|
|
1448
|
+
root: s.ownerDocument
|
|
1449
1449
|
});
|
|
1450
1450
|
} catch {
|
|
1451
1451
|
n = new IntersectionObserver(O, w);
|
|
1452
1452
|
}
|
|
1453
1453
|
n.observe(t);
|
|
1454
1454
|
}
|
|
1455
|
-
return
|
|
1455
|
+
return r(!0), i;
|
|
1456
1456
|
}
|
|
1457
|
-
function
|
|
1457
|
+
function Jn(t, e, n, o) {
|
|
1458
1458
|
o === void 0 && (o = {});
|
|
1459
1459
|
const {
|
|
1460
|
-
ancestorScroll:
|
|
1460
|
+
ancestorScroll: s = !0,
|
|
1461
1461
|
ancestorResize: i = !0,
|
|
1462
|
-
elementResize:
|
|
1462
|
+
elementResize: r = typeof ResizeObserver == "function",
|
|
1463
1463
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
1464
1464
|
animationFrame: c = !1
|
|
1465
|
-
} = o, l =
|
|
1465
|
+
} = o, l = Ut(t), u = s || i ? [...l ? lt(l) : [], ...lt(e)] : [];
|
|
1466
1466
|
u.forEach((v) => {
|
|
1467
|
-
|
|
1467
|
+
s && v.addEventListener("scroll", n, {
|
|
1468
1468
|
passive: !0
|
|
1469
1469
|
}), i && v.addEventListener("resize", n);
|
|
1470
1470
|
});
|
|
1471
|
-
const h = l && a ?
|
|
1471
|
+
const h = l && a ? Qn(l, n) : null;
|
|
1472
1472
|
let g = -1, f = null;
|
|
1473
|
-
|
|
1473
|
+
r && (f = new ResizeObserver((v) => {
|
|
1474
1474
|
let [b] = v;
|
|
1475
1475
|
b && b.target === l && f && (f.unobserve(e), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
1476
1476
|
var w;
|
|
@@ -1486,23 +1486,23 @@ function Qn(t, e, n, o) {
|
|
|
1486
1486
|
return n(), () => {
|
|
1487
1487
|
var v;
|
|
1488
1488
|
u.forEach((b) => {
|
|
1489
|
-
|
|
1489
|
+
s && b.removeEventListener("scroll", n), i && b.removeEventListener("resize", n);
|
|
1490
1490
|
}), h?.(), (v = f) == null || v.disconnect(), f = null, c && cancelAnimationFrame(d);
|
|
1491
1491
|
};
|
|
1492
1492
|
}
|
|
1493
|
-
const
|
|
1494
|
-
const o = /* @__PURE__ */ new Map(),
|
|
1495
|
-
platform:
|
|
1493
|
+
const Gn = Rn, Zn = En, ne = Sn, to = bn, eo = (t, e, n) => {
|
|
1494
|
+
const o = /* @__PURE__ */ new Map(), s = {
|
|
1495
|
+
platform: Xn,
|
|
1496
1496
|
...n
|
|
1497
1497
|
}, i = {
|
|
1498
|
-
...
|
|
1498
|
+
...s.platform,
|
|
1499
1499
|
_c: o
|
|
1500
1500
|
};
|
|
1501
|
-
return
|
|
1502
|
-
...
|
|
1501
|
+
return xn(t, e, {
|
|
1502
|
+
...s,
|
|
1503
1503
|
platform: i
|
|
1504
1504
|
});
|
|
1505
|
-
},
|
|
1505
|
+
}, ko = [
|
|
1506
1506
|
"top",
|
|
1507
1507
|
"top-start",
|
|
1508
1508
|
"top-end",
|
|
@@ -1515,24 +1515,24 @@ const Jn = An, Gn = Rn, oe = bn, Zn = xn, to = (t, e, n) => {
|
|
|
1515
1515
|
"left",
|
|
1516
1516
|
"left-start",
|
|
1517
1517
|
"left-end"
|
|
1518
|
-
],
|
|
1518
|
+
], To = (t, e = { isOpen: !1 }) => {
|
|
1519
1519
|
const n = [];
|
|
1520
1520
|
let o = null;
|
|
1521
|
-
const
|
|
1521
|
+
const s = C.deriveProp(e.isOpen);
|
|
1522
1522
|
function i(a) {
|
|
1523
|
-
o = a,
|
|
1523
|
+
o = a, s.set(!0);
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1526
|
-
|
|
1525
|
+
function r() {
|
|
1526
|
+
s.set(!1), n.forEach((a) => a()), n.length = 0;
|
|
1527
1527
|
}
|
|
1528
1528
|
return Y(
|
|
1529
|
-
t(i,
|
|
1529
|
+
t(i, r),
|
|
1530
1530
|
de(
|
|
1531
|
-
|
|
1531
|
+
s,
|
|
1532
1532
|
() => Y(
|
|
1533
|
-
o?.onClickOutside != null ?
|
|
1533
|
+
o?.onClickOutside != null ? rn(o.onClickOutside) : null,
|
|
1534
1534
|
_(
|
|
1535
|
-
(a) =>
|
|
1535
|
+
(a) => fe(
|
|
1536
1536
|
"body",
|
|
1537
1537
|
Et.div(
|
|
1538
1538
|
_((c) => {
|
|
@@ -1560,21 +1560,21 @@ const Jn = An, Gn = Rn, oe = bn, Zn = xn, to = (t, e, n) => {
|
|
|
1560
1560
|
});
|
|
1561
1561
|
async function v() {
|
|
1562
1562
|
const w = [
|
|
1563
|
-
|
|
1564
|
-
|
|
1563
|
+
ne(),
|
|
1564
|
+
Gn({
|
|
1565
1565
|
mainAxis: h.get(),
|
|
1566
1566
|
crossAxis: g.get()
|
|
1567
1567
|
}),
|
|
1568
|
-
|
|
1569
|
-
|
|
1568
|
+
Zn(),
|
|
1569
|
+
ne()
|
|
1570
1570
|
];
|
|
1571
1571
|
y != null && u != null && w.push(
|
|
1572
|
-
|
|
1572
|
+
to({
|
|
1573
1573
|
element: u,
|
|
1574
1574
|
padding: d.get()
|
|
1575
1575
|
})
|
|
1576
1576
|
);
|
|
1577
|
-
const A = await
|
|
1577
|
+
const A = await eo(l, c, {
|
|
1578
1578
|
placement: f.get(),
|
|
1579
1579
|
strategy: "absolute",
|
|
1580
1580
|
middleware: w
|
|
@@ -1608,10 +1608,12 @@ const Jn = An, Gn = Rn, oe = bn, Zn = xn, to = (t, e, n) => {
|
|
|
1608
1608
|
Mt(
|
|
1609
1609
|
m,
|
|
1610
1610
|
f
|
|
1611
|
-
)(
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1611
|
+
)(
|
|
1612
|
+
(w, A) => ({
|
|
1613
|
+
...w,
|
|
1614
|
+
placement: A
|
|
1615
|
+
})
|
|
1616
|
+
)
|
|
1615
1617
|
),
|
|
1616
1618
|
_((w) => {
|
|
1617
1619
|
u = w, v();
|
|
@@ -1619,7 +1621,7 @@ const Jn = An, Gn = Rn, oe = bn, Zn = xn, to = (t, e, n) => {
|
|
|
1619
1621
|
) : null,
|
|
1620
1622
|
// arrowSignal is automatically disposed by the scope
|
|
1621
1623
|
N(
|
|
1622
|
-
|
|
1624
|
+
Jn(l, c, v),
|
|
1623
1625
|
b
|
|
1624
1626
|
)
|
|
1625
1627
|
);
|
|
@@ -1630,36 +1632,36 @@ const Jn = An, Gn = Rn, oe = bn, Zn = xn, to = (t, e, n) => {
|
|
|
1630
1632
|
)
|
|
1631
1633
|
)
|
|
1632
1634
|
);
|
|
1633
|
-
},
|
|
1635
|
+
}, no = ({
|
|
1634
1636
|
request: t,
|
|
1635
1637
|
load: e,
|
|
1636
1638
|
convertError: n,
|
|
1637
1639
|
onSuccess: o,
|
|
1638
|
-
onError:
|
|
1640
|
+
onError: s,
|
|
1639
1641
|
onSettled: i
|
|
1640
1642
|
}) => {
|
|
1641
|
-
let
|
|
1643
|
+
let r;
|
|
1642
1644
|
const a = M(R.notAsked), c = a.map(
|
|
1643
1645
|
(m) => R.isSuccess(m) ? m.value : void 0
|
|
1644
1646
|
), l = a.map(
|
|
1645
1647
|
(m) => R.isFailure(m) ? m.error : void 0
|
|
1646
1648
|
), u = a.map((m) => R.isLoading(m)), h = () => {
|
|
1647
|
-
|
|
1649
|
+
r?.abort(), r = void 0;
|
|
1648
1650
|
}, g = (m) => {
|
|
1649
1651
|
h(), a.set(m ?? R.notAsked);
|
|
1650
1652
|
}, f = async (m) => {
|
|
1651
|
-
h(),
|
|
1652
|
-
const v =
|
|
1653
|
+
h(), r = new AbortController();
|
|
1654
|
+
const v = r.signal, b = a.get();
|
|
1653
1655
|
a.set(R.loading(R.getOrUndefined(b)));
|
|
1654
1656
|
try {
|
|
1655
1657
|
const w = await e({ request: m, abortSignal: v, previous: b });
|
|
1656
|
-
await Promise.resolve(),
|
|
1658
|
+
await Promise.resolve(), r = void 0, a.set(R.success(w)), o?.(w, m);
|
|
1657
1659
|
} catch (w) {
|
|
1658
|
-
|
|
1660
|
+
r = void 0, a.set(R.failure(n(w))), s?.(n(w), m);
|
|
1659
1661
|
}
|
|
1660
1662
|
i?.(a.get(), m);
|
|
1661
1663
|
}, d = () => f(C.get(t)), y = () => {
|
|
1662
|
-
|
|
1664
|
+
r?.abort(), r = void 0, a.dispose();
|
|
1663
1665
|
};
|
|
1664
1666
|
return a.onDispose(C.on(t, f)), {
|
|
1665
1667
|
status: a,
|
|
@@ -1670,48 +1672,45 @@ const Jn = An, Gn = Rn, oe = bn, Zn = xn, to = (t, e, n) => {
|
|
|
1670
1672
|
reload: d,
|
|
1671
1673
|
dispose: y
|
|
1672
1674
|
};
|
|
1673
|
-
},
|
|
1674
|
-
const { status: n, dispose: o, reload:
|
|
1675
|
+
}, oo = (t, e) => {
|
|
1676
|
+
const { status: n, dispose: o, reload: s } = t, { pending: i, failure: r, success: a } = e;
|
|
1675
1677
|
return Y(
|
|
1676
1678
|
N(o),
|
|
1677
1679
|
we(n, {
|
|
1678
|
-
loading: i != null ? (c) => i({ previous: c, reload:
|
|
1679
|
-
failure:
|
|
1680
|
-
success: (c) => a({ value: c, reload:
|
|
1680
|
+
loading: i != null ? (c) => i({ previous: c, reload: s, cancel: t.cancel }) : void 0,
|
|
1681
|
+
failure: r != null ? (c) => r({ error: c, reload: s }) : void 0,
|
|
1682
|
+
success: (c) => a({ value: c, reload: s })
|
|
1681
1683
|
})
|
|
1682
1684
|
);
|
|
1683
|
-
},
|
|
1685
|
+
}, Co = ({
|
|
1684
1686
|
request: t,
|
|
1685
1687
|
load: e,
|
|
1686
1688
|
convertError: n = (l) => l,
|
|
1687
1689
|
onSuccess: o,
|
|
1688
|
-
onError:
|
|
1690
|
+
onError: s,
|
|
1689
1691
|
onSettled: i,
|
|
1690
|
-
success:
|
|
1692
|
+
success: r,
|
|
1691
1693
|
pending: a,
|
|
1692
1694
|
failure: c
|
|
1693
1695
|
}) => {
|
|
1694
|
-
const l =
|
|
1696
|
+
const l = no({
|
|
1695
1697
|
request: t,
|
|
1696
1698
|
load: e,
|
|
1697
1699
|
convertError: n,
|
|
1698
1700
|
onSuccess: o,
|
|
1699
|
-
onError:
|
|
1701
|
+
onError: s,
|
|
1700
1702
|
onSettled: i
|
|
1701
1703
|
});
|
|
1702
|
-
return
|
|
1703
|
-
},
|
|
1704
|
+
return oo(l, { success: r, pending: a, failure: c });
|
|
1705
|
+
}, so = (t, e) => {
|
|
1704
1706
|
if (typeof e == "function")
|
|
1705
|
-
return
|
|
1706
|
-
const n = e.failure ?? ((
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
return fe(C.toSignal(t), {
|
|
1711
|
-
Success: (r) => o(r.$.value),
|
|
1712
|
-
Failure: (r) => n(r.$.error)
|
|
1707
|
+
return so(t, { success: e });
|
|
1708
|
+
const n = e.failure ?? ((s) => (s.on(console.error), s.map((i) => `Error: ${i}`))), o = e.success;
|
|
1709
|
+
return ue(C.toSignal(t), {
|
|
1710
|
+
Success: (s) => o(s.$.value),
|
|
1711
|
+
Failure: (s) => n(s.$.error)
|
|
1713
1712
|
});
|
|
1714
|
-
},
|
|
1713
|
+
}, Do = () => le.focus((t) => t.target?.select());
|
|
1715
1714
|
class At {
|
|
1716
1715
|
/**
|
|
1717
1716
|
* Creates a new Rect instance.
|
|
@@ -1730,8 +1729,8 @@ class At {
|
|
|
1730
1729
|
* console.log(rect.height); // 50
|
|
1731
1730
|
* ```
|
|
1732
1731
|
*/
|
|
1733
|
-
constructor(e, n, o,
|
|
1734
|
-
this.left = e, this.top = n, this.width = o, this.height =
|
|
1732
|
+
constructor(e, n, o, s, i, r) {
|
|
1733
|
+
this.left = e, this.top = n, this.width = o, this.height = s, this.localLeft = i, this.localTop = r;
|
|
1735
1734
|
}
|
|
1736
1735
|
/**
|
|
1737
1736
|
* Creates a new Rect instance using an object with optional properties.
|
|
@@ -1762,11 +1761,11 @@ class At {
|
|
|
1762
1761
|
left: e = 0,
|
|
1763
1762
|
top: n = 0,
|
|
1764
1763
|
width: o = 0,
|
|
1765
|
-
height:
|
|
1764
|
+
height: s = 0,
|
|
1766
1765
|
localLeft: i = 0,
|
|
1767
|
-
localTop:
|
|
1766
|
+
localTop: r = 0
|
|
1768
1767
|
}) {
|
|
1769
|
-
return new At(e, n, o,
|
|
1768
|
+
return new At(e, n, o, s, i, r);
|
|
1770
1769
|
}
|
|
1771
1770
|
/**
|
|
1772
1771
|
* Gets the x-coordinate of the right edge of the rectangle.
|
|
@@ -1900,7 +1899,7 @@ class At {
|
|
|
1900
1899
|
*/
|
|
1901
1900
|
equals = (e) => mt(this.left, e.left) && mt(this.top, e.top) && mt(this.width, e.width) && mt(this.height, e.height);
|
|
1902
1901
|
}
|
|
1903
|
-
function
|
|
1902
|
+
function oe(t) {
|
|
1904
1903
|
const e = t.getBoundingClientRect();
|
|
1905
1904
|
return At.of({
|
|
1906
1905
|
top: e.top + window.scrollY,
|
|
@@ -1911,54 +1910,57 @@ function se(t) {
|
|
|
1911
1910
|
localTop: t.offsetTop
|
|
1912
1911
|
});
|
|
1913
1912
|
}
|
|
1914
|
-
const
|
|
1915
|
-
const { element: n } = e, o = M(
|
|
1916
|
-
let
|
|
1917
|
-
return typeof ResizeObserver < "u" && (
|
|
1918
|
-
|
|
1913
|
+
const Ho = (t) => Fe((e) => {
|
|
1914
|
+
const { element: n } = e, o = M(oe(n), (a, c) => a.equals(c)), s = he(t(o)).render(e), i = () => o.set(At.of(oe(n)));
|
|
1915
|
+
let r = null;
|
|
1916
|
+
return typeof ResizeObserver < "u" && (r = new ResizeObserver(i)), r?.observe(n), N((a) => {
|
|
1917
|
+
r?.disconnect(), s(a);
|
|
1919
1918
|
});
|
|
1920
1919
|
});
|
|
1921
|
-
function
|
|
1920
|
+
function se(t) {
|
|
1922
1921
|
return {
|
|
1923
1922
|
/* c8 ignore next 6 */
|
|
1924
1923
|
width: t?.innerWidth ?? 0,
|
|
1925
1924
|
height: t?.innerHeight ?? 0
|
|
1926
1925
|
};
|
|
1927
1926
|
}
|
|
1928
|
-
const
|
|
1929
|
-
const
|
|
1930
|
-
|
|
1931
|
-
(s,
|
|
1932
|
-
),
|
|
1933
|
-
return
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
},
|
|
1927
|
+
const Wo = (t) => Me(() => {
|
|
1928
|
+
const e = st(), n = M(
|
|
1929
|
+
se(e),
|
|
1930
|
+
(s, i) => s.width === i.width && s.height === i.height
|
|
1931
|
+
), o = () => n.set(se(e));
|
|
1932
|
+
return e?.addEventListener("resize", o), Y(
|
|
1933
|
+
N(() => {
|
|
1934
|
+
e?.removeEventListener("resize", o);
|
|
1935
|
+
}),
|
|
1936
|
+
t(n)
|
|
1937
|
+
);
|
|
1938
|
+
}), ro = (t, e) => {
|
|
1937
1939
|
const n = e.split("/").filter((i) => i !== ""), o = (i) => {
|
|
1938
1940
|
try {
|
|
1939
1941
|
return decodeURIComponent(i);
|
|
1940
1942
|
} catch {
|
|
1941
1943
|
return i;
|
|
1942
1944
|
}
|
|
1943
|
-
},
|
|
1945
|
+
}, s = {};
|
|
1944
1946
|
for (let i = 0; i < t.length; i++) {
|
|
1945
|
-
const
|
|
1946
|
-
if (!a &&
|
|
1947
|
+
const r = t[i], a = n[i];
|
|
1948
|
+
if (!a && r.type !== "catch-all")
|
|
1947
1949
|
return null;
|
|
1948
|
-
if (
|
|
1949
|
-
if (
|
|
1950
|
+
if (r.type === "literal") {
|
|
1951
|
+
if (r.value !== a)
|
|
1950
1952
|
return null;
|
|
1951
|
-
} else if (
|
|
1952
|
-
r
|
|
1953
|
-
else if (
|
|
1954
|
-
if (
|
|
1953
|
+
} else if (r.type === "param")
|
|
1954
|
+
s[r.name] = o(a);
|
|
1955
|
+
else if (r.type === "catch-all") {
|
|
1956
|
+
if (r.name) {
|
|
1955
1957
|
const c = n.slice(i).join("/");
|
|
1956
|
-
r
|
|
1958
|
+
s[r.name] = o(c);
|
|
1957
1959
|
}
|
|
1958
|
-
return { params:
|
|
1960
|
+
return { params: s, path: e };
|
|
1959
1961
|
}
|
|
1960
1962
|
}
|
|
1961
|
-
return n.length !== t.length ? null : { params:
|
|
1963
|
+
return n.length !== t.length ? null : { params: s, path: e };
|
|
1962
1964
|
}, Te = (t) => t.split("/").map((e) => {
|
|
1963
1965
|
if (e.startsWith(":"))
|
|
1964
1966
|
return { type: "param", name: e.slice(1) };
|
|
@@ -1967,27 +1969,27 @@ const Ho = (t) => (e) => {
|
|
|
1967
1969
|
return n != "" ? { type: "catch-all", name: n } : { type: "catch-all" };
|
|
1968
1970
|
} else
|
|
1969
1971
|
return { type: "literal", value: e };
|
|
1970
|
-
}).filter((e) => e.type !== "literal" || e.value !== ""),
|
|
1972
|
+
}).filter((e) => e.type !== "literal" || e.value !== ""), Fo = (t) => {
|
|
1971
1973
|
const e = t.map((n) => {
|
|
1972
1974
|
const o = Te(n);
|
|
1973
1975
|
return { route: n, segments: o };
|
|
1974
1976
|
});
|
|
1975
1977
|
return function(o) {
|
|
1976
|
-
for (const { segments:
|
|
1977
|
-
const
|
|
1978
|
-
if (
|
|
1979
|
-
return { ...
|
|
1978
|
+
for (const { segments: s, route: i } of e) {
|
|
1979
|
+
const r = ro(s, o);
|
|
1980
|
+
if (r)
|
|
1981
|
+
return { ...r, route: i };
|
|
1980
1982
|
}
|
|
1981
1983
|
return null;
|
|
1982
1984
|
};
|
|
1983
|
-
},
|
|
1985
|
+
}, io = (t) => {
|
|
1984
1986
|
if (t == null)
|
|
1985
1987
|
throw new Error(
|
|
1986
1988
|
"NavigationService: no Location handle attached. Make sure to attach one before calling navigation helpers."
|
|
1987
1989
|
);
|
|
1988
1990
|
return t;
|
|
1989
1991
|
};
|
|
1990
|
-
class
|
|
1992
|
+
class ao {
|
|
1991
1993
|
handles = [];
|
|
1992
1994
|
attach(e) {
|
|
1993
1995
|
const n = this.handles.lastIndexOf(e);
|
|
@@ -2004,7 +2006,7 @@ class io {
|
|
|
2004
2006
|
return this.handles[this.handles.length - 1];
|
|
2005
2007
|
}
|
|
2006
2008
|
getHandle() {
|
|
2007
|
-
return
|
|
2009
|
+
return io(this.current);
|
|
2008
2010
|
}
|
|
2009
2011
|
navigate(e, n) {
|
|
2010
2012
|
this.getHandle().navigate(e, n);
|
|
@@ -2043,7 +2045,7 @@ class io {
|
|
|
2043
2045
|
this.getHandle().run(e, n);
|
|
2044
2046
|
}
|
|
2045
2047
|
}
|
|
2046
|
-
const
|
|
2048
|
+
const Mo = new ao(), Ht = {
|
|
2047
2049
|
mark: Ft("RouterContext"),
|
|
2048
2050
|
create: () => {
|
|
2049
2051
|
const t = M([]);
|
|
@@ -2052,11 +2054,11 @@ const Fo = new io(), Ht = {
|
|
|
2052
2054
|
dispose: () => t.dispose()
|
|
2053
2055
|
};
|
|
2054
2056
|
}
|
|
2055
|
-
},
|
|
2056
|
-
const o = n.split("/").filter((
|
|
2057
|
+
}, co = (t, e, n) => {
|
|
2058
|
+
const o = n.split("/").filter((r) => r !== ""), s = {};
|
|
2057
2059
|
let i = 0;
|
|
2058
|
-
for (let
|
|
2059
|
-
const a = t[
|
|
2060
|
+
for (let r = 0; r < t.length; r++) {
|
|
2061
|
+
const a = t[r], c = o[r];
|
|
2060
2062
|
if (!c && a.type !== "catch-all")
|
|
2061
2063
|
return null;
|
|
2062
2064
|
if (a.type === "literal") {
|
|
@@ -2064,12 +2066,12 @@ const Fo = new io(), Ht = {
|
|
|
2064
2066
|
return null;
|
|
2065
2067
|
i++;
|
|
2066
2068
|
} else if (a.type === "param")
|
|
2067
|
-
|
|
2069
|
+
s[a.name] = c, i++;
|
|
2068
2070
|
else if (a.type === "catch-all") {
|
|
2069
|
-
a.name && (
|
|
2071
|
+
a.name && (s[a.name] = o.slice(i).join("/"));
|
|
2070
2072
|
const l = "/" + o.slice(0, i).join("/"), u = "/" + o.slice(i).join("/");
|
|
2071
2073
|
return {
|
|
2072
|
-
params:
|
|
2074
|
+
params: s,
|
|
2073
2075
|
matchedPath: l === "/" ? "" : l,
|
|
2074
2076
|
remainingPath: u === "/" ? "" : u,
|
|
2075
2077
|
route: e
|
|
@@ -2077,10 +2079,10 @@ const Fo = new io(), Ht = {
|
|
|
2077
2079
|
}
|
|
2078
2080
|
}
|
|
2079
2081
|
if (o.length === t.length) {
|
|
2080
|
-
const
|
|
2082
|
+
const r = "/" + o.join("/");
|
|
2081
2083
|
return {
|
|
2082
|
-
params:
|
|
2083
|
-
matchedPath:
|
|
2084
|
+
params: s,
|
|
2085
|
+
matchedPath: r === "/" ? "" : r,
|
|
2084
2086
|
remainingPath: "",
|
|
2085
2087
|
route: e
|
|
2086
2088
|
};
|
|
@@ -2092,52 +2094,52 @@ const Fo = new io(), Ht = {
|
|
|
2092
2094
|
return { route: n, segments: o };
|
|
2093
2095
|
});
|
|
2094
2096
|
return function(o) {
|
|
2095
|
-
for (const { segments:
|
|
2096
|
-
const
|
|
2097
|
-
if (
|
|
2098
|
-
return
|
|
2097
|
+
for (const { segments: s, route: i } of e) {
|
|
2098
|
+
const r = co(s, i, o);
|
|
2099
|
+
if (r)
|
|
2100
|
+
return r;
|
|
2099
2101
|
}
|
|
2100
2102
|
return null;
|
|
2101
2103
|
};
|
|
2102
|
-
},
|
|
2104
|
+
}, No = (t) => {
|
|
2103
2105
|
const e = Ce(Object.keys(t));
|
|
2104
|
-
return
|
|
2106
|
+
return Ne(
|
|
2105
2107
|
Ht,
|
|
2106
2108
|
{},
|
|
2107
|
-
() => ct(
|
|
2108
|
-
const
|
|
2109
|
-
const
|
|
2110
|
-
if (
|
|
2109
|
+
() => ct(Vt, (n) => ct(Ht, (o) => {
|
|
2110
|
+
const s = n.location.map((i) => {
|
|
2111
|
+
const r = e(i.pathname);
|
|
2112
|
+
if (r == null)
|
|
2111
2113
|
throw console.error("No route found for", i), new Error("No route found");
|
|
2112
2114
|
const a = {
|
|
2113
|
-
matchedPath:
|
|
2114
|
-
remainingPath:
|
|
2115
|
+
matchedPath: r.matchedPath,
|
|
2116
|
+
remainingPath: r.remainingPath,
|
|
2115
2117
|
fullPath: i.pathname,
|
|
2116
|
-
params:
|
|
2118
|
+
params: r.params
|
|
2117
2119
|
};
|
|
2118
2120
|
return o.value = [...o.value, a], {
|
|
2119
|
-
params:
|
|
2120
|
-
route:
|
|
2121
|
-
path:
|
|
2121
|
+
params: r.params,
|
|
2122
|
+
route: r.route,
|
|
2123
|
+
path: r.matchedPath || i.pathname,
|
|
2122
2124
|
search: i.search,
|
|
2123
2125
|
hash: i.hash
|
|
2124
2126
|
};
|
|
2125
2127
|
});
|
|
2126
2128
|
return me(
|
|
2127
|
-
|
|
2129
|
+
s.map((i) => [i.route, i]),
|
|
2128
2130
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2129
2131
|
t
|
|
2130
2132
|
);
|
|
2131
2133
|
}))
|
|
2132
2134
|
);
|
|
2133
|
-
},
|
|
2135
|
+
}, Vo = (t) => {
|
|
2134
2136
|
const e = Ce(Object.keys(t));
|
|
2135
|
-
return ct(Ht, (n) => ct(
|
|
2136
|
-
const
|
|
2137
|
-
const
|
|
2138
|
-
if (
|
|
2137
|
+
return ct(Ht, (n) => ct(Vt, (o) => {
|
|
2138
|
+
const s = n.map((i) => {
|
|
2139
|
+
const r = i[i.length - 1];
|
|
2140
|
+
if (r == null)
|
|
2139
2141
|
throw console.error("No router context available for ChildRouter", i), new Error("No router context available for ChildRouter");
|
|
2140
|
-
const a =
|
|
2142
|
+
const a = r.remainingPath ?? "", c = e(a);
|
|
2141
2143
|
if (c == null)
|
|
2142
2144
|
throw console.error("No route found for remaining path", a), new Error("No route found");
|
|
2143
2145
|
return {
|
|
@@ -2150,12 +2152,12 @@ const Fo = new io(), Ht = {
|
|
|
2150
2152
|
};
|
|
2151
2153
|
});
|
|
2152
2154
|
return me(
|
|
2153
|
-
|
|
2155
|
+
s.map((i) => [i.route, i]),
|
|
2154
2156
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2155
2157
|
t
|
|
2156
2158
|
);
|
|
2157
2159
|
}));
|
|
2158
|
-
}, xt = 60 * 1e3, Wt = 60 * xt, ut = 24 * Wt,
|
|
2160
|
+
}, xt = 60 * 1e3, Wt = 60 * xt, ut = 24 * Wt, re = 7 * ut, ie = 30 * ut, lo = 365 * ut, uo = [
|
|
2159
2161
|
{
|
|
2160
2162
|
max: xt * 90,
|
|
2161
2163
|
value: xt,
|
|
@@ -2178,117 +2180,117 @@ const Fo = new io(), Ht = {
|
|
|
2178
2180
|
future: { singular: "tomorrow", plural: "in {} days" }
|
|
2179
2181
|
},
|
|
2180
2182
|
{
|
|
2181
|
-
max:
|
|
2182
|
-
value:
|
|
2183
|
+
max: re * 6,
|
|
2184
|
+
value: re,
|
|
2183
2185
|
name: "week",
|
|
2184
2186
|
past: { singular: "last week", plural: "{} weeks ago" },
|
|
2185
2187
|
future: { singular: "in a week", plural: "in {} weeks" }
|
|
2186
2188
|
},
|
|
2187
2189
|
{
|
|
2188
|
-
max:
|
|
2189
|
-
value:
|
|
2190
|
+
max: ie * 18,
|
|
2191
|
+
value: ie,
|
|
2190
2192
|
name: "month",
|
|
2191
2193
|
past: { singular: "last month", plural: "{} months ago" },
|
|
2192
2194
|
future: { singular: "in a month", plural: "in {} months" }
|
|
2193
2195
|
},
|
|
2194
2196
|
{
|
|
2195
2197
|
max: 1 / 0,
|
|
2196
|
-
value:
|
|
2198
|
+
value: lo,
|
|
2197
2199
|
name: "year",
|
|
2198
2200
|
past: { singular: "last year", plural: "{} years ago" },
|
|
2199
2201
|
future: { singular: "in a year", plural: "in {} years" }
|
|
2200
2202
|
}
|
|
2201
2203
|
];
|
|
2202
|
-
function
|
|
2203
|
-
const
|
|
2204
|
-
return
|
|
2204
|
+
function ae(t, e, n, o) {
|
|
2205
|
+
const s = Math.round(t / e);
|
|
2206
|
+
return s <= 1 ? n : o.replace(
|
|
2205
2207
|
"{}",
|
|
2206
|
-
|
|
2208
|
+
s.toLocaleString(void 0, {
|
|
2207
2209
|
maximumFractionDigits: 0,
|
|
2208
2210
|
minimumFractionDigits: 0
|
|
2209
2211
|
})
|
|
2210
2212
|
);
|
|
2211
2213
|
}
|
|
2212
|
-
const
|
|
2213
|
-
const e = M(/* @__PURE__ */ new Date()), n =
|
|
2214
|
+
const fo = (t = 1e3) => {
|
|
2215
|
+
const e = M(/* @__PURE__ */ new Date()), n = $e(() => e.set(/* @__PURE__ */ new Date()), t);
|
|
2214
2216
|
return e.onDispose(n), e;
|
|
2215
|
-
},
|
|
2217
|
+
}, ho = (t) => {
|
|
2216
2218
|
const e = Math.abs(t);
|
|
2217
2219
|
if (e < xt)
|
|
2218
2220
|
return t < 0 ? "just now" : "in a moment";
|
|
2219
|
-
for (const n of
|
|
2221
|
+
for (const n of uo)
|
|
2220
2222
|
if (e < n.max)
|
|
2221
|
-
return t < 0 ?
|
|
2223
|
+
return t < 0 ? ae(e, n.value, n.past.singular, n.past.plural) : ae(e, n.value, n.future.singular, n.future.plural);
|
|
2222
2224
|
throw new Error("unreachable");
|
|
2223
|
-
},
|
|
2224
|
-
const o = e != null ?
|
|
2225
|
+
}, mo = (t, { now: e, frequency: n = 1e4 } = {}) => {
|
|
2226
|
+
const o = e != null ? ce.is(e) ? e.derive() : M(e) : fo(n), s = Mt(
|
|
2225
2227
|
t,
|
|
2226
2228
|
o
|
|
2227
|
-
)((i,
|
|
2228
|
-
return
|
|
2229
|
-
},
|
|
2230
|
-
const n =
|
|
2229
|
+
)((i, r) => i.getTime() - r.getTime());
|
|
2230
|
+
return s.onDispose(() => C.dispose(o)), s;
|
|
2231
|
+
}, po = (t, e = {}) => {
|
|
2232
|
+
const n = mo(t, e), o = n.map(ho);
|
|
2231
2233
|
return o.onDispose(n.dispose), o;
|
|
2232
|
-
},
|
|
2233
|
-
class
|
|
2234
|
+
}, $o = (t, e = {}) => po(t, e);
|
|
2235
|
+
class go extends Ve {
|
|
2234
2236
|
/**
|
|
2235
2237
|
* Triggers an update of the Ticker by incrementing its internal value.
|
|
2236
2238
|
* @returns void
|
|
2237
2239
|
*/
|
|
2238
2240
|
tick = () => this.update((e) => e + 1);
|
|
2239
2241
|
}
|
|
2240
|
-
const
|
|
2242
|
+
const zo = (t = 0) => new go(t, (e, n) => e === n);
|
|
2241
2243
|
export {
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
+
tn as Anchor,
|
|
2245
|
+
yo as Appearance,
|
|
2244
2246
|
we as AsyncResultView,
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2247
|
+
xo as AutoFocus,
|
|
2248
|
+
bo as AutoSelect,
|
|
2249
|
+
Vo as ChildRouter,
|
|
2250
|
+
Ho as ElementRect,
|
|
2251
|
+
Ao as HTMLTitle,
|
|
2252
|
+
Oo as HiddenWhenEmpty,
|
|
2253
|
+
sn as InViewport,
|
|
2254
|
+
Vt as Location,
|
|
2255
|
+
Lo as Mutation,
|
|
2256
|
+
ln as MutationDisplay,
|
|
2257
|
+
Mo as NavigationService,
|
|
2258
|
+
rn as OnClickOutside,
|
|
2259
|
+
Eo as OnEnterKey,
|
|
2260
|
+
Po as OnEscapeKey,
|
|
2259
2261
|
ve as OnKeyPressed,
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2262
|
+
To as PopOver,
|
|
2263
|
+
Co as Query,
|
|
2264
|
+
oo as QueryDisplay,
|
|
2263
2265
|
At as Rect,
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
+
so as ResultView,
|
|
2267
|
+
No as RootRouter,
|
|
2266
2268
|
Ht as RouterContextProvider,
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2269
|
+
Do as SelectOnFocus,
|
|
2270
|
+
go as Ticker,
|
|
2271
|
+
Ro as WhenInViewport,
|
|
2272
|
+
Wo as WindowSize,
|
|
2273
|
+
Be as _checkExtensionCondition,
|
|
2274
|
+
ze as _getExtension,
|
|
2275
|
+
Fo as _makeRouteMatcher,
|
|
2274
2276
|
Te as _parseRouteSegments,
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2277
|
+
ko as allPlacements,
|
|
2278
|
+
Ke as areLocationsEqual,
|
|
2279
|
+
So as classes,
|
|
2280
|
+
qt as evaluateLocationMatch,
|
|
2281
|
+
oe as getAbsoluteRect,
|
|
2282
|
+
Ue as handleAnchorClick,
|
|
2281
2283
|
Lt as locationFromURL,
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2284
|
+
cn as makeMutationResource,
|
|
2285
|
+
no as makeQueryResource,
|
|
2286
|
+
an as matchesKeyCombo,
|
|
2287
|
+
ro as matchesRoute,
|
|
2288
|
+
fo as nowSignal,
|
|
2289
|
+
$o as relativeTime,
|
|
2290
|
+
mo as relativeTimeMillisSignal,
|
|
2291
|
+
po as relativeTimeSignal,
|
|
2292
|
+
zo as ticker,
|
|
2293
|
+
ho as timeDiffToString,
|
|
2292
2294
|
et as urlFromLocation,
|
|
2293
|
-
|
|
2295
|
+
en as useAppearance
|
|
2294
2296
|
};
|