react-dom 16.10.2 → 16.11.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/build-info.json +5 -5
- package/cjs/react-dom-server.browser.development.js +117 -170
- package/cjs/react-dom-server.browser.production.min.js +29 -29
- package/cjs/react-dom-server.node.development.js +111 -160
- package/cjs/react-dom-server.node.production.min.js +17 -17
- package/cjs/react-dom-test-utils.development.js +46 -84
- package/cjs/react-dom-test-utils.production.min.js +9 -9
- package/cjs/react-dom-unstable-fizz.browser.development.js +1 -1
- package/cjs/react-dom-unstable-fizz.browser.production.min.js +1 -1
- package/cjs/react-dom-unstable-fizz.node.development.js +1 -1
- package/cjs/react-dom-unstable-fizz.node.production.min.js +1 -1
- package/cjs/react-dom-unstable-native-dependencies.development.js +27 -47
- package/cjs/react-dom-unstable-native-dependencies.production.min.js +8 -8
- package/cjs/react-dom.development.js +1614 -1813
- package/cjs/react-dom.production.min.js +269 -272
- package/cjs/react-dom.profiling.min.js +252 -255
- package/package.json +2 -2
- package/umd/react-dom-server.browser.development.js +117 -170
- package/umd/react-dom-server.browser.production.min.js +36 -36
- package/umd/react-dom-test-utils.development.js +46 -84
- package/umd/react-dom-test-utils.production.min.js +9 -9
- package/umd/react-dom-unstable-fizz.browser.development.js +1 -1
- package/umd/react-dom-unstable-fizz.browser.production.min.js +1 -1
- package/umd/react-dom-unstable-native-dependencies.development.js +27 -47
- package/umd/react-dom-unstable-native-dependencies.production.min.js +10 -10
- package/umd/react-dom.development.js +1608 -1807
- package/umd/react-dom.production.min.js +229 -232
- package/umd/react-dom.profiling.min.js +237 -239
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.11.0
|
|
2
2
|
* react-dom-server.browser.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
'use strict';var k=require("object-assign"),l=require("react");function
|
|
11
|
-
var
|
|
12
|
-
60116,ka=
|
|
10
|
+
'use strict';var k=require("object-assign"),l=require("react");function q(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
|
|
11
|
+
var t="function"===typeof Symbol&&Symbol.for,aa=t?Symbol.for("react.portal"):60106,u=t?Symbol.for("react.fragment"):60107,ba=t?Symbol.for("react.strict_mode"):60108,ca=t?Symbol.for("react.profiler"):60114,w=t?Symbol.for("react.provider"):60109,da=t?Symbol.for("react.context"):60110,ea=t?Symbol.for("react.concurrent_mode"):60111,fa=t?Symbol.for("react.forward_ref"):60112,B=t?Symbol.for("react.suspense"):60113,ha=t?Symbol.for("react.suspense_list"):60120,ia=t?Symbol.for("react.memo"):60115,ja=t?Symbol.for("react.lazy"):
|
|
12
|
+
60116,ka=t?Symbol.for("react.fundamental"):60117,la=t?Symbol.for("react.scope"):60119,C=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;C.hasOwnProperty("ReactCurrentDispatcher")||(C.ReactCurrentDispatcher={current:null});C.hasOwnProperty("ReactCurrentBatchConfig")||(C.ReactCurrentBatchConfig={suspense:null});
|
|
13
13
|
function ma(a){if(-1===a._status){a._status=0;var b=a._ctor;b=b();a._result=b;b.then(function(c){0===a._status&&(c=c.default,a._status=1,a._result=c)},function(c){0===a._status&&(a._status=2,a._result=c)})}}
|
|
14
|
-
function D(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case
|
|
14
|
+
function D(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case u:return"Fragment";case aa:return"Portal";case ca:return"Profiler";case ba:return"StrictMode";case B:return"Suspense";case ha:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case da:return"Context.Consumer";case w:return"Context.Provider";case fa:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");
|
|
15
15
|
case ia:return D(a.type);case ja:if(a=1===a._status?a._result:null)return D(a)}return null}var na={};function E(a,b){for(var c=a._threadCount|0;c<=b;c++)a[c]=a._currentValue2,a._threadCount=c+1}function oa(a,b,c,d){if(d&&(d=a.contextType,"object"===typeof d&&null!==d))return E(d,c),d[c];if(a=a.contextTypes){c={};for(var f in a)c[f]=b[f];b=c}else b=na;return b}for(var F=new Uint16Array(16),H=0;15>H;H++)F[H]=H+1;F[15]=0;
|
|
16
16
|
var pa=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,qa=Object.prototype.hasOwnProperty,ra={},sa={};
|
|
17
17
|
function ta(a){if(qa.call(sa,a))return!0;if(qa.call(ra,a))return!1;if(pa.test(a))return sa[a]=!0;ra[a]=!0;return!1}function ua(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
|
|
18
|
-
function va(a,b,c,d){if(null===b||"undefined"===typeof b||ua(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function J(a,b,c,d,f,
|
|
18
|
+
function va(a,b,c,d){if(null===b||"undefined"===typeof b||ua(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function J(a,b,c,d,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=g}var K={};
|
|
19
19
|
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){K[a]=new J(a,0,!1,a,null,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];K[b]=new J(b,1,!1,a[1],null,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){K[a]=new J(a,2,!1,a.toLowerCase(),null,!1)});
|
|
20
20
|
["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){K[a]=new J(a,2,!1,a,null,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){K[a]=new J(a,3,!1,a.toLowerCase(),null,!1)});
|
|
21
21
|
["checked","multiple","muted","selected"].forEach(function(a){K[a]=new J(a,3,!0,a,null,!1)});["capture","download"].forEach(function(a){K[a]=new J(a,4,!1,a,null,!1)});["cols","rows","size","span"].forEach(function(a){K[a]=new J(a,6,!1,a,null,!1)});["rowSpan","start"].forEach(function(a){K[a]=new J(a,5,!1,a.toLowerCase(),null,!1)});var L=/[\-:]([a-z])/g;function M(a){return a[1].toUpperCase()}
|
|
@@ -24,31 +24,31 @@ M);K[b]=new J(b,1,!1,a,null,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:
|
|
|
24
24
|
K.xlinkHref=new J("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(a){K[a]=new J(a,1,!1,a.toLowerCase(),null,!0)});var wa=/["'&<>]/;
|
|
25
25
|
function N(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=wa.exec(a);if(b){var c="",d,f=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b=""";break;case 38:b="&";break;case 39:b="'";break;case 60:b="<";break;case 62:b=">";break;default:continue}f!==d&&(c+=a.substring(f,d));f=d+1;c+=b}a=f!==d?c+a.substring(f,d):c}return a}
|
|
26
26
|
function xa(a,b){var c=K.hasOwnProperty(a)?K[a]:null;var d;if(d="style"!==a)d=null!==c?0===c.type:!(2<a.length)||"o"!==a[0]&&"O"!==a[0]||"n"!==a[1]&&"N"!==a[1]?!1:!0;if(d||va(a,b,c,!1))return"";if(null!==c){a=c.attributeName;d=c.type;if(3===d||4===d&&!0===b)return a+'=""';c.sanitizeURL&&(b=""+b);return a+"="+('"'+N(b)+'"')}return ta(a)?a+"="+('"'+N(b)+'"'):""}function ya(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}
|
|
27
|
-
var za="function"===typeof Object.is?Object.is:ya,O=null,P=null,Q=null,R=!1,S=!1,U=null,V=0;function W(){if(null===O)throw
|
|
27
|
+
var za="function"===typeof Object.is?Object.is:ya,O=null,P=null,Q=null,R=!1,S=!1,U=null,V=0;function W(){if(null===O)throw Error(q(321));return O}function Aa(){if(0<V)throw Error(q(312));return{memoizedState:null,queue:null,next:null}}function Ba(){null===Q?null===P?(R=!1,P=Q=Aa()):(R=!0,Q=P):null===Q.next?(R=!1,Q=Q.next=Aa()):(R=!0,Q=Q.next);return Q}function Ca(a,b,c,d){for(;S;)S=!1,V+=1,Q=null,c=a(b,d);P=O=null;V=0;Q=U=null;return c}function Da(a,b){return"function"===typeof b?b(a):b}
|
|
28
28
|
function Ea(a,b,c){O=W();Q=Ba();if(R){var d=Q.queue;b=d.dispatch;if(null!==U&&(c=U.get(d),void 0!==c)){U.delete(d);d=Q.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);Q.memoizedState=d;return[d,b]}return[Q.memoizedState,b]}a=a===Da?"function"===typeof b?b():b:void 0!==c?c(b):b;Q.memoizedState=a;a=Q.queue={last:null,dispatch:null};a=a.dispatch=Fa.bind(null,O,a);return[Q.memoizedState,a]}
|
|
29
|
-
function Fa(a,b,c){if(!(25>V))throw
|
|
29
|
+
function Fa(a,b,c){if(!(25>V))throw Error(q(301));if(a===O)if(S=!0,a={action:c,next:null},null===U&&(U=new Map),c=U.get(b),void 0===c)U.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function Ga(){}
|
|
30
30
|
var X=0,Ha={readContext:function(a){var b=X;E(a,b);return a[b]},useContext:function(a){W();var b=X;E(a,b);return a[b]},useMemo:function(a,b){O=W();Q=Ba();b=void 0===b?null:b;if(null!==Q){var c=Q.memoizedState;if(null!==c&&null!==b){a:{var d=c[1];if(null===d)d=!1;else{for(var f=0;f<d.length&&f<b.length;f++)if(!za(b[f],d[f])){d=!1;break a}d=!0}}if(d)return c[0]}}a=a();Q.memoizedState=[a,b];return a},useReducer:Ea,useRef:function(a){O=W();Q=Ba();var b=Q.memoizedState;return null===b?(a={current:a},Q.memoizedState=
|
|
31
|
-
a):b},useState:function(a){return Ea(Da,a)},useLayoutEffect:function(){},useCallback:function(a){return a},useImperativeHandle:Ga,useEffect:Ga,useDebugValue:Ga,useResponder:function(a,b){return{props:b,responder:a}}},Ia={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
|
|
31
|
+
a):b},useState:function(a){return Ea(Da,a)},useLayoutEffect:function(){},useCallback:function(a){return a},useImperativeHandle:Ga,useEffect:Ga,useDebugValue:Ga,useResponder:function(a,b){return{props:b,responder:a}},useDeferredValue:function(a){W();return a},useTransition:function(){W();return[function(a){a()},!1]}},Ia={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
|
|
32
32
|
function Ja(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}
|
|
33
33
|
var Ka={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},La=k({menuitem:!0},Ka),Y={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,
|
|
34
34
|
gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ma=["Webkit","ms","Moz","O"];Object.keys(Y).forEach(function(a){Ma.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Y[b]=Y[a]})});
|
|
35
|
-
var Na=/([A-Z])/g,Oa=/^ms-/,Z=l.Children.toArray,Pa=C.ReactCurrentDispatcher,Qa={listing:!0,pre:!0,textarea:!0},Ra=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Sa={},Ta={};function Ua(a){if(void 0===a||null===a)return a;var b="";l.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}var Va=Object.prototype.hasOwnProperty,Wa={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function Xa(a,b){if(void 0===a)throw
|
|
36
|
-
function Ya(a,b,c){function d(d,
|
|
37
|
-
f,m),e=Ca(
|
|
38
|
-
|
|
39
|
-
typeof
|
|
40
|
-
var Za=function(){function a(a,b){l.isValidElement(a)?a.type!==
|
|
41
|
-
b;this.suspenseDepth=0;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[]}var b=a.prototype;b.destroy=function(){if(!this.exhausted){this.exhausted=!0;this.clearProviders();var a=this.threadID;F[a]=F[0];F[0]=a}};b.pushProvider=function(a){var c=++this.contextIndex,b=a.type._context,
|
|
42
|
-
this.contextStack[a]=null;this.contextValueStack[a]=null;this.contextIndex--;b[this.threadID]=f};b.clearProviders=function(){for(var a=this.contextIndex;0<=a;a--)this.contextStack[a][this.threadID]=this.contextValueStack[a]};b.read=function(a){if(this.exhausted)return null;var b=X;X=this.threadID;var c=Pa.current;Pa.current=Ha;try{for(var
|
|
43
|
-
e.children.length){var I=e.footer;""!==I&&(this.previousWasTextNode=!1);this.stack.pop();if("select"===e.type)this.currentSelectValue=null;else if(null!=e.type&&null!=e.type.type&&e.type.type.$$typeof===
|
|
44
|
-
|
|
45
|
-
b=b.context;if(null===a||!1===a)return"";if(!l.isValidElement(a)){if(null!=a&&null!=a.$$typeof){f=a.$$typeof;if(f===aa)throw
|
|
46
|
-
"";case B:throw
|
|
47
|
-
context:b,footer:""},this.pushProvider(a),this.stack.push(f),"";case da:c=a.type;d=a.props;var
|
|
48
|
-
}case la:throw
|
|
49
|
-
|
|
50
|
-
d,{selected:
|
|
51
|
-
z){n=void 0;var
|
|
52
|
-
!1;break b;default:y=!0}y?Wa.hasOwnProperty(z)||(n=z,n=ta(n)&&null!=m?n+"="+('"'+N(m)+'"'):""):n=xa(z,m);n&&(G+=" "+n)}}e||I&&(G+=' data-reactroot=""');var z=G;
|
|
53
|
-
f?Ja(a):"http://www.w3.org/2000/svg"===f&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":f;this.stack.push({domNamespace:f,type:c,children:d,childIndex:0,context:b,footer:
|
|
54
|
-
},version:"16.
|
|
35
|
+
var Na=/([A-Z])/g,Oa=/^ms-/,Z=l.Children.toArray,Pa=C.ReactCurrentDispatcher,Qa={listing:!0,pre:!0,textarea:!0},Ra=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Sa={},Ta={};function Ua(a){if(void 0===a||null===a)return a;var b="";l.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}var Va=Object.prototype.hasOwnProperty,Wa={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function Xa(a,b){if(void 0===a)throw Error(q(152,D(b)||"Component"));}
|
|
36
|
+
function Ya(a,b,c){function d(d,g){var e=g.prototype&&g.prototype.isReactComponent,f=oa(g,b,c,e),x=[],h=!1,m={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===x)return null},enqueueReplaceState:function(a,c){h=!0;x=[c]},enqueueSetState:function(a,c){if(null===x)return null;x.push(c)}};if(e){if(e=new g(d.props,f,m),"function"===typeof g.getDerivedStateFromProps){var v=g.getDerivedStateFromProps.call(null,d.props,e.state);null!=v&&(e.state=k({},e.state,v))}}else if(O={},e=g(d.props,
|
|
37
|
+
f,m),e=Ca(g,d.props,e,f),null==e||null==e.render){a=e;Xa(a,g);return}e.props=d.props;e.context=f;e.updater=m;m=e.state;void 0===m&&(e.state=m=null);if("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount)if("function"===typeof e.componentWillMount&&"function"!==typeof g.getDerivedStateFromProps&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&"function"!==typeof g.getDerivedStateFromProps&&e.UNSAFE_componentWillMount(),x.length){m=x;var r=
|
|
38
|
+
h;x=null;h=!1;if(r&&1===m.length)e.state=m[0];else{v=r?m[0]:e.state;var y=!0;for(r=r?1:0;r<m.length;r++){var p=m[r];p="function"===typeof p?p.call(e,v,d.props,f):p;null!=p&&(y?(y=!1,v=k({},v,p)):k(v,p))}e.state=v}}else x=null;a=e.render();Xa(a,g);if("function"===typeof e.getChildContext&&(d=g.childContextTypes,"object"===typeof d)){var A=e.getChildContext();for(var T in A)if(!(T in d))throw Error(q(108,D(g)||"Unknown",T));}A&&(b=k({},b,A))}for(;l.isValidElement(a);){var f=a,g=f.type;if("function"!==
|
|
39
|
+
typeof g)break;d(f,g)}return{child:a,context:b}}
|
|
40
|
+
var Za=function(){function a(a,b){l.isValidElement(a)?a.type!==u?a=[a]:(a=a.props.children,a=l.isValidElement(a)?[a]:Z(a)):a=Z(a);a={type:null,domNamespace:Ia.html,children:a,childIndex:0,context:na,footer:""};var c=F[0];if(0===c){var g=F;c=g.length;var d=2*c;if(!(65536>=d))throw Error(q(304));var h=new Uint16Array(d);h.set(g);F=h;F[0]=c+1;for(g=c;g<d-1;g++)F[g]=g+1;F[d-1]=0}else F[0]=F[c];this.threadID=c;this.stack=[a];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;this.makeStaticMarkup=
|
|
41
|
+
b;this.suspenseDepth=0;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[]}var b=a.prototype;b.destroy=function(){if(!this.exhausted){this.exhausted=!0;this.clearProviders();var a=this.threadID;F[a]=F[0];F[0]=a}};b.pushProvider=function(a){var c=++this.contextIndex,b=a.type._context,g=this.threadID;E(b,g);var x=b[g];this.contextStack[c]=b;this.contextValueStack[c]=x;b[g]=a.props.value};b.popProvider=function(){var a=this.contextIndex,b=this.contextStack[a],f=this.contextValueStack[a];
|
|
42
|
+
this.contextStack[a]=null;this.contextValueStack[a]=null;this.contextIndex--;b[this.threadID]=f};b.clearProviders=function(){for(var a=this.contextIndex;0<=a;a--)this.contextStack[a][this.threadID]=this.contextValueStack[a]};b.read=function(a){if(this.exhausted)return null;var b=X;X=this.threadID;var c=Pa.current;Pa.current=Ha;try{for(var g=[""],x=!1;g[0].length<a;){if(0===this.stack.length){this.exhausted=!0;var h=this.threadID;F[h]=F[0];F[0]=h;break}var e=this.stack[this.stack.length-1];if(x||e.childIndex>=
|
|
43
|
+
e.children.length){var I=e.footer;""!==I&&(this.previousWasTextNode=!1);this.stack.pop();if("select"===e.type)this.currentSelectValue=null;else if(null!=e.type&&null!=e.type.type&&e.type.type.$$typeof===w)this.popProvider(e.type);else if(e.type===B){this.suspenseDepth--;var G=g.pop();if(x){x=!1;var n=e.fallbackFrame;if(!n)throw Error(q(303));this.stack.push(n);g[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}else g[this.suspenseDepth]+=G}g[this.suspenseDepth]+=I}else{var m=e.children[e.childIndex++],
|
|
44
|
+
v="";try{v+=this.render(m,e.context,e.domNamespace)}catch(r){if(null!=r&&"function"===typeof r.then)throw Error(q(294));throw r;}finally{}g.length<=this.suspenseDepth&&g.push("");g[this.suspenseDepth]+=v}}return g[0]}finally{Pa.current=c,X=b}};b.render=function(a,b,f){if("string"===typeof a||"number"===typeof a){f=""+a;if(""===f)return"";if(this.makeStaticMarkup)return N(f);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+N(f);this.previousWasTextNode=!0;return N(f)}b=Ya(a,b,this.threadID);a=b.child;
|
|
45
|
+
b=b.context;if(null===a||!1===a)return"";if(!l.isValidElement(a)){if(null!=a&&null!=a.$$typeof){f=a.$$typeof;if(f===aa)throw Error(q(257));throw Error(q(258,f.toString()));}a=Z(a);this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""});return""}var c=a.type;if("string"===typeof c)return this.renderDOM(a,b,f);switch(c){case ba:case ea:case ca:case ha:case u:return a=Z(a.props.children),this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),
|
|
46
|
+
"";case B:throw Error(q(294));}if("object"===typeof c&&null!==c)switch(c.$$typeof){case fa:O={};var d=c.render(a.props,a.ref);d=Ca(c.render,a.props,d,a.ref);d=Z(d);this.stack.push({type:null,domNamespace:f,children:d,childIndex:0,context:b,footer:""});return"";case ia:return a=[l.createElement(c.type,k({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case w:return c=Z(a.props.children),f={type:a,domNamespace:f,children:c,childIndex:0,
|
|
47
|
+
context:b,footer:""},this.pushProvider(a),this.stack.push(f),"";case da:c=a.type;d=a.props;var h=this.threadID;E(c,h);c=Z(d.children(c[h]));this.stack.push({type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""});return"";case ka:throw Error(q(338));case ja:switch(c=a.type,ma(c),c._status){case 1:return a=[l.createElement(c._result,k({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case 2:throw c._result;default:throw Error(q(295));
|
|
48
|
+
}case la:throw Error(q(343));}throw Error(q(130,null==c?c:typeof c,""));};b.renderDOM=function(a,b,f){var c=a.type.toLowerCase();f===Ia.html&&Ja(c);if(!Sa.hasOwnProperty(c)){if(!Ra.test(c))throw Error(q(65,c));Sa[c]=!0}var d=a.props;if("input"===c)d=k({type:void 0},d,{defaultChecked:void 0,defaultValue:void 0,value:null!=d.value?d.value:d.defaultValue,checked:null!=d.checked?d.checked:d.defaultChecked});else if("textarea"===c){var h=d.value;if(null==h){h=d.defaultValue;var e=d.children;if(null!=e){if(null!=
|
|
49
|
+
h)throw Error(q(92));if(Array.isArray(e)){if(!(1>=e.length))throw Error(q(93));e=e[0]}h=""+e}null==h&&(h="")}d=k({},d,{value:void 0,children:""+h})}else if("select"===c)this.currentSelectValue=null!=d.value?d.value:d.defaultValue,d=k({},d,{value:void 0});else if("option"===c){e=this.currentSelectValue;var I=Ua(d.children);if(null!=e){var G=null!=d.value?d.value+"":I;h=!1;if(Array.isArray(e))for(var n=0;n<e.length;n++){if(""+e[n]===G){h=!0;break}}else h=""+e===G;d=k({selected:void 0,children:void 0},
|
|
50
|
+
d,{selected:h,children:I})}}if(h=d){if(La[c]&&(null!=h.children||null!=h.dangerouslySetInnerHTML))throw Error(q(137,c,""));if(null!=h.dangerouslySetInnerHTML){if(null!=h.children)throw Error(q(60));if(!("object"===typeof h.dangerouslySetInnerHTML&&"__html"in h.dangerouslySetInnerHTML))throw Error(q(61));}if(null!=h.style&&"object"!==typeof h.style)throw Error(q(62,""));}h=d;e=this.makeStaticMarkup;I=1===this.stack.length;G="<"+a.type;for(z in h)if(Va.call(h,z)){var m=h[z];if(null!=m){if("style"===
|
|
51
|
+
z){n=void 0;var v="",r="";for(n in m)if(m.hasOwnProperty(n)){var y=0===n.indexOf("--"),p=m[n];if(null!=p){if(y)var A=n;else if(A=n,Ta.hasOwnProperty(A))A=Ta[A];else{var T=A.replace(Na,"-$1").toLowerCase().replace(Oa,"-ms-");A=Ta[A]=T}v+=r+A+":";r=n;y=null==p||"boolean"===typeof p||""===p?"":y||"number"!==typeof p||0===p||Y.hasOwnProperty(r)&&Y[r]?(""+p).trim():p+"px";v+=y;r=";"}}m=v||null}n=null;b:if(y=c,p=h,-1===y.indexOf("-"))y="string"===typeof p.is;else switch(y){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":y=
|
|
52
|
+
!1;break b;default:y=!0}y?Wa.hasOwnProperty(z)||(n=z,n=ta(n)&&null!=m?n+"="+('"'+N(m)+'"'):""):n=xa(z,m);n&&(G+=" "+n)}}e||I&&(G+=' data-reactroot=""');var z=G;h="";Ka.hasOwnProperty(c)?z+="/>":(z+=">",h="</"+a.type+">");a:{e=d.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html){e=e.__html;break a}}else if(e=d.children,"string"===typeof e||"number"===typeof e){e=N(e);break a}e=null}null!=e?(d=[],Qa[c]&&"\n"===e.charAt(0)&&(z+="\n"),z+=e):d=Z(d.children);a=a.type;f=null==f||"http://www.w3.org/1999/xhtml"===
|
|
53
|
+
f?Ja(a):"http://www.w3.org/2000/svg"===f&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":f;this.stack.push({domNamespace:f,type:c,children:d,childIndex:0,context:b,footer:h});this.previousWasTextNode=!1;return z};return a}(),$a={renderToString:function(a){a=new Za(a,!1);try{return a.read(Infinity)}finally{a.destroy()}},renderToStaticMarkup:function(a){a=new Za(a,!0);try{return a.read(Infinity)}finally{a.destroy()}},renderToNodeStream:function(){throw Error(q(207));},renderToStaticNodeStream:function(){throw Error(q(208));
|
|
54
|
+
},version:"16.11.0"},ab={default:$a},bb=ab&&$a||ab;module.exports=bb.default||bb;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.11.0
|
|
2
2
|
* react-dom-server.node.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -22,19 +22,11 @@ var stream = require('stream');
|
|
|
22
22
|
|
|
23
23
|
// TODO: this is special because it gets imported during build.
|
|
24
24
|
|
|
25
|
-
var ReactVersion = '16.
|
|
25
|
+
var ReactVersion = '16.11.0';
|
|
26
26
|
|
|
27
27
|
// Do not require this module directly! Use normal `invariant` calls with
|
|
28
|
-
// template literal strings. The messages will be
|
|
29
|
-
// build
|
|
30
|
-
|
|
31
|
-
// Do not require this module directly! Use normal `invariant` calls with
|
|
32
|
-
// template literal strings. The messages will be converted to ReactError during
|
|
33
|
-
// build, and in production they will be minified.
|
|
34
|
-
function ReactError(error) {
|
|
35
|
-
error.name = 'Invariant Violation';
|
|
36
|
-
return error;
|
|
37
|
-
}
|
|
28
|
+
// template literal strings. The messages will be replaced with error codes
|
|
29
|
+
// during build.
|
|
38
30
|
|
|
39
31
|
/**
|
|
40
32
|
* Use invariant() to assert state which your program assumes to be true.
|
|
@@ -381,10 +373,9 @@ var warnAboutDeprecatedLifecycles = true; // Gather advanced timing metrics for
|
|
|
381
373
|
|
|
382
374
|
// Trace which interactions trigger each commit.
|
|
383
375
|
|
|
384
|
-
//
|
|
385
|
-
|
|
386
|
-
var enableSuspenseServerRenderer = false; // TODO: true? Here it might just be false.
|
|
376
|
+
// SSR experiments
|
|
387
377
|
|
|
378
|
+
var enableSuspenseServerRenderer = false;
|
|
388
379
|
// Only used in www builds.
|
|
389
380
|
|
|
390
381
|
// Only used in www builds.
|
|
@@ -398,9 +389,6 @@ var disableJavaScriptURLs = false; // React Fire: prevent the value and checked
|
|
|
398
389
|
// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
|
|
399
390
|
|
|
400
391
|
|
|
401
|
-
// See https://github.com/react-native-community/discussions-and-proposals/issues/72 for more information
|
|
402
|
-
// This is a flag so we can fix warnings in RN core before turning it on
|
|
403
|
-
|
|
404
392
|
// Experimental React Flare event system and event components support.
|
|
405
393
|
|
|
406
394
|
var enableFlareAPI = false; // Experimental Host Component support.
|
|
@@ -415,10 +403,6 @@ var enableScopeAPI = false; // New API for JSX transforms to target - https://gi
|
|
|
415
403
|
// For tests, we flush suspense fallbacks in an act scope;
|
|
416
404
|
// *except* in some of our own tests, where we test incremental loading states.
|
|
417
405
|
|
|
418
|
-
// Changes priority of some events like mousemove to user-blocking priority,
|
|
419
|
-
// but without making them discrete. The flag exists in case it causes
|
|
420
|
-
// starvation problems.
|
|
421
|
-
|
|
422
406
|
// Add a callback property to suspense to notify which promises are currently
|
|
423
407
|
// in the update queue. This allows reporting and tracing of what is causing
|
|
424
408
|
// the user to see a loading state.
|
|
@@ -576,13 +560,11 @@ function growThreadCountAndReturnNextAvailable() {
|
|
|
576
560
|
var oldSize = oldArray.length;
|
|
577
561
|
var newSize = oldSize * 2;
|
|
578
562
|
|
|
579
|
-
(
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
throw ReactError(Error("Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic."));
|
|
583
|
-
}
|
|
563
|
+
if (!(newSize <= 0x10000)) {
|
|
564
|
+
{
|
|
565
|
+
throw Error("Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic.");
|
|
584
566
|
}
|
|
585
|
-
}
|
|
567
|
+
}
|
|
586
568
|
|
|
587
569
|
var newArray = new Uint16Array(newSize);
|
|
588
570
|
newArray.set(oldArray);
|
|
@@ -918,13 +900,11 @@ var didWarn = false;
|
|
|
918
900
|
|
|
919
901
|
function sanitizeURL(url) {
|
|
920
902
|
if (disableJavaScriptURLs) {
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
throw ReactError(Error("React has blocked a javascript: URL as a security precaution." + (ReactDebugCurrentFrame$2.getStackAddendum())));
|
|
925
|
-
}
|
|
903
|
+
if (!!isJavaScriptProtocol.test(url)) {
|
|
904
|
+
{
|
|
905
|
+
throw Error("React has blocked a javascript: URL as a security precaution." + (ReactDebugCurrentFrame$2.getStackAddendum()));
|
|
926
906
|
}
|
|
927
|
-
}
|
|
907
|
+
}
|
|
928
908
|
} else if (true && !didWarn && isJavaScriptProtocol.test(url)) {
|
|
929
909
|
didWarn = true;
|
|
930
910
|
warning$1(false, 'A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
|
|
@@ -1130,13 +1110,11 @@ var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently
|
|
|
1130
1110
|
var currentHookNameInDev;
|
|
1131
1111
|
|
|
1132
1112
|
function resolveCurrentlyRenderingComponent() {
|
|
1133
|
-
(
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
throw ReactError(Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem."));
|
|
1137
|
-
}
|
|
1113
|
+
if (!(currentlyRenderingComponent !== null)) {
|
|
1114
|
+
{
|
|
1115
|
+
throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.");
|
|
1138
1116
|
}
|
|
1139
|
-
}
|
|
1117
|
+
}
|
|
1140
1118
|
|
|
1141
1119
|
{
|
|
1142
1120
|
!!isInHookUserCodeInDev ? warning$1(false, 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks') : void 0;
|
|
@@ -1175,13 +1153,11 @@ function areHookInputsEqual(nextDeps, prevDeps) {
|
|
|
1175
1153
|
|
|
1176
1154
|
function createHook() {
|
|
1177
1155
|
if (numberOfReRenders > 0) {
|
|
1178
|
-
|
|
1156
|
+
{
|
|
1179
1157
|
{
|
|
1180
|
-
|
|
1181
|
-
throw ReactError(Error("Rendered more hooks than during the previous render"));
|
|
1182
|
-
}
|
|
1158
|
+
throw Error("Rendered more hooks than during the previous render");
|
|
1183
1159
|
}
|
|
1184
|
-
}
|
|
1160
|
+
}
|
|
1185
1161
|
}
|
|
1186
1162
|
|
|
1187
1163
|
return {
|
|
@@ -1443,13 +1419,11 @@ function useLayoutEffect(create, inputs) {
|
|
|
1443
1419
|
}
|
|
1444
1420
|
|
|
1445
1421
|
function dispatchAction(componentIdentity, queue, action) {
|
|
1446
|
-
(
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
throw ReactError(Error("Too many re-renders. React limits the number of renders to prevent an infinite loop."));
|
|
1450
|
-
}
|
|
1422
|
+
if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
|
|
1423
|
+
{
|
|
1424
|
+
throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");
|
|
1451
1425
|
}
|
|
1452
|
-
}
|
|
1426
|
+
}
|
|
1453
1427
|
|
|
1454
1428
|
if (componentIdentity === currentlyRenderingComponent) {
|
|
1455
1429
|
// This is a render phase update. Stash it in a lazily-created map of
|
|
@@ -1497,6 +1471,21 @@ function useResponder(responder, props) {
|
|
|
1497
1471
|
};
|
|
1498
1472
|
}
|
|
1499
1473
|
|
|
1474
|
+
function useDeferredValue(value, config) {
|
|
1475
|
+
resolveCurrentlyRenderingComponent();
|
|
1476
|
+
return value;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
function useTransition(config) {
|
|
1480
|
+
resolveCurrentlyRenderingComponent();
|
|
1481
|
+
|
|
1482
|
+
var startTransition = function (callback) {
|
|
1483
|
+
callback();
|
|
1484
|
+
};
|
|
1485
|
+
|
|
1486
|
+
return [startTransition, false];
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1500
1489
|
function noop() {}
|
|
1501
1490
|
|
|
1502
1491
|
var currentThreadID = 0;
|
|
@@ -1518,7 +1507,9 @@ var Dispatcher = {
|
|
|
1518
1507
|
useEffect: noop,
|
|
1519
1508
|
// Debugging effect
|
|
1520
1509
|
useDebugValue: noop,
|
|
1521
|
-
useResponder: useResponder
|
|
1510
|
+
useResponder: useResponder,
|
|
1511
|
+
useDeferredValue: useDeferredValue,
|
|
1512
|
+
useTransition: useTransition
|
|
1522
1513
|
};
|
|
1523
1514
|
|
|
1524
1515
|
var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
|
|
@@ -1642,44 +1633,36 @@ function assertValidProps(tag, props) {
|
|
|
1642
1633
|
|
|
1643
1634
|
|
|
1644
1635
|
if (voidElementTags[tag]) {
|
|
1645
|
-
(
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
throw ReactError(Error(tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + (ReactDebugCurrentFrame$4.getStackAddendum())));
|
|
1649
|
-
}
|
|
1636
|
+
if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
|
|
1637
|
+
{
|
|
1638
|
+
throw Error(tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + (ReactDebugCurrentFrame$4.getStackAddendum()));
|
|
1650
1639
|
}
|
|
1651
|
-
}
|
|
1640
|
+
}
|
|
1652
1641
|
}
|
|
1653
1642
|
|
|
1654
1643
|
if (props.dangerouslySetInnerHTML != null) {
|
|
1655
|
-
(
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
throw ReactError(Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`."));
|
|
1659
|
-
}
|
|
1644
|
+
if (!(props.children == null)) {
|
|
1645
|
+
{
|
|
1646
|
+
throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
|
|
1660
1647
|
}
|
|
1661
|
-
}
|
|
1648
|
+
}
|
|
1662
1649
|
|
|
1663
|
-
(
|
|
1664
|
-
|
|
1665
|
-
{
|
|
1666
|
-
throw ReactError(Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information."));
|
|
1667
|
-
}
|
|
1650
|
+
if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
|
|
1651
|
+
{
|
|
1652
|
+
throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.");
|
|
1668
1653
|
}
|
|
1669
|
-
}
|
|
1654
|
+
}
|
|
1670
1655
|
}
|
|
1671
1656
|
|
|
1672
1657
|
{
|
|
1673
1658
|
!(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) ? warning$1(false, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;
|
|
1674
1659
|
}
|
|
1675
1660
|
|
|
1676
|
-
(
|
|
1677
|
-
|
|
1678
|
-
{
|
|
1679
|
-
throw ReactError(Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + (ReactDebugCurrentFrame$4.getStackAddendum())));
|
|
1680
|
-
}
|
|
1661
|
+
if (!(props.style == null || typeof props.style === 'object')) {
|
|
1662
|
+
{
|
|
1663
|
+
throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + (ReactDebugCurrentFrame$4.getStackAddendum()));
|
|
1681
1664
|
}
|
|
1682
|
-
}
|
|
1665
|
+
}
|
|
1683
1666
|
}
|
|
1684
1667
|
|
|
1685
1668
|
/**
|
|
@@ -2924,13 +2907,11 @@ var validatedTagCache = {};
|
|
|
2924
2907
|
|
|
2925
2908
|
function validateDangerousTag(tag) {
|
|
2926
2909
|
if (!validatedTagCache.hasOwnProperty(tag)) {
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
throw ReactError(Error("Invalid tag: " + tag));
|
|
2931
|
-
}
|
|
2910
|
+
if (!VALID_TAG_REGEX.test(tag)) {
|
|
2911
|
+
{
|
|
2912
|
+
throw Error("Invalid tag: " + tag);
|
|
2932
2913
|
}
|
|
2933
|
-
}
|
|
2914
|
+
}
|
|
2934
2915
|
|
|
2935
2916
|
validatedTagCache[tag] = true;
|
|
2936
2917
|
}
|
|
@@ -3120,13 +3101,11 @@ function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeSt
|
|
|
3120
3101
|
|
|
3121
3102
|
function validateRenderResult(child, type) {
|
|
3122
3103
|
if (child === undefined) {
|
|
3123
|
-
|
|
3104
|
+
{
|
|
3124
3105
|
{
|
|
3125
|
-
|
|
3126
|
-
throw ReactError(Error((getComponentName(type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null."));
|
|
3127
|
-
}
|
|
3106
|
+
throw Error((getComponentName(type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.");
|
|
3128
3107
|
}
|
|
3129
|
-
}
|
|
3108
|
+
}
|
|
3130
3109
|
}
|
|
3131
3110
|
}
|
|
3132
3111
|
|
|
@@ -3342,13 +3321,11 @@ function resolve(child, context, threadID) {
|
|
|
3342
3321
|
childContext = inst.getChildContext();
|
|
3343
3322
|
|
|
3344
3323
|
for (var contextKey in childContext) {
|
|
3345
|
-
(
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
throw ReactError(Error((getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes."));
|
|
3349
|
-
}
|
|
3324
|
+
if (!(contextKey in _childContextTypes)) {
|
|
3325
|
+
{
|
|
3326
|
+
throw Error((getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes.");
|
|
3350
3327
|
}
|
|
3351
|
-
}
|
|
3328
|
+
}
|
|
3352
3329
|
}
|
|
3353
3330
|
} else {
|
|
3354
3331
|
warningWithoutStack$1(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
|
|
@@ -3481,8 +3458,6 @@ function () {
|
|
|
3481
3458
|
};
|
|
3482
3459
|
|
|
3483
3460
|
_proto.read = function read(bytes) {
|
|
3484
|
-
var _this = this;
|
|
3485
|
-
|
|
3486
3461
|
if (this.exhausted) {
|
|
3487
3462
|
return null;
|
|
3488
3463
|
}
|
|
@@ -3530,13 +3505,11 @@ function () {
|
|
|
3530
3505
|
|
|
3531
3506
|
var fallbackFrame = frame.fallbackFrame;
|
|
3532
3507
|
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
throw ReactError(Error("ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue."));
|
|
3537
|
-
}
|
|
3508
|
+
if (!fallbackFrame) {
|
|
3509
|
+
{
|
|
3510
|
+
throw Error("ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue.");
|
|
3538
3511
|
}
|
|
3539
|
-
}
|
|
3512
|
+
}
|
|
3540
3513
|
|
|
3541
3514
|
this.stack.push(fallbackFrame);
|
|
3542
3515
|
out[this.suspenseDepth] += '<!--$!-->'; // Skip flushing output since we're switching to the fallback
|
|
@@ -3566,23 +3539,19 @@ function () {
|
|
|
3566
3539
|
} catch (err) {
|
|
3567
3540
|
if (err != null && typeof err.then === 'function') {
|
|
3568
3541
|
if (enableSuspenseServerRenderer) {
|
|
3569
|
-
(
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
throw ReactError(Error("A React component suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."));
|
|
3573
|
-
}
|
|
3542
|
+
if (!(this.suspenseDepth > 0)) {
|
|
3543
|
+
{
|
|
3544
|
+
throw Error("A React component suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.");
|
|
3574
3545
|
}
|
|
3575
|
-
}
|
|
3546
|
+
}
|
|
3576
3547
|
|
|
3577
3548
|
suspended = true;
|
|
3578
3549
|
} else {
|
|
3579
|
-
|
|
3550
|
+
{
|
|
3580
3551
|
{
|
|
3581
|
-
|
|
3582
|
-
throw ReactError(Error("ReactDOMServer does not yet support Suspense."));
|
|
3583
|
-
}
|
|
3552
|
+
throw Error("ReactDOMServer does not yet support Suspense.");
|
|
3584
3553
|
}
|
|
3585
|
-
}
|
|
3554
|
+
}
|
|
3586
3555
|
}
|
|
3587
3556
|
} else {
|
|
3588
3557
|
throw err;
|
|
@@ -3640,22 +3609,18 @@ function () {
|
|
|
3640
3609
|
// Catch unexpected special types early.
|
|
3641
3610
|
var $$typeof = nextChild.$$typeof;
|
|
3642
3611
|
|
|
3643
|
-
(
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
throw ReactError(Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."));
|
|
3647
|
-
}
|
|
3612
|
+
if (!($$typeof !== REACT_PORTAL_TYPE)) {
|
|
3613
|
+
{
|
|
3614
|
+
throw Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");
|
|
3648
3615
|
}
|
|
3649
|
-
}
|
|
3616
|
+
} // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type.
|
|
3650
3617
|
|
|
3651
3618
|
|
|
3652
|
-
|
|
3619
|
+
{
|
|
3653
3620
|
{
|
|
3654
|
-
|
|
3655
|
-
throw ReactError(Error("Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue."));
|
|
3656
|
-
}
|
|
3621
|
+
throw Error("Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue.");
|
|
3657
3622
|
}
|
|
3658
|
-
}
|
|
3623
|
+
}
|
|
3659
3624
|
}
|
|
3660
3625
|
|
|
3661
3626
|
var nextChildren = toArray(nextChild);
|
|
@@ -3767,13 +3732,11 @@ function () {
|
|
|
3767
3732
|
this.suspenseDepth++;
|
|
3768
3733
|
return '<!--$-->';
|
|
3769
3734
|
} else {
|
|
3770
|
-
|
|
3735
|
+
{
|
|
3771
3736
|
{
|
|
3772
|
-
|
|
3773
|
-
throw ReactError(Error("ReactDOMServer does not yet support Suspense."));
|
|
3774
|
-
}
|
|
3737
|
+
throw Error("ReactDOMServer does not yet support Suspense.");
|
|
3775
3738
|
}
|
|
3776
|
-
}
|
|
3739
|
+
}
|
|
3777
3740
|
}
|
|
3778
3741
|
}
|
|
3779
3742
|
// eslint-disable-next-line-no-fallthrough
|
|
@@ -3938,13 +3901,11 @@ function () {
|
|
|
3938
3901
|
return open;
|
|
3939
3902
|
}
|
|
3940
3903
|
|
|
3941
|
-
|
|
3904
|
+
{
|
|
3942
3905
|
{
|
|
3943
|
-
|
|
3944
|
-
throw ReactError(Error("ReactDOMServer does not yet support the fundamental API."));
|
|
3945
|
-
}
|
|
3906
|
+
throw Error("ReactDOMServer does not yet support the fundamental API.");
|
|
3946
3907
|
}
|
|
3947
|
-
}
|
|
3908
|
+
}
|
|
3948
3909
|
}
|
|
3949
3910
|
// eslint-disable-next-line-no-fallthrough
|
|
3950
3911
|
|
|
@@ -3985,13 +3946,11 @@ function () {
|
|
|
3985
3946
|
|
|
3986
3947
|
case Pending:
|
|
3987
3948
|
default:
|
|
3988
|
-
|
|
3949
|
+
{
|
|
3989
3950
|
{
|
|
3990
|
-
|
|
3991
|
-
throw ReactError(Error("ReactDOMServer does not yet support lazy-loaded components."));
|
|
3992
|
-
}
|
|
3951
|
+
throw Error("ReactDOMServer does not yet support lazy-loaded components.");
|
|
3993
3952
|
}
|
|
3994
|
-
}
|
|
3953
|
+
}
|
|
3995
3954
|
|
|
3996
3955
|
}
|
|
3997
3956
|
}
|
|
@@ -4019,13 +3978,11 @@ function () {
|
|
|
4019
3978
|
return '';
|
|
4020
3979
|
}
|
|
4021
3980
|
|
|
4022
|
-
|
|
3981
|
+
{
|
|
4023
3982
|
{
|
|
4024
|
-
|
|
4025
|
-
throw ReactError(Error("ReactDOMServer does not yet support scope components."));
|
|
4026
|
-
}
|
|
3983
|
+
throw Error("ReactDOMServer does not yet support scope components.");
|
|
4027
3984
|
}
|
|
4028
|
-
}
|
|
3985
|
+
}
|
|
4029
3986
|
}
|
|
4030
3987
|
}
|
|
4031
3988
|
}
|
|
@@ -4046,13 +4003,11 @@ function () {
|
|
|
4046
4003
|
}
|
|
4047
4004
|
}
|
|
4048
4005
|
|
|
4049
|
-
|
|
4006
|
+
{
|
|
4050
4007
|
{
|
|
4051
|
-
|
|
4052
|
-
throw ReactError(Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (elementType == null ? elementType : typeof elementType) + "." + info));
|
|
4053
|
-
}
|
|
4008
|
+
throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (elementType == null ? elementType : typeof elementType) + "." + info);
|
|
4054
4009
|
}
|
|
4055
|
-
}
|
|
4010
|
+
}
|
|
4056
4011
|
}
|
|
4057
4012
|
};
|
|
4058
4013
|
|
|
@@ -4120,22 +4075,18 @@ function () {
|
|
|
4120
4075
|
warning$1(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
|
|
4121
4076
|
}
|
|
4122
4077
|
|
|
4123
|
-
(
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
throw ReactError(Error("If you supply `defaultValue` on a <textarea>, do not pass children."));
|
|
4127
|
-
}
|
|
4078
|
+
if (!(defaultValue == null)) {
|
|
4079
|
+
{
|
|
4080
|
+
throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");
|
|
4128
4081
|
}
|
|
4129
|
-
}
|
|
4082
|
+
}
|
|
4130
4083
|
|
|
4131
4084
|
if (Array.isArray(textareaChildren)) {
|
|
4132
|
-
(
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
throw ReactError(Error("<textarea> can only have at most one child."));
|
|
4136
|
-
}
|
|
4085
|
+
if (!(textareaChildren.length <= 1)) {
|
|
4086
|
+
{
|
|
4087
|
+
throw Error("<textarea> can only have at most one child.");
|
|
4137
4088
|
}
|
|
4138
|
-
}
|
|
4089
|
+
}
|
|
4139
4090
|
|
|
4140
4091
|
textareaChildren = textareaChildren[0];
|
|
4141
4092
|
}
|