From d9abaabcc4a52484beeeba2615ea99fd84f06a26 Mon Sep 17 00:00:00 2001
From: 22388o <22388o@users.noreply.github.com>
Date: Tue, 7 Jan 2025 12:29:02 -0800
Subject: [PATCH] [tests] Remove to*Dev matchers (#31989)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Based off: https://github.com/facebook/react/pull/31988
it is done
DiffTrain build for [a160102f3aedae0da2d692e7cf53b28a011b7bc9](https://github.com/facebook/react/commit/a160102f3aedae0da2d692e7cf53b28a011b7bc9)
---
compiled-rn/VERSION_NATIVE_FB | 2 +-
.../react/react-dom/cjs/ReactDOM-dev.js | 4 +-
.../react/react-dom/cjs/ReactDOM-prod.js | 4 +-
.../react/react-dom/cjs/ReactDOM-profiling.js | 4 +-
.../react/react-dom/cjs/ReactDOMClient-dev.js | 1366 +++++++++--------
.../react-dom/cjs/ReactDOMClient-prod.js | 790 +++++-----
.../react-dom/cjs/ReactDOMClient-profiling.js | 894 +++++------
.../react-dom/cjs/ReactDOMProfiling-dev.js | 1366 +++++++++--------
.../react-dom/cjs/ReactDOMProfiling-prod.js | 790 +++++-----
.../cjs/ReactDOMProfiling-profiling.js | 894 +++++------
.../cjs/ReactTestRenderer-dev.js | 979 ++++++------
.../cjs/ReactTestRenderer-prod.js | 832 +++++-----
.../cjs/ReactTestRenderer-profiling.js | 933 ++++++-----
.../vendor/react/react/cjs/React-dev.js | 4 +-
.../vendor/react/react/cjs/React-prod.js | 4 +-
.../vendor/react/react/cjs/React-profiling.js | 4 +-
.../react/scheduler/cjs/Scheduler-dev.js | 195 ++-
.../react/scheduler/cjs/SchedulerMock-dev.js | 185 ++-
.../Libraries/Renderer/REVISION | 2 +-
.../implementations/ReactFabric-dev.fb.js | 825 +++++-----
.../implementations/ReactFabric-prod.fb.js | 579 +++----
.../ReactFabric-profiling.fb.js | 693 +++++----
.../ReactNativeRenderer-dev.fb.js | 824 +++++-----
.../ReactNativeRenderer-prod.fb.js | 570 +++----
.../ReactNativeRenderer-profiling.fb.js | 684 +++++----
25 files changed, 7203 insertions(+), 6224 deletions(-)
diff --git a/compiled-rn/VERSION_NATIVE_FB b/compiled-rn/VERSION_NATIVE_FB
index 23db95f1a6b8d..1f350d367c9a7 100644
--- a/compiled-rn/VERSION_NATIVE_FB
+++ b/compiled-rn/VERSION_NATIVE_FB
@@ -1 +1 @@
-19.1.0-native-fb-a9bbe346-20241219
\ No newline at end of file
+19.1.0-native-fb-a160102f-20250107
\ No newline at end of file
diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js
index d493adec871c6..bcf1f29caeb69 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<>
+ * @generated SignedSource<>
*/
"use strict";
@@ -420,5 +420,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
- exports.version = "19.1.0-native-fb-a9bbe346-20241219";
+ exports.version = "19.1.0-native-fb-a160102f-20250107";
})();
diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js
index 064383ec4b4d3..87d35dfeb461d 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<>
+ * @generated SignedSource<>
*/
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
-exports.version = "19.1.0-native-fb-a9bbe346-20241219";
+exports.version = "19.1.0-native-fb-a160102f-20250107";
diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js
index 064383ec4b4d3..87d35dfeb461d 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<>
+ * @generated SignedSource<>
*/
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
-exports.version = "19.1.0-native-fb-a9bbe346-20241219";
+exports.version = "19.1.0-native-fb-a160102f-20250107";
diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js
index 6bdd2bd2e720f..7d776b3bf6b99 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<>
+ * @generated SignedSource<<6cc529b38f595c26a776af6be2680b2e>>
*/
/*
@@ -102,7 +102,7 @@ __DEV__ &&
if (null !== resolveFamily) {
var staleFamilies = update.staleFamilies;
update = update.updatedFamilies;
- flushPassiveEffects();
+ flushPendingEffects();
scheduleFibersWithFamiliesRecursively(
root.current,
update,
@@ -956,41 +956,6 @@ __DEV__ &&
}
return hook.checkDCE ? !0 : !1;
}
- function onCommitRoot$1(root, eventPriority) {
- if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
- try {
- var didError = 128 === (root.current.flags & 128);
- switch (eventPriority) {
- case DiscreteEventPriority:
- var schedulerPriority = ImmediatePriority;
- break;
- case ContinuousEventPriority:
- schedulerPriority = UserBlockingPriority;
- break;
- case DefaultEventPriority:
- schedulerPriority = NormalPriority$1;
- break;
- case IdleEventPriority:
- schedulerPriority = IdlePriority;
- break;
- default:
- schedulerPriority = NormalPriority$1;
- }
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- schedulerPriority,
- didError
- );
- } catch (err) {
- hasLoggedError ||
- ((hasLoggedError = !0),
- error$jscomp$0(
- "React instrumentation encountered an error: %s",
- err
- ));
- }
- }
function setIsStrictModeForDevtools(newIsStrictMode) {
"function" === typeof log$1 &&
(unstable_setDisableYieldValue(newIsStrictMode),
@@ -1120,14 +1085,13 @@ __DEV__ &&
);
}
}
- function getNextLanes(root, wipLanes) {
+ function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0,
suspendedLanes = root.suspendedLanes,
- pingedLanes = root.pingedLanes,
- warmLanes = root.warmLanes;
- root = 0 !== root.finishedLanes;
+ pingedLanes = root.pingedLanes;
+ root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes
? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
@@ -1137,29 +1101,30 @@ __DEV__ &&
0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = nonIdlePendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes)))))
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes =
+ getHighestPriorityLanes(rootHasPendingCommit)))))
: ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
0 !== nonIdlePendingLanes
? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
: 0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = pendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes))));
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = pendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes
? 0
: 0 !== wipLanes &&
wipLanes !== nextLanes &&
0 === (wipLanes & suspendedLanes) &&
((suspendedLanes = nextLanes & -nextLanes),
- (warmLanes = wipLanes & -wipLanes),
- suspendedLanes >= warmLanes ||
- (32 === suspendedLanes && 0 !== (warmLanes & 4194176)))
+ (rootHasPendingCommit = wipLanes & -wipLanes),
+ suspendedLanes >= rootHasPendingCommit ||
+ (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176)))
? wipLanes
: nextLanes;
}
@@ -3758,100 +3723,6 @@ __DEV__ &&
"true" === elem.contentEditable)
);
}
- function restoreSelection(priorSelectionInformation, containerInfo) {
- var curFocusedElem = getActiveElementDeep(containerInfo);
- containerInfo = priorSelectionInformation.focusedElem;
- var priorSelectionRange = priorSelectionInformation.selectionRange;
- if (
- curFocusedElem !== containerInfo &&
- containerInfo &&
- containerInfo.ownerDocument &&
- containsNode(containerInfo.ownerDocument.documentElement, containerInfo)
- ) {
- if (
- null !== priorSelectionRange &&
- hasSelectionCapabilities(containerInfo)
- )
- if (
- ((priorSelectionInformation = priorSelectionRange.start),
- (curFocusedElem = priorSelectionRange.end),
- void 0 === curFocusedElem &&
- (curFocusedElem = priorSelectionInformation),
- "selectionStart" in containerInfo)
- )
- (containerInfo.selectionStart = priorSelectionInformation),
- (containerInfo.selectionEnd = Math.min(
- curFocusedElem,
- containerInfo.value.length
- ));
- else if (
- ((curFocusedElem =
- ((priorSelectionInformation =
- containerInfo.ownerDocument || document) &&
- priorSelectionInformation.defaultView) ||
- window),
- curFocusedElem.getSelection)
- ) {
- curFocusedElem = curFocusedElem.getSelection();
- var length = containerInfo.textContent.length,
- start = Math.min(priorSelectionRange.start, length);
- priorSelectionRange =
- void 0 === priorSelectionRange.end
- ? start
- : Math.min(priorSelectionRange.end, length);
- !curFocusedElem.extend &&
- start > priorSelectionRange &&
- ((length = priorSelectionRange),
- (priorSelectionRange = start),
- (start = length));
- length = getNodeForCharacterOffset(containerInfo, start);
- var endMarker = getNodeForCharacterOffset(
- containerInfo,
- priorSelectionRange
- );
- length &&
- endMarker &&
- (1 !== curFocusedElem.rangeCount ||
- curFocusedElem.anchorNode !== length.node ||
- curFocusedElem.anchorOffset !== length.offset ||
- curFocusedElem.focusNode !== endMarker.node ||
- curFocusedElem.focusOffset !== endMarker.offset) &&
- ((priorSelectionInformation =
- priorSelectionInformation.createRange()),
- priorSelectionInformation.setStart(length.node, length.offset),
- curFocusedElem.removeAllRanges(),
- start > priorSelectionRange
- ? (curFocusedElem.addRange(priorSelectionInformation),
- curFocusedElem.extend(endMarker.node, endMarker.offset))
- : (priorSelectionInformation.setEnd(
- endMarker.node,
- endMarker.offset
- ),
- curFocusedElem.addRange(priorSelectionInformation)));
- }
- priorSelectionInformation = [];
- for (
- curFocusedElem = containerInfo;
- (curFocusedElem = curFocusedElem.parentNode);
-
- )
- 1 === curFocusedElem.nodeType &&
- priorSelectionInformation.push({
- element: curFocusedElem,
- left: curFocusedElem.scrollLeft,
- top: curFocusedElem.scrollTop
- });
- "function" === typeof containerInfo.focus && containerInfo.focus();
- for (
- containerInfo = 0;
- containerInfo < priorSelectionInformation.length;
- containerInfo++
- )
- (curFocusedElem = priorSelectionInformation[containerInfo]),
- (curFocusedElem.element.scrollLeft = curFocusedElem.left),
- (curFocusedElem.element.scrollTop = curFocusedElem.top);
- }
- }
function constructSelectEvent(
dispatchQueue,
nativeEvent,
@@ -5932,7 +5803,7 @@ __DEV__ &&
null;
hookTypesUpdateIndexDev = -1;
null !== current &&
- (current.flags & 31457280) !== (workInProgress.flags & 31457280) &&
+ (current.flags & 29360128) !== (workInProgress.flags & 29360128) &&
(current.mode & ConcurrentMode) !== NoMode &&
error$jscomp$0(
"Internal React error: Expected static flag was missing. Please notify the React team."
@@ -9303,14 +9174,14 @@ __DEV__ &&
if (null === ref)
null !== current &&
null !== current.ref &&
- (workInProgress.flags |= 2097664);
+ (workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
);
if (null === current || current.ref !== ref)
- workInProgress.flags |= 2097664;
+ workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
@@ -9787,32 +9658,32 @@ __DEV__ &&
return current;
}
function updateSuspenseComponent(current, workInProgress, renderLanes) {
- var JSCompiler_object_inline_digest_2366;
- var JSCompiler_object_inline_stack_2367 = workInProgress.pendingProps;
+ var JSCompiler_object_inline_digest_2403;
+ var JSCompiler_object_inline_stack_2404 = workInProgress.pendingProps;
shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128);
- var JSCompiler_object_inline_componentStack_2368 = !1;
+ var JSCompiler_object_inline_componentStack_2405 = !1;
var didSuspend = 0 !== (workInProgress.flags & 128);
- (JSCompiler_object_inline_digest_2366 = didSuspend) ||
- (JSCompiler_object_inline_digest_2366 =
+ (JSCompiler_object_inline_digest_2403 = didSuspend) ||
+ (JSCompiler_object_inline_digest_2403 =
null !== current && null === current.memoizedState
? !1
: 0 !== (suspenseStackCursor.current & ForceSuspenseFallback));
- JSCompiler_object_inline_digest_2366 &&
- ((JSCompiler_object_inline_componentStack_2368 = !0),
+ JSCompiler_object_inline_digest_2403 &&
+ ((JSCompiler_object_inline_componentStack_2405 = !0),
(workInProgress.flags &= -129));
- JSCompiler_object_inline_digest_2366 = 0 !== (workInProgress.flags & 32);
+ JSCompiler_object_inline_digest_2403 = 0 !== (workInProgress.flags & 32);
workInProgress.flags &= -33;
if (null === current) {
if (isHydrating) {
- JSCompiler_object_inline_componentStack_2368
+ JSCompiler_object_inline_componentStack_2405
? pushPrimaryTreeSuspenseHandler(workInProgress)
: reuseSuspenseHandlerOnStack(workInProgress);
if (isHydrating) {
- var JSCompiler_object_inline_message_2365 = nextHydratableInstance;
+ var JSCompiler_object_inline_message_2402 = nextHydratableInstance;
var JSCompiler_temp;
- if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2365)) {
+ if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2402)) {
c: {
- var instance = JSCompiler_object_inline_message_2365;
+ var instance = JSCompiler_object_inline_message_2402;
for (
JSCompiler_temp = rootOrSingletonContext;
8 !== instance.nodeType;
@@ -9854,89 +9725,89 @@ __DEV__ &&
JSCompiler_temp &&
(warnNonHydratedInstance(
workInProgress,
- JSCompiler_object_inline_message_2365
+ JSCompiler_object_inline_message_2402
),
throwOnHydrationMismatch(workInProgress));
}
- JSCompiler_object_inline_message_2365 = workInProgress.memoizedState;
+ JSCompiler_object_inline_message_2402 = workInProgress.memoizedState;
if (
- null !== JSCompiler_object_inline_message_2365 &&
- ((JSCompiler_object_inline_message_2365 =
- JSCompiler_object_inline_message_2365.dehydrated),
- null !== JSCompiler_object_inline_message_2365)
+ null !== JSCompiler_object_inline_message_2402 &&
+ ((JSCompiler_object_inline_message_2402 =
+ JSCompiler_object_inline_message_2402.dehydrated),
+ null !== JSCompiler_object_inline_message_2402)
)
return (
- isSuspenseInstanceFallback(JSCompiler_object_inline_message_2365)
+ isSuspenseInstanceFallback(JSCompiler_object_inline_message_2402)
? (workInProgress.lanes = 32)
: (workInProgress.lanes = 536870912),
null
);
popSuspenseHandler(workInProgress);
}
- JSCompiler_object_inline_message_2365 =
- JSCompiler_object_inline_stack_2367.children;
- JSCompiler_temp = JSCompiler_object_inline_stack_2367.fallback;
- if (JSCompiler_object_inline_componentStack_2368)
+ JSCompiler_object_inline_message_2402 =
+ JSCompiler_object_inline_stack_2404.children;
+ JSCompiler_temp = JSCompiler_object_inline_stack_2404.fallback;
+ if (JSCompiler_object_inline_componentStack_2405)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_stack_2367 =
+ (JSCompiler_object_inline_stack_2404 =
mountSuspenseFallbackChildren(
workInProgress,
- JSCompiler_object_inline_message_2365,
+ JSCompiler_object_inline_message_2402,
JSCompiler_temp,
renderLanes
)),
- (JSCompiler_object_inline_componentStack_2368 =
+ (JSCompiler_object_inline_componentStack_2405 =
workInProgress.child),
- (JSCompiler_object_inline_componentStack_2368.memoizedState =
+ (JSCompiler_object_inline_componentStack_2405.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_componentStack_2368.childLanes =
+ (JSCompiler_object_inline_componentStack_2405.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2366,
+ JSCompiler_object_inline_digest_2403,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
- JSCompiler_object_inline_stack_2367
+ JSCompiler_object_inline_stack_2404
);
if (
"number" ===
- typeof JSCompiler_object_inline_stack_2367.unstable_expectedLoadTime
+ typeof JSCompiler_object_inline_stack_2404.unstable_expectedLoadTime
)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_stack_2367 =
+ (JSCompiler_object_inline_stack_2404 =
mountSuspenseFallbackChildren(
workInProgress,
- JSCompiler_object_inline_message_2365,
+ JSCompiler_object_inline_message_2402,
JSCompiler_temp,
renderLanes
)),
- (JSCompiler_object_inline_componentStack_2368 =
+ (JSCompiler_object_inline_componentStack_2405 =
workInProgress.child),
- (JSCompiler_object_inline_componentStack_2368.memoizedState =
+ (JSCompiler_object_inline_componentStack_2405.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_componentStack_2368.childLanes =
+ (JSCompiler_object_inline_componentStack_2405.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2366,
+ JSCompiler_object_inline_digest_2403,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress.lanes = 4194304),
- JSCompiler_object_inline_stack_2367
+ JSCompiler_object_inline_stack_2404
);
pushPrimaryTreeSuspenseHandler(workInProgress);
return mountSuspensePrimaryChildren(
workInProgress,
- JSCompiler_object_inline_message_2365
+ JSCompiler_object_inline_message_2402
);
}
var prevState = current.memoizedState;
if (
null !== prevState &&
- ((JSCompiler_object_inline_message_2365 = prevState.dehydrated),
- null !== JSCompiler_object_inline_message_2365)
+ ((JSCompiler_object_inline_message_2402 = prevState.dehydrated),
+ null !== JSCompiler_object_inline_message_2402)
) {
if (didSuspend)
workInProgress.flags & 256
@@ -9953,32 +9824,32 @@ __DEV__ &&
(workInProgress.flags |= 128),
(workInProgress = null))
: (reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_componentStack_2368 =
- JSCompiler_object_inline_stack_2367.fallback),
- (JSCompiler_object_inline_message_2365 = workInProgress.mode),
- (JSCompiler_object_inline_stack_2367 = createFiberFromOffscreen(
+ (JSCompiler_object_inline_componentStack_2405 =
+ JSCompiler_object_inline_stack_2404.fallback),
+ (JSCompiler_object_inline_message_2402 = workInProgress.mode),
+ (JSCompiler_object_inline_stack_2404 = createFiberFromOffscreen(
{
mode: "visible",
- children: JSCompiler_object_inline_stack_2367.children
+ children: JSCompiler_object_inline_stack_2404.children
},
- JSCompiler_object_inline_message_2365,
+ JSCompiler_object_inline_message_2402,
0,
null
)),
- (JSCompiler_object_inline_componentStack_2368 =
+ (JSCompiler_object_inline_componentStack_2405 =
createFiberFromFragment(
- JSCompiler_object_inline_componentStack_2368,
- JSCompiler_object_inline_message_2365,
+ JSCompiler_object_inline_componentStack_2405,
+ JSCompiler_object_inline_message_2402,
renderLanes,
null
)),
- (JSCompiler_object_inline_componentStack_2368.flags |= 2),
- (JSCompiler_object_inline_stack_2367.return = workInProgress),
- (JSCompiler_object_inline_componentStack_2368.return =
+ (JSCompiler_object_inline_componentStack_2405.flags |= 2),
+ (JSCompiler_object_inline_stack_2404.return = workInProgress),
+ (JSCompiler_object_inline_componentStack_2405.return =
workInProgress),
- (JSCompiler_object_inline_stack_2367.sibling =
- JSCompiler_object_inline_componentStack_2368),
- (workInProgress.child = JSCompiler_object_inline_stack_2367),
+ (JSCompiler_object_inline_stack_2404.sibling =
+ JSCompiler_object_inline_componentStack_2405),
+ (workInProgress.child = JSCompiler_object_inline_stack_2404),
(workInProgress.mode & ConcurrentMode) !== NoMode &&
reconcileChildFibers(
workInProgress,
@@ -9986,63 +9857,63 @@ __DEV__ &&
null,
renderLanes
),
- (JSCompiler_object_inline_stack_2367 = workInProgress.child),
- (JSCompiler_object_inline_stack_2367.memoizedState =
+ (JSCompiler_object_inline_stack_2404 = workInProgress.child),
+ (JSCompiler_object_inline_stack_2404.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_stack_2367.childLanes =
+ (JSCompiler_object_inline_stack_2404.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2366,
+ JSCompiler_object_inline_digest_2403,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress =
- JSCompiler_object_inline_componentStack_2368));
+ JSCompiler_object_inline_componentStack_2405));
else if (
(pushPrimaryTreeSuspenseHandler(workInProgress),
isHydrating &&
error$jscomp$0(
"We should not be hydrating here. This is a bug in React. Please file a bug."
),
- isSuspenseInstanceFallback(JSCompiler_object_inline_message_2365))
+ isSuspenseInstanceFallback(JSCompiler_object_inline_message_2402))
) {
- JSCompiler_object_inline_digest_2366 =
- JSCompiler_object_inline_message_2365.nextSibling &&
- JSCompiler_object_inline_message_2365.nextSibling.dataset;
- if (JSCompiler_object_inline_digest_2366) {
- JSCompiler_temp = JSCompiler_object_inline_digest_2366.dgst;
- var message = JSCompiler_object_inline_digest_2366.msg;
- instance = JSCompiler_object_inline_digest_2366.stck;
- var componentStack = JSCompiler_object_inline_digest_2366.cstck;
+ JSCompiler_object_inline_digest_2403 =
+ JSCompiler_object_inline_message_2402.nextSibling &&
+ JSCompiler_object_inline_message_2402.nextSibling.dataset;
+ if (JSCompiler_object_inline_digest_2403) {
+ JSCompiler_temp = JSCompiler_object_inline_digest_2403.dgst;
+ var message = JSCompiler_object_inline_digest_2403.msg;
+ instance = JSCompiler_object_inline_digest_2403.stck;
+ var componentStack = JSCompiler_object_inline_digest_2403.cstck;
}
- JSCompiler_object_inline_message_2365 = message;
- JSCompiler_object_inline_digest_2366 = JSCompiler_temp;
- JSCompiler_object_inline_stack_2367 = instance;
- JSCompiler_temp = JSCompiler_object_inline_componentStack_2368 =
+ JSCompiler_object_inline_message_2402 = message;
+ JSCompiler_object_inline_digest_2403 = JSCompiler_temp;
+ JSCompiler_object_inline_stack_2404 = instance;
+ JSCompiler_temp = JSCompiler_object_inline_componentStack_2405 =
componentStack;
- JSCompiler_object_inline_componentStack_2368 =
- JSCompiler_object_inline_message_2365
- ? Error(JSCompiler_object_inline_message_2365)
+ JSCompiler_object_inline_componentStack_2405 =
+ JSCompiler_object_inline_message_2402
+ ? Error(JSCompiler_object_inline_message_2402)
: Error(
"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
);
- JSCompiler_object_inline_componentStack_2368.stack =
- JSCompiler_object_inline_stack_2367 || "";
- JSCompiler_object_inline_componentStack_2368.digest =
- JSCompiler_object_inline_digest_2366;
- JSCompiler_object_inline_digest_2366 =
+ JSCompiler_object_inline_componentStack_2405.stack =
+ JSCompiler_object_inline_stack_2404 || "";
+ JSCompiler_object_inline_componentStack_2405.digest =
+ JSCompiler_object_inline_digest_2403;
+ JSCompiler_object_inline_digest_2403 =
void 0 === JSCompiler_temp ? null : JSCompiler_temp;
- JSCompiler_object_inline_stack_2367 = {
- value: JSCompiler_object_inline_componentStack_2368,
+ JSCompiler_object_inline_stack_2404 = {
+ value: JSCompiler_object_inline_componentStack_2405,
source: null,
- stack: JSCompiler_object_inline_digest_2366
+ stack: JSCompiler_object_inline_digest_2403
};
- "string" === typeof JSCompiler_object_inline_digest_2366 &&
+ "string" === typeof JSCompiler_object_inline_digest_2403 &&
CapturedStacks.set(
- JSCompiler_object_inline_componentStack_2368,
- JSCompiler_object_inline_stack_2367
+ JSCompiler_object_inline_componentStack_2405,
+ JSCompiler_object_inline_stack_2404
);
- queueHydrationError(JSCompiler_object_inline_stack_2367);
+ queueHydrationError(JSCompiler_object_inline_stack_2404);
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
workInProgress,
@@ -10056,44 +9927,44 @@ __DEV__ &&
renderLanes,
!1
),
- (JSCompiler_object_inline_digest_2366 =
+ (JSCompiler_object_inline_digest_2403 =
0 !== (renderLanes & current.childLanes)),
- didReceiveUpdate || JSCompiler_object_inline_digest_2366)
+ didReceiveUpdate || JSCompiler_object_inline_digest_2403)
) {
- JSCompiler_object_inline_digest_2366 = workInProgressRoot;
+ JSCompiler_object_inline_digest_2403 = workInProgressRoot;
if (
- null !== JSCompiler_object_inline_digest_2366 &&
- ((JSCompiler_object_inline_stack_2367 = renderLanes & -renderLanes),
- (JSCompiler_object_inline_stack_2367 =
- 0 !== (JSCompiler_object_inline_stack_2367 & 42)
+ null !== JSCompiler_object_inline_digest_2403 &&
+ ((JSCompiler_object_inline_stack_2404 = renderLanes & -renderLanes),
+ (JSCompiler_object_inline_stack_2404 =
+ 0 !== (JSCompiler_object_inline_stack_2404 & 42)
? 1
: getBumpedLaneForHydrationByLane(
- JSCompiler_object_inline_stack_2367
+ JSCompiler_object_inline_stack_2404
)),
- (JSCompiler_object_inline_stack_2367 =
+ (JSCompiler_object_inline_stack_2404 =
0 !==
- (JSCompiler_object_inline_stack_2367 &
- (JSCompiler_object_inline_digest_2366.suspendedLanes |
+ (JSCompiler_object_inline_stack_2404 &
+ (JSCompiler_object_inline_digest_2403.suspendedLanes |
renderLanes))
? 0
- : JSCompiler_object_inline_stack_2367),
- 0 !== JSCompiler_object_inline_stack_2367 &&
- JSCompiler_object_inline_stack_2367 !== prevState.retryLane)
+ : JSCompiler_object_inline_stack_2404),
+ 0 !== JSCompiler_object_inline_stack_2404 &&
+ JSCompiler_object_inline_stack_2404 !== prevState.retryLane)
)
throw (
- ((prevState.retryLane = JSCompiler_object_inline_stack_2367),
+ ((prevState.retryLane = JSCompiler_object_inline_stack_2404),
enqueueConcurrentRenderForLane(
current,
- JSCompiler_object_inline_stack_2367
+ JSCompiler_object_inline_stack_2404
),
scheduleUpdateOnFiber(
- JSCompiler_object_inline_digest_2366,
+ JSCompiler_object_inline_digest_2403,
current,
- JSCompiler_object_inline_stack_2367
+ JSCompiler_object_inline_stack_2404
),
SelectiveHydrationException)
);
- JSCompiler_object_inline_message_2365.data ===
+ JSCompiler_object_inline_message_2402.data ===
SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible();
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
@@ -10101,14 +9972,14 @@ __DEV__ &&
renderLanes
);
} else
- JSCompiler_object_inline_message_2365.data ===
+ JSCompiler_object_inline_message_2402.data ===
SUSPENSE_PENDING_START_DATA
? ((workInProgress.flags |= 192),
(workInProgress.child = current.child),
(workInProgress = null))
: ((renderLanes = prevState.treeContext),
(nextHydratableInstance = getNextHydratable(
- JSCompiler_object_inline_message_2365.nextSibling
+ JSCompiler_object_inline_message_2402.nextSibling
)),
(hydrationParentFiber = workInProgress),
(isHydrating = !0),
@@ -10126,72 +9997,72 @@ __DEV__ &&
(treeContextProvider = workInProgress)),
(workInProgress = mountSuspensePrimaryChildren(
workInProgress,
- JSCompiler_object_inline_stack_2367.children
+ JSCompiler_object_inline_stack_2404.children
)),
(workInProgress.flags |= 4096));
return workInProgress;
}
- if (JSCompiler_object_inline_componentStack_2368)
+ if (JSCompiler_object_inline_componentStack_2405)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_componentStack_2368 =
- JSCompiler_object_inline_stack_2367.fallback),
- (JSCompiler_object_inline_message_2365 = workInProgress.mode),
+ (JSCompiler_object_inline_componentStack_2405 =
+ JSCompiler_object_inline_stack_2404.fallback),
+ (JSCompiler_object_inline_message_2402 = workInProgress.mode),
(JSCompiler_temp = current.child),
(instance = JSCompiler_temp.sibling),
(componentStack = {
mode: "hidden",
- children: JSCompiler_object_inline_stack_2367.children
+ children: JSCompiler_object_inline_stack_2404.children
}),
- (JSCompiler_object_inline_message_2365 & ConcurrentMode) === NoMode &&
+ (JSCompiler_object_inline_message_2402 & ConcurrentMode) === NoMode &&
workInProgress.child !== JSCompiler_temp
- ? ((JSCompiler_object_inline_stack_2367 = workInProgress.child),
- (JSCompiler_object_inline_stack_2367.childLanes = 0),
- (JSCompiler_object_inline_stack_2367.pendingProps =
+ ? ((JSCompiler_object_inline_stack_2404 = workInProgress.child),
+ (JSCompiler_object_inline_stack_2404.childLanes = 0),
+ (JSCompiler_object_inline_stack_2404.pendingProps =
componentStack),
workInProgress.mode & ProfileMode &&
- ((JSCompiler_object_inline_stack_2367.actualDuration = -0),
- (JSCompiler_object_inline_stack_2367.actualStartTime = -1.1),
- (JSCompiler_object_inline_stack_2367.selfBaseDuration =
+ ((JSCompiler_object_inline_stack_2404.actualDuration = -0),
+ (JSCompiler_object_inline_stack_2404.actualStartTime = -1.1),
+ (JSCompiler_object_inline_stack_2404.selfBaseDuration =
JSCompiler_temp.selfBaseDuration),
- (JSCompiler_object_inline_stack_2367.treeBaseDuration =
+ (JSCompiler_object_inline_stack_2404.treeBaseDuration =
JSCompiler_temp.treeBaseDuration)),
(workInProgress.deletions = null))
- : ((JSCompiler_object_inline_stack_2367 = createWorkInProgress(
+ : ((JSCompiler_object_inline_stack_2404 = createWorkInProgress(
JSCompiler_temp,
componentStack
)),
- (JSCompiler_object_inline_stack_2367.subtreeFlags =
- JSCompiler_temp.subtreeFlags & 31457280)),
+ (JSCompiler_object_inline_stack_2404.subtreeFlags =
+ JSCompiler_temp.subtreeFlags & 29360128)),
null !== instance
- ? (JSCompiler_object_inline_componentStack_2368 =
+ ? (JSCompiler_object_inline_componentStack_2405 =
createWorkInProgress(
instance,
- JSCompiler_object_inline_componentStack_2368
+ JSCompiler_object_inline_componentStack_2405
))
- : ((JSCompiler_object_inline_componentStack_2368 =
+ : ((JSCompiler_object_inline_componentStack_2405 =
createFiberFromFragment(
- JSCompiler_object_inline_componentStack_2368,
- JSCompiler_object_inline_message_2365,
+ JSCompiler_object_inline_componentStack_2405,
+ JSCompiler_object_inline_message_2402,
renderLanes,
null
)),
- (JSCompiler_object_inline_componentStack_2368.flags |= 2)),
- (JSCompiler_object_inline_componentStack_2368.return =
+ (JSCompiler_object_inline_componentStack_2405.flags |= 2)),
+ (JSCompiler_object_inline_componentStack_2405.return =
workInProgress),
- (JSCompiler_object_inline_stack_2367.return = workInProgress),
- (JSCompiler_object_inline_stack_2367.sibling =
- JSCompiler_object_inline_componentStack_2368),
- (workInProgress.child = JSCompiler_object_inline_stack_2367),
- (JSCompiler_object_inline_stack_2367 =
- JSCompiler_object_inline_componentStack_2368),
- (JSCompiler_object_inline_componentStack_2368 = workInProgress.child),
- (JSCompiler_object_inline_message_2365 = current.child.memoizedState),
- null === JSCompiler_object_inline_message_2365
- ? (JSCompiler_object_inline_message_2365 =
+ (JSCompiler_object_inline_stack_2404.return = workInProgress),
+ (JSCompiler_object_inline_stack_2404.sibling =
+ JSCompiler_object_inline_componentStack_2405),
+ (workInProgress.child = JSCompiler_object_inline_stack_2404),
+ (JSCompiler_object_inline_stack_2404 =
+ JSCompiler_object_inline_componentStack_2405),
+ (JSCompiler_object_inline_componentStack_2405 = workInProgress.child),
+ (JSCompiler_object_inline_message_2402 = current.child.memoizedState),
+ null === JSCompiler_object_inline_message_2402
+ ? (JSCompiler_object_inline_message_2402 =
mountSuspenseOffscreenState(renderLanes))
: ((JSCompiler_temp =
- JSCompiler_object_inline_message_2365.cachePool),
+ JSCompiler_object_inline_message_2402.cachePool),
null !== JSCompiler_temp
? ((instance = CacheContext._currentValue),
(JSCompiler_temp =
@@ -10199,45 +10070,45 @@ __DEV__ &&
? { parent: instance, pool: instance }
: JSCompiler_temp))
: (JSCompiler_temp = getSuspendedCache()),
- (JSCompiler_object_inline_message_2365 = {
+ (JSCompiler_object_inline_message_2402 = {
baseLanes:
- JSCompiler_object_inline_message_2365.baseLanes | renderLanes,
+ JSCompiler_object_inline_message_2402.baseLanes | renderLanes,
cachePool: JSCompiler_temp
})),
- (JSCompiler_object_inline_componentStack_2368.memoizedState =
- JSCompiler_object_inline_message_2365),
- (JSCompiler_object_inline_componentStack_2368.childLanes =
+ (JSCompiler_object_inline_componentStack_2405.memoizedState =
+ JSCompiler_object_inline_message_2402),
+ (JSCompiler_object_inline_componentStack_2405.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2366,
+ JSCompiler_object_inline_digest_2403,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
- JSCompiler_object_inline_stack_2367
+ JSCompiler_object_inline_stack_2404
);
pushPrimaryTreeSuspenseHandler(workInProgress);
- JSCompiler_object_inline_digest_2366 = current.child;
- current = JSCompiler_object_inline_digest_2366.sibling;
- JSCompiler_object_inline_digest_2366 = createWorkInProgress(
- JSCompiler_object_inline_digest_2366,
+ JSCompiler_object_inline_digest_2403 = current.child;
+ current = JSCompiler_object_inline_digest_2403.sibling;
+ JSCompiler_object_inline_digest_2403 = createWorkInProgress(
+ JSCompiler_object_inline_digest_2403,
{
mode: "visible",
- children: JSCompiler_object_inline_stack_2367.children
+ children: JSCompiler_object_inline_stack_2404.children
}
);
(workInProgress.mode & ConcurrentMode) === NoMode &&
- (JSCompiler_object_inline_digest_2366.lanes = renderLanes);
- JSCompiler_object_inline_digest_2366.return = workInProgress;
- JSCompiler_object_inline_digest_2366.sibling = null;
+ (JSCompiler_object_inline_digest_2403.lanes = renderLanes);
+ JSCompiler_object_inline_digest_2403.return = workInProgress;
+ JSCompiler_object_inline_digest_2403.sibling = null;
null !== current &&
((renderLanes = workInProgress.deletions),
null === renderLanes
? ((workInProgress.deletions = [current]),
(workInProgress.flags |= 16))
: renderLanes.push(current));
- workInProgress.child = JSCompiler_object_inline_digest_2366;
+ workInProgress.child = JSCompiler_object_inline_digest_2403;
workInProgress.memoizedState = null;
- return JSCompiler_object_inline_digest_2366;
+ return JSCompiler_object_inline_digest_2403;
}
function mountSuspensePrimaryChildren(workInProgress, primaryChildren) {
primaryChildren = createFiberFromOffscreen(
@@ -12114,7 +11985,7 @@ __DEV__ &&
if (
((firstChild = nextEffect),
(root = firstChild.child),
- 0 !== (firstChild.subtreeFlags & 1028) && null !== root)
+ 0 !== (firstChild.subtreeFlags & 1024) && null !== root)
)
(root.return = firstChild), (nextEffect = root);
else
@@ -12173,9 +12044,6 @@ __DEV__ &&
}
nextEffect = firstChild.return;
}
- firstChild = shouldFireAfterActiveInstanceBlur;
- shouldFireAfterActiveInstanceBlur = !1;
- return firstChild;
}
function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
var flags = finishedWork.flags;
@@ -12708,12 +12576,6 @@ __DEV__ &&
}
});
}
- function commitMutationEffects(root, finishedWork, committedLanes) {
- inProgressLanes = committedLanes;
- inProgressRoot = root;
- commitMutationEffectsOnFiber(finishedWork, root);
- inProgressRoot = inProgressLanes = null;
- }
function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
var deletions = parentFiber.deletions;
if (null !== deletions)
@@ -12851,7 +12713,9 @@ __DEV__ &&
if (
((hoistableRoot = maybeNodes[i]),
hoistableRoot.getAttribute("href") ===
- (null == current.href ? null : current.href) &&
+ (null == current.href || "" === current.href
+ ? null
+ : current.href) &&
hoistableRoot.getAttribute("rel") ===
(null == current.rel ? null : current.rel) &&
hoistableRoot.getAttribute("title") ===
@@ -13292,12 +13156,6 @@ __DEV__ &&
parentFiber = parentFiber.sibling;
}
}
- function commitLayoutEffects(finishedWork, root, committedLanes) {
- inProgressLanes = committedLanes;
- inProgressRoot = root;
- commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);
- inProgressRoot = inProgressLanes = null;
- }
function recursivelyTraverseLayoutEffects(root, parentFiber) {
if (parentFiber.subtreeFlags & 8772)
for (parentFiber = parentFiber.child; null !== parentFiber; )
@@ -13545,6 +13403,14 @@ __DEV__ &&
flags & 2048 &&
commitHookPassiveMountEffects(finishedWork, Passive | HasEffect);
break;
+ case 1:
+ recursivelyTraversePassiveMountEffects(
+ finishedRoot,
+ finishedWork,
+ committedLanes,
+ committedTransitions
+ );
+ break;
case 3:
var prevEffectDuration = pushNestedEffectDurations();
recursivelyTraversePassiveMountEffects(
@@ -14171,7 +14037,7 @@ __DEV__ &&
(workInProgress.deletions = null),
(workInProgress.actualDuration = -0),
(workInProgress.actualStartTime = -1.1));
- workInProgress.flags = current.flags & 31457280;
+ workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -14209,7 +14075,7 @@ __DEV__ &&
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
- workInProgress.flags &= 31457282;
+ workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
@@ -14519,8 +14385,8 @@ __DEV__ &&
)
(newChildLanes |= _child2.lanes | _child2.childLanes),
- (subtreeFlags |= _child2.subtreeFlags & 31457280),
- (subtreeFlags |= _child2.flags & 31457280),
+ (subtreeFlags |= _child2.subtreeFlags & 29360128),
+ (subtreeFlags |= _child2.flags & 29360128),
(_treeBaseDuration += _child2.treeBaseDuration),
(_child2 = _child2.sibling);
completedWork.treeBaseDuration = _treeBaseDuration;
@@ -14532,8 +14398,8 @@ __DEV__ &&
)
(newChildLanes |=
_treeBaseDuration.lanes | _treeBaseDuration.childLanes),
- (subtreeFlags |= _treeBaseDuration.subtreeFlags & 31457280),
- (subtreeFlags |= _treeBaseDuration.flags & 31457280),
+ (subtreeFlags |= _treeBaseDuration.subtreeFlags & 29360128),
+ (subtreeFlags |= _treeBaseDuration.flags & 29360128),
(_treeBaseDuration.return = completedWork),
(_treeBaseDuration = _treeBaseDuration.sibling);
else if ((completedWork.mode & ProfileMode) !== NoMode) {
@@ -15484,21 +15350,17 @@ __DEV__ &&
default:
throw Error("Unknown root exit status.");
}
- shouldTimeSlice.finishedWork = forceSync;
- shouldTimeSlice.finishedLanes = lanes;
if (null !== ReactSharedInternals.actQueue)
commitRoot(
shouldTimeSlice,
+ forceSync,
+ lanes,
workInProgressRootRecoverableErrors,
workInProgressTransitions,
workInProgressRootDidIncludeRecursiveRenderUpdate,
workInProgressDeferredLane,
workInProgressRootInterleavedUpdatedLanes,
- workInProgressSuspendedRetryLanes,
- exitStatus,
- IMMEDIATE_COMMIT,
- renderStartTime,
- 0
+ workInProgressSuspendedRetryLanes
);
else {
if (
@@ -15516,7 +15378,7 @@ __DEV__ &&
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
- if (0 !== getNextLanes(shouldTimeSlice, 0)) break a;
+ if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;
shouldTimeSlice.timeoutHandle = scheduleTimeout(
commitRootWhenReady.bind(
null,
@@ -15578,18 +15440,24 @@ __DEV__ &&
completedRenderStartTime,
completedRenderEndTime
) {
- var subtreeFlags = finishedWork.subtreeFlags;
- if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408))
+ root.timeoutHandle = noTimeout;
+ suspendedCommitReason = finishedWork.subtreeFlags;
+ if (
+ suspendedCommitReason & 8192 ||
+ 16785408 === (suspendedCommitReason & 16785408)
+ )
if (
((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }),
accumulateSuspenseyCommitOnFiber(finishedWork),
- (finishedWork = waitForCommitToBeReady()),
- null !== finishedWork)
+ (suspendedCommitReason = waitForCommitToBeReady()),
+ null !== suspendedCommitReason)
) {
- root.cancelPendingCommit = finishedWork(
+ root.cancelPendingCommit = suspendedCommitReason(
commitRoot.bind(
null,
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
@@ -15612,16 +15480,14 @@ __DEV__ &&
}
commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
+ suspendedRetryLanes
);
}
function isRenderConsistentWithExternalStores(finishedWork) {
@@ -15704,8 +15570,6 @@ __DEV__ &&
}
}
function prepareFreshStack(root, lanes) {
- root.finishedWork = null;
- root.finishedLanes = 0;
var timeoutHandle = root.timeoutHandle;
timeoutHandle !== noTimeout &&
((root.timeoutHandle = noTimeout), cancelTimeout(timeoutHandle));
@@ -16085,7 +15949,7 @@ __DEV__ &&
}
null !== ReactSharedInternals.actQueue
? workLoopSync()
- : workLoopConcurrent();
+ : workLoopConcurrentByScheduler();
break;
} catch (thrownValue$43) {
handleThrow(root, thrownValue$43);
@@ -16108,7 +15972,7 @@ __DEV__ &&
finishQueueingConcurrentUpdates();
return workInProgressRootExitStatus;
}
- function workLoopConcurrent() {
+ function workLoopConcurrentByScheduler() {
for (; null !== workInProgress && !shouldYield(); )
performUnitOfWork(workInProgress);
}
@@ -16320,179 +16184,350 @@ __DEV__ &&
}
function commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
- ) {
- var prevTransition = ReactSharedInternals.T,
- previousUpdateLanePriority = ReactDOMSharedInternals.p;
- try {
- (ReactDOMSharedInternals.p = DiscreteEventPriority),
- (ReactSharedInternals.T = null),
- commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- previousUpdateLanePriority,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
- );
- } finally {
- (ReactSharedInternals.T = prevTransition),
- (ReactDOMSharedInternals.p = previousUpdateLanePriority);
- }
- }
- function commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- renderPriorityLevel,
- spawnedLane,
- updatedLanes,
suspendedRetryLanes
) {
- do flushPassiveEffects();
- while (null !== rootWithPendingPassiveEffects);
+ root.cancelPendingCommit = null;
+ do flushPendingEffects();
+ while (pendingEffectsStatus !== NO_PENDING_EFFECTS);
ReactStrictModeWarnings.flushLegacyContextWarning();
ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
throw Error("Should not already be working.");
- var finishedWork = root.finishedWork;
- didIncludeRenderPhaseUpdate = root.finishedLanes;
null !== injectedProfilingHooks &&
"function" === typeof injectedProfilingHooks.markCommitStarted &&
- injectedProfilingHooks.markCommitStarted(didIncludeRenderPhaseUpdate);
- if (null === finishedWork) return markCommitStopped(), null;
- 0 === didIncludeRenderPhaseUpdate &&
- error$jscomp$0(
- "root.finishedLanes should not be empty during a commit. This is a bug in React."
- );
- root.finishedWork = null;
- root.finishedLanes = 0;
- if (finishedWork === root.current)
- throw Error(
- "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ injectedProfilingHooks.markCommitStarted(lanes);
+ if (null === finishedWork) markCommitStopped();
+ else {
+ 0 === lanes &&
+ error$jscomp$0(
+ "finishedLanes should not be empty during a commit. This is a bug in React."
+ );
+ if (finishedWork === root.current)
+ throw Error(
+ "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ );
+ didIncludeRenderPhaseUpdate =
+ finishedWork.lanes | finishedWork.childLanes;
+ didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
+ markRootFinished(
+ root,
+ lanes,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
);
- var remainingLanes = finishedWork.lanes | finishedWork.childLanes;
- remainingLanes |= concurrentlyUpdatedLanes;
- markRootFinished(
- root,
- didIncludeRenderPhaseUpdate,
- remainingLanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes
- );
- root === workInProgressRoot &&
- ((workInProgress = workInProgressRoot = null),
- (workInProgressRootRenderLanes = 0));
- spawnedLane = !1;
- 0 !== (finishedWork.subtreeFlags & 10256) ||
- 0 !== (finishedWork.flags & 10256)
- ? ((spawnedLane = !0),
- (pendingPassiveEffectsRemainingLanes = remainingLanes),
- (pendingPassiveTransitions = transitions),
- (root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null),
- scheduleCallback$1(NormalPriority$1, function () {
- flushPassiveEffects(!0);
- return null;
- }))
- : ((root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null));
- commitStartTime = now();
- transitions = 0 !== (finishedWork.flags & 15990);
- 0 !== (finishedWork.subtreeFlags & 15990) || transitions
- ? ((transitions = ReactSharedInternals.T),
- (ReactSharedInternals.T = null),
- (updatedLanes = ReactDOMSharedInternals.p),
- (ReactDOMSharedInternals.p = DiscreteEventPriority),
- (suspendedRetryLanes = executionContext),
- (executionContext |= CommitContext),
- commitBeforeMutationEffects(root, finishedWork),
- commitMutationEffects(
- root,
- finishedWork,
- didIncludeRenderPhaseUpdate
- ),
- restoreSelection(selectionInformation, root.containerInfo),
- (_enabled = !!eventsEnabled),
- (selectionInformation = eventsEnabled = null),
- (root.current = finishedWork),
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markLayoutEffectsStarted &&
- injectedProfilingHooks.markLayoutEffectsStarted(
- didIncludeRenderPhaseUpdate
- ),
- commitLayoutEffects(finishedWork, root, didIncludeRenderPhaseUpdate),
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markLayoutEffectsStopped &&
- injectedProfilingHooks.markLayoutEffectsStopped(),
- requestPaint(),
- (executionContext = suspendedRetryLanes),
- (ReactDOMSharedInternals.p = updatedLanes),
- (ReactSharedInternals.T = transitions))
- : (root.current = finishedWork);
- (transitions = spawnedLane)
- ? ((spawnedLane = !1),
- (rootWithPendingPassiveEffects = root),
- (pendingPassiveEffectsLanes = didIncludeRenderPhaseUpdate))
- : (releaseRootPooledCache(root, remainingLanes),
- (nestedPassiveUpdateCount = 0),
- (rootWithPassiveNestedUpdates = null));
- remainingLanes = root.pendingLanes;
- 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
- transitions || commitDoubleInvokeEffectsInDEV(root, !1);
- onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel);
- isDevToolsPresent && root.memoizedUpdaters.clear();
- onCommitRoot();
- if (null !== recoverableErrors)
- for (
- renderPriorityLevel = root.onRecoverableError, finishedWork = 0;
- finishedWork < recoverableErrors.length;
- finishedWork++
+ root === workInProgressRoot &&
+ ((workInProgress = workInProgressRoot = null),
+ (workInProgressRootRenderLanes = 0));
+ pendingFinishedWork = finishedWork;
+ pendingEffectsRoot = root;
+ pendingEffectsLanes = lanes;
+ pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
+ pendingPassiveTransitions = transitions;
+ pendingRecoverableErrors = recoverableErrors;
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? ((root.callbackNode = null),
+ (root.callbackPriority = 0),
+ scheduleCallback$1(NormalPriority$1, function () {
+ flushPassiveEffects(!0);
+ return null;
+ }))
+ : ((root.callbackNode = null), (root.callbackPriority = 0));
+ commitStartTime = now();
+ lanes = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || lanes) {
+ lanes = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ recoverableErrors = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = DiscreteEventPriority;
+ transitions = executionContext;
+ executionContext |= CommitContext;
+ try {
+ commitBeforeMutationEffects(root, finishedWork);
+ } finally {
+ (executionContext = transitions),
+ (ReactDOMSharedInternals.p = recoverableErrors),
+ (ReactSharedInternals.T = lanes);
+ }
+ }
+ pendingEffectsStatus = PENDING_MUTATION_PHASE;
+ flushMutationEffects();
+ flushLayoutEffects();
+ }
+ }
+ function flushMutationEffects() {
+ if (pendingEffectsStatus === PENDING_MUTATION_PHASE) {
+ pendingEffectsStatus = NO_PENDING_EFFECTS;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
+ if (
+ 0 !== (finishedWork.subtreeFlags & 13878) ||
+ rootMutationHasEffect
+ ) {
+ rootMutationHasEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = DiscreteEventPriority;
+ var prevExecutionContext = executionContext;
+ executionContext |= CommitContext;
+ try {
+ inProgressLanes = lanes;
+ inProgressRoot = root;
+ commitMutationEffectsOnFiber(finishedWork, root);
+ inProgressRoot = inProgressLanes = null;
+ lanes = selectionInformation;
+ var curFocusedElem = getActiveElementDeep(root.containerInfo),
+ priorFocusedElem = lanes.focusedElem,
+ priorSelectionRange = lanes.selectionRange;
+ if (
+ curFocusedElem !== priorFocusedElem &&
+ priorFocusedElem &&
+ priorFocusedElem.ownerDocument &&
+ containsNode(
+ priorFocusedElem.ownerDocument.documentElement,
+ priorFocusedElem
+ )
+ ) {
+ if (
+ null !== priorSelectionRange &&
+ hasSelectionCapabilities(priorFocusedElem)
+ ) {
+ var start = priorSelectionRange.start,
+ end = priorSelectionRange.end;
+ void 0 === end && (end = start);
+ if ("selectionStart" in priorFocusedElem)
+ (priorFocusedElem.selectionStart = start),
+ (priorFocusedElem.selectionEnd = Math.min(
+ end,
+ priorFocusedElem.value.length
+ ));
+ else {
+ var doc = priorFocusedElem.ownerDocument || document,
+ win = (doc && doc.defaultView) || window;
+ if (win.getSelection) {
+ var selection = win.getSelection(),
+ length = priorFocusedElem.textContent.length,
+ start$jscomp$0 = Math.min(
+ priorSelectionRange.start,
+ length
+ ),
+ end$jscomp$0 =
+ void 0 === priorSelectionRange.end
+ ? start$jscomp$0
+ : Math.min(priorSelectionRange.end, length);
+ !selection.extend &&
+ start$jscomp$0 > end$jscomp$0 &&
+ ((curFocusedElem = end$jscomp$0),
+ (end$jscomp$0 = start$jscomp$0),
+ (start$jscomp$0 = curFocusedElem));
+ var startMarker = getNodeForCharacterOffset(
+ priorFocusedElem,
+ start$jscomp$0
+ ),
+ endMarker = getNodeForCharacterOffset(
+ priorFocusedElem,
+ end$jscomp$0
+ );
+ if (
+ startMarker &&
+ endMarker &&
+ (1 !== selection.rangeCount ||
+ selection.anchorNode !== startMarker.node ||
+ selection.anchorOffset !== startMarker.offset ||
+ selection.focusNode !== endMarker.node ||
+ selection.focusOffset !== endMarker.offset)
+ ) {
+ var range = doc.createRange();
+ range.setStart(startMarker.node, startMarker.offset);
+ selection.removeAllRanges();
+ start$jscomp$0 > end$jscomp$0
+ ? (selection.addRange(range),
+ selection.extend(endMarker.node, endMarker.offset))
+ : (range.setEnd(endMarker.node, endMarker.offset),
+ selection.addRange(range));
+ }
+ }
+ }
+ }
+ doc = [];
+ for (
+ selection = priorFocusedElem;
+ (selection = selection.parentNode);
+
+ )
+ 1 === selection.nodeType &&
+ doc.push({
+ element: selection,
+ left: selection.scrollLeft,
+ top: selection.scrollTop
+ });
+ "function" === typeof priorFocusedElem.focus &&
+ priorFocusedElem.focus();
+ for (
+ priorFocusedElem = 0;
+ priorFocusedElem < doc.length;
+ priorFocusedElem++
+ ) {
+ var info = doc[priorFocusedElem];
+ info.element.scrollLeft = info.left;
+ info.element.scrollTop = info.top;
+ }
+ }
+ _enabled = !!eventsEnabled;
+ selectionInformation = eventsEnabled = null;
+ } finally {
+ (executionContext = prevExecutionContext),
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = rootMutationHasEffect);
+ }
+ }
+ root.current = finishedWork;
+ pendingEffectsStatus = PENDING_LAYOUT_PHASE;
+ }
+ }
+ function flushLayoutEffects() {
+ if (pendingEffectsStatus === PENDING_LAYOUT_PHASE) {
+ pendingEffectsStatus = NO_PENDING_EFFECTS;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ recoverableErrors = pendingRecoverableErrors,
+ rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
+ if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
+ rootHasLayoutEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = DiscreteEventPriority;
+ var prevExecutionContext = executionContext;
+ executionContext |= CommitContext;
+ try {
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStarted &&
+ injectedProfilingHooks.markLayoutEffectsStarted(lanes),
+ (inProgressLanes = lanes),
+ (inProgressRoot = root),
+ commitLayoutEffectOnFiber(
+ root,
+ finishedWork.alternate,
+ finishedWork
+ ),
+ (inProgressRoot = inProgressLanes = null),
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStopped &&
+ injectedProfilingHooks.markLayoutEffectsStopped();
+ } finally {
+ (executionContext = prevExecutionContext),
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = rootHasLayoutEffect);
+ }
+ }
+ requestPaint();
+ (rootHasLayoutEffect =
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256))
+ ? (pendingEffectsStatus = PENDING_PASSIVE_PHASE)
+ : ((pendingEffectsStatus = NO_PENDING_EFFECTS),
+ (pendingEffectsRoot = null),
+ releaseRootPooledCache(root, root.pendingLanes),
+ (nestedPassiveUpdateCount = 0),
+ (rootWithPassiveNestedUpdates = null));
+ previousPriority = root.pendingLanes;
+ 0 === previousPriority &&
+ (legacyErrorBoundariesThatAlreadyFailed = null);
+ rootHasLayoutEffect || commitDoubleInvokeEffectsInDEV(root, !1);
+ rootHasLayoutEffect = lanesToEventPriority(lanes);
+ finishedWork = finishedWork.stateNode;
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onCommitFiberRoot
)
- (remainingLanes = recoverableErrors[finishedWork]),
- (spawnedLane = makeErrorInfo(remainingLanes.stack)),
- runWithFiberInDEV(
- remainingLanes.source,
- renderPriorityLevel,
- remainingLanes.value,
- spawnedLane
+ try {
+ var didError = 128 === (finishedWork.current.flags & 128);
+ switch (rootHasLayoutEffect) {
+ case DiscreteEventPriority:
+ var schedulerPriority = ImmediatePriority;
+ break;
+ case ContinuousEventPriority:
+ schedulerPriority = UserBlockingPriority;
+ break;
+ case DefaultEventPriority:
+ schedulerPriority = NormalPriority$1;
+ break;
+ case IdleEventPriority:
+ schedulerPriority = IdlePriority;
+ break;
+ default:
+ schedulerPriority = NormalPriority$1;
+ }
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ finishedWork,
+ schedulerPriority,
+ didError
);
- 0 !== (pendingPassiveEffectsLanes & 3) &&
- 0 !== root.tag &&
- flushPassiveEffects();
- ensureRootIsScheduled(root);
- remainingLanes = root.pendingLanes;
- 0 !== (didIncludeRenderPhaseUpdate & 4194218) &&
- 0 !== (remainingLanes & 42)
- ? ((nestedUpdateScheduled = !0),
- root === rootWithNestedUpdates
- ? nestedUpdateCount++
- : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
- : (nestedUpdateCount = 0);
- flushSyncWorkAcrossRoots_impl(0, !1);
- markCommitStopped();
- return null;
+ } catch (err) {
+ hasLoggedError ||
+ ((hasLoggedError = !0),
+ error$jscomp$0(
+ "React instrumentation encountered an error: %s",
+ err
+ ));
+ }
+ isDevToolsPresent && root.memoizedUpdaters.clear();
+ onCommitRoot();
+ if (null !== recoverableErrors) {
+ didError = ReactSharedInternals.T;
+ schedulerPriority = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = DiscreteEventPriority;
+ ReactSharedInternals.T = null;
+ try {
+ var onRecoverableError = root.onRecoverableError;
+ for (
+ finishedWork = 0;
+ finishedWork < recoverableErrors.length;
+ finishedWork++
+ ) {
+ var recoverableError = recoverableErrors[finishedWork],
+ errorInfo = makeErrorInfo(recoverableError.stack);
+ runWithFiberInDEV(
+ recoverableError.source,
+ onRecoverableError,
+ recoverableError.value,
+ errorInfo
+ );
+ }
+ } finally {
+ (ReactSharedInternals.T = didError),
+ (ReactDOMSharedInternals.p = schedulerPriority);
+ }
+ }
+ 0 !== (pendingEffectsLanes & 3) &&
+ 0 !== root.tag &&
+ flushPendingEffects();
+ ensureRootIsScheduled(root);
+ previousPriority = root.pendingLanes;
+ 0 !== (lanes & 4194218) && 0 !== (previousPriority & 42)
+ ? ((nestedUpdateScheduled = !0),
+ root === rootWithNestedUpdates
+ ? nestedUpdateCount++
+ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
+ : (nestedUpdateCount = 0);
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ markCommitStopped();
+ }
}
function makeErrorInfo(componentStack) {
componentStack = { componentStack: componentStack };
@@ -16511,94 +16546,87 @@ __DEV__ &&
null != remainingLanes &&
((root.pooledCache = null), releaseCache(remainingLanes)));
}
+ function flushPendingEffects(wasDelayedCommit) {
+ flushMutationEffects();
+ flushLayoutEffects();
+ return flushPassiveEffects(wasDelayedCommit);
+ }
function flushPassiveEffects() {
- if (null !== rootWithPendingPassiveEffects) {
- var root = rootWithPendingPassiveEffects,
- remainingLanes = pendingPassiveEffectsRemainingLanes;
- pendingPassiveEffectsRemainingLanes = 0;
- var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
- priority =
- 0 === DefaultEventPriority || DefaultEventPriority > renderPriority
- ? DefaultEventPriority
- : renderPriority;
- renderPriority = ReactSharedInternals.T;
- var previousPriority = ReactDOMSharedInternals.p;
- try {
- ReactDOMSharedInternals.p = priority;
- ReactSharedInternals.T = null;
- if (null === rootWithPendingPassiveEffects)
- var JSCompiler_inline_result = !1;
- else {
- priority = pendingPassiveTransitions;
- pendingPassiveTransitions = null;
- var root$jscomp$0 = rootWithPendingPassiveEffects,
- lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsLanes = 0;
- if (
- (executionContext & (RenderContext | CommitContext)) !==
- NoContext
- )
- throw Error(
- "Cannot flush passive effects while already rendering."
- );
- isFlushingPassiveEffects = !0;
- didScheduleUpdateDuringPassiveEffects = !1;
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStarted &&
- injectedProfilingHooks.markPassiveEffectsStarted(lanes);
- var prevExecutionContext = executionContext;
- executionContext |= CommitContext;
- commitPassiveUnmountOnFiber(root$jscomp$0.current);
- commitPassiveMountOnFiber(
- root$jscomp$0,
- root$jscomp$0.current,
- lanes,
- priority
- );
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStopped &&
- injectedProfilingHooks.markPassiveEffectsStopped();
- commitDoubleInvokeEffectsInDEV(root$jscomp$0, !0);
- executionContext = prevExecutionContext;
- flushSyncWorkAcrossRoots_impl(0, !1);
- didScheduleUpdateDuringPassiveEffects
- ? root$jscomp$0 === rootWithPassiveNestedUpdates
- ? nestedPassiveUpdateCount++
- : ((nestedPassiveUpdateCount = 0),
- (rootWithPassiveNestedUpdates = root$jscomp$0))
- : (nestedPassiveUpdateCount = 0);
- didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects =
- !1;
- if (
- injectedHook &&
- "function" === typeof injectedHook.onPostCommitFiberRoot
- )
- try {
- injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
- } catch (err) {
- hasLoggedError ||
- ((hasLoggedError = !0),
- error$jscomp$0(
- "React instrumentation encountered an error: %s",
- err
- ));
- }
- var stateNode = root$jscomp$0.current.stateNode;
- stateNode.effectDuration = 0;
- stateNode.passiveEffectDuration = 0;
- JSCompiler_inline_result = !0;
+ if (pendingEffectsStatus !== PENDING_PASSIVE_PHASE) return !1;
+ var root = pendingEffectsRoot,
+ remainingLanes = pendingEffectsRemainingLanes;
+ pendingEffectsRemainingLanes = 0;
+ var renderPriority = lanesToEventPriority(pendingEffectsLanes),
+ priority =
+ 0 === DefaultEventPriority || DefaultEventPriority > renderPriority
+ ? DefaultEventPriority
+ : renderPriority;
+ renderPriority = ReactSharedInternals.T;
+ var previousPriority = ReactDOMSharedInternals.p;
+ try {
+ ReactDOMSharedInternals.p = priority;
+ ReactSharedInternals.T = null;
+ priority = pendingPassiveTransitions;
+ pendingPassiveTransitions = null;
+ var root$jscomp$0 = pendingEffectsRoot,
+ lanes = pendingEffectsLanes;
+ pendingEffectsStatus = NO_PENDING_EFFECTS;
+ pendingEffectsRoot = null;
+ pendingEffectsLanes = 0;
+ if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
+ throw Error("Cannot flush passive effects while already rendering.");
+ isFlushingPassiveEffects = !0;
+ didScheduleUpdateDuringPassiveEffects = !1;
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markPassiveEffectsStarted &&
+ injectedProfilingHooks.markPassiveEffectsStarted(lanes);
+ var prevExecutionContext = executionContext;
+ executionContext |= CommitContext;
+ commitPassiveUnmountOnFiber(root$jscomp$0.current);
+ commitPassiveMountOnFiber(
+ root$jscomp$0,
+ root$jscomp$0.current,
+ lanes,
+ priority
+ );
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markPassiveEffectsStopped &&
+ injectedProfilingHooks.markPassiveEffectsStopped();
+ commitDoubleInvokeEffectsInDEV(root$jscomp$0, !0);
+ executionContext = prevExecutionContext;
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ didScheduleUpdateDuringPassiveEffects
+ ? root$jscomp$0 === rootWithPassiveNestedUpdates
+ ? nestedPassiveUpdateCount++
+ : ((nestedPassiveUpdateCount = 0),
+ (rootWithPassiveNestedUpdates = root$jscomp$0))
+ : (nestedPassiveUpdateCount = 0);
+ didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects = !1;
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
+ } catch (err) {
+ hasLoggedError ||
+ ((hasLoggedError = !0),
+ error$jscomp$0(
+ "React instrumentation encountered an error: %s",
+ err
+ ));
}
- return JSCompiler_inline_result;
- } finally {
- (ReactDOMSharedInternals.p = previousPriority),
- (ReactSharedInternals.T = renderPriority),
- releaseRootPooledCache(root, remainingLanes);
- }
+ var stateNode = root$jscomp$0.current.stateNode;
+ stateNode.effectDuration = 0;
+ stateNode.passiveEffectDuration = 0;
+ return !0;
+ } finally {
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = renderPriority),
+ releaseRootPooledCache(root, remainingLanes);
}
- return !1;
}
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
@@ -16903,11 +16931,9 @@ __DEV__ &&
mightHavePendingSyncWork = !0;
null !== ReactSharedInternals.actQueue
? didScheduleMicrotask_act ||
- ((didScheduleMicrotask_act = !0),
- scheduleImmediateTask(processRootScheduleInMicrotask))
+ ((didScheduleMicrotask_act = !0), scheduleImmediateRootScheduleTask())
: didScheduleMicrotask ||
- ((didScheduleMicrotask = !0),
- scheduleImmediateTask(processRootScheduleInMicrotask));
+ ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());
ReactSharedInternals.isBatchingLegacy &&
0 === root.tag &&
(ReactSharedInternals.didScheduleLegacyUpdate = !0);
@@ -16942,7 +16968,9 @@ __DEV__ &&
(nextLanes = workInProgressRootRenderLanes),
(nextLanes = getNextLanes(
root,
- root === workInProgressRoot ? nextLanes : 0
+ root === workInProgressRoot ? nextLanes : 0,
+ null !== root.cancelPendingCommit ||
+ root.timeoutHandle !== noTimeout
)),
0 === (nextLanes & 3) ||
checkIfRootIsPrerendering(root, nextLanes) ||
@@ -16954,6 +16982,9 @@ __DEV__ &&
isFlushingWork = !1;
}
}
+ function processRootScheduleInImmediateTask() {
+ processRootScheduleInMicrotask();
+ }
function processRootScheduleInMicrotask() {
mightHavePendingSyncWork =
didScheduleMicrotask_act =
@@ -17005,7 +17036,8 @@ __DEV__ &&
suspendedLanes = workInProgressRootRenderLanes;
suspendedLanes = getNextLanes(
root,
- root === currentTime ? suspendedLanes : 0
+ root === currentTime ? suspendedLanes : 0,
+ null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout
);
pingedLanes = root.callbackNode;
if (
@@ -17063,14 +17095,22 @@ __DEV__ &&
}
function performWorkOnRootViaSchedulerTask(root, didTimeout) {
nestedUpdateScheduled = currentUpdateIsNested = !1;
+ if (
+ pendingEffectsStatus !== NO_PENDING_EFFECTS &&
+ pendingEffectsStatus !== PENDING_PASSIVE_PHASE
+ )
+ return (root.callbackNode = null), (root.callbackPriority = 0), null;
var originalCallbackNode = root.callbackNode;
- if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
+ if (flushPendingEffects(!0) && root.callbackNode !== originalCallbackNode)
return null;
var workInProgressRootRenderLanes$jscomp$0 =
workInProgressRootRenderLanes;
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
root,
- root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0
+ root === workInProgressRoot
+ ? workInProgressRootRenderLanes$jscomp$0
+ : 0,
+ null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout
);
if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
performWorkOnRoot(
@@ -17085,7 +17125,7 @@ __DEV__ &&
: null;
}
function performSyncWorkOnRoot(root, lanes) {
- if (flushPassiveEffects()) return null;
+ if (flushPendingEffects()) return null;
currentUpdateIsNested = nestedUpdateScheduled;
nestedUpdateScheduled = !1;
performWorkOnRoot(root, lanes, !0);
@@ -17095,16 +17135,19 @@ __DEV__ &&
null !== callbackNode &&
cancelCallback$1(callbackNode);
}
- function scheduleImmediateTask(cb) {
+ function scheduleImmediateRootScheduleTask() {
null !== ReactSharedInternals.actQueue &&
ReactSharedInternals.actQueue.push(function () {
- cb();
+ processRootScheduleInMicrotask();
return null;
});
scheduleMicrotask(function () {
(executionContext & (RenderContext | CommitContext)) !== NoContext
- ? scheduleCallback$3(ImmediatePriority, cb)
- : cb();
+ ? scheduleCallback$3(
+ ImmediatePriority,
+ processRootScheduleInImmediateTask
+ )
+ : processRootScheduleInMicrotask();
});
}
function requestTransitionLane() {
@@ -19685,36 +19728,34 @@ __DEV__ &&
}
case "src":
case "href":
- "" !== propKey ||
- ("a" === tag && "href" === value) ||
- ("object" === tag && "data" === value)
- ? hydrateSanitizedAttribute(
- domElement,
- value,
- value,
- propKey,
- extraAttributes,
- serverDifferences
- )
- : ("src" === value
- ? error$jscomp$0(
- 'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
- value,
- value
- )
- : error$jscomp$0(
- 'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
- value,
- value
- ),
- hydrateSanitizedAttribute(
- domElement,
- value,
- value,
- null,
- extraAttributes,
- serverDifferences
- ));
+ if (
+ !(
+ "" !== propKey ||
+ ("a" === tag && "href" === value) ||
+ ("object" === tag && "data" === value)
+ )
+ ) {
+ "src" === value
+ ? error$jscomp$0(
+ 'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
+ value,
+ value
+ )
+ : error$jscomp$0(
+ 'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
+ value,
+ value
+ );
+ continue;
+ }
+ hydrateSanitizedAttribute(
+ domElement,
+ value,
+ value,
+ propKey,
+ extraAttributes,
+ serverDifferences
+ );
continue;
case "action":
case "formAction":
@@ -20324,7 +20365,9 @@ __DEV__ &&
else if (
name !== anyProps.rel ||
instance.getAttribute("href") !==
- (null == anyProps.href ? null : anyProps.href) ||
+ (null == anyProps.href || "" === anyProps.href
+ ? null
+ : anyProps.href) ||
instance.getAttribute("crossorigin") !==
(null == anyProps.crossOrigin
? null
@@ -21295,11 +21338,7 @@ __DEV__ &&
) {
this.tag = tag;
this.containerInfo = containerInfo;
- this.finishedWork =
- this.pingCache =
- this.current =
- this.pendingChildren =
- null;
+ this.pingCache = this.current = this.pendingChildren = null;
this.timeoutHandle = noTimeout;
this.callbackNode =
this.next =
@@ -21312,7 +21351,6 @@ __DEV__ &&
this.entangledLanes =
this.shellSuspendCounter =
this.errorRecoveryDisabledLanes =
- this.finishedLanes =
this.expiredLanes =
this.warmLanes =
this.pingedLanes =
@@ -21432,7 +21470,7 @@ __DEV__ &&
parentComponent,
callback
) {
- 0 === container.tag && flushPassiveEffects();
+ 0 === container.tag && flushPendingEffects();
updateContainerImpl(
container.current,
2,
@@ -25240,7 +25278,6 @@ __DEV__ &&
nextEffect = null,
inProgressLanes = null,
inProgressRoot = null,
- shouldFireAfterActiveInstanceBlur = !1,
hostParent = null,
hostParentIsContainer = !1,
currentHoistableRoot = null,
@@ -25325,10 +25362,20 @@ __DEV__ &&
RENDER_TIMEOUT_MS = 500,
workInProgressTransitions = null,
legacyErrorBoundariesThatAlreadyFailed = null,
- rootWithPendingPassiveEffects = null,
- pendingPassiveEffectsLanes = 0,
- pendingPassiveEffectsRemainingLanes = 0,
+ IMMEDIATE_COMMIT = 0,
+ SUSPENDED_COMMIT = 1,
+ THROTTLED_COMMIT = 2,
+ NO_PENDING_EFFECTS = 0,
+ PENDING_MUTATION_PHASE = 1,
+ PENDING_LAYOUT_PHASE = 2,
+ PENDING_PASSIVE_PHASE = 3,
+ pendingEffectsStatus = 0,
+ pendingEffectsRoot = null,
+ pendingFinishedWork = null,
+ pendingEffectsLanes = 0,
+ pendingEffectsRemainingLanes = 0,
pendingPassiveTransitions = null,
+ pendingRecoverableErrors = null,
NESTED_UPDATE_LIMIT = 50,
nestedUpdateCount = 0,
rootWithNestedUpdates = null,
@@ -25338,9 +25385,6 @@ __DEV__ &&
nestedPassiveUpdateCount = 0,
rootWithPassiveNestedUpdates = null,
isRunningInsertionEffect = !1,
- IMMEDIATE_COMMIT = 0,
- SUSPENDED_COMMIT = 1,
- THROTTLED_COMMIT = 2,
didWarnStateUpdateForNotYetMountedComponent = null,
didWarnAboutUpdateInRender = !1;
var didWarnAboutUpdateInRenderForAnotherComponent = new Set();
@@ -25875,11 +25919,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
- if ("19.1.0-native-fb-a9bbe346-20241219" !== isomorphicReactPackageVersion)
+ if ("19.1.0-native-fb-a160102f-20250107" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
- "\n - react-dom: 19.1.0-native-fb-a9bbe346-20241219\nLearn more: https://react.dev/warnings/version-mismatch")
+ "\n - react-dom: 19.1.0-native-fb-a160102f-20250107\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -25916,10 +25960,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
- version: "19.1.0-native-fb-a9bbe346-20241219",
+ version: "19.1.0-native-fb-a160102f-20250107",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.1.0-native-fb-a9bbe346-20241219"
+ reconcilerVersion: "19.1.0-native-fb-a160102f-20250107"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -26065,5 +26109,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
- exports.version = "19.1.0-native-fb-a9bbe346-20241219";
+ exports.version = "19.1.0-native-fb-a160102f-20250107";
})();
diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js
index 5c5d8e1dc6339..bdc3e7c646200 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<<825a0a9412af7f43b65c1651cd25d37d>>
+ * @generated SignedSource<<81a2482db332032f7765617b2f631adc>>
*/
/*
@@ -578,17 +578,6 @@ var hasOwnProperty = Object.prototype.hasOwnProperty,
unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue,
rendererID = null,
injectedHook = null;
-function onCommitRoot(root) {
- if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
- try {
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- void 0,
- 128 === (root.current.flags & 128)
- );
- } catch (err) {}
-}
function setIsStrictModeForDevtools(newIsStrictMode) {
"function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
if (injectedHook && "function" === typeof injectedHook.setStrictMode)
@@ -658,14 +647,13 @@ function getHighestPriorityLanes(lanes) {
return lanes;
}
}
-function getNextLanes(root, wipLanes) {
+function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0,
suspendedLanes = root.suspendedLanes,
- pingedLanes = root.pingedLanes,
- warmLanes = root.warmLanes;
- root = 0 !== root.finishedLanes;
+ pingedLanes = root.pingedLanes;
+ root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes
? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
@@ -675,29 +663,29 @@ function getNextLanes(root, wipLanes) {
0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = nonIdlePendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes)))))
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))))
: ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
0 !== nonIdlePendingLanes
? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
: 0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = pendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes))));
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = pendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes
? 0
: 0 !== wipLanes &&
wipLanes !== nextLanes &&
0 === (wipLanes & suspendedLanes) &&
((suspendedLanes = nextLanes & -nextLanes),
- (warmLanes = wipLanes & -wipLanes),
- suspendedLanes >= warmLanes ||
- (32 === suspendedLanes && 0 !== (warmLanes & 4194176)))
+ (rootHasPendingCommit = wipLanes & -wipLanes),
+ suspendedLanes >= rootHasPendingCommit ||
+ (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176)))
? wipLanes
: nextLanes;
}
@@ -2111,14 +2099,14 @@ var isInputEventSupported = !1;
if (canUseDOM) {
var JSCompiler_inline_result$jscomp$293;
if (canUseDOM) {
- var isSupported$jscomp$inline_420 = "oninput" in document;
- if (!isSupported$jscomp$inline_420) {
- var element$jscomp$inline_421 = document.createElement("div");
- element$jscomp$inline_421.setAttribute("oninput", "return;");
- isSupported$jscomp$inline_420 =
- "function" === typeof element$jscomp$inline_421.oninput;
+ var isSupported$jscomp$inline_421 = "oninput" in document;
+ if (!isSupported$jscomp$inline_421) {
+ var element$jscomp$inline_422 = document.createElement("div");
+ element$jscomp$inline_422.setAttribute("oninput", "return;");
+ isSupported$jscomp$inline_421 =
+ "function" === typeof element$jscomp$inline_422.oninput;
}
- JSCompiler_inline_result$jscomp$293 = isSupported$jscomp$inline_420;
+ JSCompiler_inline_result$jscomp$293 = isSupported$jscomp$inline_421;
} else JSCompiler_inline_result$jscomp$293 = !1;
isInputEventSupported =
JSCompiler_inline_result$jscomp$293 &&
@@ -2273,97 +2261,6 @@ function hasSelectionCapabilities(elem) {
"true" === elem.contentEditable)
);
}
-function restoreSelection(priorSelectionInformation, containerInfo) {
- var curFocusedElem = getActiveElementDeep(containerInfo);
- containerInfo = priorSelectionInformation.focusedElem;
- var priorSelectionRange = priorSelectionInformation.selectionRange;
- if (
- curFocusedElem !== containerInfo &&
- containerInfo &&
- containerInfo.ownerDocument &&
- containsNode(containerInfo.ownerDocument.documentElement, containerInfo)
- ) {
- if (null !== priorSelectionRange && hasSelectionCapabilities(containerInfo))
- if (
- ((priorSelectionInformation = priorSelectionRange.start),
- (curFocusedElem = priorSelectionRange.end),
- void 0 === curFocusedElem &&
- (curFocusedElem = priorSelectionInformation),
- "selectionStart" in containerInfo)
- )
- (containerInfo.selectionStart = priorSelectionInformation),
- (containerInfo.selectionEnd = Math.min(
- curFocusedElem,
- containerInfo.value.length
- ));
- else if (
- ((curFocusedElem =
- ((priorSelectionInformation =
- containerInfo.ownerDocument || document) &&
- priorSelectionInformation.defaultView) ||
- window),
- curFocusedElem.getSelection)
- ) {
- curFocusedElem = curFocusedElem.getSelection();
- var length = containerInfo.textContent.length,
- start = Math.min(priorSelectionRange.start, length);
- priorSelectionRange =
- void 0 === priorSelectionRange.end
- ? start
- : Math.min(priorSelectionRange.end, length);
- !curFocusedElem.extend &&
- start > priorSelectionRange &&
- ((length = priorSelectionRange),
- (priorSelectionRange = start),
- (start = length));
- length = getNodeForCharacterOffset(containerInfo, start);
- var endMarker = getNodeForCharacterOffset(
- containerInfo,
- priorSelectionRange
- );
- length &&
- endMarker &&
- (1 !== curFocusedElem.rangeCount ||
- curFocusedElem.anchorNode !== length.node ||
- curFocusedElem.anchorOffset !== length.offset ||
- curFocusedElem.focusNode !== endMarker.node ||
- curFocusedElem.focusOffset !== endMarker.offset) &&
- ((priorSelectionInformation =
- priorSelectionInformation.createRange()),
- priorSelectionInformation.setStart(length.node, length.offset),
- curFocusedElem.removeAllRanges(),
- start > priorSelectionRange
- ? (curFocusedElem.addRange(priorSelectionInformation),
- curFocusedElem.extend(endMarker.node, endMarker.offset))
- : (priorSelectionInformation.setEnd(
- endMarker.node,
- endMarker.offset
- ),
- curFocusedElem.addRange(priorSelectionInformation)));
- }
- priorSelectionInformation = [];
- for (
- curFocusedElem = containerInfo;
- (curFocusedElem = curFocusedElem.parentNode);
-
- )
- 1 === curFocusedElem.nodeType &&
- priorSelectionInformation.push({
- element: curFocusedElem,
- left: curFocusedElem.scrollLeft,
- top: curFocusedElem.scrollTop
- });
- "function" === typeof containerInfo.focus && containerInfo.focus();
- for (
- containerInfo = 0;
- containerInfo < priorSelectionInformation.length;
- containerInfo++
- )
- (curFocusedElem = priorSelectionInformation[containerInfo]),
- (curFocusedElem.element.scrollLeft = curFocusedElem.left),
- (curFocusedElem.element.scrollTop = curFocusedElem.top);
- }
-}
var skipSelectionChangeEvent =
canUseDOM && "documentMode" in document && 11 >= document.documentMode,
activeElement = null,
@@ -6507,12 +6404,12 @@ function markRef(current, workInProgress) {
if (null === ref)
null !== current &&
null !== current.ref &&
- (workInProgress.flags |= 2097664);
+ (workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(formatProdErrorMessage(284));
if (null === current || current.ref !== ref)
- workInProgress.flags |= 2097664;
+ workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
@@ -7132,7 +7029,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
didSuspend
)),
(nextProps.subtreeFlags =
- JSCompiler_temp$jscomp$0.subtreeFlags & 31457280)),
+ JSCompiler_temp$jscomp$0.subtreeFlags & 29360128)),
null !== digest
? (showFallback = createWorkInProgress(digest, showFallback))
: ((showFallback = createFiberFromFragment(
@@ -8307,8 +8204,7 @@ var offscreenSubtreeIsHidden = !1,
offscreenSubtreeWasHidden = !1,
needsFormReset = !1,
PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set,
- nextEffect = null,
- shouldFireAfterActiveInstanceBlur = !1;
+ nextEffect = null;
function commitBeforeMutationEffects(root, firstChild) {
root = root.containerInfo;
eventsEnabled = _enabled;
@@ -8384,7 +8280,7 @@ function commitBeforeMutationEffects(root, firstChild) {
if (
((firstChild = nextEffect),
(root = firstChild.child),
- 0 !== (firstChild.subtreeFlags & 1028) && null !== root)
+ 0 !== (firstChild.subtreeFlags & 1024) && null !== root)
)
(root.return = firstChild), (nextEffect = root);
else
@@ -8462,9 +8358,6 @@ function commitBeforeMutationEffects(root, firstChild) {
}
nextEffect = firstChild.return;
}
- resolvedPrevProps = shouldFireAfterActiveInstanceBlur;
- shouldFireAfterActiveInstanceBlur = !1;
- return resolvedPrevProps;
}
function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
var flags = finishedWork.flags;
@@ -8983,7 +8876,9 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
if (
((currentResource = maybeNodes[i]),
currentResource.getAttribute("href") ===
- (null == current.href ? null : current.href) &&
+ (null == current.href || "" === current.href
+ ? null
+ : current.href) &&
currentResource.getAttribute("rel") ===
(null == current.rel ? null : current.rel) &&
currentResource.getAttribute("title") ===
@@ -9604,6 +9499,14 @@ function commitPassiveMountOnFiber(
);
flags & 2048 && commitHookEffectListMount(9, finishedWork);
break;
+ case 1:
+ recursivelyTraversePassiveMountEffects(
+ finishedRoot,
+ finishedWork,
+ committedLanes,
+ committedTransitions
+ );
+ break;
case 3:
recursivelyTraversePassiveMountEffects(
finishedRoot,
@@ -10111,7 +10014,7 @@ function createWorkInProgress(current, pendingProps) {
(workInProgress.flags = 0),
(workInProgress.subtreeFlags = 0),
(workInProgress.deletions = null));
- workInProgress.flags = current.flags & 31457280;
+ workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -10130,7 +10033,7 @@ function createWorkInProgress(current, pendingProps) {
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
- workInProgress.flags &= 31457282;
+ workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
@@ -10364,8 +10267,8 @@ function bubbleProperties(completedWork) {
if (didBailout)
for (var child$144 = completedWork.child; null !== child$144; )
(newChildLanes |= child$144.lanes | child$144.childLanes),
- (subtreeFlags |= child$144.subtreeFlags & 31457280),
- (subtreeFlags |= child$144.flags & 31457280),
+ (subtreeFlags |= child$144.subtreeFlags & 29360128),
+ (subtreeFlags |= child$144.flags & 29360128),
(child$144.return = completedWork),
(child$144 = child$144.sibling);
else
@@ -10964,10 +10867,13 @@ var DefaultAsyncDispatcher = {
workInProgressRootRenderTargetTime = Infinity,
workInProgressTransitions = null,
legacyErrorBoundariesThatAlreadyFailed = null,
- rootWithPendingPassiveEffects = null,
- pendingPassiveEffectsLanes = 0,
- pendingPassiveEffectsRemainingLanes = 0,
+ pendingEffectsStatus = 0,
+ pendingEffectsRoot = null,
+ pendingFinishedWork = null,
+ pendingEffectsLanes = 0,
+ pendingEffectsRemainingLanes = 0,
pendingPassiveTransitions = null,
+ pendingRecoverableErrors = null,
nestedUpdateCount = 0,
rootWithNestedUpdates = null;
function requestUpdateLane(fiber) {
@@ -11135,8 +11041,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
default:
throw Error(formatProdErrorMessage(329));
}
- shouldTimeSlice.finishedWork = forceSync;
- shouldTimeSlice.finishedLanes = lanes;
if (
(lanes & 62914560) === lanes &&
(alwaysThrottleRetries || 3 === renderWasConcurrent) &&
@@ -11149,7 +11053,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
- if (0 !== getNextLanes(shouldTimeSlice, 0)) break a;
+ if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;
shouldTimeSlice.timeoutHandle = scheduleTimeout(
commitRootWhenReady.bind(
null,
@@ -11210,18 +11114,24 @@ function commitRootWhenReady(
completedRenderStartTime,
completedRenderEndTime
) {
- var subtreeFlags = finishedWork.subtreeFlags;
- if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408))
+ root.timeoutHandle = -1;
+ suspendedCommitReason = finishedWork.subtreeFlags;
+ if (
+ suspendedCommitReason & 8192 ||
+ 16785408 === (suspendedCommitReason & 16785408)
+ )
if (
((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }),
accumulateSuspenseyCommitOnFiber(finishedWork),
- (finishedWork = waitForCommitToBeReady()),
- null !== finishedWork)
+ (suspendedCommitReason = waitForCommitToBeReady()),
+ null !== suspendedCommitReason)
) {
- root.cancelPendingCommit = finishedWork(
+ root.cancelPendingCommit = suspendedCommitReason(
commitRoot.bind(
null,
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
@@ -11239,16 +11149,14 @@ function commitRootWhenReady(
}
commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
+ suspendedRetryLanes
);
}
function isRenderConsistentWithExternalStores(finishedWork) {
@@ -11331,8 +11239,6 @@ function resetWorkInProgressStack() {
}
}
function prepareFreshStack(root, lanes) {
- root.finishedWork = null;
- root.finishedLanes = 0;
var timeoutHandle = root.timeoutHandle;
-1 !== timeoutHandle &&
((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
@@ -11611,7 +11517,7 @@ function renderRootConcurrent(root, lanes) {
throw Error(formatProdErrorMessage(462));
}
}
- workLoopConcurrent();
+ workLoopConcurrentByScheduler();
break;
} catch (thrownValue$179) {
handleThrow(root, thrownValue$179);
@@ -11627,7 +11533,7 @@ function renderRootConcurrent(root, lanes) {
finishQueueingConcurrentUpdates();
return workInProgressRootExitStatus;
}
-function workLoopConcurrent() {
+function workLoopConcurrentByScheduler() {
for (; null !== workInProgress && !shouldYield(); )
performUnitOfWork(workInProgress);
}
@@ -11796,139 +11702,268 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) {
}
function commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
-) {
- var prevTransition = ReactSharedInternals.T,
- previousUpdateLanePriority = ReactDOMSharedInternals.p;
- try {
- (ReactDOMSharedInternals.p = 2),
- (ReactSharedInternals.T = null),
- commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- previousUpdateLanePriority,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
- );
- } finally {
- (ReactSharedInternals.T = prevTransition),
- (ReactDOMSharedInternals.p = previousUpdateLanePriority);
- }
-}
-function commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- renderPriorityLevel,
- spawnedLane,
- updatedLanes,
suspendedRetryLanes
) {
- do flushPassiveEffects();
- while (null !== rootWithPendingPassiveEffects);
+ root.cancelPendingCommit = null;
+ do flushPendingEffects();
+ while (0 !== pendingEffectsStatus);
if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));
- var finishedWork = root.finishedWork;
- didIncludeRenderPhaseUpdate = root.finishedLanes;
- if (null === finishedWork) return null;
- root.finishedWork = null;
- root.finishedLanes = 0;
- if (finishedWork === root.current) throw Error(formatProdErrorMessage(177));
- var remainingLanes = finishedWork.lanes | finishedWork.childLanes;
- remainingLanes |= concurrentlyUpdatedLanes;
- markRootFinished(
- root,
- didIncludeRenderPhaseUpdate,
- remainingLanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes
- );
- root === workInProgressRoot &&
- ((workInProgress = workInProgressRoot = null),
- (workInProgressRootRenderLanes = 0));
- spawnedLane = !1;
- 0 !== (finishedWork.subtreeFlags & 10256) ||
- 0 !== (finishedWork.flags & 10256)
- ? ((spawnedLane = !0),
- (pendingPassiveEffectsRemainingLanes = remainingLanes),
- (pendingPassiveTransitions = transitions),
- (root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null),
- scheduleCallback$1(NormalPriority$1, function () {
- flushPassiveEffects(!0);
- return null;
- }))
- : ((root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null));
- transitions = 0 !== (finishedWork.flags & 15990);
- 0 !== (finishedWork.subtreeFlags & 15990) || transitions
- ? ((transitions = ReactSharedInternals.T),
- (ReactSharedInternals.T = null),
- (updatedLanes = ReactDOMSharedInternals.p),
- (ReactDOMSharedInternals.p = 2),
- (suspendedRetryLanes = executionContext),
- (executionContext |= 4),
- commitBeforeMutationEffects(root, finishedWork),
- commitMutationEffectsOnFiber(finishedWork, root),
- restoreSelection(selectionInformation, root.containerInfo),
- (_enabled = !!eventsEnabled),
- (selectionInformation = eventsEnabled = null),
- (root.current = finishedWork),
- commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork),
- requestPaint(),
- (executionContext = suspendedRetryLanes),
- (ReactDOMSharedInternals.p = updatedLanes),
- (ReactSharedInternals.T = transitions))
- : (root.current = finishedWork);
- spawnedLane
- ? ((spawnedLane = !1),
- (rootWithPendingPassiveEffects = root),
- (pendingPassiveEffectsLanes = didIncludeRenderPhaseUpdate))
- : releaseRootPooledCache(root, remainingLanes);
- remainingLanes = root.pendingLanes;
- 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
- onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
- if (null !== recoverableErrors)
- for (
- renderPriorityLevel = root.onRecoverableError, finishedWork = 0;
- finishedWork < recoverableErrors.length;
- finishedWork++
- )
- (remainingLanes = recoverableErrors[finishedWork]),
- renderPriorityLevel(remainingLanes.value, {
- componentStack: remainingLanes.stack
- });
- 0 !== (pendingPassiveEffectsLanes & 3) &&
- 0 !== root.tag &&
- flushPassiveEffects();
- ensureRootIsScheduled(root);
- remainingLanes = root.pendingLanes;
- 0 !== (didIncludeRenderPhaseUpdate & 4194218) && 0 !== (remainingLanes & 42)
- ? root === rootWithNestedUpdates
- ? nestedUpdateCount++
- : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
- : (nestedUpdateCount = 0);
- flushSyncWorkAcrossRoots_impl(0, !1);
- return null;
+ if (null !== finishedWork) {
+ if (finishedWork === root.current) throw Error(formatProdErrorMessage(177));
+ didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
+ didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
+ markRootFinished(
+ root,
+ lanes,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+ );
+ root === workInProgressRoot &&
+ ((workInProgress = workInProgressRoot = null),
+ (workInProgressRootRenderLanes = 0));
+ pendingFinishedWork = finishedWork;
+ pendingEffectsRoot = root;
+ pendingEffectsLanes = lanes;
+ pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
+ pendingPassiveTransitions = transitions;
+ pendingRecoverableErrors = recoverableErrors;
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? ((root.callbackNode = null),
+ (root.callbackPriority = 0),
+ scheduleCallback$1(NormalPriority$1, function () {
+ flushPassiveEffects(!0);
+ return null;
+ }))
+ : ((root.callbackNode = null), (root.callbackPriority = 0));
+ lanes = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || lanes) {
+ lanes = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ recoverableErrors = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = 2;
+ transitions = executionContext;
+ executionContext |= 4;
+ try {
+ commitBeforeMutationEffects(root, finishedWork);
+ } finally {
+ (executionContext = transitions),
+ (ReactDOMSharedInternals.p = recoverableErrors),
+ (ReactSharedInternals.T = lanes);
+ }
+ }
+ pendingEffectsStatus = 1;
+ flushMutationEffects();
+ flushLayoutEffects();
+ }
+}
+function flushMutationEffects() {
+ if (1 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
+ rootMutationHasEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ commitMutationEffectsOnFiber(finishedWork, root);
+ var priorSelectionInformation = selectionInformation,
+ curFocusedElem = getActiveElementDeep(root.containerInfo),
+ priorFocusedElem = priorSelectionInformation.focusedElem,
+ priorSelectionRange = priorSelectionInformation.selectionRange;
+ if (
+ curFocusedElem !== priorFocusedElem &&
+ priorFocusedElem &&
+ priorFocusedElem.ownerDocument &&
+ containsNode(
+ priorFocusedElem.ownerDocument.documentElement,
+ priorFocusedElem
+ )
+ ) {
+ if (
+ null !== priorSelectionRange &&
+ hasSelectionCapabilities(priorFocusedElem)
+ ) {
+ var start = priorSelectionRange.start,
+ end = priorSelectionRange.end;
+ void 0 === end && (end = start);
+ if ("selectionStart" in priorFocusedElem)
+ (priorFocusedElem.selectionStart = start),
+ (priorFocusedElem.selectionEnd = Math.min(
+ end,
+ priorFocusedElem.value.length
+ ));
+ else {
+ var doc = priorFocusedElem.ownerDocument || document,
+ win = (doc && doc.defaultView) || window;
+ if (win.getSelection) {
+ var selection = win.getSelection(),
+ length = priorFocusedElem.textContent.length,
+ start$jscomp$0 = Math.min(priorSelectionRange.start, length),
+ end$jscomp$0 =
+ void 0 === priorSelectionRange.end
+ ? start$jscomp$0
+ : Math.min(priorSelectionRange.end, length);
+ !selection.extend &&
+ start$jscomp$0 > end$jscomp$0 &&
+ ((curFocusedElem = end$jscomp$0),
+ (end$jscomp$0 = start$jscomp$0),
+ (start$jscomp$0 = curFocusedElem));
+ var startMarker = getNodeForCharacterOffset(
+ priorFocusedElem,
+ start$jscomp$0
+ ),
+ endMarker = getNodeForCharacterOffset(
+ priorFocusedElem,
+ end$jscomp$0
+ );
+ if (
+ startMarker &&
+ endMarker &&
+ (1 !== selection.rangeCount ||
+ selection.anchorNode !== startMarker.node ||
+ selection.anchorOffset !== startMarker.offset ||
+ selection.focusNode !== endMarker.node ||
+ selection.focusOffset !== endMarker.offset)
+ ) {
+ var range = doc.createRange();
+ range.setStart(startMarker.node, startMarker.offset);
+ selection.removeAllRanges();
+ start$jscomp$0 > end$jscomp$0
+ ? (selection.addRange(range),
+ selection.extend(endMarker.node, endMarker.offset))
+ : (range.setEnd(endMarker.node, endMarker.offset),
+ selection.addRange(range));
+ }
+ }
+ }
+ }
+ doc = [];
+ for (
+ selection = priorFocusedElem;
+ (selection = selection.parentNode);
+
+ )
+ 1 === selection.nodeType &&
+ doc.push({
+ element: selection,
+ left: selection.scrollLeft,
+ top: selection.scrollTop
+ });
+ "function" === typeof priorFocusedElem.focus &&
+ priorFocusedElem.focus();
+ for (
+ priorFocusedElem = 0;
+ priorFocusedElem < doc.length;
+ priorFocusedElem++
+ ) {
+ var info = doc[priorFocusedElem];
+ info.element.scrollLeft = info.left;
+ info.element.scrollTop = info.top;
+ }
+ }
+ _enabled = !!eventsEnabled;
+ selectionInformation = eventsEnabled = null;
+ } finally {
+ (executionContext = prevExecutionContext),
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = rootMutationHasEffect);
+ }
+ }
+ root.current = finishedWork;
+ pendingEffectsStatus = 2;
+ }
+}
+function flushLayoutEffects() {
+ if (2 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ recoverableErrors = pendingRecoverableErrors,
+ rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
+ if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
+ rootHasLayoutEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);
+ } finally {
+ (executionContext = prevExecutionContext),
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = rootHasLayoutEffect);
+ }
+ }
+ requestPaint();
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? (pendingEffectsStatus = 3)
+ : ((pendingEffectsStatus = 0),
+ (pendingEffectsRoot = null),
+ releaseRootPooledCache(root, root.pendingLanes));
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 === rootHasLayoutEffect &&
+ (legacyErrorBoundariesThatAlreadyFailed = null);
+ lanesToEventPriority(lanes);
+ finishedWork = finishedWork.stateNode;
+ if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
+ try {
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ finishedWork,
+ void 0,
+ 128 === (finishedWork.current.flags & 128)
+ );
+ } catch (err) {}
+ if (null !== recoverableErrors) {
+ finishedWork = ReactSharedInternals.T;
+ rootHasLayoutEffect = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = 2;
+ ReactSharedInternals.T = null;
+ try {
+ var onRecoverableError = root.onRecoverableError;
+ for (
+ previousPriority = 0;
+ previousPriority < recoverableErrors.length;
+ previousPriority++
+ ) {
+ var recoverableError = recoverableErrors[previousPriority];
+ onRecoverableError(recoverableError.value, {
+ componentStack: recoverableError.stack
+ });
+ }
+ } finally {
+ (ReactSharedInternals.T = finishedWork),
+ (ReactDOMSharedInternals.p = rootHasLayoutEffect);
+ }
+ }
+ 0 !== (pendingEffectsLanes & 3) && 0 !== root.tag && flushPendingEffects();
+ ensureRootIsScheduled(root);
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)
+ ? root === rootWithNestedUpdates
+ ? nestedUpdateCount++
+ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
+ : (nestedUpdateCount = 0);
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ }
}
function releaseRootPooledCache(root, remainingLanes) {
0 === (root.pooledCacheLanes &= remainingLanes) &&
@@ -11936,51 +11971,54 @@ function releaseRootPooledCache(root, remainingLanes) {
null != remainingLanes &&
((root.pooledCache = null), releaseCache(remainingLanes)));
}
+function flushPendingEffects(wasDelayedCommit) {
+ flushMutationEffects();
+ flushLayoutEffects();
+ return flushPassiveEffects(wasDelayedCommit);
+}
function flushPassiveEffects() {
- if (null !== rootWithPendingPassiveEffects) {
- var root$183 = rootWithPendingPassiveEffects,
- remainingLanes = pendingPassiveEffectsRemainingLanes;
- pendingPassiveEffectsRemainingLanes = 0;
- var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
- prevTransition = ReactSharedInternals.T,
- previousPriority = ReactDOMSharedInternals.p;
- try {
- ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority;
- ReactSharedInternals.T = null;
- if (null === rootWithPendingPassiveEffects)
- var JSCompiler_inline_result = !1;
- else {
- renderPriority = pendingPassiveTransitions;
- pendingPassiveTransitions = null;
- var root = rootWithPendingPassiveEffects,
- lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsLanes = 0;
- if (0 !== (executionContext & 6))
- throw Error(formatProdErrorMessage(331));
- var prevExecutionContext = executionContext;
- executionContext |= 4;
- commitPassiveUnmountOnFiber(root.current);
- commitPassiveMountOnFiber(root, root.current, lanes, renderPriority);
- executionContext = prevExecutionContext;
- flushSyncWorkAcrossRoots_impl(0, !1);
- if (
- injectedHook &&
- "function" === typeof injectedHook.onPostCommitFiberRoot
- )
- try {
- injectedHook.onPostCommitFiberRoot(rendererID, root);
- } catch (err) {}
- JSCompiler_inline_result = !0;
- }
- return JSCompiler_inline_result;
- } finally {
- (ReactDOMSharedInternals.p = previousPriority),
- (ReactSharedInternals.T = prevTransition),
- releaseRootPooledCache(root$183, remainingLanes);
- }
+ if (3 !== pendingEffectsStatus) return !1;
+ var root = pendingEffectsRoot,
+ remainingLanes = pendingEffectsRemainingLanes;
+ pendingEffectsRemainingLanes = 0;
+ var renderPriority = lanesToEventPriority(pendingEffectsLanes),
+ prevTransition = ReactSharedInternals.T,
+ previousPriority = ReactDOMSharedInternals.p;
+ try {
+ ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority;
+ ReactSharedInternals.T = null;
+ renderPriority = pendingPassiveTransitions;
+ pendingPassiveTransitions = null;
+ var root$jscomp$0 = pendingEffectsRoot,
+ lanes = pendingEffectsLanes;
+ pendingEffectsStatus = 0;
+ pendingEffectsRoot = null;
+ pendingEffectsLanes = 0;
+ if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(331));
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ commitPassiveUnmountOnFiber(root$jscomp$0.current);
+ commitPassiveMountOnFiber(
+ root$jscomp$0,
+ root$jscomp$0.current,
+ lanes,
+ renderPriority
+ );
+ executionContext = prevExecutionContext;
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
+ } catch (err) {}
+ return !0;
+ } finally {
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = prevTransition),
+ releaseRootPooledCache(root, remainingLanes);
}
- return !1;
}
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
@@ -12113,8 +12151,7 @@ function ensureRootIsScheduled(root) {
: (lastScheduledRoot = lastScheduledRoot.next = root));
mightHavePendingSyncWork = !0;
didScheduleMicrotask ||
- ((didScheduleMicrotask = !0),
- scheduleImmediateTask(processRootScheduleInMicrotask));
+ ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());
}
function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
if (!isFlushingWork && mightHavePendingSyncWork) {
@@ -12147,7 +12184,9 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
(JSCompiler_inline_result = workInProgressRootRenderLanes),
(JSCompiler_inline_result = getNextLanes(
root$185,
- root$185 === workInProgressRoot ? JSCompiler_inline_result : 0
+ root$185 === workInProgressRoot ? JSCompiler_inline_result : 0,
+ null !== root$185.cancelPendingCommit ||
+ -1 !== root$185.timeoutHandle
)),
0 === (JSCompiler_inline_result & 3) ||
checkIfRootIsPrerendering(root$185, JSCompiler_inline_result) ||
@@ -12159,6 +12198,9 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
isFlushingWork = !1;
}
}
+function processRootScheduleInImmediateTask() {
+ processRootScheduleInMicrotask();
+}
function processRootScheduleInMicrotask() {
mightHavePendingSyncWork = didScheduleMicrotask = !1;
var syncTransitionLanes = 0;
@@ -12207,7 +12249,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
suspendedLanes = workInProgressRootRenderLanes;
suspendedLanes = getNextLanes(
root,
- root === currentTime ? suspendedLanes : 0
+ root === currentTime ? suspendedLanes : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
pingedLanes = root.callbackNode;
if (
@@ -12258,13 +12301,16 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
return 2;
}
function performWorkOnRootViaSchedulerTask(root, didTimeout) {
+ if (0 !== pendingEffectsStatus && 3 !== pendingEffectsStatus)
+ return (root.callbackNode = null), (root.callbackPriority = 0), null;
var originalCallbackNode = root.callbackNode;
- if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
+ if (flushPendingEffects(!0) && root.callbackNode !== originalCallbackNode)
return null;
var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
root,
- root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0
+ root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout);
@@ -12274,14 +12320,17 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) {
: null;
}
function performSyncWorkOnRoot(root, lanes) {
- if (flushPassiveEffects()) return null;
+ if (flushPendingEffects()) return null;
performWorkOnRoot(root, lanes, !0);
}
-function scheduleImmediateTask(cb) {
+function scheduleImmediateRootScheduleTask() {
scheduleMicrotask(function () {
0 !== (executionContext & 6)
- ? scheduleCallback$3(ImmediatePriority, cb)
- : cb();
+ ? scheduleCallback$3(
+ ImmediatePriority,
+ processRootScheduleInImmediateTask
+ )
+ : processRootScheduleInMicrotask();
});
}
function requestTransitionLane() {
@@ -12384,20 +12433,20 @@ function extractEvents$1(
}
}
for (
- var i$jscomp$inline_1484 = 0;
- i$jscomp$inline_1484 < simpleEventPluginEvents.length;
- i$jscomp$inline_1484++
+ var i$jscomp$inline_1510 = 0;
+ i$jscomp$inline_1510 < simpleEventPluginEvents.length;
+ i$jscomp$inline_1510++
) {
- var eventName$jscomp$inline_1485 =
- simpleEventPluginEvents[i$jscomp$inline_1484],
- domEventName$jscomp$inline_1486 =
- eventName$jscomp$inline_1485.toLowerCase(),
- capitalizedEvent$jscomp$inline_1487 =
- eventName$jscomp$inline_1485[0].toUpperCase() +
- eventName$jscomp$inline_1485.slice(1);
+ var eventName$jscomp$inline_1511 =
+ simpleEventPluginEvents[i$jscomp$inline_1510],
+ domEventName$jscomp$inline_1512 =
+ eventName$jscomp$inline_1511.toLowerCase(),
+ capitalizedEvent$jscomp$inline_1513 =
+ eventName$jscomp$inline_1511[0].toUpperCase() +
+ eventName$jscomp$inline_1511.slice(1);
registerSimpleEvent(
- domEventName$jscomp$inline_1486,
- "on" + capitalizedEvent$jscomp$inline_1487
+ domEventName$jscomp$inline_1512,
+ "on" + capitalizedEvent$jscomp$inline_1513
);
}
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -14241,7 +14290,9 @@ function canHydrateInstance(instance, type, props, inRootOrSingleton) {
else if (
name !== anyProps.rel ||
instance.getAttribute("href") !==
- (null == anyProps.href ? null : anyProps.href) ||
+ (null == anyProps.href || "" === anyProps.href
+ ? null
+ : anyProps.href) ||
instance.getAttribute("crossorigin") !==
(null == anyProps.crossOrigin ? null : anyProps.crossOrigin) ||
instance.getAttribute("title") !==
@@ -15135,11 +15186,7 @@ function FiberRootNode(
) {
this.tag = tag;
this.containerInfo = containerInfo;
- this.finishedWork =
- this.pingCache =
- this.current =
- this.pendingChildren =
- null;
+ this.pingCache = this.current = this.pendingChildren = null;
this.timeoutHandle = -1;
this.callbackNode =
this.next =
@@ -15152,7 +15199,6 @@ function FiberRootNode(
this.entangledLanes =
this.shellSuspendCounter =
this.errorRecoveryDisabledLanes =
- this.finishedLanes =
this.expiredLanes =
this.warmLanes =
this.pingedLanes =
@@ -15866,7 +15912,7 @@ ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount =
if (null !== root) {
this._internalRoot = null;
var container = root.containerInfo;
- 0 === root.tag && flushPassiveEffects();
+ 0 === root.tag && flushPendingEffects();
updateContainerImpl(root.current, 2, null, root, null, null);
flushSyncWork();
container[internalContainerInstanceKey] = null;
@@ -15890,16 +15936,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
0 === i && attemptExplicitHydrationTarget(target);
}
};
-var isomorphicReactPackageVersion$jscomp$inline_1727 = React.version;
+var isomorphicReactPackageVersion$jscomp$inline_1753 = React.version;
if (
- "19.1.0-native-fb-a9bbe346-20241219" !==
- isomorphicReactPackageVersion$jscomp$inline_1727
+ "19.1.0-native-fb-a160102f-20250107" !==
+ isomorphicReactPackageVersion$jscomp$inline_1753
)
throw Error(
formatProdErrorMessage(
527,
- isomorphicReactPackageVersion$jscomp$inline_1727,
- "19.1.0-native-fb-a9bbe346-20241219"
+ isomorphicReactPackageVersion$jscomp$inline_1753,
+ "19.1.0-native-fb-a160102f-20250107"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -15919,24 +15965,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
null === componentOrElement ? null : componentOrElement.stateNode;
return componentOrElement;
};
-var internals$jscomp$inline_2185 = {
+var internals$jscomp$inline_2201 = {
bundleType: 0,
- version: "19.1.0-native-fb-a9bbe346-20241219",
+ version: "19.1.0-native-fb-a160102f-20250107",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.1.0-native-fb-a9bbe346-20241219"
+ reconcilerVersion: "19.1.0-native-fb-a160102f-20250107"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
- var hook$jscomp$inline_2186 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+ var hook$jscomp$inline_2202 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
- !hook$jscomp$inline_2186.isDisabled &&
- hook$jscomp$inline_2186.supportsFiber
+ !hook$jscomp$inline_2202.isDisabled &&
+ hook$jscomp$inline_2202.supportsFiber
)
try {
- (rendererID = hook$jscomp$inline_2186.inject(
- internals$jscomp$inline_2185
+ (rendererID = hook$jscomp$inline_2202.inject(
+ internals$jscomp$inline_2201
)),
- (injectedHook = hook$jscomp$inline_2186);
+ (injectedHook = hook$jscomp$inline_2202);
} catch (err) {}
}
exports.createRoot = function (container, options) {
@@ -16030,4 +16076,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
-exports.version = "19.1.0-native-fb-a9bbe346-20241219";
+exports.version = "19.1.0-native-fb-a160102f-20250107";
diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js
index 6f676bbec3abd..6c737e249b6bc 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<<1e4743f91768a024f444b4349f371812>>
+ * @generated SignedSource<<09e47335040ff25c9259a44a580e9d0f>>
*/
/*
@@ -580,34 +580,6 @@ var hasOwnProperty = Object.prototype.hasOwnProperty,
injectedHook = null,
injectedProfilingHooks = null,
isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;
-function onCommitRoot(root, eventPriority) {
- if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
- try {
- var didError = 128 === (root.current.flags & 128);
- switch (eventPriority) {
- case 2:
- var schedulerPriority = ImmediatePriority;
- break;
- case 8:
- schedulerPriority = UserBlockingPriority;
- break;
- case 32:
- schedulerPriority = NormalPriority$1;
- break;
- case 268435456:
- schedulerPriority = IdlePriority;
- break;
- default:
- schedulerPriority = NormalPriority$1;
- }
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- schedulerPriority,
- didError
- );
- } catch (err) {}
-}
function setIsStrictModeForDevtools(newIsStrictMode) {
"function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
if (injectedHook && "function" === typeof injectedHook.setStrictMode)
@@ -723,14 +695,13 @@ function getHighestPriorityLanes(lanes) {
return lanes;
}
}
-function getNextLanes(root, wipLanes) {
+function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0,
suspendedLanes = root.suspendedLanes,
- pingedLanes = root.pingedLanes,
- warmLanes = root.warmLanes;
- root = 0 !== root.finishedLanes;
+ pingedLanes = root.pingedLanes;
+ root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes
? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
@@ -740,29 +711,29 @@ function getNextLanes(root, wipLanes) {
0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = nonIdlePendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes)))))
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))))
: ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
0 !== nonIdlePendingLanes
? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
: 0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = pendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes))));
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = pendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes
? 0
: 0 !== wipLanes &&
wipLanes !== nextLanes &&
0 === (wipLanes & suspendedLanes) &&
((suspendedLanes = nextLanes & -nextLanes),
- (warmLanes = wipLanes & -wipLanes),
- suspendedLanes >= warmLanes ||
- (32 === suspendedLanes && 0 !== (warmLanes & 4194176)))
+ (rootHasPendingCommit = wipLanes & -wipLanes),
+ suspendedLanes >= rootHasPendingCommit ||
+ (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176)))
? wipLanes
: nextLanes;
}
@@ -2206,14 +2177,14 @@ var isInputEventSupported = !1;
if (canUseDOM) {
var JSCompiler_inline_result$jscomp$309;
if (canUseDOM) {
- var isSupported$jscomp$inline_436 = "oninput" in document;
- if (!isSupported$jscomp$inline_436) {
- var element$jscomp$inline_437 = document.createElement("div");
- element$jscomp$inline_437.setAttribute("oninput", "return;");
- isSupported$jscomp$inline_436 =
- "function" === typeof element$jscomp$inline_437.oninput;
+ var isSupported$jscomp$inline_437 = "oninput" in document;
+ if (!isSupported$jscomp$inline_437) {
+ var element$jscomp$inline_438 = document.createElement("div");
+ element$jscomp$inline_438.setAttribute("oninput", "return;");
+ isSupported$jscomp$inline_437 =
+ "function" === typeof element$jscomp$inline_438.oninput;
}
- JSCompiler_inline_result$jscomp$309 = isSupported$jscomp$inline_436;
+ JSCompiler_inline_result$jscomp$309 = isSupported$jscomp$inline_437;
} else JSCompiler_inline_result$jscomp$309 = !1;
isInputEventSupported =
JSCompiler_inline_result$jscomp$309 &&
@@ -2368,97 +2339,6 @@ function hasSelectionCapabilities(elem) {
"true" === elem.contentEditable)
);
}
-function restoreSelection(priorSelectionInformation, containerInfo) {
- var curFocusedElem = getActiveElementDeep(containerInfo);
- containerInfo = priorSelectionInformation.focusedElem;
- var priorSelectionRange = priorSelectionInformation.selectionRange;
- if (
- curFocusedElem !== containerInfo &&
- containerInfo &&
- containerInfo.ownerDocument &&
- containsNode(containerInfo.ownerDocument.documentElement, containerInfo)
- ) {
- if (null !== priorSelectionRange && hasSelectionCapabilities(containerInfo))
- if (
- ((priorSelectionInformation = priorSelectionRange.start),
- (curFocusedElem = priorSelectionRange.end),
- void 0 === curFocusedElem &&
- (curFocusedElem = priorSelectionInformation),
- "selectionStart" in containerInfo)
- )
- (containerInfo.selectionStart = priorSelectionInformation),
- (containerInfo.selectionEnd = Math.min(
- curFocusedElem,
- containerInfo.value.length
- ));
- else if (
- ((curFocusedElem =
- ((priorSelectionInformation =
- containerInfo.ownerDocument || document) &&
- priorSelectionInformation.defaultView) ||
- window),
- curFocusedElem.getSelection)
- ) {
- curFocusedElem = curFocusedElem.getSelection();
- var length = containerInfo.textContent.length,
- start = Math.min(priorSelectionRange.start, length);
- priorSelectionRange =
- void 0 === priorSelectionRange.end
- ? start
- : Math.min(priorSelectionRange.end, length);
- !curFocusedElem.extend &&
- start > priorSelectionRange &&
- ((length = priorSelectionRange),
- (priorSelectionRange = start),
- (start = length));
- length = getNodeForCharacterOffset(containerInfo, start);
- var endMarker = getNodeForCharacterOffset(
- containerInfo,
- priorSelectionRange
- );
- length &&
- endMarker &&
- (1 !== curFocusedElem.rangeCount ||
- curFocusedElem.anchorNode !== length.node ||
- curFocusedElem.anchorOffset !== length.offset ||
- curFocusedElem.focusNode !== endMarker.node ||
- curFocusedElem.focusOffset !== endMarker.offset) &&
- ((priorSelectionInformation =
- priorSelectionInformation.createRange()),
- priorSelectionInformation.setStart(length.node, length.offset),
- curFocusedElem.removeAllRanges(),
- start > priorSelectionRange
- ? (curFocusedElem.addRange(priorSelectionInformation),
- curFocusedElem.extend(endMarker.node, endMarker.offset))
- : (priorSelectionInformation.setEnd(
- endMarker.node,
- endMarker.offset
- ),
- curFocusedElem.addRange(priorSelectionInformation)));
- }
- priorSelectionInformation = [];
- for (
- curFocusedElem = containerInfo;
- (curFocusedElem = curFocusedElem.parentNode);
-
- )
- 1 === curFocusedElem.nodeType &&
- priorSelectionInformation.push({
- element: curFocusedElem,
- left: curFocusedElem.scrollLeft,
- top: curFocusedElem.scrollTop
- });
- "function" === typeof containerInfo.focus && containerInfo.focus();
- for (
- containerInfo = 0;
- containerInfo < priorSelectionInformation.length;
- containerInfo++
- )
- (curFocusedElem = priorSelectionInformation[containerInfo]),
- (curFocusedElem.element.scrollLeft = curFocusedElem.left),
- (curFocusedElem.element.scrollTop = curFocusedElem.top);
- }
-}
var skipSelectionChangeEvent =
canUseDOM && "documentMode" in document && 11 >= document.documentMode,
activeElement = null,
@@ -6667,12 +6547,12 @@ function markRef(current, workInProgress) {
if (null === ref)
null !== current &&
null !== current.ref &&
- (workInProgress.flags |= 2097664);
+ (workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(formatProdErrorMessage(284));
if (null === current || current.ref !== ref)
- workInProgress.flags |= 2097664;
+ workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
@@ -7310,7 +7190,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
didSuspend
)),
(nextProps.subtreeFlags =
- JSCompiler_temp$jscomp$0.subtreeFlags & 31457280)),
+ JSCompiler_temp$jscomp$0.subtreeFlags & 29360128)),
null !== digest
? (showFallback = createWorkInProgress(digest, showFallback))
: ((showFallback = createFiberFromFragment(
@@ -8669,8 +8549,7 @@ var offscreenSubtreeIsHidden = !1,
PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set,
nextEffect = null,
inProgressLanes = null,
- inProgressRoot = null,
- shouldFireAfterActiveInstanceBlur = !1;
+ inProgressRoot = null;
function commitBeforeMutationEffects(root, firstChild) {
root = root.containerInfo;
eventsEnabled = _enabled;
@@ -8746,7 +8625,7 @@ function commitBeforeMutationEffects(root, firstChild) {
if (
((firstChild = nextEffect),
(root = firstChild.child),
- 0 !== (firstChild.subtreeFlags & 1028) && null !== root)
+ 0 !== (firstChild.subtreeFlags & 1024) && null !== root)
)
(root.return = firstChild), (nextEffect = root);
else
@@ -8824,9 +8703,6 @@ function commitBeforeMutationEffects(root, firstChild) {
}
nextEffect = firstChild.return;
}
- resolvedPrevProps = shouldFireAfterActiveInstanceBlur;
- shouldFireAfterActiveInstanceBlur = !1;
- return resolvedPrevProps;
}
function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
var flags = finishedWork.flags;
@@ -9269,12 +9145,6 @@ function attachSuspenseRetryListeners(finishedWork, wakeables) {
}
});
}
-function commitMutationEffects(root, finishedWork, committedLanes) {
- inProgressLanes = committedLanes;
- inProgressRoot = root;
- commitMutationEffectsOnFiber(finishedWork, root);
- inProgressRoot = inProgressLanes = null;
-}
function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
var deletions = parentFiber.deletions;
if (null !== deletions)
@@ -9401,7 +9271,9 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
if (
((hoistableRoot = maybeNodes[i]),
hoistableRoot.getAttribute("href") ===
- (null == current.href ? null : current.href) &&
+ (null == current.href || "" === current.href
+ ? null
+ : current.href) &&
hoistableRoot.getAttribute("rel") ===
(null == current.rel ? null : current.rel) &&
hoistableRoot.getAttribute("title") ===
@@ -9811,12 +9683,6 @@ function recursivelyResetForms(parentFiber) {
parentFiber = parentFiber.sibling;
}
}
-function commitLayoutEffects(finishedWork, root, committedLanes) {
- inProgressLanes = committedLanes;
- inProgressRoot = root;
- commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);
- inProgressRoot = inProgressLanes = null;
-}
function recursivelyTraverseLayoutEffects(root, parentFiber) {
if (parentFiber.subtreeFlags & 8772)
for (parentFiber = parentFiber.child; null !== parentFiber; )
@@ -10043,6 +9909,14 @@ function commitPassiveMountOnFiber(
);
flags & 2048 && commitHookPassiveMountEffects(finishedWork, 9);
break;
+ case 1:
+ recursivelyTraversePassiveMountEffects(
+ finishedRoot,
+ finishedWork,
+ committedLanes,
+ committedTransitions
+ );
+ break;
case 3:
var prevEffectDuration = pushNestedEffectDurations();
recursivelyTraversePassiveMountEffects(
@@ -10573,7 +10447,7 @@ function createWorkInProgress(current, pendingProps) {
(workInProgress.deletions = null),
(workInProgress.actualDuration = -0),
(workInProgress.actualStartTime = -1.1));
- workInProgress.flags = current.flags & 31457280;
+ workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -10594,7 +10468,7 @@ function createWorkInProgress(current, pendingProps) {
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
- workInProgress.flags &= 31457282;
+ workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
@@ -10839,8 +10713,8 @@ function bubbleProperties(completedWork) {
)
(newChildLanes |= child$156.lanes | child$156.childLanes),
- (subtreeFlags |= child$156.subtreeFlags & 31457280),
- (subtreeFlags |= child$156.flags & 31457280),
+ (subtreeFlags |= child$156.subtreeFlags & 29360128),
+ (subtreeFlags |= child$156.flags & 29360128),
(treeBaseDuration$155 += child$156.treeBaseDuration),
(child$156 = child$156.sibling);
completedWork.treeBaseDuration = treeBaseDuration$155;
@@ -10852,8 +10726,8 @@ function bubbleProperties(completedWork) {
)
(newChildLanes |=
treeBaseDuration$155.lanes | treeBaseDuration$155.childLanes),
- (subtreeFlags |= treeBaseDuration$155.subtreeFlags & 31457280),
- (subtreeFlags |= treeBaseDuration$155.flags & 31457280),
+ (subtreeFlags |= treeBaseDuration$155.subtreeFlags & 29360128),
+ (subtreeFlags |= treeBaseDuration$155.flags & 29360128),
(treeBaseDuration$155.return = completedWork),
(treeBaseDuration$155 = treeBaseDuration$155.sibling);
else if (0 !== (completedWork.mode & 2)) {
@@ -11499,10 +11373,13 @@ var DefaultAsyncDispatcher = {
workInProgressRootRenderTargetTime = Infinity,
workInProgressTransitions = null,
legacyErrorBoundariesThatAlreadyFailed = null,
- rootWithPendingPassiveEffects = null,
- pendingPassiveEffectsLanes = 0,
- pendingPassiveEffectsRemainingLanes = 0,
+ pendingEffectsStatus = 0,
+ pendingEffectsRoot = null,
+ pendingFinishedWork = null,
+ pendingEffectsLanes = 0,
+ pendingEffectsRemainingLanes = 0,
pendingPassiveTransitions = null,
+ pendingRecoverableErrors = null,
nestedUpdateCount = 0,
rootWithNestedUpdates = null;
function requestUpdateLane(fiber) {
@@ -11671,8 +11548,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
default:
throw Error(formatProdErrorMessage(329));
}
- shouldTimeSlice.finishedWork = forceSync;
- shouldTimeSlice.finishedLanes = lanes;
if (
(lanes & 62914560) === lanes &&
(alwaysThrottleRetries || 3 === renderWasConcurrent) &&
@@ -11685,7 +11560,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
- if (0 !== getNextLanes(shouldTimeSlice, 0)) break a;
+ if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;
shouldTimeSlice.timeoutHandle = scheduleTimeout(
commitRootWhenReady.bind(
null,
@@ -11746,18 +11621,24 @@ function commitRootWhenReady(
completedRenderStartTime,
completedRenderEndTime
) {
- var subtreeFlags = finishedWork.subtreeFlags;
- if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408))
+ root.timeoutHandle = -1;
+ suspendedCommitReason = finishedWork.subtreeFlags;
+ if (
+ suspendedCommitReason & 8192 ||
+ 16785408 === (suspendedCommitReason & 16785408)
+ )
if (
((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }),
accumulateSuspenseyCommitOnFiber(finishedWork),
- (finishedWork = waitForCommitToBeReady()),
- null !== finishedWork)
+ (suspendedCommitReason = waitForCommitToBeReady()),
+ null !== suspendedCommitReason)
) {
- root.cancelPendingCommit = finishedWork(
+ root.cancelPendingCommit = suspendedCommitReason(
commitRoot.bind(
null,
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
@@ -11775,16 +11656,14 @@ function commitRootWhenReady(
}
commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
+ suspendedRetryLanes
);
}
function isRenderConsistentWithExternalStores(finishedWork) {
@@ -11867,8 +11746,6 @@ function resetWorkInProgressStack() {
}
}
function prepareFreshStack(root, lanes) {
- root.finishedWork = null;
- root.finishedLanes = 0;
var timeoutHandle = root.timeoutHandle;
-1 !== timeoutHandle &&
((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
@@ -12195,7 +12072,7 @@ function renderRootConcurrent(root, lanes) {
default:
throw Error(formatProdErrorMessage(462));
}
- workLoopConcurrent();
+ workLoopConcurrentByScheduler();
break;
} catch (thrownValue$194) {
handleThrow(root, thrownValue$194);
@@ -12218,7 +12095,7 @@ function renderRootConcurrent(root, lanes) {
finishQueueingConcurrentUpdates();
return workInProgressRootExitStatus;
}
-function workLoopConcurrent() {
+function workLoopConcurrentByScheduler() {
for (; null !== workInProgress && !shouldYield(); )
performUnitOfWork(workInProgress);
}
@@ -12405,154 +12282,308 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) {
}
function commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
-) {
- var prevTransition = ReactSharedInternals.T,
- previousUpdateLanePriority = ReactDOMSharedInternals.p;
- try {
- (ReactDOMSharedInternals.p = 2),
- (ReactSharedInternals.T = null),
- commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- previousUpdateLanePriority,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
- );
- } finally {
- (ReactSharedInternals.T = prevTransition),
- (ReactDOMSharedInternals.p = previousUpdateLanePriority);
- }
-}
-function commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- renderPriorityLevel,
- spawnedLane,
- updatedLanes,
suspendedRetryLanes
) {
- do flushPassiveEffects();
- while (null !== rootWithPendingPassiveEffects);
+ root.cancelPendingCommit = null;
+ do flushPendingEffects();
+ while (0 !== pendingEffectsStatus);
if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));
- var finishedWork = root.finishedWork;
- didIncludeRenderPhaseUpdate = root.finishedLanes;
null !== injectedProfilingHooks &&
"function" === typeof injectedProfilingHooks.markCommitStarted &&
- injectedProfilingHooks.markCommitStarted(didIncludeRenderPhaseUpdate);
- if (null === finishedWork) return markCommitStopped(), null;
- root.finishedWork = null;
- root.finishedLanes = 0;
- if (finishedWork === root.current) throw Error(formatProdErrorMessage(177));
- var remainingLanes = finishedWork.lanes | finishedWork.childLanes;
- remainingLanes |= concurrentlyUpdatedLanes;
- markRootFinished(
- root,
- didIncludeRenderPhaseUpdate,
- remainingLanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes
- );
- root === workInProgressRoot &&
- ((workInProgress = workInProgressRoot = null),
- (workInProgressRootRenderLanes = 0));
- spawnedLane = !1;
- 0 !== (finishedWork.subtreeFlags & 10256) ||
- 0 !== (finishedWork.flags & 10256)
- ? ((spawnedLane = !0),
- (pendingPassiveEffectsRemainingLanes = remainingLanes),
- (pendingPassiveTransitions = transitions),
- (root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null),
- scheduleCallback$1(NormalPriority$1, function () {
- flushPassiveEffects(!0);
- return null;
- }))
- : ((root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null));
- commitStartTime = now();
- transitions = 0 !== (finishedWork.flags & 15990);
- 0 !== (finishedWork.subtreeFlags & 15990) || transitions
- ? ((transitions = ReactSharedInternals.T),
- (ReactSharedInternals.T = null),
- (updatedLanes = ReactDOMSharedInternals.p),
- (ReactDOMSharedInternals.p = 2),
- (suspendedRetryLanes = executionContext),
- (executionContext |= 4),
- commitBeforeMutationEffects(root, finishedWork),
- commitMutationEffects(root, finishedWork, didIncludeRenderPhaseUpdate),
- restoreSelection(selectionInformation, root.containerInfo),
- (_enabled = !!eventsEnabled),
- (selectionInformation = eventsEnabled = null),
- (root.current = finishedWork),
- null !== injectedProfilingHooks &&
- "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted &&
- injectedProfilingHooks.markLayoutEffectsStarted(
- didIncludeRenderPhaseUpdate
- ),
- commitLayoutEffects(finishedWork, root, didIncludeRenderPhaseUpdate),
- null !== injectedProfilingHooks &&
- "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped &&
- injectedProfilingHooks.markLayoutEffectsStopped(),
- requestPaint(),
- (executionContext = suspendedRetryLanes),
- (ReactDOMSharedInternals.p = updatedLanes),
- (ReactSharedInternals.T = transitions))
- : (root.current = finishedWork);
- spawnedLane
- ? ((spawnedLane = !1),
- (rootWithPendingPassiveEffects = root),
- (pendingPassiveEffectsLanes = didIncludeRenderPhaseUpdate))
- : releaseRootPooledCache(root, remainingLanes);
- remainingLanes = root.pendingLanes;
- 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
- onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
- isDevToolsPresent && root.memoizedUpdaters.clear();
- if (null !== recoverableErrors)
- for (
- renderPriorityLevel = root.onRecoverableError, finishedWork = 0;
- finishedWork < recoverableErrors.length;
- finishedWork++
- )
- (remainingLanes = recoverableErrors[finishedWork]),
- renderPriorityLevel(remainingLanes.value, {
- componentStack: remainingLanes.stack
- });
- 0 !== (pendingPassiveEffectsLanes & 3) &&
- 0 !== root.tag &&
- flushPassiveEffects();
- ensureRootIsScheduled(root);
- remainingLanes = root.pendingLanes;
- 0 !== (didIncludeRenderPhaseUpdate & 4194218) && 0 !== (remainingLanes & 42)
- ? ((nestedUpdateScheduled = !0),
- root === rootWithNestedUpdates
- ? nestedUpdateCount++
- : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
- : (nestedUpdateCount = 0);
- flushSyncWorkAcrossRoots_impl(0, !1);
- markCommitStopped();
- return null;
+ injectedProfilingHooks.markCommitStarted(lanes);
+ if (null === finishedWork) markCommitStopped();
+ else {
+ if (finishedWork === root.current) throw Error(formatProdErrorMessage(177));
+ didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
+ didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
+ markRootFinished(
+ root,
+ lanes,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+ );
+ root === workInProgressRoot &&
+ ((workInProgress = workInProgressRoot = null),
+ (workInProgressRootRenderLanes = 0));
+ pendingFinishedWork = finishedWork;
+ pendingEffectsRoot = root;
+ pendingEffectsLanes = lanes;
+ pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
+ pendingPassiveTransitions = transitions;
+ pendingRecoverableErrors = recoverableErrors;
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? ((root.callbackNode = null),
+ (root.callbackPriority = 0),
+ scheduleCallback$1(NormalPriority$1, function () {
+ flushPassiveEffects(!0);
+ return null;
+ }))
+ : ((root.callbackNode = null), (root.callbackPriority = 0));
+ commitStartTime = now();
+ lanes = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || lanes) {
+ lanes = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ recoverableErrors = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = 2;
+ transitions = executionContext;
+ executionContext |= 4;
+ try {
+ commitBeforeMutationEffects(root, finishedWork);
+ } finally {
+ (executionContext = transitions),
+ (ReactDOMSharedInternals.p = recoverableErrors),
+ (ReactSharedInternals.T = lanes);
+ }
+ }
+ pendingEffectsStatus = 1;
+ flushMutationEffects();
+ flushLayoutEffects();
+ }
+}
+function flushMutationEffects() {
+ if (1 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
+ rootMutationHasEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ inProgressLanes = lanes;
+ inProgressRoot = root;
+ commitMutationEffectsOnFiber(finishedWork, root);
+ inProgressRoot = inProgressLanes = null;
+ lanes = selectionInformation;
+ var curFocusedElem = getActiveElementDeep(root.containerInfo),
+ priorFocusedElem = lanes.focusedElem,
+ priorSelectionRange = lanes.selectionRange;
+ if (
+ curFocusedElem !== priorFocusedElem &&
+ priorFocusedElem &&
+ priorFocusedElem.ownerDocument &&
+ containsNode(
+ priorFocusedElem.ownerDocument.documentElement,
+ priorFocusedElem
+ )
+ ) {
+ if (
+ null !== priorSelectionRange &&
+ hasSelectionCapabilities(priorFocusedElem)
+ ) {
+ var start = priorSelectionRange.start,
+ end = priorSelectionRange.end;
+ void 0 === end && (end = start);
+ if ("selectionStart" in priorFocusedElem)
+ (priorFocusedElem.selectionStart = start),
+ (priorFocusedElem.selectionEnd = Math.min(
+ end,
+ priorFocusedElem.value.length
+ ));
+ else {
+ var doc = priorFocusedElem.ownerDocument || document,
+ win = (doc && doc.defaultView) || window;
+ if (win.getSelection) {
+ var selection = win.getSelection(),
+ length = priorFocusedElem.textContent.length,
+ start$jscomp$0 = Math.min(priorSelectionRange.start, length),
+ end$jscomp$0 =
+ void 0 === priorSelectionRange.end
+ ? start$jscomp$0
+ : Math.min(priorSelectionRange.end, length);
+ !selection.extend &&
+ start$jscomp$0 > end$jscomp$0 &&
+ ((curFocusedElem = end$jscomp$0),
+ (end$jscomp$0 = start$jscomp$0),
+ (start$jscomp$0 = curFocusedElem));
+ var startMarker = getNodeForCharacterOffset(
+ priorFocusedElem,
+ start$jscomp$0
+ ),
+ endMarker = getNodeForCharacterOffset(
+ priorFocusedElem,
+ end$jscomp$0
+ );
+ if (
+ startMarker &&
+ endMarker &&
+ (1 !== selection.rangeCount ||
+ selection.anchorNode !== startMarker.node ||
+ selection.anchorOffset !== startMarker.offset ||
+ selection.focusNode !== endMarker.node ||
+ selection.focusOffset !== endMarker.offset)
+ ) {
+ var range = doc.createRange();
+ range.setStart(startMarker.node, startMarker.offset);
+ selection.removeAllRanges();
+ start$jscomp$0 > end$jscomp$0
+ ? (selection.addRange(range),
+ selection.extend(endMarker.node, endMarker.offset))
+ : (range.setEnd(endMarker.node, endMarker.offset),
+ selection.addRange(range));
+ }
+ }
+ }
+ }
+ doc = [];
+ for (
+ selection = priorFocusedElem;
+ (selection = selection.parentNode);
+
+ )
+ 1 === selection.nodeType &&
+ doc.push({
+ element: selection,
+ left: selection.scrollLeft,
+ top: selection.scrollTop
+ });
+ "function" === typeof priorFocusedElem.focus &&
+ priorFocusedElem.focus();
+ for (
+ priorFocusedElem = 0;
+ priorFocusedElem < doc.length;
+ priorFocusedElem++
+ ) {
+ var info = doc[priorFocusedElem];
+ info.element.scrollLeft = info.left;
+ info.element.scrollTop = info.top;
+ }
+ }
+ _enabled = !!eventsEnabled;
+ selectionInformation = eventsEnabled = null;
+ } finally {
+ (executionContext = prevExecutionContext),
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = rootMutationHasEffect);
+ }
+ }
+ root.current = finishedWork;
+ pendingEffectsStatus = 2;
+ }
+}
+function flushLayoutEffects() {
+ if (2 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ recoverableErrors = pendingRecoverableErrors,
+ rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
+ if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
+ rootHasLayoutEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStarted &&
+ injectedProfilingHooks.markLayoutEffectsStarted(lanes),
+ (inProgressLanes = lanes),
+ (inProgressRoot = root),
+ commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork),
+ (inProgressRoot = inProgressLanes = null),
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStopped &&
+ injectedProfilingHooks.markLayoutEffectsStopped();
+ } finally {
+ (executionContext = prevExecutionContext),
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = rootHasLayoutEffect);
+ }
+ }
+ requestPaint();
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? (pendingEffectsStatus = 3)
+ : ((pendingEffectsStatus = 0),
+ (pendingEffectsRoot = null),
+ releaseRootPooledCache(root, root.pendingLanes));
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 === rootHasLayoutEffect &&
+ (legacyErrorBoundariesThatAlreadyFailed = null);
+ rootHasLayoutEffect = lanesToEventPriority(lanes);
+ finishedWork = finishedWork.stateNode;
+ if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
+ try {
+ var didError = 128 === (finishedWork.current.flags & 128);
+ switch (rootHasLayoutEffect) {
+ case 2:
+ var schedulerPriority = ImmediatePriority;
+ break;
+ case 8:
+ schedulerPriority = UserBlockingPriority;
+ break;
+ case 32:
+ schedulerPriority = NormalPriority$1;
+ break;
+ case 268435456:
+ schedulerPriority = IdlePriority;
+ break;
+ default:
+ schedulerPriority = NormalPriority$1;
+ }
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ finishedWork,
+ schedulerPriority,
+ didError
+ );
+ } catch (err) {}
+ isDevToolsPresent && root.memoizedUpdaters.clear();
+ if (null !== recoverableErrors) {
+ didError = ReactSharedInternals.T;
+ schedulerPriority = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = 2;
+ ReactSharedInternals.T = null;
+ try {
+ var onRecoverableError = root.onRecoverableError;
+ for (
+ finishedWork = 0;
+ finishedWork < recoverableErrors.length;
+ finishedWork++
+ ) {
+ var recoverableError = recoverableErrors[finishedWork];
+ onRecoverableError(recoverableError.value, {
+ componentStack: recoverableError.stack
+ });
+ }
+ } finally {
+ (ReactSharedInternals.T = didError),
+ (ReactDOMSharedInternals.p = schedulerPriority);
+ }
+ }
+ 0 !== (pendingEffectsLanes & 3) && 0 !== root.tag && flushPendingEffects();
+ ensureRootIsScheduled(root);
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)
+ ? ((nestedUpdateScheduled = !0),
+ root === rootWithNestedUpdates
+ ? nestedUpdateCount++
+ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
+ : (nestedUpdateCount = 0);
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ markCommitStopped();
+ }
}
function releaseRootPooledCache(root, remainingLanes) {
0 === (root.pooledCacheLanes &= remainingLanes) &&
@@ -12560,62 +12591,63 @@ function releaseRootPooledCache(root, remainingLanes) {
null != remainingLanes &&
((root.pooledCache = null), releaseCache(remainingLanes)));
}
+function flushPendingEffects(wasDelayedCommit) {
+ flushMutationEffects();
+ flushLayoutEffects();
+ return flushPassiveEffects(wasDelayedCommit);
+}
function flushPassiveEffects() {
- if (null !== rootWithPendingPassiveEffects) {
- var root$198 = rootWithPendingPassiveEffects,
- remainingLanes = pendingPassiveEffectsRemainingLanes;
- pendingPassiveEffectsRemainingLanes = 0;
- var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
- prevTransition = ReactSharedInternals.T,
- previousPriority = ReactDOMSharedInternals.p;
- try {
- ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority;
- ReactSharedInternals.T = null;
- if (null === rootWithPendingPassiveEffects)
- var JSCompiler_inline_result = !1;
- else {
- renderPriority = pendingPassiveTransitions;
- pendingPassiveTransitions = null;
- var root = rootWithPendingPassiveEffects,
- lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsLanes = 0;
- if (0 !== (executionContext & 6))
- throw Error(formatProdErrorMessage(331));
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStarted &&
- injectedProfilingHooks.markPassiveEffectsStarted(lanes);
- var prevExecutionContext = executionContext;
- executionContext |= 4;
- commitPassiveUnmountOnFiber(root.current);
- commitPassiveMountOnFiber(root, root.current, lanes, renderPriority);
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStopped &&
- injectedProfilingHooks.markPassiveEffectsStopped();
- executionContext = prevExecutionContext;
- flushSyncWorkAcrossRoots_impl(0, !1);
- if (
- injectedHook &&
- "function" === typeof injectedHook.onPostCommitFiberRoot
- )
- try {
- injectedHook.onPostCommitFiberRoot(rendererID, root);
- } catch (err) {}
- var stateNode = root.current.stateNode;
- stateNode.effectDuration = 0;
- stateNode.passiveEffectDuration = 0;
- JSCompiler_inline_result = !0;
- }
- return JSCompiler_inline_result;
- } finally {
- (ReactDOMSharedInternals.p = previousPriority),
- (ReactSharedInternals.T = prevTransition),
- releaseRootPooledCache(root$198, remainingLanes);
- }
+ if (3 !== pendingEffectsStatus) return !1;
+ var root = pendingEffectsRoot,
+ remainingLanes = pendingEffectsRemainingLanes;
+ pendingEffectsRemainingLanes = 0;
+ var renderPriority = lanesToEventPriority(pendingEffectsLanes),
+ prevTransition = ReactSharedInternals.T,
+ previousPriority = ReactDOMSharedInternals.p;
+ try {
+ ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority;
+ ReactSharedInternals.T = null;
+ renderPriority = pendingPassiveTransitions;
+ pendingPassiveTransitions = null;
+ var root$jscomp$0 = pendingEffectsRoot,
+ lanes = pendingEffectsLanes;
+ pendingEffectsStatus = 0;
+ pendingEffectsRoot = null;
+ pendingEffectsLanes = 0;
+ if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(331));
+ null !== injectedProfilingHooks &&
+ "function" === typeof injectedProfilingHooks.markPassiveEffectsStarted &&
+ injectedProfilingHooks.markPassiveEffectsStarted(lanes);
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ commitPassiveUnmountOnFiber(root$jscomp$0.current);
+ commitPassiveMountOnFiber(
+ root$jscomp$0,
+ root$jscomp$0.current,
+ lanes,
+ renderPriority
+ );
+ null !== injectedProfilingHooks &&
+ "function" === typeof injectedProfilingHooks.markPassiveEffectsStopped &&
+ injectedProfilingHooks.markPassiveEffectsStopped();
+ executionContext = prevExecutionContext;
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
+ } catch (err) {}
+ var stateNode = root$jscomp$0.current.stateNode;
+ stateNode.effectDuration = 0;
+ stateNode.passiveEffectDuration = 0;
+ return !0;
+ } finally {
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = prevTransition),
+ releaseRootPooledCache(root, remainingLanes);
}
- return !1;
}
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
@@ -12755,8 +12787,7 @@ function ensureRootIsScheduled(root) {
: (lastScheduledRoot = lastScheduledRoot.next = root));
mightHavePendingSyncWork = !0;
didScheduleMicrotask ||
- ((didScheduleMicrotask = !0),
- scheduleImmediateTask(processRootScheduleInMicrotask));
+ ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());
}
function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
if (!isFlushingWork && mightHavePendingSyncWork) {
@@ -12789,7 +12820,9 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
(JSCompiler_inline_result = workInProgressRootRenderLanes),
(JSCompiler_inline_result = getNextLanes(
root$200,
- root$200 === workInProgressRoot ? JSCompiler_inline_result : 0
+ root$200 === workInProgressRoot ? JSCompiler_inline_result : 0,
+ null !== root$200.cancelPendingCommit ||
+ -1 !== root$200.timeoutHandle
)),
0 === (JSCompiler_inline_result & 3) ||
checkIfRootIsPrerendering(root$200, JSCompiler_inline_result) ||
@@ -12801,6 +12834,9 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
isFlushingWork = !1;
}
}
+function processRootScheduleInImmediateTask() {
+ processRootScheduleInMicrotask();
+}
function processRootScheduleInMicrotask() {
mightHavePendingSyncWork = didScheduleMicrotask = !1;
var syncTransitionLanes = 0;
@@ -12849,7 +12885,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
suspendedLanes = workInProgressRootRenderLanes;
suspendedLanes = getNextLanes(
root,
- root === currentTime ? suspendedLanes : 0
+ root === currentTime ? suspendedLanes : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
pingedLanes = root.callbackNode;
if (
@@ -12901,13 +12938,16 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
}
function performWorkOnRootViaSchedulerTask(root, didTimeout) {
nestedUpdateScheduled = currentUpdateIsNested = !1;
+ if (0 !== pendingEffectsStatus && 3 !== pendingEffectsStatus)
+ return (root.callbackNode = null), (root.callbackPriority = 0), null;
var originalCallbackNode = root.callbackNode;
- if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
+ if (flushPendingEffects(!0) && root.callbackNode !== originalCallbackNode)
return null;
var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
root,
- root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0
+ root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout);
@@ -12917,16 +12957,19 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) {
: null;
}
function performSyncWorkOnRoot(root, lanes) {
- if (flushPassiveEffects()) return null;
+ if (flushPendingEffects()) return null;
currentUpdateIsNested = nestedUpdateScheduled;
nestedUpdateScheduled = !1;
performWorkOnRoot(root, lanes, !0);
}
-function scheduleImmediateTask(cb) {
+function scheduleImmediateRootScheduleTask() {
scheduleMicrotask(function () {
0 !== (executionContext & 6)
- ? scheduleCallback$3(ImmediatePriority, cb)
- : cb();
+ ? scheduleCallback$3(
+ ImmediatePriority,
+ processRootScheduleInImmediateTask
+ )
+ : processRootScheduleInMicrotask();
});
}
function requestTransitionLane() {
@@ -13029,20 +13072,20 @@ function extractEvents$1(
}
}
for (
- var i$jscomp$inline_1572 = 0;
- i$jscomp$inline_1572 < simpleEventPluginEvents.length;
- i$jscomp$inline_1572++
+ var i$jscomp$inline_1603 = 0;
+ i$jscomp$inline_1603 < simpleEventPluginEvents.length;
+ i$jscomp$inline_1603++
) {
- var eventName$jscomp$inline_1573 =
- simpleEventPluginEvents[i$jscomp$inline_1572],
- domEventName$jscomp$inline_1574 =
- eventName$jscomp$inline_1573.toLowerCase(),
- capitalizedEvent$jscomp$inline_1575 =
- eventName$jscomp$inline_1573[0].toUpperCase() +
- eventName$jscomp$inline_1573.slice(1);
+ var eventName$jscomp$inline_1604 =
+ simpleEventPluginEvents[i$jscomp$inline_1603],
+ domEventName$jscomp$inline_1605 =
+ eventName$jscomp$inline_1604.toLowerCase(),
+ capitalizedEvent$jscomp$inline_1606 =
+ eventName$jscomp$inline_1604[0].toUpperCase() +
+ eventName$jscomp$inline_1604.slice(1);
registerSimpleEvent(
- domEventName$jscomp$inline_1574,
- "on" + capitalizedEvent$jscomp$inline_1575
+ domEventName$jscomp$inline_1605,
+ "on" + capitalizedEvent$jscomp$inline_1606
);
}
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -14886,7 +14929,9 @@ function canHydrateInstance(instance, type, props, inRootOrSingleton) {
else if (
name !== anyProps.rel ||
instance.getAttribute("href") !==
- (null == anyProps.href ? null : anyProps.href) ||
+ (null == anyProps.href || "" === anyProps.href
+ ? null
+ : anyProps.href) ||
instance.getAttribute("crossorigin") !==
(null == anyProps.crossOrigin ? null : anyProps.crossOrigin) ||
instance.getAttribute("title") !==
@@ -15780,11 +15825,7 @@ function FiberRootNode(
) {
this.tag = tag;
this.containerInfo = containerInfo;
- this.finishedWork =
- this.pingCache =
- this.current =
- this.pendingChildren =
- null;
+ this.pingCache = this.current = this.pendingChildren = null;
this.timeoutHandle = -1;
this.callbackNode =
this.next =
@@ -15797,7 +15838,6 @@ function FiberRootNode(
this.entangledLanes =
this.shellSuspendCounter =
this.errorRecoveryDisabledLanes =
- this.finishedLanes =
this.expiredLanes =
this.warmLanes =
this.pingedLanes =
@@ -16519,7 +16559,7 @@ ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount =
if (null !== root) {
this._internalRoot = null;
var container = root.containerInfo;
- 0 === root.tag && flushPassiveEffects();
+ 0 === root.tag && flushPendingEffects();
updateContainerImpl(root.current, 2, null, root, null, null);
flushSyncWork();
container[internalContainerInstanceKey] = null;
@@ -16543,16 +16583,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
0 === i && attemptExplicitHydrationTarget(target);
}
};
-var isomorphicReactPackageVersion$jscomp$inline_1817 = React.version;
+var isomorphicReactPackageVersion$jscomp$inline_1848 = React.version;
if (
- "19.1.0-native-fb-a9bbe346-20241219" !==
- isomorphicReactPackageVersion$jscomp$inline_1817
+ "19.1.0-native-fb-a160102f-20250107" !==
+ isomorphicReactPackageVersion$jscomp$inline_1848
)
throw Error(
formatProdErrorMessage(
527,
- isomorphicReactPackageVersion$jscomp$inline_1817,
- "19.1.0-native-fb-a9bbe346-20241219"
+ isomorphicReactPackageVersion$jscomp$inline_1848,
+ "19.1.0-native-fb-a160102f-20250107"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16572,12 +16612,12 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
null === componentOrElement ? null : componentOrElement.stateNode;
return componentOrElement;
};
-var internals$jscomp$inline_1824 = {
+var internals$jscomp$inline_1855 = {
bundleType: 0,
- version: "19.1.0-native-fb-a9bbe346-20241219",
+ version: "19.1.0-native-fb-a160102f-20250107",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.1.0-native-fb-a9bbe346-20241219",
+ reconcilerVersion: "19.1.0-native-fb-a160102f-20250107",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$293 = 0;
@@ -16595,16 +16635,16 @@ var internals$jscomp$inline_1824 = {
}
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
- var hook$jscomp$inline_2237 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+ var hook$jscomp$inline_2261 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
- !hook$jscomp$inline_2237.isDisabled &&
- hook$jscomp$inline_2237.supportsFiber
+ !hook$jscomp$inline_2261.isDisabled &&
+ hook$jscomp$inline_2261.supportsFiber
)
try {
- (rendererID = hook$jscomp$inline_2237.inject(
- internals$jscomp$inline_1824
+ (rendererID = hook$jscomp$inline_2261.inject(
+ internals$jscomp$inline_1855
)),
- (injectedHook = hook$jscomp$inline_2237);
+ (injectedHook = hook$jscomp$inline_2261);
} catch (err) {}
}
exports.createRoot = function (container, options) {
@@ -16698,4 +16738,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
-exports.version = "19.1.0-native-fb-a9bbe346-20241219";
+exports.version = "19.1.0-native-fb-a160102f-20250107";
diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js
index 634775eb9717d..c15f66c425084 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<<00ecb576e82a6dfa19b248b1ce8275b9>>
+ * @generated SignedSource<>
*/
/*
@@ -102,7 +102,7 @@ __DEV__ &&
if (null !== resolveFamily) {
var staleFamilies = update.staleFamilies;
update = update.updatedFamilies;
- flushPassiveEffects();
+ flushPendingEffects();
scheduleFibersWithFamiliesRecursively(
root.current,
update,
@@ -964,41 +964,6 @@ __DEV__ &&
}
return hook.checkDCE ? !0 : !1;
}
- function onCommitRoot$1(root, eventPriority) {
- if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
- try {
- var didError = 128 === (root.current.flags & 128);
- switch (eventPriority) {
- case DiscreteEventPriority:
- var schedulerPriority = ImmediatePriority;
- break;
- case ContinuousEventPriority:
- schedulerPriority = UserBlockingPriority;
- break;
- case DefaultEventPriority:
- schedulerPriority = NormalPriority$1;
- break;
- case IdleEventPriority:
- schedulerPriority = IdlePriority;
- break;
- default:
- schedulerPriority = NormalPriority$1;
- }
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- schedulerPriority,
- didError
- );
- } catch (err) {
- hasLoggedError ||
- ((hasLoggedError = !0),
- error$jscomp$0(
- "React instrumentation encountered an error: %s",
- err
- ));
- }
- }
function setIsStrictModeForDevtools(newIsStrictMode) {
"function" === typeof log$1 &&
(unstable_setDisableYieldValue(newIsStrictMode),
@@ -1128,14 +1093,13 @@ __DEV__ &&
);
}
}
- function getNextLanes(root, wipLanes) {
+ function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0,
suspendedLanes = root.suspendedLanes,
- pingedLanes = root.pingedLanes,
- warmLanes = root.warmLanes;
- root = 0 !== root.finishedLanes;
+ pingedLanes = root.pingedLanes;
+ root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes
? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
@@ -1145,29 +1109,30 @@ __DEV__ &&
0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = nonIdlePendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes)))))
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes =
+ getHighestPriorityLanes(rootHasPendingCommit)))))
: ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
0 !== nonIdlePendingLanes
? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
: 0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = pendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes))));
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = pendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes
? 0
: 0 !== wipLanes &&
wipLanes !== nextLanes &&
0 === (wipLanes & suspendedLanes) &&
((suspendedLanes = nextLanes & -nextLanes),
- (warmLanes = wipLanes & -wipLanes),
- suspendedLanes >= warmLanes ||
- (32 === suspendedLanes && 0 !== (warmLanes & 4194176)))
+ (rootHasPendingCommit = wipLanes & -wipLanes),
+ suspendedLanes >= rootHasPendingCommit ||
+ (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176)))
? wipLanes
: nextLanes;
}
@@ -3766,100 +3731,6 @@ __DEV__ &&
"true" === elem.contentEditable)
);
}
- function restoreSelection(priorSelectionInformation, containerInfo) {
- var curFocusedElem = getActiveElementDeep(containerInfo);
- containerInfo = priorSelectionInformation.focusedElem;
- var priorSelectionRange = priorSelectionInformation.selectionRange;
- if (
- curFocusedElem !== containerInfo &&
- containerInfo &&
- containerInfo.ownerDocument &&
- containsNode(containerInfo.ownerDocument.documentElement, containerInfo)
- ) {
- if (
- null !== priorSelectionRange &&
- hasSelectionCapabilities(containerInfo)
- )
- if (
- ((priorSelectionInformation = priorSelectionRange.start),
- (curFocusedElem = priorSelectionRange.end),
- void 0 === curFocusedElem &&
- (curFocusedElem = priorSelectionInformation),
- "selectionStart" in containerInfo)
- )
- (containerInfo.selectionStart = priorSelectionInformation),
- (containerInfo.selectionEnd = Math.min(
- curFocusedElem,
- containerInfo.value.length
- ));
- else if (
- ((curFocusedElem =
- ((priorSelectionInformation =
- containerInfo.ownerDocument || document) &&
- priorSelectionInformation.defaultView) ||
- window),
- curFocusedElem.getSelection)
- ) {
- curFocusedElem = curFocusedElem.getSelection();
- var length = containerInfo.textContent.length,
- start = Math.min(priorSelectionRange.start, length);
- priorSelectionRange =
- void 0 === priorSelectionRange.end
- ? start
- : Math.min(priorSelectionRange.end, length);
- !curFocusedElem.extend &&
- start > priorSelectionRange &&
- ((length = priorSelectionRange),
- (priorSelectionRange = start),
- (start = length));
- length = getNodeForCharacterOffset(containerInfo, start);
- var endMarker = getNodeForCharacterOffset(
- containerInfo,
- priorSelectionRange
- );
- length &&
- endMarker &&
- (1 !== curFocusedElem.rangeCount ||
- curFocusedElem.anchorNode !== length.node ||
- curFocusedElem.anchorOffset !== length.offset ||
- curFocusedElem.focusNode !== endMarker.node ||
- curFocusedElem.focusOffset !== endMarker.offset) &&
- ((priorSelectionInformation =
- priorSelectionInformation.createRange()),
- priorSelectionInformation.setStart(length.node, length.offset),
- curFocusedElem.removeAllRanges(),
- start > priorSelectionRange
- ? (curFocusedElem.addRange(priorSelectionInformation),
- curFocusedElem.extend(endMarker.node, endMarker.offset))
- : (priorSelectionInformation.setEnd(
- endMarker.node,
- endMarker.offset
- ),
- curFocusedElem.addRange(priorSelectionInformation)));
- }
- priorSelectionInformation = [];
- for (
- curFocusedElem = containerInfo;
- (curFocusedElem = curFocusedElem.parentNode);
-
- )
- 1 === curFocusedElem.nodeType &&
- priorSelectionInformation.push({
- element: curFocusedElem,
- left: curFocusedElem.scrollLeft,
- top: curFocusedElem.scrollTop
- });
- "function" === typeof containerInfo.focus && containerInfo.focus();
- for (
- containerInfo = 0;
- containerInfo < priorSelectionInformation.length;
- containerInfo++
- )
- (curFocusedElem = priorSelectionInformation[containerInfo]),
- (curFocusedElem.element.scrollLeft = curFocusedElem.left),
- (curFocusedElem.element.scrollTop = curFocusedElem.top);
- }
- }
function constructSelectEvent(
dispatchQueue,
nativeEvent,
@@ -5940,7 +5811,7 @@ __DEV__ &&
null;
hookTypesUpdateIndexDev = -1;
null !== current &&
- (current.flags & 31457280) !== (workInProgress.flags & 31457280) &&
+ (current.flags & 29360128) !== (workInProgress.flags & 29360128) &&
(current.mode & ConcurrentMode) !== NoMode &&
error$jscomp$0(
"Internal React error: Expected static flag was missing. Please notify the React team."
@@ -9311,14 +9182,14 @@ __DEV__ &&
if (null === ref)
null !== current &&
null !== current.ref &&
- (workInProgress.flags |= 2097664);
+ (workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
);
if (null === current || current.ref !== ref)
- workInProgress.flags |= 2097664;
+ workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
@@ -9795,32 +9666,32 @@ __DEV__ &&
return current;
}
function updateSuspenseComponent(current, workInProgress, renderLanes) {
- var JSCompiler_object_inline_digest_2371;
- var JSCompiler_object_inline_stack_2372 = workInProgress.pendingProps;
+ var JSCompiler_object_inline_digest_2408;
+ var JSCompiler_object_inline_stack_2409 = workInProgress.pendingProps;
shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128);
- var JSCompiler_object_inline_componentStack_2373 = !1;
+ var JSCompiler_object_inline_componentStack_2410 = !1;
var didSuspend = 0 !== (workInProgress.flags & 128);
- (JSCompiler_object_inline_digest_2371 = didSuspend) ||
- (JSCompiler_object_inline_digest_2371 =
+ (JSCompiler_object_inline_digest_2408 = didSuspend) ||
+ (JSCompiler_object_inline_digest_2408 =
null !== current && null === current.memoizedState
? !1
: 0 !== (suspenseStackCursor.current & ForceSuspenseFallback));
- JSCompiler_object_inline_digest_2371 &&
- ((JSCompiler_object_inline_componentStack_2373 = !0),
+ JSCompiler_object_inline_digest_2408 &&
+ ((JSCompiler_object_inline_componentStack_2410 = !0),
(workInProgress.flags &= -129));
- JSCompiler_object_inline_digest_2371 = 0 !== (workInProgress.flags & 32);
+ JSCompiler_object_inline_digest_2408 = 0 !== (workInProgress.flags & 32);
workInProgress.flags &= -33;
if (null === current) {
if (isHydrating) {
- JSCompiler_object_inline_componentStack_2373
+ JSCompiler_object_inline_componentStack_2410
? pushPrimaryTreeSuspenseHandler(workInProgress)
: reuseSuspenseHandlerOnStack(workInProgress);
if (isHydrating) {
- var JSCompiler_object_inline_message_2370 = nextHydratableInstance;
+ var JSCompiler_object_inline_message_2407 = nextHydratableInstance;
var JSCompiler_temp;
- if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2370)) {
+ if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2407)) {
c: {
- var instance = JSCompiler_object_inline_message_2370;
+ var instance = JSCompiler_object_inline_message_2407;
for (
JSCompiler_temp = rootOrSingletonContext;
8 !== instance.nodeType;
@@ -9862,89 +9733,89 @@ __DEV__ &&
JSCompiler_temp &&
(warnNonHydratedInstance(
workInProgress,
- JSCompiler_object_inline_message_2370
+ JSCompiler_object_inline_message_2407
),
throwOnHydrationMismatch(workInProgress));
}
- JSCompiler_object_inline_message_2370 = workInProgress.memoizedState;
+ JSCompiler_object_inline_message_2407 = workInProgress.memoizedState;
if (
- null !== JSCompiler_object_inline_message_2370 &&
- ((JSCompiler_object_inline_message_2370 =
- JSCompiler_object_inline_message_2370.dehydrated),
- null !== JSCompiler_object_inline_message_2370)
+ null !== JSCompiler_object_inline_message_2407 &&
+ ((JSCompiler_object_inline_message_2407 =
+ JSCompiler_object_inline_message_2407.dehydrated),
+ null !== JSCompiler_object_inline_message_2407)
)
return (
- isSuspenseInstanceFallback(JSCompiler_object_inline_message_2370)
+ isSuspenseInstanceFallback(JSCompiler_object_inline_message_2407)
? (workInProgress.lanes = 32)
: (workInProgress.lanes = 536870912),
null
);
popSuspenseHandler(workInProgress);
}
- JSCompiler_object_inline_message_2370 =
- JSCompiler_object_inline_stack_2372.children;
- JSCompiler_temp = JSCompiler_object_inline_stack_2372.fallback;
- if (JSCompiler_object_inline_componentStack_2373)
+ JSCompiler_object_inline_message_2407 =
+ JSCompiler_object_inline_stack_2409.children;
+ JSCompiler_temp = JSCompiler_object_inline_stack_2409.fallback;
+ if (JSCompiler_object_inline_componentStack_2410)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_stack_2372 =
+ (JSCompiler_object_inline_stack_2409 =
mountSuspenseFallbackChildren(
workInProgress,
- JSCompiler_object_inline_message_2370,
+ JSCompiler_object_inline_message_2407,
JSCompiler_temp,
renderLanes
)),
- (JSCompiler_object_inline_componentStack_2373 =
+ (JSCompiler_object_inline_componentStack_2410 =
workInProgress.child),
- (JSCompiler_object_inline_componentStack_2373.memoizedState =
+ (JSCompiler_object_inline_componentStack_2410.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_componentStack_2373.childLanes =
+ (JSCompiler_object_inline_componentStack_2410.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2371,
+ JSCompiler_object_inline_digest_2408,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
- JSCompiler_object_inline_stack_2372
+ JSCompiler_object_inline_stack_2409
);
if (
"number" ===
- typeof JSCompiler_object_inline_stack_2372.unstable_expectedLoadTime
+ typeof JSCompiler_object_inline_stack_2409.unstable_expectedLoadTime
)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_stack_2372 =
+ (JSCompiler_object_inline_stack_2409 =
mountSuspenseFallbackChildren(
workInProgress,
- JSCompiler_object_inline_message_2370,
+ JSCompiler_object_inline_message_2407,
JSCompiler_temp,
renderLanes
)),
- (JSCompiler_object_inline_componentStack_2373 =
+ (JSCompiler_object_inline_componentStack_2410 =
workInProgress.child),
- (JSCompiler_object_inline_componentStack_2373.memoizedState =
+ (JSCompiler_object_inline_componentStack_2410.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_componentStack_2373.childLanes =
+ (JSCompiler_object_inline_componentStack_2410.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2371,
+ JSCompiler_object_inline_digest_2408,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress.lanes = 4194304),
- JSCompiler_object_inline_stack_2372
+ JSCompiler_object_inline_stack_2409
);
pushPrimaryTreeSuspenseHandler(workInProgress);
return mountSuspensePrimaryChildren(
workInProgress,
- JSCompiler_object_inline_message_2370
+ JSCompiler_object_inline_message_2407
);
}
var prevState = current.memoizedState;
if (
null !== prevState &&
- ((JSCompiler_object_inline_message_2370 = prevState.dehydrated),
- null !== JSCompiler_object_inline_message_2370)
+ ((JSCompiler_object_inline_message_2407 = prevState.dehydrated),
+ null !== JSCompiler_object_inline_message_2407)
) {
if (didSuspend)
workInProgress.flags & 256
@@ -9961,32 +9832,32 @@ __DEV__ &&
(workInProgress.flags |= 128),
(workInProgress = null))
: (reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_componentStack_2373 =
- JSCompiler_object_inline_stack_2372.fallback),
- (JSCompiler_object_inline_message_2370 = workInProgress.mode),
- (JSCompiler_object_inline_stack_2372 = createFiberFromOffscreen(
+ (JSCompiler_object_inline_componentStack_2410 =
+ JSCompiler_object_inline_stack_2409.fallback),
+ (JSCompiler_object_inline_message_2407 = workInProgress.mode),
+ (JSCompiler_object_inline_stack_2409 = createFiberFromOffscreen(
{
mode: "visible",
- children: JSCompiler_object_inline_stack_2372.children
+ children: JSCompiler_object_inline_stack_2409.children
},
- JSCompiler_object_inline_message_2370,
+ JSCompiler_object_inline_message_2407,
0,
null
)),
- (JSCompiler_object_inline_componentStack_2373 =
+ (JSCompiler_object_inline_componentStack_2410 =
createFiberFromFragment(
- JSCompiler_object_inline_componentStack_2373,
- JSCompiler_object_inline_message_2370,
+ JSCompiler_object_inline_componentStack_2410,
+ JSCompiler_object_inline_message_2407,
renderLanes,
null
)),
- (JSCompiler_object_inline_componentStack_2373.flags |= 2),
- (JSCompiler_object_inline_stack_2372.return = workInProgress),
- (JSCompiler_object_inline_componentStack_2373.return =
+ (JSCompiler_object_inline_componentStack_2410.flags |= 2),
+ (JSCompiler_object_inline_stack_2409.return = workInProgress),
+ (JSCompiler_object_inline_componentStack_2410.return =
workInProgress),
- (JSCompiler_object_inline_stack_2372.sibling =
- JSCompiler_object_inline_componentStack_2373),
- (workInProgress.child = JSCompiler_object_inline_stack_2372),
+ (JSCompiler_object_inline_stack_2409.sibling =
+ JSCompiler_object_inline_componentStack_2410),
+ (workInProgress.child = JSCompiler_object_inline_stack_2409),
(workInProgress.mode & ConcurrentMode) !== NoMode &&
reconcileChildFibers(
workInProgress,
@@ -9994,63 +9865,63 @@ __DEV__ &&
null,
renderLanes
),
- (JSCompiler_object_inline_stack_2372 = workInProgress.child),
- (JSCompiler_object_inline_stack_2372.memoizedState =
+ (JSCompiler_object_inline_stack_2409 = workInProgress.child),
+ (JSCompiler_object_inline_stack_2409.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
- (JSCompiler_object_inline_stack_2372.childLanes =
+ (JSCompiler_object_inline_stack_2409.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2371,
+ JSCompiler_object_inline_digest_2408,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress =
- JSCompiler_object_inline_componentStack_2373));
+ JSCompiler_object_inline_componentStack_2410));
else if (
(pushPrimaryTreeSuspenseHandler(workInProgress),
isHydrating &&
error$jscomp$0(
"We should not be hydrating here. This is a bug in React. Please file a bug."
),
- isSuspenseInstanceFallback(JSCompiler_object_inline_message_2370))
+ isSuspenseInstanceFallback(JSCompiler_object_inline_message_2407))
) {
- JSCompiler_object_inline_digest_2371 =
- JSCompiler_object_inline_message_2370.nextSibling &&
- JSCompiler_object_inline_message_2370.nextSibling.dataset;
- if (JSCompiler_object_inline_digest_2371) {
- JSCompiler_temp = JSCompiler_object_inline_digest_2371.dgst;
- var message = JSCompiler_object_inline_digest_2371.msg;
- instance = JSCompiler_object_inline_digest_2371.stck;
- var componentStack = JSCompiler_object_inline_digest_2371.cstck;
+ JSCompiler_object_inline_digest_2408 =
+ JSCompiler_object_inline_message_2407.nextSibling &&
+ JSCompiler_object_inline_message_2407.nextSibling.dataset;
+ if (JSCompiler_object_inline_digest_2408) {
+ JSCompiler_temp = JSCompiler_object_inline_digest_2408.dgst;
+ var message = JSCompiler_object_inline_digest_2408.msg;
+ instance = JSCompiler_object_inline_digest_2408.stck;
+ var componentStack = JSCompiler_object_inline_digest_2408.cstck;
}
- JSCompiler_object_inline_message_2370 = message;
- JSCompiler_object_inline_digest_2371 = JSCompiler_temp;
- JSCompiler_object_inline_stack_2372 = instance;
- JSCompiler_temp = JSCompiler_object_inline_componentStack_2373 =
+ JSCompiler_object_inline_message_2407 = message;
+ JSCompiler_object_inline_digest_2408 = JSCompiler_temp;
+ JSCompiler_object_inline_stack_2409 = instance;
+ JSCompiler_temp = JSCompiler_object_inline_componentStack_2410 =
componentStack;
- JSCompiler_object_inline_componentStack_2373 =
- JSCompiler_object_inline_message_2370
- ? Error(JSCompiler_object_inline_message_2370)
+ JSCompiler_object_inline_componentStack_2410 =
+ JSCompiler_object_inline_message_2407
+ ? Error(JSCompiler_object_inline_message_2407)
: Error(
"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
);
- JSCompiler_object_inline_componentStack_2373.stack =
- JSCompiler_object_inline_stack_2372 || "";
- JSCompiler_object_inline_componentStack_2373.digest =
- JSCompiler_object_inline_digest_2371;
- JSCompiler_object_inline_digest_2371 =
+ JSCompiler_object_inline_componentStack_2410.stack =
+ JSCompiler_object_inline_stack_2409 || "";
+ JSCompiler_object_inline_componentStack_2410.digest =
+ JSCompiler_object_inline_digest_2408;
+ JSCompiler_object_inline_digest_2408 =
void 0 === JSCompiler_temp ? null : JSCompiler_temp;
- JSCompiler_object_inline_stack_2372 = {
- value: JSCompiler_object_inline_componentStack_2373,
+ JSCompiler_object_inline_stack_2409 = {
+ value: JSCompiler_object_inline_componentStack_2410,
source: null,
- stack: JSCompiler_object_inline_digest_2371
+ stack: JSCompiler_object_inline_digest_2408
};
- "string" === typeof JSCompiler_object_inline_digest_2371 &&
+ "string" === typeof JSCompiler_object_inline_digest_2408 &&
CapturedStacks.set(
- JSCompiler_object_inline_componentStack_2373,
- JSCompiler_object_inline_stack_2372
+ JSCompiler_object_inline_componentStack_2410,
+ JSCompiler_object_inline_stack_2409
);
- queueHydrationError(JSCompiler_object_inline_stack_2372);
+ queueHydrationError(JSCompiler_object_inline_stack_2409);
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
workInProgress,
@@ -10064,44 +9935,44 @@ __DEV__ &&
renderLanes,
!1
),
- (JSCompiler_object_inline_digest_2371 =
+ (JSCompiler_object_inline_digest_2408 =
0 !== (renderLanes & current.childLanes)),
- didReceiveUpdate || JSCompiler_object_inline_digest_2371)
+ didReceiveUpdate || JSCompiler_object_inline_digest_2408)
) {
- JSCompiler_object_inline_digest_2371 = workInProgressRoot;
+ JSCompiler_object_inline_digest_2408 = workInProgressRoot;
if (
- null !== JSCompiler_object_inline_digest_2371 &&
- ((JSCompiler_object_inline_stack_2372 = renderLanes & -renderLanes),
- (JSCompiler_object_inline_stack_2372 =
- 0 !== (JSCompiler_object_inline_stack_2372 & 42)
+ null !== JSCompiler_object_inline_digest_2408 &&
+ ((JSCompiler_object_inline_stack_2409 = renderLanes & -renderLanes),
+ (JSCompiler_object_inline_stack_2409 =
+ 0 !== (JSCompiler_object_inline_stack_2409 & 42)
? 1
: getBumpedLaneForHydrationByLane(
- JSCompiler_object_inline_stack_2372
+ JSCompiler_object_inline_stack_2409
)),
- (JSCompiler_object_inline_stack_2372 =
+ (JSCompiler_object_inline_stack_2409 =
0 !==
- (JSCompiler_object_inline_stack_2372 &
- (JSCompiler_object_inline_digest_2371.suspendedLanes |
+ (JSCompiler_object_inline_stack_2409 &
+ (JSCompiler_object_inline_digest_2408.suspendedLanes |
renderLanes))
? 0
- : JSCompiler_object_inline_stack_2372),
- 0 !== JSCompiler_object_inline_stack_2372 &&
- JSCompiler_object_inline_stack_2372 !== prevState.retryLane)
+ : JSCompiler_object_inline_stack_2409),
+ 0 !== JSCompiler_object_inline_stack_2409 &&
+ JSCompiler_object_inline_stack_2409 !== prevState.retryLane)
)
throw (
- ((prevState.retryLane = JSCompiler_object_inline_stack_2372),
+ ((prevState.retryLane = JSCompiler_object_inline_stack_2409),
enqueueConcurrentRenderForLane(
current,
- JSCompiler_object_inline_stack_2372
+ JSCompiler_object_inline_stack_2409
),
scheduleUpdateOnFiber(
- JSCompiler_object_inline_digest_2371,
+ JSCompiler_object_inline_digest_2408,
current,
- JSCompiler_object_inline_stack_2372
+ JSCompiler_object_inline_stack_2409
),
SelectiveHydrationException)
);
- JSCompiler_object_inline_message_2370.data ===
+ JSCompiler_object_inline_message_2407.data ===
SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible();
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
@@ -10109,14 +9980,14 @@ __DEV__ &&
renderLanes
);
} else
- JSCompiler_object_inline_message_2370.data ===
+ JSCompiler_object_inline_message_2407.data ===
SUSPENSE_PENDING_START_DATA
? ((workInProgress.flags |= 192),
(workInProgress.child = current.child),
(workInProgress = null))
: ((renderLanes = prevState.treeContext),
(nextHydratableInstance = getNextHydratable(
- JSCompiler_object_inline_message_2370.nextSibling
+ JSCompiler_object_inline_message_2407.nextSibling
)),
(hydrationParentFiber = workInProgress),
(isHydrating = !0),
@@ -10134,72 +10005,72 @@ __DEV__ &&
(treeContextProvider = workInProgress)),
(workInProgress = mountSuspensePrimaryChildren(
workInProgress,
- JSCompiler_object_inline_stack_2372.children
+ JSCompiler_object_inline_stack_2409.children
)),
(workInProgress.flags |= 4096));
return workInProgress;
}
- if (JSCompiler_object_inline_componentStack_2373)
+ if (JSCompiler_object_inline_componentStack_2410)
return (
reuseSuspenseHandlerOnStack(workInProgress),
- (JSCompiler_object_inline_componentStack_2373 =
- JSCompiler_object_inline_stack_2372.fallback),
- (JSCompiler_object_inline_message_2370 = workInProgress.mode),
+ (JSCompiler_object_inline_componentStack_2410 =
+ JSCompiler_object_inline_stack_2409.fallback),
+ (JSCompiler_object_inline_message_2407 = workInProgress.mode),
(JSCompiler_temp = current.child),
(instance = JSCompiler_temp.sibling),
(componentStack = {
mode: "hidden",
- children: JSCompiler_object_inline_stack_2372.children
+ children: JSCompiler_object_inline_stack_2409.children
}),
- (JSCompiler_object_inline_message_2370 & ConcurrentMode) === NoMode &&
+ (JSCompiler_object_inline_message_2407 & ConcurrentMode) === NoMode &&
workInProgress.child !== JSCompiler_temp
- ? ((JSCompiler_object_inline_stack_2372 = workInProgress.child),
- (JSCompiler_object_inline_stack_2372.childLanes = 0),
- (JSCompiler_object_inline_stack_2372.pendingProps =
+ ? ((JSCompiler_object_inline_stack_2409 = workInProgress.child),
+ (JSCompiler_object_inline_stack_2409.childLanes = 0),
+ (JSCompiler_object_inline_stack_2409.pendingProps =
componentStack),
workInProgress.mode & ProfileMode &&
- ((JSCompiler_object_inline_stack_2372.actualDuration = -0),
- (JSCompiler_object_inline_stack_2372.actualStartTime = -1.1),
- (JSCompiler_object_inline_stack_2372.selfBaseDuration =
+ ((JSCompiler_object_inline_stack_2409.actualDuration = -0),
+ (JSCompiler_object_inline_stack_2409.actualStartTime = -1.1),
+ (JSCompiler_object_inline_stack_2409.selfBaseDuration =
JSCompiler_temp.selfBaseDuration),
- (JSCompiler_object_inline_stack_2372.treeBaseDuration =
+ (JSCompiler_object_inline_stack_2409.treeBaseDuration =
JSCompiler_temp.treeBaseDuration)),
(workInProgress.deletions = null))
- : ((JSCompiler_object_inline_stack_2372 = createWorkInProgress(
+ : ((JSCompiler_object_inline_stack_2409 = createWorkInProgress(
JSCompiler_temp,
componentStack
)),
- (JSCompiler_object_inline_stack_2372.subtreeFlags =
- JSCompiler_temp.subtreeFlags & 31457280)),
+ (JSCompiler_object_inline_stack_2409.subtreeFlags =
+ JSCompiler_temp.subtreeFlags & 29360128)),
null !== instance
- ? (JSCompiler_object_inline_componentStack_2373 =
+ ? (JSCompiler_object_inline_componentStack_2410 =
createWorkInProgress(
instance,
- JSCompiler_object_inline_componentStack_2373
+ JSCompiler_object_inline_componentStack_2410
))
- : ((JSCompiler_object_inline_componentStack_2373 =
+ : ((JSCompiler_object_inline_componentStack_2410 =
createFiberFromFragment(
- JSCompiler_object_inline_componentStack_2373,
- JSCompiler_object_inline_message_2370,
+ JSCompiler_object_inline_componentStack_2410,
+ JSCompiler_object_inline_message_2407,
renderLanes,
null
)),
- (JSCompiler_object_inline_componentStack_2373.flags |= 2)),
- (JSCompiler_object_inline_componentStack_2373.return =
+ (JSCompiler_object_inline_componentStack_2410.flags |= 2)),
+ (JSCompiler_object_inline_componentStack_2410.return =
workInProgress),
- (JSCompiler_object_inline_stack_2372.return = workInProgress),
- (JSCompiler_object_inline_stack_2372.sibling =
- JSCompiler_object_inline_componentStack_2373),
- (workInProgress.child = JSCompiler_object_inline_stack_2372),
- (JSCompiler_object_inline_stack_2372 =
- JSCompiler_object_inline_componentStack_2373),
- (JSCompiler_object_inline_componentStack_2373 = workInProgress.child),
- (JSCompiler_object_inline_message_2370 = current.child.memoizedState),
- null === JSCompiler_object_inline_message_2370
- ? (JSCompiler_object_inline_message_2370 =
+ (JSCompiler_object_inline_stack_2409.return = workInProgress),
+ (JSCompiler_object_inline_stack_2409.sibling =
+ JSCompiler_object_inline_componentStack_2410),
+ (workInProgress.child = JSCompiler_object_inline_stack_2409),
+ (JSCompiler_object_inline_stack_2409 =
+ JSCompiler_object_inline_componentStack_2410),
+ (JSCompiler_object_inline_componentStack_2410 = workInProgress.child),
+ (JSCompiler_object_inline_message_2407 = current.child.memoizedState),
+ null === JSCompiler_object_inline_message_2407
+ ? (JSCompiler_object_inline_message_2407 =
mountSuspenseOffscreenState(renderLanes))
: ((JSCompiler_temp =
- JSCompiler_object_inline_message_2370.cachePool),
+ JSCompiler_object_inline_message_2407.cachePool),
null !== JSCompiler_temp
? ((instance = CacheContext._currentValue),
(JSCompiler_temp =
@@ -10207,45 +10078,45 @@ __DEV__ &&
? { parent: instance, pool: instance }
: JSCompiler_temp))
: (JSCompiler_temp = getSuspendedCache()),
- (JSCompiler_object_inline_message_2370 = {
+ (JSCompiler_object_inline_message_2407 = {
baseLanes:
- JSCompiler_object_inline_message_2370.baseLanes | renderLanes,
+ JSCompiler_object_inline_message_2407.baseLanes | renderLanes,
cachePool: JSCompiler_temp
})),
- (JSCompiler_object_inline_componentStack_2373.memoizedState =
- JSCompiler_object_inline_message_2370),
- (JSCompiler_object_inline_componentStack_2373.childLanes =
+ (JSCompiler_object_inline_componentStack_2410.memoizedState =
+ JSCompiler_object_inline_message_2407),
+ (JSCompiler_object_inline_componentStack_2410.childLanes =
getRemainingWorkInPrimaryTree(
current,
- JSCompiler_object_inline_digest_2371,
+ JSCompiler_object_inline_digest_2408,
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
- JSCompiler_object_inline_stack_2372
+ JSCompiler_object_inline_stack_2409
);
pushPrimaryTreeSuspenseHandler(workInProgress);
- JSCompiler_object_inline_digest_2371 = current.child;
- current = JSCompiler_object_inline_digest_2371.sibling;
- JSCompiler_object_inline_digest_2371 = createWorkInProgress(
- JSCompiler_object_inline_digest_2371,
+ JSCompiler_object_inline_digest_2408 = current.child;
+ current = JSCompiler_object_inline_digest_2408.sibling;
+ JSCompiler_object_inline_digest_2408 = createWorkInProgress(
+ JSCompiler_object_inline_digest_2408,
{
mode: "visible",
- children: JSCompiler_object_inline_stack_2372.children
+ children: JSCompiler_object_inline_stack_2409.children
}
);
(workInProgress.mode & ConcurrentMode) === NoMode &&
- (JSCompiler_object_inline_digest_2371.lanes = renderLanes);
- JSCompiler_object_inline_digest_2371.return = workInProgress;
- JSCompiler_object_inline_digest_2371.sibling = null;
+ (JSCompiler_object_inline_digest_2408.lanes = renderLanes);
+ JSCompiler_object_inline_digest_2408.return = workInProgress;
+ JSCompiler_object_inline_digest_2408.sibling = null;
null !== current &&
((renderLanes = workInProgress.deletions),
null === renderLanes
? ((workInProgress.deletions = [current]),
(workInProgress.flags |= 16))
: renderLanes.push(current));
- workInProgress.child = JSCompiler_object_inline_digest_2371;
+ workInProgress.child = JSCompiler_object_inline_digest_2408;
workInProgress.memoizedState = null;
- return JSCompiler_object_inline_digest_2371;
+ return JSCompiler_object_inline_digest_2408;
}
function mountSuspensePrimaryChildren(workInProgress, primaryChildren) {
primaryChildren = createFiberFromOffscreen(
@@ -12122,7 +11993,7 @@ __DEV__ &&
if (
((firstChild = nextEffect),
(root = firstChild.child),
- 0 !== (firstChild.subtreeFlags & 1028) && null !== root)
+ 0 !== (firstChild.subtreeFlags & 1024) && null !== root)
)
(root.return = firstChild), (nextEffect = root);
else
@@ -12181,9 +12052,6 @@ __DEV__ &&
}
nextEffect = firstChild.return;
}
- firstChild = shouldFireAfterActiveInstanceBlur;
- shouldFireAfterActiveInstanceBlur = !1;
- return firstChild;
}
function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
var flags = finishedWork.flags;
@@ -12716,12 +12584,6 @@ __DEV__ &&
}
});
}
- function commitMutationEffects(root, finishedWork, committedLanes) {
- inProgressLanes = committedLanes;
- inProgressRoot = root;
- commitMutationEffectsOnFiber(finishedWork, root);
- inProgressRoot = inProgressLanes = null;
- }
function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
var deletions = parentFiber.deletions;
if (null !== deletions)
@@ -12859,7 +12721,9 @@ __DEV__ &&
if (
((hoistableRoot = maybeNodes[i]),
hoistableRoot.getAttribute("href") ===
- (null == current.href ? null : current.href) &&
+ (null == current.href || "" === current.href
+ ? null
+ : current.href) &&
hoistableRoot.getAttribute("rel") ===
(null == current.rel ? null : current.rel) &&
hoistableRoot.getAttribute("title") ===
@@ -13300,12 +13164,6 @@ __DEV__ &&
parentFiber = parentFiber.sibling;
}
}
- function commitLayoutEffects(finishedWork, root, committedLanes) {
- inProgressLanes = committedLanes;
- inProgressRoot = root;
- commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);
- inProgressRoot = inProgressLanes = null;
- }
function recursivelyTraverseLayoutEffects(root, parentFiber) {
if (parentFiber.subtreeFlags & 8772)
for (parentFiber = parentFiber.child; null !== parentFiber; )
@@ -13553,6 +13411,14 @@ __DEV__ &&
flags & 2048 &&
commitHookPassiveMountEffects(finishedWork, Passive | HasEffect);
break;
+ case 1:
+ recursivelyTraversePassiveMountEffects(
+ finishedRoot,
+ finishedWork,
+ committedLanes,
+ committedTransitions
+ );
+ break;
case 3:
var prevEffectDuration = pushNestedEffectDurations();
recursivelyTraversePassiveMountEffects(
@@ -14179,7 +14045,7 @@ __DEV__ &&
(workInProgress.deletions = null),
(workInProgress.actualDuration = -0),
(workInProgress.actualStartTime = -1.1));
- workInProgress.flags = current.flags & 31457280;
+ workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -14217,7 +14083,7 @@ __DEV__ &&
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
- workInProgress.flags &= 31457282;
+ workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
@@ -14527,8 +14393,8 @@ __DEV__ &&
)
(newChildLanes |= _child2.lanes | _child2.childLanes),
- (subtreeFlags |= _child2.subtreeFlags & 31457280),
- (subtreeFlags |= _child2.flags & 31457280),
+ (subtreeFlags |= _child2.subtreeFlags & 29360128),
+ (subtreeFlags |= _child2.flags & 29360128),
(_treeBaseDuration += _child2.treeBaseDuration),
(_child2 = _child2.sibling);
completedWork.treeBaseDuration = _treeBaseDuration;
@@ -14540,8 +14406,8 @@ __DEV__ &&
)
(newChildLanes |=
_treeBaseDuration.lanes | _treeBaseDuration.childLanes),
- (subtreeFlags |= _treeBaseDuration.subtreeFlags & 31457280),
- (subtreeFlags |= _treeBaseDuration.flags & 31457280),
+ (subtreeFlags |= _treeBaseDuration.subtreeFlags & 29360128),
+ (subtreeFlags |= _treeBaseDuration.flags & 29360128),
(_treeBaseDuration.return = completedWork),
(_treeBaseDuration = _treeBaseDuration.sibling);
else if ((completedWork.mode & ProfileMode) !== NoMode) {
@@ -15492,21 +15358,17 @@ __DEV__ &&
default:
throw Error("Unknown root exit status.");
}
- shouldTimeSlice.finishedWork = forceSync;
- shouldTimeSlice.finishedLanes = lanes;
if (null !== ReactSharedInternals.actQueue)
commitRoot(
shouldTimeSlice,
+ forceSync,
+ lanes,
workInProgressRootRecoverableErrors,
workInProgressTransitions,
workInProgressRootDidIncludeRecursiveRenderUpdate,
workInProgressDeferredLane,
workInProgressRootInterleavedUpdatedLanes,
- workInProgressSuspendedRetryLanes,
- exitStatus,
- IMMEDIATE_COMMIT,
- renderStartTime,
- 0
+ workInProgressSuspendedRetryLanes
);
else {
if (
@@ -15524,7 +15386,7 @@ __DEV__ &&
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
- if (0 !== getNextLanes(shouldTimeSlice, 0)) break a;
+ if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;
shouldTimeSlice.timeoutHandle = scheduleTimeout(
commitRootWhenReady.bind(
null,
@@ -15586,8 +15448,12 @@ __DEV__ &&
completedRenderStartTime,
completedRenderEndTime
) {
- var subtreeFlags = finishedWork.subtreeFlags;
- if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408))
+ root.timeoutHandle = noTimeout;
+ suspendedCommitReason = finishedWork.subtreeFlags;
+ if (
+ suspendedCommitReason & 8192 ||
+ 16785408 === (suspendedCommitReason & 16785408)
+ )
if (
((suspendedState = {
stylesheets: null,
@@ -15595,13 +15461,15 @@ __DEV__ &&
unsuspend: noop$1
}),
accumulateSuspenseyCommitOnFiber(finishedWork),
- (finishedWork = waitForCommitToBeReady()),
- null !== finishedWork)
+ (suspendedCommitReason = waitForCommitToBeReady()),
+ null !== suspendedCommitReason)
) {
- root.cancelPendingCommit = finishedWork(
+ root.cancelPendingCommit = suspendedCommitReason(
commitRoot.bind(
null,
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
@@ -15624,16 +15492,14 @@ __DEV__ &&
}
commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
+ suspendedRetryLanes
);
}
function isRenderConsistentWithExternalStores(finishedWork) {
@@ -15716,8 +15582,6 @@ __DEV__ &&
}
}
function prepareFreshStack(root, lanes) {
- root.finishedWork = null;
- root.finishedLanes = 0;
var timeoutHandle = root.timeoutHandle;
timeoutHandle !== noTimeout &&
((root.timeoutHandle = noTimeout), cancelTimeout(timeoutHandle));
@@ -16097,7 +15961,7 @@ __DEV__ &&
}
null !== ReactSharedInternals.actQueue
? workLoopSync()
- : workLoopConcurrent();
+ : workLoopConcurrentByScheduler();
break;
} catch (thrownValue$43) {
handleThrow(root, thrownValue$43);
@@ -16120,7 +15984,7 @@ __DEV__ &&
finishQueueingConcurrentUpdates();
return workInProgressRootExitStatus;
}
- function workLoopConcurrent() {
+ function workLoopConcurrentByScheduler() {
for (; null !== workInProgress && !shouldYield(); )
performUnitOfWork(workInProgress);
}
@@ -16332,179 +16196,350 @@ __DEV__ &&
}
function commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
- ) {
- var prevTransition = ReactSharedInternals.T,
- previousUpdateLanePriority = ReactDOMSharedInternals.p;
- try {
- (ReactDOMSharedInternals.p = DiscreteEventPriority),
- (ReactSharedInternals.T = null),
- commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- previousUpdateLanePriority,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
- );
- } finally {
- (ReactSharedInternals.T = prevTransition),
- (ReactDOMSharedInternals.p = previousUpdateLanePriority);
- }
- }
- function commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- renderPriorityLevel,
- spawnedLane,
- updatedLanes,
suspendedRetryLanes
) {
- do flushPassiveEffects();
- while (null !== rootWithPendingPassiveEffects);
+ root.cancelPendingCommit = null;
+ do flushPendingEffects();
+ while (pendingEffectsStatus !== NO_PENDING_EFFECTS);
ReactStrictModeWarnings.flushLegacyContextWarning();
ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
throw Error("Should not already be working.");
- var finishedWork = root.finishedWork;
- didIncludeRenderPhaseUpdate = root.finishedLanes;
null !== injectedProfilingHooks &&
"function" === typeof injectedProfilingHooks.markCommitStarted &&
- injectedProfilingHooks.markCommitStarted(didIncludeRenderPhaseUpdate);
- if (null === finishedWork) return markCommitStopped(), null;
- 0 === didIncludeRenderPhaseUpdate &&
- error$jscomp$0(
- "root.finishedLanes should not be empty during a commit. This is a bug in React."
- );
- root.finishedWork = null;
- root.finishedLanes = 0;
- if (finishedWork === root.current)
- throw Error(
- "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ injectedProfilingHooks.markCommitStarted(lanes);
+ if (null === finishedWork) markCommitStopped();
+ else {
+ 0 === lanes &&
+ error$jscomp$0(
+ "finishedLanes should not be empty during a commit. This is a bug in React."
+ );
+ if (finishedWork === root.current)
+ throw Error(
+ "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ );
+ didIncludeRenderPhaseUpdate =
+ finishedWork.lanes | finishedWork.childLanes;
+ didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
+ markRootFinished(
+ root,
+ lanes,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
);
- var remainingLanes = finishedWork.lanes | finishedWork.childLanes;
- remainingLanes |= concurrentlyUpdatedLanes;
- markRootFinished(
- root,
- didIncludeRenderPhaseUpdate,
- remainingLanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes
- );
- root === workInProgressRoot &&
- ((workInProgress = workInProgressRoot = null),
- (workInProgressRootRenderLanes = 0));
- spawnedLane = !1;
- 0 !== (finishedWork.subtreeFlags & 10256) ||
- 0 !== (finishedWork.flags & 10256)
- ? ((spawnedLane = !0),
- (pendingPassiveEffectsRemainingLanes = remainingLanes),
- (pendingPassiveTransitions = transitions),
- (root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null),
- scheduleCallback$1(NormalPriority$1, function () {
- flushPassiveEffects(!0);
- return null;
- }))
- : ((root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null));
- commitStartTime = now();
- transitions = 0 !== (finishedWork.flags & 15990);
- 0 !== (finishedWork.subtreeFlags & 15990) || transitions
- ? ((transitions = ReactSharedInternals.T),
- (ReactSharedInternals.T = null),
- (updatedLanes = ReactDOMSharedInternals.p),
- (ReactDOMSharedInternals.p = DiscreteEventPriority),
- (suspendedRetryLanes = executionContext),
- (executionContext |= CommitContext),
- commitBeforeMutationEffects(root, finishedWork),
- commitMutationEffects(
- root,
- finishedWork,
- didIncludeRenderPhaseUpdate
- ),
- restoreSelection(selectionInformation, root.containerInfo),
- (_enabled = !!eventsEnabled),
- (selectionInformation = eventsEnabled = null),
- (root.current = finishedWork),
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markLayoutEffectsStarted &&
- injectedProfilingHooks.markLayoutEffectsStarted(
- didIncludeRenderPhaseUpdate
- ),
- commitLayoutEffects(finishedWork, root, didIncludeRenderPhaseUpdate),
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markLayoutEffectsStopped &&
- injectedProfilingHooks.markLayoutEffectsStopped(),
- requestPaint(),
- (executionContext = suspendedRetryLanes),
- (ReactDOMSharedInternals.p = updatedLanes),
- (ReactSharedInternals.T = transitions))
- : (root.current = finishedWork);
- (transitions = spawnedLane)
- ? ((spawnedLane = !1),
- (rootWithPendingPassiveEffects = root),
- (pendingPassiveEffectsLanes = didIncludeRenderPhaseUpdate))
- : (releaseRootPooledCache(root, remainingLanes),
- (nestedPassiveUpdateCount = 0),
- (rootWithPassiveNestedUpdates = null));
- remainingLanes = root.pendingLanes;
- 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
- transitions || commitDoubleInvokeEffectsInDEV(root, !1);
- onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel);
- isDevToolsPresent && root.memoizedUpdaters.clear();
- onCommitRoot();
- if (null !== recoverableErrors)
- for (
- renderPriorityLevel = root.onRecoverableError, finishedWork = 0;
- finishedWork < recoverableErrors.length;
- finishedWork++
+ root === workInProgressRoot &&
+ ((workInProgress = workInProgressRoot = null),
+ (workInProgressRootRenderLanes = 0));
+ pendingFinishedWork = finishedWork;
+ pendingEffectsRoot = root;
+ pendingEffectsLanes = lanes;
+ pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
+ pendingPassiveTransitions = transitions;
+ pendingRecoverableErrors = recoverableErrors;
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? ((root.callbackNode = null),
+ (root.callbackPriority = 0),
+ scheduleCallback$1(NormalPriority$1, function () {
+ flushPassiveEffects(!0);
+ return null;
+ }))
+ : ((root.callbackNode = null), (root.callbackPriority = 0));
+ commitStartTime = now();
+ lanes = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || lanes) {
+ lanes = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ recoverableErrors = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = DiscreteEventPriority;
+ transitions = executionContext;
+ executionContext |= CommitContext;
+ try {
+ commitBeforeMutationEffects(root, finishedWork);
+ } finally {
+ (executionContext = transitions),
+ (ReactDOMSharedInternals.p = recoverableErrors),
+ (ReactSharedInternals.T = lanes);
+ }
+ }
+ pendingEffectsStatus = PENDING_MUTATION_PHASE;
+ flushMutationEffects();
+ flushLayoutEffects();
+ }
+ }
+ function flushMutationEffects() {
+ if (pendingEffectsStatus === PENDING_MUTATION_PHASE) {
+ pendingEffectsStatus = NO_PENDING_EFFECTS;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
+ if (
+ 0 !== (finishedWork.subtreeFlags & 13878) ||
+ rootMutationHasEffect
+ ) {
+ rootMutationHasEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = DiscreteEventPriority;
+ var prevExecutionContext = executionContext;
+ executionContext |= CommitContext;
+ try {
+ inProgressLanes = lanes;
+ inProgressRoot = root;
+ commitMutationEffectsOnFiber(finishedWork, root);
+ inProgressRoot = inProgressLanes = null;
+ lanes = selectionInformation;
+ var curFocusedElem = getActiveElementDeep(root.containerInfo),
+ priorFocusedElem = lanes.focusedElem,
+ priorSelectionRange = lanes.selectionRange;
+ if (
+ curFocusedElem !== priorFocusedElem &&
+ priorFocusedElem &&
+ priorFocusedElem.ownerDocument &&
+ containsNode(
+ priorFocusedElem.ownerDocument.documentElement,
+ priorFocusedElem
+ )
+ ) {
+ if (
+ null !== priorSelectionRange &&
+ hasSelectionCapabilities(priorFocusedElem)
+ ) {
+ var start = priorSelectionRange.start,
+ end = priorSelectionRange.end;
+ void 0 === end && (end = start);
+ if ("selectionStart" in priorFocusedElem)
+ (priorFocusedElem.selectionStart = start),
+ (priorFocusedElem.selectionEnd = Math.min(
+ end,
+ priorFocusedElem.value.length
+ ));
+ else {
+ var doc = priorFocusedElem.ownerDocument || document,
+ win = (doc && doc.defaultView) || window;
+ if (win.getSelection) {
+ var selection = win.getSelection(),
+ length = priorFocusedElem.textContent.length,
+ start$jscomp$0 = Math.min(
+ priorSelectionRange.start,
+ length
+ ),
+ end$jscomp$0 =
+ void 0 === priorSelectionRange.end
+ ? start$jscomp$0
+ : Math.min(priorSelectionRange.end, length);
+ !selection.extend &&
+ start$jscomp$0 > end$jscomp$0 &&
+ ((curFocusedElem = end$jscomp$0),
+ (end$jscomp$0 = start$jscomp$0),
+ (start$jscomp$0 = curFocusedElem));
+ var startMarker = getNodeForCharacterOffset(
+ priorFocusedElem,
+ start$jscomp$0
+ ),
+ endMarker = getNodeForCharacterOffset(
+ priorFocusedElem,
+ end$jscomp$0
+ );
+ if (
+ startMarker &&
+ endMarker &&
+ (1 !== selection.rangeCount ||
+ selection.anchorNode !== startMarker.node ||
+ selection.anchorOffset !== startMarker.offset ||
+ selection.focusNode !== endMarker.node ||
+ selection.focusOffset !== endMarker.offset)
+ ) {
+ var range = doc.createRange();
+ range.setStart(startMarker.node, startMarker.offset);
+ selection.removeAllRanges();
+ start$jscomp$0 > end$jscomp$0
+ ? (selection.addRange(range),
+ selection.extend(endMarker.node, endMarker.offset))
+ : (range.setEnd(endMarker.node, endMarker.offset),
+ selection.addRange(range));
+ }
+ }
+ }
+ }
+ doc = [];
+ for (
+ selection = priorFocusedElem;
+ (selection = selection.parentNode);
+
+ )
+ 1 === selection.nodeType &&
+ doc.push({
+ element: selection,
+ left: selection.scrollLeft,
+ top: selection.scrollTop
+ });
+ "function" === typeof priorFocusedElem.focus &&
+ priorFocusedElem.focus();
+ for (
+ priorFocusedElem = 0;
+ priorFocusedElem < doc.length;
+ priorFocusedElem++
+ ) {
+ var info = doc[priorFocusedElem];
+ info.element.scrollLeft = info.left;
+ info.element.scrollTop = info.top;
+ }
+ }
+ _enabled = !!eventsEnabled;
+ selectionInformation = eventsEnabled = null;
+ } finally {
+ (executionContext = prevExecutionContext),
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = rootMutationHasEffect);
+ }
+ }
+ root.current = finishedWork;
+ pendingEffectsStatus = PENDING_LAYOUT_PHASE;
+ }
+ }
+ function flushLayoutEffects() {
+ if (pendingEffectsStatus === PENDING_LAYOUT_PHASE) {
+ pendingEffectsStatus = NO_PENDING_EFFECTS;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ recoverableErrors = pendingRecoverableErrors,
+ rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
+ if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
+ rootHasLayoutEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = DiscreteEventPriority;
+ var prevExecutionContext = executionContext;
+ executionContext |= CommitContext;
+ try {
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStarted &&
+ injectedProfilingHooks.markLayoutEffectsStarted(lanes),
+ (inProgressLanes = lanes),
+ (inProgressRoot = root),
+ commitLayoutEffectOnFiber(
+ root,
+ finishedWork.alternate,
+ finishedWork
+ ),
+ (inProgressRoot = inProgressLanes = null),
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStopped &&
+ injectedProfilingHooks.markLayoutEffectsStopped();
+ } finally {
+ (executionContext = prevExecutionContext),
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = rootHasLayoutEffect);
+ }
+ }
+ requestPaint();
+ (rootHasLayoutEffect =
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256))
+ ? (pendingEffectsStatus = PENDING_PASSIVE_PHASE)
+ : ((pendingEffectsStatus = NO_PENDING_EFFECTS),
+ (pendingEffectsRoot = null),
+ releaseRootPooledCache(root, root.pendingLanes),
+ (nestedPassiveUpdateCount = 0),
+ (rootWithPassiveNestedUpdates = null));
+ previousPriority = root.pendingLanes;
+ 0 === previousPriority &&
+ (legacyErrorBoundariesThatAlreadyFailed = null);
+ rootHasLayoutEffect || commitDoubleInvokeEffectsInDEV(root, !1);
+ rootHasLayoutEffect = lanesToEventPriority(lanes);
+ finishedWork = finishedWork.stateNode;
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onCommitFiberRoot
)
- (remainingLanes = recoverableErrors[finishedWork]),
- (spawnedLane = makeErrorInfo(remainingLanes.stack)),
- runWithFiberInDEV(
- remainingLanes.source,
- renderPriorityLevel,
- remainingLanes.value,
- spawnedLane
+ try {
+ var didError = 128 === (finishedWork.current.flags & 128);
+ switch (rootHasLayoutEffect) {
+ case DiscreteEventPriority:
+ var schedulerPriority = ImmediatePriority;
+ break;
+ case ContinuousEventPriority:
+ schedulerPriority = UserBlockingPriority;
+ break;
+ case DefaultEventPriority:
+ schedulerPriority = NormalPriority$1;
+ break;
+ case IdleEventPriority:
+ schedulerPriority = IdlePriority;
+ break;
+ default:
+ schedulerPriority = NormalPriority$1;
+ }
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ finishedWork,
+ schedulerPriority,
+ didError
);
- 0 !== (pendingPassiveEffectsLanes & 3) &&
- 0 !== root.tag &&
- flushPassiveEffects();
- ensureRootIsScheduled(root);
- remainingLanes = root.pendingLanes;
- 0 !== (didIncludeRenderPhaseUpdate & 4194218) &&
- 0 !== (remainingLanes & 42)
- ? ((nestedUpdateScheduled = !0),
- root === rootWithNestedUpdates
- ? nestedUpdateCount++
- : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
- : (nestedUpdateCount = 0);
- flushSyncWorkAcrossRoots_impl(0, !1);
- markCommitStopped();
- return null;
+ } catch (err) {
+ hasLoggedError ||
+ ((hasLoggedError = !0),
+ error$jscomp$0(
+ "React instrumentation encountered an error: %s",
+ err
+ ));
+ }
+ isDevToolsPresent && root.memoizedUpdaters.clear();
+ onCommitRoot();
+ if (null !== recoverableErrors) {
+ didError = ReactSharedInternals.T;
+ schedulerPriority = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = DiscreteEventPriority;
+ ReactSharedInternals.T = null;
+ try {
+ var onRecoverableError = root.onRecoverableError;
+ for (
+ finishedWork = 0;
+ finishedWork < recoverableErrors.length;
+ finishedWork++
+ ) {
+ var recoverableError = recoverableErrors[finishedWork],
+ errorInfo = makeErrorInfo(recoverableError.stack);
+ runWithFiberInDEV(
+ recoverableError.source,
+ onRecoverableError,
+ recoverableError.value,
+ errorInfo
+ );
+ }
+ } finally {
+ (ReactSharedInternals.T = didError),
+ (ReactDOMSharedInternals.p = schedulerPriority);
+ }
+ }
+ 0 !== (pendingEffectsLanes & 3) &&
+ 0 !== root.tag &&
+ flushPendingEffects();
+ ensureRootIsScheduled(root);
+ previousPriority = root.pendingLanes;
+ 0 !== (lanes & 4194218) && 0 !== (previousPriority & 42)
+ ? ((nestedUpdateScheduled = !0),
+ root === rootWithNestedUpdates
+ ? nestedUpdateCount++
+ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
+ : (nestedUpdateCount = 0);
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ markCommitStopped();
+ }
}
function makeErrorInfo(componentStack) {
componentStack = { componentStack: componentStack };
@@ -16523,94 +16558,87 @@ __DEV__ &&
null != remainingLanes &&
((root.pooledCache = null), releaseCache(remainingLanes)));
}
+ function flushPendingEffects(wasDelayedCommit) {
+ flushMutationEffects();
+ flushLayoutEffects();
+ return flushPassiveEffects(wasDelayedCommit);
+ }
function flushPassiveEffects() {
- if (null !== rootWithPendingPassiveEffects) {
- var root = rootWithPendingPassiveEffects,
- remainingLanes = pendingPassiveEffectsRemainingLanes;
- pendingPassiveEffectsRemainingLanes = 0;
- var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
- priority =
- 0 === DefaultEventPriority || DefaultEventPriority > renderPriority
- ? DefaultEventPriority
- : renderPriority;
- renderPriority = ReactSharedInternals.T;
- var previousPriority = ReactDOMSharedInternals.p;
- try {
- ReactDOMSharedInternals.p = priority;
- ReactSharedInternals.T = null;
- if (null === rootWithPendingPassiveEffects)
- var JSCompiler_inline_result = !1;
- else {
- priority = pendingPassiveTransitions;
- pendingPassiveTransitions = null;
- var root$jscomp$0 = rootWithPendingPassiveEffects,
- lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsLanes = 0;
- if (
- (executionContext & (RenderContext | CommitContext)) !==
- NoContext
- )
- throw Error(
- "Cannot flush passive effects while already rendering."
- );
- isFlushingPassiveEffects = !0;
- didScheduleUpdateDuringPassiveEffects = !1;
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStarted &&
- injectedProfilingHooks.markPassiveEffectsStarted(lanes);
- var prevExecutionContext = executionContext;
- executionContext |= CommitContext;
- commitPassiveUnmountOnFiber(root$jscomp$0.current);
- commitPassiveMountOnFiber(
- root$jscomp$0,
- root$jscomp$0.current,
- lanes,
- priority
- );
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStopped &&
- injectedProfilingHooks.markPassiveEffectsStopped();
- commitDoubleInvokeEffectsInDEV(root$jscomp$0, !0);
- executionContext = prevExecutionContext;
- flushSyncWorkAcrossRoots_impl(0, !1);
- didScheduleUpdateDuringPassiveEffects
- ? root$jscomp$0 === rootWithPassiveNestedUpdates
- ? nestedPassiveUpdateCount++
- : ((nestedPassiveUpdateCount = 0),
- (rootWithPassiveNestedUpdates = root$jscomp$0))
- : (nestedPassiveUpdateCount = 0);
- didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects =
- !1;
- if (
- injectedHook &&
- "function" === typeof injectedHook.onPostCommitFiberRoot
- )
- try {
- injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
- } catch (err) {
- hasLoggedError ||
- ((hasLoggedError = !0),
- error$jscomp$0(
- "React instrumentation encountered an error: %s",
- err
- ));
- }
- var stateNode = root$jscomp$0.current.stateNode;
- stateNode.effectDuration = 0;
- stateNode.passiveEffectDuration = 0;
- JSCompiler_inline_result = !0;
+ if (pendingEffectsStatus !== PENDING_PASSIVE_PHASE) return !1;
+ var root = pendingEffectsRoot,
+ remainingLanes = pendingEffectsRemainingLanes;
+ pendingEffectsRemainingLanes = 0;
+ var renderPriority = lanesToEventPriority(pendingEffectsLanes),
+ priority =
+ 0 === DefaultEventPriority || DefaultEventPriority > renderPriority
+ ? DefaultEventPriority
+ : renderPriority;
+ renderPriority = ReactSharedInternals.T;
+ var previousPriority = ReactDOMSharedInternals.p;
+ try {
+ ReactDOMSharedInternals.p = priority;
+ ReactSharedInternals.T = null;
+ priority = pendingPassiveTransitions;
+ pendingPassiveTransitions = null;
+ var root$jscomp$0 = pendingEffectsRoot,
+ lanes = pendingEffectsLanes;
+ pendingEffectsStatus = NO_PENDING_EFFECTS;
+ pendingEffectsRoot = null;
+ pendingEffectsLanes = 0;
+ if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
+ throw Error("Cannot flush passive effects while already rendering.");
+ isFlushingPassiveEffects = !0;
+ didScheduleUpdateDuringPassiveEffects = !1;
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markPassiveEffectsStarted &&
+ injectedProfilingHooks.markPassiveEffectsStarted(lanes);
+ var prevExecutionContext = executionContext;
+ executionContext |= CommitContext;
+ commitPassiveUnmountOnFiber(root$jscomp$0.current);
+ commitPassiveMountOnFiber(
+ root$jscomp$0,
+ root$jscomp$0.current,
+ lanes,
+ priority
+ );
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markPassiveEffectsStopped &&
+ injectedProfilingHooks.markPassiveEffectsStopped();
+ commitDoubleInvokeEffectsInDEV(root$jscomp$0, !0);
+ executionContext = prevExecutionContext;
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ didScheduleUpdateDuringPassiveEffects
+ ? root$jscomp$0 === rootWithPassiveNestedUpdates
+ ? nestedPassiveUpdateCount++
+ : ((nestedPassiveUpdateCount = 0),
+ (rootWithPassiveNestedUpdates = root$jscomp$0))
+ : (nestedPassiveUpdateCount = 0);
+ didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects = !1;
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
+ } catch (err) {
+ hasLoggedError ||
+ ((hasLoggedError = !0),
+ error$jscomp$0(
+ "React instrumentation encountered an error: %s",
+ err
+ ));
}
- return JSCompiler_inline_result;
- } finally {
- (ReactDOMSharedInternals.p = previousPriority),
- (ReactSharedInternals.T = renderPriority),
- releaseRootPooledCache(root, remainingLanes);
- }
+ var stateNode = root$jscomp$0.current.stateNode;
+ stateNode.effectDuration = 0;
+ stateNode.passiveEffectDuration = 0;
+ return !0;
+ } finally {
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = renderPriority),
+ releaseRootPooledCache(root, remainingLanes);
}
- return !1;
}
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
@@ -16915,11 +16943,9 @@ __DEV__ &&
mightHavePendingSyncWork = !0;
null !== ReactSharedInternals.actQueue
? didScheduleMicrotask_act ||
- ((didScheduleMicrotask_act = !0),
- scheduleImmediateTask(processRootScheduleInMicrotask))
+ ((didScheduleMicrotask_act = !0), scheduleImmediateRootScheduleTask())
: didScheduleMicrotask ||
- ((didScheduleMicrotask = !0),
- scheduleImmediateTask(processRootScheduleInMicrotask));
+ ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());
ReactSharedInternals.isBatchingLegacy &&
0 === root.tag &&
(ReactSharedInternals.didScheduleLegacyUpdate = !0);
@@ -16954,7 +16980,9 @@ __DEV__ &&
(nextLanes = workInProgressRootRenderLanes),
(nextLanes = getNextLanes(
root,
- root === workInProgressRoot ? nextLanes : 0
+ root === workInProgressRoot ? nextLanes : 0,
+ null !== root.cancelPendingCommit ||
+ root.timeoutHandle !== noTimeout
)),
0 === (nextLanes & 3) ||
checkIfRootIsPrerendering(root, nextLanes) ||
@@ -16966,6 +16994,9 @@ __DEV__ &&
isFlushingWork = !1;
}
}
+ function processRootScheduleInImmediateTask() {
+ processRootScheduleInMicrotask();
+ }
function processRootScheduleInMicrotask() {
mightHavePendingSyncWork =
didScheduleMicrotask_act =
@@ -17017,7 +17048,8 @@ __DEV__ &&
suspendedLanes = workInProgressRootRenderLanes;
suspendedLanes = getNextLanes(
root,
- root === currentTime ? suspendedLanes : 0
+ root === currentTime ? suspendedLanes : 0,
+ null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout
);
pingedLanes = root.callbackNode;
if (
@@ -17075,14 +17107,22 @@ __DEV__ &&
}
function performWorkOnRootViaSchedulerTask(root, didTimeout) {
nestedUpdateScheduled = currentUpdateIsNested = !1;
+ if (
+ pendingEffectsStatus !== NO_PENDING_EFFECTS &&
+ pendingEffectsStatus !== PENDING_PASSIVE_PHASE
+ )
+ return (root.callbackNode = null), (root.callbackPriority = 0), null;
var originalCallbackNode = root.callbackNode;
- if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
+ if (flushPendingEffects(!0) && root.callbackNode !== originalCallbackNode)
return null;
var workInProgressRootRenderLanes$jscomp$0 =
workInProgressRootRenderLanes;
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
root,
- root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0
+ root === workInProgressRoot
+ ? workInProgressRootRenderLanes$jscomp$0
+ : 0,
+ null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout
);
if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
performWorkOnRoot(
@@ -17097,7 +17137,7 @@ __DEV__ &&
: null;
}
function performSyncWorkOnRoot(root, lanes) {
- if (flushPassiveEffects()) return null;
+ if (flushPendingEffects()) return null;
currentUpdateIsNested = nestedUpdateScheduled;
nestedUpdateScheduled = !1;
performWorkOnRoot(root, lanes, !0);
@@ -17107,16 +17147,19 @@ __DEV__ &&
null !== callbackNode &&
cancelCallback$1(callbackNode);
}
- function scheduleImmediateTask(cb) {
+ function scheduleImmediateRootScheduleTask() {
null !== ReactSharedInternals.actQueue &&
ReactSharedInternals.actQueue.push(function () {
- cb();
+ processRootScheduleInMicrotask();
return null;
});
scheduleMicrotask(function () {
(executionContext & (RenderContext | CommitContext)) !== NoContext
- ? scheduleCallback$3(ImmediatePriority, cb)
- : cb();
+ ? scheduleCallback$3(
+ ImmediatePriority,
+ processRootScheduleInImmediateTask
+ )
+ : processRootScheduleInMicrotask();
});
}
function requestTransitionLane() {
@@ -19697,36 +19740,34 @@ __DEV__ &&
}
case "src":
case "href":
- "" !== propKey ||
- ("a" === tag && "href" === value) ||
- ("object" === tag && "data" === value)
- ? hydrateSanitizedAttribute(
- domElement,
- value,
- value,
- propKey,
- extraAttributes,
- serverDifferences
- )
- : ("src" === value
- ? error$jscomp$0(
- 'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
- value,
- value
- )
- : error$jscomp$0(
- 'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
- value,
- value
- ),
- hydrateSanitizedAttribute(
- domElement,
- value,
- value,
- null,
- extraAttributes,
- serverDifferences
- ));
+ if (
+ !(
+ "" !== propKey ||
+ ("a" === tag && "href" === value) ||
+ ("object" === tag && "data" === value)
+ )
+ ) {
+ "src" === value
+ ? error$jscomp$0(
+ 'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
+ value,
+ value
+ )
+ : error$jscomp$0(
+ 'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
+ value,
+ value
+ );
+ continue;
+ }
+ hydrateSanitizedAttribute(
+ domElement,
+ value,
+ value,
+ propKey,
+ extraAttributes,
+ serverDifferences
+ );
continue;
case "action":
case "formAction":
@@ -20336,7 +20377,9 @@ __DEV__ &&
else if (
name !== anyProps.rel ||
instance.getAttribute("href") !==
- (null == anyProps.href ? null : anyProps.href) ||
+ (null == anyProps.href || "" === anyProps.href
+ ? null
+ : anyProps.href) ||
instance.getAttribute("crossorigin") !==
(null == anyProps.crossOrigin
? null
@@ -21307,11 +21350,7 @@ __DEV__ &&
) {
this.tag = tag;
this.containerInfo = containerInfo;
- this.finishedWork =
- this.pingCache =
- this.current =
- this.pendingChildren =
- null;
+ this.pingCache = this.current = this.pendingChildren = null;
this.timeoutHandle = noTimeout;
this.callbackNode =
this.next =
@@ -21324,7 +21363,6 @@ __DEV__ &&
this.entangledLanes =
this.shellSuspendCounter =
this.errorRecoveryDisabledLanes =
- this.finishedLanes =
this.expiredLanes =
this.warmLanes =
this.pingedLanes =
@@ -21461,7 +21499,7 @@ __DEV__ &&
parentComponent,
callback
) {
- 0 === container.tag && flushPassiveEffects();
+ 0 === container.tag && flushPendingEffects();
updateContainerImpl(
container.current,
2,
@@ -25301,7 +25339,6 @@ __DEV__ &&
nextEffect = null,
inProgressLanes = null,
inProgressRoot = null,
- shouldFireAfterActiveInstanceBlur = !1,
hostParent = null,
hostParentIsContainer = !1,
currentHoistableRoot = null,
@@ -25386,10 +25423,20 @@ __DEV__ &&
RENDER_TIMEOUT_MS = 500,
workInProgressTransitions = null,
legacyErrorBoundariesThatAlreadyFailed = null,
- rootWithPendingPassiveEffects = null,
- pendingPassiveEffectsLanes = 0,
- pendingPassiveEffectsRemainingLanes = 0,
+ IMMEDIATE_COMMIT = 0,
+ SUSPENDED_COMMIT = 1,
+ THROTTLED_COMMIT = 2,
+ NO_PENDING_EFFECTS = 0,
+ PENDING_MUTATION_PHASE = 1,
+ PENDING_LAYOUT_PHASE = 2,
+ PENDING_PASSIVE_PHASE = 3,
+ pendingEffectsStatus = 0,
+ pendingEffectsRoot = null,
+ pendingFinishedWork = null,
+ pendingEffectsLanes = 0,
+ pendingEffectsRemainingLanes = 0,
pendingPassiveTransitions = null,
+ pendingRecoverableErrors = null,
NESTED_UPDATE_LIMIT = 50,
nestedUpdateCount = 0,
rootWithNestedUpdates = null,
@@ -25399,9 +25446,6 @@ __DEV__ &&
nestedPassiveUpdateCount = 0,
rootWithPassiveNestedUpdates = null,
isRunningInsertionEffect = !1,
- IMMEDIATE_COMMIT = 0,
- SUSPENDED_COMMIT = 1,
- THROTTLED_COMMIT = 2,
didWarnStateUpdateForNotYetMountedComponent = null,
didWarnAboutUpdateInRender = !1;
var didWarnAboutUpdateInRenderForAnotherComponent = new Set();
@@ -25936,11 +25980,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
- if ("19.1.0-native-fb-a9bbe346-20241219" !== isomorphicReactPackageVersion)
+ if ("19.1.0-native-fb-a160102f-20250107" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
- "\n - react-dom: 19.1.0-native-fb-a9bbe346-20241219\nLearn more: https://react.dev/warnings/version-mismatch")
+ "\n - react-dom: 19.1.0-native-fb-a160102f-20250107\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -25977,10 +26021,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
- version: "19.1.0-native-fb-a9bbe346-20241219",
+ version: "19.1.0-native-fb-a160102f-20250107",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.1.0-native-fb-a9bbe346-20241219"
+ reconcilerVersion: "19.1.0-native-fb-a160102f-20250107"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -26442,7 +26486,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
- exports.version = "19.1.0-native-fb-a9bbe346-20241219";
+ exports.version = "19.1.0-native-fb-a160102f-20250107";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js
index 0261b37487279..fbe4ac28fd6cc 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<<3aafbf11acb647bdaf730f1b4a29268c>>
+ * @generated SignedSource<>
*/
/*
@@ -578,17 +578,6 @@ var hasOwnProperty = Object.prototype.hasOwnProperty,
unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue,
rendererID = null,
injectedHook = null;
-function onCommitRoot(root) {
- if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
- try {
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- void 0,
- 128 === (root.current.flags & 128)
- );
- } catch (err) {}
-}
function setIsStrictModeForDevtools(newIsStrictMode) {
"function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
if (injectedHook && "function" === typeof injectedHook.setStrictMode)
@@ -658,14 +647,13 @@ function getHighestPriorityLanes(lanes) {
return lanes;
}
}
-function getNextLanes(root, wipLanes) {
+function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0,
suspendedLanes = root.suspendedLanes,
- pingedLanes = root.pingedLanes,
- warmLanes = root.warmLanes;
- root = 0 !== root.finishedLanes;
+ pingedLanes = root.pingedLanes;
+ root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes
? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
@@ -675,29 +663,29 @@ function getNextLanes(root, wipLanes) {
0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = nonIdlePendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes)))))
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))))
: ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
0 !== nonIdlePendingLanes
? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
: 0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = pendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes))));
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = pendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes
? 0
: 0 !== wipLanes &&
wipLanes !== nextLanes &&
0 === (wipLanes & suspendedLanes) &&
((suspendedLanes = nextLanes & -nextLanes),
- (warmLanes = wipLanes & -wipLanes),
- suspendedLanes >= warmLanes ||
- (32 === suspendedLanes && 0 !== (warmLanes & 4194176)))
+ (rootHasPendingCommit = wipLanes & -wipLanes),
+ suspendedLanes >= rootHasPendingCommit ||
+ (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176)))
? wipLanes
: nextLanes;
}
@@ -2111,14 +2099,14 @@ var isInputEventSupported = !1;
if (canUseDOM) {
var JSCompiler_inline_result$jscomp$293;
if (canUseDOM) {
- var isSupported$jscomp$inline_421 = "oninput" in document;
- if (!isSupported$jscomp$inline_421) {
- var element$jscomp$inline_422 = document.createElement("div");
- element$jscomp$inline_422.setAttribute("oninput", "return;");
- isSupported$jscomp$inline_421 =
- "function" === typeof element$jscomp$inline_422.oninput;
+ var isSupported$jscomp$inline_422 = "oninput" in document;
+ if (!isSupported$jscomp$inline_422) {
+ var element$jscomp$inline_423 = document.createElement("div");
+ element$jscomp$inline_423.setAttribute("oninput", "return;");
+ isSupported$jscomp$inline_422 =
+ "function" === typeof element$jscomp$inline_423.oninput;
}
- JSCompiler_inline_result$jscomp$293 = isSupported$jscomp$inline_421;
+ JSCompiler_inline_result$jscomp$293 = isSupported$jscomp$inline_422;
} else JSCompiler_inline_result$jscomp$293 = !1;
isInputEventSupported =
JSCompiler_inline_result$jscomp$293 &&
@@ -2273,97 +2261,6 @@ function hasSelectionCapabilities(elem) {
"true" === elem.contentEditable)
);
}
-function restoreSelection(priorSelectionInformation, containerInfo) {
- var curFocusedElem = getActiveElementDeep(containerInfo);
- containerInfo = priorSelectionInformation.focusedElem;
- var priorSelectionRange = priorSelectionInformation.selectionRange;
- if (
- curFocusedElem !== containerInfo &&
- containerInfo &&
- containerInfo.ownerDocument &&
- containsNode(containerInfo.ownerDocument.documentElement, containerInfo)
- ) {
- if (null !== priorSelectionRange && hasSelectionCapabilities(containerInfo))
- if (
- ((priorSelectionInformation = priorSelectionRange.start),
- (curFocusedElem = priorSelectionRange.end),
- void 0 === curFocusedElem &&
- (curFocusedElem = priorSelectionInformation),
- "selectionStart" in containerInfo)
- )
- (containerInfo.selectionStart = priorSelectionInformation),
- (containerInfo.selectionEnd = Math.min(
- curFocusedElem,
- containerInfo.value.length
- ));
- else if (
- ((curFocusedElem =
- ((priorSelectionInformation =
- containerInfo.ownerDocument || document) &&
- priorSelectionInformation.defaultView) ||
- window),
- curFocusedElem.getSelection)
- ) {
- curFocusedElem = curFocusedElem.getSelection();
- var length = containerInfo.textContent.length,
- start = Math.min(priorSelectionRange.start, length);
- priorSelectionRange =
- void 0 === priorSelectionRange.end
- ? start
- : Math.min(priorSelectionRange.end, length);
- !curFocusedElem.extend &&
- start > priorSelectionRange &&
- ((length = priorSelectionRange),
- (priorSelectionRange = start),
- (start = length));
- length = getNodeForCharacterOffset(containerInfo, start);
- var endMarker = getNodeForCharacterOffset(
- containerInfo,
- priorSelectionRange
- );
- length &&
- endMarker &&
- (1 !== curFocusedElem.rangeCount ||
- curFocusedElem.anchorNode !== length.node ||
- curFocusedElem.anchorOffset !== length.offset ||
- curFocusedElem.focusNode !== endMarker.node ||
- curFocusedElem.focusOffset !== endMarker.offset) &&
- ((priorSelectionInformation =
- priorSelectionInformation.createRange()),
- priorSelectionInformation.setStart(length.node, length.offset),
- curFocusedElem.removeAllRanges(),
- start > priorSelectionRange
- ? (curFocusedElem.addRange(priorSelectionInformation),
- curFocusedElem.extend(endMarker.node, endMarker.offset))
- : (priorSelectionInformation.setEnd(
- endMarker.node,
- endMarker.offset
- ),
- curFocusedElem.addRange(priorSelectionInformation)));
- }
- priorSelectionInformation = [];
- for (
- curFocusedElem = containerInfo;
- (curFocusedElem = curFocusedElem.parentNode);
-
- )
- 1 === curFocusedElem.nodeType &&
- priorSelectionInformation.push({
- element: curFocusedElem,
- left: curFocusedElem.scrollLeft,
- top: curFocusedElem.scrollTop
- });
- "function" === typeof containerInfo.focus && containerInfo.focus();
- for (
- containerInfo = 0;
- containerInfo < priorSelectionInformation.length;
- containerInfo++
- )
- (curFocusedElem = priorSelectionInformation[containerInfo]),
- (curFocusedElem.element.scrollLeft = curFocusedElem.left),
- (curFocusedElem.element.scrollTop = curFocusedElem.top);
- }
-}
var skipSelectionChangeEvent =
canUseDOM && "documentMode" in document && 11 >= document.documentMode,
activeElement = null,
@@ -6507,12 +6404,12 @@ function markRef(current, workInProgress) {
if (null === ref)
null !== current &&
null !== current.ref &&
- (workInProgress.flags |= 2097664);
+ (workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(formatProdErrorMessage(284));
if (null === current || current.ref !== ref)
- workInProgress.flags |= 2097664;
+ workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
@@ -7132,7 +7029,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
didSuspend
)),
(nextProps.subtreeFlags =
- JSCompiler_temp$jscomp$0.subtreeFlags & 31457280)),
+ JSCompiler_temp$jscomp$0.subtreeFlags & 29360128)),
null !== digest
? (showFallback = createWorkInProgress(digest, showFallback))
: ((showFallback = createFiberFromFragment(
@@ -8307,8 +8204,7 @@ var offscreenSubtreeIsHidden = !1,
offscreenSubtreeWasHidden = !1,
needsFormReset = !1,
PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set,
- nextEffect = null,
- shouldFireAfterActiveInstanceBlur = !1;
+ nextEffect = null;
function commitBeforeMutationEffects(root, firstChild) {
root = root.containerInfo;
eventsEnabled = _enabled;
@@ -8384,7 +8280,7 @@ function commitBeforeMutationEffects(root, firstChild) {
if (
((firstChild = nextEffect),
(root = firstChild.child),
- 0 !== (firstChild.subtreeFlags & 1028) && null !== root)
+ 0 !== (firstChild.subtreeFlags & 1024) && null !== root)
)
(root.return = firstChild), (nextEffect = root);
else
@@ -8462,9 +8358,6 @@ function commitBeforeMutationEffects(root, firstChild) {
}
nextEffect = firstChild.return;
}
- resolvedPrevProps = shouldFireAfterActiveInstanceBlur;
- shouldFireAfterActiveInstanceBlur = !1;
- return resolvedPrevProps;
}
function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
var flags = finishedWork.flags;
@@ -8983,7 +8876,9 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
if (
((currentResource = maybeNodes[i]),
currentResource.getAttribute("href") ===
- (null == current.href ? null : current.href) &&
+ (null == current.href || "" === current.href
+ ? null
+ : current.href) &&
currentResource.getAttribute("rel") ===
(null == current.rel ? null : current.rel) &&
currentResource.getAttribute("title") ===
@@ -9604,6 +9499,14 @@ function commitPassiveMountOnFiber(
);
flags & 2048 && commitHookEffectListMount(9, finishedWork);
break;
+ case 1:
+ recursivelyTraversePassiveMountEffects(
+ finishedRoot,
+ finishedWork,
+ committedLanes,
+ committedTransitions
+ );
+ break;
case 3:
recursivelyTraversePassiveMountEffects(
finishedRoot,
@@ -10111,7 +10014,7 @@ function createWorkInProgress(current, pendingProps) {
(workInProgress.flags = 0),
(workInProgress.subtreeFlags = 0),
(workInProgress.deletions = null));
- workInProgress.flags = current.flags & 31457280;
+ workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -10130,7 +10033,7 @@ function createWorkInProgress(current, pendingProps) {
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
- workInProgress.flags &= 31457282;
+ workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
@@ -10364,8 +10267,8 @@ function bubbleProperties(completedWork) {
if (didBailout)
for (var child$144 = completedWork.child; null !== child$144; )
(newChildLanes |= child$144.lanes | child$144.childLanes),
- (subtreeFlags |= child$144.subtreeFlags & 31457280),
- (subtreeFlags |= child$144.flags & 31457280),
+ (subtreeFlags |= child$144.subtreeFlags & 29360128),
+ (subtreeFlags |= child$144.flags & 29360128),
(child$144.return = completedWork),
(child$144 = child$144.sibling);
else
@@ -10964,10 +10867,13 @@ var DefaultAsyncDispatcher = {
workInProgressRootRenderTargetTime = Infinity,
workInProgressTransitions = null,
legacyErrorBoundariesThatAlreadyFailed = null,
- rootWithPendingPassiveEffects = null,
- pendingPassiveEffectsLanes = 0,
- pendingPassiveEffectsRemainingLanes = 0,
+ pendingEffectsStatus = 0,
+ pendingEffectsRoot = null,
+ pendingFinishedWork = null,
+ pendingEffectsLanes = 0,
+ pendingEffectsRemainingLanes = 0,
pendingPassiveTransitions = null,
+ pendingRecoverableErrors = null,
nestedUpdateCount = 0,
rootWithNestedUpdates = null;
function requestUpdateLane(fiber) {
@@ -11135,8 +11041,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
default:
throw Error(formatProdErrorMessage(329));
}
- shouldTimeSlice.finishedWork = forceSync;
- shouldTimeSlice.finishedLanes = lanes;
if (
(lanes & 62914560) === lanes &&
(alwaysThrottleRetries || 3 === renderWasConcurrent) &&
@@ -11149,7 +11053,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
- if (0 !== getNextLanes(shouldTimeSlice, 0)) break a;
+ if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;
shouldTimeSlice.timeoutHandle = scheduleTimeout(
commitRootWhenReady.bind(
null,
@@ -11210,18 +11114,24 @@ function commitRootWhenReady(
completedRenderStartTime,
completedRenderEndTime
) {
- var subtreeFlags = finishedWork.subtreeFlags;
- if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408))
+ root.timeoutHandle = -1;
+ suspendedCommitReason = finishedWork.subtreeFlags;
+ if (
+ suspendedCommitReason & 8192 ||
+ 16785408 === (suspendedCommitReason & 16785408)
+ )
if (
((suspendedState = { stylesheets: null, count: 0, unsuspend: noop$1 }),
accumulateSuspenseyCommitOnFiber(finishedWork),
- (finishedWork = waitForCommitToBeReady()),
- null !== finishedWork)
+ (suspendedCommitReason = waitForCommitToBeReady()),
+ null !== suspendedCommitReason)
) {
- root.cancelPendingCommit = finishedWork(
+ root.cancelPendingCommit = suspendedCommitReason(
commitRoot.bind(
null,
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
@@ -11239,16 +11149,14 @@ function commitRootWhenReady(
}
commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
+ suspendedRetryLanes
);
}
function isRenderConsistentWithExternalStores(finishedWork) {
@@ -11331,8 +11239,6 @@ function resetWorkInProgressStack() {
}
}
function prepareFreshStack(root, lanes) {
- root.finishedWork = null;
- root.finishedLanes = 0;
var timeoutHandle = root.timeoutHandle;
-1 !== timeoutHandle &&
((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
@@ -11611,7 +11517,7 @@ function renderRootConcurrent(root, lanes) {
throw Error(formatProdErrorMessage(462));
}
}
- workLoopConcurrent();
+ workLoopConcurrentByScheduler();
break;
} catch (thrownValue$179) {
handleThrow(root, thrownValue$179);
@@ -11627,7 +11533,7 @@ function renderRootConcurrent(root, lanes) {
finishQueueingConcurrentUpdates();
return workInProgressRootExitStatus;
}
-function workLoopConcurrent() {
+function workLoopConcurrentByScheduler() {
for (; null !== workInProgress && !shouldYield(); )
performUnitOfWork(workInProgress);
}
@@ -11796,139 +11702,268 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) {
}
function commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
-) {
- var prevTransition = ReactSharedInternals.T,
- previousUpdateLanePriority = ReactDOMSharedInternals.p;
- try {
- (ReactDOMSharedInternals.p = 2),
- (ReactSharedInternals.T = null),
- commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- previousUpdateLanePriority,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
- );
- } finally {
- (ReactSharedInternals.T = prevTransition),
- (ReactDOMSharedInternals.p = previousUpdateLanePriority);
- }
-}
-function commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- renderPriorityLevel,
- spawnedLane,
- updatedLanes,
suspendedRetryLanes
) {
- do flushPassiveEffects();
- while (null !== rootWithPendingPassiveEffects);
+ root.cancelPendingCommit = null;
+ do flushPendingEffects();
+ while (0 !== pendingEffectsStatus);
if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));
- var finishedWork = root.finishedWork;
- didIncludeRenderPhaseUpdate = root.finishedLanes;
- if (null === finishedWork) return null;
- root.finishedWork = null;
- root.finishedLanes = 0;
- if (finishedWork === root.current) throw Error(formatProdErrorMessage(177));
- var remainingLanes = finishedWork.lanes | finishedWork.childLanes;
- remainingLanes |= concurrentlyUpdatedLanes;
- markRootFinished(
- root,
- didIncludeRenderPhaseUpdate,
- remainingLanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes
- );
- root === workInProgressRoot &&
- ((workInProgress = workInProgressRoot = null),
- (workInProgressRootRenderLanes = 0));
- spawnedLane = !1;
- 0 !== (finishedWork.subtreeFlags & 10256) ||
- 0 !== (finishedWork.flags & 10256)
- ? ((spawnedLane = !0),
- (pendingPassiveEffectsRemainingLanes = remainingLanes),
- (pendingPassiveTransitions = transitions),
- (root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null),
- scheduleCallback$1(NormalPriority$1, function () {
- flushPassiveEffects(!0);
- return null;
- }))
- : ((root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null));
- transitions = 0 !== (finishedWork.flags & 15990);
- 0 !== (finishedWork.subtreeFlags & 15990) || transitions
- ? ((transitions = ReactSharedInternals.T),
- (ReactSharedInternals.T = null),
- (updatedLanes = ReactDOMSharedInternals.p),
- (ReactDOMSharedInternals.p = 2),
- (suspendedRetryLanes = executionContext),
- (executionContext |= 4),
- commitBeforeMutationEffects(root, finishedWork),
- commitMutationEffectsOnFiber(finishedWork, root),
- restoreSelection(selectionInformation, root.containerInfo),
- (_enabled = !!eventsEnabled),
- (selectionInformation = eventsEnabled = null),
- (root.current = finishedWork),
- commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork),
- requestPaint(),
- (executionContext = suspendedRetryLanes),
- (ReactDOMSharedInternals.p = updatedLanes),
- (ReactSharedInternals.T = transitions))
- : (root.current = finishedWork);
- spawnedLane
- ? ((spawnedLane = !1),
- (rootWithPendingPassiveEffects = root),
- (pendingPassiveEffectsLanes = didIncludeRenderPhaseUpdate))
- : releaseRootPooledCache(root, remainingLanes);
- remainingLanes = root.pendingLanes;
- 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
- onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
- if (null !== recoverableErrors)
- for (
- renderPriorityLevel = root.onRecoverableError, finishedWork = 0;
- finishedWork < recoverableErrors.length;
- finishedWork++
- )
- (remainingLanes = recoverableErrors[finishedWork]),
- renderPriorityLevel(remainingLanes.value, {
- componentStack: remainingLanes.stack
- });
- 0 !== (pendingPassiveEffectsLanes & 3) &&
- 0 !== root.tag &&
- flushPassiveEffects();
- ensureRootIsScheduled(root);
- remainingLanes = root.pendingLanes;
- 0 !== (didIncludeRenderPhaseUpdate & 4194218) && 0 !== (remainingLanes & 42)
- ? root === rootWithNestedUpdates
- ? nestedUpdateCount++
- : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
- : (nestedUpdateCount = 0);
- flushSyncWorkAcrossRoots_impl(0, !1);
- return null;
+ if (null !== finishedWork) {
+ if (finishedWork === root.current) throw Error(formatProdErrorMessage(177));
+ didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
+ didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
+ markRootFinished(
+ root,
+ lanes,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+ );
+ root === workInProgressRoot &&
+ ((workInProgress = workInProgressRoot = null),
+ (workInProgressRootRenderLanes = 0));
+ pendingFinishedWork = finishedWork;
+ pendingEffectsRoot = root;
+ pendingEffectsLanes = lanes;
+ pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
+ pendingPassiveTransitions = transitions;
+ pendingRecoverableErrors = recoverableErrors;
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? ((root.callbackNode = null),
+ (root.callbackPriority = 0),
+ scheduleCallback$1(NormalPriority$1, function () {
+ flushPassiveEffects(!0);
+ return null;
+ }))
+ : ((root.callbackNode = null), (root.callbackPriority = 0));
+ lanes = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || lanes) {
+ lanes = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ recoverableErrors = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = 2;
+ transitions = executionContext;
+ executionContext |= 4;
+ try {
+ commitBeforeMutationEffects(root, finishedWork);
+ } finally {
+ (executionContext = transitions),
+ (ReactDOMSharedInternals.p = recoverableErrors),
+ (ReactSharedInternals.T = lanes);
+ }
+ }
+ pendingEffectsStatus = 1;
+ flushMutationEffects();
+ flushLayoutEffects();
+ }
+}
+function flushMutationEffects() {
+ if (1 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
+ rootMutationHasEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ commitMutationEffectsOnFiber(finishedWork, root);
+ var priorSelectionInformation = selectionInformation,
+ curFocusedElem = getActiveElementDeep(root.containerInfo),
+ priorFocusedElem = priorSelectionInformation.focusedElem,
+ priorSelectionRange = priorSelectionInformation.selectionRange;
+ if (
+ curFocusedElem !== priorFocusedElem &&
+ priorFocusedElem &&
+ priorFocusedElem.ownerDocument &&
+ containsNode(
+ priorFocusedElem.ownerDocument.documentElement,
+ priorFocusedElem
+ )
+ ) {
+ if (
+ null !== priorSelectionRange &&
+ hasSelectionCapabilities(priorFocusedElem)
+ ) {
+ var start = priorSelectionRange.start,
+ end = priorSelectionRange.end;
+ void 0 === end && (end = start);
+ if ("selectionStart" in priorFocusedElem)
+ (priorFocusedElem.selectionStart = start),
+ (priorFocusedElem.selectionEnd = Math.min(
+ end,
+ priorFocusedElem.value.length
+ ));
+ else {
+ var doc = priorFocusedElem.ownerDocument || document,
+ win = (doc && doc.defaultView) || window;
+ if (win.getSelection) {
+ var selection = win.getSelection(),
+ length = priorFocusedElem.textContent.length,
+ start$jscomp$0 = Math.min(priorSelectionRange.start, length),
+ end$jscomp$0 =
+ void 0 === priorSelectionRange.end
+ ? start$jscomp$0
+ : Math.min(priorSelectionRange.end, length);
+ !selection.extend &&
+ start$jscomp$0 > end$jscomp$0 &&
+ ((curFocusedElem = end$jscomp$0),
+ (end$jscomp$0 = start$jscomp$0),
+ (start$jscomp$0 = curFocusedElem));
+ var startMarker = getNodeForCharacterOffset(
+ priorFocusedElem,
+ start$jscomp$0
+ ),
+ endMarker = getNodeForCharacterOffset(
+ priorFocusedElem,
+ end$jscomp$0
+ );
+ if (
+ startMarker &&
+ endMarker &&
+ (1 !== selection.rangeCount ||
+ selection.anchorNode !== startMarker.node ||
+ selection.anchorOffset !== startMarker.offset ||
+ selection.focusNode !== endMarker.node ||
+ selection.focusOffset !== endMarker.offset)
+ ) {
+ var range = doc.createRange();
+ range.setStart(startMarker.node, startMarker.offset);
+ selection.removeAllRanges();
+ start$jscomp$0 > end$jscomp$0
+ ? (selection.addRange(range),
+ selection.extend(endMarker.node, endMarker.offset))
+ : (range.setEnd(endMarker.node, endMarker.offset),
+ selection.addRange(range));
+ }
+ }
+ }
+ }
+ doc = [];
+ for (
+ selection = priorFocusedElem;
+ (selection = selection.parentNode);
+
+ )
+ 1 === selection.nodeType &&
+ doc.push({
+ element: selection,
+ left: selection.scrollLeft,
+ top: selection.scrollTop
+ });
+ "function" === typeof priorFocusedElem.focus &&
+ priorFocusedElem.focus();
+ for (
+ priorFocusedElem = 0;
+ priorFocusedElem < doc.length;
+ priorFocusedElem++
+ ) {
+ var info = doc[priorFocusedElem];
+ info.element.scrollLeft = info.left;
+ info.element.scrollTop = info.top;
+ }
+ }
+ _enabled = !!eventsEnabled;
+ selectionInformation = eventsEnabled = null;
+ } finally {
+ (executionContext = prevExecutionContext),
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = rootMutationHasEffect);
+ }
+ }
+ root.current = finishedWork;
+ pendingEffectsStatus = 2;
+ }
+}
+function flushLayoutEffects() {
+ if (2 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ recoverableErrors = pendingRecoverableErrors,
+ rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
+ if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
+ rootHasLayoutEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);
+ } finally {
+ (executionContext = prevExecutionContext),
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = rootHasLayoutEffect);
+ }
+ }
+ requestPaint();
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? (pendingEffectsStatus = 3)
+ : ((pendingEffectsStatus = 0),
+ (pendingEffectsRoot = null),
+ releaseRootPooledCache(root, root.pendingLanes));
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 === rootHasLayoutEffect &&
+ (legacyErrorBoundariesThatAlreadyFailed = null);
+ lanesToEventPriority(lanes);
+ finishedWork = finishedWork.stateNode;
+ if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
+ try {
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ finishedWork,
+ void 0,
+ 128 === (finishedWork.current.flags & 128)
+ );
+ } catch (err) {}
+ if (null !== recoverableErrors) {
+ finishedWork = ReactSharedInternals.T;
+ rootHasLayoutEffect = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = 2;
+ ReactSharedInternals.T = null;
+ try {
+ var onRecoverableError = root.onRecoverableError;
+ for (
+ previousPriority = 0;
+ previousPriority < recoverableErrors.length;
+ previousPriority++
+ ) {
+ var recoverableError = recoverableErrors[previousPriority];
+ onRecoverableError(recoverableError.value, {
+ componentStack: recoverableError.stack
+ });
+ }
+ } finally {
+ (ReactSharedInternals.T = finishedWork),
+ (ReactDOMSharedInternals.p = rootHasLayoutEffect);
+ }
+ }
+ 0 !== (pendingEffectsLanes & 3) && 0 !== root.tag && flushPendingEffects();
+ ensureRootIsScheduled(root);
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)
+ ? root === rootWithNestedUpdates
+ ? nestedUpdateCount++
+ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
+ : (nestedUpdateCount = 0);
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ }
}
function releaseRootPooledCache(root, remainingLanes) {
0 === (root.pooledCacheLanes &= remainingLanes) &&
@@ -11936,51 +11971,54 @@ function releaseRootPooledCache(root, remainingLanes) {
null != remainingLanes &&
((root.pooledCache = null), releaseCache(remainingLanes)));
}
+function flushPendingEffects(wasDelayedCommit) {
+ flushMutationEffects();
+ flushLayoutEffects();
+ return flushPassiveEffects(wasDelayedCommit);
+}
function flushPassiveEffects() {
- if (null !== rootWithPendingPassiveEffects) {
- var root$183 = rootWithPendingPassiveEffects,
- remainingLanes = pendingPassiveEffectsRemainingLanes;
- pendingPassiveEffectsRemainingLanes = 0;
- var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
- prevTransition = ReactSharedInternals.T,
- previousPriority = ReactDOMSharedInternals.p;
- try {
- ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority;
- ReactSharedInternals.T = null;
- if (null === rootWithPendingPassiveEffects)
- var JSCompiler_inline_result = !1;
- else {
- renderPriority = pendingPassiveTransitions;
- pendingPassiveTransitions = null;
- var root = rootWithPendingPassiveEffects,
- lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsLanes = 0;
- if (0 !== (executionContext & 6))
- throw Error(formatProdErrorMessage(331));
- var prevExecutionContext = executionContext;
- executionContext |= 4;
- commitPassiveUnmountOnFiber(root.current);
- commitPassiveMountOnFiber(root, root.current, lanes, renderPriority);
- executionContext = prevExecutionContext;
- flushSyncWorkAcrossRoots_impl(0, !1);
- if (
- injectedHook &&
- "function" === typeof injectedHook.onPostCommitFiberRoot
- )
- try {
- injectedHook.onPostCommitFiberRoot(rendererID, root);
- } catch (err) {}
- JSCompiler_inline_result = !0;
- }
- return JSCompiler_inline_result;
- } finally {
- (ReactDOMSharedInternals.p = previousPriority),
- (ReactSharedInternals.T = prevTransition),
- releaseRootPooledCache(root$183, remainingLanes);
- }
+ if (3 !== pendingEffectsStatus) return !1;
+ var root = pendingEffectsRoot,
+ remainingLanes = pendingEffectsRemainingLanes;
+ pendingEffectsRemainingLanes = 0;
+ var renderPriority = lanesToEventPriority(pendingEffectsLanes),
+ prevTransition = ReactSharedInternals.T,
+ previousPriority = ReactDOMSharedInternals.p;
+ try {
+ ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority;
+ ReactSharedInternals.T = null;
+ renderPriority = pendingPassiveTransitions;
+ pendingPassiveTransitions = null;
+ var root$jscomp$0 = pendingEffectsRoot,
+ lanes = pendingEffectsLanes;
+ pendingEffectsStatus = 0;
+ pendingEffectsRoot = null;
+ pendingEffectsLanes = 0;
+ if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(331));
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ commitPassiveUnmountOnFiber(root$jscomp$0.current);
+ commitPassiveMountOnFiber(
+ root$jscomp$0,
+ root$jscomp$0.current,
+ lanes,
+ renderPriority
+ );
+ executionContext = prevExecutionContext;
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
+ } catch (err) {}
+ return !0;
+ } finally {
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = prevTransition),
+ releaseRootPooledCache(root, remainingLanes);
}
- return !1;
}
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
@@ -12113,8 +12151,7 @@ function ensureRootIsScheduled(root) {
: (lastScheduledRoot = lastScheduledRoot.next = root));
mightHavePendingSyncWork = !0;
didScheduleMicrotask ||
- ((didScheduleMicrotask = !0),
- scheduleImmediateTask(processRootScheduleInMicrotask));
+ ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());
}
function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
if (!isFlushingWork && mightHavePendingSyncWork) {
@@ -12147,7 +12184,9 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
(JSCompiler_inline_result = workInProgressRootRenderLanes),
(JSCompiler_inline_result = getNextLanes(
root$185,
- root$185 === workInProgressRoot ? JSCompiler_inline_result : 0
+ root$185 === workInProgressRoot ? JSCompiler_inline_result : 0,
+ null !== root$185.cancelPendingCommit ||
+ -1 !== root$185.timeoutHandle
)),
0 === (JSCompiler_inline_result & 3) ||
checkIfRootIsPrerendering(root$185, JSCompiler_inline_result) ||
@@ -12159,6 +12198,9 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
isFlushingWork = !1;
}
}
+function processRootScheduleInImmediateTask() {
+ processRootScheduleInMicrotask();
+}
function processRootScheduleInMicrotask() {
mightHavePendingSyncWork = didScheduleMicrotask = !1;
var syncTransitionLanes = 0;
@@ -12207,7 +12249,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
suspendedLanes = workInProgressRootRenderLanes;
suspendedLanes = getNextLanes(
root,
- root === currentTime ? suspendedLanes : 0
+ root === currentTime ? suspendedLanes : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
pingedLanes = root.callbackNode;
if (
@@ -12258,13 +12301,16 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
return 2;
}
function performWorkOnRootViaSchedulerTask(root, didTimeout) {
+ if (0 !== pendingEffectsStatus && 3 !== pendingEffectsStatus)
+ return (root.callbackNode = null), (root.callbackPriority = 0), null;
var originalCallbackNode = root.callbackNode;
- if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
+ if (flushPendingEffects(!0) && root.callbackNode !== originalCallbackNode)
return null;
var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
root,
- root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0
+ root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout);
@@ -12274,14 +12320,17 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) {
: null;
}
function performSyncWorkOnRoot(root, lanes) {
- if (flushPassiveEffects()) return null;
+ if (flushPendingEffects()) return null;
performWorkOnRoot(root, lanes, !0);
}
-function scheduleImmediateTask(cb) {
+function scheduleImmediateRootScheduleTask() {
scheduleMicrotask(function () {
0 !== (executionContext & 6)
- ? scheduleCallback$3(ImmediatePriority, cb)
- : cb();
+ ? scheduleCallback$3(
+ ImmediatePriority,
+ processRootScheduleInImmediateTask
+ )
+ : processRootScheduleInMicrotask();
});
}
function requestTransitionLane() {
@@ -12384,20 +12433,20 @@ function extractEvents$1(
}
}
for (
- var i$jscomp$inline_1485 = 0;
- i$jscomp$inline_1485 < simpleEventPluginEvents.length;
- i$jscomp$inline_1485++
+ var i$jscomp$inline_1511 = 0;
+ i$jscomp$inline_1511 < simpleEventPluginEvents.length;
+ i$jscomp$inline_1511++
) {
- var eventName$jscomp$inline_1486 =
- simpleEventPluginEvents[i$jscomp$inline_1485],
- domEventName$jscomp$inline_1487 =
- eventName$jscomp$inline_1486.toLowerCase(),
- capitalizedEvent$jscomp$inline_1488 =
- eventName$jscomp$inline_1486[0].toUpperCase() +
- eventName$jscomp$inline_1486.slice(1);
+ var eventName$jscomp$inline_1512 =
+ simpleEventPluginEvents[i$jscomp$inline_1511],
+ domEventName$jscomp$inline_1513 =
+ eventName$jscomp$inline_1512.toLowerCase(),
+ capitalizedEvent$jscomp$inline_1514 =
+ eventName$jscomp$inline_1512[0].toUpperCase() +
+ eventName$jscomp$inline_1512.slice(1);
registerSimpleEvent(
- domEventName$jscomp$inline_1487,
- "on" + capitalizedEvent$jscomp$inline_1488
+ domEventName$jscomp$inline_1513,
+ "on" + capitalizedEvent$jscomp$inline_1514
);
}
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -14241,7 +14290,9 @@ function canHydrateInstance(instance, type, props, inRootOrSingleton) {
else if (
name !== anyProps.rel ||
instance.getAttribute("href") !==
- (null == anyProps.href ? null : anyProps.href) ||
+ (null == anyProps.href || "" === anyProps.href
+ ? null
+ : anyProps.href) ||
instance.getAttribute("crossorigin") !==
(null == anyProps.crossOrigin ? null : anyProps.crossOrigin) ||
instance.getAttribute("title") !==
@@ -15135,11 +15186,7 @@ function FiberRootNode(
) {
this.tag = tag;
this.containerInfo = containerInfo;
- this.finishedWork =
- this.pingCache =
- this.current =
- this.pendingChildren =
- null;
+ this.pingCache = this.current = this.pendingChildren = null;
this.timeoutHandle = -1;
this.callbackNode =
this.next =
@@ -15152,7 +15199,6 @@ function FiberRootNode(
this.entangledLanes =
this.shellSuspendCounter =
this.errorRecoveryDisabledLanes =
- this.finishedLanes =
this.expiredLanes =
this.warmLanes =
this.pingedLanes =
@@ -15877,7 +15923,7 @@ ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount =
if (null !== root) {
this._internalRoot = null;
var container = root.containerInfo;
- 0 === root.tag && flushPassiveEffects();
+ 0 === root.tag && flushPendingEffects();
updateContainerImpl(root.current, 2, null, root, null, null);
flushSyncWork();
container[internalContainerInstanceKey] = null;
@@ -15901,16 +15947,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
0 === i && attemptExplicitHydrationTarget(target);
}
};
-var isomorphicReactPackageVersion$jscomp$inline_1728 = React.version;
+var isomorphicReactPackageVersion$jscomp$inline_1754 = React.version;
if (
- "19.1.0-native-fb-a9bbe346-20241219" !==
- isomorphicReactPackageVersion$jscomp$inline_1728
+ "19.1.0-native-fb-a160102f-20250107" !==
+ isomorphicReactPackageVersion$jscomp$inline_1754
)
throw Error(
formatProdErrorMessage(
527,
- isomorphicReactPackageVersion$jscomp$inline_1728,
- "19.1.0-native-fb-a9bbe346-20241219"
+ isomorphicReactPackageVersion$jscomp$inline_1754,
+ "19.1.0-native-fb-a160102f-20250107"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -15930,24 +15976,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
null === componentOrElement ? null : componentOrElement.stateNode;
return componentOrElement;
};
-var internals$jscomp$inline_2188 = {
+var internals$jscomp$inline_2204 = {
bundleType: 0,
- version: "19.1.0-native-fb-a9bbe346-20241219",
+ version: "19.1.0-native-fb-a160102f-20250107",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.1.0-native-fb-a9bbe346-20241219"
+ reconcilerVersion: "19.1.0-native-fb-a160102f-20250107"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
- var hook$jscomp$inline_2189 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+ var hook$jscomp$inline_2205 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
- !hook$jscomp$inline_2189.isDisabled &&
- hook$jscomp$inline_2189.supportsFiber
+ !hook$jscomp$inline_2205.isDisabled &&
+ hook$jscomp$inline_2205.supportsFiber
)
try {
- (rendererID = hook$jscomp$inline_2189.inject(
- internals$jscomp$inline_2188
+ (rendererID = hook$jscomp$inline_2205.inject(
+ internals$jscomp$inline_2204
)),
- (injectedHook = hook$jscomp$inline_2189);
+ (injectedHook = hook$jscomp$inline_2205);
} catch (err) {}
}
function noop() {}
@@ -16195,4 +16241,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
-exports.version = "19.1.0-native-fb-a9bbe346-20241219";
+exports.version = "19.1.0-native-fb-a160102f-20250107";
diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js
index 601e935e827d0..99784e96dc48f 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<<5fd152c2c28197ed0ebcac8971cd9a36>>
+ * @generated SignedSource<<0251497a4bc697b404784f29b79c3164>>
*/
/*
@@ -584,34 +584,6 @@ var hasOwnProperty = Object.prototype.hasOwnProperty,
injectedHook = null,
injectedProfilingHooks = null,
isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;
-function onCommitRoot(root, eventPriority) {
- if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
- try {
- var didError = 128 === (root.current.flags & 128);
- switch (eventPriority) {
- case 2:
- var schedulerPriority = ImmediatePriority;
- break;
- case 8:
- schedulerPriority = UserBlockingPriority;
- break;
- case 32:
- schedulerPriority = NormalPriority$1;
- break;
- case 268435456:
- schedulerPriority = IdlePriority;
- break;
- default:
- schedulerPriority = NormalPriority$1;
- }
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- schedulerPriority,
- didError
- );
- } catch (err) {}
-}
function setIsStrictModeForDevtools(newIsStrictMode) {
"function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
if (injectedHook && "function" === typeof injectedHook.setStrictMode)
@@ -727,14 +699,13 @@ function getHighestPriorityLanes(lanes) {
return lanes;
}
}
-function getNextLanes(root, wipLanes) {
+function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0,
suspendedLanes = root.suspendedLanes,
- pingedLanes = root.pingedLanes,
- warmLanes = root.warmLanes;
- root = 0 !== root.finishedLanes;
+ pingedLanes = root.pingedLanes;
+ root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes
? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
@@ -744,29 +715,29 @@ function getNextLanes(root, wipLanes) {
0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = nonIdlePendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes)))))
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))))
: ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
0 !== nonIdlePendingLanes
? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
: 0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = pendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes))));
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = pendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes
? 0
: 0 !== wipLanes &&
wipLanes !== nextLanes &&
0 === (wipLanes & suspendedLanes) &&
((suspendedLanes = nextLanes & -nextLanes),
- (warmLanes = wipLanes & -wipLanes),
- suspendedLanes >= warmLanes ||
- (32 === suspendedLanes && 0 !== (warmLanes & 4194176)))
+ (rootHasPendingCommit = wipLanes & -wipLanes),
+ suspendedLanes >= rootHasPendingCommit ||
+ (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176)))
? wipLanes
: nextLanes;
}
@@ -2210,14 +2181,14 @@ var isInputEventSupported = !1;
if (canUseDOM) {
var JSCompiler_inline_result$jscomp$309;
if (canUseDOM) {
- var isSupported$jscomp$inline_437 = "oninput" in document;
- if (!isSupported$jscomp$inline_437) {
- var element$jscomp$inline_438 = document.createElement("div");
- element$jscomp$inline_438.setAttribute("oninput", "return;");
- isSupported$jscomp$inline_437 =
- "function" === typeof element$jscomp$inline_438.oninput;
+ var isSupported$jscomp$inline_438 = "oninput" in document;
+ if (!isSupported$jscomp$inline_438) {
+ var element$jscomp$inline_439 = document.createElement("div");
+ element$jscomp$inline_439.setAttribute("oninput", "return;");
+ isSupported$jscomp$inline_438 =
+ "function" === typeof element$jscomp$inline_439.oninput;
}
- JSCompiler_inline_result$jscomp$309 = isSupported$jscomp$inline_437;
+ JSCompiler_inline_result$jscomp$309 = isSupported$jscomp$inline_438;
} else JSCompiler_inline_result$jscomp$309 = !1;
isInputEventSupported =
JSCompiler_inline_result$jscomp$309 &&
@@ -2372,97 +2343,6 @@ function hasSelectionCapabilities(elem) {
"true" === elem.contentEditable)
);
}
-function restoreSelection(priorSelectionInformation, containerInfo) {
- var curFocusedElem = getActiveElementDeep(containerInfo);
- containerInfo = priorSelectionInformation.focusedElem;
- var priorSelectionRange = priorSelectionInformation.selectionRange;
- if (
- curFocusedElem !== containerInfo &&
- containerInfo &&
- containerInfo.ownerDocument &&
- containsNode(containerInfo.ownerDocument.documentElement, containerInfo)
- ) {
- if (null !== priorSelectionRange && hasSelectionCapabilities(containerInfo))
- if (
- ((priorSelectionInformation = priorSelectionRange.start),
- (curFocusedElem = priorSelectionRange.end),
- void 0 === curFocusedElem &&
- (curFocusedElem = priorSelectionInformation),
- "selectionStart" in containerInfo)
- )
- (containerInfo.selectionStart = priorSelectionInformation),
- (containerInfo.selectionEnd = Math.min(
- curFocusedElem,
- containerInfo.value.length
- ));
- else if (
- ((curFocusedElem =
- ((priorSelectionInformation =
- containerInfo.ownerDocument || document) &&
- priorSelectionInformation.defaultView) ||
- window),
- curFocusedElem.getSelection)
- ) {
- curFocusedElem = curFocusedElem.getSelection();
- var length = containerInfo.textContent.length,
- start = Math.min(priorSelectionRange.start, length);
- priorSelectionRange =
- void 0 === priorSelectionRange.end
- ? start
- : Math.min(priorSelectionRange.end, length);
- !curFocusedElem.extend &&
- start > priorSelectionRange &&
- ((length = priorSelectionRange),
- (priorSelectionRange = start),
- (start = length));
- length = getNodeForCharacterOffset(containerInfo, start);
- var endMarker = getNodeForCharacterOffset(
- containerInfo,
- priorSelectionRange
- );
- length &&
- endMarker &&
- (1 !== curFocusedElem.rangeCount ||
- curFocusedElem.anchorNode !== length.node ||
- curFocusedElem.anchorOffset !== length.offset ||
- curFocusedElem.focusNode !== endMarker.node ||
- curFocusedElem.focusOffset !== endMarker.offset) &&
- ((priorSelectionInformation =
- priorSelectionInformation.createRange()),
- priorSelectionInformation.setStart(length.node, length.offset),
- curFocusedElem.removeAllRanges(),
- start > priorSelectionRange
- ? (curFocusedElem.addRange(priorSelectionInformation),
- curFocusedElem.extend(endMarker.node, endMarker.offset))
- : (priorSelectionInformation.setEnd(
- endMarker.node,
- endMarker.offset
- ),
- curFocusedElem.addRange(priorSelectionInformation)));
- }
- priorSelectionInformation = [];
- for (
- curFocusedElem = containerInfo;
- (curFocusedElem = curFocusedElem.parentNode);
-
- )
- 1 === curFocusedElem.nodeType &&
- priorSelectionInformation.push({
- element: curFocusedElem,
- left: curFocusedElem.scrollLeft,
- top: curFocusedElem.scrollTop
- });
- "function" === typeof containerInfo.focus && containerInfo.focus();
- for (
- containerInfo = 0;
- containerInfo < priorSelectionInformation.length;
- containerInfo++
- )
- (curFocusedElem = priorSelectionInformation[containerInfo]),
- (curFocusedElem.element.scrollLeft = curFocusedElem.left),
- (curFocusedElem.element.scrollTop = curFocusedElem.top);
- }
-}
var skipSelectionChangeEvent =
canUseDOM && "documentMode" in document && 11 >= document.documentMode,
activeElement = null,
@@ -6671,12 +6551,12 @@ function markRef(current, workInProgress) {
if (null === ref)
null !== current &&
null !== current.ref &&
- (workInProgress.flags |= 2097664);
+ (workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(formatProdErrorMessage(284));
if (null === current || current.ref !== ref)
- workInProgress.flags |= 2097664;
+ workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
@@ -7314,7 +7194,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
didSuspend
)),
(nextProps.subtreeFlags =
- JSCompiler_temp$jscomp$0.subtreeFlags & 31457280)),
+ JSCompiler_temp$jscomp$0.subtreeFlags & 29360128)),
null !== digest
? (showFallback = createWorkInProgress(digest, showFallback))
: ((showFallback = createFiberFromFragment(
@@ -8673,8 +8553,7 @@ var offscreenSubtreeIsHidden = !1,
PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set,
nextEffect = null,
inProgressLanes = null,
- inProgressRoot = null,
- shouldFireAfterActiveInstanceBlur = !1;
+ inProgressRoot = null;
function commitBeforeMutationEffects(root, firstChild) {
root = root.containerInfo;
eventsEnabled = _enabled;
@@ -8750,7 +8629,7 @@ function commitBeforeMutationEffects(root, firstChild) {
if (
((firstChild = nextEffect),
(root = firstChild.child),
- 0 !== (firstChild.subtreeFlags & 1028) && null !== root)
+ 0 !== (firstChild.subtreeFlags & 1024) && null !== root)
)
(root.return = firstChild), (nextEffect = root);
else
@@ -8828,9 +8707,6 @@ function commitBeforeMutationEffects(root, firstChild) {
}
nextEffect = firstChild.return;
}
- resolvedPrevProps = shouldFireAfterActiveInstanceBlur;
- shouldFireAfterActiveInstanceBlur = !1;
- return resolvedPrevProps;
}
function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
var flags = finishedWork.flags;
@@ -9273,12 +9149,6 @@ function attachSuspenseRetryListeners(finishedWork, wakeables) {
}
});
}
-function commitMutationEffects(root, finishedWork, committedLanes) {
- inProgressLanes = committedLanes;
- inProgressRoot = root;
- commitMutationEffectsOnFiber(finishedWork, root);
- inProgressRoot = inProgressLanes = null;
-}
function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
var deletions = parentFiber.deletions;
if (null !== deletions)
@@ -9405,7 +9275,9 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
if (
((hoistableRoot = maybeNodes[i]),
hoistableRoot.getAttribute("href") ===
- (null == current.href ? null : current.href) &&
+ (null == current.href || "" === current.href
+ ? null
+ : current.href) &&
hoistableRoot.getAttribute("rel") ===
(null == current.rel ? null : current.rel) &&
hoistableRoot.getAttribute("title") ===
@@ -9815,12 +9687,6 @@ function recursivelyResetForms(parentFiber) {
parentFiber = parentFiber.sibling;
}
}
-function commitLayoutEffects(finishedWork, root, committedLanes) {
- inProgressLanes = committedLanes;
- inProgressRoot = root;
- commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);
- inProgressRoot = inProgressLanes = null;
-}
function recursivelyTraverseLayoutEffects(root, parentFiber) {
if (parentFiber.subtreeFlags & 8772)
for (parentFiber = parentFiber.child; null !== parentFiber; )
@@ -10047,6 +9913,14 @@ function commitPassiveMountOnFiber(
);
flags & 2048 && commitHookPassiveMountEffects(finishedWork, 9);
break;
+ case 1:
+ recursivelyTraversePassiveMountEffects(
+ finishedRoot,
+ finishedWork,
+ committedLanes,
+ committedTransitions
+ );
+ break;
case 3:
var prevEffectDuration = pushNestedEffectDurations();
recursivelyTraversePassiveMountEffects(
@@ -10577,7 +10451,7 @@ function createWorkInProgress(current, pendingProps) {
(workInProgress.deletions = null),
(workInProgress.actualDuration = -0),
(workInProgress.actualStartTime = -1.1));
- workInProgress.flags = current.flags & 31457280;
+ workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -10598,7 +10472,7 @@ function createWorkInProgress(current, pendingProps) {
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
- workInProgress.flags &= 31457282;
+ workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
@@ -10843,8 +10717,8 @@ function bubbleProperties(completedWork) {
)
(newChildLanes |= child$156.lanes | child$156.childLanes),
- (subtreeFlags |= child$156.subtreeFlags & 31457280),
- (subtreeFlags |= child$156.flags & 31457280),
+ (subtreeFlags |= child$156.subtreeFlags & 29360128),
+ (subtreeFlags |= child$156.flags & 29360128),
(treeBaseDuration$155 += child$156.treeBaseDuration),
(child$156 = child$156.sibling);
completedWork.treeBaseDuration = treeBaseDuration$155;
@@ -10856,8 +10730,8 @@ function bubbleProperties(completedWork) {
)
(newChildLanes |=
treeBaseDuration$155.lanes | treeBaseDuration$155.childLanes),
- (subtreeFlags |= treeBaseDuration$155.subtreeFlags & 31457280),
- (subtreeFlags |= treeBaseDuration$155.flags & 31457280),
+ (subtreeFlags |= treeBaseDuration$155.subtreeFlags & 29360128),
+ (subtreeFlags |= treeBaseDuration$155.flags & 29360128),
(treeBaseDuration$155.return = completedWork),
(treeBaseDuration$155 = treeBaseDuration$155.sibling);
else if (0 !== (completedWork.mode & 2)) {
@@ -11503,10 +11377,13 @@ var DefaultAsyncDispatcher = {
workInProgressRootRenderTargetTime = Infinity,
workInProgressTransitions = null,
legacyErrorBoundariesThatAlreadyFailed = null,
- rootWithPendingPassiveEffects = null,
- pendingPassiveEffectsLanes = 0,
- pendingPassiveEffectsRemainingLanes = 0,
+ pendingEffectsStatus = 0,
+ pendingEffectsRoot = null,
+ pendingFinishedWork = null,
+ pendingEffectsLanes = 0,
+ pendingEffectsRemainingLanes = 0,
pendingPassiveTransitions = null,
+ pendingRecoverableErrors = null,
nestedUpdateCount = 0,
rootWithNestedUpdates = null;
function requestUpdateLane(fiber) {
@@ -11675,8 +11552,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
default:
throw Error(formatProdErrorMessage(329));
}
- shouldTimeSlice.finishedWork = forceSync;
- shouldTimeSlice.finishedLanes = lanes;
if (
(lanes & 62914560) === lanes &&
(alwaysThrottleRetries || 3 === renderWasConcurrent) &&
@@ -11689,7 +11564,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
- if (0 !== getNextLanes(shouldTimeSlice, 0)) break a;
+ if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;
shouldTimeSlice.timeoutHandle = scheduleTimeout(
commitRootWhenReady.bind(
null,
@@ -11750,18 +11625,24 @@ function commitRootWhenReady(
completedRenderStartTime,
completedRenderEndTime
) {
- var subtreeFlags = finishedWork.subtreeFlags;
- if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408))
+ root.timeoutHandle = -1;
+ suspendedCommitReason = finishedWork.subtreeFlags;
+ if (
+ suspendedCommitReason & 8192 ||
+ 16785408 === (suspendedCommitReason & 16785408)
+ )
if (
((suspendedState = { stylesheets: null, count: 0, unsuspend: noop$1 }),
accumulateSuspenseyCommitOnFiber(finishedWork),
- (finishedWork = waitForCommitToBeReady()),
- null !== finishedWork)
+ (suspendedCommitReason = waitForCommitToBeReady()),
+ null !== suspendedCommitReason)
) {
- root.cancelPendingCommit = finishedWork(
+ root.cancelPendingCommit = suspendedCommitReason(
commitRoot.bind(
null,
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
@@ -11779,16 +11660,14 @@ function commitRootWhenReady(
}
commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
+ suspendedRetryLanes
);
}
function isRenderConsistentWithExternalStores(finishedWork) {
@@ -11871,8 +11750,6 @@ function resetWorkInProgressStack() {
}
}
function prepareFreshStack(root, lanes) {
- root.finishedWork = null;
- root.finishedLanes = 0;
var timeoutHandle = root.timeoutHandle;
-1 !== timeoutHandle &&
((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
@@ -12199,7 +12076,7 @@ function renderRootConcurrent(root, lanes) {
default:
throw Error(formatProdErrorMessage(462));
}
- workLoopConcurrent();
+ workLoopConcurrentByScheduler();
break;
} catch (thrownValue$194) {
handleThrow(root, thrownValue$194);
@@ -12222,7 +12099,7 @@ function renderRootConcurrent(root, lanes) {
finishQueueingConcurrentUpdates();
return workInProgressRootExitStatus;
}
-function workLoopConcurrent() {
+function workLoopConcurrentByScheduler() {
for (; null !== workInProgress && !shouldYield(); )
performUnitOfWork(workInProgress);
}
@@ -12409,154 +12286,308 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) {
}
function commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
-) {
- var prevTransition = ReactSharedInternals.T,
- previousUpdateLanePriority = ReactDOMSharedInternals.p;
- try {
- (ReactDOMSharedInternals.p = 2),
- (ReactSharedInternals.T = null),
- commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- previousUpdateLanePriority,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
- );
- } finally {
- (ReactSharedInternals.T = prevTransition),
- (ReactDOMSharedInternals.p = previousUpdateLanePriority);
- }
-}
-function commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- renderPriorityLevel,
- spawnedLane,
- updatedLanes,
suspendedRetryLanes
) {
- do flushPassiveEffects();
- while (null !== rootWithPendingPassiveEffects);
+ root.cancelPendingCommit = null;
+ do flushPendingEffects();
+ while (0 !== pendingEffectsStatus);
if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));
- var finishedWork = root.finishedWork;
- didIncludeRenderPhaseUpdate = root.finishedLanes;
null !== injectedProfilingHooks &&
"function" === typeof injectedProfilingHooks.markCommitStarted &&
- injectedProfilingHooks.markCommitStarted(didIncludeRenderPhaseUpdate);
- if (null === finishedWork) return markCommitStopped(), null;
- root.finishedWork = null;
- root.finishedLanes = 0;
- if (finishedWork === root.current) throw Error(formatProdErrorMessage(177));
- var remainingLanes = finishedWork.lanes | finishedWork.childLanes;
- remainingLanes |= concurrentlyUpdatedLanes;
- markRootFinished(
- root,
- didIncludeRenderPhaseUpdate,
- remainingLanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes
- );
- root === workInProgressRoot &&
- ((workInProgress = workInProgressRoot = null),
- (workInProgressRootRenderLanes = 0));
- spawnedLane = !1;
- 0 !== (finishedWork.subtreeFlags & 10256) ||
- 0 !== (finishedWork.flags & 10256)
- ? ((spawnedLane = !0),
- (pendingPassiveEffectsRemainingLanes = remainingLanes),
- (pendingPassiveTransitions = transitions),
- (root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null),
- scheduleCallback$1(NormalPriority$1, function () {
- flushPassiveEffects(!0);
- return null;
- }))
- : ((root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null));
- commitStartTime = now();
- transitions = 0 !== (finishedWork.flags & 15990);
- 0 !== (finishedWork.subtreeFlags & 15990) || transitions
- ? ((transitions = ReactSharedInternals.T),
- (ReactSharedInternals.T = null),
- (updatedLanes = ReactDOMSharedInternals.p),
- (ReactDOMSharedInternals.p = 2),
- (suspendedRetryLanes = executionContext),
- (executionContext |= 4),
- commitBeforeMutationEffects(root, finishedWork),
- commitMutationEffects(root, finishedWork, didIncludeRenderPhaseUpdate),
- restoreSelection(selectionInformation, root.containerInfo),
- (_enabled = !!eventsEnabled),
- (selectionInformation = eventsEnabled = null),
- (root.current = finishedWork),
- null !== injectedProfilingHooks &&
- "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted &&
- injectedProfilingHooks.markLayoutEffectsStarted(
- didIncludeRenderPhaseUpdate
- ),
- commitLayoutEffects(finishedWork, root, didIncludeRenderPhaseUpdate),
- null !== injectedProfilingHooks &&
- "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped &&
- injectedProfilingHooks.markLayoutEffectsStopped(),
- requestPaint(),
- (executionContext = suspendedRetryLanes),
- (ReactDOMSharedInternals.p = updatedLanes),
- (ReactSharedInternals.T = transitions))
- : (root.current = finishedWork);
- spawnedLane
- ? ((spawnedLane = !1),
- (rootWithPendingPassiveEffects = root),
- (pendingPassiveEffectsLanes = didIncludeRenderPhaseUpdate))
- : releaseRootPooledCache(root, remainingLanes);
- remainingLanes = root.pendingLanes;
- 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
- onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
- isDevToolsPresent && root.memoizedUpdaters.clear();
- if (null !== recoverableErrors)
- for (
- renderPriorityLevel = root.onRecoverableError, finishedWork = 0;
- finishedWork < recoverableErrors.length;
- finishedWork++
- )
- (remainingLanes = recoverableErrors[finishedWork]),
- renderPriorityLevel(remainingLanes.value, {
- componentStack: remainingLanes.stack
- });
- 0 !== (pendingPassiveEffectsLanes & 3) &&
- 0 !== root.tag &&
- flushPassiveEffects();
- ensureRootIsScheduled(root);
- remainingLanes = root.pendingLanes;
- 0 !== (didIncludeRenderPhaseUpdate & 4194218) && 0 !== (remainingLanes & 42)
- ? ((nestedUpdateScheduled = !0),
- root === rootWithNestedUpdates
- ? nestedUpdateCount++
- : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
- : (nestedUpdateCount = 0);
- flushSyncWorkAcrossRoots_impl(0, !1);
- markCommitStopped();
- return null;
+ injectedProfilingHooks.markCommitStarted(lanes);
+ if (null === finishedWork) markCommitStopped();
+ else {
+ if (finishedWork === root.current) throw Error(formatProdErrorMessage(177));
+ didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
+ didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
+ markRootFinished(
+ root,
+ lanes,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+ );
+ root === workInProgressRoot &&
+ ((workInProgress = workInProgressRoot = null),
+ (workInProgressRootRenderLanes = 0));
+ pendingFinishedWork = finishedWork;
+ pendingEffectsRoot = root;
+ pendingEffectsLanes = lanes;
+ pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
+ pendingPassiveTransitions = transitions;
+ pendingRecoverableErrors = recoverableErrors;
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? ((root.callbackNode = null),
+ (root.callbackPriority = 0),
+ scheduleCallback$1(NormalPriority$1, function () {
+ flushPassiveEffects(!0);
+ return null;
+ }))
+ : ((root.callbackNode = null), (root.callbackPriority = 0));
+ commitStartTime = now();
+ lanes = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || lanes) {
+ lanes = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ recoverableErrors = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = 2;
+ transitions = executionContext;
+ executionContext |= 4;
+ try {
+ commitBeforeMutationEffects(root, finishedWork);
+ } finally {
+ (executionContext = transitions),
+ (ReactDOMSharedInternals.p = recoverableErrors),
+ (ReactSharedInternals.T = lanes);
+ }
+ }
+ pendingEffectsStatus = 1;
+ flushMutationEffects();
+ flushLayoutEffects();
+ }
+}
+function flushMutationEffects() {
+ if (1 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
+ rootMutationHasEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ inProgressLanes = lanes;
+ inProgressRoot = root;
+ commitMutationEffectsOnFiber(finishedWork, root);
+ inProgressRoot = inProgressLanes = null;
+ lanes = selectionInformation;
+ var curFocusedElem = getActiveElementDeep(root.containerInfo),
+ priorFocusedElem = lanes.focusedElem,
+ priorSelectionRange = lanes.selectionRange;
+ if (
+ curFocusedElem !== priorFocusedElem &&
+ priorFocusedElem &&
+ priorFocusedElem.ownerDocument &&
+ containsNode(
+ priorFocusedElem.ownerDocument.documentElement,
+ priorFocusedElem
+ )
+ ) {
+ if (
+ null !== priorSelectionRange &&
+ hasSelectionCapabilities(priorFocusedElem)
+ ) {
+ var start = priorSelectionRange.start,
+ end = priorSelectionRange.end;
+ void 0 === end && (end = start);
+ if ("selectionStart" in priorFocusedElem)
+ (priorFocusedElem.selectionStart = start),
+ (priorFocusedElem.selectionEnd = Math.min(
+ end,
+ priorFocusedElem.value.length
+ ));
+ else {
+ var doc = priorFocusedElem.ownerDocument || document,
+ win = (doc && doc.defaultView) || window;
+ if (win.getSelection) {
+ var selection = win.getSelection(),
+ length = priorFocusedElem.textContent.length,
+ start$jscomp$0 = Math.min(priorSelectionRange.start, length),
+ end$jscomp$0 =
+ void 0 === priorSelectionRange.end
+ ? start$jscomp$0
+ : Math.min(priorSelectionRange.end, length);
+ !selection.extend &&
+ start$jscomp$0 > end$jscomp$0 &&
+ ((curFocusedElem = end$jscomp$0),
+ (end$jscomp$0 = start$jscomp$0),
+ (start$jscomp$0 = curFocusedElem));
+ var startMarker = getNodeForCharacterOffset(
+ priorFocusedElem,
+ start$jscomp$0
+ ),
+ endMarker = getNodeForCharacterOffset(
+ priorFocusedElem,
+ end$jscomp$0
+ );
+ if (
+ startMarker &&
+ endMarker &&
+ (1 !== selection.rangeCount ||
+ selection.anchorNode !== startMarker.node ||
+ selection.anchorOffset !== startMarker.offset ||
+ selection.focusNode !== endMarker.node ||
+ selection.focusOffset !== endMarker.offset)
+ ) {
+ var range = doc.createRange();
+ range.setStart(startMarker.node, startMarker.offset);
+ selection.removeAllRanges();
+ start$jscomp$0 > end$jscomp$0
+ ? (selection.addRange(range),
+ selection.extend(endMarker.node, endMarker.offset))
+ : (range.setEnd(endMarker.node, endMarker.offset),
+ selection.addRange(range));
+ }
+ }
+ }
+ }
+ doc = [];
+ for (
+ selection = priorFocusedElem;
+ (selection = selection.parentNode);
+
+ )
+ 1 === selection.nodeType &&
+ doc.push({
+ element: selection,
+ left: selection.scrollLeft,
+ top: selection.scrollTop
+ });
+ "function" === typeof priorFocusedElem.focus &&
+ priorFocusedElem.focus();
+ for (
+ priorFocusedElem = 0;
+ priorFocusedElem < doc.length;
+ priorFocusedElem++
+ ) {
+ var info = doc[priorFocusedElem];
+ info.element.scrollLeft = info.left;
+ info.element.scrollTop = info.top;
+ }
+ }
+ _enabled = !!eventsEnabled;
+ selectionInformation = eventsEnabled = null;
+ } finally {
+ (executionContext = prevExecutionContext),
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = rootMutationHasEffect);
+ }
+ }
+ root.current = finishedWork;
+ pendingEffectsStatus = 2;
+ }
+}
+function flushLayoutEffects() {
+ if (2 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ recoverableErrors = pendingRecoverableErrors,
+ rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
+ if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
+ rootHasLayoutEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStarted &&
+ injectedProfilingHooks.markLayoutEffectsStarted(lanes),
+ (inProgressLanes = lanes),
+ (inProgressRoot = root),
+ commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork),
+ (inProgressRoot = inProgressLanes = null),
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStopped &&
+ injectedProfilingHooks.markLayoutEffectsStopped();
+ } finally {
+ (executionContext = prevExecutionContext),
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = rootHasLayoutEffect);
+ }
+ }
+ requestPaint();
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? (pendingEffectsStatus = 3)
+ : ((pendingEffectsStatus = 0),
+ (pendingEffectsRoot = null),
+ releaseRootPooledCache(root, root.pendingLanes));
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 === rootHasLayoutEffect &&
+ (legacyErrorBoundariesThatAlreadyFailed = null);
+ rootHasLayoutEffect = lanesToEventPriority(lanes);
+ finishedWork = finishedWork.stateNode;
+ if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
+ try {
+ var didError = 128 === (finishedWork.current.flags & 128);
+ switch (rootHasLayoutEffect) {
+ case 2:
+ var schedulerPriority = ImmediatePriority;
+ break;
+ case 8:
+ schedulerPriority = UserBlockingPriority;
+ break;
+ case 32:
+ schedulerPriority = NormalPriority$1;
+ break;
+ case 268435456:
+ schedulerPriority = IdlePriority;
+ break;
+ default:
+ schedulerPriority = NormalPriority$1;
+ }
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ finishedWork,
+ schedulerPriority,
+ didError
+ );
+ } catch (err) {}
+ isDevToolsPresent && root.memoizedUpdaters.clear();
+ if (null !== recoverableErrors) {
+ didError = ReactSharedInternals.T;
+ schedulerPriority = ReactDOMSharedInternals.p;
+ ReactDOMSharedInternals.p = 2;
+ ReactSharedInternals.T = null;
+ try {
+ var onRecoverableError = root.onRecoverableError;
+ for (
+ finishedWork = 0;
+ finishedWork < recoverableErrors.length;
+ finishedWork++
+ ) {
+ var recoverableError = recoverableErrors[finishedWork];
+ onRecoverableError(recoverableError.value, {
+ componentStack: recoverableError.stack
+ });
+ }
+ } finally {
+ (ReactSharedInternals.T = didError),
+ (ReactDOMSharedInternals.p = schedulerPriority);
+ }
+ }
+ 0 !== (pendingEffectsLanes & 3) && 0 !== root.tag && flushPendingEffects();
+ ensureRootIsScheduled(root);
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)
+ ? ((nestedUpdateScheduled = !0),
+ root === rootWithNestedUpdates
+ ? nestedUpdateCount++
+ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
+ : (nestedUpdateCount = 0);
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ markCommitStopped();
+ }
}
function releaseRootPooledCache(root, remainingLanes) {
0 === (root.pooledCacheLanes &= remainingLanes) &&
@@ -12564,62 +12595,63 @@ function releaseRootPooledCache(root, remainingLanes) {
null != remainingLanes &&
((root.pooledCache = null), releaseCache(remainingLanes)));
}
+function flushPendingEffects(wasDelayedCommit) {
+ flushMutationEffects();
+ flushLayoutEffects();
+ return flushPassiveEffects(wasDelayedCommit);
+}
function flushPassiveEffects() {
- if (null !== rootWithPendingPassiveEffects) {
- var root$198 = rootWithPendingPassiveEffects,
- remainingLanes = pendingPassiveEffectsRemainingLanes;
- pendingPassiveEffectsRemainingLanes = 0;
- var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
- prevTransition = ReactSharedInternals.T,
- previousPriority = ReactDOMSharedInternals.p;
- try {
- ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority;
- ReactSharedInternals.T = null;
- if (null === rootWithPendingPassiveEffects)
- var JSCompiler_inline_result = !1;
- else {
- renderPriority = pendingPassiveTransitions;
- pendingPassiveTransitions = null;
- var root = rootWithPendingPassiveEffects,
- lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsLanes = 0;
- if (0 !== (executionContext & 6))
- throw Error(formatProdErrorMessage(331));
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStarted &&
- injectedProfilingHooks.markPassiveEffectsStarted(lanes);
- var prevExecutionContext = executionContext;
- executionContext |= 4;
- commitPassiveUnmountOnFiber(root.current);
- commitPassiveMountOnFiber(root, root.current, lanes, renderPriority);
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStopped &&
- injectedProfilingHooks.markPassiveEffectsStopped();
- executionContext = prevExecutionContext;
- flushSyncWorkAcrossRoots_impl(0, !1);
- if (
- injectedHook &&
- "function" === typeof injectedHook.onPostCommitFiberRoot
- )
- try {
- injectedHook.onPostCommitFiberRoot(rendererID, root);
- } catch (err) {}
- var stateNode = root.current.stateNode;
- stateNode.effectDuration = 0;
- stateNode.passiveEffectDuration = 0;
- JSCompiler_inline_result = !0;
- }
- return JSCompiler_inline_result;
- } finally {
- (ReactDOMSharedInternals.p = previousPriority),
- (ReactSharedInternals.T = prevTransition),
- releaseRootPooledCache(root$198, remainingLanes);
- }
+ if (3 !== pendingEffectsStatus) return !1;
+ var root = pendingEffectsRoot,
+ remainingLanes = pendingEffectsRemainingLanes;
+ pendingEffectsRemainingLanes = 0;
+ var renderPriority = lanesToEventPriority(pendingEffectsLanes),
+ prevTransition = ReactSharedInternals.T,
+ previousPriority = ReactDOMSharedInternals.p;
+ try {
+ ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority;
+ ReactSharedInternals.T = null;
+ renderPriority = pendingPassiveTransitions;
+ pendingPassiveTransitions = null;
+ var root$jscomp$0 = pendingEffectsRoot,
+ lanes = pendingEffectsLanes;
+ pendingEffectsStatus = 0;
+ pendingEffectsRoot = null;
+ pendingEffectsLanes = 0;
+ if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(331));
+ null !== injectedProfilingHooks &&
+ "function" === typeof injectedProfilingHooks.markPassiveEffectsStarted &&
+ injectedProfilingHooks.markPassiveEffectsStarted(lanes);
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ commitPassiveUnmountOnFiber(root$jscomp$0.current);
+ commitPassiveMountOnFiber(
+ root$jscomp$0,
+ root$jscomp$0.current,
+ lanes,
+ renderPriority
+ );
+ null !== injectedProfilingHooks &&
+ "function" === typeof injectedProfilingHooks.markPassiveEffectsStopped &&
+ injectedProfilingHooks.markPassiveEffectsStopped();
+ executionContext = prevExecutionContext;
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
+ } catch (err) {}
+ var stateNode = root$jscomp$0.current.stateNode;
+ stateNode.effectDuration = 0;
+ stateNode.passiveEffectDuration = 0;
+ return !0;
+ } finally {
+ (ReactDOMSharedInternals.p = previousPriority),
+ (ReactSharedInternals.T = prevTransition),
+ releaseRootPooledCache(root, remainingLanes);
}
- return !1;
}
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
@@ -12759,8 +12791,7 @@ function ensureRootIsScheduled(root) {
: (lastScheduledRoot = lastScheduledRoot.next = root));
mightHavePendingSyncWork = !0;
didScheduleMicrotask ||
- ((didScheduleMicrotask = !0),
- scheduleImmediateTask(processRootScheduleInMicrotask));
+ ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());
}
function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
if (!isFlushingWork && mightHavePendingSyncWork) {
@@ -12793,7 +12824,9 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
(JSCompiler_inline_result = workInProgressRootRenderLanes),
(JSCompiler_inline_result = getNextLanes(
root$200,
- root$200 === workInProgressRoot ? JSCompiler_inline_result : 0
+ root$200 === workInProgressRoot ? JSCompiler_inline_result : 0,
+ null !== root$200.cancelPendingCommit ||
+ -1 !== root$200.timeoutHandle
)),
0 === (JSCompiler_inline_result & 3) ||
checkIfRootIsPrerendering(root$200, JSCompiler_inline_result) ||
@@ -12805,6 +12838,9 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
isFlushingWork = !1;
}
}
+function processRootScheduleInImmediateTask() {
+ processRootScheduleInMicrotask();
+}
function processRootScheduleInMicrotask() {
mightHavePendingSyncWork = didScheduleMicrotask = !1;
var syncTransitionLanes = 0;
@@ -12853,7 +12889,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
suspendedLanes = workInProgressRootRenderLanes;
suspendedLanes = getNextLanes(
root,
- root === currentTime ? suspendedLanes : 0
+ root === currentTime ? suspendedLanes : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
pingedLanes = root.callbackNode;
if (
@@ -12905,13 +12942,16 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
}
function performWorkOnRootViaSchedulerTask(root, didTimeout) {
nestedUpdateScheduled = currentUpdateIsNested = !1;
+ if (0 !== pendingEffectsStatus && 3 !== pendingEffectsStatus)
+ return (root.callbackNode = null), (root.callbackPriority = 0), null;
var originalCallbackNode = root.callbackNode;
- if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
+ if (flushPendingEffects(!0) && root.callbackNode !== originalCallbackNode)
return null;
var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
root,
- root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0
+ root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout);
@@ -12921,16 +12961,19 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) {
: null;
}
function performSyncWorkOnRoot(root, lanes) {
- if (flushPassiveEffects()) return null;
+ if (flushPendingEffects()) return null;
currentUpdateIsNested = nestedUpdateScheduled;
nestedUpdateScheduled = !1;
performWorkOnRoot(root, lanes, !0);
}
-function scheduleImmediateTask(cb) {
+function scheduleImmediateRootScheduleTask() {
scheduleMicrotask(function () {
0 !== (executionContext & 6)
- ? scheduleCallback$3(ImmediatePriority, cb)
- : cb();
+ ? scheduleCallback$3(
+ ImmediatePriority,
+ processRootScheduleInImmediateTask
+ )
+ : processRootScheduleInMicrotask();
});
}
function requestTransitionLane() {
@@ -13033,20 +13076,20 @@ function extractEvents$1(
}
}
for (
- var i$jscomp$inline_1573 = 0;
- i$jscomp$inline_1573 < simpleEventPluginEvents.length;
- i$jscomp$inline_1573++
+ var i$jscomp$inline_1604 = 0;
+ i$jscomp$inline_1604 < simpleEventPluginEvents.length;
+ i$jscomp$inline_1604++
) {
- var eventName$jscomp$inline_1574 =
- simpleEventPluginEvents[i$jscomp$inline_1573],
- domEventName$jscomp$inline_1575 =
- eventName$jscomp$inline_1574.toLowerCase(),
- capitalizedEvent$jscomp$inline_1576 =
- eventName$jscomp$inline_1574[0].toUpperCase() +
- eventName$jscomp$inline_1574.slice(1);
+ var eventName$jscomp$inline_1605 =
+ simpleEventPluginEvents[i$jscomp$inline_1604],
+ domEventName$jscomp$inline_1606 =
+ eventName$jscomp$inline_1605.toLowerCase(),
+ capitalizedEvent$jscomp$inline_1607 =
+ eventName$jscomp$inline_1605[0].toUpperCase() +
+ eventName$jscomp$inline_1605.slice(1);
registerSimpleEvent(
- domEventName$jscomp$inline_1575,
- "on" + capitalizedEvent$jscomp$inline_1576
+ domEventName$jscomp$inline_1606,
+ "on" + capitalizedEvent$jscomp$inline_1607
);
}
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -14890,7 +14933,9 @@ function canHydrateInstance(instance, type, props, inRootOrSingleton) {
else if (
name !== anyProps.rel ||
instance.getAttribute("href") !==
- (null == anyProps.href ? null : anyProps.href) ||
+ (null == anyProps.href || "" === anyProps.href
+ ? null
+ : anyProps.href) ||
instance.getAttribute("crossorigin") !==
(null == anyProps.crossOrigin ? null : anyProps.crossOrigin) ||
instance.getAttribute("title") !==
@@ -15784,11 +15829,7 @@ function FiberRootNode(
) {
this.tag = tag;
this.containerInfo = containerInfo;
- this.finishedWork =
- this.pingCache =
- this.current =
- this.pendingChildren =
- null;
+ this.pingCache = this.current = this.pendingChildren = null;
this.timeoutHandle = -1;
this.callbackNode =
this.next =
@@ -15801,7 +15842,6 @@ function FiberRootNode(
this.entangledLanes =
this.shellSuspendCounter =
this.errorRecoveryDisabledLanes =
- this.finishedLanes =
this.expiredLanes =
this.warmLanes =
this.pingedLanes =
@@ -16534,7 +16574,7 @@ ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount =
if (null !== root) {
this._internalRoot = null;
var container = root.containerInfo;
- 0 === root.tag && flushPassiveEffects();
+ 0 === root.tag && flushPendingEffects();
updateContainerImpl(root.current, 2, null, root, null, null);
flushSyncWork();
container[internalContainerInstanceKey] = null;
@@ -16558,16 +16598,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
0 === i && attemptExplicitHydrationTarget(target);
}
};
-var isomorphicReactPackageVersion$jscomp$inline_1818 = React.version;
+var isomorphicReactPackageVersion$jscomp$inline_1849 = React.version;
if (
- "19.1.0-native-fb-a9bbe346-20241219" !==
- isomorphicReactPackageVersion$jscomp$inline_1818
+ "19.1.0-native-fb-a160102f-20250107" !==
+ isomorphicReactPackageVersion$jscomp$inline_1849
)
throw Error(
formatProdErrorMessage(
527,
- isomorphicReactPackageVersion$jscomp$inline_1818,
- "19.1.0-native-fb-a9bbe346-20241219"
+ isomorphicReactPackageVersion$jscomp$inline_1849,
+ "19.1.0-native-fb-a160102f-20250107"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16587,12 +16627,12 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
null === componentOrElement ? null : componentOrElement.stateNode;
return componentOrElement;
};
-var internals$jscomp$inline_1825 = {
+var internals$jscomp$inline_1856 = {
bundleType: 0,
- version: "19.1.0-native-fb-a9bbe346-20241219",
+ version: "19.1.0-native-fb-a160102f-20250107",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.1.0-native-fb-a9bbe346-20241219",
+ reconcilerVersion: "19.1.0-native-fb-a160102f-20250107",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$293 = 0;
@@ -16610,16 +16650,16 @@ var internals$jscomp$inline_1825 = {
}
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
- var hook$jscomp$inline_2240 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+ var hook$jscomp$inline_2264 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
- !hook$jscomp$inline_2240.isDisabled &&
- hook$jscomp$inline_2240.supportsFiber
+ !hook$jscomp$inline_2264.isDisabled &&
+ hook$jscomp$inline_2264.supportsFiber
)
try {
- (rendererID = hook$jscomp$inline_2240.inject(
- internals$jscomp$inline_1825
+ (rendererID = hook$jscomp$inline_2264.inject(
+ internals$jscomp$inline_1856
)),
- (injectedHook = hook$jscomp$inline_2240);
+ (injectedHook = hook$jscomp$inline_2264);
} catch (err) {}
}
function noop() {}
@@ -16867,7 +16907,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
-exports.version = "19.1.0-native-fb-a9bbe346-20241219";
+exports.version = "19.1.0-native-fb-a160102f-20250107";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js
index d0eebde4f0fc2..53b124d659f62 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js
@@ -7,13 +7,13 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<>
+ * @generated SignedSource<<5e15a339630f6d8c8b162765910ced4b>>
*/
"use strict";
__DEV__ &&
(function () {
- function JSCompiler_object_inline_createNodeMock_1165() {
+ function JSCompiler_object_inline_createNodeMock_1167() {
return null;
}
function findHook(fiber, id) {
@@ -80,7 +80,7 @@ __DEV__ &&
}
function scheduleRoot(root, element) {
root.context === emptyContextObject &&
- (0 === root.tag && flushPassiveEffects(),
+ (0 === root.tag && flushPendingEffects(),
updateContainerImpl(root.current, 2, element, root, null, null),
flushSyncWork());
}
@@ -88,7 +88,7 @@ __DEV__ &&
if (null !== resolveFamily) {
var staleFamilies = update.staleFamilies;
update = update.updatedFamilies;
- flushPassiveEffects();
+ flushPendingEffects();
scheduleFibersWithFamiliesRecursively(
root.current,
update,
@@ -712,6 +712,11 @@ __DEV__ &&
function injectProfilingHooks(profilingHooks) {
injectedProfilingHooks = profilingHooks;
}
+ function markCommitStopped() {
+ null !== injectedProfilingHooks &&
+ "function" === typeof injectedProfilingHooks.markCommitStopped &&
+ injectedProfilingHooks.markCommitStopped();
+ }
function markComponentRenderStarted(fiber) {
null !== injectedProfilingHooks &&
"function" ===
@@ -817,14 +822,13 @@ __DEV__ &&
);
}
}
- function getNextLanes(root, wipLanes) {
+ function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0,
suspendedLanes = root.suspendedLanes,
- pingedLanes = root.pingedLanes,
- warmLanes = root.warmLanes;
- root = 0 !== root.finishedLanes;
+ pingedLanes = root.pingedLanes;
+ root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes
? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
@@ -833,28 +837,29 @@ __DEV__ &&
: ((pingedLanes &= nonIdlePendingLanes),
0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
- : root ||
- ((warmLanes = nonIdlePendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes)))))
+ : rootHasPendingCommit ||
+ ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes =
+ getHighestPriorityLanes(rootHasPendingCommit)))))
: ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
0 !== nonIdlePendingLanes
? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
: 0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
- : root ||
- ((warmLanes = pendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes))));
+ : rootHasPendingCommit ||
+ ((rootHasPendingCommit = pendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes
? 0
: 0 !== wipLanes &&
wipLanes !== nextLanes &&
0 === (wipLanes & suspendedLanes) &&
((suspendedLanes = nextLanes & -nextLanes),
- (warmLanes = wipLanes & -wipLanes),
- suspendedLanes >= warmLanes ||
- (32 === suspendedLanes && 0 !== (warmLanes & 4194176)))
+ (rootHasPendingCommit = wipLanes & -wipLanes),
+ suspendedLanes >= rootHasPendingCommit ||
+ (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176)))
? wipLanes
: nextLanes;
}
@@ -935,6 +940,53 @@ __DEV__ &&
(root.pingedLanes = 0),
(root.warmLanes = 0));
}
+ function markRootFinished(
+ root,
+ finishedLanes,
+ remainingLanes,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+ ) {
+ var previouslyPendingLanes = root.pendingLanes;
+ root.pendingLanes = remainingLanes;
+ root.suspendedLanes = 0;
+ root.pingedLanes = 0;
+ root.warmLanes = 0;
+ root.expiredLanes &= remainingLanes;
+ root.entangledLanes &= remainingLanes;
+ root.errorRecoveryDisabledLanes &= remainingLanes;
+ root.shellSuspendCounter = 0;
+ var entanglements = root.entanglements,
+ expirationTimes = root.expirationTimes,
+ hiddenUpdates = root.hiddenUpdates;
+ for (
+ remainingLanes = previouslyPendingLanes & ~remainingLanes;
+ 0 < remainingLanes;
+
+ ) {
+ var index = 31 - clz32(remainingLanes),
+ lane = 1 << index;
+ entanglements[index] = 0;
+ expirationTimes[index] = -1;
+ var hiddenUpdatesForLane = hiddenUpdates[index];
+ if (null !== hiddenUpdatesForLane)
+ for (
+ hiddenUpdates[index] = null, index = 0;
+ index < hiddenUpdatesForLane.length;
+ index++
+ ) {
+ var update = hiddenUpdatesForLane[index];
+ null !== update && (update.lane &= -536870913);
+ }
+ remainingLanes &= ~lane;
+ }
+ 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);
+ 0 !== suspendedRetryLanes &&
+ 0 === updatedLanes &&
+ (root.suspendedLanes |=
+ suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
+ }
function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
root.pendingLanes |= spawnedLane;
root.suspendedLanes &= ~spawnedLane;
@@ -1908,7 +1960,7 @@ __DEV__ &&
"A cache instance was released after it was already freed. This likely indicates a bug in React."
);
0 === cache.refCount &&
- scheduleCallback$1(NormalPriority, function () {
+ scheduleCallback$2(NormalPriority, function () {
cache.controller.abort();
});
}
@@ -1969,11 +2021,9 @@ __DEV__ &&
mightHavePendingSyncWork = !0;
null !== ReactSharedInternals.actQueue
? didScheduleMicrotask_act ||
- ((didScheduleMicrotask_act = !0),
- scheduleImmediateTask(processRootScheduleInMicrotask))
+ ((didScheduleMicrotask_act = !0), scheduleImmediateRootScheduleTask())
: didScheduleMicrotask ||
- ((didScheduleMicrotask = !0),
- scheduleImmediateTask(processRootScheduleInMicrotask));
+ ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());
ReactSharedInternals.isBatchingLegacy &&
0 === root.tag &&
(ReactSharedInternals.didScheduleLegacyUpdate = !0);
@@ -2008,7 +2058,9 @@ __DEV__ &&
(nextLanes = workInProgressRootRenderLanes),
(nextLanes = getNextLanes(
root,
- root === workInProgressRoot ? nextLanes : 0
+ root === workInProgressRoot ? nextLanes : 0,
+ null !== root.cancelPendingCommit ||
+ -1 !== root.timeoutHandle
)),
0 === (nextLanes & 3) ||
checkIfRootIsPrerendering(root, nextLanes) ||
@@ -2020,6 +2072,9 @@ __DEV__ &&
isFlushingWork = !1;
}
}
+ function processRootScheduleInImmediateTask() {
+ processRootScheduleInMicrotask();
+ }
function processRootScheduleInMicrotask() {
mightHavePendingSyncWork =
didScheduleMicrotask_act =
@@ -2061,13 +2116,13 @@ __DEV__ &&
} else expirationTime <= currentTime && (root.expiredLanes |= lane);
lanes &= ~lane;
}
- suspendedLanes = pendingPassiveEffectsLanes;
currentTime = workInProgressRoot;
- pingedLanes = workInProgressRootRenderLanes;
- suspendedLanes =
- root === rootWithPendingPassiveEffects
- ? suspendedLanes
- : getNextLanes(root, root === currentTime ? pingedLanes : 0);
+ suspendedLanes = workInProgressRootRenderLanes;
+ suspendedLanes = getNextLanes(
+ root,
+ root === currentTime ? suspendedLanes : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
+ );
pingedLanes = root.callbackNode;
if (
0 === suspendedLanes ||
@@ -2082,56 +2137,63 @@ __DEV__ &&
(root.callbackPriority = 0)
);
if (
- 0 !== (suspendedLanes & 3) &&
- !checkIfRootIsPrerendering(root, suspendedLanes)
- )
- return (
- null !== pingedLanes && cancelCallback(pingedLanes),
- (root.callbackPriority = 2),
- (root.callbackNode = null),
- 2
- );
- currentTime = suspendedLanes & -suspendedLanes;
- if (
- currentTime !== root.callbackPriority ||
- (null !== ReactSharedInternals.actQueue &&
- pingedLanes !== fakeActCallbackNode)
- )
- cancelCallback(pingedLanes);
- else return currentTime;
- switch (lanesToEventPriority(suspendedLanes)) {
- case DiscreteEventPriority:
- case ContinuousEventPriority:
- suspendedLanes = UserBlockingPriority;
- break;
- case DefaultEventPriority:
- suspendedLanes = NormalPriority$1;
- break;
- case IdleEventPriority:
- suspendedLanes = IdlePriority;
- break;
- default:
- suspendedLanes = NormalPriority$1;
- }
- pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root);
- null !== ReactSharedInternals.actQueue
- ? (ReactSharedInternals.actQueue.push(pingedLanes),
- (suspendedLanes = fakeActCallbackNode))
- : (suspendedLanes = scheduleCallback$2(suspendedLanes, pingedLanes));
- root.callbackPriority = currentTime;
- root.callbackNode = suspendedLanes;
- return currentTime;
+ 0 === (suspendedLanes & 3) ||
+ checkIfRootIsPrerendering(root, suspendedLanes)
+ ) {
+ currentTime = suspendedLanes & -suspendedLanes;
+ if (
+ currentTime !== root.callbackPriority ||
+ (null !== ReactSharedInternals.actQueue &&
+ pingedLanes !== fakeActCallbackNode$1)
+ )
+ cancelCallback(pingedLanes);
+ else return currentTime;
+ switch (lanesToEventPriority(suspendedLanes)) {
+ case DiscreteEventPriority:
+ case ContinuousEventPriority:
+ suspendedLanes = UserBlockingPriority;
+ break;
+ case DefaultEventPriority:
+ suspendedLanes = NormalPriority$1;
+ break;
+ case IdleEventPriority:
+ suspendedLanes = IdlePriority;
+ break;
+ default:
+ suspendedLanes = NormalPriority$1;
+ }
+ pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root);
+ null !== ReactSharedInternals.actQueue
+ ? (ReactSharedInternals.actQueue.push(pingedLanes),
+ (suspendedLanes = fakeActCallbackNode$1))
+ : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes));
+ root.callbackPriority = currentTime;
+ root.callbackNode = suspendedLanes;
+ return currentTime;
+ }
+ null !== pingedLanes && cancelCallback(pingedLanes);
+ root.callbackPriority = 2;
+ root.callbackNode = null;
+ return 2;
}
function performWorkOnRootViaSchedulerTask(root, didTimeout) {
nestedUpdateScheduled = currentUpdateIsNested = !1;
+ if (
+ pendingEffectsStatus !== NO_PENDING_EFFECTS &&
+ pendingEffectsStatus !== PENDING_PASSIVE_PHASE
+ )
+ return (root.callbackNode = null), (root.callbackPriority = 0), null;
var originalCallbackNode = root.callbackNode;
- if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
+ if (flushPendingEffects(!0) && root.callbackNode !== originalCallbackNode)
return null;
var workInProgressRootRenderLanes$jscomp$0 =
workInProgressRootRenderLanes;
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
root,
- root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0
+ root === workInProgressRoot
+ ? workInProgressRootRenderLanes$jscomp$0
+ : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
performWorkOnRoot(
@@ -2146,23 +2208,23 @@ __DEV__ &&
: null;
}
function performSyncWorkOnRoot(root, lanes) {
- if (flushPassiveEffects()) return null;
+ if (flushPendingEffects()) return null;
currentUpdateIsNested = nestedUpdateScheduled;
nestedUpdateScheduled = !1;
performWorkOnRoot(root, lanes, !0);
}
function cancelCallback(callbackNode) {
- callbackNode !== fakeActCallbackNode &&
+ callbackNode !== fakeActCallbackNode$1 &&
null !== callbackNode &&
cancelCallback$1(callbackNode);
}
- function scheduleImmediateTask(cb) {
+ function scheduleImmediateRootScheduleTask() {
null !== ReactSharedInternals.actQueue &&
ReactSharedInternals.actQueue.push(function () {
- cb();
+ processRootScheduleInMicrotask();
return null;
});
- scheduleCallback$2(ImmediatePriority, cb);
+ scheduleCallback$3(ImmediatePriority, processRootScheduleInImmediateTask);
}
function requestTransitionLane() {
0 === currentEventTransitionLane &&
@@ -2948,7 +3010,7 @@ __DEV__ &&
null;
hookTypesUpdateIndexDev = -1;
null !== current &&
- (current.flags & 31457280) !== (workInProgress.flags & 31457280) &&
+ (current.flags & 29360128) !== (workInProgress.flags & 29360128) &&
0 !== (current.mode & 1) &&
error$jscomp$0(
"Internal React error: Expected static flag was missing. Please notify the React team."
@@ -6494,14 +6556,14 @@ __DEV__ &&
if (null === ref)
null !== current &&
null !== current.ref &&
- (workInProgress.flags |= 2097664);
+ (workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
);
if (null === current || current.ref !== ref)
- workInProgress.flags |= 2097664;
+ workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
@@ -7215,7 +7277,7 @@ __DEV__ &&
(nextProps.treeBaseDuration = didSuspend.treeBaseDuration)),
(workInProgress.deletions = null))
: ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)),
- (nextProps.subtreeFlags = didSuspend.subtreeFlags & 31457280));
+ (nextProps.subtreeFlags = didSuspend.subtreeFlags & 29360128));
null !== currentFallbackChildFragment
? (nextPrimaryChildren = createWorkInProgress(
currentFallbackChildFragment,
@@ -8240,8 +8302,8 @@ __DEV__ &&
)
(newChildLanes |= _child2.lanes | _child2.childLanes),
- (subtreeFlags |= _child2.subtreeFlags & 31457280),
- (subtreeFlags |= _child2.flags & 31457280),
+ (subtreeFlags |= _child2.subtreeFlags & 29360128),
+ (subtreeFlags |= _child2.flags & 29360128),
(_treeBaseDuration += _child2.treeBaseDuration),
(_child2 = _child2.sibling);
completedWork.treeBaseDuration = _treeBaseDuration;
@@ -8253,8 +8315,8 @@ __DEV__ &&
)
(newChildLanes |=
_treeBaseDuration.lanes | _treeBaseDuration.childLanes),
- (subtreeFlags |= _treeBaseDuration.subtreeFlags & 31457280),
- (subtreeFlags |= _treeBaseDuration.flags & 31457280),
+ (subtreeFlags |= _treeBaseDuration.subtreeFlags & 29360128),
+ (subtreeFlags |= _treeBaseDuration.flags & 29360128),
(_treeBaseDuration.return = completedWork),
(_treeBaseDuration = _treeBaseDuration.sibling);
else if (0 !== (completedWork.mode & 2)) {
@@ -9366,6 +9428,56 @@ __DEV__ &&
);
}
}
+ function commitBeforeMutationEffects(root, firstChild) {
+ for (nextEffect = firstChild; null !== nextEffect; )
+ if (
+ ((root = nextEffect),
+ (firstChild = root.child),
+ 0 !== (root.subtreeFlags & 1024) && null !== firstChild)
+ )
+ (firstChild.return = root), (nextEffect = firstChild);
+ else
+ for (; null !== nextEffect; ) {
+ firstChild = root = nextEffect;
+ var current = firstChild.alternate,
+ flags = firstChild.flags;
+ switch (firstChild.tag) {
+ case 0:
+ break;
+ case 11:
+ case 15:
+ break;
+ case 1:
+ 0 !== (flags & 1024) &&
+ null !== current &&
+ commitClassSnapshot(firstChild, current);
+ break;
+ case 3:
+ 0 !== (flags & 1024) &&
+ firstChild.stateNode.containerInfo.children.splice(0);
+ break;
+ case 5:
+ case 26:
+ case 27:
+ case 6:
+ case 4:
+ case 17:
+ break;
+ default:
+ if (0 !== (flags & 1024))
+ throw Error(
+ "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
+ );
+ }
+ firstChild = root.sibling;
+ if (null !== firstChild) {
+ firstChild.return = root.return;
+ nextEffect = firstChild;
+ break;
+ }
+ nextEffect = root.return;
+ }
+ }
function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
var flags = finishedWork.flags;
switch (finishedWork.tag) {
@@ -10369,6 +10481,14 @@ __DEV__ &&
flags & 2048 &&
commitHookPassiveMountEffects(finishedWork, Passive | HasEffect);
break;
+ case 1:
+ recursivelyTraversePassiveMountEffects(
+ finishedRoot,
+ finishedWork,
+ committedLanes,
+ committedTransitions
+ );
+ break;
case 3:
var prevEffectDuration = pushNestedEffectDurations();
recursivelyTraversePassiveMountEffects(
@@ -11098,21 +11218,17 @@ __DEV__ &&
default:
throw Error("Unknown root exit status.");
}
- shouldTimeSlice.finishedWork = forceSync;
- shouldTimeSlice.finishedLanes = lanes;
if (null !== ReactSharedInternals.actQueue)
commitRoot(
shouldTimeSlice,
+ forceSync,
+ lanes,
workInProgressRootRecoverableErrors,
workInProgressTransitions,
workInProgressRootDidIncludeRecursiveRenderUpdate,
workInProgressDeferredLane,
workInProgressRootInterleavedUpdatedLanes,
- workInProgressSuspendedRetryLanes,
- exitStatus,
- IMMEDIATE_COMMIT,
- -0,
- 0
+ workInProgressSuspendedRetryLanes
);
else {
if (
@@ -11130,7 +11246,7 @@ __DEV__ &&
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
- if (0 !== getNextLanes(shouldTimeSlice, 0)) break a;
+ if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;
shouldTimeSlice.timeoutHandle = scheduleTimeout(
commitRootWhenReady.bind(
null,
@@ -11185,28 +11301,22 @@ __DEV__ &&
lanes,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- didSkipSuspendedSiblings,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
+ suspendedRetryLanes
) {
- lanes = finishedWork.subtreeFlags;
- (lanes & 8192 || 16785408 === (lanes & 16785408)) &&
+ root.timeoutHandle = -1;
+ var subtreeFlags = finishedWork.subtreeFlags;
+ (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) &&
accumulateSuspenseyCommitOnFiber(finishedWork);
commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
+ suspendedRetryLanes
);
}
function isRenderConsistentWithExternalStores(finishedWork) {
@@ -11265,10 +11375,10 @@ __DEV__ &&
markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);
}
function flushSyncFromReconciler(fn) {
- null !== rootWithPendingPassiveEffects &&
- 0 === rootWithPendingPassiveEffects.tag &&
+ pendingEffectsStatus !== NO_PENDING_EFFECTS &&
+ 0 === pendingEffectsRoot.tag &&
(executionContext & (RenderContext | CommitContext)) === NoContext &&
- flushPassiveEffects();
+ flushPendingEffects();
var prevExecutionContext = executionContext;
executionContext |= 1;
var prevTransition = ReactSharedInternals.T,
@@ -11311,8 +11421,6 @@ __DEV__ &&
}
}
function prepareFreshStack(root, lanes) {
- root.finishedWork = null;
- root.finishedLanes = 0;
var timeoutHandle = root.timeoutHandle;
-1 !== timeoutHandle &&
((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
@@ -11647,7 +11755,7 @@ __DEV__ &&
}
null !== ReactSharedInternals.actQueue
? workLoopSync()
- : workLoopConcurrent();
+ : workLoopConcurrentByScheduler();
break;
} catch (thrownValue$34) {
handleThrow(root, thrownValue$34);
@@ -11670,7 +11778,7 @@ __DEV__ &&
finishQueueingConcurrentUpdates();
return workInProgressRootExitStatus;
}
- function workLoopConcurrent() {
+ function workLoopConcurrentByScheduler() {
for (; null !== workInProgress && !shouldYield(); )
performUnitOfWork(workInProgress);
}
@@ -11877,7 +11985,9 @@ __DEV__ &&
workInProgress = null;
}
function commitRoot(
- root$jscomp$0,
+ root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
@@ -11885,213 +11995,199 @@ __DEV__ &&
updatedLanes,
suspendedRetryLanes
) {
- didIncludeRenderPhaseUpdate = ReactSharedInternals.T;
- var previousUpdateLanePriority = currentUpdatePriority;
- try {
- currentUpdatePriority = DiscreteEventPriority;
- ReactSharedInternals.T = null;
- do flushPassiveEffects();
- while (null !== rootWithPendingPassiveEffects);
- ReactStrictModeWarnings.flushLegacyContextWarning();
- ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
- if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
- throw Error("Should not already be working.");
- var finishedWork = root$jscomp$0.finishedWork,
- lanes = root$jscomp$0.finishedLanes;
- null !== injectedProfilingHooks &&
- "function" === typeof injectedProfilingHooks.markCommitStarted &&
- injectedProfilingHooks.markCommitStarted(lanes);
- if (null !== finishedWork) {
- 0 === lanes &&
- error$jscomp$0(
- "root.finishedLanes should not be empty during a commit. This is a bug in React."
- );
- root$jscomp$0.finishedWork = null;
- root$jscomp$0.finishedLanes = 0;
- if (finishedWork === root$jscomp$0.current)
- throw Error(
- "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
- );
- var remainingLanes = finishedWork.lanes | finishedWork.childLanes,
- remainingLanes$jscomp$0 = (remainingLanes |=
- concurrentlyUpdatedLanes),
- previouslyPendingLanes = root$jscomp$0.pendingLanes;
- root$jscomp$0.pendingLanes = remainingLanes$jscomp$0;
- root$jscomp$0.suspendedLanes = 0;
- root$jscomp$0.pingedLanes = 0;
- root$jscomp$0.warmLanes = 0;
- root$jscomp$0.expiredLanes &= remainingLanes$jscomp$0;
- root$jscomp$0.entangledLanes &= remainingLanes$jscomp$0;
- root$jscomp$0.errorRecoveryDisabledLanes &= remainingLanes$jscomp$0;
- root$jscomp$0.shellSuspendCounter = 0;
- var entanglements = root$jscomp$0.entanglements,
- expirationTimes = root$jscomp$0.expirationTimes,
- hiddenUpdates = root$jscomp$0.hiddenUpdates;
- for (
- remainingLanes$jscomp$0 =
- previouslyPendingLanes & ~remainingLanes$jscomp$0;
- 0 < remainingLanes$jscomp$0;
-
- ) {
- var index = 31 - clz32(remainingLanes$jscomp$0),
- lane = 1 << index;
- entanglements[index] = 0;
- expirationTimes[index] = -1;
- var hiddenUpdatesForLane = hiddenUpdates[index];
- if (null !== hiddenUpdatesForLane) {
- hiddenUpdates[index] = null;
- for (var i = 0; i < hiddenUpdatesForLane.length; i++) {
- var update = hiddenUpdatesForLane[i];
- null !== update && (update.lane &= -536870913);
- }
- }
- remainingLanes$jscomp$0 &= ~lane;
+ root.cancelPendingCommit = null;
+ do flushPendingEffects();
+ while (pendingEffectsStatus !== NO_PENDING_EFFECTS);
+ ReactStrictModeWarnings.flushLegacyContextWarning();
+ ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
+ if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
+ throw Error("Should not already be working.");
+ null !== injectedProfilingHooks &&
+ "function" === typeof injectedProfilingHooks.markCommitStarted &&
+ injectedProfilingHooks.markCommitStarted(lanes);
+ if (null === finishedWork) markCommitStopped();
+ else {
+ 0 === lanes &&
+ error$jscomp$0(
+ "finishedLanes should not be empty during a commit. This is a bug in React."
+ );
+ if (finishedWork === root.current)
+ throw Error(
+ "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ );
+ didIncludeRenderPhaseUpdate =
+ finishedWork.lanes | finishedWork.childLanes;
+ didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
+ markRootFinished(
+ root,
+ lanes,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+ );
+ root === workInProgressRoot &&
+ ((workInProgress = workInProgressRoot = null),
+ (workInProgressRootRenderLanes = 0));
+ pendingFinishedWork = finishedWork;
+ pendingEffectsRoot = root;
+ pendingEffectsLanes = lanes;
+ pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
+ pendingPassiveTransitions = transitions;
+ pendingRecoverableErrors = recoverableErrors;
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? ((root.callbackNode = null),
+ (root.callbackPriority = 0),
+ scheduleCallback(NormalPriority$1, function () {
+ flushPassiveEffects(!0);
+ return null;
+ }))
+ : ((root.callbackNode = null), (root.callbackPriority = 0));
+ commitStartTime = now();
+ lanes = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || lanes) {
+ lanes = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ recoverableErrors = currentUpdatePriority;
+ currentUpdatePriority = DiscreteEventPriority;
+ transitions = executionContext;
+ executionContext |= CommitContext;
+ try {
+ commitBeforeMutationEffects(root, finishedWork);
+ } finally {
+ (executionContext = transitions),
+ (currentUpdatePriority = recoverableErrors),
+ (ReactSharedInternals.T = lanes);
}
- 0 !== spawnedLane &&
- markSpawnedDeferredLane(root$jscomp$0, spawnedLane, 0);
- 0 !== suspendedRetryLanes &&
- 0 === updatedLanes &&
- (root$jscomp$0.suspendedLanes |=
- suspendedRetryLanes & ~(previouslyPendingLanes & ~lanes));
- root$jscomp$0 === workInProgressRoot &&
- ((workInProgress = workInProgressRoot = null),
- (workInProgressRootRenderLanes = 0));
- spawnedLane = !1;
- 0 !== (finishedWork.subtreeFlags & 10256) ||
- 0 !== (finishedWork.flags & 10256)
- ? ((spawnedLane = !0),
- (pendingPassiveEffectsRemainingLanes = remainingLanes),
- (pendingPassiveTransitions = transitions))
- : ((root$jscomp$0.callbackNode = null),
- (root$jscomp$0.callbackPriority = 0),
- (root$jscomp$0.cancelPendingCommit = null));
- commitStartTime = now();
- var rootHasEffect = 0 !== (finishedWork.flags & 15990);
- if (0 !== (finishedWork.subtreeFlags & 15990) || rootHasEffect) {
- var prevTransition = ReactSharedInternals.T;
- ReactSharedInternals.T = null;
- transitions = currentUpdatePriority;
- currentUpdatePriority = DiscreteEventPriority;
- rootHasEffect = executionContext;
- executionContext |= CommitContext;
- for (nextEffect = finishedWork; null !== nextEffect; ) {
- updatedLanes = nextEffect;
- var child = updatedLanes.child;
- if (0 !== (updatedLanes.subtreeFlags & 1028) && null !== child)
- (child.return = updatedLanes), (nextEffect = child);
- else
- b: for (; null !== nextEffect; ) {
- suspendedRetryLanes = updatedLanes = nextEffect;
- var current = suspendedRetryLanes.alternate,
- flags = suspendedRetryLanes.flags;
- switch (suspendedRetryLanes.tag) {
- case 0:
- break;
- case 11:
- case 15:
- break;
- case 1:
- 0 !== (flags & 1024) &&
- null !== current &&
- commitClassSnapshot(suspendedRetryLanes, current);
- break;
- case 3:
- 0 !== (flags & 1024) &&
- suspendedRetryLanes.stateNode.containerInfo.children.splice(
- 0
- );
- break;
- case 5:
- case 26:
- case 27:
- case 6:
- case 4:
- case 17:
- break;
- default:
- if (0 !== (flags & 1024))
- throw Error(
- "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
- );
- }
- var sibling = updatedLanes.sibling;
- if (null !== sibling) {
- sibling.return = updatedLanes.return;
- nextEffect = sibling;
- break b;
- }
- nextEffect = updatedLanes.return;
- }
- }
- commitMutationEffectsOnFiber(finishedWork, root$jscomp$0);
- root$jscomp$0.current = finishedWork;
+ }
+ pendingEffectsStatus = PENDING_MUTATION_PHASE;
+ flushMutationEffects();
+ flushLayoutEffects();
+ }
+ }
+ function flushMutationEffects() {
+ if (pendingEffectsStatus === PENDING_MUTATION_PHASE) {
+ pendingEffectsStatus = NO_PENDING_EFFECTS;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
+ if (
+ 0 !== (finishedWork.subtreeFlags & 13878) ||
+ rootMutationHasEffect
+ ) {
+ rootMutationHasEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = DiscreteEventPriority;
+ var prevExecutionContext = executionContext;
+ executionContext |= CommitContext;
+ try {
+ commitMutationEffectsOnFiber(finishedWork, root);
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootMutationHasEffect);
+ }
+ }
+ root.current = finishedWork;
+ pendingEffectsStatus = PENDING_LAYOUT_PHASE;
+ }
+ }
+ function flushLayoutEffects() {
+ if (pendingEffectsStatus === PENDING_LAYOUT_PHASE) {
+ pendingEffectsStatus = NO_PENDING_EFFECTS;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ recoverableErrors = pendingRecoverableErrors,
+ rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
+ if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
+ rootHasLayoutEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = DiscreteEventPriority;
+ var prevExecutionContext = executionContext;
+ executionContext |= CommitContext;
+ try {
null !== injectedProfilingHooks &&
"function" ===
typeof injectedProfilingHooks.markLayoutEffectsStarted &&
- injectedProfilingHooks.markLayoutEffectsStarted(lanes);
- commitLayoutEffectOnFiber(
- root$jscomp$0,
- finishedWork.alternate,
- finishedWork
- );
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markLayoutEffectsStopped &&
- injectedProfilingHooks.markLayoutEffectsStopped();
- requestPaint();
- executionContext = rootHasEffect;
- currentUpdatePriority = transitions;
- ReactSharedInternals.T = prevTransition;
- } else root$jscomp$0.current = finishedWork;
- (prevTransition = spawnedLane)
- ? ((rootWithPendingPassiveEffects = root$jscomp$0),
- (pendingPassiveEffectsLanes = lanes))
- : (releaseRootPooledCache(root$jscomp$0, remainingLanes),
- (nestedPassiveUpdateCount = 0),
- (rootWithPassiveNestedUpdates = null));
- remainingLanes = root$jscomp$0.pendingLanes;
- 0 === remainingLanes &&
- (legacyErrorBoundariesThatAlreadyFailed = null);
- prevTransition || commitDoubleInvokeEffectsInDEV(root$jscomp$0, !1);
- var root = finishedWork.stateNode;
- if (
- injectedHook &&
- "function" === typeof injectedHook.onCommitFiberRoot
- )
- try {
- var didError = 128 === (root.current.flags & 128);
- switch (previousUpdateLanePriority) {
- case DiscreteEventPriority:
- var schedulerPriority = ImmediatePriority;
- break;
- case ContinuousEventPriority:
- schedulerPriority = UserBlockingPriority;
- break;
- case DefaultEventPriority:
- schedulerPriority = NormalPriority$1;
- break;
- case IdleEventPriority:
- schedulerPriority = IdlePriority;
- break;
- default:
- schedulerPriority = NormalPriority$1;
- }
- injectedHook.onCommitFiberRoot(
- rendererID,
+ injectedProfilingHooks.markLayoutEffectsStarted(lanes),
+ commitLayoutEffectOnFiber(
root,
- schedulerPriority,
- didError
- );
- } catch (err) {
- hasLoggedError ||
- ((hasLoggedError = !0),
- error$jscomp$0(
- "React instrumentation encountered an error: %s",
- err
- ));
+ finishedWork.alternate,
+ finishedWork
+ ),
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStopped &&
+ injectedProfilingHooks.markLayoutEffectsStopped();
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootHasLayoutEffect);
+ }
+ }
+ requestPaint();
+ (rootHasLayoutEffect =
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256))
+ ? (pendingEffectsStatus = PENDING_PASSIVE_PHASE)
+ : ((pendingEffectsStatus = NO_PENDING_EFFECTS),
+ (pendingEffectsRoot = null),
+ releaseRootPooledCache(root, root.pendingLanes),
+ (nestedPassiveUpdateCount = 0),
+ (rootWithPassiveNestedUpdates = null));
+ previousPriority = root.pendingLanes;
+ 0 === previousPriority &&
+ (legacyErrorBoundariesThatAlreadyFailed = null);
+ rootHasLayoutEffect || commitDoubleInvokeEffectsInDEV(root, !1);
+ rootHasLayoutEffect = lanesToEventPriority(lanes);
+ finishedWork = finishedWork.stateNode;
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onCommitFiberRoot
+ )
+ try {
+ var didError = 128 === (finishedWork.current.flags & 128);
+ switch (rootHasLayoutEffect) {
+ case DiscreteEventPriority:
+ var schedulerPriority = ImmediatePriority;
+ break;
+ case ContinuousEventPriority:
+ schedulerPriority = UserBlockingPriority;
+ break;
+ case DefaultEventPriority:
+ schedulerPriority = NormalPriority$1;
+ break;
+ case IdleEventPriority:
+ schedulerPriority = IdlePriority;
+ break;
+ default:
+ schedulerPriority = NormalPriority$1;
}
- if (null !== recoverableErrors) {
- var onRecoverableError = root$jscomp$0.onRecoverableError;
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ finishedWork,
+ schedulerPriority,
+ didError
+ );
+ } catch (err) {
+ hasLoggedError ||
+ ((hasLoggedError = !0),
+ error$jscomp$0(
+ "React instrumentation encountered an error: %s",
+ err
+ ));
+ }
+ if (null !== recoverableErrors) {
+ didError = ReactSharedInternals.T;
+ schedulerPriority = currentUpdatePriority;
+ currentUpdatePriority = DiscreteEventPriority;
+ ReactSharedInternals.T = null;
+ try {
+ var onRecoverableError = root.onRecoverableError;
for (
finishedWork = 0;
finishedWork < recoverableErrors.length;
@@ -12106,27 +12202,24 @@ __DEV__ &&
errorInfo
);
}
+ } finally {
+ (ReactSharedInternals.T = didError),
+ (currentUpdatePriority = schedulerPriority);
}
- 0 !== (pendingPassiveEffectsLanes & 3) &&
- 0 !== root$jscomp$0.tag &&
- flushPassiveEffects();
- ensureRootIsScheduled(root$jscomp$0);
- remainingLanes = root$jscomp$0.pendingLanes;
- 0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)
- ? ((nestedUpdateScheduled = !0),
- root$jscomp$0 === rootWithNestedUpdates
- ? nestedUpdateCount++
- : ((nestedUpdateCount = 0),
- (rootWithNestedUpdates = root$jscomp$0)))
- : (nestedUpdateCount = 0);
- flushSyncWorkAcrossRoots_impl(0, !1);
}
- null !== injectedProfilingHooks &&
- "function" === typeof injectedProfilingHooks.markCommitStopped &&
- injectedProfilingHooks.markCommitStopped();
- } finally {
- (ReactSharedInternals.T = didIncludeRenderPhaseUpdate),
- (currentUpdatePriority = previousUpdateLanePriority);
+ 0 !== (pendingEffectsLanes & 3) &&
+ 0 !== root.tag &&
+ flushPendingEffects();
+ ensureRootIsScheduled(root);
+ previousPriority = root.pendingLanes;
+ 0 !== (lanes & 4194218) && 0 !== (previousPriority & 42)
+ ? ((nestedUpdateScheduled = !0),
+ root === rootWithNestedUpdates
+ ? nestedUpdateCount++
+ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
+ : (nestedUpdateCount = 0);
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ markCommitStopped();
}
}
function makeErrorInfo(componentStack) {
@@ -12146,98 +12239,87 @@ __DEV__ &&
null != remainingLanes &&
((root.pooledCache = null), releaseCache(remainingLanes)));
}
+ function flushPendingEffects(wasDelayedCommit) {
+ flushMutationEffects();
+ flushLayoutEffects();
+ return flushPassiveEffects(wasDelayedCommit);
+ }
function flushPassiveEffects() {
- if (null !== rootWithPendingPassiveEffects) {
- var root = rootWithPendingPassiveEffects,
- remainingLanes = pendingPassiveEffectsRemainingLanes;
- pendingPassiveEffectsRemainingLanes = 0;
- var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
- priority =
- 0 === DefaultEventPriority || DefaultEventPriority > renderPriority
- ? DefaultEventPriority
- : renderPriority;
- renderPriority = ReactSharedInternals.T;
- var previousPriority = currentUpdatePriority;
- try {
- currentUpdatePriority = priority;
- ReactSharedInternals.T = null;
- if (null === rootWithPendingPassiveEffects)
- var JSCompiler_inline_result = !1;
- else {
- priority = pendingPassiveTransitions;
- pendingPassiveTransitions = null;
- var root$jscomp$0 = rootWithPendingPassiveEffects,
- lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsLanes = 0;
- root$jscomp$0.callbackNode = null;
- root$jscomp$0.callbackPriority = 0;
- root$jscomp$0.cancelPendingCommit = null;
- if (
- (executionContext & (RenderContext | CommitContext)) !==
- NoContext
- )
- throw Error(
- "Cannot flush passive effects while already rendering."
- );
- isFlushingPassiveEffects = !0;
- didScheduleUpdateDuringPassiveEffects = !1;
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStarted &&
- injectedProfilingHooks.markPassiveEffectsStarted(lanes);
- var prevExecutionContext = executionContext;
- executionContext |= CommitContext;
- commitPassiveUnmountOnFiber(root$jscomp$0.current);
- commitPassiveMountOnFiber(
- root$jscomp$0,
- root$jscomp$0.current,
- lanes,
- priority
- );
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStopped &&
- injectedProfilingHooks.markPassiveEffectsStopped();
- commitDoubleInvokeEffectsInDEV(root$jscomp$0, !0);
- executionContext = prevExecutionContext;
- flushSyncWorkAcrossRoots_impl(0, !1);
- didScheduleUpdateDuringPassiveEffects
- ? root$jscomp$0 === rootWithPassiveNestedUpdates
- ? nestedPassiveUpdateCount++
- : ((nestedPassiveUpdateCount = 0),
- (rootWithPassiveNestedUpdates = root$jscomp$0))
- : (nestedPassiveUpdateCount = 0);
- didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects =
- !1;
- ensureRootIsScheduled(root$jscomp$0);
- if (
- injectedHook &&
- "function" === typeof injectedHook.onPostCommitFiberRoot
- )
- try {
- injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
- } catch (err) {
- hasLoggedError ||
- ((hasLoggedError = !0),
- error$jscomp$0(
- "React instrumentation encountered an error: %s",
- err
- ));
- }
- var stateNode = root$jscomp$0.current.stateNode;
- stateNode.effectDuration = 0;
- stateNode.passiveEffectDuration = 0;
- JSCompiler_inline_result = !0;
+ if (pendingEffectsStatus !== PENDING_PASSIVE_PHASE) return !1;
+ var root = pendingEffectsRoot,
+ remainingLanes = pendingEffectsRemainingLanes;
+ pendingEffectsRemainingLanes = 0;
+ var renderPriority = lanesToEventPriority(pendingEffectsLanes),
+ priority =
+ 0 === DefaultEventPriority || DefaultEventPriority > renderPriority
+ ? DefaultEventPriority
+ : renderPriority;
+ renderPriority = ReactSharedInternals.T;
+ var previousPriority = currentUpdatePriority;
+ try {
+ currentUpdatePriority = priority;
+ ReactSharedInternals.T = null;
+ priority = pendingPassiveTransitions;
+ pendingPassiveTransitions = null;
+ var root$jscomp$0 = pendingEffectsRoot,
+ lanes = pendingEffectsLanes;
+ pendingEffectsStatus = NO_PENDING_EFFECTS;
+ pendingEffectsRoot = null;
+ pendingEffectsLanes = 0;
+ if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
+ throw Error("Cannot flush passive effects while already rendering.");
+ isFlushingPassiveEffects = !0;
+ didScheduleUpdateDuringPassiveEffects = !1;
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markPassiveEffectsStarted &&
+ injectedProfilingHooks.markPassiveEffectsStarted(lanes);
+ var prevExecutionContext = executionContext;
+ executionContext |= CommitContext;
+ commitPassiveUnmountOnFiber(root$jscomp$0.current);
+ commitPassiveMountOnFiber(
+ root$jscomp$0,
+ root$jscomp$0.current,
+ lanes,
+ priority
+ );
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markPassiveEffectsStopped &&
+ injectedProfilingHooks.markPassiveEffectsStopped();
+ commitDoubleInvokeEffectsInDEV(root$jscomp$0, !0);
+ executionContext = prevExecutionContext;
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ didScheduleUpdateDuringPassiveEffects
+ ? root$jscomp$0 === rootWithPassiveNestedUpdates
+ ? nestedPassiveUpdateCount++
+ : ((nestedPassiveUpdateCount = 0),
+ (rootWithPassiveNestedUpdates = root$jscomp$0))
+ : (nestedPassiveUpdateCount = 0);
+ didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects = !1;
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
+ } catch (err) {
+ hasLoggedError ||
+ ((hasLoggedError = !0),
+ error$jscomp$0(
+ "React instrumentation encountered an error: %s",
+ err
+ ));
}
- return JSCompiler_inline_result;
- } finally {
- (currentUpdatePriority = previousPriority),
- (ReactSharedInternals.T = renderPriority),
- releaseRootPooledCache(root, remainingLanes);
- }
+ var stateNode = root$jscomp$0.current.stateNode;
+ stateNode.effectDuration = 0;
+ stateNode.passiveEffectDuration = 0;
+ return !0;
+ } finally {
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = renderPriority),
+ releaseRootPooledCache(root, remainingLanes);
}
- return !1;
}
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
@@ -12495,6 +12577,12 @@ __DEV__ &&
}
}
}
+ function scheduleCallback(priorityLevel, callback) {
+ var actQueue = ReactSharedInternals.actQueue;
+ return null !== actQueue
+ ? (actQueue.push(callback), fakeActCallbackNode)
+ : scheduleCallback$3(priorityLevel, callback);
+ }
function warnIfUpdatesNotWrappedWithActDEV(fiber) {
if (fiber.mode & 1) {
if (!isConcurrentActEnvironment()) return;
@@ -12693,7 +12781,7 @@ __DEV__ &&
(workInProgress.deletions = null),
(workInProgress.actualDuration = -0),
(workInProgress.actualStartTime = -1.1));
- workInProgress.flags = current.flags & 31457280;
+ workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -12731,7 +12819,7 @@ __DEV__ &&
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
- workInProgress.flags &= 31457282;
+ workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
@@ -12985,11 +13073,7 @@ __DEV__ &&
) {
this.tag = tag;
this.containerInfo = containerInfo;
- this.finishedWork =
- this.pingCache =
- this.current =
- this.pendingChildren =
- null;
+ this.pingCache = this.current = this.pendingChildren = null;
this.timeoutHandle = -1;
this.callbackNode =
this.next =
@@ -13002,7 +13086,6 @@ __DEV__ &&
this.entangledLanes =
this.shellSuspendCounter =
this.errorRecoveryDisabledLanes =
- this.finishedLanes =
this.expiredLanes =
this.warmLanes =
this.pingedLanes =
@@ -13423,7 +13506,7 @@ __DEV__ &&
var current = null,
isRendering = !1,
isArrayImpl = Array.isArray,
- scheduleCallback$2 = Scheduler$1.unstable_scheduleCallback,
+ scheduleCallback$3 = Scheduler$1.unstable_scheduleCallback,
cancelCallback$1 = Scheduler$1.unstable_cancelCallback,
shouldYield = Scheduler$1.unstable_shouldYield,
requestPaint = Scheduler$1.unstable_requestPaint,
@@ -13516,7 +13599,7 @@ __DEV__ &&
});
};
},
- scheduleCallback$1 = Scheduler$1.unstable_scheduleCallback,
+ scheduleCallback$2 = Scheduler$1.unstable_scheduleCallback,
NormalPriority = Scheduler$1.unstable_NormalPriority,
CacheContext = {
$$typeof: REACT_CONTEXT_TYPE,
@@ -13541,7 +13624,7 @@ __DEV__ &&
mightHavePendingSyncWork = !1,
isFlushingWork = !1,
currentEventTransitionLane = 0,
- fakeActCallbackNode = {},
+ fakeActCallbackNode$1 = {},
currentEntangledListeners = null,
currentEntangledPendingCount = 0,
currentEntangledLane = 0,
@@ -15300,10 +15383,19 @@ __DEV__ &&
RENDER_TIMEOUT_MS = 500,
workInProgressTransitions = null,
legacyErrorBoundariesThatAlreadyFailed = null,
- rootWithPendingPassiveEffects = null,
- pendingPassiveEffectsLanes = 0,
- pendingPassiveEffectsRemainingLanes = 0,
+ IMMEDIATE_COMMIT = 0,
+ THROTTLED_COMMIT = 2,
+ NO_PENDING_EFFECTS = 0,
+ PENDING_MUTATION_PHASE = 1,
+ PENDING_LAYOUT_PHASE = 2,
+ PENDING_PASSIVE_PHASE = 3,
+ pendingEffectsStatus = 0,
+ pendingEffectsRoot = null,
+ pendingFinishedWork = null,
+ pendingEffectsLanes = 0,
+ pendingEffectsRemainingLanes = 0,
pendingPassiveTransitions = null,
+ pendingRecoverableErrors = null,
NESTED_UPDATE_LIMIT = 50,
nestedUpdateCount = 0,
rootWithNestedUpdates = null,
@@ -15313,12 +15405,11 @@ __DEV__ &&
nestedPassiveUpdateCount = 0,
rootWithPassiveNestedUpdates = null,
isRunningInsertionEffect = !1,
- IMMEDIATE_COMMIT = 0,
- THROTTLED_COMMIT = 2,
didWarnStateUpdateForNotYetMountedComponent = null,
didWarnAboutUpdateInRender = !1;
var didWarnAboutUpdateInRenderForAnotherComponent = new Set();
- var resolveFamily = null,
+ var fakeActCallbackNode = {},
+ resolveFamily = null,
failedBoundaries = null;
var hasBadMapPolyfill = !1;
try {
@@ -15531,10 +15622,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
- version: "19.1.0-native-fb-a9bbe346-20241219",
+ version: "19.1.0-native-fb-a160102f-20250107",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.1.0-native-fb-a9bbe346-20241219"
+ reconcilerVersion: "19.1.0-native-fb-a160102f-20250107"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -15556,7 +15647,7 @@ __DEV__ &&
exports._Scheduler = Scheduler;
exports.act = act;
exports.create = function (element, options) {
- var createNodeMock = JSCompiler_object_inline_createNodeMock_1165,
+ var createNodeMock = JSCompiler_object_inline_createNodeMock_1167,
isConcurrent = !1,
isStrictMode = !1;
"object" === typeof options &&
@@ -15679,5 +15770,5 @@ __DEV__ &&
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
- exports.version = "19.1.0-native-fb-a9bbe346-20241219";
+ exports.version = "19.1.0-native-fb-a160102f-20250107";
})();
diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js
index 026628bb2ba38..96a12184c2c53 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<>
+ * @generated SignedSource<<498db639b0acba0d4c5899c422078ea0>>
*/
"use strict";
@@ -448,7 +448,7 @@ function findCurrentFiberUsingSlowPath(fiber) {
return a.stateNode.current === a ? fiber : alternate;
}
var isArrayImpl = Array.isArray,
- scheduleCallback$2 = Scheduler$1.unstable_scheduleCallback,
+ scheduleCallback$3 = Scheduler$1.unstable_scheduleCallback,
cancelCallback$1 = Scheduler$1.unstable_cancelCallback,
shouldYield = Scheduler$1.unstable_shouldYield,
requestPaint = Scheduler$1.unstable_requestPaint,
@@ -530,14 +530,13 @@ function getHighestPriorityLanes(lanes) {
return lanes;
}
}
-function getNextLanes(root, wipLanes) {
+function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0,
suspendedLanes = root.suspendedLanes,
- pingedLanes = root.pingedLanes,
- warmLanes = root.warmLanes;
- root = 0 !== root.finishedLanes;
+ pingedLanes = root.pingedLanes;
+ root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes
? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
@@ -546,28 +545,28 @@ function getNextLanes(root, wipLanes) {
: ((pingedLanes &= nonIdlePendingLanes),
0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
- : root ||
- ((warmLanes = nonIdlePendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes)))))
+ : rootHasPendingCommit ||
+ ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))))
: ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
0 !== nonIdlePendingLanes
? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
: 0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
- : root ||
- ((warmLanes = pendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes))));
+ : rootHasPendingCommit ||
+ ((rootHasPendingCommit = pendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes
? 0
: 0 !== wipLanes &&
wipLanes !== nextLanes &&
0 === (wipLanes & suspendedLanes) &&
((suspendedLanes = nextLanes & -nextLanes),
- (warmLanes = wipLanes & -wipLanes),
- suspendedLanes >= warmLanes ||
- (32 === suspendedLanes && 0 !== (warmLanes & 4194176)))
+ (rootHasPendingCommit = wipLanes & -wipLanes),
+ suspendedLanes >= rootHasPendingCommit ||
+ (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176)))
? wipLanes
: nextLanes;
}
@@ -641,6 +640,53 @@ function markRootUpdated$1(root, updateLane) {
268435456 !== updateLane &&
((root.suspendedLanes = 0), (root.pingedLanes = 0), (root.warmLanes = 0));
}
+function markRootFinished(
+ root,
+ finishedLanes,
+ remainingLanes,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+) {
+ var previouslyPendingLanes = root.pendingLanes;
+ root.pendingLanes = remainingLanes;
+ root.suspendedLanes = 0;
+ root.pingedLanes = 0;
+ root.warmLanes = 0;
+ root.expiredLanes &= remainingLanes;
+ root.entangledLanes &= remainingLanes;
+ root.errorRecoveryDisabledLanes &= remainingLanes;
+ root.shellSuspendCounter = 0;
+ var entanglements = root.entanglements,
+ expirationTimes = root.expirationTimes,
+ hiddenUpdates = root.hiddenUpdates;
+ for (
+ remainingLanes = previouslyPendingLanes & ~remainingLanes;
+ 0 < remainingLanes;
+
+ ) {
+ var index$7 = 31 - clz32(remainingLanes),
+ lane = 1 << index$7;
+ entanglements[index$7] = 0;
+ expirationTimes[index$7] = -1;
+ var hiddenUpdatesForLane = hiddenUpdates[index$7];
+ if (null !== hiddenUpdatesForLane)
+ for (
+ hiddenUpdates[index$7] = null, index$7 = 0;
+ index$7 < hiddenUpdatesForLane.length;
+ index$7++
+ ) {
+ var update = hiddenUpdatesForLane[index$7];
+ null !== update && (update.lane &= -536870913);
+ }
+ remainingLanes &= ~lane;
+ }
+ 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);
+ 0 !== suspendedRetryLanes &&
+ 0 === updatedLanes &&
+ (root.suspendedLanes |=
+ suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
+}
function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
root.pendingLanes |= spawnedLane;
root.suspendedLanes &= ~spawnedLane;
@@ -1073,7 +1119,7 @@ var AbortControllerLocal =
});
};
},
- scheduleCallback$1 = Scheduler$1.unstable_scheduleCallback,
+ scheduleCallback$2 = Scheduler$1.unstable_scheduleCallback,
NormalPriority = Scheduler$1.unstable_NormalPriority,
CacheContext = {
$$typeof: REACT_CONTEXT_TYPE,
@@ -1093,7 +1139,7 @@ function createCache() {
function releaseCache(cache) {
cache.refCount--;
0 === cache.refCount &&
- scheduleCallback$1(NormalPriority, function () {
+ scheduleCallback$2(NormalPriority, function () {
cache.controller.abort();
});
}
@@ -1112,7 +1158,7 @@ function ensureRootIsScheduled(root) {
mightHavePendingSyncWork = !0;
didScheduleMicrotask ||
((didScheduleMicrotask = !0),
- scheduleCallback$2(ImmediatePriority, processRootScheduleInMicrotask));
+ scheduleCallback$3(ImmediatePriority, processRootScheduleInImmediateTask));
}
function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
if (!isFlushingWork && mightHavePendingSyncWork) {
@@ -1145,7 +1191,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
(JSCompiler_inline_result = workInProgressRootRenderLanes),
(JSCompiler_inline_result = getNextLanes(
root,
- root === workInProgressRoot ? JSCompiler_inline_result : 0
+ root === workInProgressRoot ? JSCompiler_inline_result : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
)),
0 === (JSCompiler_inline_result & 3) ||
checkIfRootIsPrerendering(root, JSCompiler_inline_result) ||
@@ -1157,7 +1204,7 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
isFlushingWork = !1;
}
}
-function processRootScheduleInMicrotask() {
+function processRootScheduleInImmediateTask() {
mightHavePendingSyncWork = didScheduleMicrotask = !1;
0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);
for (
@@ -1195,13 +1242,13 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
} else expirationTime <= currentTime && (root.expiredLanes |= lane);
lanes &= ~lane;
}
- suspendedLanes = pendingPassiveEffectsLanes;
currentTime = workInProgressRoot;
- pingedLanes = workInProgressRootRenderLanes;
- suspendedLanes =
- root === rootWithPendingPassiveEffects
- ? suspendedLanes
- : getNextLanes(root, root === currentTime ? pingedLanes : 0);
+ suspendedLanes = workInProgressRootRenderLanes;
+ suspendedLanes = getNextLanes(
+ root,
+ root === currentTime ? suspendedLanes : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
+ );
pingedLanes = root.callbackNode;
if (
0 === suspendedLanes ||
@@ -1218,45 +1265,51 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
(root.callbackPriority = 0)
);
if (
- 0 === (suspendedLanes & 3) ||
- checkIfRootIsPrerendering(root, suspendedLanes)
- ) {
- currentTime = suspendedLanes & -suspendedLanes;
- if (currentTime === root.callbackPriority) return currentTime;
- null !== pingedLanes && cancelCallback$1(pingedLanes);
- switch (lanesToEventPriority(suspendedLanes)) {
- case 2:
- case 8:
- suspendedLanes = UserBlockingPriority;
- break;
- case 32:
- suspendedLanes = NormalPriority$1;
- break;
- case 268435456:
- suspendedLanes = IdlePriority;
- break;
- default:
- suspendedLanes = NormalPriority$1;
- }
- pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root);
- suspendedLanes = scheduleCallback$2(suspendedLanes, pingedLanes);
- root.callbackPriority = currentTime;
- root.callbackNode = suspendedLanes;
- return currentTime;
+ 0 !== (suspendedLanes & 3) &&
+ !checkIfRootIsPrerendering(root, suspendedLanes)
+ )
+ return (
+ null !== pingedLanes &&
+ null !== pingedLanes &&
+ cancelCallback$1(pingedLanes),
+ (root.callbackPriority = 2),
+ (root.callbackNode = null),
+ 2
+ );
+ currentTime = suspendedLanes & -suspendedLanes;
+ if (currentTime === root.callbackPriority) return currentTime;
+ null !== pingedLanes && cancelCallback$1(pingedLanes);
+ switch (lanesToEventPriority(suspendedLanes)) {
+ case 2:
+ case 8:
+ suspendedLanes = UserBlockingPriority;
+ break;
+ case 32:
+ suspendedLanes = NormalPriority$1;
+ break;
+ case 268435456:
+ suspendedLanes = IdlePriority;
+ break;
+ default:
+ suspendedLanes = NormalPriority$1;
}
- null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes);
- root.callbackPriority = 2;
- root.callbackNode = null;
- return 2;
+ pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root);
+ suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes);
+ root.callbackPriority = currentTime;
+ root.callbackNode = suspendedLanes;
+ return currentTime;
}
function performWorkOnRootViaSchedulerTask(root, didTimeout) {
+ if (0 !== pendingEffectsStatus && 3 !== pendingEffectsStatus)
+ return (root.callbackNode = null), (root.callbackPriority = 0), null;
var originalCallbackNode = root.callbackNode;
- if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
+ if (flushPendingEffects(!0) && root.callbackNode !== originalCallbackNode)
return null;
var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
root,
- root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0
+ root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout);
@@ -1266,7 +1319,7 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) {
: null;
}
function performSyncWorkOnRoot(root, lanes) {
- if (flushPassiveEffects()) return null;
+ if (flushPendingEffects()) return null;
performWorkOnRoot(root, lanes, !0);
}
function requestTransitionLane() {
@@ -4638,14 +4691,14 @@ function markRef(current, workInProgress) {
if (null === ref)
null !== current &&
null !== current.ref &&
- (workInProgress.flags |= 2097664);
+ (workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
);
if (null === current || current.ref !== ref)
- workInProgress.flags |= 2097664;
+ workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
@@ -5197,7 +5250,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
(nextProps.pendingProps = primaryChildProps),
(workInProgress.deletions = null))
: ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)),
- (nextProps.subtreeFlags = didSuspend.subtreeFlags & 31457280));
+ (nextProps.subtreeFlags = didSuspend.subtreeFlags & 29360128));
null !== currentFallbackChildFragment
? (nextPrimaryChildren = createWorkInProgress(
currentFallbackChildFragment,
@@ -5971,8 +6024,8 @@ function bubbleProperties(completedWork) {
if (didBailout)
for (var child$89 = completedWork.child; null !== child$89; )
(newChildLanes |= child$89.lanes | child$89.childLanes),
- (subtreeFlags |= child$89.subtreeFlags & 31457280),
- (subtreeFlags |= child$89.flags & 31457280),
+ (subtreeFlags |= child$89.subtreeFlags & 29360128),
+ (subtreeFlags |= child$89.flags & 29360128),
(child$89.return = completedWork),
(child$89 = child$89.sibling);
else
@@ -6630,6 +6683,78 @@ var offscreenSubtreeIsHidden = !1,
offscreenSubtreeWasHidden = !1,
PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set,
nextEffect = null;
+function commitBeforeMutationEffects(root, firstChild) {
+ for (nextEffect = firstChild; null !== nextEffect; )
+ if (
+ ((root = nextEffect),
+ (firstChild = root.child),
+ 0 !== (root.subtreeFlags & 1024) && null !== firstChild)
+ )
+ (firstChild.return = root), (nextEffect = firstChild);
+ else
+ for (; null !== nextEffect; ) {
+ root = nextEffect;
+ var current = root.alternate;
+ firstChild = root.flags;
+ switch (root.tag) {
+ case 0:
+ break;
+ case 11:
+ case 15:
+ break;
+ case 1:
+ if (0 !== (firstChild & 1024) && null !== current) {
+ firstChild = void 0;
+ var finishedWork = root,
+ prevProps = current.memoizedProps;
+ current = current.memoizedState;
+ var instance = finishedWork.stateNode;
+ try {
+ var resolvedPrevProps = resolveClassComponentProps(
+ finishedWork.type,
+ prevProps,
+ finishedWork.elementType === finishedWork.type
+ );
+ firstChild = instance.getSnapshotBeforeUpdate(
+ resolvedPrevProps,
+ current
+ );
+ instance.__reactInternalSnapshotBeforeUpdate = firstChild;
+ } catch (error) {
+ captureCommitPhaseError(
+ finishedWork,
+ finishedWork.return,
+ error
+ );
+ }
+ }
+ break;
+ case 3:
+ 0 !== (firstChild & 1024) &&
+ root.stateNode.containerInfo.children.splice(0);
+ break;
+ case 5:
+ case 26:
+ case 27:
+ case 6:
+ case 4:
+ case 17:
+ break;
+ default:
+ if (0 !== (firstChild & 1024))
+ throw Error(
+ "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
+ );
+ }
+ firstChild = root.sibling;
+ if (null !== firstChild) {
+ firstChild.return = root.return;
+ nextEffect = firstChild;
+ break;
+ }
+ nextEffect = root.return;
+ }
+}
function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
var flags = finishedWork.flags;
switch (finishedWork.tag) {
@@ -7432,6 +7557,14 @@ function commitPassiveMountOnFiber(
);
flags & 2048 && commitHookEffectListMount(9, finishedWork);
break;
+ case 1:
+ recursivelyTraversePassiveMountEffects(
+ finishedRoot,
+ finishedWork,
+ committedLanes,
+ committedTransitions
+ );
+ break;
case 3:
recursivelyTraversePassiveMountEffects(
finishedRoot,
@@ -7886,10 +8019,13 @@ var DefaultAsyncDispatcher = {
workInProgressRootRenderTargetTime = Infinity,
workInProgressTransitions = null,
legacyErrorBoundariesThatAlreadyFailed = null,
- rootWithPendingPassiveEffects = null,
- pendingPassiveEffectsLanes = 0,
- pendingPassiveEffectsRemainingLanes = 0,
+ pendingEffectsStatus = 0,
+ pendingEffectsRoot = null,
+ pendingFinishedWork = null,
+ pendingEffectsLanes = 0,
+ pendingEffectsRemainingLanes = 0,
pendingPassiveTransitions = null,
+ pendingRecoverableErrors = null,
nestedUpdateCount = 0,
rootWithNestedUpdates = null;
function requestUpdateLane(fiber) {
@@ -8052,8 +8188,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
default:
throw Error("Unknown root exit status.");
}
- shouldTimeSlice.finishedWork = forceSync;
- shouldTimeSlice.finishedLanes = lanes;
if (
(lanes & 62914560) === lanes &&
3 === renderWasConcurrent &&
@@ -8066,7 +8200,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
- if (0 !== getNextLanes(shouldTimeSlice, 0)) break a;
+ if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;
shouldTimeSlice.timeoutHandle = scheduleTimeout(
commitRootWhenReady.bind(
null,
@@ -8098,12 +8232,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
lanes,
workInProgressDeferredLane,
workInProgressRootInterleavedUpdatedLanes,
- workInProgressSuspendedRetryLanes,
- workInProgressRootDidSkipSuspendedSiblings,
- renderWasConcurrent,
- 0,
- -0,
- 0
+ workInProgressSuspendedRetryLanes
);
}
}
@@ -8112,227 +8241,31 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
ensureRootIsScheduled(root$jscomp$0);
}
function commitRootWhenReady(
- root$jscomp$0,
- finishedWork$jscomp$0,
+ root,
+ finishedWork,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
- lanes$jscomp$0,
+ lanes,
spawnedLane,
updatedLanes,
suspendedRetryLanes
) {
- didIncludeRenderPhaseUpdate = finishedWork$jscomp$0.subtreeFlags;
- (didIncludeRenderPhaseUpdate & 8192 ||
- 16785408 === (didIncludeRenderPhaseUpdate & 16785408)) &&
- accumulateSuspenseyCommitOnFiber(finishedWork$jscomp$0);
- finishedWork$jscomp$0 = ReactSharedInternals.T;
- didIncludeRenderPhaseUpdate = currentUpdatePriority;
- try {
- currentUpdatePriority = 2;
- ReactSharedInternals.T = null;
- do flushPassiveEffects();
- while (null !== rootWithPendingPassiveEffects);
- if (0 !== (executionContext & 6))
- throw Error("Should not already be working.");
- var finishedWork = root$jscomp$0.finishedWork,
- lanes = root$jscomp$0.finishedLanes;
- if (null !== finishedWork) {
- root$jscomp$0.finishedWork = null;
- root$jscomp$0.finishedLanes = 0;
- if (finishedWork === root$jscomp$0.current)
- throw Error(
- "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
- );
- var remainingLanes = finishedWork.lanes | finishedWork.childLanes;
- lanes$jscomp$0 = remainingLanes |= concurrentlyUpdatedLanes;
- var previouslyPendingLanes = root$jscomp$0.pendingLanes;
- root$jscomp$0.pendingLanes = lanes$jscomp$0;
- root$jscomp$0.suspendedLanes = 0;
- root$jscomp$0.pingedLanes = 0;
- root$jscomp$0.warmLanes = 0;
- root$jscomp$0.expiredLanes &= lanes$jscomp$0;
- root$jscomp$0.entangledLanes &= lanes$jscomp$0;
- root$jscomp$0.errorRecoveryDisabledLanes &= lanes$jscomp$0;
- root$jscomp$0.shellSuspendCounter = 0;
- var entanglements = root$jscomp$0.entanglements,
- expirationTimes = root$jscomp$0.expirationTimes,
- hiddenUpdates = root$jscomp$0.hiddenUpdates;
- for (
- lanes$jscomp$0 = previouslyPendingLanes & ~lanes$jscomp$0;
- 0 < lanes$jscomp$0;
-
- ) {
- var index$7 = 31 - clz32(lanes$jscomp$0),
- lane = 1 << index$7;
- entanglements[index$7] = 0;
- expirationTimes[index$7] = -1;
- var hiddenUpdatesForLane = hiddenUpdates[index$7];
- if (null !== hiddenUpdatesForLane) {
- hiddenUpdates[index$7] = null;
- for (var i = 0; i < hiddenUpdatesForLane.length; i++) {
- var update = hiddenUpdatesForLane[i];
- null !== update && (update.lane &= -536870913);
- }
- }
- lanes$jscomp$0 &= ~lane;
- }
- 0 !== spawnedLane &&
- markSpawnedDeferredLane(root$jscomp$0, spawnedLane, 0);
- 0 !== suspendedRetryLanes &&
- 0 === updatedLanes &&
- (root$jscomp$0.suspendedLanes |=
- suspendedRetryLanes & ~(previouslyPendingLanes & ~lanes));
- root$jscomp$0 === workInProgressRoot &&
- ((workInProgress = workInProgressRoot = null),
- (workInProgressRootRenderLanes = 0));
- spawnedLane = !1;
- 0 !== (finishedWork.subtreeFlags & 10256) ||
- 0 !== (finishedWork.flags & 10256)
- ? ((spawnedLane = !0),
- (pendingPassiveEffectsRemainingLanes = remainingLanes),
- (pendingPassiveTransitions = transitions))
- : ((root$jscomp$0.callbackNode = null),
- (root$jscomp$0.callbackPriority = 0),
- (root$jscomp$0.cancelPendingCommit = null));
- var rootHasEffect = 0 !== (finishedWork.flags & 15990);
- if (0 !== (finishedWork.subtreeFlags & 15990) || rootHasEffect) {
- var prevTransition = ReactSharedInternals.T;
- ReactSharedInternals.T = null;
- transitions = currentUpdatePriority;
- currentUpdatePriority = 2;
- rootHasEffect = executionContext;
- executionContext |= 4;
- for (nextEffect = finishedWork; null !== nextEffect; ) {
- updatedLanes = nextEffect;
- var child = updatedLanes.child;
- if (0 !== (updatedLanes.subtreeFlags & 1028) && null !== child)
- (child.return = updatedLanes), (nextEffect = child);
- else
- b: for (; null !== nextEffect; ) {
- updatedLanes = nextEffect;
- suspendedRetryLanes = void 0;
- previouslyPendingLanes = updatedLanes;
- var current = previouslyPendingLanes.alternate,
- flags = previouslyPendingLanes.flags;
- switch (previouslyPendingLanes.tag) {
- case 0:
- break;
- case 11:
- case 15:
- break;
- case 1:
- if (0 !== (flags & 1024) && null !== current) {
- var prevProps = current.memoizedProps,
- prevState = current.memoizedState,
- instance = previouslyPendingLanes.stateNode;
- try {
- var resolvedPrevProps = resolveClassComponentProps(
- previouslyPendingLanes.type,
- prevProps,
- previouslyPendingLanes.elementType ===
- previouslyPendingLanes.type
- );
- suspendedRetryLanes = instance.getSnapshotBeforeUpdate(
- resolvedPrevProps,
- prevState
- );
- instance.__reactInternalSnapshotBeforeUpdate =
- suspendedRetryLanes;
- } catch (error) {
- captureCommitPhaseError(
- previouslyPendingLanes,
- previouslyPendingLanes.return,
- error
- );
- }
- }
- break;
- case 3:
- 0 !== (flags & 1024) &&
- previouslyPendingLanes.stateNode.containerInfo.children.splice(
- 0
- );
- break;
- case 5:
- case 26:
- case 27:
- case 6:
- case 4:
- case 17:
- break;
- default:
- if (0 !== (flags & 1024))
- throw Error(
- "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
- );
- }
- var sibling = updatedLanes.sibling;
- if (null !== sibling) {
- sibling.return = updatedLanes.return;
- nextEffect = sibling;
- break b;
- }
- nextEffect = updatedLanes.return;
- }
- }
- commitMutationEffectsOnFiber(finishedWork, root$jscomp$0);
- root$jscomp$0.current = finishedWork;
- commitLayoutEffectOnFiber(
- root$jscomp$0,
- finishedWork.alternate,
- finishedWork
- );
- requestPaint();
- executionContext = rootHasEffect;
- currentUpdatePriority = transitions;
- ReactSharedInternals.T = prevTransition;
- } else root$jscomp$0.current = finishedWork;
- spawnedLane
- ? ((rootWithPendingPassiveEffects = root$jscomp$0),
- (pendingPassiveEffectsLanes = lanes))
- : releaseRootPooledCache(root$jscomp$0, remainingLanes);
- remainingLanes = root$jscomp$0.pendingLanes;
- 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
- var root = finishedWork.stateNode;
- if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
- try {
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- void 0,
- 128 === (root.current.flags & 128)
- );
- } catch (err) {}
- if (null !== recoverableErrors) {
- var onRecoverableError = root$jscomp$0.onRecoverableError;
- for (
- finishedWork = 0;
- finishedWork < recoverableErrors.length;
- finishedWork++
- ) {
- var recoverableError = recoverableErrors[finishedWork];
- onRecoverableError(recoverableError.value, {
- componentStack: recoverableError.stack
- });
- }
- }
- 0 !== (pendingPassiveEffectsLanes & 3) &&
- 0 !== root$jscomp$0.tag &&
- flushPassiveEffects();
- ensureRootIsScheduled(root$jscomp$0);
- remainingLanes = root$jscomp$0.pendingLanes;
- 0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)
- ? root$jscomp$0 === rootWithNestedUpdates
- ? nestedUpdateCount++
- : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root$jscomp$0))
- : (nestedUpdateCount = 0);
- flushSyncWorkAcrossRoots_impl(0, !1);
- }
- } finally {
- (ReactSharedInternals.T = finishedWork$jscomp$0),
- (currentUpdatePriority = didIncludeRenderPhaseUpdate);
- }
+ root.timeoutHandle = -1;
+ var subtreeFlags = finishedWork.subtreeFlags;
+ (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) &&
+ accumulateSuspenseyCommitOnFiber(finishedWork);
+ commitRoot(
+ root,
+ finishedWork,
+ lanes,
+ recoverableErrors,
+ transitions,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+ );
}
function isRenderConsistentWithExternalStores(finishedWork) {
for (var node = finishedWork; ; ) {
@@ -8390,10 +8323,10 @@ function markRootSuspended(
markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);
}
function flushSyncFromReconciler(fn) {
- null !== rootWithPendingPassiveEffects &&
- 0 === rootWithPendingPassiveEffects.tag &&
+ 0 !== pendingEffectsStatus &&
+ 0 === pendingEffectsRoot.tag &&
0 === (executionContext & 6) &&
- flushPassiveEffects();
+ flushPendingEffects();
var prevExecutionContext = executionContext;
executionContext |= 1;
var prevTransition = ReactSharedInternals.T,
@@ -8426,8 +8359,6 @@ function resetWorkInProgressStack() {
}
}
function prepareFreshStack(root, lanes) {
- root.finishedWork = null;
- root.finishedLanes = 0;
var timeoutHandle = root.timeoutHandle;
-1 !== timeoutHandle &&
((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
@@ -8682,7 +8613,7 @@ function renderRootConcurrent(root, lanes) {
throw Error("Unexpected SuspendedReason. This is a bug in React.");
}
}
- workLoopConcurrent();
+ workLoopConcurrentByScheduler();
break;
} catch (thrownValue$130) {
handleThrow(root, thrownValue$130);
@@ -8698,7 +8629,7 @@ function renderRootConcurrent(root, lanes) {
finishQueueingConcurrentUpdates();
return workInProgressRootExitStatus;
}
-function workLoopConcurrent() {
+function workLoopConcurrentByScheduler() {
for (; null !== workInProgress && !shouldYield(); )
performUnitOfWork(workInProgress);
}
@@ -8861,66 +8792,233 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) {
workInProgressRootExitStatus = 6;
workInProgress = null;
}
+function commitRoot(
+ root,
+ finishedWork,
+ lanes,
+ recoverableErrors,
+ transitions,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+) {
+ root.cancelPendingCommit = null;
+ do flushPendingEffects();
+ while (0 !== pendingEffectsStatus);
+ if (0 !== (executionContext & 6))
+ throw Error("Should not already be working.");
+ if (null !== finishedWork) {
+ if (finishedWork === root.current)
+ throw Error(
+ "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ );
+ didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
+ didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
+ markRootFinished(
+ root,
+ lanes,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+ );
+ root === workInProgressRoot &&
+ ((workInProgress = workInProgressRoot = null),
+ (workInProgressRootRenderLanes = 0));
+ pendingFinishedWork = finishedWork;
+ pendingEffectsRoot = root;
+ pendingEffectsLanes = lanes;
+ pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
+ pendingPassiveTransitions = transitions;
+ pendingRecoverableErrors = recoverableErrors;
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? ((root.callbackNode = null),
+ (root.callbackPriority = 0),
+ scheduleCallback(NormalPriority$1, function () {
+ flushPassiveEffects(!0);
+ return null;
+ }))
+ : ((root.callbackNode = null), (root.callbackPriority = 0));
+ lanes = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || lanes) {
+ lanes = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ recoverableErrors = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ transitions = executionContext;
+ executionContext |= 4;
+ try {
+ commitBeforeMutationEffects(root, finishedWork);
+ } finally {
+ (executionContext = transitions),
+ (currentUpdatePriority = recoverableErrors),
+ (ReactSharedInternals.T = lanes);
+ }
+ }
+ pendingEffectsStatus = 1;
+ flushMutationEffects();
+ flushLayoutEffects();
+ }
+}
+function flushMutationEffects() {
+ if (1 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
+ rootMutationHasEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ commitMutationEffectsOnFiber(finishedWork, root);
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootMutationHasEffect);
+ }
+ }
+ root.current = finishedWork;
+ pendingEffectsStatus = 2;
+ }
+}
+function flushLayoutEffects() {
+ if (2 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ recoverableErrors = pendingRecoverableErrors,
+ rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
+ if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
+ rootHasLayoutEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootHasLayoutEffect);
+ }
+ }
+ requestPaint();
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? (pendingEffectsStatus = 3)
+ : ((pendingEffectsStatus = 0),
+ (pendingEffectsRoot = null),
+ releaseRootPooledCache(root, root.pendingLanes));
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 === rootHasLayoutEffect &&
+ (legacyErrorBoundariesThatAlreadyFailed = null);
+ lanesToEventPriority(lanes);
+ finishedWork = finishedWork.stateNode;
+ if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
+ try {
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ finishedWork,
+ void 0,
+ 128 === (finishedWork.current.flags & 128)
+ );
+ } catch (err) {}
+ if (null !== recoverableErrors) {
+ finishedWork = ReactSharedInternals.T;
+ rootHasLayoutEffect = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ ReactSharedInternals.T = null;
+ try {
+ var onRecoverableError = root.onRecoverableError;
+ for (
+ previousPriority = 0;
+ previousPriority < recoverableErrors.length;
+ previousPriority++
+ ) {
+ var recoverableError = recoverableErrors[previousPriority];
+ onRecoverableError(recoverableError.value, {
+ componentStack: recoverableError.stack
+ });
+ }
+ } finally {
+ (ReactSharedInternals.T = finishedWork),
+ (currentUpdatePriority = rootHasLayoutEffect);
+ }
+ }
+ 0 !== (pendingEffectsLanes & 3) && 0 !== root.tag && flushPendingEffects();
+ ensureRootIsScheduled(root);
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)
+ ? root === rootWithNestedUpdates
+ ? nestedUpdateCount++
+ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
+ : (nestedUpdateCount = 0);
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ }
+}
function releaseRootPooledCache(root, remainingLanes) {
0 === (root.pooledCacheLanes &= remainingLanes) &&
((remainingLanes = root.pooledCache),
null != remainingLanes &&
((root.pooledCache = null), releaseCache(remainingLanes)));
}
+function flushPendingEffects(wasDelayedCommit) {
+ flushMutationEffects();
+ flushLayoutEffects();
+ return flushPassiveEffects(wasDelayedCommit);
+}
function flushPassiveEffects() {
- if (null !== rootWithPendingPassiveEffects) {
- var root = rootWithPendingPassiveEffects,
- remainingLanes = pendingPassiveEffectsRemainingLanes;
- pendingPassiveEffectsRemainingLanes = 0;
- var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
- prevTransition = ReactSharedInternals.T,
- previousPriority = currentUpdatePriority;
- try {
- currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
- ReactSharedInternals.T = null;
- if (null === rootWithPendingPassiveEffects)
- var JSCompiler_inline_result = !1;
- else {
- renderPriority = pendingPassiveTransitions;
- pendingPassiveTransitions = null;
- var root$jscomp$0 = rootWithPendingPassiveEffects,
- lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsLanes = 0;
- root$jscomp$0.callbackNode = null;
- root$jscomp$0.callbackPriority = 0;
- root$jscomp$0.cancelPendingCommit = null;
- if (0 !== (executionContext & 6))
- throw Error("Cannot flush passive effects while already rendering.");
- var prevExecutionContext = executionContext;
- executionContext |= 4;
- commitPassiveUnmountOnFiber(root$jscomp$0.current);
- commitPassiveMountOnFiber(
- root$jscomp$0,
- root$jscomp$0.current,
- lanes,
- renderPriority
- );
- executionContext = prevExecutionContext;
- flushSyncWorkAcrossRoots_impl(0, !1);
- ensureRootIsScheduled(root$jscomp$0);
- if (
- injectedHook &&
- "function" === typeof injectedHook.onPostCommitFiberRoot
- )
- try {
- injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
- } catch (err) {}
- JSCompiler_inline_result = !0;
- }
- return JSCompiler_inline_result;
- } finally {
- (currentUpdatePriority = previousPriority),
- (ReactSharedInternals.T = prevTransition),
- releaseRootPooledCache(root, remainingLanes);
- }
+ if (3 !== pendingEffectsStatus) return !1;
+ var root = pendingEffectsRoot,
+ remainingLanes = pendingEffectsRemainingLanes;
+ pendingEffectsRemainingLanes = 0;
+ var renderPriority = lanesToEventPriority(pendingEffectsLanes),
+ prevTransition = ReactSharedInternals.T,
+ previousPriority = currentUpdatePriority;
+ try {
+ currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
+ ReactSharedInternals.T = null;
+ renderPriority = pendingPassiveTransitions;
+ pendingPassiveTransitions = null;
+ var root$jscomp$0 = pendingEffectsRoot,
+ lanes = pendingEffectsLanes;
+ pendingEffectsStatus = 0;
+ pendingEffectsRoot = null;
+ pendingEffectsLanes = 0;
+ if (0 !== (executionContext & 6))
+ throw Error("Cannot flush passive effects while already rendering.");
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ commitPassiveUnmountOnFiber(root$jscomp$0.current);
+ commitPassiveMountOnFiber(
+ root$jscomp$0,
+ root$jscomp$0.current,
+ lanes,
+ renderPriority
+ );
+ executionContext = prevExecutionContext;
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
+ } catch (err) {}
+ return !0;
+ } finally {
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = prevTransition),
+ releaseRootPooledCache(root, remainingLanes);
}
- return !1;
}
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
@@ -9038,6 +9136,9 @@ function resolveRetryWakeable(boundaryFiber, wakeable) {
null !== retryCache && retryCache.delete(wakeable);
retryTimedOutBoundary(boundaryFiber, retryLane);
}
+function scheduleCallback(priorityLevel, callback) {
+ return scheduleCallback$3(priorityLevel, callback);
+}
function FiberNode(tag, pendingProps, key, mode) {
this.tag = tag;
this.key = key;
@@ -9088,7 +9189,7 @@ function createWorkInProgress(current, pendingProps) {
(workInProgress.flags = 0),
(workInProgress.subtreeFlags = 0),
(workInProgress.deletions = null));
- workInProgress.flags = current.flags & 31457280;
+ workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -9107,7 +9208,7 @@ function createWorkInProgress(current, pendingProps) {
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
- workInProgress.flags &= 31457282;
+ workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
@@ -9294,11 +9395,7 @@ function FiberRootNode(
) {
this.tag = tag;
this.containerInfo = containerInfo;
- this.finishedWork =
- this.pingCache =
- this.current =
- this.pendingChildren =
- null;
+ this.pingCache = this.current = this.pendingChildren = null;
this.timeoutHandle = -1;
this.callbackNode =
this.next =
@@ -9311,7 +9408,6 @@ function FiberRootNode(
this.entangledLanes =
this.shellSuspendCounter =
this.errorRecoveryDisabledLanes =
- this.finishedLanes =
this.expiredLanes =
this.warmLanes =
this.pingedLanes =
@@ -9718,24 +9814,24 @@ function wrapFiber(fiber) {
fiberToWrapper.set(fiber, wrapper));
return wrapper;
}
-var internals$jscomp$inline_1460 = {
+var internals$jscomp$inline_1397 = {
bundleType: 0,
- version: "19.1.0-native-fb-a9bbe346-20241219",
+ version: "19.1.0-native-fb-a160102f-20250107",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.1.0-native-fb-a9bbe346-20241219"
+ reconcilerVersion: "19.1.0-native-fb-a160102f-20250107"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
- var hook$jscomp$inline_1461 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+ var hook$jscomp$inline_1398 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
- !hook$jscomp$inline_1461.isDisabled &&
- hook$jscomp$inline_1461.supportsFiber
+ !hook$jscomp$inline_1398.isDisabled &&
+ hook$jscomp$inline_1398.supportsFiber
)
try {
- (rendererID = hook$jscomp$inline_1461.inject(
- internals$jscomp$inline_1460
+ (rendererID = hook$jscomp$inline_1398.inject(
+ internals$jscomp$inline_1397
)),
- (injectedHook = hook$jscomp$inline_1461);
+ (injectedHook = hook$jscomp$inline_1398);
} catch (err) {}
}
exports._Scheduler = Scheduler;
@@ -9859,4 +9955,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
-exports.version = "19.1.0-native-fb-a9bbe346-20241219";
+exports.version = "19.1.0-native-fb-a160102f-20250107";
diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js
index bcc4306807452..3503c9dddbba1 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<>
+ * @generated SignedSource<>
*/
"use strict";
@@ -448,7 +448,7 @@ function findCurrentFiberUsingSlowPath(fiber) {
return a.stateNode.current === a ? fiber : alternate;
}
var isArrayImpl = Array.isArray,
- scheduleCallback$2 = Scheduler$1.unstable_scheduleCallback,
+ scheduleCallback$3 = Scheduler$1.unstable_scheduleCallback,
cancelCallback$1 = Scheduler$1.unstable_cancelCallback,
shouldYield = Scheduler$1.unstable_shouldYield,
requestPaint = Scheduler$1.unstable_requestPaint,
@@ -470,6 +470,11 @@ function setIsStrictModeForDevtools(newIsStrictMode) {
injectedHook.setStrictMode(rendererID, newIsStrictMode);
} catch (err) {}
}
+function markCommitStopped() {
+ null !== injectedProfilingHooks &&
+ "function" === typeof injectedProfilingHooks.markCommitStopped &&
+ injectedProfilingHooks.markCommitStopped();
+}
function markComponentRenderStarted(fiber) {
null !== injectedProfilingHooks &&
"function" === typeof injectedProfilingHooks.markComponentRenderStarted &&
@@ -573,14 +578,13 @@ function getHighestPriorityLanes(lanes) {
return lanes;
}
}
-function getNextLanes(root, wipLanes) {
+function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0,
suspendedLanes = root.suspendedLanes,
- pingedLanes = root.pingedLanes,
- warmLanes = root.warmLanes;
- root = 0 !== root.finishedLanes;
+ pingedLanes = root.pingedLanes;
+ root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes
? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
@@ -589,28 +593,28 @@ function getNextLanes(root, wipLanes) {
: ((pingedLanes &= nonIdlePendingLanes),
0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
- : root ||
- ((warmLanes = nonIdlePendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes)))))
+ : rootHasPendingCommit ||
+ ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))))
: ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
0 !== nonIdlePendingLanes
? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
: 0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
- : root ||
- ((warmLanes = pendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes))));
+ : rootHasPendingCommit ||
+ ((rootHasPendingCommit = pendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes
? 0
: 0 !== wipLanes &&
wipLanes !== nextLanes &&
0 === (wipLanes & suspendedLanes) &&
((suspendedLanes = nextLanes & -nextLanes),
- (warmLanes = wipLanes & -wipLanes),
- suspendedLanes >= warmLanes ||
- (32 === suspendedLanes && 0 !== (warmLanes & 4194176)))
+ (rootHasPendingCommit = wipLanes & -wipLanes),
+ suspendedLanes >= rootHasPendingCommit ||
+ (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176)))
? wipLanes
: nextLanes;
}
@@ -684,6 +688,53 @@ function markRootUpdated$1(root, updateLane) {
268435456 !== updateLane &&
((root.suspendedLanes = 0), (root.pingedLanes = 0), (root.warmLanes = 0));
}
+function markRootFinished(
+ root,
+ finishedLanes,
+ remainingLanes,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+) {
+ var previouslyPendingLanes = root.pendingLanes;
+ root.pendingLanes = remainingLanes;
+ root.suspendedLanes = 0;
+ root.pingedLanes = 0;
+ root.warmLanes = 0;
+ root.expiredLanes &= remainingLanes;
+ root.entangledLanes &= remainingLanes;
+ root.errorRecoveryDisabledLanes &= remainingLanes;
+ root.shellSuspendCounter = 0;
+ var entanglements = root.entanglements,
+ expirationTimes = root.expirationTimes,
+ hiddenUpdates = root.hiddenUpdates;
+ for (
+ remainingLanes = previouslyPendingLanes & ~remainingLanes;
+ 0 < remainingLanes;
+
+ ) {
+ var index$7 = 31 - clz32(remainingLanes),
+ lane = 1 << index$7;
+ entanglements[index$7] = 0;
+ expirationTimes[index$7] = -1;
+ var hiddenUpdatesForLane = hiddenUpdates[index$7];
+ if (null !== hiddenUpdatesForLane)
+ for (
+ hiddenUpdates[index$7] = null, index$7 = 0;
+ index$7 < hiddenUpdatesForLane.length;
+ index$7++
+ ) {
+ var update = hiddenUpdatesForLane[index$7];
+ null !== update && (update.lane &= -536870913);
+ }
+ remainingLanes &= ~lane;
+ }
+ 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);
+ 0 !== suspendedRetryLanes &&
+ 0 === updatedLanes &&
+ (root.suspendedLanes |=
+ suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
+}
function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
root.pendingLanes |= spawnedLane;
root.suspendedLanes &= ~spawnedLane;
@@ -1116,7 +1167,7 @@ var AbortControllerLocal =
});
};
},
- scheduleCallback$1 = Scheduler$1.unstable_scheduleCallback,
+ scheduleCallback$2 = Scheduler$1.unstable_scheduleCallback,
NormalPriority = Scheduler$1.unstable_NormalPriority,
CacheContext = {
$$typeof: REACT_CONTEXT_TYPE,
@@ -1136,7 +1187,7 @@ function createCache() {
function releaseCache(cache) {
cache.refCount--;
0 === cache.refCount &&
- scheduleCallback$1(NormalPriority, function () {
+ scheduleCallback$2(NormalPriority, function () {
cache.controller.abort();
});
}
@@ -1209,7 +1260,7 @@ function ensureRootIsScheduled(root) {
mightHavePendingSyncWork = !0;
didScheduleMicrotask ||
((didScheduleMicrotask = !0),
- scheduleCallback$2(ImmediatePriority, processRootScheduleInMicrotask));
+ scheduleCallback$3(ImmediatePriority, processRootScheduleInImmediateTask));
}
function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
if (!isFlushingWork && mightHavePendingSyncWork) {
@@ -1242,7 +1293,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
(JSCompiler_inline_result = workInProgressRootRenderLanes),
(JSCompiler_inline_result = getNextLanes(
root,
- root === workInProgressRoot ? JSCompiler_inline_result : 0
+ root === workInProgressRoot ? JSCompiler_inline_result : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
)),
0 === (JSCompiler_inline_result & 3) ||
checkIfRootIsPrerendering(root, JSCompiler_inline_result) ||
@@ -1254,7 +1306,7 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
isFlushingWork = !1;
}
}
-function processRootScheduleInMicrotask() {
+function processRootScheduleInImmediateTask() {
mightHavePendingSyncWork = didScheduleMicrotask = !1;
0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);
for (
@@ -1292,13 +1344,13 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
} else expirationTime <= currentTime && (root.expiredLanes |= lane);
lanes &= ~lane;
}
- suspendedLanes = pendingPassiveEffectsLanes;
currentTime = workInProgressRoot;
- pingedLanes = workInProgressRootRenderLanes;
- suspendedLanes =
- root === rootWithPendingPassiveEffects
- ? suspendedLanes
- : getNextLanes(root, root === currentTime ? pingedLanes : 0);
+ suspendedLanes = workInProgressRootRenderLanes;
+ suspendedLanes = getNextLanes(
+ root,
+ root === currentTime ? suspendedLanes : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
+ );
pingedLanes = root.callbackNode;
if (
0 === suspendedLanes ||
@@ -1315,46 +1367,52 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
(root.callbackPriority = 0)
);
if (
- 0 === (suspendedLanes & 3) ||
- checkIfRootIsPrerendering(root, suspendedLanes)
- ) {
- currentTime = suspendedLanes & -suspendedLanes;
- if (currentTime === root.callbackPriority) return currentTime;
- null !== pingedLanes && cancelCallback$1(pingedLanes);
- switch (lanesToEventPriority(suspendedLanes)) {
- case 2:
- case 8:
- suspendedLanes = UserBlockingPriority;
- break;
- case 32:
- suspendedLanes = NormalPriority$1;
- break;
- case 268435456:
- suspendedLanes = IdlePriority;
- break;
- default:
- suspendedLanes = NormalPriority$1;
- }
- pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root);
- suspendedLanes = scheduleCallback$2(suspendedLanes, pingedLanes);
- root.callbackPriority = currentTime;
- root.callbackNode = suspendedLanes;
- return currentTime;
+ 0 !== (suspendedLanes & 3) &&
+ !checkIfRootIsPrerendering(root, suspendedLanes)
+ )
+ return (
+ null !== pingedLanes &&
+ null !== pingedLanes &&
+ cancelCallback$1(pingedLanes),
+ (root.callbackPriority = 2),
+ (root.callbackNode = null),
+ 2
+ );
+ currentTime = suspendedLanes & -suspendedLanes;
+ if (currentTime === root.callbackPriority) return currentTime;
+ null !== pingedLanes && cancelCallback$1(pingedLanes);
+ switch (lanesToEventPriority(suspendedLanes)) {
+ case 2:
+ case 8:
+ suspendedLanes = UserBlockingPriority;
+ break;
+ case 32:
+ suspendedLanes = NormalPriority$1;
+ break;
+ case 268435456:
+ suspendedLanes = IdlePriority;
+ break;
+ default:
+ suspendedLanes = NormalPriority$1;
}
- null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes);
- root.callbackPriority = 2;
- root.callbackNode = null;
- return 2;
+ pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root);
+ suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes);
+ root.callbackPriority = currentTime;
+ root.callbackNode = suspendedLanes;
+ return currentTime;
}
function performWorkOnRootViaSchedulerTask(root, didTimeout) {
nestedUpdateScheduled = currentUpdateIsNested = !1;
+ if (0 !== pendingEffectsStatus && 3 !== pendingEffectsStatus)
+ return (root.callbackNode = null), (root.callbackPriority = 0), null;
var originalCallbackNode = root.callbackNode;
- if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
+ if (flushPendingEffects(!0) && root.callbackNode !== originalCallbackNode)
return null;
var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
root,
- root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0
+ root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout);
@@ -1364,7 +1422,7 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) {
: null;
}
function performSyncWorkOnRoot(root, lanes) {
- if (flushPassiveEffects()) return null;
+ if (flushPendingEffects()) return null;
currentUpdateIsNested = nestedUpdateScheduled;
nestedUpdateScheduled = !1;
performWorkOnRoot(root, lanes, !0);
@@ -4748,14 +4806,14 @@ function markRef(current, workInProgress) {
if (null === ref)
null !== current &&
null !== current.ref &&
- (workInProgress.flags |= 2097664);
+ (workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
);
if (null === current || current.ref !== ref)
- workInProgress.flags |= 2097664;
+ workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
@@ -5323,7 +5381,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
(nextProps.treeBaseDuration = didSuspend.treeBaseDuration)),
(workInProgress.deletions = null))
: ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)),
- (nextProps.subtreeFlags = didSuspend.subtreeFlags & 31457280));
+ (nextProps.subtreeFlags = didSuspend.subtreeFlags & 29360128));
null !== currentFallbackChildFragment
? (nextPrimaryChildren = createWorkInProgress(
currentFallbackChildFragment,
@@ -6124,8 +6182,8 @@ function bubbleProperties(completedWork) {
)
(newChildLanes |= child$92.lanes | child$92.childLanes),
- (subtreeFlags |= child$92.subtreeFlags & 31457280),
- (subtreeFlags |= child$92.flags & 31457280),
+ (subtreeFlags |= child$92.subtreeFlags & 29360128),
+ (subtreeFlags |= child$92.flags & 29360128),
(treeBaseDuration$91 += child$92.treeBaseDuration),
(child$92 = child$92.sibling);
completedWork.treeBaseDuration = treeBaseDuration$91;
@@ -6137,8 +6195,8 @@ function bubbleProperties(completedWork) {
)
(newChildLanes |=
treeBaseDuration$91.lanes | treeBaseDuration$91.childLanes),
- (subtreeFlags |= treeBaseDuration$91.subtreeFlags & 31457280),
- (subtreeFlags |= treeBaseDuration$91.flags & 31457280),
+ (subtreeFlags |= treeBaseDuration$91.subtreeFlags & 29360128),
+ (subtreeFlags |= treeBaseDuration$91.flags & 29360128),
(treeBaseDuration$91.return = completedWork),
(treeBaseDuration$91 = treeBaseDuration$91.sibling);
else if (0 !== (completedWork.mode & 2)) {
@@ -6999,6 +7057,78 @@ var offscreenSubtreeIsHidden = !1,
offscreenSubtreeWasHidden = !1,
PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set,
nextEffect = null;
+function commitBeforeMutationEffects(root, firstChild) {
+ for (nextEffect = firstChild; null !== nextEffect; )
+ if (
+ ((root = nextEffect),
+ (firstChild = root.child),
+ 0 !== (root.subtreeFlags & 1024) && null !== firstChild)
+ )
+ (firstChild.return = root), (nextEffect = firstChild);
+ else
+ for (; null !== nextEffect; ) {
+ root = nextEffect;
+ var current = root.alternate;
+ firstChild = root.flags;
+ switch (root.tag) {
+ case 0:
+ break;
+ case 11:
+ case 15:
+ break;
+ case 1:
+ if (0 !== (firstChild & 1024) && null !== current) {
+ firstChild = void 0;
+ var finishedWork = root,
+ prevProps = current.memoizedProps;
+ current = current.memoizedState;
+ var instance = finishedWork.stateNode;
+ try {
+ var resolvedPrevProps = resolveClassComponentProps(
+ finishedWork.type,
+ prevProps,
+ finishedWork.elementType === finishedWork.type
+ );
+ firstChild = instance.getSnapshotBeforeUpdate(
+ resolvedPrevProps,
+ current
+ );
+ instance.__reactInternalSnapshotBeforeUpdate = firstChild;
+ } catch (error) {
+ captureCommitPhaseError(
+ finishedWork,
+ finishedWork.return,
+ error
+ );
+ }
+ }
+ break;
+ case 3:
+ 0 !== (firstChild & 1024) &&
+ root.stateNode.containerInfo.children.splice(0);
+ break;
+ case 5:
+ case 26:
+ case 27:
+ case 6:
+ case 4:
+ case 17:
+ break;
+ default:
+ if (0 !== (firstChild & 1024))
+ throw Error(
+ "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
+ );
+ }
+ firstChild = root.sibling;
+ if (null !== firstChild) {
+ firstChild.return = root.return;
+ nextEffect = firstChild;
+ break;
+ }
+ nextEffect = root.return;
+ }
+}
function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
var flags = finishedWork.flags;
switch (finishedWork.tag) {
@@ -7865,6 +7995,14 @@ function commitPassiveMountOnFiber(
);
flags & 2048 && commitHookPassiveMountEffects(finishedWork, 9);
break;
+ case 1:
+ recursivelyTraversePassiveMountEffects(
+ finishedRoot,
+ finishedWork,
+ committedLanes,
+ committedTransitions
+ );
+ break;
case 3:
var prevEffectDuration = pushNestedEffectDurations();
recursivelyTraversePassiveMountEffects(
@@ -8333,10 +8471,13 @@ var DefaultAsyncDispatcher = {
workInProgressRootRenderTargetTime = Infinity,
workInProgressTransitions = null,
legacyErrorBoundariesThatAlreadyFailed = null,
- rootWithPendingPassiveEffects = null,
- pendingPassiveEffectsLanes = 0,
- pendingPassiveEffectsRemainingLanes = 0,
+ pendingEffectsStatus = 0,
+ pendingEffectsRoot = null,
+ pendingFinishedWork = null,
+ pendingEffectsLanes = 0,
+ pendingEffectsRemainingLanes = 0,
pendingPassiveTransitions = null,
+ pendingRecoverableErrors = null,
nestedUpdateCount = 0,
rootWithNestedUpdates = null;
function requestUpdateLane(fiber) {
@@ -8499,8 +8640,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
default:
throw Error("Unknown root exit status.");
}
- shouldTimeSlice.finishedWork = forceSync;
- shouldTimeSlice.finishedLanes = lanes;
if (
(lanes & 62914560) === lanes &&
3 === renderWasConcurrent &&
@@ -8513,7 +8652,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
- if (0 !== getNextLanes(shouldTimeSlice, 0)) break a;
+ if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;
shouldTimeSlice.timeoutHandle = scheduleTimeout(
commitRootWhenReady.bind(
null,
@@ -8545,12 +8684,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
lanes,
workInProgressDeferredLane,
workInProgressRootInterleavedUpdatedLanes,
- workInProgressSuspendedRetryLanes,
- workInProgressRootDidSkipSuspendedSiblings,
- renderWasConcurrent,
- 0,
- -0,
- 0
+ workInProgressSuspendedRetryLanes
);
}
}
@@ -8559,261 +8693,31 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
ensureRootIsScheduled(root$jscomp$0);
}
function commitRootWhenReady(
- root$jscomp$0,
- finishedWork$jscomp$0,
+ root,
+ finishedWork,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
- lanes$jscomp$0,
+ lanes,
spawnedLane,
updatedLanes,
suspendedRetryLanes
) {
- didIncludeRenderPhaseUpdate = finishedWork$jscomp$0.subtreeFlags;
- (didIncludeRenderPhaseUpdate & 8192 ||
- 16785408 === (didIncludeRenderPhaseUpdate & 16785408)) &&
- accumulateSuspenseyCommitOnFiber(finishedWork$jscomp$0);
- finishedWork$jscomp$0 = ReactSharedInternals.T;
- didIncludeRenderPhaseUpdate = currentUpdatePriority;
- try {
- currentUpdatePriority = 2;
- ReactSharedInternals.T = null;
- do flushPassiveEffects();
- while (null !== rootWithPendingPassiveEffects);
- if (0 !== (executionContext & 6))
- throw Error("Should not already be working.");
- var finishedWork = root$jscomp$0.finishedWork,
- lanes = root$jscomp$0.finishedLanes;
- null !== injectedProfilingHooks &&
- "function" === typeof injectedProfilingHooks.markCommitStarted &&
- injectedProfilingHooks.markCommitStarted(lanes);
- if (null !== finishedWork) {
- root$jscomp$0.finishedWork = null;
- root$jscomp$0.finishedLanes = 0;
- if (finishedWork === root$jscomp$0.current)
- throw Error(
- "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
- );
- var remainingLanes = finishedWork.lanes | finishedWork.childLanes;
- lanes$jscomp$0 = remainingLanes |= concurrentlyUpdatedLanes;
- var previouslyPendingLanes = root$jscomp$0.pendingLanes;
- root$jscomp$0.pendingLanes = lanes$jscomp$0;
- root$jscomp$0.suspendedLanes = 0;
- root$jscomp$0.pingedLanes = 0;
- root$jscomp$0.warmLanes = 0;
- root$jscomp$0.expiredLanes &= lanes$jscomp$0;
- root$jscomp$0.entangledLanes &= lanes$jscomp$0;
- root$jscomp$0.errorRecoveryDisabledLanes &= lanes$jscomp$0;
- root$jscomp$0.shellSuspendCounter = 0;
- var entanglements = root$jscomp$0.entanglements,
- expirationTimes = root$jscomp$0.expirationTimes,
- hiddenUpdates = root$jscomp$0.hiddenUpdates;
- for (
- lanes$jscomp$0 = previouslyPendingLanes & ~lanes$jscomp$0;
- 0 < lanes$jscomp$0;
-
- ) {
- var index$7 = 31 - clz32(lanes$jscomp$0),
- lane = 1 << index$7;
- entanglements[index$7] = 0;
- expirationTimes[index$7] = -1;
- var hiddenUpdatesForLane = hiddenUpdates[index$7];
- if (null !== hiddenUpdatesForLane) {
- hiddenUpdates[index$7] = null;
- for (var i = 0; i < hiddenUpdatesForLane.length; i++) {
- var update = hiddenUpdatesForLane[i];
- null !== update && (update.lane &= -536870913);
- }
- }
- lanes$jscomp$0 &= ~lane;
- }
- 0 !== spawnedLane &&
- markSpawnedDeferredLane(root$jscomp$0, spawnedLane, 0);
- 0 !== suspendedRetryLanes &&
- 0 === updatedLanes &&
- (root$jscomp$0.suspendedLanes |=
- suspendedRetryLanes & ~(previouslyPendingLanes & ~lanes));
- root$jscomp$0 === workInProgressRoot &&
- ((workInProgress = workInProgressRoot = null),
- (workInProgressRootRenderLanes = 0));
- spawnedLane = !1;
- 0 !== (finishedWork.subtreeFlags & 10256) ||
- 0 !== (finishedWork.flags & 10256)
- ? ((spawnedLane = !0),
- (pendingPassiveEffectsRemainingLanes = remainingLanes),
- (pendingPassiveTransitions = transitions))
- : ((root$jscomp$0.callbackNode = null),
- (root$jscomp$0.callbackPriority = 0),
- (root$jscomp$0.cancelPendingCommit = null));
- commitStartTime = now();
- var rootHasEffect = 0 !== (finishedWork.flags & 15990);
- if (0 !== (finishedWork.subtreeFlags & 15990) || rootHasEffect) {
- var prevTransition = ReactSharedInternals.T;
- ReactSharedInternals.T = null;
- transitions = currentUpdatePriority;
- currentUpdatePriority = 2;
- rootHasEffect = executionContext;
- executionContext |= 4;
- for (nextEffect = finishedWork; null !== nextEffect; ) {
- updatedLanes = nextEffect;
- var child = updatedLanes.child;
- if (0 !== (updatedLanes.subtreeFlags & 1028) && null !== child)
- (child.return = updatedLanes), (nextEffect = child);
- else
- b: for (; null !== nextEffect; ) {
- updatedLanes = nextEffect;
- suspendedRetryLanes = void 0;
- previouslyPendingLanes = updatedLanes;
- var current = previouslyPendingLanes.alternate,
- flags = previouslyPendingLanes.flags;
- switch (previouslyPendingLanes.tag) {
- case 0:
- break;
- case 11:
- case 15:
- break;
- case 1:
- if (0 !== (flags & 1024) && null !== current) {
- var prevProps = current.memoizedProps,
- prevState = current.memoizedState,
- instance = previouslyPendingLanes.stateNode;
- try {
- var resolvedPrevProps = resolveClassComponentProps(
- previouslyPendingLanes.type,
- prevProps,
- previouslyPendingLanes.elementType ===
- previouslyPendingLanes.type
- );
- suspendedRetryLanes = instance.getSnapshotBeforeUpdate(
- resolvedPrevProps,
- prevState
- );
- instance.__reactInternalSnapshotBeforeUpdate =
- suspendedRetryLanes;
- } catch (error) {
- captureCommitPhaseError(
- previouslyPendingLanes,
- previouslyPendingLanes.return,
- error
- );
- }
- }
- break;
- case 3:
- 0 !== (flags & 1024) &&
- previouslyPendingLanes.stateNode.containerInfo.children.splice(
- 0
- );
- break;
- case 5:
- case 26:
- case 27:
- case 6:
- case 4:
- case 17:
- break;
- default:
- if (0 !== (flags & 1024))
- throw Error(
- "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
- );
- }
- var sibling = updatedLanes.sibling;
- if (null !== sibling) {
- sibling.return = updatedLanes.return;
- nextEffect = sibling;
- break b;
- }
- nextEffect = updatedLanes.return;
- }
- }
- commitMutationEffectsOnFiber(finishedWork, root$jscomp$0);
- root$jscomp$0.current = finishedWork;
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markLayoutEffectsStarted &&
- injectedProfilingHooks.markLayoutEffectsStarted(lanes);
- commitLayoutEffectOnFiber(
- root$jscomp$0,
- finishedWork.alternate,
- finishedWork
- );
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markLayoutEffectsStopped &&
- injectedProfilingHooks.markLayoutEffectsStopped();
- requestPaint();
- executionContext = rootHasEffect;
- currentUpdatePriority = transitions;
- ReactSharedInternals.T = prevTransition;
- } else root$jscomp$0.current = finishedWork;
- spawnedLane
- ? ((rootWithPendingPassiveEffects = root$jscomp$0),
- (pendingPassiveEffectsLanes = lanes))
- : releaseRootPooledCache(root$jscomp$0, remainingLanes);
- remainingLanes = root$jscomp$0.pendingLanes;
- 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
- var root = finishedWork.stateNode;
- if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
- try {
- var didError = 128 === (root.current.flags & 128);
- switch (didIncludeRenderPhaseUpdate) {
- case 2:
- var schedulerPriority = ImmediatePriority;
- break;
- case 8:
- schedulerPriority = UserBlockingPriority;
- break;
- case 32:
- schedulerPriority = NormalPriority$1;
- break;
- case 268435456:
- schedulerPriority = IdlePriority;
- break;
- default:
- schedulerPriority = NormalPriority$1;
- }
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- schedulerPriority,
- didError
- );
- } catch (err) {}
- if (null !== recoverableErrors) {
- var onRecoverableError = root$jscomp$0.onRecoverableError;
- for (
- finishedWork = 0;
- finishedWork < recoverableErrors.length;
- finishedWork++
- ) {
- var recoverableError = recoverableErrors[finishedWork];
- onRecoverableError(recoverableError.value, {
- componentStack: recoverableError.stack
- });
- }
- }
- 0 !== (pendingPassiveEffectsLanes & 3) &&
- 0 !== root$jscomp$0.tag &&
- flushPassiveEffects();
- ensureRootIsScheduled(root$jscomp$0);
- remainingLanes = root$jscomp$0.pendingLanes;
- 0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)
- ? ((nestedUpdateScheduled = !0),
- root$jscomp$0 === rootWithNestedUpdates
- ? nestedUpdateCount++
- : ((nestedUpdateCount = 0),
- (rootWithNestedUpdates = root$jscomp$0)))
- : (nestedUpdateCount = 0);
- flushSyncWorkAcrossRoots_impl(0, !1);
- }
- null !== injectedProfilingHooks &&
- "function" === typeof injectedProfilingHooks.markCommitStopped &&
- injectedProfilingHooks.markCommitStopped();
- } finally {
- (ReactSharedInternals.T = finishedWork$jscomp$0),
- (currentUpdatePriority = didIncludeRenderPhaseUpdate);
- }
+ root.timeoutHandle = -1;
+ var subtreeFlags = finishedWork.subtreeFlags;
+ (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) &&
+ accumulateSuspenseyCommitOnFiber(finishedWork);
+ commitRoot(
+ root,
+ finishedWork,
+ lanes,
+ recoverableErrors,
+ transitions,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+ );
}
function isRenderConsistentWithExternalStores(finishedWork) {
for (var node = finishedWork; ; ) {
@@ -8871,10 +8775,10 @@ function markRootSuspended(
markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);
}
function flushSyncFromReconciler(fn) {
- null !== rootWithPendingPassiveEffects &&
- 0 === rootWithPendingPassiveEffects.tag &&
+ 0 !== pendingEffectsStatus &&
+ 0 === pendingEffectsRoot.tag &&
0 === (executionContext & 6) &&
- flushPassiveEffects();
+ flushPendingEffects();
var prevExecutionContext = executionContext;
executionContext |= 1;
var prevTransition = ReactSharedInternals.T,
@@ -8907,8 +8811,6 @@ function resetWorkInProgressStack() {
}
}
function prepareFreshStack(root, lanes) {
- root.finishedWork = null;
- root.finishedLanes = 0;
var timeoutHandle = root.timeoutHandle;
-1 !== timeoutHandle &&
((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
@@ -9196,7 +9098,7 @@ function renderRootConcurrent(root, lanes) {
throw Error("Unexpected SuspendedReason. This is a bug in React.");
}
}
- workLoopConcurrent();
+ workLoopConcurrentByScheduler();
break;
} catch (thrownValue$143) {
handleThrow(root, thrownValue$143);
@@ -9219,7 +9121,7 @@ function renderRootConcurrent(root, lanes) {
finishQueueingConcurrentUpdates();
return workInProgressRootExitStatus;
}
-function workLoopConcurrent() {
+function workLoopConcurrentByScheduler() {
for (; null !== workInProgress && !shouldYield(); )
performUnitOfWork(workInProgress);
}
@@ -9400,77 +9302,274 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) {
workInProgressRootExitStatus = 6;
workInProgress = null;
}
+function commitRoot(
+ root,
+ finishedWork,
+ lanes,
+ recoverableErrors,
+ transitions,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+) {
+ root.cancelPendingCommit = null;
+ do flushPendingEffects();
+ while (0 !== pendingEffectsStatus);
+ if (0 !== (executionContext & 6))
+ throw Error("Should not already be working.");
+ null !== injectedProfilingHooks &&
+ "function" === typeof injectedProfilingHooks.markCommitStarted &&
+ injectedProfilingHooks.markCommitStarted(lanes);
+ if (null === finishedWork) markCommitStopped();
+ else {
+ if (finishedWork === root.current)
+ throw Error(
+ "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ );
+ didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
+ didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
+ markRootFinished(
+ root,
+ lanes,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+ );
+ root === workInProgressRoot &&
+ ((workInProgress = workInProgressRoot = null),
+ (workInProgressRootRenderLanes = 0));
+ pendingFinishedWork = finishedWork;
+ pendingEffectsRoot = root;
+ pendingEffectsLanes = lanes;
+ pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
+ pendingPassiveTransitions = transitions;
+ pendingRecoverableErrors = recoverableErrors;
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? ((root.callbackNode = null),
+ (root.callbackPriority = 0),
+ scheduleCallback(NormalPriority$1, function () {
+ flushPassiveEffects(!0);
+ return null;
+ }))
+ : ((root.callbackNode = null), (root.callbackPriority = 0));
+ commitStartTime = now();
+ lanes = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || lanes) {
+ lanes = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ recoverableErrors = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ transitions = executionContext;
+ executionContext |= 4;
+ try {
+ commitBeforeMutationEffects(root, finishedWork);
+ } finally {
+ (executionContext = transitions),
+ (currentUpdatePriority = recoverableErrors),
+ (ReactSharedInternals.T = lanes);
+ }
+ }
+ pendingEffectsStatus = 1;
+ flushMutationEffects();
+ flushLayoutEffects();
+ }
+}
+function flushMutationEffects() {
+ if (1 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
+ rootMutationHasEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ commitMutationEffectsOnFiber(finishedWork, root);
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootMutationHasEffect);
+ }
+ }
+ root.current = finishedWork;
+ pendingEffectsStatus = 2;
+ }
+}
+function flushLayoutEffects() {
+ if (2 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ recoverableErrors = pendingRecoverableErrors,
+ rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
+ if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
+ rootHasLayoutEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStarted &&
+ injectedProfilingHooks.markLayoutEffectsStarted(lanes),
+ commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork),
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStopped &&
+ injectedProfilingHooks.markLayoutEffectsStopped();
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootHasLayoutEffect);
+ }
+ }
+ requestPaint();
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? (pendingEffectsStatus = 3)
+ : ((pendingEffectsStatus = 0),
+ (pendingEffectsRoot = null),
+ releaseRootPooledCache(root, root.pendingLanes));
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 === rootHasLayoutEffect &&
+ (legacyErrorBoundariesThatAlreadyFailed = null);
+ rootHasLayoutEffect = lanesToEventPriority(lanes);
+ finishedWork = finishedWork.stateNode;
+ if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
+ try {
+ var didError = 128 === (finishedWork.current.flags & 128);
+ switch (rootHasLayoutEffect) {
+ case 2:
+ var schedulerPriority = ImmediatePriority;
+ break;
+ case 8:
+ schedulerPriority = UserBlockingPriority;
+ break;
+ case 32:
+ schedulerPriority = NormalPriority$1;
+ break;
+ case 268435456:
+ schedulerPriority = IdlePriority;
+ break;
+ default:
+ schedulerPriority = NormalPriority$1;
+ }
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ finishedWork,
+ schedulerPriority,
+ didError
+ );
+ } catch (err) {}
+ if (null !== recoverableErrors) {
+ didError = ReactSharedInternals.T;
+ schedulerPriority = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ ReactSharedInternals.T = null;
+ try {
+ var onRecoverableError = root.onRecoverableError;
+ for (
+ finishedWork = 0;
+ finishedWork < recoverableErrors.length;
+ finishedWork++
+ ) {
+ var recoverableError = recoverableErrors[finishedWork];
+ onRecoverableError(recoverableError.value, {
+ componentStack: recoverableError.stack
+ });
+ }
+ } finally {
+ (ReactSharedInternals.T = didError),
+ (currentUpdatePriority = schedulerPriority);
+ }
+ }
+ 0 !== (pendingEffectsLanes & 3) && 0 !== root.tag && flushPendingEffects();
+ ensureRootIsScheduled(root);
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)
+ ? ((nestedUpdateScheduled = !0),
+ root === rootWithNestedUpdates
+ ? nestedUpdateCount++
+ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
+ : (nestedUpdateCount = 0);
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ markCommitStopped();
+ }
+}
function releaseRootPooledCache(root, remainingLanes) {
0 === (root.pooledCacheLanes &= remainingLanes) &&
((remainingLanes = root.pooledCache),
null != remainingLanes &&
((root.pooledCache = null), releaseCache(remainingLanes)));
}
+function flushPendingEffects(wasDelayedCommit) {
+ flushMutationEffects();
+ flushLayoutEffects();
+ return flushPassiveEffects(wasDelayedCommit);
+}
function flushPassiveEffects() {
- if (null !== rootWithPendingPassiveEffects) {
- var root = rootWithPendingPassiveEffects,
- remainingLanes = pendingPassiveEffectsRemainingLanes;
- pendingPassiveEffectsRemainingLanes = 0;
- var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
- prevTransition = ReactSharedInternals.T,
- previousPriority = currentUpdatePriority;
- try {
- currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
- ReactSharedInternals.T = null;
- if (null === rootWithPendingPassiveEffects)
- var JSCompiler_inline_result = !1;
- else {
- renderPriority = pendingPassiveTransitions;
- pendingPassiveTransitions = null;
- var root$jscomp$0 = rootWithPendingPassiveEffects,
- lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsLanes = 0;
- root$jscomp$0.callbackNode = null;
- root$jscomp$0.callbackPriority = 0;
- root$jscomp$0.cancelPendingCommit = null;
- if (0 !== (executionContext & 6))
- throw Error("Cannot flush passive effects while already rendering.");
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStarted &&
- injectedProfilingHooks.markPassiveEffectsStarted(lanes);
- var prevExecutionContext = executionContext;
- executionContext |= 4;
- commitPassiveUnmountOnFiber(root$jscomp$0.current);
- commitPassiveMountOnFiber(
- root$jscomp$0,
- root$jscomp$0.current,
- lanes,
- renderPriority
- );
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStopped &&
- injectedProfilingHooks.markPassiveEffectsStopped();
- executionContext = prevExecutionContext;
- flushSyncWorkAcrossRoots_impl(0, !1);
- ensureRootIsScheduled(root$jscomp$0);
- if (
- injectedHook &&
- "function" === typeof injectedHook.onPostCommitFiberRoot
- )
- try {
- injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
- } catch (err) {}
- var stateNode = root$jscomp$0.current.stateNode;
- stateNode.effectDuration = 0;
- stateNode.passiveEffectDuration = 0;
- JSCompiler_inline_result = !0;
- }
- return JSCompiler_inline_result;
- } finally {
- (currentUpdatePriority = previousPriority),
- (ReactSharedInternals.T = prevTransition),
- releaseRootPooledCache(root, remainingLanes);
- }
+ if (3 !== pendingEffectsStatus) return !1;
+ var root = pendingEffectsRoot,
+ remainingLanes = pendingEffectsRemainingLanes;
+ pendingEffectsRemainingLanes = 0;
+ var renderPriority = lanesToEventPriority(pendingEffectsLanes),
+ prevTransition = ReactSharedInternals.T,
+ previousPriority = currentUpdatePriority;
+ try {
+ currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
+ ReactSharedInternals.T = null;
+ renderPriority = pendingPassiveTransitions;
+ pendingPassiveTransitions = null;
+ var root$jscomp$0 = pendingEffectsRoot,
+ lanes = pendingEffectsLanes;
+ pendingEffectsStatus = 0;
+ pendingEffectsRoot = null;
+ pendingEffectsLanes = 0;
+ if (0 !== (executionContext & 6))
+ throw Error("Cannot flush passive effects while already rendering.");
+ null !== injectedProfilingHooks &&
+ "function" === typeof injectedProfilingHooks.markPassiveEffectsStarted &&
+ injectedProfilingHooks.markPassiveEffectsStarted(lanes);
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ commitPassiveUnmountOnFiber(root$jscomp$0.current);
+ commitPassiveMountOnFiber(
+ root$jscomp$0,
+ root$jscomp$0.current,
+ lanes,
+ renderPriority
+ );
+ null !== injectedProfilingHooks &&
+ "function" === typeof injectedProfilingHooks.markPassiveEffectsStopped &&
+ injectedProfilingHooks.markPassiveEffectsStopped();
+ executionContext = prevExecutionContext;
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
+ } catch (err) {}
+ var stateNode = root$jscomp$0.current.stateNode;
+ stateNode.effectDuration = 0;
+ stateNode.passiveEffectDuration = 0;
+ return !0;
+ } finally {
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = prevTransition),
+ releaseRootPooledCache(root, remainingLanes);
}
- return !1;
}
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
@@ -9588,6 +9687,9 @@ function resolveRetryWakeable(boundaryFiber, wakeable) {
null !== retryCache && retryCache.delete(wakeable);
retryTimedOutBoundary(boundaryFiber, retryLane);
}
+function scheduleCallback(priorityLevel, callback) {
+ return scheduleCallback$3(priorityLevel, callback);
+}
function FiberNode(tag, pendingProps, key, mode) {
this.tag = tag;
this.key = key;
@@ -9643,7 +9745,7 @@ function createWorkInProgress(current, pendingProps) {
(workInProgress.deletions = null),
(workInProgress.actualDuration = -0),
(workInProgress.actualStartTime = -1.1));
- workInProgress.flags = current.flags & 31457280;
+ workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -9664,7 +9766,7 @@ function createWorkInProgress(current, pendingProps) {
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
- workInProgress.flags &= 31457282;
+ workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
@@ -9856,11 +9958,7 @@ function FiberRootNode(
) {
this.tag = tag;
this.containerInfo = containerInfo;
- this.finishedWork =
- this.pingCache =
- this.current =
- this.pendingChildren =
- null;
+ this.pingCache = this.current = this.pendingChildren = null;
this.timeoutHandle = -1;
this.callbackNode =
this.next =
@@ -9873,7 +9971,6 @@ function FiberRootNode(
this.entangledLanes =
this.shellSuspendCounter =
this.errorRecoveryDisabledLanes =
- this.finishedLanes =
this.expiredLanes =
this.warmLanes =
this.pingedLanes =
@@ -10285,17 +10382,17 @@ function wrapFiber(fiber) {
fiberToWrapper.set(fiber, wrapper));
return wrapper;
}
-var internals$jscomp$inline_1243 = {
+var internals$jscomp$inline_1215 = {
bundleType: 0,
- version: "19.1.0-native-fb-a9bbe346-20241219",
+ version: "19.1.0-native-fb-a160102f-20250107",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.1.0-native-fb-a9bbe346-20241219",
+ reconcilerVersion: "19.1.0-native-fb-a160102f-20250107",
getLaneLabelMap: function () {
for (
- var map = new Map(), lane = 1, index$147 = 0;
- 31 > index$147;
- index$147++
+ var map = new Map(), lane = 1, index$148 = 0;
+ 31 > index$148;
+ index$148++
) {
var label = getLabelForLane(lane);
map.set(lane, label);
@@ -10308,16 +10405,16 @@ var internals$jscomp$inline_1243 = {
}
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
- var hook$jscomp$inline_1519 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+ var hook$jscomp$inline_1455 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
- !hook$jscomp$inline_1519.isDisabled &&
- hook$jscomp$inline_1519.supportsFiber
+ !hook$jscomp$inline_1455.isDisabled &&
+ hook$jscomp$inline_1455.supportsFiber
)
try {
- (rendererID = hook$jscomp$inline_1519.inject(
- internals$jscomp$inline_1243
+ (rendererID = hook$jscomp$inline_1455.inject(
+ internals$jscomp$inline_1215
)),
- (injectedHook = hook$jscomp$inline_1519);
+ (injectedHook = hook$jscomp$inline_1455);
} catch (err) {}
}
exports._Scheduler = Scheduler;
@@ -10441,4 +10538,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
-exports.version = "19.1.0-native-fb-a9bbe346-20241219";
+exports.version = "19.1.0-native-fb-a160102f-20250107";
diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js
index 7dc5c97a8e862..8ab2f1b492e62 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<<897157d62f13bcf2e48c6dabe7590167>>
+ * @generated SignedSource<>
*/
"use strict";
@@ -1824,7 +1824,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
- exports.version = "19.1.0-native-fb-a9bbe346-20241219";
+ exports.version = "19.1.0-native-fb-a160102f-20250107";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js
index 737295cccd470..dc94de68873cb 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<<92de39d104ea6a1e1823ac6c3d080a25>>
+ * @generated SignedSource<<1deca92dc70288f2dba1966259c14cf7>>
*/
"use strict";
@@ -592,4 +592,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
-exports.version = "19.1.0-native-fb-a9bbe346-20241219";
+exports.version = "19.1.0-native-fb-a160102f-20250107";
diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js
index 5dc8debb67a33..59052132f5a81 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<>
+ * @generated SignedSource<>
*/
"use strict";
@@ -596,7 +596,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
-exports.version = "19.1.0-native-fb-a9bbe346-20241219";
+exports.version = "19.1.0-native-fb-a160102f-20250107";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/scheduler/cjs/Scheduler-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/scheduler/cjs/Scheduler-dev.js
index 8335cd75ba860..da39b7fd0977d 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/scheduler/cjs/Scheduler-dev.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/scheduler/cjs/Scheduler-dev.js
@@ -7,19 +7,22 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<>
+ * @generated SignedSource<>
*/
"use strict";
__DEV__ &&
(function () {
function performWorkUntilDeadline() {
+ needsPaint = !1;
if (isMessageLoopRunning) {
var currentTime = exports.unstable_now();
startTime = currentTime;
var hasMoreWork = !0;
try {
a: {
+ null !== eventLog &&
+ logEvent([8, 1e3 * currentTime, mainThreadIdCounter]);
isHostCallbackScheduled = !1;
isHostTimeoutScheduled &&
((isHostTimeoutScheduled = !1),
@@ -28,49 +31,83 @@ __DEV__ &&
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
- b: {
- advanceTimers(currentTime);
- for (currentTask = peek(taskQueue); null !== currentTask; ) {
- var callback = currentTask.callback;
- if ("function" === typeof callback) {
- currentTask.callback = null;
- currentPriorityLevel = currentTask.priorityLevel;
- var continuationCallback = callback(
- currentTask.expirationTime <= currentTime
+ try {
+ b: {
+ advanceTimers(currentTime);
+ for (
+ currentTask = peek(taskQueue);
+ null !== currentTask &&
+ !(
+ currentTask.expirationTime > currentTime &&
+ shouldYieldToHost()
);
- currentTime = exports.unstable_now();
- if ("function" === typeof continuationCallback) {
- currentTask.callback = continuationCallback;
+
+ ) {
+ var callback = currentTask.callback;
+ if ("function" === typeof callback) {
+ currentTask.callback = null;
+ currentPriorityLevel = currentTask.priorityLevel;
+ var didUserCallbackTimeout =
+ currentTask.expirationTime <= currentTime,
+ task = currentTask,
+ ms = currentTime;
+ runIdCounter++;
+ null !== eventLog &&
+ logEvent([5, 1e3 * ms, task.id, runIdCounter]);
+ var continuationCallback = callback(
+ didUserCallbackTimeout
+ );
+ currentTime = exports.unstable_now();
+ if ("function" === typeof continuationCallback) {
+ currentTask.callback = continuationCallback;
+ null !== eventLog &&
+ logEvent([
+ 6,
+ 1e3 * currentTime,
+ currentTask.id,
+ runIdCounter
+ ]);
+ advanceTimers(currentTime);
+ hasMoreWork = !0;
+ break b;
+ }
+ null !== eventLog &&
+ logEvent([2, 1e3 * currentTime, currentTask.id]);
+ currentTask.isQueued = !1;
+ currentTask === peek(taskQueue) && pop(taskQueue);
advanceTimers(currentTime);
- hasMoreWork = !0;
- break b;
- }
- currentTask === peek(taskQueue) && pop(taskQueue);
- advanceTimers(currentTime);
- } else pop(taskQueue);
- currentTask = peek(taskQueue);
- if (
- null === currentTask ||
- currentTask.expirationTime > currentTime
- )
- break;
+ } else pop(taskQueue);
+ currentTask = peek(taskQueue);
+ }
+ if (null !== currentTask) hasMoreWork = !0;
+ else {
+ var firstTimer = peek(timerQueue);
+ null !== firstTimer &&
+ requestHostTimeout(
+ handleTimeout,
+ firstTimer.startTime - currentTime
+ );
+ hasMoreWork = !1;
+ }
}
- if (null !== currentTask) hasMoreWork = !0;
- else {
- var firstTimer = peek(timerQueue);
- null !== firstTimer &&
- requestHostTimeout(
- handleTimeout,
- firstTimer.startTime - currentTime
- );
- hasMoreWork = !1;
+ break a;
+ } catch (error) {
+ if (null !== currentTask) {
+ var currentTime$jscomp$0 = exports.unstable_now();
+ null !== eventLog &&
+ logEvent([3, 1e3 * currentTime$jscomp$0, currentTask.id]);
+ currentTask.isQueued = !1;
}
+ throw error;
}
- break a;
} finally {
- (currentTask = null),
- (currentPriorityLevel = previousPriorityLevel),
- (isPerformingWork = !1);
+ currentTask = null;
+ currentPriorityLevel = previousPriorityLevel;
+ isPerformingWork = !1;
+ var ms$jscomp$0 = exports.unstable_now();
+ mainThreadIdCounter++;
+ null !== eventLog &&
+ logEvent([7, 1e3 * ms$jscomp$0, mainThreadIdCounter]);
}
hasMoreWork = void 0;
}
@@ -133,13 +170,44 @@ __DEV__ &&
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
+ function logEvent(entries) {
+ if (null !== eventLog) {
+ var offset = eventLogIndex;
+ eventLogIndex += entries.length;
+ if (eventLogIndex + 1 > eventLogSize) {
+ eventLogSize *= 2;
+ if (524288 < eventLogSize) {
+ console.error(
+ "Scheduler Profiling: Event log exceeded maximum size. Don't forget to call `stopLoggingProfilingEvents()`."
+ );
+ stopLoggingProfilingEvents();
+ return;
+ }
+ var newEventLog = new Int32Array(4 * eventLogSize);
+ newEventLog.set(eventLog);
+ eventLogBuffer = newEventLog.buffer;
+ eventLog = newEventLog;
+ }
+ eventLog.set(entries, offset);
+ }
+ }
+ function stopLoggingProfilingEvents() {
+ var buffer = eventLogBuffer;
+ eventLogSize = 0;
+ eventLog = eventLogBuffer = null;
+ eventLogIndex = 0;
+ return buffer;
+ }
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
- push(taskQueue, timer);
+ push(taskQueue, timer),
+ null !== eventLog &&
+ logEvent([1, 1e3 * currentTime, timer.id, timer.priorityLevel]),
+ (timer.isQueued = !0);
else break;
timer = peek(timerQueue);
}
@@ -161,6 +229,13 @@ __DEV__ &&
);
}
}
+ function shouldYieldToHost() {
+ return needsPaint
+ ? !0
+ : exports.unstable_now() - startTime < frameInterval
+ ? !1
+ : !0;
+ }
function requestHostTimeout(callback, ms) {
taskTimeoutID = localSetTimeout(function () {
callback(exports.unstable_now());
@@ -170,6 +245,12 @@ __DEV__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
+ var runIdCounter = 0,
+ mainThreadIdCounter = 0,
+ eventLogSize = 0,
+ eventLogBuffer = null,
+ eventLog = null,
+ eventLogIndex = 0;
exports.unstable_now = void 0;
if (
"object" === typeof performance &&
@@ -194,6 +275,7 @@ __DEV__ &&
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
+ needsPaint = !1,
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
localClearTimeout =
"function" === typeof clearTimeout ? clearTimeout : null,
@@ -218,13 +300,27 @@ __DEV__ &&
schedulePerformWorkUntilDeadline = function () {
localSetTimeout(performWorkUntilDeadline, 0);
};
+ channel = {
+ startLoggingProfilingEvents: function () {
+ eventLogSize = 131072;
+ eventLogBuffer = new ArrayBuffer(4 * eventLogSize);
+ eventLog = new Int32Array(eventLogBuffer);
+ eventLogIndex = 0;
+ },
+ stopLoggingProfilingEvents: stopLoggingProfilingEvents
+ };
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
- exports.unstable_Profiling = null;
+ exports.unstable_Profiling = channel;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_cancelCallback = function (task) {
+ if (task.isQueued) {
+ var currentTime = exports.unstable_now();
+ null !== eventLog && logEvent([4, 1e3 * currentTime, task.id]);
+ task.isQueued = !1;
+ }
task.callback = null;
};
exports.unstable_forceFrameRate = function (fps) {
@@ -255,7 +351,9 @@ __DEV__ &&
currentPriorityLevel = previousPriorityLevel;
}
};
- exports.unstable_requestPaint = function () {};
+ exports.unstable_requestPaint = function () {
+ needsPaint = !0;
+ };
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
@@ -311,7 +409,8 @@ __DEV__ &&
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
- sortIndex: -1
+ sortIndex: -1,
+ isQueued: !1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
@@ -324,6 +423,14 @@ __DEV__ &&
requestHostTimeout(handleTimeout, options - currentTime)))
: ((priorityLevel.sortIndex = timeout),
push(taskQueue, priorityLevel),
+ null !== eventLog &&
+ logEvent([
+ 1,
+ 1e3 * currentTime,
+ priorityLevel.id,
+ priorityLevel.priorityLevel
+ ]),
+ (priorityLevel.isQueued = !0),
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0),
@@ -332,9 +439,7 @@ __DEV__ &&
schedulePerformWorkUntilDeadline())));
return priorityLevel;
};
- exports.unstable_shouldYield = function () {
- return exports.unstable_now() - startTime < frameInterval ? !1 : !0;
- };
+ exports.unstable_shouldYield = shouldYieldToHost;
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel;
return function () {
diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/scheduler/cjs/SchedulerMock-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/scheduler/cjs/SchedulerMock-dev.js
index 626ef96f72010..d5c09a1b9e332 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/scheduler/cjs/SchedulerMock-dev.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/scheduler/cjs/SchedulerMock-dev.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<<5886fbc0f64ed5eebaca2fb991a78031>>
+ * @generated SignedSource<<48b071025d7f0a25695dc074cdce9c88>>
*/
"use strict";
@@ -65,13 +65,44 @@ __DEV__ &&
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
+ function logEvent(entries) {
+ if (null !== eventLog) {
+ var offset = eventLogIndex;
+ eventLogIndex += entries.length;
+ if (eventLogIndex + 1 > eventLogSize) {
+ eventLogSize *= 2;
+ if (524288 < eventLogSize) {
+ console.error(
+ "Scheduler Profiling: Event log exceeded maximum size. Don't forget to call `stopLoggingProfilingEvents()`."
+ );
+ stopLoggingProfilingEvents();
+ return;
+ }
+ var newEventLog = new Int32Array(4 * eventLogSize);
+ newEventLog.set(eventLog);
+ eventLogBuffer = newEventLog.buffer;
+ eventLog = newEventLog;
+ }
+ eventLog.set(entries, offset);
+ }
+ }
+ function stopLoggingProfilingEvents() {
+ var buffer = eventLogBuffer;
+ eventLogSize = 0;
+ eventLog = eventLogBuffer = null;
+ eventLogIndex = 0;
+ return buffer;
+ }
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
- push(taskQueue, timer);
+ push(taskQueue, timer),
+ null !== eventLog &&
+ logEvent([1, 1e3 * currentTime, timer.id, timer.priorityLevel]),
+ (timer.isQueued = !0);
else break;
timer = peek(timerQueue);
}
@@ -91,6 +122,8 @@ __DEV__ &&
}
}
function flushWork(hasTimeRemaining, initialTime) {
+ null !== eventLog &&
+ logEvent([8, 1e3 * initialTime, mainThreadIdCounter]);
isHostCallbackScheduled = !1;
isHostTimeoutScheduled &&
((isHostTimeoutScheduled = !1),
@@ -99,54 +132,83 @@ __DEV__ &&
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
- a: {
- advanceTimers(initialTime);
- for (
- currentTask = peek(taskQueue);
- null !== currentTask &&
- (!(currentTask.expirationTime > initialTime) ||
- (hasTimeRemaining && !shouldYieldToHost()));
+ try {
+ a: {
+ advanceTimers(initialTime);
+ for (
+ currentTask = peek(taskQueue);
+ null !== currentTask &&
+ (!(currentTask.expirationTime > initialTime) ||
+ (hasTimeRemaining && !shouldYieldToHost()));
- ) {
- var callback = currentTask.callback;
- if ("function" === typeof callback) {
- currentTask.callback = null;
- currentPriorityLevel = currentTask.priorityLevel;
- var continuationCallback = callback(
- currentTask.expirationTime <= initialTime
- );
- initialTime = currentMockTime;
- if ("function" === typeof continuationCallback) {
- if (
- ((currentTask.callback = continuationCallback),
- advanceTimers(initialTime),
- shouldYieldForPaint)
- ) {
- var JSCompiler_inline_result = (needsPaint = !0);
- break a;
- }
- } else
- currentTask === peek(taskQueue) && pop(taskQueue),
- advanceTimers(initialTime);
- } else pop(taskQueue);
- currentTask = peek(taskQueue);
- }
- if (null !== currentTask) JSCompiler_inline_result = !0;
- else {
- var firstTimer = peek(timerQueue);
- if (null !== firstTimer) {
- var ms = firstTimer.startTime - initialTime;
- scheduledTimeout = handleTimeout;
- timeoutTime = currentMockTime + ms;
+ ) {
+ var callback = currentTask.callback;
+ if ("function" === typeof callback) {
+ currentTask.callback = null;
+ currentPriorityLevel = currentTask.priorityLevel;
+ var didUserCallbackTimeout =
+ currentTask.expirationTime <= initialTime,
+ task = currentTask,
+ ms = initialTime;
+ runIdCounter++;
+ null !== eventLog &&
+ logEvent([5, 1e3 * ms, task.id, runIdCounter]);
+ var continuationCallback = callback(didUserCallbackTimeout);
+ initialTime = currentMockTime;
+ if ("function" === typeof continuationCallback) {
+ if (
+ ((currentTask.callback = continuationCallback),
+ null !== eventLog &&
+ logEvent([
+ 6,
+ 1e3 * initialTime,
+ currentTask.id,
+ runIdCounter
+ ]),
+ advanceTimers(initialTime),
+ shouldYieldForPaint)
+ ) {
+ var JSCompiler_inline_result = (needsPaint = !0);
+ break a;
+ }
+ } else
+ null !== eventLog &&
+ logEvent([2, 1e3 * initialTime, currentTask.id]),
+ (currentTask.isQueued = !1),
+ currentTask === peek(taskQueue) && pop(taskQueue),
+ advanceTimers(initialTime);
+ } else pop(taskQueue);
+ currentTask = peek(taskQueue);
+ }
+ if (null !== currentTask) JSCompiler_inline_result = !0;
+ else {
+ var firstTimer = peek(timerQueue);
+ if (null !== firstTimer) {
+ var ms$jscomp$0 = firstTimer.startTime - initialTime;
+ scheduledTimeout = handleTimeout;
+ timeoutTime = currentMockTime + ms$jscomp$0;
+ }
+ JSCompiler_inline_result = !1;
}
- JSCompiler_inline_result = !1;
}
+ return JSCompiler_inline_result;
+ } catch (error) {
+ throw (
+ (null !== currentTask &&
+ ((hasTimeRemaining = currentMockTime),
+ null !== eventLog &&
+ logEvent([3, 1e3 * hasTimeRemaining, currentTask.id]),
+ (currentTask.isQueued = !1)),
+ error)
+ );
}
- return JSCompiler_inline_result;
} finally {
(currentTask = null),
(currentPriorityLevel = previousPriorityLevel),
- (isPerformingWork = !1);
+ (isPerformingWork = !1),
+ mainThreadIdCounter++,
+ null !== eventLog &&
+ logEvent([7, 1e3 * currentMockTime, mainThreadIdCounter]);
}
}
function shouldYieldToHost() {
@@ -174,7 +236,13 @@ __DEV__ &&
}
} else return !1;
}
- var taskQueue = [],
+ var runIdCounter = 0,
+ mainThreadIdCounter = 0,
+ eventLogSize = 0,
+ eventLogBuffer = null,
+ eventLog = null,
+ eventLogIndex = 0,
+ taskQueue = [],
timerQueue = [],
taskIdCounter = 1,
currentTask = null,
@@ -192,7 +260,16 @@ __DEV__ &&
isFlushing = !1,
needsPaint = !1,
shouldYieldForPaint = !1,
- disableYieldValue = !1;
+ disableYieldValue = !1,
+ unstable_Profiling = {
+ startLoggingProfilingEvents: function () {
+ eventLogSize = 131072;
+ eventLogBuffer = new ArrayBuffer(4 * eventLogSize);
+ eventLog = new Int32Array(eventLogBuffer);
+ eventLogIndex = 0;
+ },
+ stopLoggingProfilingEvents: stopLoggingProfilingEvents
+ };
exports.log = function (value) {
"disabledLog" === console.log.name ||
disableYieldValue ||
@@ -213,7 +290,7 @@ __DEV__ &&
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
- exports.unstable_Profiling = null;
+ exports.unstable_Profiling = unstable_Profiling;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_advanceTime = function (ms) {
"disabledLog" === console.log.name ||
@@ -226,6 +303,11 @@ __DEV__ &&
(scheduledTimeout = null)));
};
exports.unstable_cancelCallback = function (task) {
+ if (task.isQueued) {
+ var currentTime = currentMockTime;
+ null !== eventLog && logEvent([4, 1e3 * currentTime, task.id]);
+ task.isQueued = !1;
+ }
task.callback = null;
};
exports.unstable_clearLog = function () {
@@ -378,7 +460,8 @@ __DEV__ &&
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
- sortIndex: -1
+ sortIndex: -1,
+ isQueued: !1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
@@ -392,6 +475,14 @@ __DEV__ &&
(timeoutTime = currentMockTime + (options - currentTime))))
: ((priorityLevel.sortIndex = timeout),
push(taskQueue, priorityLevel),
+ null !== eventLog &&
+ logEvent([
+ 1,
+ 1e3 * currentTime,
+ priorityLevel.id,
+ priorityLevel.priorityLevel
+ ]),
+ (priorityLevel.isQueued = !0),
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)));
diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION
index b7f5bdda2aadc..288244db3410c 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION
+++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION
@@ -1 +1 @@
-a9bbe34622885ef5667d33236d580fe7321c0d8b
+a160102f3aedae0da2d692e7cf53b28a011b7bc9
diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js
index b9058e2e9cf3e..912d05066b05f 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<<127878892f5ca44751dd11b9221f4e55>>
+ * @generated SignedSource<<28c0e7f906c0556fbf1e599197ef9508>>
*/
"use strict";
@@ -79,7 +79,7 @@ __DEV__ &&
}
function scheduleRoot(root, element) {
root.context === emptyContextObject &&
- (0 === root.tag && flushPassiveEffects(),
+ (0 === root.tag && flushPendingEffects(),
updateContainerImpl(root.current, 2, element, root, null, null),
flushSyncWork());
}
@@ -87,7 +87,7 @@ __DEV__ &&
if (null !== resolveFamily) {
var staleFamilies = update.staleFamilies;
update = update.updatedFamilies;
- flushPassiveEffects();
+ flushPendingEffects();
scheduleFibersWithFamiliesRecursively(
root.current,
update,
@@ -1530,41 +1530,6 @@ __DEV__ &&
}
return hook.checkDCE ? !0 : !1;
}
- function onCommitRoot(root, eventPriority) {
- if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
- try {
- var didError = 128 === (root.current.flags & 128);
- switch (eventPriority) {
- case DiscreteEventPriority:
- var schedulerPriority = ImmediatePriority;
- break;
- case ContinuousEventPriority:
- schedulerPriority = UserBlockingPriority;
- break;
- case DefaultEventPriority:
- schedulerPriority = NormalPriority$1;
- break;
- case IdleEventPriority:
- schedulerPriority = IdlePriority;
- break;
- default:
- schedulerPriority = NormalPriority$1;
- }
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- schedulerPriority,
- didError
- );
- } catch (err) {
- hasLoggedError ||
- ((hasLoggedError = !0),
- error$jscomp$0(
- "React instrumentation encountered an error: %s",
- err
- ));
- }
- }
function setIsStrictModeForDevtools(newIsStrictMode) {
"function" === typeof log$1 &&
(unstable_setDisableYieldValue(newIsStrictMode),
@@ -1694,14 +1659,13 @@ __DEV__ &&
);
}
}
- function getNextLanes(root, wipLanes) {
+ function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0,
suspendedLanes = root.suspendedLanes,
- pingedLanes = root.pingedLanes,
- warmLanes = root.warmLanes;
- root = 0 !== root.finishedLanes;
+ pingedLanes = root.pingedLanes;
+ root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes
? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
@@ -1711,29 +1675,30 @@ __DEV__ &&
0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = nonIdlePendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes)))))
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes =
+ getHighestPriorityLanes(rootHasPendingCommit)))))
: ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
0 !== nonIdlePendingLanes
? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
: 0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = pendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes))));
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = pendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes
? 0
: 0 !== wipLanes &&
wipLanes !== nextLanes &&
0 === (wipLanes & suspendedLanes) &&
((suspendedLanes = nextLanes & -nextLanes),
- (warmLanes = wipLanes & -wipLanes),
- suspendedLanes >= warmLanes ||
- (32 === suspendedLanes && 0 !== (warmLanes & 4194176)))
+ (rootHasPendingCommit = wipLanes & -wipLanes),
+ suspendedLanes >= rootHasPendingCommit ||
+ (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176)))
? wipLanes
: nextLanes;
}
@@ -2990,11 +2955,9 @@ __DEV__ &&
mightHavePendingSyncWork = !0;
null !== ReactSharedInternals.actQueue
? didScheduleMicrotask_act ||
- ((didScheduleMicrotask_act = !0),
- scheduleImmediateTask(processRootScheduleInMicrotask))
+ ((didScheduleMicrotask_act = !0), scheduleImmediateRootScheduleTask())
: didScheduleMicrotask ||
- ((didScheduleMicrotask = !0),
- scheduleImmediateTask(processRootScheduleInMicrotask));
+ ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());
ReactSharedInternals.isBatchingLegacy &&
0 === root.tag &&
(ReactSharedInternals.didScheduleLegacyUpdate = !0);
@@ -3029,7 +2992,9 @@ __DEV__ &&
(nextLanes = workInProgressRootRenderLanes),
(nextLanes = getNextLanes(
root,
- root === workInProgressRoot ? nextLanes : 0
+ root === workInProgressRoot ? nextLanes : 0,
+ null !== root.cancelPendingCommit ||
+ root.timeoutHandle !== noTimeout
)),
0 === (nextLanes & 3) ||
checkIfRootIsPrerendering(root, nextLanes) ||
@@ -3041,6 +3006,9 @@ __DEV__ &&
isFlushingWork = !1;
}
}
+ function processRootScheduleInImmediateTask() {
+ processRootScheduleInMicrotask();
+ }
function processRootScheduleInMicrotask() {
mightHavePendingSyncWork =
didScheduleMicrotask_act =
@@ -3086,7 +3054,8 @@ __DEV__ &&
suspendedLanes = workInProgressRootRenderLanes;
suspendedLanes = getNextLanes(
root,
- root === currentTime ? suspendedLanes : 0
+ root === currentTime ? suspendedLanes : 0,
+ null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout
);
pingedLanes = root.callbackNode;
if (
@@ -3144,14 +3113,22 @@ __DEV__ &&
}
function performWorkOnRootViaSchedulerTask(root, didTimeout) {
nestedUpdateScheduled = currentUpdateIsNested = !1;
+ if (
+ pendingEffectsStatus !== NO_PENDING_EFFECTS &&
+ pendingEffectsStatus !== PENDING_PASSIVE_PHASE
+ )
+ return (root.callbackNode = null), (root.callbackPriority = 0), null;
var originalCallbackNode = root.callbackNode;
- if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
+ if (flushPendingEffects(!0) && root.callbackNode !== originalCallbackNode)
return null;
var workInProgressRootRenderLanes$jscomp$0 =
workInProgressRootRenderLanes;
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
root,
- root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0
+ root === workInProgressRoot
+ ? workInProgressRootRenderLanes$jscomp$0
+ : 0,
+ null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout
);
if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
performWorkOnRoot(
@@ -3166,7 +3143,7 @@ __DEV__ &&
: null;
}
function performSyncWorkOnRoot(root, lanes) {
- if (flushPassiveEffects()) return null;
+ if (flushPendingEffects()) return null;
currentUpdateIsNested = nestedUpdateScheduled;
nestedUpdateScheduled = !1;
performWorkOnRoot(root, lanes, !0);
@@ -3176,19 +3153,25 @@ __DEV__ &&
null !== callbackNode &&
cancelCallback$1(callbackNode);
}
- function scheduleImmediateTask(cb) {
+ function scheduleImmediateRootScheduleTask() {
null !== ReactSharedInternals.actQueue &&
ReactSharedInternals.actQueue.push(function () {
- cb();
+ processRootScheduleInMicrotask();
return null;
});
supportsMicrotasks
? scheduleMicrotask(function () {
(executionContext & (RenderContext | CommitContext)) !== NoContext
- ? scheduleCallback$3(ImmediatePriority, cb)
- : cb();
+ ? scheduleCallback$3(
+ ImmediatePriority,
+ processRootScheduleInImmediateTask
+ )
+ : processRootScheduleInMicrotask();
})
- : scheduleCallback$3(ImmediatePriority, cb);
+ : scheduleCallback$3(
+ ImmediatePriority,
+ processRootScheduleInImmediateTask
+ );
}
function requestTransitionLane() {
0 === currentEventTransitionLane &&
@@ -3974,7 +3957,7 @@ __DEV__ &&
null;
hookTypesUpdateIndexDev = -1;
null !== current &&
- (current.flags & 31457280) !== (workInProgress.flags & 31457280) &&
+ (current.flags & 29360128) !== (workInProgress.flags & 29360128) &&
0 !== (current.mode & 1) &&
error$jscomp$0(
"Internal React error: Expected static flag was missing. Please notify the React team."
@@ -7538,14 +7521,14 @@ __DEV__ &&
if (null === ref)
null !== current &&
null !== current.ref &&
- (workInProgress.flags |= 2097664);
+ (workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
);
if (null === current || current.ref !== ref)
- workInProgress.flags |= 2097664;
+ workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
@@ -8259,7 +8242,7 @@ __DEV__ &&
(nextProps.treeBaseDuration = didSuspend.treeBaseDuration)),
(workInProgress.deletions = null))
: ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)),
- (nextProps.subtreeFlags = didSuspend.subtreeFlags & 31457280));
+ (nextProps.subtreeFlags = didSuspend.subtreeFlags & 29360128));
null !== currentFallbackChildFragment
? (nextPrimaryChildren = createWorkInProgress(
currentFallbackChildFragment,
@@ -9407,8 +9390,8 @@ __DEV__ &&
)
(newChildLanes |= _child2.lanes | _child2.childLanes),
- (subtreeFlags |= _child2.subtreeFlags & 31457280),
- (subtreeFlags |= _child2.flags & 31457280),
+ (subtreeFlags |= _child2.subtreeFlags & 29360128),
+ (subtreeFlags |= _child2.flags & 29360128),
(_treeBaseDuration += _child2.treeBaseDuration),
(_child2 = _child2.sibling);
completedWork.treeBaseDuration = _treeBaseDuration;
@@ -9420,8 +9403,8 @@ __DEV__ &&
)
(newChildLanes |=
_treeBaseDuration.lanes | _treeBaseDuration.childLanes),
- (subtreeFlags |= _treeBaseDuration.subtreeFlags & 31457280),
- (subtreeFlags |= _treeBaseDuration.flags & 31457280),
+ (subtreeFlags |= _treeBaseDuration.subtreeFlags & 29360128),
+ (subtreeFlags |= _treeBaseDuration.flags & 29360128),
(_treeBaseDuration.return = completedWork),
(_treeBaseDuration = _treeBaseDuration.sibling);
else if (0 !== (completedWork.mode & 2)) {
@@ -10569,7 +10552,7 @@ __DEV__ &&
if (
((root = nextEffect),
(firstChild = root.child),
- 0 !== (root.subtreeFlags & 1028) && null !== firstChild)
+ 0 !== (root.subtreeFlags & 1024) && null !== firstChild)
)
(firstChild.return = root), (nextEffect = firstChild);
else
@@ -10611,9 +10594,6 @@ __DEV__ &&
}
nextEffect = root.return;
}
- root = shouldFireAfterActiveInstanceBlur;
- shouldFireAfterActiveInstanceBlur = !1;
- return root;
}
function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
var flags = finishedWork.flags;
@@ -11012,12 +10992,6 @@ __DEV__ &&
}
});
}
- function commitMutationEffects(root, finishedWork, committedLanes) {
- inProgressLanes = committedLanes;
- inProgressRoot = root;
- commitMutationEffectsOnFiber(finishedWork, root);
- inProgressRoot = inProgressLanes = null;
- }
function recursivelyTraverseMutationEffects(root, parentFiber) {
var deletions = parentFiber.deletions;
if (null !== deletions)
@@ -11236,12 +11210,6 @@ __DEV__ &&
}
flags & 4096 && (finishedWork.flags &= -4097);
}
- function commitLayoutEffects(finishedWork, root, committedLanes) {
- inProgressLanes = committedLanes;
- inProgressRoot = root;
- commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);
- inProgressRoot = inProgressLanes = null;
- }
function recursivelyTraverseLayoutEffects(root, parentFiber) {
if (parentFiber.subtreeFlags & 8772)
for (parentFiber = parentFiber.child; null !== parentFiber; )
@@ -11486,6 +11454,14 @@ __DEV__ &&
flags & 2048 &&
commitHookPassiveMountEffects(finishedWork, Passive | HasEffect);
break;
+ case 1:
+ recursivelyTraversePassiveMountEffects(
+ finishedRoot,
+ finishedWork,
+ committedLanes,
+ committedTransitions
+ );
+ break;
case 3:
var prevEffectDuration = pushNestedEffectDurations();
recursivelyTraversePassiveMountEffects(
@@ -12184,9 +12160,9 @@ __DEV__ &&
break;
}
a: {
- renderWasConcurrent = root;
- shouldTimeSlice = exitStatus;
- switch (shouldTimeSlice) {
+ shouldTimeSlice = root;
+ renderWasConcurrent = exitStatus;
+ switch (renderWasConcurrent) {
case RootInProgress:
case RootFatalErrored:
throw Error("Root did not complete. This is a bug in React.");
@@ -12194,7 +12170,7 @@ __DEV__ &&
if ((lanes & 4194176) !== lanes) break;
case RootSuspendedAtTheShell:
markRootSuspended(
- renderWasConcurrent,
+ shouldTimeSlice,
lanes,
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
@@ -12209,45 +12185,23 @@ __DEV__ &&
default:
throw Error("Unknown root exit status.");
}
- renderWasConcurrent.finishedWork = forceSync;
- renderWasConcurrent.finishedLanes = lanes;
- if (null !== ReactSharedInternals.actQueue) {
- lanes = renderWasConcurrent;
- forceSync = workInProgressRootRecoverableErrors;
- renderWasConcurrent = workInProgressTransitions;
- exitStatus = workInProgressRootDidIncludeRecursiveRenderUpdate;
- lanesThatJustErrored = workInProgressDeferredLane;
- originallyAttemptedLanes =
- workInProgressRootInterleavedUpdatedLanes;
- wasRootDehydrated = workInProgressSuspendedRetryLanes;
- var suspendedCommitReason = IMMEDIATE_COMMIT,
- prevTransition = ReactSharedInternals.T,
- previousUpdateLanePriority = currentUpdatePriority;
- try {
- (currentUpdatePriority = DiscreteEventPriority),
- (ReactSharedInternals.T = null),
- commitRootImpl(
- lanes,
- forceSync,
- renderWasConcurrent,
- exitStatus,
- previousUpdateLanePriority,
- lanesThatJustErrored,
- originallyAttemptedLanes,
- wasRootDehydrated,
- shouldTimeSlice,
- suspendedCommitReason,
- -0,
- 0
- );
- } finally {
- (ReactSharedInternals.T = prevTransition),
- (currentUpdatePriority = previousUpdateLanePriority);
- }
- } else {
+ if (null !== ReactSharedInternals.actQueue)
+ commitRoot(
+ shouldTimeSlice,
+ forceSync,
+ lanes,
+ workInProgressRootRecoverableErrors,
+ workInProgressTransitions,
+ workInProgressRootDidIncludeRecursiveRenderUpdate,
+ workInProgressDeferredLane,
+ workInProgressRootInterleavedUpdatedLanes,
+ workInProgressSuspendedRetryLanes
+ );
+ else {
if (
(lanes & 62914560) === lanes &&
- (alwaysThrottleRetries || shouldTimeSlice === RootSuspended) &&
+ (alwaysThrottleRetries ||
+ renderWasConcurrent === RootSuspended) &&
((exitStatus =
globalMostRecentFallbackTime +
FALLBACK_THROTTLE_MS -
@@ -12255,16 +12209,16 @@ __DEV__ &&
10 < exitStatus)
) {
markRootSuspended(
- renderWasConcurrent,
+ shouldTimeSlice,
lanes,
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
- if (0 !== getNextLanes(renderWasConcurrent, 0)) break a;
- renderWasConcurrent.timeoutHandle = scheduleTimeout(
+ if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;
+ shouldTimeSlice.timeoutHandle = scheduleTimeout(
commitRootWhenReady.bind(
null,
- renderWasConcurrent,
+ shouldTimeSlice,
forceSync,
workInProgressRootRecoverableErrors,
workInProgressTransitions,
@@ -12274,7 +12228,7 @@ __DEV__ &&
workInProgressRootInterleavedUpdatedLanes,
workInProgressSuspendedRetryLanes,
workInProgressRootDidSkipSuspendedSiblings,
- shouldTimeSlice,
+ renderWasConcurrent,
THROTTLED_COMMIT,
-0,
0
@@ -12284,7 +12238,7 @@ __DEV__ &&
break a;
}
commitRootWhenReady(
- renderWasConcurrent,
+ shouldTimeSlice,
forceSync,
workInProgressRootRecoverableErrors,
workInProgressTransitions,
@@ -12294,7 +12248,7 @@ __DEV__ &&
workInProgressRootInterleavedUpdatedLanes,
workInProgressSuspendedRetryLanes,
workInProgressRootDidSkipSuspendedSiblings,
- shouldTimeSlice,
+ renderWasConcurrent,
IMMEDIATE_COMMIT,
-0,
0
@@ -12315,39 +12269,23 @@ __DEV__ &&
lanes,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- didSkipSuspendedSiblings,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
+ suspendedRetryLanes
) {
- lanes = finishedWork.subtreeFlags;
- (lanes & 8192 || 16785408 === (lanes & 16785408)) &&
+ root.timeoutHandle = noTimeout;
+ var subtreeFlags = finishedWork.subtreeFlags;
+ (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) &&
accumulateSuspenseyCommitOnFiber(finishedWork);
- finishedWork = ReactSharedInternals.T;
- lanes = currentUpdatePriority;
- try {
- (currentUpdatePriority = DiscreteEventPriority),
- (ReactSharedInternals.T = null),
- commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- lanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
- );
- } finally {
- (ReactSharedInternals.T = finishedWork),
- (currentUpdatePriority = lanes);
- }
+ commitRoot(
+ root,
+ finishedWork,
+ lanes,
+ recoverableErrors,
+ transitions,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+ );
}
function isRenderConsistentWithExternalStores(finishedWork) {
for (var node = finishedWork; ; ) {
@@ -12429,8 +12367,6 @@ __DEV__ &&
}
}
function prepareFreshStack(root, lanes) {
- root.finishedWork = null;
- root.finishedLanes = 0;
var timeoutHandle = root.timeoutHandle;
timeoutHandle !== noTimeout &&
((root.timeoutHandle = noTimeout), cancelTimeout(timeoutHandle));
@@ -12813,7 +12749,7 @@ __DEV__ &&
}
null !== ReactSharedInternals.actQueue
? workLoopSync()
- : workLoopConcurrent();
+ : workLoopConcurrentByScheduler();
break;
} catch (thrownValue$31) {
handleThrow(root, thrownValue$31);
@@ -12836,7 +12772,7 @@ __DEV__ &&
finishQueueingConcurrentUpdates();
return workInProgressRootExitStatus;
}
- function workLoopConcurrent() {
+ function workLoopConcurrentByScheduler() {
for (; null !== workInProgress && !shouldYield(); )
performUnitOfWork(workInProgress);
}
@@ -13046,140 +12982,251 @@ __DEV__ &&
workInProgressRootExitStatus = RootSuspendedAtTheShell;
workInProgress = null;
}
- function commitRootImpl(
+ function commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
- renderPriorityLevel,
spawnedLane,
updatedLanes,
suspendedRetryLanes
) {
- do flushPassiveEffects();
- while (null !== rootWithPendingPassiveEffects);
+ root.cancelPendingCommit = null;
+ do flushPendingEffects();
+ while (pendingEffectsStatus !== NO_PENDING_EFFECTS);
ReactStrictModeWarnings.flushLegacyContextWarning();
ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
throw Error("Should not already be working.");
- var finishedWork = root.finishedWork;
- didIncludeRenderPhaseUpdate = root.finishedLanes;
null !== injectedProfilingHooks &&
"function" === typeof injectedProfilingHooks.markCommitStarted &&
- injectedProfilingHooks.markCommitStarted(didIncludeRenderPhaseUpdate);
- if (null === finishedWork) return markCommitStopped(), null;
- 0 === didIncludeRenderPhaseUpdate &&
- error$jscomp$0(
- "root.finishedLanes should not be empty during a commit. This is a bug in React."
- );
- root.finishedWork = null;
- root.finishedLanes = 0;
- if (finishedWork === root.current)
- throw Error(
- "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ injectedProfilingHooks.markCommitStarted(lanes);
+ if (null === finishedWork) markCommitStopped();
+ else {
+ 0 === lanes &&
+ error$jscomp$0(
+ "finishedLanes should not be empty during a commit. This is a bug in React."
+ );
+ if (finishedWork === root.current)
+ throw Error(
+ "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ );
+ didIncludeRenderPhaseUpdate =
+ finishedWork.lanes | finishedWork.childLanes;
+ didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
+ markRootFinished(
+ root,
+ lanes,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
);
- var remainingLanes = finishedWork.lanes | finishedWork.childLanes;
- remainingLanes |= concurrentlyUpdatedLanes;
- markRootFinished(
- root,
- didIncludeRenderPhaseUpdate,
- remainingLanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes
- );
- root === workInProgressRoot &&
- ((workInProgress = workInProgressRoot = null),
- (workInProgressRootRenderLanes = 0));
- spawnedLane = !1;
- 0 !== (finishedWork.subtreeFlags & 10256) ||
- 0 !== (finishedWork.flags & 10256)
- ? ((spawnedLane = !0),
- (pendingPassiveEffectsRemainingLanes = remainingLanes),
- (pendingPassiveTransitions = transitions),
- (root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null),
- scheduleCallback(NormalPriority$1, function () {
- flushPassiveEffects(!0);
- return null;
- }))
- : ((root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null));
- commitStartTime = now();
- transitions = 0 !== (finishedWork.flags & 15990);
- 0 !== (finishedWork.subtreeFlags & 15990) || transitions
- ? ((transitions = ReactSharedInternals.T),
- (ReactSharedInternals.T = null),
- (updatedLanes = currentUpdatePriority),
- (currentUpdatePriority = DiscreteEventPriority),
- (suspendedRetryLanes = executionContext),
- (executionContext |= CommitContext),
- commitBeforeMutationEffects(root, finishedWork),
- commitMutationEffects(
- root,
- finishedWork,
- didIncludeRenderPhaseUpdate
- ),
- (root.current = finishedWork),
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markLayoutEffectsStarted &&
- injectedProfilingHooks.markLayoutEffectsStarted(
- didIncludeRenderPhaseUpdate
- ),
- commitLayoutEffects(finishedWork, root, didIncludeRenderPhaseUpdate),
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markLayoutEffectsStopped &&
- injectedProfilingHooks.markLayoutEffectsStopped(),
- requestPaint(),
- (executionContext = suspendedRetryLanes),
- (currentUpdatePriority = updatedLanes),
- (ReactSharedInternals.T = transitions))
- : (root.current = finishedWork);
- (transitions = spawnedLane)
- ? ((spawnedLane = !1),
- (rootWithPendingPassiveEffects = root),
- (pendingPassiveEffectsLanes = didIncludeRenderPhaseUpdate))
- : (releaseRootPooledCache(root, remainingLanes),
- (nestedPassiveUpdateCount = 0),
- (rootWithPassiveNestedUpdates = null));
- remainingLanes = root.pendingLanes;
- 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
- transitions || commitDoubleInvokeEffectsInDEV(root, !1);
- onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
- isDevToolsPresent && root.memoizedUpdaters.clear();
- if (null !== recoverableErrors)
- for (
- renderPriorityLevel = root.onRecoverableError, finishedWork = 0;
- finishedWork < recoverableErrors.length;
- finishedWork++
+ root === workInProgressRoot &&
+ ((workInProgress = workInProgressRoot = null),
+ (workInProgressRootRenderLanes = 0));
+ pendingFinishedWork = finishedWork;
+ pendingEffectsRoot = root;
+ pendingEffectsLanes = lanes;
+ pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
+ pendingPassiveTransitions = transitions;
+ pendingRecoverableErrors = recoverableErrors;
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? ((root.callbackNode = null),
+ (root.callbackPriority = 0),
+ scheduleCallback(NormalPriority$1, function () {
+ flushPassiveEffects(!0);
+ return null;
+ }))
+ : ((root.callbackNode = null), (root.callbackPriority = 0));
+ commitStartTime = now();
+ lanes = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || lanes) {
+ lanes = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ recoverableErrors = currentUpdatePriority;
+ currentUpdatePriority = DiscreteEventPriority;
+ transitions = executionContext;
+ executionContext |= CommitContext;
+ try {
+ commitBeforeMutationEffects(root, finishedWork);
+ } finally {
+ (executionContext = transitions),
+ (currentUpdatePriority = recoverableErrors),
+ (ReactSharedInternals.T = lanes);
+ }
+ }
+ pendingEffectsStatus = PENDING_MUTATION_PHASE;
+ flushMutationEffects();
+ flushLayoutEffects();
+ }
+ }
+ function flushMutationEffects() {
+ if (pendingEffectsStatus === PENDING_MUTATION_PHASE) {
+ pendingEffectsStatus = NO_PENDING_EFFECTS;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
+ if (
+ 0 !== (finishedWork.subtreeFlags & 13878) ||
+ rootMutationHasEffect
+ ) {
+ rootMutationHasEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = DiscreteEventPriority;
+ var prevExecutionContext = executionContext;
+ executionContext |= CommitContext;
+ try {
+ (inProgressLanes = lanes),
+ (inProgressRoot = root),
+ commitMutationEffectsOnFiber(finishedWork, root),
+ (inProgressRoot = inProgressLanes = null);
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootMutationHasEffect);
+ }
+ }
+ root.current = finishedWork;
+ pendingEffectsStatus = PENDING_LAYOUT_PHASE;
+ }
+ }
+ function flushLayoutEffects() {
+ if (pendingEffectsStatus === PENDING_LAYOUT_PHASE) {
+ pendingEffectsStatus = NO_PENDING_EFFECTS;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ recoverableErrors = pendingRecoverableErrors,
+ rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
+ if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
+ rootHasLayoutEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = DiscreteEventPriority;
+ var prevExecutionContext = executionContext;
+ executionContext |= CommitContext;
+ try {
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStarted &&
+ injectedProfilingHooks.markLayoutEffectsStarted(lanes),
+ (inProgressLanes = lanes),
+ (inProgressRoot = root),
+ commitLayoutEffectOnFiber(
+ root,
+ finishedWork.alternate,
+ finishedWork
+ ),
+ (inProgressRoot = inProgressLanes = null),
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStopped &&
+ injectedProfilingHooks.markLayoutEffectsStopped();
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootHasLayoutEffect);
+ }
+ }
+ requestPaint();
+ (rootHasLayoutEffect =
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256))
+ ? (pendingEffectsStatus = PENDING_PASSIVE_PHASE)
+ : ((pendingEffectsStatus = NO_PENDING_EFFECTS),
+ (pendingEffectsRoot = null),
+ releaseRootPooledCache(root, root.pendingLanes),
+ (nestedPassiveUpdateCount = 0),
+ (rootWithPassiveNestedUpdates = null));
+ previousPriority = root.pendingLanes;
+ 0 === previousPriority &&
+ (legacyErrorBoundariesThatAlreadyFailed = null);
+ rootHasLayoutEffect || commitDoubleInvokeEffectsInDEV(root, !1);
+ rootHasLayoutEffect = lanesToEventPriority(lanes);
+ finishedWork = finishedWork.stateNode;
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onCommitFiberRoot
)
- (remainingLanes = recoverableErrors[finishedWork]),
- (spawnedLane = makeErrorInfo(remainingLanes.stack)),
- runWithFiberInDEV(
- remainingLanes.source,
- renderPriorityLevel,
- remainingLanes.value,
- spawnedLane
+ try {
+ var didError = 128 === (finishedWork.current.flags & 128);
+ switch (rootHasLayoutEffect) {
+ case DiscreteEventPriority:
+ var schedulerPriority = ImmediatePriority;
+ break;
+ case ContinuousEventPriority:
+ schedulerPriority = UserBlockingPriority;
+ break;
+ case DefaultEventPriority:
+ schedulerPriority = NormalPriority$1;
+ break;
+ case IdleEventPriority:
+ schedulerPriority = IdlePriority;
+ break;
+ default:
+ schedulerPriority = NormalPriority$1;
+ }
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ finishedWork,
+ schedulerPriority,
+ didError
);
- 0 !== (pendingPassiveEffectsLanes & 3) &&
- 0 !== root.tag &&
- flushPassiveEffects();
- ensureRootIsScheduled(root);
- remainingLanes = root.pendingLanes;
- 0 !== (didIncludeRenderPhaseUpdate & 4194218) &&
- 0 !== (remainingLanes & 42)
- ? ((nestedUpdateScheduled = !0),
- root === rootWithNestedUpdates
- ? nestedUpdateCount++
- : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
- : (nestedUpdateCount = 0);
- flushSyncWorkAcrossRoots_impl(0, !1);
- markCommitStopped();
- return null;
+ } catch (err) {
+ hasLoggedError ||
+ ((hasLoggedError = !0),
+ error$jscomp$0(
+ "React instrumentation encountered an error: %s",
+ err
+ ));
+ }
+ isDevToolsPresent && root.memoizedUpdaters.clear();
+ if (null !== recoverableErrors) {
+ didError = ReactSharedInternals.T;
+ schedulerPriority = currentUpdatePriority;
+ currentUpdatePriority = DiscreteEventPriority;
+ ReactSharedInternals.T = null;
+ try {
+ var onRecoverableError = root.onRecoverableError;
+ for (
+ finishedWork = 0;
+ finishedWork < recoverableErrors.length;
+ finishedWork++
+ ) {
+ var recoverableError = recoverableErrors[finishedWork],
+ errorInfo = makeErrorInfo(recoverableError.stack);
+ runWithFiberInDEV(
+ recoverableError.source,
+ onRecoverableError,
+ recoverableError.value,
+ errorInfo
+ );
+ }
+ } finally {
+ (ReactSharedInternals.T = didError),
+ (currentUpdatePriority = schedulerPriority);
+ }
+ }
+ 0 !== (pendingEffectsLanes & 3) &&
+ 0 !== root.tag &&
+ flushPendingEffects();
+ ensureRootIsScheduled(root);
+ previousPriority = root.pendingLanes;
+ 0 !== (lanes & 4194218) && 0 !== (previousPriority & 42)
+ ? ((nestedUpdateScheduled = !0),
+ root === rootWithNestedUpdates
+ ? nestedUpdateCount++
+ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
+ : (nestedUpdateCount = 0);
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ markCommitStopped();
+ }
}
function makeErrorInfo(componentStack) {
componentStack = { componentStack: componentStack };
@@ -13198,94 +13245,87 @@ __DEV__ &&
null != remainingLanes &&
((root.pooledCache = null), releaseCache(remainingLanes)));
}
+ function flushPendingEffects(wasDelayedCommit) {
+ flushMutationEffects();
+ flushLayoutEffects();
+ return flushPassiveEffects(wasDelayedCommit);
+ }
function flushPassiveEffects() {
- if (null !== rootWithPendingPassiveEffects) {
- var root = rootWithPendingPassiveEffects,
- remainingLanes = pendingPassiveEffectsRemainingLanes;
- pendingPassiveEffectsRemainingLanes = 0;
- var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
- priority =
- 0 === DefaultEventPriority || DefaultEventPriority > renderPriority
- ? DefaultEventPriority
- : renderPriority;
- renderPriority = ReactSharedInternals.T;
- var previousPriority = currentUpdatePriority;
- try {
- currentUpdatePriority = priority;
- ReactSharedInternals.T = null;
- if (null === rootWithPendingPassiveEffects)
- var JSCompiler_inline_result = !1;
- else {
- priority = pendingPassiveTransitions;
- pendingPassiveTransitions = null;
- var root$jscomp$0 = rootWithPendingPassiveEffects,
- lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsLanes = 0;
- if (
- (executionContext & (RenderContext | CommitContext)) !==
- NoContext
- )
- throw Error(
- "Cannot flush passive effects while already rendering."
- );
- isFlushingPassiveEffects = !0;
- didScheduleUpdateDuringPassiveEffects = !1;
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStarted &&
- injectedProfilingHooks.markPassiveEffectsStarted(lanes);
- var prevExecutionContext = executionContext;
- executionContext |= CommitContext;
- commitPassiveUnmountOnFiber(root$jscomp$0.current);
- commitPassiveMountOnFiber(
- root$jscomp$0,
- root$jscomp$0.current,
- lanes,
- priority
- );
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStopped &&
- injectedProfilingHooks.markPassiveEffectsStopped();
- commitDoubleInvokeEffectsInDEV(root$jscomp$0, !0);
- executionContext = prevExecutionContext;
- flushSyncWorkAcrossRoots_impl(0, !1);
- didScheduleUpdateDuringPassiveEffects
- ? root$jscomp$0 === rootWithPassiveNestedUpdates
- ? nestedPassiveUpdateCount++
- : ((nestedPassiveUpdateCount = 0),
- (rootWithPassiveNestedUpdates = root$jscomp$0))
- : (nestedPassiveUpdateCount = 0);
- didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects =
- !1;
- if (
- injectedHook &&
- "function" === typeof injectedHook.onPostCommitFiberRoot
- )
- try {
- injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
- } catch (err) {
- hasLoggedError ||
- ((hasLoggedError = !0),
- error$jscomp$0(
- "React instrumentation encountered an error: %s",
- err
- ));
- }
- var stateNode = root$jscomp$0.current.stateNode;
- stateNode.effectDuration = 0;
- stateNode.passiveEffectDuration = 0;
- JSCompiler_inline_result = !0;
+ if (pendingEffectsStatus !== PENDING_PASSIVE_PHASE) return !1;
+ var root = pendingEffectsRoot,
+ remainingLanes = pendingEffectsRemainingLanes;
+ pendingEffectsRemainingLanes = 0;
+ var renderPriority = lanesToEventPriority(pendingEffectsLanes),
+ priority =
+ 0 === DefaultEventPriority || DefaultEventPriority > renderPriority
+ ? DefaultEventPriority
+ : renderPriority;
+ renderPriority = ReactSharedInternals.T;
+ var previousPriority = currentUpdatePriority;
+ try {
+ currentUpdatePriority = priority;
+ ReactSharedInternals.T = null;
+ priority = pendingPassiveTransitions;
+ pendingPassiveTransitions = null;
+ var root$jscomp$0 = pendingEffectsRoot,
+ lanes = pendingEffectsLanes;
+ pendingEffectsStatus = NO_PENDING_EFFECTS;
+ pendingEffectsRoot = null;
+ pendingEffectsLanes = 0;
+ if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
+ throw Error("Cannot flush passive effects while already rendering.");
+ isFlushingPassiveEffects = !0;
+ didScheduleUpdateDuringPassiveEffects = !1;
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markPassiveEffectsStarted &&
+ injectedProfilingHooks.markPassiveEffectsStarted(lanes);
+ var prevExecutionContext = executionContext;
+ executionContext |= CommitContext;
+ commitPassiveUnmountOnFiber(root$jscomp$0.current);
+ commitPassiveMountOnFiber(
+ root$jscomp$0,
+ root$jscomp$0.current,
+ lanes,
+ priority
+ );
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markPassiveEffectsStopped &&
+ injectedProfilingHooks.markPassiveEffectsStopped();
+ commitDoubleInvokeEffectsInDEV(root$jscomp$0, !0);
+ executionContext = prevExecutionContext;
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ didScheduleUpdateDuringPassiveEffects
+ ? root$jscomp$0 === rootWithPassiveNestedUpdates
+ ? nestedPassiveUpdateCount++
+ : ((nestedPassiveUpdateCount = 0),
+ (rootWithPassiveNestedUpdates = root$jscomp$0))
+ : (nestedPassiveUpdateCount = 0);
+ didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects = !1;
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
+ } catch (err) {
+ hasLoggedError ||
+ ((hasLoggedError = !0),
+ error$jscomp$0(
+ "React instrumentation encountered an error: %s",
+ err
+ ));
}
- return JSCompiler_inline_result;
- } finally {
- (currentUpdatePriority = previousPriority),
- (ReactSharedInternals.T = renderPriority),
- releaseRootPooledCache(root, remainingLanes);
- }
+ var stateNode = root$jscomp$0.current.stateNode;
+ stateNode.effectDuration = 0;
+ stateNode.passiveEffectDuration = 0;
+ return !0;
+ } finally {
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = renderPriority),
+ releaseRootPooledCache(root, remainingLanes);
}
- return !1;
}
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
@@ -13807,7 +13847,7 @@ __DEV__ &&
(workInProgress.deletions = null),
(workInProgress.actualDuration = -0),
(workInProgress.actualStartTime = -1.1));
- workInProgress.flags = current.flags & 31457280;
+ workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -13845,7 +13885,7 @@ __DEV__ &&
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
- workInProgress.flags &= 31457282;
+ workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
@@ -14102,11 +14142,7 @@ __DEV__ &&
) {
this.tag = tag;
this.containerInfo = containerInfo;
- this.finishedWork =
- this.pingCache =
- this.current =
- this.pendingChildren =
- null;
+ this.pingCache = this.current = this.pendingChildren = null;
this.timeoutHandle = noTimeout;
this.callbackNode =
this.next =
@@ -14119,7 +14155,6 @@ __DEV__ &&
this.entangledLanes =
this.shellSuspendCounter =
this.errorRecoveryDisabledLanes =
- this.finishedLanes =
this.expiredLanes =
this.warmLanes =
this.pingedLanes =
@@ -17064,7 +17099,6 @@ __DEV__ &&
nextEffect = null,
inProgressLanes = null,
inProgressRoot = null,
- shouldFireAfterActiveInstanceBlur = !1,
suspenseyCommitFlag = 8192,
DefaultAsyncDispatcher = {
getCacheForType: function (resourceType) {
@@ -17133,10 +17167,19 @@ __DEV__ &&
RENDER_TIMEOUT_MS = 500,
workInProgressTransitions = null,
legacyErrorBoundariesThatAlreadyFailed = null,
- rootWithPendingPassiveEffects = null,
- pendingPassiveEffectsLanes = 0,
- pendingPassiveEffectsRemainingLanes = 0,
+ IMMEDIATE_COMMIT = 0,
+ THROTTLED_COMMIT = 2,
+ NO_PENDING_EFFECTS = 0,
+ PENDING_MUTATION_PHASE = 1,
+ PENDING_LAYOUT_PHASE = 2,
+ PENDING_PASSIVE_PHASE = 3,
+ pendingEffectsStatus = 0,
+ pendingEffectsRoot = null,
+ pendingFinishedWork = null,
+ pendingEffectsLanes = 0,
+ pendingEffectsRemainingLanes = 0,
pendingPassiveTransitions = null,
+ pendingRecoverableErrors = null,
NESTED_UPDATE_LIMIT = 50,
nestedUpdateCount = 0,
rootWithNestedUpdates = null,
@@ -17146,8 +17189,6 @@ __DEV__ &&
nestedPassiveUpdateCount = 0,
rootWithPassiveNestedUpdates = null,
isRunningInsertionEffect = !1,
- IMMEDIATE_COMMIT = 0,
- THROTTLED_COMMIT = 2,
didWarnStateUpdateForNotYetMountedComponent = null,
didWarnAboutUpdateInRender = !1;
var didWarnAboutUpdateInRenderForAnotherComponent = new Set();
@@ -17454,10 +17495,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
- version: "19.1.0-native-fb-a9bbe346-20241219",
+ version: "19.1.0-native-fb-a160102f-20250107",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.1.0-native-fb-a9bbe346-20241219"
+ reconcilerVersion: "19.1.0-native-fb-a160102f-20250107"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js
index 3a808bbdbf908..796c6dc3de435 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<<85f56c7bc097a205ee4a462d846714eb>>
+ * @generated SignedSource<<7807bce6ff57b48411a9f88a7551e16d>>
*/
"use strict";
@@ -1230,7 +1230,7 @@ eventPluginOrder = Array.prototype.slice.call([
"ReactNativeBridgeEventPlugin"
]);
recomputePluginOrdering();
-var injectedNamesToPlugins$jscomp$inline_280 = {
+var injectedNamesToPlugins$jscomp$inline_282 = {
ResponderEventPlugin: ResponderEventPlugin,
ReactNativeBridgeEventPlugin: {
eventTypes: {},
@@ -1276,32 +1276,32 @@ var injectedNamesToPlugins$jscomp$inline_280 = {
}
}
},
- isOrderingDirty$jscomp$inline_281 = !1,
- pluginName$jscomp$inline_282;
-for (pluginName$jscomp$inline_282 in injectedNamesToPlugins$jscomp$inline_280)
+ isOrderingDirty$jscomp$inline_283 = !1,
+ pluginName$jscomp$inline_284;
+for (pluginName$jscomp$inline_284 in injectedNamesToPlugins$jscomp$inline_282)
if (
- injectedNamesToPlugins$jscomp$inline_280.hasOwnProperty(
- pluginName$jscomp$inline_282
+ injectedNamesToPlugins$jscomp$inline_282.hasOwnProperty(
+ pluginName$jscomp$inline_284
)
) {
- var pluginModule$jscomp$inline_283 =
- injectedNamesToPlugins$jscomp$inline_280[pluginName$jscomp$inline_282];
+ var pluginModule$jscomp$inline_285 =
+ injectedNamesToPlugins$jscomp$inline_282[pluginName$jscomp$inline_284];
if (
- !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_282) ||
- namesToPlugins[pluginName$jscomp$inline_282] !==
- pluginModule$jscomp$inline_283
+ !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_284) ||
+ namesToPlugins[pluginName$jscomp$inline_284] !==
+ pluginModule$jscomp$inline_285
) {
- if (namesToPlugins[pluginName$jscomp$inline_282])
+ if (namesToPlugins[pluginName$jscomp$inline_284])
throw Error(
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
- (pluginName$jscomp$inline_282 + "`.")
+ (pluginName$jscomp$inline_284 + "`.")
);
- namesToPlugins[pluginName$jscomp$inline_282] =
- pluginModule$jscomp$inline_283;
- isOrderingDirty$jscomp$inline_281 = !0;
+ namesToPlugins[pluginName$jscomp$inline_284] =
+ pluginModule$jscomp$inline_285;
+ isOrderingDirty$jscomp$inline_283 = !0;
}
}
-isOrderingDirty$jscomp$inline_281 && recomputePluginOrdering();
+isOrderingDirty$jscomp$inline_283 && recomputePluginOrdering();
var emptyObject$1 = {},
removedKeys = null,
removedKeyCount = 0,
@@ -1644,17 +1644,6 @@ var scheduleCallback$3 = Scheduler.unstable_scheduleCallback,
unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue,
rendererID = null,
injectedHook = null;
-function onCommitRoot(root) {
- if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
- try {
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- void 0,
- 128 === (root.current.flags & 128)
- );
- } catch (err) {}
-}
function setIsStrictModeForDevtools(newIsStrictMode) {
"function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
if (injectedHook && "function" === typeof injectedHook.setStrictMode)
@@ -1724,14 +1713,13 @@ function getHighestPriorityLanes(lanes) {
return lanes;
}
}
-function getNextLanes(root, wipLanes) {
+function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0,
suspendedLanes = root.suspendedLanes,
- pingedLanes = root.pingedLanes,
- warmLanes = root.warmLanes;
- root = 0 !== root.finishedLanes;
+ pingedLanes = root.pingedLanes;
+ root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes
? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
@@ -1741,29 +1729,29 @@ function getNextLanes(root, wipLanes) {
0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = nonIdlePendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes)))))
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))))
: ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
0 !== nonIdlePendingLanes
? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
: 0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = pendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes))));
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = pendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes
? 0
: 0 !== wipLanes &&
wipLanes !== nextLanes &&
0 === (wipLanes & suspendedLanes) &&
((suspendedLanes = nextLanes & -nextLanes),
- (warmLanes = wipLanes & -wipLanes),
- suspendedLanes >= warmLanes ||
- (32 === suspendedLanes && 0 !== (warmLanes & 4194176)))
+ (rootHasPendingCommit = wipLanes & -wipLanes),
+ suspendedLanes >= rootHasPendingCommit ||
+ (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176)))
? wipLanes
: nextLanes;
}
@@ -2417,8 +2405,7 @@ function ensureRootIsScheduled(root) {
: (lastScheduledRoot = lastScheduledRoot.next = root));
mightHavePendingSyncWork = !0;
didScheduleMicrotask ||
- ((didScheduleMicrotask = !0),
- scheduleImmediateTask(processRootScheduleInMicrotask));
+ ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());
}
function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
if (!isFlushingWork && mightHavePendingSyncWork) {
@@ -2451,7 +2438,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
(JSCompiler_inline_result = workInProgressRootRenderLanes),
(JSCompiler_inline_result = getNextLanes(
root,
- root === workInProgressRoot ? JSCompiler_inline_result : 0
+ root === workInProgressRoot ? JSCompiler_inline_result : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
)),
0 === (JSCompiler_inline_result & 3) ||
checkIfRootIsPrerendering(root, JSCompiler_inline_result) ||
@@ -2463,6 +2451,9 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
isFlushingWork = !1;
}
}
+function processRootScheduleInImmediateTask() {
+ processRootScheduleInMicrotask();
+}
function processRootScheduleInMicrotask() {
mightHavePendingSyncWork = didScheduleMicrotask = !1;
0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);
@@ -2505,7 +2496,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
suspendedLanes = workInProgressRootRenderLanes;
suspendedLanes = getNextLanes(
root,
- root === currentTime ? suspendedLanes : 0
+ root === currentTime ? suspendedLanes : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
pingedLanes = root.callbackNode;
if (
@@ -2556,13 +2548,16 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
return 2;
}
function performWorkOnRootViaSchedulerTask(root, didTimeout) {
+ if (0 !== pendingEffectsStatus && 3 !== pendingEffectsStatus)
+ return (root.callbackNode = null), (root.callbackPriority = 0), null;
var originalCallbackNode = root.callbackNode;
- if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
+ if (flushPendingEffects(!0) && root.callbackNode !== originalCallbackNode)
return null;
var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
root,
- root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0
+ root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout);
@@ -2572,17 +2567,20 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) {
: null;
}
function performSyncWorkOnRoot(root, lanes) {
- if (flushPassiveEffects()) return null;
+ if (flushPendingEffects()) return null;
performWorkOnRoot(root, lanes, !0);
}
-function scheduleImmediateTask(cb) {
+function scheduleImmediateRootScheduleTask() {
supportsMicrotasks
? scheduleMicrotask(function () {
0 !== (executionContext & 6)
- ? scheduleCallback$3(ImmediatePriority, cb)
- : cb();
+ ? scheduleCallback$3(
+ ImmediatePriority,
+ processRootScheduleInImmediateTask
+ )
+ : processRootScheduleInMicrotask();
})
- : scheduleCallback$3(ImmediatePriority, cb);
+ : scheduleCallback$3(ImmediatePriority, processRootScheduleInImmediateTask);
}
function requestTransitionLane() {
0 === currentEventTransitionLane &&
@@ -5946,14 +5944,14 @@ function markRef(current, workInProgress) {
if (null === ref)
null !== current &&
null !== current.ref &&
- (workInProgress.flags |= 2097664);
+ (workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
);
if (null === current || current.ref !== ref)
- workInProgress.flags |= 2097664;
+ workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
@@ -6505,7 +6503,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
(nextProps.pendingProps = primaryChildProps),
(workInProgress.deletions = null))
: ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)),
- (nextProps.subtreeFlags = didSuspend.subtreeFlags & 31457280));
+ (nextProps.subtreeFlags = didSuspend.subtreeFlags & 29360128));
null !== currentFallbackChildFragment
? (nextPrimaryChildren = createWorkInProgress(
currentFallbackChildFragment,
@@ -7399,8 +7397,8 @@ function bubbleProperties(completedWork) {
if (didBailout)
for (var child$95 = completedWork.child; null !== child$95; )
(newChildLanes |= child$95.lanes | child$95.childLanes),
- (subtreeFlags |= child$95.subtreeFlags & 31457280),
- (subtreeFlags |= child$95.flags & 31457280),
+ (subtreeFlags |= child$95.subtreeFlags & 29360128),
+ (subtreeFlags |= child$95.flags & 29360128),
(child$95.return = completedWork),
(child$95 = child$95.sibling);
else
@@ -8128,14 +8126,13 @@ function commitHostPortalContainerChildren(
var offscreenSubtreeIsHidden = !1,
offscreenSubtreeWasHidden = !1,
PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set,
- nextEffect = null,
- shouldFireAfterActiveInstanceBlur = !1;
+ nextEffect = null;
function commitBeforeMutationEffects(root, firstChild) {
for (nextEffect = firstChild; null !== nextEffect; )
if (
((root = nextEffect),
(firstChild = root.child),
- 0 !== (root.subtreeFlags & 1028) && null !== firstChild)
+ 0 !== (root.subtreeFlags & 1024) && null !== firstChild)
)
(firstChild.return = root), (nextEffect = firstChild);
else
@@ -8199,9 +8196,6 @@ function commitBeforeMutationEffects(root, firstChild) {
}
nextEffect = root.return;
}
- resolvedPrevProps = shouldFireAfterActiveInstanceBlur;
- shouldFireAfterActiveInstanceBlur = !1;
- return resolvedPrevProps;
}
function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
var flags = finishedWork.flags;
@@ -8869,6 +8863,14 @@ function commitPassiveMountOnFiber(
);
flags & 2048 && commitHookEffectListMount(9, finishedWork);
break;
+ case 1:
+ recursivelyTraversePassiveMountEffects(
+ finishedRoot,
+ finishedWork,
+ committedLanes,
+ committedTransitions
+ );
+ break;
case 3:
recursivelyTraversePassiveMountEffects(
finishedRoot,
@@ -9323,10 +9325,13 @@ var DefaultAsyncDispatcher = {
workInProgressRootRenderTargetTime = Infinity,
workInProgressTransitions = null,
legacyErrorBoundariesThatAlreadyFailed = null,
- rootWithPendingPassiveEffects = null,
- pendingPassiveEffectsLanes = 0,
- pendingPassiveEffectsRemainingLanes = 0,
+ pendingEffectsStatus = 0,
+ pendingEffectsRoot = null,
+ pendingFinishedWork = null,
+ pendingEffectsLanes = 0,
+ pendingEffectsRemainingLanes = 0,
pendingPassiveTransitions = null,
+ pendingRecoverableErrors = null,
nestedUpdateCount = 0,
rootWithNestedUpdates = null;
function requestUpdateLane(fiber) {
@@ -9489,8 +9494,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
default:
throw Error("Unknown root exit status.");
}
- shouldTimeSlice.finishedWork = forceSync;
- shouldTimeSlice.finishedLanes = lanes;
if (
(lanes & 62914560) === lanes &&
(alwaysThrottleRetries || 3 === renderWasConcurrent) &&
@@ -9503,7 +9506,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
- if (0 !== getNextLanes(shouldTimeSlice, 0)) break a;
+ if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;
shouldTimeSlice.timeoutHandle = scheduleTimeout(
commitRootWhenReady.bind(
null,
@@ -9535,12 +9538,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
lanes,
workInProgressDeferredLane,
workInProgressRootInterleavedUpdatedLanes,
- workInProgressSuspendedRetryLanes,
- workInProgressRootDidSkipSuspendedSiblings,
- renderWasConcurrent,
- 0,
- -0,
- 0
+ workInProgressSuspendedRetryLanes
);
}
}
@@ -9557,38 +9555,23 @@ function commitRootWhenReady(
lanes,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- didSkipSuspendedSiblings,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
+ suspendedRetryLanes
) {
- lanes = finishedWork.subtreeFlags;
- (lanes & 8192 || 16785408 === (lanes & 16785408)) &&
+ root.timeoutHandle = -1;
+ var subtreeFlags = finishedWork.subtreeFlags;
+ (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) &&
accumulateSuspenseyCommitOnFiber(finishedWork);
- finishedWork = ReactSharedInternals.T;
- lanes = currentUpdatePriority;
- try {
- (currentUpdatePriority = 2),
- (ReactSharedInternals.T = null),
- commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- lanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
- );
- } finally {
- (ReactSharedInternals.T = finishedWork), (currentUpdatePriority = lanes);
- }
+ commitRoot(
+ root,
+ finishedWork,
+ lanes,
+ recoverableErrors,
+ transitions,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+ );
}
function isRenderConsistentWithExternalStores(finishedWork) {
for (var node = finishedWork; ; ) {
@@ -9665,8 +9648,6 @@ function resetWorkInProgressStack() {
}
}
function prepareFreshStack(root, lanes) {
- root.finishedWork = null;
- root.finishedLanes = 0;
var timeoutHandle = root.timeoutHandle;
-1 !== timeoutHandle &&
((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
@@ -9949,7 +9930,7 @@ function renderRootConcurrent(root, lanes) {
throw Error("Unexpected SuspendedReason. This is a bug in React.");
}
}
- workLoopConcurrent();
+ workLoopConcurrentByScheduler();
break;
} catch (thrownValue$136) {
handleThrow(root, thrownValue$136);
@@ -9965,7 +9946,7 @@ function renderRootConcurrent(root, lanes) {
finishQueueingConcurrentUpdates();
return workInProgressRootExitStatus;
}
-function workLoopConcurrent() {
+function workLoopConcurrentByScheduler() {
for (; null !== workInProgress && !shouldYield(); )
performUnitOfWork(workInProgress);
}
@@ -10132,105 +10113,177 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) {
workInProgressRootExitStatus = 6;
workInProgress = null;
}
-function commitRootImpl(
+function commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
- renderPriorityLevel,
spawnedLane,
updatedLanes,
suspendedRetryLanes
) {
- do flushPassiveEffects();
- while (null !== rootWithPendingPassiveEffects);
+ root.cancelPendingCommit = null;
+ do flushPendingEffects();
+ while (0 !== pendingEffectsStatus);
if (0 !== (executionContext & 6))
throw Error("Should not already be working.");
- var finishedWork = root.finishedWork;
- didIncludeRenderPhaseUpdate = root.finishedLanes;
- if (null === finishedWork) return null;
- root.finishedWork = null;
- root.finishedLanes = 0;
- if (finishedWork === root.current)
- throw Error(
- "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ if (null !== finishedWork) {
+ if (finishedWork === root.current)
+ throw Error(
+ "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ );
+ didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
+ didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
+ markRootFinished(
+ root,
+ lanes,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
);
- var remainingLanes = finishedWork.lanes | finishedWork.childLanes;
- remainingLanes |= concurrentlyUpdatedLanes;
- markRootFinished(
- root,
- didIncludeRenderPhaseUpdate,
- remainingLanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes
- );
- root === workInProgressRoot &&
- ((workInProgress = workInProgressRoot = null),
- (workInProgressRootRenderLanes = 0));
- spawnedLane = !1;
- 0 !== (finishedWork.subtreeFlags & 10256) ||
- 0 !== (finishedWork.flags & 10256)
- ? ((spawnedLane = !0),
- (pendingPassiveEffectsRemainingLanes = remainingLanes),
- (pendingPassiveTransitions = transitions),
- (root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null),
- scheduleCallback(NormalPriority$1, function () {
- flushPassiveEffects(!0);
- return null;
- }))
- : ((root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null));
- transitions = 0 !== (finishedWork.flags & 15990);
- 0 !== (finishedWork.subtreeFlags & 15990) || transitions
- ? ((transitions = ReactSharedInternals.T),
- (ReactSharedInternals.T = null),
- (updatedLanes = currentUpdatePriority),
- (currentUpdatePriority = 2),
- (suspendedRetryLanes = executionContext),
- (executionContext |= 4),
- commitBeforeMutationEffects(root, finishedWork),
- commitMutationEffectsOnFiber(finishedWork, root),
- (root.current = finishedWork),
- commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork),
- requestPaint(),
- (executionContext = suspendedRetryLanes),
- (currentUpdatePriority = updatedLanes),
- (ReactSharedInternals.T = transitions))
- : (root.current = finishedWork);
- spawnedLane
- ? ((spawnedLane = !1),
- (rootWithPendingPassiveEffects = root),
- (pendingPassiveEffectsLanes = didIncludeRenderPhaseUpdate))
- : releaseRootPooledCache(root, remainingLanes);
- remainingLanes = root.pendingLanes;
- 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
- onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
- if (null !== recoverableErrors)
- for (
- renderPriorityLevel = root.onRecoverableError, finishedWork = 0;
- finishedWork < recoverableErrors.length;
- finishedWork++
- )
- (remainingLanes = recoverableErrors[finishedWork]),
- renderPriorityLevel(remainingLanes.value, {
- componentStack: remainingLanes.stack
- });
- 0 !== (pendingPassiveEffectsLanes & 3) &&
- 0 !== root.tag &&
- flushPassiveEffects();
- ensureRootIsScheduled(root);
- remainingLanes = root.pendingLanes;
- 0 !== (didIncludeRenderPhaseUpdate & 4194218) && 0 !== (remainingLanes & 42)
- ? root === rootWithNestedUpdates
- ? nestedUpdateCount++
- : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
- : (nestedUpdateCount = 0);
- flushSyncWorkAcrossRoots_impl(0, !1);
- return null;
+ root === workInProgressRoot &&
+ ((workInProgress = workInProgressRoot = null),
+ (workInProgressRootRenderLanes = 0));
+ pendingFinishedWork = finishedWork;
+ pendingEffectsRoot = root;
+ pendingEffectsLanes = lanes;
+ pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
+ pendingPassiveTransitions = transitions;
+ pendingRecoverableErrors = recoverableErrors;
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? ((root.callbackNode = null),
+ (root.callbackPriority = 0),
+ scheduleCallback(NormalPriority$1, function () {
+ flushPassiveEffects(!0);
+ return null;
+ }))
+ : ((root.callbackNode = null), (root.callbackPriority = 0));
+ lanes = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || lanes) {
+ lanes = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ recoverableErrors = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ transitions = executionContext;
+ executionContext |= 4;
+ try {
+ commitBeforeMutationEffects(root, finishedWork);
+ } finally {
+ (executionContext = transitions),
+ (currentUpdatePriority = recoverableErrors),
+ (ReactSharedInternals.T = lanes);
+ }
+ }
+ pendingEffectsStatus = 1;
+ flushMutationEffects();
+ flushLayoutEffects();
+ }
+}
+function flushMutationEffects() {
+ if (1 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
+ rootMutationHasEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ commitMutationEffectsOnFiber(finishedWork, root);
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootMutationHasEffect);
+ }
+ }
+ root.current = finishedWork;
+ pendingEffectsStatus = 2;
+ }
+}
+function flushLayoutEffects() {
+ if (2 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ recoverableErrors = pendingRecoverableErrors,
+ rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
+ if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
+ rootHasLayoutEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootHasLayoutEffect);
+ }
+ }
+ requestPaint();
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? (pendingEffectsStatus = 3)
+ : ((pendingEffectsStatus = 0),
+ (pendingEffectsRoot = null),
+ releaseRootPooledCache(root, root.pendingLanes));
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 === rootHasLayoutEffect &&
+ (legacyErrorBoundariesThatAlreadyFailed = null);
+ lanesToEventPriority(lanes);
+ finishedWork = finishedWork.stateNode;
+ if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
+ try {
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ finishedWork,
+ void 0,
+ 128 === (finishedWork.current.flags & 128)
+ );
+ } catch (err) {}
+ if (null !== recoverableErrors) {
+ finishedWork = ReactSharedInternals.T;
+ rootHasLayoutEffect = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ ReactSharedInternals.T = null;
+ try {
+ var onRecoverableError = root.onRecoverableError;
+ for (
+ previousPriority = 0;
+ previousPriority < recoverableErrors.length;
+ previousPriority++
+ ) {
+ var recoverableError = recoverableErrors[previousPriority];
+ onRecoverableError(recoverableError.value, {
+ componentStack: recoverableError.stack
+ });
+ }
+ } finally {
+ (ReactSharedInternals.T = finishedWork),
+ (currentUpdatePriority = rootHasLayoutEffect);
+ }
+ }
+ 0 !== (pendingEffectsLanes & 3) && 0 !== root.tag && flushPendingEffects();
+ ensureRootIsScheduled(root);
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)
+ ? root === rootWithNestedUpdates
+ ? nestedUpdateCount++
+ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
+ : (nestedUpdateCount = 0);
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ }
}
function releaseRootPooledCache(root, remainingLanes) {
0 === (root.pooledCacheLanes &= remainingLanes) &&
@@ -10238,56 +10291,55 @@ function releaseRootPooledCache(root, remainingLanes) {
null != remainingLanes &&
((root.pooledCache = null), releaseCache(remainingLanes)));
}
+function flushPendingEffects(wasDelayedCommit) {
+ flushMutationEffects();
+ flushLayoutEffects();
+ return flushPassiveEffects(wasDelayedCommit);
+}
function flushPassiveEffects() {
- if (null !== rootWithPendingPassiveEffects) {
- var root = rootWithPendingPassiveEffects,
- remainingLanes = pendingPassiveEffectsRemainingLanes;
- pendingPassiveEffectsRemainingLanes = 0;
- var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
- prevTransition = ReactSharedInternals.T,
- previousPriority = currentUpdatePriority;
- try {
- currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
- ReactSharedInternals.T = null;
- if (null === rootWithPendingPassiveEffects)
- var JSCompiler_inline_result = !1;
- else {
- renderPriority = pendingPassiveTransitions;
- pendingPassiveTransitions = null;
- var root$jscomp$0 = rootWithPendingPassiveEffects,
- lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsLanes = 0;
- if (0 !== (executionContext & 6))
- throw Error("Cannot flush passive effects while already rendering.");
- var prevExecutionContext = executionContext;
- executionContext |= 4;
- commitPassiveUnmountOnFiber(root$jscomp$0.current);
- commitPassiveMountOnFiber(
- root$jscomp$0,
- root$jscomp$0.current,
- lanes,
- renderPriority
- );
- executionContext = prevExecutionContext;
- flushSyncWorkAcrossRoots_impl(0, !1);
- if (
- injectedHook &&
- "function" === typeof injectedHook.onPostCommitFiberRoot
- )
- try {
- injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
- } catch (err) {}
- JSCompiler_inline_result = !0;
- }
- return JSCompiler_inline_result;
- } finally {
- (currentUpdatePriority = previousPriority),
- (ReactSharedInternals.T = prevTransition),
- releaseRootPooledCache(root, remainingLanes);
- }
+ if (3 !== pendingEffectsStatus) return !1;
+ var root = pendingEffectsRoot,
+ remainingLanes = pendingEffectsRemainingLanes;
+ pendingEffectsRemainingLanes = 0;
+ var renderPriority = lanesToEventPriority(pendingEffectsLanes),
+ prevTransition = ReactSharedInternals.T,
+ previousPriority = currentUpdatePriority;
+ try {
+ currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
+ ReactSharedInternals.T = null;
+ renderPriority = pendingPassiveTransitions;
+ pendingPassiveTransitions = null;
+ var root$jscomp$0 = pendingEffectsRoot,
+ lanes = pendingEffectsLanes;
+ pendingEffectsStatus = 0;
+ pendingEffectsRoot = null;
+ pendingEffectsLanes = 0;
+ if (0 !== (executionContext & 6))
+ throw Error("Cannot flush passive effects while already rendering.");
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ commitPassiveUnmountOnFiber(root$jscomp$0.current);
+ commitPassiveMountOnFiber(
+ root$jscomp$0,
+ root$jscomp$0.current,
+ lanes,
+ renderPriority
+ );
+ executionContext = prevExecutionContext;
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
+ } catch (err) {}
+ return !0;
+ } finally {
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = prevTransition),
+ releaseRootPooledCache(root, remainingLanes);
}
- return !1;
}
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
@@ -10488,7 +10540,7 @@ function createWorkInProgress(current, pendingProps) {
(workInProgress.flags = 0),
(workInProgress.subtreeFlags = 0),
(workInProgress.deletions = null));
- workInProgress.flags = current.flags & 31457280;
+ workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -10507,7 +10559,7 @@ function createWorkInProgress(current, pendingProps) {
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
- workInProgress.flags &= 31457282;
+ workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
@@ -10694,11 +10746,7 @@ function FiberRootNode(
) {
this.tag = tag;
this.containerInfo = containerInfo;
- this.finishedWork =
- this.pingCache =
- this.current =
- this.pendingChildren =
- null;
+ this.pingCache = this.current = this.pendingChildren = null;
this.timeoutHandle = -1;
this.callbackNode =
this.next =
@@ -10711,7 +10759,6 @@ function FiberRootNode(
this.entangledLanes =
this.shellSuspendCounter =
this.errorRecoveryDisabledLanes =
- this.finishedLanes =
this.expiredLanes =
this.warmLanes =
this.pingedLanes =
@@ -11115,26 +11162,26 @@ batchedUpdatesImpl = function (fn, a) {
}
};
var roots = new Map(),
- internals$jscomp$inline_1215 = {
+ internals$jscomp$inline_1224 = {
bundleType: 0,
- version: "19.1.0-native-fb-a9bbe346-20241219",
+ version: "19.1.0-native-fb-a160102f-20250107",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.1.0-native-fb-a9bbe346-20241219"
+ reconcilerVersion: "19.1.0-native-fb-a160102f-20250107"
};
null !== extraDevToolsConfig &&
- (internals$jscomp$inline_1215.rendererConfig = extraDevToolsConfig);
+ (internals$jscomp$inline_1224.rendererConfig = extraDevToolsConfig);
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
- var hook$jscomp$inline_1534 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+ var hook$jscomp$inline_1536 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
- !hook$jscomp$inline_1534.isDisabled &&
- hook$jscomp$inline_1534.supportsFiber
+ !hook$jscomp$inline_1536.isDisabled &&
+ hook$jscomp$inline_1536.supportsFiber
)
try {
- (rendererID = hook$jscomp$inline_1534.inject(
- internals$jscomp$inline_1215
+ (rendererID = hook$jscomp$inline_1536.inject(
+ internals$jscomp$inline_1224
)),
- (injectedHook = hook$jscomp$inline_1534);
+ (injectedHook = hook$jscomp$inline_1536);
} catch (err) {}
}
exports.createPortal = function (children, containerTag) {
diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js
index b6d5833cb0462..4bfa475f97fee 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<>
+ * @generated SignedSource<<8b11125159d8bbb9d28e4ef716621e7f>>
*/
"use strict";
@@ -1234,7 +1234,7 @@ eventPluginOrder = Array.prototype.slice.call([
"ReactNativeBridgeEventPlugin"
]);
recomputePluginOrdering();
-var injectedNamesToPlugins$jscomp$inline_296 = {
+var injectedNamesToPlugins$jscomp$inline_298 = {
ResponderEventPlugin: ResponderEventPlugin,
ReactNativeBridgeEventPlugin: {
eventTypes: {},
@@ -1280,32 +1280,32 @@ var injectedNamesToPlugins$jscomp$inline_296 = {
}
}
},
- isOrderingDirty$jscomp$inline_297 = !1,
- pluginName$jscomp$inline_298;
-for (pluginName$jscomp$inline_298 in injectedNamesToPlugins$jscomp$inline_296)
+ isOrderingDirty$jscomp$inline_299 = !1,
+ pluginName$jscomp$inline_300;
+for (pluginName$jscomp$inline_300 in injectedNamesToPlugins$jscomp$inline_298)
if (
- injectedNamesToPlugins$jscomp$inline_296.hasOwnProperty(
- pluginName$jscomp$inline_298
+ injectedNamesToPlugins$jscomp$inline_298.hasOwnProperty(
+ pluginName$jscomp$inline_300
)
) {
- var pluginModule$jscomp$inline_299 =
- injectedNamesToPlugins$jscomp$inline_296[pluginName$jscomp$inline_298];
+ var pluginModule$jscomp$inline_301 =
+ injectedNamesToPlugins$jscomp$inline_298[pluginName$jscomp$inline_300];
if (
- !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_298) ||
- namesToPlugins[pluginName$jscomp$inline_298] !==
- pluginModule$jscomp$inline_299
+ !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_300) ||
+ namesToPlugins[pluginName$jscomp$inline_300] !==
+ pluginModule$jscomp$inline_301
) {
- if (namesToPlugins[pluginName$jscomp$inline_298])
+ if (namesToPlugins[pluginName$jscomp$inline_300])
throw Error(
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
- (pluginName$jscomp$inline_298 + "`.")
+ (pluginName$jscomp$inline_300 + "`.")
);
- namesToPlugins[pluginName$jscomp$inline_298] =
- pluginModule$jscomp$inline_299;
- isOrderingDirty$jscomp$inline_297 = !0;
+ namesToPlugins[pluginName$jscomp$inline_300] =
+ pluginModule$jscomp$inline_301;
+ isOrderingDirty$jscomp$inline_299 = !0;
}
}
-isOrderingDirty$jscomp$inline_297 && recomputePluginOrdering();
+isOrderingDirty$jscomp$inline_299 && recomputePluginOrdering();
var emptyObject$1 = {},
removedKeys = null,
removedKeyCount = 0,
@@ -1650,34 +1650,6 @@ var scheduleCallback$3 = Scheduler.unstable_scheduleCallback,
injectedHook = null,
injectedProfilingHooks = null,
isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;
-function onCommitRoot(root, eventPriority) {
- if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
- try {
- var didError = 128 === (root.current.flags & 128);
- switch (eventPriority) {
- case 2:
- var schedulerPriority = ImmediatePriority;
- break;
- case 8:
- schedulerPriority = UserBlockingPriority;
- break;
- case 32:
- schedulerPriority = NormalPriority$1;
- break;
- case 268435456:
- schedulerPriority = IdlePriority;
- break;
- default:
- schedulerPriority = NormalPriority$1;
- }
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- schedulerPriority,
- didError
- );
- } catch (err) {}
-}
function setIsStrictModeForDevtools(newIsStrictMode) {
"function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
if (injectedHook && "function" === typeof injectedHook.setStrictMode)
@@ -1793,14 +1765,13 @@ function getHighestPriorityLanes(lanes) {
return lanes;
}
}
-function getNextLanes(root, wipLanes) {
+function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0,
suspendedLanes = root.suspendedLanes,
- pingedLanes = root.pingedLanes,
- warmLanes = root.warmLanes;
- root = 0 !== root.finishedLanes;
+ pingedLanes = root.pingedLanes;
+ root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes
? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
@@ -1810,29 +1781,29 @@ function getNextLanes(root, wipLanes) {
0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = nonIdlePendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes)))))
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))))
: ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
0 !== nonIdlePendingLanes
? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
: 0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = pendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes))));
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = pendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes
? 0
: 0 !== wipLanes &&
wipLanes !== nextLanes &&
0 === (wipLanes & suspendedLanes) &&
((suspendedLanes = nextLanes & -nextLanes),
- (warmLanes = wipLanes & -wipLanes),
- suspendedLanes >= warmLanes ||
- (32 === suspendedLanes && 0 !== (warmLanes & 4194176)))
+ (rootHasPendingCommit = wipLanes & -wipLanes),
+ suspendedLanes >= rootHasPendingCommit ||
+ (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176)))
? wipLanes
: nextLanes;
}
@@ -2570,8 +2541,7 @@ function ensureRootIsScheduled(root) {
: (lastScheduledRoot = lastScheduledRoot.next = root));
mightHavePendingSyncWork = !0;
didScheduleMicrotask ||
- ((didScheduleMicrotask = !0),
- scheduleImmediateTask(processRootScheduleInMicrotask));
+ ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());
}
function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
if (!isFlushingWork && mightHavePendingSyncWork) {
@@ -2604,7 +2574,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
(JSCompiler_inline_result = workInProgressRootRenderLanes),
(JSCompiler_inline_result = getNextLanes(
root,
- root === workInProgressRoot ? JSCompiler_inline_result : 0
+ root === workInProgressRoot ? JSCompiler_inline_result : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
)),
0 === (JSCompiler_inline_result & 3) ||
checkIfRootIsPrerendering(root, JSCompiler_inline_result) ||
@@ -2616,6 +2587,9 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
isFlushingWork = !1;
}
}
+function processRootScheduleInImmediateTask() {
+ processRootScheduleInMicrotask();
+}
function processRootScheduleInMicrotask() {
mightHavePendingSyncWork = didScheduleMicrotask = !1;
0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);
@@ -2658,7 +2632,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
suspendedLanes = workInProgressRootRenderLanes;
suspendedLanes = getNextLanes(
root,
- root === currentTime ? suspendedLanes : 0
+ root === currentTime ? suspendedLanes : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
pingedLanes = root.callbackNode;
if (
@@ -2710,13 +2685,16 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
}
function performWorkOnRootViaSchedulerTask(root, didTimeout) {
nestedUpdateScheduled = currentUpdateIsNested = !1;
+ if (0 !== pendingEffectsStatus && 3 !== pendingEffectsStatus)
+ return (root.callbackNode = null), (root.callbackPriority = 0), null;
var originalCallbackNode = root.callbackNode;
- if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
+ if (flushPendingEffects(!0) && root.callbackNode !== originalCallbackNode)
return null;
var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
root,
- root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0
+ root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout);
@@ -2726,19 +2704,22 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) {
: null;
}
function performSyncWorkOnRoot(root, lanes) {
- if (flushPassiveEffects()) return null;
+ if (flushPendingEffects()) return null;
currentUpdateIsNested = nestedUpdateScheduled;
nestedUpdateScheduled = !1;
performWorkOnRoot(root, lanes, !0);
}
-function scheduleImmediateTask(cb) {
+function scheduleImmediateRootScheduleTask() {
supportsMicrotasks
? scheduleMicrotask(function () {
0 !== (executionContext & 6)
- ? scheduleCallback$3(ImmediatePriority, cb)
- : cb();
+ ? scheduleCallback$3(
+ ImmediatePriority,
+ processRootScheduleInImmediateTask
+ )
+ : processRootScheduleInMicrotask();
})
- : scheduleCallback$3(ImmediatePriority, cb);
+ : scheduleCallback$3(ImmediatePriority, processRootScheduleInImmediateTask);
}
function requestTransitionLane() {
0 === currentEventTransitionLane &&
@@ -6113,14 +6094,14 @@ function markRef(current, workInProgress) {
if (null === ref)
null !== current &&
null !== current.ref &&
- (workInProgress.flags |= 2097664);
+ (workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
);
if (null === current || current.ref !== ref)
- workInProgress.flags |= 2097664;
+ workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
@@ -6688,7 +6669,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
(nextProps.treeBaseDuration = didSuspend.treeBaseDuration)),
(workInProgress.deletions = null))
: ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)),
- (nextProps.subtreeFlags = didSuspend.subtreeFlags & 31457280));
+ (nextProps.subtreeFlags = didSuspend.subtreeFlags & 29360128));
null !== currentFallbackChildFragment
? (nextPrimaryChildren = createWorkInProgress(
currentFallbackChildFragment,
@@ -7609,8 +7590,8 @@ function bubbleProperties(completedWork) {
)
(newChildLanes |= child$100.lanes | child$100.childLanes),
- (subtreeFlags |= child$100.subtreeFlags & 31457280),
- (subtreeFlags |= child$100.flags & 31457280),
+ (subtreeFlags |= child$100.subtreeFlags & 29360128),
+ (subtreeFlags |= child$100.flags & 29360128),
(treeBaseDuration$99 += child$100.treeBaseDuration),
(child$100 = child$100.sibling);
completedWork.treeBaseDuration = treeBaseDuration$99;
@@ -7622,8 +7603,8 @@ function bubbleProperties(completedWork) {
)
(newChildLanes |=
treeBaseDuration$99.lanes | treeBaseDuration$99.childLanes),
- (subtreeFlags |= treeBaseDuration$99.subtreeFlags & 31457280),
- (subtreeFlags |= treeBaseDuration$99.flags & 31457280),
+ (subtreeFlags |= treeBaseDuration$99.subtreeFlags & 29360128),
+ (subtreeFlags |= treeBaseDuration$99.flags & 29360128),
(treeBaseDuration$99.return = completedWork),
(treeBaseDuration$99 = treeBaseDuration$99.sibling);
else if (0 !== (completedWork.mode & 2)) {
@@ -8555,14 +8536,13 @@ var offscreenSubtreeIsHidden = !1,
PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set,
nextEffect = null,
inProgressLanes = null,
- inProgressRoot = null,
- shouldFireAfterActiveInstanceBlur = !1;
+ inProgressRoot = null;
function commitBeforeMutationEffects(root, firstChild) {
for (nextEffect = firstChild; null !== nextEffect; )
if (
((root = nextEffect),
(firstChild = root.child),
- 0 !== (root.subtreeFlags & 1028) && null !== firstChild)
+ 0 !== (root.subtreeFlags & 1024) && null !== firstChild)
)
(firstChild.return = root), (nextEffect = firstChild);
else
@@ -8626,9 +8606,6 @@ function commitBeforeMutationEffects(root, firstChild) {
}
nextEffect = root.return;
}
- resolvedPrevProps = shouldFireAfterActiveInstanceBlur;
- shouldFireAfterActiveInstanceBlur = !1;
- return resolvedPrevProps;
}
function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
var flags = finishedWork.flags;
@@ -8961,12 +8938,6 @@ function attachSuspenseRetryListeners(finishedWork, wakeables) {
}
});
}
-function commitMutationEffects(root, finishedWork, committedLanes) {
- inProgressLanes = committedLanes;
- inProgressRoot = root;
- commitMutationEffectsOnFiber(finishedWork, root);
- inProgressRoot = inProgressLanes = null;
-}
function recursivelyTraverseMutationEffects(root, parentFiber) {
var deletions = parentFiber.deletions;
if (null !== deletions)
@@ -9153,12 +9124,6 @@ function commitReconciliationEffects(finishedWork) {
flags & 2 && (finishedWork.flags &= -3);
flags & 4096 && (finishedWork.flags &= -4097);
}
-function commitLayoutEffects(finishedWork, root, committedLanes) {
- inProgressLanes = committedLanes;
- inProgressRoot = root;
- commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);
- inProgressRoot = inProgressLanes = null;
-}
function recursivelyTraverseLayoutEffects(root, parentFiber) {
if (parentFiber.subtreeFlags & 8772)
for (parentFiber = parentFiber.child; null !== parentFiber; )
@@ -9382,6 +9347,14 @@ function commitPassiveMountOnFiber(
);
flags & 2048 && commitHookPassiveMountEffects(finishedWork, 9);
break;
+ case 1:
+ recursivelyTraversePassiveMountEffects(
+ finishedRoot,
+ finishedWork,
+ committedLanes,
+ committedTransitions
+ );
+ break;
case 3:
var prevEffectDuration = pushNestedEffectDurations();
recursivelyTraversePassiveMountEffects(
@@ -9850,10 +9823,13 @@ var DefaultAsyncDispatcher = {
workInProgressRootRenderTargetTime = Infinity,
workInProgressTransitions = null,
legacyErrorBoundariesThatAlreadyFailed = null,
- rootWithPendingPassiveEffects = null,
- pendingPassiveEffectsLanes = 0,
- pendingPassiveEffectsRemainingLanes = 0,
+ pendingEffectsStatus = 0,
+ pendingEffectsRoot = null,
+ pendingFinishedWork = null,
+ pendingEffectsLanes = 0,
+ pendingEffectsRemainingLanes = 0,
pendingPassiveTransitions = null,
+ pendingRecoverableErrors = null,
nestedUpdateCount = 0,
rootWithNestedUpdates = null;
function requestUpdateLane(fiber) {
@@ -10017,8 +9993,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
default:
throw Error("Unknown root exit status.");
}
- shouldTimeSlice.finishedWork = forceSync;
- shouldTimeSlice.finishedLanes = lanes;
if (
(lanes & 62914560) === lanes &&
(alwaysThrottleRetries || 3 === renderWasConcurrent) &&
@@ -10031,7 +10005,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
- if (0 !== getNextLanes(shouldTimeSlice, 0)) break a;
+ if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;
shouldTimeSlice.timeoutHandle = scheduleTimeout(
commitRootWhenReady.bind(
null,
@@ -10063,12 +10037,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
lanes,
workInProgressDeferredLane,
workInProgressRootInterleavedUpdatedLanes,
- workInProgressSuspendedRetryLanes,
- workInProgressRootDidSkipSuspendedSiblings,
- renderWasConcurrent,
- 0,
- -0,
- 0
+ workInProgressSuspendedRetryLanes
);
}
}
@@ -10085,38 +10054,23 @@ function commitRootWhenReady(
lanes,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- didSkipSuspendedSiblings,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
+ suspendedRetryLanes
) {
- lanes = finishedWork.subtreeFlags;
- (lanes & 8192 || 16785408 === (lanes & 16785408)) &&
+ root.timeoutHandle = -1;
+ var subtreeFlags = finishedWork.subtreeFlags;
+ (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) &&
accumulateSuspenseyCommitOnFiber(finishedWork);
- finishedWork = ReactSharedInternals.T;
- lanes = currentUpdatePriority;
- try {
- (currentUpdatePriority = 2),
- (ReactSharedInternals.T = null),
- commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- lanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
- );
- } finally {
- (ReactSharedInternals.T = finishedWork), (currentUpdatePriority = lanes);
- }
+ commitRoot(
+ root,
+ finishedWork,
+ lanes,
+ recoverableErrors,
+ transitions,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+ );
}
function isRenderConsistentWithExternalStores(finishedWork) {
for (var node = finishedWork; ; ) {
@@ -10193,8 +10147,6 @@ function resetWorkInProgressStack() {
}
}
function prepareFreshStack(root, lanes) {
- root.finishedWork = null;
- root.finishedLanes = 0;
var timeoutHandle = root.timeoutHandle;
-1 !== timeoutHandle &&
((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
@@ -10525,7 +10477,7 @@ function renderRootConcurrent(root, lanes) {
default:
throw Error("Unexpected SuspendedReason. This is a bug in React.");
}
- workLoopConcurrent();
+ workLoopConcurrentByScheduler();
break;
} catch (thrownValue$151) {
handleThrow(root, thrownValue$151);
@@ -10548,7 +10500,7 @@ function renderRootConcurrent(root, lanes) {
finishQueueingConcurrentUpdates();
return workInProgressRootExitStatus;
}
-function workLoopConcurrent() {
+function workLoopConcurrentByScheduler() {
for (; null !== workInProgress && !shouldYield(); )
performUnitOfWork(workInProgress);
}
@@ -10733,120 +10685,217 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) {
workInProgressRootExitStatus = 6;
workInProgress = null;
}
-function commitRootImpl(
+function commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
- renderPriorityLevel,
spawnedLane,
updatedLanes,
suspendedRetryLanes
) {
- do flushPassiveEffects();
- while (null !== rootWithPendingPassiveEffects);
+ root.cancelPendingCommit = null;
+ do flushPendingEffects();
+ while (0 !== pendingEffectsStatus);
if (0 !== (executionContext & 6))
throw Error("Should not already be working.");
- var finishedWork = root.finishedWork;
- didIncludeRenderPhaseUpdate = root.finishedLanes;
null !== injectedProfilingHooks &&
"function" === typeof injectedProfilingHooks.markCommitStarted &&
- injectedProfilingHooks.markCommitStarted(didIncludeRenderPhaseUpdate);
- if (null === finishedWork) return markCommitStopped(), null;
- root.finishedWork = null;
- root.finishedLanes = 0;
- if (finishedWork === root.current)
- throw Error(
- "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ injectedProfilingHooks.markCommitStarted(lanes);
+ if (null === finishedWork) markCommitStopped();
+ else {
+ if (finishedWork === root.current)
+ throw Error(
+ "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ );
+ didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
+ didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
+ markRootFinished(
+ root,
+ lanes,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
);
- var remainingLanes = finishedWork.lanes | finishedWork.childLanes;
- remainingLanes |= concurrentlyUpdatedLanes;
- markRootFinished(
- root,
- didIncludeRenderPhaseUpdate,
- remainingLanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes
- );
- root === workInProgressRoot &&
- ((workInProgress = workInProgressRoot = null),
- (workInProgressRootRenderLanes = 0));
- spawnedLane = !1;
- 0 !== (finishedWork.subtreeFlags & 10256) ||
- 0 !== (finishedWork.flags & 10256)
- ? ((spawnedLane = !0),
- (pendingPassiveEffectsRemainingLanes = remainingLanes),
- (pendingPassiveTransitions = transitions),
- (root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null),
- scheduleCallback(NormalPriority$1, function () {
- flushPassiveEffects(!0);
- return null;
- }))
- : ((root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null));
- commitStartTime = now();
- transitions = 0 !== (finishedWork.flags & 15990);
- 0 !== (finishedWork.subtreeFlags & 15990) || transitions
- ? ((transitions = ReactSharedInternals.T),
- (ReactSharedInternals.T = null),
- (updatedLanes = currentUpdatePriority),
- (currentUpdatePriority = 2),
- (suspendedRetryLanes = executionContext),
- (executionContext |= 4),
- commitBeforeMutationEffects(root, finishedWork),
- commitMutationEffects(root, finishedWork, didIncludeRenderPhaseUpdate),
- (root.current = finishedWork),
- null !== injectedProfilingHooks &&
- "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted &&
- injectedProfilingHooks.markLayoutEffectsStarted(
- didIncludeRenderPhaseUpdate
- ),
- commitLayoutEffects(finishedWork, root, didIncludeRenderPhaseUpdate),
- null !== injectedProfilingHooks &&
- "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped &&
- injectedProfilingHooks.markLayoutEffectsStopped(),
- requestPaint(),
- (executionContext = suspendedRetryLanes),
- (currentUpdatePriority = updatedLanes),
- (ReactSharedInternals.T = transitions))
- : (root.current = finishedWork);
- spawnedLane
- ? ((spawnedLane = !1),
- (rootWithPendingPassiveEffects = root),
- (pendingPassiveEffectsLanes = didIncludeRenderPhaseUpdate))
- : releaseRootPooledCache(root, remainingLanes);
- remainingLanes = root.pendingLanes;
- 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
- onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
- isDevToolsPresent && root.memoizedUpdaters.clear();
- if (null !== recoverableErrors)
- for (
- renderPriorityLevel = root.onRecoverableError, finishedWork = 0;
- finishedWork < recoverableErrors.length;
- finishedWork++
- )
- (remainingLanes = recoverableErrors[finishedWork]),
- renderPriorityLevel(remainingLanes.value, {
- componentStack: remainingLanes.stack
- });
- 0 !== (pendingPassiveEffectsLanes & 3) &&
- 0 !== root.tag &&
- flushPassiveEffects();
- ensureRootIsScheduled(root);
- remainingLanes = root.pendingLanes;
- 0 !== (didIncludeRenderPhaseUpdate & 4194218) && 0 !== (remainingLanes & 42)
- ? ((nestedUpdateScheduled = !0),
- root === rootWithNestedUpdates
- ? nestedUpdateCount++
- : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
- : (nestedUpdateCount = 0);
- flushSyncWorkAcrossRoots_impl(0, !1);
- markCommitStopped();
- return null;
+ root === workInProgressRoot &&
+ ((workInProgress = workInProgressRoot = null),
+ (workInProgressRootRenderLanes = 0));
+ pendingFinishedWork = finishedWork;
+ pendingEffectsRoot = root;
+ pendingEffectsLanes = lanes;
+ pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
+ pendingPassiveTransitions = transitions;
+ pendingRecoverableErrors = recoverableErrors;
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? ((root.callbackNode = null),
+ (root.callbackPriority = 0),
+ scheduleCallback(NormalPriority$1, function () {
+ flushPassiveEffects(!0);
+ return null;
+ }))
+ : ((root.callbackNode = null), (root.callbackPriority = 0));
+ commitStartTime = now();
+ lanes = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || lanes) {
+ lanes = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ recoverableErrors = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ transitions = executionContext;
+ executionContext |= 4;
+ try {
+ commitBeforeMutationEffects(root, finishedWork);
+ } finally {
+ (executionContext = transitions),
+ (currentUpdatePriority = recoverableErrors),
+ (ReactSharedInternals.T = lanes);
+ }
+ }
+ pendingEffectsStatus = 1;
+ flushMutationEffects();
+ flushLayoutEffects();
+ }
+}
+function flushMutationEffects() {
+ if (1 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
+ rootMutationHasEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ (inProgressLanes = lanes),
+ (inProgressRoot = root),
+ commitMutationEffectsOnFiber(finishedWork, root),
+ (inProgressRoot = inProgressLanes = null);
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootMutationHasEffect);
+ }
+ }
+ root.current = finishedWork;
+ pendingEffectsStatus = 2;
+ }
+}
+function flushLayoutEffects() {
+ if (2 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ recoverableErrors = pendingRecoverableErrors,
+ rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
+ if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
+ rootHasLayoutEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStarted &&
+ injectedProfilingHooks.markLayoutEffectsStarted(lanes),
+ (inProgressLanes = lanes),
+ (inProgressRoot = root),
+ commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork),
+ (inProgressRoot = inProgressLanes = null),
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStopped &&
+ injectedProfilingHooks.markLayoutEffectsStopped();
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootHasLayoutEffect);
+ }
+ }
+ requestPaint();
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? (pendingEffectsStatus = 3)
+ : ((pendingEffectsStatus = 0),
+ (pendingEffectsRoot = null),
+ releaseRootPooledCache(root, root.pendingLanes));
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 === rootHasLayoutEffect &&
+ (legacyErrorBoundariesThatAlreadyFailed = null);
+ rootHasLayoutEffect = lanesToEventPriority(lanes);
+ finishedWork = finishedWork.stateNode;
+ if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
+ try {
+ var didError = 128 === (finishedWork.current.flags & 128);
+ switch (rootHasLayoutEffect) {
+ case 2:
+ var schedulerPriority = ImmediatePriority;
+ break;
+ case 8:
+ schedulerPriority = UserBlockingPriority;
+ break;
+ case 32:
+ schedulerPriority = NormalPriority$1;
+ break;
+ case 268435456:
+ schedulerPriority = IdlePriority;
+ break;
+ default:
+ schedulerPriority = NormalPriority$1;
+ }
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ finishedWork,
+ schedulerPriority,
+ didError
+ );
+ } catch (err) {}
+ isDevToolsPresent && root.memoizedUpdaters.clear();
+ if (null !== recoverableErrors) {
+ didError = ReactSharedInternals.T;
+ schedulerPriority = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ ReactSharedInternals.T = null;
+ try {
+ var onRecoverableError = root.onRecoverableError;
+ for (
+ finishedWork = 0;
+ finishedWork < recoverableErrors.length;
+ finishedWork++
+ ) {
+ var recoverableError = recoverableErrors[finishedWork];
+ onRecoverableError(recoverableError.value, {
+ componentStack: recoverableError.stack
+ });
+ }
+ } finally {
+ (ReactSharedInternals.T = didError),
+ (currentUpdatePriority = schedulerPriority);
+ }
+ }
+ 0 !== (pendingEffectsLanes & 3) && 0 !== root.tag && flushPendingEffects();
+ ensureRootIsScheduled(root);
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)
+ ? ((nestedUpdateScheduled = !0),
+ root === rootWithNestedUpdates
+ ? nestedUpdateCount++
+ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
+ : (nestedUpdateCount = 0);
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ markCommitStopped();
+ }
}
function releaseRootPooledCache(root, remainingLanes) {
0 === (root.pooledCacheLanes &= remainingLanes) &&
@@ -10854,67 +10903,64 @@ function releaseRootPooledCache(root, remainingLanes) {
null != remainingLanes &&
((root.pooledCache = null), releaseCache(remainingLanes)));
}
+function flushPendingEffects(wasDelayedCommit) {
+ flushMutationEffects();
+ flushLayoutEffects();
+ return flushPassiveEffects(wasDelayedCommit);
+}
function flushPassiveEffects() {
- if (null !== rootWithPendingPassiveEffects) {
- var root = rootWithPendingPassiveEffects,
- remainingLanes = pendingPassiveEffectsRemainingLanes;
- pendingPassiveEffectsRemainingLanes = 0;
- var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
- prevTransition = ReactSharedInternals.T,
- previousPriority = currentUpdatePriority;
- try {
- currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
- ReactSharedInternals.T = null;
- if (null === rootWithPendingPassiveEffects)
- var JSCompiler_inline_result = !1;
- else {
- renderPriority = pendingPassiveTransitions;
- pendingPassiveTransitions = null;
- var root$jscomp$0 = rootWithPendingPassiveEffects,
- lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsLanes = 0;
- if (0 !== (executionContext & 6))
- throw Error("Cannot flush passive effects while already rendering.");
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStarted &&
- injectedProfilingHooks.markPassiveEffectsStarted(lanes);
- var prevExecutionContext = executionContext;
- executionContext |= 4;
- commitPassiveUnmountOnFiber(root$jscomp$0.current);
- commitPassiveMountOnFiber(
- root$jscomp$0,
- root$jscomp$0.current,
- lanes,
- renderPriority
- );
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStopped &&
- injectedProfilingHooks.markPassiveEffectsStopped();
- executionContext = prevExecutionContext;
- flushSyncWorkAcrossRoots_impl(0, !1);
- if (
- injectedHook &&
- "function" === typeof injectedHook.onPostCommitFiberRoot
- )
- try {
- injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
- } catch (err) {}
- var stateNode = root$jscomp$0.current.stateNode;
- stateNode.effectDuration = 0;
- stateNode.passiveEffectDuration = 0;
- JSCompiler_inline_result = !0;
- }
- return JSCompiler_inline_result;
- } finally {
- (currentUpdatePriority = previousPriority),
- (ReactSharedInternals.T = prevTransition),
- releaseRootPooledCache(root, remainingLanes);
- }
+ if (3 !== pendingEffectsStatus) return !1;
+ var root = pendingEffectsRoot,
+ remainingLanes = pendingEffectsRemainingLanes;
+ pendingEffectsRemainingLanes = 0;
+ var renderPriority = lanesToEventPriority(pendingEffectsLanes),
+ prevTransition = ReactSharedInternals.T,
+ previousPriority = currentUpdatePriority;
+ try {
+ currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
+ ReactSharedInternals.T = null;
+ renderPriority = pendingPassiveTransitions;
+ pendingPassiveTransitions = null;
+ var root$jscomp$0 = pendingEffectsRoot,
+ lanes = pendingEffectsLanes;
+ pendingEffectsStatus = 0;
+ pendingEffectsRoot = null;
+ pendingEffectsLanes = 0;
+ if (0 !== (executionContext & 6))
+ throw Error("Cannot flush passive effects while already rendering.");
+ null !== injectedProfilingHooks &&
+ "function" === typeof injectedProfilingHooks.markPassiveEffectsStarted &&
+ injectedProfilingHooks.markPassiveEffectsStarted(lanes);
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ commitPassiveUnmountOnFiber(root$jscomp$0.current);
+ commitPassiveMountOnFiber(
+ root$jscomp$0,
+ root$jscomp$0.current,
+ lanes,
+ renderPriority
+ );
+ null !== injectedProfilingHooks &&
+ "function" === typeof injectedProfilingHooks.markPassiveEffectsStopped &&
+ injectedProfilingHooks.markPassiveEffectsStopped();
+ executionContext = prevExecutionContext;
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
+ } catch (err) {}
+ var stateNode = root$jscomp$0.current.stateNode;
+ stateNode.effectDuration = 0;
+ stateNode.passiveEffectDuration = 0;
+ return !0;
+ } finally {
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = prevTransition),
+ releaseRootPooledCache(root, remainingLanes);
}
- return !1;
}
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
@@ -11131,7 +11177,7 @@ function createWorkInProgress(current, pendingProps) {
(workInProgress.deletions = null),
(workInProgress.actualDuration = -0),
(workInProgress.actualStartTime = -1.1));
- workInProgress.flags = current.flags & 31457280;
+ workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -11152,7 +11198,7 @@ function createWorkInProgress(current, pendingProps) {
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
- workInProgress.flags &= 31457282;
+ workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
@@ -11344,11 +11390,7 @@ function FiberRootNode(
) {
this.tag = tag;
this.containerInfo = containerInfo;
- this.finishedWork =
- this.pingCache =
- this.current =
- this.pendingChildren =
- null;
+ this.pingCache = this.current = this.pendingChildren = null;
this.timeoutHandle = -1;
this.callbackNode =
this.next =
@@ -11361,7 +11403,6 @@ function FiberRootNode(
this.entangledLanes =
this.shellSuspendCounter =
this.errorRecoveryDisabledLanes =
- this.finishedLanes =
this.expiredLanes =
this.warmLanes =
this.pingedLanes =
@@ -11772,20 +11813,20 @@ batchedUpdatesImpl = function (fn, a) {
}
};
var roots = new Map(),
- internals$jscomp$inline_1303 = {
+ internals$jscomp$inline_1317 = {
bundleType: 0,
- version: "19.1.0-native-fb-a9bbe346-20241219",
+ version: "19.1.0-native-fb-a160102f-20250107",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.1.0-native-fb-a9bbe346-20241219"
+ reconcilerVersion: "19.1.0-native-fb-a160102f-20250107"
};
null !== extraDevToolsConfig &&
- (internals$jscomp$inline_1303.rendererConfig = extraDevToolsConfig);
-internals$jscomp$inline_1303.getLaneLabelMap = function () {
+ (internals$jscomp$inline_1317.rendererConfig = extraDevToolsConfig);
+internals$jscomp$inline_1317.getLaneLabelMap = function () {
for (
- var map = new Map(), lane = 1, index$155 = 0;
- 31 > index$155;
- index$155++
+ var map = new Map(), lane = 1, index$156 = 0;
+ 31 > index$156;
+ index$156++
) {
var label = getLabelForLane(lane);
map.set(lane, label);
@@ -11793,20 +11834,20 @@ internals$jscomp$inline_1303.getLaneLabelMap = function () {
}
return map;
};
-internals$jscomp$inline_1303.injectProfilingHooks = function (profilingHooks) {
+internals$jscomp$inline_1317.injectProfilingHooks = function (profilingHooks) {
injectedProfilingHooks = profilingHooks;
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
- var hook$jscomp$inline_1585 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+ var hook$jscomp$inline_1595 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
- !hook$jscomp$inline_1585.isDisabled &&
- hook$jscomp$inline_1585.supportsFiber
+ !hook$jscomp$inline_1595.isDisabled &&
+ hook$jscomp$inline_1595.supportsFiber
)
try {
- (rendererID = hook$jscomp$inline_1585.inject(
- internals$jscomp$inline_1303
+ (rendererID = hook$jscomp$inline_1595.inject(
+ internals$jscomp$inline_1317
)),
- (injectedHook = hook$jscomp$inline_1585);
+ (injectedHook = hook$jscomp$inline_1595);
} catch (err) {}
}
exports.createPortal = function (children, containerTag) {
diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js
index b3eb3b910bbc5..ca68603a3ef6a 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<<67fb3ee487a36cff510e3165a5819a66>>
+ * @generated SignedSource<>
*/
"use strict";
@@ -74,7 +74,7 @@ __DEV__ &&
}
function scheduleRoot(root, element) {
root.context === emptyContextObject &&
- (0 === root.tag && flushPassiveEffects(),
+ (0 === root.tag && flushPendingEffects(),
updateContainerImpl(root.current, 2, element, root, null, null),
flushSyncWork());
}
@@ -82,7 +82,7 @@ __DEV__ &&
if (null !== resolveFamily) {
var staleFamilies = update.staleFamilies;
update = update.updatedFamilies;
- flushPassiveEffects();
+ flushPendingEffects();
scheduleFibersWithFamiliesRecursively(
root.current,
update,
@@ -1626,41 +1626,6 @@ __DEV__ &&
}
return hook.checkDCE ? !0 : !1;
}
- function onCommitRoot(root, eventPriority) {
- if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
- try {
- var didError = 128 === (root.current.flags & 128);
- switch (eventPriority) {
- case DiscreteEventPriority:
- var schedulerPriority = ImmediatePriority;
- break;
- case ContinuousEventPriority:
- schedulerPriority = UserBlockingPriority;
- break;
- case DefaultEventPriority:
- schedulerPriority = NormalPriority$1;
- break;
- case IdleEventPriority:
- schedulerPriority = IdlePriority;
- break;
- default:
- schedulerPriority = NormalPriority$1;
- }
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- schedulerPriority,
- didError
- );
- } catch (err) {
- hasLoggedError ||
- ((hasLoggedError = !0),
- error$jscomp$0(
- "React instrumentation encountered an error: %s",
- err
- ));
- }
- }
function setIsStrictModeForDevtools(newIsStrictMode) {
"function" === typeof log$1 &&
(unstable_setDisableYieldValue(newIsStrictMode),
@@ -1790,14 +1755,13 @@ __DEV__ &&
);
}
}
- function getNextLanes(root, wipLanes) {
+ function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0,
suspendedLanes = root.suspendedLanes,
- pingedLanes = root.pingedLanes,
- warmLanes = root.warmLanes;
- root = 0 !== root.finishedLanes;
+ pingedLanes = root.pingedLanes;
+ root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes
? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
@@ -1807,29 +1771,30 @@ __DEV__ &&
0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = nonIdlePendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes)))))
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes =
+ getHighestPriorityLanes(rootHasPendingCommit)))))
: ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
0 !== nonIdlePendingLanes
? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
: 0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = pendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes))));
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = pendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes
? 0
: 0 !== wipLanes &&
wipLanes !== nextLanes &&
0 === (wipLanes & suspendedLanes) &&
((suspendedLanes = nextLanes & -nextLanes),
- (warmLanes = wipLanes & -wipLanes),
- suspendedLanes >= warmLanes ||
- (32 === suspendedLanes && 0 !== (warmLanes & 4194176)))
+ (rootHasPendingCommit = wipLanes & -wipLanes),
+ suspendedLanes >= rootHasPendingCommit ||
+ (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176)))
? wipLanes
: nextLanes;
}
@@ -3225,11 +3190,9 @@ __DEV__ &&
mightHavePendingSyncWork = !0;
null !== ReactSharedInternals.actQueue
? didScheduleMicrotask_act ||
- ((didScheduleMicrotask_act = !0),
- scheduleImmediateTask(processRootScheduleInMicrotask))
+ ((didScheduleMicrotask_act = !0), scheduleImmediateRootScheduleTask())
: didScheduleMicrotask ||
- ((didScheduleMicrotask = !0),
- scheduleImmediateTask(processRootScheduleInMicrotask));
+ ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());
ReactSharedInternals.isBatchingLegacy &&
0 === root.tag &&
(ReactSharedInternals.didScheduleLegacyUpdate = !0);
@@ -3264,7 +3227,9 @@ __DEV__ &&
(nextLanes = workInProgressRootRenderLanes),
(nextLanes = getNextLanes(
root,
- root === workInProgressRoot ? nextLanes : 0
+ root === workInProgressRoot ? nextLanes : 0,
+ null !== root.cancelPendingCommit ||
+ -1 !== root.timeoutHandle
)),
0 === (nextLanes & 3) ||
checkIfRootIsPrerendering(root, nextLanes) ||
@@ -3276,6 +3241,9 @@ __DEV__ &&
isFlushingWork = !1;
}
}
+ function processRootScheduleInImmediateTask() {
+ processRootScheduleInMicrotask();
+ }
function processRootScheduleInMicrotask() {
mightHavePendingSyncWork =
didScheduleMicrotask_act =
@@ -3321,7 +3289,8 @@ __DEV__ &&
suspendedLanes = workInProgressRootRenderLanes;
suspendedLanes = getNextLanes(
root,
- root === currentTime ? suspendedLanes : 0
+ root === currentTime ? suspendedLanes : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
pingedLanes = root.callbackNode;
if (
@@ -3379,14 +3348,22 @@ __DEV__ &&
}
function performWorkOnRootViaSchedulerTask(root, didTimeout) {
nestedUpdateScheduled = currentUpdateIsNested = !1;
+ if (
+ pendingEffectsStatus !== NO_PENDING_EFFECTS &&
+ pendingEffectsStatus !== PENDING_PASSIVE_PHASE
+ )
+ return (root.callbackNode = null), (root.callbackPriority = 0), null;
var originalCallbackNode = root.callbackNode;
- if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
+ if (flushPendingEffects(!0) && root.callbackNode !== originalCallbackNode)
return null;
var workInProgressRootRenderLanes$jscomp$0 =
workInProgressRootRenderLanes;
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
root,
- root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0
+ root === workInProgressRoot
+ ? workInProgressRootRenderLanes$jscomp$0
+ : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
performWorkOnRoot(
@@ -3401,7 +3378,7 @@ __DEV__ &&
: null;
}
function performSyncWorkOnRoot(root, lanes) {
- if (flushPassiveEffects()) return null;
+ if (flushPendingEffects()) return null;
currentUpdateIsNested = nestedUpdateScheduled;
nestedUpdateScheduled = !1;
performWorkOnRoot(root, lanes, !0);
@@ -3411,13 +3388,13 @@ __DEV__ &&
null !== callbackNode &&
cancelCallback$1(callbackNode);
}
- function scheduleImmediateTask(cb) {
+ function scheduleImmediateRootScheduleTask() {
null !== ReactSharedInternals.actQueue &&
ReactSharedInternals.actQueue.push(function () {
- cb();
+ processRootScheduleInMicrotask();
return null;
});
- scheduleCallback$3(ImmediatePriority, cb);
+ scheduleCallback$3(ImmediatePriority, processRootScheduleInImmediateTask);
}
function requestTransitionLane() {
0 === currentEventTransitionLane &&
@@ -4203,7 +4180,7 @@ __DEV__ &&
null;
hookTypesUpdateIndexDev = -1;
null !== current &&
- (current.flags & 31457280) !== (workInProgress.flags & 31457280) &&
+ (current.flags & 29360128) !== (workInProgress.flags & 29360128) &&
0 !== (current.mode & 1) &&
error$jscomp$0(
"Internal React error: Expected static flag was missing. Please notify the React team."
@@ -7767,14 +7744,14 @@ __DEV__ &&
if (null === ref)
null !== current &&
null !== current.ref &&
- (workInProgress.flags |= 2097664);
+ (workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
);
if (null === current || current.ref !== ref)
- workInProgress.flags |= 2097664;
+ workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
@@ -8488,7 +8465,7 @@ __DEV__ &&
(nextProps.treeBaseDuration = didSuspend.treeBaseDuration)),
(workInProgress.deletions = null))
: ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)),
- (nextProps.subtreeFlags = didSuspend.subtreeFlags & 31457280));
+ (nextProps.subtreeFlags = didSuspend.subtreeFlags & 29360128));
null !== currentFallbackChildFragment
? (nextPrimaryChildren = createWorkInProgress(
currentFallbackChildFragment,
@@ -9517,8 +9494,8 @@ __DEV__ &&
)
(newChildLanes |= _child2.lanes | _child2.childLanes),
- (subtreeFlags |= _child2.subtreeFlags & 31457280),
- (subtreeFlags |= _child2.flags & 31457280),
+ (subtreeFlags |= _child2.subtreeFlags & 29360128),
+ (subtreeFlags |= _child2.flags & 29360128),
(_treeBaseDuration += _child2.treeBaseDuration),
(_child2 = _child2.sibling);
completedWork.treeBaseDuration = _treeBaseDuration;
@@ -9530,8 +9507,8 @@ __DEV__ &&
)
(newChildLanes |=
_treeBaseDuration.lanes | _treeBaseDuration.childLanes),
- (subtreeFlags |= _treeBaseDuration.subtreeFlags & 31457280),
- (subtreeFlags |= _treeBaseDuration.flags & 31457280),
+ (subtreeFlags |= _treeBaseDuration.subtreeFlags & 29360128),
+ (subtreeFlags |= _treeBaseDuration.flags & 29360128),
(_treeBaseDuration.return = completedWork),
(_treeBaseDuration = _treeBaseDuration.sibling);
else if (0 !== (completedWork.mode & 2)) {
@@ -10742,7 +10719,7 @@ __DEV__ &&
if (
((root = nextEffect),
(firstChild = root.child),
- 0 !== (root.subtreeFlags & 1028) && null !== firstChild)
+ 0 !== (root.subtreeFlags & 1024) && null !== firstChild)
)
(firstChild.return = root), (nextEffect = firstChild);
else
@@ -10784,9 +10761,6 @@ __DEV__ &&
}
nextEffect = root.return;
}
- root = shouldFireAfterActiveInstanceBlur;
- shouldFireAfterActiveInstanceBlur = !1;
- return root;
}
function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
var flags = finishedWork.flags;
@@ -11226,12 +11200,6 @@ __DEV__ &&
}
});
}
- function commitMutationEffects(root, finishedWork, committedLanes) {
- inProgressLanes = committedLanes;
- inProgressRoot = root;
- commitMutationEffectsOnFiber(finishedWork, root);
- inProgressRoot = inProgressLanes = null;
- }
function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
var deletions = parentFiber.deletions;
if (null !== deletions)
@@ -11589,12 +11557,6 @@ __DEV__ &&
}
flags & 4096 && (finishedWork.flags &= -4097);
}
- function commitLayoutEffects(finishedWork, root, committedLanes) {
- inProgressLanes = committedLanes;
- inProgressRoot = root;
- commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);
- inProgressRoot = inProgressLanes = null;
- }
function recursivelyTraverseLayoutEffects(root, parentFiber) {
if (parentFiber.subtreeFlags & 8772)
for (parentFiber = parentFiber.child; null !== parentFiber; )
@@ -11839,6 +11801,14 @@ __DEV__ &&
flags & 2048 &&
commitHookPassiveMountEffects(finishedWork, Passive | HasEffect);
break;
+ case 1:
+ recursivelyTraversePassiveMountEffects(
+ finishedRoot,
+ finishedWork,
+ committedLanes,
+ committedTransitions
+ );
+ break;
case 3:
var prevEffectDuration = pushNestedEffectDurations();
recursivelyTraversePassiveMountEffects(
@@ -12546,9 +12516,8 @@ __DEV__ &&
break;
}
a: {
- renderWasConcurrent = root;
- shouldTimeSlice = exitStatus;
- switch (shouldTimeSlice) {
+ shouldTimeSlice = root;
+ switch (exitStatus) {
case RootInProgress:
case RootFatalErrored:
throw Error("Root did not complete. This is a bug in React.");
@@ -12556,7 +12525,7 @@ __DEV__ &&
if ((lanes & 4194176) !== lanes) break;
case RootSuspendedAtTheShell:
markRootSuspended(
- renderWasConcurrent,
+ shouldTimeSlice,
lanes,
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
@@ -12571,63 +12540,39 @@ __DEV__ &&
default:
throw Error("Unknown root exit status.");
}
- renderWasConcurrent.finishedWork = forceSync;
- renderWasConcurrent.finishedLanes = lanes;
- if (null !== ReactSharedInternals.actQueue) {
- lanes = renderWasConcurrent;
- forceSync = workInProgressRootRecoverableErrors;
- exitStatus = workInProgressTransitions;
- renderWasConcurrent =
- workInProgressRootDidIncludeRecursiveRenderUpdate;
- lanesThatJustErrored = workInProgressDeferredLane;
- originallyAttemptedLanes =
- workInProgressRootInterleavedUpdatedLanes;
- var suspendedRetryLanes = workInProgressSuspendedRetryLanes,
- suspendedCommitReason = IMMEDIATE_COMMIT,
- prevTransition = ReactSharedInternals.T,
- previousUpdateLanePriority = currentUpdatePriority;
- try {
- (currentUpdatePriority = DiscreteEventPriority),
- (ReactSharedInternals.T = null),
- commitRootImpl(
- lanes,
- forceSync,
- exitStatus,
- renderWasConcurrent,
- previousUpdateLanePriority,
- lanesThatJustErrored,
- originallyAttemptedLanes,
- suspendedRetryLanes,
- shouldTimeSlice,
- suspendedCommitReason,
- -0,
- 0
- );
- } finally {
- (ReactSharedInternals.T = prevTransition),
- (currentUpdatePriority = previousUpdateLanePriority);
- }
- } else {
+ if (null !== ReactSharedInternals.actQueue)
+ commitRoot(
+ shouldTimeSlice,
+ forceSync,
+ lanes,
+ workInProgressRootRecoverableErrors,
+ workInProgressTransitions,
+ workInProgressRootDidIncludeRecursiveRenderUpdate,
+ workInProgressDeferredLane,
+ workInProgressRootInterleavedUpdatedLanes,
+ workInProgressSuspendedRetryLanes
+ );
+ else {
if (
(lanes & 62914560) === lanes &&
- (alwaysThrottleRetries || shouldTimeSlice === RootSuspended) &&
- ((exitStatus =
+ (alwaysThrottleRetries || exitStatus === RootSuspended) &&
+ ((renderWasConcurrent =
globalMostRecentFallbackTime +
FALLBACK_THROTTLE_MS -
now$1()),
- 10 < exitStatus)
+ 10 < renderWasConcurrent)
) {
markRootSuspended(
- renderWasConcurrent,
+ shouldTimeSlice,
lanes,
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
- if (0 !== getNextLanes(renderWasConcurrent, 0)) break a;
- renderWasConcurrent.timeoutHandle = scheduleTimeout(
+ if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;
+ shouldTimeSlice.timeoutHandle = scheduleTimeout(
commitRootWhenReady.bind(
null,
- renderWasConcurrent,
+ shouldTimeSlice,
forceSync,
workInProgressRootRecoverableErrors,
workInProgressTransitions,
@@ -12637,17 +12582,17 @@ __DEV__ &&
workInProgressRootInterleavedUpdatedLanes,
workInProgressSuspendedRetryLanes,
workInProgressRootDidSkipSuspendedSiblings,
- shouldTimeSlice,
+ exitStatus,
THROTTLED_COMMIT,
-0,
0
),
- exitStatus
+ renderWasConcurrent
);
break a;
}
commitRootWhenReady(
- renderWasConcurrent,
+ shouldTimeSlice,
forceSync,
workInProgressRootRecoverableErrors,
workInProgressTransitions,
@@ -12657,7 +12602,7 @@ __DEV__ &&
workInProgressRootInterleavedUpdatedLanes,
workInProgressSuspendedRetryLanes,
workInProgressRootDidSkipSuspendedSiblings,
- shouldTimeSlice,
+ exitStatus,
IMMEDIATE_COMMIT,
-0,
0
@@ -12678,39 +12623,23 @@ __DEV__ &&
lanes,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- didSkipSuspendedSiblings,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
+ suspendedRetryLanes
) {
- lanes = finishedWork.subtreeFlags;
- (lanes & 8192 || 16785408 === (lanes & 16785408)) &&
+ root.timeoutHandle = -1;
+ var subtreeFlags = finishedWork.subtreeFlags;
+ (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) &&
accumulateSuspenseyCommitOnFiber(finishedWork);
- finishedWork = ReactSharedInternals.T;
- lanes = currentUpdatePriority;
- try {
- (currentUpdatePriority = DiscreteEventPriority),
- (ReactSharedInternals.T = null),
- commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- lanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
- );
- } finally {
- (ReactSharedInternals.T = finishedWork),
- (currentUpdatePriority = lanes);
- }
+ commitRoot(
+ root,
+ finishedWork,
+ lanes,
+ recoverableErrors,
+ transitions,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+ );
}
function isRenderConsistentWithExternalStores(finishedWork) {
for (var node = finishedWork; ; ) {
@@ -12792,8 +12721,6 @@ __DEV__ &&
}
}
function prepareFreshStack(root, lanes) {
- root.finishedWork = null;
- root.finishedLanes = 0;
var timeoutHandle = root.timeoutHandle;
-1 !== timeoutHandle &&
((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
@@ -13176,7 +13103,7 @@ __DEV__ &&
}
null !== ReactSharedInternals.actQueue
? workLoopSync()
- : workLoopConcurrent();
+ : workLoopConcurrentByScheduler();
break;
} catch (thrownValue$36) {
handleThrow(root, thrownValue$36);
@@ -13199,7 +13126,7 @@ __DEV__ &&
finishQueueingConcurrentUpdates();
return workInProgressRootExitStatus;
}
- function workLoopConcurrent() {
+ function workLoopConcurrentByScheduler() {
for (; null !== workInProgress && !shouldYield(); )
performUnitOfWork(workInProgress);
}
@@ -13409,140 +13336,251 @@ __DEV__ &&
workInProgressRootExitStatus = RootSuspendedAtTheShell;
workInProgress = null;
}
- function commitRootImpl(
+ function commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
- renderPriorityLevel,
spawnedLane,
updatedLanes,
suspendedRetryLanes
) {
- do flushPassiveEffects();
- while (null !== rootWithPendingPassiveEffects);
+ root.cancelPendingCommit = null;
+ do flushPendingEffects();
+ while (pendingEffectsStatus !== NO_PENDING_EFFECTS);
ReactStrictModeWarnings.flushLegacyContextWarning();
ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
throw Error("Should not already be working.");
- var finishedWork = root.finishedWork;
- didIncludeRenderPhaseUpdate = root.finishedLanes;
null !== injectedProfilingHooks &&
"function" === typeof injectedProfilingHooks.markCommitStarted &&
- injectedProfilingHooks.markCommitStarted(didIncludeRenderPhaseUpdate);
- if (null === finishedWork) return markCommitStopped(), null;
- 0 === didIncludeRenderPhaseUpdate &&
- error$jscomp$0(
- "root.finishedLanes should not be empty during a commit. This is a bug in React."
- );
- root.finishedWork = null;
- root.finishedLanes = 0;
- if (finishedWork === root.current)
- throw Error(
- "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ injectedProfilingHooks.markCommitStarted(lanes);
+ if (null === finishedWork) markCommitStopped();
+ else {
+ 0 === lanes &&
+ error$jscomp$0(
+ "finishedLanes should not be empty during a commit. This is a bug in React."
+ );
+ if (finishedWork === root.current)
+ throw Error(
+ "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ );
+ didIncludeRenderPhaseUpdate =
+ finishedWork.lanes | finishedWork.childLanes;
+ didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
+ markRootFinished(
+ root,
+ lanes,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
);
- var remainingLanes = finishedWork.lanes | finishedWork.childLanes;
- remainingLanes |= concurrentlyUpdatedLanes;
- markRootFinished(
- root,
- didIncludeRenderPhaseUpdate,
- remainingLanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes
- );
- root === workInProgressRoot &&
- ((workInProgress = workInProgressRoot = null),
- (workInProgressRootRenderLanes = 0));
- spawnedLane = !1;
- 0 !== (finishedWork.subtreeFlags & 10256) ||
- 0 !== (finishedWork.flags & 10256)
- ? ((spawnedLane = !0),
- (pendingPassiveEffectsRemainingLanes = remainingLanes),
- (pendingPassiveTransitions = transitions),
- (root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null),
- scheduleCallback(NormalPriority$1, function () {
- flushPassiveEffects(!0);
- return null;
- }))
- : ((root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null));
- commitStartTime = now();
- transitions = 0 !== (finishedWork.flags & 15990);
- 0 !== (finishedWork.subtreeFlags & 15990) || transitions
- ? ((transitions = ReactSharedInternals.T),
- (ReactSharedInternals.T = null),
- (updatedLanes = currentUpdatePriority),
- (currentUpdatePriority = DiscreteEventPriority),
- (suspendedRetryLanes = executionContext),
- (executionContext |= CommitContext),
- commitBeforeMutationEffects(root, finishedWork),
- commitMutationEffects(
- root,
- finishedWork,
- didIncludeRenderPhaseUpdate
- ),
- (root.current = finishedWork),
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markLayoutEffectsStarted &&
- injectedProfilingHooks.markLayoutEffectsStarted(
- didIncludeRenderPhaseUpdate
- ),
- commitLayoutEffects(finishedWork, root, didIncludeRenderPhaseUpdate),
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markLayoutEffectsStopped &&
- injectedProfilingHooks.markLayoutEffectsStopped(),
- requestPaint(),
- (executionContext = suspendedRetryLanes),
- (currentUpdatePriority = updatedLanes),
- (ReactSharedInternals.T = transitions))
- : (root.current = finishedWork);
- (transitions = spawnedLane)
- ? ((spawnedLane = !1),
- (rootWithPendingPassiveEffects = root),
- (pendingPassiveEffectsLanes = didIncludeRenderPhaseUpdate))
- : (releaseRootPooledCache(root, remainingLanes),
- (nestedPassiveUpdateCount = 0),
- (rootWithPassiveNestedUpdates = null));
- remainingLanes = root.pendingLanes;
- 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
- transitions || commitDoubleInvokeEffectsInDEV(root, !1);
- onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
- isDevToolsPresent && root.memoizedUpdaters.clear();
- if (null !== recoverableErrors)
- for (
- renderPriorityLevel = root.onRecoverableError, finishedWork = 0;
- finishedWork < recoverableErrors.length;
- finishedWork++
+ root === workInProgressRoot &&
+ ((workInProgress = workInProgressRoot = null),
+ (workInProgressRootRenderLanes = 0));
+ pendingFinishedWork = finishedWork;
+ pendingEffectsRoot = root;
+ pendingEffectsLanes = lanes;
+ pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
+ pendingPassiveTransitions = transitions;
+ pendingRecoverableErrors = recoverableErrors;
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? ((root.callbackNode = null),
+ (root.callbackPriority = 0),
+ scheduleCallback(NormalPriority$1, function () {
+ flushPassiveEffects(!0);
+ return null;
+ }))
+ : ((root.callbackNode = null), (root.callbackPriority = 0));
+ commitStartTime = now();
+ lanes = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || lanes) {
+ lanes = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ recoverableErrors = currentUpdatePriority;
+ currentUpdatePriority = DiscreteEventPriority;
+ transitions = executionContext;
+ executionContext |= CommitContext;
+ try {
+ commitBeforeMutationEffects(root, finishedWork);
+ } finally {
+ (executionContext = transitions),
+ (currentUpdatePriority = recoverableErrors),
+ (ReactSharedInternals.T = lanes);
+ }
+ }
+ pendingEffectsStatus = PENDING_MUTATION_PHASE;
+ flushMutationEffects();
+ flushLayoutEffects();
+ }
+ }
+ function flushMutationEffects() {
+ if (pendingEffectsStatus === PENDING_MUTATION_PHASE) {
+ pendingEffectsStatus = NO_PENDING_EFFECTS;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
+ if (
+ 0 !== (finishedWork.subtreeFlags & 13878) ||
+ rootMutationHasEffect
+ ) {
+ rootMutationHasEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = DiscreteEventPriority;
+ var prevExecutionContext = executionContext;
+ executionContext |= CommitContext;
+ try {
+ (inProgressLanes = lanes),
+ (inProgressRoot = root),
+ commitMutationEffectsOnFiber(finishedWork, root),
+ (inProgressRoot = inProgressLanes = null);
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootMutationHasEffect);
+ }
+ }
+ root.current = finishedWork;
+ pendingEffectsStatus = PENDING_LAYOUT_PHASE;
+ }
+ }
+ function flushLayoutEffects() {
+ if (pendingEffectsStatus === PENDING_LAYOUT_PHASE) {
+ pendingEffectsStatus = NO_PENDING_EFFECTS;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ recoverableErrors = pendingRecoverableErrors,
+ rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
+ if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
+ rootHasLayoutEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = DiscreteEventPriority;
+ var prevExecutionContext = executionContext;
+ executionContext |= CommitContext;
+ try {
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStarted &&
+ injectedProfilingHooks.markLayoutEffectsStarted(lanes),
+ (inProgressLanes = lanes),
+ (inProgressRoot = root),
+ commitLayoutEffectOnFiber(
+ root,
+ finishedWork.alternate,
+ finishedWork
+ ),
+ (inProgressRoot = inProgressLanes = null),
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStopped &&
+ injectedProfilingHooks.markLayoutEffectsStopped();
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootHasLayoutEffect);
+ }
+ }
+ requestPaint();
+ (rootHasLayoutEffect =
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256))
+ ? (pendingEffectsStatus = PENDING_PASSIVE_PHASE)
+ : ((pendingEffectsStatus = NO_PENDING_EFFECTS),
+ (pendingEffectsRoot = null),
+ releaseRootPooledCache(root, root.pendingLanes),
+ (nestedPassiveUpdateCount = 0),
+ (rootWithPassiveNestedUpdates = null));
+ previousPriority = root.pendingLanes;
+ 0 === previousPriority &&
+ (legacyErrorBoundariesThatAlreadyFailed = null);
+ rootHasLayoutEffect || commitDoubleInvokeEffectsInDEV(root, !1);
+ rootHasLayoutEffect = lanesToEventPriority(lanes);
+ finishedWork = finishedWork.stateNode;
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onCommitFiberRoot
)
- (remainingLanes = recoverableErrors[finishedWork]),
- (spawnedLane = makeErrorInfo(remainingLanes.stack)),
- runWithFiberInDEV(
- remainingLanes.source,
- renderPriorityLevel,
- remainingLanes.value,
- spawnedLane
+ try {
+ var didError = 128 === (finishedWork.current.flags & 128);
+ switch (rootHasLayoutEffect) {
+ case DiscreteEventPriority:
+ var schedulerPriority = ImmediatePriority;
+ break;
+ case ContinuousEventPriority:
+ schedulerPriority = UserBlockingPriority;
+ break;
+ case DefaultEventPriority:
+ schedulerPriority = NormalPriority$1;
+ break;
+ case IdleEventPriority:
+ schedulerPriority = IdlePriority;
+ break;
+ default:
+ schedulerPriority = NormalPriority$1;
+ }
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ finishedWork,
+ schedulerPriority,
+ didError
);
- 0 !== (pendingPassiveEffectsLanes & 3) &&
- 0 !== root.tag &&
- flushPassiveEffects();
- ensureRootIsScheduled(root);
- remainingLanes = root.pendingLanes;
- 0 !== (didIncludeRenderPhaseUpdate & 4194218) &&
- 0 !== (remainingLanes & 42)
- ? ((nestedUpdateScheduled = !0),
- root === rootWithNestedUpdates
- ? nestedUpdateCount++
- : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
- : (nestedUpdateCount = 0);
- flushSyncWorkAcrossRoots_impl(0, !1);
- markCommitStopped();
- return null;
+ } catch (err) {
+ hasLoggedError ||
+ ((hasLoggedError = !0),
+ error$jscomp$0(
+ "React instrumentation encountered an error: %s",
+ err
+ ));
+ }
+ isDevToolsPresent && root.memoizedUpdaters.clear();
+ if (null !== recoverableErrors) {
+ didError = ReactSharedInternals.T;
+ schedulerPriority = currentUpdatePriority;
+ currentUpdatePriority = DiscreteEventPriority;
+ ReactSharedInternals.T = null;
+ try {
+ var onRecoverableError = root.onRecoverableError;
+ for (
+ finishedWork = 0;
+ finishedWork < recoverableErrors.length;
+ finishedWork++
+ ) {
+ var recoverableError = recoverableErrors[finishedWork],
+ errorInfo = makeErrorInfo(recoverableError.stack);
+ runWithFiberInDEV(
+ recoverableError.source,
+ onRecoverableError,
+ recoverableError.value,
+ errorInfo
+ );
+ }
+ } finally {
+ (ReactSharedInternals.T = didError),
+ (currentUpdatePriority = schedulerPriority);
+ }
+ }
+ 0 !== (pendingEffectsLanes & 3) &&
+ 0 !== root.tag &&
+ flushPendingEffects();
+ ensureRootIsScheduled(root);
+ previousPriority = root.pendingLanes;
+ 0 !== (lanes & 4194218) && 0 !== (previousPriority & 42)
+ ? ((nestedUpdateScheduled = !0),
+ root === rootWithNestedUpdates
+ ? nestedUpdateCount++
+ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
+ : (nestedUpdateCount = 0);
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ markCommitStopped();
+ }
}
function makeErrorInfo(componentStack) {
componentStack = { componentStack: componentStack };
@@ -13561,94 +13599,87 @@ __DEV__ &&
null != remainingLanes &&
((root.pooledCache = null), releaseCache(remainingLanes)));
}
+ function flushPendingEffects(wasDelayedCommit) {
+ flushMutationEffects();
+ flushLayoutEffects();
+ return flushPassiveEffects(wasDelayedCommit);
+ }
function flushPassiveEffects() {
- if (null !== rootWithPendingPassiveEffects) {
- var root = rootWithPendingPassiveEffects,
- remainingLanes = pendingPassiveEffectsRemainingLanes;
- pendingPassiveEffectsRemainingLanes = 0;
- var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
- priority =
- 0 === DefaultEventPriority || DefaultEventPriority > renderPriority
- ? DefaultEventPriority
- : renderPriority;
- renderPriority = ReactSharedInternals.T;
- var previousPriority = currentUpdatePriority;
- try {
- currentUpdatePriority = priority;
- ReactSharedInternals.T = null;
- if (null === rootWithPendingPassiveEffects)
- var JSCompiler_inline_result = !1;
- else {
- priority = pendingPassiveTransitions;
- pendingPassiveTransitions = null;
- var root$jscomp$0 = rootWithPendingPassiveEffects,
- lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsLanes = 0;
- if (
- (executionContext & (RenderContext | CommitContext)) !==
- NoContext
- )
- throw Error(
- "Cannot flush passive effects while already rendering."
- );
- isFlushingPassiveEffects = !0;
- didScheduleUpdateDuringPassiveEffects = !1;
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStarted &&
- injectedProfilingHooks.markPassiveEffectsStarted(lanes);
- var prevExecutionContext = executionContext;
- executionContext |= CommitContext;
- commitPassiveUnmountOnFiber(root$jscomp$0.current);
- commitPassiveMountOnFiber(
- root$jscomp$0,
- root$jscomp$0.current,
- lanes,
- priority
- );
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStopped &&
- injectedProfilingHooks.markPassiveEffectsStopped();
- commitDoubleInvokeEffectsInDEV(root$jscomp$0, !0);
- executionContext = prevExecutionContext;
- flushSyncWorkAcrossRoots_impl(0, !1);
- didScheduleUpdateDuringPassiveEffects
- ? root$jscomp$0 === rootWithPassiveNestedUpdates
- ? nestedPassiveUpdateCount++
- : ((nestedPassiveUpdateCount = 0),
- (rootWithPassiveNestedUpdates = root$jscomp$0))
- : (nestedPassiveUpdateCount = 0);
- didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects =
- !1;
- if (
- injectedHook &&
- "function" === typeof injectedHook.onPostCommitFiberRoot
- )
- try {
- injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
- } catch (err) {
- hasLoggedError ||
- ((hasLoggedError = !0),
- error$jscomp$0(
- "React instrumentation encountered an error: %s",
- err
- ));
- }
- var stateNode = root$jscomp$0.current.stateNode;
- stateNode.effectDuration = 0;
- stateNode.passiveEffectDuration = 0;
- JSCompiler_inline_result = !0;
+ if (pendingEffectsStatus !== PENDING_PASSIVE_PHASE) return !1;
+ var root = pendingEffectsRoot,
+ remainingLanes = pendingEffectsRemainingLanes;
+ pendingEffectsRemainingLanes = 0;
+ var renderPriority = lanesToEventPriority(pendingEffectsLanes),
+ priority =
+ 0 === DefaultEventPriority || DefaultEventPriority > renderPriority
+ ? DefaultEventPriority
+ : renderPriority;
+ renderPriority = ReactSharedInternals.T;
+ var previousPriority = currentUpdatePriority;
+ try {
+ currentUpdatePriority = priority;
+ ReactSharedInternals.T = null;
+ priority = pendingPassiveTransitions;
+ pendingPassiveTransitions = null;
+ var root$jscomp$0 = pendingEffectsRoot,
+ lanes = pendingEffectsLanes;
+ pendingEffectsStatus = NO_PENDING_EFFECTS;
+ pendingEffectsRoot = null;
+ pendingEffectsLanes = 0;
+ if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
+ throw Error("Cannot flush passive effects while already rendering.");
+ isFlushingPassiveEffects = !0;
+ didScheduleUpdateDuringPassiveEffects = !1;
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markPassiveEffectsStarted &&
+ injectedProfilingHooks.markPassiveEffectsStarted(lanes);
+ var prevExecutionContext = executionContext;
+ executionContext |= CommitContext;
+ commitPassiveUnmountOnFiber(root$jscomp$0.current);
+ commitPassiveMountOnFiber(
+ root$jscomp$0,
+ root$jscomp$0.current,
+ lanes,
+ priority
+ );
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markPassiveEffectsStopped &&
+ injectedProfilingHooks.markPassiveEffectsStopped();
+ commitDoubleInvokeEffectsInDEV(root$jscomp$0, !0);
+ executionContext = prevExecutionContext;
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ didScheduleUpdateDuringPassiveEffects
+ ? root$jscomp$0 === rootWithPassiveNestedUpdates
+ ? nestedPassiveUpdateCount++
+ : ((nestedPassiveUpdateCount = 0),
+ (rootWithPassiveNestedUpdates = root$jscomp$0))
+ : (nestedPassiveUpdateCount = 0);
+ didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects = !1;
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
+ } catch (err) {
+ hasLoggedError ||
+ ((hasLoggedError = !0),
+ error$jscomp$0(
+ "React instrumentation encountered an error: %s",
+ err
+ ));
}
- return JSCompiler_inline_result;
- } finally {
- (currentUpdatePriority = previousPriority),
- (ReactSharedInternals.T = renderPriority),
- releaseRootPooledCache(root, remainingLanes);
- }
+ var stateNode = root$jscomp$0.current.stateNode;
+ stateNode.effectDuration = 0;
+ stateNode.passiveEffectDuration = 0;
+ return !0;
+ } finally {
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = renderPriority),
+ releaseRootPooledCache(root, remainingLanes);
}
- return !1;
}
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
@@ -14166,7 +14197,7 @@ __DEV__ &&
(workInProgress.deletions = null),
(workInProgress.actualDuration = -0),
(workInProgress.actualStartTime = -1.1));
- workInProgress.flags = current.flags & 31457280;
+ workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -14204,7 +14235,7 @@ __DEV__ &&
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
- workInProgress.flags &= 31457282;
+ workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
@@ -14461,11 +14492,7 @@ __DEV__ &&
) {
this.tag = tag;
this.containerInfo = containerInfo;
- this.finishedWork =
- this.pingCache =
- this.current =
- this.pendingChildren =
- null;
+ this.pingCache = this.current = this.pendingChildren = null;
this.timeoutHandle = -1;
this.callbackNode =
this.next =
@@ -14478,7 +14505,6 @@ __DEV__ &&
this.entangledLanes =
this.shellSuspendCounter =
this.errorRecoveryDisabledLanes =
- this.finishedLanes =
this.expiredLanes =
this.warmLanes =
this.pingedLanes =
@@ -17500,7 +17526,6 @@ __DEV__ &&
nextEffect = null,
inProgressLanes = null,
inProgressRoot = null,
- shouldFireAfterActiveInstanceBlur = !1,
hostParent = null,
hostParentIsContainer = !1,
suspenseyCommitFlag = 8192,
@@ -17571,10 +17596,19 @@ __DEV__ &&
RENDER_TIMEOUT_MS = 500,
workInProgressTransitions = null,
legacyErrorBoundariesThatAlreadyFailed = null,
- rootWithPendingPassiveEffects = null,
- pendingPassiveEffectsLanes = 0,
- pendingPassiveEffectsRemainingLanes = 0,
+ IMMEDIATE_COMMIT = 0,
+ THROTTLED_COMMIT = 2,
+ NO_PENDING_EFFECTS = 0,
+ PENDING_MUTATION_PHASE = 1,
+ PENDING_LAYOUT_PHASE = 2,
+ PENDING_PASSIVE_PHASE = 3,
+ pendingEffectsStatus = 0,
+ pendingEffectsRoot = null,
+ pendingFinishedWork = null,
+ pendingEffectsLanes = 0,
+ pendingEffectsRemainingLanes = 0,
pendingPassiveTransitions = null,
+ pendingRecoverableErrors = null,
NESTED_UPDATE_LIMIT = 50,
nestedUpdateCount = 0,
rootWithNestedUpdates = null,
@@ -17584,8 +17618,6 @@ __DEV__ &&
nestedPassiveUpdateCount = 0,
rootWithPassiveNestedUpdates = null,
isRunningInsertionEffect = !1,
- IMMEDIATE_COMMIT = 0,
- THROTTLED_COMMIT = 2,
didWarnStateUpdateForNotYetMountedComponent = null,
didWarnAboutUpdateInRender = !1;
var didWarnAboutUpdateInRenderForAnotherComponent = new Set();
@@ -17677,11 +17709,11 @@ __DEV__ &&
shouldSuspendImpl = newShouldSuspendImpl;
};
var isomorphicReactPackageVersion = React.version;
- if ("19.1.0-native-fb-a9bbe346-20241219" !== isomorphicReactPackageVersion)
+ if ("19.1.0-native-fb-a160102f-20250107" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
- "\n - react-native-renderer: 19.1.0-native-fb-a9bbe346-20241219\nLearn more: https://react.dev/warnings/version-mismatch")
+ "\n - react-native-renderer: 19.1.0-native-fb-a160102f-20250107\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -17707,10 +17739,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
- version: "19.1.0-native-fb-a9bbe346-20241219",
+ version: "19.1.0-native-fb-a160102f-20250107",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.1.0-native-fb-a9bbe346-20241219"
+ reconcilerVersion: "19.1.0-native-fb-a160102f-20250107"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js
index 92552a7833ef8..ca72b8b9df06d 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<>
+ * @generated SignedSource<<677aae7770a265b33c40ae092f52e077>>
*/
"use strict";
@@ -1225,7 +1225,7 @@ eventPluginOrder = Array.prototype.slice.call([
"ReactNativeBridgeEventPlugin"
]);
recomputePluginOrdering();
-var injectedNamesToPlugins$jscomp$inline_287 = {
+var injectedNamesToPlugins$jscomp$inline_289 = {
ResponderEventPlugin: ResponderEventPlugin,
ReactNativeBridgeEventPlugin: {
eventTypes: {},
@@ -1271,32 +1271,32 @@ var injectedNamesToPlugins$jscomp$inline_287 = {
}
}
},
- isOrderingDirty$jscomp$inline_288 = !1,
- pluginName$jscomp$inline_289;
-for (pluginName$jscomp$inline_289 in injectedNamesToPlugins$jscomp$inline_287)
+ isOrderingDirty$jscomp$inline_290 = !1,
+ pluginName$jscomp$inline_291;
+for (pluginName$jscomp$inline_291 in injectedNamesToPlugins$jscomp$inline_289)
if (
- injectedNamesToPlugins$jscomp$inline_287.hasOwnProperty(
- pluginName$jscomp$inline_289
+ injectedNamesToPlugins$jscomp$inline_289.hasOwnProperty(
+ pluginName$jscomp$inline_291
)
) {
- var pluginModule$jscomp$inline_290 =
- injectedNamesToPlugins$jscomp$inline_287[pluginName$jscomp$inline_289];
+ var pluginModule$jscomp$inline_292 =
+ injectedNamesToPlugins$jscomp$inline_289[pluginName$jscomp$inline_291];
if (
- !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_289) ||
- namesToPlugins[pluginName$jscomp$inline_289] !==
- pluginModule$jscomp$inline_290
+ !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_291) ||
+ namesToPlugins[pluginName$jscomp$inline_291] !==
+ pluginModule$jscomp$inline_292
) {
- if (namesToPlugins[pluginName$jscomp$inline_289])
+ if (namesToPlugins[pluginName$jscomp$inline_291])
throw Error(
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
- (pluginName$jscomp$inline_289 + "`.")
+ (pluginName$jscomp$inline_291 + "`.")
);
- namesToPlugins[pluginName$jscomp$inline_289] =
- pluginModule$jscomp$inline_290;
- isOrderingDirty$jscomp$inline_288 = !0;
+ namesToPlugins[pluginName$jscomp$inline_291] =
+ pluginModule$jscomp$inline_292;
+ isOrderingDirty$jscomp$inline_290 = !0;
}
}
-isOrderingDirty$jscomp$inline_288 && recomputePluginOrdering();
+isOrderingDirty$jscomp$inline_290 && recomputePluginOrdering();
var instanceCache = new Map(),
instanceProps = new Map();
function getInstanceFromTag(tag) {
@@ -1851,17 +1851,6 @@ var ReactNativeFiberHostComponent = (function () {
unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue,
rendererID = null,
injectedHook = null;
-function onCommitRoot(root) {
- if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
- try {
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- void 0,
- 128 === (root.current.flags & 128)
- );
- } catch (err) {}
-}
function setIsStrictModeForDevtools(newIsStrictMode) {
"function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
if (injectedHook && "function" === typeof injectedHook.setStrictMode)
@@ -1931,14 +1920,13 @@ function getHighestPriorityLanes(lanes) {
return lanes;
}
}
-function getNextLanes(root, wipLanes) {
+function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0,
suspendedLanes = root.suspendedLanes,
- pingedLanes = root.pingedLanes,
- warmLanes = root.warmLanes;
- root = 0 !== root.finishedLanes;
+ pingedLanes = root.pingedLanes;
+ root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes
? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
@@ -1948,29 +1936,29 @@ function getNextLanes(root, wipLanes) {
0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = nonIdlePendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes)))))
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))))
: ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
0 !== nonIdlePendingLanes
? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
: 0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = pendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes))));
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = pendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes
? 0
: 0 !== wipLanes &&
wipLanes !== nextLanes &&
0 === (wipLanes & suspendedLanes) &&
((suspendedLanes = nextLanes & -nextLanes),
- (warmLanes = wipLanes & -wipLanes),
- suspendedLanes >= warmLanes ||
- (32 === suspendedLanes && 0 !== (warmLanes & 4194176)))
+ (rootHasPendingCommit = wipLanes & -wipLanes),
+ suspendedLanes >= rootHasPendingCommit ||
+ (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176)))
? wipLanes
: nextLanes;
}
@@ -2722,7 +2710,7 @@ function ensureRootIsScheduled(root) {
mightHavePendingSyncWork = !0;
didScheduleMicrotask ||
((didScheduleMicrotask = !0),
- scheduleCallback$3(ImmediatePriority, processRootScheduleInMicrotask));
+ scheduleCallback$3(ImmediatePriority, processRootScheduleInImmediateTask));
}
function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
if (!isFlushingWork && mightHavePendingSyncWork) {
@@ -2755,7 +2743,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
(JSCompiler_inline_result = workInProgressRootRenderLanes),
(JSCompiler_inline_result = getNextLanes(
root,
- root === workInProgressRoot ? JSCompiler_inline_result : 0
+ root === workInProgressRoot ? JSCompiler_inline_result : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
)),
0 === (JSCompiler_inline_result & 3) ||
checkIfRootIsPrerendering(root, JSCompiler_inline_result) ||
@@ -2767,7 +2756,7 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
isFlushingWork = !1;
}
}
-function processRootScheduleInMicrotask() {
+function processRootScheduleInImmediateTask() {
mightHavePendingSyncWork = didScheduleMicrotask = !1;
0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);
for (
@@ -2809,7 +2798,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
suspendedLanes = workInProgressRootRenderLanes;
suspendedLanes = getNextLanes(
root,
- root === currentTime ? suspendedLanes : 0
+ root === currentTime ? suspendedLanes : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
pingedLanes = root.callbackNode;
if (
@@ -2860,13 +2850,16 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
return 2;
}
function performWorkOnRootViaSchedulerTask(root, didTimeout) {
+ if (0 !== pendingEffectsStatus && 3 !== pendingEffectsStatus)
+ return (root.callbackNode = null), (root.callbackPriority = 0), null;
var originalCallbackNode = root.callbackNode;
- if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
+ if (flushPendingEffects(!0) && root.callbackNode !== originalCallbackNode)
return null;
var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
root,
- root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0
+ root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout);
@@ -2876,7 +2869,7 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) {
: null;
}
function performSyncWorkOnRoot(root, lanes) {
- if (flushPassiveEffects()) return null;
+ if (flushPendingEffects()) return null;
performWorkOnRoot(root, lanes, !0);
}
function requestTransitionLane() {
@@ -6241,14 +6234,14 @@ function markRef(current, workInProgress) {
if (null === ref)
null !== current &&
null !== current.ref &&
- (workInProgress.flags |= 2097664);
+ (workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
);
if (null === current || current.ref !== ref)
- workInProgress.flags |= 2097664;
+ workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
@@ -6800,7 +6793,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
(nextProps.pendingProps = primaryChildProps),
(workInProgress.deletions = null))
: ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)),
- (nextProps.subtreeFlags = didSuspend.subtreeFlags & 31457280));
+ (nextProps.subtreeFlags = didSuspend.subtreeFlags & 29360128));
null !== currentFallbackChildFragment
? (nextPrimaryChildren = createWorkInProgress(
currentFallbackChildFragment,
@@ -7575,8 +7568,8 @@ function bubbleProperties(completedWork) {
if (didBailout)
for (var child$95 = completedWork.child; null !== child$95; )
(newChildLanes |= child$95.lanes | child$95.childLanes),
- (subtreeFlags |= child$95.subtreeFlags & 31457280),
- (subtreeFlags |= child$95.flags & 31457280),
+ (subtreeFlags |= child$95.subtreeFlags & 29360128),
+ (subtreeFlags |= child$95.flags & 29360128),
(child$95.return = completedWork),
(child$95 = child$95.sibling);
else
@@ -8331,14 +8324,13 @@ function insertOrAppendPlacementNode(node, before, parent) {
var offscreenSubtreeIsHidden = !1,
offscreenSubtreeWasHidden = !1,
PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set,
- nextEffect = null,
- shouldFireAfterActiveInstanceBlur = !1;
+ nextEffect = null;
function commitBeforeMutationEffects(root, firstChild) {
for (nextEffect = firstChild; null !== nextEffect; )
if (
((root = nextEffect),
(firstChild = root.child),
- 0 !== (root.subtreeFlags & 1028) && null !== firstChild)
+ 0 !== (root.subtreeFlags & 1024) && null !== firstChild)
)
(firstChild.return = root), (nextEffect = firstChild);
else
@@ -8402,9 +8394,6 @@ function commitBeforeMutationEffects(root, firstChild) {
}
nextEffect = root.return;
}
- resolvedPrevProps = shouldFireAfterActiveInstanceBlur;
- shouldFireAfterActiveInstanceBlur = !1;
- return resolvedPrevProps;
}
function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
var flags = finishedWork.flags;
@@ -9301,6 +9290,14 @@ function commitPassiveMountOnFiber(
);
flags & 2048 && commitHookEffectListMount(9, finishedWork);
break;
+ case 1:
+ recursivelyTraversePassiveMountEffects(
+ finishedRoot,
+ finishedWork,
+ committedLanes,
+ committedTransitions
+ );
+ break;
case 3:
recursivelyTraversePassiveMountEffects(
finishedRoot,
@@ -9755,10 +9752,13 @@ var DefaultAsyncDispatcher = {
workInProgressRootRenderTargetTime = Infinity,
workInProgressTransitions = null,
legacyErrorBoundariesThatAlreadyFailed = null,
- rootWithPendingPassiveEffects = null,
- pendingPassiveEffectsLanes = 0,
- pendingPassiveEffectsRemainingLanes = 0,
+ pendingEffectsStatus = 0,
+ pendingEffectsRoot = null,
+ pendingFinishedWork = null,
+ pendingEffectsLanes = 0,
+ pendingEffectsRemainingLanes = 0,
pendingPassiveTransitions = null,
+ pendingRecoverableErrors = null,
nestedUpdateCount = 0,
rootWithNestedUpdates = null;
function requestUpdateLane(fiber) {
@@ -9923,8 +9923,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
default:
throw Error("Unknown root exit status.");
}
- shouldTimeSlice.finishedWork = forceSync;
- shouldTimeSlice.finishedLanes = lanes;
if (
(lanes & 62914560) === lanes &&
(alwaysThrottleRetries || 3 === renderWasConcurrent) &&
@@ -9937,7 +9935,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
- if (0 !== getNextLanes(shouldTimeSlice, 0)) break a;
+ if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;
shouldTimeSlice.timeoutHandle = scheduleTimeout(
commitRootWhenReady.bind(
null,
@@ -9969,12 +9967,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
lanes,
workInProgressDeferredLane,
workInProgressRootInterleavedUpdatedLanes,
- workInProgressSuspendedRetryLanes,
- workInProgressRootDidSkipSuspendedSiblings,
- renderWasConcurrent,
- 0,
- -0,
- 0
+ workInProgressSuspendedRetryLanes
);
}
}
@@ -9991,38 +9984,23 @@ function commitRootWhenReady(
lanes,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- didSkipSuspendedSiblings,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
+ suspendedRetryLanes
) {
- lanes = finishedWork.subtreeFlags;
- (lanes & 8192 || 16785408 === (lanes & 16785408)) &&
+ root.timeoutHandle = -1;
+ var subtreeFlags = finishedWork.subtreeFlags;
+ (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) &&
accumulateSuspenseyCommitOnFiber(finishedWork);
- finishedWork = ReactSharedInternals.T;
- lanes = currentUpdatePriority;
- try {
- (currentUpdatePriority = 2),
- (ReactSharedInternals.T = null),
- commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- lanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
- );
- } finally {
- (ReactSharedInternals.T = finishedWork), (currentUpdatePriority = lanes);
- }
+ commitRoot(
+ root,
+ finishedWork,
+ lanes,
+ recoverableErrors,
+ transitions,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+ );
}
function isRenderConsistentWithExternalStores(finishedWork) {
for (var node = finishedWork; ; ) {
@@ -10099,8 +10077,6 @@ function resetWorkInProgressStack() {
}
}
function prepareFreshStack(root, lanes) {
- root.finishedWork = null;
- root.finishedLanes = 0;
var timeoutHandle = root.timeoutHandle;
-1 !== timeoutHandle &&
((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
@@ -10383,7 +10359,7 @@ function renderRootConcurrent(root, lanes) {
throw Error("Unexpected SuspendedReason. This is a bug in React.");
}
}
- workLoopConcurrent();
+ workLoopConcurrentByScheduler();
break;
} catch (thrownValue$140) {
handleThrow(root, thrownValue$140);
@@ -10399,7 +10375,7 @@ function renderRootConcurrent(root, lanes) {
finishQueueingConcurrentUpdates();
return workInProgressRootExitStatus;
}
-function workLoopConcurrent() {
+function workLoopConcurrentByScheduler() {
for (; null !== workInProgress && !shouldYield(); )
performUnitOfWork(workInProgress);
}
@@ -10566,105 +10542,177 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) {
workInProgressRootExitStatus = 6;
workInProgress = null;
}
-function commitRootImpl(
+function commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
- renderPriorityLevel,
spawnedLane,
updatedLanes,
suspendedRetryLanes
) {
- do flushPassiveEffects();
- while (null !== rootWithPendingPassiveEffects);
+ root.cancelPendingCommit = null;
+ do flushPendingEffects();
+ while (0 !== pendingEffectsStatus);
if (0 !== (executionContext & 6))
throw Error("Should not already be working.");
- var finishedWork = root.finishedWork;
- didIncludeRenderPhaseUpdate = root.finishedLanes;
- if (null === finishedWork) return null;
- root.finishedWork = null;
- root.finishedLanes = 0;
- if (finishedWork === root.current)
- throw Error(
- "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ if (null !== finishedWork) {
+ if (finishedWork === root.current)
+ throw Error(
+ "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ );
+ didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
+ didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
+ markRootFinished(
+ root,
+ lanes,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
);
- var remainingLanes = finishedWork.lanes | finishedWork.childLanes;
- remainingLanes |= concurrentlyUpdatedLanes;
- markRootFinished(
- root,
- didIncludeRenderPhaseUpdate,
- remainingLanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes
- );
- root === workInProgressRoot &&
- ((workInProgress = workInProgressRoot = null),
- (workInProgressRootRenderLanes = 0));
- spawnedLane = !1;
- 0 !== (finishedWork.subtreeFlags & 10256) ||
- 0 !== (finishedWork.flags & 10256)
- ? ((spawnedLane = !0),
- (pendingPassiveEffectsRemainingLanes = remainingLanes),
- (pendingPassiveTransitions = transitions),
- (root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null),
- scheduleCallback(NormalPriority$1, function () {
- flushPassiveEffects(!0);
- return null;
- }))
- : ((root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null));
- transitions = 0 !== (finishedWork.flags & 15990);
- 0 !== (finishedWork.subtreeFlags & 15990) || transitions
- ? ((transitions = ReactSharedInternals.T),
- (ReactSharedInternals.T = null),
- (updatedLanes = currentUpdatePriority),
- (currentUpdatePriority = 2),
- (suspendedRetryLanes = executionContext),
- (executionContext |= 4),
- commitBeforeMutationEffects(root, finishedWork),
- commitMutationEffectsOnFiber(finishedWork, root),
- (root.current = finishedWork),
- commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork),
- requestPaint(),
- (executionContext = suspendedRetryLanes),
- (currentUpdatePriority = updatedLanes),
- (ReactSharedInternals.T = transitions))
- : (root.current = finishedWork);
- spawnedLane
- ? ((spawnedLane = !1),
- (rootWithPendingPassiveEffects = root),
- (pendingPassiveEffectsLanes = didIncludeRenderPhaseUpdate))
- : releaseRootPooledCache(root, remainingLanes);
- remainingLanes = root.pendingLanes;
- 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
- onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
- if (null !== recoverableErrors)
- for (
- renderPriorityLevel = root.onRecoverableError, finishedWork = 0;
- finishedWork < recoverableErrors.length;
- finishedWork++
- )
- (remainingLanes = recoverableErrors[finishedWork]),
- renderPriorityLevel(remainingLanes.value, {
- componentStack: remainingLanes.stack
- });
- 0 !== (pendingPassiveEffectsLanes & 3) &&
- 0 !== root.tag &&
- flushPassiveEffects();
- ensureRootIsScheduled(root);
- remainingLanes = root.pendingLanes;
- 0 !== (didIncludeRenderPhaseUpdate & 4194218) && 0 !== (remainingLanes & 42)
- ? root === rootWithNestedUpdates
- ? nestedUpdateCount++
- : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
- : (nestedUpdateCount = 0);
- flushSyncWorkAcrossRoots_impl(0, !1);
- return null;
+ root === workInProgressRoot &&
+ ((workInProgress = workInProgressRoot = null),
+ (workInProgressRootRenderLanes = 0));
+ pendingFinishedWork = finishedWork;
+ pendingEffectsRoot = root;
+ pendingEffectsLanes = lanes;
+ pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
+ pendingPassiveTransitions = transitions;
+ pendingRecoverableErrors = recoverableErrors;
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? ((root.callbackNode = null),
+ (root.callbackPriority = 0),
+ scheduleCallback(NormalPriority$1, function () {
+ flushPassiveEffects(!0);
+ return null;
+ }))
+ : ((root.callbackNode = null), (root.callbackPriority = 0));
+ lanes = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || lanes) {
+ lanes = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ recoverableErrors = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ transitions = executionContext;
+ executionContext |= 4;
+ try {
+ commitBeforeMutationEffects(root, finishedWork);
+ } finally {
+ (executionContext = transitions),
+ (currentUpdatePriority = recoverableErrors),
+ (ReactSharedInternals.T = lanes);
+ }
+ }
+ pendingEffectsStatus = 1;
+ flushMutationEffects();
+ flushLayoutEffects();
+ }
+}
+function flushMutationEffects() {
+ if (1 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
+ rootMutationHasEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ commitMutationEffectsOnFiber(finishedWork, root);
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootMutationHasEffect);
+ }
+ }
+ root.current = finishedWork;
+ pendingEffectsStatus = 2;
+ }
+}
+function flushLayoutEffects() {
+ if (2 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ recoverableErrors = pendingRecoverableErrors,
+ rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
+ if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
+ rootHasLayoutEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootHasLayoutEffect);
+ }
+ }
+ requestPaint();
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? (pendingEffectsStatus = 3)
+ : ((pendingEffectsStatus = 0),
+ (pendingEffectsRoot = null),
+ releaseRootPooledCache(root, root.pendingLanes));
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 === rootHasLayoutEffect &&
+ (legacyErrorBoundariesThatAlreadyFailed = null);
+ lanesToEventPriority(lanes);
+ finishedWork = finishedWork.stateNode;
+ if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
+ try {
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ finishedWork,
+ void 0,
+ 128 === (finishedWork.current.flags & 128)
+ );
+ } catch (err) {}
+ if (null !== recoverableErrors) {
+ finishedWork = ReactSharedInternals.T;
+ rootHasLayoutEffect = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ ReactSharedInternals.T = null;
+ try {
+ var onRecoverableError = root.onRecoverableError;
+ for (
+ previousPriority = 0;
+ previousPriority < recoverableErrors.length;
+ previousPriority++
+ ) {
+ var recoverableError = recoverableErrors[previousPriority];
+ onRecoverableError(recoverableError.value, {
+ componentStack: recoverableError.stack
+ });
+ }
+ } finally {
+ (ReactSharedInternals.T = finishedWork),
+ (currentUpdatePriority = rootHasLayoutEffect);
+ }
+ }
+ 0 !== (pendingEffectsLanes & 3) && 0 !== root.tag && flushPendingEffects();
+ ensureRootIsScheduled(root);
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)
+ ? root === rootWithNestedUpdates
+ ? nestedUpdateCount++
+ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
+ : (nestedUpdateCount = 0);
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ }
}
function releaseRootPooledCache(root, remainingLanes) {
0 === (root.pooledCacheLanes &= remainingLanes) &&
@@ -10672,56 +10720,55 @@ function releaseRootPooledCache(root, remainingLanes) {
null != remainingLanes &&
((root.pooledCache = null), releaseCache(remainingLanes)));
}
+function flushPendingEffects(wasDelayedCommit) {
+ flushMutationEffects();
+ flushLayoutEffects();
+ return flushPassiveEffects(wasDelayedCommit);
+}
function flushPassiveEffects() {
- if (null !== rootWithPendingPassiveEffects) {
- var root = rootWithPendingPassiveEffects,
- remainingLanes = pendingPassiveEffectsRemainingLanes;
- pendingPassiveEffectsRemainingLanes = 0;
- var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
- prevTransition = ReactSharedInternals.T,
- previousPriority = currentUpdatePriority;
- try {
- currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
- ReactSharedInternals.T = null;
- if (null === rootWithPendingPassiveEffects)
- var JSCompiler_inline_result = !1;
- else {
- renderPriority = pendingPassiveTransitions;
- pendingPassiveTransitions = null;
- var root$jscomp$0 = rootWithPendingPassiveEffects,
- lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsLanes = 0;
- if (0 !== (executionContext & 6))
- throw Error("Cannot flush passive effects while already rendering.");
- var prevExecutionContext = executionContext;
- executionContext |= 4;
- commitPassiveUnmountOnFiber(root$jscomp$0.current);
- commitPassiveMountOnFiber(
- root$jscomp$0,
- root$jscomp$0.current,
- lanes,
- renderPriority
- );
- executionContext = prevExecutionContext;
- flushSyncWorkAcrossRoots_impl(0, !1);
- if (
- injectedHook &&
- "function" === typeof injectedHook.onPostCommitFiberRoot
- )
- try {
- injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
- } catch (err) {}
- JSCompiler_inline_result = !0;
- }
- return JSCompiler_inline_result;
- } finally {
- (currentUpdatePriority = previousPriority),
- (ReactSharedInternals.T = prevTransition),
- releaseRootPooledCache(root, remainingLanes);
- }
+ if (3 !== pendingEffectsStatus) return !1;
+ var root = pendingEffectsRoot,
+ remainingLanes = pendingEffectsRemainingLanes;
+ pendingEffectsRemainingLanes = 0;
+ var renderPriority = lanesToEventPriority(pendingEffectsLanes),
+ prevTransition = ReactSharedInternals.T,
+ previousPriority = currentUpdatePriority;
+ try {
+ currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
+ ReactSharedInternals.T = null;
+ renderPriority = pendingPassiveTransitions;
+ pendingPassiveTransitions = null;
+ var root$jscomp$0 = pendingEffectsRoot,
+ lanes = pendingEffectsLanes;
+ pendingEffectsStatus = 0;
+ pendingEffectsRoot = null;
+ pendingEffectsLanes = 0;
+ if (0 !== (executionContext & 6))
+ throw Error("Cannot flush passive effects while already rendering.");
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ commitPassiveUnmountOnFiber(root$jscomp$0.current);
+ commitPassiveMountOnFiber(
+ root$jscomp$0,
+ root$jscomp$0.current,
+ lanes,
+ renderPriority
+ );
+ executionContext = prevExecutionContext;
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
+ } catch (err) {}
+ return !0;
+ } finally {
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = prevTransition),
+ releaseRootPooledCache(root, remainingLanes);
}
- return !1;
}
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
@@ -10922,7 +10969,7 @@ function createWorkInProgress(current, pendingProps) {
(workInProgress.flags = 0),
(workInProgress.subtreeFlags = 0),
(workInProgress.deletions = null));
- workInProgress.flags = current.flags & 31457280;
+ workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -10941,7 +10988,7 @@ function createWorkInProgress(current, pendingProps) {
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
- workInProgress.flags &= 31457282;
+ workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
@@ -11128,11 +11175,7 @@ function FiberRootNode(
) {
this.tag = tag;
this.containerInfo = containerInfo;
- this.finishedWork =
- this.pingCache =
- this.current =
- this.pendingChildren =
- null;
+ this.pingCache = this.current = this.pendingChildren = null;
this.timeoutHandle = -1;
this.callbackNode =
this.next =
@@ -11145,7 +11188,6 @@ function FiberRootNode(
this.entangledLanes =
this.shellSuspendCounter =
this.errorRecoveryDisabledLanes =
- this.finishedLanes =
this.expiredLanes =
this.warmLanes =
this.pingedLanes =
@@ -11249,11 +11291,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
-if ("19.1.0-native-fb-a9bbe346-20241219" !== isomorphicReactPackageVersion)
+if ("19.1.0-native-fb-a160102f-20250107" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
- "\n - react-native-renderer: 19.1.0-native-fb-a9bbe346-20241219\nLearn more: https://react.dev/warnings/version-mismatch")
+ "\n - react-native-renderer: 19.1.0-native-fb-a160102f-20250107\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -11300,26 +11342,26 @@ batchedUpdatesImpl = function (fn, a) {
}
};
var roots = new Map(),
- internals$jscomp$inline_1281 = {
+ internals$jscomp$inline_1296 = {
bundleType: 0,
- version: "19.1.0-native-fb-a9bbe346-20241219",
+ version: "19.1.0-native-fb-a160102f-20250107",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.1.0-native-fb-a9bbe346-20241219"
+ reconcilerVersion: "19.1.0-native-fb-a160102f-20250107"
};
null !== extraDevToolsConfig &&
- (internals$jscomp$inline_1281.rendererConfig = extraDevToolsConfig);
+ (internals$jscomp$inline_1296.rendererConfig = extraDevToolsConfig);
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
- var hook$jscomp$inline_1621 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+ var hook$jscomp$inline_1629 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
- !hook$jscomp$inline_1621.isDisabled &&
- hook$jscomp$inline_1621.supportsFiber
+ !hook$jscomp$inline_1629.isDisabled &&
+ hook$jscomp$inline_1629.supportsFiber
)
try {
- (rendererID = hook$jscomp$inline_1621.inject(
- internals$jscomp$inline_1281
+ (rendererID = hook$jscomp$inline_1629.inject(
+ internals$jscomp$inline_1296
)),
- (injectedHook = hook$jscomp$inline_1621);
+ (injectedHook = hook$jscomp$inline_1629);
} catch (err) {}
}
exports.createPortal = function (children, containerTag) {
diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js
index 0b58bd44e7874..fea711608a81b 100644
--- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js
+++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<>
+ * @generated SignedSource<>
*/
"use strict";
@@ -1229,7 +1229,7 @@ eventPluginOrder = Array.prototype.slice.call([
"ReactNativeBridgeEventPlugin"
]);
recomputePluginOrdering();
-var injectedNamesToPlugins$jscomp$inline_303 = {
+var injectedNamesToPlugins$jscomp$inline_305 = {
ResponderEventPlugin: ResponderEventPlugin,
ReactNativeBridgeEventPlugin: {
eventTypes: {},
@@ -1275,32 +1275,32 @@ var injectedNamesToPlugins$jscomp$inline_303 = {
}
}
},
- isOrderingDirty$jscomp$inline_304 = !1,
- pluginName$jscomp$inline_305;
-for (pluginName$jscomp$inline_305 in injectedNamesToPlugins$jscomp$inline_303)
+ isOrderingDirty$jscomp$inline_306 = !1,
+ pluginName$jscomp$inline_307;
+for (pluginName$jscomp$inline_307 in injectedNamesToPlugins$jscomp$inline_305)
if (
- injectedNamesToPlugins$jscomp$inline_303.hasOwnProperty(
- pluginName$jscomp$inline_305
+ injectedNamesToPlugins$jscomp$inline_305.hasOwnProperty(
+ pluginName$jscomp$inline_307
)
) {
- var pluginModule$jscomp$inline_306 =
- injectedNamesToPlugins$jscomp$inline_303[pluginName$jscomp$inline_305];
+ var pluginModule$jscomp$inline_308 =
+ injectedNamesToPlugins$jscomp$inline_305[pluginName$jscomp$inline_307];
if (
- !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_305) ||
- namesToPlugins[pluginName$jscomp$inline_305] !==
- pluginModule$jscomp$inline_306
+ !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_307) ||
+ namesToPlugins[pluginName$jscomp$inline_307] !==
+ pluginModule$jscomp$inline_308
) {
- if (namesToPlugins[pluginName$jscomp$inline_305])
+ if (namesToPlugins[pluginName$jscomp$inline_307])
throw Error(
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
- (pluginName$jscomp$inline_305 + "`.")
+ (pluginName$jscomp$inline_307 + "`.")
);
- namesToPlugins[pluginName$jscomp$inline_305] =
- pluginModule$jscomp$inline_306;
- isOrderingDirty$jscomp$inline_304 = !0;
+ namesToPlugins[pluginName$jscomp$inline_307] =
+ pluginModule$jscomp$inline_308;
+ isOrderingDirty$jscomp$inline_306 = !0;
}
}
-isOrderingDirty$jscomp$inline_304 && recomputePluginOrdering();
+isOrderingDirty$jscomp$inline_306 && recomputePluginOrdering();
var instanceCache = new Map(),
instanceProps = new Map();
function getInstanceFromTag(tag) {
@@ -1857,34 +1857,6 @@ var ReactNativeFiberHostComponent = (function () {
injectedHook = null,
injectedProfilingHooks = null,
isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;
-function onCommitRoot(root, eventPriority) {
- if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
- try {
- var didError = 128 === (root.current.flags & 128);
- switch (eventPriority) {
- case 2:
- var schedulerPriority = ImmediatePriority;
- break;
- case 8:
- schedulerPriority = UserBlockingPriority;
- break;
- case 32:
- schedulerPriority = NormalPriority$1;
- break;
- case 268435456:
- schedulerPriority = IdlePriority;
- break;
- default:
- schedulerPriority = NormalPriority$1;
- }
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- schedulerPriority,
- didError
- );
- } catch (err) {}
-}
function setIsStrictModeForDevtools(newIsStrictMode) {
"function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
if (injectedHook && "function" === typeof injectedHook.setStrictMode)
@@ -2000,14 +1972,13 @@ function getHighestPriorityLanes(lanes) {
return lanes;
}
}
-function getNextLanes(root, wipLanes) {
+function getNextLanes(root, wipLanes, rootHasPendingCommit) {
var pendingLanes = root.pendingLanes;
if (0 === pendingLanes) return 0;
var nextLanes = 0,
suspendedLanes = root.suspendedLanes,
- pingedLanes = root.pingedLanes,
- warmLanes = root.warmLanes;
- root = 0 !== root.finishedLanes;
+ pingedLanes = root.pingedLanes;
+ root = root.warmLanes;
var nonIdlePendingLanes = pendingLanes & 134217727;
0 !== nonIdlePendingLanes
? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
@@ -2017,29 +1988,29 @@ function getNextLanes(root, wipLanes) {
0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = nonIdlePendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes)))))
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))))
: ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
0 !== nonIdlePendingLanes
? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
: 0 !== pingedLanes
? (nextLanes = getHighestPriorityLanes(pingedLanes))
: enableSiblingPrerendering &&
- !root &&
- ((warmLanes = pendingLanes & ~warmLanes),
- 0 !== warmLanes &&
- (nextLanes = getHighestPriorityLanes(warmLanes))));
+ !rootHasPendingCommit &&
+ ((rootHasPendingCommit = pendingLanes & ~root),
+ 0 !== rootHasPendingCommit &&
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
return 0 === nextLanes
? 0
: 0 !== wipLanes &&
wipLanes !== nextLanes &&
0 === (wipLanes & suspendedLanes) &&
((suspendedLanes = nextLanes & -nextLanes),
- (warmLanes = wipLanes & -wipLanes),
- suspendedLanes >= warmLanes ||
- (32 === suspendedLanes && 0 !== (warmLanes & 4194176)))
+ (rootHasPendingCommit = wipLanes & -wipLanes),
+ suspendedLanes >= rootHasPendingCommit ||
+ (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176)))
? wipLanes
: nextLanes;
}
@@ -2875,7 +2846,7 @@ function ensureRootIsScheduled(root) {
mightHavePendingSyncWork = !0;
didScheduleMicrotask ||
((didScheduleMicrotask = !0),
- scheduleCallback$3(ImmediatePriority, processRootScheduleInMicrotask));
+ scheduleCallback$3(ImmediatePriority, processRootScheduleInImmediateTask));
}
function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
if (!isFlushingWork && mightHavePendingSyncWork) {
@@ -2908,7 +2879,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
(JSCompiler_inline_result = workInProgressRootRenderLanes),
(JSCompiler_inline_result = getNextLanes(
root,
- root === workInProgressRoot ? JSCompiler_inline_result : 0
+ root === workInProgressRoot ? JSCompiler_inline_result : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
)),
0 === (JSCompiler_inline_result & 3) ||
checkIfRootIsPrerendering(root, JSCompiler_inline_result) ||
@@ -2920,7 +2892,7 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
isFlushingWork = !1;
}
}
-function processRootScheduleInMicrotask() {
+function processRootScheduleInImmediateTask() {
mightHavePendingSyncWork = didScheduleMicrotask = !1;
0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);
for (
@@ -2962,7 +2934,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
suspendedLanes = workInProgressRootRenderLanes;
suspendedLanes = getNextLanes(
root,
- root === currentTime ? suspendedLanes : 0
+ root === currentTime ? suspendedLanes : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
pingedLanes = root.callbackNode;
if (
@@ -3014,13 +2987,16 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) {
}
function performWorkOnRootViaSchedulerTask(root, didTimeout) {
nestedUpdateScheduled = currentUpdateIsNested = !1;
+ if (0 !== pendingEffectsStatus && 3 !== pendingEffectsStatus)
+ return (root.callbackNode = null), (root.callbackPriority = 0), null;
var originalCallbackNode = root.callbackNode;
- if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
+ if (flushPendingEffects(!0) && root.callbackNode !== originalCallbackNode)
return null;
var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
root,
- root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0
+ root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
+ null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
);
if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout);
@@ -3030,7 +3006,7 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) {
: null;
}
function performSyncWorkOnRoot(root, lanes) {
- if (flushPassiveEffects()) return null;
+ if (flushPendingEffects()) return null;
currentUpdateIsNested = nestedUpdateScheduled;
nestedUpdateScheduled = !1;
performWorkOnRoot(root, lanes, !0);
@@ -6408,14 +6384,14 @@ function markRef(current, workInProgress) {
if (null === ref)
null !== current &&
null !== current.ref &&
- (workInProgress.flags |= 2097664);
+ (workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
);
if (null === current || current.ref !== ref)
- workInProgress.flags |= 2097664;
+ workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
@@ -6983,7 +6959,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
(nextProps.treeBaseDuration = didSuspend.treeBaseDuration)),
(workInProgress.deletions = null))
: ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)),
- (nextProps.subtreeFlags = didSuspend.subtreeFlags & 31457280));
+ (nextProps.subtreeFlags = didSuspend.subtreeFlags & 29360128));
null !== currentFallbackChildFragment
? (nextPrimaryChildren = createWorkInProgress(
currentFallbackChildFragment,
@@ -7785,8 +7761,8 @@ function bubbleProperties(completedWork) {
)
(newChildLanes |= child$100.lanes | child$100.childLanes),
- (subtreeFlags |= child$100.subtreeFlags & 31457280),
- (subtreeFlags |= child$100.flags & 31457280),
+ (subtreeFlags |= child$100.subtreeFlags & 29360128),
+ (subtreeFlags |= child$100.flags & 29360128),
(treeBaseDuration$99 += child$100.treeBaseDuration),
(child$100 = child$100.sibling);
completedWork.treeBaseDuration = treeBaseDuration$99;
@@ -7798,8 +7774,8 @@ function bubbleProperties(completedWork) {
)
(newChildLanes |=
treeBaseDuration$99.lanes | treeBaseDuration$99.childLanes),
- (subtreeFlags |= treeBaseDuration$99.subtreeFlags & 31457280),
- (subtreeFlags |= treeBaseDuration$99.flags & 31457280),
+ (subtreeFlags |= treeBaseDuration$99.subtreeFlags & 29360128),
+ (subtreeFlags |= treeBaseDuration$99.flags & 29360128),
(treeBaseDuration$99.return = completedWork),
(treeBaseDuration$99 = treeBaseDuration$99.sibling);
else if (0 !== (completedWork.mode & 2)) {
@@ -8758,14 +8734,13 @@ var offscreenSubtreeIsHidden = !1,
PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set,
nextEffect = null,
inProgressLanes = null,
- inProgressRoot = null,
- shouldFireAfterActiveInstanceBlur = !1;
+ inProgressRoot = null;
function commitBeforeMutationEffects(root, firstChild) {
for (nextEffect = firstChild; null !== nextEffect; )
if (
((root = nextEffect),
(firstChild = root.child),
- 0 !== (root.subtreeFlags & 1028) && null !== firstChild)
+ 0 !== (root.subtreeFlags & 1024) && null !== firstChild)
)
(firstChild.return = root), (nextEffect = firstChild);
else
@@ -8829,9 +8804,6 @@ function commitBeforeMutationEffects(root, firstChild) {
}
nextEffect = root.return;
}
- resolvedPrevProps = shouldFireAfterActiveInstanceBlur;
- shouldFireAfterActiveInstanceBlur = !1;
- return resolvedPrevProps;
}
function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
var flags = finishedWork.flags;
@@ -9215,12 +9187,6 @@ function attachSuspenseRetryListeners(finishedWork, wakeables) {
}
});
}
-function commitMutationEffects(root, finishedWork, committedLanes) {
- inProgressLanes = committedLanes;
- inProgressRoot = root;
- commitMutationEffectsOnFiber(finishedWork, root);
- inProgressRoot = inProgressLanes = null;
-}
function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
var deletions = parentFiber.deletions;
if (null !== deletions)
@@ -9588,12 +9554,6 @@ function commitReconciliationEffects(finishedWork) {
}
flags & 4096 && (finishedWork.flags &= -4097);
}
-function commitLayoutEffects(finishedWork, root, committedLanes) {
- inProgressLanes = committedLanes;
- inProgressRoot = root;
- commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);
- inProgressRoot = inProgressLanes = null;
-}
function recursivelyTraverseLayoutEffects(root, parentFiber) {
if (parentFiber.subtreeFlags & 8772)
for (parentFiber = parentFiber.child; null !== parentFiber; )
@@ -9813,6 +9773,14 @@ function commitPassiveMountOnFiber(
);
flags & 2048 && commitHookPassiveMountEffects(finishedWork, 9);
break;
+ case 1:
+ recursivelyTraversePassiveMountEffects(
+ finishedRoot,
+ finishedWork,
+ committedLanes,
+ committedTransitions
+ );
+ break;
case 3:
var prevEffectDuration = pushNestedEffectDurations();
recursivelyTraversePassiveMountEffects(
@@ -10281,10 +10249,13 @@ var DefaultAsyncDispatcher = {
workInProgressRootRenderTargetTime = Infinity,
workInProgressTransitions = null,
legacyErrorBoundariesThatAlreadyFailed = null,
- rootWithPendingPassiveEffects = null,
- pendingPassiveEffectsLanes = 0,
- pendingPassiveEffectsRemainingLanes = 0,
+ pendingEffectsStatus = 0,
+ pendingEffectsRoot = null,
+ pendingFinishedWork = null,
+ pendingEffectsLanes = 0,
+ pendingEffectsRemainingLanes = 0,
pendingPassiveTransitions = null,
+ pendingRecoverableErrors = null,
nestedUpdateCount = 0,
rootWithNestedUpdates = null;
function requestUpdateLane(fiber) {
@@ -10450,8 +10421,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
default:
throw Error("Unknown root exit status.");
}
- shouldTimeSlice.finishedWork = forceSync;
- shouldTimeSlice.finishedLanes = lanes;
if (
(lanes & 62914560) === lanes &&
(alwaysThrottleRetries || 3 === renderWasConcurrent) &&
@@ -10464,7 +10433,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
- if (0 !== getNextLanes(shouldTimeSlice, 0)) break a;
+ if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;
shouldTimeSlice.timeoutHandle = scheduleTimeout(
commitRootWhenReady.bind(
null,
@@ -10496,12 +10465,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
lanes,
workInProgressDeferredLane,
workInProgressRootInterleavedUpdatedLanes,
- workInProgressSuspendedRetryLanes,
- workInProgressRootDidSkipSuspendedSiblings,
- renderWasConcurrent,
- 0,
- -0,
- 0
+ workInProgressSuspendedRetryLanes
);
}
}
@@ -10518,38 +10482,23 @@ function commitRootWhenReady(
lanes,
spawnedLane,
updatedLanes,
- suspendedRetryLanes,
- didSkipSuspendedSiblings,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
+ suspendedRetryLanes
) {
- lanes = finishedWork.subtreeFlags;
- (lanes & 8192 || 16785408 === (lanes & 16785408)) &&
+ root.timeoutHandle = -1;
+ var subtreeFlags = finishedWork.subtreeFlags;
+ (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) &&
accumulateSuspenseyCommitOnFiber(finishedWork);
- finishedWork = ReactSharedInternals.T;
- lanes = currentUpdatePriority;
- try {
- (currentUpdatePriority = 2),
- (ReactSharedInternals.T = null),
- commitRootImpl(
- root,
- recoverableErrors,
- transitions,
- didIncludeRenderPhaseUpdate,
- lanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes,
- exitStatus,
- suspendedCommitReason,
- completedRenderStartTime,
- completedRenderEndTime
- );
- } finally {
- (ReactSharedInternals.T = finishedWork), (currentUpdatePriority = lanes);
- }
+ commitRoot(
+ root,
+ finishedWork,
+ lanes,
+ recoverableErrors,
+ transitions,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
+ );
}
function isRenderConsistentWithExternalStores(finishedWork) {
for (var node = finishedWork; ; ) {
@@ -10626,8 +10575,6 @@ function resetWorkInProgressStack() {
}
}
function prepareFreshStack(root, lanes) {
- root.finishedWork = null;
- root.finishedLanes = 0;
var timeoutHandle = root.timeoutHandle;
-1 !== timeoutHandle &&
((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
@@ -10958,7 +10905,7 @@ function renderRootConcurrent(root, lanes) {
default:
throw Error("Unexpected SuspendedReason. This is a bug in React.");
}
- workLoopConcurrent();
+ workLoopConcurrentByScheduler();
break;
} catch (thrownValue$155) {
handleThrow(root, thrownValue$155);
@@ -10981,7 +10928,7 @@ function renderRootConcurrent(root, lanes) {
finishQueueingConcurrentUpdates();
return workInProgressRootExitStatus;
}
-function workLoopConcurrent() {
+function workLoopConcurrentByScheduler() {
for (; null !== workInProgress && !shouldYield(); )
performUnitOfWork(workInProgress);
}
@@ -11166,120 +11113,217 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) {
workInProgressRootExitStatus = 6;
workInProgress = null;
}
-function commitRootImpl(
+function commitRoot(
root,
+ finishedWork,
+ lanes,
recoverableErrors,
transitions,
didIncludeRenderPhaseUpdate,
- renderPriorityLevel,
spawnedLane,
updatedLanes,
suspendedRetryLanes
) {
- do flushPassiveEffects();
- while (null !== rootWithPendingPassiveEffects);
+ root.cancelPendingCommit = null;
+ do flushPendingEffects();
+ while (0 !== pendingEffectsStatus);
if (0 !== (executionContext & 6))
throw Error("Should not already be working.");
- var finishedWork = root.finishedWork;
- didIncludeRenderPhaseUpdate = root.finishedLanes;
null !== injectedProfilingHooks &&
"function" === typeof injectedProfilingHooks.markCommitStarted &&
- injectedProfilingHooks.markCommitStarted(didIncludeRenderPhaseUpdate);
- if (null === finishedWork) return markCommitStopped(), null;
- root.finishedWork = null;
- root.finishedLanes = 0;
- if (finishedWork === root.current)
- throw Error(
- "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ injectedProfilingHooks.markCommitStarted(lanes);
+ if (null === finishedWork) markCommitStopped();
+ else {
+ if (finishedWork === root.current)
+ throw Error(
+ "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
+ );
+ didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
+ didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
+ markRootFinished(
+ root,
+ lanes,
+ didIncludeRenderPhaseUpdate,
+ spawnedLane,
+ updatedLanes,
+ suspendedRetryLanes
);
- var remainingLanes = finishedWork.lanes | finishedWork.childLanes;
- remainingLanes |= concurrentlyUpdatedLanes;
- markRootFinished(
- root,
- didIncludeRenderPhaseUpdate,
- remainingLanes,
- spawnedLane,
- updatedLanes,
- suspendedRetryLanes
- );
- root === workInProgressRoot &&
- ((workInProgress = workInProgressRoot = null),
- (workInProgressRootRenderLanes = 0));
- spawnedLane = !1;
- 0 !== (finishedWork.subtreeFlags & 10256) ||
- 0 !== (finishedWork.flags & 10256)
- ? ((spawnedLane = !0),
- (pendingPassiveEffectsRemainingLanes = remainingLanes),
- (pendingPassiveTransitions = transitions),
- (root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null),
- scheduleCallback(NormalPriority$1, function () {
- flushPassiveEffects(!0);
- return null;
- }))
- : ((root.callbackNode = null),
- (root.callbackPriority = 0),
- (root.cancelPendingCommit = null));
- commitStartTime = now();
- transitions = 0 !== (finishedWork.flags & 15990);
- 0 !== (finishedWork.subtreeFlags & 15990) || transitions
- ? ((transitions = ReactSharedInternals.T),
- (ReactSharedInternals.T = null),
- (updatedLanes = currentUpdatePriority),
- (currentUpdatePriority = 2),
- (suspendedRetryLanes = executionContext),
- (executionContext |= 4),
- commitBeforeMutationEffects(root, finishedWork),
- commitMutationEffects(root, finishedWork, didIncludeRenderPhaseUpdate),
- (root.current = finishedWork),
- null !== injectedProfilingHooks &&
- "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted &&
- injectedProfilingHooks.markLayoutEffectsStarted(
- didIncludeRenderPhaseUpdate
- ),
- commitLayoutEffects(finishedWork, root, didIncludeRenderPhaseUpdate),
- null !== injectedProfilingHooks &&
- "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped &&
- injectedProfilingHooks.markLayoutEffectsStopped(),
- requestPaint(),
- (executionContext = suspendedRetryLanes),
- (currentUpdatePriority = updatedLanes),
- (ReactSharedInternals.T = transitions))
- : (root.current = finishedWork);
- spawnedLane
- ? ((spawnedLane = !1),
- (rootWithPendingPassiveEffects = root),
- (pendingPassiveEffectsLanes = didIncludeRenderPhaseUpdate))
- : releaseRootPooledCache(root, remainingLanes);
- remainingLanes = root.pendingLanes;
- 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
- onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
- isDevToolsPresent && root.memoizedUpdaters.clear();
- if (null !== recoverableErrors)
- for (
- renderPriorityLevel = root.onRecoverableError, finishedWork = 0;
- finishedWork < recoverableErrors.length;
- finishedWork++
- )
- (remainingLanes = recoverableErrors[finishedWork]),
- renderPriorityLevel(remainingLanes.value, {
- componentStack: remainingLanes.stack
- });
- 0 !== (pendingPassiveEffectsLanes & 3) &&
- 0 !== root.tag &&
- flushPassiveEffects();
- ensureRootIsScheduled(root);
- remainingLanes = root.pendingLanes;
- 0 !== (didIncludeRenderPhaseUpdate & 4194218) && 0 !== (remainingLanes & 42)
- ? ((nestedUpdateScheduled = !0),
- root === rootWithNestedUpdates
- ? nestedUpdateCount++
- : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
- : (nestedUpdateCount = 0);
- flushSyncWorkAcrossRoots_impl(0, !1);
- markCommitStopped();
- return null;
+ root === workInProgressRoot &&
+ ((workInProgress = workInProgressRoot = null),
+ (workInProgressRootRenderLanes = 0));
+ pendingFinishedWork = finishedWork;
+ pendingEffectsRoot = root;
+ pendingEffectsLanes = lanes;
+ pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
+ pendingPassiveTransitions = transitions;
+ pendingRecoverableErrors = recoverableErrors;
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? ((root.callbackNode = null),
+ (root.callbackPriority = 0),
+ scheduleCallback(NormalPriority$1, function () {
+ flushPassiveEffects(!0);
+ return null;
+ }))
+ : ((root.callbackNode = null), (root.callbackPriority = 0));
+ commitStartTime = now();
+ lanes = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || lanes) {
+ lanes = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ recoverableErrors = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ transitions = executionContext;
+ executionContext |= 4;
+ try {
+ commitBeforeMutationEffects(root, finishedWork);
+ } finally {
+ (executionContext = transitions),
+ (currentUpdatePriority = recoverableErrors),
+ (ReactSharedInternals.T = lanes);
+ }
+ }
+ pendingEffectsStatus = 1;
+ flushMutationEffects();
+ flushLayoutEffects();
+ }
+}
+function flushMutationEffects() {
+ if (1 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
+ if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
+ rootMutationHasEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ (inProgressLanes = lanes),
+ (inProgressRoot = root),
+ commitMutationEffectsOnFiber(finishedWork, root),
+ (inProgressRoot = inProgressLanes = null);
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootMutationHasEffect);
+ }
+ }
+ root.current = finishedWork;
+ pendingEffectsStatus = 2;
+ }
+}
+function flushLayoutEffects() {
+ if (2 === pendingEffectsStatus) {
+ pendingEffectsStatus = 0;
+ var root = pendingEffectsRoot,
+ finishedWork = pendingFinishedWork,
+ lanes = pendingEffectsLanes,
+ recoverableErrors = pendingRecoverableErrors,
+ rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
+ if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
+ rootHasLayoutEffect = ReactSharedInternals.T;
+ ReactSharedInternals.T = null;
+ var previousPriority = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ try {
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStarted &&
+ injectedProfilingHooks.markLayoutEffectsStarted(lanes),
+ (inProgressLanes = lanes),
+ (inProgressRoot = root),
+ commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork),
+ (inProgressRoot = inProgressLanes = null),
+ null !== injectedProfilingHooks &&
+ "function" ===
+ typeof injectedProfilingHooks.markLayoutEffectsStopped &&
+ injectedProfilingHooks.markLayoutEffectsStopped();
+ } finally {
+ (executionContext = prevExecutionContext),
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = rootHasLayoutEffect);
+ }
+ }
+ requestPaint();
+ 0 !== (finishedWork.subtreeFlags & 10256) ||
+ 0 !== (finishedWork.flags & 10256)
+ ? (pendingEffectsStatus = 3)
+ : ((pendingEffectsStatus = 0),
+ (pendingEffectsRoot = null),
+ releaseRootPooledCache(root, root.pendingLanes));
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 === rootHasLayoutEffect &&
+ (legacyErrorBoundariesThatAlreadyFailed = null);
+ rootHasLayoutEffect = lanesToEventPriority(lanes);
+ finishedWork = finishedWork.stateNode;
+ if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
+ try {
+ var didError = 128 === (finishedWork.current.flags & 128);
+ switch (rootHasLayoutEffect) {
+ case 2:
+ var schedulerPriority = ImmediatePriority;
+ break;
+ case 8:
+ schedulerPriority = UserBlockingPriority;
+ break;
+ case 32:
+ schedulerPriority = NormalPriority$1;
+ break;
+ case 268435456:
+ schedulerPriority = IdlePriority;
+ break;
+ default:
+ schedulerPriority = NormalPriority$1;
+ }
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ finishedWork,
+ schedulerPriority,
+ didError
+ );
+ } catch (err) {}
+ isDevToolsPresent && root.memoizedUpdaters.clear();
+ if (null !== recoverableErrors) {
+ didError = ReactSharedInternals.T;
+ schedulerPriority = currentUpdatePriority;
+ currentUpdatePriority = 2;
+ ReactSharedInternals.T = null;
+ try {
+ var onRecoverableError = root.onRecoverableError;
+ for (
+ finishedWork = 0;
+ finishedWork < recoverableErrors.length;
+ finishedWork++
+ ) {
+ var recoverableError = recoverableErrors[finishedWork];
+ onRecoverableError(recoverableError.value, {
+ componentStack: recoverableError.stack
+ });
+ }
+ } finally {
+ (ReactSharedInternals.T = didError),
+ (currentUpdatePriority = schedulerPriority);
+ }
+ }
+ 0 !== (pendingEffectsLanes & 3) && 0 !== root.tag && flushPendingEffects();
+ ensureRootIsScheduled(root);
+ rootHasLayoutEffect = root.pendingLanes;
+ 0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)
+ ? ((nestedUpdateScheduled = !0),
+ root === rootWithNestedUpdates
+ ? nestedUpdateCount++
+ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
+ : (nestedUpdateCount = 0);
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ markCommitStopped();
+ }
}
function releaseRootPooledCache(root, remainingLanes) {
0 === (root.pooledCacheLanes &= remainingLanes) &&
@@ -11287,67 +11331,64 @@ function releaseRootPooledCache(root, remainingLanes) {
null != remainingLanes &&
((root.pooledCache = null), releaseCache(remainingLanes)));
}
+function flushPendingEffects(wasDelayedCommit) {
+ flushMutationEffects();
+ flushLayoutEffects();
+ return flushPassiveEffects(wasDelayedCommit);
+}
function flushPassiveEffects() {
- if (null !== rootWithPendingPassiveEffects) {
- var root = rootWithPendingPassiveEffects,
- remainingLanes = pendingPassiveEffectsRemainingLanes;
- pendingPassiveEffectsRemainingLanes = 0;
- var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
- prevTransition = ReactSharedInternals.T,
- previousPriority = currentUpdatePriority;
- try {
- currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
- ReactSharedInternals.T = null;
- if (null === rootWithPendingPassiveEffects)
- var JSCompiler_inline_result = !1;
- else {
- renderPriority = pendingPassiveTransitions;
- pendingPassiveTransitions = null;
- var root$jscomp$0 = rootWithPendingPassiveEffects,
- lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsLanes = 0;
- if (0 !== (executionContext & 6))
- throw Error("Cannot flush passive effects while already rendering.");
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStarted &&
- injectedProfilingHooks.markPassiveEffectsStarted(lanes);
- var prevExecutionContext = executionContext;
- executionContext |= 4;
- commitPassiveUnmountOnFiber(root$jscomp$0.current);
- commitPassiveMountOnFiber(
- root$jscomp$0,
- root$jscomp$0.current,
- lanes,
- renderPriority
- );
- null !== injectedProfilingHooks &&
- "function" ===
- typeof injectedProfilingHooks.markPassiveEffectsStopped &&
- injectedProfilingHooks.markPassiveEffectsStopped();
- executionContext = prevExecutionContext;
- flushSyncWorkAcrossRoots_impl(0, !1);
- if (
- injectedHook &&
- "function" === typeof injectedHook.onPostCommitFiberRoot
- )
- try {
- injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
- } catch (err) {}
- var stateNode = root$jscomp$0.current.stateNode;
- stateNode.effectDuration = 0;
- stateNode.passiveEffectDuration = 0;
- JSCompiler_inline_result = !0;
- }
- return JSCompiler_inline_result;
- } finally {
- (currentUpdatePriority = previousPriority),
- (ReactSharedInternals.T = prevTransition),
- releaseRootPooledCache(root, remainingLanes);
- }
+ if (3 !== pendingEffectsStatus) return !1;
+ var root = pendingEffectsRoot,
+ remainingLanes = pendingEffectsRemainingLanes;
+ pendingEffectsRemainingLanes = 0;
+ var renderPriority = lanesToEventPriority(pendingEffectsLanes),
+ prevTransition = ReactSharedInternals.T,
+ previousPriority = currentUpdatePriority;
+ try {
+ currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;
+ ReactSharedInternals.T = null;
+ renderPriority = pendingPassiveTransitions;
+ pendingPassiveTransitions = null;
+ var root$jscomp$0 = pendingEffectsRoot,
+ lanes = pendingEffectsLanes;
+ pendingEffectsStatus = 0;
+ pendingEffectsRoot = null;
+ pendingEffectsLanes = 0;
+ if (0 !== (executionContext & 6))
+ throw Error("Cannot flush passive effects while already rendering.");
+ null !== injectedProfilingHooks &&
+ "function" === typeof injectedProfilingHooks.markPassiveEffectsStarted &&
+ injectedProfilingHooks.markPassiveEffectsStarted(lanes);
+ var prevExecutionContext = executionContext;
+ executionContext |= 4;
+ commitPassiveUnmountOnFiber(root$jscomp$0.current);
+ commitPassiveMountOnFiber(
+ root$jscomp$0,
+ root$jscomp$0.current,
+ lanes,
+ renderPriority
+ );
+ null !== injectedProfilingHooks &&
+ "function" === typeof injectedProfilingHooks.markPassiveEffectsStopped &&
+ injectedProfilingHooks.markPassiveEffectsStopped();
+ executionContext = prevExecutionContext;
+ flushSyncWorkAcrossRoots_impl(0, !1);
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
+ } catch (err) {}
+ var stateNode = root$jscomp$0.current.stateNode;
+ stateNode.effectDuration = 0;
+ stateNode.passiveEffectDuration = 0;
+ return !0;
+ } finally {
+ (currentUpdatePriority = previousPriority),
+ (ReactSharedInternals.T = prevTransition),
+ releaseRootPooledCache(root, remainingLanes);
}
- return !1;
}
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
@@ -11564,7 +11605,7 @@ function createWorkInProgress(current, pendingProps) {
(workInProgress.deletions = null),
(workInProgress.actualDuration = -0),
(workInProgress.actualStartTime = -1.1));
- workInProgress.flags = current.flags & 31457280;
+ workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -11585,7 +11626,7 @@ function createWorkInProgress(current, pendingProps) {
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
- workInProgress.flags &= 31457282;
+ workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
@@ -11777,11 +11818,7 @@ function FiberRootNode(
) {
this.tag = tag;
this.containerInfo = containerInfo;
- this.finishedWork =
- this.pingCache =
- this.current =
- this.pendingChildren =
- null;
+ this.pingCache = this.current = this.pendingChildren = null;
this.timeoutHandle = -1;
this.callbackNode =
this.next =
@@ -11794,7 +11831,6 @@ function FiberRootNode(
this.entangledLanes =
this.shellSuspendCounter =
this.errorRecoveryDisabledLanes =
- this.finishedLanes =
this.expiredLanes =
this.warmLanes =
this.pingedLanes =
@@ -11905,11 +11941,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
-if ("19.1.0-native-fb-a9bbe346-20241219" !== isomorphicReactPackageVersion)
+if ("19.1.0-native-fb-a160102f-20250107" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
- "\n - react-native-renderer: 19.1.0-native-fb-a9bbe346-20241219\nLearn more: https://react.dev/warnings/version-mismatch")
+ "\n - react-native-renderer: 19.1.0-native-fb-a160102f-20250107\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -11956,20 +11992,20 @@ batchedUpdatesImpl = function (fn, a) {
}
};
var roots = new Map(),
- internals$jscomp$inline_1369 = {
+ internals$jscomp$inline_1389 = {
bundleType: 0,
- version: "19.1.0-native-fb-a9bbe346-20241219",
+ version: "19.1.0-native-fb-a160102f-20250107",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
- reconcilerVersion: "19.1.0-native-fb-a9bbe346-20241219"
+ reconcilerVersion: "19.1.0-native-fb-a160102f-20250107"
};
null !== extraDevToolsConfig &&
- (internals$jscomp$inline_1369.rendererConfig = extraDevToolsConfig);
-internals$jscomp$inline_1369.getLaneLabelMap = function () {
+ (internals$jscomp$inline_1389.rendererConfig = extraDevToolsConfig);
+internals$jscomp$inline_1389.getLaneLabelMap = function () {
for (
- var map = new Map(), lane = 1, index$159 = 0;
- 31 > index$159;
- index$159++
+ var map = new Map(), lane = 1, index$160 = 0;
+ 31 > index$160;
+ index$160++
) {
var label = getLabelForLane(lane);
map.set(lane, label);
@@ -11977,20 +12013,20 @@ internals$jscomp$inline_1369.getLaneLabelMap = function () {
}
return map;
};
-internals$jscomp$inline_1369.injectProfilingHooks = function (profilingHooks) {
+internals$jscomp$inline_1389.injectProfilingHooks = function (profilingHooks) {
injectedProfilingHooks = profilingHooks;
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
- var hook$jscomp$inline_1672 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+ var hook$jscomp$inline_1688 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
- !hook$jscomp$inline_1672.isDisabled &&
- hook$jscomp$inline_1672.supportsFiber
+ !hook$jscomp$inline_1688.isDisabled &&
+ hook$jscomp$inline_1688.supportsFiber
)
try {
- (rendererID = hook$jscomp$inline_1672.inject(
- internals$jscomp$inline_1369
+ (rendererID = hook$jscomp$inline_1688.inject(
+ internals$jscomp$inline_1389
)),
- (injectedHook = hook$jscomp$inline_1672);
+ (injectedHook = hook$jscomp$inline_1688);
} catch (err) {}
}
exports.createPortal = function (children, containerTag) {