react-dom 16.10.2 → 16.13.1

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.
Files changed (28) hide show
  1. package/build-info.json +5 -5
  2. package/cjs/react-dom-server.browser.development.js +411 -729
  3. package/cjs/react-dom-server.browser.production.min.js +41 -41
  4. package/cjs/react-dom-server.node.development.js +406 -720
  5. package/cjs/react-dom-server.node.production.min.js +40 -40
  6. package/cjs/react-dom-test-utils.development.js +200 -393
  7. package/cjs/react-dom-test-utils.production.min.js +22 -22
  8. package/cjs/react-dom-unstable-fizz.browser.development.js +11 -25
  9. package/cjs/react-dom-unstable-fizz.browser.production.min.js +3 -3
  10. package/cjs/react-dom-unstable-fizz.node.development.js +24 -27
  11. package/cjs/react-dom-unstable-fizz.node.production.min.js +4 -3
  12. package/cjs/react-dom-unstable-native-dependencies.development.js +203 -338
  13. package/cjs/react-dom-unstable-native-dependencies.production.min.js +23 -27
  14. package/cjs/react-dom.development.js +10451 -13365
  15. package/cjs/react-dom.production.min.js +280 -281
  16. package/cjs/react-dom.profiling.min.js +285 -285
  17. package/package.json +3 -3
  18. package/umd/react-dom-server.browser.development.js +3310 -3639
  19. package/umd/react-dom-server.browser.production.min.js +38 -38
  20. package/umd/react-dom-test-utils.development.js +1181 -1374
  21. package/umd/react-dom-test-utils.production.min.js +23 -23
  22. package/umd/react-dom-unstable-fizz.browser.development.js +105 -119
  23. package/umd/react-dom-unstable-fizz.browser.production.min.js +3 -3
  24. package/umd/react-dom-unstable-native-dependencies.development.js +1326 -1462
  25. package/umd/react-dom-unstable-native-dependencies.production.min.js +21 -22
  26. package/umd/react-dom.development.js +19905 -22830
  27. package/umd/react-dom.production.min.js +229 -234
  28. package/umd/react-dom.profiling.min.js +237 -241
@@ -1,4 +1,4 @@
1
- /** @license React v16.10.2
1
+ /** @license React v16.13.1
2
2
  * react-dom-server.browser.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -15,74 +15,91 @@ if (process.env.NODE_ENV !== "production") {
15
15
  (function() {
16
16
  'use strict';
17
17
 
18
- var _assign = require('object-assign');
19
18
  var React = require('react');
19
+ var _assign = require('object-assign');
20
20
  var checkPropTypes = require('prop-types/checkPropTypes');
21
21
 
22
22
  // Do not require this module directly! Use normal `invariant` calls with
23
- // template literal strings. The messages will be converted to ReactError during
24
- // build, and in production they will be minified.
23
+ // template literal strings. The messages will be replaced with error codes
24
+ // during build.
25
+ function formatProdErrorMessage(code) {
26
+ var url = 'https://reactjs.org/docs/error-decoder.html?invariant=' + code;
25
27
 
26
- // Do not require this module directly! Use normal `invariant` calls with
27
- // template literal strings. The messages will be converted to ReactError during
28
- // build, and in production they will be minified.
29
- function ReactError(error) {
30
- error.name = 'Invariant Violation';
31
- return error;
28
+ for (var i = 1; i < arguments.length; i++) {
29
+ url += '&args[]=' + encodeURIComponent(arguments[i]);
30
+ }
31
+
32
+ return "Minified React error #" + code + "; visit " + url + " for the full message or " + 'use the non-minified dev environment for full errors and additional ' + 'helpful warnings.';
32
33
  }
33
34
 
34
- // TODO: this is special because it gets imported during build.
35
+ var ReactVersion = '16.13.1';
35
36
 
36
- var ReactVersion = '16.10.2';
37
+ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
38
+ // Current owner and dispatcher used to share the same ref,
39
+ // but PR #14548 split them out to better support the react-debug-tools package.
37
40
 
38
- /**
39
- * Use invariant() to assert state which your program assumes to be true.
40
- *
41
- * Provide sprintf-style format (only %s is supported) and arguments
42
- * to provide information about what broke and what you were
43
- * expecting.
44
- *
45
- * The invariant message will be stripped in production, but the invariant
46
- * will remain to ensure logic does not differ in production.
47
- */
41
+ if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
42
+ ReactSharedInternals.ReactCurrentDispatcher = {
43
+ current: null
44
+ };
45
+ }
48
46
 
49
- /**
50
- * Similar to invariant but only logs a warning if the condition is not met.
51
- * This can be used to log issues in development environments in critical
52
- * paths. Removing the logging code for production environments will keep the
53
- * same logic and follow the same code paths.
54
- */
55
- var warningWithoutStack = function () {};
47
+ if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
48
+ ReactSharedInternals.ReactCurrentBatchConfig = {
49
+ suspense: null
50
+ };
51
+ }
56
52
 
57
- {
58
- warningWithoutStack = function (condition, format) {
59
- for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
60
- args[_key - 2] = arguments[_key];
61
- }
53
+ // by calls to these methods by a Babel plugin.
54
+ //
55
+ // In PROD (or in packages without access to React internals),
56
+ // they are left as they are instead.
62
57
 
63
- if (format === undefined) {
64
- throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
58
+ function warn(format) {
59
+ {
60
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
61
+ args[_key - 1] = arguments[_key];
65
62
  }
66
63
 
67
- if (args.length > 8) {
68
- // Check before the condition to catch violations early.
69
- throw new Error('warningWithoutStack() currently supports at most 8 arguments.');
64
+ printWarning('warn', format, args);
65
+ }
66
+ }
67
+ function error(format) {
68
+ {
69
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
70
+ args[_key2 - 1] = arguments[_key2];
70
71
  }
71
72
 
72
- if (condition) {
73
- return;
74
- }
73
+ printWarning('error', format, args);
74
+ }
75
+ }
75
76
 
76
- if (typeof console !== 'undefined') {
77
- var argsWithFormat = args.map(function (item) {
78
- return '' + item;
79
- });
80
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
81
- // breaks IE9: https://github.com/facebook/react/issues/13610
77
+ function printWarning(level, format, args) {
78
+ // When changing this logic, you might want to also
79
+ // update consoleWithStackDev.www.js as well.
80
+ {
81
+ var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
82
82
 
83
- Function.prototype.apply.call(console.error, console, argsWithFormat);
83
+ if (!hasExistingStack) {
84
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
85
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
86
+
87
+ if (stack !== '') {
88
+ format += '%s';
89
+ args = args.concat([stack]);
90
+ }
84
91
  }
85
92
 
93
+ var argsWithFormat = args.map(function (item) {
94
+ return '' + item;
95
+ }); // Careful: RN currently depends on this prefix
96
+
97
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
98
+ // breaks IE9: https://github.com/facebook/react/issues/13610
99
+ // eslint-disable-next-line react-internal/no-production-logging
100
+
101
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
102
+
86
103
  try {
87
104
  // --- Welcome to debugging React ---
88
105
  // This error was thrown as a convenience so that you can use this stack
@@ -93,78 +110,28 @@ var warningWithoutStack = function () {};
93
110
  });
94
111
  throw new Error(message);
95
112
  } catch (x) {}
96
- };
113
+ }
97
114
  }
98
115
 
99
- var warningWithoutStack$1 = warningWithoutStack;
100
-
101
116
  // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
102
117
  // nor polyfill, then a plain number is used for performance.
103
118
  var hasSymbol = typeof Symbol === 'function' && Symbol.for;
104
-
105
119
  var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
106
120
  var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
107
121
  var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
108
122
  var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
109
123
  var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
110
124
  var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
111
- // (unstable) APIs that have been removed. Can we remove the symbols?
112
-
113
-
114
125
  var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
115
126
  var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
116
127
  var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
117
128
  var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
118
129
  var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
119
130
  var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
131
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
120
132
  var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
121
-
122
133
  var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
123
134
 
124
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
125
- // Current owner and dispatcher used to share the same ref,
126
- // but PR #14548 split them out to better support the react-debug-tools package.
127
-
128
- if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
129
- ReactSharedInternals.ReactCurrentDispatcher = {
130
- current: null
131
- };
132
- }
133
-
134
- if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
135
- ReactSharedInternals.ReactCurrentBatchConfig = {
136
- suspense: null
137
- };
138
- }
139
-
140
- /**
141
- * Similar to invariant but only logs a warning if the condition is not met.
142
- * This can be used to log issues in development environments in critical
143
- * paths. Removing the logging code for production environments will keep the
144
- * same logic and follow the same code paths.
145
- */
146
-
147
- var warning = warningWithoutStack$1;
148
-
149
- {
150
- warning = function (condition, format) {
151
- if (condition) {
152
- return;
153
- }
154
-
155
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
156
- var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args
157
-
158
- for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
159
- args[_key - 2] = arguments[_key];
160
- }
161
-
162
- warningWithoutStack$1.apply(void 0, [false, format + '%s'].concat(args, [stack]));
163
- };
164
- }
165
-
166
- var warning$1 = warning;
167
-
168
135
  var Uninitialized = -1;
169
136
  var Pending = 0;
170
137
  var Resolved = 1;
