@solidjs/signals 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev.js +22 -20
- package/dist/node.cjs +516 -513
- package/dist/prod.js +535 -532
- package/dist/types/core/error.d.ts +4 -4
- package/package.json +1 -1
package/dist/node.cjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
class NotReadyError extends Error {
|
|
3
|
-
|
|
3
|
+
source;
|
|
4
4
|
constructor(e) {
|
|
5
5
|
super();
|
|
6
|
-
this.
|
|
6
|
+
this.source = e;
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
class StatusError extends Error {
|
|
10
|
-
|
|
10
|
+
source;
|
|
11
11
|
constructor(e, t) {
|
|
12
12
|
super(t instanceof Error ? t.message : String(t), { cause: t });
|
|
13
|
-
this.
|
|
13
|
+
this.source = e;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
class NoOwnerError extends Error {
|
|
@@ -43,114 +43,114 @@ const g = typeof Proxy === "function";
|
|
|
43
43
|
const w = {};
|
|
44
44
|
const S = Symbol("refresh");
|
|
45
45
|
function actualInsertIntoHeap(e, t) {
|
|
46
|
-
const n = (e.
|
|
47
|
-
if (n >= e.
|
|
48
|
-
const r = e.
|
|
49
|
-
const i = t.
|
|
50
|
-
if (i === undefined) t.
|
|
46
|
+
const n = (e.i?.t ? e.i.u?.o : e.i?.o) ?? -1;
|
|
47
|
+
if (n >= e.o) e.o = n + 1;
|
|
48
|
+
const r = e.o;
|
|
49
|
+
const i = t.l[r];
|
|
50
|
+
if (i === undefined) t.l[r] = e;
|
|
51
51
|
else {
|
|
52
|
-
const t = i.
|
|
53
|
-
t.
|
|
54
|
-
e.
|
|
55
|
-
i.
|
|
52
|
+
const t = i.p;
|
|
53
|
+
t.h = e;
|
|
54
|
+
e.p = t;
|
|
55
|
+
i.p = e;
|
|
56
56
|
}
|
|
57
|
-
if (r > t.
|
|
57
|
+
if (r > t.S) t.S = r;
|
|
58
58
|
}
|
|
59
59
|
function insertIntoHeap(e, o) {
|
|
60
|
-
let u = e.
|
|
60
|
+
let u = e.m;
|
|
61
61
|
if (u & (i | r)) return;
|
|
62
62
|
if (u & t) {
|
|
63
|
-
e.
|
|
64
|
-
} else e.
|
|
63
|
+
e.m = (u & -4) | n | i;
|
|
64
|
+
} else e.m = u | i;
|
|
65
65
|
if (!(u & s)) actualInsertIntoHeap(e, o);
|
|
66
66
|
}
|
|
67
67
|
function insertIntoHeapHeight(e, t) {
|
|
68
|
-
let n = e.
|
|
68
|
+
let n = e.m;
|
|
69
69
|
if (n & (i | r | s)) return;
|
|
70
|
-
e.
|
|
70
|
+
e.m = n | s;
|
|
71
71
|
actualInsertIntoHeap(e, t);
|
|
72
72
|
}
|
|
73
73
|
function deleteFromHeap(e, t) {
|
|
74
|
-
const n = e.
|
|
74
|
+
const n = e.m;
|
|
75
75
|
if (!(n & (i | s))) return;
|
|
76
|
-
e.
|
|
77
|
-
const r = e.
|
|
78
|
-
if (e.
|
|
76
|
+
e.m = n & -25;
|
|
77
|
+
const r = e.o;
|
|
78
|
+
if (e.p === e) t.l[r] = undefined;
|
|
79
79
|
else {
|
|
80
|
-
const n = e.
|
|
81
|
-
const i = t.
|
|
80
|
+
const n = e.h;
|
|
81
|
+
const i = t.l[r];
|
|
82
82
|
const s = n ?? i;
|
|
83
|
-
if (e === i) t.
|
|
84
|
-
else e.h
|
|
85
|
-
s.
|
|
83
|
+
if (e === i) t.l[r] = n;
|
|
84
|
+
else e.p.h = n;
|
|
85
|
+
s.p = e.p;
|
|
86
86
|
}
|
|
87
|
-
e.
|
|
88
|
-
e.
|
|
87
|
+
e.p = e;
|
|
88
|
+
e.h = undefined;
|
|
89
89
|
}
|
|
90
90
|
function markHeap(e) {
|
|
91
|
-
if (e.
|
|
92
|
-
e.
|
|
93
|
-
for (let t = 0; t <= e.
|
|
94
|
-
for (let n = e.
|
|
95
|
-
if (n.
|
|
91
|
+
if (e._) return;
|
|
92
|
+
e._ = true;
|
|
93
|
+
for (let t = 0; t <= e.S; t++) {
|
|
94
|
+
for (let n = e.l[t]; n !== undefined; n = n.h) {
|
|
95
|
+
if (n.m & i) markNode(n);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
function markNode(e, r = n) {
|
|
100
|
-
const i = e.
|
|
100
|
+
const i = e.m;
|
|
101
101
|
if ((i & (t | n)) >= r) return;
|
|
102
|
-
e.
|
|
103
|
-
for (let n = e.
|
|
104
|
-
markNode(n.
|
|
102
|
+
e.m = (i & -4) | r;
|
|
103
|
+
for (let n = e.O; n !== null; n = n.P) {
|
|
104
|
+
markNode(n.A, t);
|
|
105
105
|
}
|
|
106
|
-
if (e.
|
|
107
|
-
for (let n = e.
|
|
108
|
-
for (let e = n.
|
|
109
|
-
markNode(e.
|
|
106
|
+
if (e.k !== null) {
|
|
107
|
+
for (let n = e.k; n !== null; n = n.C) {
|
|
108
|
+
for (let e = n.O; e !== null; e = e.P) {
|
|
109
|
+
markNode(e.A, t);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
function runHeap(e, t) {
|
|
115
|
-
e.
|
|
116
|
-
for (e.
|
|
117
|
-
let n = e.
|
|
115
|
+
e._ = false;
|
|
116
|
+
for (e.W = 0; e.W <= e.S; e.W++) {
|
|
117
|
+
let n = e.l[e.W];
|
|
118
118
|
while (n !== undefined) {
|
|
119
|
-
if (n.
|
|
119
|
+
if (n.m & i) t(n);
|
|
120
120
|
else adjustHeight(n, e);
|
|
121
|
-
n = e.
|
|
121
|
+
n = e.l[e.W];
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
e.
|
|
124
|
+
e.S = 0;
|
|
125
125
|
}
|
|
126
126
|
function adjustHeight(e, t) {
|
|
127
127
|
deleteFromHeap(e, t);
|
|
128
|
-
let n = e.
|
|
129
|
-
for (let t = e.
|
|
130
|
-
const e = t.
|
|
131
|
-
const r = e.
|
|
132
|
-
if (r.
|
|
128
|
+
let n = e.o;
|
|
129
|
+
for (let t = e.j; t; t = t.N) {
|
|
130
|
+
const e = t.L;
|
|
131
|
+
const r = e.I || e;
|
|
132
|
+
if (r.H && r.o >= n) n = r.o + 1;
|
|
133
133
|
}
|
|
134
|
-
if (e.
|
|
135
|
-
e.
|
|
136
|
-
for (let n = e.
|
|
137
|
-
insertIntoHeapHeight(n.
|
|
134
|
+
if (e.o !== n) {
|
|
135
|
+
e.o = n;
|
|
136
|
+
for (let n = e.O; n !== null; n = n.P) {
|
|
137
|
+
insertIntoHeapHeight(n.A, t);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
const m = new Set();
|
|
142
|
-
const
|
|
143
|
-
const
|
|
142
|
+
const b = { l: new Array(2e3).fill(undefined), _: false, W: 0, S: 0 };
|
|
143
|
+
const _ = { l: new Array(2e3).fill(undefined), _: false, W: 0, S: 0 };
|
|
144
144
|
let O = 0;
|
|
145
145
|
let x = null;
|
|
146
146
|
let v = false;
|
|
147
147
|
let P = false;
|
|
148
148
|
function runLaneEffects(e) {
|
|
149
149
|
for (const t of C) {
|
|
150
|
-
if (t.
|
|
151
|
-
const n = t.
|
|
150
|
+
if (t.R || t.T.size > 0) continue;
|
|
151
|
+
const n = t.M[e - 1];
|
|
152
152
|
if (n.length) {
|
|
153
|
-
t.
|
|
153
|
+
t.M[e - 1] = [];
|
|
154
154
|
runQueue(n, e);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
@@ -161,129 +161,129 @@ function setProjectionWriteActive(e) {
|
|
|
161
161
|
function schedule() {
|
|
162
162
|
if (v) return;
|
|
163
163
|
v = true;
|
|
164
|
-
if (!A.
|
|
164
|
+
if (!A.q) queueMicrotask(flush);
|
|
165
165
|
}
|
|
166
166
|
class Queue {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
i = null;
|
|
168
|
+
F = [[], []];
|
|
169
|
+
V = [];
|
|
170
170
|
created = O;
|
|
171
171
|
addChild(e) {
|
|
172
|
-
this.
|
|
173
|
-
e.
|
|
172
|
+
this.V.push(e);
|
|
173
|
+
e.i = this;
|
|
174
174
|
}
|
|
175
175
|
removeChild(e) {
|
|
176
|
-
const t = this.
|
|
176
|
+
const t = this.V.indexOf(e);
|
|
177
177
|
if (t >= 0) {
|
|
178
|
-
this.
|
|
179
|
-
e.
|
|
178
|
+
this.V.splice(t, 1);
|
|
179
|
+
e.i = null;
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
notify(e, t, n, r) {
|
|
183
|
-
if (this.
|
|
183
|
+
if (this.i) return this.i.notify(e, t, n, r);
|
|
184
184
|
return false;
|
|
185
185
|
}
|
|
186
186
|
run(e) {
|
|
187
|
-
if (this.
|
|
188
|
-
const t = this.
|
|
189
|
-
this.
|
|
187
|
+
if (this.F[e - 1].length) {
|
|
188
|
+
const t = this.F[e - 1];
|
|
189
|
+
this.F[e - 1] = [];
|
|
190
190
|
runQueue(t, e);
|
|
191
191
|
}
|
|
192
|
-
for (let t = 0; t < this.
|
|
192
|
+
for (let t = 0; t < this.V.length; t++) this.V[t].run?.(e);
|
|
193
193
|
}
|
|
194
194
|
enqueue(e, t) {
|
|
195
195
|
if (e) {
|
|
196
196
|
if (R) {
|
|
197
197
|
const n = findLane(R);
|
|
198
|
-
n.
|
|
198
|
+
n.M[e - 1].push(t);
|
|
199
199
|
} else {
|
|
200
|
-
this.
|
|
200
|
+
this.F[e - 1].push(t);
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
schedule();
|
|
204
204
|
}
|
|
205
205
|
stashQueues(e) {
|
|
206
|
-
e.
|
|
207
|
-
e.
|
|
208
|
-
this.
|
|
209
|
-
for (let t = 0; t < this.
|
|
210
|
-
let n = this.
|
|
211
|
-
let r = e.
|
|
206
|
+
e.F[0].push(...this.F[0]);
|
|
207
|
+
e.F[1].push(...this.F[1]);
|
|
208
|
+
this.F = [[], []];
|
|
209
|
+
for (let t = 0; t < this.V.length; t++) {
|
|
210
|
+
let n = this.V[t];
|
|
211
|
+
let r = e.V[t];
|
|
212
212
|
if (!r) {
|
|
213
|
-
r = {
|
|
214
|
-
e.
|
|
213
|
+
r = { F: [[], []], V: [] };
|
|
214
|
+
e.V[t] = r;
|
|
215
215
|
}
|
|
216
216
|
n.stashQueues(r);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
restoreQueues(e) {
|
|
220
|
-
this.
|
|
221
|
-
this.
|
|
222
|
-
for (let t = 0; t < e.
|
|
223
|
-
const n = e.
|
|
224
|
-
let r = this.
|
|
220
|
+
this.F[0].push(...e.F[0]);
|
|
221
|
+
this.F[1].push(...e.F[1]);
|
|
222
|
+
for (let t = 0; t < e.V.length; t++) {
|
|
223
|
+
const n = e.V[t];
|
|
224
|
+
let r = this.V[t];
|
|
225
225
|
if (r) r.restoreQueues(n);
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
class GlobalQueue extends Queue {
|
|
230
|
-
|
|
230
|
+
q = false;
|
|
231
|
+
D = [];
|
|
231
232
|
B = [];
|
|
232
|
-
G =
|
|
233
|
-
K
|
|
233
|
+
G = new Set();
|
|
234
|
+
static K;
|
|
234
235
|
static U;
|
|
235
|
-
static J;
|
|
236
|
-
static X = null;
|
|
236
|
+
static J = null;
|
|
237
237
|
flush() {
|
|
238
|
-
if (this.
|
|
239
|
-
this.
|
|
238
|
+
if (this.q) return;
|
|
239
|
+
this.q = true;
|
|
240
240
|
try {
|
|
241
|
-
runHeap(
|
|
241
|
+
runHeap(b, GlobalQueue.K);
|
|
242
242
|
if (x) {
|
|
243
243
|
const e = transitionComplete(x);
|
|
244
244
|
if (!e) {
|
|
245
245
|
let e = x;
|
|
246
|
-
runHeap(
|
|
246
|
+
runHeap(_, GlobalQueue.K);
|
|
247
|
+
this.D = [];
|
|
247
248
|
this.B = [];
|
|
248
|
-
this.G =
|
|
249
|
-
this.K = new Set();
|
|
249
|
+
this.G = new Set();
|
|
250
250
|
runLaneEffects(d);
|
|
251
251
|
runLaneEffects(p);
|
|
252
|
-
this.stashQueues(x.
|
|
252
|
+
this.stashQueues(x.X);
|
|
253
253
|
O++;
|
|
254
|
-
v =
|
|
255
|
-
reassignPendingTransition(x.
|
|
254
|
+
v = b.S >= b.W;
|
|
255
|
+
reassignPendingTransition(x.D);
|
|
256
256
|
x = null;
|
|
257
257
|
finalizePureQueue(null, true);
|
|
258
258
|
return;
|
|
259
259
|
}
|
|
260
|
-
this.
|
|
261
|
-
this.restoreQueues(x.
|
|
260
|
+
this.D !== x.D && this.D.push(...x.D);
|
|
261
|
+
this.restoreQueues(x.X);
|
|
262
262
|
m.delete(x);
|
|
263
263
|
const t = x;
|
|
264
264
|
x = null;
|
|
265
|
-
reassignPendingTransition(this.
|
|
265
|
+
reassignPendingTransition(this.D);
|
|
266
266
|
finalizePureQueue(t);
|
|
267
267
|
} else {
|
|
268
|
-
if (m.size) runHeap(
|
|
268
|
+
if (m.size) runHeap(_, GlobalQueue.K);
|
|
269
269
|
finalizePureQueue();
|
|
270
270
|
}
|
|
271
271
|
O++;
|
|
272
|
-
v =
|
|
272
|
+
v = b.S >= b.W;
|
|
273
273
|
runLaneEffects(d);
|
|
274
274
|
this.run(d);
|
|
275
275
|
runLaneEffects(p);
|
|
276
276
|
this.run(p);
|
|
277
277
|
} finally {
|
|
278
|
-
this.
|
|
278
|
+
this.q = false;
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
notify(e, t, n, r) {
|
|
282
282
|
if (t & l) {
|
|
283
283
|
if (n & l) {
|
|
284
|
-
const t = r !== undefined ? r : e.
|
|
285
|
-
if (x && t && !x
|
|
286
|
-
x
|
|
284
|
+
const t = r !== undefined ? r : e.Y;
|
|
285
|
+
if (x && t && !x.Z.includes(t.source)) {
|
|
286
|
+
x.Z.push(t.source);
|
|
287
287
|
schedule();
|
|
288
288
|
}
|
|
289
289
|
}
|
|
@@ -294,143 +294,143 @@ class GlobalQueue extends Queue {
|
|
|
294
294
|
initTransition(e) {
|
|
295
295
|
if (e) e = currentTransition(e);
|
|
296
296
|
if (e && e === x) return;
|
|
297
|
-
if (!e && x && x
|
|
297
|
+
if (!e && x && x.$ === O) return;
|
|
298
298
|
if (!x) {
|
|
299
299
|
x = e ?? {
|
|
300
|
-
|
|
300
|
+
$: O,
|
|
301
|
+
D: [],
|
|
302
|
+
Z: [],
|
|
301
303
|
B: [],
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
te:
|
|
306
|
-
Y: { V: [[], []], D: [] },
|
|
307
|
-
ne: false
|
|
304
|
+
G: new Set(),
|
|
305
|
+
ee: [],
|
|
306
|
+
X: { F: [[], []], V: [] },
|
|
307
|
+
te: false
|
|
308
308
|
};
|
|
309
309
|
} else if (e) {
|
|
310
310
|
const t = x;
|
|
311
|
-
t.
|
|
312
|
-
e.
|
|
311
|
+
t.te = e;
|
|
312
|
+
e.ee.push(...t.ee);
|
|
313
313
|
for (const n of C) {
|
|
314
|
-
if (n.
|
|
314
|
+
if (n.ne === t) n.ne = e;
|
|
315
315
|
}
|
|
316
|
-
e.
|
|
317
|
-
for (const n of t.
|
|
318
|
-
e.
|
|
316
|
+
e.B.push(...t.B);
|
|
317
|
+
for (const n of t.G) {
|
|
318
|
+
e.G.add(n);
|
|
319
319
|
}
|
|
320
320
|
m.delete(t);
|
|
321
321
|
x = e;
|
|
322
322
|
}
|
|
323
323
|
m.add(x);
|
|
324
|
-
x
|
|
324
|
+
x.$ = O;
|
|
325
|
+
for (let e = 0; e < this.D.length; e++) {
|
|
326
|
+
const t = this.D[e];
|
|
327
|
+
t.ne = x;
|
|
328
|
+
x.D.push(t);
|
|
329
|
+
}
|
|
330
|
+
this.D = x.D;
|
|
325
331
|
for (let e = 0; e < this.B.length; e++) {
|
|
326
332
|
const t = this.B[e];
|
|
327
|
-
t.
|
|
333
|
+
t.ne = x;
|
|
328
334
|
x.B.push(t);
|
|
329
335
|
}
|
|
330
336
|
this.B = x.B;
|
|
331
|
-
for (let e = 0; e < this.G.length; e++) {
|
|
332
|
-
const t = this.G[e];
|
|
333
|
-
t.re = x;
|
|
334
|
-
x.G.push(t);
|
|
335
|
-
}
|
|
336
|
-
this.G = x.G;
|
|
337
337
|
for (const e of C) {
|
|
338
|
-
if (!e.
|
|
338
|
+
if (!e.ne) e.ne = x;
|
|
339
339
|
}
|
|
340
|
-
for (const e of this.
|
|
341
|
-
this.
|
|
340
|
+
for (const e of this.G) x.G.add(e);
|
|
341
|
+
this.G = x.G;
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
function insertSubs(e, t = false) {
|
|
345
|
-
const n = e.
|
|
346
|
-
for (let r = e.
|
|
345
|
+
const n = e.re || R;
|
|
346
|
+
for (let r = e.O; r !== null; r = r.P) {
|
|
347
347
|
if (t && n) {
|
|
348
|
-
r.
|
|
349
|
-
assignOrMergeLane(r.
|
|
348
|
+
r.A.m |= f;
|
|
349
|
+
assignOrMergeLane(r.A, n);
|
|
350
350
|
} else if (t) {
|
|
351
|
-
r.
|
|
352
|
-
r.
|
|
351
|
+
r.A.m |= f;
|
|
352
|
+
r.A.re = undefined;
|
|
353
353
|
}
|
|
354
|
-
const e = r.
|
|
355
|
-
if (e.
|
|
356
|
-
if (!e.
|
|
357
|
-
e.
|
|
358
|
-
e.
|
|
354
|
+
const e = r.A;
|
|
355
|
+
if (e.ie === h) {
|
|
356
|
+
if (!e.se) {
|
|
357
|
+
e.se = true;
|
|
358
|
+
e.oe.enqueue(p, e.ue);
|
|
359
359
|
}
|
|
360
360
|
continue;
|
|
361
361
|
}
|
|
362
|
-
const i = r.
|
|
363
|
-
if (i.
|
|
364
|
-
insertIntoHeap(r.
|
|
362
|
+
const i = r.A.m & o ? _ : b;
|
|
363
|
+
if (i.W > r.A.o) i.W = r.A.o;
|
|
364
|
+
insertIntoHeap(r.A, i);
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
function finalizePureQueue(e = null, t = false) {
|
|
368
368
|
let n = !t;
|
|
369
369
|
if (!t) checkBoundaryChildren(A);
|
|
370
|
-
if (
|
|
370
|
+
if (b.S >= b.W) runHeap(b, GlobalQueue.K);
|
|
371
371
|
if (n) {
|
|
372
|
-
const t = A.
|
|
372
|
+
const t = A.D;
|
|
373
373
|
for (let e = 0; e < t.length; e++) {
|
|
374
374
|
const n = t[e];
|
|
375
|
-
if (n.
|
|
376
|
-
n.
|
|
377
|
-
n.
|
|
378
|
-
if (n.
|
|
375
|
+
if (n.fe !== y) {
|
|
376
|
+
n.le = n.fe;
|
|
377
|
+
n.fe = y;
|
|
378
|
+
if (n.ie && n.ie !== h) n.se = true;
|
|
379
379
|
}
|
|
380
|
-
n.
|
|
381
|
-
if (n.
|
|
380
|
+
n.ce &= ~a;
|
|
381
|
+
if (n.H) GlobalQueue.U(n, false, true);
|
|
382
382
|
}
|
|
383
383
|
t.length = 0;
|
|
384
|
-
const n = e ? e.
|
|
384
|
+
const n = e ? e.B : A.B;
|
|
385
385
|
for (let e = 0; e < n.length; e++) {
|
|
386
386
|
const t = n[e];
|
|
387
|
-
const r = t.
|
|
388
|
-
t.
|
|
389
|
-
if (r !== y && t.
|
|
390
|
-
t.
|
|
387
|
+
const r = t.fe;
|
|
388
|
+
t.re = undefined;
|
|
389
|
+
if (r !== y && t.le !== r) {
|
|
390
|
+
t.le = r;
|
|
391
391
|
insertSubs(t, true);
|
|
392
392
|
}
|
|
393
|
-
t.
|
|
394
|
-
t.
|
|
393
|
+
t.fe = y;
|
|
394
|
+
t.ne = null;
|
|
395
395
|
}
|
|
396
396
|
n.length = 0;
|
|
397
|
-
const r = e ? e.
|
|
398
|
-
if (GlobalQueue.
|
|
397
|
+
const r = e ? e.G : A.G;
|
|
398
|
+
if (GlobalQueue.J && r.size) {
|
|
399
399
|
for (const e of r) {
|
|
400
|
-
GlobalQueue.
|
|
400
|
+
GlobalQueue.J(e);
|
|
401
401
|
}
|
|
402
402
|
r.clear();
|
|
403
403
|
schedule();
|
|
404
404
|
}
|
|
405
405
|
for (const t of C) {
|
|
406
|
-
const n = e ? t.
|
|
406
|
+
const n = e ? t.ne === e : !t.ne;
|
|
407
407
|
if (!n) continue;
|
|
408
|
-
if (!t.
|
|
409
|
-
if (t.
|
|
410
|
-
if (t.
|
|
411
|
-
}
|
|
412
|
-
if (t.
|
|
413
|
-
t.
|
|
414
|
-
t.
|
|
415
|
-
t.
|
|
408
|
+
if (!t.R) {
|
|
409
|
+
if (t.M[0].length) runQueue(t.M[0], d);
|
|
410
|
+
if (t.M[1].length) runQueue(t.M[1], p);
|
|
411
|
+
}
|
|
412
|
+
if (t.ae.re === t) t.ae.re = undefined;
|
|
413
|
+
t.T.clear();
|
|
414
|
+
t.M[0].length = 0;
|
|
415
|
+
t.M[1].length = 0;
|
|
416
416
|
C.delete(t);
|
|
417
|
-
k.delete(t.
|
|
417
|
+
k.delete(t.ae);
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
function checkBoundaryChildren(e) {
|
|
422
|
-
for (const t of e.
|
|
422
|
+
for (const t of e.V) {
|
|
423
423
|
t.checkSources?.();
|
|
424
424
|
checkBoundaryChildren(t);
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
427
|
function trackOptimisticStore(e) {
|
|
428
|
-
A.
|
|
428
|
+
A.G.add(e);
|
|
429
429
|
schedule();
|
|
430
430
|
}
|
|
431
431
|
function reassignPendingTransition(e) {
|
|
432
432
|
for (let t = 0; t < e.length; t++) {
|
|
433
|
-
e[t].
|
|
433
|
+
e[t].ne = x;
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
const A = new GlobalQueue();
|
|
@@ -443,21 +443,21 @@ function runQueue(e, t) {
|
|
|
443
443
|
for (let n = 0; n < e.length; n++) e[n](t);
|
|
444
444
|
}
|
|
445
445
|
function transitionComplete(e) {
|
|
446
|
-
if (e.
|
|
447
|
-
if (e.
|
|
446
|
+
if (e.te) return true;
|
|
447
|
+
if (e.ee.length) return false;
|
|
448
448
|
let t = true;
|
|
449
|
-
for (let n = 0; n < e
|
|
450
|
-
const r = e
|
|
451
|
-
if (r.
|
|
449
|
+
for (let n = 0; n < e.Z.length; n++) {
|
|
450
|
+
const r = e.Z[n];
|
|
451
|
+
if (r.ce & l && r.Y?.source === r) {
|
|
452
452
|
t = false;
|
|
453
453
|
break;
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
t && (e.
|
|
456
|
+
t && (e.te = true);
|
|
457
457
|
return t;
|
|
458
458
|
}
|
|
459
459
|
function currentTransition(e) {
|
|
460
|
-
while (e.
|
|
460
|
+
while (e.te && typeof e.te === "object") e = e.te;
|
|
461
461
|
return e;
|
|
462
462
|
}
|
|
463
463
|
function setActiveTransition(e) {
|
|
@@ -480,58 +480,58 @@ function getOrCreateLane(e) {
|
|
|
480
480
|
return findLane(t);
|
|
481
481
|
}
|
|
482
482
|
const n = e.de;
|
|
483
|
-
const r = n?.
|
|
484
|
-
t = {
|
|
483
|
+
const r = n?.re ? findLane(n.re) : null;
|
|
484
|
+
t = { ae: e, T: new Set(), M: [[], []], R: null, ne: x, pe: r };
|
|
485
485
|
k.set(e, t);
|
|
486
486
|
C.add(t);
|
|
487
487
|
e.he = e.ye || 0;
|
|
488
488
|
return t;
|
|
489
489
|
}
|
|
490
490
|
function findLane(e) {
|
|
491
|
-
while (e.
|
|
491
|
+
while (e.R) e = e.R;
|
|
492
492
|
return e;
|
|
493
493
|
}
|
|
494
494
|
function mergeLanes(e, t) {
|
|
495
495
|
e = findLane(e);
|
|
496
496
|
t = findLane(t);
|
|
497
497
|
if (e === t) return e;
|
|
498
|
-
t.
|
|
499
|
-
for (const n of t.
|
|
500
|
-
e.
|
|
501
|
-
e.
|
|
498
|
+
t.R = e;
|
|
499
|
+
for (const n of t.T) e.T.add(n);
|
|
500
|
+
e.M[0].push(...t.M[0]);
|
|
501
|
+
e.M[1].push(...t.M[1]);
|
|
502
502
|
return e;
|
|
503
503
|
}
|
|
504
504
|
function resolveLane(e) {
|
|
505
|
-
const t = e.
|
|
505
|
+
const t = e.re;
|
|
506
506
|
if (!t) return undefined;
|
|
507
507
|
const n = findLane(t);
|
|
508
508
|
if (C.has(n)) return n;
|
|
509
|
-
e.
|
|
509
|
+
e.re = undefined;
|
|
510
510
|
return undefined;
|
|
511
511
|
}
|
|
512
512
|
function hasActiveOverride(e) {
|
|
513
|
-
return !!(e.ge && e.
|
|
513
|
+
return !!(e.ge && e.fe !== y);
|
|
514
514
|
}
|
|
515
515
|
function assignOrMergeLane(e, t) {
|
|
516
516
|
const n = findLane(t);
|
|
517
|
-
const r = e.
|
|
517
|
+
const r = e.re;
|
|
518
518
|
if (r) {
|
|
519
|
-
if (r.
|
|
520
|
-
e.
|
|
519
|
+
if (r.R) {
|
|
520
|
+
e.re = t;
|
|
521
521
|
return;
|
|
522
522
|
}
|
|
523
523
|
const i = findLane(r);
|
|
524
524
|
if (C.has(i)) {
|
|
525
525
|
if (i !== n && !hasActiveOverride(e)) {
|
|
526
526
|
if (n.pe && findLane(n.pe) === i) {
|
|
527
|
-
e.
|
|
527
|
+
e.re = t;
|
|
528
528
|
} else if (i.pe && findLane(i.pe) === n);
|
|
529
529
|
else mergeLanes(n, i);
|
|
530
530
|
}
|
|
531
531
|
return;
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
e.
|
|
534
|
+
e.re = t;
|
|
535
535
|
}
|
|
536
536
|
function handleAsync(e, t, r) {
|
|
537
537
|
const i = typeof t === "object" && t !== null;
|
|
@@ -545,32 +545,32 @@ function handleAsync(e, t, r) {
|
|
|
545
545
|
let u;
|
|
546
546
|
const handleError = n => {
|
|
547
547
|
if (e.we !== t) return;
|
|
548
|
-
A.initTransition(e.
|
|
548
|
+
A.initTransition(e.ne);
|
|
549
549
|
notifyStatus(e, n instanceof NotReadyError ? l : c, n);
|
|
550
|
-
e
|
|
550
|
+
e.$ = O;
|
|
551
551
|
};
|
|
552
552
|
const asyncWrite = (i, s) => {
|
|
553
553
|
if (e.we !== t) return;
|
|
554
|
-
if (e.
|
|
555
|
-
A.initTransition(e.
|
|
554
|
+
if (e.m & (n | f)) return;
|
|
555
|
+
A.initTransition(e.ne);
|
|
556
556
|
clearStatus(e);
|
|
557
557
|
const o = resolveLane(e);
|
|
558
|
-
if (o) o.
|
|
558
|
+
if (o) o.T.delete(e);
|
|
559
559
|
if (r) r(i);
|
|
560
560
|
else if (e.ge) {
|
|
561
|
-
const t = e.
|
|
562
|
-
if (e.
|
|
561
|
+
const t = e.fe !== y;
|
|
562
|
+
if (e.H) e.fe = i;
|
|
563
563
|
if (!t) {
|
|
564
|
-
e.
|
|
564
|
+
e.le = i;
|
|
565
565
|
insertSubs(e);
|
|
566
566
|
}
|
|
567
|
-
e
|
|
567
|
+
e.$ = O;
|
|
568
568
|
} else if (o) {
|
|
569
|
-
const t = e.
|
|
569
|
+
const t = e.le;
|
|
570
570
|
const n = e.Se;
|
|
571
571
|
if (!n || !n(i, t)) {
|
|
572
|
-
e.
|
|
573
|
-
e
|
|
572
|
+
e.le = i;
|
|
573
|
+
e.$ = O;
|
|
574
574
|
if (e.me) {
|
|
575
575
|
setSignal(e.me, i);
|
|
576
576
|
}
|
|
@@ -599,7 +599,7 @@ function handleAsync(e, t, r) {
|
|
|
599
599
|
);
|
|
600
600
|
r = false;
|
|
601
601
|
if (!n) {
|
|
602
|
-
A.initTransition(e.
|
|
602
|
+
A.initTransition(e.ne);
|
|
603
603
|
throw new NotReadyError(Q);
|
|
604
604
|
}
|
|
605
605
|
}
|
|
@@ -631,61 +631,61 @@ function handleAsync(e, t, r) {
|
|
|
631
631
|
};
|
|
632
632
|
const i = iterate();
|
|
633
633
|
if (!r && !i) {
|
|
634
|
-
A.initTransition(e.
|
|
634
|
+
A.initTransition(e.ne);
|
|
635
635
|
throw new NotReadyError(Q);
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
638
|
return u;
|
|
639
639
|
}
|
|
640
640
|
function clearStatus(e) {
|
|
641
|
-
e.
|
|
642
|
-
e.
|
|
641
|
+
e.ce = e.ce & a;
|
|
642
|
+
e.Y = null;
|
|
643
643
|
updatePendingSignal(e);
|
|
644
|
-
e.
|
|
644
|
+
e.be?.();
|
|
645
645
|
}
|
|
646
646
|
function notifyStatus(e, t, n, r, i) {
|
|
647
647
|
if (t === c && !(n instanceof StatusError) && !(n instanceof NotReadyError))
|
|
648
648
|
n = new StatusError(e, n);
|
|
649
|
-
const s = n instanceof NotReadyError && n.
|
|
649
|
+
const s = n instanceof NotReadyError && n.source === e;
|
|
650
650
|
const o = t === l && e.ge && !s;
|
|
651
651
|
const u = o && hasActiveOverride(e);
|
|
652
652
|
if (!r) {
|
|
653
|
-
e.
|
|
654
|
-
e.
|
|
653
|
+
e.ce = t | (t !== c ? e.ce & a : 0);
|
|
654
|
+
e.Y = n;
|
|
655
655
|
updatePendingSignal(e);
|
|
656
656
|
}
|
|
657
657
|
if (i && !r) {
|
|
658
658
|
assignOrMergeLane(e, i);
|
|
659
659
|
}
|
|
660
660
|
if (u && x && n instanceof NotReadyError) {
|
|
661
|
-
const e = n.
|
|
662
|
-
if (!x
|
|
663
|
-
x
|
|
661
|
+
const e = n.source;
|
|
662
|
+
if (!x.Z.includes(e)) {
|
|
663
|
+
x.Z.push(e);
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
666
|
const f = r || u;
|
|
667
667
|
const d = r || o ? undefined : i;
|
|
668
|
-
if (e.
|
|
668
|
+
if (e.be) {
|
|
669
669
|
if (f) {
|
|
670
|
-
e.
|
|
670
|
+
e.be(t, n);
|
|
671
671
|
} else {
|
|
672
|
-
e.
|
|
672
|
+
e.be();
|
|
673
673
|
}
|
|
674
674
|
return;
|
|
675
675
|
}
|
|
676
|
-
for (let r = e.
|
|
677
|
-
r.
|
|
678
|
-
if (r.
|
|
679
|
-
!r.
|
|
680
|
-
notifyStatus(r.
|
|
676
|
+
for (let r = e.O; r !== null; r = r.P) {
|
|
677
|
+
r.A.$ = O;
|
|
678
|
+
if (r.A.Y !== n) {
|
|
679
|
+
!r.A.ne && A.D.push(r.A);
|
|
680
|
+
notifyStatus(r.A, t, n, f, d);
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
|
-
for (let r = e.
|
|
684
|
-
for (let e = r.
|
|
685
|
-
e.
|
|
686
|
-
if (e.
|
|
687
|
-
!e.
|
|
688
|
-
notifyStatus(e.
|
|
683
|
+
for (let r = e.k; r !== null; r = r.C) {
|
|
684
|
+
for (let e = r.O; e !== null; e = e.P) {
|
|
685
|
+
e.A.$ = O;
|
|
686
|
+
if (e.A.Y !== n) {
|
|
687
|
+
!e.A.ne && A.D.push(e.A);
|
|
688
|
+
notifyStatus(e.A, t, n, f, d);
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
}
|
|
@@ -695,24 +695,24 @@ function effect(e, t, n, r, i) {
|
|
|
695
695
|
const o = computed(i?.render ? t => staleValues(() => e(t)) : e, r, {
|
|
696
696
|
...i,
|
|
697
697
|
equals: () => {
|
|
698
|
-
o.
|
|
699
|
-
if (s) o.
|
|
698
|
+
o.se = !o.Y;
|
|
699
|
+
if (s) o.oe.enqueue(o.ie, runEffect.bind(o));
|
|
700
700
|
return false;
|
|
701
701
|
},
|
|
702
702
|
lazy: true
|
|
703
703
|
});
|
|
704
|
-
o.
|
|
704
|
+
o._e = r;
|
|
705
705
|
o.Oe = t;
|
|
706
706
|
o.xe = n;
|
|
707
707
|
o.ve = undefined;
|
|
708
|
-
o.
|
|
709
|
-
o.
|
|
710
|
-
const n = e !== undefined ? e : o.
|
|
711
|
-
const r = t !== undefined ? t : o.
|
|
708
|
+
o.ie = i?.render ? d : p;
|
|
709
|
+
o.be = (e, t) => {
|
|
710
|
+
const n = e !== undefined ? e : o.ce;
|
|
711
|
+
const r = t !== undefined ? t : o.Y;
|
|
712
712
|
if (n & c) {
|
|
713
713
|
let e = r;
|
|
714
|
-
o.
|
|
715
|
-
if (o.
|
|
714
|
+
o.oe.notify(o, l, 0);
|
|
715
|
+
if (o.ie === p) {
|
|
716
716
|
try {
|
|
717
717
|
return o.xe
|
|
718
718
|
? o.xe(e, () => {
|
|
@@ -724,31 +724,31 @@ function effect(e, t, n, r, i) {
|
|
|
724
724
|
e = t;
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
|
-
if (!o.
|
|
728
|
-
} else if (o.
|
|
727
|
+
if (!o.oe.notify(o, c, c)) throw e;
|
|
728
|
+
} else if (o.ie === d) o.oe.notify(o, l | c, n, r);
|
|
729
729
|
};
|
|
730
730
|
recompute(o, true);
|
|
731
|
-
!i?.defer && (o.
|
|
731
|
+
!i?.defer && (o.ie === p ? o.oe.enqueue(o.ie, runEffect.bind(o)) : runEffect.call(o));
|
|
732
732
|
s = true;
|
|
733
733
|
onCleanup(() => o.ve?.());
|
|
734
734
|
}
|
|
735
735
|
function runEffect() {
|
|
736
|
-
if (!this.
|
|
736
|
+
if (!this.se || this.m & u) return;
|
|
737
737
|
this.ve?.();
|
|
738
738
|
this.ve = undefined;
|
|
739
739
|
try {
|
|
740
|
-
this.ve = this.Oe(this.
|
|
740
|
+
this.ve = this.Oe(this.le, this._e);
|
|
741
741
|
} catch (e) {
|
|
742
|
-
if (!this.
|
|
742
|
+
if (!this.oe.notify(this, c, c)) throw e;
|
|
743
743
|
} finally {
|
|
744
|
-
this.
|
|
745
|
-
this.
|
|
744
|
+
this._e = this.le;
|
|
745
|
+
this.se = false;
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
748
|
function trackedEffect(e, t) {
|
|
749
749
|
const run = () => {
|
|
750
|
-
if (!n.
|
|
751
|
-
n.
|
|
750
|
+
if (!n.se || n.m & u) return;
|
|
751
|
+
n.se = false;
|
|
752
752
|
recompute(n);
|
|
753
753
|
};
|
|
754
754
|
const n = computed(
|
|
@@ -764,48 +764,48 @@ function trackedEffect(e, t) {
|
|
|
764
764
|
{ ...t, lazy: true, pureWrite: true }
|
|
765
765
|
);
|
|
766
766
|
n.ve = undefined;
|
|
767
|
-
n.
|
|
768
|
-
n.
|
|
769
|
-
n.
|
|
770
|
-
n.
|
|
767
|
+
n.se = true;
|
|
768
|
+
n.ie = h;
|
|
769
|
+
n.ue = run;
|
|
770
|
+
n.oe.enqueue(p, run);
|
|
771
771
|
onCleanup(() => n.ve?.());
|
|
772
772
|
}
|
|
773
773
|
const W = {};
|
|
774
774
|
function markDisposal(e) {
|
|
775
775
|
let t = e.Pe;
|
|
776
776
|
while (t) {
|
|
777
|
-
t.
|
|
778
|
-
if (t.
|
|
779
|
-
deleteFromHeap(t,
|
|
780
|
-
insertIntoHeap(t,
|
|
777
|
+
t.m |= o;
|
|
778
|
+
if (t.m & i) {
|
|
779
|
+
deleteFromHeap(t, b);
|
|
780
|
+
insertIntoHeap(t, _);
|
|
781
781
|
}
|
|
782
782
|
markDisposal(t);
|
|
783
783
|
t = t.Ae;
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
786
|
function dispose(e) {
|
|
787
|
-
let t = e.
|
|
787
|
+
let t = e.j || null;
|
|
788
788
|
do {
|
|
789
789
|
t = unlinkSubs(t);
|
|
790
790
|
} while (t !== null);
|
|
791
|
-
e.
|
|
791
|
+
e.j = null;
|
|
792
792
|
e.ke = null;
|
|
793
793
|
disposeChildren(e, true);
|
|
794
794
|
}
|
|
795
795
|
function disposeChildren(e, t = false, n) {
|
|
796
|
-
if (e.
|
|
797
|
-
if (t) e.
|
|
796
|
+
if (e.m & u) return;
|
|
797
|
+
if (t) e.m = u;
|
|
798
798
|
let r = n ? e.Ce : e.Pe;
|
|
799
799
|
while (r) {
|
|
800
800
|
const e = r.Ae;
|
|
801
|
-
if (r.
|
|
801
|
+
if (r.j) {
|
|
802
802
|
const e = r;
|
|
803
|
-
deleteFromHeap(e, e.
|
|
804
|
-
let t = e.
|
|
803
|
+
deleteFromHeap(e, e.m & o ? _ : b);
|
|
804
|
+
let t = e.j;
|
|
805
805
|
do {
|
|
806
806
|
t = unlinkSubs(t);
|
|
807
807
|
} while (t !== null);
|
|
808
|
-
e.
|
|
808
|
+
e.j = null;
|
|
809
809
|
e.ke = null;
|
|
810
810
|
}
|
|
811
811
|
disposeChildren(r, true);
|
|
@@ -859,17 +859,17 @@ function createOwner(e) {
|
|
|
859
859
|
const t = Q;
|
|
860
860
|
const n = {
|
|
861
861
|
id: e?.id ?? (t?.id != null ? getNextChildId(t) : undefined),
|
|
862
|
-
|
|
863
|
-
|
|
862
|
+
t: true,
|
|
863
|
+
u: t?.t ? t.u : t,
|
|
864
864
|
Pe: null,
|
|
865
865
|
Ae: null,
|
|
866
866
|
Ee: null,
|
|
867
|
-
|
|
867
|
+
oe: t?.oe ?? A,
|
|
868
868
|
Ne: t?.Ne || w,
|
|
869
869
|
je: 0,
|
|
870
870
|
We: null,
|
|
871
871
|
Ce: null,
|
|
872
|
-
|
|
872
|
+
i: t,
|
|
873
873
|
dispose(e = true) {
|
|
874
874
|
disposeChildren(n, e);
|
|
875
875
|
}
|
|
@@ -890,65 +890,65 @@ function createRoot(e, t) {
|
|
|
890
890
|
return runWithOwner(n, () => e(n.dispose));
|
|
891
891
|
}
|
|
892
892
|
function unlinkSubs(e) {
|
|
893
|
-
const t = e.
|
|
894
|
-
const n = e.
|
|
895
|
-
const r = e.
|
|
893
|
+
const t = e.L;
|
|
894
|
+
const n = e.N;
|
|
895
|
+
const r = e.P;
|
|
896
896
|
const i = e.Le;
|
|
897
897
|
if (r !== null) r.Le = i;
|
|
898
898
|
else t.Ie = i;
|
|
899
|
-
if (i !== null) i.
|
|
899
|
+
if (i !== null) i.P = r;
|
|
900
900
|
else {
|
|
901
|
-
t.
|
|
901
|
+
t.O = r;
|
|
902
902
|
if (r === null) {
|
|
903
903
|
t.He?.();
|
|
904
|
-
t.
|
|
904
|
+
t.H && !t.Qe && unobserved(t);
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
907
|
return n;
|
|
908
908
|
}
|
|
909
909
|
function unobserved(e) {
|
|
910
|
-
deleteFromHeap(e, e.
|
|
911
|
-
let t = e.
|
|
910
|
+
deleteFromHeap(e, e.m & o ? _ : b);
|
|
911
|
+
let t = e.j;
|
|
912
912
|
while (t !== null) {
|
|
913
913
|
t = unlinkSubs(t);
|
|
914
914
|
}
|
|
915
|
-
e.
|
|
915
|
+
e.j = null;
|
|
916
916
|
disposeChildren(e, true);
|
|
917
917
|
}
|
|
918
918
|
function link(e, t) {
|
|
919
919
|
const n = t.ke;
|
|
920
|
-
if (n !== null && n.
|
|
920
|
+
if (n !== null && n.L === e) return;
|
|
921
921
|
let i = null;
|
|
922
|
-
const s = t.
|
|
922
|
+
const s = t.m & r;
|
|
923
923
|
if (s) {
|
|
924
|
-
i = n !== null ? n.
|
|
925
|
-
if (i !== null && i.
|
|
924
|
+
i = n !== null ? n.N : t.j;
|
|
925
|
+
if (i !== null && i.L === e) {
|
|
926
926
|
t.ke = i;
|
|
927
927
|
return;
|
|
928
928
|
}
|
|
929
929
|
}
|
|
930
930
|
const o = e.Ie;
|
|
931
|
-
if (o !== null && o.
|
|
932
|
-
const u = (t.ke = e.Ie = {
|
|
933
|
-
if (n !== null) n.
|
|
934
|
-
else t.
|
|
935
|
-
if (o !== null) o.
|
|
936
|
-
else e.
|
|
931
|
+
if (o !== null && o.A === t && (!s || isValidLink(o, t))) return;
|
|
932
|
+
const u = (t.ke = e.Ie = { L: e, A: t, N: i, Le: o, P: null });
|
|
933
|
+
if (n !== null) n.N = u;
|
|
934
|
+
else t.j = u;
|
|
935
|
+
if (o !== null) o.P = u;
|
|
936
|
+
else e.O = u;
|
|
937
937
|
}
|
|
938
938
|
function isValidLink(e, t) {
|
|
939
939
|
const n = t.ke;
|
|
940
940
|
if (n !== null) {
|
|
941
|
-
let r = t.
|
|
941
|
+
let r = t.j;
|
|
942
942
|
do {
|
|
943
943
|
if (r === e) return true;
|
|
944
944
|
if (r === n) break;
|
|
945
|
-
r = r.
|
|
945
|
+
r = r.N;
|
|
946
946
|
} while (r !== null);
|
|
947
947
|
}
|
|
948
948
|
return false;
|
|
949
949
|
}
|
|
950
|
-
GlobalQueue.
|
|
951
|
-
GlobalQueue.
|
|
950
|
+
GlobalQueue.K = recompute;
|
|
951
|
+
GlobalQueue.U = disposeChildren;
|
|
952
952
|
let E = false;
|
|
953
953
|
let j = false;
|
|
954
954
|
let N = false;
|
|
@@ -958,11 +958,11 @@ let H = false;
|
|
|
958
958
|
let Q = null;
|
|
959
959
|
let R = null;
|
|
960
960
|
function recompute(t, n = false) {
|
|
961
|
-
const i = t.
|
|
961
|
+
const i = t.ie;
|
|
962
962
|
if (!n) {
|
|
963
|
-
if (t.
|
|
964
|
-
deleteFromHeap(t, t.
|
|
965
|
-
if (t.
|
|
963
|
+
if (t.ne && (!i || x) && x !== t.ne) A.initTransition(t.ne);
|
|
964
|
+
deleteFromHeap(t, t.m & o ? _ : b);
|
|
965
|
+
if (t.ne || i === h) disposeChildren(t);
|
|
966
966
|
else {
|
|
967
967
|
markDisposal(t);
|
|
968
968
|
t.We = t.Ee;
|
|
@@ -971,16 +971,16 @@ function recompute(t, n = false) {
|
|
|
971
971
|
t.Pe = null;
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
|
-
const s = !!(t.
|
|
974
|
+
const s = !!(t.m & f);
|
|
975
975
|
const u = hasActiveOverride(t);
|
|
976
|
-
const a = !!(t.
|
|
976
|
+
const a = !!(t.ce & l);
|
|
977
977
|
const d = Q;
|
|
978
978
|
Q = t;
|
|
979
979
|
t.ke = null;
|
|
980
|
-
t.
|
|
981
|
-
t
|
|
982
|
-
let p = t.
|
|
983
|
-
let g = t.
|
|
980
|
+
t.m = r;
|
|
981
|
+
t.$ = O;
|
|
982
|
+
let p = t.fe === y ? t.le : t.fe;
|
|
983
|
+
let g = t.o;
|
|
984
984
|
let w = E;
|
|
985
985
|
let S = R;
|
|
986
986
|
E = true;
|
|
@@ -989,20 +989,20 @@ function recompute(t, n = false) {
|
|
|
989
989
|
if (e) R = e;
|
|
990
990
|
}
|
|
991
991
|
try {
|
|
992
|
-
p = handleAsync(t, t.
|
|
992
|
+
p = handleAsync(t, t.H(p));
|
|
993
993
|
clearStatus(t);
|
|
994
994
|
const e = resolveLane(t);
|
|
995
995
|
if (e) {
|
|
996
|
-
e.
|
|
997
|
-
updatePendingSignal(e.
|
|
996
|
+
e.T.delete(t);
|
|
997
|
+
updatePendingSignal(e.ae);
|
|
998
998
|
}
|
|
999
999
|
} catch (e) {
|
|
1000
1000
|
if (e instanceof NotReadyError && R) {
|
|
1001
1001
|
const e = findLane(R);
|
|
1002
|
-
if (e.
|
|
1003
|
-
e.
|
|
1004
|
-
t.
|
|
1005
|
-
updatePendingSignal(e.
|
|
1002
|
+
if (e.ae !== t) {
|
|
1003
|
+
e.T.add(t);
|
|
1004
|
+
t.re = e;
|
|
1005
|
+
updatePendingSignal(e.ae);
|
|
1006
1006
|
}
|
|
1007
1007
|
}
|
|
1008
1008
|
notifyStatus(
|
|
@@ -1010,66 +1010,66 @@ function recompute(t, n = false) {
|
|
|
1010
1010
|
e instanceof NotReadyError ? l : c,
|
|
1011
1011
|
e,
|
|
1012
1012
|
undefined,
|
|
1013
|
-
e instanceof NotReadyError ? t.
|
|
1013
|
+
e instanceof NotReadyError ? t.re : undefined
|
|
1014
1014
|
);
|
|
1015
1015
|
} finally {
|
|
1016
1016
|
E = w;
|
|
1017
|
-
t.
|
|
1017
|
+
t.m = e;
|
|
1018
1018
|
Q = d;
|
|
1019
1019
|
}
|
|
1020
|
-
if (!t.
|
|
1020
|
+
if (!t.Y) {
|
|
1021
1021
|
const e = t.ke;
|
|
1022
|
-
let r = e !== null ? e.
|
|
1022
|
+
let r = e !== null ? e.N : t.j;
|
|
1023
1023
|
if (r !== null) {
|
|
1024
1024
|
do {
|
|
1025
1025
|
r = unlinkSubs(r);
|
|
1026
1026
|
} while (r !== null);
|
|
1027
|
-
if (e !== null) e.
|
|
1028
|
-
else t.
|
|
1027
|
+
if (e !== null) e.N = null;
|
|
1028
|
+
else t.j = null;
|
|
1029
1029
|
}
|
|
1030
|
-
const f = u ? t.
|
|
1030
|
+
const f = u ? t.le : t.fe === y ? t.le : t.fe;
|
|
1031
1031
|
const l = !t.Se || !t.Se(f, p);
|
|
1032
1032
|
if (l) {
|
|
1033
|
-
const e = u ? t.
|
|
1034
|
-
if (n || (i && x !== t.
|
|
1035
|
-
else t.
|
|
1033
|
+
const e = u ? t.le : undefined;
|
|
1034
|
+
if (n || (i && x !== t.ne) || s) t.le = p;
|
|
1035
|
+
else t.fe = p;
|
|
1036
1036
|
if (u && !s && a) {
|
|
1037
1037
|
const e = t.ye || 0;
|
|
1038
1038
|
const n = t.he || 0;
|
|
1039
|
-
if (e <= n) t.
|
|
1039
|
+
if (e <= n) t.le = p;
|
|
1040
1040
|
}
|
|
1041
|
-
if (!u || s || t.
|
|
1041
|
+
if (!u || s || t.le !== e) {
|
|
1042
1042
|
insertSubs(t, s || u);
|
|
1043
1043
|
}
|
|
1044
1044
|
} else if (u) {
|
|
1045
|
-
t.
|
|
1046
|
-
} else if (t.
|
|
1047
|
-
for (let e = t.
|
|
1048
|
-
insertIntoHeapHeight(e.
|
|
1045
|
+
t.fe = p;
|
|
1046
|
+
} else if (t.o != g) {
|
|
1047
|
+
for (let e = t.O; e !== null; e = e.P) {
|
|
1048
|
+
insertIntoHeapHeight(e.A, e.A.m & o ? _ : b);
|
|
1049
1049
|
}
|
|
1050
1050
|
}
|
|
1051
1051
|
}
|
|
1052
1052
|
R = S;
|
|
1053
|
-
(!n || t.
|
|
1054
|
-
t.
|
|
1053
|
+
(!n || t.ce & l) && !t.ne && !(x && t.ge) && A.D.push(t);
|
|
1054
|
+
t.ne && i && x !== t.ne && runInTransition(t.ne, () => recompute(t));
|
|
1055
1055
|
}
|
|
1056
1056
|
function updateIfNecessary(r) {
|
|
1057
|
-
if (r.
|
|
1058
|
-
for (let e = r.
|
|
1059
|
-
const t = e.
|
|
1060
|
-
const i = t.
|
|
1061
|
-
if (i.
|
|
1057
|
+
if (r.m & t) {
|
|
1058
|
+
for (let e = r.j; e; e = e.N) {
|
|
1059
|
+
const t = e.L;
|
|
1060
|
+
const i = t.I || t;
|
|
1061
|
+
if (i.H) {
|
|
1062
1062
|
updateIfNecessary(i);
|
|
1063
1063
|
}
|
|
1064
|
-
if (r.
|
|
1064
|
+
if (r.m & n) {
|
|
1065
1065
|
break;
|
|
1066
1066
|
}
|
|
1067
1067
|
}
|
|
1068
1068
|
}
|
|
1069
|
-
if (r.
|
|
1069
|
+
if (r.m & (n | f) || (r.Y && r.$ < O)) {
|
|
1070
1070
|
recompute(r);
|
|
1071
1071
|
}
|
|
1072
|
-
r.
|
|
1072
|
+
r.m = e;
|
|
1073
1073
|
}
|
|
1074
1074
|
function computed(t, n, r) {
|
|
1075
1075
|
const i = {
|
|
@@ -1078,33 +1078,33 @@ function computed(t, n, r) {
|
|
|
1078
1078
|
Re: !!r?.pureWrite,
|
|
1079
1079
|
He: r?.unobserved,
|
|
1080
1080
|
Ee: null,
|
|
1081
|
-
|
|
1081
|
+
oe: Q?.oe ?? A,
|
|
1082
1082
|
Ne: Q?.Ne ?? w,
|
|
1083
1083
|
je: 0,
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1084
|
+
H: t,
|
|
1085
|
+
le: n,
|
|
1086
|
+
o: 0,
|
|
1087
|
+
k: null,
|
|
1088
|
+
h: undefined,
|
|
1089
|
+
p: null,
|
|
1090
|
+
j: null,
|
|
1091
1091
|
ke: null,
|
|
1092
|
-
|
|
1092
|
+
O: null,
|
|
1093
1093
|
Ie: null,
|
|
1094
|
-
|
|
1094
|
+
i: Q,
|
|
1095
1095
|
Ae: null,
|
|
1096
1096
|
Pe: null,
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1097
|
+
m: e,
|
|
1098
|
+
ce: a,
|
|
1099
|
+
$: O,
|
|
1100
|
+
fe: y,
|
|
1101
1101
|
We: null,
|
|
1102
1102
|
Ce: null,
|
|
1103
1103
|
we: null,
|
|
1104
|
-
|
|
1104
|
+
ne: null
|
|
1105
1105
|
};
|
|
1106
|
-
i.
|
|
1107
|
-
const s = Q?.
|
|
1106
|
+
i.p = i;
|
|
1107
|
+
const s = Q?.t ? Q.u : Q;
|
|
1108
1108
|
if (Q) {
|
|
1109
1109
|
const e = Q.Pe;
|
|
1110
1110
|
if (e === null) {
|
|
@@ -1114,7 +1114,7 @@ function computed(t, n, r) {
|
|
|
1114
1114
|
Q.Pe = i;
|
|
1115
1115
|
}
|
|
1116
1116
|
}
|
|
1117
|
-
if (s) i.
|
|
1117
|
+
if (s) i.o = s.o + 1;
|
|
1118
1118
|
!r?.lazy && recompute(i, true);
|
|
1119
1119
|
return i;
|
|
1120
1120
|
}
|
|
@@ -1123,15 +1123,15 @@ function signal(e, t, n = null) {
|
|
|
1123
1123
|
Se: t?.equals != null ? t.equals : isEqual,
|
|
1124
1124
|
Re: !!t?.pureWrite,
|
|
1125
1125
|
He: t?.unobserved,
|
|
1126
|
-
|
|
1127
|
-
|
|
1126
|
+
le: e,
|
|
1127
|
+
O: null,
|
|
1128
1128
|
Ie: null,
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1129
|
+
$: O,
|
|
1130
|
+
I: n,
|
|
1131
|
+
C: n?.k || null,
|
|
1132
|
+
fe: y
|
|
1133
1133
|
};
|
|
1134
|
-
n && (n.
|
|
1134
|
+
n && (n.k = r);
|
|
1135
1135
|
return r;
|
|
1136
1136
|
}
|
|
1137
1137
|
function optimisticSignal(e, t) {
|
|
@@ -1163,18 +1163,18 @@ function read(e) {
|
|
|
1163
1163
|
H = false;
|
|
1164
1164
|
const r = read(t);
|
|
1165
1165
|
H = n;
|
|
1166
|
-
if (t.
|
|
1167
|
-
if (j && R && t.
|
|
1168
|
-
const n = findLane(t.
|
|
1166
|
+
if (t.ce & l) return e.le;
|
|
1167
|
+
if (j && R && t.re) {
|
|
1168
|
+
const n = findLane(t.re);
|
|
1169
1169
|
const r = findLane(R);
|
|
1170
|
-
if (n !== r && n.
|
|
1171
|
-
return e.
|
|
1170
|
+
if (n !== r && n.T.size > 0) {
|
|
1171
|
+
return e.le;
|
|
1172
1172
|
}
|
|
1173
1173
|
}
|
|
1174
1174
|
return r;
|
|
1175
1175
|
}
|
|
1176
1176
|
if (L) {
|
|
1177
|
-
const t = e.
|
|
1177
|
+
const t = e.I || e;
|
|
1178
1178
|
const n = getPendingSignal(t);
|
|
1179
1179
|
const r = L;
|
|
1180
1180
|
L = false;
|
|
@@ -1182,87 +1182,87 @@ function read(e) {
|
|
|
1182
1182
|
I = true;
|
|
1183
1183
|
}
|
|
1184
1184
|
L = r;
|
|
1185
|
-
return e.
|
|
1185
|
+
return e.le;
|
|
1186
1186
|
}
|
|
1187
1187
|
let t = Q;
|
|
1188
|
-
if (t?.
|
|
1189
|
-
if (N && e.
|
|
1188
|
+
if (t?.t) t = t.u;
|
|
1189
|
+
if (N && e.H) recompute(e);
|
|
1190
1190
|
if (t && E) {
|
|
1191
|
-
if (e.
|
|
1191
|
+
if (e.H && e.m & u) recompute(e);
|
|
1192
1192
|
link(e, t);
|
|
1193
|
-
const n = e.
|
|
1194
|
-
if (n.
|
|
1195
|
-
const r = e.
|
|
1196
|
-
if (n.
|
|
1193
|
+
const n = e.I || e;
|
|
1194
|
+
if (n.H) {
|
|
1195
|
+
const r = e.m & o;
|
|
1196
|
+
if (n.o >= (r ? _.W : b.W)) {
|
|
1197
1197
|
markNode(t);
|
|
1198
|
-
markHeap(r ?
|
|
1198
|
+
markHeap(r ? _ : b);
|
|
1199
1199
|
updateIfNecessary(n);
|
|
1200
1200
|
}
|
|
1201
|
-
const i = n.
|
|
1202
|
-
if (i >= t.
|
|
1203
|
-
t.
|
|
1201
|
+
const i = n.o;
|
|
1202
|
+
if (i >= t.o && e.i !== t) {
|
|
1203
|
+
t.o = i + 1;
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
1206
|
}
|
|
1207
|
-
const n = e.
|
|
1208
|
-
if (t && n.
|
|
1207
|
+
const n = e.I || e;
|
|
1208
|
+
if (t && n.ce & l && !(j && n.ne && x !== n.ne)) {
|
|
1209
1209
|
if (R) {
|
|
1210
|
-
const r = n.
|
|
1210
|
+
const r = n.re;
|
|
1211
1211
|
const i = findLane(R);
|
|
1212
1212
|
if (r && findLane(r) === i && !hasActiveOverride(n)) {
|
|
1213
1213
|
if (!E) link(e, t);
|
|
1214
|
-
throw n.
|
|
1214
|
+
throw n.Y;
|
|
1215
1215
|
}
|
|
1216
1216
|
} else {
|
|
1217
1217
|
if (!E) link(e, t);
|
|
1218
|
-
throw n.
|
|
1218
|
+
throw n.Y;
|
|
1219
1219
|
}
|
|
1220
1220
|
}
|
|
1221
|
-
if (e.
|
|
1222
|
-
if (e
|
|
1221
|
+
if (e.H && e.ce & c) {
|
|
1222
|
+
if (e.$ < O) {
|
|
1223
1223
|
recompute(e, true);
|
|
1224
1224
|
return read(e);
|
|
1225
|
-
} else throw e.
|
|
1225
|
+
} else throw e.Y;
|
|
1226
1226
|
}
|
|
1227
|
-
return !t || R !== null || e.
|
|
1227
|
+
return !t || R !== null || e.fe === y || (j && e.ne && x !== e.ne) ? e.le : e.fe;
|
|
1228
1228
|
}
|
|
1229
1229
|
function setSignal(e, t) {
|
|
1230
|
-
if (e.
|
|
1230
|
+
if (e.ne && x !== e.ne) A.initTransition(e.ne);
|
|
1231
1231
|
const n = e.ge && !P;
|
|
1232
|
-
const r = n ? e.
|
|
1232
|
+
const r = n ? e.le : e.fe === y ? e.le : e.fe;
|
|
1233
1233
|
if (typeof t === "function") t = t(r);
|
|
1234
1234
|
const i = !e.Se || !e.Se(r, t);
|
|
1235
1235
|
if (!i) {
|
|
1236
|
-
if (n && e.
|
|
1236
|
+
if (n && e.fe !== y && e.H) {
|
|
1237
1237
|
insertSubs(e, true);
|
|
1238
1238
|
schedule();
|
|
1239
1239
|
}
|
|
1240
1240
|
return t;
|
|
1241
1241
|
}
|
|
1242
1242
|
if (n) {
|
|
1243
|
-
const n = A.
|
|
1244
|
-
if (e.
|
|
1245
|
-
A.initTransition(e.
|
|
1243
|
+
const n = A.B.includes(e);
|
|
1244
|
+
if (e.ne && n) {
|
|
1245
|
+
A.initTransition(e.ne);
|
|
1246
1246
|
}
|
|
1247
|
-
if (e.
|
|
1248
|
-
e.
|
|
1247
|
+
if (e.fe === y) {
|
|
1248
|
+
e.fe = e.le;
|
|
1249
1249
|
}
|
|
1250
1250
|
if (!n) {
|
|
1251
|
-
A.
|
|
1251
|
+
A.B.push(e);
|
|
1252
1252
|
}
|
|
1253
1253
|
e.ye = (e.ye || 0) + 1;
|
|
1254
1254
|
const r = getOrCreateLane(e);
|
|
1255
|
-
e.
|
|
1256
|
-
e.ce = t;
|
|
1257
|
-
} else {
|
|
1258
|
-
if (e.le === y) A.B.push(e);
|
|
1255
|
+
e.re = r;
|
|
1259
1256
|
e.le = t;
|
|
1257
|
+
} else {
|
|
1258
|
+
if (e.fe === y) A.D.push(e);
|
|
1259
|
+
e.fe = t;
|
|
1260
1260
|
}
|
|
1261
1261
|
updatePendingSignal(e);
|
|
1262
1262
|
if (e.me) {
|
|
1263
1263
|
setSignal(e.me, t);
|
|
1264
1264
|
}
|
|
1265
|
-
e
|
|
1265
|
+
e.$ = O;
|
|
1266
1266
|
insertSubs(e, n);
|
|
1267
1267
|
schedule();
|
|
1268
1268
|
return t;
|
|
@@ -1291,32 +1291,32 @@ function getPendingSignal(e) {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
function computePendingState(e) {
|
|
1293
1293
|
const t = e;
|
|
1294
|
-
if (e.ge && e.
|
|
1295
|
-
if (t.
|
|
1294
|
+
if (e.ge && e.fe !== y) {
|
|
1295
|
+
if (t.ce & l && !(t.ce & a)) return true;
|
|
1296
1296
|
if (e.de) {
|
|
1297
|
-
const t = e.
|
|
1298
|
-
return !!(t && t.
|
|
1297
|
+
const t = e.re ? findLane(e.re) : null;
|
|
1298
|
+
return !!(t && t.T.size > 0);
|
|
1299
1299
|
}
|
|
1300
1300
|
return true;
|
|
1301
1301
|
}
|
|
1302
|
-
if (e.
|
|
1303
|
-
return !!(t.
|
|
1302
|
+
if (e.fe !== y && !(t.ce & a)) return true;
|
|
1303
|
+
return !!(t.ce & l && !(t.ce & a));
|
|
1304
1304
|
}
|
|
1305
1305
|
function updatePendingSignal(e) {
|
|
1306
1306
|
if (e.Te) {
|
|
1307
1307
|
const t = computePendingState(e);
|
|
1308
1308
|
const n = e.Te;
|
|
1309
1309
|
setSignal(n, t);
|
|
1310
|
-
if (!t && n.
|
|
1310
|
+
if (!t && n.re) {
|
|
1311
1311
|
const t = resolveLane(e);
|
|
1312
|
-
if (t && t.
|
|
1313
|
-
const e = findLane(n.
|
|
1312
|
+
if (t && t.T.size > 0) {
|
|
1313
|
+
const e = findLane(n.re);
|
|
1314
1314
|
if (e !== t) {
|
|
1315
1315
|
mergeLanes(t, e);
|
|
1316
1316
|
}
|
|
1317
1317
|
}
|
|
1318
1318
|
k.delete(n);
|
|
1319
|
-
n.
|
|
1319
|
+
n.re = undefined;
|
|
1320
1320
|
}
|
|
1321
1321
|
}
|
|
1322
1322
|
}
|
|
@@ -1425,11 +1425,11 @@ function action(e) {
|
|
|
1425
1425
|
const i = e(...t);
|
|
1426
1426
|
A.initTransition();
|
|
1427
1427
|
let s = x;
|
|
1428
|
-
s.
|
|
1428
|
+
s.ee.push(i);
|
|
1429
1429
|
const done = (e, t) => {
|
|
1430
1430
|
s = currentTransition(s);
|
|
1431
|
-
const o = s.
|
|
1432
|
-
if (o >= 0) s.
|
|
1431
|
+
const o = s.ee.indexOf(i);
|
|
1432
|
+
if (o >= 0) s.ee.splice(o, 1);
|
|
1433
1433
|
setActiveTransition(s);
|
|
1434
1434
|
schedule();
|
|
1435
1435
|
t ? r(t) : n(e);
|
|
@@ -1528,7 +1528,8 @@ function onSettled(e) {
|
|
|
1528
1528
|
function unwrap(e) {
|
|
1529
1529
|
return e?.[F]?.[U] ?? e;
|
|
1530
1530
|
}
|
|
1531
|
-
function getOverrideValue(e, t, n, r) {
|
|
1531
|
+
function getOverrideValue(e, t, n, r, i) {
|
|
1532
|
+
if (i && r in i) return i[r];
|
|
1532
1533
|
return t && r in t ? t[r] : e[r];
|
|
1533
1534
|
}
|
|
1534
1535
|
function getAllKeys(e, t, n) {
|
|
@@ -1541,108 +1542,110 @@ function applyState(e, t, n, r) {
|
|
|
1541
1542
|
if (!i) return;
|
|
1542
1543
|
const s = i[G];
|
|
1543
1544
|
const o = i[K];
|
|
1544
|
-
|
|
1545
|
-
|
|
1545
|
+
const u = i[z];
|
|
1546
|
+
let f = i[U];
|
|
1547
|
+
if (e === s && !o && !u) return;
|
|
1546
1548
|
(i[Y] || ee).set(e, i[V]);
|
|
1547
1549
|
i[G] = e;
|
|
1548
1550
|
i[K] = undefined;
|
|
1549
1551
|
if (Array.isArray(s)) {
|
|
1550
1552
|
let t = false;
|
|
1551
|
-
const
|
|
1552
|
-
if (e.length &&
|
|
1553
|
-
let
|
|
1553
|
+
const l = getOverrideValue(s, o, f, "length", u);
|
|
1554
|
+
if (e.length && l && e[0] && n(e[0]) != null) {
|
|
1555
|
+
let c, a, d, p, h, y, g, w;
|
|
1554
1556
|
for (
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1557
|
+
d = 0, p = Math.min(l, e.length);
|
|
1558
|
+
d < p &&
|
|
1559
|
+
((y = getOverrideValue(s, o, f, d, u)) === e[d] || (y && e[d] && n(y) === n(e[d])));
|
|
1560
|
+
d++
|
|
1558
1561
|
) {
|
|
1559
|
-
applyState(e[
|
|
1562
|
+
applyState(e[d], wrap(y, i), n, r);
|
|
1560
1563
|
}
|
|
1561
|
-
const
|
|
1562
|
-
|
|
1564
|
+
const S = new Array(e.length),
|
|
1565
|
+
m = new Map();
|
|
1563
1566
|
for (
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
((
|
|
1568
|
-
|
|
1567
|
+
p = l - 1, h = e.length - 1;
|
|
1568
|
+
p >= d &&
|
|
1569
|
+
h >= d &&
|
|
1570
|
+
((y = getOverrideValue(s, o, f, p, u)) === e[h] || (y && e[h] && n(y) === n(e[h])));
|
|
1571
|
+
p--, h--
|
|
1569
1572
|
) {
|
|
1570
|
-
|
|
1573
|
+
S[h] = y;
|
|
1571
1574
|
}
|
|
1572
|
-
if (
|
|
1573
|
-
for (
|
|
1575
|
+
if (d > h || d > p) {
|
|
1576
|
+
for (a = d; a <= h; a++) {
|
|
1574
1577
|
t = true;
|
|
1575
|
-
i[U][
|
|
1578
|
+
i[U][a] && setSignal(i[U][a], wrap(e[a], i));
|
|
1576
1579
|
}
|
|
1577
|
-
for (;
|
|
1580
|
+
for (; a < e.length; a++) {
|
|
1578
1581
|
t = true;
|
|
1579
|
-
const s = wrap(
|
|
1580
|
-
i[U][
|
|
1581
|
-
applyState(e[
|
|
1582
|
+
const s = wrap(S[a], i);
|
|
1583
|
+
i[U][a] && setSignal(i[U][a], s);
|
|
1584
|
+
applyState(e[a], s, n, r);
|
|
1582
1585
|
}
|
|
1583
1586
|
t && i[U][M] && setSignal(i[U][M], void 0);
|
|
1584
|
-
|
|
1587
|
+
l !== e.length && i[U].length && setSignal(i[U].length, e.length);
|
|
1585
1588
|
return;
|
|
1586
1589
|
}
|
|
1587
|
-
|
|
1588
|
-
for (
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
}
|
|
1595
|
-
for (
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
if (
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1590
|
+
g = new Array(h + 1);
|
|
1591
|
+
for (a = h; a >= d; a--) {
|
|
1592
|
+
y = e[a];
|
|
1593
|
+
w = y ? n(y) : y;
|
|
1594
|
+
c = m.get(w);
|
|
1595
|
+
g[a] = c === undefined ? -1 : c;
|
|
1596
|
+
m.set(w, a);
|
|
1597
|
+
}
|
|
1598
|
+
for (c = d; c <= p; c++) {
|
|
1599
|
+
y = getOverrideValue(s, o, f, c, u);
|
|
1600
|
+
w = y ? n(y) : y;
|
|
1601
|
+
a = m.get(w);
|
|
1602
|
+
if (a !== undefined && a !== -1) {
|
|
1603
|
+
S[a] = y;
|
|
1604
|
+
a = g[a];
|
|
1605
|
+
m.set(w, a);
|
|
1603
1606
|
}
|
|
1604
1607
|
}
|
|
1605
|
-
for (
|
|
1606
|
-
if (
|
|
1607
|
-
const t = wrap(
|
|
1608
|
-
i[U][
|
|
1609
|
-
applyState(e[
|
|
1610
|
-
} else i[U][
|
|
1608
|
+
for (a = d; a < e.length; a++) {
|
|
1609
|
+
if (a in S) {
|
|
1610
|
+
const t = wrap(S[a], i);
|
|
1611
|
+
i[U][a] && setSignal(i[U][a], t);
|
|
1612
|
+
applyState(e[a], t, n, r);
|
|
1613
|
+
} else i[U][a] && setSignal(i[U][a], wrap(e[a], i));
|
|
1611
1614
|
}
|
|
1612
|
-
if (
|
|
1615
|
+
if (d < e.length) t = true;
|
|
1613
1616
|
} else if (e.length) {
|
|
1614
|
-
for (let t = 0,
|
|
1615
|
-
const
|
|
1616
|
-
isWrappable(
|
|
1617
|
+
for (let t = 0, l = e.length; t < l; t++) {
|
|
1618
|
+
const l = getOverrideValue(s, o, f, t, u);
|
|
1619
|
+
isWrappable(l) ? applyState(e[t], wrap(l, i), n, r) : i[U][t] && setSignal(i[U][t], e[t]);
|
|
1617
1620
|
}
|
|
1618
1621
|
}
|
|
1619
|
-
if (
|
|
1622
|
+
if (l !== e.length) {
|
|
1620
1623
|
t = true;
|
|
1621
1624
|
i[U].length && setSignal(i[U].length, e.length);
|
|
1622
1625
|
}
|
|
1623
1626
|
t && i[U][M] && setSignal(i[U][M], void 0);
|
|
1624
1627
|
return;
|
|
1625
1628
|
}
|
|
1626
|
-
if (
|
|
1627
|
-
const t =
|
|
1628
|
-
const
|
|
1629
|
-
for (let
|
|
1630
|
-
const
|
|
1631
|
-
const
|
|
1632
|
-
const
|
|
1633
|
-
let
|
|
1634
|
-
if (
|
|
1635
|
-
if (!
|
|
1629
|
+
if (f) {
|
|
1630
|
+
const t = f[M];
|
|
1631
|
+
const l = t || r ? getAllKeys(s, o, e) : Object.keys(f);
|
|
1632
|
+
for (let c = 0, a = l.length; c < a; c++) {
|
|
1633
|
+
const a = l[c];
|
|
1634
|
+
const d = f[a];
|
|
1635
|
+
const p = unwrap(getOverrideValue(s, o, f, a, u));
|
|
1636
|
+
let h = unwrap(e[a]);
|
|
1637
|
+
if (p === h) continue;
|
|
1638
|
+
if (!p || !isWrappable(p) || !isWrappable(h) || (n(p) != null && n(p) !== n(h))) {
|
|
1636
1639
|
t && setSignal(t, void 0);
|
|
1637
|
-
|
|
1638
|
-
} else applyState(
|
|
1640
|
+
d && setSignal(d, isWrappable(h) ? wrap(h, i) : h);
|
|
1641
|
+
} else applyState(h, wrap(p, i), n, r);
|
|
1639
1642
|
}
|
|
1640
1643
|
}
|
|
1641
|
-
if ((
|
|
1642
|
-
const t = Object.keys(
|
|
1644
|
+
if ((f = i[J])) {
|
|
1645
|
+
const t = Object.keys(f);
|
|
1643
1646
|
for (let n = 0, r = t.length; n < r; n++) {
|
|
1644
1647
|
const r = t[n];
|
|
1645
|
-
setSignal(
|
|
1648
|
+
setSignal(f[r], r in e);
|
|
1646
1649
|
}
|
|
1647
1650
|
}
|
|
1648
1651
|
}
|
|
@@ -1833,7 +1836,7 @@ const re = {
|
|
|
1833
1836
|
if (e && e.get) return e.get.call(n);
|
|
1834
1837
|
}
|
|
1835
1838
|
if (writeOnly(n)) {
|
|
1836
|
-
let n = i && (o || !u) ? (i.
|
|
1839
|
+
let n = i && (o || !u) ? (i.fe !== y ? (i.ge ? i.le : i.fe) : i.le) : f[t];
|
|
1837
1840
|
n === D && (n = undefined);
|
|
1838
1841
|
if (!isWrappable(n)) return n;
|
|
1839
1842
|
const r = wrap(n, e);
|
|
@@ -1865,8 +1868,8 @@ const re = {
|
|
|
1865
1868
|
if (writeOnly(r)) {
|
|
1866
1869
|
if (e[$]) {
|
|
1867
1870
|
const t = e[Z];
|
|
1868
|
-
if (t?.
|
|
1869
|
-
A.initTransition(t.
|
|
1871
|
+
if (t?.ne) {
|
|
1872
|
+
A.initTransition(t.ne);
|
|
1870
1873
|
}
|
|
1871
1874
|
}
|
|
1872
1875
|
untrack(() => {
|
|
@@ -2040,7 +2043,7 @@ function deep(e) {
|
|
|
2040
2043
|
return e[q];
|
|
2041
2044
|
}
|
|
2042
2045
|
function createOptimisticStore(e, t, n) {
|
|
2043
|
-
GlobalQueue.
|
|
2046
|
+
GlobalQueue.J ||= clearOptimisticStore;
|
|
2044
2047
|
const r = typeof e === "function";
|
|
2045
2048
|
const i = (r ? t : e) ?? {};
|
|
2046
2049
|
const s = r ? e : undefined;
|
|
@@ -2057,14 +2060,14 @@ function clearOptimisticStore(e) {
|
|
|
2057
2060
|
if (r) {
|
|
2058
2061
|
for (const e of Reflect.ownKeys(n)) {
|
|
2059
2062
|
if (r[e]) {
|
|
2060
|
-
r[e].
|
|
2063
|
+
r[e].re = undefined;
|
|
2061
2064
|
const n = t[K] && e in t[K] ? t[K][e] : t[G][e];
|
|
2062
2065
|
const i = n === D ? undefined : n;
|
|
2063
2066
|
setSignal(r[e], isWrappable(i) ? wrap(i, t) : i);
|
|
2064
2067
|
}
|
|
2065
2068
|
}
|
|
2066
2069
|
if (r[M]) {
|
|
2067
|
-
r[M].
|
|
2070
|
+
r[M].re = undefined;
|
|
2068
2071
|
setSignal(r[M], undefined);
|
|
2069
2072
|
}
|
|
2070
2073
|
}
|
|
@@ -2498,11 +2501,11 @@ function compare(e, t, n) {
|
|
|
2498
2501
|
}
|
|
2499
2502
|
function boundaryComputed(e, t) {
|
|
2500
2503
|
const n = computed(e, undefined, { lazy: true });
|
|
2501
|
-
n.
|
|
2502
|
-
const r = e !== undefined ? e : n.
|
|
2503
|
-
const i = t !== undefined ? t : n.
|
|
2504
|
-
n.
|
|
2505
|
-
n.
|
|
2504
|
+
n.be = (e, t) => {
|
|
2505
|
+
const r = e !== undefined ? e : n.ce;
|
|
2506
|
+
const i = t !== undefined ? t : n.Y;
|
|
2507
|
+
n.ce &= ~n.$e;
|
|
2508
|
+
n.oe.notify(n, n.$e, r, i);
|
|
2506
2509
|
};
|
|
2507
2510
|
n.$e = t;
|
|
2508
2511
|
n.Qe = true;
|
|
@@ -2510,9 +2513,9 @@ function boundaryComputed(e, t) {
|
|
|
2510
2513
|
return n;
|
|
2511
2514
|
}
|
|
2512
2515
|
function createBoundChildren(e, t, n, r) {
|
|
2513
|
-
const i = e.
|
|
2514
|
-
i.addChild((e.
|
|
2515
|
-
onCleanup(() => i.removeChild(e.
|
|
2516
|
+
const i = e.oe;
|
|
2517
|
+
i.addChild((e.oe = n));
|
|
2518
|
+
onCleanup(() => i.removeChild(e.oe));
|
|
2516
2519
|
return runWithOwner(e, () => {
|
|
2517
2520
|
const e = computed(t);
|
|
2518
2521
|
return boundaryComputed(() => staleValues(() => flatten(read(e))), r);
|
|
@@ -2534,7 +2537,7 @@ class CollectionQueue extends Queue {
|
|
|
2534
2537
|
notify(e, t, n, r) {
|
|
2535
2538
|
if (!(t & this.et) || (this.et & l && this.rt)) return super.notify(e, t, n, r);
|
|
2536
2539
|
if (n & this.et) {
|
|
2537
|
-
const t = r?.
|
|
2540
|
+
const t = r?.source || e.Y?.source;
|
|
2538
2541
|
if (t) {
|
|
2539
2542
|
const e = this.tt.size === 0;
|
|
2540
2543
|
this.tt.add(t);
|
|
@@ -2546,7 +2549,7 @@ class CollectionQueue extends Queue {
|
|
|
2546
2549
|
}
|
|
2547
2550
|
checkSources() {
|
|
2548
2551
|
for (const e of this.tt) {
|
|
2549
|
-
if (!(e.
|
|
2552
|
+
if (!(e.ce & this.et)) this.tt.delete(e);
|
|
2550
2553
|
}
|
|
2551
2554
|
if (!this.tt.size) setSignal(this.nt, false);
|
|
2552
2555
|
}
|
|
@@ -2573,7 +2576,7 @@ function createLoadBoundary(e, t) {
|
|
|
2573
2576
|
function createErrorBoundary(e, t) {
|
|
2574
2577
|
return createCollectionBoundary(c, e, e => {
|
|
2575
2578
|
let n = e.tt.values().next().value;
|
|
2576
|
-
const r = n.
|
|
2579
|
+
const r = n.Y?.cause ?? n.Y;
|
|
2577
2580
|
return t(r, () => {
|
|
2578
2581
|
for (const t of e.tt) recompute(t);
|
|
2579
2582
|
schedule();
|