diff --git a/Libraries/Renderer/REVISION b/Libraries/Renderer/REVISION
index 35a6ff2d75f5a7..7de3a3ff9489a6 100644
--- a/Libraries/Renderer/REVISION
+++ b/Libraries/Renderer/REVISION
@@ -1 +1 @@
-c9aab1c9d00ce407b1c61c385b356d49cd147f60
\ No newline at end of file
+f7cdc893618e9701a8e3403b2b63bfc8233c6771
\ No newline at end of file
diff --git a/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/Libraries/Renderer/implementations/ReactFabric-dev.fb.js
index 177533bae2082b..91b1392c03acac 100644
--- a/Libraries/Renderer/implementations/ReactFabric-dev.fb.js
+++ b/Libraries/Renderer/implementations/ReactFabric-dev.fb.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<<7d94bdf10150fe93a2e9fa8bbf998840>>
+ * @generated SignedSource<<8e2b098b8adc0535d0c66734daceb246>>
*/
'use strict';
@@ -380,6 +380,12 @@ function clearCaughtError() {
}
}
+var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
+
+function isArray(a) {
+ return isArrayImpl(a);
+}
+
var getFiberCurrentPropsFromNode = null;
var getInstanceFromNode = null;
var getNodeFromInstance = null;
@@ -407,13 +413,13 @@ var validateEventDispatches;
validateEventDispatches = function(event) {
var dispatchListeners = event._dispatchListeners;
var dispatchInstances = event._dispatchInstances;
- var listenersIsArr = Array.isArray(dispatchListeners);
+ var listenersIsArr = isArray(dispatchListeners);
var listenersLen = listenersIsArr
? dispatchListeners.length
: dispatchListeners
? 1
: 0;
- var instancesIsArr = Array.isArray(dispatchInstances);
+ var instancesIsArr = isArray(dispatchInstances);
var instancesLen = instancesIsArr
? dispatchInstances.length
: dispatchInstances
@@ -450,7 +456,7 @@ function executeDispatchesInOrder(event) {
validateEventDispatches(event);
}
- if (Array.isArray(dispatchListeners)) {
+ if (isArray(dispatchListeners)) {
for (var i = 0; i < dispatchListeners.length; i++) {
if (event.isPropagationStopped()) {
break;
@@ -481,7 +487,7 @@ function executeDispatchesInOrderStopAtTrueImpl(event) {
validateEventDispatches(event);
}
- if (Array.isArray(dispatchListeners)) {
+ if (isArray(dispatchListeners)) {
for (var i = 0; i < dispatchListeners.length; i++) {
if (event.isPropagationStopped()) {
break;
@@ -527,7 +533,7 @@ function executeDirectDispatch(event) {
var dispatchListener = event._dispatchListeners;
var dispatchInstance = event._dispatchInstances;
- if (!!Array.isArray(dispatchListener)) {
+ if (!!isArray(dispatchListener)) {
throw Error("executeDirectDispatch(...): Invalid `event`.");
}
@@ -1154,11 +1160,11 @@ function accumulate(current, next) {
} // Both are not empty. Warning: Never call x.concat(y) when you are not
// certain that x is an Array (x could be a string with concat method).
- if (Array.isArray(current)) {
+ if (isArray(current)) {
return current.concat(next);
}
- if (Array.isArray(next)) {
+ if (isArray(next)) {
return [current].concat(next);
}
@@ -1190,8 +1196,8 @@ function accumulateInto(current, next) {
} // Both are not empty. Warning: Never call x.concat(y) when you are not
// certain that x is an Array (x could be a string with concat method).
- if (Array.isArray(current)) {
- if (Array.isArray(next)) {
+ if (isArray(current)) {
+ if (isArray(next)) {
current.push.apply(current, next);
return current;
}
@@ -1200,7 +1206,7 @@ function accumulateInto(current, next) {
return current;
}
- if (Array.isArray(next)) {
+ if (isArray(next)) {
// A bit too dangerous to mutate `next`.
return [current].concat(next);
}
@@ -2505,7 +2511,10 @@ function getFiberCurrentPropsFromNode$1(inst) {
var ReactFabricGlobalResponderHandler = {
onChange: function(from, to, blockNativeResponder) {
var fromOrTo = from || to;
- var isFabric = !!fromOrTo.stateNode.canonical._internalInstanceHandle;
+ var fromOrToStateNode = fromOrTo && fromOrTo.stateNode;
+ var isFabric = !!(
+ fromOrToStateNode && fromOrToStateNode.canonical._internalInstanceHandle
+ );
if (isFabric);
else {
@@ -2809,7 +2818,7 @@ var enableLazyElements = false;
var warnAboutStringRefs = false;
var enableNewReconciler = false;
var deferRenderPhaseUpdateToNextBatch = true;
-var enableLazyContextPropagation = false; // Flow magic to verify the exports of this file match the original version.
+var enableLazyContextPropagation = false;
// Don't change these two values. They're used by React Dev Tools.
var NoFlags =
@@ -2878,9 +2887,15 @@ var ForceUpdateForLegacySuspense =
// since we can defer traversing the tree during layout to look for Passive effects,
// and instead rely on the static flag as a signal that there may be cleanup work.
+var RefStatic =
+ /* */
+ 262144;
+var LayoutStatic =
+ /* */
+ 524288;
var PassiveStatic =
/* */
- 262144; // These flags allow us to traverse to fibers that have effects on mount
+ 1048576; // These flags allow us to traverse to fibers that have effects on mount
// don't contain effects, by checking subtreeFlags.
var BeforeMutationMask = // TODO: Remove Update flag from before mutation phase by re-landing Visiblity
@@ -2900,7 +2915,7 @@ var PassiveMask = Passive | ChildDeletion; // Union of tags that don't get reset
// This allows certain concepts to persist without recalculting them,
// e.g. whether a subtree contains passive effects or portals.
-var StaticMask = PassiveStatic;
+var StaticMask = LayoutStatic | PassiveStatic | RefStatic;
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
function getNearestMountedFiber(fiber) {
@@ -3248,7 +3263,7 @@ function restoreDeletedValuesInNestedArray(
node,
validAttributes
) {
- if (Array.isArray(node)) {
+ if (isArray(node)) {
var i = node.length;
while (i-- && removedKeyCount > 0) {
@@ -3373,12 +3388,12 @@ function diffNestedProperty(
return updatePayload;
}
- if (!Array.isArray(prevProp) && !Array.isArray(nextProp)) {
+ if (!isArray(prevProp) && !isArray(nextProp)) {
// Both are leaves, we can diff the leaves.
return diffProperties(updatePayload, prevProp, nextProp, validAttributes);
}
- if (Array.isArray(prevProp) && Array.isArray(nextProp)) {
+ if (isArray(prevProp) && isArray(nextProp)) {
// Both are arrays, we can diff the arrays.
return diffNestedArrayProperty(
updatePayload,
@@ -3388,7 +3403,7 @@ function diffNestedProperty(
);
}
- if (Array.isArray(prevProp)) {
+ if (isArray(prevProp)) {
return diffProperties(
updatePayload, // $FlowFixMe - We know that this is always an object when the input is.
ReactNativePrivateInterface.flattenStyle(prevProp), // $FlowFixMe - We know that this isn't an array because of above flow.
@@ -3415,7 +3430,7 @@ function addNestedProperty(updatePayload, nextProp, validAttributes) {
return updatePayload;
}
- if (!Array.isArray(nextProp)) {
+ if (!isArray(nextProp)) {
// Add each property of the leaf.
return addProperties(updatePayload, nextProp, validAttributes);
}
@@ -3441,7 +3456,7 @@ function clearNestedProperty(updatePayload, prevProp, validAttributes) {
return updatePayload;
}
- if (!Array.isArray(prevProp)) {
+ if (!isArray(prevProp)) {
// Add each property of the leaf.
return clearProperties(updatePayload, prevProp, validAttributes);
}
@@ -3830,6 +3845,179 @@ function dispatchEvent(target, topLevelType, nativeEvent) {
// where it would do it.
}
+// This module only exists as an ESM wrapper around the external CommonJS
+var scheduleCallback = Scheduler.unstable_scheduleCallback;
+var cancelCallback = Scheduler.unstable_cancelCallback;
+var shouldYield = Scheduler.unstable_shouldYield;
+var requestPaint = Scheduler.unstable_requestPaint;
+var now = Scheduler.unstable_now;
+var ImmediatePriority = Scheduler.unstable_ImmediatePriority;
+var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;
+var NormalPriority = Scheduler.unstable_NormalPriority;
+var IdlePriority = Scheduler.unstable_IdlePriority;
+
+{
+ // Provide explicit error message when production+profiling bundle of e.g.
+ // react-dom is used with production (non-profiling) bundle of
+ // scheduler/tracing
+ if (
+ !(
+ tracing.__interactionsRef != null &&
+ tracing.__interactionsRef.current != null
+ )
+ ) {
+ throw Error(
+ "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling"
+ );
+ }
+}
+
+var rendererID = null;
+var injectedHook = null;
+var hasLoggedError = false;
+var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined";
+function injectInternals(internals) {
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined") {
+ // No DevTools
+ return false;
+ }
+
+ var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+
+ if (hook.isDisabled) {
+ // This isn't a real property on the hook, but it can be set to opt out
+ // of DevTools integration and associated warnings and logs.
+ // https://github.com/facebook/react/issues/3877
+ return true;
+ }
+
+ if (!hook.supportsFiber) {
+ {
+ error(
+ "The installed version of React DevTools is too old and will not work " +
+ "with the current version of React. Please update React DevTools. " +
+ "https://reactjs.org/link/react-devtools"
+ );
+ } // DevTools exists, even though it doesn't support Fiber.
+
+ return true;
+ }
+
+ try {
+ rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.
+
+ injectedHook = hook;
+ } catch (err) {
+ // Catch all errors because it is unsafe to throw during initialization.
+ {
+ error("React instrumentation encountered an error: %s.", err);
+ }
+ } // DevTools exists
+
+ return true;
+}
+function onScheduleRoot(root, children) {
+ {
+ if (
+ injectedHook &&
+ typeof injectedHook.onScheduleFiberRoot === "function"
+ ) {
+ try {
+ injectedHook.onScheduleFiberRoot(rendererID, root, children);
+ } catch (err) {
+ if (!hasLoggedError) {
+ hasLoggedError = true;
+
+ error("React instrumentation encountered an error: %s", err);
+ }
+ }
+ }
+ }
+}
+function onCommitRoot(root, eventPriority) {
+ if (injectedHook && typeof injectedHook.onCommitFiberRoot === "function") {
+ try {
+ var didError = (root.current.flags & DidCapture) === DidCapture;
+
+ if (enableProfilerTimer) {
+ var schedulerPriority;
+
+ switch (eventPriority) {
+ case DiscreteEventPriority:
+ schedulerPriority = ImmediatePriority;
+ break;
+
+ case ContinuousEventPriority:
+ schedulerPriority = UserBlockingPriority;
+ break;
+
+ case DefaultEventPriority:
+ schedulerPriority = NormalPriority;
+ break;
+
+ case IdleEventPriority:
+ schedulerPriority = IdlePriority;
+ break;
+
+ default:
+ schedulerPriority = NormalPriority;
+ break;
+ }
+
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ root,
+ schedulerPriority,
+ didError
+ );
+ } else {
+ injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);
+ }
+ } catch (err) {
+ {
+ if (!hasLoggedError) {
+ hasLoggedError = true;
+
+ error("React instrumentation encountered an error: %s", err);
+ }
+ }
+ }
+ }
+}
+function onPostCommitRoot(root) {
+ if (
+ injectedHook &&
+ typeof injectedHook.onPostCommitFiberRoot === "function"
+ ) {
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, root);
+ } catch (err) {
+ {
+ if (!hasLoggedError) {
+ hasLoggedError = true;
+
+ error("React instrumentation encountered an error: %s", err);
+ }
+ }
+ }
+ }
+}
+function onCommitUnmount(fiber) {
+ if (injectedHook && typeof injectedHook.onCommitFiberUnmount === "function") {
+ try {
+ injectedHook.onCommitFiberUnmount(rendererID, fiber);
+ } catch (err) {
+ {
+ if (!hasLoggedError) {
+ hasLoggedError = true;
+
+ error("React instrumentation encountered an error: %s", err);
+ }
+ }
+ }
+ }
+}
+
// If those values are changed that package should be rebuilt and redeployed.
var TotalLanes = 31;
@@ -3843,7 +4031,7 @@ var SyncLane =
/* */
1;
var InputContinuousHydrationLane =
- /* */
+ /* */
2;
var InputContinuousLane =
/* */
@@ -4477,6 +4665,9 @@ function setCurrentUpdatePriority(newPriority) {
function higherEventPriority(a, b) {
return a !== 0 && a < b ? a : b;
}
+function lowerEventPriority(a, b) {
+ return a === 0 || a > b ? a : b;
+}
function isHigherEventPriority(a, b) {
return a !== 0 && a < b;
}
@@ -5052,6 +5243,8 @@ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
return "";
}
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
var loggedTypeFailures = {};
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
@@ -5074,7 +5267,7 @@ function setCurrentlyValidatingElement(element) {
function checkPropTypes(typeSpecs, values, location, componentName, element) {
{
// $FlowFixMe This is okay but Flow doesn't know it.
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
+ var has = Function.call.bind(hasOwnProperty);
for (var typeSpecName in typeSpecs) {
if (has(typeSpecs, typeSpecName)) {
@@ -5474,161 +5667,6 @@ function findCurrentUnmaskedContext(fiber) {
var LegacyRoot = 0;
var ConcurrentRoot = 1;
-// This module only exists as an ESM wrapper around the external CommonJS
-var scheduleCallback = Scheduler.unstable_scheduleCallback;
-var cancelCallback = Scheduler.unstable_cancelCallback;
-var shouldYield = Scheduler.unstable_shouldYield;
-var requestPaint = Scheduler.unstable_requestPaint;
-var now = Scheduler.unstable_now;
-var ImmediatePriority = Scheduler.unstable_ImmediatePriority;
-var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;
-var NormalPriority = Scheduler.unstable_NormalPriority;
-var IdlePriority = Scheduler.unstable_IdlePriority;
-
-{
- // Provide explicit error message when production+profiling bundle of e.g.
- // react-dom is used with production (non-profiling) bundle of
- // scheduler/tracing
- if (
- !(
- tracing.__interactionsRef != null &&
- tracing.__interactionsRef.current != null
- )
- ) {
- throw Error(
- "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling"
- );
- }
-}
-
-var rendererID = null;
-var injectedHook = null;
-var hasLoggedError = false;
-var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined";
-function injectInternals(internals) {
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined") {
- // No DevTools
- return false;
- }
-
- var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
-
- if (hook.isDisabled) {
- // This isn't a real property on the hook, but it can be set to opt out
- // of DevTools integration and associated warnings and logs.
- // https://github.com/facebook/react/issues/3877
- return true;
- }
-
- if (!hook.supportsFiber) {
- {
- error(
- "The installed version of React DevTools is too old and will not work " +
- "with the current version of React. Please update React DevTools. " +
- "https://reactjs.org/link/react-devtools"
- );
- } // DevTools exists, even though it doesn't support Fiber.
-
- return true;
- }
-
- try {
- rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.
-
- injectedHook = hook;
- } catch (err) {
- // Catch all errors because it is unsafe to throw during initialization.
- {
- error("React instrumentation encountered an error: %s.", err);
- }
- } // DevTools exists
-
- return true;
-}
-function onScheduleRoot(root, children) {
- {
- if (
- injectedHook &&
- typeof injectedHook.onScheduleFiberRoot === "function"
- ) {
- try {
- injectedHook.onScheduleFiberRoot(rendererID, root, children);
- } catch (err) {
- if (!hasLoggedError) {
- hasLoggedError = true;
-
- error("React instrumentation encountered an error: %s", err);
- }
- }
- }
- }
-}
-function onCommitRoot(root, eventPriority) {
- if (injectedHook && typeof injectedHook.onCommitFiberRoot === "function") {
- try {
- var didError = (root.current.flags & DidCapture) === DidCapture;
-
- if (enableProfilerTimer) {
- var schedulerPriority;
-
- switch (eventPriority) {
- case DiscreteEventPriority:
- schedulerPriority = ImmediatePriority;
- break;
-
- case ContinuousEventPriority:
- schedulerPriority = UserBlockingPriority;
- break;
-
- case DefaultEventPriority:
- schedulerPriority = NormalPriority;
- break;
-
- case IdleEventPriority:
- schedulerPriority = IdlePriority;
- break;
-
- default:
- schedulerPriority = NormalPriority;
- break;
- }
-
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- schedulerPriority,
- didError
- );
- } else {
- injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);
- }
- } catch (err) {
- {
- if (!hasLoggedError) {
- hasLoggedError = true;
-
- error("React instrumentation encountered an error: %s", err);
- }
- }
- }
- }
-}
-function onCommitUnmount(fiber) {
- if (injectedHook && typeof injectedHook.onCommitFiberUnmount === "function") {
- try {
- injectedHook.onCommitFiberUnmount(rendererID, fiber);
- } catch (err) {
- {
- if (!hasLoggedError) {
- hasLoggedError = true;
-
- error("React instrumentation encountered an error: %s", err);
- }
- }
- }
- }
-}
-
var syncQueue = null;
var isFlushingSyncQueue = false;
function scheduleSyncCallback(callback) {
@@ -5739,7 +5777,6 @@ function is(x, y) {
var objectIs = typeof Object.is === "function" ? Object.is : is;
-var hasOwnProperty = Object.prototype.hasOwnProperty;
/**
* Performs equality by iterating through keys on an object and returning false
* when any key has values which are not strictly equal between the arguments.
@@ -7097,8 +7134,7 @@ function commitUpdateQueue(finishedWork, finishedQueue, instance) {
}
}
-var fakeInternalInstance = {};
-var isArray = Array.isArray; // React.Component uses a shared frozen object by default.
+var fakeInternalInstance = {}; // React.Component uses a shared frozen object by default.
// We'll use it to determine whether we need to initialize legacy refs.
var emptyRefsObject = new React.Component().refs;
@@ -7216,6 +7252,7 @@ function applyDerivedStateFromProps(
updateQueue.baseState = memoizedState;
}
}
+
var classComponentUpdater = {
isMounted: isMounted,
enqueueSetState: function(inst, payload, callback) {
@@ -7865,7 +7902,6 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
}
}
- processUpdateQueue(workInProgress, newProps, instance, renderLanes);
instance.state = workInProgress.memoizedState;
var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
@@ -7894,9 +7930,9 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
}
if (typeof instance.componentDidMount === "function") {
- {
- workInProgress.flags |= Update;
- }
+ var fiberFlags = Update;
+
+ workInProgress.flags |= fiberFlags;
}
}
@@ -7958,9 +7994,9 @@ function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
// If an update was already in progress, we should schedule an Update
// effect even though we're bailing out, so that cWU/cDU are called.
if (typeof instance.componentDidMount === "function") {
- {
- workInProgress.flags |= Update;
- }
+ var fiberFlags = Update;
+
+ workInProgress.flags |= fiberFlags;
}
return false;
@@ -8006,17 +8042,17 @@ function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
}
if (typeof instance.componentDidMount === "function") {
- {
- workInProgress.flags |= Update;
- }
+ var _fiberFlags = Update;
+
+ workInProgress.flags |= _fiberFlags;
}
} else {
// If an update was already in progress, we should schedule an Update
// effect even though we're bailing out, so that cWU/cDU are called.
if (typeof instance.componentDidMount === "function") {
- {
- workInProgress.flags |= Update;
- }
+ var _fiberFlags2 = Update;
+
+ workInProgress.flags |= _fiberFlags2;
} // If shouldComponentUpdate returned false, we should still update the
// memoized state to indicate that this work can be reused.
@@ -8257,8 +8293,6 @@ var warnForMissingKey = function(child, returnFiber) {};
};
}
-var isArray$1 = Array.isArray;
-
function coerceRef(returnFiber, current, element) {
var mixedRef = element.ref;
@@ -8373,18 +8407,16 @@ function coerceRef(returnFiber, current, element) {
}
function throwOnInvalidObjectType(returnFiber, newChild) {
- if (returnFiber.type !== "textarea") {
- var childString = Object.prototype.toString.call(newChild);
+ var childString = Object.prototype.toString.call(newChild);
- {
- throw Error(
- "Objects are not valid as a React child (found: " +
- (childString === "[object Object]"
- ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
- : childString) +
- "). If you meant to render a collection of children, use an array instead."
- );
- }
+ {
+ throw Error(
+ "Objects are not valid as a React child (found: " +
+ (childString === "[object Object]"
+ ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
+ : childString) +
+ "). If you meant to render a collection of children, use an array instead."
+ );
}
}
@@ -8640,7 +8672,7 @@ function ChildReconciler(shouldTrackSideEffects) {
}
}
- if (isArray$1(newChild) || getIteratorFn(newChild)) {
+ if (isArray(newChild) || getIteratorFn(newChild)) {
var _created3 = createFiberFromFragment(
newChild,
returnFiber.mode,
@@ -8698,7 +8730,7 @@ function ChildReconciler(shouldTrackSideEffects) {
}
}
- if (isArray$1(newChild) || getIteratorFn(newChild)) {
+ if (isArray(newChild) || getIteratorFn(newChild)) {
if (key !== null) {
return null;
}
@@ -8753,7 +8785,7 @@ function ChildReconciler(shouldTrackSideEffects) {
}
}
- if (isArray$1(newChild) || getIteratorFn(newChild)) {
+ if (isArray(newChild) || getIteratorFn(newChild)) {
var _matchedFiber3 = existingChildren.get(newIdx) || null;
return updateFragment(
@@ -9363,9 +9395,7 @@ function ChildReconciler(shouldTrackSideEffects) {
newChild = newChild.props.children;
} // Handle object types
- var isObject = typeof newChild === "object" && newChild !== null;
-
- if (isObject) {
+ if (typeof newChild === "object" && newChild !== null) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
return placeSingleChild(
@@ -9387,6 +9417,26 @@ function ChildReconciler(shouldTrackSideEffects) {
)
);
}
+
+ if (isArray(newChild)) {
+ return reconcileChildrenArray(
+ returnFiber,
+ currentFirstChild,
+ newChild,
+ lanes
+ );
+ }
+
+ if (getIteratorFn(newChild)) {
+ return reconcileChildrenIterator(
+ returnFiber,
+ currentFirstChild,
+ newChild,
+ lanes
+ );
+ }
+
+ throwOnInvalidObjectType(returnFiber, newChild);
}
if (typeof newChild === "string" || typeof newChild === "number") {
@@ -9400,28 +9450,6 @@ function ChildReconciler(shouldTrackSideEffects) {
);
}
- if (isArray$1(newChild)) {
- return reconcileChildrenArray(
- returnFiber,
- currentFirstChild,
- newChild,
- lanes
- );
- }
-
- if (getIteratorFn(newChild)) {
- return reconcileChildrenIterator(
- returnFiber,
- currentFirstChild,
- newChild,
- lanes
- );
- }
-
- if (isObject) {
- throwOnInvalidObjectType(returnFiber, newChild);
- }
-
{
if (typeof newChild === "function") {
warnOnFunctionType(returnFiber);
@@ -9873,7 +9901,7 @@ function updateHookTypesDev() {
function checkDepsAreArrayDev(deps) {
{
- if (deps !== undefined && deps !== null && !Array.isArray(deps)) {
+ if (deps !== undefined && deps !== null && !isArray(deps)) {
// Verify deps, but only on mount to avoid extra checks.
// It's unlikely their type would change as usually you define them inline.
error(
@@ -10093,7 +10121,7 @@ function renderWithHooks(
if (
current !== null &&
- (current.flags & PassiveStatic) !== (workInProgress.flags & PassiveStatic)
+ (current.flags & StaticMask) !== (workInProgress.flags & StaticMask)
) {
error(
"Internal React error: Expected static flag was missing. Please " +
@@ -10907,9 +10935,9 @@ function updateEffect(create, deps) {
}
function mountLayoutEffect(create, deps) {
- {
- return mountEffectImpl(Update, Layout, create, deps);
- }
+ var fiberFlags = Update;
+
+ return mountEffectImpl(fiberFlags, Layout, create, deps);
}
function updateLayoutEffect(create, deps) {
@@ -10961,15 +10989,14 @@ function mountImperativeHandle(ref, create, deps) {
var effectDeps =
deps !== null && deps !== undefined ? deps.concat([ref]) : null;
+ var fiberFlags = Update;
- {
- return mountEffectImpl(
- Update,
- Layout,
- imperativeHandleEffect.bind(null, create, ref),
- effectDeps
- );
- }
+ return mountEffectImpl(
+ fiberFlags,
+ Layout,
+ imperativeHandleEffect.bind(null, create, ref),
+ effectDeps
+ );
}
function updateImperativeHandle(ref, create, deps) {
@@ -13341,17 +13368,6 @@ function mountIndeterminateComponent(
workInProgress.memoizedState =
value.state !== null && value.state !== undefined ? value.state : null;
initializeUpdateQueue(workInProgress);
- var getDerivedStateFromProps = Component.getDerivedStateFromProps;
-
- if (typeof getDerivedStateFromProps === "function") {
- applyDerivedStateFromProps(
- workInProgress,
- Component,
- getDerivedStateFromProps,
- props
- );
- }
-
adoptClassInstance(workInProgress, value);
mountClassInstance(workInProgress, Component, props, renderLanes);
return finishClassComponent(
@@ -14111,11 +14127,12 @@ function validateTailOptions(tailMode, revealOrder) {
function validateSuspenseListNestedChild(childSlot, index) {
{
- var isArray = Array.isArray(childSlot);
- var isIterable = !isArray && typeof getIteratorFn(childSlot) === "function";
+ var isAnArray = isArray(childSlot);
+ var isIterable =
+ !isAnArray && typeof getIteratorFn(childSlot) === "function";
- if (isArray || isIterable) {
- var type = isArray ? "array" : "iterable";
+ if (isAnArray || isIterable) {
+ var type = isAnArray ? "array" : "iterable";
error(
"A nested %s was passed to row #%s in . Wrap it in " +
@@ -14143,7 +14160,7 @@ function validateSuspenseListChildren(children, revealOrder) {
children !== null &&
children !== false
) {
- if (Array.isArray(children)) {
+ if (isArray(children)) {
for (var i = 0; i < children.length; i++) {
if (!validateSuspenseListNestedChild(children[i], i)) {
return;
@@ -15750,7 +15767,7 @@ function completeWork(current, workInProgress, renderLanes) {
var _primaryChildFragment2 = workInProgress.child;
if (_primaryChildFragment2 !== null) {
- // $FlowFixMe Flow doens't support type casting in combiation with the -= operator
+ // $FlowFixMe Flow doesn't support type casting in combination with the -= operator
workInProgress.treeBaseDuration -=
_primaryChildFragment2.treeBaseDuration;
}
@@ -16418,6 +16435,7 @@ function attachPingListener(root, wakeable, lanes) {
// Memoize using the thread ID to prevent redundant listeners.
threadIDs.add(lanes);
var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);
+
wakeable.then(ping, ping);
}
}
@@ -16651,10 +16669,9 @@ var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
{
didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
-}
-
+} // Used during the commit phase to track the state of the Offscreen component stack.
var PossiblyWeakSet = typeof WeakSet === "function" ? WeakSet : Set;
-var nextEffect = null;
+var nextEffect = null; // Used for Profiling builds to track updaters.
var callComponentWillUnmountWithTimer = function(current, instance) {
instance.props = current.memoizedProps;
@@ -16663,7 +16680,7 @@ var callComponentWillUnmountWithTimer = function(current, instance) {
{
instance.componentWillUnmount();
}
-}; // Capture errors so they don't interrupt unmounting.
+}; // Capture errors so they don't interrupt mounting.
function safelyCallComponentWillUnmount(
current,
@@ -16684,7 +16701,7 @@ function safelyCallComponentWillUnmount(
captureCommitPhaseError(current, nearestMountedAncestor, unmountError);
}
}
-}
+} // Capture errors so they don't interrupt mounting.
function safelyDetachRef(current, nearestMountedAncestor) {
var ref = current.ref;
@@ -17603,6 +17620,7 @@ function attachSuspenseRetryListeners(finishedWork) {
}
retryCache.add(wakeable);
+
wakeable.then(retry, retry);
}
});
@@ -17624,7 +17642,7 @@ function isSuspenseBoundaryBeingHidden(current, finishedWork) {
return false;
}
-function commitMutationEffects(root, firstChild) {
+function commitMutationEffects(root, firstChild, committedLanes) {
nextEffect = firstChild;
commitMutationEffects_begin(root);
}
@@ -17765,6 +17783,9 @@ function commitLayoutEffects(finishedWork, root, committedLanes) {
}
function commitLayoutEffects_begin(subtreeRoot, root, committedLanes) {
+ // Suspense layout effects semantics don't change for legacy roots.
+ var isModernRoot = (subtreeRoot.mode & ConcurrentMode) !== NoMode;
+
while (nextEffect !== null) {
var fiber = nextEffect;
var firstChild = fiber.child;
@@ -17779,6 +17800,9 @@ function commitLayoutEffects_begin(subtreeRoot, root, committedLanes) {
}
function commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes) {
+ // Suspense layout effects semantics don't change for legacy roots.
+ var isModernRoot = (subtreeRoot.mode & ConcurrentMode) !== NoMode;
+
while (nextEffect !== null) {
var fiber = nextEffect;
@@ -18107,6 +18131,7 @@ if (typeof Symbol === "function" && Symbol.for) {
var ceil = Math.ceil;
var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
+ ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig,
IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;
var NoContext =
/* */
@@ -18270,6 +18295,7 @@ function requestUpdateLane(fiber) {
// TODO: Move this type conversion to the event priority module.
var eventLane = getCurrentEventPriority();
+
return eventLane;
}
@@ -18295,7 +18321,7 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) {
if (root === null) {
warnAboutUpdateOnUnmountedFiberInDEV(fiber);
return null;
- } // Mark that the root has a pending update.
+ }
markRootUpdated(root, lane, eventTime);
@@ -18814,7 +18840,10 @@ function performSyncWorkOnRoot(root) {
var finishedWork = root.current.alternate;
root.finishedWork = finishedWork;
root.finishedLanes = lanes;
- commitRoot(root); // Before exiting, make sure there's a callback scheduled for the next
+
+ {
+ commitRoot(root);
+ } // Before exiting, make sure there's a callback scheduled for the next
// pending level.
ensureRootIsScheduled(root, now());
@@ -18839,9 +18868,11 @@ function batchedUpdates$1(fn, a) {
function flushSync(fn, a) {
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
+ var prevTransition = ReactCurrentBatchConfig$2.transition;
var previousPriority = getCurrentUpdatePriority();
try {
+ ReactCurrentBatchConfig$2.transition = 0;
setCurrentUpdatePriority(DiscreteEventPriority);
if (fn) {
@@ -18851,6 +18882,7 @@ function flushSync(fn, a) {
}
} finally {
setCurrentUpdatePriority(previousPriority);
+ ReactCurrentBatchConfig$2.transition = prevTransition;
executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.
// Note that this will happen even if batchedUpdates is higher up
// the stack.
@@ -19296,11 +19328,14 @@ function commitRoot(root) {
// TODO: This no longer makes any sense. We already wrap the mutation and
// layout phases. Should be able to remove.
var previousUpdateLanePriority = getCurrentUpdatePriority();
+ var prevTransition = ReactCurrentBatchConfig$2.transition;
try {
+ ReactCurrentBatchConfig$2.transition = 0;
setCurrentUpdatePriority(DiscreteEventPriority);
commitRootImpl(root, previousUpdateLanePriority);
} finally {
+ ReactCurrentBatchConfig$2.transition = prevTransition;
setCurrentUpdatePriority(previousUpdateLanePriority);
}
@@ -19386,6 +19421,8 @@ function commitRootImpl(root, renderPriorityLevel) {
NoFlags;
if (subtreeHasEffects || rootHasEffect) {
+ var prevTransition = ReactCurrentBatchConfig$2.transition;
+ ReactCurrentBatchConfig$2.transition = 0;
var previousPriority = getCurrentUpdatePriority();
setCurrentUpdatePriority(DiscreteEventPriority);
var prevExecutionContext = executionContext;
@@ -19431,6 +19468,7 @@ function commitRootImpl(root, renderPriorityLevel) {
executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value.
setCurrentUpdatePriority(previousPriority);
+ ReactCurrentBatchConfig$2.transition = prevTransition;
} else {
// No effects.
root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were
@@ -19518,6 +19556,20 @@ function commitRootImpl(root, renderPriorityLevel) {
// of the batch.
return null;
+ } // If the passive effects are the result of a discrete render, flush them
+ // synchronously at the end of the current task so that the result is
+ // immediately observable. Otherwise, we assume that they are not
+ // order-dependent and do not need to be observed by external systems, so we
+ // can wait until after paint.
+ // TODO: We can optimize this by not scheduling the callback earlier. Since we
+ // currently schedule the callback in multiple places, will wait until those
+ // are consolidated.
+
+ if (
+ includesSomeLane(pendingPassiveEffectsLanes, SyncLane) &&
+ root.tag !== LegacyRoot
+ ) {
+ flushPassiveEffects();
} // If layout work was scheduled, flush it now.
flushSyncCallbackQueue();
@@ -19527,18 +19579,24 @@ function commitRootImpl(root, renderPriorityLevel) {
function flushPassiveEffects() {
// Returns whether passive effects were flushed.
- if (pendingPassiveEffectsLanes !== NoLanes) {
- var priority = higherEventPriority(
- DefaultEventPriority,
- lanesToEventPriority(pendingPassiveEffectsLanes)
- );
+ // TODO: Combine this check with the one in flushPassiveEFfectsImpl. We should
+ // probably just combine the two functions. I believe they were only separate
+ // in the first place because we used to wrap it with
+ // `Scheduler.runWithPriority`, which accepts a function. But now we track the
+ // priority within React itself, so we can mutate the variable directly.
+ if (rootWithPendingPassiveEffects !== null) {
+ var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes);
+ var priority = lowerEventPriority(DefaultEventPriority, renderPriority);
+ var prevTransition = ReactCurrentBatchConfig$2.transition;
var previousPriority = getCurrentUpdatePriority();
try {
+ ReactCurrentBatchConfig$2.transition = 0;
setCurrentUpdatePriority(priority);
return flushPassiveEffectsImpl();
} finally {
setCurrentUpdatePriority(previousPriority);
+ ReactCurrentBatchConfig$2.transition = prevTransition;
}
}
@@ -19552,7 +19610,10 @@ function flushPassiveEffectsImpl() {
var root = rootWithPendingPassiveEffects;
var lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
+ rootWithPendingPassiveEffects = null; // TODO: This is sometimes out of sync with rootWithPendingPassiveEffects.
+ // Figure out why and fix it. It's not causing any known issues (probably
+ // because it's only used for profiling), but it's a refactor hazard.
+
pendingPassiveEffectsLanes = NoLanes;
if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
@@ -19583,7 +19644,10 @@ function flushPassiveEffectsImpl() {
// exceeds the limit, we'll fire a warning.
nestedPassiveUpdateCount =
- rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1;
+ rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1; // TODO: Move to commitPassiveMountEffects
+
+ onPostCommitRoot(root);
+
return true;
}
@@ -21228,7 +21292,10 @@ function createFiberFromFragment(elements, mode, lanes, key) {
function createFiberFromProfiler(pendingProps, mode, lanes, key) {
{
if (typeof pendingProps.id !== "string") {
- error('Profiler must specify an "id" as a prop');
+ error(
+ 'Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',
+ typeof pendingProps.id
+ );
}
}
@@ -21642,10 +21709,10 @@ var setSuspenseHandler = null;
{
var copyWithDeleteImpl = function(obj, path, index) {
var key = path[index];
- var updated = Array.isArray(obj) ? obj.slice() : Object.assign({}, obj);
+ var updated = isArray(obj) ? obj.slice() : Object.assign({}, obj);
if (index + 1 === path.length) {
- if (Array.isArray(updated)) {
+ if (isArray(updated)) {
updated.splice(key, 1);
} else {
delete updated[key];
@@ -21664,14 +21731,14 @@ var setSuspenseHandler = null;
var copyWithRenameImpl = function(obj, oldPath, newPath, index) {
var oldKey = oldPath[index];
- var updated = Array.isArray(obj) ? obj.slice() : Object.assign({}, obj);
+ var updated = isArray(obj) ? obj.slice() : Object.assign({}, obj);
if (index + 1 === oldPath.length) {
var newKey = newPath[index]; // $FlowFixMe number or string is fine here
updated[newKey] = updated[oldKey];
- if (Array.isArray(updated)) {
+ if (isArray(updated)) {
updated.splice(oldKey, 1);
} else {
delete updated[oldKey];
@@ -21716,7 +21783,7 @@ var setSuspenseHandler = null;
}
var key = path[index];
- var updated = Array.isArray(obj) ? obj.slice() : Object.assign({}, obj); // $FlowFixMe number or string is fine here
+ var updated = isArray(obj) ? obj.slice() : Object.assign({}, obj); // $FlowFixMe number or string is fine here
updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);
return updated;
@@ -21873,7 +21940,10 @@ function injectIntoDevTools(devToolsConfig) {
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
// Enables DevTools to append owner stacks to error messages in DEV mode.
- getCurrentFiber: getCurrentFiberForDevTools
+ getCurrentFiber: getCurrentFiberForDevTools,
+ // Enables DevTools to detect reconciler version rather than renderer version
+ // which may not match for third party renderers.
+ reconcilerVersion: ReactVersion
});
}
diff --git a/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/Libraries/Renderer/implementations/ReactFabric-prod.fb.js
index 9f53caacdd48fa..5175a2c7064cdc 100644
--- a/Libraries/Renderer/implementations/ReactFabric-prod.fb.js
+++ b/Libraries/Renderer/implementations/ReactFabric-prod.fb.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<>
+ * @generated SignedSource<<90d01c86a28a69abef2fe93114ca8dd8>>
*/
"use strict";
@@ -62,7 +62,8 @@ function invokeGuardedCallbackAndCatchFirstError(
hasRethrowError || ((hasRethrowError = !0), (rethrowError = error));
}
}
-var getFiberCurrentPropsFromNode = null,
+var isArrayImpl = Array.isArray,
+ getFiberCurrentPropsFromNode = null,
getInstanceFromNode = null,
getNodeFromInstance = null;
function executeDispatch(event, listener, inst) {
@@ -74,7 +75,7 @@ function executeDispatch(event, listener, inst) {
function executeDirectDispatch(event) {
var dispatchListener = event._dispatchListeners,
dispatchInstance = event._dispatchInstances;
- if (Array.isArray(dispatchListener))
+ if (isArrayImpl(dispatchListener))
throw Error("executeDirectDispatch(...): Invalid `event`.");
event.currentTarget = dispatchListener
? getNodeFromInstance(dispatchInstance)
@@ -335,9 +336,9 @@ function accumulate(current, next) {
);
return null == current
? next
- : Array.isArray(current)
+ : isArrayImpl(current)
? current.concat(next)
- : Array.isArray(next)
+ : isArrayImpl(next)
? [current].concat(next)
: [current, next];
}
@@ -347,12 +348,12 @@ function accumulateInto(current, next) {
"accumulateInto(...): Accumulated items must not be null or undefined."
);
if (null == current) return next;
- if (Array.isArray(current)) {
- if (Array.isArray(next)) return current.push.apply(current, next), current;
+ if (isArrayImpl(current)) {
+ if (isArrayImpl(next)) return current.push.apply(current, next), current;
current.push(next);
return current;
}
- return Array.isArray(next) ? [current].concat(next) : [current, next];
+ return isArrayImpl(next) ? [current].concat(next) : [current, next];
}
function forEachAccumulated(arr, cb, scope) {
Array.isArray(arr) ? arr.forEach(cb, scope) : arr && cb.call(scope, arr);
@@ -578,7 +579,7 @@ var ResponderEventPlugin = {
b: {
JSCompiler_temp = shouldSetEventType._dispatchListeners;
targetInst = shouldSetEventType._dispatchInstances;
- if (Array.isArray(JSCompiler_temp))
+ if (isArrayImpl(JSCompiler_temp))
for (
depthA = 0;
depthA < JSCompiler_temp.length &&
@@ -929,7 +930,7 @@ eventPluginOrder = Array.prototype.slice.call([
"ReactNativeBridgeEventPlugin"
]);
recomputePluginOrdering();
-var injectedNamesToPlugins$jscomp$inline_214 = {
+var injectedNamesToPlugins$jscomp$inline_215 = {
ResponderEventPlugin: ResponderEventPlugin,
ReactNativeBridgeEventPlugin: {
eventTypes: {},
@@ -964,34 +965,34 @@ var injectedNamesToPlugins$jscomp$inline_214 = {
}
}
},
- isOrderingDirty$jscomp$inline_215 = !1,
- pluginName$jscomp$inline_216;
-for (pluginName$jscomp$inline_216 in injectedNamesToPlugins$jscomp$inline_214)
+ isOrderingDirty$jscomp$inline_216 = !1,
+ pluginName$jscomp$inline_217;
+for (pluginName$jscomp$inline_217 in injectedNamesToPlugins$jscomp$inline_215)
if (
- injectedNamesToPlugins$jscomp$inline_214.hasOwnProperty(
- pluginName$jscomp$inline_216
+ injectedNamesToPlugins$jscomp$inline_215.hasOwnProperty(
+ pluginName$jscomp$inline_217
)
) {
- var pluginModule$jscomp$inline_217 =
- injectedNamesToPlugins$jscomp$inline_214[pluginName$jscomp$inline_216];
+ var pluginModule$jscomp$inline_218 =
+ injectedNamesToPlugins$jscomp$inline_215[pluginName$jscomp$inline_217];
if (
- !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_216) ||
- namesToPlugins[pluginName$jscomp$inline_216] !==
- pluginModule$jscomp$inline_217
+ !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_217) ||
+ namesToPlugins[pluginName$jscomp$inline_217] !==
+ pluginModule$jscomp$inline_218
) {
- if (namesToPlugins[pluginName$jscomp$inline_216])
+ if (namesToPlugins[pluginName$jscomp$inline_217])
throw Error(
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
- pluginName$jscomp$inline_216 +
+ pluginName$jscomp$inline_217 +
"`."
);
namesToPlugins[
- pluginName$jscomp$inline_216
- ] = pluginModule$jscomp$inline_217;
- isOrderingDirty$jscomp$inline_215 = !0;
+ pluginName$jscomp$inline_217
+ ] = pluginModule$jscomp$inline_218;
+ isOrderingDirty$jscomp$inline_216 = !0;
}
}
-isOrderingDirty$jscomp$inline_215 && recomputePluginOrdering();
+isOrderingDirty$jscomp$inline_216 && recomputePluginOrdering();
function getInstanceFromInstance(instanceHandle) {
return instanceHandle;
}
@@ -1006,7 +1007,8 @@ getNodeFromInstance = function(inst) {
};
ResponderEventPlugin.injection.injectGlobalResponderHandler({
onChange: function(from, to, blockNativeResponder) {
- (from || to).stateNode.canonical._internalInstanceHandle ||
+ ((from = (from = from || to) && from.stateNode) &&
+ from.canonical._internalInstanceHandle) ||
(null !== to
? ReactNativePrivateInterface.UIManager.setJSResponder(
to.stateNode.canonical._nativeTag,
@@ -1307,7 +1309,7 @@ function restoreDeletedValuesInNestedArray(
node,
validAttributes
) {
- if (Array.isArray(node))
+ if (isArrayImpl(node))
for (var i = node.length; i-- && 0 < removedKeyCount; )
restoreDeletedValuesInNestedArray(
updatePayload,
@@ -1353,9 +1355,9 @@ function diffNestedProperty(
: prevProp
? clearNestedProperty(updatePayload, prevProp, validAttributes)
: updatePayload;
- if (!Array.isArray(prevProp) && !Array.isArray(nextProp))
+ if (!isArrayImpl(prevProp) && !isArrayImpl(nextProp))
return diffProperties(updatePayload, prevProp, nextProp, validAttributes);
- if (Array.isArray(prevProp) && Array.isArray(nextProp)) {
+ if (isArrayImpl(prevProp) && isArrayImpl(nextProp)) {
var minLength =
prevProp.length < nextProp.length ? prevProp.length : nextProp.length,
i;
@@ -1380,7 +1382,7 @@ function diffNestedProperty(
);
return updatePayload;
}
- return Array.isArray(prevProp)
+ return isArrayImpl(prevProp)
? diffProperties(
updatePayload,
ReactNativePrivateInterface.flattenStyle(prevProp),
@@ -1396,7 +1398,7 @@ function diffNestedProperty(
}
function addNestedProperty(updatePayload, nextProp, validAttributes) {
if (!nextProp) return updatePayload;
- if (!Array.isArray(nextProp))
+ if (!isArrayImpl(nextProp))
return diffProperties(
updatePayload,
emptyObject,
@@ -1413,7 +1415,7 @@ function addNestedProperty(updatePayload, nextProp, validAttributes) {
}
function clearNestedProperty(updatePayload, prevProp, validAttributes) {
if (!prevProp) return updatePayload;
- if (!Array.isArray(prevProp))
+ if (!isArrayImpl(prevProp))
return diffProperties(
updatePayload,
prevProp,
@@ -1531,7 +1533,7 @@ function executeDispatchesAndReleaseTopLevel(e) {
if (e) {
var dispatchListeners = e._dispatchListeners,
dispatchInstances = e._dispatchInstances;
- if (Array.isArray(dispatchListeners))
+ if (isArrayImpl(dispatchListeners))
for (
var i = 0;
i < dispatchListeners.length && !e.isPropagationStopped();
@@ -1591,6 +1593,28 @@ function dispatchEvent(target, topLevelType, nativeEvent) {
}
});
}
+var scheduleCallback = Scheduler.unstable_scheduleCallback,
+ cancelCallback = Scheduler.unstable_cancelCallback,
+ shouldYield = Scheduler.unstable_shouldYield,
+ requestPaint = Scheduler.unstable_requestPaint,
+ now = Scheduler.unstable_now,
+ ImmediatePriority = Scheduler.unstable_ImmediatePriority,
+ UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
+ NormalPriority = Scheduler.unstable_NormalPriority,
+ IdlePriority = Scheduler.unstable_IdlePriority,
+ 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) {}
+}
var nextTransitionLane = 64,
nextRetryLane = 4194304;
function getHighestPriorityLanes(lanes) {
@@ -1905,7 +1929,8 @@ function describeFunctionComponentFrame(fn, source) {
? describeComponentFrame(fn.displayName || fn.name || null, source, null)
: "";
}
-var valueStack = [],
+var hasOwnProperty = Object.prototype.hasOwnProperty,
+ valueStack = [],
index = -1;
function createCursor(defaultValue) {
return { current: defaultValue };
@@ -2001,28 +2026,6 @@ function invalidateContextProvider(workInProgress, type, didChange) {
: pop(didPerformWorkStackCursor);
push(didPerformWorkStackCursor, didChange);
}
-var scheduleCallback = Scheduler.unstable_scheduleCallback,
- cancelCallback = Scheduler.unstable_cancelCallback,
- shouldYield = Scheduler.unstable_shouldYield,
- requestPaint = Scheduler.unstable_requestPaint,
- now = Scheduler.unstable_now,
- ImmediatePriority = Scheduler.unstable_ImmediatePriority,
- UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
- NormalPriority = Scheduler.unstable_NormalPriority,
- IdlePriority = Scheduler.unstable_IdlePriority,
- 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) {}
-}
var syncQueue = null,
isFlushingSyncQueue = !1;
function flushSyncCallbackQueue() {
@@ -2053,8 +2056,7 @@ var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
function is(x, y) {
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
}
-var objectIs = "function" === typeof Object.is ? Object.is : is,
- hasOwnProperty = Object.prototype.hasOwnProperty;
+var objectIs = "function" === typeof Object.is ? Object.is : is;
function shallowEqual(objA, objB) {
if (objectIs(objA, objB)) return !0;
if (
@@ -2547,7 +2549,6 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
? previousContext
: contextStackCursor.current),
(instance.context = getMaskedContext(workInProgress, contextType)));
- processUpdateQueue(workInProgress, newProps, instance, renderLanes);
instance.state = workInProgress.memoizedState;
contextType = ctor.getDerivedStateFromProps;
"function" === typeof contextType &&
@@ -2569,7 +2570,6 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
"function" === typeof instance.componentDidMount &&
(workInProgress.flags |= 4);
}
-var isArray = Array.isArray;
function coerceRef(returnFiber, current, element) {
returnFiber = element.ref;
if (
@@ -2622,15 +2622,14 @@ function coerceRef(returnFiber, current, element) {
return returnFiber;
}
function throwOnInvalidObjectType(returnFiber, newChild) {
- if ("textarea" !== returnFiber.type)
- throw ((returnFiber = Object.prototype.toString.call(newChild)),
- Error(
- "Objects are not valid as a React child (found: " +
- ("[object Object]" === returnFiber
- ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
- : returnFiber) +
- "). If you meant to render a collection of children, use an array instead."
- ));
+ returnFiber = Object.prototype.toString.call(newChild);
+ throw Error(
+ "Objects are not valid as a React child (found: " +
+ ("[object Object]" === returnFiber
+ ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
+ : returnFiber) +
+ "). If you meant to render a collection of children, use an array instead."
+ );
}
function ChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
@@ -2792,7 +2791,7 @@ function ChildReconciler(shouldTrackSideEffects) {
newChild
);
}
- if (isArray(newChild) || getIteratorFn(newChild))
+ if (isArrayImpl(newChild) || getIteratorFn(newChild))
return (
(newChild = createFiberFromFragment(
newChild,
@@ -2824,7 +2823,7 @@ function ChildReconciler(shouldTrackSideEffects) {
? updatePortal(returnFiber, oldFiber, newChild, lanes)
: null;
}
- if (isArray(newChild) || getIteratorFn(newChild))
+ if (isArrayImpl(newChild) || getIteratorFn(newChild))
return null !== key
? null
: updateFragment(returnFiber, oldFiber, newChild, lanes, null);
@@ -2863,7 +2862,7 @@ function ChildReconciler(shouldTrackSideEffects) {
updatePortal(returnFiber, existingChildren, newChild, lanes)
);
}
- if (isArray(newChild) || getIteratorFn(newChild))
+ if (isArrayImpl(newChild) || getIteratorFn(newChild))
return (
(existingChildren = existingChildren.get(newIdx) || null),
updateFragment(returnFiber, existingChildren, newChild, lanes, null)
@@ -3046,20 +3045,19 @@ function ChildReconciler(shouldTrackSideEffects) {
newChild.type === REACT_FRAGMENT_TYPE &&
null === newChild.key;
isUnkeyedTopLevelFragment && (newChild = newChild.props.children);
- var isObject = "object" === typeof newChild && null !== newChild;
- if (isObject)
+ if ("object" === typeof newChild && null !== newChild) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
a: {
- isObject = newChild.key;
+ var key = newChild.key;
for (
isUnkeyedTopLevelFragment = currentFirstChild;
null !== isUnkeyedTopLevelFragment;
) {
- if (isUnkeyedTopLevelFragment.key === isObject) {
- isObject = newChild.type;
- if (isObject === REACT_FRAGMENT_TYPE) {
+ if (isUnkeyedTopLevelFragment.key === key) {
+ key = newChild.type;
+ if (key === REACT_FRAGMENT_TYPE) {
if (7 === isUnkeyedTopLevelFragment.tag) {
deleteRemainingChildren(
returnFiber,
@@ -3073,7 +3071,7 @@ function ChildReconciler(shouldTrackSideEffects) {
returnFiber = currentFirstChild;
break a;
}
- } else if (isUnkeyedTopLevelFragment.elementType === isObject) {
+ } else if (isUnkeyedTopLevelFragment.elementType === key) {
deleteRemainingChildren(
returnFiber,
isUnkeyedTopLevelFragment.sibling
@@ -3165,6 +3163,22 @@ function ChildReconciler(shouldTrackSideEffects) {
}
return placeSingleChild(returnFiber);
}
+ if (isArrayImpl(newChild))
+ return reconcileChildrenArray(
+ returnFiber,
+ currentFirstChild,
+ newChild,
+ lanes
+ );
+ if (getIteratorFn(newChild))
+ return reconcileChildrenIterator(
+ returnFiber,
+ currentFirstChild,
+ newChild,
+ lanes
+ );
+ throwOnInvalidObjectType(returnFiber, newChild);
+ }
if ("string" === typeof newChild || "number" === typeof newChild)
return (
(newChild = "" + newChild),
@@ -3183,21 +3197,6 @@ function ChildReconciler(shouldTrackSideEffects) {
(returnFiber = currentFirstChild)),
placeSingleChild(returnFiber)
);
- if (isArray(newChild))
- return reconcileChildrenArray(
- returnFiber,
- currentFirstChild,
- newChild,
- lanes
- );
- if (getIteratorFn(newChild))
- return reconcileChildrenIterator(
- returnFiber,
- currentFirstChild,
- newChild,
- lanes
- );
- isObject && throwOnInvalidObjectType(returnFiber, newChild);
if ("undefined" === typeof newChild && !isUnkeyedTopLevelFragment)
switch (returnFiber.tag) {
case 1:
@@ -3662,7 +3661,7 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
hook.memoizedState = pushEffect(1 | hookFlags, create, destroy, deps);
}
function mountEffect(create, deps) {
- return mountEffectImpl(263168, 4, create, deps);
+ return mountEffectImpl(1049600, 4, create, deps);
}
function updateEffect(create, deps) {
return updateEffectImpl(1024, 4, create, deps);
@@ -4655,7 +4654,7 @@ function updateSuspenseFallbackChildren(
(primaryChildren.pendingProps = primaryChildProps),
(workInProgress.deletions = null))
: ((primaryChildren = createWorkInProgress(current, primaryChildProps)),
- (primaryChildren.subtreeFlags = current.subtreeFlags & 262144));
+ (primaryChildren.subtreeFlags = current.subtreeFlags & 1835008));
null !== currentFallbackChildFragment
? (fallbackChildren = createWorkInProgress(
currentFallbackChildFragment,
@@ -5015,14 +5014,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
break;
case "collapsed":
lastTailNode = renderState.tail;
- for (var lastTailNode$62 = null; null !== lastTailNode; )
- null !== lastTailNode.alternate && (lastTailNode$62 = lastTailNode),
+ for (var lastTailNode$64 = null; null !== lastTailNode; )
+ null !== lastTailNode.alternate && (lastTailNode$64 = lastTailNode),
(lastTailNode = lastTailNode.sibling);
- null === lastTailNode$62
+ null === lastTailNode$64
? hasRenderedATailFallback || null === renderState.tail
? (renderState.tail = null)
: (renderState.tail.sibling = null)
- : (lastTailNode$62.sibling = null);
+ : (lastTailNode$64.sibling = null);
}
}
function bubbleProperties(completedWork) {
@@ -5032,19 +5031,19 @@ function bubbleProperties(completedWork) {
newChildLanes = 0,
subtreeFlags = 0;
if (didBailout)
- for (var child$63 = completedWork.child; null !== child$63; )
- (newChildLanes |= child$63.lanes | child$63.childLanes),
- (subtreeFlags |= child$63.subtreeFlags & 262144),
- (subtreeFlags |= child$63.flags & 262144),
- (child$63.return = completedWork),
- (child$63 = child$63.sibling);
+ for (var child$65 = completedWork.child; null !== child$65; )
+ (newChildLanes |= child$65.lanes | child$65.childLanes),
+ (subtreeFlags |= child$65.subtreeFlags & 1835008),
+ (subtreeFlags |= child$65.flags & 1835008),
+ (child$65.return = completedWork),
+ (child$65 = child$65.sibling);
else
- for (child$63 = completedWork.child; null !== child$63; )
- (newChildLanes |= child$63.lanes | child$63.childLanes),
- (subtreeFlags |= child$63.subtreeFlags),
- (subtreeFlags |= child$63.flags),
- (child$63.return = completedWork),
- (child$63 = child$63.sibling);
+ for (child$65 = completedWork.child; null !== child$65; )
+ (newChildLanes |= child$65.lanes | child$65.childLanes),
+ (subtreeFlags |= child$65.subtreeFlags),
+ (subtreeFlags |= child$65.flags),
+ (child$65.return = completedWork),
+ (child$65 = child$65.sibling);
completedWork.subtreeFlags |= subtreeFlags;
completedWork.childLanes = newChildLanes;
return didBailout;
@@ -5241,7 +5240,7 @@ function completeWork(current, workInProgress, renderLanes) {
for (newProps = workInProgress.child; null !== newProps; )
(renderLanes = newProps),
(type = current),
- (renderLanes.flags &= 262146),
+ (renderLanes.flags &= 1835010),
(updatePayload = renderLanes.alternate),
null === updatePayload
? ((renderLanes.childLanes = 0),
@@ -5615,8 +5614,8 @@ function commitHookEffectListMount(tag, finishedWork) {
var effect = (finishedWork = finishedWork.next);
do {
if ((effect.tag & tag) === tag) {
- var create$80 = effect.create;
- effect.destroy = create$80();
+ var create$82 = effect.create;
+ effect.destroy = create$82();
}
effect = effect.next;
} while (effect !== finishedWork);
@@ -5868,8 +5867,8 @@ function commitLayoutEffects(finishedWork) {
commitUpdateQueue(firstChild, updateQueue, instance);
break;
case 3:
- var updateQueue$81 = firstChild.updateQueue;
- if (null !== updateQueue$81) {
+ var updateQueue$83 = firstChild.updateQueue;
+ if (null !== updateQueue$83) {
current = null;
if (null !== firstChild.child)
switch (firstChild.child.tag) {
@@ -5879,7 +5878,7 @@ function commitLayoutEffects(finishedWork) {
case 1:
current = firstChild.child.stateNode;
}
- commitUpdateQueue(firstChild, updateQueue$81, current);
+ commitUpdateQueue(firstChild, updateQueue$83, current);
}
break;
case 5:
@@ -5942,6 +5941,7 @@ function commitLayoutEffects(finishedWork) {
var ceil = Math.ceil,
ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
+ ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig,
executionContext = 0,
workInProgressRoot = null,
workInProgress = null,
@@ -6393,15 +6393,15 @@ function handleError(root$jscomp$0, thrownValue) {
}
var hasInvisibleParentBoundary =
0 !== (suspenseStackCursor.current & 1),
- workInProgress$75 = returnFiber;
+ workInProgress$77 = returnFiber;
do {
var JSCompiler_temp;
- if ((JSCompiler_temp = 13 === workInProgress$75.tag)) {
- var nextState = workInProgress$75.memoizedState;
+ if ((JSCompiler_temp = 13 === workInProgress$77.tag)) {
+ var nextState = workInProgress$77.memoizedState;
if (null !== nextState)
JSCompiler_temp = null !== nextState.dehydrated ? !0 : !1;
else {
- var props = workInProgress$75.memoizedProps;
+ var props = workInProgress$77.memoizedProps;
JSCompiler_temp =
void 0 === props.fallback
? !1
@@ -6413,17 +6413,17 @@ function handleError(root$jscomp$0, thrownValue) {
}
}
if (JSCompiler_temp) {
- var wakeables = workInProgress$75.updateQueue;
+ var wakeables = workInProgress$77.updateQueue;
if (null === wakeables) {
var updateQueue = new Set();
updateQueue.add(wakeable);
- workInProgress$75.updateQueue = updateQueue;
+ workInProgress$77.updateQueue = updateQueue;
} else wakeables.add(wakeable);
if (
- 0 === (workInProgress$75.mode & 1) &&
- workInProgress$75 !== returnFiber
+ 0 === (workInProgress$77.mode & 1) &&
+ workInProgress$77 !== returnFiber
) {
- workInProgress$75.flags |= 128;
+ workInProgress$77.flags |= 128;
sourceFiber.flags |= 32768;
sourceFiber.flags &= -10053;
if (1 === sourceFiber.tag)
@@ -6456,12 +6456,12 @@ function handleError(root$jscomp$0, thrownValue) {
);
wakeable.then(ping, ping);
}
- workInProgress$75.flags |= 16384;
- workInProgress$75.lanes = thrownValue;
+ workInProgress$77.flags |= 16384;
+ workInProgress$77.lanes = thrownValue;
break a;
}
- workInProgress$75 = workInProgress$75.return;
- } while (null !== workInProgress$75);
+ workInProgress$77 = workInProgress$77.return;
+ } while (null !== workInProgress$77);
value = Error(
(getComponentNameFromFiber(sourceFiber) || "A React component") +
" suspended while rendering, but no fallback UI was specified.\n\nAdd a component higher in the tree to provide a loading indicator or placeholder to display."
@@ -6470,47 +6470,47 @@ function handleError(root$jscomp$0, thrownValue) {
5 !== workInProgressRootExitStatus &&
(workInProgressRootExitStatus = 2);
value = createCapturedValue(value, sourceFiber);
- workInProgress$75 = returnFiber;
+ workInProgress$77 = returnFiber;
do {
- switch (workInProgress$75.tag) {
+ switch (workInProgress$77.tag) {
case 3:
root = value;
- workInProgress$75.flags |= 16384;
+ workInProgress$77.flags |= 16384;
thrownValue &= -thrownValue;
- workInProgress$75.lanes |= thrownValue;
- var update$76 = createRootErrorUpdate(
- workInProgress$75,
+ workInProgress$77.lanes |= thrownValue;
+ var update$78 = createRootErrorUpdate(
+ workInProgress$77,
root,
thrownValue
);
- enqueueCapturedUpdate(workInProgress$75, update$76);
+ enqueueCapturedUpdate(workInProgress$77, update$78);
break a;
case 1:
root = value;
- var ctor = workInProgress$75.type,
- instance = workInProgress$75.stateNode;
+ var ctor = workInProgress$77.type,
+ instance = workInProgress$77.stateNode;
if (
- 0 === (workInProgress$75.flags & 128) &&
+ 0 === (workInProgress$77.flags & 128) &&
("function" === typeof ctor.getDerivedStateFromError ||
(null !== instance &&
"function" === typeof instance.componentDidCatch &&
(null === legacyErrorBoundariesThatAlreadyFailed ||
!legacyErrorBoundariesThatAlreadyFailed.has(instance))))
) {
- workInProgress$75.flags |= 16384;
+ workInProgress$77.flags |= 16384;
thrownValue &= -thrownValue;
- workInProgress$75.lanes |= thrownValue;
- var update$79 = createClassErrorUpdate(
- workInProgress$75,
+ workInProgress$77.lanes |= thrownValue;
+ var update$81 = createClassErrorUpdate(
+ workInProgress$77,
root,
thrownValue
);
- enqueueCapturedUpdate(workInProgress$75, update$79);
+ enqueueCapturedUpdate(workInProgress$77, update$81);
break a;
}
}
- workInProgress$75 = workInProgress$75.return;
- } while (null !== workInProgress$75);
+ workInProgress$77 = workInProgress$77.return;
+ } while (null !== workInProgress$77);
}
completeUnitOfWork(erroredWork);
} catch (yetAnotherThrownValue) {
@@ -6601,12 +6601,15 @@ function completeUnitOfWork(unitOfWork) {
0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);
}
function commitRoot(root) {
- var previousUpdateLanePriority = currentUpdatePriority;
+ var previousUpdateLanePriority = currentUpdatePriority,
+ prevTransition = ReactCurrentBatchConfig$2.transition;
try {
- (currentUpdatePriority = 1),
+ (ReactCurrentBatchConfig$2.transition = 0),
+ (currentUpdatePriority = 1),
commitRootImpl(root, previousUpdateLanePriority);
} finally {
- currentUpdatePriority = previousUpdateLanePriority;
+ (ReactCurrentBatchConfig$2.transition = prevTransition),
+ (currentUpdatePriority = previousUpdateLanePriority);
}
return null;
}
@@ -6641,7 +6644,9 @@ function commitRootImpl(root, renderPriorityLevel) {
}));
remainingLanes = 0 !== (finishedWork.flags & 8054);
if (0 !== (finishedWork.subtreeFlags & 8054) || remainingLanes) {
- remainingLanes = currentUpdatePriority;
+ remainingLanes = ReactCurrentBatchConfig$2.transition;
+ ReactCurrentBatchConfig$2.transition = 0;
+ var previousPriority = currentUpdatePriority;
currentUpdatePriority = 1;
var prevExecutionContext = executionContext;
executionContext |= 16;
@@ -6652,7 +6657,8 @@ function commitRootImpl(root, renderPriorityLevel) {
commitLayoutEffects(finishedWork, root, lanes);
requestPaint();
executionContext = prevExecutionContext;
- currentUpdatePriority = remainingLanes;
+ currentUpdatePriority = previousPriority;
+ ReactCurrentBatchConfig$2.transition = remainingLanes;
} else root.current = finishedWork;
rootDoesHavePassiveEffects &&
((rootDoesHavePassiveEffects = !1),
@@ -6673,26 +6679,31 @@ function commitRootImpl(root, renderPriorityLevel) {
(firstUncaughtError = null),
root);
if (0 !== (executionContext & 4)) return null;
+ 0 !== (pendingPassiveEffectsLanes & 1) &&
+ 0 !== root.tag &&
+ flushPassiveEffects();
flushSyncCallbackQueue();
return null;
}
function flushPassiveEffects() {
- if (0 !== pendingPassiveEffectsLanes) {
- var b = lanesToEventPriority(pendingPassiveEffectsLanes),
+ if (null !== rootWithPendingPassiveEffects) {
+ var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
+ prevTransition = ReactCurrentBatchConfig$2.transition,
previousPriority = currentUpdatePriority;
try {
- currentUpdatePriority = 16 < b ? 16 : b;
+ ReactCurrentBatchConfig$2.transition = 0;
+ currentUpdatePriority = 16 > renderPriority ? 16 : renderPriority;
if (null === rootWithPendingPassiveEffects)
var JSCompiler_inline_result = !1;
else {
- var root = rootWithPendingPassiveEffects;
+ renderPriority = rootWithPendingPassiveEffects;
rootWithPendingPassiveEffects = null;
pendingPassiveEffectsLanes = 0;
if (0 !== (executionContext & 24))
throw Error("Cannot flush passive effects while already rendering.");
- b = executionContext;
+ var prevExecutionContext = executionContext;
executionContext |= 16;
- for (nextEffect = root.current; null !== nextEffect; ) {
+ for (nextEffect = renderPriority.current; null !== nextEffect; ) {
var fiber = nextEffect,
child = fiber.child;
if (0 !== (nextEffect.flags & 16)) {
@@ -6767,7 +6778,7 @@ function flushPassiveEffects() {
nextEffect = fiber.return;
}
}
- var finishedWork = root.current;
+ var finishedWork = renderPriority.current;
for (nextEffect = finishedWork; null !== nextEffect; ) {
child = nextEffect;
var firstChild = child.child;
@@ -6800,13 +6811,21 @@ function flushPassiveEffects() {
nextEffect = deletions.return;
}
}
- executionContext = b;
+ executionContext = prevExecutionContext;
flushSyncCallbackQueue();
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, renderPriority);
+ } catch (err) {}
JSCompiler_inline_result = !0;
}
return JSCompiler_inline_result;
} finally {
- currentUpdatePriority = previousPriority;
+ (currentUpdatePriority = previousPriority),
+ (ReactCurrentBatchConfig$2.transition = prevTransition);
}
}
return !1;
@@ -7025,14 +7044,6 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
? nextValue.state
: null;
initializeUpdateQueue(workInProgress);
- var getDerivedStateFromProps = updateLanes.getDerivedStateFromProps;
- "function" === typeof getDerivedStateFromProps &&
- applyDerivedStateFromProps(
- workInProgress,
- updateLanes,
- getDerivedStateFromProps,
- current
- );
nextValue.updater = classComponentUpdater;
workInProgress.stateNode = nextValue;
nextValue._reactInternals = workInProgress;
@@ -7247,11 +7258,11 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
updateLanes = workInProgress.type._context;
nextValue = workInProgress.pendingProps;
hasContext = workInProgress.memoizedProps;
- getDerivedStateFromProps = nextValue.value;
+ var newValue = nextValue.value;
push(valueCursor, updateLanes._currentValue2);
- updateLanes._currentValue2 = getDerivedStateFromProps;
+ updateLanes._currentValue2 = newValue;
if (null !== hasContext)
- if (objectIs(hasContext.value, getDerivedStateFromProps)) {
+ if (objectIs(hasContext.value, newValue)) {
if (
hasContext.children === nextValue.children &&
!didPerformWorkStackCursor.current
@@ -7265,25 +7276,24 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
}
} else
for (
- getDerivedStateFromProps = workInProgress.child,
- null !== getDerivedStateFromProps &&
- (getDerivedStateFromProps.return = workInProgress);
- null !== getDerivedStateFromProps;
+ newValue = workInProgress.child,
+ null !== newValue && (newValue.return = workInProgress);
+ null !== newValue;
) {
- var list = getDerivedStateFromProps.dependencies;
+ var list = newValue.dependencies;
if (null !== list) {
- hasContext = getDerivedStateFromProps.child;
+ hasContext = newValue.child;
for (
var dependency = list.firstContext;
null !== dependency;
) {
if (dependency.context === updateLanes) {
- if (1 === getDerivedStateFromProps.tag) {
+ if (1 === newValue.tag) {
dependency = createUpdate(-1, renderLanes & -renderLanes);
dependency.tag = 2;
- var updateQueue = getDerivedStateFromProps.updateQueue;
+ var updateQueue = newValue.updateQueue;
if (null !== updateQueue) {
updateQueue = updateQueue.shared;
var pending = updateQueue.pending;
@@ -7294,13 +7304,10 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
updateQueue.pending = dependency;
}
}
- getDerivedStateFromProps.lanes |= renderLanes;
- dependency = getDerivedStateFromProps.alternate;
+ newValue.lanes |= renderLanes;
+ dependency = newValue.alternate;
null !== dependency && (dependency.lanes |= renderLanes);
- scheduleWorkOnParentPath(
- getDerivedStateFromProps.return,
- renderLanes
- );
+ scheduleWorkOnParentPath(newValue.return, renderLanes);
list.lanes |= renderLanes;
break;
}
@@ -7308,32 +7315,27 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
}
} else
hasContext =
- 10 === getDerivedStateFromProps.tag
- ? getDerivedStateFromProps.type === workInProgress.type
+ 10 === newValue.tag
+ ? newValue.type === workInProgress.type
? null
- : getDerivedStateFromProps.child
- : getDerivedStateFromProps.child;
- if (null !== hasContext)
- hasContext.return = getDerivedStateFromProps;
+ : newValue.child
+ : newValue.child;
+ if (null !== hasContext) hasContext.return = newValue;
else
- for (
- hasContext = getDerivedStateFromProps;
- null !== hasContext;
-
- ) {
+ for (hasContext = newValue; null !== hasContext; ) {
if (hasContext === workInProgress) {
hasContext = null;
break;
}
- getDerivedStateFromProps = hasContext.sibling;
- if (null !== getDerivedStateFromProps) {
- getDerivedStateFromProps.return = hasContext.return;
- hasContext = getDerivedStateFromProps;
+ newValue = hasContext.sibling;
+ if (null !== newValue) {
+ newValue.return = hasContext.return;
+ hasContext = newValue;
break;
}
hasContext = hasContext.return;
}
- getDerivedStateFromProps = hasContext;
+ newValue = hasContext;
}
reconcileChildren(
current,
@@ -7472,7 +7474,7 @@ function createWorkInProgress(current, pendingProps) {
(workInProgress.flags = 0),
(workInProgress.subtreeFlags = 0),
(workInProgress.deletions = null));
- workInProgress.flags = current.flags & 262144;
+ workInProgress.flags = current.flags & 1835008;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -7736,7 +7738,7 @@ batchedUpdatesImpl = function(fn, a) {
}
};
var roots = new Map(),
- devToolsConfig$jscomp$inline_940 = {
+ devToolsConfig$jscomp$inline_941 = {
findFiberByHostInstance: getInstanceFromInstance,
bundleType: 0,
version: "17.0.3",
@@ -7754,11 +7756,11 @@ var roots = new Map(),
}.bind(null, findNodeHandle)
}
};
-var internals$jscomp$inline_1171 = {
- bundleType: devToolsConfig$jscomp$inline_940.bundleType,
- version: devToolsConfig$jscomp$inline_940.version,
- rendererPackageName: devToolsConfig$jscomp$inline_940.rendererPackageName,
- rendererConfig: devToolsConfig$jscomp$inline_940.rendererConfig,
+var internals$jscomp$inline_1175 = {
+ bundleType: devToolsConfig$jscomp$inline_941.bundleType,
+ version: devToolsConfig$jscomp$inline_941.version,
+ rendererPackageName: devToolsConfig$jscomp$inline_941.rendererPackageName,
+ rendererConfig: devToolsConfig$jscomp$inline_941.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -7773,25 +7775,26 @@ var internals$jscomp$inline_1171 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
- devToolsConfig$jscomp$inline_940.findFiberByHostInstance ||
+ devToolsConfig$jscomp$inline_941.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
- getCurrentFiber: null
+ getCurrentFiber: null,
+ reconcilerVersion: "17.0.3"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
- var hook$jscomp$inline_1172 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+ var hook$jscomp$inline_1176 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
- !hook$jscomp$inline_1172.isDisabled &&
- hook$jscomp$inline_1172.supportsFiber
+ !hook$jscomp$inline_1176.isDisabled &&
+ hook$jscomp$inline_1176.supportsFiber
)
try {
- (rendererID = hook$jscomp$inline_1172.inject(
- internals$jscomp$inline_1171
+ (rendererID = hook$jscomp$inline_1176.inject(
+ internals$jscomp$inline_1175
)),
- (injectedHook = hook$jscomp$inline_1172);
+ (injectedHook = hook$jscomp$inline_1176);
} catch (err) {}
}
exports.createPortal = function(children, containerTag) {
diff --git a/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js
index 5bb2ff1d2b3b06..5cea7d0c632ca5 100644
--- a/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js
+++ b/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<>
+ * @generated SignedSource<>
*/
"use strict";
@@ -63,7 +63,8 @@ function invokeGuardedCallbackAndCatchFirstError(
hasRethrowError || ((hasRethrowError = !0), (rethrowError = error));
}
}
-var getFiberCurrentPropsFromNode = null,
+var isArrayImpl = Array.isArray,
+ getFiberCurrentPropsFromNode = null,
getInstanceFromNode = null,
getNodeFromInstance = null;
function executeDispatch(event, listener, inst) {
@@ -75,7 +76,7 @@ function executeDispatch(event, listener, inst) {
function executeDirectDispatch(event) {
var dispatchListener = event._dispatchListeners,
dispatchInstance = event._dispatchInstances;
- if (Array.isArray(dispatchListener))
+ if (isArrayImpl(dispatchListener))
throw Error("executeDirectDispatch(...): Invalid `event`.");
event.currentTarget = dispatchListener
? getNodeFromInstance(dispatchInstance)
@@ -336,9 +337,9 @@ function accumulate(current, next) {
);
return null == current
? next
- : Array.isArray(current)
+ : isArrayImpl(current)
? current.concat(next)
- : Array.isArray(next)
+ : isArrayImpl(next)
? [current].concat(next)
: [current, next];
}
@@ -348,12 +349,12 @@ function accumulateInto(current, next) {
"accumulateInto(...): Accumulated items must not be null or undefined."
);
if (null == current) return next;
- if (Array.isArray(current)) {
- if (Array.isArray(next)) return current.push.apply(current, next), current;
+ if (isArrayImpl(current)) {
+ if (isArrayImpl(next)) return current.push.apply(current, next), current;
current.push(next);
return current;
}
- return Array.isArray(next) ? [current].concat(next) : [current, next];
+ return isArrayImpl(next) ? [current].concat(next) : [current, next];
}
function forEachAccumulated(arr, cb, scope) {
Array.isArray(arr) ? arr.forEach(cb, scope) : arr && cb.call(scope, arr);
@@ -579,7 +580,7 @@ var ResponderEventPlugin = {
b: {
JSCompiler_temp = shouldSetEventType._dispatchListeners;
targetInst = shouldSetEventType._dispatchInstances;
- if (Array.isArray(JSCompiler_temp))
+ if (isArrayImpl(JSCompiler_temp))
for (
depthA = 0;
depthA < JSCompiler_temp.length &&
@@ -930,7 +931,7 @@ eventPluginOrder = Array.prototype.slice.call([
"ReactNativeBridgeEventPlugin"
]);
recomputePluginOrdering();
-var injectedNamesToPlugins$jscomp$inline_220 = {
+var injectedNamesToPlugins$jscomp$inline_221 = {
ResponderEventPlugin: ResponderEventPlugin,
ReactNativeBridgeEventPlugin: {
eventTypes: {},
@@ -965,34 +966,34 @@ var injectedNamesToPlugins$jscomp$inline_220 = {
}
}
},
- isOrderingDirty$jscomp$inline_221 = !1,
- pluginName$jscomp$inline_222;
-for (pluginName$jscomp$inline_222 in injectedNamesToPlugins$jscomp$inline_220)
+ isOrderingDirty$jscomp$inline_222 = !1,
+ pluginName$jscomp$inline_223;
+for (pluginName$jscomp$inline_223 in injectedNamesToPlugins$jscomp$inline_221)
if (
- injectedNamesToPlugins$jscomp$inline_220.hasOwnProperty(
- pluginName$jscomp$inline_222
+ injectedNamesToPlugins$jscomp$inline_221.hasOwnProperty(
+ pluginName$jscomp$inline_223
)
) {
- var pluginModule$jscomp$inline_223 =
- injectedNamesToPlugins$jscomp$inline_220[pluginName$jscomp$inline_222];
+ var pluginModule$jscomp$inline_224 =
+ injectedNamesToPlugins$jscomp$inline_221[pluginName$jscomp$inline_223];
if (
- !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_222) ||
- namesToPlugins[pluginName$jscomp$inline_222] !==
- pluginModule$jscomp$inline_223
+ !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_223) ||
+ namesToPlugins[pluginName$jscomp$inline_223] !==
+ pluginModule$jscomp$inline_224
) {
- if (namesToPlugins[pluginName$jscomp$inline_222])
+ if (namesToPlugins[pluginName$jscomp$inline_223])
throw Error(
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
- pluginName$jscomp$inline_222 +
+ pluginName$jscomp$inline_223 +
"`."
);
namesToPlugins[
- pluginName$jscomp$inline_222
- ] = pluginModule$jscomp$inline_223;
- isOrderingDirty$jscomp$inline_221 = !0;
+ pluginName$jscomp$inline_223
+ ] = pluginModule$jscomp$inline_224;
+ isOrderingDirty$jscomp$inline_222 = !0;
}
}
-isOrderingDirty$jscomp$inline_221 && recomputePluginOrdering();
+isOrderingDirty$jscomp$inline_222 && recomputePluginOrdering();
function getInstanceFromInstance(instanceHandle) {
return instanceHandle;
}
@@ -1007,7 +1008,8 @@ getNodeFromInstance = function(inst) {
};
ResponderEventPlugin.injection.injectGlobalResponderHandler({
onChange: function(from, to, blockNativeResponder) {
- (from || to).stateNode.canonical._internalInstanceHandle ||
+ ((from = (from = from || to) && from.stateNode) &&
+ from.canonical._internalInstanceHandle) ||
(null !== to
? ReactNativePrivateInterface.UIManager.setJSResponder(
to.stateNode.canonical._nativeTag,
@@ -1308,7 +1310,7 @@ function restoreDeletedValuesInNestedArray(
node,
validAttributes
) {
- if (Array.isArray(node))
+ if (isArrayImpl(node))
for (var i = node.length; i-- && 0 < removedKeyCount; )
restoreDeletedValuesInNestedArray(
updatePayload,
@@ -1354,9 +1356,9 @@ function diffNestedProperty(
: prevProp
? clearNestedProperty(updatePayload, prevProp, validAttributes)
: updatePayload;
- if (!Array.isArray(prevProp) && !Array.isArray(nextProp))
+ if (!isArrayImpl(prevProp) && !isArrayImpl(nextProp))
return diffProperties(updatePayload, prevProp, nextProp, validAttributes);
- if (Array.isArray(prevProp) && Array.isArray(nextProp)) {
+ if (isArrayImpl(prevProp) && isArrayImpl(nextProp)) {
var minLength =
prevProp.length < nextProp.length ? prevProp.length : nextProp.length,
i;
@@ -1381,7 +1383,7 @@ function diffNestedProperty(
);
return updatePayload;
}
- return Array.isArray(prevProp)
+ return isArrayImpl(prevProp)
? diffProperties(
updatePayload,
ReactNativePrivateInterface.flattenStyle(prevProp),
@@ -1397,7 +1399,7 @@ function diffNestedProperty(
}
function addNestedProperty(updatePayload, nextProp, validAttributes) {
if (!nextProp) return updatePayload;
- if (!Array.isArray(nextProp))
+ if (!isArrayImpl(nextProp))
return diffProperties(
updatePayload,
emptyObject,
@@ -1414,7 +1416,7 @@ function addNestedProperty(updatePayload, nextProp, validAttributes) {
}
function clearNestedProperty(updatePayload, prevProp, validAttributes) {
if (!prevProp) return updatePayload;
- if (!Array.isArray(prevProp))
+ if (!isArrayImpl(prevProp))
return diffProperties(
updatePayload,
prevProp,
@@ -1532,7 +1534,7 @@ function executeDispatchesAndReleaseTopLevel(e) {
if (e) {
var dispatchListeners = e._dispatchListeners,
dispatchInstances = e._dispatchInstances;
- if (Array.isArray(dispatchListeners))
+ if (isArrayImpl(dispatchListeners))
for (
var i = 0;
i < dispatchListeners.length && !e.isPropagationStopped();
@@ -1592,6 +1594,53 @@ function dispatchEvent(target, topLevelType, nativeEvent) {
}
});
}
+var scheduleCallback = Scheduler.unstable_scheduleCallback,
+ cancelCallback = Scheduler.unstable_cancelCallback,
+ shouldYield = Scheduler.unstable_shouldYield,
+ requestPaint = Scheduler.unstable_requestPaint,
+ now = Scheduler.unstable_now,
+ ImmediatePriority = Scheduler.unstable_ImmediatePriority,
+ UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
+ NormalPriority = Scheduler.unstable_NormalPriority,
+ IdlePriority = Scheduler.unstable_IdlePriority;
+if (
+ null == tracing.__interactionsRef ||
+ null == tracing.__interactionsRef.current
+)
+ throw Error(
+ "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling"
+ );
+var rendererID = null,
+ injectedHook = 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 1:
+ var schedulerPriority = ImmediatePriority;
+ break;
+ case 4:
+ schedulerPriority = UserBlockingPriority;
+ break;
+ case 16:
+ schedulerPriority = NormalPriority;
+ break;
+ case 536870912:
+ schedulerPriority = IdlePriority;
+ break;
+ default:
+ schedulerPriority = NormalPriority;
+ }
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ root,
+ schedulerPriority,
+ didError
+ );
+ } catch (err) {}
+}
var nextTransitionLane = 64,
nextRetryLane = 4194304;
function getHighestPriorityLanes(lanes) {
@@ -1906,7 +1955,8 @@ function describeFunctionComponentFrame(fn, source) {
? describeComponentFrame(fn.displayName || fn.name || null, source, null)
: "";
}
-var valueStack = [],
+var hasOwnProperty = Object.prototype.hasOwnProperty,
+ valueStack = [],
index = -1;
function createCursor(defaultValue) {
return { current: defaultValue };
@@ -2002,53 +2052,6 @@ function invalidateContextProvider(workInProgress, type, didChange) {
: pop(didPerformWorkStackCursor);
push(didPerformWorkStackCursor, didChange);
}
-var scheduleCallback = Scheduler.unstable_scheduleCallback,
- cancelCallback = Scheduler.unstable_cancelCallback,
- shouldYield = Scheduler.unstable_shouldYield,
- requestPaint = Scheduler.unstable_requestPaint,
- now = Scheduler.unstable_now,
- ImmediatePriority = Scheduler.unstable_ImmediatePriority,
- UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
- NormalPriority = Scheduler.unstable_NormalPriority,
- IdlePriority = Scheduler.unstable_IdlePriority;
-if (
- null == tracing.__interactionsRef ||
- null == tracing.__interactionsRef.current
-)
- throw Error(
- "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling"
- );
-var rendererID = null,
- injectedHook = 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 1:
- var schedulerPriority = ImmediatePriority;
- break;
- case 4:
- schedulerPriority = UserBlockingPriority;
- break;
- case 16:
- schedulerPriority = NormalPriority;
- break;
- case 536870912:
- schedulerPriority = IdlePriority;
- break;
- default:
- schedulerPriority = NormalPriority;
- }
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- schedulerPriority,
- didError
- );
- } catch (err) {}
-}
var syncQueue = null,
isFlushingSyncQueue = !1;
function flushSyncCallbackQueue() {
@@ -2079,8 +2082,7 @@ var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
function is(x, y) {
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
}
-var objectIs = "function" === typeof Object.is ? Object.is : is,
- hasOwnProperty = Object.prototype.hasOwnProperty;
+var objectIs = "function" === typeof Object.is ? Object.is : is;
function shallowEqual(objA, objB) {
if (objectIs(objA, objB)) return !0;
if (
@@ -2573,7 +2575,6 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
? previousContext
: contextStackCursor.current),
(instance.context = getMaskedContext(workInProgress, contextType)));
- processUpdateQueue(workInProgress, newProps, instance, renderLanes);
instance.state = workInProgress.memoizedState;
contextType = ctor.getDerivedStateFromProps;
"function" === typeof contextType &&
@@ -2595,7 +2596,6 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
"function" === typeof instance.componentDidMount &&
(workInProgress.flags |= 4);
}
-var isArray = Array.isArray;
function coerceRef(returnFiber, current, element) {
returnFiber = element.ref;
if (
@@ -2648,15 +2648,14 @@ function coerceRef(returnFiber, current, element) {
return returnFiber;
}
function throwOnInvalidObjectType(returnFiber, newChild) {
- if ("textarea" !== returnFiber.type)
- throw ((returnFiber = Object.prototype.toString.call(newChild)),
- Error(
- "Objects are not valid as a React child (found: " +
- ("[object Object]" === returnFiber
- ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
- : returnFiber) +
- "). If you meant to render a collection of children, use an array instead."
- ));
+ returnFiber = Object.prototype.toString.call(newChild);
+ throw Error(
+ "Objects are not valid as a React child (found: " +
+ ("[object Object]" === returnFiber
+ ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
+ : returnFiber) +
+ "). If you meant to render a collection of children, use an array instead."
+ );
}
function ChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
@@ -2818,7 +2817,7 @@ function ChildReconciler(shouldTrackSideEffects) {
newChild
);
}
- if (isArray(newChild) || getIteratorFn(newChild))
+ if (isArrayImpl(newChild) || getIteratorFn(newChild))
return (
(newChild = createFiberFromFragment(
newChild,
@@ -2850,7 +2849,7 @@ function ChildReconciler(shouldTrackSideEffects) {
? updatePortal(returnFiber, oldFiber, newChild, lanes)
: null;
}
- if (isArray(newChild) || getIteratorFn(newChild))
+ if (isArrayImpl(newChild) || getIteratorFn(newChild))
return null !== key
? null
: updateFragment(returnFiber, oldFiber, newChild, lanes, null);
@@ -2889,7 +2888,7 @@ function ChildReconciler(shouldTrackSideEffects) {
updatePortal(returnFiber, existingChildren, newChild, lanes)
);
}
- if (isArray(newChild) || getIteratorFn(newChild))
+ if (isArrayImpl(newChild) || getIteratorFn(newChild))
return (
(existingChildren = existingChildren.get(newIdx) || null),
updateFragment(returnFiber, existingChildren, newChild, lanes, null)
@@ -3072,20 +3071,19 @@ function ChildReconciler(shouldTrackSideEffects) {
newChild.type === REACT_FRAGMENT_TYPE &&
null === newChild.key;
isUnkeyedTopLevelFragment && (newChild = newChild.props.children);
- var isObject = "object" === typeof newChild && null !== newChild;
- if (isObject)
+ if ("object" === typeof newChild && null !== newChild) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
a: {
- isObject = newChild.key;
+ var key = newChild.key;
for (
isUnkeyedTopLevelFragment = currentFirstChild;
null !== isUnkeyedTopLevelFragment;
) {
- if (isUnkeyedTopLevelFragment.key === isObject) {
- isObject = newChild.type;
- if (isObject === REACT_FRAGMENT_TYPE) {
+ if (isUnkeyedTopLevelFragment.key === key) {
+ key = newChild.type;
+ if (key === REACT_FRAGMENT_TYPE) {
if (7 === isUnkeyedTopLevelFragment.tag) {
deleteRemainingChildren(
returnFiber,
@@ -3099,7 +3097,7 @@ function ChildReconciler(shouldTrackSideEffects) {
returnFiber = currentFirstChild;
break a;
}
- } else if (isUnkeyedTopLevelFragment.elementType === isObject) {
+ } else if (isUnkeyedTopLevelFragment.elementType === key) {
deleteRemainingChildren(
returnFiber,
isUnkeyedTopLevelFragment.sibling
@@ -3191,6 +3189,22 @@ function ChildReconciler(shouldTrackSideEffects) {
}
return placeSingleChild(returnFiber);
}
+ if (isArrayImpl(newChild))
+ return reconcileChildrenArray(
+ returnFiber,
+ currentFirstChild,
+ newChild,
+ lanes
+ );
+ if (getIteratorFn(newChild))
+ return reconcileChildrenIterator(
+ returnFiber,
+ currentFirstChild,
+ newChild,
+ lanes
+ );
+ throwOnInvalidObjectType(returnFiber, newChild);
+ }
if ("string" === typeof newChild || "number" === typeof newChild)
return (
(newChild = "" + newChild),
@@ -3209,21 +3223,6 @@ function ChildReconciler(shouldTrackSideEffects) {
(returnFiber = currentFirstChild)),
placeSingleChild(returnFiber)
);
- if (isArray(newChild))
- return reconcileChildrenArray(
- returnFiber,
- currentFirstChild,
- newChild,
- lanes
- );
- if (getIteratorFn(newChild))
- return reconcileChildrenIterator(
- returnFiber,
- currentFirstChild,
- newChild,
- lanes
- );
- isObject && throwOnInvalidObjectType(returnFiber, newChild);
if ("undefined" === typeof newChild && !isUnkeyedTopLevelFragment)
switch (returnFiber.tag) {
case 1:
@@ -3688,7 +3687,7 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
hook.memoizedState = pushEffect(1 | hookFlags, create, destroy, deps);
}
function mountEffect(create, deps) {
- return mountEffectImpl(263168, 4, create, deps);
+ return mountEffectImpl(1049600, 4, create, deps);
}
function updateEffect(create, deps) {
return updateEffectImpl(1024, 4, create, deps);
@@ -4712,7 +4711,7 @@ function updateSuspenseFallbackChildren(
(primaryChildren.treeBaseDuration = current.treeBaseDuration)),
(workInProgress.deletions = null))
: ((primaryChildren = createWorkInProgress(current, primaryChildProps)),
- (primaryChildren.subtreeFlags = current.subtreeFlags & 262144));
+ (primaryChildren.subtreeFlags = current.subtreeFlags & 1835008));
null !== currentFallbackChildFragment
? (fallbackChildren = createWorkInProgress(
currentFallbackChildFragment,
@@ -5073,14 +5072,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
break;
case "collapsed":
lastTailNode = renderState.tail;
- for (var lastTailNode$63 = null; null !== lastTailNode; )
- null !== lastTailNode.alternate && (lastTailNode$63 = lastTailNode),
+ for (var lastTailNode$65 = null; null !== lastTailNode; )
+ null !== lastTailNode.alternate && (lastTailNode$65 = lastTailNode),
(lastTailNode = lastTailNode.sibling);
- null === lastTailNode$63
+ null === lastTailNode$65
? hasRenderedATailFallback || null === renderState.tail
? (renderState.tail = null)
: (renderState.tail.sibling = null)
- : (lastTailNode$63.sibling = null);
+ : (lastTailNode$65.sibling = null);
}
}
function bubbleProperties(completedWork) {
@@ -5092,53 +5091,53 @@ function bubbleProperties(completedWork) {
if (didBailout)
if (0 !== (completedWork.mode & 2)) {
for (
- var treeBaseDuration$65 = completedWork.selfBaseDuration,
- child$66 = completedWork.child;
- null !== child$66;
+ var treeBaseDuration$67 = completedWork.selfBaseDuration,
+ child$68 = completedWork.child;
+ null !== child$68;
)
- (newChildLanes |= child$66.lanes | child$66.childLanes),
- (subtreeFlags |= child$66.subtreeFlags & 262144),
- (subtreeFlags |= child$66.flags & 262144),
- (treeBaseDuration$65 += child$66.treeBaseDuration),
- (child$66 = child$66.sibling);
- completedWork.treeBaseDuration = treeBaseDuration$65;
+ (newChildLanes |= child$68.lanes | child$68.childLanes),
+ (subtreeFlags |= child$68.subtreeFlags & 1835008),
+ (subtreeFlags |= child$68.flags & 1835008),
+ (treeBaseDuration$67 += child$68.treeBaseDuration),
+ (child$68 = child$68.sibling);
+ completedWork.treeBaseDuration = treeBaseDuration$67;
} else
for (
- treeBaseDuration$65 = completedWork.child;
- null !== treeBaseDuration$65;
+ treeBaseDuration$67 = completedWork.child;
+ null !== treeBaseDuration$67;
)
(newChildLanes |=
- treeBaseDuration$65.lanes | treeBaseDuration$65.childLanes),
- (subtreeFlags |= treeBaseDuration$65.subtreeFlags & 262144),
- (subtreeFlags |= treeBaseDuration$65.flags & 262144),
- (treeBaseDuration$65.return = completedWork),
- (treeBaseDuration$65 = treeBaseDuration$65.sibling);
+ treeBaseDuration$67.lanes | treeBaseDuration$67.childLanes),
+ (subtreeFlags |= treeBaseDuration$67.subtreeFlags & 1835008),
+ (subtreeFlags |= treeBaseDuration$67.flags & 1835008),
+ (treeBaseDuration$67.return = completedWork),
+ (treeBaseDuration$67 = treeBaseDuration$67.sibling);
else if (0 !== (completedWork.mode & 2)) {
- treeBaseDuration$65 = completedWork.actualDuration;
- child$66 = completedWork.selfBaseDuration;
+ treeBaseDuration$67 = completedWork.actualDuration;
+ child$68 = completedWork.selfBaseDuration;
for (var child = completedWork.child; null !== child; )
(newChildLanes |= child.lanes | child.childLanes),
(subtreeFlags |= child.subtreeFlags),
(subtreeFlags |= child.flags),
- (treeBaseDuration$65 += child.actualDuration),
- (child$66 += child.treeBaseDuration),
+ (treeBaseDuration$67 += child.actualDuration),
+ (child$68 += child.treeBaseDuration),
(child = child.sibling);
- completedWork.actualDuration = treeBaseDuration$65;
- completedWork.treeBaseDuration = child$66;
+ completedWork.actualDuration = treeBaseDuration$67;
+ completedWork.treeBaseDuration = child$68;
} else
for (
- treeBaseDuration$65 = completedWork.child;
- null !== treeBaseDuration$65;
+ treeBaseDuration$67 = completedWork.child;
+ null !== treeBaseDuration$67;
)
(newChildLanes |=
- treeBaseDuration$65.lanes | treeBaseDuration$65.childLanes),
- (subtreeFlags |= treeBaseDuration$65.subtreeFlags),
- (subtreeFlags |= treeBaseDuration$65.flags),
- (treeBaseDuration$65.return = completedWork),
- (treeBaseDuration$65 = treeBaseDuration$65.sibling);
+ treeBaseDuration$67.lanes | treeBaseDuration$67.childLanes),
+ (subtreeFlags |= treeBaseDuration$67.subtreeFlags),
+ (subtreeFlags |= treeBaseDuration$67.flags),
+ (treeBaseDuration$67.return = completedWork),
+ (treeBaseDuration$67 = treeBaseDuration$67.sibling);
completedWork.subtreeFlags |= subtreeFlags;
completedWork.childLanes = newChildLanes;
return didBailout;
@@ -5345,7 +5344,7 @@ function completeWork(current, workInProgress, renderLanes) {
for (newProps = workInProgress.child; null !== newProps; )
(renderLanes = newProps),
(updatePayload = current),
- (renderLanes.flags &= 262146),
+ (renderLanes.flags &= 1835010),
(type = renderLanes.alternate),
null === type
? ((renderLanes.childLanes = 0),
@@ -5729,8 +5728,8 @@ function commitHookEffectListMount(tag, finishedWork) {
var effect = (finishedWork = finishedWork.next);
do {
if ((effect.tag & tag) === tag) {
- var create$84 = effect.create;
- effect.destroy = create$84();
+ var create$86 = effect.create;
+ effect.destroy = create$86();
}
effect = effect.next;
} while (effect !== finishedWork);
@@ -5986,8 +5985,8 @@ function commitLayoutEffects(finishedWork, root) {
commitUpdateQueue(fiber$jscomp$0, updateQueue, instance);
break;
case 3:
- var updateQueue$85 = fiber$jscomp$0.updateQueue;
- if (null !== updateQueue$85) {
+ var updateQueue$87 = fiber$jscomp$0.updateQueue;
+ if (null !== updateQueue$87) {
finishedRoot = null;
if (null !== fiber$jscomp$0.child)
switch (fiber$jscomp$0.child.tag) {
@@ -6000,7 +5999,7 @@ function commitLayoutEffects(finishedWork, root) {
}
commitUpdateQueue(
fiber$jscomp$0,
- updateQueue$85,
+ updateQueue$87,
finishedRoot
);
}
@@ -6014,7 +6013,7 @@ function commitLayoutEffects(finishedWork, root) {
break;
case 12:
var onRender = fiber$jscomp$0.memoizedProps.onRender,
- commitTime$88 = commitTime;
+ commitTime$90 = commitTime;
current = null === current ? "mount" : "update";
"function" === typeof onRender &&
onRender(
@@ -6023,7 +6022,7 @@ function commitLayoutEffects(finishedWork, root) {
fiber$jscomp$0.actualDuration,
fiber$jscomp$0.treeBaseDuration,
fiber$jscomp$0.actualStartTime,
- commitTime$88,
+ commitTime$90,
finishedRoot.memoizedInteractions
);
break;
@@ -6082,6 +6081,7 @@ function commitLayoutEffects(finishedWork, root) {
var ceil = Math.ceil,
ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
+ ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig,
executionContext = 0,
workInProgressRoot = null,
workInProgress = null,
@@ -6542,15 +6542,15 @@ function handleError(root$jscomp$0, thrownValue) {
}
var hasInvisibleParentBoundary =
0 !== (suspenseStackCursor.current & 1),
- workInProgress$79 = returnFiber;
+ workInProgress$81 = returnFiber;
do {
var JSCompiler_temp;
- if ((JSCompiler_temp = 13 === workInProgress$79.tag)) {
- var nextState = workInProgress$79.memoizedState;
+ if ((JSCompiler_temp = 13 === workInProgress$81.tag)) {
+ var nextState = workInProgress$81.memoizedState;
if (null !== nextState)
JSCompiler_temp = null !== nextState.dehydrated ? !0 : !1;
else {
- var props = workInProgress$79.memoizedProps;
+ var props = workInProgress$81.memoizedProps;
JSCompiler_temp =
void 0 === props.fallback
? !1
@@ -6562,17 +6562,17 @@ function handleError(root$jscomp$0, thrownValue) {
}
}
if (JSCompiler_temp) {
- var wakeables = workInProgress$79.updateQueue;
+ var wakeables = workInProgress$81.updateQueue;
if (null === wakeables) {
var updateQueue = new Set();
updateQueue.add(wakeable);
- workInProgress$79.updateQueue = updateQueue;
+ workInProgress$81.updateQueue = updateQueue;
} else wakeables.add(wakeable);
if (
- 0 === (workInProgress$79.mode & 1) &&
- workInProgress$79 !== returnFiber
+ 0 === (workInProgress$81.mode & 1) &&
+ workInProgress$81 !== returnFiber
) {
- workInProgress$79.flags |= 128;
+ workInProgress$81.flags |= 128;
sourceFiber.flags |= 32768;
sourceFiber.flags &= -10053;
if (1 === sourceFiber.tag)
@@ -6605,12 +6605,12 @@ function handleError(root$jscomp$0, thrownValue) {
);
wakeable.then(ping, ping);
}
- workInProgress$79.flags |= 16384;
- workInProgress$79.lanes = thrownValue;
+ workInProgress$81.flags |= 16384;
+ workInProgress$81.lanes = thrownValue;
break a;
}
- workInProgress$79 = workInProgress$79.return;
- } while (null !== workInProgress$79);
+ workInProgress$81 = workInProgress$81.return;
+ } while (null !== workInProgress$81);
value = Error(
(getComponentNameFromFiber(sourceFiber) || "A React component") +
" suspended while rendering, but no fallback UI was specified.\n\nAdd a component higher in the tree to provide a loading indicator or placeholder to display."
@@ -6619,47 +6619,47 @@ function handleError(root$jscomp$0, thrownValue) {
5 !== workInProgressRootExitStatus &&
(workInProgressRootExitStatus = 2);
value = createCapturedValue(value, sourceFiber);
- workInProgress$79 = returnFiber;
+ workInProgress$81 = returnFiber;
do {
- switch (workInProgress$79.tag) {
+ switch (workInProgress$81.tag) {
case 3:
root = value;
- workInProgress$79.flags |= 16384;
+ workInProgress$81.flags |= 16384;
thrownValue &= -thrownValue;
- workInProgress$79.lanes |= thrownValue;
- var update$80 = createRootErrorUpdate(
- workInProgress$79,
+ workInProgress$81.lanes |= thrownValue;
+ var update$82 = createRootErrorUpdate(
+ workInProgress$81,
root,
thrownValue
);
- enqueueCapturedUpdate(workInProgress$79, update$80);
+ enqueueCapturedUpdate(workInProgress$81, update$82);
break a;
case 1:
root = value;
- var ctor = workInProgress$79.type,
- instance = workInProgress$79.stateNode;
+ var ctor = workInProgress$81.type,
+ instance = workInProgress$81.stateNode;
if (
- 0 === (workInProgress$79.flags & 128) &&
+ 0 === (workInProgress$81.flags & 128) &&
("function" === typeof ctor.getDerivedStateFromError ||
(null !== instance &&
"function" === typeof instance.componentDidCatch &&
(null === legacyErrorBoundariesThatAlreadyFailed ||
!legacyErrorBoundariesThatAlreadyFailed.has(instance))))
) {
- workInProgress$79.flags |= 16384;
+ workInProgress$81.flags |= 16384;
thrownValue &= -thrownValue;
- workInProgress$79.lanes |= thrownValue;
- var update$83 = createClassErrorUpdate(
- workInProgress$79,
+ workInProgress$81.lanes |= thrownValue;
+ var update$85 = createClassErrorUpdate(
+ workInProgress$81,
root,
thrownValue
);
- enqueueCapturedUpdate(workInProgress$79, update$83);
+ enqueueCapturedUpdate(workInProgress$81, update$85);
break a;
}
}
- workInProgress$79 = workInProgress$79.return;
- } while (null !== workInProgress$79);
+ workInProgress$81 = workInProgress$81.return;
+ } while (null !== workInProgress$81);
}
completeUnitOfWork(erroredWork);
} catch (yetAnotherThrownValue) {
@@ -6778,12 +6778,15 @@ function completeUnitOfWork(unitOfWork) {
0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);
}
function commitRoot(root) {
- var previousUpdateLanePriority = currentUpdatePriority;
+ var previousUpdateLanePriority = currentUpdatePriority,
+ prevTransition = ReactCurrentBatchConfig$2.transition;
try {
- (currentUpdatePriority = 1),
+ (ReactCurrentBatchConfig$2.transition = 0),
+ (currentUpdatePriority = 1),
commitRootImpl(root, previousUpdateLanePriority);
} finally {
- currentUpdatePriority = previousUpdateLanePriority;
+ (ReactCurrentBatchConfig$2.transition = prevTransition),
+ (currentUpdatePriority = previousUpdateLanePriority);
}
return null;
}
@@ -6818,7 +6821,9 @@ function commitRootImpl(root, renderPriorityLevel) {
}));
remainingLanes = 0 !== (finishedWork.flags & 8054);
if (0 !== (finishedWork.subtreeFlags & 8054) || remainingLanes) {
- remainingLanes = currentUpdatePriority;
+ remainingLanes = ReactCurrentBatchConfig$2.transition;
+ ReactCurrentBatchConfig$2.transition = 0;
+ var previousPriority = currentUpdatePriority;
currentUpdatePriority = 1;
var prevExecutionContext = executionContext;
executionContext |= 16;
@@ -6832,27 +6837,31 @@ function commitRootImpl(root, renderPriorityLevel) {
requestPaint();
tracing.__interactionsRef.current = prevInteractions;
executionContext = prevExecutionContext;
- currentUpdatePriority = remainingLanes;
+ currentUpdatePriority = previousPriority;
+ ReactCurrentBatchConfig$2.transition = remainingLanes;
} else (root.current = finishedWork), (commitTime = now$1());
- if ((prevExecutionContext = rootDoesHavePassiveEffects))
+ if ((previousPriority = rootDoesHavePassiveEffects))
(rootDoesHavePassiveEffects = !1),
(rootWithPendingPassiveEffects = root),
(pendingPassiveEffectsLanes = lanes);
remainingLanes = root.pendingLanes;
if (0 !== remainingLanes) {
- if (null !== spawnedWorkDuringRender) {
- prevInteractions = spawnedWorkDuringRender;
- spawnedWorkDuringRender = null;
- for (var i = 0; i < prevInteractions.length; i++)
+ if (null !== spawnedWorkDuringRender)
+ for (
+ prevExecutionContext = spawnedWorkDuringRender,
+ spawnedWorkDuringRender = null,
+ prevInteractions = 0;
+ prevInteractions < prevExecutionContext.length;
+ prevInteractions++
+ )
scheduleInteractions(
root,
- prevInteractions[i],
+ prevExecutionContext[prevInteractions],
root.memoizedInteractions
);
- }
schedulePendingInteractions(root, remainingLanes);
} else legacyErrorBoundariesThatAlreadyFailed = null;
- prevExecutionContext || finishPendingInteractions(root, lanes);
+ previousPriority || finishPendingInteractions(root, lanes);
0 !== (remainingLanes & 1)
? root === rootWithNestedUpdates
? nestedUpdateCount++
@@ -6866,19 +6875,24 @@ function commitRootImpl(root, renderPriorityLevel) {
(firstUncaughtError = null),
root);
if (0 !== (executionContext & 4)) return null;
+ 0 !== (pendingPassiveEffectsLanes & 1) &&
+ 0 !== root.tag &&
+ flushPassiveEffects();
flushSyncCallbackQueue();
return null;
}
function flushPassiveEffects() {
- if (0 !== pendingPassiveEffectsLanes) {
- var b = lanesToEventPriority(pendingPassiveEffectsLanes),
+ if (null !== rootWithPendingPassiveEffects) {
+ var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
+ prevTransition = ReactCurrentBatchConfig$2.transition,
previousPriority = currentUpdatePriority;
try {
- currentUpdatePriority = 16 < b ? 16 : b;
+ ReactCurrentBatchConfig$2.transition = 0;
+ currentUpdatePriority = 16 > renderPriority ? 16 : renderPriority;
if (null === rootWithPendingPassiveEffects)
var JSCompiler_inline_result = !1;
else {
- b = rootWithPendingPassiveEffects;
+ renderPriority = rootWithPendingPassiveEffects;
var lanes = pendingPassiveEffectsLanes;
rootWithPendingPassiveEffects = null;
pendingPassiveEffectsLanes = 0;
@@ -6886,8 +6900,8 @@ function flushPassiveEffects() {
throw Error("Cannot flush passive effects while already rendering.");
var prevExecutionContext = executionContext;
executionContext |= 16;
- var prevInteractions = pushInteractions(b);
- for (nextEffect = b.current; null !== nextEffect; ) {
+ var prevInteractions = pushInteractions(renderPriority);
+ for (nextEffect = renderPriority.current; null !== nextEffect; ) {
var fiber = nextEffect,
child = fiber.child;
if (0 !== (nextEffect.flags & 16)) {
@@ -6962,7 +6976,7 @@ function flushPassiveEffects() {
nextEffect = fiber.return;
}
}
- var finishedWork = b.current;
+ var finishedWork = renderPriority.current;
for (nextEffect = finishedWork; null !== nextEffect; ) {
child = nextEffect;
var firstChild = child.child;
@@ -6996,14 +7010,22 @@ function flushPassiveEffects() {
}
}
tracing.__interactionsRef.current = prevInteractions;
- finishPendingInteractions(b, lanes);
+ finishPendingInteractions(renderPriority, lanes);
executionContext = prevExecutionContext;
flushSyncCallbackQueue();
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, renderPriority);
+ } catch (err) {}
JSCompiler_inline_result = !0;
}
return JSCompiler_inline_result;
} finally {
- currentUpdatePriority = previousPriority;
+ (currentUpdatePriority = previousPriority),
+ (ReactCurrentBatchConfig$2.transition = prevTransition);
}
}
return !1;
@@ -7230,14 +7252,6 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
? nextValue.state
: null;
initializeUpdateQueue(workInProgress);
- var getDerivedStateFromProps = updateLanes.getDerivedStateFromProps;
- "function" === typeof getDerivedStateFromProps &&
- applyDerivedStateFromProps(
- workInProgress,
- updateLanes,
- getDerivedStateFromProps,
- current
- );
nextValue.updater = classComponentUpdater;
workInProgress.stateNode = nextValue;
nextValue._reactInternals = workInProgress;
@@ -7453,11 +7467,11 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
updateLanes = workInProgress.type._context;
nextValue = workInProgress.pendingProps;
hasContext = workInProgress.memoizedProps;
- getDerivedStateFromProps = nextValue.value;
+ var newValue = nextValue.value;
push(valueCursor, updateLanes._currentValue2);
- updateLanes._currentValue2 = getDerivedStateFromProps;
+ updateLanes._currentValue2 = newValue;
if (null !== hasContext)
- if (objectIs(hasContext.value, getDerivedStateFromProps)) {
+ if (objectIs(hasContext.value, newValue)) {
if (
hasContext.children === nextValue.children &&
!didPerformWorkStackCursor.current
@@ -7471,25 +7485,24 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
}
} else
for (
- getDerivedStateFromProps = workInProgress.child,
- null !== getDerivedStateFromProps &&
- (getDerivedStateFromProps.return = workInProgress);
- null !== getDerivedStateFromProps;
+ newValue = workInProgress.child,
+ null !== newValue && (newValue.return = workInProgress);
+ null !== newValue;
) {
- var list = getDerivedStateFromProps.dependencies;
+ var list = newValue.dependencies;
if (null !== list) {
- hasContext = getDerivedStateFromProps.child;
+ hasContext = newValue.child;
for (
var dependency = list.firstContext;
null !== dependency;
) {
if (dependency.context === updateLanes) {
- if (1 === getDerivedStateFromProps.tag) {
+ if (1 === newValue.tag) {
dependency = createUpdate(-1, renderLanes & -renderLanes);
dependency.tag = 2;
- var updateQueue = getDerivedStateFromProps.updateQueue;
+ var updateQueue = newValue.updateQueue;
if (null !== updateQueue) {
updateQueue = updateQueue.shared;
var pending = updateQueue.pending;
@@ -7500,13 +7513,10 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
updateQueue.pending = dependency;
}
}
- getDerivedStateFromProps.lanes |= renderLanes;
- dependency = getDerivedStateFromProps.alternate;
+ newValue.lanes |= renderLanes;
+ dependency = newValue.alternate;
null !== dependency && (dependency.lanes |= renderLanes);
- scheduleWorkOnParentPath(
- getDerivedStateFromProps.return,
- renderLanes
- );
+ scheduleWorkOnParentPath(newValue.return, renderLanes);
list.lanes |= renderLanes;
break;
}
@@ -7514,32 +7524,27 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
}
} else
hasContext =
- 10 === getDerivedStateFromProps.tag
- ? getDerivedStateFromProps.type === workInProgress.type
+ 10 === newValue.tag
+ ? newValue.type === workInProgress.type
? null
- : getDerivedStateFromProps.child
- : getDerivedStateFromProps.child;
- if (null !== hasContext)
- hasContext.return = getDerivedStateFromProps;
+ : newValue.child
+ : newValue.child;
+ if (null !== hasContext) hasContext.return = newValue;
else
- for (
- hasContext = getDerivedStateFromProps;
- null !== hasContext;
-
- ) {
+ for (hasContext = newValue; null !== hasContext; ) {
if (hasContext === workInProgress) {
hasContext = null;
break;
}
- getDerivedStateFromProps = hasContext.sibling;
- if (null !== getDerivedStateFromProps) {
- getDerivedStateFromProps.return = hasContext.return;
- hasContext = getDerivedStateFromProps;
+ newValue = hasContext.sibling;
+ if (null !== newValue) {
+ newValue.return = hasContext.return;
+ hasContext = newValue;
break;
}
hasContext = hasContext.return;
}
- getDerivedStateFromProps = hasContext;
+ newValue = hasContext;
}
reconcileChildren(
current,
@@ -7706,9 +7711,9 @@ function finishPendingInteractions(root, committedLanes) {
if (null !== subscriber && 0 === interaction.__count)
try {
subscriber.onInteractionScheduledWorkCompleted(interaction);
- } catch (error$95) {
+ } catch (error$97) {
scheduleCallback(ImmediatePriority, function() {
- throw error$95;
+ throw error$97;
});
}
}));
@@ -7770,7 +7775,7 @@ function createWorkInProgress(current, pendingProps) {
(workInProgress.deletions = null),
(workInProgress.actualDuration = 0),
(workInProgress.actualStartTime = -1));
- workInProgress.flags = current.flags & 262144;
+ workInProgress.flags = current.flags & 1835008;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -8040,7 +8045,7 @@ batchedUpdatesImpl = function(fn, a) {
}
};
var roots = new Map(),
- devToolsConfig$jscomp$inline_968 = {
+ devToolsConfig$jscomp$inline_969 = {
findFiberByHostInstance: getInstanceFromInstance,
bundleType: 0,
version: "17.0.3",
@@ -8058,11 +8063,11 @@ var roots = new Map(),
}.bind(null, findNodeHandle)
}
};
-var internals$jscomp$inline_1212 = {
- bundleType: devToolsConfig$jscomp$inline_968.bundleType,
- version: devToolsConfig$jscomp$inline_968.version,
- rendererPackageName: devToolsConfig$jscomp$inline_968.rendererPackageName,
- rendererConfig: devToolsConfig$jscomp$inline_968.rendererConfig,
+var internals$jscomp$inline_1216 = {
+ bundleType: devToolsConfig$jscomp$inline_969.bundleType,
+ version: devToolsConfig$jscomp$inline_969.version,
+ rendererPackageName: devToolsConfig$jscomp$inline_969.rendererPackageName,
+ rendererConfig: devToolsConfig$jscomp$inline_969.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -8077,25 +8082,26 @@ var internals$jscomp$inline_1212 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
- devToolsConfig$jscomp$inline_968.findFiberByHostInstance ||
+ devToolsConfig$jscomp$inline_969.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
- getCurrentFiber: null
+ getCurrentFiber: null,
+ reconcilerVersion: "17.0.3"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
- var hook$jscomp$inline_1213 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+ var hook$jscomp$inline_1217 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
- !hook$jscomp$inline_1213.isDisabled &&
- hook$jscomp$inline_1213.supportsFiber
+ !hook$jscomp$inline_1217.isDisabled &&
+ hook$jscomp$inline_1217.supportsFiber
)
try {
- (rendererID = hook$jscomp$inline_1213.inject(
- internals$jscomp$inline_1212
+ (rendererID = hook$jscomp$inline_1217.inject(
+ internals$jscomp$inline_1216
)),
- (injectedHook = hook$jscomp$inline_1213);
+ (injectedHook = hook$jscomp$inline_1217);
} catch (err) {}
}
exports.createPortal = function(children, containerTag) {
diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js
index c9d6478d841574..0b7623b228ca6e 100644
--- a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js
+++ b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<<31b307087773581fd58a1b6ae0a24ae9>>
+ * @generated SignedSource<>
*/
'use strict';
@@ -380,6 +380,12 @@ function clearCaughtError() {
}
}
+var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
+
+function isArray(a) {
+ return isArrayImpl(a);
+}
+
var getFiberCurrentPropsFromNode = null;
var getInstanceFromNode = null;
var getNodeFromInstance = null;
@@ -407,13 +413,13 @@ var validateEventDispatches;
validateEventDispatches = function(event) {
var dispatchListeners = event._dispatchListeners;
var dispatchInstances = event._dispatchInstances;
- var listenersIsArr = Array.isArray(dispatchListeners);
+ var listenersIsArr = isArray(dispatchListeners);
var listenersLen = listenersIsArr
? dispatchListeners.length
: dispatchListeners
? 1
: 0;
- var instancesIsArr = Array.isArray(dispatchInstances);
+ var instancesIsArr = isArray(dispatchInstances);
var instancesLen = instancesIsArr
? dispatchInstances.length
: dispatchInstances
@@ -450,7 +456,7 @@ function executeDispatchesInOrder(event) {
validateEventDispatches(event);
}
- if (Array.isArray(dispatchListeners)) {
+ if (isArray(dispatchListeners)) {
for (var i = 0; i < dispatchListeners.length; i++) {
if (event.isPropagationStopped()) {
break;
@@ -481,7 +487,7 @@ function executeDispatchesInOrderStopAtTrueImpl(event) {
validateEventDispatches(event);
}
- if (Array.isArray(dispatchListeners)) {
+ if (isArray(dispatchListeners)) {
for (var i = 0; i < dispatchListeners.length; i++) {
if (event.isPropagationStopped()) {
break;
@@ -527,7 +533,7 @@ function executeDirectDispatch(event) {
var dispatchListener = event._dispatchListeners;
var dispatchInstance = event._dispatchInstances;
- if (!!Array.isArray(dispatchListener)) {
+ if (!!isArray(dispatchListener)) {
throw Error("executeDirectDispatch(...): Invalid `event`.");
}
@@ -1154,11 +1160,11 @@ function accumulate(current, next) {
} // Both are not empty. Warning: Never call x.concat(y) when you are not
// certain that x is an Array (x could be a string with concat method).
- if (Array.isArray(current)) {
+ if (isArray(current)) {
return current.concat(next);
}
- if (Array.isArray(next)) {
+ if (isArray(next)) {
return [current].concat(next);
}
@@ -1190,8 +1196,8 @@ function accumulateInto(current, next) {
} // Both are not empty. Warning: Never call x.concat(y) when you are not
// certain that x is an Array (x could be a string with concat method).
- if (Array.isArray(current)) {
- if (Array.isArray(next)) {
+ if (isArray(current)) {
+ if (isArray(next)) {
current.push.apply(current, next);
return current;
}
@@ -1200,7 +1206,7 @@ function accumulateInto(current, next) {
return current;
}
- if (Array.isArray(next)) {
+ if (isArray(next)) {
// A bit too dangerous to mutate `next`.
return [current].concat(next);
}
@@ -3120,7 +3126,7 @@ var enableLazyElements = false;
var warnAboutStringRefs = false;
var enableNewReconciler = false;
var deferRenderPhaseUpdateToNextBatch = true;
-var enableLazyContextPropagation = false; // Flow magic to verify the exports of this file match the original version.
+var enableLazyContextPropagation = false;
// Don't change these two values. They're used by React Dev Tools.
var NoFlags =
@@ -3189,9 +3195,15 @@ var ForceUpdateForLegacySuspense =
// since we can defer traversing the tree during layout to look for Passive effects,
// and instead rely on the static flag as a signal that there may be cleanup work.
+var RefStatic =
+ /* */
+ 262144;
+var LayoutStatic =
+ /* */
+ 524288;
var PassiveStatic =
/* */
- 262144; // These flags allow us to traverse to fibers that have effects on mount
+ 1048576; // These flags allow us to traverse to fibers that have effects on mount
// don't contain effects, by checking subtreeFlags.
var BeforeMutationMask = // TODO: Remove Update flag from before mutation phase by re-landing Visiblity
@@ -3211,7 +3223,7 @@ var PassiveMask = Passive | ChildDeletion; // Union of tags that don't get reset
// This allows certain concepts to persist without recalculting them,
// e.g. whether a subtree contains passive effects or portals.
-var StaticMask = PassiveStatic;
+var StaticMask = LayoutStatic | PassiveStatic | RefStatic;
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
function getNearestMountedFiber(fiber) {
@@ -3528,7 +3540,7 @@ function restoreDeletedValuesInNestedArray(
node,
validAttributes
) {
- if (Array.isArray(node)) {
+ if (isArray(node)) {
var i = node.length;
while (i-- && removedKeyCount > 0) {
@@ -3653,12 +3665,12 @@ function diffNestedProperty(
return updatePayload;
}
- if (!Array.isArray(prevProp) && !Array.isArray(nextProp)) {
+ if (!isArray(prevProp) && !isArray(nextProp)) {
// Both are leaves, we can diff the leaves.
return diffProperties(updatePayload, prevProp, nextProp, validAttributes);
}
- if (Array.isArray(prevProp) && Array.isArray(nextProp)) {
+ if (isArray(prevProp) && isArray(nextProp)) {
// Both are arrays, we can diff the arrays.
return diffNestedArrayProperty(
updatePayload,
@@ -3668,7 +3680,7 @@ function diffNestedProperty(
);
}
- if (Array.isArray(prevProp)) {
+ if (isArray(prevProp)) {
return diffProperties(
updatePayload, // $FlowFixMe - We know that this is always an object when the input is.
ReactNativePrivateInterface.flattenStyle(prevProp), // $FlowFixMe - We know that this isn't an array because of above flow.
@@ -3695,7 +3707,7 @@ function addNestedProperty(updatePayload, nextProp, validAttributes) {
return updatePayload;
}
- if (!Array.isArray(nextProp)) {
+ if (!isArray(nextProp)) {
// Add each property of the leaf.
return addProperties(updatePayload, nextProp, validAttributes);
}
@@ -3721,7 +3733,7 @@ function clearNestedProperty(updatePayload, prevProp, validAttributes) {
return updatePayload;
}
- if (!Array.isArray(prevProp)) {
+ if (!isArray(prevProp)) {
// Add each property of the leaf.
return clearProperties(updatePayload, prevProp, validAttributes);
}
@@ -4093,6 +4105,179 @@ var ReactNativeFiberHostComponent = /*#__PURE__*/ (function() {
return ReactNativeFiberHostComponent;
})(); // eslint-disable-next-line no-unused-expressions
+// This module only exists as an ESM wrapper around the external CommonJS
+var scheduleCallback = Scheduler.unstable_scheduleCallback;
+var cancelCallback = Scheduler.unstable_cancelCallback;
+var shouldYield = Scheduler.unstable_shouldYield;
+var requestPaint = Scheduler.unstable_requestPaint;
+var now = Scheduler.unstable_now;
+var ImmediatePriority = Scheduler.unstable_ImmediatePriority;
+var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;
+var NormalPriority = Scheduler.unstable_NormalPriority;
+var IdlePriority = Scheduler.unstable_IdlePriority;
+
+{
+ // Provide explicit error message when production+profiling bundle of e.g.
+ // react-dom is used with production (non-profiling) bundle of
+ // scheduler/tracing
+ if (
+ !(
+ tracing.__interactionsRef != null &&
+ tracing.__interactionsRef.current != null
+ )
+ ) {
+ throw Error(
+ "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling"
+ );
+ }
+}
+
+var rendererID = null;
+var injectedHook = null;
+var hasLoggedError = false;
+var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined";
+function injectInternals(internals) {
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined") {
+ // No DevTools
+ return false;
+ }
+
+ var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+
+ if (hook.isDisabled) {
+ // This isn't a real property on the hook, but it can be set to opt out
+ // of DevTools integration and associated warnings and logs.
+ // https://github.com/facebook/react/issues/3877
+ return true;
+ }
+
+ if (!hook.supportsFiber) {
+ {
+ error(
+ "The installed version of React DevTools is too old and will not work " +
+ "with the current version of React. Please update React DevTools. " +
+ "https://reactjs.org/link/react-devtools"
+ );
+ } // DevTools exists, even though it doesn't support Fiber.
+
+ return true;
+ }
+
+ try {
+ rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.
+
+ injectedHook = hook;
+ } catch (err) {
+ // Catch all errors because it is unsafe to throw during initialization.
+ {
+ error("React instrumentation encountered an error: %s.", err);
+ }
+ } // DevTools exists
+
+ return true;
+}
+function onScheduleRoot(root, children) {
+ {
+ if (
+ injectedHook &&
+ typeof injectedHook.onScheduleFiberRoot === "function"
+ ) {
+ try {
+ injectedHook.onScheduleFiberRoot(rendererID, root, children);
+ } catch (err) {
+ if (!hasLoggedError) {
+ hasLoggedError = true;
+
+ error("React instrumentation encountered an error: %s", err);
+ }
+ }
+ }
+ }
+}
+function onCommitRoot(root, eventPriority) {
+ if (injectedHook && typeof injectedHook.onCommitFiberRoot === "function") {
+ try {
+ var didError = (root.current.flags & DidCapture) === DidCapture;
+
+ if (enableProfilerTimer) {
+ var schedulerPriority;
+
+ switch (eventPriority) {
+ case DiscreteEventPriority:
+ schedulerPriority = ImmediatePriority;
+ break;
+
+ case ContinuousEventPriority:
+ schedulerPriority = UserBlockingPriority;
+ break;
+
+ case DefaultEventPriority:
+ schedulerPriority = NormalPriority;
+ break;
+
+ case IdleEventPriority:
+ schedulerPriority = IdlePriority;
+ break;
+
+ default:
+ schedulerPriority = NormalPriority;
+ break;
+ }
+
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ root,
+ schedulerPriority,
+ didError
+ );
+ } else {
+ injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);
+ }
+ } catch (err) {
+ {
+ if (!hasLoggedError) {
+ hasLoggedError = true;
+
+ error("React instrumentation encountered an error: %s", err);
+ }
+ }
+ }
+ }
+}
+function onPostCommitRoot(root) {
+ if (
+ injectedHook &&
+ typeof injectedHook.onPostCommitFiberRoot === "function"
+ ) {
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, root);
+ } catch (err) {
+ {
+ if (!hasLoggedError) {
+ hasLoggedError = true;
+
+ error("React instrumentation encountered an error: %s", err);
+ }
+ }
+ }
+ }
+}
+function onCommitUnmount(fiber) {
+ if (injectedHook && typeof injectedHook.onCommitFiberUnmount === "function") {
+ try {
+ injectedHook.onCommitFiberUnmount(rendererID, fiber);
+ } catch (err) {
+ {
+ if (!hasLoggedError) {
+ hasLoggedError = true;
+
+ error("React instrumentation encountered an error: %s", err);
+ }
+ }
+ }
+ }
+}
+
// If those values are changed that package should be rebuilt and redeployed.
var TotalLanes = 31;
@@ -4106,7 +4291,7 @@ var SyncLane =
/* */
1;
var InputContinuousHydrationLane =
- /* */
+ /* */
2;
var InputContinuousLane =
/* */
@@ -4740,6 +4925,9 @@ function setCurrentUpdatePriority(newPriority) {
function higherEventPriority(a, b) {
return a !== 0 && a < b ? a : b;
}
+function lowerEventPriority(a, b) {
+ return a === 0 || a > b ? a : b;
+}
function isHigherEventPriority(a, b) {
return a !== 0 && a < b;
}
@@ -5360,6 +5548,8 @@ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
return "";
}
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
var loggedTypeFailures = {};
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
@@ -5382,7 +5572,7 @@ function setCurrentlyValidatingElement(element) {
function checkPropTypes(typeSpecs, values, location, componentName, element) {
{
// $FlowFixMe This is okay but Flow doesn't know it.
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
+ var has = Function.call.bind(hasOwnProperty);
for (var typeSpecName in typeSpecs) {
if (has(typeSpecs, typeSpecName)) {
@@ -5782,161 +5972,6 @@ function findCurrentUnmaskedContext(fiber) {
var LegacyRoot = 0;
var ConcurrentRoot = 1;
-// This module only exists as an ESM wrapper around the external CommonJS
-var scheduleCallback = Scheduler.unstable_scheduleCallback;
-var cancelCallback = Scheduler.unstable_cancelCallback;
-var shouldYield = Scheduler.unstable_shouldYield;
-var requestPaint = Scheduler.unstable_requestPaint;
-var now = Scheduler.unstable_now;
-var ImmediatePriority = Scheduler.unstable_ImmediatePriority;
-var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;
-var NormalPriority = Scheduler.unstable_NormalPriority;
-var IdlePriority = Scheduler.unstable_IdlePriority;
-
-{
- // Provide explicit error message when production+profiling bundle of e.g.
- // react-dom is used with production (non-profiling) bundle of
- // scheduler/tracing
- if (
- !(
- tracing.__interactionsRef != null &&
- tracing.__interactionsRef.current != null
- )
- ) {
- throw Error(
- "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling"
- );
- }
-}
-
-var rendererID = null;
-var injectedHook = null;
-var hasLoggedError = false;
-var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined";
-function injectInternals(internals) {
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined") {
- // No DevTools
- return false;
- }
-
- var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
-
- if (hook.isDisabled) {
- // This isn't a real property on the hook, but it can be set to opt out
- // of DevTools integration and associated warnings and logs.
- // https://github.com/facebook/react/issues/3877
- return true;
- }
-
- if (!hook.supportsFiber) {
- {
- error(
- "The installed version of React DevTools is too old and will not work " +
- "with the current version of React. Please update React DevTools. " +
- "https://reactjs.org/link/react-devtools"
- );
- } // DevTools exists, even though it doesn't support Fiber.
-
- return true;
- }
-
- try {
- rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.
-
- injectedHook = hook;
- } catch (err) {
- // Catch all errors because it is unsafe to throw during initialization.
- {
- error("React instrumentation encountered an error: %s.", err);
- }
- } // DevTools exists
-
- return true;
-}
-function onScheduleRoot(root, children) {
- {
- if (
- injectedHook &&
- typeof injectedHook.onScheduleFiberRoot === "function"
- ) {
- try {
- injectedHook.onScheduleFiberRoot(rendererID, root, children);
- } catch (err) {
- if (!hasLoggedError) {
- hasLoggedError = true;
-
- error("React instrumentation encountered an error: %s", err);
- }
- }
- }
- }
-}
-function onCommitRoot(root, eventPriority) {
- if (injectedHook && typeof injectedHook.onCommitFiberRoot === "function") {
- try {
- var didError = (root.current.flags & DidCapture) === DidCapture;
-
- if (enableProfilerTimer) {
- var schedulerPriority;
-
- switch (eventPriority) {
- case DiscreteEventPriority:
- schedulerPriority = ImmediatePriority;
- break;
-
- case ContinuousEventPriority:
- schedulerPriority = UserBlockingPriority;
- break;
-
- case DefaultEventPriority:
- schedulerPriority = NormalPriority;
- break;
-
- case IdleEventPriority:
- schedulerPriority = IdlePriority;
- break;
-
- default:
- schedulerPriority = NormalPriority;
- break;
- }
-
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- schedulerPriority,
- didError
- );
- } else {
- injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);
- }
- } catch (err) {
- {
- if (!hasLoggedError) {
- hasLoggedError = true;
-
- error("React instrumentation encountered an error: %s", err);
- }
- }
- }
- }
-}
-function onCommitUnmount(fiber) {
- if (injectedHook && typeof injectedHook.onCommitFiberUnmount === "function") {
- try {
- injectedHook.onCommitFiberUnmount(rendererID, fiber);
- } catch (err) {
- {
- if (!hasLoggedError) {
- hasLoggedError = true;
-
- error("React instrumentation encountered an error: %s", err);
- }
- }
- }
- }
-}
-
var syncQueue = null;
var isFlushingSyncQueue = false;
function scheduleSyncCallback(callback) {
@@ -6047,7 +6082,6 @@ function is(x, y) {
var objectIs = typeof Object.is === "function" ? Object.is : is;
-var hasOwnProperty = Object.prototype.hasOwnProperty;
/**
* Performs equality by iterating through keys on an object and returning false
* when any key has values which are not strictly equal between the arguments.
@@ -7405,8 +7439,7 @@ function commitUpdateQueue(finishedWork, finishedQueue, instance) {
}
}
-var fakeInternalInstance = {};
-var isArray = Array.isArray; // React.Component uses a shared frozen object by default.
+var fakeInternalInstance = {}; // React.Component uses a shared frozen object by default.
// We'll use it to determine whether we need to initialize legacy refs.
var emptyRefsObject = new React.Component().refs;
@@ -7524,6 +7557,7 @@ function applyDerivedStateFromProps(
updateQueue.baseState = memoizedState;
}
}
+
var classComponentUpdater = {
isMounted: isMounted,
enqueueSetState: function(inst, payload, callback) {
@@ -8173,7 +8207,6 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
}
}
- processUpdateQueue(workInProgress, newProps, instance, renderLanes);
instance.state = workInProgress.memoizedState;
var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
@@ -8202,9 +8235,9 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
}
if (typeof instance.componentDidMount === "function") {
- {
- workInProgress.flags |= Update;
- }
+ var fiberFlags = Update;
+
+ workInProgress.flags |= fiberFlags;
}
}
@@ -8266,9 +8299,9 @@ function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
// If an update was already in progress, we should schedule an Update
// effect even though we're bailing out, so that cWU/cDU are called.
if (typeof instance.componentDidMount === "function") {
- {
- workInProgress.flags |= Update;
- }
+ var fiberFlags = Update;
+
+ workInProgress.flags |= fiberFlags;
}
return false;
@@ -8314,17 +8347,17 @@ function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
}
if (typeof instance.componentDidMount === "function") {
- {
- workInProgress.flags |= Update;
- }
+ var _fiberFlags = Update;
+
+ workInProgress.flags |= _fiberFlags;
}
} else {
// If an update was already in progress, we should schedule an Update
// effect even though we're bailing out, so that cWU/cDU are called.
if (typeof instance.componentDidMount === "function") {
- {
- workInProgress.flags |= Update;
- }
+ var _fiberFlags2 = Update;
+
+ workInProgress.flags |= _fiberFlags2;
} // If shouldComponentUpdate returned false, we should still update the
// memoized state to indicate that this work can be reused.
@@ -8565,8 +8598,6 @@ var warnForMissingKey = function(child, returnFiber) {};
};
}
-var isArray$1 = Array.isArray;
-
function coerceRef(returnFiber, current, element) {
var mixedRef = element.ref;
@@ -8681,18 +8712,16 @@ function coerceRef(returnFiber, current, element) {
}
function throwOnInvalidObjectType(returnFiber, newChild) {
- if (returnFiber.type !== "textarea") {
- var childString = Object.prototype.toString.call(newChild);
+ var childString = Object.prototype.toString.call(newChild);
- {
- throw Error(
- "Objects are not valid as a React child (found: " +
- (childString === "[object Object]"
- ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
- : childString) +
- "). If you meant to render a collection of children, use an array instead."
- );
- }
+ {
+ throw Error(
+ "Objects are not valid as a React child (found: " +
+ (childString === "[object Object]"
+ ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
+ : childString) +
+ "). If you meant to render a collection of children, use an array instead."
+ );
}
}
@@ -8948,7 +8977,7 @@ function ChildReconciler(shouldTrackSideEffects) {
}
}
- if (isArray$1(newChild) || getIteratorFn(newChild)) {
+ if (isArray(newChild) || getIteratorFn(newChild)) {
var _created3 = createFiberFromFragment(
newChild,
returnFiber.mode,
@@ -9006,7 +9035,7 @@ function ChildReconciler(shouldTrackSideEffects) {
}
}
- if (isArray$1(newChild) || getIteratorFn(newChild)) {
+ if (isArray(newChild) || getIteratorFn(newChild)) {
if (key !== null) {
return null;
}
@@ -9061,7 +9090,7 @@ function ChildReconciler(shouldTrackSideEffects) {
}
}
- if (isArray$1(newChild) || getIteratorFn(newChild)) {
+ if (isArray(newChild) || getIteratorFn(newChild)) {
var _matchedFiber3 = existingChildren.get(newIdx) || null;
return updateFragment(
@@ -9671,9 +9700,7 @@ function ChildReconciler(shouldTrackSideEffects) {
newChild = newChild.props.children;
} // Handle object types
- var isObject = typeof newChild === "object" && newChild !== null;
-
- if (isObject) {
+ if (typeof newChild === "object" && newChild !== null) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
return placeSingleChild(
@@ -9695,6 +9722,26 @@ function ChildReconciler(shouldTrackSideEffects) {
)
);
}
+
+ if (isArray(newChild)) {
+ return reconcileChildrenArray(
+ returnFiber,
+ currentFirstChild,
+ newChild,
+ lanes
+ );
+ }
+
+ if (getIteratorFn(newChild)) {
+ return reconcileChildrenIterator(
+ returnFiber,
+ currentFirstChild,
+ newChild,
+ lanes
+ );
+ }
+
+ throwOnInvalidObjectType(returnFiber, newChild);
}
if (typeof newChild === "string" || typeof newChild === "number") {
@@ -9708,28 +9755,6 @@ function ChildReconciler(shouldTrackSideEffects) {
);
}
- if (isArray$1(newChild)) {
- return reconcileChildrenArray(
- returnFiber,
- currentFirstChild,
- newChild,
- lanes
- );
- }
-
- if (getIteratorFn(newChild)) {
- return reconcileChildrenIterator(
- returnFiber,
- currentFirstChild,
- newChild,
- lanes
- );
- }
-
- if (isObject) {
- throwOnInvalidObjectType(returnFiber, newChild);
- }
-
{
if (typeof newChild === "function") {
warnOnFunctionType(returnFiber);
@@ -10181,7 +10206,7 @@ function updateHookTypesDev() {
function checkDepsAreArrayDev(deps) {
{
- if (deps !== undefined && deps !== null && !Array.isArray(deps)) {
+ if (deps !== undefined && deps !== null && !isArray(deps)) {
// Verify deps, but only on mount to avoid extra checks.
// It's unlikely their type would change as usually you define them inline.
error(
@@ -10401,7 +10426,7 @@ function renderWithHooks(
if (
current !== null &&
- (current.flags & PassiveStatic) !== (workInProgress.flags & PassiveStatic)
+ (current.flags & StaticMask) !== (workInProgress.flags & StaticMask)
) {
error(
"Internal React error: Expected static flag was missing. Please " +
@@ -11229,9 +11254,9 @@ function updateEffect(create, deps) {
}
function mountLayoutEffect(create, deps) {
- {
- return mountEffectImpl(Update, Layout, create, deps);
- }
+ var fiberFlags = Update;
+
+ return mountEffectImpl(fiberFlags, Layout, create, deps);
}
function updateLayoutEffect(create, deps) {
@@ -11283,15 +11308,14 @@ function mountImperativeHandle(ref, create, deps) {
var effectDeps =
deps !== null && deps !== undefined ? deps.concat([ref]) : null;
+ var fiberFlags = Update;
- {
- return mountEffectImpl(
- Update,
- Layout,
- imperativeHandleEffect.bind(null, create, ref),
- effectDeps
- );
- }
+ return mountEffectImpl(
+ fiberFlags,
+ Layout,
+ imperativeHandleEffect.bind(null, create, ref),
+ effectDeps
+ );
}
function updateImperativeHandle(ref, create, deps) {
@@ -13671,17 +13695,6 @@ function mountIndeterminateComponent(
workInProgress.memoizedState =
value.state !== null && value.state !== undefined ? value.state : null;
initializeUpdateQueue(workInProgress);
- var getDerivedStateFromProps = Component.getDerivedStateFromProps;
-
- if (typeof getDerivedStateFromProps === "function") {
- applyDerivedStateFromProps(
- workInProgress,
- Component,
- getDerivedStateFromProps,
- props
- );
- }
-
adoptClassInstance(workInProgress, value);
mountClassInstance(workInProgress, Component, props, renderLanes);
return finishClassComponent(
@@ -14441,11 +14454,12 @@ function validateTailOptions(tailMode, revealOrder) {
function validateSuspenseListNestedChild(childSlot, index) {
{
- var isArray = Array.isArray(childSlot);
- var isIterable = !isArray && typeof getIteratorFn(childSlot) === "function";
+ var isAnArray = isArray(childSlot);
+ var isIterable =
+ !isAnArray && typeof getIteratorFn(childSlot) === "function";
- if (isArray || isIterable) {
- var type = isArray ? "array" : "iterable";
+ if (isAnArray || isIterable) {
+ var type = isAnArray ? "array" : "iterable";
error(
"A nested %s was passed to row #%s in . Wrap it in " +
@@ -14473,7 +14487,7 @@ function validateSuspenseListChildren(children, revealOrder) {
children !== null &&
children !== false
) {
- if (Array.isArray(children)) {
+ if (isArray(children)) {
for (var i = 0; i < children.length; i++) {
if (!validateSuspenseListNestedChild(children[i], i)) {
return;
@@ -15854,7 +15868,7 @@ function completeWork(current, workInProgress, renderLanes) {
var _primaryChildFragment2 = workInProgress.child;
if (_primaryChildFragment2 !== null) {
- // $FlowFixMe Flow doens't support type casting in combiation with the -= operator
+ // $FlowFixMe Flow doesn't support type casting in combination with the -= operator
workInProgress.treeBaseDuration -=
_primaryChildFragment2.treeBaseDuration;
}
@@ -16522,6 +16536,7 @@ function attachPingListener(root, wakeable, lanes) {
// Memoize using the thread ID to prevent redundant listeners.
threadIDs.add(lanes);
var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);
+
wakeable.then(ping, ping);
}
}
@@ -16755,10 +16770,9 @@ var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
{
didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
-}
-
+} // Used during the commit phase to track the state of the Offscreen component stack.
var PossiblyWeakSet = typeof WeakSet === "function" ? WeakSet : Set;
-var nextEffect = null;
+var nextEffect = null; // Used for Profiling builds to track updaters.
var callComponentWillUnmountWithTimer = function(current, instance) {
instance.props = current.memoizedProps;
@@ -16767,7 +16781,7 @@ var callComponentWillUnmountWithTimer = function(current, instance) {
{
instance.componentWillUnmount();
}
-}; // Capture errors so they don't interrupt unmounting.
+}; // Capture errors so they don't interrupt mounting.
function safelyCallComponentWillUnmount(
current,
@@ -16788,7 +16802,7 @@ function safelyCallComponentWillUnmount(
captureCommitPhaseError(current, nearestMountedAncestor, unmountError);
}
}
-}
+} // Capture errors so they don't interrupt mounting.
function safelyDetachRef(current, nearestMountedAncestor) {
var ref = current.ref;
@@ -17363,6 +17377,11 @@ function commitLayoutEffectOnFiber(
}
function hideOrUnhideAllChildren(finishedWork, isHidden) {
+ // Suspense layout effects semantics don't change for legacy roots.
+ var isModernRoot = (finishedWork.mode & ConcurrentMode) !== NoMode;
+ var current = finishedWork.alternate;
+ var wasHidden = current !== null && current.memoizedState !== null;
+
{
// We only have the top Fiber that was inserted but we need to recurse down its
// children to find all the terminal nodes.
@@ -17764,7 +17783,7 @@ function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
var isHost = tag === HostComponent || tag === HostText;
if (isHost) {
- var stateNode = isHost ? node.stateNode : node.stateNode.instance;
+ var stateNode = node.stateNode;
if (before) {
insertInContainerBefore(parent);
@@ -17792,7 +17811,7 @@ function insertOrAppendPlacementNode(node, before, parent) {
var isHost = tag === HostComponent || tag === HostText;
if (isHost) {
- var stateNode = isHost ? node.stateNode : node.stateNode.instance;
+ var stateNode = node.stateNode;
if (before) {
insertBefore(parent, stateNode, before);
@@ -18082,6 +18101,7 @@ function attachSuspenseRetryListeners(finishedWork) {
}
retryCache.add(wakeable);
+
wakeable.then(retry, retry);
}
});
@@ -18107,7 +18127,7 @@ function commitResetTextContent(current) {
resetTextContent(current.stateNode);
}
-function commitMutationEffects(root, firstChild) {
+function commitMutationEffects(root, firstChild, committedLanes) {
nextEffect = firstChild;
commitMutationEffects_begin(root);
}
@@ -18255,6 +18275,9 @@ function commitLayoutEffects(finishedWork, root, committedLanes) {
}
function commitLayoutEffects_begin(subtreeRoot, root, committedLanes) {
+ // Suspense layout effects semantics don't change for legacy roots.
+ var isModernRoot = (subtreeRoot.mode & ConcurrentMode) !== NoMode;
+
while (nextEffect !== null) {
var fiber = nextEffect;
var firstChild = fiber.child;
@@ -18269,6 +18292,9 @@ function commitLayoutEffects_begin(subtreeRoot, root, committedLanes) {
}
function commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes) {
+ // Suspense layout effects semantics don't change for legacy roots.
+ var isModernRoot = (subtreeRoot.mode & ConcurrentMode) !== NoMode;
+
while (nextEffect !== null) {
var fiber = nextEffect;
@@ -18597,6 +18623,7 @@ if (typeof Symbol === "function" && Symbol.for) {
var ceil = Math.ceil;
var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
+ ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig,
IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;
var NoContext =
/* */
@@ -18760,6 +18787,7 @@ function requestUpdateLane(fiber) {
// TODO: Move this type conversion to the event priority module.
var eventLane = getCurrentEventPriority();
+
return eventLane;
}
@@ -18785,7 +18813,7 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) {
if (root === null) {
warnAboutUpdateOnUnmountedFiberInDEV(fiber);
return null;
- } // Mark that the root has a pending update.
+ }
markRootUpdated(root, lane, eventTime);
@@ -19304,7 +19332,10 @@ function performSyncWorkOnRoot(root) {
var finishedWork = root.current.alternate;
root.finishedWork = finishedWork;
root.finishedLanes = lanes;
- commitRoot(root); // Before exiting, make sure there's a callback scheduled for the next
+
+ {
+ commitRoot(root);
+ } // Before exiting, make sure there's a callback scheduled for the next
// pending level.
ensureRootIsScheduled(root, now());
@@ -19329,9 +19360,11 @@ function batchedUpdates$1(fn, a) {
function flushSync(fn, a) {
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
+ var prevTransition = ReactCurrentBatchConfig$2.transition;
var previousPriority = getCurrentUpdatePriority();
try {
+ ReactCurrentBatchConfig$2.transition = 0;
setCurrentUpdatePriority(DiscreteEventPriority);
if (fn) {
@@ -19341,6 +19374,7 @@ function flushSync(fn, a) {
}
} finally {
setCurrentUpdatePriority(previousPriority);
+ ReactCurrentBatchConfig$2.transition = prevTransition;
executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.
// Note that this will happen even if batchedUpdates is higher up
// the stack.
@@ -19786,11 +19820,14 @@ function commitRoot(root) {
// TODO: This no longer makes any sense. We already wrap the mutation and
// layout phases. Should be able to remove.
var previousUpdateLanePriority = getCurrentUpdatePriority();
+ var prevTransition = ReactCurrentBatchConfig$2.transition;
try {
+ ReactCurrentBatchConfig$2.transition = 0;
setCurrentUpdatePriority(DiscreteEventPriority);
commitRootImpl(root, previousUpdateLanePriority);
} finally {
+ ReactCurrentBatchConfig$2.transition = prevTransition;
setCurrentUpdatePriority(previousUpdateLanePriority);
}
@@ -19876,6 +19913,8 @@ function commitRootImpl(root, renderPriorityLevel) {
NoFlags;
if (subtreeHasEffects || rootHasEffect) {
+ var prevTransition = ReactCurrentBatchConfig$2.transition;
+ ReactCurrentBatchConfig$2.transition = 0;
var previousPriority = getCurrentUpdatePriority();
setCurrentUpdatePriority(DiscreteEventPriority);
var prevExecutionContext = executionContext;
@@ -19921,6 +19960,7 @@ function commitRootImpl(root, renderPriorityLevel) {
executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value.
setCurrentUpdatePriority(previousPriority);
+ ReactCurrentBatchConfig$2.transition = prevTransition;
} else {
// No effects.
root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were
@@ -20008,6 +20048,20 @@ function commitRootImpl(root, renderPriorityLevel) {
// of the batch.
return null;
+ } // If the passive effects are the result of a discrete render, flush them
+ // synchronously at the end of the current task so that the result is
+ // immediately observable. Otherwise, we assume that they are not
+ // order-dependent and do not need to be observed by external systems, so we
+ // can wait until after paint.
+ // TODO: We can optimize this by not scheduling the callback earlier. Since we
+ // currently schedule the callback in multiple places, will wait until those
+ // are consolidated.
+
+ if (
+ includesSomeLane(pendingPassiveEffectsLanes, SyncLane) &&
+ root.tag !== LegacyRoot
+ ) {
+ flushPassiveEffects();
} // If layout work was scheduled, flush it now.
flushSyncCallbackQueue();
@@ -20017,18 +20071,24 @@ function commitRootImpl(root, renderPriorityLevel) {
function flushPassiveEffects() {
// Returns whether passive effects were flushed.
- if (pendingPassiveEffectsLanes !== NoLanes) {
- var priority = higherEventPriority(
- DefaultEventPriority,
- lanesToEventPriority(pendingPassiveEffectsLanes)
- );
+ // TODO: Combine this check with the one in flushPassiveEFfectsImpl. We should
+ // probably just combine the two functions. I believe they were only separate
+ // in the first place because we used to wrap it with
+ // `Scheduler.runWithPriority`, which accepts a function. But now we track the
+ // priority within React itself, so we can mutate the variable directly.
+ if (rootWithPendingPassiveEffects !== null) {
+ var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes);
+ var priority = lowerEventPriority(DefaultEventPriority, renderPriority);
+ var prevTransition = ReactCurrentBatchConfig$2.transition;
var previousPriority = getCurrentUpdatePriority();
try {
+ ReactCurrentBatchConfig$2.transition = 0;
setCurrentUpdatePriority(priority);
return flushPassiveEffectsImpl();
} finally {
setCurrentUpdatePriority(previousPriority);
+ ReactCurrentBatchConfig$2.transition = prevTransition;
}
}
@@ -20042,7 +20102,10 @@ function flushPassiveEffectsImpl() {
var root = rootWithPendingPassiveEffects;
var lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
+ rootWithPendingPassiveEffects = null; // TODO: This is sometimes out of sync with rootWithPendingPassiveEffects.
+ // Figure out why and fix it. It's not causing any known issues (probably
+ // because it's only used for profiling), but it's a refactor hazard.
+
pendingPassiveEffectsLanes = NoLanes;
if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
@@ -20073,7 +20136,10 @@ function flushPassiveEffectsImpl() {
// exceeds the limit, we'll fire a warning.
nestedPassiveUpdateCount =
- rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1;
+ rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1; // TODO: Move to commitPassiveMountEffects
+
+ onPostCommitRoot(root);
+
return true;
}
@@ -21819,7 +21885,10 @@ function createFiberFromFragment(elements, mode, lanes, key) {
function createFiberFromProfiler(pendingProps, mode, lanes, key) {
{
if (typeof pendingProps.id !== "string") {
- error('Profiler must specify an "id" as a prop');
+ error(
+ 'Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',
+ typeof pendingProps.id
+ );
}
}
@@ -22234,10 +22303,10 @@ var setSuspenseHandler = null;
{
var copyWithDeleteImpl = function(obj, path, index) {
var key = path[index];
- var updated = Array.isArray(obj) ? obj.slice() : Object.assign({}, obj);
+ var updated = isArray(obj) ? obj.slice() : Object.assign({}, obj);
if (index + 1 === path.length) {
- if (Array.isArray(updated)) {
+ if (isArray(updated)) {
updated.splice(key, 1);
} else {
delete updated[key];
@@ -22256,14 +22325,14 @@ var setSuspenseHandler = null;
var copyWithRenameImpl = function(obj, oldPath, newPath, index) {
var oldKey = oldPath[index];
- var updated = Array.isArray(obj) ? obj.slice() : Object.assign({}, obj);
+ var updated = isArray(obj) ? obj.slice() : Object.assign({}, obj);
if (index + 1 === oldPath.length) {
var newKey = newPath[index]; // $FlowFixMe number or string is fine here
updated[newKey] = updated[oldKey];
- if (Array.isArray(updated)) {
+ if (isArray(updated)) {
updated.splice(oldKey, 1);
} else {
delete updated[oldKey];
@@ -22308,7 +22377,7 @@ var setSuspenseHandler = null;
}
var key = path[index];
- var updated = Array.isArray(obj) ? obj.slice() : Object.assign({}, obj); // $FlowFixMe number or string is fine here
+ var updated = isArray(obj) ? obj.slice() : Object.assign({}, obj); // $FlowFixMe number or string is fine here
updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);
return updated;
@@ -22465,7 +22534,10 @@ function injectIntoDevTools(devToolsConfig) {
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
// Enables DevTools to append owner stacks to error messages in DEV mode.
- getCurrentFiber: getCurrentFiberForDevTools
+ getCurrentFiber: getCurrentFiberForDevTools,
+ // Enables DevTools to detect reconciler version rather than renderer version
+ // which may not match for third party renderers.
+ reconcilerVersion: ReactVersion
});
}
diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js
index cf61e99d065c63..dadafbe97165b6 100644
--- a/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js
+++ b/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<<9a93ce433eed65e2405523253a760a3a>>
+ * @generated SignedSource<<67d6e303f1823e73e6e16508519f4668>>
*/
"use strict";
@@ -62,7 +62,8 @@ function invokeGuardedCallbackAndCatchFirstError(
hasRethrowError || ((hasRethrowError = !0), (rethrowError = error));
}
}
-var getFiberCurrentPropsFromNode = null,
+var isArrayImpl = Array.isArray,
+ getFiberCurrentPropsFromNode = null,
getInstanceFromNode = null,
getNodeFromInstance = null;
function executeDispatch(event, listener, inst) {
@@ -74,7 +75,7 @@ function executeDispatch(event, listener, inst) {
function executeDirectDispatch(event) {
var dispatchListener = event._dispatchListeners,
dispatchInstance = event._dispatchInstances;
- if (Array.isArray(dispatchListener))
+ if (isArrayImpl(dispatchListener))
throw Error("executeDirectDispatch(...): Invalid `event`.");
event.currentTarget = dispatchListener
? getNodeFromInstance(dispatchInstance)
@@ -335,9 +336,9 @@ function accumulate(current, next) {
);
return null == current
? next
- : Array.isArray(current)
+ : isArrayImpl(current)
? current.concat(next)
- : Array.isArray(next)
+ : isArrayImpl(next)
? [current].concat(next)
: [current, next];
}
@@ -347,12 +348,12 @@ function accumulateInto(current, next) {
"accumulateInto(...): Accumulated items must not be null or undefined."
);
if (null == current) return next;
- if (Array.isArray(current)) {
- if (Array.isArray(next)) return current.push.apply(current, next), current;
+ if (isArrayImpl(current)) {
+ if (isArrayImpl(next)) return current.push.apply(current, next), current;
current.push(next);
return current;
}
- return Array.isArray(next) ? [current].concat(next) : [current, next];
+ return isArrayImpl(next) ? [current].concat(next) : [current, next];
}
function forEachAccumulated(arr, cb, scope) {
Array.isArray(arr) ? arr.forEach(cb, scope) : arr && cb.call(scope, arr);
@@ -578,7 +579,7 @@ var ResponderEventPlugin = {
b: {
JSCompiler_temp = shouldSetEventType._dispatchListeners;
targetInst = shouldSetEventType._dispatchInstances;
- if (Array.isArray(JSCompiler_temp))
+ if (isArrayImpl(JSCompiler_temp))
for (
depthA = 0;
depthA < JSCompiler_temp.length &&
@@ -929,7 +930,7 @@ eventPluginOrder = Array.prototype.slice.call([
"ReactNativeBridgeEventPlugin"
]);
recomputePluginOrdering();
-var injectedNamesToPlugins$jscomp$inline_217 = {
+var injectedNamesToPlugins$jscomp$inline_218 = {
ResponderEventPlugin: ResponderEventPlugin,
ReactNativeBridgeEventPlugin: {
eventTypes: {},
@@ -964,34 +965,34 @@ var injectedNamesToPlugins$jscomp$inline_217 = {
}
}
},
- isOrderingDirty$jscomp$inline_218 = !1,
- pluginName$jscomp$inline_219;
-for (pluginName$jscomp$inline_219 in injectedNamesToPlugins$jscomp$inline_217)
+ isOrderingDirty$jscomp$inline_219 = !1,
+ pluginName$jscomp$inline_220;
+for (pluginName$jscomp$inline_220 in injectedNamesToPlugins$jscomp$inline_218)
if (
- injectedNamesToPlugins$jscomp$inline_217.hasOwnProperty(
- pluginName$jscomp$inline_219
+ injectedNamesToPlugins$jscomp$inline_218.hasOwnProperty(
+ pluginName$jscomp$inline_220
)
) {
- var pluginModule$jscomp$inline_220 =
- injectedNamesToPlugins$jscomp$inline_217[pluginName$jscomp$inline_219];
+ var pluginModule$jscomp$inline_221 =
+ injectedNamesToPlugins$jscomp$inline_218[pluginName$jscomp$inline_220];
if (
- !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_219) ||
- namesToPlugins[pluginName$jscomp$inline_219] !==
- pluginModule$jscomp$inline_220
+ !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_220) ||
+ namesToPlugins[pluginName$jscomp$inline_220] !==
+ pluginModule$jscomp$inline_221
) {
- if (namesToPlugins[pluginName$jscomp$inline_219])
+ if (namesToPlugins[pluginName$jscomp$inline_220])
throw Error(
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
- pluginName$jscomp$inline_219 +
+ pluginName$jscomp$inline_220 +
"`."
);
namesToPlugins[
- pluginName$jscomp$inline_219
- ] = pluginModule$jscomp$inline_220;
- isOrderingDirty$jscomp$inline_218 = !0;
+ pluginName$jscomp$inline_220
+ ] = pluginModule$jscomp$inline_221;
+ isOrderingDirty$jscomp$inline_219 = !0;
}
}
-isOrderingDirty$jscomp$inline_218 && recomputePluginOrdering();
+isOrderingDirty$jscomp$inline_219 && recomputePluginOrdering();
var instanceCache = new Map(),
instanceProps = new Map();
function getInstanceFromTag(tag) {
@@ -1015,7 +1016,7 @@ function executeDispatchesAndReleaseTopLevel(e) {
if (e) {
var dispatchListeners = e._dispatchListeners,
dispatchInstances = e._dispatchInstances;
- if (Array.isArray(dispatchListeners))
+ if (isArrayImpl(dispatchListeners))
for (
var i = 0;
i < dispatchListeners.length && !e.isPropagationStopped();
@@ -1416,7 +1417,7 @@ function restoreDeletedValuesInNestedArray(
node,
validAttributes
) {
- if (Array.isArray(node))
+ if (isArrayImpl(node))
for (var i = node.length; i-- && 0 < removedKeyCount; )
restoreDeletedValuesInNestedArray(
updatePayload,
@@ -1462,9 +1463,9 @@ function diffNestedProperty(
: prevProp
? clearNestedProperty(updatePayload, prevProp, validAttributes)
: updatePayload;
- if (!Array.isArray(prevProp) && !Array.isArray(nextProp))
+ if (!isArrayImpl(prevProp) && !isArrayImpl(nextProp))
return diffProperties(updatePayload, prevProp, nextProp, validAttributes);
- if (Array.isArray(prevProp) && Array.isArray(nextProp)) {
+ if (isArrayImpl(prevProp) && isArrayImpl(nextProp)) {
var minLength =
prevProp.length < nextProp.length ? prevProp.length : nextProp.length,
i;
@@ -1489,7 +1490,7 @@ function diffNestedProperty(
);
return updatePayload;
}
- return Array.isArray(prevProp)
+ return isArrayImpl(prevProp)
? diffProperties(
updatePayload,
ReactNativePrivateInterface.flattenStyle(prevProp),
@@ -1505,7 +1506,7 @@ function diffNestedProperty(
}
function addNestedProperty(updatePayload, nextProp, validAttributes) {
if (!nextProp) return updatePayload;
- if (!Array.isArray(nextProp))
+ if (!isArrayImpl(nextProp))
return diffProperties(
updatePayload,
emptyObject,
@@ -1522,7 +1523,7 @@ function addNestedProperty(updatePayload, nextProp, validAttributes) {
}
function clearNestedProperty(updatePayload, prevProp, validAttributes) {
if (!prevProp) return updatePayload;
- if (!Array.isArray(prevProp))
+ if (!isArrayImpl(prevProp))
return diffProperties(
updatePayload,
prevProp,
@@ -1686,7 +1687,29 @@ var ReactNativeFiberHostComponent = (function() {
};
return ReactNativeFiberHostComponent;
})(),
- nextTransitionLane = 64,
+ scheduleCallback = Scheduler.unstable_scheduleCallback,
+ cancelCallback = Scheduler.unstable_cancelCallback,
+ shouldYield = Scheduler.unstable_shouldYield,
+ requestPaint = Scheduler.unstable_requestPaint,
+ now = Scheduler.unstable_now,
+ ImmediatePriority = Scheduler.unstable_ImmediatePriority,
+ UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
+ NormalPriority = Scheduler.unstable_NormalPriority,
+ IdlePriority = Scheduler.unstable_IdlePriority,
+ 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) {}
+}
+var nextTransitionLane = 64,
nextRetryLane = 4194304;
function getHighestPriorityLanes(lanes) {
switch (lanes & -lanes) {
@@ -1930,7 +1953,8 @@ function describeFunctionComponentFrame(fn, source) {
? describeComponentFrame(fn.displayName || fn.name || null, source, null)
: "";
}
-var valueStack = [],
+var hasOwnProperty = Object.prototype.hasOwnProperty,
+ valueStack = [],
index = -1;
function createCursor(defaultValue) {
return { current: defaultValue };
@@ -2026,28 +2050,6 @@ function invalidateContextProvider(workInProgress, type, didChange) {
: pop(didPerformWorkStackCursor);
push(didPerformWorkStackCursor, didChange);
}
-var scheduleCallback = Scheduler.unstable_scheduleCallback,
- cancelCallback = Scheduler.unstable_cancelCallback,
- shouldYield = Scheduler.unstable_shouldYield,
- requestPaint = Scheduler.unstable_requestPaint,
- now = Scheduler.unstable_now,
- ImmediatePriority = Scheduler.unstable_ImmediatePriority,
- UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
- NormalPriority = Scheduler.unstable_NormalPriority,
- IdlePriority = Scheduler.unstable_IdlePriority,
- 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) {}
-}
var syncQueue = null,
isFlushingSyncQueue = !1;
function flushSyncCallbackQueue() {
@@ -2078,8 +2080,7 @@ var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
function is(x, y) {
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
}
-var objectIs = "function" === typeof Object.is ? Object.is : is,
- hasOwnProperty = Object.prototype.hasOwnProperty;
+var objectIs = "function" === typeof Object.is ? Object.is : is;
function shallowEqual(objA, objB) {
if (objectIs(objA, objB)) return !0;
if (
@@ -2584,7 +2585,6 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
? previousContext
: contextStackCursor.current),
(instance.context = getMaskedContext(workInProgress, contextType)));
- processUpdateQueue(workInProgress, newProps, instance, renderLanes);
instance.state = workInProgress.memoizedState;
contextType = ctor.getDerivedStateFromProps;
"function" === typeof contextType &&
@@ -2606,7 +2606,6 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
"function" === typeof instance.componentDidMount &&
(workInProgress.flags |= 4);
}
-var isArray = Array.isArray;
function coerceRef(returnFiber, current, element) {
returnFiber = element.ref;
if (
@@ -2659,15 +2658,14 @@ function coerceRef(returnFiber, current, element) {
return returnFiber;
}
function throwOnInvalidObjectType(returnFiber, newChild) {
- if ("textarea" !== returnFiber.type)
- throw ((returnFiber = Object.prototype.toString.call(newChild)),
- Error(
- "Objects are not valid as a React child (found: " +
- ("[object Object]" === returnFiber
- ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
- : returnFiber) +
- "). If you meant to render a collection of children, use an array instead."
- ));
+ returnFiber = Object.prototype.toString.call(newChild);
+ throw Error(
+ "Objects are not valid as a React child (found: " +
+ ("[object Object]" === returnFiber
+ ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
+ : returnFiber) +
+ "). If you meant to render a collection of children, use an array instead."
+ );
}
function ChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
@@ -2829,7 +2827,7 @@ function ChildReconciler(shouldTrackSideEffects) {
newChild
);
}
- if (isArray(newChild) || getIteratorFn(newChild))
+ if (isArrayImpl(newChild) || getIteratorFn(newChild))
return (
(newChild = createFiberFromFragment(
newChild,
@@ -2861,7 +2859,7 @@ function ChildReconciler(shouldTrackSideEffects) {
? updatePortal(returnFiber, oldFiber, newChild, lanes)
: null;
}
- if (isArray(newChild) || getIteratorFn(newChild))
+ if (isArrayImpl(newChild) || getIteratorFn(newChild))
return null !== key
? null
: updateFragment(returnFiber, oldFiber, newChild, lanes, null);
@@ -2900,7 +2898,7 @@ function ChildReconciler(shouldTrackSideEffects) {
updatePortal(returnFiber, existingChildren, newChild, lanes)
);
}
- if (isArray(newChild) || getIteratorFn(newChild))
+ if (isArrayImpl(newChild) || getIteratorFn(newChild))
return (
(existingChildren = existingChildren.get(newIdx) || null),
updateFragment(returnFiber, existingChildren, newChild, lanes, null)
@@ -3083,20 +3081,19 @@ function ChildReconciler(shouldTrackSideEffects) {
newChild.type === REACT_FRAGMENT_TYPE &&
null === newChild.key;
isUnkeyedTopLevelFragment && (newChild = newChild.props.children);
- var isObject = "object" === typeof newChild && null !== newChild;
- if (isObject)
+ if ("object" === typeof newChild && null !== newChild) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
a: {
- isObject = newChild.key;
+ var key = newChild.key;
for (
isUnkeyedTopLevelFragment = currentFirstChild;
null !== isUnkeyedTopLevelFragment;
) {
- if (isUnkeyedTopLevelFragment.key === isObject) {
- isObject = newChild.type;
- if (isObject === REACT_FRAGMENT_TYPE) {
+ if (isUnkeyedTopLevelFragment.key === key) {
+ key = newChild.type;
+ if (key === REACT_FRAGMENT_TYPE) {
if (7 === isUnkeyedTopLevelFragment.tag) {
deleteRemainingChildren(
returnFiber,
@@ -3110,7 +3107,7 @@ function ChildReconciler(shouldTrackSideEffects) {
returnFiber = currentFirstChild;
break a;
}
- } else if (isUnkeyedTopLevelFragment.elementType === isObject) {
+ } else if (isUnkeyedTopLevelFragment.elementType === key) {
deleteRemainingChildren(
returnFiber,
isUnkeyedTopLevelFragment.sibling
@@ -3202,6 +3199,22 @@ function ChildReconciler(shouldTrackSideEffects) {
}
return placeSingleChild(returnFiber);
}
+ if (isArrayImpl(newChild))
+ return reconcileChildrenArray(
+ returnFiber,
+ currentFirstChild,
+ newChild,
+ lanes
+ );
+ if (getIteratorFn(newChild))
+ return reconcileChildrenIterator(
+ returnFiber,
+ currentFirstChild,
+ newChild,
+ lanes
+ );
+ throwOnInvalidObjectType(returnFiber, newChild);
+ }
if ("string" === typeof newChild || "number" === typeof newChild)
return (
(newChild = "" + newChild),
@@ -3220,21 +3233,6 @@ function ChildReconciler(shouldTrackSideEffects) {
(returnFiber = currentFirstChild)),
placeSingleChild(returnFiber)
);
- if (isArray(newChild))
- return reconcileChildrenArray(
- returnFiber,
- currentFirstChild,
- newChild,
- lanes
- );
- if (getIteratorFn(newChild))
- return reconcileChildrenIterator(
- returnFiber,
- currentFirstChild,
- newChild,
- lanes
- );
- isObject && throwOnInvalidObjectType(returnFiber, newChild);
if ("undefined" === typeof newChild && !isUnkeyedTopLevelFragment)
switch (returnFiber.tag) {
case 1:
@@ -3699,7 +3697,7 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
hook.memoizedState = pushEffect(1 | hookFlags, create, destroy, deps);
}
function mountEffect(create, deps) {
- return mountEffectImpl(263168, 4, create, deps);
+ return mountEffectImpl(1049600, 4, create, deps);
}
function updateEffect(create, deps) {
return updateEffectImpl(1024, 4, create, deps);
@@ -4692,7 +4690,7 @@ function updateSuspenseFallbackChildren(
(primaryChildren.pendingProps = primaryChildProps),
(workInProgress.deletions = null))
: ((primaryChildren = createWorkInProgress(current, primaryChildProps)),
- (primaryChildren.subtreeFlags = current.subtreeFlags & 262144));
+ (primaryChildren.subtreeFlags = current.subtreeFlags & 1835008));
null !== currentFallbackChildFragment
? (fallbackChildren = createWorkInProgress(
currentFallbackChildFragment,
@@ -4893,14 +4891,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
break;
case "collapsed":
lastTailNode = renderState.tail;
- for (var lastTailNode$62 = null; null !== lastTailNode; )
- null !== lastTailNode.alternate && (lastTailNode$62 = lastTailNode),
+ for (var lastTailNode$64 = null; null !== lastTailNode; )
+ null !== lastTailNode.alternate && (lastTailNode$64 = lastTailNode),
(lastTailNode = lastTailNode.sibling);
- null === lastTailNode$62
+ null === lastTailNode$64
? hasRenderedATailFallback || null === renderState.tail
? (renderState.tail = null)
: (renderState.tail.sibling = null)
- : (lastTailNode$62.sibling = null);
+ : (lastTailNode$64.sibling = null);
}
}
function bubbleProperties(completedWork) {
@@ -4910,19 +4908,19 @@ function bubbleProperties(completedWork) {
newChildLanes = 0,
subtreeFlags = 0;
if (didBailout)
- for (var child$63 = completedWork.child; null !== child$63; )
- (newChildLanes |= child$63.lanes | child$63.childLanes),
- (subtreeFlags |= child$63.subtreeFlags & 262144),
- (subtreeFlags |= child$63.flags & 262144),
- (child$63.return = completedWork),
- (child$63 = child$63.sibling);
+ for (var child$65 = completedWork.child; null !== child$65; )
+ (newChildLanes |= child$65.lanes | child$65.childLanes),
+ (subtreeFlags |= child$65.subtreeFlags & 1835008),
+ (subtreeFlags |= child$65.flags & 1835008),
+ (child$65.return = completedWork),
+ (child$65 = child$65.sibling);
else
- for (child$63 = completedWork.child; null !== child$63; )
- (newChildLanes |= child$63.lanes | child$63.childLanes),
- (subtreeFlags |= child$63.subtreeFlags),
- (subtreeFlags |= child$63.flags),
- (child$63.return = completedWork),
- (child$63 = child$63.sibling);
+ for (child$65 = completedWork.child; null !== child$65; )
+ (newChildLanes |= child$65.lanes | child$65.childLanes),
+ (subtreeFlags |= child$65.subtreeFlags),
+ (subtreeFlags |= child$65.flags),
+ (child$65.return = completedWork),
+ (child$65 = child$65.sibling);
completedWork.subtreeFlags |= subtreeFlags;
completedWork.childLanes = newChildLanes;
return didBailout;
@@ -5124,7 +5122,7 @@ function completeWork(current, workInProgress, renderLanes) {
for (newProps = workInProgress.child; null !== newProps; )
(renderLanes = newProps),
(type = current),
- (renderLanes.flags &= 262146),
+ (renderLanes.flags &= 1835010),
(updatePayload = renderLanes.alternate),
null === updatePayload
? ((renderLanes.childLanes = 0),
@@ -5492,8 +5490,8 @@ function commitHookEffectListMount(tag, finishedWork) {
var effect = (finishedWork = finishedWork.next);
do {
if ((effect.tag & tag) === tag) {
- var create$80 = effect.create;
- effect.destroy = create$80();
+ var create$82 = effect.create;
+ effect.destroy = create$82();
}
effect = effect.next;
} while (effect !== finishedWork);
@@ -5698,10 +5696,9 @@ function commitPlacement(finishedWork) {
: insertOrAppendPlacementNode(finishedWork, parentFiber, parent);
}
function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
- var tag = node.tag,
- isHost = 5 === tag || 6 === tag;
- if (isHost)
- if (((node = isHost ? node.stateNode : node.stateNode.instance), before)) {
+ var tag = node.tag;
+ if (5 === tag || 6 === tag)
+ if (((node = node.stateNode), before)) {
if ("number" === typeof parent)
throw Error("Container does not support insertBefore operation");
} else
@@ -5719,58 +5716,57 @@ function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
(node = node.sibling);
}
function insertOrAppendPlacementNode(node, before, parent) {
- var tag = node.tag,
- isHost = 5 === tag || 6 === tag;
- if (isHost)
- (node = isHost ? node.stateNode : node.stateNode.instance),
- before
- ? ((tag = parent._children),
- (isHost = tag.indexOf(node)),
- 0 <= isHost
- ? (tag.splice(isHost, 1),
- (before = tag.indexOf(before)),
- tag.splice(before, 0, node),
- ReactNativePrivateInterface.UIManager.manageChildren(
- parent._nativeTag,
- [isHost],
- [before],
- [],
- [],
- []
- ))
- : ((before = tag.indexOf(before)),
- tag.splice(before, 0, node),
- ReactNativePrivateInterface.UIManager.manageChildren(
- parent._nativeTag,
- [],
- [],
- ["number" === typeof node ? node : node._nativeTag],
- [before],
- []
- )))
- : ((before = "number" === typeof node ? node : node._nativeTag),
- (tag = parent._children),
- (isHost = tag.indexOf(node)),
- 0 <= isHost
- ? (tag.splice(isHost, 1),
- tag.push(node),
- ReactNativePrivateInterface.UIManager.manageChildren(
- parent._nativeTag,
- [isHost],
- [tag.length - 1],
- [],
- [],
- []
- ))
- : (tag.push(node),
- ReactNativePrivateInterface.UIManager.manageChildren(
- parent._nativeTag,
- [],
- [],
- [before],
- [tag.length - 1],
- []
- )));
+ var tag = node.tag;
+ if (5 === tag || 6 === tag)
+ if (((node = node.stateNode), before)) {
+ tag = parent._children;
+ var index = tag.indexOf(node);
+ 0 <= index
+ ? (tag.splice(index, 1),
+ (before = tag.indexOf(before)),
+ tag.splice(before, 0, node),
+ ReactNativePrivateInterface.UIManager.manageChildren(
+ parent._nativeTag,
+ [index],
+ [before],
+ [],
+ [],
+ []
+ ))
+ : ((before = tag.indexOf(before)),
+ tag.splice(before, 0, node),
+ ReactNativePrivateInterface.UIManager.manageChildren(
+ parent._nativeTag,
+ [],
+ [],
+ ["number" === typeof node ? node : node._nativeTag],
+ [before],
+ []
+ ));
+ } else
+ (before = "number" === typeof node ? node : node._nativeTag),
+ (tag = parent._children),
+ (index = tag.indexOf(node)),
+ 0 <= index
+ ? (tag.splice(index, 1),
+ tag.push(node),
+ ReactNativePrivateInterface.UIManager.manageChildren(
+ parent._nativeTag,
+ [index],
+ [tag.length - 1],
+ [],
+ [],
+ []
+ ))
+ : (tag.push(node),
+ ReactNativePrivateInterface.UIManager.manageChildren(
+ parent._nativeTag,
+ [],
+ [],
+ [before],
+ [tag.length - 1],
+ []
+ ));
else if (4 !== tag && ((node = node.child), null !== node))
for (
insertOrAppendPlacementNode(node, before, parent), node = node.sibling;
@@ -6092,8 +6088,8 @@ function commitLayoutEffects(finishedWork) {
commitUpdateQueue(firstChild, updateQueue, instance);
break;
case 3:
- var updateQueue$81 = firstChild.updateQueue;
- if (null !== updateQueue$81) {
+ var updateQueue$83 = firstChild.updateQueue;
+ if (null !== updateQueue$83) {
current = null;
if (null !== firstChild.child)
switch (firstChild.child.tag) {
@@ -6103,7 +6099,7 @@ function commitLayoutEffects(finishedWork) {
case 1:
current = firstChild.child.stateNode;
}
- commitUpdateQueue(firstChild, updateQueue$81, current);
+ commitUpdateQueue(firstChild, updateQueue$83, current);
}
break;
case 5:
@@ -6165,6 +6161,7 @@ function commitLayoutEffects(finishedWork) {
var ceil = Math.ceil,
ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
+ ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig,
executionContext = 0,
workInProgressRoot = null,
workInProgress = null,
@@ -6616,15 +6613,15 @@ function handleError(root$jscomp$0, thrownValue) {
}
var hasInvisibleParentBoundary =
0 !== (suspenseStackCursor.current & 1),
- workInProgress$75 = returnFiber;
+ workInProgress$77 = returnFiber;
do {
var JSCompiler_temp;
- if ((JSCompiler_temp = 13 === workInProgress$75.tag)) {
- var nextState = workInProgress$75.memoizedState;
+ if ((JSCompiler_temp = 13 === workInProgress$77.tag)) {
+ var nextState = workInProgress$77.memoizedState;
if (null !== nextState)
JSCompiler_temp = null !== nextState.dehydrated ? !0 : !1;
else {
- var props = workInProgress$75.memoizedProps;
+ var props = workInProgress$77.memoizedProps;
JSCompiler_temp =
void 0 === props.fallback
? !1
@@ -6636,17 +6633,17 @@ function handleError(root$jscomp$0, thrownValue) {
}
}
if (JSCompiler_temp) {
- var wakeables = workInProgress$75.updateQueue;
+ var wakeables = workInProgress$77.updateQueue;
if (null === wakeables) {
var updateQueue = new Set();
updateQueue.add(wakeable);
- workInProgress$75.updateQueue = updateQueue;
+ workInProgress$77.updateQueue = updateQueue;
} else wakeables.add(wakeable);
if (
- 0 === (workInProgress$75.mode & 1) &&
- workInProgress$75 !== returnFiber
+ 0 === (workInProgress$77.mode & 1) &&
+ workInProgress$77 !== returnFiber
) {
- workInProgress$75.flags |= 128;
+ workInProgress$77.flags |= 128;
sourceFiber.flags |= 32768;
sourceFiber.flags &= -10053;
if (1 === sourceFiber.tag)
@@ -6679,12 +6676,12 @@ function handleError(root$jscomp$0, thrownValue) {
);
wakeable.then(ping, ping);
}
- workInProgress$75.flags |= 16384;
- workInProgress$75.lanes = thrownValue;
+ workInProgress$77.flags |= 16384;
+ workInProgress$77.lanes = thrownValue;
break a;
}
- workInProgress$75 = workInProgress$75.return;
- } while (null !== workInProgress$75);
+ workInProgress$77 = workInProgress$77.return;
+ } while (null !== workInProgress$77);
value = Error(
(getComponentNameFromFiber(sourceFiber) || "A React component") +
" suspended while rendering, but no fallback UI was specified.\n\nAdd a component higher in the tree to provide a loading indicator or placeholder to display."
@@ -6693,47 +6690,47 @@ function handleError(root$jscomp$0, thrownValue) {
5 !== workInProgressRootExitStatus &&
(workInProgressRootExitStatus = 2);
value = createCapturedValue(value, sourceFiber);
- workInProgress$75 = returnFiber;
+ workInProgress$77 = returnFiber;
do {
- switch (workInProgress$75.tag) {
+ switch (workInProgress$77.tag) {
case 3:
root = value;
- workInProgress$75.flags |= 16384;
+ workInProgress$77.flags |= 16384;
thrownValue &= -thrownValue;
- workInProgress$75.lanes |= thrownValue;
- var update$76 = createRootErrorUpdate(
- workInProgress$75,
+ workInProgress$77.lanes |= thrownValue;
+ var update$78 = createRootErrorUpdate(
+ workInProgress$77,
root,
thrownValue
);
- enqueueCapturedUpdate(workInProgress$75, update$76);
+ enqueueCapturedUpdate(workInProgress$77, update$78);
break a;
case 1:
root = value;
- var ctor = workInProgress$75.type,
- instance = workInProgress$75.stateNode;
+ var ctor = workInProgress$77.type,
+ instance = workInProgress$77.stateNode;
if (
- 0 === (workInProgress$75.flags & 128) &&
+ 0 === (workInProgress$77.flags & 128) &&
("function" === typeof ctor.getDerivedStateFromError ||
(null !== instance &&
"function" === typeof instance.componentDidCatch &&
(null === legacyErrorBoundariesThatAlreadyFailed ||
!legacyErrorBoundariesThatAlreadyFailed.has(instance))))
) {
- workInProgress$75.flags |= 16384;
+ workInProgress$77.flags |= 16384;
thrownValue &= -thrownValue;
- workInProgress$75.lanes |= thrownValue;
- var update$79 = createClassErrorUpdate(
- workInProgress$75,
+ workInProgress$77.lanes |= thrownValue;
+ var update$81 = createClassErrorUpdate(
+ workInProgress$77,
root,
thrownValue
);
- enqueueCapturedUpdate(workInProgress$75, update$79);
+ enqueueCapturedUpdate(workInProgress$77, update$81);
break a;
}
}
- workInProgress$75 = workInProgress$75.return;
- } while (null !== workInProgress$75);
+ workInProgress$77 = workInProgress$77.return;
+ } while (null !== workInProgress$77);
}
completeUnitOfWork(erroredWork);
} catch (yetAnotherThrownValue) {
@@ -6824,12 +6821,15 @@ function completeUnitOfWork(unitOfWork) {
0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);
}
function commitRoot(root) {
- var previousUpdateLanePriority = currentUpdatePriority;
+ var previousUpdateLanePriority = currentUpdatePriority,
+ prevTransition = ReactCurrentBatchConfig$2.transition;
try {
- (currentUpdatePriority = 1),
+ (ReactCurrentBatchConfig$2.transition = 0),
+ (currentUpdatePriority = 1),
commitRootImpl(root, previousUpdateLanePriority);
} finally {
- currentUpdatePriority = previousUpdateLanePriority;
+ (ReactCurrentBatchConfig$2.transition = prevTransition),
+ (currentUpdatePriority = previousUpdateLanePriority);
}
return null;
}
@@ -6864,7 +6864,9 @@ function commitRootImpl(root, renderPriorityLevel) {
}));
remainingLanes = 0 !== (finishedWork.flags & 8054);
if (0 !== (finishedWork.subtreeFlags & 8054) || remainingLanes) {
- remainingLanes = currentUpdatePriority;
+ remainingLanes = ReactCurrentBatchConfig$2.transition;
+ ReactCurrentBatchConfig$2.transition = 0;
+ var previousPriority = currentUpdatePriority;
currentUpdatePriority = 1;
var prevExecutionContext = executionContext;
executionContext |= 16;
@@ -6875,7 +6877,8 @@ function commitRootImpl(root, renderPriorityLevel) {
commitLayoutEffects(finishedWork, root, lanes);
requestPaint();
executionContext = prevExecutionContext;
- currentUpdatePriority = remainingLanes;
+ currentUpdatePriority = previousPriority;
+ ReactCurrentBatchConfig$2.transition = remainingLanes;
} else root.current = finishedWork;
rootDoesHavePassiveEffects &&
((rootDoesHavePassiveEffects = !1),
@@ -6896,26 +6899,31 @@ function commitRootImpl(root, renderPriorityLevel) {
(firstUncaughtError = null),
root);
if (0 !== (executionContext & 4)) return null;
+ 0 !== (pendingPassiveEffectsLanes & 1) &&
+ 0 !== root.tag &&
+ flushPassiveEffects();
flushSyncCallbackQueue();
return null;
}
function flushPassiveEffects() {
- if (0 !== pendingPassiveEffectsLanes) {
- var b = lanesToEventPriority(pendingPassiveEffectsLanes),
+ if (null !== rootWithPendingPassiveEffects) {
+ var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
+ prevTransition = ReactCurrentBatchConfig$2.transition,
previousPriority = currentUpdatePriority;
try {
- currentUpdatePriority = 16 < b ? 16 : b;
+ ReactCurrentBatchConfig$2.transition = 0;
+ currentUpdatePriority = 16 > renderPriority ? 16 : renderPriority;
if (null === rootWithPendingPassiveEffects)
var JSCompiler_inline_result = !1;
else {
- var root = rootWithPendingPassiveEffects;
+ renderPriority = rootWithPendingPassiveEffects;
rootWithPendingPassiveEffects = null;
pendingPassiveEffectsLanes = 0;
if (0 !== (executionContext & 24))
throw Error("Cannot flush passive effects while already rendering.");
- b = executionContext;
+ var prevExecutionContext = executionContext;
executionContext |= 16;
- for (nextEffect = root.current; null !== nextEffect; ) {
+ for (nextEffect = renderPriority.current; null !== nextEffect; ) {
var fiber = nextEffect,
child = fiber.child;
if (0 !== (nextEffect.flags & 16)) {
@@ -6990,7 +6998,7 @@ function flushPassiveEffects() {
nextEffect = fiber.return;
}
}
- var finishedWork = root.current;
+ var finishedWork = renderPriority.current;
for (nextEffect = finishedWork; null !== nextEffect; ) {
child = nextEffect;
var firstChild = child.child;
@@ -7023,13 +7031,21 @@ function flushPassiveEffects() {
nextEffect = deletions.return;
}
}
- executionContext = b;
+ executionContext = prevExecutionContext;
flushSyncCallbackQueue();
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, renderPriority);
+ } catch (err) {}
JSCompiler_inline_result = !0;
}
return JSCompiler_inline_result;
} finally {
- currentUpdatePriority = previousPriority;
+ (currentUpdatePriority = previousPriority),
+ (ReactCurrentBatchConfig$2.transition = prevTransition);
}
}
return !1;
@@ -7248,14 +7264,6 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
? nextValue.state
: null;
initializeUpdateQueue(workInProgress);
- var getDerivedStateFromProps = updateLanes.getDerivedStateFromProps;
- "function" === typeof getDerivedStateFromProps &&
- applyDerivedStateFromProps(
- workInProgress,
- updateLanes,
- getDerivedStateFromProps,
- current
- );
nextValue.updater = classComponentUpdater;
workInProgress.stateNode = nextValue;
nextValue._reactInternals = workInProgress;
@@ -7470,11 +7478,11 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
updateLanes = workInProgress.type._context;
nextValue = workInProgress.pendingProps;
hasContext = workInProgress.memoizedProps;
- getDerivedStateFromProps = nextValue.value;
+ var newValue = nextValue.value;
push(valueCursor, updateLanes._currentValue);
- updateLanes._currentValue = getDerivedStateFromProps;
+ updateLanes._currentValue = newValue;
if (null !== hasContext)
- if (objectIs(hasContext.value, getDerivedStateFromProps)) {
+ if (objectIs(hasContext.value, newValue)) {
if (
hasContext.children === nextValue.children &&
!didPerformWorkStackCursor.current
@@ -7488,25 +7496,24 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
}
} else
for (
- getDerivedStateFromProps = workInProgress.child,
- null !== getDerivedStateFromProps &&
- (getDerivedStateFromProps.return = workInProgress);
- null !== getDerivedStateFromProps;
+ newValue = workInProgress.child,
+ null !== newValue && (newValue.return = workInProgress);
+ null !== newValue;
) {
- var list = getDerivedStateFromProps.dependencies;
+ var list = newValue.dependencies;
if (null !== list) {
- hasContext = getDerivedStateFromProps.child;
+ hasContext = newValue.child;
for (
var dependency = list.firstContext;
null !== dependency;
) {
if (dependency.context === updateLanes) {
- if (1 === getDerivedStateFromProps.tag) {
+ if (1 === newValue.tag) {
dependency = createUpdate(-1, renderLanes & -renderLanes);
dependency.tag = 2;
- var updateQueue = getDerivedStateFromProps.updateQueue;
+ var updateQueue = newValue.updateQueue;
if (null !== updateQueue) {
updateQueue = updateQueue.shared;
var pending = updateQueue.pending;
@@ -7517,13 +7524,10 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
updateQueue.pending = dependency;
}
}
- getDerivedStateFromProps.lanes |= renderLanes;
- dependency = getDerivedStateFromProps.alternate;
+ newValue.lanes |= renderLanes;
+ dependency = newValue.alternate;
null !== dependency && (dependency.lanes |= renderLanes);
- scheduleWorkOnParentPath(
- getDerivedStateFromProps.return,
- renderLanes
- );
+ scheduleWorkOnParentPath(newValue.return, renderLanes);
list.lanes |= renderLanes;
break;
}
@@ -7531,32 +7535,27 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
}
} else
hasContext =
- 10 === getDerivedStateFromProps.tag
- ? getDerivedStateFromProps.type === workInProgress.type
+ 10 === newValue.tag
+ ? newValue.type === workInProgress.type
? null
- : getDerivedStateFromProps.child
- : getDerivedStateFromProps.child;
- if (null !== hasContext)
- hasContext.return = getDerivedStateFromProps;
+ : newValue.child
+ : newValue.child;
+ if (null !== hasContext) hasContext.return = newValue;
else
- for (
- hasContext = getDerivedStateFromProps;
- null !== hasContext;
-
- ) {
+ for (hasContext = newValue; null !== hasContext; ) {
if (hasContext === workInProgress) {
hasContext = null;
break;
}
- getDerivedStateFromProps = hasContext.sibling;
- if (null !== getDerivedStateFromProps) {
- getDerivedStateFromProps.return = hasContext.return;
- hasContext = getDerivedStateFromProps;
+ newValue = hasContext.sibling;
+ if (null !== newValue) {
+ newValue.return = hasContext.return;
+ hasContext = newValue;
break;
}
hasContext = hasContext.return;
}
- getDerivedStateFromProps = hasContext;
+ newValue = hasContext;
}
reconcileChildren(
current,
@@ -7695,7 +7694,7 @@ function createWorkInProgress(current, pendingProps) {
(workInProgress.flags = 0),
(workInProgress.subtreeFlags = 0),
(workInProgress.deletions = null));
- workInProgress.flags = current.flags & 262144;
+ workInProgress.flags = current.flags & 1835008;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -7966,7 +7965,7 @@ batchedUpdatesImpl = function(fn, a) {
}
};
var roots = new Map(),
- devToolsConfig$jscomp$inline_984 = {
+ devToolsConfig$jscomp$inline_985 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "17.0.3",
@@ -7984,11 +7983,11 @@ var roots = new Map(),
}.bind(null, findNodeHandle)
}
};
-var internals$jscomp$inline_1234 = {
- bundleType: devToolsConfig$jscomp$inline_984.bundleType,
- version: devToolsConfig$jscomp$inline_984.version,
- rendererPackageName: devToolsConfig$jscomp$inline_984.rendererPackageName,
- rendererConfig: devToolsConfig$jscomp$inline_984.rendererConfig,
+var internals$jscomp$inline_1238 = {
+ bundleType: devToolsConfig$jscomp$inline_985.bundleType,
+ version: devToolsConfig$jscomp$inline_985.version,
+ rendererPackageName: devToolsConfig$jscomp$inline_985.rendererPackageName,
+ rendererConfig: devToolsConfig$jscomp$inline_985.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -8003,25 +8002,26 @@ var internals$jscomp$inline_1234 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
- devToolsConfig$jscomp$inline_984.findFiberByHostInstance ||
+ devToolsConfig$jscomp$inline_985.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
- getCurrentFiber: null
+ getCurrentFiber: null,
+ reconcilerVersion: "17.0.3"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
- var hook$jscomp$inline_1235 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+ var hook$jscomp$inline_1239 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
- !hook$jscomp$inline_1235.isDisabled &&
- hook$jscomp$inline_1235.supportsFiber
+ !hook$jscomp$inline_1239.isDisabled &&
+ hook$jscomp$inline_1239.supportsFiber
)
try {
- (rendererID = hook$jscomp$inline_1235.inject(
- internals$jscomp$inline_1234
+ (rendererID = hook$jscomp$inline_1239.inject(
+ internals$jscomp$inline_1238
)),
- (injectedHook = hook$jscomp$inline_1235);
+ (injectedHook = hook$jscomp$inline_1239);
} catch (err) {}
}
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js
index d46043b8138766..d809588b6b1fd1 100644
--- a/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js
+++ b/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
- * @generated SignedSource<<1a7d2241ef385ad3a6cbcb1476a22147>>
+ * @generated SignedSource<>
*/
"use strict";
@@ -63,7 +63,8 @@ function invokeGuardedCallbackAndCatchFirstError(
hasRethrowError || ((hasRethrowError = !0), (rethrowError = error));
}
}
-var getFiberCurrentPropsFromNode = null,
+var isArrayImpl = Array.isArray,
+ getFiberCurrentPropsFromNode = null,
getInstanceFromNode = null,
getNodeFromInstance = null;
function executeDispatch(event, listener, inst) {
@@ -75,7 +76,7 @@ function executeDispatch(event, listener, inst) {
function executeDirectDispatch(event) {
var dispatchListener = event._dispatchListeners,
dispatchInstance = event._dispatchInstances;
- if (Array.isArray(dispatchListener))
+ if (isArrayImpl(dispatchListener))
throw Error("executeDirectDispatch(...): Invalid `event`.");
event.currentTarget = dispatchListener
? getNodeFromInstance(dispatchInstance)
@@ -336,9 +337,9 @@ function accumulate(current, next) {
);
return null == current
? next
- : Array.isArray(current)
+ : isArrayImpl(current)
? current.concat(next)
- : Array.isArray(next)
+ : isArrayImpl(next)
? [current].concat(next)
: [current, next];
}
@@ -348,12 +349,12 @@ function accumulateInto(current, next) {
"accumulateInto(...): Accumulated items must not be null or undefined."
);
if (null == current) return next;
- if (Array.isArray(current)) {
- if (Array.isArray(next)) return current.push.apply(current, next), current;
+ if (isArrayImpl(current)) {
+ if (isArrayImpl(next)) return current.push.apply(current, next), current;
current.push(next);
return current;
}
- return Array.isArray(next) ? [current].concat(next) : [current, next];
+ return isArrayImpl(next) ? [current].concat(next) : [current, next];
}
function forEachAccumulated(arr, cb, scope) {
Array.isArray(arr) ? arr.forEach(cb, scope) : arr && cb.call(scope, arr);
@@ -579,7 +580,7 @@ var ResponderEventPlugin = {
b: {
JSCompiler_temp = shouldSetEventType._dispatchListeners;
targetInst = shouldSetEventType._dispatchInstances;
- if (Array.isArray(JSCompiler_temp))
+ if (isArrayImpl(JSCompiler_temp))
for (
depthA = 0;
depthA < JSCompiler_temp.length &&
@@ -930,7 +931,7 @@ eventPluginOrder = Array.prototype.slice.call([
"ReactNativeBridgeEventPlugin"
]);
recomputePluginOrdering();
-var injectedNamesToPlugins$jscomp$inline_223 = {
+var injectedNamesToPlugins$jscomp$inline_224 = {
ResponderEventPlugin: ResponderEventPlugin,
ReactNativeBridgeEventPlugin: {
eventTypes: {},
@@ -965,34 +966,34 @@ var injectedNamesToPlugins$jscomp$inline_223 = {
}
}
},
- isOrderingDirty$jscomp$inline_224 = !1,
- pluginName$jscomp$inline_225;
-for (pluginName$jscomp$inline_225 in injectedNamesToPlugins$jscomp$inline_223)
+ isOrderingDirty$jscomp$inline_225 = !1,
+ pluginName$jscomp$inline_226;
+for (pluginName$jscomp$inline_226 in injectedNamesToPlugins$jscomp$inline_224)
if (
- injectedNamesToPlugins$jscomp$inline_223.hasOwnProperty(
- pluginName$jscomp$inline_225
+ injectedNamesToPlugins$jscomp$inline_224.hasOwnProperty(
+ pluginName$jscomp$inline_226
)
) {
- var pluginModule$jscomp$inline_226 =
- injectedNamesToPlugins$jscomp$inline_223[pluginName$jscomp$inline_225];
+ var pluginModule$jscomp$inline_227 =
+ injectedNamesToPlugins$jscomp$inline_224[pluginName$jscomp$inline_226];
if (
- !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_225) ||
- namesToPlugins[pluginName$jscomp$inline_225] !==
- pluginModule$jscomp$inline_226
+ !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_226) ||
+ namesToPlugins[pluginName$jscomp$inline_226] !==
+ pluginModule$jscomp$inline_227
) {
- if (namesToPlugins[pluginName$jscomp$inline_225])
+ if (namesToPlugins[pluginName$jscomp$inline_226])
throw Error(
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
- pluginName$jscomp$inline_225 +
+ pluginName$jscomp$inline_226 +
"`."
);
namesToPlugins[
- pluginName$jscomp$inline_225
- ] = pluginModule$jscomp$inline_226;
- isOrderingDirty$jscomp$inline_224 = !0;
+ pluginName$jscomp$inline_226
+ ] = pluginModule$jscomp$inline_227;
+ isOrderingDirty$jscomp$inline_225 = !0;
}
}
-isOrderingDirty$jscomp$inline_224 && recomputePluginOrdering();
+isOrderingDirty$jscomp$inline_225 && recomputePluginOrdering();
var instanceCache = new Map(),
instanceProps = new Map();
function getInstanceFromTag(tag) {
@@ -1016,7 +1017,7 @@ function executeDispatchesAndReleaseTopLevel(e) {
if (e) {
var dispatchListeners = e._dispatchListeners,
dispatchInstances = e._dispatchInstances;
- if (Array.isArray(dispatchListeners))
+ if (isArrayImpl(dispatchListeners))
for (
var i = 0;
i < dispatchListeners.length && !e.isPropagationStopped();
@@ -1417,7 +1418,7 @@ function restoreDeletedValuesInNestedArray(
node,
validAttributes
) {
- if (Array.isArray(node))
+ if (isArrayImpl(node))
for (var i = node.length; i-- && 0 < removedKeyCount; )
restoreDeletedValuesInNestedArray(
updatePayload,
@@ -1463,9 +1464,9 @@ function diffNestedProperty(
: prevProp
? clearNestedProperty(updatePayload, prevProp, validAttributes)
: updatePayload;
- if (!Array.isArray(prevProp) && !Array.isArray(nextProp))
+ if (!isArrayImpl(prevProp) && !isArrayImpl(nextProp))
return diffProperties(updatePayload, prevProp, nextProp, validAttributes);
- if (Array.isArray(prevProp) && Array.isArray(nextProp)) {
+ if (isArrayImpl(prevProp) && isArrayImpl(nextProp)) {
var minLength =
prevProp.length < nextProp.length ? prevProp.length : nextProp.length,
i;
@@ -1490,7 +1491,7 @@ function diffNestedProperty(
);
return updatePayload;
}
- return Array.isArray(prevProp)
+ return isArrayImpl(prevProp)
? diffProperties(
updatePayload,
ReactNativePrivateInterface.flattenStyle(prevProp),
@@ -1506,7 +1507,7 @@ function diffNestedProperty(
}
function addNestedProperty(updatePayload, nextProp, validAttributes) {
if (!nextProp) return updatePayload;
- if (!Array.isArray(nextProp))
+ if (!isArrayImpl(nextProp))
return diffProperties(
updatePayload,
emptyObject,
@@ -1523,7 +1524,7 @@ function addNestedProperty(updatePayload, nextProp, validAttributes) {
}
function clearNestedProperty(updatePayload, prevProp, validAttributes) {
if (!prevProp) return updatePayload;
- if (!Array.isArray(prevProp))
+ if (!isArrayImpl(prevProp))
return diffProperties(
updatePayload,
prevProp,
@@ -1687,7 +1688,54 @@ var ReactNativeFiberHostComponent = (function() {
};
return ReactNativeFiberHostComponent;
})(),
- nextTransitionLane = 64,
+ scheduleCallback = Scheduler.unstable_scheduleCallback,
+ cancelCallback = Scheduler.unstable_cancelCallback,
+ shouldYield = Scheduler.unstable_shouldYield,
+ requestPaint = Scheduler.unstable_requestPaint,
+ now = Scheduler.unstable_now,
+ ImmediatePriority = Scheduler.unstable_ImmediatePriority,
+ UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
+ NormalPriority = Scheduler.unstable_NormalPriority,
+ IdlePriority = Scheduler.unstable_IdlePriority;
+if (
+ null == tracing.__interactionsRef ||
+ null == tracing.__interactionsRef.current
+)
+ throw Error(
+ "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling"
+ );
+var rendererID = null,
+ injectedHook = 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 1:
+ var schedulerPriority = ImmediatePriority;
+ break;
+ case 4:
+ schedulerPriority = UserBlockingPriority;
+ break;
+ case 16:
+ schedulerPriority = NormalPriority;
+ break;
+ case 536870912:
+ schedulerPriority = IdlePriority;
+ break;
+ default:
+ schedulerPriority = NormalPriority;
+ }
+ injectedHook.onCommitFiberRoot(
+ rendererID,
+ root,
+ schedulerPriority,
+ didError
+ );
+ } catch (err) {}
+}
+var nextTransitionLane = 64,
nextRetryLane = 4194304;
function getHighestPriorityLanes(lanes) {
switch (lanes & -lanes) {
@@ -1931,7 +1979,8 @@ function describeFunctionComponentFrame(fn, source) {
? describeComponentFrame(fn.displayName || fn.name || null, source, null)
: "";
}
-var valueStack = [],
+var hasOwnProperty = Object.prototype.hasOwnProperty,
+ valueStack = [],
index = -1;
function createCursor(defaultValue) {
return { current: defaultValue };
@@ -2027,53 +2076,6 @@ function invalidateContextProvider(workInProgress, type, didChange) {
: pop(didPerformWorkStackCursor);
push(didPerformWorkStackCursor, didChange);
}
-var scheduleCallback = Scheduler.unstable_scheduleCallback,
- cancelCallback = Scheduler.unstable_cancelCallback,
- shouldYield = Scheduler.unstable_shouldYield,
- requestPaint = Scheduler.unstable_requestPaint,
- now = Scheduler.unstable_now,
- ImmediatePriority = Scheduler.unstable_ImmediatePriority,
- UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
- NormalPriority = Scheduler.unstable_NormalPriority,
- IdlePriority = Scheduler.unstable_IdlePriority;
-if (
- null == tracing.__interactionsRef ||
- null == tracing.__interactionsRef.current
-)
- throw Error(
- "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling"
- );
-var rendererID = null,
- injectedHook = 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 1:
- var schedulerPriority = ImmediatePriority;
- break;
- case 4:
- schedulerPriority = UserBlockingPriority;
- break;
- case 16:
- schedulerPriority = NormalPriority;
- break;
- case 536870912:
- schedulerPriority = IdlePriority;
- break;
- default:
- schedulerPriority = NormalPriority;
- }
- injectedHook.onCommitFiberRoot(
- rendererID,
- root,
- schedulerPriority,
- didError
- );
- } catch (err) {}
-}
var syncQueue = null,
isFlushingSyncQueue = !1;
function flushSyncCallbackQueue() {
@@ -2104,8 +2106,7 @@ var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
function is(x, y) {
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
}
-var objectIs = "function" === typeof Object.is ? Object.is : is,
- hasOwnProperty = Object.prototype.hasOwnProperty;
+var objectIs = "function" === typeof Object.is ? Object.is : is;
function shallowEqual(objA, objB) {
if (objectIs(objA, objB)) return !0;
if (
@@ -2610,7 +2611,6 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
? previousContext
: contextStackCursor.current),
(instance.context = getMaskedContext(workInProgress, contextType)));
- processUpdateQueue(workInProgress, newProps, instance, renderLanes);
instance.state = workInProgress.memoizedState;
contextType = ctor.getDerivedStateFromProps;
"function" === typeof contextType &&
@@ -2632,7 +2632,6 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
"function" === typeof instance.componentDidMount &&
(workInProgress.flags |= 4);
}
-var isArray = Array.isArray;
function coerceRef(returnFiber, current, element) {
returnFiber = element.ref;
if (
@@ -2685,15 +2684,14 @@ function coerceRef(returnFiber, current, element) {
return returnFiber;
}
function throwOnInvalidObjectType(returnFiber, newChild) {
- if ("textarea" !== returnFiber.type)
- throw ((returnFiber = Object.prototype.toString.call(newChild)),
- Error(
- "Objects are not valid as a React child (found: " +
- ("[object Object]" === returnFiber
- ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
- : returnFiber) +
- "). If you meant to render a collection of children, use an array instead."
- ));
+ returnFiber = Object.prototype.toString.call(newChild);
+ throw Error(
+ "Objects are not valid as a React child (found: " +
+ ("[object Object]" === returnFiber
+ ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
+ : returnFiber) +
+ "). If you meant to render a collection of children, use an array instead."
+ );
}
function ChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
@@ -2855,7 +2853,7 @@ function ChildReconciler(shouldTrackSideEffects) {
newChild
);
}
- if (isArray(newChild) || getIteratorFn(newChild))
+ if (isArrayImpl(newChild) || getIteratorFn(newChild))
return (
(newChild = createFiberFromFragment(
newChild,
@@ -2887,7 +2885,7 @@ function ChildReconciler(shouldTrackSideEffects) {
? updatePortal(returnFiber, oldFiber, newChild, lanes)
: null;
}
- if (isArray(newChild) || getIteratorFn(newChild))
+ if (isArrayImpl(newChild) || getIteratorFn(newChild))
return null !== key
? null
: updateFragment(returnFiber, oldFiber, newChild, lanes, null);
@@ -2926,7 +2924,7 @@ function ChildReconciler(shouldTrackSideEffects) {
updatePortal(returnFiber, existingChildren, newChild, lanes)
);
}
- if (isArray(newChild) || getIteratorFn(newChild))
+ if (isArrayImpl(newChild) || getIteratorFn(newChild))
return (
(existingChildren = existingChildren.get(newIdx) || null),
updateFragment(returnFiber, existingChildren, newChild, lanes, null)
@@ -3109,20 +3107,19 @@ function ChildReconciler(shouldTrackSideEffects) {
newChild.type === REACT_FRAGMENT_TYPE &&
null === newChild.key;
isUnkeyedTopLevelFragment && (newChild = newChild.props.children);
- var isObject = "object" === typeof newChild && null !== newChild;
- if (isObject)
+ if ("object" === typeof newChild && null !== newChild) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
a: {
- isObject = newChild.key;
+ var key = newChild.key;
for (
isUnkeyedTopLevelFragment = currentFirstChild;
null !== isUnkeyedTopLevelFragment;
) {
- if (isUnkeyedTopLevelFragment.key === isObject) {
- isObject = newChild.type;
- if (isObject === REACT_FRAGMENT_TYPE) {
+ if (isUnkeyedTopLevelFragment.key === key) {
+ key = newChild.type;
+ if (key === REACT_FRAGMENT_TYPE) {
if (7 === isUnkeyedTopLevelFragment.tag) {
deleteRemainingChildren(
returnFiber,
@@ -3136,7 +3133,7 @@ function ChildReconciler(shouldTrackSideEffects) {
returnFiber = currentFirstChild;
break a;
}
- } else if (isUnkeyedTopLevelFragment.elementType === isObject) {
+ } else if (isUnkeyedTopLevelFragment.elementType === key) {
deleteRemainingChildren(
returnFiber,
isUnkeyedTopLevelFragment.sibling
@@ -3228,6 +3225,22 @@ function ChildReconciler(shouldTrackSideEffects) {
}
return placeSingleChild(returnFiber);
}
+ if (isArrayImpl(newChild))
+ return reconcileChildrenArray(
+ returnFiber,
+ currentFirstChild,
+ newChild,
+ lanes
+ );
+ if (getIteratorFn(newChild))
+ return reconcileChildrenIterator(
+ returnFiber,
+ currentFirstChild,
+ newChild,
+ lanes
+ );
+ throwOnInvalidObjectType(returnFiber, newChild);
+ }
if ("string" === typeof newChild || "number" === typeof newChild)
return (
(newChild = "" + newChild),
@@ -3246,21 +3259,6 @@ function ChildReconciler(shouldTrackSideEffects) {
(returnFiber = currentFirstChild)),
placeSingleChild(returnFiber)
);
- if (isArray(newChild))
- return reconcileChildrenArray(
- returnFiber,
- currentFirstChild,
- newChild,
- lanes
- );
- if (getIteratorFn(newChild))
- return reconcileChildrenIterator(
- returnFiber,
- currentFirstChild,
- newChild,
- lanes
- );
- isObject && throwOnInvalidObjectType(returnFiber, newChild);
if ("undefined" === typeof newChild && !isUnkeyedTopLevelFragment)
switch (returnFiber.tag) {
case 1:
@@ -3725,7 +3723,7 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
hook.memoizedState = pushEffect(1 | hookFlags, create, destroy, deps);
}
function mountEffect(create, deps) {
- return mountEffectImpl(263168, 4, create, deps);
+ return mountEffectImpl(1049600, 4, create, deps);
}
function updateEffect(create, deps) {
return updateEffectImpl(1024, 4, create, deps);
@@ -4749,7 +4747,7 @@ function updateSuspenseFallbackChildren(
(primaryChildren.treeBaseDuration = current.treeBaseDuration)),
(workInProgress.deletions = null))
: ((primaryChildren = createWorkInProgress(current, primaryChildProps)),
- (primaryChildren.subtreeFlags = current.subtreeFlags & 262144));
+ (primaryChildren.subtreeFlags = current.subtreeFlags & 1835008));
null !== currentFallbackChildFragment
? (fallbackChildren = createWorkInProgress(
currentFallbackChildFragment,
@@ -4951,14 +4949,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
break;
case "collapsed":
lastTailNode = renderState.tail;
- for (var lastTailNode$63 = null; null !== lastTailNode; )
- null !== lastTailNode.alternate && (lastTailNode$63 = lastTailNode),
+ for (var lastTailNode$65 = null; null !== lastTailNode; )
+ null !== lastTailNode.alternate && (lastTailNode$65 = lastTailNode),
(lastTailNode = lastTailNode.sibling);
- null === lastTailNode$63
+ null === lastTailNode$65
? hasRenderedATailFallback || null === renderState.tail
? (renderState.tail = null)
: (renderState.tail.sibling = null)
- : (lastTailNode$63.sibling = null);
+ : (lastTailNode$65.sibling = null);
}
}
function bubbleProperties(completedWork) {
@@ -4970,53 +4968,53 @@ function bubbleProperties(completedWork) {
if (didBailout)
if (0 !== (completedWork.mode & 2)) {
for (
- var treeBaseDuration$65 = completedWork.selfBaseDuration,
- child$66 = completedWork.child;
- null !== child$66;
+ var treeBaseDuration$67 = completedWork.selfBaseDuration,
+ child$68 = completedWork.child;
+ null !== child$68;
)
- (newChildLanes |= child$66.lanes | child$66.childLanes),
- (subtreeFlags |= child$66.subtreeFlags & 262144),
- (subtreeFlags |= child$66.flags & 262144),
- (treeBaseDuration$65 += child$66.treeBaseDuration),
- (child$66 = child$66.sibling);
- completedWork.treeBaseDuration = treeBaseDuration$65;
+ (newChildLanes |= child$68.lanes | child$68.childLanes),
+ (subtreeFlags |= child$68.subtreeFlags & 1835008),
+ (subtreeFlags |= child$68.flags & 1835008),
+ (treeBaseDuration$67 += child$68.treeBaseDuration),
+ (child$68 = child$68.sibling);
+ completedWork.treeBaseDuration = treeBaseDuration$67;
} else
for (
- treeBaseDuration$65 = completedWork.child;
- null !== treeBaseDuration$65;
+ treeBaseDuration$67 = completedWork.child;
+ null !== treeBaseDuration$67;
)
(newChildLanes |=
- treeBaseDuration$65.lanes | treeBaseDuration$65.childLanes),
- (subtreeFlags |= treeBaseDuration$65.subtreeFlags & 262144),
- (subtreeFlags |= treeBaseDuration$65.flags & 262144),
- (treeBaseDuration$65.return = completedWork),
- (treeBaseDuration$65 = treeBaseDuration$65.sibling);
+ treeBaseDuration$67.lanes | treeBaseDuration$67.childLanes),
+ (subtreeFlags |= treeBaseDuration$67.subtreeFlags & 1835008),
+ (subtreeFlags |= treeBaseDuration$67.flags & 1835008),
+ (treeBaseDuration$67.return = completedWork),
+ (treeBaseDuration$67 = treeBaseDuration$67.sibling);
else if (0 !== (completedWork.mode & 2)) {
- treeBaseDuration$65 = completedWork.actualDuration;
- child$66 = completedWork.selfBaseDuration;
+ treeBaseDuration$67 = completedWork.actualDuration;
+ child$68 = completedWork.selfBaseDuration;
for (var child = completedWork.child; null !== child; )
(newChildLanes |= child.lanes | child.childLanes),
(subtreeFlags |= child.subtreeFlags),
(subtreeFlags |= child.flags),
- (treeBaseDuration$65 += child.actualDuration),
- (child$66 += child.treeBaseDuration),
+ (treeBaseDuration$67 += child.actualDuration),
+ (child$68 += child.treeBaseDuration),
(child = child.sibling);
- completedWork.actualDuration = treeBaseDuration$65;
- completedWork.treeBaseDuration = child$66;
+ completedWork.actualDuration = treeBaseDuration$67;
+ completedWork.treeBaseDuration = child$68;
} else
for (
- treeBaseDuration$65 = completedWork.child;
- null !== treeBaseDuration$65;
+ treeBaseDuration$67 = completedWork.child;
+ null !== treeBaseDuration$67;
)
(newChildLanes |=
- treeBaseDuration$65.lanes | treeBaseDuration$65.childLanes),
- (subtreeFlags |= treeBaseDuration$65.subtreeFlags),
- (subtreeFlags |= treeBaseDuration$65.flags),
- (treeBaseDuration$65.return = completedWork),
- (treeBaseDuration$65 = treeBaseDuration$65.sibling);
+ treeBaseDuration$67.lanes | treeBaseDuration$67.childLanes),
+ (subtreeFlags |= treeBaseDuration$67.subtreeFlags),
+ (subtreeFlags |= treeBaseDuration$67.flags),
+ (treeBaseDuration$67.return = completedWork),
+ (treeBaseDuration$67 = treeBaseDuration$67.sibling);
completedWork.subtreeFlags |= subtreeFlags;
completedWork.childLanes = newChildLanes;
return didBailout;
@@ -5228,7 +5226,7 @@ function completeWork(current, workInProgress, renderLanes) {
for (newProps = workInProgress.child; null !== newProps; )
(renderLanes = newProps),
(updatePayload = current),
- (renderLanes.flags &= 262146),
+ (renderLanes.flags &= 1835010),
(type = renderLanes.alternate),
null === type
? ((renderLanes.childLanes = 0),
@@ -5606,8 +5604,8 @@ function commitHookEffectListMount(tag, finishedWork) {
var effect = (finishedWork = finishedWork.next);
do {
if ((effect.tag & tag) === tag) {
- var create$84 = effect.create;
- effect.destroy = create$84();
+ var create$86 = effect.create;
+ effect.destroy = create$86();
}
effect = effect.next;
} while (effect !== finishedWork);
@@ -5812,10 +5810,9 @@ function commitPlacement(finishedWork) {
: insertOrAppendPlacementNode(finishedWork, parentFiber, parent);
}
function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
- var tag = node.tag,
- isHost = 5 === tag || 6 === tag;
- if (isHost)
- if (((node = isHost ? node.stateNode : node.stateNode.instance), before)) {
+ var tag = node.tag;
+ if (5 === tag || 6 === tag)
+ if (((node = node.stateNode), before)) {
if ("number" === typeof parent)
throw Error("Container does not support insertBefore operation");
} else
@@ -5833,58 +5830,57 @@ function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
(node = node.sibling);
}
function insertOrAppendPlacementNode(node, before, parent) {
- var tag = node.tag,
- isHost = 5 === tag || 6 === tag;
- if (isHost)
- (node = isHost ? node.stateNode : node.stateNode.instance),
- before
- ? ((tag = parent._children),
- (isHost = tag.indexOf(node)),
- 0 <= isHost
- ? (tag.splice(isHost, 1),
- (before = tag.indexOf(before)),
- tag.splice(before, 0, node),
- ReactNativePrivateInterface.UIManager.manageChildren(
- parent._nativeTag,
- [isHost],
- [before],
- [],
- [],
- []
- ))
- : ((before = tag.indexOf(before)),
- tag.splice(before, 0, node),
- ReactNativePrivateInterface.UIManager.manageChildren(
- parent._nativeTag,
- [],
- [],
- ["number" === typeof node ? node : node._nativeTag],
- [before],
- []
- )))
- : ((before = "number" === typeof node ? node : node._nativeTag),
- (tag = parent._children),
- (isHost = tag.indexOf(node)),
- 0 <= isHost
- ? (tag.splice(isHost, 1),
- tag.push(node),
- ReactNativePrivateInterface.UIManager.manageChildren(
- parent._nativeTag,
- [isHost],
- [tag.length - 1],
- [],
- [],
- []
- ))
- : (tag.push(node),
- ReactNativePrivateInterface.UIManager.manageChildren(
- parent._nativeTag,
- [],
- [],
- [before],
- [tag.length - 1],
- []
- )));
+ var tag = node.tag;
+ if (5 === tag || 6 === tag)
+ if (((node = node.stateNode), before)) {
+ tag = parent._children;
+ var index = tag.indexOf(node);
+ 0 <= index
+ ? (tag.splice(index, 1),
+ (before = tag.indexOf(before)),
+ tag.splice(before, 0, node),
+ ReactNativePrivateInterface.UIManager.manageChildren(
+ parent._nativeTag,
+ [index],
+ [before],
+ [],
+ [],
+ []
+ ))
+ : ((before = tag.indexOf(before)),
+ tag.splice(before, 0, node),
+ ReactNativePrivateInterface.UIManager.manageChildren(
+ parent._nativeTag,
+ [],
+ [],
+ ["number" === typeof node ? node : node._nativeTag],
+ [before],
+ []
+ ));
+ } else
+ (before = "number" === typeof node ? node : node._nativeTag),
+ (tag = parent._children),
+ (index = tag.indexOf(node)),
+ 0 <= index
+ ? (tag.splice(index, 1),
+ tag.push(node),
+ ReactNativePrivateInterface.UIManager.manageChildren(
+ parent._nativeTag,
+ [index],
+ [tag.length - 1],
+ [],
+ [],
+ []
+ ))
+ : (tag.push(node),
+ ReactNativePrivateInterface.UIManager.manageChildren(
+ parent._nativeTag,
+ [],
+ [],
+ [before],
+ [tag.length - 1],
+ []
+ ));
else if (4 !== tag && ((node = node.child), null !== node))
for (
insertOrAppendPlacementNode(node, before, parent), node = node.sibling;
@@ -6210,8 +6206,8 @@ function commitLayoutEffects(finishedWork, root) {
commitUpdateQueue(fiber$jscomp$0, updateQueue, instance);
break;
case 3:
- var updateQueue$85 = fiber$jscomp$0.updateQueue;
- if (null !== updateQueue$85) {
+ var updateQueue$87 = fiber$jscomp$0.updateQueue;
+ if (null !== updateQueue$87) {
finishedRoot = null;
if (null !== fiber$jscomp$0.child)
switch (fiber$jscomp$0.child.tag) {
@@ -6223,7 +6219,7 @@ function commitLayoutEffects(finishedWork, root) {
}
commitUpdateQueue(
fiber$jscomp$0,
- updateQueue$85,
+ updateQueue$87,
finishedRoot
);
}
@@ -6236,7 +6232,7 @@ function commitLayoutEffects(finishedWork, root) {
break;
case 12:
var onRender = fiber$jscomp$0.memoizedProps.onRender,
- commitTime$88 = commitTime;
+ commitTime$90 = commitTime;
current = null === current ? "mount" : "update";
"function" === typeof onRender &&
onRender(
@@ -6245,7 +6241,7 @@ function commitLayoutEffects(finishedWork, root) {
fiber$jscomp$0.actualDuration,
fiber$jscomp$0.treeBaseDuration,
fiber$jscomp$0.actualStartTime,
- commitTime$88,
+ commitTime$90,
finishedRoot.memoizedInteractions
);
break;
@@ -6304,6 +6300,7 @@ function commitLayoutEffects(finishedWork, root) {
var ceil = Math.ceil,
ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
+ ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig,
executionContext = 0,
workInProgressRoot = null,
workInProgress = null,
@@ -6764,15 +6761,15 @@ function handleError(root$jscomp$0, thrownValue) {
}
var hasInvisibleParentBoundary =
0 !== (suspenseStackCursor.current & 1),
- workInProgress$79 = returnFiber;
+ workInProgress$81 = returnFiber;
do {
var JSCompiler_temp;
- if ((JSCompiler_temp = 13 === workInProgress$79.tag)) {
- var nextState = workInProgress$79.memoizedState;
+ if ((JSCompiler_temp = 13 === workInProgress$81.tag)) {
+ var nextState = workInProgress$81.memoizedState;
if (null !== nextState)
JSCompiler_temp = null !== nextState.dehydrated ? !0 : !1;
else {
- var props = workInProgress$79.memoizedProps;
+ var props = workInProgress$81.memoizedProps;
JSCompiler_temp =
void 0 === props.fallback
? !1
@@ -6784,17 +6781,17 @@ function handleError(root$jscomp$0, thrownValue) {
}
}
if (JSCompiler_temp) {
- var wakeables = workInProgress$79.updateQueue;
+ var wakeables = workInProgress$81.updateQueue;
if (null === wakeables) {
var updateQueue = new Set();
updateQueue.add(wakeable);
- workInProgress$79.updateQueue = updateQueue;
+ workInProgress$81.updateQueue = updateQueue;
} else wakeables.add(wakeable);
if (
- 0 === (workInProgress$79.mode & 1) &&
- workInProgress$79 !== returnFiber
+ 0 === (workInProgress$81.mode & 1) &&
+ workInProgress$81 !== returnFiber
) {
- workInProgress$79.flags |= 128;
+ workInProgress$81.flags |= 128;
sourceFiber.flags |= 32768;
sourceFiber.flags &= -10053;
if (1 === sourceFiber.tag)
@@ -6827,12 +6824,12 @@ function handleError(root$jscomp$0, thrownValue) {
);
wakeable.then(ping, ping);
}
- workInProgress$79.flags |= 16384;
- workInProgress$79.lanes = thrownValue;
+ workInProgress$81.flags |= 16384;
+ workInProgress$81.lanes = thrownValue;
break a;
}
- workInProgress$79 = workInProgress$79.return;
- } while (null !== workInProgress$79);
+ workInProgress$81 = workInProgress$81.return;
+ } while (null !== workInProgress$81);
value = Error(
(getComponentNameFromFiber(sourceFiber) || "A React component") +
" suspended while rendering, but no fallback UI was specified.\n\nAdd a component higher in the tree to provide a loading indicator or placeholder to display."
@@ -6841,47 +6838,47 @@ function handleError(root$jscomp$0, thrownValue) {
5 !== workInProgressRootExitStatus &&
(workInProgressRootExitStatus = 2);
value = createCapturedValue(value, sourceFiber);
- workInProgress$79 = returnFiber;
+ workInProgress$81 = returnFiber;
do {
- switch (workInProgress$79.tag) {
+ switch (workInProgress$81.tag) {
case 3:
root = value;
- workInProgress$79.flags |= 16384;
+ workInProgress$81.flags |= 16384;
thrownValue &= -thrownValue;
- workInProgress$79.lanes |= thrownValue;
- var update$80 = createRootErrorUpdate(
- workInProgress$79,
+ workInProgress$81.lanes |= thrownValue;
+ var update$82 = createRootErrorUpdate(
+ workInProgress$81,
root,
thrownValue
);
- enqueueCapturedUpdate(workInProgress$79, update$80);
+ enqueueCapturedUpdate(workInProgress$81, update$82);
break a;
case 1:
root = value;
- var ctor = workInProgress$79.type,
- instance = workInProgress$79.stateNode;
+ var ctor = workInProgress$81.type,
+ instance = workInProgress$81.stateNode;
if (
- 0 === (workInProgress$79.flags & 128) &&
+ 0 === (workInProgress$81.flags & 128) &&
("function" === typeof ctor.getDerivedStateFromError ||
(null !== instance &&
"function" === typeof instance.componentDidCatch &&
(null === legacyErrorBoundariesThatAlreadyFailed ||
!legacyErrorBoundariesThatAlreadyFailed.has(instance))))
) {
- workInProgress$79.flags |= 16384;
+ workInProgress$81.flags |= 16384;
thrownValue &= -thrownValue;
- workInProgress$79.lanes |= thrownValue;
- var update$83 = createClassErrorUpdate(
- workInProgress$79,
+ workInProgress$81.lanes |= thrownValue;
+ var update$85 = createClassErrorUpdate(
+ workInProgress$81,
root,
thrownValue
);
- enqueueCapturedUpdate(workInProgress$79, update$83);
+ enqueueCapturedUpdate(workInProgress$81, update$85);
break a;
}
}
- workInProgress$79 = workInProgress$79.return;
- } while (null !== workInProgress$79);
+ workInProgress$81 = workInProgress$81.return;
+ } while (null !== workInProgress$81);
}
completeUnitOfWork(erroredWork);
} catch (yetAnotherThrownValue) {
@@ -7000,12 +6997,15 @@ function completeUnitOfWork(unitOfWork) {
0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);
}
function commitRoot(root) {
- var previousUpdateLanePriority = currentUpdatePriority;
+ var previousUpdateLanePriority = currentUpdatePriority,
+ prevTransition = ReactCurrentBatchConfig$2.transition;
try {
- (currentUpdatePriority = 1),
+ (ReactCurrentBatchConfig$2.transition = 0),
+ (currentUpdatePriority = 1),
commitRootImpl(root, previousUpdateLanePriority);
} finally {
- currentUpdatePriority = previousUpdateLanePriority;
+ (ReactCurrentBatchConfig$2.transition = prevTransition),
+ (currentUpdatePriority = previousUpdateLanePriority);
}
return null;
}
@@ -7040,7 +7040,9 @@ function commitRootImpl(root, renderPriorityLevel) {
}));
remainingLanes = 0 !== (finishedWork.flags & 8054);
if (0 !== (finishedWork.subtreeFlags & 8054) || remainingLanes) {
- remainingLanes = currentUpdatePriority;
+ remainingLanes = ReactCurrentBatchConfig$2.transition;
+ ReactCurrentBatchConfig$2.transition = 0;
+ var previousPriority = currentUpdatePriority;
currentUpdatePriority = 1;
var prevExecutionContext = executionContext;
executionContext |= 16;
@@ -7054,27 +7056,31 @@ function commitRootImpl(root, renderPriorityLevel) {
requestPaint();
tracing.__interactionsRef.current = prevInteractions;
executionContext = prevExecutionContext;
- currentUpdatePriority = remainingLanes;
+ currentUpdatePriority = previousPriority;
+ ReactCurrentBatchConfig$2.transition = remainingLanes;
} else (root.current = finishedWork), (commitTime = now$1());
- if ((prevExecutionContext = rootDoesHavePassiveEffects))
+ if ((previousPriority = rootDoesHavePassiveEffects))
(rootDoesHavePassiveEffects = !1),
(rootWithPendingPassiveEffects = root),
(pendingPassiveEffectsLanes = lanes);
remainingLanes = root.pendingLanes;
if (0 !== remainingLanes) {
- if (null !== spawnedWorkDuringRender) {
- prevInteractions = spawnedWorkDuringRender;
- spawnedWorkDuringRender = null;
- for (var i = 0; i < prevInteractions.length; i++)
+ if (null !== spawnedWorkDuringRender)
+ for (
+ prevExecutionContext = spawnedWorkDuringRender,
+ spawnedWorkDuringRender = null,
+ prevInteractions = 0;
+ prevInteractions < prevExecutionContext.length;
+ prevInteractions++
+ )
scheduleInteractions(
root,
- prevInteractions[i],
+ prevExecutionContext[prevInteractions],
root.memoizedInteractions
);
- }
schedulePendingInteractions(root, remainingLanes);
} else legacyErrorBoundariesThatAlreadyFailed = null;
- prevExecutionContext || finishPendingInteractions(root, lanes);
+ previousPriority || finishPendingInteractions(root, lanes);
0 !== (remainingLanes & 1)
? root === rootWithNestedUpdates
? nestedUpdateCount++
@@ -7088,19 +7094,24 @@ function commitRootImpl(root, renderPriorityLevel) {
(firstUncaughtError = null),
root);
if (0 !== (executionContext & 4)) return null;
+ 0 !== (pendingPassiveEffectsLanes & 1) &&
+ 0 !== root.tag &&
+ flushPassiveEffects();
flushSyncCallbackQueue();
return null;
}
function flushPassiveEffects() {
- if (0 !== pendingPassiveEffectsLanes) {
- var b = lanesToEventPriority(pendingPassiveEffectsLanes),
+ if (null !== rootWithPendingPassiveEffects) {
+ var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
+ prevTransition = ReactCurrentBatchConfig$2.transition,
previousPriority = currentUpdatePriority;
try {
- currentUpdatePriority = 16 < b ? 16 : b;
+ ReactCurrentBatchConfig$2.transition = 0;
+ currentUpdatePriority = 16 > renderPriority ? 16 : renderPriority;
if (null === rootWithPendingPassiveEffects)
var JSCompiler_inline_result = !1;
else {
- b = rootWithPendingPassiveEffects;
+ renderPriority = rootWithPendingPassiveEffects;
var lanes = pendingPassiveEffectsLanes;
rootWithPendingPassiveEffects = null;
pendingPassiveEffectsLanes = 0;
@@ -7108,8 +7119,8 @@ function flushPassiveEffects() {
throw Error("Cannot flush passive effects while already rendering.");
var prevExecutionContext = executionContext;
executionContext |= 16;
- var prevInteractions = pushInteractions(b);
- for (nextEffect = b.current; null !== nextEffect; ) {
+ var prevInteractions = pushInteractions(renderPriority);
+ for (nextEffect = renderPriority.current; null !== nextEffect; ) {
var fiber = nextEffect,
child = fiber.child;
if (0 !== (nextEffect.flags & 16)) {
@@ -7184,7 +7195,7 @@ function flushPassiveEffects() {
nextEffect = fiber.return;
}
}
- var finishedWork = b.current;
+ var finishedWork = renderPriority.current;
for (nextEffect = finishedWork; null !== nextEffect; ) {
child = nextEffect;
var firstChild = child.child;
@@ -7218,14 +7229,22 @@ function flushPassiveEffects() {
}
}
tracing.__interactionsRef.current = prevInteractions;
- finishPendingInteractions(b, lanes);
+ finishPendingInteractions(renderPriority, lanes);
executionContext = prevExecutionContext;
flushSyncCallbackQueue();
+ if (
+ injectedHook &&
+ "function" === typeof injectedHook.onPostCommitFiberRoot
+ )
+ try {
+ injectedHook.onPostCommitFiberRoot(rendererID, renderPriority);
+ } catch (err) {}
JSCompiler_inline_result = !0;
}
return JSCompiler_inline_result;
} finally {
- currentUpdatePriority = previousPriority;
+ (currentUpdatePriority = previousPriority),
+ (ReactCurrentBatchConfig$2.transition = prevTransition);
}
}
return !1;
@@ -7452,14 +7471,6 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
? nextValue.state
: null;
initializeUpdateQueue(workInProgress);
- var getDerivedStateFromProps = updateLanes.getDerivedStateFromProps;
- "function" === typeof getDerivedStateFromProps &&
- applyDerivedStateFromProps(
- workInProgress,
- updateLanes,
- getDerivedStateFromProps,
- current
- );
nextValue.updater = classComponentUpdater;
workInProgress.stateNode = nextValue;
nextValue._reactInternals = workInProgress;
@@ -7675,11 +7686,11 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
updateLanes = workInProgress.type._context;
nextValue = workInProgress.pendingProps;
hasContext = workInProgress.memoizedProps;
- getDerivedStateFromProps = nextValue.value;
+ var newValue = nextValue.value;
push(valueCursor, updateLanes._currentValue);
- updateLanes._currentValue = getDerivedStateFromProps;
+ updateLanes._currentValue = newValue;
if (null !== hasContext)
- if (objectIs(hasContext.value, getDerivedStateFromProps)) {
+ if (objectIs(hasContext.value, newValue)) {
if (
hasContext.children === nextValue.children &&
!didPerformWorkStackCursor.current
@@ -7693,25 +7704,24 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
}
} else
for (
- getDerivedStateFromProps = workInProgress.child,
- null !== getDerivedStateFromProps &&
- (getDerivedStateFromProps.return = workInProgress);
- null !== getDerivedStateFromProps;
+ newValue = workInProgress.child,
+ null !== newValue && (newValue.return = workInProgress);
+ null !== newValue;
) {
- var list = getDerivedStateFromProps.dependencies;
+ var list = newValue.dependencies;
if (null !== list) {
- hasContext = getDerivedStateFromProps.child;
+ hasContext = newValue.child;
for (
var dependency = list.firstContext;
null !== dependency;
) {
if (dependency.context === updateLanes) {
- if (1 === getDerivedStateFromProps.tag) {
+ if (1 === newValue.tag) {
dependency = createUpdate(-1, renderLanes & -renderLanes);
dependency.tag = 2;
- var updateQueue = getDerivedStateFromProps.updateQueue;
+ var updateQueue = newValue.updateQueue;
if (null !== updateQueue) {
updateQueue = updateQueue.shared;
var pending = updateQueue.pending;
@@ -7722,13 +7732,10 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
updateQueue.pending = dependency;
}
}
- getDerivedStateFromProps.lanes |= renderLanes;
- dependency = getDerivedStateFromProps.alternate;
+ newValue.lanes |= renderLanes;
+ dependency = newValue.alternate;
null !== dependency && (dependency.lanes |= renderLanes);
- scheduleWorkOnParentPath(
- getDerivedStateFromProps.return,
- renderLanes
- );
+ scheduleWorkOnParentPath(newValue.return, renderLanes);
list.lanes |= renderLanes;
break;
}
@@ -7736,32 +7743,27 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
}
} else
hasContext =
- 10 === getDerivedStateFromProps.tag
- ? getDerivedStateFromProps.type === workInProgress.type
+ 10 === newValue.tag
+ ? newValue.type === workInProgress.type
? null
- : getDerivedStateFromProps.child
- : getDerivedStateFromProps.child;
- if (null !== hasContext)
- hasContext.return = getDerivedStateFromProps;
+ : newValue.child
+ : newValue.child;
+ if (null !== hasContext) hasContext.return = newValue;
else
- for (
- hasContext = getDerivedStateFromProps;
- null !== hasContext;
-
- ) {
+ for (hasContext = newValue; null !== hasContext; ) {
if (hasContext === workInProgress) {
hasContext = null;
break;
}
- getDerivedStateFromProps = hasContext.sibling;
- if (null !== getDerivedStateFromProps) {
- getDerivedStateFromProps.return = hasContext.return;
- hasContext = getDerivedStateFromProps;
+ newValue = hasContext.sibling;
+ if (null !== newValue) {
+ newValue.return = hasContext.return;
+ hasContext = newValue;
break;
}
hasContext = hasContext.return;
}
- getDerivedStateFromProps = hasContext;
+ newValue = hasContext;
}
reconcileChildren(
current,
@@ -7928,9 +7930,9 @@ function finishPendingInteractions(root, committedLanes) {
if (null !== subscriber && 0 === interaction.__count)
try {
subscriber.onInteractionScheduledWorkCompleted(interaction);
- } catch (error$96) {
+ } catch (error$98) {
scheduleCallback(ImmediatePriority, function() {
- throw error$96;
+ throw error$98;
});
}
}));
@@ -7992,7 +7994,7 @@ function createWorkInProgress(current, pendingProps) {
(workInProgress.deletions = null),
(workInProgress.actualDuration = 0),
(workInProgress.actualStartTime = -1));
- workInProgress.flags = current.flags & 262144;
+ workInProgress.flags = current.flags & 1835008;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@@ -8269,7 +8271,7 @@ batchedUpdatesImpl = function(fn, a) {
}
};
var roots = new Map(),
- devToolsConfig$jscomp$inline_1012 = {
+ devToolsConfig$jscomp$inline_1013 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "17.0.3",
@@ -8287,11 +8289,11 @@ var roots = new Map(),
}.bind(null, findNodeHandle)
}
};
-var internals$jscomp$inline_1275 = {
- bundleType: devToolsConfig$jscomp$inline_1012.bundleType,
- version: devToolsConfig$jscomp$inline_1012.version,
- rendererPackageName: devToolsConfig$jscomp$inline_1012.rendererPackageName,
- rendererConfig: devToolsConfig$jscomp$inline_1012.rendererConfig,
+var internals$jscomp$inline_1279 = {
+ bundleType: devToolsConfig$jscomp$inline_1013.bundleType,
+ version: devToolsConfig$jscomp$inline_1013.version,
+ rendererPackageName: devToolsConfig$jscomp$inline_1013.rendererPackageName,
+ rendererConfig: devToolsConfig$jscomp$inline_1013.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -8306,25 +8308,26 @@ var internals$jscomp$inline_1275 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
- devToolsConfig$jscomp$inline_1012.findFiberByHostInstance ||
+ devToolsConfig$jscomp$inline_1013.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
- getCurrentFiber: null
+ getCurrentFiber: null,
+ reconcilerVersion: "17.0.3"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
- var hook$jscomp$inline_1276 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+ var hook$jscomp$inline_1280 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
- !hook$jscomp$inline_1276.isDisabled &&
- hook$jscomp$inline_1276.supportsFiber
+ !hook$jscomp$inline_1280.isDisabled &&
+ hook$jscomp$inline_1280.supportsFiber
)
try {
- (rendererID = hook$jscomp$inline_1276.inject(
- internals$jscomp$inline_1275
+ (rendererID = hook$jscomp$inline_1280.inject(
+ internals$jscomp$inline_1279
)),
- (injectedHook = hook$jscomp$inline_1276);
+ (injectedHook = hook$jscomp$inline_1280);
} catch (err) {}
}
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {