react-dom 16.4.2 → 16.5.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.4.2
1
+ /** @license React v16.5.0
2
2
  * react-dom-server.browser.development.js
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -15,16 +15,6 @@
15
15
  (global.ReactDOMServer = factory(global.React));
16
16
  }(this, (function (React) { 'use strict';
17
17
 
18
- /**
19
- * Copyright (c) 2013-present, Facebook, Inc.
20
- *
21
- * This source code is licensed under the MIT license found in the
22
- * LICENSE file in the root directory of this source tree.
23
- *
24
- */
25
-
26
-
27
-
28
18
  /**
29
19
  * Use invariant() to assert state which your program assumes to be true.
30
20
  *
@@ -36,10 +26,10 @@
36
26
  * will remain to ensure logic does not differ in production.
37
27
  */
38
28
 
39
- var validateFormat = function validateFormat(format) {};
29
+ var validateFormat = function () {};
40
30
 
41
31
  {
42
- validateFormat = function validateFormat(format) {
32
+ validateFormat = function (format) {
43
33
  if (format === undefined) {
44
34
  throw new Error('invariant requires an error message argument');
45
35
  }
@@ -50,7 +40,7 @@ function invariant(condition, format, a, b, c, d, e, f) {
50
40
  validateFormat(format);
51
41
 
52
42
  if (!condition) {
53
- var error;
43
+ var error = void 0;
54
44
  if (format === undefined) {
55
45
  error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
56
46
  } else {
@@ -67,137 +57,136 @@ function invariant(condition, format, a, b, c, d, e, f) {
67
57
  }
68
58
  }
69
59
 
70
- var invariant_1 = invariant;
71
-
72
60
  // Relying on the `invariant()` implementation lets us
73
- // have preserve the format and params in the www builds.
61
+ // preserve the format and params in the www builds.
74
62
 
75
63
  // TODO: this is special because it gets imported during build.
76
64
 
77
- var ReactVersion = '16.4.2';
65
+ var ReactVersion = '16.5.0';
78
66
 
79
67
  var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
80
68
 
81
69
  var _assign = ReactInternals.assign;
82
70
 
83
71
  /**
84
- * Copyright (c) 2013-present, Facebook, Inc.
85
- *
86
- * This source code is licensed under the MIT license found in the
87
- * LICENSE file in the root directory of this source tree.
88
- *
89
- *
90
- */
91
-
92
- function makeEmptyFunction(arg) {
93
- return function () {
94
- return arg;
95
- };
96
- }
97
-
98
- /**
99
- * This function accepts and discards inputs; it has no side effects. This is
100
- * primarily useful idiomatically for overridable function endpoints which
101
- * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
102
- */
103
- var emptyFunction = function emptyFunction() {};
104
-
105
- emptyFunction.thatReturns = makeEmptyFunction;
106
- emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
107
- emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
108
- emptyFunction.thatReturnsNull = makeEmptyFunction(null);
109
- emptyFunction.thatReturnsThis = function () {
110
- return this;
111
- };
112
- emptyFunction.thatReturnsArgument = function (arg) {
113
- return arg;
114
- };
115
-
116
- var emptyFunction_1 = emptyFunction;
117
-
118
- /**
119
- * Copyright (c) 2013-present, Facebook, Inc.
120
- *
121
- * This source code is licensed under the MIT license found in the
122
- * LICENSE file in the root directory of this source tree.
123
- *
72
+ * Similar to invariant but only logs a warning if the condition is not met.
73
+ * This can be used to log issues in development environments in critical
74
+ * paths. Removing the logging code for production environments will keep the
75
+ * same logic and follow the same code paths.
124
76
  */
125
77
 
126
-
127
-
128
- var emptyObject = {};
78
+ var warningWithoutStack = function () {};
129
79
 
130
80
  {
131
- Object.freeze(emptyObject);
132
- }
133
-
134
- var emptyObject_1 = emptyObject;
135
-
136
- /**
137
- * Copyright (c) 2013-present, Facebook, Inc.
138
- *
139
- * This source code is licensed under the MIT license found in the
140
- * LICENSE file in the root directory of this source tree.
141
- *
142
- * @typechecks
143
- */
81
+ warningWithoutStack = function (condition, format) {
82
+ for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
83
+ args[_key - 2] = arguments[_key];
84
+ }
144
85
 
145
- var _uppercasePattern = /([A-Z])/g;
86
+ if (format === undefined) {
87
+ throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
88
+ }
89
+ if (condition) {
90
+ return;
91
+ }
92
+ if (typeof console !== 'undefined') {
93
+ var _console;
146
94
 
147
- /**
148
- * Hyphenates a camelcased string, for example:
149
- *
150
- * > hyphenate('backgroundColor')
151
- * < "background-color"
152
- *
153
- * For CSS style names, use `hyphenateStyleName` instead which works properly
154
- * with all vendor prefixes, including `ms`.
155
- *
156
- * @param {string} string
157
- * @return {string}
158
- */
159
- function hyphenate(string) {
160
- return string.replace(_uppercasePattern, '-$1').toLowerCase();
95
+ var stringArgs = args.map(function (item) {
96
+ return '' + item;
97
+ });
98
+ (_console = console).error.apply(_console, ['Warning: ' + format].concat(stringArgs));
99
+ }
100
+ try {
101
+ // --- Welcome to debugging React ---
102
+ // This error was thrown as a convenience so that you can use this stack
103
+ // to find the callsite that caused this warning to fire.
104
+ var argIndex = 0;
105
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
106
+ return args[argIndex++];
107
+ });
108
+ throw new Error(message);
109
+ } catch (x) {}
110
+ };
161
111
  }
162
112
 
163
- var hyphenate_1 = hyphenate;
113
+ var warningWithoutStack$1 = warningWithoutStack;
164
114
 
165
- /**
166
- * Copyright (c) 2013-present, Facebook, Inc.
167
- *
168
- * This source code is licensed under the MIT license found in the
169
- * LICENSE file in the root directory of this source tree.
170
- *
171
- * @typechecks
172
- */
115
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
116
+ // nor polyfill, then a plain number is used for performance.
117
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
173
118
 
174
119
 
120
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
121
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
122
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
123
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
124
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
125
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
126
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
127
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
128
+ var REACT_PLACEHOLDER_TYPE = hasSymbol ? Symbol.for('react.placeholder') : 0xead1;
175
129
 
130
+ var Resolved = 1;
176
131
 
177
132
 
178
- var msPattern = /^ms-/;
179
133
 
180
- /**
181
- * Hyphenates a camelcased CSS property name, for example:
182
- *
183
- * > hyphenateStyleName('backgroundColor')
184
- * < "background-color"
185
- * > hyphenateStyleName('MozTransition')
186
- * < "-moz-transition"
187
- * > hyphenateStyleName('msTransition')
188
- * < "-ms-transition"
189
- *
190
- * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
191
- * is converted to `-ms-`.
192
- *
193
- * @param {string} string
194
- * @return {string}
195
- */
196
- function hyphenateStyleName(string) {
197
- return hyphenate_1(string).replace(msPattern, '-ms-');
134
+
135
+ function refineResolvedThenable(thenable) {
136
+ return thenable._reactStatus === Resolved ? thenable._reactResult : null;
198
137
  }
199
138
 
200
- var hyphenateStyleName_1 = hyphenateStyleName;
139
+ function getComponentName(type) {
140
+ if (type == null) {
141
+ // Host root, text node or just invalid type.
142
+ return null;
143
+ }
144
+ {
145
+ if (typeof type.tag === 'number') {
146
+ warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
147
+ }
148
+ }
149
+ if (typeof type === 'function') {
150
+ return type.displayName || type.name || null;
151
+ }
152
+ if (typeof type === 'string') {
153
+ return type;
154
+ }
155
+ switch (type) {
156
+ case REACT_ASYNC_MODE_TYPE:
157
+ return 'AsyncMode';
158
+ case REACT_FRAGMENT_TYPE:
159
+ return 'Fragment';
160
+ case REACT_PORTAL_TYPE:
161
+ return 'Portal';
162
+ case REACT_PROFILER_TYPE:
163
+ return 'Profiler';
164
+ case REACT_STRICT_MODE_TYPE:
165
+ return 'StrictMode';
166
+ case REACT_PLACEHOLDER_TYPE:
167
+ return 'Placeholder';
168
+ }
169
+ if (typeof type === 'object') {
170
+ switch (type.$$typeof) {
171
+ case REACT_CONTEXT_TYPE:
172
+ return 'Context.Consumer';
173
+ case REACT_PROVIDER_TYPE:
174
+ return 'Context.Provider';
175
+ case REACT_FORWARD_REF_TYPE:
176
+ var renderFn = type.render;
177
+ var functionName = renderFn.displayName || renderFn.name || '';
178
+ return functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef';
179
+ }
180
+ if (typeof type.then === 'function') {
181
+ var thenable = type;
182
+ var resolvedThenable = refineResolvedThenable(thenable);
183
+ if (resolvedThenable) {
184
+ return getComponentName(resolvedThenable);
185
+ }
186
+ }
187
+ }
188
+ return null;
189
+ }
201
190
 
202
191
  /**
203
192
  * Forked from fbjs/warning:
@@ -238,7 +227,7 @@ var lowPriorityWarning = function () {};
238
227
 
239
228
  lowPriorityWarning = function (condition, format) {
240
229
  if (format === undefined) {
241
- throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
230
+ throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
242
231
  }
243
232
  if (!condition) {
244
233
  for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
@@ -252,45 +241,7 @@ var lowPriorityWarning = function () {};
252
241
 
253
242
  var lowPriorityWarning$1 = lowPriorityWarning;
254
243
 
255
- /**
256
- * Copyright (c) 2013-present, Facebook, Inc.
257
- *
258
- * This source code is licensed under the MIT license found in the
259
- * LICENSE file in the root directory of this source tree.
260
- *
261
- *
262
- * @typechecks static-only
263
- */
264
-
265
-
266
-
267
- /**
268
- * Memoizes the return value of a function that accepts one string argument.
269
- */
270
-
271
- function memoizeStringOnly(callback) {
272
- var cache = {};
273
- return function (string) {
274
- if (!cache.hasOwnProperty(string)) {
275
- cache[string] = callback.call(this, string);
276
- }
277
- return cache[string];
278
- };
279
- }
280
-
281
- var memoizeStringOnly_1 = memoizeStringOnly;
282
-
283
- /**
284
- * Copyright (c) 2014-present, Facebook, Inc.
285
- *
286
- * This source code is licensed under the MIT license found in the
287
- * LICENSE file in the root directory of this source tree.
288
- *
289
- */
290
-
291
-
292
-
293
-
244
+ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
294
245
 
295
246
  /**
296
247
  * Similar to invariant but only logs a warning if the condition is not met.
@@ -299,49 +250,26 @@ var memoizeStringOnly_1 = memoizeStringOnly;
299
250
  * same logic and follow the same code paths.
300
251
  */
301
252
 
302
- var warning = emptyFunction_1;
253
+ var warning = warningWithoutStack$1;
303
254
 
304
255
  {
305
- var printWarning$1 = function printWarning(format) {
306
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
307
- args[_key - 1] = arguments[_key];
308
- }
309
-
310
- var argIndex = 0;
311
- var message = 'Warning: ' + format.replace(/%s/g, function () {
312
- return args[argIndex++];
313
- });
314
- if (typeof console !== 'undefined') {
315
- console.error(message);
316
- }
317
- try {
318
- // --- Welcome to debugging React ---
319
- // This error was thrown as a convenience so that you can use this stack
320
- // to find the callsite that caused this warning to fire.
321
- throw new Error(message);
322
- } catch (x) {}
323
- };
324
-
325
- warning = function warning(condition, format) {
326
- if (format === undefined) {
327
- throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
256
+ warning = function (condition, format) {
257
+ if (condition) {
258
+ return;
328
259
  }
260
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
261
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
262
+ // eslint-disable-next-line react-internal/warning-and-invariant-args
329
263
 
330
- if (format.indexOf('Failed Composite propType: ') === 0) {
331
- return; // Ignore CompositeComponent proptype check.
264
+ for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
265
+ args[_key - 2] = arguments[_key];
332
266
  }
333
267
 
334
- if (!condition) {
335
- for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
336
- args[_key2 - 2] = arguments[_key2];
337
- }
338
-
339
- printWarning$1.apply(undefined, [format].concat(args));
340
- }
268
+ warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack]));
341
269
  };
342
270
  }
