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