@solidjs/signals 0.9.4 → 0.9.6
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 +739 -380
- package/dist/node.cjs +1273 -977
- package/dist/prod.js +1132 -796
- package/dist/types/core/constants.d.ts +2 -0
- package/dist/types/core/core.d.ts +12 -14
- package/dist/types/core/effect.d.ts +11 -0
- package/dist/types/core/index.d.ts +3 -3
- package/dist/types/core/scheduler.d.ts +15 -5
- package/dist/types/signals.d.ts +50 -3
- package/dist/types/store/optimistic.d.ts +7 -7
- package/dist/types/store/projection.d.ts +1 -0
- package/dist/types/store/store.d.ts +4 -2
- package/package.json +1 -1
package/dist/node.cjs
CHANGED
|
@@ -24,16 +24,18 @@ const i = 1 << 3;
|
|
|
24
24
|
const s = 1 << 4;
|
|
25
25
|
const o = 1 << 5;
|
|
26
26
|
const u = 1 << 6;
|
|
27
|
-
const l =
|
|
28
|
-
const f =
|
|
29
|
-
const c = 1 <<
|
|
30
|
-
const a = 1 <<
|
|
31
|
-
const d = 1;
|
|
27
|
+
const l = 1 << 7;
|
|
28
|
+
const f = 0;
|
|
29
|
+
const c = 1 << 0;
|
|
30
|
+
const a = 1 << 1;
|
|
31
|
+
const d = 1 << 2;
|
|
32
|
+
const p = 1;
|
|
32
33
|
const h = 2;
|
|
33
|
-
const
|
|
34
|
-
const y = typeof Proxy === "function";
|
|
34
|
+
const y = 3;
|
|
35
35
|
const g = {};
|
|
36
|
-
const w =
|
|
36
|
+
const w = typeof Proxy === "function";
|
|
37
|
+
const S = {};
|
|
38
|
+
const m = Symbol("refresh");
|
|
37
39
|
function actualInsertIntoHeap(e, t) {
|
|
38
40
|
const n = (e.i?.t ? e.i.u?.o : e.i?.o) ?? -1;
|
|
39
41
|
if (n >= e.o) e.o = n + 1;
|
|
@@ -41,120 +43,128 @@ function actualInsertIntoHeap(e, t) {
|
|
|
41
43
|
const i = t.l[r];
|
|
42
44
|
if (i === undefined) t.l[r] = e;
|
|
43
45
|
else {
|
|
44
|
-
const t = i.
|
|
45
|
-
t.
|
|
46
|
-
e.
|
|
47
|
-
i.
|
|
46
|
+
const t = i.p;
|
|
47
|
+
t.h = e;
|
|
48
|
+
e.p = t;
|
|
49
|
+
i.p = e;
|
|
48
50
|
}
|
|
49
|
-
if (r > t.
|
|
51
|
+
if (r > t.S) t.S = r;
|
|
50
52
|
}
|
|
51
53
|
function insertIntoHeap(e, o) {
|
|
52
|
-
let u = e.
|
|
54
|
+
let u = e.m;
|
|
53
55
|
if (u & (i | r)) return;
|
|
54
56
|
if (u & t) {
|
|
55
|
-
e.
|
|
56
|
-
} else e.
|
|
57
|
+
e.m = (u & -4) | n | i;
|
|
58
|
+
} else e.m = u | i;
|
|
57
59
|
if (!(u & s)) actualInsertIntoHeap(e, o);
|
|
58
60
|
}
|
|
59
61
|
function insertIntoHeapHeight(e, t) {
|
|
60
|
-
let n = e.
|
|
62
|
+
let n = e.m;
|
|
61
63
|
if (n & (i | r | s)) return;
|
|
62
|
-
e.
|
|
64
|
+
e.m = n | s;
|
|
63
65
|
actualInsertIntoHeap(e, t);
|
|
64
66
|
}
|
|
65
67
|
function deleteFromHeap(e, t) {
|
|
66
|
-
const n = e.
|
|
68
|
+
const n = e.m;
|
|
67
69
|
if (!(n & (i | s))) return;
|
|
68
|
-
e.
|
|
70
|
+
e.m = n & -25;
|
|
69
71
|
const r = e.o;
|
|
70
|
-
if (e.
|
|
72
|
+
if (e.p === e) t.l[r] = undefined;
|
|
71
73
|
else {
|
|
72
|
-
const n = e.
|
|
74
|
+
const n = e.h;
|
|
73
75
|
const i = t.l[r];
|
|
74
76
|
const s = n ?? i;
|
|
75
77
|
if (e === i) t.l[r] = n;
|
|
76
|
-
else e.h
|
|
77
|
-
s.
|
|
78
|
+
else e.p.h = n;
|
|
79
|
+
s.p = e.p;
|
|
78
80
|
}
|
|
79
|
-
e.
|
|
80
|
-
e.
|
|
81
|
+
e.p = e;
|
|
82
|
+
e.h = undefined;
|
|
81
83
|
}
|
|
82
84
|
function markHeap(e) {
|
|
83
|
-
if (e.
|
|
84
|
-
e.
|
|
85
|
-
for (let t = 0; t <= e.
|
|
86
|
-
for (let n = e.l[t]; n !== undefined; n = n.
|
|
87
|
-
if (n.
|
|
85
|
+
if (e._) return;
|
|
86
|
+
e._ = true;
|
|
87
|
+
for (let t = 0; t <= e.S; t++) {
|
|
88
|
+
for (let n = e.l[t]; n !== undefined; n = n.h) {
|
|
89
|
+
if (n.m & i) markNode(n);
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
}
|
|
91
93
|
function markNode(e, r = n) {
|
|
92
|
-
const i = e.
|
|
94
|
+
const i = e.m;
|
|
93
95
|
if ((i & (t | n)) >= r) return;
|
|
94
|
-
e.
|
|
95
|
-
for (let n = e.O; n !== null; n = n.
|
|
96
|
-
markNode(n.
|
|
96
|
+
e.m = (i & -4) | r;
|
|
97
|
+
for (let n = e.O; n !== null; n = n.P) {
|
|
98
|
+
markNode(n.C, t);
|
|
97
99
|
}
|
|
98
100
|
if (e.k !== null) {
|
|
99
|
-
for (let n = e.k; n !== null; n = n.
|
|
100
|
-
for (let e = n.O; e !== null; e = e.
|
|
101
|
-
markNode(e.
|
|
101
|
+
for (let n = e.k; n !== null; n = n.A) {
|
|
102
|
+
for (let e = n.O; e !== null; e = e.P) {
|
|
103
|
+
markNode(e.C, t);
|
|
102
104
|
}
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
107
|
}
|
|
106
108
|
function runHeap(e, t) {
|
|
107
|
-
e.
|
|
108
|
-
for (e.
|
|
109
|
-
let n = e.l[e.
|
|
109
|
+
e._ = false;
|
|
110
|
+
for (e.W = 0; e.W <= e.S; e.W++) {
|
|
111
|
+
let n = e.l[e.W];
|
|
110
112
|
while (n !== undefined) {
|
|
111
|
-
if (n.
|
|
113
|
+
if (n.m & i) t(n);
|
|
112
114
|
else adjustHeight(n, e);
|
|
113
|
-
n = e.l[e.
|
|
115
|
+
n = e.l[e.W];
|
|
114
116
|
}
|
|
115
117
|
}
|
|
116
|
-
e.
|
|
118
|
+
e.S = 0;
|
|
117
119
|
}
|
|
118
120
|
function adjustHeight(e, t) {
|
|
119
121
|
deleteFromHeap(e, t);
|
|
120
122
|
let n = e.o;
|
|
121
|
-
for (let t = e.
|
|
122
|
-
const e = t.
|
|
123
|
-
const r = e.
|
|
124
|
-
if (r.
|
|
123
|
+
for (let t = e.j; t; t = t.N) {
|
|
124
|
+
const e = t.H;
|
|
125
|
+
const r = e.I || e;
|
|
126
|
+
if (r.R && r.o >= n) n = r.o + 1;
|
|
125
127
|
}
|
|
126
128
|
if (e.o !== n) {
|
|
127
129
|
e.o = n;
|
|
128
|
-
for (let n = e.O; n !== null; n = n.
|
|
129
|
-
insertIntoHeapHeight(n.
|
|
130
|
+
for (let n = e.O; n !== null; n = n.P) {
|
|
131
|
+
insertIntoHeapHeight(n.C, t);
|
|
130
132
|
}
|
|
131
133
|
}
|
|
132
134
|
}
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
let
|
|
138
|
-
let
|
|
139
|
-
let
|
|
135
|
+
const b = new Set();
|
|
136
|
+
const _ = { l: new Array(2e3).fill(undefined), _: false, W: 0, S: 0 };
|
|
137
|
+
const O = { l: new Array(2e3).fill(undefined), _: false, W: 0, S: 0 };
|
|
138
|
+
let x = 0;
|
|
139
|
+
let v = null;
|
|
140
|
+
let P = false;
|
|
141
|
+
let C = false;
|
|
142
|
+
let k = false;
|
|
143
|
+
function setOptimisticReadActive(e) {
|
|
144
|
+
C = e;
|
|
145
|
+
}
|
|
146
|
+
function setProjectionWriteActive(e) {
|
|
147
|
+
k = e;
|
|
148
|
+
}
|
|
140
149
|
function schedule() {
|
|
141
|
-
if (
|
|
142
|
-
|
|
143
|
-
if (!
|
|
150
|
+
if (P) return;
|
|
151
|
+
P = true;
|
|
152
|
+
if (!A.T) queueMicrotask(flush);
|
|
144
153
|
}
|
|
145
154
|
class Queue {
|
|
146
155
|
i = null;
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
156
|
+
q = [[], []];
|
|
157
|
+
F = [[], []];
|
|
158
|
+
V = [];
|
|
159
|
+
created = x;
|
|
150
160
|
addChild(e) {
|
|
151
|
-
this.
|
|
161
|
+
this.V.push(e);
|
|
152
162
|
e.i = this;
|
|
153
163
|
}
|
|
154
164
|
removeChild(e) {
|
|
155
|
-
const t = this.
|
|
165
|
+
const t = this.V.indexOf(e);
|
|
156
166
|
if (t >= 0) {
|
|
157
|
-
this.
|
|
167
|
+
this.V.splice(t, 1);
|
|
158
168
|
e.i = null;
|
|
159
169
|
}
|
|
160
170
|
}
|
|
@@ -162,89 +172,110 @@ class Queue {
|
|
|
162
172
|
if (this.i) return this.i.notify(e, t, n);
|
|
163
173
|
return false;
|
|
164
174
|
}
|
|
165
|
-
|
|
166
|
-
if (
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
runQueue(
|
|
175
|
+
M(e, t, n) {
|
|
176
|
+
if (t[e - 1].length) {
|
|
177
|
+
const n = t[e - 1];
|
|
178
|
+
t[e - 1] = [];
|
|
179
|
+
runQueue(n, e);
|
|
170
180
|
}
|
|
171
|
-
for (let t = 0; t < this.
|
|
172
|
-
this.
|
|
181
|
+
for (let t = 0; t < this.V.length; t++) {
|
|
182
|
+
this.V[t][n]?.(e);
|
|
173
183
|
}
|
|
174
184
|
}
|
|
185
|
+
run(e) {
|
|
186
|
+
this.M(e, this.q, "run");
|
|
187
|
+
}
|
|
188
|
+
runOptimistic(e) {
|
|
189
|
+
this.M(e, this.F, "runOptimistic");
|
|
190
|
+
}
|
|
175
191
|
enqueue(e, t) {
|
|
176
|
-
if (e)
|
|
192
|
+
if (e) {
|
|
193
|
+
const n = C ? this.F : this.q;
|
|
194
|
+
n[e - 1].push(t);
|
|
195
|
+
}
|
|
177
196
|
schedule();
|
|
178
197
|
}
|
|
179
198
|
stashQueues(e) {
|
|
180
|
-
e.
|
|
181
|
-
e.
|
|
182
|
-
this.
|
|
183
|
-
for (let t = 0; t < this.
|
|
184
|
-
let n = this.
|
|
185
|
-
let r = e.
|
|
199
|
+
e.q[0].push(...this.q[0]);
|
|
200
|
+
e.q[1].push(...this.q[1]);
|
|
201
|
+
this.q = [[], []];
|
|
202
|
+
for (let t = 0; t < this.V.length; t++) {
|
|
203
|
+
let n = this.V[t];
|
|
204
|
+
let r = e.V[t];
|
|
186
205
|
if (!r) {
|
|
187
|
-
r = {
|
|
188
|
-
e.
|
|
206
|
+
r = { q: [[], []], V: [] };
|
|
207
|
+
e.V[t] = r;
|
|
189
208
|
}
|
|
190
209
|
n.stashQueues(r);
|
|
191
210
|
}
|
|
192
211
|
}
|
|
193
212
|
restoreQueues(e) {
|
|
194
|
-
this.
|
|
195
|
-
this.
|
|
196
|
-
for (let t = 0; t < e.
|
|
197
|
-
const n = e.
|
|
198
|
-
let r = this.
|
|
213
|
+
this.q[0].push(...e.q[0]);
|
|
214
|
+
this.q[1].push(...e.q[1]);
|
|
215
|
+
for (let t = 0; t < e.V.length; t++) {
|
|
216
|
+
const n = e.V[t];
|
|
217
|
+
let r = this.V[t];
|
|
199
218
|
if (r) r.restoreQueues(n);
|
|
200
219
|
}
|
|
201
220
|
}
|
|
202
221
|
}
|
|
203
222
|
class GlobalQueue extends Queue {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
static
|
|
223
|
+
T = false;
|
|
224
|
+
D = [];
|
|
225
|
+
B = [];
|
|
226
|
+
G = new Set();
|
|
227
|
+
static K;
|
|
228
|
+
static U;
|
|
229
|
+
static L = null;
|
|
209
230
|
flush() {
|
|
210
|
-
if (this.
|
|
211
|
-
this.
|
|
231
|
+
if (this.T) return;
|
|
232
|
+
this.T = true;
|
|
212
233
|
try {
|
|
213
|
-
runHeap(
|
|
214
|
-
if (
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
this.
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
234
|
+
runHeap(_, GlobalQueue.K);
|
|
235
|
+
if (v) {
|
|
236
|
+
const e = transitionComplete(v);
|
|
237
|
+
if (!e) {
|
|
238
|
+
let e = v;
|
|
239
|
+
runHeap(O, GlobalQueue.K);
|
|
240
|
+
this.D = [];
|
|
241
|
+
this.B = [];
|
|
242
|
+
this.G = new Set();
|
|
243
|
+
this.runOptimistic(p);
|
|
244
|
+
this.runOptimistic(h);
|
|
245
|
+
this.stashQueues(v.queueStash);
|
|
246
|
+
x++;
|
|
247
|
+
P = false;
|
|
248
|
+
runTransitionPending(v.pendingNodes);
|
|
249
|
+
v = null;
|
|
250
|
+
finalizePureQueue(null, true);
|
|
225
251
|
return;
|
|
226
252
|
}
|
|
227
|
-
this.
|
|
228
|
-
this.
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
runTransitionPending(this.
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
253
|
+
this.D !== v.pendingNodes && this.D.push(...v.pendingNodes);
|
|
254
|
+
this.restoreQueues(v.queueStash);
|
|
255
|
+
b.delete(v);
|
|
256
|
+
const t = v;
|
|
257
|
+
v = null;
|
|
258
|
+
runTransitionPending(this.D);
|
|
259
|
+
finalizePureQueue(t);
|
|
260
|
+
} else {
|
|
261
|
+
if (b.size) runHeap(O, GlobalQueue.K);
|
|
262
|
+
finalizePureQueue();
|
|
263
|
+
}
|
|
264
|
+
x++;
|
|
265
|
+
P = _.S >= _.W;
|
|
266
|
+
this.runOptimistic(p);
|
|
267
|
+
this.run(p);
|
|
268
|
+
this.runOptimistic(h);
|
|
238
269
|
this.run(h);
|
|
239
270
|
} finally {
|
|
240
|
-
this.
|
|
271
|
+
this.T = false;
|
|
241
272
|
}
|
|
242
273
|
}
|
|
243
274
|
notify(e, t, n) {
|
|
244
|
-
if (t &
|
|
245
|
-
if (n &
|
|
246
|
-
if (
|
|
247
|
-
|
|
275
|
+
if (t & c) {
|
|
276
|
+
if (n & c) {
|
|
277
|
+
if (v && e.J && !v.asyncNodes.includes(e.J.cause)) {
|
|
278
|
+
v.asyncNodes.push(e.J.cause);
|
|
248
279
|
schedule();
|
|
249
280
|
}
|
|
250
281
|
}
|
|
@@ -253,86 +284,115 @@ class GlobalQueue extends Queue {
|
|
|
253
284
|
return false;
|
|
254
285
|
}
|
|
255
286
|
initTransition(e) {
|
|
256
|
-
if (
|
|
257
|
-
if (
|
|
258
|
-
|
|
259
|
-
|
|
287
|
+
if (e) e = currentTransition(e);
|
|
288
|
+
if (e && e === v) return;
|
|
289
|
+
if (!e && v && v.time === x) return;
|
|
290
|
+
if (!v) {
|
|
291
|
+
v = e ?? {
|
|
292
|
+
time: x,
|
|
260
293
|
pendingNodes: [],
|
|
261
294
|
asyncNodes: [],
|
|
262
295
|
optimisticNodes: [],
|
|
296
|
+
optimisticStores: new Set(),
|
|
263
297
|
actions: [],
|
|
264
|
-
queueStash: {
|
|
298
|
+
queueStash: { q: [[], []], V: [] },
|
|
265
299
|
done: false
|
|
266
300
|
};
|
|
301
|
+
} else if (e) {
|
|
302
|
+
v.done = e;
|
|
303
|
+
e.actions.push(...v.actions);
|
|
304
|
+
b.delete(v);
|
|
305
|
+
v = e;
|
|
306
|
+
}
|
|
307
|
+
b.add(v);
|
|
308
|
+
v.time = x;
|
|
309
|
+
for (let e = 0; e < this.D.length; e++) {
|
|
310
|
+
const t = this.D[e];
|
|
311
|
+
t.X = v;
|
|
312
|
+
v.pendingNodes.push(t);
|
|
313
|
+
}
|
|
314
|
+
this.D = v.pendingNodes;
|
|
315
|
+
for (let e = 0; e < this.B.length; e++) {
|
|
316
|
+
const t = this.B[e];
|
|
317
|
+
t.X = v;
|
|
318
|
+
v.optimisticNodes.push(t);
|
|
319
|
+
}
|
|
320
|
+
this.B = v.optimisticNodes;
|
|
321
|
+
for (const e of this.G) {
|
|
322
|
+
v.optimisticStores.add(e);
|
|
323
|
+
}
|
|
324
|
+
this.G = v.optimisticStores;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
function insertSubs(e, t = false) {
|
|
328
|
+
for (let n = e.O; n !== null; n = n.P) {
|
|
329
|
+
if (t) n.C.m |= l;
|
|
330
|
+
const e = n.C;
|
|
331
|
+
if (e.Y === y) {
|
|
332
|
+
if (!e.Z) {
|
|
333
|
+
e.Z = true;
|
|
334
|
+
e.$.enqueue(h, e.ee);
|
|
335
|
+
}
|
|
336
|
+
continue;
|
|
267
337
|
}
|
|
268
|
-
_
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
const t = this.M[e];
|
|
272
|
-
t.G = x;
|
|
273
|
-
x.pendingNodes.push(t);
|
|
274
|
-
}
|
|
275
|
-
for (let e = 0; e < this.T.length; e++) {
|
|
276
|
-
const t = this.T[e];
|
|
277
|
-
t.G = x;
|
|
278
|
-
x.optimisticNodes.push(t);
|
|
279
|
-
}
|
|
280
|
-
this.M = x.pendingNodes;
|
|
281
|
-
this.T = x.optimisticNodes;
|
|
338
|
+
const r = n.C.m & o ? O : _;
|
|
339
|
+
if (r.W > n.C.o) r.W = n.C.o;
|
|
340
|
+
insertIntoHeap(n.C, r);
|
|
282
341
|
}
|
|
283
342
|
}
|
|
284
|
-
function
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
343
|
+
function finalizePureQueue(e = null, t = false) {
|
|
344
|
+
let n = !t;
|
|
345
|
+
if (_.S >= _.W) {
|
|
346
|
+
n = true;
|
|
347
|
+
runHeap(_, GlobalQueue.K);
|
|
289
348
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
349
|
+
if (n) {
|
|
350
|
+
const t = A.D;
|
|
351
|
+
for (let e = 0; e < t.length; e++) {
|
|
352
|
+
const n = t[e];
|
|
353
|
+
if (n.te !== g) {
|
|
354
|
+
n.ne = n.te;
|
|
355
|
+
n.te = g;
|
|
356
|
+
if (n.Y && n.Y !== y) n.Z = true;
|
|
357
|
+
}
|
|
358
|
+
if (n.R) GlobalQueue.U(n, false, true);
|
|
300
359
|
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
const
|
|
315
|
-
if (
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
360
|
+
t.length = 0;
|
|
361
|
+
const n = e ? e.optimisticNodes : A.B;
|
|
362
|
+
for (let e = 0; e < n.length; e++) {
|
|
363
|
+
const t = n[e];
|
|
364
|
+
const r = t.te;
|
|
365
|
+
if (r !== g && t.ne !== r) {
|
|
366
|
+
t.ne = r;
|
|
367
|
+
insertSubs(t, true);
|
|
368
|
+
}
|
|
369
|
+
t.te = g;
|
|
370
|
+
t.X = null;
|
|
371
|
+
}
|
|
372
|
+
n.length = 0;
|
|
373
|
+
const r = e ? e.optimisticStores : A.G;
|
|
374
|
+
if (GlobalQueue.L && r.size) {
|
|
375
|
+
for (const e of r) {
|
|
376
|
+
GlobalQueue.L(e);
|
|
377
|
+
}
|
|
378
|
+
r.clear();
|
|
379
|
+
schedule();
|
|
319
380
|
}
|
|
320
|
-
if (n.H) GlobalQueue.B(n, false, true);
|
|
321
381
|
}
|
|
322
|
-
e.length = 0;
|
|
323
382
|
}
|
|
324
|
-
function
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
383
|
+
function trackOptimisticStore(e) {
|
|
384
|
+
A.G.add(e);
|
|
385
|
+
schedule();
|
|
386
|
+
}
|
|
387
|
+
function runTransitionPending(e) {
|
|
388
|
+
for (let t = 0; t < e.length; t++) {
|
|
389
|
+
e[t].X = v;
|
|
330
390
|
}
|
|
331
391
|
}
|
|
332
|
-
const
|
|
392
|
+
const A = new GlobalQueue();
|
|
333
393
|
function flush() {
|
|
334
|
-
while (
|
|
335
|
-
|
|
394
|
+
while (P) {
|
|
395
|
+
A.flush();
|
|
336
396
|
}
|
|
337
397
|
}
|
|
338
398
|
function runQueue(e, t) {
|
|
@@ -343,7 +403,7 @@ function transitionComplete(e) {
|
|
|
343
403
|
if (e.actions.length) return false;
|
|
344
404
|
let t = true;
|
|
345
405
|
for (let n = 0; n < e.asyncNodes.length; n++) {
|
|
346
|
-
if (e.asyncNodes[n]
|
|
406
|
+
if (e.asyncNodes[n].re & c) {
|
|
347
407
|
t = false;
|
|
348
408
|
break;
|
|
349
409
|
}
|
|
@@ -351,295 +411,393 @@ function transitionComplete(e) {
|
|
|
351
411
|
t && (e.done = true);
|
|
352
412
|
return t;
|
|
353
413
|
}
|
|
414
|
+
function currentTransition(e) {
|
|
415
|
+
while (e.done && typeof e.done === "object") e = e.done;
|
|
416
|
+
return e;
|
|
417
|
+
}
|
|
354
418
|
function runInTransition(e, t) {
|
|
355
|
-
const n =
|
|
419
|
+
const n = v;
|
|
356
420
|
try {
|
|
357
|
-
|
|
421
|
+
v = currentTransition(e);
|
|
358
422
|
return t();
|
|
359
423
|
} finally {
|
|
360
|
-
|
|
424
|
+
v = n;
|
|
361
425
|
}
|
|
362
426
|
}
|
|
427
|
+
function restoreTransition(e, t) {
|
|
428
|
+
A.initTransition(e);
|
|
429
|
+
const n = t();
|
|
430
|
+
flush();
|
|
431
|
+
return n;
|
|
432
|
+
}
|
|
363
433
|
function action(e) {
|
|
364
|
-
return (...t) =>
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
if (e.done) {
|
|
376
|
-
r.actions.splice(r.actions.indexOf(n), 1);
|
|
377
|
-
x = r;
|
|
434
|
+
return (...t) =>
|
|
435
|
+
new Promise((n, r) => {
|
|
436
|
+
const i = e(...t);
|
|
437
|
+
A.initTransition();
|
|
438
|
+
let s = v;
|
|
439
|
+
s.actions.push(i);
|
|
440
|
+
const done = (e, t) => {
|
|
441
|
+
s = currentTransition(s);
|
|
442
|
+
const o = s.actions.indexOf(i);
|
|
443
|
+
if (o >= 0) s.actions.splice(o, 1);
|
|
444
|
+
v = s;
|
|
378
445
|
schedule();
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
446
|
+
t ? r(t) : n(e);
|
|
447
|
+
};
|
|
448
|
+
const step = (e, t) => {
|
|
449
|
+
let n;
|
|
450
|
+
try {
|
|
451
|
+
n = t ? i.throw(e) : i.next(e);
|
|
452
|
+
} catch (e) {
|
|
453
|
+
return done(undefined, e);
|
|
454
|
+
}
|
|
455
|
+
if (n instanceof Promise)
|
|
456
|
+
return void n.then(run, e => restoreTransition(s, () => step(e, true)));
|
|
457
|
+
run(n);
|
|
458
|
+
};
|
|
459
|
+
const run = e => {
|
|
460
|
+
if (e.done) return done(e.value);
|
|
461
|
+
if (e.value instanceof Promise)
|
|
462
|
+
return void e.value.then(
|
|
463
|
+
e => restoreTransition(s, () => step(e)),
|
|
464
|
+
e => restoreTransition(s, () => step(e, true))
|
|
465
|
+
);
|
|
466
|
+
restoreTransition(s, () => step(e.value));
|
|
467
|
+
};
|
|
468
|
+
step();
|
|
469
|
+
});
|
|
388
470
|
}
|
|
389
|
-
GlobalQueue.
|
|
390
|
-
GlobalQueue.
|
|
391
|
-
let N = false;
|
|
392
|
-
let k = false;
|
|
393
|
-
let j = false;
|
|
394
|
-
let P = null;
|
|
471
|
+
GlobalQueue.K = recompute;
|
|
472
|
+
GlobalQueue.U = disposeChildren;
|
|
395
473
|
let W = false;
|
|
396
|
-
let
|
|
474
|
+
let j = false;
|
|
475
|
+
let N = false;
|
|
476
|
+
let E = false;
|
|
477
|
+
let H = false;
|
|
478
|
+
let I = false;
|
|
479
|
+
let Q = null;
|
|
397
480
|
function recompute(t, n = false) {
|
|
398
|
-
const i = t.
|
|
481
|
+
const i = t.Y;
|
|
399
482
|
if (!n) {
|
|
400
|
-
if (t.
|
|
401
|
-
deleteFromHeap(t, t.
|
|
402
|
-
if (t.
|
|
483
|
+
if (t.X && (!i || v) && v !== t.X) A.initTransition(t.X);
|
|
484
|
+
deleteFromHeap(t, t.m & o ? O : _);
|
|
485
|
+
if (t.X) disposeChildren(t);
|
|
403
486
|
else {
|
|
404
487
|
markDisposal(t);
|
|
405
|
-
t.
|
|
406
|
-
t.
|
|
407
|
-
t.
|
|
408
|
-
t.
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
const s =
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
t.
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
let
|
|
419
|
-
let
|
|
420
|
-
let
|
|
421
|
-
|
|
422
|
-
|
|
488
|
+
t.ie = t.se;
|
|
489
|
+
t.oe = t.ue;
|
|
490
|
+
t.se = null;
|
|
491
|
+
t.ue = null;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
const s = !!(t.m & l);
|
|
495
|
+
const u = t.le && t.te !== g;
|
|
496
|
+
const f = Q;
|
|
497
|
+
Q = t;
|
|
498
|
+
t.fe = null;
|
|
499
|
+
t.m = r;
|
|
500
|
+
t.ce = x;
|
|
501
|
+
let d = t.te === g ? t.ne : t.te;
|
|
502
|
+
let p = t.o;
|
|
503
|
+
let h = W;
|
|
504
|
+
let y = C;
|
|
505
|
+
W = true;
|
|
506
|
+
if (s) setOptimisticReadActive(true);
|
|
423
507
|
try {
|
|
424
|
-
|
|
425
|
-
t
|
|
508
|
+
d = handleAsync(t, t.R(d));
|
|
509
|
+
clearStatus(t);
|
|
426
510
|
} catch (e) {
|
|
427
511
|
if (e instanceof NotReadyError) {
|
|
428
512
|
if (e.cause !== t) link(e.cause, t);
|
|
429
|
-
|
|
430
|
-
} else
|
|
513
|
+
notifyStatus(t, c, e);
|
|
514
|
+
} else notifyStatus(t, a, e);
|
|
431
515
|
} finally {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
if (!
|
|
437
|
-
const e = t.
|
|
438
|
-
let
|
|
439
|
-
if (
|
|
516
|
+
W = h;
|
|
517
|
+
t.m = e;
|
|
518
|
+
Q = f;
|
|
519
|
+
}
|
|
520
|
+
if (!t.J) {
|
|
521
|
+
const e = t.fe;
|
|
522
|
+
let r = e !== null ? e.N : t.j;
|
|
523
|
+
if (r !== null) {
|
|
440
524
|
do {
|
|
441
|
-
|
|
442
|
-
} while (
|
|
443
|
-
if (e !== null) e.
|
|
444
|
-
else t.
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
if (
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
}
|
|
456
|
-
(!t.oe || S) && notifySubs(t);
|
|
457
|
-
} else if (t.o != d) {
|
|
458
|
-
for (let e = t.O; e !== null; e = e.C) {
|
|
459
|
-
insertIntoHeapHeight(e.N, e.N.S & o ? m : b);
|
|
525
|
+
r = unlinkSubs(r);
|
|
526
|
+
} while (r !== null);
|
|
527
|
+
if (e !== null) e.N = null;
|
|
528
|
+
else t.j = null;
|
|
529
|
+
}
|
|
530
|
+
const l = !t.ae || !t.ae(t.te === g ? t.ne : t.te, d);
|
|
531
|
+
if (l) {
|
|
532
|
+
if (n || (i && v !== t.X) || s) t.ne = d;
|
|
533
|
+
else t.te = d;
|
|
534
|
+
insertSubs(t, s || u);
|
|
535
|
+
} else if (t.o != p) {
|
|
536
|
+
for (let e = t.O; e !== null; e = e.P) {
|
|
537
|
+
insertIntoHeapHeight(e.C, e.C.m & o ? O : _);
|
|
538
|
+
}
|
|
460
539
|
}
|
|
461
540
|
}
|
|
462
|
-
|
|
463
|
-
(!n || t
|
|
464
|
-
t.
|
|
541
|
+
setOptimisticReadActive(y);
|
|
542
|
+
(!n || t.re & c) && !t.X && A.D.push(t);
|
|
543
|
+
t.X && i && v !== t.X && runInTransition(t.X, () => recompute(t));
|
|
465
544
|
}
|
|
466
545
|
function handleAsync(e, t, n) {
|
|
467
546
|
const r = typeof t === "object" && t !== null;
|
|
468
|
-
const i = r &&
|
|
469
|
-
const s = r && untrack(() => t
|
|
470
|
-
if (!
|
|
471
|
-
e.
|
|
547
|
+
const i = r && untrack(() => t[Symbol.asyncIterator]);
|
|
548
|
+
const s = !i && r && untrack(() => typeof t.then === "function");
|
|
549
|
+
if (!s && !i) {
|
|
550
|
+
e.de = null;
|
|
472
551
|
return t;
|
|
473
552
|
}
|
|
474
|
-
e.
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
553
|
+
e.de = t;
|
|
554
|
+
let o;
|
|
555
|
+
const handleError = n => {
|
|
556
|
+
if (e.de !== t) return;
|
|
557
|
+
A.initTransition(e.X);
|
|
558
|
+
if (n instanceof NotReadyError) {
|
|
559
|
+
if (n.cause !== e) link(n.cause, e);
|
|
560
|
+
notifyStatus(e, c, n);
|
|
561
|
+
} else notifyStatus(e, a, n);
|
|
562
|
+
e.ce = x;
|
|
563
|
+
};
|
|
564
|
+
const asyncWrite = (r, i) => {
|
|
565
|
+
if (e.de !== t) return;
|
|
566
|
+
A.initTransition(e.X);
|
|
567
|
+
clearStatus(e);
|
|
568
|
+
if (n) n(r);
|
|
569
|
+
else if (e.le) {
|
|
570
|
+
const t = e.te !== g;
|
|
571
|
+
if (e.R) e.te = r;
|
|
572
|
+
if (!t) {
|
|
573
|
+
e.ne = r;
|
|
574
|
+
insertSubs(e);
|
|
575
|
+
}
|
|
576
|
+
e.ce = x;
|
|
487
577
|
schedule();
|
|
488
|
-
|
|
489
|
-
|
|
578
|
+
} else setSignal(e, () => r);
|
|
579
|
+
flush();
|
|
580
|
+
i?.();
|
|
581
|
+
};
|
|
582
|
+
if (s) {
|
|
583
|
+
let n = false,
|
|
584
|
+
r = true;
|
|
585
|
+
t.then(
|
|
586
|
+
e => {
|
|
587
|
+
if (r) {
|
|
588
|
+
o = e;
|
|
589
|
+
n = true;
|
|
590
|
+
} else asyncWrite(e);
|
|
591
|
+
},
|
|
592
|
+
e => {
|
|
593
|
+
if (!r) handleError(e);
|
|
594
|
+
}
|
|
595
|
+
);
|
|
596
|
+
r = false;
|
|
597
|
+
if (!n) {
|
|
598
|
+
A.initTransition(e.X);
|
|
599
|
+
throw new NotReadyError(Q);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
if (i) {
|
|
603
|
+
const n = t[Symbol.asyncIterator]();
|
|
604
|
+
let r = false;
|
|
605
|
+
const iterate = () => {
|
|
606
|
+
let e,
|
|
607
|
+
t = false,
|
|
608
|
+
i = true;
|
|
609
|
+
n.next().then(
|
|
610
|
+
n => {
|
|
611
|
+
if (i) {
|
|
612
|
+
e = n;
|
|
613
|
+
t = true;
|
|
614
|
+
} else if (!n.done) asyncWrite(n.value, iterate);
|
|
615
|
+
},
|
|
616
|
+
e => {
|
|
617
|
+
if (!i) handleError(e);
|
|
618
|
+
}
|
|
619
|
+
);
|
|
620
|
+
i = false;
|
|
621
|
+
if (t && !e.done) {
|
|
622
|
+
o = e.value;
|
|
623
|
+
r = true;
|
|
624
|
+
return iterate();
|
|
625
|
+
}
|
|
626
|
+
return t && e.done;
|
|
627
|
+
};
|
|
628
|
+
const i = iterate();
|
|
629
|
+
if (!r && !i) {
|
|
630
|
+
A.initTransition(e.X);
|
|
631
|
+
throw new NotReadyError(Q);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
return o;
|
|
635
|
+
}
|
|
636
|
+
function clearStatus(e) {
|
|
637
|
+
e.re = f;
|
|
638
|
+
e.J = null;
|
|
639
|
+
updatePendingSignal(e);
|
|
640
|
+
if (e.pe) {
|
|
641
|
+
e.pe();
|
|
490
642
|
} else {
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
C.initTransition(e);
|
|
496
|
-
n?.(r) ?? setSignal(e, () => r);
|
|
497
|
-
flush();
|
|
643
|
+
if (!e.X) {
|
|
644
|
+
for (let t = e.O; t !== null; t = t.P) {
|
|
645
|
+
if (t.C.re & c) {
|
|
646
|
+
insertIntoHeap(t.C, t.C.m & o ? O : _);
|
|
498
647
|
}
|
|
499
|
-
} catch (n) {
|
|
500
|
-
if (e.ce !== t) return;
|
|
501
|
-
C.initTransition(e);
|
|
502
|
-
setStatusFlags(e, c, n);
|
|
503
|
-
e.se = O;
|
|
504
|
-
notifySubs(e);
|
|
505
|
-
schedule();
|
|
506
|
-
flush();
|
|
507
648
|
}
|
|
508
|
-
}
|
|
649
|
+
}
|
|
650
|
+
schedule();
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
function notifyStatus(e, t, n) {
|
|
654
|
+
e.re = t | (e.re & d);
|
|
655
|
+
e.J = n;
|
|
656
|
+
updatePendingSignal(e);
|
|
657
|
+
if (e.pe) return e.pe();
|
|
658
|
+
for (let r = e.O; r !== null; r = r.P) {
|
|
659
|
+
r.C.ce = x;
|
|
660
|
+
if (r.C.J !== n) {
|
|
661
|
+
!r.C.X && A.D.push(r.C);
|
|
662
|
+
notifyStatus(r.C, t, n);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
for (let r = e.k; r !== null; r = r.A) {
|
|
666
|
+
for (let e = r.O; e !== null; e = e.P) {
|
|
667
|
+
e.C.ce = x;
|
|
668
|
+
if (e.C.J !== n) {
|
|
669
|
+
!e.C.X && A.D.push(e.C);
|
|
670
|
+
notifyStatus(e.C, t, n);
|
|
671
|
+
}
|
|
672
|
+
}
|
|
509
673
|
}
|
|
510
|
-
C.initTransition(e);
|
|
511
|
-
throw new NotReadyError(A);
|
|
512
674
|
}
|
|
513
675
|
function updateIfNecessary(r) {
|
|
514
|
-
if (r.
|
|
515
|
-
for (let e = r.
|
|
516
|
-
const t = e.
|
|
517
|
-
const i = t.
|
|
518
|
-
if (i.
|
|
676
|
+
if (r.m & t) {
|
|
677
|
+
for (let e = r.j; e; e = e.N) {
|
|
678
|
+
const t = e.H;
|
|
679
|
+
const i = t.I || t;
|
|
680
|
+
if (i.R) {
|
|
519
681
|
updateIfNecessary(i);
|
|
520
682
|
}
|
|
521
|
-
if (r.
|
|
683
|
+
if (r.m & n) {
|
|
522
684
|
break;
|
|
523
685
|
}
|
|
524
686
|
}
|
|
525
687
|
}
|
|
526
|
-
if (r.
|
|
688
|
+
if (r.m & n) {
|
|
527
689
|
recompute(r);
|
|
528
690
|
}
|
|
529
|
-
r.
|
|
691
|
+
r.m = e;
|
|
530
692
|
}
|
|
531
693
|
function unlinkSubs(e) {
|
|
532
|
-
const t = e.
|
|
533
|
-
const n = e.
|
|
534
|
-
const r = e.
|
|
535
|
-
const i = e.
|
|
536
|
-
if (r !== null) r.
|
|
537
|
-
else t.
|
|
538
|
-
if (i !== null) i.
|
|
694
|
+
const t = e.H;
|
|
695
|
+
const n = e.N;
|
|
696
|
+
const r = e.P;
|
|
697
|
+
const i = e.he;
|
|
698
|
+
if (r !== null) r.he = i;
|
|
699
|
+
else t.ye = i;
|
|
700
|
+
if (i !== null) i.P = r;
|
|
539
701
|
else {
|
|
540
702
|
t.O = r;
|
|
541
703
|
if (r === null) {
|
|
542
|
-
t.
|
|
543
|
-
t.
|
|
704
|
+
t.ge?.();
|
|
705
|
+
t.R && !t.we && unobserved(t);
|
|
544
706
|
}
|
|
545
707
|
}
|
|
546
708
|
return n;
|
|
547
709
|
}
|
|
548
710
|
function unobserved(e) {
|
|
549
|
-
deleteFromHeap(e, e.
|
|
550
|
-
let t = e.
|
|
711
|
+
deleteFromHeap(e, e.m & o ? O : _);
|
|
712
|
+
let t = e.j;
|
|
551
713
|
while (t !== null) {
|
|
552
714
|
t = unlinkSubs(t);
|
|
553
715
|
}
|
|
554
|
-
e.
|
|
716
|
+
e.j = null;
|
|
555
717
|
disposeChildren(e, true);
|
|
556
718
|
}
|
|
557
719
|
function link(e, t) {
|
|
558
|
-
const n = t.
|
|
559
|
-
if (n !== null && n.
|
|
720
|
+
const n = t.fe;
|
|
721
|
+
if (n !== null && n.H === e) return;
|
|
560
722
|
let i = null;
|
|
561
|
-
const s = t.
|
|
723
|
+
const s = t.m & r;
|
|
562
724
|
if (s) {
|
|
563
|
-
i = n !== null ? n.
|
|
564
|
-
if (i !== null && i.
|
|
565
|
-
t.
|
|
725
|
+
i = n !== null ? n.N : t.j;
|
|
726
|
+
if (i !== null && i.H === e) {
|
|
727
|
+
t.fe = i;
|
|
566
728
|
return;
|
|
567
729
|
}
|
|
568
730
|
}
|
|
569
|
-
const o = e.
|
|
570
|
-
if (o !== null && o.
|
|
571
|
-
const u = (t.
|
|
572
|
-
if (n !== null) n.
|
|
573
|
-
else t.
|
|
574
|
-
if (o !== null) o.
|
|
731
|
+
const o = e.ye;
|
|
732
|
+
if (o !== null && o.C === t && (!s || isValidLink(o, t))) return;
|
|
733
|
+
const u = (t.fe = e.ye = { H: e, C: t, N: i, he: o, P: null });
|
|
734
|
+
if (n !== null) n.N = u;
|
|
735
|
+
else t.j = u;
|
|
736
|
+
if (o !== null) o.P = u;
|
|
575
737
|
else e.O = u;
|
|
576
738
|
}
|
|
577
739
|
function isValidLink(e, t) {
|
|
578
|
-
const n = t.
|
|
740
|
+
const n = t.fe;
|
|
579
741
|
if (n !== null) {
|
|
580
|
-
let r = t.
|
|
742
|
+
let r = t.j;
|
|
581
743
|
do {
|
|
582
744
|
if (r === e) return true;
|
|
583
745
|
if (r === n) break;
|
|
584
|
-
r = r.
|
|
746
|
+
r = r.N;
|
|
585
747
|
} while (r !== null);
|
|
586
748
|
}
|
|
587
749
|
return false;
|
|
588
750
|
}
|
|
589
|
-
function setStatusFlags(e, t, n = null) {
|
|
590
|
-
e.$ = t;
|
|
591
|
-
e.K = n;
|
|
592
|
-
}
|
|
593
751
|
function markDisposal(e) {
|
|
594
|
-
let t = e.
|
|
752
|
+
let t = e.ue;
|
|
595
753
|
while (t) {
|
|
596
|
-
t.
|
|
597
|
-
if (t.
|
|
598
|
-
deleteFromHeap(t,
|
|
599
|
-
insertIntoHeap(t,
|
|
754
|
+
t.m |= o;
|
|
755
|
+
if (t.m & i) {
|
|
756
|
+
deleteFromHeap(t, _);
|
|
757
|
+
insertIntoHeap(t, O);
|
|
600
758
|
}
|
|
601
759
|
markDisposal(t);
|
|
602
|
-
t = t.
|
|
760
|
+
t = t.Se;
|
|
603
761
|
}
|
|
604
762
|
}
|
|
605
763
|
function dispose(e) {
|
|
606
|
-
let t = e.
|
|
764
|
+
let t = e.j || null;
|
|
607
765
|
do {
|
|
608
766
|
t = unlinkSubs(t);
|
|
609
767
|
} while (t !== null);
|
|
610
|
-
e.
|
|
611
|
-
e.
|
|
768
|
+
e.j = null;
|
|
769
|
+
e.fe = null;
|
|
612
770
|
disposeChildren(e, true);
|
|
613
771
|
}
|
|
614
772
|
function disposeChildren(e, t = false, n) {
|
|
615
|
-
if (e.
|
|
616
|
-
if (t) e.
|
|
617
|
-
let r = n ? e.
|
|
773
|
+
if (e.m & u) return;
|
|
774
|
+
if (t) e.m = u;
|
|
775
|
+
let r = n ? e.oe : e.ue;
|
|
618
776
|
while (r) {
|
|
619
|
-
const e = r.
|
|
620
|
-
if (r.
|
|
777
|
+
const e = r.Se;
|
|
778
|
+
if (r.j) {
|
|
621
779
|
const e = r;
|
|
622
|
-
deleteFromHeap(e, e.
|
|
623
|
-
let t = e.
|
|
780
|
+
deleteFromHeap(e, e.m & o ? O : _);
|
|
781
|
+
let t = e.j;
|
|
624
782
|
do {
|
|
625
783
|
t = unlinkSubs(t);
|
|
626
784
|
} while (t !== null);
|
|
627
|
-
e.
|
|
628
|
-
e.
|
|
785
|
+
e.j = null;
|
|
786
|
+
e.fe = null;
|
|
629
787
|
}
|
|
630
788
|
disposeChildren(r, true);
|
|
631
789
|
r = e;
|
|
632
790
|
}
|
|
633
791
|
if (n) {
|
|
634
|
-
e.
|
|
792
|
+
e.oe = null;
|
|
635
793
|
} else {
|
|
636
|
-
e.
|
|
637
|
-
e.
|
|
794
|
+
e.ue = null;
|
|
795
|
+
e.Se = null;
|
|
638
796
|
}
|
|
639
797
|
runDisposal(e, n);
|
|
640
798
|
}
|
|
641
799
|
function runDisposal(e, t) {
|
|
642
|
-
let n = t ? e.
|
|
800
|
+
let n = t ? e.ie : e.se;
|
|
643
801
|
if (!n) return;
|
|
644
802
|
if (Array.isArray(n)) {
|
|
645
803
|
for (let e = 0; e < n.length; e++) {
|
|
@@ -649,10 +807,10 @@ function runDisposal(e, t) {
|
|
|
649
807
|
} else {
|
|
650
808
|
n.call(n);
|
|
651
809
|
}
|
|
652
|
-
t ? (e.
|
|
810
|
+
t ? (e.ie = null) : (e.se = null);
|
|
653
811
|
}
|
|
654
812
|
function getNextChildId(e) {
|
|
655
|
-
if (e.id != null) return formatId(e.id, e.
|
|
813
|
+
if (e.id != null) return formatId(e.id, e.me++);
|
|
656
814
|
throw new Error("Cannot get child id from owner without an id");
|
|
657
815
|
}
|
|
658
816
|
function formatId(e, t) {
|
|
@@ -662,46 +820,45 @@ function formatId(e, t) {
|
|
|
662
820
|
}
|
|
663
821
|
function computed(t, n, r) {
|
|
664
822
|
const i = {
|
|
665
|
-
id: r?.id ?? (
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
823
|
+
id: r?.id ?? (Q?.id != null ? getNextChildId(Q) : undefined),
|
|
824
|
+
ae: r?.equals != null ? r.equals : isEqual,
|
|
825
|
+
be: !!r?.pureWrite,
|
|
826
|
+
ge: r?.unobserved,
|
|
827
|
+
se: null,
|
|
828
|
+
$: Q?.$ ?? A,
|
|
829
|
+
_e: Q?._e ?? S,
|
|
830
|
+
me: 0,
|
|
831
|
+
R: t,
|
|
832
|
+
ne: n,
|
|
675
833
|
o: 0,
|
|
676
834
|
k: null,
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
835
|
+
h: undefined,
|
|
836
|
+
p: null,
|
|
837
|
+
j: null,
|
|
838
|
+
fe: null,
|
|
681
839
|
O: null,
|
|
682
|
-
de: null,
|
|
683
|
-
i: A,
|
|
684
840
|
ye: null,
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
841
|
+
i: Q,
|
|
842
|
+
Se: null,
|
|
843
|
+
ue: null,
|
|
844
|
+
m: e,
|
|
845
|
+
re: d,
|
|
846
|
+
ce: x,
|
|
847
|
+
te: g,
|
|
848
|
+
ie: null,
|
|
849
|
+
oe: null,
|
|
850
|
+
de: null,
|
|
851
|
+
X: null
|
|
694
852
|
};
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
const e = A.re;
|
|
853
|
+
i.p = i;
|
|
854
|
+
const s = Q?.t ? Q.u : Q;
|
|
855
|
+
if (Q) {
|
|
856
|
+
const e = Q.ue;
|
|
700
857
|
if (e === null) {
|
|
701
|
-
|
|
858
|
+
Q.ue = i;
|
|
702
859
|
} else {
|
|
703
|
-
i.
|
|
704
|
-
|
|
860
|
+
i.Se = e;
|
|
861
|
+
Q.ue = i;
|
|
705
862
|
}
|
|
706
863
|
}
|
|
707
864
|
if (s) i.o = s.o + 1;
|
|
@@ -710,47 +867,99 @@ function computed(t, n, r) {
|
|
|
710
867
|
}
|
|
711
868
|
function signal(e, t, n = null) {
|
|
712
869
|
const r = {
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
L: e,
|
|
870
|
+
ae: t?.equals != null ? t.equals : isEqual,
|
|
871
|
+
be: !!t?.pureWrite,
|
|
872
|
+
ge: t?.unobserved,
|
|
873
|
+
ne: e,
|
|
718
874
|
O: null,
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
U: p
|
|
875
|
+
ye: null,
|
|
876
|
+
ce: x,
|
|
877
|
+
I: n,
|
|
878
|
+
A: n?.k || null,
|
|
879
|
+
te: g
|
|
725
880
|
};
|
|
726
881
|
n && (n.k = r);
|
|
727
882
|
return r;
|
|
728
883
|
}
|
|
884
|
+
function optimisticSignal(e, t) {
|
|
885
|
+
const n = signal(e, t);
|
|
886
|
+
n.le = true;
|
|
887
|
+
return n;
|
|
888
|
+
}
|
|
889
|
+
function optimisticComputed(e, t, n) {
|
|
890
|
+
const r = computed(e, t, n);
|
|
891
|
+
r.le = true;
|
|
892
|
+
return r;
|
|
893
|
+
}
|
|
894
|
+
function getPendingSignal(e) {
|
|
895
|
+
if (!e.Oe) {
|
|
896
|
+
e.Oe = optimisticSignal(false, { pureWrite: true });
|
|
897
|
+
if (computePendingState(e)) setSignal(e.Oe, true);
|
|
898
|
+
}
|
|
899
|
+
return e.Oe;
|
|
900
|
+
}
|
|
901
|
+
function computePendingState(e) {
|
|
902
|
+
if (e.te !== g) return true;
|
|
903
|
+
const t = e;
|
|
904
|
+
return !!(t.re & c && !(t.re & d));
|
|
905
|
+
}
|
|
906
|
+
function getPendingValueComputed(e) {
|
|
907
|
+
if (!e.xe) {
|
|
908
|
+
const t = I;
|
|
909
|
+
I = false;
|
|
910
|
+
e.xe = optimisticComputed(() => read(e));
|
|
911
|
+
I = t;
|
|
912
|
+
}
|
|
913
|
+
return e.xe;
|
|
914
|
+
}
|
|
915
|
+
function updatePendingSignal(e) {
|
|
916
|
+
if (e.Oe) setSignal(e.Oe, computePendingState(e));
|
|
917
|
+
}
|
|
729
918
|
function isEqual(e, t) {
|
|
730
919
|
return e === t;
|
|
731
920
|
}
|
|
732
921
|
function untrack(e) {
|
|
733
|
-
if (!
|
|
734
|
-
|
|
922
|
+
if (!W) return e();
|
|
923
|
+
W = false;
|
|
735
924
|
try {
|
|
736
925
|
return e();
|
|
737
926
|
} finally {
|
|
738
|
-
|
|
927
|
+
W = true;
|
|
739
928
|
}
|
|
740
929
|
}
|
|
741
930
|
function read(e) {
|
|
742
|
-
|
|
931
|
+
if (E) {
|
|
932
|
+
const t = e.I || e;
|
|
933
|
+
const n = getPendingSignal(t);
|
|
934
|
+
const r = E;
|
|
935
|
+
E = false;
|
|
936
|
+
if (read(n)) {
|
|
937
|
+
H = true;
|
|
938
|
+
}
|
|
939
|
+
E = r;
|
|
940
|
+
return e.ne;
|
|
941
|
+
}
|
|
942
|
+
if (I) {
|
|
943
|
+
const t = getPendingValueComputed(e);
|
|
944
|
+
const n = I;
|
|
945
|
+
I = false;
|
|
946
|
+
const r = read(t);
|
|
947
|
+
I = n;
|
|
948
|
+
if (t.re & c) return e.ne;
|
|
949
|
+
return r;
|
|
950
|
+
}
|
|
951
|
+
let t = Q;
|
|
743
952
|
if (t?.t) t = t.u;
|
|
744
|
-
if (
|
|
745
|
-
if (t &&
|
|
746
|
-
if (e.
|
|
953
|
+
if (N && e.R) recompute(e);
|
|
954
|
+
if (t && W) {
|
|
955
|
+
if (e.R && e.m & u) recompute(e);
|
|
747
956
|
link(e, t);
|
|
748
|
-
const n = e.
|
|
749
|
-
if (n.
|
|
750
|
-
const r = e.
|
|
751
|
-
if (n.o >= (r ?
|
|
957
|
+
const n = e.I || e;
|
|
958
|
+
if (n.R) {
|
|
959
|
+
const r = e.m & o;
|
|
960
|
+
if (n.o >= (r ? O.W : _.W)) {
|
|
752
961
|
markNode(t);
|
|
753
|
-
markHeap(r ?
|
|
962
|
+
markHeap(r ? O : _);
|
|
754
963
|
updateIfNecessary(n);
|
|
755
964
|
}
|
|
756
965
|
const i = n.o;
|
|
@@ -759,110 +968,87 @@ function read(e) {
|
|
|
759
968
|
}
|
|
760
969
|
}
|
|
761
970
|
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
}
|
|
767
|
-
j = false;
|
|
768
|
-
try {
|
|
769
|
-
return read(e.fe);
|
|
770
|
-
} finally {
|
|
771
|
-
j = true;
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
const n = e.F || e;
|
|
775
|
-
if (P) {
|
|
776
|
-
if (!n.Y) {
|
|
777
|
-
n.Y = signal(false);
|
|
778
|
-
n.Y.oe = true;
|
|
779
|
-
n.Y.Z = e => setSignal(n.Y, e);
|
|
780
|
-
}
|
|
781
|
-
const e = P;
|
|
782
|
-
P = null;
|
|
783
|
-
e.L = read(n.Y) || e.L;
|
|
784
|
-
P = e;
|
|
785
|
-
}
|
|
786
|
-
if (!P && n.$ & f) {
|
|
787
|
-
if ((t && !k) || n.$ & a || e.F) throw n.K;
|
|
788
|
-
else if (t && k) {
|
|
789
|
-
setStatusFlags(t, t.$ | f, n.K);
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
if (e.$ & c) {
|
|
793
|
-
if (e.se < O) {
|
|
971
|
+
const n = e.I || e;
|
|
972
|
+
if (t && !C && n.re & c && !(j && n.X && v !== n.X)) throw n.J;
|
|
973
|
+
if (e.R && e.re & a) {
|
|
974
|
+
if (e.ce < x) {
|
|
794
975
|
recompute(e, true);
|
|
795
976
|
return read(e);
|
|
796
|
-
} else
|
|
797
|
-
throw e.K;
|
|
798
|
-
}
|
|
977
|
+
} else throw e.J;
|
|
799
978
|
}
|
|
800
|
-
return !t ||
|
|
979
|
+
return !t || C || e.te === g || (j && e.X && v !== e.X) ? e.ne : e.te;
|
|
801
980
|
}
|
|
802
981
|
function setSignal(e, t) {
|
|
803
|
-
if (
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
982
|
+
if (e.X && v !== e.X) A.initTransition(e.X);
|
|
983
|
+
const n = e.le && !k;
|
|
984
|
+
const r = n ? e.ne : e.te === g ? e.ne : e.te;
|
|
985
|
+
if (typeof t === "function") t = t(r);
|
|
986
|
+
const i = !e.ae || !e.ae(r, t);
|
|
987
|
+
if (!i) return t;
|
|
808
988
|
if (n) {
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
e.U = t;
|
|
989
|
+
const n = e.te === g;
|
|
990
|
+
if (e.X && !n) {
|
|
991
|
+
A.initTransition(e.X);
|
|
813
992
|
}
|
|
814
|
-
if (
|
|
993
|
+
if (n) {
|
|
994
|
+
e.te = e.ne;
|
|
995
|
+
A.B.push(e);
|
|
996
|
+
}
|
|
997
|
+
e.ne = t;
|
|
998
|
+
} else {
|
|
999
|
+
if (e.te === g) A.D.push(e);
|
|
1000
|
+
e.te = t;
|
|
815
1001
|
}
|
|
816
|
-
|
|
817
|
-
e.
|
|
818
|
-
|
|
1002
|
+
updatePendingSignal(e);
|
|
1003
|
+
if (e.xe) {
|
|
1004
|
+
setSignal(e.xe, t);
|
|
1005
|
+
}
|
|
1006
|
+
e.ce = x;
|
|
1007
|
+
insertSubs(e, n);
|
|
819
1008
|
schedule();
|
|
820
1009
|
return t;
|
|
821
1010
|
}
|
|
1011
|
+
const R = {};
|
|
822
1012
|
function getObserver() {
|
|
823
|
-
|
|
1013
|
+
if (E || I) return R;
|
|
1014
|
+
return W ? Q : null;
|
|
824
1015
|
}
|
|
825
1016
|
function getOwner() {
|
|
826
|
-
return
|
|
1017
|
+
return Q;
|
|
827
1018
|
}
|
|
828
1019
|
function onCleanup(e) {
|
|
829
|
-
if (!
|
|
830
|
-
|
|
831
|
-
if (
|
|
832
|
-
|
|
833
|
-
} else if (Array.isArray(t.te)) {
|
|
834
|
-
t.te.push(e);
|
|
835
|
-
} else {
|
|
836
|
-
t.te = [t.te, e];
|
|
837
|
-
}
|
|
1020
|
+
if (!Q) return e;
|
|
1021
|
+
if (!Q.se) Q.se = e;
|
|
1022
|
+
else if (Array.isArray(Q.se)) Q.se.push(e);
|
|
1023
|
+
else Q.se = [Q.se, e];
|
|
838
1024
|
return e;
|
|
839
1025
|
}
|
|
840
1026
|
function createOwner(e) {
|
|
841
|
-
const t =
|
|
1027
|
+
const t = Q;
|
|
842
1028
|
const n = {
|
|
1029
|
+
id: e?.id ?? (t?.id != null ? getNextChildId(t) : undefined),
|
|
843
1030
|
t: true,
|
|
844
1031
|
u: t?.t ? t.u : t,
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
_e: t?._e
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
ne: null,
|
|
1032
|
+
ue: null,
|
|
1033
|
+
Se: null,
|
|
1034
|
+
se: null,
|
|
1035
|
+
$: t?.$ ?? A,
|
|
1036
|
+
_e: t?._e || S,
|
|
1037
|
+
me: 0,
|
|
1038
|
+
ie: null,
|
|
1039
|
+
oe: null,
|
|
854
1040
|
i: t,
|
|
855
1041
|
dispose(e = true) {
|
|
856
1042
|
disposeChildren(n, e);
|
|
857
1043
|
}
|
|
858
1044
|
};
|
|
859
1045
|
if (t) {
|
|
860
|
-
const e = t.
|
|
1046
|
+
const e = t.ue;
|
|
861
1047
|
if (e === null) {
|
|
862
|
-
t.
|
|
1048
|
+
t.ue = n;
|
|
863
1049
|
} else {
|
|
864
|
-
n.
|
|
865
|
-
t.
|
|
1050
|
+
n.Se = e;
|
|
1051
|
+
t.ue = n;
|
|
866
1052
|
}
|
|
867
1053
|
}
|
|
868
1054
|
return n;
|
|
@@ -872,64 +1058,66 @@ function createRoot(e, t) {
|
|
|
872
1058
|
return runWithOwner(n, () => e(n.dispose));
|
|
873
1059
|
}
|
|
874
1060
|
function runWithOwner(e, t) {
|
|
875
|
-
const n =
|
|
876
|
-
|
|
1061
|
+
const n = Q;
|
|
1062
|
+
const r = W;
|
|
1063
|
+
Q = e;
|
|
1064
|
+
W = false;
|
|
877
1065
|
try {
|
|
878
1066
|
return t();
|
|
879
1067
|
} finally {
|
|
880
|
-
|
|
1068
|
+
Q = n;
|
|
1069
|
+
W = r;
|
|
881
1070
|
}
|
|
882
1071
|
}
|
|
883
1072
|
function staleValues(e, t = true) {
|
|
884
|
-
const n =
|
|
885
|
-
|
|
1073
|
+
const n = j;
|
|
1074
|
+
j = t;
|
|
886
1075
|
try {
|
|
887
1076
|
return e();
|
|
888
1077
|
} finally {
|
|
889
|
-
|
|
1078
|
+
j = n;
|
|
890
1079
|
}
|
|
891
1080
|
}
|
|
892
1081
|
function pending(e) {
|
|
893
|
-
const t =
|
|
894
|
-
|
|
1082
|
+
const t = I;
|
|
1083
|
+
I = true;
|
|
895
1084
|
try {
|
|
896
|
-
return
|
|
1085
|
+
return e();
|
|
897
1086
|
} finally {
|
|
898
|
-
|
|
1087
|
+
I = t;
|
|
899
1088
|
}
|
|
900
1089
|
}
|
|
901
1090
|
function isPending(e) {
|
|
902
|
-
const t =
|
|
903
|
-
|
|
1091
|
+
const t = E;
|
|
1092
|
+
const n = H;
|
|
1093
|
+
E = true;
|
|
1094
|
+
H = false;
|
|
904
1095
|
try {
|
|
905
|
-
|
|
906
|
-
return
|
|
907
|
-
} catch (e) {
|
|
908
|
-
if (!(e instanceof NotReadyError)) return false;
|
|
909
|
-
throw e;
|
|
1096
|
+
e();
|
|
1097
|
+
return H;
|
|
910
1098
|
} finally {
|
|
911
|
-
|
|
1099
|
+
E = t;
|
|
1100
|
+
H = n;
|
|
912
1101
|
}
|
|
913
1102
|
}
|
|
914
1103
|
function refresh(e) {
|
|
915
|
-
let t =
|
|
916
|
-
|
|
1104
|
+
let t = N;
|
|
1105
|
+
N = true;
|
|
917
1106
|
try {
|
|
918
1107
|
if (typeof e !== "function") {
|
|
919
|
-
recompute(e[
|
|
1108
|
+
recompute(e[m]);
|
|
920
1109
|
return e;
|
|
921
1110
|
}
|
|
922
1111
|
return untrack(e);
|
|
923
1112
|
} finally {
|
|
924
|
-
|
|
1113
|
+
N = t;
|
|
925
1114
|
if (!t) {
|
|
926
1115
|
schedule();
|
|
927
|
-
flush();
|
|
928
1116
|
}
|
|
929
1117
|
}
|
|
930
1118
|
}
|
|
931
1119
|
function isRefreshing() {
|
|
932
|
-
return
|
|
1120
|
+
return N;
|
|
933
1121
|
}
|
|
934
1122
|
function createContext(e, t) {
|
|
935
1123
|
return { id: Symbol(t), defaultValue: e };
|
|
@@ -938,7 +1126,7 @@ function getContext(e, t = getOwner()) {
|
|
|
938
1126
|
if (!t) {
|
|
939
1127
|
throw new NoOwnerError();
|
|
940
1128
|
}
|
|
941
|
-
const n = hasContext(e, t) ? t.
|
|
1129
|
+
const n = hasContext(e, t) ? t._e[e.id] : e.defaultValue;
|
|
942
1130
|
if (isUndefined(n)) {
|
|
943
1131
|
throw new ContextNotFoundError();
|
|
944
1132
|
}
|
|
@@ -948,73 +1136,92 @@ function setContext(e, t, n = getOwner()) {
|
|
|
948
1136
|
if (!n) {
|
|
949
1137
|
throw new NoOwnerError();
|
|
950
1138
|
}
|
|
951
|
-
n.
|
|
1139
|
+
n._e = { ...n._e, [e.id]: isUndefined(t) ? e.defaultValue : t };
|
|
952
1140
|
}
|
|
953
1141
|
function hasContext(e, t) {
|
|
954
|
-
return !isUndefined(t?.
|
|
1142
|
+
return !isUndefined(t?._e[e.id]);
|
|
955
1143
|
}
|
|
956
1144
|
function isUndefined(e) {
|
|
957
1145
|
return typeof e === "undefined";
|
|
958
1146
|
}
|
|
959
1147
|
function effect(e, t, n, r, i) {
|
|
960
1148
|
let s = false;
|
|
961
|
-
const o = computed(e, r, {
|
|
1149
|
+
const o = computed(i?.render ? t => staleValues(() => e(t)) : e, r, {
|
|
962
1150
|
...i,
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
if (!this._e.notify(this, c, c)) throw e;
|
|
992
|
-
} else if (this.J === d) {
|
|
993
|
-
this._e.notify(this, f | c, this.$);
|
|
1151
|
+
equals: () => {
|
|
1152
|
+
o.Z = !o.J;
|
|
1153
|
+
if (s) o.$.enqueue(o.Y, runEffect.bind(o));
|
|
1154
|
+
return false;
|
|
1155
|
+
},
|
|
1156
|
+
lazy: true
|
|
1157
|
+
});
|
|
1158
|
+
o.ve = r;
|
|
1159
|
+
o.Pe = t;
|
|
1160
|
+
o.Ce = n;
|
|
1161
|
+
o.ke = undefined;
|
|
1162
|
+
o.Y = i?.render ? p : h;
|
|
1163
|
+
o.pe = () => {
|
|
1164
|
+
if (o.re & a) {
|
|
1165
|
+
let e = o.J;
|
|
1166
|
+
o.$.notify(o, c, 0);
|
|
1167
|
+
if (o.Y === h) {
|
|
1168
|
+
try {
|
|
1169
|
+
return o.Ce
|
|
1170
|
+
? o.Ce(e, () => {
|
|
1171
|
+
o.ke?.();
|
|
1172
|
+
o.ke = undefined;
|
|
1173
|
+
})
|
|
1174
|
+
: console.error(e);
|
|
1175
|
+
} catch (t) {
|
|
1176
|
+
e = t;
|
|
994
1177
|
}
|
|
995
1178
|
}
|
|
996
|
-
|
|
997
|
-
|
|
1179
|
+
if (!o.$.notify(o, a, a)) throw e;
|
|
1180
|
+
} else if (o.Y === p) o.$.notify(o, c | a, o.re);
|
|
1181
|
+
};
|
|
1182
|
+
recompute(o, true);
|
|
1183
|
+
!i?.defer && (o.Y === h ? o.$.enqueue(o.Y, runEffect.bind(o)) : runEffect.call(o));
|
|
998
1184
|
s = true;
|
|
999
|
-
|
|
1000
|
-
!i?.defer &&
|
|
1001
|
-
!(o.$ & (c | f)) &&
|
|
1002
|
-
(o.J === h ? o._e.enqueue(o.J, runEffect.bind(o)) : runEffect.call(o));
|
|
1003
|
-
onCleanup(() => o.ve?.());
|
|
1185
|
+
onCleanup(() => o.ke?.());
|
|
1004
1186
|
}
|
|
1005
1187
|
function runEffect() {
|
|
1006
|
-
if (!this.
|
|
1007
|
-
this.
|
|
1008
|
-
this.
|
|
1188
|
+
if (!this.Z || this.m & u) return;
|
|
1189
|
+
this.ke?.();
|
|
1190
|
+
this.ke = undefined;
|
|
1009
1191
|
try {
|
|
1010
|
-
this.
|
|
1192
|
+
this.ke = this.Pe(this.ne, this.ve);
|
|
1011
1193
|
} catch (e) {
|
|
1012
|
-
if (!this
|
|
1194
|
+
if (!this.$.notify(this, a, a)) throw e;
|
|
1013
1195
|
} finally {
|
|
1014
|
-
this.
|
|
1015
|
-
this.
|
|
1196
|
+
this.ve = this.ne;
|
|
1197
|
+
this.Z = false;
|
|
1016
1198
|
}
|
|
1017
1199
|
}
|
|
1200
|
+
function trackedEffect(e, t) {
|
|
1201
|
+
const run = () => {
|
|
1202
|
+
if (!n.Z || n.m & u) return;
|
|
1203
|
+
n.Z = false;
|
|
1204
|
+
recompute(n);
|
|
1205
|
+
};
|
|
1206
|
+
const n = computed(
|
|
1207
|
+
() => {
|
|
1208
|
+
try {
|
|
1209
|
+
n.ke?.();
|
|
1210
|
+
n.ke = undefined;
|
|
1211
|
+
n.ke = staleValues(e) || undefined;
|
|
1212
|
+
} finally {
|
|
1213
|
+
}
|
|
1214
|
+
},
|
|
1215
|
+
undefined,
|
|
1216
|
+
{ ...t, lazy: true, pureWrite: true }
|
|
1217
|
+
);
|
|
1218
|
+
n.ke = undefined;
|
|
1219
|
+
n.Z = true;
|
|
1220
|
+
n.Y = y;
|
|
1221
|
+
n.ee = run;
|
|
1222
|
+
n.$.enqueue(h, run);
|
|
1223
|
+
onCleanup(() => n.ke?.());
|
|
1224
|
+
}
|
|
1018
1225
|
function createSignal(e, t, n) {
|
|
1019
1226
|
if (typeof e === "function") {
|
|
1020
1227
|
const r = computed(e, t, n);
|
|
@@ -1028,12 +1235,14 @@ function createMemo(e, t, n) {
|
|
|
1028
1235
|
return read.bind(null, r);
|
|
1029
1236
|
}
|
|
1030
1237
|
function createEffect(e, t, n, r) {
|
|
1031
|
-
|
|
1238
|
+
effect(e, t.effect || t, t.error, n, r);
|
|
1032
1239
|
}
|
|
1033
1240
|
function createRenderEffect(e, t, n, r) {
|
|
1034
|
-
|
|
1241
|
+
effect(e, t, undefined, n, { render: true, ...r });
|
|
1242
|
+
}
|
|
1243
|
+
function createTrackedEffect(e, t) {
|
|
1244
|
+
trackedEffect(e, t);
|
|
1035
1245
|
}
|
|
1036
|
-
function createTrackedEffect(e, t) {}
|
|
1037
1246
|
function createReaction(e, t) {
|
|
1038
1247
|
let n = undefined;
|
|
1039
1248
|
onCleanup(() => n?.());
|
|
@@ -1070,42 +1279,19 @@ function resolve(e) {
|
|
|
1070
1279
|
});
|
|
1071
1280
|
}
|
|
1072
1281
|
function createOptimistic(e, t, n) {
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
t => {
|
|
1076
|
-
const n = getOwner();
|
|
1077
|
-
const r = e(t);
|
|
1078
|
-
if (n.$ & a) return r;
|
|
1079
|
-
n.U = r;
|
|
1080
|
-
return t;
|
|
1081
|
-
},
|
|
1082
|
-
t,
|
|
1083
|
-
n
|
|
1084
|
-
);
|
|
1085
|
-
r.oe = true;
|
|
1086
|
-
return [read.bind(null, r), setSignal.bind(null, r)];
|
|
1087
|
-
}
|
|
1088
|
-
const r = signal(e, t);
|
|
1089
|
-
r.oe = true;
|
|
1090
|
-
return [
|
|
1091
|
-
read.bind(null, r),
|
|
1092
|
-
t => {
|
|
1093
|
-
r.U = e;
|
|
1094
|
-
return setSignal(r, t);
|
|
1095
|
-
}
|
|
1096
|
-
];
|
|
1282
|
+
const r = typeof e === "function" ? optimisticComputed(e, t, n) : optimisticSignal(e, t);
|
|
1283
|
+
return [read.bind(null, r), setSignal.bind(null, r)];
|
|
1097
1284
|
}
|
|
1098
1285
|
function onSettled(e) {
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
});
|
|
1286
|
+
getOwner()
|
|
1287
|
+
? createTrackedEffect(() => untrack(e))
|
|
1288
|
+
: A.enqueue(h, () => {
|
|
1289
|
+
const t = e();
|
|
1290
|
+
t?.();
|
|
1291
|
+
});
|
|
1106
1292
|
}
|
|
1107
1293
|
function unwrap(e) {
|
|
1108
|
-
return e?.[
|
|
1294
|
+
return e?.[V]?.[U] ?? e;
|
|
1109
1295
|
}
|
|
1110
1296
|
function getOverrideValue(e, t, n, r) {
|
|
1111
1297
|
return t && r in t ? t[r] : e[r];
|
|
@@ -1116,108 +1302,108 @@ function getAllKeys(e, t, n) {
|
|
|
1116
1302
|
return Array.from(new Set([...r, ...i]));
|
|
1117
1303
|
}
|
|
1118
1304
|
function applyState(e, t, n, r) {
|
|
1119
|
-
const i = t?.[
|
|
1305
|
+
const i = t?.[V];
|
|
1120
1306
|
if (!i) return;
|
|
1121
|
-
const s = i[
|
|
1122
|
-
const o = i[
|
|
1123
|
-
let u = i[
|
|
1307
|
+
const s = i[G];
|
|
1308
|
+
const o = i[K];
|
|
1309
|
+
let u = i[U];
|
|
1124
1310
|
if (e === s && !o) return;
|
|
1125
|
-
(i[
|
|
1126
|
-
i[
|
|
1127
|
-
i[
|
|
1311
|
+
(i[X] || $).set(e, i[M]);
|
|
1312
|
+
i[G] = e;
|
|
1313
|
+
i[K] = undefined;
|
|
1128
1314
|
if (Array.isArray(s)) {
|
|
1129
1315
|
let t = false;
|
|
1130
1316
|
const l = getOverrideValue(s, o, u, "length");
|
|
1131
1317
|
if (e.length && l && e[0] && n(e[0]) != null) {
|
|
1132
|
-
let f, c, a, d,
|
|
1318
|
+
let f, c, a, d, p, h, y, g;
|
|
1133
1319
|
for (
|
|
1134
1320
|
a = 0, d = Math.min(l, e.length);
|
|
1135
|
-
a < d && ((
|
|
1321
|
+
a < d && ((h = getOverrideValue(s, o, u, a)) === e[a] || (h && e[a] && n(h) === n(e[a])));
|
|
1136
1322
|
a++
|
|
1137
1323
|
) {
|
|
1138
|
-
applyState(e[a], wrap(
|
|
1324
|
+
applyState(e[a], wrap(h, i), n, r);
|
|
1139
1325
|
}
|
|
1140
1326
|
const w = new Array(e.length),
|
|
1141
|
-
|
|
1327
|
+
S = new Map();
|
|
1142
1328
|
for (
|
|
1143
|
-
d = l - 1,
|
|
1329
|
+
d = l - 1, p = e.length - 1;
|
|
1144
1330
|
d >= a &&
|
|
1145
|
-
|
|
1146
|
-
((
|
|
1147
|
-
d--,
|
|
1331
|
+
p >= a &&
|
|
1332
|
+
((h = getOverrideValue(s, o, u, d)) === e[p] || (h && e[p] && n(h) === n(e[p])));
|
|
1333
|
+
d--, p--
|
|
1148
1334
|
) {
|
|
1149
|
-
w[
|
|
1335
|
+
w[p] = h;
|
|
1150
1336
|
}
|
|
1151
|
-
if (a >
|
|
1152
|
-
for (c = a; c <=
|
|
1337
|
+
if (a > p || a > d) {
|
|
1338
|
+
for (c = a; c <= p; c++) {
|
|
1153
1339
|
t = true;
|
|
1154
|
-
i[
|
|
1340
|
+
i[U][c] && setSignal(i[U][c], wrap(e[c], i));
|
|
1155
1341
|
}
|
|
1156
1342
|
for (; c < e.length; c++) {
|
|
1157
1343
|
t = true;
|
|
1158
1344
|
const s = wrap(w[c], i);
|
|
1159
|
-
i[
|
|
1345
|
+
i[U][c] && setSignal(i[U][c], s);
|
|
1160
1346
|
applyState(e[c], s, n, r);
|
|
1161
1347
|
}
|
|
1162
|
-
t && i[
|
|
1163
|
-
l !== e.length && i[
|
|
1348
|
+
t && i[U][q] && setSignal(i[U][q], void 0);
|
|
1349
|
+
l !== e.length && i[U].length && setSignal(i[U].length, e.length);
|
|
1164
1350
|
return;
|
|
1165
1351
|
}
|
|
1166
|
-
y = new Array(
|
|
1167
|
-
for (c =
|
|
1168
|
-
|
|
1169
|
-
g =
|
|
1170
|
-
f =
|
|
1352
|
+
y = new Array(p + 1);
|
|
1353
|
+
for (c = p; c >= a; c--) {
|
|
1354
|
+
h = e[c];
|
|
1355
|
+
g = h ? n(h) : h;
|
|
1356
|
+
f = S.get(g);
|
|
1171
1357
|
y[c] = f === undefined ? -1 : f;
|
|
1172
|
-
|
|
1358
|
+
S.set(g, c);
|
|
1173
1359
|
}
|
|
1174
1360
|
for (f = a; f <= d; f++) {
|
|
1175
|
-
|
|
1176
|
-
g =
|
|
1177
|
-
c =
|
|
1361
|
+
h = getOverrideValue(s, o, u, f);
|
|
1362
|
+
g = h ? n(h) : h;
|
|
1363
|
+
c = S.get(g);
|
|
1178
1364
|
if (c !== undefined && c !== -1) {
|
|
1179
|
-
w[c] =
|
|
1365
|
+
w[c] = h;
|
|
1180
1366
|
c = y[c];
|
|
1181
|
-
|
|
1367
|
+
S.set(g, c);
|
|
1182
1368
|
}
|
|
1183
1369
|
}
|
|
1184
1370
|
for (c = a; c < e.length; c++) {
|
|
1185
1371
|
if (c in w) {
|
|
1186
1372
|
const t = wrap(w[c], i);
|
|
1187
|
-
i[
|
|
1373
|
+
i[U][c] && setSignal(i[U][c], t);
|
|
1188
1374
|
applyState(e[c], t, n, r);
|
|
1189
|
-
} else i[
|
|
1375
|
+
} else i[U][c] && setSignal(i[U][c], wrap(e[c], i));
|
|
1190
1376
|
}
|
|
1191
1377
|
if (a < e.length) t = true;
|
|
1192
1378
|
} else if (e.length) {
|
|
1193
1379
|
for (let t = 0, l = e.length; t < l; t++) {
|
|
1194
1380
|
const l = getOverrideValue(s, o, u, t);
|
|
1195
|
-
isWrappable(l) ? applyState(e[t], wrap(l, i), n, r) : i[
|
|
1381
|
+
isWrappable(l) ? applyState(e[t], wrap(l, i), n, r) : i[U][t] && setSignal(i[U][t], e[t]);
|
|
1196
1382
|
}
|
|
1197
1383
|
}
|
|
1198
1384
|
if (l !== e.length) {
|
|
1199
1385
|
t = true;
|
|
1200
|
-
i[
|
|
1386
|
+
i[U].length && setSignal(i[U].length, e.length);
|
|
1201
1387
|
}
|
|
1202
|
-
t && i[
|
|
1388
|
+
t && i[U][q] && setSignal(i[U][q], void 0);
|
|
1203
1389
|
return;
|
|
1204
1390
|
}
|
|
1205
1391
|
if (u) {
|
|
1206
|
-
const t = u[
|
|
1392
|
+
const t = u[q];
|
|
1207
1393
|
const l = t || r ? getAllKeys(s, o, e) : Object.keys(u);
|
|
1208
1394
|
for (let f = 0, c = l.length; f < c; f++) {
|
|
1209
1395
|
const c = l[f];
|
|
1210
1396
|
const a = u[c];
|
|
1211
1397
|
const d = unwrap(getOverrideValue(s, o, u, c));
|
|
1212
|
-
let
|
|
1213
|
-
if (d ===
|
|
1214
|
-
if (!d || !isWrappable(d) || (n(d) != null && n(d) !== n(
|
|
1398
|
+
let p = unwrap(e[c]);
|
|
1399
|
+
if (d === p) continue;
|
|
1400
|
+
if (!d || !isWrappable(d) || (n(d) != null && n(d) !== n(p))) {
|
|
1215
1401
|
t && setSignal(t, void 0);
|
|
1216
|
-
a && setSignal(a, isWrappable(
|
|
1217
|
-
} else applyState(
|
|
1402
|
+
a && setSignal(a, isWrappable(p) ? wrap(p, i) : p);
|
|
1403
|
+
} else applyState(p, wrap(d, i), n, r);
|
|
1218
1404
|
}
|
|
1219
1405
|
}
|
|
1220
|
-
if ((u = i[
|
|
1406
|
+
if ((u = i[L])) {
|
|
1221
1407
|
const t = Object.keys(u);
|
|
1222
1408
|
for (let n = 0, r = t.length; n < r; n++) {
|
|
1223
1409
|
const r = t[n];
|
|
@@ -1239,9 +1425,9 @@ function createProjectionInternal(e, t = {}, n) {
|
|
|
1239
1425
|
let r;
|
|
1240
1426
|
const i = new WeakMap();
|
|
1241
1427
|
const wrapper = e => {
|
|
1242
|
-
e[
|
|
1243
|
-
e[
|
|
1244
|
-
Object.defineProperty(e,
|
|
1428
|
+
e[J] = wrapProjection;
|
|
1429
|
+
e[X] = i;
|
|
1430
|
+
Object.defineProperty(e, Y, {
|
|
1245
1431
|
get() {
|
|
1246
1432
|
return r;
|
|
1247
1433
|
},
|
|
@@ -1250,105 +1436,113 @@ function createProjectionInternal(e, t = {}, n) {
|
|
|
1250
1436
|
};
|
|
1251
1437
|
const wrapProjection = e => {
|
|
1252
1438
|
if (i.has(e)) return i.get(e);
|
|
1253
|
-
if (e[
|
|
1254
|
-
const t = createStoreProxy(e,
|
|
1439
|
+
if (e[V]?.[J] === wrapProjection) return e;
|
|
1440
|
+
const t = createStoreProxy(e, ne, wrapper);
|
|
1255
1441
|
i.set(e, t);
|
|
1256
1442
|
return t;
|
|
1257
1443
|
};
|
|
1258
1444
|
const s = wrapProjection(t);
|
|
1259
1445
|
r = computed(() => {
|
|
1260
1446
|
const t = getOwner();
|
|
1261
|
-
storeSetter(new Proxy(s,
|
|
1447
|
+
storeSetter(new Proxy(s, T), r => {
|
|
1262
1448
|
const i = handleAsync(t, e(r), e => {
|
|
1263
|
-
e !==
|
|
1449
|
+
e !== r && e !== undefined && storeSetter(s, reconcile(e, n?.key || "id", n?.all));
|
|
1264
1450
|
setSignal(t, undefined);
|
|
1265
1451
|
});
|
|
1266
|
-
i !==
|
|
1452
|
+
i !== r && i !== undefined && reconcile(i, n?.key || "id", n?.all)(s);
|
|
1267
1453
|
});
|
|
1268
1454
|
});
|
|
1269
|
-
r.
|
|
1455
|
+
r.we = true;
|
|
1270
1456
|
return { store: s, node: r };
|
|
1271
1457
|
}
|
|
1272
1458
|
function createProjection(e, t = {}, n) {
|
|
1273
1459
|
return createProjectionInternal(e, t, n).store;
|
|
1274
1460
|
}
|
|
1275
|
-
const
|
|
1461
|
+
const T = {
|
|
1276
1462
|
get(e, t) {
|
|
1277
1463
|
let n;
|
|
1278
1464
|
setWriteOverride(true);
|
|
1465
|
+
setProjectionWriteActive(true);
|
|
1279
1466
|
try {
|
|
1280
1467
|
n = e[t];
|
|
1281
1468
|
} finally {
|
|
1282
1469
|
setWriteOverride(false);
|
|
1470
|
+
setProjectionWriteActive(false);
|
|
1283
1471
|
}
|
|
1284
|
-
return typeof n === "object" && n !== null ? new Proxy(n,
|
|
1472
|
+
return typeof n === "object" && n !== null ? new Proxy(n, T) : n;
|
|
1285
1473
|
},
|
|
1286
1474
|
set(e, t, n) {
|
|
1287
1475
|
setWriteOverride(true);
|
|
1476
|
+
setProjectionWriteActive(true);
|
|
1288
1477
|
try {
|
|
1289
1478
|
e[t] = n;
|
|
1290
1479
|
} finally {
|
|
1291
1480
|
setWriteOverride(false);
|
|
1481
|
+
setProjectionWriteActive(false);
|
|
1292
1482
|
}
|
|
1293
1483
|
return true;
|
|
1294
1484
|
},
|
|
1295
1485
|
deleteProperty(e, t) {
|
|
1296
1486
|
setWriteOverride(true);
|
|
1487
|
+
setProjectionWriteActive(true);
|
|
1297
1488
|
try {
|
|
1298
1489
|
delete e[t];
|
|
1299
1490
|
} finally {
|
|
1300
1491
|
setWriteOverride(false);
|
|
1492
|
+
setProjectionWriteActive(false);
|
|
1301
1493
|
}
|
|
1302
1494
|
return true;
|
|
1303
1495
|
}
|
|
1304
1496
|
};
|
|
1305
|
-
const
|
|
1497
|
+
const q = Symbol(0),
|
|
1306
1498
|
F = Symbol(0),
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
const
|
|
1311
|
-
const
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1499
|
+
V = Symbol(0),
|
|
1500
|
+
M = Symbol(0),
|
|
1501
|
+
D = Symbol(0);
|
|
1502
|
+
const B = new WeakMap();
|
|
1503
|
+
const G = "v",
|
|
1504
|
+
K = "o",
|
|
1505
|
+
z = "x",
|
|
1506
|
+
U = "n",
|
|
1507
|
+
L = "h",
|
|
1508
|
+
J = "w",
|
|
1509
|
+
X = "l",
|
|
1510
|
+
Y = "f",
|
|
1511
|
+
Z = "p";
|
|
1512
|
+
function createStoreProxy(e, t = ne, n) {
|
|
1319
1513
|
let r;
|
|
1320
1514
|
if (Array.isArray(e)) {
|
|
1321
1515
|
r = [];
|
|
1322
1516
|
r.v = e;
|
|
1323
1517
|
} else r = { v: e };
|
|
1324
1518
|
n && n(r);
|
|
1325
|
-
return (r[
|
|
1519
|
+
return (r[M] = new Proxy(r, t));
|
|
1326
1520
|
}
|
|
1327
|
-
const
|
|
1521
|
+
const $ = new WeakMap();
|
|
1328
1522
|
function wrap(e, t) {
|
|
1329
|
-
if (t?.[
|
|
1330
|
-
let n = e[
|
|
1331
|
-
if (!n)
|
|
1523
|
+
if (t?.[J]) return t[J](e, t);
|
|
1524
|
+
let n = e[M] || $.get(e);
|
|
1525
|
+
if (!n) $.set(e, (n = createStoreProxy(e)));
|
|
1332
1526
|
return n;
|
|
1333
1527
|
}
|
|
1334
1528
|
function isWrappable(e) {
|
|
1335
1529
|
return e != null && typeof e === "object" && !Object.isFrozen(e);
|
|
1336
1530
|
}
|
|
1337
|
-
let
|
|
1531
|
+
let ee = false;
|
|
1338
1532
|
function setWriteOverride(e) {
|
|
1339
|
-
|
|
1533
|
+
ee = e;
|
|
1340
1534
|
}
|
|
1341
1535
|
function writeOnly(e) {
|
|
1342
|
-
return
|
|
1536
|
+
return ee || !!te?.has(e);
|
|
1343
1537
|
}
|
|
1344
1538
|
function getNodes(e, t) {
|
|
1345
1539
|
let n = e[t];
|
|
1346
1540
|
if (!n) e[t] = n = Object.create(null);
|
|
1347
1541
|
return n;
|
|
1348
1542
|
}
|
|
1349
|
-
function getNode(e, t, n, r, i = isEqual) {
|
|
1543
|
+
function getNode(e, t, n, r, i = isEqual, s) {
|
|
1350
1544
|
if (e[t]) return e[t];
|
|
1351
|
-
|
|
1545
|
+
const o = signal(
|
|
1352
1546
|
n,
|
|
1353
1547
|
{
|
|
1354
1548
|
equals: i,
|
|
@@ -1357,10 +1551,12 @@ function getNode(e, t, n, r, i = isEqual) {
|
|
|
1357
1551
|
}
|
|
1358
1552
|
},
|
|
1359
1553
|
r
|
|
1360
|
-
)
|
|
1554
|
+
);
|
|
1555
|
+
if (s) o.le = true;
|
|
1556
|
+
return (e[t] = o);
|
|
1361
1557
|
}
|
|
1362
|
-
function trackSelf(e, t =
|
|
1363
|
-
getObserver() && read(getNode(getNodes(e,
|
|
1558
|
+
function trackSelf(e, t = q) {
|
|
1559
|
+
getObserver() && read(getNode(getNodes(e, U), t, undefined, e[Y], false, e[Z]));
|
|
1364
1560
|
}
|
|
1365
1561
|
function getKeys(e, t, n = true) {
|
|
1366
1562
|
const r = untrack(() => (n ? Object.keys(e) : Reflect.ownKeys(e)));
|
|
@@ -1368,7 +1564,7 @@ function getKeys(e, t, n = true) {
|
|
|
1368
1564
|
const i = new Set(r);
|
|
1369
1565
|
const s = Reflect.ownKeys(t);
|
|
1370
1566
|
for (const e of s) {
|
|
1371
|
-
if (t[e] !==
|
|
1567
|
+
if (t[e] !== D) i.add(e);
|
|
1372
1568
|
else i.delete(e);
|
|
1373
1569
|
}
|
|
1374
1570
|
return Array.from(i);
|
|
@@ -1376,125 +1572,161 @@ function getKeys(e, t, n = true) {
|
|
|
1376
1572
|
function getPropertyDescriptor(e, t, n) {
|
|
1377
1573
|
let r = e;
|
|
1378
1574
|
if (t && n in t) {
|
|
1379
|
-
if (r[n] ===
|
|
1575
|
+
if (r[n] === D) return void 0;
|
|
1380
1576
|
if (!(n in r)) r = t;
|
|
1381
1577
|
}
|
|
1382
1578
|
return Reflect.getOwnPropertyDescriptor(r, n);
|
|
1383
1579
|
}
|
|
1384
|
-
let
|
|
1385
|
-
const
|
|
1580
|
+
let te = null;
|
|
1581
|
+
const ne = {
|
|
1386
1582
|
get(e, t, n) {
|
|
1387
|
-
if (t ===
|
|
1388
|
-
if (t ===
|
|
1389
|
-
if (t ===
|
|
1390
|
-
if (t ===
|
|
1583
|
+
if (t === V) return e;
|
|
1584
|
+
if (t === M) return n;
|
|
1585
|
+
if (t === m) return e[Y];
|
|
1586
|
+
if (t === q || t === F) {
|
|
1391
1587
|
trackSelf(e, t);
|
|
1392
1588
|
return n;
|
|
1393
1589
|
}
|
|
1394
|
-
const r = getNodes(e,
|
|
1590
|
+
const r = getNodes(e, U);
|
|
1395
1591
|
const i = r[t];
|
|
1396
|
-
const s = e[
|
|
1397
|
-
const o =
|
|
1398
|
-
const u =
|
|
1592
|
+
const s = e[z] && t in e[z];
|
|
1593
|
+
const o = s || (e[K] && t in e[K]);
|
|
1594
|
+
const u = !!e[G][V];
|
|
1595
|
+
const l = s ? e[z] : e[K] && t in e[K] ? e[K] : e[G];
|
|
1399
1596
|
if (!i) {
|
|
1400
|
-
const e = Object.getOwnPropertyDescriptor(
|
|
1597
|
+
const e = Object.getOwnPropertyDescriptor(l, t);
|
|
1401
1598
|
if (e && e.get) return e.get.call(n);
|
|
1402
1599
|
}
|
|
1403
1600
|
if (writeOnly(n)) {
|
|
1404
|
-
let n = i && (
|
|
1405
|
-
n ===
|
|
1601
|
+
let n = i && (o || !u) ? (i.te !== g ? (i.le ? i.ne : i.te) : i.ne) : l[t];
|
|
1602
|
+
n === D && (n = undefined);
|
|
1406
1603
|
if (!isWrappable(n)) return n;
|
|
1407
1604
|
const r = wrap(n, e);
|
|
1408
|
-
|
|
1605
|
+
te?.add(r);
|
|
1409
1606
|
return r;
|
|
1410
1607
|
}
|
|
1411
|
-
let
|
|
1412
|
-
|
|
1608
|
+
let f = i ? (o || !u ? read(r[t]) : (read(r[t]), l[t])) : l[t];
|
|
1609
|
+
f === D && (f = undefined);
|
|
1413
1610
|
if (!i) {
|
|
1414
|
-
if (!
|
|
1611
|
+
if (!o && typeof f === "function" && !l.hasOwnProperty(t)) {
|
|
1415
1612
|
let t;
|
|
1416
|
-
return !Array.isArray(e[
|
|
1417
|
-
?
|
|
1418
|
-
:
|
|
1613
|
+
return !Array.isArray(e[G]) && (t = Object.getPrototypeOf(e[G])) && t !== Object.prototype
|
|
1614
|
+
? f.bind(l)
|
|
1615
|
+
: f;
|
|
1419
1616
|
} else if (getObserver()) {
|
|
1420
|
-
return read(getNode(r, t, isWrappable(
|
|
1617
|
+
return read(getNode(r, t, isWrappable(f) ? wrap(f, e) : f, e[Y], isEqual, e[Z]));
|
|
1421
1618
|
}
|
|
1422
1619
|
}
|
|
1423
|
-
return isWrappable(
|
|
1620
|
+
return isWrappable(f) ? wrap(f, e) : f;
|
|
1424
1621
|
},
|
|
1425
1622
|
has(e, t) {
|
|
1426
|
-
if (t ===
|
|
1427
|
-
const n = e[
|
|
1428
|
-
getObserver() && read(getNode(getNodes(e,
|
|
1623
|
+
if (t === M || t === q || t === "__proto__") return true;
|
|
1624
|
+
const n = e[z] && t in e[z] ? e[z][t] !== D : e[K] && t in e[K] ? e[K][t] !== D : t in e[G];
|
|
1625
|
+
getObserver() && read(getNode(getNodes(e, L), t, n, e[Y], isEqual, e[Z]));
|
|
1429
1626
|
return n;
|
|
1430
1627
|
},
|
|
1431
1628
|
set(e, t, n) {
|
|
1432
|
-
const r = e[
|
|
1629
|
+
const r = e[M];
|
|
1433
1630
|
if (writeOnly(r)) {
|
|
1631
|
+
if (e[Z]) {
|
|
1632
|
+
const t = e[Y];
|
|
1633
|
+
if (t?.X) {
|
|
1634
|
+
A.initTransition(t.X);
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1434
1637
|
untrack(() => {
|
|
1435
|
-
const i = e[
|
|
1638
|
+
const i = e[G];
|
|
1436
1639
|
const s = i[t];
|
|
1437
|
-
const o = e[
|
|
1438
|
-
const u =
|
|
1439
|
-
if (o
|
|
1440
|
-
const l = e[
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
const
|
|
1444
|
-
if (
|
|
1445
|
-
|
|
1446
|
-
|
|
1640
|
+
const o = e[Z] && !k;
|
|
1641
|
+
const u = o ? z : K;
|
|
1642
|
+
if (o) trackOptimisticStore(r);
|
|
1643
|
+
const l = e[z] && t in e[z] ? e[z][t] : e[K] && t in e[K] ? e[K][t] : s;
|
|
1644
|
+
const f = n?.[V]?.[G] ?? n;
|
|
1645
|
+
if (l === f) return true;
|
|
1646
|
+
const c = e[z]?.length || e[K]?.length || i.length;
|
|
1647
|
+
if (f !== undefined && f === s) delete e[u][t];
|
|
1648
|
+
else (e[u] || (e[u] = Object.create(null)))[t] = f;
|
|
1649
|
+
const a = isWrappable(f);
|
|
1650
|
+
if (isWrappable(l)) {
|
|
1651
|
+
const e = B.get(l);
|
|
1652
|
+
e && (e instanceof Set ? e.delete(r) : B.delete(l));
|
|
1447
1653
|
}
|
|
1448
|
-
if (recursivelyNotify(r,
|
|
1449
|
-
e[
|
|
1450
|
-
const
|
|
1451
|
-
|
|
1654
|
+
if (recursivelyNotify(r, $) && a) recursivelyAddParent(f, r);
|
|
1655
|
+
e[L]?.[t] && setSignal(e[L][t], true);
|
|
1656
|
+
const d = getNodes(e, U);
|
|
1657
|
+
d[t] && setSignal(d[t], () => (a ? wrap(f, e) : f));
|
|
1452
1658
|
if (Array.isArray(i)) {
|
|
1453
|
-
|
|
1454
|
-
|
|
1659
|
+
if (t === "length") {
|
|
1660
|
+
d.length && setSignal(d.length, f);
|
|
1661
|
+
} else {
|
|
1662
|
+
const e = parseInt(t) + 1;
|
|
1663
|
+
if (e > c) d.length && setSignal(d.length, e);
|
|
1664
|
+
}
|
|
1455
1665
|
}
|
|
1456
|
-
|
|
1666
|
+
d[q] && setSignal(d[q], undefined);
|
|
1457
1667
|
});
|
|
1458
1668
|
}
|
|
1459
1669
|
return true;
|
|
1460
1670
|
},
|
|
1461
1671
|
deleteProperty(e, t) {
|
|
1462
|
-
|
|
1672
|
+
const n = e[z]?.[t] === D;
|
|
1673
|
+
const r = e[K]?.[t] === D;
|
|
1674
|
+
if (writeOnly(e[M]) && !n && !r) {
|
|
1463
1675
|
untrack(() => {
|
|
1464
|
-
const n = e[
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1676
|
+
const n = e[Z] && !k;
|
|
1677
|
+
const r = n ? z : K;
|
|
1678
|
+
if (n) trackOptimisticStore(e[M]);
|
|
1679
|
+
const i = e[z] && t in e[z] ? e[z][t] : e[K] && t in e[K] ? e[K][t] : e[G][t];
|
|
1680
|
+
if (t in e[G] || (e[K] && t in e[K])) {
|
|
1681
|
+
(e[r] || (e[r] = Object.create(null)))[t] = D;
|
|
1682
|
+
} else if (e[r] && t in e[r]) {
|
|
1683
|
+
delete e[r][t];
|
|
1469
1684
|
} else return true;
|
|
1470
|
-
if (isWrappable(
|
|
1471
|
-
const t =
|
|
1472
|
-
t && (t instanceof Set ? t.delete(e) :
|
|
1685
|
+
if (isWrappable(i)) {
|
|
1686
|
+
const t = B.get(i);
|
|
1687
|
+
t && (t instanceof Set ? t.delete(e) : B.delete(i));
|
|
1473
1688
|
}
|
|
1474
|
-
if (e[
|
|
1475
|
-
const
|
|
1476
|
-
|
|
1477
|
-
|
|
1689
|
+
if (e[L]?.[t]) setSignal(e[L][t], false);
|
|
1690
|
+
const s = getNodes(e, U);
|
|
1691
|
+
s[t] && setSignal(s[t], undefined);
|
|
1692
|
+
s[q] && setSignal(s[q], undefined);
|
|
1478
1693
|
});
|
|
1479
1694
|
}
|
|
1480
1695
|
return true;
|
|
1481
1696
|
},
|
|
1482
1697
|
ownKeys(e) {
|
|
1483
1698
|
trackSelf(e);
|
|
1484
|
-
|
|
1699
|
+
let t = getKeys(e[G], e[K], false);
|
|
1700
|
+
if (e[z]) {
|
|
1701
|
+
const n = new Set(t);
|
|
1702
|
+
for (const t of Reflect.ownKeys(e[z])) {
|
|
1703
|
+
if (e[z][t] !== D) n.add(t);
|
|
1704
|
+
else n.delete(t);
|
|
1705
|
+
}
|
|
1706
|
+
t = Array.from(n);
|
|
1707
|
+
}
|
|
1708
|
+
return t;
|
|
1485
1709
|
},
|
|
1486
1710
|
getOwnPropertyDescriptor(e, t) {
|
|
1487
|
-
if (t ===
|
|
1488
|
-
|
|
1711
|
+
if (t === M) return { value: e[M], writable: true, configurable: true };
|
|
1712
|
+
if (e[z] && t in e[z]) {
|
|
1713
|
+
if (e[z][t] === D) return undefined;
|
|
1714
|
+
const n = getPropertyDescriptor(e[G], e[K], t);
|
|
1715
|
+
if (n) {
|
|
1716
|
+
return { ...n, value: e[z][t] };
|
|
1717
|
+
}
|
|
1718
|
+
return { value: e[z][t], writable: true, enumerable: true, configurable: true };
|
|
1719
|
+
}
|
|
1720
|
+
return getPropertyDescriptor(e[G], e[K], t);
|
|
1489
1721
|
},
|
|
1490
1722
|
getPrototypeOf(e) {
|
|
1491
|
-
return Object.getPrototypeOf(e[
|
|
1723
|
+
return Object.getPrototypeOf(e[G]);
|
|
1492
1724
|
}
|
|
1493
1725
|
};
|
|
1494
1726
|
function storeSetter(e, t) {
|
|
1495
|
-
const n =
|
|
1496
|
-
|
|
1497
|
-
|
|
1727
|
+
const n = te;
|
|
1728
|
+
te = new Set();
|
|
1729
|
+
te.add(e);
|
|
1498
1730
|
try {
|
|
1499
1731
|
const n = t(e);
|
|
1500
1732
|
if (n !== e && n !== undefined) {
|
|
@@ -1510,8 +1742,8 @@ function storeSetter(e, t) {
|
|
|
1510
1742
|
}
|
|
1511
1743
|
}
|
|
1512
1744
|
} finally {
|
|
1513
|
-
|
|
1514
|
-
|
|
1745
|
+
te.clear();
|
|
1746
|
+
te = n;
|
|
1515
1747
|
}
|
|
1516
1748
|
}
|
|
1517
1749
|
function createStore(e, t, n) {
|
|
@@ -1520,17 +1752,17 @@ function createStore(e, t, n) {
|
|
|
1520
1752
|
return [i, e => storeSetter(i, e)];
|
|
1521
1753
|
}
|
|
1522
1754
|
function recursivelyNotify(e, t) {
|
|
1523
|
-
let n = e[
|
|
1755
|
+
let n = e[V] || t?.get(e)?.[V];
|
|
1524
1756
|
let r = false;
|
|
1525
1757
|
if (n) {
|
|
1526
|
-
const e = getNodes(n,
|
|
1758
|
+
const e = getNodes(n, U)[F];
|
|
1527
1759
|
if (e) {
|
|
1528
1760
|
setSignal(e, undefined);
|
|
1529
1761
|
r = true;
|
|
1530
1762
|
}
|
|
1531
|
-
t = n[
|
|
1763
|
+
t = n[X] || t;
|
|
1532
1764
|
}
|
|
1533
|
-
const i =
|
|
1765
|
+
const i = B.get(n?.[G] || e);
|
|
1534
1766
|
if (!i) return r;
|
|
1535
1767
|
if (i instanceof Set) {
|
|
1536
1768
|
for (let e of i) r = recursivelyNotify(e, t) || r;
|
|
@@ -1539,16 +1771,16 @@ function recursivelyNotify(e, t) {
|
|
|
1539
1771
|
}
|
|
1540
1772
|
function recursivelyAddParent(e, t) {
|
|
1541
1773
|
let n;
|
|
1542
|
-
const r = e[
|
|
1774
|
+
const r = e[V];
|
|
1543
1775
|
if (r) {
|
|
1544
|
-
n = r[
|
|
1545
|
-
e = r[
|
|
1776
|
+
n = r[K];
|
|
1777
|
+
e = r[G];
|
|
1546
1778
|
}
|
|
1547
1779
|
if (t) {
|
|
1548
|
-
let n =
|
|
1549
|
-
if (!n)
|
|
1780
|
+
let n = B.get(e);
|
|
1781
|
+
if (!n) B.set(e, t);
|
|
1550
1782
|
else if (n !== t) {
|
|
1551
|
-
if (!(n instanceof Set))
|
|
1783
|
+
if (!(n instanceof Set)) B.set(e, (n = new Set([n])));
|
|
1552
1784
|
else if (n.has(t)) return;
|
|
1553
1785
|
n.add(t);
|
|
1554
1786
|
} else return;
|
|
@@ -1573,19 +1805,87 @@ function deep(e) {
|
|
|
1573
1805
|
return e[F];
|
|
1574
1806
|
}
|
|
1575
1807
|
function createOptimisticStore(e, t, n) {
|
|
1576
|
-
|
|
1808
|
+
GlobalQueue.L ||= clearOptimisticStore;
|
|
1809
|
+
const r = typeof e === "function";
|
|
1810
|
+
const i = (r ? t : e) ?? {};
|
|
1811
|
+
const s = r ? e : undefined;
|
|
1812
|
+
const { store: o } = createOptimisticProjectionInternal(s, i, n);
|
|
1813
|
+
return [o, e => storeSetter(o, e)];
|
|
1814
|
+
}
|
|
1815
|
+
function clearOptimisticStore(e) {
|
|
1816
|
+
const t = e[V];
|
|
1817
|
+
if (!t || !t[z]) return;
|
|
1818
|
+
const n = t[z];
|
|
1819
|
+
const r = t[U];
|
|
1820
|
+
if (r) {
|
|
1821
|
+
for (const e of Reflect.ownKeys(n)) {
|
|
1822
|
+
if (r[e]) {
|
|
1823
|
+
const n = t[K] && e in t[K] ? t[K][e] : t[G][e];
|
|
1824
|
+
const i = n === D ? undefined : n;
|
|
1825
|
+
setSignal(r[e], isWrappable(i) ? wrap(i, t) : i);
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
r[q] && setSignal(r[q], undefined);
|
|
1829
|
+
}
|
|
1830
|
+
delete t[z];
|
|
1831
|
+
}
|
|
1832
|
+
function createOptimisticProjectionInternal(e, t = {}, n) {
|
|
1833
|
+
let r;
|
|
1834
|
+
const i = new WeakMap();
|
|
1835
|
+
const wrapper = e => {
|
|
1836
|
+
e[J] = wrapProjection;
|
|
1837
|
+
e[X] = i;
|
|
1838
|
+
e[Z] = true;
|
|
1839
|
+
Object.defineProperty(e, Y, {
|
|
1840
|
+
get() {
|
|
1841
|
+
return r;
|
|
1842
|
+
},
|
|
1843
|
+
configurable: true
|
|
1844
|
+
});
|
|
1845
|
+
};
|
|
1846
|
+
const wrapProjection = e => {
|
|
1847
|
+
if (i.has(e)) return i.get(e);
|
|
1848
|
+
if (e[V]?.[J] === wrapProjection) return e;
|
|
1849
|
+
const t = createStoreProxy(e, ne, wrapper);
|
|
1850
|
+
i.set(e, t);
|
|
1851
|
+
return t;
|
|
1852
|
+
};
|
|
1853
|
+
const s = wrapProjection(t);
|
|
1854
|
+
if (e) {
|
|
1855
|
+
r = computed(() => {
|
|
1856
|
+
const t = getOwner();
|
|
1857
|
+
setProjectionWriteActive(true);
|
|
1858
|
+
try {
|
|
1859
|
+
storeSetter(new Proxy(s, T), r => {
|
|
1860
|
+
const i = handleAsync(t, e(r), e => {
|
|
1861
|
+
setProjectionWriteActive(true);
|
|
1862
|
+
try {
|
|
1863
|
+
e !== r && e !== undefined && storeSetter(s, reconcile(e, n?.key || "id", n?.all));
|
|
1864
|
+
} finally {
|
|
1865
|
+
setProjectionWriteActive(false);
|
|
1866
|
+
}
|
|
1867
|
+
});
|
|
1868
|
+
i !== r && i !== undefined && reconcile(i, n?.key || "id", n?.all)(s);
|
|
1869
|
+
});
|
|
1870
|
+
} finally {
|
|
1871
|
+
setProjectionWriteActive(false);
|
|
1872
|
+
}
|
|
1873
|
+
});
|
|
1874
|
+
r.we = true;
|
|
1875
|
+
}
|
|
1876
|
+
return { store: s, node: r };
|
|
1577
1877
|
}
|
|
1578
1878
|
function snapshot(e, t, n) {
|
|
1579
1879
|
let r, i, s, o, u, l;
|
|
1580
1880
|
if (!isWrappable(e)) return e;
|
|
1581
1881
|
if (t && t.has(e)) return t.get(e);
|
|
1582
1882
|
if (!t) t = new Map();
|
|
1583
|
-
if ((r = e[
|
|
1584
|
-
s = r[
|
|
1585
|
-
i = Array.isArray(r[
|
|
1586
|
-
t.set(e, s ? (o = i ? [] : Object.create(Object.getPrototypeOf(r[
|
|
1587
|
-
e = r[
|
|
1588
|
-
n =
|
|
1883
|
+
if ((r = e[V] || n?.get(e)?.[V])) {
|
|
1884
|
+
s = r[K];
|
|
1885
|
+
i = Array.isArray(r[G]);
|
|
1886
|
+
t.set(e, s ? (o = i ? [] : Object.create(Object.getPrototypeOf(r[G]))) : r[G]);
|
|
1887
|
+
e = r[G];
|
|
1888
|
+
n = $;
|
|
1589
1889
|
} else {
|
|
1590
1890
|
i = Array.isArray(e);
|
|
1591
1891
|
t.set(e, e);
|
|
@@ -1594,7 +1894,7 @@ function snapshot(e, t, n) {
|
|
|
1594
1894
|
const r = s?.length || e.length;
|
|
1595
1895
|
for (let i = 0; i < r; i++) {
|
|
1596
1896
|
l = s && i in s ? s[i] : e[i];
|
|
1597
|
-
if (l ===
|
|
1897
|
+
if (l === D) continue;
|
|
1598
1898
|
if ((u = snapshot(l, t, n)) !== l || o) {
|
|
1599
1899
|
if (!o) t.set(e, (o = [...e]));
|
|
1600
1900
|
o[i] = u;
|
|
@@ -1621,13 +1921,13 @@ function snapshot(e, t, n) {
|
|
|
1621
1921
|
function trueFn() {
|
|
1622
1922
|
return true;
|
|
1623
1923
|
}
|
|
1624
|
-
const
|
|
1924
|
+
const re = {
|
|
1625
1925
|
get(e, t, n) {
|
|
1626
|
-
if (t ===
|
|
1926
|
+
if (t === M) return n;
|
|
1627
1927
|
return e.get(t);
|
|
1628
1928
|
},
|
|
1629
1929
|
has(e, t) {
|
|
1630
|
-
if (t ===
|
|
1930
|
+
if (t === M) return true;
|
|
1631
1931
|
return e.has(t);
|
|
1632
1932
|
},
|
|
1633
1933
|
set: trueFn,
|
|
@@ -1650,23 +1950,23 @@ const X = {
|
|
|
1650
1950
|
function resolveSource(e) {
|
|
1651
1951
|
return !(e = typeof e === "function" ? e() : e) ? {} : e;
|
|
1652
1952
|
}
|
|
1653
|
-
const
|
|
1953
|
+
const ie = Symbol(0);
|
|
1654
1954
|
function merge(...e) {
|
|
1655
1955
|
if (e.length === 1 && typeof e[0] !== "function") return e[0];
|
|
1656
1956
|
let t = false;
|
|
1657
1957
|
const n = [];
|
|
1658
1958
|
for (let r = 0; r < e.length; r++) {
|
|
1659
1959
|
const i = e[r];
|
|
1660
|
-
t = t || (!!i &&
|
|
1661
|
-
const s = !!i && i[
|
|
1960
|
+
t = t || (!!i && M in i);
|
|
1961
|
+
const s = !!i && i[ie];
|
|
1662
1962
|
if (s) n.push(...s);
|
|
1663
1963
|
else n.push(typeof i === "function" ? ((t = true), createMemo(i)) : i);
|
|
1664
1964
|
}
|
|
1665
|
-
if (
|
|
1965
|
+
if (w && t) {
|
|
1666
1966
|
return new Proxy(
|
|
1667
1967
|
{
|
|
1668
1968
|
get(e) {
|
|
1669
|
-
if (e ===
|
|
1969
|
+
if (e === ie) return n;
|
|
1670
1970
|
for (let t = n.length - 1; t >= 0; t--) {
|
|
1671
1971
|
const r = resolveSource(n[t]);
|
|
1672
1972
|
if (e in r) return r[e];
|
|
@@ -1684,7 +1984,7 @@ function merge(...e) {
|
|
|
1684
1984
|
return [...new Set(e)];
|
|
1685
1985
|
}
|
|
1686
1986
|
},
|
|
1687
|
-
|
|
1987
|
+
re
|
|
1688
1988
|
);
|
|
1689
1989
|
}
|
|
1690
1990
|
const r = Object.create(null);
|
|
@@ -1716,12 +2016,12 @@ function merge(...e) {
|
|
|
1716
2016
|
if (n.get) Object.defineProperty(o, t, n);
|
|
1717
2017
|
else o[t] = n.value;
|
|
1718
2018
|
}
|
|
1719
|
-
o[
|
|
2019
|
+
o[ie] = n;
|
|
1720
2020
|
return o;
|
|
1721
2021
|
}
|
|
1722
2022
|
function omit(e, ...t) {
|
|
1723
2023
|
const n = new Set(t);
|
|
1724
|
-
if (
|
|
2024
|
+
if (w && M in e) {
|
|
1725
2025
|
return new Proxy(
|
|
1726
2026
|
{
|
|
1727
2027
|
get(t) {
|
|
@@ -1734,7 +2034,7 @@ function omit(e, ...t) {
|
|
|
1734
2034
|
return Object.keys(e).filter(e => !n.has(e));
|
|
1735
2035
|
}
|
|
1736
2036
|
},
|
|
1737
|
-
|
|
2037
|
+
re
|
|
1738
2038
|
);
|
|
1739
2039
|
}
|
|
1740
2040
|
const r = {};
|
|
@@ -1752,68 +2052,68 @@ function mapArray(e, t, n) {
|
|
|
1752
2052
|
const r = typeof n?.keyed === "function" ? n.keyed : undefined;
|
|
1753
2053
|
return createMemo(
|
|
1754
2054
|
updateKeyedMap.bind({
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
2055
|
+
Ae: createOwner(),
|
|
2056
|
+
We: 0,
|
|
2057
|
+
je: e,
|
|
2058
|
+
Ne: [],
|
|
2059
|
+
Ee: t,
|
|
2060
|
+
He: [],
|
|
2061
|
+
Ie: [],
|
|
2062
|
+
Qe: r,
|
|
2063
|
+
Re: r || n?.keyed === false ? [] : undefined,
|
|
2064
|
+
Te: t.length > 1 ? [] : undefined,
|
|
2065
|
+
qe: n?.fallback
|
|
1766
2066
|
})
|
|
1767
2067
|
);
|
|
1768
2068
|
}
|
|
1769
|
-
const
|
|
2069
|
+
const se = { pureWrite: true };
|
|
1770
2070
|
function updateKeyedMap() {
|
|
1771
|
-
const e = this.
|
|
2071
|
+
const e = this.je() || [],
|
|
1772
2072
|
t = e.length;
|
|
1773
|
-
e[
|
|
1774
|
-
runWithOwner(this.
|
|
2073
|
+
e[q];
|
|
2074
|
+
runWithOwner(this.Ae, () => {
|
|
1775
2075
|
let n,
|
|
1776
2076
|
r,
|
|
1777
|
-
i = this.
|
|
2077
|
+
i = this.Re
|
|
1778
2078
|
? () => {
|
|
1779
|
-
this.
|
|
1780
|
-
this.
|
|
1781
|
-
return this.
|
|
1782
|
-
read.bind(null, this.
|
|
1783
|
-
this.
|
|
2079
|
+
this.Re[r] = signal(e[r], se);
|
|
2080
|
+
this.Te && (this.Te[r] = signal(r, se));
|
|
2081
|
+
return this.Ee(
|
|
2082
|
+
read.bind(null, this.Re[r]),
|
|
2083
|
+
this.Te ? read.bind(null, this.Te[r]) : undefined
|
|
1784
2084
|
);
|
|
1785
2085
|
}
|
|
1786
|
-
: this.
|
|
2086
|
+
: this.Te
|
|
1787
2087
|
? () => {
|
|
1788
2088
|
const t = e[r];
|
|
1789
|
-
this.
|
|
1790
|
-
return this.
|
|
2089
|
+
this.Te[r] = signal(r, se);
|
|
2090
|
+
return this.Ee(() => t, read.bind(null, this.Te[r]));
|
|
1791
2091
|
}
|
|
1792
2092
|
: () => {
|
|
1793
2093
|
const t = e[r];
|
|
1794
|
-
return this.
|
|
2094
|
+
return this.Ee(() => t);
|
|
1795
2095
|
};
|
|
1796
2096
|
if (t === 0) {
|
|
1797
|
-
if (this.
|
|
1798
|
-
this.
|
|
1799
|
-
this.
|
|
1800
|
-
this.
|
|
1801
|
-
this.
|
|
1802
|
-
this.
|
|
1803
|
-
this.
|
|
1804
|
-
this.
|
|
2097
|
+
if (this.We !== 0) {
|
|
2098
|
+
this.Ae.dispose(false);
|
|
2099
|
+
this.Ie = [];
|
|
2100
|
+
this.Ne = [];
|
|
2101
|
+
this.He = [];
|
|
2102
|
+
this.We = 0;
|
|
2103
|
+
this.Re && (this.Re = []);
|
|
2104
|
+
this.Te && (this.Te = []);
|
|
1805
2105
|
}
|
|
1806
|
-
if (this.
|
|
1807
|
-
this.
|
|
2106
|
+
if (this.qe && !this.He[0]) {
|
|
2107
|
+
this.He[0] = runWithOwner((this.Ie[0] = createOwner()), this.qe);
|
|
1808
2108
|
}
|
|
1809
|
-
} else if (this.
|
|
1810
|
-
if (this.
|
|
1811
|
-
this.
|
|
2109
|
+
} else if (this.We === 0) {
|
|
2110
|
+
if (this.Ie[0]) this.Ie[0].dispose();
|
|
2111
|
+
this.He = new Array(t);
|
|
1812
2112
|
for (r = 0; r < t; r++) {
|
|
1813
|
-
this.
|
|
1814
|
-
this.
|
|
2113
|
+
this.Ne[r] = e[r];
|
|
2114
|
+
this.He[r] = runWithOwner((this.Ie[r] = createOwner()), i);
|
|
1815
2115
|
}
|
|
1816
|
-
this.
|
|
2116
|
+
this.We = t;
|
|
1817
2117
|
} else {
|
|
1818
2118
|
let s,
|
|
1819
2119
|
o,
|
|
@@ -1823,275 +2123,271 @@ function updateKeyedMap() {
|
|
|
1823
2123
|
c,
|
|
1824
2124
|
a,
|
|
1825
2125
|
d = new Array(t),
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
y = this.
|
|
2126
|
+
p = new Array(t),
|
|
2127
|
+
h = this.Re ? new Array(t) : undefined,
|
|
2128
|
+
y = this.Te ? new Array(t) : undefined;
|
|
1829
2129
|
for (
|
|
1830
|
-
s = 0, o = Math.min(this.
|
|
1831
|
-
s < o && (this.
|
|
2130
|
+
s = 0, o = Math.min(this.We, t);
|
|
2131
|
+
s < o && (this.Ne[s] === e[s] || (this.Re && compare(this.Qe, this.Ne[s], e[s])));
|
|
1832
2132
|
s++
|
|
1833
2133
|
) {
|
|
1834
|
-
if (this.
|
|
2134
|
+
if (this.Re) setSignal(this.Re[s], e[s]);
|
|
1835
2135
|
}
|
|
1836
2136
|
for (
|
|
1837
|
-
o = this.
|
|
2137
|
+
o = this.We - 1, u = t - 1;
|
|
1838
2138
|
o >= s &&
|
|
1839
2139
|
u >= s &&
|
|
1840
|
-
(this.
|
|
2140
|
+
(this.Ne[o] === e[u] || (this.Re && compare(this.Qe, this.Ne[o], e[u])));
|
|
1841
2141
|
o--, u--
|
|
1842
2142
|
) {
|
|
1843
|
-
d[u] = this.
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
y && (y[u] = this.
|
|
2143
|
+
d[u] = this.He[o];
|
|
2144
|
+
p[u] = this.Ie[o];
|
|
2145
|
+
h && (h[u] = this.Re[o]);
|
|
2146
|
+
y && (y[u] = this.Te[o]);
|
|
1847
2147
|
}
|
|
1848
2148
|
c = new Map();
|
|
1849
2149
|
a = new Array(u + 1);
|
|
1850
2150
|
for (r = u; r >= s; r--) {
|
|
1851
2151
|
l = e[r];
|
|
1852
|
-
f = this.
|
|
2152
|
+
f = this.Qe ? this.Qe(l) : l;
|
|
1853
2153
|
n = c.get(f);
|
|
1854
2154
|
a[r] = n === undefined ? -1 : n;
|
|
1855
2155
|
c.set(f, r);
|
|
1856
2156
|
}
|
|
1857
2157
|
for (n = s; n <= o; n++) {
|
|
1858
|
-
l = this.
|
|
1859
|
-
f = this.
|
|
2158
|
+
l = this.Ne[n];
|
|
2159
|
+
f = this.Qe ? this.Qe(l) : l;
|
|
1860
2160
|
r = c.get(f);
|
|
1861
2161
|
if (r !== undefined && r !== -1) {
|
|
1862
|
-
d[r] = this.
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
y && (y[r] = this.
|
|
2162
|
+
d[r] = this.He[n];
|
|
2163
|
+
p[r] = this.Ie[n];
|
|
2164
|
+
h && (h[r] = this.Re[n]);
|
|
2165
|
+
y && (y[r] = this.Te[n]);
|
|
1866
2166
|
r = a[r];
|
|
1867
2167
|
c.set(f, r);
|
|
1868
|
-
} else this.
|
|
2168
|
+
} else this.Ie[n].dispose();
|
|
1869
2169
|
}
|
|
1870
2170
|
for (r = s; r < t; r++) {
|
|
1871
2171
|
if (r in d) {
|
|
1872
|
-
this.
|
|
1873
|
-
this.
|
|
1874
|
-
if (
|
|
1875
|
-
this.
|
|
1876
|
-
setSignal(this.
|
|
2172
|
+
this.He[r] = d[r];
|
|
2173
|
+
this.Ie[r] = p[r];
|
|
2174
|
+
if (h) {
|
|
2175
|
+
this.Re[r] = h[r];
|
|
2176
|
+
setSignal(this.Re[r], e[r]);
|
|
1877
2177
|
}
|
|
1878
2178
|
if (y) {
|
|
1879
|
-
this.
|
|
1880
|
-
setSignal(this.
|
|
2179
|
+
this.Te[r] = y[r];
|
|
2180
|
+
setSignal(this.Te[r], r);
|
|
1881
2181
|
}
|
|
1882
2182
|
} else {
|
|
1883
|
-
this.
|
|
2183
|
+
this.He[r] = runWithOwner((this.Ie[r] = createOwner()), i);
|
|
1884
2184
|
}
|
|
1885
2185
|
}
|
|
1886
|
-
this.
|
|
1887
|
-
this.
|
|
2186
|
+
this.He = this.He.slice(0, (this.We = t));
|
|
2187
|
+
this.Ne = e.slice(0);
|
|
1888
2188
|
}
|
|
1889
2189
|
});
|
|
1890
|
-
return this.
|
|
2190
|
+
return this.He;
|
|
1891
2191
|
}
|
|
1892
2192
|
function repeat(e, t, n) {
|
|
1893
2193
|
return updateRepeat.bind({
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
2194
|
+
Ae: createOwner(),
|
|
2195
|
+
We: 0,
|
|
2196
|
+
Fe: 0,
|
|
2197
|
+
Ve: e,
|
|
2198
|
+
Ee: t,
|
|
2199
|
+
Ie: [],
|
|
2200
|
+
He: [],
|
|
2201
|
+
Me: n?.from,
|
|
2202
|
+
qe: n?.fallback
|
|
1903
2203
|
});
|
|
1904
2204
|
}
|
|
1905
2205
|
function updateRepeat() {
|
|
1906
|
-
const e = this.
|
|
1907
|
-
const t = this.
|
|
1908
|
-
runWithOwner(this.
|
|
2206
|
+
const e = this.Ve();
|
|
2207
|
+
const t = this.Me?.() || 0;
|
|
2208
|
+
runWithOwner(this.Ae, () => {
|
|
1909
2209
|
if (e === 0) {
|
|
1910
|
-
if (this.
|
|
1911
|
-
this.
|
|
1912
|
-
this.
|
|
1913
|
-
this.
|
|
1914
|
-
this.
|
|
2210
|
+
if (this.We !== 0) {
|
|
2211
|
+
this.Ae.dispose(false);
|
|
2212
|
+
this.Ie = [];
|
|
2213
|
+
this.He = [];
|
|
2214
|
+
this.We = 0;
|
|
1915
2215
|
}
|
|
1916
|
-
if (this.
|
|
1917
|
-
this.
|
|
2216
|
+
if (this.qe && !this.He[0]) {
|
|
2217
|
+
this.He[0] = runWithOwner((this.Ie[0] = createOwner()), this.qe);
|
|
1918
2218
|
}
|
|
1919
2219
|
return;
|
|
1920
2220
|
}
|
|
1921
2221
|
const n = t + e;
|
|
1922
|
-
const r = this.
|
|
1923
|
-
if (this.
|
|
1924
|
-
for (let e = n; e < r; e++) this.
|
|
1925
|
-
if (this.
|
|
1926
|
-
let e = this.
|
|
1927
|
-
while (e < t && e < this.
|
|
1928
|
-
this.
|
|
1929
|
-
this.
|
|
1930
|
-
} else if (this.
|
|
1931
|
-
let n = r - this.
|
|
1932
|
-
let i = this.
|
|
1933
|
-
this.
|
|
2222
|
+
const r = this.Fe + this.We;
|
|
2223
|
+
if (this.We === 0 && this.Ie[0]) this.Ie[0].dispose();
|
|
2224
|
+
for (let e = n; e < r; e++) this.Ie[e - this.Fe].dispose();
|
|
2225
|
+
if (this.Fe < t) {
|
|
2226
|
+
let e = this.Fe;
|
|
2227
|
+
while (e < t && e < this.We) this.Ie[e++].dispose();
|
|
2228
|
+
this.Ie.splice(0, t - this.Fe);
|
|
2229
|
+
this.He.splice(0, t - this.Fe);
|
|
2230
|
+
} else if (this.Fe > t) {
|
|
2231
|
+
let n = r - this.Fe - 1;
|
|
2232
|
+
let i = this.Fe - t;
|
|
2233
|
+
this.Ie.length = this.He.length = e;
|
|
1934
2234
|
while (n >= i) {
|
|
1935
|
-
this.
|
|
1936
|
-
this.
|
|
2235
|
+
this.Ie[n] = this.Ie[n - i];
|
|
2236
|
+
this.He[n] = this.He[n - i];
|
|
1937
2237
|
n--;
|
|
1938
2238
|
}
|
|
1939
2239
|
for (let e = 0; e < i; e++) {
|
|
1940
|
-
this.
|
|
2240
|
+
this.He[e] = runWithOwner((this.Ie[e] = createOwner()), () => this.Ee(e + t));
|
|
1941
2241
|
}
|
|
1942
2242
|
}
|
|
1943
2243
|
for (let e = r; e < n; e++) {
|
|
1944
|
-
this.
|
|
2244
|
+
this.He[e - t] = runWithOwner((this.Ie[e - t] = createOwner()), () => this.Ee(e));
|
|
1945
2245
|
}
|
|
1946
|
-
this.
|
|
1947
|
-
this.
|
|
1948
|
-
this.
|
|
2246
|
+
this.He = this.He.slice(0, e);
|
|
2247
|
+
this.Fe = t;
|
|
2248
|
+
this.We = e;
|
|
1949
2249
|
});
|
|
1950
|
-
return this.
|
|
2250
|
+
return this.He;
|
|
1951
2251
|
}
|
|
1952
2252
|
function compare(e, t, n) {
|
|
1953
2253
|
return e ? e(t) === e(n) : true;
|
|
1954
2254
|
}
|
|
1955
2255
|
function boundaryComputed(e, t) {
|
|
1956
|
-
const n = computed(e, undefined, {
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
},
|
|
1966
|
-
qe: t
|
|
1967
|
-
}
|
|
1968
|
-
});
|
|
1969
|
-
n.qe = t;
|
|
1970
|
-
n.pe = true;
|
|
2256
|
+
const n = computed(e, undefined, { lazy: true });
|
|
2257
|
+
n.pe = () => {
|
|
2258
|
+
const e = n.re;
|
|
2259
|
+
n.re &= ~n.De;
|
|
2260
|
+
n.$.notify(n, n.De, e);
|
|
2261
|
+
};
|
|
2262
|
+
n.De = t;
|
|
2263
|
+
n.we = true;
|
|
2264
|
+
recompute(n, true);
|
|
1971
2265
|
return n;
|
|
1972
2266
|
}
|
|
1973
2267
|
function createBoundChildren(e, t, n, r) {
|
|
1974
|
-
const i = e
|
|
1975
|
-
i.addChild((e
|
|
1976
|
-
onCleanup(() => i.removeChild(e
|
|
2268
|
+
const i = e.$;
|
|
2269
|
+
i.addChild((e.$ = n));
|
|
2270
|
+
onCleanup(() => i.removeChild(e.$));
|
|
1977
2271
|
return runWithOwner(e, () => {
|
|
1978
2272
|
const e = computed(t);
|
|
1979
2273
|
return boundaryComputed(() => staleValues(() => flatten(read(e))), r);
|
|
1980
2274
|
});
|
|
1981
2275
|
}
|
|
1982
2276
|
class ConditionalQueue extends Queue {
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
2277
|
+
Be;
|
|
2278
|
+
Ge = new Set();
|
|
2279
|
+
D = new Set();
|
|
1986
2280
|
constructor(e) {
|
|
1987
2281
|
super();
|
|
1988
|
-
this.
|
|
2282
|
+
this.Be = e;
|
|
1989
2283
|
}
|
|
1990
2284
|
run(e) {
|
|
1991
|
-
if (!e || read(this.
|
|
2285
|
+
if (!e || read(this.Be)) return;
|
|
1992
2286
|
return super.run(e);
|
|
1993
2287
|
}
|
|
1994
2288
|
notify(e, t, n) {
|
|
1995
|
-
if (read(this.
|
|
1996
|
-
if (t & f) {
|
|
1997
|
-
if (n & f) {
|
|
1998
|
-
this.M.add(e);
|
|
1999
|
-
t &= ~f;
|
|
2000
|
-
} else if (this.M.delete(e)) t &= ~f;
|
|
2001
|
-
}
|
|
2289
|
+
if (read(this.Be)) {
|
|
2002
2290
|
if (t & c) {
|
|
2003
2291
|
if (n & c) {
|
|
2004
|
-
this.
|
|
2292
|
+
this.D.add(e);
|
|
2005
2293
|
t &= ~c;
|
|
2006
|
-
} else if (this.
|
|
2294
|
+
} else if (this.D.delete(e)) t &= ~c;
|
|
2295
|
+
}
|
|
2296
|
+
if (t & a) {
|
|
2297
|
+
if (n & a) {
|
|
2298
|
+
this.Ge.add(e);
|
|
2299
|
+
t &= ~a;
|
|
2300
|
+
} else if (this.Ge.delete(e)) t &= ~a;
|
|
2007
2301
|
}
|
|
2008
2302
|
}
|
|
2009
2303
|
return t ? super.notify(e, t, n) : true;
|
|
2010
2304
|
}
|
|
2011
2305
|
}
|
|
2012
2306
|
class CollectionQueue extends Queue {
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2307
|
+
Ke;
|
|
2308
|
+
Ie = new Set();
|
|
2309
|
+
Be = signal(false, { pureWrite: true });
|
|
2310
|
+
ze = false;
|
|
2017
2311
|
constructor(e) {
|
|
2018
2312
|
super();
|
|
2019
|
-
this.
|
|
2313
|
+
this.Ke = e;
|
|
2020
2314
|
}
|
|
2021
2315
|
run(e) {
|
|
2022
|
-
if (!e || read(this.
|
|
2316
|
+
if (!e || read(this.Be)) return;
|
|
2023
2317
|
return super.run(e);
|
|
2024
2318
|
}
|
|
2025
2319
|
notify(e, t, n) {
|
|
2026
|
-
if (!(t & this.
|
|
2027
|
-
if (n & this.
|
|
2028
|
-
this.
|
|
2029
|
-
if (this.
|
|
2030
|
-
} else if (this.
|
|
2031
|
-
this.
|
|
2032
|
-
if (this.
|
|
2033
|
-
}
|
|
2034
|
-
t &= ~this.
|
|
2320
|
+
if (!(t & this.Ke) || (this.Ke & c && this.ze)) return super.notify(e, t, n);
|
|
2321
|
+
if (n & this.Ke) {
|
|
2322
|
+
this.Ie.add(e);
|
|
2323
|
+
if (this.Ie.size === 1) setSignal(this.Be, true);
|
|
2324
|
+
} else if (this.Ie.size > 0) {
|
|
2325
|
+
this.Ie.delete(e);
|
|
2326
|
+
if (this.Ie.size === 0) setSignal(this.Be, false);
|
|
2327
|
+
}
|
|
2328
|
+
t &= ~this.Ke;
|
|
2035
2329
|
return t ? super.notify(e, t, n) : true;
|
|
2036
2330
|
}
|
|
2037
2331
|
}
|
|
2038
|
-
var
|
|
2332
|
+
var oe;
|
|
2039
2333
|
(function (e) {
|
|
2040
2334
|
e["VISIBLE"] = "visible";
|
|
2041
2335
|
e["HIDDEN"] = "hidden";
|
|
2042
|
-
})(
|
|
2336
|
+
})(oe || (oe = {}));
|
|
2043
2337
|
function createBoundary(e, t) {
|
|
2044
2338
|
const n = createOwner();
|
|
2045
|
-
const r = new ConditionalQueue(computed(() => t() ===
|
|
2339
|
+
const r = new ConditionalQueue(computed(() => t() === oe.HIDDEN));
|
|
2046
2340
|
const i = createBoundChildren(n, e, r, 0);
|
|
2047
2341
|
computed(() => {
|
|
2048
|
-
const e = read(r.
|
|
2049
|
-
i.
|
|
2342
|
+
const e = read(r.Be);
|
|
2343
|
+
i.De = e ? a | c : 0;
|
|
2050
2344
|
if (!e) {
|
|
2051
|
-
r.
|
|
2052
|
-
r.
|
|
2053
|
-
r.
|
|
2054
|
-
r.
|
|
2345
|
+
r.D.forEach(e => r.notify(e, c, c));
|
|
2346
|
+
r.Ge.forEach(e => r.notify(e, a, a));
|
|
2347
|
+
r.D.clear();
|
|
2348
|
+
r.Ge.clear();
|
|
2055
2349
|
}
|
|
2056
2350
|
});
|
|
2057
|
-
return () => (read(r.
|
|
2351
|
+
return () => (read(r.Be) ? undefined : read(i));
|
|
2058
2352
|
}
|
|
2059
2353
|
function createCollectionBoundary(e, t, n) {
|
|
2060
2354
|
const r = createOwner();
|
|
2061
2355
|
const i = new CollectionQueue(e);
|
|
2062
2356
|
const s = createBoundChildren(r, t, i, e);
|
|
2063
2357
|
const o = computed(() => {
|
|
2064
|
-
if (!read(i.
|
|
2358
|
+
if (!read(i.Be)) {
|
|
2065
2359
|
const e = read(s);
|
|
2066
|
-
if (!untrack(() => read(i.
|
|
2067
|
-
|
|
2360
|
+
if (!untrack(() => read(i.Be))) {
|
|
2361
|
+
i.ze = true;
|
|
2362
|
+
return e;
|
|
2363
|
+
}
|
|
2068
2364
|
}
|
|
2069
2365
|
return n(i);
|
|
2070
2366
|
});
|
|
2071
2367
|
return read.bind(null, o);
|
|
2072
2368
|
}
|
|
2073
2369
|
function createLoadBoundary(e, t) {
|
|
2074
|
-
return createCollectionBoundary(
|
|
2370
|
+
return createCollectionBoundary(c, e, () => t());
|
|
2075
2371
|
}
|
|
2076
2372
|
function collectErrorSources(e, t) {
|
|
2077
2373
|
let n = true;
|
|
2078
|
-
let r = e.
|
|
2374
|
+
let r = e.j;
|
|
2079
2375
|
while (r !== null) {
|
|
2080
|
-
const e = r.
|
|
2081
|
-
if (e.
|
|
2376
|
+
const e = r.H;
|
|
2377
|
+
if (e.j && e.re & a) {
|
|
2082
2378
|
n = false;
|
|
2083
2379
|
collectErrorSources(e, t);
|
|
2084
2380
|
}
|
|
2085
|
-
r = r.
|
|
2381
|
+
r = r.N;
|
|
2086
2382
|
}
|
|
2087
2383
|
n && t.push(e);
|
|
2088
2384
|
}
|
|
2089
2385
|
function createErrorBoundary(e, t) {
|
|
2090
|
-
return createCollectionBoundary(
|
|
2091
|
-
let n = e.
|
|
2092
|
-
return t(n.
|
|
2386
|
+
return createCollectionBoundary(a, e, e => {
|
|
2387
|
+
let n = e.Ie.values().next().value;
|
|
2388
|
+
return t(n.J, () => {
|
|
2093
2389
|
const t = [];
|
|
2094
|
-
for (const n of e.
|
|
2390
|
+
for (const n of e.Ie) collectErrorSources(n, t);
|
|
2095
2391
|
for (const e of t) recompute(e);
|
|
2096
2392
|
schedule();
|
|
2097
2393
|
});
|
|
@@ -2146,13 +2442,13 @@ function flattenArray(e, t = [], n) {
|
|
|
2146
2442
|
if (r) throw r;
|
|
2147
2443
|
return i;
|
|
2148
2444
|
}
|
|
2149
|
-
exports.$PROXY =
|
|
2150
|
-
exports.$TARGET =
|
|
2151
|
-
exports.$TRACK =
|
|
2445
|
+
exports.$PROXY = M;
|
|
2446
|
+
exports.$TARGET = V;
|
|
2447
|
+
exports.$TRACK = q;
|
|
2152
2448
|
exports.ContextNotFoundError = ContextNotFoundError;
|
|
2153
2449
|
exports.NoOwnerError = NoOwnerError;
|
|
2154
2450
|
exports.NotReadyError = NotReadyError;
|
|
2155
|
-
exports.SUPPORTS_PROXY =
|
|
2451
|
+
exports.SUPPORTS_PROXY = w;
|
|
2156
2452
|
exports.action = action;
|
|
2157
2453
|
exports.createBoundary = createBoundary;
|
|
2158
2454
|
exports.createContext = createContext;
|