343
271
 
344
- var warning_1 = warning;
272
+ var warning$1 = warning;
345
273
 
346
274
  /**
347
275
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -365,11 +293,24 @@ var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
365
293
 
366
294
 
367
295
 
296
+ var printWarning$1 = function() {};
297
+
368
298
  {
369
- var invariant$2 = invariant_1;
370
- var warning$2 = warning_1;
371
299
  var ReactPropTypesSecret = ReactPropTypesSecret_1;
372
300
  var loggedTypeFailures = {};
301
+
302
+ printWarning$1 = function(text) {
303
+ var message = 'Warning: ' + text;
304
+ if (typeof console !== 'undefined') {
305
+ console.error(message);
306
+ }
307
+ try {
308
+ // --- Welcome to debugging React ---
309
+ // This error was thrown as a convenience so that you can use this stack
310
+ // to find the callsite that caused this warning to fire.
311
+ throw new Error(message);
312
+ } catch (x) {}
313
+ };
373
314
  }
374
315
 
375
316
  /**
@@ -394,12 +335,29 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
394
335
  try {
395
336
  // This is intentionally an invariant that gets caught. It's the same
396
337
  // behavior as without this statement except with a better message.
397
- invariant$2(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
338
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
339
+ var err = Error(
340
+ (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
341
+ 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
342
+ );
343
+ err.name = 'Invariant Violation';
344
+ throw err;
345
+ }
398
346
  error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
399
347
  } catch (ex) {
400
348
  error = ex;
401
349
  }
402
- warning$2(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
350
+ if (error && !(error instanceof Error)) {
351
+ printWarning$1(
352
+ (componentName || 'React class') + ': type specification of ' +
353
+ location + ' `' + typeSpecName + '` is invalid; the type checker ' +
354
+ 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
355
+ 'You may have forgotten to pass an argument to the type checker ' +
356
+ 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
357
+ 'shape all require an argument).'
358
+ );
359
+
360
+ }
403
361
  if (error instanceof Error && !(error.message in loggedTypeFailures)) {
404
362
  // Only monitor this failure once because there tends to be a lot of the
405
363
  // same error.
@@ -407,7 +365,9 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
407
365
 
408
366
  var stack = getStack ? getStack() : '';
409
367
 
410
- warning$2(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
368
+ printWarning$1(
369
+ 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
370
+ );
411
371
  }
412
372
  }
413
373
  }
@@ -416,15 +376,34 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
416
376
 
417
377
  var checkPropTypes_1 = checkPropTypes;
418
378
 
379
+ var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
380
+
419
381
  var describeComponentFrame = function (name, source, ownerName) {
420
- return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
382
+ var sourceInfo = '';
383
+ if (source) {
384
+ var path = source.fileName;
385
+ var fileName = path.replace(BEFORE_SLASH_RE, '');
386
+ {
387
+ // In DEV, include code for a common special case:
388
+ // prefer "folder/index.js" instead of just "index.js".
389
+ if (/^index\./.test(fileName)) {
390
+ var match = path.match(BEFORE_SLASH_RE);
391
+ if (match) {
392
+ var pathBeforeSlash = match[1];
393
+ if (pathBeforeSlash) {
394
+ var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
395
+ fileName = folderName + '/' + fileName;
396
+ }
397
+ }
398
+ }
399
+ }
400
+ sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
401
+ } else if (ownerName) {
402
+ sourceInfo = ' (created by ' + ownerName + ')';
403
+ }
404
+ return '\n in ' + (name || 'Unknown') + sourceInfo;
421
405
  };
422
406
 
423
- var ReactInternals$1 = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
424
-
425
- var ReactCurrentOwner = ReactInternals$1.ReactCurrentOwner;
426
- var ReactDebugCurrentFrame = ReactInternals$1.ReactDebugCurrentFrame;
427
-
428
407
  // Exports ReactDOM.createRoot
429
408
 
430
409
 
@@ -455,21 +434,13 @@ var warnAboutDeprecatedLifecycles = false;
455
434
  // Gather advanced timing metrics for Profiler subtrees.
456
435
 
457
436
 
458
- // Only used in www builds.
437
+ // Track which interactions trigger each commit.
459
438
 
460
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
461
- // nor polyfill, then a plain number is used for performance.
462
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
463
439
 
440
+ // Only used in www builds.
441
+ var enableSuspenseServerRenderer = false;
464
442
 
465
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
466
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
467
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
468
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
469
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
470
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
471
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
472
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
443
+ // Only used in www builds.
473
444
 
474
445
  // A reserved attribute.
475
446
  // It is handled by React separately and shouldn't be written to the DOM.
@@ -530,7 +501,7 @@ function isAttributeNameSafe(attributeName) {
530
501
  }
531
502
  illegalAttributeNameCache[attributeName] = true;
532
503
  {
533
- warning_1(false, 'Invalid attribute name: `%s`', attributeName);
504
+ warning$1(false, 'Invalid attribute name: `%s`', attributeName);
534
505
  }
535
506
  return false;
536
507
  }
@@ -656,7 +627,7 @@ var properties = {};
656
627
  // In React, we let users pass `true` and `false` even though technically
657
628
  // these aren't boolean attributes (they are coerced to strings).
658
629
  // Since these are SVG attributes, their attribute names are case-sensitive.
659
- ['autoReverse', 'externalResourcesRequired', 'preserveAlpha'].forEach(function (name) {
630
+ ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
660
631
  properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
661
632
  name, // attributeName
662
633
  null);
@@ -683,7 +654,7 @@ var properties = {};
683
654
  // disabled with `removeAttribute`. We have special logic for handling this.
684
655
  'multiple', 'muted', 'selected'].forEach(function (name) {
685
656
  properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
686
- name.toLowerCase(), // attributeName
657
+ name, // attributeName
687
658
  null);
688
659
  } // attributeNamespace
689
660
  );
@@ -692,7 +663,7 @@ var properties = {};
692
663
  // booleans, but can also accept a string value.
693
664
  ['capture', 'download'].forEach(function (name) {
694
665
  properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
695
- name.toLowerCase(), // attributeName
666
+ name, // attributeName
696
667
  null);
697
668
  } // attributeNamespace
698
669
  );
@@ -700,7 +671,7 @@ var properties = {};
700
671
  // These are HTML attributes that must be positive numbers.
701
672
  ['cols', 'rows', 'size', 'span'].forEach(function (name) {
702
673
  properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
703
- name.toLowerCase(), // attributeName
674
+ name, // attributeName
704
675
  null);
705
676
  } // attributeNamespace
706
677
  );
@@ -939,11 +910,15 @@ function getChildNamespace(parentNamespace, type) {
939
910
  return parentNamespace;
940
911
  }
941
912
 
913
+ var ReactDebugCurrentFrame$1 = null;
914
+
942
915
  var ReactControlledValuePropTypes = {
943
916
  checkPropTypes: null
944
917
  };
945
918
 
946
919
  {
920
+ ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
921
+
947
922
  var hasReadOnlyValue = {
948
923
  button: true,
949
924
  checkbox: true,
@@ -956,13 +931,13 @@ var ReactControlledValuePropTypes = {
956
931
 
957
932
  var propTypes = {
958
933
  value: function (props, propName, componentName) {
959
- if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
934
+ if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null) {
960
935
  return null;
961
936
  }
962
937
  return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
963
938
  },
964
939
  checked: function (props, propName, componentName) {
965
- if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
940
+ if (props.onChange || props.readOnly || props.disabled || props[propName] == null) {
966
941
  return null;
967
942
  }
968
943
  return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
@@ -973,8 +948,8 @@ var ReactControlledValuePropTypes = {
973
948
  * Provide a linked `value` attribute for controlled forms. You should not use
974
949
  * this outside of the ReactDOM controlled form components.
975
950
  */
