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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/dev.js +401 -199
  2. package/dist/node.cjs +1403 -1259
  3. package/dist/prod.js +1053 -905
  4. package/dist/types/boundaries.d.ts +79 -3
  5. package/dist/types/core/action.d.ts +34 -0
  6. package/dist/types/core/constants.d.ts +17 -0
  7. package/dist/types/core/core.d.ts +108 -9
  8. package/dist/types/core/dev.d.ts +1 -1
  9. package/dist/types/core/effect.d.ts +3 -2
  10. package/dist/types/core/owner.d.ts +54 -3
  11. package/dist/types/core/scheduler.d.ts +19 -2
  12. package/dist/types/core/types.d.ts +2 -5
  13. package/dist/types/index.d.ts +2 -2
  14. package/dist/types/map.d.ts +32 -3
  15. package/dist/types/signals.d.ts +283 -16
  16. package/dist/types/store/optimistic.d.ts +38 -12
  17. package/dist/types/store/projection.d.ts +54 -14
  18. package/dist/types/store/reconcile.d.ts +22 -0
  19. package/dist/types/store/store.d.ts +64 -14
  20. package/dist/types/store/storePath.d.ts +28 -0
  21. package/dist/types/store/utils.d.ts +78 -7
  22. package/dist/types-cjs/boundaries.d.cts +79 -3
  23. package/dist/types-cjs/core/action.d.cts +34 -0
  24. package/dist/types-cjs/core/constants.d.cts +17 -0
  25. package/dist/types-cjs/core/core.d.cts +108 -9
  26. package/dist/types-cjs/core/dev.d.cts +1 -1
  27. package/dist/types-cjs/core/effect.d.cts +3 -2
  28. package/dist/types-cjs/core/owner.d.cts +54 -3
  29. package/dist/types-cjs/core/scheduler.d.cts +19 -2
  30. package/dist/types-cjs/core/types.d.cts +2 -5
  31. package/dist/types-cjs/index.d.cts +2 -2
  32. package/dist/types-cjs/map.d.cts +32 -3
  33. package/dist/types-cjs/signals.d.cts +283 -16
  34. package/dist/types-cjs/store/optimistic.d.cts +38 -12
  35. package/dist/types-cjs/store/projection.d.cts +54 -14
  36. package/dist/types-cjs/store/reconcile.d.cts +22 -0
  37. package/dist/types-cjs/store/store.d.cts +64 -14
  38. package/dist/types-cjs/store/storePath.d.cts +28 -0
  39. package/dist/types-cjs/store/utils.d.cts +78 -7
  40. package/package.json +4 -3
package/dist/prod.js CHANGED
@@ -33,6 +33,12 @@ const REACTIVE_DISPOSED = 1 << 6;
33
33
  const REACTIVE_OPTIMISTIC_DIRTY = 1 << 7;
34
34
  const REACTIVE_SNAPSHOT_STALE = 1 << 8;
35
35
  const REACTIVE_LAZY = 1 << 9;
36
+ const CONFIG_OWNED_WRITE = 1 << 0;
37
+ const CONFIG_NO_SNAPSHOT = 1 << 1;
38
+ const CONFIG_TRANSPARENT = 1 << 2;
39
+ const CONFIG_IN_SNAPSHOT_SCOPE = 1 << 3;
40
+ const CONFIG_CHILDREN_FORBIDDEN = 1 << 4;
41
+ const CONFIG_AUTO_DISPOSE = 1 << 5;
36
42
  const STATUS_PENDING = 1 << 0;
37
43
  const STATUS_ERROR = 1 << 1;
38
44
  const STATUS_UNINITIALIZED = 1 << 2;
@@ -57,26 +63,26 @@ function actualInsertIntoHeap(e, t) {
57
63
  e.T = t;
58
64
  r.T = e;
59
65
  }
60
- if (i > t.R) t.R = i;
66
+ if (i > t.O) t.O = i;
61
67
  }
62
68
  function insertIntoHeap(e, t) {
63
- let n = e.O;
69
+ let n = e.R;
64
70
  if (n & (REACTIVE_IN_HEAP | REACTIVE_RECOMPUTING_DEPS)) return;
65
71
  if (n & REACTIVE_CHECK) {
66
- e.O = (n & -4) | REACTIVE_DIRTY | REACTIVE_IN_HEAP;
67
- } else e.O = n | REACTIVE_IN_HEAP;
72
+ e.R = (n & -4) | REACTIVE_DIRTY | REACTIVE_IN_HEAP;
73
+ } else e.R = n | REACTIVE_IN_HEAP;
68
74
  if (!(n & REACTIVE_IN_HEAP_HEIGHT)) actualInsertIntoHeap(e, t);
69
75
  }
70
76
  function insertIntoHeapHeight(e, t) {
71
- let n = e.O;
77
+ let n = e.R;
72
78
  if (n & (REACTIVE_IN_HEAP | REACTIVE_RECOMPUTING_DEPS | REACTIVE_IN_HEAP_HEIGHT)) return;
73
- e.O = n | REACTIVE_IN_HEAP_HEIGHT;
79
+ e.R = n | REACTIVE_IN_HEAP_HEIGHT;
74
80
  actualInsertIntoHeap(e, t);
75
81
  }
