@tempots/dom 35.1.0 → 36.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,23 +1,23 @@
1
- const Ye = (t) => Symbol(t);
2
- function Xe(t, e) {
1
+ const st = (s) => Symbol(s);
2
+ function nt(s, e) {
3
3
  return {
4
- type: t,
4
+ type: s,
5
5
  render: e
6
6
  };
7
7
  }
8
- function Te(t) {
9
- return t != null && t !== !1 && t !== 0 && t !== "";
8
+ function Ie(s) {
9
+ return s != null && s !== !1 && s !== 0 && s !== "";
10
10
  }
11
- function Qe(t) {
12
- return !Te(t);
11
+ function rt(s) {
12
+ return !Ie(s);
13
13
  }
14
- function Ze(t) {
15
- return t == null;
14
+ function it(s) {
15
+ return s == null;
16
16
  }
17
- function et(t) {
18
- return t != null;
17
+ function ot(s) {
18
+ return s != null;
19
19
  }
20
- const w = {
20
+ const C = {
21
21
  /**
22
22
  * Maps a value or a Signal to a new value.
23
23
  * If the value is a Signal, it returns a new Signal with the mapped value.
@@ -29,7 +29,7 @@ const w = {
29
29
  * @param fn - The function to map the value.
30
30
  * @returns The mapped value.
31
31
  */
32
- map: (t, e) => y.is(t) ? t.map(e) : e(t),
32
+ map: (s, e) => _.is(s) ? s.map(e) : e(s),
33
33
  /**
34
34
  * Wraps a value or a Signal instance into a Signal.
35
35
  * If the value is already a Signal, it returns the value itself.
@@ -40,30 +40,30 @@ const w = {
40
40
  * @param equals - A function that determines if two values are equal. Defaults to strict equality (===).
41
41
  * @returns A Signal instance.
42
42
  */
43
- toSignal: (t, e) => y.is(t) ? t.derive() : re(t, e),
43
+ toSignal: (s, e) => _.is(s) ? s.derive() : ye(s, e),
44
44
  /**
45
45
  * Wraps a value in a `Signal` if it is not already a `Signal`.
46
46
  * If the value is `null` or `undefined`, it returns `null` or `undefined` respectively.
47
47
  * @param value - The value to wrap or check.
48
48
  * @returns The wrapped value if it is not `null` or `undefined`, otherwise `null` or `undefined`.
49
49
  */
50
- maybeToSignal: (t, e) => {
51
- if (t != null)
52
- return w.toSignal(t, e);
50
+ maybeToSignal: (s, e) => {
51
+ if (s != null)
52
+ return C.toSignal(s, e);
53
53
  },
54
54
  /**
55
55
  * Gets the value from a `Signal` or the value itself if it is not a `Signal`.
56
56
  * @param value - The value or Signal instance to get the value from.
57
57
  * @returns The value.
58
58
  */
59
- get: (t) => y.is(t) ? t.get() : t,
59
+ get: (s) => _.is(s) ? s.get() : s,
60
60
  /**
61
61
  * Adds a listener to a `Signal` or calls the listener immediately if it is not a `Signal`.
62
62
  * @param value - The value or Signal instance to add the listener to.
63
63
  * @param listener - The listener to call when the value changes.
64
64
  * @returns A function to remove the listener.
65
65
  */
66
- on: (t, e) => y.is(t) ? t.on(e) : (e(t), () => {
66
+ on: (s, e) => _.is(s) ? s.on(e) : (e(s), () => {
67
67
  }),
68
68
  /**
69
69
  * Disposes of a value or a Signal.
@@ -71,8 +71,8 @@ const w = {
71
71
  * If the value is not a Signal, it does nothing.
72
72
  * @param value - The value or Signal instance to dispose of.
73
73
  */
74
- dispose: (t) => {
75
- y.is(t) && t.dispose();
74
+ dispose: (s) => {
75
+ _.is(s) && s.dispose();
76
76
  },
77
77
  /**
78
78
  * Returns a function that disposes of a value or a Signal.
@@ -81,7 +81,7 @@ const w = {
81
81
  * @param value - The value or Signal instance to dispose of.
82
82
  * @returns A function to dispose of the value or Signal.
83
83
  */
84
- disposeFn: (t) => () => w.dispose(t),
84
+ disposeFn: (s) => () => C.dispose(s),
85
85
  /**
86
86
  * Derives a Prop from a Signal.
87
87
  * If the value is a Signal, it returns a new Prop with the derived value.
@@ -92,73 +92,73 @@ const w = {
92
92
  * @param options.equals - A function that determines if two values are equal.
93
93
  * @returns A Prop instance.
94
94
  */
95
- deriveProp: (t, {
95
+ deriveProp: (s, {
96
96
  autoDisposeProp: e = !0,
97
- equals: s
98
- } = {}) => y.is(t) ? t.deriveProp({ autoDisposeProp: e, equals: s }) : D(t, s),
97
+ equals: t
98
+ } = {}) => _.is(s) ? s.deriveProp({ autoDisposeProp: e, equals: t }) : B(s, t),
99
99
  /**
100
100
  * Creates a new signal that emits `true` if the value is truthy, `false` otherwise.
101
101
  * @param value - The value or signal to check.
102
102
  * @returns A signal that emits `true` if the value is truthy, `false` otherwise.
103
103
  */
104
- truthy: (t) => w.map(t, Te),
104
+ truthy: (s) => C.map(s, Ie),
105
105
  /**
106
106
  * Creates a new signal that emits `true` if the value is falsy, `false` otherwise.
107
107
  * @param value - The value or signal to check.
108
108
  * @returns A signal that emits `true` if the value is falsy, `false` otherwise.
109
109
  */
110
- falsy: (t) => w.map(t, Qe),
110
+ falsy: (s) => C.map(s, rt),
111
111
  /**
112
112
  * Creates a new signal that emits `true` if the value is null or undefined, `false` otherwise.
113
113
  * @param value - The value or signal to check.
114
114
  * @returns A signal that emits `true` if the value is null or undefined, `false` otherwise.
115
115
  */
116
- nil: (t) => w.map(t, Ze),
116
+ nil: (s) => C.map(s, it),
117
117
  /**
118
118
  * Creates a new signal that emits `true` if the value is not null or undefined, `false` otherwise.
119
119
  * @param value - The value or signal to check.
120
120
  * @returns A signal that emits `true` if the value is not null or undefined, `false` otherwise.
121
121
  */
122
- defined: (t) => w.map(t, et)
123
- }, B = (...t) => (e, s) => {
124
- if (t.length === 1)
125
- return w.toSignal(t[0]).map(e);
126
- const n = t.filter((r) => y.is(r));
127
- return ne(
128
- () => e(...t.map((r) => w.get(r))),
122
+ defined: (s) => C.map(s, ot)
123
+ }, ne = (...s) => (e, t) => {
124
+ if (s.length === 1)
125
+ return C.toSignal(s[0]).map(e);
126
+ const n = s.filter((r) => _.is(r));
127
+ return be(
128
+ () => e(...s.map((r) => C.get(r))),
129
129
  n,
130
- s
130
+ t
131
131
  );
132
- }, Qt = (...t) => (e, s, n, r = (o, i) => o === i) => B(...t)((...o) => o).mapAsync(
133
- ([...o], i) => e(
134
- ...o,
135
- i
132
+ }, ls = (...s) => (e, t, n, r = (i, o) => i === o) => ne(...s)((...i) => i).mapAsync(
133
+ ([...i], o) => e(
134
+ ...i,
135
+ o
136
136
  ),
137
- s,
137
+ t,
138
138
  n,
139
139
  r
140
- ), Zt = (...t) => (e, s, n, r = (o, i) => o === i) => B(...t)((...o) => o).mapAsyncGenerator(
141
- ([...o], i) => e(
142
- ...o,
143
- i
140
+ ), as = (...s) => (e, t, n, r = (i, o) => i === o) => ne(...s)((...i) => i).mapAsyncGenerator(
141
+ ([...i], o) => e(
142
+ ...i,
143
+ o
144
144
  ),
145
- s,
145
+ t,
146
146
  n,
147
147
  r
148
- ), es = (t) => {
149
- const e = Object.keys(t);
150
- return B(...Object.values(t))(
151
- (...s) => Object.fromEntries(e.map((n, r) => [n, s[r]]))
148
+ ), cs = (s) => {
149
+ const e = Object.keys(s);
150
+ return ne(...Object.values(s))(
151
+ (...t) => Object.fromEntries(e.map((n, r) => [n, t[r]]))
152
152
  );
153
- }, tt = (...t) => (e, s = {}) => {
154
- const n = t.filter((r) => y.is(r));
155
- return _e(
156
- () => e(...t.map(w.get)),
153
+ }, lt = (...s) => (e, t = {}) => {
154
+ const n = s.filter((r) => _.is(r));
155
+ return $e(
156
+ () => e(...s.map(C.get)),
157
157
  n,
158
- s
158
+ t
159
159
  );
160
160
  };
161
- class J {
161
+ class ie {
162
162
  _signals = /* @__PURE__ */ new Set();
163
163
  _callbacks = [];
164
164
  _disposed = !1;
@@ -203,8 +203,8 @@ class J {
203
203
  for (const e of this._callbacks)
204
204
  try {
205
205
  e();
206
- } catch (s) {
207
- const n = s instanceof Error ? s.message : String(s);
206
+ } catch (t) {
207
+ const n = t instanceof Error ? t.message : String(t);
208
208
  console.error("Error in disposal callback:", n);
209
209
  }
210
210
  this._callbacks.length = 0;
@@ -231,8 +231,8 @@ class J {
231
231
  * @returns A tracked Prop signal
232
232
  * @public
233
233
  */
234
- prop(e, s) {
235
- const n = ce(() => D(e, s));
234
+ prop(e, t) {
235
+ const n = Ae(() => B(e, t));
236
236
  return this.track(n), n;
237
237
  }
238
238
  /**
@@ -245,8 +245,8 @@ class J {
245
245
  * @returns A tracked Computed signal
246
246
  * @public
247
247
  */
248
- computed(e, s, n) {
249
- const r = ce(() => ne(e, s, n));
248
+ computed(e, t, n) {
249
+ const r = Ae(() => be(e, t, n));
250
250
  return this.track(r), r;
251
251
  }
252
252
  /**
@@ -259,8 +259,8 @@ class J {
259
259
  * @returns A clear function (the effect itself is tracked in the scope)
260
260
  * @public
261
261
  */
262
- effect(e, s, n) {
263
- return O(this, () => _e(e, s, n));
262
+ effect(e, t, n) {
263
+ return z(this, () => $e(e, t, n));
264
264
  }
265
265
  /**
266
266
  * Creates a computed signal with curried signature and tracks it in this scope.
@@ -271,8 +271,8 @@ class J {
271
271
  * @public
272
272
  */
273
273
  computedOf(...e) {
274
- return (s, n) => {
275
- const r = ce(() => B(...e)(s, n));
274
+ return (t, n) => {
275
+ const r = Ae(() => ne(...e)(t, n));
276
276
  return this.track(r), r;
277
277
  };
278
278
  }
@@ -285,39 +285,39 @@ class J {
285
285
  * @public
286
286
  */
287
287
  effectOf(...e) {
288
- return (s, n) => O(this, () => tt(...e)(s, n));
288
+ return (t, n) => z(this, () => lt(...e)(t, n));
289
289
  }
290
290
  }
291
- const _ = [], st = (t) => {
292
- _.push(t);
293
- }, nt = () => {
294
- if (_.length === 0)
291
+ const j = [], at = (s) => {
292
+ j.push(s);
293
+ }, ct = () => {
294
+ if (j.length === 0)
295
295
  throw new Error("Cannot pop from empty scope stack");
296
- _.pop();
297
- }, pe = () => _[_.length - 1] ?? null, ts = () => _, ss = () => _[_.length - 2] ?? null, O = (t, e) => {
298
- st(t);
296
+ j.pop();
297
+ }, Oe = () => j[j.length - 1] ?? null, us = () => j, hs = () => j[j.length - 2] ?? null, z = (s, e) => {
298
+ at(s);
299
299
  try {
300
300
  return e();
301
301
  } finally {
302
- nt();
302
+ ct();
303
303
  }
304
- }, ns = (t) => {
305
- const e = new J();
304
+ }, ds = (s) => {
305
+ const e = new ie();
306
306
  try {
307
- return O(e, () => t(e));
307
+ return z(e, () => s(e));
308
308
  } finally {
309
309
  e.dispose();
310
310
  }
311
- }, ce = (t) => {
312
- const e = _.slice();
313
- _.length = 0;
311
+ }, Ae = (s) => {
312
+ const e = j.slice();
313
+ j.length = 0;
314
314
  try {
315
- return t();
315
+ return s();
316
316
  } finally {
317
- _.length = 0, _.push(...e);
317
+ j.length = 0, j.push(...e);
318
318
  }
319
319
  };
320
- class y {
320
+ class _ {
321
321
  /**
322
322
  * Represents a signal with a value of type T.
323
323
  *
@@ -325,8 +325,8 @@ class y {
325
325
  * @param equals - A function that determines whether two values of type T are equal.
326
326
  * @public
327
327
  */
328
- constructor(e, s) {
329
- this.equals = s, this._value = e;
328
+ constructor(e, t) {
329
+ this.equals = t, this._value = e;
330
330
  }
331
331
  /**
332
332
  * Creates a Signal that holds the result of a Promise, with proper error handling.
@@ -369,14 +369,14 @@ class y {
369
369
  * @param equals - Function to compare two values for equality (defaults to strict equality)
370
370
  * @returns A Signal that represents the result of the Promise
371
371
  */
372
- static ofPromise = (e, s, n, r = (o, i) => o === i) => {
373
- const o = new y(s, r);
374
- return e.then((i) => o._setAndNotify(i)).catch((i) => {
375
- n != null ? o._setAndNotify(n(i)) : console.error(
372
+ static ofPromise = (e, t, n, r = (i, o) => i === o) => {
373
+ const i = new _(t, r);
374
+ return e.then((o) => i._setAndNotify(o)).catch((o) => {
375
+ n != null ? i._setAndNotify(n(o)) : console.error(
376
376
  "Unhandled promise rejection in Signal.ofPromise:",
377
- i
377
+ o
378
378
  );
379
- }), o;
379
+ }), i;
380
380
  };
381
381
  /**
382
382
  * Checks if a value is a Signal.
@@ -453,17 +453,17 @@ class y {
453
453
  * }
454
454
  * ```
455
455
  */
456
- on = (e, s = {}) => {
457
- s.skipInitial || e(this.get(), void 0);
458
- const n = s.once ? (o, i) => {
459
- r(), e(o, i);
456
+ on = (e, t = {}) => {
457
+ t.skipInitial || e(this.get(), void 0);
458
+ const n = t.once ? (i, o) => {
459
+ r(), e(i, o);
460
460
  } : e;
461
461
  this._onValueListeners.push(n);
462
462
  const r = () => {
463
- const o = this._onValueListeners.indexOf(n);
464
- o !== -1 && this._onValueListeners.splice(o, 1), s.abortSignal != null && s.abortSignal.removeEventListener("abort", r);
463
+ const i = this._onValueListeners.indexOf(n);
464
+ i !== -1 && this._onValueListeners.splice(i, 1), t.abortSignal != null && t.abortSignal.removeEventListener("abort", r);
465
465
  };
466
- return s.abortSignal != null && s.abortSignal.addEventListener("abort", r), !s.noAutoDispose && pe()?.onDispose(r), r;
466
+ return t.abortSignal != null && t.abortSignal.addEventListener("abort", r), !t.noAutoDispose && Oe()?.onDispose(r), r;
467
467
  };
468
468
  /**
469
469
  * Registers a listener function to be called whenever the value of the signal changes.
@@ -473,20 +473,20 @@ class y {
473
473
  * @param listener - The listener function to be called when the value of the signal changes.
474
474
  * @param options - Options for the listener.
475
475
  */
476
- onChange = (e, s = {}) => {
476
+ onChange = (e, t = {}) => {
477
477
  let n = 0;
478
- const r = (o, i) => {
479
- n++ > 0 && e(o, i);
478
+ const r = (i, o) => {
479
+ n++ > 0 && e(i, o);
480
480
  };
481
- return this.on(r, s);
481
+ return this.on(r, t);
482
482
  };
483
483
  /**
484
484
  * @internal
485
485
  */
486
486
  _setAndNotify = (e) => {
487
487
  if (this._disposed) return;
488
- const s = this._value;
489
- this.equals(s, e) || (this._value = e, this._onValueListeners.forEach((n) => n(e, s)));
488
+ const t = this._value;
489
+ this.equals(t, e) || (this._value = e, this._onValueListeners.forEach((n) => n(e, t)));
490
490
  };
491
491
  /**
492
492
  * @internal
@@ -574,14 +574,14 @@ class y {
574
574
  * @param equals - Optional function to determine if two transformed values are equal (defaults to strict equality)
575
575
  * @returns A new computed signal with the transformed value (auto-registered with current scope)
576
576
  */
577
- map = (e, s = (n, r) => n === r) => {
578
- const n = new R(() => {
577
+ map = (e, t = (n, r) => n === r) => {
578
+ const n = new ee(() => {
579
579
  try {
580
580
  return e(this.get());
581
581
  } catch (r) {
582
582
  throw console.error("Error in Signal.map:", r), r;
583
583
  }
584
- }, s);
584
+ }, t);
585
585
  return this.setDerivative(n), n;
586
586
  };
587
587
  /**
@@ -594,14 +594,14 @@ class y {
594
594
  * Defaults to a strict equality check (===).
595
595
  * @returns A new Signal that emits the values of the resulting Signal.
596
596
  */
597
- flatMap = (e, s = (n, r) => n === r) => {
598
- const n = new R(() => {
597
+ flatMap = (e, t = (n, r) => n === r) => {
598
+ const n = new ee(() => {
599
599
  try {
600
600
  return e(this.get()).get();
601
601
  } catch (r) {
602
602
  throw console.error("Error in Signal.flatMap:", r), r;
603
603
  }
604
- }, s);
604
+ }, t);
605
605
  return this.setDerivative(n), n;
606
606
  };
607
607
  /**
@@ -610,14 +610,14 @@ class y {
610
610
  * @param fn - The callback function to be invoked with the current value of the signal.
611
611
  * @returns A new signal that emits the same value as the original signal and invokes the callback function.
612
612
  */
613
- tap = (e) => this.map((s) => (e(s), s));
613
+ tap = (e) => this.map((t) => (e(t), t));
614
614
  /**
615
615
  * Returns a new Signal that emits the value at the specified key of the current value.
616
616
  *
617
617
  * @param key - The key of the value to retrieve.
618
618
  * @returns A new Signal that emits the value at the specified key.
619
619
  */
620
- at = (e) => this.map((s) => s[e]);
620
+ at = (e) => this.map((t) => t[e]);
621
621
  /**
622
622
  * @internal
623
623
  */
@@ -628,17 +628,17 @@ class y {
628
628
  */
629
629
  get $() {
630
630
  return this._$ !== void 0 ? this._$ : this._$ = new Proxy(this, {
631
- get: (e, s) => this.at(s)
631
+ get: (e, t) => this.at(t)
632
632
  });
633
633
  }
634
- filter = (e, s) => {
635
- let n = s ?? this.get();
636
- const r = new R(() => {
634
+ filter = (e, t) => {
635
+ let n = t ?? this.get();
636
+ const r = new ee(() => {
637
637
  try {
638
- const o = this.get();
639
- return n = e(o) ? o : n;
640
- } catch (o) {
641
- throw console.error("Error in Signal.filter:", o), o;
638
+ const i = this.get();
639
+ return n = e(i) ? i : n;
640
+ } catch (i) {
641
+ throw console.error("Error in Signal.filter:", i), i;
642
642
  }
643
643
  }, this.equals);
644
644
  return this.setDerivative(r), r;
@@ -653,17 +653,17 @@ class y {
653
653
  * @param equals - Optional equality function to determine if two values are equal.
654
654
  * @returns - A new Computed object with the mapped and filtered values.
655
655
  */
656
- filterMap = (e, s, n = (r, o) => r === o) => {
657
- let r = s;
658
- const o = new R(() => {
656
+ filterMap = (e, t, n = (r, i) => r === i) => {
657
+ let r = t;
658
+ const i = new ee(() => {
659
659
  try {
660
- const i = this.get();
661
- return r = e(i) ?? r;
662
- } catch (i) {
663
- throw console.error("Error in Signal.filterMap:", i), i;
660
+ const o = this.get();
661
+ return r = e(o) ?? r;
662
+ } catch (o) {
663
+ throw console.error("Error in Signal.filterMap:", o), o;
664
664
  }
665
665
  }, n);
666
- return this.setDerivative(o), o;
666
+ return this.setDerivative(i), i;
667
667
  };
668
668
  /**
669
669
  * Maps the values emitted by the signal to a new value asynchronously using the provided function.
@@ -678,25 +678,25 @@ class y {
678
678
  * @param equals - The equality function to compare the mapped values for equality.
679
679
  * @returns A property that holds the mapped value and can be observed for changes.
680
680
  */
681
- mapAsync = (e, s, n, r = (o, i) => o === i) => {
682
- const o = D(s, r);
683
- let i = 0, l = new AbortController();
684
- return o.onDispose(
685
- this.on(async (c) => {
686
- const a = ++i;
681
+ mapAsync = (e, t, n, r = (i, o) => i === o) => {
682
+ const i = B(t, r);
683
+ let o = 0, l = new AbortController();
684
+ return i.onDispose(
685
+ this.on(async (f) => {
686
+ const d = ++o;
687
687
  l.abort(), l = new AbortController();
688
688
  try {
689
- const u = await e(c, { abortSignal: l.signal });
690
- a === i && o.set(u);
691
- } catch (u) {
692
- if (a === i)
689
+ const v = await e(f, { abortSignal: l.signal });
690
+ d === o && i.set(v);
691
+ } catch (v) {
692
+ if (d === o)
693
693
  if (n != null)
694
- o.set(n(u));
694
+ i.set(n(v));
695
695
  else
696
- throw u;
696
+ throw v;
697
697
  }
698
698
  })
699
- ), o;
699
+ ), i;
700
700
  };
701
701
  /**
702
702
  * Maps the values emitted by the signal to multiple values over time using an async generator.
@@ -739,28 +739,28 @@ class y {
739
739
  * @param equals - Optional equality function to compare yielded values.
740
740
  * @returns A property that updates each time the generator yields a value.
741
741
  */
742
- mapAsyncGenerator = (e, s, n, r = (o, i) => o === i) => {
743
- const o = D(s, r);
744
- let i = 0, l = new AbortController();
745
- return o.onDispose(
746
- this.on(async (c) => {
747
- const a = ++i;
742
+ mapAsyncGenerator = (e, t, n, r = (i, o) => i === o) => {
743
+ const i = B(t, r);
744
+ let o = 0, l = new AbortController();
745
+ return i.onDispose(
746
+ this.on(async (f) => {
747
+ const d = ++o;
748
748
  l.abort(), l = new AbortController();
749
749
  try {
750
- const u = e(c, { abortSignal: l.signal });
751
- for await (const d of u) {
752
- if (a !== i) return;
753
- o.set(d);
750
+ const v = e(f, { abortSignal: l.signal });
751
+ for await (const S of v) {
752
+ if (d !== o) return;
753
+ i.set(S);
754
754
  }
755
- } catch (u) {
756
- if (a === i)
755
+ } catch (v) {
756
+ if (d === o)
757
757
  if (n != null)
758
- o.set(n(u));
758
+ i.set(n(v));
759
759
  else
760
- throw u;
760
+ throw v;
761
761
  }
762
762
  })
763
- ), o;
763
+ ), i;
764
764
  };
765
765
  /**
766
766
  * Maps the values of the signal using the provided function `fn`, and returns a new signal
@@ -772,16 +772,16 @@ class y {
772
772
  * @param alt - The alternative value to use when the mapped value is `undefined` or `null`.
773
773
  * @returns A new signal containing the mapped values.
774
774
  */
775
- mapMaybe = (e, s) => this.map((n) => e(n) ?? s);
775
+ mapMaybe = (e, t) => this.map((n) => e(n) ?? t);
776
776
  /**
777
777
  * Feeds a property into the signal and sets up disposal behavior.
778
778
  * @param prop - The property to feed into the signal.
779
779
  * @param autoDisposeProp - Determines whether the property should be automatically disposed when the signal is disposed.
780
780
  * @returns The input property.
781
781
  */
782
- feedProp = (e, s = !1) => {
783
- const n = this.on(e.set, { noAutoDispose: !s });
784
- return e.onDispose(n), s ? this.onDispose(e.dispose) : this.onDispose(n), e;
782
+ feedProp = (e, t = !1) => {
783
+ const n = this.on(e.set, { noAutoDispose: !t });
784
+ return e.onDispose(n), t ? this.onDispose(e.dispose) : this.onDispose(n), e;
785
785
  };
786
786
  /**
787
787
  * Derives a new property from the current signal.
@@ -792,8 +792,8 @@ class y {
792
792
  */
793
793
  deriveProp = ({
794
794
  autoDisposeProp: e = !0,
795
- equals: s
796
- } = {}) => this.feedProp(D(this.get(), s), e);
795
+ equals: t
796
+ } = {}) => this.feedProp(B(this.get(), t), e);
797
797
  /**
798
798
  * 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.
799
799
  * @returns A new signal that emits the same values as the current signal.
@@ -822,8 +822,8 @@ class y {
822
822
  }), e.onDispose(this.on(e.setDirty, { noAutoDispose: !0 })), this.onDispose(e.dispose);
823
823
  };
824
824
  }
825
- const rt = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
826
- class R extends y {
825
+ const ut = typeof queueMicrotask == "function" ? queueMicrotask : (s) => Promise.resolve().then(s);
826
+ class ee extends _ {
827
827
  /**
828
828
  * Creates a new Computed signal.
829
829
  *
@@ -848,8 +848,8 @@ class R extends y {
848
848
  * @see {@link getCurrentScope} - Get the current disposal scope
849
849
  * @see {@link untracked} - Create signals outside of scope tracking
850
850
  */
851
- constructor(e, s) {
852
- super(void 0, s), this._fn = e, this.setDirty(), pe()?.track(this);
851
+ constructor(e, t) {
852
+ super(void 0, t), this._fn = e, this.setDirty(), Oe()?.track(this);
853
853
  }
854
854
  /**
855
855
  * Checks if a value is an instance of `Computed`.
@@ -887,7 +887,7 @@ class R extends y {
887
887
  */
888
888
  _scheduleNotify = () => {
889
889
  const e = ++this._scheduleCount;
890
- rt(() => {
890
+ ut(() => {
891
891
  this._scheduleCount !== e || this._disposed || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn()));
892
892
  });
893
893
  };
@@ -906,7 +906,7 @@ class R extends y {
906
906
  this._disposed || (this._scheduleCount++, this._disposed = !0, this._onDisposeListeners.forEach((e) => e()), this._onDisposeListeners.length = 0, this._derivatives.length = 0);
907
907
  };
908
908
  }
909
- class se extends y {
909
+ class we extends _ {
910
910
  /**
911
911
  * Checks if a value is a Prop.
912
912
  * @param value - The value to check.
@@ -941,15 +941,15 @@ class se extends y {
941
941
  * @param effects - An array of effects to be executed after the state is updated.
942
942
  * @returns A dispatch function that can be used to update the state and trigger the effects.
943
943
  */
944
- reducer = (e, ...s) => {
944
+ reducer = (e, ...t) => {
945
945
  const n = this;
946
- return function r(o) {
947
- const i = n.value;
948
- n.update((l) => e(l, o)), !n.equals(i, n.value) && s.forEach(
946
+ return function r(i) {
947
+ const o = n.value;
948
+ n.update((l) => e(l, i)), !n.equals(o, n.value) && t.forEach(
949
949
  (l) => l({
950
- previousState: i,
950
+ previousState: o,
951
951
  state: n.value,
952
- action: o,
952
+ action: i,
953
953
  dispatch: r
954
954
  })
955
955
  );
@@ -966,9 +966,9 @@ class se extends y {
966
966
  * Defaults to a strict equality check (===).
967
967
  * @returns A Prop object representing the isomorphism.
968
968
  */
969
- iso = (e, s, n = (r, o) => r === o) => {
970
- const r = new se(e(this.get()), n);
971
- return r.onDispose(this.on((o) => r.set(e(o)))), r.on((o) => this._setAndNotify(s(o))), r;
969
+ iso = (e, t, n = (r, i) => r === i) => {
970
+ const r = new we(e(this.get()), n);
971
+ return r.onDispose(this.on((i) => r.set(e(i)))), r.on((i) => this._setAndNotify(t(i))), r;
972
972
  };
973
973
  /**
974
974
  * Returns a `Prop` that represents the value at the specified key of the current value.
@@ -977,8 +977,8 @@ class se extends y {
977
977
  * @returns A `Prop` that represents the value at the specified key.
978
978
  */
979
979
  atProp = (e) => this.iso(
980
- (s) => s[e],
981
- (s) => ({ ...this.value, [e]: s })
980
+ (t) => t[e],
981
+ (t) => ({ ...this.value, [e]: t })
982
982
  );
983
983
  /**
984
984
  * Access for the current value of the property.
@@ -990,42 +990,42 @@ class se extends y {
990
990
  this._setAndNotify(e);
991
991
  }
992
992
  }
993
- const ne = (t, e, s = (n, r) => n === r) => {
994
- const n = new R(t, s);
993
+ const be = (s, e, t = (n, r) => n === r) => {
994
+ const n = new ee(s, t);
995
995
  return e.forEach((r) => r.setDerivative(n)), n;
996
- }, _e = (t, e, s = {}) => {
997
- let n = s.once ? () => {
998
- o(), t();
999
- } : t;
1000
- if (s.skipInitial) {
1001
- let i = !1;
996
+ }, $e = (s, e, t = {}) => {
997
+ let n = t.once ? () => {
998
+ i(), s();
999
+ } : s;
1000
+ if (t.skipInitial) {
1001
+ let o = !1;
1002
1002
  const l = n;
1003
1003
  n = () => {
1004
- i ? l() : i = !0;
1004
+ o ? l() : o = !0;
1005
1005
  };
1006
1006
  }
1007
- const r = ne(n, e), o = () => {
1008
- r.dispose(), s.abortSignal != null && s.abortSignal.removeEventListener("abort", o);
1009
- };
1010
- return s.abortSignal != null && s.abortSignal.addEventListener("abort", o), o;
1011
- }, D = (t, e = (s, n) => s === n) => {
1012
- const s = new se(t, e);
1013
- return pe()?.track(s), s;
1014
- }, re = (t, e = (s, n) => s === n) => new y(t, e), oe = () => (
1007
+ const r = be(n, e), i = () => {
1008
+ r.dispose(), t.abortSignal != null && t.abortSignal.removeEventListener("abort", i);
1009
+ };
1010
+ return t.abortSignal != null && t.abortSignal.addEventListener("abort", i), i;
1011
+ }, B = (s, e = (t, n) => t === n) => {
1012
+ const t = new we(s, e);
1013
+ return Oe()?.track(t), t;
1014
+ }, ye = (s, e = (t, n) => t === n) => new _(s, e), Se = () => (
1015
1015
  /* c8 ignore next */
1016
1016
  typeof window < "u" ? window : void 0
1017
- ), ot = (t, e, s) => t + (e - t) * s, be = 97, it = (t, e, s) => {
1018
- const n = Math.max(t.length, e.length);
1017
+ ), ht = (s, e, t) => s + (e - s) * t, Pe = 97, dt = (s, e, t) => {
1018
+ const n = Math.max(s.length, e.length);
1019
1019
  let r = "";
1020
- for (let o = 0; o < n; o++) {
1021
- let i = t.charCodeAt(o);
1022
- isNaN(i) && (i = be);
1023
- let l = e.charCodeAt(o);
1024
- isNaN(l) && (l = be), r += String.fromCharCode(i + (l - i) * s);
1020
+ for (let i = 0; i < n; i++) {
1021
+ let o = s.charCodeAt(i);
1022
+ isNaN(o) && (o = Pe);
1023
+ let l = e.charCodeAt(i);
1024
+ isNaN(l) && (l = Pe), r += String.fromCharCode(o + (l - o) * t);
1025
1025
  }
1026
1026
  return r;
1027
- }, lt = (t, e, s) => new Date(t.getTime() + (e.getTime() - t.getTime()) * s), at = (t, e) => e, ct = (t) => typeof t == "number" ? ot : typeof t == "string" ? it : t instanceof Date ? lt : at;
1028
- class Ee {
1027
+ }, ft = (s, e, t) => new Date(s.getTime() + (e.getTime() - s.getTime()) * t), pt = (s, e) => e, mt = (s) => typeof s == "number" ? ht : typeof s == "string" ? dt : s instanceof Date ? ft : pt;
1028
+ class He {
1029
1029
  _store = /* @__PURE__ */ new Map();
1030
1030
  /**
1031
1031
  * Retrieves the value associated with the specified key from the memory store.
@@ -1038,228 +1038,228 @@ class Ee {
1038
1038
  * @param key - The key to set the value for.
1039
1039
  * @param value - The value to set.
1040
1040
  */
1041
- setItem = (e, s) => {
1042
- this._store.set(e, s);
1041
+ setItem = (e, t) => {
1042
+ this._store.set(e, t);
1043
1043
  };
1044
1044
  }
1045
- let ue = null, he = null;
1046
- const ut = () => (ue || (ue = new Ee()), ue), ht = () => (he || (he = new Ee()), he), Ce = ({
1047
- key: t,
1045
+ let _e = null, Ee = null;
1046
+ const gt = () => (_e || (_e = new He()), _e), yt = () => (Ee || (Ee = new He()), Ee), Ne = ({
1047
+ key: s,
1048
1048
  defaultValue: e,
1049
- store: s,
1049
+ store: t,
1050
1050
  serialize: n = JSON.stringify,
1051
1051
  deserialize: r = JSON.parse,
1052
- equals: o = (a, u) => a === u,
1053
- onLoad: i = (a) => a,
1052
+ equals: i = (d, v) => d === v,
1053
+ onLoad: o = (d) => d,
1054
1054
  syncTabs: l = !0,
1055
- onKeyChange: c = "load"
1055
+ onKeyChange: f = "load"
1056
1056
  }) => {
1057
- let a = w.get(t);
1058
- const u = s.getItem(a), d = new se(
1059
- u != null ? i(r(u)) : typeof e == "function" ? e() : e,
1060
- o
1061
- ), f = oe(), h = l && typeof f?.BroadcastChannel == "function";
1062
- let p = !1, b = null, v = null;
1063
- const S = (A) => {
1064
- if (!h) return null;
1065
- const I = `tempo:storedProp:${A}`, P = new f.BroadcastChannel(I), H = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`, M = (Q) => {
1066
- const C = Q.data;
1067
- if (!(C == null || typeof C != "object" || C.key !== A || typeof C.value != "string" || C.sourceId != null && C.sourceId === H))
1057
+ let d = C.get(s);
1058
+ const v = t.getItem(d), S = new we(
1059
+ v != null ? o(r(v)) : typeof e == "function" ? e() : e,
1060
+ i
1061
+ ), O = Se(), T = l && typeof O?.BroadcastChannel == "function";
1062
+ let A = !1, $ = null, M = null;
1063
+ const x = (k) => {
1064
+ if (!T) return null;
1065
+ const U = `tempo:storedProp:${k}`, V = new O.BroadcastChannel(U), q = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`, F = (K) => {
1066
+ const H = K.data;
1067
+ if (!(H == null || typeof H != "object" || H.key !== k || typeof H.value != "string" || H.sourceId != null && H.sourceId === q))
1068
1068
  try {
1069
- p = !0;
1070
- const ae = i(r(C.value));
1071
- d.set(ae);
1072
- } catch (ae) {
1069
+ A = !0;
1070
+ const re = o(r(H.value));
1071
+ S.set(re);
1072
+ } catch (re) {
1073
1073
  console.warn(
1074
- `Failed to sync storedProp for key "${A}" via BroadcastChannel`,
1075
- ae
1074
+ `Failed to sync storedProp for key "${k}" via BroadcastChannel`,
1075
+ re
1076
1076
  );
1077
1077
  } finally {
1078
- p = !1;
1078
+ A = !1;
1079
1079
  }
1080
1080
  };
1081
- return P.addEventListener("message", M), d.onDispose(() => {
1082
- P?.removeEventListener("message", M), P?.close();
1083
- }), { channel: P, instanceId: H, handleMessage: M };
1084
- }, x = S(a);
1085
- x && (b = x.channel, v = x.instanceId);
1086
- const X = (A) => {
1087
- const I = a;
1088
- if (I === A) return;
1089
- const P = d.get(), H = n(P);
1090
- if (s.setItem(I, H), b != null && (b.close(), b = null, v = null), a = A, c === "load") {
1091
- const Q = s.getItem(A);
1092
- if (Q != null)
1081
+ return V.addEventListener("message", F), S.onDispose(() => {
1082
+ V?.removeEventListener("message", F), V?.close();
1083
+ }), { channel: V, instanceId: q, handleMessage: F };
1084
+ }, R = x(d);
1085
+ R && ($ = R.channel, M = R.instanceId);
1086
+ const X = (k) => {
1087
+ const U = d;
1088
+ if (U === k) return;
1089
+ const V = S.get(), q = n(V);
1090
+ if (t.setItem(U, q), $ != null && ($.close(), $ = null, M = null), d = k, f === "load") {
1091
+ const K = t.getItem(k);
1092
+ if (K != null)
1093
1093
  try {
1094
- const C = i(r(Q));
1095
- d.set(C);
1096
- } catch (C) {
1094
+ const H = o(r(K));
1095
+ S.set(H);
1096
+ } catch (H) {
1097
1097
  console.warn(
1098
- `Failed to load storedProp from new key "${A}"`,
1099
- C
1098
+ `Failed to load storedProp from new key "${k}"`,
1099
+ H
1100
1100
  );
1101
1101
  }
1102
1102
  else
1103
- s.setItem(A, H);
1104
- } else c === "migrate" && s.setItem(A, H);
1105
- const M = S(A);
1106
- M && (b = M.channel, v = M.instanceId);
1107
- };
1108
- return y.is(t) && d.onDispose(t.on(X)), d.on((A, I) => {
1109
- const P = n(A);
1110
- s.setItem(a, P), b != null && !p && I !== void 0 && v != null && b.postMessage({
1111
- key: a,
1112
- value: P,
1113
- sourceId: v
1103
+ t.setItem(k, q);
1104
+ } else f === "migrate" && t.setItem(k, q);
1105
+ const F = x(k);
1106
+ F && ($ = F.channel, M = F.instanceId);
1107
+ };
1108
+ return _.is(s) && S.onDispose(s.on(X)), S.on((k, U) => {
1109
+ const V = n(k);
1110
+ t.setItem(d, V), $ != null && !A && U !== void 0 && M != null && $.postMessage({
1111
+ key: d,
1112
+ value: V,
1113
+ sourceId: M
1114
1114
  });
1115
- }), d;
1116
- }, rs = (t) => {
1117
- const e = oe()?.localStorage, s = e && typeof e.getItem == "function" ? e : ut();
1118
- return Ce({
1119
- ...t,
1120
- store: s
1115
+ }), S;
1116
+ }, fs = (s) => {
1117
+ const e = Se()?.localStorage, t = e && typeof e.getItem == "function" ? e : gt();
1118
+ return Ne({
1119
+ ...s,
1120
+ store: t
1121
1121
  });
1122
- }, os = (t) => {
1123
- const e = oe()?.sessionStorage, s = e && typeof e.getItem == "function" ? e : ht();
1124
- return Ce({
1125
- ...t,
1126
- store: s
1122
+ }, ps = (s) => {
1123
+ const e = Se()?.sessionStorage, t = e && typeof e.getItem == "function" ? e : yt();
1124
+ return Ne({
1125
+ ...s,
1126
+ store: t
1127
1127
  });
1128
1128
  };
1129
- function Se(t) {
1130
- return typeof requestAnimationFrame == "function" ? requestAnimationFrame(t) : setTimeout(t, 0);
1129
+ function Le(s) {
1130
+ return typeof requestAnimationFrame == "function" ? requestAnimationFrame(s) : setTimeout(s, 0);
1131
1131
  }
1132
- const dt = (t, e, s, n) => {
1133
- const r = n?.duration ?? 300, o = n?.easing ?? ((S) => S), i = n?.equals ?? ((S, x) => S === x);
1134
- let l = n?.interpolate, c = t, a = e(), u = performance.now(), d = null, f = !0;
1135
- const h = new R(e, i), p = D(t, i);
1136
- p.onDispose(() => {
1137
- d !== null && cancelAnimationFrame(d);
1138
- }), p.onDispose(h.dispose), s.forEach((S) => {
1139
- S.setDerivative(h), S.onDispose(p.dispose);
1132
+ const vt = (s, e, t, n) => {
1133
+ const r = n?.duration ?? 300, i = n?.easing ?? ((x) => x), o = n?.equals ?? ((x, R) => x === R);
1134
+ let l = n?.interpolate, f = s, d = e(), v = performance.now(), S = null, O = !0;
1135
+ const T = new ee(e, o), A = B(s, o);
1136
+ A.onDispose(() => {
1137
+ S !== null && cancelAnimationFrame(S);
1138
+ }), A.onDispose(T.dispose), t.forEach((x) => {
1139
+ x.setDerivative(T), x.onDispose(A.dispose);
1140
1140
  });
1141
- const b = (S) => {
1142
- a = S, u = performance.now(), c = p.value, f && (f = !1, d = Se(v));
1143
- }, v = () => {
1144
- const S = (performance.now() - u) / w.get(r), x = o(S);
1145
- l == null && (l = ct(c));
1146
- let X = l(c, a, x);
1147
- S >= 1 ? (f = !0, X = a) : d = Se(v), p.set(X);
1148
- };
1149
- return h.on(b), p;
1150
- }, is = (t, e) => {
1151
- const { initialValue: s, ...n } = e ?? {};
1152
- return dt(
1141
+ const $ = (x) => {
1142
+ d = x, v = performance.now(), f = A.value, O && (O = !1, S = Le(M));
1143
+ }, M = () => {
1144
+ const x = (performance.now() - v) / C.get(r), R = i(x);
1145
+ l == null && (l = mt(f));
1146
+ let X = l(f, d, R);
1147
+ x >= 1 ? (O = !0, X = d) : S = Le(M), A.set(X);
1148
+ };
1149
+ return T.on($), A;
1150
+ }, ms = (s, e) => {
1151
+ const { initialValue: t, ...n } = e ?? {};
1152
+ return vt(
1153
1153
  /* c8 ignore next 2 */
1154
- s ?? t.get(),
1155
- t.get,
1156
- [t],
1154
+ t ?? s.get(),
1155
+ s.get,
1156
+ [s],
1157
1157
  n
1158
1158
  );
1159
- }, ft = (t, e) => {
1160
- const s = Object.values(t).filter(y.is), n = Object.keys(t);
1161
- return ne(() => {
1159
+ }, wt = (s, e) => {
1160
+ const t = Object.values(s).filter(_.is), n = Object.keys(s);
1161
+ return be(() => {
1162
1162
  const r = {};
1163
- for (const o of n)
1164
- r[o] = w.get(t[o]);
1163
+ for (const i of n)
1164
+ r[i] = C.get(s[i]);
1165
1165
  return e(r);
1166
- }, s);
1167
- }, ls = (t) => ft(t, (e) => e), as = (t, e) => {
1168
- const s = D(t.get());
1166
+ }, t);
1167
+ }, gs = (s) => wt(s, (e) => e), ys = (s, e) => {
1168
+ const t = B(s.get());
1169
1169
  let n = null;
1170
- const r = t.on(
1171
- (o) => {
1170
+ const r = s.on(
1171
+ (i) => {
1172
1172
  n != null && clearTimeout(n), n = setTimeout(
1173
1173
  () => {
1174
- n = null, s.set(o);
1174
+ n = null, t.set(i);
1175
1175
  },
1176
- typeof e == "function" ? e(o) : e
1176
+ typeof e == "function" ? e(i) : e
1177
1177
  );
1178
1178
  },
1179
1179
  { noAutoDispose: !0 }
1180
1180
  );
1181
- return s.onDispose(() => {
1181
+ return t.onDispose(() => {
1182
1182
  r(), n != null && clearTimeout(n);
1183
- }), s;
1184
- }, cs = (t) => {
1183
+ }), t;
1184
+ }, vs = (s) => {
1185
1185
  let e;
1186
- return t.map((s) => {
1186
+ return s.map((t) => {
1187
1187
  const n = e;
1188
- return e = s, n;
1188
+ return e = t, n;
1189
1189
  });
1190
- }, us = ({
1191
- size: t = void 0,
1190
+ }, ws = ({
1191
+ size: s = void 0,
1192
1192
  signal: e
1193
1193
  }) => {
1194
- const s = [];
1195
- return e.map((n) => (s.push(n), t != null && s.length > t && s.shift(), s.slice()));
1196
- }, hs = (t) => (...e) => B(
1197
- t,
1194
+ const t = [];
1195
+ return e.map((n) => (t.push(n), s != null && t.length > s && t.shift(), t.slice()));
1196
+ }, bs = (s) => (...e) => ne(
1197
+ s,
1198
1198
  ...e
1199
- )((s, ...n) => s(...n));
1200
- function ds(...t) {
1201
- return B(...t)((...e) => {
1202
- for (const s of e) if (s != null) return s;
1199
+ )((t, ...n) => t(...n));
1200
+ function Ss(...s) {
1201
+ return ne(...s)((...e) => {
1202
+ for (const t of e) if (t != null) return t;
1203
1203
  });
1204
1204
  }
1205
- const fs = (t, {
1205
+ const Ts = (s, {
1206
1206
  channel: e,
1207
- serialize: s = JSON.stringify,
1207
+ serialize: t = JSON.stringify,
1208
1208
  deserialize: n = JSON.parse,
1209
- equals: r = (o, i) => o === i
1209
+ equals: r = (i, o) => i === o
1210
1210
  }) => {
1211
- const o = oe();
1212
- if (typeof o?.BroadcastChannel != "function")
1211
+ const i = Se();
1212
+ if (typeof i?.BroadcastChannel != "function")
1213
1213
  return () => {
1214
1214
  };
1215
- const i = new o.BroadcastChannel(
1215
+ const o = new i.BroadcastChannel(
1216
1216
  `tempo:syncProp:${e}`
1217
1217
  ), l = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
1218
- let c = !1;
1219
- const a = (f) => {
1220
- const h = f.data;
1221
- if (!(h == null || typeof h != "object" || typeof h.value != "string" || h.sourceId != null && h.sourceId === l))
1218
+ let f = !1;
1219
+ const d = (O) => {
1220
+ const T = O.data;
1221
+ if (!(T == null || typeof T != "object" || typeof T.value != "string" || T.sourceId != null && T.sourceId === l))
1222
1222
  try {
1223
- c = !0;
1224
- const p = n(h.value);
1225
- r(t.get(), p) || t.set(p);
1226
- } catch (p) {
1223
+ f = !0;
1224
+ const A = n(T.value);
1225
+ r(s.get(), A) || s.set(A);
1226
+ } catch (A) {
1227
1227
  console.warn(
1228
1228
  `Failed to sync prop for channel "${e}" via BroadcastChannel`,
1229
- p
1229
+ A
1230
1230
  );
1231
1231
  } finally {
1232
- c = !1;
1232
+ f = !1;
1233
1233
  }
1234
1234
  };
1235
- i.addEventListener("message", a);
1236
- const u = t.on((f, h) => {
1237
- if (!c && h !== void 0 && !r(f, h))
1235
+ o.addEventListener("message", d);
1236
+ const v = s.on((O, T) => {
1237
+ if (!f && T !== void 0 && !r(O, T))
1238
1238
  try {
1239
- const p = s(f);
1240
- i.postMessage({
1241
- value: p,
1239
+ const A = t(O);
1240
+ o.postMessage({
1241
+ value: A,
1242
1242
  sourceId: l
1243
1243
  });
1244
- } catch (p) {
1244
+ } catch (A) {
1245
1245
  console.warn(
1246
1246
  `Failed to serialize prop for channel "${e}" via BroadcastChannel`,
1247
- p
1247
+ A
1248
1248
  );
1249
1249
  }
1250
- }), d = () => {
1251
- u(), i.removeEventListener("message", a), i.close();
1250
+ }), S = () => {
1251
+ v(), o.removeEventListener("message", d), o.close();
1252
1252
  };
1253
- return t.onDispose(d), d;
1253
+ return s.onDispose(S), S;
1254
1254
  };
1255
- class de {
1255
+ class De {
1256
1256
  /**
1257
1257
  * Creates a new instance of `ElementPosition`.
1258
1258
  * @param index - The index of the element.
1259
1259
  * @param total - The total number of elements in the collection.
1260
1260
  */
1261
- constructor(e, s) {
1262
- this.index = e, this.total = s, this.counter = e + 1, this.isFirst = e === 0, this.isEven = e % 2 === 1, this.isOdd = e % 2 === 0;
1261
+ constructor(e, t) {
1262
+ this.index = e, this.total = t, this.counter = e + 1, this.isFirst = e === 0, this.isEven = e % 2 === 1, this.isOdd = e % 2 === 0;
1263
1263
  }
1264
1264
  /**
1265
1265
  * The counter of the element starting from 1.
@@ -1300,14 +1300,22 @@ class de {
1300
1300
  this.#e?.dispose(), this.#e = void 0;
1301
1301
  };
1302
1302
  }
1303
- const De = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "multiple", "readonly", "required", "autofocus"]), Le = /* @__PURE__ */ new Set(["selected"]), xe = /* @__PURE__ */ new Set([
1303
+ const Re = /* @__PURE__ */ new Set([
1304
+ "checked",
1305
+ "disabled",
1306
+ "hidden",
1307
+ "multiple",
1308
+ "readonly",
1309
+ "required",
1310
+ "autofocus"
1311
+ ]), je = /* @__PURE__ */ new Set(["selected"]), Ve = /* @__PURE__ */ new Set([
1304
1312
  "rowSpan",
1305
1313
  "colSpan",
1306
1314
  "tabIndex",
1307
1315
  "valueAsNumber"
1308
- ]), Pe = /* @__PURE__ */ new Set(["valueAsDate"]), Me = {
1316
+ ]), Be = /* @__PURE__ */ new Set(["valueAsDate"]), qe = {
1309
1317
  readonly: "readOnly"
1310
- }, Oe = /* @__PURE__ */ new Set([
1318
+ }, Fe = /* @__PURE__ */ new Set([
1311
1319
  "value",
1312
1320
  "textContent",
1313
1321
  "innerText",
@@ -1316,35 +1324,391 @@ const De = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "multiple",
1316
1324
  "outerHTML",
1317
1325
  "className",
1318
1326
  "classList"
1319
- ]), pt = (t, e) => {
1320
- if (Le.has(t))
1321
- return (s) => {
1322
- s == null || s !== !0 ? e.removeAttribute(t) : e.setAttribute(t, "");
1327
+ ]), bt = (s, e) => {
1328
+ if (je.has(s))
1329
+ return (t) => {
1330
+ t == null || t !== !0 ? e.removeAttribute(s) : e.setAttribute(s, "");
1323
1331
  };
1324
- if (De.has(t)) {
1325
- const s = Me[t] || t;
1332
+ if (Re.has(s)) {
1333
+ const t = qe[s] || s;
1326
1334
  return (n) => {
1327
- n == null ? e[s] = null : e[s] = !!n;
1335
+ n == null ? e[t] = null : e[t] = !!n;
1328
1336
  };
1329
- } else return xe.has(t) ? (s) => {
1330
- s == null ? e[t] = null : e[t] = Number(s);
1331
- } : Pe.has(t) ? (s) => {
1332
- s == null ? e[t] = null : e[t] = s;
1333
- } : Oe.has(t) ? (s) => {
1334
- s == null ? e[t] = null : e[t] = String(s);
1335
- } : (s) => {
1336
- s == null ? e.removeAttribute(t) : e.setAttribute(t, s);
1337
- };
1338
- }, gt = (t, e) => Le.has(t) ? () => e.hasAttribute(t) : De.has(t) ? () => !!e[Me[t] || t] : xe.has(t) ? () => Number(e[t]) : Pe.has(t) ? () => e[t] : Oe.has(t) ? () => String(e[t]) : () => e.getAttribute(t), te = (t) => {
1339
- const e = t;
1340
- e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.parentNode && t.parentNode.removeChild(t);
1341
- }, mt = (t) => ke(t) || Ie(t) ? t : t.parentElement, ke = (t) => t.nodeType === 1, Ie = (t) => t.nodeType === 11;
1342
- class He extends Error {
1337
+ } else return Ve.has(s) ? (t) => {
1338
+ t == null ? e[s] = null : e[s] = Number(t);
1339
+ } : Be.has(s) ? (t) => {
1340
+ t == null ? e[s] = null : e[s] = t;
1341
+ } : Fe.has(s) ? (t) => {
1342
+ t == null ? e[s] = null : e[s] = String(t);
1343
+ } : (t) => {
1344
+ t == null ? e.removeAttribute(s) : e.setAttribute(s, t);
1345
+ };
1346
+ }, St = (s, e) => je.has(s) ? () => e.hasAttribute(s) : Re.has(s) ? () => (
1347
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1348
+ !!e[qe[s] || s]
1349
+ ) : Ve.has(s) ? () => Number(e[s]) : Be.has(s) ? () => e[s] : Fe.has(s) ? () => String(e[s]) : () => e.getAttribute(s), ve = (s) => {
1350
+ const e = s;
1351
+ e && e.onblur && (e.onblur = null), !(!s || s.ownerDocument === void 0) && s.parentNode && s.parentNode.removeChild(s);
1352
+ }, Tt = (s) => We(s) || Ue(s) ? s : s.parentElement, We = (s) => s.nodeType === 1, Ue = (s) => s.nodeType === 11;
1353
+ class Je extends Error {
1343
1354
  constructor(e) {
1344
1355
  super(`Provider not found: ${e.description}`);
1345
1356
  }
1346
1357
  }
1347
- class j {
1358
+ function At(s) {
1359
+ const { create: e } = s, t = (a) => e((c) => c.makeChildText(a).clear), n = (a) => e((c) => {
1360
+ const h = c.makeChildText(a.value), u = a.on(h.setText);
1361
+ return (m) => {
1362
+ u(), h.clear(m);
1363
+ };
1364
+ }), r = (a, c, h) => _.is(a) ? c(a) : h(a), i = (a) => {
1365
+ if (a == null)
1366
+ return l;
1367
+ if (Array.isArray(a))
1368
+ return f(...a.map(i));
1369
+ if (typeof a == "string")
1370
+ return t(a);
1371
+ if (_.is(a))
1372
+ return n(a);
1373
+ if (typeof a == "object" && "render" in a && "type" in a)
1374
+ return a;
1375
+ throw new Error(`Unknown type: '${typeof a}' for child: ${a}`);
1376
+ }, o = (a, c, h) => {
1377
+ const u = a.makeRef();
1378
+ let m = () => {
1379
+ }, p = null;
1380
+ const b = c.on(
1381
+ (y) => {
1382
+ p?.dispose(), m(!0), p = new ie(), m = z(
1383
+ p,
1384
+ () => i(h(y)).render(u)
1385
+ );
1386
+ },
1387
+ { noAutoDispose: !0 }
1388
+ );
1389
+ return (y) => {
1390
+ p?.dispose(), m(y), b(), u.clear(y);
1391
+ };
1392
+ }, l = e(() => () => {
1393
+ }), f = (...a) => e((c) => {
1394
+ const h = a.map(
1395
+ (u) => i(u).render(c)
1396
+ );
1397
+ return (u) => {
1398
+ h.forEach((m) => m(u));
1399
+ };
1400
+ }), d = (a, c, h) => r(
1401
+ a,
1402
+ (u) => e(
1403
+ (m) => o(
1404
+ m,
1405
+ u,
1406
+ (p) => p ? c() : h?.()
1407
+ )
1408
+ ),
1409
+ (u) => {
1410
+ if (u) {
1411
+ const m = c();
1412
+ return m != null ? i(m) : l;
1413
+ }
1414
+ return i(h?.());
1415
+ }
1416
+ ), v = (a, c, h) => d(
1417
+ C.map(a, (u) => !u),
1418
+ c,
1419
+ h
1420
+ ), S = (a, c, h) => {
1421
+ if (h != null)
1422
+ return S(a, (u) => {
1423
+ const m = new De(
1424
+ u.index,
1425
+ u.total.map((p) => p - 1)
1426
+ );
1427
+ return f(
1428
+ i(c(u)),
1429
+ d(
1430
+ u.isLast,
1431
+ () => l,
1432
+ () => h(m)
1433
+ )
1434
+ );
1435
+ });
1436
+ if (_.is(a))
1437
+ return e((u) => {
1438
+ const m = a.derive(), p = u.makeRef(), b = [], y = [];
1439
+ return m.on((w) => {
1440
+ const E = b.splice(w), D = y.splice(w);
1441
+ for (const I of D)
1442
+ I.dispose();
1443
+ for (const I of E)
1444
+ I(!0);
1445
+ for (let I = b.length; I < w; I++) {
1446
+ const g = new De(I, m), P = new ie();
1447
+ y.push(P), b.push(
1448
+ z(
1449
+ P,
1450
+ () => i(c(g)).render(p)
1451
+ )
1452
+ );
1453
+ }
1454
+ }), (w) => {
1455
+ for (const E of y)
1456
+ E.dispose();
1457
+ y.length = 0, m.dispose();
1458
+ for (const E of b)
1459
+ E(w);
1460
+ b.length = 0, p.clear(w);
1461
+ };
1462
+ });
1463
+ {
1464
+ const u = ye(a);
1465
+ return f(
1466
+ ...Array.from({ length: a }, (m, p) => p).map((m) => {
1467
+ const p = new De(m, u);
1468
+ return i(c(p));
1469
+ })
1470
+ );
1471
+ }
1472
+ }, O = (a, c, h) => {
1473
+ const u = C.map(a, (p) => p.length), m = C.toSignal(a);
1474
+ return S(
1475
+ u,
1476
+ (p) => {
1477
+ const b = m.map((y) => y[p.index]);
1478
+ return i(c(b, p));
1479
+ },
1480
+ h
1481
+ );
1482
+ }, T = (a, c) => {
1483
+ function h(m) {
1484
+ return e((p) => {
1485
+ const b = p.makeRef();
1486
+ let y, w;
1487
+ const E = m.map((g) => Object.keys(g)[0]);
1488
+ let D;
1489
+ const I = E.on((g) => {
1490
+ if (g !== D) {
1491
+ D = g, w?.dispose(), y?.(!0), w = m.map((G) => G[g]);
1492
+ const P = c[g](w);
1493
+ y = i(P).render(b);
1494
+ }
1495
+ });
1496
+ return (g) => {
1497
+ w?.dispose(), I(), b.clear(g), y?.(g);
1498
+ };
1499
+ });
1500
+ }
1501
+ function u(m) {
1502
+ const p = Object.keys(m)[0];
1503
+ return i(c[p](ye(m[p])));
1504
+ }
1505
+ return r(a, h, u);
1506
+ }, A = (a, c, h) => T(
1507
+ C.map(a, (u) => ({ [u[c]]: u })),
1508
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1509
+ h
1510
+ ), $ = (a, c) => A(a, "kind", c), M = (a, c) => A(a, "type", c), x = (a, c) => {
1511
+ const h = C.map(a, ([u, m]) => ({
1512
+ [u]: m
1513
+ }));
1514
+ return T(h, c);
1515
+ }, R = (a, c) => T(
1516
+ C.map(a, (h) => ({ [h]: !0 })),
1517
+ c
1518
+ ), X = (a, c) => {
1519
+ if (_.is(a)) {
1520
+ const h = a;
1521
+ return e((u) => {
1522
+ const m = u.makeRef(), p = h.map((w) => i(c(w)));
1523
+ let b = () => {
1524
+ };
1525
+ const y = p.on((w) => {
1526
+ b(!0), b = w.render(m);
1527
+ });
1528
+ return (w) => {
1529
+ y(), b(w);
1530
+ };
1531
+ });
1532
+ }
1533
+ return i(c(a));
1534
+ }, k = (a, c, h) => {
1535
+ function u(p) {
1536
+ return e((b) => {
1537
+ const y = b.makeRef();
1538
+ let w = () => {
1539
+ }, E = !1, D = null;
1540
+ const I = p.on((g) => {
1541
+ g == null ? (w(!0), w = i(h?.()).render(y), E = !1, D?.dispose(), D = null) : E ? D.set(g) : (D = B(g), w(!0), w = i(
1542
+ c(D)
1543
+ ).render(y), E = !0);
1544
+ });
1545
+ return (g) => {
1546
+ D?.dispose(), I(), w?.(g), y.clear(g);
1547
+ };
1548
+ });
1549
+ }
1550
+ function m(p) {
1551
+ if (p == null) {
1552
+ const b = h?.();
1553
+ return b != null ? i(b) : l;
1554
+ }
1555
+ return i(c(ye(p)));
1556
+ }
1557
+ return r(
1558
+ a,
1559
+ u,
1560
+ m
1561
+ );
1562
+ }, U = (...a) => (c, h) => e((u) => {
1563
+ const m = u.makeRef();
1564
+ if (a.some(
1565
+ (g) => !_.is(g) && g == null
1566
+ ))
1567
+ return (h != null ? i(h?.()) : l).render(m);
1568
+ const p = a.map(
1569
+ () => null
1570
+ ), b = a.map(
1571
+ (g) => _.is(g) ? g.value != null : g != null
1572
+ );
1573
+ let y = null;
1574
+ const w = B(b.every((g) => g)), E = (g, P) => {
1575
+ if (g.value != null) {
1576
+ if (p[P] == null) {
1577
+ const G = B(g.value);
1578
+ p[P] = G;
1579
+ } else
1580
+ p[P].value = g.value;
1581
+ b[P] = !0;
1582
+ } else
1583
+ b[P] = !1;
1584
+ };
1585
+ let D = a.length - 1;
1586
+ const I = a.map((g, P) => {
1587
+ if (!_.is(g)) {
1588
+ const G = B(g);
1589
+ return p[P] = G, () => {
1590
+ };
1591
+ }
1592
+ return g.on(() => {
1593
+ E(g, P), D === 0 ? w.value = b.every((G) => G) : D--;
1594
+ });
1595
+ });
1596
+ return w.on((g) => {
1597
+ y?.(!0), y = null, g ? y = i(c(...p)).render(
1598
+ m
1599
+ ) : y = i(h?.() ?? l).render(m);
1600
+ }), (g) => {
1601
+ p.forEach((P) => P?.dispose()), w.dispose(), I.forEach((P) => P()), y?.(g), m.clear(g);
1602
+ };
1603
+ }), V = (a, c, h = () => l) => T(
1604
+ C.map(
1605
+ a,
1606
+ (u) => u.length > 0 ? { notEmpty: u } : { whenEmpty: null }
1607
+ ),
1608
+ {
1609
+ notEmpty: (u) => c(u),
1610
+ whenEmpty: () => h()
1611
+ }
1612
+ ), q = (a, c) => {
1613
+ if (typeof c == "function")
1614
+ return q(a, { then: c });
1615
+ const h = c.pending != null ? i(c.pending()) : l, u = c.then, m = c.error != null ? (p) => i(c.error(p)) : () => l;
1616
+ return e((p) => {
1617
+ let b = !0;
1618
+ const y = a(), w = p.makeRef();
1619
+ let E = i(h).render(w);
1620
+ return y.then(
1621
+ (D) => {
1622
+ b && (E(!0), E = i(u(D)).render(w));
1623
+ },
1624
+ (D) => {
1625
+ b && (E(!0), E = i(m(D)).render(w));
1626
+ }
1627
+ ), (D) => {
1628
+ b = !1, E(D), w.clear(D);
1629
+ };
1630
+ });
1631
+ }, F = (a, c) => q(() => a, c), K = (...a) => e(
1632
+ (c) => (h) => a.forEach((u) => {
1633
+ typeof u == "function" ? u(h, c) : u.dispose(h, c);
1634
+ })
1635
+ ), H = (a, c = {}) => (h) => {
1636
+ const u = c?.firstSeparator ?? a, m = c?.lastSeparator ?? a;
1637
+ return R(
1638
+ h.map((p) => p.isFirst ? "first" : p.isLast ? "last" : "other"),
1639
+ {
1640
+ first: u,
1641
+ last: m,
1642
+ other: a
1643
+ }
1644
+ );
1645
+ }, re = (a) => e((c) => {
1646
+ const h = new ie(), u = z(
1647
+ h,
1648
+ () => i(a(h)).render(c)
1649
+ );
1650
+ return (m) => {
1651
+ h.dispose(), u(m);
1652
+ };
1653
+ }), pe = (a) => e((c) => {
1654
+ let h = c;
1655
+ function u() {
1656
+ return h;
1657
+ }
1658
+ function m(y) {
1659
+ h = y;
1660
+ }
1661
+ const p = [], b = a({
1662
+ use: ({ mark: y }) => {
1663
+ const { value: w, onUse: E } = u().getProvider(y);
1664
+ return E?.(), w;
1665
+ },
1666
+ set: ({ mark: y, create: w }, E) => {
1667
+ const { value: D, dispose: I, onUse: g } = w(E, u());
1668
+ p.push(I), m(u().setProvider(y, D, g));
1669
+ }
1670
+ });
1671
+ return b == null ? () => {
1672
+ } : f(
1673
+ i(b),
1674
+ K(() => p.forEach((y) => y()))
1675
+ ).render(u());
1676
+ });
1677
+ return {
1678
+ Empty: l,
1679
+ Fragment: f,
1680
+ When: d,
1681
+ Unless: v,
1682
+ ForEach: O,
1683
+ Repeat: S,
1684
+ OneOf: T,
1685
+ OneOfField: A,
1686
+ OneOfKind: $,
1687
+ OneOfType: M,
1688
+ OneOfValue: R,
1689
+ OneOfTuple: x,
1690
+ MapSignal: X,
1691
+ Ensure: k,
1692
+ EnsureAll: U,
1693
+ NotEmpty: V,
1694
+ Task: q,
1695
+ Async: F,
1696
+ OnDispose: K,
1697
+ Conjunction: H,
1698
+ WithScope: re,
1699
+ WithProvider: pe,
1700
+ Provide: (a, c, h) => pe(({ set: u }) => (u(a, c), h())),
1701
+ Use: (a, c) => pe(({ use: h }) => c(h(a))),
1702
+ UseMany: (...a) => (c) => pe(({ use: h }) => {
1703
+ const u = a.map(h);
1704
+ return c(...u);
1705
+ }),
1706
+ handleValueOrSignal: r,
1707
+ createReactiveRenderable: o,
1708
+ renderableOfTNode: i
1709
+ };
1710
+ }
1711
+ class te {
1348
1712
  /**
1349
1713
  * Constructs a new `DOMContext` instance.
1350
1714
  *
@@ -1354,8 +1718,8 @@ class j {
1354
1718
  * @param providers - The `Providers` instance associated with this context.
1355
1719
  * @param isFirstLevel - A boolean value indicating whether this context is at the first level, meaning the outermost node in the generated DOM.
1356
1720
  */
1357
- constructor(e, s, n, r) {
1358
- this.document = e, this.element = s, this.reference = n, this.providers = r;
1721
+ constructor(e, t, n, r) {
1722
+ this.document = e, this.element = t, this.reference = n, this.providers = r;
1359
1723
  }
1360
1724
  /**
1361
1725
  * Creates a new `DOMContext` instance for the given `Element` and optional reference `Node`.
@@ -1365,8 +1729,8 @@ class j {
1365
1729
  * @param providers - The providers to associate with the `DOMContext`.
1366
1730
  * @returns A new `DOMContext` instance.
1367
1731
  */
1368
- static of(e, s, n) {
1369
- return new j(e.ownerDocument, e, s, n);
1732
+ static of(e, t, n) {
1733
+ return new te(e.ownerDocument, e, t, n);
1370
1734
  }
1371
1735
  /**
1372
1736
  * Creates a new DOM element (eg: HTML or SVG) with the specified tag name and namespace.
@@ -1375,7 +1739,7 @@ class j {
1375
1739
  * @param namespace - The namespace URI to create the element in, or `undefined` to create a standard HTML element.
1376
1740
  * @returns The newly created element.
1377
1741
  */
1378
- createElement = (e, s) => s !== void 0 ? this.document.createElementNS(s, e) : this.document.createElement(e);
1742
+ createElement = (e, t) => t !== void 0 ? this.document.createElementNS(t, e) : this.document.createElement(e);
1379
1743
  /**
1380
1744
  * Creates a new child element and appends it to the current element, returning a new context.
1381
1745
  *
@@ -1398,8 +1762,8 @@ class j {
1398
1762
  * @param namespace - The namespace URI for the element, or undefined for HTML elements
1399
1763
  * @returns A new DOMContext focused on the newly created child element
1400
1764
  */
1401
- makeChildElement = (e, s) => {
1402
- const n = this.createElement(e, s);
1765
+ makeChildElement = (e, t) => {
1766
+ const n = this.createElement(e, t);
1403
1767
  return this.appendOrInsert(n), this.withElement(n);
1404
1768
  };
1405
1769
  /**
@@ -1414,8 +1778,8 @@ class j {
1414
1778
  * @returns A new `DOMContext` with a reference to the new text node.
1415
1779
  */
1416
1780
  makeChildText = (e) => {
1417
- const s = this.createText(e);
1418
- return this.appendOrInsert(s), this.withReference(s);
1781
+ const t = this.createText(e);
1782
+ return this.appendOrInsert(t), this.withReference(t);
1419
1783
  };
1420
1784
  /**
1421
1785
  * Sets the text content of the current element.
@@ -1451,7 +1815,7 @@ class j {
1451
1815
  * @param element - The DOM element to use in the new `DOMContext` instance.
1452
1816
  * @returns A new `DOMContext` instance with the provided `element`.
1453
1817
  */
1454
- withElement = (e) => new j(
1818
+ withElement = (e) => new te(
1455
1819
  e.ownerDocument ?? this.document,
1456
1820
  e,
1457
1821
  void 0,
@@ -1502,10 +1866,10 @@ class j {
1502
1866
  * @throws {Error} When the selector doesn't match any element in the document
1503
1867
  */
1504
1868
  makePortal = (e) => {
1505
- const s = typeof e == "string" ? this.document.querySelector(e) : e;
1506
- if (s == null)
1869
+ const t = typeof e == "string" ? this.document.querySelector(e) : e;
1870
+ if (t == null)
1507
1871
  throw new Error(`Cannot find element by selector for portal: ${e}`);
1508
- return this.withElement(s);
1872
+ return this.withElement(t);
1509
1873
  };
1510
1874
  /**
1511
1875
  * Creates a new `DOMContext` instance with the specified reference.
@@ -1513,7 +1877,7 @@ class j {
1513
1877
  * @param reference - The optional `Text` node to use as the reference for the new `DOMContext`.
1514
1878
  * @returns A new `DOMContext` instance with the specified reference.
1515
1879
  */
1516
- withReference = (e) => new j(this.document, this.element, e, this.providers);
1880
+ withReference = (e) => new te(this.document, this.element, e, this.providers);
1517
1881
  /**
1518
1882
  * Sets a provider for the given provider mark.
1519
1883
  *
@@ -1521,9 +1885,9 @@ class j {
1521
1885
  * @param value - The provider to set for the given mark.
1522
1886
  * @returns A new `DOMContext` instance with the specified provider.
1523
1887
  */
1524
- setProvider = (e, s, n) => new j(this.document, this.element, this.reference, {
1888
+ setProvider = (e, t, n) => new te(this.document, this.element, this.reference, {
1525
1889
  ...this.providers,
1526
- [e]: [s, n]
1890
+ [e]: [t, n]
1527
1891
  });
1528
1892
  /**
1529
1893
  * Retrieves a provider for the given provider mark.
@@ -1534,12 +1898,12 @@ class j {
1534
1898
  */
1535
1899
  getProvider = (e) => {
1536
1900
  if (this.providers[e] === void 0)
1537
- throw new He(e);
1538
- const [s, n] = this.providers[e];
1539
- return { value: s, onUse: n };
1901
+ throw new Je(e);
1902
+ const [t, n] = this.providers[e];
1903
+ return { value: t, onUse: n };
1540
1904
  };
1541
1905
  clear = (e) => {
1542
- e && (this.reference !== void 0 ? te(this.reference) : te(this.element));
1906
+ e && (this.reference !== void 0 ? ve(this.reference) : ve(this.element));
1543
1907
  };
1544
1908
  /**
1545
1909
  * Adds classes to the element.
@@ -1567,10 +1931,10 @@ class j {
1567
1931
  * @param options - The options for the event listener.
1568
1932
  * @returns A function to remove the event listener.
1569
1933
  */
1570
- on = (e, s, n) => {
1571
- const r = (o) => s(o, this);
1572
- return this.element.addEventListener(e, r, n), (o) => {
1573
- o && this.element.removeEventListener(e, r, n);
1934
+ on = (e, t, n) => {
1935
+ const r = (i) => t(i, this);
1936
+ return this.element.addEventListener(e, r, n), (i) => {
1937
+ i && this.element.removeEventListener(e, r, n);
1574
1938
  };
1575
1939
  };
1576
1940
  /**
@@ -1599,8 +1963,8 @@ class j {
1599
1963
  * @param name - The name of the style to set.
1600
1964
  * @param value - The value of the style to set.
1601
1965
  */
1602
- setStyle = (e, s) => {
1603
- this.element.style[e] = s;
1966
+ setStyle = (e, t) => {
1967
+ this.element.style[e] = t;
1604
1968
  };
1605
1969
  /**
1606
1970
  * Gets the style of the element.
@@ -1609,57 +1973,57 @@ class j {
1609
1973
  */
1610
1974
  getStyle = (e) => this.element.style[e];
1611
1975
  makeAccessors = (e) => ({
1612
- get: gt(e, this.element),
1613
- set: pt(e, this.element)
1976
+ get: St(e, this.element),
1977
+ set: bt(e, this.element)
1614
1978
  });
1615
1979
  getWindow = () => this.document.defaultView;
1616
1980
  }
1617
- const z = (t, e) => {
1618
- const s = new J(), n = O(s, () => t.render(e));
1981
+ const he = (s, e) => {
1982
+ const t = new ie(), n = z(t, () => s.render(e));
1619
1983
  return (r = !0) => {
1620
- s.dispose(), n(r);
1984
+ t.dispose(), n(r);
1621
1985
  };
1622
- }, ps = (t, e, { doc: s, clear: n, disposeWithParent: r = !0, providers: o = {} } = {}) => {
1623
- const i = typeof e == "string" ? (s ?? document).querySelector(e) : e;
1624
- if (i === null)
1625
- throw new yt(
1986
+ }, As = (s, e, { doc: t, clear: n, disposeWithParent: r = !0, providers: i = {} } = {}) => {
1987
+ const o = typeof e == "string" ? (t ?? document).querySelector(e) : e;
1988
+ if (o === null)
1989
+ throw new _t(
1626
1990
  `Cannot find element by selector for render: ${e}`
1627
1991
  );
1628
- n !== !1 && (s ?? i.ownerDocument) != null && (i.nodeType === 1 || i.nodeType === 11) && (i.innerHTML = "");
1629
- const l = mt(i), c = ke(i) || Ie(i) ? void 0 : i, a = j.of(l, c, o), u = z(t, a);
1630
- let d;
1631
- return r && i.parentElement != null && (d = new MutationObserver((f) => {
1632
- f[0]?.removedNodes.forEach((h) => {
1633
- h === i && (d?.disconnect(), u(i.nodeType !== 1));
1992
+ n !== !1 && (t ?? o.ownerDocument) != null && (o.nodeType === 1 || o.nodeType === 11) && (o.innerHTML = "");
1993
+ const l = Tt(o), f = We(o) || Ue(o) ? void 0 : o, d = te.of(l, f, i), v = he(s, d);
1994
+ let S;
1995
+ return r && o.parentElement != null && (S = new MutationObserver((O) => {
1996
+ O[0]?.removedNodes.forEach((T) => {
1997
+ T === o && (S?.disconnect(), v(o.nodeType !== 1));
1634
1998
  });
1635
- }), d.observe(i.parentElement, {
1999
+ }), S.observe(o.parentElement, {
1636
2000
  childList: !0,
1637
2001
  subtree: !1,
1638
2002
  attributes: !1
1639
2003
  })), () => {
1640
- d?.disconnect(), u(!0);
2004
+ S?.disconnect(), v(!0);
1641
2005
  };
1642
- }, gs = (t, {
2006
+ }, _s = (s, {
1643
2007
  startUrl: e = "https://example.com",
1644
- selector: s,
2008
+ selector: t,
1645
2009
  providers: n = {}
1646
2010
  } = {
1647
2011
  selector: "body"
1648
2012
  }) => {
1649
- const r = w.toSignal(e).deriveProp(), o = new je(s, void 0), i = new V(o, void 0, { currentURL: r }, n);
2013
+ const r = C.toSignal(e).deriveProp(), i = new Ye(t, void 0), o = new se(i, void 0, { currentURL: r }, n);
1650
2014
  return {
1651
- clear: z(t(), i),
1652
- root: o,
2015
+ clear: he(s(), o),
2016
+ root: i,
1653
2017
  currentURL: r
1654
2018
  };
1655
2019
  };
1656
- class yt extends Error {
2020
+ class _t extends Error {
1657
2021
  constructor(e) {
1658
2022
  super(e);
1659
2023
  }
1660
2024
  }
1661
- const fe = "data-tts-node", q = "data-tts-class", F = "data-tts-style", W = "data-tts-html", U = "data-tts-text", G = "data-tts-attrs";
1662
- class ms {
2025
+ const Ce = "data-tts-node", oe = "data-tts-class", le = "data-tts-style", ae = "data-tts-html", ce = "data-tts-text", ue = "data-tts-attrs";
2026
+ class Es {
1663
2027
  /**
1664
2028
  * Selects elements from the headless environment.
1665
2029
  * @param selector - The selector to select elements from. The supported selectors are CSS selectors whose complexity depends on the adapter implementation.
@@ -1735,19 +2099,19 @@ class ms {
1735
2099
  setInnerText;
1736
2100
  constructor({
1737
2101
  select: e,
1738
- getAttribute: s,
2102
+ getAttribute: t,
1739
2103
  setAttribute: n,
1740
2104
  getClass: r,
1741
- setClass: o,
1742
- getStyles: i,
2105
+ setClass: i,
2106
+ getStyles: o,
1743
2107
  setStyles: l,
1744
- appendHTML: c,
1745
- getInnerHTML: a,
1746
- setInnerHTML: u,
1747
- getInnerText: d,
1748
- setInnerText: f
2108
+ appendHTML: f,
2109
+ getInnerHTML: d,
2110
+ setInnerHTML: v,
2111
+ getInnerText: S,
2112
+ setInnerText: O
1749
2113
  }) {
1750
- this.select = e, this.getAttribute = s, this.setAttribute = n, this.getClass = r, this.setClass = o, this.getStyles = i, this.setStyles = l, this.appendHTML = c, this.getInnerHTML = a, this.setInnerHTML = u, this.getInnerText = d, this.setInnerText = f;
2114
+ this.select = e, this.getAttribute = t, this.setAttribute = n, this.getClass = r, this.setClass = i, this.getStyles = o, this.setStyles = l, this.appendHTML = f, this.getInnerHTML = d, this.setInnerHTML = v, this.getInnerText = S, this.setInnerText = O;
1751
2115
  }
1752
2116
  /**
1753
2117
  * Sets the content of the root element from a HeadlessPortal. Generally this will be the same instance that is
@@ -1757,121 +2121,121 @@ class ms {
1757
2121
  * @param setPlaceholders - Whether to set placeholders for the content. This allows you to restore the original content
1758
2122
  * when you render on the server and then hydrate on the client.
1759
2123
  */
1760
- setFromRoot = (e, s) => {
2124
+ setFromRoot = (e, t) => {
1761
2125
  e.getPortals().forEach((r) => {
1762
- const o = typeof r.selector == "string" ? this.select(r.selector) : [r.selector];
1763
- for (const i of o) {
1764
- if (i == null)
2126
+ const i = typeof r.selector == "string" ? this.select(r.selector) : [r.selector];
2127
+ for (const o of i) {
2128
+ if (o == null)
1765
2129
  throw new Error(
1766
2130
  `Cannot find element by selector for render: ${r.selector}`
1767
2131
  );
1768
- if (r.hasChildren() && this.appendHTML(i, r.contentToHTML(s)), r.hasInnerHTML()) {
1769
- if (s) {
1770
- const l = this.getInnerHTML(i);
1771
- l != null && this.setAttribute(i, W, l);
2132
+ if (r.hasChildren() && this.appendHTML(o, r.contentToHTML(t)), r.hasInnerHTML()) {
2133
+ if (t) {
2134
+ const l = this.getInnerHTML(o);
2135
+ l != null && this.setAttribute(o, ae, l);
1772
2136
  }
1773
- this.setInnerHTML(i, r.getInnerHTML());
2137
+ this.setInnerHTML(o, r.getInnerHTML());
1774
2138
  }
1775
2139
  if (r.hasInnerText()) {
1776
- if (s) {
1777
- const l = this.getInnerText(i);
1778
- l != null && this.setAttribute(i, U, l);
2140
+ if (t) {
2141
+ const l = this.getInnerText(o);
2142
+ l != null && this.setAttribute(o, ce, l);
1779
2143
  }
1780
- this.setInnerText(i, r.getInnerText());
2144
+ this.setInnerText(o, r.getInnerText());
1781
2145
  }
1782
2146
  if (r.hasClasses()) {
1783
- if (s) {
1784
- const l = this.getClass(i);
1785
- l != null && this.setAttribute(i, q, l);
2147
+ if (t) {
2148
+ const l = this.getClass(o);
2149
+ l != null && this.setAttribute(o, oe, l);
1786
2150
  }
1787
- this.setClass(i, r.getClasses().join(" "));
2151
+ this.setClass(o, r.getClasses().join(" "));
1788
2152
  }
1789
2153
  if (r.hasStyles()) {
1790
- if (s) {
1791
- const l = this.getStyles(i);
2154
+ if (t) {
2155
+ const l = this.getStyles(o);
1792
2156
  Object.keys(l).length > 0 && this.setAttribute(
1793
- i,
1794
- F,
2157
+ o,
2158
+ le,
1795
2159
  JSON.stringify(l)
1796
2160
  );
1797
2161
  }
1798
- this.setStyles(i, r.getStyles());
2162
+ this.setStyles(o, r.getStyles());
1799
2163
  }
1800
2164
  if (r.hasAttributes()) {
1801
2165
  const l = r.getAttributes();
1802
- if (s) {
1803
- const c = [];
1804
- l.forEach(([a]) => {
1805
- const u = this.getAttribute(i, a);
1806
- u != null && c.push([a, u]);
1807
- }), c.length > 0 && this.setAttribute(
1808
- i,
1809
- G,
1810
- JSON.stringify(Object.fromEntries(c))
2166
+ if (t) {
2167
+ const f = [];
2168
+ l.forEach(([d]) => {
2169
+ const v = this.getAttribute(o, d);
2170
+ v != null && f.push([d, v]);
2171
+ }), f.length > 0 && this.setAttribute(
2172
+ o,
2173
+ ue,
2174
+ JSON.stringify(Object.fromEntries(f))
1811
2175
  );
1812
2176
  }
1813
- l.forEach(([c, a]) => {
1814
- this.setAttribute(i, c, a);
2177
+ l.forEach(([f, d]) => {
2178
+ this.setAttribute(o, f, d);
1815
2179
  });
1816
2180
  }
1817
2181
  }
1818
2182
  });
1819
2183
  };
1820
2184
  }
1821
- const $e = (t) => JSON.parse(t.replace(/&quot;/g, '"')), wt = (t) => {
1822
- const e = t.getAttribute(q);
1823
- t.removeAttribute(q), e != null && t.setAttribute("class", e);
1824
- }, bt = (t) => {
1825
- const e = t.getAttribute(W);
1826
- t.removeAttribute(W), e != null && (t.innerHTML = e);
1827
- }, St = (t) => {
1828
- const e = t.getAttribute(U);
1829
- t.removeAttribute(U), e != null && (t.innerText = e);
1830
- }, vt = (t) => {
1831
- const e = t.getAttribute(F);
1832
- if (t.removeAttribute(F), e != null) {
1833
- const s = $e(e), n = Object.entries(s);
1834
- n.length > 0 && (t.style.cssText = n.map(([r, o]) => `${r}: ${o}`).join("; "));
1835
- }
1836
- }, At = (t) => {
1837
- const e = t.getAttribute(G);
1838
- if (t.removeAttribute(G), e != null) {
1839
- const s = $e(e);
1840
- Object.entries(s).forEach(([n, r]) => {
1841
- r == null ? t.removeAttribute(n) : t.setAttribute(n, r);
2185
+ const Ke = (s) => JSON.parse(s.replace(/&quot;/g, '"')), Et = (s) => {
2186
+ const e = s.getAttribute(oe);
2187
+ s.removeAttribute(oe), e != null && s.setAttribute("class", e);
2188
+ }, Dt = (s) => {
2189
+ const e = s.getAttribute(ae);
2190
+ s.removeAttribute(ae), e != null && (s.innerHTML = e);
2191
+ }, Ct = (s) => {
2192
+ const e = s.getAttribute(ce);
2193
+ s.removeAttribute(ce), e != null && (s.innerText = e);
2194
+ }, Ot = (s) => {
2195
+ const e = s.getAttribute(le);
2196
+ if (s.removeAttribute(le), e != null) {
2197
+ const t = Ke(e), n = Object.entries(t);
2198
+ n.length > 0 && (s.style.cssText = n.map(([r, i]) => `${r}: ${i}`).join("; "));
2199
+ }
2200
+ }, xt = (s) => {
2201
+ const e = s.getAttribute(ue);
2202
+ if (s.removeAttribute(ue), e != null) {
2203
+ const t = Ke(e);
2204
+ Object.entries(t).forEach(([n, r]) => {
2205
+ r == null ? s.removeAttribute(n) : s.setAttribute(n, r);
1842
2206
  });
1843
2207
  }
1844
- }, ys = () => {
2208
+ }, Ds = () => {
1845
2209
  const e = [
1846
- fe,
1847
- q,
1848
- W,
1849
- U,
1850
- F,
1851
- G
2210
+ Ce,
2211
+ oe,
2212
+ ae,
2213
+ ce,
2214
+ le,
2215
+ ue
1852
2216
  ].map((n) => `[${n}]`).join(",");
1853
2217
  document.querySelectorAll(e).forEach((n) => {
1854
2218
  const r = n;
1855
- if (r.hasAttribute(fe)) {
1856
- te(r);
2219
+ if (r.hasAttribute(Ce)) {
2220
+ ve(r);
1857
2221
  return;
1858
2222
  }
1859
- r.hasAttribute(q) && wt(r), r.hasAttribute(U) && St(r), r.hasAttribute(W) && bt(r), r.hasAttribute(F) && vt(r), r.hasAttribute(G) && At(r);
2223
+ r.hasAttribute(oe) && Et(r), r.hasAttribute(ce) && Ct(r), r.hasAttribute(ae) && Dt(r), r.hasAttribute(le) && Ot(r), r.hasAttribute(ue) && xt(r);
1860
2224
  });
1861
- }, Tt = "data-tempo-id", $ = Symbol("class"), N = Symbol("style"), Z = Symbol("handler"), Ne = () => Math.random().toString(36).substring(2, 15), _t = (t) => t.replace(/<[^>]*>?/g, "");
1862
- class Re {
2225
+ }, Pt = "data-tempo-id", Q = /* @__PURE__ */ Symbol("class"), Z = /* @__PURE__ */ Symbol("style"), me = /* @__PURE__ */ Symbol("handler"), Ge = () => Math.random().toString(36).substring(2, 15), Lt = (s) => s.replace(/<[^>]*>?/g, "");
2226
+ class ze {
1863
2227
  constructor(e) {
1864
2228
  this.parent = e;
1865
2229
  }
1866
- id = Ne();
2230
+ id = Ge();
1867
2231
  properties = {};
1868
2232
  children = [];
1869
2233
  isElement = () => !0;
1870
2234
  isText = () => !1;
1871
- getText = () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? _t(this.properties.innerHTML) : this.children.map((e) => e.getText()).join("");
2235
+ getText = () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? Lt(this.properties.innerHTML) : this.children.map((e) => e.getText()).join("");
1872
2236
  removeChild = (e) => {
1873
- const s = this.children.indexOf(e);
1874
- s !== -1 && this.children.splice(s, 1);
2237
+ const t = this.children.indexOf(e);
2238
+ t !== -1 && this.children.splice(t, 1);
1875
2239
  };
1876
2240
  remove = () => {
1877
2241
  if (this.parent != null)
@@ -1880,7 +2244,7 @@ class Re {
1880
2244
  throw new Error("Parent is undefined");
1881
2245
  };
1882
2246
  getPortals = () => {
1883
- const e = this.elements().flatMap((s) => s.isPortal() ? [s, ...s.getPortals()] : s.getPortals());
2247
+ const e = this.elements().flatMap((t) => t.isPortal() ? [t, ...t.getPortals()] : t.getPortals());
1884
2248
  return this.isPortal() && e.unshift(this), e;
1885
2249
  };
1886
2250
  elements = () => this.children.filter((e) => e.isElement());
@@ -1889,78 +2253,78 @@ class Re {
1889
2253
  getInnerText = () => this.properties.innerText ?? "";
1890
2254
  hasInnerText = () => this.properties.innerText != null;
1891
2255
  hasChildren = () => this.children.length > 0;
1892
- hasClasses = () => this.properties[$] != null;
1893
- hasStyles = () => this.properties[N] != null;
2256
+ hasClasses = () => this.properties[Q] != null;
2257
+ hasStyles = () => this.properties[Z] != null;
1894
2258
  hasAttributes = () => Object.keys(this.properties).length > 0;
1895
- hasHandlers = () => this.properties[Z] != null;
2259
+ hasHandlers = () => this.properties[me] != null;
1896
2260
  hasRenderableProperties = () => this.hasClasses() || this.hasAttributes() || this.hasStyles();
1897
2261
  getById = (e) => {
1898
2262
  if (this.properties.id === e)
1899
2263
  return this;
1900
- for (const s of this.elements()) {
1901
- const n = s.getById(e);
2264
+ for (const t of this.elements()) {
2265
+ const n = t.getById(e);
1902
2266
  if (n != null)
1903
2267
  return n;
1904
2268
  }
1905
2269
  };
1906
- trigger = (e, s) => {
1907
- ((this.properties[Z] ?? {})[e] ?? []).forEach((r) => r(s));
2270
+ trigger = (e, t) => {
2271
+ ((this.properties[me] ?? {})[e] ?? []).forEach((r) => r(t));
1908
2272
  };
1909
2273
  click = () => {
1910
2274
  this.trigger("click", {});
1911
2275
  };
1912
- on = (e, s, n, r) => {
1913
- const o = this.properties[Z] ??= {}, i = r?.once ? (c) => {
1914
- l(), s(c, n);
1915
- } : (c) => s(c, n);
1916
- o[e] = [...o[e] ?? [], i];
2276
+ on = (e, t, n, r) => {
2277
+ const i = this.properties[me] ??= {}, o = r?.once ? (f) => {
2278
+ l(), t(f, n);
2279
+ } : (f) => t(f, n);
2280
+ i[e] = [...i[e] ?? [], o];
1917
2281
  const l = () => {
1918
- const c = o[e] ?? [], a = c.indexOf(i);
1919
- a !== -1 && (c.splice(a, 1), c.length === 0 ? (delete o[e], Object.keys(o).length === 0 && delete this.properties[Z]) : o[e] = c, r?.signal != null && r.signal.removeEventListener("abort", l));
2282
+ const f = i[e] ?? [], d = f.indexOf(o);
2283
+ d !== -1 && (f.splice(d, 1), f.length === 0 ? (delete i[e], Object.keys(i).length === 0 && delete this.properties[me]) : i[e] = f, r?.signal != null && r.signal.removeEventListener("abort", l));
1920
2284
  };
1921
2285
  return r?.signal != null && r.signal.addEventListener("abort", l), l;
1922
2286
  };
1923
2287
  addClasses = (e) => {
1924
2288
  if (e.length === 0)
1925
2289
  return;
1926
- const s = this.properties[$] ??= [], n = new Set(s);
2290
+ const t = this.properties[Q] ??= [], n = new Set(t);
1927
2291
  for (const r of e)
1928
- n.has(r) || (s.push(r), n.add(r));
2292
+ n.has(r) || (t.push(r), n.add(r));
1929
2293
  };
1930
2294
  removeClasses = (e) => {
1931
2295
  if (e.length === 0)
1932
2296
  return;
1933
- const s = this.properties[$] ??= [], n = new Set(e);
2297
+ const t = this.properties[Q] ??= [], n = new Set(e);
1934
2298
  let r = 0;
1935
- for (let o = 0; o < s.length; o++)
1936
- n.has(s[o]) || (s[r] = s[o], r++);
1937
- s.length = r, s.length === 0 && delete this.properties[$];
2299
+ for (let i = 0; i < t.length; i++)
2300
+ n.has(t[i]) || (t[r] = t[i], r++);
2301
+ t.length = r, t.length === 0 && delete this.properties[Q];
1938
2302
  };
1939
- getClasses = () => this.properties[$] ?? [];
2303
+ getClasses = () => this.properties[Q] ?? [];
1940
2304
  getAttributes = () => Object.entries(this.properties).filter(
1941
2305
  ([e]) => !["innerText", "innerHTML"].includes(e)
1942
2306
  );
1943
2307
  getVisibleAttributes = () => Reflect.ownKeys(this.properties).flatMap(
1944
- (e) => e === $ ? [["class", this.getClasses()]] : e === N ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
2308
+ (e) => e === Q ? [["class", this.getClasses()]] : e === Z ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
1945
2309
  );
1946
- setStyle = (e, s) => {
1947
- const n = this.properties[N] ??= {};
1948
- n[e] = s, s === "" && (delete n[e], Object.keys(n).length === 0 && delete this.properties[N]);
2310
+ setStyle = (e, t) => {
2311
+ const n = this.properties[Z] ??= {};
2312
+ n[e] = t, t === "" && (delete n[e], Object.keys(n).length === 0 && delete this.properties[Z]);
1949
2313
  };
1950
- getStyle = (e) => this.properties[N]?.[e] ?? "";
1951
- getStyles = () => this.properties[N] ?? {};
2314
+ getStyle = (e) => this.properties[Z]?.[e] ?? "";
2315
+ getStyles = () => this.properties[Z] ?? {};
1952
2316
  makeAccessors = (e) => {
1953
- const s = this.properties;
2317
+ const t = this.properties;
1954
2318
  return {
1955
- get: () => s[e],
1956
- set: (n) => s[e] = n
2319
+ get: () => t[e],
2320
+ set: (n) => t[e] = n
1957
2321
  };
1958
2322
  };
1959
2323
  }
1960
- const Et = (t) => t.replace(/"/g, "&quot;"), Ct = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1961
- class Dt extends Re {
1962
- constructor(e, s, n) {
1963
- super(n), this.tagName = e, this.namespace = s;
2324
+ const Mt = (s) => s.replace(/"/g, "&quot;"), kt = (s) => s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
2325
+ class It extends ze {
2326
+ constructor(e, t, n) {
2327
+ super(n), this.tagName = e, this.namespace = t;
1964
2328
  }
1965
2329
  isPortal = () => !1;
1966
2330
  /**
@@ -1968,13 +2332,13 @@ class Dt extends Re {
1968
2332
  * Returns an object containing the attributes string and any innerHTML value.
1969
2333
  */
1970
2334
  buildAttributesString = (e) => {
1971
- let s = null;
1972
- const n = this.namespace ? ` xmlns="${this.namespace}"` : "", r = this.getVisibleAttributes().map(([i, l]) => i === "class" ? ` class="${l.join(" ")}"` : i === "style" ? typeof l == "string" ? ` style="${l}"` : ` style="${Object.entries(l).map(([c, a]) => `${c}: ${a};`).join(" ")}"` : xt.has(i) ? ` ${i}` : i === "innerHTML" ? (s = l, "") : i === "innerText" ? (s = Ct(l), "") : ` ${i}="${Et(l)}"`).join(""), o = e ? ` ${fe} ${Tt}="${this.id}"` : "";
1973
- return { attrs: `${n}${r}${o}`, innerHTML: s };
2335
+ let t = null;
2336
+ const n = this.namespace ? ` xmlns="${this.namespace}"` : "", r = this.getVisibleAttributes().map(([o, l]) => o === "class" ? ` class="${l.join(" ")}"` : o === "style" ? typeof l == "string" ? ` style="${l}"` : ` style="${Object.entries(l).map(([f, d]) => `${f}: ${d};`).join(" ")}"` : Ht.has(o) ? ` ${o}` : o === "innerHTML" ? (t = l, "") : o === "innerText" ? (t = kt(l), "") : ` ${o}="${Mt(l)}"`).join(""), i = e ? ` ${Ce} ${Pt}="${this.id}"` : "";
2337
+ return { attrs: `${n}${r}${i}`, innerHTML: t };
1974
2338
  };
1975
2339
  toHTML = (e = !1) => {
1976
- const s = this.children.map((o) => o.toHTML()).join(""), { attrs: n, innerHTML: r } = this.buildAttributesString(e);
1977
- return ve.has(this.tagName) && s === "" ? `<${this.tagName}${n} />` : `<${this.tagName}${n}>${r ?? s}</${this.tagName}>`;
2340
+ const t = this.children.map((i) => i.toHTML()).join(""), { attrs: n, innerHTML: r } = this.buildAttributesString(e);
2341
+ return Me.has(this.tagName) && t === "" ? `<${this.tagName}${n} />` : `<${this.tagName}${n}>${r ?? t}</${this.tagName}>`;
1978
2342
  };
1979
2343
  /**
1980
2344
  * Generates HTML output as an async stream of string chunks.
@@ -1984,22 +2348,22 @@ class Dt extends Re {
1984
2348
  * @yields String chunks of HTML content.
1985
2349
  */
1986
2350
  async *toHTMLStream(e) {
1987
- const s = e?.generatePlaceholders ?? !1, { attrs: n, innerHTML: r } = this.buildAttributesString(s);
1988
- if (ve.has(this.tagName) && this.children.length === 0) {
2351
+ const t = e?.generatePlaceholders ?? !1, { attrs: n, innerHTML: r } = this.buildAttributesString(t);
2352
+ if (Me.has(this.tagName) && this.children.length === 0) {
1989
2353
  yield `<${this.tagName}${n} />`;
1990
2354
  return;
1991
2355
  }
1992
2356
  if (yield `<${this.tagName}${n}>`, r !== null)
1993
2357
  yield r;
1994
2358
  else
1995
- for (const o of this.children)
1996
- yield* o.toHTMLStream(e);
2359
+ for (const i of this.children)
2360
+ yield* i.toHTMLStream(e);
1997
2361
  yield `</${this.tagName}>`;
1998
2362
  }
1999
2363
  }
2000
- class je extends Re {
2001
- constructor(e, s) {
2002
- super(s), this.selector = e;
2364
+ class Ye extends ze {
2365
+ constructor(e, t) {
2366
+ super(t), this.selector = e;
2003
2367
  }
2004
2368
  isPortal = () => !0;
2005
2369
  toHTML = () => "";
@@ -2010,7 +2374,7 @@ class je extends Re {
2010
2374
  // eslint-disable-next-line require-yield
2011
2375
  async *toHTMLStream(e) {
2012
2376
  }
2013
- contentToHTML = (e = !1) => this.children.map((s) => s.toHTML(e)).join("");
2377
+ contentToHTML = (e = !1) => this.children.map((t) => t.toHTML(e)).join("");
2014
2378
  /**
2015
2379
  * Streams the portal's content HTML.
2016
2380
  * Unlike toHTMLStream, this yields the actual content for rendering at the target location.
@@ -2019,15 +2383,15 @@ class je extends Re {
2019
2383
  * @yields String chunks of the portal's content.
2020
2384
  */
2021
2385
  async *contentToHTMLStream(e) {
2022
- for (const s of this.children)
2023
- yield* s.toHTMLStream(e);
2386
+ for (const t of this.children)
2387
+ yield* t.toHTMLStream(e);
2024
2388
  }
2025
2389
  }
2026
- class Lt {
2390
+ class $t {
2027
2391
  constructor(e) {
2028
2392
  this.text = e;
2029
2393
  }
2030
- id = Ne();
2394
+ id = Ge();
2031
2395
  isElement = () => !1;
2032
2396
  isText = () => !0;
2033
2397
  getText = () => this.text;
@@ -2042,20 +2406,20 @@ class Lt {
2042
2406
  yield this.text;
2043
2407
  }
2044
2408
  }
2045
- class V {
2046
- constructor(e, s, n, r) {
2047
- this.element = e, this.reference = s, this.container = n, this.providers = r;
2409
+ class se {
2410
+ constructor(e, t, n, r) {
2411
+ this.element = e, this.reference = t, this.container = n, this.providers = r;
2048
2412
  }
2049
2413
  appendOrInsert = (e) => {
2050
2414
  if (this.reference != null) {
2051
- const s = this.element.children.indexOf(this.reference);
2052
- s >= 0 && this.element.children.splice(s, 0, e);
2415
+ const t = this.element.children.indexOf(this.reference);
2416
+ t >= 0 && this.element.children.splice(t, 0, e);
2053
2417
  } else
2054
2418
  this.element.children.push(e);
2055
2419
  };
2056
- makeChildElement = (e, s) => {
2057
- const n = new Dt(e, s, this.element);
2058
- return this.appendOrInsert(n), new V(
2420
+ makeChildElement = (e, t) => {
2421
+ const n = new It(e, t, this.element);
2422
+ return this.appendOrInsert(n), new se(
2059
2423
  n,
2060
2424
  void 0,
2061
2425
  this.container,
@@ -2063,10 +2427,10 @@ class V {
2063
2427
  );
2064
2428
  };
2065
2429
  makeChildText = (e) => {
2066
- const s = new Lt(e);
2067
- return this.appendOrInsert(s), new V(
2430
+ const t = new $t(e);
2431
+ return this.appendOrInsert(t), new se(
2068
2432
  this.element,
2069
- s,
2433
+ t,
2070
2434
  this.container,
2071
2435
  this.providers
2072
2436
  );
@@ -2077,9 +2441,9 @@ class V {
2077
2441
  getText = () => this.reference?.getText() ?? this.element.getText();
2078
2442
  makeRef = () => this.makeChildText("");
2079
2443
  makePortal = (e) => {
2080
- const s = new je(e, this.element);
2081
- return this.appendOrInsert(s), new V(
2082
- s,
2444
+ const t = new Ye(e, this.element);
2445
+ return this.appendOrInsert(t), new se(
2446
+ t,
2083
2447
  void 0,
2084
2448
  this.container,
2085
2449
  this.providers
@@ -2092,20 +2456,20 @@ class V {
2092
2456
  * @param value - The provider to set for the given mark.
2093
2457
  * @returns A new `DOMContext` instance with the specified provider.
2094
2458
  */
2095
- setProvider = (e, s, n) => new V(this.element, this.reference, this.container, {
2459
+ setProvider = (e, t, n) => new se(this.element, this.reference, this.container, {
2096
2460
  ...this.providers,
2097
- [e]: [s, n]
2461
+ [e]: [t, n]
2098
2462
  });
2099
2463
  getProvider = (e) => {
2100
2464
  if (this.providers[e] === void 0)
2101
- throw new He(e);
2102
- const [s, n] = this.providers[e];
2103
- return { value: s, onUse: n };
2465
+ throw new Je(e);
2466
+ const [t, n] = this.providers[e];
2467
+ return { value: t, onUse: n };
2104
2468
  };
2105
2469
  clear = (e) => {
2106
2470
  e && (this.reference !== void 0 ? this.element.removeChild(this.reference) : this.element.remove());
2107
2471
  };
2108
- on = (e, s) => this.element.on(e, s, this);
2472
+ on = (e, t) => this.element.on(e, t, this);
2109
2473
  addClasses = (e) => this.element.addClasses(e);
2110
2474
  removeClasses = (e) => this.element.removeClasses(e);
2111
2475
  getClasses = () => this.element.getClasses();
@@ -2113,64 +2477,84 @@ class V {
2113
2477
  isBrowser = () => !1;
2114
2478
  isHeadlessDOM = () => !0;
2115
2479
  isHeadless = () => !0;
2116
- setStyle = (e, s) => this.element.setStyle(e, s);
2480
+ setStyle = (e, t) => this.element.setStyle(e, t);
2117
2481
  getStyle = (e) => this.element.getStyle(e);
2118
2482
  makeAccessors = (e) => this.element.makeAccessors(e);
2119
2483
  }
2120
- const xt = /* @__PURE__ */ new Set([
2484
+ const Ht = /* @__PURE__ */ new Set([
2121
2485
  "checked",
2122
2486
  "disabled",
2123
2487
  "multiple",
2124
2488
  "readonly",
2125
2489
  "required",
2126
2490
  "selected"
2127
- ]), ve = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), ws = () => (
2491
+ ]), Me = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), Cs = () => (
2128
2492
  /* c8 ignore next */
2129
2493
  typeof window < "u" ? window : void 0
2130
- ), Pt = Symbol("DOM_RENDERABLE"), m = (t) => Xe(Pt, t), Ve = (t) => m((e) => e.makeChildText(t).clear), Be = (t) => m((e) => {
2131
- const s = e.makeChildText(t.value), n = t.on(s.setText);
2132
- return (r) => {
2133
- n(), s.clear(r);
2134
- };
2135
- }), bs = (t) => y.is(t) ? Be(t) : Ve(t), E = (...t) => m((e) => {
2136
- const s = t.map((n) => g(n).render(e));
2137
- return (n) => {
2138
- s.forEach((r) => r(n));
2139
- };
2140
- }), L = m(() => () => {
2141
- }), Mt = (t) => m((e) => (e.addClasses(t), (s) => {
2142
- s && e.removeClasses(t);
2143
- })), Ot = (t) => m((e) => {
2144
- let s = /* @__PURE__ */ new Set();
2145
- const n = t.on(
2494
+ ), Nt = /* @__PURE__ */ Symbol("DOM_RENDERABLE"), L = (s) => nt(Nt, s), Rt = At({
2495
+ create: L
2496
+ }), {
2497
+ Empty: jt,
2498
+ Fragment: J,
2499
+ When: Os,
2500
+ Unless: xs,
2501
+ ForEach: Ps,
2502
+ Repeat: Ls,
2503
+ OneOf: Ms,
2504
+ OneOfField: ks,
2505
+ OneOfKind: Is,
2506
+ OneOfType: $s,
2507
+ OneOfValue: Hs,
2508
+ OneOfTuple: Ns,
2509
+ MapSignal: Rs,
2510
+ Ensure: js,
2511
+ EnsureAll: Vs,
2512
+ NotEmpty: Bs,
2513
+ Task: qs,
2514
+ Async: Fs,
2515
+ OnDispose: Xe,
2516
+ Conjunction: Ws,
2517
+ WithScope: Us,
2518
+ WithProvider: Js,
2519
+ Provide: Ks,
2520
+ Use: Gs,
2521
+ UseMany: zs,
2522
+ handleValueOrSignal: Ys,
2523
+ createReactiveRenderable: Xs,
2524
+ renderableOfTNode: W
2525
+ } = Rt, Vt = (s) => L((e) => (e.addClasses(s), (t) => {
2526
+ t && e.removeClasses(s);
2527
+ })), Bt = (s) => L((e) => {
2528
+ let t = /* @__PURE__ */ new Set();
2529
+ const n = s.on(
2146
2530
  (r) => {
2147
- const o = (r ?? "").split(" ").filter((a) => a.length > 0), i = new Set(o), l = [];
2148
- for (const a of s)
2149
- i.has(a) || l.push(a);
2150
- const c = [];
2151
- for (const a of i)
2152
- s.has(a) || c.push(a);
2153
- l.length > 0 && e.removeClasses(l), c.length > 0 && e.addClasses(c), s = i;
2531
+ const i = (r ?? "").split(" ").filter((d) => d.length > 0), o = new Set(i), l = [];
2532
+ for (const d of t)
2533
+ o.has(d) || l.push(d);
2534
+ const f = [];
2535
+ for (const d of o)
2536
+ t.has(d) || f.push(d);
2537
+ l.length > 0 && e.removeClasses(l), f.length > 0 && e.addClasses(f), t = o;
2154
2538
  },
2155
2539
  { noAutoDispose: !0 }
2156
2540
  );
2157
2541
  return (r) => {
2158
- n(), r && e.removeClasses(Array.from(s)), s.clear();
2542
+ n(), r && e.removeClasses(Array.from(t)), t.clear();
2159
2543
  };
2160
- }), kt = (t, e) => m((s) => {
2161
- const { get: n, set: r } = s.makeAccessors(t), o = n();
2162
- return r(e), (i) => {
2163
- i && r(o);
2544
+ }), qt = (s, e) => L((t) => {
2545
+ const { get: n, set: r } = t.makeAccessors(s), i = n();
2546
+ return r(e), (o) => {
2547
+ o && r(i);
2164
2548
  };
2165
- }), It = (t, e) => m((s) => {
2166
- const { get: n, set: r } = s.makeAccessors(t), o = n(), i = e.on(r, { noAutoDispose: !0 });
2549
+ }), Ft = (s, e) => L((t) => {
2550
+ const { get: n, set: r } = t.makeAccessors(s), i = n(), o = e.on(r, { noAutoDispose: !0 });
2167
2551
  return (l) => {
2168
- i(), l && r(o);
2552
+ o(), l && r(i);
2169
2553
  };
2170
- }), K = (t, e) => y.is(e) ? It(t, e) : kt(t, e), Ht = (t, e) => t === "class" ? y.is(e) ? Ot(e) : Mt(
2554
+ }), de = (s, e) => _.is(e) ? Ft(s, e) : qt(s, e), Wt = (s, e) => s === "class" ? _.is(e) ? Bt(e) : Vt(
2171
2555
  /* c8 ignore next */
2172
- (e ?? "").split(" ").filter((s) => s.length > 0)
2173
- ) : K(t, e), T = new Proxy(
2556
+ (e ?? "").split(" ").filter((t) => t.length > 0)
2557
+ ) : de(s, e), N = new Proxy(
2174
2558
  {},
2175
2559
  {
2176
2560
  /**
@@ -2184,9 +2568,9 @@ const xt = /* @__PURE__ */ new Set([
2184
2568
  * @returns The renderable component for the specified attribute.
2185
2569
  *
2186
2570
  */
2187
- get: (t, e) => (s) => Ht(e, s)
2571
+ get: (s, e) => (t) => Wt(e, t)
2188
2572
  }
2189
- ), $t = (t, e) => K(`data-${t}`, e), Ss = new Proxy(
2573
+ ), Ut = (s, e) => de(`data-${s}`, e), Qs = new Proxy(
2190
2574
  {},
2191
2575
  {
2192
2576
  /**
@@ -2197,9 +2581,9 @@ const xt = /* @__PURE__ */ new Set([
2197
2581
  * @returns The renderable component for the specified attribute.
2198
2582
  *
2199
2583
  */
2200
- get: (t, e) => (s) => $t(e, s)
2584
+ get: (s, e) => (t) => Ut(e, t)
2201
2585
  }
2202
- ), Nt = (t, e) => K(`aria-${t}`, e), vs = new Proxy(
2586
+ ), Jt = (s, e) => de(`aria-${s}`, e), Zs = new Proxy(
2203
2587
  {},
2204
2588
  {
2205
2589
  /**
@@ -2210,9 +2594,9 @@ const xt = /* @__PURE__ */ new Set([
2210
2594
  * @returns The renderable component for the specified attribute.
2211
2595
  *
2212
2596
  */
2213
- get: (t, e) => (s) => Nt(e, s)
2597
+ get: (s, e) => (t) => Jt(e, t)
2214
2598
  }
2215
- ), Rt = (t, e) => K(t, e), As = new Proxy(
2599
+ ), Kt = (s, e) => de(s, e), en = new Proxy(
2216
2600
  {},
2217
2601
  {
2218
2602
  /**
@@ -2223,9 +2607,9 @@ const xt = /* @__PURE__ */ new Set([
2223
2607
  * @returns The renderable component for the specified attribute.
2224
2608
  *
2225
2609
  */
2226
- get: (t, e) => (s) => Rt(e, s)
2610
+ get: (s, e) => (t) => Kt(e, t)
2227
2611
  }
2228
- ), jt = (t, e) => K(t, e), Ts = new Proxy(
2612
+ ), Gt = (s, e) => de(s, e), tn = new Proxy(
2229
2613
  {},
2230
2614
  {
2231
2615
  /**
@@ -2235,97 +2619,16 @@ const xt = /* @__PURE__ */ new Set([
2235
2619
  * @returns The renderable component for the specified attribute.
2236
2620
  *
2237
2621
  */
2238
- get: (t, e) => (s) => jt(e, s)
2622
+ get: (s, e) => (t) => Gt(e, t)
2239
2623
  }
2240
- ), g = (t) => {
2241
- if (t == null)
2242
- return L;
2243
- if (Array.isArray(t))
2244
- return E(...t.map(g));
2245
- if (typeof t == "string")
2246
- return Ve(t);
2247
- if (y.is(t))
2248
- return Be(t);
2249
- if (typeof t == "object" && "render" in t && "type" in t)
2250
- return t;
2251
- throw new Error(`Unknown type: '${typeof t}' for child: ${t}`);
2252
- }, qe = (t, ...e) => m((s) => {
2253
- const n = s.makeChildElement(t, void 0), r = e.map((o) => g(o).render(n));
2254
- return (o) => {
2255
- r.forEach((i) => i(!1)), n.clear(o);
2256
- };
2257
- }), ie = (t, e, ...s) => m((n) => {
2258
- const r = n.makeChildElement(t, e), o = s.map((i) => g(i).render(r));
2259
- return (i) => {
2260
- o.forEach((l) => l(!1)), r.clear(i);
2261
- };
2262
- }), Vt = new Proxy(
2263
- {},
2264
- {
2265
- /**
2266
- * Creates a renderable that represents an HTML element.
2267
- * @param tagName - The HTML tag name.
2268
- * @returns A renderable function that creates and appends the HTML element to the DOM.
2269
- */
2270
- get: (t, e) => (...s) => qe(e, s.flatMap(g))
2271
- }
2272
- ), _s = new Proxy(
2273
- {},
2274
- {
2275
- /**
2276
- * Creates a renderable that represents an HTMLInput element.
2277
- * @param type - The input type name.
2278
- * @returns A renderable function that creates and appends the HTMLInput element to the DOM.
2279
- */
2280
- get: (t, e) => (...s) => qe("input", T.type(e), ...s)
2281
- }
2282
- ), Fe = "http://www.w3.org/2000/svg", Es = (t, ...e) => ie(t, Fe, ...e), Cs = new Proxy(
2283
- {},
2284
- {
2285
- /**
2286
- * Creates a renderable that represents an SVG element.
2287
- * @param tagName - The SVG tag name.
2288
- * @returns A renderable function that creates and appends the SVG element to the DOM.
2289
- */
2290
- get: (t, e) => (...s) => ie(e, Fe, s.flatMap(g))
2291
- }
2292
- ), We = "http://www.w3.org/1998/Math/MathML", Ds = (t, ...e) => ie(t, We, ...e), Ls = new Proxy(
2293
- {},
2294
- {
2295
- /**
2296
- * Creates a renderable that represents an Math element.
2297
- * @param tagName - The Math tag name.
2298
- * @returns A renderable function that creates and appends the Math element to the DOM.
2299
- */
2300
- get: (t, e) => (...s) => ie(e, We, s.flatMap(g))
2301
- }
2302
- ), Ue = (t, e) => {
2303
- if (typeof e == "function")
2304
- return Ue(t, { then: e });
2305
- const s = e.pending != null ? g(e.pending()) : L, n = e.then, r = e.error != null ? (o) => g(e.error(o)) : () => L;
2306
- return m((o) => {
2307
- let i = !0;
2308
- const l = t(), c = o.makeRef();
2309
- let a = g(s).render(c);
2310
- return l.then(
2311
- (u) => {
2312
- i && (a(!0), a = g(n(u)).render(c));
2313
- },
2314
- (u) => {
2315
- i && (a(!0), a = g(r(u)).render(c));
2316
- }
2317
- ), (u) => {
2318
- i = !1, a(u), c.clear(u);
2319
- };
2320
- });
2321
- }, xs = (t, e) => Ue(() => t, e), Ge = (t, e, s) => m((n) => n.on(t, e, s)), Bt = (t) => Ge("click", (e, s) => {
2624
+ ), Qe = (s, e, t) => L((n) => n.on(s, e, t)), zt = (s) => Qe("click", (e, t) => {
2322
2625
  e.preventDefault();
2323
2626
  const n = e.target;
2324
2627
  setTimeout(() => {
2325
2628
  const r = n.ownerDocument != null ? n?.checked : void 0;
2326
- r != null && t(!r, s);
2629
+ r != null && s(!r, t);
2327
2630
  }, 0);
2328
- }), Y = new Proxy(
2631
+ }), fe = new Proxy(
2329
2632
  {},
2330
2633
  {
2331
2634
  /**
@@ -2333,416 +2636,227 @@ const xt = /* @__PURE__ */ new Set([
2333
2636
  * @param fn - The function to call when the event is triggered.
2334
2637
  * @returns A `Renderable` function that adds the event listener to the element.
2335
2638
  */
2336
- get: (t, e) => (s) => Ge(e, s)
2337
- }
2338
- ), qt = (t, e) => (s) => {
2339
- e?.preventDefault === !0 && s.preventDefault(), e?.stopPropagation === !0 && s.stopPropagation(), e?.stopImmediatePropagation === !0 && s.stopImmediatePropagation(), t(s);
2340
- }, k = (t, e) => qt((s) => {
2341
- const n = s.target;
2342
- t(n, s);
2343
- }, e), Ft = (t, e) => k(
2344
- (s, n) => t(s.value, n),
2639
+ get: (s, e) => (t) => Qe(e, t)
2640
+ }
2641
+ ), Yt = (s, e) => (t) => {
2642
+ e?.preventDefault === !0 && t.preventDefault(), e?.stopPropagation === !0 && t.stopPropagation(), e?.stopImmediatePropagation === !0 && t.stopImmediatePropagation(), s(t);
2643
+ }, Y = (s, e) => Yt((t) => {
2644
+ const n = t.target;
2645
+ s(n, t);
2646
+ }, e), Xt = (s, e) => Y(
2647
+ (t, n) => s(t.value, n),
2345
2648
  e
2346
- ), Wt = (t, e) => k(
2347
- (s, n) => t(s.valueAsNumber, n),
2649
+ ), Qt = (s, e) => Y(
2650
+ (t, n) => s(t.valueAsNumber, n),
2348
2651
  e
2349
- ), Ut = (t, e) => k((s, n) => {
2350
- if (s.value === "")
2652
+ ), Zt = (s, e) => Y((t, n) => {
2653
+ if (t.value === "")
2351
2654
  return;
2352
- const r = s.value.split("-"), o = new Date(
2655
+ const r = t.value.split("-"), i = new Date(
2353
2656
  Number(r[0]),
2354
2657
  Number(r[1]) - 1,
2355
2658
  Number(r[2].substring(0, 2))
2356
2659
  );
2357
- t(o, n);
2358
- }, e), Ps = (t, e) => k((s, n) => {
2359
- if (s.value === "") {
2360
- t(null, n);
2660
+ s(i, n);
2661
+ }, e), sn = (s, e) => Y((t, n) => {
2662
+ if (t.value === "") {
2663
+ s(null, n);
2361
2664
  return;
2362
2665
  }
2363
- const r = s.value.split("-"), o = new Date(
2666
+ const r = t.value.split("-"), i = new Date(
2364
2667
  Number(r[0]),
2365
2668
  Number(r[1]) - 1,
2366
2669
  Number(r[2].substring(0, 2))
2367
2670
  );
2368
- t(o, n);
2369
- }, e), Gt = (t, e) => k((s, n) => {
2370
- if (s.value === "")
2671
+ s(i, n);
2672
+ }, e), es = (s, e) => Y((t, n) => {
2673
+ if (t.value === "")
2371
2674
  return;
2372
- const r = s.value.split("T"), o = r[0].split("-"), i = new Date(
2373
- Number(o[0]),
2374
- Number(o[1]) - 1,
2375
- Number(o[2])
2675
+ const r = t.value.split("T"), i = r[0].split("-"), o = new Date(
2676
+ Number(i[0]),
2677
+ Number(i[1]) - 1,
2678
+ Number(i[2])
2376
2679
  ), l = r[1].split(":");
2377
- i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])), t(i, n);
2378
- }, e), Ms = (t, e) => k((s, n) => {
2379
- if (s.value === "") {
2380
- t(null, n);
2680
+ o.setHours(Number(l[0])), o.setMinutes(Number(l[1])), o.setSeconds(Number(l[2])), s(o, n);
2681
+ }, e), nn = (s, e) => Y((t, n) => {
2682
+ if (t.value === "") {
2683
+ s(null, n);
2381
2684
  return;
2382
2685
  }
2383
- const r = s.value.split("T");
2686
+ const r = t.value.split("T");
2384
2687
  if (r.length !== 2) {
2385
- t(null, n);
2688
+ s(null, n);
2386
2689
  return;
2387
2690
  }
2388
- const o = r[0].split("-"), i = new Date(
2389
- Number(o[0]),
2390
- Number(o[1]) - 1,
2391
- Number(o[2])
2691
+ const i = r[0].split("-"), o = new Date(
2692
+ Number(i[0]),
2693
+ Number(i[1]) - 1,
2694
+ Number(i[2])
2392
2695
  ), l = r[1].split(":");
2393
- i.setHours(Number(l[0] ?? 0)), i.setMinutes(Number(l[1] ?? 0)), i.setSeconds(Number(l[2] ?? 0)), t(i, n);
2394
- }, e), Os = (t, e) => k((s, n) => {
2395
- t(s.checked, n);
2396
- }, e), ks = (t, e = "input") => E(T.valueAsDate(t), Y[e](Ut(t.set))), Is = (t, e = "input") => E(T.valueAsDate(t), Y[e](Gt(t.set))), Hs = (t, e = "input") => E(T.valueAsNumber(t), Y[e](Wt(t.set))), $s = (t, e = "input") => E(T.value(t), Y[e](Ft(t.set))), Ns = (t) => E(T.checked(t), Bt(t.set)), ge = (t, e, s) => y.is(t) ? e(t) : s(t), Jt = (t, e, s) => {
2397
- const n = t.makeRef();
2398
- let r = () => {
2399
- }, o = null;
2400
- const i = e.on(
2401
- (l) => {
2402
- o?.dispose(), r(!0), o = new J(), r = O(
2403
- o,
2404
- () => g(s(l)).render(n)
2405
- );
2406
- },
2407
- { noAutoDispose: !0 }
2408
- );
2409
- return (l) => {
2410
- o?.dispose(), r(l), i(), n.clear(l);
2411
- };
2412
- }, le = (t, e) => {
2413
- function s(r) {
2414
- return m((o) => {
2415
- const i = o.makeRef();
2416
- let l, c;
2417
- const a = r.map((f) => Object.keys(f)[0]);
2418
- let u;
2419
- const d = a.on((f) => {
2420
- if (f !== u) {
2421
- u = f, c?.dispose(), l?.(!0), c = r.map((p) => p[f]);
2422
- const h = e[f](c);
2423
- l = g(h).render(i);
2424
- }
2425
- });
2426
- return (f) => {
2427
- c?.dispose(), d(), i.clear(f), l?.(f);
2428
- };
2429
- });
2430
- }
2431
- function n(r) {
2432
- const o = Object.keys(r)[0];
2433
- return g(e[o](re(r[o])));
2434
- }
2435
- return ge(t, s, n);
2436
- }, Je = (t, e, s) => le(
2437
- w.map(t, (n) => ({ [n[e]]: n })),
2438
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2439
- s
2440
- ), Rs = (t, e) => Je(t, "kind", e), js = (t, e) => {
2441
- const s = w.map(t, ([n, r]) => ({
2442
- [n]: r
2443
- }));
2444
- return le(s, e);
2445
- }, Vs = (t, e) => Je(t, "type", e), zt = (t, e) => le(
2446
- w.map(t, (s) => ({ [s]: !0 })),
2447
- e
2448
- ), Bs = (t, e = {}) => (s) => {
2449
- const n = e?.firstSeparator ?? t, r = e?.lastSeparator ?? t;
2450
- return zt(
2451
- s.map((o) => o.isFirst ? "first" : o.isLast ? "last" : "other"),
2452
- {
2453
- first: n,
2454
- last: r,
2455
- other: t
2456
- }
2457
- );
2458
- }, qs = (t) => m((e) => (e.appendOrInsert(t), (s) => {
2459
- s && te(t);
2460
- })), Fs = (t, e, s) => {
2461
- function n(o) {
2462
- return m((i) => {
2463
- const l = i.makeRef();
2464
- let c = () => {
2465
- }, a = !1, u = null;
2466
- const d = o.on((f) => {
2467
- f == null ? (c(!0), c = g(s?.()).render(l), a = !1, u?.dispose(), u = null) : a ? u.set(f) : (u = D(f), c(!0), c = g(
2468
- e(u)
2469
- ).render(l), a = !0);
2470
- });
2471
- return (f) => {
2472
- u?.dispose(), d(), c?.(f), l.clear(f);
2473
- };
2474
- });
2475
- }
2476
- function r(o) {
2477
- if (o == null) {
2478
- const i = s?.();
2479
- return i != null ? g(i) : L;
2480
- }
2481
- return g(e(re(o)));
2482
- }
2483
- return ge(
2484
- t,
2485
- n,
2486
- r
2487
- );
2488
- }, Ws = (...t) => (e, s) => m((n) => {
2489
- const r = n.makeRef();
2490
- if (t.some(
2491
- (h) => !y.is(h) && h == null
2492
- ))
2493
- return (s != null ? g(s?.()) : L).render(r);
2494
- const i = t.map(() => null), l = t.map(
2495
- (h) => y.is(h) ? h.value != null : h != null
2496
- );
2497
- let c = null;
2498
- const a = D(l.every((h) => h)), u = (h, p) => {
2499
- if (h.value != null) {
2500
- if (i[p] == null) {
2501
- const b = D(h.value);
2502
- i[p] = b;
2503
- } else
2504
- i[p].value = h.value;
2505
- l[p] = !0;
2506
- } else
2507
- l[p] = !1;
2696
+ o.setHours(Number(l[0] ?? 0)), o.setMinutes(Number(l[1] ?? 0)), o.setSeconds(Number(l[2] ?? 0)), s(o, n);
2697
+ }, e), rn = (s, e) => Y((t, n) => {
2698
+ s(t.checked, n);
2699
+ }, e), on = (s, e = "input") => J(N.valueAsDate(s), fe[e](Zt(s.set))), ln = (s, e = "input") => J(N.valueAsDate(s), fe[e](es(s.set))), an = (s, e = "input") => J(N.valueAsNumber(s), fe[e](Qt(s.set))), cn = (s, e = "input") => J(N.value(s), fe[e](Xt(s.set))), un = (s) => J(N.checked(s), zt(s.set)), hn = (s) => L((e) => (e.appendOrInsert(s), (t) => {
2700
+ t && ve(s);
2701
+ })), Ze = (s, ...e) => L((t) => {
2702
+ const n = t.makeChildElement(s, void 0), r = e.map((i) => W(i).render(n));
2703
+ return (i) => {
2704
+ r.forEach((o) => o(!1)), n.clear(i);
2508
2705
  };
2509
- let d = t.length - 1;
2510
- const f = t.map((h, p) => {
2511
- if (!y.is(h)) {
2512
- const b = D(h);
2513
- return i[p] = b, () => {
2514
- };
2515
- }
2516
- return h.on(() => {
2517
- u(h, p), d === 0 ? a.value = l.every((b) => b) : d--;
2518
- });
2519
- });
2520
- return a.on((h) => {
2521
- c?.(!0), c = null, h ? c = g(e(...i)).render(r) : c = g(s?.() ?? L).render(r);
2522
- }), (h) => {
2523
- i.forEach((p) => p?.dispose()), a.dispose(), f.forEach((p) => p()), c?.(h), r.clear(h);
2706
+ }), Te = (s, e, ...t) => L((n) => {
2707
+ const r = n.makeChildElement(s, e), i = t.map((o) => W(o).render(r));
2708
+ return (o) => {
2709
+ i.forEach((l) => l(!1)), r.clear(o);
2524
2710
  };
2525
- }), ze = (t, e, s) => ge(
2526
- t,
2527
- (n) => m(
2528
- (r) => Jt(
2529
- r,
2530
- n,
2531
- (o) => o ? e() : s?.()
2532
- )
2533
- ),
2534
- (n) => {
2535
- if (n) {
2536
- const r = e();
2537
- return r != null ? g(r) : L;
2538
- }
2539
- return g(s?.());
2711
+ }), ts = new Proxy(
2712
+ {},
2713
+ {
2714
+ /**
2715
+ * Creates a renderable that represents an HTML element.
2716
+ * @param tagName - The HTML tag name.
2717
+ * @returns A renderable function that creates and appends the HTML element to the DOM.
2718
+ */
2719
+ get: (s, e) => (...t) => Ze(e, t.flatMap(W))
2540
2720
  }
2541
- ), Us = (t, e, s) => ze(
2542
- w.map(t, (n) => !n),
2543
- e,
2544
- s
2545
- ), Ke = (t, e, s) => {
2546
- if (s != null)
2547
- return Ke(t, (n) => {
2548
- const r = new de(
2549
- n.index,
2550
- n.total.map((o) => o - 1)
2551
- );
2552
- return E(
2553
- g(e(n)),
2554
- ze(
2555
- n.isLast,
2556
- () => L,
2557
- () => s(r)
2558
- )
2559
- );
2560
- });
2561
- if (y.is(t))
2562
- return m((n) => {
2563
- const r = t.derive(), o = n.makeRef(), i = [], l = [];
2564
- return r.on((c) => {
2565
- const a = i.splice(c), u = l.splice(c);
2566
- for (const d of u)
2567
- d.dispose();
2568
- for (const d of a)
2569
- d(!0);
2570
- for (let d = i.length; d < c; d++) {
2571
- const f = new de(d, r), h = new J();
2572
- l.push(h), i.push(
2573
- O(
2574
- h,
2575
- () => g(e(f)).render(o)
2576
- )
2577
- );
2578
- }
2579
- }), (c) => {
2580
- for (const a of l)
2581
- a.dispose();
2582
- l.length = 0, r.dispose();
2583
- for (const a of i)
2584
- a(c);
2585
- i.length = 0, o.clear(c);
2586
- };
2587
- });
2721
+ ), dn = new Proxy(
2722
+ {},
2588
2723
  {
2589
- const n = re(t);
2590
- return E(
2591
- ...Array.from({ length: t }, (r, o) => o).map((r) => {
2592
- const o = new de(r, n);
2593
- return g(e(o));
2594
- })
2595
- );
2724
+ /**
2725
+ * Creates a renderable that represents an HTMLInput element.
2726
+ * @param type - The input type name.
2727
+ * @returns A renderable function that creates and appends the HTMLInput element to the DOM.
2728
+ */
2729
+ get: (s, e) => (...t) => Ze("input", N.type(e), ...t)
2596
2730
  }
2597
- }, Gs = (t, e, s) => {
2598
- const n = w.map(t, (o) => o.length), r = w.toSignal(t);
2599
- return Ke(
2600
- n,
2601
- (o) => {
2602
- const i = r.map((l) => l[o.index]);
2603
- return g(e(i, o));
2604
- },
2605
- s
2606
- );
2607
- }, me = (...t) => m(
2608
- (e) => (s) => t.forEach((n) => {
2609
- typeof n == "function" ? n(s, e) : n.dispose(s, e);
2610
- })
2611
- ), Js = (t, e) => {
2612
- if (y.is(t)) {
2613
- const s = t;
2614
- return m((n) => {
2615
- n = n.makeRef();
2616
- const r = s.map((l) => g(e(l)));
2617
- let o = () => {
2618
- };
2619
- const i = r.on((l) => {
2620
- o(!0), o = l.render(n);
2621
- });
2622
- return (l) => {
2623
- i(), o(l);
2624
- };
2625
- });
2731
+ ), et = "http://www.w3.org/2000/svg", fn = (s, ...e) => Te(s, et, ...e), pn = new Proxy(
2732
+ {},
2733
+ {
2734
+ /**
2735
+ * Creates a renderable that represents an SVG element.
2736
+ * @param tagName - The SVG tag name.
2737
+ * @returns A renderable function that creates and appends the SVG element to the DOM.
2738
+ */
2739
+ get: (s, e) => (...t) => Te(e, et, t.flatMap(W))
2626
2740
  }
2627
- return g(e(t));
2628
- }, ye = (t) => m((e) => {
2741
+ ), tt = "http://www.w3.org/1998/Math/MathML", mn = (s, ...e) => Te(s, tt, ...e), gn = new Proxy(
2742
+ {},
2743
+ {
2744
+ /**
2745
+ * Creates a renderable that represents an Math element.
2746
+ * @param tagName - The Math tag name.
2747
+ * @returns A renderable function that creates and appends the Math element to the DOM.
2748
+ */
2749
+ get: (s, e) => (...t) => Te(e, tt, t.flatMap(W))
2750
+ }
2751
+ ), xe = (s) => L((e) => {
2629
2752
  if (e.isBrowser()) {
2630
- const s = t(e);
2631
- if (s != null)
2632
- return g(s).render(e);
2753
+ const t = s(e);
2754
+ if (t != null)
2755
+ return W(t).render(e);
2633
2756
  }
2634
2757
  return () => {
2635
2758
  };
2636
2759
  });
2637
- function zs({
2638
- src: t,
2760
+ function yn({
2761
+ src: s,
2639
2762
  name: e,
2640
- width: s,
2763
+ width: t,
2641
2764
  height: n,
2642
2765
  sandbox: r,
2643
- allow: o,
2644
- referrerpolicy: i,
2766
+ allow: i,
2767
+ referrerpolicy: o,
2645
2768
  loading: l,
2646
- iframeChild: c,
2647
- onLoad: a
2648
- } = {}, ...u) {
2649
- return Vt.iframe(
2650
- T.src(t),
2651
- T.name(e),
2652
- T.width(
2653
- s != null ? w.map(s, String) : void 0
2769
+ iframeChild: f,
2770
+ onLoad: d
2771
+ } = {}, ...v) {
2772
+ return ts.iframe(
2773
+ N.src(s),
2774
+ N.name(e),
2775
+ N.width(
2776
+ t != null ? C.map(t, String) : void 0
2654
2777
  ),
2655
- T.height(
2656
- n != null ? w.map(n, String) : void 0
2778
+ N.height(
2779
+ n != null ? C.map(n, String) : void 0
2657
2780
  ),
2658
- T.sandbox(r),
2659
- T.allow(o),
2660
- T.referrerpolicy(i),
2661
- c,
2662
- ye((d) => {
2663
- const f = d.element;
2664
- let h, p = !1;
2665
- const b = () => {
2666
- if (p) return;
2667
- p = !0;
2668
- const v = f.contentDocument;
2669
- if (v && (a && a(f), u.length > 0)) {
2670
- const S = v.body;
2671
- if (S) {
2672
- const x = d.withElement(S);
2673
- h = z(E(...u), x);
2781
+ N.sandbox(r),
2782
+ N.allow(i),
2783
+ N.referrerpolicy(o),
2784
+ f,
2785
+ xe((S) => {
2786
+ const O = S.element;
2787
+ let T, A = !1;
2788
+ const $ = () => {
2789
+ if (A) return;
2790
+ A = !0;
2791
+ const M = O.contentDocument;
2792
+ if (M && (d && d(O), v.length > 0)) {
2793
+ const x = M.body;
2794
+ if (x) {
2795
+ const R = S.withElement(x);
2796
+ T = he(J(...v), R);
2674
2797
  }
2675
2798
  }
2676
2799
  };
2677
- return l != null && w.on(l, (v) => {
2678
- f.loading = v;
2679
- }), (u.length > 0 || a) && (t || setTimeout(b, 0)), E(
2680
- u.length > 0 || a ? Y.load(b) : L,
2681
- me(() => {
2682
- h && h(!1);
2800
+ return l != null && C.on(l, (M) => {
2801
+ O.loading = M;
2802
+ }), (v.length > 0 || d) && (s || setTimeout($, 0)), J(
2803
+ v.length > 0 || d ? fe.load($) : jt,
2804
+ Xe(() => {
2805
+ T && T(!1);
2683
2806
  })
2684
2807
  );
2685
2808
  })
2686
2809
  );
2687
2810
  }
2688
- const Ks = (t, e, s = () => L) => le(
2689
- w.map(
2690
- t,
2691
- (n) => n.length > 0 ? { notEmpty: n } : { whenEmpty: null }
2692
- ),
2693
- {
2694
- notEmpty: (n) => e(n),
2695
- whenEmpty: () => s()
2696
- }
2697
- ), Ys = (t, e) => m((s) => {
2698
- const n = s.makePortal(t), r = z(g(e), n);
2811
+ const vn = (s, e) => L((t) => {
2812
+ const n = t.makePortal(s), r = he(W(e), n);
2699
2813
  return () => r(!0);
2700
- }), ee = /* @__PURE__ */ new Map(), Kt = (t) => ({
2701
- mark: Ye(`Probe(${t.description})`),
2814
+ }), ge = /* @__PURE__ */ new Map(), ss = (s) => ({
2815
+ mark: st(`Probe(${s.description})`),
2702
2816
  create: ({ callback: e = () => {
2703
- }, timeout: s = 10 } = {}) => {
2817
+ }, timeout: t = 10 } = {}) => {
2704
2818
  const n = (l) => {
2705
- clearTimeout(r), ee.delete(t), e(l);
2819
+ clearTimeout(r), ge.delete(s), e(l);
2706
2820
  };
2707
- if (ee.has(t))
2708
- throw new Error(`Probe already exists: ${t.description}`);
2709
- const r = setTimeout(() => n("timeout"), s), o = { counter: 0, timeoutId: r };
2710
- return ee.set(t, o), {
2821
+ if (ge.has(s))
2822
+ throw new Error(`Probe already exists: ${s.description}`);
2823
+ const r = setTimeout(() => n("timeout"), t), i = { counter: 0, timeoutId: r };
2824
+ return ge.set(s, i), {
2711
2825
  value: () => {
2712
2826
  clearTimeout(r);
2713
- const l = ee.get(t);
2827
+ const l = ge.get(s);
2714
2828
  l != null && --l.counter === 0 && n("resolved");
2715
2829
  },
2716
2830
  dispose: () => n("disposed"),
2717
- onUse: () => o.counter++
2831
+ onUse: () => i.counter++
2718
2832
  };
2719
2833
  }
2720
- }), Xs = Kt(Symbol("GlobalProbe"));
2721
- function Qs({
2722
- mode: t,
2834
+ }), wn = ss(/* @__PURE__ */ Symbol("GlobalProbe"));
2835
+ function bn({
2836
+ mode: s,
2723
2837
  delegatesFocus: e,
2724
- slotAssignment: s,
2838
+ slotAssignment: t,
2725
2839
  clonable: n,
2726
2840
  serializable: r
2727
- }, ...o) {
2728
- return ye((i) => {
2729
- const l = { mode: t };
2730
- e !== void 0 && (l.delegatesFocus = e), s !== void 0 && (l.slotAssignment = s), n !== void 0 && (l.clonable = n), r !== void 0 && (l.serializable = r);
2731
- const c = i.element.attachShadow(l), a = i.withElement(c), u = z(E(...o), a);
2732
- return me(() => u(!0));
2841
+ }, ...i) {
2842
+ return xe((o) => {
2843
+ const l = { mode: s };
2844
+ e !== void 0 && (l.delegatesFocus = e), t !== void 0 && (l.slotAssignment = t), n !== void 0 && (l.clonable = n), r !== void 0 && (l.serializable = r);
2845
+ const f = o.element.attachShadow(l), d = o.withElement(f), v = he(J(...i), d);
2846
+ return Xe(() => v(!0));
2733
2847
  });
2734
2848
  }
2735
- const Yt = (t, e) => m((s) => {
2736
- const n = s.getStyle(t);
2737
- return s.setStyle(t, e), (r) => {
2738
- r && s.setStyle(t, n);
2849
+ const ns = (s, e) => L((t) => {
2850
+ const n = t.getStyle(s);
2851
+ return t.setStyle(s, e), (r) => {
2852
+ r && t.setStyle(s, n);
2739
2853
  };
2740
- }), Xt = (t, e) => m((s) => {
2741
- const n = s.getStyle(t), r = e.on((o) => s.setStyle(t, o));
2742
- return (o) => {
2743
- r(), o && s.setStyle(t, n);
2854
+ }), rs = (s, e) => L((t) => {
2855
+ const n = t.getStyle(s), r = e.on((i) => t.setStyle(s, i));
2856
+ return (i) => {
2857
+ r(), i && t.setStyle(s, n);
2744
2858
  };
2745
- }), Ae = (t, e) => y.is(e) ? Xt(t, e) : Yt(t, e), Zs = new Proxy({}, {
2859
+ }), ke = (s, e) => _.is(e) ? rs(s, e) : ns(s, e), Sn = new Proxy({}, {
2746
2860
  /**
2747
2861
  * Creates a renderable component for the specified `style` property.
2748
2862
  *
@@ -2751,193 +2865,165 @@ const Yt = (t, e) => m((s) => {
2751
2865
  * @returns The renderable component for the specified attribute.
2752
2866
  *
2753
2867
  */
2754
- get: (t, e) => e === "variable" ? (s, n) => Ae(s, n) : (s) => Ae(e, s)
2755
- }), en = (t) => m((e) => {
2756
- const s = t(e);
2757
- return s == null ? () => {
2758
- } : g(s).render(e);
2759
- }), tn = (t) => ye((e) => t(e.element)), sn = (t) => m((e) => {
2868
+ get: (s, e) => e === "variable" ? (t, n) => ke(t, n) : (t) => ke(e, t)
2869
+ }), is = (s) => L((e) => e.makeChildText(s).clear), os = (s) => L((e) => {
2870
+ const t = e.makeChildText(s.value), n = s.on(t.setText);
2871
+ return (r) => {
2872
+ n(), t.clear(r);
2873
+ };
2874
+ }), Tn = (s) => _.is(s) ? os(s) : is(s), An = (s) => L((e) => {
2875
+ const t = s(e);
2876
+ return t == null ? () => {
2877
+ } : W(t).render(e);
2878
+ }), _n = (s) => xe((e) => s(e.element)), En = (s) => L((e) => {
2760
2879
  if (e.isHeadlessDOM()) {
2761
- const s = t(e);
2762
- if (s)
2763
- return g(s).render(e);
2880
+ const t = s(e);
2881
+ if (t)
2882
+ return W(t).render(e);
2764
2883
  }
2765
2884
  return () => {
2766
2885
  };
2767
- }), nn = (t) => m((e) => {
2768
- const s = new J(), n = O(
2769
- s,
2770
- () => g(t(s)).render(e)
2771
- );
2772
- return (r) => {
2773
- s.dispose(), n(r);
2774
- };
2775
- }), we = (t) => m((e) => {
2776
- let s = e;
2777
- function n() {
2778
- return s;
2779
- }
2780
- function r(l) {
2781
- s = l;
2782
- }
2783
- const o = [], i = t({
2784
- use: ({ mark: l }) => {
2785
- const { value: c, onUse: a } = n().getProvider(l);
2786
- return a?.(), c;
2787
- },
2788
- set: ({ mark: l, create: c }, a) => {
2789
- const { value: u, dispose: d, onUse: f } = c(a, n());
2790
- o.push(d), r(n().setProvider(l, u, f));
2791
- }
2792
- });
2793
- return i == null ? () => {
2794
- } : E(
2795
- g(i),
2796
- me(() => o.forEach((l) => l()))
2797
- ).render(n());
2798
- }), rn = (t, e, s) => we(({ set: n }) => (n(t, e), s())), on = (t, e) => we(({ use: s }) => e(s(t))), ln = (...t) => (e) => we(({ use: s }) => {
2799
- const n = t.map(s);
2800
- return e(...n);
2801
2886
  });
2802
2887
  export {
2803
- Nt as Aria,
2804
- xs as Async,
2805
- Ht as Attr,
2806
- Ns as BindChecked,
2807
- ks as BindDate,
2808
- Is as BindDateTime,
2809
- Hs as BindNumber,
2810
- $s as BindText,
2811
- j as BrowserContext,
2812
- q as CLASS_PLACEHOLDER_ATTR,
2813
- R as Computed,
2814
- Bs as Conjunction,
2815
- qs as DOMNode,
2816
- $t as DataAttr,
2817
- J as DisposalScope,
2818
- qe as El,
2819
- ie as ElNS,
2820
- de as ElementPosition,
2821
- L as Empty,
2822
- Fs as Ensure,
2823
- Ws as EnsureAll,
2824
- Gs as ForEach,
2825
- E as Fragment,
2826
- Xs as GlobalProbe,
2827
- Tt as HYDRATION_ID_ATTR,
2828
- ms as HeadlessAdapter,
2829
- V as HeadlessContext,
2830
- Dt as HeadlessElement,
2831
- je as HeadlessPortal,
2832
- Lt as HeadlessText,
2833
- zs as IFrame,
2834
- Js as MapSignal,
2835
- jt as MathAttr,
2836
- Ds as MathEl,
2837
- Ee as MemoryStore,
2838
- Ks as NotEmpty,
2839
- Bt as OnChecked,
2840
- me as OnDispose,
2841
- le as OneOf,
2842
- Je as OneOfField,
2843
- Rs as OneOfKind,
2844
- js as OneOfTuple,
2845
- Vs as OneOfType,
2846
- zt as OneOfValue,
2847
- Ys as Portal,
2848
- se as Prop,
2849
- rn as Provide,
2850
- He as ProviderNotFoundError,
2851
- yt as RenderingError,
2852
- Ke as Repeat,
2853
- Rt as SVGAttr,
2854
- Es as SVGEl,
2855
- Qs as ShadowRoot,
2856
- y as Signal,
2857
- Ue as Task,
2858
- bs as TextNode,
2859
- Us as Unless,
2860
- on as Use,
2861
- ln as UseMany,
2862
- w as Value,
2863
- ze as When,
2864
- ye as WithBrowserCtx,
2865
- en as WithCtx,
2866
- tn as WithElement,
2867
- sn as WithHeadlessCtx,
2868
- we as WithProvider,
2869
- nn as WithScope,
2870
- fe as _NODE_PLACEHOLDER_ATTR,
2871
- mt as _getSelfOrParentElement,
2872
- ke as _isElement,
2873
- Ie as _isFragment,
2874
- gt as _makeGetter,
2875
- pt as _makeSetter,
2876
- te as _removeDOMNode,
2877
- Be as _signalText,
2878
- Ve as _staticText,
2879
- is as animateSignal,
2880
- dt as animateSignals,
2881
- vs as aria,
2882
- T as attr,
2883
- hs as bind,
2884
- ds as coalesce,
2885
- ne as computed,
2886
- B as computedOf,
2887
- Qt as computedOfAsync,
2888
- Zt as computedOfAsyncGenerator,
2889
- ft as computedRecord,
2890
- Xe as createRenderable,
2891
- Ss as dataAttr,
2892
- as as delaySignal,
2893
- _e as effect,
2894
- tt as effectOf,
2895
- qt as emit,
2896
- Os as emitChecked,
2897
- k as emitTarget,
2898
- Ft as emitValue,
2899
- Ut as emitValueAsDate,
2900
- Gt as emitValueAsDateTime,
2901
- Ps as emitValueAsNullableDate,
2902
- Ms as emitValueAsNullableDateTime,
2903
- Wt as emitValueAsNumber,
2904
- at as endInterpolate,
2905
- pe as getCurrentScope,
2906
- ss as getParentScope,
2907
- ts as getScopeStack,
2908
- ws as getWindow,
2909
- ct as guessInterpolate,
2910
- Vt as html,
2911
- _s as input,
2912
- lt as interpolateDate,
2913
- ot as interpolateNumber,
2914
- it as interpolateString,
2915
- es as joinSignals,
2916
- rs as localStorageProp,
2917
- Kt as makeProbe,
2918
- Ye as makeProviderMark,
2919
- Ls as math,
2920
- Ts as mathAttr,
2921
- ls as merge,
2922
- Y as on,
2923
- nt as popScope,
2924
- cs as previousSignal,
2925
- D as prop,
2926
- st as pushScope,
2927
- ps as render,
2928
- z as renderWithContext,
2929
- g as renderableOfTNode,
2930
- ys as restoreTempoPlaceholders,
2931
- gs as runHeadless,
2932
- ns as scoped,
2933
- os as sessionStorageProp,
2934
- re as signal,
2935
- us as slidingWindowSignal,
2936
- Ce as storedProp,
2937
- Zs as style,
2938
- Cs as svg,
2939
- As as svgAttr,
2940
- fs as syncProp,
2941
- ce as untracked,
2942
- O as withScope
2888
+ Jt as Aria,
2889
+ Fs as Async,
2890
+ Wt as Attr,
2891
+ un as BindChecked,
2892
+ on as BindDate,
2893
+ ln as BindDateTime,
2894
+ an as BindNumber,
2895
+ cn as BindText,
2896
+ te as BrowserContext,
2897
+ oe as CLASS_PLACEHOLDER_ATTR,
2898
+ ee as Computed,
2899
+ Ws as Conjunction,
2900
+ hn as DOMNode,
2901
+ Ut as DataAttr,
2902
+ ie as DisposalScope,
2903
+ Ze as El,
2904
+ Te as ElNS,
2905
+ De as ElementPosition,
2906
+ jt as Empty,
2907
+ js as Ensure,
2908
+ Vs as EnsureAll,
2909
+ Ps as ForEach,
2910
+ J as Fragment,
2911
+ wn as GlobalProbe,
2912
+ Pt as HYDRATION_ID_ATTR,
2913
+ Es as HeadlessAdapter,
2914
+ se as HeadlessContext,
2915
+ It as HeadlessElement,
2916
+ Ye as HeadlessPortal,
2917
+ $t as HeadlessText,
2918
+ yn as IFrame,
2919
+ Rs as MapSignal,
2920
+ Gt as MathAttr,
2921
+ mn as MathEl,
2922
+ He as MemoryStore,
2923
+ Bs as NotEmpty,
2924
+ zt as OnChecked,
2925
+ Xe as OnDispose,
2926
+ Ms as OneOf,
2927
+ ks as OneOfField,
2928
+ Is as OneOfKind,
2929
+ Ns as OneOfTuple,
2930
+ $s as OneOfType,
2931
+ Hs as OneOfValue,
2932
+ vn as Portal,
2933
+ we as Prop,
2934
+ Ks as Provide,
2935
+ Je as ProviderNotFoundError,
2936
+ _t as RenderingError,
2937
+ Ls as Repeat,
2938
+ Kt as SVGAttr,
2939
+ fn as SVGEl,
2940
+ bn as ShadowRoot,
2941
+ _ as Signal,
2942
+ qs as Task,
2943
+ Tn as TextNode,
2944
+ xs as Unless,
2945
+ Gs as Use,
2946
+ zs as UseMany,
2947
+ C as Value,
2948
+ Os as When,
2949
+ xe as WithBrowserCtx,
2950
+ An as WithCtx,
2951
+ _n as WithElement,
2952
+ En as WithHeadlessCtx,
2953
+ Js as WithProvider,
2954
+ Us as WithScope,
2955
+ Ce as _NODE_PLACEHOLDER_ATTR,
2956
+ Tt as _getSelfOrParentElement,
2957
+ We as _isElement,
2958
+ Ue as _isFragment,
2959
+ St as _makeGetter,
2960
+ bt as _makeSetter,
2961
+ ve as _removeDOMNode,
2962
+ os as _signalText,
2963
+ is as _staticText,
2964
+ ms as animateSignal,
2965
+ vt as animateSignals,
2966
+ Zs as aria,
2967
+ N as attr,
2968
+ bs as bind,
2969
+ Ss as coalesce,
2970
+ be as computed,
2971
+ ne as computedOf,
2972
+ ls as computedOfAsync,
2973
+ as as computedOfAsyncGenerator,
2974
+ wt as computedRecord,
2975
+ At as createRenderKit,
2976
+ nt as createRenderable,
2977
+ Qs as dataAttr,
2978
+ ys as delaySignal,
2979
+ $e as effect,
2980
+ lt as effectOf,
2981
+ Yt as emit,
2982
+ rn as emitChecked,
2983
+ Y as emitTarget,
2984
+ Xt as emitValue,
2985
+ Zt as emitValueAsDate,
2986
+ es as emitValueAsDateTime,
2987
+ sn as emitValueAsNullableDate,
2988
+ nn as emitValueAsNullableDateTime,
2989
+ Qt as emitValueAsNumber,
2990
+ pt as endInterpolate,
2991
+ Oe as getCurrentScope,
2992
+ hs as getParentScope,
2993
+ us as getScopeStack,
2994
+ Cs as getWindow,
2995
+ mt as guessInterpolate,
2996
+ ts as html,
2997
+ dn as input,
2998
+ ft as interpolateDate,
2999
+ ht as interpolateNumber,
3000
+ dt as interpolateString,
3001
+ cs as joinSignals,
3002
+ fs as localStorageProp,
3003
+ ss as makeProbe,
3004
+ st as makeProviderMark,
3005
+ gn as math,
3006
+ tn as mathAttr,
3007
+ gs as merge,
3008
+ fe as on,
3009
+ ct as popScope,
3010
+ vs as previousSignal,
3011
+ B as prop,
3012
+ at as pushScope,
3013
+ As as render,
3014
+ he as renderWithContext,
3015
+ W as renderableOfTNode,
3016
+ Ds as restoreTempoPlaceholders,
3017
+ _s as runHeadless,
3018
+ ds as scoped,
3019
+ ps as sessionStorageProp,
3020
+ ye as signal,
3021
+ ws as slidingWindowSignal,
3022
+ Ne as storedProp,
3023
+ Sn as style,
3024
+ pn as svg,
3025
+ en as svgAttr,
3026
+ Ts as syncProp,
3027
+ Ae as untracked,
3028
+ z as withScope
2943
3029
  };