@tempots/ui 5.0.0 → 5.2.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.d.ts +4 -0
- package/index.js +622 -566
- package/package.json +2 -2
- package/renderables/onclickoutside.d.ts +8 -0
- package/renderables/onenterkey.d.ts +1 -0
- package/renderables/onescapekey.d.ts +1 -0
- package/renderables/onkeypressed.d.ts +23 -0
package/index.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { getWindow as
|
|
5
|
-
import { delayed as
|
|
6
|
-
const
|
|
1
|
+
var be = Object.defineProperty;
|
|
2
|
+
var Ae = (t, e, o) => e in t ? be(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
3
|
+
var At = (t, e, o) => Ae(t, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
+
import { getWindow as ct, prop as H, makeProviderMark as Xt, Signal as Jt, Use as Gt, html as Rt, on as Qt, Value as E, attr as Zt, Empty as Et, OneOfType as te, WithElement as $, OnDispose as F, Portal as ee, Fragment as st, renderableOfTNode as Dt, When as ne, effectOf as Oe, computedOf as oe, WithBrowserCtx as Re, OneOfTuple as Ee, Prop as Le } from "@tempots/dom";
|
|
5
|
+
import { delayed as se, AsyncResult as U, nearEqual as ft, interval as Se } from "@tempots/std";
|
|
6
|
+
const Te = (t) => {
|
|
7
7
|
const e = t.split("/").pop();
|
|
8
8
|
if (e == null || e.startsWith(".")) return;
|
|
9
9
|
const o = e.split(".") || [];
|
|
10
10
|
return o.length > 1 ? "." + o.pop() : void 0;
|
|
11
|
-
},
|
|
12
|
-
const o =
|
|
11
|
+
}, Pe = (t, e) => {
|
|
12
|
+
const o = Te(e);
|
|
13
13
|
return o != null && (t.length === 0 || !t.some((n) => o == n));
|
|
14
|
-
},
|
|
14
|
+
}, ke = (t, e, o, n) => {
|
|
15
15
|
let s = t.target;
|
|
16
16
|
for (; s != null && !(s instanceof HTMLAnchorElement); )
|
|
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: l } = r;
|
|
24
24
|
if (n) {
|
|
25
|
-
const a =
|
|
25
|
+
const a = i + c + l, h = r.getAttribute("href");
|
|
26
26
|
if (!(h != null && h.startsWith("#")) && h !== a)
|
|
27
27
|
return !0;
|
|
28
28
|
}
|
|
29
|
-
return e ? !1 :
|
|
30
|
-
},
|
|
29
|
+
return e ? !1 : Pe(o, i);
|
|
30
|
+
}, De = (t, e = {
|
|
31
31
|
ignoreUrlWithExtension: !0,
|
|
32
32
|
allowedExtensions: [],
|
|
33
33
|
ignoreExternalUrl: !0
|
|
@@ -36,41 +36,41 @@ const Ee = (t) => {
|
|
|
36
36
|
(n) => n.startsWith(".") ? n : "." + n
|
|
37
37
|
) : [];
|
|
38
38
|
return (n) => {
|
|
39
|
-
|
|
39
|
+
ke(
|
|
40
40
|
n,
|
|
41
41
|
e.ignoreUrlWithExtension ?? !0,
|
|
42
42
|
o,
|
|
43
43
|
e.ignoreExternalUrl ?? !0
|
|
44
44
|
) || t() && n.preventDefault();
|
|
45
45
|
};
|
|
46
|
-
},
|
|
47
|
-
var
|
|
48
|
-
const o = new URL(t, e ?? ((
|
|
46
|
+
}, Ce = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, re = (t, e) => {
|
|
47
|
+
var r;
|
|
48
|
+
const o = new URL(t, e ?? ((r = ct()) == null ? void 0 : r.location.toString())), n = Object.fromEntries(o.searchParams.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
|
+
}, $t = (t, e) => {
|
|
56
|
+
const o = re(e);
|
|
57
57
|
return t.set(o), t;
|
|
58
|
-
},
|
|
58
|
+
}, Lt = (t) => {
|
|
59
59
|
const o = new URLSearchParams(t.search).toString(), n = t.hash;
|
|
60
60
|
return `${t.pathname}${o ? `?${o}` : ""}${n ? `#${n}` : ""}`;
|
|
61
|
-
},
|
|
61
|
+
}, We = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), Fe = (t) => {
|
|
62
62
|
const e = t.container.currentURL, o = e.iso(
|
|
63
|
-
(n) =>
|
|
63
|
+
(n) => re(n),
|
|
64
64
|
(n) => {
|
|
65
|
-
if (
|
|
66
|
-
return
|
|
67
|
-
const s = new URL(n.pathname, e.value),
|
|
68
|
-
return
|
|
65
|
+
if (We(n.pathname))
|
|
66
|
+
return Lt(n);
|
|
67
|
+
const s = new URL(n.pathname, e.value), r = s.origin + s.pathname;
|
|
68
|
+
return Lt({ ...n, pathname: r });
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
return { value: o, dispose: o.dispose };
|
|
72
|
-
},
|
|
73
|
-
const t =
|
|
72
|
+
}, Me = () => {
|
|
73
|
+
const t = ct(), e = (t == null ? void 0 : t.location.hash) === "" ? void 0 : (t == null ? void 0 : t.location.hash.substring(1)) ?? void 0;
|
|
74
74
|
return {
|
|
75
75
|
pathname: (t == null ? void 0 : t.location.pathname) ?? "",
|
|
76
76
|
search: Object.fromEntries(
|
|
@@ -78,8 +78,8 @@ const Ee = (t) => {
|
|
|
78
78
|
),
|
|
79
79
|
hash: e
|
|
80
80
|
};
|
|
81
|
-
},
|
|
82
|
-
const t =
|
|
81
|
+
}, Ve = () => {
|
|
82
|
+
const t = H(Me(), Ce), e = ct(), o = () => {
|
|
83
83
|
let n = (e == null ? void 0 : e.location.hash) ?? "";
|
|
84
84
|
n.startsWith("#") && (n = n.substring(1));
|
|
85
85
|
const s = {
|
|
@@ -94,72 +94,73 @@ const Ee = (t) => {
|
|
|
94
94
|
return e == null || e.addEventListener("popstate", o), t.onDispose(() => {
|
|
95
95
|
e == null || e.removeEventListener("popstate", o);
|
|
96
96
|
}), t.on((n) => {
|
|
97
|
-
e == null || e.history.pushState({}, "",
|
|
97
|
+
e == null || e.history.pushState({}, "", Lt(n));
|
|
98
98
|
}), {
|
|
99
99
|
value: t,
|
|
100
100
|
dispose: t.dispose
|
|
101
101
|
};
|
|
102
|
-
},
|
|
103
|
-
mark:
|
|
102
|
+
}, ie = {
|
|
103
|
+
mark: Xt("LocationProvider"),
|
|
104
104
|
create: (t, e) => {
|
|
105
105
|
if (e.isBrowser())
|
|
106
|
-
return
|
|
106
|
+
return Ve();
|
|
107
107
|
if (e.isHeadless())
|
|
108
|
-
return
|
|
108
|
+
return Fe(e);
|
|
109
109
|
throw new Error("Unknown context");
|
|
110
110
|
}
|
|
111
|
-
},
|
|
111
|
+
}, Ne = (t) => {
|
|
112
112
|
document.startViewTransition ? document.startViewTransition(t) : t();
|
|
113
|
-
},
|
|
114
|
-
if (typeof t == "string" ||
|
|
115
|
-
return
|
|
113
|
+
}, $e = (t, ...e) => {
|
|
114
|
+
if (typeof t == "string" || Jt.is(t))
|
|
115
|
+
return $e({ href: t }, ...e);
|
|
116
116
|
const {
|
|
117
117
|
href: o,
|
|
118
118
|
withViewTransition: n,
|
|
119
119
|
...s
|
|
120
120
|
} = t;
|
|
121
|
-
return
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}) :
|
|
121
|
+
return Gt(ie, (r) => Rt.a(
|
|
122
|
+
Qt.click(
|
|
123
|
+
De(() => (n === !0 ? Ne(() => {
|
|
124
|
+
$t(r, E.get(o));
|
|
125
|
+
}) : $t(r, E.get(o)), !0), s)
|
|
126
126
|
),
|
|
127
|
-
|
|
127
|
+
Zt.href(o),
|
|
128
128
|
...e
|
|
129
|
+
/* c8 ignore next 2 */
|
|
129
130
|
));
|
|
130
|
-
},
|
|
131
|
-
mark:
|
|
131
|
+
}, Kn = {
|
|
132
|
+
mark: Xt("Appearance"),
|
|
132
133
|
create: () => {
|
|
133
|
-
const t =
|
|
134
|
+
const t = He();
|
|
134
135
|
return {
|
|
135
136
|
value: t,
|
|
136
137
|
dispose: t.dispose
|
|
137
138
|
};
|
|
138
139
|
}
|
|
139
140
|
};
|
|
140
|
-
function
|
|
141
|
-
const t =
|
|
141
|
+
function He() {
|
|
142
|
+
const t = ct(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, o = (e == null ? void 0 : e.matches) ?? !1, n = H(o ? "dark" : "light"), s = (r) => n.set(r.matches ? "dark" : "light");
|
|
142
143
|
return e == null || e.addEventListener("change", s), n.onDispose(() => e == null ? void 0 : e.removeEventListener("change", s)), n;
|
|
143
144
|
}
|
|
144
|
-
const
|
|
145
|
+
const ce = (t, e) => {
|
|
145
146
|
if (typeof e == "function")
|
|
146
|
-
return
|
|
147
|
-
const o = e.failure ?? ((
|
|
148
|
-
return
|
|
149
|
-
AsyncSuccess: (
|
|
150
|
-
AsyncFailure: (
|
|
151
|
-
Loading: (
|
|
152
|
-
NotAsked:
|
|
147
|
+
return ce(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 te(E.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
|
|
153
154
|
});
|
|
154
|
-
},
|
|
155
|
-
const o =
|
|
156
|
-
return
|
|
157
|
-
}),
|
|
155
|
+
}, _n = (t = 10) => $((e) => F(se(() => e == null ? void 0 : e.focus(), t))), In = (t = 10) => $((e) => {
|
|
156
|
+
const o = se(() => e.select(), t);
|
|
157
|
+
return F(o);
|
|
158
|
+
}), jn = $((t) => {
|
|
158
159
|
const e = t.style.getPropertyValue(":empty");
|
|
159
|
-
return t.style.setProperty(":empty", "display:none"),
|
|
160
|
+
return t.style.setProperty(":empty", "display:none"), F((o) => {
|
|
160
161
|
o && t.style.setProperty(":empty", e);
|
|
161
162
|
});
|
|
162
|
-
}),
|
|
163
|
+
}), Yn = (t) => ee("head > title", Zt.innerText(t)), Be = {
|
|
163
164
|
partial: {
|
|
164
165
|
root: null,
|
|
165
166
|
rootMargin: "0px",
|
|
@@ -170,111 +171,154 @@ const ie = (t, e) => {
|
|
|
170
171
|
rootMargin: "0px",
|
|
171
172
|
threshold: 1
|
|
172
173
|
}
|
|
173
|
-
},
|
|
174
|
+
}, dt = {
|
|
174
175
|
partial: /* @__PURE__ */ new Map(),
|
|
175
176
|
full: /* @__PURE__ */ new Map()
|
|
176
|
-
},
|
|
177
|
+
}, ot = {
|
|
177
178
|
partial: null,
|
|
178
179
|
full: null
|
|
179
180
|
};
|
|
180
|
-
function
|
|
181
|
-
return
|
|
181
|
+
function Ue(t) {
|
|
182
|
+
return ot[t] == null && (ot[t] = new IntersectionObserver((e) => {
|
|
182
183
|
e.forEach((o) => {
|
|
183
|
-
const n =
|
|
184
|
+
const n = dt[t].get(o.target);
|
|
184
185
|
n == null || n.set(o.isIntersecting);
|
|
185
186
|
});
|
|
186
|
-
},
|
|
187
|
-
}
|
|
188
|
-
const
|
|
189
|
-
const n =
|
|
190
|
-
return
|
|
191
|
-
|
|
192
|
-
const
|
|
193
|
-
|
|
194
|
-
function
|
|
187
|
+
}, Be[t])), ot[t];
|
|
188
|
+
}
|
|
189
|
+
const ze = ({ mode: t = "partial", once: e = !1 }, o) => {
|
|
190
|
+
const n = H(!1);
|
|
191
|
+
return st(
|
|
192
|
+
$((s) => {
|
|
193
|
+
const r = typeof IntersectionObserver < "u" ? Ue(t) : null;
|
|
194
|
+
dt[t].set(s, n), r == null || r.observe(s);
|
|
195
|
+
function i() {
|
|
195
196
|
var l;
|
|
196
|
-
|
|
197
|
+
r == null || r.unobserve(s), dt[t].delete(s), dt[t].size === 0 && ((l = ot[t]) == null || l.disconnect(), ot[t] = null);
|
|
197
198
|
}
|
|
198
199
|
let c = null;
|
|
199
200
|
return e && (c = n.on((l) => {
|
|
200
|
-
l &&
|
|
201
|
-
})),
|
|
202
|
-
n.dispose(),
|
|
201
|
+
l && i();
|
|
202
|
+
})), F(() => {
|
|
203
|
+
n.dispose(), i(), c == null || c();
|
|
203
204
|
});
|
|
204
205
|
}),
|
|
205
|
-
|
|
206
|
+
Dt(o(n))
|
|
206
207
|
);
|
|
207
|
-
},
|
|
208
|
+
}, qn = (t, e, o) => ze(t, (n) => ne(n, e, o ?? (() => Et)));
|
|
209
|
+
function Xn(t) {
|
|
210
|
+
return $((e) => {
|
|
211
|
+
const o = (n) => {
|
|
212
|
+
e.contains(n.target) || t(n);
|
|
213
|
+
};
|
|
214
|
+
return document.addEventListener("click", o), F(() => {
|
|
215
|
+
document.removeEventListener("click", o);
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
const G = (t, e) => t === void 0 || t === e, Ht = (t, e) => t === void 0 || t === e;
|
|
220
|
+
function Ke(t, e) {
|
|
221
|
+
return typeof t == "string" ? e.key === t : Ht(t.key, e.key) && Ht(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(
|
|
222
|
+
t.commandOrControlKey,
|
|
223
|
+
e.metaKey || e.ctrlKey
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
function le({
|
|
227
|
+
allowedKeys: t,
|
|
228
|
+
handler: e
|
|
229
|
+
}) {
|
|
230
|
+
return $((o) => {
|
|
231
|
+
const n = (s) => {
|
|
232
|
+
if (o.contains(s.target)) {
|
|
233
|
+
for (const r of t)
|
|
234
|
+
if (Ke(r, s)) {
|
|
235
|
+
e(s);
|
|
236
|
+
break;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
return document.addEventListener("keydown", n), F(() => {
|
|
241
|
+
document.removeEventListener("keydown", n);
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
function Jn(t) {
|
|
246
|
+
return le({ allowedKeys: ["Enter"], handler: t });
|
|
247
|
+
}
|
|
248
|
+
function Gn(t) {
|
|
249
|
+
return le({ allowedKeys: ["Escape"], handler: t });
|
|
250
|
+
}
|
|
251
|
+
const Z = Math.min, q = Math.max, mt = Math.round, ht = Math.floor, C = (t) => ({
|
|
208
252
|
x: t,
|
|
209
253
|
y: t
|
|
210
|
-
}),
|
|
254
|
+
}), _e = {
|
|
211
255
|
left: "right",
|
|
212
256
|
right: "left",
|
|
213
257
|
bottom: "top",
|
|
214
258
|
top: "bottom"
|
|
215
|
-
},
|
|
259
|
+
}, Ie = {
|
|
216
260
|
start: "end",
|
|
217
261
|
end: "start"
|
|
218
262
|
};
|
|
219
|
-
function
|
|
220
|
-
return
|
|
263
|
+
function St(t, e, o) {
|
|
264
|
+
return q(t, Z(e, o));
|
|
221
265
|
}
|
|
222
|
-
function
|
|
266
|
+
function lt(t, e) {
|
|
223
267
|
return typeof t == "function" ? t(e) : t;
|
|
224
268
|
}
|
|
225
|
-
function
|
|
269
|
+
function X(t) {
|
|
226
270
|
return t.split("-")[0];
|
|
227
271
|
}
|
|
228
|
-
function
|
|
272
|
+
function at(t) {
|
|
229
273
|
return t.split("-")[1];
|
|
230
274
|
}
|
|
231
|
-
function
|
|
275
|
+
function ae(t) {
|
|
232
276
|
return t === "x" ? "y" : "x";
|
|
233
277
|
}
|
|
234
278
|
function Ct(t) {
|
|
235
279
|
return t === "y" ? "height" : "width";
|
|
236
280
|
}
|
|
237
|
-
function
|
|
238
|
-
return ["top", "bottom"].includes(
|
|
281
|
+
function z(t) {
|
|
282
|
+
return ["top", "bottom"].includes(X(t)) ? "y" : "x";
|
|
239
283
|
}
|
|
240
|
-
function
|
|
241
|
-
return
|
|
284
|
+
function Wt(t) {
|
|
285
|
+
return ae(z(t));
|
|
242
286
|
}
|
|
243
|
-
function
|
|
287
|
+
function je(t, e, o) {
|
|
244
288
|
o === void 0 && (o = !1);
|
|
245
|
-
const n =
|
|
246
|
-
let
|
|
247
|
-
return e.reference[
|
|
289
|
+
const n = at(t), s = Wt(t), r = Ct(s);
|
|
290
|
+
let i = s === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
291
|
+
return e.reference[r] > e.floating[r] && (i = gt(i)), [i, gt(i)];
|
|
248
292
|
}
|
|
249
|
-
function
|
|
250
|
-
const e =
|
|
251
|
-
return [
|
|
293
|
+
function Ye(t) {
|
|
294
|
+
const e = gt(t);
|
|
295
|
+
return [Tt(t), e, Tt(e)];
|
|
252
296
|
}
|
|
253
|
-
function
|
|
254
|
-
return t.replace(/start|end/g, (e) =>
|
|
297
|
+
function Tt(t) {
|
|
298
|
+
return t.replace(/start|end/g, (e) => Ie[e]);
|
|
255
299
|
}
|
|
256
|
-
function
|
|
257
|
-
const n = ["left", "right"], s = ["right", "left"],
|
|
300
|
+
function qe(t, e, o) {
|
|
301
|
+
const n = ["left", "right"], s = ["right", "left"], r = ["top", "bottom"], i = ["bottom", "top"];
|
|
258
302
|
switch (t) {
|
|
259
303
|
case "top":
|
|
260
304
|
case "bottom":
|
|
261
305
|
return o ? e ? s : n : e ? n : s;
|
|
262
306
|
case "left":
|
|
263
307
|
case "right":
|
|
264
|
-
return e ?
|
|
308
|
+
return e ? r : i;
|
|
265
309
|
default:
|
|
266
310
|
return [];
|
|
267
311
|
}
|
|
268
312
|
}
|
|
269
|
-
function
|
|
270
|
-
const s =
|
|
271
|
-
let
|
|
272
|
-
return s && (
|
|
313
|
+
function Xe(t, e, o, n) {
|
|
314
|
+
const s = at(t);
|
|
315
|
+
let r = qe(X(t), o === "start", n);
|
|
316
|
+
return s && (r = r.map((i) => i + "-" + s), e && (r = r.concat(r.map(Tt)))), r;
|
|
273
317
|
}
|
|
274
|
-
function
|
|
275
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
318
|
+
function gt(t) {
|
|
319
|
+
return t.replace(/left|right|bottom|top/g, (e) => _e[e]);
|
|
276
320
|
}
|
|
277
|
-
function
|
|
321
|
+
function Je(t) {
|
|
278
322
|
return {
|
|
279
323
|
top: 0,
|
|
280
324
|
right: 0,
|
|
@@ -283,15 +327,15 @@ function Ye(t) {
|
|
|
283
327
|
...t
|
|
284
328
|
};
|
|
285
329
|
}
|
|
286
|
-
function
|
|
287
|
-
return typeof t != "number" ?
|
|
330
|
+
function ue(t) {
|
|
331
|
+
return typeof t != "number" ? Je(t) : {
|
|
288
332
|
top: t,
|
|
289
333
|
right: t,
|
|
290
334
|
bottom: t,
|
|
291
335
|
left: t
|
|
292
336
|
};
|
|
293
337
|
}
|
|
294
|
-
function
|
|
338
|
+
function pt(t) {
|
|
295
339
|
const {
|
|
296
340
|
x: e,
|
|
297
341
|
y: o,
|
|
@@ -309,12 +353,12 @@ function gt(t) {
|
|
|
309
353
|
y: o
|
|
310
354
|
};
|
|
311
355
|
}
|
|
312
|
-
function
|
|
356
|
+
function Bt(t, e, o) {
|
|
313
357
|
let {
|
|
314
358
|
reference: n,
|
|
315
359
|
floating: s
|
|
316
360
|
} = t;
|
|
317
|
-
const
|
|
361
|
+
const r = z(e), i = Wt(e), c = Ct(i), l = X(e), a = r === "y", h = n.x + n.width / 2 - s.width / 2, f = n.y + n.height / 2 - s.height / 2, m = n[c] / 2 - s[c] / 2;
|
|
318
362
|
let u;
|
|
319
363
|
switch (l) {
|
|
320
364
|
case "top":
|
|
@@ -347,31 +391,31 @@ function $t(t, e, o) {
|
|
|
347
391
|
y: n.y
|
|
348
392
|
};
|
|
349
393
|
}
|
|
350
|
-
switch (
|
|
394
|
+
switch (at(e)) {
|
|
351
395
|
case "start":
|
|
352
|
-
u[
|
|
396
|
+
u[i] -= m * (o && a ? -1 : 1);
|
|
353
397
|
break;
|
|
354
398
|
case "end":
|
|
355
|
-
u[
|
|
399
|
+
u[i] += m * (o && a ? -1 : 1);
|
|
356
400
|
break;
|
|
357
401
|
}
|
|
358
402
|
return u;
|
|
359
403
|
}
|
|
360
|
-
const
|
|
404
|
+
const Ge = async (t, e, o) => {
|
|
361
405
|
const {
|
|
362
406
|
placement: n = "bottom",
|
|
363
407
|
strategy: s = "absolute",
|
|
364
|
-
middleware:
|
|
365
|
-
platform:
|
|
366
|
-
} = o, c =
|
|
367
|
-
let a = await
|
|
408
|
+
middleware: r = [],
|
|
409
|
+
platform: i
|
|
410
|
+
} = o, c = r.filter(Boolean), l = await (i.isRTL == null ? void 0 : i.isRTL(e));
|
|
411
|
+
let a = await i.getElementRects({
|
|
368
412
|
reference: t,
|
|
369
413
|
floating: e,
|
|
370
414
|
strategy: s
|
|
371
415
|
}), {
|
|
372
416
|
x: h,
|
|
373
417
|
y: f
|
|
374
|
-
} =
|
|
418
|
+
} = Bt(a, n, l), m = n, u = {}, d = 0;
|
|
375
419
|
for (let p = 0; p < c.length; p++) {
|
|
376
420
|
const {
|
|
377
421
|
name: w,
|
|
@@ -389,7 +433,7 @@ const qe = async (t, e, o) => {
|
|
|
389
433
|
strategy: s,
|
|
390
434
|
middlewareData: u,
|
|
391
435
|
rects: a,
|
|
392
|
-
platform:
|
|
436
|
+
platform: i,
|
|
393
437
|
elements: {
|
|
394
438
|
reference: t,
|
|
395
439
|
floating: e
|
|
@@ -401,14 +445,14 @@ const qe = async (t, e, o) => {
|
|
|
401
445
|
...u[w],
|
|
402
446
|
...b
|
|
403
447
|
}
|
|
404
|
-
}, v && d <= 50 && (d++, typeof v == "object" && (v.placement && (m = v.placement), v.rects && (a = v.rects === !0 ? await
|
|
448
|
+
}, v && d <= 50 && (d++, typeof v == "object" && (v.placement && (m = v.placement), v.rects && (a = v.rects === !0 ? await i.getElementRects({
|
|
405
449
|
reference: t,
|
|
406
450
|
floating: e,
|
|
407
451
|
strategy: s
|
|
408
452
|
}) : v.rects), {
|
|
409
453
|
x: h,
|
|
410
454
|
y: f
|
|
411
|
-
} =
|
|
455
|
+
} = Bt(a, m, l)), p = -1);
|
|
412
456
|
}
|
|
413
457
|
return {
|
|
414
458
|
x: h,
|
|
@@ -418,14 +462,14 @@ const qe = async (t, e, o) => {
|
|
|
418
462
|
middlewareData: u
|
|
419
463
|
};
|
|
420
464
|
};
|
|
421
|
-
async function
|
|
465
|
+
async function fe(t, e) {
|
|
422
466
|
var o;
|
|
423
467
|
e === void 0 && (e = {});
|
|
424
468
|
const {
|
|
425
469
|
x: n,
|
|
426
470
|
y: s,
|
|
427
|
-
platform:
|
|
428
|
-
rects:
|
|
471
|
+
platform: r,
|
|
472
|
+
rects: i,
|
|
429
473
|
elements: c,
|
|
430
474
|
strategy: l
|
|
431
475
|
} = t, {
|
|
@@ -434,23 +478,23 @@ async function le(t, e) {
|
|
|
434
478
|
elementContext: f = "floating",
|
|
435
479
|
altBoundary: m = !1,
|
|
436
480
|
padding: u = 0
|
|
437
|
-
} =
|
|
438
|
-
element: (o = await (
|
|
481
|
+
} = lt(e, t), d = ue(u), w = c[m ? f === "floating" ? "reference" : "floating" : f], g = pt(await r.getClippingRect({
|
|
482
|
+
element: (o = await (r.isElement == null ? void 0 : r.isElement(w))) == null || o ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
|
|
439
483
|
boundary: a,
|
|
440
484
|
rootBoundary: h,
|
|
441
485
|
strategy: l
|
|
442
486
|
})), x = f === "floating" ? {
|
|
443
487
|
x: n,
|
|
444
488
|
y: s,
|
|
445
|
-
width:
|
|
446
|
-
height:
|
|
447
|
-
} :
|
|
489
|
+
width: i.floating.width,
|
|
490
|
+
height: i.floating.height
|
|
491
|
+
} : i.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), b = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
|
|
448
492
|
x: 1,
|
|
449
493
|
y: 1
|
|
450
494
|
} : {
|
|
451
495
|
x: 1,
|
|
452
496
|
y: 1
|
|
453
|
-
}, v =
|
|
497
|
+
}, v = pt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
454
498
|
elements: c,
|
|
455
499
|
rect: x,
|
|
456
500
|
offsetParent: y,
|
|
@@ -463,7 +507,7 @@ async function le(t, e) {
|
|
|
463
507
|
right: (v.right - g.right + d.right) / b.x
|
|
464
508
|
};
|
|
465
509
|
}
|
|
466
|
-
const
|
|
510
|
+
const Qe = (t) => ({
|
|
467
511
|
name: "arrow",
|
|
468
512
|
options: t,
|
|
469
513
|
async fn(e) {
|
|
@@ -471,36 +515,36 @@ const Xe = (t) => ({
|
|
|
471
515
|
x: o,
|
|
472
516
|
y: n,
|
|
473
517
|
placement: s,
|
|
474
|
-
rects:
|
|
475
|
-
platform:
|
|
518
|
+
rects: r,
|
|
519
|
+
platform: i,
|
|
476
520
|
elements: c,
|
|
477
521
|
middlewareData: l
|
|
478
522
|
} = e, {
|
|
479
523
|
element: a,
|
|
480
524
|
padding: h = 0
|
|
481
|
-
} =
|
|
525
|
+
} = lt(t, e) || {};
|
|
482
526
|
if (a == null)
|
|
483
527
|
return {};
|
|
484
|
-
const f =
|
|
528
|
+
const f = ue(h), m = {
|
|
485
529
|
x: o,
|
|
486
530
|
y: n
|
|
487
|
-
}, u =
|
|
531
|
+
}, u = Wt(s), d = Ct(u), p = await i.getDimensions(a), w = u === "y", g = w ? "top" : "left", x = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = r.reference[d] + r.reference[u] - m[u] - r.floating[d], v = m[u] - r.reference[u], L = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a));
|
|
488
532
|
let A = L ? L[y] : 0;
|
|
489
|
-
(!A || !await (
|
|
490
|
-
const _ = b / 2 - v / 2,
|
|
533
|
+
(!A || !await (i.isElement == null ? void 0 : i.isElement(L))) && (A = c.floating[y] || r.floating[d]);
|
|
534
|
+
const _ = b / 2 - v / 2, V = A / 2 - p[d] / 2 - 1, S = Z(f[g], V), I = Z(f[x], V), j = S, nt = A - p[d] - I, O = A / 2 - p[d] / 2 + _, Y = St(j, O, nt), N = !l.arrow && at(s) != null && O !== Y && r.reference[d] / 2 - (O < j ? S : I) - p[d] / 2 < 0, T = N ? O < j ? O - j : O - nt : 0;
|
|
491
535
|
return {
|
|
492
536
|
[u]: m[u] + T,
|
|
493
537
|
data: {
|
|
494
538
|
[u]: Y,
|
|
495
|
-
centerOffset:
|
|
496
|
-
...
|
|
539
|
+
centerOffset: O - Y - T,
|
|
540
|
+
...N && {
|
|
497
541
|
alignmentOffset: T
|
|
498
542
|
}
|
|
499
543
|
},
|
|
500
|
-
reset:
|
|
544
|
+
reset: N
|
|
501
545
|
};
|
|
502
546
|
}
|
|
503
|
-
}),
|
|
547
|
+
}), Ze = function(t) {
|
|
504
548
|
return t === void 0 && (t = {}), {
|
|
505
549
|
name: "flip",
|
|
506
550
|
options: t,
|
|
@@ -508,8 +552,8 @@ const Xe = (t) => ({
|
|
|
508
552
|
var o, n;
|
|
509
553
|
const {
|
|
510
554
|
placement: s,
|
|
511
|
-
middlewareData:
|
|
512
|
-
rects:
|
|
555
|
+
middlewareData: r,
|
|
556
|
+
rects: i,
|
|
513
557
|
initialPlacement: c,
|
|
514
558
|
platform: l,
|
|
515
559
|
elements: a
|
|
@@ -521,60 +565,60 @@ const Xe = (t) => ({
|
|
|
521
565
|
fallbackAxisSideDirection: d = "none",
|
|
522
566
|
flipAlignment: p = !0,
|
|
523
567
|
...w
|
|
524
|
-
} =
|
|
525
|
-
if ((o =
|
|
568
|
+
} = lt(t, e);
|
|
569
|
+
if ((o = r.arrow) != null && o.alignmentOffset)
|
|
526
570
|
return {};
|
|
527
|
-
const g =
|
|
528
|
-
!m && L && v.push(...
|
|
529
|
-
const A = [c, ...v], _ = await
|
|
530
|
-
let S = ((n =
|
|
531
|
-
if (h &&
|
|
532
|
-
const
|
|
533
|
-
|
|
571
|
+
const g = X(s), x = z(c), y = X(c) === c, b = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), v = m || (y || !p ? [gt(c)] : Ye(c)), L = d !== "none";
|
|
572
|
+
!m && L && v.push(...Xe(c, p, d, b));
|
|
573
|
+
const A = [c, ...v], _ = await fe(e, w), V = [];
|
|
574
|
+
let S = ((n = r.flip) == null ? void 0 : n.overflows) || [];
|
|
575
|
+
if (h && V.push(_[g]), f) {
|
|
576
|
+
const O = je(s, i, b);
|
|
577
|
+
V.push(_[O[0]], _[O[1]]);
|
|
534
578
|
}
|
|
535
579
|
if (S = [...S, {
|
|
536
580
|
placement: s,
|
|
537
|
-
overflows:
|
|
538
|
-
}], !
|
|
581
|
+
overflows: V
|
|
582
|
+
}], !V.every((O) => O <= 0)) {
|
|
539
583
|
var I, j;
|
|
540
|
-
const
|
|
541
|
-
if (Y && (!(f === "alignment" ? x !==
|
|
584
|
+
const O = (((I = r.flip) == null ? void 0 : I.index) || 0) + 1, Y = A[O];
|
|
585
|
+
if (Y && (!(f === "alignment" ? x !== z(Y) : !1) || // We leave the current main axis only if every placement on that axis
|
|
542
586
|
// overflows the main axis.
|
|
543
|
-
S.every((P) => P.overflows[0] > 0 &&
|
|
587
|
+
S.every((P) => P.overflows[0] > 0 && z(P.placement) === x)))
|
|
544
588
|
return {
|
|
545
589
|
data: {
|
|
546
|
-
index:
|
|
590
|
+
index: O,
|
|
547
591
|
overflows: S
|
|
548
592
|
},
|
|
549
593
|
reset: {
|
|
550
594
|
placement: Y
|
|
551
595
|
}
|
|
552
596
|
};
|
|
553
|
-
let
|
|
554
|
-
if (!
|
|
597
|
+
let N = (j = S.filter((T) => T.overflows[0] <= 0).sort((T, P) => T.overflows[1] - P.overflows[1])[0]) == null ? void 0 : j.placement;
|
|
598
|
+
if (!N)
|
|
555
599
|
switch (u) {
|
|
556
600
|
case "bestFit": {
|
|
557
|
-
var
|
|
558
|
-
const T = (
|
|
601
|
+
var nt;
|
|
602
|
+
const T = (nt = S.filter((P) => {
|
|
559
603
|
if (L) {
|
|
560
|
-
const
|
|
561
|
-
return
|
|
604
|
+
const B = z(P.placement);
|
|
605
|
+
return B === x || // Create a bias to the `y` side axis due to horizontal
|
|
562
606
|
// reading directions favoring greater width.
|
|
563
|
-
|
|
607
|
+
B === "y";
|
|
564
608
|
}
|
|
565
609
|
return !0;
|
|
566
|
-
}).map((P) => [P.placement, P.overflows.filter((
|
|
567
|
-
T && (
|
|
610
|
+
}).map((P) => [P.placement, P.overflows.filter((B) => B > 0).reduce((B, ve) => B + ve, 0)]).sort((P, B) => P[1] - B[1])[0]) == null ? void 0 : nt[0];
|
|
611
|
+
T && (N = T);
|
|
568
612
|
break;
|
|
569
613
|
}
|
|
570
614
|
case "initialPlacement":
|
|
571
|
-
|
|
615
|
+
N = c;
|
|
572
616
|
break;
|
|
573
617
|
}
|
|
574
|
-
if (s !==
|
|
618
|
+
if (s !== N)
|
|
575
619
|
return {
|
|
576
620
|
reset: {
|
|
577
|
-
placement:
|
|
621
|
+
placement: N
|
|
578
622
|
}
|
|
579
623
|
};
|
|
580
624
|
}
|
|
@@ -582,12 +626,12 @@ const Xe = (t) => ({
|
|
|
582
626
|
}
|
|
583
627
|
};
|
|
584
628
|
};
|
|
585
|
-
async function
|
|
629
|
+
async function tn(t, e) {
|
|
586
630
|
const {
|
|
587
631
|
placement: o,
|
|
588
632
|
platform: n,
|
|
589
633
|
elements: s
|
|
590
|
-
} = t,
|
|
634
|
+
} = t, r = await (n.isRTL == null ? void 0 : n.isRTL(s.floating)), i = X(o), c = at(o), l = z(o) === "y", a = ["left", "top"].includes(i) ? -1 : 1, h = r && l ? -1 : 1, f = lt(e, t);
|
|
591
635
|
let {
|
|
592
636
|
mainAxis: m,
|
|
593
637
|
crossAxis: u,
|
|
@@ -609,7 +653,7 @@ async function Je(t, e) {
|
|
|
609
653
|
y: u * h
|
|
610
654
|
};
|
|
611
655
|
}
|
|
612
|
-
const
|
|
656
|
+
const en = function(t) {
|
|
613
657
|
return t === void 0 && (t = 0), {
|
|
614
658
|
name: "offset",
|
|
615
659
|
options: t,
|
|
@@ -617,21 +661,21 @@ const Ge = function(t) {
|
|
|
617
661
|
var o, n;
|
|
618
662
|
const {
|
|
619
663
|
x: s,
|
|
620
|
-
y:
|
|
621
|
-
placement:
|
|
664
|
+
y: r,
|
|
665
|
+
placement: i,
|
|
622
666
|
middlewareData: c
|
|
623
|
-
} = e, l = await
|
|
624
|
-
return
|
|
667
|
+
} = e, l = await tn(e, t);
|
|
668
|
+
return i === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
|
|
625
669
|
x: s + l.x,
|
|
626
|
-
y:
|
|
670
|
+
y: r + l.y,
|
|
627
671
|
data: {
|
|
628
672
|
...l,
|
|
629
|
-
placement:
|
|
673
|
+
placement: i
|
|
630
674
|
}
|
|
631
675
|
};
|
|
632
676
|
}
|
|
633
677
|
};
|
|
634
|
-
},
|
|
678
|
+
}, nn = function(t) {
|
|
635
679
|
return t === void 0 && (t = {}), {
|
|
636
680
|
name: "shift",
|
|
637
681
|
options: t,
|
|
@@ -641,8 +685,8 @@ const Ge = function(t) {
|
|
|
641
685
|
y: n,
|
|
642
686
|
placement: s
|
|
643
687
|
} = e, {
|
|
644
|
-
mainAxis:
|
|
645
|
-
crossAxis:
|
|
688
|
+
mainAxis: r = !0,
|
|
689
|
+
crossAxis: i = !1,
|
|
646
690
|
limiter: c = {
|
|
647
691
|
fn: (w) => {
|
|
648
692
|
let {
|
|
@@ -656,18 +700,18 @@ const Ge = function(t) {
|
|
|
656
700
|
}
|
|
657
701
|
},
|
|
658
702
|
...l
|
|
659
|
-
} =
|
|
703
|
+
} = lt(t, e), a = {
|
|
660
704
|
x: o,
|
|
661
705
|
y: n
|
|
662
|
-
}, h = await
|
|
706
|
+
}, h = await fe(e, l), f = z(X(s)), m = ae(f);
|
|
663
707
|
let u = a[m], d = a[f];
|
|
664
|
-
if (
|
|
708
|
+
if (r) {
|
|
665
709
|
const w = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", x = u + h[w], y = u - h[g];
|
|
666
|
-
u =
|
|
710
|
+
u = St(x, u, y);
|
|
667
711
|
}
|
|
668
|
-
if (
|
|
712
|
+
if (i) {
|
|
669
713
|
const w = f === "y" ? "top" : "left", g = f === "y" ? "bottom" : "right", x = d + h[w], y = d - h[g];
|
|
670
|
-
d =
|
|
714
|
+
d = St(x, d, y);
|
|
671
715
|
}
|
|
672
716
|
const p = c.fn({
|
|
673
717
|
...e,
|
|
@@ -680,53 +724,53 @@ const Ge = function(t) {
|
|
|
680
724
|
x: p.x - o,
|
|
681
725
|
y: p.y - n,
|
|
682
726
|
enabled: {
|
|
683
|
-
[m]:
|
|
684
|
-
[f]:
|
|
727
|
+
[m]: r,
|
|
728
|
+
[f]: i
|
|
685
729
|
}
|
|
686
730
|
}
|
|
687
731
|
};
|
|
688
732
|
}
|
|
689
733
|
};
|
|
690
734
|
};
|
|
691
|
-
function
|
|
735
|
+
function yt() {
|
|
692
736
|
return typeof window < "u";
|
|
693
737
|
}
|
|
694
|
-
function
|
|
695
|
-
return
|
|
738
|
+
function et(t) {
|
|
739
|
+
return he(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
696
740
|
}
|
|
697
|
-
function
|
|
741
|
+
function R(t) {
|
|
698
742
|
var e;
|
|
699
743
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
700
744
|
}
|
|
701
|
-
function
|
|
745
|
+
function M(t) {
|
|
702
746
|
var e;
|
|
703
|
-
return (e = (
|
|
747
|
+
return (e = (he(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
704
748
|
}
|
|
705
|
-
function
|
|
706
|
-
return
|
|
749
|
+
function he(t) {
|
|
750
|
+
return yt() ? t instanceof Node || t instanceof R(t).Node : !1;
|
|
707
751
|
}
|
|
708
752
|
function k(t) {
|
|
709
|
-
return
|
|
753
|
+
return yt() ? t instanceof Element || t instanceof R(t).Element : !1;
|
|
710
754
|
}
|
|
711
755
|
function W(t) {
|
|
712
|
-
return
|
|
756
|
+
return yt() ? t instanceof HTMLElement || t instanceof R(t).HTMLElement : !1;
|
|
713
757
|
}
|
|
714
|
-
function
|
|
715
|
-
return !
|
|
758
|
+
function Ut(t) {
|
|
759
|
+
return !yt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof R(t).ShadowRoot;
|
|
716
760
|
}
|
|
717
|
-
function
|
|
761
|
+
function ut(t) {
|
|
718
762
|
const {
|
|
719
763
|
overflow: e,
|
|
720
764
|
overflowX: o,
|
|
721
765
|
overflowY: n,
|
|
722
766
|
display: s
|
|
723
|
-
} =
|
|
767
|
+
} = D(t);
|
|
724
768
|
return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(s);
|
|
725
769
|
}
|
|
726
|
-
function
|
|
727
|
-
return ["table", "td", "th"].includes(
|
|
770
|
+
function on(t) {
|
|
771
|
+
return ["table", "td", "th"].includes(et(t));
|
|
728
772
|
}
|
|
729
|
-
function
|
|
773
|
+
function xt(t) {
|
|
730
774
|
return [":popover-open", ":modal"].some((e) => {
|
|
731
775
|
try {
|
|
732
776
|
return t.matches(e);
|
|
@@ -735,31 +779,31 @@ function yt(t) {
|
|
|
735
779
|
}
|
|
736
780
|
});
|
|
737
781
|
}
|
|
738
|
-
function
|
|
739
|
-
const e =
|
|
782
|
+
function Ft(t) {
|
|
783
|
+
const e = Mt(), o = k(t) ? D(t) : t;
|
|
740
784
|
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));
|
|
741
785
|
}
|
|
742
|
-
function
|
|
743
|
-
let e =
|
|
744
|
-
for (; W(e) && !
|
|
745
|
-
if (
|
|
786
|
+
function sn(t) {
|
|
787
|
+
let e = K(t);
|
|
788
|
+
for (; W(e) && !tt(e); ) {
|
|
789
|
+
if (Ft(e))
|
|
746
790
|
return e;
|
|
747
|
-
if (
|
|
791
|
+
if (xt(e))
|
|
748
792
|
return null;
|
|
749
|
-
e =
|
|
793
|
+
e = K(e);
|
|
750
794
|
}
|
|
751
795
|
return null;
|
|
752
796
|
}
|
|
753
|
-
function
|
|
797
|
+
function Mt() {
|
|
754
798
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
755
799
|
}
|
|
756
|
-
function
|
|
757
|
-
return ["html", "body", "#document"].includes(
|
|
800
|
+
function tt(t) {
|
|
801
|
+
return ["html", "body", "#document"].includes(et(t));
|
|
758
802
|
}
|
|
759
|
-
function
|
|
760
|
-
return
|
|
803
|
+
function D(t) {
|
|
804
|
+
return R(t).getComputedStyle(t);
|
|
761
805
|
}
|
|
762
|
-
function
|
|
806
|
+
function vt(t) {
|
|
763
807
|
return k(t) ? {
|
|
764
808
|
scrollLeft: t.scrollLeft,
|
|
765
809
|
scrollTop: t.scrollTop
|
|
@@ -768,131 +812,131 @@ function xt(t) {
|
|
|
768
812
|
scrollTop: t.scrollY
|
|
769
813
|
};
|
|
770
814
|
}
|
|
771
|
-
function
|
|
772
|
-
if (
|
|
815
|
+
function K(t) {
|
|
816
|
+
if (et(t) === "html")
|
|
773
817
|
return t;
|
|
774
818
|
const e = (
|
|
775
819
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
776
820
|
t.assignedSlot || // DOM Element detected.
|
|
777
821
|
t.parentNode || // ShadowRoot detected.
|
|
778
|
-
|
|
779
|
-
|
|
822
|
+
Ut(t) && t.host || // Fallback.
|
|
823
|
+
M(t)
|
|
780
824
|
);
|
|
781
|
-
return
|
|
825
|
+
return Ut(e) ? e.host : e;
|
|
782
826
|
}
|
|
783
|
-
function
|
|
784
|
-
const e =
|
|
785
|
-
return
|
|
827
|
+
function de(t) {
|
|
828
|
+
const e = K(t);
|
|
829
|
+
return tt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : W(e) && ut(e) ? e : de(e);
|
|
786
830
|
}
|
|
787
|
-
function
|
|
831
|
+
function rt(t, e, o) {
|
|
788
832
|
var n;
|
|
789
833
|
e === void 0 && (e = []), o === void 0 && (o = !0);
|
|
790
|
-
const s =
|
|
791
|
-
if (
|
|
792
|
-
const c =
|
|
793
|
-
return e.concat(
|
|
834
|
+
const s = de(t), r = s === ((n = t.ownerDocument) == null ? void 0 : n.body), i = R(s);
|
|
835
|
+
if (r) {
|
|
836
|
+
const c = Pt(i);
|
|
837
|
+
return e.concat(i, i.visualViewport || [], ut(s) ? s : [], c && o ? rt(c) : []);
|
|
794
838
|
}
|
|
795
|
-
return e.concat(s,
|
|
839
|
+
return e.concat(s, rt(s, [], o));
|
|
796
840
|
}
|
|
797
|
-
function
|
|
841
|
+
function Pt(t) {
|
|
798
842
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
799
843
|
}
|
|
800
|
-
function
|
|
801
|
-
const e =
|
|
844
|
+
function me(t) {
|
|
845
|
+
const e = D(t);
|
|
802
846
|
let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
|
|
803
|
-
const s = W(t),
|
|
804
|
-
return c && (o =
|
|
847
|
+
const s = W(t), r = s ? t.offsetWidth : o, i = s ? t.offsetHeight : n, c = mt(o) !== r || mt(n) !== i;
|
|
848
|
+
return c && (o = r, n = i), {
|
|
805
849
|
width: o,
|
|
806
850
|
height: n,
|
|
807
851
|
$: c
|
|
808
852
|
};
|
|
809
853
|
}
|
|
810
|
-
function
|
|
854
|
+
function Vt(t) {
|
|
811
855
|
return k(t) ? t : t.contextElement;
|
|
812
856
|
}
|
|
813
|
-
function
|
|
814
|
-
const e =
|
|
857
|
+
function Q(t) {
|
|
858
|
+
const e = Vt(t);
|
|
815
859
|
if (!W(e))
|
|
816
|
-
return
|
|
860
|
+
return C(1);
|
|
817
861
|
const o = e.getBoundingClientRect(), {
|
|
818
862
|
width: n,
|
|
819
863
|
height: s,
|
|
820
|
-
$:
|
|
821
|
-
} =
|
|
822
|
-
let
|
|
823
|
-
return (!
|
|
824
|
-
x:
|
|
864
|
+
$: r
|
|
865
|
+
} = me(e);
|
|
866
|
+
let i = (r ? mt(o.width) : o.width) / n, c = (r ? mt(o.height) : o.height) / s;
|
|
867
|
+
return (!i || !Number.isFinite(i)) && (i = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
868
|
+
x: i,
|
|
825
869
|
y: c
|
|
826
870
|
};
|
|
827
871
|
}
|
|
828
|
-
const
|
|
829
|
-
function
|
|
830
|
-
const e =
|
|
831
|
-
return !
|
|
872
|
+
const rn = /* @__PURE__ */ C(0);
|
|
873
|
+
function ge(t) {
|
|
874
|
+
const e = R(t);
|
|
875
|
+
return !Mt() || !e.visualViewport ? rn : {
|
|
832
876
|
x: e.visualViewport.offsetLeft,
|
|
833
877
|
y: e.visualViewport.offsetTop
|
|
834
878
|
};
|
|
835
879
|
}
|
|
836
|
-
function
|
|
837
|
-
return e === void 0 && (e = !1), !o || e && o !==
|
|
880
|
+
function cn(t, e, o) {
|
|
881
|
+
return e === void 0 && (e = !1), !o || e && o !== R(t) ? !1 : e;
|
|
838
882
|
}
|
|
839
883
|
function J(t, e, o, n) {
|
|
840
884
|
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
841
|
-
const s = t.getBoundingClientRect(),
|
|
842
|
-
let
|
|
843
|
-
e && (n ? k(n) && (
|
|
844
|
-
const c =
|
|
845
|
-
let l = (s.left + c.x) /
|
|
846
|
-
if (
|
|
847
|
-
const m =
|
|
848
|
-
let d = m, p =
|
|
885
|
+
const s = t.getBoundingClientRect(), r = Vt(t);
|
|
886
|
+
let i = C(1);
|
|
887
|
+
e && (n ? k(n) && (i = Q(n)) : i = Q(t));
|
|
888
|
+
const c = cn(r, o, n) ? ge(r) : C(0);
|
|
889
|
+
let l = (s.left + c.x) / i.x, a = (s.top + c.y) / i.y, h = s.width / i.x, f = s.height / i.y;
|
|
890
|
+
if (r) {
|
|
891
|
+
const m = R(r), u = n && k(n) ? R(n) : n;
|
|
892
|
+
let d = m, p = Pt(d);
|
|
849
893
|
for (; p && n && u !== d; ) {
|
|
850
|
-
const w =
|
|
851
|
-
l *= w.x, a *= w.y, h *= w.x, f *= w.y, l += y, a += b, d =
|
|
894
|
+
const w = Q(p), g = p.getBoundingClientRect(), x = D(p), y = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * w.x, b = g.top + (p.clientTop + parseFloat(x.paddingTop)) * w.y;
|
|
895
|
+
l *= w.x, a *= w.y, h *= w.x, f *= w.y, l += y, a += b, d = R(p), p = Pt(d);
|
|
852
896
|
}
|
|
853
897
|
}
|
|
854
|
-
return
|
|
898
|
+
return pt({
|
|
855
899
|
width: h,
|
|
856
900
|
height: f,
|
|
857
901
|
x: l,
|
|
858
902
|
y: a
|
|
859
903
|
});
|
|
860
904
|
}
|
|
861
|
-
function
|
|
862
|
-
const o =
|
|
863
|
-
return e ? e.left + o : J(
|
|
905
|
+
function Nt(t, e) {
|
|
906
|
+
const o = vt(t).scrollLeft;
|
|
907
|
+
return e ? e.left + o : J(M(t)).left + o;
|
|
864
908
|
}
|
|
865
|
-
function
|
|
909
|
+
function pe(t, e, o) {
|
|
866
910
|
o === void 0 && (o = !1);
|
|
867
911
|
const n = t.getBoundingClientRect(), s = n.left + e.scrollLeft - (o ? 0 : (
|
|
868
912
|
// RTL <body> scrollbar.
|
|
869
|
-
|
|
870
|
-
)),
|
|
913
|
+
Nt(t, n)
|
|
914
|
+
)), r = n.top + e.scrollTop;
|
|
871
915
|
return {
|
|
872
916
|
x: s,
|
|
873
|
-
y:
|
|
917
|
+
y: r
|
|
874
918
|
};
|
|
875
919
|
}
|
|
876
|
-
function
|
|
920
|
+
function ln(t) {
|
|
877
921
|
let {
|
|
878
922
|
elements: e,
|
|
879
923
|
rect: o,
|
|
880
924
|
offsetParent: n,
|
|
881
925
|
strategy: s
|
|
882
926
|
} = t;
|
|
883
|
-
const
|
|
884
|
-
if (n ===
|
|
927
|
+
const r = s === "fixed", i = M(n), c = e ? xt(e.floating) : !1;
|
|
928
|
+
if (n === i || c && r)
|
|
885
929
|
return o;
|
|
886
930
|
let l = {
|
|
887
931
|
scrollLeft: 0,
|
|
888
932
|
scrollTop: 0
|
|
889
|
-
}, a =
|
|
890
|
-
const h =
|
|
891
|
-
if ((f || !f && !
|
|
933
|
+
}, a = C(1);
|
|
934
|
+
const h = C(0), f = W(n);
|
|
935
|
+
if ((f || !f && !r) && ((et(n) !== "body" || ut(i)) && (l = vt(n)), W(n))) {
|
|
892
936
|
const u = J(n);
|
|
893
|
-
a =
|
|
937
|
+
a = Q(n), h.x = u.x + n.clientLeft, h.y = u.y + n.clientTop;
|
|
894
938
|
}
|
|
895
|
-
const m =
|
|
939
|
+
const m = i && !f && !r ? pe(i, l, !0) : C(0);
|
|
896
940
|
return {
|
|
897
941
|
width: o.width * a.x,
|
|
898
942
|
height: o.height * a.y,
|
|
@@ -900,54 +944,54 @@ function on(t) {
|
|
|
900
944
|
y: o.y * a.y - l.scrollTop * a.y + h.y + m.y
|
|
901
945
|
};
|
|
902
946
|
}
|
|
903
|
-
function
|
|
947
|
+
function an(t) {
|
|
904
948
|
return Array.from(t.getClientRects());
|
|
905
949
|
}
|
|
906
|
-
function
|
|
907
|
-
const e =
|
|
908
|
-
let
|
|
950
|
+
function un(t) {
|
|
951
|
+
const e = M(t), o = vt(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);
|
|
952
|
+
let i = -o.scrollLeft + Nt(t);
|
|
909
953
|
const c = -o.scrollTop;
|
|
910
|
-
return
|
|
954
|
+
return D(n).direction === "rtl" && (i += q(e.clientWidth, n.clientWidth) - s), {
|
|
911
955
|
width: s,
|
|
912
|
-
height:
|
|
913
|
-
x:
|
|
956
|
+
height: r,
|
|
957
|
+
x: i,
|
|
914
958
|
y: c
|
|
915
959
|
};
|
|
916
960
|
}
|
|
917
|
-
function
|
|
918
|
-
const o =
|
|
919
|
-
let
|
|
961
|
+
function fn(t, e) {
|
|
962
|
+
const o = R(t), n = M(t), s = o.visualViewport;
|
|
963
|
+
let r = n.clientWidth, i = n.clientHeight, c = 0, l = 0;
|
|
920
964
|
if (s) {
|
|
921
|
-
|
|
922
|
-
const a =
|
|
965
|
+
r = s.width, i = s.height;
|
|
966
|
+
const a = Mt();
|
|
923
967
|
(!a || a && e === "fixed") && (c = s.offsetLeft, l = s.offsetTop);
|
|
924
968
|
}
|
|
925
969
|
return {
|
|
926
|
-
width:
|
|
927
|
-
height:
|
|
970
|
+
width: r,
|
|
971
|
+
height: i,
|
|
928
972
|
x: c,
|
|
929
973
|
y: l
|
|
930
974
|
};
|
|
931
975
|
}
|
|
932
|
-
function
|
|
933
|
-
const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop, s = o.left + t.clientLeft,
|
|
976
|
+
function hn(t, e) {
|
|
977
|
+
const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop, s = o.left + t.clientLeft, r = W(t) ? Q(t) : C(1), i = t.clientWidth * r.x, c = t.clientHeight * r.y, l = s * r.x, a = n * r.y;
|
|
934
978
|
return {
|
|
935
|
-
width:
|
|
979
|
+
width: i,
|
|
936
980
|
height: c,
|
|
937
981
|
x: l,
|
|
938
982
|
y: a
|
|
939
983
|
};
|
|
940
984
|
}
|
|
941
|
-
function
|
|
985
|
+
function zt(t, e, o) {
|
|
942
986
|
let n;
|
|
943
987
|
if (e === "viewport")
|
|
944
|
-
n =
|
|
988
|
+
n = fn(t, o);
|
|
945
989
|
else if (e === "document")
|
|
946
|
-
n =
|
|
990
|
+
n = un(M(t));
|
|
947
991
|
else if (k(e))
|
|
948
|
-
n =
|
|
992
|
+
n = hn(e, o);
|
|
949
993
|
else {
|
|
950
|
-
const s =
|
|
994
|
+
const s = ge(t);
|
|
951
995
|
n = {
|
|
952
996
|
x: e.x - s.x,
|
|
953
997
|
y: e.y - s.y,
|
|
@@ -955,36 +999,36 @@ function Bt(t, e, o) {
|
|
|
955
999
|
height: e.height
|
|
956
1000
|
};
|
|
957
1001
|
}
|
|
958
|
-
return
|
|
1002
|
+
return pt(n);
|
|
959
1003
|
}
|
|
960
|
-
function
|
|
961
|
-
const o =
|
|
962
|
-
return o === e || !k(o) ||
|
|
1004
|
+
function we(t, e) {
|
|
1005
|
+
const o = K(t);
|
|
1006
|
+
return o === e || !k(o) || tt(o) ? !1 : D(o).position === "fixed" || we(o, e);
|
|
963
1007
|
}
|
|
964
|
-
function
|
|
1008
|
+
function dn(t, e) {
|
|
965
1009
|
const o = e.get(t);
|
|
966
1010
|
if (o)
|
|
967
1011
|
return o;
|
|
968
|
-
let n =
|
|
969
|
-
const
|
|
970
|
-
let
|
|
971
|
-
for (; k(
|
|
972
|
-
const c =
|
|
973
|
-
!l && c.position === "fixed" && (s = null), (
|
|
1012
|
+
let n = rt(t, [], !1).filter((c) => k(c) && et(c) !== "body"), s = null;
|
|
1013
|
+
const r = D(t).position === "fixed";
|
|
1014
|
+
let i = r ? K(t) : t;
|
|
1015
|
+
for (; k(i) && !tt(i); ) {
|
|
1016
|
+
const c = D(i), l = Ft(i);
|
|
1017
|
+
!l && c.position === "fixed" && (s = null), (r ? !l && !s : !l && c.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ut(i) && !l && we(t, i)) ? n = n.filter((h) => h !== i) : s = c, i = K(i);
|
|
974
1018
|
}
|
|
975
1019
|
return e.set(t, n), n;
|
|
976
1020
|
}
|
|
977
|
-
function
|
|
1021
|
+
function mn(t) {
|
|
978
1022
|
let {
|
|
979
1023
|
element: e,
|
|
980
1024
|
boundary: o,
|
|
981
1025
|
rootBoundary: n,
|
|
982
1026
|
strategy: s
|
|
983
1027
|
} = t;
|
|
984
|
-
const
|
|
985
|
-
const f =
|
|
986
|
-
return a.top =
|
|
987
|
-
},
|
|
1028
|
+
const i = [...o === "clippingAncestors" ? xt(e) ? [] : dn(e, this._c) : [].concat(o), n], c = i[0], l = i.reduce((a, h) => {
|
|
1029
|
+
const f = zt(e, h, s);
|
|
1030
|
+
return a.top = q(f.top, a.top), a.right = Z(f.right, a.right), a.bottom = Z(f.bottom, a.bottom), a.left = q(f.left, a.left), a;
|
|
1031
|
+
}, zt(e, c, s));
|
|
988
1032
|
return {
|
|
989
1033
|
width: l.right - l.left,
|
|
990
1034
|
height: l.bottom - l.top,
|
|
@@ -992,73 +1036,73 @@ function un(t) {
|
|
|
992
1036
|
y: l.top
|
|
993
1037
|
};
|
|
994
1038
|
}
|
|
995
|
-
function
|
|
1039
|
+
function gn(t) {
|
|
996
1040
|
const {
|
|
997
1041
|
width: e,
|
|
998
1042
|
height: o
|
|
999
|
-
} =
|
|
1043
|
+
} = me(t);
|
|
1000
1044
|
return {
|
|
1001
1045
|
width: e,
|
|
1002
1046
|
height: o
|
|
1003
1047
|
};
|
|
1004
1048
|
}
|
|
1005
|
-
function
|
|
1006
|
-
const n = W(e), s =
|
|
1049
|
+
function pn(t, e, o) {
|
|
1050
|
+
const n = W(e), s = M(e), r = o === "fixed", i = J(t, !0, r, e);
|
|
1007
1051
|
let c = {
|
|
1008
1052
|
scrollLeft: 0,
|
|
1009
1053
|
scrollTop: 0
|
|
1010
1054
|
};
|
|
1011
|
-
const l =
|
|
1055
|
+
const l = C(0);
|
|
1012
1056
|
function a() {
|
|
1013
|
-
l.x =
|
|
1057
|
+
l.x = Nt(s);
|
|
1014
1058
|
}
|
|
1015
|
-
if (n || !n && !
|
|
1016
|
-
if ((
|
|
1017
|
-
const u = J(e, !0,
|
|
1059
|
+
if (n || !n && !r)
|
|
1060
|
+
if ((et(e) !== "body" || ut(s)) && (c = vt(e)), n) {
|
|
1061
|
+
const u = J(e, !0, r, e);
|
|
1018
1062
|
l.x = u.x + e.clientLeft, l.y = u.y + e.clientTop;
|
|
1019
1063
|
} else s && a();
|
|
1020
|
-
|
|
1021
|
-
const h = s && !n && !
|
|
1064
|
+
r && !n && s && a();
|
|
1065
|
+
const h = s && !n && !r ? pe(s, c) : C(0), f = i.left + c.scrollLeft - l.x - h.x, m = i.top + c.scrollTop - l.y - h.y;
|
|
1022
1066
|
return {
|
|
1023
1067
|
x: f,
|
|
1024
1068
|
y: m,
|
|
1025
|
-
width:
|
|
1026
|
-
height:
|
|
1069
|
+
width: i.width,
|
|
1070
|
+
height: i.height
|
|
1027
1071
|
};
|
|
1028
1072
|
}
|
|
1029
|
-
function
|
|
1030
|
-
return
|
|
1073
|
+
function Ot(t) {
|
|
1074
|
+
return D(t).position === "static";
|
|
1031
1075
|
}
|
|
1032
|
-
function
|
|
1033
|
-
if (!W(t) ||
|
|
1076
|
+
function Kt(t, e) {
|
|
1077
|
+
if (!W(t) || D(t).position === "fixed")
|
|
1034
1078
|
return null;
|
|
1035
1079
|
if (e)
|
|
1036
1080
|
return e(t);
|
|
1037
1081
|
let o = t.offsetParent;
|
|
1038
|
-
return
|
|
1082
|
+
return M(t) === o && (o = o.ownerDocument.body), o;
|
|
1039
1083
|
}
|
|
1040
|
-
function
|
|
1041
|
-
const o =
|
|
1042
|
-
if (
|
|
1084
|
+
function ye(t, e) {
|
|
1085
|
+
const o = R(t);
|
|
1086
|
+
if (xt(t))
|
|
1043
1087
|
return o;
|
|
1044
1088
|
if (!W(t)) {
|
|
1045
|
-
let s =
|
|
1046
|
-
for (; s && !
|
|
1047
|
-
if (k(s) && !
|
|
1089
|
+
let s = K(t);
|
|
1090
|
+
for (; s && !tt(s); ) {
|
|
1091
|
+
if (k(s) && !Ot(s))
|
|
1048
1092
|
return s;
|
|
1049
|
-
s =
|
|
1093
|
+
s = K(s);
|
|
1050
1094
|
}
|
|
1051
1095
|
return o;
|
|
1052
1096
|
}
|
|
1053
|
-
let n =
|
|
1054
|
-
for (; n &&
|
|
1055
|
-
n =
|
|
1056
|
-
return n &&
|
|
1097
|
+
let n = Kt(t, e);
|
|
1098
|
+
for (; n && on(n) && Ot(n); )
|
|
1099
|
+
n = Kt(n, e);
|
|
1100
|
+
return n && tt(n) && Ot(n) && !Ft(n) ? o : n || sn(t) || o;
|
|
1057
1101
|
}
|
|
1058
|
-
const
|
|
1059
|
-
const e = this.getOffsetParent ||
|
|
1102
|
+
const wn = async function(t) {
|
|
1103
|
+
const e = this.getOffsetParent || ye, o = this.getDimensions, n = await o(t.floating);
|
|
1060
1104
|
return {
|
|
1061
|
-
reference:
|
|
1105
|
+
reference: pn(t.reference, await e(t.floating), t.strategy),
|
|
1062
1106
|
floating: {
|
|
1063
1107
|
x: 0,
|
|
1064
1108
|
y: 0,
|
|
@@ -1067,33 +1111,33 @@ const dn = async function(t) {
|
|
|
1067
1111
|
}
|
|
1068
1112
|
};
|
|
1069
1113
|
};
|
|
1070
|
-
function
|
|
1071
|
-
return
|
|
1072
|
-
}
|
|
1073
|
-
const
|
|
1074
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1075
|
-
getDocumentElement:
|
|
1076
|
-
getClippingRect:
|
|
1077
|
-
getOffsetParent:
|
|
1078
|
-
getElementRects:
|
|
1079
|
-
getClientRects:
|
|
1080
|
-
getDimensions:
|
|
1081
|
-
getScale:
|
|
1114
|
+
function yn(t) {
|
|
1115
|
+
return D(t).direction === "rtl";
|
|
1116
|
+
}
|
|
1117
|
+
const xn = {
|
|
1118
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: ln,
|
|
1119
|
+
getDocumentElement: M,
|
|
1120
|
+
getClippingRect: mn,
|
|
1121
|
+
getOffsetParent: ye,
|
|
1122
|
+
getElementRects: wn,
|
|
1123
|
+
getClientRects: an,
|
|
1124
|
+
getDimensions: gn,
|
|
1125
|
+
getScale: Q,
|
|
1082
1126
|
isElement: k,
|
|
1083
|
-
isRTL:
|
|
1127
|
+
isRTL: yn
|
|
1084
1128
|
};
|
|
1085
|
-
function
|
|
1129
|
+
function xe(t, e) {
|
|
1086
1130
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1087
1131
|
}
|
|
1088
|
-
function
|
|
1132
|
+
function vn(t, e) {
|
|
1089
1133
|
let o = null, n;
|
|
1090
|
-
const s =
|
|
1091
|
-
function
|
|
1134
|
+
const s = M(t);
|
|
1135
|
+
function r() {
|
|
1092
1136
|
var c;
|
|
1093
1137
|
clearTimeout(n), (c = o) == null || c.disconnect(), o = null;
|
|
1094
1138
|
}
|
|
1095
|
-
function
|
|
1096
|
-
c === void 0 && (c = !1), l === void 0 && (l = 1),
|
|
1139
|
+
function i(c, l) {
|
|
1140
|
+
c === void 0 && (c = !1), l === void 0 && (l = 1), r();
|
|
1097
1141
|
const a = t.getBoundingClientRect(), {
|
|
1098
1142
|
left: h,
|
|
1099
1143
|
top: f,
|
|
@@ -1102,21 +1146,21 @@ function pn(t, e) {
|
|
|
1102
1146
|
} = a;
|
|
1103
1147
|
if (c || e(), !m || !u)
|
|
1104
1148
|
return;
|
|
1105
|
-
const d =
|
|
1149
|
+
const d = ht(f), p = ht(s.clientWidth - (h + m)), w = ht(s.clientHeight - (f + u)), g = ht(h), y = {
|
|
1106
1150
|
rootMargin: -d + "px " + -p + "px " + -w + "px " + -g + "px",
|
|
1107
|
-
threshold:
|
|
1151
|
+
threshold: q(0, Z(1, l)) || 1
|
|
1108
1152
|
};
|
|
1109
1153
|
let b = !0;
|
|
1110
1154
|
function v(L) {
|
|
1111
1155
|
const A = L[0].intersectionRatio;
|
|
1112
1156
|
if (A !== l) {
|
|
1113
1157
|
if (!b)
|
|
1114
|
-
return
|
|
1115
|
-
A ?
|
|
1116
|
-
|
|
1158
|
+
return i();
|
|
1159
|
+
A ? i(!1, A) : n = setTimeout(() => {
|
|
1160
|
+
i(!1, 1e-7);
|
|
1117
1161
|
}, 1e3);
|
|
1118
1162
|
}
|
|
1119
|
-
A === 1 && !
|
|
1163
|
+
A === 1 && !xe(a, t.getBoundingClientRect()) && i(), b = !1;
|
|
1120
1164
|
}
|
|
1121
1165
|
try {
|
|
1122
1166
|
o = new IntersectionObserver(v, {
|
|
@@ -1129,25 +1173,25 @@ function pn(t, e) {
|
|
|
1129
1173
|
}
|
|
1130
1174
|
o.observe(t);
|
|
1131
1175
|
}
|
|
1132
|
-
return
|
|
1176
|
+
return i(!0), r;
|
|
1133
1177
|
}
|
|
1134
|
-
function
|
|
1178
|
+
function bn(t, e, o, n) {
|
|
1135
1179
|
n === void 0 && (n = {});
|
|
1136
1180
|
const {
|
|
1137
1181
|
ancestorScroll: s = !0,
|
|
1138
|
-
ancestorResize:
|
|
1139
|
-
elementResize:
|
|
1182
|
+
ancestorResize: r = !0,
|
|
1183
|
+
elementResize: i = typeof ResizeObserver == "function",
|
|
1140
1184
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1141
1185
|
animationFrame: l = !1
|
|
1142
|
-
} = n, a =
|
|
1186
|
+
} = n, a = Vt(t), h = s || r ? [...a ? rt(a) : [], ...rt(e)] : [];
|
|
1143
1187
|
h.forEach((g) => {
|
|
1144
1188
|
s && g.addEventListener("scroll", o, {
|
|
1145
1189
|
passive: !0
|
|
1146
|
-
}),
|
|
1190
|
+
}), r && g.addEventListener("resize", o);
|
|
1147
1191
|
});
|
|
1148
|
-
const f = a && c ?
|
|
1192
|
+
const f = a && c ? vn(a, o) : null;
|
|
1149
1193
|
let m = -1, u = null;
|
|
1150
|
-
|
|
1194
|
+
i && (u = new ResizeObserver((g) => {
|
|
1151
1195
|
let [x] = g;
|
|
1152
1196
|
x && x.target === a && u && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1153
1197
|
var y;
|
|
@@ -1158,28 +1202,28 @@ function wn(t, e, o, n) {
|
|
|
1158
1202
|
l && w();
|
|
1159
1203
|
function w() {
|
|
1160
1204
|
const g = J(t);
|
|
1161
|
-
p && !
|
|
1205
|
+
p && !xe(p, g) && o(), p = g, d = requestAnimationFrame(w);
|
|
1162
1206
|
}
|
|
1163
1207
|
return o(), () => {
|
|
1164
1208
|
var g;
|
|
1165
1209
|
h.forEach((x) => {
|
|
1166
|
-
s && x.removeEventListener("scroll", o),
|
|
1210
|
+
s && x.removeEventListener("scroll", o), r && x.removeEventListener("resize", o);
|
|
1167
1211
|
}), f == null || f(), (g = u) == null || g.disconnect(), u = null, l && cancelAnimationFrame(d);
|
|
1168
1212
|
};
|
|
1169
1213
|
}
|
|
1170
|
-
const
|
|
1214
|
+
const An = en, On = nn, _t = Ze, Rn = Qe, En = (t, e, o) => {
|
|
1171
1215
|
const n = /* @__PURE__ */ new Map(), s = {
|
|
1172
|
-
platform:
|
|
1216
|
+
platform: xn,
|
|
1173
1217
|
...o
|
|
1174
|
-
},
|
|
1218
|
+
}, r = {
|
|
1175
1219
|
...s.platform,
|
|
1176
1220
|
_c: n
|
|
1177
1221
|
};
|
|
1178
|
-
return
|
|
1222
|
+
return Ge(t, e, {
|
|
1179
1223
|
...s,
|
|
1180
|
-
platform:
|
|
1224
|
+
platform: r
|
|
1181
1225
|
});
|
|
1182
|
-
},
|
|
1226
|
+
}, Qn = [
|
|
1183
1227
|
"top",
|
|
1184
1228
|
"top-start",
|
|
1185
1229
|
"top-end",
|
|
@@ -1192,22 +1236,25 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
|
|
|
1192
1236
|
"left",
|
|
1193
1237
|
"left-start",
|
|
1194
1238
|
"left-end"
|
|
1195
|
-
],
|
|
1239
|
+
], Zn = (t, e = { isOpen: !1 }) => {
|
|
1196
1240
|
const o = [];
|
|
1197
1241
|
let n = null;
|
|
1198
|
-
const s = E.deriveProp(e.isOpen)
|
|
1242
|
+
const s = E.deriveProp(e.isOpen);
|
|
1243
|
+
function r(c) {
|
|
1199
1244
|
n = c, s.set(!0);
|
|
1200
|
-
}
|
|
1245
|
+
}
|
|
1246
|
+
function i() {
|
|
1201
1247
|
s.set(!1), o.forEach((c) => c()), o.length = 0;
|
|
1202
|
-
}
|
|
1203
|
-
return
|
|
1204
|
-
|
|
1248
|
+
}
|
|
1249
|
+
return st(
|
|
1250
|
+
t(r, i),
|
|
1251
|
+
ne(
|
|
1205
1252
|
s,
|
|
1206
|
-
() =>
|
|
1207
|
-
(c) =>
|
|
1253
|
+
() => $(
|
|
1254
|
+
(c) => ee(
|
|
1208
1255
|
"body",
|
|
1209
1256
|
Rt.div(
|
|
1210
|
-
|
|
1257
|
+
$((l) => {
|
|
1211
1258
|
l.style.position = "absolute";
|
|
1212
1259
|
const a = typeof (n == null ? void 0 : n.target) == "string" ? c.querySelector(
|
|
1213
1260
|
n.target
|
|
@@ -1215,7 +1262,10 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
|
|
|
1215
1262
|
if (a == null)
|
|
1216
1263
|
throw new Error(`Target not found: ${n == null ? void 0 : n.target}`);
|
|
1217
1264
|
let h = null;
|
|
1218
|
-
const f = E.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), m = E.toSignal((n == null ? void 0 : n.crossAxisOffset) ?? 0), u = E.toSignal(
|
|
1265
|
+
const f = E.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), m = E.toSignal((n == null ? void 0 : n.crossAxisOffset) ?? 0), u = E.toSignal(
|
|
1266
|
+
/* c8 ignore next 3 */
|
|
1267
|
+
(n == null ? void 0 : n.placement) ?? "top"
|
|
1268
|
+
), d = E.toSignal((n == null ? void 0 : n.arrowPadding) ?? 0), p = n == null ? void 0 : n.arrow, w = H({
|
|
1219
1269
|
centerOffset: 0,
|
|
1220
1270
|
alignmentOffset: 0,
|
|
1221
1271
|
containerWidth: 0,
|
|
@@ -1225,21 +1275,21 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
|
|
|
1225
1275
|
});
|
|
1226
1276
|
async function g() {
|
|
1227
1277
|
const y = [
|
|
1228
|
-
|
|
1229
|
-
|
|
1278
|
+
_t(),
|
|
1279
|
+
An({
|
|
1230
1280
|
mainAxis: f.get(),
|
|
1231
1281
|
crossAxis: m.get()
|
|
1232
1282
|
}),
|
|
1233
|
-
|
|
1234
|
-
|
|
1283
|
+
On(),
|
|
1284
|
+
_t()
|
|
1235
1285
|
];
|
|
1236
1286
|
p != null && h != null && y.push(
|
|
1237
|
-
|
|
1287
|
+
Rn({
|
|
1238
1288
|
element: h,
|
|
1239
1289
|
padding: d.get()
|
|
1240
1290
|
})
|
|
1241
1291
|
);
|
|
1242
|
-
const b = await
|
|
1292
|
+
const b = await En(a, l, {
|
|
1243
1293
|
placement: u.get(),
|
|
1244
1294
|
strategy: "absolute",
|
|
1245
1295
|
middleware: y
|
|
@@ -1247,13 +1297,13 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
|
|
|
1247
1297
|
if (l.style.top = `${L}px`, l.style.left = `${v}px`, h != null && A.arrow != null) {
|
|
1248
1298
|
const {
|
|
1249
1299
|
x: _,
|
|
1250
|
-
y:
|
|
1300
|
+
y: V,
|
|
1251
1301
|
centerOffset: S,
|
|
1252
1302
|
alignmentOffset: I
|
|
1253
1303
|
} = A.arrow;
|
|
1254
1304
|
w.set({
|
|
1255
1305
|
x: _,
|
|
1256
|
-
y:
|
|
1306
|
+
y: V,
|
|
1257
1307
|
centerOffset: S,
|
|
1258
1308
|
alignmentOffset: I,
|
|
1259
1309
|
containerWidth: l.offsetWidth,
|
|
@@ -1261,16 +1311,16 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
|
|
|
1261
1311
|
});
|
|
1262
1312
|
}
|
|
1263
1313
|
}
|
|
1264
|
-
const x =
|
|
1314
|
+
const x = Oe(
|
|
1265
1315
|
f,
|
|
1266
1316
|
m,
|
|
1267
1317
|
u
|
|
1268
1318
|
)(g);
|
|
1269
|
-
return
|
|
1319
|
+
return st(
|
|
1270
1320
|
n == null ? void 0 : n.content,
|
|
1271
1321
|
(n == null ? void 0 : n.arrow) != null ? Rt.div(
|
|
1272
1322
|
n == null ? void 0 : n.arrow(
|
|
1273
|
-
|
|
1323
|
+
oe(
|
|
1274
1324
|
w,
|
|
1275
1325
|
u
|
|
1276
1326
|
)((y, b) => ({
|
|
@@ -1278,13 +1328,13 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
|
|
|
1278
1328
|
placement: b
|
|
1279
1329
|
}))
|
|
1280
1330
|
),
|
|
1281
|
-
|
|
1331
|
+
$((y) => {
|
|
1282
1332
|
h = y, g();
|
|
1283
1333
|
})
|
|
1284
1334
|
) : null,
|
|
1285
|
-
|
|
1335
|
+
F(
|
|
1286
1336
|
w.dispose,
|
|
1287
|
-
|
|
1337
|
+
bn(a, l, g),
|
|
1288
1338
|
x
|
|
1289
1339
|
)
|
|
1290
1340
|
);
|
|
@@ -1292,25 +1342,24 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
|
|
|
1292
1342
|
)
|
|
1293
1343
|
)
|
|
1294
1344
|
)
|
|
1295
|
-
)
|
|
1296
|
-
t(i, r)
|
|
1345
|
+
)
|
|
1297
1346
|
);
|
|
1298
|
-
},
|
|
1299
|
-
const n =
|
|
1300
|
-
(f) =>
|
|
1301
|
-
),
|
|
1302
|
-
(f) =>
|
|
1303
|
-
),
|
|
1347
|
+
}, Ln = (t, e, o) => {
|
|
1348
|
+
const n = H(U.notAsked), s = n.map(
|
|
1349
|
+
(f) => U.isSuccess(f) ? f.value : void 0
|
|
1350
|
+
), r = n.map(
|
|
1351
|
+
(f) => U.isFailure(f) ? f.error : void 0
|
|
1352
|
+
), i = n.map((f) => U.isLoading(f));
|
|
1304
1353
|
let c;
|
|
1305
1354
|
const l = async (f) => {
|
|
1306
1355
|
c == null || c.abort(), c = new AbortController();
|
|
1307
1356
|
const m = c.signal, u = n.get();
|
|
1308
|
-
n.set(
|
|
1357
|
+
n.set(U.loading(U.getOrUndefined(u)));
|
|
1309
1358
|
try {
|
|
1310
1359
|
const d = await e({ request: f, abortSignal: m, previous: u });
|
|
1311
|
-
await Promise.resolve(), c = void 0, n.set(
|
|
1360
|
+
await Promise.resolve(), c = void 0, n.set(U.success(d));
|
|
1312
1361
|
} catch (d) {
|
|
1313
|
-
c = void 0, n.set(
|
|
1362
|
+
c = void 0, n.set(U.failure(o(d)));
|
|
1314
1363
|
}
|
|
1315
1364
|
}, a = () => l(E.get(t)), h = () => {
|
|
1316
1365
|
c == null || c.abort(), c = void 0, n.dispose();
|
|
@@ -1318,44 +1367,44 @@ const yn = Ge, xn = Qe, zt = Ke, vn = Xe, bn = (t, e, o) => {
|
|
|
1318
1367
|
return n.onDispose(E.on(t, l)), {
|
|
1319
1368
|
status: n,
|
|
1320
1369
|
value: s,
|
|
1321
|
-
error:
|
|
1322
|
-
loading:
|
|
1370
|
+
error: r,
|
|
1371
|
+
loading: i,
|
|
1323
1372
|
reload: a,
|
|
1324
1373
|
dispose: h
|
|
1325
1374
|
};
|
|
1326
|
-
},
|
|
1327
|
-
const { status: o, dispose: n, reload: s } = t, { loading:
|
|
1328
|
-
return
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
loading:
|
|
1332
|
-
failure:
|
|
1375
|
+
}, Sn = (t, e) => {
|
|
1376
|
+
const { status: o, dispose: n, reload: s } = t, { loading: r, failure: i, success: c } = e;
|
|
1377
|
+
return st(
|
|
1378
|
+
F(n),
|
|
1379
|
+
ce(o, {
|
|
1380
|
+
loading: r != null ? (l) => r(l, s) : void 0,
|
|
1381
|
+
failure: i != null ? (l) => i(l, s) : void 0,
|
|
1333
1382
|
success: (l) => c(l, s)
|
|
1334
1383
|
})
|
|
1335
1384
|
);
|
|
1336
|
-
},
|
|
1385
|
+
}, to = ({
|
|
1337
1386
|
request: t,
|
|
1338
1387
|
load: e,
|
|
1339
1388
|
mapError: o = (n) => n
|
|
1340
1389
|
}) => {
|
|
1341
|
-
const n =
|
|
1342
|
-
return (s) =>
|
|
1343
|
-
},
|
|
1390
|
+
const n = Ln(t, e, o);
|
|
1391
|
+
return (s) => Sn(n, s);
|
|
1392
|
+
}, Tn = (t, e) => {
|
|
1344
1393
|
if (typeof e == "function")
|
|
1345
|
-
return
|
|
1346
|
-
const o = e.failure ?? ((s) =>
|
|
1347
|
-
|
|
1348
|
-
s.map((
|
|
1394
|
+
return Tn(t, { success: e });
|
|
1395
|
+
const o = e.failure ?? ((s) => st(
|
|
1396
|
+
F(s.on(console.error)),
|
|
1397
|
+
s.map((r) => `Error: ${r}`)
|
|
1349
1398
|
)), n = e.success;
|
|
1350
|
-
return
|
|
1399
|
+
return te(E.toSignal(t), {
|
|
1351
1400
|
Success: (s) => n(s.$.value),
|
|
1352
1401
|
Failure: (s) => o(s.$.error)
|
|
1353
1402
|
});
|
|
1354
|
-
},
|
|
1403
|
+
}, eo = () => Qt.focus((t) => {
|
|
1355
1404
|
var e;
|
|
1356
1405
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1357
1406
|
});
|
|
1358
|
-
class
|
|
1407
|
+
class bt {
|
|
1359
1408
|
/**
|
|
1360
1409
|
* Creates a new Rect instance.
|
|
1361
1410
|
*
|
|
@@ -1394,7 +1443,7 @@ class vt {
|
|
|
1394
1443
|
* console.log(rect1.equals(rect3)); // true (within tolerance)
|
|
1395
1444
|
* ```
|
|
1396
1445
|
*/
|
|
1397
|
-
|
|
1446
|
+
At(this, "equals", (e) => ft(this.left, e.left) && ft(this.top, e.top) && ft(this.width, e.width) && ft(this.height, e.height));
|
|
1398
1447
|
this.left = e, this.top = o, this.width = n, this.height = s;
|
|
1399
1448
|
}
|
|
1400
1449
|
/**
|
|
@@ -1428,7 +1477,7 @@ class vt {
|
|
|
1428
1477
|
width: n = 0,
|
|
1429
1478
|
height: s = 0
|
|
1430
1479
|
}) {
|
|
1431
|
-
return new
|
|
1480
|
+
return new bt(e, o, n, s);
|
|
1432
1481
|
}
|
|
1433
1482
|
/**
|
|
1434
1483
|
* Gets the x-coordinate of the right edge of the rectangle.
|
|
@@ -1494,96 +1543,98 @@ class vt {
|
|
|
1494
1543
|
return { width: this.width, height: this.height };
|
|
1495
1544
|
}
|
|
1496
1545
|
}
|
|
1497
|
-
function
|
|
1546
|
+
function It(t) {
|
|
1498
1547
|
const e = t.getBoundingClientRect();
|
|
1499
|
-
return
|
|
1548
|
+
return bt.of({
|
|
1500
1549
|
top: e.top + window.scrollY,
|
|
1501
1550
|
left: e.left + window.scrollX,
|
|
1502
1551
|
width: e.width,
|
|
1503
1552
|
height: e.height
|
|
1504
1553
|
});
|
|
1505
1554
|
}
|
|
1506
|
-
const
|
|
1507
|
-
const { element: o } = e, n =
|
|
1508
|
-
n.set(
|
|
1555
|
+
const Pn = (t) => Re((e) => {
|
|
1556
|
+
const { element: o } = e, n = H(It(o)), s = Dt(t(n))(e), r = () => {
|
|
1557
|
+
n.set(bt.of(It(o)));
|
|
1509
1558
|
};
|
|
1510
|
-
let
|
|
1511
|
-
return typeof ResizeObserver == "function" && (
|
|
1512
|
-
|
|
1559
|
+
let i;
|
|
1560
|
+
return typeof ResizeObserver == "function" && (i = new ResizeObserver(r), i.observe(o)), F((c) => {
|
|
1561
|
+
i == null || i.disconnect(), s(c);
|
|
1513
1562
|
});
|
|
1514
|
-
}),
|
|
1515
|
-
const o =
|
|
1563
|
+
}), no = (t) => Pn(t), oo = (t) => (e) => {
|
|
1564
|
+
const o = ct(), n = H({
|
|
1516
1565
|
width: (o == null ? void 0 : o.innerWidth) ?? 0,
|
|
1517
1566
|
height: (o == null ? void 0 : o.innerHeight) ?? 0
|
|
1518
|
-
}), s =
|
|
1567
|
+
}), s = Dt(t(n))(e), r = () => {
|
|
1519
1568
|
n.set({
|
|
1569
|
+
/* c8 ignore next 6 */
|
|
1520
1570
|
width: (o == null ? void 0 : o.innerWidth) ?? 0,
|
|
1521
1571
|
height: (o == null ? void 0 : o.innerHeight) ?? 0
|
|
1522
1572
|
});
|
|
1523
1573
|
};
|
|
1524
|
-
return o == null || o.addEventListener("resize",
|
|
1525
|
-
o == null || o.removeEventListener("resize",
|
|
1574
|
+
return o == null || o.addEventListener("resize", r), (i) => {
|
|
1575
|
+
o == null || o.removeEventListener("resize", r), s(i);
|
|
1526
1576
|
};
|
|
1527
|
-
},
|
|
1577
|
+
}, kn = (t, e) => {
|
|
1528
1578
|
const o = e.split("/").filter((s) => s !== ""), n = {};
|
|
1529
1579
|
for (let s = 0; s < t.length; s++) {
|
|
1530
|
-
const
|
|
1531
|
-
if (!
|
|
1580
|
+
const r = t[s], i = o[s];
|
|
1581
|
+
if (!i && r.type !== "catch-all")
|
|
1532
1582
|
return null;
|
|
1533
|
-
if (
|
|
1534
|
-
if (
|
|
1583
|
+
if (r.type === "literal") {
|
|
1584
|
+
if (r.value !== i)
|
|
1535
1585
|
return null;
|
|
1536
|
-
} else if (
|
|
1537
|
-
n[
|
|
1538
|
-
else if (
|
|
1586
|
+
} else if (r.type === "param")
|
|
1587
|
+
n[r.name] = i;
|
|
1588
|
+
else if (r.type === "catch-all")
|
|
1539
1589
|
return { params: n, path: e };
|
|
1540
1590
|
}
|
|
1541
1591
|
return o.length !== t.length ? null : { params: n, path: e };
|
|
1542
|
-
},
|
|
1592
|
+
}, Dn = (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 !== ""), Cn = (t) => {
|
|
1543
1593
|
const e = t.map((o) => {
|
|
1544
|
-
const n =
|
|
1594
|
+
const n = Dn(o);
|
|
1545
1595
|
return { route: o, segments: n };
|
|
1546
1596
|
});
|
|
1547
1597
|
return function(n) {
|
|
1548
|
-
for (const { segments: s, route:
|
|
1549
|
-
const
|
|
1550
|
-
if (
|
|
1551
|
-
return { ...
|
|
1598
|
+
for (const { segments: s, route: r } of e) {
|
|
1599
|
+
const i = kn(s, n);
|
|
1600
|
+
if (i)
|
|
1601
|
+
return { ...i, route: r };
|
|
1552
1602
|
}
|
|
1553
1603
|
return null;
|
|
1554
1604
|
};
|
|
1555
|
-
},
|
|
1556
|
-
const e =
|
|
1557
|
-
return
|
|
1605
|
+
}, so = (t) => {
|
|
1606
|
+
const e = Cn(Object.keys(t));
|
|
1607
|
+
return Gt(ie, (o) => {
|
|
1558
1608
|
const n = o.map((s) => {
|
|
1559
|
-
const
|
|
1560
|
-
if (
|
|
1609
|
+
const r = e(s.pathname);
|
|
1610
|
+
if (r == null)
|
|
1561
1611
|
throw console.error("No route found for", s), new Error("No route found");
|
|
1562
1612
|
return {
|
|
1563
|
-
params:
|
|
1564
|
-
route:
|
|
1565
|
-
path:
|
|
1613
|
+
params: r.params,
|
|
1614
|
+
route: r.route,
|
|
1615
|
+
path: r.path,
|
|
1566
1616
|
search: s.search,
|
|
1567
1617
|
hash: s.hash
|
|
1568
1618
|
};
|
|
1569
1619
|
});
|
|
1570
|
-
return
|
|
1620
|
+
return Ee(
|
|
1571
1621
|
n.map((s) => [s.route, s]),
|
|
1572
1622
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1573
1623
|
t
|
|
1624
|
+
/* c8 ignore next 2 */
|
|
1574
1625
|
);
|
|
1575
1626
|
});
|
|
1576
|
-
},
|
|
1627
|
+
}, wt = 60 * 1e3, kt = 60 * wt, it = 24 * kt, jt = 7 * it, Yt = 30 * it, Wn = 365 * it, Fn = [
|
|
1577
1628
|
{
|
|
1578
|
-
max:
|
|
1579
|
-
value:
|
|
1629
|
+
max: wt * 90,
|
|
1630
|
+
value: wt,
|
|
1580
1631
|
name: "minute",
|
|
1581
1632
|
past: { singular: "a minute ago", plural: "{} minutes ago" },
|
|
1582
1633
|
future: { singular: "in a minute", plural: "in {} minutes" }
|
|
1583
1634
|
},
|
|
1584
1635
|
{
|
|
1585
|
-
max:
|
|
1586
|
-
value:
|
|
1636
|
+
max: kt * 36,
|
|
1637
|
+
value: kt,
|
|
1587
1638
|
name: "hour",
|
|
1588
1639
|
past: { singular: "an hour ago", plural: "{} hours ago" },
|
|
1589
1640
|
future: { singular: "in an hour", plural: "in {} hours" }
|
|
@@ -1596,28 +1647,28 @@ const En = (t) => be((e) => {
|
|
|
1596
1647
|
future: { singular: "tomorrow", plural: "in {} days" }
|
|
1597
1648
|
},
|
|
1598
1649
|
{
|
|
1599
|
-
max:
|
|
1600
|
-
value:
|
|
1650
|
+
max: jt * 6,
|
|
1651
|
+
value: jt,
|
|
1601
1652
|
name: "week",
|
|
1602
1653
|
past: { singular: "last week", plural: "{} weeks ago" },
|
|
1603
1654
|
future: { singular: "in a week", plural: "in {} weeks" }
|
|
1604
1655
|
},
|
|
1605
1656
|
{
|
|
1606
|
-
max:
|
|
1607
|
-
value:
|
|
1657
|
+
max: Yt * 18,
|
|
1658
|
+
value: Yt,
|
|
1608
1659
|
name: "month",
|
|
1609
1660
|
past: { singular: "last month", plural: "{} months ago" },
|
|
1610
1661
|
future: { singular: "in a month", plural: "in {} months" }
|
|
1611
1662
|
},
|
|
1612
1663
|
{
|
|
1613
1664
|
max: 1 / 0,
|
|
1614
|
-
value:
|
|
1665
|
+
value: Wn,
|
|
1615
1666
|
name: "year",
|
|
1616
1667
|
past: { singular: "last year", plural: "{} years ago" },
|
|
1617
1668
|
future: { singular: "in a year", plural: "in {} years" }
|
|
1618
1669
|
}
|
|
1619
1670
|
];
|
|
1620
|
-
function
|
|
1671
|
+
function qt(t, e, o, n) {
|
|
1621
1672
|
const s = Math.round(t / e);
|
|
1622
1673
|
return s <= 1 ? o : n.replace(
|
|
1623
1674
|
"{}",
|
|
@@ -1627,78 +1678,83 @@ function Yt(t, e, o, n) {
|
|
|
1627
1678
|
})
|
|
1628
1679
|
);
|
|
1629
1680
|
}
|
|
1630
|
-
const
|
|
1631
|
-
const e =
|
|
1681
|
+
const Mn = (t = 1e3) => {
|
|
1682
|
+
const e = H(/* @__PURE__ */ new Date()), o = Se(() => e.set(/* @__PURE__ */ new Date()), t);
|
|
1632
1683
|
return e.onDispose(o), e;
|
|
1633
|
-
},
|
|
1684
|
+
}, Vn = (t) => {
|
|
1634
1685
|
const e = Math.abs(t);
|
|
1635
|
-
if (e <
|
|
1686
|
+
if (e < wt)
|
|
1636
1687
|
return t < 0 ? "just now" : "in a moment";
|
|
1637
|
-
for (const o of
|
|
1688
|
+
for (const o of Fn)
|
|
1638
1689
|
if (e < o.max)
|
|
1639
|
-
return t < 0 ?
|
|
1690
|
+
return t < 0 ? qt(e, o.value, o.past.singular, o.past.plural) : qt(e, o.value, o.future.singular, o.future.plural);
|
|
1640
1691
|
throw new Error("unreachable");
|
|
1641
|
-
},
|
|
1642
|
-
const n = e != null ?
|
|
1692
|
+
}, Nn = (t, { now: e, frequency: o = 1e4 } = {}) => {
|
|
1693
|
+
const n = e != null ? Jt.is(e) ? e.derive() : H(e) : Mn(o), s = oe(
|
|
1643
1694
|
t,
|
|
1644
1695
|
n
|
|
1645
|
-
)((
|
|
1696
|
+
)((r, i) => r.getTime() - i.getTime());
|
|
1646
1697
|
return s.onDispose(() => E.dispose(n)), s;
|
|
1647
|
-
},
|
|
1648
|
-
const o =
|
|
1698
|
+
}, $n = (t, e = {}) => {
|
|
1699
|
+
const o = Nn(t, e), n = o.map(Vn);
|
|
1649
1700
|
return n.onDispose(o.dispose), n;
|
|
1650
|
-
},
|
|
1651
|
-
class
|
|
1701
|
+
}, ro = (t, e = {}) => $n(t, e);
|
|
1702
|
+
class Hn extends Le {
|
|
1652
1703
|
constructor() {
|
|
1653
1704
|
super(...arguments);
|
|
1654
1705
|
/**
|
|
1655
1706
|
* Triggers an update of the Ticker by incrementing its internal value.
|
|
1656
1707
|
* @returns void
|
|
1657
1708
|
*/
|
|
1658
|
-
|
|
1709
|
+
At(this, "tick", () => this.update((o) => o + 1));
|
|
1659
1710
|
}
|
|
1660
1711
|
}
|
|
1661
|
-
const
|
|
1712
|
+
const io = (t = 0) => new Hn(t, (e, o) => e === o);
|
|
1662
1713
|
export {
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1714
|
+
$e as Anchor,
|
|
1715
|
+
Kn as Appearance,
|
|
1716
|
+
ce as AsyncResultView,
|
|
1717
|
+
_n as AutoFocus,
|
|
1718
|
+
In as AutoSelect,
|
|
1719
|
+
Pn as ElementRect,
|
|
1720
|
+
no as ElementSize,
|
|
1721
|
+
Yn as HTMLTitle,
|
|
1722
|
+
jn as HiddenWhenEmpty,
|
|
1723
|
+
ze as InViewport,
|
|
1724
|
+
ie as Location,
|
|
1725
|
+
Xn as OnClickOutside,
|
|
1726
|
+
Jn as OnEnterKey,
|
|
1727
|
+
Gn as OnEscapeKey,
|
|
1728
|
+
le as OnKeyPressed,
|
|
1729
|
+
Zn as PopOver,
|
|
1730
|
+
bt as Rect,
|
|
1731
|
+
to as Resource,
|
|
1732
|
+
Sn as ResourceDisplay,
|
|
1733
|
+
Tn as ResultView,
|
|
1734
|
+
so as Router,
|
|
1735
|
+
eo as SelectOnFocus,
|
|
1736
|
+
Hn as Ticker,
|
|
1737
|
+
qn as WhenInViewport,
|
|
1738
|
+
oo as WindowSize,
|
|
1739
|
+
Pe as _checkExtensionCondition,
|
|
1740
|
+
Te as _getExtension,
|
|
1741
|
+
Cn as _makeRouteMatcher,
|
|
1742
|
+
Dn as _parseRouteSegments,
|
|
1743
|
+
Qn as allPlacements,
|
|
1744
|
+
Ce as areLocationsEqual,
|
|
1745
|
+
It as getAbsoluteRect,
|
|
1746
|
+
De as handleAnchorClick,
|
|
1747
|
+
re as locationFromURL,
|
|
1748
|
+
Ln as makeResource,
|
|
1749
|
+
Ke as matchesKeyCombo,
|
|
1750
|
+
kn as matchesRoute,
|
|
1751
|
+
Mn as nowSignal,
|
|
1752
|
+
ro as relativeTime,
|
|
1753
|
+
Nn as relativeTimeMillisSignal,
|
|
1754
|
+
$n as relativeTimeSignal,
|
|
1755
|
+
$t as setLocationFromUrl,
|
|
1756
|
+
io as ticker,
|
|
1757
|
+
Vn as timeDiffToString,
|
|
1758
|
+
Lt as urlFromLocation,
|
|
1759
|
+
He as useAppearance
|
|
1704
1760
|
};
|