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