react-dom 16.1.2 → 16.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /** @license React v16.1.2
1
+ /** @license React v16.2.0
2
2
  * react-dom.development.js
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -74,9 +74,9 @@ function invariant(condition, format, a, b, c, d, e, f) {
74
74
  }
75
75
  }
76
76
 
77
- var invariant_1$1 = invariant;
77
+ var invariant_1 = invariant;
78
78
 
79
- !React ? invariant_1$1(false, 'ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.') : void 0;
79
+ !React ? invariant_1(false, 'ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.') : void 0;
80
80
 
81
81
  // These attributes should be all lowercase to allow for
82
82
  // case insensitive checks
@@ -138,7 +138,7 @@ var DOMPropertyInjection = {
138
138
  var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
139
139
 
140
140
  for (var propName in Properties) {
141
- !!properties.hasOwnProperty(propName) ? invariant_1$1(false, "injectDOMPropertyConfig(...): You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.", propName) : void 0;
141
+ !!properties.hasOwnProperty(propName) ? invariant_1(false, "injectDOMPropertyConfig(...): You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.", propName) : void 0;
142
142
 
143
143
  var lowerCased = propName.toLowerCase();
144
144
  var propConfig = Properties[propName];
@@ -156,7 +156,7 @@ var DOMPropertyInjection = {
156
156
  hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE),
157
157
  hasStringBooleanValue: checkMask(propConfig, Injection.HAS_STRING_BOOLEAN_VALUE)
158
158
  };
159
- !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? invariant_1$1(false, "DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s", propName) : void 0;
159
+ !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? invariant_1(false, "DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s", propName) : void 0;
160
160
 
161
161
  if (DOMAttributeNames.hasOwnProperty(propName)) {
162
162
  var attributeName = DOMAttributeNames[propName];
@@ -454,7 +454,7 @@ var ReactErrorUtils = {
454
454
 
455
455
  injection: {
456
456
  injectErrorUtils: function (injectedErrorUtils) {
457
- !(typeof injectedErrorUtils.invokeGuardedCallback === 'function') ? invariant_1$1(false, 'Injected invokeGuardedCallback() must be a function.') : void 0;
457
+ !(typeof injectedErrorUtils.invokeGuardedCallback === 'function') ? invariant_1(false, 'Injected invokeGuardedCallback() must be a function.') : void 0;
458
458
  invokeGuardedCallback = injectedErrorUtils.invokeGuardedCallback;
459
459
  }
460
460
  },
@@ -516,7 +516,7 @@ var ReactErrorUtils = {
516
516
  ReactErrorUtils._hasCaughtError = false;
517
517
  return error;
518
518
  } else {
519
- invariant_1$1(false, 'clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.');
519
+ 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.');
520
520
  }
521
521
  }
522
522
  };
@@ -672,15 +672,15 @@ function recomputePluginOrdering() {
672
672
  for (var pluginName in namesToPlugins) {
673
673
  var pluginModule = namesToPlugins[pluginName];
674
674
  var pluginIndex = eventPluginOrder.indexOf(pluginName);
675
- !(pluginIndex > -1) ? invariant_1$1(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;
675
+ !(pluginIndex > -1) ? invariant_1(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;
676
676
  if (plugins[pluginIndex]) {
677
677
  continue;
678
678
  }
679
- !pluginModule.extractEvents ? invariant_1$1(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;
679
+ !pluginModule.extractEvents ? invariant_1(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;
680
680
  plugins[pluginIndex] = pluginModule;
681
681
  var publishedEvents = pluginModule.eventTypes;
682
682
  for (var eventName in publishedEvents) {
683
- !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant_1$1(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;
683
+ !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant_1(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;
684
684
  }
685
685
  }
686
686
  }
@@ -694,7 +694,7 @@ function recomputePluginOrdering() {
694
694
  * @private
695
695
  */
696
696
  function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
