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