976
- ReactControlledValuePropTypes.checkPropTypes = function (tagName, props, getStack) {
977
- checkPropTypes_1(propTypes, props, 'prop', tagName, getStack);
951
+ ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {
952
+ checkPropTypes_1(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$1.getStackAddendum);
978
953
  };
979
954
  }
980
955
 
@@ -1007,24 +982,31 @@ var voidElementTags = _assign({
1007
982
  menuitem: true
1008
983
  }, omittedCloseTags);
1009
984
 
985
+ // TODO: We can remove this if we add invariantWithStack()
986
+ // or add stack by default to invariants where possible.
1010
987
  var HTML = '__html';
1011
988
 
1012
- function assertValidProps(tag, props, getStack) {
989
+ var ReactDebugCurrentFrame$2 = null;
990
+ {
991
+ ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
992
+ }
993
+
994
+ function assertValidProps(tag, props) {
1013
995
  if (!props) {
1014
996
  return;
1015
997
  }
1016
998
  // Note the use of `==` which checks for null or undefined.
1017
999
  if (voidElementTags[tag]) {
1018
- !(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;
1000
+ !(props.children == null && props.dangerouslySetInnerHTML == null) ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', tag, ReactDebugCurrentFrame$2.getStackAddendum()) : void 0;
1019
1001
  }
1020
1002
  if (props.dangerouslySetInnerHTML != null) {
1021
- !(props.children == null) ? invariant_1(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : void 0;
1022
- !(typeof props.dangerouslySetInnerHTML === 'object' && HTML 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;
1003
+ !(props.children == null) ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : void 0;
1004
+ !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : void 0;
1023
1005
  }
1024
1006
  {
1025
- !(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) ? warning_1(false, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.%s', getStack()) : void 0;
1007
+ !(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) ? warning$1(false, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;
1026
1008
  }
1027
- !(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;
1009
+ !(props.style == null || typeof props.style === 'object') ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', ReactDebugCurrentFrame$2.getStackAddendum()) : void 0;
1028
1010
  }
1029
1011
 
1030
1012
  /**
@@ -1046,6 +1028,7 @@ var isUnitlessNumber = {
1046
1028
  flexShrink: true,
1047
1029
  flexNegative: true,
1048
1030
  flexOrder: true,
1031
+ gridArea: true,
1049
1032
  gridRow: true,
1050
1033
  gridRowEnd: true,
1051
1034
  gridRowSpan: true,
@@ -1132,6 +1115,26 @@ function dangerousStyleValue(name, value, isCustomProperty) {
1132
1115
  return ('' + value).trim();
1133
1116
  }
1134
1117
 
1118
+ var uppercasePattern = /([A-Z])/g;
1119
+ var msPattern = /^ms-/;
1120
+
1121
+ /**
1122
+ * Hyphenates a camelcased CSS property name, for example:
1123
+ *
1124
+ * > hyphenateStyleName('backgroundColor')
1125
+ * < "background-color"
1126
+ * > hyphenateStyleName('MozTransition')
1127
+ * < "-moz-transition"
1128
+ * > hyphenateStyleName('msTransition')
1129
+ * < "-ms-transition"
1130
+ *
1131
+ * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
1132
+ * is converted to `-ms-`.
1133
+ */
1134
+ function hyphenateStyleName(name) {
1135
+ return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
1136
+ }
1137
+
1135
1138
  function isCustomComponent(tagName, props) {
1136
1139
  if (tagName.indexOf('-') === -1) {
1137
1140
  return typeof props.is === 'string';
@@ -1155,77 +1158,13 @@ function isCustomComponent(tagName, props) {
1155
1158
  }
1156
1159
  }
1157
1160
 
1158
- /**
1159
- * Copyright (c) 2013-present, Facebook, Inc.
1160
- *
1161
- * This source code is licensed under the MIT license found in the
1162
- * LICENSE file in the root directory of this source tree.
1163
- *
1164
- * @typechecks
1165
- */
1166
-
1167
- var _hyphenPattern = /-(.)/g;
1168
-
1169
- /**
1170
- * Camelcases a hyphenated string, for example:
1171
- *
1172
- * > camelize('background-color')
1173
- * < "backgroundColor"
1174
- *
1175
- * @param {string} string
1176
- * @return {string}
1177
- */
1178
- function camelize(string) {
1179
- return string.replace(_hyphenPattern, function (_, character) {
1180
- return character.toUpperCase();
1181
- });
1182
- }
1183
-
1184
- var camelize_1 = camelize;
1185
-
1186
- /**
1187
- * Copyright (c) 2013-present, Facebook, Inc.
1188
- *
1189
- * This source code is licensed under the MIT license found in the
1190
- * LICENSE file in the root directory of this source tree.
1191
- *
1192
- * @typechecks
1193
- */
1194
-
1195
-
1196
-
1197
-
1198
-
1199
- var msPattern$1 = /^-ms-/;
1200
-
1201
- /**
1202
- * Camelcases a hyphenated CSS property name, for example:
1203
- *
1204
- * > camelizeStyleName('background-color')
1205
- * < "backgroundColor"
1206
- * > camelizeStyleName('-moz-transition')
1207
- * < "MozTransition"
1208
- * > camelizeStyleName('-ms-transition')
1209
- * < "msTransition"
1210
- *
1211
- * As Andi Smith suggests
1212
- * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
1213
- * is converted to lowercase `ms`.
1214
- *
1215
- * @param {string} string
1216
- * @return {string}
1217
- */
1218
- function camelizeStyleName(string) {
1219
- return camelize_1(string.replace(msPattern$1, 'ms-'));
1220
- }
1221
-
1222
- var camelizeStyleName_1 = camelizeStyleName;
1223
-
1224
- var warnValidStyle = emptyFunction_1;
1161
+ var warnValidStyle = function () {};
1225
1162
 
1226
1163
  {
1227
1164
  // 'msTransform' is correct, but the other prefixes should be capitalized
1228
1165
  var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
1166
+ var msPattern$1 = /^-ms-/;
1167
+ var hyphenPattern = /-(.)/g;
1229
1168
 
1230
1169
  // style values shouldn't contain a semicolon
1231
1170
  var badStyleValueWithSemicolonPattern = /;\s*$/;
@@ -1235,65 +1174,75 @@ var warnValidStyle = emptyFunction_1;
1235
1174
  var warnedForNaNValue = false;
1236
1175
  var warnedForInfinityValue = false;
1237
1176
 
1238
- var warnHyphenatedStyleName = function (name, getStack) {
1177
+ var camelize = function (string) {
1178
+ return string.replace(hyphenPattern, function (_, character) {
1179
+ return character.toUpperCase();
1180
+ });
1181
+ };
1182
+
1183
+ var warnHyphenatedStyleName = function (name) {
1239
1184
  if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
1240
1185
  return;
1241
1186
  }
1242
1187
 
1243
1188
  warnedStyleNames[name] = true;
1244
- warning_1(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName_1(name), getStack());
1189
+ warning$1(false, 'Unsupported style property %s. Did you mean %s?', name,
1190
+ // As Andi Smith suggests
1191
+ // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
1192
+ // is converted to lowercase `ms`.
1193
+ camelize(name.replace(msPattern$1, 'ms-')));
1245
1194
  };
1246
1195
 
1247
- var warnBadVendoredStyleName = function (name, getStack) {
1196
+ var warnBadVendoredStyleName = function (name) {
1248
1197
  if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
1249
1198
  return;
1250
1199
  }
1251
1200
 
1252
1201
  warnedStyleNames[name] = true;
1253
- warning_1(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), getStack());
1202
+ warning$1(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
1254
1203
  };
1255
1204
 
1256
- var warnStyleValueWithSemicolon = function (name, value, getStack) {
1205
+ var warnStyleValueWithSemicolon = function (name, value) {
1257
1206
  if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
1258
1207
  return;
1259
1208
  }
1260
1209
 
1261
1210
  warnedStyleValues[value] = true;
1262
- warning_1(false, "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.%s', name, value.replace(badStyleValueWithSemicolonPattern, ''), getStack());
1211
+ warning$1(false, "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
1263
1212
  };
1264
1213
 
1265
- var warnStyleValueIsNaN = function (name, value, getStack) {
1214
+ var warnStyleValueIsNaN = function (name, value) {
1266
1215
  if (warnedForNaNValue) {
1267
1216
  return;
1268
1217
  }
1269
1218
 
1270
1219
  warnedForNaNValue = true;
1271
- warning_1(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, getStack());
1220
+ warning$1(false, '`NaN` is an invalid value for the `%s` css style property.', name);
1272
1221
  };
1273
1222
 
1274
- var warnStyleValueIsInfinity = function (name, value, getStack) {
1223
+ var warnStyleValueIsInfinity = function (name, value) {
1275
1224
  if (warnedForInfinityValue) {
1276
1225
  return;
1277
1226
  }
1278
1227
 
1279
1228
  warnedForInfinityValue = true;
1280
- warning_1(false, '`Infinity` is an invalid value for the `%s` css style property.%s', name, getStack());
1229
+ warning$1(false, '`Infinity` is an invalid value for the `%s` css style property.', name);
1281
1230
  };
1282
1231
 
1283
- warnValidStyle = function (name, value, getStack) {
1232
+ warnValidStyle = function (name, value) {
1284
1233
  if (name.indexOf('-') > -1) {
1285
- warnHyphenatedStyleName(name, getStack);
1234
+ warnHyphenatedStyleName(name);
1286
1235
  } else if (badVendoredStyleNamePattern.test(name)) {
1287
- warnBadVendoredStyleName(name, getStack);
1236
+ warnBadVendoredStyleName(name);
1288
1237
  } else if (badStyleValueWithSemicolonPattern.test(value)) {
1289
- warnStyleValueWithSemicolon(name, value, getStack);
1238
+ warnStyleValueWithSemicolon(name, value);
1290
1239
  }
1291
1240
 
1292
1241
  if (typeof value === 'number') {
1293
1242
  if (isNaN(value)) {
1294
- warnStyleValueIsNaN(name, value, getStack);
1243
+ warnStyleValueIsNaN(name, value);
1295
1244
  } else if (!isFinite(value)) {
1296
- warnStyleValueIsInfinity(name, value, getStack);
1245
+ warnStyleValueIsInfinity(name, value);
1297
1246
  }
1298
1247
  }
1299
1248
  };
@@ -1362,11 +1311,6 @@ var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
1362
1311
 
1363
1312
  var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
1364
1313
 
1365
- function getStackAddendum$1() {
1366
- var stack = ReactDebugCurrentFrame.getStackAddendum();
1367
- return stack != null ? stack : '';
1368
- }
1369
-
1370
1314
  function validateProperty(tagName, name) {
1371
1315
  if (hasOwnProperty$2.call(warnedProperties, name) && warnedProperties[name]) {
1372
1316
  return true;
@@ -1379,13 +1323,13 @@ function validateProperty(tagName, name) {
1379
1323
  // If this is an aria-* attribute, but is not listed in the known DOM
1380
1324
  // DOM properties, then it is an invalid aria-* attribute.
1381
1325
  if (correctName == null) {
1382
- warning_1(false, 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.%s', name, getStackAddendum$1());
1326
+ warning$1(false, 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
1383
1327
  warnedProperties[name] = true;
1384
1328
  return true;
1385
1329
  }
1386
1330
  // aria-* attributes should be lowercase; suggest the lowercase version.
1387
1331
  if (name !== correctName) {
1388
- warning_1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?%s', name, correctName, getStackAddendum$1());
1332
+ warning$1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
1389
1333
  warnedProperties[name] = true;
1390
1334
  return true;
1391
1335
  }
@@ -1403,7 +1347,7 @@ function validateProperty(tagName, name) {
1403
1347
  }
1404
1348
  // aria-* attributes should be lowercase; suggest the lowercase version.
1405
1349
  if (name !== standardName) {
1406
- warning_1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?%s', name, standardName, getStackAddendum$1());
1350
+ warning$1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
1407
1351
  warnedProperties[name] = true;
1408
1352
  return true;
1409
1353
  }
@@ -1427,9 +1371,9 @@ function warnInvalidARIAProps(type, props) {
1427
1371
  }).join(', ');
1428
1372
 
1429
1373
  if (invalidProps.length === 1) {
1430
- warning_1(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum$1());
1374
+ warning$1(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
1431
1375
  } else if (invalidProps.length > 1) {
1432
- warning_1(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum$1());
1376
+ warning$1(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
1433
1377
  }
1434
1378
  }
1435
1379
 
@@ -1442,11 +1386,6 @@ function validateProperties(type, props) {
1442
1386
 
1443
1387
  var didWarnValueNull = false;
1444
1388
 
1445
- function getStackAddendum$2() {
1446
- var stack = ReactDebugCurrentFrame.getStackAddendum();
1447
- return stack != null ? stack : '';
1448
- }
1449
-
1450
1389
  function validateProperties$1(type, props) {
1451
1390
  if (type !== 'input' && type !== 'textarea' && type !== 'select') {
1452
1391
  return;
@@ -1455,9 +1394,9 @@ function validateProperties$1(type, props) {
1455
1394
  if (props != null && props.value === null && !didWarnValueNull) {
1456
1395
  didWarnValueNull = true;
1457
1396
  if (type === 'select' && props.multiple) {
1458
- 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$2());
1397
+ warning$1(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);
1459
1398
  } else {
1460
- 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$2());
1399
+ warning$1(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
1461
1400
  }
1462
1401
  }
1463
1402
  }
@@ -2008,11 +1947,6 @@ var possibleStandardNames = {
2008
1947
  zoomandpan: 'zoomAndPan'
2009
1948
  };
2010
1949
 
2011
- function getStackAddendum$3() {
2012
- var stack = ReactDebugCurrentFrame.getStackAddendum();
2013
- return stack != null ? stack : '';
2014
- }
2015
-
2016
1950
  var validateProperty$1 = function () {};
2017
1951
 
2018
1952
  {
@@ -2030,7 +1964,7 @@ var validateProperty$1 = function () {};
2030
1964
 
2031
1965
  var lowerCasedName = name.toLowerCase();
2032
1966
  if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
2033
- 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.');
1967
+ 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.');
2034
1968
  warnedProperties$1[name] = true;
2035
1969
  return true;
2036
1970
  }
@@ -2042,12 +1976,12 @@ var validateProperty$1 = function () {};
2042
1976
  }
2043
1977
  var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
2044
1978
  if (registrationName != null) {
2045
- warning_1(false, 'Invalid event handler property `%s`. Did you mean `%s`?%s', name, registrationName, getStackAddendum$3());
1979
+ warning$1(false, 'Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
2046
1980
  warnedProperties$1[name] = true;
2047
1981
  return true;
2048
1982
  }
2049
1983
  if (EVENT_NAME_REGEX.test(name)) {
2050
- warning_1(false, 'Unknown event handler property `%s`. It will be ignored.%s', name, getStackAddendum$3());
1984
+ warning$1(false, 'Unknown event handler property `%s`. It will be ignored.', name);
2051
1985
  warnedProperties$1[name] = true;
2052
1986
  return true;
2053
1987
  }
@@ -2056,7 +1990,7 @@ var validateProperty$1 = function () {};
2056
1990
  // So we can't tell if the event name is correct for sure, but we can filter
2057
1991
  // out known bad ones like `onclick`. We can't suggest a specific replacement though.
2058
1992
  if (INVALID_EVENT_NAME_REGEX.test(name)) {
2059
- warning_1(false, 'Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.%s', name, getStackAddendum$3());
1993
+ warning$1(false, 'Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
2060
1994
  }
2061
1995
  warnedProperties$1[name] = true;
2062
1996
  return true;
@@ -2068,25 +2002,25 @@ var validateProperty$1 = function () {};
2068
2002
  }
2069
2003
 
2070
2004
  if (lowerCasedName === 'innerhtml') {
2071
- warning_1(false, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
2005
+ warning$1(false, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
2072
2006
  warnedProperties$1[name] = true;
2073
2007
  return true;
2074
2008
  }
2075
2009
 
2076
2010
  if (lowerCasedName === 'aria') {
2077
- warning_1(false, 'The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
2011
+ warning$1(false, 'The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
2078
2012
  warnedProperties$1[name] = true;
2079
2013
  return true;
2080
2014
  }
2081
2015
 
2082
2016
  if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
2083
- 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$3());
2017
+ warning$1(false, 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
2084
2018
  warnedProperties$1[name] = true;
2085
2019
  return true;
2086
2020
  }
2087
2021
 
2088
2022
  if (typeof value === 'number' && isNaN(value)) {
2089
- warning_1(false, 'Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.%s', name, getStackAddendum$3());
2023
+ warning$1(false, 'Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
2090
2024
  warnedProperties$1[name] = true;
2091
2025
  return true;
2092
2026
  }
@@ -2098,23 +2032,23 @@ var validateProperty$1 = function () {};
2098
2032
  if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
2099
2033
  var standardName = possibleStandardNames[lowerCasedName];
2100
2034
  if (standardName !== name) {
2101
- warning_1(false, 'Invalid DOM property `%s`. Did you mean `%s`?%s', name, standardName, getStackAddendum$3());
2035
+ warning$1(false, 'Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
2102
2036
  warnedProperties$1[name] = true;
2103
2037
  return true;
2104
2038
  }
2105
2039
  } else if (!isReserved && name !== lowerCasedName) {
2106
2040
  // Unknown attributes should have lowercase casing since that's how they
2107
2041
  // will be cased anyway with server rendering.
2108
- 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$3());
2042
+ warning$1(false, 'React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);
2109
2043
  warnedProperties$1[name] = true;
2110
2044
  return true;
2111
2045
  }
2112
2046
 
2113
2047
  if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
2114
2048
  if (value) {
2115
- 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$3());
2049
+ warning$1(false, 'Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name);
2116
2050
  } else {
2117
- 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$3());
2051
+ warning$1(false, 'Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);
2118
2052
  }
2119
2053
  warnedProperties$1[name] = true;
2120
2054
  return true;
@@ -2132,6 +2066,13 @@ var validateProperty$1 = function () {};
2132
2066
  return false;
2133
2067
  }
2134
2068
 
2069
+ // Warn when passing the strings 'false' or 'true' into a boolean prop
2070
+ if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
2071
+ warning$1(false, 'Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value);
2072
+ warnedProperties$1[name] = true;
2073
+ return true;
2074
+ }
2075
+
2135
2076
  return true;
2136
2077
  };
2137
2078
  }
@@ -2149,9 +2090,9 @@ var warnUnknownProperties = function (type, props, canUseEventSystem) {
2149
2090
  return '`' + prop + '`';
2150
2091
  }).join(', ');
2151
2092
  if (unknownProps.length === 1) {
2152
- 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$3());
2093
+ warning$1(false, 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
2153
2094
  } else if (unknownProps.length > 1) {
2154
- 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$3());
2095
+ warning$1(false, 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
2155
2096
  }
2156
2097
  };
2157
2098
 
@@ -2168,18 +2109,29 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
2168
2109
 
2169
2110
  var toArray = React.Children.toArray;
2170
2111
 
2171
- var currentDebugStack = void 0;
2172
- var currentDebugElementStack = void 0;
2112
+ // This is only used in DEV.
2113
+ // Each entry is `this.stack` from a currently executing renderer instance.
2114
+ // (There may be more than one because ReactDOMServer is reentrant).
2115
+ // Each stack is an array of frames which may contain nested stacks of elements.
2116
+ var currentDebugStacks = [];
2173
2117
 
2174
- var getStackAddendum = emptyFunction_1.thatReturns('');
2175
- var describeStackFrame = emptyFunction_1.thatReturns('');
2118
+ var ReactDebugCurrentFrame = void 0;
2119
+ var prevGetCurrentStackImpl = null;
2120
+ var getCurrentServerStackImpl = function () {
2121
+ return '';
2122
+ };
2123
+ var describeStackFrame = function (element) {
2124
+ return '';
2125
+ };
2176
2126
 
2177
2127
  var validatePropertiesInDevelopment = function (type, props) {};
2178
- var setCurrentDebugStack = function (stack) {};
2128
+ var pushCurrentDebugStack = function (stack) {};
2179
2129
  var pushElementToDebugStack = function (element) {};
2180
- var resetCurrentDebugStack = function () {};
2130
+ var popCurrentDebugStack = function () {};
2181
2131
 
2182
2132
  {
2133
+ ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2134
+
2183
2135
  validatePropertiesInDevelopment = function (type, props) {
2184
2136
  validateProperties(type, props);
2185
2137
  validateProperties$1(type, props);
@@ -2194,34 +2146,55 @@ var resetCurrentDebugStack = function () {};
2194
2146
  return describeComponentFrame(name, source, ownerName);
2195
2147
  };
2196
2148
 
2197
- currentDebugStack = null;
2198
- currentDebugElementStack = null;
2199
- setCurrentDebugStack = function (stack) {
2200
- var frame = stack[stack.length - 1];
2201
- currentDebugElementStack = frame.debugElementStack;
2202
- // We are about to enter a new composite stack, reset the array.
2203
- currentDebugElementStack.length = 0;
2204
- currentDebugStack = stack;
2205
- ReactDebugCurrentFrame.getCurrentStack = getStackAddendum;
2149
+ pushCurrentDebugStack = function (stack) {
2150
+ currentDebugStacks.push(stack);
2151
+
2152
+ if (currentDebugStacks.length === 1) {
2153
+ // We are entering a server renderer.
2154
+ // Remember the previous (e.g. client) global stack implementation.
2155
+ prevGetCurrentStackImpl = ReactDebugCurrentFrame.getCurrentStack;
2156
+ ReactDebugCurrentFrame.getCurrentStack = getCurrentServerStackImpl;
2157
+ }
2206
2158
  };
2159
+
2207
2160
  pushElementToDebugStack = function (element) {
2208
- if (currentDebugElementStack !== null) {
2209
- currentDebugElementStack.push(element);
2210
- }
2161
+ // For the innermost executing ReactDOMServer call,
2162
+ var stack = currentDebugStacks[currentDebugStacks.length - 1];
2163
+ // Take the innermost executing frame (e.g. <Foo>),
2164
+ var frame = stack[stack.length - 1];
2165
+ // and record that it has one more element associated with it.
2166
+ frame.debugElementStack.push(element);
2167
+ // We only need this because we tail-optimize single-element
2168
+ // children and directly handle them in an inner loop instead of
2169
+ // creating separate frames for them.
2211
2170
  };
2212
- resetCurrentDebugStack = function () {
2213
- currentDebugElementStack = null;
2214
- currentDebugStack = null;
2215
- ReactDebugCurrentFrame.getCurrentStack = null;
2171
+
2172
+ popCurrentDebugStack = function () {
2173
+ currentDebugStacks.pop();
2174
+
2175
+ if (currentDebugStacks.length === 0) {
2176
+ // We are exiting the server renderer.
2177
+ // Restore the previous (e.g. client) global stack implementation.
2178
+ ReactDebugCurrentFrame.getCurrentStack = prevGetCurrentStackImpl;
2179
+ prevGetCurrentStackImpl = null;
2180
+ }
2216
2181
  };
2217
- getStackAddendum = function () {
2218
- if (currentDebugStack === null) {
2182
+
2183
+ getCurrentServerStackImpl = function () {
2184
+ if (currentDebugStacks.length === 0) {
2185
+ // Nothing is currently rendering.
2219
2186
  return '';
2220
2187
  }
2188
+ // ReactDOMServer is reentrant so there may be multiple calls at the same time.
2189
+ // Take the frames from the innermost call which is the last in the array.
2190
+ var frames = currentDebugStacks[currentDebugStacks.length - 1];
2221
2191
  var stack = '';
2222
- var debugStack = currentDebugStack;
2223
- for (var i = debugStack.length - 1; i >= 0; i--) {
2224
- var frame = debugStack[i];
2192
+ // Go through every frame in the stack from the innermost one.
2193
+ for (var i = frames.length - 1; i >= 0; i--) {
2194
+ var frame = frames[i];
2195
+ // Every frame might have more than one debug element stack entry associated with it.
2196
+ // This is because single-child nesting doesn't create materialized frames.
2197
+ // Instead it would push them through `pushElementToDebugStack()`.
2225
2198
  var _debugElementStack = frame.debugElementStack;
2226
2199
  for (var ii = _debugElementStack.length - 1; ii >= 0; ii--) {
2227
2200
  stack += describeStackFrame(_debugElementStack[ii]);
@@ -2248,10 +2221,6 @@ var newlineEatingTags = {
2248
2221
  textarea: true
2249
2222
  };
2250
2223
 
2251
- function getComponentName(type) {
2252
- return typeof type === 'string' ? type : typeof type === 'function' ? type.displayName || type.name : null;
2253
- }
2254
-
2255
2224
  // We accept any tag to be rendered but since this gets injected into arbitrary
2256
2225
  // HTML, we want to make sure that it's a safe tag.
2257
2226
  // http://www.w3.org/TR/REC-xml/#NT-Name
@@ -2259,14 +2228,20 @@ var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
2259
2228
  var validatedTagCache = {};
2260
2229
  function validateDangerousTag(tag) {
2261
2230
  if (!validatedTagCache.hasOwnProperty(tag)) {
2262
- !VALID_TAG_REGEX.test(tag) ? invariant_1(false, 'Invalid tag: %s', tag) : void 0;
2231
+ !VALID_TAG_REGEX.test(tag) ? invariant(false, 'Invalid tag: %s', tag) : void 0;
2263
2232
  validatedTagCache[tag] = true;
2264
2233
  }
2265
2234
  }
2266
2235
 
2267
- var processStyleName = memoizeStringOnly_1(function (styleName) {
2268
- return hyphenateStyleName_1(styleName);
2269
- });
2236
+ var styleNameCache = {};
2237
+ var processStyleName = function (styleName) {
2238
+ if (styleNameCache.hasOwnProperty(styleName)) {
2239
+ return styleNameCache[styleName];
2240
+ }
2241
+ var result = hyphenateStyleName(styleName);
2242
+ styleNameCache[styleName] = result;
2243
+ return result;
2244
+ };
2270
2245
 
2271
2246
  function createMarkupForStyles(styles) {
2272
2247
  var serialized = '';
@@ -2279,7 +2254,7 @@ function createMarkupForStyles(styles) {
2279
2254
  var styleValue = styles[styleName];
2280
2255
  {
2281
2256
  if (!isCustomProperty) {
2282
- warnValidStyle$1(styleName, styleValue, getStackAddendum);
2257
+ warnValidStyle$1(styleName, styleValue);
2283
2258
  }
2284
2259
  }
2285
2260
  if (styleValue != null) {
@@ -2301,7 +2276,7 @@ function warnNoop(publicInstance, callerName) {
2301
2276
  return;
2302
2277
  }
2303
2278
 
2304
- warning_1(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op.\n\nPlease check the code for the %s component.', callerName, callerName, componentName);
2279
+ warningWithoutStack$1(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op.\n\nPlease check the code for the %s component.', callerName, callerName, componentName);
2305
2280
  didWarnAboutNoopUpdateForComponent[warningKey] = true;
2306
2281
  }
2307
2282
  }
@@ -2342,6 +2317,9 @@ function flattenTopLevelChildren(children) {
2342
2317
  }
2343
2318
 
2344
2319
  function flattenOptionChildren(children) {
2320
+ if (children === undefined || children === null) {
2321
+ return children;
2322
+ }
2345
2323
  var content = '';
2346
2324
  // Flatten children and warn if they aren't strings or numbers;
2347
2325
  // invalid types are ignored.
@@ -2349,24 +2327,26 @@ function flattenOptionChildren(children) {
2349
2327
  if (child == null) {
2350
2328
  return;
2351
2329
  }
2352
- if (typeof child === 'string' || typeof child === 'number') {
2353
- content += child;
2354
- } else {
2355
- {
2356
- if (!didWarnInvalidOptionChildren) {
2357
- didWarnInvalidOptionChildren = true;
2358
- warning_1(false, 'Only strings and numbers are supported as <option> children.');
2359
- }
2330
+ content += child;
2331
+ {
2332
+ if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') {
2333
+ didWarnInvalidOptionChildren = true;
2334
+ warning$1(false, 'Only strings and numbers are supported as <option> children.');
2360
2335
  }
2361
2336
  }
2362
2337
  });
2363
2338
  return content;
2364
2339
  }
2365
2340
 
2341
+ var emptyObject = {};
2342
+ {
2343
+ Object.freeze(emptyObject);
2344
+ }
2345
+
2366
2346
  function maskContext(type, context) {
2367
2347
  var contextTypes = type.contextTypes;
2368
2348
  if (!contextTypes) {
2369
- return emptyObject_1;
2349
+ return emptyObject;
2370
2350
  }
2371
2351
  var maskedContext = {};
2372
2352
  for (var contextName in contextTypes) {
@@ -2377,7 +2357,7 @@ function maskContext(type, context) {
2377
2357
 
2378
2358
  function checkContextTypes(typeSpecs, values, location) {
2379
2359
  {
2380
- checkPropTypes_1(typeSpecs, values, location, 'Component', getStackAddendum);
2360
+ checkPropTypes_1(typeSpecs, values, location, 'Component', getCurrentServerStackImpl);
2381
2361
  }
2382
2362
  }
2383
2363
 
@@ -2441,7 +2421,7 @@ function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeSt
2441
2421
 
2442
2422
  function validateRenderResult(child, type) {
2443
2423
  if (child === undefined) {
2444
- invariant_1(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', getComponentName(type) || 'Component');
2424
+ invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', getComponentName(type) || 'Component');
2445
2425
  }
2446
2426
  }
2447
2427
 
@@ -2497,7 +2477,7 @@ function resolve(child, context) {
2497
2477
  if (inst.state === null || inst.state === undefined) {
2498
2478
  var componentName = getComponentName(Component) || 'Unknown';
2499
2479
  if (!didWarnAboutUninitializedState[componentName]) {
2500
- warning_1(false, '%s: Did not properly initialize state during construction. ' + 'Expected state to be an object, but it was %s.', componentName, inst.state === null ? 'null' : 'undefined');
2480
+ warningWithoutStack$1(false, '`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, inst.state === null ? 'null' : 'undefined', componentName);
2501
2481
  didWarnAboutUninitializedState[componentName] = true;
2502
2482
  }
2503
2483
  }
@@ -2509,7 +2489,7 @@ function resolve(child, context) {
2509
2489
  if (partialState === undefined) {
2510
2490
  var _componentName = getComponentName(Component) || 'Unknown';
2511
2491
  if (!didWarnAboutUndefinedDerivedState[_componentName]) {
2512
- warning_1(false, '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', _componentName);
2492
+ warningWithoutStack$1(false, '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', _componentName);
2513
2493
  didWarnAboutUndefinedDerivedState[_componentName] = true;
2514
2494
  }
2515
2495
  }
@@ -2525,7 +2505,7 @@ function resolve(child, context) {
2525
2505
  var _componentName2 = getComponentName(Component) || 'Unknown';
2526
2506
 
2527
2507
  if (!didWarnAboutBadClass[_componentName2]) {
2528
- 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.', _componentName2, _componentName2);
2508
+ warningWithoutStack$1(false, "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', _componentName2, _componentName2);
2529
2509
  didWarnAboutBadClass[_componentName2] = true;
2530
2510
  }
2531
2511
  }
@@ -2616,10 +2596,10 @@ function resolve(child, context) {
2616
2596
  if (typeof childContextTypes === 'object') {
2617
2597
  childContext = inst.getChildContext();
2618
2598
  for (var contextKey in childContext) {
2619
- !(contextKey in childContextTypes) ? invariant_1(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', getComponentName(Component) || 'Unknown', contextKey) : void 0;
2599
+ !(contextKey in childContextTypes) ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', getComponentName(Component) || 'Unknown', contextKey) : void 0;
2620
2600
  }
2621
2601
  } else {
2622
- warning_1(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
2602
+ warningWithoutStack$1(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
2623
2603
  }
2624
2604
  }
2625
2605
  if (childContext) {
@@ -2644,7 +2624,7 @@ var ReactDOMServerRenderer = function () {
2644
2624
  domNamespace: Namespaces.html,
2645
2625
  children: flatChildren,
2646
2626
  childIndex: 0,
2647
- context: emptyObject_1,
2627
+ context: emptyObject,
2648
2628
  footer: ''
2649
2629
  };
2650
2630
  {
@@ -2698,7 +2678,7 @@ var ReactDOMServerRenderer = function () {
2698
2678
  ReactDOMServerRenderer.prototype.popProvider = function popProvider(provider) {
2699
2679
  var index = this.contextIndex;
2700
2680
  {
2701
- !(index > -1 && provider === this.contextProviderStack[index]) ? warning_1(false, 'Unexpected pop.') : void 0;
2681
+ !(index > -1 && provider === this.contextProviderStack[index]) ? warningWithoutStack$1(false, 'Unexpected pop.') : void 0;
2702
2682
  }
2703
2683
 
2704
2684
  var context = this.contextStack[index];
@@ -2747,12 +2727,15 @@ var ReactDOMServerRenderer = function () {
2747
2727
  }
2748
2728
  var child = frame.children[frame.childIndex++];
2749
2729
  {
2750
- setCurrentDebugStack(this.stack);
2751
- }
2752
- out += this.render(child, frame.context, frame.domNamespace);
2753
- {
2754
- // TODO: Handle reentrant server render calls. This doesn't.
2755
- resetCurrentDebugStack();
2730
+ pushCurrentDebugStack(this.stack);
2731
+ // We're starting work on this frame, so reset its inner stack.
2732
+ frame.debugElementStack.length = 0;
2733
+ try {
2734
+ // Be careful! Make sure this matches the PROD path below.
2735
+ out += this.render(child, frame.context, frame.domNamespace);
2736
+ } finally {
2737
+ popCurrentDebugStack();
2738
+ }
2756
2739
  }
2757
2740
  }
2758
2741
  return out;
@@ -2786,9 +2769,9 @@ var ReactDOMServerRenderer = function () {
2786
2769
  if (nextChild != null && nextChild.$$typeof != null) {
2787
2770
  // Catch unexpected special types early.
2788
2771
  var $$typeof = nextChild.$$typeof;
2789
- !($$typeof !== REACT_PORTAL_TYPE) ? invariant_1(false, 'Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.') : void 0;
2772
+ !($$typeof !== REACT_PORTAL_TYPE) ? invariant(false, 'Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.') : void 0;
2790
2773
  // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type.
2791
- invariant_1(false, 'Unknown element-like object type: %s. This is likely a bug in React. Please file an issue.', $$typeof.toString());
2774
+ invariant(false, 'Unknown element-like object type: %s. This is likely a bug in React. Please file an issue.', $$typeof.toString());
2792
2775
  }
2793
2776
  var nextChildren = toArray(nextChild);
2794
2777
  var frame = {
@@ -2834,6 +2817,27 @@ var ReactDOMServerRenderer = function () {
2834
2817
  this.stack.push(_frame);
2835
2818
  return '';
2836
2819
  }
2820
+ case REACT_PLACEHOLDER_TYPE:
2821
+ {
2822
+ if (enableSuspenseServerRenderer) {
2823
+ var _nextChildren2 = toArray(
2824
+ // Always use the fallback when synchronously rendering to string.
2825
+ nextChild.props.fallback);
2826
+ var _frame2 = {
2827
+ type: null,
2828
+ domNamespace: parentNamespace,
2829
+ children: _nextChildren2,
2830
+ childIndex: 0,
2831
+ context: context,
2832
+ footer: ''
2833
+ };
2834
+ {
2835
+ _frame2.debugElementStack = [];
2836
+ }
2837
+ this.stack.push(_frame2);
2838
+ return '';
2839
+ }
2840
+ }
2837
2841
  // eslint-disable-next-line-no-fallthrough
2838
2842
  default:
2839
2843
  break;
@@ -2843,41 +2847,41 @@ var ReactDOMServerRenderer = function () {
2843
2847
  case REACT_FORWARD_REF_TYPE:
2844
2848
  {
2845
2849
  var element = nextChild;
2846
- var _nextChildren2 = toArray(elementType.render(element.props, element.ref));
2847
- var _frame2 = {
2850
+ var _nextChildren3 = toArray(elementType.render(element.props, element.ref));
2851
+ var _frame3 = {
2848
2852
  type: null,
2849
2853
  domNamespace: parentNamespace,
2850
- children: _nextChildren2,
2854
+ children: _nextChildren3,
2851
2855
  childIndex: 0,
2852
2856
  context: context,
2853
2857
  footer: ''
2854
2858
  };
2855
2859
  {
2856
- _frame2.debugElementStack = [];
2860
+ _frame3.debugElementStack = [];
2857
2861
  }
2858
- this.stack.push(_frame2);
2862
+ this.stack.push(_frame3);
2859
2863
  return '';
2860
2864
  }
2861
2865
  case REACT_PROVIDER_TYPE:
2862
2866
  {
2863
2867
  var provider = nextChild;
2864
2868
  var nextProps = provider.props;
2865
- var _nextChildren3 = toArray(nextProps.children);
2866
- var _frame3 = {
2869
+ var _nextChildren4 = toArray(nextProps.children);
2870
+ var _frame4 = {
2867
2871
  type: provider,
2868
2872
  domNamespace: parentNamespace,
2869
- children: _nextChildren3,
2873
+ children: _nextChildren4,
2870
2874
  childIndex: 0,
2871
2875
  context: context,
2872
2876
  footer: ''
2873
2877
  };
2874
2878
  {
2875
- _frame3.debugElementStack = [];
2879
+ _frame4.debugElementStack = [];
2876
2880
  }
2877
2881
 
2878
2882
  this.pushProvider(provider);
2879
2883
 
2880
- this.stack.push(_frame3);
2884
+ this.stack.push(_frame4);
2881
2885
  return '';
2882
2886
  }
2883
2887
  case REACT_CONTEXT_TYPE:
@@ -2886,19 +2890,19 @@ var ReactDOMServerRenderer = function () {
2886
2890
  var _nextProps = consumer.props;
2887
2891
  var nextValue = consumer.type._currentValue;
2888
2892
 
2889
- var _nextChildren4 = toArray(_nextProps.children(nextValue));
2890
- var _frame4 = {
2893
+ var _nextChildren5 = toArray(_nextProps.children(nextValue));
2894
+ var _frame5 = {
2891
2895
  type: nextChild,
2892
2896
  domNamespace: parentNamespace,
2893
- children: _nextChildren4,
2897
+ children: _nextChildren5,
2894
2898
  childIndex: 0,
2895
2899
  context: context,
2896
2900
  footer: ''
2897
2901
  };
2898
2902
  {
2899
- _frame4.debugElementStack = [];
2903
+ _frame5.debugElementStack = [];
2900
2904
  }
2901
- this.stack.push(_frame4);
2905
+ this.stack.push(_frame5);
2902
2906
  return '';
2903
2907
  }
2904
2908
  default:
@@ -2917,7 +2921,7 @@ var ReactDOMServerRenderer = function () {
2917
2921
  info += '\n\nCheck the render method of `' + ownerName + '`.';
2918
2922
  }
2919
2923
  }
2920
- 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', elementType == null ? elementType : typeof elementType, info);
2924
+ invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', elementType == null ? elementType : typeof elementType, info);
2921
2925
  }
2922
2926
  };
2923
2927
 
@@ -2933,7 +2937,7 @@ var ReactDOMServerRenderer = function () {
2933
2937
  if (namespace === Namespaces.html) {
2934
2938
  // Should this check be gated by parent namespace? Not sure we want to
2935
2939
  // allow <SVG> or <mATH>.
2936
- !(tag === element.type) ? warning_1(false, '<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', element.type) : void 0;
2940
+ !(tag === element.type) ? warning$1(false, '<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', element.type) : void 0;
2937
2941
  }
2938
2942
  }
2939
2943
 
@@ -2942,14 +2946,14 @@ var ReactDOMServerRenderer = function () {
2942
2946
  var props = element.props;
2943
2947
  if (tag === 'input') {
2944
2948
  {
2945
- ReactControlledValuePropTypes.checkPropTypes('input', props, getStackAddendum);
2949
+ ReactControlledValuePropTypes.checkPropTypes('input', props);
2946
2950
 
2947
2951
  if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) {
2948
- 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', 'A component', props.type);
2952
+ 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', 'A component', props.type);
2949
2953
  didWarnDefaultChecked = true;
2950
2954
  }
2951
2955
  if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) {
2952
- 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', 'A component', props.type);
2956
+ 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', 'A component', props.type);
2953
2957
  didWarnDefaultInputValue = true;
2954
2958
  }
2955
2959
  }
@@ -2964,9 +2968,9 @@ var ReactDOMServerRenderer = function () {
2964
2968
  });
2965
2969
  } else if (tag === 'textarea') {
2966
2970
  {
2967
- ReactControlledValuePropTypes.checkPropTypes('textarea', props, getStackAddendum);
2971
+ ReactControlledValuePropTypes.checkPropTypes('textarea', props);
2968
2972
  if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {
2969
- 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');
2973
+ 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');
2970
2974
  didWarnDefaultTextareaValue = true;
2971
2975
  }
2972
2976
  }
@@ -2978,11 +2982,11 @@ var ReactDOMServerRenderer = function () {
2978
2982
  var textareaChildren = props.children;
2979
2983
  if (textareaChildren != null) {
2980
2984
  {
2981
- warning_1(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
2985
+ warning$1(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
2982
2986
  }
2983
- !(defaultValue == null) ? invariant_1(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : void 0;
2987
+ !(defaultValue == null) ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : void 0;
2984
2988
  if (Array.isArray(textareaChildren)) {
2985
- !(textareaChildren.length <= 1) ? invariant_1(false, '<textarea> can only have at most one child.') : void 0;
2989
+ !(textareaChildren.length <= 1) ? invariant(false, '<textarea> can only have at most one child.') : void 0;
2986
2990
  textareaChildren = textareaChildren[0];
2987
2991
  }
2988
2992
 
@@ -3000,7 +3004,7 @@ var ReactDOMServerRenderer = function () {
3000
3004
  });
3001
3005
  } else if (tag === 'select') {
3002
3006
  {
3003
- ReactControlledValuePropTypes.checkPropTypes('select', props, getStackAddendum);
3007
+ ReactControlledValuePropTypes.checkPropTypes('select', props);
3004
3008
 
3005
3009
  for (var i = 0; i < valuePropNames.length; i++) {
3006
3010
  var propName = valuePropNames[i];
@@ -3009,16 +3013,14 @@ var ReactDOMServerRenderer = function () {
3009
3013
  }
3010
3014
  var isArray = Array.isArray(props[propName]);
3011
3015
  if (props.multiple && !isArray) {
3012
- warning_1(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, '' // getDeclarationErrorAddendum(),
3013
- );
3016
+ warning$1(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName);
3014
3017
  } else if (!props.multiple && isArray) {
3015
- warning_1(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, '' // getDeclarationErrorAddendum(),
3016
- );
3018
+ warning$1(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName);
3017
3019
  }
3018
3020
  }
3019
3021
 
3020
3022
  if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {
3021
- 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');
3023
+ 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');
3022
3024
  didWarnDefaultSelectValue = true;
3023
3025
  }
3024
3026
  }
@@ -3064,7 +3066,7 @@ var ReactDOMServerRenderer = function () {
3064
3066
  validatePropertiesInDevelopment(tag, props);
3065
3067
  }
3066
3068
 
3067
- assertValidProps(tag, props, getStackAddendum);
3069
+ assertValidProps(tag, props);
3068
3070
 
3069
3071
  var out = createOpenTagMarkup(element.type, tag, props, namespace, this.makeStaticMarkup, this.stack.length === 1);
3070
3072
  var footer = '';
@@ -3137,11 +3139,11 @@ function renderToStaticMarkup(element) {
3137
3139
  }
3138
3140
 
3139
3141
  function renderToNodeStream() {
3140
- invariant_1(false, 'ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead.');
3142
+ invariant(false, 'ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead.');
3141
3143
  }
3142
3144
 
3143
3145
  function renderToStaticNodeStream() {
3144
- invariant_1(false, 'ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.');
3146
+ invariant(false, 'ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.');
3145
3147
  }
3146
3148
 
3147
3149
  // Note: when changing this, also consider https://github.com/facebook/react/issues/11526
@@ -3161,7 +3163,7 @@ var ReactDOMServer = ( ReactDOMServerBrowser$1 && ReactDOMServerBrowser ) || Rea
3161
3163
 
3162
3164
  // TODO: decide on the top-level export form.
3163
3165
  // This is hacky but makes it work with both Rollup and Jest
3164
- var server_browser = ReactDOMServer.default ? ReactDOMServer.default : ReactDOMServer;
3166
+ var server_browser = ReactDOMServer.default || ReactDOMServer;
3165
3167
 
3166
3168
  return server_browser;
3167
3169