@manyducks.co/dolla 2.0.0-alpha.3 → 2.0.0-alpha.31

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.
Files changed (71) hide show
  1. package/README.md +31 -951
  2. package/dist/core/batch.d.ts +17 -0
  3. package/dist/core/context.d.ts +94 -0
  4. package/dist/core/dolla.d.ts +161 -0
  5. package/dist/core/markup.d.ts +91 -0
  6. package/dist/core/nodes/dom.d.ts +13 -0
  7. package/dist/core/nodes/html.d.ts +39 -0
  8. package/dist/core/nodes/observer.d.ts +30 -0
  9. package/dist/core/nodes/outlet.d.ts +19 -0
  10. package/dist/core/nodes/portal.d.ts +22 -0
  11. package/dist/core/nodes/repeat.d.ts +36 -0
  12. package/dist/core/nodes/view.d.ts +92 -0
  13. package/dist/core/ref.d.ts +29 -0
  14. package/dist/core/state.d.ts +126 -0
  15. package/dist/core/stats.d.ts +31 -0
  16. package/dist/core/store.d.ts +62 -0
  17. package/dist/core/symbols.d.ts +7 -0
  18. package/dist/index.d.ts +18 -11
  19. package/dist/index.js +1157 -1159
  20. package/dist/index.js.map +1 -1
  21. package/dist/jsx-dev-runtime.d.ts +2 -2
  22. package/dist/jsx-dev-runtime.js +2 -2
  23. package/dist/jsx-dev-runtime.js.map +1 -1
  24. package/dist/jsx-runtime.d.ts +3 -3
  25. package/dist/jsx-runtime.js +2 -2
  26. package/dist/jsx-runtime.js.map +1 -1
  27. package/dist/markup-D1i09ddt.js +1563 -0
  28. package/dist/markup-D1i09ddt.js.map +1 -0
  29. package/dist/modules/http.d.ts +5 -5
  30. package/dist/modules/i18n.d.ts +129 -0
  31. package/dist/modules/router.d.ts +37 -48
  32. package/dist/typeChecking.d.ts +2 -2
  33. package/dist/types.d.ts +12 -13
  34. package/dist/utils.d.ts +14 -2
  35. package/dist/views/default-crash-view.d.ts +1 -1
  36. package/dist/views/passthrough.d.ts +2 -2
  37. package/docs/http.md +29 -0
  38. package/docs/i18n.md +38 -0
  39. package/docs/index.md +10 -0
  40. package/docs/router.md +77 -0
  41. package/docs/setup.md +31 -0
  42. package/docs/state.md +141 -0
  43. package/docs/stores.md +62 -0
  44. package/docs/views.md +308 -0
  45. package/index.d.ts +2 -2
  46. package/notes/TODO.md +6 -0
  47. package/notes/context-vars.md +21 -0
  48. package/notes/readme-scratch.md +222 -0
  49. package/notes/route-middleware.md +42 -0
  50. package/notes/scratch.md +195 -7
  51. package/notes/stores.md +73 -0
  52. package/package.json +12 -14
  53. package/tests/{signals.test.js → state.test.js} +6 -6
  54. package/vite.config.js +0 -10
  55. package/dist/markup.d.ts +0 -100
  56. package/dist/modules/dolla.d.ts +0 -111
  57. package/dist/modules/language.d.ts +0 -41
  58. package/dist/modules/render.d.ts +0 -17
  59. package/dist/nodes/cond.d.ts +0 -26
  60. package/dist/nodes/html.d.ts +0 -26
  61. package/dist/nodes/observer.d.ts +0 -29
  62. package/dist/nodes/outlet.d.ts +0 -22
  63. package/dist/nodes/portal.d.ts +0 -19
  64. package/dist/nodes/repeat.d.ts +0 -34
  65. package/dist/nodes/text.d.ts +0 -19
  66. package/dist/passthrough-DrtCifRF.js +0 -1228
  67. package/dist/passthrough-DrtCifRF.js.map +0 -1
  68. package/dist/signals.d.ts +0 -101
  69. package/dist/view.d.ts +0 -50
  70. /package/dist/{routing.d.ts → modules/router.utils.d.ts} +0 -0
  71. /package/dist/{routing.test.d.ts → modules/router.utils.test.d.ts} +0 -0
