Skip to content

Instantly share code, notes, and snippets.

@bvaughn
Last active August 31, 2018 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bvaughn/d900b1b3cff04ca939bbefbf60702fc5 to your computer and use it in GitHub Desktop.
Save bvaughn/d900b1b3cff04ca939bbefbf60702fc5 to your computer and use it in GitHub Desktop.
React PR #13509 bundle diffs
1c1
< /** @license React v16.4.2
---
> /** @license React v16.4.3-alpha.0
18d17
< var invariant = require('fbjs/lib/invariant');
20,21d18
< var warning = require('fbjs/lib/warning');
< var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
23d19
< var emptyFunction = require('fbjs/lib/emptyFunction');
25,30c21,64
< var getActiveElement = require('fbjs/lib/getActiveElement');
< var shallowEqual = require('fbjs/lib/shallowEqual');
< var containsNode = require('fbjs/lib/containsNode');
< var emptyObject = require('fbjs/lib/emptyObject');
< var hyphenateStyleName = require('fbjs/lib/hyphenateStyleName');
< var camelizeStyleName = require('fbjs/lib/camelizeStyleName');
---
> var reactScheduler = require('react-scheduler');
> var tracking = require('react-scheduler/tracking');
>
> /**
> * Use invariant() to assert state which your program assumes to be true.
> *
> * Provide sprintf-style format (only %s is supported) and arguments
> * to provide information about what broke and what you were
> * expecting.
> *
> * The invariant message will be stripped in production, but the invariant
> * will remain to ensure logic does not differ in production.
> */
>
> var validateFormat = function () {};
>
> {
> validateFormat = function (format) {
> if (format === undefined) {
> throw new Error('invariant requires an error message argument');
> }
> };
> }
>
> function invariant(condition, format, a, b, c, d, e, f) {
> validateFormat(format);
>
> if (!condition) {
> var error = void 0;
> if (format === undefined) {
> error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
> } else {
> var args = [a, b, c, d, e, f];
> var argIndex = 0;
> error = new Error(format.replace(/%s/g, function () {
> return args[argIndex++];
> }));
> error.name = 'Invariant Violation';
> }
>
> error.framesToPop = 1; // we don't care about invariant's own frame
> throw error;
> }
> }
33c67
< // have preserve the format and params in the www builds.
---
> // preserve the format and params in the www builds.
37,39c71
< var invokeGuardedCallback = function (name, func, context, a, b, c, d, e, f) {
< this._hasCaughtError = false;
< this._caughtError = null;
---
> var invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) {
44,45c76
< this._caughtError = error;
< this._hasCaughtError = true;
---
> this.onError(error);
89a121,125
> // Keeps track of the value of window.event so that we can reset it
> // during the callback to let user code access window.event in the
> // browsers that support it.
> var windowEvent = window.event;
>
99a136,144
>
> // We check for window.hasOwnProperty('event') to prevent the
> // window.event assignment in both IE <= 10 as they throw an error
> // "Member not found" in strict mode, and in Firefox which does not
> // support window.event.
> if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
> window.event = windowEvent;
> }
>
120c165
< function onError(event) {
---
> function handleWindowError(event) {
125a171,182
> if (event.defaultPrevented) {
> // Some other error handler has prevented default.
> // Browsers silence the error report if this happens.
> // We'll remember this to later decide whether to log it or not.
> if (error != null && typeof error === 'object') {
> try {
> error._suppressLogging = true;
> } catch (inner) {
> // Ignore.
> }
> }
> }
132c189
< window.addEventListener('error', onError);
---
> window.addEventListener('error', handleWindowError);
147,151c204
< this._hasCaughtError = true;
< this._caughtError = error;
< } else {
< this._hasCaughtError = false;
< this._caughtError = null;
---
> this.onError(error);
155c208
< window.removeEventListener('error', onError);
---
> window.removeEventListener('error', handleWindowError);
158c211
< invokeGuardedCallback = invokeGuardedCallbackDev;
---
> invokeGuardedCallbackImpl = invokeGuardedCallbackDev;
162,171c215
< var invokeGuardedCallback$1 = invokeGuardedCallback;
<
< var ReactErrorUtils = {
< // Used by Fiber to simulate a try-catch.
< _caughtError: null,
< _hasCaughtError: false,
<
< // Used by event system to capture/rethrow the first error.
< _rethrowError: null,
< _hasRethrowError: false,
---
> var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
173,188c217,219
< /**
< * Call a function while guarding against errors that happens within it.
< * Returns an error if it throws, otherwise null.
< *
< * In production, this is implemented using a try-catch. The reason we don't
< * use a try-catch directly is so that we can swap out a different
< * implementation in DEV mode.
< *
< * @param {String} name of the guard to use for logging or debugging
< * @param {Function} func The function to invoke
< * @param {*} context The context to use when calling the function
< * @param {...*} args Arguments for function
< */
< invokeGuardedCallback: function (name, func, context, a, b, c, d, e, f) {
< invokeGuardedCallback$1.apply(ReactErrorUtils, arguments);
< },
---
> // Used by Fiber to simulate a try-catch.
> var hasError = false;
> var caughtError = null;
190,209c221,223
< /**
< * Same as invokeGuardedCallback, but instead of returning an error, it stores
< * it in a global so it can be rethrown by `rethrowCaughtError` later.
< * TODO: See if _caughtError and _rethrowError can be unified.
< *
< * @param {String} name of the guard to use for logging or debugging
< * @param {Function} func The function to invoke
< * @param {*} context The context to use when calling the function
< * @param {...*} args Arguments for function
< */
< invokeGuardedCallbackAndCatchFirstError: function (name, func, context, a, b, c, d, e, f) {
< ReactErrorUtils.invokeGuardedCallback.apply(this, arguments);
< if (ReactErrorUtils.hasCaughtError()) {
< var error = ReactErrorUtils.clearCaughtError();
< if (!ReactErrorUtils._hasRethrowError) {
< ReactErrorUtils._hasRethrowError = true;
< ReactErrorUtils._rethrowError = error;
< }
< }
< },
---
> // Used by event system to capture/rethrow the first error.
> var hasRethrowError = false;
> var rethrowError = null;
211,217c225,230
< /**
< * During execution of guarded functions we will capture the first error which
< * we will rethrow to be handled by the top level error handler.
< */
< rethrowCaughtError: function () {
< return rethrowCaughtError.apply(ReactErrorUtils, arguments);
< },
---
> var reporter = {
> onError: function (error) {
> hasError = true;
> caughtError = error;
> }
> };
219,221c232,249
< hasCaughtError: function () {
< return ReactErrorUtils._hasCaughtError;
< },
---
> /**
> * Call a function while guarding against errors that happens within it.
> * Returns an error if it throws, otherwise null.
> *
> * In production, this is implemented using a try-catch. The reason we don't
> * use a try-catch directly is so that we can swap out a different
> * implementation in DEV mode.
> *
> * @param {String} name of the guard to use for logging or debugging
> * @param {Function} func The function to invoke
> * @param {*} context The context to use when calling the function
> * @param {...*} args Arguments for function
> */
> function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
> hasError = false;
> caughtError = null;
> invokeGuardedCallbackImpl$1.apply(reporter, arguments);
> }
223,230c251,267
< clearCaughtError: function () {
< if (ReactErrorUtils._hasCaughtError) {
< var error = ReactErrorUtils._caughtError;
< ReactErrorUtils._caughtError = null;
< ReactErrorUtils._hasCaughtError = false;
< return error;
< } else {
< invariant(false, 'clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.');
---
> /**
> * Same as invokeGuardedCallback, but instead of returning an error, it stores
> * it in a global so it can be rethrown by `rethrowCaughtError` later.
> * TODO: See if caughtError and rethrowError can be unified.
> *
> * @param {String} name of the guard to use for logging or debugging
> * @param {Function} func The function to invoke
> * @param {*} context The context to use when calling the function
> * @param {...*} args Arguments for function
> */
> function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
> invokeGuardedCallback.apply(this, arguments);
> if (hasError) {
> var error = clearCaughtError();
> if (!hasRethrowError) {
> hasRethrowError = true;
> rethrowError = error;
233c270
< };
---
> }
235,239c272,280
< var rethrowCaughtError = function () {
< if (ReactErrorUtils._hasRethrowError) {
< var error = ReactErrorUtils._rethrowError;
< ReactErrorUtils._rethrowError = null;
< ReactErrorUtils._hasRethrowError = false;
---
> /**
> * During execution of guarded functions we will capture the first error which
> * we will rethrow to be handled by the top level error handler.
> */
> function rethrowCaughtError() {
> if (hasRethrowError) {
> var error = rethrowError;
> hasRethrowError = false;
> rethrowError = null;
242c283,298
< };
---
> }
>
> function hasCaughtError() {
> return hasError;
> }
>
> function clearCaughtError() {
> if (hasError) {
> var error = caughtError;
> hasError = false;
> caughtError = null;
> return error;
> } else {
> invariant(false, 'clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.');
> }
> }
418a475,518
> /**
> * Similar to invariant but only logs a warning if the condition is not met.
> * This can be used to log issues in development environments in critical
> * paths. Removing the logging code for production environments will keep the
> * same logic and follow the same code paths.
> */
>
> var warningWithoutStack = function () {};
>
> {
> warningWithoutStack = function (condition, format) {
> for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
> args[_key - 2] = arguments[_key];
> }
>
> if (format === undefined) {
> throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
> }
> if (condition) {
> return;
> }
> if (typeof console !== 'undefined') {
> var _console;
>
> var stringArgs = args.map(function (item) {
> return '' + item;
> });
> (_console = console).error.apply(_console, ['Warning: ' + format].concat(stringArgs));
> }
> try {
> // --- Welcome to debugging React ---
> // This error was thrown as a convenience so that you can use this stack
> // to find the callsite that caused this warning to fire.
> var argIndex = 0;
> var message = 'Warning: ' + format.replace(/%s/g, function () {
> return args[argIndex++];
> });
> throw new Error(message);
> } catch (x) {}
> };
> }
>
> var warningWithoutStack$1 = warningWithoutStack;
>
423,431c523,528
< var injection$1 = {
< injectComponentTree: function (Injected) {
< getFiberCurrentPropsFromNode = Injected.getFiberCurrentPropsFromNode;
< getInstanceFromNode = Injected.getInstanceFromNode;
< getNodeFromInstance = Injected.getNodeFromInstance;
<
< {
< !(getNodeFromInstance && getInstanceFromNode) ? warning(false, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
< }
---
> function setComponentTree(getFiberCurrentPropsFromNodeImpl, getInstanceFromNodeImpl, getNodeFromInstanceImpl) {
> getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl;
> getInstanceFromNode = getInstanceFromNodeImpl;
> getNodeFromInstance = getNodeFromInstanceImpl;
> {
> !(getNodeFromInstance && getInstanceFromNode) ? warningWithoutStack$1(false, 'EventPluginUtils.setComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
433c530
< };
---
> }
447c544
< !(instancesIsArr === listenersIsArr && instancesLen === listenersLen) ? warning(false, 'EventPluginUtils: Invalid `event`.') : void 0;
---
> !(instancesIsArr === listenersIsArr && instancesLen === listenersLen) ? warningWithoutStack$1(false, 'EventPluginUtils: Invalid `event`.') : void 0;
461c558
< ReactErrorUtils.invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
---
> invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
727c824
< ReactErrorUtils.rethrowCaughtError();
---
> rethrowCaughtError();
742,743c839,840
< var IndeterminateComponent = 0; // Before we know whether it is functional or class
< var FunctionalComponent = 1;
---
> var FunctionalComponent = 0;
> var FunctionalComponentLazy = 1;
745,756c842,853
< var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
< var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
< var HostComponent = 5;
< var HostText = 6;
<
<
<
< var Fragment = 10;
< var Mode = 11;
< var ContextConsumer = 12;
< var ContextProvider = 13;
< var ForwardRef = 14;
---
> var ClassComponentLazy = 3;
> var IndeterminateComponent = 4; // Before we know whether it is functional or class
> var HostRoot = 5; // Root of a host tree. Could be nested inside another node.
> var HostPortal = 6; // A subtree. Could be an entry point to a different renderer.
> var HostComponent = 7;
> var HostText = 8;
> var Fragment = 9;
> var Mode = 10;
> var ContextConsumer = 11;
> var ContextProvider = 12;
> var ForwardRef = 13;
> var ForwardRefLazy = 14;
758c855
< var TimeoutComponent = 16;
---
> var PlaceholderComponent = 16;
1002c1099
< !inst ? warning(false, 'Dispatching inst must not be null') : void 0;
---
> !inst ? warningWithoutStack$1(false, 'Dispatching inst must not be null') : void 0;
1084a1182,1183
> var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
>
1110,1111d1208
< prefixes['ms' + styleProp] = 'MS' + eventName;
< prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
1139c1236
< if (ExecutionEnvironment.canUseDOM) {
---
> if (canUseDOM) {
1206a1304
> var TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick');
1280,1296d1377
< var contentKey = null;
<
< /**
< * Gets the key used to access text content on a DOM node.
< *
< * @return {?string} Key used to access text content.
< * @internal
< */
< function getTextContentAccessor() {
< if (!contentKey && ExecutionEnvironment.canUseDOM) {
< // Prefer textContent to innerText because many browsers support both but
< // SVG <text> elements don't support innerText even when <div> does.
< contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';
< }
< return contentKey;
< }
<
1298c1379
< * This helper object stores information about text content of a target node,
---
> * These variables store information about text content of a target node,
1308,1312c1389,1392
< var compositionState = {
< _root: null,
< _startText: null,
< _fallbackText: null
< };
---
>
> var root = null;
> var startText = null;
> var fallbackText = null;
1315,1316c1395,1396
< compositionState._root = nativeEventTarget;
< compositionState._startText = getText();
---
> root = nativeEventTarget;
> startText = getText();
1321,1323c1401,1403
< compositionState._root = null;
< compositionState._startText = null;
< compositionState._fallbackText = null;
---
> root = null;
> startText = null;
> fallbackText = null;
1327,1328c1407,1408
< if (compositionState._fallbackText) {
< return compositionState._fallbackText;
---
> if (fallbackText) {
> return fallbackText;
1332c1412
< var startValue = compositionState._startText;
---
> var startValue = startText;
1352,1353c1432,1433
< compositionState._fallbackText = endValue.slice(start, sliceTail);
< return compositionState._fallbackText;
---
> fallbackText = endValue.slice(start, sliceTail);
> return fallbackText;
1357,1358c1437,1438
< if ('value' in compositionState._root) {
< return compositionState._root.value;
---
> if ('value' in root) {
> return root.value;
1360c1440
< return compositionState._root[getTextContentAccessor()];
---
> return root.textContent;
1365d1444
< var didWarnForAddedNewProperty = false;
1368,1369d1446
< var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];
<
1378c1455,1457
< currentTarget: emptyFunction.thatReturnsNull,
---
> currentTarget: function () {
> return null;
> },
1388a1468,1475
> function functionThatReturnsTrue() {
> return true;
> }
>
> function functionThatReturnsFalse() {
> return false;
> }
>
1412a1500,1501
> delete this.isDefaultPrevented;
> delete this.isPropagationStopped;
1441c1530
< this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
---
> this.isDefaultPrevented = functionThatReturnsTrue;
1443c1532
< this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
---
> this.isDefaultPrevented = functionThatReturnsFalse;
1445c1534
< this.isPropagationStopped = emptyFunction.thatReturnsFalse;
---
> this.isPropagationStopped = functionThatReturnsFalse;
1462c1551
< this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
---
> this.isDefaultPrevented = functionThatReturnsTrue;
1482c1571
< this.isPropagationStopped = emptyFunction.thatReturnsTrue;
---
> this.isPropagationStopped = functionThatReturnsTrue;
1491c1580
< this.isPersistent = emptyFunction.thatReturnsTrue;
---
> this.isPersistent = functionThatReturnsTrue;
1499c1588
< isPersistent: emptyFunction.thatReturnsFalse,
---
> isPersistent: functionThatReturnsFalse,
1511,1513c1600,1606
< for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
< this[shouldBeReleasedProperties[i]] = null;
< }
---
> this.dispatchConfig = null;
> this._targetInst = null;
> this.nativeEvent = null;
> this.isDefaultPrevented = functionThatReturnsFalse;
> this.isPropagationStopped = functionThatReturnsFalse;
> this._dispatchListeners = null;
> this._dispatchInstances = null;
1516,1517c1609,1612
< Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
< Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
---
> Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse));
> Object.defineProperty(this, 'isPropagationStopped', getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse));
> Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {}));
> Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {}));
1548,1579d1642
< /** Proxying after everything set on SyntheticEvent
< * to resolve Proxy issue on some WebKit browsers
< * in which some Event properties are set to undefined (GH#10010)
< */
< {
< var isProxySupported = typeof Proxy === 'function' &&
< // https://github.com/facebook/react/issues/12011
< !Object.isSealed(new Proxy({}, {}));
<
< if (isProxySupported) {
< /*eslint-disable no-func-assign */
< SyntheticEvent = new Proxy(SyntheticEvent, {
< construct: function (target, args) {
< return this.apply(target, Object.create(target.prototype), args);
< },
< apply: function (constructor, that, args) {
< return new Proxy(constructor.apply(that, args), {
< set: function (target, prop, value) {
< if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
< !(didWarnForAddedNewProperty || target.isPersistent()) ? warning(false, "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
< didWarnForAddedNewProperty = true;
< }
< target[prop] = value;
< return true;
< }
< });
< }
< });
< /*eslint-enable no-func-assign */
< }
< }
<
1612c1675
< !warningCondition ? warning(false, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
---
> !warningCondition ? warningWithoutStack$1(false, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
1628c1691
< !(event instanceof EventConstructor) ? invariant(false, 'Trying to release an event instance into a pool of a different type.') : void 0;
---
> !(event instanceof EventConstructor) ? invariant(false, 'Trying to release an event instance into a pool of a different type.') : void 0;
1641,1642d1703
< var SyntheticEvent$1 = SyntheticEvent;
<
1647c1708
< var SyntheticCompositionEvent = SyntheticEvent$1.extend({
---
> var SyntheticCompositionEvent = SyntheticEvent.extend({
1656c1717
< var SyntheticInputEvent = SyntheticEvent$1.extend({
---
> var SyntheticInputEvent = SyntheticEvent.extend({
1663c1724
< var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
---
> var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;
1666c1727
< if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
---
> if (canUseDOM && 'documentMode' in document) {
1673c1734
< var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode;
---
> var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode;
1678c1739
< var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
---
> var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
1800a1862,1875
> /**
> * Check if a composition event was triggered by Korean IME.
> * Our fallback mode does not work well with IE's Korean IME,
> * so just use native composition events when Korean IME is used.
> * Although CompositionEvent.locale property is deprecated,
> * it is available in IE, where our fallback mode is enabled.
> *
> * @param {object} nativeEvent
> * @return {boolean}
> */
> function isUsingKoreanIME(nativeEvent) {
> return nativeEvent.locale === 'ko';
> }
>
1825c1900
< if (useFallbackCompositionData) {
---
> if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
1965c2040
< return useFallbackCompositionData ? null : nativeEvent.data;
---
> return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;
2039,2048c2114
< var fiberHostComponent = null;
<
< var ReactControlledComponentInjection = {
< injectFiberControlledHostComponent: function (hostComponentImpl) {
< // The fiber implementation doesn't use dynamic dispatch so we need to
< // inject the implementation.
< fiberHostComponent = hostComponentImpl;
< }
< };
<
---
> var restoreImpl = null;
2060c2126
< !(fiberHostComponent && typeof fiberHostComponent.restoreControlledState === 'function') ? invariant(false, 'Fiber needs to be injected to handle a fiber target for controlled events. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(typeof restoreImpl === 'function') ? invariant(false, 'setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.') : void 0;
2062c2128
< fiberHostComponent.restoreControlledState(internalInstance.stateNode, internalInstance.type, props);
---
> restoreImpl(internalInstance.stateNode, internalInstance.type, props);
2065c2131,2133
< var injection$2 = ReactControlledComponentInjection;
---
> function setRestoreImplementation(impl) {
> restoreImpl = impl;
> }
2101c2169
< injection: injection$2,
---
> setRestoreImplementation: setRestoreImplementation,
2114c2182
< var _batchedUpdates = function (fn, bookkeeping) {
---
> var _batchedUpdatesImpl = function (fn, bookkeeping) {
2117c2185
< var _interactiveUpdates = function (fn, a, b) {
---
> var _interactiveUpdatesImpl = function (fn, a, b) {
2120c2188
< var _flushInteractiveUpdates = function () {};
---
> var _flushInteractiveUpdatesImpl = function () {};
2131c2199
< return _batchedUpdates(fn, bookkeeping);
---
> return _batchedUpdatesImpl(fn, bookkeeping);
2143c2211
< _flushInteractiveUpdates();
---
> _flushInteractiveUpdatesImpl();
2150c2218
< return _interactiveUpdates(fn, a, b);
---
> return _interactiveUpdatesImpl(fn, a, b);
2155,2161c2223,2227
< var injection$3 = {
< injectRenderer: function (renderer) {
< _batchedUpdates = renderer.batchedUpdates;
< _interactiveUpdates = renderer.interactiveUpdates;
< _flushInteractiveUpdates = renderer.flushInteractiveUpdates;
< }
< };
---
> function setBatchingImplementation(batchedUpdatesImpl, interactiveUpdatesImpl, flushInteractiveUpdatesImpl) {
> _batchedUpdatesImpl = batchedUpdatesImpl;
> _interactiveUpdatesImpl = interactiveUpdatesImpl;
> _flushInteractiveUpdatesImpl = flushInteractiveUpdatesImpl;
> }
2239d2304
< * @param {?boolean} capture Check if the capture phase is supported.
2244,2245c2309,2310
< function isEventSupported(eventNameSuffix, capture) {
< if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) {
---
> function isEventSupported(eventNameSuffix) {
> if (!canUseDOM) {
2369c2434
< var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
---
> var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2371,2372c2436
< var ReactCurrentOwner = ReactInternals.ReactCurrentOwner;
< var ReactDebugCurrentFrame = ReactInternals.ReactDebugCurrentFrame;
---
> var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
2375c2439,2461
< return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
---
> var sourceInfo = '';
> if (source) {
> var path = source.fileName;
> var fileName = path.replace(BEFORE_SLASH_RE, '');
> {
> // In DEV, include code for a common special case:
> // prefer "folder/index.js" instead of just "index.js".
> if (/^index\./.test(fileName)) {
> var match = path.match(BEFORE_SLASH_RE);
> if (match) {
> var pathBeforeSlash = match[1];
> if (pathBeforeSlash) {
> var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
> fileName = folderName + '/' + fileName;
> }
> }
> }
> }
> sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
> } else if (ownerName) {
> sourceInfo = ' (created by ' + ownerName + ')';
> }
> return '\n in ' + (name || 'Unknown') + sourceInfo;
2391c2477
< var REACT_TIMEOUT_TYPE = hasSymbol ? Symbol.for('react.timeout') : 0xead1;
---
> var REACT_PLACEHOLDER_TYPE = hasSymbol ? Symbol.for('react.placeholder') : 0xead1;
2397c2483
< if (maybeIterable === null || typeof maybeIterable === 'undefined') {
---
> if (maybeIterable === null || typeof maybeIterable !== 'object') {
2407,2408c2493,2503
< function getComponentName(fiber) {
< var type = fiber.type;
---
> var Pending = 0;
> var Resolved = 1;
> var Rejected = 2;
>
> function getResultFromResolvedThenable(thenable) {
> return thenable._reactResult;
> }
>
> function refineResolvedThenable(thenable) {
> return thenable._reactStatus === Resolved ? thenable._reactResult : null;
> }
2409a2505,2514
> function getComponentName(type) {
> if (type == null) {
> // Host root, text node or just invalid type.
> return null;
> }
> {
> if (typeof type.tag === 'number') {
> warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
> }
> }
2411c2516
< return type.displayName || type.name;
---
> return type.displayName || type.name || null;
2419,2420d2523
< case REACT_CONTEXT_TYPE:
< return 'Context.Consumer';
2422c2525
< return 'ReactFragment';
---
> return 'Fragment';
2424c2527
< return 'ReactPortal';
---
> return 'Portal';
2426,2428c2529
< return 'Profiler(' + fiber.pendingProps.id + ')';
< case REACT_PROVIDER_TYPE:
< return 'Context.Provider';
---
> return 'Profiler';
2431,2432c2532,2533
< case REACT_TIMEOUT_TYPE:
< return 'Timeout';
---
> case REACT_PLACEHOLDER_TYPE:
> return 'Placeholder';
2434c2535
< if (typeof type === 'object' && type !== null) {
---
> if (typeof type === 'object') {
2435a2537,2540
> case REACT_CONTEXT_TYPE:
> return 'Context.Consumer';
> case REACT_PROVIDER_TYPE:
> return 'Context.Provider';
2437c2542,2543
< var functionName = type.render.displayName || type.render.name || '';
---
> var renderFn = type.render;
> var functionName = renderFn.displayName || renderFn.name || '';
2439a2546,2552
> if (typeof type.then === 'function') {
> var thenable = type;
> var resolvedThenable = refineResolvedThenable(thenable);
> if (resolvedThenable) {
> return getComponentName(resolvedThenable);
> }
> }
2443a2557,2558
> var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
>
2447a2563
> case FunctionalComponentLazy:
2448a2565
> case ClassComponentLazy:
2449a2567
> case Mode:
2452c2570
< var name = getComponentName(fiber);
---
> var name = getComponentName(fiber.type);
2455c2573
< ownerName = getComponentName(owner);
---
> ownerName = getComponentName(owner.type);
2463,2466c2581
< // This function can only be called with a work-in-progress fiber and
< // only during begin or complete phase. Do not call it under any other
< // circumstances.
< function getStackAddendumByWorkInProgressFiber(workInProgress) {
---
> function getStackByFiberInDevAndProd(workInProgress) {
2471d2585
< // Otherwise this return pointer might point to the wrong tree:
2477c2591,2594
< function getCurrentFiberOwnerName$1() {
---
> var current = null;
> var phase = null;
>
> function getCurrentFiberOwnerNameInDevOrNull() {
2479,2480c2596
< var fiber = ReactDebugCurrentFiber.current;
< if (fiber === null) {
---
> if (current === null) {
2483c2599
< var owner = fiber._debugOwner;
---
> var owner = current._debugOwner;
2485c2601
< return getComponentName(owner);
---
> return getComponentName(owner.type);
2491c2607
< function getCurrentFiberStackAddendum$1() {
---
> function getCurrentFiberStackInDev() {
2493,2495c2609,2610
< var fiber = ReactDebugCurrentFiber.current;
< if (fiber === null) {
< return null;
---
> if (current === null) {
> return '';
2499c2614
< return getStackAddendumByWorkInProgressFiber(fiber);
---
> return getStackByFiberInDevAndProd(current);
2501c2616
< return null;
---
> return '';
2505,2507c2620,2624
< ReactDebugCurrentFrame.getCurrentStack = null;
< ReactDebugCurrentFiber.current = null;
< ReactDebugCurrentFiber.phase = null;
---
> {
> ReactDebugCurrentFrame.getCurrentStack = null;
> current = null;
> phase = null;
> }
2511,2528c2628,2667
< ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackAddendum$1;
< ReactDebugCurrentFiber.current = fiber;
< ReactDebugCurrentFiber.phase = null;
< }
<
< function setCurrentPhase(phase) {
< ReactDebugCurrentFiber.phase = phase;
< }
<
< var ReactDebugCurrentFiber = {
< current: null,
< phase: null,
< resetCurrentFiber: resetCurrentFiber,
< setCurrentFiber: setCurrentFiber,
< setCurrentPhase: setCurrentPhase,
< getCurrentFiberOwnerName: getCurrentFiberOwnerName$1,
< getCurrentFiberStackAddendum: getCurrentFiberStackAddendum$1
< };
---
> {
> ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;
> current = fiber;
> phase = null;
> }
> }
>
> function setCurrentPhase(lifeCyclePhase) {
> {
> phase = lifeCyclePhase;
> }
> }
>
> /**
> * Similar to invariant but only logs a warning if the condition is not met.
> * This can be used to log issues in development environments in critical
> * paths. Removing the logging code for production environments will keep the
> * same logic and follow the same code paths.
> */
>
> var warning = warningWithoutStack$1;
>
> {
> warning = function (condition, format) {
> if (condition) {
> return;
> }
> var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
> var stack = ReactDebugCurrentFrame.getStackAddendum();
> // eslint-disable-next-line react-internal/warning-and-invariant-args
>
> for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
> args[_key - 2] = arguments[_key];
> }
>
> warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack]));
> };
> }
>
> var warning$1 = warning;
2589c2728
< warning(false, 'Invalid attribute name: `%s`', attributeName);
---
> warning$1(false, 'Invalid attribute name: `%s`', attributeName);
2715c2854
< ['autoReverse', 'externalResourcesRequired', 'preserveAlpha'].forEach(function (name) {
---
> ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
2742c2881
< name.toLowerCase(), // attributeName
---
> name, // attributeName
2751c2890
< name.toLowerCase(), // attributeName
---
> name, // attributeName
2759c2898
< name.toLowerCase(), // attributeName
---
> name, // attributeName
2957a3097,3119
> // Flow does not allow string concatenation of most non-string types. To work
> // around this limitation, we use an opaque type that can only be obtained by
> // passing the value through getToStringValue first.
> function toString(value) {
> return '' + value;
> }
>
> function getToStringValue(value) {
> switch (typeof value) {
> case 'boolean':
> case 'number':
> case 'object':
> case 'string':
> case 'undefined':
> return value;
> default:
> // function, symbol are assigned as empty strings
> return '';
> }
> }
>
> var ReactDebugCurrentFrame$1 = null;
>
2962a3125,3126
> ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
>
2975c3139
< if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
---
> if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null) {
2981c3145
< if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
---
> if (props.onChange || props.readOnly || props.disabled || props[propName] == null) {
2992,2993c3156,3157
< ReactControlledValuePropTypes.checkPropTypes = function (tagName, props, getStack) {
< checkPropTypes(propTypes, props, 'prop', tagName, getStack);
---
> ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {
> checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$1.getStackAddendum);
2998,3000d3161
< var getCurrentFiberOwnerName = ReactDebugCurrentFiber.getCurrentFiberOwnerName;
< var getCurrentFiberStackAddendum = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
<
3044c3205
< ReactControlledValuePropTypes.checkPropTypes('input', props, getCurrentFiberStackAddendum);
---
> ReactControlledValuePropTypes.checkPropTypes('input', props);
3047c3208
< warning(false, '%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://fb.me/react-controlled-components', getCurrentFiberOwnerName() || 'A component', props.type);
---
> warning$1(false, '%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://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
3051c3212
< warning(false, '%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://fb.me/react-controlled-components', getCurrentFiberOwnerName() || 'A component', props.type);
---
> warning$1(false, '%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://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
3061c3222
< initialValue: getSafeValue(props.value != null ? props.value : defaultValue),
---
> initialValue: getToStringValue(props.value != null ? props.value : defaultValue),
3080c3241
< warning(false, 'A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components%s', props.type, getCurrentFiberStackAddendum());
---
> warning$1(false, 'A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);
3084c3245
< warning(false, 'A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components%s', props.type, getCurrentFiberStackAddendum());
---
> warning$1(false, 'A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);
3091c3252,3253
< var value = getSafeValue(props.value);
---
> var value = getToStringValue(props.value);
> var type = props.type;
3094c3256
< if (props.type === 'number') {
---
> if (type === 'number') {
3095a3258
> // We explicitly want to coerce to number here if possible.
3098c3261
< node.value = '' + value;
---
> node.value = toString(value);
3100,3101c3263,3264
< } else if (node.value !== '' + value) {
< node.value = '' + value;
---
> } else if (node.value !== toString(value)) {
> node.value = toString(value);
3102a3266,3270
> } else if (type === 'submit' || type === 'reset') {
> // Submit/reset inputs need the attribute removed completely to avoid
> // blank-text buttons.
> node.removeAttribute('value');
> return;
3108c3276
< setDefaultValue(node, props.type, getSafeValue(props.defaultValue));
---
> setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
3120c3288,3295
< var _initialValue = '' + node._wrapperState.initialValue;
---
> // Avoid setting value attribute on submit/reset inputs as it overrides the
> // default value provided by the browser. See: #12872
> var type = props.type;
> if ((type === 'submit' || type === 'reset') && (props.value === undefined || props.value === null)) {
> return;
> }
>
> var _initialValue = toString(node._wrapperState.initialValue);
3150c3325
< node.defaultChecked = !node.defaultChecked;
---
> node.defaultChecked = !!node._wrapperState.initialChecked;
3217,3219c3392,3394
< node.defaultValue = '' + node._wrapperState.initialValue;
< } else if (node.defaultValue !== '' + value) {
< node.defaultValue = '' + value;
---
> node.defaultValue = toString(node._wrapperState.initialValue);
> } else if (node.defaultValue !== toString(value)) {
> node.defaultValue = toString(value);
3224,3237d3398
< function getSafeValue(value) {
< switch (typeof value) {
< case 'boolean':
< case 'number':
< case 'object':
< case 'string':
< case 'undefined':
< return value;
< default:
< // function, symbol are assigned as empty strings
< return '';
< }
< }
<
3249c3410
< var event = SyntheticEvent$1.getPooled(eventTypes$1.change, inst, nativeEvent, target);
---
> var event = SyntheticEvent.getPooled(eventTypes$1.change, inst, nativeEvent, target);
3308c3469
< if (ExecutionEnvironment.canUseDOM) {
---
> if (canUseDOM) {
3484c3645
< var SyntheticUIEvent = SyntheticEvent$1.extend({
---
> var SyntheticUIEvent = SyntheticEvent.extend({
3517a3679,3684
> var previousScreenX = 0;
> var previousScreenY = 0;
> // Use flags to signal movementX/Y has already been set
> var isMovementXSet = false;
> var isMovementYSet = false;
>
3538,3540c3705,3737
< }
< });
<
---
> },
> movementX: function (event) {
> if ('movementX' in event) {
> return event.movementX;
> }
>
> var screenX = previousScreenX;
> previousScreenX = event.screenX;
>
> if (!isMovementXSet) {
> isMovementXSet = true;
> return 0;
> }
>
> return event.type === 'mousemove' ? event.screenX - screenX : 0;
> },
> movementY: function (event) {
> if ('movementY' in event) {
> return event.movementY;
> }
>
> var screenY = previousScreenY;
> previousScreenY = event.screenY;
>
> if (!isMovementYSet) {
> isMovementYSet = true;
> return 0;
> }
>
> return event.type === 'mousemove' ? event.screenY - screenY : 0;
> }
> });
>
3549a3747
> tangentialPressure: null,
3551a3750
> twist: null,
3664a3864,3915
> /*eslint-disable no-self-compare */
>
> var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
>
> /**
> * inlined Object.is polyfill to avoid requiring consumers ship their own
> * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
> */
> function is(x, y) {
> // SameValue algorithm
> if (x === y) {
> // Steps 1-5, 7-10
> // Steps 6.b-6.e: +0 != -0
> // Added the nonzero y check to make Flow happy, but it is redundant
> return x !== 0 || y !== 0 || 1 / x === 1 / y;
> } else {
> // Step 6.a: NaN == NaN
> return x !== x && y !== y;
> }
> }
>
> /**
> * Performs equality by iterating through keys on an object and returning false
> * when any key has values which are not strictly equal between the arguments.
> * Returns true when the values of all keys are strictly equal.
> */
> function shallowEqual(objA, objB) {
> if (is(objA, objB)) {
> return true;
> }
>
> if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
> return false;
> }
>
> var keysA = Object.keys(objA);
> var keysB = Object.keys(objB);
>
> if (keysA.length !== keysB.length) {
> return false;
> }
>
> // Test for A's keys different from B.
> for (var i = 0; i < keysA.length; i++) {
> if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
> return false;
> }
> }
>
> return true;
> }
>
3708a3960,3962
> // Update & Callback & Ref & Snapshot
> var LifecycleEffectMask = /* */420;
>
3714a3969,3970
> var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
>
3754,3755c4010,4011
< var owner = ReactCurrentOwner.current;
< if (owner !== null && owner.tag === ClassComponent) {
---
> var owner = ReactCurrentOwner$1.current;
> if (owner !== null && (owner.tag === ClassComponent || owner.tag === ClassComponentLazy)) {
3758c4014
< !instance._warnedAboutRefsInRender ? warning(false, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber) || 'A component') : void 0;
---
> !instance._warnedAboutRefsInRender ? warningWithoutStack$1(false, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component') : void 0;
3965c4221
< var SyntheticAnimationEvent = SyntheticEvent$1.extend({
---
> var SyntheticAnimationEvent = SyntheticEvent.extend({
3975c4231
< var SyntheticClipboardEvent = SyntheticEvent$1.extend({
---
> var SyntheticClipboardEvent = SyntheticEvent.extend({
4206c4462
< var SyntheticTransitionEvent = SyntheticEvent$1.extend({
---
> var SyntheticTransitionEvent = SyntheticEvent.extend({
4255c4511
< var interactiveEventTypeNames = [[TOP_BLUR, 'blur'], [TOP_CANCEL, 'cancel'], [TOP_CLICK, 'click'], [TOP_CLOSE, 'close'], [TOP_CONTEXT_MENU, 'contextMenu'], [TOP_COPY, 'copy'], [TOP_CUT, 'cut'], [TOP_DOUBLE_CLICK, 'doubleClick'], [TOP_DRAG_END, 'dragEnd'], [TOP_DRAG_START, 'dragStart'], [TOP_DROP, 'drop'], [TOP_FOCUS, 'focus'], [TOP_INPUT, 'input'], [TOP_INVALID, 'invalid'], [TOP_KEY_DOWN, 'keyDown'], [TOP_KEY_PRESS, 'keyPress'], [TOP_KEY_UP, 'keyUp'], [TOP_MOUSE_DOWN, 'mouseDown'], [TOP_MOUSE_UP, 'mouseUp'], [TOP_PASTE, 'paste'], [TOP_PAUSE, 'pause'], [TOP_PLAY, 'play'], [TOP_POINTER_CANCEL, 'pointerCancel'], [TOP_POINTER_DOWN, 'pointerDown'], [TOP_POINTER_UP, 'pointerUp'], [TOP_RATE_CHANGE, 'rateChange'], [TOP_RESET, 'reset'], [TOP_SEEKED, 'seeked'], [TOP_SUBMIT, 'submit'], [TOP_TOUCH_CANCEL, 'touchCancel'], [TOP_TOUCH_END, 'touchEnd'], [TOP_TOUCH_START, 'touchStart'], [TOP_VOLUME_CHANGE, 'volumeChange']];
---
> var interactiveEventTypeNames = [[TOP_BLUR, 'blur'], [TOP_CANCEL, 'cancel'], [TOP_CLICK, 'click'], [TOP_CLOSE, 'close'], [TOP_CONTEXT_MENU, 'contextMenu'], [TOP_COPY, 'copy'], [TOP_CUT, 'cut'], [TOP_AUX_CLICK, 'auxClick'], [TOP_DOUBLE_CLICK, 'doubleClick'], [TOP_DRAG_END, 'dragEnd'], [TOP_DRAG_START, 'dragStart'], [TOP_DROP, 'drop'], [TOP_FOCUS, 'focus'], [TOP_INPUT, 'input'], [TOP_INVALID, 'invalid'], [TOP_KEY_DOWN, 'keyDown'], [TOP_KEY_PRESS, 'keyPress'], [TOP_KEY_UP, 'keyUp'], [TOP_MOUSE_DOWN, 'mouseDown'], [TOP_MOUSE_UP, 'mouseUp'], [TOP_PASTE, 'paste'], [TOP_PAUSE, 'pause'], [TOP_PLAY, 'play'], [TOP_POINTER_CANCEL, 'pointerCancel'], [TOP_POINTER_DOWN, 'pointerDown'], [TOP_POINTER_UP, 'pointerUp'], [TOP_RATE_CHANGE, 'rateChange'], [TOP_RESET, 'reset'], [TOP_SEEKED, 'seeked'], [TOP_SUBMIT, 'submit'], [TOP_TOUCH_CANCEL, 'touchCancel'], [TOP_TOUCH_END, 'touchEnd'], [TOP_TOUCH_START, 'touchStart'], [TOP_VOLUME_CHANGE, 'volumeChange']];
4328a4585
> case TOP_AUX_CLICK:
4388c4645
< warning(false, 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);
---
> warningWithoutStack$1(false, 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);
4393c4650
< EventConstructor = SyntheticEvent$1;
---
> EventConstructor = SyntheticEvent;
4688c4945
< if (isEventSupported(getRawEventName(dependency), true)) {
---
> if (isEventSupported(getRawEventName(dependency))) {
4723a4981,4992
> function getActiveElement(doc) {
> doc = doc || (typeof document !== 'undefined' ? document : undefined);
> if (typeof doc === 'undefined') {
> return null;
> }
> try {
> return doc.activeElement || doc.body;
> } catch (e) {
> return doc.body;
> }
> }
>
4788c5057,5060
< var selection = window.getSelection && window.getSelection();
---
> var ownerDocument = outerNode.ownerDocument;
>
> var win = ownerDocument && ownerDocument.defaultView || window;
> var selection = win.getSelection && win.getSelection();
4910,4915c5182,5185
< if (!window.getSelection) {
< return;
< }
<
< var selection = window.getSelection();
< var length = node[getTextContentAccessor()].length;
---
> var doc = node.ownerDocument || document;
> var win = doc ? doc.defaultView : window;
> var selection = win.getSelection();
> var length = node.textContent.length;
4934c5204
< var range = document.createRange();
---
> var range = doc.createRange();
4947a5218,5239
> function isTextNode(node) {
> return node && node.nodeType === TEXT_NODE;
> }
>
> function containsNode(outerNode, innerNode) {
> if (!outerNode || !innerNode) {
> return false;
> } else if (outerNode === innerNode) {
> return true;
> } else if (isTextNode(outerNode)) {
> return false;
> } else if (isTextNode(innerNode)) {
> return containsNode(outerNode, innerNode.parentNode);
> } else if ('contains' in outerNode) {
> return outerNode.contains(innerNode);
> } else if (outerNode.compareDocumentPosition) {
> return !!(outerNode.compareDocumentPosition(innerNode) & 16);
> } else {
> return false;
> }
> }
>
4949c5241,5257
< return containsNode(document.documentElement, node);
---
> return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
> }
>
> function getActiveElementDeep() {
> var win = window;
> var element = getActiveElement();
> while (element instanceof win.HTMLIFrameElement) {
> // Accessing the contentDocument of a HTMLIframeElement can cause the browser
> // to throw, e.g. if it has a cross-origin src attribute
> try {
> win = element.contentDocument.defaultView;
> } catch (e) {
> return element;
> }
> element = getActiveElement(win.document);
> }
> return element;
4970c5278
< var focusedElem = getActiveElement();
---
> var focusedElem = getActiveElementDeep();
4983c5291
< var curFocusedElem = getActiveElement();
---
> var curFocusedElem = getActiveElementDeep();
5061c5369
< var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;
---
> var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;
5069c5377
< dependencies: [TOP_BLUR, TOP_CONTEXT_MENU, TOP_FOCUS, TOP_KEY_DOWN, TOP_KEY_UP, TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_SELECTION_CHANGE]
---
> dependencies: [TOP_BLUR, TOP_CONTEXT_MENU, TOP_DRAG_END, TOP_FOCUS, TOP_KEY_DOWN, TOP_KEY_UP, TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_SELECTION_CHANGE]
5093,5094c5401,5403
< } else if (window.getSelection) {
< var selection = window.getSelection();
---
> } else {
> var win = node.ownerDocument && node.ownerDocument.defaultView || window;
> var selection = win.getSelection();
5104a5414,5423
> * Get document associated with the event target.
> *
> * @param {object} nativeEventTarget
> * @return {Document}
> */
> function getEventTargetDocument(eventTarget) {
> return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
> }
>
> /**
5107a5427
> * @param {object} nativeEventTarget
5115c5435,5437
< if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement()) {
---
> var doc = getEventTargetDocument(nativeEventTarget);
>
> if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
5124c5446
< var syntheticEvent = SyntheticEvent$1.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);
---
> var syntheticEvent = SyntheticEvent.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);
5155c5477
< var doc = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget.document : nativeEventTarget.nodeType === DOCUMENT_NODE ? nativeEventTarget : nativeEventTarget.ownerDocument;
---
> var doc = getEventTargetDocument(nativeEventTarget);
5184a5507
> case TOP_DRAG_END:
5214c5537
< injection$1.injectComponentTree(ReactDOMComponentTree);
---
> setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1);
5228,5593d5550
< // We capture a local reference to any global, in case it gets polyfilled after
< // this module is initially evaluated.
< // We want to be using a consistent implementation.
<
< var localRequestAnimationFrame$1 = typeof requestAnimationFrame === 'function' ? requestAnimationFrame : undefined;
<
< /**
< * A scheduling library to allow scheduling work with more granular priority and
< * control than requestAnimationFrame and requestIdleCallback.
< * Current TODO items:
< * X- Pull out the scheduleWork polyfill built into React
< * X- Initial test coverage
< * X- Support for multiple callbacks
< * - Support for two priorities; serial and deferred
< * - Better test coverage
< * - Better docblock
< * - Polish documentation, API
< */
<
< // This is a built-in polyfill for requestIdleCallback. It works by scheduling
< // a requestAnimationFrame, storing the time for the start of the frame, then
< // scheduling a postMessage which gets scheduled after paint. Within the
< // postMessage handler do as much work as possible until time + frame rate.
< // By separating the idle call into a separate event tick we ensure that
< // layout, paint and other browser work is counted against the available time.
< // The frame rate is dynamically adjusted.
<
< // We capture a local reference to any global, in case it gets polyfilled after
< // this module is initially evaluated.
< // We want to be using a consistent implementation.
< var localDate = Date;
< var localSetTimeout = setTimeout;
< var localClearTimeout = clearTimeout;
<
< var hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
<
< var now$1 = void 0;
< if (hasNativePerformanceNow) {
< var Performance = performance;
< now$1 = function () {
< return Performance.now();
< };
< } else {
< now$1 = function () {
< return localDate.now();
< };
< }
<
< var scheduleWork = void 0;
< var cancelScheduledWork = void 0;
<
< if (!ExecutionEnvironment.canUseDOM) {
< var timeoutIds = new Map();
<
< scheduleWork = function (callback, options) {
< // keeping return type consistent
< var callbackConfig = {
< scheduledCallback: callback,
< timeoutTime: 0,
< next: null,
< prev: null
< };
< var timeoutId = localSetTimeout(function () {
< callback({
< timeRemaining: function () {
< return Infinity;
< },
<
< didTimeout: false
< });
< });
< timeoutIds.set(callback, timeoutId);
< return callbackConfig;
< };
< cancelScheduledWork = function (callbackId) {
< var callback = callbackId.scheduledCallback;
< var timeoutId = timeoutIds.get(callback);
< timeoutIds.delete(callbackId);
< localClearTimeout(timeoutId);
< };
< } else {
< {
< if (typeof localRequestAnimationFrame$1 !== 'function') {
< warning(false, 'React depends on requestAnimationFrame. Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
< }
< }
<
< var localRequestAnimationFrame = typeof localRequestAnimationFrame$1 === 'function' ? localRequestAnimationFrame$1 : function (callback) {
< invariant(false, 'React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills');
< };
<
< var headOfPendingCallbacksLinkedList = null;
< var tailOfPendingCallbacksLinkedList = null;
<
< // We track what the next soonest timeoutTime is, to be able to quickly tell
< // if none of the scheduled callbacks have timed out.
< var nextSoonestTimeoutTime = -1;
<
< var isIdleScheduled = false;
< var isAnimationFrameScheduled = false;
<
< var frameDeadline = 0;
< // We start out assuming that we run at 30fps but then the heuristic tracking
< // will adjust this value to a faster fps if we get more frequent animation
< // frames.
< var previousFrameTime = 33;
< var activeFrameTime = 33;
<
< var frameDeadlineObject = {
< didTimeout: false,
< timeRemaining: function () {
< var remaining = frameDeadline - now$1();
< return remaining > 0 ? remaining : 0;
< }
< };
<
< /**
< * Handles the case where a callback errors:
< * - don't catch the error, because this changes debugging behavior
< * - do start a new postMessage callback, to call any remaining callbacks,
< * - but only if there is an error, so there is not extra overhead.
< */
< var callUnsafely = function (callbackConfig, arg) {
< var callback = callbackConfig.scheduledCallback;
< var finishedCalling = false;
< try {
< callback(arg);
< finishedCalling = true;
< } finally {
< // always remove it from linked list
< cancelScheduledWork(callbackConfig);
<
< if (!finishedCalling) {
< // an error must have been thrown
< isIdleScheduled = true;
< window.postMessage(messageKey, '*');
< }
< }
< };
<
< /**
< * Checks for timed out callbacks, runs them, and then checks again to see if
< * any more have timed out.
< * Keeps doing this until there are none which have currently timed out.
< */
< var callTimedOutCallbacks = function () {
< if (headOfPendingCallbacksLinkedList === null) {
< return;
< }
<
< var currentTime = now$1();
< // TODO: this would be more efficient if deferred callbacks are stored in
< // min heap.
< // Or in a linked list with links for both timeoutTime order and insertion
< // order.
< // For now an easy compromise is the current approach:
< // Keep a pointer to the soonest timeoutTime, and check that first.
< // If it has not expired, we can skip traversing the whole list.
< // If it has expired, then we step through all the callbacks.
< if (nextSoonestTimeoutTime === -1 || nextSoonestTimeoutTime > currentTime) {
< // We know that none of them have timed out yet.
< return;
< }
< // NOTE: we intentionally wait to update the nextSoonestTimeoutTime until
< // after successfully calling any timed out callbacks.
< // If a timed out callback throws an error, we could get stuck in a state
< // where the nextSoonestTimeoutTime was set wrong.
< var updatedNextSoonestTimeoutTime = -1; // we will update nextSoonestTimeoutTime below
< var timedOutCallbacks = [];
<
< // iterate once to find timed out callbacks and find nextSoonestTimeoutTime
< var currentCallbackConfig = headOfPendingCallbacksLinkedList;
< while (currentCallbackConfig !== null) {
< var _timeoutTime = currentCallbackConfig.timeoutTime;
< if (_timeoutTime !== -1 && _timeoutTime <= currentTime) {
< // it has timed out!
< timedOutCallbacks.push(currentCallbackConfig);
< } else {
< if (_timeoutTime !== -1 && (updatedNextSoonestTimeoutTime === -1 || _timeoutTime < updatedNextSoonestTimeoutTime)) {
< updatedNextSoonestTimeoutTime = _timeoutTime;
< }
< }
< currentCallbackConfig = currentCallbackConfig.next;
< }
<
< if (timedOutCallbacks.length > 0) {
< frameDeadlineObject.didTimeout = true;
< for (var i = 0, len = timedOutCallbacks.length; i < len; i++) {
< callUnsafely(timedOutCallbacks[i], frameDeadlineObject);
< }
< }
<
< // NOTE: we intentionally wait to update the nextSoonestTimeoutTime until
< // after successfully calling any timed out callbacks.
< nextSoonestTimeoutTime = updatedNextSoonestTimeoutTime;
< };
<
< // We use the postMessage trick to defer idle work until after the repaint.
< var messageKey = '__reactIdleCallback$' + Math.random().toString(36).slice(2);
< var idleTick = function (event) {
< if (event.source !== window || event.data !== messageKey) {
< return;
< }
< isIdleScheduled = false;
<
< if (headOfPendingCallbacksLinkedList === null) {
< return;
< }
<
< // First call anything which has timed out, until we have caught up.
< callTimedOutCallbacks();
<
< var currentTime = now$1();
< // Next, as long as we have idle time, try calling more callbacks.
< while (frameDeadline - currentTime > 0 && headOfPendingCallbacksLinkedList !== null) {
< var latestCallbackConfig = headOfPendingCallbacksLinkedList;
< frameDeadlineObject.didTimeout = false;
< // callUnsafely will remove it from the head of the linked list
< callUnsafely(latestCallbackConfig, frameDeadlineObject);
< currentTime = now$1();
< }
< if (headOfPendingCallbacksLinkedList !== null) {
< if (!isAnimationFrameScheduled) {
< // Schedule another animation callback so we retry later.
< isAnimationFrameScheduled = true;
< localRequestAnimationFrame(animationTick);
< }
< }
< };
< // Assumes that we have addEventListener in this environment. Might need
< // something better for old IE.
< window.addEventListener('message', idleTick, false);
<
< var animationTick = function (rafTime) {
< isAnimationFrameScheduled = false;
< var nextFrameTime = rafTime - frameDeadline + activeFrameTime;
< if (nextFrameTime < activeFrameTime && previousFrameTime < activeFrameTime) {
< if (nextFrameTime < 8) {
< // Defensive coding. We don't support higher frame rates than 120hz.
< // If we get lower than that, it is probably a bug.
< nextFrameTime = 8;
< }
< // If one frame goes long, then the next one can be short to catch up.
< // If two frames are short in a row, then that's an indication that we
< // actually have a higher frame rate than what we're currently optimizing.
< // We adjust our heuristic dynamically accordingly. For example, if we're
< // running on 120hz display or 90hz VR display.
< // Take the max of the two in case one of them was an anomaly due to
< // missed frame deadlines.
< activeFrameTime = nextFrameTime < previousFrameTime ? previousFrameTime : nextFrameTime;
< } else {
< previousFrameTime = nextFrameTime;
< }
< frameDeadline = rafTime + activeFrameTime;
< if (!isIdleScheduled) {
< isIdleScheduled = true;
< window.postMessage(messageKey, '*');
< }
< };
<
< scheduleWork = function (callback, options) /* CallbackConfigType */{
< var timeoutTime = -1;
< if (options != null && typeof options.timeout === 'number') {
< timeoutTime = now$1() + options.timeout;
< }
< if (nextSoonestTimeoutTime === -1 || timeoutTime !== -1 && timeoutTime < nextSoonestTimeoutTime) {
< nextSoonestTimeoutTime = timeoutTime;
< }
<
< var scheduledCallbackConfig = {
< scheduledCallback: callback,
< timeoutTime: timeoutTime,
< prev: null,
< next: null
< };
< if (headOfPendingCallbacksLinkedList === null) {
< // Make this callback the head and tail of our list
< headOfPendingCallbacksLinkedList = scheduledCallbackConfig;
< tailOfPendingCallbacksLinkedList = scheduledCallbackConfig;
< } else {
< // Add latest callback as the new tail of the list
< scheduledCallbackConfig.prev = tailOfPendingCallbacksLinkedList;
< // renaming for clarity
< var oldTailOfPendingCallbacksLinkedList = tailOfPendingCallbacksLinkedList;
< if (oldTailOfPendingCallbacksLinkedList !== null) {
< oldTailOfPendingCallbacksLinkedList.next = scheduledCallbackConfig;
< }
< tailOfPendingCallbacksLinkedList = scheduledCallbackConfig;
< }
<
< if (!isAnimationFrameScheduled) {
< // If rAF didn't already schedule one, we need to schedule a frame.
< // TODO: If this rAF doesn't materialize because the browser throttles, we
< // might want to still have setTimeout trigger scheduleWork as a backup to ensure
< // that we keep performing work.
< isAnimationFrameScheduled = true;
< localRequestAnimationFrame(animationTick);
< }
< return scheduledCallbackConfig;
< };
<
< cancelScheduledWork = function (callbackConfig /* CallbackConfigType */
< ) {
< if (callbackConfig.prev === null && headOfPendingCallbacksLinkedList !== callbackConfig) {
< // this callbackConfig has already been cancelled.
< // cancelScheduledWork should be idempotent, a no-op after first call.
< return;
< }
<
< /**
< * There are four possible cases:
< * - Head/nodeToRemove/Tail -> null
< * In this case we set Head and Tail to null.
< * - Head -> ... middle nodes... -> Tail/nodeToRemove
< * In this case we point the middle.next to null and put middle as the new
< * Tail.
< * - Head/nodeToRemove -> ...middle nodes... -> Tail
< * In this case we point the middle.prev at null and move the Head to
< * middle.
< * - Head -> ... ?some nodes ... -> nodeToRemove -> ... ?some nodes ... -> Tail
< * In this case we point the Head.next to the Tail and the Tail.prev to
< * the Head.
< */
< var next = callbackConfig.next;
< var prev = callbackConfig.prev;
< callbackConfig.next = null;
< callbackConfig.prev = null;
< if (next !== null) {
< // we have a next
<
< if (prev !== null) {
< // we have a prev
<
< // callbackConfig is somewhere in the middle of a list of 3 or more nodes.
< prev.next = next;
< next.prev = prev;
< return;
< } else {
< // there is a next but not a previous one;
< // callbackConfig is the head of a list of 2 or more other nodes.
< next.prev = null;
< headOfPendingCallbacksLinkedList = next;
< return;
< }
< } else {
< // there is no next callback config; this must the tail of the list
<
< if (prev !== null) {
< // we have a prev
<
< // callbackConfig is the tail of a list of 2 or more other nodes.
< prev.next = null;
< tailOfPendingCallbacksLinkedList = prev;
< return;
< } else {
< // there is no previous callback config;
< // callbackConfig is the only thing in the linked list,
< // so both head and tail point to it.
< headOfPendingCallbacksLinkedList = null;
< tailOfPendingCallbacksLinkedList = null;
< return;
< }
< }
< };
< }
<
5594a5552
> var didWarnInvalidChild = false;
5599,5602c5557,5561
< // Flatten children and warn if they aren't strings or numbers;
< // invalid types are ignored.
< // We can silently skip them because invalid DOM nesting warning
< // catches these cases in Fiber.
---
> // Flatten children. We'll warn if they are invalid
> // during validateProps() which runs for hydration too.
> // Note that this would throw on non-element objects.
> // Elements are stringified (which is normally irrelevant
> // but matters for <fbt>).
5607,5609c5566,5569
< if (typeof child === 'string' || typeof child === 'number') {
< content += child;
< }
---
> content += child;
> // Note: we don't warn about invalid children here.
> // Instead, this is done separately below so that
> // it happens during the hydration codepath too.
5620d5579
< // TODO (yungsters): Remove support for `selected` in <option>.
5621a5581,5603
> // This mirrors the codepath above, but runs for hydration too.
> // Warn about invalid children here so that client and hydration are consistent.
> // TODO: this seems like it could cause a DEV-only throw for hydration
> // if children contains a non-element object. We should try to avoid that.
> if (typeof props.children === 'object' && props.children !== null) {
> React.Children.forEach(props.children, function (child) {
> if (child == null) {
> return;
> }
> if (typeof child === 'string' || typeof child === 'number') {
> return;
> }
> if (typeof child.type !== 'string') {
> return;
> }
> if (!didWarnInvalidChild) {
> didWarnInvalidChild = true;
> warning$1(false, 'Only strings and numbers are supported as <option> children.');
> }
> });
> }
>
> // TODO: Remove support for `selected` in <option>.
5623c5605
< warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
---
> warning$1(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
5632c5614
< element.setAttribute('value', props.value);
---
> element.setAttribute('value', toString(getToStringValue(props.value)));
5648,5651d5629
< var getCurrentFiberOwnerName$3 = ReactDebugCurrentFiber.getCurrentFiberOwnerName;
< var getCurrentFiberStackAddendum$3 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
<
<
5659c5637
< var ownerName = getCurrentFiberOwnerName$3();
---
> var ownerName = getCurrentFiberOwnerNameInDevOrNull();
5672c5650
< ReactControlledValuePropTypes.checkPropTypes('select', props, getCurrentFiberStackAddendum$3);
---
> ReactControlledValuePropTypes.checkPropTypes('select', props);
5681c5659
< warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
---
> warning$1(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
5683c5661
< warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
---
> warning$1(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
5710c5688
< var _selectedValue = '' + propValue;
---
> var _selectedValue = toString(getToStringValue(propValue));
5758d5735
< var value = props.value;
5760d5736
< initialValue: value != null ? value : props.defaultValue,
5766c5742
< warning(false, 'Select 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 select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
---
> warning$1(false, 'Select 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 select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
5785,5788d5760
< // After the initial mount, we control selected-ness manually so don't pass
< // this value down
< node._wrapperState.initialValue = undefined;
<
5815,5817d5786
< // TODO: direct imports like some-package/src/* are bad. Fix me.
< var getCurrentFiberStackAddendum$4 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
<
5849c5818
< children: '' + node._wrapperState.initialValue
---
> children: toString(node._wrapperState.initialValue)
5858c5827
< ReactControlledValuePropTypes.checkPropTypes('textarea', props, getCurrentFiberStackAddendum$4);
---
> ReactControlledValuePropTypes.checkPropTypes('textarea', props);
5860c5829
< warning(false, 'Textarea 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 textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
---
> warning$1(false, '%s contains a textarea with both value and defaultValue props. ' + 'Textarea 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 textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
5874c5843
< warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
---
> warning$1(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
5882c5851
< defaultValue = '' + children;
---
> defaultValue = children;
5891c5860
< initialValue: '' + initialValue
---
> initialValue: getToStringValue(initialValue)
5897c5866
< var value = props.value;
---
> var value = getToStringValue(props.value);
5901,5902c5870
< var newValue = '' + value;
<
---
> var newValue = toString(value);
5912c5880
< node.defaultValue = props.defaultValue;
---
> node.defaultValue = toString(getToStringValue(props.defaultValue));
6144c6112,6132
< var warnValidStyle = emptyFunction;
---
> var uppercasePattern = /([A-Z])/g;
> var msPattern = /^ms-/;
>
> /**
> * Hyphenates a camelcased CSS property name, for example:
> *
> * > hyphenateStyleName('backgroundColor')
> * < "background-color"
> * > hyphenateStyleName('MozTransition')
> * < "-moz-transition"
> * > hyphenateStyleName('msTransition')
> * < "-ms-transition"
> *
> * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
> * is converted to `-ms-`.
> */
> function hyphenateStyleName(name) {
> return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
> }
>
> var warnValidStyle = function () {};
6148a6137,6138
> var msPattern$1 = /^-ms-/;
> var hyphenPattern = /-(.)/g;
6158c6148,6154
< var warnHyphenatedStyleName = function (name, getStack) {
---
> var camelize = function (string) {
> return string.replace(hyphenPattern, function (_, character) {
> return character.toUpperCase();
> });
> };
>
> var warnHyphenatedStyleName = function (name) {
6164c6160,6164
< warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), getStack());
---
> warning$1(false, 'Unsupported style property %s. Did you mean %s?', name,
> // As Andi Smith suggests
> // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
> // is converted to lowercase `ms`.
> camelize(name.replace(msPattern$1, 'ms-')));
6167c6167
< var warnBadVendoredStyleName = function (name, getStack) {
---
> var warnBadVendoredStyleName = function (name) {
6173c6173
< warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), getStack());
---
> warning$1(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
6176c6176
< var warnStyleValueWithSemicolon = function (name, value, getStack) {
---
> var warnStyleValueWithSemicolon = function (name, value) {
6182c6182
< warning(false, "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.%s', name, value.replace(badStyleValueWithSemicolonPattern, ''), getStack());
---
> warning$1(false, "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
6185c6185
< var warnStyleValueIsNaN = function (name, value, getStack) {
---
> var warnStyleValueIsNaN = function (name, value) {
6191c6191
< warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, getStack());
---
> warning$1(false, '`NaN` is an invalid value for the `%s` css style property.', name);
6194c6194
< var warnStyleValueIsInfinity = function (name, value, getStack) {
---
> var warnStyleValueIsInfinity = function (name, value) {
6200c6200
< warning(false, '`Infinity` is an invalid value for the `%s` css style property.%s', name, getStack());
---
> warning$1(false, '`Infinity` is an invalid value for the `%s` css style property.', name);
6203c6203
< warnValidStyle = function (name, value, getStack) {
---
> warnValidStyle = function (name, value) {
6205c6205
< warnHyphenatedStyleName(name, getStack);
---
> warnHyphenatedStyleName(name);
6207c6207
< warnBadVendoredStyleName(name, getStack);
---
> warnBadVendoredStyleName(name);
6209c6209
< warnStyleValueWithSemicolon(name, value, getStack);
---
> warnStyleValueWithSemicolon(name, value);
6214c6214
< warnStyleValueIsNaN(name, value, getStack);
---
> warnStyleValueIsNaN(name, value);
6216c6216
< warnStyleValueIsInfinity(name, value, getStack);
---
> warnStyleValueIsInfinity(name, value);
6262c6262
< function setValueForStyles(node, styles, getStack) {
---
> function setValueForStyles(node, styles) {
6271c6271
< warnValidStyle$1(styleName, styles[styleName], getStack);
---
> warnValidStyle$1(styleName, styles[styleName]);
6314a6315,6316
> // TODO: We can remove this if we add invariantWithStack()
> // or add stack by default to invariants where possible.
6317c6319,6324
< function assertValidProps(tag, props, getStack) {
---
> var ReactDebugCurrentFrame$2 = null;
> {
> ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
> }
>
> function assertValidProps(tag, props) {
6323c6330
< !(props.children == null && props.dangerouslySetInnerHTML == null) ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', tag, getStack()) : void 0;
---
> !(props.children == null && props.dangerouslySetInnerHTML == null) ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', tag, ReactDebugCurrentFrame$2.getStackAddendum()) : void 0;
6330c6337
< !(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) ? warning(false, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.%s', getStack()) : void 0;
---
> !(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) ? warning$1(false, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;
6332c6339
< !(props.style == null || typeof props.style === 'object') ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', getStack()) : void 0;
---
> !(props.style == null || typeof props.style === 'object') ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', ReactDebugCurrentFrame$2.getStackAddendum()) : void 0;
6906,6911c6913
< var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
<
< function getStackAddendum() {
< var stack = ReactDebugCurrentFrame.getStackAddendum();
< return stack != null ? stack : '';
< }
---
> var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
6914c6916
< if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {
---
> if (hasOwnProperty$2.call(warnedProperties, name) && warnedProperties[name]) {
6925c6927
< warning(false, 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.%s', name, getStackAddendum());
---
> warning$1(false, 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
6931c6933
< warning(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?%s', name, correctName, getStackAddendum());
---
> warning$1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
6949c6951
< warning(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?%s', name, standardName, getStackAddendum());
---
> warning$1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
6973c6975
< warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
---
> warning$1(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
6975c6977
< warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
---
> warning$1(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
6988,6992d6989
< function getStackAddendum$1() {
< var stack = ReactDebugCurrentFrame.getStackAddendum();
< return stack != null ? stack : '';
< }
<
7001c6998
< warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.%s', type, getStackAddendum$1());
---
> warning$1(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);
7003c7000
< warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.%s', type, getStackAddendum$1());
---
> warning$1(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
7008,7012d7004
< function getStackAddendum$2() {
< var stack = ReactDebugCurrentFrame.getStackAddendum();
< return stack != null ? stack : '';
< }
<
7030c7022
< warning(false, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');
---
> warning$1(false, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');
7042c7034
< warning(false, 'Invalid event handler property `%s`. Did you mean `%s`?%s', name, registrationName, getStackAddendum$2());
---
> warning$1(false, 'Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
7047c7039
< warning(false, 'Unknown event handler property `%s`. It will be ignored.%s', name, getStackAddendum$2());
---
> warning$1(false, 'Unknown event handler property `%s`. It will be ignored.', name);
7056c7048
< warning(false, 'Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.%s', name, getStackAddendum$2());
---
> warning$1(false, 'Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
7068c7060
< warning(false, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
---
> warning$1(false, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
7074c7066
< warning(false, 'The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
---
> warning$1(false, 'The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
7080c7072
< warning(false, 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.%s', typeof value, getStackAddendum$2());
---
> warning$1(false, 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
7086c7078
< warning(false, 'Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.%s', name, getStackAddendum$2());
---
> warning$1(false, 'Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
7098c7090
< warning(false, 'Invalid DOM property `%s`. Did you mean `%s`?%s', name, standardName, getStackAddendum$2());
---
> warning$1(false, 'Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
7105c7097
< warning(false, 'React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.%s', name, lowerCasedName, getStackAddendum$2());
---
> warning$1(false, 'React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);
7112c7104
< warning(false, 'Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.%s', value, name, name, value, name, getStackAddendum$2());
---
> warning$1(false, 'Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name);
7114c7106
< warning(false, 'Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.%s', value, name, name, value, name, name, name, getStackAddendum$2());
---
> warning$1(false, 'Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);
7131a7124,7130
> // Warn when passing the strings 'false' or 'true' into a boolean prop
> if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
> warning$1(false, 'Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value);
> warnedProperties$1[name] = true;
> return true;
> }
>
7149c7148
< warning(false, 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior%s', unknownPropString, type, getStackAddendum$2());
---
> warning$1(false, 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
7151c7150
< warning(false, 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior%s', unknownPropString, type, getStackAddendum$2());
---
> warning$1(false, 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
7163,7165d7161
< var getCurrentFiberOwnerName$2 = ReactDebugCurrentFiber.getCurrentFiberOwnerName;
< var getCurrentFiberStackAddendum$2 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
<
7180,7181d7175
< var getStack = emptyFunction.thatReturns('');
<
7195,7196d7188
< getStack = getCurrentFiberStackAddendum$2;
<
7204c7196,7202
< dialog: true
---
> dialog: true,
> // Electron ships a custom <webview> tag to display external web content in
> // an isolated frame and process.
> // This tag is not present in non Electron environments such as JSDom which
> // is often used for testing purposes.
> // @see https://electronjs.org/docs/api/webview-tag
> webview: true
7236c7234
< warning(false, 'Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
---
> warningWithoutStack$1(false, 'Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
7249c7247
< warning(false, 'Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
---
> warningWithoutStack$1(false, 'Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
7261c7259
< warning(false, 'Extra attributes from the server: %s', names);
---
> warningWithoutStack$1(false, 'Extra attributes from the server: %s', names);
7266c7264
< warning(false, 'Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.%s', registrationName, registrationName, registrationName, getCurrentFiberStackAddendum$2());
---
> warning$1(false, 'Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);
7268c7266
< warning(false, 'Expected `%s` listener to be a function, instead got a value of `%s` type.%s', registrationName, typeof listener, getCurrentFiberStackAddendum$2());
---
> warning$1(false, 'Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);
7294a7293,7294
> function noop() {}
>
7305c7305
< node.onclick = emptyFunction;
---
> node.onclick = noop;
7323c7323
< setValueForStyles(domElement, nextProp, getStack);
---
> setValueForStyles(domElement, nextProp);
7366c7366
< setValueForStyles(domElement, propValue, getStack);
---
> setValueForStyles(domElement, propValue);
7377c7377
< function createElement$1(type, props, rootContainerElement, parentNamespace) {
---
> function createElement(type, props, rootContainerElement, parentNamespace) {
7393c7393
< !(isCustomComponentTag || type === type.toLowerCase()) ? warning(false, '<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type) : void 0;
---
> !(isCustomComponentTag || type === type.toLowerCase()) ? warning$1(false, '<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type) : void 0;
7411a7412,7420
> // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple`
> // attribute on `select`s needs to be added before `option`s are inserted. This prevents
> // a bug where the `select` does not scroll to the correct option because singular
> // `select` elements automatically pick the first item.
> // See https://github.com/facebook/react/issues/13222
> if (type === 'select' && props.multiple) {
> var node = domElement;
> node.multiple = true;
> }
7421c7430
< warning(false, 'The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);
---
> warning$1(false, 'The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);
7429c7438
< function createTextNode$1(text, rootContainerElement) {
---
> function createTextNode(text, rootContainerElement) {
7433c7442
< function setInitialProperties$1(domElement, tag, rawProps, rootContainerElement) {
---
> function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {
7438c7447
< warning(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerName$2() || 'A component');
---
> warning$1(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
7511c7520
< assertValidProps(tag, props, getStack);
---
> assertValidProps(tag, props);
7544c7553
< function diffProperties$1(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
---
> function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
7584c7593
< assertValidProps(tag, nextProps, getStack);
---
> assertValidProps(tag, nextProps);
7709c7718
< function updateProperties$1(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
---
> function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
7753c7762
< function diffHydratedProperties$1(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
---
> function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
7762c7771
< warning(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerName$2() || 'A component');
---
> warning$1(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
7822c7831
< assertValidProps(tag, rawProps, getStack);
---
> assertValidProps(tag, rawProps);
7901d7909
< var rawHtml = nextProp ? nextProp[HTML] || '' : '';
7903c7911,7912
< var expectedHTML = normalizeHTML(domElement, rawHtml);
---
> var nextHtml = nextProp ? nextProp[HTML] : undefined;
> var expectedHTML = normalizeHTML(domElement, nextHtml != null ? nextHtml : '');
8002c8011
< function diffHydratedText$1(textNode, text) {
---
> function diffHydratedText(textNode, text) {
8007c8016
< function warnForUnmatchedText$1(textNode, text) {
---
> function warnForUnmatchedText(textNode, text) {
8013c8022
< function warnForDeletedHydratableElement$1(parentNode, child) {
---
> function warnForDeletedHydratableElement(parentNode, child) {
8019c8028
< warning(false, 'Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
---
> warningWithoutStack$1(false, 'Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
8023c8032
< function warnForDeletedHydratableText$1(parentNode, child) {
---
> function warnForDeletedHydratableText(parentNode, child) {
8029c8038
< warning(false, 'Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
---
> warningWithoutStack$1(false, 'Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
8033c8042
< function warnForInsertedHydratedElement$1(parentNode, tag, props) {
---
> function warnForInsertedHydratedElement(parentNode, tag, props) {
8039c8048
< warning(false, 'Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
---
> warningWithoutStack$1(false, 'Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
8043c8052
< function warnForInsertedHydratedText$1(parentNode, text) {
---
> function warnForInsertedHydratedText(parentNode, text) {
8056c8065
< warning(false, 'Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
---
> warningWithoutStack$1(false, 'Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
8074,8089d8082
< var ReactDOMFiberComponent = Object.freeze({
< createElement: createElement$1,
< createTextNode: createTextNode$1,
< setInitialProperties: setInitialProperties$1,
< diffProperties: diffProperties$1,
< updateProperties: updateProperties$1,
< diffHydratedProperties: diffHydratedProperties$1,
< diffHydratedText: diffHydratedText$1,
< warnForUnmatchedText: warnForUnmatchedText$1,
< warnForDeletedHydratableElement: warnForDeletedHydratableElement$1,
< warnForDeletedHydratableText: warnForDeletedHydratableText$1,
< warnForInsertedHydratedElement: warnForInsertedHydratedElement$1,
< warnForInsertedHydratedText: warnForInsertedHydratedText$1,
< restoreControlledState: restoreControlledState$1
< });
<
8091,8093c8084,8085
< var getCurrentFiberStackAddendum$5 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
<
< var validateDOMNesting = emptyFunction;
---
> var validateDOMNesting = function () {};
> var updatedAncestorInfo = function () {};
8137c8129
< var updatedAncestorInfo$1 = function (oldInfo, tag, instance) {
---
> updatedAncestorInfo = function (oldInfo, tag) {
8139c8131
< var info = { tag: tag, instance: instance };
---
> var info = { tag: tag };
8342c8334
< !(childTag == null) ? warning(false, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
---
> !(childTag == null) ? warningWithoutStack$1(false, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
8354c8346
< var addendum = getCurrentFiberStackAddendum$5();
---
> var addendum = getCurrentFiberStackInDev();
8380c8372
< warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info, addendum);
---
> warningWithoutStack$1(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info, addendum);
8382c8374
< warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.%s', tagDisplayName, ancestorTag, addendum);
---
> warningWithoutStack$1(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.%s', tagDisplayName, ancestorTag, addendum);
8385,8387d8376
<
< // TODO: turn this into a named export
< validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo$1;
8390,8391d8378
< var validateDOMNesting$1 = validateDOMNesting;
<
8407,8425d8393
< // Unused
<
< var createElement = createElement$1;
< var createTextNode = createTextNode$1;
< var setInitialProperties = setInitialProperties$1;
< var diffProperties = diffProperties$1;
< var updateProperties = updateProperties$1;
< var diffHydratedProperties = diffHydratedProperties$1;
< var diffHydratedText = diffHydratedText$1;
< var warnForUnmatchedText = warnForUnmatchedText$1;
< var warnForDeletedHydratableElement = warnForDeletedHydratableElement$1;
< var warnForDeletedHydratableText = warnForDeletedHydratableText$1;
< var warnForInsertedHydratedElement = warnForInsertedHydratedElement$1;
< var warnForInsertedHydratedText = warnForInsertedHydratedText$1;
< var updatedAncestorInfo = validateDOMNesting$1.updatedAncestorInfo;
< var precacheFiberNode$1 = precacheFiberNode;
< var updateFiberProps$1 = updateFiberProps;
<
<
8469c8437
< var _ancestorInfo = updatedAncestorInfo(null, validatedTag, null);
---
> var _ancestorInfo = updatedAncestorInfo(null, validatedTag);
8479c8447
< var _ancestorInfo2 = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type, null);
---
> var _ancestorInfo2 = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);
8508c8476
< validateDOMNesting$1(type, null, hostContextDev.ancestorInfo);
---
> validateDOMNesting(type, null, hostContextDev.ancestorInfo);
8511,8512c8479,8480
< var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type, null);
< validateDOMNesting$1(null, string, ownAncestorInfo);
---
> var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
> validateDOMNesting(null, string, ownAncestorInfo);
8517,8518c8485,8486
< precacheFiberNode$1(internalInstanceHandle, domElement);
< updateFiberProps$1(domElement, props);
---
> precacheFiberNode(internalInstanceHandle, domElement);
> updateFiberProps(domElement, props);
8536,8537c8504,8505
< var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type, null);
< validateDOMNesting$1(null, string, ownAncestorInfo);
---
> var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
> validateDOMNesting(null, string, ownAncestorInfo);
8544c8512
< return type === 'textarea' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && typeof props.dangerouslySetInnerHTML.__html === 'string';
---
> return type === 'textarea' || type === 'option' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
8554c8522
< validateDOMNesting$1(null, text, hostContextDev.ancestorInfo);
---
> validateDOMNesting(null, text, hostContextDev.ancestorInfo);
8557c8525
< precacheFiberNode$1(internalInstanceHandle, textNode);
---
> precacheFiberNode(internalInstanceHandle, textNode);
8561d8528
< var now = now$1;
8563,8564c8530,8532
< var scheduleDeferredCallback = scheduleWork;
< var cancelDeferredCallback = cancelScheduledWork;
---
> var scheduleTimeout = setTimeout;
> var cancelTimeout = clearTimeout;
> var noTimeout = -1;
8587c8555
< updateFiberProps$1(domElement, newProps);
---
> updateFiberProps(domElement, newProps);
8604a8573
> var parentNode = void 0;
8606c8575,8576
< container.parentNode.insertBefore(child, container);
---
> parentNode = container.parentNode;
> parentNode.insertBefore(child, container);
8608c8578,8590
< container.appendChild(child);
---
> parentNode = container;
> parentNode.appendChild(child);
> }
> // This container might be used for a portal.
> // If something inside a portal is clicked, that click should bubble
> // through the React tree. However, on Mobile Safari the click would
> // never bubble through the *DOM* tree unless an ancestor with onclick
> // event exists. So we wouldn't see it and dispatch it.
> // This is why we ensure that containers have inline onclick defined.
> // https://github.com/facebook/react/issues/11918
> if (parentNode.onclick === null) {
> // TODO: This cast may not be sound for SVG, MathML or custom elements.
> trapClickOnNonInteractiveElement(parentNode);
8678c8660
< precacheFiberNode$1(internalInstanceHandle, instance);
---
> precacheFiberNode(internalInstanceHandle, instance);
8681c8663
< updateFiberProps$1(instance, props);
---
> updateFiberProps(instance, props);
8691c8673
< precacheFiberNode$1(internalInstanceHandle, textInstance);
---
> precacheFiberNode(internalInstanceHandle, textInstance);
8709c8691
< if (instance.nodeType === 1) {
---
> if (instance.nodeType === ELEMENT_NODE) {
8719c8701
< if (instance.nodeType === 1) {
---
> if (instance.nodeType === ELEMENT_NODE) {
8780a8763,8765
> // Track which interactions trigger each commit.
> var enableSchedulerTracking = true;
>
8815,8817c8800,8802
< var formatLabel = function (label, warning$$1) {
< var prefix = warning$$1 ? warningEmoji + ' ' : reactEmoji + ' ';
< var suffix = warning$$1 ? ' Warning: ' + warning$$1 : '';
---
> var formatLabel = function (label, warning) {
> var prefix = warning ? warningEmoji + ' ' : reactEmoji + ' ';
> var suffix = warning ? ' Warning: ' + warning : '';
8829c8814
< var endMark = function (label, markName, warning$$1) {
---
> var endMark = function (label, markName, warning) {
8831c8816
< var formattedLabel = formatLabel(label, warning$$1);
---
> var formattedLabel = formatLabel(label, warning);
8859c8844
< var componentName = getComponentName(fiber) || 'Unknown';
---
> var componentName = getComponentName(fiber.type) || 'Unknown';
8878c8863
< var componentName = getComponentName(fiber) || 'Unknown';
---
> var componentName = getComponentName(fiber.type) || 'Unknown';
8886,8887c8871,8872
< var endFiberMark = function (fiber, phase, warning$$1) {
< var componentName = getComponentName(fiber) || 'Unknown';
---
> var endFiberMark = function (fiber, phase, warning) {
> var componentName = getComponentName(fiber.type) || 'Unknown';
8892c8877
< endMark(label, markName, warning$$1);
---
> endMark(label, markName, warning);
8980,8981c8965,8966
< var warning$$1 = didExpire ? 'React was blocked by main thread' : null;
< endMark('(Waiting for async callback... will force flush in ' + expirationTime + ' ms)', '(Waiting for async callback...)', warning$$1);
---
> var warning = didExpire ? 'React was blocked by main thread' : null;
> endMark('(Waiting for async callback... will force flush in ' + expirationTime + ' ms)', '(Waiting for async callback...)', warning);
9038,9039c9023,9024
< var warning$$1 = 'An error was thrown inside this error boundary';
< endFiberMark(fiber, null, warning$$1);
---
> var warning = 'An error was thrown inside this error boundary';
> endFiberMark(fiber, null, warning);
9063,9064c9048,9049
< var warning$$1 = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null;
< endFiberMark(currentPhaseFiber, currentPhase, warning$$1);
---
> var warning = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null;
> endFiberMark(currentPhaseFiber, currentPhase, warning);
9091c9076
< var warning$$1 = null;
---
> var warning = null;
9094c9079
< warning$$1 = 'A top-level update interrupted the previous render';
---
> warning = 'A top-level update interrupted the previous render';
9096,9097c9081,9082
< var componentName = getComponentName(interruptedBy) || 'Unknown';
< warning$$1 = 'An update to ' + componentName + ' interrupted the previous render';
---
> var componentName = getComponentName(interruptedBy.type) || 'Unknown';
> warning = 'An update to ' + componentName + ' interrupted the previous render';
9100c9085
< warning$$1 = 'There were cascading updates';
---
> warning = 'There were cascading updates';
9106c9091
< endMark(label, '(React Tree Reconciliation)', warning$$1);
---
> endMark(label, '(React Tree Reconciliation)', warning);
9128c9113
< var warning$$1 = null;
---
> var warning = null;
9130c9115
< warning$$1 = 'Lifecycle hook scheduled a cascading update';
---
> warning = 'Lifecycle hook scheduled a cascading update';
9132c9117
< warning$$1 = 'Caused by a cascading update in earlier commit';
---
> warning = 'Caused by a cascading update in earlier commit';
9139c9124
< endMark('(Committing Changes)', '(Committing Changes)', warning$$1);
---
> endMark('(Committing Changes)', '(Committing Changes)', warning);
9225c9210
< warning(false, 'Unexpected pop.');
---
> warningWithoutStack$1(false, 'Unexpected pop.');
9232c9217
< warning(false, 'Unexpected Fiber popped.');
---
> warningWithoutStack$1(false, 'Unexpected Fiber popped.');
9262c9247
< warning(false, 'Expected an empty stack. Something was not reset properly.');
---
> warningWithoutStack$1(false, 'Expected an empty stack. Something was not reset properly.');
9280a9266,9270
> var emptyContextObject = {};
> {
> Object.freeze(emptyContextObject);
> }
>
9282c9272
< var contextStackCursor = createCursor(emptyObject);
---
> var contextStackCursor = createCursor(emptyContextObject);
9288c9278
< var previousContext = emptyObject;
---
> var previousContext = emptyContextObject;
9290,9292c9280,9281
< function getUnmaskedContext(workInProgress) {
< var hasOwnContext = isContextProvider(workInProgress);
< if (hasOwnContext) {
---
> function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {
> if (didPushOwnContextIfProvider && isContextProvider(Component)) {
9294c9283
< // we have already pushed its own child context on the stack. A context
---
> // we may have already pushed its own child context on the stack. A context
9312c9301
< return emptyObject;
---
> return emptyContextObject;
9329,9330c9318,9319
< var name = getComponentName(workInProgress) || 'Unknown';
< checkPropTypes(contextTypes, context, 'context', name, ReactDebugCurrentFiber.getCurrentFiberStackAddendum);
---
> var name = getComponentName(type) || 'Unknown';
> checkPropTypes(contextTypes, context, 'context', name, getCurrentFiberStackInDev);
9346,9347c9335,9337
< function isContextConsumer(fiber) {
< return fiber.tag === ClassComponent && fiber.type.contextTypes != null;
---
> function isContextProvider(type) {
> var childContextTypes = type.childContextTypes;
> return childContextTypes !== null && childContextTypes !== undefined;
9350,9358c9340
< function isContextProvider(fiber) {
< return fiber.tag === ClassComponent && fiber.type.childContextTypes != null;
< }
<
< function popContextProvider(fiber) {
< if (!isContextProvider(fiber)) {
< return;
< }
<
---
> function popContext(fiber) {
9369c9351
< !(contextStackCursor.current === emptyObject) ? invariant(false, 'Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(contextStackCursor.current === emptyContextObject) ? invariant(false, 'Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.') : void 0;
9375c9357
< function processChildContext(fiber, parentContext) {
---
> function processChildContext(fiber, type, parentContext) {
9377c9359
< var childContextTypes = fiber.type.childContextTypes;
---
> var childContextTypes = type.childContextTypes;
9383c9365
< var componentName = getComponentName(fiber) || 'Unknown';
---
> var componentName = getComponentName(type) || 'Unknown';
9387c9369
< warning(false, '%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.', componentName, componentName);
---
> warningWithoutStack$1(false, '%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.', componentName, componentName);
9395c9377
< ReactDebugCurrentFiber.setCurrentPhase('getChildContext');
---
> setCurrentPhase('getChildContext');
9401c9383
< ReactDebugCurrentFiber.setCurrentPhase(null);
---
> setCurrentPhase(null);
9404c9386
< !(contextKey in childContextTypes) ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', getComponentName(fiber) || 'Unknown', contextKey) : void 0;
---
> !(contextKey in childContextTypes) ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', getComponentName(type) || 'Unknown', contextKey) : void 0;
9407c9389
< var name = getComponentName(fiber) || 'Unknown';
---
> var name = getComponentName(type) || 'Unknown';
9414c9396
< ReactDebugCurrentFiber.getCurrentFiberStackAddendum);
---
> getCurrentFiberStackInDev);
9421,9424d9402
< if (!isContextProvider(workInProgress)) {
< return false;
< }
<
9429c9407
< var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyObject;
---
> var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject;
9440c9418
< function invalidateContextProvider(workInProgress, didChange) {
---
> function invalidateContextProvider(workInProgress, type, didChange) {
9448c9426
< var mergedContext = processChildContext(workInProgress, previousContext);
---
> var mergedContext = processChildContext(workInProgress, type, previousContext);
9467c9445
< !(isFiberMounted(fiber) && fiber.tag === ClassComponent) ? invariant(false, 'Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(isFiberMounted(fiber) && (fiber.tag === ClassComponent || fiber.tag === ClassComponentLazy)) ? invariant(false, 'Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.') : void 0;
9470,9478c9448,9471
< while (node.tag !== HostRoot) {
< if (isContextProvider(node)) {
< return node.stateNode.__reactInternalMemoizedMergedChildContext;
< }
< var parent = node.return;
< !parent ? invariant(false, 'Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.') : void 0;
< node = parent;
< }
< return node.stateNode.context;
---
> do {
> switch (node.tag) {
> case HostRoot:
> return node.stateNode.context;
> case ClassComponent:
> {
> var Component = node.type;
> if (isContextProvider(Component)) {
> return node.stateNode.__reactInternalMemoizedMergedChildContext;
> }
> break;
> }
> case ClassComponentLazy:
> {
> var _Component = getResultFromResolvedThenable(node.type);
> if (isContextProvider(_Component)) {
> return node.stateNode.__reactInternalMemoizedMergedChildContext;
> }
> break;
> }
> }
> node = node.return;
> } while (node !== null);
> invariant(false, 'Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.');
9481,9484c9474,9529
< // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
< // Math.pow(2, 30) - 1
< // 0b111111111111111111111111111111
< var MAX_SIGNED_31_BIT_INT = 1073741823;
---
> var onCommitFiberRoot = null;
> var onCommitFiberUnmount = null;
> var hasLoggedError = false;
>
> function catchErrors(fn) {
> return function (arg) {
> try {
> return fn(arg);
> } catch (err) {
> if (true && !hasLoggedError) {
> hasLoggedError = true;
> warningWithoutStack$1(false, 'React DevTools encountered an error: %s', err);
> }
> }
> };
> }
>
> var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';
>
> function injectInternals(internals) {
> if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
> // No DevTools
> return false;
> }
> var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
> if (hook.isDisabled) {
> // This isn't a real property on the hook, but it can be set to opt out
> // of DevTools integration and associated warnings and logs.
> // https://github.com/facebook/react/issues/3877
> return true;
> }
> if (!hook.supportsFiber) {
> {
> warningWithoutStack$1(false, 'The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://fb.me/react-devtools');
> }
> // DevTools exists, even though it doesn't support Fiber.
> return true;
> }
> try {
> var rendererID = hook.inject(internals);
> // We have successfully injected, so now it is safe to set up hooks.
> onCommitFiberRoot = catchErrors(function (root) {
> return hook.onCommitFiberRoot(rendererID, root);
> });
> onCommitFiberUnmount = catchErrors(function (fiber) {
> return hook.onCommitFiberUnmount(rendererID, fiber);
> });
> } catch (err) {
> // Catch all errors because it is unsafe to throw during initialization.
> {
> warningWithoutStack$1(false, 'React DevTools encountered an error: %s.', err);
> }
> }
> // DevTools exists
> return true;
> }
9486c9531,9535
< // TODO: Use an opaque type once ESLint et al support the syntax
---
> function onCommitRoot(root) {
> if (typeof onCommitFiberRoot === 'function') {
> onCommitFiberRoot(root);
> }
> }
9487a9537,9546
> function onCommitUnmount(fiber) {
> if (typeof onCommitFiberUnmount === 'function') {
> onCommitFiberUnmount(fiber);
> }
> }
>
> // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
> // Math.pow(2, 30) - 1
> // 0b111111111111111111111111111111
> var maxSigned31BitInt = 1073741823;
9491c9550
< var Never = MAX_SIGNED_31_BIT_INT;
---
> var Never = maxSigned31BitInt;
9513a9573,9597
> var LOW_PRIORITY_EXPIRATION = 5000;
> var LOW_PRIORITY_BATCH_SIZE = 250;
>
> function computeAsyncExpiration(currentTime) {
> return computeExpirationBucket(currentTime, LOW_PRIORITY_EXPIRATION, LOW_PRIORITY_BATCH_SIZE);
> }
>
> // We intentionally set a higher expiration time for interactive updates in
> // dev than in production.
> //
> // If the main thread is being blocked so long that you hit the expiration,
> // it's a problem that could be solved with better scheduling.
> //
> // People will be more likely to notice this and fix it with the long
> // expiration time in development.
> //
> // In production we opt for better UX at the risk of masking scheduling
> // problems, by expiring fast.
> var HIGH_PRIORITY_EXPIRATION = 500;
> var HIGH_PRIORITY_BATCH_SIZE = 100;
>
> function computeInteractiveExpiration(currentTime) {
> return computeExpirationBucket(currentTime, HIGH_PRIORITY_EXPIRATION, HIGH_PRIORITY_BATCH_SIZE);
> }
>
9566a9651
> this.firstContextDependency = null;
9577a9663
> this.childExpirationTime = NoWork;
9583,9585c9669,9671
< this.actualStartTime = 0;
< this.selfBaseTime = 0;
< this.treeBaseTime = 0;
---
> this.actualStartTime = -1;
> this.selfBaseDuration = 0;
> this.treeBaseDuration = 0;
9618c9704,9714
< return !!(Component.prototype && Component.prototype.isReactComponent);
---
> var prototype = Component.prototype;
> return typeof prototype === 'object' && prototype !== null && typeof prototype.isReactComponent === 'object' && prototype.isReactComponent !== null;
> }
>
> function resolveLazyComponentTag(fiber, Component) {
> if (typeof Component === 'function') {
> return shouldConstruct(Component) ? ClassComponentLazy : FunctionalComponentLazy;
> } else if (Component !== undefined && Component !== null && Component.$$typeof) {
> return ForwardRefLazy;
> }
> return IndeterminateComponent;
9661c9757
< workInProgress.actualStartTime = 0;
---
> workInProgress.actualStartTime = -1;
9665c9761,9769
< workInProgress.expirationTime = expirationTime;
---
> // Don't touching the subtree's expiration time, which has not changed.
> workInProgress.childExpirationTime = current.childExpirationTime;
> if (pendingProps !== current.pendingProps) {
> // This fiber has new props.
> workInProgress.expirationTime = expirationTime;
> } else {
> // This fiber's props have not changed.
> workInProgress.expirationTime = current.expirationTime;
> }
9670a9775
> workInProgress.firstContextDependency = current.firstContextDependency;
9678,9679c9783,9784
< workInProgress.selfBaseTime = current.selfBaseTime;
< workInProgress.treeBaseTime = current.treeBaseTime;
---
> workInProgress.selfBaseDuration = current.selfBaseDuration;
> workInProgress.treeBaseDuration = current.treeBaseDuration;
9686a9792,9799
>
> if (enableProfilerTimer && isDevToolsPresent) {
> // Always collect profile timings when DevTools are present.
> // This enables DevTools to start capturing timing at any point–
> // Without some nodes in the tree having empty base times.
> mode |= ProfileMode;
> }
>
9707c9820
< switch (type) {
---
> getTag: switch (type) {
9720,9724c9833,9834
< case REACT_TIMEOUT_TYPE:
< fiberTag = TimeoutComponent;
< // Suspense does not require async, but its children should be strict
< // mode compatible.
< mode |= StrictMode;
---
> case REACT_PLACEHOLDER_TYPE:
> fiberTag = PlaceholderComponent;
9727,9728c9837,9870
< fiberTag = getFiberTagFromObjectType(type, owner);
< break;
---
> {
> if (typeof type === 'object' && type !== null) {
> switch (type.$$typeof) {
> case REACT_PROVIDER_TYPE:
> fiberTag = ContextProvider;
> break getTag;
> case REACT_CONTEXT_TYPE:
> // This is a consumer
> fiberTag = ContextConsumer;
> break getTag;
> case REACT_FORWARD_REF_TYPE:
> fiberTag = ForwardRef;
> break getTag;
> default:
> {
> if (typeof type.then === 'function') {
> fiberTag = IndeterminateComponent;
> break getTag;
> }
> }
> }
> }
> var info = '';
> {
> if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
> info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.';
> }
> var ownerName = owner ? getComponentName(owner.type) : null;
> if (ownerName) {
> info += '\n\nCheck the render method of `' + ownerName + '`.';
> }
> }
> invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info);
> }
9744,9771d9885
< function getFiberTagFromObjectType(type, owner) {
< var $$typeof = typeof type === 'object' && type !== null ? type.$$typeof : null;
<
< switch ($$typeof) {
< case REACT_PROVIDER_TYPE:
< return ContextProvider;
< case REACT_CONTEXT_TYPE:
< // This is a consumer
< return ContextConsumer;
< case REACT_FORWARD_REF_TYPE:
< return ForwardRef;
< default:
< {
< var info = '';
< {
< if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
< info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.';
< }
< var ownerName = owner ? getComponentName(owner) : null;
< if (ownerName) {
< info += '\n\nCheck the render method of `' + ownerName + '`.';
< }
< }
< invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info);
< }
< }
< }
<
9781c9895
< invariant(false, 'Profiler must specify an "id" string and "onRender" function as props');
---
> warningWithoutStack$1(false, 'Profiler must specify an "id" string and "onRender" function as props');
9842a9957
> target.firstContextDependency = source.firstContextDependency;
9848a9964
> target.childExpirationTime = source.childExpirationTime;
9853,9854c9969,9970
< target.selfBaseTime = source.selfBaseTime;
< target.treeBaseTime = source.treeBaseTime;
---
> target.selfBaseDuration = source.selfBaseDuration;
> target.treeBaseDuration = source.treeBaseDuration;
9865a9982,9994
> // The following attributes are only used by interaction tracking builds.
> // They enable interactions to be associated with their async work,
> // And expose interaction metadata to the React DevTools Profiler plugin.
> // Note that these attributes are only defined when the enableSchedulerTracking flag is enabled.
>
>
> // Exported FiberRoot type includes all properties,
> // To avoid requiring potentially error-prone :any casts throughout the project.
> // Profiling properties are only safe to access in profiling builds (when enableSchedulerTracking is true).
> // The types are defined separately within this file to ensure they stay in sync.
> // (We don't have to use an inline :any cast when enableSchedulerTracking is disabled.)
>
>
9870,9873d9998
< var root = {
< current: uninitializedFiber,
< containerInfo: containerInfo,
< pendingChildren: null,
9875,9943c10000,10054
< earliestPendingTime: NoWork,
< latestPendingTime: NoWork,
< earliestSuspendedTime: NoWork,
< latestSuspendedTime: NoWork,
< latestPingedTime: NoWork,
<
< pendingCommitExpirationTime: NoWork,
< finishedWork: null,
< context: null,
< pendingContext: null,
< hydrate: hydrate,
< remainingExpirationTime: NoWork,
< firstBatch: null,
< nextScheduledRoot: null
< };
< uninitializedFiber.stateNode = root;
< return root;
< }
<
< var onCommitFiberRoot = null;
< var onCommitFiberUnmount = null;
< var hasLoggedError = false;
<
< function catchErrors(fn) {
< return function (arg) {
< try {
< return fn(arg);
< } catch (err) {
< if (true && !hasLoggedError) {
< hasLoggedError = true;
< warning(false, 'React DevTools encountered an error: %s', err);
< }
< }
< };
< }
<
< function injectInternals(internals) {
< if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
< // No DevTools
< return false;
< }
< var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
< if (hook.isDisabled) {
< // This isn't a real property on the hook, but it can be set to opt out
< // of DevTools integration and associated warnings and logs.
< // https://github.com/facebook/react/issues/3877
< return true;
< }
< if (!hook.supportsFiber) {
< {
< warning(false, 'The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://fb.me/react-devtools');
< }
< // DevTools exists, even though it doesn't support Fiber.
< return true;
< }
< try {
< var rendererID = hook.inject(internals);
< // We have successfully injected, so now it is safe to set up hooks.
< onCommitFiberRoot = catchErrors(function (root) {
< return hook.onCommitFiberRoot(rendererID, root);
< });
< onCommitFiberUnmount = catchErrors(function (fiber) {
< return hook.onCommitFiberUnmount(rendererID, fiber);
< });
< } catch (err) {
< // Catch all errors because it is unsafe to throw during initialization.
< {
< warning(false, 'React DevTools encountered an error: %s.', err);
< }
---
> var root = void 0;
> if (enableSchedulerTracking) {
> root = {
> current: uninitializedFiber,
> containerInfo: containerInfo,
> pendingChildren: null,
>
> earliestPendingTime: NoWork,
> latestPendingTime: NoWork,
> earliestSuspendedTime: NoWork,
> latestSuspendedTime: NoWork,
> latestPingedTime: NoWork,
>
> didError: false,
>
> pendingCommitExpirationTime: NoWork,
> finishedWork: null,
> timeoutHandle: noTimeout,
> context: null,
> pendingContext: null,
> hydrate: hydrate,
> nextExpirationTimeToWorkOn: NoWork,
> expirationTime: NoWork,
> firstBatch: null,
> nextScheduledRoot: null,
>
> interactionThreadID: tracking.unstable_getThreadID(),
> memoizedInteractions: new Set(),
> pendingInteractionMap: new Map()
> };
> } else {
> root = {
> current: uninitializedFiber,
> containerInfo: containerInfo,
> pendingChildren: null,
>
> earliestPendingTime: NoWork,
> latestPendingTime: NoWork,
> earliestSuspendedTime: NoWork,
> latestSuspendedTime: NoWork,
> latestPingedTime: NoWork,
>
> didError: false,
>
> pendingCommitExpirationTime: NoWork,
> finishedWork: null,
> timeoutHandle: noTimeout,
> context: null,
> pendingContext: null,
> hydrate: hydrate,
> nextExpirationTimeToWorkOn: NoWork,
> expirationTime: NoWork,
> firstBatch: null,
> nextScheduledRoot: null
> };
9945,9947d10055
< // DevTools exists
< return true;
< }
9949,9953c10057
< function onCommitRoot(root) {
< if (typeof onCommitFiberRoot === 'function') {
< onCommitFiberRoot(root);
< }
< }
---
> uninitializedFiber.stateNode = root;
9955,9958c10059,10063
< function onCommitUnmount(fiber) {
< if (typeof onCommitFiberUnmount === 'function') {
< onCommitFiberUnmount(fiber);
< }
---
> // The reason for the way the Flow types are structured in this file,
> // Is to avoid needing :any casts everywhere interaction tracking fields are used.
> // Unfortunately that requires an :any cast for non-interaction tracking capable builds.
> // $FlowFixMe Remove this :any cast and replace it with something better.
> return root;
10000c10105
< throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
---
> throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
10067c10172
< componentNames.add(getComponentName(fiber) || 'Component');
---
> componentNames.add(getComponentName(fiber.type) || 'Component');
10080c10185
< var strictRootComponentStack = getStackAddendumByWorkInProgressFiber(strictRoot);
---
> var strictRootComponentStack = getStackByFiberInDevAndProd(strictRoot);
10082c10187
< warning(false, 'Unsafe lifecycle methods were found within a strict-mode tree:%s' + '\n\n%s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-strict-mode-warnings', strictRootComponentStack, lifecyclesWarningMesages.join('\n\n'));
---
> warningWithoutStack$1(false, 'Unsafe lifecycle methods were found within a strict-mode tree:%s' + '\n\n%s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-strict-mode-warnings', strictRootComponentStack, lifecyclesWarningMesages.join('\n\n'));
10107c10212
< uniqueNames.add(getComponentName(fiber) || 'Component');
---
> uniqueNames.add(getComponentName(fiber.type) || 'Component');
10121c10226
< _uniqueNames.add(getComponentName(fiber) || 'Component');
---
> _uniqueNames.add(getComponentName(fiber.type) || 'Component');
10135c10240
< _uniqueNames2.add(getComponentName(fiber) || 'Component');
---
> _uniqueNames2.add(getComponentName(fiber.type) || 'Component');
10168c10273
< warning(false, '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.');
---
> warningWithoutStack$1(false, '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.');
10215c10320
< warning(false, '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.');
---
> warningWithoutStack$1(false, '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.');
10239c10344
< uniqueNames.add(getComponentName(fiber) || 'Component');
---
> uniqueNames.add(getComponentName(fiber.type) || 'Component');
10244c10349
< var strictRootComponentStack = getStackAddendumByWorkInProgressFiber(strictRoot);
---
> var strictRootComponentStack = getStackByFiberInDevAndProd(strictRoot);
10246c10351
< warning(false, 'Legacy context API has been detected within a strict-mode tree: %s' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-strict-mode-warnings', strictRootComponentStack, sortedNames);
---
> warningWithoutStack$1(false, 'Legacy context API has been detected within a strict-mode tree: %s' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-strict-mode-warnings', strictRootComponentStack, sortedNames);
10261c10366,10368
< // TODO: Offscreen updates
---
> // TODO: Offscreen updates should never suspend. However, a promise that
> // suspended inside an offscreen subtree should be able to ping at the priority
> // of the outer render.
10264,10269c10371,10384
< if (enableSuspense) {
< // Update the latest and earliest pending times
< var earliestPendingTime = root.earliestPendingTime;
< if (earliestPendingTime === NoWork) {
< // No other pending updates.
< root.earliestPendingTime = root.latestPendingTime = expirationTime;
---
> // If there's a gap between completing a failed root and retrying it,
> // additional updates may be scheduled. Clear `didError`, in case the update
> // is sufficient to fix the error.
> root.didError = false;
>
> // Update the latest and earliest pending times
> var earliestPendingTime = root.earliestPendingTime;
> if (earliestPendingTime === NoWork) {
> // No other pending updates.
> root.earliestPendingTime = root.latestPendingTime = expirationTime;
> } else {
> if (earliestPendingTime > expirationTime) {
> // This is the earliest pending update.
> root.earliestPendingTime = expirationTime;
10271,10279c10386,10389
< if (earliestPendingTime > expirationTime) {
< // This is the earliest pending update.
< root.earliestPendingTime = expirationTime;
< } else {
< var latestPendingTime = root.latestPendingTime;
< if (latestPendingTime < expirationTime) {
< // This is the latest pending update
< root.latestPendingTime = expirationTime;
< }
---
> var latestPendingTime = root.latestPendingTime;
> if (latestPendingTime < expirationTime) {
> // This is the latest pending update
> root.latestPendingTime = expirationTime;
10282a10393
> findNextExpirationTimeToWorkOn(expirationTime, root);
10285,10295c10396,10397
< function markCommittedPriorityLevels(root, currentTime, earliestRemainingTime) {
< if (enableSuspense) {
< if (earliestRemainingTime === NoWork) {
< // Fast path. There's no remaining work. Clear everything.
< root.earliestPendingTime = NoWork;
< root.latestPendingTime = NoWork;
< root.earliestSuspendedTime = NoWork;
< root.latestSuspendedTime = NoWork;
< root.latestPingedTime = NoWork;
< return;
< }
---
> function markCommittedPriorityLevels(root, earliestRemainingTime) {
> root.didError = false;
10297,10309c10399,10421
< // Let's see if the previous latest known pending level was just flushed.
< var latestPendingTime = root.latestPendingTime;
< if (latestPendingTime !== NoWork) {
< if (latestPendingTime < earliestRemainingTime) {
< // We've flushed all the known pending levels.
< root.earliestPendingTime = root.latestPendingTime = NoWork;
< } else {
< var earliestPendingTime = root.earliestPendingTime;
< if (earliestPendingTime < earliestRemainingTime) {
< // We've flushed the earliest known pending level. Set this to the
< // latest pending time.
< root.earliestPendingTime = root.latestPendingTime;
< }
---
> if (earliestRemainingTime === NoWork) {
> // Fast path. There's no remaining work. Clear everything.
> root.earliestPendingTime = NoWork;
> root.latestPendingTime = NoWork;
> root.earliestSuspendedTime = NoWork;
> root.latestSuspendedTime = NoWork;
> root.latestPingedTime = NoWork;
> findNextExpirationTimeToWorkOn(NoWork, root);
> return;
> }
>
> // Let's see if the previous latest known pending level was just flushed.
> var latestPendingTime = root.latestPendingTime;
> if (latestPendingTime !== NoWork) {
> if (latestPendingTime < earliestRemainingTime) {
> // We've flushed all the known pending levels.
> root.earliestPendingTime = root.latestPendingTime = NoWork;
> } else {
> var earliestPendingTime = root.earliestPendingTime;
> if (earliestPendingTime < earliestRemainingTime) {
> // We've flushed the earliest known pending level. Set this to the
> // latest pending time.
> root.earliestPendingTime = root.latestPendingTime;
10311a10424
> }
10313,10323c10426,10428
< // Now let's handle the earliest remaining level in the whole tree. We need to
< // decide whether to treat it as a pending level or as suspended. Check
< // it falls within the range of known suspended levels.
<
< var earliestSuspendedTime = root.earliestSuspendedTime;
< if (earliestSuspendedTime === NoWork) {
< // There's no suspended work. Treat the earliest remaining level as a
< // pending level.
< markPendingPriorityLevel(root, earliestRemainingTime);
< return;
< }
---
> // Now let's handle the earliest remaining level in the whole tree. We need to
> // decide whether to treat it as a pending level or as suspended. Check
> // it falls within the range of known suspended levels.
10325,10337c10430,10437
< var latestSuspendedTime = root.latestSuspendedTime;
< if (earliestRemainingTime > latestSuspendedTime) {
< // The earliest remaining level is later than all the suspended work. That
< // means we've flushed all the suspended work.
< root.earliestSuspendedTime = NoWork;
< root.latestSuspendedTime = NoWork;
< root.latestPingedTime = NoWork;
<
< // There's no suspended work. Treat the earliest remaining level as a
< // pending level.
< markPendingPriorityLevel(root, earliestRemainingTime);
< return;
< }
---
> var earliestSuspendedTime = root.earliestSuspendedTime;
> if (earliestSuspendedTime === NoWork) {
> // There's no suspended work. Treat the earliest remaining level as a
> // pending level.
> markPendingPriorityLevel(root, earliestRemainingTime);
> findNextExpirationTimeToWorkOn(NoWork, root);
> return;
> }
10339,10344c10439,10452
< if (earliestRemainingTime < earliestSuspendedTime) {
< // The earliest remaining time is earlier than all the suspended work.
< // Treat it as a pending update.
< markPendingPriorityLevel(root, earliestRemainingTime);
< return;
< }
---
> var latestSuspendedTime = root.latestSuspendedTime;
> if (earliestRemainingTime > latestSuspendedTime) {
> // The earliest remaining level is later than all the suspended work. That
> // means we've flushed all the suspended work.
> root.earliestSuspendedTime = NoWork;
> root.latestSuspendedTime = NoWork;
> root.latestPingedTime = NoWork;
>
> // There's no suspended work. Treat the earliest remaining level as a
> // pending level.
> markPendingPriorityLevel(root, earliestRemainingTime);
> findNextExpirationTimeToWorkOn(NoWork, root);
> return;
> }
10346,10347c10454,10459
< // The earliest remaining time falls within the range of known suspended
< // levels. We should treat this as suspended work.
---
> if (earliestRemainingTime < earliestSuspendedTime) {
> // The earliest remaining time is earlier than all the suspended work.
> // Treat it as a pending update.
> markPendingPriorityLevel(root, earliestRemainingTime);
> findNextExpirationTimeToWorkOn(NoWork, root);
> return;
10348a10461,10477
>
> // The earliest remaining time falls within the range of known suspended
> // levels. We should treat this as suspended work.
> findNextExpirationTimeToWorkOn(NoWork, root);
> }
>
> function hasLowerPriorityWork(root, erroredExpirationTime) {
> var latestPendingTime = root.latestPendingTime;
> var latestSuspendedTime = root.latestSuspendedTime;
> var latestPingedTime = root.latestPingedTime;
> return latestPendingTime !== NoWork && latestPendingTime > erroredExpirationTime || latestSuspendedTime !== NoWork && latestSuspendedTime > erroredExpirationTime || latestPingedTime !== NoWork && latestPingedTime > erroredExpirationTime;
> }
>
> function isPriorityLevelSuspended(root, expirationTime) {
> var earliestSuspendedTime = root.earliestSuspendedTime;
> var latestSuspendedTime = root.latestSuspendedTime;
> return earliestSuspendedTime !== NoWork && expirationTime >= earliestSuspendedTime && expirationTime <= latestSuspendedTime;
10352,10369c10481,10482
< if (enableSuspense) {
< // First, check the known pending levels and update them if needed.
< var earliestPendingTime = root.earliestPendingTime;
< var latestPendingTime = root.latestPendingTime;
< if (earliestPendingTime === suspendedTime) {
< if (latestPendingTime === suspendedTime) {
< // Both known pending levels were suspended. Clear them.
< root.earliestPendingTime = root.latestPendingTime = NoWork;
< } else {
< // The earliest pending level was suspended. Clear by setting it to the
< // latest pending level.
< root.earliestPendingTime = latestPendingTime;
< }
< } else if (latestPendingTime === suspendedTime) {
< // The latest pending level was suspended. Clear by setting it to the
< // latest pending level.
< root.latestPendingTime = earliestPendingTime;
< }
---
> root.didError = false;
> clearPing(root, suspendedTime);
10371,10375c10484,10494
< // Next, if we're working on the lowest known suspended level, clear the ping.
< // TODO: What if a promise suspends and pings before the root completes?
< var latestSuspendedTime = root.latestSuspendedTime;
< if (latestSuspendedTime === suspendedTime) {
< root.latestPingedTime = NoWork;
---
> // First, check the known pending levels and update them if needed.
> var earliestPendingTime = root.earliestPendingTime;
> var latestPendingTime = root.latestPendingTime;
> if (earliestPendingTime === suspendedTime) {
> if (latestPendingTime === suspendedTime) {
> // Both known pending levels were suspended. Clear them.
> root.earliestPendingTime = root.latestPendingTime = NoWork;
> } else {
> // The earliest pending level was suspended. Clear by setting it to the
> // latest pending level.
> root.earliestPendingTime = latestPendingTime;
10376a10496,10500
> } else if (latestPendingTime === suspendedTime) {
> // The latest pending level was suspended. Clear by setting it to the
> // latest pending level.
> root.latestPendingTime = earliestPendingTime;
> }
10378,10390c10502,10514
< // Finally, update the known suspended levels.
< var earliestSuspendedTime = root.earliestSuspendedTime;
< if (earliestSuspendedTime === NoWork) {
< // No other suspended levels.
< root.earliestSuspendedTime = root.latestSuspendedTime = suspendedTime;
< } else {
< if (earliestSuspendedTime > suspendedTime) {
< // This is the earliest suspended level.
< root.earliestSuspendedTime = suspendedTime;
< } else if (latestSuspendedTime < suspendedTime) {
< // This is the latest suspended level
< root.latestSuspendedTime = suspendedTime;
< }
---
> // Finally, update the known suspended levels.
> var earliestSuspendedTime = root.earliestSuspendedTime;
> var latestSuspendedTime = root.latestSuspendedTime;
> if (earliestSuspendedTime === NoWork) {
> // No other suspended levels.
> root.earliestSuspendedTime = root.latestSuspendedTime = suspendedTime;
> } else {
> if (earliestSuspendedTime > suspendedTime) {
> // This is the earliest suspended level.
> root.earliestSuspendedTime = suspendedTime;
> } else if (latestSuspendedTime < suspendedTime) {
> // This is the latest suspended level
> root.latestSuspendedTime = suspendedTime;
10392a10517,10518
>
> findNextExpirationTimeToWorkOn(suspendedTime, root);
10396,10403c10522,10529
< if (enableSuspense) {
< var latestSuspendedTime = root.latestSuspendedTime;
< if (latestSuspendedTime !== NoWork && latestSuspendedTime <= pingedTime) {
< var latestPingedTime = root.latestPingedTime;
< if (latestPingedTime === NoWork || latestPingedTime < pingedTime) {
< root.latestPingedTime = pingedTime;
< }
< }
---
> root.didError = false;
>
> // TODO: When we add back resuming, we need to ensure the progressed work
> // is thrown out and not reused during the restarted render. One way to
> // invalidate the progressed work is to restart at expirationTime + 1.
> var latestPingedTime = root.latestPingedTime;
> if (latestPingedTime === NoWork || latestPingedTime < pingedTime) {
> root.latestPingedTime = pingedTime;
10404a10531
> findNextExpirationTimeToWorkOn(pingedTime, root);
10407,10414c10534,10541
< function findNextPendingPriorityLevel(root) {
< if (enableSuspense) {
< var earliestSuspendedTime = root.earliestSuspendedTime;
< var earliestPendingTime = root.earliestPendingTime;
< if (earliestSuspendedTime === NoWork) {
< // Fast path. There's no suspended work.
< return earliestPendingTime;
< }
---
> function clearPing(root, completedTime) {
> // TODO: Track whether the root was pinged during the render phase. If so,
> // we need to make sure we don't lose track of it.
> var latestPingedTime = root.latestPingedTime;
> if (latestPingedTime !== NoWork && latestPingedTime <= completedTime) {
> root.latestPingedTime = NoWork;
> }
> }
10416,10419c10543,10544
< // First, check if there's known pending work.
< if (earliestPendingTime !== NoWork) {
< return earliestPendingTime;
< }
---
> function findEarliestOutstandingPriorityLevel(root, renderExpirationTime) {
> var earliestExpirationTime = renderExpirationTime;
10421,10425c10546,10579
< // Finally, if a suspended level was pinged, work on that. Otherwise there's
< // nothing to work on.
< return root.latestPingedTime;
< } else {
< return root.current.expirationTime;
---
> var earliestPendingTime = root.earliestPendingTime;
> var earliestSuspendedTime = root.earliestSuspendedTime;
> if (earliestExpirationTime === NoWork || earliestPendingTime !== NoWork && earliestPendingTime < earliestExpirationTime) {
> earliestExpirationTime = earliestPendingTime;
> }
> if (earliestExpirationTime === NoWork || earliestSuspendedTime !== NoWork && earliestSuspendedTime < earliestExpirationTime) {
> earliestExpirationTime = earliestSuspendedTime;
> }
> return earliestExpirationTime;
> }
>
> function findNextExpirationTimeToWorkOn(completedExpirationTime, root) {
> var earliestSuspendedTime = root.earliestSuspendedTime;
> var latestSuspendedTime = root.latestSuspendedTime;
> var earliestPendingTime = root.earliestPendingTime;
> var latestPingedTime = root.latestPingedTime;
>
> // Work on the earliest pending time. Failing that, work on the latest
> // pinged time.
> var nextExpirationTimeToWorkOn = earliestPendingTime !== NoWork ? earliestPendingTime : latestPingedTime;
>
> // If there is no pending or pinted work, check if there's suspended work
> // that's lower priority than what we just completed.
> if (nextExpirationTimeToWorkOn === NoWork && (completedExpirationTime === NoWork || latestSuspendedTime > completedExpirationTime)) {
> // The lowest priority suspended work is the work most likely to be
> // committed next. Let's start rendering it again, so that if it times out,
> // it's ready to commit.
> nextExpirationTimeToWorkOn = latestSuspendedTime;
> }
>
> var expirationTime = nextExpirationTimeToWorkOn;
> if (expirationTime !== NoWork && earliestSuspendedTime !== NoWork && earliestSuspendedTime < expirationTime) {
> // Expire using the earliest known expiration time.
> expirationTime = earliestSuspendedTime;
10426a10581,10583
>
> root.nextExpirationTimeToWorkOn = nextExpirationTimeToWorkOn;
> root.expirationTime = expirationTime;
10529d10685
< expirationTime: NoWork,
10545d10700
< expirationTime: currentQueue.expirationTime,
10577c10732
< function appendUpdateToQueue(queue, update, expirationTime) {
---
> function appendUpdateToQueue(queue, update) {
10586,10590d10740
< if (queue.expirationTime === NoWork || queue.expirationTime > expirationTime) {
< // The incoming update has the earliest expiration of any update in the
< // queue. Update the queue's expiration time.
< queue.expirationTime = expirationTime;
< }
10593c10743
< function enqueueUpdate(fiber, update, expirationTime) {
---
> function enqueueUpdate(fiber, update) {
10629c10779
< appendUpdateToQueue(queue1, update, expirationTime);
---
> appendUpdateToQueue(queue1, update);
10636,10637c10786,10787
< appendUpdateToQueue(queue1, update, expirationTime);
< appendUpdateToQueue(queue2, update, expirationTime);
---
> appendUpdateToQueue(queue1, update);
> appendUpdateToQueue(queue2, update);
10641c10791
< appendUpdateToQueue(queue1, update, expirationTime);
---
> appendUpdateToQueue(queue1, update);
10648,10649c10798,10799
< if (fiber.tag === ClassComponent && (currentlyProcessingQueue === queue1 || queue2 !== null && currentlyProcessingQueue === queue2) && !didWarnUpdateInsideUpdate) {
< warning(false, '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.');
---
> if ((fiber.tag === ClassComponent || fiber.tag === ClassComponentLazy) && (currentlyProcessingQueue === queue1 || queue2 !== null && currentlyProcessingQueue === queue2) && !didWarnUpdateInsideUpdate) {
> warningWithoutStack$1(false, '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.');
10655c10805
< function enqueueCapturedUpdate(workInProgress, update, renderExpirationTime) {
---
> function enqueueCapturedUpdate(workInProgress, update) {
10676,10680d10825
< if (workInProgressQueue.expirationTime === NoWork || workInProgressQueue.expirationTime > renderExpirationTime) {
< // The incoming update has the earliest expiration of any update in the
< // queue. Update the queue's expiration time.
< workInProgressQueue.expirationTime = renderExpirationTime;
< }
10752,10756d10896
< if (queue.expirationTime === NoWork || queue.expirationTime > renderExpirationTime) {
< // Insufficient priority. Bailout.
< return;
< }
<
10868d11007
< queue.expirationTime = newExpirationTime;
10869a11009,11016
> // Set the remaining expiration time to be whatever is remaining in the queue.
> // This should be fine because the only two other things that contribute to
> // expiration time are props and context. We're already in the middle of the
> // begin phase by the time we start processing the queue, so we've already
> // dealt with the props. Context in components that specify
> // shouldComponentUpdate is tricky; but we'll have to account for
> // that regardless.
> workInProgress.expirationTime = newExpirationTime;
10906c11053
< var effect = finishedQueue.firstEffect;
---
> commitUpdateEffects(finishedQueue.firstEffect, instance);
10907a11055,11060
>
> commitUpdateEffects(finishedQueue.firstCapturedEffect, instance);
> finishedQueue.firstCapturedEffect = finishedQueue.lastCapturedEffect = null;
> }
>
> function commitUpdateEffects(effect, instance) {
10916,10926d11068
<
< effect = finishedQueue.firstCapturedEffect;
< finishedQueue.firstCapturedEffect = finishedQueue.lastCapturedEffect = null;
< while (effect !== null) {
< var _callback4 = effect.callback;
< if (_callback4 !== null) {
< effect.callback = null;
< callCallback(_callback4, instance);
< }
< effect = effect.nextEffect;
< }
10935c11077
< stack: getStackAddendumByWorkInProgressFiber(source)
---
> stack: getStackByFiberInDevAndProd(source)
10939d11080
< var providerCursor = createCursor(null);
10941d11081
< var changedBitsCursor = createCursor(0);
10949c11089,11101
< function pushProvider(providerFiber) {
---
> var currentlyRenderingFiber = null;
> var lastContextDependency = null;
> var lastContextWithAllBitsObserved = null;
>
> function resetContextDependences() {
> // This is called right before React yields execution, to ensure `readContext`
> // cannot be called outside the render phase.
> currentlyRenderingFiber = null;
> lastContextDependency = null;
> lastContextWithAllBitsObserved = null;
> }
>
> function pushProvider(providerFiber, nextValue) {
10953d11104
< push(changedBitsCursor, context._changedBits, providerFiber);
10955d11105
< push(providerCursor, providerFiber, providerFiber);
10957,10958c11107
< context._currentValue = providerFiber.pendingProps.value;
< context._changedBits = providerFiber.stateNode;
---
> context._currentValue = nextValue;
10960c11109
< !(context._currentRenderer === undefined || context._currentRenderer === null || context._currentRenderer === rendererSigil) ? warning(false, 'Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.') : void 0;
---
> !(context._currentRenderer === undefined || context._currentRenderer === null || context._currentRenderer === rendererSigil) ? warningWithoutStack$1(false, 'Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.') : void 0;
10964d11112
< push(changedBitsCursor, context._changedBits2, providerFiber);
10966d11113
< push(providerCursor, providerFiber, providerFiber);
10968,10969c11115
< context._currentValue2 = providerFiber.pendingProps.value;
< context._changedBits2 = providerFiber.stateNode;
---
> context._currentValue2 = nextValue;
10971c11117
< !(context._currentRenderer2 === undefined || context._currentRenderer2 === null || context._currentRenderer2 === rendererSigil) ? warning(false, 'Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.') : void 0;
---
> !(context._currentRenderer2 === undefined || context._currentRenderer2 === null || context._currentRenderer2 === rendererSigil) ? warningWithoutStack$1(false, 'Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.') : void 0;
10978d11123
< var changedBits = changedBitsCursor.current;
10981d11125
< pop(providerCursor, providerFiber);
10983d11126
< pop(changedBitsCursor, providerFiber);
10988d11130
< context._changedBits = changedBits;
10991d11132
< context._changedBits2 = changedBits;
10995,10996c11136,11253
< function getContextCurrentValue(context) {
< return isPrimaryRenderer ? context._currentValue : context._currentValue2;
---
> function calculateChangedBits(context, newValue, oldValue) {
> // Use Object.is to compare the new context value to the old value. Inlined
> // Object.is polyfill.
> // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
> if (oldValue === newValue && (oldValue !== 0 || 1 / oldValue === 1 / newValue) || oldValue !== oldValue && newValue !== newValue // eslint-disable-line no-self-compare
> ) {
> // No change
> return 0;
> } else {
> var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : maxSigned31BitInt;
>
> {
> !((changedBits & maxSigned31BitInt) === changedBits) ? warning$1(false, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits) : void 0;
> }
> return changedBits | 0;
> }
> }
>
> function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) {
> var fiber = workInProgress.child;
> if (fiber !== null) {
> // Set the return pointer of the child to the work-in-progress fiber.
> fiber.return = workInProgress;
> }
> while (fiber !== null) {
> var nextFiber = void 0;
>
> // Visit this fiber.
> var dependency = fiber.firstContextDependency;
> if (dependency !== null) {
> do {
> // Check if the context matches.
> if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {
> // Match! Schedule an update on this fiber.
>
> if (fiber.tag === ClassComponent || fiber.tag === ClassComponentLazy) {
> // Schedule a force update on the work-in-progress.
> var update = createUpdate(renderExpirationTime);
> update.tag = ForceUpdate;
> // TODO: Because we don't have a work-in-progress, this will add the
> // update to the current fiber, too, which means it will persist even if
> // this render is thrown away. Since it's a race condition, not sure it's
> // worth fixing.
> enqueueUpdate(fiber, update);
> }
>
> if (fiber.expirationTime === NoWork || fiber.expirationTime > renderExpirationTime) {
> fiber.expirationTime = renderExpirationTime;
> }
> var alternate = fiber.alternate;
> if (alternate !== null && (alternate.expirationTime === NoWork || alternate.expirationTime > renderExpirationTime)) {
> alternate.expirationTime = renderExpirationTime;
> }
> // Update the child expiration time of all the ancestors, including
> // the alternates.
> var node = fiber.return;
> while (node !== null) {
> alternate = node.alternate;
> if (node.childExpirationTime === NoWork || node.childExpirationTime > renderExpirationTime) {
> node.childExpirationTime = renderExpirationTime;
> if (alternate !== null && (alternate.childExpirationTime === NoWork || alternate.childExpirationTime > renderExpirationTime)) {
> alternate.childExpirationTime = renderExpirationTime;
> }
> } else if (alternate !== null && (alternate.childExpirationTime === NoWork || alternate.childExpirationTime > renderExpirationTime)) {
> alternate.childExpirationTime = renderExpirationTime;
> } else {
> // Neither alternate was updated, which means the rest of the
> // ancestor path already has sufficient priority.
> break;
> }
> node = node.return;
> }
> }
> nextFiber = fiber.child;
> dependency = dependency.next;
> } while (dependency !== null);
> } else if (fiber.tag === ContextProvider) {
> // Don't scan deeper if this is a matching provider
> nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
> } else {
> // Traverse down.
> nextFiber = fiber.child;
> }
>
> if (nextFiber !== null) {
> // Set the return pointer of the child to the work-in-progress fiber.
> nextFiber.return = fiber;
> } else {
> // No child. Traverse to next sibling.
> nextFiber = fiber;
> while (nextFiber !== null) {
> if (nextFiber === workInProgress) {
> // We're back to the root of this subtree. Exit.
> nextFiber = null;
> break;
> }
> var sibling = nextFiber.sibling;
> if (sibling !== null) {
> // Set the return pointer of the sibling to the work-in-progress fiber.
> sibling.return = nextFiber.return;
> nextFiber = sibling;
> break;
> }
> // No more siblings. Traverse up.
> nextFiber = nextFiber.return;
> }
> }
> fiber = nextFiber;
> }
> }
>
> function prepareToReadContext(workInProgress, renderExpirationTime) {
> currentlyRenderingFiber = workInProgress;
> lastContextDependency = null;
> lastContextWithAllBitsObserved = null;
>
> // Reset the work-in-progress list
> workInProgress.firstContextDependency = null;
10999,11000c11256,11286
< function getContextChangedBits(context) {
< return isPrimaryRenderer ? context._changedBits : context._changedBits2;
---
> function readContext(context, observedBits) {
> if (lastContextWithAllBitsObserved === context) {
> // Nothing to do. We already observe everything in this context.
> } else if (observedBits === false || observedBits === 0) {
> // Do not observe any updates.
> } else {
> var resolvedObservedBits = void 0; // Avoid deopting on observable arguments or heterogeneous types.
> if (typeof observedBits !== 'number' || observedBits === maxSigned31BitInt) {
> // Observe all updates.
> lastContextWithAllBitsObserved = context;
> resolvedObservedBits = maxSigned31BitInt;
> } else {
> resolvedObservedBits = observedBits;
> }
>
> var contextItem = {
> context: context,
> observedBits: resolvedObservedBits,
> next: null
> };
>
> if (lastContextDependency === null) {
> !(currentlyRenderingFiber !== null) ? invariant(false, 'Context.unstable_read(): Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps.') : void 0;
> // This is the first dependency in the list
> currentlyRenderingFiber.firstContextDependency = lastContextDependency = contextItem;
> } else {
> // Append a new context item.
> lastContextDependency = lastContextDependency.next = contextItem;
> }
> }
> return isPrimaryRenderer ? context._currentValue : context._currentValue2;
11077a11364
> var profilerStartTime = -1;
11087,11133c11374
< commitTime = now();
< }
<
< /**
< * The "actual" render time is total time required to render the descendants of a Profiler component.
< * This time is stored as a stack, since Profilers can be nested.
< * This time is started during the "begin" phase and stopped during the "complete" phase.
< * It is paused (and accumulated) in the event of an interruption or an aborted render.
< */
<
< var fiberStack$1 = void 0;
<
< {
< fiberStack$1 = [];
< }
<
< var timerPausedAt = 0;
< var totalElapsedPauseTime = 0;
<
< function checkActualRenderTimeStackEmpty() {
< if (!enableProfilerTimer) {
< return;
< }
< {
< !(fiberStack$1.length === 0) ? warning(false, 'Expected an empty stack. Something was not reset properly.') : void 0;
< }
< }
<
< function markActualRenderTimeStarted(fiber) {
< if (!enableProfilerTimer) {
< return;
< }
< {
< fiberStack$1.push(fiber);
< }
<
< fiber.actualDuration = now() - fiber.actualDuration - totalElapsedPauseTime;
< fiber.actualStartTime = now();
< }
<
< function pauseActualRenderTimerIfRunning() {
< if (!enableProfilerTimer) {
< return;
< }
< if (timerPausedAt === 0) {
< timerPausedAt = now();
< }
---
> commitTime = reactScheduler.unstable_now();
11136c11377
< function recordElapsedActualRenderTime(fiber) {
---
> function startProfilerTimer(fiber) {
11140,11142d11380
< {
< !(fiber === fiberStack$1.pop()) ? warning(false, 'Unexpected Fiber (%s) popped.', getComponentName(fiber)) : void 0;
< }
11144,11145c11382
< fiber.actualDuration = now() - totalElapsedPauseTime - fiber.actualDuration;
< }
---
> profilerStartTime = reactScheduler.unstable_now();
11147,11149c11384,11385
< function resetActualRenderTimer() {
< if (!enableProfilerTimer) {
< return;
---
> if (fiber.actualStartTime < 0) {
> fiber.actualStartTime = reactScheduler.unstable_now();
11151d11386
< totalElapsedPauseTime = 0;
11154c11389
< function resumeActualRenderTimerIfPaused() {
---
> function stopProfilerTimerIfRunning(fiber) {
11158,11161c11393
< if (timerPausedAt > 0) {
< totalElapsedPauseTime += now() - timerPausedAt;
< timerPausedAt = 0;
< }
---
> profilerStartTime = -1;
11164,11173c11396
< /**
< * The "base" render time is the duration of the “begin” phase of work for a particular fiber.
< * This time is measured and stored on each fiber.
< * The time for all sibling fibers are accumulated and stored on their parent during the "complete" phase.
< * If a fiber bails out (sCU false) then its "base" timer is cancelled and the fiber is not updated.
< */
<
< var baseStartTime = -1;
<
< function recordElapsedBaseRenderTimeIfRunning(fiber) {
---
> function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
11177,11180d11399
< if (baseStartTime !== -1) {
< fiber.selfBaseTime = now() - baseStartTime;
< }
< }
11182,11188c11401,11405
< function startBaseRenderTimer() {
< if (!enableProfilerTimer) {
< return;
< }
< {
< if (baseStartTime !== -1) {
< warning(false, 'Cannot start base timer that is already running. ' + 'This error is likely caused by a bug in React. ' + 'Please file an issue.');
---
> if (profilerStartTime >= 0) {
> var elapsedTime = reactScheduler.unstable_now() - profilerStartTime;
> fiber.actualDuration += elapsedTime;
> if (overrideBaseTime) {
> fiber.selfBaseDuration = elapsedTime;
11189a11407
> profilerStartTime = -1;
11191,11198d11408
< baseStartTime = now();
< }
<
< function stopBaseRenderTimerIfRunning() {
< if (!enableProfilerTimer) {
< return;
< }
< baseStartTime = -1;
11203a11414,11417
> // React.Component uses a shared frozen object by default.
> // We'll use it to determine whether we need to initialize legacy refs.
> var emptyRefsObject = new React.Component().refs;
>
11210a11425
> var didWarnAboutDirectlyAssigningPropsToState = void 0;
11216a11432
> didWarnAboutDirectlyAssigningPropsToState = new Set();
11228c11444
< warning(false, '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
---
> warningWithoutStack$1(false, '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
11232c11448
< warnOnUndefinedDerivedState = function (workInProgress, partialState) {
---
> warnOnUndefinedDerivedState = function (type, partialState) {
11234c11450
< var componentName = getComponentName(workInProgress) || 'Component';
---
> var componentName = getComponentName(type) || 'Component';
11237c11453
< warning(false, '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);
---
> warningWithoutStack$1(false, '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);
11256c11472
< function applyDerivedStateFromProps(workInProgress, getDerivedStateFromProps, nextProps) {
---
> function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {
11269c11485
< warnOnUndefinedDerivedState(workInProgress, partialState);
---
> warnOnUndefinedDerivedState(ctor, partialState);
11278c11494
< if (updateQueue !== null && updateQueue.expirationTime === NoWork) {
---
> if (updateQueue !== null && workInProgress.expirationTime === NoWork) {
11287c11503
< var currentTime = recalculateCurrentTime();
---
> var currentTime = requestCurrentTime();
11299,11300c11515,11516
< enqueueUpdate(fiber, update, expirationTime);
< scheduleWork$1(fiber, expirationTime);
---
> enqueueUpdate(fiber, update);
> scheduleWork(fiber, expirationTime);
11304c11520
< var currentTime = recalculateCurrentTime();
---
> var currentTime = requestCurrentTime();
11318,11319c11534,11535
< enqueueUpdate(fiber, update, expirationTime);
< scheduleWork$1(fiber, expirationTime);
---
> enqueueUpdate(fiber, update);
> scheduleWork(fiber, expirationTime);
11323c11539
< var currentTime = recalculateCurrentTime();
---
> var currentTime = requestCurrentTime();
11336,11337c11552,11553
< enqueueUpdate(fiber, update, expirationTime);
< scheduleWork$1(fiber, expirationTime);
---
> enqueueUpdate(fiber, update);
> scheduleWork(fiber, expirationTime);
11341c11557
< function checkShouldComponentUpdate(workInProgress, oldProps, newProps, oldState, newState, newContext) {
---
> function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextLegacyContext) {
11343d11558
< var ctor = workInProgress.type;
11346c11561
< var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, newContext);
---
> var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextLegacyContext);
11350c11565
< !(shouldUpdate !== undefined) ? warning(false, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(workInProgress) || 'Component') : void 0;
---
> !(shouldUpdate !== undefined) ? warningWithoutStack$1(false, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component') : void 0;
11363c11578
< function checkClassInstance(workInProgress) {
---
> function checkClassInstance(workInProgress, ctor, newProps) {
11365d11579
< var type = workInProgress.type;
11367c11581
< var name = getComponentName(workInProgress) || 'Component';
---
> var name = getComponentName(ctor) || 'Component';
11371,11372c11585,11586
< if (type.prototype && typeof type.prototype.render === 'function') {
< warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
---
> if (ctor.prototype && typeof ctor.prototype.render === 'function') {
> warningWithoutStack$1(false, '%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
11374c11588
< warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
---
> warningWithoutStack$1(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
11379c11593
< !noGetInitialStateOnES6 ? warning(false, '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?', name) : void 0;
---
> !noGetInitialStateOnES6 ? warningWithoutStack$1(false, '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?', name) : void 0;
11381c11595
< !noGetDefaultPropsOnES6 ? warning(false, '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.', name) : void 0;
---
> !noGetDefaultPropsOnES6 ? warningWithoutStack$1(false, '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.', name) : void 0;
11383c11597
< !noInstancePropTypes ? warning(false, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name) : void 0;
---
> !noInstancePropTypes ? warningWithoutStack$1(false, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name) : void 0;
11385c11599
< !noInstanceContextTypes ? warning(false, 'contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name) : void 0;
---
> !noInstanceContextTypes ? warningWithoutStack$1(false, 'contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name) : void 0;
11387,11389c11601,11603
< !noComponentShouldUpdate ? warning(false, '%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.', name) : void 0;
< if (type.prototype && type.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
< warning(false, '%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(workInProgress) || 'A pure component');
---
> !noComponentShouldUpdate ? warningWithoutStack$1(false, '%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.', name) : void 0;
> if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
> warningWithoutStack$1(false, '%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component');
11392c11606
< !noComponentDidUnmount ? warning(false, '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name) : void 0;
---
> !noComponentDidUnmount ? warningWithoutStack$1(false, '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name) : void 0;
11394c11608
< !noComponentDidReceiveProps ? warning(false, '%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().', name) : void 0;
---
> !noComponentDidReceiveProps ? warningWithoutStack$1(false, '%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().', name) : void 0;
11396c11610
< !noComponentWillRecieveProps ? warning(false, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name) : void 0;
---
> !noComponentWillRecieveProps ? warningWithoutStack$1(false, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name) : void 0;
11398,11400c11612,11614
< !noUnsafeComponentWillRecieveProps ? warning(false, '%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name) : void 0;
< var hasMutatedProps = instance.props !== workInProgress.pendingProps;
< !(instance.props === undefined || !hasMutatedProps) ? warning(false, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name) : void 0;
---
> !noUnsafeComponentWillRecieveProps ? warningWithoutStack$1(false, '%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name) : void 0;
> var hasMutatedProps = instance.props !== newProps;
> !(instance.props === undefined || !hasMutatedProps) ? warningWithoutStack$1(false, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name) : void 0;
11402c11616
< !noInstanceDefaultProps ? warning(false, 'Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name) : void 0;
---
> !noInstanceDefaultProps ? warningWithoutStack$1(false, 'Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name) : void 0;
11404,11406c11618,11620
< if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(type)) {
< didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(type);
< warning(false, '%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(workInProgress));
---
> if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {
> didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);
> warningWithoutStack$1(false, '%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));
11410c11624
< !noInstanceGetDerivedStateFromProps ? warning(false, '%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name) : void 0;
---
> !noInstanceGetDerivedStateFromProps ? warningWithoutStack$1(false, '%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name) : void 0;
11412,11414c11626,11628
< !noInstanceGetDerivedStateFromCatch ? warning(false, '%s: getDerivedStateFromCatch() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name) : void 0;
< var noStaticGetSnapshotBeforeUpdate = typeof type.getSnapshotBeforeUpdate !== 'function';
< !noStaticGetSnapshotBeforeUpdate ? warning(false, '%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name) : void 0;
---
> !noInstanceGetDerivedStateFromCatch ? warningWithoutStack$1(false, '%s: getDerivedStateFromCatch() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name) : void 0;
> var noStaticGetSnapshotBeforeUpdate = typeof ctor.getSnapshotBeforeUpdate !== 'function';
> !noStaticGetSnapshotBeforeUpdate ? warningWithoutStack$1(false, '%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name) : void 0;
11417c11631
< warning(false, '%s.state: must be set to an object or null', name);
---
> warningWithoutStack$1(false, '%s.state: must be set to an object or null', name);
11420c11634
< !(typeof type.childContextTypes === 'object') ? warning(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name) : void 0;
---
> !(typeof ctor.childContextTypes === 'object') ? warningWithoutStack$1(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name) : void 0;
11435,11439c11649,11653
< function constructClassInstance(workInProgress, props, renderExpirationTime) {
< var ctor = workInProgress.type;
< var unmaskedContext = getUnmaskedContext(workInProgress);
< var needsContext = isContextConsumer(workInProgress);
< var context = needsContext ? getMaskedContext(workInProgress, unmaskedContext) : emptyObject;
---
> function constructClassInstance(workInProgress, ctor, props, renderExpirationTime) {
> var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
> var contextTypes = ctor.contextTypes;
> var isContextConsumer = contextTypes !== null && contextTypes !== undefined;
> var context = isContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;
11454c11668
< var componentName = getComponentName(workInProgress) || 'Component';
---
> var componentName = getComponentName(ctor) || 'Component';
11457c11671
< warning(false, '%s: Did not properly initialize state during construction. ' + 'Expected state to be an object, but it was %s.', componentName, instance.state === null ? 'null' : 'undefined');
---
> warningWithoutStack$1(false, '`%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.', componentName, instance.state === null ? 'null' : 'undefined', componentName);
11484c11698
< var _componentName = getComponentName(workInProgress) || 'Component';
---
> var _componentName = getComponentName(ctor) || 'Component';
11488c11702
< warning(false, '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\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks', _componentName, newApiName, foundWillMountName !== null ? '\n ' + foundWillMountName : '', foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '', foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '');
---
> warningWithoutStack$1(false, '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\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks', _componentName, newApiName, foundWillMountName !== null ? '\n ' + foundWillMountName : '', foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '', foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '');
11496c11710
< if (needsContext) {
---
> if (isContextConsumer) {
11518c11732
< warning(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress) || 'Component');
---
> warningWithoutStack$1(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');
11524c11738
< function callComponentWillReceiveProps(workInProgress, instance, newProps, newContext) {
---
> function callComponentWillReceiveProps(workInProgress, instance, newProps, nextLegacyContext) {
11528c11742
< instance.componentWillReceiveProps(newProps, newContext);
---
> instance.componentWillReceiveProps(newProps, nextLegacyContext);
11531c11745
< instance.UNSAFE_componentWillReceiveProps(newProps, newContext);
---
> instance.UNSAFE_componentWillReceiveProps(newProps, nextLegacyContext);
11537c11751
< var componentName = getComponentName(workInProgress) || 'Component';
---
> var componentName = getComponentName(workInProgress.type) || 'Component';
11540c11754
< warning(false, '%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
---
> warningWithoutStack$1(false, '%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
11548,11550c11762
< function mountClassInstance(workInProgress, renderExpirationTime) {
< var ctor = workInProgress.type;
<
---
> function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
11552c11764
< checkClassInstance(workInProgress);
---
> checkClassInstance(workInProgress, ctor, newProps);
11556,11557c11768
< var props = workInProgress.pendingProps;
< var unmaskedContext = getUnmaskedContext(workInProgress);
---
> var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
11559c11770
< instance.props = props;
---
> instance.props = newProps;
11561c11772
< instance.refs = emptyObject;
---
> instance.refs = emptyRefsObject;
11564a11776,11783
> if (instance.state === newProps) {
> var componentName = getComponentName(ctor) || 'Component';
> if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {
> didWarnAboutDirectlyAssigningPropsToState.add(componentName);
> warningWithoutStack$1(false, '%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.', componentName);
> }
> }
>
11578c11797
< processUpdateQueue(workInProgress, updateQueue, props, instance, renderExpirationTime);
---
> processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
11582c11801
< var getDerivedStateFromProps = workInProgress.type.getDerivedStateFromProps;
---
> var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
11584c11803
< applyDerivedStateFromProps(workInProgress, getDerivedStateFromProps, props);
---
> applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
11596c11815
< processUpdateQueue(workInProgress, updateQueue, props, instance, renderExpirationTime);
---
> processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
11606,11607c11825
< function resumeMountClassInstance(workInProgress, renderExpirationTime) {
< var ctor = workInProgress.type;
---
> function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
11611d11828
< var newProps = workInProgress.pendingProps;
11615,11616c11832,11833
< var newUnmaskedContext = getUnmaskedContext(workInProgress);
< var newContext = getMaskedContext(workInProgress, newUnmaskedContext);
---
> var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
> var nextLegacyContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);
11628,11629c11845,11846
< if (oldProps !== newProps || oldContext !== newContext) {
< callComponentWillReceiveProps(workInProgress, instance, newProps, newContext);
---
> if (oldProps !== newProps || oldContext !== nextLegacyContext) {
> callComponentWillReceiveProps(workInProgress, instance, newProps, nextLegacyContext);
11652c11869
< applyDerivedStateFromProps(workInProgress, getDerivedStateFromProps, newProps);
---
> applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
11656c11873
< var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, oldProps, newProps, oldState, newState, newContext);
---
> var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextLegacyContext);
11691c11908
< instance.context = newContext;
---
> instance.context = nextLegacyContext;
11697,11698c11914
< function updateClassInstance(current, workInProgress, renderExpirationTime) {
< var ctor = workInProgress.type;
---
> function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) {
11702d11917
< var newProps = workInProgress.pendingProps;
11706,11707c11921,11922
< var newUnmaskedContext = getUnmaskedContext(workInProgress);
< var newContext = getMaskedContext(workInProgress, newUnmaskedContext);
---
> var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
> var nextLegacyContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);
11719,11720c11934,11935
< if (oldProps !== newProps || oldContext !== newContext) {
< callComponentWillReceiveProps(workInProgress, instance, newProps, newContext);
---
> if (oldProps !== newProps || oldContext !== nextLegacyContext) {
> callComponentWillReceiveProps(workInProgress, instance, newProps, nextLegacyContext);
11751c11966
< applyDerivedStateFromProps(workInProgress, getDerivedStateFromProps, newProps);
---
> applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
11755c11970
< var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, oldProps, newProps, oldState, newState, newContext);
---
> var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextLegacyContext);
11763c11978
< instance.componentWillUpdate(newProps, newState, newContext);
---
> instance.componentWillUpdate(newProps, newState, nextLegacyContext);
11766c11981
< instance.UNSAFE_componentWillUpdate(newProps, newState, newContext);
---
> instance.UNSAFE_componentWillUpdate(newProps, newState, nextLegacyContext);
11800c12015
< instance.context = newContext;
---
> instance.context = nextLegacyContext;
11805,11807d12019
< var getCurrentFiberStackAddendum$7 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
<
<
11808a12021
> var didWarnAboutGenerators = void 0;
11815a12029
> didWarnAboutGenerators = false;
11836c12050
< var currentComponentErrorInfo = 'Each child in an array or iterator should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.' + (getCurrentFiberStackAddendum$7() || '');
---
> var currentComponentErrorInfo = 'Each child in an array or iterator should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.' + getCurrentFiberStackInDev();
11842c12056
< warning(false, 'Each child in an array or iterator should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.%s', getCurrentFiberStackAddendum$7());
---
> warning$1(false, 'Each child in an array or iterator should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.');
11848c12062
< function coerceRef(returnFiber, current, element) {
---
> function coerceRef(returnFiber, current$$1, element) {
11853c12067
< var componentName = getComponentName(returnFiber) || 'Component';
---
> var componentName = getComponentName(returnFiber.type) || 'Component';
11855c12069
< warning(false, 'A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using createRef() instead.' + '\n%s' + '\n\nLearn more about using refs safely here:' + '\nhttps://fb.me/react-strict-mode-string-ref', mixedRef, getStackAddendumByWorkInProgressFiber(returnFiber));
---
> warningWithoutStack$1(false, 'A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using createRef() instead.' + '\n%s' + '\n\nLearn more about using refs safely here:' + '\nhttps://fb.me/react-strict-mode-string-ref', mixedRef, getStackByFiberInDevAndProd(returnFiber));
11866c12080
< !(ownerFiber.tag === ClassComponent) ? invariant(false, 'Stateless function components cannot have refs.') : void 0;
---
> !(ownerFiber.tag === ClassComponent || ownerFiber.tag === ClassComponentLazy) ? invariant(false, 'Stateless function components cannot have refs.') : void 0;
11872,11873c12086,12087
< if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {
< return current.ref;
---
> if (current$$1 !== null && current$$1.ref !== null && typeof current$$1.ref === 'function' && current$$1.ref._stringRef === stringRef) {
> return current$$1.ref;
11876c12090,12094
< var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
---
> var refs = inst.refs;
> if (refs === emptyRefsObject) {
> // This is a lazy pooled frozen object, so we need to initialize.
> refs = inst.refs = {};
> }
11886c12104
< !(typeof mixedRef === 'string') ? invariant(false, 'Expected ref to be a function or a string.') : void 0;
---
> !(typeof mixedRef === 'string') ? invariant(false, 'Expected ref to be a function, a string, an object returned by React.createRef(), or null.') : void 0;
11897c12115
< addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + (getCurrentFiberStackAddendum$7() || '');
---
> addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + getCurrentFiberStackInDev();
11904c12122
< var currentComponentErrorInfo = 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.' + (getCurrentFiberStackAddendum$7() || '');
---
> var currentComponentErrorInfo = 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.' + getCurrentFiberStackInDev();
11911c12129
< warning(false, 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.%s', getCurrentFiberStackAddendum$7() || '');
---
> warning$1(false, 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');
11988,11990c12206,12208
< var current = newFiber.alternate;
< if (current !== null) {
< var oldIndex = current.index;
---
> var current$$1 = newFiber.alternate;
> if (current$$1 !== null) {
> var oldIndex = current$$1.index;
12015,12016c12233,12234
< function updateTextNode(returnFiber, current, textContent, expirationTime) {
< if (current === null || current.tag !== HostText) {
---
> function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {
> if (current$$1 === null || current$$1.tag !== HostText) {
12023c12241
< var existing = useFiber(current, textContent, expirationTime);
---
> var existing = useFiber(current$$1, textContent, expirationTime);
12029,12030c12247,12248
< function updateElement(returnFiber, current, element, expirationTime) {
< if (current !== null && current.type === element.type) {
---
> function updateElement(returnFiber, current$$1, element, expirationTime) {
> if (current$$1 !== null && current$$1.type === element.type) {
12032,12033c12250,12251
< var existing = useFiber(current, element.props, expirationTime);
< existing.ref = coerceRef(returnFiber, current, element);
---
> var existing = useFiber(current$$1, element.props, expirationTime);
> existing.ref = coerceRef(returnFiber, current$$1, element);
12043c12261
< created.ref = coerceRef(returnFiber, current, element);
---
> created.ref = coerceRef(returnFiber, current$$1, element);
12049,12050c12267,12268
< function updatePortal(returnFiber, current, portal, expirationTime) {
< if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
---
> function updatePortal(returnFiber, current$$1, portal, expirationTime) {
> if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {
12057c12275
< var existing = useFiber(current, portal.children || [], expirationTime);
---
> var existing = useFiber(current$$1, portal.children || [], expirationTime);
12063,12064c12281,12282
< function updateFragment(returnFiber, current, fragment, expirationTime, key) {
< if (current === null || current.tag !== Fragment) {
---
> function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {
> if (current$$1 === null || current$$1.tag !== Fragment) {
12071c12289
< var existing = useFiber(current, fragment, expirationTime);
---
> var existing = useFiber(current$$1, fragment, expirationTime);
12247c12465
< warning(false, '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 — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$7());
---
> warning$1(false, '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 — the behavior is unsupported and ' + 'could change in a future version.', key);
12402a12621,12629
> // We don't support rendering Generators because it's a mutation.
> // See https://github.com/facebook/react/issues/12995
> if (typeof Symbol === 'function' &&
> // $FlowFixMe Flow doesn't know about toStringTag
> newChildrenIterable[Symbol.toStringTag] === 'Generator') {
> !didWarnAboutGenerators ? warning$1(false, 'Using Generators 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. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;
> didWarnAboutGenerators = true;
> }
>
12405c12632
< !didWarnAboutMaps ? warning(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$7()) : void 0;
---
> !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;
12677a12905
> case ClassComponentLazy:
12708,12709c12936,12937
< function cloneChildFibers(current, workInProgress) {
< !(current === null || workInProgress.child === current.child) ? invariant(false, 'Resuming work not yet implemented.') : void 0;
---
> function cloneChildFibers(current$$1, workInProgress) {
> !(current$$1 === null || workInProgress.child === current$$1.child) ? invariant(false, 'Resuming work not yet implemented.') : void 0;
12992c13220,13256
< var getCurrentFiberStackAddendum$6 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
---
> function readLazyComponentType(thenable) {
> var status = thenable._reactStatus;
> switch (status) {
> case Resolved:
> var Component = thenable._reactResult;
> return Component;
> case Rejected:
> throw thenable._reactResult;
> case Pending:
> throw thenable;
> default:
> {
> thenable._reactStatus = Pending;
> thenable.then(function (resolvedValue) {
> if (thenable._reactStatus === Pending) {
> thenable._reactStatus = Resolved;
> if (typeof resolvedValue === 'object' && resolvedValue !== null) {
> // If the `default` property is not empty, assume it's the result
> // of an async import() and use that. Otherwise, use the
> // resolved value itself.
> var defaultExport = resolvedValue.default;
> resolvedValue = defaultExport !== undefined && defaultExport !== null ? defaultExport : resolvedValue;
> } else {
> resolvedValue = resolvedValue;
> }
> thenable._reactResult = resolvedValue;
> }
> }, function (error) {
> if (thenable._reactStatus === Pending) {
> thenable._reactStatus = Rejected;
> thenable._reactResult = error;
> }
> });
> throw thenable;
> }
> }
> }
12993a13258
> var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;
13005,13011c13270,13271
< // TODO: Remove this and use reconcileChildrenAtExpirationTime directly.
< function reconcileChildren(current, workInProgress, nextChildren) {
< reconcileChildrenAtExpirationTime(current, workInProgress, nextChildren, workInProgress.expirationTime);
< }
<
< function reconcileChildrenAtExpirationTime(current, workInProgress, nextChildren, renderExpirationTime) {
< if (current === null) {
---
> function reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime) {
> if (current$$1 === null) {
13024c13284
< workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderExpirationTime);
---
> workInProgress.child = reconcileChildFibers(workInProgress, current$$1.child, nextChildren, renderExpirationTime);
13028,13030c13288,13289
< function updateForwardRef(current, workInProgress) {
< var render = workInProgress.type.render;
< var nextProps = workInProgress.pendingProps;
---
> function updateForwardRef(current$$1, workInProgress, type, nextProps, renderExpirationTime) {
> var render = type.render;
13036c13295
< var currentRef = current !== null ? current.ref : null;
---
> var currentRef = current$$1 !== null ? current$$1.ref : null;
13038c13297
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
---
> return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
13044,13045c13303,13304
< ReactCurrentOwner.current = workInProgress;
< ReactDebugCurrentFiber.setCurrentPhase('render');
---
> ReactCurrentOwner$3.current = workInProgress;
> setCurrentPhase('render');
13047c13306
< ReactDebugCurrentFiber.setCurrentPhase(null);
---
> setCurrentPhase(null);
13050c13309
< reconcileChildren(current, workInProgress, nextChildren);
---
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
13055c13314
< function updateFragment(current, workInProgress) {
---
> function updateFragment(current$$1, workInProgress, renderExpirationTime) {
13057,13063c13316
< if (hasContextChanged()) {
< // Normally we can bail out on props equality but if context has changed
< // we don't do the bailout and we have to reuse existing props instead.
< } else if (workInProgress.memoizedProps === nextChildren) {
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< reconcileChildren(current, workInProgress, nextChildren);
---
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
13068c13321
< function updateMode(current, workInProgress) {
---
> function updateMode(current$$1, workInProgress, renderExpirationTime) {
13070,13076c13323
< if (hasContextChanged()) {
< // Normally we can bail out on props equality but if context has changed
< // we don't do the bailout and we have to reuse existing props instead.
< } else if (nextChildren === null || workInProgress.memoizedProps === nextChildren) {
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< reconcileChildren(current, workInProgress, nextChildren);
---
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
13081,13082c13328
< function updateProfiler(current, workInProgress) {
< var nextProps = workInProgress.pendingProps;
---
> function updateProfiler(current$$1, workInProgress, renderExpirationTime) {
13086,13088c13332
< if (workInProgress.memoizedProps === nextProps) {
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
---
> var nextProps = workInProgress.pendingProps;
13090c13334
< reconcileChildren(current, workInProgress, nextChildren);
---
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
13095c13339
< function markRef(current, workInProgress) {
---
> function markRef(current$$1, workInProgress) {
13097c13341
< if (current === null && ref !== null || current !== null && current.ref !== ref) {
---
> if (current$$1 === null && ref !== null || current$$1 !== null && current$$1.ref !== ref) {
13103,13118c13347,13348
< function updateFunctionalComponent(current, workInProgress) {
< var fn = workInProgress.type;
< var nextProps = workInProgress.pendingProps;
<
< if (hasContextChanged()) {
< // Normally we can bail out on props equality but if context has changed
< // we don't do the bailout and we have to reuse existing props instead.
< } else {
< if (workInProgress.memoizedProps === nextProps) {
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< // TODO: consider bringing fn.shouldComponentUpdate() back.
< // It used to be here.
< }
<
< var unmaskedContext = getUnmaskedContext(workInProgress);
---
> function updateFunctionalComponent(current$$1, workInProgress, Component, nextProps, renderExpirationTime) {
> var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);
13122c13352
<
---
> prepareToReadContext(workInProgress, renderExpirationTime);
13124,13127c13354,13357
< ReactCurrentOwner.current = workInProgress;
< ReactDebugCurrentFiber.setCurrentPhase('render');
< nextChildren = fn(nextProps, context);
< ReactDebugCurrentFiber.setCurrentPhase(null);
---
> ReactCurrentOwner$3.current = workInProgress;
> setCurrentPhase('render');
> nextChildren = Component(nextProps, context);
> setCurrentPhase(null);
13128a13359
>
13131c13362
< reconcileChildren(current, workInProgress, nextChildren);
---
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
13136c13367
< function updateClassComponent(current, workInProgress, renderExpirationTime) {
---
> function updateClassComponent(current$$1, workInProgress, Component, nextProps, renderExpirationTime) {
13140c13371,13379
< var hasContext = pushContextProvider(workInProgress);
---
> var hasContext = void 0;
> if (isContextProvider(Component)) {
> hasContext = true;
> pushContextProvider(workInProgress);
> } else {
> hasContext = false;
> }
> prepareToReadContext(workInProgress, renderExpirationTime);
>
13142c13381
< if (current === null) {
---
> if (current$$1 === null) {
13145,13147c13384,13385
< constructClassInstance(workInProgress, workInProgress.pendingProps, renderExpirationTime);
< mountClassInstance(workInProgress, renderExpirationTime);
<
---
> constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
> mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
13151c13389
< shouldUpdate = resumeMountClassInstance(workInProgress, renderExpirationTime);
---
> shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
13154c13392
< shouldUpdate = updateClassInstance(current, workInProgress, renderExpirationTime);
---
> shouldUpdate = updateClassInstance(current$$1, workInProgress, Component, nextProps, renderExpirationTime);
13156c13394
< return finishClassComponent(current, workInProgress, shouldUpdate, hasContext, renderExpirationTime);
---
> return finishClassComponent(current$$1, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime);
13159c13397
< function finishClassComponent(current, workInProgress, shouldUpdate, hasContext, renderExpirationTime) {
---
> function finishClassComponent(current$$1, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime) {
13161c13399
< markRef(current, workInProgress);
---
> markRef(current$$1, workInProgress);
13168c13406
< invalidateContextProvider(workInProgress, false);
---
> invalidateContextProvider(workInProgress, Component, false);
13171c13409
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
---
> return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
13174d13411
< var ctor = workInProgress.type;
13178c13415
< ReactCurrentOwner.current = workInProgress;
---
> ReactCurrentOwner$3.current = workInProgress;
13180c13417
< if (didCaptureError && (!enableGetDerivedStateFromCatch || typeof ctor.getDerivedStateFromCatch !== 'function')) {
---
> if (didCaptureError && (!enableGetDerivedStateFromCatch || typeof Component.getDerivedStateFromCatch !== 'function')) {
13189c13426
< stopBaseRenderTimerIfRunning();
---
> stopProfilerTimerIfRunning(workInProgress);
13193c13430
< ReactDebugCurrentFiber.setCurrentPhase('render');
---
> setCurrentPhase('render');
13198c13435
< ReactDebugCurrentFiber.setCurrentPhase(null);
---
> setCurrentPhase(null);
13204c13441
< if (didCaptureError) {
---
> if (current$$1 !== null && didCaptureError) {
13207c13444
< reconcileChildrenAtExpirationTime(current, workInProgress, null, renderExpirationTime);
---
> reconcileChildren(current$$1, workInProgress, null, renderExpirationTime);
13213c13450
< reconcileChildrenAtExpirationTime(current, workInProgress, nextChildren, renderExpirationTime);
---
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
13221c13458
< invalidateContextProvider(workInProgress, true);
---
> invalidateContextProvider(workInProgress, Component, true);
13238c13475
< function updateHostRoot(current, workInProgress, renderExpirationTime) {
---
> function updateHostRoot(current$$1, workInProgress, renderExpirationTime) {
13241,13280c13478,13491
< if (updateQueue !== null) {
< var nextProps = workInProgress.pendingProps;
< var prevState = workInProgress.memoizedState;
< var prevChildren = prevState !== null ? prevState.element : null;
< processUpdateQueue(workInProgress, updateQueue, nextProps, null, renderExpirationTime);
< var nextState = workInProgress.memoizedState;
< // Caution: React DevTools currently depends on this property
< // being called "element".
< var nextChildren = nextState.element;
<
< if (nextChildren === prevChildren) {
< // If the state is the same as before, that's a bailout because we had
< // no work that expires at this time.
< resetHydrationState();
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< var root = workInProgress.stateNode;
< if ((current === null || current.child === null) && root.hydrate && enterHydrationState(workInProgress)) {
< // If we don't have any current children this might be the first pass.
< // We always try to hydrate. If this isn't a hydration pass there won't
< // be any children to hydrate which is effectively the same thing as
< // not hydrating.
<
< // This is a bit of a hack. We track the host root as a placement to
< // know that we're currently in a mounting state. That way isMounted
< // works as expected. We must reset this before committing.
< // TODO: Delete this when we delete isMounted and findDOMNode.
< workInProgress.effectTag |= Placement;
<
< // Ensure that children mount into this root without tracking
< // side-effects. This ensures that we don't store Placement effects on
< // nodes that will be hydrated.
< workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
< } else {
< // Otherwise reset hydration state in case we aborted and resumed another
< // root.
< resetHydrationState();
< reconcileChildren(current, workInProgress, nextChildren);
< }
< return workInProgress.child;
---
> !(updateQueue !== null) ? invariant(false, 'If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.') : void 0;
> var nextProps = workInProgress.pendingProps;
> var prevState = workInProgress.memoizedState;
> var prevChildren = prevState !== null ? prevState.element : null;
> processUpdateQueue(workInProgress, updateQueue, nextProps, null, renderExpirationTime);
> var nextState = workInProgress.memoizedState;
> // Caution: React DevTools currently depends on this property
> // being called "element".
> var nextChildren = nextState.element;
> if (nextChildren === prevChildren) {
> // If the state is the same as before, that's a bailout because we had
> // no work that expires at this time.
> resetHydrationState();
> return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
13282,13284c13493,13516
< resetHydrationState();
< // If there is no update queue, that's a bailout because the root has no props.
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
---
> var root = workInProgress.stateNode;
> if ((current$$1 === null || current$$1.child === null) && root.hydrate && enterHydrationState(workInProgress)) {
> // If we don't have any current children this might be the first pass.
> // We always try to hydrate. If this isn't a hydration pass there won't
> // be any children to hydrate which is effectively the same thing as
> // not hydrating.
>
> // This is a bit of a hack. We track the host root as a placement to
> // know that we're currently in a mounting state. That way isMounted
> // works as expected. We must reset this before committing.
> // TODO: Delete this when we delete isMounted and findDOMNode.
> workInProgress.effectTag |= Placement;
>
> // Ensure that children mount into this root without tracking
> // side-effects. This ensures that we don't store Placement effects on
> // nodes that will be hydrated.
> workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
> } else {
> // Otherwise reset hydration state in case we aborted and resumed another
> // root.
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
> resetHydrationState();
> }
> return workInProgress.child;
13287c13519
< function updateHostComponent(current, workInProgress, renderExpirationTime) {
---
> function updateHostComponent(current$$1, workInProgress, renderExpirationTime) {
13290c13522
< if (current === null) {
---
> if (current$$1 === null) {
13295d13526
< var memoizedProps = workInProgress.memoizedProps;
13297,13313c13528
< var prevProps = current !== null ? current.memoizedProps : null;
<
< if (hasContextChanged()) {
< // Normally we can bail out on props equality but if context has changed
< // we don't do the bailout and we have to reuse existing props instead.
< } else if (memoizedProps === nextProps) {
< var isHidden = workInProgress.mode & AsyncMode && shouldDeprioritizeSubtree(type, nextProps);
< if (isHidden) {
< // Before bailing out, make sure we've deprioritized a hidden component.
< workInProgress.expirationTime = Never;
< }
< if (!isHidden || renderExpirationTime !== Never) {
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< // If we're rendering a hidden node at hidden priority, don't bailout. The
< // parent is complete, but the children may not be.
< }
---
> var prevProps = current$$1 !== null ? current$$1.memoizedProps : null;
13324c13539
< } else if (prevProps && shouldSetTextContent(type, prevProps)) {
---
> } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {
13330c13545
< markRef(current, workInProgress);
---
> markRef(current$$1, workInProgress);
13334c13549
< // Down-prioritize the children.
---
> // Schedule this fiber to re-render at offscreen priority. Then bailout.
13336d13550
< // Bailout and come back to this fiber later.
13341c13555
< reconcileChildren(current, workInProgress, nextChildren);
---
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
13346,13347c13560,13561
< function updateHostText(current, workInProgress) {
< if (current === null) {
---
> function updateHostText(current$$1, workInProgress) {
> if (current$$1 === null) {
13357,13359c13571,13588
< function mountIndeterminateComponent(current, workInProgress, renderExpirationTime) {
< !(current === null) ? invariant(false, 'An indeterminate component should never have mounted. This error is likely caused by a bug in React. Please file an issue.') : void 0;
< var fn = workInProgress.type;
---
> function resolveDefaultProps(Component, baseProps) {
> if (Component && Component.defaultProps) {
> // Resolve default props. Taken from ReactElement
> var props = _assign({}, baseProps);
> var defaultProps = Component.defaultProps;
> for (var propName in defaultProps) {
> if (props[propName] === undefined) {
> props[propName] = defaultProps[propName];
> }
> }
> return props;
> }
> return baseProps;
> }
>
> function mountIndeterminateComponent(current$$1, workInProgress, Component, renderExpirationTime) {
> !(current$$1 === null) ? invariant(false, 'An indeterminate component should never have mounted. This error is likely caused by a bug in React. Please file an issue.') : void 0;
>
13361c13590,13616
< var unmaskedContext = getUnmaskedContext(workInProgress);
---
> if (typeof Component === 'object' && Component !== null && typeof Component.then === 'function') {
> Component = readLazyComponentType(Component);
> var resolvedTag = workInProgress.tag = resolveLazyComponentTag(workInProgress, Component);
> var resolvedProps = resolveDefaultProps(Component, props);
> switch (resolvedTag) {
> case FunctionalComponentLazy:
> {
> return updateFunctionalComponent(current$$1, workInProgress, Component, resolvedProps, renderExpirationTime);
> }
> case ClassComponentLazy:
> {
> return updateClassComponent(current$$1, workInProgress, Component, resolvedProps, renderExpirationTime);
> }
> case ForwardRefLazy:
> {
> return updateForwardRef(current$$1, workInProgress, Component, resolvedProps, renderExpirationTime);
> }
> default:
> {
> // This message intentionally doesn't metion ForwardRef because the
> // fact that it's a separate type of work is an implementation detail.
> invariant(false, 'Element type is invalid. Received a promise that resolves to: %s. Promise elements must resolve to a class or function.', Component);
> }
> }
> }
>
> var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);
13363a13619,13620
> prepareToReadContext(workInProgress, renderExpirationTime);
>
13367,13368c13624,13625
< if (fn.prototype && typeof fn.prototype.render === 'function') {
< var componentName = getComponentName(workInProgress) || 'Unknown';
---
> if (Component.prototype && typeof Component.prototype.render === 'function') {
> var componentName = getComponentName(Component) || 'Unknown';
13371c13628
< warning(false, "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);
---
> warningWithoutStack$1(false, "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);
13380,13381c13637,13638
< ReactCurrentOwner.current = workInProgress;
< value = fn(props, context);
---
> ReactCurrentOwner$3.current = workInProgress;
> value = Component(props, context);
13387,13388d13643
< var Component = workInProgress.type;
<
13391a13647,13657
> // Push context providers early to prevent context stack mismatches.
> // During mounting we don't know the child context yet as the instance doesn't exist.
> // We will invalidate the child context in finishClassComponent() right after rendering.
> var hasContext = false;
> if (isContextProvider(Component)) {
> hasContext = true;
> pushContextProvider(workInProgress);
> } else {
> hasContext = false;
> }
>
13396c13662
< applyDerivedStateFromProps(workInProgress, getDerivedStateFromProps, props);
---
> applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);
13399,13402d13664
< // Push context providers early to prevent context stack mismatches.
< // During mounting we don't know the child context yet as the instance doesn't exist.
< // We will invalidate the child context in finishClassComponent() right after rendering.
< var hasContext = pushContextProvider(workInProgress);
13404,13405c13666,13667
< mountClassInstance(workInProgress, renderExpirationTime);
< return finishClassComponent(current, workInProgress, true, hasContext, renderExpirationTime);
---
> mountClassInstance(workInProgress, Component, props, renderExpirationTime);
> return finishClassComponent(current$$1, workInProgress, Component, true, hasContext, renderExpirationTime);
13410,13413c13672,13673
< var _Component = workInProgress.type;
<
< if (_Component) {
< !!_Component.childContextTypes ? warning(false, '%s(...): childContextTypes cannot be defined on a functional component.', _Component.displayName || _Component.name || 'Component') : void 0;
---
> if (Component) {
> !!Component.childContextTypes ? warningWithoutStack$1(false, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0;
13417c13677
< var ownerName = ReactDebugCurrentFiber.getCurrentFiberOwnerName();
---
> var ownerName = getCurrentFiberOwnerNameInDevOrNull();
13429c13689
< warning(false, 'Stateless function components cannot be given refs. ' + 'Attempts to access this ref will fail.%s%s', info, ReactDebugCurrentFiber.getCurrentFiberStackAddendum());
---
> warning$1(false, 'Stateless function components cannot be given refs. ' + 'Attempts to access this ref will fail.%s', info);
13433,13434c13693,13694
< if (typeof fn.getDerivedStateFromProps === 'function') {
< var _componentName = getComponentName(workInProgress) || 'Unknown';
---
> if (typeof Component.getDerivedStateFromProps === 'function') {
> var _componentName = getComponentName(Component) || 'Unknown';
13437c13697
< warning(false, '%s: Stateless functional components do not support getDerivedStateFromProps.', _componentName);
---
> warningWithoutStack$1(false, '%s: Stateless functional components do not support getDerivedStateFromProps.', _componentName);
13442c13702
< reconcileChildren(current, workInProgress, value);
---
> reconcileChildren(current$$1, workInProgress, value, renderExpirationTime);
13448c13708
< function updateTimeoutComponent(current, workInProgress, renderExpirationTime) {
---
> function updatePlaceholderComponent(current$$1, workInProgress, renderExpirationTime) {
13451,13453d13710
< var prevProps = workInProgress.memoizedProps;
<
< var prevDidTimeout = workInProgress.memoizedState;
13457,13574c13714,13741
< var alreadyCaptured = (workInProgress.effectTag & DidCapture) === NoEffect;
< var nextDidTimeout = !alreadyCaptured;
<
< if (hasContextChanged()) {
< // Normally we can bail out on props equality but if context has changed
< // we don't do the bailout and we have to reuse existing props instead.
< } else if (nextProps === prevProps && nextDidTimeout === prevDidTimeout) {
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
<
< var render = nextProps.children;
< var nextChildren = render(nextDidTimeout);
< workInProgress.memoizedProps = nextProps;
< workInProgress.memoizedState = nextDidTimeout;
< reconcileChildren(current, workInProgress, nextChildren);
< return workInProgress.child;
< } else {
< return null;
< }
< }
<
< function updatePortalComponent(current, workInProgress, renderExpirationTime) {
< pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
< var nextChildren = workInProgress.pendingProps;
< if (hasContextChanged()) {
< // Normally we can bail out on props equality but if context has changed
< // we don't do the bailout and we have to reuse existing props instead.
< } else if (workInProgress.memoizedProps === nextChildren) {
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
<
< if (current === null) {
< // Portals are special because we don't append the children during mount
< // but at commit. Therefore we need to track insertions which the normal
< // flow doesn't do during mount. This doesn't happen at the root because
< // the root always starts with a "current" with a null child.
< // TODO: Consider unifying this with how the root works.
< workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
< memoizeProps(workInProgress, nextChildren);
< } else {
< reconcileChildren(current, workInProgress, nextChildren);
< memoizeProps(workInProgress, nextChildren);
< }
< return workInProgress.child;
< }
<
< function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) {
< var fiber = workInProgress.child;
< if (fiber !== null) {
< // Set the return pointer of the child to the work-in-progress fiber.
< fiber.return = workInProgress;
< }
< while (fiber !== null) {
< var nextFiber = void 0;
< // Visit this fiber.
< switch (fiber.tag) {
< case ContextConsumer:
< // Check if the context matches.
< var observedBits = fiber.stateNode | 0;
< if (fiber.type === context && (observedBits & changedBits) !== 0) {
< // Update the expiration time of all the ancestors, including
< // the alternates.
< var node = fiber;
< while (node !== null) {
< var alternate = node.alternate;
< if (node.expirationTime === NoWork || node.expirationTime > renderExpirationTime) {
< node.expirationTime = renderExpirationTime;
< if (alternate !== null && (alternate.expirationTime === NoWork || alternate.expirationTime > renderExpirationTime)) {
< alternate.expirationTime = renderExpirationTime;
< }
< } else if (alternate !== null && (alternate.expirationTime === NoWork || alternate.expirationTime > renderExpirationTime)) {
< alternate.expirationTime = renderExpirationTime;
< } else {
< // Neither alternate was updated, which means the rest of the
< // ancestor path already has sufficient priority.
< break;
< }
< node = node.return;
< }
< // Don't scan deeper than a matching consumer. When we render the
< // consumer, we'll continue scanning from that point. This way the
< // scanning work is time-sliced.
< nextFiber = null;
< } else {
< // Traverse down.
< nextFiber = fiber.child;
< }
< break;
< case ContextProvider:
< // Don't scan deeper if this is a matching provider
< nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
< break;
< default:
< // Traverse down.
< nextFiber = fiber.child;
< break;
< }
< if (nextFiber !== null) {
< // Set the return pointer of the child to the work-in-progress fiber.
< nextFiber.return = fiber;
< } else {
< // No child. Traverse to next sibling.
< nextFiber = fiber;
< while (nextFiber !== null) {
< if (nextFiber === workInProgress) {
< // We're back to the root of this subtree. Exit.
< nextFiber = null;
< break;
< }
< var sibling = nextFiber.sibling;
< if (sibling !== null) {
< // Set the return pointer of the sibling to the work-in-progress fiber.
< sibling.return = nextFiber.return;
< nextFiber = sibling;
< break;
< }
< // No more siblings. Traverse up.
< nextFiber = nextFiber.return;
---
> var alreadyCaptured = (workInProgress.effectTag & DidCapture) === NoEffect;
>
> var nextDidTimeout = void 0;
> if (current$$1 !== null && workInProgress.updateQueue !== null) {
> // We're outside strict mode. Something inside this Placeholder boundary
> // suspended during the last commit. Switch to the placholder.
> workInProgress.updateQueue = null;
> nextDidTimeout = true;
> // If we're recovering from an error, reconcile twice: first to delete
> // all the existing children.
> reconcileChildren(current$$1, workInProgress, null, renderExpirationTime);
> current$$1.child = null;
> // Now we can continue reconciling like normal. This has the effect of
> // remounting all children regardless of whether their their
> // identity matches.
> } else {
> nextDidTimeout = !alreadyCaptured;
> }
>
> if ((workInProgress.mode & StrictMode) !== NoEffect) {
> if (nextDidTimeout) {
> // If the timed-out view commits, schedule an update effect to record
> // the committed time.
> workInProgress.effectTag |= Update;
> } else {
> // The state node points to the time at which placeholder timed out.
> // We can clear it once we switch back to the normal children.
> workInProgress.stateNode = null;
13577c13744,13777
< fiber = nextFiber;
---
>
> // If the `children` prop is a function, treat it like a render prop.
> // TODO: This is temporary until we finalize a lower level API.
> var children = nextProps.children;
> var nextChildren = void 0;
> if (typeof children === 'function') {
> nextChildren = children(nextDidTimeout);
> } else {
> nextChildren = nextDidTimeout ? nextProps.fallback : children;
> }
>
> workInProgress.memoizedProps = nextProps;
> workInProgress.memoizedState = nextDidTimeout;
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
> return workInProgress.child;
> } else {
> return null;
> }
> }
>
> function updatePortalComponent(current$$1, workInProgress, renderExpirationTime) {
> pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
> var nextChildren = workInProgress.pendingProps;
> if (current$$1 === null) {
> // Portals are special because we don't append the children during mount
> // but at commit. Therefore we need to track insertions which the normal
> // flow doesn't do during mount. This doesn't happen at the root because
> // the root always starts with a "current" with a null child.
> // TODO: Consider unifying this with how the root works.
> workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
> memoizeProps(workInProgress, nextChildren);
> } else {
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
> memoizeProps(workInProgress, nextChildren);
13578a13779
> return workInProgress.child;
13581c13782
< function updateContextProvider(current, workInProgress, renderExpirationTime) {
---
> function updateContextProvider(current$$1, workInProgress, renderExpirationTime) {
13587,13597d13787
< var canBailOnProps = true;
<
< if (hasContextChanged()) {
< canBailOnProps = false;
< // Normally we can bail out on props equality but if context has changed
< // we don't do the bailout and we have to reuse existing props instead.
< } else if (oldProps === newProps) {
< workInProgress.stateNode = 0;
< pushProvider(workInProgress);
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
13606c13796
< checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider', getCurrentFiberStackAddendum$6);
---
> checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider', getCurrentFiberStackInDev);
13610,13615c13800,13805
< var changedBits = void 0;
< if (oldProps === null) {
< // Initial render
< changedBits = MAX_SIGNED_31_BIT_INT;
< } else {
< if (oldProps.value === newProps.value) {
---
> pushProvider(workInProgress, newValue);
>
> if (oldProps !== null) {
> var oldValue = oldProps.value;
> var changedBits = calculateChangedBits(context, newValue, oldValue);
> if (changedBits === 0) {
13617,13620c13807,13808
< if (oldProps.children === newProps.children && canBailOnProps) {
< workInProgress.stateNode = 0;
< pushProvider(workInProgress);
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
---
> if (oldProps.children === newProps.children && !hasContextChanged()) {
> return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
13622d13809
< changedBits = 0;
13624,13654c13811,13813
< var oldValue = oldProps.value;
< // Use Object.is to compare the new context value to the old value.
< // Inlined Object.is polyfill.
< // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
< if (oldValue === newValue && (oldValue !== 0 || 1 / oldValue === 1 / newValue) || oldValue !== oldValue && newValue !== newValue // eslint-disable-line no-self-compare
< ) {
< // No change. Bailout early if children are the same.
< if (oldProps.children === newProps.children && canBailOnProps) {
< workInProgress.stateNode = 0;
< pushProvider(workInProgress);
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< changedBits = 0;
< } else {
< changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
< {
< !((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits) ? warning(false, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits) : void 0;
< }
< changedBits |= 0;
<
< if (changedBits === 0) {
< // No change. Bailout early if children are the same.
< if (oldProps.children === newProps.children && canBailOnProps) {
< workInProgress.stateNode = 0;
< pushProvider(workInProgress);
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< } else {
< propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);
< }
< }
---
> // The context value changed. Search for matching consumers and schedule
> // them to update.
> propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);
13658,13660d13816
< workInProgress.stateNode = changedBits;
< pushProvider(workInProgress);
<
13662c13818
< reconcileChildren(current, workInProgress, newChildren);
---
> reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);
13666c13822
< function updateContextConsumer(current, workInProgress, renderExpirationTime) {
---
> function updateContextConsumer(current$$1, workInProgress, renderExpirationTime) {
13669,13702d13824
< var oldProps = workInProgress.memoizedProps;
<
< var newValue = getContextCurrentValue(context);
< var changedBits = getContextChangedBits(context);
<
< if (hasContextChanged()) {
< // Normally we can bail out on props equality but if context has changed
< // we don't do the bailout and we have to reuse existing props instead.
< } else if (changedBits === 0 && oldProps === newProps) {
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< workInProgress.memoizedProps = newProps;
<
< var observedBits = newProps.unstable_observedBits;
< if (observedBits === undefined || observedBits === null) {
< // Subscribe to all changes by default
< observedBits = MAX_SIGNED_31_BIT_INT;
< }
< // Store the observedBits on the fiber's stateNode for quick access.
< workInProgress.stateNode = observedBits;
<
< if ((changedBits & observedBits) !== 0) {
< // Context change propagation stops at matching consumers, for time-
< // slicing. Continue the propagation here.
< propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);
< } else if (oldProps === newProps) {
< // Skip over a memoized parent with a bitmask bailout even
< // if we began working on it because of a deeper matching child.
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< // There is no bailout on `children` equality because we expect people
< // to often pass a bound method as a child, but it may reference
< // `this.state` or `this.props` (and thus needs to re-render on `setState`).
<
13706c13828
< !(typeof render === 'function') ? warning(false, '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.') : void 0;
---
> !(typeof render === 'function') ? warningWithoutStack$1(false, '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.') : void 0;
13708a13831,13832
> prepareToReadContext(workInProgress, renderExpirationTime);
> var newValue = readContext(context, newProps.unstable_observedBits);
13711,13712c13835,13836
< ReactCurrentOwner.current = workInProgress;
< ReactDebugCurrentFiber.setCurrentPhase('render');
---
> ReactCurrentOwner$3.current = workInProgress;
> setCurrentPhase('render');
13714c13838
< ReactDebugCurrentFiber.setCurrentPhase(null);
---
> setCurrentPhase(null);
13719c13843,13844
< reconcileChildren(current, workInProgress, newChildren);
---
> reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);
> workInProgress.memoizedProps = newProps;
13742c13867
< function bailoutOnAlreadyFinishedWork(current, workInProgress) {
---
> function bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime) {
13745,13747c13870,13872
< if (enableProfilerTimer) {
< // Don't update "base" render times for bailouts.
< stopBaseRenderTimerIfRunning();
---
> if (current$$1 !== null) {
> // Reuse previous context list
> workInProgress.firstContextDependency = current$$1.firstContextDependency;
13750,13770d13874
< // TODO: We should ideally be able to bail out early if the children have no
< // more work to do. However, since we don't have a separation of this
< // Fiber's priority and its children yet - we don't know without doing lots
< // of the same work we do anyway. Once we have that separation we can just
< // bail out here if the children has no more work at this priority level.
< // if (workInProgress.priorityOfChildren <= priorityLevel) {
< // // If there are side-effects in these children that have not yet been
< // // committed we need to ensure that they get properly transferred up.
< // if (current && current.child !== workInProgress.child) {
< // reuseChildrenEffects(workInProgress, child);
< // }
< // return null;
< // }
<
< cloneChildFibers(current, workInProgress);
< return workInProgress.child;
< }
<
< function bailoutOnLowPriority(current, workInProgress) {
< cancelWorkTimer(workInProgress);
<
13773c13877
< stopBaseRenderTimerIfRunning();
---
> stopProfilerTimerIfRunning(workInProgress);
13776,13790c13880,13891
< // TODO: Handle HostComponent tags here as well and call pushHostContext()?
< // See PR 8590 discussion for context
< switch (workInProgress.tag) {
< case HostRoot:
< pushHostRootContext(workInProgress);
< break;
< case ClassComponent:
< pushContextProvider(workInProgress);
< break;
< case HostPortal:
< pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
< break;
< case ContextProvider:
< pushProvider(workInProgress);
< break;
---
> // Check if the children have any pending work.
> var childExpirationTime = workInProgress.childExpirationTime;
> if (childExpirationTime === NoWork || childExpirationTime > renderExpirationTime) {
> // The children don't have any work either. We can skip them.
> // TODO: Once we add back resuming, we should check if the children are
> // a work-in-progress set. If so, we need to transfer their effects.
> return null;
> } else {
> // This fiber doesn't have work, but its subtree does. Clone the child
> // fibers and continue.
> cloneChildFibers(current$$1, workInProgress);
> return workInProgress.child;
13792,13794d13892
< // TODO: What if this is currently in progress?
< // How can that happen? How is this not being cloned?
< return null;
13808,13811c13906,13950
< function beginWork(current, workInProgress, renderExpirationTime) {
< if (enableProfilerTimer) {
< if (workInProgress.mode & ProfileMode) {
< markActualRenderTimeStarted(workInProgress);
---
> function beginWork(current$$1, workInProgress, renderExpirationTime) {
> var updateExpirationTime = workInProgress.expirationTime;
> if (!hasContextChanged() && (updateExpirationTime === NoWork || updateExpirationTime > renderExpirationTime)) {
> // This fiber does not have any pending work. Bailout without entering
> // the begin phase. There's still some bookkeeping we that needs to be done
> // in this optimized path, mostly pushing stuff onto the stack.
> switch (workInProgress.tag) {
> case HostRoot:
> pushHostRootContext(workInProgress);
> resetHydrationState();
> break;
> case HostComponent:
> pushHostContext(workInProgress);
> break;
> case ClassComponent:
> {
> var Component = workInProgress.type;
> if (isContextProvider(Component)) {
> pushContextProvider(workInProgress);
> }
> break;
> }
> case ClassComponentLazy:
> {
> var thenable = workInProgress.type;
> var _Component = getResultFromResolvedThenable(thenable);
> if (isContextProvider(_Component)) {
> pushContextProvider(workInProgress);
> }
> break;
> }
> case HostPortal:
> pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
> break;
> case ContextProvider:
> {
> var newValue = workInProgress.memoizedProps.value;
> pushProvider(workInProgress, newValue);
> break;
> }
> case Profiler:
> if (enableProfilerTimer) {
> workInProgress.effectTag |= Update;
> }
> break;
13812a13952
> return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
13815,13817c13955,13956
< if (workInProgress.expirationTime === NoWork || workInProgress.expirationTime > renderExpirationTime) {
< return bailoutOnLowPriority(current, workInProgress);
< }
---
> // Before entering the begin phase, clear the expiration time.
> workInProgress.expirationTime = NoWork;
13821c13960,13963
< return mountIndeterminateComponent(current, workInProgress, renderExpirationTime);
---
> {
> var _Component3 = workInProgress.type;
> return mountIndeterminateComponent(current$$1, workInProgress, _Component3, renderExpirationTime);
> }
13823c13965,13978
< return updateFunctionalComponent(current, workInProgress);
---
> {
> var _Component4 = workInProgress.type;
> var _unresolvedProps = workInProgress.pendingProps;
> return updateFunctionalComponent(current$$1, workInProgress, _Component4, _unresolvedProps, renderExpirationTime);
> }
> case FunctionalComponentLazy:
> {
> var _thenable2 = workInProgress.type;
> var _Component5 = getResultFromResolvedThenable(_thenable2);
> var _unresolvedProps2 = workInProgress.pendingProps;
> var _child = updateFunctionalComponent(current$$1, workInProgress, _Component5, resolveDefaultProps(_Component5, _unresolvedProps2), renderExpirationTime);
> workInProgress.memoizedProps = _unresolvedProps2;
> return _child;
> }
13825c13980,13993
< return updateClassComponent(current, workInProgress, renderExpirationTime);
---
> {
> var _Component6 = workInProgress.type;
> var _unresolvedProps3 = workInProgress.pendingProps;
> return updateClassComponent(current$$1, workInProgress, _Component6, _unresolvedProps3, renderExpirationTime);
> }
> case ClassComponentLazy:
> {
> var _thenable3 = workInProgress.type;
> var _Component7 = getResultFromResolvedThenable(_thenable3);
> var _unresolvedProps4 = workInProgress.pendingProps;
> var _child2 = updateClassComponent(current$$1, workInProgress, _Component7, resolveDefaultProps(_Component7, _unresolvedProps4), renderExpirationTime);
> workInProgress.memoizedProps = _unresolvedProps4;
> return _child2;
> }
13827c13995
< return updateHostRoot(current, workInProgress, renderExpirationTime);
---
> return updateHostRoot(current$$1, workInProgress, renderExpirationTime);
13829c13997
< return updateHostComponent(current, workInProgress, renderExpirationTime);
---
> return updateHostComponent(current$$1, workInProgress, renderExpirationTime);
13831,13833c13999,14001
< return updateHostText(current, workInProgress);
< case TimeoutComponent:
< return updateTimeoutComponent(current, workInProgress, renderExpirationTime);
---
> return updateHostText(current$$1, workInProgress);
> case PlaceholderComponent:
> return updatePlaceholderComponent(current$$1, workInProgress, renderExpirationTime);
13835c14003
< return updatePortalComponent(current, workInProgress, renderExpirationTime);
---
> return updatePortalComponent(current$$1, workInProgress, renderExpirationTime);
13837c14005,14015
< return updateForwardRef(current, workInProgress);
---
> {
> var type = workInProgress.type;
> return updateForwardRef(current$$1, workInProgress, type, workInProgress.pendingProps, renderExpirationTime);
> }
> case ForwardRefLazy:
> var _thenable = workInProgress.type;
> var _Component2 = getResultFromResolvedThenable(_thenable);
> var unresolvedProps = workInProgress.pendingProps;
> var child = updateForwardRef(current$$1, workInProgress, _Component2, resolveDefaultProps(_Component2, unresolvedProps), renderExpirationTime);
> workInProgress.memoizedProps = unresolvedProps;
> return child;
13839c14017
< return updateFragment(current, workInProgress);
---
> return updateFragment(current$$1, workInProgress, renderExpirationTime);
13841c14019
< return updateMode(current, workInProgress);
---
> return updateMode(current$$1, workInProgress, renderExpirationTime);
13843c14021
< return updateProfiler(current, workInProgress);
---
> return updateProfiler(current$$1, workInProgress, renderExpirationTime);
13845c14023
< return updateContextProvider(current, workInProgress, renderExpirationTime);
---
> return updateContextProvider(current$$1, workInProgress, renderExpirationTime);
13847c14025
< return updateContextConsumer(current, workInProgress, renderExpirationTime);
---
> return updateContextConsumer(current$$1, workInProgress, renderExpirationTime);
14020,14025d14197
< if (enableProfilerTimer) {
< if (workInProgress.mode & ProfileMode) {
< recordElapsedActualRenderTime(workInProgress);
< }
< }
<
14028c14200,14201
< return null;
---
> case FunctionalComponentLazy:
> break;
14031,14033c14204,14216
< // We are leaving this subtree, so pop context if any.
< popContextProvider(workInProgress);
< return null;
---
> var Component = workInProgress.type;
> if (isContextProvider(Component)) {
> popContext(workInProgress);
> }
> break;
> }
> case ClassComponentLazy:
> {
> var _Component = getResultFromResolvedThenable(workInProgress.type);
> if (isContextProvider(_Component)) {
> popContext(workInProgress);
> }
> break;
14053c14236
< return null;
---
> break;
14064,14073c14247,14256
< // If we get updated because one of our children updated, we don't
< // have newProps so we'll have to reuse them.
< // TODO: Split the update API as separate for the props vs. children.
< // Even better would be if children weren't special cased at all tho.
< var instance = workInProgress.stateNode;
< var currentHostContext = getHostContext();
< // TODO: Experiencing an error where oldProps is null. Suggests a host
< // component is hitting the resume path. Figure out why. Possibly
< // related to `hidden`.
< var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext);
---
> if (oldProps !== newProps) {
> // If we get updated because one of our children updated, we don't
> // have newProps so we'll have to reuse them.
> // TODO: Split the update API as separate for the props vs. children.
> var instance = workInProgress.stateNode;
> var currentHostContext = getHostContext();
> // TODO: Experiencing an error where oldProps is null. Suggests a host
> // component is hitting the resume path. Figure out why. Possibly
> // related to `hidden`.
> var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext);
14075c14258,14259
< updateHostComponent$1(current, workInProgress, updatePayload, type, oldProps, newProps, rootContainerInstance, currentHostContext);
---
> updateHostComponent$1(current, workInProgress, updatePayload, type, oldProps, newProps, rootContainerInstance, currentHostContext);
> }
14084c14268
< return null;
---
> break;
14120c14304
< return null;
---
> break;
14134d14317
< return null;
14147c14330
< return null;
---
> break;
14150,14152c14333,14336
< return null;
< case TimeoutComponent:
< return null;
---
> case ForwardRefLazy:
> break;
> case PlaceholderComponent:
> break;
14154c14338
< return null;
---
> break;
14156c14340
< return null;
---
> break;
14158c14342
< return null;
---
> break;
14162c14346
< return null;
---
> break;
14166c14350
< return null;
---
> break;
14168c14352
< return null;
---
> break;
14175a14360,14361
>
> return null;
14195,14199d14380
< var suppressLogging = error && error.suppressReactErrorLogging;
< if (suppressLogging) {
< return;
< }
<
14206a14388,14406
> // Browsers support silencing uncaught errors by calling
> // `preventDefault()` in window `error` handler.
> // We record this information as an expando on the error.
>
> if (error != null && error._suppressLogging) {
> if (errorBoundaryFound && willRetry) {
> // The error is recoverable and was silenced.
> // Ignore it and don't print the stack addendum.
> // This is handy for testing error boundaries without noise.
> return;
> }
> // The error is fatal. Since the silencing might have
> // been accidental, we'll surface it anyway.
> // However, the browser would have silenced the original error
> // so we'll print it first, and then print the stack addendum.
> console.error(error);
> // For a more detailed description of this block, see:
> // https://github.com/facebook/react/pull/13384
> }
14231,14234c14431
< var invokeGuardedCallback$3 = ReactErrorUtils.invokeGuardedCallback;
< var hasCaughtError$1 = ReactErrorUtils.hasCaughtError;
< var clearCaughtError$1 = ReactErrorUtils.clearCaughtError;
<
---
> var emptyObject = {};
14245c14442
< stack = getStackAddendumByWorkInProgressFiber(source);
---
> stack = getStackByFiberInDevAndProd(source);
14249c14446
< componentName: source !== null ? getComponentName(source) : null,
---
> componentName: source !== null ? getComponentName(source.type) : null,
14260c14457
< capturedError.errorBoundaryName = getComponentName(boundary);
---
> capturedError.errorBoundaryName = getComponentName(boundary.type);
14268,14273c14465,14471
< // Prevent cycle if logCapturedError() throws.
< // A cycle may still occur if logCapturedError renders a component that throws.
< var suppressLogging = e && e.suppressReactErrorLogging;
< if (!suppressLogging) {
< console.error(e);
< }
---
> // This method must not throw, or React internal state will get messed up.
> // If console.error is overridden, or logCapturedError() shows a dialog that throws,
> // we want to report this error outside of the normal stack as a last resort.
> // https://github.com/facebook/react/issues/13188
> setTimeout(function () {
> throw e;
> });
14277,14280c14475,14478
< var callComponentWillUnmountWithTimer = function (current, instance) {
< startPhaseTimer(current, 'componentWillUnmount');
< instance.props = current.memoizedProps;
< instance.state = current.memoizedState;
---
> var callComponentWillUnmountWithTimer = function (current$$1, instance) {
> startPhaseTimer(current$$1, 'componentWillUnmount');
> instance.props = current$$1.memoizedProps;
> instance.state = current$$1.memoizedState;
14286c14484
< function safelyCallComponentWillUnmount(current, instance) {
---
> function safelyCallComponentWillUnmount(current$$1, instance) {
14288,14291c14486,14489
< invokeGuardedCallback$3(null, callComponentWillUnmountWithTimer, null, current, instance);
< if (hasCaughtError$1()) {
< var unmountError = clearCaughtError$1();
< captureCommitPhaseError(current, unmountError);
---
> invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance);
> if (hasCaughtError()) {
> var unmountError = clearCaughtError();
> captureCommitPhaseError(current$$1, unmountError);
14296,14297c14494,14495
< function safelyDetachRef(current) {
< var ref = current.ref;
---
> function safelyDetachRef(current$$1) {
> var ref = current$$1.ref;
14301,14304c14499,14502
< invokeGuardedCallback$3(null, ref, null, null);
< if (hasCaughtError$1()) {
< var refError = clearCaughtError$1();
< captureCommitPhaseError(current, refError);
---
> invokeGuardedCallback(null, ref, null, null);
> if (hasCaughtError()) {
> var refError = clearCaughtError();
> captureCommitPhaseError(current$$1, refError);
14313c14511
< function commitBeforeMutationLifeCycles(current, finishedWork) {
---
> function commitBeforeMutationLifeCycles(current$$1, finishedWork) {
14315a14514
> case ClassComponentLazy:
14318,14320c14517,14519
< if (current !== null) {
< var prevProps = current.memoizedProps;
< var prevState = current.memoizedState;
---
> if (current$$1 !== null) {
> var prevProps = current$$1.memoizedProps;
> var prevState = current$$1.memoizedState;
14330c14529
< warning(false, '%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork));
---
> warningWithoutStack$1(false, '%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));
14352c14551
< function commitLifeCycles(finishedRoot, current, finishedWork, currentTime, committedExpirationTime) {
---
> function commitLifeCycles(finishedRoot, current$$1, finishedWork, committedExpirationTime) {
14354a14554
> case ClassComponentLazy:
14358c14558
< if (current === null) {
---
> if (current$$1 === null) {
14365,14366c14565,14566
< var prevProps = current.memoizedProps;
< var prevState = current.memoizedState;
---
> var prevProps = current$$1.memoizedProps;
> var prevState = current$$1.memoizedState;
14392a14593
> case ClassComponentLazy:
14409c14610
< if (current === null && finishedWork.effectTag & Update) {
---
> if (current$$1 === null && finishedWork.effectTag & Update) {
14432c14633
< case TimeoutComponent:
---
> case PlaceholderComponent:
14434c14635,14650
< // We have no life-cycles associated with Timeouts.
---
> if (enableSuspense) {
> if ((finishedWork.mode & StrictMode) === NoEffect) {
> // In loose mode, a placeholder times out by scheduling a synchronous
> // update in the commit phase. Use `updateQueue` field to signal that
> // the Timeout needs to switch to the placeholder. We don't need an
> // entire queue. Any non-null value works.
> // $FlowFixMe - Intentionally using a value other than an UpdateQueue.
> finishedWork.updateQueue = emptyObject;
> scheduleWork(finishedWork, Sync);
> } else {
> // In strict mode, the Update effect is used to record the time at
> // which the placeholder timed out.
> var currentTime = requestCurrentTime();
> finishedWork.stateNode = { timedOutAt: currentTime };
> }
> }
14461c14677
< warning(false, 'Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().%s', getComponentName(finishedWork), getStackAddendumByWorkInProgressFiber(finishedWork));
---
> warningWithoutStack$1(false, 'Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().%s', getComponentName(finishedWork.type), getStackByFiberInDevAndProd(finishedWork));
14470,14471c14686,14687
< function commitDetachRef(current) {
< var currentRef = current.ref;
---
> function commitDetachRef(current$$1) {
> var currentRef = current$$1.ref;
14484,14487c14700,14701
< function commitUnmount(current) {
< if (typeof onCommitUnmount === 'function') {
< onCommitUnmount(current);
< }
---
> function commitUnmount(current$$1) {
> onCommitUnmount(current$$1);
14489c14703
< switch (current.tag) {
---
> switch (current$$1.tag) {
14490a14705
> case ClassComponentLazy:
14492,14493c14707,14708
< safelyDetachRef(current);
< var instance = current.stateNode;
---
> safelyDetachRef(current$$1);
> var instance = current$$1.stateNode;
14495c14710
< safelyCallComponentWillUnmount(current, instance);
---
> safelyCallComponentWillUnmount(current$$1, instance);
14501c14716
< safelyDetachRef(current);
---
> safelyDetachRef(current$$1);
14510c14725
< unmountHostComponents(current);
---
> unmountHostComponents(current$$1);
14512c14727
< emptyPortalContainer(current);
---
> emptyPortalContainer(current$$1);
14551c14766
< function detachFiber(current) {
---
> function detachFiber(current$$1) {
14557,14561c14772,14776
< current.return = null;
< current.child = null;
< if (current.alternate) {
< current.alternate.child = null;
< current.alternate.return = null;
---
> current$$1.return = null;
> current$$1.child = null;
> if (current$$1.alternate) {
> current$$1.alternate.child = null;
> current$$1.alternate.return = null;
14565c14780
< function emptyPortalContainer(current) {
---
> function emptyPortalContainer(current$$1) {
14570c14785
< var portal = current.stateNode;
---
> var portal = current$$1.stateNode;
14583a14799
> case ClassComponentLazy:
14674a14891,14892
>
> // Note: these two variables *must* always be updated together.
14676a14895
>
14742,14744c14961,14963
< function unmountHostComponents(current) {
< // We only have the top Fiber that was inserted but we need recurse down its
< var node = current;
---
> function unmountHostComponents(current$$1) {
> // We only have the top Fiber that was deleted but we need recurse down its
> var node = current$$1;
14748a14968,14969
>
> // Note: these two variables *must* always be updated together.
14789a15011
> currentParentIsContainer = true;
14805c15027
< if (node === current) {
---
> if (node === current$$1) {
14809c15031
< if (node.return === null || node.return === current) {
---
> if (node.return === null || node.return === current$$1) {
14824c15046
< function commitDeletion(current) {
---
> function commitDeletion(current$$1) {
14828c15050
< unmountHostComponents(current);
---
> unmountHostComponents(current$$1);
14831c15053
< commitNestedUnmounts(current);
---
> commitNestedUnmounts(current$$1);
14833c15055
< detachFiber(current);
---
> detachFiber(current$$1);
14836c15058
< function commitWork(current, finishedWork) {
---
> function commitWork(root, current$$1, finishedWork) {
14843a15066
> case ClassComponentLazy:
14856c15079
< var oldProps = current !== null ? current.memoizedProps : newProps;
---
> var oldProps = current$$1 !== null ? current$$1.memoizedProps : newProps;
14875c15098
< var oldText = current !== null ? current.memoizedProps : newText;
---
> var oldText = current$$1 !== null ? current$$1.memoizedProps : newText;
14887c15110,15115
< onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseTime, finishedWork.actualStartTime, getCommitTime());
---
>
> if (enableSchedulerTracking) {
> onRender(finishedWork.memoizedProps.id, current$$1 === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime(), root.memoizedInteractions);
> } else {
> onRender(finishedWork.memoizedProps.id, current$$1 === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime());
> }
14891c15119
< case TimeoutComponent:
---
> case PlaceholderComponent:
14902c15130
< function commitResetTextContent(current) {
---
> function commitResetTextContent(current$$1) {
14906c15134,15138
< resetTextContent(current.stateNode);
---
> resetTextContent(current$$1.stateNode);
> }
>
> function NoopComponent() {
> return null;
14957,14967c15189
< function schedulePing(finishedWork) {
< // Once the promise resolves, we should try rendering the non-
< // placeholder state again.
< var currentTime = recalculateCurrentTime();
< var expirationTime = computeExpirationForFiber(currentTime, finishedWork);
< var recoveryUpdate = createUpdate(expirationTime);
< enqueueUpdate(finishedWork, recoveryUpdate, expirationTime);
< scheduleWork$1(finishedWork, expirationTime);
< }
<
< function throwException(root, returnFiber, sourceFiber, value, renderIsExpired, renderExpirationTime, currentTimeMs) {
---
> function throwException(root, returnFiber, sourceFiber, value, renderExpirationTime) {
14977,14987c15199,15203
< var expirationTimeMs = expirationTimeToMs(renderExpirationTime);
< var startTimeMs = expirationTimeMs - 5000;
< var elapsedMs = currentTimeMs - startTimeMs;
< if (elapsedMs < 0) {
< elapsedMs = 0;
< }
< var remainingTimeMs = expirationTimeMs - currentTimeMs;
<
< // Find the earliest timeout of all the timeouts in the ancestor path.
< // TODO: Alternatively, we could store the earliest timeout on the context
< // stack, rather than searching on every suspend.
---
> // Find the earliest timeout threshold of all the placeholders in the
> // ancestor path. We could avoid this traversal by storing the thresholds on
> // the stack, but we choose not to because we only hit this path if we're
> // IO-bound (i.e. if something suspends). Whereas the stack is used even in
> // the non-IO- bound case.
14990,14991c15206,15208
< searchForEarliestTimeout: do {
< if (_workInProgress.tag === TimeoutComponent) {
---
> var startTimeMs = -1;
> do {
> if (_workInProgress.tag === PlaceholderComponent) {
14993,14998c15210,15220
< if (current !== null && current.memoizedState === true) {
< // A parent Timeout already committed in a placeholder state. We
< // need to handle this promise immediately. In other words, we
< // should never suspend inside a tree that already expired.
< earliestTimeoutMs = 0;
< break searchForEarliestTimeout;
---
> if (current !== null && current.memoizedState === true && current.stateNode !== null) {
> // Reached a placeholder that already timed out. Each timed out
> // placeholder acts as the root of a new suspense boundary.
>
> // Use the time at which the placeholder timed out as the start time
> // for the current render.
> var timedOutAt = current.stateNode.timedOutAt;
> startTimeMs = expirationTimeToMs(timedOutAt);
>
> // Do not search any further.
> break;
15000c15222
< var timeoutPropMs = _workInProgress.pendingProps.ms;
---
> var timeoutPropMs = _workInProgress.pendingProps.delayMs;
15004d15225
< break searchForEarliestTimeout;
15008,15009d15228
< } else if (earliestTimeoutMs === -1) {
< earliestTimeoutMs = remainingTimeMs;
15015,15038c15234,15268
< // Compute the remaining time until the timeout.
< var msUntilTimeout = earliestTimeoutMs - elapsedMs;
<
< if (renderExpirationTime === Never || msUntilTimeout > 0) {
< // There's still time remaining.
< suspendRoot(root, thenable, msUntilTimeout, renderExpirationTime);
< var onResolveOrReject = function () {
< retrySuspendedRoot(root, renderExpirationTime);
< };
< thenable.then(onResolveOrReject, onResolveOrReject);
< return;
< } else {
< // No time remaining. Need to fallback to placeholder.
< // Find the nearest timeout that can be retried.
< _workInProgress = returnFiber;
< do {
< switch (_workInProgress.tag) {
< case HostRoot:
< {
< // The root expired, but no fallback was provided. Throw a
< // helpful error.
< var message = renderExpirationTime === Sync ? 'A synchronous update was suspended, but no fallback UI ' + 'was provided.' : 'An update was suspended for longer than the timeout, ' + 'but no fallback UI was provided.';
< value = new Error(message);
< break;
---
> // Schedule the nearest Placeholder to re-render the timed out view.
> _workInProgress = returnFiber;
> do {
> if (_workInProgress.tag === PlaceholderComponent) {
> var didTimeout = _workInProgress.memoizedState;
> if (!didTimeout) {
> // Found the nearest boundary.
>
> // If the boundary is not in async mode, we should not suspend, and
> // likewise, when the promise resolves, we should ping synchronously.
> var pingTime = (_workInProgress.mode & AsyncMode) === NoEffect ? Sync : renderExpirationTime;
>
> // Attach a listener to the promise to "ping" the root and retry.
> var onResolveOrReject = retrySuspendedRoot.bind(null, root, _workInProgress, pingTime);
> thenable.then(onResolveOrReject, onResolveOrReject);
>
> // If the boundary is outside of strict mode, we should *not* suspend
> // the commit. Pretend as if the suspended component rendered null and
> // keep rendering. In the commit phase, we'll schedule a subsequent
> // synchronous update to re-render the Placeholder.
> //
> // Note: It doesn't matter whether the component that suspended was
> // inside a strict mode tree. If the Placeholder is outside of it, we
> // should *not* suspend the commit.
> if ((_workInProgress.mode & StrictMode) === NoEffect) {
> _workInProgress.effectTag |= Update;
>
> // Unmount the source fiber's children
> var nextChildren = null;
> reconcileChildren(sourceFiber.alternate, sourceFiber, nextChildren, renderExpirationTime);
> sourceFiber.effectTag &= ~Incomplete;
> if (sourceFiber.tag === IndeterminateComponent) {
> // Let's just assume it's a functional component. This fiber will
> // be unmounted in the immediate next commit, anyway.
> sourceFiber.tag = FunctionalComponent;
15040,15046c15270,15283
< case TimeoutComponent:
< {
< if ((_workInProgress.effectTag & DidCapture) === NoEffect) {
< _workInProgress.effectTag |= ShouldCapture;
< var _onResolveOrReject = schedulePing.bind(null, _workInProgress);
< thenable.then(_onResolveOrReject, _onResolveOrReject);
< return;
---
>
> if (sourceFiber.tag === ClassComponent || sourceFiber.tag === ClassComponentLazy) {
> // We're going to commit this fiber even though it didn't
> // complete. But we shouldn't call any lifecycle methods or
> // callbacks. Remove all lifecycle effect tags.
> sourceFiber.effectTag &= ~LifecycleEffectMask;
> if (sourceFiber.alternate === null) {
> // We're about to mount a class component that doesn't have an
> // instance. Turn this into a dummy functional component instead,
> // to prevent type errors. This is a bit weird but it's an edge
> // case and we're about to synchronously delete this
> // component, anyway.
> sourceFiber.tag = FunctionalComponent;
> sourceFiber.type = NoopComponent;
15048,15050d15284
< // Already captured during this render. Continue to the next
< // Timeout ancestor.
< break;
15051a15286,15326
>
> // Exit without suspending.
> return;
> }
>
> // Confirmed that the boundary is in a strict mode tree. Continue with
> // the normal suspend path.
>
> var absoluteTimeoutMs = void 0;
> if (earliestTimeoutMs === -1) {
> // If no explicit threshold is given, default to an abitrarily large
> // value. The actual size doesn't matter because the threshold for the
> // whole tree will be clamped to the expiration time.
> absoluteTimeoutMs = maxSigned31BitInt;
> } else {
> if (startTimeMs === -1) {
> // This suspend happened outside of any already timed-out
> // placeholders. We don't know exactly when the update was scheduled,
> // but we can infer an approximate start time from the expiration
> // time. First, find the earliest uncommitted expiration time in the
> // tree, including work that is suspended. Then subtract the offset
> // used to compute an async update's expiration time. This will cause
> // high priority (interactive) work to expire earlier than necessary,
> // but we can account for this by adjusting for the Just Noticeable
> // Difference.
> var earliestExpirationTime = findEarliestOutstandingPriorityLevel(root, renderExpirationTime);
> var earliestExpirationTimeMs = expirationTimeToMs(earliestExpirationTime);
> startTimeMs = earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION;
> }
> absoluteTimeoutMs = startTimeMs + earliestTimeoutMs;
> }
>
> // Mark the earliest timeout in the suspended fiber's ancestor path.
> // After completing the root, we'll take the largest of all the
> // suspended fiber's timeouts and use it to compute a timeout for the
> // whole tree.
> renderDidSuspend(root, absoluteTimeoutMs, renderExpirationTime);
>
> _workInProgress.effectTag |= ShouldCapture;
> _workInProgress.expirationTime = renderExpirationTime;
> return;
15053,15055c15328,15334
< _workInProgress = _workInProgress.return;
< } while (_workInProgress !== null);
< }
---
> // This boundary already captured during this render. Continue to the
> // next boundary.
> }
> _workInProgress = _workInProgress.return;
> } while (_workInProgress !== null);
> // No boundary was found. Fallthrough to error mode.
> value = new Error('An update was suspended, but no placeholder UI was provided.');
15060a15340
> renderDidError();
15068a15349
> workInProgress.expirationTime = renderExpirationTime;
15070c15351
< enqueueCapturedUpdate(workInProgress, update, renderExpirationTime);
---
> enqueueCapturedUpdate(workInProgress, update);
15073a15355
> case ClassComponentLazy:
15079a15362
> workInProgress.expirationTime = renderExpirationTime;
15082c15365
< enqueueCapturedUpdate(workInProgress, _update, renderExpirationTime);
---
> enqueueCapturedUpdate(workInProgress, _update);
15093,15099c15376
< function unwindWork(workInProgress, renderIsExpired, renderExpirationTime) {
< if (enableProfilerTimer) {
< if (workInProgress.mode & ProfileMode) {
< recordElapsedActualRenderTime(workInProgress);
< }
< }
<
---
> function unwindWork(workInProgress, renderExpirationTime) {
15103c15380,15383
< popContextProvider(workInProgress);
---
> var Component = workInProgress.type;
> if (isContextProvider(Component)) {
> popContext(workInProgress);
> }
15111c15391
< case HostRoot:
---
> case ClassComponentLazy:
15113,15114c15393,15396
< popHostContainer(workInProgress);
< popTopLevelContextObject(workInProgress);
---
> var _Component = workInProgress.type._reactResult;
> if (isContextProvider(_Component)) {
> popContext(workInProgress);
> }
15121a15404,15412
> case HostRoot:
> {
> popHostContainer(workInProgress);
> popTopLevelContextObject(workInProgress);
> var _effectTag2 = workInProgress.effectTag;
> !((_effectTag2 & DidCapture) === NoEffect) ? invariant(false, 'The root failed to unmount after an error. This is likely a bug in React. Please file an issue.') : void 0;
> workInProgress.effectTag = _effectTag2 & ~ShouldCapture | DidCapture;
> return workInProgress;
> }
15127c15418
< case TimeoutComponent:
---
> case PlaceholderComponent:
15129,15131c15420,15422
< var _effectTag2 = workInProgress.effectTag;
< if (_effectTag2 & ShouldCapture) {
< workInProgress.effectTag = _effectTag2 & ~ShouldCapture | DidCapture;
---
> var _effectTag3 = workInProgress.effectTag;
> if (_effectTag3 & ShouldCapture) {
> workInProgress.effectTag = _effectTag3 & ~ShouldCapture | DidCapture;
15148,15155d15438
< if (enableProfilerTimer) {
< if (interruptedWork.mode & ProfileMode) {
< // Resume in case we're picking up on work that was paused.
< resumeActualRenderTimerIfPaused();
< recordElapsedActualRenderTime(interruptedWork);
< }
< }
<
15159c15442,15453
< popContextProvider(interruptedWork);
---
> var childContextTypes = interruptedWork.type.childContextTypes;
> if (childContextTypes !== null && childContextTypes !== undefined) {
> popContext(interruptedWork);
> }
> break;
> }
> case ClassComponentLazy:
> {
> var _childContextTypes = interruptedWork.type._reactResult.childContextTypes;
> if (_childContextTypes !== null && _childContextTypes !== undefined) {
> popContext(interruptedWork);
> }
15184,15186c15478,15482
< var invokeGuardedCallback$2 = ReactErrorUtils.invokeGuardedCallback;
< var hasCaughtError = ReactErrorUtils.hasCaughtError;
< var clearCaughtError = ReactErrorUtils.clearCaughtError;
---
> var Dispatcher = {
> readContext: readContext
> };
>
> var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner;
15188a15485,15491
> var interactionsRef = null;
> var subscriberRef = null;
> if (enableSchedulerTracking) {
> interactionsRef = tracking.__getInteractionsRef();
> subscriberRef = tracking.__getSubscriberRef();
> }
>
15202c15505
< var componentName = getComponentName(fiber) || 'ReactClass';
---
> var componentName = getComponentName(fiber.type) || 'ReactClass';
15206c15509
< warning(false, "Can't call setState (or forceUpdate) on an unmounted component. This " + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in the ' + 'componentWillUnmount method.%s', getStackAddendumByWorkInProgressFiber(fiber));
---
> warningWithoutStack$1(false, "Can't call setState (or forceUpdate) on an unmounted component. This " + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in the ' + 'componentWillUnmount method.%s', getStackByFiberInDevAndProd(fiber));
15211c15514
< switch (ReactDebugCurrentFiber.phase) {
---
> switch (phase) {
15216c15519
< warning(false, 'setState(...): Cannot call setState() inside getChildContext()');
---
> warningWithoutStack$1(false, 'setState(...): Cannot call setState() inside getChildContext()');
15223c15526
< warning(false, 'Cannot update during an existing state transition (such as within ' + "`render` or another component's constructor). Render methods should " + 'be a pure function of props and state; constructor side-effects are ' + 'an anti-pattern, but can be moved to `componentWillMount`.');
---
> warningWithoutStack$1(false, 'Cannot update during an existing state transition (such as within ' + '`render`). Render methods should be a pure function of props and state.');
15230,15235c15533
< // Represents the current time in ms.
< var originalStartTimeMs = now();
< var mostRecentCurrentTime = msToExpirationTime(0);
< var mostRecentCurrentTimeMs = originalStartTimeMs;
<
< // Used to ensure computeUniqueAsyncExpiration is monotonically increases.
---
> // Used to ensure computeUniqueAsyncExpiration is monotonically increasing.
15250,15251c15548,15549
< var nextLatestTimeoutMs = -1;
< var nextRenderIsExpired = false;
---
> var nextLatestAbsoluteTimeoutMs = -1;
> var nextRenderDidError = false;
15258,15259d15555
< var isRootReadyForCommit = false;
<
15264a15561,15564
> // Do not decrement interaction counts in the event of suspense timeouts.
> // This would lead to prematurely calling the interaction-complete hook.
> var suspenseDidTimeout = false;
>
15274c15574
< replayUnitOfWork = function (failedUnitOfWork, thrownValue, isAsync) {
---
> replayUnitOfWork = function (failedUnitOfWork, thrownValue, isYieldy) {
15285c15585
< warning(false, 'Could not replay rendering after an error. This is likely a bug in React. ' + 'Please file an issue.');
---
> warningWithoutStack$1(false, 'Could not replay rendering after an error. This is likely a bug in React. ' + 'Please file an issue.');
15299,15300c15599,15613
< popContextProvider(failedUnitOfWork);
< break;
---
> {
> var Component = failedUnitOfWork.type;
> if (isContextProvider(Component)) {
> popContext(failedUnitOfWork);
> }
> break;
> }
> case ClassComponentLazy:
> {
> var _Component = getResultFromResolvedThenable(failedUnitOfWork.type);
> if (isContextProvider(_Component)) {
> popContext(failedUnitOfWork);
> }
> break;
> }
15311c15624
< invokeGuardedCallback$2(null, workLoop, null, isAsync);
---
> invokeGuardedCallback(null, workLoop, null, isYieldy);
15315,15319c15628,15638
< clearCaughtError();
<
< if (enableProfilerTimer) {
< if (failedUnitOfWork.mode & ProfileMode) {
< recordElapsedActualRenderTime(failedUnitOfWork);
---
> var replayError = clearCaughtError();
> if (replayError != null && thrownValue != null) {
> try {
> // Reading the expando property is intentionally
> // inside `try` because it might be a getter or Proxy.
> if (replayError._suppressLogging) {
> // Also suppress logging for the original error.
> thrownValue._suppressLogging = true;
> }
> } catch (inner) {
> // Ignore.
15321,15323d15639
<
< // Stop "base" render timer again (after the re-thrown error).
< stopBaseRenderTimerIfRunning();
15352,15353c15668,15669
< nextLatestTimeoutMs = -1;
< nextRenderIsExpired = false;
---
> nextLatestAbsoluteTimeoutMs = -1;
> nextRenderDidError = false;
15355,15356d15670
<
< isRootReadyForCommit = false;
15359c15673
< function commitAllHostEffects() {
---
> function commitAllHostEffects(root) {
15362c15676
< ReactDebugCurrentFiber.setCurrentFiber(nextEffect);
---
> setCurrentFiber(nextEffect);
15373,15375c15687,15689
< var current = nextEffect.alternate;
< if (current !== null) {
< commitDetachRef(current);
---
> var current$$1 = nextEffect.alternate;
> if (current$$1 !== null) {
> commitDetachRef(current$$1);
15406c15720
< commitWork(_current, nextEffect);
---
> commitWork(root, _current, nextEffect);
15412c15726
< commitWork(_current2, nextEffect);
---
> commitWork(root, _current2, nextEffect);
15425c15739
< ReactDebugCurrentFiber.resetCurrentFiber();
---
> resetCurrentFiber();
15431c15745,15747
< var effectTag = nextEffect.effectTag;
---
> {
> setCurrentFiber(nextEffect);
> }
15432a15749
> var effectTag = nextEffect.effectTag;
15435,15436c15752,15753
< var current = nextEffect.alternate;
< commitBeforeMutationLifeCycles(current, nextEffect);
---
> var current$$1 = nextEffect.alternate;
> commitBeforeMutationLifeCycles(current$$1, nextEffect);
15442a15760,15763
>
> {
> resetCurrentFiber();
> }
15445c15766
< function commitAllLifeCycles(finishedRoot, currentTime, committedExpirationTime) {
---
> function commitAllLifeCycles(finishedRoot, committedExpirationTime) {
15462,15463c15783,15784
< var current = nextEffect.alternate;
< commitLifeCycles(finishedRoot, current, nextEffect, currentTime, committedExpirationTime);
---
> var current$$1 = nextEffect.alternate;
> commitLifeCycles(finishedRoot, current$$1, nextEffect, committedExpirationTime);
15495c15816
< function commitRoot(finishedWork) {
---
> function commitRoot(root, finishedWork) {
15500d15820
< var root = finishedWork.stateNode;
15506c15826,15856
< var currentTime = recalculateCurrentTime();
---
> // Update the pending priority levels to account for the work that we are
> // about to commit. This needs to happen before calling the lifecycles, since
> // they may schedule additional updates.
> var updateExpirationTimeBeforeCommit = finishedWork.expirationTime;
> var childExpirationTimeBeforeCommit = finishedWork.childExpirationTime;
> var earliestRemainingTimeBeforeCommit = updateExpirationTimeBeforeCommit === NoWork || childExpirationTimeBeforeCommit !== NoWork && childExpirationTimeBeforeCommit < updateExpirationTimeBeforeCommit ? childExpirationTimeBeforeCommit : updateExpirationTimeBeforeCommit;
> markCommittedPriorityLevels(root, earliestRemainingTimeBeforeCommit);
>
> var prevInteractions = null;
> var committedInteractions = enableSchedulerTracking ? [] : null;
> if (enableSchedulerTracking) {
> // Restore any pending interactions at this point,
> // So that cascading work triggered during the render phase will be accounted for.
> prevInteractions = interactionsRef.current;
> interactionsRef.current = root.memoizedInteractions;
>
> // We are potentially finished with the current batch of interactions.
> // So we should clear them out of the pending interaction map.
> // We do this at the start of commit in case cascading work is scheduled by commit phase lifecycles.
> // In that event, interaction data may be added back into the pending map for a future commit.
> // We also store the interactions we are about to commit so that we can notify subscribers after we're done.
> // These are stored as an Array rather than a Set,
> // Because the same interaction may be pending for multiple expiration times,
> // In which case it's important that we decrement the count the right number of times after finishing.
> root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
> if (scheduledExpirationTime <= committedExpirationTime) {
> committedInteractions.push.apply(committedInteractions, Array.from(scheduledInteractions));
> root.pendingInteractionMap.delete(scheduledExpirationTime);
> }
> });
> }
15509c15859
< ReactCurrentOwner.current = null;
---
> ReactCurrentOwner$2.current = null;
15537c15887
< invokeGuardedCallback$2(null, commitBeforeMutationLifecycles, null);
---
> invokeGuardedCallback(null, commitBeforeMutationLifecycles, null);
15569c15919
< invokeGuardedCallback$2(null, commitAllHostEffects, null);
---
> invokeGuardedCallback(null, commitAllHostEffects, null, root);
15604c15954
< invokeGuardedCallback$2(null, commitAllLifeCycles, null, root, currentTime, committedExpirationTime);
---
> invokeGuardedCallback(null, commitAllLifeCycles, null, root, committedExpirationTime);
15619,15625d15968
< if (enableProfilerTimer) {
< {
< checkActualRenderTimeStackEmpty();
< }
< resetActualRenderTimer();
< }
<
15630,15632c15973
< if (typeof onCommitRoot === 'function') {
< onCommitRoot(finishedWork.stateNode);
< }
---
> onCommitRoot(finishedWork.stateNode);
15637,15639c15978,15981
< markCommittedPriorityLevels(root, currentTime, root.current.expirationTime);
< var remainingTime = findNextPendingPriorityLevel(root);
< if (remainingTime === NoWork) {
---
> var updateExpirationTimeAfterCommit = finishedWork.expirationTime;
> var childExpirationTimeAfterCommit = finishedWork.childExpirationTime;
> var earliestRemainingTimeAfterCommit = updateExpirationTimeAfterCommit === NoWork || childExpirationTimeAfterCommit !== NoWork && childExpirationTimeAfterCommit < updateExpirationTimeAfterCommit ? childExpirationTimeAfterCommit : updateExpirationTimeAfterCommit;
> if (earliestRemainingTimeAfterCommit === NoWork) {
15644c15986,16030
< return remainingTime;
---
> onCommit(root, earliestRemainingTimeAfterCommit);
>
> if (enableSchedulerTracking) {
> interactionsRef.current = prevInteractions;
>
> var subscriber = void 0;
>
> try {
> subscriber = subscriberRef.current;
> if (subscriber !== null && root.memoizedInteractions.size > 0) {
> var threadID = computeThreadID(committedExpirationTime, root.interactionThreadID);
> subscriber.onWorkStopped(root.memoizedInteractions, threadID);
> }
> } catch (error) {
> // It's not safe for commitRoot() to throw.
> // Store the error for now and we'll re-throw in finishRendering().
> if (!hasUnhandledError) {
> hasUnhandledError = true;
> unhandledError = error;
> }
> } finally {
> // Don't update interaction counts if we're frozen due to suspense.
> // In this case, we can skip the completed-work check entirely.
> if (!suspenseDidTimeout) {
> // Now that we're done, check the completed batch of interactions.
> // If no more work is outstanding for a given interaction,
> // We need to notify the subscribers that it's finished.
> committedInteractions.forEach(function (interaction) {
> interaction.__count--;
> if (subscriber !== null && interaction.__count === 0) {
> try {
> subscriber.onInteractionScheduledWorkCompleted(interaction);
> } catch (error) {
> // It's not safe for commitRoot() to throw.
> // Store the error for now and we'll re-throw in finishRendering().
> if (!hasUnhandledError) {
> hasUnhandledError = true;
> unhandledError = error;
> }
> }
> }
> });
> }
> }
> }
15647,15648c16033,16034
< function resetExpirationTime(workInProgress, renderTime) {
< if (renderTime !== Never && workInProgress.expirationTime === Never) {
---
> function resetChildExpirationTime(workInProgress, renderTime) {
> if (renderTime !== Never && workInProgress.childExpirationTime === Never) {
15654,15667c16040
< // Check for pending updates.
< var newExpirationTime = NoWork;
< switch (workInProgress.tag) {
< case HostRoot:
< case ClassComponent:
< {
< var updateQueue = workInProgress.updateQueue;
< if (updateQueue !== null) {
< newExpirationTime = updateQueue.expirationTime;
< }
< }
< }
<
< // TODO: Calls need to visit stateNode
---
> var newChildExpirationTime = NoWork;
15670d16042
< // (And "base" render timers if that feature flag is enabled)
15672c16044,16057
< var treeBaseTime = workInProgress.selfBaseTime;
---
> // We're in profiling mode.
> // Let's use this same traversal to update the render durations.
> var actualDuration = workInProgress.actualDuration;
> var treeBaseDuration = workInProgress.selfBaseDuration;
>
> // When a fiber is cloned, its actualDuration is reset to 0.
> // This value will only be updated if work is done on the fiber (i.e. it doesn't bailout).
> // When work is done, it should bubble to the parent's actualDuration.
> // If the fiber has not been cloned though, (meaning no work was done),
> // Then this value will reflect the amount of time spent working on a previous render.
> // In that case it should not bubble.
> // We determine whether it was cloned by comparing the child pointer.
> var shouldBubbleActualDurations = workInProgress.alternate === null || workInProgress.child !== workInProgress.alternate.child;
>
15675,15677c16060,16066
< treeBaseTime += child.treeBaseTime;
< if (child.expirationTime !== NoWork && (newExpirationTime === NoWork || newExpirationTime > child.expirationTime)) {
< newExpirationTime = child.expirationTime;
---
> var childUpdateExpirationTime = child.expirationTime;
> var childChildExpirationTime = child.childExpirationTime;
> if (newChildExpirationTime === NoWork || childUpdateExpirationTime !== NoWork && childUpdateExpirationTime < newChildExpirationTime) {
> newChildExpirationTime = childUpdateExpirationTime;
> }
> if (newChildExpirationTime === NoWork || childChildExpirationTime !== NoWork && childChildExpirationTime < newChildExpirationTime) {
> newChildExpirationTime = childChildExpirationTime;
15678a16068,16071
> if (shouldBubbleActualDurations) {
> actualDuration += child.actualDuration;
> }
> treeBaseDuration += child.treeBaseDuration;
15681c16074,16075
< workInProgress.treeBaseTime = treeBaseTime;
---
> workInProgress.actualDuration = actualDuration;
> workInProgress.treeBaseDuration = treeBaseDuration;
15685,15686c16079,16085
< if (_child.expirationTime !== NoWork && (newExpirationTime === NoWork || newExpirationTime > _child.expirationTime)) {
< newExpirationTime = _child.expirationTime;
---
> var _childUpdateExpirationTime = _child.expirationTime;
> var _childChildExpirationTime = _child.childExpirationTime;
> if (newChildExpirationTime === NoWork || _childUpdateExpirationTime !== NoWork && _childUpdateExpirationTime < newChildExpirationTime) {
> newChildExpirationTime = _childUpdateExpirationTime;
> }
> if (newChildExpirationTime === NoWork || _childChildExpirationTime !== NoWork && _childChildExpirationTime < newChildExpirationTime) {
> newChildExpirationTime = _childChildExpirationTime;
15692c16091
< workInProgress.expirationTime = newExpirationTime;
---
> workInProgress.childExpirationTime = newChildExpirationTime;
15704c16103
< var current = workInProgress.alternate;
---
> var current$$1 = workInProgress.alternate;
15706c16105
< ReactDebugCurrentFiber.setCurrentFiber(workInProgress);
---
> setCurrentFiber(workInProgress);
15714c16113,16127
< var next = completeWork(current, workInProgress, nextRenderExpirationTime);
---
> if (enableProfilerTimer) {
> if (workInProgress.mode & ProfileMode) {
> startProfilerTimer(workInProgress);
> }
>
> nextUnitOfWork = completeWork(current$$1, workInProgress, nextRenderExpirationTime);
>
> if (workInProgress.mode & ProfileMode) {
> // Update render duration assuming we didn't error.
> stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);
> }
> } else {
> nextUnitOfWork = completeWork(current$$1, workInProgress, nextRenderExpirationTime);
> }
> var next = nextUnitOfWork;
15716c16129
< resetExpirationTime(workInProgress, nextRenderExpirationTime);
---
> resetChildExpirationTime(workInProgress, nextRenderExpirationTime);
15718c16131
< ReactDebugCurrentFiber.resetCurrentFiber();
---
> resetCurrentFiber();
15779d16191
< isRootReadyForCommit = true;
15782a16195,16199
> if (workInProgress.mode & ProfileMode) {
> // Record the render duration for the fiber that errored.
> stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);
> }
>
15786c16203
< var _next = unwindWork(workInProgress, nextRenderIsExpired, nextRenderExpirationTime);
---
> var _next = unwindWork(workInProgress, nextRenderExpirationTime);
15796c16213
< ReactDebugCurrentFiber.resetCurrentFiber();
---
> resetCurrentFiber();
15803a16221,16234
>
> if (enableProfilerTimer) {
> // Include the time spent working on failed children before continuing.
> if (_next.mode & ProfileMode) {
> var actualDuration = _next.actualDuration;
> var child = _next.child;
> while (child !== null) {
> actualDuration += child.actualDuration;
> child = child.sibling;
> }
> _next.actualDuration = actualDuration;
> }
> }
>
15846c16277
< var current = workInProgress.alternate;
---
> var current$$1 = workInProgress.alternate;
15851c16282
< ReactDebugCurrentFiber.setCurrentFiber(workInProgress);
---
> setCurrentFiber(workInProgress);
15861c16292
< startBaseRenderTimer();
---
> startProfilerTimer(workInProgress);
15864c16295
< next = beginWork(current, workInProgress, nextRenderExpirationTime);
---
> next = beginWork(current$$1, workInProgress, nextRenderExpirationTime);
15867,15869c16298,16299
< // Update "base" time if the render wasn't bailed out on.
< recordElapsedBaseRenderTimeIfRunning(workInProgress);
< stopBaseRenderTimerIfRunning();
---
> // Record the render duration assuming we didn't bailout (or error).
> stopProfilerTimerIfRunningAndRecordDelta(workInProgress, true);
15872c16302
< next = beginWork(current, workInProgress, nextRenderExpirationTime);
---
> next = beginWork(current$$1, workInProgress, nextRenderExpirationTime);
15876c16306
< ReactDebugCurrentFiber.resetCurrentFiber();
---
> resetCurrentFiber();
15894c16324
< ReactCurrentOwner.current = null;
---
> ReactCurrentOwner$2.current = null;
15899,15901c16329,16331
< function workLoop(isAsync) {
< if (!isAsync) {
< // Flush all expired work.
---
> function workLoop(isYieldy) {
> if (!isYieldy) {
> // Flush work without yielding
15910,15915d16339
<
< if (enableProfilerTimer) {
< // If we didn't finish, pause the "actual" render timer.
< // We'll restart it when we resume work.
< pauseActualRenderTimerIfRunning();
< }
15919c16343
< function renderRoot(root, expirationTime, isAsync) {
---
> function renderRoot(root, isYieldy, isExpired) {
15921a16346,16356
> ReactCurrentOwner$2.currentDispatcher = Dispatcher;
>
> var expirationTime = root.nextExpirationTimeToWorkOn;
>
> var prevInteractions = null;
> if (enableSchedulerTracking) {
> // We're about to start new tracked work.
> // Restore pending interactions so cascading work triggered during the render phase will be accounted for.
> prevInteractions = interactionsRef.current;
> interactionsRef.current = root.memoizedInteractions;
> }
15930d16364
< nextLatestTimeoutMs = -1;
15932a16367,16403
>
> if (enableSchedulerTracking) {
> // Determine which interactions this batch of work currently includes,
> // So that we can accurately attribute time spent working on it,
> var interactions = new Set();
> root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
> if (scheduledExpirationTime <= expirationTime) {
> scheduledInteractions.forEach(function (interaction) {
> return interactions.add(interaction);
> });
> }
> });
>
> // Store the current set of interactions on the FiberRoot for a few reasons:
> // We can re-use it in hot functions like renderRoot() without having to recalculate it.
> // We will also use it in commitWork() to pass to any Profiler onRender() hooks.
> // This also provides DevTools with a way to access it when the onCommitRoot() hook is called.
> root.memoizedInteractions = interactions;
>
> if (interactions.size > 0) {
> var subscriber = subscriberRef.current;
> if (subscriber !== null) {
> var threadID = computeThreadID(expirationTime, root.interactionThreadID);
> try {
> subscriber.onWorkStarted(interactions, threadID);
> } catch (error) {
> // Work thrown by an interaction tracking subscriber should be rethrown,
> // But only once it's safe (to avoid leaveing the scheduler in an invalid state).
> // Store the error for now and we'll re-throw in finishRendering().
> if (!hasUnhandledError) {
> hasUnhandledError = true;
> unhandledError = error;
> }
> }
> }
> }
> }
15937,15938d16407
< nextRenderIsExpired = !isAsync || nextRenderExpirationTime <= mostRecentCurrentTime;
<
15943c16412
< workLoop(isAsync);
---
> workLoop(isYieldy);
15945,15949d16413
< if (enableProfilerTimer) {
< // Stop "base" render timer in the event of an error.
< stopBaseRenderTimerIfRunning();
< }
<
15963c16427
< replayUnitOfWork(failedUnitOfWork, thrownValue, isAsync);
---
> replayUnitOfWork(failedUnitOfWork, thrownValue, isYieldy);
15982c16446,16449
< break;
---
> } else {
> throwException(root, returnFiber, sourceFiber, thrownValue, nextRenderExpirationTime);
> nextUnitOfWork = completeUnitOfWork(sourceFiber);
> continue;
15984,15985d16450
< throwException(root, returnFiber, sourceFiber, thrownValue, nextRenderIsExpired, nextRenderExpirationTime, mostRecentCurrentTimeMs);
< nextUnitOfWork = completeUnitOfWork(sourceFiber);
15990a16456,16460
> if (enableSchedulerTracking) {
> // Tracked work is done for now; restore the previous interactions.
> interactionsRef.current = prevInteractions;
> }
>
15992d16461
< var didCompleteRoot = false;
15993a16463,16464
> ReactCurrentOwner$2.currentDispatcher = null;
> resetContextDependences();
15997c16468,16469
< stopWorkLoopTimer(interruptedBy, didCompleteRoot);
---
> var _didCompleteRoot = false;
> stopWorkLoopTimer(interruptedBy, _didCompleteRoot);
16003,16018c16475,16514
< return null;
< } else if (nextUnitOfWork === null) {
< // We reached the root.
< if (isRootReadyForCommit) {
< didCompleteRoot = true;
< stopWorkLoopTimer(interruptedBy, didCompleteRoot);
< interruptedBy = null;
< // The root successfully completed. It's ready for commit.
< root.pendingCommitExpirationTime = expirationTime;
< var finishedWork = root.current.alternate;
< return finishedWork;
< } else {
< // The root did not complete.
< stopWorkLoopTimer(interruptedBy, didCompleteRoot);
< interruptedBy = null;
< !!nextRenderIsExpired ? invariant(false, 'Expired work should have completed. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> // `nextRoot` points to the in-progress root. A non-null value indicates
> // that we're in the middle of an async render. Set it to null to indicate
> // there's no more work to be done in the current batch.
> nextRoot = null;
> onFatal(root);
> return;
> }
>
> if (nextUnitOfWork !== null) {
> // There's still remaining async work in this tree, but we ran out of time
> // in the current frame. Yield back to the renderer. Unless we're
> // interrupted by a higher priority update, we'll continue later from where
> // we left off.
> var _didCompleteRoot2 = false;
> stopWorkLoopTimer(interruptedBy, _didCompleteRoot2);
> interruptedBy = null;
> onYield(root);
> return;
> }
>
> // We completed the whole tree.
> var didCompleteRoot = true;
> stopWorkLoopTimer(interruptedBy, didCompleteRoot);
> var rootWorkInProgress = root.current.alternate;
> !(rootWorkInProgress !== null) ? invariant(false, 'Finished root should have a work-in-progress. This error is likely caused by a bug in React. Please file an issue.') : void 0;
>
> // `nextRoot` points to the in-progress root. A non-null value indicates
> // that we're in the middle of an async render. Set it to null to indicate
> // there's no more work to be done in the current batch.
> nextRoot = null;
> interruptedBy = null;
>
> if (nextRenderDidError) {
> // There was an error
> if (hasLowerPriorityWork(root, expirationTime)) {
> // There's lower priority work. If so, it may have the effect of fixing
> // the exception that was just thrown. Exit without committing. This is
> // similar to a suspend, but without a timeout because we're not waiting
> // for a promise to resolve. React will restart at the lower
> // priority level.
16020,16027c16516,16532
< if (nextLatestTimeoutMs >= 0) {
< setTimeout(function () {
< retrySuspendedRoot(root, expirationTime);
< }, nextLatestTimeoutMs);
< }
< var firstUnblockedExpirationTime = findNextPendingPriorityLevel(root);
< onBlock(firstUnblockedExpirationTime);
< return null;
---
> var suspendedExpirationTime = expirationTime;
> var rootExpirationTime = root.expirationTime;
> onSuspend(root, rootWorkInProgress, suspendedExpirationTime, rootExpirationTime, -1 // Indicates no timeout
> );
> return;
> } else if (
> // There's no lower priority work, but we're rendering asynchronously.
> // Synchronsouly attempt to render the same level one more time. This is
> // similar to a suspend, but without a timeout because we're not waiting
> // for a promise to resolve.
> !root.didError && !isExpired) {
> root.didError = true;
> var _suspendedExpirationTime = root.nextExpirationTimeToWorkOn = expirationTime;
> var _rootExpirationTime = root.expirationTime = Sync;
> onSuspend(root, rootWorkInProgress, _suspendedExpirationTime, _rootExpirationTime, -1 // Indicates no timeout
> );
> return;
16029,16034d16533
< } else {
< stopWorkLoopTimer(interruptedBy, didCompleteRoot);
< interruptedBy = null;
< // There's more work to do, but we ran out of time. Yield back to
< // the renderer.
< return null;
16035a16535,16566
>
> if (enableSuspense && !isExpired && nextLatestAbsoluteTimeoutMs !== -1) {
> // The tree was suspended.
> var _suspendedExpirationTime2 = expirationTime;
> markSuspendedPriorityLevel(root, _suspendedExpirationTime2);
>
> // Find the earliest uncommitted expiration time in the tree, including
> // work that is suspended. The timeout threshold cannot be longer than
> // the overall expiration.
> var earliestExpirationTime = findEarliestOutstandingPriorityLevel(root, expirationTime);
> var earliestExpirationTimeMs = expirationTimeToMs(earliestExpirationTime);
> if (earliestExpirationTimeMs < nextLatestAbsoluteTimeoutMs) {
> nextLatestAbsoluteTimeoutMs = earliestExpirationTimeMs;
> }
>
> // Subtract the current time from the absolute timeout to get the number
> // of milliseconds until the timeout. In other words, convert an absolute
> // timestamp to a relative time. This is the value that is passed
> // to `setTimeout`.
> var currentTimeMs = expirationTimeToMs(requestCurrentTime());
> var msUntilTimeout = nextLatestAbsoluteTimeoutMs - currentTimeMs;
> msUntilTimeout = msUntilTimeout < 0 ? 0 : msUntilTimeout;
>
> // TODO: Account for the Just Noticeable Difference
>
> var _rootExpirationTime2 = root.expirationTime;
> onSuspend(root, rootWorkInProgress, _suspendedExpirationTime2, _rootExpirationTime2, msUntilTimeout);
> return;
> }
>
> // Ready to commit.
> onComplete(root, rootWorkInProgress, expirationTime);
16044a16576
> case ClassComponentLazy:
16050,16051c16582,16583
< enqueueUpdate(fiber, update, expirationTime);
< scheduleWork$1(fiber, expirationTime);
---
> enqueueUpdate(fiber, update);
> scheduleWork(fiber, expirationTime);
16059,16060c16591,16592
< enqueueUpdate(fiber, _update, expirationTime);
< scheduleWork$1(fiber, expirationTime);
---
> enqueueUpdate(fiber, _update);
> scheduleWork(fiber, expirationTime);
16073,16074c16605,16606
< enqueueUpdate(rootFiber, _update2, expirationTime);
< scheduleWork$1(rootFiber, expirationTime);
---
> enqueueUpdate(rootFiber, _update2);
> scheduleWork(rootFiber, expirationTime);
16082,16106c16614,16616
< function computeAsyncExpiration(currentTime) {
< // Given the current clock time, returns an expiration time. We use rounding
< // to batch like updates together.
< // Should complete within ~5000ms. 5250ms max.
< var expirationMs = 5000;
< var bucketSizeMs = 250;
< return computeExpirationBucket(currentTime, expirationMs, bucketSizeMs);
< }
<
< function computeInteractiveExpiration(currentTime) {
< var expirationMs = void 0;
< // We intentionally set a higher expiration time for interactive updates in
< // dev than in production.
< // If the main thread is being blocked so long that you hit the expiration,
< // it's a problem that could be solved with better scheduling.
< // People will be more likely to notice this and fix it with the long
< // expiration time in development.
< // In production we opt for better UX at the risk of masking scheduling
< // problems, by expiring fast.
< {
< // Should complete within ~500ms. 600ms max.
< expirationMs = 500;
< }
< var bucketSizeMs = 100;
< return computeExpirationBucket(currentTime, expirationMs, bucketSizeMs);
---
> function computeThreadID(expirationTime, interactionThreadID) {
> // Interaction threads are unique per root and expiration time.
> return expirationTime * 1000 + interactionThreadID;
16111c16621
< var currentTime = recalculateCurrentTime();
---
> var currentTime = requestCurrentTime();
16148a16659,16663
> // If we're in the middle of rendering a tree, do not update at the same
> // expiration time that is already rendering.
> if (nextRoot !== null && expirationTime === nextRenderExpirationTime) {
> expirationTime += 1;
> }
16158,16159c16673,16674
< if (lowestPendingInteractiveExpirationTime === NoWork || expirationTime > lowestPendingInteractiveExpirationTime) {
< lowestPendingInteractiveExpirationTime = expirationTime;
---
> if (lowestPriorityPendingInteractiveExpirationTime === NoWork || expirationTime > lowestPriorityPendingInteractiveExpirationTime) {
> lowestPriorityPendingInteractiveExpirationTime = expirationTime;
16165,16166c16680
< // TODO: Rename this to scheduleTimeout or something
< function suspendRoot(root, thenable, timeoutMs, suspendedTime) {
---
> function renderDidSuspend(root, absoluteTimeoutMs, suspendedTime) {
16168,16169c16682,16683
< if (timeoutMs >= 0 && nextLatestTimeoutMs < timeoutMs) {
< nextLatestTimeoutMs = timeoutMs;
---
> if (absoluteTimeoutMs >= 0 && nextLatestAbsoluteTimeoutMs < absoluteTimeoutMs) {
> nextLatestAbsoluteTimeoutMs = absoluteTimeoutMs;
16173,16178c16687,16688
< function retrySuspendedRoot(root, suspendedTime) {
< markPingedPriorityLevel(root, suspendedTime);
< var retryTime = findNextPendingPriorityLevel(root);
< if (retryTime !== NoWork) {
< requestRetry(root, retryTime);
< }
---
> function renderDidError() {
> nextRenderDidError = true;
16181,16182c16691,16693
< function scheduleWork$1(fiber, expirationTime) {
< recordScheduleUpdate();
---
> function retrySuspendedRoot(root, fiber, suspendedTime) {
> if (enableSuspense) {
> var retryTime = void 0;
16184,16187c16695,16720
< {
< if (fiber.tag === ClassComponent) {
< var instance = fiber.stateNode;
< warnAboutInvalidUpdates(instance);
---
> if (isPriorityLevelSuspended(root, suspendedTime)) {
> // Ping at the original level
> retryTime = suspendedTime;
> markPingedPriorityLevel(root, retryTime);
> } else {
> // Placeholder already timed out. Compute a new expiration time
> var currentTime = requestCurrentTime();
> retryTime = computeExpirationForFiber(currentTime, fiber);
> markPendingPriorityLevel(root, retryTime);
> }
>
> scheduleWorkToRoot(fiber, retryTime);
> var rootExpirationTime = root.expirationTime;
> if (rootExpirationTime !== NoWork) {
> if (enableSchedulerTracking) {
> // Restore previous interactions so that new work is associated with them.
> var prevInteractions = interactionsRef.current;
> interactionsRef.current = root.memoizedInteractions;
> // Because suspense timeouts do not decrement the interaction count,
> // Continued suspense work should also not increment the count.
> storeInteractionsForExpirationTime(root, rootExpirationTime, false);
> requestWork(root, rootExpirationTime);
> interactionsRef.current = prevInteractions;
> } else {
> requestWork(root, rootExpirationTime);
> }
16189a16723
> }
16191c16725,16738
< var node = fiber;
---
> function scheduleWorkToRoot(fiber, expirationTime) {
> // Update the source fiber's expiration time
> if (fiber.expirationTime === NoWork || fiber.expirationTime > expirationTime) {
> fiber.expirationTime = expirationTime;
> }
> var alternate = fiber.alternate;
> if (alternate !== null && (alternate.expirationTime === NoWork || alternate.expirationTime > expirationTime)) {
> alternate.expirationTime = expirationTime;
> }
> // Walk the parent path to the root and update the child expiration time.
> var node = fiber.return;
> if (node === null && fiber.tag === HostRoot) {
> return fiber.stateNode;
> }
16193,16230c16740,16744
< // Walk the parent path to the root and update each node's
< // expiration time.
< if (node.expirationTime === NoWork || node.expirationTime > expirationTime) {
< node.expirationTime = expirationTime;
< }
< if (node.alternate !== null) {
< if (node.alternate.expirationTime === NoWork || node.alternate.expirationTime > expirationTime) {
< node.alternate.expirationTime = expirationTime;
< }
< }
< if (node.return === null) {
< if (node.tag === HostRoot) {
< var root = node.stateNode;
< if (!isWorking && nextRenderExpirationTime !== NoWork && expirationTime < nextRenderExpirationTime) {
< // This is an interruption. (Used for performance tracking.)
< interruptedBy = fiber;
< resetStack();
< }
< markPendingPriorityLevel(root, expirationTime);
< var nextExpirationTimeToWorkOn = findNextPendingPriorityLevel(root);
< if (
< // If we're in the render phase, we don't need to schedule this root
< // for an update, because we'll do it before we exit...
< !isWorking || isCommitting$1 ||
< // ...unless this is a different root than the one we're rendering.
< nextRoot !== root) {
< requestWork(root, nextExpirationTimeToWorkOn);
< }
< if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
< invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');
< }
< } else {
< {
< if (fiber.tag === ClassComponent) {
< warnAboutUpdateOnUnmounted(fiber);
< }
< }
< return;
---
> alternate = node.alternate;
> if (node.childExpirationTime === NoWork || node.childExpirationTime > expirationTime) {
> node.childExpirationTime = expirationTime;
> if (alternate !== null && (alternate.childExpirationTime === NoWork || alternate.childExpirationTime > expirationTime)) {
> alternate.childExpirationTime = expirationTime;
16231a16746,16750
> } else if (alternate !== null && (alternate.childExpirationTime === NoWork || alternate.childExpirationTime > expirationTime)) {
> alternate.childExpirationTime = expirationTime;
> }
> if (node.return === null && node.tag === HostRoot) {
> return node.stateNode;
16234a16754
> return null;
16237,16241c16757,16790
< function recalculateCurrentTime() {
< // Subtract initial time so it fits inside 32bits
< mostRecentCurrentTimeMs = now() - originalStartTimeMs;
< mostRecentCurrentTime = msToExpirationTime(mostRecentCurrentTimeMs);
< return mostRecentCurrentTime;
---
> function storeInteractionsForExpirationTime(root, expirationTime, updateInteractionCounts) {
> if (!enableSchedulerTracking) {
> return;
> }
>
> var interactions = interactionsRef.current;
> if (interactions.size > 0) {
> var pendingInteractions = root.pendingInteractionMap.get(expirationTime);
> if (pendingInteractions != null) {
> interactions.forEach(function (interaction) {
> if (updateInteractionCounts && !pendingInteractions.has(interaction)) {
> // Update the pending async work count for previously unscheduled interaction.
> interaction.__count++;
> }
>
> pendingInteractions.add(interaction);
> });
> } else {
> root.pendingInteractionMap.set(expirationTime, new Set(interactions));
>
> // Update the pending async work count for the current interactions.
> if (updateInteractionCounts) {
> interactions.forEach(function (interaction) {
> interaction.__count++;
> });
> }
> }
>
> var subscriber = subscriberRef.current;
> if (subscriber !== null) {
> var threadID = computeThreadID(expirationTime, root.interactionThreadID);
> subscriber.onWorkScheduled(interactions, threadID);
> }
> }
16244,16251c16793,16833
< function deferredUpdates(fn) {
< var previousExpirationContext = expirationContext;
< var currentTime = recalculateCurrentTime();
< expirationContext = computeAsyncExpiration(currentTime);
< try {
< return fn();
< } finally {
< expirationContext = previousExpirationContext;
---
> function scheduleWork(fiber, expirationTime) {
> recordScheduleUpdate();
>
> {
> if (fiber.tag === ClassComponent || fiber.tag === ClassComponentLazy) {
> var instance = fiber.stateNode;
> warnAboutInvalidUpdates(instance);
> }
> }
>
> var root = scheduleWorkToRoot(fiber, expirationTime);
> if (root === null) {
> if (true && (fiber.tag === ClassComponent || fiber.tag === ClassComponentLazy)) {
> warnAboutUpdateOnUnmounted(fiber);
> }
> return;
> }
>
> if (enableSchedulerTracking) {
> storeInteractionsForExpirationTime(root, expirationTime, true);
> }
>
> if (!isWorking && nextRenderExpirationTime !== NoWork && expirationTime < nextRenderExpirationTime) {
> // This is an interruption. (Used for performance tracking.)
> interruptedBy = fiber;
> resetStack();
> }
> markPendingPriorityLevel(root, expirationTime);
> if (
> // If we're in the render phase, we don't need to schedule this root
> // for an update, because we'll do it before we exit...
> !isWorking || isCommitting$1 ||
> // ...unless this is a different root than the one we're rendering.
> nextRoot !== root) {
> var rootExpirationTime = root.expirationTime;
> requestWork(root, rootExpirationTime);
> }
> if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
> // Reset this back to zero so subsequent updates don't throw.
> nestedUpdateCount = 0;
> invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');
16253a16836
>
16276c16859
< var lowestPendingInteractiveExpirationTime = NoWork;
---
> var lowestPriorityPendingInteractiveExpirationTime = NoWork;
16287a16871,16874
> var originalStartTimeMs = reactScheduler.unstable_now();
> var currentRendererTime = msToExpirationTime(originalStartTimeMs);
> var currentSchedulerTime = currentRendererTime;
>
16289c16876
< var NESTED_UPDATE_LIMIT = 1000;
---
> var NESTED_UPDATE_LIMIT = 50;
16290a16878
> var lastCommittedRootDuringThisBatch = null;
16294c16882,16887
< function scheduleCallbackWithExpiration(expirationTime) {
---
> function recomputeCurrentRendererTime() {
> var currentTimeMs = reactScheduler.unstable_now() - originalStartTimeMs;
> currentRendererTime = msToExpirationTime(currentTimeMs);
> }
>
> function scheduleCallbackWithExpirationTime(root, expirationTime) {
16304c16897
< cancelDeferredCallback(callbackID);
---
> reactScheduler.unstable_cancelScheduledWork(callbackID);
16312,16316d16904
< // Compute a timeout for the given expiration time.
< var currentMs = now() - originalStartTimeMs;
< var expirationMs = expirationTimeToMs(expirationTime);
< var timeout = expirationMs - currentMs;
<
16318c16906,16961
< callbackID = scheduleDeferredCallback(performAsyncWork, { timeout: timeout });
---
> var currentMs = reactScheduler.unstable_now() - originalStartTimeMs;
> var expirationTimeMs = expirationTimeToMs(expirationTime);
> var timeout = expirationTimeMs - currentMs;
> callbackID = reactScheduler.unstable_scheduleWork(performAsyncWork, { timeout: timeout });
> }
>
> // For every call to renderRoot, one of onFatal, onComplete, onSuspend, and
> // onYield is called upon exiting. We use these in lieu of returning a tuple.
> // I've also chosen not to inline them into renderRoot because these will
> // eventually be lifted into the renderer.
> function onFatal(root) {
> root.finishedWork = null;
> }
>
> function onComplete(root, finishedWork, expirationTime) {
> root.pendingCommitExpirationTime = expirationTime;
> root.finishedWork = finishedWork;
> }
>
> function onSuspend(root, finishedWork, suspendedExpirationTime, rootExpirationTime, msUntilTimeout) {
> root.expirationTime = rootExpirationTime;
> if (enableSuspense && msUntilTimeout === 0 && !shouldYield()) {
> // Don't wait an additional tick. Commit the tree immediately.
> root.pendingCommitExpirationTime = suspendedExpirationTime;
> root.finishedWork = finishedWork;
> } else if (msUntilTimeout > 0) {
> // Wait `msUntilTimeout` milliseconds before committing.
> root.timeoutHandle = scheduleTimeout(onTimeout.bind(null, root, finishedWork, suspendedExpirationTime), msUntilTimeout);
> }
> }
>
> function onYield(root) {
> root.finishedWork = null;
> }
>
> function onTimeout(root, finishedWork, suspendedExpirationTime) {
> if (enableSuspense) {
> // The root timed out. Commit it.
> root.pendingCommitExpirationTime = suspendedExpirationTime;
> root.finishedWork = finishedWork;
> // Read the current time before entering the commit phase. We can be
> // certain this won't cause tearing related to batching of event updates
> // because we're at the top of a timer event.
> recomputeCurrentRendererTime();
> currentSchedulerTime = currentRendererTime;
>
> if (enableSchedulerTracking) {
> // Don't update pending interaction counts for suspense timeouts,
> // Because we know we still need to do more work in this case.
> suspenseDidTimeout = true;
> flushRoot(root, suspendedExpirationTime);
> suspenseDidTimeout = false;
> } else {
> flushRoot(root, suspendedExpirationTime);
> }
> }
16321,16326c16964,16991
< function requestRetry(root, expirationTime) {
< if (root.remainingExpirationTime === NoWork || root.remainingExpirationTime < expirationTime) {
< // For a retry, only update the remaining expiration time if it has a
< // *lower priority* than the existing value. This is because, on a retry,
< // we should attempt to coalesce as much as possible.
< requestWork(root, expirationTime);
---
> function onCommit(root, expirationTime) {
> root.expirationTime = expirationTime;
> root.finishedWork = null;
> }
>
> function requestCurrentTime() {
> // requestCurrentTime is called by the scheduler to compute an expiration
> // time.
> //
> // Expiration times are computed by adding to the current time (the start
> // time). However, if two updates are scheduled within the same event, we
> // should treat their start times as simultaneous, even if the actual clock
> // time has advanced between the first and second call.
>
> // In other words, because expiration times determine how updates are batched,
> // we want all updates of like priority that occur within the same event to
> // receive the same expiration time. Otherwise we get tearing.
> //
> // We keep track of two separate times: the current "renderer" time and the
> // current "scheduler" time. The renderer time can be updated whenever; it
> // only exists to minimize the calls performance.now.
> //
> // But the scheduler time can only be updated if there's no pending work, or
> // if we know for certain that we're not in the middle of an event.
>
> if (isRendering) {
> // We're already rendering. Return the most recently read time.
> return currentSchedulerTime;
16327a16993,17007
> // Check if there's pending work.
> findHighestPriorityRoot();
> if (nextFlushedExpirationTime === NoWork || nextFlushedExpirationTime === Never) {
> // If there's no pending work, or if the pending work is offscreen, we can
> // read the current time without risk of tearing.
> recomputeCurrentRendererTime();
> currentSchedulerTime = currentRendererTime;
> return currentSchedulerTime;
> }
> // There's already pending work. We might be in the middle of a browser
> // event. If we were to read the current time, it could cause multiple updates
> // within the same event to receive different expiration times, leading to
> // tearing. Return the last read time. During the next idle callback, the
> // time will be updated.
> return currentSchedulerTime;
16334d17013
<
16348c17027
< performWorkOnRoot(root, Sync, false);
---
> performWorkOnRoot(root, Sync, true);
16357c17036
< scheduleCallbackWithExpiration(expirationTime);
---
> scheduleCallbackWithExpirationTime(root, expirationTime);
16366c17045
< root.remainingExpirationTime = expirationTime;
---
> root.expirationTime = expirationTime;
16377c17056
< var remainingExpirationTime = root.remainingExpirationTime;
---
> var remainingExpirationTime = root.expirationTime;
16380c17059
< root.remainingExpirationTime = expirationTime;
---
> root.expirationTime = expirationTime;
16392c17071
< var remainingExpirationTime = root.remainingExpirationTime;
---
> var remainingExpirationTime = root.expirationTime;
16430a17110,17114
> if (highestPriorityWork === Sync) {
> // Sync is highest priority by definition so
> // we can stop searching.
> break;
> }
16437,16445d17120
< // If the next root is the same as the previous root, this is a nested
< // update. To prevent an infinite loop, increment the nested update count.
< var previousFlushedRoot = nextFlushedRoot;
< if (previousFlushedRoot !== null && previousFlushedRoot === highestPriorityRoot && highestPriorityWork === Sync) {
< nestedUpdateCount++;
< } else {
< // Reset whenever we switch roots.
< nestedUpdateCount = 0;
< }
16451c17126
< performWork(NoWork, true, dl);
---
> performWork(NoWork, dl);
16455c17130
< performWork(Sync, false, null);
---
> performWork(Sync, null);
16458c17133
< function performWork(minExpirationTime, isAsync, dl) {
---
> function performWork(minExpirationTime, dl) {
16461c17136
< // Keep working on roots until there's no more work, or until the we reach
---
> // Keep working on roots until there's no more work, or until we reach
16465,16467c17140,17142
< if (enableProfilerTimer) {
< resumeActualRenderTimerIfPaused();
< }
---
> if (deadline !== null) {
> recomputeCurrentRendererTime();
> currentSchedulerTime = currentRendererTime;
16469,16473c17144,17148
< if (enableUserTimingAPI && deadline !== null) {
< var didExpire = nextFlushedExpirationTime < recalculateCurrentTime();
< var timeout = expirationTimeToMs(nextFlushedExpirationTime);
< stopRequestCallbackTimer(didExpire, timeout);
< }
---
> if (enableUserTimingAPI) {
> var didExpire = nextFlushedExpirationTime < currentRendererTime;
> var timeout = expirationTimeToMs(nextFlushedExpirationTime);
> stopRequestCallbackTimer(didExpire, timeout);
> }
16475,16478c17150,17151
< if (isAsync) {
< while (nextFlushedRoot !== null && nextFlushedExpirationTime !== NoWork && (minExpirationTime === NoWork || minExpirationTime >= nextFlushedExpirationTime) && (!deadlineDidExpire || recalculateCurrentTime() >= nextFlushedExpirationTime)) {
< recalculateCurrentTime();
< performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime, !deadlineDidExpire);
---
> while (nextFlushedRoot !== null && nextFlushedExpirationTime !== NoWork && (minExpirationTime === NoWork || minExpirationTime >= nextFlushedExpirationTime) && (!deadlineDidExpire || currentRendererTime >= nextFlushedExpirationTime)) {
> performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime, currentRendererTime >= nextFlushedExpirationTime);
16479a17153,17154
> recomputeCurrentRendererTime();
> currentSchedulerTime = currentRendererTime;
16483c17158
< performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime, false);
---
> performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime, true);
16498c17173
< scheduleCallbackWithExpiration(nextFlushedExpirationTime);
---
> scheduleCallbackWithExpirationTime(nextFlushedRoot, nextFlushedExpirationTime);
16515c17190
< performWorkOnRoot(root, expirationTime, false);
---
> performWorkOnRoot(root, expirationTime, true);
16518d17192
< finishRendering();
16522a17197
> lastCommittedRootDuringThisBatch = null;
16548c17223
< function performWorkOnRoot(root, expirationTime, isAsync) {
---
> function performWorkOnRoot(root, expirationTime, isExpired) {
16554,16555c17229,17234
< if (!isAsync) {
< // Flush sync work.
---
> if (deadline === null || isExpired) {
> // Flush work without yielding.
> // TODO: Non-yieldy work does not necessarily imply expired work. A renderer
> // may want to perform some work without yielding, but also without
> // requiring the root to complete (by triggering placeholders).
>
16561c17240,17251
< finishedWork = renderRoot(root, expirationTime, false);
---
> root.finishedWork = null;
> // If this root previously suspended, clear its existing timeout, since
> // we're about to try rendering again.
> var timeoutHandle = root.timeoutHandle;
> if (enableSuspense && timeoutHandle !== noTimeout) {
> root.timeoutHandle = noTimeout;
> // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
> cancelTimeout(timeoutHandle);
> }
> var isYieldy = false;
> renderRoot(root, isYieldy, isExpired);
> finishedWork = root.finishedWork;
16574c17264,17275
< _finishedWork = renderRoot(root, expirationTime, true);
---
> root.finishedWork = null;
> // If this root previously suspended, clear its existing timeout, since
> // we're about to try rendering again.
> var _timeoutHandle = root.timeoutHandle;
> if (enableSuspense && _timeoutHandle !== noTimeout) {
> root.timeoutHandle = noTimeout;
> // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
> cancelTimeout(_timeoutHandle);
> }
> var _isYieldy = true;
> renderRoot(root, _isYieldy, isExpired);
> _finishedWork = root.finishedWork;
16585,16590d17285
<
< if (enableProfilerTimer) {
< // If we didn't finish, pause the "actual" render timer.
< // We'll restart it when we resume work.
< pauseActualRenderTimerIfRunning();
< }
16612c17307
< root.remainingExpirationTime = NoWork;
---
> root.expirationTime = NoWork;
16619c17314,17326
< root.remainingExpirationTime = commitRoot(finishedWork);
---
>
> // Check if this is a nested update (a sync update scheduled during the
> // commit phase).
> if (root === lastCommittedRootDuringThisBatch) {
> // If the next root is the same as the previous root, this is a nested
> // update. To prevent an infinite loop, increment the nested update count.
> nestedUpdateCount++;
> } else {
> // Reset whenever we switch roots.
> lastCommittedRootDuringThisBatch = root;
> nestedUpdateCount = 0;
> }
> commitRoot(root, finishedWork);
16625,16626c17332,17333
< if (deadline === null) {
< return false;
---
> if (deadlineDidExpire) {
> return true;
16628c17335
< if (deadline.timeRemaining() > timeHeuristicForUnitOfWork) {
---
> if (deadline === null || deadline.timeRemaining() > timeHeuristicForUnitOfWork) {
16641c17348
< nextFlushedRoot.remainingExpirationTime = NoWork;
---
> nextFlushedRoot.expirationTime = NoWork;
16648,16653d17354
< function onBlock(remainingExpirationTime) {
< !(nextFlushedRoot !== null) ? invariant(false, 'Should be working on a root. This error is likely caused by a bug in React. Please file an issue.') : void 0;
< // This root was blocked. Unschedule it until there's another update.
< nextFlushedRoot.remainingExpirationTime = remainingExpirationTime;
< }
<
16705c17406
< if (!isBatchingUpdates && !isRendering && lowestPendingInteractiveExpirationTime !== NoWork) {
---
> if (!isBatchingUpdates && !isRendering && lowestPriorityPendingInteractiveExpirationTime !== NoWork) {
16707,16708c17408,17409
< performWork(lowestPendingInteractiveExpirationTime, false, null);
< lowestPendingInteractiveExpirationTime = NoWork;
---
> performWork(lowestPriorityPendingInteractiveExpirationTime, null);
> lowestPriorityPendingInteractiveExpirationTime = NoWork;
16726c17427
< if (!isRendering && lowestPendingInteractiveExpirationTime !== NoWork) {
---
> if (!isRendering && lowestPriorityPendingInteractiveExpirationTime !== NoWork) {
16728,16729c17429,17430
< performWork(lowestPendingInteractiveExpirationTime, false, null);
< lowestPendingInteractiveExpirationTime = NoWork;
---
> performWork(lowestPriorityPendingInteractiveExpirationTime, null);
> lowestPriorityPendingInteractiveExpirationTime = NoWork;
16741c17442
< performWork(Sync, false, null);
---
> performWork(Sync, null);
16758c17459
< return emptyObject;
---
> return emptyContextObject;
16763c17464,17477
< return isContextProvider(fiber) ? processChildContext(fiber, parentContext) : parentContext;
---
>
> if (fiber.tag === ClassComponent) {
> var Component = fiber.type;
> if (isContextProvider(Component)) {
> return processChildContext(fiber, Component, parentContext);
> }
> } else if (fiber.tag === ClassComponentLazy) {
> var _Component = getResultFromResolvedThenable(fiber.type);
> if (isContextProvider(_Component)) {
> return processChildContext(fiber, _Component, parentContext);
> }
> }
>
> return parentContext;
16766c17480
< function scheduleRootUpdate(current, element, expirationTime, callback) {
---
> function scheduleRootUpdate(current$$1, element, expirationTime, callback) {
16768c17482
< if (ReactDebugCurrentFiber.phase === 'render' && ReactDebugCurrentFiber.current !== null && !didWarnAboutNestedUpdates) {
---
> if (phase === 'render' && current !== null && !didWarnAboutNestedUpdates) {
16770c17484
< warning(false, '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\n' + 'Check the render method of %s.', getComponentName(ReactDebugCurrentFiber.current) || 'Unknown');
---
> warningWithoutStack$1(false, '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\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown');
16781c17495
< !(typeof callback === 'function') ? warning(false, 'render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback) : void 0;
---
> !(typeof callback === 'function') ? warningWithoutStack$1(false, 'render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback) : void 0;
16784c17498
< enqueueUpdate(current, update, expirationTime);
---
> enqueueUpdate(current$$1, update);
16786c17500
< scheduleWork$1(current, expirationTime);
---
> scheduleWork(current$$1, expirationTime);
16792c17506
< var current = container.current;
---
> var current$$1 = container.current;
16796c17510
< if (current.alternate === null) {
---
> if (current$$1.alternate === null) {
16813c17527
< return scheduleRootUpdate(current, element, expirationTime, callback);
---
> return scheduleRootUpdate(current$$1, element, expirationTime, callback);
16837,16839c17551,17553
< var current = container.current;
< var currentTime = recalculateCurrentTime();
< var expirationTime = computeExpirationForFiber(currentTime, current);
---
> var current$$1 = container.current;
> var currentTime = requestCurrentTime();
> var expirationTime = computeExpirationForFiber(currentTime, current$$1);
16888,16910d17601
<
<
< var DOMRenderer = Object.freeze({
< updateContainerAtExpirationTime: updateContainerAtExpirationTime,
< createContainer: createContainer,
< updateContainer: updateContainer,
< flushRoot: flushRoot,
< requestWork: requestWork,
< computeUniqueAsyncExpiration: computeUniqueAsyncExpiration,
< batchedUpdates: batchedUpdates$1,
< unbatchedUpdates: unbatchedUpdates,
< deferredUpdates: deferredUpdates,
< syncUpdates: syncUpdates,
< interactiveUpdates: interactiveUpdates$1,
< flushInteractiveUpdates: flushInteractiveUpdates$1,
< flushControlled: flushControlled,
< flushSync: flushSync,
< getPublicRootInstance: getPublicRootInstance,
< findHostInstance: findHostInstance,
< findHostInstanceWithNoPortals: findHostInstanceWithNoPortals,
< injectIntoDevTools: injectIntoDevTools
< });
<
16928c17619
< var ReactVersion = '16.4.2';
---
> var ReactVersion = '16.4.3-alpha.0';
16931a17623,17624
> var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
>
16942c17635
< warning(false, 'React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
---
> warningWithoutStack$1(false, 'React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
16949c17642
< !(hostInstance.parentNode === container) ? warning(false, 'render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.') : void 0;
---
> !(hostInstance.parentNode === container) ? warningWithoutStack$1(false, 'render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.') : void 0;
16957c17650
< !(!hasNonRootReactChild || isRootRenderedBySomeReact) ? warning(false, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0;
---
> !(!hasNonRootReactChild || isRootRenderedBySomeReact) ? warningWithoutStack$1(false, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0;
16959c17652
< !(container.nodeType !== ELEMENT_NODE || !container.tagName || container.tagName.toUpperCase() !== 'BODY') ? warning(false, 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0;
---
> !(container.nodeType !== ELEMENT_NODE || !container.tagName || container.tagName.toUpperCase() !== 'BODY') ? warningWithoutStack$1(false, 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0;
16963c17656
< !(callback === null || typeof callback === 'function') ? warning(false, '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback) : void 0;
---
> !(callback === null || typeof callback === 'function') ? warningWithoutStack$1(false, '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback) : void 0;
16967c17660
< injection$2.injectFiberControlledHostComponent(ReactDOMFiberComponent);
---
> setRestoreImplementation(restoreControlledState$1);
17206c17899
< injection$3.injectRenderer(DOMRenderer);
---
> setBatchingImplementation(batchedUpdates$1, interactiveUpdates$1, flushInteractiveUpdates$1);
17220c17913
< warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.');
---
> warningWithoutStack$1(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.');
17300c17993
< !warnedAboutRefsInRender ? warning(false, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(owner) || 'A component') : void 0;
---
> !warnedAboutRefsInRender ? warningWithoutStack$1(false, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(owner.type) || 'A component') : void 0;
17331c18024
< !!renderedByDifferentReact ? warning(false, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.') : void 0;
---
> !!renderedByDifferentReact ? warningWithoutStack$1(false, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.') : void 0;
17349c18042
< var isContainerReactRoot = container.nodeType === 1 && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;
---
> var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;
17351c18044
< !!hasNonRootReactChild ? warning(false, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0;
---
> !!hasNonRootReactChild ? warningWithoutStack$1(false, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0;
17372,17373d18064
< unstable_deferredUpdates: deferredUpdates,
<
17392a18084
> !isValidContainer(container) ? invariant(false, 'unstable_createRoot(...): Target container is not a DOM element.') : void 0;
17405c18097
< if (!foundDevTools && ExecutionEnvironment.canUseDOM && window.top === window.self) {
---
> if (!foundDevTools && canUseDOM && window.top === window.self) {
17427c18119
< var reactDom = ReactDOM$3.default ? ReactDOM$3.default : ReactDOM$3;
---
> var reactDom = ReactDOM$3.default || ReactDOM$3;
1c1
< /** @license React v16.4.2
---
> /** @license React v16.4.3-alpha.0
19,28d18
< * Copyright (c) 2013-present, Facebook, Inc.
< *
< * This source code is licensed under the MIT license found in the
< * LICENSE file in the root directory of this source tree.
< *
< */
<
<
<
< /**
39c29
< var validateFormat = function validateFormat(format) {};
---
> var validateFormat = function () {};
42c32
< validateFormat = function validateFormat(format) {
---
> validateFormat = function (format) {
53c43
< var error;
---
> var error = void 0;
70,71d59
< var invariant_1 = invariant;
<
73c61
< // have preserve the format and params in the www builds.
---
> // preserve the format and params in the www builds.
75c63
< !React ? invariant_1(false, 'ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.') : void 0;
---
> !React ? invariant(false, 'ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.') : void 0;
77,79c65
< var invokeGuardedCallback = function (name, func, context, a, b, c, d, e, f) {
< this._hasCaughtError = false;
< this._caughtError = null;
---
> var invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) {
84,85c70
< this._caughtError = error;
< this._hasCaughtError = true;
---
> this.onError(error);
119c104
< !(typeof document !== 'undefined') ? invariant_1(false, 'The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.') : void 0;
---
> !(typeof document !== 'undefined') ? invariant(false, 'The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.') : void 0;
129a115,119
> // Keeps track of the value of window.event so that we can reset it
> // during the callback to let user code access window.event in the
> // browsers that support it.
> var windowEvent = window.event;
>
139a130,138
>
> // We check for window.hasOwnProperty('event') to prevent the
> // window.event assignment in both IE <= 10 as they throw an error
> // "Member not found" in strict mode, and in Firefox which does not
> // support window.event.
> if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
> window.event = windowEvent;
> }
>
160c159
< function onError(event) {
---
> function handleWindowError(event) {
165a165,176
> if (event.defaultPrevented) {
> // Some other error handler has prevented default.
> // Browsers silence the error report if this happens.
> // We'll remember this to later decide whether to log it or not.
> if (error != null && typeof error === 'object') {
> try {
> error._suppressLogging = true;
> } catch (inner) {
> // Ignore.
> }
> }
> }
172c183
< window.addEventListener('error', onError);
---
> window.addEventListener('error', handleWindowError);
187,191c198
< this._hasCaughtError = true;
< this._caughtError = error;
< } else {
< this._hasCaughtError = false;
< this._caughtError = null;
---
> this.onError(error);
195c202
< window.removeEventListener('error', onError);
---
> window.removeEventListener('error', handleWindowError);
198c205
< invokeGuardedCallback = invokeGuardedCallbackDev;
---
> invokeGuardedCallbackImpl = invokeGuardedCallbackDev;
202c209
< var invokeGuardedCallback$1 = invokeGuardedCallback;
---
> var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
204,228c211,213
< var ReactErrorUtils = {
< // Used by Fiber to simulate a try-catch.
< _caughtError: null,
< _hasCaughtError: false,
<
< // Used by event system to capture/rethrow the first error.
< _rethrowError: null,
< _hasRethrowError: false,
<
< /**
< * Call a function while guarding against errors that happens within it.
< * Returns an error if it throws, otherwise null.
< *
< * In production, this is implemented using a try-catch. The reason we don't
< * use a try-catch directly is so that we can swap out a different
< * implementation in DEV mode.
< *
< * @param {String} name of the guard to use for logging or debugging
< * @param {Function} func The function to invoke
< * @param {*} context The context to use when calling the function
< * @param {...*} args Arguments for function
< */
< invokeGuardedCallback: function (name, func, context, a, b, c, d, e, f) {
< invokeGuardedCallback$1.apply(ReactErrorUtils, arguments);
< },
---
> // Used by Fiber to simulate a try-catch.
> var hasError = false;
> var caughtError = null;
230,249c215,217
< /**
< * Same as invokeGuardedCallback, but instead of returning an error, it stores
< * it in a global so it can be rethrown by `rethrowCaughtError` later.
< * TODO: See if _caughtError and _rethrowError can be unified.
< *
< * @param {String} name of the guard to use for logging or debugging
< * @param {Function} func The function to invoke
< * @param {*} context The context to use when calling the function
< * @param {...*} args Arguments for function
< */
< invokeGuardedCallbackAndCatchFirstError: function (name, func, context, a, b, c, d, e, f) {
< ReactErrorUtils.invokeGuardedCallback.apply(this, arguments);
< if (ReactErrorUtils.hasCaughtError()) {
< var error = ReactErrorUtils.clearCaughtError();
< if (!ReactErrorUtils._hasRethrowError) {
< ReactErrorUtils._hasRethrowError = true;
< ReactErrorUtils._rethrowError = error;
< }
< }
< },
---
> // Used by event system to capture/rethrow the first error.
> var hasRethrowError = false;
> var rethrowError = null;
251,257c219,224
< /**
< * During execution of guarded functions we will capture the first error which
< * we will rethrow to be handled by the top level error handler.
< */
< rethrowCaughtError: function () {
< return rethrowCaughtError.apply(ReactErrorUtils, arguments);
< },
---
> var reporter = {
> onError: function (error) {
> hasError = true;
> caughtError = error;
> }
> };
259,261c226,243
< hasCaughtError: function () {
< return ReactErrorUtils._hasCaughtError;
< },
---
> /**
> * Call a function while guarding against errors that happens within it.
> * Returns an error if it throws, otherwise null.
> *
> * In production, this is implemented using a try-catch. The reason we don't
> * use a try-catch directly is so that we can swap out a different
> * implementation in DEV mode.
> *
> * @param {String} name of the guard to use for logging or debugging
> * @param {Function} func The function to invoke
> * @param {*} context The context to use when calling the function
> * @param {...*} args Arguments for function
> */
> function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
> hasError = false;
> caughtError = null;
> invokeGuardedCallbackImpl$1.apply(reporter, arguments);
> }
263,270c245,261
< clearCaughtError: function () {
< if (ReactErrorUtils._hasCaughtError) {
< var error = ReactErrorUtils._caughtError;
< ReactErrorUtils._caughtError = null;
< ReactErrorUtils._hasCaughtError = false;
< return error;
< } else {
< invariant_1(false, 'clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.');
---
> /**
> * Same as invokeGuardedCallback, but instead of returning an error, it stores
> * it in a global so it can be rethrown by `rethrowCaughtError` later.
> * TODO: See if caughtError and rethrowError can be unified.
> *
> * @param {String} name of the guard to use for logging or debugging
> * @param {Function} func The function to invoke
> * @param {*} context The context to use when calling the function
> * @param {...*} args Arguments for function
> */
> function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
> invokeGuardedCallback.apply(this, arguments);
> if (hasError) {
> var error = clearCaughtError();
> if (!hasRethrowError) {
> hasRethrowError = true;
> rethrowError = error;
273c264
< };
---
> }
275,279c266,274
< var rethrowCaughtError = function () {
< if (ReactErrorUtils._hasRethrowError) {
< var error = ReactErrorUtils._rethrowError;
< ReactErrorUtils._rethrowError = null;
< ReactErrorUtils._hasRethrowError = false;
---
> /**
> * During execution of guarded functions we will capture the first error which
> * we will rethrow to be handled by the top level error handler.
> */
> function rethrowCaughtError() {
> if (hasRethrowError) {
> var error = rethrowError;
> hasRethrowError = false;
> rethrowError = null;
282c277,292
< };
---
> }
>
> function hasCaughtError() {
> return hasError;
> }
>
> function clearCaughtError() {
> if (hasError) {
> var error = caughtError;
> hasError = false;
> caughtError = null;
> return error;
> } else {
> invariant(false, 'clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.');
> }
> }
307c317
< !(pluginIndex > -1) ? invariant_1(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;
---
> !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;
311c321
< !pluginModule.extractEvents ? invariant_1(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;
---
> !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;
315c325
< !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant_1(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;
---
> !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;
329c339
< !!eventNameDispatchConfigs.hasOwnProperty(eventName) ? invariant_1(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : void 0;
---
> !!eventNameDispatchConfigs.hasOwnProperty(eventName) ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : void 0;
356c366
< !!registrationNameModules[registrationName] ? invariant_1(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : void 0;
---
> !!registrationNameModules[registrationName] ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : void 0;
415c425
< !!eventPluginOrder ? invariant_1(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : void 0;
---
> !!eventPluginOrder ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : void 0;
439c449
< !!namesToPlugins[pluginName] ? invariant_1(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : void 0;
---
> !!namesToPlugins[pluginName] ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : void 0;
460,506d469
< * Copyright (c) 2013-present, Facebook, Inc.
< *
< * This source code is licensed under the MIT license found in the
< * LICENSE file in the root directory of this source tree.
< *
< *
< */
<
< function makeEmptyFunction(arg) {
< return function () {
< return arg;
< };
< }
<
< /**
< * This function accepts and discards inputs; it has no side effects. This is
< * primarily useful idiomatically for overridable function endpoints which
< * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
< */
< var emptyFunction = function emptyFunction() {};
<
< emptyFunction.thatReturns = makeEmptyFunction;
< emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
< emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
< emptyFunction.thatReturnsNull = makeEmptyFunction(null);
< emptyFunction.thatReturnsThis = function () {
< return this;
< };
< emptyFunction.thatReturnsArgument = function (arg) {
< return arg;
< };
<
< var emptyFunction_1 = emptyFunction;
<
< /**
< * Copyright (c) 2014-present, Facebook, Inc.
< *
< * This source code is licensed under the MIT license found in the
< * LICENSE file in the root directory of this source tree.
< *
< */
<
<
<
<
<
< /**
513c476
< var warning = emptyFunction_1;
---
> var warningWithoutStack = function () {};
516,518c479,481
< var printWarning = function printWarning(format) {
< for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
< args[_key - 1] = arguments[_key];
---
> warningWithoutStack = function (condition, format) {
> for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
> args[_key - 2] = arguments[_key];
521,524c484,489
< var argIndex = 0;
< var message = 'Warning: ' + format.replace(/%s/g, function () {
< return args[argIndex++];
< });
---
> if (format === undefined) {
> throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
> }
> if (condition) {
> return;
> }
526c491,496
< console.error(message);
---
> var _console;
>
> var stringArgs = args.map(function (item) {
> return '' + item;
> });
> (_console = console).error.apply(_console, ['Warning: ' + format].concat(stringArgs));
531a502,505
> var argIndex = 0;
> var message = 'Warning: ' + format.replace(/%s/g, function () {
> return args[argIndex++];
> });
535,552d508
<
< warning = function warning(condition, format) {
< if (format === undefined) {
< throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
< }
<
< if (format.indexOf('Failed Composite propType: ') === 0) {
< return; // Ignore CompositeComponent proptype check.
< }
<
< if (!condition) {
< for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
< args[_key2 - 2] = arguments[_key2];
< }
<
< printWarning.apply(undefined, [format].concat(args));
< }
< };
555c511
< var warning_1 = warning;
---
> var warningWithoutStack$1 = warningWithoutStack;
561,569c517,522
< var injection$1 = {
< injectComponentTree: function (Injected) {
< getFiberCurrentPropsFromNode = Injected.getFiberCurrentPropsFromNode;
< getInstanceFromNode = Injected.getInstanceFromNode;
< getNodeFromInstance = Injected.getNodeFromInstance;
<
< {
< !(getNodeFromInstance && getInstanceFromNode) ? warning_1(false, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
< }
---
> function setComponentTree(getFiberCurrentPropsFromNodeImpl, getInstanceFromNodeImpl, getNodeFromInstanceImpl) {
> getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl;
> getInstanceFromNode = getInstanceFromNodeImpl;
> getNodeFromInstance = getNodeFromInstanceImpl;
> {
> !(getNodeFromInstance && getInstanceFromNode) ? warningWithoutStack$1(false, 'EventPluginUtils.setComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
571c524
< };
---
> }
585c538
< !(instancesIsArr === listenersIsArr && instancesLen === listenersLen) ? warning_1(false, 'EventPluginUtils: Invalid `event`.') : void 0;
---
> !(instancesIsArr === listenersIsArr && instancesLen === listenersLen) ? warningWithoutStack$1(false, 'EventPluginUtils: Invalid `event`.') : void 0;
599c552
< ReactErrorUtils.invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
---
> invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
662c615
< !(next != null) ? invariant_1(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : void 0;
---
> !(next != null) ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : void 0;
818c771
< !(!listener || typeof listener === 'function') ? invariant_1(false, 'Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener) : void 0;
---
> !(!listener || typeof listener === 'function') ? invariant(false, 'Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener) : void 0;
863c816
< !!eventQueue ? invariant_1(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : void 0;
---
> !!eventQueue ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : void 0;
865c818
< ReactErrorUtils.rethrowCaughtError();
---
> rethrowCaughtError();
880,881c833,834
< var IndeterminateComponent = 0; // Before we know whether it is functional or class
< var FunctionalComponent = 1;
---
> var FunctionalComponent = 0;
> var FunctionalComponentLazy = 1;
883,894c836,847
< var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
< var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
< var HostComponent = 5;
< var HostText = 6;
<
<
<
< var Fragment = 10;
< var Mode = 11;
< var ContextConsumer = 12;
< var ContextProvider = 13;
< var ForwardRef = 14;
---
> var ClassComponentLazy = 3;
> var IndeterminateComponent = 4; // Before we know whether it is functional or class
> var HostRoot = 5; // Root of a host tree. Could be nested inside another node.
> var HostPortal = 6; // A subtree. Could be an entry point to a different renderer.
> var HostComponent = 7;
> var HostText = 8;
> var Fragment = 9;
> var Mode = 10;
> var ContextConsumer = 11;
> var ContextProvider = 12;
> var ForwardRef = 13;
> var ForwardRefLazy = 14;
896c849
< var TimeoutComponent = 16;
---
> var PlaceholderComponent = 16;
963c916
< invariant_1(false, 'getNodeFromInstance: Invalid argument.');
---
> invariant(false, 'getNodeFromInstance: Invalid argument.');
1140c1093
< !inst ? warning_1(false, 'Dispatching inst must not be null') : void 0;
---
> !inst ? warningWithoutStack$1(false, 'Dispatching inst must not be null') : void 0;
1223,1232d1175
< /**
< * Copyright (c) 2013-present, Facebook, Inc.
< *
< * This source code is licensed under the MIT license found in the
< * LICENSE file in the root directory of this source tree.
< *
< */
<
<
<
1235,1256d1177
< /**
< * Simple, lightweight module assisting with the detection and context of
< * Worker. Helps avoid circular dependencies and allows code to reason about
< * whether or not they are in a Worker, even if they never include the main
< * `ReactWorker` dependency.
< */
< var ExecutionEnvironment = {
<
< canUseDOM: canUseDOM,
<
< canUseWorkers: typeof Worker !== 'undefined',
<
< canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
<
< canUseViewport: canUseDOM && !!window.screen,
<
< isInWorker: !canUseDOM // For now, this is true - might change in the future.
<
< };
<
< var ExecutionEnvironment_1 = ExecutionEnvironment;
<
1282,1283d1202
< prefixes['ms' + styleProp] = 'MS' + eventName;
< prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
1311c1230
< if (ExecutionEnvironment_1.canUseDOM) {
---
> if (canUseDOM) {
1378a1298
> var TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick');
1452,1468d1371
< var contentKey = null;
<
< /**
< * Gets the key used to access text content on a DOM node.
< *
< * @return {?string} Key used to access text content.
< * @internal
< */
< function getTextContentAccessor() {
< if (!contentKey && ExecutionEnvironment_1.canUseDOM) {
< // Prefer textContent to innerText because many browsers support both but
< // SVG <text> elements don't support innerText even when <div> does.
< contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';
< }
< return contentKey;
< }
<
1470c1373
< * This helper object stores information about text content of a target node,
---
> * These variables store information about text content of a target node,
1480,1484c1383,1386
< var compositionState = {
< _root: null,
< _startText: null,
< _fallbackText: null
< };
---
>
> var root = null;
> var startText = null;
> var fallbackText = null;
1487,1488c1389,1390
< compositionState._root = nativeEventTarget;
< compositionState._startText = getText();
---
> root = nativeEventTarget;
> startText = getText();
1493,1495c1395,1397
< compositionState._root = null;
< compositionState._startText = null;
< compositionState._fallbackText = null;
---
> root = null;
> startText = null;
> fallbackText = null;
1499,1500c1401,1402
< if (compositionState._fallbackText) {
< return compositionState._fallbackText;
---
> if (fallbackText) {
> return fallbackText;
1504c1406
< var startValue = compositionState._startText;
---
> var startValue = startText;
1524,1525c1426,1427
< compositionState._fallbackText = endValue.slice(start, sliceTail);
< return compositionState._fallbackText;
---
> fallbackText = endValue.slice(start, sliceTail);
> return fallbackText;
1529,1530c1431,1432
< if ('value' in compositionState._root) {
< return compositionState._root.value;
---
> if ('value' in root) {
> return root.value;
1532c1434
< return compositionState._root[getTextContentAccessor()];
---
> return root.textContent;
1541d1442
< var didWarnForAddedNewProperty = false;
1544,1545d1444
< var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];
<
1554c1453,1455
< currentTarget: emptyFunction_1.thatReturnsNull,
---
> currentTarget: function () {
> return null;
> },
1564a1466,1473
> function functionThatReturnsTrue() {
> return true;
> }
>
> function functionThatReturnsFalse() {
> return false;
> }
>
1588a1498,1499
> delete this.isDefaultPrevented;
> delete this.isPropagationStopped;
1617c1528
< this.isDefaultPrevented = emptyFunction_1.thatReturnsTrue;
---
> this.isDefaultPrevented = functionThatReturnsTrue;
1619c1530
< this.isDefaultPrevented = emptyFunction_1.thatReturnsFalse;
---
> this.isDefaultPrevented = functionThatReturnsFalse;
1621c1532
< this.isPropagationStopped = emptyFunction_1.thatReturnsFalse;
---
> this.isPropagationStopped = functionThatReturnsFalse;
1638c1549
< this.isDefaultPrevented = emptyFunction_1.thatReturnsTrue;
---
> this.isDefaultPrevented = functionThatReturnsTrue;
1658c1569
< this.isPropagationStopped = emptyFunction_1.thatReturnsTrue;
---
> this.isPropagationStopped = functionThatReturnsTrue;
1667c1578
< this.isPersistent = emptyFunction_1.thatReturnsTrue;
---
> this.isPersistent = functionThatReturnsTrue;
1675c1586
< isPersistent: emptyFunction_1.thatReturnsFalse,
---
> isPersistent: functionThatReturnsFalse,
1687,1689c1598,1604
< for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
< this[shouldBeReleasedProperties[i]] = null;
< }
---
> this.dispatchConfig = null;
> this._targetInst = null;
> this.nativeEvent = null;
> this.isDefaultPrevented = functionThatReturnsFalse;
> this.isPropagationStopped = functionThatReturnsFalse;
> this._dispatchListeners = null;
> this._dispatchInstances = null;
1692,1693c1607,1610
< Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction_1));
< Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction_1));
---
> Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse));
> Object.defineProperty(this, 'isPropagationStopped', getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse));
> Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {}));
> Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {}));
1724,1755d1640
< /** Proxying after everything set on SyntheticEvent
< * to resolve Proxy issue on some WebKit browsers
< * in which some Event properties are set to undefined (GH#10010)
< */
< {
< var isProxySupported = typeof Proxy === 'function' &&
< // https://github.com/facebook/react/issues/12011
< !Object.isSealed(new Proxy({}, {}));
<
< if (isProxySupported) {
< /*eslint-disable no-func-assign */
< SyntheticEvent = new Proxy(SyntheticEvent, {
< construct: function (target, args) {
< return this.apply(target, Object.create(target.prototype), args);
< },
< apply: function (constructor, that, args) {
< return new Proxy(constructor.apply(that, args), {
< set: function (target, prop, value) {
< if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
< !(didWarnForAddedNewProperty || target.isPersistent()) ? warning_1(false, "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
< didWarnForAddedNewProperty = true;
< }
< target[prop] = value;
< return true;
< }
< });
< }
< });
< /*eslint-enable no-func-assign */
< }
< }
<
1788c1673
< !warningCondition ? warning_1(false, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
---
> !warningCondition ? warningWithoutStack$1(false, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
1804c1689
< !(event instanceof EventConstructor) ? invariant_1(false, 'Trying to release an event instance into a pool of a different type.') : void 0;
---
> !(event instanceof EventConstructor) ? invariant(false, 'Trying to release an event instance into a pool of a different type.') : void 0;
1817,1818d1701
< var SyntheticEvent$1 = SyntheticEvent;
<
1823c1706
< var SyntheticCompositionEvent = SyntheticEvent$1.extend({
---
> var SyntheticCompositionEvent = SyntheticEvent.extend({
1832c1715
< var SyntheticInputEvent = SyntheticEvent$1.extend({
---
> var SyntheticInputEvent = SyntheticEvent.extend({
1839c1722
< var canUseCompositionEvent = ExecutionEnvironment_1.canUseDOM && 'CompositionEvent' in window;
---
> var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;
1842c1725
< if (ExecutionEnvironment_1.canUseDOM && 'documentMode' in document) {
---
> if (canUseDOM && 'documentMode' in document) {
1849c1732
< var canUseTextInputEvent = ExecutionEnvironment_1.canUseDOM && 'TextEvent' in window && !documentMode;
---
> var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode;
1854c1737
< var useFallbackCompositionData = ExecutionEnvironment_1.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
---
> var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
1976a1860,1873
> /**
> * Check if a composition event was triggered by Korean IME.
> * Our fallback mode does not work well with IE's Korean IME,
> * so just use native composition events when Korean IME is used.
> * Although CompositionEvent.locale property is deprecated,
> * it is available in IE, where our fallback mode is enabled.
> *
> * @param {object} nativeEvent
> * @return {boolean}
> */
> function isUsingKoreanIME(nativeEvent) {
> return nativeEvent.locale === 'ko';
> }
>
2001c1898
< if (useFallbackCompositionData) {
---
> if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
2141c2038
< return useFallbackCompositionData ? null : nativeEvent.data;
---
> return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;
2215,2224c2112
< var fiberHostComponent = null;
<
< var ReactControlledComponentInjection = {
< injectFiberControlledHostComponent: function (hostComponentImpl) {
< // The fiber implementation doesn't use dynamic dispatch so we need to
< // inject the implementation.
< fiberHostComponent = hostComponentImpl;
< }
< };
<
---
> var restoreImpl = null;
2236c2124
< !(fiberHostComponent && typeof fiberHostComponent.restoreControlledState === 'function') ? invariant_1(false, 'Fiber needs to be injected to handle a fiber target for controlled events. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(typeof restoreImpl === 'function') ? invariant(false, 'setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.') : void 0;
2238c2126
< fiberHostComponent.restoreControlledState(internalInstance.stateNode, internalInstance.type, props);
---
> restoreImpl(internalInstance.stateNode, internalInstance.type, props);
2241c2129,2131
< var injection$2 = ReactControlledComponentInjection;
---
> function setRestoreImplementation(impl) {
> restoreImpl = impl;
> }
2277c2167
< injection: injection$2,
---
> setRestoreImplementation: setRestoreImplementation,
2290c2180
< var _batchedUpdates = function (fn, bookkeeping) {
---
> var _batchedUpdatesImpl = function (fn, bookkeeping) {
2293c2183
< var _interactiveUpdates = function (fn, a, b) {
---
> var _interactiveUpdatesImpl = function (fn, a, b) {
2296c2186
< var _flushInteractiveUpdates = function () {};
---
> var _flushInteractiveUpdatesImpl = function () {};
2307c2197
< return _batchedUpdates(fn, bookkeeping);
---
> return _batchedUpdatesImpl(fn, bookkeeping);
2319c2209
< _flushInteractiveUpdates();
---
> _flushInteractiveUpdatesImpl();
2326c2216
< return _interactiveUpdates(fn, a, b);
---
> return _interactiveUpdatesImpl(fn, a, b);
2331,2337c2221,2225
< var injection$3 = {
< injectRenderer: function (renderer) {
< _batchedUpdates = renderer.batchedUpdates;
< _interactiveUpdates = renderer.interactiveUpdates;
< _flushInteractiveUpdates = renderer.flushInteractiveUpdates;
< }
< };
---
> function setBatchingImplementation(batchedUpdatesImpl, interactiveUpdatesImpl, flushInteractiveUpdatesImpl) {
> _batchedUpdatesImpl = batchedUpdatesImpl;
> _interactiveUpdatesImpl = interactiveUpdatesImpl;
> _flushInteractiveUpdatesImpl = flushInteractiveUpdatesImpl;
> }
2415d2302
< * @param {?boolean} capture Check if the capture phase is supported.
2420,2421c2307,2308
< function isEventSupported(eventNameSuffix, capture) {
< if (!ExecutionEnvironment_1.canUseDOM || capture && !('addEventListener' in document)) {
---
> function isEventSupported(eventNameSuffix) {
> if (!canUseDOM) {
2545c2432
< var ReactInternals$1 = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
---
> var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2547,2548c2434
< var ReactCurrentOwner = ReactInternals$1.ReactCurrentOwner;
< var ReactDebugCurrentFrame = ReactInternals$1.ReactDebugCurrentFrame;
---
> var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
2551c2437,2459
< return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
---
> var sourceInfo = '';
> if (source) {
> var path = source.fileName;
> var fileName = path.replace(BEFORE_SLASH_RE, '');
> {
> // In DEV, include code for a common special case:
> // prefer "folder/index.js" instead of just "index.js".
> if (/^index\./.test(fileName)) {
> var match = path.match(BEFORE_SLASH_RE);
> if (match) {
> var pathBeforeSlash = match[1];
> if (pathBeforeSlash) {
> var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
> fileName = folderName + '/' + fileName;
> }
> }
> }
> }
> sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
> } else if (ownerName) {
> sourceInfo = ' (created by ' + ownerName + ')';
> }
> return '\n in ' + (name || 'Unknown') + sourceInfo;
2567c2475
< var REACT_TIMEOUT_TYPE = hasSymbol ? Symbol.for('react.timeout') : 0xead1;
---
> var REACT_PLACEHOLDER_TYPE = hasSymbol ? Symbol.for('react.placeholder') : 0xead1;
2573c2481
< if (maybeIterable === null || typeof maybeIterable === 'undefined') {
---
> if (maybeIterable === null || typeof maybeIterable !== 'object') {
2583,2584c2491,2501
< function getComponentName(fiber) {
< var type = fiber.type;
---
> var Pending = 0;
> var Resolved = 1;
> var Rejected = 2;
>
> function getResultFromResolvedThenable(thenable) {
> return thenable._reactResult;
> }
>
> function refineResolvedThenable(thenable) {
> return thenable._reactStatus === Resolved ? thenable._reactResult : null;
> }
2585a2503,2512
> function getComponentName(type) {
> if (type == null) {
> // Host root, text node or just invalid type.
> return null;
> }
> {
> if (typeof type.tag === 'number') {
> warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
> }
> }
2587c2514
< return type.displayName || type.name;
---
> return type.displayName || type.name || null;
2595,2596d2521
< case REACT_CONTEXT_TYPE:
< return 'Context.Consumer';
2598c2523
< return 'ReactFragment';
---
> return 'Fragment';
2600c2525
< return 'ReactPortal';
---
> return 'Portal';
2602,2604c2527
< return 'Profiler(' + fiber.pendingProps.id + ')';
< case REACT_PROVIDER_TYPE:
< return 'Context.Provider';
---
> return 'Profiler';
2607,2608c2530,2531
< case REACT_TIMEOUT_TYPE:
< return 'Timeout';
---
> case REACT_PLACEHOLDER_TYPE:
> return 'Placeholder';
2610c2533
< if (typeof type === 'object' && type !== null) {
---
> if (typeof type === 'object') {
2611a2535,2538
> case REACT_CONTEXT_TYPE:
> return 'Context.Consumer';
> case REACT_PROVIDER_TYPE:
> return 'Context.Provider';
2613c2540,2541
< var functionName = type.render.displayName || type.render.name || '';
---
> var renderFn = type.render;
> var functionName = renderFn.displayName || renderFn.name || '';
2615a2544,2550
> if (typeof type.then === 'function') {
> var thenable = type;
> var resolvedThenable = refineResolvedThenable(thenable);
> if (resolvedThenable) {
> return getComponentName(resolvedThenable);
> }
> }
2619a2555,2556
> var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
>
2623a2561
> case FunctionalComponentLazy:
2624a2563
> case ClassComponentLazy:
2625a2565
> case Mode:
2628c2568
< var name = getComponentName(fiber);
---
> var name = getComponentName(fiber.type);
2631c2571
< ownerName = getComponentName(owner);
---
> ownerName = getComponentName(owner.type);
2639,2642c2579
< // This function can only be called with a work-in-progress fiber and
< // only during begin or complete phase. Do not call it under any other
< // circumstances.
< function getStackAddendumByWorkInProgressFiber(workInProgress) {
---
> function getStackByFiberInDevAndProd(workInProgress) {
2647d2583
< // Otherwise this return pointer might point to the wrong tree:
2653c2589,2592
< function getCurrentFiberOwnerName$1() {
---
> var current = null;
> var phase = null;
>
> function getCurrentFiberOwnerNameInDevOrNull() {
2655,2656c2594
< var fiber = ReactDebugCurrentFiber.current;
< if (fiber === null) {
---
> if (current === null) {
2659c2597
< var owner = fiber._debugOwner;
---
> var owner = current._debugOwner;
2661c2599
< return getComponentName(owner);
---
> return getComponentName(owner.type);
2667c2605
< function getCurrentFiberStackAddendum$1() {
---
> function getCurrentFiberStackInDev() {
2669,2671c2607,2608
< var fiber = ReactDebugCurrentFiber.current;
< if (fiber === null) {
< return null;
---
> if (current === null) {
> return '';
2675c2612
< return getStackAddendumByWorkInProgressFiber(fiber);
---
> return getStackByFiberInDevAndProd(current);
2677c2614
< return null;
---
> return '';
2681,2683c2618,2622
< ReactDebugCurrentFrame.getCurrentStack = null;
< ReactDebugCurrentFiber.current = null;
< ReactDebugCurrentFiber.phase = null;
---
> {
> ReactDebugCurrentFrame.getCurrentStack = null;
> current = null;
> phase = null;
> }
2687,2704c2626,2665
< ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackAddendum$1;
< ReactDebugCurrentFiber.current = fiber;
< ReactDebugCurrentFiber.phase = null;
< }
<
< function setCurrentPhase(phase) {
< ReactDebugCurrentFiber.phase = phase;
< }
<
< var ReactDebugCurrentFiber = {
< current: null,
< phase: null,
< resetCurrentFiber: resetCurrentFiber,
< setCurrentFiber: setCurrentFiber,
< setCurrentPhase: setCurrentPhase,
< getCurrentFiberOwnerName: getCurrentFiberOwnerName$1,
< getCurrentFiberStackAddendum: getCurrentFiberStackAddendum$1
< };
---
> {
> ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;
> current = fiber;
> phase = null;
> }
> }
>
> function setCurrentPhase(lifeCyclePhase) {
> {
> phase = lifeCyclePhase;
> }
> }
>
> /**
> * Similar to invariant but only logs a warning if the condition is not met.
> * This can be used to log issues in development environments in critical
> * paths. Removing the logging code for production environments will keep the
> * same logic and follow the same code paths.
> */
>
> var warning = warningWithoutStack$1;
>
> {
> warning = function (condition, format) {
> if (condition) {
> return;
> }
> var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
> var stack = ReactDebugCurrentFrame.getStackAddendum();
> // eslint-disable-next-line react-internal/warning-and-invariant-args
>
> for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
> args[_key - 2] = arguments[_key];
> }
>
> warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack]));
> };
> }
>
> var warning$1 = warning;
2765c2726
< warning_1(false, 'Invalid attribute name: `%s`', attributeName);
---
> warning$1(false, 'Invalid attribute name: `%s`', attributeName);
2891c2852
< ['autoReverse', 'externalResourcesRequired', 'preserveAlpha'].forEach(function (name) {
---
> ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
2918c2879
< name.toLowerCase(), // attributeName
---
> name, // attributeName
2927c2888
< name.toLowerCase(), // attributeName
---
> name, // attributeName
2935c2896
< name.toLowerCase(), // attributeName
---
> name, // attributeName
3134,3136c3095,3118
< /**
< * Copyright (c) 2013-present, Facebook, Inc.
< *
---
> // Flow does not allow string concatenation of most non-string types. To work
> // around this limitation, we use an opaque type that can only be obtained by
> // passing the value through getToStringValue first.
> function toString(value) {
> return '' + value;
> }
>
> function getToStringValue(value) {
> switch (typeof value) {
> case 'boolean':
> case 'number':
> case 'object':
> case 'string':
> case 'undefined':
> return value;
> default:
> // function, symbol are assigned as empty strings
> return '';
> }
> }
>
> /**
> * Copyright (c) 2013-present, Facebook, Inc.
> *
3155a3138,3139
> var printWarning = function() {};
>
3157,3158d3140
< var invariant$2 = invariant_1;
< var warning$2 = warning_1;
3160a3143,3155
>
> printWarning = function(text) {
> var message = 'Warning: ' + text;
> if (typeof console !== 'undefined') {
> console.error(message);
> }
> try {
> // --- Welcome to debugging React ---
> // This error was thrown as a convenience so that you can use this stack
> // to find the callsite that caused this warning to fire.
> throw new Error(message);
> } catch (x) {}
> };
3185c3180,3187
< invariant$2(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
---
> if (typeof typeSpecs[typeSpecName] !== 'function') {
> var err = Error(
> (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
> 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
> );
> err.name = 'Invariant Violation';
> throw err;
> }
3190c3192,3202
< warning$2(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
---
> if (error && !(error instanceof Error)) {
> printWarning(
> (componentName || 'React class') + ': type specification of ' +
> location + ' `' + typeSpecName + '` is invalid; the type checker ' +
> 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
> 'You may have forgotten to pass an argument to the type checker ' +
> 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
> 'shape all require an argument).'
> );
>
> }
3198c3210,3212
< warning$2(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
---
> printWarning(
> 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
> );
3206a3221,3222
> var ReactDebugCurrentFrame$1 = null;
>
3211a3228,3229
> ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
>
3224c3242
< if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
---
> if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null) {
3230c3248
< if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
---
> if (props.onChange || props.readOnly || props.disabled || props[propName] == null) {
3241,3242c3259,3260
< ReactControlledValuePropTypes.checkPropTypes = function (tagName, props, getStack) {
< checkPropTypes_1(propTypes, props, 'prop', tagName, getStack);
---
> ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {
> checkPropTypes_1(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$1.getStackAddendum);
3247,3249d3264
< var getCurrentFiberOwnerName = ReactDebugCurrentFiber.getCurrentFiberOwnerName;
< var getCurrentFiberStackAddendum = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
<
3293c3308
< ReactControlledValuePropTypes.checkPropTypes('input', props, getCurrentFiberStackAddendum);
---
> ReactControlledValuePropTypes.checkPropTypes('input', props);
3296c3311
< warning_1(false, '%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://fb.me/react-controlled-components', getCurrentFiberOwnerName() || 'A component', props.type);
---
> warning$1(false, '%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://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
3300c3315
< warning_1(false, '%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://fb.me/react-controlled-components', getCurrentFiberOwnerName() || 'A component', props.type);
---
> warning$1(false, '%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://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
3310c3325
< initialValue: getSafeValue(props.value != null ? props.value : defaultValue),
---
> initialValue: getToStringValue(props.value != null ? props.value : defaultValue),
3329c3344
< warning_1(false, 'A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components%s', props.type, getCurrentFiberStackAddendum());
---
> warning$1(false, 'A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);
3333c3348
< warning_1(false, 'A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components%s', props.type, getCurrentFiberStackAddendum());
---
> warning$1(false, 'A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);
3340c3355,3356
< var value = getSafeValue(props.value);
---
> var value = getToStringValue(props.value);
> var type = props.type;
3343c3359
< if (props.type === 'number') {
---
> if (type === 'number') {
3344a3361
> // We explicitly want to coerce to number here if possible.
3347c3364
< node.value = '' + value;
---
> node.value = toString(value);
3349,3350c3366,3367
< } else if (node.value !== '' + value) {
< node.value = '' + value;
---
> } else if (node.value !== toString(value)) {
> node.value = toString(value);
3351a3369,3373
> } else if (type === 'submit' || type === 'reset') {
> // Submit/reset inputs need the attribute removed completely to avoid
> // blank-text buttons.
> node.removeAttribute('value');
> return;
3357c3379
< setDefaultValue(node, props.type, getSafeValue(props.defaultValue));
---
> setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
3369c3391,3398
< var _initialValue = '' + node._wrapperState.initialValue;
---
> // Avoid setting value attribute on submit/reset inputs as it overrides the
> // default value provided by the browser. See: #12872
> var type = props.type;
> if ((type === 'submit' || type === 'reset') && (props.value === undefined || props.value === null)) {
> return;
> }
>
> var _initialValue = toString(node._wrapperState.initialValue);
3399c3428
< node.defaultChecked = !node.defaultChecked;
---
> node.defaultChecked = !!node._wrapperState.initialChecked;
3439c3468
< !otherProps ? invariant_1(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : void 0;
---
> !otherProps ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : void 0;
3466,3468c3495,3497
< node.defaultValue = '' + node._wrapperState.initialValue;
< } else if (node.defaultValue !== '' + value) {
< node.defaultValue = '' + value;
---
> node.defaultValue = toString(node._wrapperState.initialValue);
> } else if (node.defaultValue !== toString(value)) {
> node.defaultValue = toString(value);
3473,3486d3501
< function getSafeValue(value) {
< switch (typeof value) {
< case 'boolean':
< case 'number':
< case 'object':
< case 'string':
< case 'undefined':
< return value;
< default:
< // function, symbol are assigned as empty strings
< return '';
< }
< }
<
3498c3513
< var event = SyntheticEvent$1.getPooled(eventTypes$1.change, inst, nativeEvent, target);
---
> var event = SyntheticEvent.getPooled(eventTypes$1.change, inst, nativeEvent, target);
3557c3572
< if (ExecutionEnvironment_1.canUseDOM) {
---
> if (canUseDOM) {
3733c3748
< var SyntheticUIEvent = SyntheticEvent$1.extend({
---
> var SyntheticUIEvent = SyntheticEvent.extend({
3766a3782,3787
> var previousScreenX = 0;
> var previousScreenY = 0;
> // Use flags to signal movementX/Y has already been set
> var isMovementXSet = false;
> var isMovementYSet = false;
>
3786a3808,3837
> },
> movementX: function (event) {
> if ('movementX' in event) {
> return event.movementX;
> }
>
> var screenX = previousScreenX;
> previousScreenX = event.screenX;
>
> if (!isMovementXSet) {
> isMovementXSet = true;
> return 0;
> }
>
> return event.type === 'mousemove' ? event.screenX - screenX : 0;
> },
> movementY: function (event) {
> if ('movementY' in event) {
> return event.movementY;
> }
>
> var screenY = previousScreenY;
> previousScreenY = event.screenY;
>
> if (!isMovementYSet) {
> isMovementYSet = true;
> return 0;
> }
>
> return event.type === 'mousemove' ? event.screenY - screenY : 0;
3798a3850
> tangentialPressure: null,
3800a3853
> twist: null,
3914,3958d3966
< /**
< * Copyright (c) 2013-present, Facebook, Inc.
< *
< * This source code is licensed under the MIT license found in the
< * LICENSE file in the root directory of this source tree.
< *
< * @typechecks
< */
<
< /* eslint-disable fb-www/typeof-undefined */
<
< /**
< * Same as document.activeElement but wraps in a try-catch block. In IE it is
< * not safe to call document.activeElement if there is nothing focused.
< *
< * The activeElement will be null only if the document or document body is not
< * yet defined.
< *
< * @param {?DOMDocument} doc Defaults to current document.
< * @return {?DOMElement}
< */
< function getActiveElement(doc) /*?DOMElement*/{
< doc = doc || (typeof document !== 'undefined' ? document : undefined);
< if (typeof doc === 'undefined') {
< return null;
< }
< try {
< return doc.activeElement || doc.body;
< } catch (e) {
< return doc.body;
< }
< }
<
< var getActiveElement_1 = getActiveElement;
<
< /**
< * Copyright (c) 2013-present, Facebook, Inc.
< *
< * This source code is licensed under the MIT license found in the
< * LICENSE file in the root directory of this source tree.
< *
< * @typechecks
< *
< */
<
3961,3962d3968
<
<
4013,4014d4018
< var shallowEqual_1 = shallowEqual;
<
4058a4063,4065
> // Update & Callback & Ref & Snapshot
> var LifecycleEffectMask = /* */420;
>
4064a4072,4073
> var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
>
4104,4105c4113,4114
< var owner = ReactCurrentOwner.current;
< if (owner !== null && owner.tag === ClassComponent) {
---
> var owner = ReactCurrentOwner$1.current;
> if (owner !== null && (owner.tag === ClassComponent || owner.tag === ClassComponentLazy)) {
4108c4117
< !instance._warnedAboutRefsInRender ? warning_1(false, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber) || 'A component') : void 0;
---
> !instance._warnedAboutRefsInRender ? warningWithoutStack$1(false, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component') : void 0;
4121c4130
< !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant_1(false, 'Unable to find node on an unmounted component.') : void 0;
---
> !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
4129c4138
< !(state !== UNMOUNTED) ? invariant_1(false, 'Unable to find node on an unmounted component.') : void 0;
---
> !(state !== UNMOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
4168c4177
< invariant_1(false, 'Unable to find node on an unmounted component.');
---
> invariant(false, 'Unable to find node on an unmounted component.');
4219c4228
< !didFindChild ? invariant_1(false, 'Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.') : void 0;
---
> !didFindChild ? invariant(false, 'Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.') : void 0;
4223c4232
< !(a.alternate === b) ? invariant_1(false, 'Return fibers should always be each others\' alternates. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(a.alternate === b) ? invariant(false, 'Return fibers should always be each others\' alternates. This error is likely caused by a bug in React. Please file an issue.') : void 0;
4227c4236
< !(a.tag === HostRoot) ? invariant_1(false, 'Unable to find node on an unmounted component.') : void 0;
---
> !(a.tag === HostRoot) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
4315c4324
< var SyntheticAnimationEvent = SyntheticEvent$1.extend({
---
> var SyntheticAnimationEvent = SyntheticEvent.extend({
4325c4334
< var SyntheticClipboardEvent = SyntheticEvent$1.extend({
---
> var SyntheticClipboardEvent = SyntheticEvent.extend({
4556c4565
< var SyntheticTransitionEvent = SyntheticEvent$1.extend({
---
> var SyntheticTransitionEvent = SyntheticEvent.extend({
4605c4614
< var interactiveEventTypeNames = [[TOP_BLUR, 'blur'], [TOP_CANCEL, 'cancel'], [TOP_CLICK, 'click'], [TOP_CLOSE, 'close'], [TOP_CONTEXT_MENU, 'contextMenu'], [TOP_COPY, 'copy'], [TOP_CUT, 'cut'], [TOP_DOUBLE_CLICK, 'doubleClick'], [TOP_DRAG_END, 'dragEnd'], [TOP_DRAG_START, 'dragStart'], [TOP_DROP, 'drop'], [TOP_FOCUS, 'focus'], [TOP_INPUT, 'input'], [TOP_INVALID, 'invalid'], [TOP_KEY_DOWN, 'keyDown'], [TOP_KEY_PRESS, 'keyPress'], [TOP_KEY_UP, 'keyUp'], [TOP_MOUSE_DOWN, 'mouseDown'], [TOP_MOUSE_UP, 'mouseUp'], [TOP_PASTE, 'paste'], [TOP_PAUSE, 'pause'], [TOP_PLAY, 'play'], [TOP_POINTER_CANCEL, 'pointerCancel'], [TOP_POINTER_DOWN, 'pointerDown'], [TOP_POINTER_UP, 'pointerUp'], [TOP_RATE_CHANGE, 'rateChange'], [TOP_RESET, 'reset'], [TOP_SEEKED, 'seeked'], [TOP_SUBMIT, 'submit'], [TOP_TOUCH_CANCEL, 'touchCancel'], [TOP_TOUCH_END, 'touchEnd'], [TOP_TOUCH_START, 'touchStart'], [TOP_VOLUME_CHANGE, 'volumeChange']];
---
> var interactiveEventTypeNames = [[TOP_BLUR, 'blur'], [TOP_CANCEL, 'cancel'], [TOP_CLICK, 'click'], [TOP_CLOSE, 'close'], [TOP_CONTEXT_MENU, 'contextMenu'], [TOP_COPY, 'copy'], [TOP_CUT, 'cut'], [TOP_AUX_CLICK, 'auxClick'], [TOP_DOUBLE_CLICK, 'doubleClick'], [TOP_DRAG_END, 'dragEnd'], [TOP_DRAG_START, 'dragStart'], [TOP_DROP, 'drop'], [TOP_FOCUS, 'focus'], [TOP_INPUT, 'input'], [TOP_INVALID, 'invalid'], [TOP_KEY_DOWN, 'keyDown'], [TOP_KEY_PRESS, 'keyPress'], [TOP_KEY_UP, 'keyUp'], [TOP_MOUSE_DOWN, 'mouseDown'], [TOP_MOUSE_UP, 'mouseUp'], [TOP_PASTE, 'paste'], [TOP_PAUSE, 'pause'], [TOP_PLAY, 'play'], [TOP_POINTER_CANCEL, 'pointerCancel'], [TOP_POINTER_DOWN, 'pointerDown'], [TOP_POINTER_UP, 'pointerUp'], [TOP_RATE_CHANGE, 'rateChange'], [TOP_RESET, 'reset'], [TOP_SEEKED, 'seeked'], [TOP_SUBMIT, 'submit'], [TOP_TOUCH_CANCEL, 'touchCancel'], [TOP_TOUCH_END, 'touchEnd'], [TOP_TOUCH_START, 'touchStart'], [TOP_VOLUME_CHANGE, 'volumeChange']];
4678a4688
> case TOP_AUX_CLICK:
4738c4748
< warning_1(false, 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);
---
> warningWithoutStack$1(false, 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);
4743c4753
< EventConstructor = SyntheticEvent$1;
---
> EventConstructor = SyntheticEvent;
5038c5048
< if (isEventSupported(getRawEventName(dependency), true)) {
---
> if (isEventSupported(getRawEventName(dependency))) {
5074,5146c5084,5092
< /**
< * Copyright (c) 2013-present, Facebook, Inc.
< *
< * This source code is licensed under the MIT license found in the
< * LICENSE file in the root directory of this source tree.
< *
< * @typechecks
< */
<
< /**
< * @param {*} object The object to check.
< * @return {boolean} Whether or not the object is a DOM node.
< */
< function isNode(object) {
< var doc = object ? object.ownerDocument || object : document;
< var defaultView = doc.defaultView || window;
< return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
< }
<
< var isNode_1 = isNode;
<
< /**
< * Copyright (c) 2013-present, Facebook, Inc.
< *
< * This source code is licensed under the MIT license found in the
< * LICENSE file in the root directory of this source tree.
< *
< * @typechecks
< */
<
<
<
< /**
< * @param {*} object The object to check.
< * @return {boolean} Whether or not the object is a DOM text node.
< */
< function isTextNode(object) {
< return isNode_1(object) && object.nodeType == 3;
< }
<
< var isTextNode_1 = isTextNode;
<
< /**
< * Copyright (c) 2013-present, Facebook, Inc.
< *
< * This source code is licensed under the MIT license found in the
< * LICENSE file in the root directory of this source tree.
< *
< *
< */
<
<
<
< /*eslint-disable no-bitwise */
<
< /**
< * Checks if a given DOM node contains or is another DOM node.
< */
< function containsNode(outerNode, innerNode) {
< if (!outerNode || !innerNode) {
< return false;
< } else if (outerNode === innerNode) {
< return true;
< } else if (isTextNode_1(outerNode)) {
< return false;
< } else if (isTextNode_1(innerNode)) {
< return containsNode(outerNode, innerNode.parentNode);
< } else if ('contains' in outerNode) {
< return outerNode.contains(innerNode);
< } else if (outerNode.compareDocumentPosition) {
< return !!(outerNode.compareDocumentPosition(innerNode) & 16);
< } else {
< return false;
---
> function getActiveElement(doc) {
> doc = doc || (typeof document !== 'undefined' ? document : undefined);
> if (typeof doc === 'undefined') {
> return null;
> }
> try {
> return doc.activeElement || doc.body;
> } catch (e) {
> return doc.body;
5150,5151d5095
< var containsNode_1 = containsNode;
<
5216c5160,5163
< var selection = window.getSelection && window.getSelection();
---
> var ownerDocument = outerNode.ownerDocument;
>
> var win = ownerDocument && ownerDocument.defaultView || window;
> var selection = win.getSelection && win.getSelection();
5338,5343c5285,5288
< if (!window.getSelection) {
< return;
< }
<
< var selection = window.getSelection();
< var length = node[getTextContentAccessor()].length;
---
> var doc = node.ownerDocument || document;
> var win = doc ? doc.defaultView : window;
> var selection = win.getSelection();
> var length = node.textContent.length;
5362c5307
< var range = document.createRange();
---
> var range = doc.createRange();
5375a5321,5342
> function isTextNode(node) {
> return node && node.nodeType === TEXT_NODE;
> }
>
> function containsNode(outerNode, innerNode) {
> if (!outerNode || !innerNode) {
> return false;
> } else if (outerNode === innerNode) {
> return true;
> } else if (isTextNode(outerNode)) {
> return false;
> } else if (isTextNode(innerNode)) {
> return containsNode(outerNode, innerNode.parentNode);
> } else if ('contains' in outerNode) {
> return outerNode.contains(innerNode);
> } else if (outerNode.compareDocumentPosition) {
> return !!(outerNode.compareDocumentPosition(innerNode) & 16);
> } else {
> return false;
> }
> }
>
5377c5344,5360
< return containsNode_1(document.documentElement, node);
---
> return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
> }
>
> function getActiveElementDeep() {
> var win = window;
> var element = getActiveElement();
> while (element instanceof win.HTMLIFrameElement) {
> // Accessing the contentDocument of a HTMLIframeElement can cause the browser
> // to throw, e.g. if it has a cross-origin src attribute
> try {
> win = element.contentDocument.defaultView;
> } catch (e) {
> return element;
> }
> element = getActiveElement(win.document);
> }
> return element;
5398c5381
< var focusedElem = getActiveElement_1();
---
> var focusedElem = getActiveElementDeep();
5411c5394
< var curFocusedElem = getActiveElement_1();
---
> var curFocusedElem = getActiveElementDeep();
5489c5472
< var skipSelectionChangeEvent = ExecutionEnvironment_1.canUseDOM && 'documentMode' in document && document.documentMode <= 11;
---
> var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;
5497c5480
< dependencies: [TOP_BLUR, TOP_CONTEXT_MENU, TOP_FOCUS, TOP_KEY_DOWN, TOP_KEY_UP, TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_SELECTION_CHANGE]
---
> dependencies: [TOP_BLUR, TOP_CONTEXT_MENU, TOP_DRAG_END, TOP_FOCUS, TOP_KEY_DOWN, TOP_KEY_UP, TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_SELECTION_CHANGE]
5521,5522c5504,5506
< } else if (window.getSelection) {
< var selection = window.getSelection();
---
> } else {
> var win = node.ownerDocument && node.ownerDocument.defaultView || window;
> var selection = win.getSelection();
5532a5517,5526
> * Get document associated with the event target.
> *
> * @param {object} nativeEventTarget
> * @return {Document}
> */
> function getEventTargetDocument(eventTarget) {
> return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
> }
>
> /**
5535a5530
> * @param {object} nativeEventTarget
5543c5538,5540
< if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement_1()) {
---
> var doc = getEventTargetDocument(nativeEventTarget);
>
> if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
5549c5546
< if (!lastSelection || !shallowEqual_1(lastSelection, currentSelection)) {
---
> if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
5552c5549
< var syntheticEvent = SyntheticEvent$1.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);
---
> var syntheticEvent = SyntheticEvent.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);
5583c5580
< var doc = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget.document : nativeEventTarget.nodeType === DOCUMENT_NODE ? nativeEventTarget : nativeEventTarget.ownerDocument;
---
> var doc = getEventTargetDocument(nativeEventTarget);
5612a5610
> case TOP_DRAG_END:
5642c5640
< injection$1.injectComponentTree(ReactDOMComponentTree);
---
> setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1);
5656,5663c5654,5655
< /**
< * Copyright (c) 2013-present, Facebook, Inc.
< *
< * This source code is licensed under the MIT license found in the
< * LICENSE file in the root directory of this source tree.
< *
< */
<
---
> var didWarnSelectedSetOnOption = false;
> var didWarnInvalidChild = false;
5664a5657,5658
> function flattenChildren(children) {
> var content = '';
5666c5660,5673
< var emptyObject = {};
---
> // Flatten children. We'll warn if they are invalid
> // during validateProps() which runs for hydration too.
> // Note that this would throw on non-element objects.
> // Elements are stringified (which is normally irrelevant
> // but matters for <fbt>).
> React.Children.forEach(children, function (child) {
> if (child == null) {
> return;
> }
> content += child;
> // Note: we don't warn about invalid children here.
> // Instead, this is done separately below so that
> // it happens during the hydration codepath too.
> });
5668,5669c5675
< {
< Object.freeze(emptyObject);
---
> return content;
5672c5678,5704
< var emptyObject_1 = emptyObject;
---
> /**
> * Implements an <option> host component that warns when `selected` is set.
> */
>
> function validateProps(element, props) {
> {
> // This mirrors the codepath above, but runs for hydration too.
> // Warn about invalid children here so that client and hydration are consistent.
> // TODO: this seems like it could cause a DEV-only throw for hydration
> // if children contains a non-element object. We should try to avoid that.
> if (typeof props.children === 'object' && props.children !== null) {
> React.Children.forEach(props.children, function (child) {
> if (child == null) {
> return;
> }
> if (typeof child === 'string' || typeof child === 'number') {
> return;
> }
> if (typeof child.type !== 'string') {
> return;
> }
> if (!didWarnInvalidChild) {
> didWarnInvalidChild = true;
> warning$1(false, 'Only strings and numbers are supported as <option> children.');
> }
> });
> }
5674,5719c5706,5711
< // We capture a local reference to any global, in case it gets polyfilled after
< // this module is initially evaluated.
< // We want to be using a consistent implementation.
<
< var localRequestAnimationFrame$1 = typeof requestAnimationFrame === 'function' ? requestAnimationFrame : undefined;
<
< /**
< * A scheduling library to allow scheduling work with more granular priority and
< * control than requestAnimationFrame and requestIdleCallback.
< * Current TODO items:
< * X- Pull out the scheduleWork polyfill built into React
< * X- Initial test coverage
< * X- Support for multiple callbacks
< * - Support for two priorities; serial and deferred
< * - Better test coverage
< * - Better docblock
< * - Polish documentation, API
< */
<
< // This is a built-in polyfill for requestIdleCallback. It works by scheduling
< // a requestAnimationFrame, storing the time for the start of the frame, then
< // scheduling a postMessage which gets scheduled after paint. Within the
< // postMessage handler do as much work as possible until time + frame rate.
< // By separating the idle call into a separate event tick we ensure that
< // layout, paint and other browser work is counted against the available time.
< // The frame rate is dynamically adjusted.
<
< // We capture a local reference to any global, in case it gets polyfilled after
< // this module is initially evaluated.
< // We want to be using a consistent implementation.
< var localDate = Date;
< var localSetTimeout = setTimeout;
< var localClearTimeout = clearTimeout;
<
< var hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
<
< var now$1 = void 0;
< if (hasNativePerformanceNow) {
< var Performance = performance;
< now$1 = function () {
< return Performance.now();
< };
< } else {
< now$1 = function () {
< return localDate.now();
< };
---
> // TODO: Remove support for `selected` in <option>.
> if (props.selected != null && !didWarnSelectedSetOnOption) {
> warning$1(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
> didWarnSelectedSetOnOption = true;
> }
> }
5722,5723c5714,5719
< var scheduleWork = void 0;
< var cancelScheduledWork = void 0;
---
> function postMountWrapper$1(element, props) {
> // value="" should make a value attribute (#6219)
> if (props.value != null) {
> element.setAttribute('value', toString(getToStringValue(props.value)));
> }
> }
5725,5726c5721,5723
< if (!ExecutionEnvironment_1.canUseDOM) {
< var timeoutIds = new Map();
---
> function getHostProps$1(element, props) {
> var hostProps = _assign({ children: undefined }, props);
> var content = flattenChildren(props.children);
5728,6088c5725,5727
< scheduleWork = function (callback, options) {
< // keeping return type consistent
< var callbackConfig = {
< scheduledCallback: callback,
< timeoutTime: 0,
< next: null,
< prev: null
< };
< var timeoutId = localSetTimeout(function () {
< callback({
< timeRemaining: function () {
< return Infinity;
< },
<
< didTimeout: false
< });
< });
< timeoutIds.set(callback, timeoutId);
< return callbackConfig;
< };
< cancelScheduledWork = function (callbackId) {
< var callback = callbackId.scheduledCallback;
< var timeoutId = timeoutIds.get(callback);
< timeoutIds.delete(callbackId);
< localClearTimeout(timeoutId);
< };
< } else {
< {
< if (typeof localRequestAnimationFrame$1 !== 'function') {
< warning_1(false, 'React depends on requestAnimationFrame. Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
< }
< }
<
< var localRequestAnimationFrame = typeof localRequestAnimationFrame$1 === 'function' ? localRequestAnimationFrame$1 : function (callback) {
< invariant_1(false, 'React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills');
< };
<
< var headOfPendingCallbacksLinkedList = null;
< var tailOfPendingCallbacksLinkedList = null;
<
< // We track what the next soonest timeoutTime is, to be able to quickly tell
< // if none of the scheduled callbacks have timed out.
< var nextSoonestTimeoutTime = -1;
<
< var isIdleScheduled = false;
< var isAnimationFrameScheduled = false;
<
< var frameDeadline = 0;
< // We start out assuming that we run at 30fps but then the heuristic tracking
< // will adjust this value to a faster fps if we get more frequent animation
< // frames.
< var previousFrameTime = 33;
< var activeFrameTime = 33;
<
< var frameDeadlineObject = {
< didTimeout: false,
< timeRemaining: function () {
< var remaining = frameDeadline - now$1();
< return remaining > 0 ? remaining : 0;
< }
< };
<
< /**
< * Handles the case where a callback errors:
< * - don't catch the error, because this changes debugging behavior
< * - do start a new postMessage callback, to call any remaining callbacks,
< * - but only if there is an error, so there is not extra overhead.
< */
< var callUnsafely = function (callbackConfig, arg) {
< var callback = callbackConfig.scheduledCallback;
< var finishedCalling = false;
< try {
< callback(arg);
< finishedCalling = true;
< } finally {
< // always remove it from linked list
< cancelScheduledWork(callbackConfig);
<
< if (!finishedCalling) {
< // an error must have been thrown
< isIdleScheduled = true;
< window.postMessage(messageKey, '*');
< }
< }
< };
<
< /**
< * Checks for timed out callbacks, runs them, and then checks again to see if
< * any more have timed out.
< * Keeps doing this until there are none which have currently timed out.
< */
< var callTimedOutCallbacks = function () {
< if (headOfPendingCallbacksLinkedList === null) {
< return;
< }
<
< var currentTime = now$1();
< // TODO: this would be more efficient if deferred callbacks are stored in
< // min heap.
< // Or in a linked list with links for both timeoutTime order and insertion
< // order.
< // For now an easy compromise is the current approach:
< // Keep a pointer to the soonest timeoutTime, and check that first.
< // If it has not expired, we can skip traversing the whole list.
< // If it has expired, then we step through all the callbacks.
< if (nextSoonestTimeoutTime === -1 || nextSoonestTimeoutTime > currentTime) {
< // We know that none of them have timed out yet.
< return;
< }
< // NOTE: we intentionally wait to update the nextSoonestTimeoutTime until
< // after successfully calling any timed out callbacks.
< // If a timed out callback throws an error, we could get stuck in a state
< // where the nextSoonestTimeoutTime was set wrong.
< var updatedNextSoonestTimeoutTime = -1; // we will update nextSoonestTimeoutTime below
< var timedOutCallbacks = [];
<
< // iterate once to find timed out callbacks and find nextSoonestTimeoutTime
< var currentCallbackConfig = headOfPendingCallbacksLinkedList;
< while (currentCallbackConfig !== null) {
< var _timeoutTime = currentCallbackConfig.timeoutTime;
< if (_timeoutTime !== -1 && _timeoutTime <= currentTime) {
< // it has timed out!
< timedOutCallbacks.push(currentCallbackConfig);
< } else {
< if (_timeoutTime !== -1 && (updatedNextSoonestTimeoutTime === -1 || _timeoutTime < updatedNextSoonestTimeoutTime)) {
< updatedNextSoonestTimeoutTime = _timeoutTime;
< }
< }
< currentCallbackConfig = currentCallbackConfig.next;
< }
<
< if (timedOutCallbacks.length > 0) {
< frameDeadlineObject.didTimeout = true;
< for (var i = 0, len = timedOutCallbacks.length; i < len; i++) {
< callUnsafely(timedOutCallbacks[i], frameDeadlineObject);
< }
< }
<
< // NOTE: we intentionally wait to update the nextSoonestTimeoutTime until
< // after successfully calling any timed out callbacks.
< nextSoonestTimeoutTime = updatedNextSoonestTimeoutTime;
< };
<
< // We use the postMessage trick to defer idle work until after the repaint.
< var messageKey = '__reactIdleCallback$' + Math.random().toString(36).slice(2);
< var idleTick = function (event) {
< if (event.source !== window || event.data !== messageKey) {
< return;
< }
< isIdleScheduled = false;
<
< if (headOfPendingCallbacksLinkedList === null) {
< return;
< }
<
< // First call anything which has timed out, until we have caught up.
< callTimedOutCallbacks();
<
< var currentTime = now$1();
< // Next, as long as we have idle time, try calling more callbacks.
< while (frameDeadline - currentTime > 0 && headOfPendingCallbacksLinkedList !== null) {
< var latestCallbackConfig = headOfPendingCallbacksLinkedList;
< frameDeadlineObject.didTimeout = false;
< // callUnsafely will remove it from the head of the linked list
< callUnsafely(latestCallbackConfig, frameDeadlineObject);
< currentTime = now$1();
< }
< if (headOfPendingCallbacksLinkedList !== null) {
< if (!isAnimationFrameScheduled) {
< // Schedule another animation callback so we retry later.
< isAnimationFrameScheduled = true;
< localRequestAnimationFrame(animationTick);
< }
< }
< };
< // Assumes that we have addEventListener in this environment. Might need
< // something better for old IE.
< window.addEventListener('message', idleTick, false);
<
< var animationTick = function (rafTime) {
< isAnimationFrameScheduled = false;
< var nextFrameTime = rafTime - frameDeadline + activeFrameTime;
< if (nextFrameTime < activeFrameTime && previousFrameTime < activeFrameTime) {
< if (nextFrameTime < 8) {
< // Defensive coding. We don't support higher frame rates than 120hz.
< // If we get lower than that, it is probably a bug.
< nextFrameTime = 8;
< }
< // If one frame goes long, then the next one can be short to catch up.
< // If two frames are short in a row, then that's an indication that we
< // actually have a higher frame rate than what we're currently optimizing.
< // We adjust our heuristic dynamically accordingly. For example, if we're
< // running on 120hz display or 90hz VR display.
< // Take the max of the two in case one of them was an anomaly due to
< // missed frame deadlines.
< activeFrameTime = nextFrameTime < previousFrameTime ? previousFrameTime : nextFrameTime;
< } else {
< previousFrameTime = nextFrameTime;
< }
< frameDeadline = rafTime + activeFrameTime;
< if (!isIdleScheduled) {
< isIdleScheduled = true;
< window.postMessage(messageKey, '*');
< }
< };
<
< scheduleWork = function (callback, options) /* CallbackConfigType */{
< var timeoutTime = -1;
< if (options != null && typeof options.timeout === 'number') {
< timeoutTime = now$1() + options.timeout;
< }
< if (nextSoonestTimeoutTime === -1 || timeoutTime !== -1 && timeoutTime < nextSoonestTimeoutTime) {
< nextSoonestTimeoutTime = timeoutTime;
< }
<
< var scheduledCallbackConfig = {
< scheduledCallback: callback,
< timeoutTime: timeoutTime,
< prev: null,
< next: null
< };
< if (headOfPendingCallbacksLinkedList === null) {
< // Make this callback the head and tail of our list
< headOfPendingCallbacksLinkedList = scheduledCallbackConfig;
< tailOfPendingCallbacksLinkedList = scheduledCallbackConfig;
< } else {
< // Add latest callback as the new tail of the list
< scheduledCallbackConfig.prev = tailOfPendingCallbacksLinkedList;
< // renaming for clarity
< var oldTailOfPendingCallbacksLinkedList = tailOfPendingCallbacksLinkedList;
< if (oldTailOfPendingCallbacksLinkedList !== null) {
< oldTailOfPendingCallbacksLinkedList.next = scheduledCallbackConfig;
< }
< tailOfPendingCallbacksLinkedList = scheduledCallbackConfig;
< }
<
< if (!isAnimationFrameScheduled) {
< // If rAF didn't already schedule one, we need to schedule a frame.
< // TODO: If this rAF doesn't materialize because the browser throttles, we
< // might want to still have setTimeout trigger scheduleWork as a backup to ensure
< // that we keep performing work.
< isAnimationFrameScheduled = true;
< localRequestAnimationFrame(animationTick);
< }
< return scheduledCallbackConfig;
< };
<
< cancelScheduledWork = function (callbackConfig /* CallbackConfigType */
< ) {
< if (callbackConfig.prev === null && headOfPendingCallbacksLinkedList !== callbackConfig) {
< // this callbackConfig has already been cancelled.
< // cancelScheduledWork should be idempotent, a no-op after first call.
< return;
< }
<
< /**
< * There are four possible cases:
< * - Head/nodeToRemove/Tail -> null
< * In this case we set Head and Tail to null.
< * - Head -> ... middle nodes... -> Tail/nodeToRemove
< * In this case we point the middle.next to null and put middle as the new
< * Tail.
< * - Head/nodeToRemove -> ...middle nodes... -> Tail
< * In this case we point the middle.prev at null and move the Head to
< * middle.
< * - Head -> ... ?some nodes ... -> nodeToRemove -> ... ?some nodes ... -> Tail
< * In this case we point the Head.next to the Tail and the Tail.prev to
< * the Head.
< */
< var next = callbackConfig.next;
< var prev = callbackConfig.prev;
< callbackConfig.next = null;
< callbackConfig.prev = null;
< if (next !== null) {
< // we have a next
<
< if (prev !== null) {
< // we have a prev
<
< // callbackConfig is somewhere in the middle of a list of 3 or more nodes.
< prev.next = next;
< next.prev = prev;
< return;
< } else {
< // there is a next but not a previous one;
< // callbackConfig is the head of a list of 2 or more other nodes.
< next.prev = null;
< headOfPendingCallbacksLinkedList = next;
< return;
< }
< } else {
< // there is no next callback config; this must the tail of the list
<
< if (prev !== null) {
< // we have a prev
<
< // callbackConfig is the tail of a list of 2 or more other nodes.
< prev.next = null;
< tailOfPendingCallbacksLinkedList = prev;
< return;
< } else {
< // there is no previous callback config;
< // callbackConfig is the only thing in the linked list,
< // so both head and tail point to it.
< headOfPendingCallbacksLinkedList = null;
< tailOfPendingCallbacksLinkedList = null;
< return;
< }
< }
< };
< }
<
< var didWarnSelectedSetOnOption = false;
<
< function flattenChildren(children) {
< var content = '';
<
< // Flatten children and warn if they aren't strings or numbers;
< // invalid types are ignored.
< // We can silently skip them because invalid DOM nesting warning
< // catches these cases in Fiber.
< React.Children.forEach(children, function (child) {
< if (child == null) {
< return;
< }
< if (typeof child === 'string' || typeof child === 'number') {
< content += child;
< }
< });
<
< return content;
< }
<
< /**
< * Implements an <option> host component that warns when `selected` is set.
< */
<
< function validateProps(element, props) {
< // TODO (yungsters): Remove support for `selected` in <option>.
< {
< if (props.selected != null && !didWarnSelectedSetOnOption) {
< warning_1(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
< didWarnSelectedSetOnOption = true;
< }
< }
< }
<
< function postMountWrapper$1(element, props) {
< // value="" should make a value attribute (#6219)
< if (props.value != null) {
< element.setAttribute('value', props.value);
< }
< }
<
< function getHostProps$1(element, props) {
< var hostProps = _assign({ children: undefined }, props);
< var content = flattenChildren(props.children);
<
< if (content) {
< hostProps.children = content;
< }
---
> if (content) {
> hostProps.children = content;
> }
6094,6097d5732
< var getCurrentFiberOwnerName$3 = ReactDebugCurrentFiber.getCurrentFiberOwnerName;
< var getCurrentFiberStackAddendum$3 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
<
<
6105c5740
< var ownerName = getCurrentFiberOwnerName$3();
---
> var ownerName = getCurrentFiberOwnerNameInDevOrNull();
6118c5753
< ReactControlledValuePropTypes.checkPropTypes('select', props, getCurrentFiberStackAddendum$3);
---
> ReactControlledValuePropTypes.checkPropTypes('select', props);
6127c5762
< warning_1(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
---
> warning$1(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
6129c5764
< warning_1(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
---
> warning$1(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
6156c5791
< var _selectedValue = '' + propValue;
---
> var _selectedValue = toString(getToStringValue(propValue));
6204d5838
< var value = props.value;
6206d5839
< initialValue: value != null ? value : props.defaultValue,
6212c5845
< warning_1(false, 'Select 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 select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
---
> warning$1(false, 'Select 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 select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
6231,6234d5863
< // After the initial mount, we control selected-ness manually so don't pass
< // this value down
< node._wrapperState.initialValue = undefined;
<
6261,6263d5889
< // TODO: direct imports like some-package/src/* are bad. Fix me.
< var getCurrentFiberStackAddendum$4 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
<
6284c5910
< !(props.dangerouslySetInnerHTML == null) ? invariant_1(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : void 0;
---
> !(props.dangerouslySetInnerHTML == null) ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : void 0;
6295c5921
< children: '' + node._wrapperState.initialValue
---
> children: toString(node._wrapperState.initialValue)
6304c5930
< ReactControlledValuePropTypes.checkPropTypes('textarea', props, getCurrentFiberStackAddendum$4);
---
> ReactControlledValuePropTypes.checkPropTypes('textarea', props);
6306c5932
< warning_1(false, 'Textarea 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 textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
---
> warning$1(false, '%s contains a textarea with both value and defaultValue props. ' + 'Textarea 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 textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
6320c5946
< warning_1(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
---
> warning$1(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
6322c5948
< !(defaultValue == null) ? invariant_1(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : void 0;
---
> !(defaultValue == null) ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : void 0;
6324c5950
< !(children.length <= 1) ? invariant_1(false, '<textarea> can only have at most one child.') : void 0;
---
> !(children.length <= 1) ? invariant(false, '<textarea> can only have at most one child.') : void 0;
6328c5954
< defaultValue = '' + children;
---
> defaultValue = children;
6337c5963
< initialValue: '' + initialValue
---
> initialValue: getToStringValue(initialValue)
6343c5969
< var value = props.value;
---
> var value = getToStringValue(props.value);
6347,6348c5973
< var newValue = '' + value;
<
---
> var newValue = toString(value);
6358c5983
< node.defaultValue = props.defaultValue;
---
> node.defaultValue = toString(getToStringValue(props.defaultValue));
6590,6631c6215
< /**
< * Copyright (c) 2013-present, Facebook, Inc.
< *
< * This source code is licensed under the MIT license found in the
< * LICENSE file in the root directory of this source tree.
< *
< * @typechecks
< */
<
< var _uppercasePattern = /([A-Z])/g;
<
< /**
< * Hyphenates a camelcased string, for example:
< *
< * > hyphenate('backgroundColor')
< * < "background-color"
< *
< * For CSS style names, use `hyphenateStyleName` instead which works properly
< * with all vendor prefixes, including `ms`.
< *
< * @param {string} string
< * @return {string}
< */
< function hyphenate(string) {
< return string.replace(_uppercasePattern, '-$1').toLowerCase();
< }
<
< var hyphenate_1 = hyphenate;
<
< /**
< * Copyright (c) 2013-present, Facebook, Inc.
< *
< * This source code is licensed under the MIT license found in the
< * LICENSE file in the root directory of this source tree.
< *
< * @typechecks
< */
<
<
<
<
<
---
> var uppercasePattern = /([A-Z])/g;
6646,6714d6229
< *
< * @param {string} string
< * @return {string}
< */
< function hyphenateStyleName(string) {
< return hyphenate_1(string).replace(msPattern, '-ms-');
< }
<
< var hyphenateStyleName_1 = hyphenateStyleName;
<
< /**
< * Copyright (c) 2013-present, Facebook, Inc.
< *
< * This source code is licensed under the MIT license found in the
< * LICENSE file in the root directory of this source tree.
< *
< * @typechecks
< */
<
< var _hyphenPattern = /-(.)/g;
<
< /**
< * Camelcases a hyphenated string, for example:
< *
< * > camelize('background-color')
< * < "backgroundColor"
< *
< * @param {string} string
< * @return {string}
< */
< function camelize(string) {
< return string.replace(_hyphenPattern, function (_, character) {
< return character.toUpperCase();
< });
< }
<
< var camelize_1 = camelize;
<
< /**
< * Copyright (c) 2013-present, Facebook, Inc.
< *
< * This source code is licensed under the MIT license found in the
< * LICENSE file in the root directory of this source tree.
< *
< * @typechecks
< */
<
<
<
<
<
< var msPattern$1 = /^-ms-/;
<
< /**
< * Camelcases a hyphenated CSS property name, for example:
< *
< * > camelizeStyleName('background-color')
< * < "backgroundColor"
< * > camelizeStyleName('-moz-transition')
< * < "MozTransition"
< * > camelizeStyleName('-ms-transition')
< * < "msTransition"
< *
< * As Andi Smith suggests
< * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
< * is converted to lowercase `ms`.
< *
< * @param {string} string
< * @return {string}
6716,6717c6231,6232
< function camelizeStyleName(string) {
< return camelize_1(string.replace(msPattern$1, 'ms-'));
---
> function hyphenateStyleName(name) {
> return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
6720,6722c6235
< var camelizeStyleName_1 = camelizeStyleName;
<
< var warnValidStyle = emptyFunction_1;
---
> var warnValidStyle = function () {};
6726a6240,6241
> var msPattern$1 = /^-ms-/;
> var hyphenPattern = /-(.)/g;
6736c6251,6257
< var warnHyphenatedStyleName = function (name, getStack) {
---
> var camelize = function (string) {
> return string.replace(hyphenPattern, function (_, character) {
> return character.toUpperCase();
> });
> };
>
> var warnHyphenatedStyleName = function (name) {
6742c6263,6267
< warning_1(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName_1(name), getStack());
---
> warning$1(false, 'Unsupported style property %s. Did you mean %s?', name,
> // As Andi Smith suggests
> // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
> // is converted to lowercase `ms`.
> camelize(name.replace(msPattern$1, 'ms-')));
6745c6270
< var warnBadVendoredStyleName = function (name, getStack) {
---
> var warnBadVendoredStyleName = function (name) {
6751c6276
< warning_1(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), getStack());
---
> warning$1(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
6754c6279
< var warnStyleValueWithSemicolon = function (name, value, getStack) {
---
> var warnStyleValueWithSemicolon = function (name, value) {
6760c6285
< warning_1(false, "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.%s', name, value.replace(badStyleValueWithSemicolonPattern, ''), getStack());
---
> warning$1(false, "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
6763c6288
< var warnStyleValueIsNaN = function (name, value, getStack) {
---
> var warnStyleValueIsNaN = function (name, value) {
6769c6294
< warning_1(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, getStack());
---
> warning$1(false, '`NaN` is an invalid value for the `%s` css style property.', name);
6772c6297
< var warnStyleValueIsInfinity = function (name, value, getStack) {
---
> var warnStyleValueIsInfinity = function (name, value) {
6778c6303
< warning_1(false, '`Infinity` is an invalid value for the `%s` css style property.%s', name, getStack());
---
> warning$1(false, '`Infinity` is an invalid value for the `%s` css style property.', name);
6781c6306
< warnValidStyle = function (name, value, getStack) {
---
> warnValidStyle = function (name, value) {
6783c6308
< warnHyphenatedStyleName(name, getStack);
---
> warnHyphenatedStyleName(name);
6785c6310
< warnBadVendoredStyleName(name, getStack);
---
> warnBadVendoredStyleName(name);
6787c6312
< warnStyleValueWithSemicolon(name, value, getStack);
---
> warnStyleValueWithSemicolon(name, value);
6792c6317
< warnStyleValueIsNaN(name, value, getStack);
---
> warnStyleValueIsNaN(name, value);
6794c6319
< warnStyleValueIsInfinity(name, value, getStack);
---
> warnStyleValueIsInfinity(name, value);
6823c6348
< serialized += delimiter + hyphenateStyleName_1(styleName) + ':';
---
> serialized += delimiter + hyphenateStyleName(styleName) + ':';
6840c6365
< function setValueForStyles(node, styles, getStack) {
---
> function setValueForStyles(node, styles) {
6849c6374
< warnValidStyle$1(styleName, styles[styleName], getStack);
---
> warnValidStyle$1(styleName, styles[styleName]);
6892a6418,6419
> // TODO: We can remove this if we add invariantWithStack()
> // or add stack by default to invariants where possible.
6895c6422,6427
< function assertValidProps(tag, props, getStack) {
---
> var ReactDebugCurrentFrame$2 = null;
> {
> ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
> }
>
> function assertValidProps(tag, props) {
6901c6433
< !(props.children == null && props.dangerouslySetInnerHTML == null) ? invariant_1(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', tag, getStack()) : void 0;
---
> !(props.children == null && props.dangerouslySetInnerHTML == null) ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', tag, ReactDebugCurrentFrame$2.getStackAddendum()) : void 0;
6904,6905c6436,6437
< !(props.children == null) ? invariant_1(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : void 0;
< !(typeof props.dangerouslySetInnerHTML === 'object' && HTML$1 in props.dangerouslySetInnerHTML) ? invariant_1(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : void 0;
---
> !(props.children == null) ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : void 0;
> !(typeof props.dangerouslySetInnerHTML === 'object' && HTML$1 in props.dangerouslySetInnerHTML) ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : void 0;
6908c6440
< !(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) ? warning_1(false, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.%s', getStack()) : void 0;
---
> !(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) ? warning$1(false, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;
6910c6442
< !(props.style == null || typeof props.style === 'object') ? invariant_1(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', getStack()) : void 0;
---
> !(props.style == null || typeof props.style === 'object') ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', ReactDebugCurrentFrame$2.getStackAddendum()) : void 0;
7486,7490d7017
< function getStackAddendum() {
< var stack = ReactDebugCurrentFrame.getStackAddendum();
< return stack != null ? stack : '';
< }
<
7503c7030
< warning_1(false, 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.%s', name, getStackAddendum());
---
> warning$1(false, 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
7509c7036
< warning_1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?%s', name, correctName, getStackAddendum());
---
> warning$1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
7527c7054
< warning_1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?%s', name, standardName, getStackAddendum());
---
> warning$1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
7551c7078
< warning_1(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
---
> warning$1(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
7553c7080
< warning_1(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
---
> warning$1(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
7566,7570d7092
< function getStackAddendum$1() {
< var stack = ReactDebugCurrentFrame.getStackAddendum();
< return stack != null ? stack : '';
< }
<
7579c7101
< warning_1(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.%s', type, getStackAddendum$1());
---
> warning$1(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);
7581c7103
< warning_1(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.%s', type, getStackAddendum$1());
---
> warning$1(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
7586,7590d7107
< function getStackAddendum$2() {
< var stack = ReactDebugCurrentFrame.getStackAddendum();
< return stack != null ? stack : '';
< }
<
7608c7125
< warning_1(false, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');
---
> warning$1(false, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');
7620c7137
< warning_1(false, 'Invalid event handler property `%s`. Did you mean `%s`?%s', name, registrationName, getStackAddendum$2());
---
> warning$1(false, 'Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
7625c7142
< warning_1(false, 'Unknown event handler property `%s`. It will be ignored.%s', name, getStackAddendum$2());
---
> warning$1(false, 'Unknown event handler property `%s`. It will be ignored.', name);
7634c7151
< warning_1(false, 'Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.%s', name, getStackAddendum$2());
---
> warning$1(false, 'Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
7646c7163
< warning_1(false, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
---
> warning$1(false, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
7652c7169
< warning_1(false, 'The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
---
> warning$1(false, 'The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
7658c7175
< warning_1(false, 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.%s', typeof value, getStackAddendum$2());
---
> warning$1(false, 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
7664c7181
< warning_1(false, 'Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.%s', name, getStackAddendum$2());
---
> warning$1(false, 'Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
7676c7193
< warning_1(false, 'Invalid DOM property `%s`. Did you mean `%s`?%s', name, standardName, getStackAddendum$2());
---
> warning$1(false, 'Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
7683c7200
< warning_1(false, 'React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.%s', name, lowerCasedName, getStackAddendum$2());
---
> warning$1(false, 'React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);
7690c7207
< warning_1(false, 'Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.%s', value, name, name, value, name, getStackAddendum$2());
---
> warning$1(false, 'Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name);
7692c7209
< warning_1(false, 'Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.%s', value, name, name, value, name, name, name, getStackAddendum$2());
---
> warning$1(false, 'Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);
7709a7227,7233
> // Warn when passing the strings 'false' or 'true' into a boolean prop
> if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
> warning$1(false, 'Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value);
> warnedProperties$1[name] = true;
> return true;
> }
>
7727c7251
< warning_1(false, 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior%s', unknownPropString, type, getStackAddendum$2());
---
> warning$1(false, 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
7729c7253
< warning_1(false, 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior%s', unknownPropString, type, getStackAddendum$2());
---
> warning$1(false, 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
7741,7743d7264
< var getCurrentFiberOwnerName$2 = ReactDebugCurrentFiber.getCurrentFiberOwnerName;
< var getCurrentFiberStackAddendum$2 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
<
7758,7759d7278
< var getStack = emptyFunction_1.thatReturns('');
<
7773,7774d7291
< getStack = getCurrentFiberStackAddendum$2;
<
7782c7299,7305
< dialog: true
---
> dialog: true,
> // Electron ships a custom <webview> tag to display external web content in
> // an isolated frame and process.
> // This tag is not present in non Electron environments such as JSDom which
> // is often used for testing purposes.
> // @see https://electronjs.org/docs/api/webview-tag
> webview: true
7814c7337
< warning_1(false, 'Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
---
> warningWithoutStack$1(false, 'Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
7827c7350
< warning_1(false, 'Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
---
> warningWithoutStack$1(false, 'Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
7839c7362
< warning_1(false, 'Extra attributes from the server: %s', names);
---
> warningWithoutStack$1(false, 'Extra attributes from the server: %s', names);
7844c7367
< warning_1(false, 'Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.%s', registrationName, registrationName, registrationName, getCurrentFiberStackAddendum$2());
---
> warning$1(false, 'Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);
7846c7369
< warning_1(false, 'Expected `%s` listener to be a function, instead got a value of `%s` type.%s', registrationName, typeof listener, getCurrentFiberStackAddendum$2());
---
> warning$1(false, 'Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);
7872a7396,7397
> function noop() {}
>
7883c7408
< node.onclick = emptyFunction_1;
---
> node.onclick = noop;
7901c7426
< setValueForStyles(domElement, nextProp, getStack);
---
> setValueForStyles(domElement, nextProp);
7944c7469
< setValueForStyles(domElement, propValue, getStack);
---
> setValueForStyles(domElement, propValue);
7955c7480
< function createElement$1(type, props, rootContainerElement, parentNamespace) {
---
> function createElement(type, props, rootContainerElement, parentNamespace) {
7971c7496
< !(isCustomComponentTag || type === type.toLowerCase()) ? warning_1(false, '<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type) : void 0;
---
> !(isCustomComponentTag || type === type.toLowerCase()) ? warning$1(false, '<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type) : void 0;
7989a7515,7523
> // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple`
> // attribute on `select`s needs to be added before `option`s are inserted. This prevents
> // a bug where the `select` does not scroll to the correct option because singular
> // `select` elements automatically pick the first item.
> // See https://github.com/facebook/react/issues/13222
> if (type === 'select' && props.multiple) {
> var node = domElement;
> node.multiple = true;
> }
7999c7533
< warning_1(false, 'The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);
---
> warning$1(false, 'The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);
8007c7541
< function createTextNode$1(text, rootContainerElement) {
---
> function createTextNode(text, rootContainerElement) {
8011c7545
< function setInitialProperties$1(domElement, tag, rawProps, rootContainerElement) {
---
> function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {
8016c7550
< warning_1(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerName$2() || 'A component');
---
> warning$1(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
8089c7623
< assertValidProps(tag, props, getStack);
---
> assertValidProps(tag, props);
8122c7656
< function diffProperties$1(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
---
> function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
8162c7696
< assertValidProps(tag, nextProps, getStack);
---
> assertValidProps(tag, nextProps);
8287c7821
< function updateProperties$1(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
---
> function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
8331c7865
< function diffHydratedProperties$1(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
---
> function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
8340c7874
< warning_1(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerName$2() || 'A component');
---
> warning$1(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
8400c7934
< assertValidProps(tag, rawProps, getStack);
---
> assertValidProps(tag, rawProps);
8479d8012
< var rawHtml = nextProp ? nextProp[HTML] || '' : '';
8481c8014,8015
< var expectedHTML = normalizeHTML(domElement, rawHtml);
---
> var nextHtml = nextProp ? nextProp[HTML] : undefined;
> var expectedHTML = normalizeHTML(domElement, nextHtml != null ? nextHtml : '');
8580c8114
< function diffHydratedText$1(textNode, text) {
---
> function diffHydratedText(textNode, text) {
8585c8119
< function warnForUnmatchedText$1(textNode, text) {
---
> function warnForUnmatchedText(textNode, text) {
8591c8125
< function warnForDeletedHydratableElement$1(parentNode, child) {
---
> function warnForDeletedHydratableElement(parentNode, child) {
8597c8131
< warning_1(false, 'Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
---
> warningWithoutStack$1(false, 'Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
8601c8135
< function warnForDeletedHydratableText$1(parentNode, child) {
---
> function warnForDeletedHydratableText(parentNode, child) {
8607c8141
< warning_1(false, 'Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
---
> warningWithoutStack$1(false, 'Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
8611c8145
< function warnForInsertedHydratedElement$1(parentNode, tag, props) {
---
> function warnForInsertedHydratedElement(parentNode, tag, props) {
8617c8151
< warning_1(false, 'Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
---
> warningWithoutStack$1(false, 'Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
8621c8155
< function warnForInsertedHydratedText$1(parentNode, text) {
---
> function warnForInsertedHydratedText(parentNode, text) {
8634c8168
< warning_1(false, 'Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
---
> warningWithoutStack$1(false, 'Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
8652,8667d8185
< var ReactDOMFiberComponent = Object.freeze({
< createElement: createElement$1,
< createTextNode: createTextNode$1,
< setInitialProperties: setInitialProperties$1,
< diffProperties: diffProperties$1,
< updateProperties: updateProperties$1,
< diffHydratedProperties: diffHydratedProperties$1,
< diffHydratedText: diffHydratedText$1,
< warnForUnmatchedText: warnForUnmatchedText$1,
< warnForDeletedHydratableElement: warnForDeletedHydratableElement$1,
< warnForDeletedHydratableText: warnForDeletedHydratableText$1,
< warnForInsertedHydratedElement: warnForInsertedHydratedElement$1,
< warnForInsertedHydratedText: warnForInsertedHydratedText$1,
< restoreControlledState: restoreControlledState$1
< });
<
8669,8671c8187,8188
< var getCurrentFiberStackAddendum$5 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
<
< var validateDOMNesting = emptyFunction_1;
---
> var validateDOMNesting = function () {};
> var updatedAncestorInfo = function () {};
8715c8232
< var updatedAncestorInfo$1 = function (oldInfo, tag, instance) {
---
> updatedAncestorInfo = function (oldInfo, tag) {
8717c8234
< var info = { tag: tag, instance: instance };
---
> var info = { tag: tag };
8920c8437
< !(childTag == null) ? warning_1(false, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
---
> !(childTag == null) ? warningWithoutStack$1(false, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
8932c8449
< var addendum = getCurrentFiberStackAddendum$5();
---
> var addendum = getCurrentFiberStackInDev();
8958c8475
< warning_1(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info, addendum);
---
> warningWithoutStack$1(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info, addendum);
8960c8477
< warning_1(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.%s', tagDisplayName, ancestorTag, addendum);
---
> warningWithoutStack$1(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.%s', tagDisplayName, ancestorTag, addendum);
8962a8480,8484
> }
>
> function unstable_now() {
> return React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.now.apply(this, arguments);
> }
8964,8965c8486,8487
< // TODO: turn this into a named export
< validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo$1;
---
> function unstable_scheduleWork() {
> return React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.scheduleWork.apply(this, arguments);
8968c8490,8492
< var validateDOMNesting$1 = validateDOMNesting;
---
> function unstable_cancelScheduledWork() {
> return React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.cancelScheduledWork.apply(this, arguments);
> }
8974c8498
< invariant_1(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');
---
> invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');
8985,9003d8508
< // Unused
<
< var createElement = createElement$1;
< var createTextNode = createTextNode$1;
< var setInitialProperties = setInitialProperties$1;
< var diffProperties = diffProperties$1;
< var updateProperties = updateProperties$1;
< var diffHydratedProperties = diffHydratedProperties$1;
< var diffHydratedText = diffHydratedText$1;
< var warnForUnmatchedText = warnForUnmatchedText$1;
< var warnForDeletedHydratableElement = warnForDeletedHydratableElement$1;
< var warnForDeletedHydratableText = warnForDeletedHydratableText$1;
< var warnForInsertedHydratedElement = warnForInsertedHydratedElement$1;
< var warnForInsertedHydratedText = warnForInsertedHydratedText$1;
< var updatedAncestorInfo = validateDOMNesting$1.updatedAncestorInfo;
< var precacheFiberNode$1 = precacheFiberNode;
< var updateFiberProps$1 = updateFiberProps;
<
<
9047c8552
< var _ancestorInfo = updatedAncestorInfo(null, validatedTag, null);
---
> var _ancestorInfo = updatedAncestorInfo(null, validatedTag);
9057c8562
< var _ancestorInfo2 = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type, null);
---
> var _ancestorInfo2 = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);
9086c8591
< validateDOMNesting$1(type, null, hostContextDev.ancestorInfo);
---
> validateDOMNesting(type, null, hostContextDev.ancestorInfo);
9089,9090c8594,8595
< var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type, null);
< validateDOMNesting$1(null, string, ownAncestorInfo);
---
> var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
> validateDOMNesting(null, string, ownAncestorInfo);
9095,9096c8600,8601
< precacheFiberNode$1(internalInstanceHandle, domElement);
< updateFiberProps$1(domElement, props);
---
> precacheFiberNode(internalInstanceHandle, domElement);
> updateFiberProps(domElement, props);
9114,9115c8619,8620
< var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type, null);
< validateDOMNesting$1(null, string, ownAncestorInfo);
---
> var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
> validateDOMNesting(null, string, ownAncestorInfo);
9122c8627
< return type === 'textarea' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && typeof props.dangerouslySetInnerHTML.__html === 'string';
---
> return type === 'textarea' || type === 'option' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
9132c8637
< validateDOMNesting$1(null, text, hostContextDev.ancestorInfo);
---
> validateDOMNesting(null, text, hostContextDev.ancestorInfo);
9135c8640
< precacheFiberNode$1(internalInstanceHandle, textNode);
---
> precacheFiberNode(internalInstanceHandle, textNode);
9139d8643
< var now = now$1;
9141,9142c8645,8647
< var scheduleDeferredCallback = scheduleWork;
< var cancelDeferredCallback = cancelScheduledWork;
---
> var scheduleTimeout = setTimeout;
> var cancelTimeout = clearTimeout;
> var noTimeout = -1;
9165c8670
< updateFiberProps$1(domElement, newProps);
---
> updateFiberProps(domElement, newProps);
9182a8688
> var parentNode = void 0;
9184c8690,8691
< container.parentNode.insertBefore(child, container);
---
> parentNode = container.parentNode;
> parentNode.insertBefore(child, container);
9186c8693,8705
< container.appendChild(child);
---
> parentNode = container;
> parentNode.appendChild(child);
> }
> // This container might be used for a portal.
> // If something inside a portal is clicked, that click should bubble
> // through the React tree. However, on Mobile Safari the click would
> // never bubble through the *DOM* tree unless an ancestor with onclick
> // event exists. So we wouldn't see it and dispatch it.
> // This is why we ensure that containers have inline onclick defined.
> // https://github.com/facebook/react/issues/11918
> if (parentNode.onclick === null) {
> // TODO: This cast may not be sound for SVG, MathML or custom elements.
> trapClickOnNonInteractiveElement(parentNode);
9256c8775
< precacheFiberNode$1(internalInstanceHandle, instance);
---
> precacheFiberNode(internalInstanceHandle, instance);
9259c8778
< updateFiberProps$1(instance, props);
---
> updateFiberProps(instance, props);
9269c8788
< precacheFiberNode$1(internalInstanceHandle, textInstance);
---
> precacheFiberNode(internalInstanceHandle, textInstance);
9287c8806
< if (instance.nodeType === 1) {
---
> if (instance.nodeType === ELEMENT_NODE) {
9297c8816
< if (instance.nodeType === 1) {
---
> if (instance.nodeType === ELEMENT_NODE) {
9358a8878,8880
> // Track which interactions trigger each commit.
> var enableSchedulerTracking = true;
>
9437c8959
< var componentName = getComponentName(fiber) || 'Unknown';
---
> var componentName = getComponentName(fiber.type) || 'Unknown';
9456c8978
< var componentName = getComponentName(fiber) || 'Unknown';
---
> var componentName = getComponentName(fiber.type) || 'Unknown';
9465c8987
< var componentName = getComponentName(fiber) || 'Unknown';
---
> var componentName = getComponentName(fiber.type) || 'Unknown';
9674c9196
< var componentName = getComponentName(interruptedBy) || 'Unknown';
---
> var componentName = getComponentName(interruptedBy.type) || 'Unknown';
9803c9325
< warning_1(false, 'Unexpected pop.');
---
> warningWithoutStack$1(false, 'Unexpected pop.');
9810c9332
< warning_1(false, 'Unexpected Fiber popped.');
---
> warningWithoutStack$1(false, 'Unexpected Fiber popped.');
9840c9362
< warning_1(false, 'Expected an empty stack. Something was not reset properly.');
---
> warningWithoutStack$1(false, 'Expected an empty stack. Something was not reset properly.');
9858a9381,9385
> var emptyContextObject = {};
> {
> Object.freeze(emptyContextObject);
> }
>
9860c9387
< var contextStackCursor = createCursor(emptyObject_1);
---
> var contextStackCursor = createCursor(emptyContextObject);
9866c9393
< var previousContext = emptyObject_1;
---
> var previousContext = emptyContextObject;
9868,9870c9395,9396
< function getUnmaskedContext(workInProgress) {
< var hasOwnContext = isContextProvider(workInProgress);
< if (hasOwnContext) {
---
> function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {
> if (didPushOwnContextIfProvider && isContextProvider(Component)) {
9872c9398
< // we have already pushed its own child context on the stack. A context
---
> // we may have already pushed its own child context on the stack. A context
9890c9416
< return emptyObject_1;
---
> return emptyContextObject;
9907,9908c9433,9434
< var name = getComponentName(workInProgress) || 'Unknown';
< checkPropTypes_1(contextTypes, context, 'context', name, ReactDebugCurrentFiber.getCurrentFiberStackAddendum);
---
> var name = getComponentName(type) || 'Unknown';
> checkPropTypes_1(contextTypes, context, 'context', name, getCurrentFiberStackInDev);
9924,9929c9450,9452
< function isContextConsumer(fiber) {
< return fiber.tag === ClassComponent && fiber.type.contextTypes != null;
< }
<
< function isContextProvider(fiber) {
< return fiber.tag === ClassComponent && fiber.type.childContextTypes != null;
---
> function isContextProvider(type) {
> var childContextTypes = type.childContextTypes;
> return childContextTypes !== null && childContextTypes !== undefined;
9932,9936c9455
< function popContextProvider(fiber) {
< if (!isContextProvider(fiber)) {
< return;
< }
<
---
> function popContext(fiber) {
9947c9466
< !(contextStackCursor.current === emptyObject_1) ? invariant_1(false, 'Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(contextStackCursor.current === emptyContextObject) ? invariant(false, 'Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.') : void 0;
9953c9472
< function processChildContext(fiber, parentContext) {
---
> function processChildContext(fiber, type, parentContext) {
9955c9474
< var childContextTypes = fiber.type.childContextTypes;
---
> var childContextTypes = type.childContextTypes;
9961c9480
< var componentName = getComponentName(fiber) || 'Unknown';
---
> var componentName = getComponentName(type) || 'Unknown';
9965c9484
< warning_1(false, '%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.', componentName, componentName);
---
> warningWithoutStack$1(false, '%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.', componentName, componentName);
9973c9492
< ReactDebugCurrentFiber.setCurrentPhase('getChildContext');
---
> setCurrentPhase('getChildContext');
9979c9498
< ReactDebugCurrentFiber.setCurrentPhase(null);
---
> setCurrentPhase(null);
9982c9501
< !(contextKey in childContextTypes) ? invariant_1(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', getComponentName(fiber) || 'Unknown', contextKey) : void 0;
---
> !(contextKey in childContextTypes) ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', getComponentName(type) || 'Unknown', contextKey) : void 0;
9985c9504
< var name = getComponentName(fiber) || 'Unknown';
---
> var name = getComponentName(type) || 'Unknown';
9992c9511
< ReactDebugCurrentFiber.getCurrentFiberStackAddendum);
---
> getCurrentFiberStackInDev);
9999,10002d9517
< if (!isContextProvider(workInProgress)) {
< return false;
< }
<
10007c9522
< var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyObject_1;
---
> var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject;
10018c9533
< function invalidateContextProvider(workInProgress, didChange) {
---
> function invalidateContextProvider(workInProgress, type, didChange) {
10020c9535
< !instance ? invariant_1(false, 'Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !instance ? invariant(false, 'Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.') : void 0;
10026c9541
< var mergedContext = processChildContext(workInProgress, previousContext);
---
> var mergedContext = processChildContext(workInProgress, type, previousContext);
10045c9560
< !(isFiberMounted(fiber) && fiber.tag === ClassComponent) ? invariant_1(false, 'Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(isFiberMounted(fiber) && (fiber.tag === ClassComponent || fiber.tag === ClassComponentLazy)) ? invariant(false, 'Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.') : void 0;
10048,10067c9563,9663
< while (node.tag !== HostRoot) {
< if (isContextProvider(node)) {
< return node.stateNode.__reactInternalMemoizedMergedChildContext;
< }
< var parent = node.return;
< !parent ? invariant_1(false, 'Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.') : void 0;
< node = parent;
< }
< return node.stateNode.context;
< }
<
< // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
< // Math.pow(2, 30) - 1
< // 0b111111111111111111111111111111
< var MAX_SIGNED_31_BIT_INT = 1073741823;
<
< // TODO: Use an opaque type once ESLint et al support the syntax
<
<
< var NoWork = 0;
---
> do {
> switch (node.tag) {
> case HostRoot:
> return node.stateNode.context;
> case ClassComponent:
> {
> var Component = node.type;
> if (isContextProvider(Component)) {
> return node.stateNode.__reactInternalMemoizedMergedChildContext;
> }
> break;
> }
> case ClassComponentLazy:
> {
> var _Component = getResultFromResolvedThenable(node.type);
> if (isContextProvider(_Component)) {
> return node.stateNode.__reactInternalMemoizedMergedChildContext;
> }
> break;
> }
> }
> node = node.return;
> } while (node !== null);
> invariant(false, 'Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.');
> }
>
> var onCommitFiberRoot = null;
> var onCommitFiberUnmount = null;
> var hasLoggedError = false;
>
> function catchErrors(fn) {
> return function (arg) {
> try {
> return fn(arg);
> } catch (err) {
> if (true && !hasLoggedError) {
> hasLoggedError = true;
> warningWithoutStack$1(false, 'React DevTools encountered an error: %s', err);
> }
> }
> };
> }
>
> var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';
>
> function injectInternals(internals) {
> if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
> // No DevTools
> return false;
> }
> var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
> if (hook.isDisabled) {
> // This isn't a real property on the hook, but it can be set to opt out
> // of DevTools integration and associated warnings and logs.
> // https://github.com/facebook/react/issues/3877
> return true;
> }
> if (!hook.supportsFiber) {
> {
> warningWithoutStack$1(false, 'The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://fb.me/react-devtools');
> }
> // DevTools exists, even though it doesn't support Fiber.
> return true;
> }
> try {
> var rendererID = hook.inject(internals);
> // We have successfully injected, so now it is safe to set up hooks.
> onCommitFiberRoot = catchErrors(function (root) {
> return hook.onCommitFiberRoot(rendererID, root);
> });
> onCommitFiberUnmount = catchErrors(function (fiber) {
> return hook.onCommitFiberUnmount(rendererID, fiber);
> });
> } catch (err) {
> // Catch all errors because it is unsafe to throw during initialization.
> {
> warningWithoutStack$1(false, 'React DevTools encountered an error: %s.', err);
> }
> }
> // DevTools exists
> return true;
> }
>
> function onCommitRoot(root) {
> if (typeof onCommitFiberRoot === 'function') {
> onCommitFiberRoot(root);
> }
> }
>
> function onCommitUnmount(fiber) {
> if (typeof onCommitFiberUnmount === 'function') {
> onCommitFiberUnmount(fiber);
> }
> }
>
> // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
> // Math.pow(2, 30) - 1
> // 0b111111111111111111111111111111
> var maxSigned31BitInt = 1073741823;
>
> var NoWork = 0;
10069c9665
< var Never = MAX_SIGNED_31_BIT_INT;
---
> var Never = maxSigned31BitInt;
10091a9688,9712
> var LOW_PRIORITY_EXPIRATION = 5000;
> var LOW_PRIORITY_BATCH_SIZE = 250;
>
> function computeAsyncExpiration(currentTime) {
> return computeExpirationBucket(currentTime, LOW_PRIORITY_EXPIRATION, LOW_PRIORITY_BATCH_SIZE);
> }
>
> // We intentionally set a higher expiration time for interactive updates in
> // dev than in production.
> //
> // If the main thread is being blocked so long that you hit the expiration,
> // it's a problem that could be solved with better scheduling.
> //
> // People will be more likely to notice this and fix it with the long
> // expiration time in development.
> //
> // In production we opt for better UX at the risk of masking scheduling
> // problems, by expiring fast.
> var HIGH_PRIORITY_EXPIRATION = 500;
> var HIGH_PRIORITY_BATCH_SIZE = 100;
>
> function computeInteractiveExpiration(currentTime) {
> return computeExpirationBucket(currentTime, HIGH_PRIORITY_EXPIRATION, HIGH_PRIORITY_BATCH_SIZE);
> }
>
10144a9766
> this.firstContextDependency = null;
10155a9778
> this.childExpirationTime = NoWork;
10161,10163c9784,9786
< this.actualStartTime = 0;
< this.selfBaseTime = 0;
< this.treeBaseTime = 0;
---
> this.actualStartTime = -1;
> this.selfBaseDuration = 0;
> this.treeBaseDuration = 0;
10196c9819,9829
< return !!(Component.prototype && Component.prototype.isReactComponent);
---
> var prototype = Component.prototype;
> return typeof prototype === 'object' && prototype !== null && typeof prototype.isReactComponent === 'object' && prototype.isReactComponent !== null;
> }
>
> function resolveLazyComponentTag(fiber, Component) {
> if (typeof Component === 'function') {
> return shouldConstruct(Component) ? ClassComponentLazy : FunctionalComponentLazy;
> } else if (Component !== undefined && Component !== null && Component.$$typeof) {
> return ForwardRefLazy;
> }
> return IndeterminateComponent;
10239c9872
< workInProgress.actualStartTime = 0;
---
> workInProgress.actualStartTime = -1;
10243c9876,9884
< workInProgress.expirationTime = expirationTime;
---
> // Don't touching the subtree's expiration time, which has not changed.
> workInProgress.childExpirationTime = current.childExpirationTime;
> if (pendingProps !== current.pendingProps) {
> // This fiber has new props.
> workInProgress.expirationTime = expirationTime;
> } else {
> // This fiber's props have not changed.
> workInProgress.expirationTime = current.expirationTime;
> }
10248a9890
> workInProgress.firstContextDependency = current.firstContextDependency;
10256,10257c9898,9899
< workInProgress.selfBaseTime = current.selfBaseTime;
< workInProgress.treeBaseTime = current.treeBaseTime;
---
> workInProgress.selfBaseDuration = current.selfBaseDuration;
> workInProgress.treeBaseDuration = current.treeBaseDuration;
10264a9907,9914
>
> if (enableProfilerTimer && isDevToolsPresent) {
> // Always collect profile timings when DevTools are present.
> // This enables DevTools to start capturing timing at any point–
> // Without some nodes in the tree having empty base times.
> mode |= ProfileMode;
> }
>
10285c9935
< switch (type) {
---
> getTag: switch (type) {
10298,10302c9948,9949
< case REACT_TIMEOUT_TYPE:
< fiberTag = TimeoutComponent;
< // Suspense does not require async, but its children should be strict
< // mode compatible.
< mode |= StrictMode;
---
> case REACT_PLACEHOLDER_TYPE:
> fiberTag = PlaceholderComponent;
10305,10306c9952,9985
< fiberTag = getFiberTagFromObjectType(type, owner);
< break;
---
> {
> if (typeof type === 'object' && type !== null) {
> switch (type.$$typeof) {
> case REACT_PROVIDER_TYPE:
> fiberTag = ContextProvider;
> break getTag;
> case REACT_CONTEXT_TYPE:
> // This is a consumer
> fiberTag = ContextConsumer;
> break getTag;
> case REACT_FORWARD_REF_TYPE:
> fiberTag = ForwardRef;
> break getTag;
> default:
> {
> if (typeof type.then === 'function') {
> fiberTag = IndeterminateComponent;
> break getTag;
> }
> }
> }
> }
> var info = '';
> {
> if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
> info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.';
> }
> var ownerName = owner ? getComponentName(owner.type) : null;
> if (ownerName) {
> info += '\n\nCheck the render method of `' + ownerName + '`.';
> }
> }
> invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info);
> }
10322,10349d10000
< function getFiberTagFromObjectType(type, owner) {
< var $$typeof = typeof type === 'object' && type !== null ? type.$$typeof : null;
<
< switch ($$typeof) {
< case REACT_PROVIDER_TYPE:
< return ContextProvider;
< case REACT_CONTEXT_TYPE:
< // This is a consumer
< return ContextConsumer;
< case REACT_FORWARD_REF_TYPE:
< return ForwardRef;
< default:
< {
< var info = '';
< {
< if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
< info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.';
< }
< var ownerName = owner ? getComponentName(owner) : null;
< if (ownerName) {
< info += '\n\nCheck the render method of `' + ownerName + '`.';
< }
< }
< invariant_1(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info);
< }
< }
< }
<
10359c10010
< invariant_1(false, 'Profiler must specify an "id" string and "onRender" function as props');
---
> warningWithoutStack$1(false, 'Profiler must specify an "id" string and "onRender" function as props');
10420a10072
> target.firstContextDependency = source.firstContextDependency;
10426a10079
> target.childExpirationTime = source.childExpirationTime;
10431,10432c10084,10085
< target.selfBaseTime = source.selfBaseTime;
< target.treeBaseTime = source.treeBaseTime;
---
> target.selfBaseDuration = source.selfBaseDuration;
> target.treeBaseDuration = source.treeBaseDuration;
10440a10094,10109
> function __getInteractionsRef() {
> return React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracking.__getInteractionsRef.apply(this, arguments);
> }
>
> function __getSubscriberRef() {
> return React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracking.__getSubscriberRef.apply(this, arguments);
> }
>
>
>
>
>
> function unstable_getThreadID() {
> return React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracking.getThreadID.apply(this, arguments);
> }
>
10443a10113,10125
> // The following attributes are only used by interaction tracking builds.
> // They enable interactions to be associated with their async work,
> // And expose interaction metadata to the React DevTools Profiler plugin.
> // Note that these attributes are only defined when the enableSchedulerTracking flag is enabled.
>
>
> // Exported FiberRoot type includes all properties,
> // To avoid requiring potentially error-prone :any casts throughout the project.
> // Profiling properties are only safe to access in profiling builds (when enableSchedulerTracking is true).
> // The types are defined separately within this file to ensure they stay in sync.
> // (We don't have to use an inline :any cast when enableSchedulerTracking is disabled.)
>
>
10448,10487d10129
< var root = {
< current: uninitializedFiber,
< containerInfo: containerInfo,
< pendingChildren: null,
<
< earliestPendingTime: NoWork,
< latestPendingTime: NoWork,
< earliestSuspendedTime: NoWork,
< latestSuspendedTime: NoWork,
< latestPingedTime: NoWork,
<
< pendingCommitExpirationTime: NoWork,
< finishedWork: null,
< context: null,
< pendingContext: null,
< hydrate: hydrate,
< remainingExpirationTime: NoWork,
< firstBatch: null,
< nextScheduledRoot: null
< };
< uninitializedFiber.stateNode = root;
< return root;
< }
<
< var onCommitFiberRoot = null;
< var onCommitFiberUnmount = null;
< var hasLoggedError = false;
<
< function catchErrors(fn) {
< return function (arg) {
< try {
< return fn(arg);
< } catch (err) {
< if (true && !hasLoggedError) {
< hasLoggedError = true;
< warning_1(false, 'React DevTools encountered an error: %s', err);
< }
< }
< };
< }
10489,10521c10131,10185
< function injectInternals(internals) {
< if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
< // No DevTools
< return false;
< }
< var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
< if (hook.isDisabled) {
< // This isn't a real property on the hook, but it can be set to opt out
< // of DevTools integration and associated warnings and logs.
< // https://github.com/facebook/react/issues/3877
< return true;
< }
< if (!hook.supportsFiber) {
< {
< warning_1(false, 'The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://fb.me/react-devtools');
< }
< // DevTools exists, even though it doesn't support Fiber.
< return true;
< }
< try {
< var rendererID = hook.inject(internals);
< // We have successfully injected, so now it is safe to set up hooks.
< onCommitFiberRoot = catchErrors(function (root) {
< return hook.onCommitFiberRoot(rendererID, root);
< });
< onCommitFiberUnmount = catchErrors(function (fiber) {
< return hook.onCommitFiberUnmount(rendererID, fiber);
< });
< } catch (err) {
< // Catch all errors because it is unsafe to throw during initialization.
< {
< warning_1(false, 'React DevTools encountered an error: %s.', err);
< }
---
> var root = void 0;
> if (enableSchedulerTracking) {
> root = {
> current: uninitializedFiber,
> containerInfo: containerInfo,
> pendingChildren: null,
>
> earliestPendingTime: NoWork,
> latestPendingTime: NoWork,
> earliestSuspendedTime: NoWork,
> latestSuspendedTime: NoWork,
> latestPingedTime: NoWork,
>
> didError: false,
>
> pendingCommitExpirationTime: NoWork,
> finishedWork: null,
> timeoutHandle: noTimeout,
> context: null,
> pendingContext: null,
> hydrate: hydrate,
> nextExpirationTimeToWorkOn: NoWork,
> expirationTime: NoWork,
> firstBatch: null,
> nextScheduledRoot: null,
>
> interactionThreadID: unstable_getThreadID(),
> memoizedInteractions: new Set(),
> pendingInteractionMap: new Map()
> };
> } else {
> root = {
> current: uninitializedFiber,
> containerInfo: containerInfo,
> pendingChildren: null,
>
> earliestPendingTime: NoWork,
> latestPendingTime: NoWork,
> earliestSuspendedTime: NoWork,
> latestSuspendedTime: NoWork,
> latestPingedTime: NoWork,
>
> didError: false,
>
> pendingCommitExpirationTime: NoWork,
> finishedWork: null,
> timeoutHandle: noTimeout,
> context: null,
> pendingContext: null,
> hydrate: hydrate,
> nextExpirationTimeToWorkOn: NoWork,
> expirationTime: NoWork,
> firstBatch: null,
> nextScheduledRoot: null
> };
10523,10525d10186
< // DevTools exists
< return true;
< }
10527,10531c10188
< function onCommitRoot(root) {
< if (typeof onCommitFiberRoot === 'function') {
< onCommitFiberRoot(root);
< }
< }
---
> uninitializedFiber.stateNode = root;
10533,10536c10190,10194
< function onCommitUnmount(fiber) {
< if (typeof onCommitFiberUnmount === 'function') {
< onCommitFiberUnmount(fiber);
< }
---
> // The reason for the way the Flow types are structured in this file,
> // Is to avoid needing :any casts everywhere interaction tracking fields are used.
> // Unfortunately that requires an :any cast for non-interaction tracking capable builds.
> // $FlowFixMe Remove this :any cast and replace it with something better.
> return root;
10578c10236
< throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
---
> throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
10645c10303
< componentNames.add(getComponentName(fiber) || 'Component');
---
> componentNames.add(getComponentName(fiber.type) || 'Component');
10658c10316
< var strictRootComponentStack = getStackAddendumByWorkInProgressFiber(strictRoot);
---
> var strictRootComponentStack = getStackByFiberInDevAndProd(strictRoot);
10660c10318
< warning_1(false, 'Unsafe lifecycle methods were found within a strict-mode tree:%s' + '\n\n%s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-strict-mode-warnings', strictRootComponentStack, lifecyclesWarningMesages.join('\n\n'));
---
> warningWithoutStack$1(false, 'Unsafe lifecycle methods were found within a strict-mode tree:%s' + '\n\n%s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-strict-mode-warnings', strictRootComponentStack, lifecyclesWarningMesages.join('\n\n'));
10685c10343
< uniqueNames.add(getComponentName(fiber) || 'Component');
---
> uniqueNames.add(getComponentName(fiber.type) || 'Component');
10699c10357
< _uniqueNames.add(getComponentName(fiber) || 'Component');
---
> _uniqueNames.add(getComponentName(fiber.type) || 'Component');
10713c10371
< _uniqueNames2.add(getComponentName(fiber) || 'Component');
---
> _uniqueNames2.add(getComponentName(fiber.type) || 'Component');
10746c10404
< warning_1(false, '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.');
---
> warningWithoutStack$1(false, '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.');
10793c10451
< warning_1(false, '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.');
---
> warningWithoutStack$1(false, '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.');
10817c10475
< uniqueNames.add(getComponentName(fiber) || 'Component');
---
> uniqueNames.add(getComponentName(fiber.type) || 'Component');
10822c10480
< var strictRootComponentStack = getStackAddendumByWorkInProgressFiber(strictRoot);
---
> var strictRootComponentStack = getStackByFiberInDevAndProd(strictRoot);
10824c10482
< warning_1(false, 'Legacy context API has been detected within a strict-mode tree: %s' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-strict-mode-warnings', strictRootComponentStack, sortedNames);
---
> warningWithoutStack$1(false, 'Legacy context API has been detected within a strict-mode tree: %s' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-strict-mode-warnings', strictRootComponentStack, sortedNames);
10839c10497,10499
< // TODO: Offscreen updates
---
> // TODO: Offscreen updates should never suspend. However, a promise that
> // suspended inside an offscreen subtree should be able to ping at the priority
> // of the outer render.
10842,10847c10502,10515
< if (enableSuspense) {
< // Update the latest and earliest pending times
< var earliestPendingTime = root.earliestPendingTime;
< if (earliestPendingTime === NoWork) {
< // No other pending updates.
< root.earliestPendingTime = root.latestPendingTime = expirationTime;
---
> // If there's a gap between completing a failed root and retrying it,
> // additional updates may be scheduled. Clear `didError`, in case the update
> // is sufficient to fix the error.
> root.didError = false;
>
> // Update the latest and earliest pending times
> var earliestPendingTime = root.earliestPendingTime;
> if (earliestPendingTime === NoWork) {
> // No other pending updates.
> root.earliestPendingTime = root.latestPendingTime = expirationTime;
> } else {
> if (earliestPendingTime > expirationTime) {
> // This is the earliest pending update.
> root.earliestPendingTime = expirationTime;
10849,10857c10517,10520
< if (earliestPendingTime > expirationTime) {
< // This is the earliest pending update.
< root.earliestPendingTime = expirationTime;
< } else {
< var latestPendingTime = root.latestPendingTime;
< if (latestPendingTime < expirationTime) {
< // This is the latest pending update
< root.latestPendingTime = expirationTime;
< }
---
> var latestPendingTime = root.latestPendingTime;
> if (latestPendingTime < expirationTime) {
> // This is the latest pending update
> root.latestPendingTime = expirationTime;
10860a10524
> findNextExpirationTimeToWorkOn(expirationTime, root);
10863,10873c10527,10528
< function markCommittedPriorityLevels(root, currentTime, earliestRemainingTime) {
< if (enableSuspense) {
< if (earliestRemainingTime === NoWork) {
< // Fast path. There's no remaining work. Clear everything.
< root.earliestPendingTime = NoWork;
< root.latestPendingTime = NoWork;
< root.earliestSuspendedTime = NoWork;
< root.latestSuspendedTime = NoWork;
< root.latestPingedTime = NoWork;
< return;
< }
---
> function markCommittedPriorityLevels(root, earliestRemainingTime) {
> root.didError = false;
10875,10887c10530,10552
< // Let's see if the previous latest known pending level was just flushed.
< var latestPendingTime = root.latestPendingTime;
< if (latestPendingTime !== NoWork) {
< if (latestPendingTime < earliestRemainingTime) {
< // We've flushed all the known pending levels.
< root.earliestPendingTime = root.latestPendingTime = NoWork;
< } else {
< var earliestPendingTime = root.earliestPendingTime;
< if (earliestPendingTime < earliestRemainingTime) {
< // We've flushed the earliest known pending level. Set this to the
< // latest pending time.
< root.earliestPendingTime = root.latestPendingTime;
< }
---
> if (earliestRemainingTime === NoWork) {
> // Fast path. There's no remaining work. Clear everything.
> root.earliestPendingTime = NoWork;
> root.latestPendingTime = NoWork;
> root.earliestSuspendedTime = NoWork;
> root.latestSuspendedTime = NoWork;
> root.latestPingedTime = NoWork;
> findNextExpirationTimeToWorkOn(NoWork, root);
> return;
> }
>
> // Let's see if the previous latest known pending level was just flushed.
> var latestPendingTime = root.latestPendingTime;
> if (latestPendingTime !== NoWork) {
> if (latestPendingTime < earliestRemainingTime) {
> // We've flushed all the known pending levels.
> root.earliestPendingTime = root.latestPendingTime = NoWork;
> } else {
> var earliestPendingTime = root.earliestPendingTime;
> if (earliestPendingTime < earliestRemainingTime) {
> // We've flushed the earliest known pending level. Set this to the
> // latest pending time.
> root.earliestPendingTime = root.latestPendingTime;
10889a10555
> }
10891,10893c10557,10559
< // Now let's handle the earliest remaining level in the whole tree. We need to
< // decide whether to treat it as a pending level or as suspended. Check
< // it falls within the range of known suspended levels.
---
> // Now let's handle the earliest remaining level in the whole tree. We need to
> // decide whether to treat it as a pending level or as suspended. Check
> // it falls within the range of known suspended levels.
10895,10915c10561,10568
< var earliestSuspendedTime = root.earliestSuspendedTime;
< if (earliestSuspendedTime === NoWork) {
< // There's no suspended work. Treat the earliest remaining level as a
< // pending level.
< markPendingPriorityLevel(root, earliestRemainingTime);
< return;
< }
<
< var latestSuspendedTime = root.latestSuspendedTime;
< if (earliestRemainingTime > latestSuspendedTime) {
< // The earliest remaining level is later than all the suspended work. That
< // means we've flushed all the suspended work.
< root.earliestSuspendedTime = NoWork;
< root.latestSuspendedTime = NoWork;
< root.latestPingedTime = NoWork;
<
< // There's no suspended work. Treat the earliest remaining level as a
< // pending level.
< markPendingPriorityLevel(root, earliestRemainingTime);
< return;
< }
---
> var earliestSuspendedTime = root.earliestSuspendedTime;
> if (earliestSuspendedTime === NoWork) {
> // There's no suspended work. Treat the earliest remaining level as a
> // pending level.
> markPendingPriorityLevel(root, earliestRemainingTime);
> findNextExpirationTimeToWorkOn(NoWork, root);
> return;
> }
10917,10922c10570,10583
< if (earliestRemainingTime < earliestSuspendedTime) {
< // The earliest remaining time is earlier than all the suspended work.
< // Treat it as a pending update.
< markPendingPriorityLevel(root, earliestRemainingTime);
< return;
< }
---
> var latestSuspendedTime = root.latestSuspendedTime;
> if (earliestRemainingTime > latestSuspendedTime) {
> // The earliest remaining level is later than all the suspended work. That
> // means we've flushed all the suspended work.
> root.earliestSuspendedTime = NoWork;
> root.latestSuspendedTime = NoWork;
> root.latestPingedTime = NoWork;
>
> // There's no suspended work. Treat the earliest remaining level as a
> // pending level.
> markPendingPriorityLevel(root, earliestRemainingTime);
> findNextExpirationTimeToWorkOn(NoWork, root);
> return;
> }
10924,10925c10585,10590
< // The earliest remaining time falls within the range of known suspended
< // levels. We should treat this as suspended work.
---
> if (earliestRemainingTime < earliestSuspendedTime) {
> // The earliest remaining time is earlier than all the suspended work.
> // Treat it as a pending update.
> markPendingPriorityLevel(root, earliestRemainingTime);
> findNextExpirationTimeToWorkOn(NoWork, root);
> return;
10926a10592,10608
>
> // The earliest remaining time falls within the range of known suspended
> // levels. We should treat this as suspended work.
> findNextExpirationTimeToWorkOn(NoWork, root);
> }
>
> function hasLowerPriorityWork(root, erroredExpirationTime) {
> var latestPendingTime = root.latestPendingTime;
> var latestSuspendedTime = root.latestSuspendedTime;
> var latestPingedTime = root.latestPingedTime;
> return latestPendingTime !== NoWork && latestPendingTime > erroredExpirationTime || latestSuspendedTime !== NoWork && latestSuspendedTime > erroredExpirationTime || latestPingedTime !== NoWork && latestPingedTime > erroredExpirationTime;
> }
>
> function isPriorityLevelSuspended(root, expirationTime) {
> var earliestSuspendedTime = root.earliestSuspendedTime;
> var latestSuspendedTime = root.latestSuspendedTime;
> return earliestSuspendedTime !== NoWork && expirationTime >= earliestSuspendedTime && expirationTime <= latestSuspendedTime;
10930,10947c10612,10613
< if (enableSuspense) {
< // First, check the known pending levels and update them if needed.
< var earliestPendingTime = root.earliestPendingTime;
< var latestPendingTime = root.latestPendingTime;
< if (earliestPendingTime === suspendedTime) {
< if (latestPendingTime === suspendedTime) {
< // Both known pending levels were suspended. Clear them.
< root.earliestPendingTime = root.latestPendingTime = NoWork;
< } else {
< // The earliest pending level was suspended. Clear by setting it to the
< // latest pending level.
< root.earliestPendingTime = latestPendingTime;
< }
< } else if (latestPendingTime === suspendedTime) {
< // The latest pending level was suspended. Clear by setting it to the
< // latest pending level.
< root.latestPendingTime = earliestPendingTime;
< }
---
> root.didError = false;
> clearPing(root, suspendedTime);
10949,10953c10615,10625
< // Next, if we're working on the lowest known suspended level, clear the ping.
< // TODO: What if a promise suspends and pings before the root completes?
< var latestSuspendedTime = root.latestSuspendedTime;
< if (latestSuspendedTime === suspendedTime) {
< root.latestPingedTime = NoWork;
---
> // First, check the known pending levels and update them if needed.
> var earliestPendingTime = root.earliestPendingTime;
> var latestPendingTime = root.latestPendingTime;
> if (earliestPendingTime === suspendedTime) {
> if (latestPendingTime === suspendedTime) {
> // Both known pending levels were suspended. Clear them.
> root.earliestPendingTime = root.latestPendingTime = NoWork;
> } else {
> // The earliest pending level was suspended. Clear by setting it to the
> // latest pending level.
> root.earliestPendingTime = latestPendingTime;
10954a10627,10631
> } else if (latestPendingTime === suspendedTime) {
> // The latest pending level was suspended. Clear by setting it to the
> // latest pending level.
> root.latestPendingTime = earliestPendingTime;
> }
10956,10968c10633,10645
< // Finally, update the known suspended levels.
< var earliestSuspendedTime = root.earliestSuspendedTime;
< if (earliestSuspendedTime === NoWork) {
< // No other suspended levels.
< root.earliestSuspendedTime = root.latestSuspendedTime = suspendedTime;
< } else {
< if (earliestSuspendedTime > suspendedTime) {
< // This is the earliest suspended level.
< root.earliestSuspendedTime = suspendedTime;
< } else if (latestSuspendedTime < suspendedTime) {
< // This is the latest suspended level
< root.latestSuspendedTime = suspendedTime;
< }
---
> // Finally, update the known suspended levels.
> var earliestSuspendedTime = root.earliestSuspendedTime;
> var latestSuspendedTime = root.latestSuspendedTime;
> if (earliestSuspendedTime === NoWork) {
> // No other suspended levels.
> root.earliestSuspendedTime = root.latestSuspendedTime = suspendedTime;
> } else {
> if (earliestSuspendedTime > suspendedTime) {
> // This is the earliest suspended level.
> root.earliestSuspendedTime = suspendedTime;
> } else if (latestSuspendedTime < suspendedTime) {
> // This is the latest suspended level
> root.latestSuspendedTime = suspendedTime;
10970a10648,10649
>
> findNextExpirationTimeToWorkOn(suspendedTime, root);
10974,10981c10653,10660
< if (enableSuspense) {
< var latestSuspendedTime = root.latestSuspendedTime;
< if (latestSuspendedTime !== NoWork && latestSuspendedTime <= pingedTime) {
< var latestPingedTime = root.latestPingedTime;
< if (latestPingedTime === NoWork || latestPingedTime < pingedTime) {
< root.latestPingedTime = pingedTime;
< }
< }
---
> root.didError = false;
>
> // TODO: When we add back resuming, we need to ensure the progressed work
> // is thrown out and not reused during the restarted render. One way to
> // invalidate the progressed work is to restart at expirationTime + 1.
> var latestPingedTime = root.latestPingedTime;
> if (latestPingedTime === NoWork || latestPingedTime < pingedTime) {
> root.latestPingedTime = pingedTime;
10982a10662
> findNextExpirationTimeToWorkOn(pingedTime, root);
10985,10992c10665,10672
< function findNextPendingPriorityLevel(root) {
< if (enableSuspense) {
< var earliestSuspendedTime = root.earliestSuspendedTime;
< var earliestPendingTime = root.earliestPendingTime;
< if (earliestSuspendedTime === NoWork) {
< // Fast path. There's no suspended work.
< return earliestPendingTime;
< }
---
> function clearPing(root, completedTime) {
> // TODO: Track whether the root was pinged during the render phase. If so,
> // we need to make sure we don't lose track of it.
> var latestPingedTime = root.latestPingedTime;
> if (latestPingedTime !== NoWork && latestPingedTime <= completedTime) {
> root.latestPingedTime = NoWork;
> }
> }
10994,10997c10674,10675
< // First, check if there's known pending work.
< if (earliestPendingTime !== NoWork) {
< return earliestPendingTime;
< }
---
> function findEarliestOutstandingPriorityLevel(root, renderExpirationTime) {
> var earliestExpirationTime = renderExpirationTime;
10999,11003c10677,10710
< // Finally, if a suspended level was pinged, work on that. Otherwise there's
< // nothing to work on.
< return root.latestPingedTime;
< } else {
< return root.current.expirationTime;
---
> var earliestPendingTime = root.earliestPendingTime;
> var earliestSuspendedTime = root.earliestSuspendedTime;
> if (earliestExpirationTime === NoWork || earliestPendingTime !== NoWork && earliestPendingTime < earliestExpirationTime) {
> earliestExpirationTime = earliestPendingTime;
> }
> if (earliestExpirationTime === NoWork || earliestSuspendedTime !== NoWork && earliestSuspendedTime < earliestExpirationTime) {
> earliestExpirationTime = earliestSuspendedTime;
> }
> return earliestExpirationTime;
> }
>
> function findNextExpirationTimeToWorkOn(completedExpirationTime, root) {
> var earliestSuspendedTime = root.earliestSuspendedTime;
> var latestSuspendedTime = root.latestSuspendedTime;
> var earliestPendingTime = root.earliestPendingTime;
> var latestPingedTime = root.latestPingedTime;
>
> // Work on the earliest pending time. Failing that, work on the latest
> // pinged time.
> var nextExpirationTimeToWorkOn = earliestPendingTime !== NoWork ? earliestPendingTime : latestPingedTime;
>
> // If there is no pending or pinted work, check if there's suspended work
> // that's lower priority than what we just completed.
> if (nextExpirationTimeToWorkOn === NoWork && (completedExpirationTime === NoWork || latestSuspendedTime > completedExpirationTime)) {
> // The lowest priority suspended work is the work most likely to be
> // committed next. Let's start rendering it again, so that if it times out,
> // it's ready to commit.
> nextExpirationTimeToWorkOn = latestSuspendedTime;
> }
>
> var expirationTime = nextExpirationTimeToWorkOn;
> if (expirationTime !== NoWork && earliestSuspendedTime !== NoWork && earliestSuspendedTime < expirationTime) {
> // Expire using the earliest known expiration time.
> expirationTime = earliestSuspendedTime;
11004a10712,10714
>
> root.nextExpirationTimeToWorkOn = nextExpirationTimeToWorkOn;
> root.expirationTime = expirationTime;
11107d10816
< expirationTime: NoWork,
11123d10831
< expirationTime: currentQueue.expirationTime,
11155c10863
< function appendUpdateToQueue(queue, update, expirationTime) {
---
> function appendUpdateToQueue(queue, update) {
11164,11168d10871
< if (queue.expirationTime === NoWork || queue.expirationTime > expirationTime) {
< // The incoming update has the earliest expiration of any update in the
< // queue. Update the queue's expiration time.
< queue.expirationTime = expirationTime;
< }
11171c10874
< function enqueueUpdate(fiber, update, expirationTime) {
---
> function enqueueUpdate(fiber, update) {
11207c10910
< appendUpdateToQueue(queue1, update, expirationTime);
---
> appendUpdateToQueue(queue1, update);
11214,11215c10917,10918
< appendUpdateToQueue(queue1, update, expirationTime);
< appendUpdateToQueue(queue2, update, expirationTime);
---
> appendUpdateToQueue(queue1, update);
> appendUpdateToQueue(queue2, update);
11219c10922
< appendUpdateToQueue(queue1, update, expirationTime);
---
> appendUpdateToQueue(queue1, update);
11226,11227c10929,10930
< if (fiber.tag === ClassComponent && (currentlyProcessingQueue === queue1 || queue2 !== null && currentlyProcessingQueue === queue2) && !didWarnUpdateInsideUpdate) {
< warning_1(false, '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.');
---
> if ((fiber.tag === ClassComponent || fiber.tag === ClassComponentLazy) && (currentlyProcessingQueue === queue1 || queue2 !== null && currentlyProcessingQueue === queue2) && !didWarnUpdateInsideUpdate) {
> warningWithoutStack$1(false, '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.');
11233c10936
< function enqueueCapturedUpdate(workInProgress, update, renderExpirationTime) {
---
> function enqueueCapturedUpdate(workInProgress, update) {
11254,11258d10956
< if (workInProgressQueue.expirationTime === NoWork || workInProgressQueue.expirationTime > renderExpirationTime) {
< // The incoming update has the earliest expiration of any update in the
< // queue. Update the queue's expiration time.
< workInProgressQueue.expirationTime = renderExpirationTime;
< }
11330,11334d11027
< if (queue.expirationTime === NoWork || queue.expirationTime > renderExpirationTime) {
< // Insufficient priority. Bailout.
< return;
< }
<
11446d11138
< queue.expirationTime = newExpirationTime;
11447a11140,11147
> // Set the remaining expiration time to be whatever is remaining in the queue.
> // This should be fine because the only two other things that contribute to
> // expiration time are props and context. We're already in the middle of the
> // begin phase by the time we start processing the queue, so we've already
> // dealt with the props. Context in components that specify
> // shouldComponentUpdate is tricky; but we'll have to account for
> // that regardless.
> workInProgress.expirationTime = newExpirationTime;
11456c11156
< !(typeof callback === 'function') ? invariant_1(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', callback) : void 0;
---
> !(typeof callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', callback) : void 0;
11484c11184
< var effect = finishedQueue.firstEffect;
---
> commitUpdateEffects(finishedQueue.firstEffect, instance);
11485a11186,11191
>
> commitUpdateEffects(finishedQueue.firstCapturedEffect, instance);
> finishedQueue.firstCapturedEffect = finishedQueue.lastCapturedEffect = null;
> }
>
> function commitUpdateEffects(effect, instance) {
11494,11504d11199
<
< effect = finishedQueue.firstCapturedEffect;
< finishedQueue.firstCapturedEffect = finishedQueue.lastCapturedEffect = null;
< while (effect !== null) {
< var _callback4 = effect.callback;
< if (_callback4 !== null) {
< effect.callback = null;
< callCallback(_callback4, instance);
< }
< effect = effect.nextEffect;
< }
11513c11208
< stack: getStackAddendumByWorkInProgressFiber(source)
---
> stack: getStackByFiberInDevAndProd(source)
11517d11211
< var providerCursor = createCursor(null);
11519d11212
< var changedBitsCursor = createCursor(0);
11527c11220,11232
< function pushProvider(providerFiber) {
---
> var currentlyRenderingFiber = null;
> var lastContextDependency = null;
> var lastContextWithAllBitsObserved = null;
>
> function resetContextDependences() {
> // This is called right before React yields execution, to ensure `readContext`
> // cannot be called outside the render phase.
> currentlyRenderingFiber = null;
> lastContextDependency = null;
> lastContextWithAllBitsObserved = null;
> }
>
> function pushProvider(providerFiber, nextValue) {
11531d11235
< push(changedBitsCursor, context._changedBits, providerFiber);
11533d11236
< push(providerCursor, providerFiber, providerFiber);
11535,11536c11238
< context._currentValue = providerFiber.pendingProps.value;
< context._changedBits = providerFiber.stateNode;
---
> context._currentValue = nextValue;
11538c11240
< !(context._currentRenderer === undefined || context._currentRenderer === null || context._currentRenderer === rendererSigil) ? warning_1(false, 'Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.') : void 0;
---
> !(context._currentRenderer === undefined || context._currentRenderer === null || context._currentRenderer === rendererSigil) ? warningWithoutStack$1(false, 'Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.') : void 0;
11542d11243
< push(changedBitsCursor, context._changedBits2, providerFiber);
11544d11244
< push(providerCursor, providerFiber, providerFiber);
11546,11547c11246
< context._currentValue2 = providerFiber.pendingProps.value;
< context._changedBits2 = providerFiber.stateNode;
---
> context._currentValue2 = nextValue;
11549c11248
< !(context._currentRenderer2 === undefined || context._currentRenderer2 === null || context._currentRenderer2 === rendererSigil) ? warning_1(false, 'Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.') : void 0;
---
> !(context._currentRenderer2 === undefined || context._currentRenderer2 === null || context._currentRenderer2 === rendererSigil) ? warningWithoutStack$1(false, 'Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.') : void 0;
11556d11254
< var changedBits = changedBitsCursor.current;
11559d11256
< pop(providerCursor, providerFiber);
11561d11257
< pop(changedBitsCursor, providerFiber);
11566d11261
< context._changedBits = changedBits;
11569d11263
< context._changedBits2 = changedBits;
11573,11574c11267,11384
< function getContextCurrentValue(context) {
< return isPrimaryRenderer ? context._currentValue : context._currentValue2;
---
> function calculateChangedBits(context, newValue, oldValue) {
> // Use Object.is to compare the new context value to the old value. Inlined
> // Object.is polyfill.
> // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
> if (oldValue === newValue && (oldValue !== 0 || 1 / oldValue === 1 / newValue) || oldValue !== oldValue && newValue !== newValue // eslint-disable-line no-self-compare
> ) {
> // No change
> return 0;
> } else {
> var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : maxSigned31BitInt;
>
> {
> !((changedBits & maxSigned31BitInt) === changedBits) ? warning$1(false, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits) : void 0;
> }
> return changedBits | 0;
> }
> }
>
> function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) {
> var fiber = workInProgress.child;
> if (fiber !== null) {
> // Set the return pointer of the child to the work-in-progress fiber.
> fiber.return = workInProgress;
> }
> while (fiber !== null) {
> var nextFiber = void 0;
>
> // Visit this fiber.
> var dependency = fiber.firstContextDependency;
> if (dependency !== null) {
> do {
> // Check if the context matches.
> if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {
> // Match! Schedule an update on this fiber.
>
> if (fiber.tag === ClassComponent || fiber.tag === ClassComponentLazy) {
> // Schedule a force update on the work-in-progress.
> var update = createUpdate(renderExpirationTime);
> update.tag = ForceUpdate;
> // TODO: Because we don't have a work-in-progress, this will add the
> // update to the current fiber, too, which means it will persist even if
> // this render is thrown away. Since it's a race condition, not sure it's
> // worth fixing.
> enqueueUpdate(fiber, update);
> }
>
> if (fiber.expirationTime === NoWork || fiber.expirationTime > renderExpirationTime) {
> fiber.expirationTime = renderExpirationTime;
> }
> var alternate = fiber.alternate;
> if (alternate !== null && (alternate.expirationTime === NoWork || alternate.expirationTime > renderExpirationTime)) {
> alternate.expirationTime = renderExpirationTime;
> }
> // Update the child expiration time of all the ancestors, including
> // the alternates.
> var node = fiber.return;
> while (node !== null) {
> alternate = node.alternate;
> if (node.childExpirationTime === NoWork || node.childExpirationTime > renderExpirationTime) {
> node.childExpirationTime = renderExpirationTime;
> if (alternate !== null && (alternate.childExpirationTime === NoWork || alternate.childExpirationTime > renderExpirationTime)) {
> alternate.childExpirationTime = renderExpirationTime;
> }
> } else if (alternate !== null && (alternate.childExpirationTime === NoWork || alternate.childExpirationTime > renderExpirationTime)) {
> alternate.childExpirationTime = renderExpirationTime;
> } else {
> // Neither alternate was updated, which means the rest of the
> // ancestor path already has sufficient priority.
> break;
> }
> node = node.return;
> }
> }
> nextFiber = fiber.child;
> dependency = dependency.next;
> } while (dependency !== null);
> } else if (fiber.tag === ContextProvider) {
> // Don't scan deeper if this is a matching provider
> nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
> } else {
> // Traverse down.
> nextFiber = fiber.child;
> }
>
> if (nextFiber !== null) {
> // Set the return pointer of the child to the work-in-progress fiber.
> nextFiber.return = fiber;
> } else {
> // No child. Traverse to next sibling.
> nextFiber = fiber;
> while (nextFiber !== null) {
> if (nextFiber === workInProgress) {
> // We're back to the root of this subtree. Exit.
> nextFiber = null;
> break;
> }
> var sibling = nextFiber.sibling;
> if (sibling !== null) {
> // Set the return pointer of the sibling to the work-in-progress fiber.
> sibling.return = nextFiber.return;
> nextFiber = sibling;
> break;
> }
> // No more siblings. Traverse up.
> nextFiber = nextFiber.return;
> }
> }
> fiber = nextFiber;
> }
> }
>
> function prepareToReadContext(workInProgress, renderExpirationTime) {
> currentlyRenderingFiber = workInProgress;
> lastContextDependency = null;
> lastContextWithAllBitsObserved = null;
>
> // Reset the work-in-progress list
> workInProgress.firstContextDependency = null;
11577,11578c11387,11417
< function getContextChangedBits(context) {
< return isPrimaryRenderer ? context._changedBits : context._changedBits2;
---
> function readContext(context, observedBits) {
> if (lastContextWithAllBitsObserved === context) {
> // Nothing to do. We already observe everything in this context.
> } else if (observedBits === false || observedBits === 0) {
> // Do not observe any updates.
> } else {
> var resolvedObservedBits = void 0; // Avoid deopting on observable arguments or heterogeneous types.
> if (typeof observedBits !== 'number' || observedBits === maxSigned31BitInt) {
> // Observe all updates.
> lastContextWithAllBitsObserved = context;
> resolvedObservedBits = maxSigned31BitInt;
> } else {
> resolvedObservedBits = observedBits;
> }
>
> var contextItem = {
> context: context,
> observedBits: resolvedObservedBits,
> next: null
> };
>
> if (lastContextDependency === null) {
> !(currentlyRenderingFiber !== null) ? invariant(false, 'Context.unstable_read(): Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps.') : void 0;
> // This is the first dependency in the list
> currentlyRenderingFiber.firstContextDependency = lastContextDependency = contextItem;
> } else {
> // Append a new context item.
> lastContextDependency = lastContextDependency.next = contextItem;
> }
> }
> return isPrimaryRenderer ? context._currentValue : context._currentValue2;
11588c11427
< !(c !== NO_CONTEXT) ? invariant_1(false, 'Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(c !== NO_CONTEXT) ? invariant(false, 'Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.') : void 0;
11655a11495
> var profilerStartTime = -1;
11665,11711c11505
< commitTime = now();
< }
<
< /**
< * The "actual" render time is total time required to render the descendants of a Profiler component.
< * This time is stored as a stack, since Profilers can be nested.
< * This time is started during the "begin" phase and stopped during the "complete" phase.
< * It is paused (and accumulated) in the event of an interruption or an aborted render.
< */
<
< var fiberStack$1 = void 0;
<
< {
< fiberStack$1 = [];
< }
<
< var timerPausedAt = 0;
< var totalElapsedPauseTime = 0;
<
< function checkActualRenderTimeStackEmpty() {
< if (!enableProfilerTimer) {
< return;
< }
< {
< !(fiberStack$1.length === 0) ? warning_1(false, 'Expected an empty stack. Something was not reset properly.') : void 0;
< }
< }
<
< function markActualRenderTimeStarted(fiber) {
< if (!enableProfilerTimer) {
< return;
< }
< {
< fiberStack$1.push(fiber);
< }
<
< fiber.actualDuration = now() - fiber.actualDuration - totalElapsedPauseTime;
< fiber.actualStartTime = now();
< }
<
< function pauseActualRenderTimerIfRunning() {
< if (!enableProfilerTimer) {
< return;
< }
< if (timerPausedAt === 0) {
< timerPausedAt = now();
< }
---
> commitTime = unstable_now();
11714c11508
< function recordElapsedActualRenderTime(fiber) {
---
> function startProfilerTimer(fiber) {
11718,11720d11511
< {
< !(fiber === fiberStack$1.pop()) ? warning_1(false, 'Unexpected Fiber (%s) popped.', getComponentName(fiber)) : void 0;
< }
11722,11723c11513
< fiber.actualDuration = now() - totalElapsedPauseTime - fiber.actualDuration;
< }
---
> profilerStartTime = unstable_now();
11725,11727c11515,11516
< function resetActualRenderTimer() {
< if (!enableProfilerTimer) {
< return;
---
> if (fiber.actualStartTime < 0) {
> fiber.actualStartTime = unstable_now();
11729d11517
< totalElapsedPauseTime = 0;
11732c11520
< function resumeActualRenderTimerIfPaused() {
---
> function stopProfilerTimerIfRunning(fiber) {
11736,11739c11524
< if (timerPausedAt > 0) {
< totalElapsedPauseTime += now() - timerPausedAt;
< timerPausedAt = 0;
< }
---
> profilerStartTime = -1;
11742,11751c11527
< /**
< * The "base" render time is the duration of the “begin” phase of work for a particular fiber.
< * This time is measured and stored on each fiber.
< * The time for all sibling fibers are accumulated and stored on their parent during the "complete" phase.
< * If a fiber bails out (sCU false) then its "base" timer is cancelled and the fiber is not updated.
< */
<
< var baseStartTime = -1;
<
< function recordElapsedBaseRenderTimeIfRunning(fiber) {
---
> function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
11755,11758d11530
< if (baseStartTime !== -1) {
< fiber.selfBaseTime = now() - baseStartTime;
< }
< }
11760,11766c11532,11536
< function startBaseRenderTimer() {
< if (!enableProfilerTimer) {
< return;
< }
< {
< if (baseStartTime !== -1) {
< warning_1(false, 'Cannot start base timer that is already running. ' + 'This error is likely caused by a bug in React. ' + 'Please file an issue.');
---
> if (profilerStartTime >= 0) {
> var elapsedTime = unstable_now() - profilerStartTime;
> fiber.actualDuration += elapsedTime;
> if (overrideBaseTime) {
> fiber.selfBaseDuration = elapsedTime;
11767a11538
> profilerStartTime = -1;
11769,11776d11539
< baseStartTime = now();
< }
<
< function stopBaseRenderTimerIfRunning() {
< if (!enableProfilerTimer) {
< return;
< }
< baseStartTime = -1;
11781a11545,11548
> // React.Component uses a shared frozen object by default.
> // We'll use it to determine whether we need to initialize legacy refs.
> var emptyRefsObject = new React.Component().refs;
>
11788a11556
> var didWarnAboutDirectlyAssigningPropsToState = void 0;
11794a11563
> didWarnAboutDirectlyAssigningPropsToState = new Set();
11806c11575
< warning_1(false, '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
---
> warningWithoutStack$1(false, '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
11810c11579
< warnOnUndefinedDerivedState = function (workInProgress, partialState) {
---
> warnOnUndefinedDerivedState = function (type, partialState) {
11812c11581
< var componentName = getComponentName(workInProgress) || 'Component';
---
> var componentName = getComponentName(type) || 'Component';
11815c11584
< warning_1(false, '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);
---
> warningWithoutStack$1(false, '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);
11828c11597
< invariant_1(false, '_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn\'t supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).');
---
> invariant(false, '_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn\'t supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).');
11834c11603
< function applyDerivedStateFromProps(workInProgress, getDerivedStateFromProps, nextProps) {
---
> function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {
11847c11616
< warnOnUndefinedDerivedState(workInProgress, partialState);
---
> warnOnUndefinedDerivedState(ctor, partialState);
11856c11625
< if (updateQueue !== null && updateQueue.expirationTime === NoWork) {
---
> if (updateQueue !== null && workInProgress.expirationTime === NoWork) {
11865c11634
< var currentTime = recalculateCurrentTime();
---
> var currentTime = requestCurrentTime();
11877,11878c11646,11647
< enqueueUpdate(fiber, update, expirationTime);
< scheduleWork$1(fiber, expirationTime);
---
> enqueueUpdate(fiber, update);
> scheduleWork(fiber, expirationTime);
11882c11651
< var currentTime = recalculateCurrentTime();
---
> var currentTime = requestCurrentTime();
11896,11897c11665,11666
< enqueueUpdate(fiber, update, expirationTime);
< scheduleWork$1(fiber, expirationTime);
---
> enqueueUpdate(fiber, update);
> scheduleWork(fiber, expirationTime);
11901c11670
< var currentTime = recalculateCurrentTime();
---
> var currentTime = requestCurrentTime();
11914,11915c11683,11684
< enqueueUpdate(fiber, update, expirationTime);
< scheduleWork$1(fiber, expirationTime);
---
> enqueueUpdate(fiber, update);
> scheduleWork(fiber, expirationTime);
11919c11688
< function checkShouldComponentUpdate(workInProgress, oldProps, newProps, oldState, newState, newContext) {
---
> function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextLegacyContext) {
11921d11689
< var ctor = workInProgress.type;
11924c11692
< var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, newContext);
---
> var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextLegacyContext);
11928c11696
< !(shouldUpdate !== undefined) ? warning_1(false, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(workInProgress) || 'Component') : void 0;
---
> !(shouldUpdate !== undefined) ? warningWithoutStack$1(false, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component') : void 0;
11935c11703
< return !shallowEqual_1(oldProps, newProps) || !shallowEqual_1(oldState, newState);
---
> return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);
11941c11709
< function checkClassInstance(workInProgress) {
---
> function checkClassInstance(workInProgress, ctor, newProps) {
11943d11710
< var type = workInProgress.type;
11945c11712
< var name = getComponentName(workInProgress) || 'Component';
---
> var name = getComponentName(ctor) || 'Component';
11949,11950c11716,11717
< if (type.prototype && typeof type.prototype.render === 'function') {
< warning_1(false, '%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
---
> if (ctor.prototype && typeof ctor.prototype.render === 'function') {
> warningWithoutStack$1(false, '%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
11952c11719
< warning_1(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
---
> warningWithoutStack$1(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
11957c11724
< !noGetInitialStateOnES6 ? warning_1(false, '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?', name) : void 0;
---
> !noGetInitialStateOnES6 ? warningWithoutStack$1(false, '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?', name) : void 0;
11959c11726
< !noGetDefaultPropsOnES6 ? warning_1(false, '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.', name) : void 0;
---
> !noGetDefaultPropsOnES6 ? warningWithoutStack$1(false, '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.', name) : void 0;
11961c11728
< !noInstancePropTypes ? warning_1(false, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name) : void 0;
---
> !noInstancePropTypes ? warningWithoutStack$1(false, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name) : void 0;
11963c11730
< !noInstanceContextTypes ? warning_1(false, 'contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name) : void 0;
---
> !noInstanceContextTypes ? warningWithoutStack$1(false, 'contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name) : void 0;
11965,11967c11732,11734
< !noComponentShouldUpdate ? warning_1(false, '%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.', name) : void 0;
< if (type.prototype && type.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
< warning_1(false, '%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(workInProgress) || 'A pure component');
---
> !noComponentShouldUpdate ? warningWithoutStack$1(false, '%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.', name) : void 0;
> if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
> warningWithoutStack$1(false, '%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component');
11970c11737
< !noComponentDidUnmount ? warning_1(false, '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name) : void 0;
---
> !noComponentDidUnmount ? warningWithoutStack$1(false, '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name) : void 0;
11972c11739
< !noComponentDidReceiveProps ? warning_1(false, '%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().', name) : void 0;
---
> !noComponentDidReceiveProps ? warningWithoutStack$1(false, '%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().', name) : void 0;
11974c11741
< !noComponentWillRecieveProps ? warning_1(false, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name) : void 0;
---
> !noComponentWillRecieveProps ? warningWithoutStack$1(false, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name) : void 0;
11976,11978c11743,11745
< !noUnsafeComponentWillRecieveProps ? warning_1(false, '%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name) : void 0;
< var hasMutatedProps = instance.props !== workInProgress.pendingProps;
< !(instance.props === undefined || !hasMutatedProps) ? warning_1(false, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name) : void 0;
---
> !noUnsafeComponentWillRecieveProps ? warningWithoutStack$1(false, '%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name) : void 0;
> var hasMutatedProps = instance.props !== newProps;
> !(instance.props === undefined || !hasMutatedProps) ? warningWithoutStack$1(false, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name) : void 0;
11980c11747
< !noInstanceDefaultProps ? warning_1(false, 'Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name) : void 0;
---
> !noInstanceDefaultProps ? warningWithoutStack$1(false, 'Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name) : void 0;
11982,11984c11749,11751
< if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(type)) {
< didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(type);
< warning_1(false, '%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(workInProgress));
---
> if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {
> didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);
> warningWithoutStack$1(false, '%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));
11988c11755
< !noInstanceGetDerivedStateFromProps ? warning_1(false, '%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name) : void 0;
---
> !noInstanceGetDerivedStateFromProps ? warningWithoutStack$1(false, '%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name) : void 0;
11990,11992c11757,11759
< !noInstanceGetDerivedStateFromCatch ? warning_1(false, '%s: getDerivedStateFromCatch() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name) : void 0;
< var noStaticGetSnapshotBeforeUpdate = typeof type.getSnapshotBeforeUpdate !== 'function';
< !noStaticGetSnapshotBeforeUpdate ? warning_1(false, '%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name) : void 0;
---
> !noInstanceGetDerivedStateFromCatch ? warningWithoutStack$1(false, '%s: getDerivedStateFromCatch() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name) : void 0;
> var noStaticGetSnapshotBeforeUpdate = typeof ctor.getSnapshotBeforeUpdate !== 'function';
> !noStaticGetSnapshotBeforeUpdate ? warningWithoutStack$1(false, '%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name) : void 0;
11995c11762
< warning_1(false, '%s.state: must be set to an object or null', name);
---
> warningWithoutStack$1(false, '%s.state: must be set to an object or null', name);
11998c11765
< !(typeof type.childContextTypes === 'object') ? warning_1(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name) : void 0;
---
> !(typeof ctor.childContextTypes === 'object') ? warningWithoutStack$1(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name) : void 0;
12013,12017c11780,11784
< function constructClassInstance(workInProgress, props, renderExpirationTime) {
< var ctor = workInProgress.type;
< var unmaskedContext = getUnmaskedContext(workInProgress);
< var needsContext = isContextConsumer(workInProgress);
< var context = needsContext ? getMaskedContext(workInProgress, unmaskedContext) : emptyObject_1;
---
> function constructClassInstance(workInProgress, ctor, props, renderExpirationTime) {
> var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
> var contextTypes = ctor.contextTypes;
> var isContextConsumer = contextTypes !== null && contextTypes !== undefined;
> var context = isContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;
12032c11799
< var componentName = getComponentName(workInProgress) || 'Component';
---
> var componentName = getComponentName(ctor) || 'Component';
12035c11802
< warning_1(false, '%s: Did not properly initialize state during construction. ' + 'Expected state to be an object, but it was %s.', componentName, instance.state === null ? 'null' : 'undefined');
---
> warningWithoutStack$1(false, '`%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.', componentName, instance.state === null ? 'null' : 'undefined', componentName);
12062c11829
< var _componentName = getComponentName(workInProgress) || 'Component';
---
> var _componentName = getComponentName(ctor) || 'Component';
12066c11833
< warning_1(false, '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\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks', _componentName, newApiName, foundWillMountName !== null ? '\n ' + foundWillMountName : '', foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '', foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '');
---
> warningWithoutStack$1(false, '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\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks', _componentName, newApiName, foundWillMountName !== null ? '\n ' + foundWillMountName : '', foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '', foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '');
12074c11841
< if (needsContext) {
---
> if (isContextConsumer) {
12096c11863
< warning_1(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress) || 'Component');
---
> warningWithoutStack$1(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');
12102c11869
< function callComponentWillReceiveProps(workInProgress, instance, newProps, newContext) {
---
> function callComponentWillReceiveProps(workInProgress, instance, newProps, nextLegacyContext) {
12106c11873
< instance.componentWillReceiveProps(newProps, newContext);
---
> instance.componentWillReceiveProps(newProps, nextLegacyContext);
12109c11876
< instance.UNSAFE_componentWillReceiveProps(newProps, newContext);
---
> instance.UNSAFE_componentWillReceiveProps(newProps, nextLegacyContext);
12115c11882
< var componentName = getComponentName(workInProgress) || 'Component';
---
> var componentName = getComponentName(workInProgress.type) || 'Component';
12118c11885
< warning_1(false, '%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
---
> warningWithoutStack$1(false, '%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
12126,12128c11893
< function mountClassInstance(workInProgress, renderExpirationTime) {
< var ctor = workInProgress.type;
<
---
> function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
12130c11895
< checkClassInstance(workInProgress);
---
> checkClassInstance(workInProgress, ctor, newProps);
12134,12135c11899
< var props = workInProgress.pendingProps;
< var unmaskedContext = getUnmaskedContext(workInProgress);
---
> var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
12137c11901
< instance.props = props;
---
> instance.props = newProps;
12139c11903
< instance.refs = emptyObject_1;
---
> instance.refs = emptyRefsObject;
12142a11907,11914
> if (instance.state === newProps) {
> var componentName = getComponentName(ctor) || 'Component';
> if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {
> didWarnAboutDirectlyAssigningPropsToState.add(componentName);
> warningWithoutStack$1(false, '%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.', componentName);
> }
> }
>
12156c11928
< processUpdateQueue(workInProgress, updateQueue, props, instance, renderExpirationTime);
---
> processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
12160c11932
< var getDerivedStateFromProps = workInProgress.type.getDerivedStateFromProps;
---
> var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
12162c11934
< applyDerivedStateFromProps(workInProgress, getDerivedStateFromProps, props);
---
> applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
12174c11946
< processUpdateQueue(workInProgress, updateQueue, props, instance, renderExpirationTime);
---
> processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
12184,12185c11956
< function resumeMountClassInstance(workInProgress, renderExpirationTime) {
< var ctor = workInProgress.type;
---
> function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
12189d11959
< var newProps = workInProgress.pendingProps;
12193,12194c11963,11964
< var newUnmaskedContext = getUnmaskedContext(workInProgress);
< var newContext = getMaskedContext(workInProgress, newUnmaskedContext);
---
> var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
> var nextLegacyContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);
12206,12207c11976,11977
< if (oldProps !== newProps || oldContext !== newContext) {
< callComponentWillReceiveProps(workInProgress, instance, newProps, newContext);
---
> if (oldProps !== newProps || oldContext !== nextLegacyContext) {
> callComponentWillReceiveProps(workInProgress, instance, newProps, nextLegacyContext);
12230c12000
< applyDerivedStateFromProps(workInProgress, getDerivedStateFromProps, newProps);
---
> applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
12234c12004
< var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, oldProps, newProps, oldState, newState, newContext);
---
> var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextLegacyContext);
12269c12039
< instance.context = newContext;
---
> instance.context = nextLegacyContext;
12275,12276c12045
< function updateClassInstance(current, workInProgress, renderExpirationTime) {
< var ctor = workInProgress.type;
---
> function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) {
12280d12048
< var newProps = workInProgress.pendingProps;
12284,12285c12052,12053
< var newUnmaskedContext = getUnmaskedContext(workInProgress);
< var newContext = getMaskedContext(workInProgress, newUnmaskedContext);
---
> var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
> var nextLegacyContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);
12297,12298c12065,12066
< if (oldProps !== newProps || oldContext !== newContext) {
< callComponentWillReceiveProps(workInProgress, instance, newProps, newContext);
---
> if (oldProps !== newProps || oldContext !== nextLegacyContext) {
> callComponentWillReceiveProps(workInProgress, instance, newProps, nextLegacyContext);
12329c12097
< applyDerivedStateFromProps(workInProgress, getDerivedStateFromProps, newProps);
---
> applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
12333c12101
< var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, oldProps, newProps, oldState, newState, newContext);
---
> var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextLegacyContext);
12341c12109
< instance.componentWillUpdate(newProps, newState, newContext);
---
> instance.componentWillUpdate(newProps, newState, nextLegacyContext);
12344c12112
< instance.UNSAFE_componentWillUpdate(newProps, newState, newContext);
---
> instance.UNSAFE_componentWillUpdate(newProps, newState, nextLegacyContext);
12378c12146
< instance.context = newContext;
---
> instance.context = nextLegacyContext;
12383,12385d12150
< var getCurrentFiberStackAddendum$7 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
<
<
12386a12152
> var didWarnAboutGenerators = void 0;
12393a12160
> didWarnAboutGenerators = false;
12411c12178
< !(typeof child._store === 'object') ? invariant_1(false, 'React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(typeof child._store === 'object') ? invariant(false, 'React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.') : void 0;
12414c12181
< var currentComponentErrorInfo = 'Each child in an array or iterator should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.' + (getCurrentFiberStackAddendum$7() || '');
---
> var currentComponentErrorInfo = 'Each child in an array or iterator should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.' + getCurrentFiberStackInDev();
12420c12187
< warning_1(false, 'Each child in an array or iterator should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.%s', getCurrentFiberStackAddendum$7());
---
> warning$1(false, 'Each child in an array or iterator should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.');
12426c12193
< function coerceRef(returnFiber, current, element) {
---
> function coerceRef(returnFiber, current$$1, element) {
12431c12198
< var componentName = getComponentName(returnFiber) || 'Component';
---
> var componentName = getComponentName(returnFiber.type) || 'Component';
12433c12200
< warning_1(false, 'A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using createRef() instead.' + '\n%s' + '\n\nLearn more about using refs safely here:' + '\nhttps://fb.me/react-strict-mode-string-ref', mixedRef, getStackAddendumByWorkInProgressFiber(returnFiber));
---
> warningWithoutStack$1(false, 'A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using createRef() instead.' + '\n%s' + '\n\nLearn more about using refs safely here:' + '\nhttps://fb.me/react-strict-mode-string-ref', mixedRef, getStackByFiberInDevAndProd(returnFiber));
12444c12211
< !(ownerFiber.tag === ClassComponent) ? invariant_1(false, 'Stateless function components cannot have refs.') : void 0;
---
> !(ownerFiber.tag === ClassComponent || ownerFiber.tag === ClassComponentLazy) ? invariant(false, 'Stateless function components cannot have refs.') : void 0;
12447c12214
< !inst ? invariant_1(false, 'Missing owner for string ref %s. This error is likely caused by a bug in React. Please file an issue.', mixedRef) : void 0;
---
> !inst ? invariant(false, 'Missing owner for string ref %s. This error is likely caused by a bug in React. Please file an issue.', mixedRef) : void 0;
12450,12451c12217,12218
< if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {
< return current.ref;
---
> if (current$$1 !== null && current$$1.ref !== null && typeof current$$1.ref === 'function' && current$$1.ref._stringRef === stringRef) {
> return current$$1.ref;
12454c12221,12225
< var refs = inst.refs === emptyObject_1 ? inst.refs = {} : inst.refs;
---
> var refs = inst.refs;
> if (refs === emptyRefsObject) {
> // This is a lazy pooled frozen object, so we need to initialize.
> refs = inst.refs = {};
> }
12464,12465c12235,12236
< !(typeof mixedRef === 'string') ? invariant_1(false, 'Expected ref to be a function or a string.') : void 0;
< !element._owner ? invariant_1(false, 'Element ref was specified as a string (%s) but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a functional component\n2. You may be adding a ref to a component that was not created inside a component\'s render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information.', mixedRef) : void 0;
---
> !(typeof mixedRef === 'string') ? invariant(false, 'Expected ref to be a function, a string, an object returned by React.createRef(), or null.') : void 0;
> !element._owner ? invariant(false, 'Element ref was specified as a string (%s) but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a functional component\n2. You may be adding a ref to a component that was not created inside a component\'s render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information.', mixedRef) : void 0;
12475c12246
< addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + (getCurrentFiberStackAddendum$7() || '');
---
> addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + getCurrentFiberStackInDev();
12477c12248
< invariant_1(false, 'Objects are not valid as a React child (found: %s).%s', Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild, addendum);
---
> invariant(false, 'Objects are not valid as a React child (found: %s).%s', Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild, addendum);
12482c12253
< var currentComponentErrorInfo = 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.' + (getCurrentFiberStackAddendum$7() || '');
---
> var currentComponentErrorInfo = 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.' + getCurrentFiberStackInDev();
12489c12260
< warning_1(false, 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.%s', getCurrentFiberStackAddendum$7() || '');
---
> warning$1(false, 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');
12566,12568c12337,12339
< var current = newFiber.alternate;
< if (current !== null) {
< var oldIndex = current.index;
---
> var current$$1 = newFiber.alternate;
> if (current$$1 !== null) {
> var oldIndex = current$$1.index;
12593,12594c12364,12365
< function updateTextNode(returnFiber, current, textContent, expirationTime) {
< if (current === null || current.tag !== HostText) {
---
> function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {
> if (current$$1 === null || current$$1.tag !== HostText) {
12601c12372
< var existing = useFiber(current, textContent, expirationTime);
---
> var existing = useFiber(current$$1, textContent, expirationTime);
12607,12608c12378,12379
< function updateElement(returnFiber, current, element, expirationTime) {
< if (current !== null && current.type === element.type) {
---
> function updateElement(returnFiber, current$$1, element, expirationTime) {
> if (current$$1 !== null && current$$1.type === element.type) {
12610,12611c12381,12382
< var existing = useFiber(current, element.props, expirationTime);
< existing.ref = coerceRef(returnFiber, current, element);
---
> var existing = useFiber(current$$1, element.props, expirationTime);
> existing.ref = coerceRef(returnFiber, current$$1, element);
12621c12392
< created.ref = coerceRef(returnFiber, current, element);
---
> created.ref = coerceRef(returnFiber, current$$1, element);
12627,12628c12398,12399
< function updatePortal(returnFiber, current, portal, expirationTime) {
< if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
---
> function updatePortal(returnFiber, current$$1, portal, expirationTime) {
> if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {
12635c12406
< var existing = useFiber(current, portal.children || [], expirationTime);
---
> var existing = useFiber(current$$1, portal.children || [], expirationTime);
12641,12642c12412,12413
< function updateFragment(returnFiber, current, fragment, expirationTime, key) {
< if (current === null || current.tag !== Fragment) {
---
> function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {
> if (current$$1 === null || current$$1.tag !== Fragment) {
12649c12420
< var existing = useFiber(current, fragment, expirationTime);
---
> var existing = useFiber(current$$1, fragment, expirationTime);
12825c12596
< warning_1(false, '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 — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$7());
---
> warning$1(false, '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 — the behavior is unsupported and ' + 'could change in a future version.', key);
12978c12749
< !(typeof iteratorFn === 'function') ? invariant_1(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;
12980a12752,12760
> // We don't support rendering Generators because it's a mutation.
> // See https://github.com/facebook/react/issues/12995
> if (typeof Symbol === 'function' &&
> // $FlowFixMe Flow doesn't know about toStringTag
> newChildrenIterable[Symbol.toStringTag] === 'Generator') {
> !didWarnAboutGenerators ? warning$1(false, 'Using Generators 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. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;
> didWarnAboutGenerators = true;
> }
>
12983c12763
< !didWarnAboutMaps ? warning_1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$7()) : void 0;
---
> !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;
13001c12781
< !(newChildren != null) ? invariant_1(false, 'An iterable object provided no iterator.') : void 0;
---
> !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;
13255a13036
> case ClassComponentLazy:
13271c13052
< invariant_1(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');
---
> invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');
13286,13287c13067,13068
< function cloneChildFibers(current, workInProgress) {
< !(current === null || workInProgress.child === current.child) ? invariant_1(false, 'Resuming work not yet implemented.') : void 0;
---
> function cloneChildFibers(current$$1, workInProgress) {
> !(current$$1 === null || workInProgress.child === current$$1.child) ? invariant(false, 'Resuming work not yet implemented.') : void 0;
13463c13244
< invariant_1(false, 'Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.');
---
> invariant(false, 'Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.');
13480c13261
< invariant_1(false, 'Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.');
---
> invariant(false, 'Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.');
13570c13351,13387
< var getCurrentFiberStackAddendum$6 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
---
> function readLazyComponentType(thenable) {
> var status = thenable._reactStatus;
> switch (status) {
> case Resolved:
> var Component = thenable._reactResult;
> return Component;
> case Rejected:
> throw thenable._reactResult;
> case Pending:
> throw thenable;
> default:
> {
> thenable._reactStatus = Pending;
> thenable.then(function (resolvedValue) {
> if (thenable._reactStatus === Pending) {
> thenable._reactStatus = Resolved;
> if (typeof resolvedValue === 'object' && resolvedValue !== null) {
> // If the `default` property is not empty, assume it's the result
> // of an async import() and use that. Otherwise, use the
> // resolved value itself.
> var defaultExport = resolvedValue.default;
> resolvedValue = defaultExport !== undefined && defaultExport !== null ? defaultExport : resolvedValue;
> } else {
> resolvedValue = resolvedValue;
> }
> thenable._reactResult = resolvedValue;
> }
> }, function (error) {
> if (thenable._reactStatus === Pending) {
> thenable._reactStatus = Rejected;
> thenable._reactResult = error;
> }
> });
> throw thenable;
> }
> }
> }
13571a13389
> var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;
13583,13589c13401,13402
< // TODO: Remove this and use reconcileChildrenAtExpirationTime directly.
< function reconcileChildren(current, workInProgress, nextChildren) {
< reconcileChildrenAtExpirationTime(current, workInProgress, nextChildren, workInProgress.expirationTime);
< }
<
< function reconcileChildrenAtExpirationTime(current, workInProgress, nextChildren, renderExpirationTime) {
< if (current === null) {
---
> function reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime) {
> if (current$$1 === null) {
13602c13415
< workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderExpirationTime);
---
> workInProgress.child = reconcileChildFibers(workInProgress, current$$1.child, nextChildren, renderExpirationTime);
13606,13608c13419,13420
< function updateForwardRef(current, workInProgress) {
< var render = workInProgress.type.render;
< var nextProps = workInProgress.pendingProps;
---
> function updateForwardRef(current$$1, workInProgress, type, nextProps, renderExpirationTime) {
> var render = type.render;
13614c13426
< var currentRef = current !== null ? current.ref : null;
---
> var currentRef = current$$1 !== null ? current$$1.ref : null;
13616c13428
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
---
> return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
13622,13623c13434,13435
< ReactCurrentOwner.current = workInProgress;
< ReactDebugCurrentFiber.setCurrentPhase('render');
---
> ReactCurrentOwner$3.current = workInProgress;
> setCurrentPhase('render');
13625c13437
< ReactDebugCurrentFiber.setCurrentPhase(null);
---
> setCurrentPhase(null);
13628c13440
< reconcileChildren(current, workInProgress, nextChildren);
---
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
13633c13445
< function updateFragment(current, workInProgress) {
---
> function updateFragment(current$$1, workInProgress, renderExpirationTime) {
13635,13641c13447
< if (hasContextChanged()) {
< // Normally we can bail out on props equality but if context has changed
< // we don't do the bailout and we have to reuse existing props instead.
< } else if (workInProgress.memoizedProps === nextChildren) {
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< reconcileChildren(current, workInProgress, nextChildren);
---
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
13646c13452
< function updateMode(current, workInProgress) {
---
> function updateMode(current$$1, workInProgress, renderExpirationTime) {
13648,13654c13454
< if (hasContextChanged()) {
< // Normally we can bail out on props equality but if context has changed
< // we don't do the bailout and we have to reuse existing props instead.
< } else if (nextChildren === null || workInProgress.memoizedProps === nextChildren) {
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< reconcileChildren(current, workInProgress, nextChildren);
---
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
13659,13660c13459
< function updateProfiler(current, workInProgress) {
< var nextProps = workInProgress.pendingProps;
---
> function updateProfiler(current$$1, workInProgress, renderExpirationTime) {
13664,13666c13463
< if (workInProgress.memoizedProps === nextProps) {
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
---
> var nextProps = workInProgress.pendingProps;
13668c13465
< reconcileChildren(current, workInProgress, nextChildren);
---
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
13673c13470
< function markRef(current, workInProgress) {
---
> function markRef(current$$1, workInProgress) {
13675c13472
< if (current === null && ref !== null || current !== null && current.ref !== ref) {
---
> if (current$$1 === null && ref !== null || current$$1 !== null && current$$1.ref !== ref) {
13681,13696c13478,13479
< function updateFunctionalComponent(current, workInProgress) {
< var fn = workInProgress.type;
< var nextProps = workInProgress.pendingProps;
<
< if (hasContextChanged()) {
< // Normally we can bail out on props equality but if context has changed
< // we don't do the bailout and we have to reuse existing props instead.
< } else {
< if (workInProgress.memoizedProps === nextProps) {
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< // TODO: consider bringing fn.shouldComponentUpdate() back.
< // It used to be here.
< }
<
< var unmaskedContext = getUnmaskedContext(workInProgress);
---
> function updateFunctionalComponent(current$$1, workInProgress, Component, nextProps, renderExpirationTime) {
> var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);
13700c13483
<
---
> prepareToReadContext(workInProgress, renderExpirationTime);
13702,13705c13485,13488
< ReactCurrentOwner.current = workInProgress;
< ReactDebugCurrentFiber.setCurrentPhase('render');
< nextChildren = fn(nextProps, context);
< ReactDebugCurrentFiber.setCurrentPhase(null);
---
> ReactCurrentOwner$3.current = workInProgress;
> setCurrentPhase('render');
> nextChildren = Component(nextProps, context);
> setCurrentPhase(null);
13706a13490
>
13709c13493
< reconcileChildren(current, workInProgress, nextChildren);
---
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
13714c13498
< function updateClassComponent(current, workInProgress, renderExpirationTime) {
---
> function updateClassComponent(current$$1, workInProgress, Component, nextProps, renderExpirationTime) {
13718c13502,13510
< var hasContext = pushContextProvider(workInProgress);
---
> var hasContext = void 0;
> if (isContextProvider(Component)) {
> hasContext = true;
> pushContextProvider(workInProgress);
> } else {
> hasContext = false;
> }
> prepareToReadContext(workInProgress, renderExpirationTime);
>
13720c13512
< if (current === null) {
---
> if (current$$1 === null) {
13723,13725c13515,13516
< constructClassInstance(workInProgress, workInProgress.pendingProps, renderExpirationTime);
< mountClassInstance(workInProgress, renderExpirationTime);
<
---
> constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
> mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
13729c13520
< shouldUpdate = resumeMountClassInstance(workInProgress, renderExpirationTime);
---
> shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
13732c13523
< shouldUpdate = updateClassInstance(current, workInProgress, renderExpirationTime);
---
> shouldUpdate = updateClassInstance(current$$1, workInProgress, Component, nextProps, renderExpirationTime);
13734c13525
< return finishClassComponent(current, workInProgress, shouldUpdate, hasContext, renderExpirationTime);
---
> return finishClassComponent(current$$1, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime);
13737c13528
< function finishClassComponent(current, workInProgress, shouldUpdate, hasContext, renderExpirationTime) {
---
> function finishClassComponent(current$$1, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime) {
13739c13530
< markRef(current, workInProgress);
---
> markRef(current$$1, workInProgress);
13746c13537
< invalidateContextProvider(workInProgress, false);
---
> invalidateContextProvider(workInProgress, Component, false);
13749c13540
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
---
> return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
13752d13542
< var ctor = workInProgress.type;
13756c13546
< ReactCurrentOwner.current = workInProgress;
---
> ReactCurrentOwner$3.current = workInProgress;
13758c13548
< if (didCaptureError && (!enableGetDerivedStateFromCatch || typeof ctor.getDerivedStateFromCatch !== 'function')) {
---
> if (didCaptureError && (!enableGetDerivedStateFromCatch || typeof Component.getDerivedStateFromCatch !== 'function')) {
13767c13557
< stopBaseRenderTimerIfRunning();
---
> stopProfilerTimerIfRunning(workInProgress);
13771c13561
< ReactDebugCurrentFiber.setCurrentPhase('render');
---
> setCurrentPhase('render');
13776c13566
< ReactDebugCurrentFiber.setCurrentPhase(null);
---
> setCurrentPhase(null);
13782c13572
< if (didCaptureError) {
---
> if (current$$1 !== null && didCaptureError) {
13785c13575
< reconcileChildrenAtExpirationTime(current, workInProgress, null, renderExpirationTime);
---
> reconcileChildren(current$$1, workInProgress, null, renderExpirationTime);
13791c13581
< reconcileChildrenAtExpirationTime(current, workInProgress, nextChildren, renderExpirationTime);
---
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
13799c13589
< invalidateContextProvider(workInProgress, true);
---
> invalidateContextProvider(workInProgress, Component, true);
13816c13606
< function updateHostRoot(current, workInProgress, renderExpirationTime) {
---
> function updateHostRoot(current$$1, workInProgress, renderExpirationTime) {
13819,13858c13609,13645
< if (updateQueue !== null) {
< var nextProps = workInProgress.pendingProps;
< var prevState = workInProgress.memoizedState;
< var prevChildren = prevState !== null ? prevState.element : null;
< processUpdateQueue(workInProgress, updateQueue, nextProps, null, renderExpirationTime);
< var nextState = workInProgress.memoizedState;
< // Caution: React DevTools currently depends on this property
< // being called "element".
< var nextChildren = nextState.element;
<
< if (nextChildren === prevChildren) {
< // If the state is the same as before, that's a bailout because we had
< // no work that expires at this time.
< resetHydrationState();
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< var root = workInProgress.stateNode;
< if ((current === null || current.child === null) && root.hydrate && enterHydrationState(workInProgress)) {
< // If we don't have any current children this might be the first pass.
< // We always try to hydrate. If this isn't a hydration pass there won't
< // be any children to hydrate which is effectively the same thing as
< // not hydrating.
<
< // This is a bit of a hack. We track the host root as a placement to
< // know that we're currently in a mounting state. That way isMounted
< // works as expected. We must reset this before committing.
< // TODO: Delete this when we delete isMounted and findDOMNode.
< workInProgress.effectTag |= Placement;
<
< // Ensure that children mount into this root without tracking
< // side-effects. This ensures that we don't store Placement effects on
< // nodes that will be hydrated.
< workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
< } else {
< // Otherwise reset hydration state in case we aborted and resumed another
< // root.
< resetHydrationState();
< reconcileChildren(current, workInProgress, nextChildren);
< }
< return workInProgress.child;
---
> !(updateQueue !== null) ? invariant(false, 'If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.') : void 0;
> var nextProps = workInProgress.pendingProps;
> var prevState = workInProgress.memoizedState;
> var prevChildren = prevState !== null ? prevState.element : null;
> processUpdateQueue(workInProgress, updateQueue, nextProps, null, renderExpirationTime);
> var nextState = workInProgress.memoizedState;
> // Caution: React DevTools currently depends on this property
> // being called "element".
> var nextChildren = nextState.element;
> if (nextChildren === prevChildren) {
> // If the state is the same as before, that's a bailout because we had
> // no work that expires at this time.
> resetHydrationState();
> return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
> }
> var root = workInProgress.stateNode;
> if ((current$$1 === null || current$$1.child === null) && root.hydrate && enterHydrationState(workInProgress)) {
> // If we don't have any current children this might be the first pass.
> // We always try to hydrate. If this isn't a hydration pass there won't
> // be any children to hydrate which is effectively the same thing as
> // not hydrating.
>
> // This is a bit of a hack. We track the host root as a placement to
> // know that we're currently in a mounting state. That way isMounted
> // works as expected. We must reset this before committing.
> // TODO: Delete this when we delete isMounted and findDOMNode.
> workInProgress.effectTag |= Placement;
>
> // Ensure that children mount into this root without tracking
> // side-effects. This ensures that we don't store Placement effects on
> // nodes that will be hydrated.
> workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
> } else {
> // Otherwise reset hydration state in case we aborted and resumed another
> // root.
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
> resetHydrationState();
13860,13862c13647
< resetHydrationState();
< // If there is no update queue, that's a bailout because the root has no props.
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
---
> return workInProgress.child;
13865c13650
< function updateHostComponent(current, workInProgress, renderExpirationTime) {
---
> function updateHostComponent(current$$1, workInProgress, renderExpirationTime) {
13868c13653
< if (current === null) {
---
> if (current$$1 === null) {
13873d13657
< var memoizedProps = workInProgress.memoizedProps;
13875,13891c13659
< var prevProps = current !== null ? current.memoizedProps : null;
<
< if (hasContextChanged()) {
< // Normally we can bail out on props equality but if context has changed
< // we don't do the bailout and we have to reuse existing props instead.
< } else if (memoizedProps === nextProps) {
< var isHidden = workInProgress.mode & AsyncMode && shouldDeprioritizeSubtree(type, nextProps);
< if (isHidden) {
< // Before bailing out, make sure we've deprioritized a hidden component.
< workInProgress.expirationTime = Never;
< }
< if (!isHidden || renderExpirationTime !== Never) {
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< // If we're rendering a hidden node at hidden priority, don't bailout. The
< // parent is complete, but the children may not be.
< }
---
> var prevProps = current$$1 !== null ? current$$1.memoizedProps : null;
13902c13670
< } else if (prevProps && shouldSetTextContent(type, prevProps)) {
---
> } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {
13908c13676
< markRef(current, workInProgress);
---
> markRef(current$$1, workInProgress);
13912c13680
< // Down-prioritize the children.
---
> // Schedule this fiber to re-render at offscreen priority. Then bailout.
13914d13681
< // Bailout and come back to this fiber later.
13919c13686
< reconcileChildren(current, workInProgress, nextChildren);
---
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
13924,13925c13691,13692
< function updateHostText(current, workInProgress) {
< if (current === null) {
---
> function updateHostText(current$$1, workInProgress) {
> if (current$$1 === null) {
13935,13937c13702,13719
< function mountIndeterminateComponent(current, workInProgress, renderExpirationTime) {
< !(current === null) ? invariant_1(false, 'An indeterminate component should never have mounted. This error is likely caused by a bug in React. Please file an issue.') : void 0;
< var fn = workInProgress.type;
---
> function resolveDefaultProps(Component, baseProps) {
> if (Component && Component.defaultProps) {
> // Resolve default props. Taken from ReactElement
> var props = _assign({}, baseProps);
> var defaultProps = Component.defaultProps;
> for (var propName in defaultProps) {
> if (props[propName] === undefined) {
> props[propName] = defaultProps[propName];
> }
> }
> return props;
> }
> return baseProps;
> }
>
> function mountIndeterminateComponent(current$$1, workInProgress, Component, renderExpirationTime) {
> !(current$$1 === null) ? invariant(false, 'An indeterminate component should never have mounted. This error is likely caused by a bug in React. Please file an issue.') : void 0;
>
13939c13721,13747
< var unmaskedContext = getUnmaskedContext(workInProgress);
---
> if (typeof Component === 'object' && Component !== null && typeof Component.then === 'function') {
> Component = readLazyComponentType(Component);
> var resolvedTag = workInProgress.tag = resolveLazyComponentTag(workInProgress, Component);
> var resolvedProps = resolveDefaultProps(Component, props);
> switch (resolvedTag) {
> case FunctionalComponentLazy:
> {
> return updateFunctionalComponent(current$$1, workInProgress, Component, resolvedProps, renderExpirationTime);
> }
> case ClassComponentLazy:
> {
> return updateClassComponent(current$$1, workInProgress, Component, resolvedProps, renderExpirationTime);
> }
> case ForwardRefLazy:
> {
> return updateForwardRef(current$$1, workInProgress, Component, resolvedProps, renderExpirationTime);
> }
> default:
> {
> // This message intentionally doesn't metion ForwardRef because the
> // fact that it's a separate type of work is an implementation detail.
> invariant(false, 'Element type is invalid. Received a promise that resolves to: %s. Promise elements must resolve to a class or function.', Component);
> }
> }
> }
>
> var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);
13941a13750,13751
> prepareToReadContext(workInProgress, renderExpirationTime);
>
13945,13946c13755,13756
< if (fn.prototype && typeof fn.prototype.render === 'function') {
< var componentName = getComponentName(workInProgress) || 'Unknown';
---
> if (Component.prototype && typeof Component.prototype.render === 'function') {
> var componentName = getComponentName(Component) || 'Unknown';
13949c13759
< warning_1(false, "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);
---
> warningWithoutStack$1(false, "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);
13958,13959c13768,13769
< ReactCurrentOwner.current = workInProgress;
< value = fn(props, context);
---
> ReactCurrentOwner$3.current = workInProgress;
> value = Component(props, context);
13965,13966d13774
< var Component = workInProgress.type;
<
13969a13778,13788
> // Push context providers early to prevent context stack mismatches.
> // During mounting we don't know the child context yet as the instance doesn't exist.
> // We will invalidate the child context in finishClassComponent() right after rendering.
> var hasContext = false;
> if (isContextProvider(Component)) {
> hasContext = true;
> pushContextProvider(workInProgress);
> } else {
> hasContext = false;
> }
>
13974c13793
< applyDerivedStateFromProps(workInProgress, getDerivedStateFromProps, props);
---
> applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);
13977,13980d13795
< // Push context providers early to prevent context stack mismatches.
< // During mounting we don't know the child context yet as the instance doesn't exist.
< // We will invalidate the child context in finishClassComponent() right after rendering.
< var hasContext = pushContextProvider(workInProgress);
13982,13983c13797,13798
< mountClassInstance(workInProgress, renderExpirationTime);
< return finishClassComponent(current, workInProgress, true, hasContext, renderExpirationTime);
---
> mountClassInstance(workInProgress, Component, props, renderExpirationTime);
> return finishClassComponent(current$$1, workInProgress, Component, true, hasContext, renderExpirationTime);
13988,13991c13803,13804
< var _Component = workInProgress.type;
<
< if (_Component) {
< !!_Component.childContextTypes ? warning_1(false, '%s(...): childContextTypes cannot be defined on a functional component.', _Component.displayName || _Component.name || 'Component') : void 0;
---
> if (Component) {
> !!Component.childContextTypes ? warningWithoutStack$1(false, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0;
13995c13808
< var ownerName = ReactDebugCurrentFiber.getCurrentFiberOwnerName();
---
> var ownerName = getCurrentFiberOwnerNameInDevOrNull();
14007c13820
< warning_1(false, 'Stateless function components cannot be given refs. ' + 'Attempts to access this ref will fail.%s%s', info, ReactDebugCurrentFiber.getCurrentFiberStackAddendum());
---
> warning$1(false, 'Stateless function components cannot be given refs. ' + 'Attempts to access this ref will fail.%s', info);
14011,14012c13824,13825
< if (typeof fn.getDerivedStateFromProps === 'function') {
< var _componentName = getComponentName(workInProgress) || 'Unknown';
---
> if (typeof Component.getDerivedStateFromProps === 'function') {
> var _componentName = getComponentName(Component) || 'Unknown';
14015c13828
< warning_1(false, '%s: Stateless functional components do not support getDerivedStateFromProps.', _componentName);
---
> warningWithoutStack$1(false, '%s: Stateless functional components do not support getDerivedStateFromProps.', _componentName);
14020c13833
< reconcileChildren(current, workInProgress, value);
---
> reconcileChildren(current$$1, workInProgress, value, renderExpirationTime);
14026c13839
< function updateTimeoutComponent(current, workInProgress, renderExpirationTime) {
---
> function updatePlaceholderComponent(current$$1, workInProgress, renderExpirationTime) {
14029,14031d13841
< var prevProps = workInProgress.memoizedProps;
<
< var prevDidTimeout = workInProgress.memoizedState;
14036,14152c13846,13872
< var nextDidTimeout = !alreadyCaptured;
<
< if (hasContextChanged()) {
< // Normally we can bail out on props equality but if context has changed
< // we don't do the bailout and we have to reuse existing props instead.
< } else if (nextProps === prevProps && nextDidTimeout === prevDidTimeout) {
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
<
< var render = nextProps.children;
< var nextChildren = render(nextDidTimeout);
< workInProgress.memoizedProps = nextProps;
< workInProgress.memoizedState = nextDidTimeout;
< reconcileChildren(current, workInProgress, nextChildren);
< return workInProgress.child;
< } else {
< return null;
< }
< }
<
< function updatePortalComponent(current, workInProgress, renderExpirationTime) {
< pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
< var nextChildren = workInProgress.pendingProps;
< if (hasContextChanged()) {
< // Normally we can bail out on props equality but if context has changed
< // we don't do the bailout and we have to reuse existing props instead.
< } else if (workInProgress.memoizedProps === nextChildren) {
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
<
< if (current === null) {
< // Portals are special because we don't append the children during mount
< // but at commit. Therefore we need to track insertions which the normal
< // flow doesn't do during mount. This doesn't happen at the root because
< // the root always starts with a "current" with a null child.
< // TODO: Consider unifying this with how the root works.
< workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
< memoizeProps(workInProgress, nextChildren);
< } else {
< reconcileChildren(current, workInProgress, nextChildren);
< memoizeProps(workInProgress, nextChildren);
< }
< return workInProgress.child;
< }
<
< function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) {
< var fiber = workInProgress.child;
< if (fiber !== null) {
< // Set the return pointer of the child to the work-in-progress fiber.
< fiber.return = workInProgress;
< }
< while (fiber !== null) {
< var nextFiber = void 0;
< // Visit this fiber.
< switch (fiber.tag) {
< case ContextConsumer:
< // Check if the context matches.
< var observedBits = fiber.stateNode | 0;
< if (fiber.type === context && (observedBits & changedBits) !== 0) {
< // Update the expiration time of all the ancestors, including
< // the alternates.
< var node = fiber;
< while (node !== null) {
< var alternate = node.alternate;
< if (node.expirationTime === NoWork || node.expirationTime > renderExpirationTime) {
< node.expirationTime = renderExpirationTime;
< if (alternate !== null && (alternate.expirationTime === NoWork || alternate.expirationTime > renderExpirationTime)) {
< alternate.expirationTime = renderExpirationTime;
< }
< } else if (alternate !== null && (alternate.expirationTime === NoWork || alternate.expirationTime > renderExpirationTime)) {
< alternate.expirationTime = renderExpirationTime;
< } else {
< // Neither alternate was updated, which means the rest of the
< // ancestor path already has sufficient priority.
< break;
< }
< node = node.return;
< }
< // Don't scan deeper than a matching consumer. When we render the
< // consumer, we'll continue scanning from that point. This way the
< // scanning work is time-sliced.
< nextFiber = null;
< } else {
< // Traverse down.
< nextFiber = fiber.child;
< }
< break;
< case ContextProvider:
< // Don't scan deeper if this is a matching provider
< nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
< break;
< default:
< // Traverse down.
< nextFiber = fiber.child;
< break;
< }
< if (nextFiber !== null) {
< // Set the return pointer of the child to the work-in-progress fiber.
< nextFiber.return = fiber;
< } else {
< // No child. Traverse to next sibling.
< nextFiber = fiber;
< while (nextFiber !== null) {
< if (nextFiber === workInProgress) {
< // We're back to the root of this subtree. Exit.
< nextFiber = null;
< break;
< }
< var sibling = nextFiber.sibling;
< if (sibling !== null) {
< // Set the return pointer of the sibling to the work-in-progress fiber.
< sibling.return = nextFiber.return;
< nextFiber = sibling;
< break;
< }
< // No more siblings. Traverse up.
< nextFiber = nextFiber.return;
---
>
> var nextDidTimeout = void 0;
> if (current$$1 !== null && workInProgress.updateQueue !== null) {
> // We're outside strict mode. Something inside this Placeholder boundary
> // suspended during the last commit. Switch to the placholder.
> workInProgress.updateQueue = null;
> nextDidTimeout = true;
> // If we're recovering from an error, reconcile twice: first to delete
> // all the existing children.
> reconcileChildren(current$$1, workInProgress, null, renderExpirationTime);
> current$$1.child = null;
> // Now we can continue reconciling like normal. This has the effect of
> // remounting all children regardless of whether their their
> // identity matches.
> } else {
> nextDidTimeout = !alreadyCaptured;
> }
>
> if ((workInProgress.mode & StrictMode) !== NoEffect) {
> if (nextDidTimeout) {
> // If the timed-out view commits, schedule an update effect to record
> // the committed time.
> workInProgress.effectTag |= Update;
> } else {
> // The state node points to the time at which placeholder timed out.
> // We can clear it once we switch back to the normal children.
> workInProgress.stateNode = null;
14155c13875,13891
< fiber = nextFiber;
---
>
> // If the `children` prop is a function, treat it like a render prop.
> // TODO: This is temporary until we finalize a lower level API.
> var children = nextProps.children;
> var nextChildren = void 0;
> if (typeof children === 'function') {
> nextChildren = children(nextDidTimeout);
> } else {
> nextChildren = nextDidTimeout ? nextProps.fallback : children;
> }
>
> workInProgress.memoizedProps = nextProps;
> workInProgress.memoizedState = nextDidTimeout;
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
> return workInProgress.child;
> } else {
> return null;
14159c13895,13913
< function updateContextProvider(current, workInProgress, renderExpirationTime) {
---
> function updatePortalComponent(current$$1, workInProgress, renderExpirationTime) {
> pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
> var nextChildren = workInProgress.pendingProps;
> if (current$$1 === null) {
> // Portals are special because we don't append the children during mount
> // but at commit. Therefore we need to track insertions which the normal
> // flow doesn't do during mount. This doesn't happen at the root because
> // the root always starts with a "current" with a null child.
> // TODO: Consider unifying this with how the root works.
> workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
> memoizeProps(workInProgress, nextChildren);
> } else {
> reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
> memoizeProps(workInProgress, nextChildren);
> }
> return workInProgress.child;
> }
>
> function updateContextProvider(current$$1, workInProgress, renderExpirationTime) {
14165,14175d13918
< var canBailOnProps = true;
<
< if (hasContextChanged()) {
< canBailOnProps = false;
< // Normally we can bail out on props equality but if context has changed
< // we don't do the bailout and we have to reuse existing props instead.
< } else if (oldProps === newProps) {
< workInProgress.stateNode = 0;
< pushProvider(workInProgress);
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
14184c13927
< checkPropTypes_1(providerPropTypes, newProps, 'prop', 'Context.Provider', getCurrentFiberStackAddendum$6);
---
> checkPropTypes_1(providerPropTypes, newProps, 'prop', 'Context.Provider', getCurrentFiberStackInDev);
14188,14193c13931,13936
< var changedBits = void 0;
< if (oldProps === null) {
< // Initial render
< changedBits = MAX_SIGNED_31_BIT_INT;
< } else {
< if (oldProps.value === newProps.value) {
---
> pushProvider(workInProgress, newValue);
>
> if (oldProps !== null) {
> var oldValue = oldProps.value;
> var changedBits = calculateChangedBits(context, newValue, oldValue);
> if (changedBits === 0) {
14195,14198c13938,13939
< if (oldProps.children === newProps.children && canBailOnProps) {
< workInProgress.stateNode = 0;
< pushProvider(workInProgress);
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
---
> if (oldProps.children === newProps.children && !hasContextChanged()) {
> return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
14200d13940
< changedBits = 0;
14202,14232c13942,13944
< var oldValue = oldProps.value;
< // Use Object.is to compare the new context value to the old value.
< // Inlined Object.is polyfill.
< // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
< if (oldValue === newValue && (oldValue !== 0 || 1 / oldValue === 1 / newValue) || oldValue !== oldValue && newValue !== newValue // eslint-disable-line no-self-compare
< ) {
< // No change. Bailout early if children are the same.
< if (oldProps.children === newProps.children && canBailOnProps) {
< workInProgress.stateNode = 0;
< pushProvider(workInProgress);
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< changedBits = 0;
< } else {
< changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
< {
< !((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits) ? warning_1(false, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits) : void 0;
< }
< changedBits |= 0;
<
< if (changedBits === 0) {
< // No change. Bailout early if children are the same.
< if (oldProps.children === newProps.children && canBailOnProps) {
< workInProgress.stateNode = 0;
< pushProvider(workInProgress);
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< } else {
< propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);
< }
< }
---
> // The context value changed. Search for matching consumers and schedule
> // them to update.
> propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);
14236,14238d13947
< workInProgress.stateNode = changedBits;
< pushProvider(workInProgress);
<
14240c13949
< reconcileChildren(current, workInProgress, newChildren);
---
> reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);
14244c13953
< function updateContextConsumer(current, workInProgress, renderExpirationTime) {
---
> function updateContextConsumer(current$$1, workInProgress, renderExpirationTime) {
14247,14280d13955
< var oldProps = workInProgress.memoizedProps;
<
< var newValue = getContextCurrentValue(context);
< var changedBits = getContextChangedBits(context);
<
< if (hasContextChanged()) {
< // Normally we can bail out on props equality but if context has changed
< // we don't do the bailout and we have to reuse existing props instead.
< } else if (changedBits === 0 && oldProps === newProps) {
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< workInProgress.memoizedProps = newProps;
<
< var observedBits = newProps.unstable_observedBits;
< if (observedBits === undefined || observedBits === null) {
< // Subscribe to all changes by default
< observedBits = MAX_SIGNED_31_BIT_INT;
< }
< // Store the observedBits on the fiber's stateNode for quick access.
< workInProgress.stateNode = observedBits;
<
< if ((changedBits & observedBits) !== 0) {
< // Context change propagation stops at matching consumers, for time-
< // slicing. Continue the propagation here.
< propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);
< } else if (oldProps === newProps) {
< // Skip over a memoized parent with a bitmask bailout even
< // if we began working on it because of a deeper matching child.
< return bailoutOnAlreadyFinishedWork(current, workInProgress);
< }
< // There is no bailout on `children` equality because we expect people
< // to often pass a bound method as a child, but it may reference
< // `this.state` or `this.props` (and thus needs to re-render on `setState`).
<
14284c13959
< !(typeof render === 'function') ? warning_1(false, '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.') : void 0;
---
> !(typeof render === 'function') ? warningWithoutStack$1(false, '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.') : void 0;
14286a13962,13963
> prepareToReadContext(workInProgress, renderExpirationTime);
> var newValue = readContext(context, newProps.unstable_observedBits);
14289,14290c13966,13967
< ReactCurrentOwner.current = workInProgress;
< ReactDebugCurrentFiber.setCurrentPhase('render');
---
> ReactCurrentOwner$3.current = workInProgress;
> setCurrentPhase('render');
14292c13969
< ReactDebugCurrentFiber.setCurrentPhase(null);
---
> setCurrentPhase(null);
14297c13974,13975
< reconcileChildren(current, workInProgress, newChildren);
---
> reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);
> workInProgress.memoizedProps = newProps;
14320c13998
< function bailoutOnAlreadyFinishedWork(current, workInProgress) {
---
> function bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime) {
14323,14325c14001,14003
< if (enableProfilerTimer) {
< // Don't update "base" render times for bailouts.
< stopBaseRenderTimerIfRunning();
---
> if (current$$1 !== null) {
> // Reuse previous context list
> workInProgress.firstContextDependency = current$$1.firstContextDependency;
14328,14348d14005
< // TODO: We should ideally be able to bail out early if the children have no
< // more work to do. However, since we don't have a separation of this
< // Fiber's priority and its children yet - we don't know without doing lots
< // of the same work we do anyway. Once we have that separation we can just
< // bail out here if the children has no more work at this priority level.
< // if (workInProgress.priorityOfChildren <= priorityLevel) {
< // // If there are side-effects in these children that have not yet been
< // // committed we need to ensure that they get properly transferred up.
< // if (current && current.child !== workInProgress.child) {
< // reuseChildrenEffects(workInProgress, child);
< // }
< // return null;
< // }
<
< cloneChildFibers(current, workInProgress);
< return workInProgress.child;
< }
<
< function bailoutOnLowPriority(current, workInProgress) {
< cancelWorkTimer(workInProgress);
<
14351c14008
< stopBaseRenderTimerIfRunning();
---
> stopProfilerTimerIfRunning(workInProgress);
14354,14368c14011,14022
< // TODO: Handle HostComponent tags here as well and call pushHostContext()?
< // See PR 8590 discussion for context
< switch (workInProgress.tag) {
< case HostRoot:
< pushHostRootContext(workInProgress);
< break;
< case ClassComponent:
< pushContextProvider(workInProgress);
< break;
< case HostPortal:
< pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
< break;
< case ContextProvider:
< pushProvider(workInProgress);
< break;
---
> // Check if the children have any pending work.
> var childExpirationTime = workInProgress.childExpirationTime;
> if (childExpirationTime === NoWork || childExpirationTime > renderExpirationTime) {
> // The children don't have any work either. We can skip them.
> // TODO: Once we add back resuming, we should check if the children are
> // a work-in-progress set. If so, we need to transfer their effects.
> return null;
> } else {
> // This fiber doesn't have work, but its subtree does. Clone the child
> // fibers and continue.
> cloneChildFibers(current$$1, workInProgress);
> return workInProgress.child;
14370,14372d14023
< // TODO: What if this is currently in progress?
< // How can that happen? How is this not being cloned?
< return null;
14386,14389c14037,14081
< function beginWork(current, workInProgress, renderExpirationTime) {
< if (enableProfilerTimer) {
< if (workInProgress.mode & ProfileMode) {
< markActualRenderTimeStarted(workInProgress);
---
> function beginWork(current$$1, workInProgress, renderExpirationTime) {
> var updateExpirationTime = workInProgress.expirationTime;
> if (!hasContextChanged() && (updateExpirationTime === NoWork || updateExpirationTime > renderExpirationTime)) {
> // This fiber does not have any pending work. Bailout without entering
> // the begin phase. There's still some bookkeeping we that needs to be done
> // in this optimized path, mostly pushing stuff onto the stack.
> switch (workInProgress.tag) {
> case HostRoot:
> pushHostRootContext(workInProgress);
> resetHydrationState();
> break;
> case HostComponent:
> pushHostContext(workInProgress);
> break;
> case ClassComponent:
> {
> var Component = workInProgress.type;
> if (isContextProvider(Component)) {
> pushContextProvider(workInProgress);
> }
> break;
> }
> case ClassComponentLazy:
> {
> var thenable = workInProgress.type;
> var _Component = getResultFromResolvedThenable(thenable);
> if (isContextProvider(_Component)) {
> pushContextProvider(workInProgress);
> }
> break;
> }
> case HostPortal:
> pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
> break;
> case ContextProvider:
> {
> var newValue = workInProgress.memoizedProps.value;
> pushProvider(workInProgress, newValue);
> break;
> }
> case Profiler:
> if (enableProfilerTimer) {
> workInProgress.effectTag |= Update;
> }
> break;
14390a14083
> return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
14393,14395c14086,14087
< if (workInProgress.expirationTime === NoWork || workInProgress.expirationTime > renderExpirationTime) {
< return bailoutOnLowPriority(current, workInProgress);
< }
---
> // Before entering the begin phase, clear the expiration time.
> workInProgress.expirationTime = NoWork;
14399c14091,14094
< return mountIndeterminateComponent(current, workInProgress, renderExpirationTime);
---
> {
> var _Component3 = workInProgress.type;
> return mountIndeterminateComponent(current$$1, workInProgress, _Component3, renderExpirationTime);
> }
14401c14096,14109
< return updateFunctionalComponent(current, workInProgress);
---
> {
> var _Component4 = workInProgress.type;
> var _unresolvedProps = workInProgress.pendingProps;
> return updateFunctionalComponent(current$$1, workInProgress, _Component4, _unresolvedProps, renderExpirationTime);
> }
> case FunctionalComponentLazy:
> {
> var _thenable2 = workInProgress.type;
> var _Component5 = getResultFromResolvedThenable(_thenable2);
> var _unresolvedProps2 = workInProgress.pendingProps;
> var _child = updateFunctionalComponent(current$$1, workInProgress, _Component5, resolveDefaultProps(_Component5, _unresolvedProps2), renderExpirationTime);
> workInProgress.memoizedProps = _unresolvedProps2;
> return _child;
> }
14403c14111,14124
< return updateClassComponent(current, workInProgress, renderExpirationTime);
---
> {
> var _Component6 = workInProgress.type;
> var _unresolvedProps3 = workInProgress.pendingProps;
> return updateClassComponent(current$$1, workInProgress, _Component6, _unresolvedProps3, renderExpirationTime);
> }
> case ClassComponentLazy:
> {
> var _thenable3 = workInProgress.type;
> var _Component7 = getResultFromResolvedThenable(_thenable3);
> var _unresolvedProps4 = workInProgress.pendingProps;
> var _child2 = updateClassComponent(current$$1, workInProgress, _Component7, resolveDefaultProps(_Component7, _unresolvedProps4), renderExpirationTime);
> workInProgress.memoizedProps = _unresolvedProps4;
> return _child2;
> }
14405c14126
< return updateHostRoot(current, workInProgress, renderExpirationTime);
---
> return updateHostRoot(current$$1, workInProgress, renderExpirationTime);
14407c14128
< return updateHostComponent(current, workInProgress, renderExpirationTime);
---
> return updateHostComponent(current$$1, workInProgress, renderExpirationTime);
14409,14411c14130,14132
< return updateHostText(current, workInProgress);
< case TimeoutComponent:
< return updateTimeoutComponent(current, workInProgress, renderExpirationTime);
---
> return updateHostText(current$$1, workInProgress);
> case PlaceholderComponent:
> return updatePlaceholderComponent(current$$1, workInProgress, renderExpirationTime);
14413c14134
< return updatePortalComponent(current, workInProgress, renderExpirationTime);
---
> return updatePortalComponent(current$$1, workInProgress, renderExpirationTime);
14415c14136,14146
< return updateForwardRef(current, workInProgress);
---
> {
> var type = workInProgress.type;
> return updateForwardRef(current$$1, workInProgress, type, workInProgress.pendingProps, renderExpirationTime);
> }
> case ForwardRefLazy:
> var _thenable = workInProgress.type;
> var _Component2 = getResultFromResolvedThenable(_thenable);
> var unresolvedProps = workInProgress.pendingProps;
> var child = updateForwardRef(current$$1, workInProgress, _Component2, resolveDefaultProps(_Component2, unresolvedProps), renderExpirationTime);
> workInProgress.memoizedProps = unresolvedProps;
> return child;
14417c14148
< return updateFragment(current, workInProgress);
---
> return updateFragment(current$$1, workInProgress, renderExpirationTime);
14419c14150
< return updateMode(current, workInProgress);
---
> return updateMode(current$$1, workInProgress, renderExpirationTime);
14421c14152
< return updateProfiler(current, workInProgress);
---
> return updateProfiler(current$$1, workInProgress, renderExpirationTime);
14423c14154
< return updateContextProvider(current, workInProgress, renderExpirationTime);
---
> return updateContextProvider(current$$1, workInProgress, renderExpirationTime);
14425c14156
< return updateContextConsumer(current, workInProgress, renderExpirationTime);
---
> return updateContextConsumer(current$$1, workInProgress, renderExpirationTime);
14427c14158
< invariant_1(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');
---
> invariant(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');
14598,14603d14328
< if (enableProfilerTimer) {
< if (workInProgress.mode & ProfileMode) {
< recordElapsedActualRenderTime(workInProgress);
< }
< }
<
14606c14331,14332
< return null;
---
> case FunctionalComponentLazy:
> break;
14609,14611c14335,14347
< // We are leaving this subtree, so pop context if any.
< popContextProvider(workInProgress);
< return null;
---
> var Component = workInProgress.type;
> if (isContextProvider(Component)) {
> popContext(workInProgress);
> }
> break;
> }
> case ClassComponentLazy:
> {
> var _Component = getResultFromResolvedThenable(workInProgress.type);
> if (isContextProvider(_Component)) {
> popContext(workInProgress);
> }
> break;
14631c14367
< return null;
---
> break;
14642,14651c14378,14387
< // If we get updated because one of our children updated, we don't
< // have newProps so we'll have to reuse them.
< // TODO: Split the update API as separate for the props vs. children.
< // Even better would be if children weren't special cased at all tho.
< var instance = workInProgress.stateNode;
< var currentHostContext = getHostContext();
< // TODO: Experiencing an error where oldProps is null. Suggests a host
< // component is hitting the resume path. Figure out why. Possibly
< // related to `hidden`.
< var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext);
---
> if (oldProps !== newProps) {
> // If we get updated because one of our children updated, we don't
> // have newProps so we'll have to reuse them.
> // TODO: Split the update API as separate for the props vs. children.
> var instance = workInProgress.stateNode;
> var currentHostContext = getHostContext();
> // TODO: Experiencing an error where oldProps is null. Suggests a host
> // component is hitting the resume path. Figure out why. Possibly
> // related to `hidden`.
> var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext);
14653c14389,14390
< updateHostComponent$1(current, workInProgress, updatePayload, type, oldProps, newProps, rootContainerInstance, currentHostContext);
---
> updateHostComponent$1(current, workInProgress, updatePayload, type, oldProps, newProps, rootContainerInstance, currentHostContext);
> }
14660c14397
< !(workInProgress.stateNode !== null) ? invariant_1(false, 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(workInProgress.stateNode !== null) ? invariant(false, 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.') : void 0;
14662c14399
< return null;
---
> break;
14698c14435
< return null;
---
> break;
14710c14447
< !(workInProgress.stateNode !== null) ? invariant_1(false, 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(workInProgress.stateNode !== null) ? invariant(false, 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.') : void 0;
14712d14448
< return null;
14725c14461
< return null;
---
> break;
14728,14730c14464,14467
< return null;
< case TimeoutComponent:
< return null;
---
> case ForwardRefLazy:
> break;
> case PlaceholderComponent:
> break;
14732c14469
< return null;
---
> break;
14734c14471
< return null;
---
> break;
14736c14473
< return null;
---
> break;
14740c14477
< return null;
---
> break;
14744c14481
< return null;
---
> break;
14746c14483
< return null;
---
> break;
14749c14486
< invariant_1(false, 'An indeterminate component should have become determinate before completing. This error is likely caused by a bug in React. Please file an issue.');
---
> invariant(false, 'An indeterminate component should have become determinate before completing. This error is likely caused by a bug in React. Please file an issue.');
14752c14489
< invariant_1(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');
---
> invariant(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');
14753a14491,14492
>
> return null;
14773,14777d14511
< var suppressLogging = error && error.suppressReactErrorLogging;
< if (suppressLogging) {
< return;
< }
<
14784a14519,14537
> // Browsers support silencing uncaught errors by calling
> // `preventDefault()` in window `error` handler.
> // We record this information as an expando on the error.
>
> if (error != null && error._suppressLogging) {
> if (errorBoundaryFound && willRetry) {
> // The error is recoverable and was silenced.
> // Ignore it and don't print the stack addendum.
> // This is handy for testing error boundaries without noise.
> return;
> }
> // The error is fatal. Since the silencing might have
> // been accidental, we'll surface it anyway.
> // However, the browser would have silenced the original error
> // so we'll print it first, and then print the stack addendum.
> console.error(error);
> // For a more detailed description of this block, see:
> // https://github.com/facebook/react/pull/13384
> }
14809,14812c14562
< var invokeGuardedCallback$3 = ReactErrorUtils.invokeGuardedCallback;
< var hasCaughtError$1 = ReactErrorUtils.hasCaughtError;
< var clearCaughtError$1 = ReactErrorUtils.clearCaughtError;
<
---
> var emptyObject = {};
14823c14573
< stack = getStackAddendumByWorkInProgressFiber(source);
---
> stack = getStackByFiberInDevAndProd(source);
14827c14577
< componentName: source !== null ? getComponentName(source) : null,
---
> componentName: source !== null ? getComponentName(source.type) : null,
14838c14588
< capturedError.errorBoundaryName = getComponentName(boundary);
---
> capturedError.errorBoundaryName = getComponentName(boundary.type);
14846,14851c14596,14602
< // Prevent cycle if logCapturedError() throws.
< // A cycle may still occur if logCapturedError renders a component that throws.
< var suppressLogging = e && e.suppressReactErrorLogging;
< if (!suppressLogging) {
< console.error(e);
< }
---
> // This method must not throw, or React internal state will get messed up.
> // If console.error is overridden, or logCapturedError() shows a dialog that throws,
> // we want to report this error outside of the normal stack as a last resort.
> // https://github.com/facebook/react/issues/13188
> setTimeout(function () {
> throw e;
> });
14855,14858c14606,14609
< var callComponentWillUnmountWithTimer = function (current, instance) {
< startPhaseTimer(current, 'componentWillUnmount');
< instance.props = current.memoizedProps;
< instance.state = current.memoizedState;
---
> var callComponentWillUnmountWithTimer = function (current$$1, instance) {
> startPhaseTimer(current$$1, 'componentWillUnmount');
> instance.props = current$$1.memoizedProps;
> instance.state = current$$1.memoizedState;
14864c14615
< function safelyCallComponentWillUnmount(current, instance) {
---
> function safelyCallComponentWillUnmount(current$$1, instance) {
14866,14869c14617,14620
< invokeGuardedCallback$3(null, callComponentWillUnmountWithTimer, null, current, instance);
< if (hasCaughtError$1()) {
< var unmountError = clearCaughtError$1();
< captureCommitPhaseError(current, unmountError);
---
> invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance);
> if (hasCaughtError()) {
> var unmountError = clearCaughtError();
> captureCommitPhaseError(current$$1, unmountError);
14874,14875c14625,14626
< function safelyDetachRef(current) {
< var ref = current.ref;
---
> function safelyDetachRef(current$$1) {
> var ref = current$$1.ref;
14879,14882c14630,14633
< invokeGuardedCallback$3(null, ref, null, null);
< if (hasCaughtError$1()) {
< var refError = clearCaughtError$1();
< captureCommitPhaseError(current, refError);
---
> invokeGuardedCallback(null, ref, null, null);
> if (hasCaughtError()) {
> var refError = clearCaughtError();
> captureCommitPhaseError(current$$1, refError);
14891c14642
< function commitBeforeMutationLifeCycles(current, finishedWork) {
---
> function commitBeforeMutationLifeCycles(current$$1, finishedWork) {
14893a14645
> case ClassComponentLazy:
14896,14898c14648,14650
< if (current !== null) {
< var prevProps = current.memoizedProps;
< var prevState = current.memoizedState;
---
> if (current$$1 !== null) {
> var prevProps = current$$1.memoizedProps;
> var prevState = current$$1.memoizedState;
14908c14660
< warning_1(false, '%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork));
---
> warningWithoutStack$1(false, '%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));
14925c14677
< invariant_1(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
---
> invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
14930c14682
< function commitLifeCycles(finishedRoot, current, finishedWork, currentTime, committedExpirationTime) {
---
> function commitLifeCycles(finishedRoot, current$$1, finishedWork, committedExpirationTime) {
14932a14685
> case ClassComponentLazy:
14936c14689
< if (current === null) {
---
> if (current$$1 === null) {
14943,14944c14696,14697
< var prevProps = current.memoizedProps;
< var prevState = current.memoizedState;
---
> var prevProps = current$$1.memoizedProps;
> var prevState = current$$1.memoizedState;
14970a14724
> case ClassComponentLazy:
14987c14741
< if (current === null && finishedWork.effectTag & Update) {
---
> if (current$$1 === null && finishedWork.effectTag & Update) {
15010c14764
< case TimeoutComponent:
---
> case PlaceholderComponent:
15012c14766,14781
< // We have no life-cycles associated with Timeouts.
---
> if (enableSuspense) {
> if ((finishedWork.mode & StrictMode) === NoEffect) {
> // In loose mode, a placeholder times out by scheduling a synchronous
> // update in the commit phase. Use `updateQueue` field to signal that
> // the Timeout needs to switch to the placeholder. We don't need an
> // entire queue. Any non-null value works.
> // $FlowFixMe - Intentionally using a value other than an UpdateQueue.
> finishedWork.updateQueue = emptyObject;
> scheduleWork(finishedWork, Sync);
> } else {
> // In strict mode, the Update effect is used to record the time at
> // which the placeholder timed out.
> var currentTime = requestCurrentTime();
> finishedWork.stateNode = { timedOutAt: currentTime };
> }
> }
15017c14786
< invariant_1(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
---
> invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
15039c14808
< warning_1(false, 'Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().%s', getComponentName(finishedWork), getStackAddendumByWorkInProgressFiber(finishedWork));
---
> warningWithoutStack$1(false, 'Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().%s', getComponentName(finishedWork.type), getStackByFiberInDevAndProd(finishedWork));
15048,15049c14817,14818
< function commitDetachRef(current) {
< var currentRef = current.ref;
---
> function commitDetachRef(current$$1) {
> var currentRef = current$$1.ref;
15062,15065c14831,14832
< function commitUnmount(current) {
< if (typeof onCommitUnmount === 'function') {
< onCommitUnmount(current);
< }
---
> function commitUnmount(current$$1) {
> onCommitUnmount(current$$1);
15067c14834
< switch (current.tag) {
---
> switch (current$$1.tag) {
15068a14836
> case ClassComponentLazy:
15070,15071c14838,14839
< safelyDetachRef(current);
< var instance = current.stateNode;
---
> safelyDetachRef(current$$1);
> var instance = current$$1.stateNode;
15073c14841
< safelyCallComponentWillUnmount(current, instance);
---
> safelyCallComponentWillUnmount(current$$1, instance);
15079c14847
< safelyDetachRef(current);
---
> safelyDetachRef(current$$1);
15088c14856
< unmountHostComponents(current);
---
> unmountHostComponents(current$$1);
15090c14858
< emptyPortalContainer(current);
---
> emptyPortalContainer(current$$1);
15129c14897
< function detachFiber(current) {
---
> function detachFiber(current$$1) {
15135,15139c14903,14907
< current.return = null;
< current.child = null;
< if (current.alternate) {
< current.alternate.child = null;
< current.alternate.return = null;
---
> current$$1.return = null;
> current$$1.child = null;
> if (current$$1.alternate) {
> current$$1.alternate.child = null;
> current$$1.alternate.return = null;
15143c14911
< function emptyPortalContainer(current) {
---
> function emptyPortalContainer(current$$1) {
15148c14916
< var portal = current.stateNode;
---
> var portal = current$$1.stateNode;
15161a14930
> case ClassComponentLazy:
15185c14954
< invariant_1(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
---
> invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
15198c14967
< invariant_1(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.');
---
> invariant(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.');
15252a15022,15023
>
> // Note: these two variables *must* always be updated together.
15254a15026
>
15269c15041
< invariant_1(false, 'Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.');
---
> invariant(false, 'Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.');
15320,15322c15092,15094
< function unmountHostComponents(current) {
< // We only have the top Fiber that was inserted but we need recurse down its
< var node = current;
---
> function unmountHostComponents(current$$1) {
> // We only have the top Fiber that was deleted but we need recurse down its
> var node = current$$1;
15326a15099,15100
>
> // Note: these two variables *must* always be updated together.
15334c15108
< !(parent !== null) ? invariant_1(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(parent !== null) ? invariant(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.') : void 0;
15367a15142
> currentParentIsContainer = true;
15383c15158
< if (node === current) {
---
> if (node === current$$1) {
15387c15162
< if (node.return === null || node.return === current) {
---
> if (node.return === null || node.return === current$$1) {
15402c15177
< function commitDeletion(current) {
---
> function commitDeletion(current$$1) {
15406c15181
< unmountHostComponents(current);
---
> unmountHostComponents(current$$1);
15409c15184
< commitNestedUnmounts(current);
---
> commitNestedUnmounts(current$$1);
15411c15186
< detachFiber(current);
---
> detachFiber(current$$1);
15414c15189
< function commitWork(current, finishedWork) {
---
> function commitWork(root, current$$1, finishedWork) {
15421a15197
> case ClassComponentLazy:
15434c15210
< var oldProps = current !== null ? current.memoizedProps : newProps;
---
> var oldProps = current$$1 !== null ? current$$1.memoizedProps : newProps;
15447c15223
< !(finishedWork.stateNode !== null) ? invariant_1(false, 'This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(finishedWork.stateNode !== null) ? invariant(false, 'This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.') : void 0;
15453c15229
< var oldText = current !== null ? current.memoizedProps : newText;
---
> var oldText = current$$1 !== null ? current$$1.memoizedProps : newText;
15465c15241,15246
< onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseTime, finishedWork.actualStartTime, getCommitTime());
---
>
> if (enableSchedulerTracking) {
> onRender(finishedWork.memoizedProps.id, current$$1 === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime(), root.memoizedInteractions);
> } else {
> onRender(finishedWork.memoizedProps.id, current$$1 === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime());
> }
15469c15250
< case TimeoutComponent:
---
> case PlaceholderComponent:
15475c15256
< invariant_1(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
---
> invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
15480c15261
< function commitResetTextContent(current) {
---
> function commitResetTextContent(current$$1) {
15484c15265,15269
< resetTextContent(current.stateNode);
---
> resetTextContent(current$$1.stateNode);
> }
>
> function NoopComponent() {
> return null;
15535,15545c15320
< function schedulePing(finishedWork) {
< // Once the promise resolves, we should try rendering the non-
< // placeholder state again.
< var currentTime = recalculateCurrentTime();
< var expirationTime = computeExpirationForFiber(currentTime, finishedWork);
< var recoveryUpdate = createUpdate(expirationTime);
< enqueueUpdate(finishedWork, recoveryUpdate, expirationTime);
< scheduleWork$1(finishedWork, expirationTime);
< }
<
< function throwException(root, returnFiber, sourceFiber, value, renderIsExpired, renderExpirationTime, currentTimeMs) {
---
> function throwException(root, returnFiber, sourceFiber, value, renderExpirationTime) {
15555,15565c15330,15334
< var expirationTimeMs = expirationTimeToMs(renderExpirationTime);
< var startTimeMs = expirationTimeMs - 5000;
< var elapsedMs = currentTimeMs - startTimeMs;
< if (elapsedMs < 0) {
< elapsedMs = 0;
< }
< var remainingTimeMs = expirationTimeMs - currentTimeMs;
<
< // Find the earliest timeout of all the timeouts in the ancestor path.
< // TODO: Alternatively, we could store the earliest timeout on the context
< // stack, rather than searching on every suspend.
---
> // Find the earliest timeout threshold of all the placeholders in the
> // ancestor path. We could avoid this traversal by storing the thresholds on
> // the stack, but we choose not to because we only hit this path if we're
> // IO-bound (i.e. if something suspends). Whereas the stack is used even in
> // the non-IO- bound case.
15568,15569c15337,15339
< searchForEarliestTimeout: do {
< if (_workInProgress.tag === TimeoutComponent) {
---
> var startTimeMs = -1;
> do {
> if (_workInProgress.tag === PlaceholderComponent) {
15571,15576c15341,15351
< if (current !== null && current.memoizedState === true) {
< // A parent Timeout already committed in a placeholder state. We
< // need to handle this promise immediately. In other words, we
< // should never suspend inside a tree that already expired.
< earliestTimeoutMs = 0;
< break searchForEarliestTimeout;
---
> if (current !== null && current.memoizedState === true && current.stateNode !== null) {
> // Reached a placeholder that already timed out. Each timed out
> // placeholder acts as the root of a new suspense boundary.
>
> // Use the time at which the placeholder timed out as the start time
> // for the current render.
> var timedOutAt = current.stateNode.timedOutAt;
> startTimeMs = expirationTimeToMs(timedOutAt);
>
> // Do not search any further.
> break;
15578c15353
< var timeoutPropMs = _workInProgress.pendingProps.ms;
---
> var timeoutPropMs = _workInProgress.pendingProps.delayMs;
15582d15356
< break searchForEarliestTimeout;
15586,15587d15359
< } else if (earliestTimeoutMs === -1) {
< earliestTimeoutMs = remainingTimeMs;
15593,15616c15365,15399
< // Compute the remaining time until the timeout.
< var msUntilTimeout = earliestTimeoutMs - elapsedMs;
<
< if (renderExpirationTime === Never || msUntilTimeout > 0) {
< // There's still time remaining.
< suspendRoot(root, thenable, msUntilTimeout, renderExpirationTime);
< var onResolveOrReject = function () {
< retrySuspendedRoot(root, renderExpirationTime);
< };
< thenable.then(onResolveOrReject, onResolveOrReject);
< return;
< } else {
< // No time remaining. Need to fallback to placeholder.
< // Find the nearest timeout that can be retried.
< _workInProgress = returnFiber;
< do {
< switch (_workInProgress.tag) {
< case HostRoot:
< {
< // The root expired, but no fallback was provided. Throw a
< // helpful error.
< var message = renderExpirationTime === Sync ? 'A synchronous update was suspended, but no fallback UI ' + 'was provided.' : 'An update was suspended for longer than the timeout, ' + 'but no fallback UI was provided.';
< value = new Error(message);
< break;
---
> // Schedule the nearest Placeholder to re-render the timed out view.
> _workInProgress = returnFiber;
> do {
> if (_workInProgress.tag === PlaceholderComponent) {
> var didTimeout = _workInProgress.memoizedState;
> if (!didTimeout) {
> // Found the nearest boundary.
>
> // If the boundary is not in async mode, we should not suspend, and
> // likewise, when the promise resolves, we should ping synchronously.
> var pingTime = (_workInProgress.mode & AsyncMode) === NoEffect ? Sync : renderExpirationTime;
>
> // Attach a listener to the promise to "ping" the root and retry.
> var onResolveOrReject = retrySuspendedRoot.bind(null, root, _workInProgress, pingTime);
> thenable.then(onResolveOrReject, onResolveOrReject);
>
> // If the boundary is outside of strict mode, we should *not* suspend
> // the commit. Pretend as if the suspended component rendered null and
> // keep rendering. In the commit phase, we'll schedule a subsequent
> // synchronous update to re-render the Placeholder.
> //
> // Note: It doesn't matter whether the component that suspended was
> // inside a strict mode tree. If the Placeholder is outside of it, we
> // should *not* suspend the commit.
> if ((_workInProgress.mode & StrictMode) === NoEffect) {
> _workInProgress.effectTag |= Update;
>
> // Unmount the source fiber's children
> var nextChildren = null;
> reconcileChildren(sourceFiber.alternate, sourceFiber, nextChildren, renderExpirationTime);
> sourceFiber.effectTag &= ~Incomplete;
> if (sourceFiber.tag === IndeterminateComponent) {
> // Let's just assume it's a functional component. This fiber will
> // be unmounted in the immediate next commit, anyway.
> sourceFiber.tag = FunctionalComponent;
15618,15624c15401,15414
< case TimeoutComponent:
< {
< if ((_workInProgress.effectTag & DidCapture) === NoEffect) {
< _workInProgress.effectTag |= ShouldCapture;
< var _onResolveOrReject = schedulePing.bind(null, _workInProgress);
< thenable.then(_onResolveOrReject, _onResolveOrReject);
< return;
---
>
> if (sourceFiber.tag === ClassComponent || sourceFiber.tag === ClassComponentLazy) {
> // We're going to commit this fiber even though it didn't
> // complete. But we shouldn't call any lifecycle methods or
> // callbacks. Remove all lifecycle effect tags.
> sourceFiber.effectTag &= ~LifecycleEffectMask;
> if (sourceFiber.alternate === null) {
> // We're about to mount a class component that doesn't have an
> // instance. Turn this into a dummy functional component instead,
> // to prevent type errors. This is a bit weird but it's an edge
> // case and we're about to synchronously delete this
> // component, anyway.
> sourceFiber.tag = FunctionalComponent;
> sourceFiber.type = NoopComponent;
15626,15628d15415
< // Already captured during this render. Continue to the next
< // Timeout ancestor.
< break;
15629a15417,15457
>
> // Exit without suspending.
> return;
> }
>
> // Confirmed that the boundary is in a strict mode tree. Continue with
> // the normal suspend path.
>
> var absoluteTimeoutMs = void 0;
> if (earliestTimeoutMs === -1) {
> // If no explicit threshold is given, default to an abitrarily large
> // value. The actual size doesn't matter because the threshold for the
> // whole tree will be clamped to the expiration time.
> absoluteTimeoutMs = maxSigned31BitInt;
> } else {
> if (startTimeMs === -1) {
> // This suspend happened outside of any already timed-out
> // placeholders. We don't know exactly when the update was scheduled,
> // but we can infer an approximate start time from the expiration
> // time. First, find the earliest uncommitted expiration time in the
> // tree, including work that is suspended. Then subtract the offset
> // used to compute an async update's expiration time. This will cause
> // high priority (interactive) work to expire earlier than necessary,
> // but we can account for this by adjusting for the Just Noticeable
> // Difference.
> var earliestExpirationTime = findEarliestOutstandingPriorityLevel(root, renderExpirationTime);
> var earliestExpirationTimeMs = expirationTimeToMs(earliestExpirationTime);
> startTimeMs = earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION;
> }
> absoluteTimeoutMs = startTimeMs + earliestTimeoutMs;
> }
>
> // Mark the earliest timeout in the suspended fiber's ancestor path.
> // After completing the root, we'll take the largest of all the
> // suspended fiber's timeouts and use it to compute a timeout for the
> // whole tree.
> renderDidSuspend(root, absoluteTimeoutMs, renderExpirationTime);
>
> _workInProgress.effectTag |= ShouldCapture;
> _workInProgress.expirationTime = renderExpirationTime;
> return;
15631,15633c15459,15465
< _workInProgress = _workInProgress.return;
< } while (_workInProgress !== null);
< }
---
> // This boundary already captured during this render. Continue to the
> // next boundary.
> }
> _workInProgress = _workInProgress.return;
> } while (_workInProgress !== null);
> // No boundary was found. Fallthrough to error mode.
> value = new Error('An update was suspended, but no placeholder UI was provided.');
15638a15471
> renderDidError();
15646a15480
> workInProgress.expirationTime = renderExpirationTime;
15648c15482
< enqueueCapturedUpdate(workInProgress, update, renderExpirationTime);
---
> enqueueCapturedUpdate(workInProgress, update);
15651a15486
> case ClassComponentLazy:
15657a15493
> workInProgress.expirationTime = renderExpirationTime;
15660c15496
< enqueueCapturedUpdate(workInProgress, _update, renderExpirationTime);
---
> enqueueCapturedUpdate(workInProgress, _update);
15671,15677c15507
< function unwindWork(workInProgress, renderIsExpired, renderExpirationTime) {
< if (enableProfilerTimer) {
< if (workInProgress.mode & ProfileMode) {
< recordElapsedActualRenderTime(workInProgress);
< }
< }
<
---
> function unwindWork(workInProgress, renderExpirationTime) {
15681c15511,15514
< popContextProvider(workInProgress);
---
> var Component = workInProgress.type;
> if (isContextProvider(Component)) {
> popContext(workInProgress);
> }
15689c15522
< case HostRoot:
---
> case ClassComponentLazy:
15691,15692c15524,15527
< popHostContainer(workInProgress);
< popTopLevelContextObject(workInProgress);
---
> var _Component = workInProgress.type._reactResult;
> if (isContextProvider(_Component)) {
> popContext(workInProgress);
> }
15699a15535,15543
> case HostRoot:
> {
> popHostContainer(workInProgress);
> popTopLevelContextObject(workInProgress);
> var _effectTag2 = workInProgress.effectTag;
> !((_effectTag2 & DidCapture) === NoEffect) ? invariant(false, 'The root failed to unmount after an error. This is likely a bug in React. Please file an issue.') : void 0;
> workInProgress.effectTag = _effectTag2 & ~ShouldCapture | DidCapture;
> return workInProgress;
> }
15705c15549
< case TimeoutComponent:
---
> case PlaceholderComponent:
15707,15709c15551,15553
< var _effectTag2 = workInProgress.effectTag;
< if (_effectTag2 & ShouldCapture) {
< workInProgress.effectTag = _effectTag2 & ~ShouldCapture | DidCapture;
---
> var _effectTag3 = workInProgress.effectTag;
> if (_effectTag3 & ShouldCapture) {
> workInProgress.effectTag = _effectTag3 & ~ShouldCapture | DidCapture;
15726,15733d15569
< if (enableProfilerTimer) {
< if (interruptedWork.mode & ProfileMode) {
< // Resume in case we're picking up on work that was paused.
< resumeActualRenderTimerIfPaused();
< recordElapsedActualRenderTime(interruptedWork);
< }
< }
<
15737c15573,15584
< popContextProvider(interruptedWork);
---
> var childContextTypes = interruptedWork.type.childContextTypes;
> if (childContextTypes !== null && childContextTypes !== undefined) {
> popContext(interruptedWork);
> }
> break;
> }
> case ClassComponentLazy:
> {
> var _childContextTypes = interruptedWork.type._reactResult.childContextTypes;
> if (_childContextTypes !== null && _childContextTypes !== undefined) {
> popContext(interruptedWork);
> }
15762,15764c15609,15613
< var invokeGuardedCallback$2 = ReactErrorUtils.invokeGuardedCallback;
< var hasCaughtError = ReactErrorUtils.hasCaughtError;
< var clearCaughtError = ReactErrorUtils.clearCaughtError;
---
> var Dispatcher = {
> readContext: readContext
> };
>
> var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner;
15766a15616,15622
> var interactionsRef = null;
> var subscriberRef = null;
> if (enableSchedulerTracking) {
> interactionsRef = __getInteractionsRef();
> subscriberRef = __getSubscriberRef();
> }
>
15780c15636
< var componentName = getComponentName(fiber) || 'ReactClass';
---
> var componentName = getComponentName(fiber.type) || 'ReactClass';
15784c15640
< warning_1(false, "Can't call setState (or forceUpdate) on an unmounted component. This " + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in the ' + 'componentWillUnmount method.%s', getStackAddendumByWorkInProgressFiber(fiber));
---
> warningWithoutStack$1(false, "Can't call setState (or forceUpdate) on an unmounted component. This " + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in the ' + 'componentWillUnmount method.%s', getStackByFiberInDevAndProd(fiber));
15789c15645
< switch (ReactDebugCurrentFiber.phase) {
---
> switch (phase) {
15794c15650
< warning_1(false, 'setState(...): Cannot call setState() inside getChildContext()');
---
> warningWithoutStack$1(false, 'setState(...): Cannot call setState() inside getChildContext()');
15801c15657
< warning_1(false, 'Cannot update during an existing state transition (such as within ' + "`render` or another component's constructor). Render methods should " + 'be a pure function of props and state; constructor side-effects are ' + 'an anti-pattern, but can be moved to `componentWillMount`.');
---
> warningWithoutStack$1(false, 'Cannot update during an existing state transition (such as within ' + '`render`). Render methods should be a pure function of props and state.');
15808,15813c15664
< // Represents the current time in ms.
< var originalStartTimeMs = now();
< var mostRecentCurrentTime = msToExpirationTime(0);
< var mostRecentCurrentTimeMs = originalStartTimeMs;
<
< // Used to ensure computeUniqueAsyncExpiration is monotonically increases.
---
> // Used to ensure computeUniqueAsyncExpiration is monotonically increasing.
15828,15829c15679,15680
< var nextLatestTimeoutMs = -1;
< var nextRenderIsExpired = false;
---
> var nextLatestAbsoluteTimeoutMs = -1;
> var nextRenderDidError = false;
15836,15837d15686
< var isRootReadyForCommit = false;
<
15842a15692,15695
> // Do not decrement interaction counts in the event of suspense timeouts.
> // This would lead to prematurely calling the interaction-complete hook.
> var suspenseDidTimeout = false;
>
15852c15705
< replayUnitOfWork = function (failedUnitOfWork, thrownValue, isAsync) {
---
> replayUnitOfWork = function (failedUnitOfWork, thrownValue, isYieldy) {
15863c15716
< warning_1(false, 'Could not replay rendering after an error. This is likely a bug in React. ' + 'Please file an issue.');
---
> warningWithoutStack$1(false, 'Could not replay rendering after an error. This is likely a bug in React. ' + 'Please file an issue.');
15877,15878c15730,15744
< popContextProvider(failedUnitOfWork);
< break;
---
> {
> var Component = failedUnitOfWork.type;
> if (isContextProvider(Component)) {
> popContext(failedUnitOfWork);
> }
> break;
> }
> case ClassComponentLazy:
> {
> var _Component = getResultFromResolvedThenable(failedUnitOfWork.type);
> if (isContextProvider(_Component)) {
> popContext(failedUnitOfWork);
> }
> break;
> }
15889c15755
< invokeGuardedCallback$2(null, workLoop, null, isAsync);
---
> invokeGuardedCallback(null, workLoop, null, isYieldy);
15893,15897c15759,15769
< clearCaughtError();
<
< if (enableProfilerTimer) {
< if (failedUnitOfWork.mode & ProfileMode) {
< recordElapsedActualRenderTime(failedUnitOfWork);
---
> var replayError = clearCaughtError();
> if (replayError != null && thrownValue != null) {
> try {
> // Reading the expando property is intentionally
> // inside `try` because it might be a getter or Proxy.
> if (replayError._suppressLogging) {
> // Also suppress logging for the original error.
> thrownValue._suppressLogging = true;
> }
> } catch (inner) {
> // Ignore.
15899,15901d15770
<
< // Stop "base" render timer again (after the re-thrown error).
< stopBaseRenderTimerIfRunning();
15930,15931c15799,15800
< nextLatestTimeoutMs = -1;
< nextRenderIsExpired = false;
---
> nextLatestAbsoluteTimeoutMs = -1;
> nextRenderDidError = false;
15933,15934d15801
<
< isRootReadyForCommit = false;
15937c15804
< function commitAllHostEffects() {
---
> function commitAllHostEffects(root) {
15940c15807
< ReactDebugCurrentFiber.setCurrentFiber(nextEffect);
---
> setCurrentFiber(nextEffect);
15951,15953c15818,15820
< var current = nextEffect.alternate;
< if (current !== null) {
< commitDetachRef(current);
---
> var current$$1 = nextEffect.alternate;
> if (current$$1 !== null) {
> commitDetachRef(current$$1);
15984c15851
< commitWork(_current, nextEffect);
---
> commitWork(root, _current, nextEffect);
15990c15857
< commitWork(_current2, nextEffect);
---
> commitWork(root, _current2, nextEffect);
16003c15870
< ReactDebugCurrentFiber.resetCurrentFiber();
---
> resetCurrentFiber();
16009c15876,15878
< var effectTag = nextEffect.effectTag;
---
> {
> setCurrentFiber(nextEffect);
> }
16010a15880
> var effectTag = nextEffect.effectTag;
16013,16014c15883,15884
< var current = nextEffect.alternate;
< commitBeforeMutationLifeCycles(current, nextEffect);
---
> var current$$1 = nextEffect.alternate;
> commitBeforeMutationLifeCycles(current$$1, nextEffect);
16020a15891,15894
>
> {
> resetCurrentFiber();
> }
16023c15897
< function commitAllLifeCycles(finishedRoot, currentTime, committedExpirationTime) {
---
> function commitAllLifeCycles(finishedRoot, committedExpirationTime) {
16040,16041c15914,15915
< var current = nextEffect.alternate;
< commitLifeCycles(finishedRoot, current, nextEffect, currentTime, committedExpirationTime);
---
> var current$$1 = nextEffect.alternate;
> commitLifeCycles(finishedRoot, current$$1, nextEffect, committedExpirationTime);
16073c15947
< function commitRoot(finishedWork) {
---
> function commitRoot(root, finishedWork) {
16078,16079c15952
< var root = finishedWork.stateNode;
< !(root.current !== finishedWork) ? invariant_1(false, 'Cannot commit the same tree as before. This is probably a bug related to the return field. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(root.current !== finishedWork) ? invariant(false, 'Cannot commit the same tree as before. This is probably a bug related to the return field. This error is likely caused by a bug in React. Please file an issue.') : void 0;
16081c15954
< !(committedExpirationTime !== NoWork) ? invariant_1(false, 'Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(committedExpirationTime !== NoWork) ? invariant(false, 'Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.') : void 0;
16084c15957,15987
< var currentTime = recalculateCurrentTime();
---
> // Update the pending priority levels to account for the work that we are
> // about to commit. This needs to happen before calling the lifecycles, since
> // they may schedule additional updates.
> var updateExpirationTimeBeforeCommit = finishedWork.expirationTime;
> var childExpirationTimeBeforeCommit = finishedWork.childExpirationTime;
> var earliestRemainingTimeBeforeCommit = updateExpirationTimeBeforeCommit === NoWork || childExpirationTimeBeforeCommit !== NoWork && childExpirationTimeBeforeCommit < updateExpirationTimeBeforeCommit ? childExpirationTimeBeforeCommit : updateExpirationTimeBeforeCommit;
> markCommittedPriorityLevels(root, earliestRemainingTimeBeforeCommit);
>
> var prevInteractions = null;
> var committedInteractions = enableSchedulerTracking ? [] : null;
> if (enableSchedulerTracking) {
> // Restore any pending interactions at this point,
> // So that cascading work triggered during the render phase will be accounted for.
> prevInteractions = interactionsRef.current;
> interactionsRef.current = root.memoizedInteractions;
>
> // We are potentially finished with the current batch of interactions.
> // So we should clear them out of the pending interaction map.
> // We do this at the start of commit in case cascading work is scheduled by commit phase lifecycles.
> // In that event, interaction data may be added back into the pending map for a future commit.
> // We also store the interactions we are about to commit so that we can notify subscribers after we're done.
> // These are stored as an Array rather than a Set,
> // Because the same interaction may be pending for multiple expiration times,
> // In which case it's important that we decrement the count the right number of times after finishing.
> root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
> if (scheduledExpirationTime <= committedExpirationTime) {
> committedInteractions.push.apply(committedInteractions, Array.from(scheduledInteractions));
> root.pendingInteractionMap.delete(scheduledExpirationTime);
> }
> });
> }
16087c15990
< ReactCurrentOwner.current = null;
---
> ReactCurrentOwner$2.current = null;
16115c16018
< invokeGuardedCallback$2(null, commitBeforeMutationLifecycles, null);
---
> invokeGuardedCallback(null, commitBeforeMutationLifecycles, null);
16122c16025
< !(nextEffect !== null) ? invariant_1(false, 'Should have next effect. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(nextEffect !== null) ? invariant(false, 'Should have next effect. This error is likely caused by a bug in React. Please file an issue.') : void 0;
16147c16050
< invokeGuardedCallback$2(null, commitAllHostEffects, null);
---
> invokeGuardedCallback(null, commitAllHostEffects, null, root);
16154c16057
< !(nextEffect !== null) ? invariant_1(false, 'Should have next effect. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(nextEffect !== null) ? invariant(false, 'Should have next effect. This error is likely caused by a bug in React. Please file an issue.') : void 0;
16182c16085
< invokeGuardedCallback$2(null, commitAllLifeCycles, null, root, currentTime, committedExpirationTime);
---
> invokeGuardedCallback(null, commitAllLifeCycles, null, root, committedExpirationTime);
16189c16092
< !(nextEffect !== null) ? invariant_1(false, 'Should have next effect. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(nextEffect !== null) ? invariant(false, 'Should have next effect. This error is likely caused by a bug in React. Please file an issue.') : void 0;
16197,16203d16099
< if (enableProfilerTimer) {
< {
< checkActualRenderTimeStackEmpty();
< }
< resetActualRenderTimer();
< }
<
16208,16210c16104
< if (typeof onCommitRoot === 'function') {
< onCommitRoot(finishedWork.stateNode);
< }
---
> onCommitRoot(finishedWork.stateNode);
16215,16217c16109,16112
< markCommittedPriorityLevels(root, currentTime, root.current.expirationTime);
< var remainingTime = findNextPendingPriorityLevel(root);
< if (remainingTime === NoWork) {
---
> var updateExpirationTimeAfterCommit = finishedWork.expirationTime;
> var childExpirationTimeAfterCommit = finishedWork.childExpirationTime;
> var earliestRemainingTimeAfterCommit = updateExpirationTimeAfterCommit === NoWork || childExpirationTimeAfterCommit !== NoWork && childExpirationTimeAfterCommit < updateExpirationTimeAfterCommit ? childExpirationTimeAfterCommit : updateExpirationTimeAfterCommit;
> if (earliestRemainingTimeAfterCommit === NoWork) {
16222c16117,16161
< return remainingTime;
---
> onCommit(root, earliestRemainingTimeAfterCommit);
>
> if (enableSchedulerTracking) {
> interactionsRef.current = prevInteractions;
>
> var subscriber = void 0;
>
> try {
> subscriber = subscriberRef.current;
> if (subscriber !== null && root.memoizedInteractions.size > 0) {
> var threadID = computeThreadID(committedExpirationTime, root.interactionThreadID);
> subscriber.onWorkStopped(root.memoizedInteractions, threadID);
> }
> } catch (error) {
> // It's not safe for commitRoot() to throw.
> // Store the error for now and we'll re-throw in finishRendering().
> if (!hasUnhandledError) {
> hasUnhandledError = true;
> unhandledError = error;
> }
> } finally {
> // Don't update interaction counts if we're frozen due to suspense.
> // In this case, we can skip the completed-work check entirely.
> if (!suspenseDidTimeout) {
> // Now that we're done, check the completed batch of interactions.
> // If no more work is outstanding for a given interaction,
> // We need to notify the subscribers that it's finished.
> committedInteractions.forEach(function (interaction) {
> interaction.__count--;
> if (subscriber !== null && interaction.__count === 0) {
> try {
> subscriber.onInteractionScheduledWorkCompleted(interaction);
> } catch (error) {
> // It's not safe for commitRoot() to throw.
> // Store the error for now and we'll re-throw in finishRendering().
> if (!hasUnhandledError) {
> hasUnhandledError = true;
> unhandledError = error;
> }
> }
> }
> });
> }
> }
> }
16225,16226c16164,16165
< function resetExpirationTime(workInProgress, renderTime) {
< if (renderTime !== Never && workInProgress.expirationTime === Never) {
---
> function resetChildExpirationTime(workInProgress, renderTime) {
> if (renderTime !== Never && workInProgress.childExpirationTime === Never) {
16232,16245c16171
< // Check for pending updates.
< var newExpirationTime = NoWork;
< switch (workInProgress.tag) {
< case HostRoot:
< case ClassComponent:
< {
< var updateQueue = workInProgress.updateQueue;
< if (updateQueue !== null) {
< newExpirationTime = updateQueue.expirationTime;
< }
< }
< }
<
< // TODO: Calls need to visit stateNode
---
> var newChildExpirationTime = NoWork;
16248d16173
< // (And "base" render timers if that feature flag is enabled)
16250c16175,16188
< var treeBaseTime = workInProgress.selfBaseTime;
---
> // We're in profiling mode.
> // Let's use this same traversal to update the render durations.
> var actualDuration = workInProgress.actualDuration;
> var treeBaseDuration = workInProgress.selfBaseDuration;
>
> // When a fiber is cloned, its actualDuration is reset to 0.
> // This value will only be updated if work is done on the fiber (i.e. it doesn't bailout).
> // When work is done, it should bubble to the parent's actualDuration.
> // If the fiber has not been cloned though, (meaning no work was done),
> // Then this value will reflect the amount of time spent working on a previous render.
> // In that case it should not bubble.
> // We determine whether it was cloned by comparing the child pointer.
> var shouldBubbleActualDurations = workInProgress.alternate === null || workInProgress.child !== workInProgress.alternate.child;
>
16253,16255c16191,16194
< treeBaseTime += child.treeBaseTime;
< if (child.expirationTime !== NoWork && (newExpirationTime === NoWork || newExpirationTime > child.expirationTime)) {
< newExpirationTime = child.expirationTime;
---
> var childUpdateExpirationTime = child.expirationTime;
> var childChildExpirationTime = child.childExpirationTime;
> if (newChildExpirationTime === NoWork || childUpdateExpirationTime !== NoWork && childUpdateExpirationTime < newChildExpirationTime) {
> newChildExpirationTime = childUpdateExpirationTime;
16256a16196,16202
> if (newChildExpirationTime === NoWork || childChildExpirationTime !== NoWork && childChildExpirationTime < newChildExpirationTime) {
> newChildExpirationTime = childChildExpirationTime;
> }
> if (shouldBubbleActualDurations) {
> actualDuration += child.actualDuration;
> }
> treeBaseDuration += child.treeBaseDuration;
16259c16205,16206
< workInProgress.treeBaseTime = treeBaseTime;
---
> workInProgress.actualDuration = actualDuration;
> workInProgress.treeBaseDuration = treeBaseDuration;
16263,16264c16210,16216
< if (_child.expirationTime !== NoWork && (newExpirationTime === NoWork || newExpirationTime > _child.expirationTime)) {
< newExpirationTime = _child.expirationTime;
---
> var _childUpdateExpirationTime = _child.expirationTime;
> var _childChildExpirationTime = _child.childExpirationTime;
> if (newChildExpirationTime === NoWork || _childUpdateExpirationTime !== NoWork && _childUpdateExpirationTime < newChildExpirationTime) {
> newChildExpirationTime = _childUpdateExpirationTime;
> }
> if (newChildExpirationTime === NoWork || _childChildExpirationTime !== NoWork && _childChildExpirationTime < newChildExpirationTime) {
> newChildExpirationTime = _childChildExpirationTime;
16270c16222
< workInProgress.expirationTime = newExpirationTime;
---
> workInProgress.childExpirationTime = newChildExpirationTime;
16282c16234
< var current = workInProgress.alternate;
---
> var current$$1 = workInProgress.alternate;
16284c16236
< ReactDebugCurrentFiber.setCurrentFiber(workInProgress);
---
> setCurrentFiber(workInProgress);
16292c16244,16258
< var next = completeWork(current, workInProgress, nextRenderExpirationTime);
---
> if (enableProfilerTimer) {
> if (workInProgress.mode & ProfileMode) {
> startProfilerTimer(workInProgress);
> }
>
> nextUnitOfWork = completeWork(current$$1, workInProgress, nextRenderExpirationTime);
>
> if (workInProgress.mode & ProfileMode) {
> // Update render duration assuming we didn't error.
> stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);
> }
> } else {
> nextUnitOfWork = completeWork(current$$1, workInProgress, nextRenderExpirationTime);
> }
> var next = nextUnitOfWork;
16294c16260
< resetExpirationTime(workInProgress, nextRenderExpirationTime);
---
> resetChildExpirationTime(workInProgress, nextRenderExpirationTime);
16296c16262
< ReactDebugCurrentFiber.resetCurrentFiber();
---
> resetCurrentFiber();
16357d16322
< isRootReadyForCommit = true;
16360a16326,16330
> if (workInProgress.mode & ProfileMode) {
> // Record the render duration for the fiber that errored.
> stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);
> }
>
16364c16334
< var _next = unwindWork(workInProgress, nextRenderIsExpired, nextRenderExpirationTime);
---
> var _next = unwindWork(workInProgress, nextRenderExpirationTime);
16374c16344
< ReactDebugCurrentFiber.resetCurrentFiber();
---
> resetCurrentFiber();
16381a16352,16365
>
> if (enableProfilerTimer) {
> // Include the time spent working on failed children before continuing.
> if (_next.mode & ProfileMode) {
> var actualDuration = _next.actualDuration;
> var child = _next.child;
> while (child !== null) {
> actualDuration += child.actualDuration;
> child = child.sibling;
> }
> _next.actualDuration = actualDuration;
> }
> }
>
16424c16408
< var current = workInProgress.alternate;
---
> var current$$1 = workInProgress.alternate;
16429c16413
< ReactDebugCurrentFiber.setCurrentFiber(workInProgress);
---
> setCurrentFiber(workInProgress);
16439c16423
< startBaseRenderTimer();
---
> startProfilerTimer(workInProgress);
16442c16426
< next = beginWork(current, workInProgress, nextRenderExpirationTime);
---
> next = beginWork(current$$1, workInProgress, nextRenderExpirationTime);
16445,16447c16429,16430
< // Update "base" time if the render wasn't bailed out on.
< recordElapsedBaseRenderTimeIfRunning(workInProgress);
< stopBaseRenderTimerIfRunning();
---
> // Record the render duration assuming we didn't bailout (or error).
> stopProfilerTimerIfRunningAndRecordDelta(workInProgress, true);
16450c16433
< next = beginWork(current, workInProgress, nextRenderExpirationTime);
---
> next = beginWork(current$$1, workInProgress, nextRenderExpirationTime);
16454c16437
< ReactDebugCurrentFiber.resetCurrentFiber();
---
> resetCurrentFiber();
16472c16455
< ReactCurrentOwner.current = null;
---
> ReactCurrentOwner$2.current = null;
16477,16479c16460,16462
< function workLoop(isAsync) {
< if (!isAsync) {
< // Flush all expired work.
---
> function workLoop(isYieldy) {
> if (!isYieldy) {
> // Flush work without yielding
16488,16493d16470
<
< if (enableProfilerTimer) {
< // If we didn't finish, pause the "actual" render timer.
< // We'll restart it when we resume work.
< pauseActualRenderTimerIfRunning();
< }
16497,16498c16474,16475
< function renderRoot(root, expirationTime, isAsync) {
< !!isWorking ? invariant_1(false, 'renderRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> function renderRoot(root, isYieldy, isExpired) {
> !!isWorking ? invariant(false, 'renderRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;
16499a16477,16487
> ReactCurrentOwner$2.currentDispatcher = Dispatcher;
>
> var expirationTime = root.nextExpirationTimeToWorkOn;
>
> var prevInteractions = null;
> if (enableSchedulerTracking) {
> // We're about to start new tracked work.
> // Restore pending interactions so cascading work triggered during the render phase will be accounted for.
> prevInteractions = interactionsRef.current;
> interactionsRef.current = root.memoizedInteractions;
> }
16508d16495
< nextLatestTimeoutMs = -1;
16510a16498,16534
>
> if (enableSchedulerTracking) {
> // Determine which interactions this batch of work currently includes,
> // So that we can accurately attribute time spent working on it,
> var interactions = new Set();
> root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
> if (scheduledExpirationTime <= expirationTime) {
> scheduledInteractions.forEach(function (interaction) {
> return interactions.add(interaction);
> });
> }
> });
>
> // Store the current set of interactions on the FiberRoot for a few reasons:
> // We can re-use it in hot functions like renderRoot() without having to recalculate it.
> // We will also use it in commitWork() to pass to any Profiler onRender() hooks.
> // This also provides DevTools with a way to access it when the onCommitRoot() hook is called.
> root.memoizedInteractions = interactions;
>
> if (interactions.size > 0) {
> var subscriber = subscriberRef.current;
> if (subscriber !== null) {
> var threadID = computeThreadID(expirationTime, root.interactionThreadID);
> try {
> subscriber.onWorkStarted(interactions, threadID);
> } catch (error) {
> // Work thrown by an interaction tracking subscriber should be rethrown,
> // But only once it's safe (to avoid leaveing the scheduler in an invalid state).
> // Store the error for now and we'll re-throw in finishRendering().
> if (!hasUnhandledError) {
> hasUnhandledError = true;
> unhandledError = error;
> }
> }
> }
> }
> }
16515,16516d16538
< nextRenderIsExpired = !isAsync || nextRenderExpirationTime <= mostRecentCurrentTime;
<
16521c16543
< workLoop(isAsync);
---
> workLoop(isYieldy);
16523,16527d16544
< if (enableProfilerTimer) {
< // Stop "base" render timer in the event of an error.
< stopBaseRenderTimerIfRunning();
< }
<
16541c16558
< replayUnitOfWork(failedUnitOfWork, thrownValue, isAsync);
---
> replayUnitOfWork(failedUnitOfWork, thrownValue, isYieldy);
16547c16564
< !(nextUnitOfWork !== null) ? invariant_1(false, 'Failed to replay rendering after an error. This is likely caused by a bug in React. Please file an issue with a reproducing case to help us find it.') : void 0;
---
> !(nextUnitOfWork !== null) ? invariant(false, 'Failed to replay rendering after an error. This is likely caused by a bug in React. Please file an issue with a reproducing case to help us find it.') : void 0;
16560c16577,16580
< break;
---
> } else {
> throwException(root, returnFiber, sourceFiber, thrownValue, nextRenderExpirationTime);
> nextUnitOfWork = completeUnitOfWork(sourceFiber);
> continue;
16562,16563d16581
< throwException(root, returnFiber, sourceFiber, thrownValue, nextRenderIsExpired, nextRenderExpirationTime, mostRecentCurrentTimeMs);
< nextUnitOfWork = completeUnitOfWork(sourceFiber);
16568a16587,16591
> if (enableSchedulerTracking) {
> // Tracked work is done for now; restore the previous interactions.
> interactionsRef.current = prevInteractions;
> }
>
16570d16592
< var didCompleteRoot = false;
16571a16594,16595
> ReactCurrentOwner$2.currentDispatcher = null;
> resetContextDependences();
16575c16599,16600
< stopWorkLoopTimer(interruptedBy, didCompleteRoot);
---
> var _didCompleteRoot = false;
> stopWorkLoopTimer(interruptedBy, _didCompleteRoot);
16581,16596c16606,16645
< return null;
< } else if (nextUnitOfWork === null) {
< // We reached the root.
< if (isRootReadyForCommit) {
< didCompleteRoot = true;
< stopWorkLoopTimer(interruptedBy, didCompleteRoot);
< interruptedBy = null;
< // The root successfully completed. It's ready for commit.
< root.pendingCommitExpirationTime = expirationTime;
< var finishedWork = root.current.alternate;
< return finishedWork;
< } else {
< // The root did not complete.
< stopWorkLoopTimer(interruptedBy, didCompleteRoot);
< interruptedBy = null;
< !!nextRenderIsExpired ? invariant_1(false, 'Expired work should have completed. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> // `nextRoot` points to the in-progress root. A non-null value indicates
> // that we're in the middle of an async render. Set it to null to indicate
> // there's no more work to be done in the current batch.
> nextRoot = null;
> onFatal(root);
> return;
> }
>
> if (nextUnitOfWork !== null) {
> // There's still remaining async work in this tree, but we ran out of time
> // in the current frame. Yield back to the renderer. Unless we're
> // interrupted by a higher priority update, we'll continue later from where
> // we left off.
> var _didCompleteRoot2 = false;
> stopWorkLoopTimer(interruptedBy, _didCompleteRoot2);
> interruptedBy = null;
> onYield(root);
> return;
> }
>
> // We completed the whole tree.
> var didCompleteRoot = true;
> stopWorkLoopTimer(interruptedBy, didCompleteRoot);
> var rootWorkInProgress = root.current.alternate;
> !(rootWorkInProgress !== null) ? invariant(false, 'Finished root should have a work-in-progress. This error is likely caused by a bug in React. Please file an issue.') : void 0;
>
> // `nextRoot` points to the in-progress root. A non-null value indicates
> // that we're in the middle of an async render. Set it to null to indicate
> // there's no more work to be done in the current batch.
> nextRoot = null;
> interruptedBy = null;
>
> if (nextRenderDidError) {
> // There was an error
> if (hasLowerPriorityWork(root, expirationTime)) {
> // There's lower priority work. If so, it may have the effect of fixing
> // the exception that was just thrown. Exit without committing. This is
> // similar to a suspend, but without a timeout because we're not waiting
> // for a promise to resolve. React will restart at the lower
> // priority level.
16598,16605c16647,16663
< if (nextLatestTimeoutMs >= 0) {
< setTimeout(function () {
< retrySuspendedRoot(root, expirationTime);
< }, nextLatestTimeoutMs);
< }
< var firstUnblockedExpirationTime = findNextPendingPriorityLevel(root);
< onBlock(firstUnblockedExpirationTime);
< return null;
---
> var suspendedExpirationTime = expirationTime;
> var rootExpirationTime = root.expirationTime;
> onSuspend(root, rootWorkInProgress, suspendedExpirationTime, rootExpirationTime, -1 // Indicates no timeout
> );
> return;
> } else if (
> // There's no lower priority work, but we're rendering asynchronously.
> // Synchronsouly attempt to render the same level one more time. This is
> // similar to a suspend, but without a timeout because we're not waiting
> // for a promise to resolve.
> !root.didError && !isExpired) {
> root.didError = true;
> var _suspendedExpirationTime = root.nextExpirationTimeToWorkOn = expirationTime;
> var _rootExpirationTime = root.expirationTime = Sync;
> onSuspend(root, rootWorkInProgress, _suspendedExpirationTime, _rootExpirationTime, -1 // Indicates no timeout
> );
> return;
16607,16612d16664
< } else {
< stopWorkLoopTimer(interruptedBy, didCompleteRoot);
< interruptedBy = null;
< // There's more work to do, but we ran out of time. Yield back to
< // the renderer.
< return null;
16613a16666,16697
>
> if (enableSuspense && !isExpired && nextLatestAbsoluteTimeoutMs !== -1) {
> // The tree was suspended.
> var _suspendedExpirationTime2 = expirationTime;
> markSuspendedPriorityLevel(root, _suspendedExpirationTime2);
>
> // Find the earliest uncommitted expiration time in the tree, including
> // work that is suspended. The timeout threshold cannot be longer than
> // the overall expiration.
> var earliestExpirationTime = findEarliestOutstandingPriorityLevel(root, expirationTime);
> var earliestExpirationTimeMs = expirationTimeToMs(earliestExpirationTime);
> if (earliestExpirationTimeMs < nextLatestAbsoluteTimeoutMs) {
> nextLatestAbsoluteTimeoutMs = earliestExpirationTimeMs;
> }
>
> // Subtract the current time from the absolute timeout to get the number
> // of milliseconds until the timeout. In other words, convert an absolute
> // timestamp to a relative time. This is the value that is passed
> // to `setTimeout`.
> var currentTimeMs = expirationTimeToMs(requestCurrentTime());
> var msUntilTimeout = nextLatestAbsoluteTimeoutMs - currentTimeMs;
> msUntilTimeout = msUntilTimeout < 0 ? 0 : msUntilTimeout;
>
> // TODO: Account for the Just Noticeable Difference
>
> var _rootExpirationTime2 = root.expirationTime;
> onSuspend(root, rootWorkInProgress, _suspendedExpirationTime2, _rootExpirationTime2, msUntilTimeout);
> return;
> }
>
> // Ready to commit.
> onComplete(root, rootWorkInProgress, expirationTime);
16617c16701
< !(!isWorking || isCommitting$1) ? invariant_1(false, 'dispatch: Cannot dispatch during the render phase.') : void 0;
---
> !(!isWorking || isCommitting$1) ? invariant(false, 'dispatch: Cannot dispatch during the render phase.') : void 0;
16622a16707
> case ClassComponentLazy:
16628,16629c16713,16714
< enqueueUpdate(fiber, update, expirationTime);
< scheduleWork$1(fiber, expirationTime);
---
> enqueueUpdate(fiber, update);
> scheduleWork(fiber, expirationTime);
16637,16638c16722,16723
< enqueueUpdate(fiber, _update, expirationTime);
< scheduleWork$1(fiber, expirationTime);
---
> enqueueUpdate(fiber, _update);
> scheduleWork(fiber, expirationTime);
16651,16652c16736,16737
< enqueueUpdate(rootFiber, _update2, expirationTime);
< scheduleWork$1(rootFiber, expirationTime);
---
> enqueueUpdate(rootFiber, _update2);
> scheduleWork(rootFiber, expirationTime);
16660,16684c16745,16747
< function computeAsyncExpiration(currentTime) {
< // Given the current clock time, returns an expiration time. We use rounding
< // to batch like updates together.
< // Should complete within ~5000ms. 5250ms max.
< var expirationMs = 5000;
< var bucketSizeMs = 250;
< return computeExpirationBucket(currentTime, expirationMs, bucketSizeMs);
< }
<
< function computeInteractiveExpiration(currentTime) {
< var expirationMs = void 0;
< // We intentionally set a higher expiration time for interactive updates in
< // dev than in production.
< // If the main thread is being blocked so long that you hit the expiration,
< // it's a problem that could be solved with better scheduling.
< // People will be more likely to notice this and fix it with the long
< // expiration time in development.
< // In production we opt for better UX at the risk of masking scheduling
< // problems, by expiring fast.
< {
< // Should complete within ~500ms. 600ms max.
< expirationMs = 500;
< }
< var bucketSizeMs = 100;
< return computeExpirationBucket(currentTime, expirationMs, bucketSizeMs);
---
> function computeThreadID(expirationTime, interactionThreadID) {
> // Interaction threads are unique per root and expiration time.
> return expirationTime * 1000 + interactionThreadID;
16689c16752
< var currentTime = recalculateCurrentTime();
---
> var currentTime = requestCurrentTime();
16726a16790,16794
> // If we're in the middle of rendering a tree, do not update at the same
> // expiration time that is already rendering.
> if (nextRoot !== null && expirationTime === nextRenderExpirationTime) {
> expirationTime += 1;
> }
16736,16737c16804,16805
< if (lowestPendingInteractiveExpirationTime === NoWork || expirationTime > lowestPendingInteractiveExpirationTime) {
< lowestPendingInteractiveExpirationTime = expirationTime;
---
> if (lowestPriorityPendingInteractiveExpirationTime === NoWork || expirationTime > lowestPriorityPendingInteractiveExpirationTime) {
> lowestPriorityPendingInteractiveExpirationTime = expirationTime;
16743,16744c16811
< // TODO: Rename this to scheduleTimeout or something
< function suspendRoot(root, thenable, timeoutMs, suspendedTime) {
---
> function renderDidSuspend(root, absoluteTimeoutMs, suspendedTime) {
16746,16747c16813,16814
< if (timeoutMs >= 0 && nextLatestTimeoutMs < timeoutMs) {
< nextLatestTimeoutMs = timeoutMs;
---
> if (absoluteTimeoutMs >= 0 && nextLatestAbsoluteTimeoutMs < absoluteTimeoutMs) {
> nextLatestAbsoluteTimeoutMs = absoluteTimeoutMs;
16751,16756c16818,16819
< function retrySuspendedRoot(root, suspendedTime) {
< markPingedPriorityLevel(root, suspendedTime);
< var retryTime = findNextPendingPriorityLevel(root);
< if (retryTime !== NoWork) {
< requestRetry(root, retryTime);
< }
---
> function renderDidError() {
> nextRenderDidError = true;
16759,16760c16822,16824
< function scheduleWork$1(fiber, expirationTime) {
< recordScheduleUpdate();
---
> function retrySuspendedRoot(root, fiber, suspendedTime) {
> if (enableSuspense) {
> var retryTime = void 0;
16762,16765c16826,16851
< {
< if (fiber.tag === ClassComponent) {
< var instance = fiber.stateNode;
< warnAboutInvalidUpdates(instance);
---
> if (isPriorityLevelSuspended(root, suspendedTime)) {
> // Ping at the original level
> retryTime = suspendedTime;
> markPingedPriorityLevel(root, retryTime);
> } else {
> // Placeholder already timed out. Compute a new expiration time
> var currentTime = requestCurrentTime();
> retryTime = computeExpirationForFiber(currentTime, fiber);
> markPendingPriorityLevel(root, retryTime);
> }
>
> scheduleWorkToRoot(fiber, retryTime);
> var rootExpirationTime = root.expirationTime;
> if (rootExpirationTime !== NoWork) {
> if (enableSchedulerTracking) {
> // Restore previous interactions so that new work is associated with them.
> var prevInteractions = interactionsRef.current;
> interactionsRef.current = root.memoizedInteractions;
> // Because suspense timeouts do not decrement the interaction count,
> // Continued suspense work should also not increment the count.
> storeInteractionsForExpirationTime(root, rootExpirationTime, false);
> requestWork(root, rootExpirationTime);
> interactionsRef.current = prevInteractions;
> } else {
> requestWork(root, rootExpirationTime);
> }
16767a16854
> }
16769c16856,16869
< var node = fiber;
---
> function scheduleWorkToRoot(fiber, expirationTime) {
> // Update the source fiber's expiration time
> if (fiber.expirationTime === NoWork || fiber.expirationTime > expirationTime) {
> fiber.expirationTime = expirationTime;
> }
> var alternate = fiber.alternate;
> if (alternate !== null && (alternate.expirationTime === NoWork || alternate.expirationTime > expirationTime)) {
> alternate.expirationTime = expirationTime;
> }
> // Walk the parent path to the root and update the child expiration time.
> var node = fiber.return;
> if (node === null && fiber.tag === HostRoot) {
> return fiber.stateNode;
> }
16771,16808c16871,16875
< // Walk the parent path to the root and update each node's
< // expiration time.
< if (node.expirationTime === NoWork || node.expirationTime > expirationTime) {
< node.expirationTime = expirationTime;
< }
< if (node.alternate !== null) {
< if (node.alternate.expirationTime === NoWork || node.alternate.expirationTime > expirationTime) {
< node.alternate.expirationTime = expirationTime;
< }
< }
< if (node.return === null) {
< if (node.tag === HostRoot) {
< var root = node.stateNode;
< if (!isWorking && nextRenderExpirationTime !== NoWork && expirationTime < nextRenderExpirationTime) {
< // This is an interruption. (Used for performance tracking.)
< interruptedBy = fiber;
< resetStack();
< }
< markPendingPriorityLevel(root, expirationTime);
< var nextExpirationTimeToWorkOn = findNextPendingPriorityLevel(root);
< if (
< // If we're in the render phase, we don't need to schedule this root
< // for an update, because we'll do it before we exit...
< !isWorking || isCommitting$1 ||
< // ...unless this is a different root than the one we're rendering.
< nextRoot !== root) {
< requestWork(root, nextExpirationTimeToWorkOn);
< }
< if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
< invariant_1(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');
< }
< } else {
< {
< if (fiber.tag === ClassComponent) {
< warnAboutUpdateOnUnmounted(fiber);
< }
< }
< return;
---
> alternate = node.alternate;
> if (node.childExpirationTime === NoWork || node.childExpirationTime > expirationTime) {
> node.childExpirationTime = expirationTime;
> if (alternate !== null && (alternate.childExpirationTime === NoWork || alternate.childExpirationTime > expirationTime)) {
> alternate.childExpirationTime = expirationTime;
16809a16877,16881
> } else if (alternate !== null && (alternate.childExpirationTime === NoWork || alternate.childExpirationTime > expirationTime)) {
> alternate.childExpirationTime = expirationTime;
> }
> if (node.return === null && node.tag === HostRoot) {
> return node.stateNode;
16812a16885
> return null;
16815,16819c16888,16921
< function recalculateCurrentTime() {
< // Subtract initial time so it fits inside 32bits
< mostRecentCurrentTimeMs = now() - originalStartTimeMs;
< mostRecentCurrentTime = msToExpirationTime(mostRecentCurrentTimeMs);
< return mostRecentCurrentTime;
---
> function storeInteractionsForExpirationTime(root, expirationTime, updateInteractionCounts) {
> if (!enableSchedulerTracking) {
> return;
> }
>
> var interactions = interactionsRef.current;
> if (interactions.size > 0) {
> var pendingInteractions = root.pendingInteractionMap.get(expirationTime);
> if (pendingInteractions != null) {
> interactions.forEach(function (interaction) {
> if (updateInteractionCounts && !pendingInteractions.has(interaction)) {
> // Update the pending async work count for previously unscheduled interaction.
> interaction.__count++;
> }
>
> pendingInteractions.add(interaction);
> });
> } else {
> root.pendingInteractionMap.set(expirationTime, new Set(interactions));
>
> // Update the pending async work count for the current interactions.
> if (updateInteractionCounts) {
> interactions.forEach(function (interaction) {
> interaction.__count++;
> });
> }
> }
>
> var subscriber = subscriberRef.current;
> if (subscriber !== null) {
> var threadID = computeThreadID(expirationTime, root.interactionThreadID);
> subscriber.onWorkScheduled(interactions, threadID);
> }
> }
16822,16829c16924,16964
< function deferredUpdates(fn) {
< var previousExpirationContext = expirationContext;
< var currentTime = recalculateCurrentTime();
< expirationContext = computeAsyncExpiration(currentTime);
< try {
< return fn();
< } finally {
< expirationContext = previousExpirationContext;
---
> function scheduleWork(fiber, expirationTime) {
> recordScheduleUpdate();
>
> {
> if (fiber.tag === ClassComponent || fiber.tag === ClassComponentLazy) {
> var instance = fiber.stateNode;
> warnAboutInvalidUpdates(instance);
> }
> }
>
> var root = scheduleWorkToRoot(fiber, expirationTime);
> if (root === null) {
> if (true && (fiber.tag === ClassComponent || fiber.tag === ClassComponentLazy)) {
> warnAboutUpdateOnUnmounted(fiber);
> }
> return;
> }
>
> if (enableSchedulerTracking) {
> storeInteractionsForExpirationTime(root, expirationTime, true);
> }
>
> if (!isWorking && nextRenderExpirationTime !== NoWork && expirationTime < nextRenderExpirationTime) {
> // This is an interruption. (Used for performance tracking.)
> interruptedBy = fiber;
> resetStack();
> }
> markPendingPriorityLevel(root, expirationTime);
> if (
> // If we're in the render phase, we don't need to schedule this root
> // for an update, because we'll do it before we exit...
> !isWorking || isCommitting$1 ||
> // ...unless this is a different root than the one we're rendering.
> nextRoot !== root) {
> var rootExpirationTime = root.expirationTime;
> requestWork(root, rootExpirationTime);
> }
> if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
> // Reset this back to zero so subsequent updates don't throw.
> nestedUpdateCount = 0;
> invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');
16831a16967
>
16854c16990
< var lowestPendingInteractiveExpirationTime = NoWork;
---
> var lowestPriorityPendingInteractiveExpirationTime = NoWork;
16865a17002,17005
> var originalStartTimeMs = unstable_now();
> var currentRendererTime = msToExpirationTime(originalStartTimeMs);
> var currentSchedulerTime = currentRendererTime;
>
16867c17007
< var NESTED_UPDATE_LIMIT = 1000;
---
> var NESTED_UPDATE_LIMIT = 50;
16868a17009
> var lastCommittedRootDuringThisBatch = null;
16872c17013,17018
< function scheduleCallbackWithExpiration(expirationTime) {
---
> function recomputeCurrentRendererTime() {
> var currentTimeMs = unstable_now() - originalStartTimeMs;
> currentRendererTime = msToExpirationTime(currentTimeMs);
> }
>
> function scheduleCallbackWithExpirationTime(root, expirationTime) {
16882c17028
< cancelDeferredCallback(callbackID);
---
> unstable_cancelScheduledWork(callbackID);
16890,16894d17035
< // Compute a timeout for the given expiration time.
< var currentMs = now() - originalStartTimeMs;
< var expirationMs = expirationTimeToMs(expirationTime);
< var timeout = expirationMs - currentMs;
<
16896c17037,17040
< callbackID = scheduleDeferredCallback(performAsyncWork, { timeout: timeout });
---
> var currentMs = unstable_now() - originalStartTimeMs;
> var expirationTimeMs = expirationTimeToMs(expirationTime);
> var timeout = expirationTimeMs - currentMs;
> callbackID = unstable_scheduleWork(performAsyncWork, { timeout: timeout });
16899,16904c17043,17122
< function requestRetry(root, expirationTime) {
< if (root.remainingExpirationTime === NoWork || root.remainingExpirationTime < expirationTime) {
< // For a retry, only update the remaining expiration time if it has a
< // *lower priority* than the existing value. This is because, on a retry,
< // we should attempt to coalesce as much as possible.
< requestWork(root, expirationTime);
---
> // For every call to renderRoot, one of onFatal, onComplete, onSuspend, and
> // onYield is called upon exiting. We use these in lieu of returning a tuple.
> // I've also chosen not to inline them into renderRoot because these will
> // eventually be lifted into the renderer.
> function onFatal(root) {
> root.finishedWork = null;
> }
>
> function onComplete(root, finishedWork, expirationTime) {
> root.pendingCommitExpirationTime = expirationTime;
> root.finishedWork = finishedWork;
> }
>
> function onSuspend(root, finishedWork, suspendedExpirationTime, rootExpirationTime, msUntilTimeout) {
> root.expirationTime = rootExpirationTime;
> if (enableSuspense && msUntilTimeout === 0 && !shouldYield()) {
> // Don't wait an additional tick. Commit the tree immediately.
> root.pendingCommitExpirationTime = suspendedExpirationTime;
> root.finishedWork = finishedWork;
> } else if (msUntilTimeout > 0) {
> // Wait `msUntilTimeout` milliseconds before committing.
> root.timeoutHandle = scheduleTimeout(onTimeout.bind(null, root, finishedWork, suspendedExpirationTime), msUntilTimeout);
> }
> }
>
> function onYield(root) {
> root.finishedWork = null;
> }
>
> function onTimeout(root, finishedWork, suspendedExpirationTime) {
> if (enableSuspense) {
> // The root timed out. Commit it.
> root.pendingCommitExpirationTime = suspendedExpirationTime;
> root.finishedWork = finishedWork;
> // Read the current time before entering the commit phase. We can be
> // certain this won't cause tearing related to batching of event updates
> // because we're at the top of a timer event.
> recomputeCurrentRendererTime();
> currentSchedulerTime = currentRendererTime;
>
> if (enableSchedulerTracking) {
> // Don't update pending interaction counts for suspense timeouts,
> // Because we know we still need to do more work in this case.
> suspenseDidTimeout = true;
> flushRoot(root, suspendedExpirationTime);
> suspenseDidTimeout = false;
> } else {
> flushRoot(root, suspendedExpirationTime);
> }
> }
> }
>
> function onCommit(root, expirationTime) {
> root.expirationTime = expirationTime;
> root.finishedWork = null;
> }
>
> function requestCurrentTime() {
> // requestCurrentTime is called by the scheduler to compute an expiration
> // time.
> //
> // Expiration times are computed by adding to the current time (the start
> // time). However, if two updates are scheduled within the same event, we
> // should treat their start times as simultaneous, even if the actual clock
> // time has advanced between the first and second call.
>
> // In other words, because expiration times determine how updates are batched,
> // we want all updates of like priority that occur within the same event to
> // receive the same expiration time. Otherwise we get tearing.
> //
> // We keep track of two separate times: the current "renderer" time and the
> // current "scheduler" time. The renderer time can be updated whenever; it
> // only exists to minimize the calls performance.now.
> //
> // But the scheduler time can only be updated if there's no pending work, or
> // if we know for certain that we're not in the middle of an event.
>
> if (isRendering) {
> // We're already rendering. Return the most recently read time.
> return currentSchedulerTime;
16905a17124,17138
> // Check if there's pending work.
> findHighestPriorityRoot();
> if (nextFlushedExpirationTime === NoWork || nextFlushedExpirationTime === Never) {
> // If there's no pending work, or if the pending work is offscreen, we can
> // read the current time without risk of tearing.
> recomputeCurrentRendererTime();
> currentSchedulerTime = currentRendererTime;
> return currentSchedulerTime;
> }
> // There's already pending work. We might be in the middle of a browser
> // event. If we were to read the current time, it could cause multiple updates
> // within the same event to receive different expiration times, leading to
> // tearing. Return the last read time. During the next idle callback, the
> // time will be updated.
> return currentSchedulerTime;
16912d17144
<
16926c17158
< performWorkOnRoot(root, Sync, false);
---
> performWorkOnRoot(root, Sync, true);
16935c17167
< scheduleCallbackWithExpiration(expirationTime);
---
> scheduleCallbackWithExpirationTime(root, expirationTime);
16944c17176
< root.remainingExpirationTime = expirationTime;
---
> root.expirationTime = expirationTime;
16955c17187
< var remainingExpirationTime = root.remainingExpirationTime;
---
> var remainingExpirationTime = root.expirationTime;
16958c17190
< root.remainingExpirationTime = expirationTime;
---
> root.expirationTime = expirationTime;
16970c17202
< var remainingExpirationTime = root.remainingExpirationTime;
---
> var remainingExpirationTime = root.expirationTime;
16977c17209
< !(previousScheduledRoot !== null && lastScheduledRoot !== null) ? invariant_1(false, 'Should have a previous and last root. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(previousScheduledRoot !== null && lastScheduledRoot !== null) ? invariant(false, 'Should have a previous and last root. This error is likely caused by a bug in React. Please file an issue.') : void 0;
17008a17241,17245
> if (highestPriorityWork === Sync) {
> // Sync is highest priority by definition so
> // we can stop searching.
> break;
> }
17015,17023d17251
< // If the next root is the same as the previous root, this is a nested
< // update. To prevent an infinite loop, increment the nested update count.
< var previousFlushedRoot = nextFlushedRoot;
< if (previousFlushedRoot !== null && previousFlushedRoot === highestPriorityRoot && highestPriorityWork === Sync) {
< nestedUpdateCount++;
< } else {
< // Reset whenever we switch roots.
< nestedUpdateCount = 0;
< }
17029c17257
< performWork(NoWork, true, dl);
---
> performWork(NoWork, dl);
17033c17261
< performWork(Sync, false, null);
---
> performWork(Sync, null);
17036c17264
< function performWork(minExpirationTime, isAsync, dl) {
---
> function performWork(minExpirationTime, dl) {
17039c17267
< // Keep working on roots until there's no more work, or until the we reach
---
> // Keep working on roots until there's no more work, or until we reach
17043,17045c17271,17273
< if (enableProfilerTimer) {
< resumeActualRenderTimerIfPaused();
< }
---
> if (deadline !== null) {
> recomputeCurrentRendererTime();
> currentSchedulerTime = currentRendererTime;
17047,17051c17275,17279
< if (enableUserTimingAPI && deadline !== null) {
< var didExpire = nextFlushedExpirationTime < recalculateCurrentTime();
< var timeout = expirationTimeToMs(nextFlushedExpirationTime);
< stopRequestCallbackTimer(didExpire, timeout);
< }
---
> if (enableUserTimingAPI) {
> var didExpire = nextFlushedExpirationTime < currentRendererTime;
> var timeout = expirationTimeToMs(nextFlushedExpirationTime);
> stopRequestCallbackTimer(didExpire, timeout);
> }
17053,17056c17281,17282
< if (isAsync) {
< while (nextFlushedRoot !== null && nextFlushedExpirationTime !== NoWork && (minExpirationTime === NoWork || minExpirationTime >= nextFlushedExpirationTime) && (!deadlineDidExpire || recalculateCurrentTime() >= nextFlushedExpirationTime)) {
< recalculateCurrentTime();
< performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime, !deadlineDidExpire);
---
> while (nextFlushedRoot !== null && nextFlushedExpirationTime !== NoWork && (minExpirationTime === NoWork || minExpirationTime >= nextFlushedExpirationTime) && (!deadlineDidExpire || currentRendererTime >= nextFlushedExpirationTime)) {
> performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime, currentRendererTime >= nextFlushedExpirationTime);
17057a17284,17285
> recomputeCurrentRendererTime();
> currentSchedulerTime = currentRendererTime;
17061c17289
< performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime, false);
---
> performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime, true);
17076c17304
< scheduleCallbackWithExpiration(nextFlushedExpirationTime);
---
> scheduleCallbackWithExpirationTime(nextFlushedRoot, nextFlushedExpirationTime);
17087c17315
< !!isRendering ? invariant_1(false, 'work.commit(): Cannot commit while already rendering. This likely means you attempted to commit from inside a lifecycle method.') : void 0;
---
> !!isRendering ? invariant(false, 'work.commit(): Cannot commit while already rendering. This likely means you attempted to commit from inside a lifecycle method.') : void 0;
17093c17321
< performWorkOnRoot(root, expirationTime, false);
---
> performWorkOnRoot(root, expirationTime, true);
17096d17323
< finishRendering();
17100a17328
> lastCommittedRootDuringThisBatch = null;
17126,17127c17354,17355
< function performWorkOnRoot(root, expirationTime, isAsync) {
< !!isRendering ? invariant_1(false, 'performWorkOnRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> function performWorkOnRoot(root, expirationTime, isExpired) {
> !!isRendering ? invariant(false, 'performWorkOnRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;
17132,17133c17360,17365
< if (!isAsync) {
< // Flush sync work.
---
> if (deadline === null || isExpired) {
> // Flush work without yielding.
> // TODO: Non-yieldy work does not necessarily imply expired work. A renderer
> // may want to perform some work without yielding, but also without
> // requiring the root to complete (by triggering placeholders).
>
17139c17371,17382
< finishedWork = renderRoot(root, expirationTime, false);
---
> root.finishedWork = null;
> // If this root previously suspended, clear its existing timeout, since
> // we're about to try rendering again.
> var timeoutHandle = root.timeoutHandle;
> if (enableSuspense && timeoutHandle !== noTimeout) {
> root.timeoutHandle = noTimeout;
> // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
> cancelTimeout(timeoutHandle);
> }
> var isYieldy = false;
> renderRoot(root, isYieldy, isExpired);
> finishedWork = root.finishedWork;
17152c17395,17406
< _finishedWork = renderRoot(root, expirationTime, true);
---
> root.finishedWork = null;
> // If this root previously suspended, clear its existing timeout, since
> // we're about to try rendering again.
> var _timeoutHandle = root.timeoutHandle;
> if (enableSuspense && _timeoutHandle !== noTimeout) {
> root.timeoutHandle = noTimeout;
> // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
> cancelTimeout(_timeoutHandle);
> }
> var _isYieldy = true;
> renderRoot(root, _isYieldy, isExpired);
> _finishedWork = root.finishedWork;
17163,17168d17416
<
< if (enableProfilerTimer) {
< // If we didn't finish, pause the "actual" render timer.
< // We'll restart it when we resume work.
< pauseActualRenderTimerIfRunning();
< }
17190c17438
< root.remainingExpirationTime = NoWork;
---
> root.expirationTime = NoWork;
17197c17445,17457
< root.remainingExpirationTime = commitRoot(finishedWork);
---
>
> // Check if this is a nested update (a sync update scheduled during the
> // commit phase).
> if (root === lastCommittedRootDuringThisBatch) {
> // If the next root is the same as the previous root, this is a nested
> // update. To prevent an infinite loop, increment the nested update count.
> nestedUpdateCount++;
> } else {
> // Reset whenever we switch roots.
> lastCommittedRootDuringThisBatch = root;
> nestedUpdateCount = 0;
> }
> commitRoot(root, finishedWork);
17203,17204c17463,17464
< if (deadline === null) {
< return false;
---
> if (deadlineDidExpire) {
> return true;
17206c17466
< if (deadline.timeRemaining() > timeHeuristicForUnitOfWork) {
---
> if (deadline === null || deadline.timeRemaining() > timeHeuristicForUnitOfWork) {
17216c17476
< !(nextFlushedRoot !== null) ? invariant_1(false, 'Should be working on a root. This error is likely caused by a bug in React. Please file an issue.') : void 0;
---
> !(nextFlushedRoot !== null) ? invariant(false, 'Should be working on a root. This error is likely caused by a bug in React. Please file an issue.') : void 0;
17219c17479
< nextFlushedRoot.remainingExpirationTime = NoWork;
---
> nextFlushedRoot.expirationTime = NoWork;
17226,17231d17485
< function onBlock(remainingExpirationTime) {
< !(nextFlushedRoot !== null) ? invariant_1(false, 'Should be working on a root. This error is likely caused by a bug in React. Please file an issue.') : void 0;
< // This root was blocked. Unschedule it until there's another update.
< nextFlushedRoot.remainingExpirationTime = remainingExpirationTime;
< }
<
17264c17518
< !!isRendering ? invariant_1(false, 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.') : void 0;
---
> !!isRendering ? invariant(false, 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.') : void 0;
17283c17537
< if (!isBatchingUpdates && !isRendering && lowestPendingInteractiveExpirationTime !== NoWork) {
---
> if (!isBatchingUpdates && !isRendering && lowestPriorityPendingInteractiveExpirationTime !== NoWork) {
17285,17286c17539,17540
< performWork(lowestPendingInteractiveExpirationTime, false, null);
< lowestPendingInteractiveExpirationTime = NoWork;
---
> performWork(lowestPriorityPendingInteractiveExpirationTime, null);
> lowestPriorityPendingInteractiveExpirationTime = NoWork;
17304c17558
< if (!isRendering && lowestPendingInteractiveExpirationTime !== NoWork) {
---
> if (!isRendering && lowestPriorityPendingInteractiveExpirationTime !== NoWork) {
17306,17307c17560,17561
< performWork(lowestPendingInteractiveExpirationTime, false, null);
< lowestPendingInteractiveExpirationTime = NoWork;
---
> performWork(lowestPriorityPendingInteractiveExpirationTime, null);
> lowestPriorityPendingInteractiveExpirationTime = NoWork;
17319c17573
< performWork(Sync, false, null);
---
> performWork(Sync, null);
17336c17590
< return emptyObject_1;
---
> return emptyContextObject;
17341c17595,17608
< return isContextProvider(fiber) ? processChildContext(fiber, parentContext) : parentContext;
---
>
> if (fiber.tag === ClassComponent) {
> var Component = fiber.type;
> if (isContextProvider(Component)) {
> return processChildContext(fiber, Component, parentContext);
> }
> } else if (fiber.tag === ClassComponentLazy) {
> var _Component = getResultFromResolvedThenable(fiber.type);
> if (isContextProvider(_Component)) {
> return processChildContext(fiber, _Component, parentContext);
> }
> }
>
> return parentContext;
17344c17611
< function scheduleRootUpdate(current, element, expirationTime, callback) {
---
> function scheduleRootUpdate(current$$1, element, expirationTime, callback) {
17346c17613
< if (ReactDebugCurrentFiber.phase === 'render' && ReactDebugCurrentFiber.current !== null && !didWarnAboutNestedUpdates) {
---
> if (phase === 'render' && current !== null && !didWarnAboutNestedUpdates) {
17348c17615
< warning_1(false, '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\n' + 'Check the render method of %s.', getComponentName(ReactDebugCurrentFiber.current) || 'Unknown');
---
> warningWithoutStack$1(false, '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\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown');
17359c17626
< !(typeof callback === 'function') ? warning_1(false, 'render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback) : void 0;
---
> !(typeof callback === 'function') ? warningWithoutStack$1(false, 'render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback) : void 0;
17362c17629
< enqueueUpdate(current, update, expirationTime);
---
> enqueueUpdate(current$$1, update);
17364c17631
< scheduleWork$1(current, expirationTime);
---
> scheduleWork(current$$1, expirationTime);
17370c17637
< var current = container.current;
---
> var current$$1 = container.current;
17374c17641
< if (current.alternate === null) {
---
> if (current$$1.alternate === null) {
17391c17658
< return scheduleRootUpdate(current, element, expirationTime, callback);
---
> return scheduleRootUpdate(current$$1, element, expirationTime, callback);
17398c17665
< invariant_1(false, 'Unable to find node on an unmounted component.');
---
> invariant(false, 'Unable to find node on an unmounted component.');
17400c17667
< invariant_1(false, 'Argument appears to not be a ReactComponent. Keys: %s', Object.keys(component));
---
> invariant(false, 'Argument appears to not be a ReactComponent. Keys: %s', Object.keys(component));
17415,17417c17682,17684
< var current = container.current;
< var currentTime = recalculateCurrentTime();
< var expirationTime = computeExpirationForFiber(currentTime, current);
---
> var current$$1 = container.current;
> var currentTime = requestCurrentTime();
> var expirationTime = computeExpirationForFiber(currentTime, current$$1);
17466,17488d17732
<
<
< var DOMRenderer = Object.freeze({
< updateContainerAtExpirationTime: updateContainerAtExpirationTime,
< createContainer: createContainer,
< updateContainer: updateContainer,
< flushRoot: flushRoot,
< requestWork: requestWork,
< computeUniqueAsyncExpiration: computeUniqueAsyncExpiration,
< batchedUpdates: batchedUpdates$1,
< unbatchedUpdates: unbatchedUpdates,
< deferredUpdates: deferredUpdates,
< syncUpdates: syncUpdates,
< interactiveUpdates: interactiveUpdates$1,
< flushInteractiveUpdates: flushInteractiveUpdates$1,
< flushControlled: flushControlled,
< flushSync: flushSync,
< getPublicRootInstance: getPublicRootInstance,
< findHostInstance: findHostInstance,
< findHostInstanceWithNoPortals: findHostInstanceWithNoPortals,
< injectIntoDevTools: injectIntoDevTools
< });
<
17506c17750
< var ReactVersion = '16.4.2';
---
> var ReactVersion = '16.4.3-alpha.0';
17509a17754,17755
> var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
>
17520c17766
< warning_1(false, 'React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
---
> warningWithoutStack$1(false, 'React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
17527c17773
< !(hostInstance.parentNode === container) ? warning_1(false, 'render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.') : void 0;
---
> !(hostInstance.parentNode === container) ? warningWithoutStack$1(false, 'render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.') : void 0;
17535c17781
< !(!hasNonRootReactChild || isRootRenderedBySomeReact) ? warning_1(false, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0;
---
> !(!hasNonRootReactChild || isRootRenderedBySomeReact) ? warningWithoutStack$1(false, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0;
17537c17783
< !(container.nodeType !== ELEMENT_NODE || !container.tagName || container.tagName.toUpperCase() !== 'BODY') ? warning_1(false, 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0;
---
> !(container.nodeType !== ELEMENT_NODE || !container.tagName || container.tagName.toUpperCase() !== 'BODY') ? warningWithoutStack$1(false, 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0;
17541c17787
< !(callback === null || typeof callback === 'function') ? warning_1(false, '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback) : void 0;
---
> !(callback === null || typeof callback === 'function') ? warningWithoutStack$1(false, '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback) : void 0;
17545c17791
< injection$2.injectFiberControlledHostComponent(ReactDOMFiberComponent);
---
> setRestoreImplementation(restoreControlledState$1);
17559c17805
< !this._defer ? invariant_1(false, 'batch.render: Cannot render a batch that already committed.') : void 0;
---
> !this._defer ? invariant(false, 'batch.render: Cannot render a batch that already committed.') : void 0;
17582c17828
< !(this._defer && firstBatch !== null) ? invariant_1(false, 'batch.commit: Cannot commit a batch multiple times.') : void 0;
---
> !(this._defer && firstBatch !== null) ? invariant(false, 'batch.commit: Cannot commit a batch multiple times.') : void 0;
17614c17860
< !(previous !== null) ? invariant_1(false, 'batch.commit: Cannot commit a batch multiple times.') : void 0;
---
> !(previous !== null) ? invariant(false, 'batch.commit: Cannot commit a batch multiple times.') : void 0;
17682c17928
< !(typeof _callback2 === 'function') ? invariant_1(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback2) : void 0;
---
> !(typeof _callback2 === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback2) : void 0;
17784c18030
< injection$3.injectRenderer(DOMRenderer);
---
> setBatchingImplementation(batchedUpdates$1, interactiveUpdates$1, flushInteractiveUpdates$1);
17798c18044
< warning_1(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.');
---
> warningWithoutStack$1(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.');
17817c18063
< !isValidContainer(container) ? invariant_1(false, 'Target container is not a DOM element.') : void 0;
---
> !isValidContainer(container) ? invariant(false, 'Target container is not a DOM element.') : void 0;
17865c18111
< !isValidContainer(container) ? invariant_1(false, 'Target container is not a DOM element.') : void 0;
---
> !isValidContainer(container) ? invariant(false, 'Target container is not a DOM element.') : void 0;
17878c18124
< !warnedAboutRefsInRender ? warning_1(false, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(owner) || 'A component') : void 0;
---
> !warnedAboutRefsInRender ? warningWithoutStack$1(false, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(owner.type) || 'A component') : void 0;
17899c18145
< !(parentComponent != null && has(parentComponent)) ? invariant_1(false, 'parentComponent must be a valid React Component') : void 0;
---
> !(parentComponent != null && has(parentComponent)) ? invariant(false, 'parentComponent must be a valid React Component') : void 0;
17903c18149
< !isValidContainer(container) ? invariant_1(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : void 0;
---
> !isValidContainer(container) ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : void 0;
17909c18155
< !!renderedByDifferentReact ? warning_1(false, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.') : void 0;
---
> !!renderedByDifferentReact ? warningWithoutStack$1(false, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.') : void 0;
17927c18173
< var isContainerReactRoot = container.nodeType === 1 && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;
---
> var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;
17929c18175
< !!hasNonRootReactChild ? warning_1(false, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0;
---
> !!hasNonRootReactChild ? warningWithoutStack$1(false, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0;
17950,17951d18195
< unstable_deferredUpdates: deferredUpdates,
<
17970a18215
> !isValidContainer(container) ? invariant(false, 'unstable_createRoot(...): Target container is not a DOM element.') : void 0;
17983c18228
< if (!foundDevTools && ExecutionEnvironment_1.canUseDOM && window.top === window.self) {
---
> if (!foundDevTools && canUseDOM && window.top === window.self) {
18005c18250
< var reactDom = ReactDOM$3.default ? ReactDOM$3.default : ReactDOM$3;
---
> var reactDom = ReactDOM$3.default || ReactDOM$3;
This file has been truncated, but you can view the full file.
1c1
< /** @license React v16.4.2
---
> /** @license React v16.4.3-alpha.0
13,5645c13,240
< "use strict";
< var aa = require("fbjs/lib/invariant"),
< ba = require("react"),
< m = require("fbjs/lib/ExecutionEnvironment"),
< p = require("object-assign"),
< v = require("fbjs/lib/emptyFunction"),
< da = require("fbjs/lib/getActiveElement"),
< ea = require("fbjs/lib/shallowEqual"),
< fa = require("fbjs/lib/containsNode"),
< ha = require("fbjs/lib/emptyObject");
< function A(a) {
< for (
< var b = arguments.length - 1,
< c = "https://reactjs.org/docs/error-decoder.html?invariant=" + a,
< d = 0;
< d < b;
< d++
< )
< c += "&args[]=" + encodeURIComponent(arguments[d + 1]);
< aa(
< !1,
< "Minified React error #" +
< a +
< "; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",
< c
< );
< }
< ba ? void 0 : A("227");
< function ia(a, b, c, d, e, f, g, h, k) {
< this._hasCaughtError = !1;
< this._caughtError = null;
< var n = Array.prototype.slice.call(arguments, 3);
< try {
< b.apply(c, n);
< } catch (r) {
< (this._caughtError = r), (this._hasCaughtError = !0);
< }
< }
< var B = {
< _caughtError: null,
< _hasCaughtError: !1,
< _rethrowError: null,
< _hasRethrowError: !1,
< invokeGuardedCallback: function(a, b, c, d, e, f, g, h, k) {
< ia.apply(B, arguments);
< },
< invokeGuardedCallbackAndCatchFirstError: function(a, b, c, d, e, f, g, h, k) {
< B.invokeGuardedCallback.apply(this, arguments);
< if (B.hasCaughtError()) {
< var n = B.clearCaughtError();
< B._hasRethrowError || ((B._hasRethrowError = !0), (B._rethrowError = n));
< }
< },
< rethrowCaughtError: function() {
< return ka.apply(B, arguments);
< },
< hasCaughtError: function() {
< return B._hasCaughtError;
< },
< clearCaughtError: function() {
< if (B._hasCaughtError) {
< var a = B._caughtError;
< B._caughtError = null;
< B._hasCaughtError = !1;
< return a;
< }
< A("198");
< }
< };
< function ka() {
< if (B._hasRethrowError) {
< var a = B._rethrowError;
< B._rethrowError = null;
< B._hasRethrowError = !1;
< throw a;
< }
< }
< var la = null,
< ma = {};
< function na() {
< if (la)
< for (var a in ma) {
< var b = ma[a],
< c = la.indexOf(a);
< -1 < c ? void 0 : A("96", a);
< if (!oa[c]) {
< b.extractEvents ? void 0 : A("97", a);
< oa[c] = b;
< c = b.eventTypes;
< for (var d in c) {
< var e = void 0;
< var f = c[d],
< g = b,
< h = d;
< pa.hasOwnProperty(h) ? A("99", h) : void 0;
< pa[h] = f;
< var k = f.phasedRegistrationNames;
< if (k) {
< for (e in k) k.hasOwnProperty(e) && qa(k[e], g, h);
< e = !0;
< } else
< f.registrationName
< ? (qa(f.registrationName, g, h), (e = !0))
< : (e = !1);
< e ? void 0 : A("98", d, a);
< }
< }
< }
< }
< function qa(a, b, c) {
< ra[a] ? A("100", a) : void 0;
< ra[a] = b;
< sa[a] = b.eventTypes[c].dependencies;
< }
< var oa = [],
< pa = {},
< ra = {},
< sa = {};
< function ta(a) {
< la ? A("101") : void 0;
< la = Array.prototype.slice.call(a);
< na();
< }
< function ua(a) {
< var b = !1,
< c;
< for (c in a)
< if (a.hasOwnProperty(c)) {
< var d = a[c];
< (ma.hasOwnProperty(c) && ma[c] === d) ||
< (ma[c] ? A("102", c) : void 0, (ma[c] = d), (b = !0));
< }
< b && na();
< }
< var va = {
< plugins: oa,
< eventNameDispatchConfigs: pa,
< registrationNameModules: ra,
< registrationNameDependencies: sa,
< possibleRegistrationNames: null,
< injectEventPluginOrder: ta,
< injectEventPluginsByName: ua
< },
< wa = null,
< xa = null,
< ya = null;
< function za(a, b, c, d) {
< b = a.type || "unknown-event";
< a.currentTarget = ya(d);
< B.invokeGuardedCallbackAndCatchFirstError(b, c, void 0, a);
< a.currentTarget = null;
< }
< function Aa(a, b) {
< null == b ? A("30") : void 0;
< if (null == a) return b;
< if (Array.isArray(a)) {
< if (Array.isArray(b)) return a.push.apply(a, b), a;
< a.push(b);
< return a;
< }
< return Array.isArray(b) ? [a].concat(b) : [a, b];
< }
< function Ba(a, b, c) {
< Array.isArray(a) ? a.forEach(b, c) : a && b.call(c, a);
< }
< var Ca = null;
< function Da(a, b) {
< if (a) {
< var c = a._dispatchListeners,
< d = a._dispatchInstances;
< if (Array.isArray(c))
< for (var e = 0; e < c.length && !a.isPropagationStopped(); e++)
< za(a, b, c[e], d[e]);
< else c && za(a, b, c, d);
< a._dispatchListeners = null;
< a._dispatchInstances = null;
< a.isPersistent() || a.constructor.release(a);
< }
< }
< function Ea(a) {
< return Da(a, !0);
< }
< function Fa(a) {
< return Da(a, !1);
< }
< var Ga = { injectEventPluginOrder: ta, injectEventPluginsByName: ua };
< function Ha(a, b) {
< var c = a.stateNode;
< if (!c) return null;
< var d = wa(c);
< if (!d) return null;
< c = d[b];
< a: switch (b) {
< case "onClick":
< case "onClickCapture":
< case "onDoubleClick":
< case "onDoubleClickCapture":
< case "onMouseDown":
< case "onMouseDownCapture":
< case "onMouseMove":
< case "onMouseMoveCapture":
< case "onMouseUp":
< case "onMouseUpCapture":
< (d = !d.disabled) ||
< ((a = a.type),
< (d = !(
< "button" === a ||
< "input" === a ||
< "select" === a ||
< "textarea" === a
< )));
< a = !d;
< break a;
< default:
< a = !1;
< }
< if (a) return null;
< c && "function" !== typeof c ? A("231", b, typeof c) : void 0;
< return c;
< }
< function Ia(a, b) {
< null !== a && (Ca = Aa(Ca, a));
< a = Ca;
< Ca = null;
< a &&
< (b ? Ba(a, Ea) : Ba(a, Fa), Ca ? A("95") : void 0, B.rethrowCaughtError());
< }
< function Ja(a, b, c, d) {
< for (var e = null, f = 0; f < oa.length; f++) {
< var g = oa[f];
< g && (g = g.extractEvents(a, b, c, d)) && (e = Aa(e, g));
< }
< Ia(e, !1);
< }
< var Ka = {
< injection: Ga,
< getListener: Ha,
< runEventsInBatch: Ia,
< runExtractedEventsInBatch: Ja
< },
< La = Math.random()
< .toString(36)
< .slice(2),
< C = "__reactInternalInstance$" + La,
< Ma = "__reactEventHandlers$" + La;
< function Na(a) {
< if (a[C]) return a[C];
< for (; !a[C]; )
< if (a.parentNode) a = a.parentNode;
< else return null;
< a = a[C];
< return 5 === a.tag || 6 === a.tag ? a : null;
< }
< function Oa(a) {
< if (5 === a.tag || 6 === a.tag) return a.stateNode;
< A("33");
< }
< function Pa(a) {
< return a[Ma] || null;
< }
< var Qa = {
< precacheFiberNode: function(a, b) {
< b[C] = a;
< },
< getClosestInstanceFromNode: Na,
< getInstanceFromNode: function(a) {
< a = a[C];
< return !a || (5 !== a.tag && 6 !== a.tag) ? null : a;
< },
< getNodeFromInstance: Oa,
< getFiberCurrentPropsFromNode: Pa,
< updateFiberProps: function(a, b) {
< a[Ma] = b;
< }
< };
< function F(a) {
< do a = a.return;
< while (a && 5 !== a.tag);
< return a ? a : null;
< }
< function Ra(a, b, c) {
< for (var d = []; a; ) d.push(a), (a = F(a));
< for (a = d.length; 0 < a--; ) b(d[a], "captured", c);
< for (a = 0; a < d.length; a++) b(d[a], "bubbled", c);
< }
< function Sa(a, b, c) {
< if ((b = Ha(a, c.dispatchConfig.phasedRegistrationNames[b])))
< (c._dispatchListeners = Aa(c._dispatchListeners, b)),
< (c._dispatchInstances = Aa(c._dispatchInstances, a));
< }
< function Ta(a) {
< a && a.dispatchConfig.phasedRegistrationNames && Ra(a._targetInst, Sa, a);
< }
< function Ua(a) {
< if (a && a.dispatchConfig.phasedRegistrationNames) {
< var b = a._targetInst;
< b = b ? F(b) : null;
< Ra(b, Sa, a);
< }
< }
< function Va(a, b, c) {
< a &&
< c &&
< c.dispatchConfig.registrationName &&
< (b = Ha(a, c.dispatchConfig.registrationName)) &&
< ((c._dispatchListeners = Aa(c._dispatchListeners, b)),
< (c._dispatchInstances = Aa(c._dispatchInstances, a)));
< }
< function Xa(a) {
< a && a.dispatchConfig.registrationName && Va(a._targetInst, null, a);
< }
< function Ya(a) {
< Ba(a, Ta);
< }
< function Za(a, b, c, d) {
< if (c && d)
< a: {
< var e = c;
< for (var f = d, g = 0, h = e; h; h = F(h)) g++;
< h = 0;
< for (var k = f; k; k = F(k)) h++;
< for (; 0 < g - h; ) (e = F(e)), g--;
< for (; 0 < h - g; ) (f = F(f)), h--;
< for (; g--; ) {
< if (e === f || e === f.alternate) break a;
< e = F(e);
< f = F(f);
< }
< e = null;
< }
< else e = null;
< f = e;
< for (e = []; c && c !== f; ) {
< g = c.alternate;
< if (null !== g && g === f) break;
< e.push(c);
< c = F(c);
< }
< for (c = []; d && d !== f; ) {
< g = d.alternate;
< if (null !== g && g === f) break;
< c.push(d);
< d = F(d);
< }
< for (d = 0; d < e.length; d++) Va(e[d], "bubbled", a);
< for (a = c.length; 0 < a--; ) Va(c[a], "captured", b);
< }
< var $a = {
< accumulateTwoPhaseDispatches: Ya,
< accumulateTwoPhaseDispatchesSkipTarget: function(a) {
< Ba(a, Ua);
< },
< accumulateEnterLeaveDispatches: Za,
< accumulateDirectDispatches: function(a) {
< Ba(a, Xa);
< }
< };
< function ab(a, b) {
< var c = {};
< c[a.toLowerCase()] = b.toLowerCase();
< c["Webkit" + a] = "webkit" + b;
< c["Moz" + a] = "moz" + b;
< c["ms" + a] = "MS" + b;
< c["O" + a] = "o" + b.toLowerCase();
< return c;
< }
< var bb = {
< animationend: ab("Animation", "AnimationEnd"),
< animationiteration: ab("Animation", "AnimationIteration"),
< animationstart: ab("Animation", "AnimationStart"),
< transitionend: ab("Transition", "TransitionEnd")
< },
< cb = {},
< db = {};
< m.canUseDOM &&
< ((db = document.createElement("div").style),
< "AnimationEvent" in window ||
< (delete bb.animationend.animation,
< delete bb.animationiteration.animation,
< delete bb.animationstart.animation),
< "TransitionEvent" in window || delete bb.transitionend.transition);
< function eb(a) {
< if (cb[a]) return cb[a];
< if (!bb[a]) return a;
< var b = bb[a],
< c;
< for (c in b) if (b.hasOwnProperty(c) && c in db) return (cb[a] = b[c]);
< return a;
< }
< var fb = eb("animationend"),
< gb = eb("animationiteration"),
< hb = eb("animationstart"),
< ib = eb("transitionend"),
< jb = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(
< " "
< ),
< kb = null;
< function lb() {
< !kb &&
< m.canUseDOM &&
< (kb =
< "textContent" in document.documentElement ? "textContent" : "innerText");
< return kb;
< }
< var G = { _root: null, _startText: null, _fallbackText: null };
< function mb() {
< if (G._fallbackText) return G._fallbackText;
< var a,
< b = G._startText,
< c = b.length,
< d,
< e = nb(),
< f = e.length;
< for (a = 0; a < c && b[a] === e[a]; a++);
< var g = c - a;
< for (d = 1; d <= g && b[c - d] === e[f - d]; d++);
< G._fallbackText = e.slice(a, 1 < d ? 1 - d : void 0);
< return G._fallbackText;
< }
< function nb() {
< return "value" in G._root ? G._root.value : G._root[lb()];
< }
< var ob = "dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(
< " "
< ),
< pb = {
< type: null,
< target: null,
< currentTarget: v.thatReturnsNull,
< eventPhase: null,
< bubbles: null,
< cancelable: null,
< timeStamp: function(a) {
< return a.timeStamp || Date.now();
< },
< defaultPrevented: null,
< isTrusted: null
< };
< function H(a, b, c, d) {
< this.dispatchConfig = a;
< this._targetInst = b;
< this.nativeEvent = c;
< a = this.constructor.Interface;
< for (var e in a)
< a.hasOwnProperty(e) &&
< ((b = a[e])
< ? (this[e] = b(c))
< : "target" === e
< ? (this.target = d)
< : (this[e] = c[e]));
< this.isDefaultPrevented = (null != c.defaultPrevented
< ? c.defaultPrevented
< : !1 === c.returnValue)
< ? v.thatReturnsTrue
< : v.thatReturnsFalse;
< this.isPropagationStopped = v.thatReturnsFalse;
< return this;
< }
< p(H.prototype, {
< preventDefault: function() {
< this.defaultPrevented = !0;
< var a = this.nativeEvent;
< a &&
< (a.preventDefault
< ? a.preventDefault()
< : "unknown" !== typeof a.returnValue && (a.returnValue = !1),
< (this.isDefaultPrevented = v.thatReturnsTrue));
< },
< stopPropagation: function() {
< var a = this.nativeEvent;
< a &&
< (a.stopPropagation
< ? a.stopPropagation()
< : "unknown" !== typeof a.cancelBubble && (a.cancelBubble = !0),
< (this.isPropagationStopped = v.thatReturnsTrue));
< },
< persist: function() {
< this.isPersistent = v.thatReturnsTrue;
< },
< isPersistent: v.thatReturnsFalse,
< destructor: function() {
< var a = this.constructor.Interface,
< b;
< for (b in a) this[b] = null;
< for (a = 0; a < ob.length; a++) this[ob[a]] = null;
< }
< });
< H.Interface = pb;
< H.extend = function(a) {
< function b() {}
< function c() {
< return d.apply(this, arguments);
< }
< var d = this;
< b.prototype = d.prototype;
< var e = new b();
< p(e, c.prototype);
< c.prototype = e;
< c.prototype.constructor = c;
< c.Interface = p({}, d.Interface, a);
< c.extend = d.extend;
< qb(c);
< return c;
< };
< qb(H);
< function rb(a, b, c, d) {
< if (this.eventPool.length) {
< var e = this.eventPool.pop();
< this.call(e, a, b, c, d);
< return e;
< }
< return new this(a, b, c, d);
< }
< function sb(a) {
< a instanceof this ? void 0 : A("223");
< a.destructor();
< 10 > this.eventPool.length && this.eventPool.push(a);
< }
< function qb(a) {
< a.eventPool = [];
< a.getPooled = rb;
< a.release = sb;
< }
< var tb = H.extend({ data: null }),
< ub = H.extend({ data: null }),
< vb = [9, 13, 27, 32],
< wb = m.canUseDOM && "CompositionEvent" in window,
< xb = null;
< m.canUseDOM && "documentMode" in document && (xb = document.documentMode);
< var yb = m.canUseDOM && "TextEvent" in window && !xb,
< zb = m.canUseDOM && (!wb || (xb && 8 < xb && 11 >= xb)),
< Ab = String.fromCharCode(32),
< Bb = {
< beforeInput: {
< phasedRegistrationNames: {
< bubbled: "onBeforeInput",
< captured: "onBeforeInputCapture"
< },
< dependencies: ["compositionend", "keypress", "textInput", "paste"]
< },
< compositionEnd: {
< phasedRegistrationNames: {
< bubbled: "onCompositionEnd",
< captured: "onCompositionEndCapture"
< },
< dependencies: "blur compositionend keydown keypress keyup mousedown".split(
< " "
< )
< },
< compositionStart: {
< phasedRegistrationNames: {
< bubbled: "onCompositionStart",
< captured: "onCompositionStartCapture"
< },
< dependencies: "blur compositionstart keydown keypress keyup mousedown".split(
< " "
< )
< },
< compositionUpdate: {
< phasedRegistrationNames: {
< bubbled: "onCompositionUpdate",
< captured: "onCompositionUpdateCapture"
< },
< dependencies: "blur compositionupdate keydown keypress keyup mousedown".split(
< " "
< )
< }
< },
< Cb = !1;
< function Db(a, b) {
< switch (a) {
< case "keyup":
< return -1 !== vb.indexOf(b.keyCode);
< case "keydown":
< return 229 !== b.keyCode;
< case "keypress":
< case "mousedown":
< case "blur":
< return !0;
< default:
< return !1;
< }
< }
< function Eb(a) {
< a = a.detail;
< return "object" === typeof a && "data" in a ? a.data : null;
< }
< var Fb = !1;
< function Gb(a, b) {
< switch (a) {
< case "compositionend":
< return Eb(b);
< case "keypress":
< if (32 !== b.which) return null;
< Cb = !0;
< return Ab;
< case "textInput":
< return (a = b.data), a === Ab && Cb ? null : a;
< default:
< return null;
< }
< }
< function Hb(a, b) {
< if (Fb)
< return "compositionend" === a || (!wb && Db(a, b))
< ? ((a = mb()),
< (G._root = null),
< (G._startText = null),
< (G._fallbackText = null),
< (Fb = !1),
< a)
< : null;
< switch (a) {
< case "paste":
< return null;
< case "keypress":
< if (!(b.ctrlKey || b.altKey || b.metaKey) || (b.ctrlKey && b.altKey)) {
< if (b.char && 1 < b.char.length) return b.char;
< if (b.which) return String.fromCharCode(b.which);
< }
< return null;
< case "compositionend":
< return zb ? null : b.data;
< default:
< return null;
< }
< }
< var Ib = {
< eventTypes: Bb,
< extractEvents: function(a, b, c, d) {
< var e = void 0;
< var f = void 0;
< if (wb)
< b: {
< switch (a) {
< case "compositionstart":
< e = Bb.compositionStart;
< break b;
< case "compositionend":
< e = Bb.compositionEnd;
< break b;
< case "compositionupdate":
< e = Bb.compositionUpdate;
< break b;
< }
< e = void 0;
< }
< else
< Fb
< ? Db(a, c) && (e = Bb.compositionEnd)
< : "keydown" === a && 229 === c.keyCode && (e = Bb.compositionStart);
< e
< ? (zb &&
< (Fb || e !== Bb.compositionStart
< ? e === Bb.compositionEnd && Fb && (f = mb())
< : ((G._root = d), (G._startText = nb()), (Fb = !0))),
< (e = tb.getPooled(e, b, c, d)),
< f ? (e.data = f) : ((f = Eb(c)), null !== f && (e.data = f)),
< Ya(e),
< (f = e))
< : (f = null);
< (a = yb ? Gb(a, c) : Hb(a, c))
< ? ((b = ub.getPooled(Bb.beforeInput, b, c, d)), (b.data = a), Ya(b))
< : (b = null);
< return null === f ? b : null === b ? f : [f, b];
< }
< },
< Jb = null,
< Kb = {
< injectFiberControlledHostComponent: function(a) {
< Jb = a;
< }
< },
< Lb = null,
< Mb = null;
< function Nb(a) {
< if ((a = xa(a))) {
< Jb && "function" === typeof Jb.restoreControlledState ? void 0 : A("194");
< var b = wa(a.stateNode);
< Jb.restoreControlledState(a.stateNode, a.type, b);
< }
< }
< function Ob(a) {
< Lb ? (Mb ? Mb.push(a) : (Mb = [a])) : (Lb = a);
< }
< function Pb() {
< return null !== Lb || null !== Mb;
< }
< function Qb() {
< if (Lb) {
< var a = Lb,
< b = Mb;
< Mb = Lb = null;
< Nb(a);
< if (b) for (a = 0; a < b.length; a++) Nb(b[a]);
< }
< }
< var Rb = {
< injection: Kb,
< enqueueStateRestore: Ob,
< needsStateRestore: Pb,
< restoreStateIfNeeded: Qb
< };
< function Sb(a, b) {
< return a(b);
< }
< function Tb(a, b, c) {
< return a(b, c);
< }
< function Ub() {}
< var Vb = !1;
< function Wb(a, b) {
< if (Vb) return a(b);
< Vb = !0;
< try {
< return Sb(a, b);
< } finally {
< (Vb = !1), Pb() && (Ub(), Qb());
< }
< }
< var Xb = {
< color: !0,
< date: !0,
< datetime: !0,
< "datetime-local": !0,
< email: !0,
< month: !0,
< number: !0,
< password: !0,
< range: !0,
< search: !0,
< tel: !0,
< text: !0,
< time: !0,
< url: !0,
< week: !0
< };
< function Yb(a) {
< var b = a && a.nodeName && a.nodeName.toLowerCase();
< return "input" === b ? !!Xb[a.type] : "textarea" === b ? !0 : !1;
< }
< function Zb(a) {
< a = a.target || a.srcElement || window;
< a.correspondingUseElement && (a = a.correspondingUseElement);
< return 3 === a.nodeType ? a.parentNode : a;
< }
< function $b(a, b) {
< if (!m.canUseDOM || (b && !("addEventListener" in document))) return !1;
< a = "on" + a;
< b = a in document;
< b ||
< ((b = document.createElement("div")),
< b.setAttribute(a, "return;"),
< (b = "function" === typeof b[a]));
< return b;
< }
< function ac(a) {
< var b = a.type;
< return (
< (a = a.nodeName) &&
< "input" === a.toLowerCase() &&
< ("checkbox" === b || "radio" === b)
< );
< }
< function bc(a) {
< var b = ac(a) ? "checked" : "value",
< c = Object.getOwnPropertyDescriptor(a.constructor.prototype, b),
< d = "" + a[b];
< if (
< !a.hasOwnProperty(b) &&
< "undefined" !== typeof c &&
< "function" === typeof c.get &&
< "function" === typeof c.set
< ) {
< var e = c.get,
< f = c.set;
< Object.defineProperty(a, b, {
< configurable: !0,
< get: function() {
< return e.call(this);
< },
< set: function(a) {
< d = "" + a;
< f.call(this, a);
< }
< });
< Object.defineProperty(a, b, { enumerable: c.enumerable });
< return {
< getValue: function() {
< return d;
< },
< setValue: function(a) {
< d = "" + a;
< },
< stopTracking: function() {
< a._valueTracker = null;
< delete a[b];
< }
< };
< }
< }
< function cc(a) {
< a._valueTracker || (a._valueTracker = bc(a));
< }
< function dc(a) {
< if (!a) return !1;
< var b = a._valueTracker;
< if (!b) return !0;
< var c = b.getValue();
< var d = "";
< a && (d = ac(a) ? (a.checked ? "true" : "false") : a.value);
< a = d;
< return a !== c ? (b.setValue(a), !0) : !1;
< }
< var ec =
< ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,
< fc = "function" === typeof Symbol && Symbol.for,
< gc = fc ? Symbol.for("react.element") : 60103,
< hc = fc ? Symbol.for("react.portal") : 60106,
< ic = fc ? Symbol.for("react.fragment") : 60107,
< jc = fc ? Symbol.for("react.strict_mode") : 60108,
< kc = fc ? Symbol.for("react.profiler") : 60114,
< lc = fc ? Symbol.for("react.provider") : 60109,
< mc = fc ? Symbol.for("react.context") : 60110,
< pc = fc ? Symbol.for("react.async_mode") : 60111,
< qc = fc ? Symbol.for("react.forward_ref") : 60112,
< rc = fc ? Symbol.for("react.timeout") : 60113,
< sc = "function" === typeof Symbol && Symbol.iterator;
< function tc(a) {
< if (null === a || "undefined" === typeof a) return null;
< a = (sc && a[sc]) || a["@@iterator"];
< return "function" === typeof a ? a : null;
< }
< function uc(a) {
< var b = a.type;
< if ("function" === typeof b) return b.displayName || b.name;
< if ("string" === typeof b) return b;
< switch (b) {
< case pc:
< return "AsyncMode";
< case mc:
< return "Context.Consumer";
< case ic:
< return "ReactFragment";
< case hc:
< return "ReactPortal";
< case kc:
< return "Profiler(" + a.pendingProps.id + ")";
< case lc:
< return "Context.Provider";
< case jc:
< return "StrictMode";
< case rc:
< return "Timeout";
< }
< if ("object" === typeof b && null !== b)
< switch (b.$$typeof) {
< case qc:
< return (
< (a = b.render.displayName || b.render.name || ""),
< "" !== a ? "ForwardRef(" + a + ")" : "ForwardRef"
< );
< }
< return null;
< }
< function vc(a) {
< var b = "";
< do {
< a: switch (a.tag) {
< case 0:
< case 1:
< case 2:
< case 5:
< var c = a._debugOwner,
< d = a._debugSource;
< var e = uc(a);
< var f = null;
< c && (f = uc(c));
< c = d;
< e =
< "\n in " +
< (e || "Unknown") +
< (c
< ? " (at " +
< c.fileName.replace(/^.*[\\\/]/, "") +
< ":" +
< c.lineNumber +
< ")"
< : f
< ? " (created by " + f + ")"
< : "");
< break a;
< default:
< e = "";
< }
< b += e;
< a = a.return;
< } while (a);
< return b;
< }
< var wc = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,
< xc = Object.prototype.hasOwnProperty,
< zc = {},
< Ac = {};
< function Bc(a) {
< if (xc.call(Ac, a)) return !0;
< if (xc.call(zc, a)) return !1;
< if (wc.test(a)) return (Ac[a] = !0);
< zc[a] = !0;
< return !1;
< }
< function Cc(a, b, c, d) {
< if (null !== c && 0 === c.type) return !1;
< switch (typeof b) {
< case "function":
< case "symbol":
< return !0;
< case "boolean":
< if (d) return !1;
< if (null !== c) return !c.acceptsBooleans;
< a = a.toLowerCase().slice(0, 5);
< return "data-" !== a && "aria-" !== a;
< default:
< return !1;
< }
< }
< function Dc(a, b, c, d) {
< if (null === b || "undefined" === typeof b || Cc(a, b, c, d)) return !0;
< if (d) return !1;
< if (null !== c)
< switch (c.type) {
< case 3:
< return !b;
< case 4:
< return !1 === b;
< case 5:
< return isNaN(b);
< case 6:
< return isNaN(b) || 1 > b;
< }
< return !1;
< }
< function I(a, b, c, d, e) {
< this.acceptsBooleans = 2 === b || 3 === b || 4 === b;
< this.attributeName = d;
< this.attributeNamespace = e;
< this.mustUseProperty = c;
< this.propertyName = a;
< this.type = b;
< }
< var J = {};
< "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style"
< .split(" ")
< .forEach(function(a) {
< J[a] = new I(a, 0, !1, a, null);
< });
< [
< ["acceptCharset", "accept-charset"],
< ["className", "class"],
< ["htmlFor", "for"],
< ["httpEquiv", "http-equiv"]
< ].forEach(function(a) {
< var b = a[0];
< J[b] = new I(b, 1, !1, a[1], null);
< });
< ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(a) {
< J[a] = new I(a, 2, !1, a.toLowerCase(), null);
< });
< ["autoReverse", "externalResourcesRequired", "preserveAlpha"].forEach(function(
< a
< ) {
< J[a] = new I(a, 2, !1, a, null);
< });
< "allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope"
< .split(" ")
< .forEach(function(a) {
< J[a] = new I(a, 3, !1, a.toLowerCase(), null);
< });
< ["checked", "multiple", "muted", "selected"].forEach(function(a) {
< J[a] = new I(a, 3, !0, a.toLowerCase(), null);
< });
< ["capture", "download"].forEach(function(a) {
< J[a] = new I(a, 4, !1, a.toLowerCase(), null);
< });
< ["cols", "rows", "size", "span"].forEach(function(a) {
< J[a] = new I(a, 6, !1, a.toLowerCase(), null);
< });
< ["rowSpan", "start"].forEach(function(a) {
< J[a] = new I(a, 5, !1, a.toLowerCase(), null);
< });
< var Ec = /[\-:]([a-z])/g;
< function Fc(a) {
< return a[1].toUpperCase();
< }
< "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height"
< .split(" ")
< .forEach(function(a) {
< var b = a.replace(Ec, Fc);
< J[b] = new I(b, 1, !1, a, null);
< });
< "xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type"
< .split(" ")
< .forEach(function(a) {
< var b = a.replace(Ec, Fc);
< J[b] = new I(b, 1, !1, a, "http://www.w3.org/1999/xlink");
< });
< ["xml:base", "xml:lang", "xml:space"].forEach(function(a) {
< var b = a.replace(Ec, Fc);
< J[b] = new I(b, 1, !1, a, "http://www.w3.org/XML/1998/namespace");
< });
< J.tabIndex = new I("tabIndex", 1, !1, "tabindex", null);
< function Gc(a, b, c, d) {
< var e = J.hasOwnProperty(b) ? J[b] : null;
< var f =
< null !== e
< ? 0 === e.type
< : d
< ? !1
< : !(2 < b.length) ||
< ("o" !== b[0] && "O" !== b[0]) ||
< ("n" !== b[1] && "N" !== b[1])
< ? !1
< : !0;
< f ||
< (Dc(b, c, e, d) && (c = null),
< d || null === e
< ? Bc(b) && (null === c ? a.removeAttribute(b) : a.setAttribute(b, "" + c))
< : e.mustUseProperty
< ? (a[e.propertyName] = null === c ? (3 === e.type ? !1 : "") : c)
< : ((b = e.attributeName),
< (d = e.attributeNamespace),
< null === c
< ? a.removeAttribute(b)
< : ((e = e.type),
< (c = 3 === e || (4 === e && !0 === c) ? "" : "" + c),
< d ? a.setAttributeNS(d, b, c) : a.setAttribute(b, c))));
< }
< function Hc(a, b) {
< var c = b.checked;
< return p({}, b, {
< defaultChecked: void 0,
< defaultValue: void 0,
< value: void 0,
< checked: null != c ? c : a._wrapperState.initialChecked
< });
< }
< function Ic(a, b) {
< var c = null == b.defaultValue ? "" : b.defaultValue,
< d = null != b.checked ? b.checked : b.defaultChecked;
< c = Jc(null != b.value ? b.value : c);
< a._wrapperState = {
< initialChecked: d,
< initialValue: c,
< controlled:
< "checkbox" === b.type || "radio" === b.type
< ? null != b.checked
< : null != b.value
< };
< }
< function Kc(a, b) {
< b = b.checked;
< null != b && Gc(a, "checked", b, !1);
< }
< function Lc(a, b) {
< Kc(a, b);
< var c = Jc(b.value);
< if (null != c)
< if ("number" === b.type) {
< if ((0 === c && "" === a.value) || a.value != c) a.value = "" + c;
< } else a.value !== "" + c && (a.value = "" + c);
< b.hasOwnProperty("value")
< ? Mc(a, b.type, c)
< : b.hasOwnProperty("defaultValue") && Mc(a, b.type, Jc(b.defaultValue));
< null == b.checked &&
< null != b.defaultChecked &&
< (a.defaultChecked = !!b.defaultChecked);
< }
< function Nc(a, b, c) {
< if (b.hasOwnProperty("value") || b.hasOwnProperty("defaultValue")) {
< b = "" + a._wrapperState.initialValue;
< var d = a.value;
< c || b === d || (a.value = b);
< a.defaultValue = b;
< }
< c = a.name;
< "" !== c && (a.name = "");
< a.defaultChecked = !a.defaultChecked;
< a.defaultChecked = !a.defaultChecked;
< "" !== c && (a.name = c);
< }
< function Mc(a, b, c) {
< if ("number" !== b || a.ownerDocument.activeElement !== a)
< null == c
< ? (a.defaultValue = "" + a._wrapperState.initialValue)
< : a.defaultValue !== "" + c && (a.defaultValue = "" + c);
< }
< function Jc(a) {
< switch (typeof a) {
< case "boolean":
< case "number":
< case "object":
< case "string":
< case "undefined":
< return a;
< default:
< return "";
< }
< }
< var Oc = {
< change: {
< phasedRegistrationNames: {
< bubbled: "onChange",
< captured: "onChangeCapture"
< },
< dependencies: "blur change click focus input keydown keyup selectionchange".split(
< " "
< )
< }
< };
< function Pc(a, b, c) {
< a = H.getPooled(Oc.change, a, b, c);
< a.type = "change";
< Ob(c);
< Ya(a);
< return a;
< }
< var Qc = null,
< Rc = null;
< function Sc(a) {
< Ia(a, !1);
< }
< function Tc(a) {
< var b = Oa(a);
< if (dc(b)) return a;
< }
< function Uc(a, b) {
< if ("change" === a) return b;
< }
< var Vc = !1;
< m.canUseDOM &&
< (Vc = $b("input") && (!document.documentMode || 9 < document.documentMode));
< function Wc() {
< Qc && (Qc.detachEvent("onpropertychange", Xc), (Rc = Qc = null));
< }
< function Xc(a) {
< "value" === a.propertyName && Tc(Rc) && ((a = Pc(Rc, a, Zb(a))), Wb(Sc, a));
< }
< function Yc(a, b, c) {
< "focus" === a
< ? (Wc(), (Qc = b), (Rc = c), Qc.attachEvent("onpropertychange", Xc))
< : "blur" === a && Wc();
< }
< function Zc(a) {
< if ("selectionchange" === a || "keyup" === a || "keydown" === a)
< return Tc(Rc);
< }
< function $c(a, b) {
< if ("click" === a) return Tc(b);
< }
< function ad(a, b) {
< if ("input" === a || "change" === a) return Tc(b);
< }
< var bd = {
< eventTypes: Oc,
< _isInputEventSupported: Vc,
< extractEvents: function(a, b, c, d) {
< var e = b ? Oa(b) : window,
< f = void 0,
< g = void 0,
< h = e.nodeName && e.nodeName.toLowerCase();
< "select" === h || ("input" === h && "file" === e.type)
< ? (f = Uc)
< : Yb(e)
< ? Vc
< ? (f = ad)
< : ((f = Zc), (g = Yc))
< : (h = e.nodeName) &&
< "input" === h.toLowerCase() &&
< ("checkbox" === e.type || "radio" === e.type) &&
< (f = $c);
< if (f && (f = f(a, b))) return Pc(f, c, d);
< g && g(a, e, b);
< "blur" === a &&
< (a = e._wrapperState) &&
< a.controlled &&
< "number" === e.type &&
< Mc(e, "number", e.value);
< }
< },
< cd = H.extend({ view: null, detail: null }),
< dd = {
< Alt: "altKey",
< Control: "ctrlKey",
< Meta: "metaKey",
< Shift: "shiftKey"
< };
< function ed(a) {
< var b = this.nativeEvent;
< return b.getModifierState ? b.getModifierState(a) : (a = dd[a]) ? !!b[a] : !1;
< }
< function fd() {
< return ed;
< }
< var gd = cd.extend({
< screenX: null,
< screenY: null,
< clientX: null,
< clientY: null,
< pageX: null,
< pageY: null,
< ctrlKey: null,
< shiftKey: null,
< altKey: null,
< metaKey: null,
< getModifierState: fd,
< button: null,
< buttons: null,
< relatedTarget: function(a) {
< return (
< a.relatedTarget ||
< (a.fromElement === a.srcElement ? a.toElement : a.fromElement)
< );
< }
< }),
< hd = gd.extend({
< pointerId: null,
< width: null,
< height: null,
< pressure: null,
< tiltX: null,
< tiltY: null,
< pointerType: null,
< isPrimary: null
< }),
< id = {
< mouseEnter: {
< registrationName: "onMouseEnter",
< dependencies: ["mouseout", "mouseover"]
< },
< mouseLeave: {
< registrationName: "onMouseLeave",
< dependencies: ["mouseout", "mouseover"]
< },
< pointerEnter: {
< registrationName: "onPointerEnter",
< dependencies: ["pointerout", "pointerover"]
< },
< pointerLeave: {
< registrationName: "onPointerLeave",
< dependencies: ["pointerout", "pointerover"]
< }
< },
< jd = {
< eventTypes: id,
< extractEvents: function(a, b, c, d) {
< var e = "mouseover" === a || "pointerover" === a,
< f = "mouseout" === a || "pointerout" === a;
< if ((e && (c.relatedTarget || c.fromElement)) || (!f && !e)) return null;
< e =
< d.window === d
< ? d
< : (e = d.ownerDocument)
< ? e.defaultView || e.parentWindow
< : window;
< f
< ? ((f = b), (b = (b = c.relatedTarget || c.toElement) ? Na(b) : null))
< : (f = null);
< if (f === b) return null;
< var g = void 0,
< h = void 0,
< k = void 0,
< n = void 0;
< if ("mouseout" === a || "mouseover" === a)
< (g = gd), (h = id.mouseLeave), (k = id.mouseEnter), (n = "mouse");
< else if ("pointerout" === a || "pointerover" === a)
< (g = hd), (h = id.pointerLeave), (k = id.pointerEnter), (n = "pointer");
< a = null == f ? e : Oa(f);
< e = null == b ? e : Oa(b);
< h = g.getPooled(h, f, c, d);
< h.type = n + "leave";
< h.target = a;
< h.relatedTarget = e;
< c = g.getPooled(k, b, c, d);
< c.type = n + "enter";
< c.target = e;
< c.relatedTarget = a;
< Za(h, c, f, b);
< return [h, c];
< }
< };
< function kd(a) {
< var b = a;
< if (a.alternate) for (; b.return; ) b = b.return;
< else {
< if (0 !== (b.effectTag & 2)) return 1;
< for (; b.return; ) if (((b = b.return), 0 !== (b.effectTag & 2))) return 1;
< }
< return 3 === b.tag ? 2 : 3;
< }
< function ld(a) {
< 2 !== kd(a) ? A("188") : void 0;
< }
< function md(a) {
< var b = a.alternate;
< if (!b) return (b = kd(a)), 3 === b ? A("188") : void 0, 1 === b ? null : a;
< for (var c = a, d = b; ; ) {
< var e = c.return,
< f = e ? e.alternate : null;
< if (!e || !f) break;
< if (e.child === f.child) {
< for (var g = e.child; g; ) {
< if (g === c) return ld(e), a;
< if (g === d) return ld(e), b;
< g = g.sibling;
< }
< A("188");
< }
< if (c.return !== d.return) (c = e), (d = f);
< else {
< g = !1;
< for (var h = e.child; h; ) {
< if (h === c) {
< g = !0;
< c = e;
< d = f;
< break;
< }
< if (h === d) {
< g = !0;
< d = e;
< c = f;
< break;
< }
< h = h.sibling;
< }
< if (!g) {
< for (h = f.child; h; ) {
< if (h === c) {
< g = !0;
< c = f;
< d = e;
< break;
< }
< if (h === d) {
< g = !0;
< d = f;
< c = e;
< break;
< }
< h = h.sibling;
< }
< g ? void 0 : A("189");
< }
< }
< c.alternate !== d ? A("190") : void 0;
< }
< 3 !== c.tag ? A("188") : void 0;
< return c.stateNode.current === c ? a : b;
< }
< function nd(a) {
< a = md(a);
< if (!a) return null;
< for (var b = a; ; ) {
< if (5 === b.tag || 6 === b.tag) return b;
< if (b.child) (b.child.return = b), (b = b.child);
< else {
< if (b === a) break;
< for (; !b.sibling; ) {
< if (!b.return || b.return === a) return null;
< b = b.return;
< }
< b.sibling.return = b.return;
< b = b.sibling;
< }
< }
< return null;
< }
< function od(a) {
< a = md(a);
< if (!a) return null;
< for (var b = a; ; ) {
< if (5 === b.tag || 6 === b.tag) return b;
< if (b.child && 4 !== b.tag) (b.child.return = b), (b = b.child);
< else {
< if (b === a) break;
< for (; !b.sibling; ) {
< if (!b.return || b.return === a) return null;
< b = b.return;
< }
< b.sibling.return = b.return;
< b = b.sibling;
< }
< }
< return null;
< }
< var pd = H.extend({
< animationName: null,
< elapsedTime: null,
< pseudoElement: null
< }),
< qd = H.extend({
< clipboardData: function(a) {
< return "clipboardData" in a ? a.clipboardData : window.clipboardData;
< }
< }),
< rd = cd.extend({ relatedTarget: null });
< function sd(a) {
< var b = a.keyCode;
< "charCode" in a
< ? ((a = a.charCode), 0 === a && 13 === b && (a = 13))
< : (a = b);
< 10 === a && (a = 13);
< return 32 <= a || 13 === a ? a : 0;
< }
< var td = {
< Esc: "Escape",
< Spacebar: " ",
< Left: "ArrowLeft",
< Up: "ArrowUp",
< Right: "ArrowRight",
< Down: "ArrowDown",
< Del: "Delete",
< Win: "OS",
< Menu: "ContextMenu",
< Apps: "ContextMenu",
< Scroll: "ScrollLock",
< MozPrintableKey: "Unidentified"
< },
< ud = {
< 8: "Backspace",
< 9: "Tab",
< 12: "Clear",
< 13: "Enter",
< 16: "Shift",
< 17: "Control",
< 18: "Alt",
< 19: "Pause",
< 20: "CapsLock",
< 27: "Escape",
< 32: " ",
< 33: "PageUp",
< 34: "PageDown",
< 35: "End",
< 36: "Home",
< 37: "ArrowLeft",
< 38: "ArrowUp",
< 39: "ArrowRight",
< 40: "ArrowDown",
< 45: "Insert",
< 46: "Delete",
< 112: "F1",
< 113: "F2",
< 114: "F3",
< 115: "F4",
< 116: "F5",
< 117: "F6",
< 118: "F7",
< 119: "F8",
< 120: "F9",
< 121: "F10",
< 122: "F11",
< 123: "F12",
< 144: "NumLock",
< 145: "ScrollLock",
< 224: "Meta"
< },
< vd = cd.extend({
< key: function(a) {
< if (a.key) {
< var b = td[a.key] || a.key;
< if ("Unidentified" !== b) return b;
< }
< return "keypress" === a.type
< ? ((a = sd(a)), 13 === a ? "Enter" : String.fromCharCode(a))
< : "keydown" === a.type || "keyup" === a.type
< ? ud[a.keyCode] || "Unidentified"
< : "";
< },
< location: null,
< ctrlKey: null,
< shiftKey: null,
< altKey: null,
< metaKey: null,
< repeat: null,
< locale: null,
< getModifierState: fd,
< charCode: function(a) {
< return "keypress" === a.type ? sd(a) : 0;
< },
< keyCode: function(a) {
< return "keydown" === a.type || "keyup" === a.type ? a.keyCode : 0;
< },
< which: function(a) {
< return "keypress" === a.type
< ? sd(a)
< : "keydown" === a.type || "keyup" === a.type
< ? a.keyCode
< : 0;
< }
< }),
< wd = gd.extend({ dataTransfer: null }),
< xd = cd.extend({
< touches: null,
< targetTouches: null,
< changedTouches: null,
< altKey: null,
< metaKey: null,
< ctrlKey: null,
< shiftKey: null,
< getModifierState: fd
< }),
< yd = H.extend({ propertyName: null, elapsedTime: null, pseudoElement: null }),
< zd = gd.extend({
< deltaX: function(a) {
< return "deltaX" in a ? a.deltaX : "wheelDeltaX" in a ? -a.wheelDeltaX : 0;
< },
< deltaY: function(a) {
< return "deltaY" in a
< ? a.deltaY
< : "wheelDeltaY" in a
< ? -a.wheelDeltaY
< : "wheelDelta" in a
< ? -a.wheelDelta
< : 0;
< },
< deltaZ: null,
< deltaMode: null
< }),
< Ad = [
< ["abort", "abort"],
< [fb, "animationEnd"],
< [gb, "animationIteration"],
< [hb, "animationStart"],
< ["canplay", "canPlay"],
< ["canplaythrough", "canPlayThrough"],
< ["drag", "drag"],
< ["dragenter", "dragEnter"],
< ["dragexit", "dragExit"],
< ["dragleave", "dragLeave"],
< ["dragover", "dragOver"],
< ["durationchange", "durationChange"],
< ["emptied", "emptied"],
< ["encrypted", "encrypted"],
< ["ended", "ended"],
< ["error", "error"],
< ["gotpointercapture", "gotPointerCapture"],
< ["load", "load"],
< ["loadeddata", "loadedData"],
< ["loadedmetadata", "loadedMetadata"],
< ["loadstart", "loadStart"],
< ["lostpointercapture", "lostPointerCapture"],
< ["mousemove", "mouseMove"],
< ["mouseout", "mouseOut"],
< ["mouseover", "mouseOver"],
< ["playing", "playing"],
< ["pointermove", "pointerMove"],
< ["pointerout", "pointerOut"],
< ["pointerover", "pointerOver"],
< ["progress", "progress"],
< ["scroll", "scroll"],
< ["seeking", "seeking"],
< ["stalled", "stalled"],
< ["suspend", "suspend"],
< ["timeupdate", "timeUpdate"],
< ["toggle", "toggle"],
< ["touchmove", "touchMove"],
< [ib, "transitionEnd"],
< ["waiting", "waiting"],
< ["wheel", "wheel"]
< ],
< Bd = {},
< Cd = {};
< function Dd(a, b) {
< var c = a[0];
< a = a[1];
< var d = "on" + (a[0].toUpperCase() + a.slice(1));
< b = {
< phasedRegistrationNames: { bubbled: d, captured: d + "Capture" },
< dependencies: [c],
< isInteractive: b
< };
< Bd[a] = b;
< Cd[c] = b;
< }
< [
< ["blur", "blur"],
< ["cancel", "cancel"],
< ["click", "click"],
< ["close", "close"],
< ["contextmenu", "contextMenu"],
< ["copy", "copy"],
< ["cut", "cut"],
< ["dblclick", "doubleClick"],
< ["dragend", "dragEnd"],
< ["dragstart", "dragStart"],
< ["drop", "drop"],
< ["focus", "focus"],
< ["input", "input"],
< ["invalid", "invalid"],
< ["keydown", "keyDown"],
< ["keypress", "keyPress"],
< ["keyup", "keyUp"],
< ["mousedown", "mouseDown"],
< ["mouseup", "mouseUp"],
< ["paste", "paste"],
< ["pause", "pause"],
< ["play", "play"],
< ["pointercancel", "pointerCancel"],
< ["pointerdown", "pointerDown"],
< ["pointerup", "pointerUp"],
< ["ratechange", "rateChange"],
< ["reset", "reset"],
< ["seeked", "seeked"],
< ["submit", "submit"],
< ["touchcancel", "touchCancel"],
< ["touchend", "touchEnd"],
< ["touchstart", "touchStart"],
< ["volumechange", "volumeChange"]
< ].forEach(function(a) {
< Dd(a, !0);
< });
< Ad.forEach(function(a) {
< Dd(a, !1);
< });
< var Ed = {
< eventTypes: Bd,
< isInteractiveTopLevelEventType: function(a) {
< a = Cd[a];
< return void 0 !== a && !0 === a.isInteractive;
< },
< extractEvents: function(a, b, c, d) {
< var e = Cd[a];
< if (!e) return null;
< switch (a) {
< case "keypress":
< if (0 === sd(c)) return null;
< case "keydown":
< case "keyup":
< a = vd;
< break;
< case "blur":
< case "focus":
< a = rd;
< break;
< case "click":
< if (2 === c.button) return null;
< case "dblclick":
< case "mousedown":
< case "mousemove":
< case "mouseup":
< case "mouseout":
< case "mouseover":
< case "contextmenu":
< a = gd;
< break;
< case "drag":
< case "dragend":
< case "dragenter":
< case "dragexit":
< case "dragleave":
< case "dragover":
< case "dragstart":
< case "drop":
< a = wd;
< break;
< case "touchcancel":
< case "touchend":
< case "touchmove":
< case "touchstart":
< a = xd;
< break;
< case fb:
< case gb:
< case hb:
< a = pd;
< break;
< case ib:
< a = yd;
< break;
< case "scroll":
< a = cd;
< break;
< case "wheel":
< a = zd;
< break;
< case "copy":
< case "cut":
< case "paste":
< a = qd;
< break;
< case "gotpointercapture":
< case "lostpointercapture":
< case "pointercancel":
< case "pointerdown":
< case "pointermove":
< case "pointerout":
< case "pointerover":
< case "pointerup":
< a = hd;
< break;
< default:
< a = H;
< }
< b = a.getPooled(e, b, c, d);
< Ya(b);
< return b;
< }
< },
< Fd = Ed.isInteractiveTopLevelEventType,
< Gd = [];
< function Hd(a) {
< var b = a.targetInst;
< do {
< if (!b) {
< a.ancestors.push(b);
< break;
< }
< var c;
< for (c = b; c.return; ) c = c.return;
< c = 3 !== c.tag ? null : c.stateNode.containerInfo;
< if (!c) break;
< a.ancestors.push(b);
< b = Na(c);
< } while (b);
< for (c = 0; c < a.ancestors.length; c++)
< (b = a.ancestors[c]),
< Ja(a.topLevelType, b, a.nativeEvent, Zb(a.nativeEvent));
< }
< var Id = !0;
< function Kd(a) {
< Id = !!a;
< }
< function K(a, b) {
< if (!b) return null;
< var c = (Fd(a) ? Ld : Md).bind(null, a);
< b.addEventListener(a, c, !1);
< }
< function Nd(a, b) {
< if (!b) return null;
< var c = (Fd(a) ? Ld : Md).bind(null, a);
< b.addEventListener(a, c, !0);
< }
< function Ld(a, b) {
< Tb(Md, a, b);
< }
< function Md(a, b) {
< if (Id) {
< var c = Zb(b);
< c = Na(c);
< null === c || "number" !== typeof c.tag || 2 === kd(c) || (c = null);
< if (Gd.length) {
< var d = Gd.pop();
< d.topLevelType = a;
< d.nativeEvent = b;
< d.targetInst = c;
< a = d;
< } else
< a = { topLevelType: a, nativeEvent: b, targetInst: c, ancestors: [] };
< try {
< Wb(Hd, a);
< } finally {
< (a.topLevelType = null),
< (a.nativeEvent = null),
< (a.targetInst = null),
< (a.ancestors.length = 0),
< 10 > Gd.length && Gd.push(a);
< }
< }
< }
< var Od = {
< get _enabled() {
< return Id;
< },
< setEnabled: Kd,
< isEnabled: function() {
< return Id;
< },
< trapBubbledEvent: K,
< trapCapturedEvent: Nd,
< dispatchEvent: Md
< },
< Pd = {},
< Qd = 0,
< Rd = "_reactListenersID" + ("" + Math.random()).slice(2);
< function Sd(a) {
< Object.prototype.hasOwnProperty.call(a, Rd) ||
< ((a[Rd] = Qd++), (Pd[a[Rd]] = {}));
< return Pd[a[Rd]];
< }
< function Td(a) {
< for (; a && a.firstChild; ) a = a.firstChild;
< return a;
< }
< function Ud(a, b) {
< var c = Td(a);
< a = 0;
< for (var d; c; ) {
< if (3 === c.nodeType) {
< d = a + c.textContent.length;
< if (a <= b && d >= b) return { node: c, offset: b - a };
< a = d;
< }
< a: {
< for (; c; ) {
< if (c.nextSibling) {
< c = c.nextSibling;
< break a;
< }
< c = c.parentNode;
< }
< c = void 0;
< }
< c = Td(c);
< }
< }
< function Vd(a) {
< var b = a && a.nodeName && a.nodeName.toLowerCase();
< return (
< b &&
< (("input" === b &&
< ("text" === a.type ||
< "search" === a.type ||
< "tel" === a.type ||
< "url" === a.type ||
< "password" === a.type)) ||
< "textarea" === b ||
< "true" === a.contentEditable)
< );
< }
< var Wd =
< m.canUseDOM && "documentMode" in document && 11 >= document.documentMode,
< Xd = {
< select: {
< phasedRegistrationNames: {
< bubbled: "onSelect",
< captured: "onSelectCapture"
< },
< dependencies: "blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(
< " "
< )
< }
< },
< Yd = null,
< Zd = null,
< $d = null,
< ae = !1;
< function be(a, b) {
< if (ae || null == Yd || Yd !== da()) return null;
< var c = Yd;
< "selectionStart" in c && Vd(c)
< ? (c = { start: c.selectionStart, end: c.selectionEnd })
< : window.getSelection
< ? ((c = window.getSelection()),
< (c = {
< anchorNode: c.anchorNode,
< anchorOffset: c.anchorOffset,
< focusNode: c.focusNode,
< focusOffset: c.focusOffset
< }))
< : (c = void 0);
< return $d && ea($d, c)
< ? null
< : (($d = c),
< (a = H.getPooled(Xd.select, Zd, a, b)),
< (a.type = "select"),
< (a.target = Yd),
< Ya(a),
< a);
< }
< var ce = {
< eventTypes: Xd,
< extractEvents: function(a, b, c, d) {
< var e =
< d.window === d ? d.document : 9 === d.nodeType ? d : d.ownerDocument,
< f;
< if (!(f = !e)) {
< a: {
< e = Sd(e);
< f = sa.onSelect;
< for (var g = 0; g < f.length; g++) {
< var h = f[g];
< if (!e.hasOwnProperty(h) || !e[h]) {
< e = !1;
< break a;
< }
< }
< e = !0;
< }
< f = !e;
< }
< if (f) return null;
< e = b ? Oa(b) : window;
< switch (a) {
< case "focus":
< if (Yb(e) || "true" === e.contentEditable)
< (Yd = e), (Zd = b), ($d = null);
< break;
< case "blur":
< $d = Zd = Yd = null;
< break;
< case "mousedown":
< ae = !0;
< break;
< case "contextmenu":
< case "mouseup":
< return (ae = !1), be(c, d);
< case "selectionchange":
< if (Wd) break;
< case "keydown":
< case "keyup":
< return be(c, d);
< }
< return null;
< }
< };
< Ga.injectEventPluginOrder(
< "ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(
< " "
< )
< );
< wa = Qa.getFiberCurrentPropsFromNode;
< xa = Qa.getInstanceFromNode;
< ya = Qa.getNodeFromInstance;
< Ga.injectEventPluginsByName({
< SimpleEventPlugin: Ed,
< EnterLeaveEventPlugin: jd,
< ChangeEventPlugin: bd,
< SelectEventPlugin: ce,
< BeforeInputEventPlugin: Ib
< });
< var de =
< "function" === typeof requestAnimationFrame
< ? requestAnimationFrame
< : void 0,
< ee = Date,
< fe = setTimeout,
< ge = clearTimeout,
< he = void 0;
< if ("object" === typeof performance && "function" === typeof performance.now) {
< var ie = performance;
< he = function() {
< return ie.now();
< };
< } else
< he = function() {
< return ee.now();
< };
< var je = void 0,
< ke = void 0;
< if (m.canUseDOM) {
< var le =
< "function" === typeof de
< ? de
< : function() {
< A("276");
< },
< L = null,
< me = null,
< ne = -1,
< oe = !1,
< pe = !1,
< qe = 0,
< re = 33,
< se = 33,
< te = {
< didTimeout: !1,
< timeRemaining: function() {
< var a = qe - he();
< return 0 < a ? a : 0;
< }
< },
< ve = function(a, b) {
< var c = a.scheduledCallback,
< d = !1;
< try {
< c(b), (d = !0);
< } finally {
< ke(a), d || ((oe = !0), window.postMessage(ue, "*"));
< }
< },
< ue =
< "__reactIdleCallback$" +
< Math.random()
< .toString(36)
< .slice(2);
< window.addEventListener(
< "message",
< function(a) {
< if (a.source === window && a.data === ue && ((oe = !1), null !== L)) {
< if (null !== L) {
< var b = he();
< if (!(-1 === ne || ne > b)) {
< a = -1;
< for (var c = [], d = L; null !== d; ) {
< var e = d.timeoutTime;
< -1 !== e && e <= b
< ? c.push(d)
< : -1 !== e && (-1 === a || e < a) && (a = e);
< d = d.next;
< }
< if (0 < c.length)
< for (te.didTimeout = !0, b = 0, d = c.length; b < d; b++)
< ve(c[b], te);
< ne = a;
< }
< }
< for (a = he(); 0 < qe - a && null !== L; )
< (a = L), (te.didTimeout = !1), ve(a, te), (a = he());
< null === L || pe || ((pe = !0), le(we));
< }
< },
< !1
< );
< var we = function(a) {
< pe = !1;
< var b = a - qe + se;
< b < se && re < se ? (8 > b && (b = 8), (se = b < re ? re : b)) : (re = b);
< qe = a + se;
< oe || ((oe = !0), window.postMessage(ue, "*"));
< };
< je = function(a, b) {
< var c = -1;
< null != b && "number" === typeof b.timeout && (c = he() + b.timeout);
< if (-1 === ne || (-1 !== c && c < ne)) ne = c;
< a = { scheduledCallback: a, timeoutTime: c, prev: null, next: null };
< null === L ? (L = a) : ((b = a.prev = me), null !== b && (b.next = a));
< me = a;
< pe || ((pe = !0), le(we));
< return a;
< };
< ke = function(a) {
< if (null !== a.prev || L === a) {
< var b = a.next,
< c = a.prev;
< a.next = null;
< a.prev = null;
< null !== b
< ? null !== c
< ? ((c.next = b), (b.prev = c))
< : ((b.prev = null), (L = b))
< : null !== c
< ? ((c.next = null), (me = c))
< : (me = L = null);
< }
< };
< } else {
< var xe = new Map();
< je = function(a) {
< var b = { scheduledCallback: a, timeoutTime: 0, next: null, prev: null },
< c = fe(function() {
< a({
< timeRemaining: function() {
< return Infinity;
< },
< didTimeout: !1
< });
< });
< xe.set(a, c);
< return b;
< };
< ke = function(a) {
< var b = xe.get(a.scheduledCallback);
< xe.delete(a);
< ge(b);
< };
< }
< function ye(a) {
< var b = "";
< ba.Children.forEach(a, function(a) {
< null == a || ("string" !== typeof a && "number" !== typeof a) || (b += a);
< });
< return b;
< }
< function ze(a, b) {
< a = p({ children: void 0 }, b);
< if ((b = ye(b.children))) a.children = b;
< return a;
< }
< function Ae(a, b, c, d) {
< a = a.options;
< if (b) {
< b = {};
< for (var e = 0; e < c.length; e++) b["$" + c[e]] = !0;
< for (c = 0; c < a.length; c++)
< (e = b.hasOwnProperty("$" + a[c].value)),
< a[c].selected !== e && (a[c].selected = e),
< e && d && (a[c].defaultSelected = !0);
< } else {
< c = "" + c;
< b = null;
< for (e = 0; e < a.length; e++) {
< if (a[e].value === c) {
< a[e].selected = !0;
< d && (a[e].defaultSelected = !0);
< return;
< }
< null !== b || a[e].disabled || (b = a[e]);
< }
< null !== b && (b.selected = !0);
< }
< }
< function Be(a, b) {
< var c = b.value;
< a._wrapperState = {
< initialValue: null != c ? c : b.defaultValue,
< wasMultiple: !!b.multiple
< };
< }
< function Ce(a, b) {
< null != b.dangerouslySetInnerHTML ? A("91") : void 0;
< return p({}, b, {
< value: void 0,
< defaultValue: void 0,
< children: "" + a._wrapperState.initialValue
< });
< }
< function De(a, b) {
< var c = b.value;
< null == c &&
< ((c = b.defaultValue),
< (b = b.children),
< null != b &&
< (null != c ? A("92") : void 0,
< Array.isArray(b) && (1 >= b.length ? void 0 : A("93"), (b = b[0])),
< (c = "" + b)),
< null == c && (c = ""));
< a._wrapperState = { initialValue: "" + c };
< }
< function Ee(a, b) {
< var c = b.value;
< null != c &&
< ((c = "" + c),
< c !== a.value && (a.value = c),
< null == b.defaultValue && (a.defaultValue = c));
< null != b.defaultValue && (a.defaultValue = b.defaultValue);
< }
< function Fe(a) {
< var b = a.textContent;
< b === a._wrapperState.initialValue && (a.value = b);
< }
< var Ge = {
< html: "http://www.w3.org/1999/xhtml",
< mathml: "http://www.w3.org/1998/Math/MathML",
< svg: "http://www.w3.org/2000/svg"
< };
< function He(a) {
< switch (a) {
< case "svg":
< return "http://www.w3.org/2000/svg";
< case "math":
< return "http://www.w3.org/1998/Math/MathML";
< default:
< return "http://www.w3.org/1999/xhtml";
< }
< }
< function Ie(a, b) {
< return null == a || "http://www.w3.org/1999/xhtml" === a
< ? He(b)
< : "http://www.w3.org/2000/svg" === a && "foreignObject" === b
< ? "http://www.w3.org/1999/xhtml"
< : a;
< }
< var Je = void 0,
< Ke = (function(a) {
< return "undefined" !== typeof MSApp && MSApp.execUnsafeLocalFunction
< ? function(b, c, d, e) {
< MSApp.execUnsafeLocalFunction(function() {
< return a(b, c, d, e);
< });
< }
< : a;
< })(function(a, b) {
< if (a.namespaceURI !== Ge.svg || "innerHTML" in a) a.innerHTML = b;
< else {
< Je = Je || document.createElement("div");
< Je.innerHTML = "<svg>" + b + "</svg>";
< for (b = Je.firstChild; a.firstChild; ) a.removeChild(a.firstChild);
< for (; b.firstChild; ) a.appendChild(b.firstChild);
< }
< });
< function Le(a, b) {
< if (b) {
< var c = a.firstChild;
< if (c && c === a.lastChild && 3 === c.nodeType) {
< c.nodeValue = b;
< return;
< }
< }
< a.textContent = b;
< }
< var Me = {
< animationIterationCount: !0,
< borderImageOutset: !0,
< borderImageSlice: !0,
< borderImageWidth: !0,
< boxFlex: !0,
< boxFlexGroup: !0,
< boxOrdinalGroup: !0,
< columnCount: !0,
< columns: !0,
< flex: !0,
< flexGrow: !0,
< flexPositive: !0,
< flexShrink: !0,
< flexNegative: !0,
< flexOrder: !0,
< gridRow: !0,
< gridRowEnd: !0,
< gridRowSpan: !0,
< gridRowStart: !0,
< gridColumn: !0,
< gridColumnEnd: !0,
< gridColumnSpan: !0,
< gridColumnStart: !0,
< fontWeight: !0,
< lineClamp: !0,
< lineHeight: !0,
< opacity: !0,
< order: !0,
< orphans: !0,
< tabSize: !0,
< widows: !0,
< zIndex: !0,
< zoom: !0,
< fillOpacity: !0,
< floodOpacity: !0,
< stopOpacity: !0,
< strokeDasharray: !0,
< strokeDashoffset: !0,
< strokeMiterlimit: !0,
< strokeOpacity: !0,
< strokeWidth: !0
< },
< Ne = ["Webkit", "ms", "Moz", "O"];
< Object.keys(Me).forEach(function(a) {
< Ne.forEach(function(b) {
< b = b + a.charAt(0).toUpperCase() + a.substring(1);
< Me[b] = Me[a];
< });
< });
< function Oe(a, b) {
< a = a.style;
< for (var c in b)
< if (b.hasOwnProperty(c)) {
< var d = 0 === c.indexOf("--");
< var e = c;
< var f = b[c];
< e =
< null == f || "boolean" === typeof f || "" === f
< ? ""
< : d ||
< "number" !== typeof f ||
< 0 === f ||
< (Me.hasOwnProperty(e) && Me[e])
< ? ("" + f).trim()
< : f + "px";
< "float" === c && (c = "cssFloat");
< d ? a.setProperty(c, e) : (a[c] = e);
< }
< }
< var Pe = p(
< { menuitem: !0 },
< {
< area: !0,
< base: !0,
< br: !0,
< col: !0,
< embed: !0,
< hr: !0,
< img: !0,
< input: !0,
< keygen: !0,
< link: !0,
< meta: !0,
< param: !0,
< source: !0,
< track: !0,
< wbr: !0
< }
< );
< function Qe(a, b, c) {
< b &&
< (Pe[a] &&
< (null != b.children || null != b.dangerouslySetInnerHTML
< ? A("137", a, c())
< : void 0),
< null != b.dangerouslySetInnerHTML &&
< (null != b.children ? A("60") : void 0,
< "object" === typeof b.dangerouslySetInnerHTML &&
< "__html" in b.dangerouslySetInnerHTML
< ? void 0
< : A("61")),
< null != b.style && "object" !== typeof b.style ? A("62", c()) : void 0);
< }
< function Re(a, b) {
< if (-1 === a.indexOf("-")) return "string" === typeof b.is;
< switch (a) {
< case "annotation-xml":
< case "color-profile":
< case "font-face":
< case "font-face-src":
< case "font-face-uri":
< case "font-face-format":
< case "font-face-name":
< case "missing-glyph":
< return !1;
< default:
< return !0;
< }
< }
< var Se = v.thatReturns("");
< function Te(a, b) {
< a = 9 === a.nodeType || 11 === a.nodeType ? a : a.ownerDocument;
< var c = Sd(a);
< b = sa[b];
< for (var d = 0; d < b.length; d++) {
< var e = b[d];
< if (!c.hasOwnProperty(e) || !c[e]) {
< switch (e) {
< case "scroll":
< Nd("scroll", a);
< break;
< case "focus":
< case "blur":
< Nd("focus", a);
< Nd("blur", a);
< c.blur = !0;
< c.focus = !0;
< break;
< case "cancel":
< case "close":
< $b(e, !0) && Nd(e, a);
< break;
< case "invalid":
< case "submit":
< case "reset":
< break;
< default:
< -1 === jb.indexOf(e) && K(e, a);
< }
< c[e] = !0;
< }
< }
< }
< function Ue(a, b, c, d) {
< c = 9 === c.nodeType ? c : c.ownerDocument;
< d === Ge.html && (d = He(a));
< d === Ge.html
< ? "script" === a
< ? ((a = c.createElement("div")),
< (a.innerHTML = "<script>\x3c/script>"),
< (a = a.removeChild(a.firstChild)))
< : (a =
< "string" === typeof b.is
< ? c.createElement(a, { is: b.is })
< : c.createElement(a))
< : (a = c.createElementNS(d, a));
< return a;
< }
< function Ve(a, b) {
< return (9 === b.nodeType ? b : b.ownerDocument).createTextNode(a);
< }
< function We(a, b, c, d) {
< var e = Re(b, c);
< switch (b) {
< case "iframe":
< case "object":
< K("load", a);
< var f = c;
< break;
< case "video":
< case "audio":
< for (f = 0; f < jb.length; f++) K(jb[f], a);
< f = c;
< break;
< case "source":
< K("error", a);
< f = c;
< break;
< case "img":
< case "image":
< case "link":
< K("error", a);
< K("load", a);
< f = c;
< break;
< case "form":
< K("reset", a);
< K("submit", a);
< f = c;
< break;
< case "details":
< K("toggle", a);
< f = c;
< break;
< case "input":
< Ic(a, c);
< f = Hc(a, c);
< K("invalid", a);
< Te(d, "onChange");
< break;
< case "option":
< f = ze(a, c);
< break;
< case "select":
< Be(a, c);
< f = p({}, c, { value: void 0 });
< K("invalid", a);
< Te(d, "onChange");
< break;
< case "textarea":
< De(a, c);
< f = Ce(a, c);
< K("invalid", a);
< Te(d, "onChange");
< break;
< default:
< f = c;
< }
< Qe(b, f, Se);
< var g = f,
< h;
< for (h in g)
< if (g.hasOwnProperty(h)) {
< var k = g[h];
< "style" === h
< ? Oe(a, k, Se)
< : "dangerouslySetInnerHTML" === h
< ? ((k = k ? k.__html : void 0), null != k && Ke(a, k))
< : "children" === h
< ? "string" === typeof k
< ? ("textarea" !== b || "" !== k) && Le(a, k)
< : "number" === typeof k && Le(a, "" + k)
< : "suppressContentEditableWarning" !== h &&
< "suppressHydrationWarning" !== h &&
< "autoFocus" !== h &&
< (ra.hasOwnProperty(h)
< ? null != k && Te(d, h)
< : null != k && Gc(a, h, k, e));
< }
< switch (b) {
< case "input":
< cc(a);
< Nc(a, c, !1);
< break;
< case "textarea":
< cc(a);
< Fe(a, c);
< break;
< case "option":
< null != c.value && a.setAttribute("value", c.value);
< break;
< case "select":
< a.multiple = !!c.multiple;
< b = c.value;
< null != b
< ? Ae(a, !!c.multiple, b, !1)
< : null != c.defaultValue && Ae(a, !!c.multiple, c.defaultValue, !0);
< break;
< default:
< "function" === typeof f.onClick && (a.onclick = v);
< }
< }
< function Xe(a, b, c, d, e) {
< var f = null;
< switch (b) {
< case "input":
< c = Hc(a, c);
< d = Hc(a, d);
< f = [];
< break;
< case "option":
< c = ze(a, c);
< d = ze(a, d);
< f = [];
< break;
< case "select":
< c = p({}, c, { value: void 0 });
< d = p({}, d, { value: void 0 });
< f = [];
< break;
< case "textarea":
< c = Ce(a, c);
< d = Ce(a, d);
< f = [];
< break;
< default:
< "function" !== typeof c.onClick &&
< "function" === typeof d.onClick &&
< (a.onclick = v);
< }
< Qe(b, d, Se);
< b = a = void 0;
< var g = null;
< for (a in c)
< if (!d.hasOwnProperty(a) && c.hasOwnProperty(a) && null != c[a])
< if ("style" === a) {
< var h = c[a];
< for (b in h) h.hasOwnProperty(b) && (g || (g = {}), (g[b] = ""));
< } else
< "dangerouslySetInnerHTML" !== a &&
< "children" !== a &&
< "suppressContentEditableWarning" !== a &&
< "suppressHydrationWarning" !== a &&
< "autoFocus" !== a &&
< (ra.hasOwnProperty(a) ? f || (f = []) : (f = f || []).push(a, null));
< for (a in d) {
< var k = d[a];
< h = null != c ? c[a] : void 0;
< if (d.hasOwnProperty(a) && k !== h && (null != k || null != h))
< if ("style" === a)
< if (h) {
< for (b in h)
< !h.hasOwnProperty(b) ||
< (k && k.hasOwnProperty(b)) ||
< (g || (g = {}), (g[b] = ""));
< for (b in k)
< k.hasOwnProperty(b) &&
< h[b] !== k[b] &&
< (g || (g = {}), (g[b] = k[b]));
< } else g || (f || (f = []), f.push(a, g)), (g = k);
< else
< "dangerouslySetInnerHTML" === a
< ? ((k = k ? k.__html : void 0),
< (h = h ? h.__html : void 0),
< null != k && h !== k && (f = f || []).push(a, "" + k))
< : "children" === a
< ? h === k ||
< ("string" !== typeof k && "number" !== typeof k) ||
< (f = f || []).push(a, "" + k)
< : "suppressContentEditableWarning" !== a &&
< "suppressHydrationWarning" !== a &&
< (ra.hasOwnProperty(a)
< ? (null != k && Te(e, a), f || h === k || (f = []))
< : (f = f || []).push(a, k));
< }
< g && (f = f || []).push("style", g);
< return f;
< }
< function Ye(a, b, c, d, e) {
< "input" === c && "radio" === e.type && null != e.name && Kc(a, e);
< Re(c, d);
< d = Re(c, e);
< for (var f = 0; f < b.length; f += 2) {
< var g = b[f],
< h = b[f + 1];
< "style" === g
< ? Oe(a, h, Se)
< : "dangerouslySetInnerHTML" === g
< ? Ke(a, h)
< : "children" === g
< ? Le(a, h)
< : Gc(a, g, h, d);
< }
< switch (c) {
< case "input":
< Lc(a, e);
< break;
< case "textarea":
< Ee(a, e);
< break;
< case "select":
< (a._wrapperState.initialValue = void 0),
< (b = a._wrapperState.wasMultiple),
< (a._wrapperState.wasMultiple = !!e.multiple),
< (c = e.value),
< null != c
< ? Ae(a, !!e.multiple, c, !1)
< : b !== !!e.multiple &&
< (null != e.defaultValue
< ? Ae(a, !!e.multiple, e.defaultValue, !0)
< : Ae(a, !!e.multiple, e.multiple ? [] : "", !1));
< }
< }
< function Ze(a, b, c, d, e) {
< switch (b) {
< case "iframe":
< case "object":
< K("load", a);
< break;
< case "video":
< case "audio":
< for (d = 0; d < jb.length; d++) K(jb[d], a);
< break;
< case "source":
< K("error", a);
< break;
< case "img":
< case "image":
< case "link":
< K("error", a);
< K("load", a);
< break;
< case "form":
< K("reset", a);
< K("submit", a);
< break;
< case "details":
< K("toggle", a);
< break;
< case "input":
< Ic(a, c);
< K("invalid", a);
< Te(e, "onChange");
< break;
< case "select":
< Be(a, c);
< K("invalid", a);
< Te(e, "onChange");
< break;
< case "textarea":
< De(a, c), K("invalid", a), Te(e, "onChange");
< }
< Qe(b, c, Se);
< d = null;
< for (var f in c)
< if (c.hasOwnProperty(f)) {
< var g = c[f];
< "children" === f
< ? "string" === typeof g
< ? a.textContent !== g && (d = ["children", g])
< : "number" === typeof g &&
< a.textContent !== "" + g &&
< (d = ["children", "" + g])
< : ra.hasOwnProperty(f) && null != g && Te(e, f);
< }
< switch (b) {
< case "input":
< cc(a);
< Nc(a, c, !0);
< break;
< case "textarea":
< cc(a);
< Fe(a, c);
< break;
< case "select":
< case "option":
< break;
< default:
< "function" === typeof c.onClick && (a.onclick = v);
< }
< return d;
< }
< function $e(a, b) {
< return a.nodeValue !== b;
< }
< var af = {
< createElement: Ue,
< createTextNode: Ve,
< setInitialProperties: We,
< diffProperties: Xe,
< updateProperties: Ye,
< diffHydratedProperties: Ze,
< diffHydratedText: $e,
< warnForUnmatchedText: function() {},
< warnForDeletedHydratableElement: function() {},
< warnForDeletedHydratableText: function() {},
< warnForInsertedHydratedElement: function() {},
< warnForInsertedHydratedText: function() {},
< restoreControlledState: function(a, b, c) {
< switch (b) {
< case "input":
< Lc(a, c);
< b = c.name;
< if ("radio" === c.type && null != b) {
< for (c = a; c.parentNode; ) c = c.parentNode;
< c = c.querySelectorAll(
< "input[name=" + JSON.stringify("" + b) + '][type="radio"]'
< );
< for (b = 0; b < c.length; b++) {
< var d = c[b];
< if (d !== a && d.form === a.form) {
< var e = Pa(d);
< e ? void 0 : A("90");
< dc(d);
< Lc(d, e);
< }
< }
< }
< break;
< case "textarea":
< Ee(a, c);
< break;
< case "select":
< (b = c.value), null != b && Ae(a, !!c.multiple, b, !1);
< }
< }
< },
< bf = null,
< cf = null;
< function df(a, b) {
< switch (a) {
< case "button":
< case "input":
< case "select":
< case "textarea":
< return !!b.autoFocus;
< }
< return !1;
< }
< function ef(a, b) {
< return (
< "textarea" === a ||
< "string" === typeof b.children ||
< "number" === typeof b.children ||
< ("object" === typeof b.dangerouslySetInnerHTML &&
< null !== b.dangerouslySetInnerHTML &&
< "string" === typeof b.dangerouslySetInnerHTML.__html)
< );
< }
< var ff = he,
< gf = je,
< hf = ke;
< function jf(a) {
< for (a = a.nextSibling; a && 1 !== a.nodeType && 3 !== a.nodeType; )
< a = a.nextSibling;
< return a;
< }
< function kf(a) {
< for (a = a.firstChild; a && 1 !== a.nodeType && 3 !== a.nodeType; )
< a = a.nextSibling;
< return a;
< }
< new Set();
< var lf = [],
< mf = -1;
< function nf(a) {
< return { current: a };
< }
< function M(a) {
< 0 > mf || ((a.current = lf[mf]), (lf[mf] = null), mf--);
< }
< function N(a, b) {
< mf++;
< lf[mf] = a.current;
< a.current = b;
< }
< var of = nf(ha),
< O = nf(!1),
< pf = ha;
< function qf(a) {
< return rf(a) ? pf : of.current;
< }
< function sf(a, b) {
< var c = a.type.contextTypes;
< if (!c) return ha;
< var d = a.stateNode;
< if (d && d.__reactInternalMemoizedUnmaskedChildContext === b)
< return d.__reactInternalMemoizedMaskedChildContext;
< var e = {},
< f;
< for (f in c) e[f] = b[f];
< d &&
< ((a = a.stateNode),
< (a.__reactInternalMemoizedUnmaskedChildContext = b),
< (a.__reactInternalMemoizedMaskedChildContext = e));
< return e;
< }
< function rf(a) {
< return 2 === a.tag && null != a.type.childContextTypes;
< }
< function tf(a) {
< rf(a) && (M(O, a), M(of, a));
< }
< function uf(a) {
< M(O, a);
< M(of, a);
< }
< function vf(a, b, c) {
< of.current !== ha ? A("168") : void 0;
< N(of, b, a);
< N(O, c, a);
< }
< function wf(a, b) {
< var c = a.stateNode,
< d = a.type.childContextTypes;
< if ("function" !== typeof c.getChildContext) return b;
< c = c.getChildContext();
< for (var e in c) e in d ? void 0 : A("108", uc(a) || "Unknown", e);
< return p({}, b, c);
< }
< function xf(a) {
< if (!rf(a)) return !1;
< var b = a.stateNode;
< b = (b && b.__reactInternalMemoizedMergedChildContext) || ha;
< pf = of.current;
< N(of, b, a);
< N(O, O.current, a);
< return !0;
< }
< function yf(a, b) {
< var c = a.stateNode;
< c ? void 0 : A("169");
< if (b) {
< var d = wf(a, pf);
< c.__reactInternalMemoizedMergedChildContext = d;
< M(O, a);
< M(of, a);
< N(of, d, a);
< } else M(O, a);
< N(O, b, a);
< }
< function zf(a, b, c, d) {
< this.tag = a;
< this.key = c;
< this.sibling = this.child = this.return = this.stateNode = this.type = null;
< this.index = 0;
< this.ref = null;
< this.pendingProps = b;
< this.memoizedState = this.updateQueue = this.memoizedProps = null;
< this.mode = d;
< this.effectTag = 0;
< this.lastEffect = this.firstEffect = this.nextEffect = null;
< this.expirationTime = 0;
< this.alternate = null;
< }
< function Af(a, b, c) {
< var d = a.alternate;
< null === d
< ? ((d = new zf(a.tag, b, a.key, a.mode)),
< (d.type = a.type),
< (d.stateNode = a.stateNode),
< (d.alternate = a),
< (a.alternate = d))
< : ((d.pendingProps = b),
< (d.effectTag = 0),
< (d.nextEffect = null),
< (d.firstEffect = null),
< (d.lastEffect = null));
< d.expirationTime = c;
< d.child = a.child;
< d.memoizedProps = a.memoizedProps;
< d.memoizedState = a.memoizedState;
< d.updateQueue = a.updateQueue;
< d.sibling = a.sibling;
< d.index = a.index;
< d.ref = a.ref;
< return d;
< }
< function Bf(a, b, c) {
< var d = a.type,
< e = a.key;
< a = a.props;
< if ("function" === typeof d)
< var f = d.prototype && d.prototype.isReactComponent ? 2 : 0;
< else if ("string" === typeof d) f = 5;
< else
< switch (d) {
< case ic:
< return Cf(a.children, b, c, e);
< case pc:
< f = 11;
< b |= 3;
< break;
< case jc:
< f = 11;
< b |= 2;
< break;
< case kc:
< return (
< (d = new zf(15, a, e, b | 4)),
< (d.type = kc),
< (d.expirationTime = c),
< d
< );
< case rc:
< f = 16;
< b |= 2;
< break;
< default:
< a: {
< switch ("object" === typeof d && null !== d ? d.$$typeof : null) {
< case lc:
< f = 13;
< break a;
< case mc:
< f = 12;
< break a;
< case qc:
< f = 14;
< break a;
< default:
< A("130", null == d ? d : typeof d, "");
< }
< f = void 0;
< }
< }
< b = new zf(f, a, e, b);
< b.type = d;
< b.expirationTime = c;
< return b;
< }
< function Cf(a, b, c, d) {
< a = new zf(10, a, d, b);
< a.expirationTime = c;
< return a;
< }
< function Df(a, b, c) {
< a = new zf(6, a, null, b);
< a.expirationTime = c;
< return a;
< }
< function Ef(a, b, c) {
< b = new zf(4, null !== a.children ? a.children : [], a.key, b);
< b.expirationTime = c;
< b.stateNode = {
< containerInfo: a.containerInfo,
< pendingChildren: null,
< implementation: a.implementation
< };
< return b;
< }
< function Ff(a, b, c) {
< b = new zf(3, null, null, b ? 3 : 0);
< a = {
< current: b,
< containerInfo: a,
< pendingChildren: null,
< earliestPendingTime: 0,
< latestPendingTime: 0,
< earliestSuspendedTime: 0,
< latestSuspendedTime: 0,
< latestPingedTime: 0,
< pendingCommitExpirationTime: 0,
< finishedWork: null,
< context: null,
< pendingContext: null,
< hydrate: c,
< remainingExpirationTime: 0,
< firstBatch: null,
< nextScheduledRoot: null
< };
< return (b.stateNode = a);
< }
< var Gf = null,
< Hf = null;
< function If(a) {
< return function(b) {
< try {
< return a(b);
< } catch (c) {}
< };
< }
< function Jf(a) {
< if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1;
< var b = __REACT_DEVTOOLS_GLOBAL_HOOK__;
< if (b.isDisabled || !b.supportsFiber) return !0;
< try {
< var c = b.inject(a);
< Gf = If(function(a) {
< return b.onCommitFiberRoot(c, a);
< });
< Hf = If(function(a) {
< return b.onCommitFiberUnmount(c, a);
< });
< } catch (d) {}
< return !0;
< }
< function Kf(a) {
< "function" === typeof Gf && Gf(a);
< }
< function Lf(a) {
< "function" === typeof Hf && Hf(a);
< }
< var Mf = !1;
< function Nf(a) {
< return {
< expirationTime: 0,
< baseState: a,
< firstUpdate: null,
< lastUpdate: null,
< firstCapturedUpdate: null,
< lastCapturedUpdate: null,
< firstEffect: null,
< lastEffect: null,
< firstCapturedEffect: null,
< lastCapturedEffect: null
< };
< }
< function Of(a) {
< return {
< expirationTime: a.expirationTime,
< baseState: a.baseState,
< firstUpdate: a.firstUpdate,
< lastUpdate: a.lastUpdate,
< firstCapturedUpdate: null,
< lastCapturedUpdate: null,
< firstEffect: null,
< lastEffect: null,
< firstCapturedEffect: null,
< lastCapturedEffect: null
< };
< }
< function Pf(a) {
< return {
< expirationTime: a,
< tag: 0,
< payload: null,
< callback: null,
< next: null,
< nextEffect: null
< };
< }
< function Qf(a, b, c) {
< null === a.lastUpdate
< ? (a.firstUpdate = a.lastUpdate = b)
< : ((a.lastUpdate.next = b), (a.lastUpdate = b));
< if (0 === a.expirationTime || a.expirationTime > c) a.expirationTime = c;
< }
< function Rf(a, b, c) {
< var d = a.alternate;
< if (null === d) {
< var e = a.updateQueue;
< var f = null;
< null === e && (e = a.updateQueue = Nf(a.memoizedState));
< } else
< (e = a.updateQueue),
< (f = d.updateQueue),
< null === e
< ? null === f
< ? ((e = a.updateQueue = Nf(a.memoizedState)),
< (f = d.updateQueue = Nf(d.memoizedState)))
< : (e = a.updateQueue = Of(f))
< : null === f && (f = d.updateQueue = Of(e));
< null === f || e === f
< ? Qf(e, b, c)
< : null === e.lastUpdate || null === f.lastUpdate
< ? (Qf(e, b, c), Qf(f, b, c))
< : (Qf(e, b, c), (f.lastUpdate = b));
< }
< function Sf(a, b, c) {
< var d = a.updateQueue;
< d = null === d ? (a.updateQueue = Nf(a.memoizedState)) : Tf(a, d);
< null === d.lastCapturedUpdate
< ? (d.firstCapturedUpdate = d.lastCapturedUpdate = b)
< : ((d.lastCapturedUpdate.next = b), (d.lastCapturedUpdate = b));
< if (0 === d.expirationTime || d.expirationTime > c) d.expirationTime = c;
< }
< function Tf(a, b) {
< var c = a.alternate;
< null !== c && b === c.updateQueue && (b = a.updateQueue = Of(b));
< return b;
< }
< function Uf(a, b, c, d, e, f) {
< switch (c.tag) {
< case 1:
< return (a = c.payload), "function" === typeof a ? a.call(f, d, e) : a;
< case 3:
< a.effectTag = (a.effectTag & -1025) | 64;
< case 0:
< a = c.payload;
< e = "function" === typeof a ? a.call(f, d, e) : a;
< if (null === e || void 0 === e) break;
< return p({}, d, e);
< case 2:
< Mf = !0;
< }
< return d;
< }
< function Vf(a, b, c, d, e) {
< Mf = !1;
< if (!(0 === b.expirationTime || b.expirationTime > e)) {
< b = Tf(a, b);
< for (
< var f = b.baseState, g = null, h = 0, k = b.firstUpdate, n = f;
< null !== k;
<
< ) {
< var r = k.expirationTime;
< if (r > e) {
< if ((null === g && ((g = k), (f = n)), 0 === h || h > r)) h = r;
< } else
< (n = Uf(a, b, k, n, c, d)),
< null !== k.callback &&
< ((a.effectTag |= 32),
< (k.nextEffect = null),
< null === b.lastEffect
< ? (b.firstEffect = b.lastEffect = k)
< : ((b.lastEffect.nextEffect = k), (b.lastEffect = k)));
< k = k.next;
< }
< r = null;
< for (k = b.firstCapturedUpdate; null !== k; ) {
< var w = k.expirationTime;
< if (w > e) {
< if ((null === r && ((r = k), null === g && (f = n)), 0 === h || h > w))
< h = w;
< } else
< (n = Uf(a, b, k, n, c, d)),
< null !== k.callback &&
< ((a.effectTag |= 32),
< (k.nextEffect = null),
< null === b.lastCapturedEffect
< ? (b.firstCapturedEffect = b.lastCapturedEffect = k)
< : ((b.lastCapturedEffect.nextEffect = k),
< (b.lastCapturedEffect = k)));
< k = k.next;
< }
< null === g && (b.lastUpdate = null);
< null === r ? (b.lastCapturedUpdate = null) : (a.effectTag |= 32);
< null === g && null === r && (f = n);
< b.baseState = f;
< b.firstUpdate = g;
< b.firstCapturedUpdate = r;
< b.expirationTime = h;
< a.memoizedState = n;
< }
< }
< function Wf(a, b) {
< "function" !== typeof a ? A("191", a) : void 0;
< a.call(b);
< }
< function Xf(a, b, c) {
< null !== b.firstCapturedUpdate &&
< (null !== b.lastUpdate &&
< ((b.lastUpdate.next = b.firstCapturedUpdate),
< (b.lastUpdate = b.lastCapturedUpdate)),
< (b.firstCapturedUpdate = b.lastCapturedUpdate = null));
< a = b.firstEffect;
< for (b.firstEffect = b.lastEffect = null; null !== a; ) {
< var d = a.callback;
< null !== d && ((a.callback = null), Wf(d, c));
< a = a.nextEffect;
< }
< a = b.firstCapturedEffect;
< for (b.firstCapturedEffect = b.lastCapturedEffect = null; null !== a; )
< (b = a.callback),
< null !== b && ((a.callback = null), Wf(b, c)),
< (a = a.nextEffect);
< }
< function Yf(a, b) {
< return { value: a, source: b, stack: vc(b) };
< }
< var Zf = nf(null),
< $f = nf(null),
< ag = nf(0);
< function bg(a) {
< var b = a.type._context;
< N(ag, b._changedBits, a);
< N($f, b._currentValue, a);
< N(Zf, a, a);
< b._currentValue = a.pendingProps.value;
< b._changedBits = a.stateNode;
< }
< function cg(a) {
< var b = ag.current,
< c = $f.current;
< M(Zf, a);
< M($f, a);
< M(ag, a);
< a = a.type._context;
< a._currentValue = c;
< a._changedBits = b;
< }
< var dg = {},
< eg = nf(dg),
< fg = nf(dg),
< gg = nf(dg);
< function hg(a) {
< a === dg ? A("174") : void 0;
< return a;
< }
< function jg(a, b) {
< N(gg, b, a);
< N(fg, a, a);
< N(eg, dg, a);
< var c = b.nodeType;
< switch (c) {
< case 9:
< case 11:
< b = (b = b.documentElement) ? b.namespaceURI : Ie(null, "");
< break;
< default:
< (c = 8 === c ? b.parentNode : b),
< (b = c.namespaceURI || null),
< (c = c.tagName),
< (b = Ie(b, c));
< }
< M(eg, a);
< N(eg, b, a);
< }
< function kg(a) {
< M(eg, a);
< M(fg, a);
< M(gg, a);
< }
< function lg(a) {
< fg.current === a && (M(eg, a), M(fg, a));
< }
< function mg(a, b, c) {
< var d = a.memoizedState;
< b = b(c, d);
< d = null === b || void 0 === b ? d : p({}, d, b);
< a.memoizedState = d;
< a = a.updateQueue;
< null !== a && 0 === a.expirationTime && (a.baseState = d);
< }
< var qg = {
< isMounted: function(a) {
< return (a = a._reactInternalFiber) ? 2 === kd(a) : !1;
< },
< enqueueSetState: function(a, b, c) {
< a = a._reactInternalFiber;
< var d = ng();
< d = og(d, a);
< var e = Pf(d);
< e.payload = b;
< void 0 !== c && null !== c && (e.callback = c);
< Rf(a, e, d);
< pg(a, d);
< },
< enqueueReplaceState: function(a, b, c) {
< a = a._reactInternalFiber;
< var d = ng();
< d = og(d, a);
< var e = Pf(d);
< e.tag = 1;
< e.payload = b;
< void 0 !== c && null !== c && (e.callback = c);
< Rf(a, e, d);
< pg(a, d);
< },
< enqueueForceUpdate: function(a, b) {
< a = a._reactInternalFiber;
< var c = ng();
< c = og(c, a);
< var d = Pf(c);
< d.tag = 2;
< void 0 !== b && null !== b && (d.callback = b);
< Rf(a, d, c);
< pg(a, c);
< }
< };
< function rg(a, b, c, d, e, f) {
< var g = a.stateNode;
< a = a.type;
< return "function" === typeof g.shouldComponentUpdate
< ? g.shouldComponentUpdate(c, e, f)
< : a.prototype && a.prototype.isPureReactComponent
< ? !ea(b, c) || !ea(d, e)
< : !0;
< }
< function sg(a, b, c, d) {
< a = b.state;
< "function" === typeof b.componentWillReceiveProps &&
< b.componentWillReceiveProps(c, d);
< "function" === typeof b.UNSAFE_componentWillReceiveProps &&
< b.UNSAFE_componentWillReceiveProps(c, d);
< b.state !== a && qg.enqueueReplaceState(b, b.state, null);
< }
< function tg(a, b) {
< var c = a.type,
< d = a.stateNode,
< e = a.pendingProps,
< f = qf(a);
< d.props = e;
< d.state = a.memoizedState;
< d.refs = ha;
< d.context = sf(a, f);
< f = a.updateQueue;
< null !== f && (Vf(a, f, e, d, b), (d.state = a.memoizedState));
< f = a.type.getDerivedStateFromProps;
< "function" === typeof f && (mg(a, f, e), (d.state = a.memoizedState));
< "function" === typeof c.getDerivedStateFromProps ||
< "function" === typeof d.getSnapshotBeforeUpdate ||
< ("function" !== typeof d.UNSAFE_componentWillMount &&
< "function" !== typeof d.componentWillMount) ||
< ((c = d.state),
< "function" === typeof d.componentWillMount && d.componentWillMount(),
< "function" === typeof d.UNSAFE_componentWillMount &&
< d.UNSAFE_componentWillMount(),
< c !== d.state && qg.enqueueReplaceState(d, d.state, null),
< (f = a.updateQueue),
< null !== f && (Vf(a, f, e, d, b), (d.state = a.memoizedState)));
< "function" === typeof d.componentDidMount && (a.effectTag |= 4);
< }
< var ug = Array.isArray;
< function vg(a, b, c) {
< a = c.ref;
< if (null !== a && "function" !== typeof a && "object" !== typeof a) {
< if (c._owner) {
< c = c._owner;
< var d = void 0;
< c && (2 !== c.tag ? A("110") : void 0, (d = c.stateNode));
< d ? void 0 : A("147", a);
< var e = "" + a;
< if (
< null !== b &&
< null !== b.ref &&
< "function" === typeof b.ref &&
< b.ref._stringRef === e
< )
< return b.ref;
< b = function(a) {
< var b = d.refs === ha ? (d.refs = {}) : d.refs;
< null === a ? delete b[e] : (b[e] = a);
< };
< b._stringRef = e;
< return b;
< }
< "string" !== typeof a ? A("148") : void 0;
< c._owner ? void 0 : A("254", a);
< }
< return a;
< }
< function wg(a, b) {
< "textarea" !== a.type &&
< A(
< "31",
< "[object Object]" === Object.prototype.toString.call(b)
< ? "object with keys {" + Object.keys(b).join(", ") + "}"
< : b,
< ""
< );
< }
< function xg(a) {
< function b(b, c) {
< if (a) {
< var d = b.lastEffect;
< null !== d
< ? ((d.nextEffect = c), (b.lastEffect = c))
< : (b.firstEffect = b.lastEffect = c);
< c.nextEffect = null;
< c.effectTag = 8;
< }
< }
< function c(c, d) {
< if (!a) return null;
< for (; null !== d; ) b(c, d), (d = d.sibling);
< return null;
< }
< function d(a, b) {
< for (a = new Map(); null !== b; )
< null !== b.key ? a.set(b.key, b) : a.set(b.index, b), (b = b.sibling);
< return a;
< }
< function e(a, b, c) {
< a = Af(a, b, c);
< a.index = 0;
< a.sibling = null;
< return a;
< }
< function f(b, c, d) {
< b.index = d;
< if (!a) return c;
< d = b.alternate;
< if (null !== d) return (d = d.index), d < c ? ((b.effectTag = 2), c) : d;
< b.effectTag = 2;
< return c;
< }
< function g(b) {
< a && null === b.alternate && (b.effectTag = 2);
< return b;
< }
< function h(a, b, c, d) {
< if (null === b || 6 !== b.tag)
< return (b = Df(c, a.mode, d)), (b.return = a), b;
< b = e(b, c, d);
< b.return = a;
< return b;
< }
< function k(a, b, c, d) {
< if (null !== b && b.type === c.type)
< return (d = e(b, c.props, d)), (d.ref = vg(a, b, c)), (d.return = a), d;
< d = Bf(c, a.mode, d);
< d.ref = vg(a, b, c);
< d.return = a;
< return d;
< }
< function n(a, b, c, d) {
< if (
< null === b ||
< 4 !== b.tag ||
< b.stateNode.containerInfo !== c.containerInfo ||
< b.stateNode.implementation !== c.implementation
< )
< return (b = Ef(c, a.mode, d)), (b.return = a), b;
< b = e(b, c.children || [], d);
< b.return = a;
< return b;
< }
< function r(a, b, c, d, f) {
< if (null === b || 10 !== b.tag)
< return (b = Cf(c, a.mode, d, f)), (b.return = a), b;
< b = e(b, c, d);
< b.return = a;
< return b;
< }
< function w(a, b, c) {
< if ("string" === typeof b || "number" === typeof b)
< return (b = Df("" + b, a.mode, c)), (b.return = a), b;
< if ("object" === typeof b && null !== b) {
< switch (b.$$typeof) {
< case gc:
< return (
< (c = Bf(b, a.mode, c)), (c.ref = vg(a, null, b)), (c.return = a), c
< );
< case hc:
< return (b = Ef(b, a.mode, c)), (b.return = a), b;
< }
< if (ug(b) || tc(b))
< return (b = Cf(b, a.mode, c, null)), (b.return = a), b;
< wg(a, b);
< }
< return null;
< }
< function P(a, b, c, d) {
< var e = null !== b ? b.key : null;
< if ("string" === typeof c || "number" === typeof c)
< return null !== e ? null : h(a, b, "" + c, d);
< if ("object" === typeof c && null !== c) {
< switch (c.$$typeof) {
< case gc:
< return c.key === e
< ? c.type === ic
< ? r(a, b, c.props.children, d, e)
< : k(a, b, c, d)
< : null;
< case hc:
< return c.key === e ? n(a, b, c, d) : null;
< }
< if (ug(c) || tc(c)) return null !== e ? null : r(a, b, c, d, null);
< wg(a, c);
< }
< return null;
< }
< function nc(a, b, c, d, e) {
< if ("string" === typeof d || "number" === typeof d)
< return (a = a.get(c) || null), h(b, a, "" + d, e);
< if ("object" === typeof d && null !== d) {
< switch (d.$$typeof) {
< case gc:
< return (
< (a = a.get(null === d.key ? c : d.key) || null),
< d.type === ic ? r(b, a, d.props.children, e, d.key) : k(b, a, d, e)
< );
< case hc:
< return (a = a.get(null === d.key ? c : d.key) || null), n(b, a, d, e);
< }
< if (ug(d) || tc(d)) return (a = a.get(c) || null), r(b, a, d, e, null);
< wg(b, d);
< }
< return null;
< }
< function Jd(e, g, h, k) {
< for (
< var u = null, x = null, t = g, q = (g = 0), n = null;
< null !== t && q < h.length;
< q++
< ) {
< t.index > q ? ((n = t), (t = null)) : (n = t.sibling);
< var l = P(e, t, h[q], k);
< if (null === l) {
< null === t && (t = n);
< break;
< }
< a && t && null === l.alternate && b(e, t);
< g = f(l, g, q);
< null === x ? (u = l) : (x.sibling = l);
< x = l;
< t = n;
< }
< if (q === h.length) return c(e, t), u;
< if (null === t) {
< for (; q < h.length; q++)
< if ((t = w(e, h[q], k)))
< (g = f(t, g, q)), null === x ? (u = t) : (x.sibling = t), (x = t);
< return u;
< }
< for (t = d(e, t); q < h.length; q++)
< if ((n = nc(t, e, q, h[q], k)))
< a && null !== n.alternate && t.delete(null === n.key ? q : n.key),
< (g = f(n, g, q)),
< null === x ? (u = n) : (x.sibling = n),
< (x = n);
< a &&
< t.forEach(function(a) {
< return b(e, a);
< });
< return u;
< }
< function E(e, g, h, k) {
< var u = tc(h);
< "function" !== typeof u ? A("150") : void 0;
< h = u.call(h);
< null == h ? A("151") : void 0;
< for (
< var t = (u = null), n = g, x = (g = 0), y = null, l = h.next();
< null !== n && !l.done;
< x++, l = h.next()
< ) {
< n.index > x ? ((y = n), (n = null)) : (y = n.sibling);
< var r = P(e, n, l.value, k);
< if (null === r) {
< n || (n = y);
< break;
< }
< a && n && null === r.alternate && b(e, n);
< g = f(r, g, x);
< null === t ? (u = r) : (t.sibling = r);
< t = r;
< n = y;
< }
< if (l.done) return c(e, n), u;
< if (null === n) {
< for (; !l.done; x++, l = h.next())
< (l = w(e, l.value, k)),
< null !== l &&
< ((g = f(l, g, x)), null === t ? (u = l) : (t.sibling = l), (t = l));
< return u;
< }
< for (n = d(e, n); !l.done; x++, l = h.next())
< (l = nc(n, e, x, l.value, k)),
< null !== l &&
< (a && null !== l.alternate && n.delete(null === l.key ? x : l.key),
< (g = f(l, g, x)),
< null === t ? (u = l) : (t.sibling = l),
< (t = l));
< a &&
< n.forEach(function(a) {
< return b(e, a);
< });
< return u;
< }
< return function(a, d, f, h) {
< var k =
< "object" === typeof f && null !== f && f.type === ic && null === f.key;
< k && (f = f.props.children);
< var n = "object" === typeof f && null !== f;
< if (n)
< switch (f.$$typeof) {
< case gc:
< a: {
< n = f.key;
< for (k = d; null !== k; ) {
< if (k.key === n)
< if (10 === k.tag ? f.type === ic : k.type === f.type) {
< c(a, k.sibling);
< d = e(k, f.type === ic ? f.props.children : f.props, h);
< d.ref = vg(a, k, f);
< d.return = a;
< a = d;
< break a;
< } else {
< c(a, k);
< break;
< }
< else b(a, k);
< k = k.sibling;
< }
< f.type === ic
< ? ((d = Cf(f.props.children, a.mode, h, f.key)),
< (d.return = a),
< (a = d))
< : ((h = Bf(f, a.mode, h)),
< (h.ref = vg(a, d, f)),
< (h.return = a),
< (a = h));
< }
< return g(a);
< case hc:
< a: {
< for (k = f.key; null !== d; ) {
< if (d.key === k)
< if (
< 4 === d.tag &&
< d.stateNode.containerInfo === f.containerInfo &&
< d.stateNode.implementation === f.implementation
< ) {
< c(a, d.sibling);
< d = e(d, f.children || [], h);
< d.return = a;
< a = d;
< break a;
< } else {
< c(a, d);
< break;
< }
< else b(a, d);
< d = d.sibling;
< }
< d = Ef(f, a.mode, h);
< d.return = a;
< a = d;
< }
< return g(a);
< }
< if ("string" === typeof f || "number" === typeof f)
< return (
< (f = "" + f),
< null !== d && 6 === d.tag
< ? (c(a, d.sibling), (d = e(d, f, h)), (d.return = a), (a = d))
< : (c(a, d), (d = Df(f, a.mode, h)), (d.return = a), (a = d)),
< g(a)
< );
< if (ug(f)) return Jd(a, d, f, h);
< if (tc(f)) return E(a, d, f, h);
< n && wg(a, f);
< if ("undefined" === typeof f && !k)
< switch (a.tag) {
< case 2:
< case 1:
< (h = a.type), A("152", h.displayName || h.name || "Component");
< }
< return c(a, d);
< };
< }
< var yg = xg(!0),
< zg = xg(!1),
< Ag = null,
< Bg = null,
< Cg = !1;
< function Dg(a, b) {
< var c = new zf(5, null, null, 0);
< c.type = "DELETED";
< c.stateNode = b;
< c.return = a;
< c.effectTag = 8;
< null !== a.lastEffect
< ? ((a.lastEffect.nextEffect = c), (a.lastEffect = c))
< : (a.firstEffect = a.lastEffect = c);
< }
< function Eg(a, b) {
< switch (a.tag) {
< case 5:
< var c = a.type;
< b =
< 1 !== b.nodeType || c.toLowerCase() !== b.nodeName.toLowerCase()
< ? null
< : b;
< return null !== b ? ((a.stateNode = b), !0) : !1;
< case 6:
< return (
< (b = "" === a.pendingProps || 3 !== b.nodeType ? null : b),
< null !== b ? ((a.stateNode = b), !0) : !1
< );
< default:
< return !1;
< }
< }
< function Fg(a) {
< if (Cg) {
< var b = Bg;
< if (b) {
< var c = b;
< if (!Eg(a, b)) {
< b = jf(c);
< if (!b || !Eg(a, b)) {
< a.effectTag |= 2;
< Cg = !1;
< Ag = a;
< return;
< }
< Dg(Ag, c);
< }
< Ag = a;
< Bg = kf(b);
< } else (a.effectTag |= 2), (Cg = !1), (Ag = a);
< }
< }
< function Gg(a) {
< for (a = a.return; null !== a && 5 !== a.tag && 3 !== a.tag; ) a = a.return;
< Ag = a;
< }
< function Hg(a) {
< if (a !== Ag) return !1;
< if (!Cg) return Gg(a), (Cg = !0), !1;
< var b = a.type;
< if (5 !== a.tag || ("head" !== b && "body" !== b && !ef(b, a.memoizedProps)))
< for (b = Bg; b; ) Dg(a, b), (b = jf(b));
< Gg(a);
< Bg = Ag ? jf(a.stateNode) : null;
< return !0;
< }
< function Ig() {
< Bg = Ag = null;
< Cg = !1;
< }
< function Q(a, b, c) {
< Jg(a, b, c, b.expirationTime);
< }
< function Jg(a, b, c, d) {
< b.child = null === a ? zg(b, null, c, d) : yg(b, a.child, c, d);
< }
< function Kg(a, b) {
< var c = b.ref;
< if ((null === a && null !== c) || (null !== a && a.ref !== c))
< b.effectTag |= 128;
< }
< function Lg(a, b, c, d, e) {
< Kg(a, b);
< var f = 0 !== (b.effectTag & 64);
< if (!c && !f) return d && yf(b, !1), R(a, b);
< c = b.stateNode;
< ec.current = b;
< var g = f ? null : c.render();
< b.effectTag |= 1;
< f && (Jg(a, b, null, e), (b.child = null));
< Jg(a, b, g, e);
< b.memoizedState = c.state;
< b.memoizedProps = c.props;
< d && yf(b, !0);
< return b.child;
< }
< function Mg(a) {
< var b = a.stateNode;
< b.pendingContext
< ? vf(a, b.pendingContext, b.pendingContext !== b.context)
< : b.context && vf(a, b.context, !1);
< jg(a, b.containerInfo);
< }
< function Ng(a, b, c, d) {
< var e = a.child;
< null !== e && (e.return = a);
< for (; null !== e; ) {
< switch (e.tag) {
< case 12:
< var f = e.stateNode | 0;
< if (e.type === b && 0 !== (f & c)) {
< for (f = e; null !== f; ) {
< var g = f.alternate;
< if (0 === f.expirationTime || f.expirationTime > d)
< (f.expirationTime = d),
< null !== g &&
< (0 === g.expirationTime || g.expirationTime > d) &&
< (g.expirationTime = d);
< else if (
< null !== g &&
< (0 === g.expirationTime || g.expirationTime > d)
< )
< g.expirationTime = d;
< else break;
< f = f.return;
< }
< f = null;
< } else f = e.child;
< break;
< case 13:
< f = e.type === a.type ? null : e.child;
< break;
< default:
< f = e.child;
< }
< if (null !== f) f.return = e;
< else
< for (f = e; null !== f; ) {
< if (f === a) {
< f = null;
< break;
< }
< e = f.sibling;
< if (null !== e) {
< e.return = f.return;
< f = e;
< break;
< }
< f = f.return;
< }
< e = f;
< }
< }
< function Rg(a, b, c) {
< var d = b.type._context,
< e = b.pendingProps,
< f = b.memoizedProps,
< g = !0;
< if (O.current) g = !1;
< else if (f === e) return (b.stateNode = 0), bg(b), R(a, b);
< var h = e.value;
< b.memoizedProps = e;
< if (null === f) h = 1073741823;
< else if (f.value === e.value) {
< if (f.children === e.children && g)
< return (b.stateNode = 0), bg(b), R(a, b);
< h = 0;
< } else {
< var k = f.value;
< if ((k === h && (0 !== k || 1 / k === 1 / h)) || (k !== k && h !== h)) {
< if (f.children === e.children && g)
< return (b.stateNode = 0), bg(b), R(a, b);
< h = 0;
< } else if (
< ((h =
< "function" === typeof d._calculateChangedBits
< ? d._calculateChangedBits(k, h)
< : 1073741823),
< (h |= 0),
< 0 === h)
< ) {
< if (f.children === e.children && g)
< return (b.stateNode = 0), bg(b), R(a, b);
< } else Ng(b, d, h, c);
< }
< b.stateNode = h;
< bg(b);
< Q(a, b, e.children);
< return b.child;
< }
< function R(a, b) {
< null !== a && b.child !== a.child ? A("153") : void 0;
< if (null !== b.child) {
< a = b.child;
< var c = Af(a, a.pendingProps, a.expirationTime);
< b.child = c;
< for (c.return = b; null !== a.sibling; )
< (a = a.sibling),
< (c = c.sibling = Af(a, a.pendingProps, a.expirationTime)),
< (c.return = b);
< c.sibling = null;
< }
< return b.child;
< }
< function Sg(a, b, c) {
< if (0 === b.expirationTime || b.expirationTime > c) {
< switch (b.tag) {
< case 3:
< Mg(b);
< break;
< case 2:
< xf(b);
< break;
< case 4:
< jg(b, b.stateNode.containerInfo);
< break;
< case 13:
< bg(b);
< }
< return null;
< }
< switch (b.tag) {
< case 0:
< null !== a ? A("155") : void 0;
< var d = b.type,
< e = b.pendingProps,
< f = qf(b);
< f = sf(b, f);
< d = d(e, f);
< b.effectTag |= 1;
< "object" === typeof d &&
< null !== d &&
< "function" === typeof d.render &&
< void 0 === d.$$typeof
< ? ((f = b.type),
< (b.tag = 2),
< (b.memoizedState =
< null !== d.state && void 0 !== d.state ? d.state : null),
< (f = f.getDerivedStateFromProps),
< "function" === typeof f && mg(b, f, e),
< (e = xf(b)),
< (d.updater = qg),
< (b.stateNode = d),
< (d._reactInternalFiber = b),
< tg(b, c),
< (a = Lg(a, b, !0, e, c)))
< : ((b.tag = 1), Q(a, b, d), (b.memoizedProps = e), (a = b.child));
< return a;
< case 1:
< return (
< (e = b.type),
< (c = b.pendingProps),
< O.current || b.memoizedProps !== c
< ? ((d = qf(b)),
< (d = sf(b, d)),
< (e = e(c, d)),
< (b.effectTag |= 1),
< Q(a, b, e),
< (b.memoizedProps = c),
< (a = b.child))
< : (a = R(a, b)),
< a
< );
< case 2:
< e = xf(b);
< if (null === a)
< if (null === b.stateNode) {
< var g = b.pendingProps,
< h = b.type;
< d = qf(b);
< var k = 2 === b.tag && null != b.type.contextTypes;
< f = k ? sf(b, d) : ha;
< g = new h(g, f);
< b.memoizedState =
< null !== g.state && void 0 !== g.state ? g.state : null;
< g.updater = qg;
< b.stateNode = g;
< g._reactInternalFiber = b;
< k &&
< ((k = b.stateNode),
< (k.__reactInternalMemoizedUnmaskedChildContext = d),
< (k.__reactInternalMemoizedMaskedChildContext = f));
< tg(b, c);
< d = !0;
< } else {
< h = b.type;
< d = b.stateNode;
< k = b.memoizedProps;
< f = b.pendingProps;
< d.props = k;
< var n = d.context;
< g = qf(b);
< g = sf(b, g);
< var r = h.getDerivedStateFromProps;
< (h =
< "function" === typeof r ||
< "function" === typeof d.getSnapshotBeforeUpdate) ||
< ("function" !== typeof d.UNSAFE_componentWillReceiveProps &&
< "function" !== typeof d.componentWillReceiveProps) ||
< ((k !== f || n !== g) && sg(b, d, f, g));
< Mf = !1;
< var w = b.memoizedState;
< n = d.state = w;
< var P = b.updateQueue;
< null !== P && (Vf(b, P, f, d, c), (n = b.memoizedState));
< k !== f || w !== n || O.current || Mf
< ? ("function" === typeof r && (mg(b, r, f), (n = b.memoizedState)),
< (k = Mf || rg(b, k, f, w, n, g))
< ? (h ||
< ("function" !== typeof d.UNSAFE_componentWillMount &&
< "function" !== typeof d.componentWillMount) ||
< ("function" === typeof d.componentWillMount &&
< d.componentWillMount(),
< "function" === typeof d.UNSAFE_componentWillMount &&
< d.UNSAFE_componentWillMount()),
< "function" === typeof d.componentDidMount &&
< (b.effectTag |= 4))
< : ("function" === typeof d.componentDidMount &&
< (b.effectTag |= 4),
< (b.memoizedProps = f),
< (b.memoizedState = n)),
< (d.props = f),
< (d.state = n),
< (d.context = g),
< (d = k))
< : ("function" === typeof d.componentDidMount && (b.effectTag |= 4),
< (d = !1));
< }
< else
< (h = b.type),
< (d = b.stateNode),
< (f = b.memoizedProps),
< (k = b.pendingProps),
< (d.props = f),
< (n = d.context),
< (g = qf(b)),
< (g = sf(b, g)),
< (r = h.getDerivedStateFromProps),
< (h =
< "function" === typeof r ||
< "function" === typeof d.getSnapshotBeforeUpdate) ||
< ("function" !== typeof d.UNSAFE_componentWillReceiveProps &&
< "function" !== typeof d.componentWillReceiveProps) ||
< ((f !== k || n !== g) && sg(b, d, k, g)),
< (Mf = !1),
< (n = b.memoizedState),
< (w = d.state = n),
< (P = b.updateQueue),
< null !== P && (Vf(b, P, k, d, c), (w = b.memoizedState)),
< f !== k || n !== w || O.current || Mf
< ? ("function" === typeof r && (mg(b, r, k), (w = b.memoizedState)),
< (r = Mf || rg(b, f, k, n, w, g))
< ? (h ||
< ("function" !== typeof d.UNSAFE_componentWillUpdate &&
< "function" !== typeof d.componentWillUpdate) ||
< ("function" === typeof d.componentWillUpdate &&
< d.componentWillUpdate(k, w, g),
< "function" === typeof d.UNSAFE_componentWillUpdate &&
< d.UNSAFE_componentWillUpdate(k, w, g)),
< "function" === typeof d.componentDidUpdate &&
< (b.effectTag |= 4),
< "function" === typeof d.getSnapshotBeforeUpdate &&
< (b.effectTag |= 256))
< : ("function" !== typeof d.componentDidUpdate ||
< (f === a.memoizedProps && n === a.memoizedState) ||
< (b.effectTag |= 4),
< "function" !== typeof d.getSnapshotBeforeUpdate ||
< (f === a.memoizedProps && n === a.memoizedState) ||
< (b.effectTag |= 256),
< (b.memoizedProps = k),
< (b.memoizedState = w)),
< (d.props = k),
< (d.state = w),
< (d.context = g),
< (d = r))
< : ("function" !== typeof d.componentDidUpdate ||
< (f === a.memoizedProps && n === a.memoizedState) ||
< (b.effectTag |= 4),
< "function" !== typeof d.getSnapshotBeforeUpdate ||
< (f === a.memoizedProps && n === a.memoizedState) ||
< (b.effectTag |= 256),
< (d = !1));
< return Lg(a, b, d, e, c);
< case 3:
< Mg(b);
< e = b.updateQueue;
< if (null !== e)
< if (
< ((d = b.memoizedState),
< (d = null !== d ? d.element : null),
< Vf(b, e, b.pendingProps, null, c),
< (e = b.memoizedState.element),
< e === d)
< )
< Ig(), (a = R(a, b));
< else {
< d = b.stateNode;
< if ((d = (null === a || null === a.child) && d.hydrate))
< (Bg = kf(b.stateNode.containerInfo)), (Ag = b), (d = Cg = !0);
< d
< ? ((b.effectTag |= 2), (b.child = zg(b, null, e, c)))
< : (Ig(), Q(a, b, e));
< a = b.child;
< }
< else Ig(), (a = R(a, b));
< return a;
< case 5:
< a: {
< hg(gg.current);
< e = hg(eg.current);
< d = Ie(e, b.type);
< e !== d && (N(fg, b, b), N(eg, d, b));
< null === a && Fg(b);
< e = b.type;
< k = b.memoizedProps;
< d = b.pendingProps;
< f = null !== a ? a.memoizedProps : null;
< if (!O.current && k === d) {
< if ((k = b.mode & 1 && !!d.hidden)) b.expirationTime = 1073741823;
< if (!k || 1073741823 !== c) {
< a = R(a, b);
< break a;
< }
< }
< k = d.children;
< ef(e, d) ? (k = null) : f && ef(e, f) && (b.effectTag |= 16);
< Kg(a, b);
< 1073741823 !== c && b.mode & 1 && d.hidden
< ? ((b.expirationTime = 1073741823), (b.memoizedProps = d), (a = null))
< : (Q(a, b, k), (b.memoizedProps = d), (a = b.child));
< }
< return a;
< case 6:
< return null === a && Fg(b), (b.memoizedProps = b.pendingProps), null;
< case 16:
< return null;
< case 4:
< return (
< jg(b, b.stateNode.containerInfo),
< (e = b.pendingProps),
< O.current || b.memoizedProps !== e
< ? (null === a ? (b.child = yg(b, null, e, c)) : Q(a, b, e),
< (b.memoizedProps = e),
< (a = b.child))
< : (a = R(a, b)),
< a
< );
< case 14:
< return (
< (e = b.type.render),
< (c = b.pendingProps),
< (d = b.ref),
< O.current || b.memoizedProps !== c || d !== (null !== a ? a.ref : null)
< ? ((e = e(c, d)), Q(a, b, e), (b.memoizedProps = c), (a = b.child))
< : (a = R(a, b)),
< a
< );
< case 10:
< return (
< (c = b.pendingProps),
< O.current || b.memoizedProps !== c
< ? (Q(a, b, c), (b.memoizedProps = c), (a = b.child))
< : (a = R(a, b)),
< a
< );
< case 11:
< return (
< (c = b.pendingProps.children),
< O.current || (null !== c && b.memoizedProps !== c)
< ? (Q(a, b, c), (b.memoizedProps = c), (a = b.child))
< : (a = R(a, b)),
< a
< );
< case 15:
< return (
< (c = b.pendingProps),
< b.memoizedProps === c
< ? (a = R(a, b))
< : (Q(a, b, c.children), (b.memoizedProps = c), (a = b.child)),
< a
< );
< case 13:
< return Rg(a, b, c);
< case 12:
< a: if (
< ((d = b.type),
< (f = b.pendingProps),
< (k = b.memoizedProps),
< (e = d._currentValue),
< (g = d._changedBits),
< O.current || 0 !== g || k !== f)
< ) {
< b.memoizedProps = f;
< h = f.unstable_observedBits;
< if (void 0 === h || null === h) h = 1073741823;
< b.stateNode = h;
< if (0 !== (g & h)) Ng(b, d, g, c);
< else if (k === f) {
< a = R(a, b);
< break a;
< }
< c = f.children;
< c = c(e);
< b.effectTag |= 1;
< Q(a, b, c);
< a = b.child;
< } else a = R(a, b);
< return a;
< default:
< A("156");
< }
< }
< function Tg(a) {
< a.effectTag |= 4;
< }
< var Ug = void 0,
< Vg = void 0,
< Wg = void 0;
< Ug = function() {};
< Vg = function(a, b, c) {
< (b.updateQueue = c) && Tg(b);
< };
< Wg = function(a, b, c, d) {
< c !== d && Tg(b);
< };
< function Xg(a, b) {
< var c = b.pendingProps;
< switch (b.tag) {
< case 1:
< return null;
< case 2:
< return tf(b), null;
< case 3:
< kg(b);
< uf(b);
< var d = b.stateNode;
< d.pendingContext &&
< ((d.context = d.pendingContext), (d.pendingContext = null));
< if (null === a || null === a.child) Hg(b), (b.effectTag &= -3);
< Ug(b);
< return null;
< case 5:
< lg(b);
< d = hg(gg.current);
< var e = b.type;
< if (null !== a && null != b.stateNode) {
< var f = a.memoizedProps,
< g = b.stateNode,
< h = hg(eg.current);
< g = Xe(g, e, f, c, d);
< Vg(a, b, g, e, f, c, d, h);
< a.ref !== b.ref && (b.effectTag |= 128);
< } else {
< if (!c) return null === b.stateNode ? A("166") : void 0, null;
< a = hg(eg.current);
< if (Hg(b))
< (c = b.stateNode),
< (e = b.type),
< (f = b.memoizedProps),
< (c[C] = b),
< (c[Ma] = f),
< (d = Ze(c, e, f, a, d)),
< (b.updateQueue = d),
< null !== d && Tg(b);
< else {
< a = Ue(e, c, d, a);
< a[C] = b;
< a[Ma] = c;
< a: for (f = b.child; null !== f; ) {
< if (5 === f.tag || 6 === f.tag) a.appendChild(f.stateNode);
< else if (4 !== f.tag && null !== f.child) {
< f.child.return = f;
< f = f.child;
< continue;
< }
< if (f === b) break;
< for (; null === f.sibling; ) {
< if (null === f.return || f.return === b) break a;
< f = f.return;
< }
< f.sibling.return = f.return;
< f = f.sibling;
< }
< We(a, e, c, d);
< df(e, c) && Tg(b);
< b.stateNode = a;
< }
< null !== b.ref && (b.effectTag |= 128);
< }
< return null;
< case 6:
< if (a && null != b.stateNode) Wg(a, b, a.memoizedProps, c);
< else {
< if ("string" !== typeof c)
< return null === b.stateNode ? A("166") : void 0, null;
< d = hg(gg.current);
< hg(eg.current);
< Hg(b)
< ? ((d = b.stateNode),
< (c = b.memoizedProps),
< (d[C] = b),
< $e(d, c) && Tg(b))
< : ((d = Ve(c, d)), (d[C] = b), (b.stateNode = d));
< }
< return null;
< case 14:
< return null;
< case 16:
< return null;
< case 10:
< return null;
< case 11:
< return null;
< case 15:
< return null;
< case 4:
< return kg(b), Ug(b), null;
< case 13:
< return cg(b), null;
< case 12:
< return null;
< case 0:
< A("167");
< default:
< A("156");
< }
< }
< function Yg(a, b) {
< var c = b.source;
< null === b.stack && null !== c && vc(c);
< null !== c && uc(c);
< b = b.value;
< null !== a && 2 === a.tag && uc(a);
< try {
< (b && b.suppressReactErrorLogging) || console.error(b);
< } catch (d) {
< (d && d.suppressReactErrorLogging) || console.error(d);
< }
< }
< function Zg(a) {
< var b = a.ref;
< if (null !== b)
< if ("function" === typeof b)
< try {
< b(null);
< } catch (c) {
< $g(a, c);
< }
< else b.current = null;
< }
< function ah(a) {
< "function" === typeof Lf && Lf(a);
< switch (a.tag) {
< case 2:
< Zg(a);
< var b = a.stateNode;
< if ("function" === typeof b.componentWillUnmount)
< try {
< (b.props = a.memoizedProps),
< (b.state = a.memoizedState),
< b.componentWillUnmount();
< } catch (c) {
< $g(a, c);
< }
< break;
< case 5:
< Zg(a);
< break;
< case 4:
< bh(a);
< }
< }
< function ch(a) {
< return 5 === a.tag || 3 === a.tag || 4 === a.tag;
< }
< function dh(a) {
< a: {
< for (var b = a.return; null !== b; ) {
< if (ch(b)) {
< var c = b;
< break a;
< }
< b = b.return;
< }
< A("160");
< c = void 0;
< }
< var d = (b = void 0);
< switch (c.tag) {
< case 5:
< b = c.stateNode;
< d = !1;
< break;
< case 3:
< b = c.stateNode.containerInfo;
< d = !0;
< break;
< case 4:
< b = c.stateNode.containerInfo;
< d = !0;
< break;
< default:
< A("161");
< }
< c.effectTag & 16 && (Le(b, ""), (c.effectTag &= -17));
< a: b: for (c = a; ; ) {
< for (; null === c.sibling; ) {
< if (null === c.return || ch(c.return)) {
< c = null;
< break a;
< }
< c = c.return;
< }
< c.sibling.return = c.return;
< for (c = c.sibling; 5 !== c.tag && 6 !== c.tag; ) {
< if (c.effectTag & 2) continue b;
< if (null === c.child || 4 === c.tag) continue b;
< else (c.child.return = c), (c = c.child);
< }
< if (!(c.effectTag & 2)) {
< c = c.stateNode;
< break a;
< }
< }
< for (var e = a; ; ) {
< if (5 === e.tag || 6 === e.tag)
< if (c)
< if (d) {
< var f = b,
< g = e.stateNode,
< h = c;
< 8 === f.nodeType
< ? f.parentNode.insertBefore(g, h)
< : f.insertBefore(g, h);
< } else b.insertBefore(e.stateNode, c);
< else
< d
< ? ((f = b),
< (g = e.stateNode),
< 8 === f.nodeType
< ? f.parentNode.insertBefore(g, f)
< : f.appendChild(g))
< : b.appendChild(e.stateNode);
< else if (4 !== e.tag && null !== e.child) {
< e.child.return = e;
< e = e.child;
< continue;
< }
< if (e === a) break;
< for (; null === e.sibling; ) {
< if (null === e.return || e.return === a) return;
< e = e.return;
< }
< e.sibling.return = e.return;
< e = e.sibling;
< }
< }
< function bh(a) {
< for (var b = a, c = !1, d = void 0, e = void 0; ; ) {
< if (!c) {
< c = b.return;
< a: for (;;) {
< null === c ? A("160") : void 0;
< switch (c.tag) {
< case 5:
< d = c.stateNode;
< e = !1;
< break a;
< case 3:
< d = c.stateNode.containerInfo;
< e = !0;
< break a;
< case 4:
< d = c.stateNode.containerInfo;
< e = !0;
< break a;
< }
< c = c.return;
< }
< c = !0;
< }
< if (5 === b.tag || 6 === b.tag) {
< a: for (var f = b, g = f; ; )
< if ((ah(g), null !== g.child && 4 !== g.tag))
< (g.child.return = g), (g = g.child);
< else {
< if (g === f) break;
< for (; null === g.sibling; ) {
< if (null === g.return || g.return === f) break a;
< g = g.return;
< }
< g.sibling.return = g.return;
< g = g.sibling;
< }
< e
< ? ((f = d),
< (g = b.stateNode),
< 8 === f.nodeType ? f.parentNode.removeChild(g) : f.removeChild(g))
< : d.removeChild(b.stateNode);
< } else if (
< (4 === b.tag ? (d = b.stateNode.containerInfo) : ah(b), null !== b.child)
< ) {
< b.child.return = b;
< b = b.child;
< continue;
< }
< if (b === a) break;
< for (; null === b.sibling; ) {
< if (null === b.return || b.return === a) return;
< b = b.return;
< 4 === b.tag && (c = !1);
< }
< b.sibling.return = b.return;
< b = b.sibling;
< }
< }
< function eh(a, b) {
< switch (b.tag) {
< case 2:
< break;
< case 5:
< var c = b.stateNode;
< if (null != c) {
< var d = b.memoizedProps;
< a = null !== a ? a.memoizedProps : d;
< var e = b.type,
< f = b.updateQueue;
< b.updateQueue = null;
< null !== f && ((c[Ma] = d), Ye(c, f, e, a, d));
< }
< break;
< case 6:
< null === b.stateNode ? A("162") : void 0;
< b.stateNode.nodeValue = b.memoizedProps;
< break;
< case 3:
< break;
< case 15:
< break;
< case 16:
< break;
< default:
< A("163");
< }
< }
< function fh(a, b, c) {
< c = Pf(c);
< c.tag = 3;
< c.payload = { element: null };
< var d = b.value;
< c.callback = function() {
< gh(d);
< Yg(a, b);
< };
< return c;
< }
< function hh(a, b, c) {
< c = Pf(c);
< c.tag = 3;
< var d = a.stateNode;
< null !== d &&
< "function" === typeof d.componentDidCatch &&
< (c.callback = function() {
< null === ih ? (ih = new Set([this])) : ih.add(this);
< var c = b.value,
< d = b.stack;
< Yg(a, b);
< this.componentDidCatch(c, { componentStack: null !== d ? d : "" });
< });
< return c;
< }
< function jh(a, b, c, d, e, f) {
< c.effectTag |= 512;
< c.firstEffect = c.lastEffect = null;
< d = Yf(d, c);
< a = b;
< do {
< switch (a.tag) {
< case 3:
< a.effectTag |= 1024;
< d = fh(a, d, f);
< Sf(a, d, f);
< return;
< case 2:
< if (
< ((b = d),
< (c = a.stateNode),
< 0 === (a.effectTag & 64) &&
< null !== c &&
< "function" === typeof c.componentDidCatch &&
< (null === ih || !ih.has(c)))
< ) {
< a.effectTag |= 1024;
< d = hh(a, b, f);
< Sf(a, d, f);
< return;
< }
< }
< a = a.return;
< } while (null !== a);
< }
< function kh(a) {
< switch (a.tag) {
< case 2:
< tf(a);
< var b = a.effectTag;
< return b & 1024 ? ((a.effectTag = (b & -1025) | 64), a) : null;
< case 3:
< return (
< kg(a),
< uf(a),
< (b = a.effectTag),
< b & 1024 ? ((a.effectTag = (b & -1025) | 64), a) : null
< );
< case 5:
< return lg(a), null;
< case 16:
< return (
< (b = a.effectTag),
< b & 1024 ? ((a.effectTag = (b & -1025) | 64), a) : null
< );
< case 4:
< return kg(a), null;
< case 13:
< return cg(a), null;
< default:
< return null;
< }
< }
< var lh = ff(),
< mh = 2,
< nh = lh,
< oh = 0,
< ph = 0,
< qh = !1,
< S = null,
< rh = null,
< T = 0,
< sh = -1,
< th = !1,
< U = null,
< uh = !1,
< vh = !1,
< ih = null;
< function wh() {
< if (null !== S)
< for (var a = S.return; null !== a; ) {
< var b = a;
< switch (b.tag) {
< case 2:
< tf(b);
< break;
< case 3:
< kg(b);
< uf(b);
< break;
< case 5:
< lg(b);
< break;
< case 4:
< kg(b);
< break;
< case 13:
< cg(b);
< }
< a = a.return;
< }
< rh = null;
< T = 0;
< sh = -1;
< th = !1;
< S = null;
< vh = !1;
< }
< function xh(a) {
< for (;;) {
< var b = a.alternate,
< c = a.return,
< d = a.sibling;
< if (0 === (a.effectTag & 512)) {
< b = Xg(b, a, T);
< var e = a;
< if (1073741823 === T || 1073741823 !== e.expirationTime) {
< var f = 0;
< switch (e.tag) {
< case 3:
< case 2:
< var g = e.updateQueue;
< null !== g && (f = g.expirationTime);
< }
< for (g = e.child; null !== g; )
< 0 !== g.expirationTime &&
< (0 === f || f > g.expirationTime) &&
< (f = g.expirationTime),
< (g = g.sibling);
< e.expirationTime = f;
< }
< if (null !== b) return b;
< null !== c &&
< 0 === (c.effectTag & 512) &&
< (null === c.firstEffect && (c.firstEffect = a.firstEffect),
< null !== a.lastEffect &&
< (null !== c.lastEffect && (c.lastEffect.nextEffect = a.firstEffect),
< (c.lastEffect = a.lastEffect)),
< 1 < a.effectTag &&
< (null !== c.lastEffect
< ? (c.lastEffect.nextEffect = a)
< : (c.firstEffect = a),
< (c.lastEffect = a)));
< if (null !== d) return d;
< if (null !== c) a = c;
< else {
< vh = !0;
< break;
< }
< } else {
< a = kh(a, th, T);
< if (null !== a) return (a.effectTag &= 511), a;
< null !== c &&
< ((c.firstEffect = c.lastEffect = null), (c.effectTag |= 512));
< if (null !== d) return d;
< if (null !== c) a = c;
< else break;
< }
< }
< return null;
< }
< function yh(a) {
< var b = Sg(a.alternate, a, T);
< null === b && (b = xh(a));
< ec.current = null;
< return b;
< }
< function zh(a, b, c) {
< qh ? A("243") : void 0;
< qh = !0;
< if (b !== T || a !== rh || null === S)
< wh(),
< (rh = a),
< (T = b),
< (sh = -1),
< (S = Af(rh.current, null, T)),
< (a.pendingCommitExpirationTime = 0);
< var d = !1;
< th = !c || T <= mh;
< do {
< try {
< if (c) for (; null !== S && !Ah(); ) S = yh(S);
< else for (; null !== S; ) S = yh(S);
< } catch (f) {
< if (null === S) (d = !0), gh(f);
< else {
< null === S ? A("271") : void 0;
< c = S;
< var e = c.return;
< if (null === e) {
< d = !0;
< gh(f);
< break;
< }
< jh(a, e, c, f, th, T, nh);
< S = xh(c);
< }
< }
< break;
< } while (1);
< qh = !1;
< if (d) return null;
< if (null === S) {
< if (vh) return (a.pendingCommitExpirationTime = b), a.current.alternate;
< th ? A("262") : void 0;
< 0 <= sh &&
< setTimeout(function() {
< var b = a.current.expirationTime;
< 0 !== b &&
< (0 === a.remainingExpirationTime || a.remainingExpirationTime < b) &&
< Bh(a, b);
< }, sh);
< Ch(a.current.expirationTime);
< }
< return null;
< }
< function $g(a, b) {
< var c;
< a: {
< qh && !uh ? A("263") : void 0;
< for (c = a.return; null !== c; ) {
< switch (c.tag) {
< case 2:
< var d = c.stateNode;
< if (
< "function" === typeof c.type.getDerivedStateFromCatch ||
< ("function" === typeof d.componentDidCatch &&
< (null === ih || !ih.has(d)))
< ) {
< a = Yf(b, a);
< a = hh(c, a, 1);
< Rf(c, a, 1);
< pg(c, 1);
< c = void 0;
< break a;
< }
< break;
< case 3:
< a = Yf(b, a);
< a = fh(c, a, 1);
< Rf(c, a, 1);
< pg(c, 1);
< c = void 0;
< break a;
< }
< c = c.return;
< }
< 3 === a.tag && ((c = Yf(b, a)), (c = fh(a, c, 1)), Rf(a, c, 1), pg(a, 1));
< c = void 0;
< }
< return c;
< }
< function Dh() {
< var a = 2 + 25 * ((((ng() - 2 + 500) / 25) | 0) + 1);
< a <= oh && (a = oh + 1);
< return (oh = a);
< }
< function og(a, b) {
< a =
< 0 !== ph
< ? ph
< : qh
< ? uh
< ? 1
< : T
< : b.mode & 1
< ? Eh
< ? 2 + 10 * ((((a - 2 + 15) / 10) | 0) + 1)
< : 2 + 25 * ((((a - 2 + 500) / 25) | 0) + 1)
< : 1;
< Eh && (0 === Fh || a > Fh) && (Fh = a);
< return a;
< }
< function pg(a, b) {
< for (; null !== a; ) {
< if (0 === a.expirationTime || a.expirationTime > b) a.expirationTime = b;
< null !== a.alternate &&
< (0 === a.alternate.expirationTime || a.alternate.expirationTime > b) &&
< (a.alternate.expirationTime = b);
< if (null === a.return)
< if (3 === a.tag) {
< var c = a.stateNode;
< !qh && 0 !== T && b < T && wh();
< var d = c.current.expirationTime;
< (qh && !uh && rh === c) || Bh(c, d);
< Gh > Hh && A("185");
< } else break;
< a = a.return;
< }
< }
< function ng() {
< nh = ff() - lh;
< return (mh = ((nh / 10) | 0) + 2);
< }
< function Ih(a) {
< var b = ph;
< ph = 2 + 25 * ((((ng() - 2 + 500) / 25) | 0) + 1);
< try {
< return a();
< } finally {
< ph = b;
< }
< }
< function Jh(a, b, c, d, e) {
< var f = ph;
< ph = 1;
< try {
< return a(b, c, d, e);
< } finally {
< ph = f;
< }
< }
< var Kh = null,
< V = null,
< Lh = 0,
< Mh = void 0,
< W = !1,
< X = null,
< Y = 0,
< Fh = 0,
< Nh = !1,
< Oh = !1,
< Ph = null,
< Qh = null,
< Z = !1,
< Rh = !1,
< Eh = !1,
< Sh = null,
< Hh = 1e3,
< Gh = 0,
< Th = 1;
< function Uh(a) {
< if (0 !== Lh) {
< if (a > Lh) return;
< null !== Mh && hf(Mh);
< }
< var b = ff() - lh;
< Lh = a;
< Mh = gf(Vh, { timeout: 10 * (a - 2) - b });
< }
< function Bh(a, b) {
< if (null === a.nextScheduledRoot)
< (a.remainingExpirationTime = b),
< null === V
< ? ((Kh = V = a), (a.nextScheduledRoot = a))
< : ((V = V.nextScheduledRoot = a), (V.nextScheduledRoot = Kh));
< else {
< var c = a.remainingExpirationTime;
< if (0 === c || b < c) a.remainingExpirationTime = b;
< }
< W || (Z ? Rh && ((X = a), (Y = 1), Wh(a, 1, !1)) : 1 === b ? Xh() : Uh(b));
< }
< function Yh() {
< var a = 0,
< b = null;
< if (null !== V)
< for (var c = V, d = Kh; null !== d; ) {
< var e = d.remainingExpirationTime;
< if (0 === e) {
< null === c || null === V ? A("244") : void 0;
< if (d === d.nextScheduledRoot) {
< Kh = V = d.nextScheduledRoot = null;
< break;
< } else if (d === Kh)
< (Kh = e = d.nextScheduledRoot),
< (V.nextScheduledRoot = e),
< (d.nextScheduledRoot = null);
< else if (d === V) {
< V = c;
< V.nextScheduledRoot = Kh;
< d.nextScheduledRoot = null;
< break;
< } else
< (c.nextScheduledRoot = d.nextScheduledRoot),
< (d.nextScheduledRoot = null);
< d = c.nextScheduledRoot;
< } else {
< if (0 === a || e < a) (a = e), (b = d);
< if (d === V) break;
< c = d;
< d = d.nextScheduledRoot;
< }
< }
< c = X;
< null !== c && c === b && 1 === a ? Gh++ : (Gh = 0);
< X = b;
< Y = a;
< }
< function Vh(a) {
< Zh(0, !0, a);
< }
< function Xh() {
< Zh(1, !1, null);
< }
< function Zh(a, b, c) {
< Qh = c;
< Yh();
< if (b)
< for (; null !== X && 0 !== Y && (0 === a || a >= Y) && (!Nh || ng() >= Y); )
< ng(), Wh(X, Y, !Nh), Yh();
< else
< for (; null !== X && 0 !== Y && (0 === a || a >= Y); ) Wh(X, Y, !1), Yh();
< null !== Qh && ((Lh = 0), (Mh = null));
< 0 !== Y && Uh(Y);
< Qh = null;
< Nh = !1;
< $h();
< }
< function ai(a, b) {
< W ? A("253") : void 0;
< X = a;
< Y = b;
< Wh(a, b, !1);
< Xh();
< $h();
< }
< function $h() {
< Gh = 0;
< if (null !== Sh) {
< var a = Sh;
< Sh = null;
< for (var b = 0; b < a.length; b++) {
< var c = a[b];
< try {
< c._onComplete();
< } catch (d) {
< Oh || ((Oh = !0), (Ph = d));
< }
< }
< }
< if (Oh) throw ((a = Ph), (Ph = null), (Oh = !1), a);
< }
< function Wh(a, b, c) {
< W ? A("245") : void 0;
< W = !0;
< c
< ? ((c = a.finishedWork),
< null !== c
< ? bi(a, c, b)
< : ((c = zh(a, b, !0)),
< null !== c && (Ah() ? (a.finishedWork = c) : bi(a, c, b))))
< : ((c = a.finishedWork),
< null !== c
< ? bi(a, c, b)
< : ((c = zh(a, b, !1)), null !== c && bi(a, c, b)));
< W = !1;
< }
< function bi(a, b, c) {
< var d = a.firstBatch;
< if (
< null !== d &&
< d._expirationTime <= c &&
< (null === Sh ? (Sh = [d]) : Sh.push(d), d._defer)
< ) {
< a.finishedWork = b;
< a.remainingExpirationTime = 0;
< return;
< }
< a.finishedWork = null;
< uh = qh = !0;
< c = b.stateNode;
< c.current === b ? A("177") : void 0;
< d = c.pendingCommitExpirationTime;
< 0 === d ? A("261") : void 0;
< c.pendingCommitExpirationTime = 0;
< ng();
< ec.current = null;
< if (1 < b.effectTag)
< if (null !== b.lastEffect) {
< b.lastEffect.nextEffect = b;
< var e = b.firstEffect;
< } else e = b;
< else e = b.firstEffect;
< bf = Id;
< var f = da();
< if (Vd(f)) {
< if ("selectionStart" in f)
< var g = { start: f.selectionStart, end: f.selectionEnd };
< else
< a: {
< var h = window.getSelection && window.getSelection();
< if (h && 0 !== h.rangeCount) {
< g = h.anchorNode;
< var k = h.anchorOffset,
< n = h.focusNode;
< h = h.focusOffset;
< try {
< g.nodeType, n.nodeType;
< } catch (Wa) {
< g = null;
< break a;
< }
< var r = 0,
< w = -1,
< P = -1,
< nc = 0,
< Jd = 0,
< E = f,
< t = null;
< b: for (;;) {
< for (var x; ; ) {
< E !== g || (0 !== k && 3 !== E.nodeType) || (w = r + k);
< E !== n || (0 !== h && 3 !== E.nodeType) || (P = r + h);
< 3 === E.nodeType && (r += E.nodeValue.length);
< if (null === (x = E.firstChild)) break;
< t = E;
< E = x;
< }
< for (;;) {
< if (E === f) break b;
< t === g && ++nc === k && (w = r);
< t === n && ++Jd === h && (P = r);
< if (null !== (x = E.nextSibling)) break;
< E = t;
< t = E.parentNode;
< }
< E = x;
< }
< g = -1 === w || -1 === P ? null : { start: w, end: P };
< } else g = null;
< }
< g = g || { start: 0, end: 0 };
< } else g = null;
< cf = { focusedElem: f, selectionRange: g };
< Kd(!1);
< for (U = e; null !== U; ) {
< f = !1;
< g = void 0;
< try {
< for (; null !== U; ) {
< if (U.effectTag & 256) {
< var u = U.alternate;
< k = U;
< switch (k.tag) {
< case 2:
< if (k.effectTag & 256 && null !== u) {
< var y = u.memoizedProps,
< D = u.memoizedState,
< ja = k.stateNode;
< ja.props = k.memoizedProps;
< ja.state = k.memoizedState;
< var ni = ja.getSnapshotBeforeUpdate(y, D);
< ja.__reactInternalSnapshotBeforeUpdate = ni;
< }
< break;
< case 3:
< case 5:
< case 6:
< case 4:
< break;
< default:
< A("163");
< }
< }
< U = U.nextEffect;
< }
< } catch (Wa) {
< (f = !0), (g = Wa);
< }
< f &&
< (null === U ? A("178") : void 0,
< $g(U, g),
< null !== U && (U = U.nextEffect));
< }
< for (U = e; null !== U; ) {
< u = !1;
< y = void 0;
< try {
< for (; null !== U; ) {
< var q = U.effectTag;
< q & 16 && Le(U.stateNode, "");
< if (q & 128) {
< var z = U.alternate;
< if (null !== z) {
< var l = z.ref;
< null !== l &&
< ("function" === typeof l ? l(null) : (l.current = null));
< }
< }
< switch (q & 14) {
< case 2:
< dh(U);
< U.effectTag &= -3;
< break;
< case 6:
< dh(U);
< U.effectTag &= -3;
< eh(U.alternate, U);
< break;
< case 4:
< eh(U.alternate, U);
< break;
< case 8:
< (D = U),
< bh(D),
< (D.return = null),
< (D.child = null),
< D.alternate &&
< ((D.alternate.child = null), (D.alternate.return = null));
< }
< U = U.nextEffect;
< }
< } catch (Wa) {
< (u = !0), (y = Wa);
< }
< u &&
< (null === U ? A("178") : void 0,
< $g(U, y),
< null !== U && (U = U.nextEffect));
< }
< l = cf;
< z = da();
< q = l.focusedElem;
< u = l.selectionRange;
< if (z !== q && fa(document.documentElement, q)) {
< null !== u &&
< Vd(q) &&
< ((z = u.start),
< (l = u.end),
< void 0 === l && (l = z),
< "selectionStart" in q
< ? ((q.selectionStart = z),
< (q.selectionEnd = Math.min(l, q.value.length)))
< : window.getSelection &&
< ((z = window.getSelection()),
< (y = q[lb()].length),
< (l = Math.min(u.start, y)),
< (u = void 0 === u.end ? l : Math.min(u.end, y)),
< !z.extend && l > u && ((y = u), (u = l), (l = y)),
< (y = Ud(q, l)),
< (D = Ud(q, u)),
< y &&
< D &&
< (1 !== z.rangeCount ||
< z.anchorNode !== y.node ||
< z.anchorOffset !== y.offset ||
< z.focusNode !== D.node ||
< z.focusOffset !== D.offset) &&
< ((ja = document.createRange()),
< ja.setStart(y.node, y.offset),
< z.removeAllRanges(),
< l > u
< ? (z.addRange(ja), z.extend(D.node, D.offset))
< : (ja.setEnd(D.node, D.offset), z.addRange(ja)))));
< z = [];
< for (l = q; (l = l.parentNode); )
< 1 === l.nodeType &&
< z.push({
< element: l,
< left: l.scrollLeft,
< top: l.scrollTop
< });
< "function" === typeof q.focus && q.focus();
< for (q = 0; q < z.length; q++)
< (l = z[q]),
< (l.element.scrollLeft = l.left),
< (l.element.scrollTop = l.top);
< }
< cf = null;
< Kd(bf);
< bf = null;
< c.current = b;
< for (U = e; null !== U; ) {
< e = !1;
< q = void 0;
< try {
< for (z = d; null !== U; ) {
< var ig = U.effectTag;
< if (ig & 36) {
< var oc = U.alternate;
< l = U;
< u = z;
< switch (l.tag) {
< case 2:
< var ca = l.stateNode;
< if (l.effectTag & 4)
< if (null === oc)
< (ca.props = l.memoizedProps),
< (ca.state = l.memoizedState),
< ca.componentDidMount();
< else {
< var xi = oc.memoizedProps,
< yi = oc.memoizedState;
< ca.props = l.memoizedProps;
< ca.state = l.memoizedState;
< ca.componentDidUpdate(
< xi,
< yi,
< ca.__reactInternalSnapshotBeforeUpdate
< );
< }
< var Og = l.updateQueue;
< null !== Og &&
< ((ca.props = l.memoizedProps),
< (ca.state = l.memoizedState),
< Xf(l, Og, ca, u));
< break;
< case 3:
< var Pg = l.updateQueue;
< if (null !== Pg) {
< y = null;
< if (null !== l.child)
< switch (l.child.tag) {
< case 5:
< y = l.child.stateNode;
< break;
< case 2:
< y = l.child.stateNode;
< }
< Xf(l, Pg, y, u);
< }
< break;
< case 5:
< var zi = l.stateNode;
< null === oc &&
< l.effectTag & 4 &&
< df(l.type, l.memoizedProps) &&
< zi.focus();
< break;
< case 6:
< break;
< case 4:
< break;
< case 15:
< break;
< case 16:
< break;
< default:
< A("163");
< }
< }
< if (ig & 128) {
< l = void 0;
< var yc = U.ref;
< if (null !== yc) {
< var Qg = U.stateNode;
< switch (U.tag) {
< case 5:
< l = Qg;
< break;
< default:
< l = Qg;
< }
< "function" === typeof yc ? yc(l) : (yc.current = l);
< }
< }
< var Ai = U.nextEffect;
< U.nextEffect = null;
< U = Ai;
< }
< } catch (Wa) {
< (e = !0), (q = Wa);
< }
< e &&
< (null === U ? A("178") : void 0,
< $g(U, q),
< null !== U && (U = U.nextEffect));
< }
< qh = uh = !1;
< "function" === typeof Kf && Kf(b.stateNode);
< b = c.current.expirationTime;
< 0 === b && (ih = null);
< a.remainingExpirationTime = b;
< }
< function Ah() {
< return null === Qh || Qh.timeRemaining() > Th ? !1 : (Nh = !0);
< }
< function gh(a) {
< null === X ? A("246") : void 0;
< X.remainingExpirationTime = 0;
< Oh || ((Oh = !0), (Ph = a));
< }
< function Ch(a) {
< null === X ? A("246") : void 0;
< X.remainingExpirationTime = a;
< }
< function ci(a, b) {
< var c = Z;
< Z = !0;
< try {
< return a(b);
< } finally {
< (Z = c) || W || Xh();
< }
< }
< function di(a, b) {
< if (Z && !Rh) {
< Rh = !0;
< try {
< return a(b);
< } finally {
< Rh = !1;
< }
< }
< return a(b);
< }
< function ei(a, b) {
< W ? A("187") : void 0;
< var c = Z;
< Z = !0;
< try {
< return Jh(a, b);
< } finally {
< (Z = c), Xh();
< }
< }
< function fi(a, b, c) {
< if (Eh) return a(b, c);
< Z || W || 0 === Fh || (Zh(Fh, !1, null), (Fh = 0));
< var d = Eh,
< e = Z;
< Z = Eh = !0;
< try {
< return a(b, c);
< } finally {
< (Eh = d), (Z = e) || W || Xh();
< }
< }
< function gi(a) {
< var b = Z;
< Z = !0;
< try {
< Jh(a);
< } finally {
< (Z = b) || W || Zh(1, !1, null);
< }
< }
< function hi(a, b, c, d, e) {
< var f = b.current;
< if (c) {
< c = c._reactInternalFiber;
< var g;
< b: {
< 2 === kd(c) && 2 === c.tag ? void 0 : A("170");
< for (g = c; 3 !== g.tag; ) {
< if (rf(g)) {
< g = g.stateNode.__reactInternalMemoizedMergedChildContext;
< break b;
< }
< (g = g.return) ? void 0 : A("171");
< }
< g = g.stateNode.context;
< }
< c = rf(c) ? wf(c, g) : g;
< } else c = ha;
< null === b.context ? (b.context = c) : (b.pendingContext = c);
< b = e;
< e = Pf(d);
< e.payload = { element: a };
< b = void 0 === b ? null : b;
< null !== b && (e.callback = b);
< Rf(f, e, d);
< pg(f, d);
< return d;
< }
< function ii(a) {
< var b = a._reactInternalFiber;
< void 0 === b &&
< ("function" === typeof a.render ? A("188") : A("268", Object.keys(a)));
< a = nd(b);
< return null === a ? null : a.stateNode;
< }
< function ji(a, b, c, d) {
< var e = b.current,
< f = ng();
< e = og(f, e);
< return hi(a, b, c, e, d);
< }
< function ki(a) {
< a = a.current;
< if (!a.child) return null;
< switch (a.child.tag) {
< case 5:
< return a.child.stateNode;
< default:
< return a.child.stateNode;
< }
< }
< function li(a) {
< var b = a.findFiberByHostInstance;
< return Jf(
< p({}, a, {
< findHostInstanceByFiber: function(a) {
< a = nd(a);
< return null === a ? null : a.stateNode;
< },
< findFiberByHostInstance: function(a) {
< return b ? b(a) : null;
< }
< })
< );
< }
< var mi = {
< updateContainerAtExpirationTime: hi,
< createContainer: function(a, b, c) {
< return Ff(a, b, c);
< },
< updateContainer: ji,
< flushRoot: ai,
< requestWork: Bh,
< computeUniqueAsyncExpiration: Dh,
< batchedUpdates: ci,
< unbatchedUpdates: di,
< deferredUpdates: Ih,
< syncUpdates: Jh,
< interactiveUpdates: fi,
< flushInteractiveUpdates: function() {
< W || 0 === Fh || (Zh(Fh, !1, null), (Fh = 0));
< },
< flushControlled: gi,
< flushSync: ei,
< getPublicRootInstance: ki,
< findHostInstance: ii,
< findHostInstanceWithNoPortals: function(a) {
< a = od(a);
< return null === a ? null : a.stateNode;
< },
< injectIntoDevTools: li
< };
< function oi(a, b, c) {
< var d = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
< return {
< $$typeof: hc,
< key: null == d ? null : "" + d,
< children: a,
< containerInfo: b,
< implementation: c
< };
< }
< Kb.injectFiberControlledHostComponent(af);
< function pi(a) {
< this._expirationTime = Dh();
< this._root = a;
< this._callbacks = this._next = null;
< this._hasChildren = this._didComplete = !1;
< this._children = null;
< this._defer = !0;
< }
< pi.prototype.render = function(a) {
< this._defer ? void 0 : A("250");
< this._hasChildren = !0;
< this._children = a;
< var b = this._root._internalRoot,
< c = this._expirationTime,
< d = new qi();
< hi(a, b, null, c, d._onCommit);
< return d;
< };
< pi.prototype.then = function(a) {
< if (this._didComplete) a();
< else {
< var b = this._callbacks;
< null === b && (b = this._callbacks = []);
< b.push(a);
< }
< };
< pi.prototype.commit = function() {
< var a = this._root._internalRoot,
< b = a.firstBatch;
< this._defer && null !== b ? void 0 : A("251");
< if (this._hasChildren) {
< var c = this._expirationTime;
< if (b !== this) {
< this._hasChildren &&
< ((c = this._expirationTime = b._expirationTime),
< this.render(this._children));
< for (var d = null, e = b; e !== this; ) (d = e), (e = e._next);
< null === d ? A("251") : void 0;
< d._next = e._next;
< this._next = b;
< a.firstBatch = this;
< }
< this._defer = !1;
< ai(a, c);
< b = this._next;
< this._next = null;
< b = a.firstBatch = b;
< null !== b && b._hasChildren && b.render(b._children);
< } else (this._next = null), (this._defer = !1);
< };
< pi.prototype._onComplete = function() {
< if (!this._didComplete) {
< this._didComplete = !0;
< var a = this._callbacks;
< if (null !== a) for (var b = 0; b < a.length; b++) (0, a[b])();
< }
< };
< function qi() {
< this._callbacks = null;
< this._didCommit = !1;
< this._onCommit = this._onCommit.bind(this);
< }
< qi.prototype.then = function(a) {
< if (this._didCommit) a();
< else {
< var b = this._callbacks;
< null === b && (b = this._callbacks = []);
< b.push(a);
< }
< };
< qi.prototype._onCommit = function() {
< if (!this._didCommit) {
< this._didCommit = !0;
< var a = this._callbacks;
< if (null !== a)
< for (var b = 0; b < a.length; b++) {
< var c = a[b];
< "function" !== typeof c ? A("191", c) : void 0;
< c();
< }
< }
< };
< function ri(a, b, c) {
< this._internalRoot = Ff(a, b, c);
< }
< ri.prototype.render = function(a, b) {
< var c = this._internalRoot,
< d = new qi();
< b = void 0 === b ? null : b;
< null !== b && d.then(b);
< ji(a, c, null, d._onCommit);
< return d;
< };
< ri.prototype.unmount = function(a) {
< var b = this._internalRoot,
< c = new qi();
< a = void 0 === a ? null : a;
< null !== a && c.then(a);
< ji(null, b, null, c._onCommit);
< return c;
< };
< ri.prototype.legacy_renderSubtreeIntoContainer = function(a, b, c) {
< var d = this._internalRoot,
< e = new qi();
< c = void 0 === c ? null : c;
< null !== c && e.then(c);
< ji(b, d, a, e._onCommit);
< return e;
< };
< ri.prototype.createBatch = function() {
< var a = new pi(this),
< b = a._expirationTime,
< c = this._internalRoot,
< d = c.firstBatch;
< if (null === d) (c.firstBatch = a), (a._next = null);
< else {
< for (c = null; null !== d && d._expirationTime <= b; )
< (c = d), (d = d._next);
< a._next = d;
< null !== c && (c._next = a);
< }
< return a;
< };
< function si(a) {
< return !(
< !a ||
< (1 !== a.nodeType &&
< 9 !== a.nodeType &&
< 11 !== a.nodeType &&
< (8 !== a.nodeType || " react-mount-point-unstable " !== a.nodeValue))
< );
< }
< Sb = mi.batchedUpdates;
< Tb = mi.interactiveUpdates;
< Ub = mi.flushInteractiveUpdates;
< function ti(a, b) {
< b ||
< ((b = a ? (9 === a.nodeType ? a.documentElement : a.firstChild) : null),
< (b = !(!b || 1 !== b.nodeType || !b.hasAttribute("data-reactroot"))));
< if (!b) for (var c; (c = a.lastChild); ) a.removeChild(c);
< return new ri(a, !1, b);
< }
< function ui(a, b, c, d, e) {
< si(c) ? void 0 : A("200");
< var f = c._reactRootContainer;
< if (f) {
< if ("function" === typeof e) {
< var g = e;
< e = function() {
< var a = ki(f._internalRoot);
< g.call(a);
< };
< }
< null != a ? f.legacy_renderSubtreeIntoContainer(a, b, e) : f.render(b, e);
< } else {
< f = c._reactRootContainer = ti(c, d);
< if ("function" === typeof e) {
< var h = e;
< e = function() {
< var a = ki(f._internalRoot);
< h.call(a);
< };
< }
< di(function() {
< null != a ? f.legacy_renderSubtreeIntoContainer(a, b, e) : f.render(b, e);
< });
< }
< return ki(f._internalRoot);
< }
< function vi(a, b) {
< var c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
< si(b) ? void 0 : A("200");
< return oi(a, b, null, c);
< }
< var wi = {
< createPortal: vi,
< findDOMNode: function(a) {
< return null == a ? null : 1 === a.nodeType ? a : ii(a);
< },
< hydrate: function(a, b, c) {
< return ui(null, a, b, !0, c);
< },
< render: function(a, b, c) {
< return ui(null, a, b, !1, c);
< },
< unstable_renderSubtreeIntoContainer: function(a, b, c, d) {
< null == a || void 0 === a._reactInternalFiber ? A("38") : void 0;
< return ui(a, b, c, !1, d);
< },
< unmountComponentAtNode: function(a) {
< si(a) ? void 0 : A("40");
< return a._reactRootContainer
< ? (di(function() {
< ui(null, null, a, !1, function() {
< a._reactRootContainer = null;
< });
< }),
< !0)
< : !1;
< },
< unstable_createPortal: function() {
< return vi.apply(void 0, arguments);
< },
< unstable_batchedUpdates: ci,
< unstable_deferredUpdates: Ih,
< unstable_interactiveUpdates: fi,
< flushSync: ei,
< unstable_flushControlled: gi,
< __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
< EventPluginHub: Ka,
< EventPluginRegistry: va,
< EventPropagators: $a,
< ReactControlledComponent: Rb,
< ReactDOMComponentTree: Qa,
< ReactDOMEventListener: Od
< },
< unstable_createRoot: function(a, b) {
< return new ri(a, !0, null != b && !0 === b.hydrate);
< }
< };
< li({
< findFiberByHostInstance: Na,
< bundleType: 0,
< version: "16.4.2",
< rendererPackageName: "react-dom"
< });
< var Bi = { default: wi },
< Ci = (Bi && wi) || Bi;
< module.exports = Ci.default ? Ci.default : Ci;
---
> 'use strict';var ba=require("react"),n=require("object-assign"),ca=require("react-scheduler");function w(a,b,c,d,e,f,g,h){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var k=[c,d,e,f,g,h],l=0;a=Error(b.replace(/%s/g,function(){return k[l++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}}
> function B(a){for(var b=arguments.length-1,c="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=0;d<b;d++)c+="&args[]="+encodeURIComponent(arguments[d+1]);w(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",c)}ba?void 0:B("227");function da(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(m){this.onError(m)}}
> var ea=!1,fa=null,ha=!1,ia=null,ja={onError:function(a){ea=!0;fa=a}};function ka(a,b,c,d,e,f,g,h,k){ea=!1;fa=null;da.apply(ja,arguments)}function la(a,b,c,d,e,f,g,h,k){ka.apply(this,arguments);if(ea){if(ea){var l=fa;ea=!1;fa=null}else B("198"),l=void 0;ha||(ha=!0,ia=l)}}var ma=null,na={};
> function oa(){if(ma)for(var a in na){var b=na[a],c=ma.indexOf(a);-1<c?void 0:B("96",a);if(!pa[c]){b.extractEvents?void 0:B("97",a);pa[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,h=d;qa.hasOwnProperty(h)?B("99",h):void 0;qa[h]=f;var k=f.phasedRegistrationNames;if(k){for(e in k)k.hasOwnProperty(e)&&ra(k[e],g,h);e=!0}else f.registrationName?(ra(f.registrationName,g,h),e=!0):e=!1;e?void 0:B("98",d,a)}}}}
> function ra(a,b,c){sa[a]?B("100",a):void 0;sa[a]=b;ta[a]=b.eventTypes[c].dependencies}var pa=[],qa={},sa={},ta={};function ua(a){ma?B("101"):void 0;ma=Array.prototype.slice.call(a);oa()}function va(a){var b=!1,c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];na.hasOwnProperty(c)&&na[c]===d||(na[c]?B("102",c):void 0,na[c]=d,b=!0)}b&&oa()}
> var wa={plugins:pa,eventNameDispatchConfigs:qa,registrationNameModules:sa,registrationNameDependencies:ta,possibleRegistrationNames:null,injectEventPluginOrder:ua,injectEventPluginsByName:va},xa=null,ya=null,za=null;function Aa(a,b,c,d){b=a.type||"unknown-event";a.currentTarget=za(d);la(b,c,void 0,a);a.currentTarget=null}
> function Ba(a,b){null==b?B("30"):void 0;if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function Ca(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}var Da=null;
> function Ea(a,b){if(a){var c=a._dispatchListeners,d=a._dispatchInstances;if(Array.isArray(c))for(var e=0;e<c.length&&!a.isPropagationStopped();e++)Aa(a,b,c[e],d[e]);else c&&Aa(a,b,c,d);a._dispatchListeners=null;a._dispatchInstances=null;a.isPersistent()||a.constructor.release(a)}}function Fa(a){return Ea(a,!0)}function Ga(a){return Ea(a,!1)}var Ha={injectEventPluginOrder:ua,injectEventPluginsByName:va};
> function Ia(a,b){var c=a.stateNode;if(!c)return null;var d=xa(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;c&&"function"!==typeof c?B("231",b,typeof c):void 0;
> return c}function Ja(a,b){null!==a&&(Da=Ba(Da,a));a=Da;Da=null;if(a&&(b?Ca(a,Fa):Ca(a,Ga),Da?B("95"):void 0,ha))throw b=ia,ha=!1,ia=null,b;}function Ka(a,b,c,d){for(var e=null,f=0;f<pa.length;f++){var g=pa[f];g&&(g=g.extractEvents(a,b,c,d))&&(e=Ba(e,g))}Ja(e,!1)}var La={injection:Ha,getListener:Ia,runEventsInBatch:Ja,runExtractedEventsInBatch:Ka},Ma=Math.random().toString(36).slice(2),E="__reactInternalInstance$"+Ma,Na="__reactEventHandlers$"+Ma;
> function Oa(a){if(a[E])return a[E];for(;!a[E];)if(a.parentNode)a=a.parentNode;else return null;a=a[E];return 7===a.tag||8===a.tag?a:null}function Pa(a){a=a[E];return!a||7!==a.tag&&8!==a.tag?null:a}function Qa(a){if(7===a.tag||8===a.tag)return a.stateNode;B("33")}function Ra(a){return a[Na]||null}var Sa={precacheFiberNode:function(a,b){b[E]=a},getClosestInstanceFromNode:Oa,getInstanceFromNode:Pa,getNodeFromInstance:Qa,getFiberCurrentPropsFromNode:Ra,updateFiberProps:function(a,b){a[Na]=b}};
> function F(a){do a=a.return;while(a&&7!==a.tag);return a?a:null}function Ua(a,b,c){for(var d=[];a;)d.push(a),a=F(a);for(a=d.length;0<a--;)b(d[a],"captured",c);for(a=0;a<d.length;a++)b(d[a],"bubbled",c)}function Va(a,b,c){if(b=Ia(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=Ba(c._dispatchListeners,b),c._dispatchInstances=Ba(c._dispatchInstances,a)}function Wa(a){a&&a.dispatchConfig.phasedRegistrationNames&&Ua(a._targetInst,Va,a)}
> function Xa(a){if(a&&a.dispatchConfig.phasedRegistrationNames){var b=a._targetInst;b=b?F(b):null;Ua(b,Va,a)}}function Za(a,b,c){a&&c&&c.dispatchConfig.registrationName&&(b=Ia(a,c.dispatchConfig.registrationName))&&(c._dispatchListeners=Ba(c._dispatchListeners,b),c._dispatchInstances=Ba(c._dispatchInstances,a))}function $a(a){a&&a.dispatchConfig.registrationName&&Za(a._targetInst,null,a)}function ab(a){Ca(a,Wa)}
> function bb(a,b,c,d){if(c&&d)a:{var e=c;for(var f=d,g=0,h=e;h;h=F(h))g++;h=0;for(var k=f;k;k=F(k))h++;for(;0<g-h;)e=F(e),g--;for(;0<h-g;)f=F(f),h--;for(;g--;){if(e===f||e===f.alternate)break a;e=F(e);f=F(f)}e=null}else e=null;f=e;for(e=[];c&&c!==f;){g=c.alternate;if(null!==g&&g===f)break;e.push(c);c=F(c)}for(c=[];d&&d!==f;){g=d.alternate;if(null!==g&&g===f)break;c.push(d);d=F(d)}for(d=0;d<e.length;d++)Za(e[d],"bubbled",a);for(a=c.length;0<a--;)Za(c[a],"captured",b)}
> var cb={accumulateTwoPhaseDispatches:ab,accumulateTwoPhaseDispatchesSkipTarget:function(a){Ca(a,Xa)},accumulateEnterLeaveDispatches:bb,accumulateDirectDispatches:function(a){Ca(a,$a)}},db=!("undefined"===typeof window||!window.document||!window.document.createElement);function eb(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}
> var fb={animationend:eb("Animation","AnimationEnd"),animationiteration:eb("Animation","AnimationIteration"),animationstart:eb("Animation","AnimationStart"),transitionend:eb("Transition","TransitionEnd")},gb={},hb={};db&&(hb=document.createElement("div").style,"AnimationEvent"in window||(delete fb.animationend.animation,delete fb.animationiteration.animation,delete fb.animationstart.animation),"TransitionEvent"in window||delete fb.transitionend.transition);
> function ib(a){if(gb[a])return gb[a];if(!fb[a])return a;var b=fb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in hb)return gb[a]=b[c];return a}var jb=ib("animationend"),kb=ib("animationiteration"),lb=ib("animationstart"),mb=ib("transitionend"),nb="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ob=null,pb=null,qb=null;
> function rb(){if(qb)return qb;var a,b=pb,c=b.length,d,e="value"in ob?ob.value:ob.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return qb=e.slice(a,1<d?1-d:void 0)}function sb(){return!0}function tb(){return!1}
> function G(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=d:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?sb:tb;this.isPropagationStopped=tb;return this}
> n(G.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=sb)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=sb)},persist:function(){this.isPersistent=sb},isPersistent:tb,destructor:function(){var a=this.constructor.Interface,
> b;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=tb;this._dispatchInstances=this._dispatchListeners=null}});G.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};
> G.extend=function(a){function b(){}function c(){return d.apply(this,arguments)}var d=this;b.prototype=d.prototype;var e=new b;n(e,c.prototype);c.prototype=e;c.prototype.constructor=c;c.Interface=n({},d.Interface,a);c.extend=d.extend;ub(c);return c};ub(G);function vb(a,b,c,d){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,a,b,c,d);return e}return new this(a,b,c,d)}
> function wb(a){a instanceof this?void 0:w(!1,"Trying to release an event instance into a pool of a different type.");a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function ub(a){a.eventPool=[];a.getPooled=vb;a.release=wb}var xb=G.extend({data:null}),yb=G.extend({data:null}),zb=[9,13,27,32],Ab=db&&"CompositionEvent"in window,Bb=null;db&&"documentMode"in document&&(Bb=document.documentMode);
> var Cb=db&&"TextEvent"in window&&!Bb,Db=db&&(!Ab||Bb&&8<Bb&&11>=Bb),Eb=String.fromCharCode(32),Fb={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",
> captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Gb=!1;
> function Hb(a,b){switch(a){case "keyup":return-1!==zb.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return!0;default:return!1}}function Ib(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var Jb=!1;function Kb(a,b){switch(a){case "compositionend":return Ib(b);case "keypress":if(32!==b.which)return null;Gb=!0;return Eb;case "textInput":return a=b.data,a===Eb&&Gb?null:a;default:return null}}
> function Lb(a,b){if(Jb)return"compositionend"===a||!Ab&&Hb(a,b)?(a=rb(),qb=pb=ob=null,Jb=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return Db&&"ko"!==b.locale?null:b.data;default:return null}}
> var Mb={eventTypes:Fb,extractEvents:function(a,b,c,d){var e=void 0;var f=void 0;if(Ab)b:{switch(a){case "compositionstart":e=Fb.compositionStart;break b;case "compositionend":e=Fb.compositionEnd;break b;case "compositionupdate":e=Fb.compositionUpdate;break b}e=void 0}else Jb?Hb(a,c)&&(e=Fb.compositionEnd):"keydown"===a&&229===c.keyCode&&(e=Fb.compositionStart);e?(Db&&"ko"!==c.locale&&(Jb||e!==Fb.compositionStart?e===Fb.compositionEnd&&Jb&&(f=rb()):(ob=d,pb="value"in ob?ob.value:ob.textContent,Jb=
> !0)),e=xb.getPooled(e,b,c,d),f?e.data=f:(f=Ib(c),null!==f&&(e.data=f)),ab(e),f=e):f=null;(a=Cb?Kb(a,c):Lb(a,c))?(b=yb.getPooled(Fb.beforeInput,b,c,d),b.data=a,ab(b)):b=null;return null===f?b:null===b?f:[f,b]}},Nb=null,Ob=null,Pb=null;
> function Qb(a){if(a=ya(a)){"function"!==typeof Nb?w(!1,"setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue."):void 0;var b=xa(a.stateNode);Nb(a.stateNode,a.type,b)}}function Rb(a){Ob?Pb?Pb.push(a):Pb=[a]:Ob=a}function Sb(){return null!==Ob||null!==Pb}function Tb(){if(Ob){var a=Ob,b=Pb;Pb=Ob=null;Qb(a);if(b)for(a=0;a<b.length;a++)Qb(b[a])}}
> var Ub={setRestoreImplementation:function(a){Nb=a},enqueueStateRestore:Rb,needsStateRestore:Sb,restoreStateIfNeeded:Tb};function Vb(a,b){return a(b)}function Wb(a,b,c){return a(b,c)}function Xb(){}var Yb=!1;function Zb(a,b){if(Yb)return a(b);Yb=!0;try{return Vb(a,b)}finally{Yb=!1,Sb()&&(Xb(),Tb())}}var $b={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};
> function ac(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!$b[a.type]:"textarea"===b?!0:!1}function bc(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}function cc(a){if(!db)return!1;a="on"+a;var b=a in document;b||(b=document.createElement("div"),b.setAttribute(a,"return;"),b="function"===typeof b[a]);return b}
> function dc(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}
> function ec(a){var b=dc(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=
> null;delete a[b]}}}}function fc(a){a._valueTracker||(a._valueTracker=ec(a))}function gc(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=dc(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}
> var hc=ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ic=/^(.*)[\\\/]/,H="function"===typeof Symbol&&Symbol.for,jc=H?Symbol.for("react.element"):60103,kc=H?Symbol.for("react.portal"):60106,lc=H?Symbol.for("react.fragment"):60107,mc=H?Symbol.for("react.strict_mode"):60108,nc=H?Symbol.for("react.profiler"):60114,oc=H?Symbol.for("react.provider"):60109,pc=H?Symbol.for("react.context"):60110,qc=H?Symbol.for("react.async_mode"):60111,sc=H?Symbol.for("react.forward_ref"):60112,tc=H?Symbol.for("react.placeholder"):
> 60113,uc="function"===typeof Symbol&&Symbol.iterator;function vc(a){if(null===a||"object"!==typeof a)return null;a=uc&&a[uc]||a["@@iterator"];return"function"===typeof a?a:null}
> function wc(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case qc:return"AsyncMode";case lc:return"Fragment";case kc:return"Portal";case nc:return"Profiler";case mc:return"StrictMode";case tc:return"Placeholder"}if("object"===typeof a){switch(a.$$typeof){case pc:return"Context.Consumer";case oc:return"Context.Provider";case sc:return a=a.render,a=a.displayName||a.name||"",""!==a?"ForwardRef("+a+")":"ForwardRef"}if("function"===
> typeof a.then&&(a=1===a._reactStatus?a._reactResult:null))return wc(a)}return null}function xc(a){var b="";do{a:switch(a.tag){case 4:case 0:case 1:case 2:case 3:case 7:case 10:var c=a._debugOwner,d=a._debugSource,e=wc(a.type);var f=null;c&&(f=wc(c.type));c=e;e="";d?e=" (at "+d.fileName.replace(ic,"")+":"+d.lineNumber+")":f&&(e=" (created by "+f+")");f="\n in "+(c||"Unknown")+e;break a;default:f=""}b+=f;a=a.return}while(a);return b}
> var yc=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,zc=Object.prototype.hasOwnProperty,Ac={},Bc={};
> function Dc(a){if(zc.call(Bc,a))return!0;if(zc.call(Ac,a))return!1;if(yc.test(a))return Bc[a]=!0;Ac[a]=!0;return!1}function Ec(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
> function Fc(a,b,c,d){if(null===b||"undefined"===typeof b||Ec(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function J(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}var K={};
> "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){K[a]=new J(a,0,!1,a,null)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];K[b]=new J(b,1,!1,a[1],null)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){K[a]=new J(a,2,!1,a.toLowerCase(),null)});
> ["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){K[a]=new J(a,2,!1,a,null)});"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){K[a]=new J(a,3,!1,a.toLowerCase(),null)});["checked","multiple","muted","selected"].forEach(function(a){K[a]=new J(a,3,!0,a,null)});
> ["capture","download"].forEach(function(a){K[a]=new J(a,4,!1,a,null)});["cols","rows","size","span"].forEach(function(a){K[a]=new J(a,6,!1,a,null)});["rowSpan","start"].forEach(function(a){K[a]=new J(a,5,!1,a.toLowerCase(),null)});var Gc=/[\-:]([a-z])/g;function Hc(a){return a[1].toUpperCase()}
> "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(Gc,
> Hc);K[b]=new J(b,1,!1,a,null)});"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Gc,Hc);K[b]=new J(b,1,!1,a,"http://www.w3.org/1999/xlink")});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Gc,Hc);K[b]=new J(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")});K.tabIndex=new J("tabIndex",1,!1,"tabindex",null);
> function Ic(a,b,c,d){var e=K.hasOwnProperty(b)?K[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(Fc(b,c,e,d)&&(c=null),d||null===e?Dc(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}
> function Jc(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;default:return""}}function Kc(a,b){var c=b.checked;return n({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}
> function Lc(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Jc(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function Mc(a,b){b=b.checked;null!=b&&Ic(a,"checked",b,!1)}
> function Nc(a,b){Mc(a,b);var c=Jc(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?Oc(a,b.type,c):b.hasOwnProperty("defaultValue")&&Oc(a,b.type,Jc(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}
> function Pc(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;d=a.value;c||b===d||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!a.defaultChecked;a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}
> function Oc(a,b,c){if("number"!==b||a.ownerDocument.activeElement!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}var Qc={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Rc(a,b,c){a=G.getPooled(Qc.change,a,b,c);a.type="change";Rb(c);ab(a);return a}var Sc=null,Tc=null;function Uc(a){Ja(a,!1)}
> function Vc(a){var b=Qa(a);if(gc(b))return a}function Wc(a,b){if("change"===a)return b}var Xc=!1;db&&(Xc=cc("input")&&(!document.documentMode||9<document.documentMode));function Yc(){Sc&&(Sc.detachEvent("onpropertychange",Zc),Tc=Sc=null)}function Zc(a){"value"===a.propertyName&&Vc(Tc)&&(a=Rc(Tc,a,bc(a)),Zb(Uc,a))}function $c(a,b,c){"focus"===a?(Yc(),Sc=b,Tc=c,Sc.attachEvent("onpropertychange",Zc)):"blur"===a&&Yc()}function ad(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return Vc(Tc)}
> function bd(a,b){if("click"===a)return Vc(b)}function cd(a,b){if("input"===a||"change"===a)return Vc(b)}
> var dd={eventTypes:Qc,_isInputEventSupported:Xc,extractEvents:function(a,b,c,d){var e=b?Qa(b):window,f=void 0,g=void 0,h=e.nodeName&&e.nodeName.toLowerCase();"select"===h||"input"===h&&"file"===e.type?f=Wc:ac(e)?Xc?f=cd:(f=ad,g=$c):(h=e.nodeName)&&"input"===h.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)&&(f=bd);if(f&&(f=f(a,b)))return Rc(f,c,d);g&&g(a,e,b);"blur"===a&&(a=e._wrapperState)&&a.controlled&&"number"===e.type&&Oc(e,"number",e.value)}},ed=G.extend({view:null,detail:null}),fd={Alt:"altKey",
> Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gd(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=fd[a])?!!b[a]:!1}function hd(){return gd}
> var id=0,jd=0,kd=!1,ld=!1,md=ed.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:hd,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)},movementX:function(a){if("movementX"in a)return a.movementX;var b=id;id=a.screenX;return kd?"mousemove"===a.type?a.screenX-b:0:(kd=!0,0)},movementY:function(a){if("movementY"in a)return a.movementY;
> var b=jd;jd=a.screenY;return ld?"mousemove"===a.type?a.screenY-b:0:(ld=!0,0)}}),nd=md.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),od={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",
> dependencies:["pointerout","pointerover"]}},pd={eventTypes:od,extractEvents:function(a,b,c,d){var e="mouseover"===a||"pointerover"===a,f="mouseout"===a||"pointerout"===a;if(e&&(c.relatedTarget||c.fromElement)||!f&&!e)return null;e=d.window===d?d:(e=d.ownerDocument)?e.defaultView||e.parentWindow:window;f?(f=b,b=(b=c.relatedTarget||c.toElement)?Oa(b):null):f=null;if(f===b)return null;var g=void 0,h=void 0,k=void 0,l=void 0;if("mouseout"===a||"mouseover"===a)g=md,h=od.mouseLeave,k=od.mouseEnter,l="mouse";
> else if("pointerout"===a||"pointerover"===a)g=nd,h=od.pointerLeave,k=od.pointerEnter,l="pointer";a=null==f?e:Qa(f);e=null==b?e:Qa(b);h=g.getPooled(h,f,c,d);h.type=l+"leave";h.target=a;h.relatedTarget=e;c=g.getPooled(k,b,c,d);c.type=l+"enter";c.target=e;c.relatedTarget=a;bb(h,c,f,b);return[h,c]}},qd=Object.prototype.hasOwnProperty;function rd(a,b){return a===b?0!==a||0!==b||1/a===1/b:a!==a&&b!==b}
> function sd(a,b){if(rd(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!qd.call(b,c[d])||!rd(a[c[d]],b[c[d]]))return!1;return!0}function td(a){var b=a;if(a.alternate)for(;b.return;)b=b.return;else{if(0!==(b.effectTag&2))return 1;for(;b.return;)if(b=b.return,0!==(b.effectTag&2))return 1}return 5===b.tag?2:3}function ud(a){2!==td(a)?B("188"):void 0}
> function vd(a){var b=a.alternate;if(!b)return b=td(a),3===b?B("188"):void 0,1===b?null:a;for(var c=a,d=b;;){var e=c.return,f=e?e.alternate:null;if(!e||!f)break;if(e.child===f.child){for(var g=e.child;g;){if(g===c)return ud(e),a;if(g===d)return ud(e),b;g=g.sibling}B("188")}if(c.return!==d.return)c=e,d=f;else{g=!1;for(var h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}g?
> void 0:B("189")}}c.alternate!==d?B("190"):void 0}5!==c.tag?B("188"):void 0;return c.stateNode.current===c?a:b}function wd(a){a=vd(a);if(!a)return null;for(var b=a;;){if(7===b.tag||8===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}
> var xd=G.extend({animationName:null,elapsedTime:null,pseudoElement:null}),yd=G.extend({clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),zd=ed.extend({relatedTarget:null});function Ad(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}
> var Bd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",
> 116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Dd=ed.extend({key:function(a){if(a.key){var b=Bd[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=Ad(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Cd[a.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:hd,charCode:function(a){return"keypress"===
> a.type?Ad(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:fun
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment