react-dom 16.4.0-alpha.0911da3 → 16.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /** @license React v16.4.0-alpha.0911da3
1
+ /** @license React v16.4.1
2
2
  * react-dom-server.node.production.min.js
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -7,37 +7,37 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
 
10
- 'use strict';var q=require("object-assign"),r=require("react"),t=require("fbjs/lib/emptyFunction"),w=require("fbjs/lib/emptyObject"),y=require("fbjs/lib/hyphenateStyleName"),A=require("fbjs/lib/memoizeStringOnly"),aa=require("stream");
11
- function B(a){for(var b=arguments.length-1,e="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,c=0;c<b;c++)e+="\x26args[]\x3d"+encodeURIComponent(arguments[c+1]);b=Error(e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");b.name="Invariant Violation";b.framesToPop=1;throw b;}
12
- var C="function"===typeof Symbol&&Symbol["for"],ba=C?Symbol["for"]("react.call"):60104,ca=C?Symbol["for"]("react.return"):60105,da=C?Symbol["for"]("react.portal"):60106,D=C?Symbol["for"]("react.fragment"):60107,ea=C?Symbol["for"]("react.strict_mode"):60108,E=C?Symbol["for"]("react.provider"):60109,fa=C?Symbol["for"]("react.context"):60110,ha=C?Symbol["for"]("react.async_mode"):60111,ia=/^[: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]*$/,
13
- F={},G={};function ja(a){if(G.hasOwnProperty(a))return!0;if(F.hasOwnProperty(a))return!1;if(ia.test(a))return G[a]=!0;F[a]=!0;return!1}function ka(a,b,e,c){if(null!==e&&0===e.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(c)return!1;if(null!==e)return!e.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
14
- function la(a,b,e,c){if(null===b||"undefined"===typeof b||ka(a,b,e,c))return!0;if(null!==e)switch(e.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 H(a,b,e,c,k){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=c;this.attributeNamespace=k;this.mustUseProperty=e;this.propertyName=a;this.type=b}var I={};
15
- "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){I[a]=new H(a,0,!1,a,null)});(new Map([["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]])).forEach(function(a,b){I[b]=new H(b,1,!1,a,null)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){I[a]=new H(a,2,!1,a.toLowerCase(),null)});
10
+ 'use strict';var p=require("object-assign"),r=require("fbjs/lib/invariant"),u=require("react"),w=require("fbjs/lib/emptyFunction"),x=require("fbjs/lib/emptyObject"),y=require("fbjs/lib/hyphenateStyleName"),aa=require("fbjs/lib/memoizeStringOnly"),ba=require("stream");
11
+ function z(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]);r(!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)}
12
+ var A="function"===typeof Symbol&&Symbol.for,ca=A?Symbol.for("react.portal"):60106,C=A?Symbol.for("react.fragment"):60107,da=A?Symbol.for("react.strict_mode"):60108,ea=A?Symbol.for("react.profiler"):60114,E=A?Symbol.for("react.provider"):60109,fa=A?Symbol.for("react.context"):60110,ha=A?Symbol.for("react.async_mode"):60111,ia=A?Symbol.for("react.forward_ref"):60112,ja=/^[: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]*$/,
13
+ F={},G={};function ka(a){if(G.hasOwnProperty(a))return!0;if(F.hasOwnProperty(a))return!1;if(ja.test(a))return G[a]=!0;F[a]=!0;return!1}function la(a,b,d,c){if(null!==d&&0===d.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(c)return!1;if(null!==d)return!d.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
14
+ function ma(a,b,d,c){if(null===b||"undefined"===typeof b||la(a,b,d,c))return!0;if(c)return!1;if(null!==d)switch(d.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 H(a,b,d,c,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=c;this.attributeNamespace=g;this.mustUseProperty=d;this.propertyName=a;this.type=b}var I={};
15
+ "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){I[a]=new H(a,0,!1,a,null)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];I[b]=new H(b,1,!1,a[1],null)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){I[a]=new H(a,2,!1,a.toLowerCase(),null)});
16
16
  ["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(a){I[a]=new H(a,2,!1,a,null)});"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){I[a]=new H(a,3,!1,a.toLowerCase(),null)});["checked","multiple","muted","selected"].forEach(function(a){I[a]=new H(a,3,!0,a.toLowerCase(),null)});
17
- ["capture","download"].forEach(function(a){I[a]=new H(a,4,!1,a.toLowerCase(),null)});["cols","rows","size","span"].forEach(function(a){I[a]=new H(a,6,!1,a.toLowerCase(),null)});["rowSpan","start"].forEach(function(a){I[a]=new H(a,5,!1,a.toLowerCase(),null)});var J=/[\-\:]([a-z])/g;function K(a){return a[1].toUpperCase()}
17
+ ["capture","download"].forEach(function(a){I[a]=new H(a,4,!1,a.toLowerCase(),null)});["cols","rows","size","span"].forEach(function(a){I[a]=new H(a,6,!1,a.toLowerCase(),null)});["rowSpan","start"].forEach(function(a){I[a]=new H(a,5,!1,a.toLowerCase(),null)});var J=/[\-:]([a-z])/g;function K(a){return a[1].toUpperCase()}
18
18
  "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(J,
19
- K);I[b]=new H(b,1,!1,a,null)});"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(J,K);I[b]=new H(b,1,!1,a,"http://www.w3.org/1999/xlink")});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(J,K);I[b]=new H(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")});I.tabIndex=new H("tabIndex",1,!1,"tabindex",null);var ma=/["'&<>]/;
20
- function L(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=ma.exec(a);if(b){var e="",c,k=0;for(c=b.index;c<a.length;c++){switch(a.charCodeAt(c)){case 34:b="\x26quot;";break;case 38:b="\x26amp;";break;case 39:b="\x26#x27;";break;case 60:b="\x26lt;";break;case 62:b="\x26gt;";break;default:continue}k!==c&&(e+=a.substring(k,c));k=c+1;e+=b}a=k!==c?e+a.substring(k,c):e}return a}var M={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
19
+ K);I[b]=new H(b,1,!1,a,null)});"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(J,K);I[b]=new H(b,1,!1,a,"http://www.w3.org/1999/xlink")});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(J,K);I[b]=new H(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")});I.tabIndex=new H("tabIndex",1,!1,"tabindex",null);var na=/["'&<>]/;
20
+ function L(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=na.exec(a);if(b){var d="",c,g=0;for(c=b.index;c<a.length;c++){switch(a.charCodeAt(c)){case 34:b="&quot;";break;case 38:b="&amp;";break;case 39:b="&#x27;";break;case 60:b="&lt;";break;case 62:b="&gt;";break;default:continue}g!==c&&(d+=a.substring(g,c));g=c+1;d+=b}a=g!==c?d+a.substring(g,c):d}return a}var M={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
21
21
  function N(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"}}
22
- var O={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},na=q({menuitem:!0},O),P={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,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,
23
- 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},oa=["Webkit","ms","Moz","O"];Object.keys(P).forEach(function(a){oa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);P[b]=P[a]})});var Q=r.Children.toArray,R=t.thatReturns("");t.thatReturns("");var pa={listing:!0,pre:!0,textarea:!0};
24
- function S(a){return"string"===typeof a?a:"function"===typeof a?a.displayName||a.name:null}var qa=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,T={},ra=A(function(a){return y(a)});function sa(a){var b="";r.Children.forEach(a,function(a){null==a||"string"!==typeof a&&"number"!==typeof a||(b+=a)});return b}function ta(a,b){if(a=a.contextTypes){var e={},c;for(c in a)e[c]=b[c];b=e}else b=w;return b}var ua={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};
25
- function U(a,b){void 0===a&&B("152",S(b)||"Component")}
26
- function va(a,b){for(var e=void 0,c=void 0,k=void 0,d=void 0,f=void 0,g=void 0,p=void 0,l=p=p=void 0,h=void 0,n=void 0,z=l=l=void 0,x=e=void 0;r.isValidElement(a);){e=a;c=e.type;if("function"!==typeof c)break;k=ta(c,b);f=[];g=!1;p={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===f)return null},enqueueReplaceState:function(a,b){g=!0;f=[b]},enqueueSetState:function(a,b){if(null===f)return null;f.push(b)}};if(c.prototype&&c.prototype.isReactComponent)d=new c(e.props,k,p),"function"===
27
- typeof c.getDerivedStateFromProps&&(l=c.getDerivedStateFromProps.call(null,e.props,d.state),null!=l&&(d.state=q({},d.state,l)));else if(d=c(e.props,k,p),null==d||null==d.render){a=d;U(a,c);continue}d.props=e.props;d.context=k;d.updater=p;p=d.state;void 0===p&&(d.state=p=null);if("function"===typeof d.UNSAFE_componentWillMount||"function"===typeof d.componentWillMount)if("function"===typeof d.componentWillMount&&"function"!==typeof c.getDerivedStateFromProps&&d.componentWillMount(),"function"===typeof d.UNSAFE_componentWillMount&&
28
- "function"!==typeof c.getDerivedStateFromProps&&d.UNSAFE_componentWillMount(),f.length)if(p=f,l=g,f=null,g=!1,l&&1===p.length)d.state=p[0];else{h=l?p[0]:d.state;n=!0;for(a=l?1:0;a<p.length;a++)l=p[a],l="function"===typeof l?l.call(d,h,e.props,k):l,null!=l&&(n?(n=!1,h=q({},h,l)):q(h,l));d.state=h}else f=null;a=d.render();U(a,c);if("function"===typeof d.getChildContext&&(e=c.childContextTypes,"object"===typeof e))for(x in z=d.getChildContext(),z)x in e?void 0:B("108",S(c)||"Unknown",x);z&&(b=q({},b,
29
- z))}return{child:a,context:b}}
30
- var V=function(){function a(b,e){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");r.isValidElement(b)?b.type!==D?b=[b]:(b=b.props.children,b=r.isValidElement(b)?[b]:Q(b)):b=Q(b);this.stack=[{type:null,domNamespace:M.html,children:b,childIndex:0,context:w,footer:""}];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;this.makeStaticMarkup=e;this.providerStack=[];this.providerIndex=-1}a.prototype.pushProvider=function(a){this.providerIndex+=1;
31
- this.providerStack[this.providerIndex]=a;a.type.context.currentValue=a.props.value};a.prototype.popProvider=function(a){this.providerStack[this.providerIndex]=null;--this.providerIndex;a=a.type.context;a.currentValue=0>this.providerIndex?a.defaultValue:this.providerStack[this.providerIndex].props.value};a.prototype.read=function(a){if(this.exhausted)return null;for(var b="";b.length<a;){if(0===this.stack.length){this.exhausted=!0;break}var c=this.stack[this.stack.length-1];if(c.childIndex>=c.children.length){var k=
32
- c.footer;b+=k;""!==k&&(this.previousWasTextNode=!1);this.stack.pop();"select"===c.type?this.currentSelectValue=null:null!=c.type&&null!=c.type.type&&c.type.type.$$typeof===E&&this.popProvider(c.type)}else k=c.children[c.childIndex++],b+=this.render(k,c.context,c.domNamespace)}return b};a.prototype.render=function(a,e,c){if("string"===typeof a||"number"===typeof a){c=""+a;if(""===c)return"";if(this.makeStaticMarkup)return L(c);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+L(c);this.previousWasTextNode=
33
- !0;return L(c)}e=va(a,e);a=e.child;e=e.context;if(null===a||!1===a)return"";if(!r.isValidElement(a)){if(null!=a&&null!=a.$$typeof){var b=a.$$typeof;b===da?B("257"):void 0;B("258",b.toString())}a=Q(a);this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:e,footer:""});return""}b=a.type;if("string"===typeof b)return this.renderDOM(a,e,c);switch(b){case ea:case ha:case D:return a=Q(a.props.children),this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:e,footer:""}),
34
- "";case ba:case ca:B("259")}if("object"===typeof b&&null!==b)switch(b.$$typeof){case E:return b=Q(a.props.children),c={type:a,domNamespace:c,children:b,childIndex:0,context:e,footer:""},this.pushProvider(a),this.stack.push(c),"";case fa:return b=Q(a.props.children(a.type.currentValue)),this.stack.push({type:a,domNamespace:c,children:b,childIndex:0,context:e,footer:""}),""}B("130",null==b?b:typeof b,"")};a.prototype.renderDOM=function(a,e,c){var b=a.type.toLowerCase();c===M.html&&N(b);T.hasOwnProperty(b)||
35
- (qa.test(b)?void 0:B("65",b),T[b]=!0);var d=a.props;if("input"===b)d=q({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"===b){var f=d.value;if(null==f){f=d.defaultValue;var g=d.children;null!=g&&(null!=f?B("92"):void 0,Array.isArray(g)&&(1>=g.length?void 0:B("93"),g=g[0]),f=""+g);null==f&&(f="")}d=q({},d,{value:void 0,children:""+f})}else if("select"===b)this.currentSelectValue=
36
- null!=d.value?d.value:d.defaultValue,d=q({},d,{value:void 0});else if("option"===b){g=this.currentSelectValue;var p=sa(d.children);if(null!=g){var l=null!=d.value?d.value+"":p;f=!1;if(Array.isArray(g))for(var h=0;h<g.length;h++){if(""+g[h]===l){f=!0;break}}else f=""+g===l;d=q({selected:void 0,children:void 0},d,{selected:f,children:p})}}if(f=d)na[b]&&(null!=f.children||null!=f.dangerouslySetInnerHTML?B("137",b,R()):void 0),null!=f.dangerouslySetInnerHTML&&(null!=f.children?B("60"):void 0,"object"===
37
- typeof f.dangerouslySetInnerHTML&&"__html"in f.dangerouslySetInnerHTML?void 0:B("61")),null!=f.style&&"object"!==typeof f.style?B("62",R()):void 0;f=d;g=this.makeStaticMarkup;p=1===this.stack.length;l="\x3c"+a.type;for(v in f)if(f.hasOwnProperty(v)){var n=f[v];if(null!=n){if("style"===v){h=void 0;var z="",x="";for(h in n)if(n.hasOwnProperty(h)){var m=0===h.indexOf("--"),u=n[h];null!=u&&(z+=x+ra(h)+":",x=h,m=null==u||"boolean"===typeof u||""===u?"":m||"number"!==typeof u||0===u||P.hasOwnProperty(x)&&
38
- P[x]?(""+u).trim():u+"px",z+=m,x=";")}n=z||null}h=null;b:if(m=b,u=f,-1===m.indexOf("-"))m="string"===typeof u.is;else switch(m){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":m=!1;break b;default:m=!0}if(m)ua.hasOwnProperty(v)||(h=v,h=ja(h)&&null!=n?h+"\x3d"+('"'+L(n)+'"'):"");else{m=v;h=n;n=I.hasOwnProperty(m)?I[m]:null;if(u="style"!==m)u=null!==n?0===n.type:!(2<m.length)||"o"!==
39
- m[0]&&"O"!==m[0]||"n"!==m[1]&&"N"!==m[1]?!1:!0;u||la(m,h,n,!1)?h="":null!==n?(m=n.attributeName,n=n.type,h=3===n||4===n&&!0===h?m+'\x3d""':m+"\x3d"+('"'+L(h)+'"')):h=m+"\x3d"+('"'+L(h)+'"')}h&&(l+=" "+h)}}g||p&&(l+=' data-reactroot\x3d""');var v=l;f="";O.hasOwnProperty(b)?v+="/\x3e":(v+="\x3e",f="\x3c/"+a.type+"\x3e");a:{g=d.dangerouslySetInnerHTML;if(null!=g){if(null!=g.__html){g=g.__html;break a}}else if(g=d.children,"string"===typeof g||"number"===typeof g){g=L(g);break a}g=null}null!=g?(d=[],
40
- pa[b]&&"\n"===g.charAt(0)&&(v+="\n"),v+=g):d=Q(d.children);a=a.type;c=null==c||"http://www.w3.org/1999/xhtml"===c?N(a):"http://www.w3.org/2000/svg"===c&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":c;this.stack.push({domNamespace:c,type:b,children:d,childIndex:0,context:e,footer:f});this.previousWasTextNode=!1;return v};return a}();
41
- function wa(a,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}
42
- var W=function(a){function b(e,c){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");var k=a.call(this,{});if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");k=!k||"object"!==typeof k&&"function"!==typeof k?this:k;k.partialRenderer=new V(e,c);return k}wa(b,a);b.prototype._read=function(a){try{this.push(this.partialRenderer.read(a))}catch(c){this.emit("error",c)}};return b}(aa.Readable),X={renderToString:function(a){return(new V(a,
43
- !1)).read(Infinity)},renderToStaticMarkup:function(a){return(new V(a,!0)).read(Infinity)},renderToNodeStream:function(a){return new W(a,!1)},renderToStaticNodeStream:function(a){return new W(a,!0)},version:"16.4.0-alpha.0911da3"},Y=Object.freeze({default:X}),Z=Y&&X||Y;module.exports=Z["default"]?Z["default"]:Z;
22
+ var O={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},oa=p({menuitem:!0},O),P={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,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,
23
+ 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},pa=["Webkit","ms","Moz","O"];Object.keys(P).forEach(function(a){pa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);P[b]=P[a]})});var Q=u.Children.toArray,R=w.thatReturns("");w.thatReturns("");var qa={listing:!0,pre:!0,textarea:!0};
24
+ function S(a){return"string"===typeof a?a:"function"===typeof a?a.displayName||a.name:null}var ra=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,T={},sa=aa(function(a){return y(a)});function ta(a){var b="";u.Children.forEach(a,function(a){null==a||"string"!==typeof a&&"number"!==typeof a||(b+=a)});return b}function ua(a,b){if(a=a.contextTypes){var d={},c;for(c in a)d[c]=b[c];b=d}else b=x;return b}var va={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};
25
+ function U(a,b){void 0===a&&z("152",S(b)||"Component")}
26
+ function wa(a,b){function d(c,g){var d=ua(g,b),f=[],k=!1,h={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===f)return null},enqueueReplaceState:function(a,b){k=!0;f=[b]},enqueueSetState:function(a,b){if(null===f)return null;f.push(b)}},e=void 0;if(g.prototype&&g.prototype.isReactComponent){if(e=new g(c.props,d,h),"function"===typeof g.getDerivedStateFromProps){var v=g.getDerivedStateFromProps.call(null,c.props,e.state);null!=v&&(e.state=p({},e.state,v))}}else if(e=g(c.props,
27
+ d,h),null==e||null==e.render){a=e;U(a,g);return}e.props=c.props;e.context=d;e.updater=h;h=e.state;void 0===h&&(e.state=h=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(),f.length){h=f;var t=k;f=null;k=!1;if(t&&
28
+ 1===h.length)e.state=h[0];else{v=t?h[0]:e.state;var m=!0;for(t=t?1:0;t<h.length;t++){var n=h[t];n="function"===typeof n?n.call(e,v,c.props,d):n;null!=n&&(m?(m=!1,v=p({},v,n)):p(v,n))}e.state=v}}else f=null;a=e.render();U(a,g);c=void 0;if("function"===typeof e.getChildContext&&(d=g.childContextTypes,"object"===typeof d)){c=e.getChildContext();for(var q in c)q in d?void 0:z("108",S(g)||"Unknown",q)}c&&(b=p({},b,c))}for(;u.isValidElement(a);){var c=a,g=c.type;if("function"!==typeof g)break;d(c,g)}return{child:a,
29
+ context:b}}
30
+ var V=function(){function a(b,d){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");u.isValidElement(b)?b.type!==C?b=[b]:(b=b.props.children,b=u.isValidElement(b)?[b]:Q(b)):b=Q(b);this.stack=[{type:null,domNamespace:M.html,children:b,childIndex:0,context:x,footer:""}];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;this.makeStaticMarkup=d;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[]}a.prototype.pushProvider=function(b){var a=
31
+ ++this.contextIndex,c=b.type._context,g=c._currentValue;this.contextStack[a]=c;this.contextValueStack[a]=g;c._currentValue=b.props.value};a.prototype.popProvider=function(){var a=this.contextIndex,d=this.contextStack[a],c=this.contextValueStack[a];this.contextStack[a]=null;this.contextValueStack[a]=null;this.contextIndex--;d._currentValue=c};a.prototype.read=function(a){if(this.exhausted)return null;for(var b="";b.length<a;){if(0===this.stack.length){this.exhausted=!0;break}var c=this.stack[this.stack.length-
32
+ 1];if(c.childIndex>=c.children.length){var g=c.footer;b+=g;""!==g&&(this.previousWasTextNode=!1);this.stack.pop();"select"===c.type?this.currentSelectValue=null:null!=c.type&&null!=c.type.type&&c.type.type.$$typeof===E&&this.popProvider(c.type)}else g=c.children[c.childIndex++],b+=this.render(g,c.context,c.domNamespace)}return b};a.prototype.render=function(a,d,c){if("string"===typeof a||"number"===typeof a){c=""+a;if(""===c)return"";if(this.makeStaticMarkup)return L(c);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+
33
+ L(c);this.previousWasTextNode=!0;return L(c)}d=wa(a,d);a=d.child;d=d.context;if(null===a||!1===a)return"";if(!u.isValidElement(a)){if(null!=a&&null!=a.$$typeof){var b=a.$$typeof;b===ca?z("257"):void 0;z("258",b.toString())}a=Q(a);this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:d,footer:""});return""}b=a.type;if("string"===typeof b)return this.renderDOM(a,d,c);switch(b){case da:case ha:case ea:case C:return a=Q(a.props.children),this.stack.push({type:null,domNamespace:c,children:a,
34
+ childIndex:0,context:d,footer:""}),""}if("object"===typeof b&&null!==b)switch(b.$$typeof){case ia:return a=Q(b.render(a.props,a.ref)),this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:d,footer:""}),"";case E:return b=Q(a.props.children),c={type:a,domNamespace:c,children:b,childIndex:0,context:d,footer:""},this.pushProvider(a),this.stack.push(c),"";case fa:return b=Q(a.props.children(a.type._currentValue)),this.stack.push({type:a,domNamespace:c,children:b,childIndex:0,context:d,
35
+ footer:""}),""}z("130",null==b?b:typeof b,"")};a.prototype.renderDOM=function(a,d,c){var b=a.type.toLowerCase();c===M.html&&N(b);T.hasOwnProperty(b)||(ra.test(b)?void 0:z("65",b),T[b]=!0);var f=a.props;if("input"===b)f=p({type:void 0},f,{defaultChecked:void 0,defaultValue:void 0,value:null!=f.value?f.value:f.defaultValue,checked:null!=f.checked?f.checked:f.defaultChecked});else if("textarea"===b){var k=f.value;if(null==k){k=f.defaultValue;var l=f.children;null!=l&&(null!=k?z("92"):void 0,Array.isArray(l)&&
36
+ (1>=l.length?void 0:z("93"),l=l[0]),k=""+l);null==k&&(k="")}f=p({},f,{value:void 0,children:""+k})}else if("select"===b)this.currentSelectValue=null!=f.value?f.value:f.defaultValue,f=p({},f,{value:void 0});else if("option"===b){l=this.currentSelectValue;var D=ta(f.children);if(null!=l){var B=null!=f.value?f.value+"":D;k=!1;if(Array.isArray(l))for(var h=0;h<l.length;h++){if(""+l[h]===B){k=!0;break}}else k=""+l===B;f=p({selected:void 0,children:void 0},f,{selected:k,children:D})}}if(k=f)oa[b]&&(null!=
37
+ k.children||null!=k.dangerouslySetInnerHTML?z("137",b,R()):void 0),null!=k.dangerouslySetInnerHTML&&(null!=k.children?z("60"):void 0,"object"===typeof k.dangerouslySetInnerHTML&&"__html"in k.dangerouslySetInnerHTML?void 0:z("61")),null!=k.style&&"object"!==typeof k.style?z("62",R()):void 0;k=f;l=this.makeStaticMarkup;D=1===this.stack.length;B="<"+a.type;for(q in k)if(k.hasOwnProperty(q)){var e=k[q];if(null!=e){if("style"===q){h=void 0;var v="",t="";for(h in e)if(e.hasOwnProperty(h)){var m=0===h.indexOf("--"),
38
+ n=e[h];null!=n&&(v+=t+sa(h)+":",t=h,m=null==n||"boolean"===typeof n||""===n?"":m||"number"!==typeof n||0===n||P.hasOwnProperty(t)&&P[t]?(""+n).trim():n+"px",v+=m,t=";")}e=v||null}h=null;b:if(m=b,n=k,-1===m.indexOf("-"))m="string"===typeof n.is;else switch(m){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":m=!1;break b;default:m=!0}if(m)va.hasOwnProperty(q)||(h=q,h=ka(h)&&null!=
39
+ e?h+"="+('"'+L(e)+'"'):"");else{m=q;h=e;e=I.hasOwnProperty(m)?I[m]:null;if(n="style"!==m)n=null!==e?0===e.type:!(2<m.length)||"o"!==m[0]&&"O"!==m[0]||"n"!==m[1]&&"N"!==m[1]?!1:!0;n||ma(m,h,e,!1)?h="":null!==e?(m=e.attributeName,e=e.type,h=3===e||4===e&&!0===h?m+'=""':m+"="+('"'+L(h)+'"')):h=m+"="+('"'+L(h)+'"')}h&&(B+=" "+h)}}l||D&&(B+=' data-reactroot=""');var q=B;k="";O.hasOwnProperty(b)?q+="/>":(q+=">",k="</"+a.type+">");a:{l=f.dangerouslySetInnerHTML;if(null!=l){if(null!=l.__html){l=l.__html;
40
+ break a}}else if(l=f.children,"string"===typeof l||"number"===typeof l){l=L(l);break a}l=null}null!=l?(f=[],qa[b]&&"\n"===l.charAt(0)&&(q+="\n"),q+=l):f=Q(f.children);a=a.type;c=null==c||"http://www.w3.org/1999/xhtml"===c?N(a):"http://www.w3.org/2000/svg"===c&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":c;this.stack.push({domNamespace:c,type:b,children:f,childIndex:0,context:d,footer:k});this.previousWasTextNode=!1;return q};return a}();
41
+ function xa(a,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}
42
+ var W=function(a){function b(d,c){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");var g=a.call(this,{});if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");g=!g||"object"!==typeof g&&"function"!==typeof g?this:g;g.partialRenderer=new V(d,c);return g}xa(b,a);b.prototype._read=function(a){try{this.push(this.partialRenderer.read(a))}catch(c){this.emit("error",c)}};return b}(ba.Readable),X={renderToString:function(a){return(new V(a,
43
+ !1)).read(Infinity)},renderToStaticMarkup:function(a){return(new V(a,!0)).read(Infinity)},renderToNodeStream:function(a){return new W(a,!1)},renderToStaticNodeStream:function(a){return new W(a,!0)},version:"16.4.1"},Y={default:X},Z=Y&&X||Y;module.exports=Z.default?Z.default:Z;
@@ -1,4 +1,4 @@
1
- /** @license React v16.4.0-alpha.0911da3
1
+ /** @license React v16.4.1
2
2
  * react-dom-test-utils.development.js
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -16,19 +16,15 @@ if (process.env.NODE_ENV !== "production") {
16
16
  'use strict';
17
17
 
18
18
  var _assign = require('object-assign');
19
+ var invariant = require('fbjs/lib/invariant');
19
20
  var React = require('react');
20
21
  var ReactDOM = require('react-dom');
21
- var invariant = require('fbjs/lib/invariant');
22
22
  var warning = require('fbjs/lib/warning');
23
23
  var emptyFunction = require('fbjs/lib/emptyFunction');
24
24
  var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
25
25
 
26
- /**
27
- * WARNING: DO NOT manually require this module.
28
- * This is a replacement for `invariant(...)` used by the error code system
29
- * and will _only_ be required by the corresponding babel pass.
30
- * It always throws.
31
- */
26
+ // Relying on the `invariant()` implementation lets us
27
+ // have preserve the format and params in the www builds.
32
28
 
