@tempots/dom 20.0.0 → 20.1.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 +523 -477
- package/package.json +1 -1
- package/renderable/ensure.d.ts +3 -3
- package/renderable/foreach.d.ts +3 -3
- package/renderable/map-signal.d.ts +3 -4
- package/renderable/not-empty.d.ts +3 -4
- package/renderable/oneof.d.ts +9 -9
- package/renderable/repeat.d.ts +2 -2
- package/renderable/when.d.ts +3 -4
- package/std/position.d.ts +4 -4
- package/std/signal.d.ts +21 -3
- package/types/domain.d.ts +7 -0
package/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
const
|
|
5
|
-
const
|
|
1
|
+
var Te = Object.defineProperty;
|
|
2
|
+
var Ce = (t, e, r) => e in t ? Te(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var u = (t, e, r) => Ce(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
const Le = (t, e, r) => t + (e - t) * r;
|
|
5
|
+
const Oe = (t, e, r) => {
|
|
6
6
|
const s = Math.max(t.length, e.length);
|
|
7
7
|
let n = "";
|
|
8
8
|
for (let o = 0; o < s; o++) {
|
|
9
9
|
let i = t.charCodeAt(o);
|
|
10
10
|
isNaN(i) && (i = 97);
|
|
11
|
-
let
|
|
12
|
-
isNaN(
|
|
11
|
+
let l = e.charCodeAt(o);
|
|
12
|
+
isNaN(l) && (l = 97), n += String.fromCharCode(i + (l - i) * r);
|
|
13
13
|
}
|
|
14
14
|
return n;
|
|
15
|
-
},
|
|
16
|
-
class
|
|
15
|
+
}, ke = (t, e, r) => new Date(t.getTime() + (e.getTime() - t.getTime()) * r), Ne = (t, e) => e, Re = (t) => typeof t == "number" ? Le : typeof t == "string" ? Oe : t instanceof Date ? ke : Ne;
|
|
16
|
+
class R {
|
|
17
17
|
/**
|
|
18
18
|
* Creates a new instance of `ElementPosition`.
|
|
19
19
|
* @param index - The index of the element.
|
|
@@ -43,18 +43,18 @@ class ke {
|
|
|
43
43
|
return this.index === this.total - 1;
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
|
-
* Checks if the
|
|
47
|
-
* @returns `true` if the
|
|
46
|
+
* Checks if the counter of the element is even.
|
|
47
|
+
* @returns `true` if the counter is even, `false` otherwise.
|
|
48
48
|
*/
|
|
49
49
|
get isEven() {
|
|
50
|
-
return this.index % 2 ===
|
|
50
|
+
return this.index % 2 === 1;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
* Checks if the
|
|
54
|
-
* @returns `true` if the
|
|
53
|
+
* Checks if the counter of the element is odd.
|
|
54
|
+
* @returns `true` if the counter is odd, `false` otherwise.
|
|
55
55
|
*/
|
|
56
56
|
get isOdd() {
|
|
57
|
-
return this.index % 2 ===
|
|
57
|
+
return this.index % 2 === 0;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
const p = class p {
|
|
@@ -69,33 +69,33 @@ const p = class p {
|
|
|
69
69
|
/**
|
|
70
70
|
* @internal
|
|
71
71
|
*/
|
|
72
|
-
|
|
72
|
+
u(this, "$__signal__", !0);
|
|
73
73
|
/**
|
|
74
74
|
* @internal
|
|
75
75
|
*/
|
|
76
|
-
|
|
76
|
+
u(this, "_value");
|
|
77
77
|
/**
|
|
78
78
|
* @internal
|
|
79
79
|
*/
|
|
80
|
-
|
|
80
|
+
u(this, "_derivatives", []);
|
|
81
81
|
/**
|
|
82
82
|
* @internal
|
|
83
83
|
*/
|
|
84
|
-
|
|
84
|
+
u(this, "_onValueListeners", []);
|
|
85
85
|
/**
|
|
86
86
|
* @internal
|
|
87
87
|
*/
|
|
88
|
-
|
|
88
|
+
u(this, "_onDisposeListeners", []);
|
|
89
89
|
/**
|
|
90
90
|
* Gets the current value of the signal.
|
|
91
91
|
* @returns The current value of the signal.
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
u(this, "get", () => this._value);
|
|
94
94
|
/**
|
|
95
95
|
* Checks if the signal has any registered listeners.
|
|
96
96
|
* @returns `true` if the signal has listeners, `false` otherwise.
|
|
97
97
|
*/
|
|
98
|
-
|
|
98
|
+
u(this, "hasListeners", () => this._onValueListeners.length > 0);
|
|
99
99
|
/**
|
|
100
100
|
* Registers a listener function to be called whenever the value of the signal changes.
|
|
101
101
|
* The listener function will be immediately called with the current value of the signal.
|
|
@@ -103,37 +103,37 @@ const p = class p {
|
|
|
103
103
|
*
|
|
104
104
|
* @param listener - The listener function to be called when the value of the signal changes.
|
|
105
105
|
*/
|
|
106
|
-
|
|
106
|
+
u(this, "on", (e) => (e(this.get()), this._onValueListeners.push(e), () => {
|
|
107
107
|
this._onValueListeners.splice(this._onValueListeners.indexOf(e), 1);
|
|
108
108
|
}));
|
|
109
109
|
/**
|
|
110
110
|
* @internal
|
|
111
111
|
*/
|
|
112
|
-
|
|
112
|
+
u(this, "_setAndNotify", (e, r) => {
|
|
113
113
|
const s = this.equals(this._value, e);
|
|
114
114
|
s || (this._value = e), (r || !s) && this._onValueListeners.forEach((n) => n(e));
|
|
115
115
|
});
|
|
116
116
|
/**
|
|
117
117
|
* @internal
|
|
118
118
|
*/
|
|
119
|
-
|
|
119
|
+
u(this, "_disposed", !1);
|
|
120
120
|
/**
|
|
121
121
|
* Checks whether the signal is disposed.
|
|
122
122
|
* @returns True if the signal is disposed, false otherwise.
|
|
123
123
|
*/
|
|
124
|
-
|
|
124
|
+
u(this, "isDisposed", () => this._disposed);
|
|
125
125
|
/**
|
|
126
126
|
* Adds a listener function to be called when the object is disposed.
|
|
127
127
|
* @param listener - The listener function to be called when the object is disposed.
|
|
128
128
|
* @returns A function that can be called to remove the listener.
|
|
129
129
|
*/
|
|
130
|
-
|
|
130
|
+
u(this, "onDispose", (e) => {
|
|
131
131
|
this._onDisposeListeners.push(e);
|
|
132
132
|
});
|
|
133
133
|
/**
|
|
134
134
|
* Disposes the signal, releasing any resources associated with it.
|
|
135
135
|
*/
|
|
136
|
-
|
|
136
|
+
u(this, "dispose", () => {
|
|
137
137
|
this._disposed || (this._disposed = !0, this._onDisposeListeners.forEach((e) => e()), this._onDisposeListeners.length = 0, this._derivatives.length = 0);
|
|
138
138
|
});
|
|
139
139
|
/**
|
|
@@ -145,7 +145,7 @@ const p = class p {
|
|
|
145
145
|
* @param equals - Optional equality function to determine if two mapped values are equal.
|
|
146
146
|
* @returns - A new Computed instance with the mapped value.
|
|
147
147
|
*/
|
|
148
|
-
|
|
148
|
+
u(this, "map", (e, r = (s, n) => s === n) => {
|
|
149
149
|
const s = new E(() => {
|
|
150
150
|
try {
|
|
151
151
|
return e(this.get());
|
|
@@ -165,7 +165,7 @@ const p = class p {
|
|
|
165
165
|
* Defaults to a strict equality check (===).
|
|
166
166
|
* @returns A new Signal that emits the values of the resulting Signal.
|
|
167
167
|
*/
|
|
168
|
-
|
|
168
|
+
u(this, "flatMap", (e, r = (s, n) => s === n) => {
|
|
169
169
|
const s = new E(() => {
|
|
170
170
|
try {
|
|
171
171
|
return e(this.get()).get();
|
|
@@ -181,19 +181,19 @@ const p = class p {
|
|
|
181
181
|
* @param fn - The callback function to be invoked with the current value of the signal.
|
|
182
182
|
* @returns A new signal that emits the same value as the original signal and invokes the callback function.
|
|
183
183
|
*/
|
|
184
|
-
|
|
184
|
+
u(this, "tap", (e) => this.map((r) => (e(r), r)));
|
|
185
185
|
/**
|
|
186
186
|
* Returns a new Signal that emits the value at the specified key of the current value.
|
|
187
187
|
*
|
|
188
188
|
* @param key - The key of the value to retrieve.
|
|
189
189
|
* @returns A new Signal that emits the value at the specified key.
|
|
190
190
|
*/
|
|
191
|
-
|
|
191
|
+
u(this, "at", (e) => this.map((r) => r[e]));
|
|
192
192
|
/**
|
|
193
193
|
* @internal
|
|
194
194
|
*/
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
u(this, "_$");
|
|
196
|
+
u(this, "filter", (e, r) => {
|
|
197
197
|
let s = r ?? this.get();
|
|
198
198
|
const n = new E(() => {
|
|
199
199
|
try {
|
|
@@ -215,12 +215,12 @@ const p = class p {
|
|
|
215
215
|
* @param equals - Optional equality function to determine if two values are equal.
|
|
216
216
|
* @returns - A new Computed object with the mapped and filtered values.
|
|
217
217
|
*/
|
|
218
|
-
|
|
218
|
+
u(this, "filterMap", (e, r, s = (n, o) => n === o) => {
|
|
219
219
|
let n = r;
|
|
220
220
|
const o = new E(() => {
|
|
221
221
|
try {
|
|
222
|
-
const i = this.get(),
|
|
223
|
-
return n =
|
|
222
|
+
const i = this.get(), l = e(i);
|
|
223
|
+
return n = l ?? n;
|
|
224
224
|
} catch (i) {
|
|
225
225
|
throw console.error("Error in Signal.filterMap:", i), i;
|
|
226
226
|
}
|
|
@@ -240,18 +240,18 @@ const p = class p {
|
|
|
240
240
|
* @param equals - The equality function to compare the mapped values for equality.
|
|
241
241
|
* @returns A property that holds the mapped value and can be observed for changes.
|
|
242
242
|
*/
|
|
243
|
-
|
|
244
|
-
const o =
|
|
245
|
-
let i = 0,
|
|
243
|
+
u(this, "mapAsync", (e, r, s, n = (o, i) => o === i) => {
|
|
244
|
+
const o = C(r, n);
|
|
245
|
+
let i = 0, l = new AbortController();
|
|
246
246
|
return o.onDispose(
|
|
247
|
-
this.on(async (
|
|
248
|
-
const
|
|
249
|
-
|
|
247
|
+
this.on(async (a) => {
|
|
248
|
+
const c = ++i;
|
|
249
|
+
l.abort(), l = new AbortController();
|
|
250
250
|
try {
|
|
251
|
-
const d = await e(
|
|
252
|
-
|
|
251
|
+
const d = await e(a, { abortSignal: l.signal });
|
|
252
|
+
c === i && o.set(d);
|
|
253
253
|
} catch (d) {
|
|
254
|
-
if (
|
|
254
|
+
if (c === i)
|
|
255
255
|
if (s != null)
|
|
256
256
|
o.set(s(d));
|
|
257
257
|
else
|
|
@@ -270,14 +270,14 @@ const p = class p {
|
|
|
270
270
|
* @param alt - The alternative value to use when the mapped value is `undefined` or `null`.
|
|
271
271
|
* @returns A new signal containing the mapped values.
|
|
272
272
|
*/
|
|
273
|
-
|
|
273
|
+
u(this, "mapMaybe", (e, r) => this.map((s) => e(s) ?? r));
|
|
274
274
|
/**
|
|
275
275
|
* Feeds a property into the signal and sets up disposal behavior.
|
|
276
276
|
* @param prop - The property to feed into the signal.
|
|
277
277
|
* @param autoDisposeProp - Determines whether the property should be automatically disposed when the signal is disposed.
|
|
278
278
|
* @returns The input property.
|
|
279
279
|
*/
|
|
280
|
-
|
|
280
|
+
u(this, "feedProp", (e, r = !1) => {
|
|
281
281
|
const s = this.on(e.set);
|
|
282
282
|
return e.onDispose(s), r ? this.onDispose(e.dispose) : this.onDispose(s), e;
|
|
283
283
|
});
|
|
@@ -286,12 +286,12 @@ const p = class p {
|
|
|
286
286
|
* @param autoDisposeProp - Determines whether the derived property should be automatically disposed.
|
|
287
287
|
* @returns The derived property.
|
|
288
288
|
*/
|
|
289
|
-
|
|
289
|
+
u(this, "deriveProp", (e = !0) => this.feedProp(C(this.get()), e));
|
|
290
290
|
/**
|
|
291
291
|
* Returns a signal that emits the count of values received so far.
|
|
292
292
|
* @returns A signal that emits the count of values received so far.
|
|
293
293
|
*/
|
|
294
|
-
|
|
294
|
+
u(this, "count", () => {
|
|
295
295
|
let e = 0;
|
|
296
296
|
return this.map(() => ++e);
|
|
297
297
|
});
|
|
@@ -301,7 +301,7 @@ const p = class p {
|
|
|
301
301
|
* Additionally, when the computed value is disposed, it sets the signal as dirty.
|
|
302
302
|
* @param computed - The computed value to add as a derivative.
|
|
303
303
|
*/
|
|
304
|
-
|
|
304
|
+
u(this, "setDerivative", (e) => {
|
|
305
305
|
this._derivatives.push(e), e.onDispose(() => {
|
|
306
306
|
this._derivatives.splice(
|
|
307
307
|
this._derivatives.indexOf(e),
|
|
@@ -338,7 +338,7 @@ const p = class p {
|
|
|
338
338
|
* @param equals - A function to compare two values of type O for equality. Defaults to strict equality (===).
|
|
339
339
|
* @returns - A Signal that represents the result of the Promise.
|
|
340
340
|
*/
|
|
341
|
-
|
|
341
|
+
u(p, "ofPromise", (e, r, s, n = (o, i) => o === i) => {
|
|
342
342
|
const o = new p(r, n);
|
|
343
343
|
return e.then((i) => o._setAndNotify(i, !1)).catch((i) => {
|
|
344
344
|
s != null ? o._setAndNotify(s(i), !1) : console.error(
|
|
@@ -352,7 +352,7 @@ l(p, "ofPromise", (e, r, s, n = (o, i) => o === i) => {
|
|
|
352
352
|
* @param value - The value to check.
|
|
353
353
|
* @returns `true` if the value is a Signal, `false` otherwise.
|
|
354
354
|
*/
|
|
355
|
-
|
|
355
|
+
u(p, "is", (e) => (
|
|
356
356
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
357
357
|
e != null && e.$__signal__ === !0
|
|
358
358
|
)), /**
|
|
@@ -365,19 +365,19 @@ l(p, "is", (e) => (
|
|
|
365
365
|
* @param equals - A function that determines if two values are equal. Defaults to strict equality (===).
|
|
366
366
|
* @returns A Signal instance.
|
|
367
367
|
*/
|
|
368
|
-
|
|
368
|
+
u(p, "wrap", (e, r = (s, n) => s === n) => p.is(e) ? e : new p(e, r)), /**
|
|
369
369
|
* Wraps a value in a `Signal` if it is not already a `Signal`.
|
|
370
370
|
* If the value is `null` or `undefined`, it returns `null` or `undefined` respectively.
|
|
371
371
|
* @param value - The value to wrap or check.
|
|
372
372
|
* @returns The wrapped value if it is not `null` or `undefined`, otherwise `null` or `undefined`.
|
|
373
373
|
*/
|
|
374
|
-
|
|
374
|
+
u(p, "maybeWrap", (e) => e == null ? e : p.wrap(e)), /**
|
|
375
375
|
* Unwraps a value from a `Signal` if it is a `Signal`, otherwise returns the value as is.
|
|
376
376
|
*
|
|
377
377
|
* @param value - The value to unwrap.
|
|
378
378
|
* @returns The unwrapped value.
|
|
379
379
|
*/
|
|
380
|
-
|
|
380
|
+
u(p, "unwrap", (e) => p.is(e) ? e.get() : e), /**
|
|
381
381
|
* Maps the value of a `Signal` or a regular value using the provided mapping function.
|
|
382
382
|
* If the input value is a `Signal`, the mapping function is applied to its value.
|
|
383
383
|
* If the input value is not a `Signal`, the mapping function is directly applied to the value.
|
|
@@ -390,9 +390,9 @@ l(p, "unwrap", (e) => p.is(e) ? e.get() : e), /**
|
|
|
390
390
|
* @typeParam N - The type of the input value.
|
|
391
391
|
* @typeParam O - The type of the mapped value.
|
|
392
392
|
*/
|
|
393
|
-
|
|
393
|
+
u(p, "map", (e, r) => p.is(e) ? e.map(r) : r(e));
|
|
394
394
|
let h = p;
|
|
395
|
-
const
|
|
395
|
+
const Me = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
|
|
396
396
|
class E extends h {
|
|
397
397
|
/**
|
|
398
398
|
* Represents a Signal object.
|
|
@@ -404,36 +404,36 @@ class E extends h {
|
|
|
404
404
|
/**
|
|
405
405
|
* @internal
|
|
406
406
|
*/
|
|
407
|
-
|
|
407
|
+
u(this, "$__computed__", !0);
|
|
408
408
|
/**
|
|
409
409
|
* @internal
|
|
410
410
|
*/
|
|
411
|
-
|
|
411
|
+
u(this, "_isDirty", !1);
|
|
412
412
|
/**
|
|
413
413
|
* Marks the signal as dirty, indicating that its value has changed and needs to be recalculated.
|
|
414
414
|
* If the signal is already dirty or disposed, this method does nothing.
|
|
415
415
|
* It also marks all dependent signals as dirty and schedules a notification to update their values.
|
|
416
416
|
*/
|
|
417
|
-
|
|
417
|
+
u(this, "setDirty", () => {
|
|
418
418
|
this._isDirty || this._disposed || (this._isDirty = !0, this._derivatives.forEach((r) => r.setDirty()), this._scheduleNotify());
|
|
419
419
|
});
|
|
420
420
|
/**
|
|
421
421
|
* @internal
|
|
422
422
|
*/
|
|
423
|
-
|
|
423
|
+
u(this, "_scheduleCount", 0);
|
|
424
424
|
/**
|
|
425
425
|
* Schedules a notification to be executed asynchronously.
|
|
426
426
|
* If the signal is dirty, it will be updated and notified.
|
|
427
427
|
* @internal
|
|
428
428
|
*/
|
|
429
|
-
|
|
429
|
+
u(this, "_scheduleNotify", () => {
|
|
430
430
|
const r = ++this._scheduleCount;
|
|
431
|
-
|
|
431
|
+
Me(() => {
|
|
432
432
|
this._scheduleCount !== r || this._disposed !== !1 || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn(), !1));
|
|
433
433
|
});
|
|
434
434
|
});
|
|
435
435
|
/** {@inheritDoc Signal.get} */
|
|
436
|
-
|
|
436
|
+
u(this, "get", () => (this._isDirty && (this._isDirty = !1, this._value = this._fn(), this._setAndNotify(this._value, !0)), this._value));
|
|
437
437
|
this._fn = r, this.setDirty();
|
|
438
438
|
}
|
|
439
439
|
/**
|
|
@@ -450,26 +450,26 @@ class E extends h {
|
|
|
450
450
|
return this.get();
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
-
const
|
|
453
|
+
const V = class V extends h {
|
|
454
454
|
constructor() {
|
|
455
455
|
super(...arguments);
|
|
456
456
|
/**
|
|
457
457
|
* @internal
|
|
458
458
|
*/
|
|
459
|
-
|
|
459
|
+
u(this, "$__prop__", !0);
|
|
460
460
|
/**
|
|
461
461
|
* Changes the value of the property and notifies its listeners.
|
|
462
462
|
*
|
|
463
463
|
* @param value - The new value of the property.
|
|
464
464
|
*/
|
|
465
|
-
|
|
465
|
+
u(this, "set", (r) => {
|
|
466
466
|
this._setAndNotify(r, !1);
|
|
467
467
|
});
|
|
468
468
|
/**
|
|
469
469
|
* Updates the value of the signal by applying the provided function to the current value.
|
|
470
470
|
* @param fn - The function to apply to the current value.
|
|
471
471
|
*/
|
|
472
|
-
|
|
472
|
+
u(this, "update", (r) => {
|
|
473
473
|
this._setAndNotify(r(this.get()), !1);
|
|
474
474
|
});
|
|
475
475
|
/**
|
|
@@ -478,13 +478,13 @@ const F = class F extends h {
|
|
|
478
478
|
* @param effects - An array of effects to be executed after the state is updated.
|
|
479
479
|
* @returns A dispatch function that can be used to update the state and trigger the effects.
|
|
480
480
|
*/
|
|
481
|
-
|
|
481
|
+
u(this, "reducer", (r, ...s) => {
|
|
482
482
|
const n = this;
|
|
483
483
|
return function o(i) {
|
|
484
|
-
const
|
|
485
|
-
n.update((
|
|
486
|
-
(
|
|
487
|
-
previousState:
|
|
484
|
+
const l = n.value;
|
|
485
|
+
n.update((a) => r(a, i)), !n.equals(l, n.value) && s.forEach(
|
|
486
|
+
(a) => a({
|
|
487
|
+
previousState: l,
|
|
488
488
|
state: n.value,
|
|
489
489
|
action: i,
|
|
490
490
|
dispatch: o
|
|
@@ -503,8 +503,8 @@ const F = class F extends h {
|
|
|
503
503
|
* Defaults to a strict equality check (===).
|
|
504
504
|
* @returns A Prop object representing the isomorphism.
|
|
505
505
|
*/
|
|
506
|
-
|
|
507
|
-
const o = new
|
|
506
|
+
u(this, "iso", (r, s, n = (o, i) => o === i) => {
|
|
507
|
+
const o = new V(r(this.get()), n);
|
|
508
508
|
return o.onDispose(this.on((i) => o.set(r(i)))), o.on((i) => this._setAndNotify(s(i), !1)), o;
|
|
509
509
|
});
|
|
510
510
|
/**
|
|
@@ -513,7 +513,7 @@ const F = class F extends h {
|
|
|
513
513
|
* @param key - The key of the value to access.
|
|
514
514
|
* @returns A `Prop` that represents the value at the specified key.
|
|
515
515
|
*/
|
|
516
|
-
|
|
516
|
+
u(this, "atProp", (r) => this.iso(
|
|
517
517
|
(s) => s[r],
|
|
518
518
|
(s) => ({ ...this.value, [r]: s })
|
|
519
519
|
));
|
|
@@ -533,98 +533,111 @@ const F = class F extends h {
|
|
|
533
533
|
* @param value - The value to check.
|
|
534
534
|
* @returns `true` if the value is a Prop, `false` otherwise.
|
|
535
535
|
*/
|
|
536
|
-
|
|
536
|
+
u(V, "is", (r) => (
|
|
537
537
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
538
538
|
r != null && r.$__prop__ === !0
|
|
539
539
|
));
|
|
540
|
-
let
|
|
541
|
-
const
|
|
540
|
+
let F = V;
|
|
541
|
+
const U = (t, e, r = (s, n) => s === n) => {
|
|
542
542
|
const s = new E(t, r);
|
|
543
543
|
return e.forEach((n) => n.setDerivative(s)), s;
|
|
544
|
-
},
|
|
545
|
-
|
|
544
|
+
}, $e = (...t) => (e, r) => {
|
|
545
|
+
const s = t.filter((n) => h.is(n));
|
|
546
|
+
return U(
|
|
547
|
+
() => e(...t.map((n) => h.unwrap(n))),
|
|
548
|
+
s,
|
|
549
|
+
r
|
|
550
|
+
);
|
|
551
|
+
}, Fe = (t, e) => U(t, e).dispose, gt = (...t) => (e) => {
|
|
552
|
+
const r = t.filter((s) => h.is(s));
|
|
553
|
+
Fe(
|
|
554
|
+
() => e(...t.map(h.unwrap)),
|
|
555
|
+
r
|
|
556
|
+
);
|
|
557
|
+
}, C = (t, e = (r, s) => r === s) => new F(t, e), G = (t, e = (r, s) => r === s) => new h(t, e);
|
|
558
|
+
class Z {
|
|
546
559
|
constructor() {
|
|
547
|
-
|
|
560
|
+
u(this, "_store", /* @__PURE__ */ new Map());
|
|
548
561
|
/**
|
|
549
562
|
* Retrieves the value associated with the specified key from the memory store.
|
|
550
563
|
* @param key - The key to retrieve the value for.
|
|
551
564
|
* @returns The value associated with the key, or `null` if the key is not found.
|
|
552
565
|
*/
|
|
553
|
-
|
|
566
|
+
u(this, "getItem", (e) => this._store.get(e) ?? null);
|
|
554
567
|
/**
|
|
555
568
|
* Sets the value associated with the specified key in the memory store.
|
|
556
569
|
* @param key - The key to set the value for.
|
|
557
570
|
* @param value - The value to set.
|
|
558
571
|
*/
|
|
559
|
-
|
|
572
|
+
u(this, "setItem", (e, r) => {
|
|
560
573
|
this._store.set(e, r);
|
|
561
574
|
});
|
|
562
575
|
}
|
|
563
576
|
}
|
|
564
|
-
const
|
|
577
|
+
const K = ({
|
|
565
578
|
key: t,
|
|
566
579
|
defaultValue: e,
|
|
567
580
|
store: r,
|
|
568
581
|
serialize: s = JSON.stringify,
|
|
569
582
|
deserialize: n = JSON.parse,
|
|
570
|
-
equals: o = (
|
|
571
|
-
onLoad: i = (
|
|
583
|
+
equals: o = (l, a) => l === a,
|
|
584
|
+
onLoad: i = (l) => l
|
|
572
585
|
}) => {
|
|
573
|
-
const
|
|
574
|
-
|
|
586
|
+
const l = r.getItem(t), a = new F(
|
|
587
|
+
l != null ? i(n(l)) : typeof e == "function" ? e() : e,
|
|
575
588
|
o
|
|
576
589
|
);
|
|
577
|
-
return
|
|
578
|
-
r.setItem(t, s(
|
|
579
|
-
}),
|
|
580
|
-
},
|
|
590
|
+
return a.on((c) => {
|
|
591
|
+
r.setItem(t, s(c));
|
|
592
|
+
}), a;
|
|
593
|
+
}, _t = (t) => K({
|
|
581
594
|
...t,
|
|
582
|
-
store: (window == null ? void 0 : window.localStorage) ?? new
|
|
583
|
-
}),
|
|
595
|
+
store: (window == null ? void 0 : window.localStorage) ?? new Z()
|
|
596
|
+
}), vt = (t) => K({
|
|
584
597
|
...t,
|
|
585
|
-
store: (window == null ? void 0 : window.sessionStorage) ?? new
|
|
598
|
+
store: (window == null ? void 0 : window.sessionStorage) ?? new Z()
|
|
586
599
|
});
|
|
587
|
-
function
|
|
600
|
+
function Y(t) {
|
|
588
601
|
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(t) : setTimeout(t, 0);
|
|
589
602
|
}
|
|
590
|
-
const
|
|
591
|
-
const n = (s == null ? void 0 : s.duration) ?? 300, o = (s == null ? void 0 : s.easing) ?? ((
|
|
592
|
-
let
|
|
593
|
-
const D = new E(e, i), A =
|
|
603
|
+
const Ve = (t, e, r, s) => {
|
|
604
|
+
const n = (s == null ? void 0 : s.duration) ?? 300, o = (s == null ? void 0 : s.easing) ?? ((y) => y), i = (s == null ? void 0 : s.equals) ?? ((y, N) => y === N);
|
|
605
|
+
let l = s == null ? void 0 : s.interpolate, a = t, c = e(), d = performance.now(), v = null, m = !0;
|
|
606
|
+
const D = new E(e, i), A = C(t, i);
|
|
594
607
|
A.onDispose(() => {
|
|
595
|
-
|
|
596
|
-
}), A.onDispose(D.dispose), r.forEach((
|
|
597
|
-
|
|
608
|
+
v !== null && cancelAnimationFrame(v);
|
|
609
|
+
}), A.onDispose(D.dispose), r.forEach((y) => {
|
|
610
|
+
y.setDerivative(D), y.onDispose(A.dispose);
|
|
598
611
|
});
|
|
599
|
-
const
|
|
600
|
-
|
|
601
|
-
},
|
|
602
|
-
const
|
|
603
|
-
|
|
604
|
-
let
|
|
605
|
-
|
|
612
|
+
const De = (y) => {
|
|
613
|
+
c = y, d = performance.now(), a = A.value, m && (m = !1, v = Y(z));
|
|
614
|
+
}, z = () => {
|
|
615
|
+
const N = (performance.now() - d) / h.unwrap(n), be = o(N);
|
|
616
|
+
l == null && (l = Re(a));
|
|
617
|
+
let Q = l(a, c, be);
|
|
618
|
+
N >= 1 ? (m = !0, Q = c) : v = Y(z), A.set(Q);
|
|
606
619
|
};
|
|
607
|
-
return D.on(
|
|
608
|
-
},
|
|
620
|
+
return D.on(De), A;
|
|
621
|
+
}, yt = (t, e) => {
|
|
609
622
|
const { initialValue: r, ...s } = e ?? {};
|
|
610
|
-
return
|
|
623
|
+
return Ve(
|
|
611
624
|
r ?? t.get(),
|
|
612
625
|
t.get,
|
|
613
626
|
[t],
|
|
614
627
|
s
|
|
615
628
|
);
|
|
616
|
-
},
|
|
629
|
+
}, wt = (t, e) => {
|
|
617
630
|
const { signals: r, literals: s } = Object.entries(t).reduce(
|
|
618
|
-
({ signals: o, literals: i }, [
|
|
631
|
+
({ signals: o, literals: i }, [l, a]) => (h.is(a) ? o.push([l, a]) : i[l] = a, { signals: o, literals: i }),
|
|
619
632
|
{ signals: [], literals: {} }
|
|
620
633
|
), n = r.map(([, o]) => o);
|
|
621
|
-
return
|
|
622
|
-
},
|
|
634
|
+
return U(() => (r.forEach(([o, i]) => s[o] = i.value), e(s)), n);
|
|
635
|
+
}, x = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]), ee = /* @__PURE__ */ new Set([
|
|
623
636
|
"rowSpan",
|
|
624
637
|
"colSpan",
|
|
625
638
|
"tabIndex",
|
|
626
639
|
"valueAsNumber"
|
|
627
|
-
]),
|
|
640
|
+
]), te = /* @__PURE__ */ new Set(["valueAsDate"]), re = /* @__PURE__ */ new Set([
|
|
628
641
|
"value",
|
|
629
642
|
"textContent",
|
|
630
643
|
"innerText",
|
|
@@ -632,25 +645,25 @@ const Me = (t, e, r, s) => {
|
|
|
632
645
|
"outerHTML",
|
|
633
646
|
"className",
|
|
634
647
|
"classList"
|
|
635
|
-
]),
|
|
636
|
-
if (
|
|
637
|
-
return
|
|
648
|
+
]), I = /* @__PURE__ */ new Map(), b = (t, e) => {
|
|
649
|
+
if (I.has(t))
|
|
650
|
+
return I.get(t);
|
|
638
651
|
{
|
|
639
652
|
const r = e(t);
|
|
640
|
-
return
|
|
653
|
+
return I.set(t, r), r;
|
|
641
654
|
}
|
|
642
|
-
},
|
|
655
|
+
}, qe = (t) => (e, r) => {
|
|
643
656
|
r == null ? e[t] = null : e[t] = !!r;
|
|
644
|
-
},
|
|
657
|
+
}, Ie = (t) => (e, r) => {
|
|
645
658
|
r == null ? e[t] = null : e[t] = Number(r);
|
|
646
|
-
},
|
|
659
|
+
}, Be = (t) => (e, r) => {
|
|
647
660
|
r == null ? e[t] = null : e[t] = r;
|
|
648
|
-
},
|
|
661
|
+
}, je = (t) => (e, r) => {
|
|
649
662
|
r == null ? e[t] = null : e[t] = String(r);
|
|
650
|
-
},
|
|
663
|
+
}, Ue = (t) => (e, r) => {
|
|
651
664
|
r == null ? e.removeAttribute(t) : e.setAttribute(t, r);
|
|
652
|
-
},
|
|
653
|
-
class
|
|
665
|
+
}, se = (t) => x.has(t) ? b(t, qe) : ee.has(t) ? b(t, Ie) : te.has(t) ? b(t, Be) : re.has(t) ? b(t, je) : b(t, Ue), ne = (t) => (e) => x.has(t) ? !!e[t] : ee.has(t) ? Number(e[t]) : te.has(t) ? e[t] : re.has(t) ? String(e[t]) : e.getAttribute(t);
|
|
666
|
+
class w {
|
|
654
667
|
/**
|
|
655
668
|
* Constructs a new `DOMContext` instance.
|
|
656
669
|
*
|
|
@@ -668,19 +681,19 @@ class v {
|
|
|
668
681
|
* @param namespace - The namespace URI to create the element in, or `undefined` to create a standard HTML element.
|
|
669
682
|
* @returns The newly created element.
|
|
670
683
|
*/
|
|
671
|
-
|
|
684
|
+
u(this, "createElement", (e, r) => r !== void 0 ? this.document.createElementNS(r, e) : this.document.createElement(e));
|
|
672
685
|
/**
|
|
673
686
|
* Creates a new text node with the specified text content.
|
|
674
687
|
* @param text - The text content for the new text node.
|
|
675
688
|
* @returns A new `Text` node with the specified text content.
|
|
676
689
|
*/
|
|
677
|
-
|
|
690
|
+
u(this, "createText", (e) => this.document.createTextNode(e));
|
|
678
691
|
/**
|
|
679
692
|
* Creates a new `DOMContext` with a reference to a newly created text node.
|
|
680
693
|
* The text node is appended or inserted to the current `DOMContext`.
|
|
681
694
|
* The new `DOMContext` with the reference is returned.
|
|
682
695
|
*/
|
|
683
|
-
|
|
696
|
+
u(this, "makeRef", () => {
|
|
684
697
|
const e = this.createText("");
|
|
685
698
|
return this.appendOrInsert(e), this.withReference(e);
|
|
686
699
|
});
|
|
@@ -689,7 +702,7 @@ class v {
|
|
|
689
702
|
*
|
|
690
703
|
* @param child - The child node to append or insert.
|
|
691
704
|
*/
|
|
692
|
-
|
|
705
|
+
u(this, "appendOrInsert", (e) => {
|
|
693
706
|
this.reference === void 0 ? this.element.appendChild(e) : this.element.insertBefore(e, this.reference);
|
|
694
707
|
});
|
|
695
708
|
/**
|
|
@@ -698,18 +711,18 @@ class v {
|
|
|
698
711
|
* @param document - The `Document` to use for the `DOMContext`.
|
|
699
712
|
* @returns A new `DOMContext` instance.
|
|
700
713
|
*/
|
|
701
|
-
|
|
714
|
+
u(this, "withDocument", (e) => new w(e, this.element, this.reference, this.providers, !0));
|
|
702
715
|
/**
|
|
703
716
|
* Creates a new `DOMContext` instance with the provided `element`.
|
|
704
717
|
* @param element - The DOM element to use in the new `DOMContext` instance.
|
|
705
718
|
* @returns A new `DOMContext` instance with the provided `element`.
|
|
706
719
|
*/
|
|
707
|
-
|
|
720
|
+
u(this, "withElement", (e) => new w(this.document, e, void 0, this.providers, !1));
|
|
708
721
|
/**
|
|
709
722
|
* Creates a new `DOMContext` instance with the `isFirstLevel` property set to `true`.
|
|
710
723
|
* @returns A new `DOMContext` instance with the `isFirstLevel` property set to `true`.
|
|
711
724
|
*/
|
|
712
|
-
|
|
725
|
+
u(this, "withFirstLevel", () => new w(
|
|
713
726
|
this.document,
|
|
714
727
|
this.element,
|
|
715
728
|
this.reference,
|
|
@@ -722,7 +735,7 @@ class v {
|
|
|
722
735
|
* @param reference - The optional `Text` node to use as the reference for the new `DOMContext`.
|
|
723
736
|
* @returns A new `DOMContext` instance with the specified reference.
|
|
724
737
|
*/
|
|
725
|
-
|
|
738
|
+
u(this, "withReference", (e) => new w(
|
|
726
739
|
this.document,
|
|
727
740
|
this.element,
|
|
728
741
|
e,
|
|
@@ -735,7 +748,7 @@ class v {
|
|
|
735
748
|
* @param value - The value to set for the provider.
|
|
736
749
|
* @returns A new DOMContext with the updated providers.
|
|
737
750
|
*/
|
|
738
|
-
|
|
751
|
+
u(this, "withProvider", (e, r) => new w(
|
|
739
752
|
this.document,
|
|
740
753
|
this.element,
|
|
741
754
|
this.reference,
|
|
@@ -752,7 +765,7 @@ class v {
|
|
|
752
765
|
* @param providers - An object containing the providers to be merged into the existing providers.
|
|
753
766
|
* @returns A new DOMContext instance with the merged providers.
|
|
754
767
|
*/
|
|
755
|
-
|
|
768
|
+
u(this, "withProviders", (e) => new w(
|
|
756
769
|
this.document,
|
|
757
770
|
this.element,
|
|
758
771
|
this.reference,
|
|
@@ -769,9 +782,9 @@ class v {
|
|
|
769
782
|
* @returns The provider for the given mark.
|
|
770
783
|
* @throws Throws `ProviderNotFoundError` if the provider for the given mark is not found.
|
|
771
784
|
*/
|
|
772
|
-
|
|
785
|
+
u(this, "getProvider", (e) => {
|
|
773
786
|
if (this.providers[e] === void 0)
|
|
774
|
-
throw new
|
|
787
|
+
throw new Ge(e);
|
|
775
788
|
return this.providers[e];
|
|
776
789
|
});
|
|
777
790
|
this.document = e, this.element = r, this.reference = s, this.providers = n, this.isFirstLevel = o;
|
|
@@ -784,41 +797,41 @@ class v {
|
|
|
784
797
|
* @returns A new `DOMContext` instance.
|
|
785
798
|
*/
|
|
786
799
|
static of(e, r) {
|
|
787
|
-
return new
|
|
800
|
+
return new w(e.ownerDocument, e, r, {}, !0);
|
|
788
801
|
}
|
|
789
802
|
}
|
|
790
|
-
class
|
|
803
|
+
class Ge extends Error {
|
|
791
804
|
constructor(e) {
|
|
792
805
|
super(`Provider not found: ${e.description}`);
|
|
793
806
|
}
|
|
794
807
|
}
|
|
795
|
-
const
|
|
808
|
+
const _ = (t) => {
|
|
796
809
|
const e = t;
|
|
797
810
|
e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.parentElement && t.parentElement.removeChild(t);
|
|
798
|
-
},
|
|
799
|
-
|
|
811
|
+
}, Je = (t) => oe(t) ? t : t.parentElement, oe = (t) => t.nodeType === 1, ie = (t) => (e) => {
|
|
812
|
+
pe(e);
|
|
800
813
|
const r = e.createText(t);
|
|
801
814
|
return e.appendOrInsert(r), (s) => {
|
|
802
|
-
s &&
|
|
815
|
+
s && _(r);
|
|
803
816
|
};
|
|
804
|
-
},
|
|
805
|
-
|
|
817
|
+
}, le = (t) => (e) => {
|
|
818
|
+
pe(e);
|
|
806
819
|
const r = e.createText(t.value);
|
|
807
820
|
e.appendOrInsert(r);
|
|
808
821
|
const s = t.on((n) => r.data = n);
|
|
809
822
|
return (n) => {
|
|
810
|
-
s(), n &&
|
|
823
|
+
s(), n && _(r);
|
|
811
824
|
};
|
|
812
|
-
},
|
|
813
|
-
const r = t.map((s) =>
|
|
825
|
+
}, St = (t) => h.is(t) ? le(t) : ie(t), g = (...t) => (e) => {
|
|
826
|
+
const r = t.map((s) => f(s)(e));
|
|
814
827
|
return (s) => {
|
|
815
828
|
r.forEach((n) => n(s));
|
|
816
829
|
};
|
|
817
|
-
},
|
|
818
|
-
},
|
|
830
|
+
}, S = () => () => {
|
|
831
|
+
}, We = (t) => (e) => (he(e), e.element.classList.add(...t), (r) => {
|
|
819
832
|
r && e.element.classList.remove(...t);
|
|
820
|
-
}),
|
|
821
|
-
|
|
833
|
+
}), He = (t) => (e) => {
|
|
834
|
+
he(e);
|
|
822
835
|
const r = e.element;
|
|
823
836
|
let s = [];
|
|
824
837
|
const n = t.on((o) => {
|
|
@@ -827,22 +840,22 @@ const g = (t) => {
|
|
|
827
840
|
return (o) => {
|
|
828
841
|
n(), o && s.forEach((i) => r.classList.remove(i)), s.length = 0;
|
|
829
842
|
};
|
|
830
|
-
},
|
|
831
|
-
const r =
|
|
843
|
+
}, L = (t, e) => {
|
|
844
|
+
const r = se(t), s = ne(t);
|
|
832
845
|
return (n) => {
|
|
833
|
-
|
|
846
|
+
fe(n, t);
|
|
834
847
|
const o = s(n.element);
|
|
835
848
|
return r(n.element, e), (i) => {
|
|
836
849
|
i && r(n.element, o);
|
|
837
850
|
};
|
|
838
851
|
};
|
|
839
|
-
},
|
|
840
|
-
const r =
|
|
852
|
+
}, O = (t, e) => {
|
|
853
|
+
const r = se(t), s = ne(t);
|
|
841
854
|
return (n) => {
|
|
842
|
-
|
|
843
|
-
const o = s(n.element), i = e.on((
|
|
844
|
-
return (
|
|
845
|
-
i(),
|
|
855
|
+
fe(n, t);
|
|
856
|
+
const o = s(n.element), i = e.on((l) => r(n.element, l));
|
|
857
|
+
return (l) => {
|
|
858
|
+
i(), l && r(n.element, o);
|
|
846
859
|
};
|
|
847
860
|
};
|
|
848
861
|
}, P = new Proxy(
|
|
@@ -859,17 +872,17 @@ const g = (t) => {
|
|
|
859
872
|
* @returns The renderable component for the specified attribute.
|
|
860
873
|
*
|
|
861
874
|
*/
|
|
862
|
-
get: (t, e) => e === "class" ? (r) => h.is(r) ?
|
|
875
|
+
get: (t, e) => e === "class" ? (r) => h.is(r) ? He(r) : We(
|
|
863
876
|
(r ?? "").split(" ").filter((s) => s.length > 0)
|
|
864
|
-
) : (r) => h.is(r) ?
|
|
877
|
+
) : (r) => h.is(r) ? O(
|
|
865
878
|
e,
|
|
866
879
|
r
|
|
867
|
-
) :
|
|
880
|
+
) : L(
|
|
868
881
|
e,
|
|
869
882
|
r
|
|
870
883
|
)
|
|
871
884
|
}
|
|
872
|
-
),
|
|
885
|
+
), At = new Proxy(
|
|
873
886
|
{},
|
|
874
887
|
{
|
|
875
888
|
/**
|
|
@@ -880,12 +893,12 @@ const g = (t) => {
|
|
|
880
893
|
* @returns The renderable component for the specified attribute.
|
|
881
894
|
*
|
|
882
895
|
*/
|
|
883
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
896
|
+
get: (t, e) => (r) => h.is(r) ? O(
|
|
884
897
|
`data-${e}`,
|
|
885
898
|
r
|
|
886
|
-
) :
|
|
899
|
+
) : L(`data-${e}`, r)
|
|
887
900
|
}
|
|
888
|
-
),
|
|
901
|
+
), Et = new Proxy(
|
|
889
902
|
{},
|
|
890
903
|
{
|
|
891
904
|
/**
|
|
@@ -896,15 +909,15 @@ const g = (t) => {
|
|
|
896
909
|
* @returns The renderable component for the specified attribute.
|
|
897
910
|
*
|
|
898
911
|
*/
|
|
899
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
912
|
+
get: (t, e) => (r) => h.is(r) ? O(
|
|
900
913
|
`aria-${e}`,
|
|
901
914
|
r
|
|
902
|
-
) :
|
|
915
|
+
) : L(
|
|
903
916
|
`aria-${e}`,
|
|
904
917
|
r
|
|
905
918
|
)
|
|
906
919
|
}
|
|
907
|
-
),
|
|
920
|
+
), Pt = new Proxy(
|
|
908
921
|
{},
|
|
909
922
|
{
|
|
910
923
|
/**
|
|
@@ -915,15 +928,15 @@ const g = (t) => {
|
|
|
915
928
|
* @returns The renderable component for the specified attribute.
|
|
916
929
|
*
|
|
917
930
|
*/
|
|
918
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
931
|
+
get: (t, e) => (r) => h.is(r) ? O(
|
|
919
932
|
e,
|
|
920
933
|
r
|
|
921
|
-
) :
|
|
934
|
+
) : L(
|
|
922
935
|
e,
|
|
923
936
|
r
|
|
924
937
|
)
|
|
925
938
|
}
|
|
926
|
-
),
|
|
939
|
+
), Dt = new Proxy(
|
|
927
940
|
{},
|
|
928
941
|
{
|
|
929
942
|
/**
|
|
@@ -933,29 +946,29 @@ const g = (t) => {
|
|
|
933
946
|
* @returns The renderable component for the specified attribute.
|
|
934
947
|
*
|
|
935
948
|
*/
|
|
936
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
949
|
+
get: (t, e) => (r) => h.is(r) ? O(
|
|
937
950
|
e,
|
|
938
951
|
r
|
|
939
|
-
) :
|
|
952
|
+
) : L(
|
|
940
953
|
e,
|
|
941
954
|
r
|
|
942
955
|
)
|
|
943
956
|
}
|
|
944
|
-
),
|
|
957
|
+
), f = (t) => t == null ? S : Array.isArray(t) ? g(...t.map(f)) : typeof t == "string" ? ie(t) : h.is(t) ? le(t) : t, ue = (t, ...e) => (r) => {
|
|
945
958
|
const s = r.createElement(t, void 0);
|
|
946
|
-
r.isFirstLevel &&
|
|
947
|
-
const n = e.map((o) =>
|
|
959
|
+
r.isFirstLevel && k() && de(s), r.appendOrInsert(s), r = r.withElement(s);
|
|
960
|
+
const n = e.map((o) => f(o)(r));
|
|
948
961
|
return (o) => {
|
|
949
|
-
n.forEach((i) => i(!1)), o &&
|
|
962
|
+
n.forEach((i) => i(!1)), o && _(s);
|
|
950
963
|
};
|
|
951
|
-
},
|
|
964
|
+
}, ae = (t, e, ...r) => (s) => {
|
|
952
965
|
const n = s.createElement(t, e);
|
|
953
|
-
s.isFirstLevel &&
|
|
954
|
-
const o = r.map((i) =>
|
|
966
|
+
s.isFirstLevel && k() && de(n), s.appendOrInsert(n), s = s.withElement(n);
|
|
967
|
+
const o = r.map((i) => f(i)(s));
|
|
955
968
|
return (i) => {
|
|
956
|
-
o.forEach((
|
|
969
|
+
o.forEach((l) => l(!1)), i && _(n);
|
|
957
970
|
};
|
|
958
|
-
},
|
|
971
|
+
}, bt = new Proxy(
|
|
959
972
|
{},
|
|
960
973
|
{
|
|
961
974
|
/**
|
|
@@ -963,9 +976,9 @@ const g = (t) => {
|
|
|
963
976
|
* @param tagName - The HTML tag name.
|
|
964
977
|
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
965
978
|
*/
|
|
966
|
-
get: (t, e) => (...r) =>
|
|
979
|
+
get: (t, e) => (...r) => ue(e, r.flatMap(f))
|
|
967
980
|
}
|
|
968
|
-
),
|
|
981
|
+
), Tt = new Proxy(
|
|
969
982
|
{},
|
|
970
983
|
{
|
|
971
984
|
/**
|
|
@@ -973,9 +986,9 @@ const g = (t) => {
|
|
|
973
986
|
* @param type - The input type name.
|
|
974
987
|
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
975
988
|
*/
|
|
976
|
-
get: (t, e) => (...r) =>
|
|
989
|
+
get: (t, e) => (...r) => ue("input", P.type(e), ...r)
|
|
977
990
|
}
|
|
978
|
-
),
|
|
991
|
+
), Xe = "http://www.w3.org/2000/svg", Ct = new Proxy(
|
|
979
992
|
{},
|
|
980
993
|
{
|
|
981
994
|
/**
|
|
@@ -983,9 +996,9 @@ const g = (t) => {
|
|
|
983
996
|
* @param tagName - The SVG tag name.
|
|
984
997
|
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
985
998
|
*/
|
|
986
|
-
get: (t, e) => (...r) =>
|
|
999
|
+
get: (t, e) => (...r) => ae(e, Xe, r.flatMap(f))
|
|
987
1000
|
}
|
|
988
|
-
),
|
|
1001
|
+
), ze = "http://www.w3.org/1998/Math/MathML", Lt = new Proxy(
|
|
989
1002
|
{},
|
|
990
1003
|
{
|
|
991
1004
|
/**
|
|
@@ -993,9 +1006,9 @@ const g = (t) => {
|
|
|
993
1006
|
* @param tagName - The Math tag name.
|
|
994
1007
|
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
995
1008
|
*/
|
|
996
|
-
get: (t, e) => (...r) =>
|
|
1009
|
+
get: (t, e) => (...r) => ae(e, ze, r.flatMap(f))
|
|
997
1010
|
}
|
|
998
|
-
), T = "data-tempo-attr",
|
|
1011
|
+
), T = "data-tempo-attr", M = "data-tempo-class", ce = "data-tempo-node", $ = "data-tempo-text", Qe = (t, e) => {
|
|
999
1012
|
const r = t.getAttribute(e);
|
|
1000
1013
|
if (r != null) {
|
|
1001
1014
|
const s = t.getAttribute(T) ?? "{}", n = { ...JSON.parse(s), name: r };
|
|
@@ -1004,9 +1017,9 @@ const g = (t) => {
|
|
|
1004
1017
|
JSON.stringify(n).replace(/"/g, """)
|
|
1005
1018
|
);
|
|
1006
1019
|
}
|
|
1007
|
-
},
|
|
1008
|
-
|
|
1009
|
-
},
|
|
1020
|
+
}, fe = (t, e) => {
|
|
1021
|
+
k() && t.isFirstLevel && Qe(t.element, e);
|
|
1022
|
+
}, Ye = (t) => {
|
|
1010
1023
|
t.querySelectorAll(`[${T}]`).forEach((e) => {
|
|
1011
1024
|
const r = JSON.parse(
|
|
1012
1025
|
(e.getAttribute(T) ?? "{}").replace(/"/g, '"')
|
|
@@ -1016,85 +1029,85 @@ const g = (t) => {
|
|
|
1016
1029
|
e.removeAttribute(T);
|
|
1017
1030
|
});
|
|
1018
1031
|
};
|
|
1019
|
-
function
|
|
1020
|
-
t.setAttribute(
|
|
1032
|
+
function Ze(t) {
|
|
1033
|
+
t.setAttribute(M, t.className);
|
|
1021
1034
|
}
|
|
1022
|
-
const
|
|
1023
|
-
|
|
1024
|
-
}, Qe = (t) => {
|
|
1025
|
-
t.querySelectorAll(`[${R}]`).forEach((e) => {
|
|
1026
|
-
const r = e.getAttribute(R);
|
|
1027
|
-
r !== null && (e.className = r, e.removeAttribute(R));
|
|
1028
|
-
});
|
|
1029
|
-
}, fe = (t) => {
|
|
1030
|
-
t.setAttribute(ue, "");
|
|
1031
|
-
}, Ye = (t) => {
|
|
1032
|
-
t.querySelectorAll(`[${ue}]`).forEach((e) => {
|
|
1033
|
-
g(e);
|
|
1034
|
-
});
|
|
1035
|
-
}, Ze = (t) => {
|
|
1036
|
-
t.setAttribute(M, t.textContent ?? "");
|
|
1037
|
-
}, he = (t) => {
|
|
1038
|
-
O() && t.isFirstLevel && Ze(t.element);
|
|
1035
|
+
const he = (t) => {
|
|
1036
|
+
k() && t.isFirstLevel && Ze(t.element);
|
|
1039
1037
|
}, Ke = (t) => {
|
|
1040
1038
|
t.querySelectorAll(`[${M}]`).forEach((e) => {
|
|
1041
|
-
|
|
1039
|
+
const r = e.getAttribute(M);
|
|
1040
|
+
r !== null && (e.className = r, e.removeAttribute(M));
|
|
1042
1041
|
});
|
|
1042
|
+
}, de = (t) => {
|
|
1043
|
+
t.setAttribute(ce, "");
|
|
1043
1044
|
}, xe = (t) => {
|
|
1044
|
-
|
|
1045
|
-
|
|
1045
|
+
t.querySelectorAll(`[${ce}]`).forEach((e) => {
|
|
1046
|
+
_(e);
|
|
1047
|
+
});
|
|
1048
|
+
}, et = (t) => {
|
|
1049
|
+
t.setAttribute($, t.textContent ?? "");
|
|
1050
|
+
}, pe = (t) => {
|
|
1051
|
+
k() && t.isFirstLevel && et(t.element);
|
|
1052
|
+
}, tt = (t) => {
|
|
1053
|
+
t.querySelectorAll(`[${$}]`).forEach((e) => {
|
|
1054
|
+
e.textContent = e.getAttribute($), e.removeAttribute($);
|
|
1055
|
+
});
|
|
1056
|
+
}, rt = (t) => {
|
|
1057
|
+
xe(t), Ke(t), Ye(t), tt(t);
|
|
1058
|
+
}, me = () => {
|
|
1046
1059
|
const t = globalThis;
|
|
1047
1060
|
return t.__tempoSSR__ == null && (t.__tempoSSR__ = {
|
|
1048
1061
|
isSSR: !1,
|
|
1049
1062
|
counter: 0
|
|
1050
1063
|
}), t.__tempoSSR__;
|
|
1051
|
-
},
|
|
1052
|
-
const r =
|
|
1064
|
+
}, J = (t, e) => {
|
|
1065
|
+
const r = me();
|
|
1053
1066
|
r[t] = e;
|
|
1054
|
-
},
|
|
1055
|
-
|
|
1056
|
-
},
|
|
1057
|
-
|
|
1058
|
-
},
|
|
1059
|
-
|
|
1060
|
-
},
|
|
1067
|
+
}, ge = (t) => me()[t], B = (t) => {
|
|
1068
|
+
J("isSSR", t);
|
|
1069
|
+
}, W = () => ge("counter"), st = () => {
|
|
1070
|
+
J("counter", (W() ?? 0) + 1);
|
|
1071
|
+
}, nt = () => {
|
|
1072
|
+
J("counter", (W() ?? 0) - 1);
|
|
1073
|
+
}, Ot = (t = 30) => (B(!0), new Promise((e, r) => {
|
|
1061
1074
|
let s;
|
|
1062
1075
|
const n = setInterval(() => {
|
|
1063
|
-
|
|
1076
|
+
W() <= 0 && (clearInterval(n), clearTimeout(s), B(!1), e());
|
|
1064
1077
|
}, 30);
|
|
1065
1078
|
s = setTimeout(() => {
|
|
1066
|
-
clearInterval(n),
|
|
1079
|
+
clearInterval(n), B(!1), r(new Error("SSR Timeout"));
|
|
1067
1080
|
}, t * 1e3);
|
|
1068
|
-
})),
|
|
1081
|
+
})), kt = (t) => (st(), f(t(nt))), k = () => ge("isSSR"), _e = (t, e) => {
|
|
1069
1082
|
if (typeof e == "function")
|
|
1070
|
-
return
|
|
1071
|
-
const r = e.pending != null ?
|
|
1083
|
+
return _e(t, { then: e });
|
|
1084
|
+
const r = e.pending != null ? f(e.pending) : S, s = e.then, n = e.error != null ? (o) => f(e.error(o)) : () => S;
|
|
1072
1085
|
return (o) => {
|
|
1073
1086
|
let i = !0;
|
|
1074
|
-
const
|
|
1087
|
+
const l = t();
|
|
1075
1088
|
o = o.makeRef();
|
|
1076
|
-
let
|
|
1077
|
-
return
|
|
1078
|
-
(
|
|
1079
|
-
i && (
|
|
1089
|
+
let a = f(r)(o);
|
|
1090
|
+
return l.then(
|
|
1091
|
+
(c) => {
|
|
1092
|
+
i && (a(!0), a = f(s(c))(o));
|
|
1080
1093
|
},
|
|
1081
|
-
(
|
|
1082
|
-
i && (
|
|
1094
|
+
(c) => {
|
|
1095
|
+
i && (a(!0), a = f(n(c))(o));
|
|
1083
1096
|
}
|
|
1084
|
-
), (
|
|
1085
|
-
i = !1,
|
|
1097
|
+
), (c) => {
|
|
1098
|
+
i = !1, a(c), c && o.reference && _(o.reference);
|
|
1086
1099
|
};
|
|
1087
1100
|
};
|
|
1088
|
-
}, Nt = (t, e) =>
|
|
1101
|
+
}, Nt = (t, e) => _e(() => t, e), ve = (t, e) => (r) => (r.element.addEventListener(t, e), (s) => {
|
|
1089
1102
|
s && r.element.removeEventListener(t, e);
|
|
1090
|
-
}),
|
|
1103
|
+
}), ot = (t) => ve("click", (e) => {
|
|
1091
1104
|
e.preventDefault();
|
|
1092
1105
|
const r = e.target;
|
|
1093
1106
|
setTimeout(() => {
|
|
1094
1107
|
const s = r.ownerDocument != null ? r == null ? void 0 : r.checked : void 0;
|
|
1095
1108
|
s != null && t(!s);
|
|
1096
1109
|
}, 0);
|
|
1097
|
-
}),
|
|
1110
|
+
}), q = new Proxy(
|
|
1098
1111
|
{},
|
|
1099
1112
|
{
|
|
1100
1113
|
/**
|
|
@@ -1102,15 +1115,15 @@ const ce = (t) => {
|
|
|
1102
1115
|
* @param fn - The function to call when the event is triggered.
|
|
1103
1116
|
* @returns A `Renderable` function that adds the event listener to the element.
|
|
1104
1117
|
*/
|
|
1105
|
-
get: (t, e) => (r) =>
|
|
1118
|
+
get: (t, e) => (r) => ve(e, r)
|
|
1106
1119
|
}
|
|
1107
|
-
),
|
|
1120
|
+
), it = (t) => (e) => {
|
|
1108
1121
|
const r = e.target;
|
|
1109
1122
|
t(r.value);
|
|
1110
|
-
},
|
|
1123
|
+
}, lt = (t) => (e) => {
|
|
1111
1124
|
const r = e.target;
|
|
1112
1125
|
t(r.valueAsNumber);
|
|
1113
|
-
},
|
|
1126
|
+
}, ut = (t) => (e) => {
|
|
1114
1127
|
const r = e.target;
|
|
1115
1128
|
if (r.value === "")
|
|
1116
1129
|
return;
|
|
@@ -1120,7 +1133,7 @@ const ce = (t) => {
|
|
|
1120
1133
|
Number(s[2].substring(0, 2))
|
|
1121
1134
|
);
|
|
1122
1135
|
t(n);
|
|
1123
|
-
},
|
|
1136
|
+
}, at = (t) => (e) => {
|
|
1124
1137
|
const r = e.target;
|
|
1125
1138
|
if (r.value === "")
|
|
1126
1139
|
return;
|
|
@@ -1130,52 +1143,57 @@ const ce = (t) => {
|
|
|
1130
1143
|
Number(n[2])
|
|
1131
1144
|
), i = s[1].split(":");
|
|
1132
1145
|
o.setHours(Number(i[0])), o.setMinutes(Number(i[1])), o.setSeconds(Number(i[2])), t(o);
|
|
1133
|
-
},
|
|
1146
|
+
}, Rt = (t) => (e) => {
|
|
1134
1147
|
const r = e.target;
|
|
1135
1148
|
t(r.checked);
|
|
1136
|
-
},
|
|
1149
|
+
}, Mt = (t) => (e) => {
|
|
1137
1150
|
e.preventDefault(), t();
|
|
1138
|
-
},
|
|
1151
|
+
}, $t = (t) => (e) => {
|
|
1139
1152
|
e.stopPropagation(), t();
|
|
1140
|
-
},
|
|
1153
|
+
}, Ft = (t) => (e) => {
|
|
1141
1154
|
e.stopImmediatePropagation(), t();
|
|
1142
|
-
},
|
|
1155
|
+
}, Vt = (t, e = "input") => g(
|
|
1143
1156
|
P.valueAsDate(t),
|
|
1144
|
-
|
|
1145
|
-
),
|
|
1157
|
+
q[e](ut(t.set))
|
|
1158
|
+
), qt = (t, e = "input") => g(
|
|
1146
1159
|
P.valueAsDate(t),
|
|
1147
|
-
|
|
1148
|
-
),
|
|
1160
|
+
q[e](at(t.set))
|
|
1161
|
+
), It = (t, e = "input") => g(
|
|
1149
1162
|
P.valueAsNumber(t),
|
|
1150
|
-
|
|
1151
|
-
),
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1163
|
+
q[e](lt(t.set))
|
|
1164
|
+
), Bt = (t, e = "input") => g(P.value(t), q[e](it(t.set))), jt = (t) => g(P.checked(t), ot(t.set)), H = (t, e) => {
|
|
1165
|
+
if (h.is(t))
|
|
1166
|
+
return (s) => {
|
|
1167
|
+
s = s.makeRef();
|
|
1168
|
+
let n, o;
|
|
1169
|
+
const i = t.map((c) => Object.keys(c)[0]);
|
|
1170
|
+
let l;
|
|
1171
|
+
const a = i.on((c) => {
|
|
1172
|
+
if (c !== l) {
|
|
1173
|
+
o == null || o.dispose(), n == null || n(!0), o = t.map((v) => v[c]);
|
|
1174
|
+
const d = e[c](o);
|
|
1175
|
+
n = f(d)(s), l = c;
|
|
1176
|
+
}
|
|
1177
|
+
});
|
|
1178
|
+
return (c) => {
|
|
1179
|
+
a(), c && s.reference != null && _(s.reference), n == null || n(!0);
|
|
1180
|
+
};
|
|
1181
|
+
};
|
|
1182
|
+
const r = Object.keys(t)[0];
|
|
1183
|
+
return f(e[r](G(t[r])));
|
|
1184
|
+
}, ye = (t, e, r) => H(
|
|
1185
|
+
h.map(t, (s) => ({ [s[e]]: s })),
|
|
1168
1186
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1169
1187
|
r
|
|
1170
|
-
),
|
|
1171
|
-
const r =
|
|
1172
|
-
return
|
|
1173
|
-
},
|
|
1174
|
-
|
|
1188
|
+
), Ut = (t, e) => ye(t, "kind", e), Gt = (t, e) => {
|
|
1189
|
+
const r = h.map(t, ([s, n]) => ({ [s]: n }));
|
|
1190
|
+
return H(r, e);
|
|
1191
|
+
}, Jt = (t, e) => ye(t, "type", e), X = (t, e) => H(
|
|
1192
|
+
h.map(t, (r) => ({ [r]: !0 })),
|
|
1175
1193
|
e
|
|
1176
|
-
),
|
|
1177
|
-
const s = (e == null ? void 0 : e.firstSeparator) ??
|
|
1178
|
-
return
|
|
1194
|
+
), Wt = (t, e = {}) => (r) => {
|
|
1195
|
+
const s = (e == null ? void 0 : e.firstSeparator) ?? t, n = (e == null ? void 0 : e.lastSeparator) ?? t;
|
|
1196
|
+
return X(
|
|
1179
1197
|
r.map((o) => o.isFirst ? "first" : o.isLast ? "last" : "other"),
|
|
1180
1198
|
{
|
|
1181
1199
|
first: () => s,
|
|
@@ -1183,150 +1201,176 @@ const ce = (t) => {
|
|
|
1183
1201
|
other: () => t
|
|
1184
1202
|
}
|
|
1185
1203
|
);
|
|
1186
|
-
},
|
|
1204
|
+
}, we = (t, e) => (r) => {
|
|
1187
1205
|
const s = Object.values(t).reduce((n, o) => {
|
|
1188
1206
|
const i = r.getProvider(o);
|
|
1189
1207
|
if (i == null)
|
|
1190
1208
|
throw new Error(`No provider found for mark: ${o.description}`);
|
|
1191
1209
|
return n[o] = i, n;
|
|
1192
1210
|
}, {});
|
|
1193
|
-
return
|
|
1194
|
-
},
|
|
1211
|
+
return f(e(s))(r);
|
|
1212
|
+
}, Ht = (t, e) => (r) => {
|
|
1195
1213
|
const s = [], n = Object.entries(t).reduce(
|
|
1196
|
-
(o, [i,
|
|
1197
|
-
|
|
1214
|
+
(o, [i, l]) => (s.push(
|
|
1215
|
+
l((a) => (Reflect.set(o, i, a), null))(r)
|
|
1198
1216
|
), o),
|
|
1199
1217
|
{}
|
|
1200
1218
|
);
|
|
1201
1219
|
return s.push(e(n)(r)), (o) => {
|
|
1202
1220
|
s.forEach((i) => i(o));
|
|
1203
1221
|
};
|
|
1204
|
-
},
|
|
1205
|
-
r &&
|
|
1206
|
-
}),
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1222
|
+
}, Xt = (t, e) => we([t], (r) => f(e(r[t]))), zt = (t, e) => we(t, (r) => f(e(r))), Qt = (t) => (e) => t(e), Yt = (t) => (e) => (e.appendOrInsert(t), (r) => {
|
|
1223
|
+
r && _(t);
|
|
1224
|
+
}), ct = (t, e, r) => {
|
|
1225
|
+
if (h.is(t)) {
|
|
1226
|
+
const s = t;
|
|
1227
|
+
return (n) => {
|
|
1228
|
+
n = n.makeRef();
|
|
1229
|
+
let o = null, i = !1;
|
|
1230
|
+
const l = C(null), a = s.on((c) => {
|
|
1231
|
+
c == null ? (o == null || o(!0), o = f((r == null ? void 0 : r()) ?? S)(n), i = !1) : (l.value = c, i || (o == null || o(!0), o = f(e(l))(n), i = !0));
|
|
1232
|
+
});
|
|
1233
|
+
return (c) => {
|
|
1234
|
+
a(), o == null || o(c), c && n.reference && _(n.reference);
|
|
1235
|
+
};
|
|
1236
|
+
};
|
|
1237
|
+
} else {
|
|
1238
|
+
const s = t;
|
|
1239
|
+
if (s == null) {
|
|
1240
|
+
const n = r == null ? void 0 : r();
|
|
1241
|
+
return n != null ? f(n) : S;
|
|
1242
|
+
}
|
|
1243
|
+
return f(e(G(s)));
|
|
1244
|
+
}
|
|
1245
|
+
}, j = (t) => (e) => (r) => t(r, e), Se = (t, e, r) => r != null ? Se(t, (s) => {
|
|
1246
|
+
const n = s.map((i) => new R(i.index, i.total - 1)), o = s.map((i) => i.isLast ? "last" : "other");
|
|
1247
|
+
return g(
|
|
1248
|
+
j(() => {
|
|
1249
|
+
n.dispose(), o.dispose();
|
|
1250
|
+
}),
|
|
1251
|
+
f(e(s)),
|
|
1252
|
+
X(o, {
|
|
1253
|
+
last: () => S,
|
|
1254
|
+
other: () => r(n)
|
|
1223
1255
|
})
|
|
1224
1256
|
);
|
|
1225
|
-
}) : (s) => {
|
|
1257
|
+
}) : h.is(t) ? (s) => {
|
|
1226
1258
|
s = s.makeRef();
|
|
1227
1259
|
const n = t.map(
|
|
1228
|
-
(
|
|
1229
|
-
(
|
|
1260
|
+
(a) => Array.from({ length: a }, (c, d) => d).map(
|
|
1261
|
+
(c) => new R(c, a)
|
|
1230
1262
|
)
|
|
1231
|
-
), o = [], i = [],
|
|
1232
|
-
var d,
|
|
1233
|
-
const
|
|
1234
|
-
for (;
|
|
1235
|
-
(d = o.pop()) == null || d(!0), (
|
|
1236
|
-
for (let m = 0; m <
|
|
1263
|
+
), o = [], i = [], l = n.on((a) => {
|
|
1264
|
+
var d, v;
|
|
1265
|
+
const c = a.length;
|
|
1266
|
+
for (; c < o.length; )
|
|
1267
|
+
(d = o.pop()) == null || d(!0), (v = i.pop()) == null || v.dispose();
|
|
1268
|
+
for (let m = 0; m < c; m++)
|
|
1237
1269
|
if (i[m] == null) {
|
|
1238
|
-
i[m] =
|
|
1239
|
-
const D =
|
|
1270
|
+
i[m] = C(a[m]);
|
|
1271
|
+
const D = f(e(i[m]));
|
|
1240
1272
|
o[m] = D(s);
|
|
1241
1273
|
} else
|
|
1242
|
-
i[m].value =
|
|
1274
|
+
i[m].value = a[m];
|
|
1243
1275
|
});
|
|
1244
|
-
return (
|
|
1245
|
-
|
|
1276
|
+
return (a) => {
|
|
1277
|
+
l(), a && s.reference && _(s.reference);
|
|
1246
1278
|
};
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1279
|
+
} : g(
|
|
1280
|
+
...Array.from({ length: t }, (s, n) => n).map(
|
|
1281
|
+
(s) => f(e(G(new R(s, t))))
|
|
1282
|
+
)
|
|
1283
|
+
), ft = (t, e, r) => r != null ? ft(t, (s, n) => {
|
|
1284
|
+
const o = n.map((l) => new R(l.index, l.total - 1)), i = n.map((l) => l.isLast ? "last" : "other");
|
|
1285
|
+
return g([
|
|
1286
|
+
j(() => {
|
|
1287
|
+
i.dispose(), o.dispose();
|
|
1288
|
+
}),
|
|
1289
|
+
f(e(s, n)),
|
|
1290
|
+
X(i, {
|
|
1291
|
+
last: () => S,
|
|
1292
|
+
other: () => r(o)
|
|
1255
1293
|
})
|
|
1256
1294
|
]);
|
|
1257
1295
|
}) : (s) => {
|
|
1258
|
-
const n =
|
|
1259
|
-
return
|
|
1260
|
-
const i =
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
);
|
|
1264
|
-
return
|
|
1265
|
-
|
|
1266
|
-
|
|
1296
|
+
const n = h.map(t, (o) => o.length);
|
|
1297
|
+
return Se(n, (o) => {
|
|
1298
|
+
const i = $e(
|
|
1299
|
+
o,
|
|
1300
|
+
t
|
|
1301
|
+
)((l, a) => a[l.index]);
|
|
1302
|
+
return g(
|
|
1303
|
+
j(() => i.dispose()),
|
|
1304
|
+
f(e(i, o))
|
|
1267
1305
|
);
|
|
1268
1306
|
})(s);
|
|
1269
|
-
},
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1307
|
+
}, Zt = (t, e) => {
|
|
1308
|
+
if (h.is(t)) {
|
|
1309
|
+
const r = t;
|
|
1310
|
+
return (s) => {
|
|
1311
|
+
s = s.makeRef();
|
|
1312
|
+
const n = r.map((l) => f(e(l)));
|
|
1313
|
+
let o = () => {
|
|
1314
|
+
};
|
|
1315
|
+
const i = n.on((l) => {
|
|
1316
|
+
o(!0), o = l(s);
|
|
1317
|
+
});
|
|
1318
|
+
return (l) => {
|
|
1319
|
+
i(), o(l);
|
|
1320
|
+
};
|
|
1321
|
+
};
|
|
1322
|
+
}
|
|
1323
|
+
return f(e(t));
|
|
1324
|
+
}, Ae = (t, e, r) => ct(
|
|
1325
|
+
h.map(t, (s) => s ? !0 : null),
|
|
1282
1326
|
() => e,
|
|
1283
1327
|
r != null ? () => r : void 0
|
|
1284
|
-
),
|
|
1285
|
-
|
|
1328
|
+
), Kt = (t, e, r) => Ae(
|
|
1329
|
+
h.map(t, (s) => !s),
|
|
1286
1330
|
e,
|
|
1287
1331
|
r
|
|
1288
|
-
),
|
|
1289
|
-
|
|
1332
|
+
), xt = (t, e, r = S) => Ae(
|
|
1333
|
+
h.map(t, (s) => s.length > 0),
|
|
1290
1334
|
e,
|
|
1291
1335
|
r
|
|
1292
|
-
),
|
|
1293
|
-
}),
|
|
1336
|
+
), er = (t) => (e) => t(e.element) ?? (() => {
|
|
1337
|
+
}), Ee = (t, e) => {
|
|
1294
1338
|
const r = t(e);
|
|
1295
1339
|
return () => r(!0);
|
|
1296
|
-
},
|
|
1340
|
+
}, tr = (t, e, { doc: r, clear: s } = {}) => {
|
|
1297
1341
|
const n = typeof e == "string" ? (r ?? document).querySelector(e) : e;
|
|
1298
1342
|
if (n === null)
|
|
1299
|
-
throw new
|
|
1343
|
+
throw new ht(
|
|
1300
1344
|
`Cannot find element by selector for render: ${e}`
|
|
1301
1345
|
);
|
|
1302
|
-
s !== !1 && (r ?? n.ownerDocument) != null &&
|
|
1303
|
-
const o =
|
|
1304
|
-
return
|
|
1346
|
+
s !== !1 && (r ?? n.ownerDocument) != null && rt(r ?? n.ownerDocument);
|
|
1347
|
+
const o = Je(n), i = oe(n) ? void 0 : n, l = w.of(o, i);
|
|
1348
|
+
return Ee(t, l);
|
|
1305
1349
|
};
|
|
1306
|
-
class
|
|
1350
|
+
class ht extends Error {
|
|
1307
1351
|
constructor(e) {
|
|
1308
1352
|
super(e);
|
|
1309
1353
|
}
|
|
1310
1354
|
}
|
|
1311
|
-
const
|
|
1355
|
+
const rr = (t, e) => (r) => {
|
|
1312
1356
|
const s = r.document.querySelector(t);
|
|
1313
1357
|
if (s === null)
|
|
1314
1358
|
throw new Error(`Cannot find element by selector for portal: ${t}`);
|
|
1315
|
-
return
|
|
1316
|
-
|
|
1359
|
+
return Ee(
|
|
1360
|
+
f(e),
|
|
1317
1361
|
r.withElement(s).withFirstLevel()
|
|
1318
1362
|
);
|
|
1319
|
-
},
|
|
1363
|
+
}, sr = (t) => Symbol(t), Pe = (t, e) => (r) => f(e)(r.withProviders(t)), nr = (...t) => t.length > 0 ? t.reduceRight((e, r) => (s) => e(r(s))) : f, or = (t, e, r) => Pe({ [t]: e }, f(r)), ir = (t, e) => Pe(t, f(e)), dt = (t, e) => (r) => {
|
|
1320
1364
|
const s = r.element, n = s.style.getPropertyValue(t);
|
|
1321
1365
|
return s.style.setProperty(t, e), (o) => {
|
|
1322
1366
|
o && s.style.setProperty(t, n);
|
|
1323
1367
|
};
|
|
1324
|
-
},
|
|
1368
|
+
}, pt = (t, e) => (r) => {
|
|
1325
1369
|
const s = r.element, n = s.style.getPropertyValue(t);
|
|
1326
1370
|
return e.on((o) => s.style.setProperty(t, o)), (o) => {
|
|
1327
1371
|
o && s.style.setProperty(t, n);
|
|
1328
1372
|
};
|
|
1329
|
-
},
|
|
1373
|
+
}, lr = new Proxy(
|
|
1330
1374
|
{},
|
|
1331
1375
|
{
|
|
1332
1376
|
/**
|
|
@@ -1337,113 +1381,115 @@ const er = (t, e) => (r) => {
|
|
|
1337
1381
|
* @returns The renderable component for the specified attribute.
|
|
1338
1382
|
*
|
|
1339
1383
|
*/
|
|
1340
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
1384
|
+
get: (t, e) => (r) => h.is(r) ? pt(e, r) : dt(e, r)
|
|
1341
1385
|
}
|
|
1342
1386
|
);
|
|
1343
1387
|
export {
|
|
1344
1388
|
Nt as Async,
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1389
|
+
jt as BindChecked,
|
|
1390
|
+
Vt as BindDate,
|
|
1391
|
+
qt as BindDateTime,
|
|
1392
|
+
It as BindNumber,
|
|
1393
|
+
Bt as BindText,
|
|
1350
1394
|
E as Computed,
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1395
|
+
Wt as Conjunction,
|
|
1396
|
+
w as DOMContext,
|
|
1397
|
+
Yt as DOMNode,
|
|
1398
|
+
ue as El,
|
|
1399
|
+
ae as ElNS,
|
|
1400
|
+
R as ElementPosition,
|
|
1401
|
+
S as Empty,
|
|
1402
|
+
ct as Ensure,
|
|
1403
|
+
ft as ForEach,
|
|
1404
|
+
g as Fragment,
|
|
1405
|
+
Zt as MapSignal,
|
|
1406
|
+
Z as MemoryStore,
|
|
1407
|
+
xt as NotEmpty,
|
|
1408
|
+
ot as OnChecked,
|
|
1409
|
+
Qt as OnCtx,
|
|
1410
|
+
er as OnMount,
|
|
1411
|
+
j as OnUnmount,
|
|
1412
|
+
H as OneOf,
|
|
1413
|
+
ye as OneOfField,
|
|
1414
|
+
Ut as OneOfKind,
|
|
1415
|
+
Gt as OneOfTuple,
|
|
1416
|
+
Jt as OneOfType,
|
|
1417
|
+
X as OneOfValue,
|
|
1418
|
+
rr as Portal,
|
|
1419
|
+
F as Prop,
|
|
1420
|
+
nr as Provide,
|
|
1421
|
+
Ge as ProviderNotFoundError,
|
|
1422
|
+
ht as RenderingError,
|
|
1423
|
+
Se as Repeat,
|
|
1380
1424
|
h as Signal,
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1425
|
+
_e as Task,
|
|
1426
|
+
St as TextNode,
|
|
1427
|
+
Kt as Unless,
|
|
1428
|
+
Ht as Use,
|
|
1429
|
+
Xt as UseProvider,
|
|
1430
|
+
zt as UseProviders,
|
|
1431
|
+
kt as UseSSRDone,
|
|
1432
|
+
Ae as When,
|
|
1433
|
+
or as WithProvider,
|
|
1434
|
+
ir as WithProviders,
|
|
1435
|
+
de as _addNodeTracker,
|
|
1436
|
+
rt as _clearSSR,
|
|
1437
|
+
Je as _getSelfOrParentElement,
|
|
1438
|
+
oe as _isElement,
|
|
1439
|
+
ne as _makeGetter,
|
|
1440
|
+
se as _makeSetter,
|
|
1441
|
+
fe as _maybeAddAttributeTracker,
|
|
1442
|
+
he as _maybeAddClassTracker,
|
|
1443
|
+
pe as _maybeAddTextTracker,
|
|
1444
|
+
_ as _removeDOMNode,
|
|
1445
|
+
Ue as _setAttribute,
|
|
1446
|
+
qe as _setBooleanProperty,
|
|
1447
|
+
Be as _setDateProperty,
|
|
1448
|
+
Ie as _setNumberProperty,
|
|
1449
|
+
je as _setStringProperty,
|
|
1450
|
+
le as _signalText,
|
|
1451
|
+
ie as _staticText,
|
|
1452
|
+
yt as animateSignal,
|
|
1453
|
+
Ve as animateSignals,
|
|
1454
|
+
Et as aria,
|
|
1411
1455
|
P as attr,
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1456
|
+
At as dataAttr,
|
|
1457
|
+
Rt as emitChecked,
|
|
1458
|
+
Mt as emitPreventDefault,
|
|
1459
|
+
Ft as emitStopImmediatePropagation,
|
|
1460
|
+
$t as emitStopPropagation,
|
|
1461
|
+
it as emitValue,
|
|
1462
|
+
ut as emitValueAsDate,
|
|
1463
|
+
at as emitValueAsDateTime,
|
|
1464
|
+
lt as emitValueAsNumber,
|
|
1421
1465
|
Ne as endInterpolate,
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1466
|
+
Re as guessInterpolate,
|
|
1467
|
+
bt as html,
|
|
1468
|
+
Tt as input,
|
|
1469
|
+
ke as interpolateDate,
|
|
1470
|
+
Le as interpolateNumber,
|
|
1471
|
+
Oe as interpolateString,
|
|
1472
|
+
k as isSSR,
|
|
1473
|
+
_t as localStorageProp,
|
|
1474
|
+
U as makeComputed,
|
|
1475
|
+
$e as makeComputedOf,
|
|
1476
|
+
wt as makeComputedRecord,
|
|
1477
|
+
Fe as makeEffect,
|
|
1478
|
+
gt as makeEffectOf,
|
|
1479
|
+
C as makeProp,
|
|
1480
|
+
sr as makeProviderMark,
|
|
1481
|
+
G as makeSignal,
|
|
1482
|
+
Lt as math,
|
|
1483
|
+
Dt as mathAttr,
|
|
1484
|
+
q as on,
|
|
1485
|
+
Ot as prepareSSR,
|
|
1486
|
+
tt as removeTextTrackers,
|
|
1487
|
+
tr as render,
|
|
1488
|
+
Ee as renderWithContext,
|
|
1489
|
+
f as renderableOfTNode,
|
|
1490
|
+
vt as sessionStorageProp,
|
|
1491
|
+
K as storedProp,
|
|
1492
|
+
lr as style,
|
|
1493
|
+
Ct as svg,
|
|
1494
|
+
Pt as svgAttr
|
|
1449
1495
|
};
|