@tempots/ui 0.23.0-next.8 → 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 +506 -460
- 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 fe = (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,92 +35,92 @@ const fe = (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
|
-
|
|
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
|
-
),
|
|
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
|
-
const n = new URL(t, e ?? ((i =
|
|
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;
|
|
62
65
|
return r.startsWith("#") && (r = r.substring(1)), {
|
|
63
66
|
pathname: n.pathname,
|
|
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
|
|
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 =
|
|
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 fe = (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
|
-
function
|
|
171
|
-
return
|
|
173
|
+
function Ct(t, e, n) {
|
|
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 Te(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 Ce(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 Tt(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 Tt(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 Pe = 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 Pe = 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 Pe = 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 Pe = 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 Kt(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 Kt(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 Kt(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 De = 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
|
-
}], !
|
|
453
|
-
var
|
|
454
|
-
const
|
|
455
|
-
if (
|
|
454
|
+
overflows: G
|
|
455
|
+
}], !G.every((D) => D <= 0)) {
|
|
456
|
+
var Rt, Ot;
|
|
457
|
+
const D = (((Rt = i.flip) == null ? void 0 : Rt.index) || 0) + 1, Tt = le[D];
|
|
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
|
-
placement:
|
|
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
|
-
var
|
|
470
|
-
const
|
|
471
|
-
if (
|
|
472
|
-
const
|
|
473
|
-
return
|
|
472
|
+
var Lt;
|
|
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,35 +497,34 @@ const De = 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: 0,
|
|
513
|
-
crossAxis: 0,
|
|
514
|
-
alignmentAxis:
|
|
515
|
-
...f
|
|
515
|
+
mainAxis: u.mainAxis || 0,
|
|
516
|
+
crossAxis: u.crossAxis || 0,
|
|
517
|
+
alignmentAxis: u.alignmentAxis
|
|
516
518
|
};
|
|
517
519
|
return c && typeof p == "number" && (h = c === "end" ? p * -1 : p), a ? {
|
|
518
|
-
x: h *
|
|
520
|
+
x: h * f,
|
|
519
521
|
y: d * l
|
|
520
522
|
} : {
|
|
521
523
|
x: d * l,
|
|
522
|
-
y: h *
|
|
524
|
+
y: h * f
|
|
523
525
|
};
|
|
524
526
|
}
|
|
525
|
-
const
|
|
527
|
+
const ze = function(t) {
|
|
526
528
|
return t === void 0 && (t = 0), {
|
|
527
529
|
name: "offset",
|
|
528
530
|
options: t,
|
|
@@ -533,7 +535,7 @@ const Fe = function(t) {
|
|
|
533
535
|
y: i,
|
|
534
536
|
placement: s,
|
|
535
537
|
middlewareData: c
|
|
536
|
-
} = e, a = await
|
|
538
|
+
} = e, a = await He(e, t);
|
|
537
539
|
return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
538
540
|
x: r + a.x,
|
|
539
541
|
y: i + a.y,
|
|
@@ -544,7 +546,7 @@ const Fe = function(t) {
|
|
|
544
546
|
};
|
|
545
547
|
}
|
|
546
548
|
};
|
|
547
|
-
},
|
|
549
|
+
}, Be = function(t) {
|
|
548
550
|
return t === void 0 && (t = {}), {
|
|
549
551
|
name: "shift",
|
|
550
552
|
options: t,
|
|
@@ -569,70 +571,77 @@ const Fe = function(t) {
|
|
|
569
571
|
}
|
|
570
572
|
},
|
|
571
573
|
...a
|
|
572
|
-
} =
|
|
574
|
+
} = ct(t, e), l = {
|
|
573
575
|
x: n,
|
|
574
576
|
y: o
|
|
575
|
-
},
|
|
576
|
-
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];
|
|
577
579
|
if (i) {
|
|
578
|
-
const y = d === "y" ? "top" : "left", m = d === "y" ? "bottom" : "right", w = h +
|
|
579
|
-
h =
|
|
580
|
+
const y = d === "y" ? "top" : "left", m = d === "y" ? "bottom" : "right", w = h + f[y], x = h - f[m];
|
|
581
|
+
h = Ct(w, h, x);
|
|
580
582
|
}
|
|
581
583
|
if (s) {
|
|
582
|
-
const y =
|
|
583
|
-
p =
|
|
584
|
+
const y = u === "y" ? "top" : "left", m = u === "y" ? "bottom" : "right", w = p + f[y], x = p - f[m];
|
|
585
|
+
p = Ct(w, p, x);
|
|
584
586
|
}
|
|
585
587
|
const g = c.fn({
|
|
586
588
|
...e,
|
|
587
589
|
[d]: h,
|
|
588
|
-
[
|
|
590
|
+
[u]: p
|
|
589
591
|
});
|
|
590
592
|
return {
|
|
591
593
|
...g,
|
|
592
594
|
data: {
|
|
593
595
|
x: g.x - n,
|
|
594
|
-
y: g.y - o
|
|
596
|
+
y: g.y - o,
|
|
597
|
+
enabled: {
|
|
598
|
+
[d]: i,
|
|
599
|
+
[u]: s
|
|
600
|
+
}
|
|
595
601
|
}
|
|
596
602
|
};
|
|
597
603
|
}
|
|
598
604
|
};
|
|
599
605
|
};
|
|
600
|
-
function
|
|
601
|
-
return
|
|
606
|
+
function at() {
|
|
607
|
+
return typeof window < "u";
|
|
608
|
+
}
|
|
609
|
+
function U(t) {
|
|
610
|
+
return ee(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
602
611
|
}
|
|
603
612
|
function A(t) {
|
|
604
613
|
var e;
|
|
605
614
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
606
615
|
}
|
|
607
|
-
function
|
|
616
|
+
function T(t) {
|
|
608
617
|
var e;
|
|
609
|
-
return (e = (
|
|
618
|
+
return (e = (ee(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
610
619
|
}
|
|
611
|
-
function
|
|
612
|
-
return t instanceof Node || t instanceof A(t).Node;
|
|
620
|
+
function ee(t) {
|
|
621
|
+
return at() ? t instanceof Node || t instanceof A(t).Node : !1;
|
|
613
622
|
}
|
|
614
|
-
function
|
|
615
|
-
return t instanceof Element || t instanceof A(t).Element;
|
|
623
|
+
function E(t) {
|
|
624
|
+
return at() ? t instanceof Element || t instanceof A(t).Element : !1;
|
|
616
625
|
}
|
|
617
|
-
function
|
|
618
|
-
return t instanceof HTMLElement || t instanceof A(t).HTMLElement;
|
|
626
|
+
function L(t) {
|
|
627
|
+
return at() ? t instanceof HTMLElement || t instanceof A(t).HTMLElement : !1;
|
|
619
628
|
}
|
|
620
|
-
function
|
|
621
|
-
return typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
|
|
629
|
+
function Dt(t) {
|
|
630
|
+
return !at() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
|
|
622
631
|
}
|
|
623
|
-
function
|
|
632
|
+
function J(t) {
|
|
624
633
|
const {
|
|
625
634
|
overflow: e,
|
|
626
635
|
overflowX: n,
|
|
627
636
|
overflowY: o,
|
|
628
637
|
display: r
|
|
629
|
-
} =
|
|
638
|
+
} = R(t);
|
|
630
639
|
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(r);
|
|
631
640
|
}
|
|
632
|
-
function
|
|
633
|
-
return ["table", "td", "th"].includes(
|
|
641
|
+
function Ue(t) {
|
|
642
|
+
return ["table", "td", "th"].includes(U(t));
|
|
634
643
|
}
|
|
635
|
-
function
|
|
644
|
+
function ut(t) {
|
|
636
645
|
return [":popover-open", ":modal"].some((e) => {
|
|
637
646
|
try {
|
|
638
647
|
return t.matches(e);
|
|
@@ -641,32 +650,32 @@ function lt(t) {
|
|
|
641
650
|
}
|
|
642
651
|
});
|
|
643
652
|
}
|
|
644
|
-
function
|
|
645
|
-
const e =
|
|
653
|
+
function vt(t) {
|
|
654
|
+
const e = bt(), n = E(t) ? R(t) : t;
|
|
646
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));
|
|
647
656
|
}
|
|
648
|
-
function
|
|
649
|
-
let e =
|
|
650
|
-
for (;
|
|
651
|
-
if (
|
|
652
|
-
return null;
|
|
653
|
-
if (wt(e))
|
|
657
|
+
function Ie(t) {
|
|
658
|
+
let e = P(t);
|
|
659
|
+
for (; L(e) && !B(e); ) {
|
|
660
|
+
if (vt(e))
|
|
654
661
|
return e;
|
|
655
|
-
|
|
662
|
+
if (ut(e))
|
|
663
|
+
return null;
|
|
664
|
+
e = P(e);
|
|
656
665
|
}
|
|
657
666
|
return null;
|
|
658
667
|
}
|
|
659
|
-
function
|
|
668
|
+
function bt() {
|
|
660
669
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
661
670
|
}
|
|
662
|
-
function
|
|
663
|
-
return ["html", "body", "#document"].includes(
|
|
671
|
+
function B(t) {
|
|
672
|
+
return ["html", "body", "#document"].includes(U(t));
|
|
664
673
|
}
|
|
665
|
-
function
|
|
674
|
+
function R(t) {
|
|
666
675
|
return A(t).getComputedStyle(t);
|
|
667
676
|
}
|
|
668
|
-
function
|
|
669
|
-
return
|
|
677
|
+
function ft(t) {
|
|
678
|
+
return E(t) ? {
|
|
670
679
|
scrollLeft: t.scrollLeft,
|
|
671
680
|
scrollTop: t.scrollTop
|
|
672
681
|
} : {
|
|
@@ -674,138 +683,158 @@ function at(t) {
|
|
|
674
683
|
scrollTop: t.scrollY
|
|
675
684
|
};
|
|
676
685
|
}
|
|
677
|
-
function
|
|
678
|
-
if (
|
|
686
|
+
function P(t) {
|
|
687
|
+
if (U(t) === "html")
|
|
679
688
|
return t;
|
|
680
689
|
const e = (
|
|
681
690
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
682
691
|
t.assignedSlot || // DOM Element detected.
|
|
683
692
|
t.parentNode || // ShadowRoot detected.
|
|
684
|
-
|
|
685
|
-
|
|
693
|
+
Dt(t) && t.host || // Fallback.
|
|
694
|
+
T(t)
|
|
686
695
|
);
|
|
687
|
-
return
|
|
696
|
+
return Dt(e) ? e.host : e;
|
|
688
697
|
}
|
|
689
|
-
function
|
|
690
|
-
const e =
|
|
691
|
-
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);
|
|
692
701
|
}
|
|
693
|
-
function
|
|
702
|
+
function Y(t, e, n) {
|
|
694
703
|
var o;
|
|
695
704
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
696
|
-
const r =
|
|
697
|
-
|
|
705
|
+
const r = ne(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = A(r);
|
|
706
|
+
if (i) {
|
|
707
|
+
const c = gt(s);
|
|
708
|
+
return e.concat(s, s.visualViewport || [], J(r) ? r : [], c && n ? Y(c) : []);
|
|
709
|
+
}
|
|
710
|
+
return e.concat(r, Y(r, [], n));
|
|
698
711
|
}
|
|
699
|
-
function
|
|
700
|
-
|
|
712
|
+
function gt(t) {
|
|
713
|
+
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
714
|
+
}
|
|
715
|
+
function oe(t) {
|
|
716
|
+
const e = R(t);
|
|
701
717
|
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
702
|
-
const r =
|
|
718
|
+
const r = L(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = et(n) !== i || et(o) !== s;
|
|
703
719
|
return c && (n = i, o = s), {
|
|
704
720
|
width: n,
|
|
705
721
|
height: o,
|
|
706
722
|
$: c
|
|
707
723
|
};
|
|
708
724
|
}
|
|
709
|
-
function
|
|
710
|
-
return
|
|
725
|
+
function At(t) {
|
|
726
|
+
return E(t) ? t : t.contextElement;
|
|
711
727
|
}
|
|
712
|
-
function
|
|
713
|
-
const e =
|
|
714
|
-
if (!
|
|
715
|
-
return
|
|
728
|
+
function H(t) {
|
|
729
|
+
const e = At(t);
|
|
730
|
+
if (!L(e))
|
|
731
|
+
return O(1);
|
|
716
732
|
const n = e.getBoundingClientRect(), {
|
|
717
733
|
width: o,
|
|
718
734
|
height: r,
|
|
719
735
|
$: i
|
|
720
|
-
} =
|
|
721
|
-
let s = (i ?
|
|
736
|
+
} = oe(e);
|
|
737
|
+
let s = (i ? et(n.width) : n.width) / o, c = (i ? et(n.height) : n.height) / r;
|
|
722
738
|
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
723
739
|
x: s,
|
|
724
740
|
y: c
|
|
725
741
|
};
|
|
726
742
|
}
|
|
727
|
-
const
|
|
728
|
-
function
|
|
743
|
+
const _e = /* @__PURE__ */ O(0);
|
|
744
|
+
function re(t) {
|
|
729
745
|
const e = A(t);
|
|
730
|
-
return !
|
|
746
|
+
return !bt() || !e.visualViewport ? _e : {
|
|
731
747
|
x: e.visualViewport.offsetLeft,
|
|
732
748
|
y: e.visualViewport.offsetTop
|
|
733
749
|
};
|
|
734
750
|
}
|
|
735
|
-
function
|
|
751
|
+
function je(t, e, n) {
|
|
736
752
|
return e === void 0 && (e = !1), !n || e && n !== A(t) ? !1 : e;
|
|
737
753
|
}
|
|
738
|
-
function
|
|
754
|
+
function N(t, e, n, o) {
|
|
739
755
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
740
|
-
const r = t.getBoundingClientRect(), i =
|
|
741
|
-
let s =
|
|
742
|
-
e && (o ?
|
|
743
|
-
const c =
|
|
744
|
-
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;
|
|
745
761
|
if (i) {
|
|
746
|
-
const d = A(i), h = o &&
|
|
747
|
-
let p = d, g = p
|
|
762
|
+
const d = A(i), h = o && E(o) ? A(o) : o;
|
|
763
|
+
let p = d, g = gt(p);
|
|
748
764
|
for (; g && o && h !== p; ) {
|
|
749
|
-
const y =
|
|
750
|
-
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);
|
|
751
767
|
}
|
|
752
768
|
}
|
|
753
|
-
return
|
|
754
|
-
width:
|
|
755
|
-
height:
|
|
769
|
+
return ot({
|
|
770
|
+
width: f,
|
|
771
|
+
height: u,
|
|
756
772
|
x: a,
|
|
757
773
|
y: l
|
|
758
774
|
});
|
|
759
775
|
}
|
|
760
|
-
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) {
|
|
761
792
|
let {
|
|
762
793
|
elements: e,
|
|
763
794
|
rect: n,
|
|
764
795
|
offsetParent: o,
|
|
765
796
|
strategy: r
|
|
766
797
|
} = t;
|
|
767
|
-
const i = r === "fixed", s =
|
|
798
|
+
const i = r === "fixed", s = T(o), c = e ? ut(e.floating) : !1;
|
|
768
799
|
if (o === s || c && i)
|
|
769
800
|
return n;
|
|
770
801
|
let a = {
|
|
771
802
|
scrollLeft: 0,
|
|
772
803
|
scrollTop: 0
|
|
773
|
-
}, l =
|
|
774
|
-
const
|
|
775
|
-
if ((
|
|
776
|
-
const
|
|
777
|
-
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;
|
|
778
809
|
}
|
|
810
|
+
const d = s && !u && !i ? ie(s, a, !0) : O(0);
|
|
779
811
|
return {
|
|
780
812
|
width: n.width * l.x,
|
|
781
813
|
height: n.height * l.y,
|
|
782
|
-
x: n.x * l.x - a.scrollLeft * l.x +
|
|
783
|
-
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
|
|
784
816
|
};
|
|
785
817
|
}
|
|
786
|
-
function
|
|
818
|
+
function qe(t) {
|
|
787
819
|
return Array.from(t.getClientRects());
|
|
788
820
|
}
|
|
789
|
-
function
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
function Ue(t) {
|
|
793
|
-
const e = L(t), n = at(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);
|
|
794
|
-
let s = -n.scrollLeft + te(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);
|
|
795
824
|
const c = -n.scrollTop;
|
|
796
|
-
return
|
|
825
|
+
return R(o).direction === "rtl" && (s += W(e.clientWidth, o.clientWidth) - r), {
|
|
797
826
|
width: r,
|
|
798
827
|
height: i,
|
|
799
828
|
x: s,
|
|
800
829
|
y: c
|
|
801
830
|
};
|
|
802
831
|
}
|
|
803
|
-
function
|
|
804
|
-
const n = A(t), o =
|
|
832
|
+
function Xe(t, e) {
|
|
833
|
+
const n = A(t), o = T(t), r = n.visualViewport;
|
|
805
834
|
let i = o.clientWidth, s = o.clientHeight, c = 0, a = 0;
|
|
806
835
|
if (r) {
|
|
807
836
|
i = r.width, s = r.height;
|
|
808
|
-
const l =
|
|
837
|
+
const l = bt();
|
|
809
838
|
(!l || l && e === "fixed") && (c = r.offsetLeft, a = r.offsetTop);
|
|
810
839
|
}
|
|
811
840
|
return {
|
|
@@ -815,8 +844,8 @@ function Ie(t, e) {
|
|
|
815
844
|
y: a
|
|
816
845
|
};
|
|
817
846
|
}
|
|
818
|
-
function
|
|
819
|
-
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;
|
|
820
849
|
return {
|
|
821
850
|
width: s,
|
|
822
851
|
height: c,
|
|
@@ -824,52 +853,53 @@ function _e(t, e) {
|
|
|
824
853
|
y: l
|
|
825
854
|
};
|
|
826
855
|
}
|
|
827
|
-
function
|
|
856
|
+
function Wt(t, e, n) {
|
|
828
857
|
let o;
|
|
829
858
|
if (e === "viewport")
|
|
830
|
-
o =
|
|
859
|
+
o = Xe(t, n);
|
|
831
860
|
else if (e === "document")
|
|
832
|
-
o =
|
|
833
|
-
else if (
|
|
834
|
-
o =
|
|
861
|
+
o = Ke(T(t));
|
|
862
|
+
else if (E(e))
|
|
863
|
+
o = Je(e, n);
|
|
835
864
|
else {
|
|
836
|
-
const r =
|
|
865
|
+
const r = re(t);
|
|
837
866
|
o = {
|
|
838
|
-
...e,
|
|
839
867
|
x: e.x - r.x,
|
|
840
|
-
y: e.y - r.y
|
|
868
|
+
y: e.y - r.y,
|
|
869
|
+
width: e.width,
|
|
870
|
+
height: e.height
|
|
841
871
|
};
|
|
842
872
|
}
|
|
843
|
-
return
|
|
873
|
+
return ot(o);
|
|
844
874
|
}
|
|
845
|
-
function
|
|
846
|
-
const n =
|
|
847
|
-
return n === e || !
|
|
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);
|
|
848
878
|
}
|
|
849
|
-
function
|
|
879
|
+
function Ge(t, e) {
|
|
850
880
|
const n = e.get(t);
|
|
851
881
|
if (n)
|
|
852
882
|
return n;
|
|
853
|
-
let o =
|
|
854
|
-
const i =
|
|
855
|
-
let s = i ?
|
|
856
|
-
for (;
|
|
857
|
-
const c =
|
|
858
|
-
!a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) ||
|
|
883
|
+
let o = Y(t, [], !1).filter((c) => E(c) && U(c) !== "body"), r = null;
|
|
884
|
+
const i = R(t).position === "fixed";
|
|
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);
|
|
859
889
|
}
|
|
860
890
|
return e.set(t, o), o;
|
|
861
891
|
}
|
|
862
|
-
function
|
|
892
|
+
function Qe(t) {
|
|
863
893
|
let {
|
|
864
894
|
element: e,
|
|
865
895
|
boundary: n,
|
|
866
896
|
rootBoundary: o,
|
|
867
897
|
strategy: r
|
|
868
898
|
} = t;
|
|
869
|
-
const s = [...n === "clippingAncestors" ?
|
|
870
|
-
const
|
|
871
|
-
return l.top =
|
|
872
|
-
},
|
|
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));
|
|
873
903
|
return {
|
|
874
904
|
width: a.right - a.left,
|
|
875
905
|
height: a.bottom - a.top,
|
|
@@ -877,64 +907,69 @@ function Ye(t) {
|
|
|
877
907
|
y: a.top
|
|
878
908
|
};
|
|
879
909
|
}
|
|
880
|
-
function
|
|
910
|
+
function Ze(t) {
|
|
881
911
|
const {
|
|
882
912
|
width: e,
|
|
883
913
|
height: n
|
|
884
|
-
} =
|
|
914
|
+
} = oe(t);
|
|
885
915
|
return {
|
|
886
916
|
width: e,
|
|
887
917
|
height: n
|
|
888
918
|
};
|
|
889
919
|
}
|
|
890
|
-
function
|
|
891
|
-
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);
|
|
892
922
|
let c = {
|
|
893
923
|
scrollLeft: 0,
|
|
894
924
|
scrollTop: 0
|
|
895
925
|
};
|
|
896
|
-
const a =
|
|
926
|
+
const a = O(0);
|
|
897
927
|
if (o || !o && !i)
|
|
898
|
-
if ((
|
|
899
|
-
const
|
|
900
|
-
a.x =
|
|
901
|
-
} else r && (a.x =
|
|
902
|
-
const l = s.left + c.scrollLeft - a.x, u = s.top + c.scrollTop - a.y;
|
|
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;
|
|
903
933
|
return {
|
|
904
|
-
x:
|
|
934
|
+
x: f,
|
|
905
935
|
y: u,
|
|
906
936
|
width: s.width,
|
|
907
937
|
height: s.height
|
|
908
938
|
};
|
|
909
939
|
}
|
|
910
|
-
function
|
|
911
|
-
return
|
|
940
|
+
function dt(t) {
|
|
941
|
+
return R(t).position === "static";
|
|
912
942
|
}
|
|
913
|
-
function
|
|
914
|
-
|
|
943
|
+
function Ft(t, e) {
|
|
944
|
+
if (!L(t) || R(t).position === "fixed")
|
|
945
|
+
return null;
|
|
946
|
+
if (e)
|
|
947
|
+
return e(t);
|
|
948
|
+
let n = t.offsetParent;
|
|
949
|
+
return T(t) === n && (n = n.ownerDocument.body), n;
|
|
915
950
|
}
|
|
916
|
-
function
|
|
951
|
+
function ce(t, e) {
|
|
917
952
|
const n = A(t);
|
|
918
|
-
if (
|
|
953
|
+
if (ut(t))
|
|
919
954
|
return n;
|
|
920
|
-
if (!
|
|
921
|
-
let r =
|
|
922
|
-
for (; r && !
|
|
923
|
-
if (
|
|
955
|
+
if (!L(t)) {
|
|
956
|
+
let r = P(t);
|
|
957
|
+
for (; r && !B(r); ) {
|
|
958
|
+
if (E(r) && !dt(r))
|
|
924
959
|
return r;
|
|
925
|
-
r =
|
|
960
|
+
r = P(r);
|
|
926
961
|
}
|
|
927
962
|
return n;
|
|
928
963
|
}
|
|
929
|
-
let o =
|
|
930
|
-
for (; o &&
|
|
931
|
-
o =
|
|
932
|
-
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;
|
|
933
968
|
}
|
|
934
|
-
const
|
|
935
|
-
const e = this.getOffsetParent ||
|
|
969
|
+
const en = async function(t) {
|
|
970
|
+
const e = this.getOffsetParent || ce, n = this.getDimensions, o = await n(t.floating);
|
|
936
971
|
return {
|
|
937
|
-
reference:
|
|
972
|
+
reference: tn(t.reference, await e(t.floating), t.strategy),
|
|
938
973
|
floating: {
|
|
939
974
|
x: 0,
|
|
940
975
|
y: 0,
|
|
@@ -943,24 +978,24 @@ const Ke = async function(t) {
|
|
|
943
978
|
}
|
|
944
979
|
};
|
|
945
980
|
};
|
|
946
|
-
function
|
|
947
|
-
return
|
|
948
|
-
}
|
|
949
|
-
const
|
|
950
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
951
|
-
getDocumentElement:
|
|
952
|
-
getClippingRect:
|
|
953
|
-
getOffsetParent:
|
|
954
|
-
getElementRects:
|
|
955
|
-
getClientRects:
|
|
956
|
-
getDimensions:
|
|
957
|
-
getScale:
|
|
958
|
-
isElement:
|
|
959
|
-
isRTL:
|
|
981
|
+
function nn(t) {
|
|
982
|
+
return R(t).direction === "rtl";
|
|
983
|
+
}
|
|
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,
|
|
993
|
+
isElement: E,
|
|
994
|
+
isRTL: nn
|
|
960
995
|
};
|
|
961
|
-
function
|
|
996
|
+
function rn(t, e) {
|
|
962
997
|
let n = null, o;
|
|
963
|
-
const r =
|
|
998
|
+
const r = T(t);
|
|
964
999
|
function i() {
|
|
965
1000
|
var c;
|
|
966
1001
|
clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
|
|
@@ -969,23 +1004,23 @@ function Qe(t, e) {
|
|
|
969
1004
|
c === void 0 && (c = !1), a === void 0 && (a = 1), i();
|
|
970
1005
|
const {
|
|
971
1006
|
left: l,
|
|
972
|
-
top:
|
|
973
|
-
width:
|
|
1007
|
+
top: f,
|
|
1008
|
+
width: u,
|
|
974
1009
|
height: d
|
|
975
1010
|
} = t.getBoundingClientRect();
|
|
976
|
-
if (c || e(), !
|
|
1011
|
+
if (c || e(), !u || !d)
|
|
977
1012
|
return;
|
|
978
|
-
const h =
|
|
1013
|
+
const h = Q(f), p = Q(r.clientWidth - (l + u)), g = Q(r.clientHeight - (f + d)), y = Q(l), w = {
|
|
979
1014
|
rootMargin: -h + "px " + -p + "px " + -g + "px " + -y + "px",
|
|
980
|
-
threshold:
|
|
1015
|
+
threshold: W(0, tt(1, a)) || 1
|
|
981
1016
|
};
|
|
982
1017
|
let x = !0;
|
|
983
1018
|
function b(v) {
|
|
984
|
-
const
|
|
985
|
-
if (
|
|
1019
|
+
const V = v[0].intersectionRatio;
|
|
1020
|
+
if (V !== a) {
|
|
986
1021
|
if (!x)
|
|
987
1022
|
return s();
|
|
988
|
-
|
|
1023
|
+
V ? s(!1, V) : o = setTimeout(() => {
|
|
989
1024
|
s(!1, 1e-7);
|
|
990
1025
|
}, 1e3);
|
|
991
1026
|
}
|
|
@@ -1004,7 +1039,7 @@ function Qe(t, e) {
|
|
|
1004
1039
|
}
|
|
1005
1040
|
return s(!0), i;
|
|
1006
1041
|
}
|
|
1007
|
-
function
|
|
1042
|
+
function sn(t, e, n, o) {
|
|
1008
1043
|
o === void 0 && (o = {});
|
|
1009
1044
|
const {
|
|
1010
1045
|
ancestorScroll: r = !0,
|
|
@@ -1012,13 +1047,13 @@ function Ze(t, e, n, o) {
|
|
|
1012
1047
|
elementResize: s = typeof ResizeObserver == "function",
|
|
1013
1048
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1014
1049
|
animationFrame: a = !1
|
|
1015
|
-
} = o, l =
|
|
1016
|
-
|
|
1050
|
+
} = o, l = At(t), f = r || i ? [...l ? Y(l) : [], ...Y(e)] : [];
|
|
1051
|
+
f.forEach((m) => {
|
|
1017
1052
|
r && m.addEventListener("scroll", n, {
|
|
1018
1053
|
passive: !0
|
|
1019
1054
|
}), i && m.addEventListener("resize", n);
|
|
1020
1055
|
});
|
|
1021
|
-
const
|
|
1056
|
+
const u = l && c ? rn(l, n) : null;
|
|
1022
1057
|
let d = -1, h = null;
|
|
1023
1058
|
s && (h = new ResizeObserver((m) => {
|
|
1024
1059
|
let [w] = m;
|
|
@@ -1027,94 +1062,96 @@ function Ze(t, e, n, o) {
|
|
|
1027
1062
|
(x = h) == null || x.observe(e);
|
|
1028
1063
|
})), n();
|
|
1029
1064
|
}), l && !a && h.observe(l), h.observe(e));
|
|
1030
|
-
let p, g = a ?
|
|
1065
|
+
let p, g = a ? N(t) : null;
|
|
1031
1066
|
a && y();
|
|
1032
1067
|
function y() {
|
|
1033
|
-
const m =
|
|
1068
|
+
const m = N(t);
|
|
1034
1069
|
g && (m.x !== g.x || m.y !== g.y || m.width !== g.width || m.height !== g.height) && n(), g = m, p = requestAnimationFrame(y);
|
|
1035
1070
|
}
|
|
1036
1071
|
return n(), () => {
|
|
1037
1072
|
var m;
|
|
1038
|
-
|
|
1073
|
+
f.forEach((w) => {
|
|
1039
1074
|
r && w.removeEventListener("scroll", n), i && w.removeEventListener("resize", n);
|
|
1040
|
-
}),
|
|
1075
|
+
}), u == null || u(), (m = h) == null || m.disconnect(), h = null, a && cancelAnimationFrame(p);
|
|
1041
1076
|
};
|
|
1042
1077
|
}
|
|
1043
|
-
const
|
|
1078
|
+
const cn = ze, ln = Be, Mt = $e, an = (t, e, n) => {
|
|
1044
1079
|
const o = /* @__PURE__ */ new Map(), r = {
|
|
1045
|
-
platform:
|
|
1080
|
+
platform: on,
|
|
1046
1081
|
...n
|
|
1047
1082
|
}, i = {
|
|
1048
1083
|
...r.platform,
|
|
1049
1084
|
_c: o
|
|
1050
1085
|
};
|
|
1051
|
-
return
|
|
1086
|
+
return Ve(t, e, {
|
|
1052
1087
|
...r,
|
|
1053
1088
|
platform: i
|
|
1054
1089
|
});
|
|
1055
|
-
},
|
|
1090
|
+
}, Cn = ({
|
|
1056
1091
|
content: t,
|
|
1057
1092
|
open: e,
|
|
1058
1093
|
placement: n,
|
|
1059
1094
|
offset: { mainAxis: o, crossAxis: r } = { mainAxis: 0, crossAxis: 0 }
|
|
1060
|
-
}) =>
|
|
1061
|
-
const s =
|
|
1062
|
-
return
|
|
1095
|
+
}) => wt((i) => {
|
|
1096
|
+
const s = st.toSignal(e), c = i.element;
|
|
1097
|
+
return qt(
|
|
1063
1098
|
s,
|
|
1064
|
-
|
|
1099
|
+
() => Yt(
|
|
1065
1100
|
"body",
|
|
1066
|
-
|
|
1067
|
-
|
|
1101
|
+
Ut.div(
|
|
1102
|
+
X((a) => {
|
|
1068
1103
|
const l = a;
|
|
1069
|
-
return l.style.position = "absolute",
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
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
|
+
);
|
|
1083
1120
|
}),
|
|
1084
1121
|
t()
|
|
1085
1122
|
)
|
|
1086
1123
|
)
|
|
1087
|
-
)
|
|
1088
|
-
}),
|
|
1124
|
+
);
|
|
1125
|
+
}), un = (t, e) => {
|
|
1089
1126
|
if (typeof e == "function")
|
|
1090
|
-
return
|
|
1091
|
-
const n = e.failure ?? ((r) =>
|
|
1092
|
-
|
|
1127
|
+
return un(t, { success: e });
|
|
1128
|
+
const n = e.failure ?? ((r) => K(
|
|
1129
|
+
k(r.on(console.error)),
|
|
1093
1130
|
r.map((i) => `Error: ${i}`)
|
|
1094
1131
|
)), o = e.success;
|
|
1095
|
-
return
|
|
1132
|
+
return jt(st.toSignal(t), {
|
|
1096
1133
|
Success: (r) => o(r.$.value),
|
|
1097
1134
|
Failure: (r) => n(r.$.error)
|
|
1098
1135
|
});
|
|
1099
|
-
},
|
|
1136
|
+
}, Pn = () => It.focus((t) => {
|
|
1100
1137
|
var e;
|
|
1101
1138
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1102
|
-
}),
|
|
1103
|
-
const { element: n } = e, o =
|
|
1139
|
+
}), Dn = (t) => wt((e) => {
|
|
1140
|
+
const { element: n } = e, o = F({
|
|
1104
1141
|
width: n.clientWidth,
|
|
1105
1142
|
height: n.clientHeight
|
|
1106
|
-
}), r =
|
|
1143
|
+
}), r = it(t(o))(e), i = () => {
|
|
1107
1144
|
o.set({ width: n.clientWidth, height: n.clientHeight });
|
|
1108
1145
|
};
|
|
1109
1146
|
let s;
|
|
1110
|
-
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) => {
|
|
1111
1148
|
s == null || s.disconnect(), r(c);
|
|
1112
|
-
};
|
|
1113
|
-
}),
|
|
1114
|
-
const n =
|
|
1149
|
+
});
|
|
1150
|
+
}), Wn = (t) => (e) => {
|
|
1151
|
+
const n = xt(), o = F({
|
|
1115
1152
|
width: (n == null ? void 0 : n.innerWidth) ?? 0,
|
|
1116
1153
|
height: (n == null ? void 0 : n.innerHeight) ?? 0
|
|
1117
|
-
}), r =
|
|
1154
|
+
}), r = it(t(o))(e), i = () => {
|
|
1118
1155
|
o.set({
|
|
1119
1156
|
width: (n == null ? void 0 : n.innerWidth) ?? 0,
|
|
1120
1157
|
height: (n == null ? void 0 : n.innerHeight) ?? 0
|
|
@@ -1123,7 +1160,7 @@ const tn = Fe, en = Me, Pt = De, nn = (t, e, n) => {
|
|
|
1123
1160
|
return n == null || n.addEventListener("resize", i), (s) => {
|
|
1124
1161
|
n == null || n.removeEventListener("resize", i), r(s);
|
|
1125
1162
|
};
|
|
1126
|
-
},
|
|
1163
|
+
}, fn = (t, e) => {
|
|
1127
1164
|
const n = e.split("/").filter((r) => r !== ""), o = {};
|
|
1128
1165
|
for (let r = 0; r < t.length; r++) {
|
|
1129
1166
|
const i = t[r], s = n[r];
|
|
@@ -1138,22 +1175,22 @@ const tn = Fe, en = Me, Pt = De, nn = (t, e, n) => {
|
|
|
1138
1175
|
return { params: o, path: e };
|
|
1139
1176
|
}
|
|
1140
1177
|
return n.length !== t.length ? null : { params: o, path: e };
|
|
1141
|
-
},
|
|
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) => {
|
|
1142
1179
|
const e = t.map((n) => {
|
|
1143
|
-
const o =
|
|
1180
|
+
const o = hn(n);
|
|
1144
1181
|
return { route: n, segments: o };
|
|
1145
1182
|
});
|
|
1146
1183
|
return function(o) {
|
|
1147
1184
|
for (const { segments: r, route: i } of e) {
|
|
1148
|
-
const s =
|
|
1185
|
+
const s = fn(r, o);
|
|
1149
1186
|
if (s)
|
|
1150
1187
|
return { ...s, route: i };
|
|
1151
1188
|
}
|
|
1152
1189
|
return null;
|
|
1153
1190
|
};
|
|
1154
|
-
},
|
|
1155
|
-
const e =
|
|
1156
|
-
return
|
|
1191
|
+
}, Fn = (t) => {
|
|
1192
|
+
const e = dn(Object.keys(t));
|
|
1193
|
+
return Xt((n) => {
|
|
1157
1194
|
const o = n.map((r) => {
|
|
1158
1195
|
const i = e(r.pathname);
|
|
1159
1196
|
if (i == null)
|
|
@@ -1166,57 +1203,57 @@ const tn = Fe, en = Me, Pt = De, nn = (t, e, n) => {
|
|
|
1166
1203
|
hash: r.hash
|
|
1167
1204
|
};
|
|
1168
1205
|
});
|
|
1169
|
-
return
|
|
1206
|
+
return pe(
|
|
1170
1207
|
o.map((r) => [r.route, r]),
|
|
1171
1208
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1172
1209
|
t
|
|
1173
1210
|
);
|
|
1174
1211
|
});
|
|
1175
|
-
},
|
|
1212
|
+
}, rt = 60 * 1e3, yt = 60 * rt, q = 24 * yt, Nt = 7 * q, Vt = 30 * q, mn = 365 * q, pn = [
|
|
1176
1213
|
{
|
|
1177
|
-
max:
|
|
1178
|
-
value:
|
|
1214
|
+
max: rt * 90,
|
|
1215
|
+
value: rt,
|
|
1179
1216
|
name: "minute",
|
|
1180
1217
|
past: { singular: "a minute ago", plural: "{} minutes ago" },
|
|
1181
1218
|
future: { singular: "in a minute", plural: "in {} minutes" }
|
|
1182
1219
|
},
|
|
1183
1220
|
{
|
|
1184
|
-
max:
|
|
1185
|
-
value:
|
|
1221
|
+
max: yt * 36,
|
|
1222
|
+
value: yt,
|
|
1186
1223
|
name: "hour",
|
|
1187
1224
|
past: { singular: "an hour ago", plural: "{} hours ago" },
|
|
1188
1225
|
future: { singular: "in an hour", plural: "in {} hours" }
|
|
1189
1226
|
},
|
|
1190
1227
|
{
|
|
1191
|
-
max:
|
|
1192
|
-
value:
|
|
1228
|
+
max: q * 10,
|
|
1229
|
+
value: q,
|
|
1193
1230
|
name: "day",
|
|
1194
1231
|
past: { singular: "yesterday", plural: "{} days ago" },
|
|
1195
1232
|
future: { singular: "tomorrow", plural: "in {} days" }
|
|
1196
1233
|
},
|
|
1197
1234
|
{
|
|
1198
|
-
max:
|
|
1199
|
-
value:
|
|
1235
|
+
max: Nt * 6,
|
|
1236
|
+
value: Nt,
|
|
1200
1237
|
name: "week",
|
|
1201
1238
|
past: { singular: "last week", plural: "{} weeks ago" },
|
|
1202
1239
|
future: { singular: "in a week", plural: "in {} weeks" }
|
|
1203
1240
|
},
|
|
1204
1241
|
{
|
|
1205
|
-
max:
|
|
1206
|
-
value:
|
|
1242
|
+
max: Vt * 18,
|
|
1243
|
+
value: Vt,
|
|
1207
1244
|
name: "month",
|
|
1208
1245
|
past: { singular: "last month", plural: "{} months ago" },
|
|
1209
1246
|
future: { singular: "in a month", plural: "in {} months" }
|
|
1210
1247
|
},
|
|
1211
1248
|
{
|
|
1212
1249
|
max: 1 / 0,
|
|
1213
|
-
value:
|
|
1250
|
+
value: mn,
|
|
1214
1251
|
name: "year",
|
|
1215
1252
|
past: { singular: "last year", plural: "{} years ago" },
|
|
1216
1253
|
future: { singular: "in a year", plural: "in {} years" }
|
|
1217
1254
|
}
|
|
1218
1255
|
];
|
|
1219
|
-
function
|
|
1256
|
+
function $t(t, e, n, o) {
|
|
1220
1257
|
const r = Math.round(t / e);
|
|
1221
1258
|
return r <= 1 ? n : o.replace(
|
|
1222
1259
|
"{}",
|
|
@@ -1226,58 +1263,67 @@ function Ft(t, e, n, o) {
|
|
|
1226
1263
|
})
|
|
1227
1264
|
);
|
|
1228
1265
|
}
|
|
1229
|
-
function
|
|
1266
|
+
function gn(t) {
|
|
1230
1267
|
const e = Math.abs(t);
|
|
1231
|
-
if (e <
|
|
1268
|
+
if (e < rt)
|
|
1232
1269
|
return t < 0 ? "just now" : "in a moment";
|
|
1233
|
-
for (const n of
|
|
1270
|
+
for (const n of pn)
|
|
1234
1271
|
if (e < n.max)
|
|
1235
|
-
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);
|
|
1236
1273
|
throw new Error("unreachable");
|
|
1237
1274
|
}
|
|
1238
|
-
const
|
|
1239
|
-
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(
|
|
1240
1277
|
t,
|
|
1241
1278
|
n
|
|
1242
1279
|
)((i, s) => {
|
|
1243
1280
|
const c = i.getTime() - s.getTime();
|
|
1244
|
-
return
|
|
1245
|
-
}), r =
|
|
1281
|
+
return gn(c);
|
|
1282
|
+
}), r = Kt.is(n) ? setInterval(() => n.set(/* @__PURE__ */ new Date()), 5e3) : void 0;
|
|
1246
1283
|
return o.onDispose(() => {
|
|
1247
1284
|
r != null && clearInterval(r), n.dispose();
|
|
1248
1285
|
}), o;
|
|
1249
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);
|
|
1250
1294
|
export {
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
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,
|
|
1312
|
+
Xt as UseLocation,
|
|
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
|
|
1283
1329
|
};
|