react 16.6.0-alpha.0 → 16.6.0-alpha.400d197
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 +98 -14
- package/cjs/react.production.min.js +16 -16
- package/package.json +2 -2
- package/umd/react.development.js +368 -75
- package/umd/react.production.min.js +24 -21
- package/umd/react.profiling.min.js +29 -26
package/cjs/react.development.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.6.0-alpha.
|
|
1
|
+
/** @license React v16.6.0-alpha.400d197
|
|
2
2
|
* react.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -20,7 +20,7 @@ var checkPropTypes = require('prop-types/checkPropTypes');
|
|
|
20
20
|
|
|
21
21
|
// TODO: this is special because it gets imported during build.
|
|
22
22
|
|
|
23
|
-
var ReactVersion = '16.6.0-alpha.
|
|
23
|
+
var ReactVersion = '16.6.0-alpha.400d197';
|
|
24
24
|
|
|
25
25
|
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
26
26
|
// nor polyfill, then a plain number is used for performance.
|
|
@@ -33,9 +33,10 @@ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeac
|
|
|
33
33
|
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
34
34
|
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
35
35
|
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
|
|
36
|
-
var
|
|
36
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
37
37
|
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
38
38
|
var REACT_PLACEHOLDER_TYPE = hasSymbol ? Symbol.for('react.placeholder') : 0xead1;
|
|
39
|
+
var REACT_PURE_TYPE = hasSymbol ? Symbol.for('react.pure') : 0xead3;
|
|
39
40
|
|
|
40
41
|
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
41
42
|
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
@@ -54,11 +55,9 @@ function getIteratorFn(maybeIterable) {
|
|
|
54
55
|
// Exports ReactDOM.createRoot
|
|
55
56
|
|
|
56
57
|
|
|
57
|
-
// Experimental error-boundary API that can recover from errors within a single
|
|
58
|
-
// render phase
|
|
59
|
-
|
|
60
58
|
// Suspense
|
|
61
59
|
var enableSuspense = false;
|
|
60
|
+
var enableHooks_DEPRECATED = false;
|
|
62
61
|
// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
|
|
63
62
|
|
|
64
63
|
|
|
@@ -75,9 +74,6 @@ var enableSuspense = false;
|
|
|
75
74
|
// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
|
|
76
75
|
|
|
77
76
|
|
|
78
|
-
// Warn about legacy context API
|
|
79
|
-
|
|
80
|
-
|
|
81
77
|
// Gather advanced timing metrics for Profiler subtrees.
|
|
82
78
|
|
|
83
79
|
|
|
@@ -556,8 +552,8 @@ function getComponentName(type) {
|
|
|
556
552
|
return type;
|
|
557
553
|
}
|
|
558
554
|
switch (type) {
|
|
559
|
-
case
|
|
560
|
-
return '
|
|
555
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
556
|
+
return 'ConcurrentMode';
|
|
561
557
|
case REACT_FRAGMENT_TYPE:
|
|
562
558
|
return 'Fragment';
|
|
563
559
|
case REACT_PORTAL_TYPE:
|
|
@@ -1385,10 +1381,84 @@ function forwardRef(render) {
|
|
|
1385
1381
|
};
|
|
1386
1382
|
}
|
|
1387
1383
|
|
|
1384
|
+
function pure(render, compare) {
|
|
1385
|
+
{
|
|
1386
|
+
if (typeof render !== 'function') {
|
|
1387
|
+
warningWithoutStack$1(false, 'pure: The first argument must be a function component. Instead ' + 'received: %s', render === null ? 'null' : typeof render);
|
|
1388
|
+
} else {
|
|
1389
|
+
var prototype = render.prototype;
|
|
1390
|
+
if (prototype && prototype.isReactComponent) {
|
|
1391
|
+
warningWithoutStack$1(false, 'pure: The first argument must be a function component. Classes ' + 'are not supported. Use React.PureComponent instead.');
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
return {
|
|
1396
|
+
$$typeof: REACT_PURE_TYPE,
|
|
1397
|
+
render: render,
|
|
1398
|
+
compare: compare === undefined ? null : compare
|
|
1399
|
+
};
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
function resolveDispatcher() {
|
|
1403
|
+
var dispatcher = ReactCurrentOwner.currentDispatcher;
|
|
1404
|
+
!(dispatcher !== null) ? invariant(false, 'Hooks can only be called inside the body of a functional component.') : void 0;
|
|
1405
|
+
return dispatcher;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
function useContext(context, observedBits) {
|
|
1409
|
+
var dispatcher = resolveDispatcher();
|
|
1410
|
+
return dispatcher.useContext(context, observedBits);
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
function useState(initialState) {
|
|
1414
|
+
var dispatcher = resolveDispatcher();
|
|
1415
|
+
return dispatcher.useState(initialState);
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
function useReducer(reducer, initialState, initialAction) {
|
|
1419
|
+
var dispatcher = resolveDispatcher();
|
|
1420
|
+
return dispatcher.useReducer(reducer, initialState, initialAction);
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
function useRef(initialValue) {
|
|
1424
|
+
var dispatcher = resolveDispatcher();
|
|
1425
|
+
return dispatcher.useRef(initialValue);
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
function useEffect(create, inputs) {
|
|
1429
|
+
var dispatcher = resolveDispatcher();
|
|
1430
|
+
return dispatcher.useEffect(create, inputs);
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
function useMutationEffect(create, inputs) {
|
|
1434
|
+
var dispatcher = resolveDispatcher();
|
|
1435
|
+
return dispatcher.useMutationEffect(create, inputs);
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
function useLayoutEffect(create, inputs) {
|
|
1439
|
+
var dispatcher = resolveDispatcher();
|
|
1440
|
+
return dispatcher.useLayoutEffect(create, inputs);
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
function useCallback(callback, inputs) {
|
|
1444
|
+
var dispatcher = resolveDispatcher();
|
|
1445
|
+
return dispatcher.useCallback(callback, inputs);
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
function useMemo(create, inputs) {
|
|
1449
|
+
var dispatcher = resolveDispatcher();
|
|
1450
|
+
return dispatcher.useMemo(create, inputs);
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
function useAPI(ref, create, inputs) {
|
|
1454
|
+
var dispatcher = resolveDispatcher();
|
|
1455
|
+
return dispatcher.useAPI(ref, create, inputs);
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1388
1458
|
function isValidElementType(type) {
|
|
1389
1459
|
return typeof type === 'string' || typeof type === 'function' ||
|
|
1390
1460
|
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1391
|
-
type === REACT_FRAGMENT_TYPE || type ===
|
|
1461
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_PLACEHOLDER_TYPE || typeof type === 'object' && type !== null && (typeof type.then === 'function' || type.$$typeof === REACT_PURE_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
|
|
1392
1462
|
}
|
|
1393
1463
|
|
|
1394
1464
|
/**
|
|
@@ -1536,7 +1606,7 @@ function validatePropTypes(element) {
|
|
|
1536
1606
|
var name = void 0,
|
|
1537
1607
|
propTypes = void 0;
|
|
1538
1608
|
if (typeof type === 'function') {
|
|
1539
|
-
// Class or
|
|
1609
|
+
// Class or function component
|
|
1540
1610
|
name = type.displayName || type.name;
|
|
1541
1611
|
propTypes = type.propTypes;
|
|
1542
1612
|
} else if (typeof type === 'object' && type !== null && type.$$typeof === REACT_FORWARD_REF_TYPE) {
|
|
@@ -1688,10 +1758,11 @@ var React = {
|
|
|
1688
1758
|
|
|
1689
1759
|
createContext: createContext,
|
|
1690
1760
|
forwardRef: forwardRef,
|
|
1761
|
+
pure: pure,
|
|
1691
1762
|
|
|
1692
1763
|
Fragment: REACT_FRAGMENT_TYPE,
|
|
1693
1764
|
StrictMode: REACT_STRICT_MODE_TYPE,
|
|
1694
|
-
|
|
1765
|
+
unstable_ConcurrentMode: REACT_CONCURRENT_MODE_TYPE,
|
|
1695
1766
|
unstable_Profiler: REACT_PROFILER_TYPE,
|
|
1696
1767
|
|
|
1697
1768
|
createElement: createElementWithValidation,
|
|
@@ -1709,6 +1780,19 @@ if (enableSuspense) {
|
|
|
1709
1780
|
React.lazy = lazy;
|
|
1710
1781
|
}
|
|
1711
1782
|
|
|
1783
|
+
if (enableHooks_DEPRECATED) {
|
|
1784
|
+
React.useAPI = useAPI;
|
|
1785
|
+
React.useCallback = useCallback;
|
|
1786
|
+
React.useContext = useContext;
|
|
1787
|
+
React.useEffect = useEffect;
|
|
1788
|
+
React.useLayoutEffect = useLayoutEffect;
|
|
1789
|
+
React.useMemo = useMemo;
|
|
1790
|
+
React.useMutationEffect = useMutationEffect;
|
|
1791
|
+
React.useReducer = useReducer;
|
|
1792
|
+
React.useRef = useRef;
|
|
1793
|
+
React.useState = useState;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1712
1796
|
|
|
1713
1797
|
|
|
1714
1798
|
var React$2 = Object.freeze({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.6.0-alpha.
|
|
1
|
+
/** @license React v16.6.0-alpha.400d197
|
|
2
2
|
* react.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -7,18 +7,18 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
'use strict';var
|
|
11
|
-
var z="function"===typeof Symbol&&Symbol.iterator;function
|
|
12
|
-
function
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
function
|
|
16
|
-
function
|
|
17
|
-
function
|
|
18
|
-
function
|
|
19
|
-
0;!(e=a.next()).done;)e=e.value,f=b+
|
|
20
|
-
function
|
|
21
|
-
var X={Children:{map:function(a,b,d){if(null==a)return a;var c=[];W(a,c,null,b,d);return c},forEach:function(a,b,d){if(null==a)return a;b=
|
|
22
|
-
_currentValue:a,_currentValue2:a,Provider:null,Consumer:null,unstable_read:null};a.Provider={$$typeof:v,_context:a};a.Consumer=a;a.unstable_read=
|
|
23
|
-
var
|
|
24
|
-
assign:
|
|
10
|
+
'use strict';var k=require("object-assign"),n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.concurrent_mode"):60111,y=n?Symbol.for("react.forward_ref"):60112;n&&Symbol.for("react.placeholder");
|
|
11
|
+
var z=n?Symbol.for("react.pure"):60115,A="function"===typeof Symbol&&Symbol.iterator;function B(a,b,d,c,e,g,h,f){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[d,c,e,g,h,f],m=0;a=Error(b.replace(/%s/g,function(){return l[m++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}}
|
|
12
|
+
function C(a){for(var b=arguments.length-1,d="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c<b;c++)d+="&args[]="+encodeURIComponent(arguments[c+1]);B(!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. ",d)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E={};
|
|
13
|
+
function F(a,b,d){this.props=a;this.context=b;this.refs=E;this.updater=d||D}F.prototype.isReactComponent={};F.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?C("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};F.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function G(){}G.prototype=F.prototype;function H(a,b,d){this.props=a;this.context=b;this.refs=E;this.updater=d||D}var I=H.prototype=new G;
|
|
14
|
+
I.constructor=H;k(I,F.prototype);I.isPureReactComponent=!0;var J={current:null,currentDispatcher:null},K=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};
|
|
15
|
+
function M(a,b,d){var c=void 0,e={},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)&&(e[c]=b[c]);var f=arguments.length-2;if(1===f)e.children=d;else if(1<f){for(var l=Array(f),m=0;m<f;m++)l[m]=arguments[m+2];e.children=l}if(a&&a.defaultProps)for(c in f=a.defaultProps,f)void 0===e[c]&&(e[c]=f[c]);return{$$typeof:p,type:a,key:g,ref:h,props:e,_owner:J.current}}
|
|
16
|
+
function N(a,b){return{$$typeof:p,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return"object"===typeof a&&null!==a&&a.$$typeof===p}function escape(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var P=/\/+/g,Q=[];function R(a,b,d,c){if(Q.length){var e=Q.pop();e.result=a;e.keyPrefix=b;e.func=d;e.context=c;e.count=0;return e}return{result:a,keyPrefix:b,func:d,context:c,count:0}}
|
|
17
|
+
function S(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>Q.length&&Q.push(a)}
|
|
18
|
+
function T(a,b,d,c){var e=typeof a;if("undefined"===e||"boolean"===e)a=null;var g=!1;if(null===a)g=!0;else switch(e){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case p:case q:g=!0}}if(g)return d(c,a,""===b?"."+U(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var h=0;h<a.length;h++){e=a[h];var f=b+U(e,h);g+=T(e,f,d,c)}else if(null===a||"object"!==typeof a?f=null:(f=A&&a[A]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),h=
|
|
19
|
+
0;!(e=a.next()).done;)e=e.value,f=b+U(e,h++),g+=T(e,f,d,c);else"object"===e&&(d=""+a,C("31","[object Object]"===d?"object with keys {"+Object.keys(a).join(", ")+"}":d,""));return g}function V(a,b,d){return null==a?0:T(a,"",b,d)}function U(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function aa(a,b){a.func.call(a.context,b,a.count++)}
|
|
20
|
+
function ba(a,b,d){var c=a.result,e=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?W(a,c,d,function(a){return a}):null!=a&&(O(a)&&(a=N(a,e+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(P,"$&/")+"/")+d)),c.push(a))}function W(a,b,d,c,e){var g="";null!=d&&(g=(""+d).replace(P,"$&/")+"/");b=R(b,g,c,e);V(a,ba,b);S(b)}function ca(a,b){var d=J.currentDispatcher;null===d?C("277"):void 0;return d.readContext(a,b)}
|
|
21
|
+
var X={Children:{map:function(a,b,d){if(null==a)return a;var c=[];W(a,c,null,b,d);return c},forEach:function(a,b,d){if(null==a)return a;b=R(null,null,b,d);V(a,aa,b);S(b)},count:function(a){return V(a,function(){return null},null)},toArray:function(a){var b=[];W(a,b,null,function(a){return a});return b},only:function(a){O(a)?void 0:C("143");return a}},createRef:function(){return{current:null}},Component:F,PureComponent:H,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:w,_calculateChangedBits:b,
|
|
22
|
+
_currentValue:a,_currentValue2:a,Provider:null,Consumer:null,unstable_read:null};a.Provider={$$typeof:v,_context:a};a.Consumer=a;a.unstable_read=ca.bind(null,a);return a},forwardRef:function(a){return{$$typeof:y,render:a}},pure:function(a,b){return{$$typeof:z,render:a,compare:void 0===b?null:b}},Fragment:r,StrictMode:t,unstable_ConcurrentMode:x,unstable_Profiler:u,createElement:M,cloneElement:function(a,b,d){null===a||void 0===a?C("267",a):void 0;var c=void 0,e=k({},a.props),g=a.key,h=a.ref,f=a._owner;
|
|
23
|
+
if(null!=b){void 0!==b.ref&&(h=b.ref,f=J.current);void 0!==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)&&(e[c]=void 0===b[c]&&void 0!==l?l[c]:b[c])}c=arguments.length-2;if(1===c)e.children=d;else if(1<c){l=Array(c);for(var m=0;m<c;m++)l[m]=arguments[m+2];e.children=l}return{$$typeof:p,type:a.type,key:g,ref:h,props:e,_owner:f}},createFactory:function(a){var b=M.bind(null,a);b.type=a;return b},isValidElement:O,version:"16.6.0-alpha.400d197",
|
|
24
|
+
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:J,assign:k}},Y={default:X},Z=Y&&X||Y;module.exports=Z.default||Z;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"keywords": [
|
|
5
5
|
"react"
|
|
6
6
|
],
|
|
7
|
-
"version": "16.6.0-alpha.
|
|
7
|
+
"version": "16.6.0-alpha.400d197",
|
|
8
8
|
"homepage": "https://reactjs.org/",
|
|
9
9
|
"bugs": "https://github.com/facebook/react/issues",
|
|
10
10
|
"license": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"loose-envify": "^1.1.0",
|
|
25
25
|
"object-assign": "^4.1.1",
|
|
26
26
|
"prop-types": "^15.6.2",
|
|
27
|
-
"
|
|
27
|
+
"scheduler": "^0.10.0-alpha.400d197"
|
|
28
28
|
},
|
|
29
29
|
"browserify": {
|
|
30
30
|
"transform": [
|
package/umd/react.development.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.6.0-alpha.
|
|
1
|
+
/** @license React v16.6.0-alpha.400d197
|
|
2
2
|
* react.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
// TODO: this is special because it gets imported during build.
|
|
19
19
|
|
|
20
|
-
var ReactVersion = '16.6.0-alpha.
|
|
20
|
+
var ReactVersion = '16.6.0-alpha.400d197';
|
|
21
21
|
|
|
22
22
|
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
23
23
|
// nor polyfill, then a plain number is used for performance.
|
|
@@ -30,9 +30,10 @@ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeac
|
|
|
30
30
|
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
31
31
|
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
32
32
|
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
|
|
33
|
-
var
|
|
33
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
34
34
|
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
35
35
|
var REACT_PLACEHOLDER_TYPE = hasSymbol ? Symbol.for('react.placeholder') : 0xead1;
|
|
36
|
+
var REACT_PURE_TYPE = hasSymbol ? Symbol.for('react.pure') : 0xead3;
|
|
36
37
|
|
|
37
38
|
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
38
39
|
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
@@ -51,11 +52,9 @@ function getIteratorFn(maybeIterable) {
|
|
|
51
52
|
// Exports ReactDOM.createRoot
|
|
52
53
|
|
|
53
54
|
|
|
54
|
-
// Experimental error-boundary API that can recover from errors within a single
|
|
55
|
-
// render phase
|
|
56
|
-
|
|
57
55
|
// Suspense
|
|
58
56
|
var enableSuspense = false;
|
|
57
|
+
var enableHooks_DEPRECATED = false;
|
|
59
58
|
// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
|
|
60
59
|
|
|
61
60
|
|
|
@@ -72,9 +71,6 @@ var enableSuspense = false;
|
|
|
72
71
|
// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
|
|
73
72
|
|
|
74
73
|
|
|
75
|
-
// Warn about legacy context API
|
|
76
|
-
|
|
77
|
-
|
|
78
74
|
// Gather advanced timing metrics for Profiler subtrees.
|
|
79
75
|
|
|
80
76
|
|
|
@@ -577,14 +573,34 @@ function createRef() {
|
|
|
577
573
|
|
|
578
574
|
/* eslint-disable no-var */
|
|
579
575
|
|
|
580
|
-
// TODO:
|
|
581
|
-
|
|
582
|
-
var
|
|
576
|
+
// TODO: Use symbols?
|
|
577
|
+
var ImmediatePriority = 1;
|
|
578
|
+
var InteractivePriority = 2;
|
|
579
|
+
var NormalPriority = 3;
|
|
580
|
+
var WheneverPriority = 4;
|
|
581
|
+
|
|
582
|
+
// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
|
|
583
|
+
// Math.pow(2, 30) - 1
|
|
584
|
+
// 0b111111111111111111111111111111
|
|
585
|
+
var maxSigned31BitInt = 1073741823;
|
|
586
|
+
|
|
587
|
+
// Times out immediately
|
|
588
|
+
var IMMEDIATE_PRIORITY_TIMEOUT = -1;
|
|
589
|
+
// Eventually times out
|
|
590
|
+
var INTERACTIVE_PRIORITY_TIMEOUT = 250;
|
|
591
|
+
var NORMAL_PRIORITY_TIMEOUT = 5000;
|
|
592
|
+
// Never times out
|
|
593
|
+
var WHENEVER_PRIORITY_TIMEOUT = maxSigned31BitInt;
|
|
583
594
|
|
|
584
595
|
// Callbacks are stored as a circular, doubly linked list.
|
|
585
596
|
var firstCallbackNode = null;
|
|
586
597
|
|
|
587
|
-
var
|
|
598
|
+
var currentPriorityLevel = NormalPriority;
|
|
599
|
+
var currentEventStartTime = -1;
|
|
600
|
+
var currentExpirationTime = -1;
|
|
601
|
+
|
|
602
|
+
// This is set when a callback is being executed, to prevent re-entrancy.
|
|
603
|
+
var isExecutingCallback = false;
|
|
588
604
|
|
|
589
605
|
var isHostCallbackScheduled = false;
|
|
590
606
|
|
|
@@ -593,6 +609,11 @@ var hasNativePerformanceNow = typeof performance === 'object' && typeof performa
|
|
|
593
609
|
var timeRemaining;
|
|
594
610
|
if (hasNativePerformanceNow) {
|
|
595
611
|
timeRemaining = function () {
|
|
612
|
+
if (firstCallbackNode !== null && firstCallbackNode.expirationTime < currentExpirationTime) {
|
|
613
|
+
// A higher priority callback was scheduled. Yield so we can switch to
|
|
614
|
+
// working on that.
|
|
615
|
+
return 0;
|
|
616
|
+
}
|
|
596
617
|
// We assume that if we have a performance timer that the rAF callback
|
|
597
618
|
// gets a performance timer value. Not sure if this is always true.
|
|
598
619
|
var remaining = getFrameDeadline() - performance.now();
|
|
@@ -601,6 +622,9 @@ if (hasNativePerformanceNow) {
|
|
|
601
622
|
} else {
|
|
602
623
|
timeRemaining = function () {
|
|
603
624
|
// Fallback to Date.now()
|
|
625
|
+
if (firstCallbackNode !== null && firstCallbackNode.expirationTime < currentExpirationTime) {
|
|
626
|
+
return 0;
|
|
627
|
+
}
|
|
604
628
|
var remaining = getFrameDeadline() - Date.now();
|
|
605
629
|
return remaining > 0 ? remaining : 0;
|
|
606
630
|
};
|
|
@@ -612,22 +636,22 @@ var deadlineObject = {
|
|
|
612
636
|
};
|
|
613
637
|
|
|
614
638
|
function ensureHostCallbackIsScheduled() {
|
|
615
|
-
if (
|
|
639
|
+
if (isExecutingCallback) {
|
|
616
640
|
// Don't schedule work yet; wait until the next time we yield.
|
|
617
641
|
return;
|
|
618
642
|
}
|
|
619
|
-
// Schedule the host callback using the earliest
|
|
620
|
-
var
|
|
643
|
+
// Schedule the host callback using the earliest expiration in the list.
|
|
644
|
+
var expirationTime = firstCallbackNode.expirationTime;
|
|
621
645
|
if (!isHostCallbackScheduled) {
|
|
622
646
|
isHostCallbackScheduled = true;
|
|
623
647
|
} else {
|
|
624
648
|
// Cancel the existing host callback.
|
|
625
|
-
|
|
649
|
+
cancelHostCallback();
|
|
626
650
|
}
|
|
627
|
-
|
|
651
|
+
requestHostCallback(flushWork, expirationTime);
|
|
628
652
|
}
|
|
629
653
|
|
|
630
|
-
function flushFirstCallback(
|
|
654
|
+
function flushFirstCallback() {
|
|
631
655
|
var flushedNode = firstCallbackNode;
|
|
632
656
|
|
|
633
657
|
// Remove the node from the list before calling the callback. That way the
|
|
@@ -638,33 +662,117 @@ function flushFirstCallback(node) {
|
|
|
638
662
|
firstCallbackNode = null;
|
|
639
663
|
next = null;
|
|
640
664
|
} else {
|
|
641
|
-
var
|
|
642
|
-
firstCallbackNode =
|
|
643
|
-
next.previous =
|
|
665
|
+
var lastCallbackNode = firstCallbackNode.previous;
|
|
666
|
+
firstCallbackNode = lastCallbackNode.next = next;
|
|
667
|
+
next.previous = lastCallbackNode;
|
|
644
668
|
}
|
|
645
669
|
|
|
646
670
|
flushedNode.next = flushedNode.previous = null;
|
|
647
671
|
|
|
648
672
|
// Now it's safe to call the callback.
|
|
649
673
|
var callback = flushedNode.callback;
|
|
650
|
-
|
|
674
|
+
var expirationTime = flushedNode.expirationTime;
|
|
675
|
+
var priorityLevel = flushedNode.priorityLevel;
|
|
676
|
+
var previousPriorityLevel = currentPriorityLevel;
|
|
677
|
+
var previousExpirationTime = currentExpirationTime;
|
|
678
|
+
currentPriorityLevel = priorityLevel;
|
|
679
|
+
currentExpirationTime = expirationTime;
|
|
680
|
+
var continuationCallback;
|
|
681
|
+
try {
|
|
682
|
+
continuationCallback = callback(deadlineObject);
|
|
683
|
+
} finally {
|
|
684
|
+
currentPriorityLevel = previousPriorityLevel;
|
|
685
|
+
currentExpirationTime = previousExpirationTime;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
// A callback may return a continuation. The continuation should be scheduled
|
|
689
|
+
// with the same priority and expiration as the just-finished callback.
|
|
690
|
+
if (typeof continuationCallback === 'function') {
|
|
691
|
+
var continuationNode = {
|
|
692
|
+
callback: continuationCallback,
|
|
693
|
+
priorityLevel: priorityLevel,
|
|
694
|
+
expirationTime: expirationTime,
|
|
695
|
+
next: null,
|
|
696
|
+
previous: null
|
|
697
|
+
};
|
|
698
|
+
|
|
699
|
+
// Insert the new callback into the list, sorted by its expiration. This is
|
|
700
|
+
// almost the same as the code in `scheduleCallback`, except the callback
|
|
701
|
+
// is inserted into the list *before* callbacks of equal expiration instead
|
|
702
|
+
// of after.
|
|
703
|
+
if (firstCallbackNode === null) {
|
|
704
|
+
// This is the first callback in the list.
|
|
705
|
+
firstCallbackNode = continuationNode.next = continuationNode.previous = continuationNode;
|
|
706
|
+
} else {
|
|
707
|
+
var nextAfterContinuation = null;
|
|
708
|
+
var node = firstCallbackNode;
|
|
709
|
+
do {
|
|
710
|
+
if (node.expirationTime >= expirationTime) {
|
|
711
|
+
// This callback expires at or after the continuation. We will insert
|
|
712
|
+
// the continuation *before* this callback.
|
|
713
|
+
nextAfterContinuation = node;
|
|
714
|
+
break;
|
|
715
|
+
}
|
|
716
|
+
node = node.next;
|
|
717
|
+
} while (node !== firstCallbackNode);
|
|
718
|
+
|
|
719
|
+
if (nextAfterContinuation === null) {
|
|
720
|
+
// No equal or lower priority callback was found, which means the new
|
|
721
|
+
// callback is the lowest priority callback in the list.
|
|
722
|
+
nextAfterContinuation = firstCallbackNode;
|
|
723
|
+
} else if (nextAfterContinuation === firstCallbackNode) {
|
|
724
|
+
// The new callback is the highest priority callback in the list.
|
|
725
|
+
firstCallbackNode = continuationNode;
|
|
726
|
+
ensureHostCallbackIsScheduled(firstCallbackNode);
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
var previous = nextAfterContinuation.previous;
|
|
730
|
+
previous.next = nextAfterContinuation.previous = continuationNode;
|
|
731
|
+
continuationNode.next = nextAfterContinuation;
|
|
732
|
+
continuationNode.previous = previous;
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
function flushImmediateWork() {
|
|
738
|
+
if (
|
|
739
|
+
// Confirm we've exited the outer most event handler
|
|
740
|
+
currentEventStartTime === -1 && firstCallbackNode !== null && firstCallbackNode.priorityLevel === ImmediatePriority) {
|
|
741
|
+
isExecutingCallback = true;
|
|
742
|
+
deadlineObject.didTimeout = true;
|
|
743
|
+
try {
|
|
744
|
+
do {
|
|
745
|
+
flushFirstCallback();
|
|
746
|
+
} while (
|
|
747
|
+
// Keep flushing until there are no more immediate callbacks
|
|
748
|
+
firstCallbackNode !== null && firstCallbackNode.priorityLevel === ImmediatePriority);
|
|
749
|
+
} finally {
|
|
750
|
+
isExecutingCallback = false;
|
|
751
|
+
if (firstCallbackNode !== null) {
|
|
752
|
+
// There's still work remaining. Request another callback.
|
|
753
|
+
ensureHostCallbackIsScheduled(firstCallbackNode);
|
|
754
|
+
} else {
|
|
755
|
+
isHostCallbackScheduled = false;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
651
759
|
}
|
|
652
760
|
|
|
653
761
|
function flushWork(didTimeout) {
|
|
654
|
-
|
|
762
|
+
isExecutingCallback = true;
|
|
655
763
|
deadlineObject.didTimeout = didTimeout;
|
|
656
764
|
try {
|
|
657
765
|
if (didTimeout) {
|
|
658
|
-
// Flush all the
|
|
766
|
+
// Flush all the expired callbacks without yielding.
|
|
659
767
|
while (firstCallbackNode !== null) {
|
|
660
768
|
// Read the current time. Flush all the callbacks that expire at or
|
|
661
769
|
// earlier than that time. Then read the current time again and repeat.
|
|
662
770
|
// This optimizes for as few performance.now calls as possible.
|
|
663
771
|
var currentTime = getCurrentTime();
|
|
664
|
-
if (firstCallbackNode.
|
|
772
|
+
if (firstCallbackNode.expirationTime <= currentTime) {
|
|
665
773
|
do {
|
|
666
774
|
flushFirstCallback();
|
|
667
|
-
} while (firstCallbackNode !== null && firstCallbackNode.
|
|
775
|
+
} while (firstCallbackNode !== null && firstCallbackNode.expirationTime <= currentTime);
|
|
668
776
|
continue;
|
|
669
777
|
}
|
|
670
778
|
break;
|
|
@@ -678,36 +786,99 @@ function flushWork(didTimeout) {
|
|
|
678
786
|
}
|
|
679
787
|
}
|
|
680
788
|
} finally {
|
|
681
|
-
|
|
789
|
+
isExecutingCallback = false;
|
|
682
790
|
if (firstCallbackNode !== null) {
|
|
683
791
|
// There's still work remaining. Request another callback.
|
|
684
792
|
ensureHostCallbackIsScheduled(firstCallbackNode);
|
|
685
793
|
} else {
|
|
686
794
|
isHostCallbackScheduled = false;
|
|
687
795
|
}
|
|
796
|
+
// Before exiting, flush all the immediate work that was scheduled.
|
|
797
|
+
flushImmediateWork();
|
|
688
798
|
}
|
|
689
799
|
}
|
|
690
800
|
|
|
691
|
-
function
|
|
692
|
-
|
|
801
|
+
function unstable_runWithPriority(priorityLevel, eventHandler) {
|
|
802
|
+
switch (priorityLevel) {
|
|
803
|
+
case ImmediatePriority:
|
|
804
|
+
case InteractivePriority:
|
|
805
|
+
case NormalPriority:
|
|
806
|
+
case WheneverPriority:
|
|
807
|
+
break;
|
|
808
|
+
default:
|
|
809
|
+
priorityLevel = NormalPriority;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
var previousPriorityLevel = currentPriorityLevel;
|
|
813
|
+
var previousEventStartTime = currentEventStartTime;
|
|
814
|
+
currentPriorityLevel = priorityLevel;
|
|
815
|
+
currentEventStartTime = getCurrentTime();
|
|
816
|
+
|
|
817
|
+
try {
|
|
818
|
+
return eventHandler();
|
|
819
|
+
} finally {
|
|
820
|
+
currentPriorityLevel = previousPriorityLevel;
|
|
821
|
+
currentEventStartTime = previousEventStartTime;
|
|
693
822
|
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
823
|
+
// Before exiting, flush all the immediate work that was scheduled.
|
|
824
|
+
flushImmediateWork();
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
function unstable_wrapCallback(callback) {
|
|
829
|
+
var parentPriorityLevel = currentPriorityLevel;
|
|
830
|
+
return function () {
|
|
831
|
+
// This is a fork of runWithPriority, inlined for performance.
|
|
832
|
+
var previousPriorityLevel = currentPriorityLevel;
|
|
833
|
+
var previousEventStartTime = currentEventStartTime;
|
|
834
|
+
currentPriorityLevel = parentPriorityLevel;
|
|
835
|
+
currentEventStartTime = getCurrentTime();
|
|
836
|
+
|
|
837
|
+
try {
|
|
838
|
+
return callback.apply(this, arguments);
|
|
839
|
+
} finally {
|
|
840
|
+
currentPriorityLevel = previousPriorityLevel;
|
|
841
|
+
currentEventStartTime = previousEventStartTime;
|
|
842
|
+
flushImmediateWork();
|
|
843
|
+
}
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
function unstable_scheduleCallback(callback, deprecated_options) {
|
|
848
|
+
var startTime = currentEventStartTime !== -1 ? currentEventStartTime : getCurrentTime();
|
|
849
|
+
|
|
850
|
+
var expirationTime;
|
|
851
|
+
if (typeof deprecated_options === 'object' && deprecated_options !== null && typeof deprecated_options.timeout === 'number') {
|
|
852
|
+
// FIXME: Remove this branch once we lift expiration times out of React.
|
|
853
|
+
expirationTime = startTime + deprecated_options.timeout;
|
|
698
854
|
} else {
|
|
699
|
-
|
|
700
|
-
|
|
855
|
+
switch (currentPriorityLevel) {
|
|
856
|
+
case ImmediatePriority:
|
|
857
|
+
expirationTime = startTime + IMMEDIATE_PRIORITY_TIMEOUT;
|
|
858
|
+
break;
|
|
859
|
+
case InteractivePriority:
|
|
860
|
+
expirationTime = startTime + INTERACTIVE_PRIORITY_TIMEOUT;
|
|
861
|
+
break;
|
|
862
|
+
case WheneverPriority:
|
|
863
|
+
expirationTime = startTime + WHENEVER_PRIORITY_TIMEOUT;
|
|
864
|
+
break;
|
|
865
|
+
case NormalPriority:
|
|
866
|
+
default:
|
|
867
|
+
expirationTime = startTime + NORMAL_PRIORITY_TIMEOUT;
|
|
868
|
+
}
|
|
701
869
|
}
|
|
702
870
|
|
|
703
871
|
var newNode = {
|
|
704
872
|
callback: callback,
|
|
705
|
-
|
|
873
|
+
priorityLevel: currentPriorityLevel,
|
|
874
|
+
expirationTime: expirationTime,
|
|
706
875
|
next: null,
|
|
707
876
|
previous: null
|
|
708
877
|
};
|
|
709
878
|
|
|
710
|
-
// Insert the new callback into the list,
|
|
879
|
+
// Insert the new callback into the list, ordered first by expiration, then
|
|
880
|
+
// by insertion. So the new callback is inserted any other callback with
|
|
881
|
+
// equal expiration.
|
|
711
882
|
if (firstCallbackNode === null) {
|
|
712
883
|
// This is the first callback in the list.
|
|
713
884
|
firstCallbackNode = newNode.next = newNode.previous = newNode;
|
|
@@ -716,8 +887,8 @@ function unstable_scheduleWork(callback, options) {
|
|
|
716
887
|
var next = null;
|
|
717
888
|
var node = firstCallbackNode;
|
|
718
889
|
do {
|
|
719
|
-
if (node.
|
|
720
|
-
// The new callback
|
|
890
|
+
if (node.expirationTime > expirationTime) {
|
|
891
|
+
// The new callback expires before this one.
|
|
721
892
|
next = node;
|
|
722
893
|
break;
|
|
723
894
|
}
|
|
@@ -725,11 +896,11 @@ function unstable_scheduleWork(callback, options) {
|
|
|
725
896
|
} while (node !== firstCallbackNode);
|
|
726
897
|
|
|
727
898
|
if (next === null) {
|
|
728
|
-
// No callback with a later
|
|
729
|
-
// callback has the latest
|
|
899
|
+
// No callback with a later expiration was found, which means the new
|
|
900
|
+
// callback has the latest expiration in the list.
|
|
730
901
|
next = firstCallbackNode;
|
|
731
902
|
} else if (next === firstCallbackNode) {
|
|
732
|
-
// The new callback has the earliest
|
|
903
|
+
// The new callback has the earliest expiration in the entire list.
|
|
733
904
|
firstCallbackNode = newNode;
|
|
734
905
|
ensureHostCallbackIsScheduled(firstCallbackNode);
|
|
735
906
|
}
|
|
@@ -743,7 +914,7 @@ function unstable_scheduleWork(callback, options) {
|
|
|
743
914
|
return newNode;
|
|
744
915
|
}
|
|
745
916
|
|
|
746
|
-
function
|
|
917
|
+
function unstable_cancelCallback(callbackNode) {
|
|
747
918
|
var next = callbackNode.next;
|
|
748
919
|
if (next === null) {
|
|
749
920
|
// Already cancelled.
|
|
@@ -766,6 +937,10 @@ function unstable_cancelScheduledWork(callbackNode) {
|
|
|
766
937
|
callbackNode.next = callbackNode.previous = null;
|
|
767
938
|
}
|
|
768
939
|
|
|
940
|
+
function unstable_getCurrentPriorityLevel() {
|
|
941
|
+
return currentPriorityLevel;
|
|
942
|
+
}
|
|
943
|
+
|
|
769
944
|
// The remaining code is essentially a polyfill for requestIdleCallback. It
|
|
770
945
|
// works by scheduling a requestAnimationFrame, storing the time for the start
|
|
771
946
|
// of the frame, then scheduling a postMessage which gets scheduled after paint.
|
|
@@ -826,31 +1001,59 @@ if (hasNativePerformanceNow) {
|
|
|
826
1001
|
};
|
|
827
1002
|
}
|
|
828
1003
|
|
|
829
|
-
var
|
|
830
|
-
var
|
|
1004
|
+
var requestHostCallback;
|
|
1005
|
+
var cancelHostCallback;
|
|
831
1006
|
var getFrameDeadline;
|
|
832
1007
|
|
|
833
|
-
if (typeof window
|
|
834
|
-
//
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
1008
|
+
if (typeof window !== 'undefined' && window._schedMock) {
|
|
1009
|
+
// Dynamic injection, only for testing purposes.
|
|
1010
|
+
var impl = window._schedMock;
|
|
1011
|
+
requestHostCallback = impl[0];
|
|
1012
|
+
cancelHostCallback = impl[1];
|
|
1013
|
+
getFrameDeadline = impl[2];
|
|
1014
|
+
} else if (
|
|
1015
|
+
// If Scheduler runs in a non-DOM environment, it falls back to a naive
|
|
1016
|
+
// implementation using setTimeout.
|
|
1017
|
+
typeof window === 'undefined' ||
|
|
1018
|
+
// "addEventListener" might not be available on the window object
|
|
1019
|
+
// if this is a mocked "window" object. So we need to validate that too.
|
|
1020
|
+
typeof window.addEventListener !== 'function') {
|
|
1021
|
+
var _callback = null;
|
|
1022
|
+
var _currentTime = -1;
|
|
1023
|
+
var _flushCallback = function (didTimeout, ms) {
|
|
1024
|
+
if (_callback !== null) {
|
|
1025
|
+
var cb = _callback;
|
|
1026
|
+
_callback = null;
|
|
1027
|
+
try {
|
|
1028
|
+
_currentTime = ms;
|
|
1029
|
+
cb(didTimeout);
|
|
1030
|
+
} finally {
|
|
1031
|
+
_currentTime = -1;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
839
1034
|
};
|
|
840
|
-
|
|
841
|
-
|
|
1035
|
+
requestHostCallback = function (cb, ms) {
|
|
1036
|
+
if (_currentTime !== -1) {
|
|
1037
|
+
// Protect against re-entrancy.
|
|
1038
|
+
setTimeout(requestHostCallback, 0, cb, ms);
|
|
1039
|
+
} else {
|
|
1040
|
+
_callback = cb;
|
|
1041
|
+
setTimeout(_flushCallback, ms, true, ms);
|
|
1042
|
+
setTimeout(_flushCallback, maxSigned31BitInt, false, maxSigned31BitInt);
|
|
1043
|
+
}
|
|
1044
|
+
};
|
|
1045
|
+
cancelHostCallback = function () {
|
|
1046
|
+
_callback = null;
|
|
842
1047
|
};
|
|
843
1048
|
getFrameDeadline = function () {
|
|
844
|
-
return
|
|
1049
|
+
return Infinity;
|
|
1050
|
+
};
|
|
1051
|
+
getCurrentTime = function () {
|
|
1052
|
+
return _currentTime === -1 ? 0 : _currentTime;
|
|
845
1053
|
};
|
|
846
|
-
} else if (window._schedMock) {
|
|
847
|
-
// Dynamic injection, only for testing purposes.
|
|
848
|
-
var impl = window._schedMock;
|
|
849
|
-
requestCallback = impl[0];
|
|
850
|
-
cancelCallback = impl[1];
|
|
851
|
-
getFrameDeadline = impl[2];
|
|
852
1054
|
} else {
|
|
853
1055
|
if (typeof console !== 'undefined') {
|
|
1056
|
+
// TODO: Remove fb.me link
|
|
854
1057
|
if (typeof localRequestAnimationFrame !== 'function') {
|
|
855
1058
|
console.error("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
|
|
856
1059
|
}
|
|
@@ -931,7 +1134,7 @@ if (typeof window === 'undefined') {
|
|
|
931
1134
|
if (nextFrameTime < activeFrameTime && previousFrameTime < activeFrameTime) {
|
|
932
1135
|
if (nextFrameTime < 8) {
|
|
933
1136
|
// Defensive coding. We don't support higher frame rates than 120hz.
|
|
934
|
-
// If
|
|
1137
|
+
// If the calculated frame time gets lower than 8, it is probably a bug.
|
|
935
1138
|
nextFrameTime = 8;
|
|
936
1139
|
}
|
|
937
1140
|
// If one frame goes long, then the next one can be short to catch up.
|
|
@@ -952,11 +1155,10 @@ if (typeof window === 'undefined') {
|
|
|
952
1155
|
}
|
|
953
1156
|
};
|
|
954
1157
|
|
|
955
|
-
|
|
1158
|
+
requestHostCallback = function (callback, absoluteTimeout) {
|
|
956
1159
|
scheduledCallback = callback;
|
|
957
1160
|
timeoutTime = absoluteTimeout;
|
|
958
|
-
if (isPerformingIdleWork) {
|
|
959
|
-
// If we're already performing idle work, an error must have been thrown.
|
|
1161
|
+
if (isPerformingIdleWork || absoluteTimeout < 0) {
|
|
960
1162
|
// Don't wait for the next frame. Continue working ASAP, in a new event.
|
|
961
1163
|
window.postMessage(messageKey, '*');
|
|
962
1164
|
} else if (!isAnimationFrameScheduled) {
|
|
@@ -969,7 +1171,7 @@ if (typeof window === 'undefined') {
|
|
|
969
1171
|
}
|
|
970
1172
|
};
|
|
971
1173
|
|
|
972
|
-
|
|
1174
|
+
cancelHostCallback = function () {
|
|
973
1175
|
scheduledCallback = null;
|
|
974
1176
|
isIdleScheduled = false;
|
|
975
1177
|
timeoutTime = -1;
|
|
@@ -1402,8 +1604,8 @@ function getComponentName(type) {
|
|
|
1402
1604
|
return type;
|
|
1403
1605
|
}
|
|
1404
1606
|
switch (type) {
|
|
1405
|
-
case
|
|
1406
|
-
return '
|
|
1607
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
1608
|
+
return 'ConcurrentMode';
|
|
1407
1609
|
case REACT_FRAGMENT_TYPE:
|
|
1408
1610
|
return 'Fragment';
|
|
1409
1611
|
case REACT_PORTAL_TYPE:
|
|
@@ -1484,12 +1686,15 @@ var ReactSharedInternals = {
|
|
|
1484
1686
|
// This re-export is only required for UMD bundles;
|
|
1485
1687
|
// CJS bundles use the shared NPM package.
|
|
1486
1688
|
objectAssign(ReactSharedInternals, {
|
|
1487
|
-
|
|
1488
|
-
|
|
1689
|
+
Scheduler: {
|
|
1690
|
+
unstable_cancelCallback: unstable_cancelCallback,
|
|
1489
1691
|
unstable_now: getCurrentTime,
|
|
1490
|
-
|
|
1692
|
+
unstable_scheduleCallback: unstable_scheduleCallback,
|
|
1693
|
+
unstable_runWithPriority: unstable_runWithPriority,
|
|
1694
|
+
unstable_wrapCallback: unstable_wrapCallback,
|
|
1695
|
+
unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel
|
|
1491
1696
|
},
|
|
1492
|
-
|
|
1697
|
+
SchedulerTracing: {
|
|
1493
1698
|
__interactionsRef: interactionsRef,
|
|
1494
1699
|
__subscriberRef: subscriberRef,
|
|
1495
1700
|
unstable_clear: unstable_clear,
|
|
@@ -2257,10 +2462,84 @@ function forwardRef(render) {
|
|
|
2257
2462
|
};
|
|
2258
2463
|
}
|
|
2259
2464
|
|
|
2465
|
+
function pure(render, compare) {
|
|
2466
|
+
{
|
|
2467
|
+
if (typeof render !== 'function') {
|
|
2468
|
+
warningWithoutStack$1(false, 'pure: The first argument must be a function component. Instead ' + 'received: %s', render === null ? 'null' : typeof render);
|
|
2469
|
+
} else {
|
|
2470
|
+
var prototype = render.prototype;
|
|
2471
|
+
if (prototype && prototype.isReactComponent) {
|
|
2472
|
+
warningWithoutStack$1(false, 'pure: The first argument must be a function component. Classes ' + 'are not supported. Use React.PureComponent instead.');
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
return {
|
|
2477
|
+
$$typeof: REACT_PURE_TYPE,
|
|
2478
|
+
render: render,
|
|
2479
|
+
compare: compare === undefined ? null : compare
|
|
2480
|
+
};
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
function resolveDispatcher() {
|
|
2484
|
+
var dispatcher = ReactCurrentOwner.currentDispatcher;
|
|
2485
|
+
!(dispatcher !== null) ? invariant(false, 'Hooks can only be called inside the body of a functional component.') : void 0;
|
|
2486
|
+
return dispatcher;
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
function useContext(context, observedBits) {
|
|
2490
|
+
var dispatcher = resolveDispatcher();
|
|
2491
|
+
return dispatcher.useContext(context, observedBits);
|
|
2492
|
+
}
|
|
2493
|
+
|
|
2494
|
+
function useState(initialState) {
|
|
2495
|
+
var dispatcher = resolveDispatcher();
|
|
2496
|
+
return dispatcher.useState(initialState);
|
|
2497
|
+
}
|
|
2498
|
+
|
|
2499
|
+
function useReducer(reducer, initialState, initialAction) {
|
|
2500
|
+
var dispatcher = resolveDispatcher();
|
|
2501
|
+
return dispatcher.useReducer(reducer, initialState, initialAction);
|
|
2502
|
+
}
|
|
2503
|
+
|
|
2504
|
+
function useRef(initialValue) {
|
|
2505
|
+
var dispatcher = resolveDispatcher();
|
|
2506
|
+
return dispatcher.useRef(initialValue);
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2509
|
+
function useEffect(create, inputs) {
|
|
2510
|
+
var dispatcher = resolveDispatcher();
|
|
2511
|
+
return dispatcher.useEffect(create, inputs);
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
function useMutationEffect(create, inputs) {
|
|
2515
|
+
var dispatcher = resolveDispatcher();
|
|
2516
|
+
return dispatcher.useMutationEffect(create, inputs);
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
function useLayoutEffect(create, inputs) {
|
|
2520
|
+
var dispatcher = resolveDispatcher();
|
|
2521
|
+
return dispatcher.useLayoutEffect(create, inputs);
|
|
2522
|
+
}
|
|
2523
|
+
|
|
2524
|
+
function useCallback(callback, inputs) {
|
|
2525
|
+
var dispatcher = resolveDispatcher();
|
|
2526
|
+
return dispatcher.useCallback(callback, inputs);
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
function useMemo(create, inputs) {
|
|
2530
|
+
var dispatcher = resolveDispatcher();
|
|
2531
|
+
return dispatcher.useMemo(create, inputs);
|
|
2532
|
+
}
|
|
2533
|
+
|
|
2534
|
+
function useAPI(ref, create, inputs) {
|
|
2535
|
+
var dispatcher = resolveDispatcher();
|
|
2536
|
+
return dispatcher.useAPI(ref, create, inputs);
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2260
2539
|
function isValidElementType(type) {
|
|
2261
2540
|
return typeof type === 'string' || typeof type === 'function' ||
|
|
2262
2541
|
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
2263
|
-
type === REACT_FRAGMENT_TYPE || type ===
|
|
2542
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_PLACEHOLDER_TYPE || typeof type === 'object' && type !== null && (typeof type.then === 'function' || type.$$typeof === REACT_PURE_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
|
|
2264
2543
|
}
|
|
2265
2544
|
|
|
2266
2545
|
/**
|
|
@@ -2513,7 +2792,7 @@ function validatePropTypes(element) {
|
|
|
2513
2792
|
var name = void 0,
|
|
2514
2793
|
propTypes = void 0;
|
|
2515
2794
|
if (typeof type === 'function') {
|
|
2516
|
-
// Class or
|
|
2795
|
+
// Class or function component
|
|
2517
2796
|
name = type.displayName || type.name;
|
|
2518
2797
|
propTypes = type.propTypes;
|
|
2519
2798
|
} else if (typeof type === 'object' && type !== null && type.$$typeof === REACT_FORWARD_REF_TYPE) {
|
|
@@ -2665,10 +2944,11 @@ var React = {
|
|
|
2665
2944
|
|
|
2666
2945
|
createContext: createContext,
|
|
2667
2946
|
forwardRef: forwardRef,
|
|
2947
|
+
pure: pure,
|
|
2668
2948
|
|
|
2669
2949
|
Fragment: REACT_FRAGMENT_TYPE,
|
|
2670
2950
|
StrictMode: REACT_STRICT_MODE_TYPE,
|
|
2671
|
-
|
|
2951
|
+
unstable_ConcurrentMode: REACT_CONCURRENT_MODE_TYPE,
|
|
2672
2952
|
unstable_Profiler: REACT_PROFILER_TYPE,
|
|
2673
2953
|
|
|
2674
2954
|
createElement: createElementWithValidation,
|
|
@@ -2686,6 +2966,19 @@ if (enableSuspense) {
|
|
|
2686
2966
|
React.lazy = lazy;
|
|
2687
2967
|
}
|
|
2688
2968
|
|
|
2969
|
+
if (enableHooks_DEPRECATED) {
|
|
2970
|
+
React.useAPI = useAPI;
|
|
2971
|
+
React.useCallback = useCallback;
|
|
2972
|
+
React.useContext = useContext;
|
|
2973
|
+
React.useEffect = useEffect;
|
|
2974
|
+
React.useLayoutEffect = useLayoutEffect;
|
|
2975
|
+
React.useMemo = useMemo;
|
|
2976
|
+
React.useMutationEffect = useMutationEffect;
|
|
2977
|
+
React.useReducer = useReducer;
|
|
2978
|
+
React.useRef = useRef;
|
|
2979
|
+
React.useState = useState;
|
|
2980
|
+
}
|
|
2981
|
+
|
|
2689
2982
|
|
|
2690
2983
|
|
|
2691
2984
|
var React$2 = Object.freeze({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.6.0-alpha.
|
|
1
|
+
/** @license React v16.6.0-alpha.400d197
|
|
2
2
|
* react.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -6,23 +6,26 @@
|
|
|
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(
|
|
10
|
-
1;throw a;}}function
|
|
11
|
-
function
|
|
12
|
-
(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"function"
|
|
23
|
-
|
|
24
|
-
null
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
9
|
+
'use strict';(function(L,n){"object"===typeof exports&&"undefined"!==typeof module?module.exports=n():"function"===typeof define&&define.amd?define(n):L.React=n()})(this,function(){function L(a,b,d,f,c,g,e,h){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var M=[d,f,c,g,e,h],ta=0;a=Error(b.replace(/%s/g,function(){return M[ta++]}));a.name="Invariant Violation"}a.framesToPop=
|
|
10
|
+
1;throw a;}}function n(a){for(var b=arguments.length-1,d="https://reactjs.org/docs/error-decoder.html?invariant="+a,f=0;f<b;f++)d+="&args[]="+encodeURIComponent(arguments[f+1]);L(!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. ",d)}function q(a,b,d){this.props=a;this.context=b;this.refs=aa;this.updater=d||ba}function ca(){}function N(a,b,d){this.props=a;this.context=b;this.refs=aa;this.updater=
|
|
11
|
+
d||ba}function r(){if(!t){var a=c.expirationTime;C?O():C=!0;D(ua,a)}}function P(){var a=c,b=c.next;if(c===b)c=null;else{var d=c.previous;c=d.next=b;b.previous=d}a.next=a.previous=null;d=a.callback;b=a.expirationTime;a=a.priorityLevel;var f=k,M=u;k=a;u=b;try{var g=d(Q)}finally{k=f,u=M}if("function"===typeof g)if(g={callback:g,priorityLevel:a,expirationTime:b,next:null,previous:null},null===c)c=g.next=g.previous=g;else{d=null;a=c;do{if(a.expirationTime>=b){d=a;break}a=a.next}while(a!==c);null===d?d=
|
|
12
|
+
c:d===c&&(c=g,r(c));b=d.previous;b.next=d.previous=g;g.next=d;g.previous=b}}function R(){if(-1===m&&null!==c&&1===c.priorityLevel){t=!0;Q.didTimeout=!0;try{do P();while(null!==c&&1===c.priorityLevel)}finally{t=!1,null!==c?r(c):C=!1}}}function ua(a){t=!0;Q.didTimeout=a;try{if(a)for(;null!==c;){var b=l();if(c.expirationTime<=b){do P();while(null!==c&&c.expirationTime<=b)}else break}else if(null!==c){do P();while(null!==c&&0<v()-l())}}finally{t=!1,null!==c?r(c):C=!1,R()}}function da(a,b,d){var f=void 0,
|
|
13
|
+
c={},g=null,e=null;if(null!=b)for(f in void 0!==b.ref&&(e=b.ref),void 0!==b.key&&(g=""+b.key),b)ea.call(b,f)&&!fa.hasOwnProperty(f)&&(c[f]=b[f]);var h=arguments.length-2;if(1===h)c.children=d;else if(1<h){for(var k=Array(h),l=0;l<h;l++)k[l]=arguments[l+2];c.children=k}if(a&&a.defaultProps)for(f in h=a.defaultProps,h)void 0===c[f]&&(c[f]=h[f]);return{$$typeof:w,type:a,key:g,ref:e,props:c,_owner:E.current}}function va(a,b){return{$$typeof:w,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}
|
|
14
|
+
function S(a){return"object"===typeof a&&null!==a&&a.$$typeof===w}function wa(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}function ha(a,b,d,f){if(F.length){var c=F.pop();c.result=a;c.keyPrefix=b;c.func=d;c.context=f;c.count=0;return c}return{result:a,keyPrefix:b,func:d,context:f,count:0}}function ia(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>F.length&&F.push(a)}function T(a,b,d,f){var c=typeof a;if("undefined"===c||"boolean"===
|
|
15
|
+
c)a=null;var g=!1;if(null===a)g=!0;else switch(c){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case w:case xa:g=!0}}if(g)return d(f,a,""===b?"."+U(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var e=0;e<a.length;e++){c=a[e];var h=b+U(c,e);g+=T(c,h,d,f)}else if(null===a||"object"!==typeof a?h=null:(h=ja&&a[ja]||a["@@iterator"],h="function"===typeof h?h:null),"function"===typeof h)for(a=h.call(a),e=0;!(c=a.next()).done;)c=c.value,h=b+U(c,e++),g+=T(c,h,d,f);else"object"===
|
|
16
|
+
c&&(d=""+a,n("31","[object Object]"===d?"object with keys {"+Object.keys(a).join(", ")+"}":d,""));return g}function V(a,b,d){return null==a?0:T(a,"",b,d)}function U(a,b){return"object"===typeof a&&null!==a&&null!=a.key?wa(a.key):b.toString(36)}function ya(a,b,d){a.func.call(a.context,b,a.count++)}function za(a,b,d){var c=a.result,e=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?W(a,c,d,function(a){return a}):null!=a&&(S(a)&&(a=va(a,e+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(ka,
|
|
17
|
+
"$&/")+"/")+d)),c.push(a))}function W(a,b,d,c,e){var f="";null!=d&&(f=(""+d).replace(ka,"$&/")+"/");b=ha(b,f,c,e);V(a,za,b);ia(b)}function Aa(a,b){var d=E.currentDispatcher;null===d?n("277"):void 0;return d.readContext(a,b)}var e="function"===typeof Symbol&&Symbol.for,w=e?Symbol.for("react.element"):60103,xa=e?Symbol.for("react.portal"):60106,p=e?Symbol.for("react.fragment"):60107,X=e?Symbol.for("react.strict_mode"):60108,Ba=e?Symbol.for("react.profiler"):60114,Ca=e?Symbol.for("react.provider"):60109,
|
|
18
|
+
Da=e?Symbol.for("react.context"):60110,Ea=e?Symbol.for("react.concurrent_mode"):60111,Fa=e?Symbol.for("react.forward_ref"):60112;e&&Symbol.for("react.placeholder");var Ga=e?Symbol.for("react.pure"):60115,ja="function"===typeof Symbol&&Symbol.iterator,la=Object.getOwnPropertySymbols,Ha=Object.prototype.hasOwnProperty,Ia=Object.prototype.propertyIsEnumerable,G=function(){try{if(!Object.assign)return!1;var a=new String("abc");a[5]="de";if("5"===Object.getOwnPropertyNames(a)[0])return!1;var b={};for(a=
|
|
19
|
+
0;10>a;a++)b["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(b).map(function(a){return b[a]}).join(""))return!1;var d={};"abcdefghijklmnopqrst".split("").forEach(function(a){d[a]=a});return"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},d)).join("")?!1:!0}catch(f){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 d=Object(a);for(var c,e=1;e<arguments.length;e++){var g=Object(arguments[e]);
|
|
20
|
+
for(var k in g)Ha.call(g,k)&&(d[k]=g[k]);if(la){c=la(g);for(var h=0;h<c.length;h++)Ia.call(g,c[h])&&(d[c[h]]=g[c[h]])}}return d},ba={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,d){},enqueueReplaceState:function(a,b,d,c){},enqueueSetState:function(a,b,d,c){}},aa={};q.prototype.isReactComponent={};q.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?n("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};q.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,
|
|
21
|
+
a,"forceUpdate")};ca.prototype=q.prototype;e=N.prototype=new ca;e.constructor=N;G(e,q.prototype);e.isPureReactComponent=!0;var c=null,k=3,m=-1,u=-1,t=!1,C=!1;e="object"===typeof performance&&"function"===typeof performance.now;var Q={timeRemaining:e?function(){if(null!==c&&c.expirationTime<u)return 0;var a=v()-performance.now();return 0<a?a:0}:function(){if(null!==c&&c.expirationTime<u)return 0;var a=v()-Date.now();return 0<a?a:0},didTimeout:!1},Ja=Date,Ka="function"===typeof setTimeout?setTimeout:
|
|
22
|
+
void 0,La="function"===typeof clearTimeout?clearTimeout:void 0,ma="function"===typeof requestAnimationFrame?requestAnimationFrame:void 0,na="function"===typeof cancelAnimationFrame?cancelAnimationFrame:void 0,oa,pa,qa=function(a){oa=ma(function(b){La(pa);a(b)});pa=Ka(function(){na(oa);a(l())},100)};if(e){var Ma=performance;var l=function(){return Ma.now()}}else l=function(){return Ja.now()};if("undefined"!==typeof window&&window._schedMock){e=window._schedMock;var D=e[0];var O=e[1];var v=e[2]}else if("undefined"===
|
|
23
|
+
typeof window||"function"!==typeof window.addEventListener){var x=null,y=-1,ra=function(a,b){if(null!==x){var d=x;x=null;try{y=b,d(a)}finally{y=-1}}};D=function(a,b){-1!==y?setTimeout(D,0,a,b):(x=a,setTimeout(ra,b,!0,b),setTimeout(ra,1073741823,!1,1073741823))};O=function(){x=null};v=function(){return Infinity};l=function(){return-1===y?0:y}}else{"undefined"!==typeof console&&("function"!==typeof ma&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),
|
|
24
|
+
"function"!==typeof na&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var H=null,I=!1,z=-1,A=!1,Y=!1,J=0,K=33,B=33;v=function(){return J};var Z="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(a){if(a.source===window&&a.data===Z){I=!1;var b=l();a=!1;if(0>=J-b)if(-1!==z&&z<=b)a=!0;else{A||(A=!0,qa(sa));return}z=-1;b=H;H=null;if(null!==b){Y=
|
|
25
|
+
!0;try{b(a)}finally{Y=!1}}}},!1);var sa=function(a){A=!1;var b=a-J+B;b<B&&K<B?(8>b&&(b=8),B=b<K?K:b):K=b;J=a+B;I||(I=!0,window.postMessage(Z,"*"))};D=function(a,b){H=a;z=b;Y||0>b?window.postMessage(Z,"*"):A||(A=!0,qa(sa))};O=function(){H=null;I=!1;z=-1}}var Na=0,E={current:null,currentDispatcher:null};e={ReactCurrentOwner:E,assign:G};G(e,{Scheduler:{unstable_cancelCallback:function(a){var b=a.next;if(null!==b){if(b===a)c=null;else{a===c&&(c=b);var d=a.previous;d.next=b;b.previous=d}a.next=a.previous=
|
|
26
|
+
null}},unstable_now:l,unstable_scheduleCallback:function(a,b){var d=-1!==m?m:l();if("object"===typeof b&&null!==b&&"number"===typeof b.timeout)b=d+b.timeout;else switch(k){case 1:b=d+-1;break;case 2:b=d+250;break;case 4:b=d+1073741823;break;default:b=d+5E3}a={callback:a,priorityLevel:k,expirationTime:b,next:null,previous:null};if(null===c)c=a.next=a.previous=a,r(c);else{d=null;var f=c;do{if(f.expirationTime>b){d=f;break}f=f.next}while(f!==c);null===d?d=c:d===c&&(c=a,r(c));b=d.previous;b.next=d.previous=
|
|
27
|
+
a;a.next=d;a.previous=b}return a},unstable_runWithPriority:function(a,b){switch(a){case 1:case 2:case 3:case 4:break;default:a=3}var d=k,c=m;k=a;m=l();try{return b()}finally{k=d,m=c,R()}},unstable_wrapCallback:function(a){var b=k;return function(){var c=k,f=m;k=b;m=l();try{return a.apply(this,arguments)}finally{k=c,m=f,R()}}},unstable_getCurrentPriorityLevel:function(){return k}},SchedulerTracing:{__interactionsRef:null,__subscriberRef:null,unstable_clear:function(a){return a()},unstable_getCurrent:function(){return null},
|
|
28
|
+
unstable_getThreadID:function(){return++Na},unstable_subscribe:function(a){},unstable_trace:function(a,b,c){return c()},unstable_unsubscribe:function(a){},unstable_wrap:function(a){return a}}});var ea=Object.prototype.hasOwnProperty,fa={key:!0,ref:!0,__self:!0,__source:!0},ka=/\/+/g,F=[];p={Children:{map:function(a,b,c){if(null==a)return a;var d=[];W(a,d,null,b,c);return d},forEach:function(a,b,c){if(null==a)return a;b=ha(null,null,b,c);V(a,ya,b);ia(b)},count:function(a){return V(a,function(){return null},
|
|
29
|
+
null)},toArray:function(a){var b=[];W(a,b,null,function(a){return a});return b},only:function(a){S(a)?void 0:n("143");return a}},createRef:function(){return{current:null}},Component:q,PureComponent:N,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:Da,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,Provider:null,Consumer:null,unstable_read:null};a.Provider={$$typeof:Ca,_context:a};a.Consumer=a;a.unstable_read=Aa.bind(null,a);return a},forwardRef:function(a){return{$$typeof:Fa,
|
|
30
|
+
render:a}},pure:function(a,b){return{$$typeof:Ga,render:a,compare:void 0===b?null:b}},Fragment:p,StrictMode:X,unstable_ConcurrentMode:Ea,unstable_Profiler:Ba,createElement:da,cloneElement:function(a,b,c){null===a||void 0===a?n("267",a):void 0;var d=void 0,e=G({},a.props),g=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=E.current);void 0!==b.key&&(g=""+b.key);var l=void 0;a.type&&a.type.defaultProps&&(l=a.type.defaultProps);for(d in b)ea.call(b,d)&&!fa.hasOwnProperty(d)&&(e[d]=void 0===
|
|
31
|
+
b[d]&&void 0!==l?l[d]:b[d])}d=arguments.length-2;if(1===d)e.children=c;else if(1<d){l=Array(d);for(var m=0;m<d;m++)l[m]=arguments[m+2];e.children=l}return{$$typeof:w,type:a.type,key:g,ref:k,props:e,_owner:h}},createFactory:function(a){var b=da.bind(null,a);b.type=a;return b},isValidElement:S,version:"16.6.0-alpha.400d197",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:e};p=(X={default:p},p)||X;return p.default||p});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.6.0-alpha.
|
|
1
|
+
/** @license React v16.6.0-alpha.400d197
|
|
2
2
|
* react.profiling.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -6,28 +6,31 @@
|
|
|
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(
|
|
10
|
-
throw a;}}function
|
|
11
|
-
f.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
b,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
c()
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
9
|
+
'use strict';(function(P,q){"object"===typeof exports&&"undefined"!==typeof module?module.exports=q():"function"===typeof define&&define.amd?define(q):P.React=q()})(this,function(){function P(a,b,c,d,e,k,f,h){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var wa=[c,d,e,k,f,h],g=0;a=Error(b.replace(/%s/g,function(){return wa[g++]}));a.name="Invariant Violation"}a.framesToPop=
|
|
10
|
+
1;throw a;}}function q(a){for(var b=arguments.length-1,c="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=0;d<b;d++)c+="&args[]="+encodeURIComponent(arguments[d+1]);P(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",c)}function v(a,b,c){this.props=a;this.context=b;this.refs=da;this.updater=c||ea}function fa(){}function Q(a,b,c){this.props=a;this.context=b;this.refs=da;this.updater=
|
|
11
|
+
c||ea}function w(){if(!x){var a=f.expirationTime;G?R():G=!0;H(xa,a)}}function S(){var a=f,b=f.next;if(f===b)f=null;else{var c=f.previous;f=c.next=b;b.previous=c}a.next=a.previous=null;c=a.callback;b=a.expirationTime;a=a.priorityLevel;var d=l,e=y;l=a;y=b;try{var k=c(T)}finally{l=d,y=e}if("function"===typeof k)if(k={callback:k,priorityLevel:a,expirationTime:b,next:null,previous:null},null===f)f=k.next=k.previous=k;else{c=null;a=f;do{if(a.expirationTime>=b){c=a;break}a=a.next}while(a!==f);null===c?c=
|
|
12
|
+
f:c===f&&(f=k,w(f));b=c.previous;b.next=c.previous=k;k.next=c;k.previous=b}}function U(){if(-1===r&&null!==f&&1===f.priorityLevel){x=!0;T.didTimeout=!0;try{do S();while(null!==f&&1===f.priorityLevel)}finally{x=!1,null!==f?w(f):G=!1}}}function xa(a){x=!0;T.didTimeout=a;try{if(a)for(;null!==f;){var b=p();if(f.expirationTime<=b){do S();while(null!==f&&f.expirationTime<=b)}else break}else if(null!==f){do S();while(null!==f&&0<z()-p())}}finally{x=!1,null!==f?w(f):G=!1,U()}}function ya(a){var b=!1,c=null;
|
|
13
|
+
n.forEach(function(d){try{d.onInteractionTraced(a)}catch(e){b||(b=!0,c=e)}});if(b)throw c;}function za(a){var b=!1,c=null;n.forEach(function(d){try{d.onInteractionScheduledWorkCompleted(a)}catch(e){b||(b=!0,c=e)}});if(b)throw c;}function Aa(a,b){var c=!1,d=null;n.forEach(function(e){try{e.onWorkScheduled(a,b)}catch(k){c||(c=!0,d=k)}});if(c)throw d;}function Ba(a,b){var c=!1,d=null;n.forEach(function(e){try{e.onWorkStarted(a,b)}catch(k){c||(c=!0,d=k)}});if(c)throw d;}function Ca(a,b){var c=!1,d=null;
|
|
14
|
+
n.forEach(function(e){try{e.onWorkStopped(a,b)}catch(k){c||(c=!0,d=k)}});if(c)throw d;}function Da(a,b){var c=!1,d=null;n.forEach(function(e){try{e.onWorkCanceled(a,b)}catch(k){c||(c=!0,d=k)}});if(c)throw d;}function ha(a,b,c){var d=void 0,e={},k=null,f=null;if(null!=b)for(d in void 0!==b.ref&&(f=b.ref),void 0!==b.key&&(k=""+b.key),b)ia.call(b,d)&&!ja.hasOwnProperty(d)&&(e[d]=b[d]);var h=arguments.length-2;if(1===h)e.children=c;else if(1<h){for(var g=Array(h),l=0;l<h;l++)g[l]=arguments[l+2];e.children=
|
|
15
|
+
g}if(a&&a.defaultProps)for(d in h=a.defaultProps,h)void 0===e[d]&&(e[d]=h[d]);return{$$typeof:A,type:a,key:k,ref:f,props:e,_owner:I.current}}function Ea(a,b){return{$$typeof:A,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function V(a){return"object"===typeof a&&null!==a&&a.$$typeof===A}function Fa(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}function ka(a,b,c,d){if(J.length){var e=J.pop();e.result=a;e.keyPrefix=b;e.func=c;e.context=d;e.count=
|
|
16
|
+
0;return e}return{result:a,keyPrefix:b,func:c,context:d,count:0}}function la(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>J.length&&J.push(a)}function W(a,b,c,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 A:case Ga:k=!0}}if(k)return c(d,a,""===b?"."+X(a,0):b),1;k=0;b=""===b?".":b+":";if(Array.isArray(a))for(var f=0;f<a.length;f++){e=a[f];var h=
|
|
17
|
+
b+X(e,f);k+=W(e,h,c,d)}else if(null===a||"object"!==typeof a?h=null:(h=ma&&a[ma]||a["@@iterator"],h="function"===typeof h?h:null),"function"===typeof h)for(a=h.call(a),f=0;!(e=a.next()).done;)e=e.value,h=b+X(e,f++),k+=W(e,h,c,d);else"object"===e&&(c=""+a,q("31","[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c,""));return k}function Y(a,b,c){return null==a?0:W(a,"",b,c)}function X(a,b){return"object"===typeof a&&null!==a&&null!=a.key?Fa(a.key):b.toString(36)}function Ha(a,
|
|
18
|
+
b,c){a.func.call(a.context,b,a.count++)}function Ia(a,b,c){var d=a.result,e=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?Z(a,d,c,function(a){return a}):null!=a&&(V(a)&&(a=Ea(a,e+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(na,"$&/")+"/")+c)),d.push(a))}function Z(a,b,c,d,e){var f="";null!=c&&(f=(""+c).replace(na,"$&/")+"/");b=ka(b,f,d,e);Y(a,Ia,b);la(b)}function Ja(a,b){var c=I.currentDispatcher;null===c?q("277"):void 0;return c.readContext(a,b)}var g="function"===typeof Symbol&&
|
|
19
|
+
Symbol.for,A=g?Symbol.for("react.element"):60103,Ga=g?Symbol.for("react.portal"):60106,u=g?Symbol.for("react.fragment"):60107,aa=g?Symbol.for("react.strict_mode"):60108,Ka=g?Symbol.for("react.profiler"):60114,La=g?Symbol.for("react.provider"):60109,Ma=g?Symbol.for("react.context"):60110,Na=g?Symbol.for("react.concurrent_mode"):60111,Oa=g?Symbol.for("react.forward_ref"):60112;g&&Symbol.for("react.placeholder");var Pa=g?Symbol.for("react.pure"):60115,ma="function"===typeof Symbol&&Symbol.iterator,oa=
|
|
20
|
+
Object.getOwnPropertySymbols,Qa=Object.prototype.hasOwnProperty,Ra=Object.prototype.propertyIsEnumerable,K=function(){try{if(!Object.assign)return!1;var a=new String("abc");a[5]="de";if("5"===Object.getOwnPropertyNames(a)[0])return!1;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 c={};"abcdefghijklmnopqrst".split("").forEach(function(a){c[a]=a});return"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},
|
|
21
|
+
c)).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 c=Object(a);for(var d,e=1;e<arguments.length;e++){var f=Object(arguments[e]);for(var g in f)Qa.call(f,g)&&(c[g]=f[g]);if(oa){d=oa(f);for(var h=0;h<d.length;h++)Ra.call(f,d[h])&&(c[d[h]]=f[d[h]])}}return c},ea={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,d){},enqueueSetState:function(a,
|
|
22
|
+
b,c,d){}},da={};v.prototype.isReactComponent={};v.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?q("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};v.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};fa.prototype=v.prototype;g=Q.prototype=new fa;g.constructor=Q;K(g,v.prototype);g.isPureReactComponent=!0;var f=null,l=3,r=-1,y=-1,x=!1,G=!1;g="object"===typeof performance&&"function"===typeof performance.now;
|
|
23
|
+
var T={timeRemaining:g?function(){if(null!==f&&f.expirationTime<y)return 0;var a=z()-performance.now();return 0<a?a:0}:function(){if(null!==f&&f.expirationTime<y)return 0;var a=z()-Date.now();return 0<a?a:0},didTimeout:!1},Sa=Date,Ta="function"===typeof setTimeout?setTimeout:void 0,Ua="function"===typeof clearTimeout?clearTimeout:void 0,pa="function"===typeof requestAnimationFrame?requestAnimationFrame:void 0,qa="function"===typeof cancelAnimationFrame?cancelAnimationFrame:void 0,ra,sa,ta=function(a){ra=
|
|
24
|
+
pa(function(b){Ua(sa);a(b)});sa=Ta(function(){qa(ra);a(p())},100)};if(g){var Va=performance;var p=function(){return Va.now()}}else p=function(){return Sa.now()};if("undefined"!==typeof window&&window._schedMock){g=window._schedMock;var H=g[0];var R=g[1];var z=g[2]}else if("undefined"===typeof window||"function"!==typeof window.addEventListener){var B=null,C=-1,ua=function(a,b){if(null!==B){var c=B;B=null;try{C=b,c(a)}finally{C=-1}}};H=function(a,b){-1!==C?setTimeout(H,0,a,b):(B=a,setTimeout(ua,b,
|
|
25
|
+
!0,b),setTimeout(ua,1073741823,!1,1073741823))};R=function(){B=null};z=function(){return Infinity};p=function(){return-1===C?0:C}}else{"undefined"!==typeof console&&("function"!==typeof pa&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof qa&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));
|
|
26
|
+
var L=null,M=!1,D=-1,E=!1,ba=!1,N=0,O=33,F=33;z=function(){return N};var ca="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(a){if(a.source===window&&a.data===ca){M=!1;var b=p();a=!1;if(0>=N-b)if(-1!==D&&D<=b)a=!0;else{E||(E=!0,ta(va));return}D=-1;b=L;L=null;if(null!==b){ba=!0;try{b(a)}finally{ba=!1}}}},!1);var va=function(a){E=!1;var b=a-N+F;b<F&&O<F?(8>b&&(b=8),F=b<O?O:b):O=b;N=a+F;M||(M=!0,window.postMessage(ca,"*"))};H=function(a,b){L=a;D=b;
|
|
27
|
+
ba||0>b?window.postMessage(ca,"*"):E||(E=!0,ta(va))};R=function(){L=null;M=!1;D=-1}}var Wa=0,Xa=0,m=null,t=null;m={current:new Set};t={current:null};var n=null;n=new Set;var I={current:null,currentDispatcher:null};g={ReactCurrentOwner:I,assign:K};K(g,{Scheduler:{unstable_cancelCallback:function(a){var b=a.next;if(null!==b){if(b===a)f=null;else{a===f&&(f=b);var c=a.previous;c.next=b;b.previous=c}a.next=a.previous=null}},unstable_now:p,unstable_scheduleCallback:function(a,b){var c=-1!==r?r:p();if("object"===
|
|
28
|
+
typeof b&&null!==b&&"number"===typeof b.timeout)b=c+b.timeout;else switch(l){case 1:b=c+-1;break;case 2:b=c+250;break;case 4:b=c+1073741823;break;default:b=c+5E3}a={callback:a,priorityLevel:l,expirationTime:b,next:null,previous:null};if(null===f)f=a.next=a.previous=a,w(f);else{c=null;var d=f;do{if(d.expirationTime>b){c=d;break}d=d.next}while(d!==f);null===c?c=f:c===f&&(f=a,w(f));b=c.previous;b.next=c.previous=a;a.next=c;a.previous=b}return a},unstable_runWithPriority:function(a,b){switch(a){case 1:case 2:case 3:case 4:break;
|
|
29
|
+
default:a=3}var c=l,d=r;l=a;r=p();try{return b()}finally{l=c,r=d,U()}},unstable_wrapCallback:function(a){var b=l;return function(){var c=l,d=r;l=b;r=p();try{return a.apply(this,arguments)}finally{l=c,r=d,U()}}},unstable_getCurrentPriorityLevel:function(){return l}},SchedulerTracing:{__interactionsRef:m,__subscriberRef:t,unstable_clear:function(a){var b=m.current;m.current=new Set;try{return a()}finally{m.current=b}},unstable_getCurrent:function(){return m.current},unstable_getThreadID:function(){return++Xa},
|
|
30
|
+
unstable_subscribe:function(a){n.add(a);1===n.size&&(t.current={onInteractionScheduledWorkCompleted:za,onInteractionTraced:ya,onWorkCanceled:Da,onWorkScheduled:Aa,onWorkStarted:Ba,onWorkStopped:Ca})},unstable_trace:function(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,e={__count:1,id:Wa++,name:a,timestamp:b},f=m.current,g=new Set(f);g.add(e);m.current=g;var h=t.current,l=void 0;try{if(null!==h)h.onInteractionTraced(e)}finally{try{if(null!==h)h.onWorkStarted(g,d)}finally{try{l=
|
|
31
|
+
c()}finally{m.current=f;try{if(null!==h)h.onWorkStopped(g,d)}finally{if(e.__count--,null!==h&&0===e.__count)h.onInteractionScheduledWorkCompleted(e)}}}}return l},unstable_unsubscribe:function(a){n.delete(a);0===n.size&&(t.current=null)},unstable_wrap:function(a){function b(){var b=m.current;m.current=d;e=t.current;try{var h=void 0;try{if(null!==e)e.onWorkStarted(d,c)}finally{try{h=a.apply(void 0,arguments)}finally{if(m.current=b,null!==e)e.onWorkStopped(d,c)}}return h}finally{f||(f=!0,d.forEach(function(a){a.__count--;
|
|
32
|
+
if(null!==e&&0===a.__count)e.onInteractionScheduledWorkCompleted(a)}))}}var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,d=m.current,e=t.current;if(null!==e)e.onWorkScheduled(d,c);d.forEach(function(a){a.__count++});var f=!1;b.cancel=function(){e=t.current;try{if(null!==e)e.onWorkCanceled(d,c)}finally{d.forEach(function(a){a.__count--;if(e&&0===a.__count)e.onInteractionScheduledWorkCompleted(a)})}};return b}}});var ia=Object.prototype.hasOwnProperty,ja={key:!0,ref:!0,__self:!0,__source:!0},
|
|
33
|
+
na=/\/+/g,J=[];u={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=ka(null,null,b,c);Y(a,Ha,b);la(b)},count:function(a){return Y(a,function(){return null},null)},toArray:function(a){var b=[];Z(a,b,null,function(a){return a});return b},only:function(a){V(a)?void 0:q("143");return a}},createRef:function(){return{current:null}},Component:v,PureComponent:Q,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:Ma,
|
|
34
|
+
_calculateChangedBits:b,_currentValue:a,_currentValue2:a,Provider:null,Consumer:null,unstable_read:null};a.Provider={$$typeof:La,_context:a};a.Consumer=a;a.unstable_read=Ja.bind(null,a);return a},forwardRef:function(a){return{$$typeof:Oa,render:a}},pure:function(a,b){return{$$typeof:Pa,render:a,compare:void 0===b?null:b}},Fragment:u,StrictMode:aa,unstable_ConcurrentMode:Na,unstable_Profiler:Ka,createElement:ha,cloneElement:function(a,b,c){null===a||void 0===a?q("267",a):void 0;var d=void 0,e=K({},
|
|
35
|
+
a.props),f=a.key,g=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,h=I.current);void 0!==b.key&&(f=""+b.key);var l=void 0;a.type&&a.type.defaultProps&&(l=a.type.defaultProps);for(d in b)ia.call(b,d)&&!ja.hasOwnProperty(d)&&(e[d]=void 0===b[d]&&void 0!==l?l[d]:b[d])}d=arguments.length-2;if(1===d)e.children=c;else if(1<d){l=Array(d);for(var m=0;m<d;m++)l[m]=arguments[m+2];e.children=l}return{$$typeof:A,type:a.type,key:f,ref:g,props:e,_owner:h}},createFactory:function(a){var b=ha.bind(null,a);
|
|
36
|
+
b.type=a;return b},isValidElement:V,version:"16.6.0-alpha.400d197",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:g};u=(aa={default:u},u)||aa;return u.default||u});
|