@tempots/dom 10.0.111 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dom/handle-anchor-click.d.ts +5 -4
- package/dom/ssr.d.ts +5 -3
- package/index.cjs +1 -1
- package/index.js +535 -484
- package/mountable/appearance.d.ts +5 -6
- package/mountable/async.d.ts +5 -5
- package/mountable/attribute.d.ts +435 -431
- package/mountable/autofocus.d.ts +2 -2
- package/mountable/autoselect.d.ts +2 -2
- package/mountable/bind.d.ts +5 -5
- package/mountable/conjunction.d.ts +5 -5
- package/mountable/consumers.d.ts +5 -5
- package/mountable/ctx.d.ts +2 -2
- package/mountable/element.d.ts +227 -227
- package/mountable/empty.d.ts +2 -2
- package/mountable/ensure.d.ts +2 -2
- package/mountable/foreach.d.ts +2 -2
- package/mountable/fragment.d.ts +2 -2
- package/mountable/handler.d.ts +89 -89
- package/mountable/hidden-when-empty.d.ts +2 -2
- package/mountable/inviewport.d.ts +3 -3
- package/mountable/map-signal.d.ts +2 -2
- package/mountable/not-empty.d.ts +2 -2
- package/mountable/ondispose.d.ts +2 -2
- package/mountable/oneof.d.ts +9 -9
- package/mountable/onmount.d.ts +2 -2
- package/mountable/portal.d.ts +2 -2
- package/mountable/providers.d.ts +6 -6
- package/mountable/render.d.ts +3 -3
- package/mountable/repeat.d.ts +2 -2
- package/mountable/size.d.ts +3 -3
- package/mountable/style.d.ts +499 -499
- package/mountable/task.d.ts +5 -5
- package/mountable/text.d.ts +4 -4
- package/mountable/when.d.ts +3 -3
- package/package.json +23 -7
- package/std/signal.d.ts +24 -7
- package/types/css-styles.d.ts +1 -2
- package/types/domain.d.ts +2 -2
- package/types/html-attributes.d.ts +2 -1
package/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
function
|
|
1
|
+
var Ze = Object.defineProperty;
|
|
2
|
+
var Xe = (t, e, r) => e in t ? Ze(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var l = (t, e, r) => Xe(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
function Ye(t, e, r) {
|
|
5
5
|
return t + (e - t) * r;
|
|
6
6
|
}
|
|
7
|
-
const
|
|
8
|
-
function
|
|
7
|
+
const ee = 97;
|
|
8
|
+
function je(t, e, r) {
|
|
9
9
|
const n = Math.max(t.length, e.length);
|
|
10
10
|
let s = "";
|
|
11
11
|
for (let i = 0; i < n; i++) {
|
|
12
12
|
let o = t.charCodeAt(i);
|
|
13
|
-
isNaN(o) && (o =
|
|
14
|
-
let
|
|
15
|
-
isNaN(
|
|
13
|
+
isNaN(o) && (o = ee);
|
|
14
|
+
let a = e.charCodeAt(i);
|
|
15
|
+
isNaN(a) && (a = ee), s += String.fromCharCode(o + (a - o) * r);
|
|
16
16
|
}
|
|
17
17
|
return s;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function He(t, e, r) {
|
|
20
20
|
return new Date(t.getTime() + (e.getTime() - t.getTime()) * r);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Ke(t, e, r) {
|
|
23
23
|
return e;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return typeof t == "number" ?
|
|
25
|
+
function Ue(t) {
|
|
26
|
+
return typeof t == "number" ? Ye : typeof t == "string" ? je : t instanceof Date ? He : Ke;
|
|
27
27
|
}
|
|
28
28
|
class ke {
|
|
29
29
|
constructor(e, r) {
|
|
@@ -42,35 +42,35 @@ class ke {
|
|
|
42
42
|
return this.index % 2 === 1;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
const
|
|
45
|
+
const te = "$__signal__", re = "$__prop__", ne = "$__computed__";
|
|
46
46
|
var ae;
|
|
47
|
-
ae =
|
|
47
|
+
ae = te;
|
|
48
48
|
const _ = class _ {
|
|
49
49
|
constructor(e, r) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
l(this, ae, !0);
|
|
51
|
+
l(this, "_value");
|
|
52
|
+
l(this, "_derivatives", []);
|
|
53
|
+
l(this, "_onValueListeners", []);
|
|
54
|
+
l(this, "_onDisposeListeners", []);
|
|
55
|
+
l(this, "get", () => this._value);
|
|
56
|
+
l(this, "hasListeners", () => this._onValueListeners.length > 0);
|
|
57
|
+
l(this, "on", (e) => (e(this.get()), this._onValueListeners.push(e), () => {
|
|
58
58
|
this._onValueListeners.splice(this._onValueListeners.indexOf(e), 1);
|
|
59
59
|
}));
|
|
60
|
-
|
|
60
|
+
l(this, "_setAndNotify", (e, r) => {
|
|
61
61
|
const n = this.equals(this._value, e);
|
|
62
62
|
n || (this._value = e), (r || !n) && this._onValueListeners.forEach((s) => s(e));
|
|
63
63
|
});
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
l(this, "_disposed", !1);
|
|
65
|
+
l(this, "isDisposed", () => this._disposed);
|
|
66
|
+
l(this, "onDispose", (e) => {
|
|
67
67
|
this._onDisposeListeners.push(e);
|
|
68
68
|
});
|
|
69
|
-
|
|
69
|
+
l(this, "dispose", () => {
|
|
70
70
|
this._disposed || (this._disposed = !0, this._onDisposeListeners.forEach((e) => e()), this._onDisposeListeners.length = 0, this._derivatives.length = 0);
|
|
71
71
|
});
|
|
72
|
-
|
|
73
|
-
const n = new
|
|
72
|
+
l(this, "map", (e, r = (n, s) => n === s) => {
|
|
73
|
+
const n = new T(() => {
|
|
74
74
|
try {
|
|
75
75
|
return e(this.get());
|
|
76
76
|
} catch (s) {
|
|
@@ -79,8 +79,8 @@ const _ = class _ {
|
|
|
79
79
|
}, r);
|
|
80
80
|
return this.setDerivative(n), n;
|
|
81
81
|
});
|
|
82
|
-
|
|
83
|
-
const n = new
|
|
82
|
+
l(this, "flatMap", (e, r = (n, s) => n === s) => {
|
|
83
|
+
const n = new T(() => {
|
|
84
84
|
try {
|
|
85
85
|
return e(this.get()).get();
|
|
86
86
|
} catch (s) {
|
|
@@ -89,11 +89,14 @@ const _ = class _ {
|
|
|
89
89
|
}, r);
|
|
90
90
|
return this.setDerivative(n), n;
|
|
91
91
|
});
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
l(this, "tap", (e) => this.map((r) => (e(r), r)));
|
|
93
|
+
l(this, "at", (e) => this.map((r) => r[e]));
|
|
94
|
+
l(this, "$", new Proxy(this, {
|
|
95
|
+
get: (e, r) => this.at(r)
|
|
96
|
+
}));
|
|
97
|
+
l(this, "filter", (e, r) => {
|
|
95
98
|
let n = r ?? this.get();
|
|
96
|
-
const s = new
|
|
99
|
+
const s = new T(() => {
|
|
97
100
|
try {
|
|
98
101
|
const i = this.get();
|
|
99
102
|
return n = e(i) ? i : n;
|
|
@@ -103,29 +106,29 @@ const _ = class _ {
|
|
|
103
106
|
}, this.equals);
|
|
104
107
|
return this.setDerivative(s), s;
|
|
105
108
|
});
|
|
106
|
-
|
|
109
|
+
l(this, "filterMap", (e, r, n = (s, i) => s === i) => {
|
|
107
110
|
let s = r;
|
|
108
|
-
const i = new
|
|
111
|
+
const i = new T(() => {
|
|
109
112
|
try {
|
|
110
|
-
const o = this.get(),
|
|
111
|
-
return s =
|
|
113
|
+
const o = this.get(), a = e(o);
|
|
114
|
+
return s = a ?? s;
|
|
112
115
|
} catch (o) {
|
|
113
116
|
throw console.error("Error in Signal.filterMap:", o), o;
|
|
114
117
|
}
|
|
115
118
|
}, n);
|
|
116
119
|
return this.setDerivative(i), i;
|
|
117
120
|
});
|
|
118
|
-
|
|
119
|
-
const i =
|
|
121
|
+
l(this, "mapAsync", (e, r, n, s = (i, o) => i === o) => {
|
|
122
|
+
const i = A(r, s);
|
|
120
123
|
let o = 0;
|
|
121
124
|
return i.onDispose(
|
|
122
|
-
this.on((
|
|
123
|
-
const
|
|
125
|
+
this.on((a) => {
|
|
126
|
+
const u = ++o;
|
|
124
127
|
try {
|
|
125
|
-
e(
|
|
126
|
-
|
|
128
|
+
e(a).then((c) => {
|
|
129
|
+
u === o && i.set(c);
|
|
127
130
|
}).catch((c) => {
|
|
128
|
-
|
|
131
|
+
u === o && (n != null ? i.set(n(c)) : console.error(
|
|
129
132
|
"Unhandled promise rejection in Signal.mapAsync:",
|
|
130
133
|
c
|
|
131
134
|
));
|
|
@@ -136,17 +139,17 @@ const _ = class _ {
|
|
|
136
139
|
})
|
|
137
140
|
), i;
|
|
138
141
|
});
|
|
139
|
-
|
|
140
|
-
|
|
142
|
+
l(this, "mapMaybe", (e, r) => this.map((n) => e(n) ?? r));
|
|
143
|
+
l(this, "feedProp", (e, r = !1) => {
|
|
141
144
|
const n = this.on(e.set);
|
|
142
145
|
return e.onDispose(n), r ? this.onDispose(e.dispose) : this.onDispose(n), e;
|
|
143
146
|
});
|
|
144
|
-
|
|
145
|
-
|
|
147
|
+
l(this, "deriveProp", (e = !0) => this.feedProp(A(this.get()), e));
|
|
148
|
+
l(this, "count", () => {
|
|
146
149
|
let e = 0;
|
|
147
150
|
return this.map(() => ++e);
|
|
148
151
|
});
|
|
149
|
-
|
|
152
|
+
l(this, "setDerivative", (e) => {
|
|
150
153
|
this._derivatives.push(e), e.onDispose(() => {
|
|
151
154
|
this._derivatives.splice(
|
|
152
155
|
this._derivatives.indexOf(e),
|
|
@@ -166,7 +169,7 @@ const _ = class _ {
|
|
|
166
169
|
}), i;
|
|
167
170
|
}
|
|
168
171
|
static is(e) {
|
|
169
|
-
return e != null && e[
|
|
172
|
+
return e != null && e[te] === !0;
|
|
170
173
|
}
|
|
171
174
|
static wrap(e, r = (n, s) => n === s) {
|
|
172
175
|
return _.is(e) ? e : new _(e, r);
|
|
@@ -185,56 +188,69 @@ const _ = class _ {
|
|
|
185
188
|
}
|
|
186
189
|
};
|
|
187
190
|
let h = _;
|
|
188
|
-
const
|
|
189
|
-
var
|
|
190
|
-
class
|
|
191
|
+
const Be = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
|
|
192
|
+
var le, ce;
|
|
193
|
+
class T extends (ce = h, le = ne, ce) {
|
|
191
194
|
constructor(r, n) {
|
|
192
195
|
super(void 0, n);
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
+
l(this, le, !0);
|
|
197
|
+
l(this, "_isDirty", !1);
|
|
198
|
+
l(this, "setDirty", () => {
|
|
196
199
|
this._isDirty || this._disposed || (this._isDirty = !0, this._derivatives.forEach((r) => r.setDirty()), this.scheduleNotify());
|
|
197
200
|
});
|
|
198
|
-
|
|
199
|
-
|
|
201
|
+
l(this, "_scheduleCount", 0);
|
|
202
|
+
l(this, "scheduleNotify", () => {
|
|
200
203
|
const r = ++this._scheduleCount;
|
|
201
|
-
|
|
204
|
+
Be(() => {
|
|
202
205
|
this._scheduleCount !== r || this._disposed !== !1 || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn(), !1));
|
|
203
206
|
});
|
|
204
207
|
});
|
|
205
|
-
|
|
208
|
+
l(this, "get", () => (this._isDirty && (this._isDirty = !1, this._value = this._fn(), this._setAndNotify(this._value, !0)), this._value));
|
|
206
209
|
this._fn = r, this.setDirty();
|
|
207
210
|
}
|
|
208
211
|
static is(r) {
|
|
209
|
-
return r != null && r[
|
|
212
|
+
return r != null && r[ne] === !0;
|
|
210
213
|
}
|
|
211
214
|
get value() {
|
|
212
215
|
return this.get();
|
|
213
216
|
}
|
|
214
217
|
}
|
|
215
|
-
var
|
|
216
|
-
class
|
|
218
|
+
var fe, he;
|
|
219
|
+
class q extends (he = h, fe = re, he) {
|
|
217
220
|
constructor() {
|
|
218
221
|
super(...arguments);
|
|
219
|
-
|
|
220
|
-
|
|
222
|
+
l(this, fe, !0);
|
|
223
|
+
l(this, "set", (r) => {
|
|
221
224
|
this._setAndNotify(r, !1);
|
|
222
225
|
});
|
|
223
|
-
|
|
226
|
+
l(this, "update", (r) => {
|
|
224
227
|
this._setAndNotify(r(this.get()), !1);
|
|
225
228
|
});
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
+
l(this, "reducer", (r, ...n) => {
|
|
230
|
+
const s = this;
|
|
231
|
+
return function i(o) {
|
|
232
|
+
const a = s.value;
|
|
233
|
+
s.update((u) => r(u, o)), !s.equals(a, s.value) && n.forEach(
|
|
234
|
+
(u) => u({
|
|
235
|
+
previousState: a,
|
|
236
|
+
state: s.value,
|
|
237
|
+
action: o,
|
|
238
|
+
dispatch: i
|
|
239
|
+
})
|
|
240
|
+
);
|
|
241
|
+
};
|
|
242
|
+
});
|
|
243
|
+
l(this, "iso", (r, n, s = (i, o) => i === o) => {
|
|
244
|
+
const i = new q(r(this.get()), s);
|
|
229
245
|
return i.onDispose(this.on((o) => i.set(r(o)))), i.on((o) => this._setAndNotify(n(o), !1)), i;
|
|
230
246
|
});
|
|
231
|
-
|
|
247
|
+
l(this, "atProp", (r) => this.iso(
|
|
232
248
|
(n) => n[r],
|
|
233
249
|
(n) => ({ ...this.value, [r]: n })
|
|
234
250
|
));
|
|
235
251
|
}
|
|
236
252
|
static is(r) {
|
|
237
|
-
return r != null && r[
|
|
253
|
+
return r != null && r[re] === !0;
|
|
238
254
|
}
|
|
239
255
|
get value() {
|
|
240
256
|
return this.get();
|
|
@@ -243,91 +259,91 @@ class z extends (fe = h, ce = te, fe) {
|
|
|
243
259
|
this._setAndNotify(r, !1);
|
|
244
260
|
}
|
|
245
261
|
}
|
|
246
|
-
function
|
|
247
|
-
const n = new
|
|
262
|
+
function U(t, e, r = (n, s) => n === s) {
|
|
263
|
+
const n = new T(t, r);
|
|
248
264
|
return e.forEach((s) => s.setDerivative(n)), n;
|
|
249
265
|
}
|
|
250
|
-
function
|
|
251
|
-
return
|
|
266
|
+
function Kt(t, e) {
|
|
267
|
+
return U(t, e).dispose;
|
|
252
268
|
}
|
|
253
|
-
function
|
|
254
|
-
return new
|
|
269
|
+
function A(t, e = (r, n) => r === n) {
|
|
270
|
+
return new q(t, e);
|
|
255
271
|
}
|
|
256
|
-
function
|
|
272
|
+
function Ut(t, e = (r, n) => r === n) {
|
|
257
273
|
return new h(t, e);
|
|
258
274
|
}
|
|
259
275
|
class de {
|
|
260
276
|
constructor() {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
277
|
+
l(this, "_store", /* @__PURE__ */ new Map());
|
|
278
|
+
l(this, "getItem", (e) => this._store.get(e) ?? null);
|
|
279
|
+
l(this, "setItem", (e, r) => {
|
|
264
280
|
this._store.set(e, r);
|
|
265
281
|
});
|
|
266
282
|
}
|
|
267
283
|
}
|
|
268
|
-
function
|
|
284
|
+
function pe({
|
|
269
285
|
key: t,
|
|
270
286
|
defaultValue: e,
|
|
271
287
|
store: r,
|
|
272
288
|
serialize: n = JSON.stringify,
|
|
273
289
|
deserialize: s = JSON.parse,
|
|
274
|
-
equals: i = (
|
|
275
|
-
onLoad: o = (
|
|
290
|
+
equals: i = (a, u) => a === u,
|
|
291
|
+
onLoad: o = (a) => a
|
|
276
292
|
}) {
|
|
277
|
-
const
|
|
278
|
-
|
|
293
|
+
const a = r.getItem(t), u = new q(
|
|
294
|
+
a != null ? o(s(a)) : typeof e == "function" ? e() : e,
|
|
279
295
|
i
|
|
280
296
|
);
|
|
281
|
-
return
|
|
297
|
+
return u.on((c) => {
|
|
282
298
|
r.setItem(t, n(c));
|
|
283
|
-
}),
|
|
299
|
+
}), u;
|
|
284
300
|
}
|
|
285
|
-
function
|
|
286
|
-
return
|
|
301
|
+
function kt(t) {
|
|
302
|
+
return pe({
|
|
287
303
|
...t,
|
|
288
304
|
store: (window == null ? void 0 : window.localStorage) ?? new de()
|
|
289
305
|
});
|
|
290
306
|
}
|
|
291
|
-
function
|
|
292
|
-
return
|
|
307
|
+
function Bt(t) {
|
|
308
|
+
return pe({
|
|
293
309
|
...t,
|
|
294
310
|
store: (window == null ? void 0 : window.sessionStorage) ?? new de()
|
|
295
311
|
});
|
|
296
312
|
}
|
|
297
|
-
function
|
|
313
|
+
function se(t) {
|
|
298
314
|
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(t) : setTimeout(t, 0);
|
|
299
315
|
}
|
|
300
|
-
function
|
|
301
|
-
const s = (n == null ? void 0 : n.duration) ?? 300, i = (n == null ? void 0 : n.easing) ?? ((
|
|
302
|
-
let
|
|
303
|
-
const
|
|
304
|
-
|
|
316
|
+
function Ge(t, e, r, n) {
|
|
317
|
+
const s = (n == null ? void 0 : n.duration) ?? 300, i = (n == null ? void 0 : n.easing) ?? ((b) => b), o = (n == null ? void 0 : n.equals) ?? ((b, O) => b === O);
|
|
318
|
+
let a = n == null ? void 0 : n.interpolate, u = t, c = e(), p = performance.now(), m = null, d = !0;
|
|
319
|
+
const E = new T(e, o), y = A(t, o);
|
|
320
|
+
y.onDispose(() => {
|
|
305
321
|
m !== null && cancelAnimationFrame(m);
|
|
306
|
-
}),
|
|
307
|
-
|
|
322
|
+
}), y.onDispose(E.dispose), r.forEach((b) => {
|
|
323
|
+
b.setDerivative(E), b.onDispose(y.dispose);
|
|
308
324
|
});
|
|
309
|
-
const Y = (
|
|
310
|
-
c =
|
|
325
|
+
const Y = (b) => {
|
|
326
|
+
c = b, p = performance.now(), u = y.value, d && (d = !1, m = se(J));
|
|
311
327
|
}, J = () => {
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
-
let
|
|
315
|
-
|
|
328
|
+
const O = (performance.now() - p) / h.unwrap(s), qe = i(O);
|
|
329
|
+
a == null && (a = Ue(u));
|
|
330
|
+
let Q = a(u, c, qe);
|
|
331
|
+
O >= 1 ? (d = !0, Q = c) : m = se(J), y.set(Q);
|
|
316
332
|
};
|
|
317
|
-
return
|
|
333
|
+
return E.on(Y), y;
|
|
318
334
|
}
|
|
319
|
-
function
|
|
335
|
+
function Gt(t, e) {
|
|
320
336
|
const { initialValue: r, ...n } = e ?? {};
|
|
321
|
-
return
|
|
337
|
+
return Ge(r ?? t.get(), t.get, [t], n);
|
|
322
338
|
}
|
|
323
|
-
function
|
|
339
|
+
function Jt(t, e) {
|
|
324
340
|
const { signals: r, literals: n } = Object.entries(t).reduce(
|
|
325
|
-
({ signals: i, literals: o }, [
|
|
341
|
+
({ signals: i, literals: o }, [a, u]) => (h.is(u) ? i.push([a, u]) : o[a] = u, { signals: i, literals: o }),
|
|
326
342
|
{ signals: [], literals: {} }
|
|
327
343
|
), s = r.map(([, i]) => i);
|
|
328
|
-
return
|
|
344
|
+
return U(() => (r.forEach(([i, o]) => n[i] = o.value), e(n)), s);
|
|
329
345
|
}
|
|
330
|
-
function
|
|
346
|
+
function ie(t) {
|
|
331
347
|
let e = t.match(/rgba?\((\d+), (\d+), (\d+)(, (\d+))?\)/);
|
|
332
348
|
return e != null ? [
|
|
333
349
|
Number(e[1]),
|
|
@@ -349,7 +365,7 @@ function se(t) {
|
|
|
349
365
|
"hsla"
|
|
350
366
|
] : [0, 0, 0, 1, "rgba"]));
|
|
351
367
|
}
|
|
352
|
-
function
|
|
368
|
+
function oe(t) {
|
|
353
369
|
const e = /^(inset\s)?(-?\d+)([a-zA-Z]*)(\s+)(-?\d+)([a-zA-Z]*)(?:\s+(-?\d+)([a-zA-Z]*))?(?:\s+(-?\d+)([a-zA-Z]*))?(?:\s+(-?\d+)([a-zA-Z]*))?(?:\s+)([a-zA-Z0-9(),.]+)$/i, r = t.match(e);
|
|
354
370
|
if (r == null)
|
|
355
371
|
return {
|
|
@@ -360,98 +376,98 @@ function ie(t) {
|
|
|
360
376
|
spread: 0,
|
|
361
377
|
color: "rgba(0, 0, 0, 0)"
|
|
362
378
|
};
|
|
363
|
-
const [, n, s, , , i, , o, ,
|
|
379
|
+
const [, n, s, , , i, , o, , a, , u] = r, c = o != null ? parseInt(o, 10) : 0, p = a != null ? parseInt(a, 10) : 0;
|
|
364
380
|
return {
|
|
365
381
|
inset: !!n,
|
|
366
382
|
x: parseInt(s, 10),
|
|
367
383
|
y: parseInt(i, 10),
|
|
368
384
|
blur: c,
|
|
369
385
|
spread: p,
|
|
370
|
-
color:
|
|
386
|
+
color: u
|
|
371
387
|
};
|
|
372
388
|
}
|
|
373
|
-
function
|
|
389
|
+
function Je(t) {
|
|
374
390
|
const { inset: e, x: r, y: n, blur: s, spread: i, color: o } = t;
|
|
375
391
|
return `${e ? "inset " : ""}${r}px ${n}px ${s}px ${i}px ${o}`;
|
|
376
392
|
}
|
|
377
|
-
function
|
|
393
|
+
function Qe(t) {
|
|
378
394
|
return t[4] === "rgba" ? `rgba(${t[0]}, ${t[1]}, ${t[2]}, ${t[3]})` : t[4] === "hex" ? `#${t[0].toString(16).padStart(2, "0")}${t[1].toString(16).padStart(2, "0")}${t[2].toString(16).padStart(2, "0")}` : t[4] === "hsla" ? `hsla(${t[0]}, ${t[1]}%, ${t[2]}%, ${t[3]})` : "";
|
|
379
395
|
}
|
|
380
|
-
function
|
|
381
|
-
const [r, n, s, i, o] =
|
|
396
|
+
function et(t, e) {
|
|
397
|
+
const [r, n, s, i, o] = ie(t), [a, u, c, p] = ie(e);
|
|
382
398
|
return (m) => {
|
|
383
|
-
const d = r + (
|
|
384
|
-
return
|
|
399
|
+
const d = r + (a - r) * m, E = n + (u - n) * m, y = s + (c - s) * m, Y = i + (p - i) * m;
|
|
400
|
+
return Qe([d, E, y, Y, o]);
|
|
385
401
|
};
|
|
386
402
|
}
|
|
387
|
-
function
|
|
388
|
-
const r =
|
|
403
|
+
function Qt(t, e) {
|
|
404
|
+
const r = oe(t), n = oe(e);
|
|
389
405
|
return (s) => {
|
|
390
|
-
const i = r.x + (n.x - r.x) * s, o = r.y + (n.y - r.y) * s,
|
|
391
|
-
return
|
|
406
|
+
const i = r.x + (n.x - r.x) * s, o = r.y + (n.y - r.y) * s, a = r.blur + (n.blur - r.blur) * s, u = r.spread + (n.spread - r.spread) * s, c = ge(r.color, n.color)(s);
|
|
407
|
+
return Je({ inset: r.inset, x: i, y: o, blur: a, spread: u, color: c });
|
|
392
408
|
};
|
|
393
409
|
}
|
|
394
|
-
function
|
|
395
|
-
var r, n, s, i, o,
|
|
396
|
-
return e === "translateX" ? new WebKitCSSMatrix(t.transform).m41 : e === "translateY" ? new WebKitCSSMatrix(t.transform).m42 : e === "translateZ" ? new WebKitCSSMatrix(t.transform).m43 : e === "rotateX" ? new WebKitCSSMatrix(t.transform).m12 : e === "rotateY" ? new WebKitCSSMatrix(t.transform).m21 : e === "rotateZ" ? new WebKitCSSMatrix(t.transform).m31 : e === "scaleX" ? new WebKitCSSMatrix(t.transform).m11 : e === "scaleY" ? new WebKitCSSMatrix(t.transform).m22 : e === "scaleZ" ? new WebKitCSSMatrix(t.transform).m33 : e === "skewX" ? new WebKitCSSMatrix(t.transform).m13 : e === "skewY" ? new WebKitCSSMatrix(t.transform).m23 : Number(e === "grayScale" ? (r = t.filter.match(/grayscale\((\d+)%\)/)) == null ? void 0 : r[1] : e === "sepia" ? (n = t.filter.match(/sepia\((\d+)%\)/)) == null ? void 0 : n[1] : e === "saturate" ? (s = t.filter.match(/saturate\((\d+)%\)/)) == null ? void 0 : s[1] : e === "hueRotate" ? (i = t.filter.match(/hue-rotate\((\d+)deg\)/)) == null ? void 0 : i[1] : e === "invert" ? (o = t.filter.match(/invert\((\d+)%\)/)) == null ? void 0 : o[1] : e === "brightness" ? (
|
|
410
|
+
function tt(t, e) {
|
|
411
|
+
var r, n, s, i, o, a, u, c;
|
|
412
|
+
return e === "translateX" ? new WebKitCSSMatrix(t.transform).m41 : e === "translateY" ? new WebKitCSSMatrix(t.transform).m42 : e === "translateZ" ? new WebKitCSSMatrix(t.transform).m43 : e === "rotateX" ? new WebKitCSSMatrix(t.transform).m12 : e === "rotateY" ? new WebKitCSSMatrix(t.transform).m21 : e === "rotateZ" ? new WebKitCSSMatrix(t.transform).m31 : e === "scaleX" ? new WebKitCSSMatrix(t.transform).m11 : e === "scaleY" ? new WebKitCSSMatrix(t.transform).m22 : e === "scaleZ" ? new WebKitCSSMatrix(t.transform).m33 : e === "skewX" ? new WebKitCSSMatrix(t.transform).m13 : e === "skewY" ? new WebKitCSSMatrix(t.transform).m23 : Number(e === "grayScale" ? (r = t.filter.match(/grayscale\((\d+)%\)/)) == null ? void 0 : r[1] : e === "sepia" ? (n = t.filter.match(/sepia\((\d+)%\)/)) == null ? void 0 : n[1] : e === "saturate" ? (s = t.filter.match(/saturate\((\d+)%\)/)) == null ? void 0 : s[1] : e === "hueRotate" ? (i = t.filter.match(/hue-rotate\((\d+)deg\)/)) == null ? void 0 : i[1] : e === "invert" ? (o = t.filter.match(/invert\((\d+)%\)/)) == null ? void 0 : o[1] : e === "brightness" ? (a = t.filter.match(/brightness\((\d+)%\)/)) == null ? void 0 : a[1] : e === "contrast" ? (u = t.filter.match(/contrast\((\d+)%\)/)) == null ? void 0 : u[1] : e === "blur" ? (c = t.filter.match(/blur\((\d+)px\)/)) == null ? void 0 : c[1] : t.getPropertyValue(e));
|
|
397
413
|
}
|
|
398
|
-
function
|
|
414
|
+
function er(t, e) {
|
|
399
415
|
const r = {}, n = getComputedStyle(t);
|
|
400
416
|
for (const [s, i] of Object.entries(e)) {
|
|
401
417
|
const o = s;
|
|
402
|
-
i != null && (r[o] =
|
|
418
|
+
i != null && (r[o] = tt(n, o));
|
|
403
419
|
}
|
|
404
420
|
return r;
|
|
405
421
|
}
|
|
406
|
-
function
|
|
422
|
+
function W(t, e, r) {
|
|
407
423
|
r != null && (e === "translateX" ? t.style.transform += ` translateX(${r}px)` : e === "translateY" ? t.style.transform += ` translateY(${r}px)` : e === "translateZ" ? t.style.transform += ` translateZ(${r}px)` : e === "rotateX" ? t.style.transform += ` rotateX(${r}deg)` : e === "rotateY" ? t.style.transform += ` rotateY(${r}deg)` : e === "rotateZ" ? t.style.transform += ` rotateZ(${r}deg)` : e === "scaleX" ? t.style.transform += ` scaleX(${r})` : e === "scaleY" ? t.style.transform += ` scaleY(${r})` : e === "scaleZ" ? t.style.transform += ` scaleZ(${r})` : e === "skewX" ? t.style.transform += ` skewX(${r}deg)` : e === "skewY" ? t.style.transform += ` skewY(${r}deg)` : e === "grayScale" ? t.style.filter += ` grayscale(${r}%)` : e === "sepia" ? t.style.filter += ` sepia(${r}%)` : e === "saturate" ? t.style.filter += ` saturate(${r}%)` : e === "hueRotate" ? t.style.filter += ` hue-rotate(${r}deg)` : e === "invert" ? t.style.filter += ` invert(${r}%)` : e === "brightness" ? t.style.filter += ` brightness(${r}%)` : e === "contrast" ? t.style.filter += ` contrast(${r}%)` : e === "blur" && (t.style.filter += ` blur(${r}px)`), t.style.setProperty(e, String(r)));
|
|
408
424
|
}
|
|
409
425
|
const j = /* @__PURE__ */ new Map();
|
|
410
|
-
function
|
|
426
|
+
function me(t, e, r) {
|
|
411
427
|
if (j.has(r + ":" + t + e))
|
|
412
428
|
return j.get(t + e);
|
|
413
|
-
const n =
|
|
429
|
+
const n = et(t, e);
|
|
414
430
|
return j.set(r + ":" + t + e, n), n;
|
|
415
431
|
}
|
|
416
|
-
function
|
|
417
|
-
return
|
|
432
|
+
function ge(t, e) {
|
|
433
|
+
return me(t, e, "c");
|
|
418
434
|
}
|
|
419
|
-
function
|
|
420
|
-
return
|
|
435
|
+
function rt(t, e) {
|
|
436
|
+
return me(t, e, "s");
|
|
421
437
|
}
|
|
422
|
-
function
|
|
438
|
+
function nt(t, e, r, n, s) {
|
|
423
439
|
if (r != null && n != null) {
|
|
424
440
|
if (typeof r == "number" && typeof n == "number") {
|
|
425
441
|
const i = r + (n - r) * s;
|
|
426
|
-
|
|
442
|
+
W(t, e, i);
|
|
427
443
|
} else if (e === "boxShadow" || e === "textShadow") {
|
|
428
|
-
const i =
|
|
444
|
+
const i = rt(
|
|
429
445
|
r,
|
|
430
446
|
n
|
|
431
447
|
)(s);
|
|
432
|
-
|
|
448
|
+
W(t, e, i);
|
|
433
449
|
} else if (e === "color" || e === "backgroundColor" || e === "borderColor" || e === "outlineColor") {
|
|
434
|
-
const i =
|
|
450
|
+
const i = ge(
|
|
435
451
|
r,
|
|
436
452
|
n
|
|
437
453
|
)(s);
|
|
438
|
-
|
|
454
|
+
W(t, e, i);
|
|
439
455
|
}
|
|
440
456
|
}
|
|
441
457
|
}
|
|
442
|
-
function
|
|
458
|
+
function tr(t, e, r, n) {
|
|
443
459
|
t.style.transform = "", t.style.filter = "";
|
|
444
460
|
for (const [s, i] of Object.entries(r)) {
|
|
445
461
|
const o = s;
|
|
446
|
-
|
|
462
|
+
nt(t, o, e[o], i, n);
|
|
447
463
|
}
|
|
448
464
|
}
|
|
449
|
-
function
|
|
465
|
+
function rr(t, e) {
|
|
450
466
|
t.style.transform = "", t.style.filter = "";
|
|
451
467
|
for (const [r, n] of Object.entries(e))
|
|
452
|
-
n != null &&
|
|
468
|
+
n != null && W(t, r, n);
|
|
453
469
|
}
|
|
454
|
-
const
|
|
470
|
+
const we = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]), Se = /* @__PURE__ */ new Set([
|
|
455
471
|
"rowSpan",
|
|
456
472
|
"colSpan",
|
|
457
473
|
"tabIndex",
|
|
@@ -464,47 +480,47 @@ const ge = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]
|
|
|
464
480
|
"outerHTML",
|
|
465
481
|
"className",
|
|
466
482
|
"classList"
|
|
467
|
-
]),
|
|
468
|
-
function
|
|
469
|
-
if (
|
|
470
|
-
return
|
|
483
|
+
]), H = /* @__PURE__ */ new Map();
|
|
484
|
+
function $(t, e) {
|
|
485
|
+
if (H.has(t))
|
|
486
|
+
return H.get(t);
|
|
471
487
|
{
|
|
472
488
|
const r = e(t);
|
|
473
|
-
return
|
|
489
|
+
return H.set(t, r), r;
|
|
474
490
|
}
|
|
475
491
|
}
|
|
476
|
-
function
|
|
492
|
+
function st(t) {
|
|
477
493
|
return (e, r) => {
|
|
478
494
|
r == null ? e[t] = null : e[t] = !!r;
|
|
479
495
|
};
|
|
480
496
|
}
|
|
481
|
-
function
|
|
497
|
+
function it(t) {
|
|
482
498
|
return (e, r) => {
|
|
483
499
|
r == null ? e[t] = null : e[t] = Number(r);
|
|
484
500
|
};
|
|
485
501
|
}
|
|
486
|
-
function
|
|
502
|
+
function ot(t) {
|
|
487
503
|
return (e, r) => {
|
|
488
504
|
r == null ? e[t] = null : e[t] = r;
|
|
489
505
|
};
|
|
490
506
|
}
|
|
491
|
-
function
|
|
507
|
+
function ut(t) {
|
|
492
508
|
return (e, r) => {
|
|
493
509
|
r == null ? e[t] = null : e[t] = String(r);
|
|
494
510
|
};
|
|
495
511
|
}
|
|
496
|
-
function
|
|
512
|
+
function at(t) {
|
|
497
513
|
return (e, r) => {
|
|
498
514
|
r == null ? e.removeAttribute(t) : e.setAttribute(t, r);
|
|
499
515
|
};
|
|
500
516
|
}
|
|
501
|
-
function Se(t) {
|
|
502
|
-
return ge.has(t) ? C(t, tt) : we.has(t) ? C(t, rt) : be.has(t) ? C(t, nt) : ve.has(t) ? C(t, st) : C(t, it);
|
|
503
|
-
}
|
|
504
517
|
function Ae(t) {
|
|
505
|
-
return
|
|
518
|
+
return we.has(t) ? $(t, st) : Se.has(t) ? $(t, it) : be.has(t) ? $(t, ot) : ve.has(t) ? $(t, ut) : $(t, at);
|
|
519
|
+
}
|
|
520
|
+
function ye(t) {
|
|
521
|
+
return (e) => we.has(t) ? !!e[t] : Se.has(t) ? Number(e[t]) : be.has(t) ? e[t] : ve.has(t) ? String(e[t]) : e.getAttribute(t);
|
|
506
522
|
}
|
|
507
|
-
class
|
|
523
|
+
class v {
|
|
508
524
|
/**
|
|
509
525
|
* Constructs a new `DOMContext` instance.
|
|
510
526
|
*
|
|
@@ -522,19 +538,19 @@ class A {
|
|
|
522
538
|
* @param namespace - The namespace URI to create the element in, or `undefined` to create a standard HTML element.
|
|
523
539
|
* @returns The newly created element.
|
|
524
540
|
*/
|
|
525
|
-
|
|
541
|
+
l(this, "createElement", (e, r) => r !== void 0 ? this.document.createElementNS(r, e) : this.document.createElement(e));
|
|
526
542
|
/**
|
|
527
543
|
* Creates a new text node with the specified text content.
|
|
528
544
|
* @param text - The text content for the new text node.
|
|
529
545
|
* @returns A new `Text` node with the specified text content.
|
|
530
546
|
*/
|
|
531
|
-
|
|
547
|
+
l(this, "createText", (e) => this.document.createTextNode(e));
|
|
532
548
|
/**
|
|
533
549
|
* Creates a new `DOMContext` with a reference to a newly created text node.
|
|
534
550
|
* The text node is appended or inserted to the current `DOMContext`.
|
|
535
551
|
* The new `DOMContext` with the reference is returned.
|
|
536
552
|
*/
|
|
537
|
-
|
|
553
|
+
l(this, "makeRef", () => {
|
|
538
554
|
const e = this.createText("");
|
|
539
555
|
return this.appendOrInsert(e), this.withReference(e);
|
|
540
556
|
});
|
|
@@ -543,7 +559,7 @@ class A {
|
|
|
543
559
|
*
|
|
544
560
|
* @param child - The child node to append or insert.
|
|
545
561
|
*/
|
|
546
|
-
|
|
562
|
+
l(this, "appendOrInsert", (e) => {
|
|
547
563
|
this.reference === void 0 ? this.element.appendChild(e) : this.element.insertBefore(e, this.reference);
|
|
548
564
|
});
|
|
549
565
|
/**
|
|
@@ -552,18 +568,18 @@ class A {
|
|
|
552
568
|
* @param document - The `Document` to use for the `DOMContext`.
|
|
553
569
|
* @returns A new `DOMContext` instance.
|
|
554
570
|
*/
|
|
555
|
-
|
|
571
|
+
l(this, "withDocument", (e) => new v(e, this.element, this.reference, this.providers, !0));
|
|
556
572
|
/**
|
|
557
573
|
* Creates a new `DOMContext` instance with the provided `element`.
|
|
558
574
|
* @param element - The DOM element to use in the new `DOMContext` instance.
|
|
559
575
|
* @returns A new `DOMContext` instance with the provided `element`.
|
|
560
576
|
*/
|
|
561
|
-
|
|
577
|
+
l(this, "withElement", (e) => new v(this.document, e, void 0, this.providers, !1));
|
|
562
578
|
/**
|
|
563
579
|
* Creates a new `DOMContext` instance with the `isFirstLevel` property set to `true`.
|
|
564
580
|
* @returns A new `DOMContext` instance with the `isFirstLevel` property set to `true`.
|
|
565
581
|
*/
|
|
566
|
-
|
|
582
|
+
l(this, "withFirstLevel", () => new v(
|
|
567
583
|
this.document,
|
|
568
584
|
this.element,
|
|
569
585
|
this.reference,
|
|
@@ -576,7 +592,7 @@ class A {
|
|
|
576
592
|
* @param reference - The optional `Text` node to use as the reference for the new `DOMContext`.
|
|
577
593
|
* @returns A new `DOMContext` instance with the specified reference.
|
|
578
594
|
*/
|
|
579
|
-
|
|
595
|
+
l(this, "withReference", (e) => new v(
|
|
580
596
|
this.document,
|
|
581
597
|
this.element,
|
|
582
598
|
e,
|
|
@@ -589,7 +605,7 @@ class A {
|
|
|
589
605
|
* @param value - The value to set for the provider.
|
|
590
606
|
* @returns A new DOMContext with the updated providers.
|
|
591
607
|
*/
|
|
592
|
-
|
|
608
|
+
l(this, "withProvider", (e, r) => new v(
|
|
593
609
|
this.document,
|
|
594
610
|
this.element,
|
|
595
611
|
this.reference,
|
|
@@ -606,7 +622,7 @@ class A {
|
|
|
606
622
|
* @param providers - An object containing the providers to be merged into the existing providers.
|
|
607
623
|
* @returns A new DOMContext instance with the merged providers.
|
|
608
624
|
*/
|
|
609
|
-
|
|
625
|
+
l(this, "withProviders", (e) => new v(
|
|
610
626
|
this.document,
|
|
611
627
|
this.element,
|
|
612
628
|
this.reference,
|
|
@@ -623,7 +639,7 @@ class A {
|
|
|
623
639
|
* @returns The provider for the given mark.
|
|
624
640
|
* @throws {Error} If the provider for the given mark is not found.
|
|
625
641
|
*/
|
|
626
|
-
|
|
642
|
+
l(this, "getProvider", (e) => {
|
|
627
643
|
if (this.providers[e] === void 0)
|
|
628
644
|
throw new Error(`Provider not found: ${e.description}`);
|
|
629
645
|
return this.providers[e];
|
|
@@ -638,20 +654,20 @@ class A {
|
|
|
638
654
|
* @returns A new `DOMContext` instance.
|
|
639
655
|
*/
|
|
640
656
|
static of(e, r) {
|
|
641
|
-
return new
|
|
657
|
+
return new v(e.ownerDocument, e, r, {}, !0);
|
|
642
658
|
}
|
|
643
659
|
}
|
|
644
|
-
function
|
|
660
|
+
function S(t) {
|
|
645
661
|
const e = t;
|
|
646
662
|
e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.parentElement && t.parentElement.removeChild(t);
|
|
647
663
|
}
|
|
648
|
-
function
|
|
649
|
-
return
|
|
664
|
+
function lt(t) {
|
|
665
|
+
return _e(t) ? t : t.parentElement;
|
|
650
666
|
}
|
|
651
|
-
function
|
|
667
|
+
function _e(t) {
|
|
652
668
|
return t.nodeType === 1;
|
|
653
669
|
}
|
|
654
|
-
function
|
|
670
|
+
function ct(t, e, r) {
|
|
655
671
|
let n = t.target;
|
|
656
672
|
for (; n != null && !(n instanceof HTMLAnchorElement); )
|
|
657
673
|
n = n.parentElement;
|
|
@@ -660,50 +676,50 @@ function at(t, e, r) {
|
|
|
660
676
|
if (t.button !== 0 || t.ctrlKey || t.metaKey || s.target !== "_self" && s.target !== "" || s.getAttribute("download") != null)
|
|
661
677
|
return !0;
|
|
662
678
|
if (r) {
|
|
663
|
-
const { pathname: i, search: o, hash:
|
|
664
|
-
if (s.getAttribute("href") !==
|
|
679
|
+
const { pathname: i, search: o, hash: a } = s, u = i + o + a;
|
|
680
|
+
if (s.getAttribute("href") !== u || e && !/\/[^/.]*$/.test(i))
|
|
665
681
|
return !0;
|
|
666
682
|
}
|
|
667
683
|
return !1;
|
|
668
684
|
}
|
|
669
|
-
const
|
|
685
|
+
const nr = (t, e = {
|
|
670
686
|
checkExtension: !0,
|
|
671
687
|
checkExternalUrl: !0
|
|
672
688
|
}) => (r) => {
|
|
673
689
|
const { checkExtension: n, checkExternalUrl: s } = e;
|
|
674
|
-
|
|
690
|
+
ct(
|
|
675
691
|
r,
|
|
676
692
|
n === !0,
|
|
677
693
|
s === !0
|
|
678
694
|
) || t() && r.preventDefault();
|
|
679
695
|
}, Ee = (t) => (e) => {
|
|
680
|
-
|
|
696
|
+
Le(e);
|
|
681
697
|
const r = e.createText(t);
|
|
682
698
|
return e.appendOrInsert(r), (n) => {
|
|
683
|
-
n &&
|
|
699
|
+
n && S(r);
|
|
684
700
|
};
|
|
685
|
-
},
|
|
686
|
-
|
|
701
|
+
}, Pe = (t) => (e) => {
|
|
702
|
+
Le(e);
|
|
687
703
|
const r = e.createText(t.value);
|
|
688
704
|
e.appendOrInsert(r);
|
|
689
705
|
const n = t.on((s) => r.data = s);
|
|
690
706
|
return (s) => {
|
|
691
|
-
n(), s &&
|
|
707
|
+
n(), s && S(r);
|
|
692
708
|
};
|
|
693
709
|
};
|
|
694
|
-
function
|
|
695
|
-
return h.is(t) ?
|
|
710
|
+
function sr(t) {
|
|
711
|
+
return h.is(t) ? Pe(t) : Ee(t);
|
|
696
712
|
}
|
|
697
713
|
const g = (...t) => (e) => {
|
|
698
714
|
const r = t.map((n) => f(n)(e));
|
|
699
715
|
return (n) => {
|
|
700
716
|
r.forEach((s) => s(n));
|
|
701
717
|
};
|
|
702
|
-
},
|
|
703
|
-
},
|
|
718
|
+
}, w = () => () => {
|
|
719
|
+
}, ft = (t) => (e) => (Ne(e), e.element.classList.add(...t), (r) => {
|
|
704
720
|
r && e.element.classList.remove(...t);
|
|
705
|
-
}),
|
|
706
|
-
|
|
721
|
+
}), ht = (t) => (e) => {
|
|
722
|
+
Ne(e);
|
|
707
723
|
const r = e.element;
|
|
708
724
|
let n = [];
|
|
709
725
|
const s = t.on((i) => {
|
|
@@ -712,8 +728,8 @@ const g = (...t) => (e) => {
|
|
|
712
728
|
return (i) => {
|
|
713
729
|
s(), i && n.forEach((o) => r.classList.remove(o)), n.length = 0;
|
|
714
730
|
};
|
|
715
|
-
},
|
|
716
|
-
const r =
|
|
731
|
+
}, R = (t, e) => {
|
|
732
|
+
const r = Ae(t), n = ye(t);
|
|
717
733
|
return (s) => {
|
|
718
734
|
Ce(s, t);
|
|
719
735
|
const i = n(s.element);
|
|
@@ -721,8 +737,8 @@ const g = (...t) => (e) => {
|
|
|
721
737
|
o && r(s.element, i);
|
|
722
738
|
};
|
|
723
739
|
};
|
|
724
|
-
},
|
|
725
|
-
const r =
|
|
740
|
+
}, I = (t, e) => {
|
|
741
|
+
const r = Ae(t), n = ye(t);
|
|
726
742
|
return (s) => {
|
|
727
743
|
Ce(s, t);
|
|
728
744
|
const i = n(s.element);
|
|
@@ -733,161 +749,195 @@ const g = (...t) => (e) => {
|
|
|
733
749
|
}, P = new Proxy(
|
|
734
750
|
{},
|
|
735
751
|
{
|
|
736
|
-
get: (t, e) => e === "class" ? (r) => h.is(r) ?
|
|
752
|
+
get: (t, e) => e === "class" ? (r) => h.is(r) ? ht(r) : ft(
|
|
737
753
|
(r ?? "").split(" ").filter((n) => n.length > 0)
|
|
738
|
-
) : (r) => h.is(r) ?
|
|
754
|
+
) : (r) => h.is(r) ? I(
|
|
739
755
|
e,
|
|
740
756
|
r
|
|
741
|
-
) :
|
|
757
|
+
) : R(
|
|
742
758
|
e,
|
|
743
759
|
r
|
|
744
760
|
)
|
|
745
761
|
}
|
|
746
|
-
),
|
|
762
|
+
), ir = new Proxy(
|
|
747
763
|
{},
|
|
748
764
|
{
|
|
749
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
765
|
+
get: (t, e) => (r) => h.is(r) ? I(
|
|
766
|
+
`data-${e}`,
|
|
767
|
+
r
|
|
768
|
+
) : R(`data-${e}`, r)
|
|
769
|
+
}
|
|
770
|
+
), or = new Proxy(
|
|
771
|
+
{},
|
|
772
|
+
{
|
|
773
|
+
get: (t, e) => (r) => h.is(r) ? I(
|
|
750
774
|
`aria-${e}`,
|
|
751
775
|
r
|
|
752
|
-
) :
|
|
776
|
+
) : R(
|
|
753
777
|
`aria-${e}`,
|
|
754
778
|
r
|
|
755
779
|
)
|
|
756
780
|
}
|
|
757
|
-
),
|
|
781
|
+
), ur = new Proxy(
|
|
758
782
|
{},
|
|
759
783
|
{
|
|
760
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
784
|
+
get: (t, e) => (r) => h.is(r) ? I(
|
|
761
785
|
e,
|
|
762
786
|
r
|
|
763
|
-
) :
|
|
787
|
+
) : R(
|
|
764
788
|
e,
|
|
765
789
|
r
|
|
766
790
|
)
|
|
767
791
|
}
|
|
768
|
-
),
|
|
792
|
+
), ar = new Proxy(
|
|
769
793
|
{},
|
|
770
794
|
{
|
|
771
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
795
|
+
get: (t, e) => (r) => h.is(r) ? I(
|
|
772
796
|
e,
|
|
773
797
|
r
|
|
774
|
-
) :
|
|
798
|
+
) : R(
|
|
775
799
|
e,
|
|
776
800
|
r
|
|
777
801
|
)
|
|
778
802
|
}
|
|
779
803
|
);
|
|
780
804
|
function f(t) {
|
|
781
|
-
return t == null ?
|
|
805
|
+
return t == null ? w : Array.isArray(t) ? g(...t.map(f)) : typeof t == "string" ? Ee(t) : h.is(t) ? Pe(t) : t;
|
|
782
806
|
}
|
|
783
807
|
function Te(t, ...e) {
|
|
784
808
|
return (r) => {
|
|
785
809
|
const n = r.createElement(t, void 0);
|
|
786
|
-
r.isFirstLevel &&
|
|
810
|
+
r.isFirstLevel && D.isSSR() && Me(n), r.appendOrInsert(n), r = r.withElement(n);
|
|
787
811
|
const s = e.map((i) => f(i)(r));
|
|
788
812
|
return (i) => {
|
|
789
|
-
s.forEach((o) => o(!1)), i &&
|
|
813
|
+
s.forEach((o) => o(!1)), i && S(n);
|
|
790
814
|
};
|
|
791
815
|
};
|
|
792
816
|
}
|
|
793
|
-
function
|
|
817
|
+
function De(t, e, ...r) {
|
|
794
818
|
return (n) => {
|
|
795
819
|
const s = n.createElement(t, e);
|
|
796
|
-
n.isFirstLevel &&
|
|
820
|
+
n.isFirstLevel && D.isSSR() && Me(s), n.appendOrInsert(s), n = n.withElement(s);
|
|
797
821
|
const i = r.map((o) => f(o)(n));
|
|
798
822
|
return (o) => {
|
|
799
|
-
i.forEach((
|
|
823
|
+
i.forEach((a) => a(!1)), o && S(s);
|
|
800
824
|
};
|
|
801
825
|
};
|
|
802
826
|
}
|
|
803
|
-
const
|
|
827
|
+
const lr = new Proxy(
|
|
804
828
|
{},
|
|
805
829
|
{
|
|
806
830
|
get: (t, e) => (...r) => Te(e, r.flatMap(f))
|
|
807
831
|
}
|
|
808
|
-
),
|
|
832
|
+
), cr = new Proxy(
|
|
809
833
|
{},
|
|
810
834
|
{
|
|
811
835
|
get: (t, e) => (...r) => Te("input", P.type(e), ...r)
|
|
812
836
|
}
|
|
813
|
-
),
|
|
837
|
+
), dt = "http://www.w3.org/2000/svg", fr = new Proxy(
|
|
814
838
|
{},
|
|
815
839
|
{
|
|
816
|
-
get: (t, e) => (...r) =>
|
|
840
|
+
get: (t, e) => (...r) => De(e, dt, r.flatMap(f))
|
|
817
841
|
}
|
|
818
|
-
),
|
|
842
|
+
), pt = "http://www.w3.org/1998/Math/MathML", hr = new Proxy(
|
|
819
843
|
{},
|
|
820
844
|
{
|
|
821
|
-
get: (t, e) => (...r) =>
|
|
845
|
+
get: (t, e) => (...r) => De(e, pt, r.flatMap(f))
|
|
822
846
|
}
|
|
823
|
-
);
|
|
824
|
-
|
|
825
|
-
const M = "data-tempo-attr", x = "data-tempo-class", De = "data-tempo-node", F = "data-tempo-text";
|
|
826
|
-
function dt(t, e) {
|
|
847
|
+
), C = "data-tempo-attr", F = "data-tempo-class", $e = "data-tempo-node", V = "data-tempo-text";
|
|
848
|
+
function mt(t, e) {
|
|
827
849
|
const r = t.getAttribute(e);
|
|
828
850
|
if (r != null) {
|
|
829
|
-
const n = t.getAttribute(
|
|
830
|
-
t.setAttribute(
|
|
851
|
+
const n = t.getAttribute(C) ?? "{}", s = { ...JSON.parse(n), name: r };
|
|
852
|
+
t.setAttribute(C, JSON.stringify(s));
|
|
831
853
|
}
|
|
832
854
|
}
|
|
833
855
|
function Ce(t, e) {
|
|
834
|
-
|
|
856
|
+
D.isSSR() && t.isFirstLevel && mt(t.element, e);
|
|
835
857
|
}
|
|
836
|
-
function
|
|
837
|
-
t.querySelectorAll(`[${
|
|
838
|
-
const r = JSON.parse(e.getAttribute(
|
|
858
|
+
function gt(t) {
|
|
859
|
+
t.querySelectorAll(`[${C}]`).forEach((e) => {
|
|
860
|
+
const r = JSON.parse(e.getAttribute(C) ?? "{}");
|
|
839
861
|
for (const [n, s] of Object.entries(r))
|
|
840
862
|
e.setAttribute(n, s);
|
|
841
|
-
e.removeAttribute(
|
|
863
|
+
e.removeAttribute(C);
|
|
842
864
|
});
|
|
843
865
|
}
|
|
844
|
-
function
|
|
845
|
-
t.setAttribute(
|
|
866
|
+
function wt(t) {
|
|
867
|
+
t.setAttribute(F, t.className);
|
|
846
868
|
}
|
|
847
|
-
function
|
|
848
|
-
|
|
869
|
+
function Ne(t) {
|
|
870
|
+
D.isSSR() && t.isFirstLevel && wt(t.element);
|
|
849
871
|
}
|
|
850
|
-
function
|
|
851
|
-
t.querySelectorAll(`[${
|
|
852
|
-
const r = e.getAttribute(
|
|
853
|
-
r !== null && (e.className = r, e.removeAttribute(
|
|
872
|
+
function St(t) {
|
|
873
|
+
t.querySelectorAll(`[${F}]`).forEach((e) => {
|
|
874
|
+
const r = e.getAttribute(F);
|
|
875
|
+
r !== null && (e.className = r, e.removeAttribute(F));
|
|
854
876
|
});
|
|
855
877
|
}
|
|
856
|
-
function
|
|
857
|
-
t.setAttribute(
|
|
878
|
+
function Me(t) {
|
|
879
|
+
t.setAttribute($e, "");
|
|
858
880
|
}
|
|
859
|
-
function
|
|
860
|
-
t.querySelectorAll(`[${
|
|
861
|
-
|
|
881
|
+
function bt(t) {
|
|
882
|
+
t.querySelectorAll(`[${$e}]`).forEach((e) => {
|
|
883
|
+
S(e);
|
|
862
884
|
});
|
|
863
885
|
}
|
|
864
|
-
function
|
|
865
|
-
t.setAttribute(
|
|
886
|
+
function vt(t) {
|
|
887
|
+
t.setAttribute(V, t.textContent ?? "");
|
|
866
888
|
}
|
|
867
|
-
function
|
|
868
|
-
|
|
889
|
+
function Le(t) {
|
|
890
|
+
D.isSSR() && t.isFirstLevel && vt(t.element);
|
|
869
891
|
}
|
|
870
|
-
function
|
|
871
|
-
t.querySelectorAll(`[${
|
|
872
|
-
e.textContent = e.getAttribute(
|
|
892
|
+
function At(t) {
|
|
893
|
+
t.querySelectorAll(`[${V}]`).forEach((e) => {
|
|
894
|
+
e.textContent = e.getAttribute(V), e.removeAttribute(V);
|
|
873
895
|
});
|
|
874
896
|
}
|
|
875
|
-
function
|
|
876
|
-
|
|
897
|
+
function yt(t) {
|
|
898
|
+
bt(t), St(t), gt(t), At(t);
|
|
899
|
+
}
|
|
900
|
+
function Re() {
|
|
901
|
+
const t = globalThis;
|
|
902
|
+
return t.__tempoSSR__ == null && (t.__tempoSSR__ = {
|
|
903
|
+
isSSR: !1,
|
|
904
|
+
counter: 0
|
|
905
|
+
}), t.__tempoSSR__;
|
|
906
|
+
}
|
|
907
|
+
function k(t, e) {
|
|
908
|
+
const r = Re();
|
|
909
|
+
r[t] = e;
|
|
910
|
+
}
|
|
911
|
+
function Ie(t) {
|
|
912
|
+
return Re()[t];
|
|
877
913
|
}
|
|
878
|
-
|
|
879
|
-
|
|
914
|
+
function _t() {
|
|
915
|
+
return Ie("isSSR");
|
|
916
|
+
}
|
|
917
|
+
function K(t) {
|
|
918
|
+
k("isSSR", t);
|
|
919
|
+
}
|
|
920
|
+
function B() {
|
|
921
|
+
return Ie("counter");
|
|
922
|
+
}
|
|
923
|
+
function Et() {
|
|
924
|
+
k("counter", (B() ?? 0) + 1);
|
|
925
|
+
}
|
|
926
|
+
function Pt() {
|
|
927
|
+
k("counter", (B() ?? 0) - 1);
|
|
928
|
+
}
|
|
929
|
+
const dr = (t = 30) => (K(!0), new Promise((e, r) => {
|
|
880
930
|
let n;
|
|
881
931
|
const s = setInterval(() => {
|
|
882
|
-
|
|
883
|
-
},
|
|
932
|
+
B() <= 0 && (clearInterval(s), clearTimeout(n), K(!1), e());
|
|
933
|
+
}, 30);
|
|
884
934
|
n = setTimeout(() => {
|
|
885
|
-
clearInterval(s),
|
|
935
|
+
clearInterval(s), K(!1), r(new Error("SSR Timeout"));
|
|
886
936
|
}, t * 1e3);
|
|
887
|
-
})),
|
|
888
|
-
useDone: (t) => (
|
|
889
|
-
isSSR:
|
|
890
|
-
},
|
|
937
|
+
})), D = {
|
|
938
|
+
useDone: (t) => (Et(), f(t(Pt))),
|
|
939
|
+
isSSR: _t
|
|
940
|
+
}, Oe = (t, e) => (r) => {
|
|
891
941
|
const n = Object.values(t).reduce((s, i) => {
|
|
892
942
|
const o = r.getProvider(i);
|
|
893
943
|
if (o == null)
|
|
@@ -895,21 +945,21 @@ const or = (t = 30) => (w = !0, new Promise((e, r) => {
|
|
|
895
945
|
return s[i] = o, s;
|
|
896
946
|
}, {});
|
|
897
947
|
return f(e(n))(r);
|
|
898
|
-
},
|
|
948
|
+
}, pr = (t, e) => (r) => {
|
|
899
949
|
const n = [], s = Object.entries(t).reduce(
|
|
900
|
-
(i, [o,
|
|
901
|
-
|
|
950
|
+
(i, [o, a]) => (n.push(
|
|
951
|
+
a((u) => (Reflect.set(i, o, u), null))(r)
|
|
902
952
|
), i),
|
|
903
953
|
{}
|
|
904
954
|
);
|
|
905
955
|
return n.push(e(s)(r)), (i) => {
|
|
906
956
|
n.forEach((o) => o(i));
|
|
907
957
|
};
|
|
908
|
-
},
|
|
909
|
-
function
|
|
958
|
+
}, Tt = (t, e) => Oe([t], (r) => f(e(r[t]))), mr = (t, e) => Oe(t, (r) => f(e(r))), M = (t) => (e) => (r) => t(r, e);
|
|
959
|
+
function Dt(t) {
|
|
910
960
|
return Symbol(t);
|
|
911
961
|
}
|
|
912
|
-
const
|
|
962
|
+
const xe = (t, e) => (r) => f(e)(r.withProviders(t)), gr = (...t) => t.length > 0 ? t.reduceRight((e, r) => (n) => e(r(n))) : f, $t = (t, e, r) => xe({ [t]: e }, f(r)), wr = (t, e) => xe(t, f(e)), ue = Dt("Appearance"), Sr = {
|
|
913
963
|
/**
|
|
914
964
|
* Provides a child component with an appearance context, which can be used to
|
|
915
965
|
* determine the current appearance (light or dark) based on the user's system
|
|
@@ -922,49 +972,49 @@ const Ie = (t, e) => (r) => f(e)(r.withProviders(t)), lr = (...t) => t.length >
|
|
|
922
972
|
* @returns The child component with the appearance context.
|
|
923
973
|
*/
|
|
924
974
|
provide: (t) => {
|
|
925
|
-
const e = window.matchMedia != null && window.matchMedia("(prefers-color-scheme: dark)").matches, r =
|
|
975
|
+
const e = window.matchMedia != null && window.matchMedia("(prefers-color-scheme: dark)").matches, r = A(e ? "dark" : "light"), n = (i) => {
|
|
926
976
|
r.set(i.matches ? "dark" : "light");
|
|
927
977
|
}, s = window.matchMedia != null ? window.matchMedia("(prefers-color-scheme: dark)") : void 0;
|
|
928
978
|
return s == null || s.addEventListener("change", n), g(
|
|
929
|
-
|
|
930
|
-
|
|
979
|
+
$t(ue, r, t),
|
|
980
|
+
M(() => s == null ? void 0 : s.removeEventListener("change", n))
|
|
931
981
|
);
|
|
932
982
|
},
|
|
933
983
|
/**
|
|
934
984
|
* Makes the AppearanceType available to the child component by consuming the signal provided by the parent.
|
|
935
985
|
* The result of the function is returned as the final output.
|
|
936
986
|
*
|
|
937
|
-
* @param fn - A function that accepts the `AppearanceType` signal and returns a `
|
|
938
|
-
* @returns The `
|
|
987
|
+
* @param fn - A function that accepts the `AppearanceType` signal and returns a `TNode` element.
|
|
988
|
+
* @returns The `TNode` element returned by the provided function.
|
|
939
989
|
*/
|
|
940
|
-
consume: (t) =>
|
|
941
|
-
},
|
|
990
|
+
consume: (t) => Tt(ue, t)
|
|
991
|
+
}, We = (t, e) => {
|
|
942
992
|
if (typeof e == "function")
|
|
943
|
-
return
|
|
944
|
-
const r = e.pending != null ? f(e.pending) :
|
|
993
|
+
return We(t, { then: e });
|
|
994
|
+
const r = e.pending != null ? f(e.pending) : w, n = e.then, s = e.error != null ? (i) => f(e.error(i)) : () => w;
|
|
945
995
|
return (i) => {
|
|
946
996
|
let o = !0;
|
|
947
|
-
const
|
|
997
|
+
const a = t();
|
|
948
998
|
i = i.makeRef();
|
|
949
|
-
let
|
|
950
|
-
return
|
|
999
|
+
let u = f(r)(i);
|
|
1000
|
+
return a.then(
|
|
951
1001
|
(c) => {
|
|
952
|
-
o && (
|
|
1002
|
+
o && (u(!0), u = f(n(c))(i));
|
|
953
1003
|
},
|
|
954
1004
|
(c) => {
|
|
955
|
-
o && (
|
|
1005
|
+
o && (u(!0), u = f(s(c))(i));
|
|
956
1006
|
}
|
|
957
1007
|
), (c) => {
|
|
958
|
-
o = !1,
|
|
1008
|
+
o = !1, u(c), c && i.reference && S(i.reference);
|
|
959
1009
|
};
|
|
960
1010
|
};
|
|
961
|
-
},
|
|
1011
|
+
}, br = (t, e) => We(() => t, e), vr = (t = 10) => (e) => {
|
|
962
1012
|
const r = setTimeout(() => {
|
|
963
1013
|
var n;
|
|
964
1014
|
(n = e.element) == null || n.focus();
|
|
965
1015
|
}, t);
|
|
966
1016
|
return (n) => clearTimeout(r);
|
|
967
|
-
},
|
|
1017
|
+
}, Ar = (t = 10) => (e) => {
|
|
968
1018
|
const r = setTimeout(() => {
|
|
969
1019
|
var n;
|
|
970
1020
|
(n = e.element) == null || n.select();
|
|
@@ -972,9 +1022,9 @@ const Ie = (t, e) => (r) => f(e)(r.withProviders(t)), lr = (...t) => t.length >
|
|
|
972
1022
|
return (n) => {
|
|
973
1023
|
clearTimeout(r);
|
|
974
1024
|
};
|
|
975
|
-
},
|
|
1025
|
+
}, Fe = (t, e) => (r) => (r.element.addEventListener(t, e), (n) => {
|
|
976
1026
|
n && r.element.removeEventListener(t, e);
|
|
977
|
-
}),
|
|
1027
|
+
}), Ct = (t) => Fe("click", (e) => {
|
|
978
1028
|
e.preventDefault();
|
|
979
1029
|
const r = e.target;
|
|
980
1030
|
setTimeout(() => {
|
|
@@ -984,7 +1034,7 @@ const Ie = (t, e) => (r) => f(e)(r.withProviders(t)), lr = (...t) => t.length >
|
|
|
984
1034
|
}), Z = new Proxy(
|
|
985
1035
|
{},
|
|
986
1036
|
{
|
|
987
|
-
get: (t, e) => (r) =>
|
|
1037
|
+
get: (t, e) => (r) => Fe(e, r)
|
|
988
1038
|
}
|
|
989
1039
|
), X = {
|
|
990
1040
|
value: (t) => (e) => {
|
|
@@ -1031,57 +1081,57 @@ const Ie = (t, e) => (r) => f(e)(r.withProviders(t)), lr = (...t) => t.length >
|
|
|
1031
1081
|
e.stopImmediatePropagation(), t();
|
|
1032
1082
|
}
|
|
1033
1083
|
};
|
|
1034
|
-
function
|
|
1084
|
+
function Nt(t, e = "input") {
|
|
1035
1085
|
return g(
|
|
1036
1086
|
P.valueAsDate(t),
|
|
1037
1087
|
Z[e](X.valueAsDate(t.set))
|
|
1038
1088
|
);
|
|
1039
1089
|
}
|
|
1040
|
-
function
|
|
1090
|
+
function Mt(t, e = "input") {
|
|
1041
1091
|
return g(
|
|
1042
1092
|
P.valueAsDate(t),
|
|
1043
1093
|
Z[e](X.valueAsDateTime(t.set))
|
|
1044
1094
|
);
|
|
1045
1095
|
}
|
|
1046
|
-
function
|
|
1096
|
+
function Lt(t, e = "input") {
|
|
1047
1097
|
return g(
|
|
1048
1098
|
P.valueAsNumber(t),
|
|
1049
1099
|
Z[e](X.valueAsNumber(t.set))
|
|
1050
1100
|
);
|
|
1051
1101
|
}
|
|
1052
|
-
function
|
|
1102
|
+
function Rt(t, e = "input") {
|
|
1053
1103
|
return g(P.value(t), Z[e](X.value(t.set)));
|
|
1054
1104
|
}
|
|
1055
|
-
function
|
|
1056
|
-
return g(P.checked(t),
|
|
1105
|
+
function It(t) {
|
|
1106
|
+
return g(P.checked(t), Ct(t.set));
|
|
1057
1107
|
}
|
|
1058
|
-
const
|
|
1059
|
-
date:
|
|
1060
|
-
dateTime:
|
|
1061
|
-
number:
|
|
1062
|
-
text:
|
|
1063
|
-
checked:
|
|
1064
|
-
},
|
|
1108
|
+
const yr = {
|
|
1109
|
+
date: Nt,
|
|
1110
|
+
dateTime: Mt,
|
|
1111
|
+
number: Lt,
|
|
1112
|
+
text: Rt,
|
|
1113
|
+
checked: It
|
|
1114
|
+
}, x = (t, e) => (r) => {
|
|
1065
1115
|
r = r.makeRef();
|
|
1066
1116
|
let n, s;
|
|
1067
|
-
const i = t.map((
|
|
1117
|
+
const i = t.map((u) => Object.keys(u)[0]);
|
|
1068
1118
|
let o;
|
|
1069
|
-
const
|
|
1070
|
-
if (
|
|
1071
|
-
s == null || s.dispose(), n == null || n(!0), s = t.map((p) => p[
|
|
1072
|
-
const c = e[
|
|
1073
|
-
n = f(c)(r), o =
|
|
1119
|
+
const a = i.on((u) => {
|
|
1120
|
+
if (u !== o) {
|
|
1121
|
+
s == null || s.dispose(), n == null || n(!0), s = t.map((p) => p[u]);
|
|
1122
|
+
const c = e[u](s);
|
|
1123
|
+
n = f(c)(r), o = u;
|
|
1074
1124
|
}
|
|
1075
1125
|
});
|
|
1076
|
-
return (
|
|
1077
|
-
|
|
1126
|
+
return (u) => {
|
|
1127
|
+
a(), u && r.reference != null && S(r.reference), n == null || n(!0);
|
|
1078
1128
|
};
|
|
1079
1129
|
}, L = {
|
|
1080
|
-
bool: (t, e) =>
|
|
1130
|
+
bool: (t, e) => x(
|
|
1081
1131
|
t.map((r) => r ? { true: !0 } : { false: !0 }),
|
|
1082
1132
|
e
|
|
1083
1133
|
),
|
|
1084
|
-
field: (t, e, r) =>
|
|
1134
|
+
field: (t, e, r) => x(
|
|
1085
1135
|
t.map((n) => ({ [n[e]]: n })),
|
|
1086
1136
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1087
1137
|
r
|
|
@@ -1089,15 +1139,15 @@ const mr = {
|
|
|
1089
1139
|
kind: (t, e) => L.field(t, "kind", e),
|
|
1090
1140
|
tuple: (t, e) => {
|
|
1091
1141
|
const r = t.map(([n, s]) => ({ [n]: s }));
|
|
1092
|
-
return
|
|
1142
|
+
return x(r, e);
|
|
1093
1143
|
},
|
|
1094
1144
|
type: (t, e) => L.field(t, "type", e),
|
|
1095
|
-
value: (t, e) =>
|
|
1145
|
+
value: (t, e) => x(
|
|
1096
1146
|
t.map((r) => ({ [r]: !0 })),
|
|
1097
1147
|
e
|
|
1098
1148
|
)
|
|
1099
|
-
},
|
|
1100
|
-
const n = (e == null ? void 0 : e.firstSeparator) ??
|
|
1149
|
+
}, _r = (t, e) => (r) => {
|
|
1150
|
+
const n = (e == null ? void 0 : e.firstSeparator) ?? w, s = (e == null ? void 0 : e.lastSeparator) ?? w;
|
|
1101
1151
|
return L.value(
|
|
1102
1152
|
r.map((i) => i.isFirst ? "first" : i.isLast ? "last" : "other"),
|
|
1103
1153
|
{
|
|
@@ -1106,107 +1156,107 @@ const mr = {
|
|
|
1106
1156
|
other: () => t
|
|
1107
1157
|
}
|
|
1108
1158
|
);
|
|
1109
|
-
},
|
|
1110
|
-
r &&
|
|
1111
|
-
}),
|
|
1159
|
+
}, Er = (t) => (e) => t(e)(e), Pr = (t) => (e) => (e.appendOrInsert(t), (r) => {
|
|
1160
|
+
r && S(t);
|
|
1161
|
+
}), Ot = (t, e, r) => (n) => {
|
|
1112
1162
|
n = n.makeRef();
|
|
1113
1163
|
let s = null, i = !1;
|
|
1114
|
-
const o =
|
|
1115
|
-
|
|
1164
|
+
const o = A(null), a = t.on((u) => {
|
|
1165
|
+
u == null ? (s == null || s(!0), s = f((r == null ? void 0 : r()) ?? w)(n), i = !1) : (o.value = u, i || (s == null || s(!0), s = f(e(o))(n), i = !0));
|
|
1116
1166
|
});
|
|
1117
|
-
return (
|
|
1118
|
-
|
|
1167
|
+
return (u) => {
|
|
1168
|
+
a(), s == null || s(u), u && n.reference && S(n.reference);
|
|
1119
1169
|
};
|
|
1120
|
-
},
|
|
1170
|
+
}, Ve = (t, e, r) => r != null ? Ve(t, (n) => {
|
|
1121
1171
|
const s = n.map((i) => i.isLast ? "last" : "other");
|
|
1122
1172
|
return g(
|
|
1123
|
-
|
|
1173
|
+
M(() => s.dispose()),
|
|
1124
1174
|
f(e(n)),
|
|
1125
1175
|
L.value(s, {
|
|
1126
|
-
last: () =>
|
|
1176
|
+
last: () => w,
|
|
1127
1177
|
other: () => r(n)
|
|
1128
1178
|
})
|
|
1129
1179
|
);
|
|
1130
1180
|
}) : (n) => {
|
|
1131
1181
|
n = n.makeRef();
|
|
1132
1182
|
const s = t.map(
|
|
1133
|
-
(
|
|
1134
|
-
(c) => new ke(c,
|
|
1183
|
+
(u) => Array.from({ length: u }, (c, p) => p).map(
|
|
1184
|
+
(c) => new ke(c, u)
|
|
1135
1185
|
)
|
|
1136
|
-
), i = [], o = [],
|
|
1186
|
+
), i = [], o = [], a = s.on((u) => {
|
|
1137
1187
|
var p, m;
|
|
1138
|
-
const c =
|
|
1188
|
+
const c = u.length;
|
|
1139
1189
|
for (; c < i.length; )
|
|
1140
1190
|
(p = i.pop()) == null || p(!0), (m = o.pop()) == null || m.dispose();
|
|
1141
1191
|
for (let d = 0; d < c; d++)
|
|
1142
1192
|
if (o[d] == null) {
|
|
1143
|
-
o[d] =
|
|
1144
|
-
const
|
|
1145
|
-
i[d] =
|
|
1193
|
+
o[d] = A(u[d]);
|
|
1194
|
+
const E = f(e(o[d]));
|
|
1195
|
+
i[d] = E(n);
|
|
1146
1196
|
} else
|
|
1147
|
-
o[d].value =
|
|
1197
|
+
o[d].value = u[d];
|
|
1148
1198
|
});
|
|
1149
|
-
return (
|
|
1150
|
-
|
|
1199
|
+
return (u) => {
|
|
1200
|
+
a(), u && n.reference && S(n.reference);
|
|
1151
1201
|
};
|
|
1152
|
-
},
|
|
1202
|
+
}, xt = (t, e, r) => r != null ? xt(t, (n, s) => {
|
|
1153
1203
|
const i = s.map((o) => o.isLast ? "last" : "other");
|
|
1154
1204
|
return g([
|
|
1155
|
-
|
|
1205
|
+
M(() => i.dispose()),
|
|
1156
1206
|
f(e(n, s)),
|
|
1157
1207
|
L.value(i, {
|
|
1158
|
-
last: () =>
|
|
1208
|
+
last: () => w,
|
|
1159
1209
|
other: () => r(s)
|
|
1160
1210
|
})
|
|
1161
1211
|
]);
|
|
1162
1212
|
}) : (n) => {
|
|
1163
1213
|
const s = t.map((i) => i.length);
|
|
1164
|
-
return
|
|
1165
|
-
const o =
|
|
1214
|
+
return Ve(s, (i) => {
|
|
1215
|
+
const o = U(
|
|
1166
1216
|
() => t.value[i.value.index],
|
|
1167
1217
|
[i, t]
|
|
1168
1218
|
);
|
|
1169
1219
|
return g(
|
|
1170
|
-
|
|
1220
|
+
M(() => o.dispose()),
|
|
1171
1221
|
f(e(o, i))
|
|
1172
1222
|
);
|
|
1173
1223
|
})(n);
|
|
1174
|
-
},
|
|
1224
|
+
}, Tr = (t) => {
|
|
1175
1225
|
const e = t.element, r = e.style.getPropertyValue(":empty");
|
|
1176
1226
|
return e.style.setProperty(":empty", "display:none"), (n) => {
|
|
1177
1227
|
n && e.style.setProperty(":empty", r);
|
|
1178
1228
|
};
|
|
1179
1229
|
};
|
|
1180
|
-
function
|
|
1230
|
+
function ze(t, e) {
|
|
1181
1231
|
const r = t(e);
|
|
1182
1232
|
return () => r(!0);
|
|
1183
1233
|
}
|
|
1184
|
-
function
|
|
1234
|
+
function Dr(t, e, { doc: r, clear: n } = {}) {
|
|
1185
1235
|
const s = typeof e == "string" ? (r ?? document).querySelector(e) : e;
|
|
1186
1236
|
if (s === null)
|
|
1187
1237
|
throw new Error(`Cannot find element by selector for render: ${e}`);
|
|
1188
|
-
n && (r ?? s.ownerDocument) != null &&
|
|
1189
|
-
const i =
|
|
1190
|
-
return
|
|
1238
|
+
n && (r ?? s.ownerDocument) != null && yt(r ?? s.ownerDocument);
|
|
1239
|
+
const i = lt(s), o = _e(s) ? void 0 : s, a = v.of(i, o);
|
|
1240
|
+
return ze(t, a);
|
|
1191
1241
|
}
|
|
1192
|
-
const
|
|
1242
|
+
const Wt = (t, e) => (r) => {
|
|
1193
1243
|
const n = r.document.querySelector(t);
|
|
1194
1244
|
if (n === null)
|
|
1195
1245
|
throw new Error(`Cannot find element by selector for portal: ${t}`);
|
|
1196
|
-
return
|
|
1246
|
+
return ze(
|
|
1197
1247
|
f(e),
|
|
1198
1248
|
r.withElement(n).withFirstLevel()
|
|
1199
1249
|
);
|
|
1200
|
-
},
|
|
1201
|
-
}),
|
|
1250
|
+
}, $r = (t) => Wt("head title", P.innerText(t)), Ft = (t) => (e) => t(e.element) ?? (() => {
|
|
1251
|
+
}), G = (t, e, r) => Ot(
|
|
1202
1252
|
t.map((n) => n ? !0 : null),
|
|
1203
1253
|
() => e,
|
|
1204
1254
|
r != null ? () => r : void 0
|
|
1205
|
-
),
|
|
1255
|
+
), Cr = (t, e, r) => G(
|
|
1206
1256
|
t.map((n) => !n),
|
|
1207
1257
|
e,
|
|
1208
1258
|
r
|
|
1209
|
-
),
|
|
1259
|
+
), Vt = {
|
|
1210
1260
|
partial: {
|
|
1211
1261
|
root: null,
|
|
1212
1262
|
rootMargin: "0px",
|
|
@@ -1217,36 +1267,36 @@ const $t = (t, e) => (r) => {
|
|
|
1217
1267
|
rootMargin: "0px",
|
|
1218
1268
|
threshold: 1
|
|
1219
1269
|
}
|
|
1220
|
-
},
|
|
1270
|
+
}, z = {
|
|
1221
1271
|
partial: /* @__PURE__ */ new Map(),
|
|
1222
1272
|
full: /* @__PURE__ */ new Map()
|
|
1223
1273
|
}, N = {
|
|
1224
1274
|
partial: null,
|
|
1225
1275
|
full: null
|
|
1226
1276
|
};
|
|
1227
|
-
function
|
|
1277
|
+
function zt(t) {
|
|
1228
1278
|
return N[t] == null && (N[t] = new IntersectionObserver((e) => {
|
|
1229
1279
|
e.forEach((r) => {
|
|
1230
|
-
const n =
|
|
1280
|
+
const n = z[t].get(r.target);
|
|
1231
1281
|
n == null || n.set(r.isIntersecting);
|
|
1232
1282
|
});
|
|
1233
|
-
},
|
|
1283
|
+
}, Vt[t])), N[t];
|
|
1234
1284
|
}
|
|
1235
|
-
function
|
|
1236
|
-
const r =
|
|
1285
|
+
function qt(t, e) {
|
|
1286
|
+
const r = A(D.isSSR());
|
|
1237
1287
|
return g(
|
|
1238
|
-
|
|
1239
|
-
const s = typeof IntersectionObserver < "u" ?
|
|
1240
|
-
return
|
|
1288
|
+
Ft((n) => {
|
|
1289
|
+
const s = typeof IntersectionObserver < "u" ? zt(t) : null;
|
|
1290
|
+
return z[t].set(n, r), s == null || s.observe(n), () => {
|
|
1241
1291
|
var i;
|
|
1242
|
-
s == null || s.unobserve(n),
|
|
1292
|
+
s == null || s.unobserve(n), z[t].delete(n), z[t].size === 0 && ((i = N[t]) == null || i.disconnect(), N[t] = null);
|
|
1243
1293
|
};
|
|
1244
1294
|
}),
|
|
1245
|
-
|
|
1295
|
+
M(r.dispose),
|
|
1246
1296
|
f(e(r))
|
|
1247
1297
|
);
|
|
1248
1298
|
}
|
|
1249
|
-
const
|
|
1299
|
+
const Nr = (t, e, r) => qt(t, (n) => G(n, e, r ?? w)), Mr = (t, e) => (r) => {
|
|
1250
1300
|
r = r.makeRef();
|
|
1251
1301
|
const n = t.map((o) => f(e(o)));
|
|
1252
1302
|
let s = () => {
|
|
@@ -1258,23 +1308,23 @@ const Er = (t, e, r) => Rt(t, (n) => B(n, e, r ?? b)), _r = (t, e) => (r) => {
|
|
|
1258
1308
|
i(), s(o);
|
|
1259
1309
|
};
|
|
1260
1310
|
};
|
|
1261
|
-
function
|
|
1262
|
-
return
|
|
1311
|
+
function Lr(t, e, r = w) {
|
|
1312
|
+
return G(
|
|
1263
1313
|
t.map((n) => n.length > 0),
|
|
1264
1314
|
e,
|
|
1265
1315
|
r
|
|
1266
1316
|
);
|
|
1267
1317
|
}
|
|
1268
|
-
const
|
|
1269
|
-
const r = e.element, n =
|
|
1318
|
+
const Zt = (t) => (e) => {
|
|
1319
|
+
const r = e.element, n = A({ width: r.clientWidth, height: r.clientHeight }), s = f(t(n))(e), i = () => {
|
|
1270
1320
|
n.set({ width: r.clientWidth, height: r.clientHeight });
|
|
1271
1321
|
};
|
|
1272
1322
|
let o;
|
|
1273
|
-
return typeof ResizeObserver == "function" && (o = new ResizeObserver(i), o.observe(r)), (
|
|
1274
|
-
o == null || o.disconnect(), s(
|
|
1323
|
+
return typeof ResizeObserver == "function" && (o = new ResizeObserver(i), o.observe(r)), (a) => {
|
|
1324
|
+
o == null || o.disconnect(), s(a);
|
|
1275
1325
|
};
|
|
1276
|
-
},
|
|
1277
|
-
const r =
|
|
1326
|
+
}, Xt = (t) => (e) => {
|
|
1327
|
+
const r = A({
|
|
1278
1328
|
width: (window == null ? void 0 : window.innerWidth) ?? 0,
|
|
1279
1329
|
height: (window == null ? void 0 : window.innerHeight) ?? 0
|
|
1280
1330
|
}), n = f(t(r))(e), s = () => {
|
|
@@ -1286,132 +1336,133 @@ const xt = (t) => (e) => {
|
|
|
1286
1336
|
return window == null || window.addEventListener("resize", s), (i) => {
|
|
1287
1337
|
window == null || window.removeEventListener("resize", s), n(i);
|
|
1288
1338
|
};
|
|
1289
|
-
},
|
|
1290
|
-
element:
|
|
1291
|
-
window:
|
|
1292
|
-
},
|
|
1339
|
+
}, Rr = {
|
|
1340
|
+
element: Zt,
|
|
1341
|
+
window: Xt
|
|
1342
|
+
}, Yt = (t, e) => (r) => {
|
|
1293
1343
|
const n = r.element, s = n.style.getPropertyValue(t);
|
|
1294
1344
|
return n.style.setProperty(t, e), (i) => {
|
|
1295
1345
|
i && n.style.setProperty(t, s);
|
|
1296
1346
|
};
|
|
1297
|
-
},
|
|
1347
|
+
}, jt = (t, e) => (r) => {
|
|
1298
1348
|
const n = r.element, s = n.style.getPropertyValue(t);
|
|
1299
1349
|
return e.on((i) => n.style.setProperty(t, i)), (i) => {
|
|
1300
1350
|
i && n.style.setProperty(t, s);
|
|
1301
1351
|
};
|
|
1302
|
-
},
|
|
1352
|
+
}, Ir = new Proxy(
|
|
1303
1353
|
{},
|
|
1304
1354
|
{
|
|
1305
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
1355
|
+
get: (t, e) => (r) => h.is(r) ? jt(e, r) : Yt(e, r)
|
|
1306
1356
|
}
|
|
1307
1357
|
);
|
|
1308
1358
|
export {
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1359
|
+
br as Async,
|
|
1360
|
+
vr as AutoFocus,
|
|
1361
|
+
Ar as AutoSelect,
|
|
1362
|
+
T as Computed,
|
|
1363
|
+
_r as Conjunction,
|
|
1364
|
+
Er as Ctx,
|
|
1365
|
+
v as DOMContext,
|
|
1366
|
+
Pr as DOMEl,
|
|
1317
1367
|
Te as El,
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1368
|
+
De as ElNS,
|
|
1369
|
+
w as Empty,
|
|
1370
|
+
Ot as Ensure,
|
|
1371
|
+
xt as ForEach,
|
|
1322
1372
|
g as Fragment,
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1373
|
+
$r as HTMLTitle,
|
|
1374
|
+
Tr as HiddenWhenEmpty,
|
|
1375
|
+
qt as InViewport,
|
|
1376
|
+
Mr as MapSignal,
|
|
1327
1377
|
de as MemoryStore,
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1378
|
+
Lr as NotEmpty,
|
|
1379
|
+
Ct as OnChecked,
|
|
1380
|
+
M as OnDispose,
|
|
1381
|
+
Ft as OnMount,
|
|
1382
|
+
Wt as Portal,
|
|
1333
1383
|
ke as Position,
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1384
|
+
q as Prop,
|
|
1385
|
+
gr as Provide,
|
|
1386
|
+
Ve as Repeat,
|
|
1337
1387
|
h as Signal,
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1388
|
+
We as Task,
|
|
1389
|
+
sr as Text,
|
|
1390
|
+
Cr as Unless,
|
|
1391
|
+
pr as Use,
|
|
1392
|
+
Tt as UseProvider,
|
|
1393
|
+
mr as UseProviders,
|
|
1394
|
+
G as When,
|
|
1395
|
+
Nr as WhenInViewport,
|
|
1396
|
+
$t as WithProvider,
|
|
1397
|
+
wr as WithProviders,
|
|
1398
|
+
Me as addNodeTracker,
|
|
1399
|
+
Ge as animate,
|
|
1400
|
+
Gt as animateOne,
|
|
1401
|
+
Sr as appearance,
|
|
1402
|
+
ue as appearanceMarker,
|
|
1403
|
+
rr as applyAnimatable,
|
|
1404
|
+
W as applyAnimatableProp,
|
|
1405
|
+
tr as applyInterpolatedAnimatable,
|
|
1406
|
+
nt as applyInterpolatedAnimatableProp,
|
|
1407
|
+
or as aria,
|
|
1358
1408
|
P as attr,
|
|
1359
|
-
|
|
1360
|
-
f as
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1409
|
+
yr as bind,
|
|
1410
|
+
f as childToRenderable,
|
|
1411
|
+
yt as clearSSR,
|
|
1412
|
+
Qe as colorChannelsToString,
|
|
1413
|
+
U as computed,
|
|
1414
|
+
Jt as computedRecord,
|
|
1415
|
+
ir as dataAttr,
|
|
1416
|
+
He as dateInterpolate,
|
|
1417
|
+
Kt as effect,
|
|
1367
1418
|
X as emit,
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1419
|
+
Ke as endInterpolate,
|
|
1420
|
+
er as getComputedAnimatable,
|
|
1421
|
+
tt as getComputedAnimatableProp,
|
|
1422
|
+
lt as getSelfOrParentElement,
|
|
1423
|
+
Ue as guessInterpolate,
|
|
1424
|
+
nr as handleAnchorClick,
|
|
1425
|
+
lr as html,
|
|
1426
|
+
cr as input,
|
|
1427
|
+
et as interpolateColor,
|
|
1428
|
+
Qt as interpolateShadow,
|
|
1429
|
+
_e as isElement,
|
|
1430
|
+
ye as makeGetter,
|
|
1431
|
+
Dt as makeProviderMark,
|
|
1432
|
+
Ae as makeSetter,
|
|
1433
|
+
hr as math,
|
|
1434
|
+
ar as mathAttr,
|
|
1384
1435
|
Ce as maybeAddAttributeTracker,
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1436
|
+
Ne as maybeAddClassTracker,
|
|
1437
|
+
Le as maybeAddTextTracker,
|
|
1438
|
+
Ye as numberInterpolate,
|
|
1388
1439
|
Z as on,
|
|
1389
1440
|
L as oneof,
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1441
|
+
ie as parseColorChannels,
|
|
1442
|
+
A as prop,
|
|
1443
|
+
kt as propOfLocalStorage,
|
|
1444
|
+
Bt as propOfSessionStorage,
|
|
1445
|
+
pe as propOfStorage,
|
|
1446
|
+
gt as removeAttributeTrackers,
|
|
1447
|
+
St as removeClassTrackers,
|
|
1448
|
+
S as removeDOMNode,
|
|
1449
|
+
bt as removeNodeTrackers,
|
|
1450
|
+
At as removeTextTrackers,
|
|
1451
|
+
Dr as render,
|
|
1452
|
+
ze as renderWithContext,
|
|
1453
|
+
at as setAttribute,
|
|
1454
|
+
st as setBooleanProperty,
|
|
1455
|
+
ot as setDateProperty,
|
|
1456
|
+
it as setNumberProperty,
|
|
1457
|
+
ut as setStringProperty,
|
|
1458
|
+
Ut as signal,
|
|
1459
|
+
Pe as signalText,
|
|
1460
|
+
Rr as size,
|
|
1461
|
+
D as ssr,
|
|
1462
|
+
dr as startSSR,
|
|
1412
1463
|
Ee as staticText,
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1464
|
+
je as stringInterpolate,
|
|
1465
|
+
Ir as style,
|
|
1466
|
+
fr as svg,
|
|
1467
|
+
ur as svgAttr
|
|
1417
1468
|
};
|