@solidjs/signals 2.0.0-beta.13 → 2.0.0-beta.14
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/README.md +2 -3
- package/dist/dev.js +81 -23
- package/dist/node.cjs +712 -665
- package/dist/prod.js +481 -434
- package/dist/types/core/core.d.ts +4 -8
- package/dist/types/store/index.d.ts +1 -1
- package/dist/types/store/store.d.ts +6 -2
- package/dist/types-cjs/core/core.d.cts +4 -8
- package/dist/types-cjs/store/index.d.cts +1 -1
- package/dist/types-cjs/store/store.d.cts +6 -2
- package/package.json +1 -1
package/dist/node.cjs
CHANGED
|
@@ -31,26 +31,26 @@ const i = 1 << 3;
|
|
|
31
31
|
const s = 1 << 4;
|
|
32
32
|
const o = 1 << 5;
|
|
33
33
|
const u = 1 << 6;
|
|
34
|
-
const
|
|
35
|
-
const
|
|
34
|
+
const f = 1 << 7;
|
|
35
|
+
const l = 1 << 8;
|
|
36
36
|
const c = 1 << 9;
|
|
37
37
|
const a = 1 << 10;
|
|
38
38
|
const d = 1 << 0;
|
|
39
39
|
const p = 1 << 1;
|
|
40
40
|
const h = 1 << 2;
|
|
41
|
-
const
|
|
41
|
+
const y = 1 << 3;
|
|
42
42
|
const S = 1 << 4;
|
|
43
|
-
const
|
|
43
|
+
const g = 1 << 5;
|
|
44
44
|
const w = 1 << 6;
|
|
45
|
-
const
|
|
46
|
-
const
|
|
45
|
+
const _ = 1 << 0;
|
|
46
|
+
const m = 1 << 1;
|
|
47
47
|
const b = 1 << 2;
|
|
48
48
|
const O = 1;
|
|
49
49
|
const v = 2;
|
|
50
50
|
const P = 3;
|
|
51
51
|
const x = {};
|
|
52
|
-
const
|
|
53
|
-
const
|
|
52
|
+
const N = {};
|
|
53
|
+
const C = "sp";
|
|
54
54
|
const E = typeof Proxy === "function";
|
|
55
55
|
const k = {};
|
|
56
56
|
const j = Symbol("refresh");
|
|
@@ -79,23 +79,23 @@ function actualInsertIntoHeap(e, t) {
|
|
|
79
79
|
if (r > t.S) t.S = r;
|
|
80
80
|
}
|
|
81
81
|
function insertIntoHeap(e, o) {
|
|
82
|
-
let u = e.
|
|
82
|
+
let u = e._;
|
|
83
83
|
if (u & (i | r | a)) return;
|
|
84
84
|
if (u & t) {
|
|
85
|
-
e.
|
|
86
|
-
} else e.
|
|
85
|
+
e._ = (u & -4) | n | i;
|
|
86
|
+
} else e._ = u | i;
|
|
87
87
|
if (!(u & s)) actualInsertIntoHeap(e, o);
|
|
88
88
|
}
|
|
89
89
|
function insertIntoHeapHeight(e, t) {
|
|
90
|
-
let n = e.
|
|
90
|
+
let n = e._;
|
|
91
91
|
if (n & (i | r | s | a)) return;
|
|
92
|
-
e.
|
|
92
|
+
e._ = n | s;
|
|
93
93
|
actualInsertIntoHeap(e, t);
|
|
94
94
|
}
|
|
95
95
|
function deleteFromHeap(e, t) {
|
|
96
|
-
const n = e.
|
|
96
|
+
const n = e._;
|
|
97
97
|
if (!(n & (i | s))) return;
|
|
98
|
-
e.
|
|
98
|
+
e._ = n & -25;
|
|
99
99
|
const r = e.o;
|
|
100
100
|
if (e.p === e) t.l[r] = undefined;
|
|
101
101
|
else {
|
|
@@ -110,35 +110,35 @@ function deleteFromHeap(e, t) {
|
|
|
110
110
|
e.h = undefined;
|
|
111
111
|
}
|
|
112
112
|
function markHeap(e) {
|
|
113
|
-
if (e.
|
|
114
|
-
e.
|
|
113
|
+
if (e.m) return;
|
|
114
|
+
e.m = true;
|
|
115
115
|
for (let t = 0; t <= e.S; t++) {
|
|
116
116
|
for (let n = e.l[t]; n !== undefined; n = n.h) {
|
|
117
|
-
if (n.
|
|
117
|
+
if (n._ & i) markNode(n);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
function markNode(e, r = n) {
|
|
122
|
-
const i = e.
|
|
122
|
+
const i = e._;
|
|
123
123
|
if ((i & (t | n)) >= r) return;
|
|
124
|
-
e.
|
|
124
|
+
e._ = (i & -4) | r;
|
|
125
125
|
for (let n = e.O; n !== null; n = n.P) {
|
|
126
|
-
markNode(n.
|
|
126
|
+
markNode(n.N, t);
|
|
127
127
|
}
|
|
128
|
-
if (e.
|
|
129
|
-
for (let n = e.
|
|
128
|
+
if (e.C !== null) {
|
|
129
|
+
for (let n = e.C; n !== null; n = n.k) {
|
|
130
130
|
for (let e = n.O; e !== null; e = e.P) {
|
|
131
|
-
markNode(e.
|
|
131
|
+
markNode(e.N, t);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
function runHeap(e, t) {
|
|
137
|
-
e.
|
|
137
|
+
e.m = false;
|
|
138
138
|
for (e.j = 0; e.j <= e.S; e.j++) {
|
|
139
139
|
let n = e.l[e.j];
|
|
140
140
|
while (n !== undefined) {
|
|
141
|
-
if (n.
|
|
141
|
+
if (n._ & i) t(n);
|
|
142
142
|
else adjustHeight(n, e);
|
|
143
143
|
n = e.l[e.j];
|
|
144
144
|
}
|
|
@@ -156,7 +156,7 @@ function adjustHeight(e, t) {
|
|
|
156
156
|
if (e.o !== n) {
|
|
157
157
|
e.o = n;
|
|
158
158
|
for (let n = e.O; n !== null; n = n.P) {
|
|
159
|
-
insertIntoHeapHeight(n.
|
|
159
|
+
insertIntoHeapHeight(n.N, t);
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
}
|
|
@@ -225,8 +225,8 @@ function assignOrMergeLane(e, t) {
|
|
|
225
225
|
e.H = t;
|
|
226
226
|
}
|
|
227
227
|
const H = new Set();
|
|
228
|
-
const q = { l: new Array(2e3).fill(undefined),
|
|
229
|
-
const Q = { l: new Array(2e3).fill(undefined),
|
|
228
|
+
const q = { l: new Array(2e3).fill(undefined), m: false, j: 0, S: 0 };
|
|
229
|
+
const Q = { l: new Array(2e3).fill(undefined), m: false, j: 0, S: 0 };
|
|
230
230
|
let F = 0;
|
|
231
231
|
let M = null;
|
|
232
232
|
let D = false;
|
|
@@ -242,8 +242,8 @@ function canUseSimpleSyncFlush(e) {
|
|
|
242
242
|
H.size === 0 &&
|
|
243
243
|
T.size === 0 &&
|
|
244
244
|
e.U.length === 0 &&
|
|
245
|
-
e
|
|
246
|
-
e.
|
|
245
|
+
e.$.length === 0 &&
|
|
246
|
+
e.J.size === 0 &&
|
|
247
247
|
G.size === 0
|
|
248
248
|
);
|
|
249
249
|
}
|
|
@@ -254,10 +254,10 @@ function sweepTransientStoreNodes() {
|
|
|
254
254
|
G.delete(e);
|
|
255
255
|
continue;
|
|
256
256
|
}
|
|
257
|
-
if (e.
|
|
257
|
+
if (e.X !== x) continue;
|
|
258
258
|
if (e.G !== undefined && e.G !== x) continue;
|
|
259
259
|
G.delete(e);
|
|
260
|
-
e.
|
|
260
|
+
e.Y?.();
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
function enforceLoadingBoundary(e) {}
|
|
@@ -276,16 +276,16 @@ function runLaneEffects(e) {
|
|
|
276
276
|
}
|
|
277
277
|
function queueStashedOptimisticEffects(e) {
|
|
278
278
|
for (let t = e.O; t !== null; t = t.P) {
|
|
279
|
-
const e = t.
|
|
280
|
-
if (!e
|
|
281
|
-
if (e
|
|
279
|
+
const e = t.N;
|
|
280
|
+
if (!e.Z) continue;
|
|
281
|
+
if (e.Z === P) {
|
|
282
282
|
if (!e.ee) {
|
|
283
283
|
e.ee = true;
|
|
284
284
|
e.te.enqueue(v, e.ne);
|
|
285
285
|
}
|
|
286
286
|
continue;
|
|
287
287
|
}
|
|
288
|
-
const n = e.
|
|
288
|
+
const n = e._ & o ? Q : q;
|
|
289
289
|
if (n.j > e.o) n.j = e.o;
|
|
290
290
|
insertIntoHeap(e, n);
|
|
291
291
|
}
|
|
@@ -297,8 +297,8 @@ function mergeTransitionState(e, t) {
|
|
|
297
297
|
t.re = e;
|
|
298
298
|
e.ie.push(...t.ie);
|
|
299
299
|
for (const n of T) if (n.V === t) n.V = e;
|
|
300
|
-
e
|
|
301
|
-
for (const n of t.
|
|
300
|
+
e.$.push(...t.$);
|
|
301
|
+
for (const n of t.J) e.J.add(n);
|
|
302
302
|
for (const [n, r] of t.se) {
|
|
303
303
|
let t = e.se.get(n);
|
|
304
304
|
if (!t) e.se.set(n, (t = new Set()));
|
|
@@ -310,9 +310,9 @@ function resolveOptimisticNodes(e) {
|
|
|
310
310
|
for (let t = 0; t < e.length; t++) {
|
|
311
311
|
const n = e[t];
|
|
312
312
|
n.H = undefined;
|
|
313
|
-
if (n.
|
|
314
|
-
n.ue = n.
|
|
315
|
-
n.
|
|
313
|
+
if (n.X !== x) {
|
|
314
|
+
n.ue = n.X;
|
|
315
|
+
n.X = x;
|
|
316
316
|
}
|
|
317
317
|
const r = n.G;
|
|
318
318
|
n.G = x;
|
|
@@ -340,11 +340,11 @@ function cleanupCompletedLanes(e) {
|
|
|
340
340
|
function schedule() {
|
|
341
341
|
if (D) return;
|
|
342
342
|
D = true;
|
|
343
|
-
if (!V && !z.
|
|
343
|
+
if (!V && !z.fe && !K) queueMicrotask(flush);
|
|
344
344
|
}
|
|
345
345
|
class Queue {
|
|
346
346
|
i = null;
|
|
347
|
-
|
|
347
|
+
le = [[], []];
|
|
348
348
|
U = [];
|
|
349
349
|
created = F;
|
|
350
350
|
addChild(e) {
|
|
@@ -363,9 +363,9 @@ class Queue {
|
|
|
363
363
|
return false;
|
|
364
364
|
}
|
|
365
365
|
run(e) {
|
|
366
|
-
if (this.
|
|
367
|
-
const t = this.
|
|
368
|
-
this.
|
|
366
|
+
if (this.le[e - 1].length) {
|
|
367
|
+
const t = this.le[e - 1];
|
|
368
|
+
this.le[e - 1] = [];
|
|
369
369
|
runQueue(t, e);
|
|
370
370
|
}
|
|
371
371
|
for (let t = 0; t < this.U.length; t++) this.U[t].run?.(e);
|
|
@@ -376,28 +376,28 @@ class Queue {
|
|
|
376
376
|
const n = findLane(re);
|
|
377
377
|
n.M[e - 1].push(t);
|
|
378
378
|
} else {
|
|
379
|
-
this.
|
|
379
|
+
this.le[e - 1].push(t);
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
schedule();
|
|
383
383
|
}
|
|
384
384
|
stashQueues(e) {
|
|
385
|
-
e.
|
|
386
|
-
e.
|
|
387
|
-
this.
|
|
385
|
+
e.le[0].push(...this.le[0]);
|
|
386
|
+
e.le[1].push(...this.le[1]);
|
|
387
|
+
this.le = [[], []];
|
|
388
388
|
for (let t = 0; t < this.U.length; t++) {
|
|
389
389
|
let n = this.U[t];
|
|
390
390
|
let r = e.U[t];
|
|
391
391
|
if (!r) {
|
|
392
|
-
r = {
|
|
392
|
+
r = { le: [[], []], U: [] };
|
|
393
393
|
e.U[t] = r;
|
|
394
394
|
}
|
|
395
395
|
n.stashQueues(r);
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
398
|
restoreQueues(e) {
|
|
399
|
-
this.
|
|
400
|
-
this.
|
|
399
|
+
this.le[0].push(...e.le[0]);
|
|
400
|
+
this.le[1].push(...e.le[1]);
|
|
401
401
|
for (let t = 0; t < e.U.length; t++) {
|
|
402
402
|
const n = e.U[t];
|
|
403
403
|
let r = this.U[t];
|
|
@@ -406,18 +406,18 @@ class Queue {
|
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
class GlobalQueue extends Queue {
|
|
409
|
-
|
|
409
|
+
fe = false;
|
|
410
410
|
ce = null;
|
|
411
411
|
ae = [];
|
|
412
|
-
|
|
413
|
-
|
|
412
|
+
$ = [];
|
|
413
|
+
J = new Set();
|
|
414
414
|
static de;
|
|
415
415
|
static pe;
|
|
416
416
|
static he;
|
|
417
|
-
static
|
|
417
|
+
static ye = null;
|
|
418
418
|
flush() {
|
|
419
|
-
if (this.
|
|
420
|
-
this.
|
|
419
|
+
if (this.fe) return;
|
|
420
|
+
this.fe = true;
|
|
421
421
|
try {
|
|
422
422
|
runHeap(q, GlobalQueue.de);
|
|
423
423
|
if (M) {
|
|
@@ -427,8 +427,8 @@ class GlobalQueue extends Queue {
|
|
|
427
427
|
runHeap(Q, GlobalQueue.de);
|
|
428
428
|
this.ce = null;
|
|
429
429
|
this.ae = [];
|
|
430
|
-
this
|
|
431
|
-
this.
|
|
430
|
+
this.$ = [];
|
|
431
|
+
this.J = new Set();
|
|
432
432
|
runLaneEffects(O);
|
|
433
433
|
runLaneEffects(v);
|
|
434
434
|
this.stashQueues(e.Se);
|
|
@@ -436,11 +436,11 @@ class GlobalQueue extends Queue {
|
|
|
436
436
|
D = q.S >= q.j;
|
|
437
437
|
reassignPendingTransition(e.ae);
|
|
438
438
|
M = null;
|
|
439
|
-
if (!e.ie.length && !e.se.size && e
|
|
439
|
+
if (!e.ie.length && !e.se.size && e.$.length) {
|
|
440
440
|
B = new Set();
|
|
441
|
-
for (let t = 0; t < e
|
|
442
|
-
const n = e
|
|
443
|
-
if (n.L || n.
|
|
441
|
+
for (let t = 0; t < e.$.length; t++) {
|
|
442
|
+
const n = e.$[t];
|
|
443
|
+
if (n.L || n.ge & d) continue;
|
|
444
444
|
B.add(n);
|
|
445
445
|
queueStashedOptimisticEffects(n);
|
|
446
446
|
}
|
|
@@ -479,12 +479,12 @@ class GlobalQueue extends Queue {
|
|
|
479
479
|
this.run(v);
|
|
480
480
|
if (false);
|
|
481
481
|
} finally {
|
|
482
|
-
this.
|
|
482
|
+
this.fe = false;
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
notify(e, t, n, r) {
|
|
486
|
-
if (t &
|
|
487
|
-
if (n &
|
|
486
|
+
if (t & _) {
|
|
487
|
+
if (n & _) {
|
|
488
488
|
const t = r !== undefined ? r : e.we;
|
|
489
489
|
if (M && t) {
|
|
490
490
|
const n = t.source;
|
|
@@ -502,16 +502,16 @@ class GlobalQueue extends Queue {
|
|
|
502
502
|
initTransition(e) {
|
|
503
503
|
if (e) e = currentTransition(e);
|
|
504
504
|
if (e && e === M) return;
|
|
505
|
-
if (!e && M && M.
|
|
505
|
+
if (!e && M && M._e === F) return;
|
|
506
506
|
if (!M) {
|
|
507
507
|
M = e ?? {
|
|
508
|
-
|
|
508
|
+
_e: F,
|
|
509
509
|
ae: [],
|
|
510
510
|
se: new Map(),
|
|
511
|
-
|
|
512
|
-
|
|
511
|
+
$: [],
|
|
512
|
+
J: new Set(),
|
|
513
513
|
ie: [],
|
|
514
|
-
Se: {
|
|
514
|
+
Se: { le: [[], []], U: [] },
|
|
515
515
|
re: false,
|
|
516
516
|
oe: new Set()
|
|
517
517
|
};
|
|
@@ -522,7 +522,7 @@ class GlobalQueue extends Queue {
|
|
|
522
522
|
M = e;
|
|
523
523
|
}
|
|
524
524
|
H.add(M);
|
|
525
|
-
M.
|
|
525
|
+
M._e = F;
|
|
526
526
|
if (this.ce !== null) {
|
|
527
527
|
this.ce.V = M;
|
|
528
528
|
M.ae.push(this.ce);
|
|
@@ -536,20 +536,20 @@ class GlobalQueue extends Queue {
|
|
|
536
536
|
}
|
|
537
537
|
this.ae = M.ae;
|
|
538
538
|
}
|
|
539
|
-
if (this
|
|
540
|
-
for (let e = 0; e < this
|
|
541
|
-
const t = this
|
|
539
|
+
if (this.$ !== M.$) {
|
|
540
|
+
for (let e = 0; e < this.$.length; e++) {
|
|
541
|
+
const t = this.$[e];
|
|
542
542
|
t.V = M;
|
|
543
|
-
M
|
|
543
|
+
M.$.push(t);
|
|
544
544
|
}
|
|
545
|
-
this
|
|
545
|
+
this.$ = M.$;
|
|
546
546
|
}
|
|
547
547
|
for (const e of T) {
|
|
548
548
|
if (!e.V) e.V = M;
|
|
549
549
|
}
|
|
550
|
-
if (this.
|
|
551
|
-
for (const e of this.
|
|
552
|
-
this.
|
|
550
|
+
if (this.J !== M.J) {
|
|
551
|
+
for (const e of this.J) M.J.add(e);
|
|
552
|
+
this.J = M.J;
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
555
|
}
|
|
@@ -570,48 +570,48 @@ function queuePendingNode(e) {
|
|
|
570
570
|
}
|
|
571
571
|
function insertSubs(e, t = false) {
|
|
572
572
|
const n = e.H || re;
|
|
573
|
-
const r = e.
|
|
573
|
+
const r = e.me !== undefined;
|
|
574
574
|
for (let i = e.O; i !== null; i = i.P) {
|
|
575
|
-
if (r && i.
|
|
576
|
-
i.
|
|
575
|
+
if (r && i.N.ge & y) {
|
|
576
|
+
i.N._ |= l;
|
|
577
577
|
continue;
|
|
578
578
|
}
|
|
579
579
|
if (t && n) {
|
|
580
|
-
i.
|
|
581
|
-
assignOrMergeLane(i.
|
|
580
|
+
i.N._ |= f;
|
|
581
|
+
assignOrMergeLane(i.N, n);
|
|
582
582
|
} else if (t) {
|
|
583
|
-
i.
|
|
584
|
-
i.
|
|
583
|
+
i.N._ |= f;
|
|
584
|
+
i.N.H = undefined;
|
|
585
585
|
}
|
|
586
|
-
const e = i.
|
|
587
|
-
if (e
|
|
586
|
+
const e = i.N;
|
|
587
|
+
if (e.Z === P) {
|
|
588
588
|
if (!e.ee) {
|
|
589
589
|
e.ee = true;
|
|
590
590
|
e.te.enqueue(v, e.ne);
|
|
591
591
|
}
|
|
592
592
|
continue;
|
|
593
593
|
}
|
|
594
|
-
const s = i.
|
|
595
|
-
if (s.j > i.
|
|
596
|
-
insertIntoHeap(i.
|
|
594
|
+
const s = i.N._ & o ? Q : q;
|
|
595
|
+
if (s.j > i.N.o) s.j = i.N.o;
|
|
596
|
+
insertIntoHeap(i.N, s);
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
function commitPendingNode(e) {
|
|
600
600
|
const t = e;
|
|
601
601
|
if (!t.L) {
|
|
602
|
-
if (e.
|
|
603
|
-
e.ue = e.
|
|
604
|
-
e.
|
|
602
|
+
if (e.X !== x) {
|
|
603
|
+
e.ue = e.X;
|
|
604
|
+
e.X = x;
|
|
605
605
|
}
|
|
606
606
|
return;
|
|
607
607
|
}
|
|
608
|
-
if (e.
|
|
609
|
-
e.ue = e.
|
|
610
|
-
e.
|
|
611
|
-
if (e
|
|
608
|
+
if (e.X !== x) {
|
|
609
|
+
e.ue = e.X;
|
|
610
|
+
e.X = x;
|
|
611
|
+
if (e.Z && e.Z !== P) e.ee = true;
|
|
612
612
|
}
|
|
613
|
-
t.
|
|
614
|
-
if (!(t.be &
|
|
613
|
+
t._ &= ~a;
|
|
614
|
+
if (!(t.be & _)) t.be &= ~b;
|
|
615
615
|
if (t.Oe !== null || t.ve !== null) GlobalQueue.pe(t, false, true);
|
|
616
616
|
}
|
|
617
617
|
function commitPendingNodes() {
|
|
@@ -633,27 +633,27 @@ function finalizePureQueue(e = null, t = false) {
|
|
|
633
633
|
if (r) runHeap(q, GlobalQueue.de);
|
|
634
634
|
if (n) {
|
|
635
635
|
if (r) commitPendingNodes();
|
|
636
|
-
resolveOptimisticNodes(e ? e
|
|
636
|
+
resolveOptimisticNodes(e ? e.$ : z.$);
|
|
637
637
|
if (e && e.oe.size) {
|
|
638
638
|
for (const t of e.oe) {
|
|
639
|
-
if (t.
|
|
640
|
-
if (t
|
|
639
|
+
if (t._ & u) continue;
|
|
640
|
+
if (t.Z === P) {
|
|
641
641
|
if (!t.ee) {
|
|
642
642
|
t.ee = true;
|
|
643
643
|
t.te.enqueue(v, t.ne);
|
|
644
644
|
}
|
|
645
645
|
continue;
|
|
646
646
|
}
|
|
647
|
-
const e = t.
|
|
647
|
+
const e = t._ & o ? Q : q;
|
|
648
648
|
if (e.j > t.o) e.j = t.o;
|
|
649
649
|
insertIntoHeap(t, e);
|
|
650
650
|
}
|
|
651
651
|
e.oe.clear();
|
|
652
652
|
}
|
|
653
|
-
const t = e ? e.
|
|
654
|
-
if (GlobalQueue.
|
|
653
|
+
const t = e ? e.J : z.J;
|
|
654
|
+
if (GlobalQueue.ye && t.size) {
|
|
655
655
|
for (const e of t) {
|
|
656
|
-
GlobalQueue.
|
|
656
|
+
GlobalQueue.ye(e);
|
|
657
657
|
}
|
|
658
658
|
t.clear();
|
|
659
659
|
schedule();
|
|
@@ -669,7 +669,7 @@ function checkBoundaryChildren(e) {
|
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
671
|
function trackOptimisticStore(e) {
|
|
672
|
-
z.
|
|
672
|
+
z.J.add(e);
|
|
673
673
|
schedule();
|
|
674
674
|
}
|
|
675
675
|
function reassignPendingTransition(e) {
|
|
@@ -688,7 +688,7 @@ function flush(e) {
|
|
|
688
688
|
V--;
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
|
-
if (z.
|
|
691
|
+
if (z.fe) {
|
|
692
692
|
return;
|
|
693
693
|
}
|
|
694
694
|
while (D || M) {
|
|
@@ -699,7 +699,7 @@ function runQueue(e, t) {
|
|
|
699
699
|
for (let n = 0; n < e.length; n++) e[n](t);
|
|
700
700
|
}
|
|
701
701
|
function reporterBlocksSource(e, t) {
|
|
702
|
-
if (e.
|
|
702
|
+
if (e._ & (o | u)) return false;
|
|
703
703
|
if (e.Pe === t || e.xe?.has(t)) return true;
|
|
704
704
|
for (let n = e.W; n; n = n.R) {
|
|
705
705
|
let e = n.A;
|
|
@@ -708,7 +708,7 @@ function reporterBlocksSource(e, t) {
|
|
|
708
708
|
e = e.T;
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
-
return !!(e.be &
|
|
711
|
+
return !!(e.be & _ && e.we instanceof NotReadyError && e.we.source === t);
|
|
712
712
|
}
|
|
713
713
|
function transitionComplete(e) {
|
|
714
714
|
if (e.re) return true;
|
|
@@ -724,18 +724,18 @@ function transitionComplete(e) {
|
|
|
724
724
|
r.delete(e);
|
|
725
725
|
}
|
|
726
726
|
if (!i) e.se.delete(n);
|
|
727
|
-
else if (n.be &
|
|
727
|
+
else if (n.be & _ && n.we?.source === n) {
|
|
728
728
|
t = false;
|
|
729
729
|
break;
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
732
|
if (t) {
|
|
733
|
-
for (let n = 0; n < e
|
|
734
|
-
const r = e
|
|
733
|
+
for (let n = 0; n < e.$.length; n++) {
|
|
734
|
+
const r = e.$[n];
|
|
735
735
|
if (
|
|
736
736
|
hasActiveOverride(r) &&
|
|
737
737
|
"be" in r &&
|
|
738
|
-
r.be &
|
|
738
|
+
r.be & _ &&
|
|
739
739
|
r.we instanceof NotReadyError &&
|
|
740
740
|
r.we.source !== r
|
|
741
741
|
) {
|
|
@@ -765,15 +765,15 @@ function runInTransition(e, t) {
|
|
|
765
765
|
}
|
|
766
766
|
const U = {};
|
|
767
767
|
function markDisposal(e) {
|
|
768
|
-
let t = e.
|
|
768
|
+
let t = e.Ne;
|
|
769
769
|
while (t) {
|
|
770
|
-
t.
|
|
771
|
-
if (t.
|
|
770
|
+
t._ |= o;
|
|
771
|
+
if (t._ & i) {
|
|
772
772
|
deleteFromHeap(t, q);
|
|
773
773
|
insertIntoHeap(t, Q);
|
|
774
774
|
}
|
|
775
775
|
markDisposal(t);
|
|
776
|
-
t = t.
|
|
776
|
+
t = t.Ce;
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
779
|
function dispose(e) {
|
|
@@ -786,16 +786,16 @@ function dispose(e) {
|
|
|
786
786
|
disposeChildren(e, true);
|
|
787
787
|
}
|
|
788
788
|
function disposeChildren(e, t = false, n) {
|
|
789
|
-
const r = e.
|
|
789
|
+
const r = e._;
|
|
790
790
|
if (r & u) return;
|
|
791
|
-
if (t) e.
|
|
791
|
+
if (t) e._ = r | u;
|
|
792
792
|
if (t && e.L) e.ke = null;
|
|
793
|
-
let i = n ? e.Oe : e.
|
|
793
|
+
let i = n ? e.Oe : e.Ne;
|
|
794
794
|
while (i) {
|
|
795
|
-
const e = i.
|
|
795
|
+
const e = i.Ce;
|
|
796
796
|
if (i.W) {
|
|
797
797
|
const e = i;
|
|
798
|
-
deleteFromHeap(e, e.
|
|
798
|
+
deleteFromHeap(e, e._ & o ? Q : q);
|
|
799
799
|
let t = e.W;
|
|
800
800
|
do {
|
|
801
801
|
t = unlinkSubs(t);
|
|
@@ -809,14 +809,14 @@ function disposeChildren(e, t = false, n) {
|
|
|
809
809
|
if (n) {
|
|
810
810
|
e.Oe = null;
|
|
811
811
|
} else {
|
|
812
|
-
e.
|
|
812
|
+
e.Ne = null;
|
|
813
813
|
e.je = 0;
|
|
814
814
|
}
|
|
815
|
-
if (t && !n && !(r & o) && e.i !== null && !(e.i.
|
|
815
|
+
if (t && !n && !(r & o) && e.i !== null && !(e.i._ & u)) {
|
|
816
816
|
const t = e.We;
|
|
817
|
-
const n = e.
|
|
818
|
-
if (t !== null) t.
|
|
819
|
-
else e.i.
|
|
817
|
+
const n = e.Ce;
|
|
818
|
+
if (t !== null) t.Ce = n;
|
|
819
|
+
else e.i.Ne = n;
|
|
820
820
|
if (n !== null) n.We = t;
|
|
821
821
|
e.We = null;
|
|
822
822
|
}
|
|
@@ -837,7 +837,7 @@ function runDisposal(e, t) {
|
|
|
837
837
|
}
|
|
838
838
|
function childId(e, t) {
|
|
839
839
|
let n = e;
|
|
840
|
-
while (n.
|
|
840
|
+
while (n.ge & h && n.i) n = n.i;
|
|
841
841
|
if (n.id != null) return formatId(n.id, t ? n.je++ : n.je);
|
|
842
842
|
throw new Error("Cannot get child id from owner without an id");
|
|
843
843
|
}
|
|
@@ -853,8 +853,8 @@ function formatId(e, t) {
|
|
|
853
853
|
return e + (r ? String.fromCharCode(64 + r) : "") + n;
|
|
854
854
|
}
|
|
855
855
|
function getObserver() {
|
|
856
|
-
if (
|
|
857
|
-
return
|
|
856
|
+
if (Z || te) return U;
|
|
857
|
+
return J ? ne : null;
|
|
858
858
|
}
|
|
859
859
|
function getOwner() {
|
|
860
860
|
return ne;
|
|
@@ -867,7 +867,7 @@ function cleanup(e) {
|
|
|
867
867
|
return e;
|
|
868
868
|
}
|
|
869
869
|
function isDisposed(e) {
|
|
870
|
-
return !!(e.
|
|
870
|
+
return !!(e._ & (u | o));
|
|
871
871
|
}
|
|
872
872
|
function disposeRootSelf(e = true) {
|
|
873
873
|
disposeChildren(this, e);
|
|
@@ -877,11 +877,11 @@ function createOwner(e) {
|
|
|
877
877
|
const n = e?.transparent ?? false;
|
|
878
878
|
const r = {
|
|
879
879
|
id: e?.id ?? (n ? t?.id : t?.id != null ? getNextChildId(t) : undefined),
|
|
880
|
-
|
|
880
|
+
ge: n ? h : 0,
|
|
881
881
|
t: true,
|
|
882
882
|
u: t?.t ? t.u : t,
|
|
883
|
-
Ce: null,
|
|
884
883
|
Ne: null,
|
|
884
|
+
Ce: null,
|
|
885
885
|
We: null,
|
|
886
886
|
Re: null,
|
|
887
887
|
te: t?.te ?? z,
|
|
@@ -893,13 +893,13 @@ function createOwner(e) {
|
|
|
893
893
|
dispose: disposeRootSelf
|
|
894
894
|
};
|
|
895
895
|
if (t) {
|
|
896
|
-
const e = t.
|
|
896
|
+
const e = t.Ne;
|
|
897
897
|
if (e === null) {
|
|
898
|
-
t.
|
|
898
|
+
t.Ne = r;
|
|
899
899
|
} else {
|
|
900
|
-
r.
|
|
900
|
+
r.Ce = e;
|
|
901
901
|
e.We = r;
|
|
902
|
-
t.
|
|
902
|
+
t.Ne = r;
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
905
|
return r;
|
|
@@ -919,9 +919,9 @@ function unlinkSubs(e) {
|
|
|
919
919
|
else {
|
|
920
920
|
t.O = r;
|
|
921
921
|
if (r === null) {
|
|
922
|
-
t.
|
|
922
|
+
t.Y?.();
|
|
923
923
|
const e = t;
|
|
924
|
-
e.L && e.
|
|
924
|
+
e.L && e.ge & g && !(e._ & o) && unobserved(e);
|
|
925
925
|
}
|
|
926
926
|
}
|
|
927
927
|
return n;
|
|
@@ -938,7 +938,7 @@ function trimStaleDeps(e) {
|
|
|
938
938
|
}
|
|
939
939
|
}
|
|
940
940
|
function unobserved(e) {
|
|
941
|
-
deleteFromHeap(e, e.
|
|
941
|
+
deleteFromHeap(e, e._ & o ? Q : q);
|
|
942
942
|
let t = e.W;
|
|
943
943
|
while (t !== null) {
|
|
944
944
|
t = unlinkSubs(t);
|
|
@@ -951,7 +951,7 @@ function link(e, t) {
|
|
|
951
951
|
const n = t.Ee;
|
|
952
952
|
if (n !== null && n.A === e) return;
|
|
953
953
|
let i = null;
|
|
954
|
-
const s = t.
|
|
954
|
+
const s = t._ & r;
|
|
955
955
|
if (s) {
|
|
956
956
|
i = n !== null ? n.R : t.W;
|
|
957
957
|
if (i !== null && i.A === e) {
|
|
@@ -960,8 +960,8 @@ function link(e, t) {
|
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
962
|
const o = e.Le;
|
|
963
|
-
if (o !== null && o.
|
|
964
|
-
const u = (t.Ee = e.Le = { A: e,
|
|
963
|
+
if (o !== null && o.N === t && (!s || isValidLink(o, t))) return;
|
|
964
|
+
const u = (t.Ee = e.Le = { A: e, N: t, R: i, Ie: o, P: null });
|
|
965
965
|
if (n !== null) n.R = u;
|
|
966
966
|
else t.W = u;
|
|
967
967
|
if (o !== null) o.P = u;
|
|
@@ -1028,9 +1028,9 @@ function setPendingError(e, t, n) {
|
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
1030
|
function forEachDependent(e, t) {
|
|
1031
|
-
for (let n = e.O; n !== null; n = n.P) t(n.
|
|
1032
|
-
for (let n = e.
|
|
1033
|
-
for (let e = n.O; e !== null; e = e.P) t(e.
|
|
1031
|
+
for (let n = e.O; n !== null; n = n.P) t(n.N);
|
|
1032
|
+
for (let n = e.C; n !== null; n = n.k) {
|
|
1033
|
+
for (let e = n.O; e !== null; e = e.P) t(e.N);
|
|
1034
1034
|
}
|
|
1035
1035
|
}
|
|
1036
1036
|
function settlePendingSource(e) {
|
|
@@ -1039,24 +1039,24 @@ function settlePendingSource(e) {
|
|
|
1039
1039
|
const settle = r => {
|
|
1040
1040
|
if (n.has(r) || !removePendingSource(r, e)) return;
|
|
1041
1041
|
n.add(r);
|
|
1042
|
-
r.
|
|
1042
|
+
r._e = F;
|
|
1043
1043
|
const i = r.Pe ?? r.xe?.values().next().value;
|
|
1044
1044
|
if (i) {
|
|
1045
1045
|
setPendingError(r, i);
|
|
1046
1046
|
updatePendingSignal(r);
|
|
1047
1047
|
} else {
|
|
1048
|
-
r.be &= ~
|
|
1048
|
+
r.be &= ~_;
|
|
1049
1049
|
setPendingError(r);
|
|
1050
1050
|
updatePendingSignal(r);
|
|
1051
1051
|
if (r.Te) {
|
|
1052
|
-
if (r
|
|
1052
|
+
if (r.Z === P) {
|
|
1053
1053
|
const e = r;
|
|
1054
1054
|
if (!e.ee) {
|
|
1055
1055
|
e.ee = true;
|
|
1056
1056
|
e.te.enqueue(v, e.ne);
|
|
1057
1057
|
}
|
|
1058
1058
|
} else {
|
|
1059
|
-
const e = r.
|
|
1059
|
+
const e = r._ & o ? Q : q;
|
|
1060
1060
|
if (e.j > r.o) e.j = r.o;
|
|
1061
1061
|
insertIntoHeap(r, e);
|
|
1062
1062
|
}
|
|
@@ -1087,12 +1087,12 @@ function handleAsync(e, t, r) {
|
|
|
1087
1087
|
const handleError = n => {
|
|
1088
1088
|
if (e.ke !== t) return;
|
|
1089
1089
|
z.initTransition(resolveTransition(e));
|
|
1090
|
-
notifyStatus(e, n instanceof NotReadyError ?
|
|
1091
|
-
e.
|
|
1090
|
+
notifyStatus(e, n instanceof NotReadyError ? _ : m, n);
|
|
1091
|
+
e._e = F;
|
|
1092
1092
|
};
|
|
1093
1093
|
const asyncWrite = (i, s) => {
|
|
1094
1094
|
if (e.ke !== t) return;
|
|
1095
|
-
if (e.
|
|
1095
|
+
if (e._ & (n | f)) return;
|
|
1096
1096
|
z.initTransition(resolveTransition(e));
|
|
1097
1097
|
const o = !!(e.be & b);
|
|
1098
1098
|
trimStaleDeps(e);
|
|
@@ -1101,19 +1101,19 @@ function handleAsync(e, t, r) {
|
|
|
1101
1101
|
if (u) u.F.delete(e);
|
|
1102
1102
|
if (r) r(i);
|
|
1103
1103
|
else if (e.G !== undefined) {
|
|
1104
|
-
if (e.G !== undefined && e.G !== x) e.
|
|
1104
|
+
if (e.G !== undefined && e.G !== x) e.X = i;
|
|
1105
1105
|
else {
|
|
1106
1106
|
e.ue = i;
|
|
1107
1107
|
insertSubs(e);
|
|
1108
1108
|
}
|
|
1109
|
-
e.
|
|
1109
|
+
e._e = F;
|
|
1110
1110
|
} else if (u) {
|
|
1111
|
-
const t = e
|
|
1111
|
+
const t = e.Z;
|
|
1112
1112
|
const n = e.ue;
|
|
1113
1113
|
const r = e.He;
|
|
1114
1114
|
if ((!t && o) || !r || !r(i, n)) {
|
|
1115
1115
|
e.ue = i;
|
|
1116
|
-
e.
|
|
1116
|
+
e._e = F;
|
|
1117
1117
|
if (e.qe) {
|
|
1118
1118
|
setSignal(e.qe, i);
|
|
1119
1119
|
}
|
|
@@ -1164,10 +1164,10 @@ function handleAsync(e, t, r) {
|
|
|
1164
1164
|
const iterate = () => {
|
|
1165
1165
|
let s,
|
|
1166
1166
|
u = false,
|
|
1167
|
-
|
|
1167
|
+
f = true;
|
|
1168
1168
|
n.next().then(
|
|
1169
1169
|
n => {
|
|
1170
|
-
if (
|
|
1170
|
+
if (f) {
|
|
1171
1171
|
s = n;
|
|
1172
1172
|
u = true;
|
|
1173
1173
|
if (n.done) i = true;
|
|
@@ -1181,13 +1181,13 @@ function handleAsync(e, t, r) {
|
|
|
1181
1181
|
}
|
|
1182
1182
|
},
|
|
1183
1183
|
n => {
|
|
1184
|
-
if (!
|
|
1184
|
+
if (!f && e.ke === t) {
|
|
1185
1185
|
i = true;
|
|
1186
1186
|
handleError(n);
|
|
1187
1187
|
}
|
|
1188
1188
|
}
|
|
1189
1189
|
);
|
|
1190
|
-
|
|
1190
|
+
f = false;
|
|
1191
1191
|
if (u && !s.done) {
|
|
1192
1192
|
o = s.value;
|
|
1193
1193
|
r = true;
|
|
@@ -1212,20 +1212,20 @@ function clearStatus(e, t = false) {
|
|
|
1212
1212
|
if (e.Fe) e.Fe();
|
|
1213
1213
|
}
|
|
1214
1214
|
function notifyStatus(e, t, n, r, i) {
|
|
1215
|
-
if (t ===
|
|
1215
|
+
if (t === m && !(n instanceof StatusError) && !(n instanceof NotReadyError))
|
|
1216
1216
|
n = new StatusError(e, n);
|
|
1217
|
-
const s = t ===
|
|
1217
|
+
const s = t === _ && n instanceof NotReadyError ? n.source : undefined;
|
|
1218
1218
|
const o = s === e;
|
|
1219
|
-
const u = t ===
|
|
1220
|
-
const
|
|
1219
|
+
const u = t === _ && e.G !== undefined && !o;
|
|
1220
|
+
const f = u && hasActiveOverride(e);
|
|
1221
1221
|
if (!r) {
|
|
1222
|
-
if (t ===
|
|
1222
|
+
if (t === _ && s) {
|
|
1223
1223
|
addPendingSource(e, s);
|
|
1224
|
-
e.be =
|
|
1224
|
+
e.be = _ | (e.be & b);
|
|
1225
1225
|
setPendingError(e, s, n);
|
|
1226
1226
|
} else {
|
|
1227
1227
|
clearPendingSources(e);
|
|
1228
|
-
e.be = t | (t !==
|
|
1228
|
+
e.be = t | (t !== m ? e.be & b : 0);
|
|
1229
1229
|
e.we = n;
|
|
1230
1230
|
}
|
|
1231
1231
|
updatePendingSignal(e);
|
|
@@ -1233,13 +1233,13 @@ function notifyStatus(e, t, n, r, i) {
|
|
|
1233
1233
|
if (i && !r) {
|
|
1234
1234
|
assignOrMergeLane(e, i);
|
|
1235
1235
|
}
|
|
1236
|
-
const
|
|
1236
|
+
const l = r || f;
|
|
1237
1237
|
const c = r || u ? undefined : i;
|
|
1238
1238
|
if (e.Fe) {
|
|
1239
|
-
if (r && t ===
|
|
1239
|
+
if (r && t === _) {
|
|
1240
1240
|
return;
|
|
1241
1241
|
}
|
|
1242
|
-
if (
|
|
1242
|
+
if (l) {
|
|
1243
1243
|
e.Fe(t, n);
|
|
1244
1244
|
} else {
|
|
1245
1245
|
e.Fe();
|
|
@@ -1247,22 +1247,22 @@ function notifyStatus(e, t, n, r, i) {
|
|
|
1247
1247
|
return;
|
|
1248
1248
|
}
|
|
1249
1249
|
forEachDependent(e, e => {
|
|
1250
|
-
e.
|
|
1250
|
+
e._e = F;
|
|
1251
1251
|
if (
|
|
1252
|
-
(t ===
|
|
1253
|
-
(t !==
|
|
1252
|
+
(t === _ && s && e.Pe !== s && !e.xe?.has(s)) ||
|
|
1253
|
+
(t !== _ && (e.we !== n || e.Pe || e.xe))
|
|
1254
1254
|
) {
|
|
1255
|
-
if (!
|
|
1256
|
-
notifyStatus(e, t, n,
|
|
1255
|
+
if (!l && !e.V) queuePendingNode(e);
|
|
1256
|
+
notifyStatus(e, t, n, l, c);
|
|
1257
1257
|
}
|
|
1258
1258
|
});
|
|
1259
1259
|
}
|
|
1260
|
-
let
|
|
1260
|
+
let $ = null;
|
|
1261
1261
|
function enableExternalSource(e) {
|
|
1262
1262
|
const { factory: t, untrack: n = e => e() } = e;
|
|
1263
|
-
if (
|
|
1264
|
-
const { factory: e, untrack: r } =
|
|
1265
|
-
|
|
1263
|
+
if ($) {
|
|
1264
|
+
const { factory: e, untrack: r } = $;
|
|
1265
|
+
$ = {
|
|
1266
1266
|
factory: (n, r) => {
|
|
1267
1267
|
const i = e(n, r);
|
|
1268
1268
|
const s = t(e => i.track(e), r);
|
|
@@ -1277,20 +1277,20 @@ function enableExternalSource(e) {
|
|
|
1277
1277
|
untrack: e => r(() => n(e))
|
|
1278
1278
|
};
|
|
1279
1279
|
} else {
|
|
1280
|
-
|
|
1280
|
+
$ = { factory: t, untrack: n };
|
|
1281
1281
|
}
|
|
1282
1282
|
}
|
|
1283
1283
|
GlobalQueue.de = recompute;
|
|
1284
1284
|
GlobalQueue.pe = disposeChildren;
|
|
1285
|
+
let J = false;
|
|
1285
1286
|
let X = false;
|
|
1286
1287
|
let Y = false;
|
|
1287
1288
|
let Z = false;
|
|
1288
|
-
let $ = false;
|
|
1289
1289
|
let ee = false;
|
|
1290
1290
|
let te = false;
|
|
1291
1291
|
let ne = null;
|
|
1292
1292
|
let re = null;
|
|
1293
|
-
let ie =
|
|
1293
|
+
let ie = null;
|
|
1294
1294
|
let se = false;
|
|
1295
1295
|
let oe = null;
|
|
1296
1296
|
function ownerInSnapshotScope(e) {
|
|
@@ -1313,89 +1313,89 @@ function releaseSnapshotScope(e) {
|
|
|
1313
1313
|
schedule();
|
|
1314
1314
|
}
|
|
1315
1315
|
function releaseSubtree(e) {
|
|
1316
|
-
let t = e.
|
|
1316
|
+
let t = e.Ne;
|
|
1317
1317
|
while (t) {
|
|
1318
1318
|
if (t.Me) {
|
|
1319
|
-
t = t.
|
|
1319
|
+
t = t.Ce;
|
|
1320
1320
|
continue;
|
|
1321
1321
|
}
|
|
1322
1322
|
if (t.L) {
|
|
1323
1323
|
const e = t;
|
|
1324
|
-
e.
|
|
1325
|
-
if (e.
|
|
1326
|
-
e.
|
|
1327
|
-
e.
|
|
1324
|
+
e.ge &= ~y;
|
|
1325
|
+
if (e._ & l) {
|
|
1326
|
+
e._ &= ~l;
|
|
1327
|
+
e._ |= n;
|
|
1328
1328
|
if (q.j > e.o) q.j = e.o;
|
|
1329
1329
|
insertIntoHeap(e, q);
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
1332
1332
|
releaseSubtree(t);
|
|
1333
|
-
t = t.
|
|
1333
|
+
t = t.Ce;
|
|
1334
1334
|
}
|
|
1335
1335
|
}
|
|
1336
1336
|
function clearSnapshots() {
|
|
1337
1337
|
if (oe) {
|
|
1338
1338
|
for (const e of oe) {
|
|
1339
|
-
delete e.
|
|
1340
|
-
delete e[
|
|
1339
|
+
delete e.me;
|
|
1340
|
+
delete e[C];
|
|
1341
1341
|
}
|
|
1342
1342
|
oe = null;
|
|
1343
1343
|
}
|
|
1344
1344
|
se = false;
|
|
1345
1345
|
}
|
|
1346
1346
|
function recompute(t, n = false) {
|
|
1347
|
-
const i = t
|
|
1347
|
+
const i = t.Z;
|
|
1348
1348
|
if (!n) {
|
|
1349
1349
|
if (t.V && (!i || M) && M !== t.V) z.initTransition(t.V);
|
|
1350
|
-
deleteFromHeap(t, t.
|
|
1350
|
+
deleteFromHeap(t, t._ & o ? Q : q);
|
|
1351
1351
|
t.ke = null;
|
|
1352
1352
|
if (t.V || i === P) disposeChildren(t);
|
|
1353
|
-
else if (t.
|
|
1353
|
+
else if (t.Ne !== null || t.Re !== null) {
|
|
1354
1354
|
markDisposal(t);
|
|
1355
1355
|
t.ve = t.Re;
|
|
1356
|
-
t.Oe = t.
|
|
1356
|
+
t.Oe = t.Ne;
|
|
1357
1357
|
t.Re = null;
|
|
1358
|
-
t.
|
|
1358
|
+
t.Ne = null;
|
|
1359
1359
|
t.je = 0;
|
|
1360
1360
|
} else;
|
|
1361
1361
|
}
|
|
1362
|
-
let s = !!(t.
|
|
1362
|
+
let s = !!(t._ & f);
|
|
1363
1363
|
const u = t.G !== undefined && t.G !== x;
|
|
1364
|
-
const c = !!(t.be &
|
|
1364
|
+
const c = !!(t.be & _);
|
|
1365
1365
|
const a = !!(t.be & b);
|
|
1366
1366
|
const d = ne;
|
|
1367
1367
|
ne = t;
|
|
1368
1368
|
t.Ee = null;
|
|
1369
|
-
t.
|
|
1370
|
-
t.
|
|
1371
|
-
let p = t.
|
|
1369
|
+
t._ = r;
|
|
1370
|
+
t._e = F;
|
|
1371
|
+
let p = t.X === x ? t.ue : t.X;
|
|
1372
1372
|
let h = t.o;
|
|
1373
|
-
let
|
|
1373
|
+
let y = J;
|
|
1374
1374
|
let S = re;
|
|
1375
|
-
|
|
1375
|
+
J = true;
|
|
1376
1376
|
if (s) {
|
|
1377
1377
|
const e = resolveLane(t);
|
|
1378
1378
|
if (e) re = e;
|
|
1379
|
-
} else if (M && !n && M
|
|
1379
|
+
} else if (M && !n && M.$.length) {
|
|
1380
1380
|
for (let e = t.W; e; e = e.R) {
|
|
1381
1381
|
const n = e.A;
|
|
1382
|
-
if (n.
|
|
1382
|
+
if (n._ & f) {
|
|
1383
1383
|
const e = resolveLane(n);
|
|
1384
1384
|
if (e) {
|
|
1385
1385
|
s = true;
|
|
1386
1386
|
re = e;
|
|
1387
|
-
t.
|
|
1387
|
+
t._ |= f;
|
|
1388
1388
|
assignOrMergeLane(t, e);
|
|
1389
1389
|
break;
|
|
1390
1390
|
}
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
1393
|
}
|
|
1394
|
-
const
|
|
1395
|
-
const O =
|
|
1396
|
-
if (
|
|
1394
|
+
const g = i && i !== v;
|
|
1395
|
+
const O = X;
|
|
1396
|
+
if (g) X = true;
|
|
1397
1397
|
try {
|
|
1398
|
-
if (!false && t.
|
|
1398
|
+
if (!false && t.ge & w) {
|
|
1399
1399
|
p = t.L(p);
|
|
1400
1400
|
t.ke = null;
|
|
1401
1401
|
} else {
|
|
@@ -1426,20 +1426,20 @@ function recompute(t, n = false) {
|
|
|
1426
1426
|
if (e instanceof NotReadyError) t.Te = true;
|
|
1427
1427
|
notifyStatus(
|
|
1428
1428
|
t,
|
|
1429
|
-
e instanceof NotReadyError ?
|
|
1429
|
+
e instanceof NotReadyError ? _ : m,
|
|
1430
1430
|
e,
|
|
1431
1431
|
undefined,
|
|
1432
1432
|
e instanceof NotReadyError ? t.H : undefined
|
|
1433
1433
|
);
|
|
1434
1434
|
} finally {
|
|
1435
|
-
|
|
1436
|
-
if (
|
|
1437
|
-
t.
|
|
1435
|
+
J = y;
|
|
1436
|
+
if (g) X = O;
|
|
1437
|
+
t._ = e | (n ? t._ & l : 0);
|
|
1438
1438
|
ne = d;
|
|
1439
1439
|
}
|
|
1440
1440
|
if (!t.we) {
|
|
1441
1441
|
trimStaleDeps(t);
|
|
1442
|
-
const e = u ? t.G : t.
|
|
1442
|
+
const e = u ? t.G : t.X === x ? t.ue : t.X;
|
|
1443
1443
|
const r = (!i && a) || !t.He || !t.He(e, p);
|
|
1444
1444
|
if (i && r) {
|
|
1445
1445
|
t.ee = !t.we;
|
|
@@ -1451,54 +1451,54 @@ function recompute(t, n = false) {
|
|
|
1451
1451
|
t.ue = p;
|
|
1452
1452
|
if (u && s) {
|
|
1453
1453
|
t.G = p;
|
|
1454
|
-
t.
|
|
1454
|
+
t.X = p;
|
|
1455
1455
|
}
|
|
1456
|
-
} else t.
|
|
1456
|
+
} else t.X = p;
|
|
1457
1457
|
if (u && !s && c && !t.B) t.G = p;
|
|
1458
1458
|
if (!u || s || t.G !== e) insertSubs(t, s || u);
|
|
1459
1459
|
} else if (u) {
|
|
1460
|
-
t.
|
|
1460
|
+
t.X = p;
|
|
1461
1461
|
} else if (t.o != h) {
|
|
1462
1462
|
for (let e = t.O; e !== null; e = e.P) {
|
|
1463
|
-
insertIntoHeapHeight(e.
|
|
1463
|
+
insertIntoHeapHeight(e.N, e.N._ & o ? Q : q);
|
|
1464
1464
|
}
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
1467
1467
|
re = S;
|
|
1468
|
-
const
|
|
1469
|
-
|
|
1468
|
+
const N = t.X !== x || t.Oe !== null || t.ve !== null || !!(t.be & (_ | b));
|
|
1469
|
+
N && (!n || t.be & _) && !t.V && !(M && u) && queuePendingNode(t);
|
|
1470
1470
|
t.V && i && M !== t.V && runInTransition(t.V, () => recompute(t));
|
|
1471
1471
|
}
|
|
1472
1472
|
function updateIfNecessary(e) {
|
|
1473
|
-
if (e.
|
|
1473
|
+
if (e._ & t) {
|
|
1474
1474
|
for (let t = e.W; t; t = t.R) {
|
|
1475
1475
|
const r = t.A;
|
|
1476
1476
|
const i = r.I || r;
|
|
1477
1477
|
if (i.L) {
|
|
1478
1478
|
updateIfNecessary(i);
|
|
1479
1479
|
}
|
|
1480
|
-
if (e.
|
|
1480
|
+
if (e._ & n) {
|
|
1481
1481
|
break;
|
|
1482
1482
|
}
|
|
1483
1483
|
}
|
|
1484
1484
|
}
|
|
1485
|
-
if (e.
|
|
1485
|
+
if (e._ & (n | f) || (e.we && e._e < F && !e.ke)) {
|
|
1486
1486
|
recompute(e);
|
|
1487
1487
|
}
|
|
1488
|
-
e.
|
|
1488
|
+
e._ = e._ & (l | i | s);
|
|
1489
1489
|
}
|
|
1490
1490
|
function computed(t, n) {
|
|
1491
1491
|
const r = n?.transparent ?? false;
|
|
1492
1492
|
const i = {
|
|
1493
1493
|
id: n?.id ?? (r ? ne?.id : ne?.id != null ? getNextChildId(ne) : undefined),
|
|
1494
|
-
|
|
1494
|
+
ge:
|
|
1495
1495
|
(r ? h : 0) |
|
|
1496
1496
|
(n?.ownedWrite ? d : 0) |
|
|
1497
|
-
(!ne || n?.lazy ?
|
|
1497
|
+
(!ne || n?.lazy ? g : 0) |
|
|
1498
1498
|
(n?.sync ? w : 0) |
|
|
1499
|
-
(se && ownerInSnapshotScope(ne) ?
|
|
1499
|
+
(se && ownerInSnapshotScope(ne) ? y : 0),
|
|
1500
1500
|
He: n?.equals != null ? n.equals : isEqual,
|
|
1501
|
-
|
|
1501
|
+
Y: n?.unobserved,
|
|
1502
1502
|
Re: null,
|
|
1503
1503
|
te: ne?.te ?? z,
|
|
1504
1504
|
Ae: ne?.Ae ?? k,
|
|
@@ -1506,7 +1506,7 @@ function computed(t, n) {
|
|
|
1506
1506
|
L: t,
|
|
1507
1507
|
ue: undefined,
|
|
1508
1508
|
o: 0,
|
|
1509
|
-
|
|
1509
|
+
C: null,
|
|
1510
1510
|
h: undefined,
|
|
1511
1511
|
p: null,
|
|
1512
1512
|
W: null,
|
|
@@ -1514,13 +1514,13 @@ function computed(t, n) {
|
|
|
1514
1514
|
O: null,
|
|
1515
1515
|
Le: null,
|
|
1516
1516
|
i: ne,
|
|
1517
|
-
Ne: null,
|
|
1518
|
-
We: null,
|
|
1519
1517
|
Ce: null,
|
|
1520
|
-
|
|
1518
|
+
We: null,
|
|
1519
|
+
Ne: null,
|
|
1520
|
+
_: n?.lazy ? c : e,
|
|
1521
1521
|
be: b,
|
|
1522
|
-
|
|
1523
|
-
|
|
1522
|
+
_e: F,
|
|
1523
|
+
X: x,
|
|
1524
1524
|
ve: null,
|
|
1525
1525
|
Oe: null,
|
|
1526
1526
|
ke: null,
|
|
@@ -1533,13 +1533,13 @@ function createEffectNode(e, t, n, r, i, s) {
|
|
|
1533
1533
|
const o = s?.transparent ?? false;
|
|
1534
1534
|
const u = {
|
|
1535
1535
|
id: s?.id ?? (o ? ne?.id : ne?.id != null ? getNextChildId(ne) : undefined),
|
|
1536
|
-
|
|
1536
|
+
ge:
|
|
1537
1537
|
(o ? h : 0) |
|
|
1538
1538
|
(s?.ownedWrite ? d : 0) |
|
|
1539
1539
|
(s?.sync ? w : 0) |
|
|
1540
|
-
(se && ownerInSnapshotScope(ne) ?
|
|
1540
|
+
(se && ownerInSnapshotScope(ne) ? y : 0),
|
|
1541
1541
|
He: false,
|
|
1542
|
-
|
|
1542
|
+
Y: s?.unobserved,
|
|
1543
1543
|
Re: null,
|
|
1544
1544
|
te: ne?.te ?? z,
|
|
1545
1545
|
Ae: ne?.Ae ?? k,
|
|
@@ -1547,7 +1547,7 @@ function createEffectNode(e, t, n, r, i, s) {
|
|
|
1547
1547
|
L: e,
|
|
1548
1548
|
ue: undefined,
|
|
1549
1549
|
o: 0,
|
|
1550
|
-
|
|
1550
|
+
C: null,
|
|
1551
1551
|
h: undefined,
|
|
1552
1552
|
p: null,
|
|
1553
1553
|
W: null,
|
|
@@ -1555,13 +1555,13 @@ function createEffectNode(e, t, n, r, i, s) {
|
|
|
1555
1555
|
O: null,
|
|
1556
1556
|
Le: null,
|
|
1557
1557
|
i: ne,
|
|
1558
|
-
Ne: null,
|
|
1559
|
-
We: null,
|
|
1560
1558
|
Ce: null,
|
|
1561
|
-
|
|
1559
|
+
We: null,
|
|
1560
|
+
Ne: null,
|
|
1561
|
+
_: c,
|
|
1562
1562
|
be: b,
|
|
1563
|
-
|
|
1564
|
-
|
|
1563
|
+
_e: F,
|
|
1564
|
+
X: x,
|
|
1565
1565
|
ve: null,
|
|
1566
1566
|
Oe: null,
|
|
1567
1567
|
ke: null,
|
|
@@ -1572,7 +1572,7 @@ function createEffectNode(e, t, n, r, i, s) {
|
|
|
1572
1572
|
Ke: n,
|
|
1573
1573
|
Be: undefined,
|
|
1574
1574
|
Ge: false,
|
|
1575
|
-
|
|
1575
|
+
Z: r,
|
|
1576
1576
|
Fe: i
|
|
1577
1577
|
};
|
|
1578
1578
|
setupComputedNode(u, ue);
|
|
@@ -1583,19 +1583,19 @@ function setupComputedNode(e, t) {
|
|
|
1583
1583
|
e.p = e;
|
|
1584
1584
|
const n = ne?.t ? ne.u : ne;
|
|
1585
1585
|
if (ne) {
|
|
1586
|
-
const t = ne.
|
|
1586
|
+
const t = ne.Ne;
|
|
1587
1587
|
if (t === null) {
|
|
1588
|
-
ne.
|
|
1588
|
+
ne.Ne = e;
|
|
1589
1589
|
} else {
|
|
1590
|
-
e.
|
|
1590
|
+
e.Ce = t;
|
|
1591
1591
|
t.We = e;
|
|
1592
|
-
ne.
|
|
1592
|
+
ne.Ne = e;
|
|
1593
1593
|
}
|
|
1594
1594
|
}
|
|
1595
1595
|
if (n) e.o = n.o + 1;
|
|
1596
|
-
if (
|
|
1596
|
+
if ($) {
|
|
1597
1597
|
const t = signal(undefined, { equals: false, ownedWrite: true });
|
|
1598
|
-
const n =
|
|
1598
|
+
const n = $.factory(e.L, () => {
|
|
1599
1599
|
setSignal(t, undefined);
|
|
1600
1600
|
});
|
|
1601
1601
|
cleanup(() => n.dispose());
|
|
@@ -1606,8 +1606,8 @@ function setupComputedNode(e, t) {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
!t?.lazy && recompute(e, true);
|
|
1608
1608
|
if (se && !t?.lazy) {
|
|
1609
|
-
if (!(e.be &
|
|
1610
|
-
e.
|
|
1609
|
+
if (!(e.be & _)) {
|
|
1610
|
+
e.me = e.ue === undefined ? N : e.ue;
|
|
1611
1611
|
oe.add(e);
|
|
1612
1612
|
}
|
|
1613
1613
|
}
|
|
@@ -1615,19 +1615,19 @@ function setupComputedNode(e, t) {
|
|
|
1615
1615
|
function signal(e, t, n = null) {
|
|
1616
1616
|
const r = {
|
|
1617
1617
|
He: t?.equals != null ? t.equals : isEqual,
|
|
1618
|
-
|
|
1619
|
-
|
|
1618
|
+
ge: (t?.ownedWrite ? d : 0) | (t?.ze ? p : 0),
|
|
1619
|
+
Y: t?.unobserved,
|
|
1620
1620
|
ue: e,
|
|
1621
1621
|
O: null,
|
|
1622
1622
|
Le: null,
|
|
1623
|
-
|
|
1623
|
+
_e: F,
|
|
1624
1624
|
I: n,
|
|
1625
|
-
k: n?.
|
|
1626
|
-
|
|
1625
|
+
k: n?.C || null,
|
|
1626
|
+
X: x
|
|
1627
1627
|
};
|
|
1628
|
-
n && (n.
|
|
1629
|
-
if (se && !(r.
|
|
1630
|
-
r.
|
|
1628
|
+
n && (n.C = r);
|
|
1629
|
+
if (se && !(r.ge & p) && !((n?.be ?? 0) & _)) {
|
|
1630
|
+
r.me = e === undefined ? N : e;
|
|
1631
1631
|
oe.add(r);
|
|
1632
1632
|
}
|
|
1633
1633
|
return r;
|
|
@@ -1646,14 +1646,14 @@ function isEqual(e, t) {
|
|
|
1646
1646
|
return e === t;
|
|
1647
1647
|
}
|
|
1648
1648
|
function untrack(e, t) {
|
|
1649
|
-
if (
|
|
1650
|
-
const n =
|
|
1651
|
-
|
|
1649
|
+
if (!$ && !J && true) return e();
|
|
1650
|
+
const n = J;
|
|
1651
|
+
J = false;
|
|
1652
1652
|
try {
|
|
1653
|
-
if (
|
|
1653
|
+
if ($) return $.untrack(e);
|
|
1654
1654
|
return e();
|
|
1655
1655
|
} finally {
|
|
1656
|
-
|
|
1656
|
+
J = n;
|
|
1657
1657
|
}
|
|
1658
1658
|
}
|
|
1659
1659
|
function read(e) {
|
|
@@ -1671,8 +1671,8 @@ function read(e) {
|
|
|
1671
1671
|
} finally {
|
|
1672
1672
|
te = n;
|
|
1673
1673
|
}
|
|
1674
|
-
if (t.be &
|
|
1675
|
-
if (
|
|
1674
|
+
if (t.be & _) return r;
|
|
1675
|
+
if (X && re && t.H) {
|
|
1676
1676
|
const e = findLane(t.H);
|
|
1677
1677
|
const n = findLane(re);
|
|
1678
1678
|
if (e !== n && e.F.size > 0) {
|
|
@@ -1681,43 +1681,52 @@ function read(e) {
|
|
|
1681
1681
|
}
|
|
1682
1682
|
return i;
|
|
1683
1683
|
}
|
|
1684
|
-
if (
|
|
1684
|
+
if (Z) {
|
|
1685
1685
|
const t = e.I;
|
|
1686
|
-
const n =
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
if (
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1686
|
+
const n = Z;
|
|
1687
|
+
Z = false;
|
|
1688
|
+
let r = ne;
|
|
1689
|
+
if (r?.t) r = r.u;
|
|
1690
|
+
const i = t || e;
|
|
1691
|
+
const s = e;
|
|
1692
|
+
if (typeof s.L === "function") {
|
|
1693
|
+
const t = e;
|
|
1694
|
+
if (t._ & c) {
|
|
1695
|
+
t._ &= ~c;
|
|
1696
|
+
recompute(t, true);
|
|
1697
|
+
} else if (t._ & u) {
|
|
1698
|
+
recompute(t, true);
|
|
1699
|
+
} else {
|
|
1700
|
+
updateIfNecessary(t);
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
if (r && i.be & _ && i.be & b) {
|
|
1704
|
+
if (J && e !== r) link(e, r);
|
|
1705
|
+
Z = n;
|
|
1706
|
+
throw i.we;
|
|
1695
1707
|
}
|
|
1696
1708
|
if (t && e.G !== undefined) {
|
|
1697
|
-
if (e.G !== x && (t.ke || !!(t.be &
|
|
1709
|
+
if (e.G !== x && (t.ke || !!(t.be & _))) {
|
|
1698
1710
|
ee = true;
|
|
1699
1711
|
}
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
if (
|
|
1703
|
-
read(getPendingSignal(e));
|
|
1704
|
-
read(getPendingSignal(t));
|
|
1712
|
+
collectPendingSources(e);
|
|
1713
|
+
collectPendingSources(t);
|
|
1714
|
+
if (r && J) link(e, r);
|
|
1705
1715
|
} else {
|
|
1706
|
-
|
|
1707
|
-
if (t
|
|
1716
|
+
collectPendingSources(e);
|
|
1717
|
+
if (t) collectPendingSources(t);
|
|
1708
1718
|
}
|
|
1709
|
-
|
|
1710
|
-
return e.ue;
|
|
1719
|
+
Z = n;
|
|
1711
1720
|
}
|
|
1712
1721
|
let t = ne;
|
|
1713
1722
|
if (t?.t) t = t.u;
|
|
1714
1723
|
const n = e;
|
|
1715
1724
|
if (typeof n.L === "function") {
|
|
1716
1725
|
const t = e;
|
|
1717
|
-
if (t.
|
|
1718
|
-
t.
|
|
1726
|
+
if (t._ & c) {
|
|
1727
|
+
t._ &= ~c;
|
|
1719
1728
|
recompute(t, true);
|
|
1720
|
-
} else if (t.
|
|
1729
|
+
} else if (t._ & u) {
|
|
1721
1730
|
recompute(t, true);
|
|
1722
1731
|
}
|
|
1723
1732
|
}
|
|
@@ -1726,19 +1735,19 @@ function read(e) {
|
|
|
1726
1735
|
!n.L &&
|
|
1727
1736
|
r === e &&
|
|
1728
1737
|
e.G === undefined &&
|
|
1729
|
-
e.
|
|
1738
|
+
e.me === undefined &&
|
|
1730
1739
|
M === null &&
|
|
1731
1740
|
re === null &&
|
|
1732
1741
|
!se &&
|
|
1733
1742
|
true
|
|
1734
1743
|
) {
|
|
1735
|
-
if (t &&
|
|
1736
|
-
return !t || e.
|
|
1744
|
+
if (t && J) link(e, t);
|
|
1745
|
+
return !t || e.X === x ? e.ue : e.X;
|
|
1737
1746
|
}
|
|
1738
|
-
if (t &&
|
|
1747
|
+
if (t && J) {
|
|
1739
1748
|
link(e, t);
|
|
1740
1749
|
if (r.L) {
|
|
1741
|
-
const n = e.
|
|
1750
|
+
const n = e._ & o;
|
|
1742
1751
|
if (r.o >= (n ? Q.j : q.j)) {
|
|
1743
1752
|
markNode(t);
|
|
1744
1753
|
markHeap(n ? Q : q);
|
|
@@ -1750,57 +1759,57 @@ function read(e) {
|
|
|
1750
1759
|
}
|
|
1751
1760
|
}
|
|
1752
1761
|
}
|
|
1753
|
-
if (r.be &
|
|
1754
|
-
if (t && !(
|
|
1762
|
+
if (r.be & _) {
|
|
1763
|
+
if (t && !(X && r.V && M !== r.V)) {
|
|
1755
1764
|
if (re) {
|
|
1756
1765
|
const n = r.H;
|
|
1757
1766
|
const i = findLane(re);
|
|
1758
1767
|
if (n && findLane(n) === i && !hasActiveOverride(r)) {
|
|
1759
|
-
if (!
|
|
1768
|
+
if (!J && e !== t) link(e, t);
|
|
1760
1769
|
throw r.we;
|
|
1761
1770
|
}
|
|
1762
1771
|
} else {
|
|
1763
|
-
if (!
|
|
1772
|
+
if (!J && e !== t) link(e, t);
|
|
1764
1773
|
throw r.we;
|
|
1765
1774
|
}
|
|
1766
1775
|
} else if (t && r !== e && r.be & b) {
|
|
1767
|
-
if (!
|
|
1776
|
+
if (!J && e !== t) link(e, t);
|
|
1768
1777
|
throw r.we;
|
|
1769
1778
|
} else if (!t && r.be & b) {
|
|
1770
1779
|
throw r.we;
|
|
1771
1780
|
}
|
|
1772
1781
|
}
|
|
1773
|
-
if (e.L && e.be &
|
|
1774
|
-
if (e.
|
|
1782
|
+
if (e.L && e.be & m) {
|
|
1783
|
+
if (e._e < F) {
|
|
1775
1784
|
recompute(e);
|
|
1776
1785
|
return read(e);
|
|
1777
1786
|
} else throw e.we;
|
|
1778
1787
|
}
|
|
1779
|
-
if (se && t && t.
|
|
1780
|
-
const n = e.
|
|
1788
|
+
if (se && t && t.ge & y) {
|
|
1789
|
+
const n = e.me;
|
|
1781
1790
|
if (n !== undefined) {
|
|
1782
|
-
const r = n ===
|
|
1783
|
-
const i = e.
|
|
1784
|
-
if (i !== r) t.
|
|
1791
|
+
const r = n === N ? undefined : n;
|
|
1792
|
+
const i = e.X !== x ? e.X : e.ue;
|
|
1793
|
+
if (i !== r) t._ |= l;
|
|
1785
1794
|
return r;
|
|
1786
1795
|
}
|
|
1787
1796
|
}
|
|
1788
1797
|
if (e.G !== undefined && e.G !== x) {
|
|
1789
|
-
if (t &&
|
|
1798
|
+
if (t && X && shouldReadStashedOptimisticValue(e)) return e.ue;
|
|
1790
1799
|
return e.G;
|
|
1791
1800
|
}
|
|
1792
|
-
if (M !== null && re !== null && !te && e.
|
|
1801
|
+
if (M !== null && re !== null && !te && e.X !== x && r === e && !e.L && t) {
|
|
1793
1802
|
M.oe.add(t);
|
|
1794
1803
|
return e.ue;
|
|
1795
1804
|
}
|
|
1796
1805
|
const i =
|
|
1797
1806
|
!t ||
|
|
1798
|
-
(re !== null && (e.G !== undefined || e.H || (r === e &&
|
|
1799
|
-
e.
|
|
1800
|
-
(
|
|
1807
|
+
(re !== null && (e.G !== undefined || e.H || (r === e && X) || !!(r.be & _))) ||
|
|
1808
|
+
e.X === x ||
|
|
1809
|
+
(X && e.V && M !== e.V)
|
|
1801
1810
|
? e.ue
|
|
1802
|
-
: e.
|
|
1803
|
-
if (!t && r === e && typeof n.L === "function" && e.
|
|
1811
|
+
: e.X;
|
|
1812
|
+
if (!t && r === e && typeof n.L === "function" && e.ge & g && !(r.be & _) && !e.O) {
|
|
1804
1813
|
unobserved(e);
|
|
1805
1814
|
}
|
|
1806
1815
|
return i;
|
|
@@ -1809,7 +1818,7 @@ function setSignal(e, t) {
|
|
|
1809
1818
|
if (e.V && M !== e.V) z.initTransition(e.V);
|
|
1810
1819
|
const n = e.G !== undefined && !K;
|
|
1811
1820
|
const r = e.G !== undefined && e.G !== x;
|
|
1812
|
-
const i = n ? (r ? e.G : e.ue) : e.
|
|
1821
|
+
const i = n ? (r ? e.G : e.ue) : e.X === x ? e.ue : e.X;
|
|
1813
1822
|
if (typeof t === "function") t = t(i);
|
|
1814
1823
|
const s = !e.He || !e.He(i, t) || !!(e.be & b);
|
|
1815
1824
|
if (!s) {
|
|
@@ -1823,30 +1832,30 @@ function setSignal(e, t) {
|
|
|
1823
1832
|
const n = e.G === x;
|
|
1824
1833
|
if (!n) z.initTransition(resolveTransition(e));
|
|
1825
1834
|
if (n) {
|
|
1826
|
-
e.
|
|
1827
|
-
z
|
|
1835
|
+
e.X = e.ue;
|
|
1836
|
+
z.$.push(e);
|
|
1828
1837
|
}
|
|
1829
1838
|
e.B = true;
|
|
1830
1839
|
const r = getOrCreateLane(e);
|
|
1831
1840
|
e.H = r;
|
|
1832
1841
|
e.G = t;
|
|
1833
1842
|
} else {
|
|
1834
|
-
if (e.
|
|
1835
|
-
e.
|
|
1843
|
+
if (e.X === x) queuePendingNode(e);
|
|
1844
|
+
e.X = t;
|
|
1836
1845
|
}
|
|
1837
1846
|
if (e.Qe) updatePendingSignal(e);
|
|
1838
1847
|
if (e.qe) {
|
|
1839
1848
|
setSignal(e.qe, t);
|
|
1840
1849
|
}
|
|
1841
|
-
e.
|
|
1850
|
+
e._e = F;
|
|
1842
1851
|
insertSubs(e, n);
|
|
1843
1852
|
schedule();
|
|
1844
1853
|
return t;
|
|
1845
1854
|
}
|
|
1846
1855
|
function suppressComputedRecompute(e) {
|
|
1847
|
-
deleteFromHeap(e, e.
|
|
1848
|
-
if (!(e.
|
|
1849
|
-
e.
|
|
1856
|
+
deleteFromHeap(e, e._ & o ? Q : q);
|
|
1857
|
+
if (!(e._ & a) && e.X === x) queuePendingNode(e);
|
|
1858
|
+
e._ = (e._ & -4) | a;
|
|
1850
1859
|
}
|
|
1851
1860
|
function setMemo(e, t) {
|
|
1852
1861
|
const n = setSignal(e, t);
|
|
@@ -1855,14 +1864,14 @@ function setMemo(e, t) {
|
|
|
1855
1864
|
}
|
|
1856
1865
|
function runWithOwner(e, t) {
|
|
1857
1866
|
const n = ne;
|
|
1858
|
-
const r =
|
|
1867
|
+
const r = J;
|
|
1859
1868
|
ne = e;
|
|
1860
|
-
|
|
1869
|
+
J = false;
|
|
1861
1870
|
try {
|
|
1862
1871
|
return t();
|
|
1863
1872
|
} finally {
|
|
1864
1873
|
ne = n;
|
|
1865
|
-
|
|
1874
|
+
J = r;
|
|
1866
1875
|
}
|
|
1867
1876
|
}
|
|
1868
1877
|
function getPendingSignal(e) {
|
|
@@ -1875,14 +1884,24 @@ function getPendingSignal(e) {
|
|
|
1875
1884
|
}
|
|
1876
1885
|
return e.Qe;
|
|
1877
1886
|
}
|
|
1887
|
+
function collectPendingSources(e) {
|
|
1888
|
+
ie?.add(e);
|
|
1889
|
+
const t = e.I || e;
|
|
1890
|
+
if (t !== e) ie?.add(t);
|
|
1891
|
+
}
|
|
1878
1892
|
function computePendingState(e) {
|
|
1879
1893
|
const t = e;
|
|
1880
1894
|
const n = e.I;
|
|
1881
|
-
if (
|
|
1882
|
-
|
|
1895
|
+
if (e.T) {
|
|
1896
|
+
const n = e.T;
|
|
1897
|
+
if (n.be & _ && !(n.be & b)) return true;
|
|
1898
|
+
return e.X !== x && !(t.be & b);
|
|
1899
|
+
}
|
|
1900
|
+
if (n && e.X !== x) {
|
|
1901
|
+
return !n.ke && !(n.be & _);
|
|
1883
1902
|
}
|
|
1884
1903
|
if (e.G !== undefined && e.G !== x) {
|
|
1885
|
-
if (t.be &
|
|
1904
|
+
if (t.be & _ && !(t.be & b)) return true;
|
|
1886
1905
|
if (e.T) {
|
|
1887
1906
|
const t = e.H ? findLane(e.H) : null;
|
|
1888
1907
|
return !!(t && t.F.size > 0);
|
|
@@ -1892,8 +1911,8 @@ function computePendingState(e) {
|
|
|
1892
1911
|
if (e.G !== undefined && e.G === x && !e.T) {
|
|
1893
1912
|
return false;
|
|
1894
1913
|
}
|
|
1895
|
-
if (e.
|
|
1896
|
-
return !!(t.be &
|
|
1914
|
+
if (e.X !== x && !(t.be & b)) return true;
|
|
1915
|
+
return !!(t.be & _ && !(t.be & b));
|
|
1897
1916
|
}
|
|
1898
1917
|
function updatePendingSignal(e) {
|
|
1899
1918
|
if (e.Qe) {
|
|
@@ -1917,25 +1936,25 @@ function getLatestValueComputed(e) {
|
|
|
1917
1936
|
if (!e.qe) {
|
|
1918
1937
|
const t = te;
|
|
1919
1938
|
te = false;
|
|
1920
|
-
const n =
|
|
1921
|
-
|
|
1939
|
+
const n = Z;
|
|
1940
|
+
Z = false;
|
|
1922
1941
|
const r = ne;
|
|
1923
1942
|
ne = null;
|
|
1924
1943
|
e.qe = optimisticComputed(() => read(e));
|
|
1925
1944
|
e.qe.T = e;
|
|
1926
1945
|
ne = r;
|
|
1927
|
-
|
|
1946
|
+
Z = n;
|
|
1928
1947
|
te = t;
|
|
1929
1948
|
}
|
|
1930
1949
|
return e.qe;
|
|
1931
1950
|
}
|
|
1932
1951
|
function staleValues(e, t = true) {
|
|
1933
|
-
const n =
|
|
1934
|
-
|
|
1952
|
+
const n = X;
|
|
1953
|
+
X = t;
|
|
1935
1954
|
try {
|
|
1936
1955
|
return e();
|
|
1937
1956
|
} finally {
|
|
1938
|
-
|
|
1957
|
+
X = n;
|
|
1939
1958
|
}
|
|
1940
1959
|
}
|
|
1941
1960
|
function latest(e) {
|
|
@@ -1947,44 +1966,58 @@ function latest(e) {
|
|
|
1947
1966
|
te = t;
|
|
1948
1967
|
}
|
|
1949
1968
|
}
|
|
1950
|
-
function isPending(e
|
|
1951
|
-
const
|
|
1969
|
+
function isPending(e) {
|
|
1970
|
+
const t = Z;
|
|
1971
|
+
const n = ee;
|
|
1952
1972
|
const r = ie;
|
|
1953
|
-
|
|
1954
|
-
const s = t === true;
|
|
1955
|
-
$ = true;
|
|
1956
|
-
ie = s;
|
|
1973
|
+
Z = true;
|
|
1957
1974
|
ee = false;
|
|
1975
|
+
ie = new Set();
|
|
1976
|
+
const collectPending = () => {
|
|
1977
|
+
Z = false;
|
|
1978
|
+
try {
|
|
1979
|
+
ie.forEach(e => {
|
|
1980
|
+
if (read(getPendingSignal(e))) ee = true;
|
|
1981
|
+
});
|
|
1982
|
+
} finally {
|
|
1983
|
+
Z = true;
|
|
1984
|
+
}
|
|
1985
|
+
};
|
|
1958
1986
|
try {
|
|
1959
1987
|
e();
|
|
1988
|
+
collectPending();
|
|
1960
1989
|
return ee;
|
|
1961
1990
|
} catch (e) {
|
|
1962
|
-
|
|
1991
|
+
collectPending();
|
|
1992
|
+
if (e instanceof NotReadyError) {
|
|
1993
|
+
if (ee && !(e.source?.be & b)) return true;
|
|
1994
|
+
if (ne) throw e;
|
|
1995
|
+
}
|
|
1963
1996
|
return ee;
|
|
1964
1997
|
} finally {
|
|
1965
|
-
|
|
1998
|
+
Z = t;
|
|
1999
|
+
ee = n;
|
|
1966
2000
|
ie = r;
|
|
1967
|
-
ee = i;
|
|
1968
2001
|
}
|
|
1969
2002
|
}
|
|
1970
2003
|
function refresh(e) {
|
|
1971
|
-
let t =
|
|
1972
|
-
|
|
2004
|
+
let t = Y;
|
|
2005
|
+
Y = true;
|
|
1973
2006
|
try {
|
|
1974
2007
|
const t = e?.[j];
|
|
1975
2008
|
if (false && !t);
|
|
1976
|
-
if (t && typeof t.L === "function" && !(t.
|
|
2009
|
+
if (t && typeof t.L === "function" && !(t._ & u)) {
|
|
1977
2010
|
recompute(t);
|
|
1978
2011
|
}
|
|
1979
2012
|
} finally {
|
|
1980
|
-
|
|
2013
|
+
Y = t;
|
|
1981
2014
|
if (!t) {
|
|
1982
2015
|
schedule();
|
|
1983
2016
|
}
|
|
1984
2017
|
}
|
|
1985
2018
|
}
|
|
1986
2019
|
function isRefreshing() {
|
|
1987
|
-
return
|
|
2020
|
+
return Y;
|
|
1988
2021
|
}
|
|
1989
2022
|
function createContext(e, t) {
|
|
1990
2023
|
return { id: Symbol(t), defaultValue: e };
|
|
@@ -2016,15 +2049,15 @@ function effect(e, t, n, r) {
|
|
|
2016
2049
|
const s = createEffectNode(e, t, n, i ? v : O, notifyEffectStatus, r);
|
|
2017
2050
|
recompute(s, true);
|
|
2018
2051
|
!r?.defer &&
|
|
2019
|
-
(s
|
|
2052
|
+
(s.Z === v || r?.schedule ? s.te.enqueue(s.Z, runEffect.bind(null, s)) : runEffect(s));
|
|
2020
2053
|
}
|
|
2021
2054
|
function notifyEffectStatus(e, t) {
|
|
2022
2055
|
const n = e !== undefined ? e : this.be;
|
|
2023
2056
|
const r = t !== undefined ? t : this.we;
|
|
2024
|
-
if (n &
|
|
2057
|
+
if (n & m) {
|
|
2025
2058
|
let e = r;
|
|
2026
|
-
this.te.notify(this,
|
|
2027
|
-
if (this
|
|
2059
|
+
this.te.notify(this, _, 0);
|
|
2060
|
+
if (this.Z === v) {
|
|
2028
2061
|
try {
|
|
2029
2062
|
return this.Ke
|
|
2030
2063
|
? this.Ke(e, () => {
|
|
@@ -2036,13 +2069,13 @@ function notifyEffectStatus(e, t) {
|
|
|
2036
2069
|
e = t;
|
|
2037
2070
|
}
|
|
2038
2071
|
}
|
|
2039
|
-
if (!this.te.notify(this,
|
|
2040
|
-
} else if (this
|
|
2041
|
-
this.te.notify(this,
|
|
2072
|
+
if (!this.te.notify(this, m, m)) throw e;
|
|
2073
|
+
} else if (this.Z === O) {
|
|
2074
|
+
this.te.notify(this, _ | m, n, r);
|
|
2042
2075
|
}
|
|
2043
2076
|
}
|
|
2044
2077
|
function runEffect(e) {
|
|
2045
|
-
if (!e.ee || e.
|
|
2078
|
+
if (!e.ee || e._ & u) return;
|
|
2046
2079
|
e.Be?.();
|
|
2047
2080
|
e.Be = undefined;
|
|
2048
2081
|
try {
|
|
@@ -2055,8 +2088,8 @@ function runEffect(e) {
|
|
|
2055
2088
|
}
|
|
2056
2089
|
} catch (t) {
|
|
2057
2090
|
e.we = new StatusError(e, t);
|
|
2058
|
-
e.be |=
|
|
2059
|
-
if (!e.te.notify(e,
|
|
2091
|
+
e.be |= m;
|
|
2092
|
+
if (!e.te.notify(e, m, m)) throw t;
|
|
2060
2093
|
} finally {
|
|
2061
2094
|
e.De = e.ue;
|
|
2062
2095
|
e.ee = false;
|
|
@@ -2065,7 +2098,7 @@ function runEffect(e) {
|
|
|
2065
2098
|
GlobalQueue.he = runEffect;
|
|
2066
2099
|
function trackedEffect(e, t) {
|
|
2067
2100
|
const run = () => {
|
|
2068
|
-
if (!n.ee || n.
|
|
2101
|
+
if (!n.ee || n._ & u) return;
|
|
2069
2102
|
try {
|
|
2070
2103
|
n.ee = false;
|
|
2071
2104
|
recompute(n);
|
|
@@ -2082,15 +2115,15 @@ function trackedEffect(e, t) {
|
|
|
2082
2115
|
{ ...t, lazy: true }
|
|
2083
2116
|
);
|
|
2084
2117
|
n.Be = undefined;
|
|
2085
|
-
n.
|
|
2118
|
+
n.ge = (n.ge & ~g) | S;
|
|
2086
2119
|
n.ee = true;
|
|
2087
|
-
n
|
|
2120
|
+
n.Z = P;
|
|
2088
2121
|
n.Fe = (e, t) => {
|
|
2089
2122
|
const r = e !== undefined ? e : n.be;
|
|
2090
|
-
if (r &
|
|
2091
|
-
n.te.notify(n,
|
|
2123
|
+
if (r & m) {
|
|
2124
|
+
n.te.notify(n, _, 0);
|
|
2092
2125
|
const e = t !== undefined ? t : n.we;
|
|
2093
|
-
if (!n.te.notify(n,
|
|
2126
|
+
if (!n.te.notify(n, m, m)) throw e;
|
|
2094
2127
|
}
|
|
2095
2128
|
};
|
|
2096
2129
|
n.ne = run;
|
|
@@ -2152,7 +2185,7 @@ function accessor(e) {
|
|
|
2152
2185
|
function createSignal(e, t) {
|
|
2153
2186
|
if (typeof e === "function") {
|
|
2154
2187
|
const n = computed(e, t);
|
|
2155
|
-
n.
|
|
2188
|
+
n.ge &= ~g;
|
|
2156
2189
|
return [accessor(n), setMemo.bind(null, n)];
|
|
2157
2190
|
}
|
|
2158
2191
|
const n = signal(e, t);
|
|
@@ -2209,7 +2242,7 @@ function resolve(e) {
|
|
|
2209
2242
|
function createOptimistic(e, t) {
|
|
2210
2243
|
if (typeof e === "function") {
|
|
2211
2244
|
const n = optimisticComputed(e, t);
|
|
2212
|
-
n.
|
|
2245
|
+
n.ge &= ~g;
|
|
2213
2246
|
return [accessor(n), setSignal.bind(null, n)];
|
|
2214
2247
|
}
|
|
2215
2248
|
const n = optimisticSignal(e, t);
|
|
@@ -2217,7 +2250,7 @@ function createOptimistic(e, t) {
|
|
|
2217
2250
|
}
|
|
2218
2251
|
function onSettled(e) {
|
|
2219
2252
|
const t = getOwner();
|
|
2220
|
-
t && !(t.
|
|
2253
|
+
t && !(t.ge & S)
|
|
2221
2254
|
? createTrackedEffect(() => untrack(e), undefined)
|
|
2222
2255
|
: z.enqueue(v, () => {
|
|
2223
2256
|
const t = e();
|
|
@@ -2225,7 +2258,7 @@ function onSettled(e) {
|
|
|
2225
2258
|
});
|
|
2226
2259
|
}
|
|
2227
2260
|
function unwrap(e) {
|
|
2228
|
-
return e?.[
|
|
2261
|
+
return e?.[le]?.[ye] ?? e;
|
|
2229
2262
|
}
|
|
2230
2263
|
function getOverrideValue(e, t, n, r) {
|
|
2231
2264
|
if (r && n in r) return r[n];
|
|
@@ -2237,7 +2270,7 @@ function getAllKeys(e, t, n) {
|
|
|
2237
2270
|
return Array.from(new Set([...r, ...i]));
|
|
2238
2271
|
}
|
|
2239
2272
|
function applyState(e, t, n) {
|
|
2240
|
-
const r = t?.[
|
|
2273
|
+
const r = t?.[le];
|
|
2241
2274
|
if (!r) return;
|
|
2242
2275
|
if (r[pe] || r[he]) {
|
|
2243
2276
|
applyStateSlow(e, r, n);
|
|
@@ -2248,96 +2281,96 @@ function applyState(e, t, n) {
|
|
|
2248
2281
|
function applyStateFast(e, t, n) {
|
|
2249
2282
|
const r = t[de];
|
|
2250
2283
|
if (e === r) return;
|
|
2251
|
-
(t[
|
|
2284
|
+
(t[_e] || Oe).set(e, t[ce]);
|
|
2252
2285
|
t[de] = e;
|
|
2253
2286
|
if (Array.isArray(r)) {
|
|
2254
2287
|
let i = false;
|
|
2255
2288
|
const s = r.length;
|
|
2256
2289
|
if (e.length && s && e[0] && n(e[0]) != null) {
|
|
2257
|
-
let o, u,
|
|
2290
|
+
let o, u, f, l, c, a, d, p;
|
|
2258
2291
|
for (
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2292
|
+
f = 0, l = Math.min(s, e.length);
|
|
2293
|
+
f < l && ((a = r[f]) === e[f] || (a && e[f] && n(a) === n(e[f])));
|
|
2294
|
+
f++
|
|
2262
2295
|
) {
|
|
2263
|
-
applyState(e[
|
|
2296
|
+
applyState(e[f], wrap(a, t), n);
|
|
2264
2297
|
}
|
|
2265
2298
|
const h = new Array(e.length),
|
|
2266
|
-
|
|
2299
|
+
y = new Map();
|
|
2267
2300
|
for (
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2301
|
+
l = s - 1, c = e.length - 1;
|
|
2302
|
+
l >= f && c >= f && ((a = r[l]) === e[c] || (a && e[c] && n(a) === n(e[c])));
|
|
2303
|
+
l--, c--
|
|
2271
2304
|
) {
|
|
2272
2305
|
h[c] = a;
|
|
2273
2306
|
}
|
|
2274
|
-
if (
|
|
2275
|
-
for (u =
|
|
2307
|
+
if (f > c || f > l) {
|
|
2308
|
+
for (u = f; u <= c; u++) {
|
|
2276
2309
|
i = true;
|
|
2277
|
-
t[
|
|
2310
|
+
t[ye][u] && setSignal(t[ye][u], wrap(e[u], t));
|
|
2278
2311
|
}
|
|
2279
2312
|
for (; u < e.length; u++) {
|
|
2280
2313
|
i = true;
|
|
2281
2314
|
const r = wrap(h[u], t);
|
|
2282
|
-
t[
|
|
2315
|
+
t[ye][u] && setSignal(t[ye][u], r);
|
|
2283
2316
|
applyState(e[u], r, n);
|
|
2284
2317
|
}
|
|
2285
|
-
i && t[
|
|
2286
|
-
s !== e.length && t[
|
|
2318
|
+
i && t[ye][fe] && setSignal(t[ye][fe], void 0);
|
|
2319
|
+
s !== e.length && t[ye].length && setSignal(t[ye].length, e.length);
|
|
2287
2320
|
return;
|
|
2288
2321
|
}
|
|
2289
2322
|
d = new Array(c + 1);
|
|
2290
|
-
for (u = c; u >=
|
|
2323
|
+
for (u = c; u >= f; u--) {
|
|
2291
2324
|
a = e[u];
|
|
2292
2325
|
p = a ? n(a) : a;
|
|
2293
|
-
o =
|
|
2326
|
+
o = y.get(p);
|
|
2294
2327
|
d[u] = o === undefined ? -1 : o;
|
|
2295
|
-
|
|
2328
|
+
y.set(p, u);
|
|
2296
2329
|
}
|
|
2297
|
-
for (o =
|
|
2330
|
+
for (o = f; o <= l; o++) {
|
|
2298
2331
|
a = r[o];
|
|
2299
2332
|
p = a ? n(a) : a;
|
|
2300
|
-
u =
|
|
2333
|
+
u = y.get(p);
|
|
2301
2334
|
if (u !== undefined && u !== -1) {
|
|
2302
2335
|
h[u] = a;
|
|
2303
2336
|
u = d[u];
|
|
2304
|
-
|
|
2337
|
+
y.set(p, u);
|
|
2305
2338
|
}
|
|
2306
2339
|
}
|
|
2307
|
-
for (u =
|
|
2340
|
+
for (u = f; u < e.length; u++) {
|
|
2308
2341
|
if (u in h) {
|
|
2309
2342
|
const r = wrap(h[u], t);
|
|
2310
|
-
t[
|
|
2343
|
+
t[ye][u] && setSignal(t[ye][u], r);
|
|
2311
2344
|
applyState(e[u], r, n);
|
|
2312
|
-
} else t[
|
|
2345
|
+
} else t[ye][u] && setSignal(t[ye][u], wrap(e[u], t));
|
|
2313
2346
|
}
|
|
2314
|
-
if (
|
|
2347
|
+
if (f < e.length) i = true;
|
|
2315
2348
|
} else if (e.length) {
|
|
2316
2349
|
for (let i = 0, s = e.length; i < s; i++) {
|
|
2317
2350
|
const s = r[i];
|
|
2318
|
-
isWrappable(s) ? applyState(e[i], wrap(s, t), n) : t[
|
|
2351
|
+
isWrappable(s) ? applyState(e[i], wrap(s, t), n) : t[ye][i] && setSignal(t[ye][i], e[i]);
|
|
2319
2352
|
}
|
|
2320
2353
|
}
|
|
2321
2354
|
if (s !== e.length) {
|
|
2322
2355
|
i = true;
|
|
2323
|
-
t[
|
|
2356
|
+
t[ye].length && setSignal(t[ye].length, e.length);
|
|
2324
2357
|
}
|
|
2325
|
-
i && t[
|
|
2358
|
+
i && t[ye][fe] && setSignal(t[ye][fe], void 0);
|
|
2326
2359
|
return;
|
|
2327
2360
|
}
|
|
2328
|
-
let i = t[
|
|
2361
|
+
let i = t[ye];
|
|
2329
2362
|
if (i) {
|
|
2330
|
-
const s = i[
|
|
2363
|
+
const s = i[fe];
|
|
2331
2364
|
const o = s ? getAllKeys(r, undefined, e) : Object.keys(i);
|
|
2332
|
-
for (let u = 0,
|
|
2333
|
-
const
|
|
2334
|
-
const
|
|
2335
|
-
const c = unwrap(r[
|
|
2336
|
-
let a = unwrap(e[
|
|
2365
|
+
for (let u = 0, f = o.length; u < f; u++) {
|
|
2366
|
+
const f = o[u];
|
|
2367
|
+
const l = i[f];
|
|
2368
|
+
const c = unwrap(r[f]);
|
|
2369
|
+
let a = unwrap(e[f]);
|
|
2337
2370
|
if (c === a) continue;
|
|
2338
2371
|
if (!c || !isWrappable(c) || !isWrappable(a) || (n(c) != null && n(c) !== n(a))) {
|
|
2339
2372
|
s && setSignal(s, void 0);
|
|
2340
|
-
|
|
2373
|
+
l && setSignal(l, isWrappable(a) ? wrap(a, t) : a);
|
|
2341
2374
|
} else applyState(a, wrap(c, t), n);
|
|
2342
2375
|
}
|
|
2343
2376
|
}
|
|
@@ -2353,15 +2386,15 @@ function applyStateSlow(e, t, n) {
|
|
|
2353
2386
|
const r = t[de];
|
|
2354
2387
|
const i = t[pe];
|
|
2355
2388
|
const s = t[he];
|
|
2356
|
-
let o = t[
|
|
2357
|
-
(t[
|
|
2389
|
+
let o = t[ye];
|
|
2390
|
+
(t[_e] || Oe).set(e, t[ce]);
|
|
2358
2391
|
t[de] = e;
|
|
2359
2392
|
t[pe] = undefined;
|
|
2360
2393
|
if (Array.isArray(r)) {
|
|
2361
2394
|
let o = false;
|
|
2362
2395
|
const u = getOverrideValue(r, i, "length", s);
|
|
2363
2396
|
if (e.length && u && e[0] && n(e[0]) != null) {
|
|
2364
|
-
let
|
|
2397
|
+
let f, l, c, a, d, p, h, y;
|
|
2365
2398
|
for (
|
|
2366
2399
|
c = 0, a = Math.min(u, e.length);
|
|
2367
2400
|
c < a && ((p = getOverrideValue(r, i, c, s)) === e[c] || (p && e[c] && n(p) === n(e[c])));
|
|
@@ -2370,7 +2403,7 @@ function applyStateSlow(e, t, n) {
|
|
|
2370
2403
|
applyState(e[c], wrap(p, t), n);
|
|
2371
2404
|
}
|
|
2372
2405
|
const S = new Array(e.length),
|
|
2373
|
-
|
|
2406
|
+
g = new Map();
|
|
2374
2407
|
for (
|
|
2375
2408
|
a = u - 1, d = e.length - 1;
|
|
2376
2409
|
a >= c &&
|
|
@@ -2381,64 +2414,64 @@ function applyStateSlow(e, t, n) {
|
|
|
2381
2414
|
S[d] = p;
|
|
2382
2415
|
}
|
|
2383
2416
|
if (c > d || c > a) {
|
|
2384
|
-
for (
|
|
2417
|
+
for (l = c; l <= d; l++) {
|
|
2385
2418
|
o = true;
|
|
2386
|
-
t[
|
|
2419
|
+
t[ye][l] && setSignal(t[ye][l], wrap(e[l], t));
|
|
2387
2420
|
}
|
|
2388
|
-
for (;
|
|
2421
|
+
for (; l < e.length; l++) {
|
|
2389
2422
|
o = true;
|
|
2390
|
-
const r = wrap(S[
|
|
2391
|
-
t[
|
|
2392
|
-
applyState(e[
|
|
2423
|
+
const r = wrap(S[l], t);
|
|
2424
|
+
t[ye][l] && setSignal(t[ye][l], r);
|
|
2425
|
+
applyState(e[l], r, n);
|
|
2393
2426
|
}
|
|
2394
|
-
o && t[
|
|
2395
|
-
u !== e.length && t[
|
|
2427
|
+
o && t[ye][fe] && setSignal(t[ye][fe], void 0);
|
|
2428
|
+
u !== e.length && t[ye].length && setSignal(t[ye].length, e.length);
|
|
2396
2429
|
return;
|
|
2397
2430
|
}
|
|
2398
2431
|
h = new Array(d + 1);
|
|
2399
|
-
for (
|
|
2400
|
-
p = e[
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
h[
|
|
2404
|
-
|
|
2405
|
-
}
|
|
2406
|
-
for (
|
|
2407
|
-
p = getOverrideValue(r, i,
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
if (
|
|
2411
|
-
S[
|
|
2412
|
-
|
|
2413
|
-
|
|
2432
|
+
for (l = d; l >= c; l--) {
|
|
2433
|
+
p = e[l];
|
|
2434
|
+
y = p ? n(p) : p;
|
|
2435
|
+
f = g.get(y);
|
|
2436
|
+
h[l] = f === undefined ? -1 : f;
|
|
2437
|
+
g.set(y, l);
|
|
2438
|
+
}
|
|
2439
|
+
for (f = c; f <= a; f++) {
|
|
2440
|
+
p = getOverrideValue(r, i, f, s);
|
|
2441
|
+
y = p ? n(p) : p;
|
|
2442
|
+
l = g.get(y);
|
|
2443
|
+
if (l !== undefined && l !== -1) {
|
|
2444
|
+
S[l] = p;
|
|
2445
|
+
l = h[l];
|
|
2446
|
+
g.set(y, l);
|
|
2414
2447
|
}
|
|
2415
2448
|
}
|
|
2416
|
-
for (
|
|
2417
|
-
if (
|
|
2418
|
-
const r = wrap(S[
|
|
2419
|
-
t[
|
|
2420
|
-
applyState(e[
|
|
2421
|
-
} else t[
|
|
2449
|
+
for (l = c; l < e.length; l++) {
|
|
2450
|
+
if (l in S) {
|
|
2451
|
+
const r = wrap(S[l], t);
|
|
2452
|
+
t[ye][l] && setSignal(t[ye][l], r);
|
|
2453
|
+
applyState(e[l], r, n);
|
|
2454
|
+
} else t[ye][l] && setSignal(t[ye][l], wrap(e[l], t));
|
|
2422
2455
|
}
|
|
2423
2456
|
if (c < e.length) o = true;
|
|
2424
2457
|
} else if (e.length) {
|
|
2425
2458
|
for (let o = 0, u = e.length; o < u; o++) {
|
|
2426
2459
|
const u = getOverrideValue(r, i, o, s);
|
|
2427
|
-
isWrappable(u) ? applyState(e[o], wrap(u, t), n) : t[
|
|
2460
|
+
isWrappable(u) ? applyState(e[o], wrap(u, t), n) : t[ye][o] && setSignal(t[ye][o], e[o]);
|
|
2428
2461
|
}
|
|
2429
2462
|
}
|
|
2430
2463
|
if (u !== e.length) {
|
|
2431
2464
|
o = true;
|
|
2432
|
-
t[
|
|
2465
|
+
t[ye].length && setSignal(t[ye].length, e.length);
|
|
2433
2466
|
}
|
|
2434
|
-
o && t[
|
|
2467
|
+
o && t[ye][fe] && setSignal(t[ye][fe], void 0);
|
|
2435
2468
|
return;
|
|
2436
2469
|
}
|
|
2437
2470
|
if (o) {
|
|
2438
|
-
const u = o[
|
|
2439
|
-
const
|
|
2440
|
-
for (let
|
|
2441
|
-
const c = l
|
|
2471
|
+
const u = o[fe];
|
|
2472
|
+
const f = u ? getAllKeys(r, i, e) : Object.keys(o);
|
|
2473
|
+
for (let l = 0, c = f.length; l < c; l++) {
|
|
2474
|
+
const c = f[l];
|
|
2442
2475
|
const a = o[c];
|
|
2443
2476
|
const d = unwrap(getOverrideValue(r, i, c, s));
|
|
2444
2477
|
let p = unwrap(e[c]);
|
|
@@ -2472,8 +2505,8 @@ function createProjectionInternal(e, t, n) {
|
|
|
2472
2505
|
const i = new WeakMap();
|
|
2473
2506
|
const wrapper = e => {
|
|
2474
2507
|
e[we] = wrapProjection;
|
|
2475
|
-
e[
|
|
2476
|
-
Object.defineProperty(e,
|
|
2508
|
+
e[_e] = i;
|
|
2509
|
+
Object.defineProperty(e, me, {
|
|
2477
2510
|
get() {
|
|
2478
2511
|
return r;
|
|
2479
2512
|
},
|
|
@@ -2482,7 +2515,7 @@ function createProjectionInternal(e, t, n) {
|
|
|
2482
2515
|
};
|
|
2483
2516
|
const wrapProjection = e => {
|
|
2484
2517
|
if (i.has(e)) return i.get(e);
|
|
2485
|
-
if (e[
|
|
2518
|
+
if (e[le]?.[we] === wrapProjection) return e;
|
|
2486
2519
|
const t = createStoreProxy(e, xe, wrapper);
|
|
2487
2520
|
i.set(e, t);
|
|
2488
2521
|
return t;
|
|
@@ -2492,7 +2525,7 @@ function createProjectionInternal(e, t, n) {
|
|
|
2492
2525
|
if (!r) r = getOwner();
|
|
2493
2526
|
runProjectionComputed(s, e, n?.key || "id");
|
|
2494
2527
|
}, undefined);
|
|
2495
|
-
r.
|
|
2528
|
+
r.ge &= ~g;
|
|
2496
2529
|
return { store: s, node: r };
|
|
2497
2530
|
}
|
|
2498
2531
|
function createProjection(e, t, n) {
|
|
@@ -2571,19 +2604,19 @@ function createWriteTraps(e) {
|
|
|
2571
2604
|
};
|
|
2572
2605
|
return t;
|
|
2573
2606
|
}
|
|
2574
|
-
const
|
|
2575
|
-
|
|
2607
|
+
const fe = Symbol(0),
|
|
2608
|
+
le = Symbol(0),
|
|
2576
2609
|
ce = Symbol(0),
|
|
2577
2610
|
ae = Symbol(0);
|
|
2578
2611
|
const de = "v",
|
|
2579
2612
|
pe = "o",
|
|
2580
2613
|
he = "x",
|
|
2581
|
-
|
|
2614
|
+
ye = "n",
|
|
2582
2615
|
Se = "h",
|
|
2583
|
-
|
|
2616
|
+
ge = "c",
|
|
2584
2617
|
we = "w",
|
|
2585
|
-
|
|
2586
|
-
|
|
2618
|
+
_e = "l",
|
|
2619
|
+
me = "f",
|
|
2587
2620
|
be = "p";
|
|
2588
2621
|
function createStoreProxy(e, t = xe, n) {
|
|
2589
2622
|
let r;
|
|
@@ -2592,10 +2625,10 @@ function createStoreProxy(e, t = xe, n) {
|
|
|
2592
2625
|
r.v = e;
|
|
2593
2626
|
} else {
|
|
2594
2627
|
r = { v: e };
|
|
2595
|
-
const t = e?.[
|
|
2628
|
+
const t = e?.[le]?.[de] ?? e;
|
|
2596
2629
|
const n = Object.getPrototypeOf(t);
|
|
2597
2630
|
if (n !== null && n !== Object.prototype) {
|
|
2598
|
-
r[
|
|
2631
|
+
r[ge] = true;
|
|
2599
2632
|
}
|
|
2600
2633
|
}
|
|
2601
2634
|
n && n(r);
|
|
@@ -2620,7 +2653,17 @@ function writeOnly(e) {
|
|
|
2620
2653
|
return ve || !!Pe?.has(e);
|
|
2621
2654
|
}
|
|
2622
2655
|
function unwrapStoreValue(e) {
|
|
2623
|
-
return e?.[
|
|
2656
|
+
return e?.[le]?.[de] ?? e;
|
|
2657
|
+
}
|
|
2658
|
+
function isPrototypePollutionKey$1(e) {
|
|
2659
|
+
return e === "__proto__" || e === "constructor" || e === "prototype";
|
|
2660
|
+
}
|
|
2661
|
+
function hasOwnStoreProperty(e, t) {
|
|
2662
|
+
const n = e[he];
|
|
2663
|
+
if (n && Object.prototype.hasOwnProperty.call(n, t) && n[t] !== ae) return true;
|
|
2664
|
+
const r = e[pe];
|
|
2665
|
+
if (r && Object.prototype.hasOwnProperty.call(r, t) && r[t] !== ae) return true;
|
|
2666
|
+
return Object.prototype.hasOwnProperty.call(unwrapStoreValue(e[de]), t);
|
|
2624
2667
|
}
|
|
2625
2668
|
function hasInheritedAccessor(e, t) {
|
|
2626
2669
|
let n = Object.getPrototypeOf(e);
|
|
@@ -2653,13 +2696,13 @@ function getNode(e, t, n, r, i = isEqual, s, o) {
|
|
|
2653
2696
|
}
|
|
2654
2697
|
if (o && t in o) {
|
|
2655
2698
|
const e = o[t];
|
|
2656
|
-
u.
|
|
2699
|
+
u.me = e === undefined ? N : e;
|
|
2657
2700
|
oe?.add(u);
|
|
2658
2701
|
}
|
|
2659
2702
|
return (e[t] = u);
|
|
2660
2703
|
}
|
|
2661
|
-
function trackSelf(e, t =
|
|
2662
|
-
getObserver() && read(getNode(getNodes(e,
|
|
2704
|
+
function trackSelf(e, t = fe) {
|
|
2705
|
+
getObserver() && read(getNode(getNodes(e, ye), t, undefined, e[me], false, e[be]));
|
|
2663
2706
|
}
|
|
2664
2707
|
function getKeys(e, t, n = true) {
|
|
2665
2708
|
const r = untrack(() => (n ? Object.keys(e) : Reflect.ownKeys(e)));
|
|
@@ -2682,20 +2725,20 @@ function getPropertyDescriptor(e, t, n) {
|
|
|
2682
2725
|
}
|
|
2683
2726
|
function prepareStoreWrite(e, t, n) {
|
|
2684
2727
|
if (e[be]) {
|
|
2685
|
-
const t = e[
|
|
2728
|
+
const t = e[me];
|
|
2686
2729
|
if (t?.V) {
|
|
2687
2730
|
z.initTransition(t.V);
|
|
2688
2731
|
}
|
|
2689
2732
|
}
|
|
2690
2733
|
const r = e[de];
|
|
2691
2734
|
const i = r[n];
|
|
2692
|
-
if (se && typeof n !== "symbol" && !((e[
|
|
2693
|
-
if (!e[
|
|
2694
|
-
e[
|
|
2735
|
+
if (se && typeof n !== "symbol" && !((e[me]?.be ?? 0) & _)) {
|
|
2736
|
+
if (!e[C]) {
|
|
2737
|
+
e[C] = Object.create(null);
|
|
2695
2738
|
oe?.add(e);
|
|
2696
2739
|
}
|
|
2697
|
-
if (!(n in e[
|
|
2698
|
-
e[
|
|
2740
|
+
if (!(n in e[C])) {
|
|
2741
|
+
e[C][n] = i;
|
|
2699
2742
|
}
|
|
2700
2743
|
}
|
|
2701
2744
|
const s = e[be] && !K;
|
|
@@ -2706,132 +2749,134 @@ function prepareStoreWrite(e, t, n) {
|
|
|
2706
2749
|
function upsertStoreNode(e, t, n, r, i) {
|
|
2707
2750
|
if (t[n]) return t[n];
|
|
2708
2751
|
const s = isWrappable(r) ? wrap(r, e) : r;
|
|
2709
|
-
const o = getNode(t, n, s, e[
|
|
2752
|
+
const o = getNode(t, n, s, e[me], isEqual, e[be], i);
|
|
2710
2753
|
registerTransientStoreNode(o);
|
|
2711
2754
|
return o;
|
|
2712
2755
|
}
|
|
2713
2756
|
function notifyStoreProperty(e, t, n, r, i, s) {
|
|
2714
2757
|
const o = K || e[be];
|
|
2715
2758
|
const u = n !== "delete";
|
|
2716
|
-
const
|
|
2717
|
-
if (
|
|
2718
|
-
setSignal(
|
|
2759
|
+
const f = e[Se]?.[t];
|
|
2760
|
+
if (f) {
|
|
2761
|
+
setSignal(f, u);
|
|
2719
2762
|
} else if (!o && n !== "invalidate" && s !== u) {
|
|
2720
2763
|
const n = upsertStoreNode(e, getNodes(e, Se), t, s);
|
|
2721
2764
|
setSignal(n, u);
|
|
2722
2765
|
}
|
|
2723
|
-
const
|
|
2766
|
+
const l = getNodes(e, ye);
|
|
2724
2767
|
if (n === "set") {
|
|
2725
|
-
if (
|
|
2726
|
-
setSignal(
|
|
2768
|
+
if (l[t]) {
|
|
2769
|
+
setSignal(l[t], () => (isWrappable(r) ? wrap(r, e) : r));
|
|
2727
2770
|
} else if (!o) {
|
|
2728
|
-
const n = upsertStoreNode(e,
|
|
2771
|
+
const n = upsertStoreNode(e, l, t, i, e[C]);
|
|
2729
2772
|
setSignal(n, () => (isWrappable(r) ? wrap(r, e) : r));
|
|
2730
2773
|
}
|
|
2731
2774
|
} else if (n === "invalidate") {
|
|
2732
|
-
if (
|
|
2733
|
-
setSignal(
|
|
2734
|
-
delete
|
|
2775
|
+
if (l[t]) {
|
|
2776
|
+
setSignal(l[t], {});
|
|
2777
|
+
delete l[t];
|
|
2735
2778
|
}
|
|
2736
2779
|
} else {
|
|
2737
|
-
if (
|
|
2738
|
-
setSignal(
|
|
2780
|
+
if (l[t]) {
|
|
2781
|
+
setSignal(l[t], undefined);
|
|
2739
2782
|
} else if (!o) {
|
|
2740
|
-
const n = upsertStoreNode(e,
|
|
2783
|
+
const n = upsertStoreNode(e, l, t, i, e[C]);
|
|
2741
2784
|
setSignal(n, undefined);
|
|
2742
2785
|
}
|
|
2743
2786
|
}
|
|
2744
|
-
|
|
2787
|
+
l[fe] && setSignal(l[fe], undefined);
|
|
2745
2788
|
}
|
|
2746
2789
|
let Pe = null;
|
|
2747
2790
|
const xe = {
|
|
2748
2791
|
get(e, t, n) {
|
|
2749
|
-
if (t ===
|
|
2792
|
+
if (t === le) return e;
|
|
2750
2793
|
if (t === ce) return n;
|
|
2751
|
-
if (t === j) return e[
|
|
2752
|
-
if (t ===
|
|
2794
|
+
if (t === j) return e[me];
|
|
2795
|
+
if (t === fe) {
|
|
2753
2796
|
trackSelf(e);
|
|
2754
2797
|
return n;
|
|
2755
2798
|
}
|
|
2756
|
-
const r = getNodes(e,
|
|
2799
|
+
const r = getNodes(e, ye);
|
|
2757
2800
|
const i = r[t];
|
|
2758
2801
|
const s = e[de];
|
|
2759
2802
|
if (
|
|
2760
2803
|
!i &&
|
|
2761
2804
|
!e[pe] &&
|
|
2762
2805
|
!e[he] &&
|
|
2763
|
-
!e[
|
|
2806
|
+
!e[ge] &&
|
|
2764
2807
|
!e[be] &&
|
|
2765
|
-
!e[
|
|
2766
|
-
!s[
|
|
2808
|
+
!e[C] &&
|
|
2809
|
+
!s[le] &&
|
|
2767
2810
|
!(t in s) &&
|
|
2768
2811
|
getObserver() &&
|
|
2769
2812
|
!writeOnly(n)
|
|
2770
2813
|
) {
|
|
2771
|
-
return read(getNode(r, t, undefined, e[
|
|
2814
|
+
return read(getNode(r, t, undefined, e[me]));
|
|
2772
2815
|
}
|
|
2773
2816
|
const o = e[he] && t in e[he];
|
|
2774
2817
|
const u = o || (e[pe] && t in e[pe]);
|
|
2775
|
-
const
|
|
2776
|
-
const
|
|
2818
|
+
const f = !!e[de][le];
|
|
2819
|
+
const l = o ? e[he] : e[pe] && t in e[pe] ? e[pe] : e[de];
|
|
2777
2820
|
if (!i) {
|
|
2778
|
-
const r = Object.getOwnPropertyDescriptor(
|
|
2821
|
+
const r = Object.getOwnPropertyDescriptor(l, t);
|
|
2779
2822
|
if (r && r.get) return r.get.call(n);
|
|
2780
|
-
if (!r && !u && e[
|
|
2781
|
-
const e = unwrapStoreValue(
|
|
2823
|
+
if (!r && !u && e[ge]) {
|
|
2824
|
+
const e = unwrapStoreValue(l);
|
|
2782
2825
|
if (hasInheritedAccessor(e, t)) {
|
|
2783
|
-
return Reflect.get(
|
|
2826
|
+
return Reflect.get(l, t, n);
|
|
2784
2827
|
}
|
|
2785
2828
|
}
|
|
2786
2829
|
}
|
|
2787
2830
|
if (writeOnly(n)) {
|
|
2831
|
+
if (isPrototypePollutionKey$1(t) && !hasOwnStoreProperty(e, t)) return undefined;
|
|
2788
2832
|
let n =
|
|
2789
|
-
i && (u || !
|
|
2833
|
+
i && (u || !f) ? (i.G !== undefined && i.G !== x ? i.G : i.X !== x ? i.X : i.ue) : l[t];
|
|
2790
2834
|
n === ae && (n = undefined);
|
|
2791
2835
|
if (!isWrappable(n)) return n;
|
|
2792
2836
|
const r = wrap(n, e);
|
|
2793
2837
|
Pe?.add(r);
|
|
2794
2838
|
return r;
|
|
2795
2839
|
}
|
|
2796
|
-
let c = i ? (u || !
|
|
2840
|
+
let c = i ? (u || !f ? read(r[t]) : (read(r[t]), l[t])) : l[t];
|
|
2797
2841
|
c === ae && (c = undefined);
|
|
2798
2842
|
if (!i) {
|
|
2799
|
-
if (!u && typeof c === "function" && !
|
|
2843
|
+
if (!u && typeof c === "function" && !l.hasOwnProperty(t)) {
|
|
2800
2844
|
let t;
|
|
2801
2845
|
return !Array.isArray(e[de]) && (t = Object.getPrototypeOf(e[de])) && t !== Object.prototype
|
|
2802
|
-
? c.bind(
|
|
2846
|
+
? c.bind(l)
|
|
2803
2847
|
: c;
|
|
2804
2848
|
} else if (getObserver()) {
|
|
2805
|
-
return read(getNode(r, t, isWrappable(c) ? wrap(c, e) : c, e[
|
|
2849
|
+
return read(getNode(r, t, isWrappable(c) ? wrap(c, e) : c, e[me], isEqual, e[be], e[C]));
|
|
2806
2850
|
}
|
|
2807
2851
|
}
|
|
2808
2852
|
return isWrappable(c) ? wrap(c, e) : c;
|
|
2809
2853
|
},
|
|
2810
2854
|
has(e, t) {
|
|
2811
|
-
if (t === ce || t ===
|
|
2855
|
+
if (t === ce || t === fe || t === "__proto__") return true;
|
|
2812
2856
|
const n =
|
|
2813
2857
|
e[he] && t in e[he] ? e[he][t] !== ae : e[pe] && t in e[pe] ? e[pe][t] !== ae : t in e[de];
|
|
2814
2858
|
if (writeOnly(e[ce])) return n;
|
|
2815
2859
|
const r = getNodes(e, Se);
|
|
2816
2860
|
if (r[t]) return read(r[t]);
|
|
2817
2861
|
if (getObserver()) {
|
|
2818
|
-
return read(getNode(r, t, n, e[
|
|
2862
|
+
return read(getNode(r, t, n, e[me], isEqual, e[be]));
|
|
2819
2863
|
}
|
|
2820
2864
|
return n;
|
|
2821
2865
|
},
|
|
2822
2866
|
set(e, t, n) {
|
|
2867
|
+
if (t === "__proto__") return true;
|
|
2823
2868
|
const r = e[ce];
|
|
2824
2869
|
if (writeOnly(r)) {
|
|
2825
2870
|
untrack(() => {
|
|
2826
2871
|
const { base: i, overrideKey: s, state: o } = prepareStoreWrite(e, r, t);
|
|
2827
2872
|
const u = e[he] && t in e[he] ? e[he][t] : e[pe] && t in e[pe] ? e[pe][t] : i;
|
|
2828
|
-
const
|
|
2873
|
+
const f =
|
|
2829
2874
|
e[he] && t in e[he]
|
|
2830
2875
|
? e[he][t] !== ae
|
|
2831
2876
|
: e[pe] && t in e[pe]
|
|
2832
2877
|
? e[pe][t] !== ae
|
|
2833
2878
|
: t in e[de];
|
|
2834
|
-
const
|
|
2879
|
+
const l = unwrapStoreValue(n);
|
|
2835
2880
|
const c = Array.isArray(o) && t !== "length";
|
|
2836
2881
|
const a = c ? parseInt(t) + 1 : 0;
|
|
2837
2882
|
const d =
|
|
@@ -2842,20 +2887,20 @@ const xe = {
|
|
|
2842
2887
|
? e[pe].length
|
|
2843
2888
|
: o.length);
|
|
2844
2889
|
const p = c && a > d ? a : undefined;
|
|
2845
|
-
if (u ===
|
|
2846
|
-
if (
|
|
2890
|
+
if (u === l && p === undefined) return true;
|
|
2891
|
+
if (l !== undefined && l === i && p === undefined) delete e[s]?.[t];
|
|
2847
2892
|
else {
|
|
2848
2893
|
const n = e[s] || (e[s] = Object.create(null));
|
|
2849
|
-
n[t] =
|
|
2894
|
+
n[t] = l;
|
|
2850
2895
|
if (p !== undefined) n.length = p;
|
|
2851
2896
|
}
|
|
2852
|
-
notifyStoreProperty(e, t, "set",
|
|
2897
|
+
notifyStoreProperty(e, t, "set", l, u, f);
|
|
2853
2898
|
if (Array.isArray(o) && t !== "length" && p !== undefined) {
|
|
2854
|
-
const t = getNodes(e,
|
|
2899
|
+
const t = getNodes(e, ye);
|
|
2855
2900
|
if (t.length) {
|
|
2856
2901
|
setSignal(t.length, p);
|
|
2857
2902
|
} else if (!K && !e[be]) {
|
|
2858
|
-
const n = upsertStoreNode(e, t, "length", d, e[
|
|
2903
|
+
const n = upsertStoreNode(e, t, "length", d, e[C]);
|
|
2859
2904
|
setSignal(n, p);
|
|
2860
2905
|
}
|
|
2861
2906
|
}
|
|
@@ -2865,6 +2910,7 @@ const xe = {
|
|
|
2865
2910
|
return true;
|
|
2866
2911
|
},
|
|
2867
2912
|
defineProperty(e, t, n) {
|
|
2913
|
+
if (t === "__proto__") return true;
|
|
2868
2914
|
const r = e[ce];
|
|
2869
2915
|
if (writeOnly(r)) {
|
|
2870
2916
|
untrack(() => {
|
|
@@ -2878,6 +2924,7 @@ const xe = {
|
|
|
2878
2924
|
return true;
|
|
2879
2925
|
},
|
|
2880
2926
|
deleteProperty(e, t) {
|
|
2927
|
+
if (t === "__proto__") return true;
|
|
2881
2928
|
const n = e[he]?.[t] === ae;
|
|
2882
2929
|
const r = e[pe]?.[t] === ae;
|
|
2883
2930
|
if (writeOnly(e[ce]) && !n && !r) {
|
|
@@ -2959,7 +3006,7 @@ function createStore(e, t, n) {
|
|
|
2959
3006
|
];
|
|
2960
3007
|
}
|
|
2961
3008
|
function createOptimisticStore(e, t, n) {
|
|
2962
|
-
GlobalQueue.
|
|
3009
|
+
GlobalQueue.ye ||= clearOptimisticStore;
|
|
2963
3010
|
const r = typeof e === "function";
|
|
2964
3011
|
const i = r ? t : e;
|
|
2965
3012
|
const s = r ? e : undefined;
|
|
@@ -2967,10 +3014,10 @@ function createOptimisticStore(e, t, n) {
|
|
|
2967
3014
|
return [o, e => storeSetter(o, e)];
|
|
2968
3015
|
}
|
|
2969
3016
|
function clearOptimisticStore(e) {
|
|
2970
|
-
const t = e[
|
|
3017
|
+
const t = e[le];
|
|
2971
3018
|
if (!t || !t[he]) return;
|
|
2972
3019
|
const n = t[he];
|
|
2973
|
-
const r = t[
|
|
3020
|
+
const r = t[ye];
|
|
2974
3021
|
setProjectionWriteActive(true);
|
|
2975
3022
|
try {
|
|
2976
3023
|
if (r) {
|
|
@@ -2982,9 +3029,9 @@ function clearOptimisticStore(e) {
|
|
|
2982
3029
|
setSignal(r[e], isWrappable(i) ? wrap(i, t) : i);
|
|
2983
3030
|
}
|
|
2984
3031
|
}
|
|
2985
|
-
if (r[
|
|
2986
|
-
r[
|
|
2987
|
-
setSignal(r[
|
|
3032
|
+
if (r[fe]) {
|
|
3033
|
+
r[fe].H = undefined;
|
|
3034
|
+
setSignal(r[fe], undefined);
|
|
2988
3035
|
}
|
|
2989
3036
|
}
|
|
2990
3037
|
} finally {
|
|
@@ -2997,9 +3044,9 @@ function createOptimisticProjectionInternal(e, t, n) {
|
|
|
2997
3044
|
const i = new WeakMap();
|
|
2998
3045
|
const wrapper = e => {
|
|
2999
3046
|
e[we] = wrapProjection;
|
|
3000
|
-
e[
|
|
3047
|
+
e[_e] = i;
|
|
3001
3048
|
e[be] = true;
|
|
3002
|
-
Object.defineProperty(e,
|
|
3049
|
+
Object.defineProperty(e, me, {
|
|
3003
3050
|
get() {
|
|
3004
3051
|
return r;
|
|
3005
3052
|
},
|
|
@@ -3008,7 +3055,7 @@ function createOptimisticProjectionInternal(e, t, n) {
|
|
|
3008
3055
|
};
|
|
3009
3056
|
const wrapProjection = e => {
|
|
3010
3057
|
if (i.has(e)) return i.get(e);
|
|
3011
|
-
if (e[
|
|
3058
|
+
if (e[le]?.[we] === wrapProjection) return e;
|
|
3012
3059
|
const t = createStoreProxy(e, xe, wrapper);
|
|
3013
3060
|
i.set(e, t);
|
|
3014
3061
|
return t;
|
|
@@ -3031,11 +3078,11 @@ function createOptimisticProjectionInternal(e, t, n) {
|
|
|
3031
3078
|
setProjectionWriteActive(false);
|
|
3032
3079
|
}
|
|
3033
3080
|
}, undefined);
|
|
3034
|
-
r.
|
|
3081
|
+
r.ge &= ~g;
|
|
3035
3082
|
}
|
|
3036
3083
|
return { store: s, node: r };
|
|
3037
3084
|
}
|
|
3038
|
-
const
|
|
3085
|
+
const Ne = Symbol(0);
|
|
3039
3086
|
function isPrototypePollutionKey(e) {
|
|
3040
3087
|
return e === "__proto__" || e === "constructor" || e === "prototype";
|
|
3041
3088
|
}
|
|
@@ -3083,7 +3130,7 @@ function updatePath(e, t, n = 0) {
|
|
|
3083
3130
|
if (s === i) return;
|
|
3084
3131
|
}
|
|
3085
3132
|
if (r === undefined && s == undefined) return;
|
|
3086
|
-
if (s ===
|
|
3133
|
+
if (s === Ne) {
|
|
3087
3134
|
delete e[r];
|
|
3088
3135
|
} else if (r === undefined || (isWrappable(i) && isWrappable(s) && !Array.isArray(s))) {
|
|
3089
3136
|
const t = r !== undefined ? e[r] : e;
|
|
@@ -3099,21 +3146,21 @@ function updatePath(e, t, n = 0) {
|
|
|
3099
3146
|
e[r] = s;
|
|
3100
3147
|
}
|
|
3101
3148
|
}
|
|
3102
|
-
const
|
|
3149
|
+
const Ce = Object.assign(
|
|
3103
3150
|
function storePath(...e) {
|
|
3104
3151
|
return t => {
|
|
3105
3152
|
updatePath(t, e);
|
|
3106
3153
|
};
|
|
3107
3154
|
},
|
|
3108
|
-
{ DELETE:
|
|
3155
|
+
{ DELETE: Ne }
|
|
3109
3156
|
);
|
|
3110
3157
|
function snapshotImpl(e, t, n, r) {
|
|
3111
|
-
let i, s, o, u,
|
|
3158
|
+
let i, s, o, u, f, l;
|
|
3112
3159
|
if (!isWrappable(e)) return e;
|
|
3113
3160
|
if (n && n.has(e)) return n.get(e);
|
|
3114
3161
|
if (!n) n = new Map();
|
|
3115
|
-
if ((i = e[
|
|
3116
|
-
if (t) trackSelf(i,
|
|
3162
|
+
if ((i = e[le] || r?.get(e)?.[le])) {
|
|
3163
|
+
if (t) trackSelf(i, fe);
|
|
3117
3164
|
o = i[pe];
|
|
3118
3165
|
s = Array.isArray(i[de]);
|
|
3119
3166
|
n.set(e, o ? (u = s ? [] : Object.create(Object.getPrototypeOf(i[de]))) : i[de]);
|
|
@@ -3126,12 +3173,12 @@ function snapshotImpl(e, t, n, r) {
|
|
|
3126
3173
|
if (s) {
|
|
3127
3174
|
const s = o?.length || e.length;
|
|
3128
3175
|
for (let c = 0; c < s; c++) {
|
|
3129
|
-
|
|
3130
|
-
if (
|
|
3131
|
-
if (t && isWrappable(
|
|
3132
|
-
if ((
|
|
3176
|
+
l = o && c in o ? o[c] : e[c];
|
|
3177
|
+
if (l === ae) continue;
|
|
3178
|
+
if (t && isWrappable(l)) wrap(l, i);
|
|
3179
|
+
if ((f = snapshotImpl(l, t, n, r)) !== l || u) {
|
|
3133
3180
|
if (!u) n.set(e, (u = [...e]));
|
|
3134
|
-
u[c] =
|
|
3181
|
+
u[c] = f;
|
|
3135
3182
|
}
|
|
3136
3183
|
}
|
|
3137
3184
|
} else {
|
|
@@ -3140,14 +3187,14 @@ function snapshotImpl(e, t, n, r) {
|
|
|
3140
3187
|
let a = s[c];
|
|
3141
3188
|
const d = getPropertyDescriptor(e, o, a);
|
|
3142
3189
|
if (d.get) continue;
|
|
3143
|
-
|
|
3144
|
-
if (t && isWrappable(
|
|
3145
|
-
if ((
|
|
3190
|
+
l = o && a in o ? o[a] : e[a];
|
|
3191
|
+
if (t && isWrappable(l)) wrap(l, i);
|
|
3192
|
+
if ((f = snapshotImpl(l, t, n, r)) !== e[a] || u) {
|
|
3146
3193
|
if (!u) {
|
|
3147
3194
|
u = Object.create(Object.getPrototypeOf(e));
|
|
3148
3195
|
Object.assign(u, e);
|
|
3149
3196
|
}
|
|
3150
|
-
u[a] =
|
|
3197
|
+
u[a] = f;
|
|
3151
3198
|
}
|
|
3152
3199
|
}
|
|
3153
3200
|
}
|
|
@@ -3300,11 +3347,11 @@ function mapArray(e, t, n) {
|
|
|
3300
3347
|
const s = t;
|
|
3301
3348
|
const o = {
|
|
3302
3349
|
Ue: createOwner(),
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3350
|
+
$e: 0,
|
|
3351
|
+
Je: e,
|
|
3352
|
+
Xe: [],
|
|
3353
|
+
Ye: s,
|
|
3354
|
+
Ze: [],
|
|
3308
3355
|
et: [],
|
|
3309
3356
|
tt: r,
|
|
3310
3357
|
nt: r || n?.keyed === false ? [] : undefined,
|
|
@@ -3314,14 +3361,14 @@ function mapArray(e, t, n) {
|
|
|
3314
3361
|
};
|
|
3315
3362
|
const u = computed(updateKeyedMap.bind(o));
|
|
3316
3363
|
o.Ue.u = u;
|
|
3317
|
-
u.
|
|
3364
|
+
u.ge &= ~g;
|
|
3318
3365
|
return accessor(u);
|
|
3319
3366
|
}
|
|
3320
3367
|
const je = { ownedWrite: true };
|
|
3321
3368
|
function updateKeyedMap() {
|
|
3322
|
-
const e = this.
|
|
3369
|
+
const e = this.Je() || [],
|
|
3323
3370
|
t = e.length;
|
|
3324
|
-
e[
|
|
3371
|
+
e[fe];
|
|
3325
3372
|
runWithOwner(this.Ue, () => {
|
|
3326
3373
|
let n,
|
|
3327
3374
|
r,
|
|
@@ -3329,183 +3376,183 @@ function updateKeyedMap() {
|
|
|
3329
3376
|
? this.it
|
|
3330
3377
|
? () => {
|
|
3331
3378
|
this.nt[r] = signal(e[r], je);
|
|
3332
|
-
return this.
|
|
3379
|
+
return this.Ye(accessor(this.nt[r]), r);
|
|
3333
3380
|
}
|
|
3334
3381
|
: () => {
|
|
3335
3382
|
this.nt[r] = signal(e[r], je);
|
|
3336
3383
|
this.rt && (this.rt[r] = signal(r, je));
|
|
3337
|
-
return this.
|
|
3384
|
+
return this.Ye(accessor(this.nt[r]), this.rt ? accessor(this.rt[r]) : undefined);
|
|
3338
3385
|
}
|
|
3339
3386
|
: this.rt
|
|
3340
3387
|
? () => {
|
|
3341
3388
|
const t = e[r];
|
|
3342
3389
|
this.rt[r] = signal(r, je);
|
|
3343
|
-
return this.
|
|
3390
|
+
return this.Ye(t, accessor(this.rt[r]));
|
|
3344
3391
|
}
|
|
3345
3392
|
: () => {
|
|
3346
3393
|
const t = e[r];
|
|
3347
|
-
return this.
|
|
3394
|
+
return this.Ye(t);
|
|
3348
3395
|
};
|
|
3349
3396
|
if (t === 0) {
|
|
3350
|
-
if (this
|
|
3397
|
+
if (this.$e !== 0) {
|
|
3351
3398
|
this.Ue.dispose(false);
|
|
3352
3399
|
this.et = [];
|
|
3353
|
-
this.
|
|
3354
|
-
this
|
|
3355
|
-
this
|
|
3400
|
+
this.Xe = [];
|
|
3401
|
+
this.Ze = [];
|
|
3402
|
+
this.$e = 0;
|
|
3356
3403
|
this.nt && (this.nt = []);
|
|
3357
3404
|
this.rt && (this.rt = []);
|
|
3358
3405
|
}
|
|
3359
|
-
if (this.st && !this
|
|
3360
|
-
this
|
|
3406
|
+
if (this.st && !this.Ze[0]) {
|
|
3407
|
+
this.Ze[0] = runWithOwner((this.et[0] = createOwner()), this.st);
|
|
3361
3408
|
}
|
|
3362
|
-
} else if (this
|
|
3409
|
+
} else if (this.$e === 0) {
|
|
3363
3410
|
if (this.et[0]) this.et[0].dispose();
|
|
3364
|
-
this
|
|
3411
|
+
this.Ze = new Array(t);
|
|
3365
3412
|
for (r = 0; r < t; r++) {
|
|
3366
|
-
this.
|
|
3367
|
-
this
|
|
3413
|
+
this.Xe[r] = e[r];
|
|
3414
|
+
this.Ze[r] = runWithOwner((this.et[r] = createOwner()), i);
|
|
3368
3415
|
}
|
|
3369
|
-
this
|
|
3416
|
+
this.$e = t;
|
|
3370
3417
|
} else {
|
|
3371
3418
|
let s,
|
|
3372
3419
|
o,
|
|
3373
3420
|
u,
|
|
3374
|
-
l,
|
|
3375
3421
|
f,
|
|
3422
|
+
l,
|
|
3376
3423
|
c,
|
|
3377
3424
|
a,
|
|
3378
3425
|
d = new Array(t),
|
|
3379
3426
|
p = new Array(t),
|
|
3380
3427
|
h = this.nt ? new Array(t) : undefined,
|
|
3381
|
-
|
|
3428
|
+
y = this.rt ? new Array(t) : undefined;
|
|
3382
3429
|
for (
|
|
3383
|
-
s = 0, o = Math.min(this
|
|
3384
|
-
s < o && (this.
|
|
3430
|
+
s = 0, o = Math.min(this.$e, t);
|
|
3431
|
+
s < o && (this.Xe[s] === e[s] || (this.nt && compare(this.tt, this.Xe[s], e[s])));
|
|
3385
3432
|
s++
|
|
3386
3433
|
) {
|
|
3387
3434
|
if (this.nt) setSignal(this.nt[s], e[s]);
|
|
3388
3435
|
}
|
|
3389
3436
|
for (
|
|
3390
|
-
o = this
|
|
3437
|
+
o = this.$e - 1, u = t - 1;
|
|
3391
3438
|
o >= s &&
|
|
3392
3439
|
u >= s &&
|
|
3393
|
-
(this.
|
|
3440
|
+
(this.Xe[o] === e[u] || (this.nt && compare(this.tt, this.Xe[o], e[u])));
|
|
3394
3441
|
o--, u--
|
|
3395
3442
|
) {
|
|
3396
|
-
d[u] = this
|
|
3443
|
+
d[u] = this.Ze[o];
|
|
3397
3444
|
p[u] = this.et[o];
|
|
3398
3445
|
h && (h[u] = this.nt[o]);
|
|
3399
|
-
|
|
3446
|
+
y && (y[u] = this.rt[o]);
|
|
3400
3447
|
}
|
|
3401
3448
|
c = new Map();
|
|
3402
3449
|
a = new Array(u + 1);
|
|
3403
3450
|
for (r = u; r >= s; r--) {
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
n = c.get(
|
|
3451
|
+
f = e[r];
|
|
3452
|
+
l = this.tt ? this.tt(f) : f;
|
|
3453
|
+
n = c.get(l);
|
|
3407
3454
|
a[r] = n === undefined ? -1 : n;
|
|
3408
|
-
c.set(
|
|
3455
|
+
c.set(l, r);
|
|
3409
3456
|
}
|
|
3410
3457
|
for (n = s; n <= o; n++) {
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
r = c.get(
|
|
3458
|
+
f = this.Xe[n];
|
|
3459
|
+
l = this.tt ? this.tt(f) : f;
|
|
3460
|
+
r = c.get(l);
|
|
3414
3461
|
if (r !== undefined && r !== -1) {
|
|
3415
|
-
d[r] = this
|
|
3462
|
+
d[r] = this.Ze[n];
|
|
3416
3463
|
p[r] = this.et[n];
|
|
3417
3464
|
h && (h[r] = this.nt[n]);
|
|
3418
|
-
|
|
3465
|
+
y && (y[r] = this.rt[n]);
|
|
3419
3466
|
r = a[r];
|
|
3420
|
-
c.set(
|
|
3467
|
+
c.set(l, r);
|
|
3421
3468
|
} else this.et[n].dispose();
|
|
3422
3469
|
}
|
|
3423
3470
|
for (r = s; r < t; r++) {
|
|
3424
3471
|
if (r in d) {
|
|
3425
|
-
this
|
|
3472
|
+
this.Ze[r] = d[r];
|
|
3426
3473
|
this.et[r] = p[r];
|
|
3427
3474
|
if (h) {
|
|
3428
3475
|
this.nt[r] = h[r];
|
|
3429
3476
|
setSignal(this.nt[r], e[r]);
|
|
3430
3477
|
}
|
|
3431
|
-
if (
|
|
3432
|
-
this.rt[r] =
|
|
3478
|
+
if (y) {
|
|
3479
|
+
this.rt[r] = y[r];
|
|
3433
3480
|
setSignal(this.rt[r], r);
|
|
3434
3481
|
}
|
|
3435
3482
|
} else {
|
|
3436
|
-
this
|
|
3483
|
+
this.Ze[r] = runWithOwner((this.et[r] = createOwner()), i);
|
|
3437
3484
|
}
|
|
3438
3485
|
}
|
|
3439
|
-
this
|
|
3440
|
-
this.
|
|
3486
|
+
this.Ze = this.Ze.slice(0, (this.$e = t));
|
|
3487
|
+
this.Xe = e.slice(0);
|
|
3441
3488
|
}
|
|
3442
3489
|
});
|
|
3443
|
-
return this
|
|
3490
|
+
return this.Ze;
|
|
3444
3491
|
}
|
|
3445
3492
|
function repeat(e, t, n) {
|
|
3446
3493
|
const r = t;
|
|
3447
3494
|
const i = computed(
|
|
3448
3495
|
updateRepeat.bind({
|
|
3449
3496
|
Ue: createOwner(),
|
|
3450
|
-
|
|
3497
|
+
$e: 0,
|
|
3451
3498
|
ot: 0,
|
|
3452
3499
|
ut: e,
|
|
3453
|
-
|
|
3500
|
+
Ye: r,
|
|
3454
3501
|
et: [],
|
|
3455
|
-
|
|
3456
|
-
|
|
3502
|
+
Ze: [],
|
|
3503
|
+
ft: n?.from,
|
|
3457
3504
|
st: n?.fallback
|
|
3458
3505
|
})
|
|
3459
3506
|
);
|
|
3460
|
-
i.
|
|
3507
|
+
i.ge &= ~g;
|
|
3461
3508
|
return accessor(i);
|
|
3462
3509
|
}
|
|
3463
3510
|
function updateRepeat() {
|
|
3464
3511
|
const e = this.ut();
|
|
3465
|
-
const t = this.
|
|
3512
|
+
const t = this.ft?.() || 0;
|
|
3466
3513
|
runWithOwner(this.Ue, () => {
|
|
3467
3514
|
if (e === 0) {
|
|
3468
|
-
if (this
|
|
3515
|
+
if (this.$e !== 0) {
|
|
3469
3516
|
this.Ue.dispose(false);
|
|
3470
3517
|
this.et = [];
|
|
3471
|
-
this
|
|
3472
|
-
this
|
|
3518
|
+
this.Ze = [];
|
|
3519
|
+
this.$e = 0;
|
|
3473
3520
|
}
|
|
3474
|
-
if (this.st && !this
|
|
3475
|
-
this
|
|
3521
|
+
if (this.st && !this.Ze[0]) {
|
|
3522
|
+
this.Ze[0] = runWithOwner((this.et[0] = createOwner()), this.st);
|
|
3476
3523
|
}
|
|
3477
3524
|
return;
|
|
3478
3525
|
}
|
|
3479
3526
|
const n = t + e;
|
|
3480
|
-
const r = this.ot + this
|
|
3481
|
-
if (this
|
|
3527
|
+
const r = this.ot + this.$e;
|
|
3528
|
+
if (this.$e === 0 && this.et[0]) this.et[0].dispose();
|
|
3482
3529
|
for (let e = n; e < r; e++) this.et[e - this.ot].dispose();
|
|
3483
3530
|
if (this.ot < t) {
|
|
3484
3531
|
let e = this.ot;
|
|
3485
|
-
while (e < t && e < this
|
|
3532
|
+
while (e < t && e < this.$e) this.et[e++].dispose();
|
|
3486
3533
|
this.et.splice(0, t - this.ot);
|
|
3487
|
-
this
|
|
3534
|
+
this.Ze.splice(0, t - this.ot);
|
|
3488
3535
|
} else if (this.ot > t) {
|
|
3489
3536
|
let n = r - this.ot - 1;
|
|
3490
3537
|
let i = this.ot - t;
|
|
3491
|
-
this.et.length = this
|
|
3538
|
+
this.et.length = this.Ze.length = e;
|
|
3492
3539
|
while (n >= i) {
|
|
3493
3540
|
this.et[n] = this.et[n - i];
|
|
3494
|
-
this
|
|
3541
|
+
this.Ze[n] = this.Ze[n - i];
|
|
3495
3542
|
n--;
|
|
3496
3543
|
}
|
|
3497
3544
|
for (let e = 0; e < i; e++) {
|
|
3498
|
-
this
|
|
3545
|
+
this.Ze[e] = runWithOwner((this.et[e] = createOwner()), () => this.Ye(e + t));
|
|
3499
3546
|
}
|
|
3500
3547
|
}
|
|
3501
3548
|
for (let e = r; e < n; e++) {
|
|
3502
|
-
this
|
|
3549
|
+
this.Ze[e - t] = runWithOwner((this.et[e - t] = createOwner()), () => this.Ye(e));
|
|
3503
3550
|
}
|
|
3504
|
-
this
|
|
3551
|
+
this.Ze = this.Ze.slice(0, e);
|
|
3505
3552
|
this.ot = t;
|
|
3506
|
-
this
|
|
3553
|
+
this.$e = e;
|
|
3507
3554
|
});
|
|
3508
|
-
return this
|
|
3555
|
+
return this.Ze;
|
|
3509
3556
|
}
|
|
3510
3557
|
function compare(e, t, n) {
|
|
3511
3558
|
return e ? e(t) === e(n) : true;
|
|
@@ -3515,11 +3562,11 @@ function boundaryComputed(e, t) {
|
|
|
3515
3562
|
n.Fe = (e, t) => {
|
|
3516
3563
|
const r = e !== undefined ? e : n.be;
|
|
3517
3564
|
const i = t !== undefined ? t : n.we;
|
|
3518
|
-
n.be &= ~n.
|
|
3519
|
-
n.te.notify(n, n.
|
|
3565
|
+
n.be &= ~n.lt;
|
|
3566
|
+
n.te.notify(n, n.lt, r, i);
|
|
3520
3567
|
};
|
|
3521
|
-
n.
|
|
3522
|
-
n.
|
|
3568
|
+
n.lt = t;
|
|
3569
|
+
n.ge &= ~g;
|
|
3523
3570
|
recompute(n, true);
|
|
3524
3571
|
return n;
|
|
3525
3572
|
}
|
|
@@ -3529,7 +3576,7 @@ function createBoundChildren(e, t, n, r) {
|
|
|
3529
3576
|
cleanup(() => i.removeChild(e.te));
|
|
3530
3577
|
return runWithOwner(e, () => {
|
|
3531
3578
|
const e = computed(t);
|
|
3532
|
-
return boundaryComputed(() =>
|
|
3579
|
+
return boundaryComputed(() => flatten(read(e)), r);
|
|
3533
3580
|
});
|
|
3534
3581
|
}
|
|
3535
3582
|
const We = Symbol();
|
|
@@ -3548,12 +3595,12 @@ function isSlotMinimallyReady(e) {
|
|
|
3548
3595
|
}
|
|
3549
3596
|
function setSlotState(e, t, n, r) {
|
|
3550
3597
|
setSignal(e.ht, n);
|
|
3551
|
-
setSignal(e.
|
|
3598
|
+
setSignal(e.yt, r);
|
|
3552
3599
|
if (isRevealController(e)) {
|
|
3553
3600
|
if (!n && e.St === t) e.St = undefined;
|
|
3554
3601
|
return e.evaluate(n, r);
|
|
3555
3602
|
}
|
|
3556
|
-
if (!n && e.
|
|
3603
|
+
if (!n && e.gt === t && e.wt) e.gt = undefined;
|
|
3557
3604
|
}
|
|
3558
3605
|
class RevealController {
|
|
3559
3606
|
_t;
|
|
@@ -3561,7 +3608,7 @@ class RevealController {
|
|
|
3561
3608
|
Ot = [];
|
|
3562
3609
|
St;
|
|
3563
3610
|
ht = signal(false, { ownedWrite: true, ze: true });
|
|
3564
|
-
|
|
3611
|
+
yt = signal(false, { ownedWrite: true, ze: true });
|
|
3565
3612
|
vt = true;
|
|
3566
3613
|
Pt = true;
|
|
3567
3614
|
xt = false;
|
|
@@ -3569,16 +3616,16 @@ class RevealController {
|
|
|
3569
3616
|
this._t = e;
|
|
3570
3617
|
this.bt = t;
|
|
3571
3618
|
}
|
|
3572
|
-
|
|
3619
|
+
Nt(e) {
|
|
3573
3620
|
for (let t = 0; t < this.Ot.length; t++) {
|
|
3574
3621
|
const n = this.Ot[t];
|
|
3575
|
-
if ((isRevealController(n) ? n.St : n.
|
|
3622
|
+
if ((isRevealController(n) ? n.St : n.gt) !== this) continue;
|
|
3576
3623
|
if (e(n) === false) return false;
|
|
3577
3624
|
}
|
|
3578
3625
|
return true;
|
|
3579
3626
|
}
|
|
3580
3627
|
isReady() {
|
|
3581
|
-
return this.
|
|
3628
|
+
return this.Nt(isSlotReady);
|
|
3582
3629
|
}
|
|
3583
3630
|
isMinimallyReady() {
|
|
3584
3631
|
const e = untrack(this._t);
|
|
@@ -3586,7 +3633,7 @@ class RevealController {
|
|
|
3586
3633
|
if (e === "natural") {
|
|
3587
3634
|
let e = false;
|
|
3588
3635
|
let t = false;
|
|
3589
|
-
this.
|
|
3636
|
+
this.Nt(n => {
|
|
3590
3637
|
e = true;
|
|
3591
3638
|
if (isSlotMinimallyReady(n)) {
|
|
3592
3639
|
t = true;
|
|
@@ -3596,7 +3643,7 @@ class RevealController {
|
|
|
3596
3643
|
return !e || t;
|
|
3597
3644
|
}
|
|
3598
3645
|
let t = true;
|
|
3599
|
-
this.
|
|
3646
|
+
this.Nt(e => {
|
|
3600
3647
|
t = isSlotMinimallyReady(e);
|
|
3601
3648
|
return false;
|
|
3602
3649
|
});
|
|
@@ -3606,7 +3653,7 @@ class RevealController {
|
|
|
3606
3653
|
if (this.Ot.includes(e)) return;
|
|
3607
3654
|
this.Ot.push(e);
|
|
3608
3655
|
const t = untrack(this._t);
|
|
3609
|
-
(setSignal(e.ht, true), setSignal(e.
|
|
3656
|
+
(setSignal(e.ht, true), setSignal(e.yt, t === "sequential" ? !!untrack(this.bt) : false));
|
|
3610
3657
|
untrack(() => this.evaluate());
|
|
3611
3658
|
}
|
|
3612
3659
|
unregister(e) {
|
|
@@ -3625,11 +3672,11 @@ class RevealController {
|
|
|
3625
3672
|
i = r === "sequential" && !!untrack(this.bt),
|
|
3626
3673
|
s = t ?? i;
|
|
3627
3674
|
if (n) {
|
|
3628
|
-
this.
|
|
3675
|
+
this.Nt(e => setSlotState(e, this, true, s));
|
|
3629
3676
|
} else if (r === "natural") {
|
|
3630
|
-
this.
|
|
3677
|
+
this.Nt(e => {
|
|
3631
3678
|
if (isRevealController(e)) {
|
|
3632
|
-
setSignal(e.
|
|
3679
|
+
setSignal(e.yt, false);
|
|
3633
3680
|
setSignal(e.ht, false);
|
|
3634
3681
|
e.evaluate(false, false);
|
|
3635
3682
|
} else {
|
|
@@ -3637,16 +3684,16 @@ class RevealController {
|
|
|
3637
3684
|
}
|
|
3638
3685
|
});
|
|
3639
3686
|
} else if (r === "together") {
|
|
3640
|
-
const e = this.
|
|
3641
|
-
this.
|
|
3687
|
+
const e = this.Nt(isSlotMinimallyReady);
|
|
3688
|
+
this.Nt(t => setSlotState(t, this, !e, false));
|
|
3642
3689
|
} else {
|
|
3643
3690
|
let e = false;
|
|
3644
|
-
this.
|
|
3691
|
+
this.Nt(t => {
|
|
3645
3692
|
if (e) return setSlotState(t, this, true, i);
|
|
3646
3693
|
if (isSlotReady(t)) return setSlotState(t, this, false, false);
|
|
3647
3694
|
e = true;
|
|
3648
3695
|
if (isRevealController(t)) {
|
|
3649
|
-
setSignal(t.
|
|
3696
|
+
setSignal(t.yt, false);
|
|
3650
3697
|
setSignal(t.ht, false);
|
|
3651
3698
|
t.evaluate(false, false);
|
|
3652
3699
|
} else {
|
|
@@ -3663,27 +3710,27 @@ class RevealController {
|
|
|
3663
3710
|
}
|
|
3664
3711
|
}
|
|
3665
3712
|
class CollectionQueue extends Queue {
|
|
3666
|
-
|
|
3713
|
+
Ct;
|
|
3667
3714
|
ct = new Set();
|
|
3668
3715
|
Et;
|
|
3669
3716
|
dt = true;
|
|
3670
3717
|
ht = signal(false, { ownedWrite: true, ze: true });
|
|
3671
3718
|
we;
|
|
3672
|
-
|
|
3673
|
-
|
|
3719
|
+
yt = signal(false, { ownedWrite: true, ze: true });
|
|
3720
|
+
gt;
|
|
3674
3721
|
wt = false;
|
|
3675
3722
|
kt;
|
|
3676
3723
|
jt = We;
|
|
3677
3724
|
constructor(e) {
|
|
3678
3725
|
super();
|
|
3679
|
-
this.
|
|
3726
|
+
this.Ct = e;
|
|
3680
3727
|
}
|
|
3681
3728
|
run(e) {
|
|
3682
|
-
if (!e || (read(this.ht) && (!Ae || read(this.
|
|
3729
|
+
if (!e || (read(this.ht) && (!Ae || read(this.yt)))) return;
|
|
3683
3730
|
return super.run(e);
|
|
3684
3731
|
}
|
|
3685
3732
|
notify(e, t, n, r) {
|
|
3686
|
-
if (!(t & this.
|
|
3733
|
+
if (!(t & this.Ct)) return super.notify(e, t, n, r);
|
|
3687
3734
|
if (this.wt && this.kt) {
|
|
3688
3735
|
const e = untrack(() => {
|
|
3689
3736
|
try {
|
|
@@ -3698,32 +3745,32 @@ class CollectionQueue extends Queue {
|
|
|
3698
3745
|
this.ct.clear();
|
|
3699
3746
|
}
|
|
3700
3747
|
}
|
|
3701
|
-
if (this.
|
|
3702
|
-
if (this.
|
|
3703
|
-
return super.notify(e,
|
|
3748
|
+
if (this.Ct & _ && this.wt) return super.notify(e, t, n, r);
|
|
3749
|
+
if (this.Ct & _ && n & m) {
|
|
3750
|
+
return super.notify(e, m, n, r);
|
|
3704
3751
|
}
|
|
3705
|
-
if (n & this.
|
|
3752
|
+
if (n & this.Ct) {
|
|
3706
3753
|
this.dt = true;
|
|
3707
3754
|
const t = r?.source || e.we?.source;
|
|
3708
3755
|
if (t) {
|
|
3709
3756
|
const e = this.ct.size === 0;
|
|
3710
3757
|
this.ct.add(t);
|
|
3711
3758
|
if (e) setSignal(this.ht, true);
|
|
3712
|
-
if (this.
|
|
3759
|
+
if (this.Ct & m) {
|
|
3713
3760
|
setSignal(this.we, t.we?.cause ?? t.we);
|
|
3714
3761
|
}
|
|
3715
3762
|
}
|
|
3716
3763
|
}
|
|
3717
|
-
t &= ~this.
|
|
3764
|
+
t &= ~this.Ct;
|
|
3718
3765
|
return t ? super.notify(e, t, n, r) : true;
|
|
3719
3766
|
}
|
|
3720
3767
|
checkSources() {
|
|
3721
3768
|
for (const e of this.ct) {
|
|
3722
|
-
if (e.
|
|
3769
|
+
if (e._ & u || (!(e.be & this.Ct) && !(this.Ct & m && e.be & _))) this.ct.delete(e);
|
|
3723
3770
|
}
|
|
3724
3771
|
if (!this.ct.size) {
|
|
3725
|
-
if (this.
|
|
3726
|
-
this.dt = !!(this.Et.be & this.
|
|
3772
|
+
if (this.Ct & _ && this.dt && !this.wt && this.Et) {
|
|
3773
|
+
this.dt = !!(this.Et.be & this.Ct);
|
|
3727
3774
|
} else {
|
|
3728
3775
|
this.dt = false;
|
|
3729
3776
|
}
|
|
@@ -3736,14 +3783,14 @@ class CollectionQueue extends Queue {
|
|
|
3736
3783
|
}
|
|
3737
3784
|
}
|
|
3738
3785
|
}
|
|
3739
|
-
if (Ae) this.
|
|
3786
|
+
if (Ae) this.gt?.evaluate();
|
|
3740
3787
|
}
|
|
3741
3788
|
}
|
|
3742
3789
|
function createCollectionBoundary(e, t, n, r) {
|
|
3743
3790
|
const i = createOwner();
|
|
3744
3791
|
if (Ae) setContext(Re, null, i);
|
|
3745
3792
|
const s = new CollectionQueue(e);
|
|
3746
|
-
if (e ===
|
|
3793
|
+
if (e === m) s.we = signal(undefined, { ownedWrite: true, ze: true });
|
|
3747
3794
|
if (r) s.kt = r;
|
|
3748
3795
|
const o = (s.Et = createBoundChildren(i, t, s, e));
|
|
3749
3796
|
untrack(() => {
|
|
@@ -3756,9 +3803,9 @@ function createCollectionBoundary(e, t, n, r) {
|
|
|
3756
3803
|
}
|
|
3757
3804
|
s.dt = t || !!(o.be & e) || o.we instanceof NotReadyError;
|
|
3758
3805
|
});
|
|
3759
|
-
const u = Ae && e ===
|
|
3806
|
+
const u = Ae && e === _ ? getContext(Re) : null;
|
|
3760
3807
|
if (u) {
|
|
3761
|
-
s.
|
|
3808
|
+
s.gt = u;
|
|
3762
3809
|
u.register(s);
|
|
3763
3810
|
cleanup(() => u.unregister(s));
|
|
3764
3811
|
}
|
|
@@ -3768,16 +3815,16 @@ function createCollectionBoundary(e, t, n, r) {
|
|
|
3768
3815
|
const e = read(o);
|
|
3769
3816
|
if (!untrack(() => read(s.ht))) return ((s.wt = true), e);
|
|
3770
3817
|
}
|
|
3771
|
-
if (Ae && read(s.
|
|
3818
|
+
if (Ae && read(s.yt)) return undefined;
|
|
3772
3819
|
return n(s);
|
|
3773
3820
|
})
|
|
3774
3821
|
);
|
|
3775
3822
|
}
|
|
3776
3823
|
function createLoadingBoundary(e, t, n) {
|
|
3777
|
-
return createCollectionBoundary(
|
|
3824
|
+
return createCollectionBoundary(_, e, () => t(), n?.on);
|
|
3778
3825
|
}
|
|
3779
3826
|
function createErrorBoundary(e, t) {
|
|
3780
|
-
return createCollectionBoundary(
|
|
3827
|
+
return createCollectionBoundary(m, e, e =>
|
|
3781
3828
|
t(accessor(e.we), () => {
|
|
3782
3829
|
for (const t of e.ct) recompute(t);
|
|
3783
3830
|
schedule();
|
|
@@ -3859,8 +3906,8 @@ function flattenArray(e, t = [], n) {
|
|
|
3859
3906
|
const Ie = undefined;
|
|
3860
3907
|
exports.$PROXY = ce;
|
|
3861
3908
|
exports.$REFRESH = j;
|
|
3862
|
-
exports.$TARGET =
|
|
3863
|
-
exports.$TRACK =
|
|
3909
|
+
exports.$TARGET = le;
|
|
3910
|
+
exports.$TRACK = fe;
|
|
3864
3911
|
exports.ContextNotFoundError = ContextNotFoundError;
|
|
3865
3912
|
exports.DEV = Ie;
|
|
3866
3913
|
exports.NoOwnerError = NoOwnerError;
|
|
@@ -3915,5 +3962,5 @@ exports.runWithOwner = runWithOwner;
|
|
|
3915
3962
|
exports.setContext = setContext;
|
|
3916
3963
|
exports.setSnapshotCapture = setSnapshotCapture;
|
|
3917
3964
|
exports.snapshot = snapshot;
|
|
3918
|
-
exports.storePath =
|
|
3965
|
+
exports.storePath = Ce;
|
|
3919
3966
|
exports.untrack = untrack;
|