@tanstack/solid-query-devtools 6.0.0-beta.3 → 6.0.0-beta.4
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/build/chunk/OUUOFKOT.js +54 -0
- package/build/chunk/RNXRSYV2.js +52 -0
- package/build/dev.cjs +18 -1228
- package/build/dev.js +3 -3
- package/build/dev.jsx +7 -1218
- package/build/devtools/{BS6AII4K.js → BN3QOQGH.js} +1 -1
- package/build/devtools/{IWG4ZJJU.js → DAAYGNEN.js} +1 -1
- package/build/devtoolsPanel/{NAMW3JP3.js → FI3ZIJCV.js} +1 -1
- package/build/devtoolsPanel/{VZGSCV56.js → SQHQ34QQ.js} +1 -1
- package/build/index.cjs +8 -1184
- package/build/index.js +3 -3
- package/build/index.jsx +7 -1181
- package/package.json +7 -7
- package/build/chunk/P6IZ7GTW.js +0 -1224
- package/build/chunk/ZANDWIFD.js +0 -1260
package/build/chunk/ZANDWIFD.js
DELETED
|
@@ -1,1260 +0,0 @@
|
|
|
1
|
-
import { createRenderEffect, untrack as untrack$1, runWithOwner, sharedConfig } from 'solid-js';
|
|
2
|
-
|
|
3
|
-
// ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.4_@solidjs+signals@0.13.9_solid-js@2.0.0-beta.5/node_modules/@solidjs/web/dist/dev.js
|
|
4
|
-
|
|
5
|
-
// ../../node_modules/.pnpm/@solidjs+signals@0.13.9/node_modules/@solidjs/signals/dist/dev.js
|
|
6
|
-
var NotReadyError = class extends Error {
|
|
7
|
-
source;
|
|
8
|
-
constructor(source) {
|
|
9
|
-
super();
|
|
10
|
-
this.source = source;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
var StatusError = class extends Error {
|
|
14
|
-
source;
|
|
15
|
-
constructor(source, original) {
|
|
16
|
-
super(original instanceof Error ? original.message : String(original), { cause: original });
|
|
17
|
-
this.source = source;
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
var REACTIVE_NONE = 0;
|
|
21
|
-
var REACTIVE_CHECK = 1 << 0;
|
|
22
|
-
var REACTIVE_DIRTY = 1 << 1;
|
|
23
|
-
var REACTIVE_RECOMPUTING_DEPS = 1 << 2;
|
|
24
|
-
var REACTIVE_IN_HEAP = 1 << 3;
|
|
25
|
-
var REACTIVE_IN_HEAP_HEIGHT = 1 << 4;
|
|
26
|
-
var REACTIVE_ZOMBIE = 1 << 5;
|
|
27
|
-
var REACTIVE_DISPOSED = 1 << 6;
|
|
28
|
-
var REACTIVE_OPTIMISTIC_DIRTY = 1 << 7;
|
|
29
|
-
var REACTIVE_SNAPSHOT_STALE = 1 << 8;
|
|
30
|
-
var STATUS_PENDING = 1 << 0;
|
|
31
|
-
var STATUS_ERROR = 1 << 1;
|
|
32
|
-
var STATUS_UNINITIALIZED = 1 << 2;
|
|
33
|
-
var EFFECT_RENDER = 1;
|
|
34
|
-
var EFFECT_USER = 2;
|
|
35
|
-
var EFFECT_TRACKED = 3;
|
|
36
|
-
var NOT_PENDING = {};
|
|
37
|
-
function actualInsertIntoHeap(n, heap) {
|
|
38
|
-
const parentHeight = (n._parent?._root ? n._parent._parentComputed?._height : n._parent?._height) ?? -1;
|
|
39
|
-
if (parentHeight >= n._height) n._height = parentHeight + 1;
|
|
40
|
-
const height = n._height;
|
|
41
|
-
const heapAtHeight = heap._heap[height];
|
|
42
|
-
if (heapAtHeight === void 0) heap._heap[height] = n;
|
|
43
|
-
else {
|
|
44
|
-
const tail = heapAtHeight._prevHeap;
|
|
45
|
-
tail._nextHeap = n;
|
|
46
|
-
n._prevHeap = tail;
|
|
47
|
-
heapAtHeight._prevHeap = n;
|
|
48
|
-
}
|
|
49
|
-
if (height > heap._max) heap._max = height;
|
|
50
|
-
}
|
|
51
|
-
function insertIntoHeap(n, heap) {
|
|
52
|
-
let flags = n._flags;
|
|
53
|
-
if (flags & (REACTIVE_IN_HEAP | REACTIVE_RECOMPUTING_DEPS)) return;
|
|
54
|
-
if (flags & REACTIVE_CHECK) {
|
|
55
|
-
n._flags = flags & -4 | REACTIVE_DIRTY | REACTIVE_IN_HEAP;
|
|
56
|
-
} else n._flags = flags | REACTIVE_IN_HEAP;
|
|
57
|
-
if (!(flags & REACTIVE_IN_HEAP_HEIGHT)) actualInsertIntoHeap(n, heap);
|
|
58
|
-
}
|
|
59
|
-
function insertIntoHeapHeight(n, heap) {
|
|
60
|
-
let flags = n._flags;
|
|
61
|
-
if (flags & (REACTIVE_IN_HEAP | REACTIVE_RECOMPUTING_DEPS | REACTIVE_IN_HEAP_HEIGHT)) return;
|
|
62
|
-
n._flags = flags | REACTIVE_IN_HEAP_HEIGHT;
|
|
63
|
-
actualInsertIntoHeap(n, heap);
|
|
64
|
-
}
|
|
65
|
-
function deleteFromHeap(n, heap) {
|
|
66
|
-
const flags = n._flags;
|
|
67
|
-
if (!(flags & (REACTIVE_IN_HEAP | REACTIVE_IN_HEAP_HEIGHT))) return;
|
|
68
|
-
n._flags = flags & -25;
|
|
69
|
-
const height = n._height;
|
|
70
|
-
if (n._prevHeap === n) heap._heap[height] = void 0;
|
|
71
|
-
else {
|
|
72
|
-
const next = n._nextHeap;
|
|
73
|
-
const dhh = heap._heap[height];
|
|
74
|
-
const end = next ?? dhh;
|
|
75
|
-
if (n === dhh) heap._heap[height] = next;
|
|
76
|
-
else n._prevHeap._nextHeap = next;
|
|
77
|
-
end._prevHeap = n._prevHeap;
|
|
78
|
-
}
|
|
79
|
-
n._prevHeap = n;
|
|
80
|
-
n._nextHeap = void 0;
|
|
81
|
-
}
|
|
82
|
-
function runHeap(heap, recompute2) {
|
|
83
|
-
heap._marked = false;
|
|
84
|
-
for (heap._min = 0; heap._min <= heap._max; heap._min++) {
|
|
85
|
-
let el = heap._heap[heap._min];
|
|
86
|
-
while (el !== void 0) {
|
|
87
|
-
if (el._flags & REACTIVE_IN_HEAP) recompute2(el);
|
|
88
|
-
else adjustHeight(el, heap);
|
|
89
|
-
el = heap._heap[heap._min];
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
heap._max = 0;
|
|
93
|
-
}
|
|
94
|
-
function adjustHeight(el, heap) {
|
|
95
|
-
deleteFromHeap(el, heap);
|
|
96
|
-
let newHeight = el._height;
|
|
97
|
-
for (let d = el._deps; d; d = d._nextDep) {
|
|
98
|
-
const dep1 = d._dep;
|
|
99
|
-
const dep = dep1._firewall || dep1;
|
|
100
|
-
if (dep._fn && dep._height >= newHeight) newHeight = dep._height + 1;
|
|
101
|
-
}
|
|
102
|
-
if (el._height !== newHeight) {
|
|
103
|
-
el._height = newHeight;
|
|
104
|
-
for (let s = el._subs; s !== null; s = s._nextSub) {
|
|
105
|
-
insertIntoHeapHeight(s._sub, heap);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
var transitions = /* @__PURE__ */ new Set();
|
|
110
|
-
var dirtyQueue = { _heap: new Array(2e3).fill(void 0), _marked: false, _min: 0, _max: 0 };
|
|
111
|
-
var zombieQueue = { _heap: new Array(2e3).fill(void 0), _marked: false, _min: 0, _max: 0 };
|
|
112
|
-
var clock = 0;
|
|
113
|
-
var activeTransition = null;
|
|
114
|
-
var scheduled = false;
|
|
115
|
-
var projectionWriteActive = false;
|
|
116
|
-
var inTrackedQueueCallback = false;
|
|
117
|
-
var stashedOptimisticReads = null;
|
|
118
|
-
function runLaneEffects(type) {
|
|
119
|
-
for (const lane of activeLanes) {
|
|
120
|
-
if (lane._mergedInto || lane._pendingAsync.size > 0) continue;
|
|
121
|
-
const effects = lane._effectQueues[type - 1];
|
|
122
|
-
if (effects.length) {
|
|
123
|
-
lane._effectQueues[type - 1] = [];
|
|
124
|
-
runQueue(effects, type);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
function queueStashedOptimisticEffects(node) {
|
|
129
|
-
for (let s = node._subs; s !== null; s = s._nextSub) {
|
|
130
|
-
const sub = s._sub;
|
|
131
|
-
if (!sub._type) continue;
|
|
132
|
-
if (sub._type === EFFECT_TRACKED) {
|
|
133
|
-
if (!sub._modified) {
|
|
134
|
-
sub._modified = true;
|
|
135
|
-
sub._queue.enqueue(EFFECT_USER, sub._run);
|
|
136
|
-
}
|
|
137
|
-
continue;
|
|
138
|
-
}
|
|
139
|
-
const queue = sub._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
|
|
140
|
-
if (queue._min > sub._height) queue._min = sub._height;
|
|
141
|
-
insertIntoHeap(sub, queue);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
function mergeTransitionState(target, outgoing) {
|
|
145
|
-
outgoing._done = target;
|
|
146
|
-
target._actions.push(...outgoing._actions);
|
|
147
|
-
for (const lane of activeLanes) {
|
|
148
|
-
if (lane._transition === outgoing) lane._transition = target;
|
|
149
|
-
}
|
|
150
|
-
target._optimisticNodes.push(...outgoing._optimisticNodes);
|
|
151
|
-
for (const store of outgoing._optimisticStores) target._optimisticStores.add(store);
|
|
152
|
-
for (const node of outgoing._asyncNodes) {
|
|
153
|
-
if (!target._asyncNodes.includes(node)) target._asyncNodes.push(node);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
function resolveOptimisticNodes(nodes) {
|
|
157
|
-
for (let i = 0; i < nodes.length; i++) {
|
|
158
|
-
const node = nodes[i];
|
|
159
|
-
node._optimisticLane = void 0;
|
|
160
|
-
if (node._pendingValue !== NOT_PENDING) {
|
|
161
|
-
node._value = node._pendingValue;
|
|
162
|
-
node._pendingValue = NOT_PENDING;
|
|
163
|
-
}
|
|
164
|
-
const prevOverride = node._overrideValue;
|
|
165
|
-
node._overrideValue = NOT_PENDING;
|
|
166
|
-
if (prevOverride !== NOT_PENDING && node._value !== prevOverride) insertSubs(node, true);
|
|
167
|
-
node._transition = null;
|
|
168
|
-
}
|
|
169
|
-
nodes.length = 0;
|
|
170
|
-
}
|
|
171
|
-
function cleanupCompletedLanes(completingTransition) {
|
|
172
|
-
for (const lane of activeLanes) {
|
|
173
|
-
const owned = completingTransition ? lane._transition === completingTransition : !lane._transition;
|
|
174
|
-
if (!owned) continue;
|
|
175
|
-
if (!lane._mergedInto) {
|
|
176
|
-
if (lane._effectQueues[0].length) runQueue(lane._effectQueues[0], EFFECT_RENDER);
|
|
177
|
-
if (lane._effectQueues[1].length) runQueue(lane._effectQueues[1], EFFECT_USER);
|
|
178
|
-
}
|
|
179
|
-
if (lane._source._optimisticLane === lane) lane._source._optimisticLane = void 0;
|
|
180
|
-
lane._pendingAsync.clear();
|
|
181
|
-
lane._effectQueues[0].length = 0;
|
|
182
|
-
lane._effectQueues[1].length = 0;
|
|
183
|
-
activeLanes.delete(lane);
|
|
184
|
-
signalLanes.delete(lane._source);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
function schedule() {
|
|
188
|
-
if (scheduled) return;
|
|
189
|
-
scheduled = true;
|
|
190
|
-
if (!globalQueue._running && !projectionWriteActive) queueMicrotask(flush);
|
|
191
|
-
}
|
|
192
|
-
var Queue = class {
|
|
193
|
-
_parent = null;
|
|
194
|
-
_queues = [[], []];
|
|
195
|
-
_children = [];
|
|
196
|
-
created = clock;
|
|
197
|
-
addChild(child) {
|
|
198
|
-
this._children.push(child);
|
|
199
|
-
child._parent = this;
|
|
200
|
-
}
|
|
201
|
-
removeChild(child) {
|
|
202
|
-
const index = this._children.indexOf(child);
|
|
203
|
-
if (index >= 0) {
|
|
204
|
-
this._children.splice(index, 1);
|
|
205
|
-
child._parent = null;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
notify(node, mask, flags, error) {
|
|
209
|
-
if (this._parent) return this._parent.notify(node, mask, flags, error);
|
|
210
|
-
return false;
|
|
211
|
-
}
|
|
212
|
-
run(type) {
|
|
213
|
-
if (this._queues[type - 1].length) {
|
|
214
|
-
const effects = this._queues[type - 1];
|
|
215
|
-
this._queues[type - 1] = [];
|
|
216
|
-
runQueue(effects, type);
|
|
217
|
-
}
|
|
218
|
-
for (let i = 0; i < this._children.length; i++) this._children[i].run?.(type);
|
|
219
|
-
}
|
|
220
|
-
enqueue(type, fn) {
|
|
221
|
-
if (type) {
|
|
222
|
-
if (currentOptimisticLane) {
|
|
223
|
-
const lane = findLane(currentOptimisticLane);
|
|
224
|
-
lane._effectQueues[type - 1].push(fn);
|
|
225
|
-
} else {
|
|
226
|
-
this._queues[type - 1].push(fn);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
schedule();
|
|
230
|
-
}
|
|
231
|
-
stashQueues(stub) {
|
|
232
|
-
stub._queues[0].push(...this._queues[0]);
|
|
233
|
-
stub._queues[1].push(...this._queues[1]);
|
|
234
|
-
this._queues = [[], []];
|
|
235
|
-
for (let i = 0; i < this._children.length; i++) {
|
|
236
|
-
let child = this._children[i];
|
|
237
|
-
let childStub = stub._children[i];
|
|
238
|
-
if (!childStub) {
|
|
239
|
-
childStub = { _queues: [[], []], _children: [] };
|
|
240
|
-
stub._children[i] = childStub;
|
|
241
|
-
}
|
|
242
|
-
child.stashQueues(childStub);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
restoreQueues(stub) {
|
|
246
|
-
this._queues[0].push(...stub._queues[0]);
|
|
247
|
-
this._queues[1].push(...stub._queues[1]);
|
|
248
|
-
for (let i = 0; i < stub._children.length; i++) {
|
|
249
|
-
const childStub = stub._children[i];
|
|
250
|
-
let child = this._children[i];
|
|
251
|
-
if (child) child.restoreQueues(childStub);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
var GlobalQueue = class _GlobalQueue extends Queue {
|
|
256
|
-
_running = false;
|
|
257
|
-
_pendingNodes = [];
|
|
258
|
-
_optimisticNodes = [];
|
|
259
|
-
_optimisticStores = /* @__PURE__ */ new Set();
|
|
260
|
-
static _update;
|
|
261
|
-
static _dispose;
|
|
262
|
-
static _clearOptimisticStore = null;
|
|
263
|
-
flush() {
|
|
264
|
-
if (this._running) return;
|
|
265
|
-
this._running = true;
|
|
266
|
-
try {
|
|
267
|
-
runHeap(dirtyQueue, _GlobalQueue._update);
|
|
268
|
-
if (activeTransition) {
|
|
269
|
-
const isComplete = transitionComplete(activeTransition);
|
|
270
|
-
if (!isComplete) {
|
|
271
|
-
const stashedTransition = activeTransition;
|
|
272
|
-
runHeap(zombieQueue, _GlobalQueue._update);
|
|
273
|
-
this._pendingNodes = [];
|
|
274
|
-
this._optimisticNodes = [];
|
|
275
|
-
this._optimisticStores = /* @__PURE__ */ new Set();
|
|
276
|
-
runLaneEffects(EFFECT_RENDER);
|
|
277
|
-
runLaneEffects(EFFECT_USER);
|
|
278
|
-
this.stashQueues(stashedTransition._queueStash);
|
|
279
|
-
clock++;
|
|
280
|
-
scheduled = dirtyQueue._max >= dirtyQueue._min;
|
|
281
|
-
reassignPendingTransition(stashedTransition._pendingNodes);
|
|
282
|
-
activeTransition = null;
|
|
283
|
-
if (!stashedTransition._actions.length && stashedTransition._optimisticNodes.length) {
|
|
284
|
-
stashedOptimisticReads = /* @__PURE__ */ new Set();
|
|
285
|
-
for (let i = 0; i < stashedTransition._optimisticNodes.length; i++) {
|
|
286
|
-
const node = stashedTransition._optimisticNodes[i];
|
|
287
|
-
if (node._fn || node._pureWrite) continue;
|
|
288
|
-
stashedOptimisticReads.add(node);
|
|
289
|
-
queueStashedOptimisticEffects(node);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
try {
|
|
293
|
-
finalizePureQueue(null, true);
|
|
294
|
-
} finally {
|
|
295
|
-
stashedOptimisticReads = null;
|
|
296
|
-
}
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
|
-
this._pendingNodes !== activeTransition._pendingNodes && this._pendingNodes.push(...activeTransition._pendingNodes);
|
|
300
|
-
this.restoreQueues(activeTransition._queueStash);
|
|
301
|
-
transitions.delete(activeTransition);
|
|
302
|
-
const completingTransition = activeTransition;
|
|
303
|
-
activeTransition = null;
|
|
304
|
-
reassignPendingTransition(this._pendingNodes);
|
|
305
|
-
finalizePureQueue(completingTransition);
|
|
306
|
-
} else {
|
|
307
|
-
if (transitions.size) runHeap(zombieQueue, _GlobalQueue._update);
|
|
308
|
-
finalizePureQueue();
|
|
309
|
-
}
|
|
310
|
-
clock++;
|
|
311
|
-
scheduled = dirtyQueue._max >= dirtyQueue._min;
|
|
312
|
-
runLaneEffects(EFFECT_RENDER);
|
|
313
|
-
this.run(EFFECT_RENDER);
|
|
314
|
-
runLaneEffects(EFFECT_USER);
|
|
315
|
-
this.run(EFFECT_USER);
|
|
316
|
-
} finally {
|
|
317
|
-
this._running = false;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
notify(node, mask, flags, error) {
|
|
321
|
-
if (mask & STATUS_PENDING) {
|
|
322
|
-
if (flags & STATUS_PENDING) {
|
|
323
|
-
const actualError = error !== void 0 ? error : node._error;
|
|
324
|
-
if (activeTransition && actualError) {
|
|
325
|
-
const source = actualError.source;
|
|
326
|
-
if (!activeTransition._asyncNodes.includes(source)) {
|
|
327
|
-
activeTransition._asyncNodes.push(source);
|
|
328
|
-
schedule();
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
return true;
|
|
333
|
-
}
|
|
334
|
-
return false;
|
|
335
|
-
}
|
|
336
|
-
initTransition(transition) {
|
|
337
|
-
if (transition) transition = currentTransition(transition);
|
|
338
|
-
if (transition && transition === activeTransition) return;
|
|
339
|
-
if (!transition && activeTransition && activeTransition._time === clock) return;
|
|
340
|
-
if (!activeTransition) {
|
|
341
|
-
activeTransition = transition ?? {
|
|
342
|
-
_time: clock,
|
|
343
|
-
_pendingNodes: [],
|
|
344
|
-
_asyncNodes: [],
|
|
345
|
-
_optimisticNodes: [],
|
|
346
|
-
_optimisticStores: /* @__PURE__ */ new Set(),
|
|
347
|
-
_actions: [],
|
|
348
|
-
_queueStash: { _queues: [[], []], _children: [] },
|
|
349
|
-
_done: false
|
|
350
|
-
};
|
|
351
|
-
} else if (transition) {
|
|
352
|
-
const outgoing = activeTransition;
|
|
353
|
-
mergeTransitionState(transition, outgoing);
|
|
354
|
-
transitions.delete(outgoing);
|
|
355
|
-
activeTransition = transition;
|
|
356
|
-
}
|
|
357
|
-
transitions.add(activeTransition);
|
|
358
|
-
activeTransition._time = clock;
|
|
359
|
-
if (this._pendingNodes !== activeTransition._pendingNodes) {
|
|
360
|
-
for (let i = 0; i < this._pendingNodes.length; i++) {
|
|
361
|
-
const node = this._pendingNodes[i];
|
|
362
|
-
node._transition = activeTransition;
|
|
363
|
-
activeTransition._pendingNodes.push(node);
|
|
364
|
-
}
|
|
365
|
-
this._pendingNodes = activeTransition._pendingNodes;
|
|
366
|
-
}
|
|
367
|
-
if (this._optimisticNodes !== activeTransition._optimisticNodes) {
|
|
368
|
-
for (let i = 0; i < this._optimisticNodes.length; i++) {
|
|
369
|
-
const node = this._optimisticNodes[i];
|
|
370
|
-
node._transition = activeTransition;
|
|
371
|
-
activeTransition._optimisticNodes.push(node);
|
|
372
|
-
}
|
|
373
|
-
this._optimisticNodes = activeTransition._optimisticNodes;
|
|
374
|
-
}
|
|
375
|
-
for (const lane of activeLanes) {
|
|
376
|
-
if (!lane._transition) lane._transition = activeTransition;
|
|
377
|
-
}
|
|
378
|
-
if (this._optimisticStores !== activeTransition._optimisticStores) {
|
|
379
|
-
for (const store of this._optimisticStores) activeTransition._optimisticStores.add(store);
|
|
380
|
-
this._optimisticStores = activeTransition._optimisticStores;
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
};
|
|
384
|
-
function insertSubs(node, optimistic = false) {
|
|
385
|
-
const sourceLane = node._optimisticLane || currentOptimisticLane;
|
|
386
|
-
const hasSnapshot = node._snapshotValue !== void 0;
|
|
387
|
-
for (let s = node._subs; s !== null; s = s._nextSub) {
|
|
388
|
-
if (hasSnapshot && s._sub._inSnapshotScope) {
|
|
389
|
-
s._sub._flags |= REACTIVE_SNAPSHOT_STALE;
|
|
390
|
-
continue;
|
|
391
|
-
}
|
|
392
|
-
if (optimistic && sourceLane) {
|
|
393
|
-
s._sub._flags |= REACTIVE_OPTIMISTIC_DIRTY;
|
|
394
|
-
assignOrMergeLane(s._sub, sourceLane);
|
|
395
|
-
} else if (optimistic) {
|
|
396
|
-
s._sub._flags |= REACTIVE_OPTIMISTIC_DIRTY;
|
|
397
|
-
s._sub._optimisticLane = void 0;
|
|
398
|
-
}
|
|
399
|
-
const sub = s._sub;
|
|
400
|
-
if (sub._type === EFFECT_TRACKED) {
|
|
401
|
-
if (!sub._modified) {
|
|
402
|
-
sub._modified = true;
|
|
403
|
-
sub._queue.enqueue(EFFECT_USER, sub._run);
|
|
404
|
-
}
|
|
405
|
-
continue;
|
|
406
|
-
}
|
|
407
|
-
const queue = s._sub._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
|
|
408
|
-
if (queue._min > s._sub._height) queue._min = s._sub._height;
|
|
409
|
-
insertIntoHeap(s._sub, queue);
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
function commitPendingNodes() {
|
|
413
|
-
const pendingNodes = globalQueue._pendingNodes;
|
|
414
|
-
for (let i = 0; i < pendingNodes.length; i++) {
|
|
415
|
-
const n = pendingNodes[i];
|
|
416
|
-
if (n._pendingValue !== NOT_PENDING) {
|
|
417
|
-
n._value = n._pendingValue;
|
|
418
|
-
n._pendingValue = NOT_PENDING;
|
|
419
|
-
if (n._type && n._type !== EFFECT_TRACKED) n._modified = true;
|
|
420
|
-
}
|
|
421
|
-
if (!(n._statusFlags & STATUS_PENDING)) n._statusFlags &= ~STATUS_UNINITIALIZED;
|
|
422
|
-
if (n._fn) GlobalQueue._dispose(n, false, true);
|
|
423
|
-
}
|
|
424
|
-
pendingNodes.length = 0;
|
|
425
|
-
}
|
|
426
|
-
function finalizePureQueue(completingTransition = null, incomplete = false) {
|
|
427
|
-
const resolvePending = !incomplete;
|
|
428
|
-
if (resolvePending) commitPendingNodes();
|
|
429
|
-
if (!incomplete) checkBoundaryChildren(globalQueue);
|
|
430
|
-
if (dirtyQueue._max >= dirtyQueue._min) runHeap(dirtyQueue, GlobalQueue._update);
|
|
431
|
-
if (resolvePending) {
|
|
432
|
-
commitPendingNodes();
|
|
433
|
-
resolveOptimisticNodes(
|
|
434
|
-
completingTransition ? completingTransition._optimisticNodes : globalQueue._optimisticNodes
|
|
435
|
-
);
|
|
436
|
-
const optimisticStores = completingTransition ? completingTransition._optimisticStores : globalQueue._optimisticStores;
|
|
437
|
-
if (GlobalQueue._clearOptimisticStore && optimisticStores.size) {
|
|
438
|
-
for (const store of optimisticStores) {
|
|
439
|
-
GlobalQueue._clearOptimisticStore(store);
|
|
440
|
-
}
|
|
441
|
-
optimisticStores.clear();
|
|
442
|
-
schedule();
|
|
443
|
-
}
|
|
444
|
-
cleanupCompletedLanes(completingTransition);
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
function checkBoundaryChildren(queue) {
|
|
448
|
-
for (const child of queue._children) {
|
|
449
|
-
child.checkSources?.();
|
|
450
|
-
checkBoundaryChildren(child);
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
function reassignPendingTransition(pendingNodes) {
|
|
454
|
-
for (let i = 0; i < pendingNodes.length; i++) {
|
|
455
|
-
pendingNodes[i]._transition = activeTransition;
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
var globalQueue = new GlobalQueue();
|
|
459
|
-
function flush() {
|
|
460
|
-
if (globalQueue._running) {
|
|
461
|
-
if (inTrackedQueueCallback) {
|
|
462
|
-
throw new Error(
|
|
463
|
-
"Cannot call flush() from inside onSettled or createTrackedEffect. flush() is not reentrant there."
|
|
464
|
-
);
|
|
465
|
-
}
|
|
466
|
-
return;
|
|
467
|
-
}
|
|
468
|
-
let count = 0;
|
|
469
|
-
while (scheduled || activeTransition) {
|
|
470
|
-
if (++count === 1e5) throw new Error("Potential Infinite Loop Detected.");
|
|
471
|
-
globalQueue.flush();
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
function runQueue(queue, type) {
|
|
475
|
-
for (let i = 0; i < queue.length; i++) queue[i](type);
|
|
476
|
-
}
|
|
477
|
-
function transitionComplete(transition) {
|
|
478
|
-
if (transition._done) return true;
|
|
479
|
-
if (transition._actions.length) return false;
|
|
480
|
-
let done = true;
|
|
481
|
-
for (let i = 0; i < transition._asyncNodes.length; i++) {
|
|
482
|
-
const node = transition._asyncNodes[i];
|
|
483
|
-
if (node._statusFlags & STATUS_PENDING && node._error?.source === node) {
|
|
484
|
-
done = false;
|
|
485
|
-
break;
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
if (done) {
|
|
489
|
-
for (let i = 0; i < transition._optimisticNodes.length; i++) {
|
|
490
|
-
const node = transition._optimisticNodes[i];
|
|
491
|
-
if (hasActiveOverride(node) && "_statusFlags" in node && node._statusFlags & STATUS_PENDING && node._error instanceof NotReadyError && node._error.source !== node) {
|
|
492
|
-
done = false;
|
|
493
|
-
break;
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
done && (transition._done = true);
|
|
498
|
-
return done;
|
|
499
|
-
}
|
|
500
|
-
function currentTransition(transition) {
|
|
501
|
-
while (transition._done && typeof transition._done === "object") transition = transition._done;
|
|
502
|
-
return transition;
|
|
503
|
-
}
|
|
504
|
-
function runInTransition(transition, fn) {
|
|
505
|
-
const prevTransition = activeTransition;
|
|
506
|
-
try {
|
|
507
|
-
activeTransition = currentTransition(transition);
|
|
508
|
-
return fn();
|
|
509
|
-
} finally {
|
|
510
|
-
activeTransition = prevTransition;
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
var signalLanes = /* @__PURE__ */ new WeakMap();
|
|
514
|
-
var activeLanes = /* @__PURE__ */ new Set();
|
|
515
|
-
function getOrCreateLane(signal) {
|
|
516
|
-
let lane = signalLanes.get(signal);
|
|
517
|
-
if (lane) {
|
|
518
|
-
return findLane(lane);
|
|
519
|
-
}
|
|
520
|
-
const parentSource = signal._parentSource;
|
|
521
|
-
const parentLane = parentSource?._optimisticLane ? findLane(parentSource._optimisticLane) : null;
|
|
522
|
-
lane = {
|
|
523
|
-
_source: signal,
|
|
524
|
-
_pendingAsync: /* @__PURE__ */ new Set(),
|
|
525
|
-
_effectQueues: [[], []],
|
|
526
|
-
_mergedInto: null,
|
|
527
|
-
_transition: activeTransition,
|
|
528
|
-
_parentLane: parentLane
|
|
529
|
-
};
|
|
530
|
-
signalLanes.set(signal, lane);
|
|
531
|
-
activeLanes.add(lane);
|
|
532
|
-
signal._overrideSinceLane = false;
|
|
533
|
-
return lane;
|
|
534
|
-
}
|
|
535
|
-
function findLane(lane) {
|
|
536
|
-
while (lane._mergedInto) lane = lane._mergedInto;
|
|
537
|
-
return lane;
|
|
538
|
-
}
|
|
539
|
-
function mergeLanes(lane1, lane2) {
|
|
540
|
-
lane1 = findLane(lane1);
|
|
541
|
-
lane2 = findLane(lane2);
|
|
542
|
-
if (lane1 === lane2) return lane1;
|
|
543
|
-
lane2._mergedInto = lane1;
|
|
544
|
-
for (const node of lane2._pendingAsync) lane1._pendingAsync.add(node);
|
|
545
|
-
lane1._effectQueues[0].push(...lane2._effectQueues[0]);
|
|
546
|
-
lane1._effectQueues[1].push(...lane2._effectQueues[1]);
|
|
547
|
-
return lane1;
|
|
548
|
-
}
|
|
549
|
-
function resolveLane(el) {
|
|
550
|
-
const lane = el._optimisticLane;
|
|
551
|
-
if (!lane) return void 0;
|
|
552
|
-
const root = findLane(lane);
|
|
553
|
-
if (activeLanes.has(root)) return root;
|
|
554
|
-
el._optimisticLane = void 0;
|
|
555
|
-
return void 0;
|
|
556
|
-
}
|
|
557
|
-
function resolveTransition(el) {
|
|
558
|
-
return resolveLane(el)?._transition ?? el._transition;
|
|
559
|
-
}
|
|
560
|
-
function hasActiveOverride(el) {
|
|
561
|
-
return !!(el._overrideValue !== void 0 && el._overrideValue !== NOT_PENDING);
|
|
562
|
-
}
|
|
563
|
-
function assignOrMergeLane(el, sourceLane) {
|
|
564
|
-
const sourceRoot = findLane(sourceLane);
|
|
565
|
-
const existing = el._optimisticLane;
|
|
566
|
-
if (existing) {
|
|
567
|
-
if (existing._mergedInto) {
|
|
568
|
-
el._optimisticLane = sourceLane;
|
|
569
|
-
return;
|
|
570
|
-
}
|
|
571
|
-
const existingRoot = findLane(existing);
|
|
572
|
-
if (activeLanes.has(existingRoot)) {
|
|
573
|
-
if (existingRoot !== sourceRoot && !hasActiveOverride(el)) {
|
|
574
|
-
if (sourceRoot._parentLane && findLane(sourceRoot._parentLane) === existingRoot) {
|
|
575
|
-
el._optimisticLane = sourceLane;
|
|
576
|
-
} else if (existingRoot._parentLane && findLane(existingRoot._parentLane) === sourceRoot) ;
|
|
577
|
-
else mergeLanes(sourceRoot, existingRoot);
|
|
578
|
-
}
|
|
579
|
-
return;
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
el._optimisticLane = sourceLane;
|
|
583
|
-
}
|
|
584
|
-
function unlinkSubs(link) {
|
|
585
|
-
const dep = link._dep;
|
|
586
|
-
const nextDep = link._nextDep;
|
|
587
|
-
const nextSub = link._nextSub;
|
|
588
|
-
const prevSub = link._prevSub;
|
|
589
|
-
if (nextSub !== null) nextSub._prevSub = prevSub;
|
|
590
|
-
else dep._subsTail = prevSub;
|
|
591
|
-
if (prevSub !== null) prevSub._nextSub = nextSub;
|
|
592
|
-
else {
|
|
593
|
-
dep._subs = nextSub;
|
|
594
|
-
if (nextSub === null) {
|
|
595
|
-
dep._unobserved?.();
|
|
596
|
-
dep._fn && !dep._preventAutoDisposal && !(dep._flags & REACTIVE_ZOMBIE) && unobserved(dep);
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
return nextDep;
|
|
600
|
-
}
|
|
601
|
-
function unobserved(el) {
|
|
602
|
-
deleteFromHeap(el, el._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
603
|
-
let dep = el._deps;
|
|
604
|
-
while (dep !== null) {
|
|
605
|
-
dep = unlinkSubs(dep);
|
|
606
|
-
}
|
|
607
|
-
el._deps = null;
|
|
608
|
-
disposeChildren(el, true);
|
|
609
|
-
}
|
|
610
|
-
function markDisposal(el) {
|
|
611
|
-
let child = el._firstChild;
|
|
612
|
-
while (child) {
|
|
613
|
-
child._flags |= REACTIVE_ZOMBIE;
|
|
614
|
-
if (child._flags & REACTIVE_IN_HEAP) {
|
|
615
|
-
deleteFromHeap(child, dirtyQueue);
|
|
616
|
-
insertIntoHeap(child, zombieQueue);
|
|
617
|
-
}
|
|
618
|
-
markDisposal(child);
|
|
619
|
-
child = child._nextSibling;
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
function disposeChildren(node, self = false, zombie) {
|
|
623
|
-
if (node._flags & REACTIVE_DISPOSED) return;
|
|
624
|
-
if (self) node._flags = REACTIVE_DISPOSED;
|
|
625
|
-
if (self && node._fn) node._inFlight = null;
|
|
626
|
-
let child = zombie ? node._pendingFirstChild : node._firstChild;
|
|
627
|
-
while (child) {
|
|
628
|
-
const nextChild = child._nextSibling;
|
|
629
|
-
if (child._deps) {
|
|
630
|
-
const n = child;
|
|
631
|
-
deleteFromHeap(n, n._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
632
|
-
let toRemove = n._deps;
|
|
633
|
-
do {
|
|
634
|
-
toRemove = unlinkSubs(toRemove);
|
|
635
|
-
} while (toRemove !== null);
|
|
636
|
-
n._deps = null;
|
|
637
|
-
n._depsTail = null;
|
|
638
|
-
}
|
|
639
|
-
disposeChildren(child, true);
|
|
640
|
-
child = nextChild;
|
|
641
|
-
}
|
|
642
|
-
if (zombie) {
|
|
643
|
-
node._pendingFirstChild = null;
|
|
644
|
-
} else {
|
|
645
|
-
node._firstChild = null;
|
|
646
|
-
node._childCount = 0;
|
|
647
|
-
}
|
|
648
|
-
runDisposal(node, zombie);
|
|
649
|
-
}
|
|
650
|
-
function runDisposal(node, zombie) {
|
|
651
|
-
let disposal = zombie ? node._pendingDisposal : node._disposal;
|
|
652
|
-
if (!disposal) return;
|
|
653
|
-
if (Array.isArray(disposal)) {
|
|
654
|
-
for (let i = 0; i < disposal.length; i++) {
|
|
655
|
-
const callable = disposal[i];
|
|
656
|
-
callable.call(callable);
|
|
657
|
-
}
|
|
658
|
-
} else {
|
|
659
|
-
disposal.call(disposal);
|
|
660
|
-
}
|
|
661
|
-
zombie ? node._pendingDisposal = null : node._disposal = null;
|
|
662
|
-
}
|
|
663
|
-
function cleanup(fn) {
|
|
664
|
-
if (!context) return fn;
|
|
665
|
-
if (!context._disposal) context._disposal = fn;
|
|
666
|
-
else if (Array.isArray(context._disposal)) context._disposal.push(fn);
|
|
667
|
-
else context._disposal = [context._disposal, fn];
|
|
668
|
-
return fn;
|
|
669
|
-
}
|
|
670
|
-
function addPendingSource(el, source) {
|
|
671
|
-
if (el._pendingSource === source || el._pendingSources?.has(source)) return false;
|
|
672
|
-
if (!el._pendingSource) {
|
|
673
|
-
el._pendingSource = source;
|
|
674
|
-
return true;
|
|
675
|
-
}
|
|
676
|
-
if (!el._pendingSources) {
|
|
677
|
-
el._pendingSources = /* @__PURE__ */ new Set([el._pendingSource, source]);
|
|
678
|
-
} else {
|
|
679
|
-
el._pendingSources.add(source);
|
|
680
|
-
}
|
|
681
|
-
el._pendingSource = void 0;
|
|
682
|
-
return true;
|
|
683
|
-
}
|
|
684
|
-
function removePendingSource(el, source) {
|
|
685
|
-
if (el._pendingSource) {
|
|
686
|
-
if (el._pendingSource !== source) return false;
|
|
687
|
-
el._pendingSource = void 0;
|
|
688
|
-
return true;
|
|
689
|
-
}
|
|
690
|
-
if (!el._pendingSources?.delete(source)) return false;
|
|
691
|
-
if (el._pendingSources.size === 1) {
|
|
692
|
-
el._pendingSource = el._pendingSources.values().next().value;
|
|
693
|
-
el._pendingSources = void 0;
|
|
694
|
-
} else if (el._pendingSources.size === 0) {
|
|
695
|
-
el._pendingSources = void 0;
|
|
696
|
-
}
|
|
697
|
-
return true;
|
|
698
|
-
}
|
|
699
|
-
function clearPendingSources(el) {
|
|
700
|
-
el._pendingSource = void 0;
|
|
701
|
-
el._pendingSources?.clear();
|
|
702
|
-
el._pendingSources = void 0;
|
|
703
|
-
}
|
|
704
|
-
function setPendingError(el, source, error) {
|
|
705
|
-
if (!source) {
|
|
706
|
-
el._error = null;
|
|
707
|
-
return;
|
|
708
|
-
}
|
|
709
|
-
if (error instanceof NotReadyError && error.source === source) {
|
|
710
|
-
el._error = error;
|
|
711
|
-
return;
|
|
712
|
-
}
|
|
713
|
-
const current = el._error;
|
|
714
|
-
if (!(current instanceof NotReadyError) || current.source !== source) {
|
|
715
|
-
el._error = new NotReadyError(source);
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
function forEachDependent(el, fn) {
|
|
719
|
-
for (let s = el._subs; s !== null; s = s._nextSub) fn(s._sub);
|
|
720
|
-
for (let child = el._child; child !== null; child = child._nextChild) {
|
|
721
|
-
for (let s = child._subs; s !== null; s = s._nextSub) fn(s._sub);
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
function settlePendingSource(el) {
|
|
725
|
-
let scheduled2 = false;
|
|
726
|
-
const visited = /* @__PURE__ */ new Set();
|
|
727
|
-
const settle = (node) => {
|
|
728
|
-
if (visited.has(node) || !removePendingSource(node, el)) return;
|
|
729
|
-
visited.add(node);
|
|
730
|
-
node._time = clock;
|
|
731
|
-
const source = node._pendingSource ?? node._pendingSources?.values().next().value;
|
|
732
|
-
if (source) {
|
|
733
|
-
setPendingError(node, source);
|
|
734
|
-
updatePendingSignal(node);
|
|
735
|
-
} else {
|
|
736
|
-
node._statusFlags &= ~STATUS_PENDING;
|
|
737
|
-
setPendingError(node);
|
|
738
|
-
updatePendingSignal(node);
|
|
739
|
-
if (node._blocked) {
|
|
740
|
-
if (node._type === EFFECT_TRACKED) {
|
|
741
|
-
const tracked = node;
|
|
742
|
-
if (!tracked._modified) {
|
|
743
|
-
tracked._modified = true;
|
|
744
|
-
tracked._queue.enqueue(EFFECT_USER, tracked._run);
|
|
745
|
-
}
|
|
746
|
-
} else {
|
|
747
|
-
const queue = node._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
|
|
748
|
-
if (queue._min > node._height) queue._min = node._height;
|
|
749
|
-
insertIntoHeap(node, queue);
|
|
750
|
-
}
|
|
751
|
-
scheduled2 = true;
|
|
752
|
-
}
|
|
753
|
-
node._blocked = false;
|
|
754
|
-
}
|
|
755
|
-
forEachDependent(node, settle);
|
|
756
|
-
};
|
|
757
|
-
forEachDependent(el, settle);
|
|
758
|
-
if (scheduled2) schedule();
|
|
759
|
-
}
|
|
760
|
-
function handleAsync(el, result, setter) {
|
|
761
|
-
const isObject = typeof result === "object" && result !== null;
|
|
762
|
-
const iterator = isObject && untrack(() => result[Symbol.asyncIterator]);
|
|
763
|
-
const isThenable = !iterator && isObject && untrack(() => typeof result.then === "function");
|
|
764
|
-
if (!isThenable && !iterator) {
|
|
765
|
-
el._inFlight = null;
|
|
766
|
-
return result;
|
|
767
|
-
}
|
|
768
|
-
el._inFlight = result;
|
|
769
|
-
let syncValue;
|
|
770
|
-
const handleError = (error) => {
|
|
771
|
-
if (el._inFlight !== result) return;
|
|
772
|
-
globalQueue.initTransition(resolveTransition(el));
|
|
773
|
-
notifyStatus(el, error instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR, error);
|
|
774
|
-
el._time = clock;
|
|
775
|
-
};
|
|
776
|
-
const asyncWrite = (value, then) => {
|
|
777
|
-
if (el._inFlight !== result) return;
|
|
778
|
-
if (el._flags & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY)) return;
|
|
779
|
-
globalQueue.initTransition(resolveTransition(el));
|
|
780
|
-
clearStatus(el);
|
|
781
|
-
const lane = resolveLane(el);
|
|
782
|
-
if (lane) lane._pendingAsync.delete(el);
|
|
783
|
-
if (el._overrideValue !== void 0) {
|
|
784
|
-
if (el._overrideValue !== void 0 && el._overrideValue !== NOT_PENDING)
|
|
785
|
-
el._pendingValue = value;
|
|
786
|
-
else {
|
|
787
|
-
el._value = value;
|
|
788
|
-
insertSubs(el);
|
|
789
|
-
}
|
|
790
|
-
el._time = clock;
|
|
791
|
-
} else if (lane) {
|
|
792
|
-
const prevValue = el._value;
|
|
793
|
-
const equals = el._equals;
|
|
794
|
-
if (!equals || !equals(value, prevValue)) {
|
|
795
|
-
el._value = value;
|
|
796
|
-
el._time = clock;
|
|
797
|
-
if (el._latestValueComputed) {
|
|
798
|
-
setSignal(el._latestValueComputed, value);
|
|
799
|
-
}
|
|
800
|
-
insertSubs(el, true);
|
|
801
|
-
}
|
|
802
|
-
} else {
|
|
803
|
-
setSignal(el, () => value);
|
|
804
|
-
}
|
|
805
|
-
settlePendingSource(el);
|
|
806
|
-
schedule();
|
|
807
|
-
flush();
|
|
808
|
-
then?.();
|
|
809
|
-
};
|
|
810
|
-
if (isThenable) {
|
|
811
|
-
let resolved = false, isSync = true;
|
|
812
|
-
result.then(
|
|
813
|
-
(v) => {
|
|
814
|
-
if (isSync) {
|
|
815
|
-
syncValue = v;
|
|
816
|
-
resolved = true;
|
|
817
|
-
} else asyncWrite(v);
|
|
818
|
-
},
|
|
819
|
-
(e) => {
|
|
820
|
-
if (!isSync) handleError(e);
|
|
821
|
-
}
|
|
822
|
-
);
|
|
823
|
-
isSync = false;
|
|
824
|
-
if (!resolved) {
|
|
825
|
-
globalQueue.initTransition(resolveTransition(el));
|
|
826
|
-
throw new NotReadyError(context);
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
if (iterator) {
|
|
830
|
-
const it = result[Symbol.asyncIterator]();
|
|
831
|
-
let hadSyncValue = false;
|
|
832
|
-
let completed = false;
|
|
833
|
-
cleanup(() => {
|
|
834
|
-
if (completed) return;
|
|
835
|
-
completed = true;
|
|
836
|
-
try {
|
|
837
|
-
const returned = it.return?.();
|
|
838
|
-
if (returned && typeof returned.then === "function") {
|
|
839
|
-
returned.then(void 0, () => {
|
|
840
|
-
});
|
|
841
|
-
}
|
|
842
|
-
} catch {
|
|
843
|
-
}
|
|
844
|
-
});
|
|
845
|
-
const iterate = () => {
|
|
846
|
-
let syncResult, resolved = false, isSync = true;
|
|
847
|
-
it.next().then(
|
|
848
|
-
(r) => {
|
|
849
|
-
if (isSync) {
|
|
850
|
-
syncResult = r;
|
|
851
|
-
resolved = true;
|
|
852
|
-
if (r.done) completed = true;
|
|
853
|
-
} else if (el._inFlight !== result) {
|
|
854
|
-
return;
|
|
855
|
-
} else if (!r.done) asyncWrite(r.value, iterate);
|
|
856
|
-
else {
|
|
857
|
-
completed = true;
|
|
858
|
-
schedule();
|
|
859
|
-
flush();
|
|
860
|
-
}
|
|
861
|
-
},
|
|
862
|
-
(e) => {
|
|
863
|
-
if (!isSync && el._inFlight === result) {
|
|
864
|
-
completed = true;
|
|
865
|
-
handleError(e);
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
);
|
|
869
|
-
isSync = false;
|
|
870
|
-
if (resolved && !syncResult.done) {
|
|
871
|
-
syncValue = syncResult.value;
|
|
872
|
-
hadSyncValue = true;
|
|
873
|
-
return iterate();
|
|
874
|
-
}
|
|
875
|
-
return resolved && syncResult.done;
|
|
876
|
-
};
|
|
877
|
-
const immediatelyDone = iterate();
|
|
878
|
-
if (!hadSyncValue && !immediatelyDone) {
|
|
879
|
-
globalQueue.initTransition(resolveTransition(el));
|
|
880
|
-
throw new NotReadyError(context);
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
return syncValue;
|
|
884
|
-
}
|
|
885
|
-
function clearStatus(el, clearUninitialized = false) {
|
|
886
|
-
clearPendingSources(el);
|
|
887
|
-
el._blocked = false;
|
|
888
|
-
el._statusFlags = clearUninitialized ? 0 : el._statusFlags & STATUS_UNINITIALIZED;
|
|
889
|
-
setPendingError(el);
|
|
890
|
-
updatePendingSignal(el);
|
|
891
|
-
el._notifyStatus?.();
|
|
892
|
-
}
|
|
893
|
-
function notifyStatus(el, status, error, blockStatus, lane) {
|
|
894
|
-
if (status === STATUS_ERROR && !(error instanceof StatusError) && !(error instanceof NotReadyError))
|
|
895
|
-
error = new StatusError(el, error);
|
|
896
|
-
const pendingSource = status === STATUS_PENDING && error instanceof NotReadyError ? error.source : void 0;
|
|
897
|
-
const isSource = pendingSource === el;
|
|
898
|
-
const isOptimisticBoundary = status === STATUS_PENDING && el._overrideValue !== void 0 && !isSource;
|
|
899
|
-
const startsBlocking = isOptimisticBoundary && hasActiveOverride(el);
|
|
900
|
-
if (!blockStatus) {
|
|
901
|
-
if (status === STATUS_PENDING && pendingSource) {
|
|
902
|
-
addPendingSource(el, pendingSource);
|
|
903
|
-
el._statusFlags = STATUS_PENDING | el._statusFlags & STATUS_UNINITIALIZED;
|
|
904
|
-
setPendingError(el, pendingSource, error);
|
|
905
|
-
} else {
|
|
906
|
-
clearPendingSources(el);
|
|
907
|
-
el._statusFlags = status | (status !== STATUS_ERROR ? el._statusFlags & STATUS_UNINITIALIZED : 0);
|
|
908
|
-
el._error = error;
|
|
909
|
-
}
|
|
910
|
-
updatePendingSignal(el);
|
|
911
|
-
}
|
|
912
|
-
if (lane && !blockStatus) {
|
|
913
|
-
assignOrMergeLane(el, lane);
|
|
914
|
-
}
|
|
915
|
-
const downstreamBlockStatus = blockStatus || startsBlocking;
|
|
916
|
-
const downstreamLane = blockStatus || isOptimisticBoundary ? void 0 : lane;
|
|
917
|
-
if (el._notifyStatus) {
|
|
918
|
-
if (blockStatus && status === STATUS_PENDING) {
|
|
919
|
-
return;
|
|
920
|
-
}
|
|
921
|
-
if (downstreamBlockStatus) {
|
|
922
|
-
el._notifyStatus(status, error);
|
|
923
|
-
} else {
|
|
924
|
-
el._notifyStatus();
|
|
925
|
-
}
|
|
926
|
-
return;
|
|
927
|
-
}
|
|
928
|
-
forEachDependent(el, (sub) => {
|
|
929
|
-
sub._time = clock;
|
|
930
|
-
if (status === STATUS_PENDING && pendingSource && sub._pendingSource !== pendingSource && !sub._pendingSources?.has(pendingSource) || status !== STATUS_PENDING && (sub._error !== error || sub._pendingSource || sub._pendingSources)) {
|
|
931
|
-
if (!downstreamBlockStatus && !sub._transition) globalQueue._pendingNodes.push(sub);
|
|
932
|
-
notifyStatus(sub, status, error, downstreamBlockStatus, downstreamLane);
|
|
933
|
-
}
|
|
934
|
-
});
|
|
935
|
-
}
|
|
936
|
-
var externalSourceConfig = null;
|
|
937
|
-
GlobalQueue._update = recompute;
|
|
938
|
-
GlobalQueue._dispose = disposeChildren;
|
|
939
|
-
var tracking = false;
|
|
940
|
-
var context = null;
|
|
941
|
-
var currentOptimisticLane = null;
|
|
942
|
-
function recompute(el, create = false) {
|
|
943
|
-
const isEffect = el._type;
|
|
944
|
-
if (!create) {
|
|
945
|
-
if (el._transition && (!isEffect || activeTransition) && activeTransition !== el._transition)
|
|
946
|
-
globalQueue.initTransition(el._transition);
|
|
947
|
-
deleteFromHeap(el, el._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
948
|
-
el._inFlight = null;
|
|
949
|
-
if (el._transition || isEffect === EFFECT_TRACKED) disposeChildren(el);
|
|
950
|
-
else {
|
|
951
|
-
markDisposal(el);
|
|
952
|
-
el._pendingDisposal = el._disposal;
|
|
953
|
-
el._pendingFirstChild = el._firstChild;
|
|
954
|
-
el._disposal = null;
|
|
955
|
-
el._firstChild = null;
|
|
956
|
-
el._childCount = 0;
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
const isOptimisticDirty = !!(el._flags & REACTIVE_OPTIMISTIC_DIRTY);
|
|
960
|
-
const hasOverride = el._overrideValue !== void 0 && el._overrideValue !== NOT_PENDING;
|
|
961
|
-
const wasPending = !!(el._statusFlags & STATUS_PENDING);
|
|
962
|
-
const oldcontext = context;
|
|
963
|
-
context = el;
|
|
964
|
-
el._depsTail = null;
|
|
965
|
-
el._flags = REACTIVE_RECOMPUTING_DEPS;
|
|
966
|
-
el._time = clock;
|
|
967
|
-
let value = el._pendingValue === NOT_PENDING ? el._value : el._pendingValue;
|
|
968
|
-
let oldHeight = el._height;
|
|
969
|
-
let prevTracking = tracking;
|
|
970
|
-
let prevLane = currentOptimisticLane;
|
|
971
|
-
let prevStrictRead = false;
|
|
972
|
-
{
|
|
973
|
-
prevStrictRead = strictRead;
|
|
974
|
-
strictRead = false;
|
|
975
|
-
}
|
|
976
|
-
tracking = true;
|
|
977
|
-
if (isOptimisticDirty) {
|
|
978
|
-
const lane = resolveLane(el);
|
|
979
|
-
if (lane) currentOptimisticLane = lane;
|
|
980
|
-
}
|
|
981
|
-
try {
|
|
982
|
-
value = handleAsync(el, el._fn(value));
|
|
983
|
-
clearStatus(el, create);
|
|
984
|
-
const resolvedLane = resolveLane(el);
|
|
985
|
-
if (resolvedLane) {
|
|
986
|
-
resolvedLane._pendingAsync.delete(el);
|
|
987
|
-
updatePendingSignal(resolvedLane._source);
|
|
988
|
-
}
|
|
989
|
-
} catch (e) {
|
|
990
|
-
if (e instanceof NotReadyError && currentOptimisticLane) {
|
|
991
|
-
const lane = findLane(currentOptimisticLane);
|
|
992
|
-
if (lane._source !== el) {
|
|
993
|
-
lane._pendingAsync.add(el);
|
|
994
|
-
el._optimisticLane = lane;
|
|
995
|
-
updatePendingSignal(lane._source);
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
if (e instanceof NotReadyError) el._blocked = true;
|
|
999
|
-
notifyStatus(
|
|
1000
|
-
el,
|
|
1001
|
-
e instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR,
|
|
1002
|
-
e,
|
|
1003
|
-
void 0,
|
|
1004
|
-
e instanceof NotReadyError ? el._optimisticLane : void 0
|
|
1005
|
-
);
|
|
1006
|
-
} finally {
|
|
1007
|
-
tracking = prevTracking;
|
|
1008
|
-
strictRead = prevStrictRead;
|
|
1009
|
-
el._flags = REACTIVE_NONE | (create ? el._flags & REACTIVE_SNAPSHOT_STALE : 0);
|
|
1010
|
-
context = oldcontext;
|
|
1011
|
-
}
|
|
1012
|
-
if (!el._error) {
|
|
1013
|
-
const depsTail = el._depsTail;
|
|
1014
|
-
let toRemove = depsTail !== null ? depsTail._nextDep : el._deps;
|
|
1015
|
-
if (toRemove !== null) {
|
|
1016
|
-
do {
|
|
1017
|
-
toRemove = unlinkSubs(toRemove);
|
|
1018
|
-
} while (toRemove !== null);
|
|
1019
|
-
if (depsTail !== null) depsTail._nextDep = null;
|
|
1020
|
-
else el._deps = null;
|
|
1021
|
-
}
|
|
1022
|
-
const compareValue = hasOverride ? el._overrideValue : el._pendingValue === NOT_PENDING ? el._value : el._pendingValue;
|
|
1023
|
-
const valueChanged = !el._equals || !el._equals(compareValue, value);
|
|
1024
|
-
if (valueChanged) {
|
|
1025
|
-
const prevVisible = hasOverride ? el._overrideValue : void 0;
|
|
1026
|
-
if (create || isEffect && activeTransition !== el._transition || isOptimisticDirty) {
|
|
1027
|
-
el._value = value;
|
|
1028
|
-
if (hasOverride && isOptimisticDirty) {
|
|
1029
|
-
el._overrideValue = value;
|
|
1030
|
-
el._pendingValue = value;
|
|
1031
|
-
}
|
|
1032
|
-
} else el._pendingValue = value;
|
|
1033
|
-
if (hasOverride && !isOptimisticDirty && wasPending && !el._overrideSinceLane)
|
|
1034
|
-
el._overrideValue = value;
|
|
1035
|
-
if (!hasOverride || isOptimisticDirty || el._overrideValue !== prevVisible)
|
|
1036
|
-
insertSubs(el, isOptimisticDirty || hasOverride);
|
|
1037
|
-
} else if (hasOverride) {
|
|
1038
|
-
el._pendingValue = value;
|
|
1039
|
-
} else if (el._height != oldHeight) {
|
|
1040
|
-
for (let s = el._subs; s !== null; s = s._nextSub) {
|
|
1041
|
-
insertIntoHeapHeight(s._sub, s._sub._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
1042
|
-
}
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
currentOptimisticLane = prevLane;
|
|
1046
|
-
(!create || el._statusFlags & STATUS_PENDING) && !el._transition && !(activeTransition && hasOverride) && globalQueue._pendingNodes.push(el);
|
|
1047
|
-
el._transition && isEffect && activeTransition !== el._transition && runInTransition(el._transition, () => recompute(el));
|
|
1048
|
-
}
|
|
1049
|
-
var strictRead = false;
|
|
1050
|
-
function untrack(fn, strictReadLabel) {
|
|
1051
|
-
if (!externalSourceConfig && !tracking && !strictRead && true) return fn();
|
|
1052
|
-
const prevTracking = tracking;
|
|
1053
|
-
const prevStrictRead = strictRead;
|
|
1054
|
-
tracking = false;
|
|
1055
|
-
strictRead = false;
|
|
1056
|
-
try {
|
|
1057
|
-
if (externalSourceConfig) return externalSourceConfig.untrack(fn);
|
|
1058
|
-
return fn();
|
|
1059
|
-
} finally {
|
|
1060
|
-
tracking = prevTracking;
|
|
1061
|
-
strictRead = prevStrictRead;
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
function setSignal(el, v) {
|
|
1065
|
-
if (!el._pureWrite && !context?._childrenForbidden && context && el._firewall !== context)
|
|
1066
|
-
console.warn("A Signal was written to in an owned scope.");
|
|
1067
|
-
if (el._transition && activeTransition !== el._transition)
|
|
1068
|
-
globalQueue.initTransition(el._transition);
|
|
1069
|
-
const isOptimistic = el._overrideValue !== void 0 && !projectionWriteActive;
|
|
1070
|
-
const hasOverride = el._overrideValue !== void 0 && el._overrideValue !== NOT_PENDING;
|
|
1071
|
-
const currentValue = isOptimistic ? hasOverride ? el._overrideValue : el._value : el._pendingValue === NOT_PENDING ? el._value : el._pendingValue;
|
|
1072
|
-
if (typeof v === "function") v = v(currentValue);
|
|
1073
|
-
const valueChanged = !el._equals || !el._equals(currentValue, v) || !!(el._statusFlags & STATUS_UNINITIALIZED);
|
|
1074
|
-
if (!valueChanged) {
|
|
1075
|
-
if (isOptimistic && hasOverride && el._fn) {
|
|
1076
|
-
insertSubs(el, true);
|
|
1077
|
-
schedule();
|
|
1078
|
-
}
|
|
1079
|
-
return v;
|
|
1080
|
-
}
|
|
1081
|
-
if (isOptimistic) {
|
|
1082
|
-
const firstOverride = el._overrideValue === NOT_PENDING;
|
|
1083
|
-
if (!firstOverride) globalQueue.initTransition(resolveTransition(el));
|
|
1084
|
-
if (firstOverride) {
|
|
1085
|
-
el._pendingValue = el._value;
|
|
1086
|
-
globalQueue._optimisticNodes.push(el);
|
|
1087
|
-
}
|
|
1088
|
-
el._overrideSinceLane = true;
|
|
1089
|
-
const lane = getOrCreateLane(el);
|
|
1090
|
-
el._optimisticLane = lane;
|
|
1091
|
-
el._overrideValue = v;
|
|
1092
|
-
} else {
|
|
1093
|
-
if (el._pendingValue === NOT_PENDING) globalQueue._pendingNodes.push(el);
|
|
1094
|
-
el._pendingValue = v;
|
|
1095
|
-
}
|
|
1096
|
-
updatePendingSignal(el);
|
|
1097
|
-
if (el._latestValueComputed) {
|
|
1098
|
-
setSignal(el._latestValueComputed, v);
|
|
1099
|
-
}
|
|
1100
|
-
el._time = clock;
|
|
1101
|
-
insertSubs(el, isOptimistic);
|
|
1102
|
-
schedule();
|
|
1103
|
-
return v;
|
|
1104
|
-
}
|
|
1105
|
-
function computePendingState(el) {
|
|
1106
|
-
const comp = el;
|
|
1107
|
-
const firewall = el._firewall;
|
|
1108
|
-
if (firewall && el._pendingValue !== NOT_PENDING) {
|
|
1109
|
-
return !firewall._inFlight && !(firewall._statusFlags & STATUS_PENDING);
|
|
1110
|
-
}
|
|
1111
|
-
if (el._overrideValue !== void 0 && el._overrideValue !== NOT_PENDING) {
|
|
1112
|
-
if (comp._statusFlags & STATUS_PENDING && !(comp._statusFlags & STATUS_UNINITIALIZED))
|
|
1113
|
-
return true;
|
|
1114
|
-
if (el._parentSource) {
|
|
1115
|
-
const lane = el._optimisticLane ? findLane(el._optimisticLane) : null;
|
|
1116
|
-
return !!(lane && lane._pendingAsync.size > 0);
|
|
1117
|
-
}
|
|
1118
|
-
return true;
|
|
1119
|
-
}
|
|
1120
|
-
if (el._overrideValue !== void 0 && el._overrideValue === NOT_PENDING && !el._parentSource) {
|
|
1121
|
-
return false;
|
|
1122
|
-
}
|
|
1123
|
-
if (el._pendingValue !== NOT_PENDING && !(comp._statusFlags & STATUS_UNINITIALIZED)) return true;
|
|
1124
|
-
return !!(comp._statusFlags & STATUS_PENDING && !(comp._statusFlags & STATUS_UNINITIALIZED));
|
|
1125
|
-
}
|
|
1126
|
-
function updatePendingSignal(el) {
|
|
1127
|
-
if (el._pendingSignal) {
|
|
1128
|
-
const pending = computePendingState(el);
|
|
1129
|
-
const sig = el._pendingSignal;
|
|
1130
|
-
setSignal(sig, pending);
|
|
1131
|
-
if (!pending && sig._optimisticLane) {
|
|
1132
|
-
const sourceLane = resolveLane(el);
|
|
1133
|
-
if (sourceLane && sourceLane._pendingAsync.size > 0) {
|
|
1134
|
-
const sigLane = findLane(sig._optimisticLane);
|
|
1135
|
-
if (sigLane !== sourceLane) {
|
|
1136
|
-
mergeLanes(sourceLane, sigLane);
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
signalLanes.delete(sig);
|
|
1140
|
-
sig._optimisticLane = void 0;
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
}
|
|
1144
|
-
function isWrappable(obj) {
|
|
1145
|
-
return obj != null && typeof obj === "object" && !Object.isFrozen(obj) && !(typeof Node !== "undefined" && obj instanceof Node);
|
|
1146
|
-
}
|
|
1147
|
-
var DELETE = /* @__PURE__ */ Symbol("STORE_PATH_DELETE");
|
|
1148
|
-
function updatePath(current, args, i = 0) {
|
|
1149
|
-
let part, prev = current;
|
|
1150
|
-
if (i < args.length - 1) {
|
|
1151
|
-
part = args[i];
|
|
1152
|
-
const partType = typeof part;
|
|
1153
|
-
const isArray = Array.isArray(current);
|
|
1154
|
-
if (Array.isArray(part)) {
|
|
1155
|
-
for (let j = 0; j < part.length; j++) {
|
|
1156
|
-
args[i] = part[j];
|
|
1157
|
-
updatePath(current, args, i);
|
|
1158
|
-
}
|
|
1159
|
-
args[i] = part;
|
|
1160
|
-
return;
|
|
1161
|
-
} else if (isArray && partType === "function") {
|
|
1162
|
-
for (let j = 0; j < current.length; j++) {
|
|
1163
|
-
if (part(current[j], j)) {
|
|
1164
|
-
args[i] = j;
|
|
1165
|
-
updatePath(current, args, i);
|
|
1166
|
-
}
|
|
1167
|
-
}
|
|
1168
|
-
args[i] = part;
|
|
1169
|
-
return;
|
|
1170
|
-
} else if (isArray && partType === "object") {
|
|
1171
|
-
const { from = 0, to = current.length - 1, by = 1 } = part;
|
|
1172
|
-
for (let j = from; j <= to; j += by) {
|
|
1173
|
-
args[i] = j;
|
|
1174
|
-
updatePath(current, args, i);
|
|
1175
|
-
}
|
|
1176
|
-
args[i] = part;
|
|
1177
|
-
return;
|
|
1178
|
-
} else if (i < args.length - 2) {
|
|
1179
|
-
updatePath(current[part], args, i + 1);
|
|
1180
|
-
return;
|
|
1181
|
-
}
|
|
1182
|
-
prev = current[part];
|
|
1183
|
-
}
|
|
1184
|
-
let value = args[args.length - 1];
|
|
1185
|
-
if (typeof value === "function") {
|
|
1186
|
-
value = value(prev);
|
|
1187
|
-
if (value === prev) return;
|
|
1188
|
-
}
|
|
1189
|
-
if (part === void 0 && value == void 0) return;
|
|
1190
|
-
if (value === DELETE) {
|
|
1191
|
-
delete current[part];
|
|
1192
|
-
} else if (part === void 0 || isWrappable(prev) && isWrappable(value) && !Array.isArray(value)) {
|
|
1193
|
-
const target = part !== void 0 ? current[part] : current;
|
|
1194
|
-
const keys = Object.keys(value);
|
|
1195
|
-
for (let i2 = 0; i2 < keys.length; i2++) target[keys[i2]] = value[keys[i2]];
|
|
1196
|
-
} else {
|
|
1197
|
-
current[part] = value;
|
|
1198
|
-
}
|
|
1199
|
-
}
|
|
1200
|
-
Object.assign(
|
|
1201
|
-
function storePath2(...args) {
|
|
1202
|
-
return (state) => {
|
|
1203
|
-
updatePath(state, args);
|
|
1204
|
-
};
|
|
1205
|
-
},
|
|
1206
|
-
{ DELETE }
|
|
1207
|
-
);
|
|
1208
|
-
|
|
1209
|
-
// ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.4_@solidjs+signals@0.13.9_solid-js@2.0.0-beta.5/node_modules/@solidjs/web/dist/dev.js
|
|
1210
|
-
var effect = (fn, effectFn, initial) => createRenderEffect(fn, effectFn, initial, {
|
|
1211
|
-
transparent: true
|
|
1212
|
-
});
|
|
1213
|
-
function template(html, isImportNode, isSVG, isMathML) {
|
|
1214
|
-
let node;
|
|
1215
|
-
const create = (bypassGuard) => {
|
|
1216
|
-
if (isHydrating() && !bypassGuard) throw new Error("Failed attempt to create new DOM elements during hydration. Check that the libraries you are using support hydration.");
|
|
1217
|
-
const t = isMathML ? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template") : document.createElement("template");
|
|
1218
|
-
t.innerHTML = html;
|
|
1219
|
-
return isSVG ? t.content.firstChild.firstChild : isMathML ? t.firstChild : t.content.firstChild;
|
|
1220
|
-
};
|
|
1221
|
-
const fn = isImportNode ? (bypassGuard) => untrack$1(() => document.importNode(node || (node = create(bypassGuard)), true)) : (bypassGuard) => (node || (node = create(bypassGuard))).cloneNode(true);
|
|
1222
|
-
fn._html = html;
|
|
1223
|
-
return fn;
|
|
1224
|
-
}
|
|
1225
|
-
function setAttribute(node, name, value) {
|
|
1226
|
-
if (isHydrating(node)) return;
|
|
1227
|
-
node.removeAttribute(name);
|
|
1228
|
-
}
|
|
1229
|
-
function style(node, value, prev) {
|
|
1230
|
-
if (!value) {
|
|
1231
|
-
if (prev) setAttribute(node, "style");
|
|
1232
|
-
return;
|
|
1233
|
-
}
|
|
1234
|
-
const nodeStyle = node.style;
|
|
1235
|
-
if (typeof value === "string") return nodeStyle.cssText = value;
|
|
1236
|
-
typeof prev === "string" && (nodeStyle.cssText = prev = void 0);
|
|
1237
|
-
prev || (prev = {});
|
|
1238
|
-
value || (value = {});
|
|
1239
|
-
let v, s;
|
|
1240
|
-
for (s in value) {
|
|
1241
|
-
v = value[s];
|
|
1242
|
-
if (v !== prev[s]) nodeStyle.setProperty(s, v);
|
|
1243
|
-
delete prev[s];
|
|
1244
|
-
}
|
|
1245
|
-
for (s in prev) value[s] == null && nodeStyle.removeProperty(s);
|
|
1246
|
-
}
|
|
1247
|
-
function applyRef(r, element) {
|
|
1248
|
-
Array.isArray(r) ? r.flat(Infinity).forEach((f) => f && f(element)) : r(element);
|
|
1249
|
-
}
|
|
1250
|
-
function ref(fn, element) {
|
|
1251
|
-
const resolved = untrack$1(fn);
|
|
1252
|
-
runWithOwner(null, () => applyRef(resolved, element));
|
|
1253
|
-
}
|
|
1254
|
-
function isHydrating(node) {
|
|
1255
|
-
return sharedConfig.hydrating && (!node || node.isConnected);
|
|
1256
|
-
}
|
|
1257
|
-
var isServer = false;
|
|
1258
|
-
var isDev = true;
|
|
1259
|
-
|
|
1260
|
-
export { effect, isDev, isServer, ref, style, template };
|