@tempots/ui 0.23.0-next.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +202 -0
- package/index.cjs +1 -1
- package/index.d.ts +1 -0
- package/index.js +465 -444
- package/package.json +2 -3
- package/renderables/inviewport.d.ts +1 -1
- package/utils/ticker.d.ts +5 -0
package/index.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var ue = Object.defineProperty;
|
|
2
|
+
var fe = (t, e, n) => e in t ? ue(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var kt = (t, e, n) => fe(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { makeProviderMark as Ht, Fragment as K, OnBrowserCtx as wt, Async as St, OnHeadlessCtx as he, UseProvider as zt, makeProp as F, renderableOfTNode as it, getWindow as xt, Signal as Bt, html as Ut, on as It, Value as st, attr as _t, WithProvider as de, OnDispose as k, Empty as mt, OneOfType as jt, makeSignal as me, OnElement as X, Portal as Yt, When as qt, OneOfTuple as pe, makeComputedOf as ge, Prop as Kt } from "@tempots/dom";
|
|
5
|
+
const ye = (t) => {
|
|
3
6
|
const e = t.split("/").pop();
|
|
4
7
|
if (e == null || e.startsWith(".")) return;
|
|
5
8
|
const n = e.split(".") || [];
|
|
6
9
|
return n.length > 1 ? "." + n.pop() : void 0;
|
|
7
|
-
},
|
|
8
|
-
const n =
|
|
10
|
+
}, we = (t, e) => {
|
|
11
|
+
const n = ye(e);
|
|
9
12
|
return n != null && (t.length === 0 || !t.some((o) => n == o));
|
|
10
|
-
},
|
|
13
|
+
}, xe = (t, e, n, o) => {
|
|
11
14
|
let r = t.target;
|
|
12
15
|
for (; r != null && !(r instanceof HTMLAnchorElement); )
|
|
13
16
|
r = r.parentElement;
|
|
@@ -18,12 +21,12 @@ const de = (t) => {
|
|
|
18
21
|
return !0;
|
|
19
22
|
const { pathname: s, search: c, hash: a } = i;
|
|
20
23
|
if (o) {
|
|
21
|
-
const l = s + c + a,
|
|
22
|
-
if (!(
|
|
24
|
+
const l = s + c + a, f = i.getAttribute("href");
|
|
25
|
+
if (!(f != null && f.startsWith("#")) && f !== l)
|
|
23
26
|
return !0;
|
|
24
27
|
}
|
|
25
|
-
return e ? !1 :
|
|
26
|
-
},
|
|
28
|
+
return e ? !1 : we(n, s);
|
|
29
|
+
}, ve = (t, e = {
|
|
27
30
|
ignoreUrlWithExtension: !0,
|
|
28
31
|
allowedExtensions: [],
|
|
29
32
|
ignoreExternalUrl: !0
|
|
@@ -32,30 +35,30 @@ const de = (t) => {
|
|
|
32
35
|
(o) => o.startsWith(".") ? o : "." + o
|
|
33
36
|
) : [];
|
|
34
37
|
return (o) => {
|
|
35
|
-
|
|
38
|
+
xe(
|
|
36
39
|
o,
|
|
37
40
|
e.ignoreUrlWithExtension ?? !0,
|
|
38
41
|
n,
|
|
39
42
|
e.ignoreExternalUrl ?? !0
|
|
40
43
|
) || t() && o.preventDefault();
|
|
41
44
|
};
|
|
42
|
-
},
|
|
43
|
-
wt((
|
|
44
|
-
import("./browser-location-12vUH3Kv.js").then((
|
|
45
|
-
(
|
|
46
|
-
)
|
|
47
|
-
|
|
45
|
+
}, be = Ht("LocationProvider"), vn = (t) => K(
|
|
46
|
+
wt(() => St(
|
|
47
|
+
import("./browser-location-12vUH3Kv.js").then((e) => e.ProvideBrowserLocation),
|
|
48
|
+
(e) => e(t)
|
|
49
|
+
)),
|
|
50
|
+
he((e) => St(
|
|
48
51
|
import("./headless-location-Ba_ht5ZQ.js").then((n) => n.ProvideHeadlessLocation),
|
|
49
52
|
(n) => n(e.container.currentURL, t)
|
|
50
|
-
)
|
|
51
|
-
), Xt = (t) =>
|
|
52
|
-
const o =
|
|
53
|
+
))
|
|
54
|
+
), Xt = (t) => zt(be, (e) => (n) => {
|
|
55
|
+
const o = F(e.value, e.equals);
|
|
53
56
|
e.feedProp(o), o.on(e.set);
|
|
54
|
-
const r =
|
|
57
|
+
const r = it(t(o))(n);
|
|
55
58
|
return (i) => {
|
|
56
59
|
o.dispose(), r(i);
|
|
57
60
|
};
|
|
58
|
-
}),
|
|
61
|
+
}), bn = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, Ae = (t, e) => {
|
|
59
62
|
var i;
|
|
60
63
|
const n = new URL(t, e ?? ((i = xt()) == null ? void 0 : i.location.toString())), o = Object.fromEntries(n.searchParams.entries());
|
|
61
64
|
let r = n.hash;
|
|
@@ -64,60 +67,60 @@ const de = (t) => {
|
|
|
64
67
|
search: o,
|
|
65
68
|
hash: r === "" ? void 0 : r
|
|
66
69
|
};
|
|
67
|
-
},
|
|
68
|
-
const n =
|
|
70
|
+
}, Ee = (t, e) => {
|
|
71
|
+
const n = Ae(e);
|
|
69
72
|
return t.set(n), t;
|
|
70
|
-
},
|
|
73
|
+
}, An = (t) => {
|
|
71
74
|
const n = new URLSearchParams(t.search).toString(), o = t.hash;
|
|
72
75
|
return `${t.pathname}${n ? `?${n}` : ""}${o ? `#${o}` : ""}`;
|
|
73
|
-
},
|
|
74
|
-
if (typeof t == "string" ||
|
|
75
|
-
return
|
|
76
|
+
}, Re = (t, ...e) => {
|
|
77
|
+
if (typeof t == "string" || Bt.is(t))
|
|
78
|
+
return Re({ href: t }, ...e);
|
|
76
79
|
const { href: n, ...o } = t;
|
|
77
|
-
return Xt((r) =>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
return Xt((r) => Ut.a(
|
|
81
|
+
It.click(
|
|
82
|
+
ve(() => (Ee(r, st.get(n)), !0), o)
|
|
80
83
|
),
|
|
81
|
-
|
|
84
|
+
_t.href(n),
|
|
82
85
|
...e
|
|
83
86
|
));
|
|
84
|
-
},
|
|
85
|
-
const e = xt(), n = e != null && e.matchMedia != null && e.matchMedia("(prefers-color-scheme: dark)").matches, o =
|
|
87
|
+
}, Jt = Ht("Appearance"), En = (t) => {
|
|
88
|
+
const e = xt(), n = e != null && e.matchMedia != null && e.matchMedia("(prefers-color-scheme: dark)").matches, o = F(n ? "dark" : "light"), r = (s) => {
|
|
86
89
|
o.set(s.matches ? "dark" : "light");
|
|
87
90
|
}, i = e != null && e.matchMedia != null ? e.matchMedia("(prefers-color-scheme: dark)") : void 0;
|
|
88
|
-
return i == null || i.addEventListener("change", r),
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
return i == null || i.addEventListener("change", r), K(
|
|
92
|
+
de(Jt, o, t),
|
|
93
|
+
k(() => i == null ? void 0 : i.removeEventListener("change", r))
|
|
91
94
|
);
|
|
92
|
-
},
|
|
95
|
+
}, Rn = (t) => zt(Jt, t), Oe = (t, e) => {
|
|
93
96
|
if (typeof e == "function")
|
|
94
|
-
return
|
|
95
|
-
const n = e.failure ?? ((s) =>
|
|
96
|
-
|
|
97
|
+
return Oe(t, { success: e });
|
|
98
|
+
const n = e.failure ?? ((s) => K(
|
|
99
|
+
k(s.on(console.error)),
|
|
97
100
|
s.map((c) => `Error: ${c}`)
|
|
98
|
-
)), o = e.success, r = e.loading ?? (() =>
|
|
99
|
-
return
|
|
101
|
+
)), o = e.success, r = e.loading ?? (() => mt), i = e.notAsked ?? (() => mt);
|
|
102
|
+
return jt(st.toSignal(t), {
|
|
100
103
|
AsyncSuccess: (s) => o(s.$.value),
|
|
101
104
|
AsyncFailure: (s) => n(s.$.error),
|
|
102
|
-
Loading: (s) => r(s.$.previousValue ??
|
|
105
|
+
Loading: (s) => r(s.$.previousValue ?? me(void 0)),
|
|
103
106
|
NotAsked: i
|
|
104
107
|
});
|
|
105
|
-
},
|
|
108
|
+
}, On = (t = 10) => X((e) => {
|
|
106
109
|
const n = setTimeout(() => {
|
|
107
110
|
e == null || e.focus();
|
|
108
111
|
}, t);
|
|
109
|
-
return () => clearTimeout(n);
|
|
110
|
-
}),
|
|
112
|
+
return k(() => clearTimeout(n));
|
|
113
|
+
}), Ln = (t = 10) => X((e) => {
|
|
111
114
|
const n = setTimeout(() => {
|
|
112
115
|
e == null || e.select();
|
|
113
116
|
}, t);
|
|
114
|
-
return () => clearTimeout(n);
|
|
115
|
-
}),
|
|
117
|
+
return k(() => clearTimeout(n));
|
|
118
|
+
}), Tn = X((t) => {
|
|
116
119
|
const e = t.style.getPropertyValue(":empty");
|
|
117
|
-
return t.style.setProperty(":empty", "display:none"), (n) => {
|
|
120
|
+
return t.style.setProperty(":empty", "display:none"), k((n) => {
|
|
118
121
|
n && t.style.setProperty(":empty", e);
|
|
119
|
-
};
|
|
120
|
-
}),
|
|
122
|
+
});
|
|
123
|
+
}), kn = (t) => Yt("head > title", _t.innerText(t)), Le = {
|
|
121
124
|
partial: {
|
|
122
125
|
root: null,
|
|
123
126
|
rootMargin: "0px",
|
|
@@ -128,83 +131,83 @@ const de = (t) => {
|
|
|
128
131
|
rootMargin: "0px",
|
|
129
132
|
threshold: 1
|
|
130
133
|
}
|
|
131
|
-
},
|
|
134
|
+
}, Z = {
|
|
132
135
|
partial: /* @__PURE__ */ new Map(),
|
|
133
136
|
full: /* @__PURE__ */ new Map()
|
|
134
|
-
},
|
|
137
|
+
}, j = {
|
|
135
138
|
partial: null,
|
|
136
139
|
full: null
|
|
137
140
|
};
|
|
138
|
-
function
|
|
139
|
-
return
|
|
141
|
+
function Te(t) {
|
|
142
|
+
return j[t] == null && (j[t] = new IntersectionObserver((e) => {
|
|
140
143
|
e.forEach((n) => {
|
|
141
|
-
const o =
|
|
144
|
+
const o = Z[t].get(n.target);
|
|
142
145
|
o == null || o.set(n.isIntersecting);
|
|
143
146
|
});
|
|
144
|
-
},
|
|
145
|
-
}
|
|
146
|
-
const
|
|
147
|
-
const n =
|
|
148
|
-
return
|
|
149
|
-
|
|
150
|
-
const r = typeof IntersectionObserver < "u" ?
|
|
151
|
-
return
|
|
147
|
+
}, Le[t])), j[t];
|
|
148
|
+
}
|
|
149
|
+
const ke = (t, e) => {
|
|
150
|
+
const n = F(!1);
|
|
151
|
+
return K(
|
|
152
|
+
X((o) => {
|
|
153
|
+
const r = typeof IntersectionObserver < "u" ? Te(t) : null;
|
|
154
|
+
return Z[t].set(o, n), r == null || r.observe(o), k(() => {
|
|
152
155
|
var i;
|
|
153
|
-
n.dispose(), r == null || r.unobserve(o),
|
|
154
|
-
};
|
|
156
|
+
n.dispose(), r == null || r.unobserve(o), Z[t].delete(o), Z[t].size === 0 && ((i = j[t]) == null || i.disconnect(), j[t] = null);
|
|
157
|
+
});
|
|
155
158
|
}),
|
|
156
|
-
|
|
159
|
+
it(e(n))
|
|
157
160
|
);
|
|
158
|
-
},
|
|
161
|
+
}, Sn = (t, e, n) => ke(t, (o) => qt(o, e, n ?? (() => mt))), tt = Math.min, W = Math.max, et = Math.round, Q = Math.floor, O = (t) => ({
|
|
159
162
|
x: t,
|
|
160
163
|
y: t
|
|
161
|
-
}),
|
|
164
|
+
}), Se = {
|
|
162
165
|
left: "right",
|
|
163
166
|
right: "left",
|
|
164
167
|
bottom: "top",
|
|
165
168
|
top: "bottom"
|
|
166
|
-
},
|
|
169
|
+
}, Ce = {
|
|
167
170
|
start: "end",
|
|
168
171
|
end: "start"
|
|
169
172
|
};
|
|
170
173
|
function Ct(t, e, n) {
|
|
171
|
-
return
|
|
174
|
+
return W(t, tt(e, n));
|
|
172
175
|
}
|
|
173
|
-
function
|
|
176
|
+
function ct(t, e) {
|
|
174
177
|
return typeof t == "function" ? t(e) : t;
|
|
175
178
|
}
|
|
176
|
-
function
|
|
179
|
+
function M(t) {
|
|
177
180
|
return t.split("-")[0];
|
|
178
181
|
}
|
|
179
|
-
function
|
|
182
|
+
function lt(t) {
|
|
180
183
|
return t.split("-")[1];
|
|
181
184
|
}
|
|
182
|
-
function
|
|
185
|
+
function Gt(t) {
|
|
183
186
|
return t === "x" ? "y" : "x";
|
|
184
187
|
}
|
|
185
|
-
function
|
|
188
|
+
function Qt(t) {
|
|
186
189
|
return t === "y" ? "height" : "width";
|
|
187
190
|
}
|
|
188
|
-
function
|
|
189
|
-
return ["top", "bottom"].includes(
|
|
191
|
+
function z(t) {
|
|
192
|
+
return ["top", "bottom"].includes(M(t)) ? "y" : "x";
|
|
190
193
|
}
|
|
191
|
-
function
|
|
192
|
-
return
|
|
194
|
+
function Zt(t) {
|
|
195
|
+
return Gt(z(t));
|
|
193
196
|
}
|
|
194
|
-
function
|
|
197
|
+
function Pe(t, e, n) {
|
|
195
198
|
n === void 0 && (n = !1);
|
|
196
|
-
const o =
|
|
199
|
+
const o = lt(t), r = Zt(t), i = Qt(r);
|
|
197
200
|
let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
198
|
-
return e.reference[i] > e.floating[i] && (s =
|
|
201
|
+
return e.reference[i] > e.floating[i] && (s = nt(s)), [s, nt(s)];
|
|
199
202
|
}
|
|
200
|
-
function
|
|
201
|
-
const e =
|
|
202
|
-
return [
|
|
203
|
+
function De(t) {
|
|
204
|
+
const e = nt(t);
|
|
205
|
+
return [pt(t), e, pt(e)];
|
|
203
206
|
}
|
|
204
|
-
function
|
|
205
|
-
return t.replace(/start|end/g, (e) =>
|
|
207
|
+
function pt(t) {
|
|
208
|
+
return t.replace(/start|end/g, (e) => Ce[e]);
|
|
206
209
|
}
|
|
207
|
-
function
|
|
210
|
+
function We(t, e, n) {
|
|
208
211
|
const o = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
|
|
209
212
|
switch (t) {
|
|
210
213
|
case "top":
|
|
@@ -217,15 +220,15 @@ function Ce(t, e, n) {
|
|
|
217
220
|
return [];
|
|
218
221
|
}
|
|
219
222
|
}
|
|
220
|
-
function
|
|
221
|
-
const r =
|
|
222
|
-
let i =
|
|
223
|
-
return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(
|
|
223
|
+
function Fe(t, e, n, o) {
|
|
224
|
+
const r = lt(t);
|
|
225
|
+
let i = We(M(t), n === "start", o);
|
|
226
|
+
return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(pt)))), i;
|
|
224
227
|
}
|
|
225
|
-
function
|
|
226
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
228
|
+
function nt(t) {
|
|
229
|
+
return t.replace(/left|right|bottom|top/g, (e) => Se[e]);
|
|
227
230
|
}
|
|
228
|
-
function
|
|
231
|
+
function Me(t) {
|
|
229
232
|
return {
|
|
230
233
|
top: 0,
|
|
231
234
|
right: 0,
|
|
@@ -234,15 +237,15 @@ function Pe(t) {
|
|
|
234
237
|
...t
|
|
235
238
|
};
|
|
236
239
|
}
|
|
237
|
-
function
|
|
238
|
-
return typeof t != "number" ?
|
|
240
|
+
function Ne(t) {
|
|
241
|
+
return typeof t != "number" ? Me(t) : {
|
|
239
242
|
top: t,
|
|
240
243
|
right: t,
|
|
241
244
|
bottom: t,
|
|
242
245
|
left: t
|
|
243
246
|
};
|
|
244
247
|
}
|
|
245
|
-
function
|
|
248
|
+
function ot(t) {
|
|
246
249
|
const {
|
|
247
250
|
x: e,
|
|
248
251
|
y: n,
|
|
@@ -260,36 +263,36 @@ function nt(t) {
|
|
|
260
263
|
y: n
|
|
261
264
|
};
|
|
262
265
|
}
|
|
263
|
-
function
|
|
266
|
+
function Pt(t, e, n) {
|
|
264
267
|
let {
|
|
265
268
|
reference: o,
|
|
266
269
|
floating: r
|
|
267
270
|
} = t;
|
|
268
|
-
const i =
|
|
271
|
+
const i = z(e), s = Zt(e), c = Qt(s), a = M(e), l = i === "y", f = o.x + o.width / 2 - r.width / 2, u = o.y + o.height / 2 - r.height / 2, d = o[c] / 2 - r[c] / 2;
|
|
269
272
|
let h;
|
|
270
273
|
switch (a) {
|
|
271
274
|
case "top":
|
|
272
275
|
h = {
|
|
273
|
-
x:
|
|
276
|
+
x: f,
|
|
274
277
|
y: o.y - r.height
|
|
275
278
|
};
|
|
276
279
|
break;
|
|
277
280
|
case "bottom":
|
|
278
281
|
h = {
|
|
279
|
-
x:
|
|
282
|
+
x: f,
|
|
280
283
|
y: o.y + o.height
|
|
281
284
|
};
|
|
282
285
|
break;
|
|
283
286
|
case "right":
|
|
284
287
|
h = {
|
|
285
288
|
x: o.x + o.width,
|
|
286
|
-
y:
|
|
289
|
+
y: u
|
|
287
290
|
};
|
|
288
291
|
break;
|
|
289
292
|
case "left":
|
|
290
293
|
h = {
|
|
291
294
|
x: o.x - r.width,
|
|
292
|
-
y:
|
|
295
|
+
y: u
|
|
293
296
|
};
|
|
294
297
|
break;
|
|
295
298
|
default:
|
|
@@ -298,7 +301,7 @@ function kt(t, e, n) {
|
|
|
298
301
|
y: o.y
|
|
299
302
|
};
|
|
300
303
|
}
|
|
301
|
-
switch (
|
|
304
|
+
switch (lt(e)) {
|
|
302
305
|
case "start":
|
|
303
306
|
h[s] -= d * (n && l ? -1 : 1);
|
|
304
307
|
break;
|
|
@@ -308,7 +311,7 @@ function kt(t, e, n) {
|
|
|
308
311
|
}
|
|
309
312
|
return h;
|
|
310
313
|
}
|
|
311
|
-
const
|
|
314
|
+
const Ve = async (t, e, n) => {
|
|
312
315
|
const {
|
|
313
316
|
placement: o = "bottom",
|
|
314
317
|
strategy: r = "absolute",
|
|
@@ -320,9 +323,9 @@ const We = async (t, e, n) => {
|
|
|
320
323
|
floating: e,
|
|
321
324
|
strategy: r
|
|
322
325
|
}), {
|
|
323
|
-
x:
|
|
324
|
-
y:
|
|
325
|
-
} =
|
|
326
|
+
x: f,
|
|
327
|
+
y: u
|
|
328
|
+
} = Pt(l, o, a), d = o, h = {}, p = 0;
|
|
326
329
|
for (let g = 0; g < c.length; g++) {
|
|
327
330
|
const {
|
|
328
331
|
name: y,
|
|
@@ -333,8 +336,8 @@ const We = async (t, e, n) => {
|
|
|
333
336
|
data: b,
|
|
334
337
|
reset: v
|
|
335
338
|
} = await m({
|
|
336
|
-
x:
|
|
337
|
-
y:
|
|
339
|
+
x: f,
|
|
340
|
+
y: u,
|
|
338
341
|
initialPlacement: o,
|
|
339
342
|
placement: d,
|
|
340
343
|
strategy: r,
|
|
@@ -346,7 +349,7 @@ const We = async (t, e, n) => {
|
|
|
346
349
|
floating: e
|
|
347
350
|
}
|
|
348
351
|
});
|
|
349
|
-
|
|
352
|
+
f = w ?? f, u = x ?? u, h = {
|
|
350
353
|
...h,
|
|
351
354
|
[y]: {
|
|
352
355
|
...h[y],
|
|
@@ -357,19 +360,19 @@ const We = async (t, e, n) => {
|
|
|
357
360
|
floating: e,
|
|
358
361
|
strategy: r
|
|
359
362
|
}) : v.rects), {
|
|
360
|
-
x:
|
|
361
|
-
y:
|
|
362
|
-
} =
|
|
363
|
+
x: f,
|
|
364
|
+
y: u
|
|
365
|
+
} = Pt(l, d, a)), g = -1);
|
|
363
366
|
}
|
|
364
367
|
return {
|
|
365
|
-
x:
|
|
366
|
-
y:
|
|
368
|
+
x: f,
|
|
369
|
+
y: u,
|
|
367
370
|
placement: d,
|
|
368
371
|
strategy: r,
|
|
369
372
|
middlewareData: h
|
|
370
373
|
};
|
|
371
374
|
};
|
|
372
|
-
async function
|
|
375
|
+
async function te(t, e) {
|
|
373
376
|
var n;
|
|
374
377
|
e === void 0 && (e = {});
|
|
375
378
|
const {
|
|
@@ -381,16 +384,16 @@ async function Qt(t, e) {
|
|
|
381
384
|
strategy: a
|
|
382
385
|
} = t, {
|
|
383
386
|
boundary: l = "clippingAncestors",
|
|
384
|
-
rootBoundary:
|
|
385
|
-
elementContext:
|
|
387
|
+
rootBoundary: f = "viewport",
|
|
388
|
+
elementContext: u = "floating",
|
|
386
389
|
altBoundary: d = !1,
|
|
387
390
|
padding: h = 0
|
|
388
|
-
} =
|
|
391
|
+
} = ct(e, t), p = Ne(h), y = c[d ? u === "floating" ? "reference" : "floating" : u], m = ot(await i.getClippingRect({
|
|
389
392
|
element: (n = await (i.isElement == null ? void 0 : i.isElement(y))) == null || n ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
390
393
|
boundary: l,
|
|
391
|
-
rootBoundary:
|
|
394
|
+
rootBoundary: f,
|
|
392
395
|
strategy: a
|
|
393
|
-
})), w =
|
|
396
|
+
})), w = u === "floating" ? {
|
|
394
397
|
x: o,
|
|
395
398
|
y: r,
|
|
396
399
|
width: s.floating.width,
|
|
@@ -401,7 +404,7 @@ async function Qt(t, e) {
|
|
|
401
404
|
} : {
|
|
402
405
|
x: 1,
|
|
403
406
|
y: 1
|
|
404
|
-
}, v =
|
|
407
|
+
}, v = ot(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
405
408
|
elements: c,
|
|
406
409
|
rect: w,
|
|
407
410
|
offsetParent: x,
|
|
@@ -414,7 +417,7 @@ async function Qt(t, e) {
|
|
|
414
417
|
right: (v.right - m.right + p.right) / b.x
|
|
415
418
|
};
|
|
416
419
|
}
|
|
417
|
-
const
|
|
420
|
+
const $e = function(t) {
|
|
418
421
|
return t === void 0 && (t = {}), {
|
|
419
422
|
name: "flip",
|
|
420
423
|
options: t,
|
|
@@ -428,65 +431,65 @@ const Fe = function(t) {
|
|
|
428
431
|
platform: a,
|
|
429
432
|
elements: l
|
|
430
433
|
} = e, {
|
|
431
|
-
mainAxis:
|
|
432
|
-
crossAxis:
|
|
434
|
+
mainAxis: f = !0,
|
|
435
|
+
crossAxis: u = !0,
|
|
433
436
|
fallbackPlacements: d,
|
|
434
437
|
fallbackStrategy: h = "bestFit",
|
|
435
438
|
fallbackAxisSideDirection: p = "none",
|
|
436
439
|
flipAlignment: g = !0,
|
|
437
440
|
...y
|
|
438
|
-
} =
|
|
441
|
+
} = ct(t, e);
|
|
439
442
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
440
443
|
return {};
|
|
441
|
-
const m =
|
|
442
|
-
!d &&
|
|
443
|
-
const
|
|
444
|
-
let
|
|
445
|
-
if (
|
|
446
|
-
const
|
|
447
|
-
|
|
444
|
+
const m = M(r), w = z(c), x = M(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), v = d || (x || !g ? [nt(c)] : De(c)), V = p !== "none";
|
|
445
|
+
!d && V && v.push(...Fe(c, g, p, b));
|
|
446
|
+
const le = [c, ...v], ht = await te(e, y), G = [];
|
|
447
|
+
let I = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
448
|
+
if (f && G.push(ht[m]), u) {
|
|
449
|
+
const D = Pe(r, s, b);
|
|
450
|
+
G.push(ht[D[0]], ht[D[1]]);
|
|
448
451
|
}
|
|
449
|
-
if (
|
|
452
|
+
if (I = [...I, {
|
|
450
453
|
placement: r,
|
|
451
|
-
overflows:
|
|
452
|
-
}], !
|
|
454
|
+
overflows: G
|
|
455
|
+
}], !G.every((D) => D <= 0)) {
|
|
453
456
|
var Rt, Ot;
|
|
454
|
-
const
|
|
457
|
+
const D = (((Rt = i.flip) == null ? void 0 : Rt.index) || 0) + 1, Tt = le[D];
|
|
455
458
|
if (Tt)
|
|
456
459
|
return {
|
|
457
460
|
data: {
|
|
458
|
-
index:
|
|
459
|
-
overflows:
|
|
461
|
+
index: D,
|
|
462
|
+
overflows: I
|
|
460
463
|
},
|
|
461
464
|
reset: {
|
|
462
465
|
placement: Tt
|
|
463
466
|
}
|
|
464
467
|
};
|
|
465
|
-
let
|
|
466
|
-
if (!
|
|
468
|
+
let _ = (Ot = I.filter(($) => $.overflows[0] <= 0).sort(($, S) => $.overflows[1] - S.overflows[1])[0]) == null ? void 0 : Ot.placement;
|
|
469
|
+
if (!_)
|
|
467
470
|
switch (h) {
|
|
468
471
|
case "bestFit": {
|
|
469
472
|
var Lt;
|
|
470
|
-
const
|
|
471
|
-
if (
|
|
472
|
-
const
|
|
473
|
-
return
|
|
473
|
+
const $ = (Lt = I.filter((S) => {
|
|
474
|
+
if (V) {
|
|
475
|
+
const C = z(S.placement);
|
|
476
|
+
return C === w || // Create a bias to the `y` side axis due to horizontal
|
|
474
477
|
// reading directions favoring greater width.
|
|
475
|
-
|
|
478
|
+
C === "y";
|
|
476
479
|
}
|
|
477
480
|
return !0;
|
|
478
|
-
}).map((
|
|
479
|
-
|
|
481
|
+
}).map((S) => [S.placement, S.overflows.filter((C) => C > 0).reduce((C, ae) => C + ae, 0)]).sort((S, C) => S[1] - C[1])[0]) == null ? void 0 : Lt[0];
|
|
482
|
+
$ && (_ = $);
|
|
480
483
|
break;
|
|
481
484
|
}
|
|
482
485
|
case "initialPlacement":
|
|
483
|
-
|
|
486
|
+
_ = c;
|
|
484
487
|
break;
|
|
485
488
|
}
|
|
486
|
-
if (r !==
|
|
489
|
+
if (r !== _)
|
|
487
490
|
return {
|
|
488
491
|
reset: {
|
|
489
|
-
placement:
|
|
492
|
+
placement: _
|
|
490
493
|
}
|
|
491
494
|
};
|
|
492
495
|
}
|
|
@@ -494,34 +497,34 @@ const Fe = function(t) {
|
|
|
494
497
|
}
|
|
495
498
|
};
|
|
496
499
|
};
|
|
497
|
-
async function
|
|
500
|
+
async function He(t, e) {
|
|
498
501
|
const {
|
|
499
502
|
placement: n,
|
|
500
503
|
platform: o,
|
|
501
504
|
elements: r
|
|
502
|
-
} = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s =
|
|
505
|
+
} = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = M(n), c = lt(n), a = z(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, f = i && a ? -1 : 1, u = ct(e, t);
|
|
503
506
|
let {
|
|
504
507
|
mainAxis: d,
|
|
505
508
|
crossAxis: h,
|
|
506
509
|
alignmentAxis: p
|
|
507
|
-
} = typeof
|
|
508
|
-
mainAxis:
|
|
510
|
+
} = typeof u == "number" ? {
|
|
511
|
+
mainAxis: u,
|
|
509
512
|
crossAxis: 0,
|
|
510
513
|
alignmentAxis: null
|
|
511
514
|
} : {
|
|
512
|
-
mainAxis:
|
|
513
|
-
crossAxis:
|
|
514
|
-
alignmentAxis:
|
|
515
|
+
mainAxis: u.mainAxis || 0,
|
|
516
|
+
crossAxis: u.crossAxis || 0,
|
|
517
|
+
alignmentAxis: u.alignmentAxis
|
|
515
518
|
};
|
|
516
519
|
return c && typeof p == "number" && (h = c === "end" ? p * -1 : p), a ? {
|
|
517
|
-
x: h *
|
|
520
|
+
x: h * f,
|
|
518
521
|
y: d * l
|
|
519
522
|
} : {
|
|
520
523
|
x: d * l,
|
|
521
|
-
y: h *
|
|
524
|
+
y: h * f
|
|
522
525
|
};
|
|
523
526
|
}
|
|
524
|
-
const
|
|
527
|
+
const ze = function(t) {
|
|
525
528
|
return t === void 0 && (t = 0), {
|
|
526
529
|
name: "offset",
|
|
527
530
|
options: t,
|
|
@@ -532,7 +535,7 @@ const Ne = function(t) {
|
|
|
532
535
|
y: i,
|
|
533
536
|
placement: s,
|
|
534
537
|
middlewareData: c
|
|
535
|
-
} = e, a = await
|
|
538
|
+
} = e, a = await He(e, t);
|
|
536
539
|
return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
537
540
|
x: r + a.x,
|
|
538
541
|
y: i + a.y,
|
|
@@ -543,7 +546,7 @@ const Ne = function(t) {
|
|
|
543
546
|
};
|
|
544
547
|
}
|
|
545
548
|
};
|
|
546
|
-
},
|
|
549
|
+
}, Be = function(t) {
|
|
547
550
|
return t === void 0 && (t = {}), {
|
|
548
551
|
name: "shift",
|
|
549
552
|
options: t,
|
|
@@ -568,23 +571,23 @@ const Ne = function(t) {
|
|
|
568
571
|
}
|
|
569
572
|
},
|
|
570
573
|
...a
|
|
571
|
-
} =
|
|
574
|
+
} = ct(t, e), l = {
|
|
572
575
|
x: n,
|
|
573
576
|
y: o
|
|
574
|
-
},
|
|
575
|
-
let h = l[d], p = l[
|
|
577
|
+
}, f = await te(e, a), u = z(M(r)), d = Gt(u);
|
|
578
|
+
let h = l[d], p = l[u];
|
|
576
579
|
if (i) {
|
|
577
|
-
const y = d === "y" ? "top" : "left", m = d === "y" ? "bottom" : "right", w = h +
|
|
580
|
+
const y = d === "y" ? "top" : "left", m = d === "y" ? "bottom" : "right", w = h + f[y], x = h - f[m];
|
|
578
581
|
h = Ct(w, h, x);
|
|
579
582
|
}
|
|
580
583
|
if (s) {
|
|
581
|
-
const y =
|
|
584
|
+
const y = u === "y" ? "top" : "left", m = u === "y" ? "bottom" : "right", w = p + f[y], x = p - f[m];
|
|
582
585
|
p = Ct(w, p, x);
|
|
583
586
|
}
|
|
584
587
|
const g = c.fn({
|
|
585
588
|
...e,
|
|
586
589
|
[d]: h,
|
|
587
|
-
[
|
|
590
|
+
[u]: p
|
|
588
591
|
});
|
|
589
592
|
return {
|
|
590
593
|
...g,
|
|
@@ -593,40 +596,40 @@ const Ne = function(t) {
|
|
|
593
596
|
y: g.y - o,
|
|
594
597
|
enabled: {
|
|
595
598
|
[d]: i,
|
|
596
|
-
[
|
|
599
|
+
[u]: s
|
|
597
600
|
}
|
|
598
601
|
}
|
|
599
602
|
};
|
|
600
603
|
}
|
|
601
604
|
};
|
|
602
605
|
};
|
|
603
|
-
function
|
|
606
|
+
function at() {
|
|
604
607
|
return typeof window < "u";
|
|
605
608
|
}
|
|
606
|
-
function
|
|
607
|
-
return
|
|
609
|
+
function U(t) {
|
|
610
|
+
return ee(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
608
611
|
}
|
|
609
612
|
function A(t) {
|
|
610
613
|
var e;
|
|
611
614
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
612
615
|
}
|
|
613
|
-
function
|
|
616
|
+
function T(t) {
|
|
614
617
|
var e;
|
|
615
|
-
return (e = (
|
|
618
|
+
return (e = (ee(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
616
619
|
}
|
|
617
|
-
function
|
|
618
|
-
return
|
|
620
|
+
function ee(t) {
|
|
621
|
+
return at() ? t instanceof Node || t instanceof A(t).Node : !1;
|
|
619
622
|
}
|
|
620
623
|
function E(t) {
|
|
621
|
-
return
|
|
624
|
+
return at() ? t instanceof Element || t instanceof A(t).Element : !1;
|
|
622
625
|
}
|
|
623
|
-
function
|
|
624
|
-
return
|
|
626
|
+
function L(t) {
|
|
627
|
+
return at() ? t instanceof HTMLElement || t instanceof A(t).HTMLElement : !1;
|
|
625
628
|
}
|
|
626
|
-
function
|
|
627
|
-
return !
|
|
629
|
+
function Dt(t) {
|
|
630
|
+
return !at() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
|
|
628
631
|
}
|
|
629
|
-
function
|
|
632
|
+
function J(t) {
|
|
630
633
|
const {
|
|
631
634
|
overflow: e,
|
|
632
635
|
overflowX: n,
|
|
@@ -635,10 +638,10 @@ function K(t) {
|
|
|
635
638
|
} = R(t);
|
|
636
639
|
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(r);
|
|
637
640
|
}
|
|
638
|
-
function
|
|
639
|
-
return ["table", "td", "th"].includes(
|
|
641
|
+
function Ue(t) {
|
|
642
|
+
return ["table", "td", "th"].includes(U(t));
|
|
640
643
|
}
|
|
641
|
-
function
|
|
644
|
+
function ut(t) {
|
|
642
645
|
return [":popover-open", ":modal"].some((e) => {
|
|
643
646
|
try {
|
|
644
647
|
return t.matches(e);
|
|
@@ -647,31 +650,31 @@ function at(t) {
|
|
|
647
650
|
}
|
|
648
651
|
});
|
|
649
652
|
}
|
|
650
|
-
function
|
|
651
|
-
const e =
|
|
653
|
+
function vt(t) {
|
|
654
|
+
const e = bt(), n = E(t) ? R(t) : t;
|
|
652
655
|
return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
|
|
653
656
|
}
|
|
654
|
-
function
|
|
655
|
-
let e =
|
|
656
|
-
for (;
|
|
657
|
-
if (
|
|
657
|
+
function Ie(t) {
|
|
658
|
+
let e = P(t);
|
|
659
|
+
for (; L(e) && !B(e); ) {
|
|
660
|
+
if (vt(e))
|
|
658
661
|
return e;
|
|
659
|
-
if (
|
|
662
|
+
if (ut(e))
|
|
660
663
|
return null;
|
|
661
|
-
e =
|
|
664
|
+
e = P(e);
|
|
662
665
|
}
|
|
663
666
|
return null;
|
|
664
667
|
}
|
|
665
|
-
function
|
|
668
|
+
function bt() {
|
|
666
669
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
667
670
|
}
|
|
668
|
-
function
|
|
669
|
-
return ["html", "body", "#document"].includes(
|
|
671
|
+
function B(t) {
|
|
672
|
+
return ["html", "body", "#document"].includes(U(t));
|
|
670
673
|
}
|
|
671
674
|
function R(t) {
|
|
672
675
|
return A(t).getComputedStyle(t);
|
|
673
676
|
}
|
|
674
|
-
function
|
|
677
|
+
function ft(t) {
|
|
675
678
|
return E(t) ? {
|
|
676
679
|
scrollLeft: t.scrollLeft,
|
|
677
680
|
scrollTop: t.scrollTop
|
|
@@ -680,146 +683,158 @@ function ut(t) {
|
|
|
680
683
|
scrollTop: t.scrollY
|
|
681
684
|
};
|
|
682
685
|
}
|
|
683
|
-
function
|
|
684
|
-
if (
|
|
686
|
+
function P(t) {
|
|
687
|
+
if (U(t) === "html")
|
|
685
688
|
return t;
|
|
686
689
|
const e = (
|
|
687
690
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
688
691
|
t.assignedSlot || // DOM Element detected.
|
|
689
692
|
t.parentNode || // ShadowRoot detected.
|
|
690
|
-
|
|
691
|
-
|
|
693
|
+
Dt(t) && t.host || // Fallback.
|
|
694
|
+
T(t)
|
|
692
695
|
);
|
|
693
|
-
return
|
|
696
|
+
return Dt(e) ? e.host : e;
|
|
694
697
|
}
|
|
695
|
-
function
|
|
696
|
-
const e =
|
|
697
|
-
return
|
|
698
|
+
function ne(t) {
|
|
699
|
+
const e = P(t);
|
|
700
|
+
return B(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : L(e) && J(e) ? e : ne(e);
|
|
698
701
|
}
|
|
699
|
-
function
|
|
702
|
+
function Y(t, e, n) {
|
|
700
703
|
var o;
|
|
701
704
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
702
|
-
const r =
|
|
705
|
+
const r = ne(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = A(r);
|
|
703
706
|
if (i) {
|
|
704
|
-
const c =
|
|
705
|
-
return e.concat(s, s.visualViewport || [],
|
|
707
|
+
const c = gt(s);
|
|
708
|
+
return e.concat(s, s.visualViewport || [], J(r) ? r : [], c && n ? Y(c) : []);
|
|
706
709
|
}
|
|
707
|
-
return e.concat(r,
|
|
710
|
+
return e.concat(r, Y(r, [], n));
|
|
708
711
|
}
|
|
709
|
-
function
|
|
712
|
+
function gt(t) {
|
|
710
713
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
711
714
|
}
|
|
712
|
-
function
|
|
715
|
+
function oe(t) {
|
|
713
716
|
const e = R(t);
|
|
714
717
|
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
715
|
-
const r =
|
|
718
|
+
const r = L(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = et(n) !== i || et(o) !== s;
|
|
716
719
|
return c && (n = i, o = s), {
|
|
717
720
|
width: n,
|
|
718
721
|
height: o,
|
|
719
722
|
$: c
|
|
720
723
|
};
|
|
721
724
|
}
|
|
722
|
-
function
|
|
725
|
+
function At(t) {
|
|
723
726
|
return E(t) ? t : t.contextElement;
|
|
724
727
|
}
|
|
725
|
-
function
|
|
726
|
-
const e =
|
|
727
|
-
if (!
|
|
728
|
-
return
|
|
728
|
+
function H(t) {
|
|
729
|
+
const e = At(t);
|
|
730
|
+
if (!L(e))
|
|
731
|
+
return O(1);
|
|
729
732
|
const n = e.getBoundingClientRect(), {
|
|
730
733
|
width: o,
|
|
731
734
|
height: r,
|
|
732
735
|
$: i
|
|
733
|
-
} =
|
|
734
|
-
let s = (i ?
|
|
736
|
+
} = oe(e);
|
|
737
|
+
let s = (i ? et(n.width) : n.width) / o, c = (i ? et(n.height) : n.height) / r;
|
|
735
738
|
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
736
739
|
x: s,
|
|
737
740
|
y: c
|
|
738
741
|
};
|
|
739
742
|
}
|
|
740
|
-
const
|
|
741
|
-
function
|
|
743
|
+
const _e = /* @__PURE__ */ O(0);
|
|
744
|
+
function re(t) {
|
|
742
745
|
const e = A(t);
|
|
743
|
-
return !
|
|
746
|
+
return !bt() || !e.visualViewport ? _e : {
|
|
744
747
|
x: e.visualViewport.offsetLeft,
|
|
745
748
|
y: e.visualViewport.offsetTop
|
|
746
749
|
};
|
|
747
750
|
}
|
|
748
|
-
function
|
|
751
|
+
function je(t, e, n) {
|
|
749
752
|
return e === void 0 && (e = !1), !n || e && n !== A(t) ? !1 : e;
|
|
750
753
|
}
|
|
751
|
-
function
|
|
754
|
+
function N(t, e, n, o) {
|
|
752
755
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
753
|
-
const r = t.getBoundingClientRect(), i =
|
|
754
|
-
let s =
|
|
755
|
-
e && (o ? E(o) && (s =
|
|
756
|
-
const c =
|
|
757
|
-
let a = (r.left + c.x) / s.x, l = (r.top + c.y) / s.y,
|
|
756
|
+
const r = t.getBoundingClientRect(), i = At(t);
|
|
757
|
+
let s = O(1);
|
|
758
|
+
e && (o ? E(o) && (s = H(o)) : s = H(t));
|
|
759
|
+
const c = je(i, n, o) ? re(i) : O(0);
|
|
760
|
+
let a = (r.left + c.x) / s.x, l = (r.top + c.y) / s.y, f = r.width / s.x, u = r.height / s.y;
|
|
758
761
|
if (i) {
|
|
759
762
|
const d = A(i), h = o && E(o) ? A(o) : o;
|
|
760
|
-
let p = d, g =
|
|
763
|
+
let p = d, g = gt(p);
|
|
761
764
|
for (; g && o && h !== p; ) {
|
|
762
|
-
const y =
|
|
763
|
-
a *= y.x, l *= y.y,
|
|
765
|
+
const y = H(g), m = g.getBoundingClientRect(), w = R(g), x = m.left + (g.clientLeft + parseFloat(w.paddingLeft)) * y.x, b = m.top + (g.clientTop + parseFloat(w.paddingTop)) * y.y;
|
|
766
|
+
a *= y.x, l *= y.y, f *= y.x, u *= y.y, a += x, l += b, p = A(g), g = gt(p);
|
|
764
767
|
}
|
|
765
768
|
}
|
|
766
|
-
return
|
|
767
|
-
width:
|
|
768
|
-
height:
|
|
769
|
+
return ot({
|
|
770
|
+
width: f,
|
|
771
|
+
height: u,
|
|
769
772
|
x: a,
|
|
770
773
|
y: l
|
|
771
774
|
});
|
|
772
775
|
}
|
|
773
|
-
function
|
|
776
|
+
function Et(t, e) {
|
|
777
|
+
const n = ft(t).scrollLeft;
|
|
778
|
+
return e ? e.left + n : N(T(t)).left + n;
|
|
779
|
+
}
|
|
780
|
+
function ie(t, e, n) {
|
|
781
|
+
n === void 0 && (n = !1);
|
|
782
|
+
const o = t.getBoundingClientRect(), r = o.left + e.scrollLeft - (n ? 0 : (
|
|
783
|
+
// RTL <body> scrollbar.
|
|
784
|
+
Et(t, o)
|
|
785
|
+
)), i = o.top + e.scrollTop;
|
|
786
|
+
return {
|
|
787
|
+
x: r,
|
|
788
|
+
y: i
|
|
789
|
+
};
|
|
790
|
+
}
|
|
791
|
+
function Ye(t) {
|
|
774
792
|
let {
|
|
775
793
|
elements: e,
|
|
776
794
|
rect: n,
|
|
777
795
|
offsetParent: o,
|
|
778
796
|
strategy: r
|
|
779
797
|
} = t;
|
|
780
|
-
const i = r === "fixed", s =
|
|
798
|
+
const i = r === "fixed", s = T(o), c = e ? ut(e.floating) : !1;
|
|
781
799
|
if (o === s || c && i)
|
|
782
800
|
return n;
|
|
783
801
|
let a = {
|
|
784
802
|
scrollLeft: 0,
|
|
785
803
|
scrollTop: 0
|
|
786
|
-
}, l =
|
|
787
|
-
const
|
|
788
|
-
if ((
|
|
789
|
-
const
|
|
790
|
-
l =
|
|
804
|
+
}, l = O(1);
|
|
805
|
+
const f = O(0), u = L(o);
|
|
806
|
+
if ((u || !u && !i) && ((U(o) !== "body" || J(s)) && (a = ft(o)), L(o))) {
|
|
807
|
+
const h = N(o);
|
|
808
|
+
l = H(o), f.x = h.x + o.clientLeft, f.y = h.y + o.clientTop;
|
|
791
809
|
}
|
|
810
|
+
const d = s && !u && !i ? ie(s, a, !0) : O(0);
|
|
792
811
|
return {
|
|
793
812
|
width: n.width * l.x,
|
|
794
813
|
height: n.height * l.y,
|
|
795
|
-
x: n.x * l.x - a.scrollLeft * l.x +
|
|
796
|
-
y: n.y * l.y - a.scrollTop * l.y +
|
|
814
|
+
x: n.x * l.x - a.scrollLeft * l.x + f.x + d.x,
|
|
815
|
+
y: n.y * l.y - a.scrollTop * l.y + f.y + d.y
|
|
797
816
|
};
|
|
798
817
|
}
|
|
799
|
-
function
|
|
818
|
+
function qe(t) {
|
|
800
819
|
return Array.from(t.getClientRects());
|
|
801
820
|
}
|
|
802
|
-
function
|
|
803
|
-
const n =
|
|
804
|
-
|
|
805
|
-
}
|
|
806
|
-
function _e(t) {
|
|
807
|
-
const e = L(t), n = ut(t), o = t.ownerDocument.body, r = D(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = D(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
808
|
-
let s = -n.scrollLeft + gt(t);
|
|
821
|
+
function Ke(t) {
|
|
822
|
+
const e = T(t), n = ft(t), o = t.ownerDocument.body, r = W(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = W(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
823
|
+
let s = -n.scrollLeft + Et(t);
|
|
809
824
|
const c = -n.scrollTop;
|
|
810
|
-
return R(o).direction === "rtl" && (s +=
|
|
825
|
+
return R(o).direction === "rtl" && (s += W(e.clientWidth, o.clientWidth) - r), {
|
|
811
826
|
width: r,
|
|
812
827
|
height: i,
|
|
813
828
|
x: s,
|
|
814
829
|
y: c
|
|
815
830
|
};
|
|
816
831
|
}
|
|
817
|
-
function
|
|
818
|
-
const n = A(t), o =
|
|
832
|
+
function Xe(t, e) {
|
|
833
|
+
const n = A(t), o = T(t), r = n.visualViewport;
|
|
819
834
|
let i = o.clientWidth, s = o.clientHeight, c = 0, a = 0;
|
|
820
835
|
if (r) {
|
|
821
836
|
i = r.width, s = r.height;
|
|
822
|
-
const l =
|
|
837
|
+
const l = bt();
|
|
823
838
|
(!l || l && e === "fixed") && (c = r.offsetLeft, a = r.offsetTop);
|
|
824
839
|
}
|
|
825
840
|
return {
|
|
@@ -829,8 +844,8 @@ function je(t, e) {
|
|
|
829
844
|
y: a
|
|
830
845
|
};
|
|
831
846
|
}
|
|
832
|
-
function
|
|
833
|
-
const n =
|
|
847
|
+
function Je(t, e) {
|
|
848
|
+
const n = N(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = L(t) ? H(t) : O(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, a = r * i.x, l = o * i.y;
|
|
834
849
|
return {
|
|
835
850
|
width: s,
|
|
836
851
|
height: c,
|
|
@@ -838,52 +853,53 @@ function Ye(t, e) {
|
|
|
838
853
|
y: l
|
|
839
854
|
};
|
|
840
855
|
}
|
|
841
|
-
function
|
|
856
|
+
function Wt(t, e, n) {
|
|
842
857
|
let o;
|
|
843
858
|
if (e === "viewport")
|
|
844
|
-
o =
|
|
859
|
+
o = Xe(t, n);
|
|
845
860
|
else if (e === "document")
|
|
846
|
-
o =
|
|
861
|
+
o = Ke(T(t));
|
|
847
862
|
else if (E(e))
|
|
848
|
-
o =
|
|
863
|
+
o = Je(e, n);
|
|
849
864
|
else {
|
|
850
|
-
const r =
|
|
865
|
+
const r = re(t);
|
|
851
866
|
o = {
|
|
852
|
-
...e,
|
|
853
867
|
x: e.x - r.x,
|
|
854
|
-
y: e.y - r.y
|
|
868
|
+
y: e.y - r.y,
|
|
869
|
+
width: e.width,
|
|
870
|
+
height: e.height
|
|
855
871
|
};
|
|
856
872
|
}
|
|
857
|
-
return
|
|
873
|
+
return ot(o);
|
|
858
874
|
}
|
|
859
|
-
function
|
|
860
|
-
const n =
|
|
861
|
-
return n === e || !E(n) ||
|
|
875
|
+
function se(t, e) {
|
|
876
|
+
const n = P(t);
|
|
877
|
+
return n === e || !E(n) || B(n) ? !1 : R(n).position === "fixed" || se(n, e);
|
|
862
878
|
}
|
|
863
|
-
function
|
|
879
|
+
function Ge(t, e) {
|
|
864
880
|
const n = e.get(t);
|
|
865
881
|
if (n)
|
|
866
882
|
return n;
|
|
867
|
-
let o =
|
|
883
|
+
let o = Y(t, [], !1).filter((c) => E(c) && U(c) !== "body"), r = null;
|
|
868
884
|
const i = R(t).position === "fixed";
|
|
869
|
-
let s = i ?
|
|
870
|
-
for (; E(s) && !
|
|
871
|
-
const c = R(s), a =
|
|
872
|
-
!a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) ||
|
|
885
|
+
let s = i ? P(t) : t;
|
|
886
|
+
for (; E(s) && !B(s); ) {
|
|
887
|
+
const c = R(s), a = vt(s);
|
|
888
|
+
!a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || J(s) && !a && se(t, s)) ? o = o.filter((f) => f !== s) : r = c, s = P(s);
|
|
873
889
|
}
|
|
874
890
|
return e.set(t, o), o;
|
|
875
891
|
}
|
|
876
|
-
function
|
|
892
|
+
function Qe(t) {
|
|
877
893
|
let {
|
|
878
894
|
element: e,
|
|
879
895
|
boundary: n,
|
|
880
896
|
rootBoundary: o,
|
|
881
897
|
strategy: r
|
|
882
898
|
} = t;
|
|
883
|
-
const s = [...n === "clippingAncestors" ?
|
|
884
|
-
const
|
|
885
|
-
return l.top =
|
|
886
|
-
},
|
|
899
|
+
const s = [...n === "clippingAncestors" ? ut(e) ? [] : Ge(e, this._c) : [].concat(n), o], c = s[0], a = s.reduce((l, f) => {
|
|
900
|
+
const u = Wt(e, f, r);
|
|
901
|
+
return l.top = W(u.top, l.top), l.right = tt(u.right, l.right), l.bottom = tt(u.bottom, l.bottom), l.left = W(u.left, l.left), l;
|
|
902
|
+
}, Wt(e, c, r));
|
|
887
903
|
return {
|
|
888
904
|
width: a.right - a.left,
|
|
889
905
|
height: a.bottom - a.top,
|
|
@@ -891,75 +907,69 @@ function qe(t) {
|
|
|
891
907
|
y: a.top
|
|
892
908
|
};
|
|
893
909
|
}
|
|
894
|
-
function
|
|
910
|
+
function Ze(t) {
|
|
895
911
|
const {
|
|
896
912
|
width: e,
|
|
897
913
|
height: n
|
|
898
|
-
} =
|
|
914
|
+
} = oe(t);
|
|
899
915
|
return {
|
|
900
916
|
width: e,
|
|
901
917
|
height: n
|
|
902
918
|
};
|
|
903
919
|
}
|
|
904
|
-
function
|
|
905
|
-
const o =
|
|
920
|
+
function tn(t, e, n) {
|
|
921
|
+
const o = L(e), r = T(e), i = n === "fixed", s = N(t, !0, i, e);
|
|
906
922
|
let c = {
|
|
907
923
|
scrollLeft: 0,
|
|
908
924
|
scrollTop: 0
|
|
909
925
|
};
|
|
910
|
-
const a =
|
|
926
|
+
const a = O(0);
|
|
911
927
|
if (o || !o && !i)
|
|
912
|
-
if ((
|
|
913
|
-
const
|
|
914
|
-
a.x =
|
|
915
|
-
} else r && (a.x =
|
|
916
|
-
|
|
917
|
-
if (r && !o && !i) {
|
|
918
|
-
const h = r.getBoundingClientRect();
|
|
919
|
-
u = h.top + c.scrollTop, l = h.left + c.scrollLeft - // RTL <body> scrollbar.
|
|
920
|
-
gt(r, h);
|
|
921
|
-
}
|
|
922
|
-
const f = s.left + c.scrollLeft - a.x - l, d = s.top + c.scrollTop - a.y - u;
|
|
928
|
+
if ((U(e) !== "body" || J(r)) && (c = ft(e)), o) {
|
|
929
|
+
const d = N(e, !0, i, e);
|
|
930
|
+
a.x = d.x + e.clientLeft, a.y = d.y + e.clientTop;
|
|
931
|
+
} else r && (a.x = Et(r));
|
|
932
|
+
const l = r && !o && !i ? ie(r, c) : O(0), f = s.left + c.scrollLeft - a.x - l.x, u = s.top + c.scrollTop - a.y - l.y;
|
|
923
933
|
return {
|
|
924
934
|
x: f,
|
|
925
|
-
y:
|
|
935
|
+
y: u,
|
|
926
936
|
width: s.width,
|
|
927
937
|
height: s.height
|
|
928
938
|
};
|
|
929
939
|
}
|
|
930
|
-
function
|
|
940
|
+
function dt(t) {
|
|
931
941
|
return R(t).position === "static";
|
|
932
942
|
}
|
|
933
|
-
function
|
|
934
|
-
if (!
|
|
943
|
+
function Ft(t, e) {
|
|
944
|
+
if (!L(t) || R(t).position === "fixed")
|
|
935
945
|
return null;
|
|
936
946
|
if (e)
|
|
937
947
|
return e(t);
|
|
938
948
|
let n = t.offsetParent;
|
|
939
|
-
return
|
|
949
|
+
return T(t) === n && (n = n.ownerDocument.body), n;
|
|
940
950
|
}
|
|
941
|
-
function
|
|
951
|
+
function ce(t, e) {
|
|
942
952
|
const n = A(t);
|
|
943
|
-
if (
|
|
953
|
+
if (ut(t))
|
|
944
954
|
return n;
|
|
945
|
-
if (!
|
|
946
|
-
let r =
|
|
947
|
-
for (; r && !
|
|
948
|
-
if (E(r) && !
|
|
955
|
+
if (!L(t)) {
|
|
956
|
+
let r = P(t);
|
|
957
|
+
for (; r && !B(r); ) {
|
|
958
|
+
if (E(r) && !dt(r))
|
|
949
959
|
return r;
|
|
950
|
-
r =
|
|
960
|
+
r = P(r);
|
|
951
961
|
}
|
|
952
962
|
return n;
|
|
953
963
|
}
|
|
954
|
-
let o =
|
|
955
|
-
for (; o &&
|
|
956
|
-
o =
|
|
957
|
-
return o &&
|
|
964
|
+
let o = Ft(t, e);
|
|
965
|
+
for (; o && Ue(o) && dt(o); )
|
|
966
|
+
o = Ft(o, e);
|
|
967
|
+
return o && B(o) && dt(o) && !vt(o) ? n : o || Ie(t) || n;
|
|
958
968
|
}
|
|
959
|
-
const
|
|
960
|
-
const e = this.getOffsetParent ||
|
|
969
|
+
const en = async function(t) {
|
|
970
|
+
const e = this.getOffsetParent || ce, n = this.getDimensions, o = await n(t.floating);
|
|
961
971
|
return {
|
|
962
|
-
reference:
|
|
972
|
+
reference: tn(t.reference, await e(t.floating), t.strategy),
|
|
963
973
|
floating: {
|
|
964
974
|
x: 0,
|
|
965
975
|
y: 0,
|
|
@@ -968,24 +978,24 @@ const Ge = async function(t) {
|
|
|
968
978
|
}
|
|
969
979
|
};
|
|
970
980
|
};
|
|
971
|
-
function
|
|
981
|
+
function nn(t) {
|
|
972
982
|
return R(t).direction === "rtl";
|
|
973
983
|
}
|
|
974
|
-
const
|
|
975
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
976
|
-
getDocumentElement:
|
|
977
|
-
getClippingRect:
|
|
978
|
-
getOffsetParent:
|
|
979
|
-
getElementRects:
|
|
980
|
-
getClientRects:
|
|
981
|
-
getDimensions:
|
|
982
|
-
getScale:
|
|
984
|
+
const on = {
|
|
985
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ye,
|
|
986
|
+
getDocumentElement: T,
|
|
987
|
+
getClippingRect: Qe,
|
|
988
|
+
getOffsetParent: ce,
|
|
989
|
+
getElementRects: en,
|
|
990
|
+
getClientRects: qe,
|
|
991
|
+
getDimensions: Ze,
|
|
992
|
+
getScale: H,
|
|
983
993
|
isElement: E,
|
|
984
|
-
isRTL:
|
|
994
|
+
isRTL: nn
|
|
985
995
|
};
|
|
986
|
-
function
|
|
996
|
+
function rn(t, e) {
|
|
987
997
|
let n = null, o;
|
|
988
|
-
const r =
|
|
998
|
+
const r = T(t);
|
|
989
999
|
function i() {
|
|
990
1000
|
var c;
|
|
991
1001
|
clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
|
|
@@ -994,23 +1004,23 @@ function tn(t, e) {
|
|
|
994
1004
|
c === void 0 && (c = !1), a === void 0 && (a = 1), i();
|
|
995
1005
|
const {
|
|
996
1006
|
left: l,
|
|
997
|
-
top:
|
|
998
|
-
width:
|
|
1007
|
+
top: f,
|
|
1008
|
+
width: u,
|
|
999
1009
|
height: d
|
|
1000
1010
|
} = t.getBoundingClientRect();
|
|
1001
|
-
if (c || e(), !
|
|
1011
|
+
if (c || e(), !u || !d)
|
|
1002
1012
|
return;
|
|
1003
|
-
const h =
|
|
1013
|
+
const h = Q(f), p = Q(r.clientWidth - (l + u)), g = Q(r.clientHeight - (f + d)), y = Q(l), w = {
|
|
1004
1014
|
rootMargin: -h + "px " + -p + "px " + -g + "px " + -y + "px",
|
|
1005
|
-
threshold:
|
|
1015
|
+
threshold: W(0, tt(1, a)) || 1
|
|
1006
1016
|
};
|
|
1007
1017
|
let x = !0;
|
|
1008
1018
|
function b(v) {
|
|
1009
|
-
const
|
|
1010
|
-
if (
|
|
1019
|
+
const V = v[0].intersectionRatio;
|
|
1020
|
+
if (V !== a) {
|
|
1011
1021
|
if (!x)
|
|
1012
1022
|
return s();
|
|
1013
|
-
|
|
1023
|
+
V ? s(!1, V) : o = setTimeout(() => {
|
|
1014
1024
|
s(!1, 1e-7);
|
|
1015
1025
|
}, 1e3);
|
|
1016
1026
|
}
|
|
@@ -1029,7 +1039,7 @@ function tn(t, e) {
|
|
|
1029
1039
|
}
|
|
1030
1040
|
return s(!0), i;
|
|
1031
1041
|
}
|
|
1032
|
-
function
|
|
1042
|
+
function sn(t, e, n, o) {
|
|
1033
1043
|
o === void 0 && (o = {});
|
|
1034
1044
|
const {
|
|
1035
1045
|
ancestorScroll: r = !0,
|
|
@@ -1037,13 +1047,13 @@ function en(t, e, n, o) {
|
|
|
1037
1047
|
elementResize: s = typeof ResizeObserver == "function",
|
|
1038
1048
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1039
1049
|
animationFrame: a = !1
|
|
1040
|
-
} = o, l =
|
|
1041
|
-
|
|
1050
|
+
} = o, l = At(t), f = r || i ? [...l ? Y(l) : [], ...Y(e)] : [];
|
|
1051
|
+
f.forEach((m) => {
|
|
1042
1052
|
r && m.addEventListener("scroll", n, {
|
|
1043
1053
|
passive: !0
|
|
1044
1054
|
}), i && m.addEventListener("resize", n);
|
|
1045
1055
|
});
|
|
1046
|
-
const
|
|
1056
|
+
const u = l && c ? rn(l, n) : null;
|
|
1047
1057
|
let d = -1, h = null;
|
|
1048
1058
|
s && (h = new ResizeObserver((m) => {
|
|
1049
1059
|
let [w] = m;
|
|
@@ -1052,94 +1062,96 @@ function en(t, e, n, o) {
|
|
|
1052
1062
|
(x = h) == null || x.observe(e);
|
|
1053
1063
|
})), n();
|
|
1054
1064
|
}), l && !a && h.observe(l), h.observe(e));
|
|
1055
|
-
let p, g = a ?
|
|
1065
|
+
let p, g = a ? N(t) : null;
|
|
1056
1066
|
a && y();
|
|
1057
1067
|
function y() {
|
|
1058
|
-
const m =
|
|
1068
|
+
const m = N(t);
|
|
1059
1069
|
g && (m.x !== g.x || m.y !== g.y || m.width !== g.width || m.height !== g.height) && n(), g = m, p = requestAnimationFrame(y);
|
|
1060
1070
|
}
|
|
1061
1071
|
return n(), () => {
|
|
1062
1072
|
var m;
|
|
1063
|
-
|
|
1073
|
+
f.forEach((w) => {
|
|
1064
1074
|
r && w.removeEventListener("scroll", n), i && w.removeEventListener("resize", n);
|
|
1065
|
-
}),
|
|
1075
|
+
}), u == null || u(), (m = h) == null || m.disconnect(), h = null, a && cancelAnimationFrame(p);
|
|
1066
1076
|
};
|
|
1067
1077
|
}
|
|
1068
|
-
const
|
|
1078
|
+
const cn = ze, ln = Be, Mt = $e, an = (t, e, n) => {
|
|
1069
1079
|
const o = /* @__PURE__ */ new Map(), r = {
|
|
1070
|
-
platform:
|
|
1080
|
+
platform: on,
|
|
1071
1081
|
...n
|
|
1072
1082
|
}, i = {
|
|
1073
1083
|
...r.platform,
|
|
1074
1084
|
_c: o
|
|
1075
1085
|
};
|
|
1076
|
-
return
|
|
1086
|
+
return Ve(t, e, {
|
|
1077
1087
|
...r,
|
|
1078
1088
|
platform: i
|
|
1079
1089
|
});
|
|
1080
|
-
},
|
|
1090
|
+
}, Cn = ({
|
|
1081
1091
|
content: t,
|
|
1082
1092
|
open: e,
|
|
1083
1093
|
placement: n,
|
|
1084
1094
|
offset: { mainAxis: o, crossAxis: r } = { mainAxis: 0, crossAxis: 0 }
|
|
1085
1095
|
}) => wt((i) => {
|
|
1086
|
-
const s =
|
|
1087
|
-
return
|
|
1096
|
+
const s = st.toSignal(e), c = i.element;
|
|
1097
|
+
return qt(
|
|
1088
1098
|
s,
|
|
1089
|
-
|
|
1099
|
+
() => Yt(
|
|
1090
1100
|
"body",
|
|
1091
|
-
|
|
1092
|
-
|
|
1101
|
+
Ut.div(
|
|
1102
|
+
X((a) => {
|
|
1093
1103
|
const l = a;
|
|
1094
|
-
return l.style.position = "absolute",
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1104
|
+
return l.style.position = "absolute", k(
|
|
1105
|
+
sn(c, l, () => {
|
|
1106
|
+
an(c, l, {
|
|
1107
|
+
placement: n,
|
|
1108
|
+
strategy: "absolute",
|
|
1109
|
+
middleware: [
|
|
1110
|
+
Mt(),
|
|
1111
|
+
cn({ mainAxis: o, crossAxis: r }),
|
|
1112
|
+
ln(),
|
|
1113
|
+
Mt()
|
|
1114
|
+
]
|
|
1115
|
+
}).then(({ x: f, y: u }) => {
|
|
1116
|
+
l.style.top = `${u}px`, l.style.left = `${f}px`;
|
|
1117
|
+
});
|
|
1118
|
+
})
|
|
1119
|
+
);
|
|
1108
1120
|
}),
|
|
1109
1121
|
t()
|
|
1110
1122
|
)
|
|
1111
1123
|
)
|
|
1112
|
-
)
|
|
1113
|
-
}),
|
|
1124
|
+
);
|
|
1125
|
+
}), un = (t, e) => {
|
|
1114
1126
|
if (typeof e == "function")
|
|
1115
|
-
return
|
|
1116
|
-
const n = e.failure ?? ((r) =>
|
|
1117
|
-
|
|
1127
|
+
return un(t, { success: e });
|
|
1128
|
+
const n = e.failure ?? ((r) => K(
|
|
1129
|
+
k(r.on(console.error)),
|
|
1118
1130
|
r.map((i) => `Error: ${i}`)
|
|
1119
1131
|
)), o = e.success;
|
|
1120
|
-
return
|
|
1132
|
+
return jt(st.toSignal(t), {
|
|
1121
1133
|
Success: (r) => o(r.$.value),
|
|
1122
1134
|
Failure: (r) => n(r.$.error)
|
|
1123
1135
|
});
|
|
1124
|
-
},
|
|
1136
|
+
}, Pn = () => It.focus((t) => {
|
|
1125
1137
|
var e;
|
|
1126
1138
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1127
|
-
}),
|
|
1128
|
-
const { element: n } = e, o =
|
|
1139
|
+
}), Dn = (t) => wt((e) => {
|
|
1140
|
+
const { element: n } = e, o = F({
|
|
1129
1141
|
width: n.clientWidth,
|
|
1130
1142
|
height: n.clientHeight
|
|
1131
|
-
}), r =
|
|
1143
|
+
}), r = it(t(o))(e), i = () => {
|
|
1132
1144
|
o.set({ width: n.clientWidth, height: n.clientHeight });
|
|
1133
1145
|
};
|
|
1134
1146
|
let s;
|
|
1135
|
-
return typeof ResizeObserver == "function" && (s = new ResizeObserver(i), s.observe(n)), (c) => {
|
|
1147
|
+
return typeof ResizeObserver == "function" && (s = new ResizeObserver(i), s.observe(n)), k((c) => {
|
|
1136
1148
|
s == null || s.disconnect(), r(c);
|
|
1137
|
-
};
|
|
1138
|
-
}),
|
|
1139
|
-
const n = xt(), o =
|
|
1149
|
+
});
|
|
1150
|
+
}), Wn = (t) => (e) => {
|
|
1151
|
+
const n = xt(), o = F({
|
|
1140
1152
|
width: (n == null ? void 0 : n.innerWidth) ?? 0,
|
|
1141
1153
|
height: (n == null ? void 0 : n.innerHeight) ?? 0
|
|
1142
|
-
}), r =
|
|
1154
|
+
}), r = it(t(o))(e), i = () => {
|
|
1143
1155
|
o.set({
|
|
1144
1156
|
width: (n == null ? void 0 : n.innerWidth) ?? 0,
|
|
1145
1157
|
height: (n == null ? void 0 : n.innerHeight) ?? 0
|
|
@@ -1148,7 +1160,7 @@ const nn = Ne, on = Ve, Ft = Fe, rn = (t, e, n) => {
|
|
|
1148
1160
|
return n == null || n.addEventListener("resize", i), (s) => {
|
|
1149
1161
|
n == null || n.removeEventListener("resize", i), r(s);
|
|
1150
1162
|
};
|
|
1151
|
-
},
|
|
1163
|
+
}, fn = (t, e) => {
|
|
1152
1164
|
const n = e.split("/").filter((r) => r !== ""), o = {};
|
|
1153
1165
|
for (let r = 0; r < t.length; r++) {
|
|
1154
1166
|
const i = t[r], s = n[r];
|
|
@@ -1163,21 +1175,21 @@ const nn = Ne, on = Ve, Ft = Fe, rn = (t, e, n) => {
|
|
|
1163
1175
|
return { params: o, path: e };
|
|
1164
1176
|
}
|
|
1165
1177
|
return n.length !== t.length ? null : { params: o, path: e };
|
|
1166
|
-
},
|
|
1178
|
+
}, hn = (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 !== ""), dn = (t) => {
|
|
1167
1179
|
const e = t.map((n) => {
|
|
1168
|
-
const o =
|
|
1180
|
+
const o = hn(n);
|
|
1169
1181
|
return { route: n, segments: o };
|
|
1170
1182
|
});
|
|
1171
1183
|
return function(o) {
|
|
1172
1184
|
for (const { segments: r, route: i } of e) {
|
|
1173
|
-
const s =
|
|
1185
|
+
const s = fn(r, o);
|
|
1174
1186
|
if (s)
|
|
1175
1187
|
return { ...s, route: i };
|
|
1176
1188
|
}
|
|
1177
1189
|
return null;
|
|
1178
1190
|
};
|
|
1179
|
-
},
|
|
1180
|
-
const e =
|
|
1191
|
+
}, Fn = (t) => {
|
|
1192
|
+
const e = dn(Object.keys(t));
|
|
1181
1193
|
return Xt((n) => {
|
|
1182
1194
|
const o = n.map((r) => {
|
|
1183
1195
|
const i = e(r.pathname);
|
|
@@ -1191,16 +1203,16 @@ const nn = Ne, on = Ve, Ft = Fe, rn = (t, e, n) => {
|
|
|
1191
1203
|
hash: r.hash
|
|
1192
1204
|
};
|
|
1193
1205
|
});
|
|
1194
|
-
return
|
|
1206
|
+
return pe(
|
|
1195
1207
|
o.map((r) => [r.route, r]),
|
|
1196
1208
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1197
1209
|
t
|
|
1198
1210
|
);
|
|
1199
1211
|
});
|
|
1200
|
-
},
|
|
1212
|
+
}, rt = 60 * 1e3, yt = 60 * rt, q = 24 * yt, Nt = 7 * q, Vt = 30 * q, mn = 365 * q, pn = [
|
|
1201
1213
|
{
|
|
1202
|
-
max:
|
|
1203
|
-
value:
|
|
1214
|
+
max: rt * 90,
|
|
1215
|
+
value: rt,
|
|
1204
1216
|
name: "minute",
|
|
1205
1217
|
past: { singular: "a minute ago", plural: "{} minutes ago" },
|
|
1206
1218
|
future: { singular: "in a minute", plural: "in {} minutes" }
|
|
@@ -1213,35 +1225,35 @@ const nn = Ne, on = Ve, Ft = Fe, rn = (t, e, n) => {
|
|
|
1213
1225
|
future: { singular: "in an hour", plural: "in {} hours" }
|
|
1214
1226
|
},
|
|
1215
1227
|
{
|
|
1216
|
-
max:
|
|
1217
|
-
value:
|
|
1228
|
+
max: q * 10,
|
|
1229
|
+
value: q,
|
|
1218
1230
|
name: "day",
|
|
1219
1231
|
past: { singular: "yesterday", plural: "{} days ago" },
|
|
1220
1232
|
future: { singular: "tomorrow", plural: "in {} days" }
|
|
1221
1233
|
},
|
|
1222
1234
|
{
|
|
1223
|
-
max:
|
|
1224
|
-
value:
|
|
1235
|
+
max: Nt * 6,
|
|
1236
|
+
value: Nt,
|
|
1225
1237
|
name: "week",
|
|
1226
1238
|
past: { singular: "last week", plural: "{} weeks ago" },
|
|
1227
1239
|
future: { singular: "in a week", plural: "in {} weeks" }
|
|
1228
1240
|
},
|
|
1229
1241
|
{
|
|
1230
|
-
max:
|
|
1231
|
-
value:
|
|
1242
|
+
max: Vt * 18,
|
|
1243
|
+
value: Vt,
|
|
1232
1244
|
name: "month",
|
|
1233
1245
|
past: { singular: "last month", plural: "{} months ago" },
|
|
1234
1246
|
future: { singular: "in a month", plural: "in {} months" }
|
|
1235
1247
|
},
|
|
1236
1248
|
{
|
|
1237
1249
|
max: 1 / 0,
|
|
1238
|
-
value:
|
|
1250
|
+
value: mn,
|
|
1239
1251
|
name: "year",
|
|
1240
1252
|
past: { singular: "last year", plural: "{} years ago" },
|
|
1241
1253
|
future: { singular: "in a year", plural: "in {} years" }
|
|
1242
1254
|
}
|
|
1243
1255
|
];
|
|
1244
|
-
function
|
|
1256
|
+
function $t(t, e, n, o) {
|
|
1245
1257
|
const r = Math.round(t / e);
|
|
1246
1258
|
return r <= 1 ? n : o.replace(
|
|
1247
1259
|
"{}",
|
|
@@ -1251,58 +1263,67 @@ function Vt(t, e, n, o) {
|
|
|
1251
1263
|
})
|
|
1252
1264
|
);
|
|
1253
1265
|
}
|
|
1254
|
-
function
|
|
1266
|
+
function gn(t) {
|
|
1255
1267
|
const e = Math.abs(t);
|
|
1256
|
-
if (e <
|
|
1268
|
+
if (e < rt)
|
|
1257
1269
|
return t < 0 ? "just now" : "in a moment";
|
|
1258
|
-
for (const n of
|
|
1270
|
+
for (const n of pn)
|
|
1259
1271
|
if (e < n.max)
|
|
1260
|
-
return t < 0 ?
|
|
1272
|
+
return t < 0 ? $t(e, n.value, n.past.singular, n.past.plural) : $t(e, n.value, n.future.singular, n.future.plural);
|
|
1261
1273
|
throw new Error("unreachable");
|
|
1262
1274
|
}
|
|
1263
|
-
const
|
|
1264
|
-
const n = e != null ?
|
|
1275
|
+
const Mn = (t, e) => {
|
|
1276
|
+
const n = e != null ? Bt.is(e) ? e.derive() : F(e) : F(/* @__PURE__ */ new Date()), o = ge(
|
|
1265
1277
|
t,
|
|
1266
1278
|
n
|
|
1267
1279
|
)((i, s) => {
|
|
1268
1280
|
const c = i.getTime() - s.getTime();
|
|
1269
|
-
return
|
|
1270
|
-
}), r =
|
|
1281
|
+
return gn(c);
|
|
1282
|
+
}), r = Kt.is(n) ? setInterval(() => n.set(/* @__PURE__ */ new Date()), 5e3) : void 0;
|
|
1271
1283
|
return o.onDispose(() => {
|
|
1272
1284
|
r != null && clearInterval(r), n.dispose();
|
|
1273
1285
|
}), o;
|
|
1274
1286
|
};
|
|
1287
|
+
class yn extends Kt {
|
|
1288
|
+
constructor() {
|
|
1289
|
+
super(...arguments);
|
|
1290
|
+
kt(this, "tick", () => this.update((n) => n + 1));
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
const Nn = (t = 0) => new yn(t, (e, n) => e === n);
|
|
1275
1294
|
export {
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1295
|
+
Re as Anchor,
|
|
1296
|
+
Oe as AsyncResultView,
|
|
1297
|
+
On as AutoFocus,
|
|
1298
|
+
Ln as AutoSelect,
|
|
1299
|
+
Dn as ElementSize,
|
|
1300
|
+
kn as HTMLTitle,
|
|
1301
|
+
Tn as HiddenWhenEmpty,
|
|
1302
|
+
ke as InViewport,
|
|
1303
|
+
be as LocationProviderMarker,
|
|
1304
|
+
Cn as PopOver,
|
|
1305
|
+
En as ProvideAppearance,
|
|
1306
|
+
vn as ProvideLocation,
|
|
1307
|
+
un as ResultView,
|
|
1308
|
+
Fn as Router,
|
|
1309
|
+
Pn as SelectOnFocus,
|
|
1310
|
+
yn as Ticker,
|
|
1311
|
+
Rn as UseAppearance,
|
|
1292
1312
|
Xt as UseLocation,
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
gn as
|
|
1313
|
+
Sn as WhenInViewport,
|
|
1314
|
+
Wn as WindowSize,
|
|
1315
|
+
we as _checkExtensionCondition,
|
|
1316
|
+
ye as _getExtension,
|
|
1317
|
+
dn as _makeRouteMatcher,
|
|
1318
|
+
hn as _parseRouteSegments,
|
|
1319
|
+
Jt as appearanceMarker,
|
|
1320
|
+
bn as areLocationsEqual,
|
|
1321
|
+
ve as handleAnchorClick,
|
|
1322
|
+
Ae as locationFromURL,
|
|
1323
|
+
Mn as makeRelativeTime,
|
|
1324
|
+
Nn as makeTicker,
|
|
1325
|
+
fn as matchesRoute,
|
|
1326
|
+
Ee as setLocationFromUrl,
|
|
1327
|
+
gn as timeDiffToString,
|
|
1328
|
+
An as urlFromLocation
|
|
1308
1329
|
};
|