33
29
  /**
34
30
  * `ReactInstanceMap` maintains a mapping from a public facing stateful
@@ -96,15 +92,15 @@ function isFiberMountedImpl(fiber) {
96
92
  if ((node.effectTag & Placement) !== NoEffect) {
97
93
  return MOUNTING;
98
94
  }
99
- while (node['return']) {
100
- node = node['return'];
95
+ while (node.return) {
96
+ node = node.return;
101
97
  if ((node.effectTag & Placement) !== NoEffect) {
102
98
  return MOUNTING;
103
99
  }
104
100
  }
105
101
  } else {
106
- while (node['return']) {
107
- node = node['return'];
102
+ while (node.return) {
103
+ node = node.return;
108
104
  }
109
105
  }
110
106
  if (node.tag === HostRoot) {
@@ -142,7 +138,7 @@ function findCurrentFiberUsingSlowPath(fiber) {
142
138
  var a = fiber;
143
139
  var b = alternate;
144
140
  while (true) {
145
- var parentA = a['return'];
141
+ var parentA = a.return;
146
142
  var parentB = parentA ? parentA.alternate : null;
147
143
  if (!parentA || !parentB) {
148
144
  // We're at the root.
@@ -172,7 +168,7 @@ function findCurrentFiberUsingSlowPath(fiber) {
172
168
  invariant(false, 'Unable to find node on an unmounted component.');
173
169
  }
174
170
 
175
- if (a['return'] !== b['return']) {
171
+ if (a.return !== b.return) {
176
172
  // The return pointer of A and the return pointer of B point to different
177
173
  // fibers. We assume that return pointers never criss-cross, so A must
178
174
  // belong to the child set of A.return, and B must belong to the child
@@ -441,7 +437,7 @@ SyntheticEvent.extend = function (Interface) {
441
437
  return new Proxy(constructor.apply(that, args), {
442
438
  set: function (target, prop, value) {
443
439
  if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
444
- warning(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.');
440
+ !(didWarnForAddedNewProperty || target.isPersistent()) ? warning(false, "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
445
441
  didWarnForAddedNewProperty = true;
446
442
  }
447
443
  target[prop] = value;
@@ -486,7 +482,7 @@ function getPooledWarningPropertyDefinition(propName, getVal) {
486
482
 
487
483
  function warn(action, result) {
488
484
  var warningCondition = false;
489
- warning(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result);
485
+ !warningCondition ? warning(false, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
490
486
  }
491
487
  }
492
488
 
@@ -517,6 +513,14 @@ function addEventPoolingTo(EventConstructor) {
517
513
 
518
514
  var SyntheticEvent$1 = SyntheticEvent;
519
515
 
516
+ // Do not uses the below two methods directly!
517
+ // Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.
518
+ // (It is the only module that is allowed to access these methods.)
519
+
520
+ function unsafeCastStringToDOMTopLevelType(topLevelType) {
521
+ return topLevelType;
522
+ }
523
+
520
524
  /**
521
525
  * Generate a mapping of standard vendor prefixes using the defined style property and event name.
522
526
  *
@@ -603,91 +607,97 @@ function getVendorPrefixedEventName(eventName) {
603
607
  }
604
608
 
605
609
  /**
606
- * Types of raw signals from the browser caught at the top level.
607
- *
608
- * For events like 'submit' or audio/video events which don't consistently
609
- * bubble (which we trap at a lower node than `document`), binding
610
- * at `document` would cause duplicate events so we don't include them here.
610
+ * To identify top level events in ReactDOM, we use constants defined by this
611
+ * module. This is the only module that uses the unsafe* methods to express
612
+ * that the constants actually correspond to the browser event names. This lets
613
+ * us save some bundle size by avoiding a top level type -> event name map.
614
+ * The rest of ReactDOM code should import top level types from this file.
611
615
  */
