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