@solidjs/signals 2.0.0-beta.7 → 2.0.0-beta.8

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/prod.js CHANGED
@@ -150,16 +150,33 @@ let activeTransition = null;
150
150
  let scheduled = false;
151
151
  let projectionWriteActive = false;
152
152
  let stashedOptimisticReads = null;
153
+ const transientStoreNodes = new Set();
154
+ function registerTransientStoreNode(e) {
155
+ transientStoreNodes.add(e);
156
+ }
157
+ function sweepTransientStoreNodes() {
158
+ if (transientStoreNodes.size === 0) return;
159
+ for (const e of transientStoreNodes) {
160
+ if (e.I !== null) {
161
+ transientStoreNodes.delete(e);
162
+ continue;
163
+ }
164
+ if (e.U !== NOT_PENDING) continue;
165
+ if (e.k !== undefined && e.k !== NOT_PENDING) continue;
166
+ transientStoreNodes.delete(e);
167
+ e.G?.();
168
+ }
169
+ }
153
170
  function enforceLoadingBoundary(e) {}
154
171
  function shouldReadStashedOptimisticValue(e) {
155
172
  return !!stashedOptimisticReads?.has(e);
156
173
  }
157
174
  function runLaneEffects(e) {
158
175
  for (const t of activeLanes) {
159
- if (t.U || t.k.size > 0) continue;
160
- const n = t.G[e - 1];
176
+ if (t.W || t.H.size > 0) continue;
177
+ const n = t.M[e - 1];
161
178
  if (n.length) {
162
- t.G[e - 1] = [];
179
+ t.M[e - 1] = [];
163
180
  runQueue(n, e);
164
181
  }
165
182
  }
@@ -167,11 +184,11 @@ function runLaneEffects(e) {
167
184
  function queueStashedOptimisticEffects(e) {
168
185
  for (let t = e.I; t !== null; t = t.h) {
169
186
  const e = t.p;
170
- if (!e.W) continue;
171
- if (e.W === EFFECT_TRACKED) {
172
- if (!e.H) {
173
- e.H = true;
174
- e.F.enqueue(EFFECT_USER, e.M);
187
+ if (!e.F) continue;
188
+ if (e.F === EFFECT_TRACKED) {
189
+ if (!e.j) {
190
+ e.j = true;
191
+ e.$.enqueue(EFFECT_USER, e.K);
175
192
  }
176
193
  continue;
177
194
  }
@@ -184,66 +201,66 @@ function setProjectionWriteActive(e) {
184
201
  projectionWriteActive = e;
185
202
  }
186
203
  function mergeTransitionState(e, t) {
187
- t.j = e;
188
- e.$.push(...t.$);
189
- for (const n of activeLanes) if (n.K === t) n.K = e;
190
- e.Y.push(...t.Y);
191
- for (const n of t.Z) e.Z.add(n);
192
- for (const [n, i] of t.B) {
193
- let t = e.B.get(n);
194
- if (!t) e.B.set(n, (t = new Set()));
204
+ t.Y = e;
205
+ e.Z.push(...t.Z);
206
+ for (const n of activeLanes) if (n.B === t) n.B = e;
207
+ e.q.push(...t.q);
208
+ for (const n of t.X) e.X.add(n);
209
+ for (const [n, i] of t.J) {
210
+ let t = e.J.get(n);
211
+ if (!t) e.J.set(n, (t = new Set()));
195
212
  for (const e of i) t.add(e);
196
213
  }
197
214
  }
198
215
  function resolveOptimisticNodes(e) {
199
216
  for (let t = 0; t < e.length; t++) {
200
217
  const n = e[t];
201
- n.q = undefined;
202
- if (n.X !== NOT_PENDING) {
203
- n.J = n.X;
204
- n.X = NOT_PENDING;
218
+ n.ee = undefined;
219
+ if (n.U !== NOT_PENDING) {
220
+ n.te = n.U;
221
+ n.U = NOT_PENDING;
205
222
  }
206
- const i = n.ee;
207
- n.ee = NOT_PENDING;
208
- if (i !== NOT_PENDING && n.J !== i) insertSubs(n, true);
209
- n.K = null;
223
+ const i = n.k;
224
+ n.k = NOT_PENDING;
225
+ if (i !== NOT_PENDING && n.te !== i) insertSubs(n, true);
226
+ n.B = null;
210
227
  }
211
228
  e.length = 0;
212
229
  }
213
230
  function cleanupCompletedLanes(e) {
214
231
  for (const t of activeLanes) {
215
- const n = e ? t.K === e : !t.K;
232
+ const n = e ? t.B === e : !t.B;
216
233
  if (!n) continue;
217
- if (!t.U) {
218
- if (t.G[0].length) runQueue(t.G[0], EFFECT_RENDER);
219
- if (t.G[1].length) runQueue(t.G[1], EFFECT_USER);
220
- }
221
- if (t.te.q === t) t.te.q = undefined;
222
- t.k.clear();
223
- t.G[0].length = 0;
224
- t.G[1].length = 0;
234
+ if (!t.W) {
235
+ if (t.M[0].length) runQueue(t.M[0], EFFECT_RENDER);
236
+ if (t.M[1].length) runQueue(t.M[1], EFFECT_USER);
237
+ }
238
+ if (t.ne.ee === t) t.ne.ee = undefined;
239
+ t.H.clear();
240
+ t.M[0].length = 0;
241
+ t.M[1].length = 0;
225
242
  activeLanes.delete(t);
226
- signalLanes.delete(t.te);
243
+ signalLanes.delete(t.ne);
227
244
  }
228
245
  }
229
246
  function schedule() {
230
247
  if (scheduled) return;
231
248
  scheduled = true;
232
- if (!globalQueue.ne && !projectionWriteActive) queueMicrotask(flush);
249
+ if (!globalQueue.ie && !projectionWriteActive) queueMicrotask(flush);
233
250
  }
234
251
  class Queue {
235
252
  i = null;
236
- ie = [[], []];
237
- re = [];
253
+ re = [[], []];
254
+ se = [];
238
255
  created = clock;
239
256
  addChild(e) {
240
- this.re.push(e);
257
+ this.se.push(e);
241
258
  e.i = this;
242
259
  }
243
260
  removeChild(e) {
244
- const t = this.re.indexOf(e);
261
+ const t = this.se.indexOf(e);
245
262
  if (t >= 0) {
246
- this.re.splice(t, 1);
263
+ this.se.splice(t, 1);
247
264
  e.i = null;
248
265
  }
249
266
  }
@@ -252,81 +269,81 @@ class Queue {
252
269
  return false;
253
270
  }
254
271
  run(e) {
255
- if (this.ie[e - 1].length) {
256
- const t = this.ie[e - 1];
257
- this.ie[e - 1] = [];
272
+ if (this.re[e - 1].length) {
273
+ const t = this.re[e - 1];
274
+ this.re[e - 1] = [];
258
275
  runQueue(t, e);
259
276
  }
260
- for (let t = 0; t < this.re.length; t++) this.re[t].run?.(e);
277
+ for (let t = 0; t < this.se.length; t++) this.se[t].run?.(e);
261
278
  }
262
279
  enqueue(e, t) {
263
280
  if (e) {
264
281
  if (currentOptimisticLane) {
265
282
  const n = findLane(currentOptimisticLane);
266
- n.G[e - 1].push(t);
283
+ n.M[e - 1].push(t);
267
284
  } else {
268
- this.ie[e - 1].push(t);
285
+ this.re[e - 1].push(t);
269
286
  }
270
287
  }
271
288
  schedule();
272
289
  }
273
290
  stashQueues(e) {
274
- e.ie[0].push(...this.ie[0]);
275
- e.ie[1].push(...this.ie[1]);
276
- this.ie = [[], []];
277
- for (let t = 0; t < this.re.length; t++) {
278
- let n = this.re[t];
279
- let i = e.re[t];
291
+ e.re[0].push(...this.re[0]);
292
+ e.re[1].push(...this.re[1]);
293
+ this.re = [[], []];
294
+ for (let t = 0; t < this.se.length; t++) {
295
+ let n = this.se[t];
296
+ let i = e.se[t];
280
297
  if (!i) {
281
- i = { ie: [[], []], re: [] };
282
- e.re[t] = i;
298
+ i = { re: [[], []], se: [] };
299
+ e.se[t] = i;
283
300
  }
284
301
  n.stashQueues(i);
285
302
  }
286
303
  }
287
304
  restoreQueues(e) {
288
- this.ie[0].push(...e.ie[0]);
289
- this.ie[1].push(...e.ie[1]);
290
- for (let t = 0; t < e.re.length; t++) {
291
- const n = e.re[t];
292
- let i = this.re[t];
305
+ this.re[0].push(...e.re[0]);
306
+ this.re[1].push(...e.re[1]);
307
+ for (let t = 0; t < e.se.length; t++) {
308
+ const n = e.se[t];
309
+ let i = this.se[t];
293
310
  if (i) i.restoreQueues(n);
294
311
  }
295
312
  }
296
313
  }
297
314
  class GlobalQueue extends Queue {
298
- ne = false;
299
- se = [];
300
- Y = [];
301
- Z = new Set();
302
- static oe;
315
+ ie = false;
316
+ oe = [];
317
+ q = [];
318
+ X = new Set();
303
319
  static ue;
304
- static ce = null;
320
+ static ce;
321
+ static ae = null;
305
322
  flush() {
306
- if (this.ne) return;
307
- this.ne = true;
323
+ if (this.ie) return;
324
+ this.ie = true;
308
325
  try {
309
- runHeap(dirtyQueue, GlobalQueue.oe);
326
+ runHeap(dirtyQueue, GlobalQueue.ue);
310
327
  if (activeTransition) {
311
328
  const e = transitionComplete(activeTransition);
312
329
  if (!e) {
313
330
  const e = activeTransition;
314
- runHeap(zombieQueue, GlobalQueue.oe);
315
- this.se = [];
316
- this.Y = [];
317
- this.Z = new Set();
331
+ runHeap(zombieQueue, GlobalQueue.ue);
332
+ this.oe = [];
333
+ this.q = [];
334
+ this.X = new Set();
318
335
  runLaneEffects(EFFECT_RENDER);
319
336
  runLaneEffects(EFFECT_USER);
320
- this.stashQueues(e.ae);
337
+ this.stashQueues(e.le);
321
338
  clock++;
322
339
  scheduled = dirtyQueue.R >= dirtyQueue.P;
323
- reassignPendingTransition(e.se);
340
+ reassignPendingTransition(e.oe);
324
341
  activeTransition = null;
325
- if (!e.$.length && e.Y.length) {
342
+ if (!e.Z.length && e.q.length) {
326
343
  stashedOptimisticReads = new Set();
327
- for (let t = 0; t < e.Y.length; t++) {
328
- const n = e.Y[t];
329
- if (n.L || n.le) continue;
344
+ for (let t = 0; t < e.q.length; t++) {
345
+ const n = e.q[t];
346
+ if (n.L || n.fe) continue;
330
347
  stashedOptimisticReads.add(n);
331
348
  queueStashedOptimisticEffects(n);
332
349
  }
@@ -338,15 +355,15 @@ class GlobalQueue extends Queue {
338
355
  }
339
356
  return;
340
357
  }
341
- this.se !== activeTransition.se && this.se.push(...activeTransition.se);
342
- this.restoreQueues(activeTransition.ae);
358
+ this.oe !== activeTransition.oe && this.oe.push(...activeTransition.oe);
359
+ this.restoreQueues(activeTransition.le);
343
360
  transitions.delete(activeTransition);
344
361
  const t = activeTransition;
345
362
  activeTransition = null;
346
- reassignPendingTransition(this.se);
363
+ reassignPendingTransition(this.oe);
347
364
  finalizePureQueue(t);
348
365
  } else {
349
- if (transitions.size) runHeap(zombieQueue, GlobalQueue.oe);
366
+ if (transitions.size) runHeap(zombieQueue, GlobalQueue.ue);
350
367
  finalizePureQueue();
351
368
  }
352
369
  clock++;
@@ -357,17 +374,17 @@ class GlobalQueue extends Queue {
357
374
  this.run(EFFECT_USER);
358
375
  if (false);
359
376
  } finally {
360
- this.ne = false;
377
+ this.ie = false;
361
378
  }
362
379
  }
363
380
  notify(e, t, n, i) {
364
381
  if (t & STATUS_PENDING) {
365
382
  if (n & STATUS_PENDING) {
366
- const t = i !== undefined ? i : e.fe;
383
+ const t = i !== undefined ? i : e.Ee;
367
384
  if (activeTransition && t) {
368
385
  const n = t.source;
369
- let i = activeTransition.B.get(n);
370
- if (!i) activeTransition.B.set(n, (i = new Set()));
386
+ let i = activeTransition.J.get(n);
387
+ if (!i) activeTransition.J.set(n, (i = new Set()));
371
388
  const r = i.size;
372
389
  i.add(e);
373
390
  if (i.size !== r) schedule();
@@ -380,17 +397,17 @@ class GlobalQueue extends Queue {
380
397
  initTransition(e) {
381
398
  if (e) e = currentTransition(e);
382
399
  if (e && e === activeTransition) return;
383
- if (!e && activeTransition && activeTransition.Ee === clock) return;
400
+ if (!e && activeTransition && activeTransition.de === clock) return;
384
401
  if (!activeTransition) {
385
402
  activeTransition = e ?? {
386
- Ee: clock,
387
- se: [],
388
- B: new Map(),
389
- Y: [],
390
- Z: new Set(),
391
- $: [],
392
- ae: { ie: [[], []], re: [] },
393
- j: false
403
+ de: clock,
404
+ oe: [],
405
+ J: new Map(),
406
+ q: [],
407
+ X: new Set(),
408
+ Z: [],
409
+ le: { re: [[], []], se: [] },
410
+ Y: false
394
411
  };
395
412
  } else if (e) {
396
413
  const t = activeTransition;
@@ -399,37 +416,37 @@ class GlobalQueue extends Queue {
399
416
  activeTransition = e;
400
417
  }
401
418
  transitions.add(activeTransition);
402
- activeTransition.Ee = clock;
403
- if (this.se !== activeTransition.se) {
404
- for (let e = 0; e < this.se.length; e++) {
405
- const t = this.se[e];
406
- t.K = activeTransition;
407
- activeTransition.se.push(t);
419
+ activeTransition.de = clock;
420
+ if (this.oe !== activeTransition.oe) {
421
+ for (let e = 0; e < this.oe.length; e++) {
422
+ const t = this.oe[e];
423
+ t.B = activeTransition;
424
+ activeTransition.oe.push(t);
408
425
  }
409
- this.se = activeTransition.se;
426
+ this.oe = activeTransition.oe;
410
427
  }
411
- if (this.Y !== activeTransition.Y) {
412
- for (let e = 0; e < this.Y.length; e++) {
413
- const t = this.Y[e];
414
- t.K = activeTransition;
415
- activeTransition.Y.push(t);
428
+ if (this.q !== activeTransition.q) {
429
+ for (let e = 0; e < this.q.length; e++) {
430
+ const t = this.q[e];
431
+ t.B = activeTransition;
432
+ activeTransition.q.push(t);
416
433
  }
417
- this.Y = activeTransition.Y;
434
+ this.q = activeTransition.q;
418
435
  }
419
436
  for (const e of activeLanes) {
420
- if (!e.K) e.K = activeTransition;
437
+ if (!e.B) e.B = activeTransition;
421
438
  }
422
- if (this.Z !== activeTransition.Z) {
423
- for (const e of this.Z) activeTransition.Z.add(e);
424
- this.Z = activeTransition.Z;
439
+ if (this.X !== activeTransition.X) {
440
+ for (const e of this.X) activeTransition.X.add(e);
441
+ this.X = activeTransition.X;
425
442
  }
426
443
  }
427
444
  }
428
445
  function insertSubs(e, t = false) {
429
- const n = e.q || currentOptimisticLane;
430
- const i = e.de !== undefined;
446
+ const n = e.ee || currentOptimisticLane;
447
+ const i = e.Te !== undefined;
431
448
  for (let r = e.I; r !== null; r = r.h) {
432
- if (i && r.p.Te) {
449
+ if (i && r.p.Se) {
433
450
  r.p.O |= REACTIVE_SNAPSHOT_STALE;
434
451
  continue;
435
452
  }
@@ -438,13 +455,13 @@ function insertSubs(e, t = false) {
438
455
  assignOrMergeLane(r.p, n);
439
456
  } else if (t) {
440
457
  r.p.O |= REACTIVE_OPTIMISTIC_DIRTY;
441
- r.p.q = undefined;
458
+ r.p.ee = undefined;
442
459
  }
443
460
  const e = r.p;
444
- if (e.W === EFFECT_TRACKED) {
445
- if (!e.H) {
446
- e.H = true;
447
- e.F.enqueue(EFFECT_USER, e.M);
461
+ if (e.F === EFFECT_TRACKED) {
462
+ if (!e.j) {
463
+ e.j = true;
464
+ e.$.enqueue(EFFECT_USER, e.K);
448
465
  }
449
466
  continue;
450
467
  }
@@ -454,16 +471,16 @@ function insertSubs(e, t = false) {
454
471
  }
455
472
  }
456
473
  function commitPendingNodes() {
457
- const e = globalQueue.se;
474
+ const e = globalQueue.oe;
458
475
  for (let t = 0; t < e.length; t++) {
459
476
  const n = e[t];
460
- if (n.X !== NOT_PENDING) {
461
- n.J = n.X;
462
- n.X = NOT_PENDING;
463
- if (n.W && n.W !== EFFECT_TRACKED) n.H = true;
477
+ if (n.U !== NOT_PENDING) {
478
+ n.te = n.U;
479
+ n.U = NOT_PENDING;
480
+ if (n.F && n.F !== EFFECT_TRACKED) n.j = true;
464
481
  }
465
- if (!(n.Se & STATUS_PENDING)) n.Se &= ~STATUS_UNINITIALIZED;
466
- if (n.L) GlobalQueue.ue(n, false, true);
482
+ if (!(n.Re & STATUS_PENDING)) n.Re &= ~STATUS_UNINITIALIZED;
483
+ if (n.L) GlobalQueue.ce(n, false, true);
467
484
  }
468
485
  e.length = 0;
469
486
  }
@@ -471,39 +488,40 @@ function finalizePureQueue(e = null, t = false) {
471
488
  const n = !t;
472
489
  if (n) commitPendingNodes();
473
490
  if (!t) checkBoundaryChildren(globalQueue);
474
- if (dirtyQueue.R >= dirtyQueue.P) runHeap(dirtyQueue, GlobalQueue.oe);
491
+ if (dirtyQueue.R >= dirtyQueue.P) runHeap(dirtyQueue, GlobalQueue.ue);
475
492
  if (n) {
476
493
  commitPendingNodes();
477
- resolveOptimisticNodes(e ? e.Y : globalQueue.Y);
478
- const t = e ? e.Z : globalQueue.Z;
479
- if (GlobalQueue.ce && t.size) {
494
+ resolveOptimisticNodes(e ? e.q : globalQueue.q);
495
+ const t = e ? e.X : globalQueue.X;
496
+ if (GlobalQueue.ae && t.size) {
480
497
  for (const e of t) {
481
- GlobalQueue.ce(e);
498
+ GlobalQueue.ae(e);
482
499
  }
483
500
  t.clear();
484
501
  schedule();
485
502
  }
503
+ sweepTransientStoreNodes();
486
504
  cleanupCompletedLanes(e);
487
505
  }
488
506
  }
489
507
  function checkBoundaryChildren(e) {
490
- for (const t of e.re) {
508
+ for (const t of e.se) {
491
509
  t.checkSources?.();
492
510
  checkBoundaryChildren(t);
493
511
  }
494
512
  }
495
513
  function trackOptimisticStore(e) {
496
- globalQueue.Z.add(e);
514
+ globalQueue.X.add(e);
497
515
  schedule();
498
516
  }
499
517
  function reassignPendingTransition(e) {
500
518
  for (let t = 0; t < e.length; t++) {
501
- e[t].K = activeTransition;
519
+ e[t].B = activeTransition;
502
520
  }
503
521
  }
504
522
  const globalQueue = new GlobalQueue();
505
523
  function flush() {
506
- if (globalQueue.ne) {
524
+ if (globalQueue.ie) {
507
525
  return;
508
526
  }
509
527
  while (scheduled || activeTransition) {
@@ -515,21 +533,21 @@ function runQueue(e, t) {
515
533
  }
516
534
  function reporterBlocksSource(e, t) {
517
535
  if (e.O & (REACTIVE_ZOMBIE | REACTIVE_DISPOSED)) return false;
518
- if (e.Re === t || e.Oe?.has(t)) return true;
536
+ if (e.Oe === t || e._e?.has(t)) return true;
519
537
  for (let n = e.C; n; n = n.D) {
520
538
  let e = n.m;
521
539
  while (e) {
522
540
  if (e === t || e.V === t) return true;
523
- e = e._e;
541
+ e = e.Ie;
524
542
  }
525
543
  }
526
- return !!(e.Se & STATUS_PENDING && e.fe instanceof NotReadyError && e.fe.source === t);
544
+ return !!(e.Re & STATUS_PENDING && e.Ee instanceof NotReadyError && e.Ee.source === t);
527
545
  }
528
546
  function transitionComplete(e) {
529
- if (e.j) return true;
530
- if (e.$.length) return false;
547
+ if (e.Y) return true;
548
+ if (e.Z.length) return false;
531
549
  let t = true;
532
- for (const [n, i] of e.B) {
550
+ for (const [n, i] of e.J) {
533
551
  let r = false;
534
552
  for (const e of i) {
535
553
  if (reporterBlocksSource(e, n)) {
@@ -538,32 +556,32 @@ function transitionComplete(e) {
538
556
  }
539
557
  i.delete(e);
540
558
  }
541
- if (!r) e.B.delete(n);
542
- else if (n.Se & STATUS_PENDING && n.fe?.source === n) {
559
+ if (!r) e.J.delete(n);
560
+ else if (n.Re & STATUS_PENDING && n.Ee?.source === n) {
543
561
  t = false;
544
562
  break;
545
563
  }
546
564
  }
547
565
  if (t) {
548
- for (let n = 0; n < e.Y.length; n++) {
549
- const i = e.Y[n];
566
+ for (let n = 0; n < e.q.length; n++) {
567
+ const i = e.q[n];
550
568
  if (
551
569
  hasActiveOverride(i) &&
552
- "Se" in i &&
553
- i.Se & STATUS_PENDING &&
554
- i.fe instanceof NotReadyError &&
555
- i.fe.source !== i
570
+ "Re" in i &&
571
+ i.Re & STATUS_PENDING &&
572
+ i.Ee instanceof NotReadyError &&
573
+ i.Ee.source !== i
556
574
  ) {
557
575
  t = false;
558
576
  break;
559
577
  }
560
578
  }
561
579
  }
562
- t && (e.j = true);
580
+ t && (e.Y = true);
563
581
  return t;
564
582
  }
565
583
  function currentTransition(e) {
566
- while (e.j && typeof e.j === "object") e = e.j;
584
+ while (e.Y && typeof e.Y === "object") e = e.Y;
567
585
  return e;
568
586
  }
569
587
  function setActiveTransition(e) {
@@ -585,75 +603,75 @@ function getOrCreateLane(e) {
585
603
  if (t) {
586
604
  return findLane(t);
587
605
  }
588
- const n = e._e;
589
- const i = n?.q ? findLane(n.q) : null;
590
- t = { te: e, k: new Set(), G: [[], []], U: null, K: activeTransition, Ie: i };
606
+ const n = e.Ie;
607
+ const i = n?.ee ? findLane(n.ee) : null;
608
+ t = { ne: e, H: new Set(), M: [[], []], W: null, B: activeTransition, he: i };
591
609
  signalLanes.set(e, t);
592
610
  activeLanes.add(t);
593
- e.he = false;
611
+ e.pe = false;
594
612
  return t;
595
613
  }
596
614
  function findLane(e) {
597
- while (e.U) e = e.U;
615
+ while (e.W) e = e.W;
598
616
  return e;
599
617
  }
600
618
  function mergeLanes(e, t) {
601
619
  e = findLane(e);
602
620
  t = findLane(t);
603
621
  if (e === t) return e;
604
- t.U = e;
605
- for (const n of t.k) e.k.add(n);
606
- e.G[0].push(...t.G[0]);
607
- e.G[1].push(...t.G[1]);
622
+ t.W = e;
623
+ for (const n of t.H) e.H.add(n);
624
+ e.M[0].push(...t.M[0]);
625
+ e.M[1].push(...t.M[1]);
608
626
  return e;
609
627
  }
610
628
  function resolveLane(e) {
611
- const t = e.q;
629
+ const t = e.ee;
612
630
  if (!t) return undefined;
613
631
  const n = findLane(t);
614
632
  if (activeLanes.has(n)) return n;
615
- e.q = undefined;
633
+ e.ee = undefined;
616
634
  return undefined;
617
635
  }
618
636
  function resolveTransition(e) {
619
- return resolveLane(e)?.K ?? e.K;
637
+ return resolveLane(e)?.B ?? e.B;
620
638
  }
621
639
  function hasActiveOverride(e) {
622
- return !!(e.ee !== undefined && e.ee !== NOT_PENDING);
640
+ return !!(e.k !== undefined && e.k !== NOT_PENDING);
623
641
  }
624
642
  function assignOrMergeLane(e, t) {
625
643
  const n = findLane(t);
626
- const i = e.q;
644
+ const i = e.ee;
627
645
  if (i) {
628
- if (i.U) {
629
- e.q = t;
646
+ if (i.W) {
647
+ e.ee = t;
630
648
  return;
631
649
  }
632
650
  const r = findLane(i);
633
651
  if (activeLanes.has(r)) {
634
652
  if (r !== n && !hasActiveOverride(e)) {
635
- if (n.Ie && findLane(n.Ie) === r) {
636
- e.q = t;
637
- } else if (r.Ie && findLane(r.Ie) === n);
653
+ if (n.he && findLane(n.he) === r) {
654
+ e.ee = t;
655
+ } else if (r.he && findLane(r.he) === n);
638
656
  else mergeLanes(n, r);
639
657
  }
640
658
  return;
641
659
  }
642
660
  }
643
- e.q = t;
661
+ e.ee = t;
644
662
  }
645
663
  function unlinkSubs(e) {
646
664
  const t = e.m;
647
665
  const n = e.D;
648
666
  const i = e.h;
649
- const r = e.pe;
650
- if (i !== null) i.pe = r;
651
- else t.Ae = r;
667
+ const r = e.Ae;
668
+ if (i !== null) i.Ae = r;
669
+ else t.Ne = r;
652
670
  if (r !== null) r.h = i;
653
671
  else {
654
672
  t.I = i;
655
673
  if (i === null) {
656
- t.Ne?.();
674
+ t.G?.();
657
675
  t.L && !t.Pe && !(t.O & REACTIVE_ZOMBIE) && unobserved(t);
658
676
  }
659
677
  }
@@ -681,9 +699,9 @@ function link(e, t) {
681
699
  return;
682
700
  }
683
701
  }
684
- const s = e.Ae;
702
+ const s = e.Ne;
685
703
  if (s !== null && s.p === t && (!r || isValidLink(s, t))) return;
686
- const o = (t.ge = e.Ae = { m: e, p: t, D: i, pe: s, h: null });
704
+ const o = (t.ge = e.Ne = { m: e, p: t, D: i, Ae: s, h: null });
687
705
  if (n !== null) n.D = o;
688
706
  else t.C = o;
689
707
  if (s !== null) s.h = o;
@@ -747,12 +765,12 @@ function disposeChildren(e, t = false, n) {
747
765
  e.ve = null;
748
766
  } else {
749
767
  e.Ce = null;
750
- e.we = 0;
768
+ e.me = 0;
751
769
  }
752
770
  runDisposal(e, n);
753
771
  }
754
772
  function runDisposal(e, t) {
755
- let n = t ? e.me : e.Ve;
773
+ let n = t ? e.we : e.Ve;
756
774
  if (!n) return;
757
775
  if (Array.isArray(n)) {
758
776
  for (let e = 0; e < n.length; e++) {
@@ -762,12 +780,12 @@ function runDisposal(e, t) {
762
780
  } else {
763
781
  n.call(n);
764
782
  }
765
- t ? (e.me = null) : (e.Ve = null);
783
+ t ? (e.we = null) : (e.Ve = null);
766
784
  }
767
785
  function childId(e, t) {
768
786
  let n = e;
769
787
  while (n.be && n.i) n = n.i;
770
- if (n.id != null) return formatId(n.id, t ? n.we++ : n.we);
788
+ if (n.id != null) return formatId(n.id, t ? n.me++ : n.me);
771
789
  throw new Error("Cannot get child id from owner without an id");
772
790
  }
773
791
  function getNextChildId(e) {
@@ -809,10 +827,10 @@ function createOwner(e) {
809
827
  Ce: null,
810
828
  De: null,
811
829
  Ve: null,
812
- F: t?.F ?? globalQueue,
830
+ $: t?.$ ?? globalQueue,
813
831
  Le: t?.Le || defaultContext,
814
- we: 0,
815
- me: null,
832
+ me: 0,
833
+ we: null,
816
834
  ve: null,
817
835
  i: t,
818
836
  dispose(e = true) {
@@ -835,51 +853,51 @@ function createRoot(e, t) {
835
853
  return runWithOwner(n, () => e(n.dispose));
836
854
  }
837
855
  function addPendingSource(e, t) {
838
- if (e.Re === t || e.Oe?.has(t)) return false;
839
- if (!e.Re) {
840
- e.Re = t;
856
+ if (e.Oe === t || e._e?.has(t)) return false;
857
+ if (!e.Oe) {
858
+ e.Oe = t;
841
859
  return true;
842
860
  }
843
- if (!e.Oe) {
844
- e.Oe = new Set([e.Re, t]);
861
+ if (!e._e) {
862
+ e._e = new Set([e.Oe, t]);
845
863
  } else {
846
- e.Oe.add(t);
864
+ e._e.add(t);
847
865
  }
848
- e.Re = undefined;
866
+ e.Oe = undefined;
849
867
  return true;
850
868
  }
851
869
  function removePendingSource(e, t) {
852
- if (e.Re) {
853
- if (e.Re !== t) return false;
854
- e.Re = undefined;
870
+ if (e.Oe) {
871
+ if (e.Oe !== t) return false;
872
+ e.Oe = undefined;
855
873
  return true;
856
874
  }
857
- if (!e.Oe?.delete(t)) return false;
858
- if (e.Oe.size === 1) {
859
- e.Re = e.Oe.values().next().value;
860
- e.Oe = undefined;
861
- } else if (e.Oe.size === 0) {
862
- e.Oe = undefined;
875
+ if (!e._e?.delete(t)) return false;
876
+ if (e._e.size === 1) {
877
+ e.Oe = e._e.values().next().value;
878
+ e._e = undefined;
879
+ } else if (e._e.size === 0) {
880
+ e._e = undefined;
863
881
  }
864
882
  return true;
865
883
  }
866
884
  function clearPendingSources(e) {
867
- e.Re = undefined;
868
- e.Oe?.clear();
869
885
  e.Oe = undefined;
886
+ e._e?.clear();
887
+ e._e = undefined;
870
888
  }
871
889
  function setPendingError(e, t, n) {
872
890
  if (!t) {
873
- e.fe = null;
891
+ e.Ee = null;
874
892
  return;
875
893
  }
876
894
  if (n instanceof NotReadyError && n.source === t) {
877
- e.fe = n;
895
+ e.Ee = n;
878
896
  return;
879
897
  }
880
- const i = e.fe;
898
+ const i = e.Ee;
881
899
  if (!(i instanceof NotReadyError) || i.source !== t) {
882
- e.fe = new NotReadyError(t);
900
+ e.Ee = new NotReadyError(t);
883
901
  }
884
902
  }
885
903
  function forEachDependent(e, t) {
@@ -894,21 +912,21 @@ function settlePendingSource(e) {
894
912
  const settle = i => {
895
913
  if (n.has(i) || !removePendingSource(i, e)) return;
896
914
  n.add(i);
897
- i.Ee = clock;
898
- const r = i.Re ?? i.Oe?.values().next().value;
915
+ i.de = clock;
916
+ const r = i.Oe ?? i._e?.values().next().value;
899
917
  if (r) {
900
918
  setPendingError(i, r);
901
919
  updatePendingSignal(i);
902
920
  } else {
903
- i.Se &= ~STATUS_PENDING;
921
+ i.Re &= ~STATUS_PENDING;
904
922
  setPendingError(i);
905
923
  updatePendingSignal(i);
906
924
  if (i.Ue) {
907
- if (i.W === EFFECT_TRACKED) {
925
+ if (i.F === EFFECT_TRACKED) {
908
926
  const e = i;
909
- if (!e.H) {
910
- e.H = true;
911
- e.F.enqueue(EFFECT_USER, e.M);
927
+ if (!e.j) {
928
+ e.j = true;
929
+ e.$.enqueue(EFFECT_USER, e.K);
912
930
  }
913
931
  } else {
914
932
  const e = i.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
@@ -938,33 +956,33 @@ function handleAsync(e, t, n) {
938
956
  if (e.ye !== t) return;
939
957
  globalQueue.initTransition(resolveTransition(e));
940
958
  notifyStatus(e, n instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR, n);
941
- e.Ee = clock;
959
+ e.de = clock;
942
960
  };
943
961
  const asyncWrite = (i, r) => {
944
962
  if (e.ye !== t) return;
945
963
  if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY)) return;
946
964
  globalQueue.initTransition(resolveTransition(e));
947
- const s = !!(e.Se & STATUS_UNINITIALIZED);
965
+ const s = !!(e.Re & STATUS_UNINITIALIZED);
948
966
  clearStatus(e);
949
967
  const o = resolveLane(e);
950
- if (o) o.k.delete(e);
968
+ if (o) o.H.delete(e);
951
969
  if (n) n(i);
952
- else if (e.ee !== undefined) {
953
- if (e.ee !== undefined && e.ee !== NOT_PENDING) e.X = i;
970
+ else if (e.k !== undefined) {
971
+ if (e.k !== undefined && e.k !== NOT_PENDING) e.U = i;
954
972
  else {
955
- e.J = i;
973
+ e.te = i;
956
974
  insertSubs(e);
957
975
  }
958
- e.Ee = clock;
976
+ e.de = clock;
959
977
  } else if (o) {
960
- const t = e.W;
961
- const n = e.J;
978
+ const t = e.F;
979
+ const n = e.te;
962
980
  const r = e.ke;
963
981
  if ((!t && s) || !r || !r(i, n)) {
964
- e.J = i;
965
- e.Ee = clock;
966
- if (e.xe) {
967
- setSignal(e.xe, i);
982
+ e.te = i;
983
+ e.de = clock;
984
+ if (e.Ge) {
985
+ setSignal(e.Ge, i);
968
986
  }
969
987
  insertSubs(e, true);
970
988
  }
@@ -1055,27 +1073,27 @@ function handleAsync(e, t, n) {
1055
1073
  function clearStatus(e, t = false) {
1056
1074
  clearPendingSources(e);
1057
1075
  e.Ue = false;
1058
- e.Se = t ? 0 : e.Se & STATUS_UNINITIALIZED;
1076
+ e.Re = t ? 0 : e.Re & STATUS_UNINITIALIZED;
1059
1077
  setPendingError(e);
1060
1078
  updatePendingSignal(e);
1061
- e.Ge?.();
1079
+ e.xe?.();
1062
1080
  }
1063
1081
  function notifyStatus(e, t, n, i, r) {
1064
1082
  if (t === STATUS_ERROR && !(n instanceof StatusError) && !(n instanceof NotReadyError))
1065
1083
  n = new StatusError(e, n);
1066
1084
  const s = t === STATUS_PENDING && n instanceof NotReadyError ? n.source : undefined;
1067
1085
  const o = s === e;
1068
- const u = t === STATUS_PENDING && e.ee !== undefined && !o;
1086
+ const u = t === STATUS_PENDING && e.k !== undefined && !o;
1069
1087
  const c = u && hasActiveOverride(e);
1070
1088
  if (!i) {
1071
1089
  if (t === STATUS_PENDING && s) {
1072
1090
  addPendingSource(e, s);
1073
- e.Se = STATUS_PENDING | (e.Se & STATUS_UNINITIALIZED);
1091
+ e.Re = STATUS_PENDING | (e.Re & STATUS_UNINITIALIZED);
1074
1092
  setPendingError(e, s, n);
1075
1093
  } else {
1076
1094
  clearPendingSources(e);
1077
- e.Se = t | (t !== STATUS_ERROR ? e.Se & STATUS_UNINITIALIZED : 0);
1078
- e.fe = n;
1095
+ e.Re = t | (t !== STATUS_ERROR ? e.Re & STATUS_UNINITIALIZED : 0);
1096
+ e.Ee = n;
1079
1097
  }
1080
1098
  updatePendingSignal(e);
1081
1099
  }
@@ -1084,24 +1102,24 @@ function notifyStatus(e, t, n, i, r) {
1084
1102
  }
1085
1103
  const a = i || c;
1086
1104
  const l = i || u ? undefined : r;
1087
- if (e.Ge) {
1105
+ if (e.xe) {
1088
1106
  if (i && t === STATUS_PENDING) {
1089
1107
  return;
1090
1108
  }
1091
1109
  if (a) {
1092
- e.Ge(t, n);
1110
+ e.xe(t, n);
1093
1111
  } else {
1094
- e.Ge();
1112
+ e.xe();
1095
1113
  }
1096
1114
  return;
1097
1115
  }
1098
1116
  forEachDependent(e, e => {
1099
- e.Ee = clock;
1117
+ e.de = clock;
1100
1118
  if (
1101
- (t === STATUS_PENDING && s && e.Re !== s && !e.Oe?.has(s)) ||
1102
- (t !== STATUS_PENDING && (e.fe !== n || e.Re || e.Oe))
1119
+ (t === STATUS_PENDING && s && e.Oe !== s && !e._e?.has(s)) ||
1120
+ (t !== STATUS_PENDING && (e.Ee !== n || e.Oe || e._e))
1103
1121
  ) {
1104
- if (!a && !e.K) globalQueue.se.push(e);
1122
+ if (!a && !e.B) globalQueue.oe.push(e);
1105
1123
  notifyStatus(e, t, n, a, l);
1106
1124
  }
1107
1125
  });
@@ -1129,8 +1147,8 @@ function enableExternalSource(e) {
1129
1147
  externalSourceConfig = { factory: t, untrack: n };
1130
1148
  }
1131
1149
  }
1132
- GlobalQueue.oe = recompute;
1133
- GlobalQueue.ue = disposeChildren;
1150
+ GlobalQueue.ue = recompute;
1151
+ GlobalQueue.ce = disposeChildren;
1134
1152
  let tracking = false;
1135
1153
  let stale = false;
1136
1154
  let refreshing = false;
@@ -1169,7 +1187,7 @@ function releaseSubtree(e) {
1169
1187
  }
1170
1188
  if (t.L) {
1171
1189
  const e = t;
1172
- e.Te = false;
1190
+ e.Se = false;
1173
1191
  if (e.O & REACTIVE_SNAPSHOT_STALE) {
1174
1192
  e.O &= ~REACTIVE_SNAPSHOT_STALE;
1175
1193
  e.O |= REACTIVE_DIRTY;
@@ -1184,7 +1202,7 @@ function releaseSubtree(e) {
1184
1202
  function clearSnapshots() {
1185
1203
  if (snapshotSources) {
1186
1204
  for (const e of snapshotSources) {
1187
- delete e.de;
1205
+ delete e.Te;
1188
1206
  delete e[STORE_SNAPSHOT_PROPS];
1189
1207
  }
1190
1208
  snapshotSources = null;
@@ -1192,32 +1210,32 @@ function clearSnapshots() {
1192
1210
  snapshotCaptureActive = false;
1193
1211
  }
1194
1212
  function recompute(e, t = false) {
1195
- const n = e.W;
1213
+ const n = e.F;
1196
1214
  if (!t) {
1197
- if (e.K && (!n || activeTransition) && activeTransition !== e.K)
1198
- globalQueue.initTransition(e.K);
1215
+ if (e.B && (!n || activeTransition) && activeTransition !== e.B)
1216
+ globalQueue.initTransition(e.B);
1199
1217
  deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
1200
1218
  e.ye = null;
1201
- if (e.K || n === EFFECT_TRACKED) disposeChildren(e);
1219
+ if (e.B || n === EFFECT_TRACKED) disposeChildren(e);
1202
1220
  else {
1203
1221
  markDisposal(e);
1204
- e.me = e.Ve;
1222
+ e.we = e.Ve;
1205
1223
  e.ve = e.Ce;
1206
1224
  e.Ve = null;
1207
1225
  e.Ce = null;
1208
- e.we = 0;
1226
+ e.me = 0;
1209
1227
  }
1210
1228
  }
1211
1229
  const i = !!(e.O & REACTIVE_OPTIMISTIC_DIRTY);
1212
- const r = e.ee !== undefined && e.ee !== NOT_PENDING;
1213
- const s = !!(e.Se & STATUS_PENDING);
1214
- const o = !!(e.Se & STATUS_UNINITIALIZED);
1230
+ const r = e.k !== undefined && e.k !== NOT_PENDING;
1231
+ const s = !!(e.Re & STATUS_PENDING);
1232
+ const o = !!(e.Re & STATUS_UNINITIALIZED);
1215
1233
  const u = context;
1216
1234
  context = e;
1217
1235
  e.ge = null;
1218
1236
  e.O = REACTIVE_RECOMPUTING_DEPS;
1219
- e.Ee = clock;
1220
- let c = e.X === NOT_PENDING ? e.J : e.X;
1237
+ e.de = clock;
1238
+ let c = e.U === NOT_PENDING ? e.te : e.U;
1221
1239
  let a = e.o;
1222
1240
  let l = tracking;
1223
1241
  let f = currentOptimisticLane;
@@ -1227,20 +1245,22 @@ function recompute(e, t = false) {
1227
1245
  if (t) currentOptimisticLane = t;
1228
1246
  }
1229
1247
  try {
1230
- c = handleAsync(e, e.L(c));
1248
+ const n = e.ye;
1249
+ const i = e.L(c);
1250
+ c = e.ye !== n ? i : handleAsync(e, i);
1231
1251
  clearStatus(e, t);
1232
- const n = resolveLane(e);
1233
- if (n) {
1234
- n.k.delete(e);
1235
- updatePendingSignal(n.te);
1252
+ const r = resolveLane(e);
1253
+ if (r) {
1254
+ r.H.delete(e);
1255
+ updatePendingSignal(r.ne);
1236
1256
  }
1237
1257
  } catch (t) {
1238
1258
  if (t instanceof NotReadyError && currentOptimisticLane) {
1239
1259
  const t = findLane(currentOptimisticLane);
1240
- if (t.te !== e) {
1241
- t.k.add(e);
1242
- e.q = t;
1243
- updatePendingSignal(t.te);
1260
+ if (t.ne !== e) {
1261
+ t.H.add(e);
1262
+ e.ee = t;
1263
+ updatePendingSignal(t.ne);
1244
1264
  }
1245
1265
  }
1246
1266
  if (t instanceof NotReadyError) e.Ue = true;
@@ -1249,14 +1269,14 @@ function recompute(e, t = false) {
1249
1269
  t instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR,
1250
1270
  t,
1251
1271
  undefined,
1252
- t instanceof NotReadyError ? e.q : undefined
1272
+ t instanceof NotReadyError ? e.ee : undefined
1253
1273
  );
1254
1274
  } finally {
1255
1275
  tracking = l;
1256
1276
  e.O = REACTIVE_NONE | (t ? e.O & REACTIVE_SNAPSHOT_STALE : 0);
1257
1277
  context = u;
1258
1278
  }
1259
- if (!e.fe) {
1279
+ if (!e.Ee) {
1260
1280
  const u = e.ge;
1261
1281
  let l = u !== null ? u.D : e.C;
1262
1282
  if (l !== null) {
@@ -1266,21 +1286,21 @@ function recompute(e, t = false) {
1266
1286
  if (u !== null) u.D = null;
1267
1287
  else e.C = null;
1268
1288
  }
1269
- const f = r ? e.ee : e.X === NOT_PENDING ? e.J : e.X;
1289
+ const f = r ? e.k : e.U === NOT_PENDING ? e.te : e.U;
1270
1290
  const E = (!n && o) || !e.ke || !e.ke(f, c);
1271
1291
  if (E) {
1272
- const o = r ? e.ee : undefined;
1273
- if (t || (n && activeTransition !== e.K) || i) {
1274
- e.J = c;
1292
+ const o = r ? e.k : undefined;
1293
+ if (t || (n && activeTransition !== e.B) || i) {
1294
+ e.te = c;
1275
1295
  if (r && i) {
1276
- e.ee = c;
1277
- e.X = c;
1296
+ e.k = c;
1297
+ e.U = c;
1278
1298
  }
1279
- } else e.X = c;
1280
- if (r && !i && s && !e.he) e.ee = c;
1281
- if (!r || i || e.ee !== o) insertSubs(e, i || r);
1299
+ } else e.U = c;
1300
+ if (r && !i && s && !e.pe) e.k = c;
1301
+ if (!r || i || e.k !== o) insertSubs(e, i || r);
1282
1302
  } else if (r) {
1283
- e.X = c;
1303
+ e.U = c;
1284
1304
  } else if (e.o != a) {
1285
1305
  for (let t = e.I; t !== null; t = t.h) {
1286
1306
  insertIntoHeapHeight(t.p, t.p.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
@@ -1288,8 +1308,8 @@ function recompute(e, t = false) {
1288
1308
  }
1289
1309
  }
1290
1310
  currentOptimisticLane = f;
1291
- (!t || e.Se & STATUS_PENDING) && !e.K && !(activeTransition && r) && globalQueue.se.push(e);
1292
- e.K && n && activeTransition !== e.K && runInTransition(e.K, () => recompute(e));
1311
+ (!t || e.Re & STATUS_PENDING) && !e.B && !(activeTransition && r) && globalQueue.oe.push(e);
1312
+ e.B && n && activeTransition !== e.B && runInTransition(e.B, () => recompute(e));
1293
1313
  }
1294
1314
  function updateIfNecessary(e) {
1295
1315
  if (e.O & REACTIVE_CHECK) {
@@ -1304,25 +1324,25 @@ function updateIfNecessary(e) {
1304
1324
  }
1305
1325
  }
1306
1326
  }
1307
- if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY) || (e.fe && e.Ee < clock && !e.ye)) {
1327
+ if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY) || (e.Ee && e.de < clock && !e.ye)) {
1308
1328
  recompute(e);
1309
1329
  }
1310
1330
  e.O = e.O & (REACTIVE_SNAPSHOT_STALE | REACTIVE_IN_HEAP | REACTIVE_IN_HEAP_HEIGHT);
1311
1331
  }
1312
- function computed(e, t, n) {
1313
- const i = n?.transparent ?? false;
1314
- const r = {
1315
- id: n?.id ?? (i ? context?.id : context?.id != null ? getNextChildId(context) : undefined),
1316
- be: i || undefined,
1317
- ke: n?.equals != null ? n.equals : isEqual,
1318
- le: !!n?.ownedWrite,
1319
- Ne: n?.unobserved,
1332
+ function computed(e, t) {
1333
+ const n = t?.transparent ?? false;
1334
+ const i = {
1335
+ id: t?.id ?? (n ? context?.id : context?.id != null ? getNextChildId(context) : undefined),
1336
+ be: n || undefined,
1337
+ ke: t?.equals != null ? t.equals : isEqual,
1338
+ fe: !!t?.ownedWrite,
1339
+ G: t?.unobserved,
1320
1340
  Ve: null,
1321
- F: context?.F ?? globalQueue,
1341
+ $: context?.$ ?? globalQueue,
1322
1342
  Le: context?.Le ?? defaultContext,
1323
- we: 0,
1343
+ me: 0,
1324
1344
  L: e,
1325
- J: t,
1345
+ te: undefined,
1326
1346
  o: 0,
1327
1347
  A: null,
1328
1348
  S: undefined,
@@ -1330,82 +1350,82 @@ function computed(e, t, n) {
1330
1350
  C: null,
1331
1351
  ge: null,
1332
1352
  I: null,
1333
- Ae: null,
1353
+ Ne: null,
1334
1354
  i: context,
1335
1355
  De: null,
1336
1356
  Ce: null,
1337
- O: n?.lazy ? REACTIVE_LAZY : REACTIVE_NONE,
1338
- Se: STATUS_UNINITIALIZED,
1339
- Ee: clock,
1340
- X: NOT_PENDING,
1341
- me: null,
1357
+ O: t?.lazy ? REACTIVE_LAZY : REACTIVE_NONE,
1358
+ Re: STATUS_UNINITIALIZED,
1359
+ de: clock,
1360
+ U: NOT_PENDING,
1361
+ we: null,
1342
1362
  ve: null,
1343
1363
  ye: null,
1344
- K: null
1364
+ B: null
1345
1365
  };
1346
- r.T = r;
1347
- const s = context?.t ? context.u : context;
1366
+ i.T = i;
1367
+ const r = context?.t ? context.u : context;
1348
1368
  if (context) {
1349
1369
  const e = context.Ce;
1350
1370
  if (e === null) {
1351
- context.Ce = r;
1371
+ context.Ce = i;
1352
1372
  } else {
1353
- r.De = e;
1354
- context.Ce = r;
1373
+ i.De = e;
1374
+ context.Ce = i;
1355
1375
  }
1356
1376
  }
1357
- if (s) r.o = s.o + 1;
1358
- if (snapshotCaptureActive && ownerInSnapshotScope(context)) r.Te = true;
1377
+ if (r) i.o = r.o + 1;
1378
+ if (snapshotCaptureActive && ownerInSnapshotScope(context)) i.Se = true;
1359
1379
  if (externalSourceConfig) {
1360
1380
  const e = signal(undefined, { equals: false, ownedWrite: true });
1361
- const t = externalSourceConfig.factory(r.L, () => {
1381
+ const t = externalSourceConfig.factory(i.L, () => {
1362
1382
  setSignal(e, undefined);
1363
1383
  });
1364
1384
  cleanup(() => t.dispose());
1365
- r.L = n => {
1385
+ i.L = n => {
1366
1386
  read(e);
1367
1387
  return t.track(n);
1368
1388
  };
1369
1389
  }
1370
- !n?.lazy && recompute(r, true);
1371
- if (snapshotCaptureActive && !n?.lazy) {
1372
- if (!(r.Se & STATUS_PENDING)) {
1373
- r.de = r.J === undefined ? NO_SNAPSHOT : r.J;
1374
- snapshotSources.add(r);
1390
+ !t?.lazy && recompute(i, true);
1391
+ if (snapshotCaptureActive && !t?.lazy) {
1392
+ if (!(i.Re & STATUS_PENDING)) {
1393
+ i.Te = i.te === undefined ? NO_SNAPSHOT : i.te;
1394
+ snapshotSources.add(i);
1375
1395
  }
1376
1396
  }
1377
- return r;
1397
+ return i;
1378
1398
  }
1379
1399
  function signal(e, t, n = null) {
1380
1400
  const i = {
1381
1401
  ke: t?.equals != null ? t.equals : isEqual,
1382
- le: !!t?.ownedWrite,
1402
+ fe: !!t?.ownedWrite,
1383
1403
  He: !!t?.He,
1384
- Ne: t?.unobserved,
1385
- J: e,
1404
+ G: t?.unobserved,
1405
+ te: e,
1386
1406
  I: null,
1387
- Ae: null,
1388
- Ee: clock,
1407
+ Ne: null,
1408
+ de: clock,
1389
1409
  V: n,
1390
1410
  N: n?.A || null,
1391
- X: NOT_PENDING
1411
+ U: NOT_PENDING
1392
1412
  };
1393
1413
  n && (n.A = i);
1394
- if (snapshotCaptureActive && !i.He && !((n?.Se ?? 0) & STATUS_PENDING)) {
1395
- i.de = e === undefined ? NO_SNAPSHOT : e;
1414
+ if (snapshotCaptureActive && !i.He && !((n?.Re ?? 0) & STATUS_PENDING)) {
1415
+ i.Te = e === undefined ? NO_SNAPSHOT : e;
1396
1416
  snapshotSources.add(i);
1397
1417
  }
1398
1418
  return i;
1399
1419
  }
1400
1420
  function optimisticSignal(e, t) {
1401
1421
  const n = signal(e, t);
1402
- n.ee = NOT_PENDING;
1422
+ n.k = NOT_PENDING;
1403
1423
  return n;
1404
1424
  }
1405
- function optimisticComputed(e, t, n) {
1406
- const i = computed(e, t, n);
1407
- i.ee = NOT_PENDING;
1408
- return i;
1425
+ function optimisticComputed(e, t) {
1426
+ const n = computed(e, t);
1427
+ n.k = NOT_PENDING;
1428
+ return n;
1409
1429
  }
1410
1430
  function isEqual(e, t) {
1411
1431
  return e === t;
@@ -1426,7 +1446,7 @@ function read(e) {
1426
1446
  const t = getLatestValueComputed(e);
1427
1447
  const n = latestReadActive;
1428
1448
  latestReadActive = false;
1429
- const i = e.ee !== undefined && e.ee !== NOT_PENDING ? e.ee : e.J;
1449
+ const i = e.k !== undefined && e.k !== NOT_PENDING ? e.k : e.te;
1430
1450
  let r;
1431
1451
  try {
1432
1452
  r = read(t);
@@ -1436,11 +1456,11 @@ function read(e) {
1436
1456
  } finally {
1437
1457
  latestReadActive = n;
1438
1458
  }
1439
- if (t.Se & STATUS_PENDING) return i;
1440
- if (stale && currentOptimisticLane && t.q) {
1441
- const e = findLane(t.q);
1459
+ if (t.Re & STATUS_PENDING) return i;
1460
+ if (stale && currentOptimisticLane && t.ee) {
1461
+ const e = findLane(t.ee);
1442
1462
  const n = findLane(currentOptimisticLane);
1443
- if (e !== n && e.k.size > 0) {
1463
+ if (e !== n && e.H.size > 0) {
1444
1464
  return i;
1445
1465
  }
1446
1466
  }
@@ -1450,8 +1470,8 @@ function read(e) {
1450
1470
  const t = e.V;
1451
1471
  const n = pendingCheckActive;
1452
1472
  pendingCheckActive = false;
1453
- if (t && e.ee !== undefined) {
1454
- if (e.ee !== NOT_PENDING && (t.ye || !!(t.Se & STATUS_PENDING))) {
1473
+ if (t && e.k !== undefined) {
1474
+ if (e.k !== NOT_PENDING && (t.ye || !!(t.Re & STATUS_PENDING))) {
1455
1475
  foundPending = true;
1456
1476
  }
1457
1477
  let n = context;
@@ -1464,7 +1484,7 @@ function read(e) {
1464
1484
  if (t && read(getPendingSignal(t))) foundPending = true;
1465
1485
  }
1466
1486
  pendingCheckActive = n;
1467
- return e.J;
1487
+ return e.te;
1468
1488
  }
1469
1489
  let t = context;
1470
1490
  if (t?.t) t = t.u;
@@ -1495,59 +1515,59 @@ function read(e) {
1495
1515
  }
1496
1516
  }
1497
1517
  }
1498
- if (i.Se & STATUS_PENDING) {
1499
- if (t && !(stale && i.K && activeTransition !== i.K)) {
1518
+ if (i.Re & STATUS_PENDING) {
1519
+ if (t && !(stale && i.B && activeTransition !== i.B)) {
1500
1520
  if (currentOptimisticLane) {
1501
- const n = i.q;
1521
+ const n = i.ee;
1502
1522
  const r = findLane(currentOptimisticLane);
1503
1523
  if (n && findLane(n) === r && !hasActiveOverride(i)) {
1504
1524
  if (!tracking && e !== t) link(e, t);
1505
- throw i.fe;
1525
+ throw i.Ee;
1506
1526
  }
1507
1527
  } else {
1508
1528
  if (!tracking && e !== t) link(e, t);
1509
- throw i.fe;
1529
+ throw i.Ee;
1510
1530
  }
1511
- } else if (t && i !== e && i.Se & STATUS_UNINITIALIZED) {
1531
+ } else if (t && i !== e && i.Re & STATUS_UNINITIALIZED) {
1512
1532
  if (!tracking && e !== t) link(e, t);
1513
- throw i.fe;
1514
- } else if (!t && i.Se & STATUS_UNINITIALIZED) {
1515
- throw i.fe;
1533
+ throw i.Ee;
1534
+ } else if (!t && i.Re & STATUS_UNINITIALIZED) {
1535
+ throw i.Ee;
1516
1536
  }
1517
1537
  }
1518
- if (e.L && e.Se & STATUS_ERROR) {
1519
- if (e.Ee < clock) {
1538
+ if (e.L && e.Re & STATUS_ERROR) {
1539
+ if (e.de < clock) {
1520
1540
  recompute(e);
1521
1541
  return read(e);
1522
- } else throw e.fe;
1542
+ } else throw e.Ee;
1523
1543
  }
1524
- if (snapshotCaptureActive && t && t.Te) {
1525
- const n = e.de;
1544
+ if (snapshotCaptureActive && t && t.Se) {
1545
+ const n = e.Te;
1526
1546
  if (n !== undefined) {
1527
1547
  const i = n === NO_SNAPSHOT ? undefined : n;
1528
- const r = e.X !== NOT_PENDING ? e.X : e.J;
1548
+ const r = e.U !== NOT_PENDING ? e.U : e.te;
1529
1549
  if (r !== i) t.O |= REACTIVE_SNAPSHOT_STALE;
1530
1550
  return i;
1531
1551
  }
1532
1552
  }
1533
- if (e.ee !== undefined && e.ee !== NOT_PENDING) {
1534
- if (t && stale && shouldReadStashedOptimisticValue(e)) return e.J;
1535
- return e.ee;
1553
+ if (e.k !== undefined && e.k !== NOT_PENDING) {
1554
+ if (t && stale && shouldReadStashedOptimisticValue(e)) return e.te;
1555
+ return e.k;
1536
1556
  }
1537
1557
  const r =
1538
1558
  !t ||
1539
1559
  (currentOptimisticLane !== null &&
1540
- (e.ee !== undefined || e.q || (i === e && stale) || !!(i.Se & STATUS_PENDING))) ||
1541
- e.X === NOT_PENDING ||
1542
- (stale && e.K && activeTransition !== e.K)
1543
- ? e.J
1544
- : e.X;
1560
+ (e.k !== undefined || e.ee || (i === e && stale) || !!(i.Re & STATUS_PENDING))) ||
1561
+ e.U === NOT_PENDING ||
1562
+ (stale && e.B && activeTransition !== e.B)
1563
+ ? e.te
1564
+ : e.U;
1545
1565
  if (
1546
1566
  !t &&
1547
1567
  i === e &&
1548
1568
  typeof n.L === "function" &&
1549
1569
  !n.Pe &&
1550
- !(i.Se & STATUS_PENDING) &&
1570
+ !(i.Re & STATUS_PENDING) &&
1551
1571
  !n.i &&
1552
1572
  !e.I
1553
1573
  ) {
@@ -1556,12 +1576,12 @@ function read(e) {
1556
1576
  return r;
1557
1577
  }
1558
1578
  function setSignal(e, t) {
1559
- if (e.K && activeTransition !== e.K) globalQueue.initTransition(e.K);
1560
- const n = e.ee !== undefined && !projectionWriteActive;
1561
- const i = e.ee !== undefined && e.ee !== NOT_PENDING;
1562
- const r = n ? (i ? e.ee : e.J) : e.X === NOT_PENDING ? e.J : e.X;
1579
+ if (e.B && activeTransition !== e.B) globalQueue.initTransition(e.B);
1580
+ const n = e.k !== undefined && !projectionWriteActive;
1581
+ const i = e.k !== undefined && e.k !== NOT_PENDING;
1582
+ const r = n ? (i ? e.k : e.te) : e.U === NOT_PENDING ? e.te : e.U;
1563
1583
  if (typeof t === "function") t = t(r);
1564
- const s = !e.ke || !e.ke(r, t) || !!(e.Se & STATUS_UNINITIALIZED);
1584
+ const s = !e.ke || !e.ke(r, t) || !!(e.Re & STATUS_UNINITIALIZED);
1565
1585
  if (!s) {
1566
1586
  if (n && i && e.L) {
1567
1587
  insertSubs(e, true);
@@ -1570,25 +1590,25 @@ function setSignal(e, t) {
1570
1590
  return t;
1571
1591
  }
1572
1592
  if (n) {
1573
- const n = e.ee === NOT_PENDING;
1593
+ const n = e.k === NOT_PENDING;
1574
1594
  if (!n) globalQueue.initTransition(resolveTransition(e));
1575
1595
  if (n) {
1576
- e.X = e.J;
1577
- globalQueue.Y.push(e);
1596
+ e.U = e.te;
1597
+ globalQueue.q.push(e);
1578
1598
  }
1579
- e.he = true;
1599
+ e.pe = true;
1580
1600
  const i = getOrCreateLane(e);
1581
- e.q = i;
1582
- e.ee = t;
1601
+ e.ee = i;
1602
+ e.k = t;
1583
1603
  } else {
1584
- if (e.X === NOT_PENDING) globalQueue.se.push(e);
1585
- e.X = t;
1604
+ if (e.U === NOT_PENDING) globalQueue.oe.push(e);
1605
+ e.U = t;
1586
1606
  }
1587
1607
  updatePendingSignal(e);
1588
- if (e.xe) {
1589
- setSignal(e.xe, t);
1608
+ if (e.Ge) {
1609
+ setSignal(e.Ge, t);
1590
1610
  }
1591
- e.Ee = clock;
1611
+ e.de = clock;
1592
1612
  insertSubs(e, n);
1593
1613
  schedule();
1594
1614
  return t;
@@ -1606,68 +1626,68 @@ function runWithOwner(e, t) {
1606
1626
  }
1607
1627
  }
1608
1628
  function getPendingSignal(e) {
1609
- if (!e.Fe) {
1610
- e.Fe = optimisticSignal(false, { ownedWrite: true });
1611
- if (e._e) {
1612
- e.Fe._e = e;
1629
+ if (!e.Me) {
1630
+ e.Me = optimisticSignal(false, { ownedWrite: true });
1631
+ if (e.Ie) {
1632
+ e.Me.Ie = e;
1613
1633
  }
1614
- if (computePendingState(e)) setSignal(e.Fe, true);
1634
+ if (computePendingState(e)) setSignal(e.Me, true);
1615
1635
  }
1616
- return e.Fe;
1636
+ return e.Me;
1617
1637
  }
1618
1638
  function computePendingState(e) {
1619
1639
  const t = e;
1620
1640
  const n = e.V;
1621
- if (n && e.X !== NOT_PENDING) {
1622
- return !n.ye && !(n.Se & STATUS_PENDING);
1641
+ if (n && e.U !== NOT_PENDING) {
1642
+ return !n.ye && !(n.Re & STATUS_PENDING);
1623
1643
  }
1624
- if (e.ee !== undefined && e.ee !== NOT_PENDING) {
1625
- if (t.Se & STATUS_PENDING && !(t.Se & STATUS_UNINITIALIZED)) return true;
1626
- if (e._e) {
1627
- const t = e.q ? findLane(e.q) : null;
1628
- return !!(t && t.k.size > 0);
1644
+ if (e.k !== undefined && e.k !== NOT_PENDING) {
1645
+ if (t.Re & STATUS_PENDING && !(t.Re & STATUS_UNINITIALIZED)) return true;
1646
+ if (e.Ie) {
1647
+ const t = e.ee ? findLane(e.ee) : null;
1648
+ return !!(t && t.H.size > 0);
1629
1649
  }
1630
1650
  return true;
1631
1651
  }
1632
- if (e.ee !== undefined && e.ee === NOT_PENDING && !e._e) {
1652
+ if (e.k !== undefined && e.k === NOT_PENDING && !e.Ie) {
1633
1653
  return false;
1634
1654
  }
1635
- if (e.X !== NOT_PENDING && !(t.Se & STATUS_UNINITIALIZED)) return true;
1636
- return !!(t.Se & STATUS_PENDING && !(t.Se & STATUS_UNINITIALIZED));
1655
+ if (e.U !== NOT_PENDING && !(t.Re & STATUS_UNINITIALIZED)) return true;
1656
+ return !!(t.Re & STATUS_PENDING && !(t.Re & STATUS_UNINITIALIZED));
1637
1657
  }
1638
1658
  function updatePendingSignal(e) {
1639
- if (e.Fe) {
1659
+ if (e.Me) {
1640
1660
  const t = computePendingState(e);
1641
- const n = e.Fe;
1661
+ const n = e.Me;
1642
1662
  setSignal(n, t);
1643
- if (!t && n.q) {
1663
+ if (!t && n.ee) {
1644
1664
  const t = resolveLane(e);
1645
- if (t && t.k.size > 0) {
1646
- const e = findLane(n.q);
1665
+ if (t && t.H.size > 0) {
1666
+ const e = findLane(n.ee);
1647
1667
  if (e !== t) {
1648
1668
  mergeLanes(t, e);
1649
1669
  }
1650
1670
  }
1651
1671
  signalLanes.delete(n);
1652
- n.q = undefined;
1672
+ n.ee = undefined;
1653
1673
  }
1654
1674
  }
1655
1675
  }
1656
1676
  function getLatestValueComputed(e) {
1657
- if (!e.xe) {
1677
+ if (!e.Ge) {
1658
1678
  const t = latestReadActive;
1659
1679
  latestReadActive = false;
1660
1680
  const n = pendingCheckActive;
1661
1681
  pendingCheckActive = false;
1662
1682
  const i = context;
1663
1683
  context = null;
1664
- e.xe = optimisticComputed(() => read(e));
1665
- e.xe._e = e;
1684
+ e.Ge = optimisticComputed(() => read(e));
1685
+ e.Ge.Ie = e;
1666
1686
  context = i;
1667
1687
  pendingCheckActive = n;
1668
1688
  latestReadActive = t;
1669
1689
  }
1670
- return e.xe;
1690
+ return e.Ge;
1671
1691
  }
1672
1692
  function staleValues(e, t = true) {
1673
1693
  const n = stale;
@@ -1746,29 +1766,30 @@ function hasContext(e, t) {
1746
1766
  function isUndefined(e) {
1747
1767
  return typeof e === "undefined";
1748
1768
  }
1749
- function effect(e, t, n, i, r) {
1750
- let s = false;
1751
- const o = computed(r?.render ? t => staleValues(() => e(t)) : e, i, {
1752
- ...r,
1769
+ function effect(e, t, n, i) {
1770
+ let r = false;
1771
+ const s = !!i?.user;
1772
+ const o = computed(s ? e : t => staleValues(() => e(t)), {
1773
+ ...i,
1753
1774
  equals: () => {
1754
- o.H = !o.fe;
1755
- if (s) o.F.enqueue(o.W, runEffect.bind(o));
1775
+ o.j = !o.Ee;
1776
+ if (r) o.$.enqueue(o.F, runEffect.bind(o));
1756
1777
  return false;
1757
1778
  },
1758
1779
  lazy: true
1759
1780
  });
1760
- o.Qe = i;
1761
- o.Me = t;
1781
+ o.Qe = undefined;
1782
+ o.Fe = t;
1762
1783
  o.je = n;
1763
1784
  o.$e = undefined;
1764
- o.W = r?.render ? EFFECT_RENDER : EFFECT_USER;
1765
- o.Ge = (e, t) => {
1766
- const n = e !== undefined ? e : o.Se;
1767
- const i = t !== undefined ? t : o.fe;
1785
+ o.F = s ? EFFECT_USER : EFFECT_RENDER;
1786
+ o.xe = (e, t) => {
1787
+ const n = e !== undefined ? e : o.Re;
1788
+ const i = t !== undefined ? t : o.Ee;
1768
1789
  if (n & STATUS_ERROR) {
1769
1790
  let e = i;
1770
- o.F.notify(o, STATUS_PENDING, 0);
1771
- if (o.W === EFFECT_USER) {
1791
+ o.$.notify(o, STATUS_PENDING, 0);
1792
+ if (o.F === EFFECT_USER) {
1772
1793
  try {
1773
1794
  return o.je
1774
1795
  ? o.je(e, () => {
@@ -1780,38 +1801,39 @@ function effect(e, t, n, i, r) {
1780
1801
  e = t;
1781
1802
  }
1782
1803
  }
1783
- if (!o.F.notify(o, STATUS_ERROR, STATUS_ERROR)) throw e;
1784
- } else if (o.W === EFFECT_RENDER) {
1785
- o.F.notify(o, STATUS_PENDING | STATUS_ERROR, n, i);
1804
+ if (!o.$.notify(o, STATUS_ERROR, STATUS_ERROR)) throw e;
1805
+ } else if (o.F === EFFECT_RENDER) {
1806
+ o.$.notify(o, STATUS_PENDING | STATUS_ERROR, n, i);
1786
1807
  }
1787
1808
  };
1788
1809
  recompute(o, true);
1789
- !r?.defer && (o.W === EFFECT_USER ? o.F.enqueue(o.W, runEffect.bind(o)) : runEffect.call(o));
1790
- s = true;
1810
+ !i?.defer &&
1811
+ (o.F === EFFECT_USER || i?.schedule ? o.$.enqueue(o.F, runEffect.bind(o)) : runEffect.call(o));
1812
+ r = true;
1791
1813
  cleanup(() => o.$e?.());
1792
1814
  }
1793
1815
  function runEffect() {
1794
- if (!this.H || this.O & REACTIVE_DISPOSED) return;
1816
+ if (!this.j || this.O & REACTIVE_DISPOSED) return;
1795
1817
  this.$e?.();
1796
1818
  this.$e = undefined;
1797
1819
  try {
1798
- const e = this.Me(this.J, this.Qe);
1820
+ const e = this.Fe(this.te, this.Qe);
1799
1821
  if (false && e !== undefined && typeof e !== "function");
1800
1822
  this.$e = e;
1801
1823
  } catch (e) {
1802
- this.fe = new StatusError(this, e);
1803
- this.Se |= STATUS_ERROR;
1804
- if (!this.F.notify(this, STATUS_ERROR, STATUS_ERROR)) throw e;
1824
+ this.Ee = new StatusError(this, e);
1825
+ this.Re |= STATUS_ERROR;
1826
+ if (!this.$.notify(this, STATUS_ERROR, STATUS_ERROR)) throw e;
1805
1827
  } finally {
1806
- this.Qe = this.J;
1807
- this.H = false;
1828
+ this.Qe = this.te;
1829
+ this.j = false;
1808
1830
  }
1809
1831
  }
1810
1832
  function trackedEffect(e, t) {
1811
1833
  const run = () => {
1812
- if (!n.H || n.O & REACTIVE_DISPOSED) return;
1834
+ if (!n.j || n.O & REACTIVE_DISPOSED) return;
1813
1835
  try {
1814
- n.H = false;
1836
+ n.j = false;
1815
1837
  recompute(n);
1816
1838
  } finally {
1817
1839
  }
@@ -1823,23 +1845,22 @@ function trackedEffect(e, t) {
1823
1845
  const t = staleValues(e);
1824
1846
  n.$e = t;
1825
1847
  },
1826
- undefined,
1827
1848
  { ...t, lazy: true }
1828
1849
  );
1829
1850
  n.$e = undefined;
1830
1851
  n.Ke = true;
1831
- n.H = true;
1832
- n.W = EFFECT_TRACKED;
1833
- n.Ge = (e, t) => {
1834
- const i = e !== undefined ? e : n.Se;
1852
+ n.j = true;
1853
+ n.F = EFFECT_TRACKED;
1854
+ n.xe = (e, t) => {
1855
+ const i = e !== undefined ? e : n.Re;
1835
1856
  if (i & STATUS_ERROR) {
1836
- n.F.notify(n, STATUS_PENDING, 0);
1837
- const e = t !== undefined ? t : n.fe;
1838
- if (!n.F.notify(n, STATUS_ERROR, STATUS_ERROR)) throw e;
1857
+ n.$.notify(n, STATUS_PENDING, 0);
1858
+ const e = t !== undefined ? t : n.Ee;
1859
+ if (!n.$.notify(n, STATUS_ERROR, STATUS_ERROR)) throw e;
1839
1860
  }
1840
1861
  };
1841
- n.M = run;
1842
- n.F.enqueue(EFFECT_USER, run);
1862
+ n.K = run;
1863
+ n.$.enqueue(EFFECT_USER, run);
1843
1864
  cleanup(() => n.$e?.());
1844
1865
  }
1845
1866
  function restoreTransition(e, t) {
@@ -1854,11 +1875,11 @@ function action(e) {
1854
1875
  const r = e(...t);
1855
1876
  globalQueue.initTransition();
1856
1877
  let s = activeTransition;
1857
- s.$.push(r);
1878
+ s.Z.push(r);
1858
1879
  const done = (e, t) => {
1859
1880
  s = currentTransition(s);
1860
- const o = s.$.indexOf(r);
1861
- if (o >= 0) s.$.splice(o, 1);
1881
+ const o = s.Z.indexOf(r);
1882
+ if (o >= 0) s.Z.splice(o, 1);
1862
1883
  setActiveTransition(s);
1863
1884
  schedule();
1864
1885
  t ? i(t) : n(e);
@@ -1896,7 +1917,7 @@ function accessor(e) {
1896
1917
  }
1897
1918
  function createSignal(e, t) {
1898
1919
  if (typeof e === "function") {
1899
- const n = computed(e, undefined, t);
1920
+ const n = computed(e, t);
1900
1921
  n.Pe = true;
1901
1922
  return [accessor(n), setSignal.bind(null, n)];
1902
1923
  }
@@ -1904,14 +1925,14 @@ function createSignal(e, t) {
1904
1925
  return [accessor(n), setSignal.bind(null, n)];
1905
1926
  }
1906
1927
  function createMemo(e, t) {
1907
- let n = computed(e, undefined, t);
1928
+ let n = computed(e, t);
1908
1929
  return accessor(n);
1909
1930
  }
1910
1931
  function createEffect(e, t, n) {
1911
- effect(e, t.effect || t, t.error, undefined, n);
1932
+ effect(e, t.effect || t, t.error, { user: true, ...n });
1912
1933
  }
1913
1934
  function createRenderEffect(e, t, n) {
1914
- effect(e, t, undefined, undefined, { render: true, ...n });
1935
+ effect(e, t, undefined, n);
1915
1936
  }
1916
1937
  function createTrackedEffect(e, t) {
1917
1938
  trackedEffect(e, t);
@@ -1932,8 +1953,7 @@ function createReaction(e, t) {
1932
1953
  dispose(t);
1933
1954
  },
1934
1955
  e.error,
1935
- undefined,
1936
- { defer: true, ...(false ? { ...t, name: t?.name ?? "effect" } : t) }
1956
+ { ...(false ? { ...t, name: t?.name ?? "effect" } : t), user: true, defer: true }
1937
1957
  );
1938
1958
  });
1939
1959
  };
@@ -1955,7 +1975,7 @@ function resolve(e) {
1955
1975
  }
1956
1976
  function createOptimistic(e, t) {
1957
1977
  if (typeof e === "function") {
1958
- const n = optimisticComputed(e, undefined, t);
1978
+ const n = optimisticComputed(e, t);
1959
1979
  n.Pe = true;
1960
1980
  return [accessor(n), setSignal.bind(null, n)];
1961
1981
  }
@@ -2129,28 +2149,35 @@ function createProjectionInternal(e, t, n) {
2129
2149
  };
2130
2150
  const s = wrapProjection(t);
2131
2151
  i = computed(() => {
2132
- const t = getOwner();
2133
- let i = false;
2134
- let r;
2135
- const o = new Proxy(
2136
- s,
2137
- createWriteTraps(() => !i || t.ye === r)
2138
- );
2139
- storeSetter(o, o => {
2140
- r = e(o);
2141
- i = true;
2142
- const u = handleAsync(t, r, e => {
2143
- e !== o && e !== undefined && storeSetter(s, reconcile(e, n?.key || "id"));
2144
- });
2145
- u !== o && u !== undefined && reconcile(u, n?.key || "id")(s);
2146
- });
2147
- });
2152
+ if (!i) i = getOwner();
2153
+ runProjectionComputed(s, e, n?.key || "id");
2154
+ }, undefined);
2148
2155
  i.Pe = true;
2149
2156
  return { store: s, node: i };
2150
2157
  }
2151
2158
  function createProjection(e, t, n) {
2152
2159
  return createProjectionInternal(e, t, n).store;
2153
2160
  }
2161
+ function runProjectionComputed(e, t, n, i) {
2162
+ const r = getOwner();
2163
+ let s = false;
2164
+ let o;
2165
+ const u = new Proxy(
2166
+ e,
2167
+ createWriteTraps(() => !s || r.ye === o)
2168
+ );
2169
+ storeSetter(u, u => {
2170
+ o = t(u);
2171
+ s = true;
2172
+ const commit = t => {
2173
+ if (t === u || t === undefined) return;
2174
+ const write = () => storeSetter(e, reconcile(t, n));
2175
+ i ? i(write) : write();
2176
+ };
2177
+ commit(handleAsync(r, o, commit));
2178
+ });
2179
+ return r;
2180
+ }
2154
2181
  function createWriteTraps(e) {
2155
2182
  const t = {
2156
2183
  get(e, n) {
@@ -2260,17 +2287,17 @@ function getNode(e, t, n, i, r = isEqual, s, o) {
2260
2287
  {
2261
2288
  equals: r,
2262
2289
  unobserved() {
2263
- delete e[t];
2290
+ if (e[t] === u) delete e[t];
2264
2291
  }
2265
2292
  },
2266
2293
  i
2267
2294
  );
2268
2295
  if (s) {
2269
- u.ee = NOT_PENDING;
2296
+ u.k = NOT_PENDING;
2270
2297
  }
2271
2298
  if (o && t in o) {
2272
2299
  const e = o[t];
2273
- u.de = e === undefined ? NO_SNAPSHOT : e;
2300
+ u.Te = e === undefined ? NO_SNAPSHOT : e;
2274
2301
  snapshotSources?.add(u);
2275
2302
  }
2276
2303
  return (e[t] = u);
@@ -2303,8 +2330,8 @@ function getPropertyDescriptor(e, t, n) {
2303
2330
  function prepareStoreWrite(e, t, n) {
2304
2331
  if (e[STORE_OPTIMISTIC]) {
2305
2332
  const t = e[STORE_FIREWALL];
2306
- if (t?.K) {
2307
- globalQueue.initTransition(t.K);
2333
+ if (t?.B) {
2334
+ globalQueue.initTransition(t.B);
2308
2335
  }
2309
2336
  }
2310
2337
  const i = e[STORE_VALUE];
@@ -2312,7 +2339,7 @@ function prepareStoreWrite(e, t, n) {
2312
2339
  if (
2313
2340
  snapshotCaptureActive &&
2314
2341
  typeof n !== "symbol" &&
2315
- !((e[STORE_FIREWALL]?.Se ?? 0) & STATUS_PENDING)
2342
+ !((e[STORE_FIREWALL]?.Re ?? 0) & STATUS_PENDING)
2316
2343
  ) {
2317
2344
  if (!e[STORE_SNAPSHOT_PROPS]) {
2318
2345
  e[STORE_SNAPSHOT_PROPS] = Object.create(null);
@@ -2327,20 +2354,45 @@ function prepareStoreWrite(e, t, n) {
2327
2354
  if (s) trackOptimisticStore(t);
2328
2355
  return { base: r, overrideKey: o, state: i };
2329
2356
  }
2330
- function notifyStoreProperty(e, t, n, i) {
2331
- if (e[STORE_HAS]?.[t]) setSignal(e[STORE_HAS][t], n !== "delete");
2332
- const r = getNodes(e, STORE_NODE);
2357
+ function upsertStoreNode(e, t, n, i, r) {
2358
+ if (t[n]) return t[n];
2359
+ const s = isWrappable(i) ? wrap(i, e) : i;
2360
+ const o = getNode(t, n, s, e[STORE_FIREWALL], isEqual, e[STORE_OPTIMISTIC], r);
2361
+ registerTransientStoreNode(o);
2362
+ return o;
2363
+ }
2364
+ function notifyStoreProperty(e, t, n, i, r, s) {
2365
+ const o = projectionWriteActive || e[STORE_OPTIMISTIC];
2366
+ const u = n !== "delete";
2367
+ const c = e[STORE_HAS]?.[t];
2368
+ if (c) {
2369
+ setSignal(c, u);
2370
+ } else if (!o && n !== "invalidate" && s !== u) {
2371
+ const n = upsertStoreNode(e, getNodes(e, STORE_HAS), t, s);
2372
+ setSignal(n, u);
2373
+ }
2374
+ const a = getNodes(e, STORE_NODE);
2333
2375
  if (n === "set") {
2334
- r[t] && setSignal(r[t], () => (isWrappable(i) ? wrap(i, e) : i));
2376
+ if (a[t]) {
2377
+ setSignal(a[t], () => (isWrappable(i) ? wrap(i, e) : i));
2378
+ } else if (!o) {
2379
+ const n = upsertStoreNode(e, a, t, r, e[STORE_SNAPSHOT_PROPS]);
2380
+ setSignal(n, () => (isWrappable(i) ? wrap(i, e) : i));
2381
+ }
2335
2382
  } else if (n === "invalidate") {
2336
- if (r[t]) {
2337
- setSignal(r[t], {});
2338
- delete r[t];
2383
+ if (a[t]) {
2384
+ setSignal(a[t], {});
2385
+ delete a[t];
2339
2386
  }
2340
2387
  } else {
2341
- r[t] && setSignal(r[t], undefined);
2388
+ if (a[t]) {
2389
+ setSignal(a[t], undefined);
2390
+ } else if (!o) {
2391
+ const n = upsertStoreNode(e, a, t, r, e[STORE_SNAPSHOT_PROPS]);
2392
+ setSignal(n, undefined);
2393
+ }
2342
2394
  }
2343
- r[$TRACK] && setSignal(r[$TRACK], undefined);
2395
+ a[$TRACK] && setSignal(a[$TRACK], undefined);
2344
2396
  }
2345
2397
  let Writing = null;
2346
2398
  const storeTraps = {
@@ -2369,11 +2421,11 @@ const storeTraps = {
2369
2421
  if (writeOnly(n)) {
2370
2422
  let n =
2371
2423
  r && (o || !u)
2372
- ? r.ee !== undefined && r.ee !== NOT_PENDING
2373
- ? r.ee
2374
- : r.X !== NOT_PENDING
2375
- ? r.X
2376
- : r.J
2424
+ ? r.k !== undefined && r.k !== NOT_PENDING
2425
+ ? r.k
2426
+ : r.U !== NOT_PENDING
2427
+ ? r.U
2428
+ : r.te
2377
2429
  : c[t];
2378
2430
  n === $DELETED && (n = undefined);
2379
2431
  if (!isWrappable(n)) return n;
@@ -2415,11 +2467,11 @@ const storeTraps = {
2415
2467
  : e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]
2416
2468
  ? e[STORE_OVERRIDE][t] !== $DELETED
2417
2469
  : t in e[STORE_VALUE];
2418
- if (!writeOnly(e[$PROXY])) {
2419
- getObserver() &&
2420
- read(
2421
- getNode(getNodes(e, STORE_HAS), t, n, e[STORE_FIREWALL], isEqual, e[STORE_OPTIMISTIC])
2422
- );
2470
+ if (writeOnly(e[$PROXY])) return n;
2471
+ const i = getNodes(e, STORE_HAS);
2472
+ if (i[t]) return read(i[t]);
2473
+ if (getObserver()) {
2474
+ return read(getNode(i, t, n, e[STORE_FIREWALL], isEqual, e[STORE_OPTIMISTIC]));
2423
2475
  }
2424
2476
  return n;
2425
2477
  },
@@ -2434,29 +2486,39 @@ const storeTraps = {
2434
2486
  : e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]
2435
2487
  ? e[STORE_OVERRIDE][t]
2436
2488
  : r;
2437
- const c = n?.[$TARGET]?.[STORE_VALUE] ?? n;
2438
- const a = Array.isArray(o) && t !== "length";
2439
- const l = a ? parseInt(t) + 1 : 0;
2440
- const f =
2441
- a &&
2489
+ const c =
2490
+ e[STORE_OPTIMISTIC_OVERRIDE] && t in e[STORE_OPTIMISTIC_OVERRIDE]
2491
+ ? e[STORE_OPTIMISTIC_OVERRIDE][t] !== $DELETED
2492
+ : e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]
2493
+ ? e[STORE_OVERRIDE][t] !== $DELETED
2494
+ : t in e[STORE_VALUE];
2495
+ const a = n?.[$TARGET]?.[STORE_VALUE] ?? n;
2496
+ const l = Array.isArray(o) && t !== "length";
2497
+ const f = l ? parseInt(t) + 1 : 0;
2498
+ const E =
2499
+ l &&
2442
2500
  (e[STORE_OPTIMISTIC_OVERRIDE] && "length" in e[STORE_OPTIMISTIC_OVERRIDE]
2443
2501
  ? e[STORE_OPTIMISTIC_OVERRIDE].length
2444
2502
  : e[STORE_OVERRIDE] && "length" in e[STORE_OVERRIDE]
2445
2503
  ? e[STORE_OVERRIDE].length
2446
2504
  : o.length);
2447
- const E = a && l > f ? l : undefined;
2448
- if (u === c && E === undefined) return true;
2449
- if (c !== undefined && c === r && E === undefined) delete e[s]?.[t];
2505
+ const d = l && f > E ? f : undefined;
2506
+ if (u === a && d === undefined) return true;
2507
+ if (a !== undefined && a === r && d === undefined) delete e[s]?.[t];
2450
2508
  else {
2451
2509
  const n = e[s] || (e[s] = Object.create(null));
2452
- n[t] = c;
2453
- if (E !== undefined) n.length = E;
2510
+ n[t] = a;
2511
+ if (d !== undefined) n.length = d;
2454
2512
  }
2455
- notifyStoreProperty(e, t, "set", c);
2456
- if (Array.isArray(o)) {
2457
- const n = getNodes(e, STORE_NODE);
2458
- const i = t === "length" ? c : E;
2459
- i !== undefined && n.length && setSignal(n.length, i);
2513
+ notifyStoreProperty(e, t, "set", a, u, c);
2514
+ if (Array.isArray(o) && t !== "length" && d !== undefined) {
2515
+ const t = getNodes(e, STORE_NODE);
2516
+ if (t.length) {
2517
+ setSignal(t.length, d);
2518
+ } else if (!projectionWriteActive && !e[STORE_OPTIMISTIC]) {
2519
+ const n = upsertStoreNode(e, t, "length", E, e[STORE_SNAPSHOT_PROPS]);
2520
+ setSignal(n, d);
2521
+ }
2460
2522
  }
2461
2523
  if (false);
2462
2524
  });
@@ -2495,7 +2557,7 @@ const storeTraps = {
2495
2557
  } else if (e[i] && t in e[i]) {
2496
2558
  delete e[i][t];
2497
2559
  } else return true;
2498
- notifyStoreProperty(e, t, "delete");
2560
+ notifyStoreProperty(e, t, "delete", undefined, r, true);
2499
2561
  });
2500
2562
  }
2501
2563
  return true;
@@ -2565,7 +2627,7 @@ function createStore(e, t, n) {
2565
2627
  return [r, e => storeSetter(r, e)];
2566
2628
  }
2567
2629
  function createOptimisticStore(e, t, n) {
2568
- GlobalQueue.ce ||= clearOptimisticStore;
2630
+ GlobalQueue.ae ||= clearOptimisticStore;
2569
2631
  const i = typeof e === "function";
2570
2632
  const r = i ? t : e;
2571
2633
  const s = i ? e : undefined;
@@ -2582,7 +2644,7 @@ function clearOptimisticStore(e) {
2582
2644
  if (i) {
2583
2645
  for (const e of Reflect.ownKeys(n)) {
2584
2646
  if (i[e]) {
2585
- i[e].q = undefined;
2647
+ i[e].ee = undefined;
2586
2648
  const n =
2587
2649
  t[STORE_OVERRIDE] && e in t[STORE_OVERRIDE] ? t[STORE_OVERRIDE][e] : t[STORE_VALUE][e];
2588
2650
  const r = n === $DELETED ? undefined : n;
@@ -2590,7 +2652,7 @@ function clearOptimisticStore(e) {
2590
2652
  }
2591
2653
  }
2592
2654
  if (i[$TRACK]) {
2593
- i[$TRACK].q = undefined;
2655
+ i[$TRACK].ee = undefined;
2594
2656
  setSignal(i[$TRACK], undefined);
2595
2657
  }
2596
2658
  }
@@ -2622,33 +2684,22 @@ function createOptimisticProjectionInternal(e, t, n) {
2622
2684
  };
2623
2685
  const s = wrapProjection(t);
2624
2686
  if (e) {
2687
+ const wrapCommit = e => {
2688
+ setProjectionWriteActive(true);
2689
+ try {
2690
+ e();
2691
+ } finally {
2692
+ setProjectionWriteActive(false);
2693
+ }
2694
+ };
2625
2695
  i = computed(() => {
2626
- const t = getOwner();
2627
- let i = false;
2628
- let r;
2629
- const o = new Proxy(
2630
- s,
2631
- createWriteTraps(() => !i || t.ye === r)
2632
- );
2633
2696
  setProjectionWriteActive(true);
2634
2697
  try {
2635
- storeSetter(o, o => {
2636
- r = e(o);
2637
- i = true;
2638
- const u = handleAsync(t, r, e => {
2639
- setProjectionWriteActive(true);
2640
- try {
2641
- e !== o && e !== undefined && storeSetter(s, reconcile(e, n?.key || "id"));
2642
- } finally {
2643
- setProjectionWriteActive(false);
2644
- }
2645
- });
2646
- u !== o && u !== undefined && reconcile(u, n?.key || "id")(s);
2647
- });
2698
+ runProjectionComputed(s, e, n?.key || "id", wrapCommit);
2648
2699
  } finally {
2649
2700
  setProjectionWriteActive(false);
2650
2701
  }
2651
- });
2702
+ }, undefined);
2652
2703
  i.Pe = true;
2653
2704
  }
2654
2705
  return { store: s, node: i };
@@ -3116,12 +3167,12 @@ function compare(e, t, n) {
3116
3167
  return e ? e(t) === e(n) : true;
3117
3168
  }
3118
3169
  function boundaryComputed(e, t) {
3119
- const n = computed(e, undefined, { lazy: true });
3120
- n.Ge = (e, t) => {
3121
- const i = e !== undefined ? e : n.Se;
3122
- const r = t !== undefined ? t : n.fe;
3123
- n.Se &= ~n.ut;
3124
- n.F.notify(n, n.ut, i, r);
3170
+ const n = computed(e, { lazy: true });
3171
+ n.xe = (e, t) => {
3172
+ const i = e !== undefined ? e : n.Re;
3173
+ const r = t !== undefined ? t : n.Ee;
3174
+ n.Re &= ~n.ut;
3175
+ n.$.notify(n, n.ut, i, r);
3125
3176
  };
3126
3177
  n.ut = t;
3127
3178
  n.Pe = true;
@@ -3129,9 +3180,9 @@ function boundaryComputed(e, t) {
3129
3180
  return n;
3130
3181
  }
3131
3182
  function createBoundChildren(e, t, n, i) {
3132
- const r = e.F;
3133
- r.addChild((e.F = n));
3134
- cleanup(() => r.removeChild(e.F));
3183
+ const r = e.$;
3184
+ r.addChild((e.$ = n));
3185
+ cleanup(() => r.removeChild(e.$));
3135
3186
  return runWithOwner(e, () => {
3136
3187
  const e = computed(t);
3137
3188
  return boundaryComputed(() => staleValues(() => flatten(read(e))), i);
@@ -3141,12 +3192,16 @@ const ON_INIT = Symbol();
3141
3192
  const RevealControllerContext = createContext(null);
3142
3193
  let _revealUsed = false;
3143
3194
  const FALSE_ACCESSOR = () => false;
3195
+ const SEQUENTIAL_ACCESSOR = () => "sequential";
3144
3196
  function isRevealController(e) {
3145
3197
  return e instanceof RevealController;
3146
3198
  }
3147
3199
  function isSlotReady(e) {
3148
3200
  return isRevealController(e) ? e.isReady() : e.ct.size === 0 && !e.lt;
3149
3201
  }
3202
+ function isSlotMinimallyReady(e) {
3203
+ return isRevealController(e) ? e.isMinimallyReady() : isSlotReady(e);
3204
+ }
3150
3205
  function setSlotState(e, t, n, i) {
3151
3206
  setSignal(e.ft, n);
3152
3207
  setSignal(e.Et, i);
@@ -3164,12 +3219,13 @@ class RevealController {
3164
3219
  ft = signal(false, { ownedWrite: true, He: true });
3165
3220
  Et = signal(false, { ownedWrite: true, He: true });
3166
3221
  It = true;
3167
- ht = false;
3222
+ ht = true;
3223
+ At = false;
3168
3224
  constructor(e, t) {
3169
3225
  this.Rt = e;
3170
3226
  this.Ot = t;
3171
3227
  }
3172
- At(e) {
3228
+ Nt(e) {
3173
3229
  for (let t = 0; t < this._t.length; t++) {
3174
3230
  const n = this._t[t];
3175
3231
  if ((isRevealController(n) ? n.dt : n.Tt) !== this) continue;
@@ -3178,13 +3234,35 @@ class RevealController {
3178
3234
  return true;
3179
3235
  }
3180
3236
  isReady() {
3181
- return this.At(isSlotReady);
3237
+ return this.Nt(isSlotReady);
3238
+ }
3239
+ isMinimallyReady() {
3240
+ const e = untrack(this.Rt);
3241
+ if (e === "together") return this.isReady();
3242
+ if (e === "natural") {
3243
+ let e = false;
3244
+ let t = false;
3245
+ this.Nt(n => {
3246
+ e = true;
3247
+ if (isSlotMinimallyReady(n)) {
3248
+ t = true;
3249
+ return false;
3250
+ }
3251
+ });
3252
+ return !e || t;
3253
+ }
3254
+ let t = true;
3255
+ this.Nt(e => {
3256
+ t = isSlotMinimallyReady(e);
3257
+ return false;
3258
+ });
3259
+ return t;
3182
3260
  }
3183
3261
  register(e) {
3184
3262
  if (this._t.includes(e)) return;
3185
3263
  this._t.push(e);
3186
- const t = !!untrack(this.Rt);
3187
- (setSignal(e.ft, true), setSignal(e.Et, t ? false : !!untrack(this.Ot)));
3264
+ const t = untrack(this.Rt);
3265
+ (setSignal(e.ft, true), setSignal(e.Et, t === "sequential" ? !!untrack(this.Ot) : false));
3188
3266
  untrack(() => this.evaluate());
3189
3267
  }
3190
3268
  unregister(e) {
@@ -3193,103 +3271,123 @@ class RevealController {
3193
3271
  untrack(() => this.evaluate());
3194
3272
  }
3195
3273
  evaluate(e, t) {
3196
- if (this.ht) return;
3197
- this.ht = true;
3274
+ if (this.At) return;
3275
+ this.At = true;
3198
3276
  const n = this.It;
3277
+ const i = this.ht;
3199
3278
  try {
3200
3279
  const n = e ?? read(this.ft),
3201
- i = !!untrack(this.Ot),
3202
- r = t ?? i;
3203
- if (n && r) this.At(e => setSlotState(e, this, true, true));
3204
- else if (!!untrack(this.Rt)) {
3205
- const e = this.isReady();
3206
- this.At(t => setSlotState(t, this, !e, false));
3280
+ i = untrack(this.Rt),
3281
+ r = i === "sequential" && !!untrack(this.Ot),
3282
+ s = t ?? r;
3283
+ if (n) {
3284
+ this.Nt(e => setSlotState(e, this, true, s));
3285
+ } else if (i === "natural") {
3286
+ this.Nt(e => {
3287
+ if (isRevealController(e)) {
3288
+ setSignal(e.Et, false);
3289
+ setSignal(e.ft, false);
3290
+ e.evaluate(false, false);
3291
+ } else {
3292
+ setSlotState(e, this, !isSlotReady(e), false);
3293
+ }
3294
+ });
3295
+ } else if (i === "together") {
3296
+ const e = this.Nt(isSlotMinimallyReady);
3297
+ this.Nt(t => setSlotState(t, this, !e, false));
3207
3298
  } else {
3208
3299
  let e = false;
3209
- this.At(t => {
3210
- if (e) return setSlotState(t, this, true, i);
3300
+ this.Nt(t => {
3301
+ if (e) return setSlotState(t, this, true, r);
3211
3302
  if (isSlotReady(t)) return setSlotState(t, this, false, false);
3212
3303
  e = true;
3213
- setSlotState(t, this, true, false);
3304
+ if (isRevealController(t)) {
3305
+ setSignal(t.Et, false);
3306
+ setSignal(t.ft, false);
3307
+ t.evaluate(false, false);
3308
+ } else {
3309
+ setSlotState(t, this, true, false);
3310
+ }
3214
3311
  });
3215
3312
  }
3216
3313
  } finally {
3217
3314
  this.It = this.isReady();
3218
- this.ht = false;
3315
+ this.ht = this.isMinimallyReady();
3316
+ this.At = false;
3219
3317
  }
3220
- if (this.dt && n !== this.It) this.dt.evaluate();
3318
+ if (this.dt && (n !== this.It || i !== this.ht)) this.dt.evaluate();
3221
3319
  }
3222
3320
  }
3223
3321
  class CollectionQueue extends Queue {
3224
- Nt;
3225
- ct = new Set();
3226
3322
  Pt;
3323
+ ct = new Set();
3324
+ gt;
3227
3325
  lt = true;
3228
3326
  ft = signal(false, { ownedWrite: true, He: true });
3229
3327
  Et = signal(false, { ownedWrite: true, He: true });
3230
3328
  Tt;
3231
3329
  St = false;
3232
- gt;
3233
- Ct = ON_INIT;
3330
+ Ct;
3331
+ Dt = ON_INIT;
3234
3332
  constructor(e) {
3235
3333
  super();
3236
- this.Nt = e;
3334
+ this.Pt = e;
3237
3335
  }
3238
3336
  run(e) {
3239
3337
  if (!e || (read(this.ft) && (!_revealUsed || read(this.Et)))) return;
3240
3338
  return super.run(e);
3241
3339
  }
3242
3340
  notify(e, t, n, i) {
3243
- if (!(t & this.Nt)) return super.notify(e, t, n, i);
3244
- if (this.St && this.gt) {
3341
+ if (!(t & this.Pt)) return super.notify(e, t, n, i);
3342
+ if (this.St && this.Ct) {
3245
3343
  const e = untrack(() => {
3246
3344
  try {
3247
- return this.gt();
3345
+ return this.Ct();
3248
3346
  } catch {
3249
3347
  return ON_INIT;
3250
3348
  }
3251
3349
  });
3252
- if (e !== this.Ct) {
3253
- this.Ct = e;
3350
+ if (e !== this.Dt) {
3351
+ this.Dt = e;
3254
3352
  this.St = false;
3255
3353
  this.ct.clear();
3256
3354
  }
3257
3355
  }
3258
- if (this.Nt & STATUS_PENDING && this.St) return super.notify(e, t, n, i);
3259
- if (this.Nt & STATUS_PENDING && n & STATUS_ERROR) {
3356
+ if (this.Pt & STATUS_PENDING && this.St) return super.notify(e, t, n, i);
3357
+ if (this.Pt & STATUS_PENDING && n & STATUS_ERROR) {
3260
3358
  return super.notify(e, STATUS_ERROR, n, i);
3261
3359
  }
3262
- if (n & this.Nt) {
3360
+ if (n & this.Pt) {
3263
3361
  this.lt = true;
3264
- const t = i?.source || e.fe?.source;
3362
+ const t = i?.source || e.Ee?.source;
3265
3363
  if (t) {
3266
3364
  const e = this.ct.size === 0;
3267
3365
  this.ct.add(t);
3268
3366
  if (e) setSignal(this.ft, true);
3269
3367
  }
3270
3368
  }
3271
- t &= ~this.Nt;
3369
+ t &= ~this.Pt;
3272
3370
  return t ? super.notify(e, t, n, i) : true;
3273
3371
  }
3274
3372
  checkSources() {
3275
3373
  for (const e of this.ct) {
3276
3374
  if (
3277
3375
  e.O & REACTIVE_DISPOSED ||
3278
- (!(e.Se & this.Nt) && !(this.Nt & STATUS_ERROR && e.Se & STATUS_PENDING))
3376
+ (!(e.Re & this.Pt) && !(this.Pt & STATUS_ERROR && e.Re & STATUS_PENDING))
3279
3377
  )
3280
3378
  this.ct.delete(e);
3281
3379
  }
3282
3380
  if (!this.ct.size) {
3283
- if (this.Nt & STATUS_PENDING && this.lt && !this.St && this.Pt) {
3284
- this.lt = !!(this.Pt.Se & this.Nt);
3381
+ if (this.Pt & STATUS_PENDING && this.lt && !this.St && this.gt) {
3382
+ this.lt = !!(this.gt.Re & this.Pt);
3285
3383
  } else {
3286
3384
  this.lt = false;
3287
3385
  }
3288
3386
  if (!this.lt) {
3289
3387
  setSignal(this.ft, false);
3290
- if (this.gt) {
3388
+ if (this.Ct) {
3291
3389
  try {
3292
- this.Ct = untrack(() => this.gt());
3390
+ this.Dt = untrack(() => this.Ct());
3293
3391
  } catch {}
3294
3392
  }
3295
3393
  }
@@ -3301,8 +3399,8 @@ function createCollectionBoundary(e, t, n, i) {
3301
3399
  const r = createOwner();
3302
3400
  if (_revealUsed) setContext(RevealControllerContext, null, r);
3303
3401
  const s = new CollectionQueue(e);
3304
- if (i) s.gt = i;
3305
- const o = (s.Pt = createBoundChildren(r, t, s, e));
3402
+ if (i) s.Ct = i;
3403
+ const o = (s.gt = createBoundChildren(r, t, s, e));
3306
3404
  untrack(() => {
3307
3405
  let t = false;
3308
3406
  try {
@@ -3311,7 +3409,7 @@ function createCollectionBoundary(e, t, n, i) {
3311
3409
  if (e instanceof NotReadyError) t = true;
3312
3410
  else throw e;
3313
3411
  }
3314
- s.lt = t || !!(o.Se & e) || o.fe instanceof NotReadyError;
3412
+ s.lt = t || !!(o.Re & e) || o.Ee instanceof NotReadyError;
3315
3413
  });
3316
3414
  const u = _revealUsed && e === STATUS_PENDING ? getContext(RevealControllerContext) : null;
3317
3415
  if (u) {
@@ -3335,7 +3433,7 @@ function createLoadingBoundary(e, t, n) {
3335
3433
  function createErrorBoundary(e, t) {
3336
3434
  return createCollectionBoundary(STATUS_ERROR, e, e => {
3337
3435
  let n = e.ct.values().next().value;
3338
- const i = n.fe?.cause ?? n.fe;
3436
+ const i = n.Ee?.cause ?? n.Ee;
3339
3437
  return t(i, () => {
3340
3438
  for (const t of e.ct) recompute(t);
3341
3439
  schedule();
@@ -3346,7 +3444,7 @@ function createRevealOrder(e, t) {
3346
3444
  _revealUsed = true;
3347
3445
  const n = createOwner();
3348
3446
  const i = getContext(RevealControllerContext);
3349
- const r = t?.together || FALSE_ACCESSOR,
3447
+ const r = t?.order || SEQUENTIAL_ACCESSOR,
3350
3448
  s = t?.collapsed || FALSE_ACCESSOR;
3351
3449
  const o = new RevealController(r, s);
3352
3450
  setContext(RevealControllerContext, o, n);