697
- !!eventNameDispatchConfigs.hasOwnProperty(eventName) ? invariant_1$1(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : void 0;
697
+ !!eventNameDispatchConfigs.hasOwnProperty(eventName) ? invariant_1(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : void 0;
698
698
  eventNameDispatchConfigs[eventName] = dispatchConfig;
699
699
 
700
700
  var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
@@ -721,7 +721,7 @@ function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
721
721
  * @private
722
722
  */
723
723
  function publishRegistrationName(registrationName, pluginModule, eventName) {
724
- !!registrationNameModules[registrationName] ? invariant_1$1(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : void 0;
724
+ !!registrationNameModules[registrationName] ? invariant_1(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : void 0;
725
725
  registrationNameModules[registrationName] = pluginModule;
726
726
  registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
727
727
 
@@ -780,7 +780,7 @@ var possibleRegistrationNames = {};
780
780
  * @see {EventPluginHub.injection.injectEventPluginOrder}
781
781
  */
782
782
  function injectEventPluginOrder(injectedEventPluginOrder) {
783
- !!eventPluginOrder ? invariant_1$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;
783
+ !!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;
784
784
  // Clone the ordering so it cannot be dynamically mutated.
785
785
  eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
786
786
  recomputePluginOrdering();
@@ -804,7 +804,7 @@ function injectEventPluginsByName(injectedNamesToPlugins) {
804
804
  }
805
805
  var pluginModule = injectedNamesToPlugins[pluginName];
806
806
  if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
807
- !!namesToPlugins[pluginName] ? invariant_1$1(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : void 0;
807
+ !!namesToPlugins[pluginName] ? invariant_1(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : void 0;
808
808
  namesToPlugins[pluginName] = pluginModule;
809
809
  isOrderingDirty = true;
810
810
  }
@@ -844,20 +844,20 @@ function makeEmptyFunction(arg) {
844
844
  * primarily useful idiomatically for overridable function endpoints which
845
845
  * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
846
846
  */
847
- var emptyFunction$1 = function emptyFunction() {};
847
+ var emptyFunction = function emptyFunction() {};
848
848
 
849
- emptyFunction$1.thatReturns = makeEmptyFunction;
850
- emptyFunction$1.thatReturnsFalse = makeEmptyFunction(false);
851
- emptyFunction$1.thatReturnsTrue = makeEmptyFunction(true);
852
- emptyFunction$1.thatReturnsNull = makeEmptyFunction(null);
853
- emptyFunction$1.thatReturnsThis = function () {
849
+ emptyFunction.thatReturns = makeEmptyFunction;
850
+ emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
851
+ emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
852
+ emptyFunction.thatReturnsNull = makeEmptyFunction(null);
853
+ emptyFunction.thatReturnsThis = function () {
854
854
  return this;
855
855
  };
856
- emptyFunction$1.thatReturnsArgument = function (arg) {
856
+ emptyFunction.thatReturnsArgument = function (arg) {
857
857
  return arg;
858
858
  };
859
859
 
860
- var emptyFunction_1 = emptyFunction$1;
860
+ var emptyFunction_1 = emptyFunction;
861
861
 
862
862
  /**
863
863
  * Copyright (c) 2014-present, Facebook, Inc.
@@ -920,7 +920,7 @@ var warning = emptyFunction_1;
920
920
  };
921
921
  }
922
922
 
923
- var warning_1$1 = warning;
923
+ var warning_1 = warning;
924
924
 
925
925
  var getFiberCurrentPropsFromNode = null;
926
926
  var getInstanceFromNode = null;
@@ -933,7 +933,7 @@ var injection$2 = {
933
933
  getNodeFromInstance = Injected.getNodeFromInstance;
934
934
 
935
935
  {
936
- warning_1$1(getNodeFromInstance && getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.');
936
+ warning_1(getNodeFromInstance && getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.');
937
937
  }
938
938
  }
939
939
  };
@@ -955,7 +955,7 @@ var validateEventDispatches;
955
955
  var instancesIsArr = Array.isArray(dispatchInstances);
956
956
  var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
957
957
 
958
- warning_1$1(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.');
958
+ warning_1(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.');
959
959
  };
960
960
  }
961
961
 
@@ -1032,7 +1032,7 @@ function executeDispatchesInOrder(event, simulated) {
1032
1032
  */
1033
1033
 
1034
1034
  function accumulateInto(current, next) {
1035
- !(next != null) ? invariant_1$1(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : void 0;
1035
+ !(next != null) ? invariant_1(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : void 0;
1036
1036
 
1037
1037
  if (current == null) {
1038
1038
  return next;
@@ -1188,7 +1188,7 @@ function getListener(inst, registrationName) {
1188
1188
  if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
1189
1189
  return null;
1190
1190
  }
1191
- !(!listener || typeof listener === 'function') ? invariant_1$1(false, 'Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener) : void 0;
1191
+ !(!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;
1192
1192
  return listener;
1193
1193
  }
1194
1194
 
@@ -1237,12 +1237,17 @@ function processEventQueue(simulated) {
1237
1237
  // events get enqueued while processing.
1238
1238
  var processingEventQueue = eventQueue;
1239
1239
  eventQueue = null;
1240
+
1241
+ if (!processingEventQueue) {
1242
+ return;
1243
+ }
1244
+
1240
1245
  if (simulated) {
1241
1246
  forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
1242
1247
  } else {
1243
1248
  forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
1244
1249
  }
1245
- !!eventQueue ? invariant_1$1(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : void 0;
1250
+ !!eventQueue ? invariant_1(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : void 0;
1246
1251
  // This would be a good time to rethrow if any of the event handlers threw.
1247
1252
  ReactErrorUtils.rethrowCaughtError();
1248
1253
  }
@@ -1339,7 +1344,7 @@ function getNodeFromInstance$1(inst) {
1339
1344
 
1340
1345
  // Without this first invariant, passing a non-DOM-component triggers the next
1341
1346
  // invariant for a missing parent, which is super confusing.
1342
- invariant_1$1(false, 'getNodeFromInstance: Invalid argument.');
1347
+ invariant_1(false, 'getNodeFromInstance: Invalid argument.');
1343
1348
  }
1344
1349
 
1345
1350
  function getFiberCurrentPropsFromNode$1(node) {
@@ -1516,7 +1521,7 @@ function listenerAtPhase(inst, event, propagationPhase) {
1516
1521
  */
1517
1522
  function accumulateDirectionalDispatches(inst, phase, event) {
1518
1523
  {
1519
- warning_1$1(inst, 'Dispatching inst must not be null');
1524
+ warning_1(inst, 'Dispatching inst must not be null');
1520
1525
  }
1521
1526
  var listener = listenerAtPhase(inst, event, phase);
1522
1527
  if (listener) {
@@ -1919,7 +1924,7 @@ SyntheticEvent.augmentClass = function (Class, Interface) {
1919
1924
  return new Proxy(constructor.apply(that, args), {
1920
1925
  set: function (target, prop, value) {
1921
1926
  if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
1922
- warning_1$1(didWarnForAddedNewProperty || target.isPersistent(), "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.');
1927
+ warning_1(didWarnForAddedNewProperty || target.isPersistent(), "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.');
1923
1928
  didWarnForAddedNewProperty = true;
1924
1929
  }
1925
1930
  target[prop] = value;
@@ -1964,7 +1969,7 @@ function getPooledWarningPropertyDefinition(propName, getVal) {
1964
1969
 
1965
1970
  function warn(action, result) {
1966
1971
  var warningCondition = false;
1967
- warning_1$1(warningCondition, "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);
1972
+ warning_1(warningCondition, "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);
1968
1973
  }
1969
1974
  }
1970
1975
 
@@ -1980,7 +1985,7 @@ function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
1980
1985
 
1981
1986
  function releasePooledEvent(event) {
1982
1987
  var EventConstructor = this;
1983
- !(event instanceof EventConstructor) ? invariant_1$1(false, 'Trying to release an event instance into a pool of a different type.') : void 0;
1988
+ !(event instanceof EventConstructor) ? invariant_1(false, 'Trying to release an event instance into a pool of a different type.') : void 0;
1984
1989
  event.destructor();
1985
1990
  if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {
1986
1991
  EventConstructor.eventPool.push(event);
@@ -2433,7 +2438,7 @@ function restoreStateOfTarget(target) {
2433
2438
  // Unmounted
2434
2439
  return;
2435
2440
  }
2436
- !(fiberHostComponent && typeof fiberHostComponent.restoreControlledState === 'function') ? invariant_1$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;
2441
+ !(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;
2437
2442
  var props = getFiberCurrentPropsFromNode(internalInstance.stateNode);
2438
2443
  fiberHostComponent.restoreControlledState(internalInstance.stateNode, internalInstance.type, props);
2439
2444
  }
@@ -3247,7 +3252,7 @@ function isMounted(component) {
3247
3252
  if (owner !== null && owner.tag === ClassComponent) {
3248
3253
  var ownerFiber = owner;
3249
3254
  var instance = ownerFiber.stateNode;
3250
- warning_1$1(instance._warnedAboutRefsInRender, '%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');
3255
+ warning_1(instance._warnedAboutRefsInRender, '%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');
3251
3256
  instance._warnedAboutRefsInRender = true;
3252
3257
  }
3253
3258
  }
@@ -3260,7 +3265,7 @@ function isMounted(component) {
3260
3265
  }
3261
3266
 
3262
3267
  function assertIsMounted(fiber) {
3263
- !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant_1$1(false, 'Unable to find node on an unmounted component.') : void 0;
3268
+ !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant_1(false, 'Unable to find node on an unmounted component.') : void 0;
3264
3269
  }
3265
3270
 
3266
3271
  function findCurrentFiberUsingSlowPath(fiber) {
@@ -3268,7 +3273,7 @@ function findCurrentFiberUsingSlowPath(fiber) {
3268
3273
  if (!alternate) {
3269
3274
  // If there is no alternate, then we only need to check if it is mounted.
3270
3275
  var state = isFiberMountedImpl(fiber);
3271
- !(state !== UNMOUNTED) ? invariant_1$1(false, 'Unable to find node on an unmounted component.') : void 0;
3276
+ !(state !== UNMOUNTED) ? invariant_1(false, 'Unable to find node on an unmounted component.') : void 0;
3272
3277
  if (state === MOUNTING) {
3273
3278
  return null;
3274
3279
  }
@@ -3307,7 +3312,7 @@ function findCurrentFiberUsingSlowPath(fiber) {
3307
3312
  }
3308
3313
  // We should never have an alternate for any mounting node. So the only
3309
3314
  // way this could possibly happen is if this was unmounted, if at all.
3310
- invariant_1$1(false, 'Unable to find node on an unmounted component.');
3315
+ invariant_1(false, 'Unable to find node on an unmounted component.');
3311
3316
  }
3312
3317
 
3313
3318
  if (a['return'] !== b['return']) {
@@ -3358,15 +3363,15 @@ function findCurrentFiberUsingSlowPath(fiber) {
3358
3363
  }
3359
3364
  _child = _child.sibling;
3360
3365
  }
3361
- !didFindChild ? invariant_1$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;
3366
+ !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;
3362
3367
  }
3363
3368
  }
3364
3369
 
3365
- !(a.alternate === b) ? invariant_1$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;
3370
+ !(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;
3366
3371
  }
3367
3372
  // If the root is not a host container, we're in a disconnected tree. I.e.
3368
3373
  // unmounted.
3369
- !(a.tag === HostRoot) ? invariant_1$1(false, 'Unable to find node on an unmounted component.') : void 0;
3374
+ !(a.tag === HostRoot) ? invariant_1(false, 'Unable to find node on an unmounted component.') : void 0;
3370
3375
  if (a.stateNode.current === a) {
3371
3376
  // We've determined that A is the current branch.
3372
3377
  return fiber;
@@ -3963,17 +3968,7 @@ function listenTo(registrationName, contentDocumentHandle) {
3963
3968
  for (var i = 0; i < dependencies.length; i++) {
3964
3969
  var dependency = dependencies[i];
3965
3970
  if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
3966
- if (dependency === 'topWheel') {
3967
- if (isEventSupported('wheel')) {
3968
- trapBubbledEvent('topWheel', 'wheel', mountAt);
3969
- } else if (isEventSupported('mousewheel')) {
3970
- trapBubbledEvent('topWheel', 'mousewheel', mountAt);
3971
- } else {
3972
- // Firefox needs to capture a different mouse scroll event.
3973
- // @see http://www.quirksmode.org/dom/events/tests/scroll.html
3974
- trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
3975
- }
3976
- } else if (dependency === 'topScroll') {
3971
+ if (dependency === 'topScroll') {
3977
3972
  trapCapturedEvent('topScroll', 'scroll', mountAt);
3978
3973
  } else if (dependency === 'topFocus' || dependency === 'topBlur') {
3979
3974
  trapCapturedEvent('topFocus', 'focus', mountAt);
@@ -4046,7 +4041,7 @@ function getActiveElement(doc) /*?DOMElement*/{
4046
4041
  }
4047
4042
  }
4048
4043
 
4049
- var getActiveElement_1$1 = getActiveElement;
4044
+ var getActiveElement_1 = getActiveElement;
4050
4045
 
4051
4046
  /**
4052
4047
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -4112,7 +4107,7 @@ function shallowEqual(objA, objB) {
4112
4107
  return true;
4113
4108
  }
4114
4109
 
4115
- var shallowEqual_1$1 = shallowEqual;
4110
+ var shallowEqual_1 = shallowEqual;
4116
4111
 
4117
4112
  /**
4118
4113
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -4190,7 +4185,7 @@ function containsNode(outerNode, innerNode) {
4190
4185
  }
4191
4186
  }
4192
4187
 
4193
- var containsNode_1$1 = containsNode;
4188
+ var containsNode_1 = containsNode;
4194
4189
 
4195
4190
  /**
4196
4191
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -4215,7 +4210,7 @@ function focusNode(node) {
4215
4210
  } catch (e) {}
4216
4211
  }
4217
4212
 
4218
- var focusNode_1$1 = focusNode;
4213
+ var focusNode_1 = focusNode;
4219
4214
 
4220
4215
  /**
4221
4216
  * Given any node return the first leaf node without children.
@@ -4287,10 +4282,10 @@ function getOffsets(outerNode) {
4287
4282
  return null;
4288
4283
  }
4289
4284
 
4290
- var anchorNode = selection.anchorNode;
4291
- var anchorOffset = selection.anchorOffset;
4292
- var focusNode = selection.focusNode;
4293
- var focusOffset = selection.focusOffset;
4285
+ var anchorNode = selection.anchorNode,
4286
+ anchorOffset = selection.anchorOffset,
4287
+ focusNode = selection.focusNode,
4288
+ focusOffset = selection.focusOffset;
4294
4289
 
4295
4290
  // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
4296
4291
  // up/down buttons on an <input type="number">. Anonymous divs do not seem to
@@ -4299,6 +4294,7 @@ function getOffsets(outerNode) {
4299
4294
  // is to access a property that typically works for non-anonymous divs and
4300
4295
  // catch any error that may otherwise arise. See
4301
4296
  // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
4297
+
4302
4298
  try {
4303
4299
  /* eslint-disable no-unused-expressions */
4304
4300
  anchorNode.nodeType;
@@ -4441,7 +4437,7 @@ function setOffsets(node, offsets) {
4441
4437
  }
4442
4438
 
4443
4439
  function isInDocument(node) {
4444
- return containsNode_1$1(document.documentElement, node);
4440
+ return containsNode_1(document.documentElement, node);
4445
4441
  }
4446
4442
 
4447
4443
  /**
@@ -4457,7 +4453,7 @@ function hasSelectionCapabilities(elem) {
4457
4453
  }
4458
4454
 
4459
4455
  function getSelectionInformation() {
4460
- var focusedElem = getActiveElement_1$1();
4456
+ var focusedElem = getActiveElement_1();
4461
4457
  return {
4462
4458
  focusedElem: focusedElem,
4463
4459
  selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection$1(focusedElem) : null
@@ -4470,7 +4466,7 @@ function getSelectionInformation() {
4470
4466
  * nodes and place them back in, resulting in focus being lost.
4471
4467
  */
4472
4468
  function restoreSelection(priorSelectionInformation) {
4473
- var curFocusedElem = getActiveElement_1$1();
4469
+ var curFocusedElem = getActiveElement_1();
4474
4470
  var priorFocusedElem = priorSelectionInformation.focusedElem;
4475
4471
  var priorSelectionRange = priorSelectionInformation.selectionRange;
4476
4472
  if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
@@ -4491,7 +4487,7 @@ function restoreSelection(priorSelectionInformation) {
4491
4487
  }
4492
4488
  }
4493
4489
 
4494
- focusNode_1$1(priorFocusedElem);
4490
+ focusNode_1(priorFocusedElem);
4495
4491
 
4496
4492
  for (var i = 0; i < ancestors.length; i++) {
4497
4493
  var info = ancestors[i];
@@ -4600,13 +4596,13 @@ function constructSelectEvent(nativeEvent, nativeEventTarget) {
4600
4596
  // selection (this matches native `select` event behavior). In HTML5, select
4601
4597
  // fires only on input and textarea thus if there's no focused element we
4602
4598
  // won't dispatch.
4603
- if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement_1$1()) {
4599
+ if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement_1()) {
4604
4600
  return null;
4605
4601
  }
4606
4602
 
4607
4603
  // Only fire when selection has actually changed.
4608
4604
  var currentSelection = getSelection(activeElement$1);
4609
- if (!lastSelection || !shallowEqual_1$1(lastSelection, currentSelection)) {
4605
+ if (!lastSelection || !shallowEqual_1(lastSelection, currentSelection)) {
4610
4606
  lastSelection = currentSelection;
4611
4607
 
4612
4608
  var syntheticEvent = SyntheticEvent$1.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);
@@ -5181,7 +5177,7 @@ var SimpleEventPlugin = {
5181
5177
  default:
5182
5178
  {
5183
5179
  if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) {
5184
- warning_1$1(false, 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);
5180
+ warning_1(false, 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);
5185
5181
  }
5186
5182
  }
5187
5183
  // HTML Events
@@ -5217,8 +5213,6 @@ injection$1.injectEventPluginsByName({
5217
5213
 
5218
5214
  var enableAsyncSubtreeAPI = true;
5219
5215
  var enableAsyncSchedulingByDefaultInReactDOM = false;
5220
- // Exports React.Fragment
5221
- var enableReactFragment = false;
5222
5216
  // Exports ReactDOM.createRoot
5223
5217
  var enableCreateRoot = false;
5224
5218
  var enableUserTimingAPI = true;
@@ -5230,6 +5224,9 @@ var enableNoopReconciler = false;
5230
5224
  // Experimental persistent mode (CS):
5231
5225
  var enablePersistentReconciler = false;
5232
5226
 
5227
+ // Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
5228
+ var debugRenderPhaseSideEffects = false;
5229
+
5233
5230
  // Only used in www builds.
5234
5231
 
5235
5232
  /**
@@ -5273,8 +5270,8 @@ var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
5273
5270
 
5274
5271
 
5275
5272
  {
5276
- var invariant$2 = invariant_1$1;
5277
- var warning$2 = warning_1$1;
5273
+ var invariant$2 = invariant_1;
5274
+ var warning$2 = warning_1;
5278
5275
  var ReactPropTypesSecret = ReactPropTypesSecret_1;
5279
5276
  var loggedTypeFailures = {};
5280
5277
  }
@@ -5321,7 +5318,7 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
5321
5318
  }
5322
5319
  }
5323
5320
 
5324
- var checkPropTypes_1$1 = checkPropTypes;
5321
+ var checkPropTypes_1 = checkPropTypes;
5325
5322
 
5326
5323
  var valueStack = [];
5327
5324
 
@@ -5342,14 +5339,14 @@ function createCursor(defaultValue) {
5342
5339
  function pop(cursor, fiber) {
5343
5340
  if (index < 0) {
5344
5341
  {
5345
- warning_1$1(false, 'Unexpected pop.');
5342
+ warning_1(false, 'Unexpected pop.');
5346
5343
  }
5347
5344
  return;
5348
5345
  }
5349
5346
 
5350
5347
  {
5351
5348
  if (fiber !== fiberStack[index]) {
5352
- warning_1$1(false, 'Unexpected Fiber popped.');
5349
+ warning_1(false, 'Unexpected Fiber popped.');
5353
5350
  }
5354
5351
  }
5355
5352
 
@@ -5930,7 +5927,7 @@ function getMaskedContext(workInProgress, unmaskedContext) {
5930
5927
 
5931
5928
  {
5932
5929
  var name = getComponentName(workInProgress) || 'Unknown';
5933
- checkPropTypes_1$1(contextTypes, context, 'context', name, ReactDebugCurrentFiber.getCurrentFiberStackAddendum);
5930
+ checkPropTypes_1(contextTypes, context, 'context', name, ReactDebugCurrentFiber.getCurrentFiberStackAddendum);
5934
5931
  }
5935
5932
 
5936
5933
  // Cache unmasked context so we can avoid recreating masked context unless necessary.
@@ -5969,7 +5966,7 @@ function popTopLevelContextObject(fiber) {
5969
5966
  }
5970
5967
 
5971
5968
  function pushTopLevelContextObject(fiber, context, didChange) {
5972
- !(contextStackCursor.cursor == null) ? invariant_1$1(false, 'Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.') : void 0;
5969
+ !(contextStackCursor.cursor == null) ? invariant_1(false, 'Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.') : void 0;
5973
5970
 
5974
5971
  push(contextStackCursor, context, fiber);
5975
5972
  push(didPerformWorkStackCursor, didChange, fiber);
@@ -5987,7 +5984,7 @@ function processChildContext(fiber, parentContext) {
5987
5984
 
5988
5985
  if (!warnedAboutMissingGetChildContext[componentName]) {
5989
5986
  warnedAboutMissingGetChildContext[componentName] = true;
5990
- warning_1$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);
5987
+ 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);
5991
5988
  }
5992
5989
  }
5993
5990
  return parentContext;
@@ -6004,11 +6001,11 @@ function processChildContext(fiber, parentContext) {
6004
6001
  ReactDebugCurrentFiber.setCurrentPhase(null);
6005
6002
  }
6006
6003
  for (var contextKey in childContext) {
6007
- !(contextKey in childContextTypes) ? invariant_1$1(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', getComponentName(fiber) || 'Unknown', contextKey) : void 0;
6004
+ !(contextKey in childContextTypes) ? invariant_1(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', getComponentName(fiber) || 'Unknown', contextKey) : void 0;
6008
6005
  }
6009
6006
  {
6010
6007
  var name = getComponentName(fiber) || 'Unknown';
6011
- checkPropTypes_1$1(childContextTypes, childContext, 'child context', name,
6008
+ checkPropTypes_1(childContextTypes, childContext, 'child context', name,
6012
6009
  // In practice, there is one case in which we won't get a stack. It's when
6013
6010
  // somebody calls unstable_renderSubtreeIntoContainer() and we process
6014
6011
  // context from the parent component instance. The stack will be missing
@@ -6042,7 +6039,7 @@ function pushContextProvider(workInProgress) {
6042
6039
 
6043
6040
  function invalidateContextProvider(workInProgress, didChange) {
6044
6041
  var instance = workInProgress.stateNode;
6045
- !instance ? invariant_1$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;
6042
+ !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;
6046
6043
 
6047
6044
  if (didChange) {
6048
6045
  // Merge parent and own context.
@@ -6073,7 +6070,7 @@ function resetContext() {
6073
6070
  function findCurrentUnmaskedContext(fiber) {
6074
6071
  // Currently this is only used with renderSubtreeIntoContainer; not sure if it
6075
6072
  // makes sense elsewhere
6076
- !(isFiberMounted(fiber) && fiber.tag === ClassComponent) ? invariant_1$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;
6073
+ !(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;
6077
6074
 
6078
6075
  var node = fiber;
6079
6076
  while (node.tag !== HostRoot) {
@@ -6081,7 +6078,7 @@ function findCurrentUnmaskedContext(fiber) {
6081
6078
  return node.stateNode.__reactInternalMemoizedMergedChildContext;
6082
6079
  }
6083
6080
  var parent = node['return'];
6084
- !parent ? invariant_1$1(false, 'Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.') : void 0;
6081
+ !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;
6085
6082
  node = parent;
6086
6083
  }
6087
6084
  return node.stateNode.context;
@@ -6101,6 +6098,10 @@ function msToExpirationTime(ms) {
6101
6098
  return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;
6102
6099
  }
6103
6100
 
6101
+ function expirationTimeToMs(expirationTime) {
6102
+ return (expirationTime - MAGIC_NUMBER_OFFSET) * UNIT_SIZE;
6103
+ }
6104
+
6104
6105
  function ceiling(num, precision) {
6105
6106
  return ((num / precision | 0) + 1) * precision;
6106
6107
  }
@@ -6117,8 +6118,7 @@ var AsyncUpdates = 1;
6117
6118
  try {
6118
6119
  var nonExtensibleObject = Object.preventExtensions({});
6119
6120
  /* eslint-disable no-new */
6120
- new Map([[nonExtensibleObject, null]]);
6121
- new Set([nonExtensibleObject]);
6121
+
6122
6122
  /* eslint-enable no-new */
6123
6123
  } catch (e) {
6124
6124
  // TODO: Consider warning about bad polyfills
@@ -6292,7 +6292,7 @@ function createFiberFromElement(element, internalContextTag, expirationTime) {
6292
6292
  info += '\n\nCheck the render method of `' + ownerName + '`.';
6293
6293
  }
6294
6294
  }
6295
- invariant_1$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);
6295
+ 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);
6296
6296
  }
6297
6297
 
6298
6298
  {
@@ -6382,7 +6382,7 @@ function catchErrors(fn) {
6382
6382
  } catch (err) {
6383
6383
  if (true && !hasLoggedError) {
6384
6384
  hasLoggedError = true;
6385
- warning_1$1(false, 'React DevTools encountered an error: %s', err);
6385
+ warning_1(false, 'React DevTools encountered an error: %s', err);
6386
6386
  }
6387
6387
  }
6388
6388
  };
@@ -6402,7 +6402,7 @@ function injectInternals(internals) {
6402
6402
  }
6403
6403
  if (!hook.supportsFiber) {
6404
6404
  {
6405
- warning_1$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');
6405
+ 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');
6406
6406
  }
6407
6407
  // DevTools exists, even though it doesn't support Fiber.
6408
6408
  return true;
@@ -6419,7 +6419,7 @@ function injectInternals(internals) {
6419
6419
  } catch (err) {
6420
6420
  // Catch all errors because it is unsafe to throw during initialization.
6421
6421
  {
6422
- warning_1$1(false, 'React DevTools encountered an error: %s.', err);
6422
+ warning_1(false, 'React DevTools encountered an error: %s.', err);
6423
6423
  }
6424
6424
  }
6425
6425
  // DevTools exists
@@ -6514,7 +6514,7 @@ function insertUpdateIntoFiber(fiber, update) {
6514
6514
  // Warn if an update is scheduled from inside an updater function.
6515
6515
  {
6516
6516
  if ((queue1.isProcessing || queue2 !== null && queue2.isProcessing) && !didWarnUpdateInsideUpdate) {
6517
- warning_1$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.');
6517
+ 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.');
6518
6518
  didWarnUpdateInsideUpdate = true;
6519
6519
  }
6520
6520
  }
@@ -6555,6 +6555,12 @@ function getStateFromUpdate(update, instance, prevState, props) {
6555
6555
  var partialState = update.partialState;
6556
6556
  if (typeof partialState === 'function') {
6557
6557
  var updateFn = partialState;
6558
+
6559
+ // Invoke setState callback an extra time to help detect side-effects.
6560
+ if (debugRenderPhaseSideEffects) {
6561
+ updateFn.call(instance, prevState, props);
6562
+ }
6563
+
6558
6564
  return updateFn.call(instance, prevState, props);
6559
6565
  } else {
6560
6566
  return partialState;
@@ -6695,7 +6701,7 @@ function commitCallbacks(queue, context) {
6695
6701
  // This update might be processed again. Clear the callback so it's only
6696
6702
  // called once.
6697
6703
  update.callback = null;
6698
- !(typeof _callback === 'function') ? invariant_1$1(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0;
6704
+ !(typeof _callback === 'function') ? invariant_1(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0;
6699
6705
  _callback.call(context);
6700
6706
  }
6701
6707
  }
@@ -6707,7 +6713,7 @@ var isArray = Array.isArray;
6707
6713
  var didWarnAboutStateAssignmentForComponent = {};
6708
6714
 
6709
6715
  var warnOnInvalidCallback = function (callback, callerName) {
6710
- warning_1$1(callback === null || typeof callback === 'function', '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
6716
+ warning_1(callback === null || typeof callback === 'function', '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
6711
6717
  };
6712
6718
 
6713
6719
  // This is so gross but it's at least non-critical and can be removed if
@@ -6718,7 +6724,7 @@ var isArray = Array.isArray;
6718
6724
  Object.defineProperty(fakeInternalInstance, '_processChildContext', {
6719
6725
  enumerable: false,
6720
6726
  value: function () {
6721
- invariant_1$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).');
6727
+ 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).');
6722
6728
  }
6723
6729
  });
6724
6730
  Object.freeze(fakeInternalInstance);
@@ -6800,15 +6806,20 @@ var ReactFiberClassComponent = function (scheduleWork, computeExpirationForFiber
6800
6806
  var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, newContext);
6801
6807
  stopPhaseTimer();
6802
6808
 
6809
+ // Simulate an async bailout/interruption by invoking lifecycle twice.
6810
+ if (debugRenderPhaseSideEffects) {
6811
+ instance.shouldComponentUpdate(newProps, newState, newContext);
6812
+ }
6813
+
6803
6814
  {
6804
- warning_1$1(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(workInProgress) || 'Unknown');
6815
+ warning_1(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(workInProgress) || 'Unknown');
6805
6816
  }
6806
6817
 
6807
6818
  return shouldUpdate;
6808
6819
  }
6809
6820
 
6810
6821
  if (type.prototype && type.prototype.isPureReactComponent) {
6811
- return !shallowEqual_1$1(oldProps, newProps) || !shallowEqual_1$1(oldState, newState);
6822
+ return !shallowEqual_1(oldProps, newProps) || !shallowEqual_1(oldState, newState);
6812
6823
  }
6813
6824
 
6814
6825
  return true;
@@ -6823,43 +6834,43 @@ var ReactFiberClassComponent = function (scheduleWork, computeExpirationForFiber
6823
6834
 
6824
6835
  if (!renderPresent) {
6825
6836
  if (type.prototype && typeof type.prototype.render === 'function') {
6826
- warning_1$1(false, '%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
6837
+ warning_1(false, '%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
6827
6838
  } else {
6828
- warning_1$1(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
6839
+ warning_1(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
6829
6840
  }
6830
6841
  }
6831
6842
 
6832
6843
  var noGetInitialStateOnES6 = !instance.getInitialState || instance.getInitialState.isReactClassApproved || instance.state;
6833
- warning_1$1(noGetInitialStateOnES6, '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);
6844
+ warning_1(noGetInitialStateOnES6, '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);
6834
6845
  var noGetDefaultPropsOnES6 = !instance.getDefaultProps || instance.getDefaultProps.isReactClassApproved;
6835
- warning_1$1(noGetDefaultPropsOnES6, '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);
6846
+ warning_1(noGetDefaultPropsOnES6, '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);
6836
6847
  var noInstancePropTypes = !instance.propTypes;
6837
- warning_1$1(noInstancePropTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);
6848
+ warning_1(noInstancePropTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);
6838
6849
  var noInstanceContextTypes = !instance.contextTypes;
6839
- warning_1$1(noInstanceContextTypes, 'contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);
6850
+ warning_1(noInstanceContextTypes, 'contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);
6840
6851
  var noComponentShouldUpdate = typeof instance.componentShouldUpdate !== 'function';
6841
- warning_1$1(noComponentShouldUpdate, '%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);
6852
+ warning_1(noComponentShouldUpdate, '%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);
6842
6853
  if (type.prototype && type.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
6843
- warning_1$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');
6854
+ 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');
6844
6855
  }
6845
6856
  var noComponentDidUnmount = typeof instance.componentDidUnmount !== 'function';
6846
- warning_1$1(noComponentDidUnmount, '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);
6857
+ warning_1(noComponentDidUnmount, '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);
6847
6858
  var noComponentDidReceiveProps = typeof instance.componentDidReceiveProps !== 'function';
6848
- warning_1$1(noComponentDidReceiveProps, '%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);
6859
+ warning_1(noComponentDidReceiveProps, '%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);
6849
6860
  var noComponentWillRecieveProps = typeof instance.componentWillRecieveProps !== 'function';
6850
- warning_1$1(noComponentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);
6861
+ warning_1(noComponentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);
6851
6862
  var hasMutatedProps = instance.props !== workInProgress.pendingProps;
6852
- warning_1$1(instance.props === undefined || !hasMutatedProps, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name);
6863
+ warning_1(instance.props === undefined || !hasMutatedProps, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name);
6853
6864
  var noInstanceDefaultProps = !instance.defaultProps;
6854
- warning_1$1(noInstanceDefaultProps, '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);
6865
+ warning_1(noInstanceDefaultProps, '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);
6855
6866
  }
6856
6867
 
6857
6868
  var state = instance.state;
6858
6869
  if (state && (typeof state !== 'object' || isArray(state))) {
6859
- invariant_1$1(false, '%s.state: must be set to an object or null', getComponentName(workInProgress));
6870
+ warning_1(false, '%s.state: must be set to an object or null', getComponentName(workInProgress));
6860
6871
  }
6861
6872
  if (typeof instance.getChildContext === 'function') {
6862
- !(typeof workInProgress.type.childContextTypes === 'object') ? invariant_1$1(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', getComponentName(workInProgress)) : void 0;
6873
+ warning_1(typeof workInProgress.type.childContextTypes === 'object', '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(workInProgress));
6863
6874
  }
6864
6875
  }
6865
6876
 
@@ -6899,12 +6910,16 @@ var ReactFiberClassComponent = function (scheduleWork, computeExpirationForFiber
6899
6910
  startPhaseTimer(workInProgress, 'componentWillMount');
6900
6911
  var oldState = instance.state;
6901
6912
  instance.componentWillMount();
6902
-
6903
6913
  stopPhaseTimer();
6904
6914
 
6915
+ // Simulate an async bailout/interruption by invoking lifecycle twice.
6916
+ if (debugRenderPhaseSideEffects) {
6917
+ instance.componentWillMount();
6918
+ }
6919
+
6905
6920
  if (oldState !== instance.state) {
6906
6921
  {
6907
- warning_1$1(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress));
6922
+ warning_1(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress));
6908
6923
  }
6909
6924
  updater.enqueueReplaceState(instance, instance.state, null);
6910
6925
  }
@@ -6916,11 +6931,16 @@ var ReactFiberClassComponent = function (scheduleWork, computeExpirationForFiber
6916
6931
  instance.componentWillReceiveProps(newProps, newContext);
6917
6932
  stopPhaseTimer();
6918
6933
 
6934
+ // Simulate an async bailout/interruption by invoking lifecycle twice.
6935
+ if (debugRenderPhaseSideEffects) {
6936
+ instance.componentWillReceiveProps(newProps, newContext);
6937
+ }
6938
+
6919
6939
  if (instance.state !== oldState) {
6920
6940
  {
6921
6941
  var componentName = getComponentName(workInProgress) || 'Component';
6922
6942
  if (!didWarnAboutStateAssignmentForComponent[componentName]) {
6923
- warning_1$1(false, '%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
6943
+ warning_1(false, '%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
6924
6944
  didWarnAboutStateAssignmentForComponent[componentName] = true;
6925
6945
  }
6926
6946
  }
@@ -6940,7 +6960,7 @@ var ReactFiberClassComponent = function (scheduleWork, computeExpirationForFiber
6940
6960
  var state = instance.state || null;
6941
6961
 
6942
6962
  var props = workInProgress.pendingProps;
6943
- !props ? invariant_1$1(false, 'There must be pending props for an initial mount. This error is likely caused by a bug in React. Please file an issue.') : void 0;
6963
+ !props ? invariant_1(false, 'There must be pending props for an initial mount. This error is likely caused by a bug in React. Please file an issue.') : void 0;
6944
6964
 
6945
6965
  var unmaskedContext = getUnmaskedContext(workInProgress);
6946
6966
 
@@ -7083,7 +7103,7 @@ var ReactFiberClassComponent = function (scheduleWork, computeExpirationForFiber
7083
7103
  // If there aren't any new props, then we'll reuse the memoized props.
7084
7104
  // This could be from already completed work.
7085
7105
  newProps = oldProps;
7086
- !(newProps != null) ? invariant_1$1(false, 'There should always be pending or memoized props. This error is likely caused by a bug in React. Please file an issue.') : void 0;
7106
+ !(newProps != null) ? invariant_1(false, 'There should always be pending or memoized props. This error is likely caused by a bug in React. Please file an issue.') : void 0;
7087
7107
  }
7088
7108
  var oldContext = instance.context;
7089
7109
  var newUnmaskedContext = getUnmaskedContext(workInProgress);
@@ -7125,6 +7145,11 @@ var ReactFiberClassComponent = function (scheduleWork, computeExpirationForFiber
7125
7145
  startPhaseTimer(workInProgress, 'componentWillUpdate');
7126
7146
  instance.componentWillUpdate(newProps, newState, newContext);
7127
7147
  stopPhaseTimer();
7148
+
7149
+ // Simulate an async bailout/interruption by invoking lifecycle twice.
7150
+ if (debugRenderPhaseSideEffects) {
7151
+ instance.componentWillUpdate(newProps, newState, newContext);
7152
+ }
7128
7153
  }
7129
7154
  if (typeof instance.componentDidUpdate === 'function') {
7130
7155
  workInProgress.effectTag |= Update;
@@ -7162,23 +7187,28 @@ var ReactFiberClassComponent = function (scheduleWork, computeExpirationForFiber
7162
7187
  };
7163
7188
  };
7164
7189
 
7165
- // The Symbol used to tag the special React types. If there is no native Symbol
7190
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
7166
7191
  // nor polyfill, then a plain number is used for performance.
7167
- var REACT_PORTAL_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.portal') || 0xeaca;
7192
+ var hasSymbol = typeof Symbol === 'function' && Symbol['for'];
7168
7193
 
7169
- function createPortal$1(children, containerInfo,
7170
- // TODO: figure out the API for cross-renderer implementation.
7171
- implementation) {
7172
- var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
7194
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol['for']('react.element') : 0xeac7;
7195
+ var REACT_CALL_TYPE = hasSymbol ? Symbol['for']('react.call') : 0xeac8;
7196
+ var REACT_RETURN_TYPE = hasSymbol ? Symbol['for']('react.return') : 0xeac9;
7197
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol['for']('react.portal') : 0xeaca;
7198
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol['for']('react.fragment') : 0xeacb;
7173
7199
 
7174
- return {
7175
- // This tag allow us to uniquely identify this as a React Portal
7176
- $$typeof: REACT_PORTAL_TYPE,
7177
- key: key == null ? null : '' + key,
7178
- children: children,
7179
- containerInfo: containerInfo,
7180
- implementation: implementation
7181
- };
7200
+ var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
7201
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
7202
+
7203
+ function getIteratorFn(maybeIterable) {
7204
+ if (maybeIterable === null || typeof maybeIterable === 'undefined') {
7205
+ return null;
7206
+ }
7207
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
7208
+ if (typeof maybeIterator === 'function') {
7209
+ return maybeIterator;
7210
+ }
7211
+ return null;
7182
7212
  }
7183
7213
 
7184
7214
  var getCurrentFiberStackAddendum$1 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
@@ -7201,7 +7231,7 @@ var getCurrentFiberStackAddendum$1 = ReactDebugCurrentFiber.getCurrentFiberStack
7201
7231
  if (!child._store || child._store.validated || child.key != null) {
7202
7232
  return;
7203
7233
  }
7204
- !(typeof child._store === 'object') ? invariant_1$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;
7234
+ !(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;
7205
7235
  child._store.validated = true;
7206
7236
 
7207
7237
  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$1() || '');
@@ -7210,44 +7240,12 @@ var getCurrentFiberStackAddendum$1 = ReactDebugCurrentFiber.getCurrentFiberStack
7210
7240
  }
7211
7241
  ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
7212
7242
 
7213
- warning_1$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$1());
7243
+ 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$1());
7214
7244
  };
7215
7245
  }
7216
7246
 
7217
7247
  var isArray$1 = Array.isArray;
7218
7248
 
7219
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
7220
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
7221
-
7222
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
7223
- // nor polyfill, then a plain number is used for performance.
7224
- var REACT_ELEMENT_TYPE;
7225
- var REACT_CALL_TYPE;
7226
- var REACT_RETURN_TYPE;
7227
- var REACT_FRAGMENT_TYPE;
7228
- if (typeof Symbol === 'function' && Symbol['for']) {
7229
- REACT_ELEMENT_TYPE = Symbol['for']('react.element');
7230
- REACT_CALL_TYPE = Symbol['for']('react.call');
7231
- REACT_RETURN_TYPE = Symbol['for']('react.return');
7232
- REACT_FRAGMENT_TYPE = Symbol['for']('react.fragment');
7233
- } else {
7234
- REACT_ELEMENT_TYPE = 0xeac7;
7235
- REACT_CALL_TYPE = 0xeac8;
7236
- REACT_RETURN_TYPE = 0xeac9;
7237
- REACT_FRAGMENT_TYPE = 0xeacb;
7238
- }
7239
-
7240
- function getIteratorFn(maybeIterable) {
7241
- if (maybeIterable === null || typeof maybeIterable === 'undefined') {
7242
- return null;
7243
- }
7244
- var iteratorFn = ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
7245
- if (typeof iteratorFn === 'function') {
7246
- return iteratorFn;
7247
- }
7248
- return null;
7249
- }
7250
-
7251
7249
  function coerceRef(current, element) {
7252
7250
  var mixedRef = element.ref;
7253
7251
  if (mixedRef !== null && typeof mixedRef !== 'function') {
@@ -7256,10 +7254,10 @@ function coerceRef(current, element) {
7256
7254
  var inst = void 0;
7257
7255
  if (owner) {
7258
7256
  var ownerFiber = owner;
7259
- !(ownerFiber.tag === ClassComponent) ? invariant_1$1(false, 'Stateless function components cannot have refs.') : void 0;
7257
+ !(ownerFiber.tag === ClassComponent) ? invariant_1(false, 'Stateless function components cannot have refs.') : void 0;
7260
7258
  inst = ownerFiber.stateNode;
7261
7259
  }
7262
- !inst ? invariant_1$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;
7260
+ !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;
7263
7261
  var stringRef = '' + mixedRef;
7264
7262
  // Check if previous string ref matches new string ref
7265
7263
  if (current !== null && current.ref !== null && current.ref._stringRef === stringRef) {
@@ -7276,8 +7274,8 @@ function coerceRef(current, element) {
7276
7274
  ref._stringRef = stringRef;
7277
7275
  return ref;
7278
7276
  } else {
7279
- !(typeof mixedRef === 'string') ? invariant_1$1(false, 'Expected ref to be a function or a string.') : void 0;
7280
- !element._owner ? invariant_1$1(false, 'Element ref was specified as a string (%s) but no owner was set. You may have multiple copies of React loaded. (details: https://fb.me/react-refs-must-have-owner).', mixedRef) : void 0;
7277
+ !(typeof mixedRef === 'string') ? invariant_1(false, 'Expected ref to be a function or a string.') : void 0;
7278
+ !element._owner ? invariant_1(false, 'Element ref was specified as a string (%s) but no owner was set. You may have multiple copies of React loaded. (details: https://fb.me/react-refs-must-have-owner).', mixedRef) : void 0;
7281
7279
  }
7282
7280
  }
7283
7281
  return mixedRef;
@@ -7289,7 +7287,7 @@ function throwOnInvalidObjectType(returnFiber, newChild) {
7289
7287
  {
7290
7288
  addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + (getCurrentFiberStackAddendum$1() || '');
7291
7289
  }
7292
- invariant_1$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);
7290
+ 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);
7293
7291
  }
7294
7292
  }
7295
7293
 
@@ -7301,28 +7299,19 @@ function warnOnFunctionType() {
7301
7299
  }
7302
7300
  ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true;
7303
7301
 
7304
- warning_1$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$1() || '');
7302
+ 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$1() || '');
7305
7303
  }
7306
7304
 
7307
7305
  // This wrapper function exists because I expect to clone the code in each path
7308
7306
  // to be able to optimize each path individually by branching early. This needs
7309
7307
  // a compiler or we can do it manually. Helpers that don't need this branching
7310
7308
  // live outside of this function.
7311
- function ChildReconciler(shouldClone, shouldTrackSideEffects) {
7309
+ function ChildReconciler(shouldTrackSideEffects) {
7312
7310
  function deleteChild(returnFiber, childToDelete) {
7313
7311
  if (!shouldTrackSideEffects) {
7314
7312
  // Noop.
7315
7313
  return;
7316
7314
  }
7317
- if (!shouldClone) {
7318
- // When we're reconciling in place we have a work in progress copy. We
7319
- // actually want the current copy. If there is no current copy, then we
7320
- // don't need to track deletion side-effects.
7321
- if (childToDelete.alternate === null) {
7322
- return;
7323
- }
7324
- childToDelete = childToDelete.alternate;
7325
- }
7326
7315
  // Deletions are added in reversed order so we add it to the front.
7327
7316
  // At this point, the return fiber's effect list is empty except for
7328
7317
  // deletions, so we can just append the deletion to the list. The remaining
@@ -7375,22 +7364,10 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
7375
7364
  function useFiber(fiber, pendingProps, expirationTime) {
7376
7365
  // We currently set sibling to null and index to 0 here because it is easy
7377
7366
  // to forget to do before returning it. E.g. for the single child case.
7378
- if (shouldClone) {
7379
- var clone = createWorkInProgress(fiber, pendingProps, expirationTime);
7380
- clone.index = 0;
7381
- clone.sibling = null;
7382
- return clone;
7383
- } else {
7384
- // We override the expiration time even if it is earlier, because if
7385
- // we're reconciling at a later time that means that this was
7386
- // down-prioritized.
7387
- fiber.expirationTime = expirationTime;
7388
- fiber.effectTag = NoEffect;
7389
- fiber.index = 0;
7390
- fiber.sibling = null;
7391
- fiber.pendingProps = pendingProps;
7392
- return fiber;
7393
- }
7367
+ var clone = createWorkInProgress(fiber, pendingProps, expirationTime);
7368
+ clone.index = 0;
7369
+ clone.sibling = null;
7370
+ return clone;
7394
7371
  }
7395
7372
 
7396
7373
  function placeChild(newFiber, lastPlacedIndex, newIndex) {
@@ -7749,7 +7726,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
7749
7726
  knownKeys.add(key);
7750
7727
  break;
7751
7728
  }
7752
- warning_1$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$1());
7729
+ 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$1());
7753
7730
  break;
7754
7731
  default:
7755
7732
  break;
@@ -7902,14 +7879,14 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
7902
7879
  // but using the iterator instead.
7903
7880
 
7904
7881
  var iteratorFn = getIteratorFn(newChildrenIterable);
7905
- !(typeof iteratorFn === 'function') ? invariant_1$1(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;
7882
+ !(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;
7906
7883
 
7907
7884
  {
7908
7885
  // Warn about using Maps as children
7909
7886
  if (typeof newChildrenIterable.entries === 'function') {
7910
7887
  var possibleMap = newChildrenIterable;
7911
7888
  if (possibleMap.entries === iteratorFn) {
7912
- warning_1$1(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());
7889
+ warning_1(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());
7913
7890
  didWarnAboutMaps = true;
7914
7891
  }
7915
7892
  }
@@ -7928,7 +7905,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
7928
7905
  }
7929
7906
 
7930
7907
  var newChildren = iteratorFn.call(newChildrenIterable);
7931
- !(newChildren != null) ? invariant_1$1(false, 'An iterable object provided no iterator.') : void 0;
7908
+ !(newChildren != null) ? invariant_1(false, 'An iterable object provided no iterator.') : void 0;
7932
7909
 
7933
7910
  var resultingFirstChild = null;
7934
7911
  var previousNewFiber = null;
@@ -8187,7 +8164,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
8187
8164
  // Handle top level unkeyed fragments as if they were arrays.
8188
8165
  // This leads to an ambiguity between <>{[...]}</> and <>...</>.
8189
8166
  // We treat the ambiguous cases above the same.
8190
- if (enableReactFragment && typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {
8167
+ if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {
8191
8168
  newChild = newChild.props.children;
8192
8169
  }
8193
8170
 
@@ -8250,7 +8227,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
8250
8227
  case FunctionalComponent:
8251
8228
  {
8252
8229
  var Component = returnFiber.type;
8253
- invariant_1$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');
8230
+ 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');
8254
8231
  }
8255
8232
  }
8256
8233
  }
@@ -8262,14 +8239,11 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
8262
8239
  return reconcileChildFibers;
8263
8240
  }
8264
8241
 
8265
- var reconcileChildFibers = ChildReconciler(true, true);
8266
-
8267
- var reconcileChildFibersInPlace = ChildReconciler(false, true);
8268
-
8269
- var mountChildFibersInPlace = ChildReconciler(false, false);
8242
+ var reconcileChildFibers = ChildReconciler(true);
8243
+ var mountChildFibers = ChildReconciler(false);
8270
8244
 
8271
8245
  function cloneChildFibers(current, workInProgress) {
8272
- !(current === null || workInProgress.child === current.child) ? invariant_1$1(false, 'Resuming work not yet implemented.') : void 0;
8246
+ !(current === null || workInProgress.child === current.child) ? invariant_1(false, 'Resuming work not yet implemented.') : void 0;
8273
8247
 
8274
8248
  if (workInProgress.child === null) {
8275
8249
  return;
@@ -8321,20 +8295,15 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
8321
8295
  // won't update its child set by applying minimal side-effects. Instead,
8322
8296
  // we will add them all to the child before it gets rendered. That means
8323
8297
  // we can optimize this reconciliation pass by not tracking side-effects.
8324
- workInProgress.child = mountChildFibersInPlace(workInProgress, workInProgress.child, nextChildren, renderExpirationTime);
8325
- } else if (current.child === workInProgress.child) {
8298
+ workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
8299
+ } else {
8326
8300
  // If the current child is the same as the work in progress, it means that
8327
8301
  // we haven't yet started any work on these children. Therefore, we use
8328
8302
  // the clone algorithm to create a copy of all the current children.
8329
8303
 
8330
8304
  // If we had any progressed work already, that is invalid at this point so
8331
8305
  // let's throw it out.
8332
- workInProgress.child = reconcileChildFibers(workInProgress, workInProgress.child, nextChildren, renderExpirationTime);
8333
- } else {
8334
- // If, on the other hand, it is already using a clone, that means we've
8335
- // already begun some work on this tree and we can continue where we left
8336
- // off by reconciling against the existing children.
8337
- workInProgress.child = reconcileChildFibersInPlace(workInProgress, workInProgress.child, nextChildren, renderExpirationTime);
8306
+ workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderExpirationTime);
8338
8307
  }
8339
8308
  }
8340
8309
 
@@ -8413,7 +8382,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
8413
8382
  mountClassInstance(workInProgress, renderExpirationTime);
8414
8383
  shouldUpdate = true;
8415
8384
  } else {
8416
- invariant_1$1(false, 'Resuming work not yet implemented.');
8385
+ invariant_1(false, 'Resuming work not yet implemented.');
8417
8386
  // In a resume, we'll already have an instance we can reuse.
8418
8387
  // shouldUpdate = resumeMountClassInstance(workInProgress, renderExpirationTime);
8419
8388
  }
@@ -8444,6 +8413,9 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
8444
8413
  {
8445
8414
  ReactDebugCurrentFiber.setCurrentPhase('render');
8446
8415
  nextChildren = instance.render();
8416
+ if (debugRenderPhaseSideEffects) {
8417
+ instance.render();
8418
+ }
8447
8419
  ReactDebugCurrentFiber.setCurrentPhase(null);
8448
8420
  }
8449
8421
  // React DevTools reads this flag.
@@ -8502,7 +8474,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
8502
8474
  // Ensure that children mount into this root without tracking
8503
8475
  // side-effects. This ensures that we don't store Placement effects on
8504
8476
  // nodes that will be hydrated.
8505
- workInProgress.child = mountChildFibersInPlace(workInProgress, workInProgress.child, element, renderExpirationTime);
8477
+ workInProgress.child = mountChildFibers(workInProgress, null, element, renderExpirationTime);
8506
8478
  } else {
8507
8479
  // Otherwise reset hydration state in case we aborted and resumed another
8508
8480
  // root.
@@ -8529,7 +8501,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
8529
8501
  var nextProps = workInProgress.pendingProps;
8530
8502
  if (nextProps === null) {
8531
8503
  nextProps = memoizedProps;
8532
- !(nextProps !== null) ? invariant_1$1(false, 'We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue.') : void 0;
8504
+ !(nextProps !== null) ? invariant_1(false, 'We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue.') : void 0;
8533
8505
  }
8534
8506
  var prevProps = current !== null ? current.memoizedProps : null;
8535
8507
 
@@ -8585,7 +8557,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
8585
8557
  }
8586
8558
 
8587
8559
  function mountIndeterminateComponent(current, workInProgress, renderExpirationTime) {
8588
- !(current === null) ? invariant_1$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;
8560
+ !(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;
8589
8561
  var fn = workInProgress.type;
8590
8562
  var props = workInProgress.pendingProps;
8591
8563
  var unmaskedContext = getUnmaskedContext(workInProgress);
@@ -8596,7 +8568,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
8596
8568
  {
8597
8569
  if (fn.prototype && typeof fn.prototype.render === 'function') {
8598
8570
  var componentName = getComponentName(workInProgress);
8599
- warning_1$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);
8571
+ 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);
8600
8572
  }
8601
8573
  ReactCurrentOwner.current = workInProgress;
8602
8574
  value = fn(props, context);
@@ -8622,7 +8594,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
8622
8594
  var Component = workInProgress.type;
8623
8595
 
8624
8596
  if (Component) {
8625
- warning_1$1(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component');
8597
+ warning_1(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component');
8626
8598
  }
8627
8599
  if (workInProgress.ref !== null) {
8628
8600
  var info = '';
@@ -8638,7 +8610,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
8638
8610
  }
8639
8611
  if (!warnedAboutStatelessRefs[warningKey]) {
8640
8612
  warnedAboutStatelessRefs[warningKey] = true;
8641
- warning_1$1(false, 'Stateless function components cannot be given refs. ' + 'Attempts to access this ref will fail.%s%s', info, ReactDebugCurrentFiber.getCurrentFiberStackAddendum());
8613
+ warning_1(false, 'Stateless function components cannot be given refs. ' + 'Attempts to access this ref will fail.%s%s', info, ReactDebugCurrentFiber.getCurrentFiberStackAddendum());
8642
8614
  }
8643
8615
  }
8644
8616
  }
@@ -8655,7 +8627,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
8655
8627
  // we don't do the bailout and we have to reuse existing props instead.
8656
8628
  if (nextCall === null) {
8657
8629
  nextCall = current && current.memoizedProps;
8658
- !(nextCall !== null) ? invariant_1$1(false, 'We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue.') : void 0;
8630
+ !(nextCall !== null) ? invariant_1(false, 'We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue.') : void 0;
8659
8631
  }
8660
8632
  } else if (nextCall === null || workInProgress.memoizedProps === nextCall) {
8661
8633
  nextCall = workInProgress.memoizedProps;
@@ -8669,11 +8641,9 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
8669
8641
  // The following is a fork of reconcileChildrenAtExpirationTime but using
8670
8642
  // stateNode to store the child.
8671
8643
  if (current === null) {
8672
- workInProgress.stateNode = mountChildFibersInPlace(workInProgress, workInProgress.stateNode, nextChildren, renderExpirationTime);
8673
- } else if (current.child === workInProgress.child) {
8674
- workInProgress.stateNode = reconcileChildFibers(workInProgress, workInProgress.stateNode, nextChildren, renderExpirationTime);
8644
+ workInProgress.stateNode = mountChildFibers(workInProgress, workInProgress.stateNode, nextChildren, renderExpirationTime);
8675
8645
  } else {
8676
- workInProgress.stateNode = reconcileChildFibersInPlace(workInProgress, workInProgress.stateNode, nextChildren, renderExpirationTime);
8646
+ workInProgress.stateNode = reconcileChildFibers(workInProgress, workInProgress.stateNode, nextChildren, renderExpirationTime);
8677
8647
  }
8678
8648
 
8679
8649
  memoizeProps(workInProgress, nextCall);
@@ -8690,7 +8660,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
8690
8660
  // we don't do the bailout and we have to reuse existing props instead.
8691
8661
  if (nextChildren === null) {
8692
8662
  nextChildren = current && current.memoizedProps;
8693
- !(nextChildren != null) ? invariant_1$1(false, 'We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue.') : void 0;
8663
+ !(nextChildren != null) ? invariant_1(false, 'We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue.') : void 0;
8694
8664
  }
8695
8665
  } else if (nextChildren === null || workInProgress.memoizedProps === nextChildren) {
8696
8666
  return bailoutOnAlreadyFinishedWork(current, workInProgress);
@@ -8702,7 +8672,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
8702
8672
  // flow doesn't do during mount. This doesn't happen at the root because
8703
8673
  // the root always starts with a "current" with a null child.
8704
8674
  // TODO: Consider unifying this with how the root works.
8705
- workInProgress.child = reconcileChildFibersInPlace(workInProgress, workInProgress.child, nextChildren, renderExpirationTime);
8675
+ workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
8706
8676
  memoizeProps(workInProgress, nextChildren);
8707
8677
  } else {
8708
8678
  reconcileChildren(current, workInProgress, nextChildren);
@@ -8816,7 +8786,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
8816
8786
  case Fragment:
8817
8787
  return updateFragment(current, workInProgress);
8818
8788
  default:
8819
- invariant_1$1(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');
8789
+ invariant_1(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');
8820
8790
  }
8821
8791
  }
8822
8792
 
@@ -8830,7 +8800,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
8830
8800
  pushHostRootContext(workInProgress);
8831
8801
  break;
8832
8802
  default:
8833
- invariant_1$1(false, 'Invalid type of work. This error is likely caused by a bug in React. Please file an issue.');
8803
+ invariant_1(false, 'Invalid type of work. This error is likely caused by a bug in React. Please file an issue.');
8834
8804
  }
8835
8805
 
8836
8806
  // Add an error effect so we can handle the error during the commit phase
@@ -8909,7 +8879,7 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
8909
8879
  }
8910
8880
  while (node !== null) {
8911
8881
  if (node.tag === HostComponent || node.tag === HostText || node.tag === HostPortal) {
8912
- invariant_1$1(false, 'A call cannot have host component children.');
8882
+ invariant_1(false, 'A call cannot have host component children.');
8913
8883
  } else if (node.tag === ReturnComponent) {
8914
8884
  returns.push(node.type);
8915
8885
  } else if (node.child !== null) {
@@ -8930,7 +8900,7 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
8930
8900
 
8931
8901
  function moveCallToHandlerPhase(current, workInProgress, renderExpirationTime) {
8932
8902
  var call = workInProgress.memoizedProps;
8933
- !call ? invariant_1$1(false, 'Should be resolved by now. This error is likely caused by a bug in React. Please file an issue.') : void 0;
8903
+ !call ? invariant_1(false, 'Should be resolved by now. This error is likely caused by a bug in React. Please file an issue.') : void 0;
8934
8904
 
8935
8905
  // First step of the call has completed. Now we need to do the second.
8936
8906
  // TODO: It would be nice to have a multi stage call represented by a
@@ -9009,7 +8979,7 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
9009
8979
  }
9010
8980
  };
9011
8981
  } else {
9012
- invariant_1$1(false, 'Mutating reconciler is disabled.');
8982
+ invariant_1(false, 'Mutating reconciler is disabled.');
9013
8983
  }
9014
8984
  } else if (persistence) {
9015
8985
  if (enablePersistentReconciler) {
@@ -9107,7 +9077,7 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
9107
9077
  }
9108
9078
  };
9109
9079
  } else {
9110
- invariant_1$1(false, 'Persistent reconciler is disabled.');
9080
+ invariant_1(false, 'Persistent reconciler is disabled.');
9111
9081
  }
9112
9082
  } else {
9113
9083
  if (enableNoopReconciler) {
@@ -9122,7 +9092,7 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
9122
9092
  // Noop
9123
9093
  };
9124
9094
  } else {
9125
- invariant_1$1(false, 'Noop reconciler is disabled.');
9095
+ invariant_1(false, 'Noop reconciler is disabled.');
9126
9096
  }
9127
9097
  }
9128
9098
 
@@ -9190,7 +9160,7 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
9190
9160
  }
9191
9161
  } else {
9192
9162
  if (!newProps) {
9193
- !(workInProgress.stateNode !== null) ? invariant_1$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;
9163
+ !(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;
9194
9164
  // This can happen when we abort work.
9195
9165
  return null;
9196
9166
  }
@@ -9240,7 +9210,7 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
9240
9210
  updateHostText(current, workInProgress, oldText, newText);
9241
9211
  } else {
9242
9212
  if (typeof newText !== 'string') {
9243
- !(workInProgress.stateNode !== null) ? invariant_1$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;
9213
+ !(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;
9244
9214
  // This can happen when we abort work.
9245
9215
  return null;
9246
9216
  }
@@ -9274,10 +9244,10 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
9274
9244
  return null;
9275
9245
  // Error cases
9276
9246
  case IndeterminateComponent:
9277
- invariant_1$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.');
9247
+ 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.');
9278
9248
  // eslint-disable-next-line no-fallthrough
9279
9249
  default:
9280
- invariant_1$1(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');
9250
+ invariant_1(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');
9281
9251
  }
9282
9252
  }
9283
9253
 
@@ -9394,7 +9364,7 @@ var ReactFiberCommitWork = function (config, captureError) {
9394
9364
  }
9395
9365
  default:
9396
9366
  {
9397
- invariant_1$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.');
9367
+ 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.');
9398
9368
  }
9399
9369
  }
9400
9370
  }
@@ -9548,7 +9518,7 @@ var ReactFiberCommitWork = function (config, captureError) {
9548
9518
  }
9549
9519
  default:
9550
9520
  {
9551
- invariant_1$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.');
9521
+ 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.');
9552
9522
  }
9553
9523
  }
9554
9524
  };
@@ -9575,9 +9545,9 @@ var ReactFiberCommitWork = function (config, captureError) {
9575
9545
  commitDetachRef: commitDetachRef
9576
9546
  };
9577
9547
  } else if (persistence) {
9578
- invariant_1$1(false, 'Persistent reconciler is disabled.');
9548
+ invariant_1(false, 'Persistent reconciler is disabled.');
9579
9549
  } else {
9580
- invariant_1$1(false, 'Noop reconciler is disabled.');
9550
+ invariant_1(false, 'Noop reconciler is disabled.');
9581
9551
  }
9582
9552
  }
9583
9553
  var commitMount = mutation.commitMount,
@@ -9600,7 +9570,7 @@ var ReactFiberCommitWork = function (config, captureError) {
9600
9570
  }
9601
9571
  parent = parent['return'];
9602
9572
  }
9603
- invariant_1$1(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.');
9573
+ invariant_1(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.');
9604
9574
  }
9605
9575
 
9606
9576
  function isHostParent(fiber) {
@@ -9667,7 +9637,7 @@ var ReactFiberCommitWork = function (config, captureError) {
9667
9637
  isContainer = true;
9668
9638
  break;
9669
9639
  default:
9670
- invariant_1$1(false, 'Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.');
9640
+ invariant_1(false, 'Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.');
9671
9641
  }
9672
9642
  if (parentFiber.effectTag & ContentReset) {
9673
9643
  // Reset the text content of the parent before doing any insertions
@@ -9732,7 +9702,7 @@ var ReactFiberCommitWork = function (config, captureError) {
9732
9702
  if (!currentParentIsValid) {
9733
9703
  var parent = node['return'];
9734
9704
  findParent: while (true) {
9735
- !(parent !== null) ? invariant_1$1(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.') : void 0;
9705
+ !(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;
9736
9706
  switch (parent.tag) {
9737
9707
  case HostComponent:
9738
9708
  currentParent = parent.stateNode;
@@ -9835,7 +9805,7 @@ var ReactFiberCommitWork = function (config, captureError) {
9835
9805
  }
9836
9806
  case HostText:
9837
9807
  {
9838
- !(finishedWork.stateNode !== null) ? invariant_1$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;
9808
+ !(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;
9839
9809
  var textInstance = finishedWork.stateNode;
9840
9810
  var newText = finishedWork.memoizedProps;
9841
9811
  // For hydration we reuse the update path but we treat the oldProps
@@ -9851,7 +9821,7 @@ var ReactFiberCommitWork = function (config, captureError) {
9851
9821
  }
9852
9822
  default:
9853
9823
  {
9854
- invariant_1$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.');
9824
+ 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.');
9855
9825
  }
9856
9826
  }
9857
9827
  }
@@ -9871,7 +9841,7 @@ var ReactFiberCommitWork = function (config, captureError) {
9871
9841
  commitDetachRef: commitDetachRef
9872
9842
  };
9873
9843
  } else {
9874
- invariant_1$1(false, 'Mutating reconciler is disabled.');
9844
+ invariant_1(false, 'Mutating reconciler is disabled.');
9875
9845
  }
9876
9846
  };
9877
9847
 
@@ -9887,7 +9857,7 @@ var ReactFiberHostContext = function (config) {
9887
9857
  var rootInstanceStackCursor = createCursor(NO_CONTEXT);
9888
9858
 
9889
9859
  function requiredContext(c) {
9890
- !(c !== NO_CONTEXT) ? invariant_1$1(false, 'Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.') : void 0;
9860
+ !(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;
9891
9861
  return c;
9892
9862
  }
9893
9863
 
@@ -9977,10 +9947,10 @@ var ReactFiberHydrationContext = function (config) {
9977
9947
  resetHydrationState: function () {},
9978
9948
  tryToClaimNextHydratableInstance: function () {},
9979
9949
  prepareToHydrateHostInstance: function () {
9980
- invariant_1$1(false, 'Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.');
9950
+ invariant_1(false, 'Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.');
9981
9951
  },
9982
9952
  prepareToHydrateHostTextInstance: function () {
9983
- invariant_1$1(false, 'Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.');
9953
+ invariant_1(false, 'Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.');
9984
9954
  },
9985
9955
  popHydrationState: function (fiber) {
9986
9956
  return false;
@@ -10283,6 +10253,12 @@ function logCapturedError(capturedError) {
10283
10253
  return;
10284
10254
  }
10285
10255
 
10256
+ var error = capturedError.error;
10257
+ var suppressLogging = error && error.suppressReactErrorLogging;
10258
+ if (suppressLogging) {
10259
+ return;
10260
+ }
10261
+
10286
10262
  {
10287
10263
  var componentName = capturedError.componentName,
10288
10264
  componentStack = capturedError.componentStack,
@@ -10329,7 +10305,7 @@ var clearCaughtError = ReactErrorUtils.clearCaughtError;
10329
10305
  if (didWarnStateUpdateForUnmountedComponent[componentName]) {
10330
10306
  return;
10331
10307
  }
10332
- warning_1$1(false, 'Can only update a mounted or mounting ' + 'component. This usually means you called setState, replaceState, ' + 'or forceUpdate on an unmounted component. This is a no-op.\n\nPlease ' + 'check the code for the %s component.', componentName);
10308
+ warning_1(false, 'Can only update a mounted or mounting ' + 'component. This usually means you called setState, replaceState, ' + 'or forceUpdate on an unmounted component. This is a no-op.\n\nPlease ' + 'check the code for the %s component.', componentName);
10333
10309
  didWarnStateUpdateForUnmountedComponent[componentName] = true;
10334
10310
  };
10335
10311
 
@@ -10339,14 +10315,14 @@ var clearCaughtError = ReactErrorUtils.clearCaughtError;
10339
10315
  if (didWarnSetStateChildContext) {
10340
10316
  return;
10341
10317
  }
10342
- warning_1$1(false, 'setState(...): Cannot call setState() inside getChildContext()');
10318
+ warning_1(false, 'setState(...): Cannot call setState() inside getChildContext()');
10343
10319
  didWarnSetStateChildContext = true;
10344
10320
  break;
10345
10321
  case 'render':
10346
10322
  if (didWarnAboutStateTransition) {
10347
10323
  return;
10348
10324
  }
10349
- warning_1$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`.');
10325
+ 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`.');
10350
10326
  didWarnAboutStateTransition = true;
10351
10327
  break;
10352
10328
  }
@@ -10378,6 +10354,7 @@ var ReactFiberScheduler = function (config) {
10378
10354
 
10379
10355
  var now = config.now,
10380
10356
  scheduleDeferredCallback = config.scheduleDeferredCallback,
10357
+ cancelDeferredCallback = config.cancelDeferredCallback,
10381
10358
  useSyncScheduling = config.useSyncScheduling,
10382
10359
  prepareForCommit = config.prepareForCommit,
10383
10360
  resetAfterCommit = config.resetAfterCommit;
@@ -10543,7 +10520,7 @@ var ReactFiberScheduler = function (config) {
10543
10520
  startCommitTimer();
10544
10521
 
10545
10522
  var root = finishedWork.stateNode;
10546
- !(root.current !== finishedWork) ? invariant_1$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;
10523
+ !(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;
10547
10524
  root.isReadyForCommit = false;
10548
10525
 
10549
10526
  // Reset this to null before calling lifecycles
@@ -10584,7 +10561,7 @@ var ReactFiberScheduler = function (config) {
10584
10561
  }
10585
10562
  }
10586
10563
  if (didError) {
10587
- !(nextEffect !== null) ? invariant_1$1(false, 'Should have next effect. This error is likely caused by a bug in React. Please file an issue.') : void 0;
10564
+ !(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;
10588
10565
  captureError(nextEffect, _error);
10589
10566
  // Clean-up
10590
10567
  if (nextEffect !== null) {
@@ -10619,7 +10596,7 @@ var ReactFiberScheduler = function (config) {
10619
10596
  }
10620
10597
  }
10621
10598
  if (_didError) {
10622
- !(nextEffect !== null) ? invariant_1$1(false, 'Should have next effect. This error is likely caused by a bug in React. Please file an issue.') : void 0;
10599
+ !(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;
10623
10600
  captureError(nextEffect, _error2);
10624
10601
  if (nextEffect !== null) {
10625
10602
  nextEffect = nextEffect.nextEffect;
@@ -10785,6 +10762,7 @@ var ReactFiberScheduler = function (config) {
10785
10762
  {
10786
10763
  ReactDebugCurrentFiber.setCurrentFiber(workInProgress);
10787
10764
  }
10765
+
10788
10766
  var next = beginWork(current, workInProgress, nextRenderExpirationTime);
10789
10767
  {
10790
10768
  ReactDebugCurrentFiber.resetCurrentFiber();
@@ -10905,7 +10883,7 @@ var ReactFiberScheduler = function (config) {
10905
10883
  }
10906
10884
 
10907
10885
  function renderRoot(root, expirationTime) {
10908
- !!isWorking ? invariant_1$1(false, 'renderRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;
10886
+ !!isWorking ? invariant_1(false, 'renderRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;
10909
10887
  isWorking = true;
10910
10888
 
10911
10889
  // We're about to mutate the work-in-progress tree. If the root was pending
@@ -10953,7 +10931,7 @@ var ReactFiberScheduler = function (config) {
10953
10931
  // "Capture" the error by finding the nearest boundary. If there is no
10954
10932
  // error boundary, we use the root.
10955
10933
  var boundary = captureError(failedWork, error);
10956
- !(boundary !== null) ? invariant_1$1(false, 'Should have found an error boundary. This error is likely caused by a bug in React. Please file an issue.') : void 0;
10934
+ !(boundary !== null) ? invariant_1(false, 'Should have found an error boundary. This error is likely caused by a bug in React. Please file an issue.') : void 0;
10957
10935
 
10958
10936
  if (didFatal) {
10959
10937
  // The error we just captured was a fatal error. This happens
@@ -11105,7 +11083,10 @@ var ReactFiberScheduler = function (config) {
11105
11083
  } catch (e) {
11106
11084
  // Prevent cycle if logCapturedError() throws.
11107
11085
  // A cycle may still occur if logCapturedError renders a component that throws.
11108
- console.error(e);
11086
+ var suppressLogging = e && e.suppressReactErrorLogging;
11087
+ if (!suppressLogging) {
11088
+ console.error(e);
11089
+ }
11109
11090
  }
11110
11091
 
11111
11092
  // If we're in the commit phase, defer scheduling an update on the
@@ -11156,7 +11137,7 @@ var ReactFiberScheduler = function (config) {
11156
11137
  }
11157
11138
  }
11158
11139
 
11159
- !(capturedError != null) ? invariant_1$1(false, 'No error for given unit of work. This error is likely caused by a bug in React. Please file an issue.') : void 0;
11140
+ !(capturedError != null) ? invariant_1(false, 'No error for given unit of work. This error is likely caused by a bug in React. Please file an issue.') : void 0;
11160
11141
 
11161
11142
  switch (effectfulFiber.tag) {
11162
11143
  case ClassComponent:
@@ -11176,7 +11157,7 @@ var ReactFiberScheduler = function (config) {
11176
11157
  }
11177
11158
  return;
11178
11159
  default:
11179
- invariant_1$1(false, 'Invalid type of work. This error is likely caused by a bug in React. Please file an issue.');
11160
+ invariant_1(false, 'Invalid type of work. This error is likely caused by a bug in React. Please file an issue.');
11180
11161
  }
11181
11162
  }
11182
11163
 
@@ -11250,6 +11231,19 @@ var ReactFiberScheduler = function (config) {
11250
11231
  return scheduleWorkImpl(fiber, expirationTime, false);
11251
11232
  }
11252
11233
 
11234
+ function checkRootNeedsClearing(root, fiber, expirationTime) {
11235
+ if (!isWorking && root === nextRoot && expirationTime < nextRenderExpirationTime) {
11236
+ // Restart the root from the top.
11237
+ if (nextUnitOfWork !== null) {
11238
+ // This is an interruption. (Used for performance tracking.)
11239
+ interruptedBy = fiber;
11240
+ }
11241
+ nextRoot = null;
11242
+ nextUnitOfWork = null;
11243
+ nextRenderExpirationTime = NoWork;
11244
+ }
11245
+ }
11246
+
11253
11247
  function scheduleWorkImpl(fiber, expirationTime, isErrorRecovery) {
11254
11248
  recordScheduleUpdate();
11255
11249
 
@@ -11275,17 +11269,10 @@ var ReactFiberScheduler = function (config) {
11275
11269
  if (node['return'] === null) {
11276
11270
  if (node.tag === HostRoot) {
11277
11271
  var root = node.stateNode;
11278
- if (!isWorking && root === nextRoot && expirationTime <= nextRenderExpirationTime) {
11279
- // Restart the root from the top.
11280
- if (nextUnitOfWork !== null) {
11281
- // This is an interruption. (Used for performance tracking.)
11282
- interruptedBy = fiber;
11283
- }
11284
- nextRoot = null;
11285
- nextUnitOfWork = null;
11286
- nextRenderExpirationTime = NoWork;
11287
- }
11272
+
11273
+ checkRootNeedsClearing(root, fiber, expirationTime);
11288
11274
  requestWork(root, expirationTime);
11275
+ checkRootNeedsClearing(root, fiber, expirationTime);
11289
11276
  } else {
11290
11277
  {
11291
11278
  if (!isErrorRecovery && fiber.tag === ClassComponent) {
@@ -11337,7 +11324,8 @@ var ReactFiberScheduler = function (config) {
11337
11324
  var firstScheduledRoot = null;
11338
11325
  var lastScheduledRoot = null;
11339
11326
 
11340
- var isCallbackScheduled = false;
11327
+ var callbackExpirationTime = NoWork;
11328
+ var callbackID = -1;
11341
11329
  var isRendering = false;
11342
11330
  var nextFlushedRoot = null;
11343
11331
  var nextFlushedExpirationTime = NoWork;
@@ -11355,11 +11343,36 @@ var ReactFiberScheduler = function (config) {
11355
11343
 
11356
11344
  var timeHeuristicForUnitOfWork = 1;
11357
11345
 
11346
+ function scheduleCallbackWithExpiration(expirationTime) {
11347
+ if (callbackExpirationTime !== NoWork) {
11348
+ // A callback is already scheduled. Check its expiration time (timeout).
11349
+ if (expirationTime > callbackExpirationTime) {
11350
+ // Existing callback has sufficient timeout. Exit.
11351
+ return;
11352
+ } else {
11353
+ // Existing callback has insufficient timeout. Cancel and schedule a
11354
+ // new one.
11355
+ cancelDeferredCallback(callbackID);
11356
+ }
11357
+ // The request callback timer is already running. Don't start a new one.
11358
+ } else {
11359
+ startRequestCallbackTimer();
11360
+ }
11361
+
11362
+ // Compute a timeout for the given expiration time.
11363
+ var currentMs = now() - startTime;
11364
+ var expirationMs = expirationTimeToMs(expirationTime);
11365
+ var timeout = expirationMs - currentMs;
11366
+
11367
+ callbackExpirationTime = expirationTime;
11368
+ callbackID = scheduleDeferredCallback(performAsyncWork, { timeout: timeout });
11369
+ }
11370
+
11358
11371
  // requestWork is called by the scheduler whenever a root receives an update.
11359
11372
  // It's up to the renderer to call renderRoot at some point in the future.
11360
11373
  function requestWork(root, expirationTime) {
11361
11374
  if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
11362
- invariant_1$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.');
11375
+ 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.');
11363
11376
  }
11364
11377
 
11365
11378
  // Add the root to the schedule.
@@ -11395,7 +11408,9 @@ var ReactFiberScheduler = function (config) {
11395
11408
  if (isUnbatchingUpdates) {
11396
11409
  // ...unless we're inside unbatchedUpdates, in which case we should
11397
11410
  // flush it now.
11398
- performWorkOnRoot(root, Sync);
11411
+ nextFlushedRoot = root;
11412
+ nextFlushedExpirationTime = Sync;
11413
+ performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);
11399
11414
  }
11400
11415
  return;
11401
11416
  }
@@ -11403,10 +11418,8 @@ var ReactFiberScheduler = function (config) {
11403
11418
  // TODO: Get rid of Sync and use current time?
11404
11419
  if (expirationTime === Sync) {
11405
11420
  performWork(Sync, null);
11406
- } else if (!isCallbackScheduled) {
11407
- isCallbackScheduled = true;
11408
- startRequestCallbackTimer();
11409
- scheduleDeferredCallback(performAsyncWork);
11421
+ } else {
11422
+ scheduleCallbackWithExpiration(expirationTime);
11410
11423
  }
11411
11424
  }
11412
11425
 
@@ -11425,7 +11438,7 @@ var ReactFiberScheduler = function (config) {
11425
11438
  // TODO: This check is redudant, but Flow is confused by the branch
11426
11439
  // below where we set lastScheduledRoot to null, even though we break
11427
11440
  // from the loop right after.
11428
- !(previousScheduledRoot !== null && lastScheduledRoot !== null) ? invariant_1$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;
11441
+ !(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;
11429
11442
  if (root === root.nextScheduledRoot) {
11430
11443
  // This is the only root in the list.
11431
11444
  root.nextScheduledRoot = null;
@@ -11503,13 +11516,12 @@ var ReactFiberScheduler = function (config) {
11503
11516
 
11504
11517
  // If we're inside a callback, set this to false since we just completed it.
11505
11518
  if (deadline !== null) {
11506
- isCallbackScheduled = false;
11519
+ callbackExpirationTime = NoWork;
11520
+ callbackID = -1;
11507
11521
  }
11508
11522
  // If there's work left over, schedule a new callback.
11509
- if (nextFlushedRoot !== null && !isCallbackScheduled) {
11510
- isCallbackScheduled = true;
11511
- startRequestCallbackTimer();
11512
- scheduleDeferredCallback(performAsyncWork);
11523
+ if (nextFlushedExpirationTime !== NoWork) {
11524
+ scheduleCallbackWithExpiration(nextFlushedExpirationTime);
11513
11525
  }
11514
11526
 
11515
11527
  // Clean-up.
@@ -11526,7 +11538,7 @@ var ReactFiberScheduler = function (config) {
11526
11538
  }
11527
11539
 
11528
11540
  function performWorkOnRoot(root, expirationTime) {
11529
- !!isRendering ? invariant_1$1(false, 'performWorkOnRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;
11541
+ !!isRendering ? invariant_1(false, 'performWorkOnRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;
11530
11542
 
11531
11543
  isRendering = true;
11532
11544
 
@@ -11582,6 +11594,8 @@ var ReactFiberScheduler = function (config) {
11582
11594
  return false;
11583
11595
  }
11584
11596
  if (deadline.timeRemaining() > timeHeuristicForUnitOfWork) {
11597
+ // Disregard deadline.didTimeout. Only expired work should be flushed
11598
+ // during a timeout. This path is only hit for non-expired work.
11585
11599
  return false;
11586
11600
  }
11587
11601
  deadlineDidExpire = true;
@@ -11591,7 +11605,7 @@ var ReactFiberScheduler = function (config) {
11591
11605
  // TODO: Not happy about this hook. Conceptually, renderRoot should return a
11592
11606
  // tuple of (isReadyForCommit, didError, error)
11593
11607
  function onUncaughtError(error) {
11594
- !(nextFlushedRoot !== null) ? invariant_1$1(false, 'Should be working on a root. This error is likely caused by a bug in React. Please file an issue.') : void 0;
11608
+ !(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;
11595
11609
  // Unschedule this root so we don't work on it again until there's
11596
11610
  // another update.
11597
11611
  nextFlushedRoot.remainingExpirationTime = NoWork;
@@ -11639,7 +11653,7 @@ var ReactFiberScheduler = function (config) {
11639
11653
  return syncUpdates(fn);
11640
11654
  } finally {
11641
11655
  isBatchingUpdates = previousIsBatchingUpdates;
11642
- !!isRendering ? invariant_1$1(false, 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.') : void 0;
11656
+ !!isRendering ? invariant_1(false, 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.') : void 0;
11643
11657
  performWork(Sync, null);
11644
11658
  }
11645
11659
  }
@@ -11689,13 +11703,13 @@ var ReactFiberReconciler$1 = function (config) {
11689
11703
  {
11690
11704
  if (ReactDebugCurrentFiber.phase === 'render' && ReactDebugCurrentFiber.current !== null && !didWarnAboutNestedUpdates) {
11691
11705
  didWarnAboutNestedUpdates = true;
11692
- warning_1$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');
11706
+ 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');
11693
11707
  }
11694
11708
  }
11695
11709
 
11696
11710
  callback = callback === undefined ? null : callback;
11697
11711
  {
11698
- warning_1$1(callback === null || typeof callback === 'function', 'render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);
11712
+ warning_1(callback === null || typeof callback === 'function', 'render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);
11699
11713
  }
11700
11714
 
11701
11715
  var expirationTime = void 0;
@@ -11824,9 +11838,24 @@ var ReactFiberReconciler$3 = ( ReactFiberReconciler$2 && ReactFiberReconciler$1
11824
11838
  // This is hacky but makes it work with both Rollup and Jest.
11825
11839
  var reactReconciler = ReactFiberReconciler$3['default'] ? ReactFiberReconciler$3['default'] : ReactFiberReconciler$3;
11826
11840
 
11841
+ function createPortal$1(children, containerInfo,
11842
+ // TODO: figure out the API for cross-renderer implementation.
11843
+ implementation) {
11844
+ var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
11845
+
11846
+ return {
11847
+ // This tag allow us to uniquely identify this as a React Portal
11848
+ $$typeof: REACT_PORTAL_TYPE,
11849
+ key: key == null ? null : '' + key,
11850
+ children: children,
11851
+ containerInfo: containerInfo,
11852
+ implementation: implementation
11853
+ };
11854
+ }
11855
+
11827
11856
  // TODO: this is special because it gets imported during build.
11828
11857
 
11829
- var ReactVersion = '16.1.2';
11858
+ var ReactVersion = '16.2.0';
11830
11859
 
11831
11860
  // a requestAnimationFrame, storing the time for the start of the frame, then
11832
11861
  // scheduling a postMessage which gets scheduled after paint. Within the
@@ -11837,7 +11866,7 @@ var ReactVersion = '16.1.2';
11837
11866
 
11838
11867
  {
11839
11868
  if (ExecutionEnvironment_1.canUseDOM && typeof requestAnimationFrame !== 'function') {
11840
- warning_1$1(false, 'React depends on requestAnimationFrame. Make sure that you load a ' + 'polyfill in older browsers. http://fb.me/react-polyfills');
11869
+ warning_1(false, 'React depends on requestAnimationFrame. Make sure that you load a ' + 'polyfill in older browsers. http://fb.me/react-polyfills');
11841
11870
  }
11842
11871
  }
11843
11872
 
@@ -11856,24 +11885,28 @@ if (hasNativePerformanceNow) {
11856
11885
 
11857
11886
  // TODO: There's no way to cancel, because Fiber doesn't atm.
11858
11887
  var rIC = void 0;
11888
+ var cIC = void 0;
11859
11889
 
11860
11890
  if (!ExecutionEnvironment_1.canUseDOM) {
11861
11891
  rIC = function (frameCallback) {
11862
- setTimeout(function () {
11892
+ return setTimeout(function () {
11863
11893
  frameCallback({
11864
11894
  timeRemaining: function () {
11865
11895
  return Infinity;
11866
11896
  }
11867
11897
  });
11868
11898
  });
11869
- return 0;
11870
11899
  };
11871
- } else if (typeof requestIdleCallback !== 'function') {
11872
- // Polyfill requestIdleCallback.
11900
+ cIC = function (timeoutID) {
11901
+ clearTimeout(timeoutID);
11902
+ };
11903
+ } else if (typeof requestIdleCallback !== 'function' || typeof cancelIdleCallback !== 'function') {
11904
+ // Polyfill requestIdleCallback and cancelIdleCallback
11873
11905
 
11874
11906
  var scheduledRICCallback = null;
11875
-
11876
11907
  var isIdleScheduled = false;
11908
+ var timeoutTime = -1;
11909
+
11877
11910
  var isAnimationFrameScheduled = false;
11878
11911
 
11879
11912
  var frameDeadline = 0;
@@ -11886,17 +11919,21 @@ if (!ExecutionEnvironment_1.canUseDOM) {
11886
11919
  var frameDeadlineObject;
11887
11920
  if (hasNativePerformanceNow) {
11888
11921
  frameDeadlineObject = {
11922
+ didTimeout: false,
11889
11923
  timeRemaining: function () {
11890
11924
  // We assume that if we have a performance timer that the rAF callback
11891
11925
  // gets a performance timer value. Not sure if this is always true.
11892
- return frameDeadline - performance.now();
11926
+ var remaining = frameDeadline - performance.now();
11927
+ return remaining > 0 ? remaining : 0;
11893
11928
  }
11894
11929
  };
11895
11930
  } else {
11896
11931
  frameDeadlineObject = {
11932
+ didTimeout: false,
11897
11933
  timeRemaining: function () {
11898
11934
  // Fallback to Date.now()
11899
- return frameDeadline - Date.now();
11935
+ var remaining = frameDeadline - Date.now();
11936
+ return remaining > 0 ? remaining : 0;
11900
11937
  }
11901
11938
  };
11902
11939
  }
@@ -11907,7 +11944,33 @@ if (!ExecutionEnvironment_1.canUseDOM) {
11907
11944
  if (event.source !== window || event.data !== messageKey) {
11908
11945
  return;
11909
11946
  }
11947
+
11910
11948
  isIdleScheduled = false;
11949
+
11950
+ var currentTime = now();
11951
+ if (frameDeadline - currentTime <= 0) {
11952
+ // There's no time left in this idle period. Check if the callback has
11953
+ // a timeout and whether it's been exceeded.
11954
+ if (timeoutTime !== -1 && timeoutTime <= currentTime) {
11955
+ // Exceeded the timeout. Invoke the callback even though there's no
11956
+ // time left.
11957
+ frameDeadlineObject.didTimeout = true;
11958
+ } else {
11959
+ // No timeout.
11960
+ if (!isAnimationFrameScheduled) {
11961
+ // Schedule another animation callback so we retry later.
11962
+ isAnimationFrameScheduled = true;
11963
+ requestAnimationFrame(animationTick);
11964
+ }
11965
+ // Exit without invoking the callback.
11966
+ return;
11967
+ }
11968
+ } else {
11969
+ // There's still time left in this idle period.
11970
+ frameDeadlineObject.didTimeout = false;
11971
+ }
11972
+
11973
+ timeoutTime = -1;
11911
11974
  var callback = scheduledRICCallback;
11912
11975
  scheduledRICCallback = null;
11913
11976
  if (callback !== null) {
@@ -11945,10 +12008,13 @@ if (!ExecutionEnvironment_1.canUseDOM) {
11945
12008
  }
11946
12009
  };
11947
12010
 
11948
- rIC = function (callback) {
12011
+ rIC = function (callback, options) {
11949
12012
  // This assumes that we only schedule one callback at a time because that's
11950
12013
  // how Fiber uses it.
11951
12014
  scheduledRICCallback = callback;
12015
+ if (options != null && typeof options.timeout === 'number') {
12016
+ timeoutTime = now() + options.timeout;
12017
+ }
11952
12018
  if (!isAnimationFrameScheduled) {
11953
12019
  // If rAF didn't already schedule one, we need to schedule a frame.
11954
12020
  // TODO: If this rAF doesn't materialize because the browser throttles, we
@@ -11959,8 +12025,15 @@ if (!ExecutionEnvironment_1.canUseDOM) {
11959
12025
  }
11960
12026
  return 0;
11961
12027
  };
12028
+
12029
+ cIC = function () {
12030
+ scheduledRICCallback = null;
12031
+ isIdleScheduled = false;
12032
+ timeoutTime = -1;
12033
+ };
11962
12034
  } else {
11963
- rIC = requestIdleCallback;
12035
+ rIC = window.requestIdleCallback;
12036
+ cIC = window.cancelIdleCallback;
11964
12037
  }
11965
12038
 
11966
12039
  /**
@@ -12034,7 +12107,7 @@ function isAttributeNameSafe(attributeName) {
12034
12107
  }
12035
12108
  illegalAttributeNameCache[attributeName] = true;
12036
12109
  {
12037
- warning_1$1(false, 'Invalid attribute name: `%s`', attributeName);
12110
+ warning_1(false, 'Invalid attribute name: `%s`', attributeName);
12038
12111
  }
12039
12112
  return false;
12040
12113
  }
@@ -12266,7 +12339,7 @@ var ReactControlledValuePropTypes = {
12266
12339
  * this outside of the ReactDOM controlled form components.
12267
12340
  */
12268
12341
  ReactControlledValuePropTypes.checkPropTypes = function (tagName, props, getStack) {
12269
- checkPropTypes_1$1(propTypes, props, 'prop', tagName, getStack);
12342
+ checkPropTypes_1(propTypes, props, 'prop', tagName, getStack);
12270
12343
  };
12271
12344
  }
12272
12345
 
@@ -12332,11 +12405,11 @@ function initWrapperState(element, props) {
12332
12405
  ReactControlledValuePropTypes.checkPropTypes('input', props, getCurrentFiberStackAddendum$3);
12333
12406
 
12334
12407
  if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
12335
- warning_1$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$2() || 'A component', props.type);
12408
+ 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$2() || 'A component', props.type);
12336
12409
  didWarnCheckedDefaultChecked = true;
12337
12410
  }
12338
12411
  if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
12339
- warning_1$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$2() || 'A component', props.type);
12412
+ 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$2() || 'A component', props.type);
12340
12413
  didWarnValueDefaultValue = true;
12341
12414
  }
12342
12415
  }
@@ -12350,25 +12423,30 @@ function initWrapperState(element, props) {
12350
12423
  };
12351
12424
  }
12352
12425
 
12426
+ function updateChecked(element, props) {
12427
+ var node = element;
12428
+ var checked = props.checked;
12429
+ if (checked != null) {
12430
+ setValueForProperty(node, 'checked', checked);
12431
+ }
12432
+ }
12433
+
12353
12434
  function updateWrapper(element, props) {
12354
12435
  var node = element;
12355
12436
  {
12356
12437
  var controlled = isControlled(props);
12357
12438
 
12358
12439
  if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
12359
- warning_1$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$3());
12440
+ 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$3());
12360
12441
  didWarnUncontrolledToControlled = true;
12361
12442
  }
12362
12443
  if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
12363
- warning_1$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$3());
12444
+ 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$3());
12364
12445
  didWarnControlledToUncontrolled = true;
12365
12446
  }
12366
12447
  }
12367
12448
 
12368
- var checked = props.checked;
12369
- if (checked != null) {
12370
- setValueForProperty(node, 'checked', checked || false);
12371
- }
12449
+ updateChecked(element, props);
12372
12450
 
12373
12451
  var value = props.value;
12374
12452
  if (value != null) {
@@ -12493,7 +12571,12 @@ function updateNamedCousins(rootNode, props) {
12493
12571
  // That's probably okay; we don't support it just as we don't support
12494
12572
  // mixing React radio buttons with non-React ones.
12495
12573
  var otherProps = getFiberCurrentPropsFromNode$1(otherNode);
12496
- !otherProps ? invariant_1$1(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : void 0;
12574
+ !otherProps ? invariant_1(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : void 0;
12575
+
12576
+ // We need update the tracked value on the named cousin since the value
12577
+ // was changed but the input saw no event or value set
12578
+ updateValueIfChanged(otherNode);
12579
+
12497
12580
  // If this is a controlled radio button group, forcing the input that
12498
12581
  // was previously checked to update will cause it to be come re-checked
12499
12582
  // as appropriate.
@@ -12528,7 +12611,7 @@ function flattenChildren(children) {
12528
12611
  function validateProps(element, props) {
12529
12612
  // TODO (yungsters): Remove support for `selected` in <option>.
12530
12613
  {
12531
- warning_1$1(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
12614
+ warning_1(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
12532
12615
  }
12533
12616
  }
12534
12617
 
@@ -12541,7 +12624,6 @@ function postMountWrapper$1(element, props) {
12541
12624
 
12542
12625
  function getHostProps$1(element, props) {
12543
12626
  var hostProps = _assign({ children: undefined }, props);
12544
-
12545
12627
  var content = flattenChildren(props.children);
12546
12628
 
12547
12629
  if (content) {
@@ -12583,9 +12665,9 @@ function checkSelectPropTypes(props) {
12583
12665
  }
12584
12666
  var isArray = Array.isArray(props[propName]);
12585
12667
  if (props.multiple && !isArray) {
12586
- warning_1$1(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
12668
+ warning_1(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
12587
12669
  } else if (!props.multiple && isArray) {
12588
- warning_1$1(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
12670
+ warning_1(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
12589
12671
  }
12590
12672
  }
12591
12673
  }
@@ -12668,7 +12750,7 @@ function initWrapperState$1(element, props) {
12668
12750
 
12669
12751
  {
12670
12752
  if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {
12671
- warning_1$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');
12753
+ 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');
12672
12754
  didWarnValueDefaultValue$1 = true;
12673
12755
  }
12674
12756
  }
@@ -12740,7 +12822,7 @@ var didWarnValDefaultVal = false;
12740
12822
 
12741
12823
  function getHostProps$3(element, props) {
12742
12824
  var node = element;
12743
- !(props.dangerouslySetInnerHTML == null) ? invariant_1$1(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : void 0;
12825
+ !(props.dangerouslySetInnerHTML == null) ? invariant_1(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : void 0;
12744
12826
 
12745
12827
  // Always set children to the same thing. In IE9, the selection range will
12746
12828
  // get reset if `textContent` is mutated. We could add a check in setTextContent
@@ -12762,26 +12844,25 @@ function initWrapperState$2(element, props) {
12762
12844
  {
12763
12845
  ReactControlledValuePropTypes.checkPropTypes('textarea', props, getCurrentFiberStackAddendum$5);
12764
12846
  if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
12765
- warning_1$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');
12847
+ 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');
12766
12848
  didWarnValDefaultVal = true;
12767
12849
  }
12768
12850
  }
12769
12851
 
12770
- var value = props.value;
12771
- var initialValue = value;
12852
+ var initialValue = props.value;
12772
12853
 
12773
12854
  // Only bother fetching default value if we're going to use it
12774
- if (value == null) {
12855
+ if (initialValue == null) {
12775
12856
  var defaultValue = props.defaultValue;
12776
12857
  // TODO (yungsters): Remove support for children content in <textarea>.
12777
12858
  var children = props.children;
12778
12859
  if (children != null) {
12779
12860
  {
12780
- warning_1$1(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
12861
+ warning_1(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
12781
12862
  }
12782
- !(defaultValue == null) ? invariant_1$1(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : void 0;
12863
+ !(defaultValue == null) ? invariant_1(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : void 0;
12783
12864
  if (Array.isArray(children)) {
12784
- !(children.length <= 1) ? invariant_1$1(false, '<textarea> can only have at most one child.') : void 0;
12865
+ !(children.length <= 1) ? invariant_1(false, '<textarea> can only have at most one child.') : void 0;
12785
12866
  children = children[0];
12786
12867
  }
12787
12868
 
@@ -12921,89 +13002,6 @@ var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
12921
13002
  }
12922
13003
  });
12923
13004
 
12924
- // code copied and modified from escape-html
12925
- /**
12926
- * Module variables.
12927
- * @private
12928
- */
12929
-
12930
- var matchHtmlRegExp = /["'&<>]/;
12931
-
12932
- /**
12933
- * Escape special characters in the given string of html.
12934
- *
12935
- * @param {string} string The string to escape for inserting into HTML
12936
- * @return {string}
12937
- * @public
12938
- */
12939
-
12940
- function escapeHtml(string) {
12941
- var str = '' + string;
12942
- var match = matchHtmlRegExp.exec(str);
12943
-
12944
- if (!match) {
12945
- return str;
12946
- }
12947
-
12948
- var escape;
12949
- var html = '';
12950
- var index = 0;
12951
- var lastIndex = 0;
12952
-
12953
- for (index = match.index; index < str.length; index++) {
12954
- switch (str.charCodeAt(index)) {
12955
- case 34:
12956
- // "
12957
- escape = '&quot;';
12958
- break;
12959
- case 38:
12960
- // &
12961
- escape = '&amp;';
12962
- break;
12963
- case 39:
12964
- // '
12965
- escape = '&#x27;'; // modified from escape-html; used to be '&#39'
12966
- break;
12967
- case 60:
12968
- // <
12969
- escape = '&lt;';
12970
- break;
12971
- case 62:
12972
- // >
12973
- escape = '&gt;';
12974
- break;
12975
- default:
12976
- continue;
12977
- }
12978
-
12979
- if (lastIndex !== index) {
12980
- html += str.substring(lastIndex, index);
12981
- }
12982
-
12983
- lastIndex = index + 1;
12984
- html += escape;
12985
- }
12986
-
12987
- return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
12988
- }
12989
- // end code copied and modified from escape-html
12990
-
12991
- /**
12992
- * Escapes text to prevent scripting attacks.
12993
- *
12994
- * @param {*} text Text value to escape.
12995
- * @return {string} An escaped string.
12996
- */
12997
- function escapeTextContentForBrowser(text) {
12998
- if (typeof text === 'boolean' || typeof text === 'number') {
12999
- // this shortcircuit helps perf for types that we know will never have
13000
- // special characters, especially given that this function is used often
13001
- // for numeric dom ids.
13002
- return '' + text;
13003
- }
13004
- return escapeHtml(text);
13005
- }
13006
-
13007
13005
  /**
13008
13006
  * Set the textContent property of a node, ensuring that whitespace is preserved
13009
13007
  * even in IE8. innerText is a poor substitute for textContent and, among many
@@ -13026,20 +13024,6 @@ var setTextContent = function (node, text) {
13026
13024
  node.textContent = text;
13027
13025
  };
13028
13026
 
13029
- if (ExecutionEnvironment_1.canUseDOM) {
13030
- if (!('textContent' in document.documentElement)) {
13031
- setTextContent = function (node, text) {
13032
- if (node.nodeType === TEXT_NODE) {
13033
- node.nodeValue = text;
13034
- return;
13035
- }
13036
- setInnerHTML(node, escapeTextContentForBrowser(text));
13037
- };
13038
- }
13039
- }
13040
-
13041
- var setTextContent$1 = setTextContent;
13042
-
13043
13027
  /**
13044
13028
  * CSS properties which accept numbers but are not in units of "px".
13045
13029
  */
@@ -13209,7 +13193,7 @@ function hyphenateStyleName(string) {
13209
13193
  return hyphenate_1(string).replace(msPattern, '-ms-');
13210
13194
  }
13211
13195
 
13212
- var hyphenateStyleName_1$1 = hyphenateStyleName;
13196
+ var hyphenateStyleName_1 = hyphenateStyleName;
13213
13197
 
13214
13198
  /**
13215
13199
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -13275,7 +13259,7 @@ function camelizeStyleName(string) {
13275
13259
  return camelize_1(string.replace(msPattern$1, 'ms-'));
13276
13260
  }
13277
13261
 
13278
- var camelizeStyleName_1$1 = camelizeStyleName;
13262
+ var camelizeStyleName_1 = camelizeStyleName;
13279
13263
 
13280
13264
  var warnValidStyle = emptyFunction_1;
13281
13265
 
@@ -13297,7 +13281,7 @@ var warnValidStyle = emptyFunction_1;
13297
13281
  }
13298
13282
 
13299
13283
  warnedStyleNames[name] = true;
13300
- warning_1$1(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName_1$1(name), getStack());
13284
+ warning_1(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName_1(name), getStack());
13301
13285
  };
13302
13286
 
13303
13287
  var warnBadVendoredStyleName = function (name, getStack) {
@@ -13306,7 +13290,7 @@ var warnValidStyle = emptyFunction_1;
13306
13290
  }
13307
13291
 
13308
13292
  warnedStyleNames[name] = true;
13309
- warning_1$1(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), getStack());
13293
+ warning_1(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), getStack());
13310
13294
  };
13311
13295
 
13312
13296
  var warnStyleValueWithSemicolon = function (name, value, getStack) {
@@ -13315,7 +13299,7 @@ var warnValidStyle = emptyFunction_1;
13315
13299
  }
13316
13300
 
13317
13301
  warnedStyleValues[value] = true;
13318
- warning_1$1(false, "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.%s', name, value.replace(badStyleValueWithSemicolonPattern, ''), getStack());
13302
+ warning_1(false, "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.%s', name, value.replace(badStyleValueWithSemicolonPattern, ''), getStack());
13319
13303
  };
13320
13304
 
13321
13305
  var warnStyleValueIsNaN = function (name, value, getStack) {
@@ -13324,7 +13308,7 @@ var warnValidStyle = emptyFunction_1;
13324
13308
  }
13325
13309
 
13326
13310
  warnedForNaNValue = true;
13327
- warning_1$1(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, getStack());
13311
+ warning_1(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, getStack());
13328
13312
  };
13329
13313
 
13330
13314
  var warnStyleValueIsInfinity = function (name, value, getStack) {
@@ -13333,7 +13317,7 @@ var warnValidStyle = emptyFunction_1;
13333
13317
  }
13334
13318
 
13335
13319
  warnedForInfinityValue = true;
13336
- warning_1$1(false, '`Infinity` is an invalid value for the `%s` css style property.%s', name, getStack());
13320
+ warning_1(false, '`Infinity` is an invalid value for the `%s` css style property.%s', name, getStack());
13337
13321
  };
13338
13322
 
13339
13323
  warnValidStyle = function (name, value, getStack) {
@@ -13378,7 +13362,7 @@ function createDangerousStringForStyles(styles) {
13378
13362
  var styleValue = styles[styleName];
13379
13363
  if (styleValue != null) {
13380
13364
  var isCustomProperty = styleName.indexOf('--') === 0;
13381
- serialized += delimiter + hyphenateStyleName_1$1(styleName) + ':';
13365
+ serialized += delimiter + hyphenateStyleName_1(styleName) + ':';
13382
13366
  serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
13383
13367
 
13384
13368
  delimiter = ';';
@@ -13455,16 +13439,16 @@ function assertValidProps(tag, props, getStack) {
13455
13439
  }
13456
13440
  // Note the use of `==` which checks for null or undefined.
13457
13441
  if (voidElementTags[tag]) {
13458
- !(props.children == null && props.dangerouslySetInnerHTML == null) ? invariant_1$1(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', tag, getStack()) : void 0;
13442
+ !(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;
13459
13443
  }
13460
13444
  if (props.dangerouslySetInnerHTML != null) {
13461
- !(props.children == null) ? invariant_1$1(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : void 0;
13462
- !(typeof props.dangerouslySetInnerHTML === 'object' && HTML$1 in props.dangerouslySetInnerHTML) ? invariant_1$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;
13445
+ !(props.children == null) ? invariant_1(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : void 0;
13446
+ !(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;
13463
13447
  }
13464
13448
  {
13465
- warning_1$1(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, '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());
13449
+ warning_1(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, '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());
13466
13450
  }
13467
- !(props.style == null || typeof props.style === 'object') ? invariant_1$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;
13451
+ !(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;
13468
13452
  }
13469
13453
 
13470
13454
  function isCustomComponent(tagName, props) {
@@ -13568,13 +13552,13 @@ function validateProperty(tagName, name) {
13568
13552
  // If this is an aria-* attribute, but is not listed in the known DOM
13569
13553
  // DOM properties, then it is an invalid aria-* attribute.
13570
13554
  if (correctName == null) {
13571
- warning_1$1(false, 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.%s', name, getStackAddendum());
13555
+ warning_1(false, 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.%s', name, getStackAddendum());
13572
13556
  warnedProperties[name] = true;
13573
13557
  return true;
13574
13558
  }
13575
13559
  // aria-* attributes should be lowercase; suggest the lowercase version.
13576
13560
  if (name !== correctName) {
13577
- warning_1$1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?%s', name, correctName, getStackAddendum());
13561
+ warning_1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?%s', name, correctName, getStackAddendum());
13578
13562
  warnedProperties[name] = true;
13579
13563
  return true;
13580
13564
  }
@@ -13592,7 +13576,7 @@ function validateProperty(tagName, name) {
13592
13576
  }
13593
13577
  // aria-* attributes should be lowercase; suggest the lowercase version.
13594
13578
  if (name !== standardName) {
13595
- warning_1$1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?%s', name, standardName, getStackAddendum());
13579
+ warning_1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?%s', name, standardName, getStackAddendum());
13596
13580
  warnedProperties[name] = true;
13597
13581
  return true;
13598
13582
  }
@@ -13616,9 +13600,9 @@ function warnInvalidARIAProps(type, props) {
13616
13600
  }).join(', ');
13617
13601
 
13618
13602
  if (invalidProps.length === 1) {
13619
- warning_1$1(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
13603
+ warning_1(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
13620
13604
  } else if (invalidProps.length > 1) {
13621
- warning_1$1(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
13605
+ warning_1(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
13622
13606
  }
13623
13607
  }
13624
13608
 
@@ -13644,9 +13628,9 @@ function validateProperties$1(type, props) {
13644
13628
  if (props != null && props.value === null && !didWarnValueNull) {
13645
13629
  didWarnValueNull = true;
13646
13630
  if (type === 'select' && props.multiple) {
13647
- warning_1$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());
13631
+ 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());
13648
13632
  } else {
13649
- warning_1$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());
13633
+ 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());
13650
13634
  }
13651
13635
  }
13652
13636
  }
@@ -14147,36 +14131,46 @@ function getStackAddendum$2() {
14147
14131
  {
14148
14132
  var warnedProperties$1 = {};
14149
14133
  var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
14150
- var EVENT_NAME_REGEX = /^on[A-Z]/;
14134
+ var EVENT_NAME_REGEX = /^on./;
14135
+ var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
14151
14136
  var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
14152
14137
  var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
14153
14138
 
14154
- var validateProperty$1 = function (tagName, name, value) {
14139
+ var validateProperty$1 = function (tagName, name, value, canUseEventSystem) {
14155
14140
  if (hasOwnProperty$2.call(warnedProperties$1, name) && warnedProperties$1[name]) {
14156
14141
  return true;
14157
14142
  }
14158
14143
 
14159
- if (registrationNameModules.hasOwnProperty(name)) {
14160
- return true;
14161
- }
14162
-
14163
- if (plugins.length === 0 && EVENT_NAME_REGEX.test(name)) {
14164
- // If no event plugins have been injected, we might be in a server environment.
14165
- // Don't check events in this case.
14166
- return true;
14167
- }
14168
-
14169
14144
  var lowerCasedName = name.toLowerCase();
14170
- var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
14171
-
14172
- if (registrationName != null) {
14173
- warning_1$1(false, 'Invalid event handler property `%s`. Did you mean `%s`?%s', name, registrationName, getStackAddendum$2());
14145
+ if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
14146
+ 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.');
14174
14147
  warnedProperties$1[name] = true;
14175
14148
  return true;
14176
14149
  }
14177
14150
 
14178
- if (lowerCasedName.indexOf('on') === 0 && lowerCasedName.length > 2) {
14179
- warning_1$1(false, 'Unknown event handler property `%s`. It will be ignored.%s', name, getStackAddendum$2());
14151
+ // We can't rely on the event system being injected on the server.
14152
+ if (canUseEventSystem) {
14153
+ if (registrationNameModules.hasOwnProperty(name)) {
14154
+ return true;
14155
+ }
14156
+ var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
14157
+ if (registrationName != null) {
14158
+ warning_1(false, 'Invalid event handler property `%s`. Did you mean `%s`?%s', name, registrationName, getStackAddendum$2());
14159
+ warnedProperties$1[name] = true;
14160
+ return true;
14161
+ }
14162
+ if (EVENT_NAME_REGEX.test(name)) {
14163
+ warning_1(false, 'Unknown event handler property `%s`. It will be ignored.%s', name, getStackAddendum$2());
14164
+ warnedProperties$1[name] = true;
14165
+ return true;
14166
+ }
14167
+ } else if (EVENT_NAME_REGEX.test(name)) {
14168
+ // If no event plugins have been injected, we are in a server environment.
14169
+ // So we can't tell if the event name is correct for sure, but we can filter
14170
+ // out known bad ones like `onclick`. We can't suggest a specific replacement though.
14171
+ if (INVALID_EVENT_NAME_REGEX.test(name)) {
14172
+ warning_1(false, 'Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.%s', name, getStackAddendum$2());
14173
+ }
14180
14174
  warnedProperties$1[name] = true;
14181
14175
  return true;
14182
14176
  }
@@ -14186,32 +14180,26 @@ function getStackAddendum$2() {
14186
14180
  return true;
14187
14181
  }
14188
14182
 
14189
- if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
14190
- warning_1$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.');
14191
- warnedProperties$1[name] = true;
14192
- return true;
14193
- }
14194
-
14195
14183
  if (lowerCasedName === 'innerhtml') {
14196
- warning_1$1(false, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
14184
+ warning_1(false, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
14197
14185
  warnedProperties$1[name] = true;
14198
14186
  return true;
14199
14187
  }
14200
14188
 
14201
14189
  if (lowerCasedName === 'aria') {
14202
- warning_1$1(false, 'The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
14190
+ warning_1(false, 'The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
14203
14191
  warnedProperties$1[name] = true;
14204
14192
  return true;
14205
14193
  }
14206
14194
 
14207
14195
  if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
14208
- warning_1$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());
14196
+ 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());
14209
14197
  warnedProperties$1[name] = true;
14210
14198
  return true;
14211
14199
  }
14212
14200
 
14213
14201
  if (typeof value === 'number' && isNaN(value)) {
14214
- warning_1$1(false, 'Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.%s', name, getStackAddendum$2());
14202
+ warning_1(false, 'Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.%s', name, getStackAddendum$2());
14215
14203
  warnedProperties$1[name] = true;
14216
14204
  return true;
14217
14205
  }
@@ -14222,23 +14210,23 @@ function getStackAddendum$2() {
14222
14210
  if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
14223
14211
  var standardName = possibleStandardNames[lowerCasedName];
14224
14212
  if (standardName !== name) {
14225
- warning_1$1(false, 'Invalid DOM property `%s`. Did you mean `%s`?%s', name, standardName, getStackAddendum$2());
14213
+ warning_1(false, 'Invalid DOM property `%s`. Did you mean `%s`?%s', name, standardName, getStackAddendum$2());
14226
14214
  warnedProperties$1[name] = true;
14227
14215
  return true;
14228
14216
  }
14229
14217
  } else if (!isReserved && name !== lowerCasedName) {
14230
14218
  // Unknown attributes should have lowercase casing since that's how they
14231
14219
  // will be cased anyway with server rendering.
14232
- warning_1$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());
14220
+ 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());
14233
14221
  warnedProperties$1[name] = true;
14234
14222
  return true;
14235
14223
  }
14236
14224
 
14237
14225
  if (typeof value === 'boolean' && !shouldAttributeAcceptBooleanValue(name)) {
14238
14226
  if (value) {
14239
- warning_1$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());
14227
+ 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());
14240
14228
  } else {
14241
- warning_1$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());
14229
+ 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());
14242
14230
  }
14243
14231
  warnedProperties$1[name] = true;
14244
14232
  return true;
@@ -14260,10 +14248,10 @@ function getStackAddendum$2() {
14260
14248
  };
14261
14249
  }
14262
14250
 
14263
- var warnUnknownProperties = function (type, props) {
14251
+ var warnUnknownProperties = function (type, props, canUseEventSystem) {
14264
14252
  var unknownProps = [];
14265
14253
  for (var key in props) {
14266
- var isValid = validateProperty$1(type, key, props[key]);
14254
+ var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);
14267
14255
  if (!isValid) {
14268
14256
  unknownProps.push(key);
14269
14257
  }
@@ -14273,17 +14261,17 @@ var warnUnknownProperties = function (type, props) {
14273
14261
  return '`' + prop + '`';
14274
14262
  }).join(', ');
14275
14263
  if (unknownProps.length === 1) {
14276
- warning_1$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());
14264
+ 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());
14277
14265
  } else if (unknownProps.length > 1) {
14278
- warning_1$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());
14266
+ 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());
14279
14267
  }
14280
14268
  };
14281
14269
 
14282
- function validateProperties$2(type, props) {
14270
+ function validateProperties$2(type, props, canUseEventSystem) {
14283
14271
  if (isCustomComponent(type, props)) {
14284
14272
  return;
14285
14273
  }
14286
- warnUnknownProperties(type, props);
14274
+ warnUnknownProperties(type, props, canUseEventSystem);
14287
14275
  }
14288
14276
 
14289
14277
  // TODO: direct imports like some-package/src/* are bad. Fix me.
@@ -14322,7 +14310,7 @@ var getStack = emptyFunction_1.thatReturns('');
14322
14310
  var validatePropertiesInDevelopment = function (type, props) {
14323
14311
  validateProperties(type, props);
14324
14312
  validateProperties$1(type, props);
14325
- validateProperties$2(type, props);
14313
+ validateProperties$2(type, props, /* canUseEventSystem */true);
14326
14314
  };
14327
14315
 
14328
14316
  // HTML parsing normalizes CR and CRLF to LF.
@@ -14348,7 +14336,7 @@ var getStack = emptyFunction_1.thatReturns('');
14348
14336
  return;
14349
14337
  }
14350
14338
  didWarnInvalidHydration = true;
14351
- warning_1$1(false, 'Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
14339
+ warning_1(false, 'Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
14352
14340
  };
14353
14341
 
14354
14342
  var warnForPropDifference = function (propName, serverValue, clientValue) {
@@ -14361,7 +14349,7 @@ var getStack = emptyFunction_1.thatReturns('');
14361
14349
  return;
14362
14350
  }
14363
14351
  didWarnInvalidHydration = true;
14364
- warning_1$1(false, 'Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
14352
+ warning_1(false, 'Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
14365
14353
  };
14366
14354
 
14367
14355
  var warnForExtraAttributes = function (attributeNames) {
@@ -14373,14 +14361,14 @@ var getStack = emptyFunction_1.thatReturns('');
14373
14361
  attributeNames.forEach(function (name) {
14374
14362
  names.push(name);
14375
14363
  });
14376
- warning_1$1(false, 'Extra attributes from the server: %s', names);
14364
+ warning_1(false, 'Extra attributes from the server: %s', names);
14377
14365
  };
14378
14366
 
14379
14367
  var warnForInvalidEventListener = function (registrationName, listener) {
14380
14368
  if (listener === false) {
14381
- warning_1$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());
14369
+ 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());
14382
14370
  } else {
14383
- warning_1$1(false, 'Expected `%s` listener to be a function, instead got a value of `%s` type.%s', registrationName, typeof listener, getCurrentFiberStackAddendum$2());
14371
+ warning_1(false, 'Expected `%s` listener to be a function, instead got a value of `%s` type.%s', registrationName, typeof listener, getCurrentFiberStackAddendum$2());
14384
14372
  }
14385
14373
  };
14386
14374
 
@@ -14477,10 +14465,10 @@ function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProp
14477
14465
  // https://github.com/facebook/react/issues/6731#issuecomment-254874553
14478
14466
  var canSetTextContent = tag !== 'textarea' || nextProp !== '';
14479
14467
  if (canSetTextContent) {
14480
- setTextContent$1(domElement, nextProp);
14468
+ setTextContent(domElement, nextProp);
14481
14469
  }
14482
14470
  } else if (typeof nextProp === 'number') {
14483
- setTextContent$1(domElement, '' + nextProp);
14471
+ setTextContent(domElement, '' + nextProp);
14484
14472
  }
14485
14473
  } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {
14486
14474
  // Noop
@@ -14515,7 +14503,7 @@ function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, i
14515
14503
  } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
14516
14504
  setInnerHTML(domElement, propValue);
14517
14505
  } else if (propKey === CHILDREN) {
14518
- setTextContent$1(domElement, propValue);
14506
+ setTextContent(domElement, propValue);
14519
14507
  } else if (isCustomComponentTag) {
14520
14508
  if (propValue != null) {
14521
14509
  setValueForAttribute(domElement, propKey, propValue);
@@ -14546,7 +14534,7 @@ function createElement$1(type, props, rootContainerElement, parentNamespace) {
14546
14534
  var isCustomComponentTag = isCustomComponent(type, props);
14547
14535
  // Should this check be gated by parent namespace? Not sure we want to
14548
14536
  // allow <SVG> or <mATH>.
14549
- warning_1$1(isCustomComponentTag || type === type.toLowerCase(), '<%s /> is using uppercase HTML. Always use lowercase HTML tags ' + 'in React.', type);
14537
+ warning_1(isCustomComponentTag || type === type.toLowerCase(), '<%s /> is using uppercase HTML. Always use lowercase HTML tags ' + 'in React.', type);
14550
14538
  }
14551
14539
 
14552
14540
  if (type === 'script') {
@@ -14574,7 +14562,7 @@ function createElement$1(type, props, rootContainerElement, parentNamespace) {
14574
14562
  if (namespaceURI === HTML_NAMESPACE) {
14575
14563
  if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) {
14576
14564
  warnedUnknownTags[type] = true;
14577
- warning_1$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);
14565
+ 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);
14578
14566
  }
14579
14567
  }
14580
14568
  }
@@ -14591,7 +14579,7 @@ function setInitialProperties$1(domElement, tag, rawProps, rootContainerElement)
14591
14579
  {
14592
14580
  validatePropertiesInDevelopment(tag, rawProps);
14593
14581
  if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) {
14594
- warning_1$1(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerName$1() || 'A component');
14582
+ warning_1(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerName$1() || 'A component');
14595
14583
  didWarnShadyDOM = true;
14596
14584
  }
14597
14585
  }
@@ -14864,6 +14852,13 @@ function diffProperties$1(domElement, tag, lastRawProps, nextRawProps, rootConta
14864
14852
 
14865
14853
  // Apply the diff.
14866
14854
  function updateProperties$1(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
14855
+ // Update checked *before* name.
14856
+ // In the middle of an update, it is possible to have multiple checked.
14857
+ // When a checked radio tries to change name, browser makes another radio's checked false.
14858
+ if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
14859
+ updateChecked(domElement, nextRawProps);
14860
+ }
14861
+
14867
14862
  var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
14868
14863
  var isCustomComponentTag = isCustomComponent(tag, nextRawProps);
14869
14864
  // Apply the diff.
@@ -14877,10 +14872,6 @@ function updateProperties$1(domElement, updatePayload, tag, lastRawProps, nextRa
14877
14872
  // happen after `updateDOMProperties`. Otherwise HTML5 input validations
14878
14873
  // raise warnings and prevent the new value from being assigned.
14879
14874
  updateWrapper(domElement, nextRawProps);
14880
-
14881
- // We also check that we haven't missed a value update, such as a
14882
- // Radio group shifting the checked value to another named radio input.
14883
- updateValueIfChanged(domElement);
14884
14875
  break;
14885
14876
  case 'textarea':
14886
14877
  updateWrapper$1(domElement, nextRawProps);
@@ -14899,7 +14890,7 @@ function diffHydratedProperties$1(domElement, tag, rawProps, parentNamespace, ro
14899
14890
  var isCustomComponentTag = isCustomComponent(tag, rawProps);
14900
14891
  validatePropertiesInDevelopment(tag, rawProps);
14901
14892
  if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) {
14902
- warning_1$1(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerName$1() || 'A component');
14893
+ warning_1(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerName$1() || 'A component');
14903
14894
  didWarnShadyDOM = true;
14904
14895
  }
14905
14896
  }
@@ -15143,7 +15134,7 @@ function warnForDeletedHydratableElement$1(parentNode, child) {
15143
15134
  return;
15144
15135
  }
15145
15136
  didWarnInvalidHydration = true;
15146
- warning_1$1(false, 'Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
15137
+ warning_1(false, 'Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
15147
15138
  }
15148
15139
  }
15149
15140
 
@@ -15153,7 +15144,7 @@ function warnForDeletedHydratableText$1(parentNode, child) {
15153
15144
  return;
15154
15145
  }
15155
15146
  didWarnInvalidHydration = true;
15156
- warning_1$1(false, 'Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
15147
+ warning_1(false, 'Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
15157
15148
  }
15158
15149
  }
15159
15150
 
@@ -15163,7 +15154,7 @@ function warnForInsertedHydratedElement$1(parentNode, tag, props) {
15163
15154
  return;
15164
15155
  }
15165
15156
  didWarnInvalidHydration = true;
15166
- warning_1$1(false, 'Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
15157
+ warning_1(false, 'Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
15167
15158
  }
15168
15159
  }
15169
15160
 
@@ -15180,7 +15171,7 @@ function warnForInsertedHydratedText$1(parentNode, text) {
15180
15171
  return;
15181
15172
  }
15182
15173
  didWarnInvalidHydration = true;
15183
- warning_1$1(false, 'Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
15174
+ warning_1(false, 'Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
15184
15175
  }
15185
15176
  }
15186
15177
 
@@ -15466,7 +15457,7 @@ var validateDOMNesting = emptyFunction_1;
15466
15457
  var parentTag = parentInfo && parentInfo.tag;
15467
15458
 
15468
15459
  if (childText != null) {
15469
- warning_1$1(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null');
15460
+ warning_1(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null');
15470
15461
  childTag = '#text';
15471
15462
  }
15472
15463
 
@@ -15504,9 +15495,9 @@ var validateDOMNesting = emptyFunction_1;
15504
15495
  if (ancestorTag === 'table' && childTag === 'tr') {
15505
15496
  info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
15506
15497
  }
15507
- warning_1$1(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info, addendum);
15498
+ warning_1(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info, addendum);
15508
15499
  } else {
15509
- warning_1$1(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.%s', tagDisplayName, ancestorTag, addendum);
15500
+ warning_1(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.%s', tagDisplayName, ancestorTag, addendum);
15510
15501
  }
15511
15502
  };
15512
15503
 
@@ -15545,7 +15536,7 @@ var updateFiberProps = updateFiberProps$1;
15545
15536
  {
15546
15537
  var SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';
15547
15538
  if (typeof Map !== 'function' || Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {
15548
- warning_1$1(false, 'React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. http://fb.me/react-polyfills');
15539
+ warning_1(false, 'React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. http://fb.me/react-polyfills');
15549
15540
  }
15550
15541
  }
15551
15542
 
@@ -15850,6 +15841,7 @@ var DOMRenderer = reactReconciler({
15850
15841
  },
15851
15842
 
15852
15843
  scheduleDeferredCallback: rIC,
15844
+ cancelDeferredCallback: cIC,
15853
15845
 
15854
15846
  useSyncScheduling: !enableAsyncSchedulingByDefaultInReactDOM
15855
15847
  });
@@ -15859,13 +15851,13 @@ injection$4.injectFiberBatchedUpdates(DOMRenderer.batchedUpdates);
15859
15851
  var warnedAboutHydrateAPI = false;
15860
15852
 
15861
15853
  function renderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {
15862
- !isValidContainer(container) ? invariant_1$1(false, 'Target container is not a DOM element.') : void 0;
15854
+ !isValidContainer(container) ? invariant_1(false, 'Target container is not a DOM element.') : void 0;
15863
15855
 
15864
15856
  {
15865
15857
  if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {
15866
15858
  var hostInstance = DOMRenderer.findHostInstanceWithNoPortals(container._reactRootContainer.current);
15867
15859
  if (hostInstance) {
15868
- warning_1$1(hostInstance.parentNode === container, '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.');
15860
+ warning_1(hostInstance.parentNode === container, '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.');
15869
15861
  }
15870
15862
  }
15871
15863
 
@@ -15873,9 +15865,9 @@ function renderSubtreeIntoContainer(parentComponent, children, container, forceH
15873
15865
  var rootEl = getReactRootElementInContainer(container);
15874
15866
  var hasNonRootReactChild = !!(rootEl && getInstanceFromNode$1(rootEl));
15875
15867
 
15876
- warning_1$1(!hasNonRootReactChild || isRootRenderedBySomeReact, '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.');
15868
+ warning_1(!hasNonRootReactChild || isRootRenderedBySomeReact, '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.');
15877
15869
 
15878
- warning_1$1(container.nodeType !== ELEMENT_NODE || !container.tagName || container.tagName.toUpperCase() !== 'BODY', '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.');
15870
+ warning_1(container.nodeType !== ELEMENT_NODE || !container.tagName || container.tagName.toUpperCase() !== 'BODY', '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.');
15879
15871
  }
15880
15872
 
15881
15873
  var root = container._reactRootContainer;
@@ -15889,7 +15881,7 @@ function renderSubtreeIntoContainer(parentComponent, children, container, forceH
15889
15881
  {
15890
15882
  if (!warned && rootSibling.nodeType === ELEMENT_NODE && rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME)) {
15891
15883
  warned = true;
15892
- warning_1$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.');
15884
+ 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.');
15893
15885
  }
15894
15886
  }
15895
15887
  container.removeChild(rootSibling);
@@ -15916,7 +15908,7 @@ function renderSubtreeIntoContainer(parentComponent, children, container, forceH
15916
15908
  function createPortal(children, container) {
15917
15909
  var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
15918
15910
 
15919
- !isValidContainer(container) ? invariant_1$1(false, 'Target container is not a DOM element.') : void 0;
15911
+ !isValidContainer(container) ? invariant_1(false, 'Target container is not a DOM element.') : void 0;
15920
15912
  // TODO: pass ReactDOM portal implementation as third argument
15921
15913
  return createPortal$1(children, container, null, key);
15922
15914
  }
@@ -15942,7 +15934,7 @@ var ReactDOM = {
15942
15934
  var owner = ReactCurrentOwner.current;
15943
15935
  if (owner !== null) {
15944
15936
  var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;
15945
- warning_1$1(warnedAboutRefsInRender, '%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');
15937
+ warning_1(warnedAboutRefsInRender, '%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');
15946
15938
  owner.stateNode._warnedAboutRefsInRender = true;
15947
15939
  }
15948
15940
  }
@@ -15959,9 +15951,9 @@ var ReactDOM = {
15959
15951
  }
15960
15952
 
15961
15953
  if (typeof componentOrElement.render === 'function') {
15962
- invariant_1$1(false, 'Unable to find node on an unmounted component.');
15954
+ invariant_1(false, 'Unable to find node on an unmounted component.');
15963
15955
  } else {
15964
- invariant_1$1(false, 'Element appears to be neither ReactComponent nor DOMNode. Keys: %s', Object.keys(componentOrElement));
15956
+ invariant_1(false, 'Element appears to be neither ReactComponent nor DOMNode. Keys: %s', Object.keys(componentOrElement));
15965
15957
  }
15966
15958
  },
15967
15959
  hydrate: function (element, container, callback) {
@@ -15972,17 +15964,17 @@ var ReactDOM = {
15972
15964
  return renderSubtreeIntoContainer(null, element, container, false, callback);
15973
15965
  },
15974
15966
  unstable_renderSubtreeIntoContainer: function (parentComponent, element, containerNode, callback) {
15975
- !(parentComponent != null && has(parentComponent)) ? invariant_1$1(false, 'parentComponent must be a valid React Component') : void 0;
15967
+ !(parentComponent != null && has(parentComponent)) ? invariant_1(false, 'parentComponent must be a valid React Component') : void 0;
15976
15968
  return renderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);
15977
15969
  },
15978
15970
  unmountComponentAtNode: function (container) {
15979
- !isValidContainer(container) ? invariant_1$1(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : void 0;
15971
+ !isValidContainer(container) ? invariant_1(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : void 0;
15980
15972
 
15981
15973
  if (container._reactRootContainer) {
15982
15974
  {
15983
15975
  var rootEl = getReactRootElementInContainer(container);
15984
15976
  var renderedByDifferentReact = rootEl && !getInstanceFromNode$1(rootEl);
15985
- warning_1$1(!renderedByDifferentReact, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.');
15977
+ warning_1(!renderedByDifferentReact, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.');
15986
15978
  }
15987
15979
 
15988
15980
  // Unmount should not be batched.
@@ -16002,7 +15994,7 @@ var ReactDOM = {
16002
15994
  // Check if the container itself is a React root node.
16003
15995
  var isContainerReactRoot = container.nodeType === 1 && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;
16004
15996
 
16005
- warning_1$1(!hasNonRootReactChild, "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.');
15997
+ warning_1(!hasNonRootReactChild, "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.');
16006
15998
  }
16007
15999
 
16008
16000
  return false;