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