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