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