@@ -184,7 +151,7 @@ function initializeLazyComponentType(lazyComponent) {
184
151
 
185
152
  {
186
153
  if (defaultExport === undefined) {
187
- warning$1(false, 'lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + "const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
154
+ error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + "const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
188
155
  }
189
156
  }
190
157
 
@@ -213,7 +180,7 @@ function getComponentName(type) {
213
180
 
214
181
  {
215
182
  if (typeof type.tag === 'number') {
216
- warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
183
+ error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
217
184
  }
218
185
  }
219
186
 
@@ -259,6 +226,9 @@ function getComponentName(type) {
259
226
  case REACT_MEMO_TYPE:
260
227
  return getComponentName(type.type);
261
228
 
229
+ case REACT_BLOCK_TYPE:
230
+ return getComponentName(type.render);
231
+
262
232
  case REACT_LAZY_TYPE:
263
233
  {
264
234
  var thenable = type;
@@ -276,63 +246,8 @@ function getComponentName(type) {
276
246
  return null;
277
247
  }
278
248
 
279
- /**
280
- * Forked from fbjs/warning:
281
- * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
282
- *
283
- * Only change is we use console.warn instead of console.error,
284
- * and do nothing when 'console' is not supported.
285
- * This really simplifies the code.
286
- * ---
287
- * Similar to invariant but only logs a warning if the condition is not met.
288
- * This can be used to log issues in development environments in critical
289
- * paths. Removing the logging code for production environments will keep the
290
- * same logic and follow the same code paths.
291
- */
292
- var lowPriorityWarningWithoutStack = function () {};
293
-
294
- {
295
- var printWarning = function (format) {
296
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
297
- args[_key - 1] = arguments[_key];
298
- }
299
-
300
- var argIndex = 0;
301
- var message = 'Warning: ' + format.replace(/%s/g, function () {
302
- return args[argIndex++];
303
- });
304
-
305
- if (typeof console !== 'undefined') {
306
- console.warn(message);
307
- }
308
-
309
- try {
310
- // --- Welcome to debugging React ---
311
- // This error was thrown as a convenience so that you can use this stack
312
- // to find the callsite that caused this warning to fire.
313
- throw new Error(message);
314
- } catch (x) {}
315
- };
316
-
317
- lowPriorityWarningWithoutStack = function (condition, format) {
318
- if (format === undefined) {
319
- throw new Error('`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
320
- }
321
-
322
- if (!condition) {
323
- for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
324
- args[_key2 - 2] = arguments[_key2];
325
- }
326
-
327
- printWarning.apply(void 0, [format].concat(args));
328
- }
329
- };
330
- }
331
-
332
- var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack;
333
-
334
249
  var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
335
- var describeComponentFrame = function (name, source, ownerName) {
250
+ function describeComponentFrame (name, source, ownerName) {
336
251
  var sourceInfo = '';
337
252
 
338
253
  if (source) {
@@ -362,81 +277,17 @@ var describeComponentFrame = function (name, source, ownerName) {
362
277
  }
363
278
 
364
279
  return '\n in ' + (name || 'Unknown') + sourceInfo;
365
- };
366
-
367
- // Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
368
-
369
- // In some cases, StrictMode should also double-render lifecycles.
370
- // This can be confusing for tests though,
371
- // And it can be bad for performance in production.
372
- // This feature flag can be used to control the behavior:
373
-
374
- // To preserve the "Pause on caught exceptions" behavior of the debugger, we
375
- // replay the begin phase of a failed component inside invokeGuardedCallback.
376
-
377
- // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
378
-
379
- var warnAboutDeprecatedLifecycles = true; // Gather advanced timing metrics for Profiler subtrees.
380
-
381
- // Trace which interactions trigger each commit.
382
-
383
- // Only used in www builds.
384
-
385
- var enableSuspenseServerRenderer = false; // TODO: true? Here it might just be false.
386
-
387
- // Only used in www builds.
388
-
389
- // Only used in www builds.
390
-
391
- // Disable javascript: URL strings in href for XSS protection.
392
-
393
- var disableJavaScriptURLs = false; // React Fire: prevent the value and checked attributes from syncing
394
- // with their related DOM properties
395
-
396
- // These APIs will no longer be "unstable" in the upcoming 16.7 release,
397
- // Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
398
-
399
-
400
- // See https://github.com/react-native-community/discussions-and-proposals/issues/72 for more information
401
- // This is a flag so we can fix warnings in RN core before turning it on
402
-
403
- // Experimental React Flare event system and event components support.
404
-
405
- var enableFlareAPI = false; // Experimental Host Component support.
406
-
407
- var enableFundamentalAPI = false; // Experimental Scope support.
408
-
409
- var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107
410
-
411
- // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?)
412
- // Till then, we warn about the missing mock, but still fallback to a sync mode compatible version
413
-
414
- // For tests, we flush suspense fallbacks in an act scope;
415
- // *except* in some of our own tests, where we test incremental loading states.
416
-
417
- // Changes priority of some events like mousemove to user-blocking priority,
418
- // but without making them discrete. The flag exists in case it causes
419
- // starvation problems.
420
-
421
- // Add a callback property to suspense to notify which promises are currently
422
- // in the update queue. This allows reporting and tracing of what is causing
423
- // the user to see a loading state.
424
- // Also allows hydration callbacks to fire when a dehydrated boundary gets
425
- // hydrated or deleted.
426
-
427
- // Part of the simplification of React.createElement so we can eventually move
428
- // from React.createElement to React.jsx
429
- // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md
430
-
280
+ }
431
281
 
282
+ var enableSuspenseServerRenderer = false;
432
283
 
433
- var disableLegacyContext = false;
284
+ var enableDeprecatedFlareAPI = false; // Experimental Host Component support.
434
285
 
435
- var ReactDebugCurrentFrame$1;
286
+ var ReactDebugCurrentFrame;
436
287
  var didWarnAboutInvalidateContextType;
437
288
 
438
289
  {
439
- ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
290
+ ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
440
291
  didWarnAboutInvalidateContextType = new Set();
441
292
  }
442
293
 
@@ -464,7 +315,7 @@ function maskContext(type, context) {
464
315
 
465
316
  function checkContextTypes(typeSpecs, values, location) {
466
317
  {
467
- checkPropTypes(typeSpecs, values, location, 'Component', ReactDebugCurrentFrame$1.getCurrentStack);
318
+ checkPropTypes(typeSpecs, values, location, 'Component', ReactDebugCurrentFrame.getCurrentStack);
468
319
  }
469
320
  }
470
321
 
@@ -507,7 +358,7 @@ function processContext(type, context, threadID, isClass) {
507
358
  addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
508
359
  }
509
360
 
510
- warningWithoutStack$1(false, '%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(type) || 'Component', addendum);
361
+ error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(type) || 'Component', addendum);
511
362
  }
512
363
  }
513
364
  }
@@ -517,15 +368,7 @@ function processContext(type, context, threadID, isClass) {
517
368
  return contextType[threadID];
518
369
  }
519
370
 
520
- if (disableLegacyContext) {
521
- {
522
- if (type.contextTypes) {
523
- warningWithoutStack$1(false, '%s uses the legacy contextTypes API which is no longer supported. ' + 'Use React.createContext() with static contextType instead.', getComponentName(type) || 'Unknown');
524
- }
525
- }
526
-
527
- return emptyObject;
528
- } else {
371
+ {
529
372
  var maskedContext = maskContext(type, context);
530
373
 
531
374
  {
@@ -537,15 +380,7 @@ function processContext(type, context, threadID, isClass) {
537
380
  return maskedContext;
538
381
  }
539
382
  } else {
540
- if (disableLegacyContext) {
541
- {
542
- if (type.contextTypes) {
543
- warningWithoutStack$1(false, '%s uses the legacy contextTypes API which is no longer supported. ' + 'Use React.createContext() with React.useContext() instead.', getComponentName(type) || 'Unknown');
544
- }
545
- }
546
-
547
- return undefined;
548
- } else {
383
+ {
549
384
  var _maskedContext = maskContext(type, context);
550
385
 
551
386
  {
@@ -559,9 +394,6 @@ function processContext(type, context, threadID, isClass) {
559
394
  }
560
395
  }
561
396
 
562
- // Allocates a new index for each request. Tries to stay as compact as possible so that these
563
- // indices can be used to reference a tightly packed array. As opposed to being used in a Map.
564
- // The first allocated index is 1.
565
397
  var nextAvailableThreadIDs = new Uint16Array(16);
566
398
 
567
399
  for (var i = 0; i < 15; i++) {
@@ -575,13 +407,11 @@ function growThreadCountAndReturnNextAvailable() {
575
407
  var oldSize = oldArray.length;
576
408
  var newSize = oldSize * 2;
577
409
 
578
- (function () {
579
- if (!(newSize <= 0x10000)) {
580
- {
581
- throw ReactError(Error("Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic."));
582
- }
410
+ if (!(newSize <= 0x10000)) {
411
+ {
412
+ throw Error( "Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic." );
583
413
  }
584
- })();
414
+ }
585
415
 
586
416
  var newArray = new Uint16Array(newSize);
587
417
  newArray.set(oldArray);
@@ -643,18 +473,17 @@ var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\
643
473
  /* eslint-enable max-len */
644
474
 
645
475
  var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
646
-
647
476
  var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
648
477
  var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
649
- var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
478
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
650
479
  var illegalAttributeNameCache = {};
651
480
  var validatedAttributeNameCache = {};
652
481
  function isAttributeNameSafe(attributeName) {
653
- if (hasOwnProperty$1.call(validatedAttributeNameCache, attributeName)) {
482
+ if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
654
483
  return true;
655
484
  }
656
485
 
657
- if (hasOwnProperty$1.call(illegalAttributeNameCache, attributeName)) {
486
+ if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
658
487
  return false;
659
488
  }
660
489
 
@@ -666,7 +495,7 @@ function isAttributeNameSafe(attributeName) {
666
495
  illegalAttributeNameCache[attributeName] = true;
667
496
 
668
497
  {
669
- warning$1(false, 'Invalid attribute name: `%s`', attributeName);
498
+ error('Invalid attribute name: `%s`', attributeName);
670
499
  }
671
500
 
672
501
  return false;
@@ -766,10 +595,12 @@ function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attribut
766
595
 
767
596
  var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.
768
597
 
769
- ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
598
+ var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
770
599
  // elements (not just inputs). Now that ReactDOMInput assigns to the
771
600
  // defaultValue property -- do we need this?
772
- 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'].forEach(function (name) {
601
+ 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
602
+
603
+ reservedProps.forEach(function (name) {
773
604
  properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
774
605
  name, // attributeName
775
606
  null, // attributeNamespace
@@ -818,7 +649,10 @@ var properties = {}; // These props are reserved by React. They shouldn't be wri
818
649
 
819
650
  ['checked', // Note: `option.selected` is not updated if `select.multiple` is
820
651
  // disabled with `removeAttribute`. We have special logic for handling this.
821
- 'multiple', 'muted', 'selected'].forEach(function (name) {
652
+ 'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
653
+ // you'll need to set attributeName to name.toLowerCase()
654
+ // instead in the assignment below.
655
+ ].forEach(function (name) {
822
656
  properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
823
657
  name, // attributeName
824
658
  null, // attributeNamespace
@@ -826,14 +660,20 @@ var properties = {}; // These props are reserved by React. They shouldn't be wri
826
660
  }); // These are HTML attributes that are "overloaded booleans": they behave like
827
661
  // booleans, but can also accept a string value.
828
662
 
829
- ['capture', 'download'].forEach(function (name) {
663
+ ['capture', 'download' // NOTE: if you add a camelCased prop to this list,
664
+ // you'll need to set attributeName to name.toLowerCase()
665
+ // instead in the assignment below.
666
+ ].forEach(function (name) {
830
667
  properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
831
668
  name, // attributeName
832
669
  null, // attributeNamespace
833
670
  false);
834
671
  }); // These are HTML attributes that must be positive numbers.
835
672
 
836
- ['cols', 'rows', 'size', 'span'].forEach(function (name) {
673
+ ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
674
+ // you'll need to set attributeName to name.toLowerCase()
675
+ // instead in the assignment below.
676
+ ].forEach(function (name) {
837
677
  properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
838
678
  name, // attributeName
839
679
  null, // attributeNamespace
@@ -854,23 +694,32 @@ var capitalize = function (token) {
854
694
  // or boolean value assignment. Regular attributes that just accept strings
855
695
  // and have the same names are omitted, just like in the HTML whitelist.
856
696
  // Some of these attributes can be hard to find. This list was created by
857
- // scrapping the MDN documentation.
697
+ // scraping the MDN documentation.
858
698
 
859
699
 
860
- ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height'].forEach(function (attributeName) {
700
+ ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,
701
+ // you'll need to set attributeName to name.toLowerCase()
702
+ // instead in the assignment below.
703
+ ].forEach(function (attributeName) {
861
704
  var name = attributeName.replace(CAMELIZE, capitalize);
862
705
  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
863
706
  attributeName, null, // attributeNamespace
864
707
  false);
865
708
  }); // String SVG attributes with the xlink namespace.
866
709
 
867
- ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type'].forEach(function (attributeName) {
710
+ ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
711
+ // you'll need to set attributeName to name.toLowerCase()
712
+ // instead in the assignment below.
713
+ ].forEach(function (attributeName) {
868
714
  var name = attributeName.replace(CAMELIZE, capitalize);
869
715
  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
870
716
  attributeName, 'http://www.w3.org/1999/xlink', false);
871
717
  }); // String SVG attributes with the xml namespace.
872
718
 
873
- ['xml:base', 'xml:lang', 'xml:space'].forEach(function (attributeName) {
719
+ ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
720
+ // you'll need to set attributeName to name.toLowerCase()
721
+ // instead in the assignment below.
722
+ ].forEach(function (attributeName) {
874
723
  var name = attributeName.replace(CAMELIZE, capitalize);
875
724
  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
876
725
  attributeName, 'http://www.w3.org/XML/1998/namespace', false);
@@ -896,10 +745,10 @@ properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mu
896
745
  true);
897
746
  });
898
747
 
899
- var ReactDebugCurrentFrame$2 = null;
748
+ var ReactDebugCurrentFrame$1 = null;
900
749
 
901
750
  {
902
- ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
751
+ ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
903
752
  } // A javascript: URL can contain leading C0 control or \u0020 SPACE,
904
753
  // and any newline or tab are filtered out as if they're not part of the URL.
905
754
  // https://url.spec.whatwg.org/#url-parsing
@@ -916,17 +765,12 @@ var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r
916
765
  var didWarn = false;
917
766
 
918
767
  function sanitizeURL(url) {
919
- if (disableJavaScriptURLs) {
920
- (function () {
921
- if (!!isJavaScriptProtocol.test(url)) {
922
- {
923
- throw ReactError(Error("React has blocked a javascript: URL as a security precaution." + (ReactDebugCurrentFrame$2.getStackAddendum())));
924
- }
925
- }
926
- })();
927
- } else if (true && !didWarn && isJavaScriptProtocol.test(url)) {
928
- didWarn = true;
929
- warning$1(false, 'A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
768
+ {
769
+ if (!didWarn && isJavaScriptProtocol.test(url)) {
770
+ didWarn = true;
771
+
772
+ error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
773
+ }
930
774
  }
931
775
  }
932
776
 
@@ -1031,18 +875,6 @@ function quoteAttributeValueForBrowser(value) {
1031
875
  return '"' + escapeTextForBrowser(value) + '"';
1032
876
  }
1033
877
 
1034
- /**
1035
- * Operations for dealing with DOM properties.
1036
- */
1037
-
1038
- /**
1039
- * Creates markup for the ID property.
1040
- *
1041
- * @param {string} id Unescaped ID.
1042
- * @return {string} Markup string.
1043
- */
1044
-
1045
-
1046
878
  function createMarkupForRoot() {
1047
879
  return ROOT_ATTRIBUTE_NAME + '=""';
1048
880
  }
@@ -1110,7 +942,7 @@ function is(x, y) {
1110
942
  ;
1111
943
  }
1112
944
 
1113
- var is$1 = typeof Object.is === 'function' ? Object.is : is;
945
+ var objectIs = typeof Object.is === 'function' ? Object.is : is;
1114
946
 
1115
947
  var currentlyRenderingComponent = null;
1116
948
  var firstWorkInProgressHook = null;
@@ -1129,16 +961,16 @@ var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently
1129
961
  var currentHookNameInDev;
1130
962
 
1131
963
  function resolveCurrentlyRenderingComponent() {
1132
- (function () {
1133
- if (!(currentlyRenderingComponent !== null)) {
1134
- {
1135
- throw ReactError(Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem."));
1136
- }
964
+ if (!(currentlyRenderingComponent !== null)) {
965
+ {
966
+ throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
1137
967
  }
1138
- })();
968
+ }
1139
969
 
1140
970
  {
1141
- !!isInHookUserCodeInDev ? warning$1(false, 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks') : void 0;
971
+ if (isInHookUserCodeInDev) {
972
+ error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks');
973
+ }
1142
974
  }
1143
975
 
1144
976
  return currentlyRenderingComponent;
@@ -1147,7 +979,7 @@ function resolveCurrentlyRenderingComponent() {
1147
979
  function areHookInputsEqual(nextDeps, prevDeps) {
1148
980
  if (prevDeps === null) {
1149
981
  {
1150
- warning$1(false, '%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);
982
+ error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);
1151
983
  }
1152
984
 
1153
985
  return false;
@@ -1157,12 +989,12 @@ function areHookInputsEqual(nextDeps, prevDeps) {
1157
989
  // Don't bother comparing lengths in prod because these arrays should be
1158
990
  // passed inline.
1159
991
  if (nextDeps.length !== prevDeps.length) {
1160
- warning$1(false, 'The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, "[" + nextDeps.join(', ') + "]", "[" + prevDeps.join(', ') + "]");
992
+ error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, "[" + nextDeps.join(', ') + "]", "[" + prevDeps.join(', ') + "]");
1161
993
  }
1162
994
  }
1163
995
 
1164
996
  for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
1165
- if (is$1(nextDeps[i], prevDeps[i])) {
997
+ if (objectIs(nextDeps[i], prevDeps[i])) {
1166
998
  continue;
1167
999
  }
1168
1000
 
@@ -1174,13 +1006,11 @@ function areHookInputsEqual(nextDeps, prevDeps) {
1174
1006
 
1175
1007
  function createHook() {
1176
1008
  if (numberOfReRenders > 0) {
1177
- (function () {
1009
+ {
1178
1010
  {
1179
- {
1180
- throw ReactError(Error("Rendered more hooks than during the previous render"));
1181
- }
1011
+ throw Error( "Rendered more hooks than during the previous render" );
1182
1012
  }
1183
- })();
1013
+ }
1184
1014
  }
1185
1015
 
1186
1016
  return {
@@ -1269,7 +1099,9 @@ function readContext(context, observedBits) {
1269
1099
  validateContextBounds(context, threadID);
1270
1100
 
1271
1101
  {
1272
- !!isInHookUserCodeInDev ? warning$1(false, 'Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().') : void 0;
1102
+ if (isInHookUserCodeInDev) {
1103
+ error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
1104
+ }
1273
1105
  }
1274
1106
 
1275
1107
  return context[threadID];
@@ -1287,6 +1119,7 @@ function useContext(context, observedBits) {
1287
1119
  }
1288
1120
 
1289
1121
  function basicStateReducer(state, action) {
1122
+ // $FlowFixMe: Flow doesn't like mixed types
1290
1123
  return typeof action === 'function' ? action(state) : action;
1291
1124
  }
1292
1125
 
@@ -1436,19 +1269,17 @@ function useRef(initialValue) {
1436
1269
  function useLayoutEffect(create, inputs) {
1437
1270
  {
1438
1271
  currentHookNameInDev = 'useLayoutEffect';
1439
- }
1440
1272
 
1441
- warning$1(false, 'useLayoutEffect does nothing on the server, because its effect cannot ' + "be encoded into the server renderer's output format. This will lead " + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + 'See https://fb.me/react-uselayouteffect-ssr for common fixes.');
1273
+ error('useLayoutEffect does nothing on the server, because its effect cannot ' + "be encoded into the server renderer's output format. This will lead " + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + 'See https://fb.me/react-uselayouteffect-ssr for common fixes.');
1274
+ }
1442
1275
  }
1443
1276
 
1444
1277
  function dispatchAction(componentIdentity, queue, action) {
1445
- (function () {
1446
- if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
1447
- {
1448
- throw ReactError(Error("Too many re-renders. React limits the number of renders to prevent an infinite loop."));
1449
- }
1278
+ if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
1279
+ {
1280
+ throw Error( "Too many re-renders. React limits the number of renders to prevent an infinite loop." );
1450
1281
  }
1451
- })();
1282
+ }
1452
1283
 
1453
1284
  if (componentIdentity === currentlyRenderingComponent) {
1454
1285
  // This is a render phase update. Stash it in a lazily-created map of
@@ -1478,9 +1309,6 @@ function dispatchAction(componentIdentity, queue, action) {
1478
1309
 
1479
1310
  lastRenderPhaseUpdate.next = update;
1480
1311
  }
1481
- } else {// This means an update has happened after the function component has
1482
- // returned. On the server this is a no-op. In React Fiber, the update
1483
- // would be scheduled for a future render.
1484
1312
  }
1485
1313
  }
1486
1314
 
@@ -1496,6 +1324,21 @@ function useResponder(responder, props) {
1496
1324
  };
1497
1325
  }
1498
1326
 
1327
+ function useDeferredValue(value, config) {
1328
+ resolveCurrentlyRenderingComponent();
1329
+ return value;
1330
+ }
1331
+
1332
+ function useTransition(config) {
1333
+ resolveCurrentlyRenderingComponent();
1334
+
1335
+ var startTransition = function (callback) {
1336
+ callback();
1337
+ };
1338
+
1339
+ return [startTransition, false];
1340
+ }
1341
+
1499
1342
  function noop() {}
1500
1343
 
1501
1344
  var currentThreadID = 0;
@@ -1517,7 +1360,9 @@ var Dispatcher = {
1517
1360
  useEffect: noop,
1518
1361
  // Debugging effect
1519
1362
  useDebugValue: noop,
1520
- useResponder: useResponder
1363
+ useResponder: useResponder,
1364
+ useDeferredValue: useDeferredValue,
1365
+ useTransition: useTransition
1521
1366
  };
1522
1367
 
1523
1368
  var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
@@ -1556,13 +1401,13 @@ function getChildNamespace(parentNamespace, type) {
1556
1401
  return parentNamespace;
1557
1402
  }
1558
1403
 
1559
- var ReactDebugCurrentFrame$3 = null;
1404
+ var ReactDebugCurrentFrame$2 = null;
1560
1405
  var ReactControlledValuePropTypes = {
1561
1406
  checkPropTypes: null
1562
1407
  };
1563
1408
 
1564
1409
  {
1565
- ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;
1410
+ ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
1566
1411
  var hasReadOnlyValue = {
1567
1412
  button: true,
1568
1413
  checkbox: true,
@@ -1574,14 +1419,14 @@ var ReactControlledValuePropTypes = {
1574
1419
  };
1575
1420
  var propTypes = {
1576
1421
  value: function (props, propName, componentName) {
1577
- if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableFlareAPI && props.listeners) {
1422
+ if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
1578
1423
  return null;
1579
1424
  }
1580
1425
 
1581
1426
  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`.');
1582
1427
  },
1583
1428
  checked: function (props, propName, componentName) {
1584
- if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableFlareAPI && props.listeners) {
1429
+ if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
1585
1430
  return null;
1586
1431
  }
1587
1432
 
@@ -1594,7 +1439,7 @@ var ReactControlledValuePropTypes = {
1594
1439
  */
1595
1440
 
1596
1441
  ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {
1597
- checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$3.getStackAddendum);
1442
+ checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum);
1598
1443
  };
1599
1444
  }
1600
1445
 
@@ -1625,13 +1470,11 @@ var voidElementTags = _assign({
1625
1470
  menuitem: true
1626
1471
  }, omittedCloseTags);
1627
1472
 
1628
- // or add stack by default to invariants where possible.
1629
-
1630
1473
  var HTML = '__html';
1631
- var ReactDebugCurrentFrame$4 = null;
1474
+ var ReactDebugCurrentFrame$3 = null;
1632
1475
 
1633
1476
  {
1634
- ReactDebugCurrentFrame$4 = ReactSharedInternals.ReactDebugCurrentFrame;
1477
+ ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;
1635
1478
  }
1636
1479
 
1637
1480
  function assertValidProps(tag, props) {
@@ -1641,44 +1484,38 @@ function assertValidProps(tag, props) {
1641
1484
 
1642
1485
 
1643
1486
  if (voidElementTags[tag]) {
1644
- (function () {
1645
- if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
1646
- {
1647
- throw ReactError(Error(tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + (ReactDebugCurrentFrame$4.getStackAddendum())));
1648
- }
1487
+ if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
1488
+ {
1489
+ throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
1649
1490
  }
1650
- })();
1491
+ }
1651
1492
  }
1652
1493
 
1653
1494
  if (props.dangerouslySetInnerHTML != null) {
1654
- (function () {
1655
- if (!(props.children == null)) {
1656
- {
1657
- throw ReactError(Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`."));
1658
- }
1495
+ if (!(props.children == null)) {
1496
+ {
1497
+ throw Error( "Can only set one of `children` or `props.dangerouslySetInnerHTML`." );
1659
1498
  }
1660
- })();
1499
+ }
1661
1500
 
1662
- (function () {
1663
- if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
1664
- {
1665
- throw ReactError(Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information."));
1666
- }
1501
+ if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
1502
+ {
1503
+ throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information." );
1667
1504
  }
1668
- })();
1505
+ }
1669
1506
  }
1670
1507
 
1671
1508
  {
1672
- !(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;
1509
+ if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
1510
+ error('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.');
1511
+ }
1673
1512
  }
1674
1513
 
1675
- (function () {
1676
- if (!(props.style == null || typeof props.style === 'object')) {
1677
- {
1678
- throw ReactError(Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + (ReactDebugCurrentFrame$4.getStackAddendum())));
1679
- }
1514
+ if (!(props.style == null || typeof props.style === 'object')) {
1515
+ {
1516
+ throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
1680
1517
  }
1681
- })();
1518
+ }
1682
1519
  }
1683
1520
 
1684
1521
  /**
@@ -1858,7 +1695,8 @@ var warnValidStyle = function () {};
1858
1695
  }
1859
1696
 
1860
1697
  warnedStyleNames[name] = true;
1861
- warning$1(false, 'Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
1698
+
1699
+ error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
1862
1700
  // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
1863
1701
  // is converted to lowercase `ms`.
1864
1702
  camelize(name.replace(msPattern$1, 'ms-')));
@@ -1870,7 +1708,8 @@ var warnValidStyle = function () {};
1870
1708
  }
1871
1709
 
1872
1710
  warnedStyleNames[name] = true;
1873
- warning$1(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
1711
+
1712
+ error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
1874
1713
  };
1875
1714
 
1876
1715
  var warnStyleValueWithSemicolon = function (name, value) {
@@ -1879,7 +1718,8 @@ var warnValidStyle = function () {};
1879
1718
  }
1880
1719
 
1881
1720
  warnedStyleValues[value] = true;
1882
- warning$1(false, "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
1721
+
1722
+ error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
1883
1723
  };
1884
1724
 
1885
1725
  var warnStyleValueIsNaN = function (name, value) {
@@ -1888,7 +1728,8 @@ var warnValidStyle = function () {};
1888
1728
  }
1889
1729
 
1890
1730
  warnedForNaNValue = true;
1891
- warning$1(false, '`NaN` is an invalid value for the `%s` css style property.', name);
1731
+
1732
+ error('`NaN` is an invalid value for the `%s` css style property.', name);
1892
1733
  };
1893
1734
 
1894
1735
  var warnStyleValueIsInfinity = function (name, value) {
@@ -1897,7 +1738,8 @@ var warnValidStyle = function () {};
1897
1738
  }
1898
1739
 
1899
1740
  warnedForInfinityValue = true;
1900
- warning$1(false, '`Infinity` is an invalid value for the `%s` css style property.', name);
1741
+
1742
+ error('`Infinity` is an invalid value for the `%s` css style property.', name);
1901
1743
  };
1902
1744
 
1903
1745
  warnValidStyle = function (name, value) {
@@ -1983,47 +1825,52 @@ var ariaProperties = {
1983
1825
  var warnedProperties = {};
1984
1826
  var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
1985
1827
  var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
1986
- var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
1828
+ var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
1987
1829
 
1988
1830
  function validateProperty(tagName, name) {
1989
- if (hasOwnProperty$2.call(warnedProperties, name) && warnedProperties[name]) {
1990
- return true;
1991
- }
1831
+ {
1832
+ if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {
1833
+ return true;
1834
+ }
1992
1835
 
1993
- if (rARIACamel.test(name)) {
1994
- var ariaName = 'aria-' + name.slice(4).toLowerCase();
1995
- var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
1996
- // DOM properties, then it is an invalid aria-* attribute.
1836
+ if (rARIACamel.test(name)) {
1837
+ var ariaName = 'aria-' + name.slice(4).toLowerCase();
1838
+ var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
1839
+ // DOM properties, then it is an invalid aria-* attribute.
1997
1840
 
1998
- if (correctName == null) {
1999
- warning$1(false, 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
2000
- warnedProperties[name] = true;
2001
- return true;
2002
- } // aria-* attributes should be lowercase; suggest the lowercase version.
1841
+ if (correctName == null) {
1842
+ error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
2003
1843
 
1844
+ warnedProperties[name] = true;
1845
+ return true;
1846
+ } // aria-* attributes should be lowercase; suggest the lowercase version.
2004
1847
 
2005
- if (name !== correctName) {
2006
- warning$1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
2007
- warnedProperties[name] = true;
2008
- return true;
1848
+
1849
+ if (name !== correctName) {
1850
+ error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
1851
+
1852
+ warnedProperties[name] = true;
1853
+ return true;
1854
+ }
2009
1855
  }
2010
- }
2011
1856
 
2012
- if (rARIA.test(name)) {
2013
- var lowerCasedName = name.toLowerCase();
2014
- var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
2015
- // DOM properties, then it is an invalid aria-* attribute.
1857
+ if (rARIA.test(name)) {
1858
+ var lowerCasedName = name.toLowerCase();
1859
+ var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
1860
+ // DOM properties, then it is an invalid aria-* attribute.
2016
1861
 
2017
- if (standardName == null) {
2018
- warnedProperties[name] = true;
2019
- return false;
2020
- } // aria-* attributes should be lowercase; suggest the lowercase version.
1862
+ if (standardName == null) {
1863
+ warnedProperties[name] = true;
1864
+ return false;
1865
+ } // aria-* attributes should be lowercase; suggest the lowercase version.
2021
1866
 
2022
1867
 
2023
- if (name !== standardName) {
2024
- warning$1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
2025
- warnedProperties[name] = true;
2026
- return true;
1868
+ if (name !== standardName) {
1869
+ error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
1870
+
1871
+ warnedProperties[name] = true;
1872
+ return true;
1873
+ }
2027
1874
  }
2028
1875
  }
2029
1876
 
@@ -2031,24 +1878,26 @@ function validateProperty(tagName, name) {
2031
1878
  }
2032
1879
 
2033
1880
  function warnInvalidARIAProps(type, props) {
2034
- var invalidProps = [];
1881
+ {
1882
+ var invalidProps = [];
2035
1883
 
2036
- for (var key in props) {
2037
- var isValid = validateProperty(type, key);
1884
+ for (var key in props) {
1885
+ var isValid = validateProperty(type, key);
2038
1886
 
2039
- if (!isValid) {
2040
- invalidProps.push(key);
1887
+ if (!isValid) {
1888
+ invalidProps.push(key);
1889
+ }
2041
1890
  }
2042
- }
2043
1891
 
2044
- var unknownPropString = invalidProps.map(function (prop) {
2045
- return '`' + prop + '`';
2046
- }).join(', ');
1892
+ var unknownPropString = invalidProps.map(function (prop) {
1893
+ return '`' + prop + '`';
1894
+ }).join(', ');
2047
1895
 
2048
- if (invalidProps.length === 1) {
2049
- warning$1(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
2050
- } else if (invalidProps.length > 1) {
2051
- warning$1(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
1896
+ if (invalidProps.length === 1) {
1897
+ error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
1898
+ } else if (invalidProps.length > 1) {
1899
+ error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
1900
+ }
2052
1901
  }
2053
1902
  }
2054
1903
 
@@ -2062,48 +1911,28 @@ function validateProperties(type, props) {
2062
1911
 
2063
1912
  var didWarnValueNull = false;
2064
1913
  function validateProperties$1(type, props) {
2065
- if (type !== 'input' && type !== 'textarea' && type !== 'select') {
2066
- return;
2067
- }
1914
+ {
1915
+ if (type !== 'input' && type !== 'textarea' && type !== 'select') {
1916
+ return;
1917
+ }
2068
1918
 
2069
- if (props != null && props.value === null && !didWarnValueNull) {
2070
- didWarnValueNull = true;
1919
+ if (props != null && props.value === null && !didWarnValueNull) {
1920
+ didWarnValueNull = true;
2071
1921
 
2072
- if (type === 'select' && props.multiple) {
2073
- 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);
2074
- } else {
2075
- 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);
1922
+ if (type === 'select' && props.multiple) {
1923
+ error('`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);
1924
+ } else {
1925
+ error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
1926
+ }
2076
1927
  }
2077
1928
  }
2078
1929
  }
2079
1930
 
2080
- /**
2081
- * Registers plugins so that they can extract and dispatch events.
2082
- *
2083
- * @see {EventPluginHub}
2084
- */
2085
-
2086
- /**
2087
- * Ordered list of injected plugins.
2088
- */
2089
-
2090
-
2091
-
2092
- /**
2093
- * Mapping from event name to dispatch config
2094
- */
2095
-
2096
-
2097
1931
  /**
2098
1932
  * Mapping from registration name to plugin module
2099
1933
  */
2100
1934
 
2101
1935
  var registrationNameModules = {};
2102
- /**
2103
- * Mapping from registration name to event name
2104
- */
2105
-
2106
-
2107
1936
  /**
2108
1937
  * Mapping from lowercase registration names to the properly cased version,
2109
1938
  * used to warn in the case of missing event handlers. Available
@@ -2111,29 +1940,7 @@ var registrationNameModules = {};
2111
1940
  * @type {Object}
2112
1941
  */
2113
1942
 
2114
- var possibleRegistrationNames = {}; // Trust the developer to only use possibleRegistrationNames in true
2115
-
2116
- /**
2117
- * Injects an ordering of plugins (by plugin name). This allows the ordering
2118
- * to be decoupled from injection of the actual plugins so that ordering is
2119
- * always deterministic regardless of packaging, on-the-fly injection, etc.
2120
- *
2121
- * @param {array} InjectedEventPluginOrder
2122
- * @internal
2123
- * @see {EventPluginHub.injection.injectEventPluginOrder}
2124
- */
2125
-
2126
-
2127
- /**
2128
- * Injects plugins to be used by `EventPluginHub`. The plugin names must be
2129
- * in the ordering injected by `injectEventPluginOrder`.
2130
- *
2131
- * Plugins can be injected as part of page initialization or on-the-fly.
2132
- *
2133
- * @param {object} injectedNamesToPlugins Map from names to plugin modules.
2134
- * @internal
2135
- * @see {EventPluginHub.injection.injectEventPluginsByName}
2136
- */
1943
+ var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true
2137
1944
 
2138
1945
  // When adding attributes to the HTML or SVG whitelist, be sure to
2139
1946
  // also add them to this module to ensure casing and incorrect name
@@ -2642,7 +2449,8 @@ var validateProperty$1 = function () {};
2642
2449
  var lowerCasedName = name.toLowerCase();
2643
2450
 
2644
2451
  if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
2645
- 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.');
2452
+ error('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.');
2453
+
2646
2454
  warnedProperties$1[name] = true;
2647
2455
  return true;
2648
2456
  } // We can't rely on the event system being injected on the server.
@@ -2656,13 +2464,15 @@ var validateProperty$1 = function () {};
2656
2464
  var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
2657
2465
 
2658
2466
  if (registrationName != null) {
2659
- warning$1(false, 'Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
2467
+ error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
2468
+
2660
2469
  warnedProperties$1[name] = true;
2661
2470
  return true;
2662
2471
  }
2663
2472
 
2664
2473
  if (EVENT_NAME_REGEX.test(name)) {
2665
- warning$1(false, 'Unknown event handler property `%s`. It will be ignored.', name);
2474
+ error('Unknown event handler property `%s`. It will be ignored.', name);
2475
+
2666
2476
  warnedProperties$1[name] = true;
2667
2477
  return true;
2668
2478
  }
@@ -2671,7 +2481,7 @@ var validateProperty$1 = function () {};
2671
2481
  // So we can't tell if the event name is correct for sure, but we can filter
2672
2482
  // out known bad ones like `onclick`. We can't suggest a specific replacement though.
2673
2483
  if (INVALID_EVENT_NAME_REGEX.test(name)) {
2674
- warning$1(false, 'Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
2484
+ error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
2675
2485
  }
2676
2486
 
2677
2487
  warnedProperties$1[name] = true;
@@ -2684,25 +2494,29 @@ var validateProperty$1 = function () {};
2684
2494
  }
2685
2495
 
2686
2496
  if (lowerCasedName === 'innerhtml') {
2687
- warning$1(false, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
2497
+ error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
2498
+
2688
2499
  warnedProperties$1[name] = true;
2689
2500
  return true;
2690
2501
  }
2691
2502
 
2692
2503
  if (lowerCasedName === 'aria') {
2693
- warning$1(false, 'The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
2504
+ error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
2505
+
2694
2506
  warnedProperties$1[name] = true;
2695
2507
  return true;
2696
2508
  }
2697
2509
 
2698
2510
  if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
2699
- warning$1(false, 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
2511
+ error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
2512
+
2700
2513
  warnedProperties$1[name] = true;
2701
2514
  return true;
2702
2515
  }
2703
2516
 
2704
2517
  if (typeof value === 'number' && isNaN(value)) {
2705
- warning$1(false, 'Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
2518
+ error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
2519
+
2706
2520
  warnedProperties$1[name] = true;
2707
2521
  return true;
2708
2522
  }
@@ -2714,23 +2528,25 @@ var validateProperty$1 = function () {};
2714
2528
  var standardName = possibleStandardNames[lowerCasedName];
2715
2529
 
2716
2530
  if (standardName !== name) {
2717
- warning$1(false, 'Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
2531
+ error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
2532
+
2718
2533
  warnedProperties$1[name] = true;
2719
2534
  return true;
2720
2535
  }
2721
2536
  } else if (!isReserved && name !== lowerCasedName) {
2722
2537
  // Unknown attributes should have lowercase casing since that's how they
2723
2538
  // will be cased anyway with server rendering.
2724
- 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);
2539
+ error('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);
2540
+
2725
2541
  warnedProperties$1[name] = true;
2726
2542
  return true;
2727
2543
  }
2728
2544
 
2729
2545
  if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
2730
2546
  if (value) {
2731
- 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);
2547
+ error('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);
2732
2548
  } else {
2733
- 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);
2549
+ error('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);
2734
2550
  }
2735
2551
 
2736
2552
  warnedProperties$1[name] = true;
@@ -2751,7 +2567,8 @@ var validateProperty$1 = function () {};
2751
2567
 
2752
2568
 
2753
2569
  if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
2754
- 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);
2570
+ error('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);
2571
+
2755
2572
  warnedProperties$1[name] = true;
2756
2573
  return true;
2757
2574
  }
@@ -2761,24 +2578,26 @@ var validateProperty$1 = function () {};
2761
2578
  }
2762
2579
 
2763
2580
  var warnUnknownProperties = function (type, props, canUseEventSystem) {
2764
- var unknownProps = [];
2581
+ {
2582
+ var unknownProps = [];
2765
2583
 
2766
- for (var key in props) {
2767
- var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);
2584
+ for (var key in props) {
2585
+ var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);
2768
2586
 
2769
- if (!isValid) {
2770
- unknownProps.push(key);
2587
+ if (!isValid) {
2588
+ unknownProps.push(key);
2589
+ }
2771
2590
  }
2772
- }
2773
2591
 
2774
- var unknownPropString = unknownProps.map(function (prop) {
2775
- return '`' + prop + '`';
2776
- }).join(', ');
2592
+ var unknownPropString = unknownProps.map(function (prop) {
2593
+ return '`' + prop + '`';
2594
+ }).join(', ');
2777
2595
 
2778
- if (unknownProps.length === 1) {
2779
- 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);
2780
- } else if (unknownProps.length > 1) {
2781
- 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);
2596
+ if (unknownProps.length === 1) {
2597
+ error('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);
2598
+ } else if (unknownProps.length > 1) {
2599
+ error('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);
2600
+ }
2782
2601
  }
2783
2602
  };
2784
2603
 
@@ -2797,7 +2616,7 @@ var toArray = React.Children.toArray; // This is only used in DEV.
2797
2616
 
2798
2617
  var currentDebugStacks = [];
2799
2618
  var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
2800
- var ReactDebugCurrentFrame;
2619
+ var ReactDebugCurrentFrame$4;
2801
2620
  var prevGetCurrentStackImpl = null;
2802
2621
 
2803
2622
  var getCurrentServerStackImpl = function () {
@@ -2819,7 +2638,7 @@ var popCurrentDebugStack = function () {};
2819
2638
  var hasWarnedAboutUsingContextAsConsumer = false;
2820
2639
 
2821
2640
  {
2822
- ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2641
+ ReactDebugCurrentFrame$4 = ReactSharedInternals.ReactDebugCurrentFrame;
2823
2642
 
2824
2643
  validatePropertiesInDevelopment = function (type, props) {
2825
2644
  validateProperties(type, props);
@@ -2843,8 +2662,8 @@ var hasWarnedAboutUsingContextAsConsumer = false;
2843
2662
  if (currentDebugStacks.length === 1) {
2844
2663
  // We are entering a server renderer.
2845
2664
  // Remember the previous (e.g. client) global stack implementation.
2846
- prevGetCurrentStackImpl = ReactDebugCurrentFrame.getCurrentStack;
2847
- ReactDebugCurrentFrame.getCurrentStack = getCurrentServerStackImpl;
2665
+ prevGetCurrentStackImpl = ReactDebugCurrentFrame$4.getCurrentStack;
2666
+ ReactDebugCurrentFrame$4.getCurrentStack = getCurrentServerStackImpl;
2848
2667
  }
2849
2668
  };
2850
2669
 
@@ -2865,7 +2684,7 @@ var hasWarnedAboutUsingContextAsConsumer = false;
2865
2684
  if (currentDebugStacks.length === 0) {
2866
2685
  // We are exiting the server renderer.
2867
2686
  // Restore the previous (e.g. client) global stack implementation.
2868
- ReactDebugCurrentFrame.getCurrentStack = prevGetCurrentStackImpl;
2687
+ ReactDebugCurrentFrame$4.getCurrentStack = prevGetCurrentStackImpl;
2869
2688
  prevGetCurrentStackImpl = null;
2870
2689
  }
2871
2690
  };
@@ -2923,13 +2742,11 @@ var validatedTagCache = {};
2923
2742
 
2924
2743
  function validateDangerousTag(tag) {
2925
2744
  if (!validatedTagCache.hasOwnProperty(tag)) {
2926
- (function () {
2927
- if (!VALID_TAG_REGEX.test(tag)) {
2928
- {
2929
- throw ReactError(Error("Invalid tag: " + tag));
2930
- }
2745
+ if (!VALID_TAG_REGEX.test(tag)) {
2746
+ {
2747
+ throw Error( "Invalid tag: " + tag );
2931
2748
  }
2932
- })();
2749
+ }
2933
2750
 
2934
2751
  validatedTagCache[tag] = true;
2935
2752
  }
@@ -2985,7 +2802,8 @@ function warnNoop(publicInstance, callerName) {
2985
2802
  return;
2986
2803
  }
2987
2804
 
2988
- 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);
2805
+ error('%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);
2806
+
2989
2807
  didWarnAboutNoopUpdateForComponent[warningKey] = true;
2990
2808
  }
2991
2809
  }
@@ -3051,14 +2869,15 @@ function flattenOptionChildren(children) {
3051
2869
  {
3052
2870
  if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') {
3053
2871
  didWarnInvalidOptionChildren = true;
3054
- warning$1(false, 'Only strings and numbers are supported as <option> children.');
2872
+
2873
+ error('Only strings and numbers are supported as <option> children.');
3055
2874
  }
3056
2875
  }
3057
2876
  });
3058
2877
  return content;
3059
2878
  }
3060
2879
 
3061
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2880
+ var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
3062
2881
  var STYLE = 'style';
3063
2882
  var RESERVED_PROPS = {
3064
2883
  children: null,
@@ -3071,11 +2890,7 @@ function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeSt
3071
2890
  var ret = '<' + tagVerbatim;
3072
2891
 
3073
2892
  for (var propKey in props) {
3074
- if (!hasOwnProperty.call(props, propKey)) {
3075
- continue;
3076
- }
3077
-
3078
- if (enableFlareAPI && propKey === 'listeners') {
2893
+ if (!hasOwnProperty$2.call(props, propKey)) {
3079
2894
  continue;
3080
2895
  }
3081
2896
 
@@ -3119,13 +2934,11 @@ function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeSt
3119
2934
 
3120
2935
  function validateRenderResult(child, type) {
3121
2936
  if (child === undefined) {
3122
- (function () {
2937
+ {
3123
2938
  {
3124
- {
3125
- throw ReactError(Error((getComponentName(type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null."));
3126
- }
2939
+ throw Error( (getComponentName(type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
3127
2940
  }
3128
- })();
2941
+ }
3129
2942
  }
3130
2943
  }
3131
2944
 
@@ -3186,7 +2999,8 @@ function resolve(child, context, threadID) {
3186
2999
  var componentName = getComponentName(Component) || 'Unknown';
3187
3000
 
3188
3001
  if (!didWarnAboutUninitializedState[componentName]) {
3189
- 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);
3002
+ error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, inst.state === null ? 'null' : 'undefined', componentName);
3003
+
3190
3004
  didWarnAboutUninitializedState[componentName] = true;
3191
3005
  }
3192
3006
  }
@@ -3199,7 +3013,8 @@ function resolve(child, context, threadID) {
3199
3013
  var _componentName = getComponentName(Component) || 'Unknown';
3200
3014
 
3201
3015
  if (!didWarnAboutUndefinedDerivedState[_componentName]) {
3202
- warningWithoutStack$1(false, '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', _componentName);
3016
+ error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', _componentName);
3017
+
3203
3018
  didWarnAboutUndefinedDerivedState[_componentName] = true;
3204
3019
  }
3205
3020
  }
@@ -3215,7 +3030,8 @@ function resolve(child, context, threadID) {
3215
3030
  var _componentName2 = getComponentName(Component) || 'Unknown';
3216
3031
 
3217
3032
  if (!didWarnAboutBadClass[_componentName2]) {
3218
- 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);
3033
+ error("The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', _componentName2, _componentName2);
3034
+
3219
3035
  didWarnAboutBadClass[_componentName2] = true;
3220
3036
  }
3221
3037
  }
@@ -3236,7 +3052,8 @@ function resolve(child, context, threadID) {
3236
3052
  var _componentName3 = getComponentName(Component) || 'Unknown';
3237
3053
 
3238
3054
  if (!didWarnAboutModulePatternComponent[_componentName3]) {
3239
- warningWithoutStack$1(false, 'The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName3, _componentName3, _componentName3);
3055
+ error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName3, _componentName3, _componentName3);
3056
+
3240
3057
  didWarnAboutModulePatternComponent[_componentName3] = true;
3241
3058
  }
3242
3059
  }
@@ -3254,12 +3071,13 @@ function resolve(child, context, threadID) {
3254
3071
  if (typeof inst.UNSAFE_componentWillMount === 'function' || typeof inst.componentWillMount === 'function') {
3255
3072
  if (typeof inst.componentWillMount === 'function') {
3256
3073
  {
3257
- if (warnAboutDeprecatedLifecycles && inst.componentWillMount.__suppressDeprecationWarning !== true) {
3074
+ if ( inst.componentWillMount.__suppressDeprecationWarning !== true) {
3258
3075
  var _componentName4 = getComponentName(Component) || 'Unknown';
3259
3076
 
3260
3077
  if (!didWarnAboutDeprecatedWillMount[_componentName4]) {
3261
- lowPriorityWarningWithoutStack$1(false, // keep this warning in sync with ReactStrictModeWarning.js
3078
+ warn( // keep this warning in sync with ReactStrictModeWarning.js
3262
3079
  'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\n' + '\nPlease update the following components: %s', _componentName4);
3080
+
3263
3081
  didWarnAboutDeprecatedWillMount[_componentName4] = true;
3264
3082
  }
3265
3083
  }
@@ -3325,15 +3143,7 @@ function resolve(child, context, threadID) {
3325
3143
  validateRenderResult(child, Component);
3326
3144
  var childContext;
3327
3145
 
3328
- if (disableLegacyContext) {
3329
- {
3330
- var childContextTypes = Component.childContextTypes;
3331
-
3332
- if (childContextTypes !== undefined) {
3333
- warningWithoutStack$1(false, '%s uses the legacy childContextTypes API which is no longer supported. ' + 'Use React.createContext() instead.', getComponentName(Component) || 'Unknown');
3334
- }
3335
- }
3336
- } else {
3146
+ {
3337
3147
  if (typeof inst.getChildContext === 'function') {
3338
3148
  var _childContextTypes = Component.childContextTypes;
3339
3149
 
@@ -3341,16 +3151,16 @@ function resolve(child, context, threadID) {
3341
3151
  childContext = inst.getChildContext();
3342
3152
 
3343
3153
  for (var contextKey in childContext) {
3344
- (function () {
3345
- if (!(contextKey in _childContextTypes)) {
3346
- {
3347
- throw ReactError(Error((getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes."));
3348
- }
3154
+ if (!(contextKey in _childContextTypes)) {
3155
+ {
3156
+ throw Error( (getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes." );
3349
3157
  }
3350
- })();
3158
+ }
3351
3159
  }
3352
3160
  } else {
3353
- warningWithoutStack$1(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
3161
+ {
3162
+ error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
3163
+ }
3354
3164
  }
3355
3165
  }
3356
3166
 
@@ -3448,7 +3258,9 @@ function () {
3448
3258
  var index = this.contextIndex;
3449
3259
 
3450
3260
  {
3451
- !(index > -1 && provider === this.contextProviderStack[index]) ? warningWithoutStack$1(false, 'Unexpected pop.') : void 0;
3261
+ if (index < 0 || provider !== this.contextProviderStack[index]) {
3262
+ error('Unexpected pop.');
3263
+ }
3452
3264
  }
3453
3265
 
3454
3266
  var context = this.contextStack[index];
@@ -3480,8 +3292,6 @@ function () {
3480
3292
  };
3481
3293
 
3482
3294
  _proto.read = function read(bytes) {
3483
- var _this = this;
3484
-
3485
3295
  if (this.exhausted) {
3486
3296
  return null;
3487
3297
  }
@@ -3529,13 +3339,11 @@ function () {
3529
3339
 
3530
3340
  var fallbackFrame = frame.fallbackFrame;
3531
3341
 
3532
- (function () {
3533
- if (!fallbackFrame) {
3534
- {
3535
- throw ReactError(Error("ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue."));
3536
- }
3342
+ if (!fallbackFrame) {
3343
+ {
3344
+ throw Error(true ? "ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue." : formatProdErrorMessage(303));
3537
3345
  }
3538
- })();
3346
+ }
3539
3347
 
3540
3348
  this.stack.push(fallbackFrame);
3541
3349
  out[this.suspenseDepth] += '<!--$!-->'; // Skip flushing output since we're switching to the fallback
@@ -3554,7 +3362,7 @@ function () {
3554
3362
  var child = frame.children[frame.childIndex++];
3555
3363
  var outBuffer = '';
3556
3364
 
3557
- {
3365
+ if (true) {
3558
3366
  pushCurrentDebugStack(this.stack); // We're starting work on this frame, so reset its inner stack.
3559
3367
 
3560
3368
  frame.debugElementStack.length = 0;
@@ -3565,29 +3373,25 @@ function () {
3565
3373
  } catch (err) {
3566
3374
  if (err != null && typeof err.then === 'function') {
3567
3375
  if (enableSuspenseServerRenderer) {
3568
- (function () {
3569
- if (!(_this.suspenseDepth > 0)) {
3570
- {
3571
- throw ReactError(Error("A React component suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."));
3572
- }
3376
+ if (!(this.suspenseDepth > 0)) {
3377
+ {
3378
+ throw Error(true ? "A React component suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display." : formatProdErrorMessage(342));
3573
3379
  }
3574
- })();
3380
+ }
3575
3381
 
3576
3382
  suspended = true;
3577
3383
  } else {
3578
- (function () {
3384
+ if (!false) {
3579
3385
  {
3580
- {
3581
- throw ReactError(Error("ReactDOMServer does not yet support Suspense."));
3582
- }
3386
+ throw Error(true ? "ReactDOMServer does not yet support Suspense." : formatProdErrorMessage(294));
3583
3387
  }
3584
- })();
3388
+ }
3585
3389
  }
3586
3390
  } else {
3587
3391
  throw err;
3588
3392
  }
3589
3393
  } finally {
3590
- {
3394
+ if (true) {
3591
3395
  popCurrentDebugStack();
3592
3396
  }
3593
3397
  }
@@ -3639,22 +3443,18 @@ function () {
3639
3443
  // Catch unexpected special types early.
3640
3444
  var $$typeof = nextChild.$$typeof;
3641
3445
 
3642
- (function () {
3643
- if (!($$typeof !== REACT_PORTAL_TYPE)) {
3644
- {
3645
- throw ReactError(Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."));
3646
- }
3446
+ if (!($$typeof !== REACT_PORTAL_TYPE)) {
3447
+ {
3448
+ throw Error( "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render." );
3647
3449
  }
3648
- })(); // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type.
3450
+ } // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type.
3649
3451
 
3650
3452
 
3651
- (function () {
3453
+ {
3652
3454
  {
3653
- {
3654
- throw ReactError(Error("Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue."));
3655
- }
3455
+ throw Error( "Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue." );
3656
3456
  }
3657
- })();
3457
+ }
3658
3458
  }
3659
3459
 
3660
3460
  var nextChildren = toArray(nextChild);
@@ -3711,74 +3511,14 @@ function () {
3711
3511
 
3712
3512
  case REACT_SUSPENSE_TYPE:
3713
3513
  {
3714
- if (enableSuspenseServerRenderer) {
3715
- var fallback = nextChild.props.fallback;
3716
-
3717
- if (fallback === undefined) {
3718
- // If there is no fallback, then this just behaves as a fragment.
3719
- var _nextChildren3 = toArray(nextChild.props.children);
3720
-
3721
- var _frame3 = {
3722
- type: null,
3723
- domNamespace: parentNamespace,
3724
- children: _nextChildren3,
3725
- childIndex: 0,
3726
- context: context,
3727
- footer: ''
3728
- };
3729
-
3730
- {
3731
- _frame3.debugElementStack = [];
3732
- }
3733
-
3734
- this.stack.push(_frame3);
3735
- return '';
3736
- }
3737
-
3738
- var fallbackChildren = toArray(fallback);
3739
-
3740
- var _nextChildren2 = toArray(nextChild.props.children);
3741
-
3742
- var fallbackFrame = {
3743
- type: null,
3744
- domNamespace: parentNamespace,
3745
- children: fallbackChildren,
3746
- childIndex: 0,
3747
- context: context,
3748
- footer: '<!--/$-->'
3749
- };
3750
- var _frame2 = {
3751
- fallbackFrame: fallbackFrame,
3752
- type: REACT_SUSPENSE_TYPE,
3753
- domNamespace: parentNamespace,
3754
- children: _nextChildren2,
3755
- childIndex: 0,
3756
- context: context,
3757
- footer: '<!--/$-->'
3758
- };
3759
-
3514
+ {
3760
3515
  {
3761
- _frame2.debugElementStack = [];
3762
- fallbackFrame.debugElementStack = [];
3763
- }
3764
-
3765
- this.stack.push(_frame2);
3766
- this.suspenseDepth++;
3767
- return '<!--$-->';
3768
- } else {
3769
- (function () {
3770
3516
  {
3771
- {
3772
- throw ReactError(Error("ReactDOMServer does not yet support Suspense."));
3773
- }
3517
+ throw Error( "ReactDOMServer does not yet support Suspense." );
3774
3518
  }
3775
- })();
3519
+ }
3776
3520
  }
3777
3521
  }
3778
- // eslint-disable-next-line-no-fallthrough
3779
-
3780
- default:
3781
- break;
3782
3522
  }
3783
3523
 
3784
3524
  if (typeof elementType === 'object' && elementType !== null) {
@@ -3877,7 +3617,8 @@ function () {
3877
3617
  if (reactContext !== reactContext.Consumer) {
3878
3618
  if (!hasWarnedAboutUsingContextAsConsumer) {
3879
3619
  hasWarnedAboutUsingContextAsConsumer = true;
3880
- warning$1(false, 'Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
3620
+
3621
+ error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
3881
3622
  }
3882
3623
  }
3883
3624
  } else {
@@ -3912,38 +3653,12 @@ function () {
3912
3653
 
3913
3654
  case REACT_FUNDAMENTAL_TYPE:
3914
3655
  {
3915
- if (enableFundamentalAPI) {
3916
- var fundamentalImpl = elementType.impl;
3917
- var open = fundamentalImpl.getServerSideString(null, nextElement.props);
3918
- var getServerSideStringClose = fundamentalImpl.getServerSideStringClose;
3919
- var close = getServerSideStringClose !== undefined ? getServerSideStringClose(null, nextElement.props) : '';
3920
-
3921
- var _nextChildren8 = fundamentalImpl.reconcileChildren !== false ? toArray(nextChild.props.children) : [];
3922
-
3923
- var _frame8 = {
3924
- type: null,
3925
- domNamespace: parentNamespace,
3926
- children: _nextChildren8,
3927
- childIndex: 0,
3928
- context: context,
3929
- footer: close
3930
- };
3931
3656
 
3657
+ {
3932
3658
  {
3933
- _frame8.debugElementStack = [];
3659
+ throw Error( "ReactDOMServer does not yet support the fundamental API." );
3934
3660
  }
3935
-
3936
- this.stack.push(_frame8);
3937
- return open;
3938
3661
  }
3939
-
3940
- (function () {
3941
- {
3942
- {
3943
- throw ReactError(Error("ReactDOMServer does not yet support the fundamental API."));
3944
- }
3945
- }
3946
- })();
3947
3662
  }
3948
3663
  // eslint-disable-next-line-no-fallthrough
3949
3664
 
@@ -3984,13 +3699,11 @@ function () {
3984
3699
 
3985
3700
  case Pending:
3986
3701
  default:
3987
- (function () {
3702
+ {
3988
3703
  {
3989
- {
3990
- throw ReactError(Error("ReactDOMServer does not yet support lazy-loaded components."));
3991
- }
3704
+ throw Error( "ReactDOMServer does not yet support lazy-loaded components." );
3992
3705
  }
3993
- })();
3706
+ }
3994
3707
 
3995
3708
  }
3996
3709
  }
@@ -3998,33 +3711,12 @@ function () {
3998
3711
 
3999
3712
  case REACT_SCOPE_TYPE:
4000
3713
  {
4001
- if (enableScopeAPI) {
4002
- var _nextChildren10 = toArray(nextChild.props.children);
4003
-
4004
- var _frame10 = {
4005
- type: null,
4006
- domNamespace: parentNamespace,
4007
- children: _nextChildren10,
4008
- childIndex: 0,
4009
- context: context,
4010
- footer: ''
4011
- };
4012
3714
 
3715
+ {
4013
3716
  {
4014
- _frame10.debugElementStack = [];
3717
+ throw Error( "ReactDOMServer does not yet support scope components." );
4015
3718
  }
4016
-
4017
- this.stack.push(_frame10);
4018
- return '';
4019
3719
  }
4020
-
4021
- (function () {
4022
- {
4023
- {
4024
- throw ReactError(Error("ReactDOMServer does not yet support scope components."));
4025
- }
4026
- }
4027
- })();
4028
3720
  }
4029
3721
  }
4030
3722
  }
@@ -4045,13 +3737,11 @@ function () {
4045
3737
  }
4046
3738
  }
4047
3739
 
4048
- (function () {
3740
+ {
4049
3741
  {
4050
- {
4051
- throw ReactError(Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (elementType == null ? elementType : typeof elementType) + "." + info));
4052
- }
3742
+ throw Error( "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (elementType == null ? elementType : typeof elementType) + "." + info );
4053
3743
  }
4054
- })();
3744
+ }
4055
3745
  }
4056
3746
  };
4057
3747
 
@@ -4067,7 +3757,9 @@ function () {
4067
3757
  if (namespace === Namespaces.html) {
4068
3758
  // Should this check be gated by parent namespace? Not sure we want to
4069
3759
  // allow <SVG> or <mATH>.
4070
- !(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;
3760
+ if (tag !== element.type) {
3761
+ error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', element.type);
3762
+ }
4071
3763
  }
4072
3764
  }
4073
3765
 
@@ -4079,12 +3771,14 @@ function () {
4079
3771
  ReactControlledValuePropTypes.checkPropTypes('input', props);
4080
3772
 
4081
3773
  if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) {
4082
- 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);
3774
+ error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', 'A component', props.type);
3775
+
4083
3776
  didWarnDefaultChecked = true;
4084
3777
  }
4085
3778
 
4086
3779
  if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) {
4087
- 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);
3780
+ error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', 'A component', props.type);
3781
+
4088
3782
  didWarnDefaultInputValue = true;
4089
3783
  }
4090
3784
  }
@@ -4102,7 +3796,8 @@ function () {
4102
3796
  ReactControlledValuePropTypes.checkPropTypes('textarea', props);
4103
3797
 
4104
3798
  if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {
4105
- 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');
3799
+ error('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');
3800
+
4106
3801
  didWarnDefaultTextareaValue = true;
4107
3802
  }
4108
3803
  }
@@ -4116,25 +3811,21 @@ function () {
4116
3811
 
4117
3812
  if (textareaChildren != null) {
4118
3813
  {
4119
- warning$1(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
3814
+ error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
4120
3815
  }
4121
3816
 
4122
- (function () {
4123
- if (!(defaultValue == null)) {
4124
- {
4125
- throw ReactError(Error("If you supply `defaultValue` on a <textarea>, do not pass children."));
4126
- }
3817
+ if (!(defaultValue == null)) {
3818
+ {
3819
+ throw Error( "If you supply `defaultValue` on a <textarea>, do not pass children." );
4127
3820
  }
4128
- })();
3821
+ }
4129
3822
 
4130
3823
  if (Array.isArray(textareaChildren)) {
4131
- (function () {
4132
- if (!(textareaChildren.length <= 1)) {
4133
- {
4134
- throw ReactError(Error("<textarea> can only have at most one child."));
4135
- }
3824
+ if (!(textareaChildren.length <= 1)) {
3825
+ {
3826
+ throw Error( "<textarea> can only have at most one child." );
4136
3827
  }
4137
- })();
3828
+ }
4138
3829
 
4139
3830
  textareaChildren = textareaChildren[0];
4140
3831
  }
@@ -4167,14 +3858,15 @@ function () {
4167
3858
  var isArray = Array.isArray(props[propName]);
4168
3859
 
4169
3860
  if (props.multiple && !isArray) {
4170
- warning$1(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName);
3861
+ error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName);
4171
3862
  } else if (!props.multiple && isArray) {
4172
- warning$1(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName);
3863
+ error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName);
4173
3864
  }
4174
3865
  }
4175
3866
 
4176
3867
  if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {
4177
- 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');
3868
+ error('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');
3869
+
4178
3870
  didWarnDefaultSelectValue = true;
4179
3871
  }
4180
3872
  }
@@ -4242,7 +3934,7 @@ function () {
4242
3934
  if (innerMarkup != null) {
4243
3935
  children = [];
4244
3936
 
4245
- if (newlineEatingTags[tag] && innerMarkup.charAt(0) === '\n') {
3937
+ if (newlineEatingTags.hasOwnProperty(tag) && innerMarkup.charAt(0) === '\n') {
4246
3938
  // text/html ignores the first character in these tags if it's a newline
4247
3939
  // Prefer to break application/xml over text/html (for now) by adding
4248
3940
  // a newline specifically to get eaten by the parser. (Alternately for
@@ -4316,27 +4008,23 @@ function renderToStaticMarkup(element) {
4316
4008
  }
4317
4009
 
4318
4010
  function renderToNodeStream() {
4319
- (function () {
4011
+ {
4320
4012
  {
4321
- {
4322
- throw ReactError(Error("ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead."));
4323
- }
4013
+ throw Error( "ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead." );
4324
4014
  }
4325
- })();
4015
+ }
4326
4016
  }
4327
4017
 
4328
4018
  function renderToStaticNodeStream() {
4329
- (function () {
4019
+ {
4330
4020
  {
4331
- {
4332
- throw ReactError(Error("ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead."));
4333
- }
4021
+ throw Error( "ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead." );
4334
4022
  }
4335
- })();
4023
+ }
4336
4024
  } // Note: when changing this, also consider https://github.com/facebook/react/issues/11526
4337
4025
 
4338
4026
 
4339
- var ReactDOMServerBrowser = {
4027
+ var ReactDOMServer = {
4340
4028
  renderToString: renderToString,
4341
4029
  renderToStaticMarkup: renderToStaticMarkup,
4342
4030
  renderToNodeStream: renderToNodeStream,
@@ -4344,12 +4032,6 @@ var ReactDOMServerBrowser = {
4344
4032
  version: ReactVersion
4345
4033
  };
4346
4034
 
4347
- var ReactDOMServerBrowser$1 = Object.freeze({
4348
- default: ReactDOMServerBrowser
4349
- });
4350
-
4351
- var ReactDOMServer = ( ReactDOMServerBrowser$1 && ReactDOMServerBrowser ) || ReactDOMServerBrowser$1;
4352
-
4353
4035
  // TODO: decide on the top-level export form.
4354
4036
  // This is hacky but makes it work with both Rollup and Jest
4355
4037