From 6d9586c38a13e02c82084d4f63a39d40a5c94511 Mon Sep 17 00:00:00 2001 From: rickhanlonii <2440089+rickhanlonii@users.noreply.github.com> Date: Mon, 24 Feb 2025 07:08:47 -0800 Subject: [PATCH] [flags] remove enableRemoveConsolePatches (#32425) wait to merge until we sync https://github.com/facebook/react/pull/32376, since that enables it in some testing builds that might break DiffTrain build for [25677265038b89c1ee3000e0669339ed160d9d75](https://github.com/facebook/react/commit/25677265038b89c1ee3000e0669339ed160d9d75) --- .../facebook-www/JSXDEVRuntime-dev.classic.js | 66 +- .../facebook-www/JSXDEVRuntime-dev.modern.js | 66 +- compiled/facebook-www/REVISION | 2 +- compiled/facebook-www/REVISION_TRANSFORMS | 2 +- compiled/facebook-www/React-dev.classic.js | 148 +- compiled/facebook-www/React-dev.modern.js | 148 +- compiled/facebook-www/React-prod.classic.js | 2 +- compiled/facebook-www/React-prod.modern.js | 2 +- .../facebook-www/React-profiling.classic.js | 2 +- .../facebook-www/React-profiling.modern.js | 2 +- compiled/facebook-www/ReactART-dev.classic.js | 552 ++++---- compiled/facebook-www/ReactART-dev.modern.js | 546 ++++---- .../facebook-www/ReactART-prod.classic.js | 6 +- compiled/facebook-www/ReactART-prod.modern.js | 6 +- .../facebook-www/ReactCacheOld-dev.classic.js | 30 +- .../facebook-www/ReactCacheOld-dev.modern.js | 30 +- compiled/facebook-www/ReactDOM-dev.classic.js | 1230 ++++++++--------- compiled/facebook-www/ReactDOM-dev.modern.js | 1224 ++++++++-------- .../facebook-www/ReactDOM-prod.classic.js | 10 +- compiled/facebook-www/ReactDOM-prod.modern.js | 10 +- .../ReactDOM-profiling.classic.js | 10 +- .../facebook-www/ReactDOM-profiling.modern.js | 10 +- .../ReactDOMServer-dev.classic.js | 365 +++-- .../facebook-www/ReactDOMServer-dev.modern.js | 359 +++-- .../ReactDOMServer-prod.classic.js | 2 +- .../ReactDOMServer-prod.modern.js | 2 +- .../ReactDOMServerStreaming-dev.modern.js | 357 +++-- .../ReactDOMTesting-dev.classic.js | 1230 ++++++++--------- .../ReactDOMTesting-dev.modern.js | 1224 ++++++++-------- .../ReactDOMTesting-prod.classic.js | 10 +- .../ReactDOMTesting-prod.modern.js | 10 +- .../ReactReconciler-dev.classic.js | 613 ++++---- .../ReactReconciler-dev.modern.js | 607 ++++---- .../ReactReconciler-prod.classic.js | 2 +- .../ReactReconciler-prod.modern.js | 2 +- .../ReactReconcilerConstants-dev.classic.js | 2 - .../ReactReconcilerConstants-dev.modern.js | 2 - .../ReactTestRenderer-dev.classic.js | 584 ++++---- .../ReactTestRenderer-dev.modern.js | 584 ++++---- compiled/facebook-www/VERSION_CLASSIC | 2 +- compiled/facebook-www/VERSION_MODERN | 2 +- 41 files changed, 4453 insertions(+), 5610 deletions(-) diff --git a/compiled/facebook-www/JSXDEVRuntime-dev.classic.js b/compiled/facebook-www/JSXDEVRuntime-dev.classic.js index bd3ad56ceacf9..736c7aa19b235 100644 --- a/compiled/facebook-www/JSXDEVRuntime-dev.classic.js +++ b/compiled/facebook-www/JSXDEVRuntime-dev.classic.js @@ -13,31 +13,6 @@ "use strict"; __DEV__ && (function () { - function error(format) { - for ( - var _len2 = arguments.length, - args = Array(1 < _len2 ? _len2 - 1 : 0), - _key2 = 1; - _key2 < _len2; - _key2++ - ) - args[_key2 - 1] = arguments[_key2]; - if (enableRemoveConsolePatches) { - var _console2; - (_console2 = console).error.apply(_console2, [format].concat(args)); - } else - (_len2 = format), - enableRemoveConsolePatches || - ((_key2 = - require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE), - null != _key2 && - _key2.getCurrentStack && - ((_key2 = _key2.getCurrentStack()), - "" !== _key2 && ((_len2 += "%s"), args.push(_key2))), - args.unshift(_len2), - args.unshift(!1), - warningWWW.apply(null, args)); - } function getComponentNameFromType(type) { if (null == type) return null; if ("function" === typeof type) @@ -66,7 +41,7 @@ __DEV__ && if ("object" === typeof type) switch ( ("number" === typeof type.tag && - error( + console.error( "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." ), type.$$typeof) @@ -115,20 +90,22 @@ __DEV__ && } catch (e) { JSCompiler_inline_result = !0; } - if (JSCompiler_inline_result) - return ( - (JSCompiler_inline_result = - ("function" === typeof Symbol && - Symbol.toStringTag && - value[Symbol.toStringTag]) || - value.constructor.name || - "Object"), - error( - "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", - JSCompiler_inline_result - ), - testStringCoercion(value) + if (JSCompiler_inline_result) { + JSCompiler_inline_result = console; + var JSCompiler_temp_const = JSCompiler_inline_result.error; + var JSCompiler_inline_result$jscomp$0 = + ("function" === typeof Symbol && + Symbol.toStringTag && + value[Symbol.toStringTag]) || + value.constructor.name || + "Object"; + JSCompiler_temp_const.call( + JSCompiler_inline_result, + "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", + JSCompiler_inline_result$jscomp$0 ); + return testStringCoercion(value); + } } function getTaskName(type) { if (type === REACT_FRAGMENT_TYPE) return "<>"; @@ -160,7 +137,7 @@ __DEV__ && function warnAboutAccessingKey() { specialPropKeyWarningShown || ((specialPropKeyWarningShown = !0), - error( + console.error( "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName )); @@ -175,7 +152,7 @@ __DEV__ && var componentName = getComponentNameFromType(this.type); didWarnAboutElementRef[componentName] || ((didWarnAboutElementRef[componentName] = !0), - error( + console.error( "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release." )); componentName = this.props.ref; @@ -255,7 +232,7 @@ __DEV__ && validateChildKeys(children[isStaticChildren]); Object.freeze && Object.freeze(children); } else - error( + console.error( "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead." ); else validateChildKeys(children); @@ -271,7 +248,7 @@ __DEV__ && didWarnAboutKeySpread[children + isStaticChildren] || ((keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"), - error( + console.error( 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', isStaticChildren, children, @@ -347,9 +324,6 @@ __DEV__ && REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_TRACING_MARKER_TYPE = Symbol.for("react.tracing_marker"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), - enableRemoveConsolePatches = - require("ReactFeatureFlags").enableRemoveConsolePatches, - warningWWW = require("warning"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, diff --git a/compiled/facebook-www/JSXDEVRuntime-dev.modern.js b/compiled/facebook-www/JSXDEVRuntime-dev.modern.js index bd3ad56ceacf9..736c7aa19b235 100644 --- a/compiled/facebook-www/JSXDEVRuntime-dev.modern.js +++ b/compiled/facebook-www/JSXDEVRuntime-dev.modern.js @@ -13,31 +13,6 @@ "use strict"; __DEV__ && (function () { - function error(format) { - for ( - var _len2 = arguments.length, - args = Array(1 < _len2 ? _len2 - 1 : 0), - _key2 = 1; - _key2 < _len2; - _key2++ - ) - args[_key2 - 1] = arguments[_key2]; - if (enableRemoveConsolePatches) { - var _console2; - (_console2 = console).error.apply(_console2, [format].concat(args)); - } else - (_len2 = format), - enableRemoveConsolePatches || - ((_key2 = - require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE), - null != _key2 && - _key2.getCurrentStack && - ((_key2 = _key2.getCurrentStack()), - "" !== _key2 && ((_len2 += "%s"), args.push(_key2))), - args.unshift(_len2), - args.unshift(!1), - warningWWW.apply(null, args)); - } function getComponentNameFromType(type) { if (null == type) return null; if ("function" === typeof type) @@ -66,7 +41,7 @@ __DEV__ && if ("object" === typeof type) switch ( ("number" === typeof type.tag && - error( + console.error( "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." ), type.$$typeof) @@ -115,20 +90,22 @@ __DEV__ && } catch (e) { JSCompiler_inline_result = !0; } - if (JSCompiler_inline_result) - return ( - (JSCompiler_inline_result = - ("function" === typeof Symbol && - Symbol.toStringTag && - value[Symbol.toStringTag]) || - value.constructor.name || - "Object"), - error( - "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", - JSCompiler_inline_result - ), - testStringCoercion(value) + if (JSCompiler_inline_result) { + JSCompiler_inline_result = console; + var JSCompiler_temp_const = JSCompiler_inline_result.error; + var JSCompiler_inline_result$jscomp$0 = + ("function" === typeof Symbol && + Symbol.toStringTag && + value[Symbol.toStringTag]) || + value.constructor.name || + "Object"; + JSCompiler_temp_const.call( + JSCompiler_inline_result, + "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", + JSCompiler_inline_result$jscomp$0 ); + return testStringCoercion(value); + } } function getTaskName(type) { if (type === REACT_FRAGMENT_TYPE) return "<>"; @@ -160,7 +137,7 @@ __DEV__ && function warnAboutAccessingKey() { specialPropKeyWarningShown || ((specialPropKeyWarningShown = !0), - error( + console.error( "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName )); @@ -175,7 +152,7 @@ __DEV__ && var componentName = getComponentNameFromType(this.type); didWarnAboutElementRef[componentName] || ((didWarnAboutElementRef[componentName] = !0), - error( + console.error( "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release." )); componentName = this.props.ref; @@ -255,7 +232,7 @@ __DEV__ && validateChildKeys(children[isStaticChildren]); Object.freeze && Object.freeze(children); } else - error( + console.error( "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead." ); else validateChildKeys(children); @@ -271,7 +248,7 @@ __DEV__ && didWarnAboutKeySpread[children + isStaticChildren] || ((keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"), - error( + console.error( 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', isStaticChildren, children, @@ -347,9 +324,6 @@ __DEV__ && REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_TRACING_MARKER_TYPE = Symbol.for("react.tracing_marker"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), - enableRemoveConsolePatches = - require("ReactFeatureFlags").enableRemoveConsolePatches, - warningWWW = require("warning"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 822706095a912..0c844215d5786 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -9b042f9d593f965d8c7a42f8f5fce322f403381b +25677265038b89c1ee3000e0669339ed160d9d75 diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index 822706095a912..0c844215d5786 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -9b042f9d593f965d8c7a42f8f5fce322f403381b +25677265038b89c1ee3000e0669339ed160d9d75 diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 9b724162a4fc1..3fd80ea628cae 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -16,7 +16,7 @@ __DEV__ && function defineDeprecationWarning(methodName, info) { Object.defineProperty(Component.prototype, methodName, { get: function () { - warn( + console.warn( "%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1] @@ -32,46 +32,6 @@ __DEV__ && maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function warn(format) { - for ( - var _len = arguments.length, - args = Array(1 < _len ? _len - 1 : 0), - _key = 1; - _key < _len; - _key++ - ) - args[_key - 1] = arguments[_key]; - if (enableRemoveConsolePatches) { - var _console; - (_console = console).warn.apply(_console, [format].concat(args)); - } else printWarning("warn", format, args); - } - function error$jscomp$0(format) { - for ( - var _len2 = arguments.length, - args = Array(1 < _len2 ? _len2 - 1 : 0), - _key2 = 1; - _key2 < _len2; - _key2++ - ) - args[_key2 - 1] = arguments[_key2]; - if (enableRemoveConsolePatches) { - var _console2; - (_console2 = console).error.apply(_console2, [format].concat(args)); - } else printWarning("error", format, args); - } - function printWarning(level, format, args) { - enableRemoveConsolePatches || - ((level = - require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE), - null != level && - level.getCurrentStack && - ((level = level.getCurrentStack()), - "" !== level && ((format += "%s"), args.push(level))), - args.unshift(format), - args.unshift(!1), - warningWWW.apply(null, args)); - } function warnNoop(publicInstance, callerName) { publicInstance = ((publicInstance = publicInstance.constructor) && @@ -79,7 +39,7 @@ __DEV__ && "ReactClass"; var warningKey = publicInstance + "." + callerName; didWarnStateUpdateForUnmountedComponent[warningKey] || - (error$jscomp$0( + (console.error( "Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, publicInstance @@ -109,20 +69,22 @@ __DEV__ && } catch (e) { JSCompiler_inline_result = !0; } - if (JSCompiler_inline_result) - return ( - (JSCompiler_inline_result = - ("function" === typeof Symbol && - Symbol.toStringTag && - value[Symbol.toStringTag]) || - value.constructor.name || - "Object"), - error$jscomp$0( - "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", - JSCompiler_inline_result - ), - testStringCoercion(value) + if (JSCompiler_inline_result) { + JSCompiler_inline_result = console; + var JSCompiler_temp_const = JSCompiler_inline_result.error; + var JSCompiler_inline_result$jscomp$0 = + ("function" === typeof Symbol && + Symbol.toStringTag && + value[Symbol.toStringTag]) || + value.constructor.name || + "Object"; + JSCompiler_temp_const.call( + JSCompiler_inline_result, + "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", + JSCompiler_inline_result$jscomp$0 ); + return testStringCoercion(value); + } } function getComponentNameFromType(type) { if (null == type) return null; @@ -152,7 +114,7 @@ __DEV__ && if ("object" === typeof type) switch ( ("number" === typeof type.tag && - error$jscomp$0( + console.error( "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." ), type.$$typeof) @@ -221,7 +183,7 @@ __DEV__ && function warnAboutAccessingKey() { specialPropKeyWarningShown || ((specialPropKeyWarningShown = !0), - error$jscomp$0( + console.error( "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName )); @@ -236,7 +198,7 @@ __DEV__ && var componentName = getComponentNameFromType(this.type); didWarnAboutElementRef[componentName] || ((didWarnAboutElementRef[componentName] = !0), - error$jscomp$0( + console.error( "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release." )); componentName = this.props.ref; @@ -316,7 +278,7 @@ __DEV__ && validateChildKeys(children[isStaticChildren]); Object.freeze && Object.freeze(children); } else - error$jscomp$0( + console.error( "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead." ); else validateChildKeys(children); @@ -332,7 +294,7 @@ __DEV__ && didWarnAboutKeySpread[children + isStaticChildren] || ((keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"), - error$jscomp$0( + console.error( 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', isStaticChildren, children, @@ -539,7 +501,7 @@ __DEV__ && for ( i === children.entries && (didWarnAboutMaps || - warn( + console.warn( "Using Maps as children is not supported. Use an array of keyed ReactElements instead." ), (didWarnAboutMaps = !0)), @@ -607,12 +569,12 @@ __DEV__ && return ( (ctor = payload._result), void 0 === ctor && - error$jscomp$0( + console.error( "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", ctor ), "default" in ctor || - error$jscomp$0( + console.error( "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", ctor ), @@ -623,7 +585,7 @@ __DEV__ && function resolveDispatcher() { var dispatcher = ReactSharedInternals.H; null === dispatcher && - error$jscomp$0( + console.error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem." ); return dispatcher; @@ -645,7 +607,7 @@ __DEV__ && !1 === didWarnAboutMessageChannel && ((didWarnAboutMessageChannel = !0), "undefined" === typeof MessageChannel && - error$jscomp$0( + console.error( "This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning." )); var channel = new MessageChannel(); @@ -662,7 +624,7 @@ __DEV__ && } function popActScope(prevActQueue, prevActScopeDepth) { prevActScopeDepth !== actScopeDepth - 1 && - error$jscomp$0( + console.error( "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. " ); actScopeDepth = prevActScopeDepth; @@ -677,8 +639,8 @@ __DEV__ && return recursivelyFlushAsyncActWork(returnValue, resolve, reject); }); return; - } catch (error$3) { - ReactSharedInternals.thrownErrors.push(error$3); + } catch (error) { + ReactSharedInternals.thrownErrors.push(error); } else ReactSharedInternals.actQueue = null; 0 < ReactSharedInternals.thrownErrors.length @@ -708,9 +670,8 @@ __DEV__ && } while (1); } queue.length = 0; - } catch (error$4) { - queue.splice(0, i + 1), - ReactSharedInternals.thrownErrors.push(error$4); + } catch (error) { + queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error); } finally { isFlushing = !1; } @@ -751,9 +712,6 @@ __DEV__ && REACT_TRACING_MARKER_TYPE = Symbol.for("react.tracing_marker"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, - enableRemoveConsolePatches = - require("ReactFeatureFlags").enableRemoveConsolePatches, - warningWWW = require("warning"), didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = { isMounted: function () { @@ -934,8 +892,8 @@ __DEV__ && didAwaitActCall = !1; try { var result = callback(); - } catch (error$1) { - ReactSharedInternals.thrownErrors.push(error$1); + } catch (error) { + ReactSharedInternals.thrownErrors.push(error); } if (0 < ReactSharedInternals.thrownErrors.length) throw ( @@ -954,7 +912,7 @@ __DEV__ && didAwaitActCall || didWarnNoAwaitAct || ((didWarnNoAwaitAct = !0), - error$jscomp$0( + console.error( "You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);" )); }); @@ -974,8 +932,8 @@ __DEV__ && reject ); }); - } catch (error$2) { - ReactSharedInternals.thrownErrors.push(error$2); + } catch (error$0) { + ReactSharedInternals.thrownErrors.push(error$0); } if (0 < ReactSharedInternals.thrownErrors.length) { var _thrownError = aggregateErrors( @@ -1009,7 +967,7 @@ __DEV__ && didAwaitActCall || didWarnNoAwaitAct || ((didWarnNoAwaitAct = !0), - error$jscomp$0( + console.error( "A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)" )); }), @@ -1198,7 +1156,7 @@ __DEV__ && !("__self" in config) || "key" in config || ((didWarnAboutOldJSXRuntime = !0), - warn( + console.warn( "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform" )), hasValidKey(config) && @@ -1252,17 +1210,17 @@ __DEV__ && }; exports.forwardRef = function (render) { null != render && render.$$typeof === REACT_MEMO_TYPE - ? error$jscomp$0( + ? console.error( "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))." ) : "function" !== typeof render - ? error$jscomp$0( + ? console.error( "forwardRef requires a render function but was given %s.", null === render ? "null" : typeof render ) : 0 !== render.length && 2 !== render.length && - error$jscomp$0( + console.error( "forwardRef render functions accept exactly two parameters: props and ref. %s", 1 === render.length ? "Did you forget to use the ref parameter?" @@ -1270,7 +1228,7 @@ __DEV__ && ); null != render && null != render.defaultProps && - error$jscomp$0( + console.error( "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?" ); var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render }, @@ -1350,7 +1308,7 @@ __DEV__ && return defaultProps; }, set: function (newDefaultProps) { - error$jscomp$0( + console.error( "It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it." ); defaultProps = newDefaultProps; @@ -1388,7 +1346,7 @@ __DEV__ && type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type.getModuleId)) || - error$jscomp$0( + console.error( "memo: The first argument must be a component. Instead received: %s", null === type ? "null" : typeof type ); @@ -1433,15 +1391,15 @@ __DEV__ && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError); - } catch (error$0) { - reportGlobalError(error$0); + } catch (error) { + reportGlobalError(error); } finally { null === prevTransition && currentTransition._updatedFibers && ((scope = currentTransition._updatedFibers.size), currentTransition._updatedFibers.clear(), 10 < scope && - warn( + console.warn( "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table." )), (ReactSharedInternals.T = prevTransition); @@ -1486,7 +1444,7 @@ __DEV__ && exports.useContext = function (Context) { var dispatcher = resolveDispatcher(); Context.$$typeof === REACT_CONSUMER_TYPE && - error$jscomp$0( + console.error( "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?" ); return dispatcher.useContext(Context); @@ -1505,7 +1463,7 @@ __DEV__ && destroy ) { null == create && - warn( + console.warn( "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?" ); var dispatcher = resolveDispatcher(); @@ -1534,14 +1492,14 @@ __DEV__ && }; exports.useInsertionEffect = function (create, deps) { null == create && - warn( + console.warn( "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?" ); return resolveDispatcher().useInsertionEffect(create, deps); }; exports.useLayoutEffect = function (create, deps) { null == create && - warn( + console.warn( "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?" ); return resolveDispatcher().useLayoutEffect(create, deps); @@ -1575,7 +1533,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.1.0-www-classic-9b042f9d-20250221"; + exports.version = "19.1.0-www-classic-25677265-20250224"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index c583d2e017dc6..61552e3e0961c 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -16,7 +16,7 @@ __DEV__ && function defineDeprecationWarning(methodName, info) { Object.defineProperty(Component.prototype, methodName, { get: function () { - warn( + console.warn( "%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1] @@ -32,46 +32,6 @@ __DEV__ && maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function warn(format) { - for ( - var _len = arguments.length, - args = Array(1 < _len ? _len - 1 : 0), - _key = 1; - _key < _len; - _key++ - ) - args[_key - 1] = arguments[_key]; - if (enableRemoveConsolePatches) { - var _console; - (_console = console).warn.apply(_console, [format].concat(args)); - } else printWarning("warn", format, args); - } - function error$jscomp$0(format) { - for ( - var _len2 = arguments.length, - args = Array(1 < _len2 ? _len2 - 1 : 0), - _key2 = 1; - _key2 < _len2; - _key2++ - ) - args[_key2 - 1] = arguments[_key2]; - if (enableRemoveConsolePatches) { - var _console2; - (_console2 = console).error.apply(_console2, [format].concat(args)); - } else printWarning("error", format, args); - } - function printWarning(level, format, args) { - enableRemoveConsolePatches || - ((level = - require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE), - null != level && - level.getCurrentStack && - ((level = level.getCurrentStack()), - "" !== level && ((format += "%s"), args.push(level))), - args.unshift(format), - args.unshift(!1), - warningWWW.apply(null, args)); - } function warnNoop(publicInstance, callerName) { publicInstance = ((publicInstance = publicInstance.constructor) && @@ -79,7 +39,7 @@ __DEV__ && "ReactClass"; var warningKey = publicInstance + "." + callerName; didWarnStateUpdateForUnmountedComponent[warningKey] || - (error$jscomp$0( + (console.error( "Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, publicInstance @@ -109,20 +69,22 @@ __DEV__ && } catch (e) { JSCompiler_inline_result = !0; } - if (JSCompiler_inline_result) - return ( - (JSCompiler_inline_result = - ("function" === typeof Symbol && - Symbol.toStringTag && - value[Symbol.toStringTag]) || - value.constructor.name || - "Object"), - error$jscomp$0( - "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", - JSCompiler_inline_result - ), - testStringCoercion(value) + if (JSCompiler_inline_result) { + JSCompiler_inline_result = console; + var JSCompiler_temp_const = JSCompiler_inline_result.error; + var JSCompiler_inline_result$jscomp$0 = + ("function" === typeof Symbol && + Symbol.toStringTag && + value[Symbol.toStringTag]) || + value.constructor.name || + "Object"; + JSCompiler_temp_const.call( + JSCompiler_inline_result, + "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", + JSCompiler_inline_result$jscomp$0 ); + return testStringCoercion(value); + } } function getComponentNameFromType(type) { if (null == type) return null; @@ -152,7 +114,7 @@ __DEV__ && if ("object" === typeof type) switch ( ("number" === typeof type.tag && - error$jscomp$0( + console.error( "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." ), type.$$typeof) @@ -221,7 +183,7 @@ __DEV__ && function warnAboutAccessingKey() { specialPropKeyWarningShown || ((specialPropKeyWarningShown = !0), - error$jscomp$0( + console.error( "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName )); @@ -236,7 +198,7 @@ __DEV__ && var componentName = getComponentNameFromType(this.type); didWarnAboutElementRef[componentName] || ((didWarnAboutElementRef[componentName] = !0), - error$jscomp$0( + console.error( "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release." )); componentName = this.props.ref; @@ -316,7 +278,7 @@ __DEV__ && validateChildKeys(children[isStaticChildren]); Object.freeze && Object.freeze(children); } else - error$jscomp$0( + console.error( "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead." ); else validateChildKeys(children); @@ -332,7 +294,7 @@ __DEV__ && didWarnAboutKeySpread[children + isStaticChildren] || ((keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"), - error$jscomp$0( + console.error( 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', isStaticChildren, children, @@ -539,7 +501,7 @@ __DEV__ && for ( i === children.entries && (didWarnAboutMaps || - warn( + console.warn( "Using Maps as children is not supported. Use an array of keyed ReactElements instead." ), (didWarnAboutMaps = !0)), @@ -607,12 +569,12 @@ __DEV__ && return ( (ctor = payload._result), void 0 === ctor && - error$jscomp$0( + console.error( "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", ctor ), "default" in ctor || - error$jscomp$0( + console.error( "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", ctor ), @@ -623,7 +585,7 @@ __DEV__ && function resolveDispatcher() { var dispatcher = ReactSharedInternals.H; null === dispatcher && - error$jscomp$0( + console.error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem." ); return dispatcher; @@ -645,7 +607,7 @@ __DEV__ && !1 === didWarnAboutMessageChannel && ((didWarnAboutMessageChannel = !0), "undefined" === typeof MessageChannel && - error$jscomp$0( + console.error( "This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning." )); var channel = new MessageChannel(); @@ -662,7 +624,7 @@ __DEV__ && } function popActScope(prevActQueue, prevActScopeDepth) { prevActScopeDepth !== actScopeDepth - 1 && - error$jscomp$0( + console.error( "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. " ); actScopeDepth = prevActScopeDepth; @@ -677,8 +639,8 @@ __DEV__ && return recursivelyFlushAsyncActWork(returnValue, resolve, reject); }); return; - } catch (error$3) { - ReactSharedInternals.thrownErrors.push(error$3); + } catch (error) { + ReactSharedInternals.thrownErrors.push(error); } else ReactSharedInternals.actQueue = null; 0 < ReactSharedInternals.thrownErrors.length @@ -708,9 +670,8 @@ __DEV__ && } while (1); } queue.length = 0; - } catch (error$4) { - queue.splice(0, i + 1), - ReactSharedInternals.thrownErrors.push(error$4); + } catch (error) { + queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error); } finally { isFlushing = !1; } @@ -751,9 +712,6 @@ __DEV__ && REACT_TRACING_MARKER_TYPE = Symbol.for("react.tracing_marker"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, - enableRemoveConsolePatches = - require("ReactFeatureFlags").enableRemoveConsolePatches, - warningWWW = require("warning"), didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = { isMounted: function () { @@ -934,8 +892,8 @@ __DEV__ && didAwaitActCall = !1; try { var result = callback(); - } catch (error$1) { - ReactSharedInternals.thrownErrors.push(error$1); + } catch (error) { + ReactSharedInternals.thrownErrors.push(error); } if (0 < ReactSharedInternals.thrownErrors.length) throw ( @@ -954,7 +912,7 @@ __DEV__ && didAwaitActCall || didWarnNoAwaitAct || ((didWarnNoAwaitAct = !0), - error$jscomp$0( + console.error( "You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);" )); }); @@ -974,8 +932,8 @@ __DEV__ && reject ); }); - } catch (error$2) { - ReactSharedInternals.thrownErrors.push(error$2); + } catch (error$0) { + ReactSharedInternals.thrownErrors.push(error$0); } if (0 < ReactSharedInternals.thrownErrors.length) { var _thrownError = aggregateErrors( @@ -1009,7 +967,7 @@ __DEV__ && didAwaitActCall || didWarnNoAwaitAct || ((didWarnNoAwaitAct = !0), - error$jscomp$0( + console.error( "A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)" )); }), @@ -1198,7 +1156,7 @@ __DEV__ && !("__self" in config) || "key" in config || ((didWarnAboutOldJSXRuntime = !0), - warn( + console.warn( "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform" )), hasValidKey(config) && @@ -1252,17 +1210,17 @@ __DEV__ && }; exports.forwardRef = function (render) { null != render && render.$$typeof === REACT_MEMO_TYPE - ? error$jscomp$0( + ? console.error( "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))." ) : "function" !== typeof render - ? error$jscomp$0( + ? console.error( "forwardRef requires a render function but was given %s.", null === render ? "null" : typeof render ) : 0 !== render.length && 2 !== render.length && - error$jscomp$0( + console.error( "forwardRef render functions accept exactly two parameters: props and ref. %s", 1 === render.length ? "Did you forget to use the ref parameter?" @@ -1270,7 +1228,7 @@ __DEV__ && ); null != render && null != render.defaultProps && - error$jscomp$0( + console.error( "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?" ); var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render }, @@ -1350,7 +1308,7 @@ __DEV__ && return defaultProps; }, set: function (newDefaultProps) { - error$jscomp$0( + console.error( "It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it." ); defaultProps = newDefaultProps; @@ -1388,7 +1346,7 @@ __DEV__ && type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type.getModuleId)) || - error$jscomp$0( + console.error( "memo: The first argument must be a component. Instead received: %s", null === type ? "null" : typeof type ); @@ -1433,15 +1391,15 @@ __DEV__ && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError); - } catch (error$0) { - reportGlobalError(error$0); + } catch (error) { + reportGlobalError(error); } finally { null === prevTransition && currentTransition._updatedFibers && ((scope = currentTransition._updatedFibers.size), currentTransition._updatedFibers.clear(), 10 < scope && - warn( + console.warn( "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table." )), (ReactSharedInternals.T = prevTransition); @@ -1486,7 +1444,7 @@ __DEV__ && exports.useContext = function (Context) { var dispatcher = resolveDispatcher(); Context.$$typeof === REACT_CONSUMER_TYPE && - error$jscomp$0( + console.error( "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?" ); return dispatcher.useContext(Context); @@ -1505,7 +1463,7 @@ __DEV__ && destroy ) { null == create && - warn( + console.warn( "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?" ); var dispatcher = resolveDispatcher(); @@ -1534,14 +1492,14 @@ __DEV__ && }; exports.useInsertionEffect = function (create, deps) { null == create && - warn( + console.warn( "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?" ); return resolveDispatcher().useInsertionEffect(create, deps); }; exports.useLayoutEffect = function (create, deps) { null == create && - warn( + console.warn( "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?" ); return resolveDispatcher().useLayoutEffect(create, deps); @@ -1575,7 +1533,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.1.0-www-modern-9b042f9d-20250221"; + exports.version = "19.1.0-www-modern-25677265-20250224"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index 167a98a076b55..4e41a89fc1e8b 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -641,4 +641,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.1.0-www-classic-9b042f9d-20250221"; +exports.version = "19.1.0-www-classic-25677265-20250224"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 67b74d84fa107..2bbee08988cad 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -641,4 +641,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.1.0-www-modern-9b042f9d-20250221"; +exports.version = "19.1.0-www-modern-25677265-20250224"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index 0dd74d280c828..91bc84cee7ccd 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -645,7 +645,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.1.0-www-classic-9b042f9d-20250221"; +exports.version = "19.1.0-www-classic-25677265-20250224"; "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 3ad0ebf699271..75db96ba762fb 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -645,7 +645,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.1.0-www-modern-9b042f9d-20250221"; +exports.version = "19.1.0-www-modern-25677265-20250224"; "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 1b47a72fabcdb..f6546941f033b 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -27,11 +27,11 @@ __DEV__ && } function copyWithRename(obj, oldPath, newPath) { if (oldPath.length !== newPath.length) - warn("copyWithRename() expects paths of the same length"); + console.warn("copyWithRename() expects paths of the same length"); else { for (var i = 0; i < newPath.length - 1; i++) if (oldPath[i] !== newPath[i]) { - warn( + console.warn( "copyWithRename() expects paths to be the same except for the deepest key" ); return; @@ -94,12 +94,12 @@ __DEV__ && } function warnForMissingKey() {} function warnInvalidHookAccess() { - error$jscomp$0( + console.error( "Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks" ); } function warnInvalidContextAccess() { - error$jscomp$0( + console.error( "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." ); } @@ -137,46 +137,6 @@ __DEV__ && ); return self; } - function warn(format) { - for ( - var _len = arguments.length, - args = Array(1 < _len ? _len - 1 : 0), - _key = 1; - _key < _len; - _key++ - ) - args[_key - 1] = arguments[_key]; - if (enableRemoveConsolePatches) { - var _console; - (_console = console).warn.apply(_console, [format].concat(args)); - } else suppressWarning || printWarning("warn", format, args); - } - function error$jscomp$0(format) { - for ( - var _len2 = arguments.length, - args = Array(1 < _len2 ? _len2 - 1 : 0), - _key2 = 1; - _key2 < _len2; - _key2++ - ) - args[_key2 - 1] = arguments[_key2]; - if (enableRemoveConsolePatches) { - var _console2; - (_console2 = console).error.apply(_console2, [format].concat(args)); - } else suppressWarning || printWarning("error", format, args); - } - function printWarning(level, format, args) { - enableRemoveConsolePatches || - ((level = - require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE), - null != level && - level.getCurrentStack && - ((level = level.getCurrentStack()), - "" !== level && ((format += "%s"), args.push(level))), - args.unshift(format), - args.unshift(!1), - warningWWW.apply(null, args)); - } function isFiberSuspenseAndTimedOut(fiber) { var memoizedState = fiber.memoizedState; return ( @@ -233,7 +193,7 @@ __DEV__ && if ("object" === typeof type) switch ( ("number" === typeof type.tag && - error$jscomp$0( + console.error( "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." ), type.$$typeof) @@ -362,7 +322,7 @@ __DEV__ && if (hook.isDisabled) return !0; if (!hook.supportsFiber) return ( - error$jscomp$0( + console.error( "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools" ), !0 @@ -370,21 +330,20 @@ __DEV__ && try { (rendererID = hook.inject(internals)), (injectedHook = hook); } catch (err) { - error$jscomp$0("React instrumentation encountered an error: %s.", err); + console.error("React instrumentation encountered an error: %s.", err); } return hook.checkDCE ? !0 : !1; } function setIsStrictModeForDevtools(newIsStrictMode) { "function" === typeof log$1 && - (unstable_setDisableYieldValue(newIsStrictMode), - enableRemoveConsolePatches || (suppressWarning = newIsStrictMode)); + unstable_setDisableYieldValue(newIsStrictMode); if (injectedHook && "function" === typeof injectedHook.setStrictMode) try { injectedHook.setStrictMode(rendererID, newIsStrictMode); } catch (err) { hasLoggedError || ((hasLoggedError = !0), - error$jscomp$0( + console.error( "React instrumentation encountered an error: %s", err )); @@ -505,7 +464,7 @@ __DEV__ && return 0; default: return ( - error$jscomp$0( + console.error( "Should have found matching lanes. This is a bug in React." ), lanes @@ -604,7 +563,7 @@ __DEV__ && return -1; default: return ( - error$jscomp$0( + console.error( "Should have found matching lanes. This is a bug in React." ), -1 @@ -961,9 +920,9 @@ __DEV__ && } function pop(cursor, fiber) { 0 > index$jscomp$0 - ? error$jscomp$0("Unexpected pop.") + ? console.error("Unexpected pop.") : (fiber !== fiberStack[index$jscomp$0] && - error$jscomp$0("Unexpected Fiber popped."), + console.error("Unexpected Fiber popped."), (cursor.current = valueStack[index$jscomp$0]), (valueStack[index$jscomp$0] = null), (fiberStack[index$jscomp$0] = null), @@ -1022,7 +981,7 @@ __DEV__ && (fiber = getComponentNameFromFiber(fiber) || "Unknown"), warnedAboutMissingGetChildContext[fiber] || ((warnedAboutMissingGetChildContext[fiber] = !0), - error$jscomp$0( + console.error( "%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.", fiber, fiber @@ -1112,7 +1071,7 @@ __DEV__ && }); } 0 > disabledDepth && - error$jscomp$0( + console.error( "disabledDepth fell below zero. This is a bug in React. Please file an issue." ); } @@ -1385,7 +1344,7 @@ __DEV__ && } function requiredContext(c) { null === c && - error$jscomp$0( + console.error( "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue." ); return c; @@ -1822,7 +1781,7 @@ __DEV__ && )), indent++) : "string" === typeof node.serverProps - ? error$jscomp$0( + ? console.error( "Should not have matched a non HostText fiber to a Text node. This is a bug in React." ) : ((debugInfo = describeElementDiff( @@ -1923,7 +1882,7 @@ __DEV__ && void 0 !== context._currentRenderer2 && null !== context._currentRenderer2 && context._currentRenderer2 !== rendererSigil && - error$jscomp$0( + console.error( "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." ); context._currentRenderer2 = rendererSigil; @@ -1952,7 +1911,7 @@ __DEV__ && parent = parent.return; } parent !== propagationRoot && - error$jscomp$0( + console.error( "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." ); } @@ -2096,7 +2055,7 @@ __DEV__ && } function readContext(context) { isDisallowedContextReadInDEV && - error$jscomp$0( + console.error( "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." ); return readContextForConsumer(currentlyRenderingFiber$1, context); @@ -2132,7 +2091,7 @@ __DEV__ && } function retainCache(cache) { cache.controller.signal.aborted && - warn( + console.warn( "A cache instance was retained after it was already freed. This likely indicates a bug in React." ); cache.refCount++; @@ -2140,7 +2099,7 @@ __DEV__ && function releaseCache(cache) { cache.refCount--; 0 > cache.refCount && - warn( + console.warn( "A cache instance was released after it was already freed. This likely indicates a bug in React." ); 0 === cache.refCount && @@ -2636,7 +2595,7 @@ __DEV__ && : index !== thenable && (thenableState.didWarnAboutUncachedPromise || ((thenableState.didWarnAboutUncachedPromise = !0), - error$jscomp$0( + console.error( "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." )), thenable.then(noop, noop), @@ -2837,7 +2796,7 @@ __DEV__ && !didWarnUpdateInsideUpdate ) { var componentName = getComponentNameFromFiber(fiber); - error$jscomp$0( + console.error( "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s", componentName ); @@ -3154,7 +3113,7 @@ __DEV__ && oldHookName += newHookName + "\n"; table += oldHookName; } - error$jscomp$0( + console.error( "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", componentName, table @@ -3166,7 +3125,7 @@ __DEV__ && void 0 === deps || null === deps || isArrayImpl(deps) || - error$jscomp$0( + console.error( "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", currentHookNameInDev, typeof deps @@ -3176,7 +3135,7 @@ __DEV__ && var componentName = getComponentNameFromFiber(currentlyRenderingFiber); didWarnAboutUseFormState.has(componentName) || (didWarnAboutUseFormState.add(componentName), - error$jscomp$0( + console.error( "ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.", componentName )); @@ -3190,14 +3149,14 @@ __DEV__ && if (ignorePreviousDependencies) return !1; if (null === prevDeps) return ( - error$jscomp$0( + console.error( "%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.", currentHookNameInDev ), !1 ); nextDeps.length !== prevDeps.length && - error$jscomp$0( + console.error( "The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s", currentHookNameInDev, "[" + prevDeps.join(", ") + "]", @@ -3230,7 +3189,7 @@ __DEV__ && (nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber)), didWarnAboutAsyncClientComponent.has(nextRenderLanes) || (didWarnAboutAsyncClientComponent.add(nextRenderLanes), - error$jscomp$0( + console.error( "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." )); workInProgress.memoizedState = null; @@ -3292,7 +3251,7 @@ __DEV__ && hookTypesUpdateIndexDev = -1; null !== current && (current.flags & 65011712) !== (workInProgress.flags & 65011712) && - error$jscomp$0( + console.error( "Internal React error: Expected static flag was missing. Please notify the React team." ); didScheduleRenderPhaseUpdate = !1; @@ -3317,7 +3276,7 @@ __DEV__ && didWarnAboutUseWrappedInTryCatch.has(workInProgress) || didWarnAboutAsyncClientComponent.has(workInProgress) || (didWarnAboutUseWrappedInTryCatch.add(workInProgress), - error$jscomp$0( + console.error( "`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary." ))); } @@ -3505,7 +3464,7 @@ __DEV__ && updateQueue[current] = REACT_MEMO_CACHE_SENTINEL; else updateQueue.length !== size && - error$jscomp$0( + console.error( "Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.", updateQueue.length, size @@ -3565,7 +3524,7 @@ __DEV__ && pendingQueue.next = baseFirst; } current.baseQueue !== baseQueue && - error$jscomp$0( + console.error( "Internal error: Expected work-in-progress queue to be a clone. This is a bug in React." ); current.baseQueue = baseQueue = pendingQueue; @@ -3692,7 +3651,7 @@ __DEV__ && if (!didWarnUncachedGetSnapshot) { var cachedSnapshot = getSnapshot(); objectIs(nextSnapshot, cachedSnapshot) || - (error$jscomp$0( + (console.error( "The result of getSnapshot should be cached to avoid an infinite loop" ), (didWarnUncachedGetSnapshot = !0)); @@ -3732,7 +3691,7 @@ __DEV__ && if (!didWarnUncachedGetSnapshot) { var cachedSnapshot = getSnapshot(); objectIs(nextSnapshot, cachedSnapshot) || - (error$jscomp$0( + (console.error( "The result of getSnapshot should be cached to avoid an infinite loop" ), (didWarnUncachedGetSnapshot = !0)); @@ -3805,7 +3764,7 @@ __DEV__ && try { var nextValue = latestGetSnapshot(); return !objectIs(inst, nextValue); - } catch (error$2) { + } catch (error) { return !0; } } @@ -3934,8 +3893,8 @@ __DEV__ && null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue); handleActionReturnValue(actionQueue, node, returnValue); - } catch (error$3) { - onActionError(actionQueue, node, error$3); + } catch (error) { + onActionError(actionQueue, node, error); } finally { (ReactSharedInternals.T = prevTransition), null === prevTransition && @@ -3943,7 +3902,7 @@ __DEV__ && ((actionQueue = currentTransition._updatedFibers.size), currentTransition._updatedFibers.clear(), 10 < actionQueue && - warn( + console.warn( "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table." )); } @@ -3951,8 +3910,8 @@ __DEV__ && try { (currentTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, currentTransition); - } catch (error$4) { - onActionError(actionQueue, node, error$4); + } catch (error$2) { + onActionError(actionQueue, node, error$2); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -3968,7 +3927,7 @@ __DEV__ && } ), node.isTransition || - error$jscomp$0( + console.error( "An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop." )) : onActionSuccess(actionQueue, node, returnValue); @@ -4381,7 +4340,7 @@ __DEV__ && if (null !== ref && void 0 !== ref) return ( ref.hasOwnProperty("current") || - error$jscomp$0( + console.error( "Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.", "an object with keys {" + Object.keys(ref).join(", ") + "}" ), @@ -4394,7 +4353,7 @@ __DEV__ && } function mountImperativeHandle(ref, create, deps) { "function" !== typeof create && - error$jscomp$0( + console.error( "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", null !== create ? typeof create : "null" ); @@ -4410,7 +4369,7 @@ __DEV__ && } function updateImperativeHandle(ref, create, deps) { "function" !== typeof create && - error$jscomp$0( + console.error( "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", null !== create ? typeof create : "null" ); @@ -4569,11 +4528,11 @@ __DEV__ && finishedState, requestUpdateLane(fiber) ); - } catch (error$5) { + } catch (error) { dispatchSetStateInternal( fiber, queue, - { then: function () {}, status: "rejected", reason: error$5 }, + { then: function () {}, status: "rejected", reason: error }, requestUpdateLane(fiber) ); } finally { @@ -4584,7 +4543,7 @@ __DEV__ && ((fiber = currentTransition._updatedFibers.size), currentTransition._updatedFibers.clear(), 10 < fiber && - warn( + console.warn( "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table." )); } @@ -4663,7 +4622,7 @@ __DEV__ && function dispatchReducerAction(fiber, queue, action) { var args = arguments; "function" === typeof args[3] && - error$jscomp$0( + console.error( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); args = requestUpdateLane(fiber); @@ -4686,7 +4645,7 @@ __DEV__ && function dispatchSetState(fiber, queue, action) { var args = arguments; "function" === typeof args[3] && - error$jscomp$0( + console.error( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); args = requestUpdateLane(fiber); @@ -4724,7 +4683,7 @@ __DEV__ && finishQueueingConcurrentUpdates(), !1 ); - } catch (error$6) { + } catch (error) { } finally { ReactSharedInternals.H = prevDispatcher; } @@ -4747,7 +4706,7 @@ __DEV__ && ) { null === ReactSharedInternals.T && 0 === currentEntangledLane && - error$jscomp$0( + console.error( "An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition." ); action = { @@ -4761,7 +4720,7 @@ __DEV__ && if (isRenderPhaseUpdate(fiber)) { if (throwIfDuringRender) throw Error("Cannot update optimistic state while rendering."); - error$jscomp$0("Cannot call startTransition while rendering."); + console.error("Cannot call startTransition while rendering."); } else (throwIfDuringRender = enqueueConcurrentHookUpdate( fiber, @@ -4818,7 +4777,7 @@ __DEV__ && runWithFiberInDEV( fiber, function (erroredKey) { - error$jscomp$0( + console.error( "Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", erroredKey ); @@ -4860,13 +4819,13 @@ __DEV__ && (invalidChild = invalidChild.displayName || invalidChild.name || "Component"), 3 === returnFiber.tag - ? error$jscomp$0( + ? console.error( "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n root.render(%s)", invalidChild, invalidChild, invalidChild ) - : error$jscomp$0( + : console.error( "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n <%s>{%s}", invalidChild, invalidChild, @@ -4881,11 +4840,11 @@ __DEV__ && ((ownerHasSymbolTypeWarning[parentName] = !0), (invalidChild = String(invalidChild)), 3 === returnFiber.tag - ? error$jscomp$0( + ? console.error( "Symbols are not valid as a React child.\n root.render(%s)", invalidChild ) - : error$jscomp$0( + : console.error( "Symbols are not valid as a React child.\n <%s>%s", parentName, invalidChild, @@ -5326,7 +5285,7 @@ __DEV__ && break; } runWithFiberInDEV(workInProgress, function () { - error$jscomp$0( + console.error( "Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted \u2014 the behavior is unsupported and could change in a future version.", key ); @@ -5733,14 +5692,14 @@ __DEV__ && Object.prototype.toString.call(newChildren) ) didWarnAboutGenerators || - error$jscomp$0( + console.error( "Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items." ), (didWarnAboutGenerators = !0); } else newChild.entries !== key || didWarnAboutMaps || - (error$jscomp$0( + (console.error( "Using Maps as children is not supported. Use an array of keyed ReactElements instead." ), (didWarnAboutMaps = !0)); @@ -5927,7 +5886,7 @@ __DEV__ && var key = String(callback); didWarnOnInvalidCallback.has(key) || (didWarnOnInvalidCallback.add(key), - error$jscomp$0( + console.error( "Expected the last optional `callback` argument to be a function. Instead received: %s.", callback )); @@ -5953,7 +5912,7 @@ __DEV__ && ((ctor = getComponentNameFromType(ctor) || "Component"), didWarnAboutUndefinedDerivedState.has(ctor) || (didWarnAboutUndefinedDerivedState.add(ctor), - error$jscomp$0( + console.error( "%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.", ctor ))); @@ -5994,7 +5953,7 @@ __DEV__ && } } void 0 === oldProps && - error$jscomp$0( + console.error( "%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.", getComponentNameFromType(ctor) || "Component" ); @@ -6020,7 +5979,7 @@ __DEV__ && getComponentNameFromFiber(workInProgress) || "Component"), didWarnAboutStateAssignmentForComponent.has(workInProgress) || (didWarnAboutStateAssignmentForComponent.add(workInProgress), - error$jscomp$0( + console.error( "%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", workInProgress )), @@ -6112,9 +6071,9 @@ __DEV__ && function initializeClassErrorUpdate(update, root, fiber, errorInfo) { var getDerivedStateFromError = fiber.type.getDerivedStateFromError; if ("function" === typeof getDerivedStateFromError) { - var error$1 = errorInfo.value; + var error = errorInfo.value; update.payload = function () { - return getDerivedStateFromError(error$1); + return getDerivedStateFromError(error); }; update.callback = function () { markFailedErrorBoundaryForHotReloading(fiber); @@ -6146,7 +6105,7 @@ __DEV__ && callComponentDidCatchInDEV(this, errorInfo); "function" === typeof getDerivedStateFromError || (0 === (fiber.lanes & 2) && - error$jscomp$0( + console.error( "%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.", getComponentNameFromFiber(fiber) || "Unknown" )); @@ -6511,7 +6470,7 @@ __DEV__ && void 0 === Component.defaultProps || ((current = getComponentNameFromType(type) || "Unknown"), didWarnAboutDefaultPropsOnFunctionComponent[current] || - (error$jscomp$0( + (console.error( "%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.", current ), @@ -6711,7 +6670,7 @@ __DEV__ && ) { var componentName = getComponentNameFromType(Component) || "Unknown"; didWarnAboutBadClass[componentName] || - (error$jscomp$0( + (console.error( "The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.", componentName, componentName @@ -6729,7 +6688,7 @@ __DEV__ && ((componentName = getComponentNameFromType(Component) || "Unknown"), didWarnAboutContextTypes[componentName] || ((didWarnAboutContextTypes[componentName] = !0), - error$jscomp$0( + console.error( "%s uses the legacy contextTypes API which will be removed soon. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)", componentName )))); @@ -6851,7 +6810,7 @@ __DEV__ && : " However, it is set to an object with keys {" + Object.keys(context).join(", ") + "}."; - error$jscomp$0( + console.error( "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", getComponentNameFromType(Component) || "Component", addendum @@ -6889,7 +6848,7 @@ __DEV__ && getComponentNameFromType(Component) || "Component"), didWarnAboutUninitializedState.has(state$jscomp$0) || (didWarnAboutUninitializedState.add(state$jscomp$0), - error$jscomp$0( + console.error( "`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", state$jscomp$0, null === addendum.state ? "null" : "undefined", @@ -6928,7 +6887,7 @@ __DEV__ && : "getSnapshotBeforeUpdate()"; didWarnAboutLegacyLifecyclesAndDerivedState.has(addendum) || (didWarnAboutLegacyLifecyclesAndDerivedState.add(addendum), - error$jscomp$0( + console.error( "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles", addendum, newApiName, @@ -6949,34 +6908,34 @@ __DEV__ && state.render || (Component.prototype && "function" === typeof Component.prototype.render - ? error$jscomp$0( + ? console.error( "No `render` method found on the %s instance: did you accidentally return an object from the constructor?", lane ) - : error$jscomp$0( + : console.error( "No `render` method found on the %s instance: you may have forgotten to define `render`.", lane )); !state.getInitialState || state.getInitialState.isReactClassApproved || state.state || - error$jscomp$0( + console.error( "getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", lane ); state.getDefaultProps && !state.getDefaultProps.isReactClassApproved && - error$jscomp$0( + console.error( "getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", lane ); state.contextType && - error$jscomp$0( + console.error( "contextType was defined as an instance property on %s. Use a static property to define contextType instead.", lane ); state.contextTypes && - error$jscomp$0( + console.error( "contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.", lane ); @@ -6984,65 +6943,65 @@ __DEV__ && Component.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(Component) && (didWarnAboutContextTypeAndContextTypes.add(Component), - error$jscomp$0( + console.error( "%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.", lane )); Component.childContextTypes && !didWarnAboutChildContextTypes.has(Component) && (didWarnAboutChildContextTypes.add(Component), - error$jscomp$0( + console.error( "%s uses the legacy childContextTypes API which will soon be removed. Use React.createContext() instead. (https://react.dev/link/legacy-context)", lane )); Component.contextTypes && !didWarnAboutContextTypes$1.has(Component) && (didWarnAboutContextTypes$1.add(Component), - error$jscomp$0( + console.error( "%s uses the legacy contextTypes API which will soon be removed. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)", lane )); "function" === typeof state.componentShouldUpdate && - error$jscomp$0( + console.error( "%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", lane ); Component.prototype && Component.prototype.isPureReactComponent && "undefined" !== typeof state.shouldComponentUpdate && - error$jscomp$0( + console.error( "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", getComponentNameFromType(Component) || "A pure component" ); "function" === typeof state.componentDidUnmount && - error$jscomp$0( + console.error( "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", lane ); "function" === typeof state.componentDidReceiveProps && - error$jscomp$0( + console.error( "%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", lane ); "function" === typeof state.componentWillRecieveProps && - error$jscomp$0( + console.error( "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", lane ); "function" === typeof state.UNSAFE_componentWillRecieveProps && - error$jscomp$0( + console.error( "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", lane ); context = state.props !== nextProps; void 0 !== state.props && context && - error$jscomp$0( + console.error( "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", lane ); state.defaultProps && - error$jscomp$0( + console.error( "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", lane, lane @@ -7051,31 +7010,31 @@ __DEV__ && "function" === typeof state.componentDidUpdate || didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component) || (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(Component), - error$jscomp$0( + console.error( "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", getComponentNameFromType(Component) )); "function" === typeof state.getDerivedStateFromProps && - error$jscomp$0( + console.error( "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", lane ); "function" === typeof state.getDerivedStateFromError && - error$jscomp$0( + console.error( "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", lane ); "function" === typeof Component.getSnapshotBeforeUpdate && - error$jscomp$0( + console.error( "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", lane ); (context = state.state) && ("object" !== typeof context || isArrayImpl(context)) && - error$jscomp$0("%s.state: must be set to an object or null", lane); + console.error("%s.state: must be set to an object or null", lane); "function" === typeof state.getChildContext && "object" !== typeof Component.childContextTypes && - error$jscomp$0( + console.error( "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", lane ); @@ -7095,7 +7054,7 @@ __DEV__ && ((lane = getComponentNameFromType(Component) || "Component"), didWarnAboutDirectlyAssigningPropsToState.has(lane) || (didWarnAboutDirectlyAssigningPropsToState.add(lane), - error$jscomp$0( + console.error( "%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", lane ))); @@ -7128,7 +7087,7 @@ __DEV__ && "function" === typeof state.UNSAFE_componentWillMount && state.UNSAFE_componentWillMount(), lane !== state.state && - (error$jscomp$0( + (console.error( "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", getComponentNameFromFiber(workInProgress) || "Component" ), @@ -7397,7 +7356,7 @@ __DEV__ && state && Component.props !== nextProps && (didWarnAboutReassigningProps || - error$jscomp$0( + console.error( "It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.", getComponentNameFromFiber(workInProgress) || "a component" ), @@ -7419,7 +7378,7 @@ __DEV__ && function validateFunctionComponentInDev(workInProgress, Component) { Component && Component.childContextTypes && - error$jscomp$0( + console.error( "childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...", Component.displayName || Component.name || "Component" ); @@ -7427,7 +7386,7 @@ __DEV__ && void 0 === Component.defaultProps || ((workInProgress = getComponentNameFromType(Component) || "Unknown"), didWarnAboutDefaultPropsOnFunctionComponent[workInProgress] || - (error$jscomp$0( + (console.error( "%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.", workInProgress ), @@ -7435,7 +7394,7 @@ __DEV__ && "function" === typeof Component.getDerivedStateFromProps && ((workInProgress = getComponentNameFromType(Component) || "Unknown"), didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress] || - (error$jscomp$0( + (console.error( "%s: Function components do not support getDerivedStateFromProps.", workInProgress ), @@ -7445,7 +7404,7 @@ __DEV__ && null !== Component.contextType && ((Component = getComponentNameFromType(Component) || "Unknown"), didWarnAboutContextTypeOnFunctionComponent[Component] || - (error$jscomp$0( + (console.error( "%s: Function components do not support contextType.", Component ), @@ -7879,7 +7838,7 @@ __DEV__ && childSlot = !isAnArray && "function" === typeof getIteratorFn(childSlot); return isAnArray || childSlot ? ((isAnArray = isAnArray ? "array" : "iterable"), - error$jscomp$0( + console.error( "A nested %s was passed to row #%s in . Wrap it in an additional SuspenseList to configure its revealOrder: ... {%s} ... ", isAnArray, index, @@ -7932,7 +7891,7 @@ __DEV__ && case "together": case "forwards": case "backwards": - error$jscomp$0( + console.error( '"%s" is not a valid value for revealOrder on . Use lowercase "%s" instead.', revealOrder, revealOrder.toLowerCase() @@ -7940,20 +7899,20 @@ __DEV__ && break; case "forward": case "backward": - error$jscomp$0( + console.error( '"%s" is not a valid value for revealOrder on . React uses the -s suffix in the spelling. Use "%ss" instead.', revealOrder, revealOrder.toLowerCase() ); break; default: - error$jscomp$0( + console.error( '"%s" is not a supported revealOrder on . Did you mean "together", "forwards" or "backwards"?', revealOrder ); } else - error$jscomp$0( + console.error( '%s is not a supported value for revealOrder on . Did you mean "together", "forwards" or "backwards"?', revealOrder ); @@ -7961,14 +7920,14 @@ __DEV__ && didWarnAboutTailOptions[tailMode] || ("collapsed" !== tailMode && "hidden" !== tailMode ? ((didWarnAboutTailOptions[tailMode] = !0), - error$jscomp$0( + console.error( '"%s" is not a supported value for tail on . Did you mean "collapsed" or "hidden"?', tailMode )) : "forwards" !== revealOrder && "backwards" !== revealOrder && ((didWarnAboutTailOptions[tailMode] = !0), - error$jscomp$0( + console.error( ' is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?', tailMode ))); @@ -7989,7 +7948,7 @@ __DEV__ && _i++; } } else - error$jscomp$0( + console.error( 'A single row was passed to a . This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?', revealOrder ); @@ -8610,7 +8569,7 @@ __DEV__ && "value" in prevSibling || hasWarnedAboutUsingNoValuePropOnContextProvider || ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), - error$jscomp$0( + console.error( "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" )), pushProvider(workInProgress, returnFiber, nextProps), @@ -8631,7 +8590,7 @@ __DEV__ && (prevSibling = prevSibling._context)), (returnFiber = workInProgress.pendingProps.children), "function" !== typeof returnFiber && - error$jscomp$0( + console.error( "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." ), prepareToReadContext(workInProgress), @@ -8785,7 +8744,7 @@ __DEV__ && (workInProgress.flags |= 2048))) : current.memoizedProps.name !== workInProgress.pendingProps.name && - error$jscomp$0( + console.error( "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." ), (returnFiber = workInProgress.stateNode), @@ -9223,7 +9182,7 @@ __DEV__ && } catch (x) { fallthroughToNormalSuspensePath = ""; } - error$jscomp$0( + console.error( "A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\n%s%s", "https://react.dev/link/hydration-mismatch", fallthroughToNormalSuspensePath @@ -9705,7 +9664,7 @@ __DEV__ && updateQueue )), null == updateQueue.inst.resource && - error$jscomp$0( + console.error( "useEffect must provide a callback which returns a resource. If a managed resource is not needed here, do not provide an updater or destroy callback. Received %s", updateQueue.inst.resource ), @@ -9771,7 +9730,7 @@ __DEV__ && runWithFiberInDEV( finishedWork, function (n, a) { - error$jscomp$0( + console.error( "%s must not return anything besides a function, which is used for clean-up.%s", n, a @@ -9784,8 +9743,8 @@ __DEV__ && updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); } - } catch (error$11) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$11); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function commitHookEffectListUnmount( @@ -9837,7 +9796,7 @@ __DEV__ && ), updateQueue.next.resourceKind === ResourceEffectUpdateKind ? (updateQueue.next.update = void 0) - : error$jscomp$0( + : console.error( "Expected a ResourceEffectUpdateKind to follow ResourceEffectIdentityKind, got %s. This is a bug in React.", updateQueue.next.resourceKind ), @@ -9872,8 +9831,8 @@ __DEV__ && updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); } - } catch (error$12) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$12); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function commitHookPassiveMountEffects(finishedWork, hookFlags) { @@ -9910,12 +9869,12 @@ __DEV__ && "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (instance.props !== finishedWork.memoizedProps && - error$jscomp$0( + console.error( "Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" ), instance.state !== finishedWork.memoizedState && - error$jscomp$0( + console.error( "Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )); @@ -9926,8 +9885,8 @@ __DEV__ && updateQueue, instance ); - } catch (error$13) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$13); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } } @@ -9942,12 +9901,12 @@ __DEV__ && "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (current.props !== finishedWork.memoizedProps && - error$jscomp$0( + console.error( "Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" ), current.state !== finishedWork.memoizedState && - error$jscomp$0( + console.error( "Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )); @@ -9969,14 +9928,14 @@ __DEV__ && prevProps.has(finishedWork.type) || (prevProps.add(finishedWork.type), runWithFiberInDEV(finishedWork, function () { - error$jscomp$0( + console.error( "%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.", getComponentNameFromFiber(finishedWork) ); })); current.__reactInternalSnapshotBeforeUpdate = snapshot; - } catch (error$16) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$16); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function safelyCallComponentWillUnmount( @@ -10043,9 +10002,9 @@ __DEV__ && else finishedWork.refCleanup = ref(instanceToUse); else "string" === typeof ref - ? error$jscomp$0("String refs are no longer supported.") + ? console.error("String refs are no longer supported.") : ref.hasOwnProperty("current") || - error$jscomp$0( + console.error( "Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().", getComponentNameFromFiber(finishedWork) ), @@ -10055,8 +10014,8 @@ __DEV__ && function safelyAttachRef(current, nearestMountedAncestor) { try { runWithFiberInDEV(current, commitAttachRef, current); - } catch (error$17) { - captureCommitPhaseError(current, nearestMountedAncestor, error$17); + } catch (error) { + captureCommitPhaseError(current, nearestMountedAncestor, error); } } function safelyDetachRef(current, nearestMountedAncestor) { @@ -10072,8 +10031,8 @@ __DEV__ && recordEffectDuration(current); } else runWithFiberInDEV(current, refCleanup); - } catch (error$18) { - captureCommitPhaseError(current, nearestMountedAncestor, error$18); + } catch (error) { + captureCommitPhaseError(current, nearestMountedAncestor, error); } finally { (current.refCleanup = null), (current = current.alternate), @@ -10088,8 +10047,8 @@ __DEV__ && recordEffectDuration(current); } else runWithFiberInDEV(current, ref, null); - } catch (error$19) { - captureCommitPhaseError(current, nearestMountedAncestor, error$19); + } catch (error$3) { + captureCommitPhaseError(current, nearestMountedAncestor, error$3); } else ref.current = null; } @@ -10171,8 +10130,8 @@ __DEV__ && commitStartTime, passiveEffectDuration ); - } catch (error$21) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$21); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function trackHostMutation() { @@ -10191,8 +10150,8 @@ __DEV__ && props, finishedWork ); - } catch (error$22) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$22); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function isHostParent(fiber) { @@ -10640,12 +10599,12 @@ __DEV__ && "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (finishedRoot.props !== finishedWork.memoizedProps && - error$jscomp$0( + console.error( "Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" ), finishedRoot.state !== finishedWork.memoizedState && - error$jscomp$0( + console.error( "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )), @@ -10675,12 +10634,12 @@ __DEV__ && "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (finishedRoot.props !== finishedWork.memoizedProps && - error$jscomp$0( + console.error( "Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" ), finishedRoot.state !== finishedWork.memoizedState && - error$jscomp$0( + console.error( "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )); @@ -10733,12 +10692,8 @@ __DEV__ && flags, prevProps ); - } catch (error$15) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$15 - ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } finishedRoot.effectDuration += popNestedEffectDurations(current); @@ -10765,12 +10720,8 @@ __DEV__ && commitStartTime, finishedRoot.effectDuration ); - } catch (error$20) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$20 - ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; @@ -11049,7 +11000,7 @@ __DEV__ && } catch (err) { hasLoggedError || ((hasLoggedError = !0), - error$jscomp$0( + console.error( "React instrumentation encountered an error: %s", err )); @@ -11081,11 +11032,11 @@ __DEV__ && deletedFiber.stateNode ), trackHostMutation(); - } catch (error$29) { + } catch (error) { captureCommitPhaseError( deletedFiber, nearestMountedAncestor, - error$29 + error ); } else @@ -11097,11 +11048,11 @@ __DEV__ && deletedFiber.stateNode ), trackHostMutation(); - } catch (error$30) { + } catch (error) { captureCommitPhaseError( deletedFiber, nearestMountedAncestor, - error$30 + error ); } break; @@ -11111,11 +11062,11 @@ __DEV__ && try { (_prevHostParent = finishedRoot.onDeleted) && _prevHostParent(deletedFiber.stateNode); - } catch (error$31) { + } catch (error) { captureCommitPhaseError( deletedFiber, nearestMountedAncestor, - error$31 + error ); } null !== hostParent && @@ -11370,12 +11321,8 @@ __DEV__ && try { runWithFiberInDEV(finishedWork, resetTextContent, instance), trackHostMutation(); - } catch (error$25) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$25 - ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } if (flags & 4 && null != finishedWork.stateNode) { @@ -11391,17 +11338,13 @@ __DEV__ && instance, finishedWork ); - } catch (error$23) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$23 - ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } flags & 1024 && "form" !== finishedWork.type && - error$jscomp$0( + console.error( "Unexpected host component type. Expected a form. This is a bug in React." ); break; @@ -11425,12 +11368,8 @@ __DEV__ && flags ), trackHostMutation(); - } catch (error$24) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$24 - ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } break; @@ -11472,14 +11411,10 @@ __DEV__ && null !== retryQueue && suspenseCallback(new Set(retryQueue)); } else void 0 !== suspenseCallback && - error$jscomp$0("Unexpected type for suspenseCallback."); + console.error("Unexpected type for suspenseCallback."); } - } catch (error$32) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$32 - ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } flags = finishedWork.updateQueue; null !== flags && @@ -11536,8 +11471,8 @@ __DEV__ && lanes.stateNode, lanes.memoizedProps ); - } catch (error$26) { - captureCommitPhaseError(lanes, lanes.return, error$26); + } catch (error) { + captureCommitPhaseError(lanes, lanes.return, error); } } } else if (6 === root.tag) { @@ -11557,8 +11492,8 @@ __DEV__ && instance$jscomp$0, lanes.memoizedProps ); - } catch (error$27) { - captureCommitPhaseError(lanes, lanes.return, error$27); + } catch (error) { + captureCommitPhaseError(lanes, lanes.return, error); } } } else if ( @@ -11640,8 +11575,8 @@ __DEV__ && if (flags & 2) { try { runWithFiberInDEV(finishedWork, commitPlacement, finishedWork); - } catch (error$28) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$28); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } finishedWork.flags &= -3; } @@ -11742,12 +11677,8 @@ __DEV__ && current, finishedRoot ); - } catch (error$14) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$14 - ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } includeWorkInProgressEffects && @@ -11789,12 +11720,8 @@ __DEV__ && commitStartTime, includeWorkInProgressEffects.effectDuration ); - } catch (error$20) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$20 - ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } else recursivelyTraverseReappearLayoutEffects( @@ -12633,7 +12560,7 @@ __DEV__ && : void 0; isReactActEnvironmentGlobal || null === ReactSharedInternals.actQueue || - error$jscomp$0( + console.error( "The current testing environment is not configured to support act(...)" ); return isReactActEnvironmentGlobal; @@ -12738,7 +12665,7 @@ __DEV__ && } function scheduleUpdateOnFiber(root, fiber, lane) { isRunningInsertionEffect && - error$jscomp$0("useInsertionEffect must not schedule updates."); + console.error("useInsertionEffect must not schedule updates."); isFlushingPassiveEffects && (didScheduleUpdateDuringPassiveEffects = !0); if ( (root === workInProgressRoot && @@ -12769,7 +12696,7 @@ __DEV__ && didWarnAboutUpdateInRenderForAnotherComponent.has(root) || (didWarnAboutUpdateInRenderForAnotherComponent.add(root), (lane = getComponentNameFromFiber(fiber) || "Unknown"), - error$jscomp$0( + console.error( "Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render", lane, root, @@ -12778,7 +12705,7 @@ __DEV__ && break; case 1: didWarnAboutUpdateInRender || - (error$jscomp$0( + (console.error( "Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state." ), (didWarnAboutUpdateInRender = !0)); @@ -13041,7 +12968,7 @@ __DEV__ && check = check.value; try { if (!objectIs(getSnapshot(), check)) return !1; - } catch (error$33) { + } catch (error) { return !1; } } @@ -13340,8 +13267,8 @@ __DEV__ && workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$34) { - handleThrow(root, thrownValue$34); + } catch (thrownValue$4) { + handleThrow(root, thrownValue$4); } while (1); lanes && root.shellSuspendCounter++; @@ -13468,7 +13395,7 @@ __DEV__ && } break; default: - error$jscomp$0( + console.error( "Unexpected type of fiber triggered a suspensey commit. This is a bug in React." ); } @@ -13504,8 +13431,8 @@ __DEV__ && ? workLoopSync() : workLoopConcurrentByScheduler(); break; - } catch (thrownValue$35) { - handleThrow(root, thrownValue$35); + } catch (thrownValue$5) { + handleThrow(root, thrownValue$5); } while (1); resetContextDependencies(); @@ -13651,9 +13578,8 @@ __DEV__ && workInProgress = null; return; } - } catch (error$36) { - if (null !== returnFiber) - throw ((workInProgress = returnFiber), error$36); + } catch (error) { + if (null !== returnFiber) throw ((workInProgress = returnFiber), error); workInProgressRootExitStatus = RootFatalErrored; logUncaughtError( root, @@ -13782,7 +13708,7 @@ __DEV__ && enableSchedulingProfiler && markCommitStopped(); else { 0 === lanes && - error$jscomp$0( + console.error( "finishedLanes should not be empty during a commit. This is a bug in React." ); if (finishedWork === root.current) @@ -13987,7 +13913,7 @@ __DEV__ && } catch (err) { hasLoggedError || ((hasLoggedError = !0), - error$jscomp$0( + console.error( "React instrumentation encountered an error: %s", err )); @@ -14053,7 +13979,7 @@ __DEV__ && componentStack = { componentStack: componentStack }; Object.defineProperty(componentStack, "digest", { get: function () { - error$jscomp$0( + console.error( 'You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.' ); } @@ -14159,7 +14085,7 @@ __DEV__ && } catch (err) { hasLoggedError || ((hasLoggedError = !0), - error$jscomp$0( + console.error( "React instrumentation encountered an error: %s", err )); @@ -14179,18 +14105,18 @@ __DEV__ && function captureCommitPhaseError( sourceFiber, nearestMountedAncestor, - error$1 + error ) { isRunningInsertionEffect = !1; if (3 === sourceFiber.tag) - captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error$1); + captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error); else { for (; null !== nearestMountedAncestor; ) { if (3 === nearestMountedAncestor.tag) { captureCommitPhaseErrorOnRoot( nearestMountedAncestor, sourceFiber, - error$1 + error ); return; } @@ -14203,12 +14129,12 @@ __DEV__ && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(instance))) ) { - sourceFiber = createCapturedValueAtFiber(error$1, sourceFiber); - error$1 = createClassErrorUpdate(2); - instance = enqueueUpdate(nearestMountedAncestor, error$1, 2); + sourceFiber = createCapturedValueAtFiber(error, sourceFiber); + error = createClassErrorUpdate(2); + instance = enqueueUpdate(nearestMountedAncestor, error, 2); null !== instance && (initializeClassErrorUpdate( - error$1, + error, instance, nearestMountedAncestor, sourceFiber @@ -14220,9 +14146,9 @@ __DEV__ && } nearestMountedAncestor = nearestMountedAncestor.return; } - error$jscomp$0( + console.error( "Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.\n\nError message:\n\n%s", - error$1 + error ); } } @@ -14256,7 +14182,7 @@ __DEV__ && throwIfInfiniteUpdateLoopDetected()); isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && - error$jscomp$0( + console.error( "A suspended resource finished loading inside a test, but the event was not wrapped in act(...).\n\nWhen testing, code that resolves suspended data should be wrapped into act(...):\n\nact(() => {\n /* finish loading suspended data */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act" ); workInProgressRoot === root && @@ -14325,7 +14251,7 @@ __DEV__ && nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT && ((nestedPassiveUpdateCount = 0), (rootWithPassiveNestedUpdates = null), - error$jscomp$0( + console.error( "Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render." )); } @@ -14414,7 +14340,7 @@ __DEV__ && didWarnStateUpdateForNotYetMountedComponent.add(tag); } else didWarnStateUpdateForNotYetMountedComponent = new Set([tag]); runWithFiberInDEV(fiber, function () { - error$jscomp$0( + console.error( "Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead." ); }); @@ -14437,7 +14363,7 @@ __DEV__ && isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && runWithFiberInDEV(fiber, function () { - error$jscomp$0( + console.error( "An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act", getComponentNameFromFiber(fiber) ); @@ -14782,7 +14708,7 @@ __DEV__ && return ( (type = pendingProps), "string" !== typeof type.id && - error$jscomp$0( + console.error( 'Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.', typeof type.id ), @@ -15070,7 +14996,7 @@ __DEV__ && } catch (err) { hasLoggedError || ((hasLoggedError = !0), - error$jscomp$0( + console.error( "React instrumentation encountered an error: %s", err )); @@ -15123,7 +15049,7 @@ __DEV__ && null !== current && !didWarnAboutNestedUpdates && ((didWarnAboutNestedUpdates = !0), - error$jscomp$0( + console.error( "Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.", getComponentNameFromFiber(current) || "Unknown" )); @@ -15132,7 +15058,7 @@ __DEV__ && callback = void 0 === callback ? null : callback; null !== callback && ("function" !== typeof callback && - error$jscomp$0( + console.error( "Expected the last optional `callback` argument to be a function. Instead received: %s.", callback ), @@ -15166,10 +15092,6 @@ __DEV__ && Mode$1 = require("art/modes/current"), Scheduler = require("scheduler"), FastNoSideEffects = require("art/modes/fast-noSideEffects"), - enableRemoveConsolePatches = - require("ReactFeatureFlags").enableRemoveConsolePatches, - warningWWW = require("warning"), - suppressWarning = !1, assign = Object.assign, dynamicFeatureFlags = require("ReactFeatureFlags"), alwaysThrottleRetries = dynamicFeatureFlags.alwaysThrottleRetries, @@ -15492,7 +15414,7 @@ __DEV__ && var sortedNames = setToSortedString( UNSAFE_componentWillMountUniqueNames ); - error$jscomp$0( + console.error( "Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s", sortedNames ); @@ -15501,7 +15423,7 @@ __DEV__ && ((sortedNames = setToSortedString( UNSAFE_componentWillReceivePropsUniqueNames )), - error$jscomp$0( + console.error( "Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n\nPlease update the following components: %s", sortedNames )); @@ -15509,13 +15431,13 @@ __DEV__ && ((sortedNames = setToSortedString( UNSAFE_componentWillUpdateUniqueNames )), - error$jscomp$0( + console.error( "Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s", sortedNames )); 0 < componentWillMountUniqueNames.size && ((sortedNames = setToSortedString(componentWillMountUniqueNames)), - warn( + console.warn( "componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", sortedNames )); @@ -15523,13 +15445,13 @@ __DEV__ && ((sortedNames = setToSortedString( componentWillReceivePropsUniqueNames )), - warn( + console.warn( "componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", sortedNames )); 0 < componentWillUpdateUniqueNames.size && ((sortedNames = setToSortedString(componentWillUpdateUniqueNames)), - warn( + console.warn( "componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", sortedNames )); @@ -15544,7 +15466,7 @@ __DEV__ && for (var node = fiber; null !== node; ) node.mode & 8 && (strictRoot = node), (node = node.return); null === strictRoot - ? error$jscomp$0( + ? console.error( "Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue." ) : !didWarnAboutLegacyContext.has(fiber.type) && @@ -15568,7 +15490,7 @@ __DEV__ && }); var sortedNames = setToSortedString(uniqueNames); runWithFiberInDEV(firstFiber, function () { - error$jscomp$0( + console.error( "Legacy context API has been detected within a strict-mode tree.\n\nThe old API will be supported in all 16.x releases, but applications using it should migrate to the new version.\n\nPlease update the following components: %s\n\nLearn more about this warning here: https://react.dev/link/legacy-context", sortedNames ); @@ -15596,7 +15518,7 @@ __DEV__ && ), noopSuspenseyCommitThenable = { then: function () { - error$jscomp$0( + console.error( 'Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.' ); } @@ -15706,7 +15628,7 @@ __DEV__ && null !== updateDeps && isArrayImpl(updateDeps) && 0 === updateDeps.length && - error$jscomp$0( + console.error( "%s received a dependency array with no dependencies. When specified, the dependency array must have at least one dependency.", currentHookNameInDev ); @@ -16758,8 +16680,8 @@ __DEV__ && "react-stack-bottom-frame": function (finishedWork, instance) { try { instance.componentDidMount(); - } catch (error$7) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$7); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } }, @@ -16776,8 +16698,8 @@ __DEV__ && ) { try { instance.componentDidUpdate(prevProps, prevState, snapshot); - } catch (error$8) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$8); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } }, @@ -16803,8 +16725,8 @@ __DEV__ && ) { try { instance.componentWillUnmount(); - } catch (error$9) { - captureCommitPhaseError(current, nearestMountedAncestor, error$9); + } catch (error) { + captureCommitPhaseError(current, nearestMountedAncestor, error); } } }, @@ -16828,7 +16750,7 @@ __DEV__ && effect.update(effect.inst.resource); break; default: - error$jscomp$0( + console.error( "Unhandled Effect kind %s. This is a bug in React.", effect.kind ); @@ -16836,7 +16758,7 @@ __DEV__ && } else return ( null != effect.resourceKind && - error$jscomp$0( + console.error( "Expected only SimpleEffects when enableUseEffectCRUDOverload is disabled, got %s", effect.resourceKind ), @@ -16856,8 +16778,8 @@ __DEV__ && ) { try { destroy(); - } catch (error$10) { - captureCommitPhaseError(current, nearestMountedAncestor, error$10); + } catch (error) { + captureCommitPhaseError(current, nearestMountedAncestor, error); } } }, @@ -16921,7 +16843,7 @@ __DEV__ && (childOwnerAppendix = " It was passed a child from " + componentName + ".")); runWithFiberInDEV(workInProgress, function () { - error$jscomp$0( + console.error( 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.', currentComponentErrorInfo, childOwnerAppendix @@ -17387,10 +17309,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.1.0-www-classic-9b042f9d-20250221", + version: "19.1.0-www-classic-25677265-20250224", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-9b042f9d-20250221" + reconcilerVersion: "19.1.0-www-classic-25677265-20250224" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -17424,7 +17346,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.1.0-www-classic-9b042f9d-20250221"; + exports.version = "19.1.0-www-classic-25677265-20250224"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index fd449bd3fee28..594659e1a524c 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -27,11 +27,11 @@ __DEV__ && } function copyWithRename(obj, oldPath, newPath) { if (oldPath.length !== newPath.length) - warn("copyWithRename() expects paths of the same length"); + console.warn("copyWithRename() expects paths of the same length"); else { for (var i = 0; i < newPath.length - 1; i++) if (oldPath[i] !== newPath[i]) { - warn( + console.warn( "copyWithRename() expects paths to be the same except for the deepest key" ); return; @@ -94,12 +94,12 @@ __DEV__ && } function warnForMissingKey() {} function warnInvalidHookAccess() { - error$jscomp$0( + console.error( "Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks" ); } function warnInvalidContextAccess() { - error$jscomp$0( + console.error( "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." ); } @@ -137,46 +137,6 @@ __DEV__ && ); return self; } - function warn(format) { - for ( - var _len = arguments.length, - args = Array(1 < _len ? _len - 1 : 0), - _key = 1; - _key < _len; - _key++ - ) - args[_key - 1] = arguments[_key]; - if (enableRemoveConsolePatches) { - var _console; - (_console = console).warn.apply(_console, [format].concat(args)); - } else suppressWarning || printWarning("warn", format, args); - } - function error$jscomp$0(format) { - for ( - var _len2 = arguments.length, - args = Array(1 < _len2 ? _len2 - 1 : 0), - _key2 = 1; - _key2 < _len2; - _key2++ - ) - args[_key2 - 1] = arguments[_key2]; - if (enableRemoveConsolePatches) { - var _console2; - (_console2 = console).error.apply(_console2, [format].concat(args)); - } else suppressWarning || printWarning("error", format, args); - } - function printWarning(level, format, args) { - enableRemoveConsolePatches || - ((level = - require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE), - null != level && - level.getCurrentStack && - ((level = level.getCurrentStack()), - "" !== level && ((format += "%s"), args.push(level))), - args.unshift(format), - args.unshift(!1), - warningWWW.apply(null, args)); - } function isFiberSuspenseAndTimedOut(fiber) { var memoizedState = fiber.memoizedState; return ( @@ -233,7 +193,7 @@ __DEV__ && if ("object" === typeof type) switch ( ("number" === typeof type.tag && - error$jscomp$0( + console.error( "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." ), type.$$typeof) @@ -362,7 +322,7 @@ __DEV__ && if (hook.isDisabled) return !0; if (!hook.supportsFiber) return ( - error$jscomp$0( + console.error( "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools" ), !0 @@ -370,21 +330,20 @@ __DEV__ && try { (rendererID = hook.inject(internals)), (injectedHook = hook); } catch (err) { - error$jscomp$0("React instrumentation encountered an error: %s.", err); + console.error("React instrumentation encountered an error: %s.", err); } return hook.checkDCE ? !0 : !1; } function setIsStrictModeForDevtools(newIsStrictMode) { "function" === typeof log$1 && - (unstable_setDisableYieldValue(newIsStrictMode), - enableRemoveConsolePatches || (suppressWarning = newIsStrictMode)); + unstable_setDisableYieldValue(newIsStrictMode); if (injectedHook && "function" === typeof injectedHook.setStrictMode) try { injectedHook.setStrictMode(rendererID, newIsStrictMode); } catch (err) { hasLoggedError || ((hasLoggedError = !0), - error$jscomp$0( + console.error( "React instrumentation encountered an error: %s", err )); @@ -505,7 +464,7 @@ __DEV__ && return 0; default: return ( - error$jscomp$0( + console.error( "Should have found matching lanes. This is a bug in React." ), lanes @@ -604,7 +563,7 @@ __DEV__ && return -1; default: return ( - error$jscomp$0( + console.error( "Should have found matching lanes. This is a bug in React." ), -1 @@ -961,9 +920,9 @@ __DEV__ && } function pop(cursor, fiber) { 0 > index$jscomp$0 - ? error$jscomp$0("Unexpected pop.") + ? console.error("Unexpected pop.") : (fiber !== fiberStack[index$jscomp$0] && - error$jscomp$0("Unexpected Fiber popped."), + console.error("Unexpected Fiber popped."), (cursor.current = valueStack[index$jscomp$0]), (valueStack[index$jscomp$0] = null), (fiberStack[index$jscomp$0] = null), @@ -1018,7 +977,7 @@ __DEV__ && }); } 0 > disabledDepth && - error$jscomp$0( + console.error( "disabledDepth fell below zero. This is a bug in React. Please file an issue." ); } @@ -1291,7 +1250,7 @@ __DEV__ && } function requiredContext(c) { null === c && - error$jscomp$0( + console.error( "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue." ); return c; @@ -1728,7 +1687,7 @@ __DEV__ && )), indent++) : "string" === typeof node.serverProps - ? error$jscomp$0( + ? console.error( "Should not have matched a non HostText fiber to a Text node. This is a bug in React." ) : ((debugInfo = describeElementDiff( @@ -1829,7 +1788,7 @@ __DEV__ && void 0 !== context._currentRenderer2 && null !== context._currentRenderer2 && context._currentRenderer2 !== rendererSigil && - error$jscomp$0( + console.error( "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." ); context._currentRenderer2 = rendererSigil; @@ -1858,7 +1817,7 @@ __DEV__ && parent = parent.return; } parent !== propagationRoot && - error$jscomp$0( + console.error( "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." ); } @@ -2002,7 +1961,7 @@ __DEV__ && } function readContext(context) { isDisallowedContextReadInDEV && - error$jscomp$0( + console.error( "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." ); return readContextForConsumer(currentlyRenderingFiber$1, context); @@ -2038,7 +1997,7 @@ __DEV__ && } function retainCache(cache) { cache.controller.signal.aborted && - warn( + console.warn( "A cache instance was retained after it was already freed. This likely indicates a bug in React." ); cache.refCount++; @@ -2046,7 +2005,7 @@ __DEV__ && function releaseCache(cache) { cache.refCount--; 0 > cache.refCount && - warn( + console.warn( "A cache instance was released after it was already freed. This likely indicates a bug in React." ); 0 === cache.refCount && @@ -2542,7 +2501,7 @@ __DEV__ && : index !== thenable && (thenableState.didWarnAboutUncachedPromise || ((thenableState.didWarnAboutUncachedPromise = !0), - error$jscomp$0( + console.error( "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." )), thenable.then(noop, noop), @@ -2743,7 +2702,7 @@ __DEV__ && !didWarnUpdateInsideUpdate ) { var componentName = getComponentNameFromFiber(fiber); - error$jscomp$0( + console.error( "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s", componentName ); @@ -3060,7 +3019,7 @@ __DEV__ && oldHookName += newHookName + "\n"; table += oldHookName; } - error$jscomp$0( + console.error( "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", componentName, table @@ -3072,7 +3031,7 @@ __DEV__ && void 0 === deps || null === deps || isArrayImpl(deps) || - error$jscomp$0( + console.error( "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", currentHookNameInDev, typeof deps @@ -3082,7 +3041,7 @@ __DEV__ && var componentName = getComponentNameFromFiber(currentlyRenderingFiber); didWarnAboutUseFormState.has(componentName) || (didWarnAboutUseFormState.add(componentName), - error$jscomp$0( + console.error( "ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.", componentName )); @@ -3096,14 +3055,14 @@ __DEV__ && if (ignorePreviousDependencies) return !1; if (null === prevDeps) return ( - error$jscomp$0( + console.error( "%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.", currentHookNameInDev ), !1 ); nextDeps.length !== prevDeps.length && - error$jscomp$0( + console.error( "The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s", currentHookNameInDev, "[" + prevDeps.join(", ") + "]", @@ -3136,7 +3095,7 @@ __DEV__ && (nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber)), didWarnAboutAsyncClientComponent.has(nextRenderLanes) || (didWarnAboutAsyncClientComponent.add(nextRenderLanes), - error$jscomp$0( + console.error( "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." )); workInProgress.memoizedState = null; @@ -3198,7 +3157,7 @@ __DEV__ && hookTypesUpdateIndexDev = -1; null !== current && (current.flags & 65011712) !== (workInProgress.flags & 65011712) && - error$jscomp$0( + console.error( "Internal React error: Expected static flag was missing. Please notify the React team." ); didScheduleRenderPhaseUpdate = !1; @@ -3223,7 +3182,7 @@ __DEV__ && didWarnAboutUseWrappedInTryCatch.has(workInProgress) || didWarnAboutAsyncClientComponent.has(workInProgress) || (didWarnAboutUseWrappedInTryCatch.add(workInProgress), - error$jscomp$0( + console.error( "`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary." ))); } @@ -3411,7 +3370,7 @@ __DEV__ && updateQueue[current] = REACT_MEMO_CACHE_SENTINEL; else updateQueue.length !== size && - error$jscomp$0( + console.error( "Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.", updateQueue.length, size @@ -3471,7 +3430,7 @@ __DEV__ && pendingQueue.next = baseFirst; } current.baseQueue !== baseQueue && - error$jscomp$0( + console.error( "Internal error: Expected work-in-progress queue to be a clone. This is a bug in React." ); current.baseQueue = baseQueue = pendingQueue; @@ -3598,7 +3557,7 @@ __DEV__ && if (!didWarnUncachedGetSnapshot) { var cachedSnapshot = getSnapshot(); objectIs(nextSnapshot, cachedSnapshot) || - (error$jscomp$0( + (console.error( "The result of getSnapshot should be cached to avoid an infinite loop" ), (didWarnUncachedGetSnapshot = !0)); @@ -3638,7 +3597,7 @@ __DEV__ && if (!didWarnUncachedGetSnapshot) { var cachedSnapshot = getSnapshot(); objectIs(nextSnapshot, cachedSnapshot) || - (error$jscomp$0( + (console.error( "The result of getSnapshot should be cached to avoid an infinite loop" ), (didWarnUncachedGetSnapshot = !0)); @@ -3711,7 +3670,7 @@ __DEV__ && try { var nextValue = latestGetSnapshot(); return !objectIs(inst, nextValue); - } catch (error$2) { + } catch (error) { return !0; } } @@ -3840,8 +3799,8 @@ __DEV__ && null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue); handleActionReturnValue(actionQueue, node, returnValue); - } catch (error$3) { - onActionError(actionQueue, node, error$3); + } catch (error) { + onActionError(actionQueue, node, error); } finally { (ReactSharedInternals.T = prevTransition), null === prevTransition && @@ -3849,7 +3808,7 @@ __DEV__ && ((actionQueue = currentTransition._updatedFibers.size), currentTransition._updatedFibers.clear(), 10 < actionQueue && - warn( + console.warn( "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table." )); } @@ -3857,8 +3816,8 @@ __DEV__ && try { (currentTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, currentTransition); - } catch (error$4) { - onActionError(actionQueue, node, error$4); + } catch (error$2) { + onActionError(actionQueue, node, error$2); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -3874,7 +3833,7 @@ __DEV__ && } ), node.isTransition || - error$jscomp$0( + console.error( "An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop." )) : onActionSuccess(actionQueue, node, returnValue); @@ -4287,7 +4246,7 @@ __DEV__ && if (null !== ref && void 0 !== ref) return ( ref.hasOwnProperty("current") || - error$jscomp$0( + console.error( "Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.", "an object with keys {" + Object.keys(ref).join(", ") + "}" ), @@ -4300,7 +4259,7 @@ __DEV__ && } function mountImperativeHandle(ref, create, deps) { "function" !== typeof create && - error$jscomp$0( + console.error( "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", null !== create ? typeof create : "null" ); @@ -4316,7 +4275,7 @@ __DEV__ && } function updateImperativeHandle(ref, create, deps) { "function" !== typeof create && - error$jscomp$0( + console.error( "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", null !== create ? typeof create : "null" ); @@ -4475,11 +4434,11 @@ __DEV__ && finishedState, requestUpdateLane(fiber) ); - } catch (error$5) { + } catch (error) { dispatchSetStateInternal( fiber, queue, - { then: function () {}, status: "rejected", reason: error$5 }, + { then: function () {}, status: "rejected", reason: error }, requestUpdateLane(fiber) ); } finally { @@ -4490,7 +4449,7 @@ __DEV__ && ((fiber = currentTransition._updatedFibers.size), currentTransition._updatedFibers.clear(), 10 < fiber && - warn( + console.warn( "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table." )); } @@ -4569,7 +4528,7 @@ __DEV__ && function dispatchReducerAction(fiber, queue, action) { var args = arguments; "function" === typeof args[3] && - error$jscomp$0( + console.error( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); args = requestUpdateLane(fiber); @@ -4592,7 +4551,7 @@ __DEV__ && function dispatchSetState(fiber, queue, action) { var args = arguments; "function" === typeof args[3] && - error$jscomp$0( + console.error( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); args = requestUpdateLane(fiber); @@ -4630,7 +4589,7 @@ __DEV__ && finishQueueingConcurrentUpdates(), !1 ); - } catch (error$6) { + } catch (error) { } finally { ReactSharedInternals.H = prevDispatcher; } @@ -4653,7 +4612,7 @@ __DEV__ && ) { null === ReactSharedInternals.T && 0 === currentEntangledLane && - error$jscomp$0( + console.error( "An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition." ); action = { @@ -4667,7 +4626,7 @@ __DEV__ && if (isRenderPhaseUpdate(fiber)) { if (throwIfDuringRender) throw Error("Cannot update optimistic state while rendering."); - error$jscomp$0("Cannot call startTransition while rendering."); + console.error("Cannot call startTransition while rendering."); } else (throwIfDuringRender = enqueueConcurrentHookUpdate( fiber, @@ -4724,7 +4683,7 @@ __DEV__ && runWithFiberInDEV( fiber, function (erroredKey) { - error$jscomp$0( + console.error( "Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", erroredKey ); @@ -4766,13 +4725,13 @@ __DEV__ && (invalidChild = invalidChild.displayName || invalidChild.name || "Component"), 3 === returnFiber.tag - ? error$jscomp$0( + ? console.error( "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n root.render(%s)", invalidChild, invalidChild, invalidChild ) - : error$jscomp$0( + : console.error( "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n <%s>{%s}", invalidChild, invalidChild, @@ -4787,11 +4746,11 @@ __DEV__ && ((ownerHasSymbolTypeWarning[parentName] = !0), (invalidChild = String(invalidChild)), 3 === returnFiber.tag - ? error$jscomp$0( + ? console.error( "Symbols are not valid as a React child.\n root.render(%s)", invalidChild ) - : error$jscomp$0( + : console.error( "Symbols are not valid as a React child.\n <%s>%s", parentName, invalidChild, @@ -5232,7 +5191,7 @@ __DEV__ && break; } runWithFiberInDEV(workInProgress, function () { - error$jscomp$0( + console.error( "Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted \u2014 the behavior is unsupported and could change in a future version.", key ); @@ -5639,14 +5598,14 @@ __DEV__ && Object.prototype.toString.call(newChildren) ) didWarnAboutGenerators || - error$jscomp$0( + console.error( "Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items." ), (didWarnAboutGenerators = !0); } else newChild.entries !== key || didWarnAboutMaps || - (error$jscomp$0( + (console.error( "Using Maps as children is not supported. Use an array of keyed ReactElements instead." ), (didWarnAboutMaps = !0)); @@ -5833,7 +5792,7 @@ __DEV__ && var key = String(callback); didWarnOnInvalidCallback.has(key) || (didWarnOnInvalidCallback.add(key), - error$jscomp$0( + console.error( "Expected the last optional `callback` argument to be a function. Instead received: %s.", callback )); @@ -5859,7 +5818,7 @@ __DEV__ && ((ctor = getComponentNameFromType(ctor) || "Component"), didWarnAboutUndefinedDerivedState.has(ctor) || (didWarnAboutUndefinedDerivedState.add(ctor), - error$jscomp$0( + console.error( "%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.", ctor ))); @@ -5900,7 +5859,7 @@ __DEV__ && } } void 0 === oldProps && - error$jscomp$0( + console.error( "%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.", getComponentNameFromType(ctor) || "Component" ); @@ -5926,7 +5885,7 @@ __DEV__ && getComponentNameFromFiber(workInProgress) || "Component"), didWarnAboutStateAssignmentForComponent.has(workInProgress) || (didWarnAboutStateAssignmentForComponent.add(workInProgress), - error$jscomp$0( + console.error( "%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", workInProgress )), @@ -6018,9 +5977,9 @@ __DEV__ && function initializeClassErrorUpdate(update, root, fiber, errorInfo) { var getDerivedStateFromError = fiber.type.getDerivedStateFromError; if ("function" === typeof getDerivedStateFromError) { - var error$1 = errorInfo.value; + var error = errorInfo.value; update.payload = function () { - return getDerivedStateFromError(error$1); + return getDerivedStateFromError(error); }; update.callback = function () { markFailedErrorBoundaryForHotReloading(fiber); @@ -6052,7 +6011,7 @@ __DEV__ && callComponentDidCatchInDEV(this, errorInfo); "function" === typeof getDerivedStateFromError || (0 === (fiber.lanes & 2) && - error$jscomp$0( + console.error( "%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.", getComponentNameFromFiber(fiber) || "Unknown" )); @@ -6417,7 +6376,7 @@ __DEV__ && void 0 === Component.defaultProps || ((current = getComponentNameFromType(type) || "Unknown"), didWarnAboutDefaultPropsOnFunctionComponent[current] || - (error$jscomp$0( + (console.error( "%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.", current ), @@ -6617,7 +6576,7 @@ __DEV__ && ) { var componentName = getComponentNameFromType(Component) || "Unknown"; didWarnAboutBadClass[componentName] || - (error$jscomp$0( + (console.error( "The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.", componentName, componentName @@ -6635,7 +6594,7 @@ __DEV__ && ((componentName = getComponentNameFromType(Component) || "Unknown"), didWarnAboutContextTypes[componentName] || ((didWarnAboutContextTypes[componentName] = !0), - error$jscomp$0( + console.error( "%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)", componentName )))); @@ -6745,7 +6704,7 @@ __DEV__ && : " However, it is set to an object with keys {" + Object.keys(_instance).join(", ") + "}."), - error$jscomp$0( + console.error( "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", getComponentNameFromType(Component) || "Component", lane @@ -6775,7 +6734,7 @@ __DEV__ && ((state = getComponentNameFromType(Component) || "Component"), didWarnAboutUninitializedState.has(state) || (didWarnAboutUninitializedState.add(state), - error$jscomp$0( + console.error( "`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", state, null === _instance.state ? "null" : "undefined", @@ -6811,7 +6770,7 @@ __DEV__ && : "getSnapshotBeforeUpdate()"; didWarnAboutLegacyLifecyclesAndDerivedState.has(_instance) || (didWarnAboutLegacyLifecyclesAndDerivedState.add(_instance), - error$jscomp$0( + console.error( "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles", _instance, newApiName, @@ -6826,87 +6785,87 @@ __DEV__ && _instance.render || (Component.prototype && "function" === typeof Component.prototype.render - ? error$jscomp$0( + ? console.error( "No `render` method found on the %s instance: did you accidentally return an object from the constructor?", state ) - : error$jscomp$0( + : console.error( "No `render` method found on the %s instance: you may have forgotten to define `render`.", state )); !_instance.getInitialState || _instance.getInitialState.isReactClassApproved || _instance.state || - error$jscomp$0( + console.error( "getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", state ); _instance.getDefaultProps && !_instance.getDefaultProps.isReactClassApproved && - error$jscomp$0( + console.error( "getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", state ); _instance.contextType && - error$jscomp$0( + console.error( "contextType was defined as an instance property on %s. Use a static property to define contextType instead.", state ); Component.childContextTypes && !didWarnAboutChildContextTypes.has(Component) && (didWarnAboutChildContextTypes.add(Component), - error$jscomp$0( + console.error( "%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)", state )); Component.contextTypes && !didWarnAboutContextTypes$1.has(Component) && (didWarnAboutContextTypes$1.add(Component), - error$jscomp$0( + console.error( "%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)", state )); "function" === typeof _instance.componentShouldUpdate && - error$jscomp$0( + console.error( "%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", state ); Component.prototype && Component.prototype.isPureReactComponent && "undefined" !== typeof _instance.shouldComponentUpdate && - error$jscomp$0( + console.error( "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", getComponentNameFromType(Component) || "A pure component" ); "function" === typeof _instance.componentDidUnmount && - error$jscomp$0( + console.error( "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", state ); "function" === typeof _instance.componentDidReceiveProps && - error$jscomp$0( + console.error( "%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", state ); "function" === typeof _instance.componentWillRecieveProps && - error$jscomp$0( + console.error( "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", state ); "function" === typeof _instance.UNSAFE_componentWillRecieveProps && - error$jscomp$0( + console.error( "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", state ); lane = _instance.props !== nextProps; void 0 !== _instance.props && lane && - error$jscomp$0( + console.error( "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", state ); _instance.defaultProps && - error$jscomp$0( + console.error( "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", state, state @@ -6915,31 +6874,31 @@ __DEV__ && "function" === typeof _instance.componentDidUpdate || didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component) || (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(Component), - error$jscomp$0( + console.error( "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", getComponentNameFromType(Component) )); "function" === typeof _instance.getDerivedStateFromProps && - error$jscomp$0( + console.error( "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", state ); "function" === typeof _instance.getDerivedStateFromError && - error$jscomp$0( + console.error( "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", state ); "function" === typeof Component.getSnapshotBeforeUpdate && - error$jscomp$0( + console.error( "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", state ); (lane = _instance.state) && ("object" !== typeof lane || isArrayImpl(lane)) && - error$jscomp$0("%s.state: must be set to an object or null", state); + console.error("%s.state: must be set to an object or null", state); "function" === typeof _instance.getChildContext && "object" !== typeof Component.childContextTypes && - error$jscomp$0( + console.error( "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", state ); @@ -6957,7 +6916,7 @@ __DEV__ && ((state = getComponentNameFromType(Component) || "Component"), didWarnAboutDirectlyAssigningPropsToState.has(state) || (didWarnAboutDirectlyAssigningPropsToState.add(state), - error$jscomp$0( + console.error( "%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", state ))); @@ -6990,7 +6949,7 @@ __DEV__ && "function" === typeof _instance.UNSAFE_componentWillMount && _instance.UNSAFE_componentWillMount(), state !== _instance.state && - (error$jscomp$0( + (console.error( "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", getComponentNameFromFiber(workInProgress) || "Component" ), @@ -7240,7 +7199,7 @@ __DEV__ && _instance && renderLanes.props !== nextProps && (didWarnAboutReassigningProps || - error$jscomp$0( + console.error( "It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.", getComponentNameFromFiber(workInProgress) || "a component" ), @@ -7250,7 +7209,7 @@ __DEV__ && function validateFunctionComponentInDev(workInProgress, Component) { Component && Component.childContextTypes && - error$jscomp$0( + console.error( "childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...", Component.displayName || Component.name || "Component" ); @@ -7258,7 +7217,7 @@ __DEV__ && void 0 === Component.defaultProps || ((workInProgress = getComponentNameFromType(Component) || "Unknown"), didWarnAboutDefaultPropsOnFunctionComponent[workInProgress] || - (error$jscomp$0( + (console.error( "%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.", workInProgress ), @@ -7266,7 +7225,7 @@ __DEV__ && "function" === typeof Component.getDerivedStateFromProps && ((workInProgress = getComponentNameFromType(Component) || "Unknown"), didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress] || - (error$jscomp$0( + (console.error( "%s: Function components do not support getDerivedStateFromProps.", workInProgress ), @@ -7276,7 +7235,7 @@ __DEV__ && null !== Component.contextType && ((Component = getComponentNameFromType(Component) || "Unknown"), didWarnAboutContextTypeOnFunctionComponent[Component] || - (error$jscomp$0( + (console.error( "%s: Function components do not support contextType.", Component ), @@ -7710,7 +7669,7 @@ __DEV__ && childSlot = !isAnArray && "function" === typeof getIteratorFn(childSlot); return isAnArray || childSlot ? ((isAnArray = isAnArray ? "array" : "iterable"), - error$jscomp$0( + console.error( "A nested %s was passed to row #%s in . Wrap it in an additional SuspenseList to configure its revealOrder: ... {%s} ... ", isAnArray, index, @@ -7763,7 +7722,7 @@ __DEV__ && case "together": case "forwards": case "backwards": - error$jscomp$0( + console.error( '"%s" is not a valid value for revealOrder on . Use lowercase "%s" instead.', revealOrder, revealOrder.toLowerCase() @@ -7771,20 +7730,20 @@ __DEV__ && break; case "forward": case "backward": - error$jscomp$0( + console.error( '"%s" is not a valid value for revealOrder on . React uses the -s suffix in the spelling. Use "%ss" instead.', revealOrder, revealOrder.toLowerCase() ); break; default: - error$jscomp$0( + console.error( '"%s" is not a supported revealOrder on . Did you mean "together", "forwards" or "backwards"?', revealOrder ); } else - error$jscomp$0( + console.error( '%s is not a supported value for revealOrder on . Did you mean "together", "forwards" or "backwards"?', revealOrder ); @@ -7792,14 +7751,14 @@ __DEV__ && didWarnAboutTailOptions[tailMode] || ("collapsed" !== tailMode && "hidden" !== tailMode ? ((didWarnAboutTailOptions[tailMode] = !0), - error$jscomp$0( + console.error( '"%s" is not a supported value for tail on . Did you mean "collapsed" or "hidden"?', tailMode )) : "forwards" !== revealOrder && "backwards" !== revealOrder && ((didWarnAboutTailOptions[tailMode] = !0), - error$jscomp$0( + console.error( ' is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?', tailMode ))); @@ -7820,7 +7779,7 @@ __DEV__ && _i++; } } else - error$jscomp$0( + console.error( 'A single row was passed to a . This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?', revealOrder ); @@ -8442,7 +8401,7 @@ __DEV__ && "value" in prevSibling || hasWarnedAboutUsingNoValuePropOnContextProvider || ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), - error$jscomp$0( + console.error( "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" )), pushProvider(workInProgress, returnFiber, nextProps), @@ -8463,7 +8422,7 @@ __DEV__ && (prevSibling = prevSibling._context)), (returnFiber = workInProgress.pendingProps.children), "function" !== typeof returnFiber && - error$jscomp$0( + console.error( "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." ), prepareToReadContext(workInProgress), @@ -8617,7 +8576,7 @@ __DEV__ && (workInProgress.flags |= 2048))) : current.memoizedProps.name !== workInProgress.pendingProps.name && - error$jscomp$0( + console.error( "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." ), (returnFiber = workInProgress.stateNode), @@ -9049,7 +9008,7 @@ __DEV__ && } catch (x) { fallthroughToNormalSuspensePath = ""; } - error$jscomp$0( + console.error( "A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\n%s%s", "https://react.dev/link/hydration-mismatch", fallthroughToNormalSuspensePath @@ -9523,7 +9482,7 @@ __DEV__ && updateQueue )), null == updateQueue.inst.resource && - error$jscomp$0( + console.error( "useEffect must provide a callback which returns a resource. If a managed resource is not needed here, do not provide an updater or destroy callback. Received %s", updateQueue.inst.resource ), @@ -9589,7 +9548,7 @@ __DEV__ && runWithFiberInDEV( finishedWork, function (n, a) { - error$jscomp$0( + console.error( "%s must not return anything besides a function, which is used for clean-up.%s", n, a @@ -9602,8 +9561,8 @@ __DEV__ && updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); } - } catch (error$11) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$11); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function commitHookEffectListUnmount( @@ -9655,7 +9614,7 @@ __DEV__ && ), updateQueue.next.resourceKind === ResourceEffectUpdateKind ? (updateQueue.next.update = void 0) - : error$jscomp$0( + : console.error( "Expected a ResourceEffectUpdateKind to follow ResourceEffectIdentityKind, got %s. This is a bug in React.", updateQueue.next.resourceKind ), @@ -9690,8 +9649,8 @@ __DEV__ && updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); } - } catch (error$12) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$12); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function commitHookPassiveMountEffects(finishedWork, hookFlags) { @@ -9728,12 +9687,12 @@ __DEV__ && "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (instance.props !== finishedWork.memoizedProps && - error$jscomp$0( + console.error( "Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" ), instance.state !== finishedWork.memoizedState && - error$jscomp$0( + console.error( "Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )); @@ -9744,8 +9703,8 @@ __DEV__ && updateQueue, instance ); - } catch (error$13) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$13); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } } @@ -9760,12 +9719,12 @@ __DEV__ && "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (current.props !== finishedWork.memoizedProps && - error$jscomp$0( + console.error( "Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" ), current.state !== finishedWork.memoizedState && - error$jscomp$0( + console.error( "Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )); @@ -9787,14 +9746,14 @@ __DEV__ && prevProps.has(finishedWork.type) || (prevProps.add(finishedWork.type), runWithFiberInDEV(finishedWork, function () { - error$jscomp$0( + console.error( "%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.", getComponentNameFromFiber(finishedWork) ); })); current.__reactInternalSnapshotBeforeUpdate = snapshot; - } catch (error$16) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$16); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function safelyCallComponentWillUnmount( @@ -9861,9 +9820,9 @@ __DEV__ && else finishedWork.refCleanup = ref(instanceToUse); else "string" === typeof ref - ? error$jscomp$0("String refs are no longer supported.") + ? console.error("String refs are no longer supported.") : ref.hasOwnProperty("current") || - error$jscomp$0( + console.error( "Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().", getComponentNameFromFiber(finishedWork) ), @@ -9873,8 +9832,8 @@ __DEV__ && function safelyAttachRef(current, nearestMountedAncestor) { try { runWithFiberInDEV(current, commitAttachRef, current); - } catch (error$17) { - captureCommitPhaseError(current, nearestMountedAncestor, error$17); + } catch (error) { + captureCommitPhaseError(current, nearestMountedAncestor, error); } } function safelyDetachRef(current, nearestMountedAncestor) { @@ -9890,8 +9849,8 @@ __DEV__ && recordEffectDuration(current); } else runWithFiberInDEV(current, refCleanup); - } catch (error$18) { - captureCommitPhaseError(current, nearestMountedAncestor, error$18); + } catch (error) { + captureCommitPhaseError(current, nearestMountedAncestor, error); } finally { (current.refCleanup = null), (current = current.alternate), @@ -9906,8 +9865,8 @@ __DEV__ && recordEffectDuration(current); } else runWithFiberInDEV(current, ref, null); - } catch (error$19) { - captureCommitPhaseError(current, nearestMountedAncestor, error$19); + } catch (error$3) { + captureCommitPhaseError(current, nearestMountedAncestor, error$3); } else ref.current = null; } @@ -9989,8 +9948,8 @@ __DEV__ && commitStartTime, passiveEffectDuration ); - } catch (error$21) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$21); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function trackHostMutation() { @@ -10009,8 +9968,8 @@ __DEV__ && props, finishedWork ); - } catch (error$22) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$22); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function isHostParent(fiber) { @@ -10458,12 +10417,12 @@ __DEV__ && "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (finishedRoot.props !== finishedWork.memoizedProps && - error$jscomp$0( + console.error( "Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" ), finishedRoot.state !== finishedWork.memoizedState && - error$jscomp$0( + console.error( "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )), @@ -10493,12 +10452,12 @@ __DEV__ && "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (finishedRoot.props !== finishedWork.memoizedProps && - error$jscomp$0( + console.error( "Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" ), finishedRoot.state !== finishedWork.memoizedState && - error$jscomp$0( + console.error( "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )); @@ -10551,12 +10510,8 @@ __DEV__ && flags, prevProps ); - } catch (error$15) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$15 - ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } finishedRoot.effectDuration += popNestedEffectDurations(current); @@ -10583,12 +10538,8 @@ __DEV__ && commitStartTime, finishedRoot.effectDuration ); - } catch (error$20) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$20 - ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; @@ -10867,7 +10818,7 @@ __DEV__ && } catch (err) { hasLoggedError || ((hasLoggedError = !0), - error$jscomp$0( + console.error( "React instrumentation encountered an error: %s", err )); @@ -10899,11 +10850,11 @@ __DEV__ && deletedFiber.stateNode ), trackHostMutation(); - } catch (error$29) { + } catch (error) { captureCommitPhaseError( deletedFiber, nearestMountedAncestor, - error$29 + error ); } else @@ -10915,11 +10866,11 @@ __DEV__ && deletedFiber.stateNode ), trackHostMutation(); - } catch (error$30) { + } catch (error) { captureCommitPhaseError( deletedFiber, nearestMountedAncestor, - error$30 + error ); } break; @@ -10929,11 +10880,11 @@ __DEV__ && try { (_prevHostParent = finishedRoot.onDeleted) && _prevHostParent(deletedFiber.stateNode); - } catch (error$31) { + } catch (error) { captureCommitPhaseError( deletedFiber, nearestMountedAncestor, - error$31 + error ); } null !== hostParent && @@ -11188,12 +11139,8 @@ __DEV__ && try { runWithFiberInDEV(finishedWork, resetTextContent, instance), trackHostMutation(); - } catch (error$25) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$25 - ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } if (flags & 4 && null != finishedWork.stateNode) { @@ -11209,17 +11156,13 @@ __DEV__ && instance, finishedWork ); - } catch (error$23) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$23 - ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } flags & 1024 && "form" !== finishedWork.type && - error$jscomp$0( + console.error( "Unexpected host component type. Expected a form. This is a bug in React." ); break; @@ -11243,12 +11186,8 @@ __DEV__ && flags ), trackHostMutation(); - } catch (error$24) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$24 - ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } break; @@ -11290,14 +11229,10 @@ __DEV__ && null !== retryQueue && suspenseCallback(new Set(retryQueue)); } else void 0 !== suspenseCallback && - error$jscomp$0("Unexpected type for suspenseCallback."); + console.error("Unexpected type for suspenseCallback."); } - } catch (error$32) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$32 - ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } flags = finishedWork.updateQueue; null !== flags && @@ -11354,8 +11289,8 @@ __DEV__ && lanes.stateNode, lanes.memoizedProps ); - } catch (error$26) { - captureCommitPhaseError(lanes, lanes.return, error$26); + } catch (error) { + captureCommitPhaseError(lanes, lanes.return, error); } } } else if (6 === root.tag) { @@ -11375,8 +11310,8 @@ __DEV__ && instance$jscomp$0, lanes.memoizedProps ); - } catch (error$27) { - captureCommitPhaseError(lanes, lanes.return, error$27); + } catch (error) { + captureCommitPhaseError(lanes, lanes.return, error); } } } else if ( @@ -11458,8 +11393,8 @@ __DEV__ && if (flags & 2) { try { runWithFiberInDEV(finishedWork, commitPlacement, finishedWork); - } catch (error$28) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$28); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } finishedWork.flags &= -3; } @@ -11560,12 +11495,8 @@ __DEV__ && current, finishedRoot ); - } catch (error$14) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$14 - ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } includeWorkInProgressEffects && @@ -11607,12 +11538,8 @@ __DEV__ && commitStartTime, includeWorkInProgressEffects.effectDuration ); - } catch (error$20) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$20 - ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } else recursivelyTraverseReappearLayoutEffects( @@ -12451,7 +12378,7 @@ __DEV__ && : void 0; isReactActEnvironmentGlobal || null === ReactSharedInternals.actQueue || - error$jscomp$0( + console.error( "The current testing environment is not configured to support act(...)" ); return isReactActEnvironmentGlobal; @@ -12556,7 +12483,7 @@ __DEV__ && } function scheduleUpdateOnFiber(root, fiber, lane) { isRunningInsertionEffect && - error$jscomp$0("useInsertionEffect must not schedule updates."); + console.error("useInsertionEffect must not schedule updates."); isFlushingPassiveEffects && (didScheduleUpdateDuringPassiveEffects = !0); if ( (root === workInProgressRoot && @@ -12587,7 +12514,7 @@ __DEV__ && didWarnAboutUpdateInRenderForAnotherComponent.has(root) || (didWarnAboutUpdateInRenderForAnotherComponent.add(root), (lane = getComponentNameFromFiber(fiber) || "Unknown"), - error$jscomp$0( + console.error( "Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render", lane, root, @@ -12596,7 +12523,7 @@ __DEV__ && break; case 1: didWarnAboutUpdateInRender || - (error$jscomp$0( + (console.error( "Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state." ), (didWarnAboutUpdateInRender = !0)); @@ -12859,7 +12786,7 @@ __DEV__ && check = check.value; try { if (!objectIs(getSnapshot(), check)) return !1; - } catch (error$33) { + } catch (error) { return !1; } } @@ -13158,8 +13085,8 @@ __DEV__ && workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$34) { - handleThrow(root, thrownValue$34); + } catch (thrownValue$4) { + handleThrow(root, thrownValue$4); } while (1); lanes && root.shellSuspendCounter++; @@ -13286,7 +13213,7 @@ __DEV__ && } break; default: - error$jscomp$0( + console.error( "Unexpected type of fiber triggered a suspensey commit. This is a bug in React." ); } @@ -13322,8 +13249,8 @@ __DEV__ && ? workLoopSync() : workLoopConcurrentByScheduler(); break; - } catch (thrownValue$35) { - handleThrow(root, thrownValue$35); + } catch (thrownValue$5) { + handleThrow(root, thrownValue$5); } while (1); resetContextDependencies(); @@ -13465,9 +13392,8 @@ __DEV__ && workInProgress = null; return; } - } catch (error$36) { - if (null !== returnFiber) - throw ((workInProgress = returnFiber), error$36); + } catch (error) { + if (null !== returnFiber) throw ((workInProgress = returnFiber), error); workInProgressRootExitStatus = RootFatalErrored; logUncaughtError( root, @@ -13596,7 +13522,7 @@ __DEV__ && enableSchedulingProfiler && markCommitStopped(); else { 0 === lanes && - error$jscomp$0( + console.error( "finishedLanes should not be empty during a commit. This is a bug in React." ); if (finishedWork === root.current) @@ -13801,7 +13727,7 @@ __DEV__ && } catch (err) { hasLoggedError || ((hasLoggedError = !0), - error$jscomp$0( + console.error( "React instrumentation encountered an error: %s", err )); @@ -13867,7 +13793,7 @@ __DEV__ && componentStack = { componentStack: componentStack }; Object.defineProperty(componentStack, "digest", { get: function () { - error$jscomp$0( + console.error( 'You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.' ); } @@ -13973,7 +13899,7 @@ __DEV__ && } catch (err) { hasLoggedError || ((hasLoggedError = !0), - error$jscomp$0( + console.error( "React instrumentation encountered an error: %s", err )); @@ -13993,18 +13919,18 @@ __DEV__ && function captureCommitPhaseError( sourceFiber, nearestMountedAncestor, - error$1 + error ) { isRunningInsertionEffect = !1; if (3 === sourceFiber.tag) - captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error$1); + captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error); else { for (; null !== nearestMountedAncestor; ) { if (3 === nearestMountedAncestor.tag) { captureCommitPhaseErrorOnRoot( nearestMountedAncestor, sourceFiber, - error$1 + error ); return; } @@ -14017,12 +13943,12 @@ __DEV__ && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(instance))) ) { - sourceFiber = createCapturedValueAtFiber(error$1, sourceFiber); - error$1 = createClassErrorUpdate(2); - instance = enqueueUpdate(nearestMountedAncestor, error$1, 2); + sourceFiber = createCapturedValueAtFiber(error, sourceFiber); + error = createClassErrorUpdate(2); + instance = enqueueUpdate(nearestMountedAncestor, error, 2); null !== instance && (initializeClassErrorUpdate( - error$1, + error, instance, nearestMountedAncestor, sourceFiber @@ -14034,9 +13960,9 @@ __DEV__ && } nearestMountedAncestor = nearestMountedAncestor.return; } - error$jscomp$0( + console.error( "Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.\n\nError message:\n\n%s", - error$1 + error ); } } @@ -14070,7 +13996,7 @@ __DEV__ && throwIfInfiniteUpdateLoopDetected()); isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && - error$jscomp$0( + console.error( "A suspended resource finished loading inside a test, but the event was not wrapped in act(...).\n\nWhen testing, code that resolves suspended data should be wrapped into act(...):\n\nact(() => {\n /* finish loading suspended data */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act" ); workInProgressRoot === root && @@ -14139,7 +14065,7 @@ __DEV__ && nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT && ((nestedPassiveUpdateCount = 0), (rootWithPassiveNestedUpdates = null), - error$jscomp$0( + console.error( "Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render." )); } @@ -14228,7 +14154,7 @@ __DEV__ && didWarnStateUpdateForNotYetMountedComponent.add(tag); } else didWarnStateUpdateForNotYetMountedComponent = new Set([tag]); runWithFiberInDEV(fiber, function () { - error$jscomp$0( + console.error( "Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead." ); }); @@ -14251,7 +14177,7 @@ __DEV__ && isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && runWithFiberInDEV(fiber, function () { - error$jscomp$0( + console.error( "An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act", getComponentNameFromFiber(fiber) ); @@ -14596,7 +14522,7 @@ __DEV__ && return ( (type = pendingProps), "string" !== typeof type.id && - error$jscomp$0( + console.error( 'Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.', typeof type.id ), @@ -14884,7 +14810,7 @@ __DEV__ && } catch (err) { hasLoggedError || ((hasLoggedError = !0), - error$jscomp$0( + console.error( "React instrumentation encountered an error: %s", err )); @@ -14902,7 +14828,7 @@ __DEV__ && null !== current && !didWarnAboutNestedUpdates && ((didWarnAboutNestedUpdates = !0), - error$jscomp$0( + console.error( "Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.", getComponentNameFromFiber(current) || "Unknown" )); @@ -14911,7 +14837,7 @@ __DEV__ && callback = void 0 === callback ? null : callback; null !== callback && ("function" !== typeof callback && - error$jscomp$0( + console.error( "Expected the last optional `callback` argument to be a function. Instead received: %s.", callback ), @@ -14945,10 +14871,6 @@ __DEV__ && Mode$1 = require("art/modes/current"), Scheduler = require("scheduler"), FastNoSideEffects = require("art/modes/fast-noSideEffects"), - enableRemoveConsolePatches = - require("ReactFeatureFlags").enableRemoveConsolePatches, - warningWWW = require("warning"), - suppressWarning = !1, assign = Object.assign, dynamicFeatureFlags = require("ReactFeatureFlags"), alwaysThrottleRetries = dynamicFeatureFlags.alwaysThrottleRetries, @@ -15265,7 +15187,7 @@ __DEV__ && var sortedNames = setToSortedString( UNSAFE_componentWillMountUniqueNames ); - error$jscomp$0( + console.error( "Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s", sortedNames ); @@ -15274,7 +15196,7 @@ __DEV__ && ((sortedNames = setToSortedString( UNSAFE_componentWillReceivePropsUniqueNames )), - error$jscomp$0( + console.error( "Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n\nPlease update the following components: %s", sortedNames )); @@ -15282,13 +15204,13 @@ __DEV__ && ((sortedNames = setToSortedString( UNSAFE_componentWillUpdateUniqueNames )), - error$jscomp$0( + console.error( "Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s", sortedNames )); 0 < componentWillMountUniqueNames.size && ((sortedNames = setToSortedString(componentWillMountUniqueNames)), - warn( + console.warn( "componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", sortedNames )); @@ -15296,13 +15218,13 @@ __DEV__ && ((sortedNames = setToSortedString( componentWillReceivePropsUniqueNames )), - warn( + console.warn( "componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", sortedNames )); 0 < componentWillUpdateUniqueNames.size && ((sortedNames = setToSortedString(componentWillUpdateUniqueNames)), - warn( + console.warn( "componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", sortedNames )); @@ -15317,7 +15239,7 @@ __DEV__ && for (var node = fiber; null !== node; ) node.mode & 8 && (strictRoot = node), (node = node.return); null === strictRoot - ? error$jscomp$0( + ? console.error( "Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue." ) : !didWarnAboutLegacyContext.has(fiber.type) && @@ -15341,7 +15263,7 @@ __DEV__ && }); var sortedNames = setToSortedString(uniqueNames); runWithFiberInDEV(firstFiber, function () { - error$jscomp$0( + console.error( "Legacy context API has been detected within a strict-mode tree.\n\nThe old API will be supported in all 16.x releases, but applications using it should migrate to the new version.\n\nPlease update the following components: %s\n\nLearn more about this warning here: https://react.dev/link/legacy-context", sortedNames ); @@ -15369,7 +15291,7 @@ __DEV__ && ), noopSuspenseyCommitThenable = { then: function () { - error$jscomp$0( + console.error( 'Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.' ); } @@ -15479,7 +15401,7 @@ __DEV__ && null !== updateDeps && isArrayImpl(updateDeps) && 0 === updateDeps.length && - error$jscomp$0( + console.error( "%s received a dependency array with no dependencies. When specified, the dependency array must have at least one dependency.", currentHookNameInDev ); @@ -16531,8 +16453,8 @@ __DEV__ && "react-stack-bottom-frame": function (finishedWork, instance) { try { instance.componentDidMount(); - } catch (error$7) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$7); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } }, @@ -16549,8 +16471,8 @@ __DEV__ && ) { try { instance.componentDidUpdate(prevProps, prevState, snapshot); - } catch (error$8) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$8); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } }, @@ -16576,8 +16498,8 @@ __DEV__ && ) { try { instance.componentWillUnmount(); - } catch (error$9) { - captureCommitPhaseError(current, nearestMountedAncestor, error$9); + } catch (error) { + captureCommitPhaseError(current, nearestMountedAncestor, error); } } }, @@ -16601,7 +16523,7 @@ __DEV__ && effect.update(effect.inst.resource); break; default: - error$jscomp$0( + console.error( "Unhandled Effect kind %s. This is a bug in React.", effect.kind ); @@ -16609,7 +16531,7 @@ __DEV__ && } else return ( null != effect.resourceKind && - error$jscomp$0( + console.error( "Expected only SimpleEffects when enableUseEffectCRUDOverload is disabled, got %s", effect.resourceKind ), @@ -16629,8 +16551,8 @@ __DEV__ && ) { try { destroy(); - } catch (error$10) { - captureCommitPhaseError(current, nearestMountedAncestor, error$10); + } catch (error) { + captureCommitPhaseError(current, nearestMountedAncestor, error); } } }, @@ -16694,7 +16616,7 @@ __DEV__ && (childOwnerAppendix = " It was passed a child from " + componentName + ".")); runWithFiberInDEV(workInProgress, function () { - error$jscomp$0( + console.error( 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.', currentComponentErrorInfo, childOwnerAppendix @@ -17159,10 +17081,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.1.0-www-modern-9b042f9d-20250221", + version: "19.1.0-www-modern-25677265-20250224", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-9b042f9d-20250221" + reconcilerVersion: "19.1.0-www-modern-25677265-20250224" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -17196,7 +17118,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.1.0-www-modern-9b042f9d-20250221"; + exports.version = "19.1.0-www-modern-25677265-20250224"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index d4bb8e954373b..230f6d1fcd385 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -11257,10 +11257,10 @@ var slice = Array.prototype.slice, })(React.Component); var internals$jscomp$inline_1550 = { bundleType: 0, - version: "19.1.0-www-classic-9b042f9d-20250221", + version: "19.1.0-www-classic-25677265-20250224", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-9b042f9d-20250221" + reconcilerVersion: "19.1.0-www-classic-25677265-20250224" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1551 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -11286,4 +11286,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.1.0-www-classic-9b042f9d-20250221"; +exports.version = "19.1.0-www-classic-25677265-20250224"; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index ae6a692c82d56..e566de585f1bd 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -10972,10 +10972,10 @@ var slice = Array.prototype.slice, })(React.Component); var internals$jscomp$inline_1523 = { bundleType: 0, - version: "19.1.0-www-modern-9b042f9d-20250221", + version: "19.1.0-www-modern-25677265-20250224", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-9b042f9d-20250221" + reconcilerVersion: "19.1.0-www-modern-25677265-20250224" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1524 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -11001,4 +11001,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.1.0-www-modern-9b042f9d-20250221"; +exports.version = "19.1.0-www-modern-25677265-20250224"; diff --git a/compiled/facebook-www/ReactCacheOld-dev.classic.js b/compiled/facebook-www/ReactCacheOld-dev.classic.js index 41be0787f3839..c8525f1e030ba 100644 --- a/compiled/facebook-www/ReactCacheOld-dev.classic.js +++ b/compiled/facebook-www/ReactCacheOld-dev.classic.js @@ -13,31 +13,6 @@ "use strict"; __DEV__ && (function () { - function error$jscomp$0(format) { - for ( - var _len2 = arguments.length, - args = Array(1 < _len2 ? _len2 - 1 : 0), - _key2 = 1; - _key2 < _len2; - _key2++ - ) - args[_key2 - 1] = arguments[_key2]; - if (enableRemoveConsolePatches) { - var _console2; - (_console2 = console).error.apply(_console2, [format].concat(args)); - } else - (_len2 = format), - enableRemoveConsolePatches || - ((_key2 = - require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE), - null != _key2 && - _key2.getCurrentStack && - ((_key2 = _key2.getCurrentStack()), - "" !== _key2 && ((_len2 += "%s"), args.push(_key2))), - args.unshift(_len2), - args.unshift(!1), - warningWWW.apply(null, args)); - } function readContext(Context) { var dispatcher = SharedInternals.H; if (null === dispatcher) @@ -52,7 +27,7 @@ __DEV__ && "boolean" !== typeof input && void 0 !== input && null !== input && - error$jscomp$0( + console.error( "Invalid key type. Expected a string, number, symbol, or boolean, but instead received: %s\n\nTo use non-primitive values as keys, you must pass a hash function as the second argument to createResource().", input ); @@ -97,9 +72,6 @@ __DEV__ && } var React = require("react"), Scheduler = require("scheduler"), - enableRemoveConsolePatches = - require("ReactFeatureFlags").enableRemoveConsolePatches, - warningWWW = require("warning"), scheduleCallback = Scheduler.unstable_scheduleCallback, IdlePriority = Scheduler.unstable_IdlePriority, SharedInternals = diff --git a/compiled/facebook-www/ReactCacheOld-dev.modern.js b/compiled/facebook-www/ReactCacheOld-dev.modern.js index 41be0787f3839..c8525f1e030ba 100644 --- a/compiled/facebook-www/ReactCacheOld-dev.modern.js +++ b/compiled/facebook-www/ReactCacheOld-dev.modern.js @@ -13,31 +13,6 @@ "use strict"; __DEV__ && (function () { - function error$jscomp$0(format) { - for ( - var _len2 = arguments.length, - args = Array(1 < _len2 ? _len2 - 1 : 0), - _key2 = 1; - _key2 < _len2; - _key2++ - ) - args[_key2 - 1] = arguments[_key2]; - if (enableRemoveConsolePatches) { - var _console2; - (_console2 = console).error.apply(_console2, [format].concat(args)); - } else - (_len2 = format), - enableRemoveConsolePatches || - ((_key2 = - require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE), - null != _key2 && - _key2.getCurrentStack && - ((_key2 = _key2.getCurrentStack()), - "" !== _key2 && ((_len2 += "%s"), args.push(_key2))), - args.unshift(_len2), - args.unshift(!1), - warningWWW.apply(null, args)); - } function readContext(Context) { var dispatcher = SharedInternals.H; if (null === dispatcher) @@ -52,7 +27,7 @@ __DEV__ && "boolean" !== typeof input && void 0 !== input && null !== input && - error$jscomp$0( + console.error( "Invalid key type. Expected a string, number, symbol, or boolean, but instead received: %s\n\nTo use non-primitive values as keys, you must pass a hash function as the second argument to createResource().", input ); @@ -97,9 +72,6 @@ __DEV__ && } var React = require("react"), Scheduler = require("scheduler"), - enableRemoveConsolePatches = - require("ReactFeatureFlags").enableRemoveConsolePatches, - warningWWW = require("warning"), scheduleCallback = Scheduler.unstable_scheduleCallback, IdlePriority = Scheduler.unstable_IdlePriority, SharedInternals = diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 15166202efde1..7eb1c66ec25a7 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -30,11 +30,11 @@ __DEV__ && } function copyWithRename(obj, oldPath, newPath) { if (oldPath.length !== newPath.length) - warn("copyWithRename() expects paths of the same length"); + console.warn("copyWithRename() expects paths of the same length"); else { for (var i = 0; i < newPath.length - 1; i++) if (oldPath[i] !== newPath[i]) { - warn( + console.warn( "copyWithRename() expects paths to be the same except for the deepest key" ); return; @@ -98,12 +98,12 @@ __DEV__ && } function warnForMissingKey() {} function warnInvalidHookAccess() { - error$jscomp$0( + console.error( "Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks" ); } function warnInvalidContextAccess() { - error$jscomp$0( + console.error( "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." ); } @@ -253,53 +253,13 @@ __DEV__ && } return !1; } - function warn(format) { - for ( - var _len = arguments.length, - args = Array(1 < _len ? _len - 1 : 0), - _key = 1; - _key < _len; - _key++ - ) - args[_key - 1] = arguments[_key]; - if (enableRemoveConsolePatches) { - var _console; - (_console = console).warn.apply(_console, [format].concat(args)); - } else suppressWarning || printWarning("warn", format, args); - } - function error$jscomp$0(format) { - for ( - var _len2 = arguments.length, - args = Array(1 < _len2 ? _len2 - 1 : 0), - _key2 = 1; - _key2 < _len2; - _key2++ - ) - args[_key2 - 1] = arguments[_key2]; - if (enableRemoveConsolePatches) { - var _console2; - (_console2 = console).error.apply(_console2, [format].concat(args)); - } else suppressWarning || printWarning("error", format, args); - } - function printWarning(level, format, args) { - enableRemoveConsolePatches || - ((level = - require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE), - null != level && - level.getCurrentStack && - ((level = level.getCurrentStack()), - "" !== level && ((format += "%s"), args.push(level))), - args.unshift(format), - args.unshift(!1), - warningWWW.apply(null, args)); - } function injectInternals(internals) { if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; if (hook.isDisabled) return !0; if (!hook.supportsFiber) return ( - error$jscomp$0( + console.error( "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools" ), !0 @@ -307,7 +267,7 @@ __DEV__ && try { (rendererID = hook.inject(internals)), (injectedHook = hook); } catch (err) { - error$jscomp$0("React instrumentation encountered an error: %s.", err); + console.error("React instrumentation encountered an error: %s.", err); } return hook.checkDCE ? !0 : !1; } @@ -340,7 +300,7 @@ __DEV__ && } catch (err) { hasLoggedError || ((hasLoggedError = !0), - error$jscomp$0( + console.error( "React instrumentation encountered an error: %s", err )); @@ -348,15 +308,14 @@ __DEV__ && } function setIsStrictModeForDevtools(newIsStrictMode) { "function" === typeof log$1 && - (unstable_setDisableYieldValue(newIsStrictMode), - enableRemoveConsolePatches || (suppressWarning = newIsStrictMode)); + unstable_setDisableYieldValue(newIsStrictMode); if (injectedHook && "function" === typeof injectedHook.setStrictMode) try { injectedHook.setStrictMode(rendererID, newIsStrictMode); } catch (err) { hasLoggedError || ((hasLoggedError = !0), - error$jscomp$0( + console.error( "React instrumentation encountered an error: %s", err )); @@ -477,7 +436,7 @@ __DEV__ && return 0; default: return ( - error$jscomp$0( + console.error( "Should have found matching lanes. This is a bug in React." ), lanes @@ -576,7 +535,7 @@ __DEV__ && return -1; default: return ( - error$jscomp$0( + console.error( "Should have found matching lanes. This is a bug in React." ), -1 @@ -775,7 +734,7 @@ __DEV__ && function resolveDispatcher() { var dispatcher = ReactSharedInternals.H; null === dispatcher && - error$jscomp$0( + console.error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem." ); return dispatcher; @@ -785,9 +744,9 @@ __DEV__ && } function pop(cursor, fiber) { 0 > index$jscomp$0 - ? error$jscomp$0("Unexpected pop.") + ? console.error("Unexpected pop.") : (fiber !== fiberStack[index$jscomp$0] && - error$jscomp$0("Unexpected Fiber popped."), + console.error("Unexpected Fiber popped."), (cursor.current = valueStack[index$jscomp$0]), (valueStack[index$jscomp$0] = null), (fiberStack[index$jscomp$0] = null), @@ -801,7 +760,7 @@ __DEV__ && } function requiredContext(c) { null === c && - error$jscomp$0( + console.error( "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue." ); return c; @@ -907,7 +866,7 @@ __DEV__ && function checkAttributeStringCoercion(value, attributeName) { if (willCoercionThrow(value)) return ( - error$jscomp$0( + console.error( "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.", attributeName, typeName(value) @@ -918,7 +877,7 @@ __DEV__ && function checkCSSPropertyStringCoercion(value, propName) { if (willCoercionThrow(value)) return ( - error$jscomp$0( + console.error( "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.", propName, typeName(value) @@ -929,7 +888,7 @@ __DEV__ && function checkFormFieldValueStringCoercion(value) { if (willCoercionThrow(value)) return ( - error$jscomp$0( + console.error( "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.", typeName(value) ), @@ -966,7 +925,7 @@ __DEV__ && } function registerDirectEvent(registrationName, dependencies) { registrationNameDependencies[registrationName] && - error$jscomp$0( + console.error( "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", registrationName ); @@ -990,17 +949,17 @@ __DEV__ && props.disabled || null == props.value || ("select" === tagName - ? error$jscomp$0( + ? console.error( "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`." ) - : error$jscomp$0( + : console.error( "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`." )); props.onChange || props.readOnly || props.disabled || null == props.checked || - error$jscomp$0( + console.error( "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`." ); } @@ -1012,7 +971,7 @@ __DEV__ && if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) return (validatedAttributeNameCache[attributeName] = !0); illegalAttributeNameCache[attributeName] = !0; - error$jscomp$0("Invalid attribute name: `%s`", attributeName); + console.error("Invalid attribute name: `%s`", attributeName); return !1; } function trackHostMutation() { @@ -1142,7 +1101,7 @@ __DEV__ && }); } 0 > disabledDepth && - error$jscomp$0( + console.error( "disabledDepth fell below zero. This is a bug in React. Please file an issue." ); } @@ -1423,7 +1382,7 @@ __DEV__ && if ("object" === typeof type) switch ( ("number" === typeof type.tag && - error$jscomp$0( + console.error( "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." ), type.$$typeof) @@ -1739,7 +1698,7 @@ __DEV__ && void 0 === props.checked || void 0 === props.defaultChecked || didWarnCheckedDefaultChecked || - (error$jscomp$0( + (console.error( "%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type @@ -1748,7 +1707,7 @@ __DEV__ && void 0 === props.value || void 0 === props.defaultValue || didWarnValueDefaultValue$1 || - (error$jscomp$0( + (console.error( "%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type @@ -1860,19 +1819,19 @@ __DEV__ && "bigint" === typeof child || didWarnInvalidChild || ((didWarnInvalidChild = !0), - error$jscomp$0( + console.error( "Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to