@solidjs/signals 0.13.9 → 0.13.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/node.cjs CHANGED
@@ -32,20 +32,20 @@ const s = 1 << 4;
32
32
  const o = 1 << 5;
33
33
  const u = 1 << 6;
34
34
  const f = 1 << 7;
35
- const c = 1 << 8;
36
- const l = 1 << 9;
35
+ const l = 1 << 8;
36
+ const c = 1 << 9;
37
37
  const a = 1 << 0;
38
38
  const d = 1 << 1;
39
- const p = 1 << 2;
40
- const h = 1;
39
+ const h = 1 << 2;
40
+ const p = 1;
41
41
  const g = 2;
42
42
  const y = 3;
43
43
  const S = {};
44
44
  const w = {};
45
45
  const m = "sp";
46
- const b = typeof Proxy === "function";
47
- const O = {};
48
- const _ = Symbol("refresh");
46
+ const _ = typeof Proxy === "function";
47
+ const b = {};
48
+ const O = Symbol("refresh");
49
49
  function actualInsertIntoHeap(e, t) {
50
50
  const n = (e.i?.t ? e.i.u?.o : e.i?.o) ?? -1;
51
51
  if (n >= e.o) e.o = n + 1;
@@ -53,10 +53,10 @@ function actualInsertIntoHeap(e, t) {
53
53
  const i = t.l[r];
54
54
  if (i === undefined) t.l[r] = e;
55
55
  else {
56
- const t = i.p;
57
- t.h = e;
58
- e.p = t;
59
- i.p = e;
56
+ const t = i.h;
57
+ t.p = e;
58
+ e.h = t;
59
+ i.h = e;
60
60
  }
61
61
  if (r > t.S) t.S = r;
62
62
  }
@@ -79,23 +79,23 @@ function deleteFromHeap(e, t) {
79
79
  if (!(n & (i | s))) return;
80
80
  e.m = n & -25;
81
81
  const r = e.o;
82
- if (e.p === e) t.l[r] = undefined;
82
+ if (e.h === e) t.l[r] = undefined;
83
83
  else {
84
- const n = e.h;
84
+ const n = e.p;
85
85
  const i = t.l[r];
86
86
  const s = n ?? i;
87
87
  if (e === i) t.l[r] = n;
88
- else e.p.h = n;
89
- s.p = e.p;
88
+ else e.h.p = n;
89
+ s.h = e.h;
90
90
  }
91
- e.p = e;
92
- e.h = undefined;
91
+ e.h = e;
92
+ e.p = undefined;
93
93
  }
94
94
  function markHeap(e) {
95
- if (e.O) return;
96
- e.O = true;
95
+ if (e._) return;
96
+ e._ = true;
97
97
  for (let t = 0; t <= e.S; t++) {
98
- for (let n = e.l[t]; n !== undefined; n = n.h) {
98
+ for (let n = e.l[t]; n !== undefined; n = n.p) {
99
99
  if (n.m & i) markNode(n);
100
100
  }
101
101
  }
@@ -104,25 +104,25 @@ function markNode(e, r = n) {
104
104
  const i = e.m;
105
105
  if ((i & (t | n)) >= r) return;
106
106
  e.m = (i & -4) | r;
107
- for (let n = e._; n !== null; n = n.P) {
107
+ for (let n = e.O; n !== null; n = n.P) {
108
108
  markNode(n.k, t);
109
109
  }
110
- if (e.W !== null) {
111
- for (let n = e.W; n !== null; n = n.C) {
112
- for (let e = n._; e !== null; e = e.P) {
110
+ if (e.C !== null) {
111
+ for (let n = e.C; n !== null; n = n.W) {
112
+ for (let e = n.O; e !== null; e = e.P) {
113
113
  markNode(e.k, t);
114
114
  }
115
115
  }
116
116
  }
117
117
  }
118
118
  function runHeap(e, t) {
119
- e.O = false;
120
- for (e.j = 0; e.j <= e.S; e.j++) {
121
- let n = e.l[e.j];
119
+ e._ = false;
120
+ for (e.A = 0; e.A <= e.S; e.A++) {
121
+ let n = e.l[e.A];
122
122
  while (n !== undefined) {
123
123
  if (n.m & i) t(n);
124
124
  else adjustHeight(n, e);
125
- n = e.l[e.j];
125
+ n = e.l[e.A];
126
126
  }
127
127
  }
128
128
  e.S = 0;
@@ -130,120 +130,162 @@ function runHeap(e, t) {
130
130
  function adjustHeight(e, t) {
131
131
  deleteFromHeap(e, t);
132
132
  let n = e.o;
133
- for (let t = e.A; t; t = t.N) {
134
- const e = t.L;
135
- const r = e.I || e;
136
- if (r.R && r.o >= n) n = r.o + 1;
133
+ for (let t = e.N; t; t = t.j) {
134
+ const e = t.R;
135
+ const r = e.L || e;
136
+ if (r.I && r.o >= n) n = r.o + 1;
137
137
  }
138
138
  if (e.o !== n) {
139
139
  e.o = n;
140
- for (let n = e._; n !== null; n = n.P) {
140
+ for (let n = e.O; n !== null; n = n.P) {
141
141
  insertIntoHeapHeight(n.k, t);
142
142
  }
143
143
  }
144
144
  }
145
- const x = new Set();
146
- const P = { l: new Array(2e3).fill(undefined), O: false, j: 0, S: 0 };
147
- const v = { l: new Array(2e3).fill(undefined), O: false, j: 0, S: 0 };
148
- let E = 0;
149
- let k = null;
150
- let W = false;
151
- let C = false;
145
+ const x = {};
146
+ const v = {
147
+ hooks: x,
148
+ getChildren: getChildren,
149
+ getSignals: getSignals,
150
+ getParent: getParent,
151
+ getSources: getSources,
152
+ getObservers: getObservers
153
+ };
154
+ function getChildren(e) {
155
+ const t = [];
156
+ let n = e.T;
157
+ while (n) {
158
+ t.push(n);
159
+ n = n.H;
160
+ }
161
+ return t;
162
+ }
163
+ function getSignals(e) {
164
+ return e.q ? [...e.q] : [];
165
+ }
166
+ function getParent(e) {
167
+ return e.i;
168
+ }
169
+ function getSources(e) {
170
+ const t = [];
171
+ let n = e.N;
172
+ while (n) {
173
+ t.push(n.R);
174
+ n = n.j;
175
+ }
176
+ return t;
177
+ }
178
+ function getObservers(e) {
179
+ const t = [];
180
+ let n = e.O;
181
+ while (n) {
182
+ t.push(n.k);
183
+ n = n.P;
184
+ }
185
+ return t;
186
+ }
187
+ const P = new Set();
188
+ const k = { l: new Array(2e3).fill(undefined), _: false, A: 0, S: 0 };
189
+ const E = { l: new Array(2e3).fill(undefined), _: false, A: 0, S: 0 };
190
+ let C = 0;
191
+ let W = null;
192
+ let A = false;
193
+ let N = false;
152
194
  let j = null;
153
195
  function enforceLoadingBoundary(e) {}
154
196
  function shouldReadStashedOptimisticValue(e) {
155
197
  return !!j?.has(e);
156
198
  }
157
199
  function runLaneEffects(e) {
158
- for (const t of L) {
159
- if (t.T || t.H.size > 0) continue;
160
- const n = t.q[e - 1];
200
+ for (const t of I) {
201
+ if (t.D || t.F.size > 0) continue;
202
+ const n = t.V[e - 1];
161
203
  if (n.length) {
162
- t.q[e - 1] = [];
204
+ t.V[e - 1] = [];
163
205
  runQueue(n, e);
164
206
  }
165
207
  }
166
208
  }
167
209
  function queueStashedOptimisticEffects(e) {
168
- for (let t = e._; t !== null; t = t.P) {
210
+ for (let t = e.O; t !== null; t = t.P) {
169
211
  const e = t.k;
170
- if (!e.D) continue;
171
- if (e.D === y) {
172
- if (!e.F) {
173
- e.F = true;
174
- e.V.enqueue(g, e.M);
212
+ if (!e.M) continue;
213
+ if (e.M === y) {
214
+ if (!e.B) {
215
+ e.B = true;
216
+ e.G.enqueue(g, e.K);
175
217
  }
176
218
  continue;
177
219
  }
178
- const n = e.m & o ? v : P;
179
- if (n.j > e.o) n.j = e.o;
220
+ const n = e.m & o ? E : k;
221
+ if (n.A > e.o) n.A = e.o;
180
222
  insertIntoHeap(e, n);
181
223
  }
182
224
  }
183
225
  function setProjectionWriteActive(e) {
184
- C = e;
226
+ N = e;
185
227
  }
186
228
  function mergeTransitionState(e, t) {
187
- t.B = e;
188
- e.G.push(...t.G);
189
- for (const n of L) {
190
- if (n.K === t) n.K = e;
229
+ t.U = e;
230
+ e.J.push(...t.J);
231
+ for (const n of I) {
232
+ if (n.X === t) n.X = e;
191
233
  }
192
- e.U.push(...t.U);
193
- for (const n of t.J) e.J.add(n);
194
- for (const n of t.X) {
195
- if (!e.X.includes(n)) e.X.push(n);
234
+ e.Y.push(...t.Y);
235
+ for (const n of t.Z) e.Z.add(n);
236
+ for (const n of t.$) {
237
+ if (!e.$.includes(n)) e.$.push(n);
196
238
  }
197
239
  }
198
240
  function resolveOptimisticNodes(e) {
199
241
  for (let t = 0; t < e.length; t++) {
200
242
  const n = e[t];
201
- n.Y = undefined;
202
- if (n.Z !== S) {
203
- n.$ = n.Z;
204
- n.Z = S;
243
+ n.ee = undefined;
244
+ if (n.te !== S) {
245
+ n.ne = n.te;
246
+ n.te = S;
205
247
  }
206
- const r = n.ee;
207
- n.ee = S;
208
- if (r !== S && n.$ !== r) insertSubs(n, true);
209
- n.K = null;
248
+ const r = n.re;
249
+ n.re = S;
250
+ if (r !== S && n.ne !== r) insertSubs(n, true);
251
+ n.X = null;
210
252
  }
211
253
  e.length = 0;
212
254
  }
213
255
  function cleanupCompletedLanes(e) {
214
- for (const t of L) {
215
- const n = e ? t.K === e : !t.K;
256
+ for (const t of I) {
257
+ const n = e ? t.X === e : !t.X;
216
258
  if (!n) continue;
217
- if (!t.T) {
218
- if (t.q[0].length) runQueue(t.q[0], h);
219
- if (t.q[1].length) runQueue(t.q[1], g);
259
+ if (!t.D) {
260
+ if (t.V[0].length) runQueue(t.V[0], p);
261
+ if (t.V[1].length) runQueue(t.V[1], g);
220
262
  }
221
- if (t.te.Y === t) t.te.Y = undefined;
222
- t.H.clear();
223
- t.q[0].length = 0;
224
- t.q[1].length = 0;
225
- L.delete(t);
226
- N.delete(t.te);
263
+ if (t.ie.ee === t) t.ie.ee = undefined;
264
+ t.F.clear();
265
+ t.V[0].length = 0;
266
+ t.V[1].length = 0;
267
+ I.delete(t);
268
+ L.delete(t.ie);
227
269
  }
228
270
  }
229
271
  function schedule() {
230
- if (W) return;
231
- W = true;
232
- if (!A.ne && !C) queueMicrotask(flush);
272
+ if (A) return;
273
+ A = true;
274
+ if (!R.se && !N) queueMicrotask(flush);
233
275
  }
234
276
  class Queue {
235
277
  i = null;
236
- re = [[], []];
237
- ie = [];
238
- created = E;
278
+ oe = [[], []];
279
+ ue = [];
280
+ created = C;
239
281
  addChild(e) {
240
- this.ie.push(e);
282
+ this.ue.push(e);
241
283
  e.i = this;
242
284
  }
243
285
  removeChild(e) {
244
- const t = this.ie.indexOf(e);
286
+ const t = this.ue.indexOf(e);
245
287
  if (t >= 0) {
246
- this.ie.splice(t, 1);
288
+ this.ue.splice(t, 1);
247
289
  e.i = null;
248
290
  }
249
291
  }
@@ -252,81 +294,81 @@ class Queue {
252
294
  return false;
253
295
  }
254
296
  run(e) {
255
- if (this.re[e - 1].length) {
256
- const t = this.re[e - 1];
257
- this.re[e - 1] = [];
297
+ if (this.oe[e - 1].length) {
298
+ const t = this.oe[e - 1];
299
+ this.oe[e - 1] = [];
258
300
  runQueue(t, e);
259
301
  }
260
- for (let t = 0; t < this.ie.length; t++) this.ie[t].run?.(e);
302
+ for (let t = 0; t < this.ue.length; t++) this.ue[t].run?.(e);
261
303
  }
262
304
  enqueue(e, t) {
263
305
  if (e) {
264
- if (M) {
265
- const n = findLane(M);
266
- n.q[e - 1].push(t);
306
+ if (G) {
307
+ const n = findLane(G);
308
+ n.V[e - 1].push(t);
267
309
  } else {
268
- this.re[e - 1].push(t);
310
+ this.oe[e - 1].push(t);
269
311
  }
270
312
  }
271
313
  schedule();
272
314
  }
273
315
  stashQueues(e) {
274
- e.re[0].push(...this.re[0]);
275
- e.re[1].push(...this.re[1]);
276
- this.re = [[], []];
277
- for (let t = 0; t < this.ie.length; t++) {
278
- let n = this.ie[t];
279
- let r = e.ie[t];
316
+ e.oe[0].push(...this.oe[0]);
317
+ e.oe[1].push(...this.oe[1]);
318
+ this.oe = [[], []];
319
+ for (let t = 0; t < this.ue.length; t++) {
320
+ let n = this.ue[t];
321
+ let r = e.ue[t];
280
322
  if (!r) {
281
- r = { re: [[], []], ie: [] };
282
- e.ie[t] = r;
323
+ r = { oe: [[], []], ue: [] };
324
+ e.ue[t] = r;
283
325
  }
284
326
  n.stashQueues(r);
285
327
  }
286
328
  }
287
329
  restoreQueues(e) {
288
- this.re[0].push(...e.re[0]);
289
- this.re[1].push(...e.re[1]);
290
- for (let t = 0; t < e.ie.length; t++) {
291
- const n = e.ie[t];
292
- let r = this.ie[t];
330
+ this.oe[0].push(...e.oe[0]);
331
+ this.oe[1].push(...e.oe[1]);
332
+ for (let t = 0; t < e.ue.length; t++) {
333
+ const n = e.ue[t];
334
+ let r = this.ue[t];
293
335
  if (r) r.restoreQueues(n);
294
336
  }
295
337
  }
296
338
  }
297
339
  class GlobalQueue extends Queue {
298
- ne = false;
299
- se = [];
300
- U = [];
301
- J = new Set();
302
- static oe;
303
- static ue;
304
- static fe = null;
340
+ se = false;
341
+ fe = [];
342
+ Y = [];
343
+ Z = new Set();
344
+ static le;
345
+ static ce;
346
+ static ae = null;
305
347
  flush() {
306
- if (this.ne) return;
307
- this.ne = true;
348
+ if (this.se) return;
349
+ this.se = true;
308
350
  try {
309
- runHeap(P, GlobalQueue.oe);
310
- if (k) {
311
- const e = transitionComplete(k);
351
+ runHeap(k, GlobalQueue.le);
352
+ if (W) {
353
+ const e = transitionComplete(W);
312
354
  if (!e) {
313
- const e = k;
314
- runHeap(v, GlobalQueue.oe);
315
- this.se = [];
316
- this.U = [];
317
- this.J = new Set();
318
- runLaneEffects(h);
355
+ const e = W;
356
+ runHeap(E, GlobalQueue.le);
357
+ this.fe = [];
358
+ this.Y = [];
359
+ this.Z = new Set();
360
+ runLaneEffects(p);
319
361
  runLaneEffects(g);
320
- this.stashQueues(e.ce);
321
- E++;
322
- W = P.S >= P.j;
323
- reassignPendingTransition(e.se);
324
- k = null;
325
- if (!e.G.length && e.U.length) {
362
+ this.stashQueues(e.de);
363
+ C++;
364
+ A = k.S >= k.A;
365
+ reassignPendingTransition(e.fe);
366
+ W = null;
367
+ if (!e.J.length && e.Y.length) {
326
368
  j = new Set();
327
- for (let t = 0; t < e.U.length; t++) {
328
- const n = e.U[t];
329
- if (n.R || n.le) continue;
369
+ for (let t = 0; t < e.Y.length; t++) {
370
+ const n = e.Y[t];
371
+ if (n.I || n.he) continue;
330
372
  j.add(n);
331
373
  queueStashedOptimisticEffects(n);
332
374
  }
@@ -338,35 +380,36 @@ class GlobalQueue extends Queue {
338
380
  }
339
381
  return;
340
382
  }
341
- this.se !== k.se && this.se.push(...k.se);
342
- this.restoreQueues(k.ce);
343
- x.delete(k);
344
- const t = k;
345
- k = null;
346
- reassignPendingTransition(this.se);
383
+ this.fe !== W.fe && this.fe.push(...W.fe);
384
+ this.restoreQueues(W.de);
385
+ P.delete(W);
386
+ const t = W;
387
+ W = null;
388
+ reassignPendingTransition(this.fe);
347
389
  finalizePureQueue(t);
348
390
  } else {
349
- if (x.size) runHeap(v, GlobalQueue.oe);
391
+ if (P.size) runHeap(E, GlobalQueue.le);
350
392
  finalizePureQueue();
351
393
  }
352
- E++;
353
- W = P.S >= P.j;
354
- runLaneEffects(h);
355
- this.run(h);
394
+ C++;
395
+ A = k.S >= k.A;
396
+ runLaneEffects(p);
397
+ this.run(p);
356
398
  runLaneEffects(g);
357
399
  this.run(g);
400
+ if (false);
358
401
  } finally {
359
- this.ne = false;
402
+ this.se = false;
360
403
  }
361
404
  }
362
405
  notify(e, t, n, r) {
363
406
  if (t & a) {
364
407
  if (n & a) {
365
- const t = r !== undefined ? r : e.ae;
366
- if (k && t) {
408
+ const t = r !== undefined ? r : e.pe;
409
+ if (W && t) {
367
410
  const e = t.source;
368
- if (!k.X.includes(e)) {
369
- k.X.push(e);
411
+ if (!W.$.includes(e)) {
412
+ W.$.push(e);
370
413
  schedule();
371
414
  }
372
415
  }
@@ -377,58 +420,58 @@ class GlobalQueue extends Queue {
377
420
  }
378
421
  initTransition(e) {
379
422
  if (e) e = currentTransition(e);
380
- if (e && e === k) return;
381
- if (!e && k && k.de === E) return;
382
- if (!k) {
383
- k = e ?? {
384
- de: E,
385
- se: [],
386
- X: [],
387
- U: [],
388
- J: new Set(),
389
- G: [],
390
- ce: { re: [[], []], ie: [] },
391
- B: false
423
+ if (e && e === W) return;
424
+ if (!e && W && W.ge === C) return;
425
+ if (!W) {
426
+ W = e ?? {
427
+ ge: C,
428
+ fe: [],
429
+ $: [],
430
+ Y: [],
431
+ Z: new Set(),
432
+ J: [],
433
+ de: { oe: [[], []], ue: [] },
434
+ U: false
392
435
  };
393
436
  } else if (e) {
394
- const t = k;
437
+ const t = W;
395
438
  mergeTransitionState(e, t);
396
- x.delete(t);
397
- k = e;
439
+ P.delete(t);
440
+ W = e;
398
441
  }
399
- x.add(k);
400
- k.de = E;
401
- if (this.se !== k.se) {
402
- for (let e = 0; e < this.se.length; e++) {
403
- const t = this.se[e];
404
- t.K = k;
405
- k.se.push(t);
442
+ P.add(W);
443
+ W.ge = C;
444
+ if (this.fe !== W.fe) {
445
+ for (let e = 0; e < this.fe.length; e++) {
446
+ const t = this.fe[e];
447
+ t.X = W;
448
+ W.fe.push(t);
406
449
  }
407
- this.se = k.se;
450
+ this.fe = W.fe;
408
451
  }
409
- if (this.U !== k.U) {
410
- for (let e = 0; e < this.U.length; e++) {
411
- const t = this.U[e];
412
- t.K = k;
413
- k.U.push(t);
452
+ if (this.Y !== W.Y) {
453
+ for (let e = 0; e < this.Y.length; e++) {
454
+ const t = this.Y[e];
455
+ t.X = W;
456
+ W.Y.push(t);
414
457
  }
415
- this.U = k.U;
458
+ this.Y = W.Y;
416
459
  }
417
- for (const e of L) {
418
- if (!e.K) e.K = k;
460
+ for (const e of I) {
461
+ if (!e.X) e.X = W;
419
462
  }
420
- if (this.J !== k.J) {
421
- for (const e of this.J) k.J.add(e);
422
- this.J = k.J;
463
+ if (this.Z !== W.Z) {
464
+ for (const e of this.Z) W.Z.add(e);
465
+ this.Z = W.Z;
423
466
  }
424
467
  }
425
468
  }
426
469
  function insertSubs(e, t = false) {
427
- const n = e.Y || M;
428
- const r = e.pe !== undefined;
429
- for (let i = e._; i !== null; i = i.P) {
430
- if (r && i.k.he) {
431
- i.k.m |= c;
470
+ const n = e.ee || G;
471
+ const r = e.ye !== undefined;
472
+ for (let i = e.O; i !== null; i = i.P) {
473
+ if (r && i.k.Se) {
474
+ i.k.m |= l;
432
475
  continue;
433
476
  }
434
477
  if (t && n) {
@@ -436,47 +479,47 @@ function insertSubs(e, t = false) {
436
479
  assignOrMergeLane(i.k, n);
437
480
  } else if (t) {
438
481
  i.k.m |= f;
439
- i.k.Y = undefined;
482
+ i.k.ee = undefined;
440
483
  }
441
484
  const e = i.k;
442
- if (e.D === y) {
443
- if (!e.F) {
444
- e.F = true;
445
- e.V.enqueue(g, e.M);
485
+ if (e.M === y) {
486
+ if (!e.B) {
487
+ e.B = true;
488
+ e.G.enqueue(g, e.K);
446
489
  }
447
490
  continue;
448
491
  }
449
- const s = i.k.m & o ? v : P;
450
- if (s.j > i.k.o) s.j = i.k.o;
492
+ const s = i.k.m & o ? E : k;
493
+ if (s.A > i.k.o) s.A = i.k.o;
451
494
  insertIntoHeap(i.k, s);
452
495
  }
453
496
  }
454
497
  function commitPendingNodes() {
455
- const e = A.se;
498
+ const e = R.fe;
456
499
  for (let t = 0; t < e.length; t++) {
457
500
  const n = e[t];
458
- if (n.Z !== S) {
459
- n.$ = n.Z;
460
- n.Z = S;
461
- if (n.D && n.D !== y) n.F = true;
501
+ if (n.te !== S) {
502
+ n.ne = n.te;
503
+ n.te = S;
504
+ if (n.M && n.M !== y) n.B = true;
462
505
  }
463
- if (!(n.ge & a)) n.ge &= ~p;
464
- if (n.R) GlobalQueue.ue(n, false, true);
506
+ if (!(n.we & a)) n.we &= ~h;
507
+ if (n.I) GlobalQueue.ce(n, false, true);
465
508
  }
466
509
  e.length = 0;
467
510
  }
468
511
  function finalizePureQueue(e = null, t = false) {
469
512
  const n = !t;
470
513
  if (n) commitPendingNodes();
471
- if (!t) checkBoundaryChildren(A);
472
- if (P.S >= P.j) runHeap(P, GlobalQueue.oe);
514
+ if (!t) checkBoundaryChildren(R);
515
+ if (k.S >= k.A) runHeap(k, GlobalQueue.le);
473
516
  if (n) {
474
517
  commitPendingNodes();
475
- resolveOptimisticNodes(e ? e.U : A.U);
476
- const t = e ? e.J : A.J;
477
- if (GlobalQueue.fe && t.size) {
518
+ resolveOptimisticNodes(e ? e.Y : R.Y);
519
+ const t = e ? e.Z : R.Z;
520
+ if (GlobalQueue.ae && t.size) {
478
521
  for (const e of t) {
479
- GlobalQueue.fe(e);
522
+ GlobalQueue.ae(e);
480
523
  }
481
524
  t.clear();
482
525
  schedule();
@@ -485,251 +528,251 @@ function finalizePureQueue(e = null, t = false) {
485
528
  }
486
529
  }
487
530
  function checkBoundaryChildren(e) {
488
- for (const t of e.ie) {
531
+ for (const t of e.ue) {
489
532
  t.checkSources?.();
490
533
  checkBoundaryChildren(t);
491
534
  }
492
535
  }
493
536
  function trackOptimisticStore(e) {
494
- A.J.add(e);
537
+ R.Z.add(e);
495
538
  schedule();
496
539
  }
497
540
  function reassignPendingTransition(e) {
498
541
  for (let t = 0; t < e.length; t++) {
499
- e[t].K = k;
542
+ e[t].X = W;
500
543
  }
501
544
  }
502
- const A = new GlobalQueue();
545
+ const R = new GlobalQueue();
503
546
  function flush() {
504
- if (A.ne) {
547
+ if (R.se) {
505
548
  return;
506
549
  }
507
- while (W || k) {
508
- A.flush();
550
+ while (A || W) {
551
+ R.flush();
509
552
  }
510
553
  }
511
554
  function runQueue(e, t) {
512
555
  for (let n = 0; n < e.length; n++) e[n](t);
513
556
  }
514
557
  function transitionComplete(e) {
515
- if (e.B) return true;
516
- if (e.G.length) return false;
558
+ if (e.U) return true;
559
+ if (e.J.length) return false;
517
560
  let t = true;
518
- for (let n = 0; n < e.X.length; n++) {
519
- const r = e.X[n];
520
- if (r.ge & a && r.ae?.source === r) {
561
+ for (let n = 0; n < e.$.length; n++) {
562
+ const r = e.$[n];
563
+ if (r.we & a && r.pe?.source === r) {
521
564
  t = false;
522
565
  break;
523
566
  }
524
567
  }
525
568
  if (t) {
526
- for (let n = 0; n < e.U.length; n++) {
527
- const r = e.U[n];
569
+ for (let n = 0; n < e.Y.length; n++) {
570
+ const r = e.Y[n];
528
571
  if (
529
572
  hasActiveOverride(r) &&
530
- "ge" in r &&
531
- r.ge & a &&
532
- r.ae instanceof NotReadyError &&
533
- r.ae.source !== r
573
+ "we" in r &&
574
+ r.we & a &&
575
+ r.pe instanceof NotReadyError &&
576
+ r.pe.source !== r
534
577
  ) {
535
578
  t = false;
536
579
  break;
537
580
  }
538
581
  }
539
582
  }
540
- t && (e.B = true);
583
+ t && (e.U = true);
541
584
  return t;
542
585
  }
543
586
  function currentTransition(e) {
544
- while (e.B && typeof e.B === "object") e = e.B;
587
+ while (e.U && typeof e.U === "object") e = e.U;
545
588
  return e;
546
589
  }
547
590
  function setActiveTransition(e) {
548
- k = e;
591
+ W = e;
549
592
  }
550
593
  function runInTransition(e, t) {
551
- const n = k;
594
+ const n = W;
552
595
  try {
553
- k = currentTransition(e);
596
+ W = currentTransition(e);
554
597
  return t();
555
598
  } finally {
556
- k = n;
599
+ W = n;
557
600
  }
558
601
  }
559
- const N = new WeakMap();
560
- const L = new Set();
602
+ const L = new WeakMap();
603
+ const I = new Set();
561
604
  function getOrCreateLane(e) {
562
- let t = N.get(e);
605
+ let t = L.get(e);
563
606
  if (t) {
564
607
  return findLane(t);
565
608
  }
566
- const n = e.ye;
567
- const r = n?.Y ? findLane(n.Y) : null;
568
- t = { te: e, H: new Set(), q: [[], []], T: null, K: k, Se: r };
569
- N.set(e, t);
570
- L.add(t);
571
- e.we = false;
609
+ const n = e.me;
610
+ const r = n?.ee ? findLane(n.ee) : null;
611
+ t = { ie: e, F: new Set(), V: [[], []], D: null, X: W, _e: r };
612
+ L.set(e, t);
613
+ I.add(t);
614
+ e.be = false;
572
615
  return t;
573
616
  }
574
617
  function findLane(e) {
575
- while (e.T) e = e.T;
618
+ while (e.D) e = e.D;
576
619
  return e;
577
620
  }
578
621
  function mergeLanes(e, t) {
579
622
  e = findLane(e);
580
623
  t = findLane(t);
581
624
  if (e === t) return e;
582
- t.T = e;
583
- for (const n of t.H) e.H.add(n);
584
- e.q[0].push(...t.q[0]);
585
- e.q[1].push(...t.q[1]);
625
+ t.D = e;
626
+ for (const n of t.F) e.F.add(n);
627
+ e.V[0].push(...t.V[0]);
628
+ e.V[1].push(...t.V[1]);
586
629
  return e;
587
630
  }
588
631
  function resolveLane(e) {
589
- const t = e.Y;
632
+ const t = e.ee;
590
633
  if (!t) return undefined;
591
634
  const n = findLane(t);
592
- if (L.has(n)) return n;
593
- e.Y = undefined;
635
+ if (I.has(n)) return n;
636
+ e.ee = undefined;
594
637
  return undefined;
595
638
  }
596
639
  function resolveTransition(e) {
597
- return resolveLane(e)?.K ?? e.K;
640
+ return resolveLane(e)?.X ?? e.X;
598
641
  }
599
642
  function hasActiveOverride(e) {
600
- return !!(e.ee !== undefined && e.ee !== S);
643
+ return !!(e.re !== undefined && e.re !== S);
601
644
  }
602
645
  function assignOrMergeLane(e, t) {
603
646
  const n = findLane(t);
604
- const r = e.Y;
647
+ const r = e.ee;
605
648
  if (r) {
606
- if (r.T) {
607
- e.Y = t;
649
+ if (r.D) {
650
+ e.ee = t;
608
651
  return;
609
652
  }
610
653
  const i = findLane(r);
611
- if (L.has(i)) {
654
+ if (I.has(i)) {
612
655
  if (i !== n && !hasActiveOverride(e)) {
613
- if (n.Se && findLane(n.Se) === i) {
614
- e.Y = t;
615
- } else if (i.Se && findLane(i.Se) === n);
656
+ if (n._e && findLane(n._e) === i) {
657
+ e.ee = t;
658
+ } else if (i._e && findLane(i._e) === n);
616
659
  else mergeLanes(n, i);
617
660
  }
618
661
  return;
619
662
  }
620
663
  }
621
- e.Y = t;
664
+ e.ee = t;
622
665
  }
623
666
  function unlinkSubs(e) {
624
- const t = e.L;
625
- const n = e.N;
667
+ const t = e.R;
668
+ const n = e.j;
626
669
  const r = e.P;
627
- const i = e.me;
628
- if (r !== null) r.me = i;
629
- else t.be = i;
670
+ const i = e.Oe;
671
+ if (r !== null) r.Oe = i;
672
+ else t.xe = i;
630
673
  if (i !== null) i.P = r;
631
674
  else {
632
- t._ = r;
675
+ t.O = r;
633
676
  if (r === null) {
634
- t.Oe?.();
635
- t.R && !t._e && !(t.m & o) && unobserved(t);
677
+ t.ve?.();
678
+ t.I && !t.Pe && !(t.m & o) && unobserved(t);
636
679
  }
637
680
  }
638
681
  return n;
639
682
  }
640
683
  function unobserved(e) {
641
- deleteFromHeap(e, e.m & o ? v : P);
642
- let t = e.A;
684
+ deleteFromHeap(e, e.m & o ? E : k);
685
+ let t = e.N;
643
686
  while (t !== null) {
644
687
  t = unlinkSubs(t);
645
688
  }
646
- e.A = null;
689
+ e.N = null;
647
690
  disposeChildren(e, true);
648
691
  }
649
692
  function link(e, t) {
650
- const n = t.xe;
651
- if (n !== null && n.L === e) return;
693
+ const n = t.ke;
694
+ if (n !== null && n.R === e) return;
652
695
  let i = null;
653
696
  const s = t.m & r;
654
697
  if (s) {
655
- i = n !== null ? n.N : t.A;
656
- if (i !== null && i.L === e) {
657
- t.xe = i;
698
+ i = n !== null ? n.j : t.N;
699
+ if (i !== null && i.R === e) {
700
+ t.ke = i;
658
701
  return;
659
702
  }
660
703
  }
661
- const o = e.be;
704
+ const o = e.xe;
662
705
  if (o !== null && o.k === t && (!s || isValidLink(o, t))) return;
663
- const u = (t.xe = e.be = { L: e, k: t, N: i, me: o, P: null });
664
- if (n !== null) n.N = u;
665
- else t.A = u;
706
+ const u = (t.ke = e.xe = { R: e, k: t, j: i, Oe: o, P: null });
707
+ if (n !== null) n.j = u;
708
+ else t.N = u;
666
709
  if (o !== null) o.P = u;
667
- else e._ = u;
710
+ else e.O = u;
668
711
  }
669
712
  function isValidLink(e, t) {
670
- const n = t.xe;
713
+ const n = t.ke;
671
714
  if (n !== null) {
672
- let r = t.A;
715
+ let r = t.N;
673
716
  do {
674
717
  if (r === e) return true;
675
718
  if (r === n) break;
676
- r = r.N;
719
+ r = r.j;
677
720
  } while (r !== null);
678
721
  }
679
722
  return false;
680
723
  }
681
- const I = {};
724
+ const T = {};
682
725
  function markDisposal(e) {
683
- let t = e.Pe;
726
+ let t = e.T;
684
727
  while (t) {
685
728
  t.m |= o;
686
729
  if (t.m & i) {
687
- deleteFromHeap(t, P);
688
- insertIntoHeap(t, v);
730
+ deleteFromHeap(t, k);
731
+ insertIntoHeap(t, E);
689
732
  }
690
733
  markDisposal(t);
691
- t = t.ve;
734
+ t = t.H;
692
735
  }
693
736
  }
694
737
  function dispose(e) {
695
- let t = e.A || null;
738
+ let t = e.N || null;
696
739
  do {
697
740
  t = unlinkSubs(t);
698
741
  } while (t !== null);
699
- e.A = null;
700
- e.xe = null;
742
+ e.N = null;
743
+ e.ke = null;
701
744
  disposeChildren(e, true);
702
745
  }
703
746
  function disposeChildren(e, t = false, n) {
704
747
  if (e.m & u) return;
705
748
  if (t) e.m = u;
706
- if (t && e.R) e.Ee = null;
707
- let r = n ? e.ke : e.Pe;
749
+ if (t && e.I) e.Ee = null;
750
+ let r = n ? e.Ce : e.T;
708
751
  while (r) {
709
- const e = r.ve;
710
- if (r.A) {
752
+ const e = r.H;
753
+ if (r.N) {
711
754
  const e = r;
712
- deleteFromHeap(e, e.m & o ? v : P);
713
- let t = e.A;
755
+ deleteFromHeap(e, e.m & o ? E : k);
756
+ let t = e.N;
714
757
  do {
715
758
  t = unlinkSubs(t);
716
759
  } while (t !== null);
717
- e.A = null;
718
- e.xe = null;
760
+ e.N = null;
761
+ e.ke = null;
719
762
  }
720
763
  disposeChildren(r, true);
721
764
  r = e;
722
765
  }
723
766
  if (n) {
724
- e.ke = null;
767
+ e.Ce = null;
725
768
  } else {
726
- e.Pe = null;
769
+ e.T = null;
727
770
  e.We = 0;
728
771
  }
729
772
  runDisposal(e, n);
730
773
  }
731
774
  function runDisposal(e, t) {
732
- let n = t ? e.Ce : e.je;
775
+ let n = t ? e.Ae : e.Ne;
733
776
  if (!n) return;
734
777
  if (Array.isArray(n)) {
735
778
  for (let e = 0; e < n.length; e++) {
@@ -739,11 +782,11 @@ function runDisposal(e, t) {
739
782
  } else {
740
783
  n.call(n);
741
784
  }
742
- t ? (e.Ce = null) : (e.je = null);
785
+ t ? (e.Ae = null) : (e.Ne = null);
743
786
  }
744
787
  function childId(e, t) {
745
788
  let n = e;
746
- while (n.Ae && n.i) n = n.i;
789
+ while (n.je && n.i) n = n.i;
747
790
  if (n.id != null) return formatId(n.id, t ? n.We++ : n.We);
748
791
  throw new Error("Cannot get child id from owner without an id");
749
792
  }
@@ -759,50 +802,50 @@ function formatId(e, t) {
759
802
  return e + (r ? String.fromCharCode(64 + r) : "") + n;
760
803
  }
761
804
  function getObserver() {
762
- if (q || F) return I;
763
- return T ? V : null;
805
+ if (F || M) return T;
806
+ return Q ? B : null;
764
807
  }
765
808
  function getOwner() {
766
- return V;
809
+ return B;
767
810
  }
768
811
  function cleanup(e) {
769
- if (!V) return e;
770
- if (!V.je) V.je = e;
771
- else if (Array.isArray(V.je)) V.je.push(e);
772
- else V.je = [V.je, e];
812
+ if (!B) return e;
813
+ if (!B.Ne) B.Ne = e;
814
+ else if (Array.isArray(B.Ne)) B.Ne.push(e);
815
+ else B.Ne = [B.Ne, e];
773
816
  return e;
774
817
  }
775
818
  function isDisposed(e) {
776
819
  return !!(e.m & (u | o));
777
820
  }
778
821
  function createOwner(e) {
779
- const t = V;
822
+ const t = B;
780
823
  const n = e?.transparent ?? false;
781
824
  const r = {
782
825
  id: e?.id ?? (n ? t?.id : t?.id != null ? getNextChildId(t) : undefined),
783
- Ae: n || undefined,
826
+ je: n || undefined,
784
827
  t: true,
785
828
  u: t?.t ? t.u : t,
786
- Pe: null,
787
- ve: null,
788
- je: null,
789
- V: t?.V ?? A,
790
- Ne: t?.Ne || O,
829
+ T: null,
830
+ H: null,
831
+ Ne: null,
832
+ G: t?.G ?? R,
833
+ Re: t?.Re || b,
791
834
  We: 0,
835
+ Ae: null,
792
836
  Ce: null,
793
- ke: null,
794
837
  i: t,
795
838
  dispose(e = true) {
796
839
  disposeChildren(r, e);
797
840
  }
798
841
  };
799
842
  if (t) {
800
- const e = t.Pe;
843
+ const e = t.T;
801
844
  if (e === null) {
802
- t.Pe = r;
845
+ t.T = r;
803
846
  } else {
804
- r.ve = e;
805
- t.Pe = r;
847
+ r.H = e;
848
+ t.T = r;
806
849
  }
807
850
  }
808
851
  return r;
@@ -847,22 +890,22 @@ function clearPendingSources(e) {
847
890
  }
848
891
  function setPendingError(e, t, n) {
849
892
  if (!t) {
850
- e.ae = null;
893
+ e.pe = null;
851
894
  return;
852
895
  }
853
896
  if (n instanceof NotReadyError && n.source === t) {
854
- e.ae = n;
897
+ e.pe = n;
855
898
  return;
856
899
  }
857
- const r = e.ae;
900
+ const r = e.pe;
858
901
  if (!(r instanceof NotReadyError) || r.source !== t) {
859
- e.ae = new NotReadyError(t);
902
+ e.pe = new NotReadyError(t);
860
903
  }
861
904
  }
862
905
  function forEachDependent(e, t) {
863
- for (let n = e._; n !== null; n = n.P) t(n.k);
864
- for (let n = e.W; n !== null; n = n.C) {
865
- for (let e = n._; e !== null; e = e.P) t(e.k);
906
+ for (let n = e.O; n !== null; n = n.P) t(n.k);
907
+ for (let n = e.C; n !== null; n = n.W) {
908
+ for (let e = n.O; e !== null; e = e.P) t(e.k);
866
909
  }
867
910
  }
868
911
  function settlePendingSource(e) {
@@ -871,30 +914,30 @@ function settlePendingSource(e) {
871
914
  const settle = r => {
872
915
  if (n.has(r) || !removePendingSource(r, e)) return;
873
916
  n.add(r);
874
- r.de = E;
917
+ r.ge = C;
875
918
  const i = r.Le ?? r.Ie?.values().next().value;
876
919
  if (i) {
877
920
  setPendingError(r, i);
878
921
  updatePendingSignal(r);
879
922
  } else {
880
- r.ge &= ~a;
923
+ r.we &= ~a;
881
924
  setPendingError(r);
882
925
  updatePendingSignal(r);
883
- if (r.Re) {
884
- if (r.D === y) {
926
+ if (r.Te) {
927
+ if (r.M === y) {
885
928
  const e = r;
886
- if (!e.F) {
887
- e.F = true;
888
- e.V.enqueue(g, e.M);
929
+ if (!e.B) {
930
+ e.B = true;
931
+ e.G.enqueue(g, e.K);
889
932
  }
890
933
  } else {
891
- const e = r.m & o ? v : P;
892
- if (e.j > r.o) e.j = r.o;
934
+ const e = r.m & o ? E : k;
935
+ if (e.A > r.o) e.A = r.o;
893
936
  insertIntoHeap(r, e);
894
937
  }
895
938
  t = true;
896
939
  }
897
- r.Re = false;
940
+ r.Te = false;
898
941
  }
899
942
  forEachDependent(r, settle);
900
943
  };
@@ -913,33 +956,33 @@ function handleAsync(e, t, r) {
913
956
  let u;
914
957
  const handleError = n => {
915
958
  if (e.Ee !== t) return;
916
- A.initTransition(resolveTransition(e));
959
+ R.initTransition(resolveTransition(e));
917
960
  notifyStatus(e, n instanceof NotReadyError ? a : d, n);
918
- e.de = E;
961
+ e.ge = C;
919
962
  };
920
963
  const asyncWrite = (i, s) => {
921
964
  if (e.Ee !== t) return;
922
965
  if (e.m & (n | f)) return;
923
- A.initTransition(resolveTransition(e));
966
+ R.initTransition(resolveTransition(e));
924
967
  clearStatus(e);
925
968
  const o = resolveLane(e);
926
- if (o) o.H.delete(e);
969
+ if (o) o.F.delete(e);
927
970
  if (r) r(i);
928
- else if (e.ee !== undefined) {
929
- if (e.ee !== undefined && e.ee !== S) e.Z = i;
971
+ else if (e.re !== undefined) {
972
+ if (e.re !== undefined && e.re !== S) e.te = i;
930
973
  else {
931
- e.$ = i;
974
+ e.ne = i;
932
975
  insertSubs(e);
933
976
  }
934
- e.de = E;
977
+ e.ge = C;
935
978
  } else if (o) {
936
- const t = e.$;
937
- const n = e.Te;
979
+ const t = e.ne;
980
+ const n = e.He;
938
981
  if (!n || !n(i, t)) {
939
- e.$ = i;
940
- e.de = E;
941
- if (e.He) {
942
- setSignal(e.He, i);
982
+ e.ne = i;
983
+ e.ge = C;
984
+ if (e.Qe) {
985
+ setSignal(e.Qe, i);
943
986
  }
944
987
  insertSubs(e, true);
945
988
  }
@@ -967,8 +1010,8 @@ function handleAsync(e, t, r) {
967
1010
  );
968
1011
  r = false;
969
1012
  if (!n) {
970
- A.initTransition(resolveTransition(e));
971
- throw new NotReadyError(V);
1013
+ R.initTransition(resolveTransition(e));
1014
+ throw new NotReadyError(B);
972
1015
  }
973
1016
  }
974
1017
  if (s) {
@@ -1021,72 +1064,72 @@ function handleAsync(e, t, r) {
1021
1064
  };
1022
1065
  const s = iterate();
1023
1066
  if (!r && !s) {
1024
- A.initTransition(resolveTransition(e));
1025
- throw new NotReadyError(V);
1067
+ R.initTransition(resolveTransition(e));
1068
+ throw new NotReadyError(B);
1026
1069
  }
1027
1070
  }
1028
1071
  return u;
1029
1072
  }
1030
1073
  function clearStatus(e, t = false) {
1031
1074
  clearPendingSources(e);
1032
- e.Re = false;
1033
- e.ge = t ? 0 : e.ge & p;
1075
+ e.Te = false;
1076
+ e.we = t ? 0 : e.we & h;
1034
1077
  setPendingError(e);
1035
1078
  updatePendingSignal(e);
1036
- e.Qe?.();
1079
+ e.qe?.();
1037
1080
  }
1038
1081
  function notifyStatus(e, t, n, r, i) {
1039
1082
  if (t === d && !(n instanceof StatusError) && !(n instanceof NotReadyError))
1040
1083
  n = new StatusError(e, n);
1041
1084
  const s = t === a && n instanceof NotReadyError ? n.source : undefined;
1042
1085
  const o = s === e;
1043
- const u = t === a && e.ee !== undefined && !o;
1086
+ const u = t === a && e.re !== undefined && !o;
1044
1087
  const f = u && hasActiveOverride(e);
1045
1088
  if (!r) {
1046
1089
  if (t === a && s) {
1047
1090
  addPendingSource(e, s);
1048
- e.ge = a | (e.ge & p);
1091
+ e.we = a | (e.we & h);
1049
1092
  setPendingError(e, s, n);
1050
1093
  } else {
1051
1094
  clearPendingSources(e);
1052
- e.ge = t | (t !== d ? e.ge & p : 0);
1053
- e.ae = n;
1095
+ e.we = t | (t !== d ? e.we & h : 0);
1096
+ e.pe = n;
1054
1097
  }
1055
1098
  updatePendingSignal(e);
1056
1099
  }
1057
1100
  if (i && !r) {
1058
1101
  assignOrMergeLane(e, i);
1059
1102
  }
1060
- const c = r || f;
1061
- const l = r || u ? undefined : i;
1062
- if (e.Qe) {
1103
+ const l = r || f;
1104
+ const c = r || u ? undefined : i;
1105
+ if (e.qe) {
1063
1106
  if (r && t === a) {
1064
1107
  return;
1065
1108
  }
1066
- if (c) {
1067
- e.Qe(t, n);
1109
+ if (l) {
1110
+ e.qe(t, n);
1068
1111
  } else {
1069
- e.Qe();
1112
+ e.qe();
1070
1113
  }
1071
1114
  return;
1072
1115
  }
1073
1116
  forEachDependent(e, e => {
1074
- e.de = E;
1117
+ e.ge = C;
1075
1118
  if (
1076
1119
  (t === a && s && e.Le !== s && !e.Ie?.has(s)) ||
1077
- (t !== a && (e.ae !== n || e.Le || e.Ie))
1120
+ (t !== a && (e.pe !== n || e.Le || e.Ie))
1078
1121
  ) {
1079
- if (!c && !e.K) A.se.push(e);
1080
- notifyStatus(e, t, n, c, l);
1122
+ if (!l && !e.X) R.fe.push(e);
1123
+ notifyStatus(e, t, n, l, c);
1081
1124
  }
1082
1125
  });
1083
1126
  }
1084
- let R = null;
1127
+ let H = null;
1085
1128
  function enableExternalSource(e) {
1086
1129
  const { factory: t, untrack: n = e => e() } = e;
1087
- if (R) {
1088
- const { factory: e, untrack: r } = R;
1089
- R = {
1130
+ if (H) {
1131
+ const { factory: e, untrack: r } = H;
1132
+ H = {
1090
1133
  factory: (n, r) => {
1091
1134
  const i = e(n, r);
1092
1135
  const s = t(e => i.track(e), r);
@@ -1101,175 +1144,175 @@ function enableExternalSource(e) {
1101
1144
  untrack: e => r(() => n(e))
1102
1145
  };
1103
1146
  } else {
1104
- R = { factory: t, untrack: n };
1147
+ H = { factory: t, untrack: n };
1105
1148
  }
1106
1149
  }
1107
- GlobalQueue.oe = recompute;
1108
- GlobalQueue.ue = disposeChildren;
1109
- let T = false;
1110
- let H = false;
1150
+ GlobalQueue.le = recompute;
1151
+ GlobalQueue.ce = disposeChildren;
1111
1152
  let Q = false;
1112
1153
  let q = false;
1113
1154
  let D = false;
1114
1155
  let F = false;
1115
- let V = null;
1116
- let M = null;
1117
- let B = false;
1156
+ let V = false;
1157
+ let M = false;
1158
+ let B = null;
1118
1159
  let G = null;
1160
+ let K = false;
1161
+ let z = null;
1119
1162
  function ownerInSnapshotScope(e) {
1120
1163
  while (e) {
1121
- if (e.qe) return true;
1164
+ if (e.De) return true;
1122
1165
  e = e.i;
1123
1166
  }
1124
1167
  return false;
1125
1168
  }
1126
1169
  function setSnapshotCapture(e) {
1127
- B = e;
1128
- if (e && !G) G = new Set();
1170
+ K = e;
1171
+ if (e && !z) z = new Set();
1129
1172
  }
1130
1173
  function markSnapshotScope(e) {
1131
- e.qe = true;
1174
+ e.De = true;
1132
1175
  }
1133
1176
  function releaseSnapshotScope(e) {
1134
- e.qe = false;
1177
+ e.De = false;
1135
1178
  releaseSubtree(e);
1136
1179
  schedule();
1137
1180
  }
1138
1181
  function releaseSubtree(e) {
1139
- let t = e.Pe;
1182
+ let t = e.T;
1140
1183
  while (t) {
1141
- if (t.qe) {
1142
- t = t.ve;
1184
+ if (t.De) {
1185
+ t = t.H;
1143
1186
  continue;
1144
1187
  }
1145
- if (t.R) {
1188
+ if (t.I) {
1146
1189
  const e = t;
1147
- e.he = false;
1148
- if (e.m & c) {
1149
- e.m &= ~c;
1190
+ e.Se = false;
1191
+ if (e.m & l) {
1192
+ e.m &= ~l;
1150
1193
  e.m |= n;
1151
- if (P.j > e.o) P.j = e.o;
1152
- insertIntoHeap(e, P);
1194
+ if (k.A > e.o) k.A = e.o;
1195
+ insertIntoHeap(e, k);
1153
1196
  }
1154
1197
  }
1155
1198
  releaseSubtree(t);
1156
- t = t.ve;
1199
+ t = t.H;
1157
1200
  }
1158
1201
  }
1159
1202
  function clearSnapshots() {
1160
- if (G) {
1161
- for (const e of G) {
1162
- delete e.pe;
1203
+ if (z) {
1204
+ for (const e of z) {
1205
+ delete e.ye;
1163
1206
  delete e[m];
1164
1207
  }
1165
- G = null;
1208
+ z = null;
1166
1209
  }
1167
- B = false;
1210
+ K = false;
1168
1211
  }
1169
1212
  function recompute(t, n = false) {
1170
- const i = t.D;
1213
+ const i = t.M;
1171
1214
  if (!n) {
1172
- if (t.K && (!i || k) && k !== t.K) A.initTransition(t.K);
1173
- deleteFromHeap(t, t.m & o ? v : P);
1215
+ if (t.X && (!i || W) && W !== t.X) R.initTransition(t.X);
1216
+ deleteFromHeap(t, t.m & o ? E : k);
1174
1217
  t.Ee = null;
1175
- if (t.K || i === y) disposeChildren(t);
1218
+ if (t.X || i === y) disposeChildren(t);
1176
1219
  else {
1177
1220
  markDisposal(t);
1178
- t.Ce = t.je;
1179
- t.ke = t.Pe;
1180
- t.je = null;
1181
- t.Pe = null;
1221
+ t.Ae = t.Ne;
1222
+ t.Ce = t.T;
1223
+ t.Ne = null;
1224
+ t.T = null;
1182
1225
  t.We = 0;
1183
1226
  }
1184
1227
  }
1185
1228
  const s = !!(t.m & f);
1186
- const u = t.ee !== undefined && t.ee !== S;
1187
- const l = !!(t.ge & a);
1188
- const p = V;
1189
- V = t;
1190
- t.xe = null;
1229
+ const u = t.re !== undefined && t.re !== S;
1230
+ const c = !!(t.we & a);
1231
+ const h = B;
1232
+ B = t;
1233
+ t.ke = null;
1191
1234
  t.m = r;
1192
- t.de = E;
1193
- let h = t.Z === S ? t.$ : t.Z;
1235
+ t.ge = C;
1236
+ let p = t.te === S ? t.ne : t.te;
1194
1237
  let g = t.o;
1195
- let w = T;
1196
- let m = M;
1197
- T = true;
1238
+ let w = Q;
1239
+ let m = G;
1240
+ Q = true;
1198
1241
  if (s) {
1199
1242
  const e = resolveLane(t);
1200
- if (e) M = e;
1243
+ if (e) G = e;
1201
1244
  }
1202
1245
  try {
1203
- h = handleAsync(t, t.R(h));
1246
+ p = handleAsync(t, t.I(p));
1204
1247
  clearStatus(t, n);
1205
1248
  const e = resolveLane(t);
1206
1249
  if (e) {
1207
- e.H.delete(t);
1208
- updatePendingSignal(e.te);
1250
+ e.F.delete(t);
1251
+ updatePendingSignal(e.ie);
1209
1252
  }
1210
1253
  } catch (e) {
1211
- if (e instanceof NotReadyError && M) {
1212
- const e = findLane(M);
1213
- if (e.te !== t) {
1214
- e.H.add(t);
1215
- t.Y = e;
1216
- updatePendingSignal(e.te);
1254
+ if (e instanceof NotReadyError && G) {
1255
+ const e = findLane(G);
1256
+ if (e.ie !== t) {
1257
+ e.F.add(t);
1258
+ t.ee = e;
1259
+ updatePendingSignal(e.ie);
1217
1260
  }
1218
1261
  }
1219
- if (e instanceof NotReadyError) t.Re = true;
1262
+ if (e instanceof NotReadyError) t.Te = true;
1220
1263
  notifyStatus(
1221
1264
  t,
1222
1265
  e instanceof NotReadyError ? a : d,
1223
1266
  e,
1224
1267
  undefined,
1225
- e instanceof NotReadyError ? t.Y : undefined
1268
+ e instanceof NotReadyError ? t.ee : undefined
1226
1269
  );
1227
1270
  } finally {
1228
- T = w;
1229
- t.m = e | (n ? t.m & c : 0);
1230
- V = p;
1271
+ Q = w;
1272
+ t.m = e | (n ? t.m & l : 0);
1273
+ B = h;
1231
1274
  }
1232
- if (!t.ae) {
1233
- const e = t.xe;
1234
- let r = e !== null ? e.N : t.A;
1275
+ if (!t.pe) {
1276
+ const e = t.ke;
1277
+ let r = e !== null ? e.j : t.N;
1235
1278
  if (r !== null) {
1236
1279
  do {
1237
1280
  r = unlinkSubs(r);
1238
1281
  } while (r !== null);
1239
- if (e !== null) e.N = null;
1240
- else t.A = null;
1241
- }
1242
- const f = u ? t.ee : t.Z === S ? t.$ : t.Z;
1243
- const c = !t.Te || !t.Te(f, h);
1244
- if (c) {
1245
- const e = u ? t.ee : undefined;
1246
- if (n || (i && k !== t.K) || s) {
1247
- t.$ = h;
1282
+ if (e !== null) e.j = null;
1283
+ else t.N = null;
1284
+ }
1285
+ const f = u ? t.re : t.te === S ? t.ne : t.te;
1286
+ const l = !t.He || !t.He(f, p);
1287
+ if (l) {
1288
+ const e = u ? t.re : undefined;
1289
+ if (n || (i && W !== t.X) || s) {
1290
+ t.ne = p;
1248
1291
  if (u && s) {
1249
- t.ee = h;
1250
- t.Z = h;
1292
+ t.re = p;
1293
+ t.te = p;
1251
1294
  }
1252
- } else t.Z = h;
1253
- if (u && !s && l && !t.we) t.ee = h;
1254
- if (!u || s || t.ee !== e) insertSubs(t, s || u);
1295
+ } else t.te = p;
1296
+ if (u && !s && c && !t.be) t.re = p;
1297
+ if (!u || s || t.re !== e) insertSubs(t, s || u);
1255
1298
  } else if (u) {
1256
- t.Z = h;
1299
+ t.te = p;
1257
1300
  } else if (t.o != g) {
1258
- for (let e = t._; e !== null; e = e.P) {
1259
- insertIntoHeapHeight(e.k, e.k.m & o ? v : P);
1301
+ for (let e = t.O; e !== null; e = e.P) {
1302
+ insertIntoHeapHeight(e.k, e.k.m & o ? E : k);
1260
1303
  }
1261
1304
  }
1262
1305
  }
1263
- M = m;
1264
- (!n || t.ge & a) && !t.K && !(k && u) && A.se.push(t);
1265
- t.K && i && k !== t.K && runInTransition(t.K, () => recompute(t));
1306
+ G = m;
1307
+ (!n || t.we & a) && !t.X && !(W && u) && R.fe.push(t);
1308
+ t.X && i && W !== t.X && runInTransition(t.X, () => recompute(t));
1266
1309
  }
1267
1310
  function updateIfNecessary(e) {
1268
1311
  if (e.m & t) {
1269
- for (let t = e.A; t; t = t.N) {
1270
- const r = t.L;
1271
- const i = r.I || r;
1272
- if (i.R) {
1312
+ for (let t = e.N; t; t = t.j) {
1313
+ const r = t.R;
1314
+ const i = r.L || r;
1315
+ if (i.I) {
1273
1316
  updateIfNecessary(i);
1274
1317
  }
1275
1318
  if (e.m & n) {
@@ -1277,184 +1320,184 @@ function updateIfNecessary(e) {
1277
1320
  }
1278
1321
  }
1279
1322
  }
1280
- if (e.m & (n | f) || (e.ae && e.de < E && !e.Ee)) {
1323
+ if (e.m & (n | f) || (e.pe && e.ge < C && !e.Ee)) {
1281
1324
  recompute(e);
1282
1325
  }
1283
- e.m = e.m & (c | i | s);
1326
+ e.m = e.m & (l | i | s);
1284
1327
  }
1285
1328
  function computed(t, n, r) {
1286
1329
  const i = r?.transparent ?? false;
1287
1330
  const s = {
1288
- id: r?.id ?? (i ? V?.id : V?.id != null ? getNextChildId(V) : undefined),
1289
- Ae: i || undefined,
1290
- Te: r?.equals != null ? r.equals : isEqual,
1291
- le: !!r?.pureWrite,
1292
- Oe: r?.unobserved,
1293
- je: null,
1294
- V: V?.V ?? A,
1295
- Ne: V?.Ne ?? O,
1331
+ id: r?.id ?? (i ? B?.id : B?.id != null ? getNextChildId(B) : undefined),
1332
+ je: i || undefined,
1333
+ He: r?.equals != null ? r.equals : isEqual,
1334
+ he: !!r?.pureWrite,
1335
+ ve: r?.unobserved,
1336
+ Ne: null,
1337
+ G: B?.G ?? R,
1338
+ Re: B?.Re ?? b,
1296
1339
  We: 0,
1297
- R: t,
1298
- $: n,
1340
+ I: t,
1341
+ ne: n,
1299
1342
  o: 0,
1300
- W: null,
1301
- h: undefined,
1302
- p: null,
1303
- A: null,
1343
+ C: null,
1344
+ p: undefined,
1345
+ h: null,
1346
+ N: null,
1347
+ ke: null,
1348
+ O: null,
1304
1349
  xe: null,
1305
- _: null,
1306
- be: null,
1307
- i: V,
1308
- ve: null,
1309
- Pe: null,
1310
- m: r?.lazy ? l : e,
1311
- ge: p,
1312
- de: E,
1313
- Z: S,
1350
+ i: B,
1351
+ H: null,
1352
+ T: null,
1353
+ m: r?.lazy ? c : e,
1354
+ we: h,
1355
+ ge: C,
1356
+ te: S,
1357
+ Ae: null,
1314
1358
  Ce: null,
1315
- ke: null,
1316
1359
  Ee: null,
1317
- K: null
1360
+ X: null
1318
1361
  };
1319
- s.p = s;
1320
- const o = V?.t ? V.u : V;
1321
- if (V) {
1322
- const e = V.Pe;
1362
+ s.h = s;
1363
+ const o = B?.t ? B.u : B;
1364
+ if (B) {
1365
+ const e = B.T;
1323
1366
  if (e === null) {
1324
- V.Pe = s;
1367
+ B.T = s;
1325
1368
  } else {
1326
- s.ve = e;
1327
- V.Pe = s;
1369
+ s.H = e;
1370
+ B.T = s;
1328
1371
  }
1329
1372
  }
1330
1373
  if (o) s.o = o.o + 1;
1331
- if (B && ownerInSnapshotScope(V)) s.he = true;
1332
- if (R) {
1374
+ if (K && ownerInSnapshotScope(B)) s.Se = true;
1375
+ if (H) {
1333
1376
  const e = signal(undefined, { equals: false, pureWrite: true });
1334
- const t = R.factory(s.R, () => {
1377
+ const t = H.factory(s.I, () => {
1335
1378
  setSignal(e, undefined);
1336
1379
  });
1337
1380
  cleanup(() => t.dispose());
1338
- s.R = n => {
1381
+ s.I = n => {
1339
1382
  read(e);
1340
1383
  return t.track(n);
1341
1384
  };
1342
1385
  }
1343
1386
  !r?.lazy && recompute(s, true);
1344
- if (B && !r?.lazy) {
1345
- if (!(s.ge & a)) {
1346
- s.pe = s.$ === undefined ? w : s.$;
1347
- G.add(s);
1387
+ if (K && !r?.lazy) {
1388
+ if (!(s.we & a)) {
1389
+ s.ye = s.ne === undefined ? w : s.ne;
1390
+ z.add(s);
1348
1391
  }
1349
1392
  }
1350
1393
  return s;
1351
1394
  }
1352
1395
  function signal(e, t, n = null) {
1353
1396
  const r = {
1354
- Te: t?.equals != null ? t.equals : isEqual,
1355
- le: !!t?.pureWrite,
1356
- De: !!t?.De,
1357
- Oe: t?.unobserved,
1358
- $: e,
1359
- _: null,
1360
- be: null,
1361
- de: E,
1362
- I: n,
1363
- C: n?.W || null,
1364
- Z: S
1397
+ He: t?.equals != null ? t.equals : isEqual,
1398
+ he: !!t?.pureWrite,
1399
+ Fe: !!t?.Fe,
1400
+ ve: t?.unobserved,
1401
+ ne: e,
1402
+ O: null,
1403
+ xe: null,
1404
+ ge: C,
1405
+ L: n,
1406
+ W: n?.C || null,
1407
+ te: S
1365
1408
  };
1366
- n && (n.W = r);
1367
- if (B && !r.De && !((n?.ge ?? 0) & a)) {
1368
- r.pe = e === undefined ? w : e;
1369
- G.add(r);
1409
+ n && (n.C = r);
1410
+ if (K && !r.Fe && !((n?.we ?? 0) & a)) {
1411
+ r.ye = e === undefined ? w : e;
1412
+ z.add(r);
1370
1413
  }
1371
1414
  return r;
1372
1415
  }
1373
1416
  function optimisticSignal(e, t) {
1374
1417
  const n = signal(e, t);
1375
- n.ee = S;
1418
+ n.re = S;
1376
1419
  return n;
1377
1420
  }
1378
1421
  function optimisticComputed(e, t, n) {
1379
1422
  const r = computed(e, t, n);
1380
- r.ee = S;
1423
+ r.re = S;
1381
1424
  return r;
1382
1425
  }
1383
1426
  function isEqual(e, t) {
1384
1427
  return e === t;
1385
1428
  }
1386
1429
  function untrack(e, t) {
1387
- if (!R && !T && true) return e();
1388
- const n = T;
1389
- T = false;
1430
+ if (!H && !Q && true) return e();
1431
+ const n = Q;
1432
+ Q = false;
1390
1433
  try {
1391
- if (R) return R.untrack(e);
1434
+ if (H) return H.untrack(e);
1392
1435
  return e();
1393
1436
  } finally {
1394
- T = n;
1437
+ Q = n;
1395
1438
  }
1396
1439
  }
1397
1440
  function read(e) {
1398
- if (F) {
1441
+ if (M) {
1399
1442
  const t = getLatestValueComputed(e);
1400
- const n = F;
1401
- F = false;
1402
- const r = e.ee !== undefined && e.ee !== S ? e.ee : e.$;
1443
+ const n = M;
1444
+ M = false;
1445
+ const r = e.re !== undefined && e.re !== S ? e.re : e.ne;
1403
1446
  let i;
1404
1447
  try {
1405
1448
  i = read(t);
1406
1449
  } catch (e) {
1407
- if (!V && e instanceof NotReadyError) return r;
1450
+ if (!B && e instanceof NotReadyError) return r;
1408
1451
  throw e;
1409
1452
  } finally {
1410
- F = n;
1453
+ M = n;
1411
1454
  }
1412
- if (t.ge & a) return r;
1413
- if (H && M && t.Y) {
1414
- const e = findLane(t.Y);
1415
- const n = findLane(M);
1416
- if (e !== n && e.H.size > 0) {
1455
+ if (t.we & a) return r;
1456
+ if (q && G && t.ee) {
1457
+ const e = findLane(t.ee);
1458
+ const n = findLane(G);
1459
+ if (e !== n && e.F.size > 0) {
1417
1460
  return r;
1418
1461
  }
1419
1462
  }
1420
1463
  return i;
1421
1464
  }
1422
- if (q) {
1423
- const t = e.I;
1424
- const n = q;
1425
- q = false;
1426
- if (t && e.ee !== undefined) {
1427
- if (e.ee !== S && (t.Ee || !!(t.ge & a))) {
1428
- D = true;
1465
+ if (F) {
1466
+ const t = e.L;
1467
+ const n = F;
1468
+ F = false;
1469
+ if (t && e.re !== undefined) {
1470
+ if (e.re !== S && (t.Ee || !!(t.we & a))) {
1471
+ V = true;
1429
1472
  }
1430
- let n = V;
1473
+ let n = B;
1431
1474
  if (n?.t) n = n.u;
1432
- if (n && T) link(e, n);
1475
+ if (n && Q) link(e, n);
1433
1476
  read(getPendingSignal(e));
1434
1477
  read(getPendingSignal(t));
1435
1478
  } else {
1436
- if (read(getPendingSignal(e))) D = true;
1437
- if (t && read(getPendingSignal(t))) D = true;
1479
+ if (read(getPendingSignal(e))) V = true;
1480
+ if (t && read(getPendingSignal(t))) V = true;
1438
1481
  }
1439
- q = n;
1440
- return e.$;
1482
+ F = n;
1483
+ return e.ne;
1441
1484
  }
1442
- let t = V;
1485
+ let t = B;
1443
1486
  if (t?.t) t = t.u;
1444
- if (Q && e.R) recompute(e);
1445
- if (e.m & l) {
1446
- e.m &= ~l;
1487
+ if (D && e.I) recompute(e);
1488
+ if (e.m & c) {
1489
+ e.m &= ~c;
1447
1490
  recompute(e, true);
1448
1491
  }
1449
- const n = e.I || e;
1450
- if (t && T) {
1451
- if (e.R && e.m & u) recompute(e);
1492
+ const n = e.L || e;
1493
+ if (t && Q) {
1494
+ if (e.I && e.m & u) recompute(e);
1452
1495
  link(e, t);
1453
- if (n.R) {
1496
+ if (n.I) {
1454
1497
  const r = e.m & o;
1455
- if (n.o >= (r ? v.j : P.j)) {
1498
+ if (n.o >= (r ? E.A : k.A)) {
1456
1499
  markNode(t);
1457
- markHeap(r ? v : P);
1500
+ markHeap(r ? E : k);
1458
1501
  updateIfNecessary(n);
1459
1502
  }
1460
1503
  const i = n.o;
@@ -1463,217 +1506,217 @@ function read(e) {
1463
1506
  }
1464
1507
  }
1465
1508
  }
1466
- if (n.ge & a) {
1467
- if (t && !(H && n.K && k !== n.K)) {
1468
- if (M) {
1469
- const r = n.Y;
1470
- const i = findLane(M);
1509
+ if (n.we & a) {
1510
+ if (t && !(q && n.X && W !== n.X)) {
1511
+ if (G) {
1512
+ const r = n.ee;
1513
+ const i = findLane(G);
1471
1514
  if (r && findLane(r) === i && !hasActiveOverride(n)) {
1472
- if (!T && e !== t) link(e, t);
1473
- throw n.ae;
1515
+ if (!Q && e !== t) link(e, t);
1516
+ throw n.pe;
1474
1517
  }
1475
1518
  } else {
1476
- if (!T && e !== t) link(e, t);
1477
- throw n.ae;
1519
+ if (!Q && e !== t) link(e, t);
1520
+ throw n.pe;
1478
1521
  }
1479
- } else if (t && n !== e && n.ge & p) {
1480
- if (!T && e !== t) link(e, t);
1481
- throw n.ae;
1482
- } else if (!t && n.ge & p) {
1483
- throw n.ae;
1522
+ } else if (t && n !== e && n.we & h) {
1523
+ if (!Q && e !== t) link(e, t);
1524
+ throw n.pe;
1525
+ } else if (!t && n.we & h) {
1526
+ throw n.pe;
1484
1527
  }
1485
1528
  }
1486
- if (e.R && e.ge & d) {
1487
- if (e.de < E) {
1529
+ if (e.I && e.we & d) {
1530
+ if (e.ge < C) {
1488
1531
  recompute(e);
1489
1532
  return read(e);
1490
- } else throw e.ae;
1533
+ } else throw e.pe;
1491
1534
  }
1492
- if (B && t && t.he) {
1493
- const n = e.pe;
1535
+ if (K && t && t.Se) {
1536
+ const n = e.ye;
1494
1537
  if (n !== undefined) {
1495
1538
  const r = n === w ? undefined : n;
1496
- const i = e.Z !== S ? e.Z : e.$;
1497
- if (i !== r) t.m |= c;
1539
+ const i = e.te !== S ? e.te : e.ne;
1540
+ if (i !== r) t.m |= l;
1498
1541
  return r;
1499
1542
  }
1500
1543
  }
1501
- if (e.ee !== undefined && e.ee !== S) {
1502
- if (t && H && shouldReadStashedOptimisticValue(e)) return e.$;
1503
- return e.ee;
1544
+ if (e.re !== undefined && e.re !== S) {
1545
+ if (t && q && shouldReadStashedOptimisticValue(e)) return e.ne;
1546
+ return e.re;
1504
1547
  }
1505
1548
  return !t ||
1506
- (M !== null && (e.ee !== undefined || e.Y || (n === e && H) || !!(n.ge & a))) ||
1507
- e.Z === S ||
1508
- (H && e.K && k !== e.K)
1509
- ? e.$
1510
- : e.Z;
1549
+ (G !== null && (e.re !== undefined || e.ee || (n === e && q) || !!(n.we & a))) ||
1550
+ e.te === S ||
1551
+ (q && e.X && W !== e.X)
1552
+ ? e.ne
1553
+ : e.te;
1511
1554
  }
1512
1555
  function setSignal(e, t) {
1513
- if (e.K && k !== e.K) A.initTransition(e.K);
1514
- const n = e.ee !== undefined && !C;
1515
- const r = e.ee !== undefined && e.ee !== S;
1516
- const i = n ? (r ? e.ee : e.$) : e.Z === S ? e.$ : e.Z;
1556
+ if (e.X && W !== e.X) R.initTransition(e.X);
1557
+ const n = e.re !== undefined && !N;
1558
+ const r = e.re !== undefined && e.re !== S;
1559
+ const i = n ? (r ? e.re : e.ne) : e.te === S ? e.ne : e.te;
1517
1560
  if (typeof t === "function") t = t(i);
1518
- const s = !e.Te || !e.Te(i, t) || !!(e.ge & p);
1561
+ const s = !e.He || !e.He(i, t) || !!(e.we & h);
1519
1562
  if (!s) {
1520
- if (n && r && e.R) {
1563
+ if (n && r && e.I) {
1521
1564
  insertSubs(e, true);
1522
1565
  schedule();
1523
1566
  }
1524
1567
  return t;
1525
1568
  }
1526
1569
  if (n) {
1527
- const n = e.ee === S;
1528
- if (!n) A.initTransition(resolveTransition(e));
1570
+ const n = e.re === S;
1571
+ if (!n) R.initTransition(resolveTransition(e));
1529
1572
  if (n) {
1530
- e.Z = e.$;
1531
- A.U.push(e);
1573
+ e.te = e.ne;
1574
+ R.Y.push(e);
1532
1575
  }
1533
- e.we = true;
1576
+ e.be = true;
1534
1577
  const r = getOrCreateLane(e);
1535
- e.Y = r;
1536
- e.ee = t;
1578
+ e.ee = r;
1579
+ e.re = t;
1537
1580
  } else {
1538
- if (e.Z === S) A.se.push(e);
1539
- e.Z = t;
1581
+ if (e.te === S) R.fe.push(e);
1582
+ e.te = t;
1540
1583
  }
1541
1584
  updatePendingSignal(e);
1542
- if (e.He) {
1543
- setSignal(e.He, t);
1585
+ if (e.Qe) {
1586
+ setSignal(e.Qe, t);
1544
1587
  }
1545
- e.de = E;
1588
+ e.ge = C;
1546
1589
  insertSubs(e, n);
1547
1590
  schedule();
1548
1591
  return t;
1549
1592
  }
1550
1593
  function runWithOwner(e, t) {
1551
- const n = V;
1552
- const r = T;
1553
- V = e;
1554
- T = false;
1594
+ const n = B;
1595
+ const r = Q;
1596
+ B = e;
1597
+ Q = false;
1555
1598
  try {
1556
1599
  return t();
1557
1600
  } finally {
1558
- V = n;
1559
- T = r;
1601
+ B = n;
1602
+ Q = r;
1560
1603
  }
1561
1604
  }
1562
1605
  function getPendingSignal(e) {
1563
- if (!e.Fe) {
1564
- e.Fe = optimisticSignal(false, { pureWrite: true });
1565
- if (e.ye) {
1566
- e.Fe.ye = e;
1606
+ if (!e.Ve) {
1607
+ e.Ve = optimisticSignal(false, { pureWrite: true });
1608
+ if (e.me) {
1609
+ e.Ve.me = e;
1567
1610
  }
1568
- if (computePendingState(e)) setSignal(e.Fe, true);
1611
+ if (computePendingState(e)) setSignal(e.Ve, true);
1569
1612
  }
1570
- return e.Fe;
1613
+ return e.Ve;
1571
1614
  }
1572
1615
  function computePendingState(e) {
1573
1616
  const t = e;
1574
- const n = e.I;
1575
- if (n && e.Z !== S) {
1576
- return !n.Ee && !(n.ge & a);
1617
+ const n = e.L;
1618
+ if (n && e.te !== S) {
1619
+ return !n.Ee && !(n.we & a);
1577
1620
  }
1578
- if (e.ee !== undefined && e.ee !== S) {
1579
- if (t.ge & a && !(t.ge & p)) return true;
1580
- if (e.ye) {
1581
- const t = e.Y ? findLane(e.Y) : null;
1582
- return !!(t && t.H.size > 0);
1621
+ if (e.re !== undefined && e.re !== S) {
1622
+ if (t.we & a && !(t.we & h)) return true;
1623
+ if (e.me) {
1624
+ const t = e.ee ? findLane(e.ee) : null;
1625
+ return !!(t && t.F.size > 0);
1583
1626
  }
1584
1627
  return true;
1585
1628
  }
1586
- if (e.ee !== undefined && e.ee === S && !e.ye) {
1629
+ if (e.re !== undefined && e.re === S && !e.me) {
1587
1630
  return false;
1588
1631
  }
1589
- if (e.Z !== S && !(t.ge & p)) return true;
1590
- return !!(t.ge & a && !(t.ge & p));
1632
+ if (e.te !== S && !(t.we & h)) return true;
1633
+ return !!(t.we & a && !(t.we & h));
1591
1634
  }
1592
1635
  function updatePendingSignal(e) {
1593
- if (e.Fe) {
1636
+ if (e.Ve) {
1594
1637
  const t = computePendingState(e);
1595
- const n = e.Fe;
1638
+ const n = e.Ve;
1596
1639
  setSignal(n, t);
1597
- if (!t && n.Y) {
1640
+ if (!t && n.ee) {
1598
1641
  const t = resolveLane(e);
1599
- if (t && t.H.size > 0) {
1600
- const e = findLane(n.Y);
1642
+ if (t && t.F.size > 0) {
1643
+ const e = findLane(n.ee);
1601
1644
  if (e !== t) {
1602
1645
  mergeLanes(t, e);
1603
1646
  }
1604
1647
  }
1605
- N.delete(n);
1606
- n.Y = undefined;
1648
+ L.delete(n);
1649
+ n.ee = undefined;
1607
1650
  }
1608
1651
  }
1609
1652
  }
1610
1653
  function getLatestValueComputed(e) {
1611
- if (!e.He) {
1612
- const t = F;
1654
+ if (!e.Qe) {
1655
+ const t = M;
1656
+ M = false;
1657
+ const n = F;
1613
1658
  F = false;
1614
- const n = q;
1615
- q = false;
1616
- const r = V;
1617
- V = null;
1618
- e.He = optimisticComputed(() => read(e));
1619
- e.He.ye = e;
1620
- V = r;
1621
- q = n;
1622
- F = t;
1659
+ const r = B;
1660
+ B = null;
1661
+ e.Qe = optimisticComputed(() => read(e));
1662
+ e.Qe.me = e;
1663
+ B = r;
1664
+ F = n;
1665
+ M = t;
1623
1666
  }
1624
- return e.He;
1667
+ return e.Qe;
1625
1668
  }
1626
1669
  function staleValues(e, t = true) {
1627
- const n = H;
1628
- H = t;
1670
+ const n = q;
1671
+ q = t;
1629
1672
  try {
1630
1673
  return e();
1631
1674
  } finally {
1632
- H = n;
1675
+ q = n;
1633
1676
  }
1634
1677
  }
1635
1678
  function latest(e) {
1636
- const t = F;
1637
- F = true;
1679
+ const t = M;
1680
+ M = true;
1638
1681
  try {
1639
1682
  return e();
1640
1683
  } finally {
1641
- F = t;
1684
+ M = t;
1642
1685
  }
1643
1686
  }
1644
1687
  function isPending(e) {
1645
- const t = q;
1646
- const n = D;
1647
- q = true;
1648
- D = false;
1688
+ const t = F;
1689
+ const n = V;
1690
+ F = true;
1691
+ V = false;
1649
1692
  try {
1650
1693
  e();
1651
- return D;
1694
+ return V;
1652
1695
  } catch {
1653
- return D;
1696
+ return V;
1654
1697
  } finally {
1655
- q = t;
1656
- D = n;
1698
+ F = t;
1699
+ V = n;
1657
1700
  }
1658
1701
  }
1659
1702
  function refresh(e) {
1660
- let t = Q;
1661
- Q = true;
1703
+ let t = D;
1704
+ D = true;
1662
1705
  try {
1663
1706
  if (typeof e !== "function") {
1664
- recompute(e[_]);
1707
+ recompute(e[O]);
1665
1708
  return e;
1666
1709
  }
1667
1710
  return untrack(e);
1668
1711
  } finally {
1669
- Q = t;
1712
+ D = t;
1670
1713
  if (!t) {
1671
1714
  schedule();
1672
1715
  }
1673
1716
  }
1674
1717
  }
1675
1718
  function isRefreshing() {
1676
- return Q;
1719
+ return D;
1677
1720
  }
1678
1721
  function createContext(e, t) {
1679
1722
  return { id: Symbol(t), defaultValue: e };
@@ -1682,7 +1725,7 @@ function getContext(e, t = getOwner()) {
1682
1725
  if (!t) {
1683
1726
  throw new NoOwnerError();
1684
1727
  }
1685
- const n = hasContext(e, t) ? t.Ne[e.id] : e.defaultValue;
1728
+ const n = hasContext(e, t) ? t.Re[e.id] : e.defaultValue;
1686
1729
  if (isUndefined(n)) {
1687
1730
  throw new ContextNotFoundError();
1688
1731
  }
@@ -1692,10 +1735,10 @@ function setContext(e, t, n = getOwner()) {
1692
1735
  if (!n) {
1693
1736
  throw new NoOwnerError();
1694
1737
  }
1695
- n.Ne = { ...n.Ne, [e.id]: isUndefined(t) ? e.defaultValue : t };
1738
+ n.Re = { ...n.Re, [e.id]: isUndefined(t) ? e.defaultValue : t };
1696
1739
  }
1697
1740
  function hasContext(e, t) {
1698
- return !isUndefined(t?.Ne[e.id]);
1741
+ return !isUndefined(t?.Re[e.id]);
1699
1742
  }
1700
1743
  function isUndefined(e) {
1701
1744
  return typeof e === "undefined";
@@ -1705,99 +1748,99 @@ function effect(e, t, n, r, i) {
1705
1748
  const o = computed(i?.render ? t => staleValues(() => e(t)) : e, r, {
1706
1749
  ...i,
1707
1750
  equals: () => {
1708
- o.F = !o.ae;
1709
- if (s) o.V.enqueue(o.D, runEffect.bind(o));
1751
+ o.B = !o.pe;
1752
+ if (s) o.G.enqueue(o.M, runEffect.bind(o));
1710
1753
  return false;
1711
1754
  },
1712
1755
  lazy: true
1713
1756
  });
1714
- o.Ve = r;
1715
- o.Me = t;
1716
- o.Be = n;
1717
- o.Ge = undefined;
1718
- o.D = i?.render ? h : g;
1719
- o.Qe = (e, t) => {
1720
- const n = e !== undefined ? e : o.ge;
1721
- const r = t !== undefined ? t : o.ae;
1757
+ o.Me = r;
1758
+ o.Be = t;
1759
+ o.Ge = n;
1760
+ o.Ke = undefined;
1761
+ o.M = i?.render ? p : g;
1762
+ o.qe = (e, t) => {
1763
+ const n = e !== undefined ? e : o.we;
1764
+ const r = t !== undefined ? t : o.pe;
1722
1765
  if (n & d) {
1723
1766
  let e = r;
1724
- o.V.notify(o, a, 0);
1725
- if (o.D === g) {
1767
+ o.G.notify(o, a, 0);
1768
+ if (o.M === g) {
1726
1769
  try {
1727
- return o.Be
1728
- ? o.Be(e, () => {
1729
- o.Ge?.();
1730
- o.Ge = undefined;
1770
+ return o.Ge
1771
+ ? o.Ge(e, () => {
1772
+ o.Ke?.();
1773
+ o.Ke = undefined;
1731
1774
  })
1732
1775
  : console.error(e);
1733
1776
  } catch (t) {
1734
1777
  e = t;
1735
1778
  }
1736
1779
  }
1737
- if (!o.V.notify(o, d, d)) throw e;
1738
- } else if (o.D === h) {
1739
- o.V.notify(o, a | d, n, r);
1780
+ if (!o.G.notify(o, d, d)) throw e;
1781
+ } else if (o.M === p) {
1782
+ o.G.notify(o, a | d, n, r);
1740
1783
  }
1741
1784
  };
1742
1785
  recompute(o, true);
1743
- !i?.defer && (o.D === g ? o.V.enqueue(o.D, runEffect.bind(o)) : runEffect.call(o));
1786
+ !i?.defer && (o.M === g ? o.G.enqueue(o.M, runEffect.bind(o)) : runEffect.call(o));
1744
1787
  s = true;
1745
- cleanup(() => o.Ge?.());
1788
+ cleanup(() => o.Ke?.());
1746
1789
  }
1747
1790
  function runEffect() {
1748
- if (!this.F || this.m & u) return;
1749
- this.Ge?.();
1750
- this.Ge = undefined;
1791
+ if (!this.B || this.m & u) return;
1792
+ this.Ke?.();
1793
+ this.Ke = undefined;
1751
1794
  try {
1752
- const e = this.Me(this.$, this.Ve);
1795
+ const e = this.Be(this.ne, this.Me);
1753
1796
  if (false && e !== undefined && typeof e !== "function");
1754
- this.Ge = e;
1797
+ this.Ke = e;
1755
1798
  } catch (e) {
1756
- this.ae = new StatusError(this, e);
1757
- this.ge |= d;
1758
- if (!this.V.notify(this, d, d)) throw e;
1799
+ this.pe = new StatusError(this, e);
1800
+ this.we |= d;
1801
+ if (!this.G.notify(this, d, d)) throw e;
1759
1802
  } finally {
1760
- this.Ve = this.$;
1761
- this.F = false;
1803
+ this.Me = this.ne;
1804
+ this.B = false;
1762
1805
  }
1763
1806
  }
1764
1807
  function trackedEffect(e, t) {
1765
1808
  const run = () => {
1766
- if (!n.F || n.m & u) return;
1809
+ if (!n.B || n.m & u) return;
1767
1810
  try {
1768
- n.F = false;
1811
+ n.B = false;
1769
1812
  recompute(n);
1770
1813
  } finally {
1771
1814
  }
1772
1815
  };
1773
1816
  const n = computed(
1774
1817
  () => {
1775
- n.Ge?.();
1776
- n.Ge = undefined;
1818
+ n.Ke?.();
1819
+ n.Ke = undefined;
1777
1820
  const t = staleValues(e);
1778
- n.Ge = t;
1821
+ n.Ke = t;
1779
1822
  },
1780
1823
  undefined,
1781
1824
  { ...t, lazy: true }
1782
1825
  );
1783
- n.Ge = undefined;
1784
- n.Ke = true;
1785
- n.F = true;
1786
- n.D = y;
1787
- n.Qe = (e, t) => {
1788
- const r = e !== undefined ? e : n.ge;
1826
+ n.Ke = undefined;
1827
+ n.ze = true;
1828
+ n.B = true;
1829
+ n.M = y;
1830
+ n.qe = (e, t) => {
1831
+ const r = e !== undefined ? e : n.we;
1789
1832
  if (r & d) {
1790
- n.V.notify(n, a, 0);
1791
- const e = t !== undefined ? t : n.ae;
1792
- if (!n.V.notify(n, d, d)) throw e;
1833
+ n.G.notify(n, a, 0);
1834
+ const e = t !== undefined ? t : n.pe;
1835
+ if (!n.G.notify(n, d, d)) throw e;
1793
1836
  }
1794
1837
  };
1795
- n.M = run;
1796
- n.V.enqueue(g, run);
1797
- cleanup(() => n.Ge?.());
1838
+ n.K = run;
1839
+ n.G.enqueue(g, run);
1840
+ cleanup(() => n.Ke?.());
1798
1841
  }
1799
1842
  function restoreTransition(e, t) {
1800
- A.initTransition(e);
1843
+ R.initTransition(e);
1801
1844
  const n = t();
1802
1845
  flush();
1803
1846
  return n;
@@ -1806,13 +1849,13 @@ function action(e) {
1806
1849
  return (...t) =>
1807
1850
  new Promise((n, r) => {
1808
1851
  const i = e(...t);
1809
- A.initTransition();
1810
- let s = k;
1811
- s.G.push(i);
1852
+ R.initTransition();
1853
+ let s = W;
1854
+ s.J.push(i);
1812
1855
  const done = (e, t) => {
1813
1856
  s = currentTransition(s);
1814
- const o = s.G.indexOf(i);
1815
- if (o >= 0) s.G.splice(o, 1);
1857
+ const o = s.J.indexOf(i);
1858
+ if (o >= 0) s.J.splice(o, 1);
1816
1859
  setActiveTransition(s);
1817
1860
  schedule();
1818
1861
  t ? r(t) : n(e);
@@ -1907,20 +1950,24 @@ function resolve(e) {
1907
1950
  });
1908
1951
  }
1909
1952
  function createOptimistic(e, t, n) {
1910
- const r = typeof e === "function" ? optimisticComputed(e, t, n) : optimisticSignal(e, t);
1953
+ if (typeof e === "function") {
1954
+ const r = optimisticComputed(e, t, n);
1955
+ return [accessor(r), setSignal.bind(null, r)];
1956
+ }
1957
+ const r = optimisticSignal(e, t);
1911
1958
  return [accessor(r), setSignal.bind(null, r)];
1912
1959
  }
1913
1960
  function onSettled(e) {
1914
1961
  const t = getOwner();
1915
- t && !t.Ke
1962
+ t && !t.ze
1916
1963
  ? createTrackedEffect(() => untrack(e), undefined)
1917
- : A.enqueue(g, () => {
1964
+ : R.enqueue(g, () => {
1918
1965
  const t = e();
1919
1966
  t?.();
1920
1967
  });
1921
1968
  }
1922
1969
  function unwrap(e) {
1923
- return e?.[z]?.[$] ?? e;
1970
+ return e?.[J]?.[te] ?? e;
1924
1971
  }
1925
1972
  function getOverrideValue(e, t, n, r, i) {
1926
1973
  if (i && r in i) return i[r];
@@ -1932,110 +1979,110 @@ function getAllKeys(e, t, n) {
1932
1979
  return Array.from(new Set([...r, ...i]));
1933
1980
  }
1934
1981
  function applyState(e, t, n) {
1935
- const r = t?.[z];
1982
+ const r = t?.[J];
1936
1983
  if (!r) return;
1937
- const i = r[X];
1938
- const s = r[Y];
1939
- const o = r[Z];
1940
- let u = r[$];
1984
+ const i = r[Z];
1985
+ const s = r[$];
1986
+ const o = r[ee];
1987
+ let u = r[te];
1941
1988
  if (e === i && !s && !o) return;
1942
- (r[ne] || se).set(e, r[U]);
1943
- r[X] = e;
1944
- r[Y] = undefined;
1989
+ (r[ie] || ue).set(e, r[X]);
1990
+ r[Z] = e;
1991
+ r[$] = undefined;
1945
1992
  if (Array.isArray(i)) {
1946
1993
  let t = false;
1947
1994
  const f = getOverrideValue(i, s, u, "length", o);
1948
1995
  if (e.length && f && e[0] && n(e[0]) != null) {
1949
- let c, l, a, d, p, h, g, y;
1996
+ let l, c, a, d, h, p, g, y;
1950
1997
  for (
1951
1998
  a = 0, d = Math.min(f, e.length);
1952
1999
  a < d &&
1953
- ((h = getOverrideValue(i, s, u, a, o)) === e[a] || (h && e[a] && n(h) === n(e[a])));
2000
+ ((p = getOverrideValue(i, s, u, a, o)) === e[a] || (p && e[a] && n(p) === n(e[a])));
1954
2001
  a++
1955
2002
  ) {
1956
- applyState(e[a], wrap(h, r), n);
2003
+ applyState(e[a], wrap(p, r), n);
1957
2004
  }
1958
2005
  const S = new Array(e.length),
1959
2006
  w = new Map();
1960
2007
  for (
1961
- d = f - 1, p = e.length - 1;
2008
+ d = f - 1, h = e.length - 1;
1962
2009
  d >= a &&
1963
- p >= a &&
1964
- ((h = getOverrideValue(i, s, u, d, o)) === e[p] || (h && e[p] && n(h) === n(e[p])));
1965
- d--, p--
2010
+ h >= a &&
2011
+ ((p = getOverrideValue(i, s, u, d, o)) === e[h] || (p && e[h] && n(p) === n(e[h])));
2012
+ d--, h--
1966
2013
  ) {
1967
- S[p] = h;
2014
+ S[h] = p;
1968
2015
  }
1969
- if (a > p || a > d) {
1970
- for (l = a; l <= p; l++) {
2016
+ if (a > h || a > d) {
2017
+ for (c = a; c <= h; c++) {
1971
2018
  t = true;
1972
- r[$][l] && setSignal(r[$][l], wrap(e[l], r));
2019
+ r[te][c] && setSignal(r[te][c], wrap(e[c], r));
1973
2020
  }
1974
- for (; l < e.length; l++) {
2021
+ for (; c < e.length; c++) {
1975
2022
  t = true;
1976
- const i = wrap(S[l], r);
1977
- r[$][l] && setSignal(r[$][l], i);
1978
- applyState(e[l], i, n);
2023
+ const i = wrap(S[c], r);
2024
+ r[te][c] && setSignal(r[te][c], i);
2025
+ applyState(e[c], i, n);
1979
2026
  }
1980
- t && r[$][K] && setSignal(r[$][K], void 0);
1981
- f !== e.length && r[$].length && setSignal(r[$].length, e.length);
2027
+ t && r[te][U] && setSignal(r[te][U], void 0);
2028
+ f !== e.length && r[te].length && setSignal(r[te].length, e.length);
1982
2029
  return;
1983
2030
  }
1984
- g = new Array(p + 1);
1985
- for (l = p; l >= a; l--) {
1986
- h = e[l];
1987
- y = h ? n(h) : h;
1988
- c = w.get(y);
1989
- g[l] = c === undefined ? -1 : c;
1990
- w.set(y, l);
1991
- }
1992
- for (c = a; c <= d; c++) {
1993
- h = getOverrideValue(i, s, u, c, o);
1994
- y = h ? n(h) : h;
2031
+ g = new Array(h + 1);
2032
+ for (c = h; c >= a; c--) {
2033
+ p = e[c];
2034
+ y = p ? n(p) : p;
1995
2035
  l = w.get(y);
1996
- if (l !== undefined && l !== -1) {
1997
- S[l] = h;
1998
- l = g[l];
1999
- w.set(y, l);
2036
+ g[c] = l === undefined ? -1 : l;
2037
+ w.set(y, c);
2038
+ }
2039
+ for (l = a; l <= d; l++) {
2040
+ p = getOverrideValue(i, s, u, l, o);
2041
+ y = p ? n(p) : p;
2042
+ c = w.get(y);
2043
+ if (c !== undefined && c !== -1) {
2044
+ S[c] = p;
2045
+ c = g[c];
2046
+ w.set(y, c);
2000
2047
  }
2001
2048
  }
2002
- for (l = a; l < e.length; l++) {
2003
- if (l in S) {
2004
- const t = wrap(S[l], r);
2005
- r[$][l] && setSignal(r[$][l], t);
2006
- applyState(e[l], t, n);
2007
- } else r[$][l] && setSignal(r[$][l], wrap(e[l], r));
2049
+ for (c = a; c < e.length; c++) {
2050
+ if (c in S) {
2051
+ const t = wrap(S[c], r);
2052
+ r[te][c] && setSignal(r[te][c], t);
2053
+ applyState(e[c], t, n);
2054
+ } else r[te][c] && setSignal(r[te][c], wrap(e[c], r));
2008
2055
  }
2009
2056
  if (a < e.length) t = true;
2010
2057
  } else if (e.length) {
2011
2058
  for (let t = 0, f = e.length; t < f; t++) {
2012
2059
  const f = getOverrideValue(i, s, u, t, o);
2013
- isWrappable(f) ? applyState(e[t], wrap(f, r), n) : r[$][t] && setSignal(r[$][t], e[t]);
2060
+ isWrappable(f) ? applyState(e[t], wrap(f, r), n) : r[te][t] && setSignal(r[te][t], e[t]);
2014
2061
  }
2015
2062
  }
2016
2063
  if (f !== e.length) {
2017
2064
  t = true;
2018
- r[$].length && setSignal(r[$].length, e.length);
2065
+ r[te].length && setSignal(r[te].length, e.length);
2019
2066
  }
2020
- t && r[$][K] && setSignal(r[$][K], void 0);
2067
+ t && r[te][U] && setSignal(r[te][U], void 0);
2021
2068
  return;
2022
2069
  }
2023
2070
  if (u) {
2024
- const t = u[K];
2071
+ const t = u[U];
2025
2072
  const f = t ? getAllKeys(i, s, e) : Object.keys(u);
2026
- for (let c = 0, l = f.length; c < l; c++) {
2027
- const l = f[c];
2028
- const a = u[l];
2029
- const d = unwrap(getOverrideValue(i, s, u, l, o));
2030
- let p = unwrap(e[l]);
2031
- if (d === p) continue;
2032
- if (!d || !isWrappable(d) || !isWrappable(p) || (n(d) != null && n(d) !== n(p))) {
2073
+ for (let l = 0, c = f.length; l < c; l++) {
2074
+ const c = f[l];
2075
+ const a = u[c];
2076
+ const d = unwrap(getOverrideValue(i, s, u, c, o));
2077
+ let h = unwrap(e[c]);
2078
+ if (d === h) continue;
2079
+ if (!d || !isWrappable(d) || !isWrappable(h) || (n(d) != null && n(d) !== n(h))) {
2033
2080
  t && setSignal(t, void 0);
2034
- a && setSignal(a, isWrappable(p) ? wrap(p, r) : p);
2035
- } else applyState(p, wrap(d, r), n);
2081
+ a && setSignal(a, isWrappable(h) ? wrap(h, r) : h);
2082
+ } else applyState(h, wrap(d, r), n);
2036
2083
  }
2037
2084
  }
2038
- if ((u = r[ee])) {
2085
+ if ((u = r[ne])) {
2039
2086
  const t = Object.keys(u);
2040
2087
  for (let n = 0, r = t.length; n < r; n++) {
2041
2088
  const r = t[n];
@@ -2057,9 +2104,9 @@ function createProjectionInternal(e, t = {}, n) {
2057
2104
  let r;
2058
2105
  const i = new WeakMap();
2059
2106
  const wrapper = e => {
2060
- e[te] = wrapProjection;
2061
- e[ne] = i;
2062
- Object.defineProperty(e, re, {
2107
+ e[re] = wrapProjection;
2108
+ e[ie] = i;
2109
+ Object.defineProperty(e, se, {
2063
2110
  get() {
2064
2111
  return r;
2065
2112
  },
@@ -2068,8 +2115,8 @@ function createProjectionInternal(e, t = {}, n) {
2068
2115
  };
2069
2116
  const wrapProjection = e => {
2070
2117
  if (i.has(e)) return i.get(e);
2071
- if (e[z]?.[te] === wrapProjection) return e;
2072
- const t = createStoreProxy(e, fe, wrapper);
2118
+ if (e[J]?.[re] === wrapProjection) return e;
2119
+ const t = createStoreProxy(e, ce, wrapper);
2073
2120
  i.set(e, t);
2074
2121
  return t;
2075
2122
  };
@@ -2091,7 +2138,7 @@ function createProjectionInternal(e, t = {}, n) {
2091
2138
  u !== o && u !== undefined && reconcile(u, n?.key || "id")(s);
2092
2139
  });
2093
2140
  });
2094
- r._e = true;
2141
+ r.Pe = true;
2095
2142
  return { store: s, node: r };
2096
2143
  }
2097
2144
  function createProjection(e, t = {}, n) {
@@ -2150,33 +2197,33 @@ function createWriteTraps(e) {
2150
2197
  };
2151
2198
  return t;
2152
2199
  }
2153
- const K = Symbol(0),
2154
- z = Symbol(0),
2155
- U = Symbol(0),
2156
- J = Symbol(0);
2157
- const X = "v",
2158
- Y = "o",
2159
- Z = "x",
2160
- $ = "n",
2161
- ee = "h",
2162
- te = "w",
2163
- ne = "l",
2164
- re = "f",
2165
- ie = "p";
2166
- function createStoreProxy(e, t = fe, n) {
2200
+ const U = Symbol(0),
2201
+ J = Symbol(0),
2202
+ X = Symbol(0),
2203
+ Y = Symbol(0);
2204
+ const Z = "v",
2205
+ $ = "o",
2206
+ ee = "x",
2207
+ te = "n",
2208
+ ne = "h",
2209
+ re = "w",
2210
+ ie = "l",
2211
+ se = "f",
2212
+ oe = "p";
2213
+ function createStoreProxy(e, t = ce, n) {
2167
2214
  let r;
2168
2215
  if (Array.isArray(e)) {
2169
2216
  r = [];
2170
2217
  r.v = e;
2171
2218
  } else r = { v: e };
2172
2219
  n && n(r);
2173
- return (r[U] = new Proxy(r, t));
2220
+ return (r[X] = new Proxy(r, t));
2174
2221
  }
2175
- const se = new WeakMap();
2222
+ const ue = new WeakMap();
2176
2223
  function wrap(e, t) {
2177
- if (t?.[te]) return t[te](e, t);
2178
- let n = e[U] || se.get(e);
2179
- if (!n) se.set(e, (n = createStoreProxy(e)));
2224
+ if (t?.[re]) return t[re](e, t);
2225
+ let n = e[X] || ue.get(e);
2226
+ if (!n) ue.set(e, (n = createStoreProxy(e)));
2180
2227
  return n;
2181
2228
  }
2182
2229
  function isWrappable(e) {
@@ -2187,12 +2234,12 @@ function isWrappable(e) {
2187
2234
  !(typeof Node !== "undefined" && e instanceof Node)
2188
2235
  );
2189
2236
  }
2190
- let oe = false;
2237
+ let fe = false;
2191
2238
  function setWriteOverride(e) {
2192
- oe = e;
2239
+ fe = e;
2193
2240
  }
2194
2241
  function writeOnly(e) {
2195
- return oe || !!ue?.has(e);
2242
+ return fe || !!le?.has(e);
2196
2243
  }
2197
2244
  function getNodes(e, t) {
2198
2245
  let n = e[t];
@@ -2212,17 +2259,17 @@ function getNode(e, t, n, r, i = isEqual, s, o) {
2212
2259
  r
2213
2260
  );
2214
2261
  if (s) {
2215
- u.ee = S;
2262
+ u.re = S;
2216
2263
  }
2217
2264
  if (o && t in o) {
2218
2265
  const e = o[t];
2219
- u.pe = e === undefined ? w : e;
2220
- G?.add(u);
2266
+ u.ye = e === undefined ? w : e;
2267
+ z?.add(u);
2221
2268
  }
2222
2269
  return (e[t] = u);
2223
2270
  }
2224
- function trackSelf(e, t = K) {
2225
- getObserver() && read(getNode(getNodes(e, $), t, undefined, e[re], false, e[ie]));
2271
+ function trackSelf(e, t = U) {
2272
+ getObserver() && read(getNode(getNodes(e, te), t, undefined, e[se], false, e[oe]));
2226
2273
  }
2227
2274
  function getKeys(e, t, n = true) {
2228
2275
  const r = untrack(() => (n ? Object.keys(e) : Reflect.ownKeys(e)));
@@ -2230,7 +2277,7 @@ function getKeys(e, t, n = true) {
2230
2277
  const i = new Set(r);
2231
2278
  const s = Reflect.ownKeys(t);
2232
2279
  for (const e of s) {
2233
- if (t[e] !== J) i.add(e);
2280
+ if (t[e] !== Y) i.add(e);
2234
2281
  else i.delete(e);
2235
2282
  }
2236
2283
  return Array.from(i);
@@ -2238,147 +2285,154 @@ function getKeys(e, t, n = true) {
2238
2285
  function getPropertyDescriptor(e, t, n) {
2239
2286
  let r = e;
2240
2287
  if (t && n in t) {
2241
- if (r[n] === J) return void 0;
2288
+ if (r[n] === Y) return void 0;
2242
2289
  if (!(n in r)) r = t;
2243
2290
  }
2244
2291
  return Reflect.getOwnPropertyDescriptor(r, n);
2245
2292
  }
2246
- let ue = null;
2247
- const fe = {
2293
+ let le = null;
2294
+ const ce = {
2248
2295
  get(e, t, n) {
2249
- if (t === z) return e;
2250
- if (t === U) return n;
2251
- if (t === _) return e[re];
2252
- if (t === K) {
2296
+ if (t === J) return e;
2297
+ if (t === X) return n;
2298
+ if (t === O) return e[se];
2299
+ if (t === U) {
2253
2300
  trackSelf(e);
2254
2301
  return n;
2255
2302
  }
2256
- const r = getNodes(e, $);
2303
+ const r = getNodes(e, te);
2257
2304
  const i = r[t];
2258
- const s = e[Z] && t in e[Z];
2259
- const o = s || (e[Y] && t in e[Y]);
2260
- const u = !!e[X][z];
2261
- const f = s ? e[Z] : e[Y] && t in e[Y] ? e[Y] : e[X];
2305
+ const s = e[ee] && t in e[ee];
2306
+ const o = s || (e[$] && t in e[$]);
2307
+ const u = !!e[Z][J];
2308
+ const f = s ? e[ee] : e[$] && t in e[$] ? e[$] : e[Z];
2262
2309
  if (!i) {
2263
2310
  const e = Object.getOwnPropertyDescriptor(f, t);
2264
2311
  if (e && e.get) return e.get.call(n);
2265
2312
  }
2266
2313
  if (writeOnly(n)) {
2267
2314
  let n =
2268
- i && (o || !u) ? (i.ee !== undefined && i.ee !== S ? i.ee : i.Z !== S ? i.Z : i.$) : f[t];
2269
- n === J && (n = undefined);
2315
+ i && (o || !u)
2316
+ ? i.re !== undefined && i.re !== S
2317
+ ? i.re
2318
+ : i.te !== S
2319
+ ? i.te
2320
+ : i.ne
2321
+ : f[t];
2322
+ n === Y && (n = undefined);
2270
2323
  if (!isWrappable(n)) return n;
2271
2324
  const r = wrap(n, e);
2272
- ue?.add(r);
2325
+ le?.add(r);
2273
2326
  return r;
2274
2327
  }
2275
- let c = i ? (o || !u ? read(r[t]) : (read(r[t]), f[t])) : f[t];
2276
- c === J && (c = undefined);
2328
+ let l = i ? (o || !u ? read(r[t]) : (read(r[t]), f[t])) : f[t];
2329
+ l === Y && (l = undefined);
2277
2330
  if (!i) {
2278
- if (!o && typeof c === "function" && !f.hasOwnProperty(t)) {
2331
+ if (!o && typeof l === "function" && !f.hasOwnProperty(t)) {
2279
2332
  let t;
2280
- return !Array.isArray(e[X]) && (t = Object.getPrototypeOf(e[X])) && t !== Object.prototype
2281
- ? c.bind(f)
2282
- : c;
2333
+ return !Array.isArray(e[Z]) && (t = Object.getPrototypeOf(e[Z])) && t !== Object.prototype
2334
+ ? l.bind(f)
2335
+ : l;
2283
2336
  } else if (getObserver()) {
2284
- return read(getNode(r, t, isWrappable(c) ? wrap(c, e) : c, e[re], isEqual, e[ie], e[m]));
2337
+ return read(getNode(r, t, isWrappable(l) ? wrap(l, e) : l, e[se], isEqual, e[oe], e[m]));
2285
2338
  }
2286
2339
  }
2287
- return isWrappable(c) ? wrap(c, e) : c;
2340
+ return isWrappable(l) ? wrap(l, e) : l;
2288
2341
  },
2289
2342
  has(e, t) {
2290
- if (t === U || t === K || t === "__proto__") return true;
2291
- const n = e[Z] && t in e[Z] ? e[Z][t] !== J : e[Y] && t in e[Y] ? e[Y][t] !== J : t in e[X];
2292
- if (!writeOnly(e[U])) {
2293
- getObserver() && read(getNode(getNodes(e, ee), t, n, e[re], isEqual, e[ie]));
2343
+ if (t === X || t === U || t === "__proto__") return true;
2344
+ const n = e[ee] && t in e[ee] ? e[ee][t] !== Y : e[$] && t in e[$] ? e[$][t] !== Y : t in e[Z];
2345
+ if (!writeOnly(e[X])) {
2346
+ getObserver() && read(getNode(getNodes(e, ne), t, n, e[se], isEqual, e[oe]));
2294
2347
  }
2295
2348
  return n;
2296
2349
  },
2297
2350
  set(e, t, n) {
2298
- const r = e[U];
2351
+ const r = e[X];
2299
2352
  if (writeOnly(r)) {
2300
- if (e[ie]) {
2301
- const t = e[re];
2302
- if (t?.K) {
2303
- A.initTransition(t.K);
2353
+ if (e[oe]) {
2354
+ const t = e[se];
2355
+ if (t?.X) {
2356
+ R.initTransition(t.X);
2304
2357
  }
2305
2358
  }
2306
2359
  untrack(() => {
2307
- const i = e[X];
2360
+ const i = e[Z];
2308
2361
  const s = i[t];
2309
- if (B && typeof t !== "symbol" && !((e[re]?.ge ?? 0) & a)) {
2362
+ if (K && typeof t !== "symbol" && !((e[se]?.we ?? 0) & a)) {
2310
2363
  if (!e[m]) {
2311
2364
  e[m] = Object.create(null);
2312
- G?.add(e);
2365
+ z?.add(e);
2313
2366
  }
2314
2367
  if (!(t in e[m])) {
2315
2368
  e[m][t] = s;
2316
2369
  }
2317
2370
  }
2318
- const o = e[ie] && !C;
2319
- const u = o ? Z : Y;
2371
+ const o = e[oe] && !N;
2372
+ const u = o ? ee : $;
2320
2373
  if (o) trackOptimisticStore(r);
2321
- const f = e[Z] && t in e[Z] ? e[Z][t] : e[Y] && t in e[Y] ? e[Y][t] : s;
2322
- const c = n?.[z]?.[X] ?? n;
2323
- const l = Array.isArray(i) && t !== "length";
2324
- const d = l ? parseInt(t) + 1 : 0;
2325
- const p =
2326
- l &&
2327
- (e[Z] && "length" in e[Z]
2328
- ? e[Z].length
2329
- : e[Y] && "length" in e[Y]
2330
- ? e[Y].length
2374
+ const f = e[ee] && t in e[ee] ? e[ee][t] : e[$] && t in e[$] ? e[$][t] : s;
2375
+ const l = n?.[J]?.[Z] ?? n;
2376
+ const c = Array.isArray(i) && t !== "length";
2377
+ const d = c ? parseInt(t) + 1 : 0;
2378
+ const h =
2379
+ c &&
2380
+ (e[ee] && "length" in e[ee]
2381
+ ? e[ee].length
2382
+ : e[$] && "length" in e[$]
2383
+ ? e[$].length
2331
2384
  : i.length);
2332
- const h = l && d > p ? d : undefined;
2333
- if (f === c && h === undefined) return true;
2334
- if (c !== undefined && c === s && h === undefined) delete e[u]?.[t];
2385
+ const p = c && d > h ? d : undefined;
2386
+ if (f === l && p === undefined) return true;
2387
+ if (l !== undefined && l === s && p === undefined) delete e[u]?.[t];
2335
2388
  else {
2336
2389
  const n = e[u] || (e[u] = Object.create(null));
2337
- n[t] = c;
2338
- if (h !== undefined) n.length = h;
2390
+ n[t] = l;
2391
+ if (p !== undefined) n.length = p;
2339
2392
  }
2340
- const g = isWrappable(c);
2341
- e[ee]?.[t] && setSignal(e[ee][t], true);
2342
- const y = getNodes(e, $);
2343
- y[t] && setSignal(y[t], () => (g ? wrap(c, e) : c));
2393
+ const g = isWrappable(l);
2394
+ e[ne]?.[t] && setSignal(e[ne][t], true);
2395
+ const y = getNodes(e, te);
2396
+ y[t] && setSignal(y[t], () => (g ? wrap(l, e) : l));
2344
2397
  if (Array.isArray(i)) {
2345
- const e = t === "length" ? c : h;
2398
+ const e = t === "length" ? l : p;
2346
2399
  e !== undefined && y.length && setSignal(y.length, e);
2347
2400
  }
2348
- y[K] && setSignal(y[K], undefined);
2401
+ y[U] && setSignal(y[U], undefined);
2402
+ if (false);
2349
2403
  });
2350
2404
  }
2351
2405
  return true;
2352
2406
  },
2353
2407
  deleteProperty(e, t) {
2354
- const n = e[Z]?.[t] === J;
2355
- const r = e[Y]?.[t] === J;
2356
- if (writeOnly(e[U]) && !n && !r) {
2408
+ const n = e[ee]?.[t] === Y;
2409
+ const r = e[$]?.[t] === Y;
2410
+ if (writeOnly(e[X]) && !n && !r) {
2357
2411
  untrack(() => {
2358
- const n = e[ie] && !C;
2359
- const r = n ? Z : Y;
2360
- if (n) trackOptimisticStore(e[U]);
2361
- const i = e[Z] && t in e[Z] ? e[Z][t] : e[Y] && t in e[Y] ? e[Y][t] : e[X][t];
2362
- if (t in e[X] || (e[Y] && t in e[Y])) {
2363
- (e[r] || (e[r] = Object.create(null)))[t] = J;
2412
+ const n = e[oe] && !N;
2413
+ const r = n ? ee : $;
2414
+ if (n) trackOptimisticStore(e[X]);
2415
+ const i = e[ee] && t in e[ee] ? e[ee][t] : e[$] && t in e[$] ? e[$][t] : e[Z][t];
2416
+ if (t in e[Z] || (e[$] && t in e[$])) {
2417
+ (e[r] || (e[r] = Object.create(null)))[t] = Y;
2364
2418
  } else if (e[r] && t in e[r]) {
2365
2419
  delete e[r][t];
2366
2420
  } else return true;
2367
- if (e[ee]?.[t]) setSignal(e[ee][t], false);
2368
- const s = getNodes(e, $);
2421
+ if (e[ne]?.[t]) setSignal(e[ne][t], false);
2422
+ const s = getNodes(e, te);
2369
2423
  s[t] && setSignal(s[t], undefined);
2370
- s[K] && setSignal(s[K], undefined);
2424
+ s[U] && setSignal(s[U], undefined);
2371
2425
  });
2372
2426
  }
2373
2427
  return true;
2374
2428
  },
2375
2429
  ownKeys(e) {
2376
2430
  trackSelf(e);
2377
- let t = getKeys(e[X], e[Y], false);
2378
- if (e[Z]) {
2431
+ let t = getKeys(e[Z], e[$], false);
2432
+ if (e[ee]) {
2379
2433
  const n = new Set(t);
2380
- for (const t of Reflect.ownKeys(e[Z])) {
2381
- if (e[Z][t] !== J) n.add(t);
2434
+ for (const t of Reflect.ownKeys(e[ee])) {
2435
+ if (e[ee][t] !== Y) n.add(t);
2382
2436
  else n.delete(t);
2383
2437
  }
2384
2438
  t = Array.from(n);
@@ -2386,25 +2440,25 @@ const fe = {
2386
2440
  return t;
2387
2441
  },
2388
2442
  getOwnPropertyDescriptor(e, t) {
2389
- if (t === U) return { value: e[U], writable: true, configurable: true };
2390
- if (e[Z] && t in e[Z]) {
2391
- if (e[Z][t] === J) return undefined;
2392
- const n = getPropertyDescriptor(e[X], e[Y], t);
2443
+ if (t === X) return { value: e[X], writable: true, configurable: true };
2444
+ if (e[ee] && t in e[ee]) {
2445
+ if (e[ee][t] === Y) return undefined;
2446
+ const n = getPropertyDescriptor(e[Z], e[$], t);
2393
2447
  if (n) {
2394
- return { ...n, value: e[Z][t] };
2448
+ return { ...n, value: e[ee][t] };
2395
2449
  }
2396
- return { value: e[Z][t], writable: true, enumerable: true, configurable: true };
2450
+ return { value: e[ee][t], writable: true, enumerable: true, configurable: true };
2397
2451
  }
2398
- return getPropertyDescriptor(e[X], e[Y], t);
2452
+ return getPropertyDescriptor(e[Z], e[$], t);
2399
2453
  },
2400
2454
  getPrototypeOf(e) {
2401
- return Object.getPrototypeOf(e[X]);
2455
+ return Object.getPrototypeOf(e[Z]);
2402
2456
  }
2403
2457
  };
2404
2458
  function storeSetter(e, t) {
2405
- const n = ue;
2406
- ue = new Set();
2407
- ue.add(e);
2459
+ const n = le;
2460
+ le = new Set();
2461
+ le.add(e);
2408
2462
  try {
2409
2463
  const n = t(e);
2410
2464
  if (n !== e && n !== undefined) {
@@ -2420,8 +2474,8 @@ function storeSetter(e, t) {
2420
2474
  }
2421
2475
  }
2422
2476
  } finally {
2423
- ue.clear();
2424
- ue = n;
2477
+ le.clear();
2478
+ le = n;
2425
2479
  }
2426
2480
  }
2427
2481
  function createStore(e, t, n) {
@@ -2430,7 +2484,7 @@ function createStore(e, t, n) {
2430
2484
  return [i, e => storeSetter(i, e)];
2431
2485
  }
2432
2486
  function createOptimisticStore(e, t, n) {
2433
- GlobalQueue.fe ||= clearOptimisticStore;
2487
+ GlobalQueue.ae ||= clearOptimisticStore;
2434
2488
  const r = typeof e === "function";
2435
2489
  const i = (r ? t : e) ?? {};
2436
2490
  const s = r ? e : undefined;
@@ -2438,39 +2492,39 @@ function createOptimisticStore(e, t, n) {
2438
2492
  return [o, e => storeSetter(o, e)];
2439
2493
  }
2440
2494
  function clearOptimisticStore(e) {
2441
- const t = e[z];
2442
- if (!t || !t[Z]) return;
2443
- const n = t[Z];
2444
- const r = t[$];
2495
+ const t = e[J];
2496
+ if (!t || !t[ee]) return;
2497
+ const n = t[ee];
2498
+ const r = t[te];
2445
2499
  setProjectionWriteActive(true);
2446
2500
  try {
2447
2501
  if (r) {
2448
2502
  for (const e of Reflect.ownKeys(n)) {
2449
2503
  if (r[e]) {
2450
- r[e].Y = undefined;
2451
- const n = t[Y] && e in t[Y] ? t[Y][e] : t[X][e];
2452
- const i = n === J ? undefined : n;
2504
+ r[e].ee = undefined;
2505
+ const n = t[$] && e in t[$] ? t[$][e] : t[Z][e];
2506
+ const i = n === Y ? undefined : n;
2453
2507
  setSignal(r[e], isWrappable(i) ? wrap(i, t) : i);
2454
2508
  }
2455
2509
  }
2456
- if (r[K]) {
2457
- r[K].Y = undefined;
2458
- setSignal(r[K], undefined);
2510
+ if (r[U]) {
2511
+ r[U].ee = undefined;
2512
+ setSignal(r[U], undefined);
2459
2513
  }
2460
2514
  }
2461
2515
  } finally {
2462
2516
  setProjectionWriteActive(false);
2463
2517
  }
2464
- delete t[Z];
2518
+ delete t[ee];
2465
2519
  }
2466
2520
  function createOptimisticProjectionInternal(e, t = {}, n) {
2467
2521
  let r;
2468
2522
  const i = new WeakMap();
2469
2523
  const wrapper = e => {
2470
- e[te] = wrapProjection;
2471
- e[ne] = i;
2472
- e[ie] = true;
2473
- Object.defineProperty(e, re, {
2524
+ e[re] = wrapProjection;
2525
+ e[ie] = i;
2526
+ e[oe] = true;
2527
+ Object.defineProperty(e, se, {
2474
2528
  get() {
2475
2529
  return r;
2476
2530
  },
@@ -2479,8 +2533,8 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
2479
2533
  };
2480
2534
  const wrapProjection = e => {
2481
2535
  if (i.has(e)) return i.get(e);
2482
- if (e[z]?.[te] === wrapProjection) return e;
2483
- const t = createStoreProxy(e, fe, wrapper);
2536
+ if (e[J]?.[re] === wrapProjection) return e;
2537
+ const t = createStoreProxy(e, ce, wrapper);
2484
2538
  i.set(e, t);
2485
2539
  return t;
2486
2540
  };
@@ -2513,11 +2567,11 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
2513
2567
  setProjectionWriteActive(false);
2514
2568
  }
2515
2569
  });
2516
- r._e = true;
2570
+ r.Pe = true;
2517
2571
  }
2518
2572
  return { store: s, node: r };
2519
2573
  }
2520
- const ce = Symbol(0);
2574
+ const ae = Symbol(0);
2521
2575
  function updatePath(e, t, n = 0) {
2522
2576
  let r,
2523
2577
  i = e;
@@ -2561,7 +2615,7 @@ function updatePath(e, t, n = 0) {
2561
2615
  if (s === i) return;
2562
2616
  }
2563
2617
  if (r === undefined && s == undefined) return;
2564
- if (s === ce) {
2618
+ if (s === ae) {
2565
2619
  delete e[r];
2566
2620
  } else if (r === undefined || (isWrappable(i) && isWrappable(s) && !Array.isArray(s))) {
2567
2621
  const t = r !== undefined ? e[r] : e;
@@ -2571,50 +2625,50 @@ function updatePath(e, t, n = 0) {
2571
2625
  e[r] = s;
2572
2626
  }
2573
2627
  }
2574
- const le = Object.assign(
2628
+ const de = Object.assign(
2575
2629
  function storePath(...e) {
2576
2630
  return t => {
2577
2631
  updatePath(t, e);
2578
2632
  };
2579
2633
  },
2580
- { DELETE: ce }
2634
+ { DELETE: ae }
2581
2635
  );
2582
2636
  function snapshotImpl(e, t, n, r) {
2583
- let i, s, o, u, f, c;
2637
+ let i, s, o, u, f, l;
2584
2638
  if (!isWrappable(e)) return e;
2585
2639
  if (n && n.has(e)) return n.get(e);
2586
2640
  if (!n) n = new Map();
2587
- if ((i = e[z] || r?.get(e)?.[z])) {
2588
- if (t) trackSelf(i, K);
2589
- o = i[Y];
2590
- s = Array.isArray(i[X]);
2591
- n.set(e, o ? (u = s ? [] : Object.create(Object.getPrototypeOf(i[X]))) : i[X]);
2592
- e = i[X];
2593
- r = se;
2641
+ if ((i = e[J] || r?.get(e)?.[J])) {
2642
+ if (t) trackSelf(i, U);
2643
+ o = i[$];
2644
+ s = Array.isArray(i[Z]);
2645
+ n.set(e, o ? (u = s ? [] : Object.create(Object.getPrototypeOf(i[Z]))) : i[Z]);
2646
+ e = i[Z];
2647
+ r = ue;
2594
2648
  } else {
2595
2649
  s = Array.isArray(e);
2596
2650
  n.set(e, e);
2597
2651
  }
2598
2652
  if (s) {
2599
2653
  const s = o?.length || e.length;
2600
- for (let l = 0; l < s; l++) {
2601
- c = o && l in o ? o[l] : e[l];
2602
- if (c === J) continue;
2603
- if (t && isWrappable(c)) wrap(c, i);
2604
- if ((f = snapshotImpl(c, t, n, r)) !== c || u) {
2654
+ for (let c = 0; c < s; c++) {
2655
+ l = o && c in o ? o[c] : e[c];
2656
+ if (l === Y) continue;
2657
+ if (t && isWrappable(l)) wrap(l, i);
2658
+ if ((f = snapshotImpl(l, t, n, r)) !== l || u) {
2605
2659
  if (!u) n.set(e, (u = [...e]));
2606
- u[l] = f;
2660
+ u[c] = f;
2607
2661
  }
2608
2662
  }
2609
2663
  } else {
2610
2664
  const s = getKeys(e, o);
2611
- for (let l = 0, a = s.length; l < a; l++) {
2612
- let a = s[l];
2665
+ for (let c = 0, a = s.length; c < a; c++) {
2666
+ let a = s[c];
2613
2667
  const d = getPropertyDescriptor(e, o, a);
2614
2668
  if (d.get) continue;
2615
- c = o && a in o ? o[a] : e[a];
2616
- if (t && isWrappable(c)) wrap(c, i);
2617
- if ((f = snapshotImpl(c, t, n, r)) !== e[a] || u) {
2669
+ l = o && a in o ? o[a] : e[a];
2670
+ if (t && isWrappable(l)) wrap(l, i);
2671
+ if ((f = snapshotImpl(l, t, n, r)) !== e[a] || u) {
2618
2672
  if (!u) {
2619
2673
  u = Object.create(Object.getPrototypeOf(e));
2620
2674
  Object.assign(u, e);
@@ -2634,13 +2688,13 @@ function deep(e) {
2634
2688
  function trueFn() {
2635
2689
  return true;
2636
2690
  }
2637
- const ae = {
2691
+ const he = {
2638
2692
  get(e, t, n) {
2639
- if (t === U) return n;
2693
+ if (t === X) return n;
2640
2694
  return e.get(t);
2641
2695
  },
2642
2696
  has(e, t) {
2643
- if (t === U) return true;
2697
+ if (t === X) return true;
2644
2698
  return e.has(t);
2645
2699
  },
2646
2700
  set: trueFn,
@@ -2663,23 +2717,23 @@ const ae = {
2663
2717
  function resolveSource(e) {
2664
2718
  return !(e = typeof e === "function" ? e() : e) ? {} : e;
2665
2719
  }
2666
- const de = Symbol(0);
2720
+ const pe = Symbol(0);
2667
2721
  function merge(...e) {
2668
2722
  if (e.length === 1 && typeof e[0] !== "function") return e[0];
2669
2723
  let t = false;
2670
2724
  const n = [];
2671
2725
  for (let r = 0; r < e.length; r++) {
2672
2726
  const i = e[r];
2673
- t = t || (!!i && U in i);
2674
- const s = !!i && i[de];
2727
+ t = t || (!!i && X in i);
2728
+ const s = !!i && i[pe];
2675
2729
  if (s) n.push(...s);
2676
2730
  else n.push(typeof i === "function" ? ((t = true), createMemo(i)) : i);
2677
2731
  }
2678
- if (b && t) {
2732
+ if (_ && t) {
2679
2733
  return new Proxy(
2680
2734
  {
2681
2735
  get(e) {
2682
- if (e === de) return n;
2736
+ if (e === pe) return n;
2683
2737
  for (let t = n.length - 1; t >= 0; t--) {
2684
2738
  const r = resolveSource(n[t]);
2685
2739
  if (e in r) return r[e];
@@ -2697,7 +2751,7 @@ function merge(...e) {
2697
2751
  return [...new Set(e)];
2698
2752
  }
2699
2753
  },
2700
- ae
2754
+ he
2701
2755
  );
2702
2756
  }
2703
2757
  const r = Object.create(null);
@@ -2729,12 +2783,12 @@ function merge(...e) {
2729
2783
  if (n.get) Object.defineProperty(o, t, n);
2730
2784
  else o[t] = n.value;
2731
2785
  }
2732
- o[de] = n;
2786
+ o[pe] = n;
2733
2787
  return o;
2734
2788
  }
2735
2789
  function omit(e, ...t) {
2736
2790
  const n = new Set(t);
2737
- if (b && U in e) {
2791
+ if (_ && X in e) {
2738
2792
  return new Proxy(
2739
2793
  {
2740
2794
  get(t) {
@@ -2747,7 +2801,7 @@ function omit(e, ...t) {
2747
2801
  return Object.keys(e).filter(e => !n.has(e));
2748
2802
  }
2749
2803
  },
2750
- ae
2804
+ he
2751
2805
  );
2752
2806
  }
2753
2807
  const r = {};
@@ -2767,317 +2821,450 @@ function mapArray(e, t, n) {
2767
2821
  const s = t;
2768
2822
  return createMemo(
2769
2823
  updateKeyedMap.bind({
2770
- ze: createOwner(),
2771
- Ue: 0,
2772
- Je: e,
2773
- Xe: [],
2774
- Ye: s,
2775
- Ze: [],
2824
+ Ue: createOwner(),
2825
+ Je: 0,
2826
+ Xe: e,
2827
+ Ye: [],
2828
+ Ze: s,
2776
2829
  $e: [],
2777
- et: r,
2778
- tt: r || n?.keyed === false ? [] : undefined,
2779
- nt: i ? [] : undefined,
2780
- rt: n?.fallback
2830
+ et: [],
2831
+ tt: r,
2832
+ nt: r || n?.keyed === false ? [] : undefined,
2833
+ rt: i ? [] : undefined,
2834
+ it: n?.fallback
2781
2835
  })
2782
2836
  );
2783
2837
  }
2784
- const pe = { pureWrite: true };
2838
+ const ge = { pureWrite: true };
2785
2839
  function updateKeyedMap() {
2786
- const e = this.Je() || [],
2840
+ const e = this.Xe() || [],
2787
2841
  t = e.length;
2788
- e[K];
2789
- runWithOwner(this.ze, () => {
2842
+ e[U];
2843
+ runWithOwner(this.Ue, () => {
2790
2844
  let n,
2791
2845
  r,
2792
- i = this.tt
2846
+ i = this.nt
2793
2847
  ? () => {
2794
- this.tt[r] = signal(e[r], pe);
2795
- this.nt && (this.nt[r] = signal(r, pe));
2796
- return this.Ye(accessor(this.tt[r]), this.nt ? accessor(this.nt[r]) : undefined);
2848
+ this.nt[r] = signal(e[r], ge);
2849
+ this.rt && (this.rt[r] = signal(r, ge));
2850
+ return this.Ze(accessor(this.nt[r]), this.rt ? accessor(this.rt[r]) : undefined);
2797
2851
  }
2798
- : this.nt
2852
+ : this.rt
2799
2853
  ? () => {
2800
2854
  const t = e[r];
2801
- this.nt[r] = signal(r, pe);
2802
- return this.Ye(() => t, accessor(this.nt[r]));
2855
+ this.rt[r] = signal(r, ge);
2856
+ return this.Ze(() => t, accessor(this.rt[r]));
2803
2857
  }
2804
2858
  : () => {
2805
2859
  const t = e[r];
2806
- return this.Ye(() => t);
2860
+ return this.Ze(() => t);
2807
2861
  };
2808
2862
  if (t === 0) {
2809
- if (this.Ue !== 0) {
2810
- this.ze.dispose(false);
2863
+ if (this.Je !== 0) {
2864
+ this.Ue.dispose(false);
2865
+ this.et = [];
2866
+ this.Ye = [];
2811
2867
  this.$e = [];
2812
- this.Xe = [];
2813
- this.Ze = [];
2814
- this.Ue = 0;
2815
- this.tt && (this.tt = []);
2868
+ this.Je = 0;
2816
2869
  this.nt && (this.nt = []);
2870
+ this.rt && (this.rt = []);
2817
2871
  }
2818
- if (this.rt && !this.Ze[0]) {
2819
- this.Ze[0] = runWithOwner((this.$e[0] = createOwner()), this.rt);
2872
+ if (this.it && !this.$e[0]) {
2873
+ this.$e[0] = runWithOwner((this.et[0] = createOwner()), this.it);
2820
2874
  }
2821
- } else if (this.Ue === 0) {
2822
- if (this.$e[0]) this.$e[0].dispose();
2823
- this.Ze = new Array(t);
2875
+ } else if (this.Je === 0) {
2876
+ if (this.et[0]) this.et[0].dispose();
2877
+ this.$e = new Array(t);
2824
2878
  for (r = 0; r < t; r++) {
2825
- this.Xe[r] = e[r];
2826
- this.Ze[r] = runWithOwner((this.$e[r] = createOwner()), i);
2879
+ this.Ye[r] = e[r];
2880
+ this.$e[r] = runWithOwner((this.et[r] = createOwner()), i);
2827
2881
  }
2828
- this.Ue = t;
2882
+ this.Je = t;
2829
2883
  } else {
2830
2884
  let s,
2831
2885
  o,
2832
2886
  u,
2833
2887
  f,
2834
- c,
2835
2888
  l,
2889
+ c,
2836
2890
  a,
2837
2891
  d = new Array(t),
2838
- p = new Array(t),
2839
- h = this.tt ? new Array(t) : undefined,
2840
- g = this.nt ? new Array(t) : undefined;
2892
+ h = new Array(t),
2893
+ p = this.nt ? new Array(t) : undefined,
2894
+ g = this.rt ? new Array(t) : undefined;
2841
2895
  for (
2842
- s = 0, o = Math.min(this.Ue, t);
2843
- s < o && (this.Xe[s] === e[s] || (this.tt && compare(this.et, this.Xe[s], e[s])));
2896
+ s = 0, o = Math.min(this.Je, t);
2897
+ s < o && (this.Ye[s] === e[s] || (this.nt && compare(this.tt, this.Ye[s], e[s])));
2844
2898
  s++
2845
2899
  ) {
2846
- if (this.tt) setSignal(this.tt[s], e[s]);
2900
+ if (this.nt) setSignal(this.nt[s], e[s]);
2847
2901
  }
2848
2902
  for (
2849
- o = this.Ue - 1, u = t - 1;
2903
+ o = this.Je - 1, u = t - 1;
2850
2904
  o >= s &&
2851
2905
  u >= s &&
2852
- (this.Xe[o] === e[u] || (this.tt && compare(this.et, this.Xe[o], e[u])));
2906
+ (this.Ye[o] === e[u] || (this.nt && compare(this.tt, this.Ye[o], e[u])));
2853
2907
  o--, u--
2854
2908
  ) {
2855
- d[u] = this.Ze[o];
2856
- p[u] = this.$e[o];
2857
- h && (h[u] = this.tt[o]);
2858
- g && (g[u] = this.nt[o]);
2909
+ d[u] = this.$e[o];
2910
+ h[u] = this.et[o];
2911
+ p && (p[u] = this.nt[o]);
2912
+ g && (g[u] = this.rt[o]);
2859
2913
  }
2860
- l = new Map();
2914
+ c = new Map();
2861
2915
  a = new Array(u + 1);
2862
2916
  for (r = u; r >= s; r--) {
2863
2917
  f = e[r];
2864
- c = this.et ? this.et(f) : f;
2865
- n = l.get(c);
2918
+ l = this.tt ? this.tt(f) : f;
2919
+ n = c.get(l);
2866
2920
  a[r] = n === undefined ? -1 : n;
2867
- l.set(c, r);
2921
+ c.set(l, r);
2868
2922
  }
2869
2923
  for (n = s; n <= o; n++) {
2870
- f = this.Xe[n];
2871
- c = this.et ? this.et(f) : f;
2872
- r = l.get(c);
2924
+ f = this.Ye[n];
2925
+ l = this.tt ? this.tt(f) : f;
2926
+ r = c.get(l);
2873
2927
  if (r !== undefined && r !== -1) {
2874
- d[r] = this.Ze[n];
2875
- p[r] = this.$e[n];
2876
- h && (h[r] = this.tt[n]);
2877
- g && (g[r] = this.nt[n]);
2928
+ d[r] = this.$e[n];
2929
+ h[r] = this.et[n];
2930
+ p && (p[r] = this.nt[n]);
2931
+ g && (g[r] = this.rt[n]);
2878
2932
  r = a[r];
2879
- l.set(c, r);
2880
- } else this.$e[n].dispose();
2933
+ c.set(l, r);
2934
+ } else this.et[n].dispose();
2881
2935
  }
2882
2936
  for (r = s; r < t; r++) {
2883
2937
  if (r in d) {
2884
- this.Ze[r] = d[r];
2885
- this.$e[r] = p[r];
2886
- if (h) {
2887
- this.tt[r] = h[r];
2888
- setSignal(this.tt[r], e[r]);
2938
+ this.$e[r] = d[r];
2939
+ this.et[r] = h[r];
2940
+ if (p) {
2941
+ this.nt[r] = p[r];
2942
+ setSignal(this.nt[r], e[r]);
2889
2943
  }
2890
2944
  if (g) {
2891
- this.nt[r] = g[r];
2892
- setSignal(this.nt[r], r);
2945
+ this.rt[r] = g[r];
2946
+ setSignal(this.rt[r], r);
2893
2947
  }
2894
2948
  } else {
2895
- this.Ze[r] = runWithOwner((this.$e[r] = createOwner()), i);
2949
+ this.$e[r] = runWithOwner((this.et[r] = createOwner()), i);
2896
2950
  }
2897
2951
  }
2898
- this.Ze = this.Ze.slice(0, (this.Ue = t));
2899
- this.Xe = e.slice(0);
2952
+ this.$e = this.$e.slice(0, (this.Je = t));
2953
+ this.Ye = e.slice(0);
2900
2954
  }
2901
2955
  });
2902
- return this.Ze;
2956
+ return this.$e;
2903
2957
  }
2904
2958
  function repeat(e, t, n) {
2905
2959
  const r = t;
2906
2960
  return updateRepeat.bind({
2907
- ze: createOwner(),
2908
- Ue: 0,
2909
- it: 0,
2910
- st: e,
2911
- Ye: r,
2961
+ Ue: createOwner(),
2962
+ Je: 0,
2963
+ st: 0,
2964
+ ot: e,
2965
+ Ze: r,
2966
+ et: [],
2912
2967
  $e: [],
2913
- Ze: [],
2914
- ot: n?.from,
2915
- rt: n?.fallback
2968
+ ut: n?.from,
2969
+ it: n?.fallback
2916
2970
  });
2917
2971
  }
2918
2972
  function updateRepeat() {
2919
- const e = this.st();
2920
- const t = this.ot?.() || 0;
2921
- runWithOwner(this.ze, () => {
2973
+ const e = this.ot();
2974
+ const t = this.ut?.() || 0;
2975
+ runWithOwner(this.Ue, () => {
2922
2976
  if (e === 0) {
2923
- if (this.Ue !== 0) {
2924
- this.ze.dispose(false);
2977
+ if (this.Je !== 0) {
2978
+ this.Ue.dispose(false);
2979
+ this.et = [];
2925
2980
  this.$e = [];
2926
- this.Ze = [];
2927
- this.Ue = 0;
2981
+ this.Je = 0;
2928
2982
  }
2929
- if (this.rt && !this.Ze[0]) {
2930
- this.Ze[0] = runWithOwner((this.$e[0] = createOwner()), this.rt);
2983
+ if (this.it && !this.$e[0]) {
2984
+ this.$e[0] = runWithOwner((this.et[0] = createOwner()), this.it);
2931
2985
  }
2932
2986
  return;
2933
2987
  }
2934
2988
  const n = t + e;
2935
- const r = this.it + this.Ue;
2936
- if (this.Ue === 0 && this.$e[0]) this.$e[0].dispose();
2937
- for (let e = n; e < r; e++) this.$e[e - this.it].dispose();
2938
- if (this.it < t) {
2939
- let e = this.it;
2940
- while (e < t && e < this.Ue) this.$e[e++].dispose();
2941
- this.$e.splice(0, t - this.it);
2942
- this.Ze.splice(0, t - this.it);
2943
- } else if (this.it > t) {
2944
- let n = r - this.it - 1;
2945
- let i = this.it - t;
2946
- this.$e.length = this.Ze.length = e;
2989
+ const r = this.st + this.Je;
2990
+ if (this.Je === 0 && this.et[0]) this.et[0].dispose();
2991
+ for (let e = n; e < r; e++) this.et[e - this.st].dispose();
2992
+ if (this.st < t) {
2993
+ let e = this.st;
2994
+ while (e < t && e < this.Je) this.et[e++].dispose();
2995
+ this.et.splice(0, t - this.st);
2996
+ this.$e.splice(0, t - this.st);
2997
+ } else if (this.st > t) {
2998
+ let n = r - this.st - 1;
2999
+ let i = this.st - t;
3000
+ this.et.length = this.$e.length = e;
2947
3001
  while (n >= i) {
3002
+ this.et[n] = this.et[n - i];
2948
3003
  this.$e[n] = this.$e[n - i];
2949
- this.Ze[n] = this.Ze[n - i];
2950
3004
  n--;
2951
3005
  }
2952
3006
  for (let e = 0; e < i; e++) {
2953
- this.Ze[e] = runWithOwner((this.$e[e] = createOwner()), () => this.Ye(e + t));
3007
+ this.$e[e] = runWithOwner((this.et[e] = createOwner()), () => this.Ze(e + t));
2954
3008
  }
2955
3009
  }
2956
3010
  for (let e = r; e < n; e++) {
2957
- this.Ze[e - t] = runWithOwner((this.$e[e - t] = createOwner()), () => this.Ye(e));
3011
+ this.$e[e - t] = runWithOwner((this.et[e - t] = createOwner()), () => this.Ze(e));
2958
3012
  }
2959
- this.Ze = this.Ze.slice(0, e);
2960
- this.it = t;
2961
- this.Ue = e;
3013
+ this.$e = this.$e.slice(0, e);
3014
+ this.st = t;
3015
+ this.Je = e;
2962
3016
  });
2963
- return this.Ze;
3017
+ return this.$e;
2964
3018
  }
2965
3019
  function compare(e, t, n) {
2966
3020
  return e ? e(t) === e(n) : true;
2967
3021
  }
2968
3022
  function boundaryComputed(e, t) {
2969
3023
  const n = computed(e, undefined, { lazy: true });
2970
- n.Qe = (e, t) => {
2971
- const r = e !== undefined ? e : n.ge;
2972
- const i = t !== undefined ? t : n.ae;
2973
- n.ge &= ~n.ut;
2974
- n.V.notify(n, n.ut, r, i);
3024
+ n.qe = (e, t) => {
3025
+ const r = e !== undefined ? e : n.we;
3026
+ const i = t !== undefined ? t : n.pe;
3027
+ n.we &= ~n.ft;
3028
+ n.G.notify(n, n.ft, r, i);
2975
3029
  };
2976
- n.ut = t;
2977
- n._e = true;
3030
+ n.ft = t;
3031
+ n.Pe = true;
2978
3032
  recompute(n, true);
2979
3033
  return n;
2980
3034
  }
2981
3035
  function createBoundChildren(e, t, n, r) {
2982
- const i = e.V;
2983
- i.addChild((e.V = n));
2984
- cleanup(() => i.removeChild(e.V));
3036
+ const i = e.G;
3037
+ i.addChild((e.G = n));
3038
+ cleanup(() => i.removeChild(e.G));
2985
3039
  return runWithOwner(e, () => {
2986
3040
  const e = computed(t);
2987
3041
  return boundaryComputed(() => staleValues(() => flatten(read(e))), r);
2988
3042
  });
2989
3043
  }
2990
- const he = Symbol();
3044
+ const ye = Symbol();
3045
+ const Se = createContext(null);
3046
+ let we = false;
3047
+ const FALSE_ACCESSOR = () => false;
3048
+ function isRevealController(e) {
3049
+ return e instanceof RevealController;
3050
+ }
3051
+ function isSlotReady(e) {
3052
+ return isRevealController(e) ? e.isReady() : e.lt.size === 0 && !e.ct;
3053
+ }
3054
+ function setSlotState(e, t, n, r) {
3055
+ setSignal(e.dt, n);
3056
+ setSignal(e.ht, r);
3057
+ if (isRevealController(e)) {
3058
+ if (!n && e.gt === t) e.gt = undefined;
3059
+ return e.evaluate(n, r);
3060
+ }
3061
+ if (!n && e.yt === t && e.St) e.yt = undefined;
3062
+ }
3063
+ class RevealController {
3064
+ wt;
3065
+ _t;
3066
+ bt = [];
3067
+ gt;
3068
+ dt = signal(false, { pureWrite: true, Fe: true });
3069
+ ht = signal(false, { pureWrite: true, Fe: true });
3070
+ Ot = true;
3071
+ xt = false;
3072
+ constructor(e, t) {
3073
+ this.wt = e;
3074
+ this._t = t;
3075
+ }
3076
+ vt(e) {
3077
+ for (let t = 0; t < this.bt.length; t++) {
3078
+ const n = this.bt[t];
3079
+ if ((isRevealController(n) ? n.gt : n.yt) !== this) continue;
3080
+ if (e(n) === false) return false;
3081
+ }
3082
+ return true;
3083
+ }
3084
+ isReady() {
3085
+ return this.vt(isSlotReady);
3086
+ }
3087
+ register(e) {
3088
+ if (this.bt.includes(e)) return;
3089
+ this.bt.push(e);
3090
+ const t = !!untrack(this.wt);
3091
+ setSignal(e.dt, true), setSignal(e.ht, t ? false : !!untrack(this._t));
3092
+ untrack(() => this.evaluate());
3093
+ }
3094
+ unregister(e) {
3095
+ const t = this.bt.indexOf(e);
3096
+ if (t >= 0) this.bt.splice(t, 1);
3097
+ untrack(() => this.evaluate());
3098
+ }
3099
+ evaluate(e, t) {
3100
+ if (this.xt) return;
3101
+ this.xt = true;
3102
+ const n = this.Ot;
3103
+ try {
3104
+ const n = e ?? read(this.dt),
3105
+ r = !!untrack(this._t),
3106
+ i = t ?? r;
3107
+ if (n && i) this.vt(e => setSlotState(e, this, true, true));
3108
+ else if (!!untrack(this.wt)) {
3109
+ const e = this.isReady();
3110
+ this.vt(t => setSlotState(t, this, !e, false));
3111
+ } else {
3112
+ let e = false;
3113
+ this.vt(t => {
3114
+ if (e) return setSlotState(t, this, true, r);
3115
+ if (isSlotReady(t)) return setSlotState(t, this, false, false);
3116
+ e = true;
3117
+ setSlotState(t, this, true, false);
3118
+ });
3119
+ }
3120
+ } finally {
3121
+ this.Ot = this.isReady();
3122
+ this.xt = false;
3123
+ }
3124
+ if (this.gt && n !== this.Ot) this.gt.evaluate();
3125
+ }
3126
+ }
2991
3127
  class CollectionQueue extends Queue {
2992
- ft;
2993
- ct = new Set();
2994
- lt = signal(false, { pureWrite: true, De: true });
2995
- dt = false;
2996
- ht;
2997
- gt = he;
3128
+ Pt;
3129
+ lt = new Set();
3130
+ kt;
3131
+ ct = true;
3132
+ dt = signal(false, { pureWrite: true, Fe: true });
3133
+ ht = signal(false, { pureWrite: true, Fe: true });
3134
+ yt;
3135
+ St = false;
3136
+ Et;
3137
+ Ct = ye;
2998
3138
  constructor(e) {
2999
3139
  super();
3000
- this.ft = e;
3140
+ this.Pt = e;
3001
3141
  }
3002
3142
  run(e) {
3003
- if (!e || read(this.lt)) return;
3143
+ if (!e || (read(this.dt) && (!we || read(this.ht)))) return;
3004
3144
  return super.run(e);
3005
3145
  }
3006
3146
  notify(e, t, n, r) {
3007
- if (!(t & this.ft)) return super.notify(e, t, n, r);
3008
- if (this.dt && this.ht) {
3147
+ if (!(t & this.Pt)) return super.notify(e, t, n, r);
3148
+ if (this.St && this.Et) {
3009
3149
  const e = untrack(() => {
3010
3150
  try {
3011
- return this.ht();
3151
+ return this.Et();
3012
3152
  } catch {
3013
- return he;
3153
+ return ye;
3014
3154
  }
3015
3155
  });
3016
- if (e !== this.gt) {
3017
- this.gt = e;
3018
- this.dt = false;
3019
- this.ct.clear();
3156
+ if (e !== this.Ct) {
3157
+ this.Ct = e;
3158
+ this.St = false;
3159
+ this.lt.clear();
3020
3160
  }
3021
3161
  }
3022
- if (this.ft & a && this.dt) return super.notify(e, t, n, r);
3023
- if (this.ft & a && n & d) {
3162
+ if (this.Pt & a && this.St) return super.notify(e, t, n, r);
3163
+ if (this.Pt & a && n & d) {
3024
3164
  return super.notify(e, d, n, r);
3025
3165
  }
3026
- if (n & this.ft) {
3027
- const t = r?.source || e.ae?.source;
3166
+ if (n & this.Pt) {
3167
+ this.ct = true;
3168
+ const t = r?.source || e.pe?.source;
3028
3169
  if (t) {
3029
- const e = this.ct.size === 0;
3030
- this.ct.add(t);
3031
- if (e) setSignal(this.lt, true);
3170
+ const e = this.lt.size === 0;
3171
+ this.lt.add(t);
3172
+ if (e) setSignal(this.dt, true);
3032
3173
  }
3033
3174
  }
3034
- t &= ~this.ft;
3175
+ t &= ~this.Pt;
3035
3176
  return t ? super.notify(e, t, n, r) : true;
3036
3177
  }
3037
3178
  checkSources() {
3038
- for (const e of this.ct) {
3039
- if (e.m & u || (!(e.ge & this.ft) && !(this.ft & d && e.ge & a))) this.ct.delete(e);
3179
+ for (const e of this.lt) {
3180
+ if (e.m & u || (!(e.we & this.Pt) && !(this.Pt & d && e.we & a))) this.lt.delete(e);
3040
3181
  }
3041
- if (!this.ct.size) {
3042
- setSignal(this.lt, false);
3043
- if (this.ht) {
3044
- try {
3045
- this.gt = untrack(() => this.ht());
3046
- } catch {}
3182
+ if (!this.lt.size) {
3183
+ if (this.Pt & a && this.ct && !this.St && this.kt) {
3184
+ this.ct = !!(this.kt.we & this.Pt);
3185
+ } else {
3186
+ this.ct = false;
3187
+ }
3188
+ if (!this.ct) {
3189
+ setSignal(this.dt, false);
3190
+ if (this.Et) {
3191
+ try {
3192
+ this.Ct = untrack(() => this.Et());
3193
+ } catch {}
3194
+ }
3047
3195
  }
3048
3196
  }
3197
+ if (we) this.yt?.evaluate();
3049
3198
  }
3050
3199
  }
3051
3200
  function createCollectionBoundary(e, t, n, r) {
3052
3201
  const i = createOwner();
3202
+ if (we) setContext(Se, null, i);
3053
3203
  const s = new CollectionQueue(e);
3054
- if (r) s.ht = r;
3055
- const o = createBoundChildren(i, t, s, e);
3056
- const u = computed(() => {
3057
- if (!read(s.lt)) {
3204
+ if (r) s.Et = r;
3205
+ const o = (s.kt = createBoundChildren(i, t, s, e));
3206
+ untrack(() => {
3207
+ let t = false;
3208
+ try {
3209
+ read(o);
3210
+ } catch (e) {
3211
+ if (e instanceof NotReadyError) t = true;
3212
+ else throw e;
3213
+ }
3214
+ s.ct = t || !!(o.we & e) || o.pe instanceof NotReadyError;
3215
+ });
3216
+ const u = we && e === a ? getContext(Se) : null;
3217
+ if (u) {
3218
+ s.yt = u;
3219
+ u.register(s);
3220
+ cleanup(() => u.unregister(s));
3221
+ }
3222
+ const f = computed(() => {
3223
+ if (!read(s.dt)) {
3058
3224
  const e = read(o);
3059
- if (!untrack(() => read(s.lt))) {
3060
- s.dt = true;
3061
- return e;
3062
- }
3225
+ if (!untrack(() => read(s.dt))) return (s.St = true), e;
3063
3226
  }
3227
+ if (we && read(s.ht)) return undefined;
3064
3228
  return n(s);
3065
3229
  });
3066
- return accessor(u);
3230
+ return accessor(f);
3067
3231
  }
3068
3232
  function createLoadingBoundary(e, t, n) {
3069
3233
  return createCollectionBoundary(a, e, () => t(), n?.on);
3070
3234
  }
3071
3235
  function createErrorBoundary(e, t) {
3072
3236
  return createCollectionBoundary(d, e, e => {
3073
- let n = e.ct.values().next().value;
3074
- const r = n.ae?.cause ?? n.ae;
3237
+ let n = e.lt.values().next().value;
3238
+ const r = n.pe?.cause ?? n.pe;
3075
3239
  return t(r, () => {
3076
- for (const t of e.ct) recompute(t);
3240
+ for (const t of e.lt) recompute(t);
3077
3241
  schedule();
3078
3242
  });
3079
3243
  });
3080
3244
  }
3245
+ function createRevealOrder(e, t) {
3246
+ we = true;
3247
+ const n = createOwner();
3248
+ const r = getContext(Se);
3249
+ const i = t?.together || FALSE_ACCESSOR,
3250
+ s = t?.collapsed || FALSE_ACCESSOR;
3251
+ const o = new RevealController(i, s);
3252
+ setContext(Se, o, n);
3253
+ return runWithOwner(n, () => {
3254
+ const t = e();
3255
+ computed(() => {
3256
+ i();
3257
+ s();
3258
+ o.evaluate();
3259
+ });
3260
+ if (r) {
3261
+ o.gt = r;
3262
+ r.register(o);
3263
+ cleanup(() => r.unregister(o));
3264
+ }
3265
+ return t;
3266
+ });
3267
+ }
3081
3268
  function flatten(e, t) {
3082
3269
  if (typeof e === "function" && !e.length) {
3083
3270
  if (t?.doNotUnwrap) return e;
@@ -3127,14 +3314,15 @@ function flattenArray(e, t = [], n) {
3127
3314
  if (r) throw r;
3128
3315
  return i;
3129
3316
  }
3130
- exports.$PROXY = U;
3131
- exports.$REFRESH = _;
3132
- exports.$TARGET = z;
3133
- exports.$TRACK = K;
3317
+ exports.$PROXY = X;
3318
+ exports.$REFRESH = O;
3319
+ exports.$TARGET = J;
3320
+ exports.$TRACK = U;
3134
3321
  exports.ContextNotFoundError = ContextNotFoundError;
3322
+ exports.DEV = v;
3135
3323
  exports.NoOwnerError = NoOwnerError;
3136
3324
  exports.NotReadyError = NotReadyError;
3137
- exports.SUPPORTS_PROXY = b;
3325
+ exports.SUPPORTS_PROXY = _;
3138
3326
  exports.action = action;
3139
3327
  exports.clearSnapshots = clearSnapshots;
3140
3328
  exports.createContext = createContext;
@@ -3148,6 +3336,7 @@ exports.createOwner = createOwner;
3148
3336
  exports.createProjection = createProjection;
3149
3337
  exports.createReaction = createReaction;
3150
3338
  exports.createRenderEffect = createRenderEffect;
3339
+ exports.createRevealOrder = createRevealOrder;
3151
3340
  exports.createRoot = createRoot;
3152
3341
  exports.createSignal = createSignal;
3153
3342
  exports.createStore = createStore;
@@ -3183,5 +3372,5 @@ exports.runWithOwner = runWithOwner;
3183
3372
  exports.setContext = setContext;
3184
3373
  exports.setSnapshotCapture = setSnapshotCapture;
3185
3374
  exports.snapshot = snapshot;
3186
- exports.storePath = le;
3375
+ exports.storePath = de;
3187
3376
  exports.untrack = untrack;