@solidjs/signals 0.8.7 → 0.9.0

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/node.cjs CHANGED
@@ -319,7 +319,8 @@ let C = false;
319
319
  let v = false;
320
320
  let N = false;
321
321
  let k = null;
322
- let E = null;
322
+ let j = false;
323
+ let A = null;
323
324
  function notifySubs(e) {
324
325
  for (let t = e.O; t !== null; t = t.C) {
325
326
  const e = t.N.S & o ? S : _;
@@ -341,8 +342,8 @@ function recompute(t, n = false) {
341
342
  t.re = null;
342
343
  }
343
344
  }
344
- const s = E;
345
- E = t;
345
+ const s = A;
346
+ A = t;
346
347
  t.ie = null;
347
348
  t.S = r;
348
349
  t.se = b;
@@ -354,7 +355,7 @@ function recompute(t, n = false) {
354
355
  setStatusFlags(t, l | (h & a));
355
356
  C = true;
356
357
  try {
357
- u = t.F(u);
358
+ u = handleAsync(t, t.F(u));
358
359
  t.$ &= ~a;
359
360
  } catch (e) {
360
361
  if (e instanceof NotReadyError) {
@@ -365,7 +366,7 @@ function recompute(t, n = false) {
365
366
  C = g;
366
367
  }
367
368
  t.S = e;
368
- E = s;
369
+ A = s;
369
370
  if (!(t.$ & f)) {
370
371
  const e = t.ie;
371
372
  let n = e !== null ? e.P : t.W;
@@ -399,6 +400,53 @@ function recompute(t, n = false) {
399
400
  if ((!n || t.$ & f) && !t.ue && !t.J) O.M.push(t);
400
401
  if (t.J && i) runInTransition(t, recompute);
401
402
  }
403
+ function handleAsync(e, t, n) {
404
+ const r = typeof t === "object" && t !== null;
405
+ const i = r && t instanceof Promise;
406
+ const s = r && untrack(() => t[Symbol.asyncIterator]);
407
+ if (!i && !s) {
408
+ e.fe = null;
409
+ return t;
410
+ }
411
+ e.fe = t;
412
+ if (i) {
413
+ t.then(r => {
414
+ if (e.fe !== t) return;
415
+ O.initTransition(e);
416
+ n?.(r) ?? setSignal(e, () => r);
417
+ flush();
418
+ }).catch(n => {
419
+ if (e.fe !== t) return;
420
+ O.initTransition(e);
421
+ setStatusFlags(e, c, n);
422
+ e.se = b;
423
+ notifySubs(e);
424
+ schedule();
425
+ flush();
426
+ });
427
+ } else {
428
+ (async () => {
429
+ try {
430
+ for await (let r of t) {
431
+ if (e.fe !== t) return;
432
+ O.initTransition(e);
433
+ n?.(r) ?? setSignal(e, () => r);
434
+ flush();
435
+ }
436
+ } catch (n) {
437
+ if (e.fe !== t) return;
438
+ O.initTransition(e);
439
+ setStatusFlags(e, c, n);
440
+ e.se = b;
441
+ notifySubs(e);
442
+ schedule();
443
+ flush();
444
+ }
445
+ })();
446
+ }
447
+ O.initTransition(e);
448
+ throw new NotReadyError(A);
449
+ }
402
450
  function updateIfNecessary(r) {
403
451
  if (r.S & t) {
404
452
  for (let e = r.W; e; e = e.P) {
@@ -421,15 +469,15 @@ function unlinkSubs(e) {
421
469
  const t = e.H;
422
470
  const n = e.P;
423
471
  const r = e.C;
424
- const i = e.fe;
425
- if (r !== null) r.fe = i;
426
- else t.ce = i;
472
+ const i = e.ce;
473
+ if (r !== null) r.ce = i;
474
+ else t.ae = i;
427
475
  if (i !== null) i.C = r;
428
476
  else {
429
477
  t.O = r;
430
478
  if (r === null) {
431
- t.ae?.();
432
- t.F && !t.de && unobserved(t);
479
+ t.de?.();
480
+ t.F && !t.he && unobserved(t);
433
481
  }
434
482
  }
435
483
  return n;
@@ -455,9 +503,9 @@ function link(e, t) {
455
503
  return;
456
504
  }
457
505
  }
458
- const o = e.ce;
506
+ const o = e.ae;
459
507
  if (o !== null && o.N === t && (!s || isValidLink(o, t))) return;
460
- const u = (t.ie = e.ce = { H: e, N: t, P: i, fe: o, C: null });
508
+ const u = (t.ie = e.ae = { H: e, N: t, P: i, ce: o, C: null });
461
509
  if (n !== null) n.P = u;
462
510
  else t.W = u;
463
511
  if (o !== null) o.C = u;
@@ -488,7 +536,7 @@ function markDisposal(e) {
488
536
  insertIntoHeap(t, S);
489
537
  }
490
538
  markDisposal(t);
491
- t = t.he;
539
+ t = t.pe;
492
540
  }
493
541
  }
494
542
  function dispose(e) {
@@ -505,7 +553,7 @@ function disposeChildren(e, t = false, n) {
505
553
  if (t) e.S = u;
506
554
  let r = n ? e.ne : e.re;
507
555
  while (r) {
508
- const e = r.he;
556
+ const e = r.pe;
509
557
  if (r.W) {
510
558
  const e = r;
511
559
  deleteFromHeap(e, e.S & o ? S : _);
@@ -523,7 +571,7 @@ function disposeChildren(e, t = false, n) {
523
571
  e.ne = null;
524
572
  } else {
525
573
  e.re = null;
526
- e.he = null;
574
+ e.pe = null;
527
575
  }
528
576
  runDisposal(e, n);
529
577
  }
@@ -541,7 +589,7 @@ function runDisposal(e, t) {
541
589
  t ? (e.ee = null) : (e.te = null);
542
590
  }
543
591
  function getNextChildId(e) {
544
- if (e.id != null) return formatId(e.id, e.pe++);
592
+ if (e.id != null) return formatId(e.id, e.ye++);
545
593
  throw new Error("Cannot get child id from owner without an id");
546
594
  }
547
595
  function formatId(e, t) {
@@ -551,14 +599,14 @@ function formatId(e, t) {
551
599
  }
552
600
  function computed(t, n, r) {
553
601
  const i = {
554
- id: r?.id ?? (E?.id != null ? getNextChildId(E) : undefined),
602
+ id: r?.id ?? (A?.id != null ? getNextChildId(A) : undefined),
555
603
  oe: r?.equals != null ? r.equals : isEqual,
556
- ye: !!r?.pureWrite,
557
- ae: r?.unobserved,
604
+ ge: !!r?.pureWrite,
605
+ de: r?.unobserved,
558
606
  te: null,
559
- ge: E?.ge ?? O,
560
- we: E?.we ?? g,
561
- pe: 0,
607
+ we: A?.we ?? O,
608
+ _e: A?._e ?? g,
609
+ ye: 0,
562
610
  F: t,
563
611
  G: n,
564
612
  o: 0,
@@ -568,9 +616,9 @@ function computed(t, n, r) {
568
616
  W: null,
569
617
  ie: null,
570
618
  O: null,
571
- ce: null,
572
- i: E,
573
- he: null,
619
+ ae: null,
620
+ i: A,
621
+ pe: null,
574
622
  re: null,
575
623
  S: e,
576
624
  $: a,
@@ -578,92 +626,34 @@ function computed(t, n, r) {
578
626
  K: p,
579
627
  ee: null,
580
628
  ne: null,
629
+ fe: null,
581
630
  J: null
582
631
  };
583
- if (r?._e) Object.assign(i, r._e);
632
+ if (r?.Se) Object.assign(i, r.Se);
584
633
  i.h = i;
585
- const s = E?.t ? E.u : E;
586
- if (E) {
587
- const e = E.re;
634
+ const s = A?.t ? A.u : A;
635
+ if (A) {
636
+ const e = A.re;
588
637
  if (e === null) {
589
- E.re = i;
638
+ A.re = i;
590
639
  } else {
591
- i.he = e;
592
- E.re = i;
640
+ i.pe = e;
641
+ A.re = i;
593
642
  }
594
643
  }
595
644
  if (s) i.o = s.o + 1;
596
645
  recompute(i, true);
597
646
  return i;
598
647
  }
599
- function asyncComputed(e, t, n) {
600
- let r = undefined;
601
- let i = false;
602
- const fn = t => {
603
- const n = e(t, i);
604
- i = false;
605
- r = n;
606
- const o = n instanceof Promise;
607
- const u = n[Symbol.asyncIterator];
608
- if (!o && !u) {
609
- return n;
610
- }
611
- if (o) {
612
- n.then(e => {
613
- if (r !== n) return;
614
- O.initTransition(s);
615
- setSignal(s, () => e);
616
- flush();
617
- }).catch(e => {
618
- if (r !== n) return;
619
- O.initTransition(s);
620
- setStatusFlags(s, c, e);
621
- s.se = b;
622
- notifySubs(s);
623
- schedule();
624
- flush();
625
- });
626
- } else {
627
- (async () => {
628
- try {
629
- for await (let e of n) {
630
- if (r !== n) return;
631
- O.initTransition(s);
632
- setSignal(s, () => e);
633
- flush();
634
- }
635
- } catch (e) {
636
- if (r !== n) return;
637
- O.initTransition(s);
638
- setStatusFlags(s, c, e);
639
- s.se = b;
640
- notifySubs(s);
641
- schedule();
642
- flush();
643
- }
644
- })();
645
- }
646
- O.initTransition(E);
647
- throw new NotReadyError(E);
648
- };
649
- const s = computed(fn, t, n);
650
- s.Se = () => {
651
- i = true;
652
- recompute(s);
653
- schedule();
654
- flush();
655
- };
656
- return s;
657
- }
658
648
  function signal(e, t, n = null) {
659
649
  const r = {
660
- id: t?.id ?? (E?.id != null ? getNextChildId(E) : undefined),
650
+ id: t?.id ?? (A?.id != null ? getNextChildId(A) : undefined),
661
651
  oe: t?.equals != null ? t.equals : isEqual,
662
- ye: !!t?.pureWrite,
663
- ae: t?.unobserved,
652
+ ge: !!t?.pureWrite,
653
+ de: t?.unobserved,
664
654
  G: e,
665
655
  O: null,
666
- ce: null,
656
+ ae: null,
667
657
  $: l,
668
658
  se: b,
669
659
  I: n,
@@ -686,8 +676,9 @@ function untrack(e) {
686
676
  }
687
677
  }
688
678
  function read(e) {
689
- let t = E;
679
+ let t = A;
690
680
  if (t?.t) t = t.u;
681
+ if (j && e.F) recompute(e);
691
682
  if (t && C && !k && !N) {
692
683
  if (e.F && e.S & u) recompute(e);
693
684
  link(e, t);
@@ -766,14 +757,14 @@ function setSignal(e, t) {
766
757
  return t;
767
758
  }
768
759
  function getObserver() {
769
- return C ? E : null;
760
+ return C ? A : null;
770
761
  }
771
762
  function getOwner() {
772
- return E;
763
+ return A;
773
764
  }
774
765
  function onCleanup(e) {
775
- if (!E) return e;
776
- const t = E;
766
+ if (!A) return e;
767
+ const t = A;
777
768
  if (!t.te) {
778
769
  t.te = e;
779
770
  } else if (Array.isArray(t.te)) {
@@ -784,17 +775,17 @@ function onCleanup(e) {
784
775
  return e;
785
776
  }
786
777
  function createOwner(e) {
787
- const t = E;
778
+ const t = A;
788
779
  const n = {
789
780
  t: true,
790
781
  u: t?.t ? t.u : t,
791
782
  re: null,
792
- he: null,
783
+ pe: null,
793
784
  te: null,
794
785
  id: e?.id ?? (t?.id != null ? getNextChildId(t) : undefined),
795
- ge: t?.ge ?? O,
796
- we: t?.we || g,
797
- pe: 0,
786
+ we: t?.we ?? O,
787
+ _e: t?._e || g,
788
+ ye: 0,
798
789
  ee: null,
799
790
  ne: null,
800
791
  i: t,
@@ -807,7 +798,7 @@ function createOwner(e) {
807
798
  if (e === null) {
808
799
  t.re = n;
809
800
  } else {
810
- n.he = e;
801
+ n.pe = e;
811
802
  t.re = n;
812
803
  }
813
804
  }
@@ -818,12 +809,12 @@ function createRoot(e, t) {
818
809
  return runWithOwner(n, () => e(n.dispose));
819
810
  }
820
811
  function runWithOwner(e, t) {
821
- const n = E;
822
- E = e;
812
+ const n = A;
813
+ A = e;
823
814
  try {
824
815
  return t();
825
816
  } finally {
826
- E = n;
817
+ A = n;
827
818
  }
828
819
  }
829
820
  function staleValues(e, t = true) {
@@ -857,6 +848,22 @@ function isPending(e) {
857
848
  k = t;
858
849
  }
859
850
  }
851
+ function refresh(e) {
852
+ let t = j;
853
+ j = true;
854
+ try {
855
+ return untrack(e);
856
+ } finally {
857
+ j = t;
858
+ if (!t) {
859
+ schedule();
860
+ flush();
861
+ }
862
+ }
863
+ }
864
+ function isRefreshing() {
865
+ return j;
866
+ }
860
867
  function createContext(e, t) {
861
868
  return { id: Symbol(t), defaultValue: e };
862
869
  }
@@ -864,7 +871,7 @@ function getContext(e, t = getOwner()) {
864
871
  if (!t) {
865
872
  throw new NoOwnerError();
866
873
  }
867
- const n = hasContext(e, t) ? t.we[e.id] : e.defaultValue;
874
+ const n = hasContext(e, t) ? t._e[e.id] : e.defaultValue;
868
875
  if (isUndefined(n)) {
869
876
  throw new ContextNotFoundError();
870
877
  }
@@ -874,10 +881,10 @@ function setContext(e, t, n = getOwner()) {
874
881
  if (!n) {
875
882
  throw new NoOwnerError();
876
883
  }
877
- n.we = { ...n.we, [e.id]: isUndefined(t) ? e.defaultValue : t };
884
+ n._e = { ...n._e, [e.id]: isUndefined(t) ? e.defaultValue : t };
878
885
  }
879
886
  function hasContext(e, t) {
880
- return !isUndefined(t?.we[e.id]);
887
+ return !isUndefined(t?._e[e.id]);
881
888
  }
882
889
  function isUndefined(e) {
883
890
  return typeof e === "undefined";
@@ -886,7 +893,7 @@ function effect(e, t, n, r, i) {
886
893
  let s = false;
887
894
  const o = computed(e, r, {
888
895
  ...i,
889
- _e: {
896
+ Se: {
890
897
  U: true,
891
898
  be: r,
892
899
  me: t,
@@ -897,11 +904,11 @@ function effect(e, t, n, r, i) {
897
904
  if (s) {
898
905
  const n = this.$ && this.$ === t && e;
899
906
  this.U = !(this.$ & c) && !(this.$ & f & ~t) && !n;
900
- if (this.U) this.ge.enqueue(this.T, runEffect.bind(this));
907
+ if (this.U) this.we.enqueue(this.T, runEffect.bind(this));
901
908
  }
902
909
  if (this.$ & c) {
903
910
  let e = this.L;
904
- this.ge.notify(this, f, 0);
911
+ this.we.notify(this, f, 0);
905
912
  if (this.T === h) {
906
913
  try {
907
914
  return this.xe
@@ -914,9 +921,9 @@ function effect(e, t, n, r, i) {
914
921
  e = t;
915
922
  }
916
923
  }
917
- if (!this.ge.notify(this, c, c)) throw e;
924
+ if (!this.we.notify(this, c, c)) throw e;
918
925
  } else if (this.T === d) {
919
- this.ge.notify(this, f | c, this.$);
926
+ this.we.notify(this, f | c, this.$);
920
927
  }
921
928
  }
922
929
  }
@@ -925,7 +932,7 @@ function effect(e, t, n, r, i) {
925
932
  if (o.T === d) o.F = t => staleValues(() => e(t));
926
933
  !i?.defer &&
927
934
  !(o.$ & (c | f)) &&
928
- (o.T === h ? o.ge.enqueue(o.T, runEffect.bind(o)) : runEffect.call(o));
935
+ (o.T === h ? o.we.enqueue(o.T, runEffect.bind(o)) : runEffect.call(o));
929
936
  onCleanup(() => o.Oe?.());
930
937
  }
931
938
  function runEffect() {
@@ -935,7 +942,7 @@ function runEffect() {
935
942
  try {
936
943
  this.Oe = this.me(this.G, this.be);
937
944
  } catch (e) {
938
- if (!this.ge.notify(this, c, c)) throw e;
945
+ if (!this.we.notify(this, c, c)) throw e;
939
946
  } finally {
940
947
  this.be = this.G;
941
948
  this.U = false;
@@ -955,12 +962,6 @@ function createMemo(e, t, n) {
955
962
  let r = computed(e, t, n);
956
963
  return read.bind(null, r);
957
964
  }
958
- function createAsync(e, t, n) {
959
- const r = asyncComputed(e, t, n);
960
- const i = read.bind(null, r);
961
- i.refresh = r.Se;
962
- return i;
963
- }
964
965
  function createEffect(e, t, n, r) {
965
966
  void effect(e, t.effect || t, t.error, n, r);
966
967
  }
@@ -1016,7 +1017,7 @@ function onSettled(e) {
1016
1017
  });
1017
1018
  }
1018
1019
  function unwrap(e) {
1019
- return e?.[W]?.[R] ?? e;
1020
+ return e?.[P]?.[V] ?? e;
1020
1021
  }
1021
1022
  function getOverrideValue(e, t, n, r) {
1022
1023
  return n && r in n ? read(n[r]) : t && r in t ? t[r] : e[r];
@@ -1027,15 +1028,15 @@ function getAllKeys(e, t, n) {
1027
1028
  return Array.from(new Set([...r, ...i]));
1028
1029
  }
1029
1030
  function applyState(e, t, n, r) {
1030
- const i = t?.[W];
1031
+ const i = t?.[P];
1031
1032
  if (!i) return;
1032
- const s = i[F];
1033
- const o = i[Q];
1034
- let u = i[R];
1033
+ const s = i[Q];
1034
+ const o = i[R];
1035
+ let u = i[V];
1035
1036
  if (e === s && !o) return;
1036
- (i[M] || B).set(e, i[P]);
1037
- i[F] = e;
1038
- i[Q] = undefined;
1037
+ (i[D] || K).set(e, i[H]);
1038
+ i[Q] = e;
1039
+ i[R] = undefined;
1039
1040
  if (Array.isArray(s)) {
1040
1041
  let t = false;
1041
1042
  const l = getOverrideValue(s, o, u, "length");
@@ -1062,16 +1063,16 @@ function applyState(e, t, n, r) {
1062
1063
  if (a > h || a > d) {
1063
1064
  for (c = a; c <= h; c++) {
1064
1065
  t = true;
1065
- i[R][c] && setSignal(i[R][c], wrap(e[c], i));
1066
+ i[V][c] && setSignal(i[V][c], wrap(e[c], i));
1066
1067
  }
1067
1068
  for (; c < e.length; c++) {
1068
1069
  t = true;
1069
1070
  const s = wrap(w[c], i);
1070
- i[R][c] && setSignal(i[R][c], s);
1071
+ i[V][c] && setSignal(i[V][c], s);
1071
1072
  applyState(e[c], s, n, r);
1072
1073
  }
1073
- t && i[R][j] && setSignal(i[R][j], void 0);
1074
- l !== e.length && i[R].length && setSignal(i[R].length, e.length);
1074
+ t && i[V][E] && setSignal(i[V][E], void 0);
1075
+ l !== e.length && i[V].length && setSignal(i[V].length, e.length);
1075
1076
  return;
1076
1077
  }
1077
1078
  y = new Array(h + 1);
@@ -1095,9 +1096,9 @@ function applyState(e, t, n, r) {
1095
1096
  for (c = a; c < e.length; c++) {
1096
1097
  if (c in w) {
1097
1098
  const t = wrap(w[c], i);
1098
- i[R][c] && setSignal(i[R][c], t);
1099
+ i[V][c] && setSignal(i[V][c], t);
1099
1100
  applyState(e[c], t, n, r);
1100
- } else i[R][c] && setSignal(i[R][c], wrap(e[c], i));
1101
+ } else i[V][c] && setSignal(i[V][c], wrap(e[c], i));
1101
1102
  }
1102
1103
  if (a < e.length) t = true;
1103
1104
  } else if (l && e.length) {
@@ -1108,13 +1109,13 @@ function applyState(e, t, n, r) {
1108
1109
  }
1109
1110
  if (l !== e.length) {
1110
1111
  t = true;
1111
- i[R].length && setSignal(i[R].length, e.length);
1112
+ i[V].length && setSignal(i[V].length, e.length);
1112
1113
  }
1113
- t && i[R][j] && setSignal(i[R][j], void 0);
1114
+ t && i[V][E] && setSignal(i[V][E], void 0);
1114
1115
  return;
1115
1116
  }
1116
1117
  if (u) {
1117
- const t = u[j];
1118
+ const t = u[E];
1118
1119
  const l = t || r ? getAllKeys(s, o, e) : Object.keys(u);
1119
1120
  for (let f = 0, c = l.length; f < c; f++) {
1120
1121
  const c = l[f];
@@ -1128,7 +1129,7 @@ function applyState(e, t, n, r) {
1128
1129
  } else applyState(h, wrap(d, i), n, r);
1129
1130
  }
1130
1131
  }
1131
- if ((u = i[V])) {
1132
+ if ((u = i[q])) {
1132
1133
  const t = Object.keys(u);
1133
1134
  for (let n = 0, r = t.length; n < r; n++) {
1134
1135
  const r = t[n];
@@ -1151,11 +1152,11 @@ function createProjectionInternal(e, t = {}, n) {
1151
1152
  const i = new WeakMap();
1152
1153
  const wrapProjection = e => {
1153
1154
  if (i.has(e)) return i.get(e);
1154
- if (e[W]?.[q] === wrapProjection) return e;
1155
- const t = createStoreProxy(e, G, {
1156
- [q]: wrapProjection,
1157
- [M]: i,
1158
- [D]() {
1155
+ if (e[P]?.[M] === wrapProjection) return e;
1156
+ const t = createStoreProxy(e, T, {
1157
+ [M]: wrapProjection,
1158
+ [D]: i,
1159
+ [B]() {
1159
1160
  return r;
1160
1161
  }
1161
1162
  });
@@ -1164,11 +1165,12 @@ function createProjectionInternal(e, t = {}, n) {
1164
1165
  };
1165
1166
  const s = wrapProjection(t);
1166
1167
  r = computed(() => {
1167
- storeSetter(s, t => {
1168
- const r = e(t);
1169
- if (r !== t && r !== undefined) {
1170
- reconcile(r, n?.key || "id", n?.all)(t);
1171
- }
1168
+ const t = r || getOwner();
1169
+ storeSetter(s, r => {
1170
+ const i = handleAsync(t, e(r), e => {
1171
+ e !== r && e !== undefined && storeSetter(s, reconcile(e, n?.key || "id", n?.all));
1172
+ });
1173
+ i !== r && i !== undefined && reconcile(i, n?.key || "id", n?.all)(r);
1172
1174
  });
1173
1175
  });
1174
1176
  return { store: s, node: r };
@@ -1176,33 +1178,33 @@ function createProjectionInternal(e, t = {}, n) {
1176
1178
  function createProjection(e, t = {}, n) {
1177
1179
  return createProjectionInternal(e, t, n).store;
1178
1180
  }
1179
- const j = Symbol(0),
1180
- A = Symbol(0),
1181
+ const E = Symbol(0),
1181
1182
  W = Symbol(0),
1182
1183
  P = Symbol(0),
1183
- H = Symbol(0);
1184
- const I = new WeakMap();
1185
- const F = "v",
1186
- Q = "o",
1187
- R = "n",
1188
- V = "h",
1189
- q = "w",
1190
- M = "l",
1191
- D = "f";
1192
- function createStoreProxy(e, t = G, n) {
1184
+ H = Symbol(0),
1185
+ I = Symbol(0);
1186
+ const F = new WeakMap();
1187
+ const Q = "v",
1188
+ R = "o",
1189
+ V = "n",
1190
+ q = "h",
1191
+ M = "w",
1192
+ D = "l",
1193
+ B = "f";
1194
+ function createStoreProxy(e, t = T, n) {
1193
1195
  let r;
1194
1196
  if (Array.isArray(e)) {
1195
1197
  r = [];
1196
1198
  r.v = e;
1197
1199
  } else r = { v: e };
1198
1200
  n && Object.assign(r, n);
1199
- return (r[P] = new Proxy(r, t));
1201
+ return (r[H] = new Proxy(r, t));
1200
1202
  }
1201
- const B = new WeakMap();
1203
+ const K = new WeakMap();
1202
1204
  function wrap(e, t) {
1203
- if (t?.[q]) return t[q](e, t);
1204
- let n = e[P] || B.get(e);
1205
- if (!n) B.set(e, (n = createStoreProxy(e)));
1205
+ if (t?.[M]) return t[M](e, t);
1206
+ let n = e[H] || K.get(e);
1207
+ if (!n) K.set(e, (n = createStoreProxy(e)));
1206
1208
  return n;
1207
1209
  }
1208
1210
  function isWrappable(e) {
@@ -1226,8 +1228,8 @@ function getNode(e, t, n, r, i = isEqual) {
1226
1228
  r
1227
1229
  ));
1228
1230
  }
1229
- function trackSelf(e, t = j) {
1230
- getObserver() && read(getNode(getNodes(e, R), t, undefined, e[D]?.(), false));
1231
+ function trackSelf(e, t = E) {
1232
+ getObserver() && read(getNode(getNodes(e, V), t, undefined, e[B]?.(), false));
1231
1233
  }
1232
1234
  function getKeys(e, t, n = true) {
1233
1235
  const r = untrack(() => (n ? Object.keys(e) : Reflect.ownKeys(e)));
@@ -1235,7 +1237,7 @@ function getKeys(e, t, n = true) {
1235
1237
  const i = new Set(r);
1236
1238
  const s = Reflect.ownKeys(t);
1237
1239
  for (const e of s) {
1238
- if (t[e] !== H) i.add(e);
1240
+ if (t[e] !== I) i.add(e);
1239
1241
  else i.delete(e);
1240
1242
  }
1241
1243
  return Array.from(i);
@@ -1243,124 +1245,124 @@ function getKeys(e, t, n = true) {
1243
1245
  function getPropertyDescriptor(e, t, n) {
1244
1246
  let r = e;
1245
1247
  if (t && n in t) {
1246
- if (r[n] === H) return void 0;
1248
+ if (r[n] === I) return void 0;
1247
1249
  if (!(n in r)) r = t;
1248
1250
  }
1249
1251
  return Reflect.getOwnPropertyDescriptor(r, n);
1250
1252
  }
1251
- let K = null;
1252
- const G = {
1253
+ let G = null;
1254
+ const T = {
1253
1255
  get(e, t, n) {
1254
- if (t === W) return e;
1255
- if (t === P) return n;
1256
- if (t === j || t === A) {
1256
+ if (t === P) return e;
1257
+ if (t === H) return n;
1258
+ if (t === E || t === W) {
1257
1259
  trackSelf(e, t);
1258
1260
  return n;
1259
1261
  }
1260
- const r = getNodes(e, R);
1262
+ const r = getNodes(e, V);
1261
1263
  const i = r[t];
1262
- const s = e[Q] && t in e[Q];
1263
- const o = !!e[F][W];
1264
- const u = s ? e[Q] : e[F];
1264
+ const s = e[R] && t in e[R];
1265
+ const o = !!e[Q][P];
1266
+ const u = s ? e[R] : e[Q];
1265
1267
  if (!i) {
1266
1268
  const e = Object.getOwnPropertyDescriptor(u, t);
1267
1269
  if (e && e.get) return e.get.call(n);
1268
1270
  }
1269
- if (K?.has(n)) {
1271
+ if (G?.has(n)) {
1270
1272
  let n = i && (s || !o) ? (i.K !== p ? i.K : i.G) : u[t];
1271
- n === H && (n = undefined);
1273
+ n === I && (n = undefined);
1272
1274
  if (!isWrappable(n)) return n;
1273
1275
  const r = wrap(n, e);
1274
- K.add(r);
1276
+ G.add(r);
1275
1277
  return r;
1276
1278
  }
1277
1279
  let l = i ? (s || !o ? read(r[t]) : (read(r[t]), u[t])) : u[t];
1278
- l === H && (l = undefined);
1280
+ l === I && (l = undefined);
1279
1281
  if (!i) {
1280
1282
  if (!s && typeof l === "function" && !u.hasOwnProperty(t)) {
1281
1283
  let t;
1282
- return !Array.isArray(e[F]) && (t = Object.getPrototypeOf(e[F])) && t !== Object.prototype
1284
+ return !Array.isArray(e[Q]) && (t = Object.getPrototypeOf(e[Q])) && t !== Object.prototype
1283
1285
  ? l.bind(u)
1284
1286
  : l;
1285
1287
  } else if (getObserver()) {
1286
- return read(getNode(r, t, isWrappable(l) ? wrap(l, e) : l, e[D]?.()));
1288
+ return read(getNode(r, t, isWrappable(l) ? wrap(l, e) : l, e[B]?.()));
1287
1289
  }
1288
1290
  }
1289
1291
  return isWrappable(l) ? wrap(l, e) : l;
1290
1292
  },
1291
1293
  has(e, t) {
1292
- if (t === P || t === j || t === "__proto__") return true;
1293
- const n = e[Q] && t in e[Q] ? e[Q][t] !== H : t in e[F];
1294
- getObserver() && read(getNode(getNodes(e, V), t, n, e[D]?.()));
1294
+ if (t === H || t === E || t === "__proto__") return true;
1295
+ const n = e[R] && t in e[R] ? e[R][t] !== I : t in e[Q];
1296
+ getObserver() && read(getNode(getNodes(e, q), t, n, e[B]?.()));
1295
1297
  return n;
1296
1298
  },
1297
1299
  set(e, t, n) {
1298
- const r = e[P];
1299
- if (K?.has(e[P])) {
1300
+ const r = e[H];
1301
+ if (G?.has(e[H])) {
1300
1302
  untrack(() => {
1301
- const i = e[F];
1303
+ const i = e[Q];
1302
1304
  const s = i[t];
1303
- const o = e[Q] && t in e[Q] ? e[Q][t] : s;
1304
- const u = n?.[W]?.[F] ?? n;
1305
+ const o = e[R] && t in e[R] ? e[R][t] : s;
1306
+ const u = n?.[P]?.[Q] ?? n;
1305
1307
  if (o === u) return true;
1306
- const l = e[Q]?.length || i.length;
1307
- if (u !== undefined && u === s) delete e[Q][t];
1308
- else (e[Q] || (e[Q] = Object.create(null)))[t] = u;
1308
+ const l = e[R]?.length || i.length;
1309
+ if (u !== undefined && u === s) delete e[R][t];
1310
+ else (e[R] || (e[R] = Object.create(null)))[t] = u;
1309
1311
  const f = isWrappable(u);
1310
1312
  if (isWrappable(o)) {
1311
- const e = I.get(o);
1312
- e && (e instanceof Set ? e.delete(r) : I.delete(o));
1313
+ const e = F.get(o);
1314
+ e && (e instanceof Set ? e.delete(r) : F.delete(o));
1313
1315
  }
1314
- if (recursivelyNotify(r, B) && f) recursivelyAddParent(u, r);
1315
- e[V]?.[t] && setSignal(e[V][t], true);
1316
- const c = getNodes(e, R);
1316
+ if (recursivelyNotify(r, K) && f) recursivelyAddParent(u, r);
1317
+ e[q]?.[t] && setSignal(e[q][t], true);
1318
+ const c = getNodes(e, V);
1317
1319
  c[t] && setSignal(c[t], () => (f ? wrap(u, e) : u));
1318
1320
  if (Array.isArray(i)) {
1319
1321
  const e = parseInt(t) + 1;
1320
1322
  if (e > l) c.length && setSignal(c.length, e);
1321
1323
  }
1322
- c[j] && setSignal(c[j], undefined);
1324
+ c[E] && setSignal(c[E], undefined);
1323
1325
  });
1324
1326
  }
1325
1327
  return true;
1326
1328
  },
1327
1329
  deleteProperty(e, t) {
1328
- if (K?.has(e[P]) && e[Q]?.[t] !== H) {
1330
+ if (G?.has(e[H]) && e[R]?.[t] !== I) {
1329
1331
  untrack(() => {
1330
- const n = e[Q] && t in e[Q] ? e[Q][t] : e[F][t];
1331
- if (t in e[F]) {
1332
- (e[Q] || (e[Q] = Object.create(null)))[t] = H;
1333
- } else if (e[Q] && t in e[Q]) {
1334
- delete e[Q][t];
1332
+ const n = e[R] && t in e[R] ? e[R][t] : e[Q][t];
1333
+ if (t in e[Q]) {
1334
+ (e[R] || (e[R] = Object.create(null)))[t] = I;
1335
+ } else if (e[R] && t in e[R]) {
1336
+ delete e[R][t];
1335
1337
  } else return true;
1336
1338
  if (isWrappable(n)) {
1337
- const t = I.get(n);
1338
- t && (t instanceof Set ? t.delete(e) : I.delete(n));
1339
+ const t = F.get(n);
1340
+ t && (t instanceof Set ? t.delete(e) : F.delete(n));
1339
1341
  }
1340
- if (e[V]?.[t]) setSignal(e[V][t], false);
1341
- const r = getNodes(e, R);
1342
+ if (e[q]?.[t]) setSignal(e[q][t], false);
1343
+ const r = getNodes(e, V);
1342
1344
  r[t] && setSignal(r[t], undefined);
1343
- r[j] && setSignal(r[j], undefined);
1345
+ r[E] && setSignal(r[E], undefined);
1344
1346
  });
1345
1347
  }
1346
1348
  return true;
1347
1349
  },
1348
1350
  ownKeys(e) {
1349
1351
  trackSelf(e);
1350
- return getKeys(e[F], e[Q], false);
1352
+ return getKeys(e[Q], e[R], false);
1351
1353
  },
1352
1354
  getOwnPropertyDescriptor(e, t) {
1353
- if (t === P) return { value: e[P], writable: true, configurable: true };
1354
- return getPropertyDescriptor(e[F], e[Q], t);
1355
+ if (t === H) return { value: e[H], writable: true, configurable: true };
1356
+ return getPropertyDescriptor(e[Q], e[R], t);
1355
1357
  },
1356
1358
  getPrototypeOf(e) {
1357
- return Object.getPrototypeOf(e[F]);
1359
+ return Object.getPrototypeOf(e[Q]);
1358
1360
  }
1359
1361
  };
1360
1362
  function storeSetter(e, t) {
1361
- const n = K;
1362
- K = new Set();
1363
- K.add(e);
1363
+ const n = G;
1364
+ G = new Set();
1365
+ G.add(e);
1364
1366
  try {
1365
1367
  const n = t(e);
1366
1368
  if (n !== e && n !== undefined) {
@@ -1376,8 +1378,8 @@ function storeSetter(e, t) {
1376
1378
  }
1377
1379
  }
1378
1380
  } finally {
1379
- K.clear();
1380
- K = n;
1381
+ G.clear();
1382
+ G = n;
1381
1383
  }
1382
1384
  }
1383
1385
  function createStore(e, t, n) {
@@ -1386,17 +1388,17 @@ function createStore(e, t, n) {
1386
1388
  return [i, e => storeSetter(i, e)];
1387
1389
  }
1388
1390
  function recursivelyNotify(e, t) {
1389
- let n = e[W] || t?.get(e)?.[W];
1391
+ let n = e[P] || t?.get(e)?.[P];
1390
1392
  let r = false;
1391
1393
  if (n) {
1392
- const e = getNodes(n, R)[A];
1394
+ const e = getNodes(n, V)[W];
1393
1395
  if (e) {
1394
1396
  setSignal(e, undefined);
1395
1397
  r = true;
1396
1398
  }
1397
- t = n[M] || t;
1399
+ t = n[D] || t;
1398
1400
  }
1399
- const i = I.get(n?.[F] || e);
1401
+ const i = F.get(n?.[Q] || e);
1400
1402
  if (!i) return r;
1401
1403
  if (i instanceof Set) {
1402
1404
  for (let e of i) r = recursivelyNotify(e, t) || r;
@@ -1405,16 +1407,16 @@ function recursivelyNotify(e, t) {
1405
1407
  }
1406
1408
  function recursivelyAddParent(e, t) {
1407
1409
  let n;
1408
- const r = e[W];
1410
+ const r = e[P];
1409
1411
  if (r) {
1410
- n = r[Q];
1411
- e = r[F];
1412
+ n = r[R];
1413
+ e = r[Q];
1412
1414
  }
1413
1415
  if (t) {
1414
- let n = I.get(e);
1415
- if (!n) I.set(e, t);
1416
+ let n = F.get(e);
1417
+ if (!n) F.set(e, t);
1416
1418
  else if (n !== t) {
1417
- if (!(n instanceof Set)) I.set(e, (n = new Set([n])));
1419
+ if (!(n instanceof Set)) F.set(e, (n = new Set([n])));
1418
1420
  else if (n.has(t)) return;
1419
1421
  n.add(t);
1420
1422
  } else return;
@@ -1436,7 +1438,7 @@ function recursivelyAddParent(e, t) {
1436
1438
  }
1437
1439
  function deep(e) {
1438
1440
  recursivelyAddParent(e);
1439
- return e[A];
1441
+ return e[W];
1440
1442
  }
1441
1443
  function createOptimisticStore(e, t, n) {
1442
1444
  return [];
@@ -1446,12 +1448,12 @@ function snapshot(e, t, n) {
1446
1448
  if (!isWrappable(e)) return e;
1447
1449
  if (t && t.has(e)) return t.get(e);
1448
1450
  if (!t) t = new Map();
1449
- if ((r = e[W] || n?.get(e)?.[W])) {
1450
- s = r[Q];
1451
- i = Array.isArray(r[F]);
1452
- t.set(e, s ? (o = i ? [] : Object.create(Object.getPrototypeOf(r[F]))) : r[F]);
1453
- e = r[F];
1454
- n = B;
1451
+ if ((r = e[P] || n?.get(e)?.[P])) {
1452
+ s = r[R];
1453
+ i = Array.isArray(r[Q]);
1454
+ t.set(e, s ? (o = i ? [] : Object.create(Object.getPrototypeOf(r[Q]))) : r[Q]);
1455
+ e = r[Q];
1456
+ n = K;
1455
1457
  } else {
1456
1458
  i = Array.isArray(e);
1457
1459
  t.set(e, e);
@@ -1460,7 +1462,7 @@ function snapshot(e, t, n) {
1460
1462
  const r = s?.length || e.length;
1461
1463
  for (let i = 0; i < r; i++) {
1462
1464
  l = s && i in s ? s[i] : e[i];
1463
- if (l === H) continue;
1465
+ if (l === I) continue;
1464
1466
  if ((u = snapshot(l, t, n)) !== l || o) {
1465
1467
  if (!o) t.set(e, (o = [...e]));
1466
1468
  o[i] = u;
@@ -1487,13 +1489,13 @@ function snapshot(e, t, n) {
1487
1489
  function trueFn() {
1488
1490
  return true;
1489
1491
  }
1490
- const T = {
1492
+ const U = {
1491
1493
  get(e, t, n) {
1492
- if (t === P) return n;
1494
+ if (t === H) return n;
1493
1495
  return e.get(t);
1494
1496
  },
1495
1497
  has(e, t) {
1496
- if (t === P) return true;
1498
+ if (t === H) return true;
1497
1499
  return e.has(t);
1498
1500
  },
1499
1501
  set: trueFn,
@@ -1516,15 +1518,15 @@ const T = {
1516
1518
  function resolveSource(e) {
1517
1519
  return !(e = typeof e === "function" ? e() : e) ? {} : e;
1518
1520
  }
1519
- const U = Symbol(0);
1521
+ const L = Symbol(0);
1520
1522
  function merge(...e) {
1521
1523
  if (e.length === 1 && typeof e[0] !== "function") return e[0];
1522
1524
  let t = false;
1523
1525
  const n = [];
1524
1526
  for (let r = 0; r < e.length; r++) {
1525
1527
  const i = e[r];
1526
- t = t || (!!i && P in i);
1527
- const s = !!i && i[U];
1528
+ t = t || (!!i && H in i);
1529
+ const s = !!i && i[L];
1528
1530
  if (s) n.push(...s);
1529
1531
  else n.push(typeof i === "function" ? ((t = true), createMemo(i)) : i);
1530
1532
  }
@@ -1532,7 +1534,7 @@ function merge(...e) {
1532
1534
  return new Proxy(
1533
1535
  {
1534
1536
  get(e) {
1535
- if (e === U) return n;
1537
+ if (e === L) return n;
1536
1538
  for (let t = n.length - 1; t >= 0; t--) {
1537
1539
  const r = resolveSource(n[t]);
1538
1540
  if (e in r) return r[e];
@@ -1550,7 +1552,7 @@ function merge(...e) {
1550
1552
  return [...new Set(e)];
1551
1553
  }
1552
1554
  },
1553
- T
1555
+ U
1554
1556
  );
1555
1557
  }
1556
1558
  const r = Object.create(null);
@@ -1582,12 +1584,12 @@ function merge(...e) {
1582
1584
  if (n.get) Object.defineProperty(o, t, n);
1583
1585
  else o[t] = n.value;
1584
1586
  }
1585
- o[U] = n;
1587
+ o[L] = n;
1586
1588
  return o;
1587
1589
  }
1588
1590
  function omit(e, ...t) {
1589
1591
  const n = new Set(t);
1590
- if (y && P in e) {
1592
+ if (y && H in e) {
1591
1593
  return new Proxy(
1592
1594
  {
1593
1595
  get(t) {
@@ -1600,7 +1602,7 @@ function omit(e, ...t) {
1600
1602
  return Object.keys(e).filter(e => !n.has(e));
1601
1603
  }
1602
1604
  },
1603
- T
1605
+ U
1604
1606
  );
1605
1607
  }
1606
1608
  const r = {};
@@ -1622,9 +1624,9 @@ function mapArray(e, t, n) {
1622
1624
  ve: 0,
1623
1625
  Ne: e,
1624
1626
  ke: [],
1625
- Ee: t,
1626
- je: [],
1627
+ je: t,
1627
1628
  Ae: [],
1629
+ Ee: [],
1628
1630
  We: r,
1629
1631
  Pe: r || n?.keyed === false ? [] : undefined,
1630
1632
  He: t.length > 1 ? [] : undefined,
@@ -1632,19 +1634,19 @@ function mapArray(e, t, n) {
1632
1634
  })
1633
1635
  );
1634
1636
  }
1635
- const L = { pureWrite: true };
1637
+ const z = { pureWrite: true };
1636
1638
  function updateKeyedMap() {
1637
1639
  const e = this.Ne() || [],
1638
1640
  t = e.length;
1639
- e[j];
1641
+ e[E];
1640
1642
  runWithOwner(this.Ce, () => {
1641
1643
  let n,
1642
1644
  r,
1643
1645
  i = this.Pe
1644
1646
  ? () => {
1645
- this.Pe[r] = signal(e[r], L);
1646
- this.He && (this.He[r] = signal(r, L));
1647
- return this.Ee(
1647
+ this.Pe[r] = signal(e[r], z);
1648
+ this.He && (this.He[r] = signal(r, z));
1649
+ return this.je(
1648
1650
  read.bind(null, this.Pe[r]),
1649
1651
  this.He ? read.bind(null, this.He[r]) : undefined
1650
1652
  );
@@ -1652,32 +1654,32 @@ function updateKeyedMap() {
1652
1654
  : this.He
1653
1655
  ? () => {
1654
1656
  const t = e[r];
1655
- this.He[r] = signal(r, L);
1656
- return this.Ee(() => t, read.bind(null, this.He[r]));
1657
+ this.He[r] = signal(r, z);
1658
+ return this.je(() => t, read.bind(null, this.He[r]));
1657
1659
  }
1658
1660
  : () => {
1659
1661
  const t = e[r];
1660
- return this.Ee(() => t);
1662
+ return this.je(() => t);
1661
1663
  };
1662
1664
  if (t === 0) {
1663
1665
  if (this.ve !== 0) {
1664
1666
  this.Ce.dispose(false);
1665
- this.Ae = [];
1667
+ this.Ee = [];
1666
1668
  this.ke = [];
1667
- this.je = [];
1669
+ this.Ae = [];
1668
1670
  this.ve = 0;
1669
1671
  this.Pe && (this.Pe = []);
1670
1672
  this.He && (this.He = []);
1671
1673
  }
1672
- if (this.Ie && !this.je[0]) {
1673
- this.je[0] = runWithOwner((this.Ae[0] = createOwner()), this.Ie);
1674
+ if (this.Ie && !this.Ae[0]) {
1675
+ this.Ae[0] = runWithOwner((this.Ee[0] = createOwner()), this.Ie);
1674
1676
  }
1675
1677
  } else if (this.ve === 0) {
1676
- if (this.Ae[0]) this.Ae[0].dispose();
1677
- this.je = new Array(t);
1678
+ if (this.Ee[0]) this.Ee[0].dispose();
1679
+ this.Ae = new Array(t);
1678
1680
  for (r = 0; r < t; r++) {
1679
1681
  this.ke[r] = e[r];
1680
- this.je[r] = runWithOwner((this.Ae[r] = createOwner()), i);
1682
+ this.Ae[r] = runWithOwner((this.Ee[r] = createOwner()), i);
1681
1683
  }
1682
1684
  this.ve = t;
1683
1685
  } else {
@@ -1706,8 +1708,8 @@ function updateKeyedMap() {
1706
1708
  (this.ke[o] === e[u] || (this.Pe && compare(this.We, this.ke[o], e[u])));
1707
1709
  o--, u--
1708
1710
  ) {
1709
- d[u] = this.je[o];
1710
- h[u] = this.Ae[o];
1711
+ d[u] = this.Ae[o];
1712
+ h[u] = this.Ee[o];
1711
1713
  p && (p[u] = this.Pe[o]);
1712
1714
  y && (y[u] = this.He[o]);
1713
1715
  }
@@ -1725,18 +1727,18 @@ function updateKeyedMap() {
1725
1727
  f = this.We ? this.We(l) : l;
1726
1728
  r = c.get(f);
1727
1729
  if (r !== undefined && r !== -1) {
1728
- d[r] = this.je[n];
1729
- h[r] = this.Ae[n];
1730
+ d[r] = this.Ae[n];
1731
+ h[r] = this.Ee[n];
1730
1732
  p && (p[r] = this.Pe[n]);
1731
1733
  y && (y[r] = this.He[n]);
1732
1734
  r = a[r];
1733
1735
  c.set(f, r);
1734
- } else this.Ae[n].dispose();
1736
+ } else this.Ee[n].dispose();
1735
1737
  }
1736
1738
  for (r = s; r < t; r++) {
1737
1739
  if (r in d) {
1738
- this.je[r] = d[r];
1739
- this.Ae[r] = h[r];
1740
+ this.Ae[r] = d[r];
1741
+ this.Ee[r] = h[r];
1740
1742
  if (p) {
1741
1743
  this.Pe[r] = p[r];
1742
1744
  setSignal(this.Pe[r], e[r]);
@@ -1746,14 +1748,14 @@ function updateKeyedMap() {
1746
1748
  setSignal(this.He[r], r);
1747
1749
  }
1748
1750
  } else {
1749
- this.je[r] = runWithOwner((this.Ae[r] = createOwner()), i);
1751
+ this.Ae[r] = runWithOwner((this.Ee[r] = createOwner()), i);
1750
1752
  }
1751
1753
  }
1752
- this.je = this.je.slice(0, (this.ve = t));
1754
+ this.Ae = this.Ae.slice(0, (this.ve = t));
1753
1755
  this.ke = e.slice(0);
1754
1756
  }
1755
1757
  });
1756
- return this.je;
1758
+ return this.Ae;
1757
1759
  }
1758
1760
  function repeat(e, t, n) {
1759
1761
  return updateRepeat.bind({
@@ -1761,9 +1763,9 @@ function repeat(e, t, n) {
1761
1763
  ve: 0,
1762
1764
  Fe: 0,
1763
1765
  Qe: e,
1764
- Ee: t,
1766
+ je: t,
1767
+ Ee: [],
1765
1768
  Ae: [],
1766
- je: [],
1767
1769
  Re: n?.from,
1768
1770
  Ie: n?.fallback
1769
1771
  });
@@ -1775,71 +1777,71 @@ function updateRepeat() {
1775
1777
  if (e === 0) {
1776
1778
  if (this.ve !== 0) {
1777
1779
  this.Ce.dispose(false);
1780
+ this.Ee = [];
1778
1781
  this.Ae = [];
1779
- this.je = [];
1780
1782
  this.ve = 0;
1781
1783
  }
1782
- if (this.Ie && !this.je[0]) {
1783
- this.je[0] = runWithOwner((this.Ae[0] = createOwner()), this.Ie);
1784
+ if (this.Ie && !this.Ae[0]) {
1785
+ this.Ae[0] = runWithOwner((this.Ee[0] = createOwner()), this.Ie);
1784
1786
  }
1785
1787
  return;
1786
1788
  }
1787
1789
  const n = t + e;
1788
1790
  const r = this.Fe + this.ve;
1789
- if (this.ve === 0 && this.Ae[0]) this.Ae[0].dispose();
1790
- for (let e = n; e < r; e++) this.Ae[e - this.Fe].dispose();
1791
+ if (this.ve === 0 && this.Ee[0]) this.Ee[0].dispose();
1792
+ for (let e = n; e < r; e++) this.Ee[e - this.Fe].dispose();
1791
1793
  if (this.Fe < t) {
1792
1794
  let e = this.Fe;
1793
- while (e < t && e < this.ve) this.Ae[e++].dispose();
1795
+ while (e < t && e < this.ve) this.Ee[e++].dispose();
1796
+ this.Ee.splice(0, t - this.Fe);
1794
1797
  this.Ae.splice(0, t - this.Fe);
1795
- this.je.splice(0, t - this.Fe);
1796
1798
  } else if (this.Fe > t) {
1797
1799
  let n = r - this.Fe - 1;
1798
1800
  let i = this.Fe - t;
1799
- this.Ae.length = this.je.length = e;
1801
+ this.Ee.length = this.Ae.length = e;
1800
1802
  while (n >= i) {
1803
+ this.Ee[n] = this.Ee[n - i];
1801
1804
  this.Ae[n] = this.Ae[n - i];
1802
- this.je[n] = this.je[n - i];
1803
1805
  n--;
1804
1806
  }
1805
1807
  for (let e = 0; e < i; e++) {
1806
- this.je[e] = runWithOwner((this.Ae[e] = createOwner()), () => this.Ee(e + t));
1808
+ this.Ae[e] = runWithOwner((this.Ee[e] = createOwner()), () => this.je(e + t));
1807
1809
  }
1808
1810
  }
1809
1811
  for (let e = r; e < n; e++) {
1810
- this.je[e - t] = runWithOwner((this.Ae[e - t] = createOwner()), () => this.Ee(e));
1812
+ this.Ae[e - t] = runWithOwner((this.Ee[e - t] = createOwner()), () => this.je(e));
1811
1813
  }
1812
- this.je = this.je.slice(0, e);
1814
+ this.Ae = this.Ae.slice(0, e);
1813
1815
  this.Fe = t;
1814
1816
  this.ve = e;
1815
1817
  });
1816
- return this.je;
1818
+ return this.Ae;
1817
1819
  }
1818
1820
  function compare(e, t, n) {
1819
1821
  return e ? e(t) === e(n) : true;
1820
1822
  }
1821
1823
  function boundaryComputed(e, t) {
1822
1824
  const n = computed(e, undefined, {
1823
- _e: {
1825
+ Se: {
1824
1826
  le() {
1825
1827
  let e = this.$;
1826
1828
  this.$ &= ~this.Ve;
1827
1829
  if (this.Ve & f && !(this.$ & a)) {
1828
1830
  e &= ~f;
1829
1831
  }
1830
- this.ge.notify(this, this.Ve, e);
1832
+ this.we.notify(this, this.Ve, e);
1831
1833
  },
1832
1834
  Ve: t
1833
1835
  }
1834
1836
  });
1835
1837
  n.Ve = t;
1836
- n.de = true;
1838
+ n.he = true;
1837
1839
  return n;
1838
1840
  }
1839
1841
  function createBoundChildren(e, t, n, r) {
1840
- const i = e.ge;
1841
- i.addChild((e.ge = n));
1842
- onCleanup(() => i.removeChild(e.ge));
1842
+ const i = e.we;
1843
+ i.addChild((e.we = n));
1844
+ onCleanup(() => i.removeChild(e.we));
1843
1845
  return runWithOwner(e, () => {
1844
1846
  const e = computed(t);
1845
1847
  return boundaryComputed(() => staleValues(() => flatten(read(e))), r);
@@ -1877,7 +1879,7 @@ class ConditionalQueue extends Queue {
1877
1879
  }
1878
1880
  class CollectionQueue extends Queue {
1879
1881
  De;
1880
- Ae = new Set();
1882
+ Ee = new Set();
1881
1883
  qe = signal(false, { pureWrite: true });
1882
1884
  Be = false;
1883
1885
  constructor(e) {
@@ -1891,24 +1893,24 @@ class CollectionQueue extends Queue {
1891
1893
  notify(e, t, n) {
1892
1894
  if (!(t & this.De) || (this.De & f && this.Be)) return super.notify(e, t, n);
1893
1895
  if (n & this.De) {
1894
- this.Ae.add(e);
1895
- if (this.Ae.size === 1) setSignal(this.qe, true);
1896
- } else if (this.Ae.size > 0) {
1897
- this.Ae.delete(e);
1898
- if (this.Ae.size === 0) setSignal(this.qe, false);
1896
+ this.Ee.add(e);
1897
+ if (this.Ee.size === 1) setSignal(this.qe, true);
1898
+ } else if (this.Ee.size > 0) {
1899
+ this.Ee.delete(e);
1900
+ if (this.Ee.size === 0) setSignal(this.qe, false);
1899
1901
  }
1900
1902
  t &= ~this.De;
1901
1903
  return t ? super.notify(e, t, n) : true;
1902
1904
  }
1903
1905
  }
1904
- var z;
1906
+ var J;
1905
1907
  (function (e) {
1906
1908
  e["VISIBLE"] = "visible";
1907
1909
  e["HIDDEN"] = "hidden";
1908
- })(z || (z = {}));
1910
+ })(J || (J = {}));
1909
1911
  function createBoundary(e, t) {
1910
1912
  const n = createOwner();
1911
- const r = new ConditionalQueue(computed(() => t() === z.HIDDEN));
1913
+ const r = new ConditionalQueue(computed(() => t() === J.HIDDEN));
1912
1914
  const i = createBoundChildren(n, e, r, 0);
1913
1915
  computed(() => {
1914
1916
  const e = read(r.qe);
@@ -1954,10 +1956,10 @@ function collectErrorSources(e, t) {
1954
1956
  }
1955
1957
  function createErrorBoundary(e, t) {
1956
1958
  return createCollectionBoundary(c, e, e => {
1957
- let n = e.Ae.values().next().value;
1959
+ let n = e.Ee.values().next().value;
1958
1960
  return t(n.L, () => {
1959
1961
  const t = [];
1960
- for (const n of e.Ae) collectErrorSources(n, t);
1962
+ for (const n of e.Ee) collectErrorSources(n, t);
1961
1963
  for (const e of t) recompute(e);
1962
1964
  schedule();
1963
1965
  });
@@ -2012,14 +2014,13 @@ function flattenArray(e, t = [], n) {
2012
2014
  if (r) throw r;
2013
2015
  return i;
2014
2016
  }
2015
- exports.$PROXY = P;
2016
- exports.$TARGET = W;
2017
- exports.$TRACK = j;
2017
+ exports.$PROXY = H;
2018
+ exports.$TARGET = P;
2019
+ exports.$TRACK = E;
2018
2020
  exports.ContextNotFoundError = ContextNotFoundError;
2019
2021
  exports.NoOwnerError = NoOwnerError;
2020
2022
  exports.NotReadyError = NotReadyError;
2021
2023
  exports.SUPPORTS_PROXY = y;
2022
- exports.createAsync = createAsync;
2023
2024
  exports.createBoundary = createBoundary;
2024
2025
  exports.createContext = createContext;
2025
2026
  exports.createEffect = createEffect;
@@ -2044,6 +2045,7 @@ exports.getObserver = getObserver;
2044
2045
  exports.getOwner = getOwner;
2045
2046
  exports.isEqual = isEqual;
2046
2047
  exports.isPending = isPending;
2048
+ exports.isRefreshing = isRefreshing;
2047
2049
  exports.isWrappable = isWrappable;
2048
2050
  exports.mapArray = mapArray;
2049
2051
  exports.merge = merge;
@@ -2052,6 +2054,7 @@ exports.onCleanup = onCleanup;
2052
2054
  exports.onSettled = onSettled;
2053
2055
  exports.pending = pending;
2054
2056
  exports.reconcile = reconcile;
2057
+ exports.refresh = refresh;
2055
2058
  exports.repeat = repeat;
2056
2059
  exports.resolve = resolve;
2057
2060
  exports.runWithOwner = runWithOwner;