@tempots/dom 31.6.1 → 32.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/index.cjs +1 -1
- package/index.d.ts +3 -0
- package/index.js +823 -575
- package/package.json +1 -1
- package/renderable/render.d.ts +4 -0
- package/renderable/utils.d.ts +1 -0
- package/renderable/with-scope.d.ts +39 -0
- package/std/disposal-scope.d.ts +97 -0
- package/std/element-position.d.ts +8 -0
- package/std/scope-stack.d.ts +76 -0
- package/std/signal.d.ts +49 -3
- package/std/value.d.ts +8 -0
package/index.js
CHANGED
|
@@ -1,56 +1,33 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
const _ = [], qe = (t) => {
|
|
2
|
+
_.push(t);
|
|
3
|
+
}, Fe = () => {
|
|
4
|
+
if (_.length === 0)
|
|
5
|
+
throw new Error("Cannot pop from empty scope stack");
|
|
6
|
+
_.pop();
|
|
7
|
+
}, ge = () => _[_.length - 1] ?? null, Bt = () => _, Wt = () => _[_.length - 2] ?? null, L = (t, e) => {
|
|
8
|
+
qe(t);
|
|
9
|
+
try {
|
|
10
|
+
return e();
|
|
11
|
+
} finally {
|
|
12
|
+
Fe();
|
|
10
13
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* @param total - The total number of elements in the collection.
|
|
18
|
-
*/
|
|
19
|
-
constructor(e, s) {
|
|
20
|
-
this.index = e, this.total = s, this.counter = e + 1, this.isFirst = e === 0, this.isEven = e % 2 === 1, this.isOdd = e % 2 === 0;
|
|
14
|
+
}, Ut = (t) => {
|
|
15
|
+
const e = new q();
|
|
16
|
+
try {
|
|
17
|
+
return L(e, () => t(e));
|
|
18
|
+
} finally {
|
|
19
|
+
e.dispose();
|
|
21
20
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
*/
|
|
30
|
-
isFirst;
|
|
31
|
-
/**
|
|
32
|
-
* Checks if the counter of the element is even.
|
|
33
|
-
* @returns `true` if the counter is even, `false` otherwise.
|
|
34
|
-
*/
|
|
35
|
-
isEven;
|
|
36
|
-
/**
|
|
37
|
-
* Checks if the counter of the element is odd.
|
|
38
|
-
* @returns `true` if the counter is odd, `false` otherwise.
|
|
39
|
-
*/
|
|
40
|
-
isOdd;
|
|
41
|
-
#e;
|
|
42
|
-
/**
|
|
43
|
-
* Checks if the element is the last element in the collection.
|
|
44
|
-
* @returns `true` if the element is the last element, `false` otherwise.
|
|
45
|
-
*/
|
|
46
|
-
get isLast() {
|
|
47
|
-
return this.#e == null && (this.#e = this.total.map((e) => this.counter === e)), this.#e;
|
|
21
|
+
}, oe = (t) => {
|
|
22
|
+
const e = _.slice();
|
|
23
|
+
_.length = 0;
|
|
24
|
+
try {
|
|
25
|
+
return t();
|
|
26
|
+
} finally {
|
|
27
|
+
_.length = 0, _.push(...e);
|
|
48
28
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
class m {
|
|
29
|
+
};
|
|
30
|
+
class g {
|
|
54
31
|
/**
|
|
55
32
|
* Represents a signal with a value of type T.
|
|
56
33
|
*
|
|
@@ -103,7 +80,7 @@ class m {
|
|
|
103
80
|
* @returns A Signal that represents the result of the Promise
|
|
104
81
|
*/
|
|
105
82
|
static ofPromise = (e, s, r, n = (i, o) => i === o) => {
|
|
106
|
-
const i = new
|
|
83
|
+
const i = new g(s, n);
|
|
107
84
|
return e.then((o) => i._setAndNotify(o)).catch((o) => {
|
|
108
85
|
r != null ? i._setAndNotify(r(o)) : console.error(
|
|
109
86
|
"Unhandled promise rejection in Signal.ofPromise:",
|
|
@@ -180,6 +157,21 @@ class m {
|
|
|
180
157
|
};
|
|
181
158
|
return s.abortSignal != null && s.abortSignal.addEventListener("abort", n), n;
|
|
182
159
|
};
|
|
160
|
+
/**
|
|
161
|
+
* Registers a listener function to be called whenever the value of the signal changes.
|
|
162
|
+
* The listener function will not be called with the current value of the signal.
|
|
163
|
+
* Returns a function that can be called to unregister the listener.
|
|
164
|
+
*
|
|
165
|
+
* @param listener - The listener function to be called when the value of the signal changes.
|
|
166
|
+
* @param options - Options for the listener.
|
|
167
|
+
*/
|
|
168
|
+
onChange = (e, s = {}) => {
|
|
169
|
+
let r = 0;
|
|
170
|
+
const n = (i, o) => {
|
|
171
|
+
r++ > 0 && e(i, o);
|
|
172
|
+
};
|
|
173
|
+
return this.on(n, s);
|
|
174
|
+
};
|
|
183
175
|
/**
|
|
184
176
|
* @internal
|
|
185
177
|
*/
|
|
@@ -256,13 +248,25 @@ class m {
|
|
|
256
248
|
* )
|
|
257
249
|
* ```
|
|
258
250
|
*
|
|
251
|
+
* **Auto-Disposal:** The returned computed signal is automatically registered with the current
|
|
252
|
+
* disposal scope (if one exists). When used within a renderable or `WithScope()`, the signal
|
|
253
|
+
* will be automatically disposed when the component unmounts. No manual `OnDispose()` needed!
|
|
254
|
+
*
|
|
255
|
+
* ```typescript
|
|
256
|
+
* const MyComponent: Renderable = (ctx) => {
|
|
257
|
+
* const count = prop(0);
|
|
258
|
+
* const doubled = count.map(x => x * 2); // ✅ Auto-disposed
|
|
259
|
+
* return html.div(doubled);
|
|
260
|
+
* };
|
|
261
|
+
* ```
|
|
262
|
+
*
|
|
259
263
|
* @typeParam O - The type of the transformed value
|
|
260
264
|
* @param fn - Function that transforms the signal's value to a new value
|
|
261
265
|
* @param equals - Optional function to determine if two transformed values are equal (defaults to strict equality)
|
|
262
|
-
* @returns A new computed signal with the transformed value
|
|
266
|
+
* @returns A new computed signal with the transformed value (auto-registered with current scope)
|
|
263
267
|
*/
|
|
264
268
|
map = (e, s = (r, n) => r === n) => {
|
|
265
|
-
const r = new
|
|
269
|
+
const r = new $(() => {
|
|
266
270
|
try {
|
|
267
271
|
return e(this.get());
|
|
268
272
|
} catch (n) {
|
|
@@ -282,7 +286,7 @@ class m {
|
|
|
282
286
|
* @returns A new Signal that emits the values of the resulting Signal.
|
|
283
287
|
*/
|
|
284
288
|
flatMap = (e, s = (r, n) => r === n) => {
|
|
285
|
-
const r = new
|
|
289
|
+
const r = new $(() => {
|
|
286
290
|
try {
|
|
287
291
|
return e(this.get()).get();
|
|
288
292
|
} catch (n) {
|
|
@@ -320,7 +324,7 @@ class m {
|
|
|
320
324
|
}
|
|
321
325
|
filter = (e, s) => {
|
|
322
326
|
let r = s ?? this.get();
|
|
323
|
-
const n = new
|
|
327
|
+
const n = new $(() => {
|
|
324
328
|
try {
|
|
325
329
|
const i = this.get();
|
|
326
330
|
return r = e(i) ? i : r;
|
|
@@ -342,7 +346,7 @@ class m {
|
|
|
342
346
|
*/
|
|
343
347
|
filterMap = (e, s, r = (n, i) => n === i) => {
|
|
344
348
|
let n = s;
|
|
345
|
-
const i = new
|
|
349
|
+
const i = new $(() => {
|
|
346
350
|
try {
|
|
347
351
|
const o = this.get(), l = e(o);
|
|
348
352
|
return n = l ?? n;
|
|
@@ -366,7 +370,7 @@ class m {
|
|
|
366
370
|
* @returns A property that holds the mapped value and can be observed for changes.
|
|
367
371
|
*/
|
|
368
372
|
mapAsync = (e, s, r, n = (i, o) => i === o) => {
|
|
369
|
-
const i =
|
|
373
|
+
const i = T(s, n);
|
|
370
374
|
let o = 0, l = new AbortController();
|
|
371
375
|
return i.onDispose(
|
|
372
376
|
this.on(async (c) => {
|
|
@@ -416,7 +420,7 @@ class m {
|
|
|
416
420
|
deriveProp = ({
|
|
417
421
|
autoDisposeProp: e = !0,
|
|
418
422
|
equals: s
|
|
419
|
-
} = {}) => this.feedProp(
|
|
423
|
+
} = {}) => this.feedProp(T(this.get(), s), e);
|
|
420
424
|
/**
|
|
421
425
|
* 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.
|
|
422
426
|
* @returns A new signal that emits the same values as the current signal.
|
|
@@ -445,15 +449,36 @@ class m {
|
|
|
445
449
|
}), e.onDispose(this.on(e.setDirty)), this.onDispose(e.dispose);
|
|
446
450
|
};
|
|
447
451
|
}
|
|
448
|
-
const
|
|
449
|
-
class
|
|
452
|
+
const Be = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
|
|
453
|
+
class $ extends g {
|
|
450
454
|
/**
|
|
451
|
-
*
|
|
452
|
-
*
|
|
455
|
+
* Creates a new Computed signal.
|
|
456
|
+
*
|
|
457
|
+
* **Auto-Registration:** This constructor automatically registers the signal with the current
|
|
458
|
+
* disposal scope (if one exists). This ensures that computed signals created by methods like
|
|
459
|
+
* `.map()`, `.flatMap()`, `.filter()`, etc. are automatically tracked and disposed.
|
|
460
|
+
*
|
|
461
|
+
* When a computed signal is created within a renderable or `WithScope()`, it will be
|
|
462
|
+
* automatically disposed when the component unmounts or the scope is disposed.
|
|
463
|
+
*
|
|
464
|
+
* To create a computed signal that outlives the current scope, use `untracked()`:
|
|
465
|
+
* ```typescript
|
|
466
|
+
* const globalSignal = untracked(() => mySignal.map(x => x * 2));
|
|
467
|
+
* // Remember to dispose manually: globalSignal.dispose()
|
|
468
|
+
* ```
|
|
469
|
+
*
|
|
470
|
+
* @param _fn - The function that computes the value of the signal.
|
|
453
471
|
* @param equals - The function used to compare two values of type T for equality.
|
|
472
|
+
*
|
|
473
|
+
* @see {@link computed} - Factory function for creating computed signals with explicit dependencies
|
|
474
|
+
* @see {@link Signal.map} - Creates a computed signal by transforming values
|
|
475
|
+
* @see {@link getCurrentScope} - Get the current disposal scope
|
|
476
|
+
* @see {@link untracked} - Create signals outside of scope tracking
|
|
454
477
|
*/
|
|
455
478
|
constructor(e, s) {
|
|
456
479
|
super(void 0, s), this._fn = e, this.setDirty();
|
|
480
|
+
const r = ge();
|
|
481
|
+
r?.track(this);
|
|
457
482
|
}
|
|
458
483
|
/**
|
|
459
484
|
* Checks if a value is an instance of `Computed`.
|
|
@@ -491,7 +516,7 @@ class H extends m {
|
|
|
491
516
|
*/
|
|
492
517
|
_scheduleNotify = () => {
|
|
493
518
|
const e = ++this._scheduleCount;
|
|
494
|
-
|
|
519
|
+
Be(() => {
|
|
495
520
|
this._scheduleCount !== e || this._disposed || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn()));
|
|
496
521
|
});
|
|
497
522
|
};
|
|
@@ -501,8 +526,16 @@ class H extends m {
|
|
|
501
526
|
get value() {
|
|
502
527
|
return this.get();
|
|
503
528
|
}
|
|
529
|
+
/**
|
|
530
|
+
* Disposes the computed signal and cancels any pending recomputations.
|
|
531
|
+
* This override increments the schedule count to invalidate all pending
|
|
532
|
+
* microtasks before disposing the signal.
|
|
533
|
+
*/
|
|
534
|
+
dispose = () => {
|
|
535
|
+
this._disposed || (this._scheduleCount++, this._disposed = !0, this._onDisposeListeners.forEach((e) => e()), this._onDisposeListeners.length = 0, this._derivatives.length = 0);
|
|
536
|
+
};
|
|
504
537
|
}
|
|
505
|
-
class
|
|
538
|
+
class Z extends g {
|
|
506
539
|
/**
|
|
507
540
|
* Checks if a value is a Prop.
|
|
508
541
|
* @param value - The value to check.
|
|
@@ -563,7 +596,7 @@ class Y extends m {
|
|
|
563
596
|
* @returns A Prop object representing the isomorphism.
|
|
564
597
|
*/
|
|
565
598
|
iso = (e, s, r = (n, i) => n === i) => {
|
|
566
|
-
const n = new
|
|
599
|
+
const n = new Z(e(this.get()), r);
|
|
567
600
|
return n.onDispose(this.on((i) => n.set(e(i)))), n.on((i) => this._setAndNotify(s(i))), n;
|
|
568
601
|
};
|
|
569
602
|
/**
|
|
@@ -586,10 +619,10 @@ class Y extends m {
|
|
|
586
619
|
this._setAndNotify(e);
|
|
587
620
|
}
|
|
588
621
|
}
|
|
589
|
-
const
|
|
590
|
-
const r = new
|
|
622
|
+
const z = (t, e, s = (r, n) => r === n) => {
|
|
623
|
+
const r = new $(t, s);
|
|
591
624
|
return e.forEach((n) => n.setDerivative(r)), r;
|
|
592
|
-
},
|
|
625
|
+
}, me = (t, e, s = {}) => {
|
|
593
626
|
let r = s.once ? () => {
|
|
594
627
|
i(), t();
|
|
595
628
|
} : t;
|
|
@@ -600,24 +633,24 @@ const re = (t, e, s = (r, n) => r === n) => {
|
|
|
600
633
|
o ? l() : o = !0;
|
|
601
634
|
};
|
|
602
635
|
}
|
|
603
|
-
const n =
|
|
636
|
+
const n = z(r, e), i = () => {
|
|
604
637
|
n.dispose(), s.abortSignal != null && s.abortSignal.removeEventListener("abort", i);
|
|
605
638
|
};
|
|
606
639
|
return s.abortSignal != null && s.abortSignal.addEventListener("abort", i), i;
|
|
607
|
-
},
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
);
|
|
611
|
-
function
|
|
640
|
+
}, T = (t, e = (s, r) => s === r) => {
|
|
641
|
+
const s = new Z(t, e), r = ge();
|
|
642
|
+
return r?.track(s), s;
|
|
643
|
+
}, K = (t, e = (s, r) => s === r) => new g(t, e);
|
|
644
|
+
function ye(t) {
|
|
612
645
|
return t != null && t !== !1 && t !== 0 && t !== "";
|
|
613
646
|
}
|
|
614
|
-
function
|
|
615
|
-
return !
|
|
647
|
+
function We(t) {
|
|
648
|
+
return !ye(t);
|
|
616
649
|
}
|
|
617
|
-
function
|
|
650
|
+
function Ue(t) {
|
|
618
651
|
return t == null;
|
|
619
652
|
}
|
|
620
|
-
function
|
|
653
|
+
function Je(t) {
|
|
621
654
|
return t != null;
|
|
622
655
|
}
|
|
623
656
|
const y = {
|
|
@@ -632,7 +665,7 @@ const y = {
|
|
|
632
665
|
* @param fn - The function to map the value.
|
|
633
666
|
* @returns The mapped value.
|
|
634
667
|
*/
|
|
635
|
-
map: (t, e) =>
|
|
668
|
+
map: (t, e) => g.is(t) ? t.map(e) : e(t),
|
|
636
669
|
/**
|
|
637
670
|
* Wraps a value or a Signal instance into a Signal.
|
|
638
671
|
* If the value is already a Signal, it returns the value itself.
|
|
@@ -643,7 +676,7 @@ const y = {
|
|
|
643
676
|
* @param equals - A function that determines if two values are equal. Defaults to strict equality (===).
|
|
644
677
|
* @returns A Signal instance.
|
|
645
678
|
*/
|
|
646
|
-
toSignal: (t, e) =>
|
|
679
|
+
toSignal: (t, e) => g.is(t) ? t.derive() : K(t, e),
|
|
647
680
|
/**
|
|
648
681
|
* Wraps a value in a `Signal` if it is not already a `Signal`.
|
|
649
682
|
* If the value is `null` or `undefined`, it returns `null` or `undefined` respectively.
|
|
@@ -659,14 +692,14 @@ const y = {
|
|
|
659
692
|
* @param value - The value or Signal instance to get the value from.
|
|
660
693
|
* @returns The value.
|
|
661
694
|
*/
|
|
662
|
-
get: (t) =>
|
|
695
|
+
get: (t) => g.is(t) ? t.get() : t,
|
|
663
696
|
/**
|
|
664
697
|
* Adds a listener to a `Signal` or calls the listener immediately if it is not a `Signal`.
|
|
665
698
|
* @param value - The value or Signal instance to add the listener to.
|
|
666
699
|
* @param listener - The listener to call when the value changes.
|
|
667
700
|
* @returns A function to remove the listener.
|
|
668
701
|
*/
|
|
669
|
-
on: (t, e) =>
|
|
702
|
+
on: (t, e) => g.is(t) ? t.on(e) : (e(t), () => {
|
|
670
703
|
}),
|
|
671
704
|
/**
|
|
672
705
|
* Disposes of a value or a Signal.
|
|
@@ -675,8 +708,16 @@ const y = {
|
|
|
675
708
|
* @param value - The value or Signal instance to dispose of.
|
|
676
709
|
*/
|
|
677
710
|
dispose: (t) => {
|
|
678
|
-
|
|
711
|
+
g.is(t) && t.dispose();
|
|
679
712
|
},
|
|
713
|
+
/**
|
|
714
|
+
* Returns a function that disposes of a value or a Signal.
|
|
715
|
+
* If the value is a Signal, it returns a function that disposes of the Signal.
|
|
716
|
+
* If the value is not a Signal, it returns a function that does nothing.
|
|
717
|
+
* @param value - The value or Signal instance to dispose of.
|
|
718
|
+
* @returns A function to dispose of the value or Signal.
|
|
719
|
+
*/
|
|
720
|
+
disposeFn: (t) => () => y.dispose(t),
|
|
680
721
|
/**
|
|
681
722
|
* Derives a Prop from a Signal.
|
|
682
723
|
* If the value is a Signal, it returns a new Prop with the derived value.
|
|
@@ -690,54 +731,246 @@ const y = {
|
|
|
690
731
|
deriveProp: (t, {
|
|
691
732
|
autoDisposeProp: e = !0,
|
|
692
733
|
equals: s
|
|
693
|
-
} = {}) =>
|
|
734
|
+
} = {}) => g.is(t) ? t.deriveProp({ autoDisposeProp: e, equals: s }) : T(t, s),
|
|
694
735
|
/**
|
|
695
736
|
* Creates a new signal that emits `true` if the value is truthy, `false` otherwise.
|
|
696
737
|
* @param value - The value or signal to check.
|
|
697
738
|
* @returns A signal that emits `true` if the value is truthy, `false` otherwise.
|
|
698
739
|
*/
|
|
699
|
-
truthy: (t) => y.map(t,
|
|
740
|
+
truthy: (t) => y.map(t, ye),
|
|
700
741
|
/**
|
|
701
742
|
* Creates a new signal that emits `true` if the value is falsy, `false` otherwise.
|
|
702
743
|
* @param value - The value or signal to check.
|
|
703
744
|
* @returns A signal that emits `true` if the value is falsy, `false` otherwise.
|
|
704
745
|
*/
|
|
705
|
-
falsy: (t) => y.map(t,
|
|
746
|
+
falsy: (t) => y.map(t, We),
|
|
706
747
|
/**
|
|
707
748
|
* Creates a new signal that emits `true` if the value is null or undefined, `false` otherwise.
|
|
708
749
|
* @param value - The value or signal to check.
|
|
709
750
|
* @returns A signal that emits `true` if the value is null or undefined, `false` otherwise.
|
|
710
751
|
*/
|
|
711
|
-
nil: (t) => y.map(t,
|
|
752
|
+
nil: (t) => y.map(t, Ue),
|
|
712
753
|
/**
|
|
713
754
|
* Creates a new signal that emits `true` if the value is not null or undefined, `false` otherwise.
|
|
714
755
|
* @param value - The value or signal to check.
|
|
715
756
|
* @returns A signal that emits `true` if the value is not null or undefined, `false` otherwise.
|
|
716
757
|
*/
|
|
717
|
-
defined: (t) => y.map(t,
|
|
718
|
-
},
|
|
758
|
+
defined: (t) => y.map(t, Je)
|
|
759
|
+
}, ee = (...t) => (e, s) => {
|
|
719
760
|
if (t.length === 1)
|
|
720
761
|
return y.toSignal(t[0]).map(e);
|
|
721
|
-
const r = t.filter((n) =>
|
|
722
|
-
return
|
|
762
|
+
const r = t.filter((n) => g.is(n));
|
|
763
|
+
return z(
|
|
723
764
|
() => e(...t.map((n) => y.get(n))),
|
|
724
765
|
r,
|
|
725
766
|
s
|
|
726
767
|
);
|
|
727
|
-
},
|
|
768
|
+
}, Jt = (t) => {
|
|
728
769
|
const e = Object.keys(t);
|
|
729
|
-
return
|
|
770
|
+
return ee(...Object.values(t))(
|
|
730
771
|
(...s) => Object.fromEntries(e.map((r, n) => [r, s[n]]))
|
|
731
772
|
);
|
|
732
|
-
},
|
|
733
|
-
const r = t.filter((n) =>
|
|
734
|
-
return
|
|
773
|
+
}, Ge = (...t) => (e, s = {}) => {
|
|
774
|
+
const r = t.filter((n) => g.is(n));
|
|
775
|
+
return me(
|
|
735
776
|
() => e(...t.map(y.get)),
|
|
736
777
|
r,
|
|
737
778
|
s
|
|
738
779
|
);
|
|
739
780
|
};
|
|
740
|
-
class
|
|
781
|
+
class q {
|
|
782
|
+
_signals = /* @__PURE__ */ new Set();
|
|
783
|
+
_callbacks = [];
|
|
784
|
+
_disposed = !1;
|
|
785
|
+
/**
|
|
786
|
+
* Register a signal with this scope for automatic disposal.
|
|
787
|
+
*
|
|
788
|
+
* @param signal - The signal to track
|
|
789
|
+
* @throws Error if the scope has already been disposed
|
|
790
|
+
* @throws Error if the signal has already been disposed
|
|
791
|
+
* @public
|
|
792
|
+
*/
|
|
793
|
+
track(e) {
|
|
794
|
+
if (this._disposed)
|
|
795
|
+
throw new Error("Cannot track signal in disposed scope");
|
|
796
|
+
if (e.isDisposed())
|
|
797
|
+
throw new Error("Cannot track already disposed signal");
|
|
798
|
+
this._signals.add(e);
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* Register a disposal callback to be called when this scope is disposed.
|
|
802
|
+
* Callbacks are called before signals are disposed.
|
|
803
|
+
* Use this for cleanup that doesn't need the `removeTree` parameter.
|
|
804
|
+
*
|
|
805
|
+
* @param callback - The callback to call on disposal
|
|
806
|
+
* @throws Error if the scope has already been disposed
|
|
807
|
+
* @public
|
|
808
|
+
*/
|
|
809
|
+
onDispose(e) {
|
|
810
|
+
if (this._disposed)
|
|
811
|
+
throw new Error("Cannot register callback in disposed scope");
|
|
812
|
+
this._callbacks.push(e);
|
|
813
|
+
}
|
|
814
|
+
/**
|
|
815
|
+
* Dispose all signals tracked by this scope.
|
|
816
|
+
* This method is idempotent - calling it multiple times is safe.
|
|
817
|
+
*
|
|
818
|
+
* @public
|
|
819
|
+
*/
|
|
820
|
+
dispose() {
|
|
821
|
+
if (!this._disposed) {
|
|
822
|
+
this._disposed = !0;
|
|
823
|
+
for (const e of this._callbacks)
|
|
824
|
+
try {
|
|
825
|
+
e();
|
|
826
|
+
} catch (s) {
|
|
827
|
+
console.error("Error in disposal callback:", s);
|
|
828
|
+
}
|
|
829
|
+
this._callbacks.length = 0;
|
|
830
|
+
for (const e of this._signals)
|
|
831
|
+
e.dispose();
|
|
832
|
+
this._signals.clear();
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
/**
|
|
836
|
+
* Check if this scope has been disposed.
|
|
837
|
+
*
|
|
838
|
+
* @returns true if the scope has been disposed
|
|
839
|
+
* @public
|
|
840
|
+
*/
|
|
841
|
+
get disposed() {
|
|
842
|
+
return this._disposed;
|
|
843
|
+
}
|
|
844
|
+
/**
|
|
845
|
+
* Creates a prop signal and tracks it in this scope.
|
|
846
|
+
* Use this method in async contexts where automatic tracking doesn't work.
|
|
847
|
+
*
|
|
848
|
+
* @param value - The initial value
|
|
849
|
+
* @param equals - Optional equality function
|
|
850
|
+
* @returns A tracked Prop signal
|
|
851
|
+
* @public
|
|
852
|
+
*/
|
|
853
|
+
prop(e, s) {
|
|
854
|
+
const r = oe(() => T(e, s));
|
|
855
|
+
return this.track(r), r;
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* Creates a computed signal and tracks it in this scope.
|
|
859
|
+
* Use this method in async contexts where automatic tracking doesn't work.
|
|
860
|
+
*
|
|
861
|
+
* @param fn - The computation function
|
|
862
|
+
* @param dependencies - Array of signals this computed depends on
|
|
863
|
+
* @param equals - Optional equality function
|
|
864
|
+
* @returns A tracked Computed signal
|
|
865
|
+
* @public
|
|
866
|
+
*/
|
|
867
|
+
computed(e, s, r) {
|
|
868
|
+
const n = oe(() => z(e, s, r));
|
|
869
|
+
return this.track(n), n;
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* Creates an effect and tracks it in this scope.
|
|
873
|
+
* Use this method in async contexts where automatic tracking doesn't work.
|
|
874
|
+
*
|
|
875
|
+
* @param fn - The effect function
|
|
876
|
+
* @param signals - Array of signals to listen to
|
|
877
|
+
* @param options - Optional listener options
|
|
878
|
+
* @returns A clear function (the effect itself is tracked in the scope)
|
|
879
|
+
* @public
|
|
880
|
+
*/
|
|
881
|
+
effect(e, s, r) {
|
|
882
|
+
return L(this, () => me(e, s, r));
|
|
883
|
+
}
|
|
884
|
+
/**
|
|
885
|
+
* Creates a computed signal with curried signature and tracks it in this scope.
|
|
886
|
+
* Use this method in async contexts where automatic tracking doesn't work.
|
|
887
|
+
*
|
|
888
|
+
* @param args - Values or signals to compute from
|
|
889
|
+
* @returns A function that takes the computation function and returns a tracked Computed signal
|
|
890
|
+
* @public
|
|
891
|
+
*/
|
|
892
|
+
computedOf(...e) {
|
|
893
|
+
return (s, r) => {
|
|
894
|
+
const n = oe(() => ee(...e)(s, r));
|
|
895
|
+
return this.track(n), n;
|
|
896
|
+
};
|
|
897
|
+
}
|
|
898
|
+
/**
|
|
899
|
+
* Creates an effect with curried signature and tracks it in this scope.
|
|
900
|
+
* Use this method in async contexts where automatic tracking doesn't work.
|
|
901
|
+
*
|
|
902
|
+
* @param args - Values or signals to listen to
|
|
903
|
+
* @returns A function that takes the effect function and returns a clear function
|
|
904
|
+
* @public
|
|
905
|
+
*/
|
|
906
|
+
effectOf(...e) {
|
|
907
|
+
return (s, r) => L(this, () => Ge(...e)(s, r));
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
const Xe = (t, e, s) => t + (e - t) * s, de = 97, Ye = (t, e, s) => {
|
|
911
|
+
const r = Math.max(t.length, e.length);
|
|
912
|
+
let n = "";
|
|
913
|
+
for (let i = 0; i < r; i++) {
|
|
914
|
+
let o = t.charCodeAt(i);
|
|
915
|
+
isNaN(o) && (o = de);
|
|
916
|
+
let l = e.charCodeAt(i);
|
|
917
|
+
isNaN(l) && (l = de), n += String.fromCharCode(o + (l - o) * s);
|
|
918
|
+
}
|
|
919
|
+
return n;
|
|
920
|
+
}, Qe = (t, e, s) => new Date(t.getTime() + (e.getTime() - t.getTime()) * s), Ze = (t, e) => e, ze = (t) => typeof t == "number" ? Xe : typeof t == "string" ? Ye : t instanceof Date ? Qe : Ze;
|
|
921
|
+
class le {
|
|
922
|
+
/**
|
|
923
|
+
* Creates a new instance of `ElementPosition`.
|
|
924
|
+
* @param index - The index of the element.
|
|
925
|
+
* @param total - The total number of elements in the collection.
|
|
926
|
+
*/
|
|
927
|
+
constructor(e, s) {
|
|
928
|
+
this.index = e, this.total = s, this.counter = e + 1, this.isFirst = e === 0, this.isEven = e % 2 === 1, this.isOdd = e % 2 === 0;
|
|
929
|
+
}
|
|
930
|
+
/**
|
|
931
|
+
* The counter of the element starting from 1.
|
|
932
|
+
*/
|
|
933
|
+
counter;
|
|
934
|
+
/**
|
|
935
|
+
* Checks if the element is the first element in the collection.
|
|
936
|
+
* @returns `true` if the element is the first element, `false` otherwise.
|
|
937
|
+
*/
|
|
938
|
+
isFirst;
|
|
939
|
+
/**
|
|
940
|
+
* Checks if the counter of the element is even.
|
|
941
|
+
* @returns `true` if the counter is even, `false` otherwise.
|
|
942
|
+
*/
|
|
943
|
+
isEven;
|
|
944
|
+
/**
|
|
945
|
+
* Checks if the counter of the element is odd.
|
|
946
|
+
* @returns `true` if the counter is odd, `false` otherwise.
|
|
947
|
+
*/
|
|
948
|
+
isOdd;
|
|
949
|
+
#e;
|
|
950
|
+
/**
|
|
951
|
+
* Checks if the element is the last element in the collection.
|
|
952
|
+
* @returns `true` if the element is the last element, `false` otherwise.
|
|
953
|
+
*/
|
|
954
|
+
get isLast() {
|
|
955
|
+
return this.#e == null && (this.#e = this.total.map((e) => this.counter === e)), this.#e;
|
|
956
|
+
}
|
|
957
|
+
/**
|
|
958
|
+
* Disposes the internal signal created by `isLast`.
|
|
959
|
+
*
|
|
960
|
+
* **Note:** With automatic signal disposal, this method is now a no-op when used within
|
|
961
|
+
* a disposal scope (e.g., inside a renderable). The signal created by `isLast` is
|
|
962
|
+
* automatically tracked and disposed when the scope ends. This method is kept for
|
|
963
|
+
* backward compatibility and for cases where ElementPosition is used outside a scope.
|
|
964
|
+
*/
|
|
965
|
+
dispose = () => {
|
|
966
|
+
this.#e?.dispose(), this.#e = void 0;
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
const ce = () => (
|
|
970
|
+
/* c8 ignore next */
|
|
971
|
+
typeof window < "u" ? window : void 0
|
|
972
|
+
);
|
|
973
|
+
class be {
|
|
741
974
|
_store = /* @__PURE__ */ new Map();
|
|
742
975
|
/**
|
|
743
976
|
* Retrieves the value associated with the specified key from the memory store.
|
|
@@ -754,7 +987,7 @@ class fe {
|
|
|
754
987
|
this._store.set(e, s);
|
|
755
988
|
};
|
|
756
989
|
}
|
|
757
|
-
const
|
|
990
|
+
const Se = ({
|
|
758
991
|
key: t,
|
|
759
992
|
defaultValue: e,
|
|
760
993
|
store: s,
|
|
@@ -766,44 +999,44 @@ const de = ({
|
|
|
766
999
|
onKeyChange: c = "load"
|
|
767
1000
|
}) => {
|
|
768
1001
|
let a = y.get(t);
|
|
769
|
-
const u = s.getItem(a),
|
|
1002
|
+
const u = s.getItem(a), h = new Z(
|
|
770
1003
|
u != null ? o(n(u)) : typeof e == "function" ? e() : e,
|
|
771
1004
|
i
|
|
772
|
-
),
|
|
773
|
-
let
|
|
774
|
-
const
|
|
1005
|
+
), p = ce(), f = l && typeof p?.BroadcastChannel == "function";
|
|
1006
|
+
let m = !1, S = null, D = null;
|
|
1007
|
+
const w = (b) => {
|
|
775
1008
|
if (!f) return null;
|
|
776
|
-
const
|
|
777
|
-
const v =
|
|
778
|
-
if (!(v == null || typeof v != "object" || v.key !== b || typeof v.value != "string" || v.sourceId != null && v.sourceId ===
|
|
1009
|
+
const k = `tempo:storedProp:${b}`, A = new p.BroadcastChannel(k), M = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`, x = (F) => {
|
|
1010
|
+
const v = F.data;
|
|
1011
|
+
if (!(v == null || typeof v != "object" || v.key !== b || typeof v.value != "string" || v.sourceId != null && v.sourceId === M))
|
|
779
1012
|
try {
|
|
780
|
-
|
|
781
|
-
const
|
|
782
|
-
|
|
783
|
-
} catch (
|
|
1013
|
+
m = !0;
|
|
1014
|
+
const ie = o(n(v.value));
|
|
1015
|
+
h.set(ie);
|
|
1016
|
+
} catch (ie) {
|
|
784
1017
|
console.warn(
|
|
785
1018
|
`Failed to sync storedProp for key "${b}" via BroadcastChannel`,
|
|
786
|
-
|
|
1019
|
+
ie
|
|
787
1020
|
);
|
|
788
1021
|
} finally {
|
|
789
|
-
|
|
1022
|
+
m = !1;
|
|
790
1023
|
}
|
|
791
1024
|
};
|
|
792
|
-
return A.addEventListener("message", x),
|
|
1025
|
+
return A.addEventListener("message", x), h.onDispose(() => {
|
|
793
1026
|
A?.removeEventListener("message", x), A?.close();
|
|
794
|
-
}), { channel: A, instanceId:
|
|
795
|
-
}, P =
|
|
796
|
-
P && (
|
|
797
|
-
const
|
|
798
|
-
const
|
|
799
|
-
if (
|
|
800
|
-
const A =
|
|
801
|
-
if (s.setItem(
|
|
802
|
-
const
|
|
803
|
-
if (
|
|
1027
|
+
}), { channel: A, instanceId: M, handleMessage: x };
|
|
1028
|
+
}, P = w(a);
|
|
1029
|
+
P && (S = P.channel, D = P.instanceId);
|
|
1030
|
+
const ne = (b) => {
|
|
1031
|
+
const k = a;
|
|
1032
|
+
if (k === b) return;
|
|
1033
|
+
const A = h.get(), M = r(A);
|
|
1034
|
+
if (s.setItem(k, M), S != null && (S.close(), S = null, D = null), a = b, c === "load") {
|
|
1035
|
+
const F = s.getItem(b);
|
|
1036
|
+
if (F != null)
|
|
804
1037
|
try {
|
|
805
|
-
const v = o(n(
|
|
806
|
-
|
|
1038
|
+
const v = o(n(F));
|
|
1039
|
+
h.set(v);
|
|
807
1040
|
} catch (v) {
|
|
808
1041
|
console.warn(
|
|
809
1042
|
`Failed to load storedProp from new key "${b}"`,
|
|
@@ -811,68 +1044,68 @@ const de = ({
|
|
|
811
1044
|
);
|
|
812
1045
|
}
|
|
813
1046
|
else
|
|
814
|
-
s.setItem(b,
|
|
815
|
-
} else c === "migrate" && s.setItem(b,
|
|
816
|
-
const x =
|
|
817
|
-
x && (
|
|
1047
|
+
s.setItem(b, M);
|
|
1048
|
+
} else c === "migrate" && s.setItem(b, M);
|
|
1049
|
+
const x = w(b);
|
|
1050
|
+
x && (S = x.channel, D = x.instanceId);
|
|
818
1051
|
};
|
|
819
|
-
return
|
|
1052
|
+
return g.is(t) && h.onDispose(t.on(ne)), h.on((b, k) => {
|
|
820
1053
|
const A = r(b);
|
|
821
|
-
s.setItem(a, A),
|
|
1054
|
+
s.setItem(a, A), S != null && !m && k !== void 0 && D != null && S.postMessage({
|
|
822
1055
|
key: a,
|
|
823
1056
|
value: A,
|
|
824
|
-
sourceId:
|
|
1057
|
+
sourceId: D
|
|
825
1058
|
});
|
|
826
|
-
}),
|
|
827
|
-
},
|
|
1059
|
+
}), h;
|
|
1060
|
+
}, Gt = (t) => Se({
|
|
828
1061
|
...t,
|
|
829
1062
|
/* c8 ignore next 3 */
|
|
830
|
-
store:
|
|
831
|
-
}),
|
|
1063
|
+
store: ce()?.localStorage ?? new be()
|
|
1064
|
+
}), Xt = (t) => Se({
|
|
832
1065
|
...t,
|
|
833
1066
|
/* c8 ignore next 3 */
|
|
834
|
-
store:
|
|
1067
|
+
store: ce()?.sessionStorage ?? new be()
|
|
835
1068
|
});
|
|
836
|
-
function
|
|
1069
|
+
function fe(t) {
|
|
837
1070
|
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(t) : setTimeout(t, 0);
|
|
838
1071
|
}
|
|
839
|
-
const
|
|
840
|
-
const n = r?.duration ?? 300, i = r?.easing ?? ((
|
|
841
|
-
let l = r?.interpolate, c = t, a = e(), u = performance.now(),
|
|
842
|
-
const f = new
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
}),
|
|
846
|
-
|
|
1072
|
+
const Ke = (t, e, s, r) => {
|
|
1073
|
+
const n = r?.duration ?? 300, i = r?.easing ?? ((w) => w), o = r?.equals ?? ((w, P) => w === P);
|
|
1074
|
+
let l = r?.interpolate, c = t, a = e(), u = performance.now(), h = null, p = !0;
|
|
1075
|
+
const f = new $(e, o), m = T(t, o);
|
|
1076
|
+
m.onDispose(() => {
|
|
1077
|
+
h !== null && cancelAnimationFrame(h);
|
|
1078
|
+
}), m.onDispose(f.dispose), s.forEach((w) => {
|
|
1079
|
+
w.setDerivative(f), w.onDispose(m.dispose);
|
|
847
1080
|
});
|
|
848
|
-
const
|
|
849
|
-
a =
|
|
850
|
-
},
|
|
851
|
-
const P = (performance.now() - u) / y.get(n),
|
|
852
|
-
l == null && (l =
|
|
853
|
-
let b = l(c, a,
|
|
854
|
-
P >= 1 ? (
|
|
855
|
-
};
|
|
856
|
-
return f.on(
|
|
857
|
-
},
|
|
1081
|
+
const S = (w) => {
|
|
1082
|
+
a = w, u = performance.now(), c = m.value, p && (p = !1, h = fe(D));
|
|
1083
|
+
}, D = () => {
|
|
1084
|
+
const P = (performance.now() - u) / y.get(n), ne = i(P);
|
|
1085
|
+
l == null && (l = ze(c));
|
|
1086
|
+
let b = l(c, a, ne);
|
|
1087
|
+
P >= 1 ? (p = !0, b = a) : h = fe(D), m.set(b);
|
|
1088
|
+
};
|
|
1089
|
+
return f.on(S), m;
|
|
1090
|
+
}, Yt = (t, e) => {
|
|
858
1091
|
const { initialValue: s, ...r } = e ?? {};
|
|
859
|
-
return
|
|
1092
|
+
return Ke(
|
|
860
1093
|
/* c8 ignore next 2 */
|
|
861
1094
|
s ?? t.get(),
|
|
862
1095
|
t.get,
|
|
863
1096
|
[t],
|
|
864
1097
|
r
|
|
865
1098
|
);
|
|
866
|
-
},
|
|
867
|
-
const s = Object.values(t).filter(
|
|
868
|
-
return
|
|
1099
|
+
}, et = (t, e) => {
|
|
1100
|
+
const s = Object.values(t).filter(g.is), r = Object.keys(t);
|
|
1101
|
+
return z(() => {
|
|
869
1102
|
const n = {};
|
|
870
1103
|
for (const i of r)
|
|
871
1104
|
n[i] = y.get(t[i]);
|
|
872
1105
|
return e(n);
|
|
873
1106
|
}, s);
|
|
874
|
-
},
|
|
875
|
-
const s =
|
|
1107
|
+
}, Qt = (t) => et(t, (e) => e), Zt = (t, e) => {
|
|
1108
|
+
const s = T(t.get());
|
|
876
1109
|
let r = null;
|
|
877
1110
|
const n = t.on((i) => {
|
|
878
1111
|
r != null && clearTimeout(r), r = setTimeout(
|
|
@@ -885,33 +1118,33 @@ const Ue = (t, e, s, r) => {
|
|
|
885
1118
|
return s.onDispose(() => {
|
|
886
1119
|
n(), r != null && clearTimeout(r);
|
|
887
1120
|
}), s;
|
|
888
|
-
},
|
|
1121
|
+
}, zt = (t) => {
|
|
889
1122
|
let e;
|
|
890
1123
|
return t.map((s) => {
|
|
891
1124
|
const r = e;
|
|
892
1125
|
return e = s, r;
|
|
893
1126
|
});
|
|
894
|
-
},
|
|
1127
|
+
}, Kt = ({
|
|
895
1128
|
size: t = void 0,
|
|
896
1129
|
signal: e
|
|
897
1130
|
}) => {
|
|
898
1131
|
const s = [];
|
|
899
1132
|
return e.map((r) => (s.push(r), t != null && s.length > t && s.shift(), s.slice()));
|
|
900
|
-
},
|
|
1133
|
+
}, es = (t) => (...e) => ee(
|
|
901
1134
|
t,
|
|
902
1135
|
...e
|
|
903
1136
|
)((s, ...r) => s(...r));
|
|
904
|
-
function
|
|
905
|
-
return
|
|
1137
|
+
function ts(...t) {
|
|
1138
|
+
return ee(...t)((...e) => {
|
|
906
1139
|
for (const s of e) if (s != null) return s;
|
|
907
1140
|
});
|
|
908
1141
|
}
|
|
909
|
-
const
|
|
1142
|
+
const we = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), _e = /* @__PURE__ */ new Set(["selected"]), ve = /* @__PURE__ */ new Set([
|
|
910
1143
|
"rowSpan",
|
|
911
1144
|
"colSpan",
|
|
912
1145
|
"tabIndex",
|
|
913
1146
|
"valueAsNumber"
|
|
914
|
-
]),
|
|
1147
|
+
]), Te = /* @__PURE__ */ new Set(["valueAsDate"]), Ae = /* @__PURE__ */ new Set([
|
|
915
1148
|
"value",
|
|
916
1149
|
"textContent",
|
|
917
1150
|
"innerText",
|
|
@@ -919,28 +1152,28 @@ const pe = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), me = /* @
|
|
|
919
1152
|
"outerHTML",
|
|
920
1153
|
"className",
|
|
921
1154
|
"classList"
|
|
922
|
-
]),
|
|
1155
|
+
]), tt = (t, e) => _e.has(t) ? (s) => {
|
|
923
1156
|
s == null || s !== !0 ? e.removeAttribute(t) : e.setAttribute(t, "");
|
|
924
|
-
} :
|
|
1157
|
+
} : we.has(t) ? (s) => {
|
|
925
1158
|
s == null ? e[t] = null : e[t] = !!s;
|
|
926
|
-
} :
|
|
1159
|
+
} : ve.has(t) ? (s) => {
|
|
927
1160
|
s == null ? e[t] = null : e[t] = Number(s);
|
|
928
|
-
} :
|
|
1161
|
+
} : Te.has(t) ? (s) => {
|
|
929
1162
|
s == null ? e[t] = null : e[t] = s;
|
|
930
|
-
} :
|
|
1163
|
+
} : Ae.has(t) ? (s) => {
|
|
931
1164
|
s == null ? e[t] = null : e[t] = String(s);
|
|
932
1165
|
} : (s) => {
|
|
933
1166
|
s == null ? e.removeAttribute(t) : e.setAttribute(t, s);
|
|
934
|
-
},
|
|
1167
|
+
}, st = (t, e) => _e.has(t) ? () => e.hasAttribute(t) : we.has(t) ? () => !!e[t] : ve.has(t) ? () => Number(e[t]) : Te.has(t) ? () => e[t] : Ae.has(t) ? () => String(e[t]) : () => e.getAttribute(t), U = (t) => {
|
|
935
1168
|
const e = t;
|
|
936
1169
|
e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.parentElement && t.parentElement.removeChild(t);
|
|
937
|
-
},
|
|
938
|
-
class
|
|
1170
|
+
}, rt = (t) => Ee(t) ? t : t.parentElement, Ee = (t) => t.nodeType === 1;
|
|
1171
|
+
class Ce extends Error {
|
|
939
1172
|
constructor(e) {
|
|
940
1173
|
super(`Provider not found: ${e.description}`);
|
|
941
1174
|
}
|
|
942
1175
|
}
|
|
943
|
-
class
|
|
1176
|
+
class N {
|
|
944
1177
|
/**
|
|
945
1178
|
* Constructs a new `DOMContext` instance.
|
|
946
1179
|
*
|
|
@@ -962,7 +1195,7 @@ class k {
|
|
|
962
1195
|
* @returns A new `DOMContext` instance.
|
|
963
1196
|
*/
|
|
964
1197
|
static of(e, s, r) {
|
|
965
|
-
return new
|
|
1198
|
+
return new N(e.ownerDocument, e, s, r);
|
|
966
1199
|
}
|
|
967
1200
|
/**
|
|
968
1201
|
* Creates a new DOM element (eg: HTML or SVG) with the specified tag name and namespace.
|
|
@@ -1047,7 +1280,7 @@ class k {
|
|
|
1047
1280
|
* @param element - The DOM element to use in the new `DOMContext` instance.
|
|
1048
1281
|
* @returns A new `DOMContext` instance with the provided `element`.
|
|
1049
1282
|
*/
|
|
1050
|
-
withElement = (e) => new
|
|
1283
|
+
withElement = (e) => new N(this.document, e, void 0, this.providers);
|
|
1051
1284
|
/**
|
|
1052
1285
|
* Creates a portal to render content in a different part of the DOM tree.
|
|
1053
1286
|
*
|
|
@@ -1104,7 +1337,7 @@ class k {
|
|
|
1104
1337
|
* @param reference - The optional `Text` node to use as the reference for the new `DOMContext`.
|
|
1105
1338
|
* @returns A new `DOMContext` instance with the specified reference.
|
|
1106
1339
|
*/
|
|
1107
|
-
withReference = (e) => new
|
|
1340
|
+
withReference = (e) => new N(this.document, this.element, e, this.providers);
|
|
1108
1341
|
/**
|
|
1109
1342
|
* Sets a provider for the given provider mark.
|
|
1110
1343
|
*
|
|
@@ -1112,7 +1345,7 @@ class k {
|
|
|
1112
1345
|
* @param value - The provider to set for the given mark.
|
|
1113
1346
|
* @returns A new `DOMContext` instance with the specified provider.
|
|
1114
1347
|
*/
|
|
1115
|
-
setProvider = (e, s, r) => new
|
|
1348
|
+
setProvider = (e, s, r) => new N(this.document, this.element, this.reference, {
|
|
1116
1349
|
...this.providers,
|
|
1117
1350
|
[e]: [s, r]
|
|
1118
1351
|
});
|
|
@@ -1125,12 +1358,12 @@ class k {
|
|
|
1125
1358
|
*/
|
|
1126
1359
|
getProvider = (e) => {
|
|
1127
1360
|
if (this.providers[e] === void 0)
|
|
1128
|
-
throw new
|
|
1361
|
+
throw new Ce(e);
|
|
1129
1362
|
const [s, r] = this.providers[e];
|
|
1130
1363
|
return { value: s, onUse: r };
|
|
1131
1364
|
};
|
|
1132
1365
|
clear = (e) => {
|
|
1133
|
-
e && (this.reference !== void 0 ?
|
|
1366
|
+
e && (this.reference !== void 0 ? U(this.reference) : U(this.element));
|
|
1134
1367
|
};
|
|
1135
1368
|
/**
|
|
1136
1369
|
* Adds classes to the element.
|
|
@@ -1200,55 +1433,57 @@ class k {
|
|
|
1200
1433
|
*/
|
|
1201
1434
|
getStyle = (e) => this.element.style[e];
|
|
1202
1435
|
makeAccessors = (e) => ({
|
|
1203
|
-
get:
|
|
1204
|
-
set:
|
|
1436
|
+
get: st(e, this.element),
|
|
1437
|
+
set: tt(e, this.element)
|
|
1205
1438
|
});
|
|
1206
1439
|
getWindow = () => this.document.defaultView;
|
|
1207
1440
|
}
|
|
1208
|
-
const
|
|
1209
|
-
const s = t(e);
|
|
1210
|
-
return (
|
|
1211
|
-
|
|
1441
|
+
const nt = (t) => Symbol(t), ae = (t, e) => {
|
|
1442
|
+
const s = new q(), r = L(s, () => t(e));
|
|
1443
|
+
return (n = !0) => {
|
|
1444
|
+
s.dispose(), r(n);
|
|
1445
|
+
};
|
|
1446
|
+
}, ss = (t, e, { doc: s, clear: r, disposeWithParent: n = !0, providers: i = {} } = {}) => {
|
|
1212
1447
|
const o = typeof e == "string" ? (s ?? document).querySelector(e) : e;
|
|
1213
1448
|
if (o === null)
|
|
1214
|
-
throw new
|
|
1449
|
+
throw new it(
|
|
1215
1450
|
`Cannot find element by selector for render: ${e}`
|
|
1216
1451
|
);
|
|
1217
1452
|
r !== !1 && (s ?? o.ownerDocument) != null && o.nodeType === 1 && (o.innerHTML = "");
|
|
1218
|
-
const l =
|
|
1219
|
-
let
|
|
1220
|
-
return n && (
|
|
1221
|
-
|
|
1222
|
-
f === o && (
|
|
1453
|
+
const l = rt(o), c = Ee(o) ? void 0 : o, a = N.of(l, c, i), u = ae(t, a);
|
|
1454
|
+
let h;
|
|
1455
|
+
return n && (h = new MutationObserver((p) => {
|
|
1456
|
+
p[0]?.removedNodes.forEach((f) => {
|
|
1457
|
+
f === o && (h?.disconnect(), u(o.nodeType !== 1));
|
|
1223
1458
|
});
|
|
1224
|
-
}),
|
|
1459
|
+
}), h.observe(o.parentElement, {
|
|
1225
1460
|
childList: !0,
|
|
1226
1461
|
subtree: !1,
|
|
1227
1462
|
attributes: !1
|
|
1228
1463
|
})), () => {
|
|
1229
|
-
|
|
1464
|
+
h?.disconnect(), u(!0);
|
|
1230
1465
|
};
|
|
1231
|
-
},
|
|
1466
|
+
}, rs = (t, {
|
|
1232
1467
|
startUrl: e = "https://example.com",
|
|
1233
1468
|
selector: s,
|
|
1234
1469
|
providers: r = {}
|
|
1235
1470
|
} = {
|
|
1236
1471
|
selector: "body"
|
|
1237
1472
|
}) => {
|
|
1238
|
-
const n = y.toSignal(e).deriveProp(), i = new
|
|
1473
|
+
const n = y.toSignal(e).deriveProp(), i = new Oe(s, void 0), o = new R(i, void 0, { currentURL: n }, r);
|
|
1239
1474
|
return {
|
|
1240
|
-
clear:
|
|
1475
|
+
clear: ae(t(), o),
|
|
1241
1476
|
root: i,
|
|
1242
1477
|
currentURL: n
|
|
1243
1478
|
};
|
|
1244
1479
|
};
|
|
1245
|
-
class
|
|
1480
|
+
class it extends Error {
|
|
1246
1481
|
constructor(e) {
|
|
1247
1482
|
super(e);
|
|
1248
1483
|
}
|
|
1249
1484
|
}
|
|
1250
|
-
const
|
|
1251
|
-
class
|
|
1485
|
+
const De = "data-tts-node", J = "data-tts-class", G = "data-tts-style", X = "data-tts-html", Y = "data-tts-text", Q = "data-tts-attrs";
|
|
1486
|
+
class ns {
|
|
1252
1487
|
/**
|
|
1253
1488
|
* Selects elements from the headless environment.
|
|
1254
1489
|
* @param selector - The selector to select elements from. The supported selectors are CSS selectors whose complexity depends on the adapter implementation.
|
|
@@ -1333,10 +1568,10 @@ class Gt {
|
|
|
1333
1568
|
appendHTML: c,
|
|
1334
1569
|
getInnerHTML: a,
|
|
1335
1570
|
setInnerHTML: u,
|
|
1336
|
-
getInnerText:
|
|
1337
|
-
setInnerText:
|
|
1571
|
+
getInnerText: h,
|
|
1572
|
+
setInnerText: p
|
|
1338
1573
|
}) {
|
|
1339
|
-
this.select = e, this.getAttribute = s, this.setAttribute = r, this.getClass = n, this.setClass = i, this.getStyles = o, this.setStyles = l, this.appendHTML = c, this.getInnerHTML = a, this.setInnerHTML = u, this.getInnerText =
|
|
1574
|
+
this.select = e, this.getAttribute = s, this.setAttribute = r, this.getClass = n, this.setClass = i, this.getStyles = o, this.setStyles = l, this.appendHTML = c, this.getInnerHTML = a, this.setInnerHTML = u, this.getInnerText = h, this.setInnerText = p;
|
|
1340
1575
|
}
|
|
1341
1576
|
/**
|
|
1342
1577
|
* Sets the content of the root element from a HeadlessPortal. Generally this will be the same instance that is
|
|
@@ -1357,21 +1592,21 @@ class Gt {
|
|
|
1357
1592
|
if (n.hasChildren() && this.appendHTML(o, n.contentToHTML(s)), n.hasInnerHTML()) {
|
|
1358
1593
|
if (s) {
|
|
1359
1594
|
const l = this.getInnerHTML(o);
|
|
1360
|
-
l != null && this.setAttribute(o,
|
|
1595
|
+
l != null && this.setAttribute(o, X, l);
|
|
1361
1596
|
}
|
|
1362
1597
|
this.setInnerHTML(o, n.getInnerHTML());
|
|
1363
1598
|
}
|
|
1364
1599
|
if (n.hasInnerText()) {
|
|
1365
1600
|
if (s) {
|
|
1366
1601
|
const l = this.getInnerText(o);
|
|
1367
|
-
l != null && this.setAttribute(o,
|
|
1602
|
+
l != null && this.setAttribute(o, Y, l);
|
|
1368
1603
|
}
|
|
1369
1604
|
this.setInnerText(o, n.getInnerText());
|
|
1370
1605
|
}
|
|
1371
1606
|
if (n.hasClasses()) {
|
|
1372
1607
|
if (s) {
|
|
1373
1608
|
const l = this.getClass(o);
|
|
1374
|
-
l != null && this.setAttribute(o,
|
|
1609
|
+
l != null && this.setAttribute(o, J, l);
|
|
1375
1610
|
}
|
|
1376
1611
|
this.setClass(o, n.getClasses().join(" "));
|
|
1377
1612
|
}
|
|
@@ -1380,7 +1615,7 @@ class Gt {
|
|
|
1380
1615
|
const l = this.getStyles(o);
|
|
1381
1616
|
Object.keys(l).length > 0 && this.setAttribute(
|
|
1382
1617
|
o,
|
|
1383
|
-
|
|
1618
|
+
G,
|
|
1384
1619
|
JSON.stringify(l)
|
|
1385
1620
|
);
|
|
1386
1621
|
}
|
|
@@ -1395,7 +1630,7 @@ class Gt {
|
|
|
1395
1630
|
u != null && c.push([a, u]);
|
|
1396
1631
|
}), c.length > 0 && this.setAttribute(
|
|
1397
1632
|
o,
|
|
1398
|
-
|
|
1633
|
+
Q,
|
|
1399
1634
|
JSON.stringify(Object.fromEntries(c))
|
|
1400
1635
|
);
|
|
1401
1636
|
}
|
|
@@ -1407,56 +1642,56 @@ class Gt {
|
|
|
1407
1642
|
});
|
|
1408
1643
|
};
|
|
1409
1644
|
}
|
|
1410
|
-
const
|
|
1411
|
-
document.querySelectorAll(`[${
|
|
1412
|
-
},
|
|
1413
|
-
const e = t.getAttribute(W);
|
|
1414
|
-
t.removeAttribute(W), e != null && t.setAttribute("class", e);
|
|
1415
|
-
}, et = () => {
|
|
1416
|
-
document.querySelectorAll(`[${W}]`).forEach((e) => Ke(e));
|
|
1417
|
-
}, tt = (t) => {
|
|
1645
|
+
const ot = () => {
|
|
1646
|
+
document.querySelectorAll(`[${De}]`).forEach(U);
|
|
1647
|
+
}, lt = (t) => {
|
|
1418
1648
|
const e = t.getAttribute(J);
|
|
1419
|
-
t.removeAttribute(J), e != null &&
|
|
1420
|
-
},
|
|
1421
|
-
document.querySelectorAll(`[${J}]`).forEach((e) =>
|
|
1422
|
-
},
|
|
1649
|
+
t.removeAttribute(J), e != null && t.setAttribute("class", e);
|
|
1650
|
+
}, ct = () => {
|
|
1651
|
+
document.querySelectorAll(`[${J}]`).forEach((e) => lt(e));
|
|
1652
|
+
}, at = (t) => {
|
|
1653
|
+
const e = t.getAttribute(X);
|
|
1654
|
+
t.removeAttribute(X), e != null && (t.innerHTML = e);
|
|
1655
|
+
}, ut = () => {
|
|
1656
|
+
document.querySelectorAll(`[${X}]`).forEach((e) => at(e));
|
|
1657
|
+
}, ht = (t) => {
|
|
1658
|
+
const e = t.getAttribute(Y);
|
|
1659
|
+
t.removeAttribute(Y), e != null && (t.innerText = e);
|
|
1660
|
+
}, dt = () => {
|
|
1661
|
+
document.querySelectorAll(`[${Y}]`).forEach((e) => ht(e));
|
|
1662
|
+
}, Pe = (t) => JSON.parse(t.replace(/"/g, '"')), ft = (t) => {
|
|
1423
1663
|
const e = t.getAttribute(G);
|
|
1424
|
-
t.removeAttribute(G), e != null
|
|
1425
|
-
|
|
1426
|
-
document.querySelectorAll(`[${G}]`).forEach((e) => rt(e));
|
|
1427
|
-
}, ve = (t) => JSON.parse(t.replace(/"/g, '"')), it = (t) => {
|
|
1428
|
-
const e = t.getAttribute(U);
|
|
1429
|
-
if (t.removeAttribute(U), e != null) {
|
|
1430
|
-
const s = ve(e);
|
|
1664
|
+
if (t.removeAttribute(G), e != null) {
|
|
1665
|
+
const s = Pe(e);
|
|
1431
1666
|
Object.entries(s).forEach(([r, n]) => {
|
|
1432
1667
|
t.style.setProperty(r, n);
|
|
1433
1668
|
});
|
|
1434
1669
|
}
|
|
1435
|
-
},
|
|
1436
|
-
document.querySelectorAll(`[${
|
|
1437
|
-
},
|
|
1438
|
-
const e = t.getAttribute(
|
|
1439
|
-
if (t.removeAttribute(
|
|
1440
|
-
const s =
|
|
1670
|
+
}, pt = () => {
|
|
1671
|
+
document.querySelectorAll(`[${G}]`).forEach((e) => ft(e));
|
|
1672
|
+
}, gt = (t) => {
|
|
1673
|
+
const e = t.getAttribute(Q);
|
|
1674
|
+
if (t.removeAttribute(Q), e != null) {
|
|
1675
|
+
const s = Pe(e);
|
|
1441
1676
|
Object.entries(s).forEach(([r, n]) => {
|
|
1442
1677
|
n == null ? t.removeAttribute(r) : t.setAttribute(r, n);
|
|
1443
1678
|
});
|
|
1444
1679
|
}
|
|
1445
|
-
},
|
|
1446
|
-
document.querySelectorAll(`[${
|
|
1447
|
-
},
|
|
1448
|
-
|
|
1449
|
-
},
|
|
1450
|
-
class
|
|
1680
|
+
}, mt = () => {
|
|
1681
|
+
document.querySelectorAll(`[${Q}]`).forEach((e) => gt(e));
|
|
1682
|
+
}, is = () => {
|
|
1683
|
+
ot(), ct(), dt(), ut(), pt(), mt();
|
|
1684
|
+
}, I = Symbol("class"), H = Symbol("style"), B = Symbol("handler"), xe = () => Math.random().toString(36).substring(2, 15), yt = (t) => t.replace(/<[^>]*>?/g, "");
|
|
1685
|
+
class Le {
|
|
1451
1686
|
constructor(e) {
|
|
1452
1687
|
this.parent = e;
|
|
1453
1688
|
}
|
|
1454
|
-
id =
|
|
1689
|
+
id = xe();
|
|
1455
1690
|
properties = {};
|
|
1456
1691
|
children = [];
|
|
1457
1692
|
isElement = () => !0;
|
|
1458
1693
|
isText = () => !1;
|
|
1459
|
-
getText = () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ?
|
|
1694
|
+
getText = () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? yt(this.properties.innerHTML) : this.children.map((e) => e.getText()).join("");
|
|
1460
1695
|
removeChild = (e) => {
|
|
1461
1696
|
const s = this.children.indexOf(e);
|
|
1462
1697
|
s !== -1 && this.children.splice(s, 1);
|
|
@@ -1477,10 +1712,10 @@ class _e {
|
|
|
1477
1712
|
getInnerText = () => this.properties.innerText ?? "";
|
|
1478
1713
|
hasInnerText = () => this.properties.innerText != null;
|
|
1479
1714
|
hasChildren = () => this.children.length > 0;
|
|
1480
|
-
hasClasses = () => this.properties[
|
|
1481
|
-
hasStyles = () => this.properties[
|
|
1715
|
+
hasClasses = () => this.properties[I] != null;
|
|
1716
|
+
hasStyles = () => this.properties[H] != null;
|
|
1482
1717
|
hasAttributes = () => Object.keys(this.properties).length > 0;
|
|
1483
|
-
hasHandlers = () => this.properties[
|
|
1718
|
+
hasHandlers = () => this.properties[B] != null;
|
|
1484
1719
|
hasRenderableProperties = () => this.hasClasses() || this.hasAttributes() || this.hasStyles();
|
|
1485
1720
|
getById = (e) => {
|
|
1486
1721
|
if (this.properties.id === e)
|
|
@@ -1492,26 +1727,26 @@ class _e {
|
|
|
1492
1727
|
}
|
|
1493
1728
|
};
|
|
1494
1729
|
trigger = (e, s) => {
|
|
1495
|
-
((this.properties[
|
|
1730
|
+
((this.properties[B] ?? {})[e] ?? []).forEach((n) => n(s));
|
|
1496
1731
|
};
|
|
1497
1732
|
click = () => {
|
|
1498
1733
|
this.trigger("click", {});
|
|
1499
1734
|
};
|
|
1500
1735
|
on = (e, s, r, n) => {
|
|
1501
|
-
const i = this.properties[
|
|
1736
|
+
const i = this.properties[B] ??= {}, o = n?.once ? (c) => {
|
|
1502
1737
|
l(), s(c, r);
|
|
1503
1738
|
} : (c) => s(c, r);
|
|
1504
1739
|
i[e] = [...i[e] ?? [], o];
|
|
1505
1740
|
const l = () => {
|
|
1506
1741
|
const c = i[e] ?? [], a = c.indexOf(o);
|
|
1507
|
-
a !== -1 && (c.splice(a, 1), c.length === 0 ? (delete i[e], Object.keys(i).length === 0 && delete this.properties[
|
|
1742
|
+
a !== -1 && (c.splice(a, 1), c.length === 0 ? (delete i[e], Object.keys(i).length === 0 && delete this.properties[B]) : i[e] = c, n?.signal != null && n.signal.removeEventListener("abort", l));
|
|
1508
1743
|
};
|
|
1509
1744
|
return n?.signal != null && n.signal.addEventListener("abort", l), l;
|
|
1510
1745
|
};
|
|
1511
1746
|
addClasses = (e) => {
|
|
1512
1747
|
if (e.length === 0)
|
|
1513
1748
|
return;
|
|
1514
|
-
const s = this.properties[
|
|
1749
|
+
const s = this.properties[I] ??= [];
|
|
1515
1750
|
e.forEach((r) => {
|
|
1516
1751
|
s.includes(r) || s.push(r);
|
|
1517
1752
|
});
|
|
@@ -1519,25 +1754,25 @@ class _e {
|
|
|
1519
1754
|
removeClasses = (e) => {
|
|
1520
1755
|
if (e.length === 0)
|
|
1521
1756
|
return;
|
|
1522
|
-
const s = this.properties[
|
|
1757
|
+
const s = this.properties[I] ??= [];
|
|
1523
1758
|
e.forEach((r) => {
|
|
1524
1759
|
const n = s.indexOf(r);
|
|
1525
1760
|
n !== -1 && s.splice(n, 1);
|
|
1526
|
-
}), s.length === 0 && delete this.properties[
|
|
1761
|
+
}), s.length === 0 && delete this.properties[I];
|
|
1527
1762
|
};
|
|
1528
|
-
getClasses = () => this.properties[
|
|
1763
|
+
getClasses = () => this.properties[I] ?? [];
|
|
1529
1764
|
getAttributes = () => Object.entries(this.properties).filter(
|
|
1530
1765
|
([e]) => !["innerText", "innerHTML"].includes(e)
|
|
1531
1766
|
);
|
|
1532
1767
|
getVisibleAttributes = () => Reflect.ownKeys(this.properties).flatMap(
|
|
1533
|
-
(e) => e ===
|
|
1768
|
+
(e) => e === I ? [["class", this.getClasses()]] : e === H ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
|
|
1534
1769
|
);
|
|
1535
1770
|
setStyle = (e, s) => {
|
|
1536
|
-
const r = this.properties[
|
|
1537
|
-
r[e] = s, s === "" && (delete r[e], Object.keys(r).length === 0 && delete this.properties[
|
|
1771
|
+
const r = this.properties[H] ??= {};
|
|
1772
|
+
r[e] = s, s === "" && (delete r[e], Object.keys(r).length === 0 && delete this.properties[H]);
|
|
1538
1773
|
};
|
|
1539
|
-
getStyle = (e) => this.properties[
|
|
1540
|
-
getStyles = () => this.properties[
|
|
1774
|
+
getStyle = (e) => this.properties[H]?.[e] ?? "";
|
|
1775
|
+
getStyles = () => this.properties[H] ?? {};
|
|
1541
1776
|
makeAccessors = (e) => {
|
|
1542
1777
|
const s = this.properties;
|
|
1543
1778
|
return {
|
|
@@ -1546,8 +1781,8 @@ class _e {
|
|
|
1546
1781
|
};
|
|
1547
1782
|
};
|
|
1548
1783
|
}
|
|
1549
|
-
const
|
|
1550
|
-
class
|
|
1784
|
+
const bt = (t) => t.replace(/"/g, """), St = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
1785
|
+
class wt extends Le {
|
|
1551
1786
|
constructor(e, s, r) {
|
|
1552
1787
|
super(r), this.tagName = e, this.namespace = s;
|
|
1553
1788
|
}
|
|
@@ -1555,11 +1790,11 @@ class ft extends _e {
|
|
|
1555
1790
|
toHTML = (e = !1) => {
|
|
1556
1791
|
const s = this.children.map((l) => l.toHTML()).join(""), r = this.namespace ? ` xmlns="${this.namespace}"` : "";
|
|
1557
1792
|
let n = null;
|
|
1558
|
-
const i = this.getVisibleAttributes().map(([l, c]) => l === "class" ? ` class="${c.join(" ")}"` : l === "style" ? typeof c == "string" ? ` style="${c}"` : ` style="${Object.entries(c).map(([a, u]) => `${a}: ${u};`).join(" ")}"` :
|
|
1559
|
-
return
|
|
1793
|
+
const i = this.getVisibleAttributes().map(([l, c]) => l === "class" ? ` class="${c.join(" ")}"` : l === "style" ? typeof c == "string" ? ` style="${c}"` : ` style="${Object.entries(c).map(([a, u]) => `${a}: ${u};`).join(" ")}"` : vt.has(l) ? ` ${l}` : l === "innerHTML" ? (n = c, "") : l === "innerText" ? (n = St(c), "") : ` ${l}="${bt(c)}"`).join(""), o = e ? ` ${De}` : "";
|
|
1794
|
+
return Tt.has(this.tagName) && s === "" ? `<${this.tagName}${r}${i}${o} />` : `<${this.tagName}${r}${i}${o}>${n ?? s}</${this.tagName}>`;
|
|
1560
1795
|
};
|
|
1561
1796
|
}
|
|
1562
|
-
class
|
|
1797
|
+
class Oe extends Le {
|
|
1563
1798
|
constructor(e, s) {
|
|
1564
1799
|
super(s), this.selector = e;
|
|
1565
1800
|
}
|
|
@@ -1567,17 +1802,17 @@ class Ee extends _e {
|
|
|
1567
1802
|
toHTML = () => "";
|
|
1568
1803
|
contentToHTML = (e = !1) => this.children.map((s) => s.toHTML(e)).join("");
|
|
1569
1804
|
}
|
|
1570
|
-
class
|
|
1805
|
+
class _t {
|
|
1571
1806
|
constructor(e) {
|
|
1572
1807
|
this.text = e;
|
|
1573
1808
|
}
|
|
1574
|
-
id =
|
|
1809
|
+
id = xe();
|
|
1575
1810
|
isElement = () => !1;
|
|
1576
1811
|
isText = () => !0;
|
|
1577
1812
|
getText = () => this.text;
|
|
1578
1813
|
toHTML = () => this.text;
|
|
1579
1814
|
}
|
|
1580
|
-
class
|
|
1815
|
+
class R {
|
|
1581
1816
|
constructor(e, s, r, n) {
|
|
1582
1817
|
this.element = e, this.reference = s, this.container = r, this.providers = n;
|
|
1583
1818
|
}
|
|
@@ -1589,8 +1824,8 @@ class $ {
|
|
|
1589
1824
|
this.element.children.push(e);
|
|
1590
1825
|
};
|
|
1591
1826
|
makeChildElement = (e, s) => {
|
|
1592
|
-
const r = new
|
|
1593
|
-
return this.appendOrInsert(r), new
|
|
1827
|
+
const r = new wt(e, s, this.element);
|
|
1828
|
+
return this.appendOrInsert(r), new R(
|
|
1594
1829
|
r,
|
|
1595
1830
|
void 0,
|
|
1596
1831
|
this.container,
|
|
@@ -1598,8 +1833,8 @@ class $ {
|
|
|
1598
1833
|
);
|
|
1599
1834
|
};
|
|
1600
1835
|
makeChildText = (e) => {
|
|
1601
|
-
const s = new
|
|
1602
|
-
return this.appendOrInsert(s), new
|
|
1836
|
+
const s = new _t(e);
|
|
1837
|
+
return this.appendOrInsert(s), new R(
|
|
1603
1838
|
this.element,
|
|
1604
1839
|
s,
|
|
1605
1840
|
this.container,
|
|
@@ -1612,8 +1847,8 @@ class $ {
|
|
|
1612
1847
|
getText = () => this.reference?.getText() ?? this.element.getText();
|
|
1613
1848
|
makeRef = () => this.makeChildText("");
|
|
1614
1849
|
makePortal = (e) => {
|
|
1615
|
-
const s = new
|
|
1616
|
-
return this.appendOrInsert(s), new
|
|
1850
|
+
const s = new Oe(e, this.element);
|
|
1851
|
+
return this.appendOrInsert(s), new R(
|
|
1617
1852
|
s,
|
|
1618
1853
|
void 0,
|
|
1619
1854
|
this.container,
|
|
@@ -1627,13 +1862,13 @@ class $ {
|
|
|
1627
1862
|
* @param value - The provider to set for the given mark.
|
|
1628
1863
|
* @returns A new `DOMContext` instance with the specified provider.
|
|
1629
1864
|
*/
|
|
1630
|
-
setProvider = (e, s, r) => new
|
|
1865
|
+
setProvider = (e, s, r) => new R(this.element, this.reference, this.container, {
|
|
1631
1866
|
...this.providers,
|
|
1632
1867
|
[e]: [s, r]
|
|
1633
1868
|
});
|
|
1634
1869
|
getProvider = (e) => {
|
|
1635
1870
|
if (this.providers[e] === void 0)
|
|
1636
|
-
throw new
|
|
1871
|
+
throw new Ce(e);
|
|
1637
1872
|
const [s, r] = this.providers[e];
|
|
1638
1873
|
return { value: s, onUse: r };
|
|
1639
1874
|
};
|
|
@@ -1652,27 +1887,27 @@ class $ {
|
|
|
1652
1887
|
getStyle = (e) => this.element.getStyle(e);
|
|
1653
1888
|
makeAccessors = (e) => this.element.makeAccessors(e);
|
|
1654
1889
|
}
|
|
1655
|
-
const
|
|
1890
|
+
const vt = /* @__PURE__ */ new Set([
|
|
1656
1891
|
"checked",
|
|
1657
1892
|
"disabled",
|
|
1658
1893
|
"multiple",
|
|
1659
1894
|
"readonly",
|
|
1660
1895
|
"required",
|
|
1661
1896
|
"selected"
|
|
1662
|
-
]),
|
|
1897
|
+
]), Tt = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), ke = (t) => (e) => e.makeChildText(t).clear, Me = (t) => (e) => {
|
|
1663
1898
|
const s = e.makeChildText(t.value), r = t.on(s.setText);
|
|
1664
1899
|
return (n) => {
|
|
1665
1900
|
r(), s.clear(n);
|
|
1666
1901
|
};
|
|
1667
|
-
},
|
|
1668
|
-
const s = t.map((r) =>
|
|
1902
|
+
}, os = (t) => g.is(t) ? Me(t) : ke(t), E = (...t) => (e) => {
|
|
1903
|
+
const s = t.map((r) => d(r)(e));
|
|
1669
1904
|
return (r) => {
|
|
1670
1905
|
s.forEach((n) => n(r));
|
|
1671
1906
|
};
|
|
1672
|
-
},
|
|
1673
|
-
},
|
|
1907
|
+
}, C = () => () => {
|
|
1908
|
+
}, At = (t) => (e) => (e.addClasses(t), (s) => {
|
|
1674
1909
|
s && e.removeClasses(t);
|
|
1675
|
-
}),
|
|
1910
|
+
}), Et = (t) => (e) => {
|
|
1676
1911
|
let s = [];
|
|
1677
1912
|
const r = t.on((n) => {
|
|
1678
1913
|
e.removeClasses(s), s = (n ?? "").split(" ").filter((i) => i.length > 0), e.addClasses(s);
|
|
@@ -1680,20 +1915,20 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
1680
1915
|
return (n) => {
|
|
1681
1916
|
r(), n && e.removeClasses(s), s.length = 0;
|
|
1682
1917
|
};
|
|
1683
|
-
},
|
|
1918
|
+
}, Ct = (t, e) => (s) => {
|
|
1684
1919
|
const { get: r, set: n } = s.makeAccessors(t), i = r();
|
|
1685
1920
|
return n(e), (o) => {
|
|
1686
1921
|
o && n(i);
|
|
1687
1922
|
};
|
|
1688
|
-
},
|
|
1923
|
+
}, Dt = (t, e) => (s) => {
|
|
1689
1924
|
const { get: r, set: n } = s.makeAccessors(t), i = r(), o = e.on(n);
|
|
1690
1925
|
return (l) => {
|
|
1691
1926
|
o(), l && n(i);
|
|
1692
1927
|
};
|
|
1693
|
-
},
|
|
1928
|
+
}, V = (t, e) => g.is(e) ? Dt(t, e) : Ct(t, e), te = (t = "") => (e, s) => {
|
|
1694
1929
|
const r = t ? `${t}${e}` : e;
|
|
1695
|
-
return
|
|
1696
|
-
},
|
|
1930
|
+
return V(r, s);
|
|
1931
|
+
}, j = new Proxy(
|
|
1697
1932
|
{},
|
|
1698
1933
|
{
|
|
1699
1934
|
/**
|
|
@@ -1707,12 +1942,12 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
1707
1942
|
* @returns The renderable component for the specified attribute.
|
|
1708
1943
|
*
|
|
1709
1944
|
*/
|
|
1710
|
-
get: (t, e) => e === "class" ? (s) =>
|
|
1945
|
+
get: (t, e) => e === "class" ? (s) => g.is(s) ? Et(s) : At(
|
|
1711
1946
|
/* c8 ignore next */
|
|
1712
1947
|
(s ?? "").split(" ").filter((r) => r.length > 0)
|
|
1713
|
-
) : e === "set" ?
|
|
1948
|
+
) : e === "set" ? te() : (s) => V(e, s)
|
|
1714
1949
|
}
|
|
1715
|
-
),
|
|
1950
|
+
), ls = new Proxy(
|
|
1716
1951
|
{},
|
|
1717
1952
|
{
|
|
1718
1953
|
/**
|
|
@@ -1723,9 +1958,9 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
1723
1958
|
* @returns The renderable component for the specified attribute.
|
|
1724
1959
|
*
|
|
1725
1960
|
*/
|
|
1726
|
-
get: (t, e) => e === "set" ?
|
|
1961
|
+
get: (t, e) => e === "set" ? te("data-") : (s) => V(`data-${e}`, s)
|
|
1727
1962
|
}
|
|
1728
|
-
),
|
|
1963
|
+
), cs = new Proxy(
|
|
1729
1964
|
{},
|
|
1730
1965
|
{
|
|
1731
1966
|
/**
|
|
@@ -1736,9 +1971,9 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
1736
1971
|
* @returns The renderable component for the specified attribute.
|
|
1737
1972
|
*
|
|
1738
1973
|
*/
|
|
1739
|
-
get: (t, e) => e === "set" ?
|
|
1974
|
+
get: (t, e) => e === "set" ? te("aria-") : (s) => V(`aria-${e}`, s)
|
|
1740
1975
|
}
|
|
1741
|
-
),
|
|
1976
|
+
), as = new Proxy(
|
|
1742
1977
|
{},
|
|
1743
1978
|
{
|
|
1744
1979
|
/**
|
|
@@ -1749,9 +1984,9 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
1749
1984
|
* @returns The renderable component for the specified attribute.
|
|
1750
1985
|
*
|
|
1751
1986
|
*/
|
|
1752
|
-
get: (t, e) => e === "set" ?
|
|
1987
|
+
get: (t, e) => e === "set" ? te() : (s) => V(e, s)
|
|
1753
1988
|
}
|
|
1754
|
-
),
|
|
1989
|
+
), us = new Proxy(
|
|
1755
1990
|
{},
|
|
1756
1991
|
{
|
|
1757
1992
|
/**
|
|
@@ -1761,31 +1996,31 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
1761
1996
|
* @returns The renderable component for the specified attribute.
|
|
1762
1997
|
*
|
|
1763
1998
|
*/
|
|
1764
|
-
get: (t, e) => (s) =>
|
|
1999
|
+
get: (t, e) => (s) => V(e, s)
|
|
1765
2000
|
}
|
|
1766
|
-
),
|
|
2001
|
+
), d = (t) => {
|
|
1767
2002
|
if (t == null)
|
|
1768
|
-
return
|
|
2003
|
+
return C;
|
|
1769
2004
|
if (Array.isArray(t))
|
|
1770
|
-
return
|
|
2005
|
+
return E(...t.map(d));
|
|
1771
2006
|
if (typeof t == "string")
|
|
1772
|
-
return
|
|
1773
|
-
if (
|
|
1774
|
-
return
|
|
2007
|
+
return ke(t);
|
|
2008
|
+
if (g.is(t))
|
|
2009
|
+
return Me(t);
|
|
1775
2010
|
if (typeof t == "function")
|
|
1776
2011
|
return t;
|
|
1777
2012
|
throw new Error(`Unknown type: '${typeof t}' for child: ${t}`);
|
|
1778
|
-
},
|
|
1779
|
-
const r = s.makeChildElement(t, void 0), n = e.map((i) =>
|
|
2013
|
+
}, Ie = (t, ...e) => (s) => {
|
|
2014
|
+
const r = s.makeChildElement(t, void 0), n = e.map((i) => d(i)(r));
|
|
1780
2015
|
return (i) => {
|
|
1781
2016
|
n.forEach((o) => o(!1)), r.clear(i);
|
|
1782
2017
|
};
|
|
1783
|
-
},
|
|
1784
|
-
const n = r.makeChildElement(t, e), i = s.map((o) =>
|
|
2018
|
+
}, He = (t, e, ...s) => (r) => {
|
|
2019
|
+
const n = r.makeChildElement(t, e), i = s.map((o) => d(o)(n));
|
|
1785
2020
|
return (o) => {
|
|
1786
2021
|
i.forEach((l) => l(!1)), n.clear(o);
|
|
1787
2022
|
};
|
|
1788
|
-
},
|
|
2023
|
+
}, hs = new Proxy(
|
|
1789
2024
|
{},
|
|
1790
2025
|
{
|
|
1791
2026
|
/**
|
|
@@ -1793,9 +2028,9 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
1793
2028
|
* @param tagName - The HTML tag name.
|
|
1794
2029
|
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
1795
2030
|
*/
|
|
1796
|
-
get: (t, e) => (...s) =>
|
|
2031
|
+
get: (t, e) => (...s) => Ie(e, s.flatMap(d))
|
|
1797
2032
|
}
|
|
1798
|
-
),
|
|
2033
|
+
), ds = new Proxy(
|
|
1799
2034
|
{},
|
|
1800
2035
|
{
|
|
1801
2036
|
/**
|
|
@@ -1803,9 +2038,9 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
1803
2038
|
* @param type - The input type name.
|
|
1804
2039
|
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
1805
2040
|
*/
|
|
1806
|
-
get: (t, e) => (...s) =>
|
|
2041
|
+
get: (t, e) => (...s) => Ie("input", j.type(e), ...s)
|
|
1807
2042
|
}
|
|
1808
|
-
),
|
|
2043
|
+
), Pt = "http://www.w3.org/2000/svg", fs = new Proxy(
|
|
1809
2044
|
{},
|
|
1810
2045
|
{
|
|
1811
2046
|
/**
|
|
@@ -1813,9 +2048,9 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
1813
2048
|
* @param tagName - The SVG tag name.
|
|
1814
2049
|
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
1815
2050
|
*/
|
|
1816
|
-
get: (t, e) => (...s) =>
|
|
2051
|
+
get: (t, e) => (...s) => He(e, Pt, s.flatMap(d))
|
|
1817
2052
|
}
|
|
1818
|
-
),
|
|
2053
|
+
), xt = "http://www.w3.org/1998/Math/MathML", ps = new Proxy(
|
|
1819
2054
|
{},
|
|
1820
2055
|
{
|
|
1821
2056
|
/**
|
|
@@ -1823,35 +2058,35 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
1823
2058
|
* @param tagName - The Math tag name.
|
|
1824
2059
|
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
1825
2060
|
*/
|
|
1826
|
-
get: (t, e) => (...s) =>
|
|
2061
|
+
get: (t, e) => (...s) => He(e, xt, s.flatMap(d))
|
|
1827
2062
|
}
|
|
1828
|
-
),
|
|
2063
|
+
), $e = (t, e) => {
|
|
1829
2064
|
if (typeof e == "function")
|
|
1830
|
-
return
|
|
1831
|
-
const s = e.pending != null ?
|
|
2065
|
+
return $e(t, { then: e });
|
|
2066
|
+
const s = e.pending != null ? d(e.pending()) : C, r = e.then, n = e.error != null ? (i) => d(e.error(i)) : () => C;
|
|
1832
2067
|
return (i) => {
|
|
1833
2068
|
let o = !0;
|
|
1834
2069
|
const l = t(), c = i.makeRef();
|
|
1835
|
-
let a =
|
|
2070
|
+
let a = d(s)(c);
|
|
1836
2071
|
return l.then(
|
|
1837
2072
|
(u) => {
|
|
1838
|
-
o && (a(!0), a =
|
|
2073
|
+
o && (a(!0), a = d(r(u))(c));
|
|
1839
2074
|
},
|
|
1840
2075
|
(u) => {
|
|
1841
|
-
o && (a(!0), a =
|
|
2076
|
+
o && (a(!0), a = d(n(u))(c));
|
|
1842
2077
|
}
|
|
1843
2078
|
), (u) => {
|
|
1844
2079
|
o = !1, a(u), c.clear(u);
|
|
1845
2080
|
};
|
|
1846
2081
|
};
|
|
1847
|
-
},
|
|
2082
|
+
}, gs = (t, e) => $e(() => t, e), Ne = (t, e, s) => (r) => r.on(t, e, s), Lt = (t) => Ne("click", (e, s) => {
|
|
1848
2083
|
e.preventDefault();
|
|
1849
2084
|
const r = e.target;
|
|
1850
2085
|
setTimeout(() => {
|
|
1851
2086
|
const n = r.ownerDocument != null ? r?.checked : void 0;
|
|
1852
2087
|
n != null && t(!n, s);
|
|
1853
2088
|
}, 0);
|
|
1854
|
-
}),
|
|
2089
|
+
}), se = new Proxy(
|
|
1855
2090
|
{},
|
|
1856
2091
|
{
|
|
1857
2092
|
/**
|
|
@@ -1859,20 +2094,20 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
1859
2094
|
* @param fn - The function to call when the event is triggered.
|
|
1860
2095
|
* @returns A `Renderable` function that adds the event listener to the element.
|
|
1861
2096
|
*/
|
|
1862
|
-
get: (t, e) => (s) =>
|
|
2097
|
+
get: (t, e) => (s) => Ne(e, s)
|
|
1863
2098
|
}
|
|
1864
|
-
),
|
|
2099
|
+
), Ot = (t, e) => (s) => {
|
|
1865
2100
|
e?.preventDefault === !0 && s.preventDefault(), e?.stopPropagation === !0 && s.stopPropagation(), e?.stopImmediatePropagation === !0 && s.stopImmediatePropagation(), t(s);
|
|
1866
|
-
},
|
|
2101
|
+
}, O = (t, e) => Ot((s) => {
|
|
1867
2102
|
const r = s.target;
|
|
1868
2103
|
t(r, s);
|
|
1869
|
-
}, e),
|
|
2104
|
+
}, e), kt = (t, e) => O(
|
|
1870
2105
|
(s, r) => t(s.value, r),
|
|
1871
2106
|
e
|
|
1872
|
-
),
|
|
2107
|
+
), Mt = (t, e) => O(
|
|
1873
2108
|
(s, r) => t(s.valueAsNumber, r),
|
|
1874
2109
|
e
|
|
1875
|
-
),
|
|
2110
|
+
), It = (t, e) => O((s, r) => {
|
|
1876
2111
|
if (s.value === "")
|
|
1877
2112
|
return;
|
|
1878
2113
|
const n = s.value.split("-"), i = new Date(
|
|
@@ -1881,7 +2116,7 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
1881
2116
|
Number(n[2].substring(0, 2))
|
|
1882
2117
|
);
|
|
1883
2118
|
t(i, r);
|
|
1884
|
-
}, e),
|
|
2119
|
+
}, e), ms = (t, e) => O((s, r) => {
|
|
1885
2120
|
if (s.value === "") {
|
|
1886
2121
|
t(null, r);
|
|
1887
2122
|
return;
|
|
@@ -1892,7 +2127,7 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
1892
2127
|
Number(n[2].substring(0, 2))
|
|
1893
2128
|
);
|
|
1894
2129
|
t(i, r);
|
|
1895
|
-
}, e),
|
|
2130
|
+
}, e), Ht = (t, e) => O((s, r) => {
|
|
1896
2131
|
if (s.value === "")
|
|
1897
2132
|
return;
|
|
1898
2133
|
const n = s.value.split("T"), i = n[0].split("-"), o = new Date(
|
|
@@ -1901,7 +2136,7 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
1901
2136
|
Number(i[2])
|
|
1902
2137
|
), l = n[1].split(":");
|
|
1903
2138
|
o.setHours(Number(l[0])), o.setMinutes(Number(l[1])), o.setSeconds(Number(l[2])), t(o, r);
|
|
1904
|
-
}, e),
|
|
2139
|
+
}, e), ys = (t, e) => O((s, r) => {
|
|
1905
2140
|
if (s.value === "") {
|
|
1906
2141
|
t(null, r);
|
|
1907
2142
|
return;
|
|
@@ -1917,55 +2152,58 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
1917
2152
|
Number(i[2])
|
|
1918
2153
|
), l = n[1].split(":");
|
|
1919
2154
|
o.setHours(Number(l[0] ?? 0)), o.setMinutes(Number(l[1] ?? 0)), o.setSeconds(Number(l[2] ?? 0)), t(o, r);
|
|
1920
|
-
}, e),
|
|
2155
|
+
}, e), bs = (t, e) => O((s, r) => {
|
|
1921
2156
|
t(s.checked, r);
|
|
1922
|
-
}, e),
|
|
2157
|
+
}, e), Ss = (t, e = "input") => E(j.valueAsDate(t), se[e](It(t.set))), ws = (t, e = "input") => E(j.valueAsDate(t), se[e](Ht(t.set))), _s = (t, e = "input") => E(j.valueAsNumber(t), se[e](Mt(t.set))), vs = (t, e = "input") => E(j.value(t), se[e](kt(t.set))), Ts = (t) => E(j.checked(t), Lt(t.set)), ue = (t, e, s) => g.is(t) ? e(t) : s(t), $t = (t, e, s) => {
|
|
1923
2158
|
const r = t.makeRef();
|
|
1924
2159
|
let n = () => {
|
|
1925
|
-
};
|
|
1926
|
-
const
|
|
1927
|
-
n(!0),
|
|
2160
|
+
}, i = null;
|
|
2161
|
+
const o = e.on((l) => {
|
|
2162
|
+
i?.dispose(), n(!0), i = new q(), n = L(
|
|
2163
|
+
i,
|
|
2164
|
+
() => d(s(l))(r)
|
|
2165
|
+
);
|
|
1928
2166
|
});
|
|
1929
|
-
return (
|
|
1930
|
-
n(
|
|
2167
|
+
return (l) => {
|
|
2168
|
+
i?.dispose(), n(l), o(), r.clear(l);
|
|
1931
2169
|
};
|
|
1932
|
-
},
|
|
2170
|
+
}, re = (t, e) => {
|
|
1933
2171
|
function s(n) {
|
|
1934
2172
|
return (i) => {
|
|
1935
2173
|
const o = i.makeRef();
|
|
1936
2174
|
let l, c;
|
|
1937
|
-
const a = n.map((
|
|
2175
|
+
const a = n.map((p) => Object.keys(p)[0]);
|
|
1938
2176
|
let u;
|
|
1939
|
-
const
|
|
1940
|
-
if (
|
|
1941
|
-
u =
|
|
1942
|
-
const f = e[
|
|
1943
|
-
l =
|
|
2177
|
+
const h = a.on((p) => {
|
|
2178
|
+
if (p !== u) {
|
|
2179
|
+
u = p, c?.dispose(), l?.(!0), c = n.map((m) => m[p]);
|
|
2180
|
+
const f = e[p](c);
|
|
2181
|
+
l = d(f)(o);
|
|
1944
2182
|
}
|
|
1945
2183
|
});
|
|
1946
|
-
return (
|
|
1947
|
-
c?.dispose(),
|
|
2184
|
+
return (p) => {
|
|
2185
|
+
c?.dispose(), h(), o.clear(p), l?.(p);
|
|
1948
2186
|
};
|
|
1949
2187
|
};
|
|
1950
2188
|
}
|
|
1951
2189
|
function r(n) {
|
|
1952
2190
|
const i = Object.keys(n)[0];
|
|
1953
|
-
return
|
|
2191
|
+
return d(e[i](K(n[i])));
|
|
1954
2192
|
}
|
|
1955
|
-
return
|
|
1956
|
-
},
|
|
2193
|
+
return ue(t, s, r);
|
|
2194
|
+
}, Re = (t, e, s) => re(
|
|
1957
2195
|
y.map(t, (r) => ({ [r[e]]: r })),
|
|
1958
2196
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1959
2197
|
s
|
|
1960
|
-
),
|
|
2198
|
+
), As = (t, e) => Re(t, "kind", e), Es = (t, e) => {
|
|
1961
2199
|
const s = y.map(t, ([r, n]) => ({ [r]: n }));
|
|
1962
|
-
return
|
|
1963
|
-
},
|
|
2200
|
+
return re(s, e);
|
|
2201
|
+
}, Cs = (t, e) => Re(t, "type", e), Nt = (t, e) => re(
|
|
1964
2202
|
y.map(t, (s) => ({ [s]: !0 })),
|
|
1965
2203
|
e
|
|
1966
|
-
),
|
|
2204
|
+
), Ds = (t, e = {}) => (s) => {
|
|
1967
2205
|
const r = e?.firstSeparator ?? t, n = e?.lastSeparator ?? t;
|
|
1968
|
-
return
|
|
2206
|
+
return Nt(
|
|
1969
2207
|
s.map((i) => i.isFirst ? "first" : i.isLast ? "last" : "other"),
|
|
1970
2208
|
{
|
|
1971
2209
|
first: r,
|
|
@@ -1973,80 +2211,78 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
1973
2211
|
other: t
|
|
1974
2212
|
}
|
|
1975
2213
|
);
|
|
1976
|
-
},
|
|
1977
|
-
s &&
|
|
1978
|
-
}),
|
|
2214
|
+
}, Ps = (t) => (e) => (e.appendOrInsert(t), (s) => {
|
|
2215
|
+
s && U(t);
|
|
2216
|
+
}), xs = (t, e, s) => {
|
|
1979
2217
|
function r(i) {
|
|
1980
2218
|
return (o) => {
|
|
1981
2219
|
const l = o.makeRef();
|
|
1982
2220
|
let c = () => {
|
|
1983
2221
|
}, a = !1, u = null;
|
|
1984
|
-
const
|
|
1985
|
-
|
|
2222
|
+
const h = i.on((p) => {
|
|
2223
|
+
p == null ? (c(!0), c = d(s?.())(l), a = !1, u?.dispose(), u = null) : a ? u.set(p) : (u = T(p), c(!0), c = d(e(u))(
|
|
1986
2224
|
l
|
|
1987
2225
|
), a = !0);
|
|
1988
2226
|
});
|
|
1989
|
-
return (
|
|
1990
|
-
u?.dispose(),
|
|
2227
|
+
return (p) => {
|
|
2228
|
+
u?.dispose(), h(), c?.(p), l.clear(p);
|
|
1991
2229
|
};
|
|
1992
2230
|
};
|
|
1993
2231
|
}
|
|
1994
2232
|
function n(i) {
|
|
1995
2233
|
if (i == null) {
|
|
1996
2234
|
const o = s?.();
|
|
1997
|
-
return o != null ?
|
|
2235
|
+
return o != null ? d(o) : C;
|
|
1998
2236
|
}
|
|
1999
|
-
return
|
|
2237
|
+
return d(e(K(i)));
|
|
2000
2238
|
}
|
|
2001
|
-
return
|
|
2239
|
+
return ue(
|
|
2002
2240
|
t,
|
|
2003
2241
|
r,
|
|
2004
2242
|
n
|
|
2005
2243
|
);
|
|
2006
|
-
},
|
|
2244
|
+
}, Ls = (...t) => (e, s) => (r) => {
|
|
2007
2245
|
const n = r.makeRef();
|
|
2008
2246
|
if (t.some(
|
|
2009
|
-
(f) => !
|
|
2247
|
+
(f) => !g.is(f) && f == null
|
|
2010
2248
|
))
|
|
2011
|
-
return (s != null ?
|
|
2249
|
+
return (s != null ? d(s?.()) : C)(
|
|
2012
2250
|
n
|
|
2013
2251
|
);
|
|
2014
2252
|
const o = t.map(() => null), l = t.map(
|
|
2015
|
-
(f) =>
|
|
2253
|
+
(f) => g.is(f) ? f.value != null : f != null
|
|
2016
2254
|
);
|
|
2017
2255
|
let c = null;
|
|
2018
|
-
const a =
|
|
2256
|
+
const a = T(l.every((f) => f)), u = (f, m) => {
|
|
2019
2257
|
if (f.value != null) {
|
|
2020
|
-
if (o[
|
|
2021
|
-
const
|
|
2022
|
-
o[
|
|
2258
|
+
if (o[m] == null) {
|
|
2259
|
+
const S = T(f.value);
|
|
2260
|
+
o[m] = S;
|
|
2023
2261
|
} else
|
|
2024
|
-
o[
|
|
2025
|
-
l[
|
|
2262
|
+
o[m].value = f.value;
|
|
2263
|
+
l[m] = !0;
|
|
2026
2264
|
} else
|
|
2027
|
-
l[
|
|
2265
|
+
l[m] = !1;
|
|
2028
2266
|
};
|
|
2029
|
-
let
|
|
2030
|
-
const
|
|
2031
|
-
if (!
|
|
2032
|
-
const
|
|
2033
|
-
return o[
|
|
2267
|
+
let h = t.length - 1;
|
|
2268
|
+
const p = t.map((f, m) => {
|
|
2269
|
+
if (!g.is(f)) {
|
|
2270
|
+
const S = T(f);
|
|
2271
|
+
return o[m] = S, () => {
|
|
2034
2272
|
};
|
|
2035
2273
|
}
|
|
2036
2274
|
return f.on(() => {
|
|
2037
|
-
u(f,
|
|
2275
|
+
u(f, m), h === 0 ? a.value = l.every((S) => S) : h--;
|
|
2038
2276
|
});
|
|
2039
2277
|
});
|
|
2040
2278
|
return a.on((f) => {
|
|
2041
|
-
c?.(!0), c = null, f ? c =
|
|
2279
|
+
c?.(!0), c = null, f ? c = d(e(...o))(n) : c = d(s?.() ?? C)(n);
|
|
2042
2280
|
}), (f) => {
|
|
2043
|
-
o.forEach((
|
|
2281
|
+
o.forEach((m) => m?.dispose()), a.dispose(), p.forEach((m) => m()), c?.(f), n.clear(f);
|
|
2044
2282
|
};
|
|
2045
|
-
},
|
|
2046
|
-
typeof r == "function" ? r(s, e) : r.dispose(s, e);
|
|
2047
|
-
}), Ie = (t, e, s) => le(
|
|
2283
|
+
}, Ve = (t, e, s) => ue(
|
|
2048
2284
|
t,
|
|
2049
|
-
(r) => (n) =>
|
|
2285
|
+
(r) => (n) => $t(
|
|
2050
2286
|
n,
|
|
2051
2287
|
r,
|
|
2052
2288
|
(i) => i ? e() : s?.()
|
|
@@ -2054,85 +2290,81 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
2054
2290
|
(r) => {
|
|
2055
2291
|
if (r) {
|
|
2056
2292
|
const n = e();
|
|
2057
|
-
return n != null ?
|
|
2293
|
+
return n != null ? d(n) : C;
|
|
2058
2294
|
}
|
|
2059
|
-
return
|
|
2295
|
+
return d(s?.());
|
|
2060
2296
|
}
|
|
2061
|
-
),
|
|
2297
|
+
), Os = (t, e, s) => Ve(
|
|
2062
2298
|
y.map(t, (r) => !r),
|
|
2063
2299
|
e,
|
|
2064
2300
|
s
|
|
2065
|
-
),
|
|
2301
|
+
), je = (t, e, s) => {
|
|
2066
2302
|
if (s != null)
|
|
2067
|
-
return
|
|
2068
|
-
const n = new
|
|
2303
|
+
return je(t, (r) => {
|
|
2304
|
+
const n = new le(
|
|
2069
2305
|
r.index,
|
|
2070
2306
|
r.total.map((i) => i - 1)
|
|
2071
2307
|
);
|
|
2072
|
-
return
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
Ie(
|
|
2308
|
+
return E(
|
|
2309
|
+
d(e(r)),
|
|
2310
|
+
Ve(
|
|
2076
2311
|
r.isLast,
|
|
2077
|
-
() =>
|
|
2312
|
+
() => C,
|
|
2078
2313
|
() => s(n)
|
|
2079
2314
|
)
|
|
2080
2315
|
);
|
|
2081
2316
|
});
|
|
2082
|
-
if (
|
|
2317
|
+
if (g.is(t))
|
|
2083
2318
|
return (r) => {
|
|
2084
|
-
const n = t.derive(), i = r.makeRef(), o = [];
|
|
2085
|
-
return n.on((
|
|
2086
|
-
const
|
|
2087
|
-
for (const
|
|
2088
|
-
|
|
2089
|
-
for (
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
)(i)
|
|
2319
|
+
const n = t.derive(), i = r.makeRef(), o = [], l = [];
|
|
2320
|
+
return n.on((c) => {
|
|
2321
|
+
const a = o.splice(c), u = l.splice(c);
|
|
2322
|
+
for (const h of u)
|
|
2323
|
+
h.dispose();
|
|
2324
|
+
for (const h of a)
|
|
2325
|
+
h(!0);
|
|
2326
|
+
for (let h = o.length; h < c; h++) {
|
|
2327
|
+
const p = new le(h, n), f = new q();
|
|
2328
|
+
l.push(f), o.push(
|
|
2329
|
+
L(f, () => d(e(p))(i))
|
|
2096
2330
|
);
|
|
2097
2331
|
}
|
|
2098
|
-
}), (
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2332
|
+
}), (c) => {
|
|
2333
|
+
for (const a of l)
|
|
2334
|
+
a.dispose();
|
|
2335
|
+
l.length = 0, n.dispose();
|
|
2336
|
+
for (const a of o)
|
|
2337
|
+
a(c);
|
|
2338
|
+
o.length = 0, i.clear(c);
|
|
2103
2339
|
};
|
|
2104
2340
|
};
|
|
2105
2341
|
{
|
|
2106
|
-
const r =
|
|
2107
|
-
return
|
|
2342
|
+
const r = K(t);
|
|
2343
|
+
return E(
|
|
2108
2344
|
...Array.from({ length: t }, (n, i) => i).map((n) => {
|
|
2109
|
-
const i = new
|
|
2110
|
-
return
|
|
2111
|
-
V(i.dispose),
|
|
2112
|
-
h(e(i))
|
|
2113
|
-
);
|
|
2345
|
+
const i = new le(n, r);
|
|
2346
|
+
return d(e(i));
|
|
2114
2347
|
})
|
|
2115
2348
|
);
|
|
2116
2349
|
}
|
|
2117
|
-
},
|
|
2350
|
+
}, ks = (t, e, s) => {
|
|
2118
2351
|
const r = y.map(t, (i) => i.length), n = y.toSignal(t);
|
|
2119
|
-
return
|
|
2352
|
+
return je(
|
|
2120
2353
|
r,
|
|
2121
2354
|
(i) => {
|
|
2122
2355
|
const o = n.map((l) => l[i.index]);
|
|
2123
|
-
return
|
|
2124
|
-
V(o.dispose),
|
|
2125
|
-
h(e(o, i))
|
|
2126
|
-
);
|
|
2356
|
+
return d(e(o, i));
|
|
2127
2357
|
},
|
|
2128
2358
|
s
|
|
2129
2359
|
);
|
|
2130
|
-
},
|
|
2131
|
-
|
|
2360
|
+
}, Rt = (...t) => (e) => (s) => t.forEach((r) => {
|
|
2361
|
+
typeof r == "function" ? r(s, e) : r.dispose(s, e);
|
|
2362
|
+
}), Ms = (t, e) => {
|
|
2363
|
+
if (g.is(t)) {
|
|
2132
2364
|
const s = t;
|
|
2133
2365
|
return (r) => {
|
|
2134
2366
|
r = r.makeRef();
|
|
2135
|
-
const n = s.map((l) =>
|
|
2367
|
+
const n = s.map((l) => d(e(l)));
|
|
2136
2368
|
let i = () => {
|
|
2137
2369
|
};
|
|
2138
2370
|
const o = n.on((l) => {
|
|
@@ -2143,8 +2375,8 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
2143
2375
|
};
|
|
2144
2376
|
};
|
|
2145
2377
|
}
|
|
2146
|
-
return
|
|
2147
|
-
},
|
|
2378
|
+
return d(e(t));
|
|
2379
|
+
}, Is = (t, e, s = () => C) => re(
|
|
2148
2380
|
y.map(
|
|
2149
2381
|
t,
|
|
2150
2382
|
(r) => r.length > 0 ? { notEmpty: r } : { whenEmpty: null }
|
|
@@ -2153,40 +2385,40 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
2153
2385
|
notEmpty: (r) => e(r),
|
|
2154
2386
|
whenEmpty: () => s()
|
|
2155
2387
|
}
|
|
2156
|
-
),
|
|
2157
|
-
const r = s.makePortal(t), n =
|
|
2388
|
+
), Hs = (t, e) => (s) => {
|
|
2389
|
+
const r = s.makePortal(t), n = ae(d(e), r);
|
|
2158
2390
|
return () => n(!0);
|
|
2159
|
-
},
|
|
2160
|
-
mark:
|
|
2391
|
+
}, W = /* @__PURE__ */ new Map(), Vt = (t) => ({
|
|
2392
|
+
mark: nt(`Probe(${t.description})`),
|
|
2161
2393
|
create: ({ callback: e = () => {
|
|
2162
2394
|
}, timeout: s = 10 } = {}) => {
|
|
2163
2395
|
const r = (l) => {
|
|
2164
|
-
clearTimeout(n),
|
|
2396
|
+
clearTimeout(n), W.delete(t), e(l);
|
|
2165
2397
|
};
|
|
2166
|
-
if (
|
|
2398
|
+
if (W.has(t))
|
|
2167
2399
|
throw new Error(`Probe already exists: ${t.description}`);
|
|
2168
2400
|
const n = setTimeout(() => r("timeout"), s), i = { counter: 0, timeoutId: n };
|
|
2169
|
-
return
|
|
2401
|
+
return W.set(t, i), {
|
|
2170
2402
|
value: () => {
|
|
2171
2403
|
clearTimeout(n);
|
|
2172
|
-
const l =
|
|
2404
|
+
const l = W.get(t);
|
|
2173
2405
|
l != null && --l.counter === 0 && r("resolved");
|
|
2174
2406
|
},
|
|
2175
2407
|
dispose: () => r("disposed"),
|
|
2176
2408
|
onUse: () => i.counter++
|
|
2177
2409
|
};
|
|
2178
2410
|
}
|
|
2179
|
-
}),
|
|
2411
|
+
}), $s = Vt(Symbol("GlobalProbe")), jt = (t, e) => (s) => {
|
|
2180
2412
|
const r = s.getStyle(t);
|
|
2181
2413
|
return s.setStyle(t, e), (n) => {
|
|
2182
2414
|
n && s.setStyle(t, r);
|
|
2183
2415
|
};
|
|
2184
|
-
},
|
|
2416
|
+
}, qt = (t, e) => (s) => {
|
|
2185
2417
|
const r = s.getStyle(t), n = e.on((i) => s.setStyle(t, i));
|
|
2186
2418
|
return (i) => {
|
|
2187
2419
|
n(), i && s.setStyle(t, r);
|
|
2188
2420
|
};
|
|
2189
|
-
},
|
|
2421
|
+
}, pe = (t, e) => g.is(e) ? qt(t, e) : jt(t, e), Ns = new Proxy({}, {
|
|
2190
2422
|
/**
|
|
2191
2423
|
* Creates a renderable component for the specified `style` property.
|
|
2192
2424
|
*
|
|
@@ -2195,28 +2427,33 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
2195
2427
|
* @returns The renderable component for the specified attribute.
|
|
2196
2428
|
*
|
|
2197
2429
|
*/
|
|
2198
|
-
get: (t, e) => e === "variable" ? (s, r) =>
|
|
2199
|
-
}),
|
|
2430
|
+
get: (t, e) => e === "variable" ? (s, r) => pe(s, r) : (s) => pe(e, s)
|
|
2431
|
+
}), Ft = (t) => (e) => {
|
|
2200
2432
|
if (e.isBrowser()) {
|
|
2201
2433
|
const s = t(e);
|
|
2202
2434
|
if (s != null)
|
|
2203
|
-
return
|
|
2435
|
+
return d(s)(e);
|
|
2204
2436
|
}
|
|
2205
2437
|
return () => {
|
|
2206
2438
|
};
|
|
2207
|
-
},
|
|
2439
|
+
}, Rs = (t) => (e) => {
|
|
2208
2440
|
const s = t(e);
|
|
2209
2441
|
return s == null ? () => {
|
|
2210
|
-
} :
|
|
2211
|
-
},
|
|
2442
|
+
} : d(s)(e);
|
|
2443
|
+
}, Vs = (t) => Ft((e) => t(e.element)), js = (t) => (e) => {
|
|
2212
2444
|
if (e.isHeadlessDOM()) {
|
|
2213
2445
|
const s = t(e);
|
|
2214
2446
|
if (s)
|
|
2215
|
-
return
|
|
2447
|
+
return d(s)(e);
|
|
2216
2448
|
}
|
|
2217
2449
|
return () => {
|
|
2218
2450
|
};
|
|
2219
|
-
},
|
|
2451
|
+
}, qs = (t) => (e) => {
|
|
2452
|
+
const s = new q(), r = L(s, () => d(t(s))(e));
|
|
2453
|
+
return (n) => {
|
|
2454
|
+
s.dispose(), r(n);
|
|
2455
|
+
};
|
|
2456
|
+
}, he = (t) => (e) => {
|
|
2220
2457
|
let s = e;
|
|
2221
2458
|
function r() {
|
|
2222
2459
|
return s;
|
|
@@ -2230,133 +2467,144 @@ const pt = /* @__PURE__ */ new Set([
|
|
|
2230
2467
|
return a?.(), c;
|
|
2231
2468
|
},
|
|
2232
2469
|
set: ({ mark: l, create: c }, a) => {
|
|
2233
|
-
const { value: u, dispose:
|
|
2234
|
-
i.push(
|
|
2470
|
+
const { value: u, dispose: h, onUse: p } = c(a, r());
|
|
2471
|
+
i.push(h), n(r().setProvider(l, u, p));
|
|
2235
2472
|
}
|
|
2236
2473
|
});
|
|
2237
2474
|
return o == null ? () => {
|
|
2238
|
-
} :
|
|
2239
|
-
|
|
2240
|
-
|
|
2475
|
+
} : E(
|
|
2476
|
+
d(o),
|
|
2477
|
+
Rt(() => i.forEach((l) => l()))
|
|
2241
2478
|
)(r());
|
|
2242
|
-
},
|
|
2479
|
+
}, Fs = (t, e, s) => he(({ set: r }) => (r(t, e), s())), Bs = (t, e) => he(({ use: s }) => e(s(t))), Ws = (...t) => (e) => he(({ use: s }) => {
|
|
2243
2480
|
const r = t.map(s);
|
|
2244
2481
|
return e(...r);
|
|
2245
2482
|
});
|
|
2246
2483
|
export {
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
Os as
|
|
2294
|
-
|
|
2484
|
+
gs as Async,
|
|
2485
|
+
Ts as BindChecked,
|
|
2486
|
+
Ss as BindDate,
|
|
2487
|
+
ws as BindDateTime,
|
|
2488
|
+
_s as BindNumber,
|
|
2489
|
+
vs as BindText,
|
|
2490
|
+
N as BrowserContext,
|
|
2491
|
+
J as CLASS_PLACEHOLDER_ATTR,
|
|
2492
|
+
$ as Computed,
|
|
2493
|
+
Ds as Conjunction,
|
|
2494
|
+
Ps as DOMNode,
|
|
2495
|
+
q as DisposalScope,
|
|
2496
|
+
Ie as El,
|
|
2497
|
+
He as ElNS,
|
|
2498
|
+
le as ElementPosition,
|
|
2499
|
+
C as Empty,
|
|
2500
|
+
xs as Ensure,
|
|
2501
|
+
Ls as EnsureAll,
|
|
2502
|
+
ks as ForEach,
|
|
2503
|
+
E as Fragment,
|
|
2504
|
+
$s as GlobalProbe,
|
|
2505
|
+
ns as HeadlessAdapter,
|
|
2506
|
+
R as HeadlessContext,
|
|
2507
|
+
wt as HeadlessElement,
|
|
2508
|
+
Oe as HeadlessPortal,
|
|
2509
|
+
_t as HeadlessText,
|
|
2510
|
+
Ms as MapSignal,
|
|
2511
|
+
be as MemoryStore,
|
|
2512
|
+
Is as NotEmpty,
|
|
2513
|
+
Lt as OnChecked,
|
|
2514
|
+
Rt as OnDispose,
|
|
2515
|
+
re as OneOf,
|
|
2516
|
+
Re as OneOfField,
|
|
2517
|
+
As as OneOfKind,
|
|
2518
|
+
Es as OneOfTuple,
|
|
2519
|
+
Cs as OneOfType,
|
|
2520
|
+
Nt as OneOfValue,
|
|
2521
|
+
Hs as Portal,
|
|
2522
|
+
Z as Prop,
|
|
2523
|
+
Fs as Provide,
|
|
2524
|
+
Ce as ProviderNotFoundError,
|
|
2525
|
+
it as RenderingError,
|
|
2526
|
+
je as Repeat,
|
|
2527
|
+
g as Signal,
|
|
2528
|
+
$e as Task,
|
|
2529
|
+
os as TextNode,
|
|
2530
|
+
Os as Unless,
|
|
2531
|
+
Bs as Use,
|
|
2532
|
+
Ws as UseMany,
|
|
2295
2533
|
y as Value,
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
Vt as
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2534
|
+
Ve as When,
|
|
2535
|
+
Ft as WithBrowserCtx,
|
|
2536
|
+
Rs as WithCtx,
|
|
2537
|
+
Vs as WithElement,
|
|
2538
|
+
js as WithHeadlessCtx,
|
|
2539
|
+
he as WithProvider,
|
|
2540
|
+
qs as WithScope,
|
|
2541
|
+
De as _NODE_PLACEHOLDER_ATTR,
|
|
2542
|
+
rt as _getSelfOrParentElement,
|
|
2543
|
+
Ee as _isElement,
|
|
2544
|
+
st as _makeGetter,
|
|
2545
|
+
tt as _makeSetter,
|
|
2546
|
+
U as _removeDOMNode,
|
|
2547
|
+
Me as _signalText,
|
|
2548
|
+
ke as _staticText,
|
|
2549
|
+
Yt as animateSignal,
|
|
2550
|
+
Ke as animateSignals,
|
|
2551
|
+
cs as aria,
|
|
2552
|
+
j as attr,
|
|
2553
|
+
es as bind,
|
|
2554
|
+
ts as coalesce,
|
|
2555
|
+
z as computed,
|
|
2556
|
+
ee as computedOf,
|
|
2557
|
+
et as computedRecord,
|
|
2558
|
+
ls as dataAttr,
|
|
2559
|
+
Zt as delaySignal,
|
|
2560
|
+
me as effect,
|
|
2561
|
+
Ge as effectOf,
|
|
2562
|
+
Ot as emit,
|
|
2563
|
+
bs as emitChecked,
|
|
2564
|
+
O as emitTarget,
|
|
2565
|
+
kt as emitValue,
|
|
2566
|
+
It as emitValueAsDate,
|
|
2567
|
+
Ht as emitValueAsDateTime,
|
|
2568
|
+
ms as emitValueAsNullableDate,
|
|
2569
|
+
ys as emitValueAsNullableDateTime,
|
|
2570
|
+
Mt as emitValueAsNumber,
|
|
2571
|
+
Ze as endInterpolate,
|
|
2572
|
+
ge as getCurrentScope,
|
|
2573
|
+
Wt as getParentScope,
|
|
2574
|
+
Bt as getScopeStack,
|
|
2575
|
+
ce as getWindow,
|
|
2576
|
+
ze as guessInterpolate,
|
|
2577
|
+
hs as html,
|
|
2578
|
+
ds as input,
|
|
2579
|
+
Qe as interpolateDate,
|
|
2580
|
+
Xe as interpolateNumber,
|
|
2581
|
+
Ye as interpolateString,
|
|
2582
|
+
Jt as joinSignals,
|
|
2583
|
+
Gt as localStorageProp,
|
|
2584
|
+
Vt as makeProbe,
|
|
2585
|
+
nt as makeProviderMark,
|
|
2586
|
+
ps as math,
|
|
2587
|
+
us as mathAttr,
|
|
2588
|
+
Qt as merge,
|
|
2589
|
+
se as on,
|
|
2590
|
+
Fe as popScope,
|
|
2591
|
+
zt as previousSignal,
|
|
2592
|
+
T as prop,
|
|
2593
|
+
qe as pushScope,
|
|
2594
|
+
ss as render,
|
|
2595
|
+
ae as renderWithContext,
|
|
2596
|
+
d as renderableOfTNode,
|
|
2597
|
+
is as restoreTempoPlaceholders,
|
|
2598
|
+
rs as runHeadless,
|
|
2599
|
+
_ as scopeStack,
|
|
2600
|
+
Ut as scoped,
|
|
2601
|
+
Xt as sessionStorageProp,
|
|
2602
|
+
K as signal,
|
|
2603
|
+
Kt as slidingWindowSignal,
|
|
2604
|
+
Se as storedProp,
|
|
2605
|
+
Ns as style,
|
|
2606
|
+
fs as svg,
|
|
2607
|
+
as as svgAttr,
|
|
2608
|
+
oe as untracked,
|
|
2609
|
+
L as withScope
|
|
2362
2610
|
};
|