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