76
82
  function deleteFromHeap(e, t) {
77
- const n = e.O;
83
+ const n = e.R;
78
84
  if (!(n & (REACTIVE_IN_HEAP | REACTIVE_IN_HEAP_HEIGHT))) return;
79
- e.O = n & -25;
85
+ e.R = n & -25;
80
86
  const i = e.o;
81
87
  if (e.T === e) t.l[i] = undefined;
82
88
  else {
@@ -93,21 +99,21 @@ function deleteFromHeap(e, t) {
93
99
  function markHeap(e) {
94
100
  if (e._) return;
95
101
  e._ = true;
96
- for (let t = 0; t <= e.R; t++) {
102
+ for (let t = 0; t <= e.O; t++) {
97
103
  for (let n = e.l[t]; n !== undefined; n = n.S) {
98
- if (n.O & REACTIVE_IN_HEAP) markNode(n);
104
+ if (n.R & REACTIVE_IN_HEAP) markNode(n);
99
105
  }
100
106
  }
101
107
  }
102
108
  function markNode(e, t = REACTIVE_DIRTY) {
103
- const n = e.O;
109
+ const n = e.R;
104
110
  if ((n & (REACTIVE_CHECK | REACTIVE_DIRTY)) >= t) return;
105
- e.O = (n & -4) | t;
111
+ e.R = (n & -4) | t;
106
112
  for (let t = e.I; t !== null; t = t.h) {
107
113
  markNode(t.p, REACTIVE_CHECK);
108
114
  }
109
- if (e.A !== null) {
110
- for (let t = e.A; t !== null; t = t.N) {
115
+ if (e.N !== null) {
116
+ for (let t = e.N; t !== null; t = t.A) {
111
117
  for (let e = t.I; e !== null; e = e.h) {
112
118
  markNode(e.p, REACTIVE_CHECK);
113
119
  }
@@ -116,15 +122,15 @@ function markNode(e, t = REACTIVE_DIRTY) {
116
122
  }
117
123
  function runHeap(e, t) {
118
124
  e._ = false;
119
- for (e.P = 0; e.P <= e.R; e.P++) {
125
+ for (e.P = 0; e.P <= e.O; e.P++) {
120
126
  let n = e.l[e.P];
121
127
  while (n !== undefined) {
122
- if (n.O & REACTIVE_IN_HEAP) t(n);
128
+ if (n.R & REACTIVE_IN_HEAP) t(n);
123
129
  else adjustHeight(n, e);
124
130
  n = e.l[e.P];
125
131
  }
126
132
  }
127
- e.R = 0;
133
+ e.O = 0;
128
134
  }
129
135
  function adjustHeight(e, t) {
130
136
  deleteFromHeap(e, t);
@@ -143,23 +149,40 @@ function adjustHeight(e, t) {
143
149
  }
144
150
  const DEV$1 = undefined;
145
151
  const transitions = new Set();
146
- const dirtyQueue = { l: new Array(2e3).fill(undefined), _: false, P: 0, R: 0 };
147
- const zombieQueue = { l: new Array(2e3).fill(undefined), _: false, P: 0, R: 0 };
152
+ const dirtyQueue = { l: new Array(2e3).fill(undefined), _: false, P: 0, O: 0 };
153
+ const zombieQueue = { l: new Array(2e3).fill(undefined), _: false, P: 0, O: 0 };
148
154
  let clock = 0;
149
155
  let activeTransition = null;
150
156
  let scheduled = false;
151
157
  let projectionWriteActive = false;
152
158
  let stashedOptimisticReads = null;
159
+ const transientStoreNodes = new Set();
160
+ function registerTransientStoreNode(e) {
161
+ transientStoreNodes.add(e);
162
+ }
163
+ function sweepTransientStoreNodes() {
164
+ if (transientStoreNodes.size === 0) return;
165
+ for (const e of transientStoreNodes) {
166
+ if (e.I !== null) {
167
+ transientStoreNodes.delete(e);
168
+ continue;
169
+ }
170
+ if (e.U !== NOT_PENDING) continue;
171
+ if (e.G !== undefined && e.G !== NOT_PENDING) continue;
172
+ transientStoreNodes.delete(e);
173
+ e.k?.();
174
+ }
175
+ }
153
176
  function enforceLoadingBoundary(e) {}
154
177
  function shouldReadStashedOptimisticValue(e) {
155
178
  return !!stashedOptimisticReads?.has(e);
156
179
  }
157
180
  function runLaneEffects(e) {
158
181
  for (const t of activeLanes) {
159
- if (t.U || t.k.size > 0) continue;
160
- const n = t.G[e - 1];
182
+ if (t.F || t.W.size > 0) continue;
183
+ const n = t.H[e - 1];
161
184
  if (n.length) {
162
- t.G[e - 1] = [];
185
+ t.H[e - 1] = [];
163
186
  runQueue(n, e);
164
187
  }
165
188
  }
@@ -167,15 +190,15 @@ function runLaneEffects(e) {
167
190
  function queueStashedOptimisticEffects(e) {
168
191
  for (let t = e.I; t !== null; t = t.h) {
169
192
  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);
193
+ if (!e.M) continue;
194
+ if (e.M === EFFECT_TRACKED) {
195
+ if (!e.j) {
196
+ e.j = true;
197
+ e.$.enqueue(EFFECT_USER, e.K);
175
198
  }
176
199
  continue;
177
200
  }
178
- const n = e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
201
+ const n = e.R & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
179
202
  if (n.P > e.o) n.P = e.o;
180
203
  insertIntoHeap(e, n);
181
204
  }
@@ -184,66 +207,67 @@ function setProjectionWriteActive(e) {
184
207
  projectionWriteActive = e;
185
208
  }
186
209
  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()));
210
+ t.Y = e;
211
+ e.B.push(...t.B);
212
+ for (const n of activeLanes) if (n.Z === t) n.Z = e;
213
+ e.q.push(...t.q);
214
+ for (const n of t.X) e.X.add(n);
215
+ for (const [n, i] of t.J) {
216
+ let t = e.J.get(n);
217
+ if (!t) e.J.set(n, (t = new Set()));
195
218
  for (const e of i) t.add(e);
196
219
  }
220
+ for (const n of t.ee) e.ee.add(n);
197
221
  }
198
222
  function resolveOptimisticNodes(e) {
199
223
  for (let t = 0; t < e.length; t++) {
200
224
  const n = e[t];
201
- n.q = undefined;
202
- if (n.X !== NOT_PENDING) {
203
- n.J = n.X;
204
- n.X = NOT_PENDING;
225
+ n.te = undefined;
226
+ if (n.U !== NOT_PENDING) {
227
+ n.ne = n.U;
228
+ n.U = NOT_PENDING;
205
229
  }
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;
230
+ const i = n.G;
231
+ n.G = NOT_PENDING;
232
+ if (i !== NOT_PENDING && n.ne !== i) insertSubs(n, true);
233
+ n.Z = null;
210
234
  }
211
235
  e.length = 0;
212
236
  }
213
237
  function cleanupCompletedLanes(e) {
214
238
  for (const t of activeLanes) {
215
- const n = e ? t.K === e : !t.K;
239
+ const n = e ? t.Z === e : !t.Z;
216
240
  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;
241
+ if (!t.F) {
242
+ if (t.H[0].length) runQueue(t.H[0], EFFECT_RENDER);
243
+ if (t.H[1].length) runQueue(t.H[1], EFFECT_USER);
244
+ }
245
+ if (t.ie.te === t) t.ie.te = undefined;
246
+ t.W.clear();
247
+ t.H[0].length = 0;
248
+ t.H[1].length = 0;
225
249
  activeLanes.delete(t);
226
- signalLanes.delete(t.te);
250
+ signalLanes.delete(t.ie);
227
251
  }
228
252
  }
229
253
  function schedule() {
230
254
  if (scheduled) return;
231
255
  scheduled = true;
232
- if (!globalQueue.ne && !projectionWriteActive) queueMicrotask(flush);
256
+ if (!globalQueue.re && !projectionWriteActive) queueMicrotask(flush);
233
257
  }
234
258
  class Queue {
235
259
  i = null;
236
- ie = [[], []];
237
- re = [];
260
+ se = [[], []];
261
+ oe = [];
238
262
  created = clock;
239
263
  addChild(e) {
240
- this.re.push(e);
264
+ this.oe.push(e);
241
265
  e.i = this;
242
266
  }
243
267
  removeChild(e) {
244
- const t = this.re.indexOf(e);
268
+ const t = this.oe.indexOf(e);
245
269
  if (t >= 0) {
246
- this.re.splice(t, 1);
270
+ this.oe.splice(t, 1);
247
271
  e.i = null;
248
272
  }
249
273
  }
@@ -252,81 +276,81 @@ class Queue {
252
276
  return false;
253
277
  }
254
278
  run(e) {
255
- if (this.ie[e - 1].length) {
256
- const t = this.ie[e - 1];
257
- this.ie[e - 1] = [];
279
+ if (this.se[e - 1].length) {
280
+ const t = this.se[e - 1];
281
+ this.se[e - 1] = [];
258
282
  runQueue(t, e);
259
283
  }
260
- for (let t = 0; t < this.re.length; t++) this.re[t].run?.(e);
284
+ for (let t = 0; t < this.oe.length; t++) this.oe[t].run?.(e);
261
285
  }
262
286
  enqueue(e, t) {
263
287
  if (e) {
264
288
  if (currentOptimisticLane) {
265
289
  const n = findLane(currentOptimisticLane);
266
- n.G[e - 1].push(t);
290
+ n.H[e - 1].push(t);
267
291
  } else {
268
- this.ie[e - 1].push(t);
292
+ this.se[e - 1].push(t);
269
293
  }
270
294
  }
271
295
  schedule();
272
296
  }
273
297
  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];
298
+ e.se[0].push(...this.se[0]);
299
+ e.se[1].push(...this.se[1]);
300
+ this.se = [[], []];
301
+ for (let t = 0; t < this.oe.length; t++) {
302
+ let n = this.oe[t];
303
+ let i = e.oe[t];
280
304
  if (!i) {
281
- i = { ie: [[], []], re: [] };
282
- e.re[t] = i;
305
+ i = { se: [[], []], oe: [] };
306
+ e.oe[t] = i;
283
307
  }
284
308
  n.stashQueues(i);
285
309
  }
286
310
  }
287
311
  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];
312
+ this.se[0].push(...e.se[0]);
313
+ this.se[1].push(...e.se[1]);
314
+ for (let t = 0; t < e.oe.length; t++) {
315
+ const n = e.oe[t];
316
+ let i = this.oe[t];
293
317
  if (i) i.restoreQueues(n);
294
318
  }
295
319
  }
296
320
  }
297
321
  class GlobalQueue extends Queue {
298
- ne = false;
299
- se = [];
300
- Y = [];
301
- Z = new Set();
302
- static oe;
303
- static ue;
304
- static ce = null;
322
+ re = false;
323
+ ue = [];
324
+ q = [];
325
+ X = new Set();
326
+ static ce;
327
+ static ae;
328
+ static le = null;
305
329
  flush() {
306
- if (this.ne) return;
307
- this.ne = true;
330
+ if (this.re) return;
331
+ this.re = true;
308
332
  try {
309
- runHeap(dirtyQueue, GlobalQueue.oe);
333
+ runHeap(dirtyQueue, GlobalQueue.ce);
310
334
  if (activeTransition) {
311
335
  const e = transitionComplete(activeTransition);
312
336
  if (!e) {
313
337
  const e = activeTransition;
314
- runHeap(zombieQueue, GlobalQueue.oe);
315
- this.se = [];
316
- this.Y = [];
317
- this.Z = new Set();
338
+ runHeap(zombieQueue, GlobalQueue.ce);
339
+ this.ue = [];
340
+ this.q = [];
341
+ this.X = new Set();
318
342
  runLaneEffects(EFFECT_RENDER);
319
343
  runLaneEffects(EFFECT_USER);
320
- this.stashQueues(e.ae);
344
+ this.stashQueues(e.fe);
321
345
  clock++;
322
- scheduled = dirtyQueue.R >= dirtyQueue.P;
323
- reassignPendingTransition(e.se);
346
+ scheduled = dirtyQueue.O >= dirtyQueue.P;
347
+ reassignPendingTransition(e.ue);
324
348
  activeTransition = null;
325
- if (!e.$.length && e.Y.length) {
349
+ if (!e.B.length && !e.J.size && e.q.length) {
326
350
  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;
351
+ for (let t = 0; t < e.q.length; t++) {
352
+ const n = e.q[t];
353
+ if (n.L || n.Ee & CONFIG_OWNED_WRITE) continue;
330
354
  stashedOptimisticReads.add(n);
331
355
  queueStashedOptimisticEffects(n);
332
356
  }
@@ -338,36 +362,36 @@ class GlobalQueue extends Queue {
338
362
  }
339
363
  return;
340
364
  }
341
- this.se !== activeTransition.se && this.se.push(...activeTransition.se);
342
- this.restoreQueues(activeTransition.ae);
365
+ this.ue !== activeTransition.ue && this.ue.push(...activeTransition.ue);
366
+ this.restoreQueues(activeTransition.fe);
343
367
  transitions.delete(activeTransition);
344
368
  const t = activeTransition;
345
369
  activeTransition = null;
346
- reassignPendingTransition(this.se);
370
+ reassignPendingTransition(this.ue);
347
371
  finalizePureQueue(t);
348
372
  } else {
349
- if (transitions.size) runHeap(zombieQueue, GlobalQueue.oe);
373
+ if (transitions.size) runHeap(zombieQueue, GlobalQueue.ce);
350
374
  finalizePureQueue();
351
375
  }
352
376
  clock++;
353
- scheduled = dirtyQueue.R >= dirtyQueue.P;
377
+ scheduled = dirtyQueue.O >= dirtyQueue.P;
354
378
  runLaneEffects(EFFECT_RENDER);
355
379
  this.run(EFFECT_RENDER);
356
380
  runLaneEffects(EFFECT_USER);
357
381
  this.run(EFFECT_USER);
358
382
  if (false);
359
383
  } finally {
360
- this.ne = false;
384
+ this.re = false;
361
385
  }
362
386
  }
363
387
  notify(e, t, n, i) {
364
388
  if (t & STATUS_PENDING) {
365
389
  if (n & STATUS_PENDING) {
366
- const t = i !== undefined ? i : e.fe;
390
+ const t = i !== undefined ? i : e.Te;
367
391
  if (activeTransition && t) {
368
392
  const n = t.source;
369
- let i = activeTransition.B.get(n);
370
- if (!i) activeTransition.B.set(n, (i = new Set()));
393
+ let i = activeTransition.J.get(n);
394
+ if (!i) activeTransition.J.set(n, (i = new Set()));
371
395
  const r = i.size;
372
396
  i.add(e);
373
397
  if (i.size !== r) schedule();
@@ -380,17 +404,18 @@ class GlobalQueue extends Queue {
380
404
  initTransition(e) {
381
405
  if (e) e = currentTransition(e);
382
406
  if (e && e === activeTransition) return;
383
- if (!e && activeTransition && activeTransition.Ee === clock) return;
407
+ if (!e && activeTransition && activeTransition.Se === clock) return;
384
408
  if (!activeTransition) {
385
409
  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
410
+ Se: clock,
411
+ ue: [],
412
+ J: new Map(),
413
+ q: [],
414
+ X: new Set(),
415
+ B: [],
416
+ fe: { se: [[], []], oe: [] },
417
+ Y: false,
418
+ ee: new Set()
394
419
  };
395
420
  } else if (e) {
396
421
  const t = activeTransition;
@@ -399,71 +424,71 @@ class GlobalQueue extends Queue {
399
424
  activeTransition = e;
400
425
  }
401
426
  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);
427
+ activeTransition.Se = clock;
428
+ if (this.ue !== activeTransition.ue) {
429
+ for (let e = 0; e < this.ue.length; e++) {
430
+ const t = this.ue[e];
431
+ t.Z = activeTransition;
432
+ activeTransition.ue.push(t);
408
433
  }
409
- this.se = activeTransition.se;
434
+ this.ue = activeTransition.ue;
410
435
  }
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);
436
+ if (this.q !== activeTransition.q) {
437
+ for (let e = 0; e < this.q.length; e++) {
438
+ const t = this.q[e];
439
+ t.Z = activeTransition;
440
+ activeTransition.q.push(t);
416
441
  }
417
- this.Y = activeTransition.Y;
442
+ this.q = activeTransition.q;
418
443
  }
419
444
  for (const e of activeLanes) {
420
- if (!e.K) e.K = activeTransition;
445
+ if (!e.Z) e.Z = activeTransition;
421
446
  }
422
- if (this.Z !== activeTransition.Z) {
423
- for (const e of this.Z) activeTransition.Z.add(e);
424
- this.Z = activeTransition.Z;
447
+ if (this.X !== activeTransition.X) {
448
+ for (const e of this.X) activeTransition.X.add(e);
449
+ this.X = activeTransition.X;
425
450
  }
426
451
  }
427
452
  }
428
453
  function insertSubs(e, t = false) {
429
- const n = e.q || currentOptimisticLane;
454
+ const n = e.te || currentOptimisticLane;
430
455
  const i = e.de !== undefined;
431
456
  for (let r = e.I; r !== null; r = r.h) {
432
- if (i && r.p.Te) {
433
- r.p.O |= REACTIVE_SNAPSHOT_STALE;
457
+ if (i && r.p.Ee & CONFIG_IN_SNAPSHOT_SCOPE) {
458
+ r.p.R |= REACTIVE_SNAPSHOT_STALE;
434
459
  continue;
435
460
  }
436
461
  if (t && n) {
437
- r.p.O |= REACTIVE_OPTIMISTIC_DIRTY;
462
+ r.p.R |= REACTIVE_OPTIMISTIC_DIRTY;
438
463
  assignOrMergeLane(r.p, n);
439
464
  } else if (t) {
440
- r.p.O |= REACTIVE_OPTIMISTIC_DIRTY;
441
- r.p.q = undefined;
465
+ r.p.R |= REACTIVE_OPTIMISTIC_DIRTY;
466
+ r.p.te = undefined;
442
467
  }
443
468
  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);
469
+ if (e.M === EFFECT_TRACKED) {
470
+ if (!e.j) {
471
+ e.j = true;
472
+ e.$.enqueue(EFFECT_USER, e.K);
448
473
  }
449
474
  continue;
450
475
  }
451
- const s = r.p.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
476
+ const s = r.p.R & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
452
477
  if (s.P > r.p.o) s.P = r.p.o;
453
478
  insertIntoHeap(r.p, s);
454
479
  }
455
480
  }
456
481
  function commitPendingNodes() {
457
- const e = globalQueue.se;
482
+ const e = globalQueue.ue;
458
483
  for (let t = 0; t < e.length; t++) {
459
484
  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;
485
+ if (n.U !== NOT_PENDING) {
486
+ n.ne = n.U;
487
+ n.U = NOT_PENDING;
488
+ if (n.M && n.M !== EFFECT_TRACKED) n.j = true;
464
489
  }
465
- if (!(n.Se & STATUS_PENDING)) n.Se &= ~STATUS_UNINITIALIZED;
466
- if (n.L) GlobalQueue.ue(n, false, true);
490
+ if (!(n.Oe & STATUS_PENDING)) n.Oe &= ~STATUS_UNINITIALIZED;
491
+ if (n.L) GlobalQueue.ae(n, false, true);
467
492
  }
468
493
  e.length = 0;
469
494
  }
@@ -471,39 +496,56 @@ function finalizePureQueue(e = null, t = false) {
471
496
  const n = !t;
472
497
  if (n) commitPendingNodes();
473
498
  if (!t) checkBoundaryChildren(globalQueue);
474
- if (dirtyQueue.R >= dirtyQueue.P) runHeap(dirtyQueue, GlobalQueue.oe);
499
+ if (dirtyQueue.O >= dirtyQueue.P) runHeap(dirtyQueue, GlobalQueue.ce);
475
500
  if (n) {
476
501
  commitPendingNodes();
477
- resolveOptimisticNodes(e ? e.Y : globalQueue.Y);
478
- const t = e ? e.Z : globalQueue.Z;
479
- if (GlobalQueue.ce && t.size) {
502
+ resolveOptimisticNodes(e ? e.q : globalQueue.q);
503
+ if (e && e.ee.size) {
504
+ for (const t of e.ee) {
505
+ if (t.R & REACTIVE_DISPOSED) continue;
506
+ if (t.M === EFFECT_TRACKED) {
507
+ if (!t.j) {
508
+ t.j = true;
509
+ t.$.enqueue(EFFECT_USER, t.K);
510
+ }
511
+ continue;
512
+ }
513
+ const e = t.R & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
514
+ if (e.P > t.o) e.P = t.o;
515
+ insertIntoHeap(t, e);
516
+ }
517
+ e.ee.clear();
518
+ }
519
+ const t = e ? e.X : globalQueue.X;
520
+ if (GlobalQueue.le && t.size) {
480
521
  for (const e of t) {
481
- GlobalQueue.ce(e);
522
+ GlobalQueue.le(e);
482
523
  }
483
524
  t.clear();
484
525
  schedule();
485
526
  }
527
+ sweepTransientStoreNodes();
486
528
  cleanupCompletedLanes(e);
487
529
  }
488
530
  }
489
531
  function checkBoundaryChildren(e) {
490
- for (const t of e.re) {
532
+ for (const t of e.oe) {
491
533
  t.checkSources?.();
492
534
  checkBoundaryChildren(t);
493
535
  }
494
536
  }
495
537
  function trackOptimisticStore(e) {
496
- globalQueue.Z.add(e);
538
+ globalQueue.X.add(e);
497
539
  schedule();
498
540
  }
499
541
  function reassignPendingTransition(e) {
500
542
  for (let t = 0; t < e.length; t++) {
501
- e[t].K = activeTransition;
543
+ e[t].Z = activeTransition;
502
544
  }
503
545
  }
504
546
  const globalQueue = new GlobalQueue();
505
547
  function flush() {
506
- if (globalQueue.ne) {
548
+ if (globalQueue.re) {
507
549
  return;
508
550
  }
509
551
  while (scheduled || activeTransition) {
@@ -514,22 +556,22 @@ function runQueue(e, t) {
514
556
  for (let n = 0; n < e.length; n++) e[n](t);
515
557
  }
516
558
  function reporterBlocksSource(e, t) {
517
- if (e.O & (REACTIVE_ZOMBIE | REACTIVE_DISPOSED)) return false;
518
- if (e.Re === t || e.Oe?.has(t)) return true;
559
+ if (e.R & (REACTIVE_ZOMBIE | REACTIVE_DISPOSED)) return false;
560
+ if (e.Re === t || e._e?.has(t)) return true;
519
561
  for (let n = e.C; n; n = n.D) {
520
562
  let e = n.m;
521
563
  while (e) {
522
564
  if (e === t || e.V === t) return true;
523
- e = e._e;
565
+ e = e.Ie;
524
566
  }
525
567
  }
526
- return !!(e.Se & STATUS_PENDING && e.fe instanceof NotReadyError && e.fe.source === t);
568
+ return !!(e.Oe & STATUS_PENDING && e.Te instanceof NotReadyError && e.Te.source === t);
527
569
  }
528
570
  function transitionComplete(e) {
529
- if (e.j) return true;
530
- if (e.$.length) return false;
571
+ if (e.Y) return true;
572
+ if (e.B.length) return false;
531
573
  let t = true;
532
- for (const [n, i] of e.B) {
574
+ for (const [n, i] of e.J) {
533
575
  let r = false;
534
576
  for (const e of i) {
535
577
  if (reporterBlocksSource(e, n)) {
@@ -538,32 +580,32 @@ function transitionComplete(e) {
538
580
  }
539
581
  i.delete(e);
540
582
  }
541
- if (!r) e.B.delete(n);
542
- else if (n.Se & STATUS_PENDING && n.fe?.source === n) {
583
+ if (!r) e.J.delete(n);
584
+ else if (n.Oe & STATUS_PENDING && n.Te?.source === n) {
543
585
  t = false;
544
586
  break;
545
587
  }
546
588
  }
547
589
  if (t) {
548
- for (let n = 0; n < e.Y.length; n++) {
549
- const i = e.Y[n];
590
+ for (let n = 0; n < e.q.length; n++) {
591
+ const i = e.q[n];
550
592
  if (
551
593
  hasActiveOverride(i) &&
552
- "Se" in i &&
553
- i.Se & STATUS_PENDING &&
554
- i.fe instanceof NotReadyError &&
555
- i.fe.source !== i
594
+ "Oe" in i &&
595
+ i.Oe & STATUS_PENDING &&
596
+ i.Te instanceof NotReadyError &&
597
+ i.Te.source !== i
556
598
  ) {
557
599
  t = false;
558
600
  break;
559
601
  }
560
602
  }
561
603
  }
562
- t && (e.j = true);
604
+ t && (e.Y = true);
563
605
  return t;
564
606
  }
565
607
  function currentTransition(e) {
566
- while (e.j && typeof e.j === "object") e = e.j;
608
+ while (e.Y && typeof e.Y === "object") e = e.Y;
567
609
  return e;
568
610
  }
569
611
  function setActiveTransition(e) {
@@ -585,112 +627,113 @@ function getOrCreateLane(e) {
585
627
  if (t) {
586
628
  return findLane(t);
587
629
  }
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 };
630
+ const n = e.Ie;
631
+ const i = n?.te ? findLane(n.te) : null;
632
+ t = { ie: e, W: new Set(), H: [[], []], F: null, Z: activeTransition, he: i };
591
633
  signalLanes.set(e, t);
592
634
  activeLanes.add(t);
593
- e.he = false;
635
+ e.pe = false;
594
636
  return t;
595
637
  }
596
638
  function findLane(e) {
597
- while (e.U) e = e.U;
639
+ while (e.F) e = e.F;
598
640
  return e;
599
641
  }
600
642
  function mergeLanes(e, t) {
601
643
  e = findLane(e);
602
644
  t = findLane(t);
603
645
  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]);
646
+ t.F = e;
647
+ for (const n of t.W) e.W.add(n);
648
+ e.H[0].push(...t.H[0]);
649
+ e.H[1].push(...t.H[1]);
608
650
  return e;
609
651
  }
610
652
  function resolveLane(e) {
611
- const t = e.q;
653
+ const t = e.te;
612
654
  if (!t) return undefined;
613
655
  const n = findLane(t);
614
656
  if (activeLanes.has(n)) return n;
615
- e.q = undefined;
657
+ e.te = undefined;
616
658
  return undefined;
617
659
  }
618
660
  function resolveTransition(e) {
619
- return resolveLane(e)?.K ?? e.K;
661
+ return resolveLane(e)?.Z ?? e.Z;
620
662
  }
621
663
  function hasActiveOverride(e) {
622
- return !!(e.ee !== undefined && e.ee !== NOT_PENDING);
664
+ return !!(e.G !== undefined && e.G !== NOT_PENDING);
623
665
  }
624
666
  function assignOrMergeLane(e, t) {
625
667
  const n = findLane(t);
626
- const i = e.q;
668
+ const i = e.te;
627
669
  if (i) {
628
- if (i.U) {
629
- e.q = t;
670
+ if (i.F) {
671
+ e.te = t;
630
672
  return;
631
673
  }
632
674
  const r = findLane(i);
633
675
  if (activeLanes.has(r)) {
634
676
  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);
677
+ if (n.he && findLane(n.he) === r) {
678
+ e.te = t;
679
+ } else if (r.he && findLane(r.he) === n);
638
680
  else mergeLanes(n, r);
639
681
  }
640
682
  return;
641
683
  }
642
684
  }
643
- e.q = t;
685
+ e.te = t;
644
686
  }
645
687
  function unlinkSubs(e) {
646
688
  const t = e.m;
647
689
  const n = e.D;
648
690
  const i = e.h;
649
- const r = e.pe;
650
- if (i !== null) i.pe = r;
691
+ const r = e.Ne;
692
+ if (i !== null) i.Ne = r;
651
693
  else t.Ae = r;
652
694
  if (r !== null) r.h = i;
653
695
  else {
654
696
  t.I = i;
655
697
  if (i === null) {
656
- t.Ne?.();
657
- t.L && !t.Pe && !(t.O & REACTIVE_ZOMBIE) && unobserved(t);
698
+ t.k?.();
699
+ const e = t;
700
+ e.L && e.Ee & CONFIG_AUTO_DISPOSE && !(e.R & REACTIVE_ZOMBIE) && unobserved(e);
658
701
  }
659
702
  }
660
703
  return n;
661
704
  }
662
705
  function unobserved(e) {
663
- deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
706
+ deleteFromHeap(e, e.R & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
664
707
  let t = e.C;
665
708
  while (t !== null) {
666
709
  t = unlinkSubs(t);
667
710
  }
668
711
  e.C = null;
669
- e.ge = null;
712
+ e.Pe = null;
670
713
  disposeChildren(e, true);
671
714
  }
672
715
  function link(e, t) {
673
- const n = t.ge;
716
+ const n = t.Pe;
674
717
  if (n !== null && n.m === e) return;
675
718
  let i = null;
676
- const r = t.O & REACTIVE_RECOMPUTING_DEPS;
719
+ const r = t.R & REACTIVE_RECOMPUTING_DEPS;
677
720
  if (r) {
678
721
  i = n !== null ? n.D : t.C;
679
722
  if (i !== null && i.m === e) {
680
- t.ge = i;
723
+ t.Pe = i;
681
724
  return;
682
725
  }
683
726
  }
684
727
  const s = e.Ae;
685
728
  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 });
729
+ const o = (t.Pe = e.Ae = { m: e, p: t, D: i, Ne: s, h: null });
687
730
  if (n !== null) n.D = o;
688
731
  else t.C = o;
689
732
  if (s !== null) s.h = o;
690
733
  else e.I = o;
691
734
  }
692
735
  function isValidLink(e, t) {
693
- const n = t.ge;
736
+ const n = t.Pe;
694
737
  if (n !== null) {
695
738
  let i = t.C;
696
739
  do {
@@ -705,13 +748,13 @@ const PENDING_OWNER = {};
705
748
  function markDisposal(e) {
706
749
  let t = e.Ce;
707
750
  while (t) {
708
- t.O |= REACTIVE_ZOMBIE;
709
- if (t.O & REACTIVE_IN_HEAP) {
751
+ t.R |= REACTIVE_ZOMBIE;
752
+ if (t.R & REACTIVE_IN_HEAP) {
710
753
  deleteFromHeap(t, dirtyQueue);
711
754
  insertIntoHeap(t, zombieQueue);
712
755
  }
713
756
  markDisposal(t);
714
- t = t.De;
757
+ t = t.ge;
715
758
  }
716
759
  }
717
760
  function dispose(e) {
@@ -720,39 +763,39 @@ function dispose(e) {
720
763
  t = unlinkSubs(t);
721
764
  } while (t !== null);
722
765
  e.C = null;
723
- e.ge = null;
766
+ e.Pe = null;
724
767
  disposeChildren(e, true);
725
768
  }
726
769
  function disposeChildren(e, t = false, n) {
727
- if (e.O & REACTIVE_DISPOSED) return;
728
- if (t) e.O = REACTIVE_DISPOSED;
729
- if (t && e.L) e.ye = null;
730
- let i = n ? e.ve : e.Ce;
770
+ if (e.R & REACTIVE_DISPOSED) return;
771
+ if (t) e.R = REACTIVE_DISPOSED;
772
+ if (t && e.L) e.De = null;
773
+ let i = n ? e.ye : e.Ce;
731
774
  while (i) {
732
- const e = i.De;
775
+ const e = i.ge;
733
776
  if (i.C) {
734
777
  const e = i;
735
- deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
778
+ deleteFromHeap(e, e.R & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
736
779
  let t = e.C;
737
780
  do {
738
781
  t = unlinkSubs(t);
739
782
  } while (t !== null);
740
783
  e.C = null;
741
- e.ge = null;
784
+ e.Pe = null;
742
785
  }
743
786
  disposeChildren(i, true);
744
787
  i = e;
745
788
  }
746
789
  if (n) {
747
- e.ve = null;
790
+ e.ye = null;
748
791
  } else {
749
792
  e.Ce = null;
750
- e.we = 0;
793
+ e.ve = 0;
751
794
  }
752
795
  runDisposal(e, n);
753
796
  }
754
797
  function runDisposal(e, t) {
755
- let n = t ? e.me : e.Ve;
798
+ let n = t ? e.me : e.we;
756
799
  if (!n) return;
757
800
  if (Array.isArray(n)) {
758
801
  for (let e = 0; e < n.length; e++) {
@@ -762,12 +805,12 @@ function runDisposal(e, t) {
762
805
  } else {
763
806
  n.call(n);
764
807
  }
765
- t ? (e.me = null) : (e.Ve = null);
808
+ t ? (e.me = null) : (e.we = null);
766
809
  }
767
810
  function childId(e, t) {
768
811
  let n = e;
769
- while (n.be && n.i) n = n.i;
770
- if (n.id != null) return formatId(n.id, t ? n.we++ : n.we);
812
+ while (n.Ee & CONFIG_TRANSPARENT && n.i) n = n.i;
813
+ if (n.id != null) return formatId(n.id, t ? n.ve++ : n.ve);
771
814
  throw new Error("Cannot get child id from owner without an id");
772
815
  }
773
816
  function getNextChildId(e) {
@@ -790,30 +833,30 @@ function getOwner() {
790
833
  }
791
834
  function cleanup(e) {
792
835
  if (!context) return e;
793
- if (!context.Ve) context.Ve = e;
794
- else if (Array.isArray(context.Ve)) context.Ve.push(e);
795
- else context.Ve = [context.Ve, e];
836
+ if (!context.we) context.we = e;
837
+ else if (Array.isArray(context.we)) context.we.push(e);
838
+ else context.we = [context.we, e];
796
839
  return e;
797
840
  }
798
841
  function isDisposed(e) {
799
- return !!(e.O & (REACTIVE_DISPOSED | REACTIVE_ZOMBIE));
842
+ return !!(e.R & (REACTIVE_DISPOSED | REACTIVE_ZOMBIE));
800
843
  }
801
844
  function createOwner(e) {
802
845
  const t = context;
803
846
  const n = e?.transparent ?? false;
804
847
  const i = {
805
848
  id: e?.id ?? (n ? t?.id : t?.id != null ? getNextChildId(t) : undefined),
806
- be: n || undefined,
849
+ Ee: n ? CONFIG_TRANSPARENT : 0,
807
850
  t: true,
808
851
  u: t?.t ? t.u : t,
809
852
  Ce: null,
810
- De: null,
811
- Ve: null,
812
- F: t?.F ?? globalQueue,
813
- Le: t?.Le || defaultContext,
814
- we: 0,
853
+ ge: null,
854
+ we: null,
855
+ $: t?.$ ?? globalQueue,
856
+ Ve: t?.Ve || defaultContext,
857
+ ve: 0,
815
858
  me: null,
816
- ve: null,
859
+ ye: null,
817
860
  i: t,
818
861
  dispose(e = true) {
819
862
  disposeChildren(i, e);
@@ -824,7 +867,7 @@ function createOwner(e) {
824
867
  if (e === null) {
825
868
  t.Ce = i;
826
869
  } else {
827
- i.De = e;
870
+ i.ge = e;
828
871
  t.Ce = i;
829
872
  }
830
873
  }
@@ -835,15 +878,15 @@ function createRoot(e, t) {
835
878
  return runWithOwner(n, () => e(n.dispose));
836
879
  }
837
880
  function addPendingSource(e, t) {
838
- if (e.Re === t || e.Oe?.has(t)) return false;
881
+ if (e.Re === t || e._e?.has(t)) return false;
839
882
  if (!e.Re) {
840
883
  e.Re = t;
841
884
  return true;
842
885
  }
843
- if (!e.Oe) {
844
- e.Oe = new Set([e.Re, t]);
886
+ if (!e._e) {
887
+ e._e = new Set([e.Re, t]);
845
888
  } else {
846
- e.Oe.add(t);
889
+ e._e.add(t);
847
890
  }
848
891
  e.Re = undefined;
849
892
  return true;
@@ -854,37 +897,37 @@ function removePendingSource(e, t) {
854
897
  e.Re = undefined;
855
898
  return true;
856
899
  }
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;
900
+ if (!e._e?.delete(t)) return false;
901
+ if (e._e.size === 1) {
902
+ e.Re = e._e.values().next().value;
903
+ e._e = undefined;
904
+ } else if (e._e.size === 0) {
905
+ e._e = undefined;
863
906
  }
864
907
  return true;
865
908
  }
866
909
  function clearPendingSources(e) {
867
910
  e.Re = undefined;
868
- e.Oe?.clear();
869
- e.Oe = undefined;
911
+ e._e?.clear();
912
+ e._e = undefined;
870
913
  }
871
914
  function setPendingError(e, t, n) {
872
915
  if (!t) {
873
- e.fe = null;
916
+ e.Te = null;
874
917
  return;
875
918
  }
876
919
  if (n instanceof NotReadyError && n.source === t) {
877
- e.fe = n;
920
+ e.Te = n;
878
921
  return;
879
922
  }
880
- const i = e.fe;
923
+ const i = e.Te;
881
924
  if (!(i instanceof NotReadyError) || i.source !== t) {
882
- e.fe = new NotReadyError(t);
925
+ e.Te = new NotReadyError(t);
883
926
  }
884
927
  }
885
928
  function forEachDependent(e, t) {
886
929
  for (let n = e.I; n !== null; n = n.h) t(n.p);
887
- for (let n = e.A; n !== null; n = n.N) {
930
+ for (let n = e.N; n !== null; n = n.A) {
888
931
  for (let e = n.I; e !== null; e = e.h) t(e.p);
889
932
  }
890
933
  }
@@ -894,30 +937,30 @@ function settlePendingSource(e) {
894
937
  const settle = i => {
895
938
  if (n.has(i) || !removePendingSource(i, e)) return;
896
939
  n.add(i);
897
- i.Ee = clock;
898
- const r = i.Re ?? i.Oe?.values().next().value;
940
+ i.Se = clock;
941
+ const r = i.Re ?? i._e?.values().next().value;
899
942
  if (r) {
900
943
  setPendingError(i, r);
901
944
  updatePendingSignal(i);
902
945
  } else {
903
- i.Se &= ~STATUS_PENDING;
946
+ i.Oe &= ~STATUS_PENDING;
904
947
  setPendingError(i);
905
948
  updatePendingSignal(i);
906
- if (i.Ue) {
907
- if (i.W === EFFECT_TRACKED) {
949
+ if (i.be) {
950
+ if (i.M === EFFECT_TRACKED) {
908
951
  const e = i;
909
- if (!e.H) {
910
- e.H = true;
911
- e.F.enqueue(EFFECT_USER, e.M);
952
+ if (!e.j) {
953
+ e.j = true;
954
+ e.$.enqueue(EFFECT_USER, e.K);
912
955
  }
913
956
  } else {
914
- const e = i.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
957
+ const e = i.R & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
915
958
  if (e.P > i.o) e.P = i.o;
916
959
  insertIntoHeap(i, e);
917
960
  }
918
961
  t = true;
919
962
  }
920
- i.Ue = false;
963
+ i.be = false;
921
964
  }
922
965
  forEachDependent(i, settle);
923
966
  };
@@ -929,42 +972,42 @@ function handleAsync(e, t, n) {
929
972
  const r = i && untrack(() => t[Symbol.asyncIterator]);
930
973
  const s = !r && i && untrack(() => typeof t.then === "function");
931
974
  if (!s && !r) {
932
- e.ye = null;
975
+ e.De = null;
933
976
  return t;
934
977
  }
935
- e.ye = t;
978
+ e.De = t;
936
979
  let o;
937
980
  const handleError = n => {
938
- if (e.ye !== t) return;
981
+ if (e.De !== t) return;
939
982
  globalQueue.initTransition(resolveTransition(e));
940
983
  notifyStatus(e, n instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR, n);
941
- e.Ee = clock;
984
+ e.Se = clock;
942
985
  };
943
986
  const asyncWrite = (i, r) => {
944
- if (e.ye !== t) return;
945
- if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY)) return;
987
+ if (e.De !== t) return;
988
+ if (e.R & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY)) return;
946
989
  globalQueue.initTransition(resolveTransition(e));
947
- const s = !!(e.Se & STATUS_UNINITIALIZED);
990
+ const s = !!(e.Oe & STATUS_UNINITIALIZED);
948
991
  clearStatus(e);
949
992
  const o = resolveLane(e);
950
- if (o) o.k.delete(e);
993
+ if (o) o.W.delete(e);
951
994
  if (n) n(i);
952
- else if (e.ee !== undefined) {
953
- if (e.ee !== undefined && e.ee !== NOT_PENDING) e.X = i;
995
+ else if (e.G !== undefined) {
996
+ if (e.G !== undefined && e.G !== NOT_PENDING) e.U = i;
954
997
  else {
955
- e.J = i;
998
+ e.ne = i;
956
999
  insertSubs(e);
957
1000
  }
958
- e.Ee = clock;
1001
+ e.Se = clock;
959
1002
  } else if (o) {
960
- const t = e.W;
961
- const n = e.J;
962
- const r = e.ke;
1003
+ const t = e.M;
1004
+ const n = e.ne;
1005
+ const r = e.Le;
963
1006
  if ((!t && s) || !r || !r(i, n)) {
964
- e.J = i;
965
- e.Ee = clock;
966
- if (e.xe) {
967
- setSignal(e.xe, i);
1007
+ e.ne = i;
1008
+ e.Se = clock;
1009
+ if (e.Ue) {
1010
+ setSignal(e.Ue, i);
968
1011
  }
969
1012
  insertSubs(e, true);
970
1013
  }
@@ -1020,7 +1063,7 @@ function handleAsync(e, t, n) {
1020
1063
  s = n;
1021
1064
  u = true;
1022
1065
  if (n.done) r = true;
1023
- } else if (e.ye !== t) {
1066
+ } else if (e.De !== t) {
1024
1067
  return;
1025
1068
  } else if (!n.done) asyncWrite(n.value, iterate);
1026
1069
  else {
@@ -1030,7 +1073,7 @@ function handleAsync(e, t, n) {
1030
1073
  }
1031
1074
  },
1032
1075
  n => {
1033
- if (!c && e.ye === t) {
1076
+ if (!c && e.De === t) {
1034
1077
  r = true;
1035
1078
  handleError(n);
1036
1079
  }
@@ -1054,8 +1097,8 @@ function handleAsync(e, t, n) {
1054
1097
  }
1055
1098
  function clearStatus(e, t = false) {
1056
1099
  clearPendingSources(e);
1057
- e.Ue = false;
1058
- e.Se = t ? 0 : e.Se & STATUS_UNINITIALIZED;
1100
+ e.be = false;
1101
+ e.Oe = t ? 0 : e.Oe & STATUS_UNINITIALIZED;
1059
1102
  setPendingError(e);
1060
1103
  updatePendingSignal(e);
1061
1104
  e.Ge?.();
@@ -1065,17 +1108,17 @@ function notifyStatus(e, t, n, i, r) {
1065
1108
  n = new StatusError(e, n);
1066
1109
  const s = t === STATUS_PENDING && n instanceof NotReadyError ? n.source : undefined;
1067
1110
  const o = s === e;
1068
- const u = t === STATUS_PENDING && e.ee !== undefined && !o;
1111
+ const u = t === STATUS_PENDING && e.G !== undefined && !o;
1069
1112
  const c = u && hasActiveOverride(e);
1070
1113
  if (!i) {
1071
1114
  if (t === STATUS_PENDING && s) {
1072
1115
  addPendingSource(e, s);
1073
- e.Se = STATUS_PENDING | (e.Se & STATUS_UNINITIALIZED);
1116
+ e.Oe = STATUS_PENDING | (e.Oe & STATUS_UNINITIALIZED);
1074
1117
  setPendingError(e, s, n);
1075
1118
  } else {
1076
1119
  clearPendingSources(e);
1077
- e.Se = t | (t !== STATUS_ERROR ? e.Se & STATUS_UNINITIALIZED : 0);
1078
- e.fe = n;
1120
+ e.Oe = t | (t !== STATUS_ERROR ? e.Oe & STATUS_UNINITIALIZED : 0);
1121
+ e.Te = n;
1079
1122
  }
1080
1123
  updatePendingSignal(e);
1081
1124
  }
@@ -1096,12 +1139,12 @@ function notifyStatus(e, t, n, i, r) {
1096
1139
  return;
1097
1140
  }
1098
1141
  forEachDependent(e, e => {
1099
- e.Ee = clock;
1142
+ e.Se = clock;
1100
1143
  if (
1101
- (t === STATUS_PENDING && s && e.Re !== s && !e.Oe?.has(s)) ||
1102
- (t !== STATUS_PENDING && (e.fe !== n || e.Re || e.Oe))
1144
+ (t === STATUS_PENDING && s && e.Re !== s && !e._e?.has(s)) ||
1145
+ (t !== STATUS_PENDING && (e.Te !== n || e.Re || e._e))
1103
1146
  ) {
1104
- if (!a && !e.K) globalQueue.se.push(e);
1147
+ if (!a && !e.Z) globalQueue.ue.push(e);
1105
1148
  notifyStatus(e, t, n, a, l);
1106
1149
  }
1107
1150
  });
@@ -1129,8 +1172,8 @@ function enableExternalSource(e) {
1129
1172
  externalSourceConfig = { factory: t, untrack: n };
1130
1173
  }
1131
1174
  }
1132
- GlobalQueue.oe = recompute;
1133
- GlobalQueue.ue = disposeChildren;
1175
+ GlobalQueue.ce = recompute;
1176
+ GlobalQueue.ae = disposeChildren;
1134
1177
  let tracking = false;
1135
1178
  let stale = false;
1136
1179
  let refreshing = false;
@@ -1143,7 +1186,7 @@ let snapshotCaptureActive = false;
1143
1186
  let snapshotSources = null;
1144
1187
  function ownerInSnapshotScope(e) {
1145
1188
  while (e) {
1146
- if (e.We) return true;
1189
+ if (e.ke) return true;
1147
1190
  e = e.i;
1148
1191
  }
1149
1192
  return false;
@@ -1153,32 +1196,32 @@ function setSnapshotCapture(e) {
1153
1196
  if (e && !snapshotSources) snapshotSources = new Set();
1154
1197
  }
1155
1198
  function markSnapshotScope(e) {
1156
- e.We = true;
1199
+ e.ke = true;
1157
1200
  }
1158
1201
  function releaseSnapshotScope(e) {
1159
- e.We = false;
1202
+ e.ke = false;
1160
1203
  releaseSubtree(e);
1161
1204
  schedule();
1162
1205
  }
1163
1206
  function releaseSubtree(e) {
1164
1207
  let t = e.Ce;
1165
1208
  while (t) {
1166
- if (t.We) {
1167
- t = t.De;
1209
+ if (t.ke) {
1210
+ t = t.ge;
1168
1211
  continue;
1169
1212
  }
1170
1213
  if (t.L) {
1171
1214
  const e = t;
1172
- e.Te = false;
1173
- if (e.O & REACTIVE_SNAPSHOT_STALE) {
1174
- e.O &= ~REACTIVE_SNAPSHOT_STALE;
1175
- e.O |= REACTIVE_DIRTY;
1215
+ e.Ee &= ~CONFIG_IN_SNAPSHOT_SCOPE;
1216
+ if (e.R & REACTIVE_SNAPSHOT_STALE) {
1217
+ e.R &= ~REACTIVE_SNAPSHOT_STALE;
1218
+ e.R |= REACTIVE_DIRTY;
1176
1219
  if (dirtyQueue.P > e.o) dirtyQueue.P = e.o;
1177
1220
  insertIntoHeap(e, dirtyQueue);
1178
1221
  }
1179
1222
  }
1180
1223
  releaseSubtree(t);
1181
- t = t.De;
1224
+ t = t.ge;
1182
1225
  }
1183
1226
  }
1184
1227
  function clearSnapshots() {
@@ -1192,32 +1235,32 @@ function clearSnapshots() {
1192
1235
  snapshotCaptureActive = false;
1193
1236
  }
1194
1237
  function recompute(e, t = false) {
1195
- const n = e.W;
1238
+ const n = e.M;
1196
1239
  if (!t) {
1197
- if (e.K && (!n || activeTransition) && activeTransition !== e.K)
1198
- globalQueue.initTransition(e.K);
1199
- deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
1200
- e.ye = null;
1201
- if (e.K || n === EFFECT_TRACKED) disposeChildren(e);
1240
+ if (e.Z && (!n || activeTransition) && activeTransition !== e.Z)
1241
+ globalQueue.initTransition(e.Z);
1242
+ deleteFromHeap(e, e.R & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
1243
+ e.De = null;
1244
+ if (e.Z || n === EFFECT_TRACKED) disposeChildren(e);
1202
1245
  else {
1203
1246
  markDisposal(e);
1204
- e.me = e.Ve;
1205
- e.ve = e.Ce;
1206
- e.Ve = null;
1247
+ e.me = e.we;
1248
+ e.ye = e.Ce;
1249
+ e.we = null;
1207
1250
  e.Ce = null;
1208
- e.we = 0;
1251
+ e.ve = 0;
1209
1252
  }
1210
1253
  }
1211
- 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);
1254
+ let i = !!(e.R & REACTIVE_OPTIMISTIC_DIRTY);
1255
+ const r = e.G !== undefined && e.G !== NOT_PENDING;
1256
+ const s = !!(e.Oe & STATUS_PENDING);
1257
+ const o = !!(e.Oe & STATUS_UNINITIALIZED);
1215
1258
  const u = context;
1216
1259
  context = e;
1217
- e.ge = null;
1218
- e.O = REACTIVE_RECOMPUTING_DEPS;
1219
- e.Ee = clock;
1220
- let c = e.X === NOT_PENDING ? e.J : e.X;
1260
+ e.Pe = null;
1261
+ e.R = REACTIVE_RECOMPUTING_DEPS;
1262
+ e.Se = clock;
1263
+ let c = e.U === NOT_PENDING ? e.ne : e.U;
1221
1264
  let a = e.o;
1222
1265
  let l = tracking;
1223
1266
  let f = currentOptimisticLane;
@@ -1225,39 +1268,55 @@ function recompute(e, t = false) {
1225
1268
  if (i) {
1226
1269
  const t = resolveLane(e);
1227
1270
  if (t) currentOptimisticLane = t;
1271
+ } else if (activeTransition && !t && activeTransition.q.length) {
1272
+ for (let t = e.C; t; t = t.D) {
1273
+ const n = t.m;
1274
+ if (n.R & REACTIVE_OPTIMISTIC_DIRTY) {
1275
+ const t = resolveLane(n);
1276
+ if (t) {
1277
+ i = true;
1278
+ currentOptimisticLane = t;
1279
+ e.R |= REACTIVE_OPTIMISTIC_DIRTY;
1280
+ assignOrMergeLane(e, t);
1281
+ break;
1282
+ }
1283
+ }
1284
+ }
1228
1285
  }
1229
1286
  try {
1230
- c = handleAsync(e, e.L(c));
1287
+ const n = e.De;
1288
+ const i = e.L(c);
1289
+ c = e.De !== n ? i : handleAsync(e, i);
1231
1290
  clearStatus(e, t);
1232
- const n = resolveLane(e);
1233
- if (n) {
1234
- n.k.delete(e);
1235
- updatePendingSignal(n.te);
1291
+ const r = resolveLane(e);
1292
+ if (r) {
1293
+ r.W.delete(e);
1294
+ updatePendingSignal(r.ie);
1236
1295
  }
1237
1296
  } catch (t) {
1238
1297
  if (t instanceof NotReadyError && currentOptimisticLane) {
1239
1298
  const t = findLane(currentOptimisticLane);
1240
- if (t.te !== e) {
1241
- t.k.add(e);
1242
- e.q = t;
1243
- updatePendingSignal(t.te);
1299
+ if (t.ie !== e) {
1300
+ t.W.add(e);
1301
+ e.te = t;
1302
+ updatePendingSignal(t.ie);
1244
1303
  }
1245
1304
  }
1246
- if (t instanceof NotReadyError) e.Ue = true;
1305
+ if (t instanceof NotReadyError) e.be = true;
1247
1306
  notifyStatus(
1248
1307
  e,
1249
1308
  t instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR,
1250
1309
  t,
1251
1310
  undefined,
1252
- t instanceof NotReadyError ? e.q : undefined
1311
+ t instanceof NotReadyError ? e.te : undefined
1253
1312
  );
1254
1313
  } finally {
1255
1314
  tracking = l;
1256
- e.O = REACTIVE_NONE | (t ? e.O & REACTIVE_SNAPSHOT_STALE : 0);
1315
+ e.R = REACTIVE_NONE | (t ? e.R & REACTIVE_SNAPSHOT_STALE : 0);
1257
1316
  context = u;
1258
1317
  }
1259
- if (!e.fe) {
1260
- const u = e.ge;
1318
+ if (!e.Te) {
1319
+ const u = e.Pe;
1261
1320
  let l = u !== null ? u.D : e.C;
1262
1321
  if (l !== null) {
1263
1322
  do {
@@ -1266,132 +1325,133 @@ function recompute(e, t = false) {
1266
1325
  if (u !== null) u.D = null;
1267
1326
  else e.C = null;
1268
1327
  }
1269
- const f = r ? e.ee : e.X === NOT_PENDING ? e.J : e.X;
1270
- const E = (!n && o) || !e.ke || !e.ke(f, c);
1328
+ const f = r ? e.G : e.U === NOT_PENDING ? e.ne : e.U;
1329
+ const E = (!n && o) || !e.Le || !e.Le(f, c);
1271
1330
  if (E) {
1272
- const o = r ? e.ee : undefined;
1273
- if (t || (n && activeTransition !== e.K) || i) {
1274
- e.J = c;
1331
+ const o = r ? e.G : undefined;
1332
+ if (t || (n && activeTransition !== e.Z) || i) {
1333
+ e.ne = c;
1275
1334
  if (r && i) {
1276
- e.ee = c;
1277
- e.X = c;
1335
+ e.G = c;
1336
+ e.U = c;
1278
1337
  }
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);
1338
+ } else e.U = c;
1339
+ if (r && !i && s && !e.pe) e.G = c;
1340
+ if (!r || i || e.G !== o) insertSubs(e, i || r);
1282
1341
  } else if (r) {
1283
- e.X = c;
1342
+ e.U = c;
1284
1343
  } else if (e.o != a) {
1285
1344
  for (let t = e.I; t !== null; t = t.h) {
1286
- insertIntoHeapHeight(t.p, t.p.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
1345
+ insertIntoHeapHeight(t.p, t.p.R & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
1287
1346
  }
1288
1347
  }
1289
1348
  }
1290
1349
  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));
1350
+ (!t || e.Oe & STATUS_PENDING) && !e.Z && !(activeTransition && r) && globalQueue.ue.push(e);
1351
+ e.Z && n && activeTransition !== e.Z && runInTransition(e.Z, () => recompute(e));
1293
1352
  }
1294
1353
  function updateIfNecessary(e) {
1295
- if (e.O & REACTIVE_CHECK) {
1354
+ if (e.R & REACTIVE_CHECK) {
1296
1355
  for (let t = e.C; t; t = t.D) {
1297
1356
  const n = t.m;
1298
1357
  const i = n.V || n;
1299
1358
  if (i.L) {
1300
1359
  updateIfNecessary(i);
1301
1360
  }
1302
- if (e.O & REACTIVE_DIRTY) {
1361
+ if (e.R & REACTIVE_DIRTY) {
1303
1362
  break;
1304
1363
  }
1305
1364
  }
1306
1365
  }
1307
- if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY) || (e.fe && e.Ee < clock && !e.ye)) {
1366
+ if (e.R & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY) || (e.Te && e.Se < clock && !e.De)) {
1308
1367
  recompute(e);
1309
1368
  }
1310
- e.O = e.O & (REACTIVE_SNAPSHOT_STALE | REACTIVE_IN_HEAP | REACTIVE_IN_HEAP_HEIGHT);
1311
- }
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,
1320
- Ve: null,
1321
- F: context?.F ?? globalQueue,
1322
- Le: context?.Le ?? defaultContext,
1323
- we: 0,
1369
+ e.R = e.R & (REACTIVE_SNAPSHOT_STALE | REACTIVE_IN_HEAP | REACTIVE_IN_HEAP_HEIGHT);
1370
+ }
1371
+ function computed(e, t) {
1372
+ const n = t?.transparent ?? false;
1373
+ const i = {
1374
+ id: t?.id ?? (n ? context?.id : context?.id != null ? getNextChildId(context) : undefined),
1375
+ Ee:
1376
+ (n ? CONFIG_TRANSPARENT : 0) |
1377
+ (t?.ownedWrite ? CONFIG_OWNED_WRITE : 0) |
1378
+ (!context || t?.lazy ? CONFIG_AUTO_DISPOSE : 0) |
1379
+ (snapshotCaptureActive && ownerInSnapshotScope(context) ? CONFIG_IN_SNAPSHOT_SCOPE : 0),
1380
+ Le: t?.equals != null ? t.equals : isEqual,
1381
+ k: t?.unobserved,
1382
+ we: null,
1383
+ $: context?.$ ?? globalQueue,
1384
+ Ve: context?.Ve ?? defaultContext,
1385
+ ve: 0,
1324
1386
  L: e,
1325
- J: t,
1387
+ ne: undefined,
1326
1388
  o: 0,
1327
- A: null,
1389
+ N: null,
1328
1390
  S: undefined,
1329
1391
  T: null,
1330
1392
  C: null,
1331
- ge: null,
1393
+ Pe: null,
1332
1394
  I: null,
1333
1395
  Ae: null,
1334
1396
  i: context,
1335
- De: null,
1397
+ ge: null,
1336
1398
  Ce: null,
1337
- O: n?.lazy ? REACTIVE_LAZY : REACTIVE_NONE,
1338
- Se: STATUS_UNINITIALIZED,
1339
- Ee: clock,
1340
- X: NOT_PENDING,
1399
+ R: t?.lazy ? REACTIVE_LAZY : REACTIVE_NONE,
1400
+ Oe: STATUS_UNINITIALIZED,
1401
+ Se: clock,
1402
+ U: NOT_PENDING,
1341
1403
  me: null,
1342
- ve: null,
1343
1404
  ye: null,
1344
- K: null
1405
+ De: null,
1406
+ Z: null
1345
1407
  };
1346
- r.T = r;
1347
- const s = context?.t ? context.u : context;
1408
+ i.T = i;
1409
+ const r = context?.t ? context.u : context;
1348
1410
  if (context) {
1349
1411
  const e = context.Ce;
1350
1412
  if (e === null) {
1351
- context.Ce = r;
1413
+ context.Ce = i;
1352
1414
  } else {
1353
- r.De = e;
1354
- context.Ce = r;
1415
+ i.ge = e;
1416
+ context.Ce = i;
1355
1417
  }
1356
1418
  }
1357
- if (s) r.o = s.o + 1;
1358
- if (snapshotCaptureActive && ownerInSnapshotScope(context)) r.Te = true;
1419
+ if (r) i.o = r.o + 1;
1359
1420
  if (externalSourceConfig) {
1360
1421
  const e = signal(undefined, { equals: false, ownedWrite: true });
1361
- const t = externalSourceConfig.factory(r.L, () => {
1422
+ const t = externalSourceConfig.factory(i.L, () => {
1362
1423
  setSignal(e, undefined);
1363
1424
  });
1364
1425
  cleanup(() => t.dispose());
1365
- r.L = n => {
1426
+ i.L = n => {
1366
1427
  read(e);
1367
1428
  return t.track(n);
1368
1429
  };
1369
1430
  }
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);
1431
+ !t?.lazy && recompute(i, true);
1432
+ if (snapshotCaptureActive && !t?.lazy) {
1433
+ if (!(i.Oe & STATUS_PENDING)) {
1434
+ i.de = i.ne === undefined ? NO_SNAPSHOT : i.ne;
1435
+ snapshotSources.add(i);
1375
1436
  }
1376
1437
  }
1377
- return r;
1438
+ return i;
1378
1439
  }
1379
1440
  function signal(e, t, n = null) {
1380
1441
  const i = {
1381
- ke: t?.equals != null ? t.equals : isEqual,
1382
- le: !!t?.ownedWrite,
1383
- He: !!t?.He,
1384
- Ne: t?.unobserved,
1385
- J: e,
1442
+ Le: t?.equals != null ? t.equals : isEqual,
1443
+ Ee: (t?.ownedWrite ? CONFIG_OWNED_WRITE : 0) | (t?.Fe ? CONFIG_NO_SNAPSHOT : 0),
1444
+ k: t?.unobserved,
1445
+ ne: e,
1386
1446
  I: null,
1387
1447
  Ae: null,
1388
- Ee: clock,
1448
+ Se: clock,
1389
1449
  V: n,
1390
- N: n?.A || null,
1391
- X: NOT_PENDING
1450
+ A: n?.N || null,
1451
+ U: NOT_PENDING
1392
1452
  };
1393
- n && (n.A = i);
1394
- if (snapshotCaptureActive && !i.He && !((n?.Se ?? 0) & STATUS_PENDING)) {
1453
+ n && (n.N = i);
1454
+ if (snapshotCaptureActive && !(i.Ee & CONFIG_NO_SNAPSHOT) && !((n?.Oe ?? 0) & STATUS_PENDING)) {
1395
1455
  i.de = e === undefined ? NO_SNAPSHOT : e;
1396
1456
  snapshotSources.add(i);
1397
1457
  }
@@ -1399,13 +1459,13 @@ function signal(e, t, n = null) {
1399
1459
  }
1400
1460
  function optimisticSignal(e, t) {
1401
1461
  const n = signal(e, t);
1402
- n.ee = NOT_PENDING;
1462
+ n.G = NOT_PENDING;
1403
1463
  return n;
1404
1464
  }
1405
- function optimisticComputed(e, t, n) {
1406
- const i = computed(e, t, n);
1407
- i.ee = NOT_PENDING;
1408
- return i;
1465
+ function optimisticComputed(e, t) {
1466
+ const n = computed(e, t);
1467
+ n.G = NOT_PENDING;
1468
+ return n;
1409
1469
  }
1410
1470
  function isEqual(e, t) {
1411
1471
  return e === t;
@@ -1426,7 +1486,7 @@ function read(e) {
1426
1486
  const t = getLatestValueComputed(e);
1427
1487
  const n = latestReadActive;
1428
1488
  latestReadActive = false;
1429
- const i = e.ee !== undefined && e.ee !== NOT_PENDING ? e.ee : e.J;
1489
+ const i = e.G !== undefined && e.G !== NOT_PENDING ? e.G : e.ne;
1430
1490
  let r;
1431
1491
  try {
1432
1492
  r = read(t);
@@ -1436,11 +1496,11 @@ function read(e) {
1436
1496
  } finally {
1437
1497
  latestReadActive = n;
1438
1498
  }
1439
- if (t.Se & STATUS_PENDING) return i;
1440
- if (stale && currentOptimisticLane && t.q) {
1441
- const e = findLane(t.q);
1499
+ if (t.Oe & STATUS_PENDING) return i;
1500
+ if (stale && currentOptimisticLane && t.te) {
1501
+ const e = findLane(t.te);
1442
1502
  const n = findLane(currentOptimisticLane);
1443
- if (e !== n && e.k.size > 0) {
1503
+ if (e !== n && e.W.size > 0) {
1444
1504
  return i;
1445
1505
  }
1446
1506
  }
@@ -1450,8 +1510,8 @@ function read(e) {
1450
1510
  const t = e.V;
1451
1511
  const n = pendingCheckActive;
1452
1512
  pendingCheckActive = false;
1453
- if (t && e.ee !== undefined) {
1454
- if (e.ee !== NOT_PENDING && (t.ye || !!(t.Se & STATUS_PENDING))) {
1513
+ if (t && e.G !== undefined) {
1514
+ if (e.G !== NOT_PENDING && (t.De || !!(t.Oe & STATUS_PENDING))) {
1455
1515
  foundPending = true;
1456
1516
  }
1457
1517
  let n = context;
@@ -1464,18 +1524,18 @@ function read(e) {
1464
1524
  if (t && read(getPendingSignal(t))) foundPending = true;
1465
1525
  }
1466
1526
  pendingCheckActive = n;
1467
- return e.J;
1527
+ return e.ne;
1468
1528
  }
1469
1529
  let t = context;
1470
1530
  if (t?.t) t = t.u;
1471
1531
  const n = e;
1472
1532
  if (typeof n.L === "function") {
1473
1533
  const t = e;
1474
- if (refreshing && !(t.O & REACTIVE_DISPOSED)) recompute(t);
1475
- if (t.O & REACTIVE_LAZY) {
1476
- t.O &= ~REACTIVE_LAZY;
1534
+ if (refreshing && !(t.R & REACTIVE_DISPOSED)) recompute(t);
1535
+ if (t.R & REACTIVE_LAZY) {
1536
+ t.R &= ~REACTIVE_LAZY;
1477
1537
  recompute(t, true);
1478
- } else if (t.O & REACTIVE_DISPOSED) {
1538
+ } else if (t.R & REACTIVE_DISPOSED) {
1479
1539
  recompute(t, true);
1480
1540
  }
1481
1541
  }
@@ -1483,7 +1543,7 @@ function read(e) {
1483
1543
  if (t && tracking) {
1484
1544
  link(e, t);
1485
1545
  if (i.L) {
1486
- const n = e.O & REACTIVE_ZOMBIE;
1546
+ const n = e.R & REACTIVE_ZOMBIE;
1487
1547
  if (i.o >= (n ? zombieQueue.P : dirtyQueue.P)) {
1488
1548
  markNode(t);
1489
1549
  markHeap(n ? zombieQueue : dirtyQueue);
@@ -1495,60 +1555,71 @@ function read(e) {
1495
1555
  }
1496
1556
  }
1497
1557
  }
1498
- if (i.Se & STATUS_PENDING) {
1499
- if (t && !(stale && i.K && activeTransition !== i.K)) {
1558
+ if (i.Oe & STATUS_PENDING) {
1559
+ if (t && !(stale && i.Z && activeTransition !== i.Z)) {
1500
1560
  if (currentOptimisticLane) {
1501
- const n = i.q;
1561
+ const n = i.te;
1502
1562
  const r = findLane(currentOptimisticLane);
1503
1563
  if (n && findLane(n) === r && !hasActiveOverride(i)) {
1504
1564
  if (!tracking && e !== t) link(e, t);
1505
- throw i.fe;
1565
+ throw i.Te;
1506
1566
  }
1507
1567
  } else {
1508
1568
  if (!tracking && e !== t) link(e, t);
1509
- throw i.fe;
1569
+ throw i.Te;
1510
1570
  }
1511
- } else if (t && i !== e && i.Se & STATUS_UNINITIALIZED) {
1571
+ } else if (t && i !== e && i.Oe & STATUS_UNINITIALIZED) {
1512
1572
  if (!tracking && e !== t) link(e, t);
1513
- throw i.fe;
1514
- } else if (!t && i.Se & STATUS_UNINITIALIZED) {
1515
- throw i.fe;
1573
+ throw i.Te;
1574
+ } else if (!t && i.Oe & STATUS_UNINITIALIZED) {
1575
+ throw i.Te;
1516
1576
  }
1517
1577
  }
1518
- if (e.L && e.Se & STATUS_ERROR) {
1519
- if (e.Ee < clock) {
1578
+ if (e.L && e.Oe & STATUS_ERROR) {
1579
+ if (e.Se < clock) {
1520
1580
  recompute(e);
1521
1581
  return read(e);
1522
- } else throw e.fe;
1582
+ } else throw e.Te;
1523
1583
  }
1524
- if (snapshotCaptureActive && t && t.Te) {
1584
+ if (snapshotCaptureActive && t && t.Ee & CONFIG_IN_SNAPSHOT_SCOPE) {
1525
1585
  const n = e.de;
1526
1586
  if (n !== undefined) {
1527
1587
  const i = n === NO_SNAPSHOT ? undefined : n;
1528
- const r = e.X !== NOT_PENDING ? e.X : e.J;
1529
- if (r !== i) t.O |= REACTIVE_SNAPSHOT_STALE;
1588
+ const r = e.U !== NOT_PENDING ? e.U : e.ne;
1589
+ if (r !== i) t.R |= REACTIVE_SNAPSHOT_STALE;
1530
1590
  return i;
1531
1591
  }
1532
1592
  }
1533
- if (e.ee !== undefined && e.ee !== NOT_PENDING) {
1534
- if (t && stale && shouldReadStashedOptimisticValue(e)) return e.J;
1535
- return e.ee;
1593
+ if (e.G !== undefined && e.G !== NOT_PENDING) {
1594
+ if (t && stale && shouldReadStashedOptimisticValue(e)) return e.ne;
1595
+ return e.G;
1596
+ }
1597
+ if (
1598
+ activeTransition !== null &&
1599
+ currentOptimisticLane !== null &&
1600
+ !latestReadActive &&
1601
+ e.U !== NOT_PENDING &&
1602
+ i === e &&
1603
+ !e.L &&
1604
+ t
1605
+ ) {
1606
+ activeTransition.ee.add(t);
1607
+ return e.ne;
1536
1608
  }
1537
1609
  const r =
1538
1610
  !t ||
1539
1611
  (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;
1612
+ (e.G !== undefined || e.te || (i === e && stale) || !!(i.Oe & STATUS_PENDING))) ||
1613
+ e.U === NOT_PENDING ||
1614
+ (stale && e.Z && activeTransition !== e.Z)
1615
+ ? e.ne
1616
+ : e.U;
1545
1617
  if (
1546
1618
  !t &&
1547
1619
  i === e &&
1548
1620
  typeof n.L === "function" &&
1549
- !n.Pe &&
1550
- !(i.Se & STATUS_PENDING) &&
1551
- !n.i &&
1621
+ e.Ee & CONFIG_AUTO_DISPOSE &&
1622
+ !(i.Oe & STATUS_PENDING) &&
1552
1623
  !e.I
1553
1624
  ) {
1554
1625
  unobserved(e);
@@ -1556,12 +1627,12 @@ function read(e) {
1556
1627
  return r;
1557
1628
  }
1558
1629
  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;
1630
+ if (e.Z && activeTransition !== e.Z) globalQueue.initTransition(e.Z);
1631
+ const n = e.G !== undefined && !projectionWriteActive;
1632
+ const i = e.G !== undefined && e.G !== NOT_PENDING;
1633
+ const r = n ? (i ? e.G : e.ne) : e.U === NOT_PENDING ? e.ne : e.U;
1563
1634
  if (typeof t === "function") t = t(r);
1564
- const s = !e.ke || !e.ke(r, t) || !!(e.Se & STATUS_UNINITIALIZED);
1635
+ const s = !e.Le || !e.Le(r, t) || !!(e.Oe & STATUS_UNINITIALIZED);
1565
1636
  if (!s) {
1566
1637
  if (n && i && e.L) {
1567
1638
  insertSubs(e, true);
@@ -1570,25 +1641,25 @@ function setSignal(e, t) {
1570
1641
  return t;
1571
1642
  }
1572
1643
  if (n) {
1573
- const n = e.ee === NOT_PENDING;
1644
+ const n = e.G === NOT_PENDING;
1574
1645
  if (!n) globalQueue.initTransition(resolveTransition(e));
1575
1646
  if (n) {
1576
- e.X = e.J;
1577
- globalQueue.Y.push(e);
1647
+ e.U = e.ne;
1648
+ globalQueue.q.push(e);
1578
1649
  }
1579
- e.he = true;
1650
+ e.pe = true;
1580
1651
  const i = getOrCreateLane(e);
1581
- e.q = i;
1582
- e.ee = t;
1652
+ e.te = i;
1653
+ e.G = t;
1583
1654
  } else {
1584
- if (e.X === NOT_PENDING) globalQueue.se.push(e);
1585
- e.X = t;
1655
+ if (e.U === NOT_PENDING) globalQueue.ue.push(e);
1656
+ e.U = t;
1586
1657
  }
1587
1658
  updatePendingSignal(e);
1588
- if (e.xe) {
1589
- setSignal(e.xe, t);
1659
+ if (e.Ue) {
1660
+ setSignal(e.Ue, t);
1590
1661
  }
1591
- e.Ee = clock;
1662
+ e.Se = clock;
1592
1663
  insertSubs(e, n);
1593
1664
  schedule();
1594
1665
  return t;
@@ -1606,68 +1677,68 @@ function runWithOwner(e, t) {
1606
1677
  }
1607
1678
  }
1608
1679
  function getPendingSignal(e) {
1609
- if (!e.Fe) {
1610
- e.Fe = optimisticSignal(false, { ownedWrite: true });
1611
- if (e._e) {
1612
- e.Fe._e = e;
1680
+ if (!e.We) {
1681
+ e.We = optimisticSignal(false, { ownedWrite: true });
1682
+ if (e.Ie) {
1683
+ e.We.Ie = e;
1613
1684
  }
1614
- if (computePendingState(e)) setSignal(e.Fe, true);
1685
+ if (computePendingState(e)) setSignal(e.We, true);
1615
1686
  }
1616
- return e.Fe;
1687
+ return e.We;
1617
1688
  }
1618
1689
  function computePendingState(e) {
1619
1690
  const t = e;
1620
1691
  const n = e.V;
1621
- if (n && e.X !== NOT_PENDING) {
1622
- return !n.ye && !(n.Se & STATUS_PENDING);
1692
+ if (n && e.U !== NOT_PENDING) {
1693
+ return !n.De && !(n.Oe & STATUS_PENDING);
1623
1694
  }
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);
1695
+ if (e.G !== undefined && e.G !== NOT_PENDING) {
1696
+ if (t.Oe & STATUS_PENDING && !(t.Oe & STATUS_UNINITIALIZED)) return true;
1697
+ if (e.Ie) {
1698
+ const t = e.te ? findLane(e.te) : null;
1699
+ return !!(t && t.W.size > 0);
1629
1700
  }
1630
1701
  return true;
1631
1702
  }
1632
- if (e.ee !== undefined && e.ee === NOT_PENDING && !e._e) {
1703
+ if (e.G !== undefined && e.G === NOT_PENDING && !e.Ie) {
1633
1704
  return false;
1634
1705
  }
1635
- if (e.X !== NOT_PENDING && !(t.Se & STATUS_UNINITIALIZED)) return true;
1636
- return !!(t.Se & STATUS_PENDING && !(t.Se & STATUS_UNINITIALIZED));
1706
+ if (e.U !== NOT_PENDING && !(t.Oe & STATUS_UNINITIALIZED)) return true;
1707
+ return !!(t.Oe & STATUS_PENDING && !(t.Oe & STATUS_UNINITIALIZED));
1637
1708
  }
1638
1709
  function updatePendingSignal(e) {
1639
- if (e.Fe) {
1710
+ if (e.We) {
1640
1711
  const t = computePendingState(e);
1641
- const n = e.Fe;
1712
+ const n = e.We;
1642
1713
  setSignal(n, t);
1643
- if (!t && n.q) {
1714
+ if (!t && n.te) {
1644
1715
  const t = resolveLane(e);
1645
- if (t && t.k.size > 0) {
1646
- const e = findLane(n.q);
1716
+ if (t && t.W.size > 0) {
1717
+ const e = findLane(n.te);
1647
1718
  if (e !== t) {
1648
1719
  mergeLanes(t, e);
1649
1720
  }
1650
1721
  }
1651
1722
  signalLanes.delete(n);
1652
- n.q = undefined;
1723
+ n.te = undefined;
1653
1724
  }
1654
1725
  }
1655
1726
  }
1656
1727
  function getLatestValueComputed(e) {
1657
- if (!e.xe) {
1728
+ if (!e.Ue) {
1658
1729
  const t = latestReadActive;
1659
1730
  latestReadActive = false;
1660
1731
  const n = pendingCheckActive;
1661
1732
  pendingCheckActive = false;
1662
1733
  const i = context;
1663
1734
  context = null;
1664
- e.xe = optimisticComputed(() => read(e));
1665
- e.xe._e = e;
1735
+ e.Ue = optimisticComputed(() => read(e));
1736
+ e.Ue.Ie = e;
1666
1737
  context = i;
1667
1738
  pendingCheckActive = n;
1668
1739
  latestReadActive = t;
1669
1740
  }
1670
- return e.xe;
1741
+ return e.Ue;
1671
1742
  }
1672
1743
  function staleValues(e, t = true) {
1673
1744
  const n = stale;
@@ -1728,7 +1799,7 @@ function getContext(e, t = getOwner()) {
1728
1799
  if (!t) {
1729
1800
  throw new NoOwnerError();
1730
1801
  }
1731
- const n = hasContext(e, t) ? t.Le[e.id] : e.defaultValue;
1802
+ const n = hasContext(e, t) ? t.Ve[e.id] : e.defaultValue;
1732
1803
  if (isUndefined(n)) {
1733
1804
  throw new ContextNotFoundError();
1734
1805
  }
@@ -1738,109 +1809,111 @@ function setContext(e, t, n = getOwner()) {
1738
1809
  if (!n) {
1739
1810
  throw new NoOwnerError();
1740
1811
  }
1741
- n.Le = { ...n.Le, [e.id]: isUndefined(t) ? e.defaultValue : t };
1812
+ n.Ve = { ...n.Ve, [e.id]: isUndefined(t) ? e.defaultValue : t };
1742
1813
  }
1743
1814
  function hasContext(e, t) {
1744
- return !isUndefined(t?.Le[e.id]);
1815
+ return !isUndefined(t?.Ve[e.id]);
1745
1816
  }
1746
1817
  function isUndefined(e) {
1747
1818
  return typeof e === "undefined";
1748
1819
  }
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,
1820
+ function effect(e, t, n, i) {
1821
+ let r = false;
1822
+ const s = !!i?.user;
1823
+ const o = computed(s ? e : t => staleValues(() => e(t)), {
1824
+ ...i,
1753
1825
  equals: () => {
1754
- o.H = !o.fe;
1755
- if (s) o.F.enqueue(o.W, runEffect.bind(o));
1826
+ o.j = !o.Te;
1827
+ if (r) o.$.enqueue(o.M, runEffect.bind(o));
1756
1828
  return false;
1757
1829
  },
1758
1830
  lazy: true
1759
1831
  });
1760
- o.Qe = i;
1761
- o.Me = t;
1762
- o.je = n;
1763
- o.$e = undefined;
1764
- o.W = r?.render ? EFFECT_RENDER : EFFECT_USER;
1832
+ o.Ee &= ~CONFIG_AUTO_DISPOSE;
1833
+ o.xe = undefined;
1834
+ o.He = t;
1835
+ o.Me = n;
1836
+ o.Qe = undefined;
1837
+ o.M = s ? EFFECT_USER : EFFECT_RENDER;
1765
1838
  o.Ge = (e, t) => {
1766
- const n = e !== undefined ? e : o.Se;
1767
- const i = t !== undefined ? t : o.fe;
1839
+ const n = e !== undefined ? e : o.Oe;
1840
+ const i = t !== undefined ? t : o.Te;
1768
1841
  if (n & STATUS_ERROR) {
1769
1842
  let e = i;
1770
- o.F.notify(o, STATUS_PENDING, 0);
1771
- if (o.W === EFFECT_USER) {
1843
+ o.$.notify(o, STATUS_PENDING, 0);
1844
+ if (o.M === EFFECT_USER) {
1772
1845
  try {
1773
- return o.je
1774
- ? o.je(e, () => {
1775
- o.$e?.();
1776
- o.$e = undefined;
1846
+ return o.Me
1847
+ ? o.Me(e, () => {
1848
+ o.Qe?.();
1849
+ o.Qe = undefined;
1777
1850
  })
1778
1851
  : console.error(e);
1779
1852
  } catch (t) {
1780
1853
  e = t;
1781
1854
  }
1782
1855
  }
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);
1856
+ if (!o.$.notify(o, STATUS_ERROR, STATUS_ERROR)) throw e;
1857
+ } else if (o.M === EFFECT_RENDER) {
1858
+ o.$.notify(o, STATUS_PENDING | STATUS_ERROR, n, i);
1786
1859
  }
1787
1860
  };
1788
1861
  recompute(o, true);
1789
- !r?.defer && (o.W === EFFECT_USER ? o.F.enqueue(o.W, runEffect.bind(o)) : runEffect.call(o));
1790
- s = true;
1791
- cleanup(() => o.$e?.());
1862
+ !i?.defer &&
1863
+ (o.M === EFFECT_USER || i?.schedule ? o.$.enqueue(o.M, runEffect.bind(o)) : runEffect.call(o));
1864
+ r = true;
1865
+ cleanup(() => o.Qe?.());
1792
1866
  }
1793
1867
  function runEffect() {
1794
- if (!this.H || this.O & REACTIVE_DISPOSED) return;
1795
- this.$e?.();
1796
- this.$e = undefined;
1868
+ if (!this.j || this.R & REACTIVE_DISPOSED) return;
1869
+ this.Qe?.();
1870
+ this.Qe = undefined;
1797
1871
  try {
1798
- const e = this.Me(this.J, this.Qe);
1872
+ const e = this.He(this.ne, this.xe);
1799
1873
  if (false && e !== undefined && typeof e !== "function");
1800
- this.$e = e;
1874
+ this.Qe = e;
1801
1875
  } 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;
1876
+ this.Te = new StatusError(this, e);
1877
+ this.Oe |= STATUS_ERROR;
1878
+ if (!this.$.notify(this, STATUS_ERROR, STATUS_ERROR)) throw e;
1805
1879
  } finally {
1806
- this.Qe = this.J;
1807
- this.H = false;
1880
+ this.xe = this.ne;
1881
+ this.j = false;
1808
1882
  }
1809
1883
  }
1810
1884
  function trackedEffect(e, t) {
1811
1885
  const run = () => {
1812
- if (!n.H || n.O & REACTIVE_DISPOSED) return;
1886
+ if (!n.j || n.R & REACTIVE_DISPOSED) return;
1813
1887
  try {
1814
- n.H = false;
1888
+ n.j = false;
1815
1889
  recompute(n);
1816
1890
  } finally {
1817
1891
  }
1818
1892
  };
1819
1893
  const n = computed(
1820
1894
  () => {
1821
- n.$e?.();
1822
- n.$e = undefined;
1895
+ n.Qe?.();
1896
+ n.Qe = undefined;
1823
1897
  const t = staleValues(e);
1824
- n.$e = t;
1898
+ n.Qe = t;
1825
1899
  },
1826
- undefined,
1827
1900
  { ...t, lazy: true }
1828
1901
  );
1829
- n.$e = undefined;
1830
- n.Ke = true;
1831
- n.H = true;
1832
- n.W = EFFECT_TRACKED;
1902
+ n.Qe = undefined;
1903
+ n.Ee = (n.Ee & ~CONFIG_AUTO_DISPOSE) | CONFIG_CHILDREN_FORBIDDEN;
1904
+ n.j = true;
1905
+ n.M = EFFECT_TRACKED;
1833
1906
  n.Ge = (e, t) => {
1834
- const i = e !== undefined ? e : n.Se;
1907
+ const i = e !== undefined ? e : n.Oe;
1835
1908
  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;
1909
+ n.$.notify(n, STATUS_PENDING, 0);
1910
+ const e = t !== undefined ? t : n.Te;
1911
+ if (!n.$.notify(n, STATUS_ERROR, STATUS_ERROR)) throw e;
1839
1912
  }
1840
1913
  };
1841
- n.M = run;
1842
- n.F.enqueue(EFFECT_USER, run);
1843
- cleanup(() => n.$e?.());
1914
+ n.K = run;
1915
+ n.$.enqueue(EFFECT_USER, run);
1916
+ cleanup(() => n.Qe?.());
1844
1917
  }
1845
1918
  function restoreTransition(e, t) {
1846
1919
  globalQueue.initTransition(e);
@@ -1854,11 +1927,11 @@ function action(e) {
1854
1927
  const r = e(...t);
1855
1928
  globalQueue.initTransition();
1856
1929
  let s = activeTransition;
1857
- s.$.push(r);
1930
+ s.B.push(r);
1858
1931
  const done = (e, t) => {
1859
1932
  s = currentTransition(s);
1860
- const o = s.$.indexOf(r);
1861
- if (o >= 0) s.$.splice(o, 1);
1933
+ const o = s.B.indexOf(r);
1934
+ if (o >= 0) s.B.splice(o, 1);
1862
1935
  setActiveTransition(s);
1863
1936
  schedule();
1864
1937
  t ? i(t) : n(e);
@@ -1890,28 +1963,25 @@ function onCleanup(e) {
1890
1963
  return cleanup(e);
1891
1964
  }
1892
1965
  function accessor(e) {
1893
- const t = read.bind(null, e);
1894
- t.$r = true;
1895
- return t;
1966
+ return read.bind(null, e);
1896
1967
  }
1897
1968
  function createSignal(e, t) {
1898
1969
  if (typeof e === "function") {
1899
- const n = computed(e, undefined, t);
1900
- n.Pe = true;
1970
+ const n = computed(e, t);
1971
+ n.Ee &= ~CONFIG_AUTO_DISPOSE;
1901
1972
  return [accessor(n), setSignal.bind(null, n)];
1902
1973
  }
1903
1974
  const n = signal(e, t);
1904
1975
  return [accessor(n), setSignal.bind(null, n)];
1905
1976
  }
1906
1977
  function createMemo(e, t) {
1907
- let n = computed(e, undefined, t);
1908
- return accessor(n);
1978
+ return accessor(computed(e, t));
1909
1979
  }
1910
1980
  function createEffect(e, t, n) {
1911
- effect(e, t.effect || t, t.error, undefined, n);
1981
+ effect(e, t.effect || t, t.error, { user: true, ...n });
1912
1982
  }
1913
1983
  function createRenderEffect(e, t, n) {
1914
- effect(e, t, undefined, undefined, { render: true, ...n });
1984
+ effect(e, t, undefined, n);
1915
1985
  }
1916
1986
  function createTrackedEffect(e, t) {
1917
1987
  trackedEffect(e, t);
@@ -1932,8 +2002,7 @@ function createReaction(e, t) {
1932
2002
  dispose(t);
1933
2003
  },
1934
2004
  e.error,
1935
- undefined,
1936
- { defer: true, ...(false ? { ...t, name: t?.name ?? "effect" } : t) }
2005
+ { ...(false ? { ...t, name: t?.name ?? "effect" } : t), user: true, defer: true }
1937
2006
  );
1938
2007
  });
1939
2008
  };
@@ -1955,8 +2024,8 @@ function resolve(e) {
1955
2024
  }
1956
2025
  function createOptimistic(e, t) {
1957
2026
  if (typeof e === "function") {
1958
- const n = optimisticComputed(e, undefined, t);
1959
- n.Pe = true;
2027
+ const n = optimisticComputed(e, t);
2028
+ n.Ee &= ~CONFIG_AUTO_DISPOSE;
1960
2029
  return [accessor(n), setSignal.bind(null, n)];
1961
2030
  }
1962
2031
  const n = optimisticSignal(e, t);
@@ -1964,7 +2033,7 @@ function createOptimistic(e, t) {
1964
2033
  }
1965
2034
  function onSettled(e) {
1966
2035
  const t = getOwner();
1967
- t && !t.Ke
2036
+ t && !(t.Ee & CONFIG_CHILDREN_FORBIDDEN)
1968
2037
  ? createTrackedEffect(() => untrack(e), undefined)
1969
2038
  : globalQueue.enqueue(EFFECT_USER, () => {
1970
2039
  const t = e();
@@ -1998,34 +2067,34 @@ function applyState(e, t, n) {
1998
2067
  let t = false;
1999
2068
  const c = getOverrideValue(r, s, u, "length", o);
2000
2069
  if (e.length && c && e[0] && n(e[0]) != null) {
2001
- let a, l, f, E, d, T, S, R;
2070
+ let a, l, f, E, T, S, d, O;
2002
2071
  for (
2003
2072
  f = 0, E = Math.min(c, e.length);
2004
2073
  f < E &&
2005
- ((T = getOverrideValue(r, s, u, f, o)) === e[f] || (T && e[f] && n(T) === n(e[f])));
2074
+ ((S = getOverrideValue(r, s, u, f, o)) === e[f] || (S && e[f] && n(S) === n(e[f])));
2006
2075
  f++
2007
2076
  ) {
2008
- applyState(e[f], wrap(T, i), n);
2077
+ applyState(e[f], wrap(S, i), n);
2009
2078
  }
2010
- const O = new Array(e.length),
2079
+ const R = new Array(e.length),
2011
2080
  _ = new Map();
2012
2081
  for (
2013
- E = c - 1, d = e.length - 1;
2082
+ E = c - 1, T = e.length - 1;
2014
2083
  E >= f &&
2015
- d >= f &&
2016
- ((T = getOverrideValue(r, s, u, E, o)) === e[d] || (T && e[d] && n(T) === n(e[d])));
2017
- E--, d--
2084
+ T >= f &&
2085
+ ((S = getOverrideValue(r, s, u, E, o)) === e[T] || (S && e[T] && n(S) === n(e[T])));
2086
+ E--, T--
2018
2087
  ) {
2019
- O[d] = T;
2088
+ R[T] = S;
2020
2089
  }
2021
- if (f > d || f > E) {
2022
- for (l = f; l <= d; l++) {
2090
+ if (f > T || f > E) {
2091
+ for (l = f; l <= T; l++) {
2023
2092
  t = true;
2024
2093
  i[STORE_NODE][l] && setSignal(i[STORE_NODE][l], wrap(e[l], i));
2025
2094
  }
2026
2095
  for (; l < e.length; l++) {
2027
2096
  t = true;
2028
- const r = wrap(O[l], i);
2097
+ const r = wrap(R[l], i);
2029
2098
  i[STORE_NODE][l] && setSignal(i[STORE_NODE][l], r);
2030
2099
  applyState(e[l], r, n);
2031
2100
  }
@@ -2033,27 +2102,27 @@ function applyState(e, t, n) {
2033
2102
  c !== e.length && i[STORE_NODE].length && setSignal(i[STORE_NODE].length, e.length);
2034
2103
  return;
2035
2104
  }
2036
- S = new Array(d + 1);
2037
- for (l = d; l >= f; l--) {
2038
- T = e[l];
2039
- R = T ? n(T) : T;
2040
- a = _.get(R);
2041
- S[l] = a === undefined ? -1 : a;
2042
- _.set(R, l);
2105
+ d = new Array(T + 1);
2106
+ for (l = T; l >= f; l--) {
2107
+ S = e[l];
2108
+ O = S ? n(S) : S;
2109
+ a = _.get(O);
2110
+ d[l] = a === undefined ? -1 : a;
2111
+ _.set(O, l);
2043
2112
  }
2044
2113
  for (a = f; a <= E; a++) {
2045
- T = getOverrideValue(r, s, u, a, o);
2046
- R = T ? n(T) : T;
2047
- l = _.get(R);
2114
+ S = getOverrideValue(r, s, u, a, o);
2115
+ O = S ? n(S) : S;
2116
+ l = _.get(O);
2048
2117
  if (l !== undefined && l !== -1) {
2049
- O[l] = T;
2050
- l = S[l];
2051
- _.set(R, l);
2118
+ R[l] = S;
2119
+ l = d[l];
2120
+ _.set(O, l);
2052
2121
  }
2053
2122
  }
2054
2123
  for (l = f; l < e.length; l++) {
2055
- if (l in O) {
2056
- const t = wrap(O[l], i);
2124
+ if (l in R) {
2125
+ const t = wrap(R[l], i);
2057
2126
  i[STORE_NODE][l] && setSignal(i[STORE_NODE][l], t);
2058
2127
  applyState(e[l], t, n);
2059
2128
  } else i[STORE_NODE][l] && setSignal(i[STORE_NODE][l], wrap(e[l], i));
@@ -2081,12 +2150,12 @@ function applyState(e, t, n) {
2081
2150
  const l = c[a];
2082
2151
  const f = u[l];
2083
2152
  const E = unwrap(getOverrideValue(r, s, u, l, o));
2084
- let d = unwrap(e[l]);
2085
- if (E === d) continue;
2086
- if (!E || !isWrappable(E) || !isWrappable(d) || (n(E) != null && n(E) !== n(d))) {
2153
+ let T = unwrap(e[l]);
2154
+ if (E === T) continue;
2155
+ if (!E || !isWrappable(E) || !isWrappable(T) || (n(E) != null && n(E) !== n(T))) {
2087
2156
  t && setSignal(t, void 0);
2088
- f && setSignal(f, isWrappable(d) ? wrap(d, i) : d);
2089
- } else applyState(d, wrap(E, i), n);
2157
+ f && setSignal(f, isWrappable(T) ? wrap(T, i) : T);
2158
+ } else applyState(T, wrap(E, i), n);
2090
2159
  }
2091
2160
  }
2092
2161
  if ((u = i[STORE_HAS])) {
@@ -2129,28 +2198,35 @@ function createProjectionInternal(e, t, n) {
2129
2198
  };
2130
2199
  const s = wrapProjection(t);
2131
2200
  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
- });
2148
- i.Pe = true;
2201
+ if (!i) i = getOwner();
2202
+ runProjectionComputed(s, e, n?.key || "id");
2203
+ }, undefined);
2204
+ i.Ee &= ~CONFIG_AUTO_DISPOSE;
2149
2205
  return { store: s, node: i };
2150
2206
  }
2151
2207
  function createProjection(e, t, n) {
2152
2208
  return createProjectionInternal(e, t, n).store;
2153
2209
  }
2210
+ function runProjectionComputed(e, t, n, i) {
2211
+ const r = getOwner();
2212
+ let s = false;
2213
+ let o;
2214
+ const u = new Proxy(
2215
+ e,
2216
+ createWriteTraps(() => !s || r.De === o)
2217
+ );
2218
+ storeSetter(u, u => {
2219
+ o = t(u);
2220
+ s = true;
2221
+ const commit = t => {
2222
+ if (t === u || t === undefined) return;
2223
+ const write = () => storeSetter(e, reconcile(t, n));
2224
+ i ? i(write) : write();
2225
+ };
2226
+ commit(handleAsync(r, o, commit));
2227
+ });
2228
+ return r;
2229
+ }
2154
2230
  function createWriteTraps(e) {
2155
2231
  const t = {
2156
2232
  get(e, n) {
@@ -2260,13 +2336,13 @@ function getNode(e, t, n, i, r = isEqual, s, o) {
2260
2336
  {
2261
2337
  equals: r,
2262
2338
  unobserved() {
2263
- delete e[t];
2339
+ if (e[t] === u) delete e[t];
2264
2340
  }
2265
2341
  },
2266
2342
  i
2267
2343
  );
2268
2344
  if (s) {
2269
- u.ee = NOT_PENDING;
2345
+ u.G = NOT_PENDING;
2270
2346
  }
2271
2347
  if (o && t in o) {
2272
2348
  const e = o[t];
@@ -2303,8 +2379,8 @@ function getPropertyDescriptor(e, t, n) {
2303
2379
  function prepareStoreWrite(e, t, n) {
2304
2380
  if (e[STORE_OPTIMISTIC]) {
2305
2381
  const t = e[STORE_FIREWALL];
2306
- if (t?.K) {
2307
- globalQueue.initTransition(t.K);
2382
+ if (t?.Z) {
2383
+ globalQueue.initTransition(t.Z);
2308
2384
  }
2309
2385
  }
2310
2386
  const i = e[STORE_VALUE];
@@ -2312,7 +2388,7 @@ function prepareStoreWrite(e, t, n) {
2312
2388
  if (
2313
2389
  snapshotCaptureActive &&
2314
2390
  typeof n !== "symbol" &&
2315
- !((e[STORE_FIREWALL]?.Se ?? 0) & STATUS_PENDING)
2391
+ !((e[STORE_FIREWALL]?.Oe ?? 0) & STATUS_PENDING)
2316
2392
  ) {
2317
2393
  if (!e[STORE_SNAPSHOT_PROPS]) {
2318
2394
  e[STORE_SNAPSHOT_PROPS] = Object.create(null);
@@ -2327,20 +2403,45 @@ function prepareStoreWrite(e, t, n) {
2327
2403
  if (s) trackOptimisticStore(t);
2328
2404
  return { base: r, overrideKey: o, state: i };
2329
2405
  }
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);
2406
+ function upsertStoreNode(e, t, n, i, r) {
2407
+ if (t[n]) return t[n];
2408
+ const s = isWrappable(i) ? wrap(i, e) : i;
2409
+ const o = getNode(t, n, s, e[STORE_FIREWALL], isEqual, e[STORE_OPTIMISTIC], r);
2410
+ registerTransientStoreNode(o);
2411
+ return o;
2412
+ }
2413
+ function notifyStoreProperty(e, t, n, i, r, s) {
2414
+ const o = projectionWriteActive || e[STORE_OPTIMISTIC];
2415
+ const u = n !== "delete";
2416
+ const c = e[STORE_HAS]?.[t];
2417
+ if (c) {
2418
+ setSignal(c, u);
2419
+ } else if (!o && n !== "invalidate" && s !== u) {
2420
+ const n = upsertStoreNode(e, getNodes(e, STORE_HAS), t, s);
2421
+ setSignal(n, u);
2422
+ }
2423
+ const a = getNodes(e, STORE_NODE);
2333
2424
  if (n === "set") {
2334
- r[t] && setSignal(r[t], () => (isWrappable(i) ? wrap(i, e) : i));
2425
+ if (a[t]) {
2426
+ setSignal(a[t], () => (isWrappable(i) ? wrap(i, e) : i));
2427
+ } else if (!o) {
2428
+ const n = upsertStoreNode(e, a, t, r, e[STORE_SNAPSHOT_PROPS]);
2429
+ setSignal(n, () => (isWrappable(i) ? wrap(i, e) : i));
2430
+ }
2335
2431
  } else if (n === "invalidate") {
2336
- if (r[t]) {
2337
- setSignal(r[t], {});
2338
- delete r[t];
2432
+ if (a[t]) {
2433
+ setSignal(a[t], {});
2434
+ delete a[t];
2339
2435
  }
2340
2436
  } else {
2341
- r[t] && setSignal(r[t], undefined);
2437
+ if (a[t]) {
2438
+ setSignal(a[t], undefined);
2439
+ } else if (!o) {
2440
+ const n = upsertStoreNode(e, a, t, r, e[STORE_SNAPSHOT_PROPS]);
2441
+ setSignal(n, undefined);
2442
+ }
2342
2443
  }
2343
- r[$TRACK] && setSignal(r[$TRACK], undefined);
2444
+ a[$TRACK] && setSignal(a[$TRACK], undefined);
2344
2445
  }
2345
2446
  let Writing = null;
2346
2447
  const storeTraps = {
@@ -2369,11 +2470,11 @@ const storeTraps = {
2369
2470
  if (writeOnly(n)) {
2370
2471
  let n =
2371
2472
  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
2473
+ ? r.G !== undefined && r.G !== NOT_PENDING
2474
+ ? r.G
2475
+ : r.U !== NOT_PENDING
2476
+ ? r.U
2477
+ : r.ne
2377
2478
  : c[t];
2378
2479
  n === $DELETED && (n = undefined);
2379
2480
  if (!isWrappable(n)) return n;
@@ -2415,11 +2516,11 @@ const storeTraps = {
2415
2516
  : e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]
2416
2517
  ? e[STORE_OVERRIDE][t] !== $DELETED
2417
2518
  : 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
- );
2519
+ if (writeOnly(e[$PROXY])) return n;
2520
+ const i = getNodes(e, STORE_HAS);
2521
+ if (i[t]) return read(i[t]);
2522
+ if (getObserver()) {
2523
+ return read(getNode(i, t, n, e[STORE_FIREWALL], isEqual, e[STORE_OPTIMISTIC]));
2423
2524
  }
2424
2525
  return n;
2425
2526
  },
@@ -2434,29 +2535,39 @@ const storeTraps = {
2434
2535
  : e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]
2435
2536
  ? e[STORE_OVERRIDE][t]
2436
2537
  : 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 &&
2538
+ const c =
2539
+ e[STORE_OPTIMISTIC_OVERRIDE] && t in e[STORE_OPTIMISTIC_OVERRIDE]
2540
+ ? e[STORE_OPTIMISTIC_OVERRIDE][t] !== $DELETED
2541
+ : e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]
2542
+ ? e[STORE_OVERRIDE][t] !== $DELETED
2543
+ : t in e[STORE_VALUE];
2544
+ const a = n?.[$TARGET]?.[STORE_VALUE] ?? n;
2545
+ const l = Array.isArray(o) && t !== "length";
2546
+ const f = l ? parseInt(t) + 1 : 0;
2547
+ const E =
2548
+ l &&
2442
2549
  (e[STORE_OPTIMISTIC_OVERRIDE] && "length" in e[STORE_OPTIMISTIC_OVERRIDE]
2443
2550
  ? e[STORE_OPTIMISTIC_OVERRIDE].length
2444
2551
  : e[STORE_OVERRIDE] && "length" in e[STORE_OVERRIDE]
2445
2552
  ? e[STORE_OVERRIDE].length
2446
2553
  : 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];
2554
+ const T = l && f > E ? f : undefined;
2555
+ if (u === a && T === undefined) return true;
2556
+ if (a !== undefined && a === r && T === undefined) delete e[s]?.[t];
2450
2557
  else {
2451
2558
  const n = e[s] || (e[s] = Object.create(null));
2452
- n[t] = c;
2453
- if (E !== undefined) n.length = E;
2559
+ n[t] = a;
2560
+ if (T !== undefined) n.length = T;
2454
2561
  }
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);
2562
+ notifyStoreProperty(e, t, "set", a, u, c);
2563
+ if (Array.isArray(o) && t !== "length" && T !== undefined) {
2564
+ const t = getNodes(e, STORE_NODE);
2565
+ if (t.length) {
2566
+ setSignal(t.length, T);
2567
+ } else if (!projectionWriteActive && !e[STORE_OPTIMISTIC]) {
2568
+ const n = upsertStoreNode(e, t, "length", E, e[STORE_SNAPSHOT_PROPS]);
2569
+ setSignal(n, T);
2570
+ }
2460
2571
  }
2461
2572
  if (false);
2462
2573
  });
@@ -2495,7 +2606,7 @@ const storeTraps = {
2495
2606
  } else if (e[i] && t in e[i]) {
2496
2607
  delete e[i][t];
2497
2608
  } else return true;
2498
- notifyStoreProperty(e, t, "delete");
2609
+ notifyStoreProperty(e, t, "delete", undefined, r, true);
2499
2610
  });
2500
2611
  }
2501
2612
  return true;
@@ -2565,7 +2676,7 @@ function createStore(e, t, n) {
2565
2676
  return [r, e => storeSetter(r, e)];
2566
2677
  }
2567
2678
  function createOptimisticStore(e, t, n) {
2568
- GlobalQueue.ce ||= clearOptimisticStore;
2679
+ GlobalQueue.le ||= clearOptimisticStore;
2569
2680
  const i = typeof e === "function";
2570
2681
  const r = i ? t : e;
2571
2682
  const s = i ? e : undefined;
@@ -2582,7 +2693,7 @@ function clearOptimisticStore(e) {
2582
2693
  if (i) {
2583
2694
  for (const e of Reflect.ownKeys(n)) {
2584
2695
  if (i[e]) {
2585
- i[e].q = undefined;
2696
+ i[e].te = undefined;
2586
2697
  const n =
2587
2698
  t[STORE_OVERRIDE] && e in t[STORE_OVERRIDE] ? t[STORE_OVERRIDE][e] : t[STORE_VALUE][e];
2588
2699
  const r = n === $DELETED ? undefined : n;
@@ -2590,7 +2701,7 @@ function clearOptimisticStore(e) {
2590
2701
  }
2591
2702
  }
2592
2703
  if (i[$TRACK]) {
2593
- i[$TRACK].q = undefined;
2704
+ i[$TRACK].te = undefined;
2594
2705
  setSignal(i[$TRACK], undefined);
2595
2706
  }
2596
2707
  }
@@ -2622,34 +2733,23 @@ function createOptimisticProjectionInternal(e, t, n) {
2622
2733
  };
2623
2734
  const s = wrapProjection(t);
2624
2735
  if (e) {
2736
+ const wrapCommit = e => {
2737
+ setProjectionWriteActive(true);
2738
+ try {
2739
+ e();
2740
+ } finally {
2741
+ setProjectionWriteActive(false);
2742
+ }
2743
+ };
2625
2744
  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
2745
  setProjectionWriteActive(true);
2634
2746
  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
- });
2747
+ runProjectionComputed(s, e, n?.key || "id", wrapCommit);
2648
2748
  } finally {
2649
2749
  setProjectionWriteActive(false);
2650
2750
  }
2651
- });
2652
- i.Pe = true;
2751
+ }, undefined);
2752
+ i.Ee &= ~CONFIG_AUTO_DISPOSE;
2653
2753
  }
2654
2754
  return { store: s, node: i };
2655
2755
  }
@@ -2909,69 +3009,69 @@ function mapArray(e, t, n) {
2909
3009
  const i = typeof n?.keyed === "function" ? n.keyed : undefined;
2910
3010
  const r = t.length > 1;
2911
3011
  const s = t;
2912
- const o = computed(
2913
- updateKeyedMap.bind({
2914
- Ye: createOwner(),
2915
- Ze: 0,
2916
- Be: e,
2917
- qe: [],
2918
- Xe: s,
2919
- ze: [],
2920
- Je: [],
2921
- et: i,
2922
- tt: i || n?.keyed === false ? [] : undefined,
2923
- nt: r ? [] : undefined,
2924
- it: n?.fallback
2925
- })
2926
- );
2927
- o.Pe = true;
2928
- return accessor(o);
3012
+ const o = {
3013
+ je: createOwner(),
3014
+ $e: 0,
3015
+ Ke: e,
3016
+ Ye: [],
3017
+ Be: s,
3018
+ Ze: [],
3019
+ qe: [],
3020
+ ze: i,
3021
+ Xe: i || n?.keyed === false ? [] : undefined,
3022
+ Je: r ? [] : undefined,
3023
+ et: n?.fallback
3024
+ };
3025
+ const u = computed(updateKeyedMap.bind(o));
3026
+ o.je.u = u;
3027
+ u.Ee &= ~CONFIG_AUTO_DISPOSE;
3028
+ return accessor(u);
2929
3029
  }
2930
3030
  const pureOptions = { ownedWrite: true };
2931
3031
  function updateKeyedMap() {
2932
- const e = this.Be() || [],
3032
+ const e = this.Ke() || [],
2933
3033
  t = e.length;
2934
3034
  e[$TRACK];
2935
- runWithOwner(this.Ye, () => {
3035
+ runWithOwner(this.je, () => {
2936
3036
  let n,
2937
3037
  i,
2938
- r = this.tt
3038
+ r = this.Xe
2939
3039
  ? () => {
2940
- this.tt[i] = signal(e[i], pureOptions);
2941
- this.nt && (this.nt[i] = signal(i, pureOptions));
2942
- return this.Xe(accessor(this.tt[i]), this.nt ? accessor(this.nt[i]) : undefined);
3040
+ this.Xe[i] = signal(e[i], pureOptions);
3041
+ this.Je && (this.Je[i] = signal(i, pureOptions));
3042
+ return this.Be(accessor(this.Xe[i]), this.Je ? accessor(this.Je[i]) : undefined);
2943
3043
  }
2944
- : this.nt
3044
+ : this.Je
2945
3045
  ? () => {
2946
3046
  const t = e[i];
2947
- this.nt[i] = signal(i, pureOptions);
2948
- return this.Xe(() => t, accessor(this.nt[i]));
3047
+ this.Je[i] = signal(i, pureOptions);
3048
+ return this.Be(() => t, accessor(this.Je[i]));
2949
3049
  }
2950
3050
  : () => {
2951
3051
  const t = e[i];
2952
- return this.Xe(() => t);
3052
+ return this.Be(() => t);
2953
3053
  };
2954
3054
  if (t === 0) {
2955
- if (this.Ze !== 0) {
2956
- this.Ye.dispose(false);
2957
- this.Je = [];
3055
+ if (this.$e !== 0) {
3056
+ this.je.dispose(false);
2958
3057
  this.qe = [];
2959
- this.ze = [];
2960
- this.Ze = 0;
2961
- this.tt && (this.tt = []);
2962
- this.nt && (this.nt = []);
2963
- }
2964
- if (this.it && !this.ze[0]) {
2965
- this.ze[0] = runWithOwner((this.Je[0] = createOwner()), this.it);
2966
- }
2967
- } else if (this.Ze === 0) {
2968
- if (this.Je[0]) this.Je[0].dispose();
2969
- this.ze = new Array(t);
3058
+ this.Ye = [];
3059
+ this.Ze = [];
3060
+ this.$e = 0;
3061
+ this.Xe && (this.Xe = []);
3062
+ this.Je && (this.Je = []);
3063
+ }
3064
+ if (this.et && !this.Ze[0]) {
3065
+ this.Ze[0] = runWithOwner((this.qe[0] = createOwner()), this.et);
3066
+ }
3067
+ } else if (this.$e === 0) {
3068
+ if (this.qe[0]) this.qe[0].dispose();
3069
+ this.Ze = new Array(t);
2970
3070
  for (i = 0; i < t; i++) {
2971
- this.qe[i] = e[i];
2972
- this.ze[i] = runWithOwner((this.Je[i] = createOwner()), r);
3071
+ this.Ye[i] = e[i];
3072
+ this.Ze[i] = runWithOwner((this.qe[i] = createOwner()), r);
2973
3073
  }
2974
- this.Ze = t;
3074
+ this.$e = t;
2975
3075
  } else {
2976
3076
  let s,
2977
3077
  o,
@@ -2981,157 +3081,157 @@ function updateKeyedMap() {
2981
3081
  l,
2982
3082
  f,
2983
3083
  E = new Array(t),
2984
- d = new Array(t),
2985
- T = this.tt ? new Array(t) : undefined,
2986
- S = this.nt ? new Array(t) : undefined;
3084
+ T = new Array(t),
3085
+ S = this.Xe ? new Array(t) : undefined,
3086
+ d = this.Je ? new Array(t) : undefined;
2987
3087
  for (
2988
- s = 0, o = Math.min(this.Ze, t);
2989
- s < o && (this.qe[s] === e[s] || (this.tt && compare(this.et, this.qe[s], e[s])));
3088
+ s = 0, o = Math.min(this.$e, t);
3089
+ s < o && (this.Ye[s] === e[s] || (this.Xe && compare(this.ze, this.Ye[s], e[s])));
2990
3090
  s++
2991
3091
  ) {
2992
- if (this.tt) setSignal(this.tt[s], e[s]);
3092
+ if (this.Xe) setSignal(this.Xe[s], e[s]);
2993
3093
  }
2994
3094
  for (
2995
- o = this.Ze - 1, u = t - 1;
3095
+ o = this.$e - 1, u = t - 1;
2996
3096
  o >= s &&
2997
3097
  u >= s &&
2998
- (this.qe[o] === e[u] || (this.tt && compare(this.et, this.qe[o], e[u])));
3098
+ (this.Ye[o] === e[u] || (this.Xe && compare(this.ze, this.Ye[o], e[u])));
2999
3099
  o--, u--
3000
3100
  ) {
3001
- E[u] = this.ze[o];
3002
- d[u] = this.Je[o];
3003
- T && (T[u] = this.tt[o]);
3004
- S && (S[u] = this.nt[o]);
3101
+ E[u] = this.Ze[o];
3102
+ T[u] = this.qe[o];
3103
+ S && (S[u] = this.Xe[o]);
3104
+ d && (d[u] = this.Je[o]);
3005
3105
  }
3006
3106
  l = new Map();
3007
3107
  f = new Array(u + 1);
3008
3108
  for (i = u; i >= s; i--) {
3009
3109
  c = e[i];
3010
- a = this.et ? this.et(c) : c;
3110
+ a = this.ze ? this.ze(c) : c;
3011
3111
  n = l.get(a);
3012
3112
  f[i] = n === undefined ? -1 : n;
3013
3113
  l.set(a, i);
3014
3114
  }
3015
3115
  for (n = s; n <= o; n++) {
3016
- c = this.qe[n];
3017
- a = this.et ? this.et(c) : c;
3116
+ c = this.Ye[n];
3117
+ a = this.ze ? this.ze(c) : c;
3018
3118
  i = l.get(a);
3019
3119
  if (i !== undefined && i !== -1) {
3020
- E[i] = this.ze[n];
3021
- d[i] = this.Je[n];
3022
- T && (T[i] = this.tt[n]);
3023
- S && (S[i] = this.nt[n]);
3120
+ E[i] = this.Ze[n];
3121
+ T[i] = this.qe[n];
3122
+ S && (S[i] = this.Xe[n]);
3123
+ d && (d[i] = this.Je[n]);
3024
3124
  i = f[i];
3025
3125
  l.set(a, i);
3026
- } else this.Je[n].dispose();
3126
+ } else this.qe[n].dispose();
3027
3127
  }
3028
3128
  for (i = s; i < t; i++) {
3029
3129
  if (i in E) {
3030
- this.ze[i] = E[i];
3031
- this.Je[i] = d[i];
3032
- if (T) {
3033
- this.tt[i] = T[i];
3034
- setSignal(this.tt[i], e[i]);
3035
- }
3130
+ this.Ze[i] = E[i];
3131
+ this.qe[i] = T[i];
3036
3132
  if (S) {
3037
- this.nt[i] = S[i];
3038
- setSignal(this.nt[i], i);
3133
+ this.Xe[i] = S[i];
3134
+ setSignal(this.Xe[i], e[i]);
3135
+ }
3136
+ if (d) {
3137
+ this.Je[i] = d[i];
3138
+ setSignal(this.Je[i], i);
3039
3139
  }
3040
3140
  } else {
3041
- this.ze[i] = runWithOwner((this.Je[i] = createOwner()), r);
3141
+ this.Ze[i] = runWithOwner((this.qe[i] = createOwner()), r);
3042
3142
  }
3043
3143
  }
3044
- this.ze = this.ze.slice(0, (this.Ze = t));
3045
- this.qe = e.slice(0);
3144
+ this.Ze = this.Ze.slice(0, (this.$e = t));
3145
+ this.Ye = e.slice(0);
3046
3146
  }
3047
3147
  });
3048
- return this.ze;
3148
+ return this.Ze;
3049
3149
  }
3050
3150
  function repeat(e, t, n) {
3051
3151
  const i = t;
3052
3152
  const r = computed(
3053
3153
  updateRepeat.bind({
3054
- Ye: createOwner(),
3055
- Ze: 0,
3056
- rt: 0,
3057
- st: e,
3058
- Xe: i,
3059
- Je: [],
3060
- ze: [],
3061
- ot: n?.from,
3062
- it: n?.fallback
3154
+ je: createOwner(),
3155
+ $e: 0,
3156
+ tt: 0,
3157
+ nt: e,
3158
+ Be: i,
3159
+ qe: [],
3160
+ Ze: [],
3161
+ it: n?.from,
3162
+ et: n?.fallback
3063
3163
  })
3064
3164
  );
3065
- r.Pe = true;
3165
+ r.Ee &= ~CONFIG_AUTO_DISPOSE;
3066
3166
  return accessor(r);
3067
3167
  }
3068
3168
  function updateRepeat() {
3069
- const e = this.st();
3070
- const t = this.ot?.() || 0;
3071
- runWithOwner(this.Ye, () => {
3169
+ const e = this.nt();
3170
+ const t = this.it?.() || 0;
3171
+ runWithOwner(this.je, () => {
3072
3172
  if (e === 0) {
3073
- if (this.Ze !== 0) {
3074
- this.Ye.dispose(false);
3075
- this.Je = [];
3076
- this.ze = [];
3077
- this.Ze = 0;
3173
+ if (this.$e !== 0) {
3174
+ this.je.dispose(false);
3175
+ this.qe = [];
3176
+ this.Ze = [];
3177
+ this.$e = 0;
3078
3178
  }
3079
- if (this.it && !this.ze[0]) {
3080
- this.ze[0] = runWithOwner((this.Je[0] = createOwner()), this.it);
3179
+ if (this.et && !this.Ze[0]) {
3180
+ this.Ze[0] = runWithOwner((this.qe[0] = createOwner()), this.et);
3081
3181
  }
3082
3182
  return;
3083
3183
  }
3084
3184
  const n = t + e;
3085
- const i = this.rt + this.Ze;
3086
- if (this.Ze === 0 && this.Je[0]) this.Je[0].dispose();
3087
- for (let e = n; e < i; e++) this.Je[e - this.rt].dispose();
3088
- if (this.rt < t) {
3089
- let e = this.rt;
3090
- while (e < t && e < this.Ze) this.Je[e++].dispose();
3091
- this.Je.splice(0, t - this.rt);
3092
- this.ze.splice(0, t - this.rt);
3093
- } else if (this.rt > t) {
3094
- let n = i - this.rt - 1;
3095
- let r = this.rt - t;
3096
- this.Je.length = this.ze.length = e;
3185
+ const i = this.tt + this.$e;
3186
+ if (this.$e === 0 && this.qe[0]) this.qe[0].dispose();
3187
+ for (let e = n; e < i; e++) this.qe[e - this.tt].dispose();
3188
+ if (this.tt < t) {
3189
+ let e = this.tt;
3190
+ while (e < t && e < this.$e) this.qe[e++].dispose();
3191
+ this.qe.splice(0, t - this.tt);
3192
+ this.Ze.splice(0, t - this.tt);
3193
+ } else if (this.tt > t) {
3194
+ let n = i - this.tt - 1;
3195
+ let r = this.tt - t;
3196
+ this.qe.length = this.Ze.length = e;
3097
3197
  while (n >= r) {
3098
- this.Je[n] = this.Je[n - r];
3099
- this.ze[n] = this.ze[n - r];
3198
+ this.qe[n] = this.qe[n - r];
3199
+ this.Ze[n] = this.Ze[n - r];
3100
3200
  n--;
3101
3201
  }
3102
3202
  for (let e = 0; e < r; e++) {
3103
- this.ze[e] = runWithOwner((this.Je[e] = createOwner()), () => this.Xe(e + t));
3203
+ this.Ze[e] = runWithOwner((this.qe[e] = createOwner()), () => this.Be(e + t));
3104
3204
  }
3105
3205
  }
3106
3206
  for (let e = i; e < n; e++) {
3107
- this.ze[e - t] = runWithOwner((this.Je[e - t] = createOwner()), () => this.Xe(e));
3207
+ this.Ze[e - t] = runWithOwner((this.qe[e - t] = createOwner()), () => this.Be(e));
3108
3208
  }
3109
- this.ze = this.ze.slice(0, e);
3110
- this.rt = t;
3111
- this.Ze = e;
3209
+ this.Ze = this.Ze.slice(0, e);
3210
+ this.tt = t;
3211
+ this.$e = e;
3112
3212
  });
3113
- return this.ze;
3213
+ return this.Ze;
3114
3214
  }
3115
3215
  function compare(e, t, n) {
3116
3216
  return e ? e(t) === e(n) : true;
3117
3217
  }
3118
3218
  function boundaryComputed(e, t) {
3119
- const n = computed(e, undefined, { lazy: true });
3219
+ const n = computed(e, { lazy: true });
3120
3220
  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);
3221
+ const i = e !== undefined ? e : n.Oe;
3222
+ const r = t !== undefined ? t : n.Te;
3223
+ n.Oe &= ~n.rt;
3224
+ n.$.notify(n, n.rt, i, r);
3125
3225
  };
3126
- n.ut = t;
3127
- n.Pe = true;
3226
+ n.rt = t;
3227
+ n.Ee &= ~CONFIG_AUTO_DISPOSE;
3128
3228
  recompute(n, true);
3129
3229
  return n;
3130
3230
  }
3131
3231
  function createBoundChildren(e, t, n, i) {
3132
- const r = e.F;
3133
- r.addChild((e.F = n));
3134
- cleanup(() => r.removeChild(e.F));
3232
+ const r = e.$;
3233
+ r.addChild((e.$ = n));
3234
+ cleanup(() => r.removeChild(e.$));
3135
3235
  return runWithOwner(e, () => {
3136
3236
  const e = computed(t);
3137
3237
  return boundaryComputed(() => staleValues(() => flatten(read(e))), i);
@@ -3141,168 +3241,215 @@ const ON_INIT = Symbol();
3141
3241
  const RevealControllerContext = createContext(null);
3142
3242
  let _revealUsed = false;
3143
3243
  const FALSE_ACCESSOR = () => false;
3244
+ const SEQUENTIAL_ACCESSOR = () => "sequential";
3144
3245
  function isRevealController(e) {
3145
3246
  return e instanceof RevealController;
3146
3247
  }
3147
3248
  function isSlotReady(e) {
3148
- return isRevealController(e) ? e.isReady() : e.ct.size === 0 && !e.lt;
3249
+ return isRevealController(e) ? e.isReady() : e.st.size === 0 && !e.ot;
3250
+ }
3251
+ function isSlotMinimallyReady(e) {
3252
+ return isRevealController(e) ? e.isMinimallyReady() : isSlotReady(e);
3149
3253
  }
3150
3254
  function setSlotState(e, t, n, i) {
3151
- setSignal(e.ft, n);
3152
- setSignal(e.Et, i);
3255
+ setSignal(e.ut, n);
3256
+ setSignal(e.ct, i);
3153
3257
  if (isRevealController(e)) {
3154
- if (!n && e.dt === t) e.dt = undefined;
3258
+ if (!n && e.lt === t) e.lt = undefined;
3155
3259
  return e.evaluate(n, i);
3156
3260
  }
3157
- if (!n && e.Tt === t && e.St) e.Tt = undefined;
3261
+ if (!n && e.ft === t && e.Et) e.ft = undefined;
3158
3262
  }
3159
3263
  class RevealController {
3160
- Rt;
3161
- Ot;
3162
- _t = [];
3163
- dt;
3164
- ft = signal(false, { ownedWrite: true, He: true });
3165
- Et = signal(false, { ownedWrite: true, He: true });
3166
- It = true;
3167
- ht = false;
3264
+ Tt;
3265
+ St;
3266
+ dt = [];
3267
+ lt;
3268
+ ut = signal(false, { ownedWrite: true, Fe: true });
3269
+ ct = signal(false, { ownedWrite: true, Fe: true });
3270
+ Ot = true;
3271
+ Rt = true;
3272
+ _t = false;
3168
3273
  constructor(e, t) {
3169
- this.Rt = e;
3170
- this.Ot = t;
3274
+ this.Tt = e;
3275
+ this.St = t;
3171
3276
  }
3172
- At(e) {
3173
- for (let t = 0; t < this._t.length; t++) {
3174
- const n = this._t[t];
3175
- if ((isRevealController(n) ? n.dt : n.Tt) !== this) continue;
3277
+ It(e) {
3278
+ for (let t = 0; t < this.dt.length; t++) {
3279
+ const n = this.dt[t];
3280
+ if ((isRevealController(n) ? n.lt : n.ft) !== this) continue;
3176
3281
  if (e(n) === false) return false;
3177
3282
  }
3178
3283
  return true;
3179
3284
  }
3180
3285
  isReady() {
3181
- return this.At(isSlotReady);
3286
+ return this.It(isSlotReady);
3287
+ }
3288
+ isMinimallyReady() {
3289
+ const e = untrack(this.Tt);
3290
+ if (e === "together") return this.isReady();
3291
+ if (e === "natural") {
3292
+ let e = false;
3293
+ let t = false;
3294
+ this.It(n => {
3295
+ e = true;
3296
+ if (isSlotMinimallyReady(n)) {
3297
+ t = true;
3298
+ return false;
3299
+ }
3300
+ });
3301
+ return !e || t;
3302
+ }
3303
+ let t = true;
3304
+ this.It(e => {
3305
+ t = isSlotMinimallyReady(e);
3306
+ return false;
3307
+ });
3308
+ return t;
3182
3309
  }
3183
3310
  register(e) {
3184
- if (this._t.includes(e)) return;
3185
- this._t.push(e);
3186
- const t = !!untrack(this.Rt);
3187
- (setSignal(e.ft, true), setSignal(e.Et, t ? false : !!untrack(this.Ot)));
3311
+ if (this.dt.includes(e)) return;
3312
+ this.dt.push(e);
3313
+ const t = untrack(this.Tt);
3314
+ (setSignal(e.ut, true), setSignal(e.ct, t === "sequential" ? !!untrack(this.St) : false));
3188
3315
  untrack(() => this.evaluate());
3189
3316
  }
3190
3317
  unregister(e) {
3191
- const t = this._t.indexOf(e);
3192
- if (t >= 0) this._t.splice(t, 1);
3318
+ const t = this.dt.indexOf(e);
3319
+ if (t >= 0) this.dt.splice(t, 1);
3193
3320
  untrack(() => this.evaluate());
3194
3321
  }
3195
3322
  evaluate(e, t) {
3196
- if (this.ht) return;
3197
- this.ht = true;
3198
- const n = this.It;
3323
+ if (this._t) return;
3324
+ this._t = true;
3325
+ const n = this.Ot;
3326
+ const i = this.Rt;
3199
3327
  try {
3200
- 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));
3328
+ const n = e ?? read(this.ut),
3329
+ i = untrack(this.Tt),
3330
+ r = i === "sequential" && !!untrack(this.St),
3331
+ s = t ?? r;
3332
+ if (n) {
3333
+ this.It(e => setSlotState(e, this, true, s));
3334
+ } else if (i === "natural") {
3335
+ this.It(e => {
3336
+ if (isRevealController(e)) {
3337
+ setSignal(e.ct, false);
3338
+ setSignal(e.ut, false);
3339
+ e.evaluate(false, false);
3340
+ } else {
3341
+ setSlotState(e, this, !isSlotReady(e), false);
3342
+ }
3343
+ });
3344
+ } else if (i === "together") {
3345
+ const e = this.It(isSlotMinimallyReady);
3346
+ this.It(t => setSlotState(t, this, !e, false));
3207
3347
  } else {
3208
3348
  let e = false;
3209
- this.At(t => {
3210
- if (e) return setSlotState(t, this, true, i);
3349
+ this.It(t => {
3350
+ if (e) return setSlotState(t, this, true, r);
3211
3351
  if (isSlotReady(t)) return setSlotState(t, this, false, false);
3212
3352
  e = true;
3213
- setSlotState(t, this, true, false);
3353
+ if (isRevealController(t)) {
3354
+ setSignal(t.ct, false);
3355
+ setSignal(t.ut, false);
3356
+ t.evaluate(false, false);
3357
+ } else {
3358
+ setSlotState(t, this, true, false);
3359
+ }
3214
3360
  });
3215
3361
  }
3216
3362
  } finally {
3217
- this.It = this.isReady();
3218
- this.ht = false;
3363
+ this.Ot = this.isReady();
3364
+ this.Rt = this.isMinimallyReady();
3365
+ this._t = false;
3219
3366
  }
3220
- if (this.dt && n !== this.It) this.dt.evaluate();
3367
+ if (this.lt && (n !== this.Ot || i !== this.Rt)) this.lt.evaluate();
3221
3368
  }
3222
3369
  }
3223
3370
  class CollectionQueue extends Queue {
3371
+ ht;
3372
+ st = new Set();
3224
3373
  Nt;
3225
- ct = new Set();
3226
- Pt;
3227
- lt = true;
3228
- ft = signal(false, { ownedWrite: true, He: true });
3229
- Et = signal(false, { ownedWrite: true, He: true });
3230
- Tt;
3231
- St = false;
3232
- gt;
3233
- Ct = ON_INIT;
3374
+ ot = true;
3375
+ ut = signal(false, { ownedWrite: true, Fe: true });
3376
+ ct = signal(false, { ownedWrite: true, Fe: true });
3377
+ ft;
3378
+ Et = false;
3379
+ At;
3380
+ Pt = ON_INIT;
3234
3381
  constructor(e) {
3235
3382
  super();
3236
- this.Nt = e;
3383
+ this.ht = e;
3237
3384
  }
3238
3385
  run(e) {
3239
- if (!e || (read(this.ft) && (!_revealUsed || read(this.Et)))) return;
3386
+ if (!e || (read(this.ut) && (!_revealUsed || read(this.ct)))) return;
3240
3387
  return super.run(e);
3241
3388
  }
3242
3389
  notify(e, t, n, i) {
3243
- if (!(t & this.Nt)) return super.notify(e, t, n, i);
3244
- if (this.St && this.gt) {
3390
+ if (!(t & this.ht)) return super.notify(e, t, n, i);
3391
+ if (this.Et && this.At) {
3245
3392
  const e = untrack(() => {
3246
3393
  try {
3247
- return this.gt();
3394
+ return this.At();
3248
3395
  } catch {
3249
3396
  return ON_INIT;
3250
3397
  }
3251
3398
  });
3252
- if (e !== this.Ct) {
3253
- this.Ct = e;
3254
- this.St = false;
3255
- this.ct.clear();
3399
+ if (e !== this.Pt) {
3400
+ this.Pt = e;
3401
+ this.Et = false;
3402
+ this.st.clear();
3256
3403
  }
3257
3404
  }
3258
- if (this.Nt & STATUS_PENDING && this.St) return super.notify(e, t, n, i);
3259
- if (this.Nt & STATUS_PENDING && n & STATUS_ERROR) {
3405
+ if (this.ht & STATUS_PENDING && this.Et) return super.notify(e, t, n, i);
3406
+ if (this.ht & STATUS_PENDING && n & STATUS_ERROR) {
3260
3407
  return super.notify(e, STATUS_ERROR, n, i);
3261
3408
  }
3262
- if (n & this.Nt) {
3263
- this.lt = true;
3264
- const t = i?.source || e.fe?.source;
3409
+ if (n & this.ht) {
3410
+ this.ot = true;
3411
+ const t = i?.source || e.Te?.source;
3265
3412
  if (t) {
3266
- const e = this.ct.size === 0;
3267
- this.ct.add(t);
3268
- if (e) setSignal(this.ft, true);
3413
+ const e = this.st.size === 0;
3414
+ this.st.add(t);
3415
+ if (e) setSignal(this.ut, true);
3269
3416
  }
3270
3417
  }
3271
- t &= ~this.Nt;
3418
+ t &= ~this.ht;
3272
3419
  return t ? super.notify(e, t, n, i) : true;
3273
3420
  }
3274
3421
  checkSources() {
3275
- for (const e of this.ct) {
3422
+ for (const e of this.st) {
3276
3423
  if (
3277
- e.O & REACTIVE_DISPOSED ||
3278
- (!(e.Se & this.Nt) && !(this.Nt & STATUS_ERROR && e.Se & STATUS_PENDING))
3424
+ e.R & REACTIVE_DISPOSED ||
3425
+ (!(e.Oe & this.ht) && !(this.ht & STATUS_ERROR && e.Oe & STATUS_PENDING))
3279
3426
  )
3280
- this.ct.delete(e);
3427
+ this.st.delete(e);
3281
3428
  }
3282
- if (!this.ct.size) {
3283
- if (this.Nt & STATUS_PENDING && this.lt && !this.St && this.Pt) {
3284
- this.lt = !!(this.Pt.Se & this.Nt);
3429
+ if (!this.st.size) {
3430
+ if (this.ht & STATUS_PENDING && this.ot && !this.Et && this.Nt) {
3431
+ this.ot = !!(this.Nt.Oe & this.ht);
3285
3432
  } else {
3286
- this.lt = false;
3433
+ this.ot = false;
3287
3434
  }
3288
- if (!this.lt) {
3289
- setSignal(this.ft, false);
3290
- if (this.gt) {
3435
+ if (!this.ot) {
3436
+ setSignal(this.ut, false);
3437
+ if (this.At) {
3291
3438
  try {
3292
- this.Ct = untrack(() => this.gt());
3439
+ this.Pt = untrack(() => this.At());
3293
3440
  } catch {}
3294
3441
  }
3295
3442
  }
3296
3443
  }
3297
- if (_revealUsed) this.Tt?.evaluate();
3444
+ if (_revealUsed) this.ft?.evaluate();
3298
3445
  }
3299
3446
  }
3300
3447
  function createCollectionBoundary(e, t, n, i) {
3301
3448
  const r = createOwner();
3302
3449
  if (_revealUsed) setContext(RevealControllerContext, null, r);
3303
3450
  const s = new CollectionQueue(e);
3304
- if (i) s.gt = i;
3305
- const o = (s.Pt = createBoundChildren(r, t, s, e));
3451
+ if (i) s.At = i;
3452
+ const o = (s.Nt = createBoundChildren(r, t, s, e));
3306
3453
  untrack(() => {
3307
3454
  let t = false;
3308
3455
  try {
@@ -3311,33 +3458,34 @@ function createCollectionBoundary(e, t, n, i) {
3311
3458
  if (e instanceof NotReadyError) t = true;
3312
3459
  else throw e;
3313
3460
  }
3314
- s.lt = t || !!(o.Se & e) || o.fe instanceof NotReadyError;
3461
+ s.ot = t || !!(o.Oe & e) || o.Te instanceof NotReadyError;
3315
3462
  });
3316
3463
  const u = _revealUsed && e === STATUS_PENDING ? getContext(RevealControllerContext) : null;
3317
3464
  if (u) {
3318
- s.Tt = u;
3465
+ s.ft = u;
3319
3466
  u.register(s);
3320
3467
  cleanup(() => u.unregister(s));
3321
3468
  }
3322
- const c = computed(() => {
3323
- if (!read(s.ft)) {
3324
- const e = read(o);
3325
- if (!untrack(() => read(s.ft))) return ((s.St = true), e);
3326
- }
3327
- if (_revealUsed && read(s.Et)) return undefined;
3328
- return n(s);
3329
- });
3330
- return accessor(c);
3469
+ return accessor(
3470
+ computed(() => {
3471
+ if (!read(s.ut)) {
3472
+ const e = read(o);
3473
+ if (!untrack(() => read(s.ut))) return ((s.Et = true), e);
3474
+ }
3475
+ if (_revealUsed && read(s.ct)) return undefined;
3476
+ return n(s);
3477
+ })
3478
+ );
3331
3479
  }
3332
3480
  function createLoadingBoundary(e, t, n) {
3333
3481
  return createCollectionBoundary(STATUS_PENDING, e, () => t(), n?.on);
3334
3482
  }
3335
3483
  function createErrorBoundary(e, t) {
3336
3484
  return createCollectionBoundary(STATUS_ERROR, e, e => {
3337
- let n = e.ct.values().next().value;
3338
- const i = n.fe?.cause ?? n.fe;
3485
+ let n = e.st.values().next().value;
3486
+ const i = n.Te?.cause ?? n.Te;
3339
3487
  return t(i, () => {
3340
- for (const t of e.ct) recompute(t);
3488
+ for (const t of e.st) recompute(t);
3341
3489
  schedule();
3342
3490
  });
3343
3491
  });
@@ -3346,7 +3494,7 @@ function createRevealOrder(e, t) {
3346
3494
  _revealUsed = true;
3347
3495
  const n = createOwner();
3348
3496
  const i = getContext(RevealControllerContext);
3349
- const r = t?.together || FALSE_ACCESSOR,
3497
+ const r = t?.order || SEQUENTIAL_ACCESSOR,
3350
3498
  s = t?.collapsed || FALSE_ACCESSOR;
3351
3499
  const o = new RevealController(r, s);
3352
3500
  setContext(RevealControllerContext, o, n);
@@ -3358,7 +3506,7 @@ function createRevealOrder(e, t) {
3358
3506
  o.evaluate();
3359
3507
  });
3360
3508
  if (i) {
3361
- o.dt = i;
3509
+ o.lt = i;
3362
3510
  i.register(o);
3363
3511
  cleanup(() => i.unregister(o));
3364
3512
  }