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