@solidjs/signals 0.9.1 → 0.9.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/node.cjs CHANGED
@@ -118,9 +118,9 @@ function adjustHeight(e, t) {
118
118
  deleteFromHeap(e, t);
119
119
  let n = e.o;
120
120
  for (let t = e.P; t; t = t.W) {
121
- const e = t.H;
122
- const r = e.I || e;
123
- if (r.F && r.o >= n) n = r.o + 1;
121
+ const e = t.I;
122
+ const r = e.F || e;
123
+ if (r.H && r.o >= n) n = r.o + 1;
124
124
  }
125
125
  if (e.o !== n) {
126
126
  e.o = n;
@@ -130,21 +130,22 @@ function adjustHeight(e, t) {
130
130
  }
131
131
  }
132
132
  const w = new Set();
133
- const _ = { l: new Array(2e3).fill(undefined), m: false, A: 0, _: 0 };
133
+ let _ = false;
134
+ const S = { l: new Array(2e3).fill(undefined), m: false, A: 0, _: 0 };
134
135
  const b = { l: new Array(2e3).fill(undefined), m: false, A: 0, _: 0 };
135
- let S = 0;
136
- let m = null;
136
+ let m = 0;
137
+ let O = null;
137
138
  let x = false;
138
139
  function schedule() {
139
140
  if (x) return;
140
141
  x = true;
141
- if (!O.R) queueMicrotask(flush);
142
+ if (!C.R) queueMicrotask(flush);
142
143
  }
143
144
  class Queue {
144
145
  i = null;
145
146
  V = [[], []];
146
147
  q = [];
147
- created = S;
148
+ created = m;
148
149
  addChild(e) {
149
150
  this.q.push(e);
150
151
  e.i = this;
@@ -201,37 +202,35 @@ class Queue {
201
202
  class GlobalQueue extends Queue {
202
203
  R = false;
203
204
  M = [];
204
- static D;
205
+ D = [];
205
206
  static B;
207
+ static T;
206
208
  flush() {
207
209
  if (this.R) return;
208
210
  this.R = true;
209
211
  try {
210
- runHeap(_, GlobalQueue.D);
211
- if (m) {
212
- if (!transitionComplete(m)) {
213
- runHeap(b, GlobalQueue.D);
212
+ runHeap(S, GlobalQueue.B);
213
+ if (O) {
214
+ if (!transitionComplete(O)) {
215
+ let e = O;
216
+ runHeap(b, GlobalQueue.B);
214
217
  this.M = [];
215
- this.stashQueues(m.queueStash);
216
- S++;
218
+ this.stashQueues(O.queueStash);
219
+ m++;
217
220
  x = false;
218
- runTransitionPending(m.pendingNodes, true);
219
- m = null;
221
+ runTransitionPending(O.pendingNodes, true);
222
+ O = null;
223
+ runOptimistic(e);
220
224
  return;
221
225
  }
222
- this.M.push(...m.pendingNodes);
223
- this.restoreQueues(m.queueStash);
224
- w.delete(m);
225
- m = null;
226
+ this.M.push(...O.pendingNodes);
227
+ this.restoreQueues(O.queueStash);
228
+ w.delete(O);
229
+ O = null;
226
230
  runTransitionPending(this.M, false);
227
- _._ >= _.A && runHeap(_, GlobalQueue.D);
228
- } else if (w.size) runHeap(b, GlobalQueue.D);
229
- runPending(this.M);
230
- while (_._ >= _.A) {
231
- runHeap(_, GlobalQueue.D);
232
- runPending(this.M);
233
- }
234
- S++;
231
+ } else if (w.size) runHeap(b, GlobalQueue.B);
232
+ runOptimistic();
233
+ m++;
235
234
  x = false;
236
235
  this.run(d);
237
236
  this.run(h);
@@ -242,8 +241,8 @@ class GlobalQueue extends Queue {
242
241
  notify(e, t, n) {
243
242
  if (t & f) {
244
243
  if (n & f) {
245
- if (m && !m.asyncNodes.includes(e.T.cause)) {
246
- m.asyncNodes.push(e.T.cause);
244
+ if (O && !O.asyncNodes.includes(e.K.cause)) {
245
+ O.asyncNodes.push(e.K.cause);
247
246
  schedule();
248
247
  }
249
248
  }
@@ -252,30 +251,70 @@ class GlobalQueue extends Queue {
252
251
  return false;
253
252
  }
254
253
  initTransition(e) {
255
- if (m && m.time === S) return;
256
- if (!m) {
257
- m = e.K ?? { time: S, pendingNodes: [], asyncNodes: [], queueStash: { V: [[], []], q: [] } };
254
+ if (O && O.time === m) return;
255
+ if (!O) {
256
+ O = e.G ?? {
257
+ time: m,
258
+ pendingNodes: [],
259
+ asyncNodes: [],
260
+ optimisticNodes: [],
261
+ queueStash: { V: [[], []], q: [] },
262
+ done: false
263
+ };
258
264
  }
259
- w.add(m);
260
- m.time = S;
265
+ w.add(O);
266
+ O.time = m;
261
267
  for (let e = 0; e < this.M.length; e++) {
262
268
  const t = this.M[e];
263
- t.K = m;
264
- m.pendingNodes.push(t);
269
+ t.G = O;
270
+ O.pendingNodes.push(t);
265
271
  }
266
- this.M = m.pendingNodes;
272
+ for (let e = 0; e < this.D.length; e++) {
273
+ const t = this.D[e];
274
+ t.G = O;
275
+ O.optimisticNodes.push(t);
276
+ }
277
+ this.M = O.pendingNodes;
278
+ this.D = O.optimisticNodes;
279
+ }
280
+ }
281
+ function notifySubs(e) {
282
+ for (let t = e.O; t !== null; t = t.C) {
283
+ const e = t.N.S & o ? b : S;
284
+ if (e.A > t.N.o) e.A = t.N.o;
285
+ insertIntoHeap(t.N, e);
286
+ }
287
+ }
288
+ function runOptimistic(e = null) {
289
+ let t = !e;
290
+ const n = C.D;
291
+ _ = true;
292
+ for (let t = 0; t < n.length; t++) {
293
+ const r = n[t];
294
+ if (!e && (!r.G || r.G.done) && r.U !== p) {
295
+ r.L = r.U;
296
+ r.U = p;
297
+ }
298
+ r.G = e;
299
+ notifySubs(r);
300
+ }
301
+ C.D = [];
302
+ if (S._ >= S.A) {
303
+ t = true;
304
+ runHeap(S, GlobalQueue.B);
267
305
  }
306
+ _ = false;
307
+ t && runPending(C.M);
268
308
  }
269
309
  function runPending(e) {
270
310
  for (let t = 0; t < e.length; t++) {
271
311
  const n = e[t];
272
- if (n.G !== p) {
273
- n.U = n.G;
274
- n.G = p;
275
- if (n.L) n.J = true;
312
+ if (n.U !== p) {
313
+ n.L = n.U;
314
+ n.U = p;
315
+ if (n.J) n.X = true;
276
316
  }
277
- if (n.X && n.X.G !== p) n.X.Y(n.X.G);
278
- if (n.F) GlobalQueue.B(n, false, true);
317
+ if (n.H) GlobalQueue.T(n, false, true);
279
318
  }
280
319
  e.length = 0;
281
320
  }
@@ -283,24 +322,21 @@ function runTransitionPending(e, t) {
283
322
  const n = e.slice();
284
323
  for (let e = 0; e < n.length; e++) {
285
324
  const r = n[e];
286
- r.K = m;
287
- if (r.Z) r.Z.Y(t);
288
- if (r.X && r.X.G !== p) {
289
- r.X.Y(r.X.G);
290
- r.X.G = p;
291
- }
325
+ r.G = O;
326
+ if (r.Y) r.Y.Z(t);
292
327
  }
293
328
  }
294
- const O = new GlobalQueue();
329
+ const C = new GlobalQueue();
295
330
  function flush() {
296
331
  while (x) {
297
- O.flush();
332
+ C.flush();
298
333
  }
299
334
  }
300
335
  function runQueue(e, t) {
301
336
  for (let n = 0; n < e.length; n++) e[n](t);
302
337
  }
303
338
  function transitionComplete(e) {
339
+ if (e.done) return true;
304
340
  let t = true;
305
341
  for (let n = 0; n < e.asyncNodes.length; n++) {
306
342
  if (e.asyncNodes[n].$ & f) {
@@ -308,35 +344,29 @@ function transitionComplete(e) {
308
344
  break;
309
345
  }
310
346
  }
347
+ t && (e.done = true);
311
348
  return t;
312
349
  }
313
350
  function runInTransition(e, t) {
314
- const n = m;
315
- m = e.K;
351
+ const n = O;
352
+ O = e.G;
316
353
  t(e);
317
- m = n;
354
+ O = n;
318
355
  }
319
- GlobalQueue.D = recompute;
320
- GlobalQueue.B = disposeChildren;
321
- let C = false;
322
- let v = false;
356
+ GlobalQueue.B = recompute;
357
+ GlobalQueue.T = disposeChildren;
323
358
  let N = false;
324
- let k = null;
325
- let j = false;
326
- let A = null;
327
- function notifySubs(e) {
328
- for (let t = e.O; t !== null; t = t.C) {
329
- const e = t.N.S & o ? b : _;
330
- if (e.A > t.N.o) e.A = t.N.o;
331
- insertIntoHeap(t.N, e);
332
- }
333
- }
359
+ let v = false;
360
+ let k = false;
361
+ let j = null;
362
+ let A = false;
363
+ let E = null;
334
364
  function recompute(t, n = false) {
335
- const i = t.L && t.K != m;
365
+ const i = t.J && t.G != O;
336
366
  if (!n) {
337
- if (t.K && m !== t.K && !i) O.initTransition(t);
338
- deleteFromHeap(t, t.S & o ? b : _);
339
- if (t.K) disposeChildren(t);
367
+ if (t.G && O !== t.G && !i) C.initTransition(t);
368
+ deleteFromHeap(t, t.S & o ? b : S);
369
+ if (t.G) disposeChildren(t);
340
370
  else {
341
371
  markDisposal(t);
342
372
  t.ee = t.te;
@@ -345,20 +375,20 @@ function recompute(t, n = false) {
345
375
  t.re = null;
346
376
  }
347
377
  }
348
- const s = A;
349
- A = t;
378
+ const s = E;
379
+ E = t;
350
380
  t.ie = null;
351
381
  t.S = r;
352
- t.se = S;
353
- let u = t.G === p ? t.U : t.G;
382
+ t.se = m;
383
+ let u = t.U === p || (t.oe && t.G) ? t.L : t.U;
354
384
  let d = t.o;
355
385
  let h = t.$;
356
- let y = t.T;
357
- let g = C;
386
+ let y = t.K;
387
+ let g = N;
358
388
  setStatusFlags(t, l | (h & a));
359
- C = true;
389
+ N = true;
360
390
  try {
361
- u = handleAsync(t, t.F(u));
391
+ u = handleAsync(t, t.H(u));
362
392
  t.$ &= ~a;
363
393
  } catch (e) {
364
394
  if (e instanceof NotReadyError) {
@@ -366,10 +396,10 @@ function recompute(t, n = false) {
366
396
  setStatusFlags(t, (h & ~c) | f, e);
367
397
  } else setStatusFlags(t, c, e);
368
398
  } finally {
369
- C = g;
399
+ N = g;
370
400
  }
371
401
  t.S = e;
372
- A = s;
402
+ E = s;
373
403
  if (!(t.$ & f)) {
374
404
  const e = t.ie;
375
405
  let n = e !== null ? e.W : t.P;
@@ -381,48 +411,45 @@ function recompute(t, n = false) {
381
411
  else t.P = null;
382
412
  }
383
413
  }
384
- const w = !t.oe || !t.oe(t.G === p || t.ue || i ? t.U : t.G, u);
385
- const x = t.$ !== h || t.T !== y;
414
+ const w = !t.ue || !t.ue(t.U === p || t.oe || i ? t.L : t.U, u);
415
+ const x = t.$ !== h || t.K !== y;
386
416
  t.le?.(x, h);
387
417
  if (w || x) {
388
418
  if (w) {
389
- if (n || t.ue || i) t.U = u;
390
- else t.G = u;
391
- if (t.X) t.X.G = u;
392
- }
393
- for (let e = t.O; e !== null; e = e.C) {
394
- const n = e.N.S & o ? b : _;
395
- if (e.N.o < t.o && n.A > e.N.o) n.A = e.N.o;
396
- insertIntoHeap(e.N, n);
419
+ if (n || t.oe || i) t.L = u;
420
+ else t.U = u;
421
+ if (t.fe) setSignal(t.fe, u);
397
422
  }
423
+ (!t.oe || _) && notifySubs(t);
398
424
  } else if (t.o != d) {
399
425
  for (let e = t.O; e !== null; e = e.C) {
400
- insertIntoHeapHeight(e.N, e.N.S & o ? b : _);
426
+ insertIntoHeapHeight(e.N, e.N.S & o ? b : S);
401
427
  }
402
428
  }
403
- if ((!n || t.$ & f) && !t.ue && !t.K) O.M.push(t);
404
- if (t.K && i) runInTransition(t, recompute);
429
+ t.oe && !_ && C.D.push(t);
430
+ (!n || t.$ & f) && !t.G && C.M.push(t);
431
+ t.G && i && runInTransition(t, recompute);
405
432
  }
406
433
  function handleAsync(e, t, n) {
407
434
  const r = typeof t === "object" && t !== null;
408
435
  const i = r && t instanceof Promise;
409
436
  const s = r && untrack(() => t[Symbol.asyncIterator]);
410
437
  if (!i && !s) {
411
- e.fe = null;
438
+ e.ce = null;
412
439
  return t;
413
440
  }
414
- e.fe = t;
441
+ e.ce = t;
415
442
  if (i) {
416
443
  t.then(r => {
417
- if (e.fe !== t) return;
418
- O.initTransition(e);
444
+ if (e.ce !== t) return;
445
+ C.initTransition(e);
419
446
  n?.(r) ?? setSignal(e, () => r);
420
447
  flush();
421
448
  }).catch(n => {
422
- if (e.fe !== t) return;
423
- O.initTransition(e);
449
+ if (e.ce !== t) return;
450
+ C.initTransition(e);
424
451
  setStatusFlags(e, c, n);
425
- e.se = S;
452
+ e.se = m;
426
453
  notifySubs(e);
427
454
  schedule();
428
455
  flush();
@@ -431,31 +458,31 @@ function handleAsync(e, t, n) {
431
458
  (async () => {
432
459
  try {
433
460
  for await (let r of t) {
434
- if (e.fe !== t) return;
435
- O.initTransition(e);
461
+ if (e.ce !== t) return;
462
+ C.initTransition(e);
436
463
  n?.(r) ?? setSignal(e, () => r);
437
464
  flush();
438
465
  }
439
466
  } catch (n) {
440
- if (e.fe !== t) return;
441
- O.initTransition(e);
467
+ if (e.ce !== t) return;
468
+ C.initTransition(e);
442
469
  setStatusFlags(e, c, n);
443
- e.se = S;
470
+ e.se = m;
444
471
  notifySubs(e);
445
472
  schedule();
446
473
  flush();
447
474
  }
448
475
  })();
449
476
  }
450
- O.initTransition(e);
451
- throw new NotReadyError(A);
477
+ C.initTransition(e);
478
+ throw new NotReadyError(E);
452
479
  }
453
480
  function updateIfNecessary(r) {
454
481
  if (r.S & t) {
455
482
  for (let e = r.P; e; e = e.W) {
456
- const t = e.H;
457
- const i = t.I || t;
458
- if (i.F) {
483
+ const t = e.I;
484
+ const i = t.F || t;
485
+ if (i.H) {
459
486
  updateIfNecessary(i);
460
487
  }
461
488
  if (r.S & n) {
@@ -469,24 +496,24 @@ function updateIfNecessary(r) {
469
496
  r.S = e;
470
497
  }
471
498
  function unlinkSubs(e) {
472
- const t = e.H;
499
+ const t = e.I;
473
500
  const n = e.W;
474
501
  const r = e.C;
475
- const i = e.ce;
476
- if (r !== null) r.ce = i;
477
- else t.ae = i;
502
+ const i = e.ae;
503
+ if (r !== null) r.ae = i;
504
+ else t.de = i;
478
505
  if (i !== null) i.C = r;
479
506
  else {
480
507
  t.O = r;
481
508
  if (r === null) {
482
- t.de?.();
483
- t.F && !t.he && unobserved(t);
509
+ t.he?.();
510
+ t.H && !t.pe && unobserved(t);
484
511
  }
485
512
  }
486
513
  return n;
487
514
  }
488
515
  function unobserved(e) {
489
- deleteFromHeap(e, e.S & o ? b : _);
516
+ deleteFromHeap(e, e.S & o ? b : S);
490
517
  let t = e.P;
491
518
  while (t !== null) {
492
519
  t = unlinkSubs(t);
@@ -496,19 +523,19 @@ function unobserved(e) {
496
523
  }
497
524
  function link(e, t) {
498
525
  const n = t.ie;
499
- if (n !== null && n.H === e) return;
526
+ if (n !== null && n.I === e) return;
500
527
  let i = null;
501
528
  const s = t.S & r;
502
529
  if (s) {
503
530
  i = n !== null ? n.W : t.P;
504
- if (i !== null && i.H === e) {
531
+ if (i !== null && i.I === e) {
505
532
  t.ie = i;
506
533
  return;
507
534
  }
508
535
  }
509
- const o = e.ae;
536
+ const o = e.de;
510
537
  if (o !== null && o.N === t && (!s || isValidLink(o, t))) return;
511
- const u = (t.ie = e.ae = { H: e, N: t, W: i, ce: o, C: null });
538
+ const u = (t.ie = e.de = { I: e, N: t, W: i, ae: o, C: null });
512
539
  if (n !== null) n.W = u;
513
540
  else t.P = u;
514
541
  if (o !== null) o.C = u;
@@ -528,18 +555,18 @@ function isValidLink(e, t) {
528
555
  }
529
556
  function setStatusFlags(e, t, n = null) {
530
557
  e.$ = t;
531
- e.T = n;
558
+ e.K = n;
532
559
  }
533
560
  function markDisposal(e) {
534
561
  let t = e.re;
535
562
  while (t) {
536
563
  t.S |= o;
537
564
  if (t.S & i) {
538
- deleteFromHeap(t, _);
565
+ deleteFromHeap(t, S);
539
566
  insertIntoHeap(t, b);
540
567
  }
541
568
  markDisposal(t);
542
- t = t.pe;
569
+ t = t.ye;
543
570
  }
544
571
  }
545
572
  function dispose(e) {
@@ -556,10 +583,10 @@ function disposeChildren(e, t = false, n) {
556
583
  if (t) e.S = u;
557
584
  let r = n ? e.ne : e.re;
558
585
  while (r) {
559
- const e = r.pe;
586
+ const e = r.ye;
560
587
  if (r.P) {
561
588
  const e = r;
562
- deleteFromHeap(e, e.S & o ? b : _);
589
+ deleteFromHeap(e, e.S & o ? b : S);
563
590
  let t = e.P;
564
591
  do {
565
592
  t = unlinkSubs(t);
@@ -574,7 +601,7 @@ function disposeChildren(e, t = false, n) {
574
601
  e.ne = null;
575
602
  } else {
576
603
  e.re = null;
577
- e.pe = null;
604
+ e.ye = null;
578
605
  }
579
606
  runDisposal(e, n);
580
607
  }
@@ -592,7 +619,7 @@ function runDisposal(e, t) {
592
619
  t ? (e.ee = null) : (e.te = null);
593
620
  }
594
621
  function getNextChildId(e) {
595
- if (e.id != null) return formatId(e.id, e.ye++);
622
+ if (e.id != null) return formatId(e.id, e.ge++);
596
623
  throw new Error("Cannot get child id from owner without an id");
597
624
  }
598
625
  function formatId(e, t) {
@@ -602,16 +629,16 @@ function formatId(e, t) {
602
629
  }
603
630
  function computed(t, n, r) {
604
631
  const i = {
605
- id: r?.id ?? (A?.id != null ? getNextChildId(A) : undefined),
606
- oe: r?.equals != null ? r.equals : isEqual,
607
- ge: !!r?.pureWrite,
608
- de: r?.unobserved,
632
+ id: r?.id ?? (E?.id != null ? getNextChildId(E) : undefined),
633
+ ue: r?.equals != null ? r.equals : isEqual,
634
+ we: !!r?.pureWrite,
635
+ he: r?.unobserved,
609
636
  te: null,
610
- we: A?.we ?? O,
611
- _e: A?._e ?? g,
612
- ye: 0,
613
- F: t,
614
- U: n,
637
+ _e: E?._e ?? C,
638
+ Se: E?.Se ?? g,
639
+ ge: 0,
640
+ H: t,
641
+ L: n,
615
642
  o: 0,
616
643
  k: null,
617
644
  p: undefined,
@@ -619,49 +646,49 @@ function computed(t, n, r) {
619
646
  P: null,
620
647
  ie: null,
621
648
  O: null,
622
- ae: null,
623
- i: A,
624
- pe: null,
649
+ de: null,
650
+ i: E,
651
+ ye: null,
625
652
  re: null,
626
653
  S: e,
627
654
  $: a,
628
- se: S,
629
- G: p,
655
+ se: m,
656
+ U: p,
630
657
  ee: null,
631
658
  ne: null,
632
- fe: null,
633
- K: null
659
+ ce: null,
660
+ G: null
634
661
  };
635
662
  if (r?.be) Object.assign(i, r.be);
636
663
  i.h = i;
637
- const s = A?.t ? A.u : A;
638
- if (A) {
639
- const e = A.re;
664
+ const s = E?.t ? E.u : E;
665
+ if (E) {
666
+ const e = E.re;
640
667
  if (e === null) {
641
- A.re = i;
668
+ E.re = i;
642
669
  } else {
643
- i.pe = e;
644
- A.re = i;
670
+ i.ye = e;
671
+ E.re = i;
645
672
  }
646
673
  }
647
674
  if (s) i.o = s.o + 1;
648
- recompute(i, true);
675
+ !r?.lazy && recompute(i, true);
649
676
  return i;
650
677
  }
651
678
  function signal(e, t, n = null) {
652
679
  const r = {
653
- id: t?.id ?? (A?.id != null ? getNextChildId(A) : undefined),
654
- oe: t?.equals != null ? t.equals : isEqual,
655
- ge: !!t?.pureWrite,
656
- de: t?.unobserved,
657
- U: e,
680
+ id: t?.id ?? (E?.id != null ? getNextChildId(E) : undefined),
681
+ ue: t?.equals != null ? t.equals : isEqual,
682
+ we: !!t?.pureWrite,
683
+ he: t?.unobserved,
684
+ L: e,
658
685
  O: null,
659
- ae: null,
686
+ de: null,
660
687
  $: l,
661
- se: S,
662
- I: n,
688
+ se: m,
689
+ F: n,
663
690
  j: n?.k || null,
664
- G: p
691
+ U: p
665
692
  };
666
693
  n && (n.k = r);
667
694
  return r;
@@ -670,27 +697,27 @@ function isEqual(e, t) {
670
697
  return e === t;
671
698
  }
672
699
  function untrack(e) {
673
- if (!C) return e();
674
- C = false;
700
+ if (!N) return e();
701
+ N = false;
675
702
  try {
676
703
  return e();
677
704
  } finally {
678
- C = true;
705
+ N = true;
679
706
  }
680
707
  }
681
708
  function read(e) {
682
- let t = A;
709
+ let t = E;
683
710
  if (t?.t) t = t.u;
684
- if (j && e.F) recompute(e);
685
- if (t && C && !k && !N) {
686
- if (e.F && e.S & u) recompute(e);
711
+ if (A && e.H) recompute(e);
712
+ if (t && N && !j && !k) {
713
+ if (e.H && e.S & u) recompute(e);
687
714
  link(e, t);
688
- const n = e.I || e;
689
- if (n.F) {
715
+ const n = e.F || e;
716
+ if (n.H) {
690
717
  const r = e.S & o;
691
- if (n.o >= (r ? b.A : _.A)) {
718
+ if (n.o >= (r ? b.A : S.A)) {
692
719
  markNode(t);
693
- markHeap(r ? b : _);
720
+ markHeap(r ? b : S);
694
721
  updateIfNecessary(n);
695
722
  }
696
723
  const i = n.o;
@@ -699,75 +726,74 @@ function read(e) {
699
726
  }
700
727
  }
701
728
  }
702
- if (k) {
703
- if (!e.Z) {
704
- e.Z = signal(false);
705
- e.Z.ue = true;
706
- e.Z.Y = t => setSignal(e.Z, t);
707
- }
708
- const t = k;
709
- k = null;
710
- t.U = read(e.Z) || t.U;
711
- k = t;
729
+ if (j) {
730
+ if (!e.Y) {
731
+ e.Y = signal(false);
732
+ e.Y.oe = true;
733
+ e.Y.Z = t => setSignal(e.Y, t);
734
+ }
735
+ const t = j;
736
+ j = null;
737
+ t.L = read(e.Y) || t.L;
738
+ j = t;
712
739
  }
713
- if (N) {
714
- if (!e.X) {
715
- e.X = signal(e.U);
716
- e.X.ue = true;
717
- e.X.Y = t => setSignal(e.X, t);
740
+ if (k) {
741
+ if (!e.fe) {
742
+ e.fe = signal(e.L);
743
+ e.fe.oe = true;
718
744
  }
719
- N = false;
745
+ k = false;
720
746
  try {
721
- return read(e.X);
747
+ return read(e.fe);
722
748
  } finally {
723
- N = true;
749
+ k = true;
724
750
  }
725
751
  }
726
- if (e.$ & f && !k) {
727
- if ((t && !v) || e.$ & a) throw e.T;
752
+ if (e.$ & f && !j) {
753
+ if ((t && !v) || e.$ & a) throw e.K;
728
754
  else if (t && v) {
729
- setStatusFlags(t, t.$ | 1, e.T);
755
+ setStatusFlags(t, t.$ | 1, e.K);
730
756
  }
731
757
  }
732
758
  if (e.$ & c) {
733
- if (e.se < S) {
759
+ if (e.se < m) {
734
760
  recompute(e, true);
735
761
  return read(e);
736
762
  } else {
737
- throw e.T;
763
+ throw e.K;
738
764
  }
739
765
  }
740
- return !t || e.ue || e.G === p || (v && !k && e.K && m !== e.K) ? e.U : e.G;
766
+ return !t || e.oe || e.U === p || (v && !j && (t.oe || (e.G && O !== e.G))) ? e.L : e.U;
741
767
  }
742
768
  function setSignal(e, t) {
743
769
  if (typeof t === "function") {
744
- t = t(e.G === p ? e.U : e.G);
770
+ t = t(e.U === p || (e.oe && e.G) ? e.L : e.U);
745
771
  }
746
- const n = !e.oe || !e.oe(e.G === p || e.ue ? e.U : e.G, t);
772
+ const n = !e.ue || !e.ue(e.U === p || e.oe ? e.L : e.U, t);
747
773
  if (!n && !e.$) return t;
748
774
  if (n) {
749
- if (e.ue) e.U = t;
775
+ if (e.oe) e.L = t;
750
776
  else {
751
- if (e.G === p) O.M.push(e);
752
- e.G = t;
777
+ if (e.U === p) C.M.push(e);
778
+ e.U = t;
753
779
  }
754
- if (e.X) e.X.G = t;
780
+ if (e.fe) setSignal(e.fe, t);
755
781
  }
756
782
  setStatusFlags(e, l);
757
- e.se = S;
758
- notifySubs(e);
783
+ e.se = m;
784
+ e.oe && !_ ? C.D.push(e) : notifySubs(e);
759
785
  schedule();
760
786
  return t;
761
787
  }
762
788
  function getObserver() {
763
- return C ? A : null;
789
+ return N ? E : null;
764
790
  }
765
791
  function getOwner() {
766
- return A;
792
+ return E;
767
793
  }
768
794
  function onCleanup(e) {
769
- if (!A) return e;
770
- const t = A;
795
+ if (!E) return e;
796
+ const t = E;
771
797
  if (!t.te) {
772
798
  t.te = e;
773
799
  } else if (Array.isArray(t.te)) {
@@ -778,17 +804,17 @@ function onCleanup(e) {
778
804
  return e;
779
805
  }
780
806
  function createOwner(e) {
781
- const t = A;
807
+ const t = E;
782
808
  const n = {
783
809
  t: true,
784
810
  u: t?.t ? t.u : t,
785
811
  re: null,
786
- pe: null,
812
+ ye: null,
787
813
  te: null,
788
814
  id: e?.id ?? (t?.id != null ? getNextChildId(t) : undefined),
789
- we: t?.we ?? O,
790
- _e: t?._e || g,
791
- ye: 0,
815
+ _e: t?._e ?? C,
816
+ Se: t?.Se || g,
817
+ ge: 0,
792
818
  ee: null,
793
819
  ne: null,
794
820
  i: t,
@@ -801,7 +827,7 @@ function createOwner(e) {
801
827
  if (e === null) {
802
828
  t.re = n;
803
829
  } else {
804
- n.pe = e;
830
+ n.ye = e;
805
831
  t.re = n;
806
832
  }
807
833
  }
@@ -812,12 +838,12 @@ function createRoot(e, t) {
812
838
  return runWithOwner(n, () => e(n.dispose));
813
839
  }
814
840
  function runWithOwner(e, t) {
815
- const n = A;
816
- A = e;
841
+ const n = E;
842
+ E = e;
817
843
  try {
818
844
  return t();
819
845
  } finally {
820
- A = n;
846
+ E = n;
821
847
  }
822
848
  }
823
849
  function staleValues(e, t = true) {
@@ -830,34 +856,34 @@ function staleValues(e, t = true) {
830
856
  }
831
857
  }
832
858
  function pending(e) {
833
- const t = N;
834
- N = true;
859
+ const t = k;
860
+ k = true;
835
861
  try {
836
862
  return staleValues(e, false);
837
863
  } finally {
838
- N = t;
864
+ k = t;
839
865
  }
840
866
  }
841
867
  function isPending(e) {
842
- const t = k;
843
- k = { U: false };
868
+ const t = j;
869
+ j = { L: false };
844
870
  try {
845
871
  staleValues(e);
846
- return k.U;
872
+ return j.L;
847
873
  } catch (e) {
848
874
  if (!(e instanceof NotReadyError)) return false;
849
875
  throw e;
850
876
  } finally {
851
- k = t;
877
+ j = t;
852
878
  }
853
879
  }
854
880
  function refresh(e) {
855
- let t = j;
856
- j = true;
881
+ let t = A;
882
+ A = true;
857
883
  try {
858
884
  return untrack(e);
859
885
  } finally {
860
- j = t;
886
+ A = t;
861
887
  if (!t) {
862
888
  schedule();
863
889
  flush();
@@ -865,7 +891,7 @@ function refresh(e) {
865
891
  }
866
892
  }
867
893
  function isRefreshing() {
868
- return j;
894
+ return A;
869
895
  }
870
896
  function createContext(e, t) {
871
897
  return { id: Symbol(t), defaultValue: e };
@@ -874,7 +900,7 @@ function getContext(e, t = getOwner()) {
874
900
  if (!t) {
875
901
  throw new NoOwnerError();
876
902
  }
877
- const n = hasContext(e, t) ? t._e[e.id] : e.defaultValue;
903
+ const n = hasContext(e, t) ? t.Se[e.id] : e.defaultValue;
878
904
  if (isUndefined(n)) {
879
905
  throw new ContextNotFoundError();
880
906
  }
@@ -884,10 +910,10 @@ function setContext(e, t, n = getOwner()) {
884
910
  if (!n) {
885
911
  throw new NoOwnerError();
886
912
  }
887
- n._e = { ...n._e, [e.id]: isUndefined(t) ? e.defaultValue : t };
913
+ n.Se = { ...n.Se, [e.id]: isUndefined(t) ? e.defaultValue : t };
888
914
  }
889
915
  function hasContext(e, t) {
890
- return !isUndefined(t?._e[e.id]);
916
+ return !isUndefined(t?.Se[e.id]);
891
917
  }
892
918
  function isUndefined(e) {
893
919
  return typeof e === "undefined";
@@ -897,58 +923,58 @@ function effect(e, t, n, r, i) {
897
923
  const o = computed(e, r, {
898
924
  ...i,
899
925
  be: {
900
- J: true,
901
- Se: r,
902
- me: t,
926
+ X: true,
927
+ me: r,
928
+ Oe: t,
903
929
  xe: n,
904
- Oe: undefined,
905
- L: i?.render ? d : h,
930
+ Ce: undefined,
931
+ J: i?.render ? d : h,
906
932
  le(e, t) {
907
933
  if (s) {
908
934
  const n = this.$ && this.$ === t && e;
909
- this.J = !(this.$ & c) && !(this.$ & f & ~t) && !n;
910
- if (this.J) this.we.enqueue(this.L, runEffect.bind(this));
935
+ this.X = !(this.$ & c) && !(this.$ & f & ~t) && !n;
936
+ if (this.X) this._e.enqueue(this.J, runEffect.bind(this));
911
937
  }
912
938
  if (this.$ & c) {
913
- let e = this.T;
914
- this.we.notify(this, f, 0);
915
- if (this.L === h) {
939
+ let e = this.K;
940
+ this._e.notify(this, f, 0);
941
+ if (this.J === h) {
916
942
  try {
917
943
  return this.xe
918
944
  ? this.xe(e, () => {
919
- this.Oe?.();
920
- this.Oe = undefined;
945
+ this.Ce?.();
946
+ this.Ce = undefined;
921
947
  })
922
948
  : console.error(e);
923
949
  } catch (t) {
924
950
  e = t;
925
951
  }
926
952
  }
927
- if (!this.we.notify(this, c, c)) throw e;
928
- } else if (this.L === d) {
929
- this.we.notify(this, f | c, this.$);
953
+ if (!this._e.notify(this, c, c)) throw e;
954
+ } else if (this.J === d) {
955
+ this._e.notify(this, f | c, this.$);
930
956
  }
931
957
  }
932
958
  }
933
959
  });
934
960
  s = true;
935
- if (o.L === d) o.F = t => staleValues(() => e(t));
961
+ if (o.J === d) o.H = t => staleValues(() => e(t));
936
962
  !i?.defer &&
937
963
  !(o.$ & (c | f)) &&
938
- (o.L === h ? o.we.enqueue(o.L, runEffect.bind(o)) : runEffect.call(o));
939
- onCleanup(() => o.Oe?.());
964
+ (o.J === h ? o._e.enqueue(o.J, runEffect.bind(o)) : runEffect.call(o));
965
+ onCleanup(() => o.Ce?.());
940
966
  }
941
967
  function runEffect() {
942
- if (!this.J || this.S & u) return;
943
- this.Oe?.();
944
- this.Oe = undefined;
968
+ if (!this.X || this.S & u) return;
969
+ this.Ce?.();
970
+ this.Ce = undefined;
945
971
  try {
946
- this.Oe = this.me(this.U, this.Se);
972
+ this.Ce = this.Oe(this.L, this.me);
947
973
  } catch (e) {
948
- if (!this.we.notify(this, c, c)) throw e;
974
+ if (!this._e.notify(this, c, c)) throw e;
949
975
  } finally {
950
- this.Se = this.U;
951
- this.J = false;
976
+ this.me = this.L;
977
+ this.X = false;
952
978
  }
953
979
  }
954
980
  function createSignal(e, t, n) {
@@ -1008,19 +1034,42 @@ function resolve(e) {
1008
1034
  });
1009
1035
  }
1010
1036
  function createOptimistic(e, t, n) {
1011
- return {};
1037
+ if (typeof e === "function") {
1038
+ const r = computed(
1039
+ t => {
1040
+ let n = r || getOwner();
1041
+ n.U = e(t);
1042
+ return t;
1043
+ },
1044
+ t,
1045
+ n
1046
+ );
1047
+ r.oe = true;
1048
+ return [read.bind(null, r), setSignal.bind(null, r)];
1049
+ }
1050
+ const r = getOwner();
1051
+ const i = r?.id != null;
1052
+ const s = signal(e, i ? { id: getNextChildId(r), ...t } : t);
1053
+ s.oe = true;
1054
+ return [
1055
+ read.bind(null, s),
1056
+ t => {
1057
+ s.U = e;
1058
+ return setSignal(s, t);
1059
+ }
1060
+ ];
1012
1061
  }
1013
1062
  function onSettled(e) {
1014
1063
  let t;
1015
1064
  const n = getOwner();
1016
1065
  if (n) onCleanup(() => t?.());
1017
- O.enqueue(h, () => {
1066
+ C.enqueue(h, () => {
1018
1067
  t = e();
1019
1068
  !n && t?.();
1020
1069
  });
1021
1070
  }
1022
1071
  function unwrap(e) {
1023
- return e?.[W]?.[V] ?? e;
1072
+ return e?.[I]?.[q] ?? e;
1024
1073
  }
1025
1074
  function getOverrideValue(e, t, n, r) {
1026
1075
  return n && r in n ? read(n[r]) : t && r in t ? t[r] : e[r];
@@ -1031,15 +1080,15 @@ function getAllKeys(e, t, n) {
1031
1080
  return Array.from(new Set([...r, ...i]));
1032
1081
  }
1033
1082
  function applyState(e, t, n, r) {
1034
- const i = t?.[W];
1083
+ const i = t?.[I];
1035
1084
  if (!i) return;
1036
- const s = i[Q];
1037
- const o = i[R];
1038
- let u = i[V];
1085
+ const s = i[R];
1086
+ const o = i[V];
1087
+ let u = i[q];
1039
1088
  if (e === s && !o) return;
1040
- (i[D] || T).set(e, i[H]);
1041
- i[Q] = e;
1042
- i[R] = undefined;
1089
+ (i[B] || K).set(e, i[F]);
1090
+ i[R] = e;
1091
+ i[V] = undefined;
1043
1092
  if (Array.isArray(s)) {
1044
1093
  let t = false;
1045
1094
  const l = getOverrideValue(s, o, u, "length");
@@ -1066,16 +1115,16 @@ function applyState(e, t, n, r) {
1066
1115
  if (a > h || a > d) {
1067
1116
  for (c = a; c <= h; c++) {
1068
1117
  t = true;
1069
- i[V][c] && setSignal(i[V][c], wrap(e[c], i));
1118
+ i[q][c] && setSignal(i[q][c], wrap(e[c], i));
1070
1119
  }
1071
1120
  for (; c < e.length; c++) {
1072
1121
  t = true;
1073
1122
  const s = wrap(w[c], i);
1074
- i[V][c] && setSignal(i[V][c], s);
1123
+ i[q][c] && setSignal(i[q][c], s);
1075
1124
  applyState(e[c], s, n, r);
1076
1125
  }
1077
- t && i[V][E] && setSignal(i[V][E], void 0);
1078
- l !== e.length && i[V].length && setSignal(i[V].length, e.length);
1126
+ t && i[q][P] && setSignal(i[q][P], void 0);
1127
+ l !== e.length && i[q].length && setSignal(i[q].length, e.length);
1079
1128
  return;
1080
1129
  }
1081
1130
  y = new Array(h + 1);
@@ -1099,9 +1148,9 @@ function applyState(e, t, n, r) {
1099
1148
  for (c = a; c < e.length; c++) {
1100
1149
  if (c in w) {
1101
1150
  const t = wrap(w[c], i);
1102
- i[V][c] && setSignal(i[V][c], t);
1151
+ i[q][c] && setSignal(i[q][c], t);
1103
1152
  applyState(e[c], t, n, r);
1104
- } else i[V][c] && setSignal(i[V][c], wrap(e[c], i));
1153
+ } else i[q][c] && setSignal(i[q][c], wrap(e[c], i));
1105
1154
  }
1106
1155
  if (a < e.length) t = true;
1107
1156
  } else if (l && e.length) {
@@ -1112,13 +1161,13 @@ function applyState(e, t, n, r) {
1112
1161
  }
1113
1162
  if (l !== e.length) {
1114
1163
  t = true;
1115
- i[V].length && setSignal(i[V].length, e.length);
1164
+ i[q].length && setSignal(i[q].length, e.length);
1116
1165
  }
1117
- t && i[V][E] && setSignal(i[V][E], void 0);
1166
+ t && i[q][P] && setSignal(i[q][P], void 0);
1118
1167
  return;
1119
1168
  }
1120
1169
  if (u) {
1121
- const t = u[E];
1170
+ const t = u[P];
1122
1171
  const l = t || r ? getAllKeys(s, o, e) : Object.keys(u);
1123
1172
  for (let f = 0, c = l.length; f < c; f++) {
1124
1173
  const c = l[f];
@@ -1132,7 +1181,7 @@ function applyState(e, t, n, r) {
1132
1181
  } else applyState(h, wrap(d, i), n, r);
1133
1182
  }
1134
1183
  }
1135
- if ((u = i[q])) {
1184
+ if ((u = i[M])) {
1136
1185
  const t = Object.keys(u);
1137
1186
  for (let n = 0, r = t.length; n < r; n++) {
1138
1187
  const r = t[n];
@@ -1155,11 +1204,11 @@ function createProjectionInternal(e, t = {}, n) {
1155
1204
  const i = new WeakMap();
1156
1205
  const wrapProjection = e => {
1157
1206
  if (i.has(e)) return i.get(e);
1158
- if (e[W]?.[M] === wrapProjection) return e;
1159
- const t = createStoreProxy(e, G, {
1160
- [M]: wrapProjection,
1161
- [D]: i,
1162
- [B]() {
1207
+ if (e[I]?.[D] === wrapProjection) return e;
1208
+ const t = createStoreProxy(e, U, {
1209
+ [D]: wrapProjection,
1210
+ [B]: i,
1211
+ [T]() {
1163
1212
  return r;
1164
1213
  }
1165
1214
  });
@@ -1181,33 +1230,33 @@ function createProjectionInternal(e, t = {}, n) {
1181
1230
  function createProjection(e, t = {}, n) {
1182
1231
  return createProjectionInternal(e, t, n).store;
1183
1232
  }
1184
- const E = Symbol(0),
1185
- P = Symbol(0),
1233
+ const P = Symbol(0),
1186
1234
  W = Symbol(0),
1187
- H = Symbol(0),
1188
- I = Symbol(0);
1189
- const F = new WeakMap();
1190
- const Q = "v",
1191
- R = "o",
1192
- V = "n",
1193
- q = "h",
1194
- M = "w",
1195
- D = "l",
1196
- B = "f";
1197
- function createStoreProxy(e, t = G, n) {
1235
+ I = Symbol(0),
1236
+ F = Symbol(0),
1237
+ H = Symbol(0);
1238
+ const Q = new WeakMap();
1239
+ const R = "v",
1240
+ V = "o",
1241
+ q = "n",
1242
+ M = "h",
1243
+ D = "w",
1244
+ B = "l",
1245
+ T = "f";
1246
+ function createStoreProxy(e, t = U, n) {
1198
1247
  let r;
1199
1248
  if (Array.isArray(e)) {
1200
1249
  r = [];
1201
1250
  r.v = e;
1202
1251
  } else r = { v: e };
1203
1252
  n && Object.assign(r, n);
1204
- return (r[H] = new Proxy(r, t));
1253
+ return (r[F] = new Proxy(r, t));
1205
1254
  }
1206
- const T = new WeakMap();
1255
+ const K = new WeakMap();
1207
1256
  function wrap(e, t) {
1208
- if (t?.[M]) return t[M](e, t);
1209
- let n = e[H] || T.get(e);
1210
- if (!n) T.set(e, (n = createStoreProxy(e)));
1257
+ if (t?.[D]) return t[D](e, t);
1258
+ let n = e[F] || K.get(e);
1259
+ if (!n) K.set(e, (n = createStoreProxy(e)));
1211
1260
  return n;
1212
1261
  }
1213
1262
  function isWrappable(e) {
@@ -1231,8 +1280,8 @@ function getNode(e, t, n, r, i = isEqual) {
1231
1280
  r
1232
1281
  ));
1233
1282
  }
1234
- function trackSelf(e, t = E) {
1235
- getObserver() && read(getNode(getNodes(e, V), t, undefined, e[B]?.(), false));
1283
+ function trackSelf(e, t = P) {
1284
+ getObserver() && read(getNode(getNodes(e, q), t, undefined, e[T]?.(), false));
1236
1285
  }
1237
1286
  function getKeys(e, t, n = true) {
1238
1287
  const r = untrack(() => (n ? Object.keys(e) : Reflect.ownKeys(e)));
@@ -1240,7 +1289,7 @@ function getKeys(e, t, n = true) {
1240
1289
  const i = new Set(r);
1241
1290
  const s = Reflect.ownKeys(t);
1242
1291
  for (const e of s) {
1243
- if (t[e] !== I) i.add(e);
1292
+ if (t[e] !== H) i.add(e);
1244
1293
  else i.delete(e);
1245
1294
  }
1246
1295
  return Array.from(i);
@@ -1248,124 +1297,124 @@ function getKeys(e, t, n = true) {
1248
1297
  function getPropertyDescriptor(e, t, n) {
1249
1298
  let r = e;
1250
1299
  if (t && n in t) {
1251
- if (r[n] === I) return void 0;
1300
+ if (r[n] === H) return void 0;
1252
1301
  if (!(n in r)) r = t;
1253
1302
  }
1254
1303
  return Reflect.getOwnPropertyDescriptor(r, n);
1255
1304
  }
1256
- let K = null;
1257
- const G = {
1305
+ let G = null;
1306
+ const U = {
1258
1307
  get(e, t, n) {
1259
- if (t === W) return e;
1260
- if (t === H) return n;
1261
- if (t === E || t === P) {
1308
+ if (t === I) return e;
1309
+ if (t === F) return n;
1310
+ if (t === P || t === W) {
1262
1311
  trackSelf(e, t);
1263
1312
  return n;
1264
1313
  }
1265
- const r = getNodes(e, V);
1314
+ const r = getNodes(e, q);
1266
1315
  const i = r[t];
1267
- const s = e[R] && t in e[R];
1268
- const o = !!e[Q][W];
1269
- const u = s ? e[R] : e[Q];
1316
+ const s = e[V] && t in e[V];
1317
+ const o = !!e[R][I];
1318
+ const u = s ? e[V] : e[R];
1270
1319
  if (!i) {
1271
1320
  const e = Object.getOwnPropertyDescriptor(u, t);
1272
1321
  if (e && e.get) return e.get.call(n);
1273
1322
  }
1274
- if (K?.has(n)) {
1275
- let n = i && (s || !o) ? (i.G !== p ? i.G : i.U) : u[t];
1276
- n === I && (n = undefined);
1323
+ if (G?.has(n)) {
1324
+ let n = i && (s || !o) ? (i.U !== p ? i.U : i.L) : u[t];
1325
+ n === H && (n = undefined);
1277
1326
  if (!isWrappable(n)) return n;
1278
1327
  const r = wrap(n, e);
1279
- K.add(r);
1328
+ G.add(r);
1280
1329
  return r;
1281
1330
  }
1282
1331
  let l = i ? (s || !o ? read(r[t]) : (read(r[t]), u[t])) : u[t];
1283
- l === I && (l = undefined);
1332
+ l === H && (l = undefined);
1284
1333
  if (!i) {
1285
1334
  if (!s && typeof l === "function" && !u.hasOwnProperty(t)) {
1286
1335
  let t;
1287
- return !Array.isArray(e[Q]) && (t = Object.getPrototypeOf(e[Q])) && t !== Object.prototype
1336
+ return !Array.isArray(e[R]) && (t = Object.getPrototypeOf(e[R])) && t !== Object.prototype
1288
1337
  ? l.bind(u)
1289
1338
  : l;
1290
1339
  } else if (getObserver()) {
1291
- return read(getNode(r, t, isWrappable(l) ? wrap(l, e) : l, e[B]?.()));
1340
+ return read(getNode(r, t, isWrappable(l) ? wrap(l, e) : l, e[T]?.()));
1292
1341
  }
1293
1342
  }
1294
1343
  return isWrappable(l) ? wrap(l, e) : l;
1295
1344
  },
1296
1345
  has(e, t) {
1297
- if (t === H || t === E || t === "__proto__") return true;
1298
- const n = e[R] && t in e[R] ? e[R][t] !== I : t in e[Q];
1299
- getObserver() && read(getNode(getNodes(e, q), t, n, e[B]?.()));
1346
+ if (t === F || t === P || t === "__proto__") return true;
1347
+ const n = e[V] && t in e[V] ? e[V][t] !== H : t in e[R];
1348
+ getObserver() && read(getNode(getNodes(e, M), t, n, e[T]?.()));
1300
1349
  return n;
1301
1350
  },
1302
1351
  set(e, t, n) {
1303
- const r = e[H];
1304
- if (K?.has(e[H])) {
1352
+ const r = e[F];
1353
+ if (G?.has(e[F])) {
1305
1354
  untrack(() => {
1306
- const i = e[Q];
1355
+ const i = e[R];
1307
1356
  const s = i[t];
1308
- const o = e[R] && t in e[R] ? e[R][t] : s;
1309
- const u = n?.[W]?.[Q] ?? n;
1357
+ const o = e[V] && t in e[V] ? e[V][t] : s;
1358
+ const u = n?.[I]?.[R] ?? n;
1310
1359
  if (o === u) return true;
1311
- const l = e[R]?.length || i.length;
1312
- if (u !== undefined && u === s) delete e[R][t];
1313
- else (e[R] || (e[R] = Object.create(null)))[t] = u;
1360
+ const l = e[V]?.length || i.length;
1361
+ if (u !== undefined && u === s) delete e[V][t];
1362
+ else (e[V] || (e[V] = Object.create(null)))[t] = u;
1314
1363
  const f = isWrappable(u);
1315
1364
  if (isWrappable(o)) {
1316
- const e = F.get(o);
1317
- e && (e instanceof Set ? e.delete(r) : F.delete(o));
1365
+ const e = Q.get(o);
1366
+ e && (e instanceof Set ? e.delete(r) : Q.delete(o));
1318
1367
  }
1319
- if (recursivelyNotify(r, T) && f) recursivelyAddParent(u, r);
1320
- e[q]?.[t] && setSignal(e[q][t], true);
1321
- const c = getNodes(e, V);
1368
+ if (recursivelyNotify(r, K) && f) recursivelyAddParent(u, r);
1369
+ e[M]?.[t] && setSignal(e[M][t], true);
1370
+ const c = getNodes(e, q);
1322
1371
  c[t] && setSignal(c[t], () => (f ? wrap(u, e) : u));
1323
1372
  if (Array.isArray(i)) {
1324
1373
  const e = parseInt(t) + 1;
1325
1374
  if (e > l) c.length && setSignal(c.length, e);
1326
1375
  }
1327
- c[E] && setSignal(c[E], undefined);
1376
+ c[P] && setSignal(c[P], undefined);
1328
1377
  });
1329
1378
  }
1330
1379
  return true;
1331
1380
  },
1332
1381
  deleteProperty(e, t) {
1333
- if (K?.has(e[H]) && e[R]?.[t] !== I) {
1382
+ if (G?.has(e[F]) && e[V]?.[t] !== H) {
1334
1383
  untrack(() => {
1335
- const n = e[R] && t in e[R] ? e[R][t] : e[Q][t];
1336
- if (t in e[Q]) {
1337
- (e[R] || (e[R] = Object.create(null)))[t] = I;
1338
- } else if (e[R] && t in e[R]) {
1339
- delete e[R][t];
1384
+ const n = e[V] && t in e[V] ? e[V][t] : e[R][t];
1385
+ if (t in e[R]) {
1386
+ (e[V] || (e[V] = Object.create(null)))[t] = H;
1387
+ } else if (e[V] && t in e[V]) {
1388
+ delete e[V][t];
1340
1389
  } else return true;
1341
1390
  if (isWrappable(n)) {
1342
- const t = F.get(n);
1343
- t && (t instanceof Set ? t.delete(e) : F.delete(n));
1391
+ const t = Q.get(n);
1392
+ t && (t instanceof Set ? t.delete(e) : Q.delete(n));
1344
1393
  }
1345
- if (e[q]?.[t]) setSignal(e[q][t], false);
1346
- const r = getNodes(e, V);
1394
+ if (e[M]?.[t]) setSignal(e[M][t], false);
1395
+ const r = getNodes(e, q);
1347
1396
  r[t] && setSignal(r[t], undefined);
1348
- r[E] && setSignal(r[E], undefined);
1397
+ r[P] && setSignal(r[P], undefined);
1349
1398
  });
1350
1399
  }
1351
1400
  return true;
1352
1401
  },
1353
1402
  ownKeys(e) {
1354
1403
  trackSelf(e);
1355
- return getKeys(e[Q], e[R], false);
1404
+ return getKeys(e[R], e[V], false);
1356
1405
  },
1357
1406
  getOwnPropertyDescriptor(e, t) {
1358
- if (t === H) return { value: e[H], writable: true, configurable: true };
1359
- return getPropertyDescriptor(e[Q], e[R], t);
1407
+ if (t === F) return { value: e[F], writable: true, configurable: true };
1408
+ return getPropertyDescriptor(e[R], e[V], t);
1360
1409
  },
1361
1410
  getPrototypeOf(e) {
1362
- return Object.getPrototypeOf(e[Q]);
1411
+ return Object.getPrototypeOf(e[R]);
1363
1412
  }
1364
1413
  };
1365
1414
  function storeSetter(e, t) {
1366
- const n = K;
1367
- K = new Set();
1368
- K.add(e);
1415
+ const n = G;
1416
+ G = new Set();
1417
+ G.add(e);
1369
1418
  try {
1370
1419
  const n = t(e);
1371
1420
  if (n !== e && n !== undefined) {
@@ -1381,8 +1430,8 @@ function storeSetter(e, t) {
1381
1430
  }
1382
1431
  }
1383
1432
  } finally {
1384
- K.clear();
1385
- K = n;
1433
+ G.clear();
1434
+ G = n;
1386
1435
  }
1387
1436
  }
1388
1437
  function createStore(e, t, n) {
@@ -1391,17 +1440,17 @@ function createStore(e, t, n) {
1391
1440
  return [i, e => storeSetter(i, e)];
1392
1441
  }
1393
1442
  function recursivelyNotify(e, t) {
1394
- let n = e[W] || t?.get(e)?.[W];
1443
+ let n = e[I] || t?.get(e)?.[I];
1395
1444
  let r = false;
1396
1445
  if (n) {
1397
- const e = getNodes(n, V)[P];
1446
+ const e = getNodes(n, q)[W];
1398
1447
  if (e) {
1399
1448
  setSignal(e, undefined);
1400
1449
  r = true;
1401
1450
  }
1402
- t = n[D] || t;
1451
+ t = n[B] || t;
1403
1452
  }
1404
- const i = F.get(n?.[Q] || e);
1453
+ const i = Q.get(n?.[R] || e);
1405
1454
  if (!i) return r;
1406
1455
  if (i instanceof Set) {
1407
1456
  for (let e of i) r = recursivelyNotify(e, t) || r;
@@ -1410,16 +1459,16 @@ function recursivelyNotify(e, t) {
1410
1459
  }
1411
1460
  function recursivelyAddParent(e, t) {
1412
1461
  let n;
1413
- const r = e[W];
1462
+ const r = e[I];
1414
1463
  if (r) {
1415
- n = r[R];
1416
- e = r[Q];
1464
+ n = r[V];
1465
+ e = r[R];
1417
1466
  }
1418
1467
  if (t) {
1419
- let n = F.get(e);
1420
- if (!n) F.set(e, t);
1468
+ let n = Q.get(e);
1469
+ if (!n) Q.set(e, t);
1421
1470
  else if (n !== t) {
1422
- if (!(n instanceof Set)) F.set(e, (n = new Set([n])));
1471
+ if (!(n instanceof Set)) Q.set(e, (n = new Set([n])));
1423
1472
  else if (n.has(t)) return;
1424
1473
  n.add(t);
1425
1474
  } else return;
@@ -1441,7 +1490,7 @@ function recursivelyAddParent(e, t) {
1441
1490
  }
1442
1491
  function deep(e) {
1443
1492
  recursivelyAddParent(e);
1444
- return e[P];
1493
+ return e[W];
1445
1494
  }
1446
1495
  function createOptimisticStore(e, t, n) {
1447
1496
  return [];
@@ -1451,12 +1500,12 @@ function snapshot(e, t, n) {
1451
1500
  if (!isWrappable(e)) return e;
1452
1501
  if (t && t.has(e)) return t.get(e);
1453
1502
  if (!t) t = new Map();
1454
- if ((r = e[W] || n?.get(e)?.[W])) {
1455
- s = r[R];
1456
- i = Array.isArray(r[Q]);
1457
- t.set(e, s ? (o = i ? [] : Object.create(Object.getPrototypeOf(r[Q]))) : r[Q]);
1458
- e = r[Q];
1459
- n = T;
1503
+ if ((r = e[I] || n?.get(e)?.[I])) {
1504
+ s = r[V];
1505
+ i = Array.isArray(r[R]);
1506
+ t.set(e, s ? (o = i ? [] : Object.create(Object.getPrototypeOf(r[R]))) : r[R]);
1507
+ e = r[R];
1508
+ n = K;
1460
1509
  } else {
1461
1510
  i = Array.isArray(e);
1462
1511
  t.set(e, e);
@@ -1465,7 +1514,7 @@ function snapshot(e, t, n) {
1465
1514
  const r = s?.length || e.length;
1466
1515
  for (let i = 0; i < r; i++) {
1467
1516
  l = s && i in s ? s[i] : e[i];
1468
- if (l === I) continue;
1517
+ if (l === H) continue;
1469
1518
  if ((u = snapshot(l, t, n)) !== l || o) {
1470
1519
  if (!o) t.set(e, (o = [...e]));
1471
1520
  o[i] = u;
@@ -1492,13 +1541,13 @@ function snapshot(e, t, n) {
1492
1541
  function trueFn() {
1493
1542
  return true;
1494
1543
  }
1495
- const U = {
1544
+ const L = {
1496
1545
  get(e, t, n) {
1497
- if (t === H) return n;
1546
+ if (t === F) return n;
1498
1547
  return e.get(t);
1499
1548
  },
1500
1549
  has(e, t) {
1501
- if (t === H) return true;
1550
+ if (t === F) return true;
1502
1551
  return e.has(t);
1503
1552
  },
1504
1553
  set: trueFn,
@@ -1521,15 +1570,15 @@ const U = {
1521
1570
  function resolveSource(e) {
1522
1571
  return !(e = typeof e === "function" ? e() : e) ? {} : e;
1523
1572
  }
1524
- const L = Symbol(0);
1573
+ const z = Symbol(0);
1525
1574
  function merge(...e) {
1526
1575
  if (e.length === 1 && typeof e[0] !== "function") return e[0];
1527
1576
  let t = false;
1528
1577
  const n = [];
1529
1578
  for (let r = 0; r < e.length; r++) {
1530
1579
  const i = e[r];
1531
- t = t || (!!i && H in i);
1532
- const s = !!i && i[L];
1580
+ t = t || (!!i && F in i);
1581
+ const s = !!i && i[z];
1533
1582
  if (s) n.push(...s);
1534
1583
  else n.push(typeof i === "function" ? ((t = true), createMemo(i)) : i);
1535
1584
  }
@@ -1537,7 +1586,7 @@ function merge(...e) {
1537
1586
  return new Proxy(
1538
1587
  {
1539
1588
  get(e) {
1540
- if (e === L) return n;
1589
+ if (e === z) return n;
1541
1590
  for (let t = n.length - 1; t >= 0; t--) {
1542
1591
  const r = resolveSource(n[t]);
1543
1592
  if (e in r) return r[e];
@@ -1555,7 +1604,7 @@ function merge(...e) {
1555
1604
  return [...new Set(e)];
1556
1605
  }
1557
1606
  },
1558
- U
1607
+ L
1559
1608
  );
1560
1609
  }
1561
1610
  const r = Object.create(null);
@@ -1587,12 +1636,12 @@ function merge(...e) {
1587
1636
  if (n.get) Object.defineProperty(o, t, n);
1588
1637
  else o[t] = n.value;
1589
1638
  }
1590
- o[L] = n;
1639
+ o[z] = n;
1591
1640
  return o;
1592
1641
  }
1593
1642
  function omit(e, ...t) {
1594
1643
  const n = new Set(t);
1595
- if (y && H in e) {
1644
+ if (y && F in e) {
1596
1645
  return new Proxy(
1597
1646
  {
1598
1647
  get(t) {
@@ -1605,7 +1654,7 @@ function omit(e, ...t) {
1605
1654
  return Object.keys(e).filter(e => !n.has(e));
1606
1655
  }
1607
1656
  },
1608
- U
1657
+ L
1609
1658
  );
1610
1659
  }
1611
1660
  const r = {};
@@ -1623,66 +1672,66 @@ function mapArray(e, t, n) {
1623
1672
  const r = typeof n?.keyed === "function" ? n.keyed : undefined;
1624
1673
  return createMemo(
1625
1674
  updateKeyedMap.bind({
1626
- Ce: createOwner(),
1675
+ Ne: createOwner(),
1627
1676
  ve: 0,
1628
- Ne: e,
1629
- ke: [],
1630
- je: t,
1631
- Ae: [],
1677
+ ke: e,
1678
+ je: [],
1679
+ Ae: t,
1632
1680
  Ee: [],
1633
- Pe: r,
1634
- We: r || n?.keyed === false ? [] : undefined,
1635
- He: t.length > 1 ? [] : undefined,
1636
- Ie: n?.fallback
1681
+ Pe: [],
1682
+ We: r,
1683
+ Ie: r || n?.keyed === false ? [] : undefined,
1684
+ Fe: t.length > 1 ? [] : undefined,
1685
+ He: n?.fallback
1637
1686
  })
1638
1687
  );
1639
1688
  }
1640
- const z = { pureWrite: true };
1689
+ const J = { pureWrite: true };
1641
1690
  function updateKeyedMap() {
1642
- const e = this.Ne() || [],
1691
+ const e = this.ke() || [],
1643
1692
  t = e.length;
1644
- e[E];
1645
- runWithOwner(this.Ce, () => {
1693
+ e[P];
1694
+ runWithOwner(this.Ne, () => {
1646
1695
  let n,
1647
1696
  r,
1648
- i = this.We
1697
+ i = this.Ie
1649
1698
  ? () => {
1650
- this.We[r] = signal(e[r], z);
1651
- this.He && (this.He[r] = signal(r, z));
1652
- return this.je(
1653
- read.bind(null, this.We[r]),
1654
- this.He ? read.bind(null, this.He[r]) : undefined
1699
+ this.Ie[r] = signal(e[r], J);
1700
+ this.Fe && (this.Fe[r] = signal(r, J));
1701
+ return this.Ae(
1702
+ read.bind(null, this.Ie[r]),
1703
+ this.Fe ? read.bind(null, this.Fe[r]) : undefined
1655
1704
  );
1656
1705
  }
1657
- : this.He
1706
+ : this.Fe
1658
1707
  ? () => {
1659
1708
  const t = e[r];
1660
- this.He[r] = signal(r, z);
1661
- return this.je(() => t, read.bind(null, this.He[r]));
1709
+ this.Fe[r] = signal(r, J);
1710
+ return this.Ae(() => t, read.bind(null, this.Fe[r]));
1662
1711
  }
1663
1712
  : () => {
1664
1713
  const t = e[r];
1665
- return this.je(() => t);
1714
+ return this.Ae(() => t);
1666
1715
  };
1667
1716
  if (t === 0) {
1668
1717
  if (this.ve !== 0) {
1669
- this.Ce.dispose(false);
1718
+ this.Ne.dispose(false);
1719
+ this.Pe = [];
1720
+ this.je = [];
1670
1721
  this.Ee = [];
1671
- this.ke = [];
1672
- this.Ae = [];
1673
1722
  this.ve = 0;
1674
- this.We && (this.We = []);
1675
- this.He && (this.He = []);
1723
+ this.Ie && (this.Ie = []);
1724
+ this.Fe && (this.Fe = []);
1676
1725
  }
1677
- if (this.Ie && !this.Ae[0]) {
1678
- this.Ae[0] = runWithOwner((this.Ee[0] = createOwner()), this.Ie);
1726
+ if (this.He && !this.Ee[0]) {
1727
+ this.Ee[0] = runWithOwner((this.Pe[0] = createOwner()), this.He);
1679
1728
  }
1680
1729
  } else if (this.ve === 0) {
1681
- if (this.Ee[0]) this.Ee[0].dispose();
1682
- this.Ae = new Array(t);
1730
+ if (this.Pe[0]) this.Pe[0].dispose();
1731
+ this.Ee = new Array(t);
1683
1732
  for (r = 0; r < t; r++) {
1684
- this.ke[r] = e[r];
1685
- this.Ae[r] = runWithOwner((this.Ee[r] = createOwner()), i);
1733
+ this.je[r] = e[r];
1734
+ this.Ee[r] = runWithOwner((this.Pe[r] = createOwner()), i);
1686
1735
  }
1687
1736
  this.ve = t;
1688
1737
  } else {
@@ -1695,130 +1744,130 @@ function updateKeyedMap() {
1695
1744
  a,
1696
1745
  d = new Array(t),
1697
1746
  h = new Array(t),
1698
- p = this.We ? new Array(t) : undefined,
1699
- y = this.He ? new Array(t) : undefined;
1747
+ p = this.Ie ? new Array(t) : undefined,
1748
+ y = this.Fe ? new Array(t) : undefined;
1700
1749
  for (
1701
1750
  s = 0, o = Math.min(this.ve, t);
1702
- s < o && (this.ke[s] === e[s] || (this.We && compare(this.Pe, this.ke[s], e[s])));
1751
+ s < o && (this.je[s] === e[s] || (this.Ie && compare(this.We, this.je[s], e[s])));
1703
1752
  s++
1704
1753
  ) {
1705
- if (this.We) setSignal(this.We[s], e[s]);
1754
+ if (this.Ie) setSignal(this.Ie[s], e[s]);
1706
1755
  }
1707
1756
  for (
1708
1757
  o = this.ve - 1, u = t - 1;
1709
1758
  o >= s &&
1710
1759
  u >= s &&
1711
- (this.ke[o] === e[u] || (this.We && compare(this.Pe, this.ke[o], e[u])));
1760
+ (this.je[o] === e[u] || (this.Ie && compare(this.We, this.je[o], e[u])));
1712
1761
  o--, u--
1713
1762
  ) {
1714
- d[u] = this.Ae[o];
1715
- h[u] = this.Ee[o];
1716
- p && (p[u] = this.We[o]);
1717
- y && (y[u] = this.He[o]);
1763
+ d[u] = this.Ee[o];
1764
+ h[u] = this.Pe[o];
1765
+ p && (p[u] = this.Ie[o]);
1766
+ y && (y[u] = this.Fe[o]);
1718
1767
  }
1719
1768
  c = new Map();
1720
1769
  a = new Array(u + 1);
1721
1770
  for (r = u; r >= s; r--) {
1722
1771
  l = e[r];
1723
- f = this.Pe ? this.Pe(l) : l;
1772
+ f = this.We ? this.We(l) : l;
1724
1773
  n = c.get(f);
1725
1774
  a[r] = n === undefined ? -1 : n;
1726
1775
  c.set(f, r);
1727
1776
  }
1728
1777
  for (n = s; n <= o; n++) {
1729
- l = this.ke[n];
1730
- f = this.Pe ? this.Pe(l) : l;
1778
+ l = this.je[n];
1779
+ f = this.We ? this.We(l) : l;
1731
1780
  r = c.get(f);
1732
1781
  if (r !== undefined && r !== -1) {
1733
- d[r] = this.Ae[n];
1734
- h[r] = this.Ee[n];
1735
- p && (p[r] = this.We[n]);
1736
- y && (y[r] = this.He[n]);
1782
+ d[r] = this.Ee[n];
1783
+ h[r] = this.Pe[n];
1784
+ p && (p[r] = this.Ie[n]);
1785
+ y && (y[r] = this.Fe[n]);
1737
1786
  r = a[r];
1738
1787
  c.set(f, r);
1739
- } else this.Ee[n].dispose();
1788
+ } else this.Pe[n].dispose();
1740
1789
  }
1741
1790
  for (r = s; r < t; r++) {
1742
1791
  if (r in d) {
1743
- this.Ae[r] = d[r];
1744
- this.Ee[r] = h[r];
1792
+ this.Ee[r] = d[r];
1793
+ this.Pe[r] = h[r];
1745
1794
  if (p) {
1746
- this.We[r] = p[r];
1747
- setSignal(this.We[r], e[r]);
1795
+ this.Ie[r] = p[r];
1796
+ setSignal(this.Ie[r], e[r]);
1748
1797
  }
1749
1798
  if (y) {
1750
- this.He[r] = y[r];
1751
- setSignal(this.He[r], r);
1799
+ this.Fe[r] = y[r];
1800
+ setSignal(this.Fe[r], r);
1752
1801
  }
1753
1802
  } else {
1754
- this.Ae[r] = runWithOwner((this.Ee[r] = createOwner()), i);
1803
+ this.Ee[r] = runWithOwner((this.Pe[r] = createOwner()), i);
1755
1804
  }
1756
1805
  }
1757
- this.Ae = this.Ae.slice(0, (this.ve = t));
1758
- this.ke = e.slice(0);
1806
+ this.Ee = this.Ee.slice(0, (this.ve = t));
1807
+ this.je = e.slice(0);
1759
1808
  }
1760
1809
  });
1761
- return this.Ae;
1810
+ return this.Ee;
1762
1811
  }
1763
1812
  function repeat(e, t, n) {
1764
1813
  return updateRepeat.bind({
1765
- Ce: createOwner(),
1814
+ Ne: createOwner(),
1766
1815
  ve: 0,
1767
- Fe: 0,
1768
- Qe: e,
1769
- je: t,
1816
+ Qe: 0,
1817
+ Re: e,
1818
+ Ae: t,
1819
+ Pe: [],
1770
1820
  Ee: [],
1771
- Ae: [],
1772
- Re: n?.from,
1773
- Ie: n?.fallback
1821
+ Ve: n?.from,
1822
+ He: n?.fallback
1774
1823
  });
1775
1824
  }
1776
1825
  function updateRepeat() {
1777
- const e = this.Qe();
1778
- const t = this.Re?.() || 0;
1779
- runWithOwner(this.Ce, () => {
1826
+ const e = this.Re();
1827
+ const t = this.Ve?.() || 0;
1828
+ runWithOwner(this.Ne, () => {
1780
1829
  if (e === 0) {
1781
1830
  if (this.ve !== 0) {
1782
- this.Ce.dispose(false);
1831
+ this.Ne.dispose(false);
1832
+ this.Pe = [];
1783
1833
  this.Ee = [];
1784
- this.Ae = [];
1785
1834
  this.ve = 0;
1786
1835
  }
1787
- if (this.Ie && !this.Ae[0]) {
1788
- this.Ae[0] = runWithOwner((this.Ee[0] = createOwner()), this.Ie);
1836
+ if (this.He && !this.Ee[0]) {
1837
+ this.Ee[0] = runWithOwner((this.Pe[0] = createOwner()), this.He);
1789
1838
  }
1790
1839
  return;
1791
1840
  }
1792
1841
  const n = t + e;
1793
- const r = this.Fe + this.ve;
1794
- if (this.ve === 0 && this.Ee[0]) this.Ee[0].dispose();
1795
- for (let e = n; e < r; e++) this.Ee[e - this.Fe].dispose();
1796
- if (this.Fe < t) {
1797
- let e = this.Fe;
1798
- while (e < t && e < this.ve) this.Ee[e++].dispose();
1799
- this.Ee.splice(0, t - this.Fe);
1800
- this.Ae.splice(0, t - this.Fe);
1801
- } else if (this.Fe > t) {
1802
- let n = r - this.Fe - 1;
1803
- let i = this.Fe - t;
1804
- this.Ee.length = this.Ae.length = e;
1842
+ const r = this.Qe + this.ve;
1843
+ if (this.ve === 0 && this.Pe[0]) this.Pe[0].dispose();
1844
+ for (let e = n; e < r; e++) this.Pe[e - this.Qe].dispose();
1845
+ if (this.Qe < t) {
1846
+ let e = this.Qe;
1847
+ while (e < t && e < this.ve) this.Pe[e++].dispose();
1848
+ this.Pe.splice(0, t - this.Qe);
1849
+ this.Ee.splice(0, t - this.Qe);
1850
+ } else if (this.Qe > t) {
1851
+ let n = r - this.Qe - 1;
1852
+ let i = this.Qe - t;
1853
+ this.Pe.length = this.Ee.length = e;
1805
1854
  while (n >= i) {
1855
+ this.Pe[n] = this.Pe[n - i];
1806
1856
  this.Ee[n] = this.Ee[n - i];
1807
- this.Ae[n] = this.Ae[n - i];
1808
1857
  n--;
1809
1858
  }
1810
1859
  for (let e = 0; e < i; e++) {
1811
- this.Ae[e] = runWithOwner((this.Ee[e] = createOwner()), () => this.je(e + t));
1860
+ this.Ee[e] = runWithOwner((this.Pe[e] = createOwner()), () => this.Ae(e + t));
1812
1861
  }
1813
1862
  }
1814
1863
  for (let e = r; e < n; e++) {
1815
- this.Ae[e - t] = runWithOwner((this.Ee[e - t] = createOwner()), () => this.je(e));
1864
+ this.Ee[e - t] = runWithOwner((this.Pe[e - t] = createOwner()), () => this.Ae(e));
1816
1865
  }
1817
- this.Ae = this.Ae.slice(0, e);
1818
- this.Fe = t;
1866
+ this.Ee = this.Ee.slice(0, e);
1867
+ this.Qe = t;
1819
1868
  this.ve = e;
1820
1869
  });
1821
- return this.Ae;
1870
+ return this.Ee;
1822
1871
  }
1823
1872
  function compare(e, t, n) {
1824
1873
  return e ? e(t) === e(n) : true;
@@ -1828,42 +1877,42 @@ function boundaryComputed(e, t) {
1828
1877
  be: {
1829
1878
  le() {
1830
1879
  let e = this.$;
1831
- this.$ &= ~this.Ve;
1832
- if (this.Ve & f && !(this.$ & a)) {
1880
+ this.$ &= ~this.qe;
1881
+ if (this.qe & f && !(this.$ & a)) {
1833
1882
  e &= ~f;
1834
1883
  }
1835
- this.we.notify(this, this.Ve, e);
1884
+ this._e.notify(this, this.qe, e);
1836
1885
  },
1837
- Ve: t
1886
+ qe: t
1838
1887
  }
1839
1888
  });
1840
- n.Ve = t;
1841
- n.he = true;
1889
+ n.qe = t;
1890
+ n.pe = true;
1842
1891
  return n;
1843
1892
  }
1844
1893
  function createBoundChildren(e, t, n, r) {
1845
- const i = e.we;
1846
- i.addChild((e.we = n));
1847
- onCleanup(() => i.removeChild(e.we));
1894
+ const i = e._e;
1895
+ i.addChild((e._e = n));
1896
+ onCleanup(() => i.removeChild(e._e));
1848
1897
  return runWithOwner(e, () => {
1849
1898
  const e = computed(t);
1850
1899
  return boundaryComputed(() => staleValues(() => flatten(read(e))), r);
1851
1900
  });
1852
1901
  }
1853
1902
  class ConditionalQueue extends Queue {
1854
- qe;
1855
- Me = new Set();
1903
+ Me;
1904
+ De = new Set();
1856
1905
  M = new Set();
1857
1906
  constructor(e) {
1858
1907
  super();
1859
- this.qe = e;
1908
+ this.Me = e;
1860
1909
  }
1861
1910
  run(e) {
1862
- if (!e || read(this.qe)) return;
1911
+ if (!e || read(this.Me)) return;
1863
1912
  return super.run(e);
1864
1913
  }
1865
1914
  notify(e, t, n) {
1866
- if (read(this.qe)) {
1915
+ if (read(this.Me)) {
1867
1916
  if (t & f) {
1868
1917
  if (n & f) {
1869
1918
  this.M.add(e);
@@ -1872,69 +1921,69 @@ class ConditionalQueue extends Queue {
1872
1921
  }
1873
1922
  if (t & c) {
1874
1923
  if (n & c) {
1875
- this.Me.add(e);
1924
+ this.De.add(e);
1876
1925
  t &= ~c;
1877
- } else if (this.Me.delete(e)) t &= ~c;
1926
+ } else if (this.De.delete(e)) t &= ~c;
1878
1927
  }
1879
1928
  }
1880
1929
  return t ? super.notify(e, t, n) : true;
1881
1930
  }
1882
1931
  }
1883
1932
  class CollectionQueue extends Queue {
1884
- De;
1885
- Ee = new Set();
1886
- qe = signal(false, { pureWrite: true });
1887
- Be = false;
1933
+ Be;
1934
+ Pe = new Set();
1935
+ Me = signal(false, { pureWrite: true });
1936
+ Te = false;
1888
1937
  constructor(e) {
1889
1938
  super();
1890
- this.De = e;
1939
+ this.Be = e;
1891
1940
  }
1892
1941
  run(e) {
1893
- if (!e || read(this.qe)) return;
1942
+ if (!e || read(this.Me)) return;
1894
1943
  return super.run(e);
1895
1944
  }
1896
1945
  notify(e, t, n) {
1897
- if (!(t & this.De) || (this.De & f && this.Be)) return super.notify(e, t, n);
1898
- if (n & this.De) {
1899
- this.Ee.add(e);
1900
- if (this.Ee.size === 1) setSignal(this.qe, true);
1901
- } else if (this.Ee.size > 0) {
1902
- this.Ee.delete(e);
1903
- if (this.Ee.size === 0) setSignal(this.qe, false);
1904
- }
1905
- t &= ~this.De;
1946
+ if (!(t & this.Be) || (this.Be & f && this.Te)) return super.notify(e, t, n);
1947
+ if (n & this.Be) {
1948
+ this.Pe.add(e);
1949
+ if (this.Pe.size === 1) setSignal(this.Me, true);
1950
+ } else if (this.Pe.size > 0) {
1951
+ this.Pe.delete(e);
1952
+ if (this.Pe.size === 0) setSignal(this.Me, false);
1953
+ }
1954
+ t &= ~this.Be;
1906
1955
  return t ? super.notify(e, t, n) : true;
1907
1956
  }
1908
1957
  }
1909
- var J;
1958
+ var X;
1910
1959
  (function (e) {
1911
1960
  e["VISIBLE"] = "visible";
1912
1961
  e["HIDDEN"] = "hidden";
1913
- })(J || (J = {}));
1962
+ })(X || (X = {}));
1914
1963
  function createBoundary(e, t) {
1915
1964
  const n = createOwner();
1916
- const r = new ConditionalQueue(computed(() => t() === J.HIDDEN));
1965
+ const r = new ConditionalQueue(computed(() => t() === X.HIDDEN));
1917
1966
  const i = createBoundChildren(n, e, r, 0);
1918
1967
  computed(() => {
1919
- const e = read(r.qe);
1920
- i.Ve = e ? c | f : 0;
1968
+ const e = read(r.Me);
1969
+ i.qe = e ? c | f : 0;
1921
1970
  if (!e) {
1922
1971
  r.M.forEach(e => r.notify(e, f, f));
1923
- r.Me.forEach(e => r.notify(e, c, c));
1972
+ r.De.forEach(e => r.notify(e, c, c));
1924
1973
  r.M.clear();
1925
- r.Me.clear();
1974
+ r.De.clear();
1926
1975
  }
1927
1976
  });
1928
- return () => (read(r.qe) ? undefined : read(i));
1977
+ return () => (read(r.Me) ? undefined : read(i));
1929
1978
  }
1930
1979
  function createCollectionBoundary(e, t, n) {
1931
1980
  const r = createOwner();
1932
1981
  const i = new CollectionQueue(e);
1933
1982
  const s = createBoundChildren(r, t, i, e);
1934
1983
  const o = computed(() => {
1935
- if (!read(i.qe)) {
1984
+ if (!read(i.Me)) {
1936
1985
  const e = read(s);
1937
- if (!untrack(() => read(i.qe))) i.Be = true;
1986
+ if (!untrack(() => read(i.Me))) i.Te = true;
1938
1987
  return e;
1939
1988
  }
1940
1989
  return n(i);
@@ -1948,7 +1997,7 @@ function collectErrorSources(e, t) {
1948
1997
  let n = true;
1949
1998
  let r = e.P;
1950
1999
  while (r !== null) {
1951
- const e = r.H;
2000
+ const e = r.I;
1952
2001
  if (e.P && e.$ & c) {
1953
2002
  n = false;
1954
2003
  collectErrorSources(e, t);
@@ -1959,10 +2008,10 @@ function collectErrorSources(e, t) {
1959
2008
  }
1960
2009
  function createErrorBoundary(e, t) {
1961
2010
  return createCollectionBoundary(c, e, e => {
1962
- let n = e.Ee.values().next().value;
1963
- return t(n.T, () => {
2011
+ let n = e.Pe.values().next().value;
2012
+ return t(n.K, () => {
1964
2013
  const t = [];
1965
- for (const n of e.Ee) collectErrorSources(n, t);
2014
+ for (const n of e.Pe) collectErrorSources(n, t);
1966
2015
  for (const e of t) recompute(e);
1967
2016
  schedule();
1968
2017
  });
@@ -2017,9 +2066,9 @@ function flattenArray(e, t = [], n) {
2017
2066
  if (r) throw r;
2018
2067
  return i;
2019
2068
  }
2020
- exports.$PROXY = H;
2021
- exports.$TARGET = W;
2022
- exports.$TRACK = E;
2069
+ exports.$PROXY = F;
2070
+ exports.$TARGET = I;
2071
+ exports.$TRACK = P;
2023
2072
  exports.ContextNotFoundError = ContextNotFoundError;
2024
2073
  exports.NoOwnerError = NoOwnerError;
2025
2074
  exports.NotReadyError = NotReadyError;