@tempots/dom 24.0.0-next.0 → 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.js +860 -622
- package/package.json +1 -1
- package/renderable/probe.d.ts +12 -3
- package/renderable/render.d.ts +186 -2
- package/renderable/style.d.ts +1 -0
- package/std/signal.d.ts +8 -2
- package/std/value.d.ts +2 -2
- package/dom/ssr.d.ts +0 -0
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 k = class k {
|
|
|
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 k = class k {
|
|
|
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 k = class k {
|
|
|
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 k = class k {
|
|
|
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 k = class k {
|
|
|
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 k = class k {
|
|
|
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 k = class k {
|
|
|
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 k = class k {
|
|
|
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 k = class k {
|
|
|
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 k = class k {
|
|
|
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 k = class k {
|
|
|
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 V = class V 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 V = class V 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 V = class V 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 V = class V 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 G = (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 G = (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,26 +702,26 @@ const Ie = (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
|
}
|
|
693
723
|
}
|
|
694
|
-
class
|
|
724
|
+
class P {
|
|
695
725
|
/**
|
|
696
726
|
* Constructs a new `DOMContext` instance.
|
|
697
727
|
*
|
|
@@ -709,7 +739,7 @@ class b {
|
|
|
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 b {
|
|
|
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 b {
|
|
|
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 b {
|
|
|
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 b {
|
|
|
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 b {
|
|
|
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,43 +803,25 @@ class b {
|
|
|
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}`);
|
|
786
816
|
return this.withElement(t);
|
|
787
817
|
});
|
|
788
|
-
// /**
|
|
789
|
-
// * Creates a new `DOMContext` instance with the `isFirstLevel` property set to `true`.
|
|
790
|
-
// * @returns A new `DOMContext` instance with the `isFirstLevel` property set to `true`.
|
|
791
|
-
// */
|
|
792
|
-
// readonly withFirstLevel = (): DOMContext =>
|
|
793
|
-
// new BrowserContext(
|
|
794
|
-
// this.document,
|
|
795
|
-
// this.element,
|
|
796
|
-
// this.reference,
|
|
797
|
-
// this.providers,
|
|
798
|
-
// true
|
|
799
|
-
// )
|
|
800
818
|
/**
|
|
801
819
|
* Creates a new `DOMContext` instance with the specified reference.
|
|
802
820
|
*
|
|
803
821
|
* @param reference - The optional `Text` node to use as the reference for the new `DOMContext`.
|
|
804
822
|
* @returns A new `DOMContext` instance with the specified reference.
|
|
805
823
|
*/
|
|
806
|
-
|
|
807
|
-
this.document,
|
|
808
|
-
this.element,
|
|
809
|
-
e,
|
|
810
|
-
this.providers
|
|
811
|
-
// this.isFirstLevel
|
|
812
|
-
));
|
|
824
|
+
o(this, "withReference", (e) => new P(this.document, this.element, e, this.providers));
|
|
813
825
|
/**
|
|
814
826
|
* Returns a new HTMLDOMContext instance with the specified providers merged into
|
|
815
827
|
* the existing providers.
|
|
@@ -817,16 +829,10 @@ class b {
|
|
|
817
829
|
* @param providers - An object containing the providers to be merged into the existing providers.
|
|
818
830
|
* @returns A new HTMLDOMContext instance with the merged providers.
|
|
819
831
|
*/
|
|
820
|
-
|
|
821
|
-
this.
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
{
|
|
825
|
-
...this.providers,
|
|
826
|
-
...e
|
|
827
|
-
}
|
|
828
|
-
// this.isFirstLevel
|
|
829
|
-
));
|
|
832
|
+
o(this, "withProviders", (e) => new P(this.document, this.element, this.reference, {
|
|
833
|
+
...this.providers,
|
|
834
|
+
...e
|
|
835
|
+
}));
|
|
830
836
|
/**
|
|
831
837
|
* Retrieves a provider for the given provider mark.
|
|
832
838
|
*
|
|
@@ -834,58 +840,63 @@ class b {
|
|
|
834
840
|
* @returns The provider for the given mark.
|
|
835
841
|
* @throws Throws `ProviderNotFoundError` if the provider for the given mark is not found.
|
|
836
842
|
*/
|
|
837
|
-
|
|
843
|
+
o(this, "getProvider", (e) => {
|
|
838
844
|
if (this.providers[e] === void 0)
|
|
839
|
-
throw new
|
|
845
|
+
throw new de(e);
|
|
840
846
|
return this.providers[e];
|
|
841
847
|
});
|
|
842
|
-
|
|
843
|
-
e && (this.reference !== void 0 ?
|
|
848
|
+
o(this, "clear", (e) => {
|
|
849
|
+
e && (this.reference !== void 0 ? R(this.reference) : R(this.element));
|
|
844
850
|
});
|
|
845
851
|
/**
|
|
846
852
|
* Adds classes to the element.
|
|
847
853
|
* @param tokens - The class names to add.
|
|
848
854
|
*/
|
|
849
|
-
|
|
855
|
+
o(this, "addClasses", (e) => {
|
|
850
856
|
this.element.classList.add(...e);
|
|
851
857
|
});
|
|
852
858
|
/**
|
|
853
859
|
* Removes classes from the element.
|
|
854
860
|
* @param tokens - The class names to remove.
|
|
855
861
|
*/
|
|
856
|
-
|
|
862
|
+
o(this, "removeClasses", (e) => {
|
|
857
863
|
this.element.classList.remove(...e);
|
|
858
864
|
});
|
|
859
865
|
/**
|
|
860
866
|
* Gets the classes of the element.
|
|
861
867
|
* @returns The classes of the element.
|
|
862
868
|
*/
|
|
863
|
-
|
|
869
|
+
o(this, "getClasses", () => Array.from(this.element.classList));
|
|
864
870
|
/**
|
|
865
871
|
* Adds an event listener to the element.
|
|
866
872
|
* @param event - The event to listen for.
|
|
867
873
|
* @param listener - The listener to call when the event occurs.
|
|
874
|
+
* @param options - The options for the event listener.
|
|
868
875
|
* @returns A function to remove the event listener.
|
|
869
876
|
*/
|
|
870
|
-
|
|
871
|
-
|
|
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
|
+
);
|
|
872
883
|
}));
|
|
873
884
|
/**
|
|
874
885
|
* Returns `true` if the context is a browser DOM context.
|
|
875
886
|
* @returns `true` if the context is a browser DOM context.
|
|
876
887
|
*/
|
|
877
|
-
|
|
888
|
+
o(this, "isBrowserDOM", () => !0);
|
|
878
889
|
/**
|
|
879
890
|
* Returns `true` if the context is a headless DOM context.
|
|
880
891
|
* @returns `true` if the context is a headless DOM context.
|
|
881
892
|
*/
|
|
882
|
-
|
|
893
|
+
o(this, "isHeadlessDOM", () => !1);
|
|
883
894
|
/**
|
|
884
895
|
* Sets the style of the element.
|
|
885
896
|
* @param name - The name of the style to set.
|
|
886
897
|
* @param value - The value of the style to set.
|
|
887
898
|
*/
|
|
888
|
-
|
|
899
|
+
o(this, "setStyle", (e, t) => {
|
|
889
900
|
this.element.style.setProperty(e, t);
|
|
890
901
|
});
|
|
891
902
|
/**
|
|
@@ -893,10 +904,10 @@ class b {
|
|
|
893
904
|
* @param name - The name of the style to get.
|
|
894
905
|
* @returns The value of the style.
|
|
895
906
|
*/
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
get:
|
|
899
|
-
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)
|
|
900
911
|
}));
|
|
901
912
|
this.document = e, this.element = t, this.reference = r, this.providers = n;
|
|
902
913
|
}
|
|
@@ -908,44 +919,270 @@ class b {
|
|
|
908
919
|
* @returns A new `DOMContext` instance.
|
|
909
920
|
*/
|
|
910
921
|
static of(e, t) {
|
|
911
|
-
return new
|
|
922
|
+
return new P(e.ownerDocument, e, t, {});
|
|
923
|
+
}
|
|
924
|
+
}
|
|
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 {
|
|
949
|
+
constructor(e) {
|
|
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;
|
|
912
1110
|
}
|
|
913
1111
|
}
|
|
914
|
-
const
|
|
915
|
-
|
|
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 {
|
|
916
1153
|
constructor(e) {
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
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) => {
|
|
924
1161
|
const t = this.children.indexOf(e);
|
|
925
1162
|
t !== -1 && this.children.splice(t, 1);
|
|
926
1163
|
});
|
|
927
|
-
|
|
1164
|
+
o(this, "remove", () => {
|
|
928
1165
|
if (this.parent != null)
|
|
929
1166
|
this.parent.removeChild(this);
|
|
930
1167
|
else
|
|
931
1168
|
throw new Error("Parent is undefined");
|
|
932
1169
|
});
|
|
933
|
-
|
|
1170
|
+
o(this, "getPortals", () => {
|
|
934
1171
|
const e = this.elements().flatMap((t) => t.isPortal() ? [t, ...t.getPortals()] : t.getPortals());
|
|
935
1172
|
return this.isPortal() && e.unshift(this), e;
|
|
936
1173
|
});
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
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) => {
|
|
949
1186
|
if (this.properties.id === e)
|
|
950
1187
|
return this;
|
|
951
1188
|
for (const t of this.elements()) {
|
|
@@ -954,57 +1191,61 @@ class ue {
|
|
|
954
1191
|
return r;
|
|
955
1192
|
}
|
|
956
1193
|
});
|
|
957
|
-
|
|
958
|
-
((this.properties[
|
|
1194
|
+
o(this, "trigger", (e, t) => {
|
|
1195
|
+
((this.properties[v] ?? {})[e] ?? []).forEach((n) => n(t));
|
|
959
1196
|
});
|
|
960
|
-
|
|
1197
|
+
o(this, "click", () => {
|
|
961
1198
|
this.trigger("click", {});
|
|
962
1199
|
});
|
|
963
|
-
|
|
964
|
-
var
|
|
965
|
-
const
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
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));
|
|
969
1209
|
};
|
|
1210
|
+
return (r == null ? void 0 : r.signal) != null && r.signal.addEventListener("abort", l), l;
|
|
970
1211
|
});
|
|
971
|
-
|
|
1212
|
+
o(this, "addClasses", (e) => {
|
|
972
1213
|
var r;
|
|
973
1214
|
if (e.length === 0)
|
|
974
1215
|
return;
|
|
975
|
-
const t = (r = this.properties)[
|
|
1216
|
+
const t = (r = this.properties)[y] ?? (r[y] = []);
|
|
976
1217
|
e.forEach((n) => {
|
|
977
1218
|
t.includes(n) || t.push(n);
|
|
978
1219
|
});
|
|
979
1220
|
});
|
|
980
|
-
|
|
1221
|
+
o(this, "removeClasses", (e) => {
|
|
981
1222
|
var r;
|
|
982
1223
|
if (e.length === 0)
|
|
983
1224
|
return;
|
|
984
|
-
const t = (r = this.properties)[
|
|
1225
|
+
const t = (r = this.properties)[y] ?? (r[y] = []);
|
|
985
1226
|
e.forEach((n) => {
|
|
986
|
-
const
|
|
987
|
-
|
|
988
|
-
}), 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];
|
|
989
1230
|
});
|
|
990
|
-
|
|
991
|
-
|
|
1231
|
+
o(this, "getClasses", () => this.properties[y] ?? []);
|
|
1232
|
+
o(this, "getAttributes", () => Object.entries(this.properties).filter(
|
|
992
1233
|
([e]) => !["innerText", "innerHTML"].includes(e)
|
|
993
1234
|
));
|
|
994
|
-
|
|
995
|
-
(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])]] : []
|
|
996
1237
|
));
|
|
997
|
-
|
|
1238
|
+
o(this, "setStyle", (e, t) => {
|
|
998
1239
|
var n;
|
|
999
|
-
const r = (n = this.properties)[
|
|
1000
|
-
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]);
|
|
1001
1242
|
});
|
|
1002
|
-
|
|
1243
|
+
o(this, "getStyle", (e) => {
|
|
1003
1244
|
var t;
|
|
1004
|
-
return ((t = this.properties[
|
|
1245
|
+
return ((t = this.properties[S]) == null ? void 0 : t[e]) ?? "";
|
|
1005
1246
|
});
|
|
1006
|
-
|
|
1007
|
-
|
|
1247
|
+
o(this, "getStyles", () => this.properties[S] ?? {});
|
|
1248
|
+
o(this, "makeAccessors", (e) => {
|
|
1008
1249
|
const t = this.properties;
|
|
1009
1250
|
return {
|
|
1010
1251
|
get: () => t[e],
|
|
@@ -1014,149 +1255,149 @@ class ue {
|
|
|
1014
1255
|
this.parent = e;
|
|
1015
1256
|
}
|
|
1016
1257
|
}
|
|
1017
|
-
const
|
|
1018
|
-
class
|
|
1258
|
+
const lt = (s) => s.replace(/"/g, """), ct = (s) => s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
1259
|
+
class at extends ye {
|
|
1019
1260
|
constructor(t, r, n) {
|
|
1020
1261
|
super(n);
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
const
|
|
1024
|
-
let
|
|
1025
|
-
const
|
|
1026
|
-
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}>`;
|
|
1027
1268
|
});
|
|
1028
1269
|
this.tagName = t, this.namespace = r;
|
|
1029
1270
|
}
|
|
1030
1271
|
}
|
|
1031
|
-
class
|
|
1272
|
+
class Te extends ye {
|
|
1032
1273
|
constructor(t, r) {
|
|
1033
1274
|
super(r);
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1275
|
+
o(this, "isPortal", () => !0);
|
|
1276
|
+
o(this, "toHTML", () => "");
|
|
1277
|
+
o(this, "contentToHTML", (t = !1) => this.children.map((r) => r.toHTML(t)).join(""));
|
|
1037
1278
|
this.selector = t;
|
|
1038
1279
|
}
|
|
1039
1280
|
}
|
|
1040
|
-
class
|
|
1281
|
+
class ut {
|
|
1041
1282
|
constructor(e) {
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
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);
|
|
1047
1288
|
this.text = e;
|
|
1048
1289
|
}
|
|
1049
1290
|
}
|
|
1050
|
-
class
|
|
1291
|
+
class x {
|
|
1051
1292
|
constructor(e, t, r, n) {
|
|
1052
|
-
|
|
1293
|
+
o(this, "appendOrInsert", (e) => {
|
|
1053
1294
|
if (this.reference != null) {
|
|
1054
1295
|
const t = this.element.children.indexOf(this.reference);
|
|
1055
1296
|
this.element.children.splice(t, 0, e);
|
|
1056
1297
|
} else
|
|
1057
1298
|
this.element.children.push(e);
|
|
1058
1299
|
});
|
|
1059
|
-
|
|
1060
|
-
const r = new
|
|
1061
|
-
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(
|
|
1062
1303
|
r,
|
|
1063
1304
|
void 0,
|
|
1064
1305
|
this.container,
|
|
1065
1306
|
this.providers
|
|
1066
1307
|
);
|
|
1067
1308
|
});
|
|
1068
|
-
|
|
1069
|
-
const t = new
|
|
1070
|
-
return this.appendOrInsert(t), new
|
|
1309
|
+
o(this, "makeChildText", (e) => {
|
|
1310
|
+
const t = new ut(e);
|
|
1311
|
+
return this.appendOrInsert(t), new x(
|
|
1071
1312
|
this.element,
|
|
1072
1313
|
t,
|
|
1073
1314
|
this.container,
|
|
1074
1315
|
this.providers
|
|
1075
1316
|
);
|
|
1076
1317
|
});
|
|
1077
|
-
|
|
1318
|
+
o(this, "setText", (e) => {
|
|
1078
1319
|
this.reference && this.reference.isText() && (this.reference.text = e);
|
|
1079
1320
|
});
|
|
1080
|
-
|
|
1321
|
+
o(this, "getText", () => {
|
|
1081
1322
|
var e;
|
|
1082
1323
|
return ((e = this.reference) == null ? void 0 : e.getText()) ?? this.element.getText();
|
|
1083
1324
|
});
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
const t = new
|
|
1087
|
-
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(
|
|
1088
1329
|
t,
|
|
1089
1330
|
void 0,
|
|
1090
1331
|
this.container,
|
|
1091
1332
|
this.providers
|
|
1092
1333
|
);
|
|
1093
1334
|
});
|
|
1094
|
-
|
|
1335
|
+
o(this, "withProviders", (e) => new x(this.element, this.reference, this.container, {
|
|
1095
1336
|
...this.providers,
|
|
1096
1337
|
...e
|
|
1097
1338
|
}));
|
|
1098
|
-
|
|
1339
|
+
o(this, "getProvider", (e) => {
|
|
1099
1340
|
if (this.providers[e] === void 0)
|
|
1100
|
-
throw new
|
|
1341
|
+
throw new de(e);
|
|
1101
1342
|
return this.providers[e];
|
|
1102
1343
|
});
|
|
1103
|
-
|
|
1344
|
+
o(this, "clear", (e) => {
|
|
1104
1345
|
e && (this.reference !== void 0 ? this.element.removeChild(this.reference) : this.element.remove());
|
|
1105
1346
|
});
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
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));
|
|
1115
1356
|
this.element = e, this.reference = t, this.container = r, this.providers = n;
|
|
1116
1357
|
}
|
|
1117
1358
|
}
|
|
1118
|
-
const
|
|
1359
|
+
const ht = /* @__PURE__ */ new Set([
|
|
1119
1360
|
"checked",
|
|
1120
1361
|
"disabled",
|
|
1121
1362
|
"multiple",
|
|
1122
1363
|
"readonly",
|
|
1123
1364
|
"required",
|
|
1124
1365
|
"selected"
|
|
1125
|
-
]),
|
|
1366
|
+
]), ft = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), be = (s) => (e) => {
|
|
1126
1367
|
const t = e.makeChildText(s);
|
|
1127
1368
|
return (r) => t.clear(r);
|
|
1128
|
-
},
|
|
1369
|
+
}, Se = (s) => (e) => {
|
|
1129
1370
|
const t = e.makeChildText(s.value), r = s.on((n) => t.setText(n));
|
|
1130
1371
|
return (n) => {
|
|
1131
1372
|
r(), t.clear(n);
|
|
1132
1373
|
};
|
|
1133
|
-
},
|
|
1134
|
-
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));
|
|
1135
1376
|
return (r) => {
|
|
1136
1377
|
t.forEach((n) => n(r));
|
|
1137
1378
|
};
|
|
1138
|
-
},
|
|
1139
|
-
},
|
|
1379
|
+
}, _ = () => () => {
|
|
1380
|
+
}, dt = (s) => (e) => (e.addClasses(s), (t) => {
|
|
1140
1381
|
t && e.removeClasses(s);
|
|
1141
|
-
}),
|
|
1382
|
+
}), pt = (s) => (e) => {
|
|
1142
1383
|
let t = [];
|
|
1143
1384
|
const r = s.on((n) => {
|
|
1144
|
-
e.removeClasses(t), t = (n ?? "").split(" ").filter((
|
|
1385
|
+
e.removeClasses(t), t = (n ?? "").split(" ").filter((i) => i.length > 0), e.addClasses(t);
|
|
1145
1386
|
});
|
|
1146
1387
|
return (n) => {
|
|
1147
1388
|
r(), n && e.removeClasses(t), t.length = 0;
|
|
1148
1389
|
};
|
|
1149
|
-
},
|
|
1150
|
-
const { get: r, set: n } = t.makeAccessors(s),
|
|
1390
|
+
}, H = (s, e) => (t) => {
|
|
1391
|
+
const { get: r, set: n } = t.makeAccessors(s), i = r();
|
|
1151
1392
|
return n(e), (l) => {
|
|
1152
|
-
l && n(
|
|
1393
|
+
l && n(i);
|
|
1153
1394
|
};
|
|
1154
|
-
},
|
|
1155
|
-
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);
|
|
1156
1397
|
return (c) => {
|
|
1157
|
-
l(), c && n(
|
|
1398
|
+
l(), c && n(i);
|
|
1158
1399
|
};
|
|
1159
|
-
},
|
|
1400
|
+
}, L = new Proxy(
|
|
1160
1401
|
{},
|
|
1161
1402
|
{
|
|
1162
1403
|
/**
|
|
@@ -1170,17 +1411,17 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1170
1411
|
* @returns The renderable component for the specified attribute.
|
|
1171
1412
|
*
|
|
1172
1413
|
*/
|
|
1173
|
-
get: (s, e) => e === "class" ? (t) => d.is(t) ?
|
|
1414
|
+
get: (s, e) => e === "class" ? (t) => d.is(t) ? pt(t) : dt(
|
|
1174
1415
|
(t ?? "").split(" ").filter((r) => r.length > 0)
|
|
1175
|
-
) : (t) => d.is(t) ?
|
|
1416
|
+
) : (t) => d.is(t) ? $(
|
|
1176
1417
|
e,
|
|
1177
1418
|
t
|
|
1178
|
-
) :
|
|
1419
|
+
) : H(
|
|
1179
1420
|
e,
|
|
1180
1421
|
t
|
|
1181
1422
|
)
|
|
1182
1423
|
}
|
|
1183
|
-
),
|
|
1424
|
+
), Jt = new Proxy(
|
|
1184
1425
|
{},
|
|
1185
1426
|
{
|
|
1186
1427
|
/**
|
|
@@ -1191,12 +1432,12 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1191
1432
|
* @returns The renderable component for the specified attribute.
|
|
1192
1433
|
*
|
|
1193
1434
|
*/
|
|
1194
|
-
get: (s, e) => (t) => d.is(t) ?
|
|
1435
|
+
get: (s, e) => (t) => d.is(t) ? $(
|
|
1195
1436
|
`data-${e}`,
|
|
1196
1437
|
t
|
|
1197
|
-
) :
|
|
1438
|
+
) : H(`data-${e}`, t)
|
|
1198
1439
|
}
|
|
1199
|
-
),
|
|
1440
|
+
), Gt = new Proxy(
|
|
1200
1441
|
{},
|
|
1201
1442
|
{
|
|
1202
1443
|
/**
|
|
@@ -1207,15 +1448,15 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1207
1448
|
* @returns The renderable component for the specified attribute.
|
|
1208
1449
|
*
|
|
1209
1450
|
*/
|
|
1210
|
-
get: (s, e) => (t) => d.is(t) ?
|
|
1451
|
+
get: (s, e) => (t) => d.is(t) ? $(
|
|
1211
1452
|
`aria-${e}`,
|
|
1212
1453
|
t
|
|
1213
|
-
) :
|
|
1454
|
+
) : H(
|
|
1214
1455
|
`aria-${e}`,
|
|
1215
1456
|
t
|
|
1216
1457
|
)
|
|
1217
1458
|
}
|
|
1218
|
-
),
|
|
1459
|
+
), zt = new Proxy(
|
|
1219
1460
|
{},
|
|
1220
1461
|
{
|
|
1221
1462
|
/**
|
|
@@ -1226,15 +1467,15 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1226
1467
|
* @returns The renderable component for the specified attribute.
|
|
1227
1468
|
*
|
|
1228
1469
|
*/
|
|
1229
|
-
get: (s, e) => (t) => d.is(t) ?
|
|
1470
|
+
get: (s, e) => (t) => d.is(t) ? $(
|
|
1230
1471
|
e,
|
|
1231
1472
|
t
|
|
1232
|
-
) :
|
|
1473
|
+
) : H(
|
|
1233
1474
|
e,
|
|
1234
1475
|
t
|
|
1235
1476
|
)
|
|
1236
1477
|
}
|
|
1237
|
-
),
|
|
1478
|
+
), Xt = new Proxy(
|
|
1238
1479
|
{},
|
|
1239
1480
|
{
|
|
1240
1481
|
/**
|
|
@@ -1244,37 +1485,37 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1244
1485
|
* @returns The renderable component for the specified attribute.
|
|
1245
1486
|
*
|
|
1246
1487
|
*/
|
|
1247
|
-
get: (s, e) => (t) => d.is(t) ?
|
|
1488
|
+
get: (s, e) => (t) => d.is(t) ? $(
|
|
1248
1489
|
e,
|
|
1249
1490
|
t
|
|
1250
|
-
) :
|
|
1491
|
+
) : H(
|
|
1251
1492
|
e,
|
|
1252
1493
|
t
|
|
1253
1494
|
)
|
|
1254
1495
|
}
|
|
1255
|
-
),
|
|
1496
|
+
), f = (s) => {
|
|
1256
1497
|
if (s == null)
|
|
1257
|
-
return
|
|
1498
|
+
return _;
|
|
1258
1499
|
if (Array.isArray(s))
|
|
1259
|
-
return
|
|
1500
|
+
return g(...s.map(f));
|
|
1260
1501
|
if (typeof s == "string")
|
|
1261
|
-
return
|
|
1502
|
+
return be(s);
|
|
1262
1503
|
if (d.is(s))
|
|
1263
|
-
return
|
|
1504
|
+
return Se(s);
|
|
1264
1505
|
if (typeof s == "function")
|
|
1265
1506
|
return s;
|
|
1266
1507
|
throw new Error(`Unknown type: '${typeof s}' for child: ${s}`);
|
|
1267
|
-
},
|
|
1268
|
-
const r = t.makeChildElement(s, void 0), n = e.map((
|
|
1269
|
-
return (
|
|
1270
|
-
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);
|
|
1271
1512
|
};
|
|
1272
|
-
},
|
|
1273
|
-
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));
|
|
1274
1515
|
return (l) => {
|
|
1275
|
-
|
|
1516
|
+
i.forEach((c) => c(!1)), n.clear(l);
|
|
1276
1517
|
};
|
|
1277
|
-
},
|
|
1518
|
+
}, Yt = new Proxy(
|
|
1278
1519
|
{},
|
|
1279
1520
|
{
|
|
1280
1521
|
/**
|
|
@@ -1282,9 +1523,9 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1282
1523
|
* @param tagName - The HTML tag name.
|
|
1283
1524
|
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
1284
1525
|
*/
|
|
1285
|
-
get: (s, e) => (...t) =>
|
|
1526
|
+
get: (s, e) => (...t) => _e(e, t.flatMap(f))
|
|
1286
1527
|
}
|
|
1287
|
-
),
|
|
1528
|
+
), Qt = new Proxy(
|
|
1288
1529
|
{},
|
|
1289
1530
|
{
|
|
1290
1531
|
/**
|
|
@@ -1292,9 +1533,9 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1292
1533
|
* @param type - The input type name.
|
|
1293
1534
|
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
1294
1535
|
*/
|
|
1295
|
-
get: (s, e) => (...t) =>
|
|
1536
|
+
get: (s, e) => (...t) => _e("input", L.type(e), ...t)
|
|
1296
1537
|
}
|
|
1297
|
-
),
|
|
1538
|
+
), gt = "http://www.w3.org/2000/svg", Zt = new Proxy(
|
|
1298
1539
|
{},
|
|
1299
1540
|
{
|
|
1300
1541
|
/**
|
|
@@ -1302,9 +1543,9 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1302
1543
|
* @param tagName - The SVG tag name.
|
|
1303
1544
|
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
1304
1545
|
*/
|
|
1305
|
-
get: (s, e) => (...t) =>
|
|
1546
|
+
get: (s, e) => (...t) => we(e, gt, t.flatMap(f))
|
|
1306
1547
|
}
|
|
1307
|
-
),
|
|
1548
|
+
), mt = "http://www.w3.org/1998/Math/MathML", Kt = new Proxy(
|
|
1308
1549
|
{},
|
|
1309
1550
|
{
|
|
1310
1551
|
/**
|
|
@@ -1312,35 +1553,35 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1312
1553
|
* @param tagName - The Math tag name.
|
|
1313
1554
|
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
1314
1555
|
*/
|
|
1315
|
-
get: (s, e) => (...t) =>
|
|
1556
|
+
get: (s, e) => (...t) => we(e, mt, t.flatMap(f))
|
|
1316
1557
|
}
|
|
1317
|
-
),
|
|
1558
|
+
), Ae = (s, e) => {
|
|
1318
1559
|
if (typeof e == "function")
|
|
1319
|
-
return
|
|
1320
|
-
const t = e.pending != null ?
|
|
1321
|
-
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) => {
|
|
1322
1563
|
let l = !0;
|
|
1323
|
-
const c = s(), a =
|
|
1324
|
-
let
|
|
1564
|
+
const c = s(), a = i.makeRef();
|
|
1565
|
+
let u = f(t)(a);
|
|
1325
1566
|
return c.then(
|
|
1326
1567
|
(h) => {
|
|
1327
|
-
l && (
|
|
1568
|
+
l && (u(!0), u = f(r(h))(a));
|
|
1328
1569
|
},
|
|
1329
1570
|
(h) => {
|
|
1330
|
-
l && (
|
|
1571
|
+
l && (u(!0), u = f(n(h))(a));
|
|
1331
1572
|
}
|
|
1332
1573
|
), (h) => {
|
|
1333
|
-
l = !1,
|
|
1574
|
+
l = !1, u(h), a.clear(h);
|
|
1334
1575
|
};
|
|
1335
1576
|
};
|
|
1336
|
-
},
|
|
1577
|
+
}, es = (s, e) => Ae(() => s, e), ve = (s, e, t) => (r) => r.on(s, e, t), yt = (s) => ve("click", (e) => {
|
|
1337
1578
|
e.preventDefault();
|
|
1338
1579
|
const t = e.target;
|
|
1339
1580
|
setTimeout(() => {
|
|
1340
1581
|
const r = t.ownerDocument != null ? t == null ? void 0 : t.checked : void 0;
|
|
1341
1582
|
r != null && s(!r);
|
|
1342
1583
|
}, 0);
|
|
1343
|
-
}),
|
|
1584
|
+
}), G = new Proxy(
|
|
1344
1585
|
{},
|
|
1345
1586
|
{
|
|
1346
1587
|
/**
|
|
@@ -1348,15 +1589,15 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1348
1589
|
* @param fn - The function to call when the event is triggered.
|
|
1349
1590
|
* @returns A `Renderable` function that adds the event listener to the element.
|
|
1350
1591
|
*/
|
|
1351
|
-
get: (s, e) => (t) =>
|
|
1592
|
+
get: (s, e) => (t) => ve(e, t)
|
|
1352
1593
|
}
|
|
1353
|
-
),
|
|
1594
|
+
), Tt = (s) => (e) => {
|
|
1354
1595
|
const t = e.target;
|
|
1355
1596
|
s(t.value);
|
|
1356
|
-
},
|
|
1597
|
+
}, bt = (s) => (e) => {
|
|
1357
1598
|
const t = e.target;
|
|
1358
1599
|
s(t.valueAsNumber);
|
|
1359
|
-
},
|
|
1600
|
+
}, St = (s) => (e) => {
|
|
1360
1601
|
const t = e.target;
|
|
1361
1602
|
if (t.value === "")
|
|
1362
1603
|
return;
|
|
@@ -1366,211 +1607,211 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1366
1607
|
Number(r[2].substring(0, 2))
|
|
1367
1608
|
);
|
|
1368
1609
|
s(n);
|
|
1369
|
-
},
|
|
1610
|
+
}, _t = (s) => (e) => {
|
|
1370
1611
|
const t = e.target;
|
|
1371
1612
|
if (t.value === "")
|
|
1372
1613
|
return;
|
|
1373
|
-
const r = t.value.split("T"), n = r[0].split("-"),
|
|
1614
|
+
const r = t.value.split("T"), n = r[0].split("-"), i = new Date(
|
|
1374
1615
|
Number(n[0]),
|
|
1375
1616
|
Number(n[1]) - 1,
|
|
1376
1617
|
Number(n[2])
|
|
1377
1618
|
), l = r[1].split(":");
|
|
1378
|
-
|
|
1379
|
-
},
|
|
1619
|
+
i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])), s(i);
|
|
1620
|
+
}, ts = (s) => (e) => {
|
|
1380
1621
|
const t = e.target;
|
|
1381
1622
|
s(t.checked);
|
|
1382
|
-
},
|
|
1623
|
+
}, ss = (s) => (e) => {
|
|
1383
1624
|
e.preventDefault(), s();
|
|
1384
|
-
},
|
|
1625
|
+
}, rs = (s) => (e) => {
|
|
1385
1626
|
e.stopPropagation(), s();
|
|
1386
|
-
},
|
|
1627
|
+
}, ns = (s) => (e) => {
|
|
1387
1628
|
e.stopImmediatePropagation(), s();
|
|
1388
|
-
},
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
),
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
),
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
),
|
|
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) => {
|
|
1398
1639
|
if (d.is(s))
|
|
1399
1640
|
return (r) => {
|
|
1400
1641
|
const n = r.makeRef();
|
|
1401
|
-
let
|
|
1642
|
+
let i, l;
|
|
1402
1643
|
const c = s.map((h) => Object.keys(h)[0]);
|
|
1403
1644
|
let a;
|
|
1404
|
-
const
|
|
1645
|
+
const u = c.on((h) => {
|
|
1405
1646
|
if (h !== a) {
|
|
1406
|
-
l == null || l.dispose(),
|
|
1407
|
-
const
|
|
1408
|
-
|
|
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;
|
|
1409
1650
|
}
|
|
1410
1651
|
});
|
|
1411
1652
|
return (h) => {
|
|
1412
|
-
|
|
1653
|
+
u(), n.clear(h), i == null || i(h);
|
|
1413
1654
|
};
|
|
1414
1655
|
};
|
|
1415
1656
|
const t = Object.keys(s)[0];
|
|
1416
|
-
return
|
|
1417
|
-
},
|
|
1657
|
+
return f(e[t](J(s[t])));
|
|
1658
|
+
}, Ee = (s, e, t) => z(
|
|
1418
1659
|
p.map(s, (r) => ({ [r[e]]: r })),
|
|
1419
1660
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1420
1661
|
t
|
|
1421
|
-
),
|
|
1662
|
+
), us = (s, e) => Ee(s, "kind", e), hs = (s, e) => {
|
|
1422
1663
|
const t = p.map(s, ([r, n]) => ({ [r]: n }));
|
|
1423
|
-
return
|
|
1424
|
-
},
|
|
1664
|
+
return z(t, e);
|
|
1665
|
+
}, fs = (s, e) => Ee(s, "type", e), wt = (s, e) => z(
|
|
1425
1666
|
p.map(s, (t) => ({ [t]: !0 })),
|
|
1426
1667
|
e
|
|
1427
|
-
),
|
|
1668
|
+
), ds = (s, e = {}) => (t) => {
|
|
1428
1669
|
const r = (e == null ? void 0 : e.firstSeparator) ?? s, n = (e == null ? void 0 : e.lastSeparator) ?? s;
|
|
1429
|
-
return
|
|
1430
|
-
t.map((
|
|
1670
|
+
return wt(
|
|
1671
|
+
t.map((i) => i.isFirst ? "first" : i.isLast ? "last" : "other"),
|
|
1431
1672
|
{
|
|
1432
1673
|
first: () => r,
|
|
1433
1674
|
last: () => n,
|
|
1434
1675
|
other: () => s
|
|
1435
1676
|
}
|
|
1436
1677
|
);
|
|
1437
|
-
},
|
|
1438
|
-
const r = Object.values(s).reduce((n,
|
|
1439
|
-
const l = t.getProvider(
|
|
1440
|
-
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;
|
|
1441
1682
|
}, {});
|
|
1442
|
-
return
|
|
1443
|
-
},
|
|
1683
|
+
return f(e(r))(t);
|
|
1684
|
+
}, ps = (s, e) => (t) => {
|
|
1444
1685
|
const r = [], n = Object.entries(s).reduce(
|
|
1445
|
-
(
|
|
1446
|
-
c((a) => (Reflect.set(
|
|
1447
|
-
),
|
|
1686
|
+
(i, [l, c]) => (r.push(
|
|
1687
|
+
c((a) => (Reflect.set(i, l, a), null))(t)
|
|
1688
|
+
), i),
|
|
1448
1689
|
{}
|
|
1449
1690
|
);
|
|
1450
|
-
return r.push(e(n)(t)), (
|
|
1451
|
-
r.forEach((l) => l(
|
|
1691
|
+
return r.push(e(n)(t)), (i) => {
|
|
1692
|
+
r.forEach((l) => l(i));
|
|
1452
1693
|
};
|
|
1453
|
-
},
|
|
1454
|
-
}),
|
|
1455
|
-
t &&
|
|
1456
|
-
}),
|
|
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) => {
|
|
1457
1698
|
if (d.is(s)) {
|
|
1458
1699
|
const r = s;
|
|
1459
1700
|
return (n) => {
|
|
1460
|
-
const
|
|
1701
|
+
const i = n.makeRef();
|
|
1461
1702
|
let l = null, c = !1;
|
|
1462
|
-
const a =
|
|
1463
|
-
h == null ? (l == null || l(!0), l =
|
|
1464
|
-
|
|
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
|
|
1465
1706
|
), c = !0));
|
|
1466
1707
|
});
|
|
1467
1708
|
return (h) => {
|
|
1468
|
-
|
|
1709
|
+
u(), l == null || l(h), i.clear(h);
|
|
1469
1710
|
};
|
|
1470
1711
|
};
|
|
1471
1712
|
} else {
|
|
1472
1713
|
const r = s;
|
|
1473
1714
|
if (r == null) {
|
|
1474
1715
|
const n = t == null ? void 0 : t();
|
|
1475
|
-
return n != null ?
|
|
1716
|
+
return n != null ? f(n) : _;
|
|
1476
1717
|
}
|
|
1477
|
-
return
|
|
1718
|
+
return f(e(J(r)));
|
|
1478
1719
|
}
|
|
1479
|
-
},
|
|
1720
|
+
}, U = (s) => (e) => (t) => s(t, e), Pe = (s, e, t) => xe(
|
|
1480
1721
|
s,
|
|
1481
1722
|
() => e,
|
|
1482
1723
|
() => t
|
|
1483
|
-
),
|
|
1724
|
+
), xe = (s, e, t) => vt(
|
|
1484
1725
|
p.map(s, (r) => r ? !0 : null),
|
|
1485
1726
|
e,
|
|
1486
1727
|
t ?? void 0
|
|
1487
|
-
),
|
|
1728
|
+
), Ts = (s, e, t) => Et(
|
|
1488
1729
|
s,
|
|
1489
1730
|
() => e,
|
|
1490
1731
|
() => t
|
|
1491
|
-
),
|
|
1732
|
+
), Et = (s, e, t) => xe(
|
|
1492
1733
|
p.map(s, (r) => !r),
|
|
1493
1734
|
e,
|
|
1494
1735
|
t
|
|
1495
|
-
),
|
|
1496
|
-
const n = new
|
|
1736
|
+
), Le = (s, e, t) => t != null ? Le(s, (r) => {
|
|
1737
|
+
const n = new D(
|
|
1497
1738
|
r.index,
|
|
1498
|
-
r.total.map((
|
|
1739
|
+
r.total.map((i) => i - 1)
|
|
1499
1740
|
);
|
|
1500
|
-
return
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1741
|
+
return g(
|
|
1742
|
+
U(n.dispose),
|
|
1743
|
+
f(e(r)),
|
|
1744
|
+
Pe(r.isLast, _, t(n))
|
|
1504
1745
|
);
|
|
1505
1746
|
}) : d.is(s) ? (r) => {
|
|
1506
|
-
const n = r.makeRef(),
|
|
1747
|
+
const n = r.makeRef(), i = Array.from(
|
|
1507
1748
|
{ length: s.value },
|
|
1508
|
-
(a,
|
|
1509
|
-
).map((a) => new
|
|
1510
|
-
(a) =>
|
|
1749
|
+
(a, u) => u
|
|
1750
|
+
).map((a) => new D(a, s)), l = i.map(
|
|
1751
|
+
(a) => f(e(a))(n)
|
|
1511
1752
|
), c = s.on((a) => {
|
|
1512
1753
|
for (; a < l.length; )
|
|
1513
|
-
|
|
1514
|
-
for (let
|
|
1515
|
-
if (
|
|
1516
|
-
|
|
1517
|
-
const h =
|
|
1518
|
-
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);
|
|
1519
1760
|
}
|
|
1520
1761
|
});
|
|
1521
1762
|
return (a) => {
|
|
1522
1763
|
c(), n.clear(a);
|
|
1523
1764
|
};
|
|
1524
|
-
} :
|
|
1765
|
+
} : g(
|
|
1525
1766
|
...Array.from({ length: s }, (r, n) => n).map(
|
|
1526
|
-
(r) =>
|
|
1767
|
+
(r) => f(e(new D(r, J(s))))
|
|
1527
1768
|
)
|
|
1528
|
-
),
|
|
1769
|
+
), Ct = (s, e, t) => {
|
|
1529
1770
|
if (t != null)
|
|
1530
|
-
return
|
|
1531
|
-
const
|
|
1771
|
+
return Ct(s, (r, n) => {
|
|
1772
|
+
const i = new D(
|
|
1532
1773
|
n.index,
|
|
1533
1774
|
n.total.map((l) => l - 1)
|
|
1534
1775
|
);
|
|
1535
|
-
return
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1776
|
+
return g([
|
|
1777
|
+
U(i.dispose),
|
|
1778
|
+
f(e(r, n)),
|
|
1779
|
+
Pe(n.isLast, _, t(i))
|
|
1539
1780
|
]);
|
|
1540
1781
|
});
|
|
1541
1782
|
{
|
|
1542
|
-
const r = p.map(s, (
|
|
1543
|
-
return
|
|
1544
|
-
const l = n.map((c) => c[
|
|
1545
|
-
return
|
|
1546
|
-
|
|
1547
|
-
|
|
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(
|
|
1787
|
+
U(l.dispose),
|
|
1788
|
+
f(e(l, i))
|
|
1548
1789
|
);
|
|
1549
1790
|
});
|
|
1550
1791
|
}
|
|
1551
|
-
},
|
|
1792
|
+
}, Pt = (s) => (e) => e.isBrowserDOM() ? s(e) ?? (() => {
|
|
1552
1793
|
}) : () => {
|
|
1553
|
-
},
|
|
1794
|
+
}, bs = (s) => (e) => e.isHeadlessDOM() ? s(e) ?? (() => {
|
|
1554
1795
|
}) : () => {
|
|
1555
|
-
},
|
|
1556
|
-
})),
|
|
1796
|
+
}, Ss = (s) => Pt((e) => s(e.element) ?? (() => {
|
|
1797
|
+
})), _s = (s, e) => {
|
|
1557
1798
|
if (d.is(s)) {
|
|
1558
1799
|
const t = s;
|
|
1559
1800
|
return (r) => {
|
|
1560
1801
|
r = r.makeRef();
|
|
1561
|
-
const n = t.map((c) =>
|
|
1562
|
-
let
|
|
1802
|
+
const n = t.map((c) => f(e(c)));
|
|
1803
|
+
let i = () => {
|
|
1563
1804
|
};
|
|
1564
1805
|
const l = n.on((c) => {
|
|
1565
|
-
|
|
1806
|
+
i(!0), i = c(r);
|
|
1566
1807
|
});
|
|
1567
1808
|
return (c) => {
|
|
1568
|
-
l(),
|
|
1809
|
+
l(), i(c);
|
|
1569
1810
|
};
|
|
1570
1811
|
};
|
|
1571
1812
|
}
|
|
1572
|
-
return
|
|
1573
|
-
},
|
|
1813
|
+
return f(e(s));
|
|
1814
|
+
}, ws = (s, e, t = () => _) => z(
|
|
1574
1815
|
p.map(
|
|
1575
1816
|
s,
|
|
1576
1817
|
(r) => r.length > 0 ? { notEmpty: r } : { whenEmpty: null }
|
|
@@ -1579,59 +1820,52 @@ const Ge = /* @__PURE__ */ new Set([
|
|
|
1579
1820
|
notEmpty: (r) => e(r),
|
|
1580
1821
|
whenEmpty: () => t()
|
|
1581
1822
|
}
|
|
1582
|
-
),
|
|
1583
|
-
const t = s(e);
|
|
1584
|
-
return () => t(!0);
|
|
1585
|
-
}, ts = (s, e, { doc: t, clear: r } = {}) => {
|
|
1586
|
-
const n = typeof e == "string" ? (t ?? document).querySelector(e) : e;
|
|
1587
|
-
if (n === null)
|
|
1588
|
-
throw new at(
|
|
1589
|
-
`Cannot find element by selector for render: ${e}`
|
|
1590
|
-
);
|
|
1591
|
-
r !== !1 && (t ?? n.ownerDocument) != null && n.nodeType === 1 && (n.innerHTML = "");
|
|
1592
|
-
const o = je(n), l = le(n) ? void 0 : n, c = b.of(o, l);
|
|
1593
|
-
return z(s, c);
|
|
1594
|
-
}, ss = (s, e) => {
|
|
1595
|
-
const t = L(e), r = new he(":root", void 0), n = new E(r, void 0, { currentURL: t }, {});
|
|
1596
|
-
return {
|
|
1597
|
-
clear: z(s, n),
|
|
1598
|
-
root: r,
|
|
1599
|
-
currentURL: t
|
|
1600
|
-
};
|
|
1601
|
-
};
|
|
1602
|
-
class at extends Error {
|
|
1603
|
-
constructor(e) {
|
|
1604
|
-
super(e);
|
|
1605
|
-
}
|
|
1606
|
-
}
|
|
1607
|
-
const rs = (s, e) => (t) => {
|
|
1823
|
+
), As = (s, e) => (t) => {
|
|
1608
1824
|
const r = t.makePortal(s);
|
|
1609
|
-
return
|
|
1610
|
-
},
|
|
1611
|
-
|
|
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))
|
|
1612
1834
|
throw new Error(`Probe already exists: ${s.description}`);
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
}
|
|
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) => {
|
|
1625
1859
|
const r = t.getStyle(s);
|
|
1626
1860
|
return t.setStyle(s, e), (n) => {
|
|
1627
1861
|
n && t.setStyle(s, r);
|
|
1628
1862
|
};
|
|
1629
|
-
},
|
|
1863
|
+
}, Ht = (s, e) => (t) => {
|
|
1630
1864
|
const r = t.getStyle(s);
|
|
1631
1865
|
return e.on((n) => t.setStyle(s, n)), (n) => {
|
|
1632
1866
|
n && t.setStyle(s, r);
|
|
1633
1867
|
};
|
|
1634
|
-
},
|
|
1868
|
+
}, xs = new Proxy(
|
|
1635
1869
|
{},
|
|
1636
1870
|
{
|
|
1637
1871
|
/**
|
|
@@ -1642,117 +1876,121 @@ const rs = (s, e) => (t) => {
|
|
|
1642
1876
|
* @returns The renderable component for the specified attribute.
|
|
1643
1877
|
*
|
|
1644
1878
|
*/
|
|
1645
|
-
get: (s, e) => (t) => d.is(t) ?
|
|
1879
|
+
get: (s, e) => (t) => d.is(t) ? Ht(e, t) : Mt(e, t)
|
|
1646
1880
|
}
|
|
1647
1881
|
);
|
|
1648
1882
|
export {
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
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
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1883
|
+
es as Async,
|
|
1884
|
+
as as BindChecked,
|
|
1885
|
+
is as BindDate,
|
|
1886
|
+
os as BindDateTime,
|
|
1887
|
+
ls as BindNumber,
|
|
1888
|
+
cs as BindText,
|
|
1889
|
+
P as BrowserContext,
|
|
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,
|
|
1914
|
+
U as OnDispose,
|
|
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,
|
|
1695
1931
|
d as Signal,
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
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,
|
|
1704
1940
|
p as Value,
|
|
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
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
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
|
|
1758
1996
|
};
|