react 15.4.2 → 15.5.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.
package/dist/react.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React v15.4.2
2
+ * React v15.5.1
3
3
  *
4
4
  * Copyright 2013-present, Facebook, Inc.
5
5
  * All rights reserved.
@@ -9,4 +9,4 @@
9
9
  * of patent rights can be found in the PATENTS file in the same directory.
10
10
  *
11
11
  */
12
- !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.React=t()}}(function(){return function t(e,n,r){function o(u,a){if(!n[u]){if(!e[u]){var s="function"==typeof require&&require;if(!a&&s)return s(u,!0);if(i)return i(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[u]={exports:{}};e[u][0].call(l.exports,function(t){var n=e[u][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(t,e,n){"use strict";function r(t){var e=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+t).replace(e,function(t){return n[t]});return"$"+r}function o(t){var e=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===t[0]&&"$"===t[1]?t.substring(2):t.substring(1);return(""+r).replace(e,function(t){return n[t]})}var i={escape:r,unescape:o};e.exports=i},{}],2:[function(t,e,n){"use strict";var r=t(21),o=(t(25),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),i=function(t,e){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,t,e),r}return new n(t,e)},u=function(t,e,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,t,e,n),o}return new r(t,e,n)},a=function(t,e,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,t,e,n,r),i}return new o(t,e,n,r)},s=function(t){var e=this;t instanceof e?void 0:r("25"),t.destructor(),e.instancePool.length<e.poolSize&&e.instancePool.push(t)},c=10,l=o,f=function(t,e){var n=t;return n.instancePool=[],n.getPooled=e||l,n.poolSize||(n.poolSize=c),n.release=s,n},p={addPoolingTo:f,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:u,fourArgumentPooler:a};e.exports=p},{21:21,25:25}],3:[function(t,e,n){"use strict";var r=t(27),o=t(4),i=t(6),u=t(15),a=t(5),s=t(8),c=t(9),l=t(13),f=t(17),p=t(20),d=(t(26),c.createElement),y=c.createFactory,v=c.cloneElement,h=r,m={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:p},Component:i,PureComponent:u,createElement:d,cloneElement:v,isValidElement:c.isValidElement,PropTypes:l,createClass:a.createClass,createFactory:y,createMixin:function(t){return t},DOM:s,version:f,__spread:h};e.exports=m},{13:13,15:15,17:17,20:20,26:26,27:27,4:4,5:5,6:6,8:8,9:9}],4:[function(t,e,n){"use strict";function r(t){return(""+t).replace(E,"$&/")}function o(t,e){this.func=t,this.context=e,this.count=0}function i(t,e,n){var r=t.func,o=t.context;r.call(o,e,t.count++)}function u(t,e,n){if(null==t)return t;var r=o.getPooled(e,n);m(t,i,r),o.release(r)}function a(t,e,n,r){this.result=t,this.keyPrefix=e,this.func=n,this.context=r,this.count=0}function s(t,e,n){var o=t.result,i=t.keyPrefix,u=t.func,a=t.context,s=u.call(a,e,t.count++);Array.isArray(s)?c(s,o,n,h.thatReturnsArgument):null!=s&&(v.isValidElement(s)&&(s=v.cloneAndReplaceKey(s,i+(!s.key||e&&e.key===s.key?"":r(s.key)+"/")+n)),o.push(s))}function c(t,e,n,o,i){var u="";null!=n&&(u=r(n)+"/");var c=a.getPooled(e,u,o,i);m(t,s,c),a.release(c)}function l(t,e,n){if(null==t)return t;var r=[];return c(t,r,null,e,n),r}function f(t,e,n){return null}function p(t,e){return m(t,f,null)}function d(t){var e=[];return c(t,e,null,h.thatReturnsArgument),e}var y=t(2),v=t(9),h=t(23),m=t(22),b=y.twoArgumentPooler,g=y.fourArgumentPooler,E=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},y.addPoolingTo(o,b),a.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},y.addPoolingTo(a,g);var x={forEach:u,map:l,mapIntoWithKeyPrefixInternal:c,count:p,toArray:d};e.exports=x},{2:2,22:22,23:23,9:9}],5:[function(t,e,n){"use strict";function r(t){return t}function o(t,e){var n=E.hasOwnProperty(e)?E[e]:null;_.hasOwnProperty(e)&&("OVERRIDE_BASE"!==n?p("73",e):void 0),t&&("DEFINE_MANY"!==n&&"DEFINE_MANY_MERGED"!==n?p("74",e):void 0)}function i(t,e){if(e){"function"==typeof e?p("75"):void 0,v.isValidElement(e)?p("76"):void 0;var n=t.prototype,r=n.__reactAutoBindPairs;e.hasOwnProperty(b)&&x.mixins(t,e.mixins);for(var i in e)if(e.hasOwnProperty(i)&&i!==b){var u=e[i],a=n.hasOwnProperty(i);if(o(a,i),x.hasOwnProperty(i))x[i](t,u);else{var l=E.hasOwnProperty(i),f="function"==typeof u,d=f&&!l&&!a&&e.autobind!==!1;if(d)r.push(i,u),n[i]=u;else if(a){var y=E[i];!l||"DEFINE_MANY_MERGED"!==y&&"DEFINE_MANY"!==y?p("77",y,i):void 0,"DEFINE_MANY_MERGED"===y?n[i]=s(n[i],u):"DEFINE_MANY"===y&&(n[i]=c(n[i],u))}else n[i]=u}}}}function u(t,e){if(e)for(var n in e){var r=e[n];if(e.hasOwnProperty(n)){var o=n in x;o?p("78",n):void 0;var i=n in t;i?p("79",n):void 0,t[n]=r}}}function a(t,e){t&&e&&"object"==typeof t&&"object"==typeof e?void 0:p("80");for(var n in e)e.hasOwnProperty(n)&&(void 0!==t[n]?p("81",n):void 0,t[n]=e[n]);return t}function s(t,e){return function(){var n=t.apply(this,arguments),r=e.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return a(o,n),a(o,r),o}}function c(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function l(t,e){var n=e.bind(t);return n}function f(t){for(var e=t.__reactAutoBindPairs,n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];t[r]=l(t,o)}}var p=t(21),d=t(27),y=t(6),v=t(9),h=(t(12),t(11)),m=t(24),b=(t(25),t(26),"mixins"),g=[],E={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},x={displayName:function(t,e){t.displayName=e},mixins:function(t,e){if(e)for(var n=0;n<e.length;n++)i(t,e[n])},childContextTypes:function(t,e){t.childContextTypes=d({},t.childContextTypes,e)},contextTypes:function(t,e){t.contextTypes=d({},t.contextTypes,e)},getDefaultProps:function(t,e){t.getDefaultProps?t.getDefaultProps=s(t.getDefaultProps,e):t.getDefaultProps=e},propTypes:function(t,e){t.propTypes=d({},t.propTypes,e)},statics:function(t,e){u(t,e)},autobind:function(){}},_={replaceState:function(t,e){this.updater.enqueueReplaceState(this,t),e&&this.updater.enqueueCallback(this,e,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},P=function(){};d(P.prototype,y.prototype,_);var w={createClass:function(t){var e=r(function(t,n,r){this.__reactAutoBindPairs.length&&f(this),this.props=t,this.context=n,this.refs=m,this.updater=r||h,this.state=null;var o=this.getInitialState?this.getInitialState():null;"object"!=typeof o||Array.isArray(o)?p("82",e.displayName||"ReactCompositeComponent"):void 0,this.state=o});e.prototype=new P,e.prototype.constructor=e,e.prototype.__reactAutoBindPairs=[],g.forEach(i.bind(null,e)),i(e,t),e.getDefaultProps&&(e.defaultProps=e.getDefaultProps()),e.prototype.render?void 0:p("83");for(var n in E)e.prototype[n]||(e.prototype[n]=null);return e},injection:{injectMixin:function(t){g.push(t)}}};e.exports=w},{11:11,12:12,21:21,24:24,25:25,26:26,27:27,6:6,9:9}],6:[function(t,e,n){"use strict";function r(t,e,n){this.props=t,this.context=e,this.refs=u,this.updater=n||i}var o=t(21),i=t(11),u=(t(18),t(24));t(25),t(26);r.prototype.isReactComponent={},r.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t?o("85"):void 0,this.updater.enqueueSetState(this,t),e&&this.updater.enqueueCallback(this,e,"setState")},r.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this),t&&this.updater.enqueueCallback(this,t,"forceUpdate")};e.exports=r},{11:11,18:18,21:21,24:24,25:25,26:26}],7:[function(t,e,n){"use strict";var r={current:null};e.exports=r},{}],8:[function(t,e,n){"use strict";var r=t(9),o=r.createFactory,i={a:o("a"),abbr:o("abbr"),address:o("address"),area:o("area"),article:o("article"),aside:o("aside"),audio:o("audio"),b:o("b"),base:o("base"),bdi:o("bdi"),bdo:o("bdo"),big:o("big"),blockquote:o("blockquote"),body:o("body"),br:o("br"),button:o("button"),canvas:o("canvas"),caption:o("caption"),cite:o("cite"),code:o("code"),col:o("col"),colgroup:o("colgroup"),data:o("data"),datalist:o("datalist"),dd:o("dd"),del:o("del"),details:o("details"),dfn:o("dfn"),dialog:o("dialog"),div:o("div"),dl:o("dl"),dt:o("dt"),em:o("em"),embed:o("embed"),fieldset:o("fieldset"),figcaption:o("figcaption"),figure:o("figure"),footer:o("footer"),form:o("form"),h1:o("h1"),h2:o("h2"),h3:o("h3"),h4:o("h4"),h5:o("h5"),h6:o("h6"),head:o("head"),header:o("header"),hgroup:o("hgroup"),hr:o("hr"),html:o("html"),i:o("i"),iframe:o("iframe"),img:o("img"),input:o("input"),ins:o("ins"),kbd:o("kbd"),keygen:o("keygen"),label:o("label"),legend:o("legend"),li:o("li"),link:o("link"),main:o("main"),map:o("map"),mark:o("mark"),menu:o("menu"),menuitem:o("menuitem"),meta:o("meta"),meter:o("meter"),nav:o("nav"),noscript:o("noscript"),object:o("object"),ol:o("ol"),optgroup:o("optgroup"),option:o("option"),output:o("output"),p:o("p"),param:o("param"),picture:o("picture"),pre:o("pre"),progress:o("progress"),q:o("q"),rp:o("rp"),rt:o("rt"),ruby:o("ruby"),s:o("s"),samp:o("samp"),script:o("script"),section:o("section"),select:o("select"),small:o("small"),source:o("source"),span:o("span"),strong:o("strong"),style:o("style"),sub:o("sub"),summary:o("summary"),sup:o("sup"),table:o("table"),tbody:o("tbody"),td:o("td"),textarea:o("textarea"),tfoot:o("tfoot"),th:o("th"),thead:o("thead"),time:o("time"),title:o("title"),tr:o("tr"),track:o("track"),u:o("u"),ul:o("ul"),var:o("var"),video:o("video"),wbr:o("wbr"),circle:o("circle"),clipPath:o("clipPath"),defs:o("defs"),ellipse:o("ellipse"),g:o("g"),image:o("image"),line:o("line"),linearGradient:o("linearGradient"),mask:o("mask"),path:o("path"),pattern:o("pattern"),polygon:o("polygon"),polyline:o("polyline"),radialGradient:o("radialGradient"),rect:o("rect"),stop:o("stop"),svg:o("svg"),text:o("text"),tspan:o("tspan")};e.exports=i},{9:9}],9:[function(t,e,n){"use strict";function r(t){return void 0!==t.ref}function o(t){return void 0!==t.key}var i=t(27),u=t(7),a=(t(26),t(18),Object.prototype.hasOwnProperty),s=t(10),c={key:!0,ref:!0,__self:!0,__source:!0},l=function(t,e,n,r,o,i,u){var a={$$typeof:s,type:t,key:e,ref:n,props:u,_owner:i};return a};l.createElement=function(t,e,n){var i,s={},f=null,p=null,d=null,y=null;if(null!=e){r(e)&&(p=e.ref),o(e)&&(f=""+e.key),d=void 0===e.__self?null:e.__self,y=void 0===e.__source?null:e.__source;for(i in e)a.call(e,i)&&!c.hasOwnProperty(i)&&(s[i]=e[i])}var v=arguments.length-2;if(1===v)s.children=n;else if(v>1){for(var h=Array(v),m=0;m<v;m++)h[m]=arguments[m+2];s.children=h}if(t&&t.defaultProps){var b=t.defaultProps;for(i in b)void 0===s[i]&&(s[i]=b[i])}return l(t,f,p,d,y,u.current,s)},l.createFactory=function(t){var e=l.createElement.bind(null,t);return e.type=t,e},l.cloneAndReplaceKey=function(t,e){var n=l(t.type,e,t.ref,t._self,t._source,t._owner,t.props);return n},l.cloneElement=function(t,e,n){var s,f=i({},t.props),p=t.key,d=t.ref,y=t._self,v=t._source,h=t._owner;if(null!=e){r(e)&&(d=e.ref,h=u.current),o(e)&&(p=""+e.key);var m;t.type&&t.type.defaultProps&&(m=t.type.defaultProps);for(s in e)a.call(e,s)&&!c.hasOwnProperty(s)&&(void 0===e[s]&&void 0!==m?f[s]=m[s]:f[s]=e[s])}var b=arguments.length-2;if(1===b)f.children=n;else if(b>1){for(var g=Array(b),E=0;E<b;E++)g[E]=arguments[E+2];f.children=g}return l(t.type,p,d,y,v,h,f)},l.isValidElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===s},e.exports=l},{10:10,18:18,26:26,27:27,7:7}],10:[function(t,e,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=r},{}],11:[function(t,e,n){"use strict";function r(t,e){}var o=(t(26),{isMounted:function(t){return!1},enqueueCallback:function(t,e){},enqueueForceUpdate:function(t){r(t,"forceUpdate")},enqueueReplaceState:function(t,e){r(t,"replaceState")},enqueueSetState:function(t,e){r(t,"setState")}});e.exports=o},{26:26}],12:[function(t,e,n){"use strict";var r={};e.exports=r},{}],13:[function(t,e,n){"use strict";function r(t,e){return t===e?0!==t||1/t===1/e:t!==t&&e!==e}function o(t){this.message=t,this.stack=""}function i(t){function e(e,n,r,i,u,a,s){if(i=i||N,a=a||r,null==n[r]){var c=_[u];return e?new o(null===n[r]?"The "+c+" `"+a+"` is marked as required "+("in `"+i+"`, but its value is `null`."):"The "+c+" `"+a+"` is marked as required in "+("`"+i+"`, but its value is `undefined`.")):null}return t(n,r,i,u,a)}var n=e.bind(null,!1);return n.isRequired=e.bind(null,!0),n}function u(t){function e(e,n,r,i,u,a){var s=e[n],c=b(s);if(c!==t){var l=_[i],f=g(s);return new o("Invalid "+l+" `"+u+"` of type "+("`"+f+"` supplied to `"+r+"`, expected ")+("`"+t+"`."))}return null}return i(e)}function a(){return i(w.thatReturns(null))}function s(t){function e(e,n,r,i,u){if("function"!=typeof t)return new o("Property `"+u+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=e[n];if(!Array.isArray(a)){var s=_[i],c=b(a);return new o("Invalid "+s+" `"+u+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<a.length;l++){var f=t(a,l,r,i,u+"["+l+"]",P);if(f instanceof Error)return f}return null}return i(e)}function c(){function t(t,e,n,r,i){var u=t[e];if(!x.isValidElement(u)){var a=_[r],s=b(u);return new o("Invalid "+a+" `"+i+"` of type "+("`"+s+"` supplied to `"+n+"`, expected a single ReactElement."))}return null}return i(t)}function l(t){function e(e,n,r,i,u){if(!(e[n]instanceof t)){var a=_[i],s=t.name||N,c=E(e[n]);return new o("Invalid "+a+" `"+u+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("instance of `"+s+"`."))}return null}return i(e)}function f(t){function e(e,n,i,u,a){for(var s=e[n],c=0;c<t.length;c++)if(r(s,t[c]))return null;var l=_[u],f=JSON.stringify(t);return new o("Invalid "+l+" `"+a+"` of value `"+s+"` "+("supplied to `"+i+"`, expected one of "+f+"."))}return Array.isArray(t)?i(e):w.thatReturnsNull}function p(t){function e(e,n,r,i,u){if("function"!=typeof t)return new o("Property `"+u+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=e[n],s=b(a);if("object"!==s){var c=_[i];return new o("Invalid "+c+" `"+u+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an object."))}for(var l in a)if(a.hasOwnProperty(l)){var f=t(a,l,r,i,u+"."+l,P);if(f instanceof Error)return f}return null}return i(e)}function d(t){function e(e,n,r,i,u){for(var a=0;a<t.length;a++){var s=t[a];if(null==s(e,n,r,i,u,P))return null}var c=_[i];return new o("Invalid "+c+" `"+u+"` supplied to "+("`"+r+"`."))}return Array.isArray(t)?i(e):w.thatReturnsNull}function y(){function t(t,e,n,r,i){if(!h(t[e])){var u=_[r];return new o("Invalid "+u+" `"+i+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return i(t)}function v(t){function e(e,n,r,i,u){var a=e[n],s=b(a);if("object"!==s){var c=_[i];return new o("Invalid "+c+" `"+u+"` of type `"+s+"` "+("supplied to `"+r+"`, expected `object`."))}for(var l in t){var f=t[l];if(f){var p=f(a,l,r,i,u+"."+l,P);if(p)return p}}return null}return i(e)}function h(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(h);if(null===t||x.isValidElement(t))return!0;var e=A(t);if(!e)return!1;var n,r=e.call(t);if(e!==t.entries){for(;!(n=r.next()).done;)if(!h(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!h(o[1]))return!1}return!0;default:return!1}}function m(t,e){return"symbol"===t||"Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol}function b(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":m(e,t)?"symbol":e}function g(t){var e=b(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function E(t){return t.constructor&&t.constructor.name?t.constructor.name:N}var x=t(9),_=t(12),P=t(14),w=t(23),A=t(19),N=(t(26),"<<anonymous>>"),O={array:u("array"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:a(),arrayOf:s,element:c(),instanceOf:l,node:y(),objectOf:p,oneOf:f,oneOfType:d,shape:v};o.prototype=Error.prototype,e.exports=O},{12:12,14:14,19:19,23:23,26:26,9:9}],14:[function(t,e,n){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=r},{}],15:[function(t,e,n){"use strict";function r(t,e,n){this.props=t,this.context=e,this.refs=s,this.updater=n||a}function o(){}var i=t(27),u=t(6),a=t(11),s=t(24);o.prototype=u.prototype,r.prototype=new o,r.prototype.constructor=r,i(r.prototype,u.prototype),r.prototype.isPureReactComponent=!0,e.exports=r},{11:11,24:24,27:27,6:6}],16:[function(t,e,n){"use strict";var r=t(27),o=t(3),i=r({__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:t(7)}},o);e.exports=i},{27:27,3:3,7:7}],17:[function(t,e,n){"use strict";e.exports="15.4.2"},{}],18:[function(t,e,n){"use strict";var r=!1;e.exports=r},{}],19:[function(t,e,n){"use strict";function r(t){var e=t&&(o&&t[o]||t[i]);if("function"==typeof e)return e}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";e.exports=r},{}],20:[function(t,e,n){"use strict";function r(t){return i.isValidElement(t)?void 0:o("143"),t}var o=t(21),i=t(9);t(25);e.exports=r},{21:21,25:25,9:9}],21:[function(t,e,n){"use strict";function r(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}e.exports=r},{}],22:[function(t,e,n){"use strict";function r(t,e){return t&&"object"==typeof t&&null!=t.key?c.escape(t.key):e.toString(36)}function o(t,e,n,i){var p=typeof t;if("undefined"!==p&&"boolean"!==p||(t=null),null===t||"string"===p||"number"===p||"object"===p&&t.$$typeof===a)return n(i,t,""===e?l+r(t,0):e),1;var d,y,v=0,h=""===e?l:e+f;if(Array.isArray(t))for(var m=0;m<t.length;m++)d=t[m],y=h+r(d,m),v+=o(d,y,n,i);else{var b=s(t);if(b){var g,E=b.call(t);if(b!==t.entries)for(var x=0;!(g=E.next()).done;)d=g.value,y=h+r(d,x++),v+=o(d,y,n,i);else for(;!(g=E.next()).done;){var _=g.value;_&&(d=_[1],y=h+c.escape(_[0])+f+r(d,0),v+=o(d,y,n,i))}}else if("object"===p){var P="",w=String(t);u("31","[object Object]"===w?"object with keys {"+Object.keys(t).join(", ")+"}":w,P)}}return v}function i(t,e,n){return null==t?0:o(t,"",e,n)}var u=t(21),a=(t(7),t(10)),s=t(19),c=(t(25),t(1)),l=(t(26),"."),f=":";e.exports=i},{1:1,10:10,19:19,21:21,25:25,26:26,7:7}],23:[function(t,e,n){"use strict";function r(t){return function(){return t}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(t){return t},e.exports=o},{}],24:[function(t,e,n){"use strict";var r={};e.exports=r},{}],25:[function(t,e,n){"use strict";function r(t,e,n,r,i,u,a,s){if(o(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,u,a,s],f=0;c=new Error(e.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var o=function(t){};e.exports=r},{}],26:[function(t,e,n){"use strict";var r=t(23),o=r;e.exports=o},{23:23}],27:[function(t,e,n){"use strict";function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function o(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}}var i=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;e.exports=o()?Object.assign:function(t,e){for(var n,o,a=r(t),s=1;s<arguments.length;s++){n=Object(arguments[s]);for(var c in n)i.call(n,c)&&(a[c]=n[c]);if(Object.getOwnPropertySymbols){o=Object.getOwnPropertySymbols(n);for(var l=0;l<o.length;l++)u.call(n,o[l])&&(a[o[l]]=n[o[l]])}}return a}},{}]},{},[16])(16)});
12
+ !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.React=t()}}(function(){return function t(e,n,r){function o(a,u){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return o(n||t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(t,e,n){"use strict";function r(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(t){return e[t]})}function o(t){var e={"=0":"=","=2":":"};return(""+("."===t[0]&&"$"===t[1]?t.substring(2):t.substring(1))).replace(/(=0|=2)/g,function(t){return e[t]})}var i={escape:r,unescape:o};e.exports=i},{}],2:[function(t,e,n){"use strict";var r=t(20),o=(t(24),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),i=function(t,e){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,t,e),r}return new n(t,e)},a=function(t,e,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,t,e,n),o}return new r(t,e,n)},u=function(t,e,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,t,e,n,r),i}return new o(t,e,n,r)},s=function(t){var e=this;t instanceof e||r("25"),t.destructor(),e.instancePool.length<e.poolSize&&e.instancePool.push(t)},c=o,l=function(t,e){var n=t;return n.instancePool=[],n.getPooled=e||c,n.poolSize||(n.poolSize=10),n.release=s,n},p={addPoolingTo:l,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:u};e.exports=p},{20:20,24:24}],3:[function(t,e,n){"use strict";var r=t(26),o=t(4),i=t(6),a=t(14),u=t(5),s=t(8),c=t(9),l=t(13),p=t(16),f=t(19),d=(t(25),c.createElement),h=c.createFactory,y=c.cloneElement,v=r,m={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:f},Component:i,PureComponent:a,createElement:d,cloneElement:y,isValidElement:c.isValidElement,PropTypes:l,createClass:u.createClass,createFactory:h,createMixin:function(t){return t},DOM:s,version:p,__spread:v};e.exports=m},{13:13,14:14,16:16,19:19,25:25,26:26,4:4,5:5,6:6,8:8,9:9}],4:[function(t,e,n){"use strict";function r(t){return(""+t).replace(E,"$&/")}function o(t,e){this.func=t,this.context=e,this.count=0}function i(t,e,n){var r=t.func,o=t.context;r.call(o,e,t.count++)}function a(t,e,n){if(null==t)return t;var r=o.getPooled(e,n);m(t,i,r),o.release(r)}function u(t,e,n,r){this.result=t,this.keyPrefix=e,this.func=n,this.context=r,this.count=0}function s(t,e,n){var o=t.result,i=t.keyPrefix,a=t.func,u=t.context,s=a.call(u,e,t.count++);Array.isArray(s)?c(s,o,n,v.thatReturnsArgument):null!=s&&(y.isValidElement(s)&&(s=y.cloneAndReplaceKey(s,i+(!s.key||e&&e.key===s.key?"":r(s.key)+"/")+n)),o.push(s))}function c(t,e,n,o,i){var a="";null!=n&&(a=r(n)+"/");var c=u.getPooled(e,a,o,i);m(t,s,c),u.release(c)}function l(t,e,n){if(null==t)return t;var r=[];return c(t,r,null,e,n),r}function p(t,e,n){return null}function f(t,e){return m(t,p,null)}function d(t){var e=[];return c(t,e,null,v.thatReturnsArgument),e}var h=t(2),y=t(9),v=t(22),m=t(21),g=h.twoArgumentPooler,b=h.fourArgumentPooler,E=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,g),u.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(u,b);var _={forEach:a,map:l,mapIntoWithKeyPrefixInternal:c,count:f,toArray:d};e.exports=_},{2:2,21:21,22:22,9:9}],5:[function(t,e,n){"use strict";function r(t){return t}function o(t,e){var n=E.hasOwnProperty(e)?E[e]:null;P.hasOwnProperty(e)&&"OVERRIDE_BASE"!==n&&f("73",e),t&&"DEFINE_MANY"!==n&&"DEFINE_MANY_MERGED"!==n&&f("74",e)}function i(t,e){if(e){"function"==typeof e&&f("75"),y.isValidElement(e)&&f("76");var n=t.prototype,r=n.__reactAutoBindPairs;e.hasOwnProperty(g)&&_.mixins(t,e.mixins);for(var i in e)if(e.hasOwnProperty(i)&&i!==g){var a=e[i],u=n.hasOwnProperty(i);if(o(u,i),_.hasOwnProperty(i))_[i](t,a);else{var l=E.hasOwnProperty(i),p="function"==typeof a,d=p&&!l&&!u&&!1!==e.autobind;if(d)r.push(i,a),n[i]=a;else if(u){var h=E[i];(!l||"DEFINE_MANY_MERGED"!==h&&"DEFINE_MANY"!==h)&&f("77",h,i),"DEFINE_MANY_MERGED"===h?n[i]=s(n[i],a):"DEFINE_MANY"===h&&(n[i]=c(n[i],a))}else n[i]=a}}}}function a(t,e){if(e)for(var n in e){var r=e[n];if(e.hasOwnProperty(n)){var o=n in _;o&&f("78",n);var i=n in t;i&&f("79",n),t[n]=r}}}function u(t,e){t&&e&&"object"==typeof t&&"object"==typeof e||f("80");for(var n in e)e.hasOwnProperty(n)&&(void 0!==t[n]&&f("81",n),t[n]=e[n]);return t}function s(t,e){return function(){var n=t.apply(this,arguments),r=e.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return u(o,n),u(o,r),o}}function c(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function l(t,e){return e.bind(t)}function p(t){for(var e=t.__reactAutoBindPairs,n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];t[r]=l(t,o)}}var f=t(20),d=t(26),h=t(6),y=t(9),v=(t(12),t(11)),m=t(23),g=(t(24),t(25),"mixins"),b=[],E={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},_={displayName:function(t,e){t.displayName=e},mixins:function(t,e){if(e)for(var n=0;n<e.length;n++)i(t,e[n])},childContextTypes:function(t,e){t.childContextTypes=d({},t.childContextTypes,e)},contextTypes:function(t,e){t.contextTypes=d({},t.contextTypes,e)},getDefaultProps:function(t,e){t.getDefaultProps?t.getDefaultProps=s(t.getDefaultProps,e):t.getDefaultProps=e},propTypes:function(t,e){t.propTypes=d({},t.propTypes,e)},statics:function(t,e){a(t,e)},autobind:function(){}},P={replaceState:function(t,e){this.updater.enqueueReplaceState(this,t),e&&this.updater.enqueueCallback(this,e,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},x=function(){};d(x.prototype,h.prototype,P);var N={createClass:function(t){var e=r(function(t,n,r){this.__reactAutoBindPairs.length&&p(this),this.props=t,this.context=n,this.refs=m,this.updater=r||v,this.state=null;var o=this.getInitialState?this.getInitialState():null;("object"!=typeof o||Array.isArray(o))&&f("82",e.displayName||"ReactCompositeComponent"),this.state=o});e.prototype=new x,e.prototype.constructor=e,e.prototype.__reactAutoBindPairs=[],b.forEach(i.bind(null,e)),i(e,t),e.getDefaultProps&&(e.defaultProps=e.getDefaultProps()),e.prototype.render||f("83");for(var n in E)e.prototype[n]||(e.prototype[n]=null);return e},injection:{injectMixin:function(t){b.push(t)}}};e.exports=N},{11:11,12:12,20:20,23:23,24:24,25:25,26:26,6:6,9:9}],6:[function(t,e,n){"use strict";function r(t,e,n){this.props=t,this.context=e,this.refs=a,this.updater=n||i}var o=t(20),i=t(11),a=(t(17),t(23));t(24),t(25);r.prototype.isReactComponent={},r.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t&&o("85"),this.updater.enqueueSetState(this,t),e&&this.updater.enqueueCallback(this,e,"setState")},r.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this),t&&this.updater.enqueueCallback(this,t,"forceUpdate")};e.exports=r},{11:11,17:17,20:20,23:23,24:24,25:25}],7:[function(t,e,n){"use strict";var r={current:null};e.exports=r},{}],8:[function(t,e,n){"use strict";var r=t(9),o=r.createFactory,i={a:o("a"),abbr:o("abbr"),address:o("address"),area:o("area"),article:o("article"),aside:o("aside"),audio:o("audio"),b:o("b"),base:o("base"),bdi:o("bdi"),bdo:o("bdo"),big:o("big"),blockquote:o("blockquote"),body:o("body"),br:o("br"),button:o("button"),canvas:o("canvas"),caption:o("caption"),cite:o("cite"),code:o("code"),col:o("col"),colgroup:o("colgroup"),data:o("data"),datalist:o("datalist"),dd:o("dd"),del:o("del"),details:o("details"),dfn:o("dfn"),dialog:o("dialog"),div:o("div"),dl:o("dl"),dt:o("dt"),em:o("em"),embed:o("embed"),fieldset:o("fieldset"),figcaption:o("figcaption"),figure:o("figure"),footer:o("footer"),form:o("form"),h1:o("h1"),h2:o("h2"),h3:o("h3"),h4:o("h4"),h5:o("h5"),h6:o("h6"),head:o("head"),header:o("header"),hgroup:o("hgroup"),hr:o("hr"),html:o("html"),i:o("i"),iframe:o("iframe"),img:o("img"),input:o("input"),ins:o("ins"),kbd:o("kbd"),keygen:o("keygen"),label:o("label"),legend:o("legend"),li:o("li"),link:o("link"),main:o("main"),map:o("map"),mark:o("mark"),menu:o("menu"),menuitem:o("menuitem"),meta:o("meta"),meter:o("meter"),nav:o("nav"),noscript:o("noscript"),object:o("object"),ol:o("ol"),optgroup:o("optgroup"),option:o("option"),output:o("output"),p:o("p"),param:o("param"),picture:o("picture"),pre:o("pre"),progress:o("progress"),q:o("q"),rp:o("rp"),rt:o("rt"),ruby:o("ruby"),s:o("s"),samp:o("samp"),script:o("script"),section:o("section"),select:o("select"),small:o("small"),source:o("source"),span:o("span"),strong:o("strong"),style:o("style"),sub:o("sub"),summary:o("summary"),sup:o("sup"),table:o("table"),tbody:o("tbody"),td:o("td"),textarea:o("textarea"),tfoot:o("tfoot"),th:o("th"),thead:o("thead"),time:o("time"),title:o("title"),tr:o("tr"),track:o("track"),u:o("u"),ul:o("ul"),var:o("var"),video:o("video"),wbr:o("wbr"),circle:o("circle"),clipPath:o("clipPath"),defs:o("defs"),ellipse:o("ellipse"),g:o("g"),image:o("image"),line:o("line"),linearGradient:o("linearGradient"),mask:o("mask"),path:o("path"),pattern:o("pattern"),polygon:o("polygon"),polyline:o("polyline"),radialGradient:o("radialGradient"),rect:o("rect"),stop:o("stop"),svg:o("svg"),text:o("text"),tspan:o("tspan")};e.exports=i},{9:9}],9:[function(t,e,n){"use strict";function r(t){return void 0!==t.ref}function o(t){return void 0!==t.key}var i=t(26),a=t(7),u=(t(25),t(17),Object.prototype.hasOwnProperty),s=t(10),c={key:!0,ref:!0,__self:!0,__source:!0},l=function(t,e,n,r,o,i,a){return{$$typeof:s,type:t,key:e,ref:n,props:a,_owner:i}};l.createElement=function(t,e,n){var i,s={},p=null,f=null;if(null!=e){r(e)&&(f=e.ref),o(e)&&(p=""+e.key),void 0===e.__self?null:e.__self,void 0===e.__source?null:e.__source;for(i in e)u.call(e,i)&&!c.hasOwnProperty(i)&&(s[i]=e[i])}var d=arguments.length-2;if(1===d)s.children=n;else if(d>1){for(var h=Array(d),y=0;y<d;y++)h[y]=arguments[y+2];s.children=h}if(t&&t.defaultProps){var v=t.defaultProps;for(i in v)void 0===s[i]&&(s[i]=v[i])}return l(t,p,f,0,0,a.current,s)},l.createFactory=function(t){var e=l.createElement.bind(null,t);return e.type=t,e},l.cloneAndReplaceKey=function(t,e){return l(t.type,e,t.ref,t._self,t._source,t._owner,t.props)},l.cloneElement=function(t,e,n){var s,p=i({},t.props),f=t.key,d=t.ref,h=(t._self,t._source,t._owner);if(null!=e){r(e)&&(d=e.ref,h=a.current),o(e)&&(f=""+e.key);var y;t.type&&t.type.defaultProps&&(y=t.type.defaultProps);for(s in e)u.call(e,s)&&!c.hasOwnProperty(s)&&(void 0===e[s]&&void 0!==y?p[s]=y[s]:p[s]=e[s])}var v=arguments.length-2;if(1===v)p.children=n;else if(v>1){for(var m=Array(v),g=0;g<v;g++)m[g]=arguments[g+2];p.children=m}return l(t.type,f,d,0,0,h,p)},l.isValidElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===s},e.exports=l},{10:10,17:17,25:25,26:26,7:7}],10:[function(t,e,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=r},{}],11:[function(t,e,n){"use strict";var r=(t(25),{isMounted:function(t){return!1},enqueueCallback:function(t,e){},enqueueForceUpdate:function(t){},enqueueReplaceState:function(t,e){},enqueueSetState:function(t,e){}});e.exports=r},{25:25}],12:[function(t,e,n){"use strict";var r={};e.exports=r},{}],13:[function(t,e,n){"use strict";var r=t(9),o=r.isValidElement,i=t(28);e.exports=i(o)},{28:28,9:9}],14:[function(t,e,n){"use strict";function r(t,e,n){this.props=t,this.context=e,this.refs=s,this.updater=n||u}function o(){}var i=t(26),a=t(6),u=t(11),s=t(23);o.prototype=a.prototype,r.prototype=new o,r.prototype.constructor=r,i(r.prototype,a.prototype),r.prototype.isPureReactComponent=!0,e.exports=r},{11:11,23:23,26:26,6:6}],15:[function(t,e,n){"use strict";var r=t(26),o=t(3),i=r(o,{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:t(7)}});e.exports=i},{26:26,3:3,7:7}],16:[function(t,e,n){"use strict";e.exports="15.5.1"},{}],17:[function(t,e,n){"use strict";e.exports=!1},{}],18:[function(t,e,n){"use strict";function r(t){var e=t&&(o&&t[o]||t[i]);if("function"==typeof e)return e}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";e.exports=r},{}],19:[function(t,e,n){"use strict";function r(t){return i.isValidElement(t)||o("143"),t}var o=t(20),i=t(9);t(24);e.exports=r},{20:20,24:24,9:9}],20:[function(t,e,n){"use strict";function r(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}e.exports=r},{}],21:[function(t,e,n){"use strict";function r(t,e){return t&&"object"==typeof t&&null!=t.key?c.escape(t.key):e.toString(36)}function o(t,e,n,i){var f=typeof t;if("undefined"!==f&&"boolean"!==f||(t=null),null===t||"string"===f||"number"===f||"object"===f&&t.$$typeof===u)return n(i,t,""===e?l+r(t,0):e),1;var d,h,y=0,v=""===e?l:e+p;if(Array.isArray(t))for(var m=0;m<t.length;m++)d=t[m],h=v+r(d,m),y+=o(d,h,n,i);else{var g=s(t);if(g){var b,E=g.call(t);if(g!==t.entries)for(var _=0;!(b=E.next()).done;)d=b.value,h=v+r(d,_++),y+=o(d,h,n,i);else for(;!(b=E.next()).done;){var P=b.value;P&&(d=P[1],h=v+c.escape(P[0])+p+r(d,0),y+=o(d,h,n,i))}}else if("object"===f){var x=String(t);a("31","[object Object]"===x?"object with keys {"+Object.keys(t).join(", ")+"}":x,"")}}return y}function i(t,e,n){return null==t?0:o(t,"",e,n)}var a=t(20),u=(t(7),t(10)),s=t(18),c=(t(24),t(1)),l=(t(25),"."),p=":";e.exports=i},{1:1,10:10,18:18,20:20,24:24,25:25,7:7}],22:[function(t,e,n){"use strict";function r(t){return function(){return t}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(t){return t},e.exports=o},{}],23:[function(t,e,n){"use strict";var r={};e.exports=r},{}],24:[function(t,e,n){"use strict";function r(t,e,n,r,i,a,u,s){if(o(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,u,s],p=0;c=new Error(e.replace(/%s/g,function(){return l[p++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var o=function(t){};e.exports=r},{}],25:[function(t,e,n){"use strict";var r=t(22),o=r;e.exports=o},{22:22}],26:[function(t,e,n){"use strict";function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,u,s=r(t),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var l in n)i.call(n,l)&&(s[l]=n[l]);if(o){u=o(n);for(var p=0;p<u.length;p++)a.call(n,u[p])&&(s[u[p]]=n[u[p]])}}return s}},{}],27:[function(t,e,n){"use strict";function r(t,e,n,r,o){}t(24),t(25),t(29);e.exports=r},{24:24,25:25,29:29}],28:[function(t,e,n){"use strict";var r=(t(22),t(24)),o=(t(25),t(29),t(27));e.exports=function(t){function e(t){this.message=t,this.stack=""}var n,i=("function"==typeof Symbol&&Symbol.iterator,function(){r(!1,"React.PropTypes type checking code is stripped in production.")});i.isRequired=i;var a=function(){return i};return n={array:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:a,element:i,instanceOf:a,node:i,objectOf:a,oneOf:a,oneOfType:a,shape:a},e.prototype=Error.prototype,n.checkPropTypes=o,n.PropTypes=n,n}},{22:22,24:24,25:25,27:27,29:29}],29:[function(t,e,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},{}]},{},[15])(15)});
package/lib/React.js CHANGED
@@ -29,7 +29,9 @@ var createFactory = ReactElement.createFactory;
29
29
  var cloneElement = ReactElement.cloneElement;
30
30
 
31
31
  if (process.env.NODE_ENV !== 'production') {
32
+ var canDefineProperty = require('./canDefineProperty');
32
33
  var ReactElementValidator = require('./ReactElementValidator');
34
+ var didWarnPropTypesDeprecated = false;
33
35
  createElement = ReactElementValidator.createElement;
34
36
  createFactory = ReactElementValidator.createFactory;
35
37
  cloneElement = ReactElementValidator.cloneElement;
@@ -85,4 +87,17 @@ var React = {
85
87
  __spread: __spread
86
88
  };
87
89
 
90
+ // TODO: Fix tests so that this deprecation warning doesn't cause failures.
91
+ if (process.env.NODE_ENV !== 'production') {
92
+ if (canDefineProperty) {
93
+ Object.defineProperty(React, 'PropTypes', {
94
+ get: function () {
95
+ process.env.NODE_ENV !== 'production' ? warning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated. Use ' + 'the prop-types package from npm instead.') : void 0;
96
+ didWarnPropTypesDeprecated = true;
97
+ return ReactPropTypes;
98
+ }
99
+ });
100
+ }
101
+ }
102
+
88
103
  module.exports = React;
@@ -19,6 +19,8 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
19
19
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
20
20
 
21
21
  var React = require('./React');
22
+ var propTypesFactory = require('prop-types/factory');
23
+ var PropTypes = propTypesFactory(React.isValidElement);
22
24
 
23
25
  var ReactTransitionGroup = require('./ReactTransitionGroup');
24
26
  var ReactCSSTransitionGroupChild = require('./ReactCSSTransitionGroupChild');
@@ -87,9 +89,9 @@ ReactCSSTransitionGroup.displayName = 'ReactCSSTransitionGroup';
87
89
  ReactCSSTransitionGroup.propTypes = {
88
90
  transitionName: ReactCSSTransitionGroupChild.propTypes.name,
89
91
 
90
- transitionAppear: React.PropTypes.bool,
91
- transitionEnter: React.PropTypes.bool,
92
- transitionLeave: React.PropTypes.bool,
92
+ transitionAppear: PropTypes.bool,
93
+ transitionEnter: PropTypes.bool,
94
+ transitionLeave: PropTypes.bool,
93
95
  transitionAppearTimeout: createTransitionTimeoutPropValidator('Appear'),
94
96
  transitionEnterTimeout: createTransitionTimeoutPropValidator('Enter'),
95
97
  transitionLeaveTimeout: createTransitionTimeoutPropValidator('Leave')
@@ -10,9 +10,18 @@
10
10
 
11
11
  'use strict';
12
12
 
13
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
+
15
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
16
+
17
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
18
+
13
19
  var React = require('./React');
14
20
  var ReactAddonsDOMDependencies = require('./ReactAddonsDOMDependencies');
15
21
 
22
+ var propTypesFactory = require('prop-types/factory');
23
+ var PropTypes = propTypesFactory(React.isValidElement);
24
+
16
25
  var CSSCore = require('fbjs/lib/CSSCore');
17
26
  var ReactTransitionEvents = require('./ReactTransitionEvents');
18
27
 
@@ -20,110 +29,115 @@ var onlyChild = require('./onlyChild');
20
29
 
21
30
  var TICK = 17;
22
31
 
23
- var ReactCSSTransitionGroupChild = React.createClass({
24
- displayName: 'ReactCSSTransitionGroupChild',
25
-
26
- propTypes: {
27
- name: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.shape({
28
- enter: React.PropTypes.string,
29
- leave: React.PropTypes.string,
30
- active: React.PropTypes.string
31
- }), React.PropTypes.shape({
32
- enter: React.PropTypes.string,
33
- enterActive: React.PropTypes.string,
34
- leave: React.PropTypes.string,
35
- leaveActive: React.PropTypes.string,
36
- appear: React.PropTypes.string,
37
- appearActive: React.PropTypes.string
38
- })]).isRequired,
39
-
40
- // Once we require timeouts to be specified, we can remove the
41
- // boolean flags (appear etc.) and just accept a number
42
- // or a bool for the timeout flags (appearTimeout etc.)
43
- appear: React.PropTypes.bool,
44
- enter: React.PropTypes.bool,
45
- leave: React.PropTypes.bool,
46
- appearTimeout: React.PropTypes.number,
47
- enterTimeout: React.PropTypes.number,
48
- leaveTimeout: React.PropTypes.number
49
- },
50
-
51
- transition: function (animationType, finishCallback, userSpecifiedDelay) {
52
- var node = ReactAddonsDOMDependencies.getReactDOM().findDOMNode(this);
53
-
54
- if (!node) {
55
- if (finishCallback) {
56
- finishCallback();
57
- }
58
- return;
32
+ var ReactCSSTransitionGroupChild = function (_React$Component) {
33
+ _inherits(ReactCSSTransitionGroupChild, _React$Component);
34
+
35
+ function ReactCSSTransitionGroupChild() {
36
+ var _temp, _this, _ret;
37
+
38
+ _classCallCheck(this, ReactCSSTransitionGroupChild);
39
+
40
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
41
+ args[_key] = arguments[_key];
59
42
  }
60
43
 
61
- var className = this.props.name[animationType] || this.props.name + '-' + animationType;
62
- var activeClassName = this.props.name[animationType + 'Active'] || className + '-active';
63
- var timeout = null;
44
+ return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this._isMounted = false, _this.transition = function (animationType, finishCallback, userSpecifiedDelay) {
45
+ var node = ReactAddonsDOMDependencies.getReactDOM().findDOMNode(_this);
64
46
 
65
- var endListener = function (e) {
66
- if (e && e.target !== node) {
47
+ if (!node) {
48
+ if (finishCallback) {
49
+ finishCallback();
50
+ }
67
51
  return;
68
52
  }
69
53
 
70
- clearTimeout(timeout);
54
+ var className = _this.props.name[animationType] || _this.props.name + '-' + animationType;
55
+ var activeClassName = _this.props.name[animationType + 'Active'] || className + '-active';
56
+ var timeout = null;
71
57
 
72
- CSSCore.removeClass(node, className);
73
- CSSCore.removeClass(node, activeClassName);
58
+ var endListener = function (e) {
59
+ if (e && e.target !== node) {
60
+ return;
61
+ }
74
62
 
75
- ReactTransitionEvents.removeEndEventListener(node, endListener);
63
+ clearTimeout(timeout);
76
64
 
77
- // Usually this optional callback is used for informing an owner of
78
- // a leave animation and telling it to remove the child.
79
- if (finishCallback) {
80
- finishCallback();
81
- }
82
- };
83
-
84
- CSSCore.addClass(node, className);
65
+ CSSCore.removeClass(node, className);
66
+ CSSCore.removeClass(node, activeClassName);
85
67
 
86
- // Need to do this to actually trigger a transition.
87
- this.queueClassAndNode(activeClassName, node);
68
+ ReactTransitionEvents.removeEndEventListener(node, endListener);
88
69
 
89
- // If the user specified a timeout delay.
90
- if (userSpecifiedDelay) {
91
- // Clean-up the animation after the specified delay
92
- timeout = setTimeout(endListener, userSpecifiedDelay);
93
- this.transitionTimeouts.push(timeout);
94
- } else {
95
- // DEPRECATED: this listener will be removed in a future version of react
96
- ReactTransitionEvents.addEndEventListener(node, endListener);
97
- }
98
- },
70
+ // Usually this optional callback is used for informing an owner of
71
+ // a leave animation and telling it to remove the child.
72
+ if (finishCallback) {
73
+ finishCallback();
74
+ }
75
+ };
99
76
 
100
- queueClassAndNode: function (className, node) {
101
- this.classNameAndNodeQueue.push({
102
- className: className,
103
- node: node
104
- });
77
+ CSSCore.addClass(node, className);
105
78
 
106
- if (!this.timeout) {
107
- this.timeout = setTimeout(this.flushClassNameAndNodeQueue, TICK);
108
- }
109
- },
79
+ // Need to do this to actually trigger a transition.
80
+ _this.queueClassAndNode(activeClassName, node);
110
81
 
111
- flushClassNameAndNodeQueue: function () {
112
- if (this.isMounted()) {
113
- this.classNameAndNodeQueue.forEach(function (obj) {
114
- CSSCore.addClass(obj.node, obj.className);
82
+ // If the user specified a timeout delay.
83
+ if (userSpecifiedDelay) {
84
+ // Clean-up the animation after the specified delay
85
+ timeout = setTimeout(endListener, userSpecifiedDelay);
86
+ _this.transitionTimeouts.push(timeout);
87
+ } else {
88
+ // DEPRECATED: this listener will be removed in a future version of react
89
+ ReactTransitionEvents.addEndEventListener(node, endListener);
90
+ }
91
+ }, _this.queueClassAndNode = function (className, node) {
92
+ _this.classNameAndNodeQueue.push({
93
+ className: className,
94
+ node: node
115
95
  });
116
- }
117
- this.classNameAndNodeQueue.length = 0;
118
- this.timeout = null;
119
- },
120
96
 
121
- componentWillMount: function () {
97
+ if (!_this.timeout) {
98
+ _this.timeout = setTimeout(_this.flushClassNameAndNodeQueue, TICK);
99
+ }
100
+ }, _this.flushClassNameAndNodeQueue = function () {
101
+ if (_this._isMounted) {
102
+ _this.classNameAndNodeQueue.forEach(function (obj) {
103
+ CSSCore.addClass(obj.node, obj.className);
104
+ });
105
+ }
106
+ _this.classNameAndNodeQueue.length = 0;
107
+ _this.timeout = null;
108
+ }, _this.componentWillAppear = function (done) {
109
+ if (_this.props.appear) {
110
+ _this.transition('appear', done, _this.props.appearTimeout);
111
+ } else {
112
+ done();
113
+ }
114
+ }, _this.componentWillEnter = function (done) {
115
+ if (_this.props.enter) {
116
+ _this.transition('enter', done, _this.props.enterTimeout);
117
+ } else {
118
+ done();
119
+ }
120
+ }, _this.componentWillLeave = function (done) {
121
+ if (_this.props.leave) {
122
+ _this.transition('leave', done, _this.props.leaveTimeout);
123
+ } else {
124
+ done();
125
+ }
126
+ }, _temp), _possibleConstructorReturn(_this, _ret);
127
+ }
128
+
129
+ ReactCSSTransitionGroupChild.prototype.componentWillMount = function componentWillMount() {
122
130
  this.classNameAndNodeQueue = [];
123
131
  this.transitionTimeouts = [];
124
- },
132
+ };
133
+
134
+ ReactCSSTransitionGroupChild.prototype.componentDidMount = function componentDidMount() {
135
+ this._isMounted = true;
136
+ };
137
+
138
+ ReactCSSTransitionGroupChild.prototype.componentWillUnmount = function componentWillUnmount() {
139
+ this._isMounted = false;
125
140
 
126
- componentWillUnmount: function () {
127
141
  if (this.timeout) {
128
142
  clearTimeout(this.timeout);
129
143
  }
@@ -132,35 +146,39 @@ var ReactCSSTransitionGroupChild = React.createClass({
132
146
  });
133
147
 
134
148
  this.classNameAndNodeQueue.length = 0;
135
- },
149
+ };
136
150
 
137
- componentWillAppear: function (done) {
138
- if (this.props.appear) {
139
- this.transition('appear', done, this.props.appearTimeout);
140
- } else {
141
- done();
142
- }
143
- },
144
-
145
- componentWillEnter: function (done) {
146
- if (this.props.enter) {
147
- this.transition('enter', done, this.props.enterTimeout);
148
- } else {
149
- done();
150
- }
151
- },
152
-
153
- componentWillLeave: function (done) {
154
- if (this.props.leave) {
155
- this.transition('leave', done, this.props.leaveTimeout);
156
- } else {
157
- done();
158
- }
159
- },
160
-
161
- render: function () {
151
+ ReactCSSTransitionGroupChild.prototype.render = function render() {
162
152
  return onlyChild(this.props.children);
163
- }
164
- });
153
+ };
154
+
155
+ return ReactCSSTransitionGroupChild;
156
+ }(React.Component);
157
+
158
+ ReactCSSTransitionGroupChild.propTypes = {
159
+ name: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
160
+ enter: PropTypes.string,
161
+ leave: PropTypes.string,
162
+ active: PropTypes.string
163
+ }), PropTypes.shape({
164
+ enter: PropTypes.string,
165
+ enterActive: PropTypes.string,
166
+ leave: PropTypes.string,
167
+ leaveActive: PropTypes.string,
168
+ appear: PropTypes.string,
169
+ appearActive: PropTypes.string
170
+ })]).isRequired,
171
+
172
+ // Once we require timeouts to be specified, we can remove the
173
+ // boolean flags (appear etc.) and just accept a number
174
+ // or a bool for the timeout flags (appearTimeout etc.)
175
+ appear: PropTypes.bool,
176
+ enter: PropTypes.bool,
177
+ leave: PropTypes.bool,
178
+ appearTimeout: PropTypes.number,
179
+ enterTimeout: PropTypes.number,
180
+ leaveTimeout: PropTypes.number
181
+ };
182
+
165
183
 
166
184
  module.exports = ReactCSSTransitionGroupChild;
package/lib/ReactClass.js CHANGED
@@ -151,7 +151,6 @@ var ReactClassInterface = {
151
151
  * }
152
152
  *
153
153
  * @return {ReactComponent}
154
- * @nosideeffects
155
154
  * @required
156
155
  */
157
156
  render: 'DEFINE_ONCE',
@@ -607,6 +606,8 @@ var ReactClassMixin = {
607
606
  var ReactClassComponent = function () {};
608
607
  _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
609
608
 
609
+ var didWarnDeprecated = false;
610
+
610
611
  /**
611
612
  * Module for creating composite components.
612
613
  *
@@ -623,6 +624,11 @@ var ReactClass = {
623
624
  * @public
624
625
  */
625
626
  createClass: function (spec) {
627
+ if (process.env.NODE_ENV !== 'production') {
628
+ process.env.NODE_ENV !== 'production' ? warning(didWarnDeprecated, '%s: React.createClass is deprecated and will be removed in version 16. ' + 'Use plain JavaScript classes instead. If you\'re not yet ready to ' + 'migrate, create-react-class is available on npm as a ' + 'drop-in replacement.', spec && spec.displayName || 'A Component') : void 0;
629
+ didWarnDeprecated = true;
630
+ }
631
+
626
632
  // To keep our warnings more understandable, we'll use a little hack here to
627
633
  // ensure that Constructor.name !== 'Constructor'. This makes sure we don't
628
634
  // unnecessarily identify a class without displayName as 'Constructor'.
@@ -37,6 +37,16 @@ function getDeclarationErrorAddendum() {
37
37
  return '';
38
38
  }
39
39
 
40
+ function getSourceInfoErrorAddendum(elementProps) {
41
+ if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
42
+ var source = elementProps.__source;
43
+ var fileName = source.fileName.replace(/^.*[\\\/]/, '');
44
+ var lineNumber = source.lineNumber;
45
+ return ' Check your code at ' + fileName + ':' + lineNumber + '.';
46
+ }
47
+ return '';
48
+ }
49
+
40
50
  /**
41
51
  * Warn if there's no key explicitly set on dynamic arrays of children or
42
52
  * object keys are not valid. This allows us to keep track of children between
@@ -167,7 +177,16 @@ var ReactElementValidator = {
167
177
  if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
168
178
  info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
169
179
  }
170
- info += getDeclarationErrorAddendum();
180
+
181
+ var sourceInfo = getSourceInfoErrorAddendum(props);
182
+ if (sourceInfo) {
183
+ info += sourceInfo;
184
+ } else {
185
+ info += getDeclarationErrorAddendum();
186
+ }
187
+
188
+ info += ReactComponentTreeHook.getCurrentStackAddendum();
189
+
171
190
  process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;
172
191
  }
173
192
  }
@@ -10,424 +10,9 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- var ReactElement = require('./ReactElement');
14
- var ReactPropTypeLocationNames = require('./ReactPropTypeLocationNames');
15
- var ReactPropTypesSecret = require('./ReactPropTypesSecret');
13
+ var _require = require('./ReactElement'),
14
+ isValidElement = _require.isValidElement;
16
15
 
17
- var emptyFunction = require('fbjs/lib/emptyFunction');
18
- var getIteratorFn = require('./getIteratorFn');
19
- var warning = require('fbjs/lib/warning');
16
+ var factory = require('prop-types/factory');
20
17
 
21
- /**
22
- * Collection of methods that allow declaration and validation of props that are
23
- * supplied to React components. Example usage:
24
- *
25
- * var Props = require('ReactPropTypes');
26
- * var MyArticle = React.createClass({
27
- * propTypes: {
28
- * // An optional string prop named "description".
29
- * description: Props.string,
30
- *
31
- * // A required enum prop named "category".
32
- * category: Props.oneOf(['News','Photos']).isRequired,
33
- *
34
- * // A prop named "dialog" that requires an instance of Dialog.
35
- * dialog: Props.instanceOf(Dialog).isRequired
36
- * },
37
- * render: function() { ... }
38
- * });
39
- *
40
- * A more formal specification of how these methods are used:
41
- *
42
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
43
- * decl := ReactPropTypes.{type}(.isRequired)?
44
- *
45
- * Each and every declaration produces a function with the same signature. This
46
- * allows the creation of custom validation functions. For example:
47
- *
48
- * var MyLink = React.createClass({
49
- * propTypes: {
50
- * // An optional string or URI prop named "href".
51
- * href: function(props, propName, componentName) {
52
- * var propValue = props[propName];
53
- * if (propValue != null && typeof propValue !== 'string' &&
54
- * !(propValue instanceof URI)) {
55
- * return new Error(
56
- * 'Expected a string or an URI for ' + propName + ' in ' +
57
- * componentName
58
- * );
59
- * }
60
- * }
61
- * },
62
- * render: function() {...}
63
- * });
64
- *
65
- * @internal
66
- */
67
-
68
- var ANONYMOUS = '<<anonymous>>';
69
-
70
- var ReactPropTypes = {
71
- array: createPrimitiveTypeChecker('array'),
72
- bool: createPrimitiveTypeChecker('boolean'),
73
- func: createPrimitiveTypeChecker('function'),
74
- number: createPrimitiveTypeChecker('number'),
75
- object: createPrimitiveTypeChecker('object'),
76
- string: createPrimitiveTypeChecker('string'),
77
- symbol: createPrimitiveTypeChecker('symbol'),
78
-
79
- any: createAnyTypeChecker(),
80
- arrayOf: createArrayOfTypeChecker,
81
- element: createElementTypeChecker(),
82
- instanceOf: createInstanceTypeChecker,
83
- node: createNodeChecker(),
84
- objectOf: createObjectOfTypeChecker,
85
- oneOf: createEnumTypeChecker,
86
- oneOfType: createUnionTypeChecker,
87
- shape: createShapeTypeChecker
88
- };
89
-
90
- /**
91
- * inlined Object.is polyfill to avoid requiring consumers ship their own
92
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
93
- */
94
- /*eslint-disable no-self-compare*/
95
- function is(x, y) {
96
- // SameValue algorithm
97
- if (x === y) {
98
- // Steps 1-5, 7-10
99
- // Steps 6.b-6.e: +0 != -0
100
- return x !== 0 || 1 / x === 1 / y;
101
- } else {
102
- // Step 6.a: NaN == NaN
103
- return x !== x && y !== y;
104
- }
105
- }
106
- /*eslint-enable no-self-compare*/
107
-
108
- /**
109
- * We use an Error-like object for backward compatibility as people may call
110
- * PropTypes directly and inspect their output. However we don't use real
111
- * Errors anymore. We don't inspect their stack anyway, and creating them
112
- * is prohibitively expensive if they are created too often, such as what
113
- * happens in oneOfType() for any type before the one that matched.
114
- */
115
- function PropTypeError(message) {
116
- this.message = message;
117
- this.stack = '';
118
- }
119
- // Make `instanceof Error` still work for returned errors.
120
- PropTypeError.prototype = Error.prototype;
121
-
122
- function createChainableTypeChecker(validate) {
123
- if (process.env.NODE_ENV !== 'production') {
124
- var manualPropTypeCallCache = {};
125
- }
126
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
127
- componentName = componentName || ANONYMOUS;
128
- propFullName = propFullName || propName;
129
- if (process.env.NODE_ENV !== 'production') {
130
- if (secret !== ReactPropTypesSecret && typeof console !== 'undefined') {
131
- var cacheKey = componentName + ':' + propName;
132
- if (!manualPropTypeCallCache[cacheKey]) {
133
- process.env.NODE_ENV !== 'production' ? warning(false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will not work in production with the next major version. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName) : void 0;
134
- manualPropTypeCallCache[cacheKey] = true;
135
- }
136
- }
137
- }
138
- if (props[propName] == null) {
139
- var locationName = ReactPropTypeLocationNames[location];
140
- if (isRequired) {
141
- if (props[propName] === null) {
142
- return new PropTypeError('The ' + locationName + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
143
- }
144
- return new PropTypeError('The ' + locationName + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
145
- }
146
- return null;
147
- } else {
148
- return validate(props, propName, componentName, location, propFullName);
149
- }
150
- }
151
-
152
- var chainedCheckType = checkType.bind(null, false);
153
- chainedCheckType.isRequired = checkType.bind(null, true);
154
-
155
- return chainedCheckType;
156
- }
157
-
158
- function createPrimitiveTypeChecker(expectedType) {
159
- function validate(props, propName, componentName, location, propFullName, secret) {
160
- var propValue = props[propName];
161
- var propType = getPropType(propValue);
162
- if (propType !== expectedType) {
163
- var locationName = ReactPropTypeLocationNames[location];
164
- // `propValue` being instance of, say, date/regexp, pass the 'object'
165
- // check, but we can offer a more precise error message here rather than
166
- // 'of type `object`'.
167
- var preciseType = getPreciseType(propValue);
168
-
169
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
170
- }
171
- return null;
172
- }
173
- return createChainableTypeChecker(validate);
174
- }
175
-
176
- function createAnyTypeChecker() {
177
- return createChainableTypeChecker(emptyFunction.thatReturns(null));
178
- }
179
-
180
- function createArrayOfTypeChecker(typeChecker) {
181
- function validate(props, propName, componentName, location, propFullName) {
182
- if (typeof typeChecker !== 'function') {
183
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
184
- }
185
- var propValue = props[propName];
186
- if (!Array.isArray(propValue)) {
187
- var locationName = ReactPropTypeLocationNames[location];
188
- var propType = getPropType(propValue);
189
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
190
- }
191
- for (var i = 0; i < propValue.length; i++) {
192
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
193
- if (error instanceof Error) {
194
- return error;
195
- }
196
- }
197
- return null;
198
- }
199
- return createChainableTypeChecker(validate);
200
- }
201
-
202
- function createElementTypeChecker() {
203
- function validate(props, propName, componentName, location, propFullName) {
204
- var propValue = props[propName];
205
- if (!ReactElement.isValidElement(propValue)) {
206
- var locationName = ReactPropTypeLocationNames[location];
207
- var propType = getPropType(propValue);
208
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
209
- }
210
- return null;
211
- }
212
- return createChainableTypeChecker(validate);
213
- }
214
-
215
- function createInstanceTypeChecker(expectedClass) {
216
- function validate(props, propName, componentName, location, propFullName) {
217
- if (!(props[propName] instanceof expectedClass)) {
218
- var locationName = ReactPropTypeLocationNames[location];
219
- var expectedClassName = expectedClass.name || ANONYMOUS;
220
- var actualClassName = getClassName(props[propName]);
221
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
222
- }
223
- return null;
224
- }
225
- return createChainableTypeChecker(validate);
226
- }
227
-
228
- function createEnumTypeChecker(expectedValues) {
229
- if (!Array.isArray(expectedValues)) {
230
- process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
231
- return emptyFunction.thatReturnsNull;
232
- }
233
-
234
- function validate(props, propName, componentName, location, propFullName) {
235
- var propValue = props[propName];
236
- for (var i = 0; i < expectedValues.length; i++) {
237
- if (is(propValue, expectedValues[i])) {
238
- return null;
239
- }
240
- }
241
-
242
- var locationName = ReactPropTypeLocationNames[location];
243
- var valuesString = JSON.stringify(expectedValues);
244
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
245
- }
246
- return createChainableTypeChecker(validate);
247
- }
248
-
249
- function createObjectOfTypeChecker(typeChecker) {
250
- function validate(props, propName, componentName, location, propFullName) {
251
- if (typeof typeChecker !== 'function') {
252
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
253
- }
254
- var propValue = props[propName];
255
- var propType = getPropType(propValue);
256
- if (propType !== 'object') {
257
- var locationName = ReactPropTypeLocationNames[location];
258
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
259
- }
260
- for (var key in propValue) {
261
- if (propValue.hasOwnProperty(key)) {
262
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
263
- if (error instanceof Error) {
264
- return error;
265
- }
266
- }
267
- }
268
- return null;
269
- }
270
- return createChainableTypeChecker(validate);
271
- }
272
-
273
- function createUnionTypeChecker(arrayOfTypeCheckers) {
274
- if (!Array.isArray(arrayOfTypeCheckers)) {
275
- process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
276
- return emptyFunction.thatReturnsNull;
277
- }
278
-
279
- function validate(props, propName, componentName, location, propFullName) {
280
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
281
- var checker = arrayOfTypeCheckers[i];
282
- if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
283
- return null;
284
- }
285
- }
286
-
287
- var locationName = ReactPropTypeLocationNames[location];
288
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
289
- }
290
- return createChainableTypeChecker(validate);
291
- }
292
-
293
- function createNodeChecker() {
294
- function validate(props, propName, componentName, location, propFullName) {
295
- if (!isNode(props[propName])) {
296
- var locationName = ReactPropTypeLocationNames[location];
297
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
298
- }
299
- return null;
300
- }
301
- return createChainableTypeChecker(validate);
302
- }
303
-
304
- function createShapeTypeChecker(shapeTypes) {
305
- function validate(props, propName, componentName, location, propFullName) {
306
- var propValue = props[propName];
307
- var propType = getPropType(propValue);
308
- if (propType !== 'object') {
309
- var locationName = ReactPropTypeLocationNames[location];
310
- return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
311
- }
312
- for (var key in shapeTypes) {
313
- var checker = shapeTypes[key];
314
- if (!checker) {
315
- continue;
316
- }
317
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
318
- if (error) {
319
- return error;
320
- }
321
- }
322
- return null;
323
- }
324
- return createChainableTypeChecker(validate);
325
- }
326
-
327
- function isNode(propValue) {
328
- switch (typeof propValue) {
329
- case 'number':
330
- case 'string':
331
- case 'undefined':
332
- return true;
333
- case 'boolean':
334
- return !propValue;
335
- case 'object':
336
- if (Array.isArray(propValue)) {
337
- return propValue.every(isNode);
338
- }
339
- if (propValue === null || ReactElement.isValidElement(propValue)) {
340
- return true;
341
- }
342
-
343
- var iteratorFn = getIteratorFn(propValue);
344
- if (iteratorFn) {
345
- var iterator = iteratorFn.call(propValue);
346
- var step;
347
- if (iteratorFn !== propValue.entries) {
348
- while (!(step = iterator.next()).done) {
349
- if (!isNode(step.value)) {
350
- return false;
351
- }
352
- }
353
- } else {
354
- // Iterator will provide entry [k,v] tuples rather than values.
355
- while (!(step = iterator.next()).done) {
356
- var entry = step.value;
357
- if (entry) {
358
- if (!isNode(entry[1])) {
359
- return false;
360
- }
361
- }
362
- }
363
- }
364
- } else {
365
- return false;
366
- }
367
-
368
- return true;
369
- default:
370
- return false;
371
- }
372
- }
373
-
374
- function isSymbol(propType, propValue) {
375
- // Native Symbol.
376
- if (propType === 'symbol') {
377
- return true;
378
- }
379
-
380
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
381
- if (propValue['@@toStringTag'] === 'Symbol') {
382
- return true;
383
- }
384
-
385
- // Fallback for non-spec compliant Symbols which are polyfilled.
386
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
387
- return true;
388
- }
389
-
390
- return false;
391
- }
392
-
393
- // Equivalent of `typeof` but with special handling for array and regexp.
394
- function getPropType(propValue) {
395
- var propType = typeof propValue;
396
- if (Array.isArray(propValue)) {
397
- return 'array';
398
- }
399
- if (propValue instanceof RegExp) {
400
- // Old webkits (at least until Android 4.0) return 'function' rather than
401
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
402
- // passes PropTypes.object.
403
- return 'object';
404
- }
405
- if (isSymbol(propType, propValue)) {
406
- return 'symbol';
407
- }
408
- return propType;
409
- }
410
-
411
- // This handles more types than `getPropType`. Only used for error messages.
412
- // See `createPrimitiveTypeChecker`.
413
- function getPreciseType(propValue) {
414
- var propType = getPropType(propValue);
415
- if (propType === 'object') {
416
- if (propValue instanceof Date) {
417
- return 'date';
418
- } else if (propValue instanceof RegExp) {
419
- return 'regexp';
420
- }
421
- }
422
- return propType;
423
- }
424
-
425
- // Returns class name of the object, if any.
426
- function getClassName(propValue) {
427
- if (!propValue.constructor || !propValue.constructor.name) {
428
- return ANONYMOUS;
429
- }
430
- return propValue.constructor.name;
431
- }
432
-
433
- module.exports = ReactPropTypes;
18
+ module.exports = factory(isValidElement);