react-dom 19.1.0-canary-cbbe8666-20250213 → 19.1.0-canary-32b0cad8-20250213
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/cjs/react-dom-client.development.js +399 -310
- package/cjs/react-dom-client.production.js +5 -5
- package/cjs/react-dom-profiling.development.js +399 -310
- package/cjs/react-dom-profiling.profiling.js +5 -5
- package/cjs/react-dom-server-legacy.browser.development.js +589 -432
- package/cjs/react-dom-server-legacy.browser.production.js +1 -1
- package/cjs/react-dom-server-legacy.node.development.js +589 -432
- package/cjs/react-dom-server-legacy.node.production.js +1 -1
- package/cjs/react-dom-server.browser.development.js +588 -431
- package/cjs/react-dom-server.browser.production.js +3 -3
- package/cjs/react-dom-server.bun.development.js +569 -428
- package/cjs/react-dom-server.bun.production.js +3 -3
- package/cjs/react-dom-server.edge.development.js +588 -431
- package/cjs/react-dom-server.edge.production.js +3 -3
- package/cjs/react-dom-server.node.development.js +588 -431
- package/cjs/react-dom-server.node.production.js +3 -3
- package/cjs/react-dom.development.js +1 -1
- package/cjs/react-dom.production.js +1 -1
- package/cjs/react-dom.react-server.development.js +1 -1
- package/cjs/react-dom.react-server.production.js +1 -1
- package/package.json +3 -3
@@ -4322,6 +4322,27 @@
|
|
4322
4322
|
"function" === typeof fn && componentFrameCache.set(fn, sampleLines);
|
4323
4323
|
return sampleLines;
|
4324
4324
|
}
|
4325
|
+
function formatOwnerStack(error) {
|
4326
|
+
var prevPrepareStackTrace = Error.prepareStackTrace;
|
4327
|
+
Error.prepareStackTrace = void 0;
|
4328
|
+
error = error.stack;
|
4329
|
+
Error.prepareStackTrace = prevPrepareStackTrace;
|
4330
|
+
error.startsWith("Error: react-stack-top-frame\n") &&
|
4331
|
+
(error = error.slice(29));
|
4332
|
+
prevPrepareStackTrace = error.indexOf("\n");
|
4333
|
+
-1 !== prevPrepareStackTrace &&
|
4334
|
+
(error = error.slice(prevPrepareStackTrace + 1));
|
4335
|
+
prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
|
4336
|
+
-1 !== prevPrepareStackTrace &&
|
4337
|
+
(prevPrepareStackTrace = error.lastIndexOf(
|
4338
|
+
"\n",
|
4339
|
+
prevPrepareStackTrace
|
4340
|
+
));
|
4341
|
+
if (-1 !== prevPrepareStackTrace)
|
4342
|
+
error = error.slice(0, prevPrepareStackTrace);
|
4343
|
+
else return "";
|
4344
|
+
return error;
|
4345
|
+
}
|
4325
4346
|
function describeComponentStackByType(type) {
|
4326
4347
|
if ("string" === typeof type) return describeBuiltInComponentFrame(type);
|
4327
4348
|
if ("function" === typeof type)
|
@@ -4361,18 +4382,6 @@
|
|
4361
4382
|
}
|
4362
4383
|
return "";
|
4363
4384
|
}
|
4364
|
-
function getStackByComponentStackNode(componentStack) {
|
4365
|
-
try {
|
4366
|
-
var info = "";
|
4367
|
-
do
|
4368
|
-
(info += describeComponentStackByType(componentStack.type)),
|
4369
|
-
(componentStack = componentStack.parent);
|
4370
|
-
while (componentStack);
|
4371
|
-
return info;
|
4372
|
-
} catch (x) {
|
4373
|
-
return "\nError generating stack: " + x.message + "\n" + x.stack;
|
4374
|
-
}
|
4375
|
-
}
|
4376
4385
|
function defaultErrorHandler(error) {
|
4377
4386
|
if (
|
4378
4387
|
"object" === typeof error &&
|
@@ -4496,7 +4505,9 @@
|
|
4496
4505
|
null,
|
4497
4506
|
emptyTreeContext,
|
4498
4507
|
null,
|
4499
|
-
!1
|
4508
|
+
!1,
|
4509
|
+
emptyContextObject,
|
4510
|
+
null
|
4500
4511
|
);
|
4501
4512
|
pushComponentStack(children);
|
4502
4513
|
resumableState.pingedTasks.push(children);
|
@@ -4589,7 +4600,9 @@
|
|
4589
4600
|
context,
|
4590
4601
|
treeContext,
|
4591
4602
|
componentStack,
|
4592
|
-
isFallback
|
4603
|
+
isFallback,
|
4604
|
+
legacyContext,
|
4605
|
+
debugTask
|
4593
4606
|
) {
|
4594
4607
|
request.allPendingTasks++;
|
4595
4608
|
null === blockedBoundary
|
@@ -4615,6 +4628,7 @@
|
|
4615
4628
|
thenableState: thenableState,
|
4616
4629
|
isFallback: isFallback
|
4617
4630
|
};
|
4631
|
+
task.debugTask = debugTask;
|
4618
4632
|
abortSet.add(task);
|
4619
4633
|
return task;
|
4620
4634
|
}
|
@@ -4632,7 +4646,9 @@
|
|
4632
4646
|
context,
|
4633
4647
|
treeContext,
|
4634
4648
|
componentStack,
|
4635
|
-
isFallback
|
4649
|
+
isFallback,
|
4650
|
+
legacyContext,
|
4651
|
+
debugTask
|
4636
4652
|
) {
|
4637
4653
|
request.allPendingTasks++;
|
4638
4654
|
null === blockedBoundary
|
@@ -4659,6 +4675,7 @@
|
|
4659
4675
|
thenableState: thenableState,
|
4660
4676
|
isFallback: isFallback
|
4661
4677
|
};
|
4678
|
+
task.debugTask = debugTask;
|
4662
4679
|
abortSet.add(task);
|
4663
4680
|
return task;
|
4664
4681
|
}
|
@@ -4685,22 +4702,63 @@
|
|
4685
4702
|
};
|
4686
4703
|
}
|
4687
4704
|
function getCurrentStackInDEV() {
|
4688
|
-
|
4689
|
-
|
4690
|
-
|
4691
|
-
|
4705
|
+
if (null === currentTaskInDEV || null === currentTaskInDEV.componentStack)
|
4706
|
+
return "";
|
4707
|
+
var componentStack = currentTaskInDEV.componentStack;
|
4708
|
+
try {
|
4709
|
+
var info = "";
|
4710
|
+
if ("string" === typeof componentStack.type)
|
4711
|
+
info += describeBuiltInComponentFrame(componentStack.type);
|
4712
|
+
else if ("function" === typeof componentStack.type) {
|
4713
|
+
if (!componentStack.owner) {
|
4714
|
+
var JSCompiler_temp_const = info,
|
4715
|
+
fn = componentStack.type,
|
4716
|
+
name = fn ? fn.displayName || fn.name : "";
|
4717
|
+
var JSCompiler_inline_result = name
|
4718
|
+
? describeBuiltInComponentFrame(name)
|
4719
|
+
: "";
|
4720
|
+
info = JSCompiler_temp_const + JSCompiler_inline_result;
|
4721
|
+
}
|
4722
|
+
} else
|
4723
|
+
componentStack.owner ||
|
4724
|
+
(info += describeComponentStackByType(componentStack.type));
|
4725
|
+
for (; componentStack; )
|
4726
|
+
(JSCompiler_temp_const = null),
|
4727
|
+
null != componentStack.debugStack
|
4728
|
+
? (JSCompiler_temp_const = formatOwnerStack(
|
4729
|
+
componentStack.debugStack
|
4730
|
+
))
|
4731
|
+
: ((JSCompiler_inline_result = componentStack),
|
4732
|
+
null != JSCompiler_inline_result.stack &&
|
4733
|
+
(JSCompiler_temp_const =
|
4734
|
+
"string" !== typeof JSCompiler_inline_result.stack
|
4735
|
+
? (JSCompiler_inline_result.stack = formatOwnerStack(
|
4736
|
+
JSCompiler_inline_result.stack
|
4737
|
+
))
|
4738
|
+
: JSCompiler_inline_result.stack)),
|
4739
|
+
(componentStack = componentStack.owner) &&
|
4740
|
+
JSCompiler_temp_const &&
|
4741
|
+
(info += "\n" + JSCompiler_temp_const);
|
4742
|
+
var JSCompiler_inline_result$jscomp$0 = info;
|
4743
|
+
} catch (x) {
|
4744
|
+
JSCompiler_inline_result$jscomp$0 =
|
4745
|
+
"\nError generating stack: " + x.message + "\n" + x.stack;
|
4746
|
+
}
|
4747
|
+
return JSCompiler_inline_result$jscomp$0;
|
4692
4748
|
}
|
4693
4749
|
function pushServerComponentStack(task, debugInfo) {
|
4694
4750
|
if (null != debugInfo)
|
4695
4751
|
for (var i = 0; i < debugInfo.length; i++) {
|
4696
4752
|
var componentInfo = debugInfo[i];
|
4697
4753
|
"string" === typeof componentInfo.name &&
|
4698
|
-
|
4754
|
+
void 0 !== componentInfo.debugStack &&
|
4755
|
+
((task.componentStack = {
|
4699
4756
|
parent: task.componentStack,
|
4700
4757
|
type: componentInfo,
|
4701
4758
|
owner: componentInfo.owner,
|
4702
|
-
stack:
|
4703
|
-
})
|
4759
|
+
stack: componentInfo.debugStack
|
4760
|
+
}),
|
4761
|
+
(task.debugTask = componentInfo.debugTask));
|
4704
4762
|
}
|
4705
4763
|
}
|
4706
4764
|
function pushComponentStack(task) {
|
@@ -4709,13 +4767,15 @@
|
|
4709
4767
|
switch (node.$$typeof) {
|
4710
4768
|
case REACT_ELEMENT_TYPE:
|
4711
4769
|
var type = node.type,
|
4712
|
-
owner = node._owner
|
4770
|
+
owner = node._owner,
|
4771
|
+
stack = node._debugStack;
|
4713
4772
|
pushServerComponentStack(task, node._debugInfo);
|
4773
|
+
task.debugTask = node._debugTask;
|
4714
4774
|
task.componentStack = {
|
4715
4775
|
parent: task.componentStack,
|
4716
4776
|
type: type,
|
4717
4777
|
owner: owner,
|
4718
|
-
stack:
|
4778
|
+
stack: stack
|
4719
4779
|
};
|
4720
4780
|
break;
|
4721
4781
|
case REACT_LAZY_TYPE:
|
@@ -4726,14 +4786,24 @@
|
|
4726
4786
|
pushServerComponentStack(task, node._debugInfo);
|
4727
4787
|
}
|
4728
4788
|
}
|
4729
|
-
function getThrownInfo(node) {
|
4789
|
+
function getThrownInfo(node$jscomp$0) {
|
4730
4790
|
var errorInfo = {};
|
4731
|
-
node &&
|
4791
|
+
node$jscomp$0 &&
|
4732
4792
|
Object.defineProperty(errorInfo, "componentStack", {
|
4733
4793
|
configurable: !0,
|
4734
4794
|
enumerable: !0,
|
4735
4795
|
get: function () {
|
4736
|
-
|
4796
|
+
try {
|
4797
|
+
var info = "",
|
4798
|
+
node = node$jscomp$0;
|
4799
|
+
do
|
4800
|
+
(info += describeComponentStackByType(node.type)),
|
4801
|
+
(node = node.parent);
|
4802
|
+
while (node);
|
4803
|
+
var stack = info;
|
4804
|
+
} catch (x) {
|
4805
|
+
stack = "\nError generating stack: " + x.message + "\n" + x.stack;
|
4806
|
+
}
|
4737
4807
|
Object.defineProperty(errorInfo, "componentStack", {
|
4738
4808
|
value: stack
|
4739
4809
|
});
|
@@ -4764,9 +4834,11 @@
|
|
4764
4834
|
boundary.errorStack = null !== error ? wasAborted + error : null;
|
4765
4835
|
boundary.errorComponentStack = thrownInfo.componentStack;
|
4766
4836
|
}
|
4767
|
-
function logRecoverableError(request, error, errorInfo) {
|
4837
|
+
function logRecoverableError(request, error, errorInfo, debugTask) {
|
4768
4838
|
request = request.onError;
|
4769
|
-
error =
|
4839
|
+
error = debugTask
|
4840
|
+
? debugTask.run(request.bind(null, error, errorInfo))
|
4841
|
+
: request(error, errorInfo);
|
4770
4842
|
if (null != error && "string" !== typeof error)
|
4771
4843
|
console.error(
|
4772
4844
|
'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "%s" instead',
|
@@ -4774,11 +4846,13 @@
|
|
4774
4846
|
);
|
4775
4847
|
else return error;
|
4776
4848
|
}
|
4777
|
-
function fatalError(request, error) {
|
4778
|
-
|
4779
|
-
|
4780
|
-
|
4781
|
-
|
4849
|
+
function fatalError(request, error, errorInfo, debugTask) {
|
4850
|
+
errorInfo = request.onShellError;
|
4851
|
+
var onFatalError = request.onFatalError;
|
4852
|
+
debugTask
|
4853
|
+
? (debugTask.run(errorInfo.bind(null, error)),
|
4854
|
+
debugTask.run(onFatalError.bind(null, error)))
|
4855
|
+
: (errorInfo(error), onFatalError(error));
|
4782
4856
|
null !== request.destination
|
4783
4857
|
? ((request.status = CLOSED),
|
4784
4858
|
closeWithError(request.destination, error))
|
@@ -5359,7 +5433,9 @@
|
|
5359
5433
|
task.context,
|
5360
5434
|
task.treeContext,
|
5361
5435
|
task.componentStack,
|
5362
|
-
task.isFallback
|
5436
|
+
task.isFallback,
|
5437
|
+
emptyContextObject,
|
5438
|
+
task.debugTask
|
5363
5439
|
);
|
5364
5440
|
pushComponentStack(preambleTask);
|
5365
5441
|
request.pingedTasks.push(preambleTask);
|
@@ -5544,7 +5620,9 @@
|
|
5544
5620
|
task.context,
|
5545
5621
|
task.treeContext,
|
5546
5622
|
task.componentStack,
|
5547
|
-
task.isFallback
|
5623
|
+
task.isFallback,
|
5624
|
+
emptyContextObject,
|
5625
|
+
task.debugTask
|
5548
5626
|
);
|
5549
5627
|
pushComponentStack(suspendedPrimaryTask);
|
5550
5628
|
request.pingedTasks.push(suspendedPrimaryTask);
|
@@ -5583,7 +5661,8 @@
|
|
5583
5661
|
var errorDigest = logRecoverableError(
|
5584
5662
|
request,
|
5585
5663
|
error,
|
5586
|
-
thrownInfo
|
5664
|
+
thrownInfo,
|
5665
|
+
task.debugTask
|
5587
5666
|
);
|
5588
5667
|
encodeErrorForBoundary(
|
5589
5668
|
newBoundary,
|
@@ -5615,7 +5694,9 @@
|
|
5615
5694
|
task.context,
|
5616
5695
|
task.treeContext,
|
5617
5696
|
task.componentStack,
|
5618
|
-
!0
|
5697
|
+
!0,
|
5698
|
+
emptyContextObject,
|
5699
|
+
task.debugTask
|
5619
5700
|
);
|
5620
5701
|
pushComponentStack(suspendedFallbackTask);
|
5621
5702
|
request.pingedTasks.push(suspendedFallbackTask);
|
@@ -5767,15 +5848,183 @@
|
|
5767
5848
|
(task.replay = prevReplay), (task.blockedSegment = null);
|
5768
5849
|
}
|
5769
5850
|
}
|
5851
|
+
function replayElement(
|
5852
|
+
request,
|
5853
|
+
task,
|
5854
|
+
keyPath,
|
5855
|
+
name,
|
5856
|
+
keyOrIndex,
|
5857
|
+
childIndex,
|
5858
|
+
type,
|
5859
|
+
props,
|
5860
|
+
ref,
|
5861
|
+
replay
|
5862
|
+
) {
|
5863
|
+
childIndex = replay.nodes;
|
5864
|
+
for (var i = 0; i < childIndex.length; i++) {
|
5865
|
+
var node = childIndex[i];
|
5866
|
+
if (keyOrIndex === node[1]) {
|
5867
|
+
if (4 === node.length) {
|
5868
|
+
if (null !== name && name !== node[0])
|
5869
|
+
throw Error(
|
5870
|
+
"Expected the resume to render <" +
|
5871
|
+
node[0] +
|
5872
|
+
"> in this slot but instead it rendered <" +
|
5873
|
+
name +
|
5874
|
+
">. The tree doesn't match so React will fallback to client rendering."
|
5875
|
+
);
|
5876
|
+
var childNodes = node[2];
|
5877
|
+
node = node[3];
|
5878
|
+
name = task.node;
|
5879
|
+
task.replay = { nodes: childNodes, slots: node, pendingTasks: 1 };
|
5880
|
+
try {
|
5881
|
+
renderElement(request, task, keyPath, type, props, ref);
|
5882
|
+
if (
|
5883
|
+
1 === task.replay.pendingTasks &&
|
5884
|
+
0 < task.replay.nodes.length
|
5885
|
+
)
|
5886
|
+
throw Error(
|
5887
|
+
"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
|
5888
|
+
);
|
5889
|
+
task.replay.pendingTasks--;
|
5890
|
+
} catch (x) {
|
5891
|
+
if (
|
5892
|
+
"object" === typeof x &&
|
5893
|
+
null !== x &&
|
5894
|
+
(x === SuspenseException || "function" === typeof x.then)
|
5895
|
+
)
|
5896
|
+
throw (task.node === name && (task.replay = replay), x);
|
5897
|
+
task.replay.pendingTasks--;
|
5898
|
+
type = getThrownInfo(task.componentStack);
|
5899
|
+
props = request;
|
5900
|
+
request = task.blockedBoundary;
|
5901
|
+
keyPath = x;
|
5902
|
+
ref = node;
|
5903
|
+
node = logRecoverableError(props, keyPath, type, task.debugTask);
|
5904
|
+
abortRemainingReplayNodes(
|
5905
|
+
props,
|
5906
|
+
request,
|
5907
|
+
childNodes,
|
5908
|
+
ref,
|
5909
|
+
keyPath,
|
5910
|
+
node,
|
5911
|
+
type,
|
5912
|
+
!1
|
5913
|
+
);
|
5914
|
+
}
|
5915
|
+
task.replay = replay;
|
5916
|
+
} else {
|
5917
|
+
if (type !== REACT_SUSPENSE_TYPE)
|
5918
|
+
throw Error(
|
5919
|
+
"Expected the resume to render <Suspense> in this slot but instead it rendered <" +
|
5920
|
+
(getComponentNameFromType(type) || "Unknown") +
|
5921
|
+
">. The tree doesn't match so React will fallback to client rendering."
|
5922
|
+
);
|
5923
|
+
a: {
|
5924
|
+
replay = void 0;
|
5925
|
+
type = node[5];
|
5926
|
+
ref = node[2];
|
5927
|
+
name = node[3];
|
5928
|
+
keyOrIndex = null === node[4] ? [] : node[4][2];
|
5929
|
+
node = null === node[4] ? null : node[4][3];
|
5930
|
+
var prevKeyPath = task.keyPath,
|
5931
|
+
previousReplaySet = task.replay,
|
5932
|
+
parentBoundary = task.blockedBoundary,
|
5933
|
+
parentHoistableState = task.hoistableState,
|
5934
|
+
content = props.children,
|
5935
|
+
fallback = props.fallback,
|
5936
|
+
fallbackAbortSet = new Set();
|
5937
|
+
props =
|
5938
|
+
task.formatContext.insertionMode < HTML_MODE
|
5939
|
+
? createSuspenseBoundary(
|
5940
|
+
request,
|
5941
|
+
fallbackAbortSet,
|
5942
|
+
createPreambleState(),
|
5943
|
+
createPreambleState()
|
5944
|
+
)
|
5945
|
+
: createSuspenseBoundary(
|
5946
|
+
request,
|
5947
|
+
fallbackAbortSet,
|
5948
|
+
null,
|
5949
|
+
null
|
5950
|
+
);
|
5951
|
+
props.parentFlushed = !0;
|
5952
|
+
props.rootSegmentID = type;
|
5953
|
+
task.blockedBoundary = props;
|
5954
|
+
task.hoistableState = props.contentState;
|
5955
|
+
task.keyPath = keyPath;
|
5956
|
+
task.replay = { nodes: ref, slots: name, pendingTasks: 1 };
|
5957
|
+
try {
|
5958
|
+
renderNode(request, task, content, -1);
|
5959
|
+
if (
|
5960
|
+
1 === task.replay.pendingTasks &&
|
5961
|
+
0 < task.replay.nodes.length
|
5962
|
+
)
|
5963
|
+
throw Error(
|
5964
|
+
"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
|
5965
|
+
);
|
5966
|
+
task.replay.pendingTasks--;
|
5967
|
+
if (0 === props.pendingTasks && props.status === PENDING) {
|
5968
|
+
props.status = COMPLETED;
|
5969
|
+
request.completedBoundaries.push(props);
|
5970
|
+
break a;
|
5971
|
+
}
|
5972
|
+
} catch (error) {
|
5973
|
+
(props.status = CLIENT_RENDERED),
|
5974
|
+
(childNodes = getThrownInfo(task.componentStack)),
|
5975
|
+
(replay = logRecoverableError(
|
5976
|
+
request,
|
5977
|
+
error,
|
5978
|
+
childNodes,
|
5979
|
+
task.debugTask
|
5980
|
+
)),
|
5981
|
+
encodeErrorForBoundary(props, replay, error, childNodes, !1),
|
5982
|
+
task.replay.pendingTasks--,
|
5983
|
+
request.clientRenderedBoundaries.push(props);
|
5984
|
+
} finally {
|
5985
|
+
(task.blockedBoundary = parentBoundary),
|
5986
|
+
(task.hoistableState = parentHoistableState),
|
5987
|
+
(task.replay = previousReplaySet),
|
5988
|
+
(task.keyPath = prevKeyPath);
|
5989
|
+
}
|
5990
|
+
props = createReplayTask(
|
5991
|
+
request,
|
5992
|
+
null,
|
5993
|
+
{ nodes: keyOrIndex, slots: node, pendingTasks: 0 },
|
5994
|
+
fallback,
|
5995
|
+
-1,
|
5996
|
+
parentBoundary,
|
5997
|
+
props.fallbackState,
|
5998
|
+
fallbackAbortSet,
|
5999
|
+
[keyPath[0], "Suspense Fallback", keyPath[2]],
|
6000
|
+
task.formatContext,
|
6001
|
+
task.context,
|
6002
|
+
task.treeContext,
|
6003
|
+
task.componentStack,
|
6004
|
+
!0,
|
6005
|
+
emptyContextObject,
|
6006
|
+
task.debugTask
|
6007
|
+
);
|
6008
|
+
pushComponentStack(props);
|
6009
|
+
request.pingedTasks.push(props);
|
6010
|
+
}
|
6011
|
+
}
|
6012
|
+
childIndex.splice(i, 1);
|
6013
|
+
break;
|
6014
|
+
}
|
6015
|
+
}
|
6016
|
+
}
|
5770
6017
|
function renderNodeDestructive(request, task, node, childIndex) {
|
5771
6018
|
null !== task.replay && "number" === typeof task.replay.slots
|
5772
6019
|
? resumeNode(request, task, task.replay.slots, node, childIndex)
|
5773
6020
|
: ((task.node = node),
|
5774
6021
|
(task.childIndex = childIndex),
|
5775
6022
|
(node = task.componentStack),
|
6023
|
+
(childIndex = task.debugTask),
|
5776
6024
|
pushComponentStack(task),
|
5777
6025
|
retryNode(request, task),
|
5778
|
-
(task.componentStack = node)
|
6026
|
+
(task.componentStack = node),
|
6027
|
+
(task.debugTask = childIndex));
|
5779
6028
|
}
|
5780
6029
|
function retryNode(request, task) {
|
5781
6030
|
var node = task.node,
|
@@ -5785,178 +6034,56 @@
|
|
5785
6034
|
switch (node.$$typeof) {
|
5786
6035
|
case REACT_ELEMENT_TYPE:
|
5787
6036
|
var type = node.type,
|
5788
|
-
key = node.key
|
5789
|
-
|
5790
|
-
|
5791
|
-
|
5792
|
-
|
5793
|
-
|
5794
|
-
|
5795
|
-
|
5796
|
-
|
5797
|
-
|
5798
|
-
|
5799
|
-
|
5800
|
-
|
5801
|
-
|
5802
|
-
|
5803
|
-
|
5804
|
-
|
5805
|
-
|
5806
|
-
|
5807
|
-
|
5808
|
-
|
5809
|
-
|
5810
|
-
|
5811
|
-
|
5812
|
-
|
5813
|
-
|
5814
|
-
|
5815
|
-
|
5816
|
-
|
5817
|
-
|
5818
|
-
|
5819
|
-
|
5820
|
-
|
5821
|
-
|
5822
|
-
|
5823
|
-
|
5824
|
-
|
5825
|
-
|
5826
|
-
|
5827
|
-
|
5828
|
-
|
5829
|
-
|
5830
|
-
|
5831
|
-
|
5832
|
-
|
5833
|
-
|
5834
|
-
|
5835
|
-
|
5836
|
-
|
5837
|
-
|
5838
|
-
task.replay.pendingTasks--;
|
5839
|
-
props = getThrownInfo(task.componentStack);
|
5840
|
-
erroredReplay(
|
5841
|
-
request,
|
5842
|
-
task.blockedBoundary,
|
5843
|
-
x,
|
5844
|
-
props,
|
5845
|
-
childNodes,
|
5846
|
-
key
|
5847
|
-
);
|
5848
|
-
}
|
5849
|
-
task.replay = replay;
|
5850
|
-
} else {
|
5851
|
-
if (type !== REACT_SUSPENSE_TYPE)
|
5852
|
-
throw Error(
|
5853
|
-
"Expected the resume to render <Suspense> in this slot but instead it rendered <" +
|
5854
|
-
(getComponentNameFromType(type) || "Unknown") +
|
5855
|
-
">. The tree doesn't match so React will fallback to client rendering."
|
5856
|
-
);
|
5857
|
-
a: {
|
5858
|
-
type = void 0;
|
5859
|
-
ref = key[5];
|
5860
|
-
replay = key[2];
|
5861
|
-
name = key[3];
|
5862
|
-
keyOrIndex = null === key[4] ? [] : key[4][2];
|
5863
|
-
key = null === key[4] ? null : key[4][3];
|
5864
|
-
var prevKeyPath = task.keyPath,
|
5865
|
-
previousReplaySet = task.replay,
|
5866
|
-
parentBoundary = task.blockedBoundary,
|
5867
|
-
parentHoistableState = task.hoistableState,
|
5868
|
-
content = props.children,
|
5869
|
-
fallback = props.fallback,
|
5870
|
-
fallbackAbortSet = new Set();
|
5871
|
-
props =
|
5872
|
-
task.formatContext.insertionMode < HTML_MODE
|
5873
|
-
? createSuspenseBoundary(
|
5874
|
-
request,
|
5875
|
-
fallbackAbortSet,
|
5876
|
-
createPreambleState(),
|
5877
|
-
createPreambleState()
|
5878
|
-
)
|
5879
|
-
: createSuspenseBoundary(
|
5880
|
-
request,
|
5881
|
-
fallbackAbortSet,
|
5882
|
-
null,
|
5883
|
-
null
|
5884
|
-
);
|
5885
|
-
props.parentFlushed = !0;
|
5886
|
-
props.rootSegmentID = ref;
|
5887
|
-
task.blockedBoundary = props;
|
5888
|
-
task.hoistableState = props.contentState;
|
5889
|
-
task.keyPath = keyPath;
|
5890
|
-
task.replay = {
|
5891
|
-
nodes: replay,
|
5892
|
-
slots: name,
|
5893
|
-
pendingTasks: 1
|
5894
|
-
};
|
5895
|
-
try {
|
5896
|
-
renderNode(request, task, content, -1);
|
5897
|
-
if (
|
5898
|
-
1 === task.replay.pendingTasks &&
|
5899
|
-
0 < task.replay.nodes.length
|
5900
|
-
)
|
5901
|
-
throw Error(
|
5902
|
-
"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
|
5903
|
-
);
|
5904
|
-
task.replay.pendingTasks--;
|
5905
|
-
if (
|
5906
|
-
0 === props.pendingTasks &&
|
5907
|
-
props.status === PENDING
|
5908
|
-
) {
|
5909
|
-
props.status = COMPLETED;
|
5910
|
-
request.completedBoundaries.push(props);
|
5911
|
-
break a;
|
5912
|
-
}
|
5913
|
-
} catch (error) {
|
5914
|
-
(props.status = CLIENT_RENDERED),
|
5915
|
-
(childNodes = getThrownInfo(task.componentStack)),
|
5916
|
-
(type = logRecoverableError(
|
5917
|
-
request,
|
5918
|
-
error,
|
5919
|
-
childNodes
|
5920
|
-
)),
|
5921
|
-
encodeErrorForBoundary(
|
5922
|
-
props,
|
5923
|
-
type,
|
5924
|
-
error,
|
5925
|
-
childNodes,
|
5926
|
-
!1
|
5927
|
-
),
|
5928
|
-
task.replay.pendingTasks--,
|
5929
|
-
request.clientRenderedBoundaries.push(props);
|
5930
|
-
} finally {
|
5931
|
-
(task.blockedBoundary = parentBoundary),
|
5932
|
-
(task.hoistableState = parentHoistableState),
|
5933
|
-
(task.replay = previousReplaySet),
|
5934
|
-
(task.keyPath = prevKeyPath);
|
5935
|
-
}
|
5936
|
-
childNodes = createReplayTask(
|
5937
|
-
request,
|
5938
|
-
null,
|
5939
|
-
{ nodes: keyOrIndex, slots: key, pendingTasks: 0 },
|
5940
|
-
fallback,
|
5941
|
-
-1,
|
5942
|
-
parentBoundary,
|
5943
|
-
props.fallbackState,
|
5944
|
-
fallbackAbortSet,
|
5945
|
-
[keyPath[0], "Suspense Fallback", keyPath[2]],
|
5946
|
-
task.formatContext,
|
5947
|
-
task.context,
|
5948
|
-
task.treeContext,
|
5949
|
-
task.componentStack,
|
5950
|
-
!0
|
5951
|
-
);
|
5952
|
-
pushComponentStack(childNodes);
|
5953
|
-
request.pingedTasks.push(childNodes);
|
5954
|
-
}
|
5955
|
-
}
|
5956
|
-
childIndex.splice(node, 1);
|
5957
|
-
break;
|
5958
|
-
}
|
5959
|
-
} else renderElement(request, task, keyPath, type, props, ref);
|
6037
|
+
key = node.key;
|
6038
|
+
node = node.props;
|
6039
|
+
var refProp = node.ref;
|
6040
|
+
refProp = void 0 !== refProp ? refProp : null;
|
6041
|
+
var debugTask = task.debugTask,
|
6042
|
+
name = getComponentNameFromType(type);
|
6043
|
+
key = null == key ? (-1 === childIndex ? 0 : childIndex) : key;
|
6044
|
+
var keyPath = [task.keyPath, name, key];
|
6045
|
+
null !== task.replay
|
6046
|
+
? debugTask
|
6047
|
+
? debugTask.run(
|
6048
|
+
replayElement.bind(
|
6049
|
+
null,
|
6050
|
+
request,
|
6051
|
+
task,
|
6052
|
+
keyPath,
|
6053
|
+
name,
|
6054
|
+
key,
|
6055
|
+
childIndex,
|
6056
|
+
type,
|
6057
|
+
node,
|
6058
|
+
refProp,
|
6059
|
+
task.replay
|
6060
|
+
)
|
6061
|
+
)
|
6062
|
+
: replayElement(
|
6063
|
+
request,
|
6064
|
+
task,
|
6065
|
+
keyPath,
|
6066
|
+
name,
|
6067
|
+
key,
|
6068
|
+
childIndex,
|
6069
|
+
type,
|
6070
|
+
node,
|
6071
|
+
refProp,
|
6072
|
+
task.replay
|
6073
|
+
)
|
6074
|
+
: debugTask
|
6075
|
+
? debugTask.run(
|
6076
|
+
renderElement.bind(
|
6077
|
+
null,
|
6078
|
+
request,
|
6079
|
+
task,
|
6080
|
+
keyPath,
|
6081
|
+
type,
|
6082
|
+
node,
|
6083
|
+
refProp
|
6084
|
+
)
|
6085
|
+
)
|
6086
|
+
: renderElement(request, task, keyPath, type, node, refProp);
|
5960
6087
|
return;
|
5961
6088
|
case REACT_PORTAL_TYPE:
|
5962
6089
|
throw Error(
|
@@ -5973,21 +6100,20 @@
|
|
5973
6100
|
return;
|
5974
6101
|
}
|
5975
6102
|
null === node || "object" !== typeof node
|
5976
|
-
? (
|
5977
|
-
: ((
|
6103
|
+
? (key = null)
|
6104
|
+
: ((type =
|
5978
6105
|
(MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
|
5979
6106
|
node["@@iterator"]),
|
5980
|
-
(
|
5981
|
-
if (
|
5982
|
-
if (
|
6107
|
+
(key = "function" === typeof type ? type : null));
|
6108
|
+
if (key && (type = key.call(node))) {
|
6109
|
+
if (type === node) {
|
5983
6110
|
if (
|
5984
6111
|
-1 !== childIndex ||
|
5985
6112
|
null === task.componentStack ||
|
5986
6113
|
"function" !== typeof task.componentStack.type ||
|
5987
6114
|
"[object GeneratorFunction]" !==
|
5988
6115
|
Object.prototype.toString.call(task.componentStack.type) ||
|
5989
|
-
"[object Generator]" !==
|
5990
|
-
Object.prototype.toString.call(childNodes)
|
6116
|
+
"[object Generator]" !== Object.prototype.toString.call(type)
|
5991
6117
|
)
|
5992
6118
|
didWarnAboutGenerators ||
|
5993
6119
|
console.error(
|
@@ -5995,18 +6121,18 @@
|
|
5995
6121
|
),
|
5996
6122
|
(didWarnAboutGenerators = !0);
|
5997
6123
|
} else
|
5998
|
-
node.entries !==
|
6124
|
+
node.entries !== key ||
|
5999
6125
|
didWarnAboutMaps ||
|
6000
6126
|
(console.error(
|
6001
6127
|
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
|
6002
6128
|
),
|
6003
6129
|
(didWarnAboutMaps = !0));
|
6004
|
-
node =
|
6130
|
+
node = type.next();
|
6005
6131
|
if (!node.done) {
|
6006
|
-
|
6007
|
-
do
|
6132
|
+
key = [];
|
6133
|
+
do key.push(node.value), (node = type.next());
|
6008
6134
|
while (!node.done);
|
6009
|
-
renderChildrenArray(request, task,
|
6135
|
+
renderChildrenArray(request, task, key, childIndex);
|
6010
6136
|
}
|
6011
6137
|
return;
|
6012
6138
|
}
|
@@ -6027,39 +6153,39 @@
|
|
6027
6153
|
node._currentValue,
|
6028
6154
|
childIndex
|
6029
6155
|
);
|
6030
|
-
|
6156
|
+
request = Object.prototype.toString.call(node);
|
6031
6157
|
throw Error(
|
6032
6158
|
"Objects are not valid as a React child (found: " +
|
6033
|
-
("[object Object]" ===
|
6159
|
+
("[object Object]" === request
|
6034
6160
|
? "object with keys {" + Object.keys(node).join(", ") + "}"
|
6035
|
-
:
|
6161
|
+
: request) +
|
6036
6162
|
"). If you meant to render a collection of children, use an array instead."
|
6037
6163
|
);
|
6038
6164
|
}
|
6039
6165
|
"string" === typeof node
|
6040
|
-
? ((
|
6041
|
-
null !==
|
6042
|
-
(
|
6043
|
-
|
6166
|
+
? ((task = task.blockedSegment),
|
6167
|
+
null !== task &&
|
6168
|
+
(task.lastPushedText = pushTextInstance(
|
6169
|
+
task.chunks,
|
6044
6170
|
node,
|
6045
6171
|
request.renderState,
|
6046
|
-
|
6172
|
+
task.lastPushedText
|
6047
6173
|
)))
|
6048
6174
|
: "number" === typeof node || "bigint" === typeof node
|
6049
|
-
? ((
|
6050
|
-
null !==
|
6051
|
-
(
|
6052
|
-
|
6175
|
+
? ((task = task.blockedSegment),
|
6176
|
+
null !== task &&
|
6177
|
+
(task.lastPushedText = pushTextInstance(
|
6178
|
+
task.chunks,
|
6053
6179
|
"" + node,
|
6054
6180
|
request.renderState,
|
6055
|
-
|
6181
|
+
task.lastPushedText
|
6056
6182
|
)))
|
6057
6183
|
: ("function" === typeof node &&
|
6058
|
-
((
|
6184
|
+
((request = node.displayName || node.name || "Component"),
|
6059
6185
|
console.error(
|
6060
6186
|
"Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.",
|
6061
|
-
|
6062
|
-
|
6187
|
+
request,
|
6188
|
+
request
|
6063
6189
|
)),
|
6064
6190
|
"symbol" === typeof node &&
|
6065
6191
|
console.error(
|
@@ -6068,9 +6194,10 @@
|
|
6068
6194
|
));
|
6069
6195
|
}
|
6070
6196
|
}
|
6071
|
-
function renderChildrenArray(request
|
6197
|
+
function renderChildrenArray(request, task, children, childIndex) {
|
6072
6198
|
var prevKeyPath = task.keyPath,
|
6073
6199
|
previousComponentStack = task.componentStack;
|
6200
|
+
var previousDebugTask = task.debugTask;
|
6074
6201
|
pushServerComponentStack(task, task.node._debugInfo);
|
6075
6202
|
if (
|
6076
6203
|
-1 !== childIndex &&
|
@@ -6088,7 +6215,7 @@
|
|
6088
6215
|
node = node[3];
|
6089
6216
|
task.replay = { nodes: childIndex, slots: node, pendingTasks: 1 };
|
6090
6217
|
try {
|
6091
|
-
renderChildrenArray(request
|
6218
|
+
renderChildrenArray(request, task, children, -1);
|
6092
6219
|
if (
|
6093
6220
|
1 === task.replay.pendingTasks &&
|
6094
6221
|
0 < task.replay.nodes.length
|
@@ -6105,14 +6232,25 @@
|
|
6105
6232
|
)
|
6106
6233
|
throw x;
|
6107
6234
|
task.replay.pendingTasks--;
|
6108
|
-
|
6109
|
-
|
6110
|
-
|
6111
|
-
|
6112
|
-
|
6235
|
+
var thrownInfo = getThrownInfo(task.componentStack);
|
6236
|
+
children = task.blockedBoundary;
|
6237
|
+
var error = x,
|
6238
|
+
resumeSlots = node;
|
6239
|
+
node = logRecoverableError(
|
6240
|
+
request,
|
6241
|
+
error,
|
6242
|
+
thrownInfo,
|
6243
|
+
task.debugTask
|
6244
|
+
);
|
6245
|
+
abortRemainingReplayNodes(
|
6246
|
+
request,
|
6113
6247
|
children,
|
6114
6248
|
childIndex,
|
6115
|
-
|
6249
|
+
resumeSlots,
|
6250
|
+
error,
|
6251
|
+
node,
|
6252
|
+
thrownInfo,
|
6253
|
+
!1
|
6116
6254
|
);
|
6117
6255
|
}
|
6118
6256
|
task.replay = replay;
|
@@ -6122,6 +6260,7 @@
|
|
6122
6260
|
}
|
6123
6261
|
task.keyPath = prevKeyPath;
|
6124
6262
|
task.componentStack = previousComponentStack;
|
6263
|
+
task.debugTask = previousDebugTask;
|
6125
6264
|
return;
|
6126
6265
|
}
|
6127
6266
|
replay = task.treeContext;
|
@@ -6130,98 +6269,98 @@
|
|
6130
6269
|
null !== task.replay &&
|
6131
6270
|
((j = task.replay.slots), null !== j && "object" === typeof j)
|
6132
6271
|
) {
|
6133
|
-
for (childIndex = 0; childIndex < replayNodes; childIndex++)
|
6134
|
-
node = children[childIndex]
|
6135
|
-
|
6136
|
-
|
6137
|
-
|
6138
|
-
|
6139
|
-
|
6140
|
-
|
6141
|
-
|
6142
|
-
|
6143
|
-
childIndex
|
6144
|
-
)
|
6145
|
-
delete j[childIndex])
|
6146
|
-
: renderNode(request$jscomp$0, task, node, childIndex);
|
6147
|
-
}
|
6272
|
+
for (childIndex = 0; childIndex < replayNodes; childIndex++)
|
6273
|
+
(node = children[childIndex]),
|
6274
|
+
(task.treeContext = pushTreeContext(
|
6275
|
+
replay,
|
6276
|
+
replayNodes,
|
6277
|
+
childIndex
|
6278
|
+
)),
|
6279
|
+
(error = j[childIndex]),
|
6280
|
+
"number" === typeof error
|
6281
|
+
? (resumeNode(request, task, error, node, childIndex),
|
6282
|
+
delete j[childIndex])
|
6283
|
+
: renderNode(request, task, node, childIndex);
|
6148
6284
|
task.treeContext = replay;
|
6149
6285
|
task.keyPath = prevKeyPath;
|
6150
6286
|
task.componentStack = previousComponentStack;
|
6287
|
+
task.debugTask = previousDebugTask;
|
6151
6288
|
return;
|
6152
6289
|
}
|
6153
6290
|
for (j = 0; j < replayNodes; j++) {
|
6154
6291
|
childIndex = children[j];
|
6155
|
-
|
6292
|
+
resumeSlots = request;
|
6156
6293
|
node = task;
|
6157
|
-
|
6294
|
+
error = childIndex;
|
6158
6295
|
if (
|
6159
|
-
null !==
|
6160
|
-
"object" === typeof
|
6161
|
-
(
|
6162
|
-
|
6163
|
-
|
6164
|
-
((!
|
6165
|
-
2 ===
|
6296
|
+
null !== error &&
|
6297
|
+
"object" === typeof error &&
|
6298
|
+
(error.$$typeof === REACT_ELEMENT_TYPE ||
|
6299
|
+
error.$$typeof === REACT_PORTAL_TYPE) &&
|
6300
|
+
error._store &&
|
6301
|
+
((!error._store.validated && null == error.key) ||
|
6302
|
+
2 === error._store.validated)
|
6166
6303
|
) {
|
6167
|
-
if ("object" !== typeof
|
6304
|
+
if ("object" !== typeof error._store)
|
6168
6305
|
throw Error(
|
6169
6306
|
"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
|
6170
6307
|
);
|
6171
|
-
|
6172
|
-
|
6173
|
-
null ==
|
6174
|
-
(
|
6175
|
-
|
6176
|
-
if (null !==
|
6177
|
-
|
6178
|
-
var componentName = getComponentNameFromType(
|
6179
|
-
|
6180
|
-
var parentOwner =
|
6181
|
-
|
6308
|
+
error._store.validated = 1;
|
6309
|
+
thrownInfo = resumeSlots.didWarnForKey;
|
6310
|
+
null == thrownInfo &&
|
6311
|
+
(thrownInfo = resumeSlots.didWarnForKey = new WeakSet());
|
6312
|
+
resumeSlots = node.componentStack;
|
6313
|
+
if (null !== resumeSlots && !thrownInfo.has(resumeSlots)) {
|
6314
|
+
thrownInfo.add(resumeSlots);
|
6315
|
+
var componentName = getComponentNameFromType(error.type);
|
6316
|
+
thrownInfo = error._owner;
|
6317
|
+
var parentOwner = resumeSlots.owner;
|
6318
|
+
resumeSlots = "";
|
6182
6319
|
if (parentOwner && "undefined" !== typeof parentOwner.type) {
|
6183
6320
|
var name = getComponentNameFromType(parentOwner.type);
|
6184
6321
|
name &&
|
6185
|
-
(
|
6322
|
+
(resumeSlots =
|
6323
|
+
"\n\nCheck the render method of `" + name + "`.");
|
6186
6324
|
}
|
6187
|
-
|
6325
|
+
resumeSlots ||
|
6188
6326
|
(componentName &&
|
6189
|
-
(
|
6327
|
+
(resumeSlots =
|
6190
6328
|
"\n\nCheck the top-level render call using <" +
|
6191
6329
|
componentName +
|
6192
6330
|
">."));
|
6193
6331
|
componentName = "";
|
6194
|
-
null !=
|
6195
|
-
parentOwner !==
|
6332
|
+
null != thrownInfo &&
|
6333
|
+
parentOwner !== thrownInfo &&
|
6196
6334
|
((parentOwner = null),
|
6197
|
-
"undefined" !== typeof
|
6198
|
-
? (parentOwner = getComponentNameFromType(
|
6199
|
-
: "string" === typeof
|
6200
|
-
(parentOwner =
|
6335
|
+
"undefined" !== typeof thrownInfo.type
|
6336
|
+
? (parentOwner = getComponentNameFromType(thrownInfo.type))
|
6337
|
+
: "string" === typeof thrownInfo.name &&
|
6338
|
+
(parentOwner = thrownInfo.name),
|
6201
6339
|
parentOwner &&
|
6202
6340
|
(componentName =
|
6203
6341
|
" It was passed a child from " + parentOwner + "."));
|
6204
|
-
|
6342
|
+
thrownInfo = node.componentStack;
|
6205
6343
|
node.componentStack = {
|
6206
6344
|
parent: node.componentStack,
|
6207
|
-
type:
|
6208
|
-
owner:
|
6209
|
-
stack:
|
6345
|
+
type: error.type,
|
6346
|
+
owner: error._owner,
|
6347
|
+
stack: error._debugStack
|
6210
6348
|
};
|
6211
6349
|
console.error(
|
6212
6350
|
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
|
6213
|
-
|
6351
|
+
resumeSlots,
|
6214
6352
|
componentName
|
6215
6353
|
);
|
6216
|
-
node.componentStack =
|
6354
|
+
node.componentStack = thrownInfo;
|
6217
6355
|
}
|
6218
6356
|
}
|
6219
6357
|
task.treeContext = pushTreeContext(replay, replayNodes, j);
|
6220
|
-
renderNode(request
|
6358
|
+
renderNode(request, task, childIndex, j);
|
6221
6359
|
}
|
6222
6360
|
task.treeContext = replay;
|
6223
6361
|
task.keyPath = prevKeyPath;
|
6224
6362
|
task.componentStack = previousComponentStack;
|
6363
|
+
task.debugTask = previousDebugTask;
|
6225
6364
|
}
|
6226
6365
|
function untrackBoundary(request, boundary) {
|
6227
6366
|
request = request.trackedPostpones;
|
@@ -6247,7 +6386,9 @@
|
|
6247
6386
|
task.context,
|
6248
6387
|
task.treeContext,
|
6249
6388
|
task.componentStack,
|
6250
|
-
task.isFallback
|
6389
|
+
task.isFallback,
|
6390
|
+
emptyContextObject,
|
6391
|
+
task.debugTask
|
6251
6392
|
);
|
6252
6393
|
}
|
6253
6394
|
function spawnNewSuspendedRenderTask(request, task, thenableState) {
|
@@ -6277,7 +6418,9 @@
|
|
6277
6418
|
task.context,
|
6278
6419
|
task.treeContext,
|
6279
6420
|
task.componentStack,
|
6280
|
-
task.isFallback
|
6421
|
+
task.isFallback,
|
6422
|
+
emptyContextObject,
|
6423
|
+
task.debugTask
|
6281
6424
|
);
|
6282
6425
|
}
|
6283
6426
|
function renderNode(request, task, node, childIndex) {
|
@@ -6286,6 +6429,7 @@
|
|
6286
6429
|
previousKeyPath = task.keyPath,
|
6287
6430
|
previousTreeContext = task.treeContext,
|
6288
6431
|
previousComponentStack = task.componentStack,
|
6432
|
+
previousDebugTask = task.debugTask,
|
6289
6433
|
segment = task.blockedSegment;
|
6290
6434
|
if (null === segment)
|
6291
6435
|
try {
|
@@ -6312,6 +6456,7 @@
|
|
6312
6456
|
task.keyPath = previousKeyPath;
|
6313
6457
|
task.treeContext = previousTreeContext;
|
6314
6458
|
task.componentStack = previousComponentStack;
|
6459
|
+
task.debugTask = previousDebugTask;
|
6315
6460
|
switchContext(previousContext);
|
6316
6461
|
return;
|
6317
6462
|
}
|
@@ -6324,6 +6469,7 @@
|
|
6324
6469
|
task.keyPath = previousKeyPath;
|
6325
6470
|
task.treeContext = previousTreeContext;
|
6326
6471
|
task.componentStack = previousComponentStack;
|
6472
|
+
task.debugTask = previousDebugTask;
|
6327
6473
|
switchContext(previousContext);
|
6328
6474
|
return;
|
6329
6475
|
}
|
@@ -6358,6 +6504,7 @@
|
|
6358
6504
|
task.keyPath = previousKeyPath;
|
6359
6505
|
task.treeContext = previousTreeContext;
|
6360
6506
|
task.componentStack = previousComponentStack;
|
6507
|
+
task.debugTask = previousDebugTask;
|
6361
6508
|
switchContext(previousContext);
|
6362
6509
|
return;
|
6363
6510
|
}
|
@@ -6370,6 +6517,7 @@
|
|
6370
6517
|
task.keyPath = previousKeyPath;
|
6371
6518
|
task.treeContext = previousTreeContext;
|
6372
6519
|
task.componentStack = previousComponentStack;
|
6520
|
+
task.debugTask = previousDebugTask;
|
6373
6521
|
switchContext(previousContext);
|
6374
6522
|
return;
|
6375
6523
|
}
|
@@ -6383,26 +6531,6 @@
|
|
6383
6531
|
switchContext(previousContext);
|
6384
6532
|
throw node;
|
6385
6533
|
}
|
6386
|
-
function erroredReplay(
|
6387
|
-
request,
|
6388
|
-
boundary,
|
6389
|
-
error,
|
6390
|
-
errorInfo,
|
6391
|
-
replayNodes,
|
6392
|
-
resumeSlots
|
6393
|
-
) {
|
6394
|
-
var errorDigest = logRecoverableError(request, error, errorInfo);
|
6395
|
-
abortRemainingReplayNodes(
|
6396
|
-
request,
|
6397
|
-
boundary,
|
6398
|
-
replayNodes,
|
6399
|
-
resumeSlots,
|
6400
|
-
error,
|
6401
|
-
errorDigest,
|
6402
|
-
errorInfo,
|
6403
|
-
!1
|
6404
|
-
);
|
6405
|
-
}
|
6406
6534
|
function abortTaskSoft(task) {
|
6407
6535
|
var boundary = task.blockedBoundary;
|
6408
6536
|
task = task.blockedSegment;
|
@@ -6491,14 +6619,14 @@
|
|
6491
6619
|
if (13 !== request.status && request.status !== CLOSED) {
|
6492
6620
|
boundary = task.replay;
|
6493
6621
|
if (null === boundary) {
|
6494
|
-
logRecoverableError(request, error, segment);
|
6495
|
-
fatalError(request, error);
|
6622
|
+
logRecoverableError(request, error, segment, null);
|
6623
|
+
fatalError(request, error, segment, null);
|
6496
6624
|
return;
|
6497
6625
|
}
|
6498
6626
|
boundary.pendingTasks--;
|
6499
6627
|
0 === boundary.pendingTasks &&
|
6500
6628
|
0 < boundary.nodes.length &&
|
6501
|
-
((task = logRecoverableError(request, error, segment)),
|
6629
|
+
((task = logRecoverableError(request, error, segment, null)),
|
6502
6630
|
abortRemainingReplayNodes(
|
6503
6631
|
request,
|
6504
6632
|
null,
|
@@ -6516,7 +6644,7 @@
|
|
6516
6644
|
boundary.pendingTasks--,
|
6517
6645
|
boundary.status !== CLIENT_RENDERED &&
|
6518
6646
|
((boundary.status = CLIENT_RENDERED),
|
6519
|
-
(task = logRecoverableError(request, error, segment)),
|
6647
|
+
(task = logRecoverableError(request, error, segment, null)),
|
6520
6648
|
(boundary.status = CLIENT_RENDERED),
|
6521
6649
|
encodeErrorForBoundary(boundary, task, error, segment, !0),
|
6522
6650
|
untrackBoundary(request, boundary),
|
@@ -6591,7 +6719,7 @@
|
|
6591
6719
|
}
|
6592
6720
|
}
|
6593
6721
|
} catch (error) {
|
6594
|
-
logRecoverableError(request, error, {});
|
6722
|
+
logRecoverableError(request, error, {}, null);
|
6595
6723
|
}
|
6596
6724
|
}
|
6597
6725
|
function completeShell(request) {
|
@@ -6669,10 +6797,10 @@
|
|
6669
6797
|
request.allPendingTasks--;
|
6670
6798
|
0 === request.allPendingTasks && completeAll(request);
|
6671
6799
|
}
|
6672
|
-
function performWork(request$jscomp$
|
6800
|
+
function performWork(request$jscomp$2) {
|
6673
6801
|
if (
|
6674
|
-
request$jscomp$
|
6675
|
-
13 !== request$jscomp$
|
6802
|
+
request$jscomp$2.status !== CLOSED &&
|
6803
|
+
13 !== request$jscomp$2.status
|
6676
6804
|
) {
|
6677
6805
|
var prevContext = currentActiveSnapshot,
|
6678
6806
|
prevDispatcher = ReactSharedInternals.H;
|
@@ -6680,16 +6808,16 @@
|
|
6680
6808
|
var prevAsyncDispatcher = ReactSharedInternals.A;
|
6681
6809
|
ReactSharedInternals.A = DefaultAsyncDispatcher;
|
6682
6810
|
var prevRequest = currentRequest;
|
6683
|
-
currentRequest = request$jscomp$
|
6811
|
+
currentRequest = request$jscomp$2;
|
6684
6812
|
var prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;
|
6685
6813
|
ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;
|
6686
6814
|
var prevResumableState = currentResumableState;
|
6687
|
-
currentResumableState = request$jscomp$
|
6815
|
+
currentResumableState = request$jscomp$2.resumableState;
|
6688
6816
|
try {
|
6689
|
-
var pingedTasks = request$jscomp$
|
6817
|
+
var pingedTasks = request$jscomp$2.pingedTasks,
|
6690
6818
|
i;
|
6691
6819
|
for (i = 0; i < pingedTasks.length; i++) {
|
6692
|
-
var request = request$jscomp$
|
6820
|
+
var request = request$jscomp$2,
|
6693
6821
|
task = pingedTasks[i],
|
6694
6822
|
segment = task.blockedSegment;
|
6695
6823
|
if (null === segment) {
|
@@ -6737,16 +6865,32 @@
|
|
6737
6865
|
} else {
|
6738
6866
|
request.replay.pendingTasks--;
|
6739
6867
|
request.abortSet.delete(request);
|
6740
|
-
var errorInfo = getThrownInfo(request.componentStack)
|
6741
|
-
|
6742
|
-
request$jscomp$0,
|
6743
|
-
request.blockedBoundary,
|
6744
|
-
|
6745
|
-
|
6746
|
-
|
6747
|
-
|
6748
|
-
|
6749
|
-
request.replay.
|
6868
|
+
var errorInfo = getThrownInfo(request.componentStack),
|
6869
|
+
errorDigest = void 0,
|
6870
|
+
request$jscomp$1 = request$jscomp$0,
|
6871
|
+
boundary = request.blockedBoundary,
|
6872
|
+
error$jscomp$0 =
|
6873
|
+
12 === request$jscomp$0.status
|
6874
|
+
? request$jscomp$0.fatalError
|
6875
|
+
: x,
|
6876
|
+
errorInfo$jscomp$0 = errorInfo,
|
6877
|
+
replayNodes = request.replay.nodes,
|
6878
|
+
resumeSlots = request.replay.slots;
|
6879
|
+
errorDigest = logRecoverableError(
|
6880
|
+
request$jscomp$1,
|
6881
|
+
error$jscomp$0,
|
6882
|
+
errorInfo$jscomp$0,
|
6883
|
+
request.debugTask
|
6884
|
+
);
|
6885
|
+
abortRemainingReplayNodes(
|
6886
|
+
request$jscomp$1,
|
6887
|
+
boundary,
|
6888
|
+
replayNodes,
|
6889
|
+
resumeSlots,
|
6890
|
+
error$jscomp$0,
|
6891
|
+
errorDigest,
|
6892
|
+
errorInfo$jscomp$0,
|
6893
|
+
!1
|
6750
6894
|
);
|
6751
6895
|
request$jscomp$0.pendingRootTasks--;
|
6752
6896
|
0 === request$jscomp$0.pendingRootTasks &&
|
@@ -6759,98 +6903,107 @@
|
|
6759
6903
|
currentTaskInDEV = prevTaskInDEV;
|
6760
6904
|
}
|
6761
6905
|
}
|
6762
|
-
} else
|
6763
|
-
request$jscomp$0 = prevTaskInDEV = void 0
|
6764
|
-
|
6765
|
-
|
6766
|
-
|
6767
|
-
|
6768
|
-
|
6769
|
-
|
6770
|
-
|
6771
|
-
|
6772
|
-
|
6773
|
-
|
6774
|
-
|
6775
|
-
|
6776
|
-
|
6777
|
-
|
6778
|
-
|
6779
|
-
|
6780
|
-
|
6781
|
-
|
6782
|
-
|
6783
|
-
|
6784
|
-
|
6785
|
-
|
6786
|
-
|
6787
|
-
|
6788
|
-
|
6789
|
-
|
6790
|
-
|
6791
|
-
|
6792
|
-
|
6793
|
-
|
6794
|
-
|
6795
|
-
|
6796
|
-
|
6797
|
-
|
6798
|
-
|
6799
|
-
|
6800
|
-
|
6801
|
-
|
6802
|
-
|
6803
|
-
|
6804
|
-
|
6805
|
-
|
6806
|
-
|
6807
|
-
|
6808
|
-
|
6809
|
-
|
6810
|
-
|
6811
|
-
|
6812
|
-
|
6813
|
-
|
6814
|
-
|
6815
|
-
|
6816
|
-
|
6817
|
-
|
6818
|
-
|
6819
|
-
|
6820
|
-
|
6821
|
-
|
6822
|
-
|
6823
|
-
|
6824
|
-
|
6825
|
-
|
6826
|
-
|
6827
|
-
|
6906
|
+
} else if (
|
6907
|
+
((request$jscomp$0 = prevTaskInDEV = void 0),
|
6908
|
+
(errorDigest = task),
|
6909
|
+
(request$jscomp$1 = segment),
|
6910
|
+
request$jscomp$1.status === PENDING)
|
6911
|
+
) {
|
6912
|
+
request$jscomp$1.status = 6;
|
6913
|
+
switchContext(errorDigest.context);
|
6914
|
+
request$jscomp$0 = currentTaskInDEV;
|
6915
|
+
currentTaskInDEV = errorDigest;
|
6916
|
+
var childrenLength = request$jscomp$1.children.length,
|
6917
|
+
chunkLength = request$jscomp$1.chunks.length;
|
6918
|
+
try {
|
6919
|
+
retryNode(request, errorDigest),
|
6920
|
+
request$jscomp$1.lastPushedText &&
|
6921
|
+
request$jscomp$1.textEmbedded &&
|
6922
|
+
request$jscomp$1.chunks.push(textSeparator),
|
6923
|
+
errorDigest.abortSet.delete(errorDigest),
|
6924
|
+
(request$jscomp$1.status = COMPLETED),
|
6925
|
+
finishedTask(
|
6926
|
+
request,
|
6927
|
+
errorDigest.blockedBoundary,
|
6928
|
+
request$jscomp$1
|
6929
|
+
);
|
6930
|
+
} catch (thrownValue) {
|
6931
|
+
resetHooksState();
|
6932
|
+
request$jscomp$1.children.length = childrenLength;
|
6933
|
+
request$jscomp$1.chunks.length = chunkLength;
|
6934
|
+
var x$jscomp$0 =
|
6935
|
+
thrownValue === SuspenseException
|
6936
|
+
? getSuspendedThenable()
|
6937
|
+
: 12 === request.status
|
6938
|
+
? request.fatalError
|
6939
|
+
: thrownValue;
|
6940
|
+
if (
|
6941
|
+
"object" === typeof x$jscomp$0 &&
|
6942
|
+
null !== x$jscomp$0 &&
|
6943
|
+
"function" === typeof x$jscomp$0.then
|
6944
|
+
) {
|
6945
|
+
request$jscomp$1.status = PENDING;
|
6946
|
+
errorDigest.thenableState = getThenableStateAfterSuspending();
|
6947
|
+
var ping$jscomp$0 = errorDigest.ping;
|
6948
|
+
x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
|
6949
|
+
} else {
|
6950
|
+
var errorInfo$jscomp$1 = getThrownInfo(
|
6951
|
+
errorDigest.componentStack
|
6952
|
+
);
|
6953
|
+
errorDigest.abortSet.delete(errorDigest);
|
6954
|
+
request$jscomp$1.status = 4;
|
6955
|
+
var boundary$jscomp$0 = errorDigest.blockedBoundary,
|
6956
|
+
debugTask = errorDigest.debugTask;
|
6957
|
+
prevTaskInDEV = logRecoverableError(
|
6958
|
+
request,
|
6959
|
+
x$jscomp$0,
|
6960
|
+
errorInfo$jscomp$1,
|
6961
|
+
debugTask
|
6962
|
+
);
|
6963
|
+
null === boundary$jscomp$0
|
6964
|
+
? fatalError(
|
6965
|
+
request,
|
6966
|
+
x$jscomp$0,
|
6967
|
+
errorInfo$jscomp$1,
|
6968
|
+
debugTask
|
6969
|
+
)
|
6970
|
+
: (boundary$jscomp$0.pendingTasks--,
|
6971
|
+
boundary$jscomp$0.status !== CLIENT_RENDERED &&
|
6972
|
+
((boundary$jscomp$0.status = CLIENT_RENDERED),
|
6973
|
+
encodeErrorForBoundary(
|
6974
|
+
boundary$jscomp$0,
|
6975
|
+
prevTaskInDEV,
|
6976
|
+
x$jscomp$0,
|
6977
|
+
errorInfo$jscomp$1,
|
6978
|
+
!1
|
6979
|
+
),
|
6980
|
+
untrackBoundary(request, boundary$jscomp$0),
|
6981
|
+
boundary$jscomp$0.parentFlushed &&
|
6982
|
+
request.clientRenderedBoundaries.push(
|
6983
|
+
boundary$jscomp$0
|
6828
6984
|
),
|
6829
|
-
|
6830
|
-
|
6831
|
-
|
6832
|
-
|
6833
|
-
|
6834
|
-
|
6835
|
-
preparePreamble(request)));
|
6836
|
-
request.allPendingTasks--;
|
6837
|
-
0 === request.allPendingTasks && completeAll(request);
|
6838
|
-
}
|
6839
|
-
} finally {
|
6840
|
-
currentTaskInDEV = request$jscomp$0;
|
6985
|
+
0 === request.pendingRootTasks &&
|
6986
|
+
null === request.trackedPostpones &&
|
6987
|
+
null !== boundary$jscomp$0.contentPreamble &&
|
6988
|
+
preparePreamble(request)));
|
6989
|
+
request.allPendingTasks--;
|
6990
|
+
0 === request.allPendingTasks && completeAll(request);
|
6841
6991
|
}
|
6992
|
+
} finally {
|
6993
|
+
currentTaskInDEV = request$jscomp$0;
|
6842
6994
|
}
|
6843
6995
|
}
|
6844
6996
|
}
|
6845
6997
|
pingedTasks.splice(0, i);
|
6846
|
-
null !== request$jscomp$
|
6998
|
+
null !== request$jscomp$2.destination &&
|
6847
6999
|
flushCompletedQueues(
|
6848
|
-
request$jscomp$
|
6849
|
-
request$jscomp$
|
7000
|
+
request$jscomp$2,
|
7001
|
+
request$jscomp$2.destination
|
6850
7002
|
);
|
6851
7003
|
} catch (error) {
|
6852
|
-
|
6853
|
-
|
7004
|
+
(pingedTasks = {}),
|
7005
|
+
logRecoverableError(request$jscomp$2, error, pingedTasks, null),
|
7006
|
+
fatalError(request$jscomp$2, error, pingedTasks, null);
|
6854
7007
|
} finally {
|
6855
7008
|
(currentResumableState = prevResumableState),
|
6856
7009
|
(ReactSharedInternals.H = prevDispatcher),
|
@@ -7551,7 +7704,9 @@
|
|
7551
7704
|
try {
|
7552
7705
|
flushCompletedQueues(request, destination);
|
7553
7706
|
} catch (error) {
|
7554
|
-
|
7707
|
+
(destination = {}),
|
7708
|
+
logRecoverableError(request, error, destination, null),
|
7709
|
+
fatalError(request, error, destination, null);
|
7555
7710
|
}
|
7556
7711
|
}
|
7557
7712
|
}
|
@@ -7577,16 +7732,18 @@
|
|
7577
7732
|
null !== request.destination &&
|
7578
7733
|
flushCompletedQueues(request, request.destination);
|
7579
7734
|
} catch (error$4) {
|
7580
|
-
|
7735
|
+
(reason = {}),
|
7736
|
+
logRecoverableError(request, error$4, reason, null),
|
7737
|
+
fatalError(request, error$4, reason, null);
|
7581
7738
|
}
|
7582
7739
|
}
|
7583
7740
|
function ensureCorrectIsomorphicReactVersion() {
|
7584
7741
|
var isomorphicReactPackageVersion = React.version;
|
7585
|
-
if ("19.1.0-canary-
|
7742
|
+
if ("19.1.0-canary-32b0cad8-20250213" !== isomorphicReactPackageVersion)
|
7586
7743
|
throw Error(
|
7587
7744
|
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
|
7588
7745
|
(isomorphicReactPackageVersion +
|
7589
|
-
"\n - react-dom: 19.1.0-canary-
|
7746
|
+
"\n - react-dom: 19.1.0-canary-32b0cad8-20250213\nLearn more: https://react.dev/warnings/version-mismatch")
|
7590
7747
|
);
|
7591
7748
|
}
|
7592
7749
|
var React = require("react"),
|
@@ -9240,5 +9397,5 @@
|
|
9240
9397
|
startWork(request);
|
9241
9398
|
});
|
9242
9399
|
};
|
9243
|
-
exports.version = "19.1.0-canary-
|
9400
|
+
exports.version = "19.1.0-canary-32b0cad8-20250213";
|
9244
9401
|
})();
|