xote 1.3.1 → 1.3.2

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/dist/xote.mjs CHANGED
@@ -1,11 +1,15 @@
1
- function $e(e) {
1
+ function fe(e) {
2
2
  return e === void 0 ? {
3
3
  BS_PRIVATE_NESTED_SOME_NONE: 0
4
4
  } : e !== null && e.BS_PRIVATE_NESTED_SOME_NONE !== void 0 ? {
5
5
  BS_PRIVATE_NESTED_SOME_NONE: e.BS_PRIVATE_NESTED_SOME_NONE + 1 | 0
6
6
  } : e;
7
7
  }
8
- function s(e) {
8
+ function je(e) {
9
+ if (e != null)
10
+ return fe(e);
11
+ }
12
+ function l(e) {
9
13
  if (!(e !== null && e.BS_PRIVATE_NESTED_SOME_NONE !== void 0))
10
14
  return e;
11
15
  var n = e.BS_PRIVATE_NESTED_SOME_NONE;
@@ -14,20 +18,23 @@ function s(e) {
14
18
  BS_PRIVATE_NESTED_SOME_NONE: n - 1 | 0
15
19
  };
16
20
  }
17
- function ye(e) {
21
+ function Oe(e, n) {
22
+ return e !== void 0 ? l(e) : n;
23
+ }
24
+ function ke(e) {
18
25
  return e !== void 0;
19
26
  }
20
- var z = {
27
+ var K = {
21
28
  contents: 0
22
29
  };
23
- function W() {
24
- return z.contents = z.contents + 1 | 0, z.contents;
30
+ function U() {
31
+ return K.contents = K.contents + 1 | 0, K.contents;
25
32
  }
26
- var Z = (function(e, n) {
33
+ var ue = (function(e, n) {
27
34
  for (var r in e)
28
35
  n(r);
29
36
  });
30
- function L(e, n) {
37
+ function q(e, n) {
31
38
  if (e === n)
32
39
  return !0;
33
40
  var r = typeof e;
@@ -60,51 +67,51 @@ function L(e, n) {
60
67
  var c = f;
61
68
  if (c === o)
62
69
  return !0;
63
- if (!L(e[c], n[c]))
70
+ if (!q(e[c], n[c]))
64
71
  return !1;
65
72
  f = c + 1 | 0;
66
73
  }
67
74
  else {
68
75
  if (e instanceof Date && n instanceof Date)
69
76
  return !(e > n || e < n);
70
- var v = {
77
+ var d = {
71
78
  contents: !0
72
- }, S = function(h) {
73
- if (!Object.prototype.hasOwnProperty.call(n, h)) {
74
- v.contents = !1;
79
+ }, v = function($) {
80
+ if (!Object.prototype.hasOwnProperty.call(n, $)) {
81
+ d.contents = !1;
75
82
  return;
76
83
  }
77
- }, T = function(h) {
78
- if (!Object.prototype.hasOwnProperty.call(e, h) || !L(n[h], e[h])) {
79
- v.contents = !1;
84
+ }, S = function($) {
85
+ if (!Object.prototype.hasOwnProperty.call(e, $) || !q(n[$], e[$])) {
86
+ d.contents = !1;
80
87
  return;
81
88
  }
82
89
  };
83
- return Z(e, S), v.contents && Z(n, T), v.contents;
90
+ return ue(e, v), d.contents && ue(n, S), d.contents;
84
91
  }
85
92
  else
86
93
  return !1;
87
94
  }
88
- function ee(e, n, r) {
95
+ function ae(e, n, r) {
89
96
  for (var t = new Array(r), u = 0, a = n; u < r; )
90
97
  t[u] = e[a], u = u + 1 | 0, a = a + 1 | 0;
91
98
  return t;
92
99
  }
93
- function te(e, n) {
100
+ function ce(e, n) {
94
101
  for (; ; ) {
95
102
  var r = n, t = e, u = t.length, a = u === 0 ? 1 : u, o = r.length, i = a - o | 0;
96
103
  if (i === 0)
97
104
  return t.apply(null, r);
98
105
  if (i >= 0)
99
106
  return /* @__PURE__ */ (function(f, c) {
100
- return function(v) {
101
- return te(f, c.concat([v]));
107
+ return function(d) {
108
+ return ce(f, c.concat([d]));
102
109
  };
103
110
  })(t, r);
104
- n = ee(r, a, -i | 0), e = t.apply(null, ee(r, 0, a));
111
+ n = ae(r, a, -i | 0), e = t.apply(null, ae(r, 0, a));
105
112
  }
106
113
  }
107
- function be(e, n) {
114
+ function Ie(e, n) {
108
115
  var r = e.length;
109
116
  if (r === 1)
110
117
  return e(n);
@@ -136,13 +143,13 @@ function be(e, n) {
136
143
  return e(n, t, u, a, o, i, f);
137
144
  };
138
145
  default:
139
- return te(e, [n]);
146
+ return ce(e, [n]);
140
147
  }
141
148
  }
142
- function Te(e) {
149
+ function Me(e) {
143
150
  var n = e.length;
144
151
  return n === 1 ? e : function(r) {
145
- return be(e, r);
152
+ return Ie(e, r);
146
153
  };
147
154
  }
148
155
  function O(e) {
@@ -158,7 +165,7 @@ function _(e, n, r, t) {
158
165
  r: t
159
166
  };
160
167
  }
161
- function Ae(e, n) {
168
+ function Ne(e, n) {
162
169
  return {
163
170
  k: e,
164
171
  v: n,
@@ -167,7 +174,7 @@ function Ae(e, n) {
167
174
  r: void 0
168
175
  };
169
176
  }
170
- function Ce(e, n) {
177
+ function we(e, n) {
171
178
  return e.v === n ? e : {
172
179
  k: e.k,
173
180
  v: n,
@@ -193,31 +200,31 @@ function k(e, n, r, t) {
193
200
  var f = t.l, c = t.r;
194
201
  return O(c) >= O(f) ? _(_(e, n, r, f), t.k, t.v, c) : _(_(e, n, r, f.l), f.k, f.v, _(f.r, t.k, t.v, c));
195
202
  }
196
- function ue(e, n, r) {
203
+ function de(e, n, r) {
197
204
  var t = e.l;
198
- return t !== void 0 ? k(ue(t, n, r), e.k, e.v, e.r) : (n.contents = e.k, r.contents = e.v, e.r);
205
+ return t !== void 0 ? k(de(t, n, r), e.k, e.v, e.r) : (n.contents = e.k, r.contents = e.v, e.r);
199
206
  }
200
- function je(e, n) {
207
+ function Pe(e, n) {
201
208
  for (; ; ) {
202
209
  var r = e;
203
210
  if (r === void 0)
204
211
  return;
205
212
  var t = r.k;
206
213
  if (n === t)
207
- return $e(r.v);
214
+ return fe(r.v);
208
215
  e = n < t ? r.l : r.r;
209
216
  }
210
217
  }
211
218
  function A(e, n, r) {
212
219
  if (e === void 0)
213
- return Ae(n, r);
220
+ return Ne(n, r);
214
221
  var t = e.k;
215
222
  if (n === t)
216
- return Ce(e, r);
223
+ return we(e, r);
217
224
  var u = e.v;
218
225
  return n < t ? k(A(e.l, n, r), t, u, e.r) : k(e.l, t, u, A(e.r, n, r));
219
226
  }
220
- function x(e, n) {
227
+ function W(e, n) {
221
228
  var r = e.k, t = e.l, u = e.r;
222
229
  if (n === r) {
223
230
  if (t === void 0)
@@ -228,28 +235,28 @@ function x(e, n) {
228
235
  contents: u.k
229
236
  }, o = {
230
237
  contents: u.v
231
- }, i = ue(u, a, o);
238
+ }, i = de(u, a, o);
232
239
  return k(t, a.contents, o.contents, i);
233
240
  }
234
241
  if (n < r) {
235
242
  if (t === void 0)
236
243
  return e;
237
- var f = x(t, n);
244
+ var f = W(t, n);
238
245
  return f === t ? e : k(f, r, e.v, u);
239
246
  }
240
247
  if (u === void 0)
241
248
  return e;
242
- var c = x(u, n);
249
+ var c = W(u, n);
243
250
  return k(t, r, e.v, c);
244
251
  }
245
- function Oe(e, n) {
252
+ function Ge(e, n) {
246
253
  if (e !== void 0)
247
- return x(e, n);
254
+ return W(e, n);
248
255
  }
249
- var C = je;
250
- function ne(e) {
256
+ var C = Pe;
257
+ function ie(e) {
251
258
  if (e !== void 0)
252
- return s(e);
259
+ return l(e);
253
260
  throw {
254
261
  RE_EXN_ID: "Not_found",
255
262
  Error: new Error()
@@ -264,7 +271,7 @@ function m(e, n, r) {
264
271
  r
265
272
  };
266
273
  }
267
- function ke(e) {
274
+ function Re(e) {
268
275
  return {
269
276
  v: e,
270
277
  h: 1,
@@ -272,14 +279,14 @@ function ke(e) {
272
279
  r: void 0
273
280
  };
274
281
  }
275
- function re(e, n) {
282
+ function oe(e, n) {
276
283
  return n !== void 0 ? e !== void 0 ? e.h >= n.h : !1 : !0;
277
284
  }
278
285
  function I(e, n, r) {
279
286
  var t = e !== void 0 ? e.h : 0, u = r !== void 0 ? r.h : 0;
280
287
  if (t > (u + 2 | 0)) {
281
288
  var a = e.l, o = e.r;
282
- return re(a, o) ? m(a, e.v, m(o, n, r)) : m(m(a, e.v, o.l), o.v, m(o.r, n, r));
289
+ return oe(a, o) ? m(a, e.v, m(o, n, r)) : m(m(a, e.v, o.l), o.v, m(o.r, n, r));
283
290
  }
284
291
  if (u <= (t + 2 | 0))
285
292
  return {
@@ -289,24 +296,24 @@ function I(e, n, r) {
289
296
  r
290
297
  };
291
298
  var i = r.l, f = r.r;
292
- return re(f, i) ? m(m(e, n, i), r.v, f) : m(m(e, n, i.l), i.v, m(i.r, r.v, f));
299
+ return oe(f, i) ? m(m(e, n, i), r.v, f) : m(m(e, n, i.l), i.v, m(i.r, r.v, f));
293
300
  }
294
- function ae(e, n) {
301
+ function ve(e, n) {
295
302
  var r = e.l;
296
- return r !== void 0 ? I(ae(r, n), e.v, e.r) : (n.contents = e.v, e.r);
303
+ return r !== void 0 ? I(ve(r, n), e.v, e.r) : (n.contents = e.v, e.r);
297
304
  }
298
- function ie(e, n) {
305
+ function se(e, n) {
299
306
  for (; ; ) {
300
307
  var r = e;
301
308
  if (r === void 0)
302
309
  return;
303
- ie(r.l, n), n(r.v), e = r.r;
310
+ se(r.l, n), n(r.v), e = r.r;
304
311
  }
305
312
  }
306
- function Ie(e, n) {
307
- ie(e, Te(n));
313
+ function De(e, n) {
314
+ se(e, Me(n));
308
315
  }
309
- function Me(e, n) {
316
+ function Xe(e, n) {
310
317
  for (; ; ) {
311
318
  var r = e;
312
319
  if (r === void 0)
@@ -317,21 +324,21 @@ function Me(e, n) {
317
324
  e = n < t ? r.l : r.r;
318
325
  }
319
326
  }
320
- function G(e, n) {
327
+ function R(e, n) {
321
328
  if (e === void 0)
322
- return ke(n);
329
+ return Re(n);
323
330
  var r = e.v;
324
331
  if (n === r)
325
332
  return e;
326
333
  var t = e.l, u = e.r;
327
334
  if (n < r) {
328
- var a = G(t, n);
335
+ var a = R(t, n);
329
336
  return a === t ? e : I(a, r, u);
330
337
  }
331
- var o = G(u, n);
338
+ var o = R(u, n);
332
339
  return o === u ? e : I(t, r, o);
333
340
  }
334
- function K(e, n) {
341
+ function H(e, n) {
335
342
  if (e === void 0)
336
343
  return e;
337
344
  var r = e.v, t = e.l, u = e.r;
@@ -342,114 +349,114 @@ function K(e, n) {
342
349
  return t;
343
350
  var a = {
344
351
  contents: u.v
345
- }, o = ae(u, a);
352
+ }, o = ve(u, a);
346
353
  return I(t, a.contents, o);
347
354
  }
348
355
  if (n < r) {
349
- var i = K(t, n);
356
+ var i = H(t, n);
350
357
  return i === t ? e : I(i, r, u);
351
358
  }
352
- var f = K(u, n);
359
+ var f = H(u, n);
353
360
  return f === u ? e : I(t, r, f);
354
361
  }
355
- var Ne = Me, B = Ie, E = {
362
+ var Ve = Xe, F = De, E = {
356
363
  contents: void 0
357
364
  }, p = {
358
365
  contents: void 0
359
- }, we = {
366
+ }, Be = {
360
367
  contents: void 0
361
- }, d = {
368
+ }, s = {
362
369
  contents: void 0
363
- }, $ = {
370
+ }, y = {
364
371
  contents: void 0
365
- }, w = {
372
+ }, P = {
366
373
  contents: !1
367
374
  };
368
- function F(e) {
375
+ function x(e) {
369
376
  var n = C(p.contents, e);
370
377
  if (n === void 0) {
371
378
  p.contents = A(p.contents, e, void 0);
372
379
  return;
373
380
  }
374
381
  }
375
- function oe(e, n) {
376
- F(n);
377
- var r = ne(C(E.contents, e));
378
- if (L(d.contents, e) && Ne(r.deps, n) === !1) {
379
- r.deps = G(r.deps, n);
380
- var t = ne(C(p.contents, n));
381
- p.contents = A(p.contents, n, G(t, e));
382
+ function le(e, n) {
383
+ x(n);
384
+ var r = ie(C(E.contents, e));
385
+ if (q(s.contents, e) && Ve(r.deps, n) === !1) {
386
+ r.deps = R(r.deps, n);
387
+ var t = ie(C(p.contents, n));
388
+ p.contents = A(p.contents, n, R(t, e));
382
389
  }
383
390
  }
384
- function R(e) {
385
- B(e.deps, (function(n) {
391
+ function D(e) {
392
+ F(e.deps, (function(n) {
386
393
  var r = C(p.contents, n);
387
394
  if (r !== void 0) {
388
- p.contents = A(p.contents, n, K(s(r), e.id));
395
+ p.contents = A(p.contents, n, H(l(r), e.id));
389
396
  return;
390
397
  }
391
398
  })), e.deps = void 0;
392
399
  }
393
- function H(e) {
394
- if ($.contents = G($.contents, e), w.contents === !1) {
395
- var n = $.contents;
396
- $.contents = void 0, B(n, (function(r) {
400
+ function Q(e) {
401
+ if (y.contents = R(y.contents, e), P.contents === !1) {
402
+ var n = y.contents;
403
+ y.contents = void 0, F(n, (function(r) {
397
404
  var t = C(E.contents, r);
398
405
  if (t !== void 0) {
399
- R(t);
400
- var u = d.contents;
401
- d.contents = r, t.run(), d.contents = u;
406
+ D(t);
407
+ var u = s.contents;
408
+ s.contents = r, t.run(), s.contents = u;
402
409
  }
403
410
  }));
404
411
  }
405
412
  }
406
- function fe(e) {
407
- F(e);
413
+ function he(e) {
414
+ x(e);
408
415
  var n = C(p.contents, e);
409
416
  if (n !== void 0)
410
- return B(s(n), H);
417
+ return F(l(n), Q);
411
418
  }
412
- function Pe(e) {
413
- var n = d.contents;
414
- d.contents = void 0;
419
+ function Fe(e) {
420
+ var n = s.contents;
421
+ s.contents = void 0;
415
422
  var r = e();
416
- return d.contents = n, r;
423
+ return s.contents = n, r;
417
424
  }
418
- function Ge(e) {
419
- var n = w.contents;
420
- w.contents = !0;
425
+ function xe(e) {
426
+ var n = P.contents;
427
+ P.contents = !0;
421
428
  var r = e();
422
- if (w.contents = n, $.contents !== void 0) {
423
- var t = $.contents;
424
- $.contents = void 0, B(t, (function(u) {
425
- H(u);
429
+ if (P.contents = n, y.contents !== void 0) {
430
+ var t = y.contents;
431
+ y.contents = void 0, F(t, (function(u) {
432
+ Q(u);
426
433
  }));
427
434
  }
428
435
  return r;
429
436
  }
430
- var Re, De, Xe, Ve;
431
- const Be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
437
+ var ze, Le, Ke, qe;
438
+ const We = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
432
439
  __proto__: null,
433
- Id: Ve,
434
- IntMap: De,
435
- IntSet: Re,
436
- Observer: Xe,
437
- addDep: oe,
438
- batch: Ge,
439
- batching: w,
440
- clearDeps: R,
441
- currentObserverId: d,
442
- ensureSignalBucket: F,
443
- notify: fe,
440
+ Id: qe,
441
+ IntMap: Le,
442
+ IntSet: ze,
443
+ Observer: Ke,
444
+ addDep: le,
445
+ batch: xe,
446
+ batching: P,
447
+ clearDeps: D,
448
+ currentObserverId: s,
449
+ ensureSignalBucket: x,
450
+ notify: he,
444
451
  observers: E,
445
- pending: $,
446
- schedule: H,
452
+ pending: y,
453
+ schedule: Q,
447
454
  signalObservers: p,
448
- signalPeeks: we,
449
- untrack: Pe
455
+ signalPeeks: Be,
456
+ untrack: Fe
450
457
  }, Symbol.toStringTag, { value: "Module" }));
451
458
  function N(e) {
452
- var n = W(), r = {
459
+ var n = U(), r = {
453
460
  id: n,
454
461
  kind: "Effect",
455
462
  run: (function() {
@@ -457,13 +464,13 @@ function N(e) {
457
464
  }),
458
465
  deps: void 0
459
466
  };
460
- E.contents = A(E.contents, n, r), R(r);
461
- var t = d.contents;
462
- d.contents = n, r.run(), d.contents = t;
467
+ E.contents = A(E.contents, n, r), D(r);
468
+ var t = s.contents;
469
+ s.contents = n, r.run(), s.contents = t;
463
470
  var u = function() {
464
471
  var a = C(E.contents, n);
465
472
  if (a !== void 0) {
466
- R(a), E.contents = Oe(E.contents, n);
473
+ D(a), E.contents = Ge(E.contents, n);
467
474
  return;
468
475
  }
469
476
  };
@@ -471,20 +478,20 @@ function N(e) {
471
478
  dispose: u
472
479
  };
473
480
  }
474
- var Fe, ze, Le, xe, Ke, qe;
475
- const We = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
481
+ var He, Je, Ue, Qe, Ye, Ze;
482
+ const en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
476
483
  __proto__: null,
477
- Core: qe,
478
- Id: Le,
479
- IntMap: ze,
480
- IntSet: Fe,
481
- Observer: xe,
482
- Signal: Ke,
484
+ Core: Ze,
485
+ Id: Ue,
486
+ IntMap: Je,
487
+ IntSet: He,
488
+ Observer: Qe,
489
+ Signal: Ye,
483
490
  run: N
484
491
  }, Symbol.toStringTag, { value: "Module" }));
485
- function J(e) {
486
- var n = W();
487
- return F(n), {
492
+ function Y(e) {
493
+ var n = U();
494
+ return x(n), {
488
495
  id: n,
489
496
  value: {
490
497
  contents: e
@@ -494,39 +501,39 @@ function J(e) {
494
501
  }
495
502
  };
496
503
  }
497
- function y(e) {
498
- var n = d.contents;
499
- return n !== void 0 && oe(n, e.id), e.value.contents;
504
+ function b(e) {
505
+ var n = s.contents;
506
+ return n !== void 0 && le(n, e.id), e.value.contents;
500
507
  }
501
- function V(e) {
508
+ function B(e) {
502
509
  return e.value.contents;
503
510
  }
504
- function b(e, n) {
505
- e.value.contents = n, e.version.contents = e.version.contents + 1 | 0, fe(e.id);
511
+ function T(e, n) {
512
+ e.value.contents = n, e.version.contents = e.version.contents + 1 | 0, he(e.id);
506
513
  }
507
- function He(e, n) {
508
- b(e, n(e.value.contents));
514
+ function nn(e, n) {
515
+ T(e, n(e.value.contents));
509
516
  }
510
- var Je, Ue, Qe, Ye, Ze;
511
- const en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
517
+ var rn, tn, un, an, on;
518
+ const fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
512
519
  __proto__: null,
513
- Core: Ze,
514
- Id: Ye,
515
- IntMap: Ue,
516
- IntSet: Je,
517
- Observer: Qe,
518
- get: y,
519
- make: J,
520
- peek: V,
521
- set: b,
522
- update: He
520
+ Core: on,
521
+ Id: an,
522
+ IntMap: tn,
523
+ IntSet: rn,
524
+ Observer: un,
525
+ get: b,
526
+ make: Y,
527
+ peek: B,
528
+ set: T,
529
+ update: nn
523
530
  }, Symbol.toStringTag, { value: "Module" }));
524
531
  function M(e) {
525
- var n = J(), r = {
532
+ var n = Y(), r = {
526
533
  contents: !1
527
- }, t = W(), u = function() {
534
+ }, t = U(), u = function() {
528
535
  var i = e();
529
- return r.contents === !1 && (r.contents = !0), b(n, i);
536
+ return r.contents === !1 && (r.contents = !0), T(n, i);
530
537
  }, a = {
531
538
  id: t,
532
539
  kind: {
@@ -536,22 +543,22 @@ function M(e) {
536
543
  run: u,
537
544
  deps: void 0
538
545
  };
539
- E.contents = A(E.contents, t, a), R(a);
540
- var o = d.contents;
541
- return d.contents = t, a.run(), d.contents = o, n;
546
+ E.contents = A(E.contents, t, a), D(a);
547
+ var o = s.contents;
548
+ return s.contents = t, a.run(), s.contents = o, n;
542
549
  }
543
- var nn, rn, tn, un, an, on;
544
- const fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
550
+ var cn, dn, vn, sn, ln, hn;
551
+ const pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
545
552
  __proto__: null,
546
- Core: un,
547
- Id: on,
548
- IntMap: rn,
549
- IntSet: nn,
550
- Observer: an,
551
- Signal: tn,
553
+ Core: sn,
554
+ Id: hn,
555
+ IntMap: dn,
556
+ IntSet: cn,
557
+ Observer: ln,
558
+ Signal: vn,
552
559
  make: M
553
560
  }, Symbol.toStringTag, { value: "Module" }));
554
- function D(e, n) {
561
+ function X(e, n) {
555
562
  return [
556
563
  e,
557
564
  {
@@ -560,7 +567,7 @@ function D(e, n) {
560
567
  }
561
568
  ];
562
569
  }
563
- function ce(e, n) {
570
+ function pe(e, n) {
564
571
  return [
565
572
  e,
566
573
  {
@@ -569,7 +576,7 @@ function ce(e, n) {
569
576
  }
570
577
  ];
571
578
  }
572
- function ve(e, n) {
579
+ function _e(e, n) {
573
580
  return [
574
581
  e,
575
582
  {
@@ -578,41 +585,41 @@ function ve(e, n) {
578
585
  }
579
586
  ];
580
587
  }
581
- function de(e) {
588
+ function me(e) {
582
589
  return {
583
590
  TAG: "Text",
584
591
  _0: e
585
592
  };
586
593
  }
587
- function cn(e) {
594
+ function _n(e) {
588
595
  var n = M(e);
589
596
  return {
590
597
  TAG: "SignalText",
591
598
  _0: n
592
599
  };
593
600
  }
594
- function U(e) {
601
+ function Z(e) {
595
602
  return {
596
603
  TAG: "Fragment",
597
604
  _0: e
598
605
  };
599
606
  }
600
- function Q(e) {
607
+ function ee(e) {
601
608
  return {
602
609
  TAG: "SignalFragment",
603
610
  _0: e
604
611
  };
605
612
  }
606
- function vn(e, n) {
613
+ function mn(e, n) {
607
614
  var r = M(function() {
608
- return y(e).map(n);
615
+ return b(e).map(n);
609
616
  });
610
617
  return {
611
618
  TAG: "SignalFragment",
612
619
  _0: r
613
620
  };
614
621
  }
615
- function l(e, n, r, t, u) {
622
+ function h(e, n, r, t, u) {
616
623
  var a = n !== void 0 ? n : [].map(function(f) {
617
624
  return f;
618
625
  }), o = r !== void 0 ? r : [].map(function(f) {
@@ -628,198 +635,216 @@ function l(e, n, r, t, u) {
628
635
  children: i
629
636
  };
630
637
  }
631
- function dn(e, n, r, t) {
632
- return l("div", e, n, r);
638
+ function gn(e, n, r, t) {
639
+ return h("div", e, n, r);
633
640
  }
634
- function sn(e, n, r, t) {
635
- return l("span", e, n, r);
641
+ function En(e, n, r, t) {
642
+ return h("span", e, n, r);
636
643
  }
637
- function ln(e, n, r, t) {
638
- return l("button", e, n, r);
644
+ function Sn(e, n, r, t) {
645
+ return h("button", e, n, r);
639
646
  }
640
- function hn(e, n, r) {
641
- return l("input", e, n, void 0);
647
+ function $n(e, n, r) {
648
+ return h("input", e, n, void 0);
642
649
  }
643
- function pn(e, n, r, t) {
644
- return l("h1", e, n, r);
650
+ function yn(e, n, r, t) {
651
+ return h("h1", e, n, r);
645
652
  }
646
- function _n(e, n, r, t) {
647
- return l("h2", e, n, r);
653
+ function bn(e, n, r, t) {
654
+ return h("h2", e, n, r);
648
655
  }
649
- function mn(e, n, r, t) {
650
- return l("h3", e, n, r);
656
+ function Tn(e, n, r, t) {
657
+ return h("h3", e, n, r);
651
658
  }
652
- function gn(e, n, r, t) {
653
- return l("p", e, n, r);
659
+ function An(e, n, r, t) {
660
+ return h("p", e, n, r);
654
661
  }
655
- function En(e, n, r, t) {
656
- return l("ul", e, n, r);
662
+ function Cn(e, n, r, t) {
663
+ return h("ul", e, n, r);
657
664
  }
658
- function Sn(e, n, r, t) {
659
- return l("li", e, n, r);
665
+ function jn(e, n, r, t) {
666
+ return h("li", e, n, r);
660
667
  }
661
- function se(e, n, r, t) {
662
- return l("a", e, n, r);
668
+ function ge(e, n, r, t) {
669
+ return h("a", e, n, r);
663
670
  }
664
- function P(e) {
671
+ function w(e, n) {
672
+ var r = Oe(je(e.__xote_disposers), []);
673
+ e.__xote_disposers = r.concat([n]);
674
+ }
675
+ function ne(e) {
676
+ var n = e.__xote_disposers;
677
+ n != null && (n.forEach(function(t) {
678
+ t.dispose();
679
+ }), e.__xote_disposers = []);
680
+ var r = Array.from(e.childNodes || []);
681
+ r.forEach(ne);
682
+ }
683
+ function G(e) {
665
684
  switch (e.TAG) {
666
685
  case "Element":
667
686
  var n = document.createElement(e.tag);
668
- return e.attrs.forEach(function(i) {
669
- var f = i[1], c = i[0];
670
- switch (f.TAG) {
687
+ return e.attrs.forEach(function(c) {
688
+ var d = c[1], v = c[0];
689
+ switch (d.TAG) {
671
690
  case "Static":
672
- n.setAttribute(c, f._0);
691
+ n.setAttribute(v, d._0);
673
692
  return;
674
693
  case "SignalValue":
675
- var v = f._0;
676
- n.setAttribute(c, V(v)), N(function() {
677
- var h = y(v);
678
- n.setAttribute(c, h);
694
+ var S = d._0;
695
+ n.setAttribute(v, B(S));
696
+ var $ = N(function() {
697
+ var L = b(S);
698
+ n.setAttribute(v, L);
679
699
  });
680
- return;
700
+ return w(n, $);
681
701
  case "Compute":
682
- var S = f._0, T = M(function() {
683
- return S();
702
+ var z = d._0, te = M(function() {
703
+ return z();
684
704
  });
685
- n.setAttribute(c, V(T)), N(function() {
686
- var h = y(T);
687
- n.setAttribute(c, h);
705
+ n.setAttribute(v, B(te));
706
+ var Ce = N(function() {
707
+ var L = b(te);
708
+ n.setAttribute(v, L);
688
709
  });
689
- return;
710
+ return w(n, Ce);
690
711
  }
691
- }), e.events.forEach(function(i) {
692
- n.addEventListener(i[0], i[1]);
693
- }), e.children.forEach(function(i) {
694
- var f = P(i);
695
- n.appendChild(f);
712
+ }), e.events.forEach(function(c) {
713
+ n.addEventListener(c[0], c[1]);
714
+ }), e.children.forEach(function(c) {
715
+ var d = G(c);
716
+ n.appendChild(d);
696
717
  }), n;
697
718
  case "Text":
698
719
  return document.createTextNode(e._0);
699
720
  case "SignalText":
700
- var r = e._0, t = document.createTextNode(V(r));
701
- return N(function() {
702
- var i = y(r);
703
- t.textContent = i;
704
- }), t;
721
+ var r = e._0, t = document.createTextNode(B(r)), u = N(function() {
722
+ var c = b(r);
723
+ t.textContent = c;
724
+ });
725
+ return w(t, u), t;
705
726
  case "Fragment":
706
- var u = document.createDocumentFragment();
707
- return e._0.forEach(function(i) {
708
- var f = P(i);
709
- u.appendChild(f);
710
- }), u;
727
+ var a = document.createDocumentFragment();
728
+ return e._0.forEach(function(c) {
729
+ var d = G(c);
730
+ a.appendChild(d);
731
+ }), a;
711
732
  case "SignalFragment":
712
- var a = e._0, o = document.createElement("div");
713
- return o.setAttribute("data-signal-fragment", "true"), o.setAttribute("style", "display: contents"), N(function() {
714
- var i = y(a);
715
- o.innerHTML = "", i.forEach(function(f) {
716
- var c = P(f);
717
- o.appendChild(c);
733
+ var o = e._0, i = document.createElement("div");
734
+ i.setAttribute("data-signal-fragment", "true"), i.setAttribute("style", "display: contents");
735
+ var f = N(function() {
736
+ var c = b(o), d = Array.from(i.childNodes || []);
737
+ d.forEach(ne), i.innerHTML = "", c.forEach(function(v) {
738
+ var S = G(v);
739
+ i.appendChild(S);
718
740
  });
719
- }), o;
741
+ });
742
+ return w(i, f), i;
720
743
  }
721
744
  }
722
- function le(e, n) {
723
- var r = P(e);
745
+ function Ee(e, n) {
746
+ var r = G(e);
724
747
  n.appendChild(r);
725
748
  }
726
- function $n(e, n) {
749
+ function On(e, n) {
727
750
  var r = document.getElementById(n);
728
751
  if (r == null) {
729
752
  console.error("Container element not found: " + n);
730
753
  return;
731
754
  } else
732
- return le(e, r);
755
+ return Ee(e, r);
733
756
  }
734
- var yn, bn, Tn, An;
735
- const Cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
757
+ var kn, In, Mn, Nn;
758
+ const wn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
736
759
  __proto__: null,
737
- Computed: An,
738
- Core: Tn,
739
- Effect: bn,
740
- Signal: yn,
741
- a: se,
742
- attr: D,
743
- button: ln,
744
- computedAttr: ve,
745
- div: dn,
746
- element: l,
747
- fragment: U,
748
- h1: pn,
749
- h2: _n,
750
- h3: mn,
751
- input: hn,
752
- li: Sn,
753
- list: vn,
754
- mount: le,
755
- mountById: $n,
756
- p: gn,
757
- render: P,
758
- signalAttr: ce,
759
- signalFragment: Q,
760
- span: sn,
761
- text: de,
762
- textSignal: cn,
763
- ul: En
760
+ Computed: Nn,
761
+ Core: Mn,
762
+ Effect: In,
763
+ Signal: kn,
764
+ a: ge,
765
+ addDisposer: w,
766
+ attr: X,
767
+ button: Sn,
768
+ computedAttr: _e,
769
+ disposeElement: ne,
770
+ div: gn,
771
+ element: h,
772
+ fragment: Z,
773
+ h1: yn,
774
+ h2: bn,
775
+ h3: Tn,
776
+ input: $n,
777
+ li: jn,
778
+ list: mn,
779
+ mount: Ee,
780
+ mountById: On,
781
+ p: An,
782
+ render: G,
783
+ signalAttr: pe,
784
+ signalFragment: ee,
785
+ span: En,
786
+ text: me,
787
+ textSignal: _n,
788
+ ul: Cn
764
789
  }, Symbol.toStringTag, { value: "Module" }));
765
- function jn(e, n) {
790
+ function Pn(e, n) {
766
791
  return e(n);
767
792
  }
768
- function On(e, n) {
793
+ function Gn(e, n) {
769
794
  return e(n);
770
795
  }
771
- function kn(e, n, r, t) {
796
+ function Rn(e, n, r, t) {
772
797
  return e(n);
773
798
  }
774
- function In(e, n, r, t) {
799
+ function Dn(e, n, r, t) {
775
800
  return e(n);
776
801
  }
777
- function Mn(e) {
802
+ function Xn(e) {
778
803
  var n = e.children;
779
- return n !== void 0 ? n : U([]);
804
+ return n !== void 0 ? n : Z([]);
780
805
  }
781
- function Nn(e) {
782
- return U(e);
806
+ function Vn(e) {
807
+ return Z(e);
783
808
  }
784
- function wn() {
785
- return de("");
809
+ function Bn() {
810
+ return me("");
786
811
  }
787
- function Pn(e) {
812
+ function Fn(e) {
788
813
  return e;
789
814
  }
790
- function Gn(e) {
815
+ function xn(e) {
791
816
  return e;
792
817
  }
793
818
  function g(e, n) {
794
- return typeof n == "function" ? ve(e, n) : typeof n == "object" && ye(n.id) ? ce(e, n) : D(e, n);
819
+ return typeof n == "function" ? _e(e, n) : typeof n == "object" && ke(n.id) ? pe(e, n) : X(e, n);
795
820
  }
796
- function he(e) {
821
+ function Se(e) {
797
822
  var n = [], r = e.id;
798
- r !== void 0 && n.push(g("id", s(r)));
823
+ r !== void 0 && n.push(g("id", l(r)));
799
824
  var t = e.class;
800
- t !== void 0 && n.push(g("class", s(t)));
825
+ t !== void 0 && n.push(g("class", l(t)));
801
826
  var u = e.style;
802
- u !== void 0 && n.push(g("style", s(u)));
827
+ u !== void 0 && n.push(g("style", l(u)));
803
828
  var a = e.type;
804
- a !== void 0 && n.push(g("type", s(a)));
829
+ a !== void 0 && n.push(g("type", l(a)));
805
830
  var o = e.value;
806
- o !== void 0 && n.push(g("value", s(o)));
831
+ o !== void 0 && n.push(g("value", l(o)));
807
832
  var i = e.placeholder;
808
- i !== void 0 && n.push(g("placeholder", s(i)));
833
+ i !== void 0 && n.push(g("placeholder", l(i)));
809
834
  var f = e.disabled;
810
- f !== void 0 && f && n.push(D("disabled", "true"));
835
+ f !== void 0 && f && n.push(X("disabled", "true"));
811
836
  var c = e.checked;
812
- c !== void 0 && c && n.push(D("checked", "true"));
813
- var v = e.href;
814
- v !== void 0 && n.push(g("href", s(v)));
815
- var S = e.target;
816
- S !== void 0 && n.push(g("target", s(S)));
817
- var T = e.data;
818
- return T !== void 0 && Object.entries(T).forEach(([h, Se]) => {
819
- n.push(g("data-" + h, Se));
837
+ c !== void 0 && c && n.push(X("checked", "true"));
838
+ var d = e.href;
839
+ d !== void 0 && n.push(g("href", l(d)));
840
+ var v = e.target;
841
+ v !== void 0 && n.push(g("target", l(v)));
842
+ var S = e.data;
843
+ return S !== void 0 && Object.entries(S).forEach(([$, z]) => {
844
+ n.push(g("data-" + $, z));
820
845
  }), n;
821
846
  }
822
- function pe(e) {
847
+ function $e(e) {
823
848
  var n = [], r = e.onClick;
824
849
  r !== void 0 && n.push([
825
850
  "click",
@@ -860,75 +885,75 @@ function pe(e) {
860
885
  "keyup",
861
886
  c
862
887
  ]);
863
- var v = e.onMouseEnter;
864
- v !== void 0 && n.push([
888
+ var d = e.onMouseEnter;
889
+ d !== void 0 && n.push([
865
890
  "mouseenter",
866
- v
891
+ d
867
892
  ]);
868
- var S = e.onMouseLeave;
869
- return S !== void 0 && n.push([
893
+ var v = e.onMouseLeave;
894
+ return v !== void 0 && n.push([
870
895
  "mouseleave",
871
- S
896
+ v
872
897
  ]), n;
873
898
  }
874
- function _e(e) {
899
+ function ye(e) {
875
900
  var n = e.children;
876
901
  return n !== void 0 ? n.TAG === "Fragment" ? n._0 : [n] : [];
877
902
  }
878
- function X(e, n) {
903
+ function V(e, n) {
879
904
  return {
880
905
  TAG: "Element",
881
906
  tag: e,
882
- attrs: he(n),
883
- events: pe(n),
884
- children: _e(n)
907
+ attrs: Se(n),
908
+ events: $e(n),
909
+ children: ye(n)
885
910
  };
886
911
  }
887
- function Rn(e, n) {
888
- return X(e, n);
912
+ function zn(e, n) {
913
+ return V(e, n);
889
914
  }
890
- function Dn(e, n) {
891
- return X(e, n);
915
+ function Ln(e, n) {
916
+ return V(e, n);
892
917
  }
893
- function Xn(e, n, r, t) {
894
- return X(e, n);
918
+ function Kn(e, n, r, t) {
919
+ return V(e, n);
895
920
  }
896
- function Vn(e, n, r, t) {
897
- return X(e, n);
921
+ function qn(e, n, r, t) {
922
+ return V(e, n);
898
923
  }
899
- var Bn = {
900
- signal: Pn,
901
- computed: Gn,
924
+ var Wn = {
925
+ signal: Fn,
926
+ computed: xn,
902
927
  convertAttrValue: g,
903
- propsToAttrs: he,
904
- propsToEvents: pe,
905
- getChildren: _e,
906
- createElement: X,
907
- jsx: Rn,
908
- jsxs: Dn,
909
- jsxKeyed: Xn,
910
- jsxsKeyed: Vn
911
- }, Fn;
912
- const zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
928
+ propsToAttrs: Se,
929
+ propsToEvents: $e,
930
+ getChildren: ye,
931
+ createElement: V,
932
+ jsx: zn,
933
+ jsxs: Ln,
934
+ jsxKeyed: Kn,
935
+ jsxsKeyed: qn
936
+ }, Hn;
937
+ const Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
913
938
  __proto__: null,
914
- $$null: wn,
915
- Component: Fn,
916
- Elements: Bn,
917
- array: Nn,
918
- jsx: jn,
919
- jsxFragment: Mn,
920
- jsxKeyed: kn,
921
- jsxs: On,
922
- jsxsKeyed: In
939
+ $$null: Bn,
940
+ Component: Hn,
941
+ Elements: Wn,
942
+ array: Vn,
943
+ jsx: Pn,
944
+ jsxFragment: Xn,
945
+ jsxKeyed: Rn,
946
+ jsxs: Gn,
947
+ jsxsKeyed: Dn
923
948
  }, Symbol.toStringTag, { value: "Module" }));
924
- function Ln(e, n) {
949
+ function Un(e, n) {
925
950
  for (var r = e.length, t = new Array(r), u = 0, a = 0; a < r; ++a) {
926
951
  var o = e[a], i = n(o);
927
- i !== void 0 && (t[u] = s(i), u = u + 1 | 0);
952
+ i !== void 0 && (t[u] = l(i), u = u + 1 | 0);
928
953
  }
929
954
  return t.length = u, t;
930
955
  }
931
- function xn(e, n) {
956
+ function Qn(e, n) {
932
957
  for (var r = 0; ; ) {
933
958
  var t = r;
934
959
  if (t === e.length)
@@ -939,8 +964,8 @@ function xn(e, n) {
939
964
  r = t + 1 | 0;
940
965
  }
941
966
  }
942
- function me(e) {
943
- return Ln(e.split("/"), (function(n) {
967
+ function be(e) {
968
+ return Un(e.split("/"), (function(n) {
944
969
  if (n !== "")
945
970
  return n.startsWith(":") ? {
946
971
  TAG: "Param",
@@ -951,7 +976,7 @@ function me(e) {
951
976
  };
952
977
  }));
953
978
  }
954
- function ge(e, n) {
979
+ function Te(e, n) {
955
980
  var r = n.split("/").filter(function(a) {
956
981
  return a !== "";
957
982
  });
@@ -966,100 +991,100 @@ function ge(e, n) {
966
991
  _0: t
967
992
  } : "NoMatch";
968
993
  }
969
- function Y(e, n) {
970
- return ge(me(e), n);
994
+ function re(e, n) {
995
+ return Te(be(e), n);
971
996
  }
972
- const Kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
997
+ const Yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
973
998
  __proto__: null,
974
- match: Y,
975
- matchPath: ge,
976
- parsePattern: me
999
+ match: re,
1000
+ matchPath: Te,
1001
+ parsePattern: be
977
1002
  }, Symbol.toStringTag, { value: "Module" }));
978
- var j = J({
1003
+ var j = Y({
979
1004
  pathname: "/",
980
1005
  search: "",
981
1006
  hash: ""
982
1007
  });
983
- function q() {
1008
+ function J() {
984
1009
  return {
985
1010
  pathname: window.location.pathname,
986
1011
  search: window.location.search,
987
1012
  hash: window.location.hash
988
1013
  };
989
1014
  }
990
- function qn() {
991
- b(j, q());
1015
+ function Zn() {
1016
+ T(j, J());
992
1017
  var e = function(n) {
993
- b(j, q());
1018
+ T(j, J());
994
1019
  };
995
1020
  window.addEventListener("popstate", e);
996
1021
  }
997
- function Ee(e, n, r, t) {
1022
+ function Ae(e, n, r, t) {
998
1023
  var u = n !== void 0 ? n : "", a = r !== void 0 ? r : "", o = {
999
1024
  pathname: e,
1000
1025
  search: u,
1001
1026
  hash: a
1002
1027
  }, i = e + u + a, f = {};
1003
- window.history.pushState(f, "", i), b(j, o);
1028
+ window.history.pushState(f, "", i), T(j, o);
1004
1029
  }
1005
- function Wn(e, n, r, t) {
1030
+ function er(e, n, r, t) {
1006
1031
  var u = n !== void 0 ? n : "", a = r !== void 0 ? r : "", o = {
1007
1032
  pathname: e,
1008
1033
  search: u,
1009
1034
  hash: a
1010
1035
  }, i = e + u + a, f = {};
1011
- window.history.replaceState(f, "", i), b(j, o);
1036
+ window.history.replaceState(f, "", i), T(j, o);
1012
1037
  }
1013
- function Hn(e, n) {
1014
- return Q(M(function() {
1015
- var r = y(j), t = Y(e, r.pathname);
1038
+ function nr(e, n) {
1039
+ return ee(M(function() {
1040
+ var r = b(j), t = re(e, r.pathname);
1016
1041
  return typeof t != "object" ? [] : [n(t._0)];
1017
1042
  }));
1018
1043
  }
1019
- function Jn(e) {
1020
- return Q(M(function() {
1021
- var n = y(j), r = xn(e, (function(t) {
1022
- var u = Y(t.pattern, n.pathname);
1044
+ function rr(e) {
1045
+ return ee(M(function() {
1046
+ var n = b(j), r = Qn(e, (function(t) {
1047
+ var u = re(t.pattern, n.pathname);
1023
1048
  if (typeof u == "object")
1024
1049
  return t.render(u._0);
1025
1050
  }));
1026
1051
  return r !== void 0 ? [r] : [];
1027
1052
  }));
1028
1053
  }
1029
- function Un(e, n, r, t) {
1054
+ function tr(e, n, r, t) {
1030
1055
  var u = n !== void 0 ? n : [], a = r !== void 0 ? r : [], o = function(i) {
1031
- i.preventDefault(), Ee(e, void 0, void 0);
1056
+ i.preventDefault(), Ae(e, void 0, void 0);
1032
1057
  };
1033
- return se(u.concat([D("href", e)]), [[
1058
+ return ge(u.concat([X("href", e)]), [[
1034
1059
  "click",
1035
1060
  o
1036
1061
  ]], a);
1037
1062
  }
1038
- var Qn, Yn, Zn, er, nr;
1039
- const rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1063
+ var ur, ar, ir, or, fr;
1064
+ const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1040
1065
  __proto__: null,
1041
1066
  $$location: j,
1042
- Component: Zn,
1043
- Computed: Yn,
1044
- Core: nr,
1045
- Route: er,
1046
- Signal: Qn,
1047
- getCurrentLocation: q,
1048
- init: qn,
1049
- link: Un,
1050
- push: Ee,
1051
- replace: Wn,
1052
- route: Hn,
1053
- routes: Jn
1067
+ Component: ir,
1068
+ Computed: ar,
1069
+ Core: fr,
1070
+ Route: or,
1071
+ Signal: ur,
1072
+ getCurrentLocation: J,
1073
+ init: Zn,
1074
+ link: tr,
1075
+ push: Ae,
1076
+ replace: er,
1077
+ route: nr,
1078
+ routes: rr
1054
1079
  }, Symbol.toStringTag, { value: "Module" }));
1055
- var tr = Cn, ur = fn, ar = Be, ir = We, or = zn, fr = Kn, cr = rr, vr = en;
1080
+ var dr = wn, vr = pn, sr = We, lr = en, hr = Jn, pr = Yn, _r = cr, mr = fn;
1056
1081
  export {
1057
- tr as Component,
1058
- ur as Computed,
1059
- ar as Core,
1060
- ir as Effect,
1061
- or as JSX,
1062
- fr as Route,
1063
- cr as Router,
1064
- vr as Signal
1082
+ dr as Component,
1083
+ vr as Computed,
1084
+ sr as Core,
1085
+ lr as Effect,
1086
+ hr as JSX,
1087
+ pr as Route,
1088
+ _r as Router,
1089
+ mr as Signal
1065
1090
  };