612
- var topLevelTypes = {
613
- topAnimationEnd: getVendorPrefixedEventName('animationend'),
614
- topAnimationIteration: getVendorPrefixedEventName('animationiteration'),
615
- topAnimationStart: getVendorPrefixedEventName('animationstart'),
616
- topBlur: 'blur',
617
- topCancel: 'cancel',
618
- topChange: 'change',
619
- topClick: 'click',
620
- topClose: 'close',
621
- topCompositionEnd: 'compositionend',
622
- topCompositionStart: 'compositionstart',
623
- topCompositionUpdate: 'compositionupdate',
624
- topContextMenu: 'contextmenu',
625
- topCopy: 'copy',
626
- topCut: 'cut',
627
- topDoubleClick: 'dblclick',
628
- topDrag: 'drag',
629
- topDragEnd: 'dragend',
630
- topDragEnter: 'dragenter',
631
- topDragExit: 'dragexit',
632
- topDragLeave: 'dragleave',
633
- topDragOver: 'dragover',
634
- topDragStart: 'dragstart',
635
- topDrop: 'drop',
636
- topFocus: 'focus',
637
- topInput: 'input',
638
- topKeyDown: 'keydown',
639
- topKeyPress: 'keypress',
640
- topKeyUp: 'keyup',
641
- topLoad: 'load',
642
- topLoadStart: 'loadstart',
643
- topMouseDown: 'mousedown',
644
- topMouseMove: 'mousemove',
645
- topMouseOut: 'mouseout',
646
- topMouseOver: 'mouseover',
647
- topMouseUp: 'mouseup',
648
- topPaste: 'paste',
649
- topScroll: 'scroll',
650
- topSelectionChange: 'selectionchange',
651
- topTextInput: 'textInput',
652
- topToggle: 'toggle',
653
- topTouchCancel: 'touchcancel',
654
- topTouchEnd: 'touchend',
655
- topTouchMove: 'touchmove',
656
- topTouchStart: 'touchstart',
657
- topTransitionEnd: getVendorPrefixedEventName('transitionend'),
658
- topWheel: 'wheel'
659
- };
660
-
661
- // There are so many media events, it makes sense to just
662
- // maintain a list of them. Note these aren't technically
663
- // "top-level" since they don't bubble. We should come up
664
- // with a better naming convention if we come to refactoring
665
- // the event system.
666
- var mediaEventTypes = {
667
- topAbort: 'abort',
668
- topCanPlay: 'canplay',
669
- topCanPlayThrough: 'canplaythrough',
670
- topDurationChange: 'durationchange',
671
- topEmptied: 'emptied',
672
- topEncrypted: 'encrypted',
673
- topEnded: 'ended',
674
- topError: 'error',
675
- topLoadedData: 'loadeddata',
676
- topLoadedMetadata: 'loadedmetadata',
677
- topLoadStart: 'loadstart',
678
- topPause: 'pause',
679
- topPlay: 'play',
680
- topPlaying: 'playing',
681
- topProgress: 'progress',
682
- topRateChange: 'ratechange',
683
- topSeeked: 'seeked',
684
- topSeeking: 'seeking',
685
- topStalled: 'stalled',
686
- topSuspend: 'suspend',
687
- topTimeUpdate: 'timeupdate',
688
- topVolumeChange: 'volumechange',
689
- topWaiting: 'waiting'
690
- };
616
+ var TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort');
617
+ var TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationend'));
618
+ var TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationiteration'));
619
+ var TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationstart'));
620
+ var TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur');
621
+ var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay');
622
+ var TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough');
623
+ var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel');
624
+ var TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change');
625
+ var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click');
626
+ var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close');
627
+ var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend');
628
+ var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart');
629
+ var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate');
630
+ var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu');
631
+ var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy');
632
+ var TOP_CUT = unsafeCastStringToDOMTopLevelType('cut');
633
+ var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick');
634
+ var TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag');
635
+ var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend');
636
+ var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter');
637
+ var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit');
638
+ var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave');
639
+ var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover');
640
+ var TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart');
641
+ var TOP_DROP = unsafeCastStringToDOMTopLevelType('drop');
642
+ var TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange');
643
+ var TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied');
644
+ var TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted');
645
+ var TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended');
646
+ var TOP_ERROR = unsafeCastStringToDOMTopLevelType('error');
647
+ var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus');
648
+
649
+ var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input');
650
+
651
+ var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown');
652
+ var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress');
653
+ var TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup');
654
+ var TOP_LOAD = unsafeCastStringToDOMTopLevelType('load');
655
+ var TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart');
656
+ var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata');
657
+ var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata');
658
+
659
+ var TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown');
660
+ var TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove');
661
+ var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout');
662
+ var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover');
663
+ var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup');
664
+ var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste');
665
+ var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause');
666
+ var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play');
667
+ var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing');
668
+
669
+
670
+
671
+
672
+
673
+
674
+
675
+
676
+ var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress');
677
+ var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange');
678
+
679
+ var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll');
680
+ var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked');
681
+ var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking');
682
+ var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange');
683
+ var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled');
684
+
685
+ var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend');
686
+ var TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput');
687
+ var TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate');
688
+ var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle');
689
+ var TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel');
690
+ var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend');
691
+ var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove');
692
+ var TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart');
693
+ var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend'));
694
+ var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange');
695
+ var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting');
696
+ var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel');
697
+
698
+ // List of events that need to be individually attached to media elements.
699
+ // Note that events in this list will *not* be listened to at the top level
700
+ // unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`.
691
701
 