@@ -1,1228 +0,0 @@
1
- var ue = Object.defineProperty;
2
- var ce = (t, e, n) => e in t ? ue(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var f = (t, e, n) => ce(t, typeof e != "symbol" ? e + "" : e, n);
4
- function le(t) {
5
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
6
- }
7
- var j = { exports: {} }, W;
8
- function ae() {
9
- return W || (W = 1, function(t, e) {
10
- Object.defineProperty(e, "__esModule", { value: !0 });
11
- var n = /* @__PURE__ */ function() {
12
- function u(l, d) {
13
- var h = [], C = !0, w = !1, k = void 0;
14
- try {
15
- for (var $, v = l[Symbol.iterator](); !(C = ($ = v.next()).done) && (h.push($.value), !(d && h.length === d)); C = !0) ;
16
- } catch (m) {
17
- w = !0, k = m;
18
- } finally {
19
- try {
20
- !C && v.return && v.return();
21
- } finally {
22
- if (w) throw k;
23
- }
24
- }
25
- return h;
26
- }
27
- return function(l, d) {
28
- if (Array.isArray(l)) return l;
29
- if (Symbol.iterator in Object(l)) return u(l, d);
30
- throw new TypeError("Invalid attempt to destructure non-iterable instance");
31
- };
32
- }(), o = function(u) {
33
- return u.reduce(function(l, d) {
34
- return 16 > d ? l + "0" + d.toString(16) : l + d.toString(16);
35
- }, "#");
36
- }, r = function(u, l, d) {
37
- var h = 0.5 > d ? d * (1 + l) : d + l - d * l, C = 2 * d - h, w = function(m, p, a) {
38
- var y = Math.round, g = 0 > a ? a + 1 : 1 < a ? a - 1 : a;
39
- return g = g < 1 / 6 ? m + 6 * (p - m) * g : g < 1 / 2 ? p : g < 2 / 3 ? m + 6 * (p - m) * (2 / 3 - g) : m, y(255 * g);
40
- }, k = w(C, h, u + 1 / 3), $ = w(C, h, u), v = w(C, h, u - 1 / 3);
41
- return [k, $, v];
42
- }, s = function(u, l, d, h) {
43
- var C = u % 1007 / 1007, w = function(m, p, a) {
44
- return m * (a - p) + p;
45
- }, k = w(C, l.min, l.max), $ = w(C, d.min, d.max), v = w(C, h.max, h.min);
46
- return [k, $, v];
47
- }, i = function(u) {
48
- return u.split("").reduce(function(l, d, h) {
49
- return l * d.charCodeAt(0) * h + 1;
50
- }, 1);
51
- }, c = function(u) {
52
- var l = u.str, d = u.hue, h = d === void 0 ? { min: 0, max: 360 } : d, C = u.sat, w = C === void 0 ? { min: 0.35, max: 0.65 } : C, k = u.light, $ = k === void 0 ? { min: 0.3, max: 0.7 } : k, v = u.hashFunction, m = v === void 0 ? i : v, p = u.scheme, a = p === void 0 ? "hex" : p, y = s(m(l), h, w, $), g = n(y, 3), S = g[0], F = g[1], B = g[2], K = r(S / 360, F, B), ie = o(K);
53
- return a === "hsl" ? [S, F, B] : a === "rgb" ? K : ie;
54
- };
55
- e.default = c, t.exports = e.default;
56
- }(j, j.exports)), j.exports;
57
- }
58
- var de = ae();
59
- const fe = /* @__PURE__ */ le(de);
60
- function q(t) {
61
- if (t === void 0)
62
- return "undefined";
63
- if (t === null)
64
- return "null";
65
- const e = typeof t;
66
- switch (e) {
67
- case "number":
68
- return isNaN(t) ? "NaN" : "number";
69
- case "function":
70
- return Y(t) ? "class" : e;
71
- case "object":
72
- return P(t) ? "array" : he(t) ? "promise" : e;
73
- default:
74
- return e;
75
- }
76
- }
77
- function P(t) {
78
- return Array.isArray(t);
79
- }
80
- function z(...t) {
81
- const e = t[0], n = (o) => P(o) && o.every((r) => e(r));
82
- return t.length < 2 ? n : n(t[1]);
83
- }
84
- function Oe(...t) {
85
- const e = t[0], n = A(t[2]) ? t[2] : "Expected an array of valid items. Got type: %t, value: %v", o = (r) => {
86
- if (P(r) && r.every((s) => e(s)))
87
- return !0;
88
- throw new TypeError(_(r, n));
89
- };
90
- return t.length < 2 ? o : o(t[1]);
91
- }
92
- function A(t) {
93
- return typeof t == "string";
94
- }
95
- function Ve(t, e) {
96
- if (A(t))
97
- return !0;
98
- throw new TypeError(_(t, e ?? "Expected a string. Got type: %t, value: %v"));
99
- }
100
- function E(t) {
101
- return typeof t == "function" && !Y(t);
102
- }
103
- function D(t) {
104
- return typeof t == "number" && !isNaN(t);
105
- }
106
- function he(t) {
107
- if (t == null) return !1;
108
- const e = t;
109
- return e instanceof Promise || E(e.then) && E(e.catch) && E(e.finally);
110
- }
111
- function Y(t) {
112
- return typeof t == "function" && /^\s*class\s+/.test(t.toString());
113
- }
114
- function Pe(...t) {
115
- const e = t[0], n = A(t[2]) ? t[2] : `Expected instance of ${e.name}. Got type: %t, value: %v`, o = (r) => {
116
- if (r instanceof e)
117
- return !0;
118
- throw new TypeError(_(r, n));
119
- };
120
- return t.length < 2 ? o : o(t[1]);
121
- }
122
- function L(t) {
123
- return t != null && typeof t == "object" && !P(t);
124
- }
125
- function _(t, e) {
126
- var r;
127
- const n = q(t), o = ((r = t == null ? void 0 : t.toString) == null ? void 0 : r.call(t)) || String(t);
128
- return e.replaceAll("%t", n).replaceAll("%v", o);
129
- }
130
- const Fe = () => {
131
- };
132
- function H(t) {
133
- return t != null && typeof t == "object" && !Array.isArray(t) && Object.getPrototypeOf(t) === Object.getPrototypeOf({});
134
- }
135
- function I(t, e) {
136
- if (t === e)
137
- return !0;
138
- if (b(t) || b(e))
139
- return !1;
140
- if (H(t) && H(e)) {
141
- const n = Object.keys(t), o = Object.keys(e);
142
- if (n.length !== o.length)
143
- return !1;
144
- for (const r in t)
145
- if (!I(t[r], e[r]))
146
- return !1;
147
- return !0;
148
- }
149
- if (Array.isArray(t) && Array.isArray(e)) {
150
- if (t.length !== e.length)
151
- return !1;
152
- for (const n in t)
153
- if (!I(t[n], e[n]))
154
- return !1;
155
- return !0;
156
- }
157
- return t === e;
158
- }
159
- function pe(t, e) {
160
- const n = (o) => {
161
- const r = {};
162
- for (const s in o)
163
- t.includes(s) || (r[s] = o[s]);
164
- return r;
165
- };
166
- return e == null ? n : n(e);
167
- }
168
- function Ue() {
169
- if (typeof window < "u" && window.console)
170
- return window.console;
171
- if (typeof global < "u" && global.console)
172
- return global.console;
173
- }
174
- function je(t) {
175
- return fe({
176
- str: t,
177
- sat: { min: 0.35, max: 0.55 },
178
- light: { min: 0.6, max: 0.6 }
179
- });
180
- }
181
- function Ie(t) {
182
- if (t instanceof RegExp)
183
- return (o) => t.test(o);
184
- const e = {
185
- positive: [],
186
- negative: []
187
- }, n = t.split(",").map((o) => o.trim()).filter((o) => o !== "");
188
- for (let o of n) {
189
- let r = "positive";
190
- o.startsWith("-") && (r = "negative", o = o.slice(1)), o === "*" ? e[r].push(function() {
191
- return !0;
192
- }) : o.endsWith("*") ? e[r].push(function(s) {
193
- return s.startsWith(o.slice(0, o.length - 1));
194
- }) : e[r].push(function(s) {
195
- return s === o;
196
- });
197
- }
198
- return function(o) {
199
- const { positive: r, negative: s } = e;
200
- return !(s.some((i) => i(o)) || r.length > 0 && !r.some((i) => i(o)));
201
- };
202
- }
203
- function b(t) {
204
- return !(t == null || typeof t != "object" || typeof t.get != "function" || typeof t.watch != "function");
205
- }
206
- function Z(t) {
207
- return !(t == null || typeof t != "object" || typeof t.set != "function" || typeof t.get != "function" || typeof t.watch != "function");
208
- }
209
- function T(t) {
210
- return b(t) ? t.get() : t;
211
- }
212
- function J(t) {
213
- return b(t) ? t : R(t);
214
- }
215
- function Le(t, e) {
216
- const [n, o] = O(t, e);
217
- return {
218
- get: n.get,
219
- watch: n.watch,
220
- set: o
221
- };
222
- }
223
- function Ge(t, e) {
224
- return {
225
- get: t.get,
226
- watch: t.watch,
227
- set: e
228
- };
229
- }
230
- function qe(t, e) {
231
- return function(o) {
232
- const r = t.get();
233
- let s;
234
- typeof o == "function" ? s = o(r) : s = o, e(s, r);
235
- };
236
- }
237
- function R(t) {
238
- return {
239
- get() {
240
- return t;
241
- },
242
- watch(e, n = {}) {
243
- return n.lazy || e(t), function() {
244
- };
245
- }
246
- };
247
- }
248
- function O(t, e) {
249
- let n = t, o = [];
250
- function r() {
251
- for (const u of o)
252
- u(n);
253
- }
254
- function s(u, l) {
255
- return e != null && e.equality ? e.equality(u, l) : I(u, l);
256
- }
257
- const i = {
258
- get() {
259
- return T(n);
260
- },
261
- watch(u, l) {
262
- return o.push(u), l != null && l.lazy || u(i.get()), function() {
263
- o.splice(o.indexOf(u), 1);
264
- };
265
- }
266
- };
267
- function c(u) {
268
- let l;
269
- typeof u == "function" ? l = u(n) : l = u, s(l, n) || (n = l, r());
270
- }
271
- return [i, c];
272
- }
273
- const me = Symbol("EMPTY");
274
- function ye(t, e, n) {
275
- t = t.map((p) => b(p) ? p : R(p));
276
- let o = new Array(t.length).fill(me, 0, t.length), r, s = [], i = !1, c = [], u, l;
277
- function d(p = w()) {
278
- for (const a of s)
279
- a(p);
280
- }
281
- function h(p, a) {
282
- return n != null && n.equality ? n.equality(p, a) : I(p, a);
283
- }
284
- function C() {
285
- const p = t.map((a) => a.get());
286
- for (let a = 0; a < t.length; a++)
287
- if (!h(p[a], o[a])) {
288
- k(e(...p)), o = p;
289
- break;
290
- }
291
- }
292
- function w() {
293
- return i || C(), l = T(r), l;
294
- }
295
- function k(p) {
296
- p !== r && (u && (u(), u = void 0), r = p, l = T(p), b(p) && i && (u = p.watch((a) => {
297
- const y = T(a);
298
- h(y, l) || (l = y, d(y));
299
- })));
300
- }
301
- function $() {
302
- let p = [...o];
303
- for (let a = 0; a < t.length; a++) {
304
- const y = t[a];
305
- c.push(
306
- y.watch((g) => {
307
- const S = o[a];
308
- o[a] = g, i && !h(g, S) && (k(e(...o)), d(T(r)));
309
- })
310
- );
311
- }
312
- i = !0;
313
- for (let a = 0; a < t.length; a++)
314
- if (!h(o[a], p[a])) {
315
- k(e(...o)), d(T(r));
316
- break;
317
- }
318
- }
319
- function v() {
320
- for (const p of c)
321
- p();
322
- c = [], u && (u(), u = void 0), i = !1;
323
- }
324
- return {
325
- get() {
326
- return w();
327
- },
328
- watch(p, a) {
329
- return i || $(), s.push(p), a != null && a.lazy || p(w()), function() {
330
- s.splice(s.indexOf(p), 1), i && s.length === 0 && v();
331
- };
332
- }
333
- };
334
- }
335
- function G(t, e) {
336
- if (t.length === 0)
337
- throw new TypeError("Expected at least one signal.");
338
- if (t.some((n) => !b(n)))
339
- throw new TypeError("All values must be signals");
340
- return t = t.map((n) => b(n) ? n : R(n)), t.length > 1 ? ye(t, e).watch(() => null) : t[0].watch(e);
341
- }
342
- function ge(t) {
343
- for (var e, n, o = arguments, r = 1, s = "", i = "", c = [0], u = function(h) {
344
- r === 1 && (h || (s = s.replace(/^\s*\n\s*|\s*\n\s*$/g, ""))) ? c.push(h ? o[h] : s) : r === 3 && (h || s) ? (c[1] = h ? o[h] : s, r = 2) : r === 2 && s === "..." && h ? c[2] = Object.assign(c[2] || {}, o[h]) : r === 2 && s && !h ? (c[2] = c[2] || {})[s] = !0 : r >= 5 && (r === 5 ? ((c[2] = c[2] || {})[n] = h ? s ? s + o[h] : o[h] : s, r = 6) : (h || s) && (c[2][n] += h ? s + o[h] : s)), s = "";
345
- }, l = 0; l < t.length; l++) {
346
- l && (r === 1 && u(), u(l));
347
- for (var d = 0; d < t[l].length; d++) e = t[l][d], r === 1 ? e === "<" ? (u(), c = [c, "", null], r = 3) : s += e : r === 4 ? s === "--" && e === ">" ? (r = 1, s = "") : s = e + s[0] : i ? e === i ? i = "" : s += e : e === '"' || e === "'" ? i = e : e === ">" ? (u(), r = 1) : r && (e === "=" ? (r = 5, n = s, s = "") : e === "/" && (r < 5 || t[l][d + 1] === ">") ? (u(), r === 3 && (c = c[0]), r = c, (c = c[0]).push(this.apply(null, r.slice(1))), r = 0) : e === " " || e === " " || e === `
348
- ` || e === "\r" ? (u(), r = 2) : s += e), r === 3 && s === "!--" && (r = 4, c = c[0]);
349
- }
350
- return u(), c.length > 2 ? c.slice(1) : c[1];
351
- }
352
- class Ce {
353
- constructor(e) {
354
- f(this, "node");
355
- f(this, "endNode");
356
- f(this, "$predicate");
357
- f(this, "stopCallback");
358
- f(this, "thenContent");
359
- f(this, "elseContent");
360
- f(this, "connectedContent", []);
361
- f(this, "elementContext");
362
- f(this, "initialUpdateHappened", !1);
363
- f(this, "previousValue");
364
- this.$predicate = e.$predicate, this.thenContent = e.thenContent ? U(e.thenContent) : void 0, this.elseContent = e.elseContent ? U(e.elseContent) : void 0, this.elementContext = e.elementContext, this.elementContext.root.getEnv() === "development" ? (this.node = document.createComment("Conditional"), this.endNode = document.createComment("/Conditional")) : (this.node = document.createTextNode(""), this.endNode = document.createTextNode(""));
365
- }
366
- get isMounted() {
367
- return this.node.parentNode != null;
368
- }
369
- mount(e, n) {
370
- this.isMounted || (e.insertBefore(this.node, (n == null ? void 0 : n.nextSibling) ?? null), this.elementContext.root.getEnv() === "development" && e.insertBefore(this.endNode, this.node.nextSibling), this.stopCallback = this.$predicate.watch((o) => {
371
- (!this.initialUpdateHappened || o && !this.previousValue || !o && this.previousValue) && (this.update(o), this.initialUpdateHappened = !0, this.previousValue = o);
372
- }));
373
- }
374
- unmount() {
375
- var e, n;
376
- this.stopCallback && (this.stopCallback(), this.stopCallback = void 0);
377
- for (const o of this.connectedContent)
378
- o.unmount();
379
- this.connectedContent = [], this.isMounted && ((e = this.node.parentNode) == null || e.removeChild(this.node), (n = this.endNode.parentNode) == null || n.removeChild(this.endNode));
380
- }
381
- update(e) {
382
- var n;
383
- for (const o of this.connectedContent)
384
- o.unmount();
385
- if (this.connectedContent = [], this.node.parentNode != null) {
386
- e && this.thenContent ? this.connectedContent = x(this.elementContext, this.thenContent) : !e && this.elseContent && (this.connectedContent = x(this.elementContext, this.elseContent));
387
- for (let o = 0; o < this.connectedContent.length; o++) {
388
- const r = this.connectedContent[o], s = ((n = this.connectedContent[o - 1]) == null ? void 0 : n.node) ?? this.node;
389
- r.mount(this.node.parentNode, s);
390
- }
391
- this.elementContext.root.getEnv() === "development" && (this.node.textContent = `Conditional (${e ? "truthy" : "falsy"})`);
392
- }
393
- }
394
- }
395
- let Q = (t = 21) => crypto.getRandomValues(new Uint8Array(t)).reduce((e, n) => (n &= 63, n < 36 ? e += n.toString(36) : n < 62 ? e += (n - 26).toString(36).toUpperCase() : n > 62 ? e += "-" : e += "_", e), "");
396
- const be = (t) => /^on[A-Z]/.test(t);
397
- class we {
398
- constructor({ tag: e, props: n, children: o, elementContext: r }) {
399
- f(this, "node");
400
- f(this, "props");
401
- f(this, "children");
402
- f(this, "stopCallbacks", []);
403
- f(this, "elementContext");
404
- f(this, "uniqueId", Q());
405
- // Prevents 'onClickOutside' handlers from firing in the same cycle in which the element is connected.
406
- f(this, "canClickAway", !1);
407
- if (r = { ...r }, e.toLowerCase() === "svg" && (r.isSVG = !0), r.isSVG ? this.node = document.createElementNS("http://www.w3.org/2000/svg", e) : this.node = document.createElement(e), r.root.getEnv() === "development" && (this.node.dataset.uniqueId = this.uniqueId), n.ref)
408
- if (oe(n.ref))
409
- n.ref.node = this.node;
410
- else
411
- throw new Error("Expected ref to be a Ref object. Got: " + n.ref);
412
- this.props = {
413
- ...pe(["ref", "class", "className"], n),
414
- class: n.className ?? n.class
415
- }, this.children = o ? x(r, o) : [], this.elementContext = r;
416
- }
417
- get isMounted() {
418
- return this.node.parentNode != null;
419
- }
420
- mount(e, n) {
421
- if (e == null)
422
- throw new Error(`HTML element requires a parent element as the first argument to connect. Got: ${e}`);
423
- if (!this.isMounted) {
424
- for (const o of this.children)
425
- o.mount(this.node);
426
- this.applyProps(this.node, this.props), this.props.style && this.applyStyles(this.node, this.props.style, this.stopCallbacks), this.props.class && this.applyClasses(this.node, this.props.class, this.stopCallbacks);
427
- }
428
- e.insertBefore(this.node, (n == null ? void 0 : n.nextSibling) ?? null), setTimeout(() => {
429
- this.canClickAway = !0;
430
- }, 0);
431
- }
432
- unmount() {
433
- var e;
434
- if (this.isMounted) {
435
- for (const n of this.children)
436
- n.unmount();
437
- (e = this.node.parentNode) == null || e.removeChild(this.node), this.canClickAway = !1;
438
- for (const n of this.stopCallbacks)
439
- n();
440
- this.stopCallbacks = [];
441
- }
442
- }
443
- getUpdateKey(e, n) {
444
- return `${this.uniqueId}:${e}:${n}`;
445
- }
446
- applyProps(e, n) {
447
- const o = (r, s, i) => {
448
- b(r) ? this.stopCallbacks.push(
449
- r.watch((c) => {
450
- this.elementContext.root.render.update(() => {
451
- s(c);
452
- }, i);
453
- })
454
- ) : this.elementContext.root.render.update(() => {
455
- s(r);
456
- }, i);
457
- };
458
- for (const r in n) {
459
- const s = n[r];
460
- if (r === "attributes") {
461
- const i = s;
462
- for (const c in i)
463
- o(
464
- i[c],
465
- (u) => {
466
- u == null ? e.removeAttribute(c) : e.setAttribute(c, String(u));
467
- },
468
- this.getUpdateKey("attr", c)
469
- );
470
- } else if (r === "eventListeners") {
471
- const i = s;
472
- for (const c in i) {
473
- const u = b(s) ? (l) => s.get()(l) : s;
474
- e.addEventListener(c, u), this.stopCallbacks.push(() => {
475
- e.removeEventListener(c, u);
476
- });
477
- }
478
- } else if (r === "onClickOutside" || r === "onclickoutside") {
479
- const i = (u) => {
480
- this.canClickAway && !e.contains(u.target) && (b(s) ? s.get()(u) : s(u));
481
- }, c = { capture: !0 };
482
- window.addEventListener("click", i, c), this.stopCallbacks.push(() => {
483
- window.removeEventListener("click", i, c);
484
- });
485
- } else if (r === "$$value") {
486
- if (!Z(s))
487
- throw new TypeError(`$$value attribute must be a settable signal. Got: ${s}`);
488
- o(
489
- s,
490
- (c) => {
491
- e.value = String(c);
492
- },
493
- this.getUpdateKey("attr", "value")
494
- );
495
- const i = (c) => {
496
- const u = ke(s.get(), c.currentTarget.value);
497
- s.set(u);
498
- };
499
- e.addEventListener("input", i), this.stopCallbacks.push(() => {
500
- e.removeEventListener("input", i);
501
- });
502
- } else if (be(r)) {
503
- const i = r.slice(2).toLowerCase(), c = b(s) ? (u) => s.get()(u) : s;
504
- e.addEventListener(i, c), this.stopCallbacks.push(() => {
505
- e.removeEventListener(i, c);
506
- });
507
- } else if (r.includes("-"))
508
- o(
509
- s,
510
- (i) => {
511
- i == null ? e.removeAttribute(r) : e.setAttribute(r, String(i));
512
- },
513
- this.getUpdateKey("attr", r)
514
- );
515
- else if (!ve.includes(r))
516
- if (this.elementContext.isSVG)
517
- o(
518
- s,
519
- (i) => {
520
- i != null ? e.setAttribute(r, String(n[r])) : e.removeAttribute(r);
521
- },
522
- this.getUpdateKey("attr", r)
523
- );
524
- else
525
- switch (r) {
526
- case "contentEditable":
527
- case "value":
528
- o(
529
- s,
530
- (i) => {
531
- e[r] = String(i);
532
- },
533
- this.getUpdateKey("prop", r)
534
- );
535
- break;
536
- case "for":
537
- o(
538
- s,
539
- (i) => {
540
- e.htmlFor = i;
541
- },
542
- this.getUpdateKey("prop", "htmlFor")
543
- );
544
- break;
545
- case "checked":
546
- o(
547
- s,
548
- (i) => {
549
- e.checked = i, i ? e.setAttribute("checked", "") : e.removeAttribute("checked");
550
- },
551
- this.getUpdateKey("prop", "checked")
552
- );
553
- break;
554
- // Attribute-aliased props
555
- case "exportParts":
556
- case "part":
557
- case "translate":
558
- case "title": {
559
- const i = r.toLowerCase();
560
- o(
561
- s,
562
- (c) => {
563
- c == null ? e.removeAttribute(i) : e.setAttribute(i, String(c));
564
- },
565
- this.getUpdateKey("attr", i)
566
- );
567
- break;
568
- }
569
- case "autocomplete":
570
- case "autocapitalize":
571
- o(
572
- s,
573
- (i) => {
574
- typeof i == "string" ? e.autocomplete = i : i ? e.autocomplete = "on" : e.autocomplete = "off";
575
- },
576
- this.getUpdateKey("prop", r)
577
- );
578
- break;
579
- default: {
580
- o(
581
- s,
582
- (i) => {
583
- e[r] = i;
584
- },
585
- this.getUpdateKey("prop", r)
586
- );
587
- break;
588
- }
589
- }
590
- }
591
- }
592
- applyStyles(e, n, o) {
593
- const r = [];
594
- if (n == null)
595
- e.style.cssText = "";
596
- else if (typeof n == "string")
597
- e.style.cssText = n;
598
- else if (b(n)) {
599
- let s;
600
- const i = n.watch((c) => {
601
- this.elementContext.root.render.update(
602
- () => {
603
- E(s) && s(), e.style.cssText = "", s = this.applyStyles(e, c, o);
604
- },
605
- this.getUpdateKey("styles", "*")
606
- );
607
- });
608
- o.push(i), r.push(i);
609
- } else if (L(n)) {
610
- n = n;
611
- for (const s in n) {
612
- const i = n[s], c = s.startsWith("--") ? (u, l) => l == null ? e.style.removeProperty(u) : e.style.setProperty(u, l) : (u, l) => e.style[u] = l ?? "";
613
- if (b(i)) {
614
- const u = i.watch((l) => {
615
- this.elementContext.root.render.update(
616
- () => {
617
- l != null ? c(s, l) : e.style.removeProperty(s);
618
- },
619
- this.getUpdateKey("style", s)
620
- );
621
- });
622
- o.push(u), r.push(u);
623
- } else if (A(i))
624
- c(s, i);
625
- else if (D(i))
626
- c(s, String(i));
627
- else
628
- throw new TypeError(`Style properties should be strings, $states or numbers. Got (${s}: ${i})`);
629
- }
630
- } else
631
- throw new TypeError(`Expected style property to be a string, $state, or object. Got: ${n}`);
632
- return function() {
633
- for (const i of r)
634
- i(), o.splice(o.indexOf(i), 1);
635
- };
636
- }
637
- applyClasses(e, n, o) {
638
- const r = [];
639
- if (b(n)) {
640
- let s;
641
- const i = n.watch((c) => {
642
- this.elementContext.root.render.update(
643
- () => {
644
- E(s) && s(), e.removeAttribute("class"), s = this.applyClasses(e, c, o);
645
- },
646
- this.getUpdateKey("attr", "class")
647
- );
648
- });
649
- o.push(i), r.push(i);
650
- } else {
651
- const s = X(n);
652
- for (const i in s) {
653
- const c = s[i];
654
- if (b(c)) {
655
- const u = c.watch((l) => {
656
- this.elementContext.root.render.update(() => {
657
- l ? e.classList.add(i) : e.classList.remove(i);
658
- });
659
- });
660
- o.push(u), r.push(u);
661
- } else c && e.classList.add(i);
662
- }
663
- }
664
- return function() {
665
- for (const i of r)
666
- i(), o.splice(o.indexOf(i), 1);
667
- };
668
- }
669
- }
670
- function X(t) {
671
- let e = {};
672
- if (A(t)) {
673
- const n = t.split(" ");
674
- for (const o of n)
675
- e[o] = !0;
676
- } else L(t) ? Object.assign(e, t) : Array.isArray(t) && Array.from(t).filter((n) => n != null).forEach((n) => {
677
- Object.assign(e, X(n));
678
- });
679
- return e;
680
- }
681
- function ke(t, e) {
682
- const n = typeof t;
683
- return n === "string" ? String(e) : n === "number" ? Number(e) : n === "boolean" ? !!e : e;
684
- }
685
- const ve = ["ref", "children", "class", "style", "data"];
686
- class $e {
687
- constructor({ signals: e, renderFn: n, elementContext: o }) {
688
- f(this, "node");
689
- f(this, "endNode");
690
- f(this, "connectedViews", []);
691
- f(this, "renderFn");
692
- f(this, "elementContext");
693
- f(this, "observerControls");
694
- this.elementContext = o, this.renderFn = n, this.node = document.createComment("Observer"), this.endNode = document.createComment("/Observer");
695
- let r;
696
- this.observerControls = {
697
- start: () => {
698
- r == null && (r = G(e, (...s) => {
699
- const i = this.renderFn(...s);
700
- if (!se(i))
701
- throw console.error(i), new TypeError(
702
- `Observer received invalid value to render. Got type: ${q(i)}, value: ${i}`
703
- );
704
- Array.isArray(i) ? this.update(...i) : this.update(i);
705
- }));
706
- },
707
- stop: () => {
708
- r != null && (r(), r = void 0);
709
- }
710
- };
711
- }
712
- get isMounted() {
713
- return this.node.parentNode != null;
714
- }
715
- mount(e, n) {
716
- this.isMounted || (e.insertBefore(this.node, (n == null ? void 0 : n.nextSibling) ?? null), this.observerControls.start());
717
- }
718
- unmount() {
719
- var e;
720
- this.observerControls.stop(), this.isMounted && (this.cleanup(), (e = this.node.parentNode) == null || e.removeChild(this.node));
721
- }
722
- cleanup() {
723
- var e;
724
- for (; this.connectedViews.length > 0; )
725
- (e = this.connectedViews.pop()) == null || e.unmount();
726
- }
727
- update(...e) {
728
- var o, r;
729
- if (this.cleanup(), e == null || !this.isMounted)
730
- return;
731
- const n = e.map((s) => ne(s) ? s : V(s) ? M(x(this.elementContext, s)) : M(x(this.elementContext, U(s))));
732
- for (const s of n) {
733
- const i = ((o = this.connectedViews.at(-1)) == null ? void 0 : o.node) || this.node;
734
- s.mount(this.node.parentNode, i), this.connectedViews.push(s);
735
- }
736
- if (this.elementContext.root.getEnv() === "development") {
737
- const s = (r = this.connectedViews.at(-1)) == null ? void 0 : r.node;
738
- this.endNode.previousSibling !== s && this.node.parentNode.insertBefore(this.endNode, (s == null ? void 0 : s.nextSibling) ?? null);
739
- }
740
- }
741
- }
742
- class Ne {
743
- constructor(e) {
744
- f(this, "node");
745
- f(this, "endNode");
746
- f(this, "$children");
747
- f(this, "stopCallback");
748
- f(this, "connectedChildren", []);
749
- f(this, "elementContext");
750
- this.$children = e.$children, this.elementContext = e.elementContext, this.elementContext.root.getEnv() === "development" ? (this.node = document.createComment("Outlet"), this.endNode = document.createComment("/Outlet")) : (this.node = document.createTextNode(""), this.endNode = document.createTextNode(""));
751
- }
752
- get isMounted() {
753
- var e;
754
- return ((e = this.node) == null ? void 0 : e.parentNode) != null;
755
- }
756
- mount(e, n) {
757
- this.isMounted || (e.insertBefore(this.node, (n == null ? void 0 : n.nextSibling) ?? null), this.stopCallback = this.$children.watch((o) => {
758
- this.update(o);
759
- }));
760
- }
761
- unmount() {
762
- var e;
763
- if (this.stopCallback && (this.stopCallback(), this.stopCallback = void 0), this.isMounted) {
764
- for (const n of this.connectedChildren)
765
- n.unmount();
766
- this.connectedChildren = [], (e = this.endNode.parentNode) == null || e.removeChild(this.endNode);
767
- }
768
- }
769
- update(e) {
770
- var n, o, r;
771
- for (const s of this.connectedChildren)
772
- s.unmount();
773
- for (let s = 0; s < e.length; s++) {
774
- const i = e[s], c = s > 0 ? e[s] : void 0;
775
- i.mount(this.node.parentElement, c == null ? void 0 : c.node);
776
- }
777
- this.connectedChildren = e, this.elementContext.root.getEnv() === "development" && (this.node.textContent = `Outlet (${e.length} ${e.length === 1 ? "child" : "children"})`, (r = this.node.parentElement) == null || r.insertBefore(
778
- this.endNode,
779
- ((o = (n = this.connectedChildren[this.connectedChildren.length - 1]) == null ? void 0 : n.node) == null ? void 0 : o.nextSibling) ?? null
780
- ));
781
- }
782
- }
783
- class xe {
784
- constructor(e) {
785
- f(this, "config");
786
- f(this, "handle");
787
- this.config = e;
788
- }
789
- get isMounted() {
790
- return this.handle ? this.handle.isMounted : !1;
791
- }
792
- mount(e, n) {
793
- const { content: o, parent: r } = this.config;
794
- ne(o) ? this.handle = o : V(o) ? this.handle = M(x(this.config.elementContext, o)) : this.handle = M(x(this.config.elementContext, U(o))), this.handle.mount(r);
795
- }
796
- unmount() {
797
- var e;
798
- (e = this.handle) != null && e.isMounted && this.handle.unmount();
799
- }
800
- }
801
- function ee(t, e, n, o = []) {
802
- t = { ...t };
803
- const [r, s] = O(x(t, o));
804
- let i = !1;
805
- const c = [], u = [], l = [], d = [], h = [], C = Q(), [w, k] = O(e.name), $ = t.root.createLogger(w, { uid: C }), v = {
806
- get uid() {
807
- return C;
808
- },
809
- setName(a) {
810
- k(a);
811
- },
812
- beforeMount(a) {
813
- u.push(a);
814
- },
815
- onMount(a) {
816
- l.push(a);
817
- },
818
- beforeUnmount(a) {
819
- d.push(a);
820
- },
821
- onUnmount(a) {
822
- h.push(a);
823
- },
824
- watch(a, y) {
825
- if (i) {
826
- const g = G(a, y);
827
- return c.push(g), g;
828
- } else {
829
- let g, S = !1;
830
- return l.push(() => {
831
- S || (g = G(a, y), c.push(g));
832
- }), function F() {
833
- F != null && (S = !0, F());
834
- };
835
- }
836
- },
837
- outlet() {
838
- return N("$outlet", { $children: r });
839
- }
840
- };
841
- Object.assign(v, $);
842
- let m;
843
- function p() {
844
- let a;
845
- try {
846
- a = e(n, v);
847
- } catch (y) {
848
- throw y instanceof Error && $.crash(y), y;
849
- }
850
- if (a instanceof Promise)
851
- throw new TypeError("View function cannot return a Promise.");
852
- if (a !== null) if (a instanceof Node)
853
- m = M(x(t, N("$node", { value: a })));
854
- else if (V(a) || z(V, a))
855
- m = M(x(t, a));
856
- else if (b(a))
857
- m = M(
858
- x(t, N("$observer", { signals: [a], renderFn: (y) => y }))
859
- );
860
- else {
861
- const y = new TypeError(
862
- `Expected '${e.name}' function to return a DOM node, Markup element, Readable or null. Got: ${q(a)}`
863
- );
864
- $.crash(y);
865
- }
866
- }
867
- return {
868
- get node() {
869
- return m == null ? void 0 : m.node;
870
- },
871
- get isMounted() {
872
- return i;
873
- },
874
- mount(a, y) {
875
- const g = i;
876
- if (!g)
877
- for (p(); u.length > 0; )
878
- u.shift()();
879
- m && m.mount(a, y), g || (i = !0, requestAnimationFrame(() => {
880
- for (; l.length > 0; )
881
- l.shift()();
882
- }));
883
- },
884
- unmount() {
885
- for (; d.length > 0; )
886
- d.shift()();
887
- for (m && m.unmount(), i = !1; h.length > 0; )
888
- h.shift()();
889
- for (; c.length > 0; )
890
- c.shift()();
891
- },
892
- setChildren(a) {
893
- s(a);
894
- }
895
- };
896
- }
897
- class Se {
898
- constructor({ elementContext: e, $items: n, renderFn: o, keyFn: r }) {
899
- f(this, "node");
900
- f(this, "endNode");
901
- f(this, "$items");
902
- f(this, "stopCallback");
903
- f(this, "connectedItems", []);
904
- f(this, "elementContext");
905
- f(this, "renderFn");
906
- f(this, "keyFn");
907
- this.elementContext = e, this.$items = n, this.renderFn = o, this.keyFn = r, this.elementContext.root.getEnv() === "development" ? (this.node = document.createComment("Repeat"), this.endNode = document.createComment("/Repeat")) : (this.node = document.createTextNode(""), this.endNode = document.createTextNode(""));
908
- }
909
- get isMounted() {
910
- return this.node.parentNode != null;
911
- }
912
- mount(e, n) {
913
- this.isMounted || (e.insertBefore(this.node, (n == null ? void 0 : n.nextSibling) ?? null), this.stopCallback = this.$items.watch((o) => {
914
- this._update(Array.from(o));
915
- }));
916
- }
917
- unmount() {
918
- var e, n;
919
- this.stopCallback && (this.stopCallback(), this.stopCallback = void 0), this.isMounted && ((e = this.node.parentNode) == null || e.removeChild(this.node), (n = this.endNode.parentNode) == null || n.removeChild(this.endNode)), this._cleanup();
920
- }
921
- _cleanup() {
922
- for (const e of this.connectedItems)
923
- e.handle.unmount();
924
- this.connectedItems = [];
925
- }
926
- _update(e) {
927
- var s, i, c;
928
- if (e.length === 0 || !this.isMounted)
929
- return this._cleanup();
930
- const n = [];
931
- let o = 0;
932
- for (const u of e)
933
- n.push({
934
- key: this.keyFn(u, o),
935
- value: u,
936
- index: o++
937
- });
938
- const r = [];
939
- for (const u of this.connectedItems)
940
- n.find((d) => d.key === u.key) || u.handle.unmount();
941
- for (const u of n) {
942
- const l = this.connectedItems.find((d) => d.key === u.key);
943
- if (l)
944
- l.setValue(u.value), l.setIndex(u.index), r[u.index] = l;
945
- else {
946
- const [d, h] = O(u.value), [C, w] = O(u.index);
947
- r[u.index] = {
948
- key: u.key,
949
- $value: d,
950
- setValue: h,
951
- $index: C,
952
- setIndex: w,
953
- handle: ee(this.elementContext, Ee, {
954
- $value: d,
955
- $index: C,
956
- renderFn: this.renderFn
957
- })
958
- };
959
- }
960
- }
961
- for (let u = 0; u < r.length; u++) {
962
- const l = r[u], d = ((s = r[u - 1]) == null ? void 0 : s.handle.node) ?? this.node;
963
- l.handle.mount(this.node.parentNode, d);
964
- }
965
- if (this.connectedItems = r, this.elementContext.root.getEnv() === "development") {
966
- this.node.textContent = `Repeat (${r.length} item${r.length === 1 ? "" : "s"})`;
967
- const u = ((i = r.at(-1)) == null ? void 0 : i.handle.node) ?? this.node;
968
- (c = this.node.parentNode) == null || c.insertBefore(this.endNode, u.nextSibling);
969
- }
970
- }
971
- }
972
- function Ee({ $value: t, $index: e, renderFn: n }, o) {
973
- return n(t, e, o);
974
- }
975
- class Me {
976
- constructor({ value: e }) {
977
- f(this, "node", document.createTextNode(""));
978
- f(this, "value", "");
979
- f(this, "stopCallback");
980
- this.value = e;
981
- }
982
- get isMounted() {
983
- return this.node.parentNode != null;
984
- }
985
- async mount(e, n = null) {
986
- this.isMounted || (b(this.value) ? this.stopCallback = this.value.watch((o) => {
987
- this.update(o);
988
- }) : this.update(this.value)), e.insertBefore(this.node, (n == null ? void 0 : n.nextSibling) ?? null);
989
- }
990
- async unmount() {
991
- this.isMounted && (this.stopCallback && (this.stopCallback(), this.stopCallback = void 0), this.node.parentNode.removeChild(this.node));
992
- }
993
- update(e) {
994
- e != null ? this.node.textContent = e.toString() : this.node.textContent = "";
995
- }
996
- }
997
- const te = Symbol("Markup");
998
- function V(t) {
999
- return L(t) && t[te] === !0;
1000
- }
1001
- function ne(t) {
1002
- return L(t) && E(t.connect) && E(t.disconnect);
1003
- }
1004
- function U(t) {
1005
- return P(t) || (t = [t]), t.flat(1 / 0).filter((e) => e != null && e !== !1).map((e) => {
1006
- if (e instanceof Node)
1007
- return N("$node", { value: e });
1008
- if (e instanceof re)
1009
- return N("$node", { value: e.node });
1010
- if (V(e))
1011
- return e;
1012
- if (A(e) || D(e))
1013
- return N("$text", { value: e });
1014
- if (b(e))
1015
- return N("$observer", {
1016
- signals: [e],
1017
- renderFn: (n) => n
1018
- });
1019
- throw console.error(e), new TypeError(`Unexpected child type. Got: ${e}`);
1020
- });
1021
- }
1022
- function N(t, e, ...n) {
1023
- return e != null && Ae(e), {
1024
- [te]: !0,
1025
- type: t,
1026
- props: e,
1027
- children: U(n)
1028
- };
1029
- }
1030
- function Ae(t) {
1031
- if (t.ref && !oe(t.ref))
1032
- throw console.warn(t.ref), new TypeError(`Prop 'ref' must be a Ref object. Got: ${t.ref}`);
1033
- for (const e in t)
1034
- if (e.startsWith("$$") && t[e] !== void 0) {
1035
- if (!Z(t[e]))
1036
- throw new TypeError(`Prop '${e}' is named as a SettableSignal but value is not. Got: ${t[e]}`);
1037
- } else if (e.startsWith("$") && t[e] !== void 0 && !b(t[e]))
1038
- throw new TypeError(`Prop '${e}' is named as a Signal but value is not. Got: ${t[e]}`);
1039
- }
1040
- const _e = ge.bind(N);
1041
- function Re(t, e, n) {
1042
- const o = J(t);
1043
- return N("$cond", {
1044
- $predicate: o,
1045
- thenContent: e,
1046
- elseContent: n
1047
- });
1048
- }
1049
- function Be(t, e, n) {
1050
- const o = J(t);
1051
- return N("$repeat", { $items: o, keyFn: e, renderFn: n });
1052
- }
1053
- function Ke(t, e) {
1054
- return N("$portal", { parent: t, content: e });
1055
- }
1056
- function We() {
1057
- const [t, e] = O();
1058
- return {
1059
- get: t.get,
1060
- watch: t.watch,
1061
- get node() {
1062
- return t.get();
1063
- },
1064
- set node(n) {
1065
- e(n);
1066
- }
1067
- };
1068
- }
1069
- function oe(t) {
1070
- return !(t == null || typeof t != "object" || !t.hasOwnProperty("node"));
1071
- }
1072
- class re {
1073
- constructor(e) {
1074
- f(this, "node");
1075
- this.node = e;
1076
- }
1077
- get isMounted() {
1078
- return this.node.parentNode != null;
1079
- }
1080
- async mount(e, n) {
1081
- e.insertBefore(this.node, (n == null ? void 0 : n.nextSibling) ?? null);
1082
- }
1083
- async unmount() {
1084
- this.node.parentNode && this.node.parentNode.removeChild(this.node);
1085
- }
1086
- }
1087
- function x(t, e) {
1088
- return (P(e) ? e : [e]).map((o) => {
1089
- if (E(o.type))
1090
- return ee(t, o.type, o.props, o.children);
1091
- if (A(o.type))
1092
- switch (o.type) {
1093
- case "$node": {
1094
- const r = o.props;
1095
- return new re(r.value);
1096
- }
1097
- case "$text": {
1098
- const r = o.props;
1099
- return new Me({
1100
- value: r.value
1101
- });
1102
- }
1103
- case "$cond": {
1104
- const r = o.props;
1105
- return new Ce({
1106
- $predicate: r.$predicate,
1107
- thenContent: r.thenContent,
1108
- elseContent: r.elseContent,
1109
- elementContext: t
1110
- });
1111
- }
1112
- case "$repeat": {
1113
- const r = o.props;
1114
- return new Se({
1115
- $items: r.$items,
1116
- keyFn: r.keyFn,
1117
- renderFn: r.renderFn,
1118
- elementContext: t
1119
- });
1120
- }
1121
- case "$observer": {
1122
- const r = o.props;
1123
- return new $e({
1124
- signals: r.signals,
1125
- renderFn: r.renderFn,
1126
- elementContext: t
1127
- });
1128
- }
1129
- case "$outlet": {
1130
- const r = o.props;
1131
- return new Ne({
1132
- $children: r.$children,
1133
- elementContext: t
1134
- });
1135
- }
1136
- case "$portal": {
1137
- const r = o.props;
1138
- return new xe({
1139
- content: r.content,
1140
- parent: r.parent,
1141
- elementContext: t
1142
- });
1143
- }
1144
- default:
1145
- if (o.type.startsWith("$"))
1146
- throw new Error(`Unknown markup type: ${o.type}`);
1147
- return new we({
1148
- tag: o.type,
1149
- props: o.props ?? {},
1150
- children: o.children,
1151
- elementContext: t
1152
- });
1153
- }
1154
- else
1155
- throw new TypeError(`Expected a string or view function. Got: ${o.type}`);
1156
- });
1157
- }
1158
- function M(t) {
1159
- if (t.length === 1)
1160
- return t[0];
1161
- const e = document.createComment("Fragment");
1162
- let n = !1;
1163
- return {
1164
- get node() {
1165
- return e;
1166
- },
1167
- get isMounted() {
1168
- return n;
1169
- },
1170
- mount(o, r) {
1171
- var s;
1172
- o.insertBefore(e, r || null);
1173
- for (const i of t) {
1174
- const c = ((s = t[t.length - 1]) == null ? void 0 : s.node) ?? e;
1175
- i.mount(o, c);
1176
- }
1177
- n = !0;
1178
- },
1179
- unmount() {
1180
- if (n) {
1181
- for (const o of t)
1182
- o.unmount();
1183
- e.remove();
1184
- }
1185
- n = !1;
1186
- }
1187
- };
1188
- }
1189
- function se(t) {
1190
- return t == null || t === !1 || typeof t == "string" || typeof t == "number" || V(t) || b(t) || z(se, t);
1191
- }
1192
- function He(t, e) {
1193
- return e.outlet();
1194
- }
1195
- export {
1196
- x as A,
1197
- qe as B,
1198
- Ke as C,
1199
- Be as D,
1200
- He as P,
1201
- b as a,
1202
- I as b,
1203
- Re as c,
1204
- ye as d,
1205
- E as e,
1206
- A as f,
1207
- O as g,
1208
- _e as h,
1209
- L as i,
1210
- Ve as j,
1211
- Oe as k,
1212
- Ie as l,
1213
- Le as m,
1214
- T as n,
1215
- We as o,
1216
- oe as p,
1217
- Pe as q,
1218
- N as r,
1219
- J as s,
1220
- Ge as t,
1221
- Ue as u,
1222
- Fe as v,
1223
- G as w,
1224
- je as x,
1225
- ee as y,
1226
- M as z
1227
- };
1228
- //# sourceMappingURL=passthrough-DrtCifRF.js.map