@tempots/dom 24.0.0-next.9 → 25.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/LICENSE.txt +202 -0
- package/README.md +1 -1
- package/dom/browser-context.d.ts +3 -2
- package/dom/dom-context.d.ts +13 -1
- package/dom/headless-context.d.ts +2 -2
- package/index.cjs +1 -1
- package/index.js +834 -673
- package/package.json +1 -1
- package/renderable/async.d.ts +1 -1
- package/renderable/attribute.d.ts +1 -1
- package/renderable/conjunction.d.ts +3 -3
- package/renderable/consumers.d.ts +2 -2
- package/renderable/ensure.d.ts +15 -1
- package/renderable/map-signal.d.ts +3 -3
- package/renderable/on-browser-ctx.d.ts +7 -3
- package/renderable/on-ctx.d.ts +7 -3
- package/renderable/on-dispose.d.ts +3 -2
- package/renderable/on-element.d.ts +6 -2
- package/renderable/on-headless-ctx.d.ts +2 -2
- package/renderable/oneof.d.ts +10 -0
- package/renderable/probe.d.ts +1 -1
- package/renderable/render.d.ts +150 -6
- package/renderable/style.d.ts +2 -1
- package/renderable/task.d.ts +1 -1
- package/renderable/when.d.ts +2 -20
- package/std/signal.d.ts +21 -5
- package/std/value.d.ts +16 -2
- package/types/css-styles.d.ts +1 -1
- package/types/html-attributes.d.ts +1 -1
package/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
var
|
|
2
|
-
var te = (
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var ke = Object.defineProperty;
|
|
2
|
+
var te = (s) => {
|
|
3
|
+
throw TypeError(s);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var o = (
|
|
7
|
-
var
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const r = Math.max(
|
|
5
|
+
var Ie = (s, e, t) => e in s ? ke(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
6
|
+
var o = (s, e, t) => Ie(s, typeof e != "symbol" ? e + "" : e, t), se = (s, e, t) => e.has(s) || te("Cannot " + t);
|
|
7
|
+
var X = (s, e, t) => (se(s, e, "read from private field"), t ? t.call(s) : e.get(s)), re = (s, e, t) => e.has(s) ? te("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), ne = (s, e, t, r) => (se(s, e, "write to private field"), r ? r.call(s, t) : e.set(s, t), t);
|
|
8
|
+
const Re = (s, e, t) => s + (e - s) * t;
|
|
9
|
+
const Ne = (s, e, t) => {
|
|
10
|
+
const r = Math.max(s.length, e.length);
|
|
11
11
|
let n = "";
|
|
12
12
|
for (let i = 0; i < r; i++) {
|
|
13
|
-
let l =
|
|
13
|
+
let l = s.charCodeAt(i);
|
|
14
14
|
isNaN(l) && (l = 97);
|
|
15
15
|
let c = e.charCodeAt(i);
|
|
16
|
-
isNaN(c) && (c = 97), n += String.fromCharCode(l + (c - l) *
|
|
16
|
+
isNaN(c) && (c = 97), n += String.fromCharCode(l + (c - l) * t);
|
|
17
17
|
}
|
|
18
18
|
return n;
|
|
19
|
-
},
|
|
20
|
-
var
|
|
21
|
-
class
|
|
19
|
+
}, Ve = (s, e, t) => new Date(s.getTime() + (e.getTime() - s.getTime()) * t), je = (s, e) => e, qe = (s) => typeof s == "number" ? Re : typeof s == "string" ? Ne : s instanceof Date ? Ve : je;
|
|
20
|
+
var D;
|
|
21
|
+
class Y {
|
|
22
22
|
/**
|
|
23
23
|
* Creates a new instance of `ElementPosition`.
|
|
24
24
|
* @param index - The index of the element.
|
|
25
25
|
* @param total - The total number of elements in the collection.
|
|
26
26
|
*/
|
|
27
|
-
constructor(e,
|
|
27
|
+
constructor(e, t) {
|
|
28
28
|
/**
|
|
29
29
|
* The counter of the element starting from 1.
|
|
30
30
|
*/
|
|
@@ -44,22 +44,22 @@ class D {
|
|
|
44
44
|
* @returns `true` if the counter is odd, `false` otherwise.
|
|
45
45
|
*/
|
|
46
46
|
o(this, "isOdd");
|
|
47
|
-
re(this,
|
|
47
|
+
re(this, D);
|
|
48
48
|
o(this, "dispose", () => {
|
|
49
|
-
|
|
49
|
+
this.total.dispose();
|
|
50
50
|
});
|
|
51
|
-
this.index = e, this.total =
|
|
51
|
+
this.index = e, this.total = t, this.counter = e + 1, this.isFirst = e === 0, this.isEven = e % 2 === 1, this.isOdd = e % 2 === 0;
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
54
|
* Checks if the element is the last element in the collection.
|
|
55
55
|
* @returns `true` if the element is the last element, `false` otherwise.
|
|
56
56
|
*/
|
|
57
57
|
get isLast() {
|
|
58
|
-
return
|
|
58
|
+
return X(this, D) == null && ne(this, D, this.total.map((e) => this.counter === e)), X(this, D);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
const
|
|
61
|
+
D = new WeakMap();
|
|
62
|
+
const H = class H {
|
|
63
63
|
/**
|
|
64
64
|
* Represents a signal with a value of type T.
|
|
65
65
|
*
|
|
@@ -67,7 +67,7 @@ const M = class M {
|
|
|
67
67
|
* @param equals - A function that determines whether two values of type T are equal.
|
|
68
68
|
* @public
|
|
69
69
|
*/
|
|
70
|
-
constructor(e,
|
|
70
|
+
constructor(e, t) {
|
|
71
71
|
/**
|
|
72
72
|
* @internal
|
|
73
73
|
*/
|
|
@@ -104,16 +104,28 @@ const M = class M {
|
|
|
104
104
|
* Returns a function that can be called to unregister the listener.
|
|
105
105
|
*
|
|
106
106
|
* @param listener - The listener function to be called when the value of the signal changes.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
* @param options - Options for the listener.
|
|
108
|
+
*/
|
|
109
|
+
o(this, "on", (e, t = {}) => {
|
|
110
|
+
t.skipInitial || e(this.get(), void 0);
|
|
111
|
+
const r = t.once ? (i, l) => {
|
|
112
|
+
n(), e(i, l);
|
|
113
|
+
} : e;
|
|
114
|
+
this._onValueListeners.push(r);
|
|
115
|
+
const n = () => {
|
|
116
|
+
this._onValueListeners.splice(
|
|
117
|
+
this._onValueListeners.indexOf(r),
|
|
118
|
+
1
|
|
119
|
+
), t.abortSignal != null && t.abortSignal.removeEventListener("abort", n);
|
|
120
|
+
};
|
|
121
|
+
return t.abortSignal != null && t.abortSignal.addEventListener("abort", n), n;
|
|
122
|
+
});
|
|
111
123
|
/**
|
|
112
124
|
* @internal
|
|
113
125
|
*/
|
|
114
|
-
o(this, "_setAndNotify", (e,
|
|
115
|
-
const r = this.equals(
|
|
116
|
-
|
|
126
|
+
o(this, "_setAndNotify", (e, t) => {
|
|
127
|
+
const r = this._value, n = this.equals(r, e);
|
|
128
|
+
n || (this._value = e), (t || !n) && this._onValueListeners.forEach((i) => i(e, r));
|
|
117
129
|
});
|
|
118
130
|
/**
|
|
119
131
|
* @internal
|
|
@@ -147,14 +159,14 @@ const M = class M {
|
|
|
147
159
|
* @param equals - Optional equality function to determine if two mapped values are equal.
|
|
148
160
|
* @returns - A new Computed instance with the mapped value.
|
|
149
161
|
*/
|
|
150
|
-
o(this, "map", (e,
|
|
151
|
-
const r = new
|
|
162
|
+
o(this, "map", (e, t = (r, n) => r === n) => {
|
|
163
|
+
const r = new L(() => {
|
|
152
164
|
try {
|
|
153
165
|
return e(this.get());
|
|
154
166
|
} catch (n) {
|
|
155
167
|
throw console.error("Error in Signal.map:", n), n;
|
|
156
168
|
}
|
|
157
|
-
},
|
|
169
|
+
}, t);
|
|
158
170
|
return this.setDerivative(r), r;
|
|
159
171
|
});
|
|
160
172
|
/**
|
|
@@ -167,14 +179,14 @@ const M = class M {
|
|
|
167
179
|
* Defaults to a strict equality check (===).
|
|
168
180
|
* @returns A new Signal that emits the values of the resulting Signal.
|
|
169
181
|
*/
|
|
170
|
-
o(this, "flatMap", (e,
|
|
171
|
-
const r = new
|
|
182
|
+
o(this, "flatMap", (e, t = (r, n) => r === n) => {
|
|
183
|
+
const r = new L(() => {
|
|
172
184
|
try {
|
|
173
185
|
return e(this.get()).get();
|
|
174
186
|
} catch (n) {
|
|
175
187
|
throw console.error("Error in Signal.flatMap:", n), n;
|
|
176
188
|
}
|
|
177
|
-
},
|
|
189
|
+
}, t);
|
|
178
190
|
return this.setDerivative(r), r;
|
|
179
191
|
});
|
|
180
192
|
/**
|
|
@@ -183,21 +195,21 @@ const M = class M {
|
|
|
183
195
|
* @param fn - The callback function to be invoked with the current value of the signal.
|
|
184
196
|
* @returns A new signal that emits the same value as the original signal and invokes the callback function.
|
|
185
197
|
*/
|
|
186
|
-
o(this, "tap", (e) => this.map((
|
|
198
|
+
o(this, "tap", (e) => this.map((t) => (e(t), t)));
|
|
187
199
|
/**
|
|
188
200
|
* Returns a new Signal that emits the value at the specified key of the current value.
|
|
189
201
|
*
|
|
190
202
|
* @param key - The key of the value to retrieve.
|
|
191
203
|
* @returns A new Signal that emits the value at the specified key.
|
|
192
204
|
*/
|
|
193
|
-
o(this, "at", (e) => this.map((
|
|
205
|
+
o(this, "at", (e) => this.map((t) => t[e]));
|
|
194
206
|
/**
|
|
195
207
|
* @internal
|
|
196
208
|
*/
|
|
197
209
|
o(this, "_$");
|
|
198
|
-
o(this, "filter", (e,
|
|
199
|
-
let r =
|
|
200
|
-
const n = new
|
|
210
|
+
o(this, "filter", (e, t) => {
|
|
211
|
+
let r = t ?? this.get();
|
|
212
|
+
const n = new L(() => {
|
|
201
213
|
try {
|
|
202
214
|
const i = this.get();
|
|
203
215
|
return r = e(i) ? i : r;
|
|
@@ -217,9 +229,9 @@ const M = class M {
|
|
|
217
229
|
* @param equals - Optional equality function to determine if two values are equal.
|
|
218
230
|
* @returns - A new Computed object with the mapped and filtered values.
|
|
219
231
|
*/
|
|
220
|
-
o(this, "filterMap", (e,
|
|
221
|
-
let n =
|
|
222
|
-
const i = new
|
|
232
|
+
o(this, "filterMap", (e, t, r = (n, i) => n === i) => {
|
|
233
|
+
let n = t;
|
|
234
|
+
const i = new L(() => {
|
|
223
235
|
try {
|
|
224
236
|
const l = this.get(), c = e(l);
|
|
225
237
|
return n = c ?? n;
|
|
@@ -242,8 +254,8 @@ const M = class M {
|
|
|
242
254
|
* @param equals - The equality function to compare the mapped values for equality.
|
|
243
255
|
* @returns A property that holds the mapped value and can be observed for changes.
|
|
244
256
|
*/
|
|
245
|
-
o(this, "mapAsync", (e,
|
|
246
|
-
const i =
|
|
257
|
+
o(this, "mapAsync", (e, t, r, n = (i, l) => i === l) => {
|
|
258
|
+
const i = E(t, n);
|
|
247
259
|
let l = 0, c = new AbortController();
|
|
248
260
|
return i.onDispose(
|
|
249
261
|
this.on(async (a) => {
|
|
@@ -272,23 +284,33 @@ const M = class M {
|
|
|
272
284
|
* @param alt - The alternative value to use when the mapped value is `undefined` or `null`.
|
|
273
285
|
* @returns A new signal containing the mapped values.
|
|
274
286
|
*/
|
|
275
|
-
o(this, "mapMaybe", (e,
|
|
287
|
+
o(this, "mapMaybe", (e, t) => this.map((r) => e(r) ?? t));
|
|
276
288
|
/**
|
|
277
289
|
* Feeds a property into the signal and sets up disposal behavior.
|
|
278
290
|
* @param prop - The property to feed into the signal.
|
|
279
291
|
* @param autoDisposeProp - Determines whether the property should be automatically disposed when the signal is disposed.
|
|
280
292
|
* @returns The input property.
|
|
281
293
|
*/
|
|
282
|
-
o(this, "feedProp", (e,
|
|
294
|
+
o(this, "feedProp", (e, t = !1) => {
|
|
283
295
|
const r = this.on(e.set);
|
|
284
|
-
return e.onDispose(r),
|
|
296
|
+
return e.onDispose(r), t ? this.onDispose(e.dispose) : this.onDispose(r), e;
|
|
285
297
|
});
|
|
286
298
|
/**
|
|
287
299
|
* Derives a new property from the current signal.
|
|
288
|
-
* @param
|
|
300
|
+
* @param options - The options for the derived property.
|
|
301
|
+
* @param options.autoDisposeProp - Determines whether the derived property should be automatically disposed.
|
|
302
|
+
* @param options.equals - A function that determines if two values are equal.
|
|
289
303
|
* @returns The derived property.
|
|
290
304
|
*/
|
|
291
|
-
o(this, "deriveProp", (
|
|
305
|
+
o(this, "deriveProp", ({
|
|
306
|
+
autoDisposeProp: e = !0,
|
|
307
|
+
equals: t
|
|
308
|
+
} = {}) => this.feedProp(E(this.get(), t), e));
|
|
309
|
+
/**
|
|
310
|
+
* Derives a new signal from the current signal. Useful to create a new signal that emits the same values as the current signal but can be disposed independently.
|
|
311
|
+
* @returns A new signal that emits the same values as the current signal.
|
|
312
|
+
*/
|
|
313
|
+
o(this, "derive", () => this.map((e) => e));
|
|
292
314
|
/**
|
|
293
315
|
* Returns a signal that emits the count of values received so far.
|
|
294
316
|
* @returns A signal that emits the count of values received so far.
|
|
@@ -311,7 +333,7 @@ const M = class M {
|
|
|
311
333
|
);
|
|
312
334
|
}), e.onDispose(this.on(e.setDirty)), this.onDispose(e.dispose);
|
|
313
335
|
});
|
|
314
|
-
this.equals =
|
|
336
|
+
this.equals = t, this._value = e;
|
|
315
337
|
}
|
|
316
338
|
/**
|
|
317
339
|
* Gets the value of the signal.
|
|
@@ -326,7 +348,7 @@ const M = class M {
|
|
|
326
348
|
*/
|
|
327
349
|
get $() {
|
|
328
350
|
return this._$ !== void 0 ? this._$ : this._$ = new Proxy(this, {
|
|
329
|
-
get: (e,
|
|
351
|
+
get: (e, t) => this.at(t)
|
|
330
352
|
});
|
|
331
353
|
}
|
|
332
354
|
};
|
|
@@ -340,8 +362,8 @@ const M = class M {
|
|
|
340
362
|
* @param equals - A function to compare two values of type O for equality. Defaults to strict equality (===).
|
|
341
363
|
* @returns - A Signal that represents the result of the Promise.
|
|
342
364
|
*/
|
|
343
|
-
o(
|
|
344
|
-
const i = new
|
|
365
|
+
o(H, "ofPromise", (e, t, r, n = (i, l) => i === l) => {
|
|
366
|
+
const i = new H(t, n);
|
|
345
367
|
return e.then((l) => i._setAndNotify(l, !1)).catch((l) => {
|
|
346
368
|
r != null ? i._setAndNotify(r(l), !1) : console.error(
|
|
347
369
|
"Unhandled promise rejection in Signal.ofPromise:",
|
|
@@ -354,19 +376,19 @@ o(M, "ofPromise", (e, s, r, n = (i, l) => i === l) => {
|
|
|
354
376
|
* @param value - The value to check.
|
|
355
377
|
* @returns `true` if the value is a Signal, `false` otherwise.
|
|
356
378
|
*/
|
|
357
|
-
o(
|
|
379
|
+
o(H, "is", (e) => (
|
|
358
380
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
359
381
|
e != null && e.$__signal__ === !0
|
|
360
382
|
));
|
|
361
|
-
let d =
|
|
362
|
-
const
|
|
363
|
-
class
|
|
383
|
+
let d = H;
|
|
384
|
+
const Fe = typeof queueMicrotask == "function" ? queueMicrotask : (s) => Promise.resolve().then(s);
|
|
385
|
+
class L extends d {
|
|
364
386
|
/**
|
|
365
387
|
* Represents a Signal object.
|
|
366
388
|
* @param _fn - The function that returns the value of the signal.
|
|
367
389
|
* @param equals - The function used to compare two values of type T for equality.
|
|
368
390
|
*/
|
|
369
|
-
constructor(
|
|
391
|
+
constructor(t, r) {
|
|
370
392
|
super(void 0, r);
|
|
371
393
|
/**
|
|
372
394
|
* @internal
|
|
@@ -382,7 +404,7 @@ class v extends d {
|
|
|
382
404
|
* It also marks all dependent signals as dirty and schedules a notification to update their values.
|
|
383
405
|
*/
|
|
384
406
|
o(this, "setDirty", () => {
|
|
385
|
-
this._isDirty || this._disposed || (this._isDirty = !0, this._derivatives.forEach((
|
|
407
|
+
this._isDirty || this._disposed || (this._isDirty = !0, this._derivatives.forEach((t) => t.setDirty()), this._scheduleNotify());
|
|
386
408
|
});
|
|
387
409
|
/**
|
|
388
410
|
* @internal
|
|
@@ -394,14 +416,14 @@ class v extends d {
|
|
|
394
416
|
* @internal
|
|
395
417
|
*/
|
|
396
418
|
o(this, "_scheduleNotify", () => {
|
|
397
|
-
const
|
|
398
|
-
|
|
399
|
-
this._scheduleCount !==
|
|
419
|
+
const t = ++this._scheduleCount;
|
|
420
|
+
Fe(() => {
|
|
421
|
+
this._scheduleCount !== t || this._disposed !== !1 || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn(), !1));
|
|
400
422
|
});
|
|
401
423
|
});
|
|
402
424
|
/** {@inheritDoc Signal.get} */
|
|
403
|
-
o(this, "get", () => (this._isDirty && (this._isDirty = !1, this.
|
|
404
|
-
this._fn =
|
|
425
|
+
o(this, "get", () => (this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn(), !0)), this._value));
|
|
426
|
+
this._fn = t, this.setDirty();
|
|
405
427
|
}
|
|
406
428
|
/**
|
|
407
429
|
* Checks if a value is an instance of `Computed`.
|
|
@@ -409,15 +431,15 @@ class v extends d {
|
|
|
409
431
|
* @param value - The value to check.
|
|
410
432
|
* @returns `true` if the value is an instance of `Computed`, `false` otherwise.
|
|
411
433
|
*/
|
|
412
|
-
static is(
|
|
413
|
-
return
|
|
434
|
+
static is(t) {
|
|
435
|
+
return t != null && t.$__computed__ === !0;
|
|
414
436
|
}
|
|
415
437
|
/** {@inheritDoc Signal.value} */
|
|
416
438
|
get value() {
|
|
417
439
|
return this.get();
|
|
418
440
|
}
|
|
419
441
|
}
|
|
420
|
-
const
|
|
442
|
+
const U = class U extends d {
|
|
421
443
|
constructor() {
|
|
422
444
|
super(...arguments);
|
|
423
445
|
/**
|
|
@@ -429,15 +451,15 @@ const W = class W extends d {
|
|
|
429
451
|
*
|
|
430
452
|
* @param value - The new value of the property.
|
|
431
453
|
*/
|
|
432
|
-
o(this, "set", (
|
|
433
|
-
this._setAndNotify(
|
|
454
|
+
o(this, "set", (t) => {
|
|
455
|
+
this._setAndNotify(t, !1);
|
|
434
456
|
});
|
|
435
457
|
/**
|
|
436
458
|
* Updates the value of the signal by applying the provided function to the current value.
|
|
437
459
|
* @param fn - The function to apply to the current value.
|
|
438
460
|
*/
|
|
439
|
-
o(this, "update", (
|
|
440
|
-
this._setAndNotify(
|
|
461
|
+
o(this, "update", (t) => {
|
|
462
|
+
this._setAndNotify(t(this.get()), !1);
|
|
441
463
|
});
|
|
442
464
|
/**
|
|
443
465
|
* Creates a reducer function that combines the provided reducer function and effects.
|
|
@@ -445,11 +467,11 @@ const W = class W extends d {
|
|
|
445
467
|
* @param effects - An array of effects to be executed after the state is updated.
|
|
446
468
|
* @returns A dispatch function that can be used to update the state and trigger the effects.
|
|
447
469
|
*/
|
|
448
|
-
o(this, "reducer", (
|
|
470
|
+
o(this, "reducer", (t, ...r) => {
|
|
449
471
|
const n = this;
|
|
450
472
|
return function i(l) {
|
|
451
473
|
const c = n.value;
|
|
452
|
-
n.update((a) =>
|
|
474
|
+
n.update((a) => t(a, l)), !n.equals(c, n.value) && r.forEach(
|
|
453
475
|
(a) => a({
|
|
454
476
|
previousState: c,
|
|
455
477
|
state: n.value,
|
|
@@ -470,9 +492,9 @@ const W = class W extends d {
|
|
|
470
492
|
* Defaults to a strict equality check (===).
|
|
471
493
|
* @returns A Prop object representing the isomorphism.
|
|
472
494
|
*/
|
|
473
|
-
o(this, "iso", (
|
|
474
|
-
const i = new
|
|
475
|
-
return i.onDispose(this.on((l) => i.set(
|
|
495
|
+
o(this, "iso", (t, r, n = (i, l) => i === l) => {
|
|
496
|
+
const i = new U(t(this.get()), n);
|
|
497
|
+
return i.onDispose(this.on((l) => i.set(t(l)))), i.on((l) => this._setAndNotify(r(l), !1)), i;
|
|
476
498
|
});
|
|
477
499
|
/**
|
|
478
500
|
* Returns a `Prop` that represents the value at the specified key of the current value.
|
|
@@ -480,9 +502,9 @@ const W = class W extends d {
|
|
|
480
502
|
* @param key - The key of the value to access.
|
|
481
503
|
* @returns A `Prop` that represents the value at the specified key.
|
|
482
504
|
*/
|
|
483
|
-
o(this, "atProp", (
|
|
484
|
-
(r) => r[
|
|
485
|
-
(r) => ({ ...this.value, [
|
|
505
|
+
o(this, "atProp", (t) => this.iso(
|
|
506
|
+
(r) => r[t],
|
|
507
|
+
(r) => ({ ...this.value, [t]: r })
|
|
486
508
|
));
|
|
487
509
|
}
|
|
488
510
|
/**
|
|
@@ -491,8 +513,8 @@ const W = class W extends d {
|
|
|
491
513
|
get value() {
|
|
492
514
|
return this.get();
|
|
493
515
|
}
|
|
494
|
-
set value(
|
|
495
|
-
this._setAndNotify(
|
|
516
|
+
set value(t) {
|
|
517
|
+
this._setAndNotify(t, !1);
|
|
496
518
|
}
|
|
497
519
|
};
|
|
498
520
|
/**
|
|
@@ -500,15 +522,30 @@ const W = class W extends d {
|
|
|
500
522
|
* @param value - The value to check.
|
|
501
523
|
* @returns `true` if the value is a Prop, `false` otherwise.
|
|
502
524
|
*/
|
|
503
|
-
o(
|
|
525
|
+
o(U, "is", (t) => (
|
|
504
526
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
505
|
-
|
|
527
|
+
t != null && t.$__prop__ === !0
|
|
506
528
|
));
|
|
507
|
-
let
|
|
508
|
-
const
|
|
509
|
-
const r = new
|
|
529
|
+
let R = U;
|
|
530
|
+
const z = (s, e, t = (r, n) => r === n) => {
|
|
531
|
+
const r = new L(s, t);
|
|
510
532
|
return e.forEach((n) => n.setDerivative(r)), r;
|
|
511
|
-
},
|
|
533
|
+
}, Be = (s, e, t = {}) => {
|
|
534
|
+
let r = t.once ? () => {
|
|
535
|
+
i(), s();
|
|
536
|
+
} : s;
|
|
537
|
+
if (t.skipInitial) {
|
|
538
|
+
let l = !1;
|
|
539
|
+
const c = r;
|
|
540
|
+
r = () => {
|
|
541
|
+
l ? c() : l = !0;
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
const n = z(r, e), i = () => {
|
|
545
|
+
n.dispose(), t.abortSignal != null && t.abortSignal.removeEventListener("abort", i);
|
|
546
|
+
};
|
|
547
|
+
return t.abortSignal != null && t.abortSignal.addEventListener("abort", i), i;
|
|
548
|
+
}, E = (s, e = (t, r) => t === r) => new R(s, e), W = (s, e = (t, r) => t === r) => new d(s, e), oe = () => typeof window < "u" ? window : void 0, y = {
|
|
512
549
|
/**
|
|
513
550
|
* Maps a value or a Signal to a new value.
|
|
514
551
|
* If the value is a Signal, it returns a new Signal with the mapped value.
|
|
@@ -520,7 +557,7 @@ const Q = (t, e, s = (r, n) => r === n) => {
|
|
|
520
557
|
* @param fn - The function to map the value.
|
|
521
558
|
* @returns The mapped value.
|
|
522
559
|
*/
|
|
523
|
-
map: (
|
|
560
|
+
map: (s, e) => d.is(s) ? s.map(e) : e(s),
|
|
524
561
|
/**
|
|
525
562
|
* Wraps a value or a Signal instance into a Signal.
|
|
526
563
|
* If the value is already a Signal, it returns the value itself.
|
|
@@ -531,30 +568,30 @@ const Q = (t, e, s = (r, n) => r === n) => {
|
|
|
531
568
|
* @param equals - A function that determines if two values are equal. Defaults to strict equality (===).
|
|
532
569
|
* @returns A Signal instance.
|
|
533
570
|
*/
|
|
534
|
-
toSignal: (
|
|
571
|
+
toSignal: (s, e) => d.is(s) ? s : W(s, e),
|
|
535
572
|
/**
|
|
536
573
|
* Wraps a value in a `Signal` if it is not already a `Signal`.
|
|
537
574
|
* If the value is `null` or `undefined`, it returns `null` or `undefined` respectively.
|
|
538
575
|
* @param value - The value to wrap or check.
|
|
539
576
|
* @returns The wrapped value if it is not `null` or `undefined`, otherwise `null` or `undefined`.
|
|
540
577
|
*/
|
|
541
|
-
maybeToSignal: (
|
|
542
|
-
if (
|
|
543
|
-
return
|
|
578
|
+
maybeToSignal: (s, e) => {
|
|
579
|
+
if (s != null)
|
|
580
|
+
return y.toSignal(s, e);
|
|
544
581
|
},
|
|
545
582
|
/**
|
|
546
583
|
* Gets the value from a `Signal` or the value itself if it is not a `Signal`.
|
|
547
584
|
* @param value - The value or Signal instance to get the value from.
|
|
548
585
|
* @returns The value.
|
|
549
586
|
*/
|
|
550
|
-
get: (
|
|
587
|
+
get: (s) => d.is(s) ? s.get() : s,
|
|
551
588
|
/**
|
|
552
589
|
* Adds a listener to a `Signal` or calls the listener immediately if it is not a `Signal`.
|
|
553
590
|
* @param value - The value or Signal instance to add the listener to.
|
|
554
591
|
* @param listener - The listener to call when the value changes.
|
|
555
592
|
* @returns A function to remove the listener.
|
|
556
593
|
*/
|
|
557
|
-
on: (
|
|
594
|
+
on: (s, e) => d.is(s) ? s.on(e) : (e(s), () => {
|
|
558
595
|
}),
|
|
559
596
|
/**
|
|
560
597
|
* Disposes of a value or a Signal.
|
|
@@ -562,21 +599,39 @@ const Q = (t, e, s = (r, n) => r === n) => {
|
|
|
562
599
|
* If the value is not a Signal, it does nothing.
|
|
563
600
|
* @param value - The value or Signal instance to dispose of.
|
|
564
601
|
*/
|
|
565
|
-
dispose: (
|
|
566
|
-
d.is(
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
602
|
+
dispose: (s) => {
|
|
603
|
+
d.is(s) && s.dispose();
|
|
604
|
+
},
|
|
605
|
+
/**
|
|
606
|
+
* Derives a Prop from a Signal.
|
|
607
|
+
* If the value is a Signal, it returns a new Prop with the derived value.
|
|
608
|
+
* If the value is not a Signal, it returns a new Prop with the value.
|
|
609
|
+
* @param value - The value or Signal instance to derive the Prop from.
|
|
610
|
+
* @param options - The options for the derived Prop.
|
|
611
|
+
* @param options.autoDisposeProp - Determines whether the derived Prop should be automatically disposed.
|
|
612
|
+
* @param options.equals - A function that determines if two values are equal.
|
|
613
|
+
* @returns A Prop instance.
|
|
614
|
+
*/
|
|
615
|
+
deriveProp: (s, {
|
|
616
|
+
autoDisposeProp: e = !0,
|
|
617
|
+
equals: t
|
|
618
|
+
} = {}) => d.is(s) ? s.deriveProp({ autoDisposeProp: e, equals: t }) : E(s, t)
|
|
619
|
+
}, Ht = (...s) => (e, t) => {
|
|
620
|
+
const r = s.filter((n) => d.is(n));
|
|
621
|
+
return z(
|
|
622
|
+
() => e(...s.map((n) => y.get(n))),
|
|
572
623
|
r,
|
|
573
|
-
|
|
624
|
+
t
|
|
625
|
+
);
|
|
626
|
+
}, $t = (...s) => (e, t = {}) => {
|
|
627
|
+
const r = s.filter((n) => d.is(n));
|
|
628
|
+
return Be(
|
|
629
|
+
() => e(...s.map(y.get)),
|
|
630
|
+
r,
|
|
631
|
+
t
|
|
574
632
|
);
|
|
575
|
-
}, kt = (...t) => (e) => {
|
|
576
|
-
const s = t.filter((r) => d.is(r));
|
|
577
|
-
Fe(() => e(...t.map(p.get)), s);
|
|
578
633
|
};
|
|
579
|
-
class
|
|
634
|
+
class le {
|
|
580
635
|
constructor() {
|
|
581
636
|
o(this, "_store", /* @__PURE__ */ new Map());
|
|
582
637
|
/**
|
|
@@ -590,81 +645,81 @@ class oe {
|
|
|
590
645
|
* @param key - The key to set the value for.
|
|
591
646
|
* @param value - The value to set.
|
|
592
647
|
*/
|
|
593
|
-
o(this, "setItem", (e,
|
|
594
|
-
this._store.set(e,
|
|
648
|
+
o(this, "setItem", (e, t) => {
|
|
649
|
+
this._store.set(e, t);
|
|
595
650
|
});
|
|
596
651
|
}
|
|
597
652
|
}
|
|
598
|
-
const
|
|
599
|
-
key:
|
|
653
|
+
const ce = ({
|
|
654
|
+
key: s,
|
|
600
655
|
defaultValue: e,
|
|
601
|
-
store:
|
|
656
|
+
store: t,
|
|
602
657
|
serialize: r = JSON.stringify,
|
|
603
658
|
deserialize: n = JSON.parse,
|
|
604
659
|
equals: i = (c, a) => c === a,
|
|
605
660
|
onLoad: l = (c) => c
|
|
606
661
|
}) => {
|
|
607
|
-
const c =
|
|
662
|
+
const c = t.getItem(s), a = new R(
|
|
608
663
|
c != null ? l(n(c)) : typeof e == "function" ? e() : e,
|
|
609
664
|
i
|
|
610
665
|
);
|
|
611
666
|
return a.on((u) => {
|
|
612
|
-
|
|
667
|
+
t.setItem(s, r(u));
|
|
613
668
|
}), a;
|
|
614
|
-
},
|
|
669
|
+
}, kt = (s) => {
|
|
615
670
|
var e;
|
|
616
|
-
return
|
|
617
|
-
...
|
|
618
|
-
store: ((e =
|
|
671
|
+
return ce({
|
|
672
|
+
...s,
|
|
673
|
+
store: ((e = oe()) == null ? void 0 : e.localStorage) ?? new le()
|
|
619
674
|
});
|
|
620
|
-
},
|
|
675
|
+
}, It = (s) => {
|
|
621
676
|
var e;
|
|
622
|
-
return
|
|
623
|
-
...
|
|
624
|
-
store: ((e =
|
|
677
|
+
return ce({
|
|
678
|
+
...s,
|
|
679
|
+
store: ((e = oe()) == null ? void 0 : e.sessionStorage) ?? new le()
|
|
625
680
|
});
|
|
626
681
|
};
|
|
627
|
-
function
|
|
628
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(
|
|
682
|
+
function ie(s) {
|
|
683
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(s) : setTimeout(s, 0);
|
|
629
684
|
}
|
|
630
|
-
const Ue = (
|
|
631
|
-
const n = (r == null ? void 0 : r.duration) ?? 300, i = (r == null ? void 0 : r.easing) ?? ((
|
|
632
|
-
let c = r == null ? void 0 : r.interpolate, a =
|
|
633
|
-
const
|
|
634
|
-
|
|
685
|
+
const Ue = (s, e, t, r) => {
|
|
686
|
+
const n = (r == null ? void 0 : r.duration) ?? 300, i = (r == null ? void 0 : r.easing) ?? ((A) => A), l = (r == null ? void 0 : r.equals) ?? ((A, I) => A === I);
|
|
687
|
+
let c = r == null ? void 0 : r.interpolate, a = s, u = e(), h = performance.now(), m = null, b = !0;
|
|
688
|
+
const p = new L(e, l), g = E(s, l);
|
|
689
|
+
g.onDispose(() => {
|
|
635
690
|
m !== null && cancelAnimationFrame(m);
|
|
636
|
-
}),
|
|
637
|
-
|
|
691
|
+
}), g.onDispose(p.dispose), t.forEach((A) => {
|
|
692
|
+
A.setDerivative(p), A.onDispose(g.dispose);
|
|
638
693
|
});
|
|
639
|
-
const
|
|
640
|
-
u =
|
|
694
|
+
const w = (A) => {
|
|
695
|
+
u = A, h = performance.now(), a = g.value, b && (b = !1, m = ie(K));
|
|
641
696
|
}, K = () => {
|
|
642
|
-
const I = (performance.now() - h) /
|
|
643
|
-
c == null && (c =
|
|
697
|
+
const I = (performance.now() - h) / y.get(n), $e = i(I);
|
|
698
|
+
c == null && (c = qe(a));
|
|
644
699
|
let ee = c(a, u, $e);
|
|
645
|
-
I >= 1 ? (
|
|
700
|
+
I >= 1 ? (b = !0, ee = u) : m = ie(K), g.set(ee);
|
|
646
701
|
};
|
|
647
|
-
return
|
|
648
|
-
},
|
|
649
|
-
const { initialValue:
|
|
702
|
+
return p.on(w), g;
|
|
703
|
+
}, Rt = (s, e) => {
|
|
704
|
+
const { initialValue: t, ...r } = e ?? {};
|
|
650
705
|
return Ue(
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
[
|
|
706
|
+
t ?? s.get(),
|
|
707
|
+
s.get,
|
|
708
|
+
[s],
|
|
654
709
|
r
|
|
655
710
|
);
|
|
656
|
-
},
|
|
657
|
-
const { signals:
|
|
711
|
+
}, Nt = (s, e) => {
|
|
712
|
+
const { signals: t, literals: r } = Object.entries(s).reduce(
|
|
658
713
|
({ signals: i, literals: l }, [c, a]) => (d.is(a) ? i.push([c, a]) : l[c] = a, { signals: i, literals: l }),
|
|
659
714
|
{ signals: [], literals: {} }
|
|
660
|
-
), n =
|
|
661
|
-
return
|
|
662
|
-
},
|
|
715
|
+
), n = t.map(([, i]) => i);
|
|
716
|
+
return z(() => (t.forEach(([i, l]) => r[i] = l.value), e(r)), n);
|
|
717
|
+
}, ae = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), ue = /* @__PURE__ */ new Set(["selected"]), he = /* @__PURE__ */ new Set([
|
|
663
718
|
"rowSpan",
|
|
664
719
|
"colSpan",
|
|
665
720
|
"tabIndex",
|
|
666
721
|
"valueAsNumber"
|
|
667
|
-
]),
|
|
722
|
+
]), fe = /* @__PURE__ */ new Set(["valueAsDate"]), de = /* @__PURE__ */ new Set([
|
|
668
723
|
"value",
|
|
669
724
|
"textContent",
|
|
670
725
|
"innerText",
|
|
@@ -672,26 +727,28 @@ const Ue = (t, e, s, r) => {
|
|
|
672
727
|
"outerHTML",
|
|
673
728
|
"className",
|
|
674
729
|
"classList"
|
|
675
|
-
]), We = (
|
|
676
|
-
|
|
677
|
-
} : ae.has(
|
|
678
|
-
|
|
679
|
-
} :
|
|
680
|
-
|
|
681
|
-
} :
|
|
682
|
-
|
|
683
|
-
} : (s) => {
|
|
684
|
-
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
730
|
+
]), We = (s, e) => ue.has(s) ? (t) => {
|
|
731
|
+
t == null || t !== !0 ? e.removeAttribute(s) : e.setAttribute(s, "");
|
|
732
|
+
} : ae.has(s) ? (t) => {
|
|
733
|
+
t == null ? e[s] = null : e[s] = !!t;
|
|
734
|
+
} : he.has(s) ? (t) => {
|
|
735
|
+
t == null ? e[s] = null : e[s] = Number(t);
|
|
736
|
+
} : fe.has(s) ? (t) => {
|
|
737
|
+
t == null ? e[s] = null : e[s] = t;
|
|
738
|
+
} : de.has(s) ? (t) => {
|
|
739
|
+
t == null ? e[s] = null : e[s] = String(t);
|
|
740
|
+
} : (t) => {
|
|
741
|
+
t == null ? e.removeAttribute(s) : e.setAttribute(s, t);
|
|
742
|
+
}, Je = (s, e) => ue.has(s) ? () => e.hasAttribute(s) : ae.has(s) ? () => !!e[s] : he.has(s) ? () => Number(e[s]) : fe.has(s) ? () => e[s] : de.has(s) ? () => String(e[s]) : () => e.getAttribute(s), N = (s) => {
|
|
743
|
+
const e = s;
|
|
744
|
+
e && e.onblur && (e.onblur = null), !(!s || s.ownerDocument === void 0) && s.parentElement && s.parentElement.removeChild(s);
|
|
745
|
+
}, Ge = (s) => pe(s) ? s : s.parentElement, pe = (s) => s.nodeType === 1;
|
|
746
|
+
class ge extends Error {
|
|
690
747
|
constructor(e) {
|
|
691
748
|
super(`Provider not found: ${e.description}`);
|
|
692
749
|
}
|
|
693
750
|
}
|
|
694
|
-
class
|
|
751
|
+
class x {
|
|
695
752
|
/**
|
|
696
753
|
* Constructs a new `DOMContext` instance.
|
|
697
754
|
*
|
|
@@ -701,7 +758,7 @@ class P {
|
|
|
701
758
|
* @param providers - The `Providers` instance associated with this context.
|
|
702
759
|
* @param isFirstLevel - A boolean value indicating whether this context is at the first level, meaning the outermost node in the generated DOM.
|
|
703
760
|
*/
|
|
704
|
-
constructor(e,
|
|
761
|
+
constructor(e, t, r, n) {
|
|
705
762
|
/**
|
|
706
763
|
* Creates a new DOM element (eg: HTML or SVG) with the specified tag name and namespace.
|
|
707
764
|
*
|
|
@@ -709,7 +766,7 @@ class P {
|
|
|
709
766
|
* @param namespace - The namespace URI to create the element in, or `undefined` to create a standard HTML element.
|
|
710
767
|
* @returns The newly created element.
|
|
711
768
|
*/
|
|
712
|
-
o(this, "createElement", (e,
|
|
769
|
+
o(this, "createElement", (e, t) => t !== void 0 ? this.document.createElementNS(t, e) : this.document.createElement(e));
|
|
713
770
|
/**
|
|
714
771
|
* Creates a new DOM element (eg: HTML or SVG) with the specified tag name and namespace and appends it to the current element.
|
|
715
772
|
*
|
|
@@ -717,8 +774,8 @@ class P {
|
|
|
717
774
|
* @param namespace - The namespace URI to create the element in, or `undefined` to create a standard HTML element.
|
|
718
775
|
* @returns The newly created element.
|
|
719
776
|
*/
|
|
720
|
-
o(this, "makeChildElement", (e,
|
|
721
|
-
const r = this.createElement(e,
|
|
777
|
+
o(this, "makeChildElement", (e, t) => {
|
|
778
|
+
const r = this.createElement(e, t);
|
|
722
779
|
return this.appendOrInsert(r), this.withElement(r);
|
|
723
780
|
});
|
|
724
781
|
/**
|
|
@@ -733,8 +790,8 @@ class P {
|
|
|
733
790
|
* @returns A new `DOMContext` with a reference to the new text node.
|
|
734
791
|
*/
|
|
735
792
|
o(this, "makeChildText", (e) => {
|
|
736
|
-
const
|
|
737
|
-
return this.appendOrInsert(
|
|
793
|
+
const t = this.createText(e);
|
|
794
|
+
return this.appendOrInsert(t), this.withReference(t);
|
|
738
795
|
});
|
|
739
796
|
/**
|
|
740
797
|
* Sets the text content of the current element.
|
|
@@ -773,17 +830,17 @@ class P {
|
|
|
773
830
|
* @param element - The DOM element to use in the new `DOMContext` instance.
|
|
774
831
|
* @returns A new `DOMContext` instance with the provided `element`.
|
|
775
832
|
*/
|
|
776
|
-
o(this, "withElement", (e) => new
|
|
833
|
+
o(this, "withElement", (e) => new x(this.document, e, void 0, this.providers));
|
|
777
834
|
/**
|
|
778
835
|
* Creates a new `DOMContext` instance with a reference to a DOM element selected by the provided `selector`.
|
|
779
836
|
* @param selector - The CSS selector for the target DOM element.
|
|
780
837
|
* @returns A new `DOMContext` instance with a reference to the selected DOM element.
|
|
781
838
|
*/
|
|
782
839
|
o(this, "makePortal", (e) => {
|
|
783
|
-
const
|
|
784
|
-
if (
|
|
840
|
+
const t = this.document.querySelector(e);
|
|
841
|
+
if (t == null)
|
|
785
842
|
throw new Error(`Cannot find element by selector for portal: ${e}`);
|
|
786
|
-
return this.withElement(
|
|
843
|
+
return this.withElement(t);
|
|
787
844
|
});
|
|
788
845
|
/**
|
|
789
846
|
* Creates a new `DOMContext` instance with the specified reference.
|
|
@@ -791,7 +848,7 @@ class P {
|
|
|
791
848
|
* @param reference - The optional `Text` node to use as the reference for the new `DOMContext`.
|
|
792
849
|
* @returns A new `DOMContext` instance with the specified reference.
|
|
793
850
|
*/
|
|
794
|
-
o(this, "withReference", (e) => new
|
|
851
|
+
o(this, "withReference", (e) => new x(this.document, this.element, e, this.providers));
|
|
795
852
|
/**
|
|
796
853
|
* Returns a new HTMLDOMContext instance with the specified providers merged into
|
|
797
854
|
* the existing providers.
|
|
@@ -799,7 +856,7 @@ class P {
|
|
|
799
856
|
* @param providers - An object containing the providers to be merged into the existing providers.
|
|
800
857
|
* @returns A new HTMLDOMContext instance with the merged providers.
|
|
801
858
|
*/
|
|
802
|
-
o(this, "withProviders", (e) => new
|
|
859
|
+
o(this, "withProviders", (e) => new x(this.document, this.element, this.reference, {
|
|
803
860
|
...this.providers,
|
|
804
861
|
...e
|
|
805
862
|
}));
|
|
@@ -812,11 +869,11 @@ class P {
|
|
|
812
869
|
*/
|
|
813
870
|
o(this, "getProvider", (e) => {
|
|
814
871
|
if (this.providers[e] === void 0)
|
|
815
|
-
throw new
|
|
872
|
+
throw new ge(e);
|
|
816
873
|
return this.providers[e];
|
|
817
874
|
});
|
|
818
875
|
o(this, "clear", (e) => {
|
|
819
|
-
e && (this.reference !== void 0 ?
|
|
876
|
+
e && (this.reference !== void 0 ? N(this.reference) : N(this.element));
|
|
820
877
|
});
|
|
821
878
|
/**
|
|
822
879
|
* Adds classes to the element.
|
|
@@ -841,10 +898,15 @@ class P {
|
|
|
841
898
|
* Adds an event listener to the element.
|
|
842
899
|
* @param event - The event to listen for.
|
|
843
900
|
* @param listener - The listener to call when the event occurs.
|
|
901
|
+
* @param options - The options for the event listener.
|
|
844
902
|
* @returns A function to remove the event listener.
|
|
845
903
|
*/
|
|
846
|
-
o(this, "on", (e,
|
|
847
|
-
|
|
904
|
+
o(this, "on", (e, t, r) => (this.element.addEventListener(e, t, r), (n) => {
|
|
905
|
+
n && this.element.removeEventListener(
|
|
906
|
+
e,
|
|
907
|
+
t,
|
|
908
|
+
r
|
|
909
|
+
);
|
|
848
910
|
}));
|
|
849
911
|
/**
|
|
850
912
|
* Returns `true` if the context is a browser DOM context.
|
|
@@ -861,20 +923,20 @@ class P {
|
|
|
861
923
|
* @param name - The name of the style to set.
|
|
862
924
|
* @param value - The value of the style to set.
|
|
863
925
|
*/
|
|
864
|
-
o(this, "setStyle", (e,
|
|
865
|
-
this.element.style
|
|
926
|
+
o(this, "setStyle", (e, t) => {
|
|
927
|
+
this.element.style[e] = t;
|
|
866
928
|
});
|
|
867
929
|
/**
|
|
868
930
|
* Gets the style of the element.
|
|
869
931
|
* @param name - The name of the style to get.
|
|
870
932
|
* @returns The value of the style.
|
|
871
933
|
*/
|
|
872
|
-
o(this, "getStyle", (e) => this.element.style
|
|
934
|
+
o(this, "getStyle", (e) => this.element.style[e]);
|
|
873
935
|
o(this, "makeAccessors", (e) => ({
|
|
874
936
|
get: Je(e, this.element),
|
|
875
937
|
set: We(e, this.element)
|
|
876
938
|
}));
|
|
877
|
-
this.document = e, this.element =
|
|
939
|
+
this.document = e, this.element = t, this.reference = r, this.providers = n;
|
|
878
940
|
}
|
|
879
941
|
/**
|
|
880
942
|
* Creates a new `DOMContext` instance for the given `Element` and optional reference `Node`.
|
|
@@ -883,43 +945,43 @@ class P {
|
|
|
883
945
|
* @param ref - An optional reference `Node` to associate with the `DOMContext`.
|
|
884
946
|
* @returns A new `DOMContext` instance.
|
|
885
947
|
*/
|
|
886
|
-
static of(e,
|
|
887
|
-
return new
|
|
948
|
+
static of(e, t) {
|
|
949
|
+
return new x(e.ownerDocument, e, t, {});
|
|
888
950
|
}
|
|
889
951
|
}
|
|
890
|
-
const
|
|
891
|
-
const
|
|
892
|
-
return () =>
|
|
893
|
-
}, Vt = (
|
|
894
|
-
const n = typeof e == "string" ? (
|
|
952
|
+
const Q = (s, e) => {
|
|
953
|
+
const t = s(e);
|
|
954
|
+
return () => t(!0);
|
|
955
|
+
}, Vt = (s, e, { doc: t, clear: r } = {}) => {
|
|
956
|
+
const n = typeof e == "string" ? (t ?? document).querySelector(e) : e;
|
|
895
957
|
if (n === null)
|
|
896
|
-
throw new
|
|
958
|
+
throw new Xe(
|
|
897
959
|
`Cannot find element by selector for render: ${e}`
|
|
898
960
|
);
|
|
899
|
-
r !== !1 && (
|
|
900
|
-
const i = Ge(n), l =
|
|
901
|
-
return
|
|
902
|
-
},
|
|
961
|
+
r !== !1 && (t ?? n.ownerDocument) != null && n.nodeType === 1 && (n.innerHTML = "");
|
|
962
|
+
const i = Ge(n), l = pe(n) ? void 0 : n, c = x.of(i, l);
|
|
963
|
+
return Q(s, c);
|
|
964
|
+
}, jt = (s, {
|
|
903
965
|
startUrl: e = "https://example.com",
|
|
904
|
-
selector:
|
|
966
|
+
selector: t = ":root"
|
|
905
967
|
} = {}) => {
|
|
906
|
-
const r =
|
|
968
|
+
const r = y.toSignal(e).deriveProp(), n = new be(t, void 0), i = new O(n, void 0, { currentURL: r }, {});
|
|
907
969
|
return {
|
|
908
|
-
clear:
|
|
970
|
+
clear: Q(s(), i),
|
|
909
971
|
root: n,
|
|
910
972
|
currentURL: r
|
|
911
973
|
};
|
|
912
974
|
};
|
|
913
|
-
class
|
|
975
|
+
class Xe extends Error {
|
|
914
976
|
constructor(e) {
|
|
915
977
|
super(e);
|
|
916
978
|
}
|
|
917
979
|
}
|
|
918
|
-
const
|
|
919
|
-
class
|
|
980
|
+
const me = "data-tts-node", V = "data-tts-class", j = "data-tts-style", q = "data-tts-html", F = "data-tts-text", B = "data-tts-attrs";
|
|
981
|
+
class qt {
|
|
920
982
|
constructor({
|
|
921
983
|
select: e,
|
|
922
|
-
getAttribute:
|
|
984
|
+
getAttribute: t,
|
|
923
985
|
setAttribute: r,
|
|
924
986
|
getClass: n,
|
|
925
987
|
setClass: i,
|
|
@@ -929,54 +991,123 @@ class Ft {
|
|
|
929
991
|
getInnerHTML: u,
|
|
930
992
|
setInnerHTML: h,
|
|
931
993
|
getInnerText: m,
|
|
932
|
-
setInnerText:
|
|
994
|
+
setInnerText: b
|
|
933
995
|
}) {
|
|
996
|
+
/**
|
|
997
|
+
* Selects elements from the headless environment.
|
|
998
|
+
* @param selector - The selector to select elements from. The supported selectors are CSS selectors whose complexity depends on the adapter implementation.
|
|
999
|
+
* @returns An array of elements.
|
|
1000
|
+
*/
|
|
934
1001
|
o(this, "select");
|
|
1002
|
+
/**
|
|
1003
|
+
* Gets the value of an attribute from an element.
|
|
1004
|
+
* @param el - The element to get the attribute from.
|
|
1005
|
+
* @param attr - The attribute to get the value from.
|
|
1006
|
+
* @returns The value of the attribute or null if the attribute is not set.
|
|
1007
|
+
*/
|
|
935
1008
|
o(this, "getAttribute");
|
|
1009
|
+
/**
|
|
1010
|
+
* Sets the value of an attribute on an element.
|
|
1011
|
+
* @param el - The element to set the attribute on.
|
|
1012
|
+
* @param attr - The attribute to set the value of.
|
|
1013
|
+
* @param value - The value to set the attribute to.
|
|
1014
|
+
*/
|
|
936
1015
|
o(this, "setAttribute");
|
|
1016
|
+
/**
|
|
1017
|
+
* Gets the class of an element.
|
|
1018
|
+
* @param el - The element to get the class from.
|
|
1019
|
+
* @returns The class of the element or an empty string if the class is not set.
|
|
1020
|
+
*/
|
|
937
1021
|
o(this, "getClass");
|
|
1022
|
+
/**
|
|
1023
|
+
* Sets the class of an element.
|
|
1024
|
+
* @param el - The element to set the class on.
|
|
1025
|
+
* @param cls - The class to set.
|
|
1026
|
+
*/
|
|
938
1027
|
o(this, "setClass");
|
|
1028
|
+
/**
|
|
1029
|
+
* Gets the styles of an element.
|
|
1030
|
+
* @param el - The element to get the styles from.
|
|
1031
|
+
* @returns The styles of the element.
|
|
1032
|
+
*/
|
|
939
1033
|
o(this, "getStyles");
|
|
1034
|
+
/**
|
|
1035
|
+
* Sets the styles of an element.
|
|
1036
|
+
* @param el - The element to set the styles on.
|
|
1037
|
+
*/
|
|
940
1038
|
o(this, "setStyles");
|
|
1039
|
+
/**
|
|
1040
|
+
* Appends HTML to an element.
|
|
1041
|
+
* @param el - The element to append the HTML to.
|
|
1042
|
+
* @param html - The HTML to append.
|
|
1043
|
+
*/
|
|
941
1044
|
o(this, "appendHTML");
|
|
1045
|
+
/**
|
|
1046
|
+
* Gets the inner HTML of an element.
|
|
1047
|
+
* @param el - The element to get the inner HTML from.
|
|
1048
|
+
* @returns The inner HTML of the element or an empty string if the inner HTML is not set.
|
|
1049
|
+
*/
|
|
942
1050
|
o(this, "getInnerHTML");
|
|
1051
|
+
/**
|
|
1052
|
+
* Sets the inner HTML of an element.
|
|
1053
|
+
* @param el - The element to set the inner HTML on.
|
|
1054
|
+
* @param html - The inner HTML to set.
|
|
1055
|
+
*/
|
|
943
1056
|
o(this, "setInnerHTML");
|
|
1057
|
+
/**
|
|
1058
|
+
* Gets the inner text of an element.
|
|
1059
|
+
* @param el - The element to get the inner text from.
|
|
1060
|
+
* @returns The inner text of the element or an empty string if the inner text is not set.
|
|
1061
|
+
*/
|
|
944
1062
|
o(this, "getInnerText");
|
|
1063
|
+
/**
|
|
1064
|
+
* Sets the inner text of an element.
|
|
1065
|
+
* @param el - The element to set the inner text on.
|
|
1066
|
+
* @param text - The inner text to set.
|
|
1067
|
+
*/
|
|
945
1068
|
o(this, "setInnerText");
|
|
946
|
-
|
|
1069
|
+
/**
|
|
1070
|
+
* Sets the content of the root element from a HeadlessPortal. Generally this will be the same instance that is
|
|
1071
|
+
* returned by `runHeadless`.
|
|
1072
|
+
*
|
|
1073
|
+
* @param root - The HeadlessPortal containing the content to set.
|
|
1074
|
+
* @param setPlaceholders - Whether to set placeholders for the content. This allows you to restore the original content
|
|
1075
|
+
* when you render on the server and then hydrate on the client.
|
|
1076
|
+
*/
|
|
1077
|
+
o(this, "setFromRoot", (e, t) => {
|
|
947
1078
|
e.getPortals().forEach((n) => {
|
|
948
1079
|
for (const i of this.select(n.selector)) {
|
|
949
1080
|
if (i == null)
|
|
950
1081
|
throw new Error(
|
|
951
1082
|
`Cannot find element by selector for render: ${n.selector}`
|
|
952
1083
|
);
|
|
953
|
-
if (n.hasChildren() && this.appendHTML(i, n.contentToHTML(
|
|
954
|
-
if (
|
|
1084
|
+
if (n.hasChildren() && this.appendHTML(i, n.contentToHTML(t)), n.hasInnerHTML()) {
|
|
1085
|
+
if (t) {
|
|
955
1086
|
const l = this.getInnerHTML(i);
|
|
956
|
-
l != null && this.setAttribute(i,
|
|
1087
|
+
l != null && this.setAttribute(i, q, l);
|
|
957
1088
|
}
|
|
958
1089
|
this.setInnerHTML(i, n.getInnerHTML());
|
|
959
1090
|
}
|
|
960
1091
|
if (n.hasInnerText()) {
|
|
961
|
-
if (
|
|
1092
|
+
if (t) {
|
|
962
1093
|
const l = this.getInnerText(i);
|
|
963
|
-
l != null && this.setAttribute(i,
|
|
1094
|
+
l != null && this.setAttribute(i, F, l);
|
|
964
1095
|
}
|
|
965
1096
|
this.setInnerText(i, n.getInnerText());
|
|
966
1097
|
}
|
|
967
1098
|
if (n.hasClasses()) {
|
|
968
|
-
if (
|
|
1099
|
+
if (t) {
|
|
969
1100
|
const l = this.getClass(i);
|
|
970
|
-
l != null && this.setAttribute(i,
|
|
1101
|
+
l != null && this.setAttribute(i, V, l);
|
|
971
1102
|
}
|
|
972
1103
|
this.setClass(i, n.getClasses().join(" "));
|
|
973
1104
|
}
|
|
974
1105
|
if (n.hasStyles()) {
|
|
975
|
-
if (
|
|
1106
|
+
if (t) {
|
|
976
1107
|
const l = this.getStyles(i);
|
|
977
1108
|
Object.keys(l).length > 0 && this.setAttribute(
|
|
978
1109
|
i,
|
|
979
|
-
|
|
1110
|
+
j,
|
|
980
1111
|
JSON.stringify(l)
|
|
981
1112
|
);
|
|
982
1113
|
}
|
|
@@ -984,14 +1115,14 @@ class Ft {
|
|
|
984
1115
|
}
|
|
985
1116
|
if (n.hasAttributes()) {
|
|
986
1117
|
const l = n.getAttributes();
|
|
987
|
-
if (
|
|
1118
|
+
if (t) {
|
|
988
1119
|
const c = [];
|
|
989
1120
|
l.forEach(([a]) => {
|
|
990
1121
|
const u = this.getAttribute(i, a);
|
|
991
1122
|
u != null && c.push([a, u]);
|
|
992
1123
|
}), c.length > 0 && this.setAttribute(
|
|
993
1124
|
i,
|
|
994
|
-
|
|
1125
|
+
B,
|
|
995
1126
|
JSON.stringify(Object.fromEntries(c))
|
|
996
1127
|
);
|
|
997
1128
|
}
|
|
@@ -1002,60 +1133,60 @@ class Ft {
|
|
|
1002
1133
|
}
|
|
1003
1134
|
});
|
|
1004
1135
|
});
|
|
1005
|
-
this.select = e, this.getAttribute =
|
|
1136
|
+
this.select = e, this.getAttribute = t, this.setAttribute = r, this.getClass = n, this.setClass = i, this.getStyles = l, this.setStyles = c, this.appendHTML = a, this.getInnerHTML = u, this.setInnerHTML = h, this.getInnerText = m, this.setInnerText = b;
|
|
1006
1137
|
}
|
|
1007
1138
|
}
|
|
1008
|
-
const
|
|
1009
|
-
document.querySelectorAll(`[${
|
|
1010
|
-
},
|
|
1011
|
-
const e =
|
|
1012
|
-
|
|
1139
|
+
const Ye = () => {
|
|
1140
|
+
document.querySelectorAll(`[${me}]`).forEach(N);
|
|
1141
|
+
}, ze = (s) => {
|
|
1142
|
+
const e = s.getAttribute(V);
|
|
1143
|
+
s.removeAttribute(V), e != null && s.setAttribute("class", e);
|
|
1013
1144
|
}, Qe = () => {
|
|
1014
|
-
document.querySelectorAll(`[${
|
|
1015
|
-
}, Ze = (
|
|
1016
|
-
const e =
|
|
1017
|
-
|
|
1145
|
+
document.querySelectorAll(`[${V}]`).forEach((e) => ze(e));
|
|
1146
|
+
}, Ze = (s) => {
|
|
1147
|
+
const e = s.getAttribute(q);
|
|
1148
|
+
s.removeAttribute(q), e != null && (s.innerHTML = e);
|
|
1018
1149
|
}, Ke = () => {
|
|
1019
|
-
document.querySelectorAll(`[${
|
|
1020
|
-
}, et = (
|
|
1021
|
-
const e =
|
|
1022
|
-
|
|
1150
|
+
document.querySelectorAll(`[${q}]`).forEach((e) => Ze(e));
|
|
1151
|
+
}, et = (s) => {
|
|
1152
|
+
const e = s.getAttribute(F);
|
|
1153
|
+
s.removeAttribute(F), e != null && (s.innerText = e);
|
|
1023
1154
|
}, tt = () => {
|
|
1024
|
-
document.querySelectorAll(`[${
|
|
1025
|
-
},
|
|
1026
|
-
const e =
|
|
1027
|
-
if (
|
|
1028
|
-
const
|
|
1029
|
-
Object.entries(
|
|
1030
|
-
|
|
1155
|
+
document.querySelectorAll(`[${F}]`).forEach((e) => et(e));
|
|
1156
|
+
}, ye = (s) => JSON.parse(s.replace(/"/g, '"')), st = (s) => {
|
|
1157
|
+
const e = s.getAttribute(j);
|
|
1158
|
+
if (s.removeAttribute(j), e != null) {
|
|
1159
|
+
const t = ye(e);
|
|
1160
|
+
Object.entries(t).forEach(([r, n]) => {
|
|
1161
|
+
s.style.setProperty(r, n);
|
|
1031
1162
|
});
|
|
1032
1163
|
}
|
|
1033
1164
|
}, rt = () => {
|
|
1034
|
-
document.querySelectorAll(`[${
|
|
1035
|
-
}, nt = (
|
|
1036
|
-
const e =
|
|
1037
|
-
if (
|
|
1038
|
-
const
|
|
1039
|
-
Object.entries(
|
|
1040
|
-
n == null ?
|
|
1165
|
+
document.querySelectorAll(`[${j}]`).forEach((e) => st(e));
|
|
1166
|
+
}, nt = (s) => {
|
|
1167
|
+
const e = s.getAttribute(B);
|
|
1168
|
+
if (s.removeAttribute(B), e != null) {
|
|
1169
|
+
const t = ye(e);
|
|
1170
|
+
Object.entries(t).forEach(([r, n]) => {
|
|
1171
|
+
n == null ? s.removeAttribute(r) : s.setAttribute(r, n);
|
|
1041
1172
|
});
|
|
1042
1173
|
}
|
|
1043
1174
|
}, it = () => {
|
|
1044
|
-
document.querySelectorAll(`[${
|
|
1045
|
-
},
|
|
1046
|
-
|
|
1047
|
-
},
|
|
1048
|
-
class
|
|
1175
|
+
document.querySelectorAll(`[${B}]`).forEach((e) => nt(e));
|
|
1176
|
+
}, Ft = () => {
|
|
1177
|
+
Ye(), Qe(), tt(), Ke(), rt(), it();
|
|
1178
|
+
}, T = Symbol("class"), v = Symbol("style"), C = Symbol("handler"), Te = () => Math.random().toString(36).substring(2, 15), ot = (s) => s.replace(/<[^>]*>?/g, "");
|
|
1179
|
+
class Se {
|
|
1049
1180
|
constructor(e) {
|
|
1050
|
-
o(this, "id",
|
|
1181
|
+
o(this, "id", Te());
|
|
1051
1182
|
o(this, "properties", {});
|
|
1052
1183
|
o(this, "children", []);
|
|
1053
1184
|
o(this, "isElement", () => !0);
|
|
1054
1185
|
o(this, "isText", () => !1);
|
|
1055
1186
|
o(this, "getText", () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? ot(this.properties.innerHTML) : this.children.map((e) => e.getText()).join(""));
|
|
1056
1187
|
o(this, "removeChild", (e) => {
|
|
1057
|
-
const
|
|
1058
|
-
|
|
1188
|
+
const t = this.children.indexOf(e);
|
|
1189
|
+
t !== -1 && this.children.splice(t, 1);
|
|
1059
1190
|
});
|
|
1060
1191
|
o(this, "remove", () => {
|
|
1061
1192
|
if (this.parent != null)
|
|
@@ -1064,7 +1195,7 @@ class ye {
|
|
|
1064
1195
|
throw new Error("Parent is undefined");
|
|
1065
1196
|
});
|
|
1066
1197
|
o(this, "getPortals", () => {
|
|
1067
|
-
const e = this.elements().flatMap((
|
|
1198
|
+
const e = this.elements().flatMap((t) => t.isPortal() ? [t, ...t.getPortals()] : t.getPortals());
|
|
1068
1199
|
return this.isPortal() && e.unshift(this), e;
|
|
1069
1200
|
});
|
|
1070
1201
|
o(this, "elements", () => this.children.filter((e) => e.isElement()));
|
|
@@ -1073,106 +1204,110 @@ class ye {
|
|
|
1073
1204
|
o(this, "getInnerText", () => this.properties.innerText ?? "");
|
|
1074
1205
|
o(this, "hasInnerText", () => this.properties.innerText != null);
|
|
1075
1206
|
o(this, "hasChildren", () => this.children.length > 0);
|
|
1076
|
-
o(this, "hasClasses", () => this.properties[
|
|
1077
|
-
o(this, "hasStyles", () => this.properties[
|
|
1207
|
+
o(this, "hasClasses", () => this.properties[T] != null);
|
|
1208
|
+
o(this, "hasStyles", () => this.properties[v] != null);
|
|
1078
1209
|
o(this, "hasAttributes", () => Object.keys(this.properties).length > 0);
|
|
1079
|
-
o(this, "hasHandlers", () => this.properties[
|
|
1210
|
+
o(this, "hasHandlers", () => this.properties[C] != null);
|
|
1080
1211
|
o(this, "hasRenderableProperties", () => this.hasClasses() || this.hasAttributes() || this.hasStyles());
|
|
1081
1212
|
o(this, "getById", (e) => {
|
|
1082
1213
|
if (this.properties.id === e)
|
|
1083
1214
|
return this;
|
|
1084
|
-
for (const
|
|
1085
|
-
const r =
|
|
1215
|
+
for (const t of this.elements()) {
|
|
1216
|
+
const r = t.getById(e);
|
|
1086
1217
|
if (r != null)
|
|
1087
1218
|
return r;
|
|
1088
1219
|
}
|
|
1089
1220
|
});
|
|
1090
|
-
o(this, "trigger", (e,
|
|
1091
|
-
((this.properties[
|
|
1221
|
+
o(this, "trigger", (e, t) => {
|
|
1222
|
+
((this.properties[C] ?? {})[e] ?? []).forEach((n) => n(t));
|
|
1092
1223
|
});
|
|
1093
1224
|
o(this, "click", () => {
|
|
1094
1225
|
this.trigger("click", {});
|
|
1095
1226
|
});
|
|
1096
|
-
o(this, "on", (e,
|
|
1097
|
-
var
|
|
1098
|
-
const
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1227
|
+
o(this, "on", (e, t, r) => {
|
|
1228
|
+
var c;
|
|
1229
|
+
const n = (c = this.properties)[C] ?? (c[C] = {}), i = r != null && r.once ? (a) => {
|
|
1230
|
+
l(), t(a);
|
|
1231
|
+
} : (a) => t(a);
|
|
1232
|
+
n[e] = [...n[e] ?? [], i];
|
|
1233
|
+
const l = () => {
|
|
1234
|
+
const a = n[e] ?? [], u = a.indexOf(i);
|
|
1235
|
+
u !== -1 && (a.splice(u, 1), a.length === 0 ? (delete n[e], Object.keys(n).length === 0 && delete this.properties[C]) : n[e] = a, (r == null ? void 0 : r.signal) != null && r.signal.removeEventListener("abort", l));
|
|
1102
1236
|
};
|
|
1237
|
+
return (r == null ? void 0 : r.signal) != null && r.signal.addEventListener("abort", l), l;
|
|
1103
1238
|
});
|
|
1104
1239
|
o(this, "addClasses", (e) => {
|
|
1105
1240
|
var r;
|
|
1106
1241
|
if (e.length === 0)
|
|
1107
1242
|
return;
|
|
1108
|
-
const
|
|
1243
|
+
const t = (r = this.properties)[T] ?? (r[T] = []);
|
|
1109
1244
|
e.forEach((n) => {
|
|
1110
|
-
|
|
1245
|
+
t.includes(n) || t.push(n);
|
|
1111
1246
|
});
|
|
1112
1247
|
});
|
|
1113
1248
|
o(this, "removeClasses", (e) => {
|
|
1114
1249
|
var r;
|
|
1115
1250
|
if (e.length === 0)
|
|
1116
1251
|
return;
|
|
1117
|
-
const
|
|
1252
|
+
const t = (r = this.properties)[T] ?? (r[T] = []);
|
|
1118
1253
|
e.forEach((n) => {
|
|
1119
|
-
const i =
|
|
1120
|
-
i !== -1 &&
|
|
1121
|
-
}),
|
|
1254
|
+
const i = t.indexOf(n);
|
|
1255
|
+
i !== -1 && t.splice(i, 1);
|
|
1256
|
+
}), t.length === 0 && delete this.properties[T];
|
|
1122
1257
|
});
|
|
1123
|
-
o(this, "getClasses", () => this.properties[
|
|
1258
|
+
o(this, "getClasses", () => this.properties[T] ?? []);
|
|
1124
1259
|
o(this, "getAttributes", () => Object.entries(this.properties).filter(
|
|
1125
1260
|
([e]) => !["innerText", "innerHTML"].includes(e)
|
|
1126
1261
|
));
|
|
1127
1262
|
o(this, "getVisibleAttributes", () => Reflect.ownKeys(this.properties).flatMap(
|
|
1128
|
-
(e) => e ===
|
|
1263
|
+
(e) => e === T ? [["class", this.getClasses()]] : e === v ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
|
|
1129
1264
|
));
|
|
1130
|
-
o(this, "setStyle", (e,
|
|
1265
|
+
o(this, "setStyle", (e, t) => {
|
|
1131
1266
|
var n;
|
|
1132
|
-
const r = (n = this.properties)[
|
|
1133
|
-
r[e] =
|
|
1267
|
+
const r = (n = this.properties)[v] ?? (n[v] = {});
|
|
1268
|
+
r[e] = t, t === "" && (delete r[e], Object.keys(r).length === 0 && delete this.properties[v]);
|
|
1134
1269
|
});
|
|
1135
1270
|
o(this, "getStyle", (e) => {
|
|
1136
|
-
var
|
|
1137
|
-
return ((
|
|
1271
|
+
var t;
|
|
1272
|
+
return ((t = this.properties[v]) == null ? void 0 : t[e]) ?? "";
|
|
1138
1273
|
});
|
|
1139
|
-
o(this, "getStyles", () => this.properties[
|
|
1274
|
+
o(this, "getStyles", () => this.properties[v] ?? {});
|
|
1140
1275
|
o(this, "makeAccessors", (e) => {
|
|
1141
|
-
const
|
|
1276
|
+
const t = this.properties;
|
|
1142
1277
|
return {
|
|
1143
|
-
get: () =>
|
|
1144
|
-
set: (r) =>
|
|
1278
|
+
get: () => t[e],
|
|
1279
|
+
set: (r) => t[e] = r
|
|
1145
1280
|
};
|
|
1146
1281
|
});
|
|
1147
1282
|
this.parent = e;
|
|
1148
1283
|
}
|
|
1149
1284
|
}
|
|
1150
|
-
const lt = (
|
|
1151
|
-
class at extends
|
|
1152
|
-
constructor(
|
|
1285
|
+
const lt = (s) => s.replace(/"/g, """), ct = (s) => s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
1286
|
+
class at extends Se {
|
|
1287
|
+
constructor(t, r, n) {
|
|
1153
1288
|
super(n);
|
|
1154
1289
|
o(this, "isPortal", () => !1);
|
|
1155
|
-
o(this, "toHTML", (
|
|
1290
|
+
o(this, "toHTML", (t = !1) => {
|
|
1156
1291
|
const r = this.children.map((a) => a.toHTML()).join(""), n = this.namespace ? ` xmlns="${this.namespace}"` : "";
|
|
1157
1292
|
let i = null;
|
|
1158
|
-
const l = this.getVisibleAttributes().map(([a, u]) => a === "class" ? ` class="${u.join(" ")}"` : a === "style" ? typeof u == "string" ? ` style="${u}"` : ` style="${Object.entries(u).map(([h, m]) => `${h}: ${m};`).join(" ")}"` : ht.has(a) ? ` ${a}` : a === "innerHTML" ? (i = u, "") : a === "innerText" ? (i = ct(u), "") : ` ${a}="${lt(u)}"`).join(""), c =
|
|
1293
|
+
const l = this.getVisibleAttributes().map(([a, u]) => a === "class" ? ` class="${u.join(" ")}"` : a === "style" ? typeof u == "string" ? ` style="${u}"` : ` style="${Object.entries(u).map(([h, m]) => `${h}: ${m};`).join(" ")}"` : ht.has(a) ? ` ${a}` : a === "innerHTML" ? (i = u, "") : a === "innerText" ? (i = ct(u), "") : ` ${a}="${lt(u)}"`).join(""), c = t ? ` ${me}` : "";
|
|
1159
1294
|
return ft.has(this.tagName) && r === "" ? `<${this.tagName}${n}${l}${c} />` : `<${this.tagName}${n}${l}${c}>${i ?? r}</${this.tagName}>`;
|
|
1160
1295
|
});
|
|
1161
|
-
this.tagName =
|
|
1296
|
+
this.tagName = t, this.namespace = r;
|
|
1162
1297
|
}
|
|
1163
1298
|
}
|
|
1164
|
-
class
|
|
1165
|
-
constructor(
|
|
1299
|
+
class be extends Se {
|
|
1300
|
+
constructor(t, r) {
|
|
1166
1301
|
super(r);
|
|
1167
1302
|
o(this, "isPortal", () => !0);
|
|
1168
1303
|
o(this, "toHTML", () => "");
|
|
1169
|
-
o(this, "contentToHTML", (
|
|
1170
|
-
this.selector =
|
|
1304
|
+
o(this, "contentToHTML", (t = !1) => this.children.map((r) => r.toHTML(t)).join(""));
|
|
1305
|
+
this.selector = t;
|
|
1171
1306
|
}
|
|
1172
1307
|
}
|
|
1173
1308
|
class ut {
|
|
1174
1309
|
constructor(e) {
|
|
1175
|
-
o(this, "id",
|
|
1310
|
+
o(this, "id", Te());
|
|
1176
1311
|
o(this, "isElement", () => !1);
|
|
1177
1312
|
o(this, "isText", () => !0);
|
|
1178
1313
|
o(this, "getText", () => this.text);
|
|
@@ -1180,18 +1315,18 @@ class ut {
|
|
|
1180
1315
|
this.text = e;
|
|
1181
1316
|
}
|
|
1182
1317
|
}
|
|
1183
|
-
class
|
|
1184
|
-
constructor(e,
|
|
1318
|
+
class O {
|
|
1319
|
+
constructor(e, t, r, n) {
|
|
1185
1320
|
o(this, "appendOrInsert", (e) => {
|
|
1186
1321
|
if (this.reference != null) {
|
|
1187
|
-
const
|
|
1188
|
-
this.element.children.splice(
|
|
1322
|
+
const t = this.element.children.indexOf(this.reference);
|
|
1323
|
+
this.element.children.splice(t, 0, e);
|
|
1189
1324
|
} else
|
|
1190
1325
|
this.element.children.push(e);
|
|
1191
1326
|
});
|
|
1192
|
-
o(this, "makeChildElement", (e,
|
|
1193
|
-
const r = new at(e,
|
|
1194
|
-
return this.appendOrInsert(r), new
|
|
1327
|
+
o(this, "makeChildElement", (e, t) => {
|
|
1328
|
+
const r = new at(e, t, this.element);
|
|
1329
|
+
return this.appendOrInsert(r), new O(
|
|
1195
1330
|
r,
|
|
1196
1331
|
void 0,
|
|
1197
1332
|
this.container,
|
|
@@ -1199,10 +1334,10 @@ class x {
|
|
|
1199
1334
|
);
|
|
1200
1335
|
});
|
|
1201
1336
|
o(this, "makeChildText", (e) => {
|
|
1202
|
-
const
|
|
1203
|
-
return this.appendOrInsert(
|
|
1337
|
+
const t = new ut(e);
|
|
1338
|
+
return this.appendOrInsert(t), new O(
|
|
1204
1339
|
this.element,
|
|
1205
|
-
|
|
1340
|
+
t,
|
|
1206
1341
|
this.container,
|
|
1207
1342
|
this.providers
|
|
1208
1343
|
);
|
|
@@ -1216,36 +1351,36 @@ class x {
|
|
|
1216
1351
|
});
|
|
1217
1352
|
o(this, "makeRef", () => this.makeChildText(""));
|
|
1218
1353
|
o(this, "makePortal", (e) => {
|
|
1219
|
-
const
|
|
1220
|
-
return this.appendOrInsert(
|
|
1221
|
-
|
|
1354
|
+
const t = new be(e, this.element);
|
|
1355
|
+
return this.appendOrInsert(t), new O(
|
|
1356
|
+
t,
|
|
1222
1357
|
void 0,
|
|
1223
1358
|
this.container,
|
|
1224
1359
|
this.providers
|
|
1225
1360
|
);
|
|
1226
1361
|
});
|
|
1227
|
-
o(this, "withProviders", (e) => new
|
|
1362
|
+
o(this, "withProviders", (e) => new O(this.element, this.reference, this.container, {
|
|
1228
1363
|
...this.providers,
|
|
1229
1364
|
...e
|
|
1230
1365
|
}));
|
|
1231
1366
|
o(this, "getProvider", (e) => {
|
|
1232
1367
|
if (this.providers[e] === void 0)
|
|
1233
|
-
throw new
|
|
1368
|
+
throw new ge(e);
|
|
1234
1369
|
return this.providers[e];
|
|
1235
1370
|
});
|
|
1236
1371
|
o(this, "clear", (e) => {
|
|
1237
1372
|
e && (this.reference !== void 0 ? this.element.removeChild(this.reference) : this.element.remove());
|
|
1238
1373
|
});
|
|
1239
|
-
o(this, "on", (e,
|
|
1374
|
+
o(this, "on", (e, t) => this.element.on(e, t));
|
|
1240
1375
|
o(this, "addClasses", (e) => this.element.addClasses(e));
|
|
1241
1376
|
o(this, "removeClasses", (e) => this.element.removeClasses(e));
|
|
1242
1377
|
o(this, "getClasses", () => this.element.getClasses());
|
|
1243
1378
|
o(this, "isBrowserDOM", () => !1);
|
|
1244
1379
|
o(this, "isHeadlessDOM", () => !0);
|
|
1245
|
-
o(this, "setStyle", (e,
|
|
1380
|
+
o(this, "setStyle", (e, t) => this.element.setStyle(e, t));
|
|
1246
1381
|
o(this, "getStyle", (e) => this.element.getStyle(e));
|
|
1247
1382
|
o(this, "makeAccessors", (e) => this.element.makeAccessors(e));
|
|
1248
|
-
this.element = e, this.reference =
|
|
1383
|
+
this.element = e, this.reference = t, this.container = r, this.providers = n;
|
|
1249
1384
|
}
|
|
1250
1385
|
}
|
|
1251
1386
|
const ht = /* @__PURE__ */ new Set([
|
|
@@ -1255,41 +1390,41 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1255
1390
|
"readonly",
|
|
1256
1391
|
"required",
|
|
1257
1392
|
"selected"
|
|
1258
|
-
]), ft = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]),
|
|
1259
|
-
const
|
|
1260
|
-
return (r) =>
|
|
1261
|
-
}, _e = (
|
|
1262
|
-
const
|
|
1393
|
+
]), ft = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), Ae = (s) => (e) => {
|
|
1394
|
+
const t = e.makeChildText(s);
|
|
1395
|
+
return (r) => t.clear(r);
|
|
1396
|
+
}, _e = (s) => (e) => {
|
|
1397
|
+
const t = e.makeChildText(s.value), r = s.on((n) => t.setText(n));
|
|
1263
1398
|
return (n) => {
|
|
1264
|
-
r(),
|
|
1399
|
+
r(), t.clear(n);
|
|
1265
1400
|
};
|
|
1266
|
-
},
|
|
1267
|
-
const
|
|
1401
|
+
}, Bt = (s) => d.is(s) ? _e(s) : Ae(s), S = (...s) => (e) => {
|
|
1402
|
+
const t = s.map((r) => f(r)(e));
|
|
1268
1403
|
return (r) => {
|
|
1269
|
-
|
|
1404
|
+
t.forEach((n) => n(r));
|
|
1270
1405
|
};
|
|
1271
|
-
},
|
|
1272
|
-
}, dt = (
|
|
1273
|
-
|
|
1274
|
-
}), pt = (
|
|
1275
|
-
let
|
|
1276
|
-
const r =
|
|
1277
|
-
e.removeClasses(
|
|
1406
|
+
}, _ = () => () => {
|
|
1407
|
+
}, dt = (s) => (e) => (e.addClasses(s), (t) => {
|
|
1408
|
+
t && e.removeClasses(s);
|
|
1409
|
+
}), pt = (s) => (e) => {
|
|
1410
|
+
let t = [];
|
|
1411
|
+
const r = s.on((n) => {
|
|
1412
|
+
e.removeClasses(t), t = (n ?? "").split(" ").filter((i) => i.length > 0), e.addClasses(t);
|
|
1278
1413
|
});
|
|
1279
1414
|
return (n) => {
|
|
1280
|
-
r(), n && e.removeClasses(
|
|
1415
|
+
r(), n && e.removeClasses(t), t.length = 0;
|
|
1281
1416
|
};
|
|
1282
|
-
},
|
|
1283
|
-
const { get: r, set: n } =
|
|
1417
|
+
}, $ = (s, e) => (t) => {
|
|
1418
|
+
const { get: r, set: n } = t.makeAccessors(s), i = r();
|
|
1284
1419
|
return n(e), (l) => {
|
|
1285
1420
|
l && n(i);
|
|
1286
1421
|
};
|
|
1287
|
-
},
|
|
1288
|
-
const { get: r, set: n } =
|
|
1422
|
+
}, k = (s, e) => (t) => {
|
|
1423
|
+
const { get: r, set: n } = t.makeAccessors(s), i = r(), l = e.on(n);
|
|
1289
1424
|
return (c) => {
|
|
1290
1425
|
l(), c && n(i);
|
|
1291
1426
|
};
|
|
1292
|
-
},
|
|
1427
|
+
}, M = new Proxy(
|
|
1293
1428
|
{},
|
|
1294
1429
|
{
|
|
1295
1430
|
/**
|
|
@@ -1303,17 +1438,17 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1303
1438
|
* @returns The renderable component for the specified attribute.
|
|
1304
1439
|
*
|
|
1305
1440
|
*/
|
|
1306
|
-
get: (
|
|
1307
|
-
(
|
|
1308
|
-
) : (
|
|
1441
|
+
get: (s, e) => e === "class" ? (t) => d.is(t) ? pt(t) : dt(
|
|
1442
|
+
(t ?? "").split(" ").filter((r) => r.length > 0)
|
|
1443
|
+
) : (t) => d.is(t) ? k(
|
|
1309
1444
|
e,
|
|
1310
|
-
|
|
1311
|
-
) :
|
|
1445
|
+
t
|
|
1446
|
+
) : $(
|
|
1312
1447
|
e,
|
|
1313
|
-
|
|
1448
|
+
t
|
|
1314
1449
|
)
|
|
1315
1450
|
}
|
|
1316
|
-
),
|
|
1451
|
+
), Ut = new Proxy(
|
|
1317
1452
|
{},
|
|
1318
1453
|
{
|
|
1319
1454
|
/**
|
|
@@ -1324,12 +1459,12 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1324
1459
|
* @returns The renderable component for the specified attribute.
|
|
1325
1460
|
*
|
|
1326
1461
|
*/
|
|
1327
|
-
get: (
|
|
1462
|
+
get: (s, e) => (t) => d.is(t) ? k(
|
|
1328
1463
|
`data-${e}`,
|
|
1329
|
-
|
|
1330
|
-
) :
|
|
1464
|
+
t
|
|
1465
|
+
) : $(`data-${e}`, t)
|
|
1331
1466
|
}
|
|
1332
|
-
),
|
|
1467
|
+
), Wt = new Proxy(
|
|
1333
1468
|
{},
|
|
1334
1469
|
{
|
|
1335
1470
|
/**
|
|
@@ -1340,15 +1475,15 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1340
1475
|
* @returns The renderable component for the specified attribute.
|
|
1341
1476
|
*
|
|
1342
1477
|
*/
|
|
1343
|
-
get: (
|
|
1478
|
+
get: (s, e) => (t) => d.is(t) ? k(
|
|
1344
1479
|
`aria-${e}`,
|
|
1345
|
-
|
|
1346
|
-
) :
|
|
1480
|
+
t
|
|
1481
|
+
) : $(
|
|
1347
1482
|
`aria-${e}`,
|
|
1348
|
-
|
|
1483
|
+
t
|
|
1349
1484
|
)
|
|
1350
1485
|
}
|
|
1351
|
-
),
|
|
1486
|
+
), Jt = new Proxy(
|
|
1352
1487
|
{},
|
|
1353
1488
|
{
|
|
1354
1489
|
/**
|
|
@@ -1359,15 +1494,15 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1359
1494
|
* @returns The renderable component for the specified attribute.
|
|
1360
1495
|
*
|
|
1361
1496
|
*/
|
|
1362
|
-
get: (
|
|
1497
|
+
get: (s, e) => (t) => d.is(t) ? k(
|
|
1363
1498
|
e,
|
|
1364
|
-
|
|
1365
|
-
) :
|
|
1499
|
+
t
|
|
1500
|
+
) : $(
|
|
1366
1501
|
e,
|
|
1367
|
-
|
|
1502
|
+
t
|
|
1368
1503
|
)
|
|
1369
1504
|
}
|
|
1370
|
-
),
|
|
1505
|
+
), Gt = new Proxy(
|
|
1371
1506
|
{},
|
|
1372
1507
|
{
|
|
1373
1508
|
/**
|
|
@@ -1377,37 +1512,37 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1377
1512
|
* @returns The renderable component for the specified attribute.
|
|
1378
1513
|
*
|
|
1379
1514
|
*/
|
|
1380
|
-
get: (
|
|
1515
|
+
get: (s, e) => (t) => d.is(t) ? k(
|
|
1381
1516
|
e,
|
|
1382
|
-
|
|
1383
|
-
) :
|
|
1517
|
+
t
|
|
1518
|
+
) : $(
|
|
1384
1519
|
e,
|
|
1385
|
-
|
|
1520
|
+
t
|
|
1386
1521
|
)
|
|
1387
1522
|
}
|
|
1388
|
-
), f = (
|
|
1389
|
-
if (
|
|
1390
|
-
return
|
|
1391
|
-
if (Array.isArray(
|
|
1392
|
-
return
|
|
1393
|
-
if (typeof
|
|
1394
|
-
return
|
|
1395
|
-
if (d.is(
|
|
1396
|
-
return _e(
|
|
1397
|
-
if (typeof
|
|
1398
|
-
return
|
|
1399
|
-
throw new Error(`Unknown type: '${typeof
|
|
1400
|
-
},
|
|
1401
|
-
const r =
|
|
1523
|
+
), f = (s) => {
|
|
1524
|
+
if (s == null)
|
|
1525
|
+
return _;
|
|
1526
|
+
if (Array.isArray(s))
|
|
1527
|
+
return S(...s.map(f));
|
|
1528
|
+
if (typeof s == "string")
|
|
1529
|
+
return Ae(s);
|
|
1530
|
+
if (d.is(s))
|
|
1531
|
+
return _e(s);
|
|
1532
|
+
if (typeof s == "function")
|
|
1533
|
+
return s;
|
|
1534
|
+
throw new Error(`Unknown type: '${typeof s}' for child: ${s}`);
|
|
1535
|
+
}, ve = (s, ...e) => (t) => {
|
|
1536
|
+
const r = t.makeChildElement(s, void 0), n = e.map((i) => f(i)(r));
|
|
1402
1537
|
return (i) => {
|
|
1403
1538
|
n.forEach((l) => l(!1)), r.clear(i);
|
|
1404
1539
|
};
|
|
1405
|
-
},
|
|
1406
|
-
const n = r.makeChildElement(
|
|
1540
|
+
}, Ee = (s, e, ...t) => (r) => {
|
|
1541
|
+
const n = r.makeChildElement(s, e), i = t.map((l) => f(l)(n));
|
|
1407
1542
|
return (l) => {
|
|
1408
1543
|
i.forEach((c) => c(!1)), n.clear(l);
|
|
1409
1544
|
};
|
|
1410
|
-
},
|
|
1545
|
+
}, Xt = new Proxy(
|
|
1411
1546
|
{},
|
|
1412
1547
|
{
|
|
1413
1548
|
/**
|
|
@@ -1415,9 +1550,9 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1415
1550
|
* @param tagName - The HTML tag name.
|
|
1416
1551
|
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
1417
1552
|
*/
|
|
1418
|
-
get: (
|
|
1553
|
+
get: (s, e) => (...t) => ve(e, t.flatMap(f))
|
|
1419
1554
|
}
|
|
1420
|
-
),
|
|
1555
|
+
), Yt = new Proxy(
|
|
1421
1556
|
{},
|
|
1422
1557
|
{
|
|
1423
1558
|
/**
|
|
@@ -1425,9 +1560,9 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1425
1560
|
* @param type - The input type name.
|
|
1426
1561
|
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
1427
1562
|
*/
|
|
1428
|
-
get: (
|
|
1563
|
+
get: (s, e) => (...t) => ve("input", M.type(e), ...t)
|
|
1429
1564
|
}
|
|
1430
|
-
), gt = "http://www.w3.org/2000/svg",
|
|
1565
|
+
), gt = "http://www.w3.org/2000/svg", zt = new Proxy(
|
|
1431
1566
|
{},
|
|
1432
1567
|
{
|
|
1433
1568
|
/**
|
|
@@ -1435,9 +1570,9 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1435
1570
|
* @param tagName - The SVG tag name.
|
|
1436
1571
|
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
1437
1572
|
*/
|
|
1438
|
-
get: (
|
|
1573
|
+
get: (s, e) => (...t) => Ee(e, gt, t.flatMap(f))
|
|
1439
1574
|
}
|
|
1440
|
-
), mt = "http://www.w3.org/1998/Math/MathML",
|
|
1575
|
+
), mt = "http://www.w3.org/1998/Math/MathML", Qt = new Proxy(
|
|
1441
1576
|
{},
|
|
1442
1577
|
{
|
|
1443
1578
|
/**
|
|
@@ -1445,16 +1580,16 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1445
1580
|
* @param tagName - The Math tag name.
|
|
1446
1581
|
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
1447
1582
|
*/
|
|
1448
|
-
get: (
|
|
1583
|
+
get: (s, e) => (...t) => Ee(e, mt, t.flatMap(f))
|
|
1449
1584
|
}
|
|
1450
|
-
),
|
|
1585
|
+
), we = (s, e) => {
|
|
1451
1586
|
if (typeof e == "function")
|
|
1452
|
-
return
|
|
1453
|
-
const
|
|
1587
|
+
return we(s, { then: e });
|
|
1588
|
+
const t = e.pending != null ? f(e.pending()) : _, r = e.then, n = e.error != null ? (i) => f(e.error(i)) : () => _;
|
|
1454
1589
|
return (i) => {
|
|
1455
1590
|
let l = !0;
|
|
1456
|
-
const c =
|
|
1457
|
-
let u = f(
|
|
1591
|
+
const c = s(), a = i.makeRef();
|
|
1592
|
+
let u = f(t)(a);
|
|
1458
1593
|
return c.then(
|
|
1459
1594
|
(h) => {
|
|
1460
1595
|
l && (u(!0), u = f(r(h))(a));
|
|
@@ -1466,14 +1601,14 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1466
1601
|
l = !1, u(h), a.clear(h);
|
|
1467
1602
|
};
|
|
1468
1603
|
};
|
|
1469
|
-
},
|
|
1604
|
+
}, Zt = (s, e) => we(() => s, e), Ce = (s, e, t) => (r) => r.on(s, e, t), yt = (s) => Ce("click", (e) => {
|
|
1470
1605
|
e.preventDefault();
|
|
1471
|
-
const
|
|
1606
|
+
const t = e.target;
|
|
1472
1607
|
setTimeout(() => {
|
|
1473
|
-
const r =
|
|
1474
|
-
r != null &&
|
|
1608
|
+
const r = t.ownerDocument != null ? t == null ? void 0 : t.checked : void 0;
|
|
1609
|
+
r != null && s(!r);
|
|
1475
1610
|
}, 0);
|
|
1476
|
-
}),
|
|
1611
|
+
}), J = new Proxy(
|
|
1477
1612
|
{},
|
|
1478
1613
|
{
|
|
1479
1614
|
/**
|
|
@@ -1481,217 +1616,248 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1481
1616
|
* @param fn - The function to call when the event is triggered.
|
|
1482
1617
|
* @returns A `Renderable` function that adds the event listener to the element.
|
|
1483
1618
|
*/
|
|
1484
|
-
get: (
|
|
1619
|
+
get: (s, e) => (t) => Ce(e, t)
|
|
1485
1620
|
}
|
|
1486
|
-
), Tt = (
|
|
1487
|
-
const
|
|
1488
|
-
t
|
|
1489
|
-
},
|
|
1490
|
-
const
|
|
1491
|
-
t
|
|
1492
|
-
},
|
|
1493
|
-
const
|
|
1494
|
-
if (
|
|
1621
|
+
), Tt = (s) => (e) => {
|
|
1622
|
+
const t = e.target;
|
|
1623
|
+
s(t.value);
|
|
1624
|
+
}, St = (s) => (e) => {
|
|
1625
|
+
const t = e.target;
|
|
1626
|
+
s(t.valueAsNumber);
|
|
1627
|
+
}, bt = (s) => (e) => {
|
|
1628
|
+
const t = e.target;
|
|
1629
|
+
if (t.value === "")
|
|
1495
1630
|
return;
|
|
1496
|
-
const r =
|
|
1631
|
+
const r = t.value.split("-"), n = new Date(
|
|
1497
1632
|
Number(r[0]),
|
|
1498
1633
|
Number(r[1]) - 1,
|
|
1499
1634
|
Number(r[2].substring(0, 2))
|
|
1500
1635
|
);
|
|
1501
|
-
|
|
1502
|
-
}, At = (
|
|
1503
|
-
const
|
|
1504
|
-
if (
|
|
1636
|
+
s(n);
|
|
1637
|
+
}, At = (s) => (e) => {
|
|
1638
|
+
const t = e.target;
|
|
1639
|
+
if (t.value === "")
|
|
1505
1640
|
return;
|
|
1506
|
-
const r =
|
|
1641
|
+
const r = t.value.split("T"), n = r[0].split("-"), i = new Date(
|
|
1507
1642
|
Number(n[0]),
|
|
1508
1643
|
Number(n[1]) - 1,
|
|
1509
1644
|
Number(n[2])
|
|
1510
1645
|
), l = r[1].split(":");
|
|
1511
|
-
i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])),
|
|
1512
|
-
},
|
|
1513
|
-
const
|
|
1514
|
-
t
|
|
1515
|
-
},
|
|
1516
|
-
e.preventDefault(),
|
|
1517
|
-
},
|
|
1518
|
-
e.stopPropagation(),
|
|
1519
|
-
},
|
|
1520
|
-
e.stopImmediatePropagation(),
|
|
1521
|
-
}, is = (
|
|
1522
|
-
|
|
1523
|
-
G[e](_t(t.set))
|
|
1524
|
-
), os = (t, e = "input") => g(
|
|
1525
|
-
O.valueAsDate(t),
|
|
1526
|
-
G[e](At(t.set))
|
|
1527
|
-
), ls = (t, e = "input") => g(
|
|
1528
|
-
O.valueAsNumber(t),
|
|
1529
|
-
G[e](wt(t.set))
|
|
1530
|
-
), cs = (t, e = "input") => g(O.value(t), G[e](Tt(t.set))), as = (t) => g(O.checked(t), yt(t.set)), z = (t, e) => {
|
|
1531
|
-
if (d.is(t))
|
|
1646
|
+
i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])), s(i);
|
|
1647
|
+
}, Kt = (s) => (e) => {
|
|
1648
|
+
const t = e.target;
|
|
1649
|
+
s(t.checked);
|
|
1650
|
+
}, es = (s) => (e) => {
|
|
1651
|
+
e.preventDefault(), s();
|
|
1652
|
+
}, ts = (s) => (e) => {
|
|
1653
|
+
e.stopPropagation(), s();
|
|
1654
|
+
}, ss = (s) => (e) => {
|
|
1655
|
+
e.stopImmediatePropagation(), s();
|
|
1656
|
+
}, rs = (s, e = "input") => S(M.valueAsDate(s), J[e](bt(s.set))), ns = (s, e = "input") => S(M.valueAsDate(s), J[e](At(s.set))), is = (s, e = "input") => S(M.valueAsNumber(s), J[e](St(s.set))), os = (s, e = "input") => S(M.value(s), J[e](Tt(s.set))), ls = (s) => S(M.checked(s), yt(s.set)), G = (s, e) => {
|
|
1657
|
+
if (d.is(s))
|
|
1532
1658
|
return (r) => {
|
|
1533
1659
|
const n = r.makeRef();
|
|
1534
1660
|
let i, l;
|
|
1535
|
-
const c =
|
|
1661
|
+
const c = s.map((h) => Object.keys(h)[0]);
|
|
1536
1662
|
let a;
|
|
1537
1663
|
const u = c.on((h) => {
|
|
1538
1664
|
if (h !== a) {
|
|
1539
|
-
l == null || l.dispose(), i == null || i(!0), l =
|
|
1665
|
+
l == null || l.dispose(), i == null || i(!0), l = s.map((b) => b[h]);
|
|
1540
1666
|
const m = e[h](l);
|
|
1541
1667
|
i = f(m)(n), a = h;
|
|
1542
1668
|
}
|
|
1543
1669
|
});
|
|
1544
1670
|
return (h) => {
|
|
1545
|
-
u(), n.clear(h), i == null || i(h);
|
|
1671
|
+
l == null || l.dispose(), u(), n.clear(h), i == null || i(h);
|
|
1546
1672
|
};
|
|
1547
1673
|
};
|
|
1548
|
-
const
|
|
1549
|
-
return f(e[
|
|
1550
|
-
},
|
|
1551
|
-
|
|
1674
|
+
const t = Object.keys(s)[0];
|
|
1675
|
+
return f(e[t](W(s[t])));
|
|
1676
|
+
}, Pe = (s, e, t) => G(
|
|
1677
|
+
y.map(s, (r) => ({ [r[e]]: r })),
|
|
1552
1678
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1553
|
-
|
|
1554
|
-
),
|
|
1555
|
-
const
|
|
1556
|
-
return
|
|
1557
|
-
},
|
|
1558
|
-
|
|
1679
|
+
t
|
|
1680
|
+
), cs = (s, e) => Pe(s, "kind", e), as = (s, e) => {
|
|
1681
|
+
const t = y.map(s, ([r, n]) => ({ [r]: n }));
|
|
1682
|
+
return G(t, e);
|
|
1683
|
+
}, us = (s, e) => Pe(s, "type", e), _t = (s, e) => G(
|
|
1684
|
+
y.map(s, (t) => ({ [t]: !0 })),
|
|
1559
1685
|
e
|
|
1560
|
-
),
|
|
1561
|
-
const r = (e == null ? void 0 : e.firstSeparator) ??
|
|
1562
|
-
return
|
|
1563
|
-
|
|
1686
|
+
), hs = (s, e = {}) => (t) => {
|
|
1687
|
+
const r = (e == null ? void 0 : e.firstSeparator) ?? s, n = (e == null ? void 0 : e.lastSeparator) ?? s;
|
|
1688
|
+
return _t(
|
|
1689
|
+
t.map((i) => i.isFirst ? "first" : i.isLast ? "last" : "other"),
|
|
1564
1690
|
{
|
|
1565
|
-
first:
|
|
1566
|
-
last:
|
|
1567
|
-
other:
|
|
1691
|
+
first: r,
|
|
1692
|
+
last: n,
|
|
1693
|
+
other: s
|
|
1568
1694
|
}
|
|
1569
1695
|
);
|
|
1570
|
-
},
|
|
1571
|
-
const r = Object.values(
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1696
|
+
}, Le = (s, e) => (t) => {
|
|
1697
|
+
const r = Object.values(s).reduce(
|
|
1698
|
+
(n, i) => {
|
|
1699
|
+
const l = t.getProvider(i);
|
|
1700
|
+
return Reflect.set(n, i, l), n;
|
|
1701
|
+
},
|
|
1702
|
+
{}
|
|
1703
|
+
);
|
|
1704
|
+
return f(e(r))(t);
|
|
1705
|
+
}, fs = (s, e) => (t) => {
|
|
1706
|
+
const r = [], n = Object.entries(s).reduce(
|
|
1578
1707
|
(i, [l, c]) => (r.push(
|
|
1579
|
-
c((a) => (Reflect.set(i, l, a), null))(
|
|
1708
|
+
c((a) => (Reflect.set(i, l, a), null))(t)
|
|
1580
1709
|
), i),
|
|
1581
1710
|
{}
|
|
1582
1711
|
);
|
|
1583
|
-
return r.push(e(n)(
|
|
1712
|
+
return r.push(e(n)(t)), (i) => {
|
|
1584
1713
|
r.forEach((l) => l(i));
|
|
1585
1714
|
};
|
|
1586
|
-
},
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
}
|
|
1590
|
-
|
|
1591
|
-
|
|
1715
|
+
}, vt = (s, e) => Le([s], (t) => f(e(t[s]))), ds = (s, e) => Le(s, (t) => f(e(t))), ps = (s) => (e) => {
|
|
1716
|
+
const t = s(e);
|
|
1717
|
+
return t == null ? () => {
|
|
1718
|
+
} : f(t)(e);
|
|
1719
|
+
}, gs = (s) => (e) => (e.appendOrInsert(s), (t) => {
|
|
1720
|
+
t && N(s);
|
|
1721
|
+
}), Et = (s, e, t) => {
|
|
1722
|
+
if (d.is(s)) {
|
|
1723
|
+
const r = s;
|
|
1592
1724
|
return (n) => {
|
|
1593
1725
|
const i = n.makeRef();
|
|
1594
|
-
let l =
|
|
1595
|
-
|
|
1596
|
-
|
|
1726
|
+
let l = () => {
|
|
1727
|
+
}, c = !1, a = null;
|
|
1728
|
+
const u = r.on((h) => {
|
|
1729
|
+
h == null ? (l(!0), l = f((t == null ? void 0 : t()) ?? _)(i), c = !1, a == null || a.dispose(), a = null) : (a == null ? a = E(h) : a.value = h, c || (l(!0), l = f(e(a))(
|
|
1597
1730
|
i
|
|
1598
1731
|
), c = !0));
|
|
1599
1732
|
});
|
|
1600
1733
|
return (h) => {
|
|
1601
|
-
u(), l == null || l(h), i.clear(h);
|
|
1734
|
+
a == null || a.dispose(), u(), l == null || l(h), i.clear(h);
|
|
1602
1735
|
};
|
|
1603
1736
|
};
|
|
1604
1737
|
} else {
|
|
1605
|
-
const r =
|
|
1738
|
+
const r = s;
|
|
1606
1739
|
if (r == null) {
|
|
1607
|
-
const n =
|
|
1608
|
-
return n != null ? f(n) :
|
|
1740
|
+
const n = t == null ? void 0 : t();
|
|
1741
|
+
return n != null ? f(n) : _;
|
|
1609
1742
|
}
|
|
1610
|
-
return f(e(
|
|
1743
|
+
return f(e(W(r)));
|
|
1611
1744
|
}
|
|
1612
|
-
},
|
|
1613
|
-
|
|
1614
|
-
(
|
|
1615
|
-
|
|
1616
|
-
)
|
|
1617
|
-
|
|
1745
|
+
}, ms = (...s) => (e, t) => (r) => {
|
|
1746
|
+
const n = r.makeRef();
|
|
1747
|
+
if (s.some(
|
|
1748
|
+
(p) => !d.is(p) && p == null
|
|
1749
|
+
))
|
|
1750
|
+
return (t != null ? f(t == null ? void 0 : t()) : _)(
|
|
1751
|
+
n
|
|
1752
|
+
);
|
|
1753
|
+
const l = s.map(() => null), c = s.map(
|
|
1754
|
+
(p) => d.is(p) ? p.value != null : p != null
|
|
1755
|
+
);
|
|
1756
|
+
let a = null;
|
|
1757
|
+
const u = E(c.every((p) => p)), h = (p, g) => {
|
|
1758
|
+
if (p.value != null) {
|
|
1759
|
+
if (l[g] == null) {
|
|
1760
|
+
const w = E(p.value);
|
|
1761
|
+
l[g] = w;
|
|
1762
|
+
} else
|
|
1763
|
+
l[g].value = p.value;
|
|
1764
|
+
c[g] = !0;
|
|
1765
|
+
} else
|
|
1766
|
+
c[g] = !1;
|
|
1767
|
+
};
|
|
1768
|
+
let m = s.length - 1;
|
|
1769
|
+
const b = s.map((p, g) => {
|
|
1770
|
+
if (!d.is(p)) {
|
|
1771
|
+
const w = E(p);
|
|
1772
|
+
return l[g] = w, () => {
|
|
1773
|
+
};
|
|
1774
|
+
}
|
|
1775
|
+
return p.on(() => {
|
|
1776
|
+
h(p, g), m === 0 ? u.value = c.every((w) => w) : m--;
|
|
1777
|
+
});
|
|
1778
|
+
});
|
|
1779
|
+
return u.on((p) => {
|
|
1780
|
+
a == null || a(!0), a = null, p ? a = f(e(...l))(n) : a = f((t == null ? void 0 : t()) ?? _)(n);
|
|
1781
|
+
}), (p) => {
|
|
1782
|
+
l.forEach((g) => g == null ? void 0 : g.dispose()), u.dispose(), b.forEach((g) => g()), a == null || a(p), n.clear(p);
|
|
1783
|
+
};
|
|
1784
|
+
}, Z = (...s) => (e) => (t) => s.forEach((r) => r(t, e)), xe = (s, e, t) => Et(
|
|
1785
|
+
y.map(s, (r) => r ? !0 : null),
|
|
1618
1786
|
e,
|
|
1619
|
-
|
|
1620
|
-
),
|
|
1621
|
-
|
|
1622
|
-
() => e,
|
|
1623
|
-
() => s
|
|
1624
|
-
), Ct = (t, e, s) => xe(
|
|
1625
|
-
p.map(t, (r) => !r),
|
|
1787
|
+
t ?? void 0
|
|
1788
|
+
), ys = (s, e, t) => xe(
|
|
1789
|
+
y.map(s, (r) => !r),
|
|
1626
1790
|
e,
|
|
1627
|
-
|
|
1628
|
-
), Oe = (
|
|
1629
|
-
const n = new
|
|
1791
|
+
t
|
|
1792
|
+
), Oe = (s, e, t) => t != null ? Oe(s, (r) => {
|
|
1793
|
+
const n = new Y(
|
|
1630
1794
|
r.index,
|
|
1631
1795
|
r.total.map((i) => i - 1)
|
|
1632
1796
|
);
|
|
1633
|
-
return
|
|
1634
|
-
|
|
1797
|
+
return S(
|
|
1798
|
+
Z(n.dispose),
|
|
1635
1799
|
f(e(r)),
|
|
1636
|
-
|
|
1800
|
+
xe(
|
|
1801
|
+
r.isLast,
|
|
1802
|
+
() => _,
|
|
1803
|
+
() => t(n)
|
|
1804
|
+
)
|
|
1637
1805
|
);
|
|
1638
|
-
}) : d.is(
|
|
1639
|
-
const n = r.makeRef(), i =
|
|
1640
|
-
|
|
1641
|
-
(
|
|
1642
|
-
|
|
1643
|
-
(
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
for (let u = 0; u < a; u++)
|
|
1648
|
-
if (i[u] == null) {
|
|
1649
|
-
i[u] = new D(u, t);
|
|
1650
|
-
const h = f(e(i[u]));
|
|
1651
|
-
l[u] = h(n);
|
|
1652
|
-
}
|
|
1806
|
+
}) : d.is(s) ? (r) => {
|
|
1807
|
+
const n = r.makeRef(), i = [], l = s.on((c) => {
|
|
1808
|
+
const a = i.splice(c);
|
|
1809
|
+
for (const u of a)
|
|
1810
|
+
u(!0);
|
|
1811
|
+
for (let u = i.length; u < c; u++) {
|
|
1812
|
+
const h = new Y(u, s);
|
|
1813
|
+
i.push(f(e(h))(n));
|
|
1814
|
+
}
|
|
1653
1815
|
});
|
|
1654
|
-
return (
|
|
1655
|
-
|
|
1816
|
+
return (c) => {
|
|
1817
|
+
l();
|
|
1818
|
+
for (const a of i)
|
|
1819
|
+
a(c);
|
|
1820
|
+
i.length = 0, n.clear(c);
|
|
1656
1821
|
};
|
|
1657
|
-
} :
|
|
1658
|
-
...Array.from({ length:
|
|
1659
|
-
(r) => f(e(new
|
|
1822
|
+
} : S(
|
|
1823
|
+
...Array.from({ length: s }, (r, n) => n).map(
|
|
1824
|
+
(r) => f(e(new Y(r, W(s))))
|
|
1660
1825
|
)
|
|
1661
|
-
),
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
n.total.map((l) => l - 1)
|
|
1667
|
-
);
|
|
1668
|
-
return g([
|
|
1669
|
-
U(i.dispose),
|
|
1670
|
-
f(e(r, n)),
|
|
1671
|
-
Pe(n.isLast, A, s(i))
|
|
1672
|
-
]);
|
|
1673
|
-
});
|
|
1674
|
-
{
|
|
1675
|
-
const r = p.map(t, (i) => i.length), n = p.toSignal(t);
|
|
1676
|
-
return Oe(r, (i) => {
|
|
1826
|
+
), Ts = (s, e, t) => {
|
|
1827
|
+
const r = y.map(s, (i) => i.length), n = y.toSignal(s);
|
|
1828
|
+
return Oe(
|
|
1829
|
+
r,
|
|
1830
|
+
(i) => {
|
|
1677
1831
|
const l = n.map((c) => c[i.index]);
|
|
1678
|
-
return
|
|
1679
|
-
|
|
1832
|
+
return S(
|
|
1833
|
+
Z(l.dispose),
|
|
1680
1834
|
f(e(l, i))
|
|
1681
1835
|
);
|
|
1682
|
-
}
|
|
1836
|
+
},
|
|
1837
|
+
t
|
|
1838
|
+
);
|
|
1839
|
+
}, wt = (s) => (e) => {
|
|
1840
|
+
if (e.isBrowserDOM()) {
|
|
1841
|
+
const t = s(e);
|
|
1842
|
+
if (t != null)
|
|
1843
|
+
return f(t)(e);
|
|
1844
|
+
}
|
|
1845
|
+
return () => {
|
|
1846
|
+
};
|
|
1847
|
+
}, Ss = (s) => (e) => {
|
|
1848
|
+
if (e.isHeadlessDOM()) {
|
|
1849
|
+
const t = s(e);
|
|
1850
|
+
if (t)
|
|
1851
|
+
return f(t)(e);
|
|
1683
1852
|
}
|
|
1684
|
-
|
|
1685
|
-
}
|
|
1686
|
-
},
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
})), As = (t, e) => {
|
|
1690
|
-
if (d.is(t)) {
|
|
1691
|
-
const s = t;
|
|
1853
|
+
return () => {
|
|
1854
|
+
};
|
|
1855
|
+
}, bs = (s) => wt((e) => s(e.element)), As = (s, e) => {
|
|
1856
|
+
if (d.is(s)) {
|
|
1857
|
+
const t = s;
|
|
1692
1858
|
return (r) => {
|
|
1693
1859
|
r = r.makeRef();
|
|
1694
|
-
const n =
|
|
1860
|
+
const n = t.map((c) => f(e(c)));
|
|
1695
1861
|
let i = () => {
|
|
1696
1862
|
};
|
|
1697
1863
|
const l = n.on((c) => {
|
|
@@ -1702,62 +1868,62 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1702
1868
|
};
|
|
1703
1869
|
};
|
|
1704
1870
|
}
|
|
1705
|
-
return f(e(
|
|
1706
|
-
},
|
|
1707
|
-
|
|
1708
|
-
|
|
1871
|
+
return f(e(s));
|
|
1872
|
+
}, _s = (s, e, t = () => _) => G(
|
|
1873
|
+
y.map(
|
|
1874
|
+
s,
|
|
1709
1875
|
(r) => r.length > 0 ? { notEmpty: r } : { whenEmpty: null }
|
|
1710
1876
|
),
|
|
1711
1877
|
{
|
|
1712
1878
|
notEmpty: (r) => e(r),
|
|
1713
|
-
whenEmpty: () =>
|
|
1879
|
+
whenEmpty: () => t()
|
|
1714
1880
|
}
|
|
1715
|
-
),
|
|
1716
|
-
const r =
|
|
1717
|
-
return
|
|
1718
|
-
},
|
|
1719
|
-
identifier:
|
|
1881
|
+
), vs = (s, e) => (t) => {
|
|
1882
|
+
const r = t.makePortal(s);
|
|
1883
|
+
return Q(f(e), r);
|
|
1884
|
+
}, Ct = (s) => Symbol(s), De = (s, e) => (t) => f(e)(t.withProviders(s)), Es = (...s) => s.length > 0 ? s.reduceRight((e, t) => (r) => e(t(r))) : f, Pt = (s, e, t) => De({ [s]: e }, f(t)), ws = (s, e) => De(s, f(e)), Me = Ct("Probe"), P = /* @__PURE__ */ new Map(), Lt = ({
|
|
1885
|
+
identifier: s,
|
|
1720
1886
|
callback: e = () => {
|
|
1721
1887
|
},
|
|
1722
|
-
child:
|
|
1888
|
+
child: t,
|
|
1723
1889
|
timeout: r = 10
|
|
1724
1890
|
}) => {
|
|
1725
|
-
if (
|
|
1726
|
-
throw new Error(`Probe already exists: ${
|
|
1891
|
+
if (P.has(s))
|
|
1892
|
+
throw new Error(`Probe already exists: ${s.description}`);
|
|
1727
1893
|
const n = setTimeout(() => e("timeout"), r);
|
|
1728
|
-
|
|
1894
|
+
P.set(s, {
|
|
1729
1895
|
counter: 0,
|
|
1730
1896
|
timeoutId: n
|
|
1731
1897
|
});
|
|
1732
1898
|
const i = (l) => {
|
|
1733
1899
|
clearTimeout(n);
|
|
1734
|
-
const c =
|
|
1900
|
+
const c = P.get(l);
|
|
1735
1901
|
if (c == null)
|
|
1736
1902
|
throw new Error(`Probe not found: ${l.description}`);
|
|
1737
|
-
--c.counter === 0 ? (e("resolved"),
|
|
1903
|
+
--c.counter === 0 ? (e("resolved"), P.delete(l)) : P.set(l, c);
|
|
1738
1904
|
};
|
|
1739
|
-
return
|
|
1740
|
-
|
|
1741
|
-
|
|
1905
|
+
return S(
|
|
1906
|
+
Z(() => clearTimeout(n)),
|
|
1907
|
+
Pt(Me, i, t)
|
|
1742
1908
|
);
|
|
1743
|
-
},
|
|
1744
|
-
const r =
|
|
1909
|
+
}, xt = (s, e) => vt(Me, (t) => {
|
|
1910
|
+
const r = P.get(s);
|
|
1745
1911
|
return r == null ? e(() => {
|
|
1746
|
-
}) : (clearTimeout(r.timeoutId), r.counter++, e(() => s
|
|
1747
|
-
}),
|
|
1748
|
-
callback:
|
|
1912
|
+
}) : (clearTimeout(r.timeoutId), r.counter++, e(() => t(s)));
|
|
1913
|
+
}), He = Symbol("globalProbe"), Cs = ({
|
|
1914
|
+
callback: s,
|
|
1749
1915
|
timeout: e
|
|
1750
|
-
},
|
|
1751
|
-
const r =
|
|
1752
|
-
return
|
|
1753
|
-
n &&
|
|
1916
|
+
}, t) => Lt({ identifier: He, callback: s, child: t, timeout: e }), Ps = (s) => xt(He, s), Ot = (s, e) => (t) => {
|
|
1917
|
+
const r = t.getStyle(s);
|
|
1918
|
+
return t.setStyle(s, e), (n) => {
|
|
1919
|
+
n && t.setStyle(s, r);
|
|
1754
1920
|
};
|
|
1755
|
-
},
|
|
1756
|
-
const r =
|
|
1757
|
-
return e.on((n) =>
|
|
1758
|
-
n &&
|
|
1921
|
+
}, Dt = (s, e) => (t) => {
|
|
1922
|
+
const r = t.getStyle(s);
|
|
1923
|
+
return e.on((n) => t.setStyle(s, n)), (n) => {
|
|
1924
|
+
n && t.setStyle(s, r);
|
|
1759
1925
|
};
|
|
1760
|
-
},
|
|
1926
|
+
}, Ls = new Proxy(
|
|
1761
1927
|
{},
|
|
1762
1928
|
{
|
|
1763
1929
|
/**
|
|
@@ -1768,125 +1934,120 @@ const ht = /* @__PURE__ */ new Set([
|
|
|
1768
1934
|
* @returns The renderable component for the specified attribute.
|
|
1769
1935
|
*
|
|
1770
1936
|
*/
|
|
1771
|
-
get: (
|
|
1937
|
+
get: (s, e) => (t) => d.is(t) ? Dt(e, t) : Ot(e, t)
|
|
1772
1938
|
}
|
|
1773
1939
|
);
|
|
1774
1940
|
export {
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
A as Empty,
|
|
1941
|
+
Zt as Async,
|
|
1942
|
+
ls as BindChecked,
|
|
1943
|
+
rs as BindDate,
|
|
1944
|
+
ns as BindDateTime,
|
|
1945
|
+
is as BindNumber,
|
|
1946
|
+
os as BindText,
|
|
1947
|
+
x as BrowserContext,
|
|
1948
|
+
V as CLASS_PLACEHOLDER_ATTR,
|
|
1949
|
+
L as Computed,
|
|
1950
|
+
hs as Conjunction,
|
|
1951
|
+
gs as DOMNode,
|
|
1952
|
+
ve as El,
|
|
1953
|
+
Ee as ElNS,
|
|
1954
|
+
Y as ElementPosition,
|
|
1955
|
+
_ as Empty,
|
|
1791
1956
|
Et as Ensure,
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1957
|
+
ms as EnsureAll,
|
|
1958
|
+
Ts as ForEach,
|
|
1959
|
+
S as Fragment,
|
|
1960
|
+
qt as HeadlessAdapter,
|
|
1961
|
+
O as HeadlessContext,
|
|
1797
1962
|
at as HeadlessElement,
|
|
1798
|
-
|
|
1963
|
+
be as HeadlessPortal,
|
|
1799
1964
|
ut as HeadlessText,
|
|
1800
|
-
Ct as LazyUnless,
|
|
1801
|
-
xe as LazyWhen,
|
|
1802
1965
|
As as MapSignal,
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
Pt as OnBrowserCtx,
|
|
1966
|
+
le as MemoryStore,
|
|
1967
|
+
_s as NotEmpty,
|
|
1968
|
+
wt as OnBrowserCtx,
|
|
1807
1969
|
yt as OnChecked,
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1970
|
+
ps as OnCtx,
|
|
1971
|
+
Z as OnDispose,
|
|
1972
|
+
bs as OnElement,
|
|
1973
|
+
Ss as OnHeadlessCtx,
|
|
1974
|
+
G as OneOf,
|
|
1975
|
+
Pe as OneOfField,
|
|
1976
|
+
cs as OneOfKind,
|
|
1977
|
+
as as OneOfTuple,
|
|
1978
|
+
us as OneOfType,
|
|
1979
|
+
_t as OneOfValue,
|
|
1980
|
+
vs as Portal,
|
|
1981
|
+
R as Prop,
|
|
1820
1982
|
Es as Provide,
|
|
1821
|
-
|
|
1983
|
+
Cs as ProvideGlobalProbe,
|
|
1822
1984
|
Lt as ProvideProbe,
|
|
1823
|
-
|
|
1824
|
-
|
|
1985
|
+
ge as ProviderNotFoundError,
|
|
1986
|
+
Xe as RenderingError,
|
|
1825
1987
|
Oe as Repeat,
|
|
1826
|
-
q as STYLE_PLACEHOLDER_ATTR,
|
|
1827
1988
|
d as Signal,
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
ps as Use,
|
|
1989
|
+
we as Task,
|
|
1990
|
+
Bt as TextNode,
|
|
1991
|
+
ys as Unless,
|
|
1992
|
+
fs as Use,
|
|
1833
1993
|
Ps as UseGlobalProbe,
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1994
|
+
xt as UseProbe,
|
|
1995
|
+
vt as UseProvider,
|
|
1996
|
+
ds as UseProviders,
|
|
1997
|
+
y as Value,
|
|
1998
|
+
xe as When,
|
|
1999
|
+
Pt as WithProvider,
|
|
2000
|
+
ws as WithProviders,
|
|
2001
|
+
me as _NODE_PLACEHOLDER_ATTR,
|
|
1841
2002
|
Ge as _getSelfOrParentElement,
|
|
1842
|
-
|
|
2003
|
+
pe as _isElement,
|
|
1843
2004
|
Je as _makeGetter,
|
|
1844
2005
|
We as _makeSetter,
|
|
1845
|
-
|
|
2006
|
+
N as _removeDOMNode,
|
|
1846
2007
|
_e as _signalText,
|
|
1847
|
-
|
|
1848
|
-
|
|
2008
|
+
Ae as _staticText,
|
|
2009
|
+
Rt as animateSignal,
|
|
1849
2010
|
Ue as animateSignals,
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
2011
|
+
Wt as aria,
|
|
2012
|
+
M as attr,
|
|
2013
|
+
Ut as dataAttr,
|
|
2014
|
+
Kt as emitChecked,
|
|
2015
|
+
es as emitPreventDefault,
|
|
2016
|
+
ss as emitStopImmediatePropagation,
|
|
2017
|
+
ts as emitStopPropagation,
|
|
1857
2018
|
Tt as emitValue,
|
|
1858
|
-
|
|
2019
|
+
bt as emitValueAsDate,
|
|
1859
2020
|
At as emitValueAsDateTime,
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
2021
|
+
St as emitValueAsNumber,
|
|
2022
|
+
je as endInterpolate,
|
|
2023
|
+
oe as getWindow,
|
|
2024
|
+
qe as guessInterpolate,
|
|
2025
|
+
Xt as html,
|
|
2026
|
+
Yt as input,
|
|
2027
|
+
Ve as interpolateDate,
|
|
2028
|
+
Re as interpolateNumber,
|
|
2029
|
+
Ne as interpolateString,
|
|
2030
|
+
kt as localStorageProp,
|
|
2031
|
+
z as makeComputed,
|
|
2032
|
+
Ht as makeComputedOf,
|
|
2033
|
+
Nt as makeComputedRecord,
|
|
2034
|
+
Be as makeEffect,
|
|
2035
|
+
$t as makeEffectOf,
|
|
2036
|
+
E as makeProp,
|
|
2037
|
+
Ct as makeProviderMark,
|
|
2038
|
+
W as makeSignal,
|
|
2039
|
+
Qt as math,
|
|
2040
|
+
Gt as mathAttr,
|
|
2041
|
+
J as on,
|
|
2042
|
+
Me as probeMarker,
|
|
1882
2043
|
Vt as render,
|
|
1883
|
-
|
|
2044
|
+
Q as renderWithContext,
|
|
1884
2045
|
f as renderableOfTNode,
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
2046
|
+
Ft as restoreTempoPlaceholders,
|
|
2047
|
+
jt as runHeadless,
|
|
2048
|
+
It as sessionStorageProp,
|
|
2049
|
+
ce as storedProp,
|
|
2050
|
+
Ls as style,
|
|
2051
|
+
zt as svg,
|
|
2052
|
+
Jt as svgAttr
|
|
1892
2053
|
};
|