692
702
  var findDOMNode = ReactDOM.findDOMNode;
693
703
  var _ReactDOM$__SECRET_IN = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
@@ -705,6 +715,29 @@ function Event(suffix) {}
705
715
  * @class ReactTestUtils
706
716
  */
707
717
 
718
+ /**
719
+ * Simulates a top level event being dispatched from a raw event that occurred
720
+ * on an `Element` node.
721
+ * @param {number} topLevelType A number from `TopLevelEventTypes`
722
+ * @param {!Element} node The dom to simulate an event occurring on.
723
+ * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent.
724
+ */
725
+ function simulateNativeEventOnNode(topLevelType, node, fakeNativeEvent) {
726
+ fakeNativeEvent.target = node;
727
+ ReactDOMEventListener.dispatchEvent(topLevelType, fakeNativeEvent);
728
+ }
729
+
730
+ /**
731
+ * Simulates a top level event being dispatched from a raw event that occurred
732
+ * on the `ReactDOMComponent` `comp`.
733
+ * @param {Object} topLevelType A type from `BrowserEventConstants.topLevelTypes`.
734
+ * @param {!ReactDOMComponent} comp
735
+ * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent.
736
+ */
737
+ function simulateNativeEventOnDOMComponent(topLevelType, comp, fakeNativeEvent) {
738
+ simulateNativeEventOnNode(topLevelType, findDOMNode(comp), fakeNativeEvent);
739
+ }
740
+
708
741
  function findAllInRenderedFiberTreeInternal(fiber, test) {
709
742
  if (!fiber) {
710
743
  return [];
@@ -723,7 +756,7 @@ function findAllInRenderedFiberTreeInternal(fiber, test) {
723
756
  }
724
757
  }
725
758
  if (node.child) {
726
- node.child['return'] = node;
759
+ node.child.return = node;
727
760
  node = node.child;
728
761
  continue;
729
762
  }
@@ -731,12 +764,12 @@ function findAllInRenderedFiberTreeInternal(fiber, test) {
731
764
  return ret;
732
765
  }
733
766
  while (!node.sibling) {
734
- if (!node['return'] || node['return'] === currentParent) {
767
+ if (!node.return || node.return === currentParent) {
735
768
  return ret;
736
769
  }
737
- node = node['return'];
770
+ node = node.return;
738
771
  }
739
- node.sibling['return'] = node['return'];
772
+ node.sibling.return = node.return;
740
773
  node = node.sibling;
741
774
  }
742
775
  }
