diff --git a/compiled/facebook-www/JSXDEVRuntime-dev.classic.js b/compiled/facebook-www/JSXDEVRuntime-dev.classic.js index 6d4e9fdeef..c0e3d09893 100644 --- a/compiled/facebook-www/JSXDEVRuntime-dev.classic.js +++ b/compiled/facebook-www/JSXDEVRuntime-dev.classic.js @@ -27,7 +27,9 @@ if (__DEV__) { var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext + + var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"); var REACT_CONTEXT_TYPE = Symbol.for("react.context"); var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); @@ -106,8 +108,8 @@ if (__DEV__) { var dynamicFeatureFlags = require("ReactFeatureFlags"); var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing, - enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing; - // On WWW, false is used for a new modern build. + enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, false is used for a new modern build. var REACT_CLIENT_REFERENCE$2 = Symbol.for("react.client.reference"); function isValidElementType(type) { @@ -135,8 +137,9 @@ if (__DEV__) { if ( type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || - type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || + (!enableRenderableContext && type.$$typeof === REACT_PROVIDER_TYPE) || + (enableRenderableContext && type.$$typeof === REACT_CONSUMER_TYPE) || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used @@ -231,13 +234,30 @@ if (__DEV__) { } switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } + case REACT_CONTEXT_TYPE: var context = type; - return getContextName(context) + ".Consumer"; - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + ".Provider"; + if (enableRenderableContext) { + return getContextName(context) + ".Provider"; + } else { + return getContextName(context) + ".Consumer"; + } + + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef"); diff --git a/compiled/facebook-www/JSXDEVRuntime-dev.modern.js b/compiled/facebook-www/JSXDEVRuntime-dev.modern.js index aea9509192..503aac031a 100644 --- a/compiled/facebook-www/JSXDEVRuntime-dev.modern.js +++ b/compiled/facebook-www/JSXDEVRuntime-dev.modern.js @@ -27,7 +27,9 @@ if (__DEV__) { var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext + + var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"); var REACT_CONTEXT_TYPE = Symbol.for("react.context"); var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); @@ -106,8 +108,8 @@ if (__DEV__) { var dynamicFeatureFlags = require("ReactFeatureFlags"); var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing, - enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing; - // On WWW, true is used for a new modern build. + enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, true is used for a new modern build. var REACT_CLIENT_REFERENCE$2 = Symbol.for("react.client.reference"); function isValidElementType(type) { @@ -135,8 +137,9 @@ if (__DEV__) { if ( type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || - type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || + (!enableRenderableContext && type.$$typeof === REACT_PROVIDER_TYPE) || + (enableRenderableContext && type.$$typeof === REACT_CONSUMER_TYPE) || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used @@ -231,13 +234,30 @@ if (__DEV__) { } switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } + case REACT_CONTEXT_TYPE: var context = type; - return getContextName(context) + ".Consumer"; - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + ".Provider"; + if (enableRenderableContext) { + return getContextName(context) + ".Provider"; + } else { + return getContextName(context) + ".Consumer"; + } + + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef"); diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index cfb7b7c62c..51efa45803 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -8d48183291870898ec42ac1f84482d9d26789424 +14fd9630ee04387f4361da289393234e2b7d93b6 diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 8f27a16b3c..26a4999713 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -24,7 +24,7 @@ if (__DEV__) { ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - var ReactVersion = "18.3.0-www-classic-ab1e0612"; + var ReactVersion = "18.3.0-www-classic-38e30556"; // ATTENTION // When adding new symbols to this file, @@ -35,7 +35,9 @@ if (__DEV__) { var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext + + var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"); var REACT_CONTEXT_TYPE = Symbol.for("react.context"); var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); @@ -473,8 +475,8 @@ if (__DEV__) { var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing, enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, - enableAsyncActions = dynamicFeatureFlags.enableAsyncActions; - // On WWW, false is used for a new modern build. + enableAsyncActions = dynamicFeatureFlags.enableAsyncActions, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, false is used for a new modern build. function getWrappedName(outerType, innerType, wrapperName) { var displayName = outerType.displayName; @@ -556,13 +558,30 @@ if (__DEV__) { } switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } + case REACT_CONTEXT_TYPE: var context = type; - return getContextName(context) + ".Consumer"; - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + ".Provider"; + if (enableRenderableContext) { + return getContextName(context) + ".Provider"; + } else { + return getContextName(context) + ".Consumer"; + } + + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef"); @@ -1022,8 +1041,9 @@ if (__DEV__) { if ( type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || - type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || + (!enableRenderableContext && type.$$typeof === REACT_PROVIDER_TYPE) || + (enableRenderableContext && type.$$typeof === REACT_CONSUMER_TYPE) || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used @@ -2472,98 +2492,71 @@ if (__DEV__) { Provider: null, Consumer: null }; - context.Provider = { - $$typeof: REACT_PROVIDER_TYPE, - _context: context - }; - var hasWarnedAboutUsingNestedContextConsumers = false; - var hasWarnedAboutUsingConsumerProvider = false; - var hasWarnedAboutDisplayNameOnConsumer = false; - { - // A separate object, but proxies back to the original context object for - // backwards compatibility. It has a different $$typeof, so we can properly - // warn for the incorrect usage of Context as a Consumer. - var Consumer = { - $$typeof: REACT_CONTEXT_TYPE, + if (enableRenderableContext) { + context.Provider = context; + context.Consumer = { + $$typeof: REACT_CONSUMER_TYPE, _context: context - }; // $FlowFixMe[prop-missing]: Flow complains about not setting a value, which is intentional here + }; + } else { + context.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: context + }; - Object.defineProperties(Consumer, { - Provider: { - get: function () { - if (!hasWarnedAboutUsingConsumerProvider) { - hasWarnedAboutUsingConsumerProvider = true; - - error( - "Rendering is not supported and will be removed in " + - "a future major release. Did you mean to render instead?" - ); + { + var Consumer = { + $$typeof: REACT_CONTEXT_TYPE, + _context: context + }; + Object.defineProperties(Consumer, { + Provider: { + get: function () { + return context.Provider; + }, + set: function (_Provider) { + context.Provider = _Provider; } - - return context.Provider; }, - set: function (_Provider) { - context.Provider = _Provider; - } - }, - _currentValue: { - get: function () { - return context._currentValue; - }, - set: function (_currentValue) { - context._currentValue = _currentValue; - } - }, - _currentValue2: { - get: function () { - return context._currentValue2; - }, - set: function (_currentValue2) { - context._currentValue2 = _currentValue2; - } - }, - _threadCount: { - get: function () { - return context._threadCount; - }, - set: function (_threadCount) { - context._threadCount = _threadCount; - } - }, - Consumer: { - get: function () { - if (!hasWarnedAboutUsingNestedContextConsumers) { - hasWarnedAboutUsingNestedContextConsumers = true; - - error( - "Rendering is not supported and will be removed in " + - "a future major release. Did you mean to render instead?" - ); + _currentValue: { + get: function () { + return context._currentValue; + }, + set: function (_currentValue) { + context._currentValue = _currentValue; } - - return context.Consumer; - } - }, - displayName: { - get: function () { - return context.displayName; }, - set: function (displayName) { - if (!hasWarnedAboutDisplayNameOnConsumer) { - warn( - "Setting `displayName` on Context.Consumer has no effect. " + - "You should set it directly on the context with Context.displayName = '%s'.", - displayName - ); - - hasWarnedAboutDisplayNameOnConsumer = true; + _currentValue2: { + get: function () { + return context._currentValue2; + }, + set: function (_currentValue2) { + context._currentValue2 = _currentValue2; } + }, + _threadCount: { + get: function () { + return context._threadCount; + }, + set: function (_threadCount) { + context._threadCount = _threadCount; + } + }, + Consumer: { + get: function () { + return context.Consumer; + } + }, + displayName: { + get: function () { + return context.displayName; + }, + set: function (displayName) {} } - } - }); // $FlowFixMe[prop-missing]: Flow complains about missing properties because it doesn't understand defineProperty - - context.Consumer = Consumer; + }); + context.Consumer = Consumer; + } } { @@ -2910,22 +2903,11 @@ if (__DEV__) { var dispatcher = resolveDispatcher(); { - // TODO: add a more generic warning for invalid values. - if (Context._context !== undefined) { - var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs - // and nobody should be using this in existing code. - - if (realContext.Consumer === Context) { - error( - "Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be " + - "removed in a future major release. Did you mean to call useContext(Context) instead?" - ); - } else if (realContext.Provider === Context) { - error( - "Calling useContext(Context.Provider) is not supported. " + - "Did you mean to call useContext(Context) instead?" - ); - } + if (Context.$$typeof === REACT_CONSUMER_TYPE) { + error( + "Calling useContext(Context.Consumer) is not supported and will cause bugs. " + + "Did you mean to call useContext(Context) instead?" + ); } } diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index f3582c195d..10ccf0dd28 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -24,7 +24,7 @@ if (__DEV__) { ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - var ReactVersion = "18.3.0-www-modern-d9e56569"; + var ReactVersion = "18.3.0-www-modern-f32f96e5"; // ATTENTION // When adding new symbols to this file, @@ -35,7 +35,9 @@ if (__DEV__) { var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext + + var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"); var REACT_CONTEXT_TYPE = Symbol.for("react.context"); var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); @@ -473,8 +475,8 @@ if (__DEV__) { var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing, enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, - enableAsyncActions = dynamicFeatureFlags.enableAsyncActions; - // On WWW, true is used for a new modern build. + enableAsyncActions = dynamicFeatureFlags.enableAsyncActions, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, true is used for a new modern build. function getWrappedName(outerType, innerType, wrapperName) { var displayName = outerType.displayName; @@ -556,13 +558,30 @@ if (__DEV__) { } switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } + case REACT_CONTEXT_TYPE: var context = type; - return getContextName(context) + ".Consumer"; - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + ".Provider"; + if (enableRenderableContext) { + return getContextName(context) + ".Provider"; + } else { + return getContextName(context) + ".Consumer"; + } + + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef"); @@ -1022,8 +1041,9 @@ if (__DEV__) { if ( type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || - type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || + (!enableRenderableContext && type.$$typeof === REACT_PROVIDER_TYPE) || + (enableRenderableContext && type.$$typeof === REACT_CONSUMER_TYPE) || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used @@ -2437,98 +2457,71 @@ if (__DEV__) { Provider: null, Consumer: null }; - context.Provider = { - $$typeof: REACT_PROVIDER_TYPE, - _context: context - }; - var hasWarnedAboutUsingNestedContextConsumers = false; - var hasWarnedAboutUsingConsumerProvider = false; - var hasWarnedAboutDisplayNameOnConsumer = false; - { - // A separate object, but proxies back to the original context object for - // backwards compatibility. It has a different $$typeof, so we can properly - // warn for the incorrect usage of Context as a Consumer. - var Consumer = { - $$typeof: REACT_CONTEXT_TYPE, + if (enableRenderableContext) { + context.Provider = context; + context.Consumer = { + $$typeof: REACT_CONSUMER_TYPE, _context: context - }; // $FlowFixMe[prop-missing]: Flow complains about not setting a value, which is intentional here + }; + } else { + context.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: context + }; - Object.defineProperties(Consumer, { - Provider: { - get: function () { - if (!hasWarnedAboutUsingConsumerProvider) { - hasWarnedAboutUsingConsumerProvider = true; - - error( - "Rendering is not supported and will be removed in " + - "a future major release. Did you mean to render instead?" - ); + { + var Consumer = { + $$typeof: REACT_CONTEXT_TYPE, + _context: context + }; + Object.defineProperties(Consumer, { + Provider: { + get: function () { + return context.Provider; + }, + set: function (_Provider) { + context.Provider = _Provider; } - - return context.Provider; }, - set: function (_Provider) { - context.Provider = _Provider; - } - }, - _currentValue: { - get: function () { - return context._currentValue; - }, - set: function (_currentValue) { - context._currentValue = _currentValue; - } - }, - _currentValue2: { - get: function () { - return context._currentValue2; - }, - set: function (_currentValue2) { - context._currentValue2 = _currentValue2; - } - }, - _threadCount: { - get: function () { - return context._threadCount; - }, - set: function (_threadCount) { - context._threadCount = _threadCount; - } - }, - Consumer: { - get: function () { - if (!hasWarnedAboutUsingNestedContextConsumers) { - hasWarnedAboutUsingNestedContextConsumers = true; - - error( - "Rendering is not supported and will be removed in " + - "a future major release. Did you mean to render instead?" - ); + _currentValue: { + get: function () { + return context._currentValue; + }, + set: function (_currentValue) { + context._currentValue = _currentValue; } - - return context.Consumer; - } - }, - displayName: { - get: function () { - return context.displayName; }, - set: function (displayName) { - if (!hasWarnedAboutDisplayNameOnConsumer) { - warn( - "Setting `displayName` on Context.Consumer has no effect. " + - "You should set it directly on the context with Context.displayName = '%s'.", - displayName - ); - - hasWarnedAboutDisplayNameOnConsumer = true; + _currentValue2: { + get: function () { + return context._currentValue2; + }, + set: function (_currentValue2) { + context._currentValue2 = _currentValue2; } + }, + _threadCount: { + get: function () { + return context._threadCount; + }, + set: function (_threadCount) { + context._threadCount = _threadCount; + } + }, + Consumer: { + get: function () { + return context.Consumer; + } + }, + displayName: { + get: function () { + return context.displayName; + }, + set: function (displayName) {} } - } - }); // $FlowFixMe[prop-missing]: Flow complains about missing properties because it doesn't understand defineProperty - - context.Consumer = Consumer; + }); + context.Consumer = Consumer; + } } { @@ -2875,22 +2868,11 @@ if (__DEV__) { var dispatcher = resolveDispatcher(); { - // TODO: add a more generic warning for invalid values. - if (Context._context !== undefined) { - var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs - // and nobody should be using this in existing code. - - if (realContext.Consumer === Context) { - error( - "Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be " + - "removed in a future major release. Did you mean to call useContext(Context) instead?" - ); - } else if (realContext.Provider === Context) { - error( - "Calling useContext(Context.Provider) is not supported. " + - "Did you mean to call useContext(Context) instead?" - ); - } + if (Context.$$typeof === REACT_CONSUMER_TYPE) { + error( + "Calling useContext(Context.Consumer) is not supported and will cause bugs. " + + "Did you mean to call useContext(Context) instead?" + ); } } diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index b887793c54..b5ed671442 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -17,6 +17,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), + REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), @@ -84,6 +85,7 @@ var isArrayImpl = Array.isArray, dynamicFeatureFlags = require("ReactFeatureFlags"), enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, enableAsyncActions = dynamicFeatureFlags.enableAsyncActions, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, hasOwnProperty = Object.prototype.hasOwnProperty, ReactCurrentOwner$1 = { current: null }; function ReactElement$1(type, key, ref, owner, props) { @@ -460,11 +462,18 @@ exports.createContext = function (defaultValue) { Provider: null, Consumer: null }; - defaultValue.Provider = { - $$typeof: REACT_PROVIDER_TYPE, - _context: defaultValue - }; - return (defaultValue.Consumer = defaultValue); + enableRenderableContext + ? ((defaultValue.Provider = defaultValue), + (defaultValue.Consumer = { + $$typeof: REACT_CONSUMER_TYPE, + _context: defaultValue + })) + : ((defaultValue.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: defaultValue + }), + (defaultValue.Consumer = defaultValue)); + return defaultValue; }; exports.createElement = createElement$1; exports.createFactory = function (type) { @@ -617,4 +626,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-www-classic-1596b9e6"; +exports.version = "18.3.0-www-classic-25a61d97"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 907b755221..0e7131b9d3 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -17,6 +17,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), + REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), @@ -83,6 +84,7 @@ var isArrayImpl = Array.isArray, dynamicFeatureFlags = require("ReactFeatureFlags"), enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, enableAsyncActions = dynamicFeatureFlags.enableAsyncActions, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, hasOwnProperty = Object.prototype.hasOwnProperty, ReactCurrentOwner$1 = { current: null }; function ReactElement$1(type, key, ref, owner, props) { @@ -431,11 +433,18 @@ exports.createContext = function (defaultValue) { Provider: null, Consumer: null }; - defaultValue.Provider = { - $$typeof: REACT_PROVIDER_TYPE, - _context: defaultValue - }; - return (defaultValue.Consumer = defaultValue); + enableRenderableContext + ? ((defaultValue.Provider = defaultValue), + (defaultValue.Consumer = { + $$typeof: REACT_CONSUMER_TYPE, + _context: defaultValue + })) + : ((defaultValue.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: defaultValue + }), + (defaultValue.Consumer = defaultValue)); + return defaultValue; }; exports.createElement = function (type, config, children) { var propName, @@ -609,4 +618,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-www-modern-369264d7"; +exports.version = "18.3.0-www-modern-04e2d939"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index edf14381af..695cbd4d06 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -21,6 +21,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), + REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), @@ -88,6 +89,7 @@ var isArrayImpl = Array.isArray, dynamicFeatureFlags = require("ReactFeatureFlags"), enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, enableAsyncActions = dynamicFeatureFlags.enableAsyncActions, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, hasOwnProperty = Object.prototype.hasOwnProperty, ReactCurrentOwner$1 = { current: null }; function ReactElement$1(type, key, ref, owner, props) { @@ -464,11 +466,18 @@ exports.createContext = function (defaultValue) { Provider: null, Consumer: null }; - defaultValue.Provider = { - $$typeof: REACT_PROVIDER_TYPE, - _context: defaultValue - }; - return (defaultValue.Consumer = defaultValue); + enableRenderableContext + ? ((defaultValue.Provider = defaultValue), + (defaultValue.Consumer = { + $$typeof: REACT_CONSUMER_TYPE, + _context: defaultValue + })) + : ((defaultValue.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: defaultValue + }), + (defaultValue.Consumer = defaultValue)); + return defaultValue; }; exports.createElement = createElement$1; exports.createFactory = function (type) { @@ -621,7 +630,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-www-classic-317962e3"; +exports.version = "18.3.0-www-classic-0c80b4ef"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index 539f890ea7..6522599da4 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -21,6 +21,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), + REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), @@ -87,6 +88,7 @@ var isArrayImpl = Array.isArray, dynamicFeatureFlags = require("ReactFeatureFlags"), enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, enableAsyncActions = dynamicFeatureFlags.enableAsyncActions, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, hasOwnProperty = Object.prototype.hasOwnProperty, ReactCurrentOwner$1 = { current: null }; function ReactElement$1(type, key, ref, owner, props) { @@ -435,11 +437,18 @@ exports.createContext = function (defaultValue) { Provider: null, Consumer: null }; - defaultValue.Provider = { - $$typeof: REACT_PROVIDER_TYPE, - _context: defaultValue - }; - return (defaultValue.Consumer = defaultValue); + enableRenderableContext + ? ((defaultValue.Provider = defaultValue), + (defaultValue.Consumer = { + $$typeof: REACT_CONSUMER_TYPE, + _context: defaultValue + })) + : ((defaultValue.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: defaultValue + }), + (defaultValue.Consumer = defaultValue)); + return defaultValue; }; exports.createElement = function (type, config, children) { var propName, @@ -613,7 +622,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-www-modern-de96d418"; +exports.version = "18.3.0-www-modern-73e137c7"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index 2f3bab7a5a..dcb68f4561 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -66,7 +66,7 @@ if (__DEV__) { return self; } - var ReactVersion = "18.3.0-www-classic-70a849df"; + var ReactVersion = "18.3.0-www-classic-a110aae0"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -188,7 +188,8 @@ if (__DEV__) { transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = - dynamicFeatureFlags.enableInfiniteRenderLoopDetection; // On WWW, false is used for a new modern build. + dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, false is used for a new modern build. var enableProfilerTimer = true; var enableProfilerCommitHooks = true; var enableProfilerNestedUpdatePhase = true; @@ -237,7 +238,9 @@ if (__DEV__) { var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext + + var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"); var REACT_CONTEXT_TYPE = Symbol.for("react.context"); var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); @@ -349,13 +352,30 @@ if (__DEV__) { } switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName$1(provider._context) + ".Provider"; + } + case REACT_CONTEXT_TYPE: var context = type; - return getContextName$1(context) + ".Consumer"; - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName$1(provider._context) + ".Provider"; + if (enableRenderableContext) { + return getContextName$1(context) + ".Provider"; + } else { + return getContextName$1(context) + ".Consumer"; + } + + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName$1(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName$1(type, type.render, "ForwardRef"); @@ -409,12 +429,22 @@ if (__DEV__) { return "Cache"; case ContextConsumer: - var context = type; - return getContextName(context) + ".Consumer"; + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + var context = type; + return getContextName(context) + ".Consumer"; + } case ContextProvider: - var provider = type; - return getContextName(provider._context) + ".Provider"; + if (enableRenderableContext) { + var _context = type; + return getContextName(_context) + ".Provider"; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } case DehydratedFragment: return "DehydratedFragment"; @@ -13151,8 +13181,7 @@ if (__DEV__) { var isValid = // Allow null for conditional declaration contextType === null || (contextType !== undefined && - contextType.$$typeof === REACT_CONTEXT_TYPE && - contextType._context === undefined); // Not a + contextType.$$typeof === REACT_CONTEXT_TYPE); if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) { didWarnAboutInvalidateContextType.add(ctor); @@ -13166,11 +13195,7 @@ if (__DEV__) { "try moving the createContext() call to a separate file."; } else if (typeof contextType !== "object") { addendum = " However, it is set to a " + typeof contextType + "."; - } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) { - addendum = - " Did you accidentally pass the Context.Provider instead?"; - } else if (contextType._context !== undefined) { - // + } else if (contextType.$$typeof === REACT_CONSUMER_TYPE) { addendum = " Did you accidentally pass the Context.Consumer instead?"; } else { @@ -17555,8 +17580,14 @@ if (__DEV__) { var hasWarnedAboutUsingNoValuePropOnContextProvider = false; function updateContextProvider(current, workInProgress, renderLanes) { - var providerType = workInProgress.type; - var context = providerType._context; + var context; + + if (enableRenderableContext) { + context = workInProgress.type; + } else { + context = workInProgress.type._context; + } + var newProps = workInProgress.pendingProps; var oldProps = workInProgress.memoizedProps; var newValue = newProps.value; @@ -17616,34 +17647,19 @@ if (__DEV__) { return workInProgress.child; } - var hasWarnedAboutUsingContextAsConsumer = false; - function updateContextConsumer(current, workInProgress, renderLanes) { - var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In - // DEV mode, we create a separate object for Context.Consumer that acts - // like a proxy to Context. This proxy object adds unnecessary code in PROD - // so we use the old behaviour (Context.Consumer references Context) to - // reduce size and overhead. The separate object references context via - // a property called "_context", which also gives us the ability to check - // in DEV mode if this property exists or not and warn if it does not. + var context; - { - if (context._context === undefined) { - // This may be because it's a Context (rather than a Consumer). - // Or it may be because it's older React where they're the same thing. - // We only want to warn if we're sure it's a new React. - if (context !== context.Consumer) { - if (!hasWarnedAboutUsingContextAsConsumer) { - hasWarnedAboutUsingContextAsConsumer = true; + if (enableRenderableContext) { + var consumerType = workInProgress.type; + context = consumerType._context; + } else { + context = workInProgress.type; - error( - "Rendering directly is not supported and will be removed in " + - "a future major release. Did you mean to render instead?" - ); - } + { + if (context._context !== undefined) { + context = context._context; } - } else { - context = context._context; } } @@ -17887,7 +17903,14 @@ if (__DEV__) { case ContextProvider: { var newValue = workInProgress.memoizedProps.value; - var context = workInProgress.type._context; + var context; + + if (enableRenderableContext) { + context = workInProgress.type; + } else { + context = workInProgress.type._context; + } + pushProvider(workInProgress, context, newValue); break; } @@ -18871,8 +18894,14 @@ if (__DEV__) { var oldProps = currentParent.memoizedProps; if (oldProps !== null) { - var providerType = parent.type; - var context = providerType._context; + var context = void 0; + + if (enableRenderableContext) { + context = parent.type; + } else { + context = parent.type._context; + } + var newProps = parent.pendingProps; var newValue = newProps.value; var oldValue = oldProps.value; @@ -19413,7 +19442,10 @@ if (__DEV__) { } function collectNearestContextValues(node, context, childContextValues) { - if (node.tag === ContextProvider && node.type._context === context) { + if ( + node.tag === ContextProvider && + (enableRenderableContext ? node.type : node.type._context) === context + ) { var contextValue = node.memoizedProps.value; childContextValues.push(contextValue); } else { @@ -20273,7 +20305,14 @@ if (__DEV__) { case ContextProvider: // Pop provider fiber - var context = workInProgress.type._context; + var context; + + if (enableRenderableContext) { + context = workInProgress.type; + } else { + context = workInProgress.type._context; + } + popProvider(context, workInProgress); bubbleProperties(workInProgress); return null; @@ -20756,7 +20795,14 @@ if (__DEV__) { return null; case ContextProvider: - var context = workInProgress.type._context; + var context; + + if (enableRenderableContext) { + context = workInProgress.type; + } else { + context = workInProgress.type._context; + } + popProvider(context, workInProgress); return null; @@ -20848,7 +20894,14 @@ if (__DEV__) { break; case ContextProvider: - var context = interruptedWork.type._context; + var context; + + if (enableRenderableContext) { + context = interruptedWork.type; + } else { + context = interruptedWork.type._context; + } + popProvider(context, interruptedWork); break; @@ -29674,13 +29727,29 @@ if (__DEV__) { if (typeof type === "object" && type !== null) { switch (type.$$typeof) { case REACT_PROVIDER_TYPE: - fiberTag = ContextProvider; - break getTag; + if (!enableRenderableContext) { + fiberTag = ContextProvider; + break getTag; + } + + // Fall through case REACT_CONTEXT_TYPE: - // This is a consumer - fiberTag = ContextConsumer; - break getTag; + if (enableRenderableContext) { + fiberTag = ContextProvider; + break getTag; + } else { + fiberTag = ContextConsumer; + break getTag; + } + + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + fiberTag = ContextConsumer; + break getTag; + } + + // Fall through case REACT_FORWARD_REF_TYPE: fiberTag = ForwardRef; diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index 21e9288d0c..175142f02f 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -66,7 +66,7 @@ if (__DEV__) { return self; } - var ReactVersion = "18.3.0-www-modern-95a0d372"; + var ReactVersion = "18.3.0-www-modern-6bdcbf17"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -188,7 +188,8 @@ if (__DEV__) { transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = - dynamicFeatureFlags.enableInfiniteRenderLoopDetection; // On WWW, true is used for a new modern build. + dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, true is used for a new modern build. var enableProfilerTimer = true; var enableProfilerCommitHooks = true; var enableProfilerNestedUpdatePhase = true; @@ -237,7 +238,9 @@ if (__DEV__) { var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext + + var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"); var REACT_CONTEXT_TYPE = Symbol.for("react.context"); var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); @@ -349,13 +352,30 @@ if (__DEV__) { } switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName$1(provider._context) + ".Provider"; + } + case REACT_CONTEXT_TYPE: var context = type; - return getContextName$1(context) + ".Consumer"; - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName$1(provider._context) + ".Provider"; + if (enableRenderableContext) { + return getContextName$1(context) + ".Provider"; + } else { + return getContextName$1(context) + ".Consumer"; + } + + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName$1(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName$1(type, type.render, "ForwardRef"); @@ -409,12 +429,22 @@ if (__DEV__) { return "Cache"; case ContextConsumer: - var context = type; - return getContextName(context) + ".Consumer"; + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + var context = type; + return getContextName(context) + ".Consumer"; + } case ContextProvider: - var provider = type; - return getContextName(provider._context) + ".Provider"; + if (enableRenderableContext) { + var _context = type; + return getContextName(_context) + ".Provider"; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } case DehydratedFragment: return "DehydratedFragment"; @@ -12891,8 +12921,7 @@ if (__DEV__) { var isValid = // Allow null for conditional declaration contextType === null || (contextType !== undefined && - contextType.$$typeof === REACT_CONTEXT_TYPE && - contextType._context === undefined); // Not a + contextType.$$typeof === REACT_CONTEXT_TYPE); if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) { didWarnAboutInvalidateContextType.add(ctor); @@ -12906,11 +12935,7 @@ if (__DEV__) { "try moving the createContext() call to a separate file."; } else if (typeof contextType !== "object") { addendum = " However, it is set to a " + typeof contextType + "."; - } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) { - addendum = - " Did you accidentally pass the Context.Provider instead?"; - } else if (contextType._context !== undefined) { - // + } else if (contextType.$$typeof === REACT_CONSUMER_TYPE) { addendum = " Did you accidentally pass the Context.Consumer instead?"; } else { @@ -17234,8 +17259,14 @@ if (__DEV__) { var hasWarnedAboutUsingNoValuePropOnContextProvider = false; function updateContextProvider(current, workInProgress, renderLanes) { - var providerType = workInProgress.type; - var context = providerType._context; + var context; + + if (enableRenderableContext) { + context = workInProgress.type; + } else { + context = workInProgress.type._context; + } + var newProps = workInProgress.pendingProps; var oldProps = workInProgress.memoizedProps; var newValue = newProps.value; @@ -17295,34 +17326,19 @@ if (__DEV__) { return workInProgress.child; } - var hasWarnedAboutUsingContextAsConsumer = false; - function updateContextConsumer(current, workInProgress, renderLanes) { - var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In - // DEV mode, we create a separate object for Context.Consumer that acts - // like a proxy to Context. This proxy object adds unnecessary code in PROD - // so we use the old behaviour (Context.Consumer references Context) to - // reduce size and overhead. The separate object references context via - // a property called "_context", which also gives us the ability to check - // in DEV mode if this property exists or not and warn if it does not. + var context; - { - if (context._context === undefined) { - // This may be because it's a Context (rather than a Consumer). - // Or it may be because it's older React where they're the same thing. - // We only want to warn if we're sure it's a new React. - if (context !== context.Consumer) { - if (!hasWarnedAboutUsingContextAsConsumer) { - hasWarnedAboutUsingContextAsConsumer = true; + if (enableRenderableContext) { + var consumerType = workInProgress.type; + context = consumerType._context; + } else { + context = workInProgress.type; - error( - "Rendering directly is not supported and will be removed in " + - "a future major release. Did you mean to render instead?" - ); - } + { + if (context._context !== undefined) { + context = context._context; } - } else { - context = context._context; } } @@ -17560,7 +17576,14 @@ if (__DEV__) { case ContextProvider: { var newValue = workInProgress.memoizedProps.value; - var context = workInProgress.type._context; + var context; + + if (enableRenderableContext) { + context = workInProgress.type; + } else { + context = workInProgress.type._context; + } + pushProvider(workInProgress, context, newValue); break; } @@ -18544,8 +18567,14 @@ if (__DEV__) { var oldProps = currentParent.memoizedProps; if (oldProps !== null) { - var providerType = parent.type; - var context = providerType._context; + var context = void 0; + + if (enableRenderableContext) { + context = parent.type; + } else { + context = parent.type._context; + } + var newProps = parent.pendingProps; var newValue = newProps.value; var oldValue = oldProps.value; @@ -19086,7 +19115,10 @@ if (__DEV__) { } function collectNearestContextValues(node, context, childContextValues) { - if (node.tag === ContextProvider && node.type._context === context) { + if ( + node.tag === ContextProvider && + (enableRenderableContext ? node.type : node.type._context) === context + ) { var contextValue = node.memoizedProps.value; childContextValues.push(contextValue); } else { @@ -19939,7 +19971,14 @@ if (__DEV__) { case ContextProvider: // Pop provider fiber - var context = workInProgress.type._context; + var context; + + if (enableRenderableContext) { + context = workInProgress.type; + } else { + context = workInProgress.type._context; + } + popProvider(context, workInProgress); bubbleProperties(workInProgress); return null; @@ -20407,7 +20446,14 @@ if (__DEV__) { return null; case ContextProvider: - var context = workInProgress.type._context; + var context; + + if (enableRenderableContext) { + context = workInProgress.type; + } else { + context = workInProgress.type._context; + } + popProvider(context, workInProgress); return null; @@ -20492,7 +20538,14 @@ if (__DEV__) { break; case ContextProvider: - var context = interruptedWork.type._context; + var context; + + if (enableRenderableContext) { + context = interruptedWork.type; + } else { + context = interruptedWork.type._context; + } + popProvider(context, interruptedWork); break; @@ -29309,13 +29362,29 @@ if (__DEV__) { if (typeof type === "object" && type !== null) { switch (type.$$typeof) { case REACT_PROVIDER_TYPE: - fiberTag = ContextProvider; - break getTag; + if (!enableRenderableContext) { + fiberTag = ContextProvider; + break getTag; + } + + // Fall through case REACT_CONTEXT_TYPE: - // This is a consumer - fiberTag = ContextConsumer; - break getTag; + if (enableRenderableContext) { + fiberTag = ContextProvider; + break getTag; + } else { + fiberTag = ContextConsumer; + break getTag; + } + + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + fiberTag = ContextConsumer; + break getTag; + } + + // Fall through case REACT_FORWARD_REF_TYPE: fiberTag = ForwardRef; diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index ab7da5d5e4..28da4ce771 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -85,12 +85,14 @@ var ReactSharedInternals = transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), + REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), @@ -140,10 +142,17 @@ function getComponentNameFromType(type) { } if ("object" === typeof type) switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - return (type.displayName || "Context") + ".Consumer"; case REACT_PROVIDER_TYPE: - return (type._context.displayName || "Context") + ".Provider"; + if (enableRenderableContext) break; + else return (type._context.displayName || "Context") + ".Provider"; + case REACT_CONTEXT_TYPE: + return enableRenderableContext + ? (type.displayName || "Context") + ".Provider" + : (type.displayName || "Context") + ".Consumer"; + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) + return (type._context.displayName || "Context") + ".Consumer"; + break; case REACT_FORWARD_REF_TYPE: var innerType = type.render; type = type.displayName; @@ -173,9 +182,13 @@ function getComponentNameFromFiber(fiber) { case 24: return "Cache"; case 9: - return (type.displayName || "Context") + ".Consumer"; + return enableRenderableContext + ? (type._context.displayName || "Context") + ".Consumer" + : (type.displayName || "Context") + ".Consumer"; case 10: - return (type._context.displayName || "Context") + ".Provider"; + return enableRenderableContext + ? (type.displayName || "Context") + ".Provider" + : (type._context.displayName || "Context") + ".Provider"; case 18: return "DehydratedFragment"; case 11: @@ -275,36 +288,36 @@ function findCurrentFiberUsingSlowPath(fiber) { } if (a.return !== b.return) (a = parentA), (b = parentB); else { - for (var didFindChild = !1, child$0 = parentA.child; child$0; ) { - if (child$0 === a) { + for (var didFindChild = !1, child$1 = parentA.child; child$1; ) { + if (child$1 === a) { didFindChild = !0; a = parentA; b = parentB; break; } - if (child$0 === b) { + if (child$1 === b) { didFindChild = !0; b = parentA; a = parentB; break; } - child$0 = child$0.sibling; + child$1 = child$1.sibling; } if (!didFindChild) { - for (child$0 = parentB.child; child$0; ) { - if (child$0 === a) { + for (child$1 = parentB.child; child$1; ) { + if (child$1 === a) { didFindChild = !0; a = parentB; b = parentA; break; } - if (child$0 === b) { + if (child$1 === b) { didFindChild = !0; b = parentB; a = parentA; break; } - child$0 = child$0.sibling; + child$1 = child$1.sibling; } if (!didFindChild) throw Error(formatProdErrorMessage(189)); } @@ -576,18 +589,18 @@ function markRootFinished(root, remainingLanes, spawnedLane) { 0 < noLongerPendingLanes; ) { - var index$4 = 31 - clz32(noLongerPendingLanes), - lane = 1 << index$4; - remainingLanes[index$4] = 0; - expirationTimes[index$4] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$4]; + var index$5 = 31 - clz32(noLongerPendingLanes), + lane = 1 << index$5; + remainingLanes[index$5] = 0; + expirationTimes[index$5] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$5]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$4] = null, index$4 = 0; - index$4 < hiddenUpdatesForLane.length; - index$4++ + hiddenUpdates[index$5] = null, index$5 = 0; + index$5 < hiddenUpdatesForLane.length; + index$5++ ) { - var update = hiddenUpdatesForLane[index$4]; + var update = hiddenUpdatesForLane[index$5]; null !== update && (update.lane &= -536870913); } noLongerPendingLanes &= ~lane; @@ -607,21 +620,21 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$5 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$5; - (lane & entangledLanes) | (root[index$5] & entangledLanes) && - (root[index$5] |= entangledLanes); + var index$6 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$6; + (lane & entangledLanes) | (root[index$6] & entangledLanes) && + (root[index$6] |= entangledLanes); rootEntangledLanes &= ~lane; } } function getTransitionsForLanes(root, lanes) { if (!enableTransitionTracing) return null; for (var transitionsForLanes = []; 0 < lanes; ) { - var index$7 = 31 - clz32(lanes), - lane = 1 << index$7; - index$7 = root.transitionLanes[index$7]; - null !== index$7 && - index$7.forEach(function (transition) { + var index$8 = 31 - clz32(lanes), + lane = 1 << index$8; + index$8 = root.transitionLanes[index$8]; + null !== index$8 && + index$8.forEach(function (transition) { transitionsForLanes.push(transition); }); lanes &= ~lane; @@ -631,10 +644,10 @@ function getTransitionsForLanes(root, lanes) { function clearTransitionsForLanes(root, lanes) { if (enableTransitionTracing) for (; 0 < lanes; ) { - var index$8 = 31 - clz32(lanes), - lane = 1 << index$8; - null !== root.transitionLanes[index$8] && - (root.transitionLanes[index$8] = null); + var index$9 = 31 - clz32(lanes), + lane = 1 << index$9; + null !== root.transitionLanes[index$9] && + (root.transitionLanes[index$9] = null); lanes &= ~lane; } } @@ -855,16 +868,16 @@ function describeNativeComponentFrame(fn, construct) { } else { try { Fake.call(); - } catch (x$9) { - control = x$9; + } catch (x$10) { + control = x$10; } fn.call(Fake.prototype); } } else { try { throw Error(); - } catch (x$10) { - control = x$10; + } catch (x$11) { + control = x$11; } (Fake = fn()) && "function" === typeof Fake.catch && @@ -1204,35 +1217,35 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { var didPerformSomeWork = !1; for (var root = firstScheduledRoot; null !== root; ) { if (!onlyLegacy || 0 === root.tag) { - var workInProgressRootRenderLanes$12 = workInProgressRootRenderLanes, + var workInProgressRootRenderLanes$13 = workInProgressRootRenderLanes, nextLanes = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$12 : 0 + root === workInProgressRoot ? workInProgressRootRenderLanes$13 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$12 = root; + workInProgressRootRenderLanes$13 = root; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { var exitStatus = renderRootSync( - workInProgressRootRenderLanes$12, + workInProgressRootRenderLanes$13, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$12.tag && + 0 !== workInProgressRootRenderLanes$13.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$12, + workInProgressRootRenderLanes$13, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$12, + workInProgressRootRenderLanes$13, originallyAttemptedLanes, errorRetryLanes ))); @@ -1240,34 +1253,34 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$12, 0), + prepareFreshStack(workInProgressRootRenderLanes$13, 0), markRootSuspended( - workInProgressRootRenderLanes$12, + workInProgressRootRenderLanes$13, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$12), + ensureRootIsScheduled(workInProgressRootRenderLanes$13), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$12, + workInProgressRootRenderLanes$13, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$12.finishedWork = - workInProgressRootRenderLanes$12.current.alternate), - (workInProgressRootRenderLanes$12.finishedLanes = + : ((workInProgressRootRenderLanes$13.finishedWork = + workInProgressRootRenderLanes$13.current.alternate), + (workInProgressRootRenderLanes$13.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$12, + workInProgressRootRenderLanes$13, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$12); + ensureRootIsScheduled(workInProgressRootRenderLanes$13); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } @@ -1323,12 +1336,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < pendingLanes; ) { - var index$2 = 31 - clz32(pendingLanes), - lane = 1 << index$2, - expirationTime = expirationTimes[index$2]; + var index$3 = 31 - clz32(pendingLanes), + lane = 1 << index$3, + expirationTime = expirationTimes[index$3]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$2] = computeExpirationTime(lane, currentTime); + expirationTimes[index$3] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); pendingLanes &= ~lane; } @@ -2867,7 +2880,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$31 = !1; + didReadFromEntangledAsyncAction$32 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -2880,7 +2893,7 @@ function updateReducerImpl(hook, current, reducer) { if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$31 = !0); + (didReadFromEntangledAsyncAction$32 = !0); continue; } else (updateLane = { @@ -2909,7 +2922,7 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$31 = !0); + (didReadFromEntangledAsyncAction$32 = !0); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane); @@ -2939,7 +2952,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$31 && + didReadFromEntangledAsyncAction$32 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -5548,7 +5561,9 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 10: pushProvider( workInProgress, - workInProgress.type._context, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, workInProgress.memoizedProps.value ); break; @@ -5799,7 +5814,9 @@ function propagateParentContextChanges( if (null === currentParent) throw Error(formatProdErrorMessage(387)); currentParent = currentParent.memoizedProps; if (null !== currentParent) { - var context = parent.type._context; + var context = enableRenderableContext + ? parent.type + : parent.type._context; objectIs(parent.pendingProps.value, currentParent.value) || (null !== current ? current.push(context) : (current = [context])); } @@ -6026,7 +6043,10 @@ function collectNearestChildContextValues( var node = startingChild, context = context$jscomp$0, childContextValues = childContextValues$jscomp$0; - if (10 === node.tag && node.type._context === context) + if ( + 10 === node.tag && + (enableRenderableContext ? node.type : node.type._context) === context + ) childContextValues.push(node.memoizedProps.value); else { var child = node.child; @@ -6088,14 +6108,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$77 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$77 = lastTailNode), + for (var lastTailNode$78 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$78 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$77 + null === lastTailNode$78 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$77.sibling = null); + : (lastTailNode$78.sibling = null); } } function bubbleProperties(completedWork) { @@ -6105,19 +6125,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$78 = completedWork.child; null !== child$78; ) - (newChildLanes |= child$78.lanes | child$78.childLanes), - (subtreeFlags |= child$78.subtreeFlags & 31457280), - (subtreeFlags |= child$78.flags & 31457280), - (child$78.return = completedWork), - (child$78 = child$78.sibling); + for (var child$79 = completedWork.child; null !== child$79; ) + (newChildLanes |= child$79.lanes | child$79.childLanes), + (subtreeFlags |= child$79.subtreeFlags & 31457280), + (subtreeFlags |= child$79.flags & 31457280), + (child$79.return = completedWork), + (child$79 = child$79.sibling); else - for (child$78 = completedWork.child; null !== child$78; ) - (newChildLanes |= child$78.lanes | child$78.childLanes), - (subtreeFlags |= child$78.subtreeFlags), - (subtreeFlags |= child$78.flags), - (child$78.return = completedWork), - (child$78 = child$78.sibling); + for (child$79 = completedWork.child; null !== child$79; ) + (newChildLanes |= child$79.lanes | child$79.childLanes), + (subtreeFlags |= child$79.subtreeFlags), + (subtreeFlags |= child$79.flags), + (child$79.return = completedWork), + (child$79 = child$79.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6294,11 +6314,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (instance = newProps.alternate.memoizedState.cachePool.pool); - var cache$82 = null; + var cache$83 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$82 = newProps.memoizedState.cachePool.pool); - cache$82 !== instance && (newProps.flags |= 2048); + (cache$83 = newProps.memoizedState.cachePool.pool); + cache$83 !== instance && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -6313,7 +6333,11 @@ function completeWork(current, workInProgress, renderLanes) { return popHostContainer(), bubbleProperties(workInProgress), null; case 10: return ( - popProvider(workInProgress.type._context), + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), bubbleProperties(workInProgress), null ); @@ -6328,8 +6352,8 @@ function completeWork(current, workInProgress, renderLanes) { instance = workInProgress.memoizedState; if (null === instance) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$82 = instance.rendering; - if (null === cache$82) + cache$83 = instance.rendering; + if (null === cache$83) if (newProps) cutOffTailIfNeeded(instance, !1); else { if ( @@ -6337,11 +6361,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$82 = findFirstSuspended(current); - if (null !== cache$82) { + cache$83 = findFirstSuspended(current); + if (null !== cache$83) { workInProgress.flags |= 128; cutOffTailIfNeeded(instance, !1); - current = cache$82.updateQueue; + current = cache$83.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6366,7 +6390,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$82)), null !== current)) { + if (((current = findFirstSuspended(cache$83)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6376,7 +6400,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !0), null === instance.tail && "hidden" === instance.tailMode && - !cache$82.alternate) + !cache$83.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6388,13 +6412,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !1), (workInProgress.lanes = 4194304)); instance.isBackwards - ? ((cache$82.sibling = workInProgress.child), - (workInProgress.child = cache$82)) + ? ((cache$83.sibling = workInProgress.child), + (workInProgress.child = cache$83)) : ((current = instance.last), null !== current - ? (current.sibling = cache$82) - : (workInProgress.child = cache$82), - (instance.last = cache$82)); + ? (current.sibling = cache$83) + : (workInProgress.child = cache$83), + (instance.last = cache$83)); } if (null !== instance.tail) return ( @@ -6531,7 +6555,14 @@ function unwindWork(current, workInProgress) { case 4: return popHostContainer(), null; case 10: - return popProvider(workInProgress.type._context), null; + return ( + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + null + ); case 22: case 23: return ( @@ -6588,7 +6619,11 @@ function unwindInterruptedWork(current, interruptedWork) { pop(suspenseStackCursor); break; case 10: - popProvider(interruptedWork.type._context); + popProvider( + enableRenderableContext + ? interruptedWork.type + : interruptedWork.type._context + ); break; case 22: case 23: @@ -6652,8 +6687,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$100) { - captureCommitPhaseError(current, nearestMountedAncestor, error$100); + } catch (error$101) { + captureCommitPhaseError(current, nearestMountedAncestor, error$101); } else ref.current = null; } @@ -6855,11 +6890,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$101) { + } catch (error$102) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$101 + error$102 ); } } @@ -7452,8 +7487,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$109) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$109); + } catch (error$110) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$110); } } break; @@ -7487,8 +7522,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.updateQueue = null; try { flags._applyProps(flags, newProps, current); - } catch (error$112) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$112); + } catch (error$113) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$113); } } break; @@ -7524,8 +7559,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$114) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$114); + } catch (error$115) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$115); } flags = finishedWork.updateQueue; null !== flags && @@ -7665,12 +7700,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$104 = JSCompiler_inline_result.stateNode.containerInfo, - before$105 = getHostSibling(finishedWork); + var parent$105 = JSCompiler_inline_result.stateNode.containerInfo, + before$106 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$105, - parent$104 + before$106, + parent$105 ); break; default: @@ -8131,9 +8166,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$120 = finishedWork.stateNode; + var instance$121 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$120._visibility & 4 + ? instance$121._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8146,7 +8181,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$120._visibility |= 4), + : ((instance$121._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8154,7 +8189,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$120._visibility |= 4), + : ((instance$121._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8167,7 +8202,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$120 + instance$121 ); break; case 24: @@ -8619,11 +8654,11 @@ function scheduleUpdateOnFiber(root, fiber, lane) { enableTransitionTracing) ) { var transitionLanesMap = root.transitionLanes, - index$6 = 31 - clz32(lane), - transitions = transitionLanesMap[index$6]; + index$7 = 31 - clz32(lane), + transitions = transitionLanesMap[index$7]; null === transitions && (transitions = new Set()); transitions.add(transition); - transitionLanesMap[index$6] = transitions; + transitionLanesMap[index$7] = transitions; } } root === workInProgressRoot && @@ -8872,9 +8907,9 @@ function markRootSuspended(root, suspendedLanes, spawnedLane) { 0 < lanes; ) { - var index$3 = 31 - clz32(lanes), - lane = 1 << index$3; - expirationTimes[index$3] = -1; + var index$4 = 31 - clz32(lanes), + lane = 1 << index$4; + expirationTimes[index$4] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -8931,9 +8966,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$1 = 31 - clz32(allEntangledLanes), - lane = 1 << index$1; - lanes |= root[index$1]; + var index$2 = 31 - clz32(allEntangledLanes), + lane = 1 << index$2; + lanes |= root[index$2]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -9029,8 +9064,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$128) { - handleThrow(root, thrownValue$128); + } catch (thrownValue$129) { + handleThrow(root, thrownValue$129); } while (1); lanes && root.shellSuspendCounter++; @@ -9135,8 +9170,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$130) { - handleThrow(root, thrownValue$130); + } catch (thrownValue$131) { + handleThrow(root, thrownValue$131); } while (1); resetContextDependencies(); @@ -9876,7 +9911,9 @@ beginWork = function (current, workInProgress, renderLanes) { ); case 10: a: { - Component = workInProgress.type._context; + Component = enableRenderableContext + ? workInProgress.type + : workInProgress.type._context; context = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; nextCache = context.value; @@ -9906,7 +9943,9 @@ beginWork = function (current, workInProgress, renderLanes) { return workInProgress; case 9: return ( - (context = workInProgress.type), + (context = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), (Component = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), (context = readContext(context)), @@ -10263,11 +10302,18 @@ function createFiberFromTypeAndProps( if ("object" === typeof type && null !== type) switch (type.$$typeof) { case REACT_PROVIDER_TYPE: - fiberTag = 10; - break a; + if (!enableRenderableContext) { + fiberTag = 10; + break a; + } case REACT_CONTEXT_TYPE: - fiberTag = 9; + fiberTag = enableRenderableContext ? 10 : 9; break a; + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + fiberTag = 9; + break a; + } case REACT_FORWARD_REF_TYPE: fiberTag = 11; break a; @@ -10583,19 +10629,19 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component), - devToolsConfig$jscomp$inline_1153 = { + devToolsConfig$jscomp$inline_1154 = { findFiberByHostInstance: function () { return null; }, bundleType: 0, - version: "18.3.0-www-classic-feceed69", + version: "18.3.0-www-classic-c40bd6a3", rendererPackageName: "react-art" }; -var internals$jscomp$inline_1327 = { - bundleType: devToolsConfig$jscomp$inline_1153.bundleType, - version: devToolsConfig$jscomp$inline_1153.version, - rendererPackageName: devToolsConfig$jscomp$inline_1153.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1153.rendererConfig, +var internals$jscomp$inline_1328 = { + bundleType: devToolsConfig$jscomp$inline_1154.bundleType, + version: devToolsConfig$jscomp$inline_1154.version, + rendererPackageName: devToolsConfig$jscomp$inline_1154.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1154.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10612,26 +10658,26 @@ var internals$jscomp$inline_1327 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1153.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1154.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-classic-feceed69" + reconcilerVersion: "18.3.0-www-classic-c40bd6a3" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1328 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1329 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1328.isDisabled && - hook$jscomp$inline_1328.supportsFiber + !hook$jscomp$inline_1329.isDisabled && + hook$jscomp$inline_1329.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1328.inject( - internals$jscomp$inline_1327 + (rendererID = hook$jscomp$inline_1329.inject( + internals$jscomp$inline_1328 )), - (injectedHook = hook$jscomp$inline_1328); + (injectedHook = hook$jscomp$inline_1329); } catch (err) {} } var Path = Mode$1.Path; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index 1c549b3747..c69e97598b 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -85,12 +85,14 @@ var ReactSharedInternals = transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), + REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), @@ -160,36 +162,36 @@ function findCurrentFiberUsingSlowPath(fiber) { } if (a.return !== b.return) (a = parentA), (b = parentB); else { - for (var didFindChild = !1, child$0 = parentA.child; child$0; ) { - if (child$0 === a) { + for (var didFindChild = !1, child$1 = parentA.child; child$1; ) { + if (child$1 === a) { didFindChild = !0; a = parentA; b = parentB; break; } - if (child$0 === b) { + if (child$1 === b) { didFindChild = !0; b = parentA; a = parentB; break; } - child$0 = child$0.sibling; + child$1 = child$1.sibling; } if (!didFindChild) { - for (child$0 = parentB.child; child$0; ) { - if (child$0 === a) { + for (child$1 = parentB.child; child$1; ) { + if (child$1 === a) { didFindChild = !0; a = parentB; b = parentA; break; } - if (child$0 === b) { + if (child$1 === b) { didFindChild = !0; b = parentB; a = parentA; break; } - child$0 = child$0.sibling; + child$1 = child$1.sibling; } if (!didFindChild) throw Error(formatProdErrorMessage(189)); } @@ -461,18 +463,18 @@ function markRootFinished(root, remainingLanes, spawnedLane) { 0 < noLongerPendingLanes; ) { - var index$4 = 31 - clz32(noLongerPendingLanes), - lane = 1 << index$4; - remainingLanes[index$4] = 0; - expirationTimes[index$4] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$4]; + var index$5 = 31 - clz32(noLongerPendingLanes), + lane = 1 << index$5; + remainingLanes[index$5] = 0; + expirationTimes[index$5] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$5]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$4] = null, index$4 = 0; - index$4 < hiddenUpdatesForLane.length; - index$4++ + hiddenUpdates[index$5] = null, index$5 = 0; + index$5 < hiddenUpdatesForLane.length; + index$5++ ) { - var update = hiddenUpdatesForLane[index$4]; + var update = hiddenUpdatesForLane[index$5]; null !== update && (update.lane &= -536870913); } noLongerPendingLanes &= ~lane; @@ -492,21 +494,21 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$5 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$5; - (lane & entangledLanes) | (root[index$5] & entangledLanes) && - (root[index$5] |= entangledLanes); + var index$6 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$6; + (lane & entangledLanes) | (root[index$6] & entangledLanes) && + (root[index$6] |= entangledLanes); rootEntangledLanes &= ~lane; } } function getTransitionsForLanes(root, lanes) { if (!enableTransitionTracing) return null; for (var transitionsForLanes = []; 0 < lanes; ) { - var index$7 = 31 - clz32(lanes), - lane = 1 << index$7; - index$7 = root.transitionLanes[index$7]; - null !== index$7 && - index$7.forEach(function (transition) { + var index$8 = 31 - clz32(lanes), + lane = 1 << index$8; + index$8 = root.transitionLanes[index$8]; + null !== index$8 && + index$8.forEach(function (transition) { transitionsForLanes.push(transition); }); lanes &= ~lane; @@ -516,10 +518,10 @@ function getTransitionsForLanes(root, lanes) { function clearTransitionsForLanes(root, lanes) { if (enableTransitionTracing) for (; 0 < lanes; ) { - var index$8 = 31 - clz32(lanes), - lane = 1 << index$8; - null !== root.transitionLanes[index$8] && - (root.transitionLanes[index$8] = null); + var index$9 = 31 - clz32(lanes), + lane = 1 << index$9; + null !== root.transitionLanes[index$9] && + (root.transitionLanes[index$9] = null); lanes &= ~lane; } } @@ -740,16 +742,16 @@ function describeNativeComponentFrame(fn, construct) { } else { try { Fake.call(); - } catch (x$9) { - control = x$9; + } catch (x$10) { + control = x$10; } fn.call(Fake.prototype); } } else { try { throw Error(); - } catch (x$10) { - control = x$10; + } catch (x$11) { + control = x$11; } (Fake = fn()) && "function" === typeof Fake.catch && @@ -1011,35 +1013,35 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { var didPerformSomeWork = !1; for (var root = firstScheduledRoot; null !== root; ) { if (!onlyLegacy || 0 === root.tag) { - var workInProgressRootRenderLanes$12 = workInProgressRootRenderLanes, + var workInProgressRootRenderLanes$13 = workInProgressRootRenderLanes, nextLanes = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$12 : 0 + root === workInProgressRoot ? workInProgressRootRenderLanes$13 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$12 = root; + workInProgressRootRenderLanes$13 = root; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { var exitStatus = renderRootSync( - workInProgressRootRenderLanes$12, + workInProgressRootRenderLanes$13, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$12.tag && + 0 !== workInProgressRootRenderLanes$13.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$12, + workInProgressRootRenderLanes$13, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$12, + workInProgressRootRenderLanes$13, originallyAttemptedLanes, errorRetryLanes ))); @@ -1047,34 +1049,34 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$12, 0), + prepareFreshStack(workInProgressRootRenderLanes$13, 0), markRootSuspended( - workInProgressRootRenderLanes$12, + workInProgressRootRenderLanes$13, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$12), + ensureRootIsScheduled(workInProgressRootRenderLanes$13), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$12, + workInProgressRootRenderLanes$13, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$12.finishedWork = - workInProgressRootRenderLanes$12.current.alternate), - (workInProgressRootRenderLanes$12.finishedLanes = + : ((workInProgressRootRenderLanes$13.finishedWork = + workInProgressRootRenderLanes$13.current.alternate), + (workInProgressRootRenderLanes$13.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$12, + workInProgressRootRenderLanes$13, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$12); + ensureRootIsScheduled(workInProgressRootRenderLanes$13); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } @@ -1130,12 +1132,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < pendingLanes; ) { - var index$2 = 31 - clz32(pendingLanes), - lane = 1 << index$2, - expirationTime = expirationTimes[index$2]; + var index$3 = 31 - clz32(pendingLanes), + lane = 1 << index$3, + expirationTime = expirationTimes[index$3]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$2] = computeExpirationTime(lane, currentTime); + expirationTimes[index$3] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); pendingLanes &= ~lane; } @@ -2674,7 +2676,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$31 = !1; + didReadFromEntangledAsyncAction$32 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -2687,7 +2689,7 @@ function updateReducerImpl(hook, current, reducer) { if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$31 = !0); + (didReadFromEntangledAsyncAction$32 = !0); continue; } else (updateLane = { @@ -2716,7 +2718,7 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$31 = !0); + (didReadFromEntangledAsyncAction$32 = !0); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane); @@ -2746,7 +2748,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$31 && + didReadFromEntangledAsyncAction$32 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -5304,7 +5306,9 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 10: pushProvider( workInProgress, - workInProgress.type._context, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, workInProgress.memoizedProps.value ); break; @@ -5555,7 +5559,9 @@ function propagateParentContextChanges( if (null === currentParent) throw Error(formatProdErrorMessage(387)); currentParent = currentParent.memoizedProps; if (null !== currentParent) { - var context = parent.type._context; + var context = enableRenderableContext + ? parent.type + : parent.type._context; objectIs(parent.pendingProps.value, currentParent.value) || (null !== current ? current.push(context) : (current = [context])); } @@ -5782,7 +5788,10 @@ function collectNearestChildContextValues( var node = startingChild, context = context$jscomp$0, childContextValues = childContextValues$jscomp$0; - if (10 === node.tag && node.type._context === context) + if ( + 10 === node.tag && + (enableRenderableContext ? node.type : node.type._context) === context + ) childContextValues.push(node.memoizedProps.value); else { var child = node.child; @@ -5844,14 +5853,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$77 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$77 = lastTailNode), + for (var lastTailNode$78 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$78 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$77 + null === lastTailNode$78 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$77.sibling = null); + : (lastTailNode$78.sibling = null); } } function bubbleProperties(completedWork) { @@ -5861,19 +5870,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$78 = completedWork.child; null !== child$78; ) - (newChildLanes |= child$78.lanes | child$78.childLanes), - (subtreeFlags |= child$78.subtreeFlags & 31457280), - (subtreeFlags |= child$78.flags & 31457280), - (child$78.return = completedWork), - (child$78 = child$78.sibling); + for (var child$79 = completedWork.child; null !== child$79; ) + (newChildLanes |= child$79.lanes | child$79.childLanes), + (subtreeFlags |= child$79.subtreeFlags & 31457280), + (subtreeFlags |= child$79.flags & 31457280), + (child$79.return = completedWork), + (child$79 = child$79.sibling); else - for (child$78 = completedWork.child; null !== child$78; ) - (newChildLanes |= child$78.lanes | child$78.childLanes), - (subtreeFlags |= child$78.subtreeFlags), - (subtreeFlags |= child$78.flags), - (child$78.return = completedWork), - (child$78 = child$78.sibling); + for (child$79 = completedWork.child; null !== child$79; ) + (newChildLanes |= child$79.lanes | child$79.childLanes), + (subtreeFlags |= child$79.subtreeFlags), + (subtreeFlags |= child$79.flags), + (child$79.return = completedWork), + (child$79 = child$79.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6044,11 +6053,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (instance = newProps.alternate.memoizedState.cachePool.pool); - var cache$82 = null; + var cache$83 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$82 = newProps.memoizedState.cachePool.pool); - cache$82 !== instance && (newProps.flags |= 2048); + (cache$83 = newProps.memoizedState.cachePool.pool); + cache$83 !== instance && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -6063,7 +6072,11 @@ function completeWork(current, workInProgress, renderLanes) { return popHostContainer(), bubbleProperties(workInProgress), null; case 10: return ( - popProvider(workInProgress.type._context), + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), bubbleProperties(workInProgress), null ); @@ -6074,8 +6087,8 @@ function completeWork(current, workInProgress, renderLanes) { instance = workInProgress.memoizedState; if (null === instance) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$82 = instance.rendering; - if (null === cache$82) + cache$83 = instance.rendering; + if (null === cache$83) if (newProps) cutOffTailIfNeeded(instance, !1); else { if ( @@ -6083,11 +6096,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$82 = findFirstSuspended(current); - if (null !== cache$82) { + cache$83 = findFirstSuspended(current); + if (null !== cache$83) { workInProgress.flags |= 128; cutOffTailIfNeeded(instance, !1); - current = cache$82.updateQueue; + current = cache$83.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6112,7 +6125,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$82)), null !== current)) { + if (((current = findFirstSuspended(cache$83)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6122,7 +6135,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !0), null === instance.tail && "hidden" === instance.tailMode && - !cache$82.alternate) + !cache$83.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6134,13 +6147,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !1), (workInProgress.lanes = 4194304)); instance.isBackwards - ? ((cache$82.sibling = workInProgress.child), - (workInProgress.child = cache$82)) + ? ((cache$83.sibling = workInProgress.child), + (workInProgress.child = cache$83)) : ((current = instance.last), null !== current - ? (current.sibling = cache$82) - : (workInProgress.child = cache$82), - (instance.last = cache$82)); + ? (current.sibling = cache$83) + : (workInProgress.child = cache$83), + (instance.last = cache$83)); } if (null !== instance.tail) return ( @@ -6274,7 +6287,14 @@ function unwindWork(current, workInProgress) { case 4: return popHostContainer(), null; case 10: - return popProvider(workInProgress.type._context), null; + return ( + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + null + ); case 22: case 23: return ( @@ -6325,7 +6345,11 @@ function unwindInterruptedWork(current, interruptedWork) { pop(suspenseStackCursor); break; case 10: - popProvider(interruptedWork.type._context); + popProvider( + enableRenderableContext + ? interruptedWork.type + : interruptedWork.type._context + ); break; case 22: case 23: @@ -6389,8 +6413,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$99) { - captureCommitPhaseError(current, nearestMountedAncestor, error$99); + } catch (error$100) { + captureCommitPhaseError(current, nearestMountedAncestor, error$100); } else ref.current = null; } @@ -6592,11 +6616,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$100) { + } catch (error$101) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$100 + error$101 ); } } @@ -7189,8 +7213,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$108) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$108); + } catch (error$109) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$109); } } break; @@ -7224,8 +7248,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.updateQueue = null; try { flags._applyProps(flags, newProps, current); - } catch (error$111) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$111); + } catch (error$112) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$112); } } break; @@ -7261,8 +7285,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$113) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$113); + } catch (error$114) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$114); } flags = finishedWork.updateQueue; null !== flags && @@ -7402,12 +7426,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$103 = JSCompiler_inline_result.stateNode.containerInfo, - before$104 = getHostSibling(finishedWork); + var parent$104 = JSCompiler_inline_result.stateNode.containerInfo, + before$105 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$104, - parent$103 + before$105, + parent$104 ); break; default: @@ -7868,9 +7892,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$119 = finishedWork.stateNode; + var instance$120 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$119._visibility & 4 + ? instance$120._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -7883,7 +7907,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$119._visibility |= 4), + : ((instance$120._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -7891,7 +7915,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$119._visibility |= 4), + : ((instance$120._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -7904,7 +7928,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$119 + instance$120 ); break; case 24: @@ -8356,11 +8380,11 @@ function scheduleUpdateOnFiber(root, fiber, lane) { enableTransitionTracing) ) { var transitionLanesMap = root.transitionLanes, - index$6 = 31 - clz32(lane), - transitions = transitionLanesMap[index$6]; + index$7 = 31 - clz32(lane), + transitions = transitionLanesMap[index$7]; null === transitions && (transitions = new Set()); transitions.add(transition); - transitionLanesMap[index$6] = transitions; + transitionLanesMap[index$7] = transitions; } } root === workInProgressRoot && @@ -8609,9 +8633,9 @@ function markRootSuspended(root, suspendedLanes, spawnedLane) { 0 < lanes; ) { - var index$3 = 31 - clz32(lanes), - lane = 1 << index$3; - expirationTimes[index$3] = -1; + var index$4 = 31 - clz32(lanes), + lane = 1 << index$4; + expirationTimes[index$4] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -8668,9 +8692,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$1 = 31 - clz32(allEntangledLanes), - lane = 1 << index$1; - lanes |= root[index$1]; + var index$2 = 31 - clz32(allEntangledLanes), + lane = 1 << index$2; + lanes |= root[index$2]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -8766,8 +8790,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$127) { - handleThrow(root, thrownValue$127); + } catch (thrownValue$128) { + handleThrow(root, thrownValue$128); } while (1); lanes && root.shellSuspendCounter++; @@ -8872,8 +8896,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$129) { - handleThrow(root, thrownValue$129); + } catch (thrownValue$130) { + handleThrow(root, thrownValue$130); } while (1); resetContextDependencies(); @@ -9596,7 +9620,9 @@ beginWork = function (current, workInProgress, renderLanes) { ); case 10: a: { - Component = workInProgress.type._context; + Component = enableRenderableContext + ? workInProgress.type + : workInProgress.type._context; init = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; nextCache = init.value; @@ -9618,7 +9644,9 @@ beginWork = function (current, workInProgress, renderLanes) { return workInProgress; case 9: return ( - (init = workInProgress.type), + (init = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), (Component = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), (init = readContext(init)), @@ -9969,11 +9997,18 @@ function createFiberFromTypeAndProps( if ("object" === typeof type && null !== type) switch (type.$$typeof) { case REACT_PROVIDER_TYPE: - fiberTag = 10; - break a; + if (!enableRenderableContext) { + fiberTag = 10; + break a; + } case REACT_CONTEXT_TYPE: - fiberTag = 9; + fiberTag = enableRenderableContext ? 10 : 9; break a; + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + fiberTag = 9; + break a; + } case REACT_FORWARD_REF_TYPE: fiberTag = 11; break a; @@ -10249,19 +10284,19 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component), - devToolsConfig$jscomp$inline_1133 = { + devToolsConfig$jscomp$inline_1134 = { findFiberByHostInstance: function () { return null; }, bundleType: 0, - version: "18.3.0-www-modern-b264c748", + version: "18.3.0-www-modern-db363cc4", rendererPackageName: "react-art" }; -var internals$jscomp$inline_1307 = { - bundleType: devToolsConfig$jscomp$inline_1133.bundleType, - version: devToolsConfig$jscomp$inline_1133.version, - rendererPackageName: devToolsConfig$jscomp$inline_1133.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1133.rendererConfig, +var internals$jscomp$inline_1308 = { + bundleType: devToolsConfig$jscomp$inline_1134.bundleType, + version: devToolsConfig$jscomp$inline_1134.version, + rendererPackageName: devToolsConfig$jscomp$inline_1134.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1134.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10278,26 +10313,26 @@ var internals$jscomp$inline_1307 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1133.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1134.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-modern-b264c748" + reconcilerVersion: "18.3.0-www-modern-db363cc4" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1308 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1309 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1308.isDisabled && - hook$jscomp$inline_1308.supportsFiber + !hook$jscomp$inline_1309.isDisabled && + hook$jscomp$inline_1309.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1308.inject( - internals$jscomp$inline_1307 + (rendererID = hook$jscomp$inline_1309.inject( + internals$jscomp$inline_1308 )), - (injectedHook = hook$jscomp$inline_1308); + (injectedHook = hook$jscomp$inline_1309); } catch (err) {} } var Path = Mode$1.Path; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 258d461fe0..eca14963b8 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -153,7 +153,8 @@ if (__DEV__) { transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = - dynamicFeatureFlags.enableInfiniteRenderLoopDetection; // On WWW, false is used for a new modern build. + dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, false is used for a new modern build. var enableProfilerTimer = true; var enableProfilerCommitHooks = true; var enableProfilerNestedUpdatePhase = true; @@ -204,7 +205,9 @@ if (__DEV__) { var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext + + var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"); var REACT_CONTEXT_TYPE = Symbol.for("react.context"); var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); @@ -316,13 +319,30 @@ if (__DEV__) { } switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName$1(provider._context) + ".Provider"; + } + case REACT_CONTEXT_TYPE: var context = type; - return getContextName$1(context) + ".Consumer"; - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName$1(provider._context) + ".Provider"; + if (enableRenderableContext) { + return getContextName$1(context) + ".Provider"; + } else { + return getContextName$1(context) + ".Consumer"; + } + + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName$1(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName$1(type, type.render, "ForwardRef"); @@ -376,12 +396,22 @@ if (__DEV__) { return "Cache"; case ContextConsumer: - var context = type; - return getContextName(context) + ".Consumer"; + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + var context = type; + return getContextName(context) + ".Consumer"; + } case ContextProvider: - var provider = type; - return getContextName(provider._context) + ".Provider"; + if (enableRenderableContext) { + var _context = type; + return getContextName(_context) + ".Provider"; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } case DehydratedFragment: return "DehydratedFragment"; @@ -18003,8 +18033,7 @@ if (__DEV__) { var isValid = // Allow null for conditional declaration contextType === null || (contextType !== undefined && - contextType.$$typeof === REACT_CONTEXT_TYPE && - contextType._context === undefined); // Not a + contextType.$$typeof === REACT_CONTEXT_TYPE); if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) { didWarnAboutInvalidateContextType.add(ctor); @@ -18018,11 +18047,7 @@ if (__DEV__) { "try moving the createContext() call to a separate file."; } else if (typeof contextType !== "object") { addendum = " However, it is set to a " + typeof contextType + "."; - } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) { - addendum = - " Did you accidentally pass the Context.Provider instead?"; - } else if (contextType._context !== undefined) { - // + } else if (contextType.$$typeof === REACT_CONSUMER_TYPE) { addendum = " Did you accidentally pass the Context.Consumer instead?"; } else { @@ -22703,8 +22728,14 @@ if (__DEV__) { var hasWarnedAboutUsingNoValuePropOnContextProvider = false; function updateContextProvider(current, workInProgress, renderLanes) { - var providerType = workInProgress.type; - var context = providerType._context; + var context; + + if (enableRenderableContext) { + context = workInProgress.type; + } else { + context = workInProgress.type._context; + } + var newProps = workInProgress.pendingProps; var oldProps = workInProgress.memoizedProps; var newValue = newProps.value; @@ -22764,34 +22795,19 @@ if (__DEV__) { return workInProgress.child; } - var hasWarnedAboutUsingContextAsConsumer = false; - function updateContextConsumer(current, workInProgress, renderLanes) { - var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In - // DEV mode, we create a separate object for Context.Consumer that acts - // like a proxy to Context. This proxy object adds unnecessary code in PROD - // so we use the old behaviour (Context.Consumer references Context) to - // reduce size and overhead. The separate object references context via - // a property called "_context", which also gives us the ability to check - // in DEV mode if this property exists or not and warn if it does not. + var context; - { - if (context._context === undefined) { - // This may be because it's a Context (rather than a Consumer). - // Or it may be because it's older React where they're the same thing. - // We only want to warn if we're sure it's a new React. - if (context !== context.Consumer) { - if (!hasWarnedAboutUsingContextAsConsumer) { - hasWarnedAboutUsingContextAsConsumer = true; + if (enableRenderableContext) { + var consumerType = workInProgress.type; + context = consumerType._context; + } else { + context = workInProgress.type; - error( - "Rendering directly is not supported and will be removed in " + - "a future major release. Did you mean to render instead?" - ); - } + { + if (context._context !== undefined) { + context = context._context; } - } else { - context = context._context; } } @@ -23037,7 +23053,14 @@ if (__DEV__) { case ContextProvider: { var newValue = workInProgress.memoizedProps.value; - var context = workInProgress.type._context; + var context; + + if (enableRenderableContext) { + context = workInProgress.type; + } else { + context = workInProgress.type._context; + } + pushProvider(workInProgress, context, newValue); break; } @@ -24039,8 +24062,14 @@ if (__DEV__) { var oldProps = currentParent.memoizedProps; if (oldProps !== null) { - var providerType = parent.type; - var context = providerType._context; + var context = void 0; + + if (enableRenderableContext) { + context = parent.type; + } else { + context = parent.type._context; + } + var newProps = parent.pendingProps; var newValue = newProps.value; var oldValue = oldProps.value; @@ -24581,7 +24610,10 @@ if (__DEV__) { } function collectNearestContextValues(node, context, childContextValues) { - if (node.tag === ContextProvider && node.type._context === context) { + if ( + node.tag === ContextProvider && + (enableRenderableContext ? node.type : node.type._context) === context + ) { var contextValue = node.memoizedProps.value; childContextValues.push(contextValue); } else { @@ -25658,7 +25690,14 @@ if (__DEV__) { case ContextProvider: // Pop provider fiber - var context = workInProgress.type._context; + var context; + + if (enableRenderableContext) { + context = workInProgress.type; + } else { + context = workInProgress.type._context; + } + popProvider(context, workInProgress); bubbleProperties(workInProgress); return null; @@ -26149,7 +26188,14 @@ if (__DEV__) { return null; case ContextProvider: - var context = workInProgress.type._context; + var context; + + if (enableRenderableContext) { + context = workInProgress.type; + } else { + context = workInProgress.type._context; + } + popProvider(context, workInProgress); return null; @@ -26247,7 +26293,14 @@ if (__DEV__) { break; case ContextProvider: - var context = interruptedWork.type._context; + var context; + + if (enableRenderableContext) { + context = interruptedWork.type; + } else { + context = interruptedWork.type._context; + } + popProvider(context, interruptedWork); break; @@ -35570,13 +35623,29 @@ if (__DEV__) { if (typeof type === "object" && type !== null) { switch (type.$$typeof) { case REACT_PROVIDER_TYPE: - fiberTag = ContextProvider; - break getTag; + if (!enableRenderableContext) { + fiberTag = ContextProvider; + break getTag; + } + + // Fall through case REACT_CONTEXT_TYPE: - // This is a consumer - fiberTag = ContextConsumer; - break getTag; + if (enableRenderableContext) { + fiberTag = ContextProvider; + break getTag; + } else { + fiberTag = ContextConsumer; + break getTag; + } + + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + fiberTag = ContextConsumer; + break getTag; + } + + // Fall through case REACT_FORWARD_REF_TYPE: fiberTag = ForwardRef; @@ -36007,7 +36076,7 @@ if (__DEV__) { return root; } - var ReactVersion = "18.3.0-www-classic-a4c6896e"; + var ReactVersion = "18.3.0-www-classic-768fda8b"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index 8a43b455fb..4c589cee39 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -139,7 +139,8 @@ if (__DEV__) { transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = - dynamicFeatureFlags.enableInfiniteRenderLoopDetection; // On WWW, true is used for a new modern build. + dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, true is used for a new modern build. var enableProfilerTimer = true; var enableProfilerCommitHooks = true; var enableProfilerNestedUpdatePhase = true; @@ -266,7 +267,9 @@ if (__DEV__) { var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext + + var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"); var REACT_CONTEXT_TYPE = Symbol.for("react.context"); var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); @@ -3473,13 +3476,30 @@ if (__DEV__) { } switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName$1(provider._context) + ".Provider"; + } + case REACT_CONTEXT_TYPE: var context = type; - return getContextName$1(context) + ".Consumer"; - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName$1(provider._context) + ".Provider"; + if (enableRenderableContext) { + return getContextName$1(context) + ".Provider"; + } else { + return getContextName$1(context) + ".Consumer"; + } + + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName$1(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName$1(type, type.render, "ForwardRef"); @@ -3533,12 +3553,22 @@ if (__DEV__) { return "Cache"; case ContextConsumer: - var context = type; - return getContextName(context) + ".Consumer"; + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + var context = type; + return getContextName(context) + ".Consumer"; + } case ContextProvider: - var provider = type; - return getContextName(provider._context) + ".Provider"; + if (enableRenderableContext) { + var _context = type; + return getContextName(_context) + ".Provider"; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } case DehydratedFragment: return "DehydratedFragment"; @@ -17929,8 +17959,7 @@ if (__DEV__) { var isValid = // Allow null for conditional declaration contextType === null || (contextType !== undefined && - contextType.$$typeof === REACT_CONTEXT_TYPE && - contextType._context === undefined); // Not a + contextType.$$typeof === REACT_CONTEXT_TYPE); if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) { didWarnAboutInvalidateContextType.add(ctor); @@ -17944,11 +17973,7 @@ if (__DEV__) { "try moving the createContext() call to a separate file."; } else if (typeof contextType !== "object") { addendum = " However, it is set to a " + typeof contextType + "."; - } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) { - addendum = - " Did you accidentally pass the Context.Provider instead?"; - } else if (contextType._context !== undefined) { - // + } else if (contextType.$$typeof === REACT_CONSUMER_TYPE) { addendum = " Did you accidentally pass the Context.Consumer instead?"; } else { @@ -22568,8 +22593,14 @@ if (__DEV__) { var hasWarnedAboutUsingNoValuePropOnContextProvider = false; function updateContextProvider(current, workInProgress, renderLanes) { - var providerType = workInProgress.type; - var context = providerType._context; + var context; + + if (enableRenderableContext) { + context = workInProgress.type; + } else { + context = workInProgress.type._context; + } + var newProps = workInProgress.pendingProps; var oldProps = workInProgress.memoizedProps; var newValue = newProps.value; @@ -22629,34 +22660,19 @@ if (__DEV__) { return workInProgress.child; } - var hasWarnedAboutUsingContextAsConsumer = false; - function updateContextConsumer(current, workInProgress, renderLanes) { - var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In - // DEV mode, we create a separate object for Context.Consumer that acts - // like a proxy to Context. This proxy object adds unnecessary code in PROD - // so we use the old behaviour (Context.Consumer references Context) to - // reduce size and overhead. The separate object references context via - // a property called "_context", which also gives us the ability to check - // in DEV mode if this property exists or not and warn if it does not. + var context; - { - if (context._context === undefined) { - // This may be because it's a Context (rather than a Consumer). - // Or it may be because it's older React where they're the same thing. - // We only want to warn if we're sure it's a new React. - if (context !== context.Consumer) { - if (!hasWarnedAboutUsingContextAsConsumer) { - hasWarnedAboutUsingContextAsConsumer = true; + if (enableRenderableContext) { + var consumerType = workInProgress.type; + context = consumerType._context; + } else { + context = workInProgress.type; - error( - "Rendering directly is not supported and will be removed in " + - "a future major release. Did you mean to render instead?" - ); - } + { + if (context._context !== undefined) { + context = context._context; } - } else { - context = context._context; } } @@ -22896,7 +22912,14 @@ if (__DEV__) { case ContextProvider: { var newValue = workInProgress.memoizedProps.value; - var context = workInProgress.type._context; + var context; + + if (enableRenderableContext) { + context = workInProgress.type; + } else { + context = workInProgress.type._context; + } + pushProvider(workInProgress, context, newValue); break; } @@ -23898,8 +23921,14 @@ if (__DEV__) { var oldProps = currentParent.memoizedProps; if (oldProps !== null) { - var providerType = parent.type; - var context = providerType._context; + var context = void 0; + + if (enableRenderableContext) { + context = parent.type; + } else { + context = parent.type._context; + } + var newProps = parent.pendingProps; var newValue = newProps.value; var oldValue = oldProps.value; @@ -24440,7 +24469,10 @@ if (__DEV__) { } function collectNearestContextValues(node, context, childContextValues) { - if (node.tag === ContextProvider && node.type._context === context) { + if ( + node.tag === ContextProvider && + (enableRenderableContext ? node.type : node.type._context) === context + ) { var contextValue = node.memoizedProps.value; childContextValues.push(contextValue); } else { @@ -25510,7 +25542,14 @@ if (__DEV__) { case ContextProvider: // Pop provider fiber - var context = workInProgress.type._context; + var context; + + if (enableRenderableContext) { + context = workInProgress.type; + } else { + context = workInProgress.type._context; + } + popProvider(context, workInProgress); bubbleProperties(workInProgress); return null; @@ -25986,7 +26025,14 @@ if (__DEV__) { return null; case ContextProvider: - var context = workInProgress.type._context; + var context; + + if (enableRenderableContext) { + context = workInProgress.type; + } else { + context = workInProgress.type._context; + } + popProvider(context, workInProgress); return null; @@ -26077,7 +26123,14 @@ if (__DEV__) { break; case ContextProvider: - var context = interruptedWork.type._context; + var context; + + if (enableRenderableContext) { + context = interruptedWork.type; + } else { + context = interruptedWork.type._context; + } + popProvider(context, interruptedWork); break; @@ -35391,13 +35444,29 @@ if (__DEV__) { if (typeof type === "object" && type !== null) { switch (type.$$typeof) { case REACT_PROVIDER_TYPE: - fiberTag = ContextProvider; - break getTag; + if (!enableRenderableContext) { + fiberTag = ContextProvider; + break getTag; + } + + // Fall through case REACT_CONTEXT_TYPE: - // This is a consumer - fiberTag = ContextConsumer; - break getTag; + if (enableRenderableContext) { + fiberTag = ContextProvider; + break getTag; + } else { + fiberTag = ContextConsumer; + break getTag; + } + + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + fiberTag = ContextConsumer; + break getTag; + } + + // Fall through case REACT_FORWARD_REF_TYPE: fiberTag = ForwardRef; @@ -35828,7 +35897,7 @@ if (__DEV__) { return root; } - var ReactVersion = "18.3.0-www-modern-45146695"; + var ReactVersion = "18.3.0-www-modern-60139b00"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index a491d151b4..905a4cb9f7 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -64,12 +64,14 @@ var ReactSharedInternals = transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), + REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), @@ -119,10 +121,17 @@ function getComponentNameFromType(type) { } if ("object" === typeof type) switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - return (type.displayName || "Context") + ".Consumer"; case REACT_PROVIDER_TYPE: - return (type._context.displayName || "Context") + ".Provider"; + if (enableRenderableContext) break; + else return (type._context.displayName || "Context") + ".Provider"; + case REACT_CONTEXT_TYPE: + return enableRenderableContext + ? (type.displayName || "Context") + ".Provider" + : (type.displayName || "Context") + ".Consumer"; + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) + return (type._context.displayName || "Context") + ".Consumer"; + break; case REACT_FORWARD_REF_TYPE: var innerType = type.render; type = type.displayName; @@ -152,9 +161,13 @@ function getComponentNameFromFiber(fiber) { case 24: return "Cache"; case 9: - return (type.displayName || "Context") + ".Consumer"; + return enableRenderableContext + ? (type._context.displayName || "Context") + ".Consumer" + : (type.displayName || "Context") + ".Consumer"; case 10: - return (type._context.displayName || "Context") + ".Provider"; + return enableRenderableContext + ? (type.displayName || "Context") + ".Provider" + : (type._context.displayName || "Context") + ".Provider"; case 18: return "DehydratedFragment"; case 11: @@ -264,36 +277,36 @@ function findCurrentFiberUsingSlowPath(fiber) { } if (a.return !== b.return) (a = parentA), (b = parentB); else { - for (var didFindChild = !1, child$0 = parentA.child; child$0; ) { - if (child$0 === a) { + for (var didFindChild = !1, child$1 = parentA.child; child$1; ) { + if (child$1 === a) { didFindChild = !0; a = parentA; b = parentB; break; } - if (child$0 === b) { + if (child$1 === b) { didFindChild = !0; b = parentA; a = parentB; break; } - child$0 = child$0.sibling; + child$1 = child$1.sibling; } if (!didFindChild) { - for (child$0 = parentB.child; child$0; ) { - if (child$0 === a) { + for (child$1 = parentB.child; child$1; ) { + if (child$1 === a) { didFindChild = !0; a = parentB; b = parentA; break; } - if (child$0 === b) { + if (child$1 === b) { didFindChild = !0; b = parentB; a = parentA; break; } - child$0 = child$0.sibling; + child$1 = child$1.sibling; } if (!didFindChild) throw Error(formatProdErrorMessage(189)); } @@ -643,18 +656,18 @@ function markRootFinished(root, remainingLanes, spawnedLane) { 0 < noLongerPendingLanes; ) { - var index$4 = 31 - clz32(noLongerPendingLanes), - lane = 1 << index$4; - remainingLanes[index$4] = 0; - expirationTimes[index$4] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$4]; + var index$5 = 31 - clz32(noLongerPendingLanes), + lane = 1 << index$5; + remainingLanes[index$5] = 0; + expirationTimes[index$5] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$5]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$4] = null, index$4 = 0; - index$4 < hiddenUpdatesForLane.length; - index$4++ + hiddenUpdates[index$5] = null, index$5 = 0; + index$5 < hiddenUpdatesForLane.length; + index$5++ ) { - var update = hiddenUpdatesForLane[index$4]; + var update = hiddenUpdatesForLane[index$5]; null !== update && (update.lane &= -536870913); } noLongerPendingLanes &= ~lane; @@ -674,10 +687,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$5 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$5; - (lane & entangledLanes) | (root[index$5] & entangledLanes) && - (root[index$5] |= entangledLanes); + var index$6 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$6; + (lane & entangledLanes) | (root[index$6] & entangledLanes) && + (root[index$6] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -692,11 +705,11 @@ function upgradePendingLanesToSync(root, lanesToUpgrade) { function getTransitionsForLanes(root, lanes) { if (!enableTransitionTracing) return null; for (var transitionsForLanes = []; 0 < lanes; ) { - var index$8 = 31 - clz32(lanes), - lane = 1 << index$8; - index$8 = root.transitionLanes[index$8]; - null !== index$8 && - index$8.forEach(function (transition) { + var index$9 = 31 - clz32(lanes), + lane = 1 << index$9; + index$9 = root.transitionLanes[index$9]; + null !== index$9 && + index$9.forEach(function (transition) { transitionsForLanes.push(transition); }); lanes &= ~lane; @@ -706,10 +719,10 @@ function getTransitionsForLanes(root, lanes) { function clearTransitionsForLanes(root, lanes) { if (enableTransitionTracing) for (; 0 < lanes; ) { - var index$9 = 31 - clz32(lanes), - lane = 1 << index$9; - null !== root.transitionLanes[index$9] && - (root.transitionLanes[index$9] = null); + var index$10 = 31 - clz32(lanes), + lane = 1 << index$10; + null !== root.transitionLanes[index$10] && + (root.transitionLanes[index$10] = null); lanes &= ~lane; } } @@ -780,8 +793,8 @@ function setValueForAttribute(node, name, value) { node.removeAttribute(name); return; case "boolean": - var prefix$10 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$10 && "aria-" !== prefix$10) { + var prefix$11 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$11 && "aria-" !== prefix$11) { node.removeAttribute(name); return; } @@ -863,16 +876,16 @@ function describeNativeComponentFrame(fn, construct) { } else { try { Fake.call(); - } catch (x$11) { - control = x$11; + } catch (x$12) { + control = x$12; } fn.call(Fake.prototype); } } else { try { throw Error(); - } catch (x$12) { - control = x$12; + } catch (x$13) { + control = x$13; } (Fake = fn()) && "function" === typeof Fake.catch && @@ -1326,15 +1339,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$18 in styles) - (styleName = styles[styleName$18]), - styles.hasOwnProperty(styleName$18) && - prevStyles[styleName$18] !== styleName && - setValueForStyle(node, styleName$18, styleName); - } else for (var styleName$19 in styles) - styles.hasOwnProperty(styleName$19) && - setValueForStyle(node, styleName$19, styles[styleName$19]); + (styleName = styles[styleName$19]), + styles.hasOwnProperty(styleName$19) && + prevStyles[styleName$19] !== styleName && + setValueForStyle(node, styleName$19, styleName); + } else + for (var styleName$20 in styles) + styles.hasOwnProperty(styleName$20) && + setValueForStyle(node, styleName$20, styles[styleName$20]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -1946,39 +1959,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$25 = firstScheduledRoot; null !== root$25; ) { - if (!onlyLegacy || 0 === root$25.tag) { - var workInProgressRootRenderLanes$27 = workInProgressRootRenderLanes, + for (var root$26 = firstScheduledRoot; null !== root$26; ) { + if (!onlyLegacy || 0 === root$26.tag) { + var workInProgressRootRenderLanes$28 = workInProgressRootRenderLanes, nextLanes = getNextLanes( - root$25, - root$25 === workInProgressRoot - ? workInProgressRootRenderLanes$27 + root$26, + root$26 === workInProgressRoot + ? workInProgressRootRenderLanes$28 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$27 = root$25; + workInProgressRootRenderLanes$28 = root$26; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { var exitStatus = renderRootSync( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$27.tag && + 0 !== workInProgressRootRenderLanes$28.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, originallyAttemptedLanes, errorRetryLanes ))); @@ -1986,39 +1999,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$27, 0), + prepareFreshStack(workInProgressRootRenderLanes$28, 0), markRootSuspended( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$27), + ensureRootIsScheduled(workInProgressRootRenderLanes$28), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$27.finishedWork = - workInProgressRootRenderLanes$27.current.alternate), - (workInProgressRootRenderLanes$27.finishedLanes = + : ((workInProgressRootRenderLanes$28.finishedWork = + workInProgressRootRenderLanes$28.current.alternate), + (workInProgressRootRenderLanes$28.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$27); + ensureRootIsScheduled(workInProgressRootRenderLanes$28); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } } - root$25 = root$25.next; + root$26 = root$26.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -2075,12 +2088,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < pendingLanes; ) { - var index$2 = 31 - clz32(pendingLanes), - lane = 1 << index$2, - expirationTime = expirationTimes[index$2]; + var index$3 = 31 - clz32(pendingLanes), + lane = 1 << index$3, + expirationTime = expirationTimes[index$3]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$2] = computeExpirationTime(lane, currentTime); + expirationTimes[index$3] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); pendingLanes &= ~lane; } @@ -3620,7 +3633,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$52 = !1; + didReadFromEntangledAsyncAction$53 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3633,7 +3646,7 @@ function updateReducerImpl(hook, current, reducer) { if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$52 = !0); + (didReadFromEntangledAsyncAction$53 = !0); continue; } else (updateLane = { @@ -3662,7 +3675,7 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$52 = !0); + (didReadFromEntangledAsyncAction$53 = !0); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane); @@ -3692,7 +3705,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$52 && + didReadFromEntangledAsyncAction$53 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4297,14 +4310,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$62 = enqueueUpdate(provider, fiber, lane); - null !== root$62 && - (scheduleUpdateOnFiber(root$62, provider, lane), - entangleTransitions(root$62, provider, lane)); + var root$63 = enqueueUpdate(provider, fiber, lane); + null !== root$63 && + (scheduleUpdateOnFiber(root$63, provider, lane), + entangleTransitions(root$63, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$62 && + null !== root$63 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4547,15 +4560,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$55 = workInProgressRoot; - if (null === root$55) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$55, workInProgressRootRenderLanes) || + var root$56 = workInProgressRoot; + if (null === root$56) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$56, workInProgressRootRenderLanes) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$55 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$55; - mountEffect(subscribeToStore.bind(null, fiber, root$55, subscribe), [ + root$56 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$56; + mountEffect(subscribeToStore.bind(null, fiber, root$56, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -4564,7 +4577,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$55, + root$56, getServerSnapshot, getSnapshot ), @@ -5263,10 +5276,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$72 = workInProgress.stateNode; + root$73 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$72.incompleteTransitions.has(transition)) { + if (!root$73.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5274,11 +5287,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$72.incompleteTransitions.set(transition, markerInstance); + root$73.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$72.incompleteTransitions.forEach(function (markerInstance) { + root$73.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6541,7 +6554,9 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 10: pushProvider( workInProgress, - workInProgress.type._context, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, workInProgress.memoizedProps.value ); break; @@ -6792,7 +6807,9 @@ function propagateParentContextChanges( if (null === currentParent) throw Error(formatProdErrorMessage(387)); currentParent = currentParent.memoizedProps; if (null !== currentParent) { - var context = parent.type._context; + var context = enableRenderableContext + ? parent.type + : parent.type._context; objectIs(parent.pendingProps.value, currentParent.value) || (null !== current ? current.push(context) : (current = [context])); } @@ -7019,7 +7036,10 @@ function collectNearestChildContextValues( var node = startingChild, context = context$jscomp$0, childContextValues = childContextValues$jscomp$0; - if (10 === node.tag && node.type._context === context) + if ( + 10 === node.tag && + (enableRenderableContext ? node.type : node.type._context) === context + ) childContextValues.push(node.memoizedProps.value); else { var child = node.child; @@ -7111,14 +7131,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$111 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$111 = lastTailNode), + for (var lastTailNode$112 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$112 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$111 + null === lastTailNode$112 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$111.sibling = null); + : (lastTailNode$112.sibling = null); } } function bubbleProperties(completedWork) { @@ -7128,19 +7148,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$112 = completedWork.child; null !== child$112; ) - (newChildLanes |= child$112.lanes | child$112.childLanes), - (subtreeFlags |= child$112.subtreeFlags & 31457280), - (subtreeFlags |= child$112.flags & 31457280), - (child$112.return = completedWork), - (child$112 = child$112.sibling); + for (var child$113 = completedWork.child; null !== child$113; ) + (newChildLanes |= child$113.lanes | child$113.childLanes), + (subtreeFlags |= child$113.subtreeFlags & 31457280), + (subtreeFlags |= child$113.flags & 31457280), + (child$113.return = completedWork), + (child$113 = child$113.sibling); else - for (child$112 = completedWork.child; null !== child$112; ) - (newChildLanes |= child$112.lanes | child$112.childLanes), - (subtreeFlags |= child$112.subtreeFlags), - (subtreeFlags |= child$112.flags), - (child$112.return = completedWork), - (child$112 = child$112.sibling); + for (child$113 = completedWork.child; null !== child$113; ) + (newChildLanes |= child$113.lanes | child$113.childLanes), + (subtreeFlags |= child$113.subtreeFlags), + (subtreeFlags |= child$113.flags), + (child$113.return = completedWork), + (child$113 = child$113.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7485,11 +7505,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$124 = null; + var cache$125 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$124 = newProps.memoizedState.cachePool.pool); - cache$124 !== currentResource && (newProps.flags |= 2048); + (cache$125 = newProps.memoizedState.cachePool.pool); + cache$125 !== currentResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -7510,7 +7530,11 @@ function completeWork(current, workInProgress, renderLanes) { ); case 10: return ( - popProvider(workInProgress.type._context), + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), bubbleProperties(workInProgress), null ); @@ -7526,8 +7550,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$124 = currentResource.rendering; - if (null === cache$124) + cache$125 = currentResource.rendering; + if (null === cache$125) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -7535,11 +7559,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$124 = findFirstSuspended(current); - if (null !== cache$124) { + cache$125 = findFirstSuspended(current); + if (null !== cache$125) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = cache$124.updateQueue; + current = cache$125.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -7564,7 +7588,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$124)), null !== current)) { + if (((current = findFirstSuspended(cache$125)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -7574,7 +7598,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !cache$124.alternate && + !cache$125.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -7587,13 +7611,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((cache$124.sibling = workInProgress.child), - (workInProgress.child = cache$124)) + ? ((cache$125.sibling = workInProgress.child), + (workInProgress.child = cache$125)) : ((current = currentResource.last), null !== current - ? (current.sibling = cache$124) - : (workInProgress.child = cache$124), - (currentResource.last = cache$124)); + ? (current.sibling = cache$125) + : (workInProgress.child = cache$125), + (currentResource.last = cache$125)); } if (null !== currentResource.tail) return ( @@ -7730,7 +7754,14 @@ function unwindWork(current, workInProgress) { case 4: return popHostContainer(), null; case 10: - return popProvider(workInProgress.type._context), null; + return ( + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + null + ); case 22: case 23: return ( @@ -7788,7 +7819,11 @@ function unwindInterruptedWork(current, interruptedWork) { pop(suspenseStackCursor); break; case 10: - popProvider(interruptedWork.type._context); + popProvider( + enableRenderableContext + ? interruptedWork.type + : interruptedWork.type._context + ); break; case 22: case 23: @@ -7892,8 +7927,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$142) { - captureCommitPhaseError(current, nearestMountedAncestor, error$142); + } catch (error$143) { + captureCommitPhaseError(current, nearestMountedAncestor, error$143); } else ref.current = null; } @@ -7930,7 +7965,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$192) { + } catch (e$193) { JSCompiler_temp = null; break a; } @@ -8196,11 +8231,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$144) { + } catch (error$145) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$144 + error$145 ); } } @@ -8880,8 +8915,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$157) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$157); + } catch (error$158) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$158); } } break; @@ -9053,11 +9088,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$158) { + } catch (error$159) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$158 + error$159 ); } } @@ -9095,8 +9130,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$159) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$159); + } catch (error$160) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$160); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -9107,8 +9142,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$162) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$162); + } catch (error$163) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$163); } } break; @@ -9122,8 +9157,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$163) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$163); + } catch (error$164) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$164); } } break; @@ -9137,8 +9172,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$164) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$164); + } catch (error$165) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$165); } break; case 4: @@ -9168,8 +9203,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$166) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$166); + } catch (error$167) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$167); } current = finishedWork.updateQueue; null !== current && @@ -9247,11 +9282,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$147) { + } catch (error$148) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$147 + error$148 ); } } else if ( @@ -9326,21 +9361,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$148 = JSCompiler_inline_result.stateNode; + var parent$149 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$148, ""), + (setTextContent(parent$149, ""), (JSCompiler_inline_result.flags &= -33)); - var before$149 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$149, parent$148); + var before$150 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$150, parent$149); break; case 3: case 4: - var parent$150 = JSCompiler_inline_result.stateNode.containerInfo, - before$151 = getHostSibling(finishedWork); + var parent$151 = JSCompiler_inline_result.stateNode.containerInfo, + before$152 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$151, - parent$150 + before$152, + parent$151 ); break; default: @@ -9810,9 +9845,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$173 = finishedWork.stateNode; + var instance$174 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$173._visibility & 4 + ? instance$174._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9825,7 +9860,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$173._visibility |= 4), + : ((instance$174._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9833,7 +9868,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$173._visibility |= 4), + : ((instance$174._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9846,7 +9881,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$173 + instance$174 ); break; case 24: @@ -10321,11 +10356,11 @@ function scheduleUpdateOnFiber(root, fiber, lane) { enableTransitionTracing) ) { var transitionLanesMap = root.transitionLanes, - index$7 = 31 - clz32(lane), - transitions = transitionLanesMap[index$7]; + index$8 = 31 - clz32(lane), + transitions = transitionLanesMap[index$8]; null === transitions && (transitions = new Set()); transitions.add(transition); - transitionLanesMap[index$7] = transitions; + transitionLanesMap[index$8] = transitions; } } root === workInProgressRoot && @@ -10591,9 +10626,9 @@ function markRootSuspended(root, suspendedLanes, spawnedLane) { 0 < lanes; ) { - var index$3 = 31 - clz32(lanes), - lane = 1 << index$3; - expirationTimes[index$3] = -1; + var index$4 = 31 - clz32(lanes), + lane = 1 << index$4; + expirationTimes[index$4] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -10685,9 +10720,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$1 = 31 - clz32(allEntangledLanes), - lane = 1 << index$1; - lanes |= root[index$1]; + var index$2 = 31 - clz32(allEntangledLanes), + lane = 1 << index$2; + lanes |= root[index$2]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -10790,8 +10825,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$181) { - handleThrow(root, thrownValue$181); + } catch (thrownValue$182) { + handleThrow(root, thrownValue$182); } while (1); lanes && root.shellSuspendCounter++; @@ -10896,8 +10931,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$183) { - handleThrow(root, thrownValue$183); + } catch (thrownValue$184) { + handleThrow(root, thrownValue$184); } while (1); resetContextDependencies(); @@ -11120,12 +11155,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$187 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$188 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$187 && + shouldFireAfterActiveInstanceBlur$188 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -11206,7 +11241,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$188 = rootWithPendingPassiveEffects, + var root$189 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -11222,7 +11257,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$188, remainingLanes); + releaseRootPooledCache(root$189, remainingLanes); } } return !1; @@ -11834,7 +11869,9 @@ beginWork = function (current, workInProgress, renderLanes) { ); case 10: a: { - Component = workInProgress.type._context; + Component = enableRenderableContext + ? workInProgress.type + : workInProgress.type._context; context = workInProgress.pendingProps; prevState = workInProgress.memoizedProps; nextState = context.value; @@ -11864,7 +11901,9 @@ beginWork = function (current, workInProgress, renderLanes) { return workInProgress; case 9: return ( - (context = workInProgress.type), + (context = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), (Component = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), (context = readContext(context)), @@ -12230,11 +12269,18 @@ function createFiberFromTypeAndProps( if ("object" === typeof type && null !== type) switch (type.$$typeof) { case REACT_PROVIDER_TYPE: - fiberTag = 10; - break a; + if (!enableRenderableContext) { + fiberTag = 10; + break a; + } case REACT_CONTEXT_TYPE: - fiberTag = 9; + fiberTag = enableRenderableContext ? 10 : 9; break a; + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + fiberTag = 9; + break a; + } case REACT_FORWARD_REF_TYPE: fiberTag = 11; break a; @@ -12537,12 +12583,12 @@ function getPublicRootInstance(container) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$190 = fiber.stateNode; - if (root$190.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$190.pendingLanes); + var root$191 = fiber.stateNode; + if (root$191.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$191.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$190, lanes), - ensureRootIsScheduled(root$190), + (upgradePendingLanesToSync(root$191, lanes), + ensureRootIsScheduled(root$191), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -13108,19 +13154,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$352; + var JSCompiler_inline_result$jscomp$353; if (canUseDOM) { - var isSupported$jscomp$inline_1556 = "oninput" in document; - if (!isSupported$jscomp$inline_1556) { - var element$jscomp$inline_1557 = document.createElement("div"); - element$jscomp$inline_1557.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1556 = - "function" === typeof element$jscomp$inline_1557.oninput; + var isSupported$jscomp$inline_1557 = "oninput" in document; + if (!isSupported$jscomp$inline_1557) { + var element$jscomp$inline_1558 = document.createElement("div"); + element$jscomp$inline_1558.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1557 = + "function" === typeof element$jscomp$inline_1558.oninput; } - JSCompiler_inline_result$jscomp$352 = isSupported$jscomp$inline_1556; - } else JSCompiler_inline_result$jscomp$352 = !1; + JSCompiler_inline_result$jscomp$353 = isSupported$jscomp$inline_1557; + } else JSCompiler_inline_result$jscomp$353 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$352 && + JSCompiler_inline_result$jscomp$353 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13492,20 +13538,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1597 = 0; - i$jscomp$inline_1597 < simpleEventPluginEvents.length; - i$jscomp$inline_1597++ + var i$jscomp$inline_1598 = 0; + i$jscomp$inline_1598 < simpleEventPluginEvents.length; + i$jscomp$inline_1598++ ) { - var eventName$jscomp$inline_1598 = - simpleEventPluginEvents[i$jscomp$inline_1597], - domEventName$jscomp$inline_1599 = - eventName$jscomp$inline_1598.toLowerCase(), - capitalizedEvent$jscomp$inline_1600 = - eventName$jscomp$inline_1598[0].toUpperCase() + - eventName$jscomp$inline_1598.slice(1); + var eventName$jscomp$inline_1599 = + simpleEventPluginEvents[i$jscomp$inline_1598], + domEventName$jscomp$inline_1600 = + eventName$jscomp$inline_1599.toLowerCase(), + capitalizedEvent$jscomp$inline_1601 = + eventName$jscomp$inline_1599[0].toUpperCase() + + eventName$jscomp$inline_1599.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1599, - "on" + capitalizedEvent$jscomp$inline_1600 + domEventName$jscomp$inline_1600, + "on" + capitalizedEvent$jscomp$inline_1601 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14979,14 +15025,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$219 in nextProps) { - var propKey = nextProps[propKey$219]; - lastProp = lastProps[propKey$219]; + for (var propKey$220 in nextProps) { + var propKey = nextProps[propKey$220]; + lastProp = lastProps[propKey$220]; if ( - nextProps.hasOwnProperty(propKey$219) && + nextProps.hasOwnProperty(propKey$220) && (null != propKey || null != lastProp) ) - switch (propKey$219) { + switch (propKey$220) { case "type": type = propKey; break; @@ -15015,7 +15061,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$219, + propKey$220, propKey, nextProps, lastProp @@ -15034,7 +15080,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$219 = null; + propKey = value = defaultValue = propKey$220 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15065,7 +15111,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$219 = type; + propKey$220 = type; break; case "defaultValue": defaultValue = type; @@ -15086,15 +15132,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$219 - ? updateOptions(domElement, !!lastProps, propKey$219, !1) + null != propKey$220 + ? updateOptions(domElement, !!lastProps, propKey$220, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$219 = null; + propKey = propKey$220 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15118,7 +15164,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$219 = name; + propKey$220 = name; break; case "defaultValue": propKey = name; @@ -15132,17 +15178,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$219, propKey); + updateTextarea(domElement, propKey$220, propKey); return; case "option": - for (var propKey$235 in lastProps) + for (var propKey$236 in lastProps) if ( - ((propKey$219 = lastProps[propKey$235]), - lastProps.hasOwnProperty(propKey$235) && - null != propKey$219 && - !nextProps.hasOwnProperty(propKey$235)) + ((propKey$220 = lastProps[propKey$236]), + lastProps.hasOwnProperty(propKey$236) && + null != propKey$220 && + !nextProps.hasOwnProperty(propKey$236)) ) - switch (propKey$235) { + switch (propKey$236) { case "selected": domElement.selected = !1; break; @@ -15150,33 +15196,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$235, + propKey$236, null, nextProps, - propKey$219 + propKey$220 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$219 = nextProps[lastDefaultValue]), + ((propKey$220 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$219 !== propKey && - (null != propKey$219 || null != propKey)) + propKey$220 !== propKey && + (null != propKey$220 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$219 && - "function" !== typeof propKey$219 && - "symbol" !== typeof propKey$219; + propKey$220 && + "function" !== typeof propKey$220 && + "symbol" !== typeof propKey$220; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$219, + propKey$220, nextProps, propKey ); @@ -15197,24 +15243,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$240 in lastProps) - (propKey$219 = lastProps[propKey$240]), - lastProps.hasOwnProperty(propKey$240) && - null != propKey$219 && - !nextProps.hasOwnProperty(propKey$240) && - setProp(domElement, tag, propKey$240, null, nextProps, propKey$219); + for (var propKey$241 in lastProps) + (propKey$220 = lastProps[propKey$241]), + lastProps.hasOwnProperty(propKey$241) && + null != propKey$220 && + !nextProps.hasOwnProperty(propKey$241) && + setProp(domElement, tag, propKey$241, null, nextProps, propKey$220); for (checked in nextProps) if ( - ((propKey$219 = nextProps[checked]), + ((propKey$220 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$219 !== propKey && - (null != propKey$219 || null != propKey)) + propKey$220 !== propKey && + (null != propKey$220 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$219) + if (null != propKey$220) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15222,7 +15268,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$219, + propKey$220, nextProps, propKey ); @@ -15230,49 +15276,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$245 in lastProps) - (propKey$219 = lastProps[propKey$245]), - lastProps.hasOwnProperty(propKey$245) && - null != propKey$219 && - !nextProps.hasOwnProperty(propKey$245) && + for (var propKey$246 in lastProps) + (propKey$220 = lastProps[propKey$246]), + lastProps.hasOwnProperty(propKey$246) && + null != propKey$220 && + !nextProps.hasOwnProperty(propKey$246) && setPropOnCustomElement( domElement, tag, - propKey$245, + propKey$246, null, nextProps, - propKey$219 + propKey$220 ); for (defaultChecked in nextProps) - (propKey$219 = nextProps[defaultChecked]), + (propKey$220 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$219 === propKey || - (null == propKey$219 && null == propKey) || + propKey$220 === propKey || + (null == propKey$220 && null == propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$219, + propKey$220, nextProps, propKey ); return; } } - for (var propKey$250 in lastProps) - (propKey$219 = lastProps[propKey$250]), - lastProps.hasOwnProperty(propKey$250) && - null != propKey$219 && - !nextProps.hasOwnProperty(propKey$250) && - setProp(domElement, tag, propKey$250, null, nextProps, propKey$219); + for (var propKey$251 in lastProps) + (propKey$220 = lastProps[propKey$251]), + lastProps.hasOwnProperty(propKey$251) && + null != propKey$220 && + !nextProps.hasOwnProperty(propKey$251) && + setProp(domElement, tag, propKey$251, null, nextProps, propKey$220); for (lastProp in nextProps) - (propKey$219 = nextProps[lastProp]), + (propKey$220 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$219 === propKey || - (null == propKey$219 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$219, nextProps, propKey); + propKey$220 === propKey || + (null == propKey$220 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$220, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15914,17 +15960,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$258 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$259 = styles$258.get(type); - resource$259 || + var styles$259 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$260 = styles$259.get(type); + resource$260 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$259 = { + (resource$260 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$258.set(type, resource$259), + styles$259.set(type, resource$260), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -15939,9 +15985,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$259.state + resource$260.state )); - return resource$259; + return resource$260; } return null; case "script": @@ -16024,37 +16070,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$263 = hoistableRoot.querySelector( + var instance$264 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$263) + if (instance$264) return ( (resource.state.loading |= 4), - (resource.instance = instance$263), - markNodeAsHoistable(instance$263), - instance$263 + (resource.instance = instance$264), + markNodeAsHoistable(instance$264), + instance$264 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$263 = ( + instance$264 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$263); - var linkInstance = instance$263; + markNodeAsHoistable(instance$264); + var linkInstance = instance$264; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$263, "link", instance); + setInitialProperties(instance$264, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$263, props.precedence, hoistableRoot); - return (resource.instance = instance$263); + insertStylesheet(instance$264, props.precedence, hoistableRoot); + return (resource.instance = instance$264); case "script": - instance$263 = getScriptKey(props.src); + instance$264 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$263) + getScriptSelectorFromKey(instance$264) )) ) return ( @@ -16063,7 +16109,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$263))) + if ((styleProps = preloadPropsMap.get(instance$264))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17078,11 +17124,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$285); + var instance = getPublicRootInstance(root$286); originalCallback.call(instance); }; } - var root$285 = createHydrationContainer( + var root$286 = createHydrationContainer( initialChildren, callback, container, @@ -17095,23 +17141,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$285; - container[internalContainerInstanceKey] = root$285.current; + container._reactRootContainer = root$286; + container[internalContainerInstanceKey] = root$286.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(); - return root$285; + return root$286; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$286 = callback; + var originalCallback$287 = callback; callback = function () { - var instance = getPublicRootInstance(root$287); - originalCallback$286.call(instance); + var instance = getPublicRootInstance(root$288); + originalCallback$287.call(instance); }; } - var root$287 = createFiberRoot( + var root$288 = createFiberRoot( container, 0, !1, @@ -17124,15 +17170,15 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$287; - container[internalContainerInstanceKey] = root$287.current; + container._reactRootContainer = root$288; + container[internalContainerInstanceKey] = root$288.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(function () { - updateContainer(initialChildren, root$287, parentComponent, callback); + updateContainer(initialChildren, root$288, parentComponent, callback); }); - return root$287; + return root$288; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -17197,17 +17243,17 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates$1 ]; -var devToolsConfig$jscomp$inline_1824 = { +var devToolsConfig$jscomp$inline_1825 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-2d5cc421", + version: "18.3.0-www-classic-947f4869", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2189 = { - bundleType: devToolsConfig$jscomp$inline_1824.bundleType, - version: devToolsConfig$jscomp$inline_1824.version, - rendererPackageName: devToolsConfig$jscomp$inline_1824.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1824.rendererConfig, +var internals$jscomp$inline_2190 = { + bundleType: devToolsConfig$jscomp$inline_1825.bundleType, + version: devToolsConfig$jscomp$inline_1825.version, + rendererPackageName: devToolsConfig$jscomp$inline_1825.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1825.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17223,26 +17269,26 @@ var internals$jscomp$inline_2189 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1824.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1825.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-classic-2d5cc421" + reconcilerVersion: "18.3.0-www-classic-947f4869" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2190 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2191 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2190.isDisabled && - hook$jscomp$inline_2190.supportsFiber + !hook$jscomp$inline_2191.isDisabled && + hook$jscomp$inline_2191.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2190.inject( - internals$jscomp$inline_2189 + (rendererID = hook$jscomp$inline_2191.inject( + internals$jscomp$inline_2190 )), - (injectedHook = hook$jscomp$inline_2190); + (injectedHook = hook$jscomp$inline_2191); } catch (err) {} } assign(Internals, { @@ -17580,4 +17626,4 @@ exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); throw Error(formatProdErrorMessage(248)); }; -exports.version = "18.3.0-www-classic-2d5cc421"; +exports.version = "18.3.0-www-classic-947f4869"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index a8eb4add7b..131f94b883 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -67,6 +67,7 @@ var assign = Object.assign, transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher, @@ -96,6 +97,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), + REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), @@ -1171,15 +1173,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$17 in styles) - (styleName = styles[styleName$17]), - styles.hasOwnProperty(styleName$17) && - prevStyles[styleName$17] !== styleName && - setValueForStyle(node, styleName$17, styleName); - } else for (var styleName$18 in styles) - styles.hasOwnProperty(styleName$18) && - setValueForStyle(node, styleName$18, styles[styleName$18]); + (styleName = styles[styleName$18]), + styles.hasOwnProperty(styleName$18) && + prevStyles[styleName$18] !== styleName && + setValueForStyle(node, styleName$18, styleName); + } else + for (var styleName$19 in styles) + styles.hasOwnProperty(styleName$19) && + setValueForStyle(node, styleName$19, styles[styleName$19]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -1434,36 +1436,36 @@ function findCurrentFiberUsingSlowPath(fiber) { } if (a.return !== b.return) (a = parentA), (b = parentB); else { - for (var didFindChild = !1, child$20 = parentA.child; child$20; ) { - if (child$20 === a) { + for (var didFindChild = !1, child$21 = parentA.child; child$21; ) { + if (child$21 === a) { didFindChild = !0; a = parentA; b = parentB; break; } - if (child$20 === b) { + if (child$21 === b) { didFindChild = !0; b = parentA; a = parentB; break; } - child$20 = child$20.sibling; + child$21 = child$21.sibling; } if (!didFindChild) { - for (child$20 = parentB.child; child$20; ) { - if (child$20 === a) { + for (child$21 = parentB.child; child$21; ) { + if (child$21 === a) { didFindChild = !0; a = parentB; b = parentA; break; } - if (child$20 === b) { + if (child$21 === b) { didFindChild = !0; b = parentB; a = parentA; break; } - child$20 = child$20.sibling; + child$21 = child$21.sibling; } if (!didFindChild) throw Error(formatProdErrorMessage(189)); } @@ -1840,39 +1842,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$25 = firstScheduledRoot; null !== root$25; ) { - if (!onlyLegacy || 0 === root$25.tag) { - var workInProgressRootRenderLanes$27 = workInProgressRootRenderLanes, + for (var root$26 = firstScheduledRoot; null !== root$26; ) { + if (!onlyLegacy || 0 === root$26.tag) { + var workInProgressRootRenderLanes$28 = workInProgressRootRenderLanes, nextLanes = getNextLanes( - root$25, - root$25 === workInProgressRoot - ? workInProgressRootRenderLanes$27 + root$26, + root$26 === workInProgressRoot + ? workInProgressRootRenderLanes$28 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$27 = root$25; + workInProgressRootRenderLanes$28 = root$26; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { var exitStatus = renderRootSync( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$27.tag && + 0 !== workInProgressRootRenderLanes$28.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, originallyAttemptedLanes, errorRetryLanes ))); @@ -1880,39 +1882,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$27, 0), + prepareFreshStack(workInProgressRootRenderLanes$28, 0), markRootSuspended( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$27), + ensureRootIsScheduled(workInProgressRootRenderLanes$28), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$27.finishedWork = - workInProgressRootRenderLanes$27.current.alternate), - (workInProgressRootRenderLanes$27.finishedLanes = + : ((workInProgressRootRenderLanes$28.finishedWork = + workInProgressRootRenderLanes$28.current.alternate), + (workInProgressRootRenderLanes$28.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$27); + ensureRootIsScheduled(workInProgressRootRenderLanes$28); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } } - root$25 = root$25.next; + root$26 = root$26.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -3514,7 +3516,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$52 = !1; + didReadFromEntangledAsyncAction$53 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3527,7 +3529,7 @@ function updateReducerImpl(hook, current, reducer) { if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$52 = !0); + (didReadFromEntangledAsyncAction$53 = !0); continue; } else (updateLane = { @@ -3556,7 +3558,7 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$52 = !0); + (didReadFromEntangledAsyncAction$53 = !0); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane); @@ -3586,7 +3588,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$52 && + didReadFromEntangledAsyncAction$53 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4191,14 +4193,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$62 = enqueueUpdate(provider, fiber, lane); - null !== root$62 && - (scheduleUpdateOnFiber(root$62, provider, lane), - entangleTransitions(root$62, provider, lane)); + var root$63 = enqueueUpdate(provider, fiber, lane); + null !== root$63 && + (scheduleUpdateOnFiber(root$63, provider, lane), + entangleTransitions(root$63, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$62 && + null !== root$63 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4441,15 +4443,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$55 = workInProgressRoot; - if (null === root$55) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$55, workInProgressRootRenderLanes) || + var root$56 = workInProgressRoot; + if (null === root$56) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$56, workInProgressRootRenderLanes) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$55 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$55; - mountEffect(subscribeToStore.bind(null, fiber, root$55, subscribe), [ + root$56 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$56; + mountEffect(subscribeToStore.bind(null, fiber, root$56, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -4458,7 +4460,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$55, + root$56, getServerSnapshot, getSnapshot ), @@ -5142,10 +5144,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$72 = workInProgress.stateNode; + root$73 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$72.incompleteTransitions.has(transition)) { + if (!root$73.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5153,11 +5155,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$72.incompleteTransitions.set(transition, markerInstance); + root$73.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$72.incompleteTransitions.forEach(function (markerInstance) { + root$73.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6384,7 +6386,9 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 10: pushProvider( workInProgress, - workInProgress.type._context, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, workInProgress.memoizedProps.value ); break; @@ -6635,7 +6639,9 @@ function propagateParentContextChanges( if (null === currentParent) throw Error(formatProdErrorMessage(387)); currentParent = currentParent.memoizedProps; if (null !== currentParent) { - var context = parent.type._context; + var context = enableRenderableContext + ? parent.type + : parent.type._context; objectIs(parent.pendingProps.value, currentParent.value) || (null !== current ? current.push(context) : (current = [context])); } @@ -6862,7 +6868,10 @@ function collectNearestChildContextValues( var node = startingChild, context = context$jscomp$0, childContextValues = childContextValues$jscomp$0; - if (10 === node.tag && node.type._context === context) + if ( + 10 === node.tag && + (enableRenderableContext ? node.type : node.type._context) === context + ) childContextValues.push(node.memoizedProps.value); else { var child = node.child; @@ -6954,14 +6963,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$111 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$111 = lastTailNode), + for (var lastTailNode$112 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$112 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$111 + null === lastTailNode$112 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$111.sibling = null); + : (lastTailNode$112.sibling = null); } } function bubbleProperties(completedWork) { @@ -6971,19 +6980,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$112 = completedWork.child; null !== child$112; ) - (newChildLanes |= child$112.lanes | child$112.childLanes), - (subtreeFlags |= child$112.subtreeFlags & 31457280), - (subtreeFlags |= child$112.flags & 31457280), - (child$112.return = completedWork), - (child$112 = child$112.sibling); + for (var child$113 = completedWork.child; null !== child$113; ) + (newChildLanes |= child$113.lanes | child$113.childLanes), + (subtreeFlags |= child$113.subtreeFlags & 31457280), + (subtreeFlags |= child$113.flags & 31457280), + (child$113.return = completedWork), + (child$113 = child$113.sibling); else - for (child$112 = completedWork.child; null !== child$112; ) - (newChildLanes |= child$112.lanes | child$112.childLanes), - (subtreeFlags |= child$112.subtreeFlags), - (subtreeFlags |= child$112.flags), - (child$112.return = completedWork), - (child$112 = child$112.sibling); + for (child$113 = completedWork.child; null !== child$113; ) + (newChildLanes |= child$113.lanes | child$113.childLanes), + (subtreeFlags |= child$113.subtreeFlags), + (subtreeFlags |= child$113.flags), + (child$113.return = completedWork), + (child$113 = child$113.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7322,11 +7331,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$124 = null; + var cache$125 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$124 = newProps.memoizedState.cachePool.pool); - cache$124 !== currentResource && (newProps.flags |= 2048); + (cache$125 = newProps.memoizedState.cachePool.pool); + cache$125 !== currentResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -7347,7 +7356,11 @@ function completeWork(current, workInProgress, renderLanes) { ); case 10: return ( - popProvider(workInProgress.type._context), + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), bubbleProperties(workInProgress), null ); @@ -7359,8 +7372,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$124 = currentResource.rendering; - if (null === cache$124) + cache$125 = currentResource.rendering; + if (null === cache$125) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -7368,11 +7381,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$124 = findFirstSuspended(current); - if (null !== cache$124) { + cache$125 = findFirstSuspended(current); + if (null !== cache$125) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = cache$124.updateQueue; + current = cache$125.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -7397,7 +7410,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$124)), null !== current)) { + if (((current = findFirstSuspended(cache$125)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -7407,7 +7420,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !cache$124.alternate && + !cache$125.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -7420,13 +7433,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((cache$124.sibling = workInProgress.child), - (workInProgress.child = cache$124)) + ? ((cache$125.sibling = workInProgress.child), + (workInProgress.child = cache$125)) : ((current = currentResource.last), null !== current - ? (current.sibling = cache$124) - : (workInProgress.child = cache$124), - (currentResource.last = cache$124)); + ? (current.sibling = cache$125) + : (workInProgress.child = cache$125), + (currentResource.last = cache$125)); } if (null !== currentResource.tail) return ( @@ -7560,7 +7573,14 @@ function unwindWork(current, workInProgress) { case 4: return popHostContainer(), null; case 10: - return popProvider(workInProgress.type._context), null; + return ( + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + null + ); case 22: case 23: return ( @@ -7612,7 +7632,11 @@ function unwindInterruptedWork(current, interruptedWork) { pop(suspenseStackCursor); break; case 10: - popProvider(interruptedWork.type._context); + popProvider( + enableRenderableContext + ? interruptedWork.type + : interruptedWork.type._context + ); break; case 22: case 23: @@ -7716,8 +7740,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$141) { - captureCommitPhaseError(current, nearestMountedAncestor, error$141); + } catch (error$142) { + captureCommitPhaseError(current, nearestMountedAncestor, error$142); } else ref.current = null; } @@ -7754,7 +7778,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$198) { + } catch (e$199) { JSCompiler_temp = null; break a; } @@ -8033,11 +8057,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$143) { + } catch (error$144) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$143 + error$144 ); } } @@ -8717,8 +8741,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$156) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$156); + } catch (error$157) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$157); } } break; @@ -8890,11 +8914,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$157) { + } catch (error$158) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$157 + error$158 ); } } @@ -8932,8 +8956,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$158) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$158); + } catch (error$159) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$159); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -8944,8 +8968,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$161) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$161); + } catch (error$162) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$162); } } break; @@ -8959,8 +8983,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$162) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$162); + } catch (error$163) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$163); } } break; @@ -8974,8 +8998,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$163) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$163); + } catch (error$164) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$164); } break; case 4: @@ -9005,8 +9029,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$165) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$165); + } catch (error$166) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$166); } current = finishedWork.updateQueue; null !== current && @@ -9084,11 +9108,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$146) { + } catch (error$147) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$146 + error$147 ); } } else if ( @@ -9163,21 +9187,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$147 = JSCompiler_inline_result.stateNode; + var parent$148 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$147, ""), + (setTextContent(parent$148, ""), (JSCompiler_inline_result.flags &= -33)); - var before$148 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$148, parent$147); + var before$149 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$149, parent$148); break; case 3: case 4: - var parent$149 = JSCompiler_inline_result.stateNode.containerInfo, - before$150 = getHostSibling(finishedWork); + var parent$150 = JSCompiler_inline_result.stateNode.containerInfo, + before$151 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$150, - parent$149 + before$151, + parent$150 ); break; default: @@ -9647,9 +9671,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$172 = finishedWork.stateNode; + var instance$173 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$172._visibility & 4 + ? instance$173._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9662,7 +9686,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$172._visibility |= 4), + : ((instance$173._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9670,7 +9694,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$172._visibility |= 4), + : ((instance$173._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9683,7 +9707,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$172 + instance$173 ); break; case 24: @@ -10627,8 +10651,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$180) { - handleThrow(root, thrownValue$180); + } catch (thrownValue$181) { + handleThrow(root, thrownValue$181); } while (1); lanes && root.shellSuspendCounter++; @@ -10733,8 +10757,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$182) { - handleThrow(root, thrownValue$182); + } catch (thrownValue$183) { + handleThrow(root, thrownValue$183); } while (1); resetContextDependencies(); @@ -10953,12 +10977,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$186 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$187 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$186 && + shouldFireAfterActiveInstanceBlur$187 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -11039,7 +11063,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$187 = rootWithPendingPassiveEffects, + var root$188 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -11055,7 +11079,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$187, remainingLanes); + releaseRootPooledCache(root$188, remainingLanes); } } return !1; @@ -11657,7 +11681,9 @@ beginWork = function (current, workInProgress, renderLanes) { ); case 10: a: { - Component = workInProgress.type._context; + Component = enableRenderableContext + ? workInProgress.type + : workInProgress.type._context; init = workInProgress.pendingProps; prevState = workInProgress.memoizedProps; nextState = init.value; @@ -11679,7 +11705,9 @@ beginWork = function (current, workInProgress, renderLanes) { return workInProgress; case 9: return ( - (init = workInProgress.type), + (init = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), (Component = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), (init = readContext(init)), @@ -12039,11 +12067,18 @@ function createFiberFromTypeAndProps( if ("object" === typeof type && null !== type) switch (type.$$typeof) { case REACT_PROVIDER_TYPE: - fiberTag = 10; - break a; + if (!enableRenderableContext) { + fiberTag = 10; + break a; + } case REACT_CONTEXT_TYPE: - fiberTag = 9; + fiberTag = enableRenderableContext ? 10 : 9; break a; + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + fiberTag = 9; + break a; + } case REACT_FORWARD_REF_TYPE: fiberTag = 11; break a; @@ -12258,12 +12293,12 @@ function updateContainer(element, container, parentComponent, callback) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$189 = fiber.stateNode; - if (root$189.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$189.pendingLanes); + var root$190 = fiber.stateNode; + if (root$190.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$190.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$189, lanes), - ensureRootIsScheduled(root$189), + (upgradePendingLanesToSync(root$190, lanes), + ensureRootIsScheduled(root$190), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -13477,19 +13512,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$350; + var JSCompiler_inline_result$jscomp$351; if (canUseDOM) { - var isSupported$jscomp$inline_1556 = "oninput" in document; - if (!isSupported$jscomp$inline_1556) { - var element$jscomp$inline_1557 = document.createElement("div"); - element$jscomp$inline_1557.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1556 = - "function" === typeof element$jscomp$inline_1557.oninput; + var isSupported$jscomp$inline_1557 = "oninput" in document; + if (!isSupported$jscomp$inline_1557) { + var element$jscomp$inline_1558 = document.createElement("div"); + element$jscomp$inline_1558.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1557 = + "function" === typeof element$jscomp$inline_1558.oninput; } - JSCompiler_inline_result$jscomp$350 = isSupported$jscomp$inline_1556; - } else JSCompiler_inline_result$jscomp$350 = !1; + JSCompiler_inline_result$jscomp$351 = isSupported$jscomp$inline_1557; + } else JSCompiler_inline_result$jscomp$351 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$350 && + JSCompiler_inline_result$jscomp$351 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13798,20 +13833,20 @@ function registerSimpleEvent(domEventName, reactName) { registerTwoPhaseEvent(reactName, [domEventName]); } for ( - var i$jscomp$inline_1597 = 0; - i$jscomp$inline_1597 < simpleEventPluginEvents.length; - i$jscomp$inline_1597++ + var i$jscomp$inline_1598 = 0; + i$jscomp$inline_1598 < simpleEventPluginEvents.length; + i$jscomp$inline_1598++ ) { - var eventName$jscomp$inline_1598 = - simpleEventPluginEvents[i$jscomp$inline_1597], - domEventName$jscomp$inline_1599 = - eventName$jscomp$inline_1598.toLowerCase(), - capitalizedEvent$jscomp$inline_1600 = - eventName$jscomp$inline_1598[0].toUpperCase() + - eventName$jscomp$inline_1598.slice(1); + var eventName$jscomp$inline_1599 = + simpleEventPluginEvents[i$jscomp$inline_1598], + domEventName$jscomp$inline_1600 = + eventName$jscomp$inline_1599.toLowerCase(), + capitalizedEvent$jscomp$inline_1601 = + eventName$jscomp$inline_1599[0].toUpperCase() + + eventName$jscomp$inline_1599.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1599, - "on" + capitalizedEvent$jscomp$inline_1600 + domEventName$jscomp$inline_1600, + "on" + capitalizedEvent$jscomp$inline_1601 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15284,14 +15319,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$225 in nextProps) { - var propKey = nextProps[propKey$225]; - lastProp = lastProps[propKey$225]; + for (var propKey$226 in nextProps) { + var propKey = nextProps[propKey$226]; + lastProp = lastProps[propKey$226]; if ( - nextProps.hasOwnProperty(propKey$225) && + nextProps.hasOwnProperty(propKey$226) && (null != propKey || null != lastProp) ) - switch (propKey$225) { + switch (propKey$226) { case "type": type = propKey; break; @@ -15320,7 +15355,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$225, + propKey$226, propKey, nextProps, lastProp @@ -15339,7 +15374,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$225 = null; + propKey = value = defaultValue = propKey$226 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15370,7 +15405,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$225 = type; + propKey$226 = type; break; case "defaultValue": defaultValue = type; @@ -15391,15 +15426,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$225 - ? updateOptions(domElement, !!lastProps, propKey$225, !1) + null != propKey$226 + ? updateOptions(domElement, !!lastProps, propKey$226, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$225 = null; + propKey = propKey$226 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15423,7 +15458,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$225 = name; + propKey$226 = name; break; case "defaultValue": propKey = name; @@ -15437,17 +15472,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$225, propKey); + updateTextarea(domElement, propKey$226, propKey); return; case "option": - for (var propKey$241 in lastProps) + for (var propKey$242 in lastProps) if ( - ((propKey$225 = lastProps[propKey$241]), - lastProps.hasOwnProperty(propKey$241) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$241)) + ((propKey$226 = lastProps[propKey$242]), + lastProps.hasOwnProperty(propKey$242) && + null != propKey$226 && + !nextProps.hasOwnProperty(propKey$242)) ) - switch (propKey$241) { + switch (propKey$242) { case "selected": domElement.selected = !1; break; @@ -15455,33 +15490,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$241, + propKey$242, null, nextProps, - propKey$225 + propKey$226 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$225 = nextProps[lastDefaultValue]), + ((propKey$226 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$225 !== propKey && - (null != propKey$225 || null != propKey)) + propKey$226 !== propKey && + (null != propKey$226 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$225 && - "function" !== typeof propKey$225 && - "symbol" !== typeof propKey$225; + propKey$226 && + "function" !== typeof propKey$226 && + "symbol" !== typeof propKey$226; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$225, + propKey$226, nextProps, propKey ); @@ -15502,24 +15537,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$246 in lastProps) - (propKey$225 = lastProps[propKey$246]), - lastProps.hasOwnProperty(propKey$246) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$246) && - setProp(domElement, tag, propKey$246, null, nextProps, propKey$225); + for (var propKey$247 in lastProps) + (propKey$226 = lastProps[propKey$247]), + lastProps.hasOwnProperty(propKey$247) && + null != propKey$226 && + !nextProps.hasOwnProperty(propKey$247) && + setProp(domElement, tag, propKey$247, null, nextProps, propKey$226); for (checked in nextProps) if ( - ((propKey$225 = nextProps[checked]), + ((propKey$226 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$225 !== propKey && - (null != propKey$225 || null != propKey)) + propKey$226 !== propKey && + (null != propKey$226 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$225) + if (null != propKey$226) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15527,7 +15562,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$225, + propKey$226, nextProps, propKey ); @@ -15535,49 +15570,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$251 in lastProps) - (propKey$225 = lastProps[propKey$251]), - lastProps.hasOwnProperty(propKey$251) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$251) && + for (var propKey$252 in lastProps) + (propKey$226 = lastProps[propKey$252]), + lastProps.hasOwnProperty(propKey$252) && + null != propKey$226 && + !nextProps.hasOwnProperty(propKey$252) && setPropOnCustomElement( domElement, tag, - propKey$251, + propKey$252, null, nextProps, - propKey$225 + propKey$226 ); for (defaultChecked in nextProps) - (propKey$225 = nextProps[defaultChecked]), + (propKey$226 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$225 === propKey || - (null == propKey$225 && null == propKey) || + propKey$226 === propKey || + (null == propKey$226 && null == propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$225, + propKey$226, nextProps, propKey ); return; } } - for (var propKey$256 in lastProps) - (propKey$225 = lastProps[propKey$256]), - lastProps.hasOwnProperty(propKey$256) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$256) && - setProp(domElement, tag, propKey$256, null, nextProps, propKey$225); + for (var propKey$257 in lastProps) + (propKey$226 = lastProps[propKey$257]), + lastProps.hasOwnProperty(propKey$257) && + null != propKey$226 && + !nextProps.hasOwnProperty(propKey$257) && + setProp(domElement, tag, propKey$257, null, nextProps, propKey$226); for (lastProp in nextProps) - (propKey$225 = nextProps[lastProp]), + (propKey$226 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$225 === propKey || - (null == propKey$225 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$225, nextProps, propKey); + propKey$226 === propKey || + (null == propKey$226 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$226, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16205,17 +16240,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$264 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$265 = styles$264.get(type); - resource$265 || + var styles$265 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$266 = styles$265.get(type); + resource$266 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$265 = { + (resource$266 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$264.set(type, resource$265), + styles$265.set(type, resource$266), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16230,9 +16265,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$265.state + resource$266.state )); - return resource$265; + return resource$266; } return null; case "script": @@ -16315,37 +16350,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$269 = hoistableRoot.querySelector( + var instance$270 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$269) + if (instance$270) return ( (resource.state.loading |= 4), - (resource.instance = instance$269), - markNodeAsHoistable(instance$269), - instance$269 + (resource.instance = instance$270), + markNodeAsHoistable(instance$270), + instance$270 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$269 = ( + instance$270 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$269); - var linkInstance = instance$269; + markNodeAsHoistable(instance$270); + var linkInstance = instance$270; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$269, "link", instance); + setInitialProperties(instance$270, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$269, props.precedence, hoistableRoot); - return (resource.instance = instance$269); + insertStylesheet(instance$270, props.precedence, hoistableRoot); + return (resource.instance = instance$270); case "script": - instance$269 = getScriptKey(props.src); + instance$270 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$269) + getScriptSelectorFromKey(instance$270) )) ) return ( @@ -16354,7 +16389,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$269))) + if ((styleProps = preloadPropsMap.get(instance$270))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16724,17 +16759,17 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates$1 ]; -var devToolsConfig$jscomp$inline_1783 = { +var devToolsConfig$jscomp$inline_1784 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-1966b2b0", + version: "18.3.0-www-modern-b37a7e12", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2153 = { - bundleType: devToolsConfig$jscomp$inline_1783.bundleType, - version: devToolsConfig$jscomp$inline_1783.version, - rendererPackageName: devToolsConfig$jscomp$inline_1783.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1783.rendererConfig, +var internals$jscomp$inline_2154 = { + bundleType: devToolsConfig$jscomp$inline_1784.bundleType, + version: devToolsConfig$jscomp$inline_1784.version, + rendererPackageName: devToolsConfig$jscomp$inline_1784.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1784.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -16751,26 +16786,26 @@ var internals$jscomp$inline_2153 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1783.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1784.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-modern-1966b2b0" + reconcilerVersion: "18.3.0-www-modern-b37a7e12" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2154 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2155 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2154.isDisabled && - hook$jscomp$inline_2154.supportsFiber + !hook$jscomp$inline_2155.isDisabled && + hook$jscomp$inline_2155.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2154.inject( - internals$jscomp$inline_2153 + (rendererID = hook$jscomp$inline_2155.inject( + internals$jscomp$inline_2154 )), - (injectedHook = hook$jscomp$inline_2154); + (injectedHook = hook$jscomp$inline_2155); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; @@ -17036,4 +17071,4 @@ exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); throw Error(formatProdErrorMessage(248)); }; -exports.version = "18.3.0-www-modern-1966b2b0"; +exports.version = "18.3.0-www-modern-b37a7e12"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index cabbc3e91d..1602c40f23 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -68,6 +68,7 @@ var ReactSharedInternals = transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableProfilerNestedUpdateScheduledHook = dynamicFeatureFlags.enableProfilerNestedUpdateScheduledHook, enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler, @@ -77,6 +78,7 @@ var ReactSharedInternals = REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), + REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), @@ -126,10 +128,17 @@ function getComponentNameFromType(type) { } if ("object" === typeof type) switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - return (type.displayName || "Context") + ".Consumer"; case REACT_PROVIDER_TYPE: - return (type._context.displayName || "Context") + ".Provider"; + if (enableRenderableContext) break; + else return (type._context.displayName || "Context") + ".Provider"; + case REACT_CONTEXT_TYPE: + return enableRenderableContext + ? (type.displayName || "Context") + ".Provider" + : (type.displayName || "Context") + ".Consumer"; + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) + return (type._context.displayName || "Context") + ".Consumer"; + break; case REACT_FORWARD_REF_TYPE: var innerType = type.render; type = type.displayName; @@ -159,9 +168,13 @@ function getComponentNameFromFiber(fiber) { case 24: return "Cache"; case 9: - return (type.displayName || "Context") + ".Consumer"; + return enableRenderableContext + ? (type._context.displayName || "Context") + ".Consumer" + : (type.displayName || "Context") + ".Consumer"; case 10: - return (type._context.displayName || "Context") + ".Provider"; + return enableRenderableContext + ? (type.displayName || "Context") + ".Provider" + : (type._context.displayName || "Context") + ".Provider"; case 18: return "DehydratedFragment"; case 11: @@ -271,36 +284,36 @@ function findCurrentFiberUsingSlowPath(fiber) { } if (a.return !== b.return) (a = parentA), (b = parentB); else { - for (var didFindChild = !1, child$0 = parentA.child; child$0; ) { - if (child$0 === a) { + for (var didFindChild = !1, child$1 = parentA.child; child$1; ) { + if (child$1 === a) { didFindChild = !0; a = parentA; b = parentB; break; } - if (child$0 === b) { + if (child$1 === b) { didFindChild = !0; b = parentA; a = parentB; break; } - child$0 = child$0.sibling; + child$1 = child$1.sibling; } if (!didFindChild) { - for (child$0 = parentB.child; child$0; ) { - if (child$0 === a) { + for (child$1 = parentB.child; child$1; ) { + if (child$1 === a) { didFindChild = !0; a = parentB; b = parentA; break; } - if (child$0 === b) { + if (child$1 === b) { didFindChild = !0; b = parentB; a = parentA; break; } - child$0 = child$0.sibling; + child$1 = child$1.sibling; } if (!didFindChild) throw Error(formatProdErrorMessage(189)); } @@ -497,7 +510,7 @@ function injectProfilingHooks(profilingHooks) { } function getLaneLabelMap() { if (enableSchedulingProfiler) { - for (var map = new Map(), lane = 1, index$1 = 0; 31 > index$1; index$1++) { + for (var map = new Map(), lane = 1, index$2 = 0; 31 > index$2; index$2++) { var label = getLabelForLane(lane); map.set(lane, label); lane *= 2; @@ -751,18 +764,18 @@ function markRootFinished(root, remainingLanes, spawnedLane) { 0 < noLongerPendingLanes; ) { - var index$5 = 31 - clz32(noLongerPendingLanes), - lane = 1 << index$5; - remainingLanes[index$5] = 0; - expirationTimes[index$5] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$5]; + var index$6 = 31 - clz32(noLongerPendingLanes), + lane = 1 << index$6; + remainingLanes[index$6] = 0; + expirationTimes[index$6] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$6]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$5] = null, index$5 = 0; - index$5 < hiddenUpdatesForLane.length; - index$5++ + hiddenUpdates[index$6] = null, index$6 = 0; + index$6 < hiddenUpdatesForLane.length; + index$6++ ) { - var update = hiddenUpdatesForLane[index$5]; + var update = hiddenUpdatesForLane[index$6]; null !== update && (update.lane &= -536870913); } noLongerPendingLanes &= ~lane; @@ -782,10 +795,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$6 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$6; - (lane & entangledLanes) | (root[index$6] & entangledLanes) && - (root[index$6] |= entangledLanes); + var index$7 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$7; + (lane & entangledLanes) | (root[index$7] & entangledLanes) && + (root[index$7] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -800,9 +813,9 @@ function upgradePendingLanesToSync(root, lanesToUpgrade) { function addFiberToLanesMap(root, fiber, lanes) { if (isDevToolsPresent) for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { - var index$8 = 31 - clz32(lanes), - lane = 1 << index$8; - root[index$8].add(fiber); + var index$9 = 31 - clz32(lanes), + lane = 1 << index$9; + root[index$9].add(fiber); lanes &= ~lane; } } @@ -814,27 +827,27 @@ function movePendingFibersToMemoized(root, lanes) { 0 < lanes; ) { - var index$9 = 31 - clz32(lanes); - root = 1 << index$9; - index$9 = pendingUpdatersLaneMap[index$9]; - 0 < index$9.size && - (index$9.forEach(function (fiber) { + var index$10 = 31 - clz32(lanes); + root = 1 << index$10; + index$10 = pendingUpdatersLaneMap[index$10]; + 0 < index$10.size && + (index$10.forEach(function (fiber) { var alternate = fiber.alternate; (null !== alternate && memoizedUpdaters.has(alternate)) || memoizedUpdaters.add(fiber); }), - index$9.clear()); + index$10.clear()); lanes &= ~root; } } function getTransitionsForLanes(root, lanes) { if (!enableTransitionTracing) return null; for (var transitionsForLanes = []; 0 < lanes; ) { - var index$11 = 31 - clz32(lanes), - lane = 1 << index$11; - index$11 = root.transitionLanes[index$11]; - null !== index$11 && - index$11.forEach(function (transition) { + var index$12 = 31 - clz32(lanes), + lane = 1 << index$12; + index$12 = root.transitionLanes[index$12]; + null !== index$12 && + index$12.forEach(function (transition) { transitionsForLanes.push(transition); }); lanes &= ~lane; @@ -844,10 +857,10 @@ function getTransitionsForLanes(root, lanes) { function clearTransitionsForLanes(root, lanes) { if (enableTransitionTracing) for (; 0 < lanes; ) { - var index$12 = 31 - clz32(lanes), - lane = 1 << index$12; - null !== root.transitionLanes[index$12] && - (root.transitionLanes[index$12] = null); + var index$13 = 31 - clz32(lanes), + lane = 1 << index$13; + null !== root.transitionLanes[index$13] && + (root.transitionLanes[index$13] = null); lanes &= ~lane; } } @@ -918,8 +931,8 @@ function setValueForAttribute(node, name, value) { node.removeAttribute(name); return; case "boolean": - var prefix$13 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$13 && "aria-" !== prefix$13) { + var prefix$14 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$14 && "aria-" !== prefix$14) { node.removeAttribute(name); return; } @@ -1001,16 +1014,16 @@ function describeNativeComponentFrame(fn, construct) { } else { try { Fake.call(); - } catch (x$14) { - control = x$14; + } catch (x$15) { + control = x$15; } fn.call(Fake.prototype); } } else { try { throw Error(); - } catch (x$15) { - control = x$15; + } catch (x$16) { + control = x$16; } (Fake = fn()) && "function" === typeof Fake.catch && @@ -1464,15 +1477,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$21 in styles) - (styleName = styles[styleName$21]), - styles.hasOwnProperty(styleName$21) && - prevStyles[styleName$21] !== styleName && - setValueForStyle(node, styleName$21, styleName); - } else for (var styleName$22 in styles) - styles.hasOwnProperty(styleName$22) && - setValueForStyle(node, styleName$22, styles[styleName$22]); + (styleName = styles[styleName$22]), + styles.hasOwnProperty(styleName$22) && + prevStyles[styleName$22] !== styleName && + setValueForStyle(node, styleName$22, styleName); + } else + for (var styleName$23 in styles) + styles.hasOwnProperty(styleName$23) && + setValueForStyle(node, styleName$23, styles[styleName$23]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -2084,41 +2097,41 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$28 = firstScheduledRoot; null !== root$28; ) { - if (!onlyLegacy || 0 === root$28.tag) { - var workInProgressRootRenderLanes$30 = workInProgressRootRenderLanes, + for (var root$29 = firstScheduledRoot; null !== root$29; ) { + if (!onlyLegacy || 0 === root$29.tag) { + var workInProgressRootRenderLanes$31 = workInProgressRootRenderLanes, nextLanes = getNextLanes( - root$28, - root$28 === workInProgressRoot - ? workInProgressRootRenderLanes$30 + root$29, + root$29 === workInProgressRoot + ? workInProgressRootRenderLanes$31 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$30 = root$28; + workInProgressRootRenderLanes$31 = root$29; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { currentUpdateIsNested = nestedUpdateScheduled; nestedUpdateScheduled = !1; var exitStatus = renderRootSync( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$30.tag && + 0 !== workInProgressRootRenderLanes$31.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, originallyAttemptedLanes, errorRetryLanes ))); @@ -2126,39 +2139,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$30, 0), + prepareFreshStack(workInProgressRootRenderLanes$31, 0), markRootSuspended( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$30), + ensureRootIsScheduled(workInProgressRootRenderLanes$31), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$30.finishedWork = - workInProgressRootRenderLanes$30.current.alternate), - (workInProgressRootRenderLanes$30.finishedLanes = + : ((workInProgressRootRenderLanes$31.finishedWork = + workInProgressRootRenderLanes$31.current.alternate), + (workInProgressRootRenderLanes$31.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$30); + ensureRootIsScheduled(workInProgressRootRenderLanes$31); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } } - root$28 = root$28.next; + root$29 = root$29.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -2215,12 +2228,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < pendingLanes; ) { - var index$3 = 31 - clz32(pendingLanes), - lane = 1 << index$3, - expirationTime = expirationTimes[index$3]; + var index$4 = 31 - clz32(pendingLanes), + lane = 1 << index$4, + expirationTime = expirationTimes[index$4]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$3] = computeExpirationTime(lane, currentTime); + expirationTimes[index$4] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); pendingLanes &= ~lane; } @@ -3760,7 +3773,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$55 = !1; + didReadFromEntangledAsyncAction$56 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3773,7 +3786,7 @@ function updateReducerImpl(hook, current, reducer) { if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$55 = !0); + (didReadFromEntangledAsyncAction$56 = !0); continue; } else (updateLane = { @@ -3802,7 +3815,7 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$55 = !0); + (didReadFromEntangledAsyncAction$56 = !0); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane); @@ -3832,7 +3845,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$55 && + didReadFromEntangledAsyncAction$56 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4437,14 +4450,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$65 = enqueueUpdate(provider, fiber, lane); - null !== root$65 && - (scheduleUpdateOnFiber(root$65, provider, lane), - entangleTransitions(root$65, provider, lane)); + var root$66 = enqueueUpdate(provider, fiber, lane); + null !== root$66 && + (scheduleUpdateOnFiber(root$66, provider, lane), + entangleTransitions(root$66, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$65 && + null !== root$66 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4690,15 +4703,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$58 = workInProgressRoot; - if (null === root$58) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$58, workInProgressRootRenderLanes) || + var root$59 = workInProgressRoot; + if (null === root$59) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$59, workInProgressRootRenderLanes) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$58 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$58; - mountEffect(subscribeToStore.bind(null, fiber, root$58, subscribe), [ + root$59 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$59; + mountEffect(subscribeToStore.bind(null, fiber, root$59, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -4707,7 +4720,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$58, + root$59, getServerSnapshot, getSnapshot ), @@ -5476,10 +5489,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$77 = workInProgress.stateNode; + root$78 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$77.incompleteTransitions.has(transition)) { + if (!root$78.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5487,11 +5500,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$77.incompleteTransitions.set(transition, markerInstance); + root$78.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$77.incompleteTransitions.forEach(function (markerInstance) { + root$78.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6778,7 +6791,9 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 10: pushProvider( workInProgress, - workInProgress.type._context, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, workInProgress.memoizedProps.value ); break; @@ -7036,7 +7051,9 @@ function propagateParentContextChanges( if (null === currentParent) throw Error(formatProdErrorMessage(387)); currentParent = currentParent.memoizedProps; if (null !== currentParent) { - var context = parent.type._context; + var context = enableRenderableContext + ? parent.type + : parent.type._context; objectIs(parent.pendingProps.value, currentParent.value) || (null !== current ? current.push(context) : (current = [context])); } @@ -7263,7 +7280,10 @@ function collectNearestChildContextValues( var node = startingChild, context = context$jscomp$0, childContextValues = childContextValues$jscomp$0; - if (10 === node.tag && node.type._context === context) + if ( + 10 === node.tag && + (enableRenderableContext ? node.type : node.type._context) === context + ) childContextValues.push(node.memoizedProps.value); else { var child = node.child; @@ -7355,14 +7375,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$117 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$117 = lastTailNode), + for (var lastTailNode$118 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$118 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$117 + null === lastTailNode$118 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$117.sibling = null); + : (lastTailNode$118.sibling = null); } } function bubbleProperties(completedWork) { @@ -7374,53 +7394,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$119 = completedWork.selfBaseDuration, - child$120 = completedWork.child; - null !== child$120; + var treeBaseDuration$120 = completedWork.selfBaseDuration, + child$121 = completedWork.child; + null !== child$121; ) - (newChildLanes |= child$120.lanes | child$120.childLanes), - (subtreeFlags |= child$120.subtreeFlags & 31457280), - (subtreeFlags |= child$120.flags & 31457280), - (treeBaseDuration$119 += child$120.treeBaseDuration), - (child$120 = child$120.sibling); - completedWork.treeBaseDuration = treeBaseDuration$119; + (newChildLanes |= child$121.lanes | child$121.childLanes), + (subtreeFlags |= child$121.subtreeFlags & 31457280), + (subtreeFlags |= child$121.flags & 31457280), + (treeBaseDuration$120 += child$121.treeBaseDuration), + (child$121 = child$121.sibling); + completedWork.treeBaseDuration = treeBaseDuration$120; } else for ( - treeBaseDuration$119 = completedWork.child; - null !== treeBaseDuration$119; + treeBaseDuration$120 = completedWork.child; + null !== treeBaseDuration$120; ) (newChildLanes |= - treeBaseDuration$119.lanes | treeBaseDuration$119.childLanes), - (subtreeFlags |= treeBaseDuration$119.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$119.flags & 31457280), - (treeBaseDuration$119.return = completedWork), - (treeBaseDuration$119 = treeBaseDuration$119.sibling); + treeBaseDuration$120.lanes | treeBaseDuration$120.childLanes), + (subtreeFlags |= treeBaseDuration$120.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$120.flags & 31457280), + (treeBaseDuration$120.return = completedWork), + (treeBaseDuration$120 = treeBaseDuration$120.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$119 = completedWork.actualDuration; - child$120 = completedWork.selfBaseDuration; + treeBaseDuration$120 = completedWork.actualDuration; + child$121 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$119 += child.actualDuration), - (child$120 += child.treeBaseDuration), + (treeBaseDuration$120 += child.actualDuration), + (child$121 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$119; - completedWork.treeBaseDuration = child$120; + completedWork.actualDuration = treeBaseDuration$120; + completedWork.treeBaseDuration = child$121; } else for ( - treeBaseDuration$119 = completedWork.child; - null !== treeBaseDuration$119; + treeBaseDuration$120 = completedWork.child; + null !== treeBaseDuration$120; ) (newChildLanes |= - treeBaseDuration$119.lanes | treeBaseDuration$119.childLanes), - (subtreeFlags |= treeBaseDuration$119.subtreeFlags), - (subtreeFlags |= treeBaseDuration$119.flags), - (treeBaseDuration$119.return = completedWork), - (treeBaseDuration$119 = treeBaseDuration$119.sibling); + treeBaseDuration$120.lanes | treeBaseDuration$120.childLanes), + (subtreeFlags |= treeBaseDuration$120.subtreeFlags), + (subtreeFlags |= treeBaseDuration$120.flags), + (treeBaseDuration$120.return = completedWork), + (treeBaseDuration$120 = treeBaseDuration$120.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7783,11 +7803,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$135 = null; + var cache$136 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$135 = newProps.memoizedState.cachePool.pool); - cache$135 !== currentResource && (newProps.flags |= 2048); + (cache$136 = newProps.memoizedState.cachePool.pool); + cache$136 !== currentResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -7813,7 +7833,11 @@ function completeWork(current, workInProgress, renderLanes) { ); case 10: return ( - popProvider(workInProgress.type._context), + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), bubbleProperties(workInProgress), null ); @@ -7829,8 +7853,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$135 = currentResource.rendering; - if (null === cache$135) + cache$136 = currentResource.rendering; + if (null === cache$136) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -7838,11 +7862,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$135 = findFirstSuspended(current); - if (null !== cache$135) { + cache$136 = findFirstSuspended(current); + if (null !== cache$136) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = cache$135.updateQueue; + current = cache$136.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -7867,7 +7891,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$135)), null !== current)) { + if (((current = findFirstSuspended(cache$136)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -7877,7 +7901,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !cache$135.alternate && + !cache$136.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -7890,13 +7914,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((cache$135.sibling = workInProgress.child), - (workInProgress.child = cache$135)) + ? ((cache$136.sibling = workInProgress.child), + (workInProgress.child = cache$136)) : ((current = currentResource.last), null !== current - ? (current.sibling = cache$135) - : (workInProgress.child = cache$135), - (currentResource.last = cache$135)); + ? (current.sibling = cache$136) + : (workInProgress.child = cache$136), + (currentResource.last = cache$136)); } if (null !== currentResource.tail) return ( @@ -8039,7 +8063,14 @@ function unwindWork(current, workInProgress) { case 4: return popHostContainer(), null; case 10: - return popProvider(workInProgress.type._context), null; + return ( + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + null + ); case 22: case 23: return ( @@ -8100,7 +8131,11 @@ function unwindInterruptedWork(current, interruptedWork) { pop(suspenseStackCursor); break; case 10: - popProvider(interruptedWork.type._context); + popProvider( + enableRenderableContext + ? interruptedWork.type + : interruptedWork.type._context + ); break; case 22: case 23: @@ -8238,8 +8273,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$153) { - captureCommitPhaseError(current, nearestMountedAncestor, error$153); + } catch (error$154) { + captureCommitPhaseError(current, nearestMountedAncestor, error$154); } else ref.current = null; } @@ -8276,7 +8311,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$213) { + } catch (e$214) { JSCompiler_temp = null; break a; } @@ -8533,11 +8568,11 @@ function commitPassiveEffectDurations(finishedRoot, finishedWork) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id; _finishedWork$memoize = _finishedWork$memoize.onPostCommit; - var commitTime$155 = commitTime, + var commitTime$156 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof _finishedWork$memoize && - _finishedWork$memoize(id, phase, finishedRoot, commitTime$155); + _finishedWork$memoize(id, phase, finishedRoot, commitTime$156); finishedWork = finishedWork.return; a: for (; null !== finishedWork; ) { switch (finishedWork.tag) { @@ -8564,8 +8599,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$157) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$157); + } catch (error$158) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$158); } } function commitClassCallbacks(finishedWork) { @@ -8664,11 +8699,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$158) { + } catch (error$159) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$158 + error$159 ); } else { @@ -8685,11 +8720,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$159) { + } catch (error$160) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$159 + error$160 ); } recordLayoutEffectDuration(finishedWork); @@ -8700,11 +8735,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$160) { + } catch (error$161) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$160 + error$161 ); } } @@ -9410,22 +9445,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$175) { + } catch (error$176) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$175 + error$176 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$176) { + } catch (error$177) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$176 + error$177 ); } } @@ -9598,11 +9633,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$177) { + } catch (error$178) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$177 + error$178 ); } } @@ -9640,8 +9675,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$178) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$178); + } catch (error$179) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$179); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -9652,8 +9687,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$181) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$181); + } catch (error$182) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$182); } } break; @@ -9667,8 +9702,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$182) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$182); + } catch (error$183) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$183); } } break; @@ -9682,8 +9717,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$183) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$183); + } catch (error$184) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$184); } break; case 4: @@ -9713,8 +9748,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$185) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$185); + } catch (error$186) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$186); } current = finishedWork.updateQueue; null !== current && @@ -9792,11 +9827,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$165) { + } catch (error$166) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$165 + error$166 ); } } else if ( @@ -9871,21 +9906,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$166 = JSCompiler_inline_result.stateNode; + var parent$167 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$166, ""), + (setTextContent(parent$167, ""), (JSCompiler_inline_result.flags &= -33)); - var before$167 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$167, parent$166); + var before$168 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$168, parent$167); break; case 3: case 4: - var parent$168 = JSCompiler_inline_result.stateNode.containerInfo, - before$169 = getHostSibling(finishedWork); + var parent$169 = JSCompiler_inline_result.stateNode.containerInfo, + before$170 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$169, - parent$168 + before$170, + parent$169 ); break; default: @@ -10077,8 +10112,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$188) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$188); + } catch (error$189) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$189); } } function commitOffscreenPassiveMountEffects(current, finishedWork, instance) { @@ -10377,9 +10412,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$193 = finishedWork.stateNode; + var instance$194 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$193._visibility & 4 + ? instance$194._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10392,7 +10427,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$193._visibility |= 4), + : ((instance$194._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10400,7 +10435,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$193._visibility |= 4), + : ((instance$194._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10413,7 +10448,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$193 + instance$194 ); break; case 24: @@ -11196,9 +11231,9 @@ function markRootSuspended(root, suspendedLanes, spawnedLane) { 0 < lanes; ) { - var index$4 = 31 - clz32(lanes), - lane = 1 << index$4; - expirationTimes[index$4] = -1; + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5; + expirationTimes[index$5] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11290,9 +11325,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$2 = 31 - clz32(allEntangledLanes), - lane = 1 << index$2; - lanes |= root[index$2]; + var index$3 = 31 - clz32(allEntangledLanes), + lane = 1 << index$3; + lanes |= root[index$3]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -11433,8 +11468,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$201) { - handleThrow(root, thrownValue$201); + } catch (thrownValue$202) { + handleThrow(root, thrownValue$202); } while (1); lanes && root.shellSuspendCounter++; @@ -11550,8 +11585,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$203) { - handleThrow(root, thrownValue$203); + } catch (thrownValue$204) { + handleThrow(root, thrownValue$204); } while (1); resetContextDependencies(); @@ -11808,7 +11843,7 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$207 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$208 = commitBeforeMutationEffects( root, finishedWork ); @@ -11816,7 +11851,7 @@ function commitRootImpl( enableProfilerNestedUpdateScheduledHook && (rootCommittingMutationOrLayoutEffects = root); commitMutationEffects(root, finishedWork, lanes); - shouldFireAfterActiveInstanceBlur$207 && + shouldFireAfterActiveInstanceBlur$208 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -11912,7 +11947,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$208 = rootWithPendingPassiveEffects, + var root$209 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -11928,7 +11963,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$208, remainingLanes); + releaseRootPooledCache(root$209, remainingLanes); } } return !1; @@ -12573,7 +12608,9 @@ beginWork = function (current, workInProgress, renderLanes) { ); case 10: a: { - Component = workInProgress.type._context; + Component = enableRenderableContext + ? workInProgress.type + : workInProgress.type._context; context = workInProgress.pendingProps; prevState = workInProgress.memoizedProps; nextState = context.value; @@ -12603,7 +12640,9 @@ beginWork = function (current, workInProgress, renderLanes) { return workInProgress; case 9: return ( - (context = workInProgress.type), + (context = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), (Component = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), (context = readContext(context)), @@ -12989,11 +13028,18 @@ function createFiberFromTypeAndProps( if ("object" === typeof type && null !== type) switch (type.$$typeof) { case REACT_PROVIDER_TYPE: - fiberTag = 10; - break a; + if (!enableRenderableContext) { + fiberTag = 10; + break a; + } case REACT_CONTEXT_TYPE: - fiberTag = 9; + fiberTag = enableRenderableContext ? 10 : 9; break a; + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + fiberTag = 9; + break a; + } case REACT_FORWARD_REF_TYPE: fiberTag = 11; break a; @@ -13306,12 +13352,12 @@ function getPublicRootInstance(container) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$211 = fiber.stateNode; - if (root$211.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$211.pendingLanes); + var root$212 = fiber.stateNode; + if (root$212.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$212.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$211, lanes), - ensureRootIsScheduled(root$211), + (upgradePendingLanesToSync(root$212, lanes), + ensureRootIsScheduled(root$212), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now$1() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -13877,19 +13923,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$373; + var JSCompiler_inline_result$jscomp$374; if (canUseDOM) { - var isSupported$jscomp$inline_1641 = "oninput" in document; - if (!isSupported$jscomp$inline_1641) { - var element$jscomp$inline_1642 = document.createElement("div"); - element$jscomp$inline_1642.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1641 = - "function" === typeof element$jscomp$inline_1642.oninput; + var isSupported$jscomp$inline_1642 = "oninput" in document; + if (!isSupported$jscomp$inline_1642) { + var element$jscomp$inline_1643 = document.createElement("div"); + element$jscomp$inline_1643.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1642 = + "function" === typeof element$jscomp$inline_1643.oninput; } - JSCompiler_inline_result$jscomp$373 = isSupported$jscomp$inline_1641; - } else JSCompiler_inline_result$jscomp$373 = !1; + JSCompiler_inline_result$jscomp$374 = isSupported$jscomp$inline_1642; + } else JSCompiler_inline_result$jscomp$374 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$373 && + JSCompiler_inline_result$jscomp$374 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14261,20 +14307,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1682 = 0; - i$jscomp$inline_1682 < simpleEventPluginEvents.length; - i$jscomp$inline_1682++ + var i$jscomp$inline_1683 = 0; + i$jscomp$inline_1683 < simpleEventPluginEvents.length; + i$jscomp$inline_1683++ ) { - var eventName$jscomp$inline_1683 = - simpleEventPluginEvents[i$jscomp$inline_1682], - domEventName$jscomp$inline_1684 = - eventName$jscomp$inline_1683.toLowerCase(), - capitalizedEvent$jscomp$inline_1685 = - eventName$jscomp$inline_1683[0].toUpperCase() + - eventName$jscomp$inline_1683.slice(1); + var eventName$jscomp$inline_1684 = + simpleEventPluginEvents[i$jscomp$inline_1683], + domEventName$jscomp$inline_1685 = + eventName$jscomp$inline_1684.toLowerCase(), + capitalizedEvent$jscomp$inline_1686 = + eventName$jscomp$inline_1684[0].toUpperCase() + + eventName$jscomp$inline_1684.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1684, - "on" + capitalizedEvent$jscomp$inline_1685 + domEventName$jscomp$inline_1685, + "on" + capitalizedEvent$jscomp$inline_1686 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15748,14 +15794,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$240 in nextProps) { - var propKey = nextProps[propKey$240]; - lastProp = lastProps[propKey$240]; + for (var propKey$241 in nextProps) { + var propKey = nextProps[propKey$241]; + lastProp = lastProps[propKey$241]; if ( - nextProps.hasOwnProperty(propKey$240) && + nextProps.hasOwnProperty(propKey$241) && (null != propKey || null != lastProp) ) - switch (propKey$240) { + switch (propKey$241) { case "type": type = propKey; break; @@ -15784,7 +15830,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$240, + propKey$241, propKey, nextProps, lastProp @@ -15803,7 +15849,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$240 = null; + propKey = value = defaultValue = propKey$241 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15834,7 +15880,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$240 = type; + propKey$241 = type; break; case "defaultValue": defaultValue = type; @@ -15855,15 +15901,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$240 - ? updateOptions(domElement, !!lastProps, propKey$240, !1) + null != propKey$241 + ? updateOptions(domElement, !!lastProps, propKey$241, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$240 = null; + propKey = propKey$241 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15887,7 +15933,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$240 = name; + propKey$241 = name; break; case "defaultValue": propKey = name; @@ -15901,17 +15947,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$240, propKey); + updateTextarea(domElement, propKey$241, propKey); return; case "option": - for (var propKey$256 in lastProps) + for (var propKey$257 in lastProps) if ( - ((propKey$240 = lastProps[propKey$256]), - lastProps.hasOwnProperty(propKey$256) && - null != propKey$240 && - !nextProps.hasOwnProperty(propKey$256)) + ((propKey$241 = lastProps[propKey$257]), + lastProps.hasOwnProperty(propKey$257) && + null != propKey$241 && + !nextProps.hasOwnProperty(propKey$257)) ) - switch (propKey$256) { + switch (propKey$257) { case "selected": domElement.selected = !1; break; @@ -15919,33 +15965,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$256, + propKey$257, null, nextProps, - propKey$240 + propKey$241 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$240 = nextProps[lastDefaultValue]), + ((propKey$241 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$240 !== propKey && - (null != propKey$240 || null != propKey)) + propKey$241 !== propKey && + (null != propKey$241 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$240 && - "function" !== typeof propKey$240 && - "symbol" !== typeof propKey$240; + propKey$241 && + "function" !== typeof propKey$241 && + "symbol" !== typeof propKey$241; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$240, + propKey$241, nextProps, propKey ); @@ -15966,24 +16012,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$261 in lastProps) - (propKey$240 = lastProps[propKey$261]), - lastProps.hasOwnProperty(propKey$261) && - null != propKey$240 && - !nextProps.hasOwnProperty(propKey$261) && - setProp(domElement, tag, propKey$261, null, nextProps, propKey$240); + for (var propKey$262 in lastProps) + (propKey$241 = lastProps[propKey$262]), + lastProps.hasOwnProperty(propKey$262) && + null != propKey$241 && + !nextProps.hasOwnProperty(propKey$262) && + setProp(domElement, tag, propKey$262, null, nextProps, propKey$241); for (checked in nextProps) if ( - ((propKey$240 = nextProps[checked]), + ((propKey$241 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$240 !== propKey && - (null != propKey$240 || null != propKey)) + propKey$241 !== propKey && + (null != propKey$241 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$240) + if (null != propKey$241) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15991,7 +16037,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$240, + propKey$241, nextProps, propKey ); @@ -15999,49 +16045,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$266 in lastProps) - (propKey$240 = lastProps[propKey$266]), - lastProps.hasOwnProperty(propKey$266) && - null != propKey$240 && - !nextProps.hasOwnProperty(propKey$266) && + for (var propKey$267 in lastProps) + (propKey$241 = lastProps[propKey$267]), + lastProps.hasOwnProperty(propKey$267) && + null != propKey$241 && + !nextProps.hasOwnProperty(propKey$267) && setPropOnCustomElement( domElement, tag, - propKey$266, + propKey$267, null, nextProps, - propKey$240 + propKey$241 ); for (defaultChecked in nextProps) - (propKey$240 = nextProps[defaultChecked]), + (propKey$241 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$240 === propKey || - (null == propKey$240 && null == propKey) || + propKey$241 === propKey || + (null == propKey$241 && null == propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$240, + propKey$241, nextProps, propKey ); return; } } - for (var propKey$271 in lastProps) - (propKey$240 = lastProps[propKey$271]), - lastProps.hasOwnProperty(propKey$271) && - null != propKey$240 && - !nextProps.hasOwnProperty(propKey$271) && - setProp(domElement, tag, propKey$271, null, nextProps, propKey$240); + for (var propKey$272 in lastProps) + (propKey$241 = lastProps[propKey$272]), + lastProps.hasOwnProperty(propKey$272) && + null != propKey$241 && + !nextProps.hasOwnProperty(propKey$272) && + setProp(domElement, tag, propKey$272, null, nextProps, propKey$241); for (lastProp in nextProps) - (propKey$240 = nextProps[lastProp]), + (propKey$241 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$240 === propKey || - (null == propKey$240 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$240, nextProps, propKey); + propKey$241 === propKey || + (null == propKey$241 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$241, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16683,17 +16729,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$279 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$280 = styles$279.get(type); - resource$280 || + var styles$280 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$281 = styles$280.get(type); + resource$281 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$280 = { + (resource$281 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$279.set(type, resource$280), + styles$280.set(type, resource$281), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16708,9 +16754,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$280.state + resource$281.state )); - return resource$280; + return resource$281; } return null; case "script": @@ -16793,37 +16839,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$284 = hoistableRoot.querySelector( + var instance$285 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$284) + if (instance$285) return ( (resource.state.loading |= 4), - (resource.instance = instance$284), - markNodeAsHoistable(instance$284), - instance$284 + (resource.instance = instance$285), + markNodeAsHoistable(instance$285), + instance$285 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$284 = ( + instance$285 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$284); - var linkInstance = instance$284; + markNodeAsHoistable(instance$285); + var linkInstance = instance$285; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$284, "link", instance); + setInitialProperties(instance$285, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$284, props.precedence, hoistableRoot); - return (resource.instance = instance$284); + insertStylesheet(instance$285, props.precedence, hoistableRoot); + return (resource.instance = instance$285); case "script": - instance$284 = getScriptKey(props.src); + instance$285 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$284) + getScriptSelectorFromKey(instance$285) )) ) return ( @@ -16832,7 +16878,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$284))) + if ((styleProps = preloadPropsMap.get(instance$285))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17847,11 +17893,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$306); + var instance = getPublicRootInstance(root$307); originalCallback.call(instance); }; } - var root$306 = createHydrationContainer( + var root$307 = createHydrationContainer( initialChildren, callback, container, @@ -17864,23 +17910,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$306; - container[internalContainerInstanceKey] = root$306.current; + container._reactRootContainer = root$307; + container[internalContainerInstanceKey] = root$307.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(); - return root$306; + return root$307; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$307 = callback; + var originalCallback$308 = callback; callback = function () { - var instance = getPublicRootInstance(root$308); - originalCallback$307.call(instance); + var instance = getPublicRootInstance(root$309); + originalCallback$308.call(instance); }; } - var root$308 = createFiberRoot( + var root$309 = createFiberRoot( container, 0, !1, @@ -17893,15 +17939,15 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$308; - container[internalContainerInstanceKey] = root$308.current; + container._reactRootContainer = root$309; + container[internalContainerInstanceKey] = root$309.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(function () { - updateContainer(initialChildren, root$308, parentComponent, callback); + updateContainer(initialChildren, root$309, parentComponent, callback); }); - return root$308; + return root$309; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -17966,10 +18012,10 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates$1 ]; -var devToolsConfig$jscomp$inline_1909 = { +var devToolsConfig$jscomp$inline_1910 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-2cd3431f", + version: "18.3.0-www-classic-21e546e1", rendererPackageName: "react-dom" }; (function (internals) { @@ -17987,10 +18033,10 @@ var devToolsConfig$jscomp$inline_1909 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1909.bundleType, - version: devToolsConfig$jscomp$inline_1909.version, - rendererPackageName: devToolsConfig$jscomp$inline_1909.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1909.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1910.bundleType, + version: devToolsConfig$jscomp$inline_1910.version, + rendererPackageName: devToolsConfig$jscomp$inline_1910.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1910.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -18006,14 +18052,14 @@ var devToolsConfig$jscomp$inline_1909 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1909.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1910.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-classic-2cd3431f" + reconcilerVersion: "18.3.0-www-classic-21e546e1" }); assign(Internals, { ReactBrowserEventEmitter: { @@ -18350,7 +18396,7 @@ exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); throw Error(formatProdErrorMessage(248)); }; -exports.version = "18.3.0-www-classic-2cd3431f"; +exports.version = "18.3.0-www-classic-21e546e1"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js index c2a83df954..a2cca49641 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -71,6 +71,7 @@ var assign = Object.assign, transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableProfilerNestedUpdateScheduledHook = dynamicFeatureFlags.enableProfilerNestedUpdateScheduledHook, enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler, @@ -103,6 +104,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), + REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), @@ -1309,15 +1311,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$20 in styles) - (styleName = styles[styleName$20]), - styles.hasOwnProperty(styleName$20) && - prevStyles[styleName$20] !== styleName && - setValueForStyle(node, styleName$20, styleName); - } else for (var styleName$21 in styles) - styles.hasOwnProperty(styleName$21) && - setValueForStyle(node, styleName$21, styles[styleName$21]); + (styleName = styles[styleName$21]), + styles.hasOwnProperty(styleName$21) && + prevStyles[styleName$21] !== styleName && + setValueForStyle(node, styleName$21, styleName); + } else + for (var styleName$22 in styles) + styles.hasOwnProperty(styleName$22) && + setValueForStyle(node, styleName$22, styles[styleName$22]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -1572,36 +1574,36 @@ function findCurrentFiberUsingSlowPath(fiber) { } if (a.return !== b.return) (a = parentA), (b = parentB); else { - for (var didFindChild = !1, child$23 = parentA.child; child$23; ) { - if (child$23 === a) { + for (var didFindChild = !1, child$24 = parentA.child; child$24; ) { + if (child$24 === a) { didFindChild = !0; a = parentA; b = parentB; break; } - if (child$23 === b) { + if (child$24 === b) { didFindChild = !0; b = parentA; a = parentB; break; } - child$23 = child$23.sibling; + child$24 = child$24.sibling; } if (!didFindChild) { - for (child$23 = parentB.child; child$23; ) { - if (child$23 === a) { + for (child$24 = parentB.child; child$24; ) { + if (child$24 === a) { didFindChild = !0; a = parentB; b = parentA; break; } - if (child$23 === b) { + if (child$24 === b) { didFindChild = !0; b = parentB; a = parentA; break; } - child$23 = child$23.sibling; + child$24 = child$24.sibling; } if (!didFindChild) throw Error(formatProdErrorMessage(189)); } @@ -1978,41 +1980,41 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$28 = firstScheduledRoot; null !== root$28; ) { - if (!onlyLegacy || 0 === root$28.tag) { - var workInProgressRootRenderLanes$30 = workInProgressRootRenderLanes, + for (var root$29 = firstScheduledRoot; null !== root$29; ) { + if (!onlyLegacy || 0 === root$29.tag) { + var workInProgressRootRenderLanes$31 = workInProgressRootRenderLanes, nextLanes = getNextLanes( - root$28, - root$28 === workInProgressRoot - ? workInProgressRootRenderLanes$30 + root$29, + root$29 === workInProgressRoot + ? workInProgressRootRenderLanes$31 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$30 = root$28; + workInProgressRootRenderLanes$31 = root$29; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { currentUpdateIsNested = nestedUpdateScheduled; nestedUpdateScheduled = !1; var exitStatus = renderRootSync( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$30.tag && + 0 !== workInProgressRootRenderLanes$31.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, originallyAttemptedLanes, errorRetryLanes ))); @@ -2020,39 +2022,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$30, 0), + prepareFreshStack(workInProgressRootRenderLanes$31, 0), markRootSuspended( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$30), + ensureRootIsScheduled(workInProgressRootRenderLanes$31), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$30.finishedWork = - workInProgressRootRenderLanes$30.current.alternate), - (workInProgressRootRenderLanes$30.finishedLanes = + : ((workInProgressRootRenderLanes$31.finishedWork = + workInProgressRootRenderLanes$31.current.alternate), + (workInProgressRootRenderLanes$31.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$30); + ensureRootIsScheduled(workInProgressRootRenderLanes$31); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } } - root$28 = root$28.next; + root$29 = root$29.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -3654,7 +3656,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$55 = !1; + didReadFromEntangledAsyncAction$56 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3667,7 +3669,7 @@ function updateReducerImpl(hook, current, reducer) { if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$55 = !0); + (didReadFromEntangledAsyncAction$56 = !0); continue; } else (updateLane = { @@ -3696,7 +3698,7 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$55 = !0); + (didReadFromEntangledAsyncAction$56 = !0); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane); @@ -3726,7 +3728,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$55 && + didReadFromEntangledAsyncAction$56 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4331,14 +4333,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$65 = enqueueUpdate(provider, fiber, lane); - null !== root$65 && - (scheduleUpdateOnFiber(root$65, provider, lane), - entangleTransitions(root$65, provider, lane)); + var root$66 = enqueueUpdate(provider, fiber, lane); + null !== root$66 && + (scheduleUpdateOnFiber(root$66, provider, lane), + entangleTransitions(root$66, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$65 && + null !== root$66 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4584,15 +4586,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$58 = workInProgressRoot; - if (null === root$58) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$58, workInProgressRootRenderLanes) || + var root$59 = workInProgressRoot; + if (null === root$59) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$59, workInProgressRootRenderLanes) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$58 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$58; - mountEffect(subscribeToStore.bind(null, fiber, root$58, subscribe), [ + root$59 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$59; + mountEffect(subscribeToStore.bind(null, fiber, root$59, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -4601,7 +4603,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$58, + root$59, getServerSnapshot, getSnapshot ), @@ -5355,10 +5357,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$77 = workInProgress.stateNode; + root$78 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$77.incompleteTransitions.has(transition)) { + if (!root$78.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5366,11 +5368,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$77.incompleteTransitions.set(transition, markerInstance); + root$78.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$77.incompleteTransitions.forEach(function (markerInstance) { + root$78.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6615,7 +6617,9 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 10: pushProvider( workInProgress, - workInProgress.type._context, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, workInProgress.memoizedProps.value ); break; @@ -6873,7 +6877,9 @@ function propagateParentContextChanges( if (null === currentParent) throw Error(formatProdErrorMessage(387)); currentParent = currentParent.memoizedProps; if (null !== currentParent) { - var context = parent.type._context; + var context = enableRenderableContext + ? parent.type + : parent.type._context; objectIs(parent.pendingProps.value, currentParent.value) || (null !== current ? current.push(context) : (current = [context])); } @@ -7100,7 +7106,10 @@ function collectNearestChildContextValues( var node = startingChild, context = context$jscomp$0, childContextValues = childContextValues$jscomp$0; - if (10 === node.tag && node.type._context === context) + if ( + 10 === node.tag && + (enableRenderableContext ? node.type : node.type._context) === context + ) childContextValues.push(node.memoizedProps.value); else { var child = node.child; @@ -7192,14 +7201,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$117 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$117 = lastTailNode), + for (var lastTailNode$118 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$118 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$117 + null === lastTailNode$118 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$117.sibling = null); + : (lastTailNode$118.sibling = null); } } function bubbleProperties(completedWork) { @@ -7211,53 +7220,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$119 = completedWork.selfBaseDuration, - child$120 = completedWork.child; - null !== child$120; + var treeBaseDuration$120 = completedWork.selfBaseDuration, + child$121 = completedWork.child; + null !== child$121; ) - (newChildLanes |= child$120.lanes | child$120.childLanes), - (subtreeFlags |= child$120.subtreeFlags & 31457280), - (subtreeFlags |= child$120.flags & 31457280), - (treeBaseDuration$119 += child$120.treeBaseDuration), - (child$120 = child$120.sibling); - completedWork.treeBaseDuration = treeBaseDuration$119; + (newChildLanes |= child$121.lanes | child$121.childLanes), + (subtreeFlags |= child$121.subtreeFlags & 31457280), + (subtreeFlags |= child$121.flags & 31457280), + (treeBaseDuration$120 += child$121.treeBaseDuration), + (child$121 = child$121.sibling); + completedWork.treeBaseDuration = treeBaseDuration$120; } else for ( - treeBaseDuration$119 = completedWork.child; - null !== treeBaseDuration$119; + treeBaseDuration$120 = completedWork.child; + null !== treeBaseDuration$120; ) (newChildLanes |= - treeBaseDuration$119.lanes | treeBaseDuration$119.childLanes), - (subtreeFlags |= treeBaseDuration$119.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$119.flags & 31457280), - (treeBaseDuration$119.return = completedWork), - (treeBaseDuration$119 = treeBaseDuration$119.sibling); + treeBaseDuration$120.lanes | treeBaseDuration$120.childLanes), + (subtreeFlags |= treeBaseDuration$120.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$120.flags & 31457280), + (treeBaseDuration$120.return = completedWork), + (treeBaseDuration$120 = treeBaseDuration$120.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$119 = completedWork.actualDuration; - child$120 = completedWork.selfBaseDuration; + treeBaseDuration$120 = completedWork.actualDuration; + child$121 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$119 += child.actualDuration), - (child$120 += child.treeBaseDuration), + (treeBaseDuration$120 += child.actualDuration), + (child$121 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$119; - completedWork.treeBaseDuration = child$120; + completedWork.actualDuration = treeBaseDuration$120; + completedWork.treeBaseDuration = child$121; } else for ( - treeBaseDuration$119 = completedWork.child; - null !== treeBaseDuration$119; + treeBaseDuration$120 = completedWork.child; + null !== treeBaseDuration$120; ) (newChildLanes |= - treeBaseDuration$119.lanes | treeBaseDuration$119.childLanes), - (subtreeFlags |= treeBaseDuration$119.subtreeFlags), - (subtreeFlags |= treeBaseDuration$119.flags), - (treeBaseDuration$119.return = completedWork), - (treeBaseDuration$119 = treeBaseDuration$119.sibling); + treeBaseDuration$120.lanes | treeBaseDuration$120.childLanes), + (subtreeFlags |= treeBaseDuration$120.subtreeFlags), + (subtreeFlags |= treeBaseDuration$120.flags), + (treeBaseDuration$120.return = completedWork), + (treeBaseDuration$120 = treeBaseDuration$120.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7614,11 +7623,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$135 = null; + var cache$136 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$135 = newProps.memoizedState.cachePool.pool); - cache$135 !== currentResource && (newProps.flags |= 2048); + (cache$136 = newProps.memoizedState.cachePool.pool); + cache$136 !== currentResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -7644,7 +7653,11 @@ function completeWork(current, workInProgress, renderLanes) { ); case 10: return ( - popProvider(workInProgress.type._context), + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), bubbleProperties(workInProgress), null ); @@ -7656,8 +7669,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$135 = currentResource.rendering; - if (null === cache$135) + cache$136 = currentResource.rendering; + if (null === cache$136) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -7665,11 +7678,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$135 = findFirstSuspended(current); - if (null !== cache$135) { + cache$136 = findFirstSuspended(current); + if (null !== cache$136) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = cache$135.updateQueue; + current = cache$136.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -7694,7 +7707,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$135)), null !== current)) { + if (((current = findFirstSuspended(cache$136)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -7704,7 +7717,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !cache$135.alternate && + !cache$136.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -7717,13 +7730,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((cache$135.sibling = workInProgress.child), - (workInProgress.child = cache$135)) + ? ((cache$136.sibling = workInProgress.child), + (workInProgress.child = cache$136)) : ((current = currentResource.last), null !== current - ? (current.sibling = cache$135) - : (workInProgress.child = cache$135), - (currentResource.last = cache$135)); + ? (current.sibling = cache$136) + : (workInProgress.child = cache$136), + (currentResource.last = cache$136)); } if (null !== currentResource.tail) return ( @@ -7863,7 +7876,14 @@ function unwindWork(current, workInProgress) { case 4: return popHostContainer(), null; case 10: - return popProvider(workInProgress.type._context), null; + return ( + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + null + ); case 22: case 23: return ( @@ -7918,7 +7938,11 @@ function unwindInterruptedWork(current, interruptedWork) { pop(suspenseStackCursor); break; case 10: - popProvider(interruptedWork.type._context); + popProvider( + enableRenderableContext + ? interruptedWork.type + : interruptedWork.type._context + ); break; case 22: case 23: @@ -8056,8 +8080,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$152) { - captureCommitPhaseError(current, nearestMountedAncestor, error$152); + } catch (error$153) { + captureCommitPhaseError(current, nearestMountedAncestor, error$153); } else ref.current = null; } @@ -8094,7 +8118,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$219) { + } catch (e$220) { JSCompiler_temp = null; break a; } @@ -8364,11 +8388,11 @@ function commitPassiveEffectDurations(finishedRoot, finishedWork) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id; _finishedWork$memoize = _finishedWork$memoize.onPostCommit; - var commitTime$154 = commitTime, + var commitTime$155 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof _finishedWork$memoize && - _finishedWork$memoize(id, phase, finishedRoot, commitTime$154); + _finishedWork$memoize(id, phase, finishedRoot, commitTime$155); finishedWork = finishedWork.return; a: for (; null !== finishedWork; ) { switch (finishedWork.tag) { @@ -8395,8 +8419,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$156) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$156); + } catch (error$157) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$157); } } function commitClassCallbacks(finishedWork) { @@ -8495,11 +8519,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$157) { + } catch (error$158) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$157 + error$158 ); } else { @@ -8516,11 +8540,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$158) { + } catch (error$159) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$158 + error$159 ); } recordLayoutEffectDuration(finishedWork); @@ -8531,11 +8555,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$159) { + } catch (error$160) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$159 + error$160 ); } } @@ -9241,22 +9265,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$174) { + } catch (error$175) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$174 + error$175 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$175) { + } catch (error$176) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$175 + error$176 ); } } @@ -9429,11 +9453,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$176) { + } catch (error$177) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$176 + error$177 ); } } @@ -9471,8 +9495,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$177) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$177); + } catch (error$178) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$178); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -9483,8 +9507,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$180) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$180); + } catch (error$181) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$181); } } break; @@ -9498,8 +9522,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$181) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$181); + } catch (error$182) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$182); } } break; @@ -9513,8 +9537,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$182) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$182); + } catch (error$183) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$183); } break; case 4: @@ -9544,8 +9568,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$184) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$184); + } catch (error$185) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$185); } current = finishedWork.updateQueue; null !== current && @@ -9623,11 +9647,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$164) { + } catch (error$165) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$164 + error$165 ); } } else if ( @@ -9702,21 +9726,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$165 = JSCompiler_inline_result.stateNode; + var parent$166 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$165, ""), + (setTextContent(parent$166, ""), (JSCompiler_inline_result.flags &= -33)); - var before$166 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$166, parent$165); + var before$167 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$167, parent$166); break; case 3: case 4: - var parent$167 = JSCompiler_inline_result.stateNode.containerInfo, - before$168 = getHostSibling(finishedWork); + var parent$168 = JSCompiler_inline_result.stateNode.containerInfo, + before$169 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$168, - parent$167 + before$169, + parent$168 ); break; default: @@ -9908,8 +9932,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$187) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$187); + } catch (error$188) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$188); } } function commitOffscreenPassiveMountEffects(current, finishedWork, instance) { @@ -10208,9 +10232,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$192 = finishedWork.stateNode; + var instance$193 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$192._visibility & 4 + ? instance$193._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10223,7 +10247,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$192._visibility |= 4), + : ((instance$193._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10231,7 +10255,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$192._visibility |= 4), + : ((instance$193._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10244,7 +10268,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$192 + instance$193 ); break; case 24: @@ -11264,8 +11288,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$200) { - handleThrow(root, thrownValue$200); + } catch (thrownValue$201) { + handleThrow(root, thrownValue$201); } while (1); lanes && root.shellSuspendCounter++; @@ -11381,8 +11405,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$202) { - handleThrow(root, thrownValue$202); + } catch (thrownValue$203) { + handleThrow(root, thrownValue$203); } while (1); resetContextDependencies(); @@ -11635,7 +11659,7 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$206 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$207 = commitBeforeMutationEffects( root, finishedWork ); @@ -11643,7 +11667,7 @@ function commitRootImpl( enableProfilerNestedUpdateScheduledHook && (rootCommittingMutationOrLayoutEffects = root); commitMutationEffects(root, finishedWork, lanes); - shouldFireAfterActiveInstanceBlur$206 && + shouldFireAfterActiveInstanceBlur$207 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -11739,7 +11763,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$207 = rootWithPendingPassiveEffects, + var root$208 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -11755,7 +11779,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$207, remainingLanes); + releaseRootPooledCache(root$208, remainingLanes); } } return !1; @@ -12390,7 +12414,9 @@ beginWork = function (current, workInProgress, renderLanes) { ); case 10: a: { - Component = workInProgress.type._context; + Component = enableRenderableContext + ? workInProgress.type + : workInProgress.type._context; init = workInProgress.pendingProps; prevState = workInProgress.memoizedProps; nextState = init.value; @@ -12412,7 +12438,9 @@ beginWork = function (current, workInProgress, renderLanes) { return workInProgress; case 9: return ( - (init = workInProgress.type), + (init = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), (Component = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), (init = readContext(init)), @@ -12792,11 +12820,18 @@ function createFiberFromTypeAndProps( if ("object" === typeof type && null !== type) switch (type.$$typeof) { case REACT_PROVIDER_TYPE: - fiberTag = 10; - break a; + if (!enableRenderableContext) { + fiberTag = 10; + break a; + } case REACT_CONTEXT_TYPE: - fiberTag = 9; + fiberTag = enableRenderableContext ? 10 : 9; break a; + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + fiberTag = 9; + break a; + } case REACT_FORWARD_REF_TYPE: fiberTag = 11; break a; @@ -13021,12 +13056,12 @@ function updateContainer(element, container, parentComponent, callback) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$210 = fiber.stateNode; - if (root$210.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$210.pendingLanes); + var root$211 = fiber.stateNode; + if (root$211.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$211.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$210, lanes), - ensureRootIsScheduled(root$210), + (upgradePendingLanesToSync(root$211, lanes), + ensureRootIsScheduled(root$211), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now$1() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -14240,19 +14275,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$371; + var JSCompiler_inline_result$jscomp$372; if (canUseDOM) { - var isSupported$jscomp$inline_1641 = "oninput" in document; - if (!isSupported$jscomp$inline_1641) { - var element$jscomp$inline_1642 = document.createElement("div"); - element$jscomp$inline_1642.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1641 = - "function" === typeof element$jscomp$inline_1642.oninput; + var isSupported$jscomp$inline_1642 = "oninput" in document; + if (!isSupported$jscomp$inline_1642) { + var element$jscomp$inline_1643 = document.createElement("div"); + element$jscomp$inline_1643.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1642 = + "function" === typeof element$jscomp$inline_1643.oninput; } - JSCompiler_inline_result$jscomp$371 = isSupported$jscomp$inline_1641; - } else JSCompiler_inline_result$jscomp$371 = !1; + JSCompiler_inline_result$jscomp$372 = isSupported$jscomp$inline_1642; + } else JSCompiler_inline_result$jscomp$372 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$371 && + JSCompiler_inline_result$jscomp$372 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14561,20 +14596,20 @@ function registerSimpleEvent(domEventName, reactName) { registerTwoPhaseEvent(reactName, [domEventName]); } for ( - var i$jscomp$inline_1682 = 0; - i$jscomp$inline_1682 < simpleEventPluginEvents.length; - i$jscomp$inline_1682++ + var i$jscomp$inline_1683 = 0; + i$jscomp$inline_1683 < simpleEventPluginEvents.length; + i$jscomp$inline_1683++ ) { - var eventName$jscomp$inline_1683 = - simpleEventPluginEvents[i$jscomp$inline_1682], - domEventName$jscomp$inline_1684 = - eventName$jscomp$inline_1683.toLowerCase(), - capitalizedEvent$jscomp$inline_1685 = - eventName$jscomp$inline_1683[0].toUpperCase() + - eventName$jscomp$inline_1683.slice(1); + var eventName$jscomp$inline_1684 = + simpleEventPluginEvents[i$jscomp$inline_1683], + domEventName$jscomp$inline_1685 = + eventName$jscomp$inline_1684.toLowerCase(), + capitalizedEvent$jscomp$inline_1686 = + eventName$jscomp$inline_1684[0].toUpperCase() + + eventName$jscomp$inline_1684.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1684, - "on" + capitalizedEvent$jscomp$inline_1685 + domEventName$jscomp$inline_1685, + "on" + capitalizedEvent$jscomp$inline_1686 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -16047,14 +16082,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$246 in nextProps) { - var propKey = nextProps[propKey$246]; - lastProp = lastProps[propKey$246]; + for (var propKey$247 in nextProps) { + var propKey = nextProps[propKey$247]; + lastProp = lastProps[propKey$247]; if ( - nextProps.hasOwnProperty(propKey$246) && + nextProps.hasOwnProperty(propKey$247) && (null != propKey || null != lastProp) ) - switch (propKey$246) { + switch (propKey$247) { case "type": type = propKey; break; @@ -16083,7 +16118,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$246, + propKey$247, propKey, nextProps, lastProp @@ -16102,7 +16137,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$246 = null; + propKey = value = defaultValue = propKey$247 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -16133,7 +16168,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$246 = type; + propKey$247 = type; break; case "defaultValue": defaultValue = type; @@ -16154,15 +16189,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$246 - ? updateOptions(domElement, !!lastProps, propKey$246, !1) + null != propKey$247 + ? updateOptions(domElement, !!lastProps, propKey$247, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$246 = null; + propKey = propKey$247 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -16186,7 +16221,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$246 = name; + propKey$247 = name; break; case "defaultValue": propKey = name; @@ -16200,17 +16235,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$246, propKey); + updateTextarea(domElement, propKey$247, propKey); return; case "option": - for (var propKey$262 in lastProps) + for (var propKey$263 in lastProps) if ( - ((propKey$246 = lastProps[propKey$262]), - lastProps.hasOwnProperty(propKey$262) && - null != propKey$246 && - !nextProps.hasOwnProperty(propKey$262)) + ((propKey$247 = lastProps[propKey$263]), + lastProps.hasOwnProperty(propKey$263) && + null != propKey$247 && + !nextProps.hasOwnProperty(propKey$263)) ) - switch (propKey$262) { + switch (propKey$263) { case "selected": domElement.selected = !1; break; @@ -16218,33 +16253,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$262, + propKey$263, null, nextProps, - propKey$246 + propKey$247 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$246 = nextProps[lastDefaultValue]), + ((propKey$247 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$246 !== propKey && - (null != propKey$246 || null != propKey)) + propKey$247 !== propKey && + (null != propKey$247 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$246 && - "function" !== typeof propKey$246 && - "symbol" !== typeof propKey$246; + propKey$247 && + "function" !== typeof propKey$247 && + "symbol" !== typeof propKey$247; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$246, + propKey$247, nextProps, propKey ); @@ -16265,24 +16300,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$267 in lastProps) - (propKey$246 = lastProps[propKey$267]), - lastProps.hasOwnProperty(propKey$267) && - null != propKey$246 && - !nextProps.hasOwnProperty(propKey$267) && - setProp(domElement, tag, propKey$267, null, nextProps, propKey$246); + for (var propKey$268 in lastProps) + (propKey$247 = lastProps[propKey$268]), + lastProps.hasOwnProperty(propKey$268) && + null != propKey$247 && + !nextProps.hasOwnProperty(propKey$268) && + setProp(domElement, tag, propKey$268, null, nextProps, propKey$247); for (checked in nextProps) if ( - ((propKey$246 = nextProps[checked]), + ((propKey$247 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$246 !== propKey && - (null != propKey$246 || null != propKey)) + propKey$247 !== propKey && + (null != propKey$247 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$246) + if (null != propKey$247) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -16290,7 +16325,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$246, + propKey$247, nextProps, propKey ); @@ -16298,49 +16333,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$272 in lastProps) - (propKey$246 = lastProps[propKey$272]), - lastProps.hasOwnProperty(propKey$272) && - null != propKey$246 && - !nextProps.hasOwnProperty(propKey$272) && + for (var propKey$273 in lastProps) + (propKey$247 = lastProps[propKey$273]), + lastProps.hasOwnProperty(propKey$273) && + null != propKey$247 && + !nextProps.hasOwnProperty(propKey$273) && setPropOnCustomElement( domElement, tag, - propKey$272, + propKey$273, null, nextProps, - propKey$246 + propKey$247 ); for (defaultChecked in nextProps) - (propKey$246 = nextProps[defaultChecked]), + (propKey$247 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$246 === propKey || - (null == propKey$246 && null == propKey) || + propKey$247 === propKey || + (null == propKey$247 && null == propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$246, + propKey$247, nextProps, propKey ); return; } } - for (var propKey$277 in lastProps) - (propKey$246 = lastProps[propKey$277]), - lastProps.hasOwnProperty(propKey$277) && - null != propKey$246 && - !nextProps.hasOwnProperty(propKey$277) && - setProp(domElement, tag, propKey$277, null, nextProps, propKey$246); + for (var propKey$278 in lastProps) + (propKey$247 = lastProps[propKey$278]), + lastProps.hasOwnProperty(propKey$278) && + null != propKey$247 && + !nextProps.hasOwnProperty(propKey$278) && + setProp(domElement, tag, propKey$278, null, nextProps, propKey$247); for (lastProp in nextProps) - (propKey$246 = nextProps[lastProp]), + (propKey$247 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$246 === propKey || - (null == propKey$246 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$246, nextProps, propKey); + propKey$247 === propKey || + (null == propKey$247 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$247, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16968,17 +17003,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$285 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$286 = styles$285.get(type); - resource$286 || + var styles$286 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$287 = styles$286.get(type); + resource$287 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$286 = { + (resource$287 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$285.set(type, resource$286), + styles$286.set(type, resource$287), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16993,9 +17028,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$286.state + resource$287.state )); - return resource$286; + return resource$287; } return null; case "script": @@ -17078,37 +17113,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$290 = hoistableRoot.querySelector( + var instance$291 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$290) + if (instance$291) return ( (resource.state.loading |= 4), - (resource.instance = instance$290), - markNodeAsHoistable(instance$290), - instance$290 + (resource.instance = instance$291), + markNodeAsHoistable(instance$291), + instance$291 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$290 = ( + instance$291 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$290); - var linkInstance = instance$290; + markNodeAsHoistable(instance$291); + var linkInstance = instance$291; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$290, "link", instance); + setInitialProperties(instance$291, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$290, props.precedence, hoistableRoot); - return (resource.instance = instance$290); + insertStylesheet(instance$291, props.precedence, hoistableRoot); + return (resource.instance = instance$291); case "script": - instance$290 = getScriptKey(props.src); + instance$291 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$290) + getScriptSelectorFromKey(instance$291) )) ) return ( @@ -17117,7 +17152,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$290))) + if ((styleProps = preloadPropsMap.get(instance$291))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17487,10 +17522,10 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates$1 ]; -var devToolsConfig$jscomp$inline_1868 = { +var devToolsConfig$jscomp$inline_1869 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-95a0d372", + version: "18.3.0-www-modern-6bdcbf17", rendererPackageName: "react-dom" }; (function (internals) { @@ -17508,10 +17543,10 @@ var devToolsConfig$jscomp$inline_1868 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1868.bundleType, - version: devToolsConfig$jscomp$inline_1868.version, - rendererPackageName: devToolsConfig$jscomp$inline_1868.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1868.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1869.bundleType, + version: devToolsConfig$jscomp$inline_1869.version, + rendererPackageName: devToolsConfig$jscomp$inline_1869.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1869.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17528,14 +17563,14 @@ var devToolsConfig$jscomp$inline_1868 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1868.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1869.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-modern-95a0d372" + reconcilerVersion: "18.3.0-www-modern-6bdcbf17" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; exports.createPortal = function (children, container) { @@ -17800,7 +17835,7 @@ exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); throw Error(formatProdErrorMessage(248)); }; -exports.version = "18.3.0-www-modern-95a0d372"; +exports.version = "18.3.0-www-modern-6bdcbf17"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index 5108189e8b..b1255c882f 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); - var ReactVersion = "18.3.0-www-classic-89e5fda0"; + var ReactVersion = "18.3.0-www-classic-cded7f68"; // This refers to a WWW module. var warningWWW = require("warning"); @@ -82,6 +82,17 @@ if (__DEV__) { } } + // Re-export dynamic flags from the www version. + var dynamicFeatureFlags = require("ReactFeatureFlags"); + + var enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, + enableAsyncActions = dynamicFeatureFlags.enableAsyncActions, + enableFormActions = dynamicFeatureFlags.enableFormActions, + enableUseDeferredValueInitialArg = + dynamicFeatureFlags.enableUseDeferredValueInitialArg, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, false is used for a new modern build. + var enableFloat = true; + // A pure JS implementation of a string hashing function. We do not use it for // security or obfuscation purposes, only to create compact hashes. So we // prioritize speed over collision avoidance. For example, we use this to hash @@ -342,17 +353,6 @@ if (__DEV__) { } } - // Re-export dynamic flags from the www version. - var dynamicFeatureFlags = require("ReactFeatureFlags"); - - var enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, - enableAsyncActions = dynamicFeatureFlags.enableAsyncActions, - enableFormActions = dynamicFeatureFlags.enableFormActions, - enableUseDeferredValueInitialArg = - dynamicFeatureFlags.enableUseDeferredValueInitialArg; - // On WWW, false is used for a new modern build. - var enableFloat = true; - // $FlowFixMe[method-unbinding] var hasOwnProperty = Object.prototype.hasOwnProperty; @@ -8161,7 +8161,9 @@ if (__DEV__) { var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext + + var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"); var REACT_CONTEXT_TYPE = Symbol.for("react.context"); var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); @@ -8273,13 +8275,30 @@ if (__DEV__) { } switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } + case REACT_CONTEXT_TYPE: var context = type; - return getContextName(context) + ".Consumer"; - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + ".Provider"; + if (enableRenderableContext) { + return getContextName(context) + ".Provider"; + } else { + return getContextName(context) + ".Consumer"; + } + + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef"); @@ -9345,8 +9364,7 @@ if (__DEV__) { var isValid = // Allow null for conditional declaration contextType === null || (contextType !== undefined && - contextType.$$typeof === REACT_CONTEXT_TYPE && - contextType._context === undefined); // Not a + contextType.$$typeof === REACT_CONTEXT_TYPE); if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) { didWarnAboutInvalidateContextType.add(ctor); @@ -9360,11 +9378,7 @@ if (__DEV__) { "try moving the createContext() call to a separate file."; } else if (typeof contextType !== "object") { addendum = " However, it is set to a " + typeof contextType + "."; - } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) { - addendum = - " Did you accidentally pass the Context.Provider instead?"; - } else if (contextType._context !== undefined) { - // + } else if (contextType.$$typeof === REACT_CONSUMER_TYPE) { addendum = " Did you accidentally pass the Context.Consumer instead?"; } else { @@ -11798,8 +11812,7 @@ if (__DEV__) { var didWarnAboutReassigningProps = false; var didWarnAboutDefaultPropsOnFunctionComponent = {}; var didWarnAboutGenerators = false; - var didWarnAboutMaps = false; - var hasWarnedAboutUsingContextAsConsumer = false; // This would typically be a function component but we still support module pattern + var didWarnAboutMaps = false; // This would typically be a function component but we still support module pattern // components for some reason. function renderIndeterminateComponent( @@ -12076,33 +12089,6 @@ if (__DEV__) { } function renderContextConsumer(request, task, keyPath, context, props) { - // The logic below for Context differs depending on PROD or DEV mode. In - // DEV mode, we create a separate object for Context.Consumer that acts - // like a proxy to Context. This proxy object adds unnecessary code in PROD - // so we use the old behaviour (Context.Consumer references Context) to - // reduce size and overhead. The separate object references context via - // a property called "_context", which also gives us the ability to check - // in DEV mode if this property exists or not and warn if it does not. - { - if (context._context === undefined) { - // This may be because it's a Context (rather than a Consumer). - // Or it may be because it's older React where they're the same thing. - // We only want to warn if we're sure it's a new React. - if (context !== context.Consumer) { - if (!hasWarnedAboutUsingContextAsConsumer) { - hasWarnedAboutUsingContextAsConsumer = true; - - error( - "Rendering directly is not supported and will be removed in " + - "a future major release. Did you mean to render instead?" - ); - } - } - } else { - context = context._context; - } - } - var render = props.children; { @@ -12124,8 +12110,7 @@ if (__DEV__) { task.keyPath = prevKeyPath; } - function renderContextProvider(request, task, keyPath, type, props) { - var context = type._context; + function renderContextProvider(request, task, keyPath, context, props) { var value = props.value; var children = props.children; var prevSnapshot; @@ -12272,13 +12257,38 @@ if (__DEV__) { } case REACT_PROVIDER_TYPE: { - renderContextProvider(request, task, keyPath, type, props); - return; + if (!enableRenderableContext) { + var context = type._context; + renderContextProvider(request, task, keyPath, context, props); + return; + } // Fall through } case REACT_CONTEXT_TYPE: { - renderContextConsumer(request, task, keyPath, type, props); - return; + if (enableRenderableContext) { + var _context = type; + renderContextProvider(request, task, keyPath, _context, props); + return; + } else { + var _context2 = type; + + { + if (_context2._context !== undefined) { + _context2 = _context2._context; + } + } + + renderContextConsumer(request, task, keyPath, _context2, props); + return; + } + } + + case REACT_CONSUMER_TYPE: { + if (enableRenderableContext) { + var _context3 = type._context; + renderContextConsumer(request, task, keyPath, _context3, props); + return; + } // Fall through } case REACT_LAZY_TYPE: { diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 9dedc0f4cc..1ef2b3aca1 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); - var ReactVersion = "18.3.0-www-modern-e43084bc"; + var ReactVersion = "18.3.0-www-modern-05406ad7"; // This refers to a WWW module. var warningWWW = require("warning"); @@ -82,6 +82,17 @@ if (__DEV__) { } } + // Re-export dynamic flags from the www version. + var dynamicFeatureFlags = require("ReactFeatureFlags"); + + var enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, + enableAsyncActions = dynamicFeatureFlags.enableAsyncActions, + enableFormActions = dynamicFeatureFlags.enableFormActions, + enableUseDeferredValueInitialArg = + dynamicFeatureFlags.enableUseDeferredValueInitialArg, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; // On WWW, true is used for a new modern build. + var enableFloat = true; + // A pure JS implementation of a string hashing function. We do not use it for // security or obfuscation purposes, only to create compact hashes. So we // prioritize speed over collision avoidance. For example, we use this to hash @@ -342,17 +353,6 @@ if (__DEV__) { } } - // Re-export dynamic flags from the www version. - var dynamicFeatureFlags = require("ReactFeatureFlags"); - - var enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, - enableAsyncActions = dynamicFeatureFlags.enableAsyncActions, - enableFormActions = dynamicFeatureFlags.enableFormActions, - enableUseDeferredValueInitialArg = - dynamicFeatureFlags.enableUseDeferredValueInitialArg; - // On WWW, true is used for a new modern build. - var enableFloat = true; - // $FlowFixMe[method-unbinding] var hasOwnProperty = Object.prototype.hasOwnProperty; @@ -8161,7 +8161,9 @@ if (__DEV__) { var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext + + var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"); var REACT_CONTEXT_TYPE = Symbol.for("react.context"); var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); @@ -8273,13 +8275,30 @@ if (__DEV__) { } switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } + case REACT_CONTEXT_TYPE: var context = type; - return getContextName(context) + ".Consumer"; - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + ".Provider"; + if (enableRenderableContext) { + return getContextName(context) + ".Provider"; + } else { + return getContextName(context) + ".Consumer"; + } + + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef"); @@ -9098,8 +9117,7 @@ if (__DEV__) { var isValid = // Allow null for conditional declaration contextType === null || (contextType !== undefined && - contextType.$$typeof === REACT_CONTEXT_TYPE && - contextType._context === undefined); // Not a + contextType.$$typeof === REACT_CONTEXT_TYPE); if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) { didWarnAboutInvalidateContextType.add(ctor); @@ -9113,11 +9131,7 @@ if (__DEV__) { "try moving the createContext() call to a separate file."; } else if (typeof contextType !== "object") { addendum = " However, it is set to a " + typeof contextType + "."; - } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) { - addendum = - " Did you accidentally pass the Context.Provider instead?"; - } else if (contextType._context !== undefined) { - // + } else if (contextType.$$typeof === REACT_CONSUMER_TYPE) { addendum = " Did you accidentally pass the Context.Consumer instead?"; } else { @@ -11525,8 +11539,7 @@ if (__DEV__) { var didWarnAboutReassigningProps = false; var didWarnAboutDefaultPropsOnFunctionComponent = {}; var didWarnAboutGenerators = false; - var didWarnAboutMaps = false; - var hasWarnedAboutUsingContextAsConsumer = false; // This would typically be a function component but we still support module pattern + var didWarnAboutMaps = false; // This would typically be a function component but we still support module pattern // components for some reason. function renderIndeterminateComponent( @@ -11810,33 +11823,6 @@ if (__DEV__) { } function renderContextConsumer(request, task, keyPath, context, props) { - // The logic below for Context differs depending on PROD or DEV mode. In - // DEV mode, we create a separate object for Context.Consumer that acts - // like a proxy to Context. This proxy object adds unnecessary code in PROD - // so we use the old behaviour (Context.Consumer references Context) to - // reduce size and overhead. The separate object references context via - // a property called "_context", which also gives us the ability to check - // in DEV mode if this property exists or not and warn if it does not. - { - if (context._context === undefined) { - // This may be because it's a Context (rather than a Consumer). - // Or it may be because it's older React where they're the same thing. - // We only want to warn if we're sure it's a new React. - if (context !== context.Consumer) { - if (!hasWarnedAboutUsingContextAsConsumer) { - hasWarnedAboutUsingContextAsConsumer = true; - - error( - "Rendering directly is not supported and will be removed in " + - "a future major release. Did you mean to render instead?" - ); - } - } - } else { - context = context._context; - } - } - var render = props.children; { @@ -11858,8 +11844,7 @@ if (__DEV__) { task.keyPath = prevKeyPath; } - function renderContextProvider(request, task, keyPath, type, props) { - var context = type._context; + function renderContextProvider(request, task, keyPath, context, props) { var value = props.value; var children = props.children; var prevSnapshot; @@ -12006,13 +11991,38 @@ if (__DEV__) { } case REACT_PROVIDER_TYPE: { - renderContextProvider(request, task, keyPath, type, props); - return; + if (!enableRenderableContext) { + var context = type._context; + renderContextProvider(request, task, keyPath, context, props); + return; + } // Fall through } case REACT_CONTEXT_TYPE: { - renderContextConsumer(request, task, keyPath, type, props); - return; + if (enableRenderableContext) { + var _context = type; + renderContextProvider(request, task, keyPath, _context, props); + return; + } else { + var _context2 = type; + + { + if (_context2._context !== undefined) { + _context2 = _context2._context; + } + } + + renderContextConsumer(request, task, keyPath, _context2, props); + return; + } + } + + case REACT_CONSUMER_TYPE: { + if (enableRenderableContext) { + var _context3 = type._context; + renderContextConsumer(request, task, keyPath, _context3, props); + return; + } // Fall through } case REACT_LAZY_TYPE: { diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index 34e5173886..44acc66bbf 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -52,6 +52,13 @@ function formatProdErrorMessage(code) { " for the full message or use the non-minified dev environment for full errors and additional helpful warnings." ); } +var dynamicFeatureFlags = require("ReactFeatureFlags"), + enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, + enableAsyncActions = dynamicFeatureFlags.enableAsyncActions, + enableFormActions = dynamicFeatureFlags.enableFormActions, + enableUseDeferredValueInitialArg = + dynamicFeatureFlags.enableUseDeferredValueInitialArg, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext; function murmurhash3_32_gc(key, seed) { var remainder = key.length & 3; var bytes = key.length - remainder; @@ -106,12 +113,6 @@ function murmurhash3_32_gc(key, seed) { return (h1 ^ (h1 >>> 16)) >>> 0; } var assign = Object.assign, - dynamicFeatureFlags = require("ReactFeatureFlags"), - enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, - enableAsyncActions = dynamicFeatureFlags.enableAsyncActions, - enableFormActions = dynamicFeatureFlags.enableFormActions, - enableUseDeferredValueInitialArg = - dynamicFeatureFlags.enableUseDeferredValueInitialArg, hasOwnProperty = Object.prototype.hasOwnProperty, VALID_ATTRIBUTE_NAME_REGEX = RegExp( "^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$" @@ -2569,16 +2570,16 @@ function createRenderState(resumableState, generateStaticMarkup) { "\x3c/script>" ); bootstrapScriptContent = idPrefix + "P:"; - var JSCompiler_object_inline_segmentPrefix_1609 = idPrefix + "S:"; + var JSCompiler_object_inline_segmentPrefix_1594 = idPrefix + "S:"; idPrefix += "B:"; - var JSCompiler_object_inline_preconnects_1623 = new Set(), - JSCompiler_object_inline_fontPreloads_1624 = new Set(), - JSCompiler_object_inline_highImagePreloads_1625 = new Set(), - JSCompiler_object_inline_styles_1626 = new Map(), - JSCompiler_object_inline_bootstrapScripts_1627 = new Set(), - JSCompiler_object_inline_scripts_1628 = new Set(), - JSCompiler_object_inline_bulkPreloads_1629 = new Set(), - JSCompiler_object_inline_preloads_1630 = { + var JSCompiler_object_inline_preconnects_1608 = new Set(), + JSCompiler_object_inline_fontPreloads_1609 = new Set(), + JSCompiler_object_inline_highImagePreloads_1610 = new Set(), + JSCompiler_object_inline_styles_1611 = new Map(), + JSCompiler_object_inline_bootstrapScripts_1612 = new Set(), + JSCompiler_object_inline_scripts_1613 = new Set(), + JSCompiler_object_inline_bulkPreloads_1614 = new Set(), + JSCompiler_object_inline_preloads_1615 = { images: new Map(), stylesheets: new Map(), scripts: new Map(), @@ -2615,7 +2616,7 @@ function createRenderState(resumableState, generateStaticMarkup) { scriptConfig.moduleScriptResources[href] = null; scriptConfig = []; pushLinkImpl(scriptConfig, props); - JSCompiler_object_inline_bootstrapScripts_1627.add(scriptConfig); + JSCompiler_object_inline_bootstrapScripts_1612.add(scriptConfig); bootstrapChunks.push('