@tempots/ui 0.15.2 → 0.16.1
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/dom/animatable.d.ts +79 -0
- package/dom/handle-anchor-click.d.ts +50 -0
- package/index.cjs +1 -1
- package/index.d.ts +1 -0
- package/index.js +319 -271
- package/package.json +2 -2
- package/renderables/anchor.d.ts +26 -3
package/index.js
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
|
-
import { makeProviderMark as
|
|
2
|
-
const
|
|
1
|
+
import { makeProviderMark as Lt, makeProp as H, Fragment as q, OnUnmount as Y, WithProvider as Ot, UseProvider as St, renderableOfTNode as ot, Signal as j, html as Tt, on as Ct, attr as kt, Empty as ut, OneOfType as Pt, makeSignal as Gt, Portal as Wt, isSSR as Qt, OnMount as Mt, When as Ft, OneOfTuple as Zt } from "@tempots/dom";
|
|
2
|
+
const te = (t) => {
|
|
3
|
+
const e = t.split("/").pop();
|
|
4
|
+
if (e == null || e.startsWith(".")) return;
|
|
5
|
+
const o = e.split(".") || [];
|
|
6
|
+
return o.length > 1 ? "." + o.pop() : void 0;
|
|
7
|
+
}, ee = (t, e) => {
|
|
8
|
+
const o = te(e);
|
|
9
|
+
return o != null && (t.length === 0 || !t.some((n) => o == n));
|
|
10
|
+
}, ne = (t, e, o, n) => {
|
|
11
|
+
let i = t.target;
|
|
12
|
+
for (; i != null && !(i instanceof HTMLAnchorElement); )
|
|
13
|
+
i = i.parentElement;
|
|
14
|
+
if (i == null)
|
|
15
|
+
return !0;
|
|
16
|
+
const r = i;
|
|
17
|
+
if (t.button !== 0 || t.ctrlKey || t.metaKey || r.target !== "_self" && r.target !== "" || r.getAttribute("download") != null)
|
|
18
|
+
return !0;
|
|
19
|
+
const { pathname: s, search: c, hash: a } = r;
|
|
20
|
+
if (n) {
|
|
21
|
+
const l = s + c + a, u = r.getAttribute("href");
|
|
22
|
+
if (!(u != null && u.startsWith("#")) && u !== l)
|
|
23
|
+
return !0;
|
|
24
|
+
}
|
|
25
|
+
return e ? !1 : ee(o, s);
|
|
26
|
+
}, oe = (t, e = {
|
|
27
|
+
ignoreUrlWithExtension: !0,
|
|
28
|
+
allowedExtensions: [],
|
|
29
|
+
ignoreExternalUrl: !0
|
|
30
|
+
}) => {
|
|
31
|
+
const o = e.ignoreUrlWithExtension === !0 && Array.isArray(e.allowedExtensions) ? e.allowedExtensions.map(
|
|
32
|
+
(n) => n.startsWith(".") ? n : "." + n
|
|
33
|
+
) : [];
|
|
34
|
+
return (n) => {
|
|
35
|
+
ne(
|
|
36
|
+
n,
|
|
37
|
+
e.ignoreUrlWithExtension ?? !0,
|
|
38
|
+
o,
|
|
39
|
+
e.ignoreExternalUrl ?? !0
|
|
40
|
+
) || t() && n.preventDefault();
|
|
41
|
+
};
|
|
42
|
+
}, Dt = Lt("LocationProvider"), ie = () => {
|
|
3
43
|
const t = (window == null ? void 0 : window.location.hash) === "" ? void 0 : (window == null ? void 0 : window.location.hash.substring(1)) ?? void 0;
|
|
4
44
|
return {
|
|
5
45
|
pathname: (window == null ? void 0 : window.location.pathname) ?? "",
|
|
@@ -8,7 +48,7 @@ const Wt = Et("LocationProvider"), ee = () => {
|
|
|
8
48
|
),
|
|
9
49
|
hash: t
|
|
10
50
|
};
|
|
11
|
-
},
|
|
51
|
+
}, re = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, se = (t) => {
|
|
12
52
|
const e = new URL(t, (window == null ? void 0 : window.location.toString()) ?? ""), o = Object.fromEntries(e.searchParams.entries());
|
|
13
53
|
let n = e.hash;
|
|
14
54
|
return n.startsWith("#") && (n = n.substring(1)), {
|
|
@@ -16,14 +56,14 @@ const Wt = Et("LocationProvider"), ee = () => {
|
|
|
16
56
|
search: o,
|
|
17
57
|
hash: n === "" ? void 0 : n
|
|
18
58
|
};
|
|
19
|
-
},
|
|
20
|
-
const o =
|
|
59
|
+
}, ce = (t, e) => {
|
|
60
|
+
const o = se(e);
|
|
21
61
|
return t.set(o), t;
|
|
22
|
-
},
|
|
62
|
+
}, le = (t) => {
|
|
23
63
|
const o = new URLSearchParams(t.search).toString(), n = t.hash;
|
|
24
64
|
return `${t.pathname}${o ? `?${o}` : ""}${n ? `#${n}` : ""}`;
|
|
25
|
-
},
|
|
26
|
-
const t =
|
|
65
|
+
}, ae = () => {
|
|
66
|
+
const t = H(ie(), re), e = () => {
|
|
27
67
|
let o = (window == null ? void 0 : window.location.hash) ?? "";
|
|
28
68
|
o.startsWith("#") && (o = o.substring(1));
|
|
29
69
|
const n = {
|
|
@@ -38,55 +78,60 @@ const Wt = Et("LocationProvider"), ee = () => {
|
|
|
38
78
|
return window == null || window.addEventListener("popstate", e), t.onDispose(() => {
|
|
39
79
|
window == null || window.removeEventListener("popstate", e);
|
|
40
80
|
}), t.on((o) => {
|
|
41
|
-
window == null || window.history.pushState({}, "",
|
|
81
|
+
window == null || window.history.pushState({}, "", le(o));
|
|
42
82
|
}), t;
|
|
43
|
-
},
|
|
44
|
-
const e =
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
|
|
83
|
+
}, tn = (t) => {
|
|
84
|
+
const e = ae();
|
|
85
|
+
return q(
|
|
86
|
+
Y(e.dispose),
|
|
87
|
+
Ot(Dt, e, t)
|
|
48
88
|
);
|
|
49
|
-
}, Nt = (t) => St(
|
|
50
|
-
const n =
|
|
89
|
+
}, Nt = (t) => St(Dt, (e) => (o) => {
|
|
90
|
+
const n = H(e.value, e.equals);
|
|
51
91
|
e.feedProp(n), n.on(e.set);
|
|
52
|
-
const i =
|
|
92
|
+
const i = ot(t(n))(o);
|
|
53
93
|
return (r) => {
|
|
54
94
|
n.dispose(), i(r);
|
|
55
95
|
};
|
|
56
|
-
}),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
)
|
|
63
|
-
|
|
96
|
+
}), ue = (t, ...e) => {
|
|
97
|
+
if (typeof t == "string" || j.is(t))
|
|
98
|
+
return ue({ href: t }, ...e);
|
|
99
|
+
const { href: o, ...n } = t;
|
|
100
|
+
return Nt((i) => Tt.a(
|
|
101
|
+
Ct.click(
|
|
102
|
+
oe(() => (ce(i, j.unwrap(o)), !0), n)
|
|
103
|
+
),
|
|
104
|
+
kt.href(o),
|
|
105
|
+
...e
|
|
106
|
+
));
|
|
107
|
+
}, $t = Lt("Appearance"), en = (t) => {
|
|
108
|
+
const e = window.matchMedia != null && window.matchMedia("(prefers-color-scheme: dark)").matches, o = H(e ? "dark" : "light"), n = (r) => {
|
|
64
109
|
o.set(r.matches ? "dark" : "light");
|
|
65
110
|
}, i = window.matchMedia != null ? window.matchMedia("(prefers-color-scheme: dark)") : void 0;
|
|
66
|
-
return i == null || i.addEventListener("change", n),
|
|
67
|
-
|
|
68
|
-
|
|
111
|
+
return i == null || i.addEventListener("change", n), q(
|
|
112
|
+
Ot($t, o, t),
|
|
113
|
+
Y(() => i == null ? void 0 : i.removeEventListener("change", n))
|
|
69
114
|
);
|
|
70
|
-
},
|
|
115
|
+
}, nn = (t) => St($t, t), fe = (t, e) => {
|
|
71
116
|
if (typeof e == "function")
|
|
72
|
-
return
|
|
73
|
-
const o = e.failure ?? ((s) =>
|
|
74
|
-
|
|
117
|
+
return fe(t, { success: e });
|
|
118
|
+
const o = e.failure ?? ((s) => q(
|
|
119
|
+
Y(s.on(console.error)),
|
|
75
120
|
s.map((c) => `Error: ${c}`)
|
|
76
|
-
)), n = e.success, i = e.loading ?? (() =>
|
|
77
|
-
return Pt(
|
|
121
|
+
)), n = e.success, i = e.loading ?? (() => ut), r = e.notAsked ?? (() => ut);
|
|
122
|
+
return Pt(j.wrap(t), {
|
|
78
123
|
AsyncSuccess: (s) => n(s.$.value),
|
|
79
124
|
AsyncFailure: (s) => o(s.$.error),
|
|
80
|
-
Loading: (s) => i(s.$.previousValue ??
|
|
125
|
+
Loading: (s) => i(s.$.previousValue ?? Gt(void 0)),
|
|
81
126
|
NotAsked: r
|
|
82
127
|
});
|
|
83
|
-
},
|
|
128
|
+
}, on = (t = 10) => (e) => {
|
|
84
129
|
const o = setTimeout(() => {
|
|
85
130
|
var n;
|
|
86
131
|
(n = e.element) == null || n.focus();
|
|
87
132
|
}, t);
|
|
88
133
|
return (n) => clearTimeout(o);
|
|
89
|
-
},
|
|
134
|
+
}, rn = (t = 10) => (e) => {
|
|
90
135
|
const o = setTimeout(() => {
|
|
91
136
|
var n;
|
|
92
137
|
(n = e.element) == null || n.select();
|
|
@@ -94,12 +139,12 @@ const Wt = Et("LocationProvider"), ee = () => {
|
|
|
94
139
|
return (n) => {
|
|
95
140
|
clearTimeout(o);
|
|
96
141
|
};
|
|
97
|
-
},
|
|
142
|
+
}, sn = (t) => {
|
|
98
143
|
const e = t.element, o = e.style.getPropertyValue(":empty");
|
|
99
144
|
return e.style.setProperty(":empty", "display:none"), (n) => {
|
|
100
145
|
n && e.style.setProperty(":empty", o);
|
|
101
146
|
};
|
|
102
|
-
},
|
|
147
|
+
}, cn = (t) => Wt("head > title", kt.innerText(t)), he = {
|
|
103
148
|
partial: {
|
|
104
149
|
root: null,
|
|
105
150
|
rootMargin: "0px",
|
|
@@ -110,48 +155,48 @@ const Wt = Et("LocationProvider"), ee = () => {
|
|
|
110
155
|
rootMargin: "0px",
|
|
111
156
|
threshold: 1
|
|
112
157
|
}
|
|
113
|
-
},
|
|
158
|
+
}, Q = {
|
|
114
159
|
partial: /* @__PURE__ */ new Map(),
|
|
115
160
|
full: /* @__PURE__ */ new Map()
|
|
116
|
-
},
|
|
161
|
+
}, I = {
|
|
117
162
|
partial: null,
|
|
118
163
|
full: null
|
|
119
164
|
};
|
|
120
|
-
function
|
|
121
|
-
return
|
|
165
|
+
function de(t) {
|
|
166
|
+
return I[t] == null && (I[t] = new IntersectionObserver((e) => {
|
|
122
167
|
e.forEach((o) => {
|
|
123
|
-
const n =
|
|
168
|
+
const n = Q[t].get(o.target);
|
|
124
169
|
n == null || n.set(o.isIntersecting);
|
|
125
170
|
});
|
|
126
|
-
},
|
|
171
|
+
}, he[t])), I[t];
|
|
127
172
|
}
|
|
128
|
-
const
|
|
129
|
-
const o =
|
|
130
|
-
return
|
|
173
|
+
const me = (t, e) => {
|
|
174
|
+
const o = H(Qt());
|
|
175
|
+
return q(
|
|
131
176
|
Mt((n) => {
|
|
132
|
-
const i = typeof IntersectionObserver < "u" ?
|
|
133
|
-
return
|
|
177
|
+
const i = typeof IntersectionObserver < "u" ? de(t) : null;
|
|
178
|
+
return Q[t].set(n, o), i == null || i.observe(n), () => {
|
|
134
179
|
var r;
|
|
135
|
-
i == null || i.unobserve(n),
|
|
180
|
+
i == null || i.unobserve(n), Q[t].delete(n), Q[t].size === 0 && ((r = I[t]) == null || r.disconnect(), I[t] = null);
|
|
136
181
|
};
|
|
137
182
|
}),
|
|
138
|
-
|
|
139
|
-
|
|
183
|
+
Y(o.dispose),
|
|
184
|
+
ot(e(o))
|
|
140
185
|
);
|
|
141
|
-
},
|
|
186
|
+
}, ln = (t, e, o) => me(t, (n) => Ft(n, e, o ?? ut)), Z = Math.min, W = Math.max, tt = Math.round, G = Math.floor, C = (t) => ({
|
|
142
187
|
x: t,
|
|
143
188
|
y: t
|
|
144
|
-
}),
|
|
189
|
+
}), pe = {
|
|
145
190
|
left: "right",
|
|
146
191
|
right: "left",
|
|
147
192
|
bottom: "top",
|
|
148
193
|
top: "bottom"
|
|
149
|
-
},
|
|
194
|
+
}, ge = {
|
|
150
195
|
start: "end",
|
|
151
196
|
end: "start"
|
|
152
197
|
};
|
|
153
198
|
function xt(t, e, o) {
|
|
154
|
-
return
|
|
199
|
+
return W(t, Z(e, o));
|
|
155
200
|
}
|
|
156
201
|
function it(t, e) {
|
|
157
202
|
return typeof t == "function" ? t(e) : t;
|
|
@@ -171,23 +216,23 @@ function zt(t) {
|
|
|
171
216
|
function V(t) {
|
|
172
217
|
return ["top", "bottom"].includes(M(t)) ? "y" : "x";
|
|
173
218
|
}
|
|
174
|
-
function
|
|
219
|
+
function Ht(t) {
|
|
175
220
|
return Vt(V(t));
|
|
176
221
|
}
|
|
177
|
-
function
|
|
222
|
+
function we(t, e, o) {
|
|
178
223
|
o === void 0 && (o = !1);
|
|
179
|
-
const n = rt(t), i =
|
|
224
|
+
const n = rt(t), i = Ht(t), r = zt(i);
|
|
180
225
|
let s = i === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
181
|
-
return e.reference[r] > e.floating[r] && (s =
|
|
226
|
+
return e.reference[r] > e.floating[r] && (s = et(s)), [s, et(s)];
|
|
182
227
|
}
|
|
183
|
-
function
|
|
184
|
-
const e =
|
|
185
|
-
return [
|
|
228
|
+
function ye(t) {
|
|
229
|
+
const e = et(t);
|
|
230
|
+
return [ft(t), e, ft(e)];
|
|
186
231
|
}
|
|
187
|
-
function
|
|
188
|
-
return t.replace(/start|end/g, (e) =>
|
|
232
|
+
function ft(t) {
|
|
233
|
+
return t.replace(/start|end/g, (e) => ge[e]);
|
|
189
234
|
}
|
|
190
|
-
function
|
|
235
|
+
function xe(t, e, o) {
|
|
191
236
|
const n = ["left", "right"], i = ["right", "left"], r = ["top", "bottom"], s = ["bottom", "top"];
|
|
192
237
|
switch (t) {
|
|
193
238
|
case "top":
|
|
@@ -200,15 +245,15 @@ function pe(t, e, o) {
|
|
|
200
245
|
return [];
|
|
201
246
|
}
|
|
202
247
|
}
|
|
203
|
-
function
|
|
248
|
+
function ve(t, e, o, n) {
|
|
204
249
|
const i = rt(t);
|
|
205
|
-
let r =
|
|
206
|
-
return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(
|
|
250
|
+
let r = xe(M(t), o === "start", n);
|
|
251
|
+
return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(ft)))), r;
|
|
207
252
|
}
|
|
208
|
-
function
|
|
209
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
253
|
+
function et(t) {
|
|
254
|
+
return t.replace(/left|right|bottom|top/g, (e) => pe[e]);
|
|
210
255
|
}
|
|
211
|
-
function
|
|
256
|
+
function be(t) {
|
|
212
257
|
return {
|
|
213
258
|
top: 0,
|
|
214
259
|
right: 0,
|
|
@@ -217,15 +262,15 @@ function we(t) {
|
|
|
217
262
|
...t
|
|
218
263
|
};
|
|
219
264
|
}
|
|
220
|
-
function
|
|
221
|
-
return typeof t != "number" ?
|
|
265
|
+
function Ae(t) {
|
|
266
|
+
return typeof t != "number" ? be(t) : {
|
|
222
267
|
top: t,
|
|
223
268
|
right: t,
|
|
224
269
|
bottom: t,
|
|
225
270
|
left: t
|
|
226
271
|
};
|
|
227
272
|
}
|
|
228
|
-
function
|
|
273
|
+
function nt(t) {
|
|
229
274
|
const {
|
|
230
275
|
x: e,
|
|
231
276
|
y: o,
|
|
@@ -248,7 +293,7 @@ function vt(t, e, o) {
|
|
|
248
293
|
reference: n,
|
|
249
294
|
floating: i
|
|
250
295
|
} = t;
|
|
251
|
-
const r = V(e), s =
|
|
296
|
+
const r = V(e), s = Ht(e), c = zt(s), a = M(e), l = r === "y", u = n.x + n.width / 2 - i.width / 2, f = n.y + n.height / 2 - i.height / 2, m = n[c] / 2 - i[c] / 2;
|
|
252
297
|
let h;
|
|
253
298
|
switch (a) {
|
|
254
299
|
case "top":
|
|
@@ -291,7 +336,7 @@ function vt(t, e, o) {
|
|
|
291
336
|
}
|
|
292
337
|
return h;
|
|
293
338
|
}
|
|
294
|
-
const
|
|
339
|
+
const Ee = async (t, e, o) => {
|
|
295
340
|
const {
|
|
296
341
|
placement: n = "bottom",
|
|
297
342
|
strategy: i = "absolute",
|
|
@@ -352,7 +397,7 @@ const xe = async (t, e, o) => {
|
|
|
352
397
|
middlewareData: h
|
|
353
398
|
};
|
|
354
399
|
};
|
|
355
|
-
async function
|
|
400
|
+
async function _t(t, e) {
|
|
356
401
|
var o;
|
|
357
402
|
e === void 0 && (e = {});
|
|
358
403
|
const {
|
|
@@ -368,7 +413,7 @@ async function Ht(t, e) {
|
|
|
368
413
|
elementContext: f = "floating",
|
|
369
414
|
altBoundary: m = !1,
|
|
370
415
|
padding: h = 0
|
|
371
|
-
} = it(e, t), p =
|
|
416
|
+
} = it(e, t), p = Ae(h), w = c[m ? f === "floating" ? "reference" : "floating" : f], d = nt(await r.getClippingRect({
|
|
372
417
|
element: (o = await (r.isElement == null ? void 0 : r.isElement(w))) == null || o ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
|
|
373
418
|
boundary: l,
|
|
374
419
|
rootBoundary: u,
|
|
@@ -384,7 +429,7 @@ async function Ht(t, e) {
|
|
|
384
429
|
} : {
|
|
385
430
|
x: 1,
|
|
386
431
|
y: 1
|
|
387
|
-
}, v =
|
|
432
|
+
}, v = nt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
388
433
|
elements: c,
|
|
389
434
|
rect: y,
|
|
390
435
|
offsetParent: x,
|
|
@@ -397,7 +442,7 @@ async function Ht(t, e) {
|
|
|
397
442
|
right: (v.right - d.right + p.right) / b.x
|
|
398
443
|
};
|
|
399
444
|
}
|
|
400
|
-
const
|
|
445
|
+
const Re = function(t) {
|
|
401
446
|
return t === void 0 && (t = {}), {
|
|
402
447
|
name: "flip",
|
|
403
448
|
options: t,
|
|
@@ -421,55 +466,55 @@ const ve = function(t) {
|
|
|
421
466
|
} = it(t, e);
|
|
422
467
|
if ((o = r.arrow) != null && o.alignmentOffset)
|
|
423
468
|
return {};
|
|
424
|
-
const d = M(i), y = V(c), x = M(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), v = m || (x || !g ? [
|
|
425
|
-
!m &&
|
|
426
|
-
const
|
|
427
|
-
let
|
|
469
|
+
const d = M(i), y = V(c), x = M(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), v = m || (x || !g ? [et(c)] : ye(c)), D = p !== "none";
|
|
470
|
+
!m && D && v.push(...ve(c, g, p, b));
|
|
471
|
+
const Kt = [c, ...v], lt = await _t(e, w), J = [];
|
|
472
|
+
let B = ((n = r.flip) == null ? void 0 : n.overflows) || [];
|
|
428
473
|
if (u && J.push(lt[d]), f) {
|
|
429
|
-
const P =
|
|
474
|
+
const P = we(i, s, b);
|
|
430
475
|
J.push(lt[P[0]], lt[P[1]]);
|
|
431
476
|
}
|
|
432
|
-
if (
|
|
477
|
+
if (B = [...B, {
|
|
433
478
|
placement: i,
|
|
434
479
|
overflows: J
|
|
435
480
|
}], !J.every((P) => P <= 0)) {
|
|
436
481
|
var pt, gt;
|
|
437
|
-
const P = (((pt = r.flip) == null ? void 0 : pt.index) || 0) + 1, yt =
|
|
482
|
+
const P = (((pt = r.flip) == null ? void 0 : pt.index) || 0) + 1, yt = Kt[P];
|
|
438
483
|
if (yt)
|
|
439
484
|
return {
|
|
440
485
|
data: {
|
|
441
486
|
index: P,
|
|
442
|
-
overflows:
|
|
487
|
+
overflows: B
|
|
443
488
|
},
|
|
444
489
|
reset: {
|
|
445
490
|
placement: yt
|
|
446
491
|
}
|
|
447
492
|
};
|
|
448
|
-
let
|
|
449
|
-
if (!
|
|
493
|
+
let U = (gt = B.filter((N) => N.overflows[0] <= 0).sort((N, S) => N.overflows[1] - S.overflows[1])[0]) == null ? void 0 : gt.placement;
|
|
494
|
+
if (!U)
|
|
450
495
|
switch (h) {
|
|
451
496
|
case "bestFit": {
|
|
452
497
|
var wt;
|
|
453
|
-
const N = (wt =
|
|
454
|
-
if (
|
|
498
|
+
const N = (wt = B.filter((S) => {
|
|
499
|
+
if (D) {
|
|
455
500
|
const T = V(S.placement);
|
|
456
501
|
return T === y || // Create a bias to the `y` side axis due to horizontal
|
|
457
502
|
// reading directions favoring greater width.
|
|
458
503
|
T === "y";
|
|
459
504
|
}
|
|
460
505
|
return !0;
|
|
461
|
-
}).map((S) => [S.placement, S.overflows.filter((T) => T > 0).reduce((T,
|
|
462
|
-
N && (
|
|
506
|
+
}).map((S) => [S.placement, S.overflows.filter((T) => T > 0).reduce((T, Jt) => T + Jt, 0)]).sort((S, T) => S[1] - T[1])[0]) == null ? void 0 : wt[0];
|
|
507
|
+
N && (U = N);
|
|
463
508
|
break;
|
|
464
509
|
}
|
|
465
510
|
case "initialPlacement":
|
|
466
|
-
|
|
511
|
+
U = c;
|
|
467
512
|
break;
|
|
468
513
|
}
|
|
469
|
-
if (i !==
|
|
514
|
+
if (i !== U)
|
|
470
515
|
return {
|
|
471
516
|
reset: {
|
|
472
|
-
placement:
|
|
517
|
+
placement: U
|
|
473
518
|
}
|
|
474
519
|
};
|
|
475
520
|
}
|
|
@@ -477,7 +522,7 @@ const ve = function(t) {
|
|
|
477
522
|
}
|
|
478
523
|
};
|
|
479
524
|
};
|
|
480
|
-
async function
|
|
525
|
+
async function Le(t, e) {
|
|
481
526
|
const {
|
|
482
527
|
placement: o,
|
|
483
528
|
platform: n,
|
|
@@ -505,7 +550,7 @@ async function be(t, e) {
|
|
|
505
550
|
y: h * u
|
|
506
551
|
};
|
|
507
552
|
}
|
|
508
|
-
const
|
|
553
|
+
const Oe = function(t) {
|
|
509
554
|
return t === void 0 && (t = 0), {
|
|
510
555
|
name: "offset",
|
|
511
556
|
options: t,
|
|
@@ -516,7 +561,7 @@ const Ae = function(t) {
|
|
|
516
561
|
y: r,
|
|
517
562
|
placement: s,
|
|
518
563
|
middlewareData: c
|
|
519
|
-
} = e, a = await
|
|
564
|
+
} = e, a = await Le(e, t);
|
|
520
565
|
return s === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
|
|
521
566
|
x: i + a.x,
|
|
522
567
|
y: r + a.y,
|
|
@@ -527,7 +572,7 @@ const Ae = function(t) {
|
|
|
527
572
|
};
|
|
528
573
|
}
|
|
529
574
|
};
|
|
530
|
-
},
|
|
575
|
+
}, Se = function(t) {
|
|
531
576
|
return t === void 0 && (t = {}), {
|
|
532
577
|
name: "shift",
|
|
533
578
|
options: t,
|
|
@@ -555,7 +600,7 @@ const Ae = function(t) {
|
|
|
555
600
|
} = it(t, e), l = {
|
|
556
601
|
x: o,
|
|
557
602
|
y: n
|
|
558
|
-
}, u = await
|
|
603
|
+
}, u = await _t(e, a), f = V(M(i)), m = Vt(f);
|
|
559
604
|
let h = l[m], p = l[f];
|
|
560
605
|
if (r) {
|
|
561
606
|
const w = m === "y" ? "top" : "left", d = m === "y" ? "bottom" : "right", y = h + u[w], x = h - u[d];
|
|
@@ -580,40 +625,40 @@ const Ae = function(t) {
|
|
|
580
625
|
}
|
|
581
626
|
};
|
|
582
627
|
};
|
|
583
|
-
function
|
|
584
|
-
return
|
|
628
|
+
function _(t) {
|
|
629
|
+
return Bt(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
585
630
|
}
|
|
586
631
|
function A(t) {
|
|
587
632
|
var e;
|
|
588
633
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
589
634
|
}
|
|
590
|
-
function
|
|
635
|
+
function O(t) {
|
|
591
636
|
var e;
|
|
592
|
-
return (e = (
|
|
637
|
+
return (e = (Bt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
593
638
|
}
|
|
594
|
-
function
|
|
639
|
+
function Bt(t) {
|
|
595
640
|
return t instanceof Node || t instanceof A(t).Node;
|
|
596
641
|
}
|
|
597
|
-
function
|
|
642
|
+
function R(t) {
|
|
598
643
|
return t instanceof Element || t instanceof A(t).Element;
|
|
599
644
|
}
|
|
600
|
-
function
|
|
645
|
+
function L(t) {
|
|
601
646
|
return t instanceof HTMLElement || t instanceof A(t).HTMLElement;
|
|
602
647
|
}
|
|
603
648
|
function bt(t) {
|
|
604
649
|
return typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
|
|
605
650
|
}
|
|
606
|
-
function
|
|
651
|
+
function K(t) {
|
|
607
652
|
const {
|
|
608
653
|
overflow: e,
|
|
609
654
|
overflowX: o,
|
|
610
655
|
overflowY: n,
|
|
611
656
|
display: i
|
|
612
|
-
} =
|
|
657
|
+
} = E(t);
|
|
613
658
|
return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(i);
|
|
614
659
|
}
|
|
615
|
-
function
|
|
616
|
-
return ["table", "td", "th"].includes(
|
|
660
|
+
function Te(t) {
|
|
661
|
+
return ["table", "td", "th"].includes(_(t));
|
|
617
662
|
}
|
|
618
663
|
function st(t) {
|
|
619
664
|
return [":popover-open", ":modal"].some((e) => {
|
|
@@ -625,12 +670,12 @@ function st(t) {
|
|
|
625
670
|
});
|
|
626
671
|
}
|
|
627
672
|
function ht(t) {
|
|
628
|
-
const e = dt(), o =
|
|
673
|
+
const e = dt(), o = E(t);
|
|
629
674
|
return o.transform !== "none" || o.perspective !== "none" || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((n) => (o.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (o.contain || "").includes(n));
|
|
630
675
|
}
|
|
631
|
-
function
|
|
676
|
+
function Ce(t) {
|
|
632
677
|
let e = k(t);
|
|
633
|
-
for (;
|
|
678
|
+
for (; L(e) && !z(e); ) {
|
|
634
679
|
if (st(e))
|
|
635
680
|
return null;
|
|
636
681
|
if (ht(e))
|
|
@@ -643,13 +688,13 @@ function dt() {
|
|
|
643
688
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
644
689
|
}
|
|
645
690
|
function z(t) {
|
|
646
|
-
return ["html", "body", "#document"].includes(
|
|
691
|
+
return ["html", "body", "#document"].includes(_(t));
|
|
647
692
|
}
|
|
648
|
-
function
|
|
693
|
+
function E(t) {
|
|
649
694
|
return A(t).getComputedStyle(t);
|
|
650
695
|
}
|
|
651
696
|
function ct(t) {
|
|
652
|
-
return
|
|
697
|
+
return R(t) ? {
|
|
653
698
|
scrollLeft: t.scrollLeft,
|
|
654
699
|
scrollTop: t.scrollTop
|
|
655
700
|
} : {
|
|
@@ -658,31 +703,31 @@ function ct(t) {
|
|
|
658
703
|
};
|
|
659
704
|
}
|
|
660
705
|
function k(t) {
|
|
661
|
-
if (
|
|
706
|
+
if (_(t) === "html")
|
|
662
707
|
return t;
|
|
663
708
|
const e = (
|
|
664
709
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
665
710
|
t.assignedSlot || // DOM Element detected.
|
|
666
711
|
t.parentNode || // ShadowRoot detected.
|
|
667
712
|
bt(t) && t.host || // Fallback.
|
|
668
|
-
|
|
713
|
+
O(t)
|
|
669
714
|
);
|
|
670
715
|
return bt(e) ? e.host : e;
|
|
671
716
|
}
|
|
672
|
-
function
|
|
717
|
+
function Ut(t) {
|
|
673
718
|
const e = k(t);
|
|
674
|
-
return z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body :
|
|
719
|
+
return z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : L(e) && K(e) ? e : Ut(e);
|
|
675
720
|
}
|
|
676
|
-
function
|
|
721
|
+
function X(t, e, o) {
|
|
677
722
|
var n;
|
|
678
723
|
e === void 0 && (e = []), o === void 0 && (o = !0);
|
|
679
|
-
const i =
|
|
680
|
-
return r ? e.concat(s, s.visualViewport || [],
|
|
724
|
+
const i = Ut(t), r = i === ((n = t.ownerDocument) == null ? void 0 : n.body), s = A(i);
|
|
725
|
+
return r ? e.concat(s, s.visualViewport || [], K(i) ? i : [], s.frameElement && o ? X(s.frameElement) : []) : e.concat(i, X(i, [], o));
|
|
681
726
|
}
|
|
682
|
-
function
|
|
683
|
-
const e =
|
|
727
|
+
function It(t) {
|
|
728
|
+
const e = E(t);
|
|
684
729
|
let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
|
|
685
|
-
const i =
|
|
730
|
+
const i = L(t), r = i ? t.offsetWidth : o, s = i ? t.offsetHeight : n, c = tt(o) !== r || tt(n) !== s;
|
|
686
731
|
return c && (o = r, n = s), {
|
|
687
732
|
width: o,
|
|
688
733
|
height: n,
|
|
@@ -690,73 +735,73 @@ function Ut(t) {
|
|
|
690
735
|
};
|
|
691
736
|
}
|
|
692
737
|
function mt(t) {
|
|
693
|
-
return
|
|
738
|
+
return R(t) ? t : t.contextElement;
|
|
694
739
|
}
|
|
695
740
|
function $(t) {
|
|
696
741
|
const e = mt(t);
|
|
697
|
-
if (!
|
|
742
|
+
if (!L(e))
|
|
698
743
|
return C(1);
|
|
699
744
|
const o = e.getBoundingClientRect(), {
|
|
700
745
|
width: n,
|
|
701
746
|
height: i,
|
|
702
747
|
$: r
|
|
703
|
-
} =
|
|
704
|
-
let s = (r ?
|
|
748
|
+
} = It(e);
|
|
749
|
+
let s = (r ? tt(o.width) : o.width) / n, c = (r ? tt(o.height) : o.height) / i;
|
|
705
750
|
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
706
751
|
x: s,
|
|
707
752
|
y: c
|
|
708
753
|
};
|
|
709
754
|
}
|
|
710
|
-
const
|
|
755
|
+
const ke = /* @__PURE__ */ C(0);
|
|
711
756
|
function jt(t) {
|
|
712
757
|
const e = A(t);
|
|
713
|
-
return !dt() || !e.visualViewport ?
|
|
758
|
+
return !dt() || !e.visualViewport ? ke : {
|
|
714
759
|
x: e.visualViewport.offsetLeft,
|
|
715
760
|
y: e.visualViewport.offsetTop
|
|
716
761
|
};
|
|
717
762
|
}
|
|
718
|
-
function
|
|
763
|
+
function Pe(t, e, o) {
|
|
719
764
|
return e === void 0 && (e = !1), !o || e && o !== A(t) ? !1 : e;
|
|
720
765
|
}
|
|
721
|
-
function
|
|
766
|
+
function F(t, e, o, n) {
|
|
722
767
|
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
723
768
|
const i = t.getBoundingClientRect(), r = mt(t);
|
|
724
769
|
let s = C(1);
|
|
725
|
-
e && (n ?
|
|
726
|
-
const c =
|
|
770
|
+
e && (n ? R(n) && (s = $(n)) : s = $(t));
|
|
771
|
+
const c = Pe(r, o, n) ? jt(r) : C(0);
|
|
727
772
|
let a = (i.left + c.x) / s.x, l = (i.top + c.y) / s.y, u = i.width / s.x, f = i.height / s.y;
|
|
728
773
|
if (r) {
|
|
729
|
-
const m = A(r), h = n &&
|
|
774
|
+
const m = A(r), h = n && R(n) ? A(n) : n;
|
|
730
775
|
let p = m, g = p.frameElement;
|
|
731
776
|
for (; g && n && h !== p; ) {
|
|
732
|
-
const w = $(g), d = g.getBoundingClientRect(), y =
|
|
777
|
+
const w = $(g), d = g.getBoundingClientRect(), y = E(g), x = d.left + (g.clientLeft + parseFloat(y.paddingLeft)) * w.x, b = d.top + (g.clientTop + parseFloat(y.paddingTop)) * w.y;
|
|
733
778
|
a *= w.x, l *= w.y, u *= w.x, f *= w.y, a += x, l += b, p = A(g), g = p.frameElement;
|
|
734
779
|
}
|
|
735
780
|
}
|
|
736
|
-
return
|
|
781
|
+
return nt({
|
|
737
782
|
width: u,
|
|
738
783
|
height: f,
|
|
739
784
|
x: a,
|
|
740
785
|
y: l
|
|
741
786
|
});
|
|
742
787
|
}
|
|
743
|
-
function
|
|
788
|
+
function We(t) {
|
|
744
789
|
let {
|
|
745
790
|
elements: e,
|
|
746
791
|
rect: o,
|
|
747
792
|
offsetParent: n,
|
|
748
793
|
strategy: i
|
|
749
794
|
} = t;
|
|
750
|
-
const r = i === "fixed", s =
|
|
795
|
+
const r = i === "fixed", s = O(n), c = e ? st(e.floating) : !1;
|
|
751
796
|
if (n === s || c && r)
|
|
752
797
|
return o;
|
|
753
798
|
let a = {
|
|
754
799
|
scrollLeft: 0,
|
|
755
800
|
scrollTop: 0
|
|
756
801
|
}, l = C(1);
|
|
757
|
-
const u = C(0), f =
|
|
758
|
-
if ((f || !f && !r) && ((
|
|
759
|
-
const m =
|
|
802
|
+
const u = C(0), f = L(n);
|
|
803
|
+
if ((f || !f && !r) && ((_(n) !== "body" || K(s)) && (a = ct(n)), L(n))) {
|
|
804
|
+
const m = F(n);
|
|
760
805
|
l = $(n), u.x = m.x + n.clientLeft, u.y = m.y + n.clientTop;
|
|
761
806
|
}
|
|
762
807
|
return {
|
|
@@ -766,25 +811,25 @@ function Te(t) {
|
|
|
766
811
|
y: o.y * l.y - a.scrollTop * l.y + u.y
|
|
767
812
|
};
|
|
768
813
|
}
|
|
769
|
-
function
|
|
814
|
+
function Me(t) {
|
|
770
815
|
return Array.from(t.getClientRects());
|
|
771
816
|
}
|
|
772
817
|
function Xt(t) {
|
|
773
|
-
return
|
|
818
|
+
return F(O(t)).left + ct(t).scrollLeft;
|
|
774
819
|
}
|
|
775
|
-
function
|
|
776
|
-
const e =
|
|
820
|
+
function Fe(t) {
|
|
821
|
+
const e = O(t), o = ct(t), n = t.ownerDocument.body, i = W(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = W(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
|
|
777
822
|
let s = -o.scrollLeft + Xt(t);
|
|
778
823
|
const c = -o.scrollTop;
|
|
779
|
-
return
|
|
824
|
+
return E(n).direction === "rtl" && (s += W(e.clientWidth, n.clientWidth) - i), {
|
|
780
825
|
width: i,
|
|
781
826
|
height: r,
|
|
782
827
|
x: s,
|
|
783
828
|
y: c
|
|
784
829
|
};
|
|
785
830
|
}
|
|
786
|
-
function
|
|
787
|
-
const o = A(t), n =
|
|
831
|
+
function De(t, e) {
|
|
832
|
+
const o = A(t), n = O(t), i = o.visualViewport;
|
|
788
833
|
let r = n.clientWidth, s = n.clientHeight, c = 0, a = 0;
|
|
789
834
|
if (i) {
|
|
790
835
|
r = i.width, s = i.height;
|
|
@@ -798,8 +843,8 @@ function Pe(t, e) {
|
|
|
798
843
|
y: a
|
|
799
844
|
};
|
|
800
845
|
}
|
|
801
|
-
function
|
|
802
|
-
const o =
|
|
846
|
+
function Ne(t, e) {
|
|
847
|
+
const o = F(t, !0, e === "fixed"), n = o.top + t.clientTop, i = o.left + t.clientLeft, r = L(t) ? $(t) : C(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, a = i * r.x, l = n * r.y;
|
|
803
848
|
return {
|
|
804
849
|
width: s,
|
|
805
850
|
height: c,
|
|
@@ -810,11 +855,11 @@ function Fe(t, e) {
|
|
|
810
855
|
function At(t, e, o) {
|
|
811
856
|
let n;
|
|
812
857
|
if (e === "viewport")
|
|
813
|
-
n =
|
|
858
|
+
n = De(t, o);
|
|
814
859
|
else if (e === "document")
|
|
815
|
-
n =
|
|
816
|
-
else if (
|
|
817
|
-
n =
|
|
860
|
+
n = Fe(O(t));
|
|
861
|
+
else if (R(e))
|
|
862
|
+
n = Ne(e, o);
|
|
818
863
|
else {
|
|
819
864
|
const i = jt(t);
|
|
820
865
|
n = {
|
|
@@ -823,35 +868,35 @@ function At(t, e, o) {
|
|
|
823
868
|
y: e.y - i.y
|
|
824
869
|
};
|
|
825
870
|
}
|
|
826
|
-
return
|
|
871
|
+
return nt(n);
|
|
827
872
|
}
|
|
828
873
|
function qt(t, e) {
|
|
829
874
|
const o = k(t);
|
|
830
|
-
return o === e || !
|
|
875
|
+
return o === e || !R(o) || z(o) ? !1 : E(o).position === "fixed" || qt(o, e);
|
|
831
876
|
}
|
|
832
|
-
function
|
|
877
|
+
function $e(t, e) {
|
|
833
878
|
const o = e.get(t);
|
|
834
879
|
if (o)
|
|
835
880
|
return o;
|
|
836
|
-
let n =
|
|
837
|
-
const r =
|
|
881
|
+
let n = X(t, [], !1).filter((c) => R(c) && _(c) !== "body"), i = null;
|
|
882
|
+
const r = E(t).position === "fixed";
|
|
838
883
|
let s = r ? k(t) : t;
|
|
839
|
-
for (;
|
|
840
|
-
const c =
|
|
841
|
-
!a && c.position === "fixed" && (i = null), (r ? !a && !i : !a && c.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) ||
|
|
884
|
+
for (; R(s) && !z(s); ) {
|
|
885
|
+
const c = E(s), a = ht(s);
|
|
886
|
+
!a && c.position === "fixed" && (i = null), (r ? !a && !i : !a && c.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || K(s) && !a && qt(t, s)) ? n = n.filter((u) => u !== s) : i = c, s = k(s);
|
|
842
887
|
}
|
|
843
888
|
return e.set(t, n), n;
|
|
844
889
|
}
|
|
845
|
-
function
|
|
890
|
+
function Ve(t) {
|
|
846
891
|
let {
|
|
847
892
|
element: e,
|
|
848
893
|
boundary: o,
|
|
849
894
|
rootBoundary: n,
|
|
850
895
|
strategy: i
|
|
851
896
|
} = t;
|
|
852
|
-
const s = [...o === "clippingAncestors" ? st(e) ? [] :
|
|
897
|
+
const s = [...o === "clippingAncestors" ? st(e) ? [] : $e(e, this._c) : [].concat(o), n], c = s[0], a = s.reduce((l, u) => {
|
|
853
898
|
const f = At(e, u, i);
|
|
854
|
-
return l.top =
|
|
899
|
+
return l.top = W(f.top, l.top), l.right = Z(f.right, l.right), l.bottom = Z(f.bottom, l.bottom), l.left = W(f.left, l.left), l;
|
|
855
900
|
}, At(e, c, i));
|
|
856
901
|
return {
|
|
857
902
|
width: a.right - a.left,
|
|
@@ -860,26 +905,26 @@ function De(t) {
|
|
|
860
905
|
y: a.top
|
|
861
906
|
};
|
|
862
907
|
}
|
|
863
|
-
function
|
|
908
|
+
function ze(t) {
|
|
864
909
|
const {
|
|
865
910
|
width: e,
|
|
866
911
|
height: o
|
|
867
|
-
} =
|
|
912
|
+
} = It(t);
|
|
868
913
|
return {
|
|
869
914
|
width: e,
|
|
870
915
|
height: o
|
|
871
916
|
};
|
|
872
917
|
}
|
|
873
|
-
function
|
|
874
|
-
const n =
|
|
918
|
+
function He(t, e, o) {
|
|
919
|
+
const n = L(e), i = O(e), r = o === "fixed", s = F(t, !0, r, e);
|
|
875
920
|
let c = {
|
|
876
921
|
scrollLeft: 0,
|
|
877
922
|
scrollTop: 0
|
|
878
923
|
};
|
|
879
924
|
const a = C(0);
|
|
880
925
|
if (n || !n && !r)
|
|
881
|
-
if ((
|
|
882
|
-
const f =
|
|
926
|
+
if ((_(e) !== "body" || K(i)) && (c = ct(e)), n) {
|
|
927
|
+
const f = F(e, !0, r, e);
|
|
883
928
|
a.x = f.x + e.clientLeft, a.y = f.y + e.clientTop;
|
|
884
929
|
} else i && (a.x = Xt(i));
|
|
885
930
|
const l = s.left + c.scrollLeft - a.x, u = s.top + c.scrollTop - a.y;
|
|
@@ -891,33 +936,33 @@ function Ne(t, e, o) {
|
|
|
891
936
|
};
|
|
892
937
|
}
|
|
893
938
|
function at(t) {
|
|
894
|
-
return
|
|
939
|
+
return E(t).position === "static";
|
|
895
940
|
}
|
|
896
|
-
function
|
|
897
|
-
return !
|
|
941
|
+
function Et(t, e) {
|
|
942
|
+
return !L(t) || E(t).position === "fixed" ? null : e ? e(t) : t.offsetParent;
|
|
898
943
|
}
|
|
899
944
|
function Yt(t, e) {
|
|
900
945
|
const o = A(t);
|
|
901
946
|
if (st(t))
|
|
902
947
|
return o;
|
|
903
|
-
if (!
|
|
948
|
+
if (!L(t)) {
|
|
904
949
|
let i = k(t);
|
|
905
950
|
for (; i && !z(i); ) {
|
|
906
|
-
if (
|
|
951
|
+
if (R(i) && !at(i))
|
|
907
952
|
return i;
|
|
908
953
|
i = k(i);
|
|
909
954
|
}
|
|
910
955
|
return o;
|
|
911
956
|
}
|
|
912
|
-
let n =
|
|
913
|
-
for (; n &&
|
|
914
|
-
n =
|
|
915
|
-
return n && z(n) && at(n) && !ht(n) ? o : n ||
|
|
957
|
+
let n = Et(t, e);
|
|
958
|
+
for (; n && Te(n) && at(n); )
|
|
959
|
+
n = Et(n, e);
|
|
960
|
+
return n && z(n) && at(n) && !ht(n) ? o : n || Ce(t) || o;
|
|
916
961
|
}
|
|
917
|
-
const
|
|
962
|
+
const _e = async function(t) {
|
|
918
963
|
const e = this.getOffsetParent || Yt, o = this.getDimensions, n = await o(t.floating);
|
|
919
964
|
return {
|
|
920
|
-
reference:
|
|
965
|
+
reference: He(t.reference, await e(t.floating), t.strategy),
|
|
921
966
|
floating: {
|
|
922
967
|
x: 0,
|
|
923
968
|
y: 0,
|
|
@@ -926,24 +971,24 @@ const $e = async function(t) {
|
|
|
926
971
|
}
|
|
927
972
|
};
|
|
928
973
|
};
|
|
929
|
-
function
|
|
930
|
-
return
|
|
974
|
+
function Be(t) {
|
|
975
|
+
return E(t).direction === "rtl";
|
|
931
976
|
}
|
|
932
|
-
const
|
|
933
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
934
|
-
getDocumentElement:
|
|
935
|
-
getClippingRect:
|
|
977
|
+
const Ue = {
|
|
978
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: We,
|
|
979
|
+
getDocumentElement: O,
|
|
980
|
+
getClippingRect: Ve,
|
|
936
981
|
getOffsetParent: Yt,
|
|
937
|
-
getElementRects:
|
|
938
|
-
getClientRects:
|
|
939
|
-
getDimensions:
|
|
982
|
+
getElementRects: _e,
|
|
983
|
+
getClientRects: Me,
|
|
984
|
+
getDimensions: ze,
|
|
940
985
|
getScale: $,
|
|
941
|
-
isElement:
|
|
942
|
-
isRTL:
|
|
986
|
+
isElement: R,
|
|
987
|
+
isRTL: Be
|
|
943
988
|
};
|
|
944
|
-
function
|
|
989
|
+
function Ie(t, e) {
|
|
945
990
|
let o = null, n;
|
|
946
|
-
const i =
|
|
991
|
+
const i = O(t);
|
|
947
992
|
function r() {
|
|
948
993
|
var c;
|
|
949
994
|
clearTimeout(n), (c = o) == null || c.disconnect(), o = null;
|
|
@@ -958,17 +1003,17 @@ function Be(t, e) {
|
|
|
958
1003
|
} = t.getBoundingClientRect();
|
|
959
1004
|
if (c || e(), !f || !m)
|
|
960
1005
|
return;
|
|
961
|
-
const h =
|
|
1006
|
+
const h = G(u), p = G(i.clientWidth - (l + f)), g = G(i.clientHeight - (u + m)), w = G(l), y = {
|
|
962
1007
|
rootMargin: -h + "px " + -p + "px " + -g + "px " + -w + "px",
|
|
963
|
-
threshold:
|
|
1008
|
+
threshold: W(0, Z(1, a)) || 1
|
|
964
1009
|
};
|
|
965
1010
|
let x = !0;
|
|
966
1011
|
function b(v) {
|
|
967
|
-
const
|
|
968
|
-
if (
|
|
1012
|
+
const D = v[0].intersectionRatio;
|
|
1013
|
+
if (D !== a) {
|
|
969
1014
|
if (!x)
|
|
970
1015
|
return s();
|
|
971
|
-
|
|
1016
|
+
D ? s(!1, D) : n = setTimeout(() => {
|
|
972
1017
|
s(!1, 1e-7);
|
|
973
1018
|
}, 1e3);
|
|
974
1019
|
}
|
|
@@ -987,7 +1032,7 @@ function Be(t, e) {
|
|
|
987
1032
|
}
|
|
988
1033
|
return s(!0), r;
|
|
989
1034
|
}
|
|
990
|
-
function
|
|
1035
|
+
function je(t, e, o, n) {
|
|
991
1036
|
n === void 0 && (n = {});
|
|
992
1037
|
const {
|
|
993
1038
|
ancestorScroll: i = !0,
|
|
@@ -995,13 +1040,13 @@ function He(t, e, o, n) {
|
|
|
995
1040
|
elementResize: s = typeof ResizeObserver == "function",
|
|
996
1041
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
997
1042
|
animationFrame: a = !1
|
|
998
|
-
} = n, l = mt(t), u = i || r ? [...l ?
|
|
1043
|
+
} = n, l = mt(t), u = i || r ? [...l ? X(l) : [], ...X(e)] : [];
|
|
999
1044
|
u.forEach((d) => {
|
|
1000
1045
|
i && d.addEventListener("scroll", o, {
|
|
1001
1046
|
passive: !0
|
|
1002
1047
|
}), r && d.addEventListener("resize", o);
|
|
1003
1048
|
});
|
|
1004
|
-
const f = l && c ?
|
|
1049
|
+
const f = l && c ? Ie(l, o) : null;
|
|
1005
1050
|
let m = -1, h = null;
|
|
1006
1051
|
s && (h = new ResizeObserver((d) => {
|
|
1007
1052
|
let [y] = d;
|
|
@@ -1010,10 +1055,10 @@ function He(t, e, o, n) {
|
|
|
1010
1055
|
(x = h) == null || x.observe(e);
|
|
1011
1056
|
})), o();
|
|
1012
1057
|
}), l && !a && h.observe(l), h.observe(e));
|
|
1013
|
-
let p, g = a ?
|
|
1058
|
+
let p, g = a ? F(t) : null;
|
|
1014
1059
|
a && w();
|
|
1015
1060
|
function w() {
|
|
1016
|
-
const d =
|
|
1061
|
+
const d = F(t);
|
|
1017
1062
|
g && (d.x !== g.x || d.y !== g.y || d.width !== g.width || d.height !== g.height) && o(), g = d, p = requestAnimationFrame(w);
|
|
1018
1063
|
}
|
|
1019
1064
|
return o(), () => {
|
|
@@ -1023,41 +1068,41 @@ function He(t, e, o, n) {
|
|
|
1023
1068
|
}), f == null || f(), (d = h) == null || d.disconnect(), h = null, a && cancelAnimationFrame(p);
|
|
1024
1069
|
};
|
|
1025
1070
|
}
|
|
1026
|
-
const
|
|
1071
|
+
const Xe = Oe, qe = Se, Rt = Re, Ye = (t, e, o) => {
|
|
1027
1072
|
const n = /* @__PURE__ */ new Map(), i = {
|
|
1028
|
-
platform:
|
|
1073
|
+
platform: Ue,
|
|
1029
1074
|
...o
|
|
1030
1075
|
}, r = {
|
|
1031
1076
|
...i.platform,
|
|
1032
1077
|
_c: n
|
|
1033
1078
|
};
|
|
1034
|
-
return
|
|
1079
|
+
return Ee(t, e, {
|
|
1035
1080
|
...i,
|
|
1036
1081
|
platform: r
|
|
1037
1082
|
});
|
|
1038
|
-
},
|
|
1083
|
+
}, an = ({
|
|
1039
1084
|
content: t,
|
|
1040
1085
|
open: e,
|
|
1041
1086
|
placement: o,
|
|
1042
1087
|
offset: { mainAxis: n, crossAxis: i } = { mainAxis: 0, crossAxis: 0 }
|
|
1043
1088
|
}) => (r) => {
|
|
1044
|
-
const s = r.element, c =
|
|
1045
|
-
return
|
|
1089
|
+
const s = r.element, c = j.wrap(e);
|
|
1090
|
+
return Ft(
|
|
1046
1091
|
c,
|
|
1047
|
-
|
|
1092
|
+
Wt(
|
|
1048
1093
|
"body",
|
|
1049
1094
|
Tt.div(
|
|
1050
1095
|
Mt((a) => {
|
|
1051
1096
|
const l = a;
|
|
1052
|
-
return l.style.position = "absolute",
|
|
1053
|
-
|
|
1097
|
+
return l.style.position = "absolute", je(s, l, () => {
|
|
1098
|
+
Ye(s, l, {
|
|
1054
1099
|
placement: o,
|
|
1055
1100
|
strategy: "absolute",
|
|
1056
1101
|
middleware: [
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1102
|
+
Rt(),
|
|
1103
|
+
Xe({ mainAxis: n, crossAxis: i }),
|
|
1104
|
+
qe(),
|
|
1105
|
+
Rt()
|
|
1061
1106
|
]
|
|
1062
1107
|
}).then(({ x: u, y: f }) => {
|
|
1063
1108
|
l.style.top = `${f}px`, l.style.left = `${u}px`;
|
|
@@ -1068,33 +1113,33 @@ const _e = Ae, Ie = Re, Ot = ve, Ue = (t, e, o) => {
|
|
|
1068
1113
|
)
|
|
1069
1114
|
)
|
|
1070
1115
|
)(r);
|
|
1071
|
-
},
|
|
1116
|
+
}, Ke = (t, e) => {
|
|
1072
1117
|
if (typeof e == "function")
|
|
1073
|
-
return
|
|
1074
|
-
const o = e.failure ?? ((i) =>
|
|
1075
|
-
|
|
1118
|
+
return Ke(t, { success: e });
|
|
1119
|
+
const o = e.failure ?? ((i) => q(
|
|
1120
|
+
Y(i.on(console.error)),
|
|
1076
1121
|
i.map((r) => `Error: ${r}`)
|
|
1077
1122
|
)), n = e.success;
|
|
1078
|
-
return Pt(
|
|
1123
|
+
return Pt(j.wrap(t), {
|
|
1079
1124
|
Success: (i) => n(i.$.value),
|
|
1080
1125
|
Failure: (i) => o(i.$.error)
|
|
1081
1126
|
});
|
|
1082
|
-
},
|
|
1127
|
+
}, un = () => Ct.focus((t) => {
|
|
1083
1128
|
var e;
|
|
1084
1129
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1085
|
-
}),
|
|
1086
|
-
const o = e.element, n =
|
|
1130
|
+
}), fn = (t) => (e) => {
|
|
1131
|
+
const o = e.element, n = H({ width: o.clientWidth, height: o.clientHeight }), i = ot(t(n))(e), r = () => {
|
|
1087
1132
|
n.set({ width: o.clientWidth, height: o.clientHeight });
|
|
1088
1133
|
};
|
|
1089
1134
|
let s;
|
|
1090
1135
|
return typeof ResizeObserver == "function" && (s = new ResizeObserver(r), s.observe(o)), (c) => {
|
|
1091
1136
|
s == null || s.disconnect(), i(c);
|
|
1092
1137
|
};
|
|
1093
|
-
},
|
|
1094
|
-
const o =
|
|
1138
|
+
}, hn = (t) => (e) => {
|
|
1139
|
+
const o = H({
|
|
1095
1140
|
width: (window == null ? void 0 : window.innerWidth) ?? 0,
|
|
1096
1141
|
height: (window == null ? void 0 : window.innerHeight) ?? 0
|
|
1097
|
-
}), n =
|
|
1142
|
+
}), n = ot(t(o))(e), i = () => {
|
|
1098
1143
|
o.set({
|
|
1099
1144
|
width: (window == null ? void 0 : window.innerWidth) ?? 0,
|
|
1100
1145
|
height: (window == null ? void 0 : window.innerHeight) ?? 0
|
|
@@ -1103,7 +1148,7 @@ const _e = Ae, Ie = Re, Ot = ve, Ue = (t, e, o) => {
|
|
|
1103
1148
|
return window == null || window.addEventListener("resize", i), (r) => {
|
|
1104
1149
|
window == null || window.removeEventListener("resize", i), n(r);
|
|
1105
1150
|
};
|
|
1106
|
-
},
|
|
1151
|
+
}, Je = (t, e) => {
|
|
1107
1152
|
const o = e.split("/").filter((i) => i !== ""), n = {};
|
|
1108
1153
|
for (let i = 0; i < t.length; i++) {
|
|
1109
1154
|
const r = t[i], s = o[i];
|
|
@@ -1118,21 +1163,21 @@ const _e = Ae, Ie = Re, Ot = ve, Ue = (t, e, o) => {
|
|
|
1118
1163
|
return { params: n, path: e };
|
|
1119
1164
|
}
|
|
1120
1165
|
return o.length !== t.length ? null : { params: n, path: e };
|
|
1121
|
-
},
|
|
1166
|
+
}, Ge = (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 !== ""), Qe = (t) => {
|
|
1122
1167
|
const e = t.map((o) => {
|
|
1123
|
-
const n =
|
|
1168
|
+
const n = Ge(o);
|
|
1124
1169
|
return { route: o, segments: n };
|
|
1125
1170
|
});
|
|
1126
1171
|
return function(n) {
|
|
1127
1172
|
for (const { segments: i, route: r } of e) {
|
|
1128
|
-
const s =
|
|
1173
|
+
const s = Je(i, n);
|
|
1129
1174
|
if (s)
|
|
1130
1175
|
return { ...s, route: r };
|
|
1131
1176
|
}
|
|
1132
1177
|
return null;
|
|
1133
1178
|
};
|
|
1134
|
-
},
|
|
1135
|
-
const e =
|
|
1179
|
+
}, dn = (t) => {
|
|
1180
|
+
const e = Qe(Object.keys(t));
|
|
1136
1181
|
return Nt((o) => {
|
|
1137
1182
|
const n = o.map((i) => {
|
|
1138
1183
|
const r = e(i.pathname);
|
|
@@ -1146,7 +1191,7 @@ const _e = Ae, Ie = Re, Ot = ve, Ue = (t, e, o) => {
|
|
|
1146
1191
|
hash: i.hash
|
|
1147
1192
|
};
|
|
1148
1193
|
});
|
|
1149
|
-
return
|
|
1194
|
+
return Zt(
|
|
1150
1195
|
n.map((i) => [i.route, i]),
|
|
1151
1196
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1152
1197
|
t
|
|
@@ -1154,33 +1199,36 @@ const _e = Ae, Ie = Re, Ot = ve, Ue = (t, e, o) => {
|
|
|
1154
1199
|
});
|
|
1155
1200
|
};
|
|
1156
1201
|
export {
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1202
|
+
ue as Anchor,
|
|
1203
|
+
fe as AsyncResultView,
|
|
1204
|
+
on as AutoFocus,
|
|
1205
|
+
rn as AutoSelect,
|
|
1206
|
+
fn as ElementSize,
|
|
1207
|
+
cn as HTMLTitle,
|
|
1208
|
+
sn as HiddenWhenEmpty,
|
|
1209
|
+
me as InViewport,
|
|
1210
|
+
Dt as LocationProviderMarker,
|
|
1211
|
+
an as PopOver,
|
|
1212
|
+
en as ProvideAppearance,
|
|
1213
|
+
tn as ProvideLocation,
|
|
1214
|
+
Ke as ResultView,
|
|
1215
|
+
dn as Router,
|
|
1216
|
+
un as SelectOnFocus,
|
|
1217
|
+
nn as UseAppearance,
|
|
1173
1218
|
Nt as UseLocation,
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
ee as
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1219
|
+
ln as WhenInViewport,
|
|
1220
|
+
hn as WindowSize,
|
|
1221
|
+
ee as _checkExtensionCondition,
|
|
1222
|
+
te as _getExtension,
|
|
1223
|
+
ie as _makeLocation,
|
|
1224
|
+
ae as _makeLocationProp,
|
|
1225
|
+
Qe as _makeRouteMatcher,
|
|
1226
|
+
Ge as _parseRouteSegments,
|
|
1180
1227
|
$t as appearanceMarker,
|
|
1181
|
-
|
|
1182
|
-
oe as
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1228
|
+
re as areLocationsEqual,
|
|
1229
|
+
oe as handleAnchorClick,
|
|
1230
|
+
se as locationFromURL,
|
|
1231
|
+
Je as matchesRoute,
|
|
1232
|
+
ce as setLocationFromUrl,
|
|
1233
|
+
le as urlFromLocation
|
|
1186
1234
|
};
|