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