react 16.3.2 → 16.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/react.development.js +81 -21
- package/cjs/react.production.min.js +14 -14
- package/package.json +1 -1
- package/umd/react.development.js +81 -21
- package/umd/react.production.min.js +15 -15
package/cjs/react.development.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.4.0
|
|
2
2
|
* react.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -24,22 +24,22 @@ var checkPropTypes = require('prop-types/checkPropTypes');
|
|
|
24
24
|
|
|
25
25
|
// TODO: this is special because it gets imported during build.
|
|
26
26
|
|
|
27
|
-
var ReactVersion = '16.
|
|
27
|
+
var ReactVersion = '16.4.0';
|
|
28
28
|
|
|
29
29
|
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
30
30
|
// nor polyfill, then a plain number is used for performance.
|
|
31
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol
|
|
32
|
-
|
|
33
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
31
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
32
|
+
|
|
33
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
34
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
35
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
36
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
37
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
38
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
39
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
|
|
40
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
41
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
42
|
+
var REACT_TIMEOUT_TYPE = hasSymbol ? Symbol.for('react.timeout') : 0xead1;
|
|
43
43
|
|
|
44
44
|
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
45
45
|
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
@@ -58,6 +58,41 @@ function getIteratorFn(maybeIterable) {
|
|
|
58
58
|
// Relying on the `invariant()` implementation lets us
|
|
59
59
|
// have preserve the format and params in the www builds.
|
|
60
60
|
|
|
61
|
+
// Exports ReactDOM.createRoot
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
// Experimental error-boundary API that can recover from errors within a single
|
|
65
|
+
// render phase
|
|
66
|
+
|
|
67
|
+
// Suspense
|
|
68
|
+
var enableSuspense = false;
|
|
69
|
+
// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
// In some cases, StrictMode should also double-render lifecycles.
|
|
73
|
+
// This can be confusing for tests though,
|
|
74
|
+
// And it can be bad for performance in production.
|
|
75
|
+
// This feature flag can be used to control the behavior:
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
// To preserve the "Pause on caught exceptions" behavior of the debugger, we
|
|
79
|
+
// replay the begin phase of a failed component inside invokeGuardedCallback.
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
// Warn about legacy context API
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
// Gather advanced timing metrics for Profiler subtrees.
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
// Fires getDerivedStateFromProps for state *or* props changes
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
// Only used in www builds.
|
|
95
|
+
|
|
61
96
|
/**
|
|
62
97
|
* Forked from fbjs/warning:
|
|
63
98
|
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
|
@@ -932,7 +967,7 @@ function mapChildren(children, func, context) {
|
|
|
932
967
|
* @param {?*} children Children tree container.
|
|
933
968
|
* @return {number} The number of children.
|
|
934
969
|
*/
|
|
935
|
-
function countChildren(children
|
|
970
|
+
function countChildren(children) {
|
|
936
971
|
return traverseAllChildren(children, emptyFunction.thatReturnsNull, null);
|
|
937
972
|
}
|
|
938
973
|
|
|
@@ -981,7 +1016,14 @@ function createContext(defaultValue, calculateChangedBits) {
|
|
|
981
1016
|
_calculateChangedBits: calculateChangedBits,
|
|
982
1017
|
_defaultValue: defaultValue,
|
|
983
1018
|
_currentValue: defaultValue,
|
|
1019
|
+
// As a workaround to support multiple concurrent renderers, we categorize
|
|
1020
|
+
// some renderers as primary and others as secondary. We only expect
|
|
1021
|
+
// there to be two concurrent renderers at most: React Native (primary) and
|
|
1022
|
+
// Fabric (secondary); React DOM (primary) and React ART (secondary).
|
|
1023
|
+
// Secondary renderers store their context values on separate fields.
|
|
1024
|
+
_currentValue2: defaultValue,
|
|
984
1025
|
_changedBits: 0,
|
|
1026
|
+
_changedBits2: 0,
|
|
985
1027
|
// These are circular
|
|
986
1028
|
Provider: null,
|
|
987
1029
|
Consumer: null
|
|
@@ -995,6 +1037,7 @@ function createContext(defaultValue, calculateChangedBits) {
|
|
|
995
1037
|
|
|
996
1038
|
{
|
|
997
1039
|
context._currentRenderer = null;
|
|
1040
|
+
context._currentRenderer2 = null;
|
|
998
1041
|
}
|
|
999
1042
|
|
|
1000
1043
|
return context;
|
|
@@ -1003,6 +1046,10 @@ function createContext(defaultValue, calculateChangedBits) {
|
|
|
1003
1046
|
function forwardRef(render) {
|
|
1004
1047
|
{
|
|
1005
1048
|
!(typeof render === 'function') ? warning(false, 'forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render) : void 0;
|
|
1049
|
+
|
|
1050
|
+
if (render != null) {
|
|
1051
|
+
!(render.defaultProps == null && render.propTypes == null) ? warning(false, 'forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?') : void 0;
|
|
1052
|
+
}
|
|
1006
1053
|
}
|
|
1007
1054
|
|
|
1008
1055
|
return {
|
|
@@ -1018,7 +1065,7 @@ var describeComponentFrame = function (name, source, ownerName) {
|
|
|
1018
1065
|
function isValidElementType(type) {
|
|
1019
1066
|
return typeof type === 'string' || typeof type === 'function' ||
|
|
1020
1067
|
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1021
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
|
|
1068
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_TIMEOUT_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
|
|
1022
1069
|
}
|
|
1023
1070
|
|
|
1024
1071
|
function getComponentName(fiber) {
|
|
@@ -1031,14 +1078,22 @@ function getComponentName(fiber) {
|
|
|
1031
1078
|
return type;
|
|
1032
1079
|
}
|
|
1033
1080
|
switch (type) {
|
|
1081
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
1082
|
+
return 'AsyncMode';
|
|
1083
|
+
case REACT_CONTEXT_TYPE:
|
|
1084
|
+
return 'Context.Consumer';
|
|
1034
1085
|
case REACT_FRAGMENT_TYPE:
|
|
1035
1086
|
return 'ReactFragment';
|
|
1036
1087
|
case REACT_PORTAL_TYPE:
|
|
1037
1088
|
return 'ReactPortal';
|
|
1038
|
-
case
|
|
1039
|
-
return '
|
|
1040
|
-
case
|
|
1041
|
-
return '
|
|
1089
|
+
case REACT_PROFILER_TYPE:
|
|
1090
|
+
return 'Profiler(' + fiber.pendingProps.id + ')';
|
|
1091
|
+
case REACT_PROVIDER_TYPE:
|
|
1092
|
+
return 'Context.Provider';
|
|
1093
|
+
case REACT_STRICT_MODE_TYPE:
|
|
1094
|
+
return 'StrictMode';
|
|
1095
|
+
case REACT_TIMEOUT_TYPE:
|
|
1096
|
+
return 'Timeout';
|
|
1042
1097
|
}
|
|
1043
1098
|
if (typeof type === 'object' && type !== null) {
|
|
1044
1099
|
switch (type.$$typeof) {
|
|
@@ -1372,6 +1427,7 @@ var React = {
|
|
|
1372
1427
|
Fragment: REACT_FRAGMENT_TYPE,
|
|
1373
1428
|
StrictMode: REACT_STRICT_MODE_TYPE,
|
|
1374
1429
|
unstable_AsyncMode: REACT_ASYNC_MODE_TYPE,
|
|
1430
|
+
unstable_Profiler: REACT_PROFILER_TYPE,
|
|
1375
1431
|
|
|
1376
1432
|
createElement: createElementWithValidation,
|
|
1377
1433
|
cloneElement: cloneElementWithValidation,
|
|
@@ -1387,6 +1443,10 @@ var React = {
|
|
|
1387
1443
|
}
|
|
1388
1444
|
};
|
|
1389
1445
|
|
|
1446
|
+
if (enableSuspense) {
|
|
1447
|
+
React.Timeout = REACT_TIMEOUT_TYPE;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1390
1450
|
{
|
|
1391
1451
|
_assign(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
|
|
1392
1452
|
// These should not be included in production.
|
|
@@ -1407,7 +1467,7 @@ var React$3 = ( React$2 && React ) || React$2;
|
|
|
1407
1467
|
|
|
1408
1468
|
// TODO: decide on the top-level export form.
|
|
1409
1469
|
// This is hacky but makes it work with both Rollup and Jest.
|
|
1410
|
-
var react = React$3
|
|
1470
|
+
var react = React$3.default ? React$3.default : React$3;
|
|
1411
1471
|
|
|
1412
1472
|
module.exports = react;
|
|
1413
1473
|
})();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.4.0
|
|
2
2
|
* react.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
'use strict';var
|
|
11
|
-
60112
|
|
12
|
-
|
|
13
|
-
H.
|
|
14
|
-
function
|
|
15
|
-
function
|
|
16
|
-
function
|
|
17
|
-
h=0;!(d=a.next()).done;)d=d.value,f=b+
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
_calculateChangedBits:b,_defaultValue:a,_currentValue:a,_changedBits:0,Provider:null,Consumer:null};a.Provider={$$typeof:
|
|
21
|
-
(
|
|
22
|
-
Y=X&&
|
|
10
|
+
'use strict';var k=require("object-assign"),n=require("fbjs/lib/invariant"),p=require("fbjs/lib/emptyObject"),q=require("fbjs/lib/emptyFunction"),r="function"===typeof Symbol&&Symbol.for,t=r?Symbol.for("react.element"):60103,u=r?Symbol.for("react.portal"):60106,v=r?Symbol.for("react.fragment"):60107,w=r?Symbol.for("react.strict_mode"):60108,x=r?Symbol.for("react.profiler"):60114,y=r?Symbol.for("react.provider"):60109,z=r?Symbol.for("react.context"):60110,A=r?Symbol.for("react.async_mode"):60111,B=
|
|
11
|
+
r?Symbol.for("react.forward_ref"):60112;r&&Symbol.for("react.timeout");var C="function"===typeof Symbol&&Symbol.iterator;function D(a){for(var b=arguments.length-1,e="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c<b;c++)e+="&args[]="+encodeURIComponent(arguments[c+1]);n(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e)}
|
|
12
|
+
var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function F(a,b,e){this.props=a;this.context=b;this.refs=p;this.updater=e||E}F.prototype.isReactComponent={};F.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?D("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};F.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function G(){}
|
|
13
|
+
G.prototype=F.prototype;function H(a,b,e){this.props=a;this.context=b;this.refs=p;this.updater=e||E}var I=H.prototype=new G;I.constructor=H;k(I,F.prototype);I.isPureReactComponent=!0;var J={current:null},K=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};
|
|
14
|
+
function M(a,b,e){var c=void 0,d={},g=null,h=null;if(null!=b)for(c in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(g=""+b.key),b)K.call(b,c)&&!L.hasOwnProperty(c)&&(d[c]=b[c]);var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){for(var l=Array(f),m=0;m<f;m++)l[m]=arguments[m+2];d.children=l}if(a&&a.defaultProps)for(c in f=a.defaultProps,f)void 0===d[c]&&(d[c]=f[c]);return{$$typeof:t,type:a,key:g,ref:h,props:d,_owner:J.current}}
|
|
15
|
+
function N(a){return"object"===typeof a&&null!==a&&a.$$typeof===t}function escape(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var O=/\/+/g,P=[];function Q(a,b,e,c){if(P.length){var d=P.pop();d.result=a;d.keyPrefix=b;d.func=e;d.context=c;d.count=0;return d}return{result:a,keyPrefix:b,func:e,context:c,count:0}}function R(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>P.length&&P.push(a)}
|
|
16
|
+
function S(a,b,e,c){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case t:case u:g=!0}}if(g)return e(c,a,""===b?"."+T(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var h=0;h<a.length;h++){d=a[h];var f=b+T(d,h);g+=S(d,f,e,c)}else if(null===a||"undefined"===typeof a?f=null:(f=C&&a[C]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),
|
|
17
|
+
h=0;!(d=a.next()).done;)d=d.value,f=b+T(d,h++),g+=S(d,f,e,c);else"object"===d&&(e=""+a,D("31","[object Object]"===e?"object with keys {"+Object.keys(a).join(", ")+"}":e,""));return g}function T(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function U(a,b){a.func.call(a.context,b,a.count++)}
|
|
18
|
+
function V(a,b,e){var c=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?W(a,c,e,q.thatReturnsArgument):null!=a&&(N(a)&&(b=d+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(O,"$&/")+"/")+e,a={$$typeof:t,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}),c.push(a))}function W(a,b,e,c,d){var g="";null!=e&&(g=(""+e).replace(O,"$&/")+"/");b=Q(b,g,c,d);null==a||S(a,"",V,b);R(b)}
|
|
19
|
+
var X={Children:{map:function(a,b,e){if(null==a)return a;var c=[];W(a,c,null,b,e);return c},forEach:function(a,b,e){if(null==a)return a;b=Q(null,null,b,e);null==a||S(a,"",U,b);R(b)},count:function(a){return null==a?0:S(a,"",q.thatReturnsNull,null)},toArray:function(a){var b=[];W(a,b,null,q.thatReturnsArgument);return b},only:function(a){N(a)?void 0:D("143");return a}},createRef:function(){return{current:null}},Component:F,PureComponent:H,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:z,
|
|
20
|
+
_calculateChangedBits:b,_defaultValue:a,_currentValue:a,_currentValue2:a,_changedBits:0,_changedBits2:0,Provider:null,Consumer:null};a.Provider={$$typeof:y,_context:a};return a.Consumer=a},forwardRef:function(a){return{$$typeof:B,render:a}},Fragment:v,StrictMode:w,unstable_AsyncMode:A,unstable_Profiler:x,createElement:M,cloneElement:function(a,b,e){null===a||void 0===a?D("267",a):void 0;var c=void 0,d=k({},a.props),g=a.key,h=a.ref,f=a._owner;if(null!=b){void 0!==b.ref&&(h=b.ref,f=J.current);void 0!==
|
|
21
|
+
b.key&&(g=""+b.key);var l=void 0;a.type&&a.type.defaultProps&&(l=a.type.defaultProps);for(c in b)K.call(b,c)&&!L.hasOwnProperty(c)&&(d[c]=void 0===b[c]&&void 0!==l?l[c]:b[c])}c=arguments.length-2;if(1===c)d.children=e;else if(1<c){l=Array(c);for(var m=0;m<c;m++)l[m]=arguments[m+2];d.children=l}return{$$typeof:t,type:a.type,key:g,ref:h,props:d,_owner:f}},createFactory:function(a){var b=M.bind(null,a);b.type=a;return b},isValidElement:N,version:"16.4.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:J,
|
|
22
|
+
assign:k}},Y={default:X},Z=Y&&X||Y;module.exports=Z.default?Z.default:Z;
|
package/package.json
CHANGED
package/umd/react.development.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.4.0
|
|
2
2
|
* react.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -108,22 +108,22 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source)
|
|
|
108
108
|
|
|
109
109
|
// TODO: this is special because it gets imported during build.
|
|
110
110
|
|
|
111
|
-
var ReactVersion = '16.
|
|
111
|
+
var ReactVersion = '16.4.0';
|
|
112
112
|
|
|
113
113
|
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
114
114
|
// nor polyfill, then a plain number is used for performance.
|
|
115
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol
|
|
116
|
-
|
|
117
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol
|
|
118
|
-
var
|
|
119
|
-
var
|
|
120
|
-
var
|
|
121
|
-
var
|
|
122
|
-
var
|
|
123
|
-
var
|
|
124
|
-
var
|
|
125
|
-
var
|
|
126
|
-
var
|
|
115
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
116
|
+
|
|
117
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
118
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
119
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
120
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
121
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
122
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
123
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
|
|
124
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
125
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
126
|
+
var REACT_TIMEOUT_TYPE = hasSymbol ? Symbol.for('react.timeout') : 0xead1;
|
|
127
127
|
|
|
128
128
|
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
129
129
|
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
@@ -196,6 +196,41 @@ var invariant_1 = invariant;
|
|
|
196
196
|
// Relying on the `invariant()` implementation lets us
|
|
197
197
|
// have preserve the format and params in the www builds.
|
|
198
198
|
|
|
199
|
+
// Exports ReactDOM.createRoot
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
// Experimental error-boundary API that can recover from errors within a single
|
|
203
|
+
// render phase
|
|
204
|
+
|
|
205
|
+
// Suspense
|
|
206
|
+
var enableSuspense = false;
|
|
207
|
+
// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
// In some cases, StrictMode should also double-render lifecycles.
|
|
211
|
+
// This can be confusing for tests though,
|
|
212
|
+
// And it can be bad for performance in production.
|
|
213
|
+
// This feature flag can be used to control the behavior:
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
// To preserve the "Pause on caught exceptions" behavior of the debugger, we
|
|
217
|
+
// replay the begin phase of a failed component inside invokeGuardedCallback.
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
// Warn about legacy context API
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
// Gather advanced timing metrics for Profiler subtrees.
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
// Fires getDerivedStateFromProps for state *or* props changes
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
// Only used in www builds.
|
|
233
|
+
|
|
199
234
|
/**
|
|
200
235
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
201
236
|
*
|
|
@@ -1186,7 +1221,7 @@ function mapChildren(children, func, context) {
|
|
|
1186
1221
|
* @param {?*} children Children tree container.
|
|
1187
1222
|
* @return {number} The number of children.
|
|
1188
1223
|
*/
|
|
1189
|
-
function countChildren(children
|
|
1224
|
+
function countChildren(children) {
|
|
1190
1225
|
return traverseAllChildren(children, emptyFunction_1.thatReturnsNull, null);
|
|
1191
1226
|
}
|
|
1192
1227
|
|
|
@@ -1235,7 +1270,14 @@ function createContext(defaultValue, calculateChangedBits) {
|
|
|
1235
1270
|
_calculateChangedBits: calculateChangedBits,
|
|
1236
1271
|
_defaultValue: defaultValue,
|
|
1237
1272
|
_currentValue: defaultValue,
|
|
1273
|
+
// As a workaround to support multiple concurrent renderers, we categorize
|
|
1274
|
+
// some renderers as primary and others as secondary. We only expect
|
|
1275
|
+
// there to be two concurrent renderers at most: React Native (primary) and
|
|
1276
|
+
// Fabric (secondary); React DOM (primary) and React ART (secondary).
|
|
1277
|
+
// Secondary renderers store their context values on separate fields.
|
|
1278
|
+
_currentValue2: defaultValue,
|
|
1238
1279
|
_changedBits: 0,
|
|
1280
|
+
_changedBits2: 0,
|
|
1239
1281
|
// These are circular
|
|
1240
1282
|
Provider: null,
|
|
1241
1283
|
Consumer: null
|
|
@@ -1249,6 +1291,7 @@ function createContext(defaultValue, calculateChangedBits) {
|
|
|
1249
1291
|
|
|
1250
1292
|
{
|
|
1251
1293
|
context._currentRenderer = null;
|
|
1294
|
+
context._currentRenderer2 = null;
|
|
1252
1295
|
}
|
|
1253
1296
|
|
|
1254
1297
|
return context;
|
|
@@ -1257,6 +1300,10 @@ function createContext(defaultValue, calculateChangedBits) {
|
|
|
1257
1300
|
function forwardRef(render) {
|
|
1258
1301
|
{
|
|
1259
1302
|
!(typeof render === 'function') ? warning_1(false, 'forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render) : void 0;
|
|
1303
|
+
|
|
1304
|
+
if (render != null) {
|
|
1305
|
+
!(render.defaultProps == null && render.propTypes == null) ? warning_1(false, 'forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?') : void 0;
|
|
1306
|
+
}
|
|
1260
1307
|
}
|
|
1261
1308
|
|
|
1262
1309
|
return {
|
|
@@ -1272,7 +1319,7 @@ var describeComponentFrame = function (name, source, ownerName) {
|
|
|
1272
1319
|
function isValidElementType(type) {
|
|
1273
1320
|
return typeof type === 'string' || typeof type === 'function' ||
|
|
1274
1321
|
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1275
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
|
|
1322
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_TIMEOUT_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
|
|
1276
1323
|
}
|
|
1277
1324
|
|
|
1278
1325
|
function getComponentName(fiber) {
|
|
@@ -1285,14 +1332,22 @@ function getComponentName(fiber) {
|
|
|
1285
1332
|
return type;
|
|
1286
1333
|
}
|
|
1287
1334
|
switch (type) {
|
|
1335
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
1336
|
+
return 'AsyncMode';
|
|
1337
|
+
case REACT_CONTEXT_TYPE:
|
|
1338
|
+
return 'Context.Consumer';
|
|
1288
1339
|
case REACT_FRAGMENT_TYPE:
|
|
1289
1340
|
return 'ReactFragment';
|
|
1290
1341
|
case REACT_PORTAL_TYPE:
|
|
1291
1342
|
return 'ReactPortal';
|
|
1292
|
-
case
|
|
1293
|
-
return '
|
|
1294
|
-
case
|
|
1295
|
-
return '
|
|
1343
|
+
case REACT_PROFILER_TYPE:
|
|
1344
|
+
return 'Profiler(' + fiber.pendingProps.id + ')';
|
|
1345
|
+
case REACT_PROVIDER_TYPE:
|
|
1346
|
+
return 'Context.Provider';
|
|
1347
|
+
case REACT_STRICT_MODE_TYPE:
|
|
1348
|
+
return 'StrictMode';
|
|
1349
|
+
case REACT_TIMEOUT_TYPE:
|
|
1350
|
+
return 'Timeout';
|
|
1296
1351
|
}
|
|
1297
1352
|
if (typeof type === 'object' && type !== null) {
|
|
1298
1353
|
switch (type.$$typeof) {
|
|
@@ -1699,6 +1754,7 @@ var React = {
|
|
|
1699
1754
|
Fragment: REACT_FRAGMENT_TYPE,
|
|
1700
1755
|
StrictMode: REACT_STRICT_MODE_TYPE,
|
|
1701
1756
|
unstable_AsyncMode: REACT_ASYNC_MODE_TYPE,
|
|
1757
|
+
unstable_Profiler: REACT_PROFILER_TYPE,
|
|
1702
1758
|
|
|
1703
1759
|
createElement: createElementWithValidation,
|
|
1704
1760
|
cloneElement: cloneElementWithValidation,
|
|
@@ -1714,6 +1770,10 @@ var React = {
|
|
|
1714
1770
|
}
|
|
1715
1771
|
};
|
|
1716
1772
|
|
|
1773
|
+
if (enableSuspense) {
|
|
1774
|
+
React.Timeout = REACT_TIMEOUT_TYPE;
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1717
1777
|
{
|
|
1718
1778
|
objectAssign(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
|
|
1719
1779
|
// These should not be included in production.
|
|
@@ -1734,7 +1794,7 @@ var React$3 = ( React$2 && React ) || React$2;
|
|
|
1734
1794
|
|
|
1735
1795
|
// TODO: decide on the top-level export form.
|
|
1736
1796
|
// This is hacky but makes it work with both Rollup and Jest.
|
|
1737
|
-
var react = React$3
|
|
1797
|
+
var react = React$3.default ? React$3.default : React$3;
|
|
1738
1798
|
|
|
1739
1799
|
return react;
|
|
1740
1800
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.4.0
|
|
2
2
|
* react.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
'use strict';(function(p,h){"object"===typeof exports&&"undefined"!==typeof module?module.exports=h():"function"===typeof define&&define.amd?define(h):p.React=h()})(this,function(){function p(a){for(var b=arguments.length-1,
|
|
10
|
-
|
|
11
|
-
m}if(a&&a.defaultProps)for(
|
|
12
|
-
null;a.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Object(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
a,"forceUpdate")};F.prototype=q.prototype;
|
|
20
|
-
[];z(a,b,null,A.thatReturnsArgument);return b},only:function(a){x(a)?void 0:p("143");return a}},createRef:function(){return{current:null}},Component:q,PureComponent:v,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:
|
|
21
|
-
b,
|
|
22
|
-
_owner:g}},createFactory:function(a){var b=G.bind(null,a);b.type=a;return b},isValidElement:x,version:"16.
|
|
9
|
+
'use strict';(function(p,h){"object"===typeof exports&&"undefined"!==typeof module?module.exports=h():"function"===typeof define&&define.amd?define(h):p.React=h()})(this,function(){function p(a){for(var b=arguments.length-1,f="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=0;d<b;d++)f+="&args[]="+encodeURIComponent(arguments[d+1]);O(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",
|
|
10
|
+
f)}function h(a){return function(){return a}}function q(a,b,f){this.props=a;this.context=b;this.refs=D;this.updater=f||E}function F(){}function v(a,b,f){this.props=a;this.context=b;this.refs=D;this.updater=f||E}function G(a,b,f){var d=void 0,e={},k=null,c=null;if(null!=b)for(d in void 0!==b.ref&&(c=b.ref),void 0!==b.key&&(k=""+b.key),b)H.call(b,d)&&!I.hasOwnProperty(d)&&(e[d]=b[d]);var g=arguments.length-2;if(1===g)e.children=f;else if(1<g){for(var m=Array(g),l=0;l<g;l++)m[l]=arguments[l+2];e.children=
|
|
11
|
+
m}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===e[d]&&(e[d]=g[d]);return{$$typeof:r,type:a,key:k,ref:c,props:e,_owner:w.current}}function x(a){return"object"===typeof a&&null!==a&&a.$$typeof===r}function P(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}function J(a,b,f,d){if(u.length){var e=u.pop();e.result=a;e.keyPrefix=b;e.func=f;e.context=d;e.count=0;return e}return{result:a,keyPrefix:b,func:f,context:d,count:0}}function K(a){a.result=null;a.keyPrefix=
|
|
12
|
+
null;a.func=null;a.context=null;a.count=0;10>u.length&&u.push(a)}function t(a,b,f,d){var e=typeof a;if("undefined"===e||"boolean"===e)a=null;var k=!1;if(null===a)k=!0;else switch(e){case "string":case "number":k=!0;break;case "object":switch(a.$$typeof){case r:case Q:k=!0}}if(k)return f(d,a,""===b?"."+y(a,0):b),1;k=0;b=""===b?".":b+":";if(Array.isArray(a))for(var c=0;c<a.length;c++){e=a[c];var g=b+y(e,c);k+=t(e,g,f,d)}else if(null===a||"undefined"===typeof a?g=null:(g=L&&a[L]||a["@@iterator"],g="function"===
|
|
13
|
+
typeof g?g:null),"function"===typeof g)for(a=g.call(a),c=0;!(e=a.next()).done;)e=e.value,g=b+y(e,c++),k+=t(e,g,f,d);else"object"===e&&(f=""+a,p("31","[object Object]"===f?"object with keys {"+Object.keys(a).join(", ")+"}":f,""));return k}function y(a,b){return"object"===typeof a&&null!==a&&null!=a.key?P(a.key):b.toString(36)}function R(a,b,f){a.func.call(a.context,b,a.count++)}function S(a,b,f){var d=a.result,e=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?z(a,d,f,A.thatReturnsArgument):
|
|
14
|
+
null!=a&&(x(a)&&(b=e+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(M,"$&/")+"/")+f,a={$$typeof:r,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}),d.push(a))}function z(a,b,f,d,e){var c="";null!=f&&(c=(""+f).replace(M,"$&/")+"/");b=J(b,c,d,e);null==a||t(a,"",S,b);K(b)}var N=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,B=function(){try{if(!Object.assign)return!1;var a=new String("abc");a[5]="de";if("5"===Object.getOwnPropertyNames(a)[0])return!1;
|
|
15
|
+
var b={};for(a=0;10>a;a++)b["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(b).map(function(a){return b[a]}).join(""))return!1;var f={};"abcdefghijklmnopqrst".split("").forEach(function(a){f[a]=a});return"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},f)).join("")?!1:!0}catch(d){return!1}}()?Object.assign:function(a,b){if(null===a||void 0===a)throw new TypeError("Object.assign cannot be called with null or undefined");var f=Object(a);for(var d,e=1;e<arguments.length;e++){var c=
|
|
16
|
+
Object(arguments[e]);for(var h in c)T.call(c,h)&&(f[h]=c[h]);if(N){d=N(c);for(var g=0;g<d.length;g++)U.call(c,d[g])&&(f[d[g]]=c[d[g]])}}return f},c="function"===typeof Symbol&&Symbol.for,r=c?Symbol.for("react.element"):60103,Q=c?Symbol.for("react.portal"):60106,n=c?Symbol.for("react.fragment"):60107,C=c?Symbol.for("react.strict_mode"):60108,V=c?Symbol.for("react.profiler"):60114,W=c?Symbol.for("react.provider"):60109,X=c?Symbol.for("react.context"):60110,Y=c?Symbol.for("react.async_mode"):60111,Z=
|
|
17
|
+
c?Symbol.for("react.forward_ref"):60112;c&&Symbol.for("react.timeout");var L="function"===typeof Symbol&&Symbol.iterator,O=function(a,b,f,d,c,k,h,g){if(!a){if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var e=[f,d,c,k,h,g],l=0;a=Error(b.replace(/%s/g,function(){return e[l++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}},D={};c=function(){};c.thatReturns=h;c.thatReturnsFalse=h(!1);
|
|
18
|
+
c.thatReturnsTrue=h(!0);c.thatReturnsNull=h(null);c.thatReturnsThis=function(){return this};c.thatReturnsArgument=function(a){return a};var A=c,E={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,d){},enqueueSetState:function(a,b,c,d){}};q.prototype.isReactComponent={};q.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?p("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};q.prototype.forceUpdate=
|
|
19
|
+
function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};F.prototype=q.prototype;c=v.prototype=new F;c.constructor=v;B(c,q.prototype);c.isPureReactComponent=!0;var w={current:null},H=Object.prototype.hasOwnProperty,I={key:!0,ref:!0,__self:!0,__source:!0},M=/\/+/g,u=[];n={Children:{map:function(a,b,c){if(null==a)return a;var d=[];z(a,d,null,b,c);return d},forEach:function(a,b,c){if(null==a)return a;b=J(null,null,b,c);null==a||t(a,"",R,b);K(b)},count:function(a){return null==a?0:t(a,"",A.thatReturnsNull,
|
|
20
|
+
null)},toArray:function(a){var b=[];z(a,b,null,A.thatReturnsArgument);return b},only:function(a){x(a)?void 0:p("143");return a}},createRef:function(){return{current:null}},Component:q,PureComponent:v,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:X,_calculateChangedBits:b,_defaultValue:a,_currentValue:a,_currentValue2:a,_changedBits:0,_changedBits2:0,Provider:null,Consumer:null};a.Provider={$$typeof:W,_context:a};return a.Consumer=a},forwardRef:function(a){return{$$typeof:Z,render:a}},
|
|
21
|
+
Fragment:n,StrictMode:C,unstable_AsyncMode:Y,unstable_Profiler:V,createElement:G,cloneElement:function(a,b,c){null===a||void 0===a?p("267",a):void 0;var d=void 0,e=B({},a.props),f=a.key,h=a.ref,g=a._owner;if(null!=b){void 0!==b.ref&&(h=b.ref,g=w.current);void 0!==b.key&&(f=""+b.key);var m=void 0;a.type&&a.type.defaultProps&&(m=a.type.defaultProps);for(d in b)H.call(b,d)&&!I.hasOwnProperty(d)&&(e[d]=void 0===b[d]&&void 0!==m?m[d]:b[d])}d=arguments.length-2;if(1===d)e.children=c;else if(1<d){m=Array(d);
|
|
22
|
+
for(var l=0;l<d;l++)m[l]=arguments[l+2];e.children=m}return{$$typeof:r,type:a.type,key:f,ref:h,props:e,_owner:g}},createFactory:function(a){var b=G.bind(null,a);b.type=a;return b},isValidElement:x,version:"16.4.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:w,assign:B}};n=(C={default:n},n)||C;return n.default?n.default:n});
|