@@ -917,29 +950,6 @@ var ReactTestUtils = {
917
950
  return this;
918
951
  },
919
952
 
920
- /**
921
- * Simulates a top level event being dispatched from a raw event that occurred
922
- * on an `Element` node.
923
- * @param {Object} topLevelType A type from `BrowserEventConstants.topLevelTypes`
924
- * @param {!Element} node The dom to simulate an event occurring on.
925
- * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent.
926
- */
927
- simulateNativeEventOnNode: function (topLevelType, node, fakeNativeEvent) {
928
- fakeNativeEvent.target = node;
929
- ReactDOMEventListener.dispatchEvent(topLevelType, fakeNativeEvent);
930
- },
931
-
932
- /**
933
- * Simulates a top level event being dispatched from a raw event that occurred
934
- * on the `ReactDOMComponent` `comp`.
935
- * @param {Object} topLevelType A type from `BrowserEventConstants.topLevelTypes`.
936
- * @param {!ReactDOMComponent} comp
937
- * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent.
938
- */
939
- simulateNativeEventOnDOMComponent: function (topLevelType, comp, fakeNativeEvent) {
940
- ReactTestUtils.simulateNativeEventOnNode(topLevelType, findDOMNode(comp), fakeNativeEvent);
941
- },
942
-
943
953
  nativeTouchData: function (x, y) {
944
954
  return {
945
955
  touches: [{ pageX: x, pageY: y }]
@@ -1038,29 +1048,28 @@ buildSimulators();
1038
1048
  * to dispatch synthetic events.
1039
1049
  */
1040
1050
 
1041
- function makeNativeSimulator(eventType) {
1051
+ function makeNativeSimulator(eventType, topLevelType) {
1042
1052
  return function (domComponentOrNode, nativeEventData) {
1043
1053
  var fakeNativeEvent = new Event(eventType);
1044
1054
  _assign(fakeNativeEvent, nativeEventData);
1045
1055
  if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {
1046
- ReactTestUtils.simulateNativeEventOnDOMComponent(eventType, domComponentOrNode, fakeNativeEvent);
1056
+ simulateNativeEventOnDOMComponent(topLevelType, domComponentOrNode, fakeNativeEvent);
1047
1057
  } else if (domComponentOrNode.tagName) {
1048
1058
  // Will allow on actual dom nodes.
1049
- ReactTestUtils.simulateNativeEventOnNode(eventType, domComponentOrNode, fakeNativeEvent);
1059
+ simulateNativeEventOnNode(topLevelType, domComponentOrNode, fakeNativeEvent);
1050
1060
  }
1051
1061
  };
1052
1062
  }
1053
1063
 
1054
- var eventKeys = [].concat(Object.keys(topLevelTypes), Object.keys(mediaEventTypes));
1064
+ [[TOP_ABORT, 'abort'], [TOP_ANIMATION_END, 'animationEnd'], [TOP_ANIMATION_ITERATION, 'animationIteration'], [TOP_ANIMATION_START, 'animationStart'], [TOP_BLUR, 'blur'], [TOP_CAN_PLAY_THROUGH, 'canPlayThrough'], [TOP_CAN_PLAY, 'canPlay'], [TOP_CANCEL, 'cancel'], [TOP_CHANGE, 'change'], [TOP_CLICK, 'click'], [TOP_CLOSE, 'close'], [TOP_COMPOSITION_END, 'compositionEnd'], [TOP_COMPOSITION_START, 'compositionStart'], [TOP_COMPOSITION_UPDATE, 'compositionUpdate'], [TOP_CONTEXT_MENU, 'contextMenu'], [TOP_COPY, 'copy'], [TOP_CUT, 'cut'], [TOP_DOUBLE_CLICK, 'doubleClick'], [TOP_DRAG_END, 'dragEnd'], [TOP_DRAG_ENTER, 'dragEnter'], [TOP_DRAG_EXIT, 'dragExit'], [TOP_DRAG_LEAVE, 'dragLeave'], [TOP_DRAG_OVER, 'dragOver'], [TOP_DRAG_START, 'dragStart'], [TOP_DRAG, 'drag'], [TOP_DROP, 'drop'], [TOP_DURATION_CHANGE, 'durationChange'], [TOP_EMPTIED, 'emptied'], [TOP_ENCRYPTED, 'encrypted'], [TOP_ENDED, 'ended'], [TOP_ERROR, 'error'], [TOP_FOCUS, 'focus'], [TOP_INPUT, 'input'], [TOP_KEY_DOWN, 'keyDown'], [TOP_KEY_PRESS, 'keyPress'], [TOP_KEY_UP, 'keyUp'], [TOP_LOAD_START, 'loadStart'], [TOP_LOAD_START, 'loadStart'], [TOP_LOAD, 'load'], [TOP_LOADED_DATA, 'loadedData'], [TOP_LOADED_METADATA, 'loadedMetadata'], [TOP_MOUSE_DOWN, 'mouseDown'], [TOP_MOUSE_MOVE, 'mouseMove'], [TOP_MOUSE_OUT, 'mouseOut'], [TOP_MOUSE_OVER, 'mouseOver'], [TOP_MOUSE_UP, 'mouseUp'], [TOP_PASTE, 'paste'], [TOP_PAUSE, 'pause'], [TOP_PLAY, 'play'], [TOP_PLAYING, 'playing'], [TOP_PROGRESS, 'progress'], [TOP_RATE_CHANGE, 'rateChange'], [TOP_SCROLL, 'scroll'], [TOP_SEEKED, 'seeked'], [TOP_SEEKING, 'seeking'], [TOP_SELECTION_CHANGE, 'selectionChange'], [TOP_STALLED, 'stalled'], [TOP_SUSPEND, 'suspend'], [TOP_TEXT_INPUT, 'textInput'], [TOP_TIME_UPDATE, 'timeUpdate'], [TOP_TOGGLE, 'toggle'], [TOP_TOUCH_CANCEL, 'touchCancel'], [TOP_TOUCH_END, 'touchEnd'], [TOP_TOUCH_MOVE, 'touchMove'], [TOP_TOUCH_START, 'touchStart'], [TOP_TRANSITION_END, 'transitionEnd'], [TOP_VOLUME_CHANGE, 'volumeChange'], [TOP_WAITING, 'waiting'], [TOP_WHEEL, 'wheel']].forEach(function (_ref) {
1065
+ var topLevelType = _ref[0],
1066
+ eventType = _ref[1];
1055
1067
 
1056
- eventKeys.forEach(function (eventType) {
1057
- // Event type is stored as 'topClick' - we transform that to 'click'
1058
- var convenienceName = eventType.indexOf('top') === 0 ? eventType.charAt(3).toLowerCase() + eventType.substr(4) : eventType;
1059
1068
  /**
1060
1069
  * @param {!Element|ReactDOMComponent} domComponentOrNode
1061
1070
  * @param {?Event} nativeEventData Fake native event to use in SyntheticEvent.
1062
1071
  */
1063
- ReactTestUtils.SimulateNative[convenienceName] = makeNativeSimulator(eventType);
1072
+ ReactTestUtils.SimulateNative[eventType] = makeNativeSimulator(eventType, topLevelType);
1064
1073
  });
1065
1074
 
1066
1075
 
@@ -1073,7 +1082,7 @@ var ReactTestUtils$3 = ( ReactTestUtils$2 && ReactTestUtils ) || ReactTestUtils$
1073
1082
 
1074
1083
  // TODO: decide on the top-level export form.
1075
1084
  // This is hacky but makes it work with both Rollup and Jest.
1076
- var testUtils = ReactTestUtils$3['default'] ? ReactTestUtils$3['default'] : ReactTestUtils$3;
1085
+ var testUtils = ReactTestUtils$3.default ? ReactTestUtils$3.default : ReactTestUtils$3;
1077
1086
 
1078
1087
  module.exports = testUtils;
1079
1088
  })();