Changeset 7156


Ignore:
Timestamp:
10/24/17 17:19:13 (7 years ago)
Author:
Leif-Jöran
Message:

Upgrading to use React v16.0.0

Location:
SRUAggregator/trunk
Files:
4 added
4 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • SRUAggregator/trunk/bower.json

    r7148 r7156  
    2727    "bootstrap": "^3.3.6",
    2828    "font-awesome": "^4.6.3",
    29     "react": "^15.6.1"
     29    "react": "^16.0.0"
    3030  },
    3131  "resolutions": {
  • SRUAggregator/trunk/build.sh

    r7148 r7156  
    5555        mkdir -p $JSDIR
    5656
    57         npm install bower browserify babelify babel-cli babel-preset-es2015 babel-preset-react babel-preset-env prop-types create-react-class react-transition-group react-i18next codemirror
     57        npm install bower browserify babelify babel-cli babel-preset-es2015 babel-preset-react babel-preset-env prop-types create-react-class react-addons-linked-state-mixin react-transition-group react-i18next codemirror
    5858        node_modules/bower/bin/bower install jquery bootstrap react font-awesome
    5959
     
    6363        cp bower_components/jquery/dist/jquery.min.js $LIBDIR/
    6464        cp bower_components/jquery/dist/jquery.min.map $LIBDIR/
    65         cp bower_components/react/react-with-addons.js $LIBDIR/
    66         cp bower_components/react/react-with-addons.min.js $LIBDIR/
    67         cp bower_components/react/react-dom.js $LIBDIR/
    68         cp bower_components/react/react-dom.min.js $LIBDIR/
     65        cp bower_components/react/react.development.js $LIBDIR/
     66        cp bower_components/react/react.production.min.js $LIBDIR/
     67        cp bower_components/react/react-dom.development.js $LIBDIR/
     68        cp bower_components/react/react-dom.production.min.js $LIBDIR/
    6969        cp bower_components/font-awesome/css/font-awesome.min.css $LIBDIR/
    7070        cp bower_components/bootstrap/fonts/*  $FONTDIR/
  • SRUAggregator/trunk/package.json

    r7148 r7156  
    77  "dependencies": {
    88    "classnames": "^2.2.5",
    9     "codemirror": "^5.30.0",
    10     "create-react-class": "^15.6.0",
    11     "prop-types": "^15.5.10",
    12     "react": "^15.6.1",
     9    "codemirror": "^5.31.0",
     10    "create-react-class": "^15.6.2",
     11    "prop-types": "^15.6.0",
     12    "react": "^16.0.0",
     13    "react-addons-linked-state-mixin": "^15.6.2",
    1314    "react-bootstrap": "^0.31.3",
    14     "react-i18next": "^5.4.0",
    15     "react-transition-group": "^2.2.0"
     15    "react-dom": "^16.0.0",
     16    "react-i18next": "^5.4.1",
     17    "react-transition-group": "^2.2.1"
    1618  },
    1719  "devDependencies": {
    18     "babel-cli": "^6.10.1",
    19     "babel-preset-env": "^1.6.0",
    20     "babel-preset-es2015": "^6.9.0",
    21     "babel-preset-react": "^6.11.1",
     20    "babel-cli": "^6.26.0",
     21    "babel-preset-env": "^1.6.1",
     22    "babel-preset-es2015": "^6.24.1",
     23    "babel-preset-react": "^6.24.1",
    2224    "babelify": "^7.3.0",
    23     "bower": "^1.7.9",
    24     "browserify": "^13.0.1",
     25    "bower": "^1.8.2",
     26    "browserify": "^13.3.0",
    2527    "reflux": "^0.4.1",
    2628    "reflux-core": "^0.3.0",
    2729    "reflux-promise": "^1.0.4",
    28     "webpack": "^1.13.1"
     30    "webpack": "^1.15.0"
    2931  },
    3032  "scripts": {
  • SRUAggregator/trunk/src/main/resources/assets/index.html

    r7148 r7156  
    5151
    5252        <script src="lib/jquery.min.js"></script>
    53         <script src="lib/react-with-addons.js"></script>
    54         <script src="lib/react-dom.js"></script>
     53        <script src="lib/react.production.min.js"></script>
     54        <script src="lib/react-dom.production.min.js"></script>
    5555        <script src="lib/bootstrap.min.js"></script>
    5656        <script src="js/main.js"></script>
  • SRUAggregator/trunk/src/main/resources/assets/js/components/languageselector.jsx

    r7148 r7156  
    33import PropTypes from "prop-types";
    44import createReactClass from "create-react-class";
     5import LinkedStateMixin from "react-addons-linked-state-mixin";
    56
    67var PT = PropTypes;
     
    1415                languageChangeHandler: PT.func.isRequired,
    1516        },
    16         mixins: [React.addons.LinkedStateMixin],
     17        mixins: [LinkedStateMixin],
    1718//fixme! - react-addons-linked-state-mixin - Explicitly set the value and onChange handler instead.
    1819        selectLang: function(language) {
  • SRUAggregator/trunk/src/main/resources/assets/js/main.js

    r7148 r7156  
    11(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
    2 // shim for using process in browser
    3 
    4 var process = module.exports = {};
    5 
    6 // cached from whatever global is present so that test runners that stub it
    7 // don't break things.  But we need to wrap it in a try catch in case it is
    8 // wrapped in strict mode code which doesn't define any globals.  It's inside a
    9 // function because try/catches deoptimize in certain engines.
    10 
    11 var cachedSetTimeout;
    12 var cachedClearTimeout;
    13 
    14 (function () {
    15   try {
    16     cachedSetTimeout = setTimeout;
    17   } catch (e) {
    18     cachedSetTimeout = function () {
    19       throw new Error('setTimeout is not defined');
    20     }
    21   }
    22   try {
    23     cachedClearTimeout = clearTimeout;
    24   } catch (e) {
    25     cachedClearTimeout = function () {
    26       throw new Error('clearTimeout is not defined');
    27     }
    28   }
    29 } ())
    30 var queue = [];
    31 var draining = false;
    32 var currentQueue;
    33 var queueIndex = -1;
    34 
    35 function cleanUpNextTick() {
    36     if (!draining || !currentQueue) {
    37         return;
    38     }
    39     draining = false;
    40     if (currentQueue.length) {
    41         queue = currentQueue.concat(queue);
    42     } else {
    43         queueIndex = -1;
    44     }
    45     if (queue.length) {
    46         drainQueue();
    47     }
    48 }
    49 
    50 function drainQueue() {
    51     if (draining) {
    52         return;
    53     }
    54     var timeout = cachedSetTimeout(cleanUpNextTick);
    55     draining = true;
    56 
    57     var len = queue.length;
    58     while(len) {
    59         currentQueue = queue;
    60         queue = [];
    61         while (++queueIndex < len) {
    62             if (currentQueue) {
    63                 currentQueue[queueIndex].run();
    64             }
    65         }
    66         queueIndex = -1;
    67         len = queue.length;
    68     }
    69     currentQueue = null;
    70     draining = false;
    71     cachedClearTimeout(timeout);
    72 }
    73 
    74 process.nextTick = function (fun) {
    75     var args = new Array(arguments.length - 1);
    76     if (arguments.length > 1) {
    77         for (var i = 1; i < arguments.length; i++) {
    78             args[i - 1] = arguments[i];
    79         }
    80     }
    81     queue.push(new Item(fun, args));
    82     if (queue.length === 1 && !draining) {
    83         cachedSetTimeout(drainQueue, 0);
    84     }
    85 };
    86 
    87 // v8 likes predictible objects
    88 function Item(fun, array) {
    89     this.fun = fun;
    90     this.array = array;
    91 }
    92 Item.prototype.run = function () {
    93     this.fun.apply(null, this.array);
    94 };
    95 process.title = 'browser';
    96 process.browser = true;
    97 process.env = {};
    98 process.argv = [];
    99 process.version = ''; // empty string to avoid regexp issues
    100 process.versions = {};
    101 
    102 function noop() {}
    103 
    104 process.on = noop;
    105 process.addListener = noop;
    106 process.once = noop;
    107 process.off = noop;
    108 process.removeListener = noop;
    109 process.removeAllListeners = noop;
    110 process.emit = noop;
    111 
    112 process.binding = function (name) {
    113     throw new Error('process.binding is not supported');
    114 };
    115 
    116 process.cwd = function () { return '/' };
    117 process.chdir = function (dir) {
    118     throw new Error('process.chdir is not supported');
    119 };
    120 process.umask = function() { return 0; };
    121 
    122 },{}],2:[function(require,module,exports){
    1232/*!
    1243  Copyright (c) 2016 Jed Watson.
     
    17049}());
    17150
    172 },{}],3:[function(require,module,exports){
     51},{}],2:[function(require,module,exports){
    17352(function (process){
    17453/**
    175  * Copyright 2013-present, Facebook, Inc.
    176  * All rights reserved.
    177  *
    178  * This source code is licensed under the BSD-style license found in the
    179  * LICENSE file in the root directory of this source tree. An additional grant
    180  * of patent rights can be found in the PATENTS file in the same directory.
     54 * Copyright (c) 2013-present, Facebook, Inc.
     55 *
     56 * This source code is licensed under the MIT license found in the
     57 * LICENSE file in the root directory of this source tree.
    18158 *
    18259 */
     
    1046923
    1047924}).call(this,require('_process'))
    1048 },{"_process":1,"fbjs/lib/emptyObject":16,"fbjs/lib/invariant":23,"fbjs/lib/warning":30,"object-assign":31}],4:[function(require,module,exports){
     925},{"_process":26,"fbjs/lib/emptyObject":13,"fbjs/lib/invariant":18,"fbjs/lib/warning":24,"object-assign":25}],3:[function(require,module,exports){
    1049926/**
    1050  * Copyright 2013-present, Facebook, Inc.
    1051  * All rights reserved.
    1052  *
    1053  * This source code is licensed under the BSD-style license found in the
    1054  * LICENSE file in the root directory of this source tree. An additional grant
    1055  * of patent rights can be found in the PATENTS file in the same directory.
     927 * Copyright (c) 2013-present, Facebook, Inc.
     928 *
     929 * This source code is licensed under the MIT license found in the
     930 * LICENSE file in the root directory of this source tree.
    1056931 *
    1057932 */
     
    1078953);
    1079954
    1080 },{"./factory":3,"react":196}],5:[function(require,module,exports){
     955},{"./factory":2,"react":44}],4:[function(require,module,exports){
    1081956'use strict';
    1082957
     
    1096971}
    1097972module.exports = exports['default'];
    1098 },{"./hasClass":6}],6:[function(require,module,exports){
     973},{"./hasClass":5}],5:[function(require,module,exports){
    1099974"use strict";
    1100975
     
    1107982}
    1108983module.exports = exports["default"];
    1109 },{}],7:[function(require,module,exports){
     984},{}],6:[function(require,module,exports){
    1110985'use strict';
    1111986
     
    1113988  if (element.classList) element.classList.remove(className);else element.className = element.className.replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)', 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, '');
    1114989};
    1115 },{}],8:[function(require,module,exports){
     990},{}],7:[function(require,module,exports){
    1116991(function (process){
    1117992'use strict';
     
    1119994/**
    1120995 * Copyright (c) 2013-present, Facebook, Inc.
    1121  * All rights reserved.
    1122  *
    1123  * This source code is licensed under the BSD-style license found in the
    1124  * LICENSE file in the root directory of this source tree. An additional grant
    1125  * of patent rights can be found in the PATENTS file in the same directory.
     996 *
     997 * This source code is licensed under the MIT license found in the
     998 * LICENSE file in the root directory of this source tree.
    1126999 *
    11271000 * @typechecks
     
    11921065module.exports = EventListener;
    11931066}).call(this,require('_process'))
    1194 },{"./emptyFunction":15,"_process":1}],9:[function(require,module,exports){
     1067},{"./emptyFunction":12,"_process":26}],8:[function(require,module,exports){
    11951068/**
    11961069 * Copyright (c) 2013-present, Facebook, Inc.
    1197  * All rights reserved.
    1198  *
    1199  * This source code is licensed under the BSD-style license found in the
    1200  * LICENSE file in the root directory of this source tree. An additional grant
    1201  * of patent rights can be found in the PATENTS file in the same directory.
     1070 *
     1071 * This source code is licensed under the MIT license found in the
     1072 * LICENSE file in the root directory of this source tree.
    12021073 *
    12031074 */
     
    12281099
    12291100module.exports = ExecutionEnvironment;
    1230 },{}],10:[function(require,module,exports){
     1101},{}],9:[function(require,module,exports){
    12311102"use strict";
    12321103
    12331104/**
    12341105 * Copyright (c) 2013-present, Facebook, Inc.
    1235  * All rights reserved.
    1236  *
    1237  * This source code is licensed under the BSD-style license found in the
    1238  * LICENSE file in the root directory of this source tree. An additional grant
    1239  * of patent rights can be found in the PATENTS file in the same directory.
     1106 *
     1107 * This source code is licensed under the MIT license found in the
     1108 * LICENSE file in the root directory of this source tree.
    12401109 *
    12411110 * @typechecks
     
    12601129
    12611130module.exports = camelize;
    1262 },{}],11:[function(require,module,exports){
     1131},{}],10:[function(require,module,exports){
    12631132/**
    12641133 * Copyright (c) 2013-present, Facebook, Inc.
    1265  * All rights reserved.
    1266  *
    1267  * This source code is licensed under the BSD-style license found in the
    1268  * LICENSE file in the root directory of this source tree. An additional grant
    1269  * of patent rights can be found in the PATENTS file in the same directory.
     1134 *
     1135 * This source code is licensed under the MIT license found in the
     1136 * LICENSE file in the root directory of this source tree.
    12701137 *
    12711138 * @typechecks
     
    13001167
    13011168module.exports = camelizeStyleName;
    1302 },{"./camelize":10}],12:[function(require,module,exports){
     1169},{"./camelize":9}],11:[function(require,module,exports){
    13031170'use strict';
    13041171
    13051172/**
    13061173 * Copyright (c) 2013-present, Facebook, Inc.
    1307  * All rights reserved.
    1308  *
    1309  * This source code is licensed under the BSD-style license found in the
    1310  * LICENSE file in the root directory of this source tree. An additional grant
    1311  * of patent rights can be found in the PATENTS file in the same directory.
     1174 *
     1175 * This source code is licensed under the MIT license found in the
     1176 * LICENSE file in the root directory of this source tree.
    13121177 *
    13131178 *
     
    13401205
    13411206module.exports = containsNode;
    1342 },{"./isTextNode":25}],13:[function(require,module,exports){
    1343 (function (process){
    1344 'use strict';
     1207},{"./isTextNode":20}],12:[function(require,module,exports){
     1208"use strict";
    13451209
    13461210/**
    13471211 * Copyright (c) 2013-present, Facebook, Inc.
    1348  * All rights reserved.
    1349  *
    1350  * This source code is licensed under the BSD-style license found in the
    1351  * LICENSE file in the root directory of this source tree. An additional grant
    1352  * of patent rights can be found in the PATENTS file in the same directory.
    1353  *
    1354  * @typechecks
    1355  */
    1356 
    1357 var invariant = require('./invariant');
    1358 
    1359 /**
    1360  * Convert array-like objects to arrays.
    1361  *
    1362  * This API assumes the caller knows the contents of the data type. For less
    1363  * well defined inputs use createArrayFromMixed.
    1364  *
    1365  * @param {object|function|filelist} obj
    1366  * @return {array}
    1367  */
    1368 function toArray(obj) {
    1369   var length = obj.length;
    1370 
    1371   // Some browsers builtin objects can report typeof 'function' (e.g. NodeList
    1372   // in old versions of Safari).
    1373   !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;
    1374 
    1375   !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;
    1376 
    1377   !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;
    1378 
    1379   !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0;
    1380 
    1381   // Old IE doesn't give collections access to hasOwnProperty. Assume inputs
    1382   // without method will throw during the slice call and skip straight to the
    1383   // fallback.
    1384   if (obj.hasOwnProperty) {
    1385     try {
    1386       return Array.prototype.slice.call(obj);
    1387     } catch (e) {
    1388       // IE < 9 does not support Array#slice on collections objects
    1389     }
    1390   }
    1391 
    1392   // Fall back to copying key by key. This assumes all keys have a value,
    1393   // so will not preserve sparsely populated inputs.
    1394   var ret = Array(length);
    1395   for (var ii = 0; ii < length; ii++) {
    1396     ret[ii] = obj[ii];
    1397   }
    1398   return ret;
    1399 }
    1400 
    1401 /**
    1402  * Perform a heuristic test to determine if an object is "array-like".
    1403  *
    1404  *   A monk asked Joshu, a Zen master, "Has a dog Buddha nature?"
    1405  *   Joshu replied: "Mu."
    1406  *
    1407  * This function determines if its argument has "array nature": it returns
    1408  * true if the argument is an actual array, an `arguments' object, or an
    1409  * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).
    1410  *
    1411  * It will return false for other array-like objects like Filelist.
    1412  *
    1413  * @param {*} obj
    1414  * @return {boolean}
    1415  */
    1416 function hasArrayNature(obj) {
    1417   return (
    1418     // not null/false
    1419     !!obj && (
    1420     // arrays are objects, NodeLists are functions in Safari
    1421     typeof obj == 'object' || typeof obj == 'function') &&
    1422     // quacks like an array
    1423     'length' in obj &&
    1424     // not window
    1425     !('setInterval' in obj) &&
    1426     // no DOM node should be considered an array-like
    1427     // a 'select' element has 'length' and 'item' properties on IE8
    1428     typeof obj.nodeType != 'number' && (
    1429     // a real array
    1430     Array.isArray(obj) ||
    1431     // arguments
    1432     'callee' in obj ||
    1433     // HTMLCollection/NodeList
    1434     'item' in obj)
    1435   );
    1436 }
    1437 
    1438 /**
    1439  * Ensure that the argument is an array by wrapping it in an array if it is not.
    1440  * Creates a copy of the argument if it is already an array.
    1441  *
    1442  * This is mostly useful idiomatically:
    1443  *
    1444  *   var createArrayFromMixed = require('createArrayFromMixed');
    1445  *
    1446  *   function takesOneOrMoreThings(things) {
    1447  *     things = createArrayFromMixed(things);
    1448  *     ...
    1449  *   }
    1450  *
    1451  * This allows you to treat `things' as an array, but accept scalars in the API.
    1452  *
    1453  * If you need to convert an array-like object, like `arguments`, into an array
    1454  * use toArray instead.
    1455  *
    1456  * @param {*} obj
    1457  * @return {array}
    1458  */
    1459 function createArrayFromMixed(obj) {
    1460   if (!hasArrayNature(obj)) {
    1461     return [obj];
    1462   } else if (Array.isArray(obj)) {
    1463     return obj.slice();
    1464   } else {
    1465     return toArray(obj);
    1466   }
    1467 }
    1468 
    1469 module.exports = createArrayFromMixed;
    1470 }).call(this,require('_process'))
    1471 },{"./invariant":23,"_process":1}],14:[function(require,module,exports){
    1472 (function (process){
    1473 'use strict';
    1474 
    1475 /**
    1476  * Copyright (c) 2013-present, Facebook, Inc.
    1477  * All rights reserved.
    1478  *
    1479  * This source code is licensed under the BSD-style license found in the
    1480  * LICENSE file in the root directory of this source tree. An additional grant
    1481  * of patent rights can be found in the PATENTS file in the same directory.
    1482  *
    1483  * @typechecks
    1484  */
    1485 
    1486 /*eslint-disable fb-www/unsafe-html*/
    1487 
    1488 var ExecutionEnvironment = require('./ExecutionEnvironment');
    1489 
    1490 var createArrayFromMixed = require('./createArrayFromMixed');
    1491 var getMarkupWrap = require('./getMarkupWrap');
    1492 var invariant = require('./invariant');
    1493 
    1494 /**
    1495  * Dummy container used to render all markup.
    1496  */
    1497 var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
    1498 
    1499 /**
    1500  * Pattern used by `getNodeName`.
    1501  */
    1502 var nodeNamePattern = /^\s*<(\w+)/;
    1503 
    1504 /**
    1505  * Extracts the `nodeName` of the first element in a string of markup.
    1506  *
    1507  * @param {string} markup String of markup.
    1508  * @return {?string} Node name of the supplied markup.
    1509  */
    1510 function getNodeName(markup) {
    1511   var nodeNameMatch = markup.match(nodeNamePattern);
    1512   return nodeNameMatch && nodeNameMatch[1].toLowerCase();
    1513 }
    1514 
    1515 /**
    1516  * Creates an array containing the nodes rendered from the supplied markup. The
    1517  * optionally supplied `handleScript` function will be invoked once for each
    1518  * <script> element that is rendered. If no `handleScript` function is supplied,
    1519  * an exception is thrown if any <script> elements are rendered.
    1520  *
    1521  * @param {string} markup A string of valid HTML markup.
    1522  * @param {?function} handleScript Invoked once for each rendered <script>.
    1523  * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes.
    1524  */
    1525 function createNodesFromMarkup(markup, handleScript) {
    1526   var node = dummyNode;
    1527   !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0;
    1528   var nodeName = getNodeName(markup);
    1529 
    1530   var wrap = nodeName && getMarkupWrap(nodeName);
    1531   if (wrap) {
    1532     node.innerHTML = wrap[1] + markup + wrap[2];
    1533 
    1534     var wrapDepth = wrap[0];
    1535     while (wrapDepth--) {
    1536       node = node.lastChild;
    1537     }
    1538   } else {
    1539     node.innerHTML = markup;
    1540   }
    1541 
    1542   var scripts = node.getElementsByTagName('script');
    1543   if (scripts.length) {
    1544     !handleScript ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0;
    1545     createArrayFromMixed(scripts).forEach(handleScript);
    1546   }
    1547 
    1548   var nodes = Array.from(node.childNodes);
    1549   while (node.lastChild) {
    1550     node.removeChild(node.lastChild);
    1551   }
    1552   return nodes;
    1553 }
    1554 
    1555 module.exports = createNodesFromMarkup;
    1556 }).call(this,require('_process'))
    1557 },{"./ExecutionEnvironment":9,"./createArrayFromMixed":13,"./getMarkupWrap":19,"./invariant":23,"_process":1}],15:[function(require,module,exports){
    1558 "use strict";
    1559 
    1560 /**
    1561  * Copyright (c) 2013-present, Facebook, Inc.
    1562  * All rights reserved.
    1563  *
    1564  * This source code is licensed under the BSD-style license found in the
    1565  * LICENSE file in the root directory of this source tree. An additional grant
    1566  * of patent rights can be found in the PATENTS file in the same directory.
     1212 *
     1213 * This source code is licensed under the MIT license found in the
     1214 * LICENSE file in the root directory of this source tree.
    15671215 *
    15681216 *
     
    15941242
    15951243module.exports = emptyFunction;
    1596 },{}],16:[function(require,module,exports){
     1244},{}],13:[function(require,module,exports){
    15971245(function (process){
    15981246/**
    15991247 * Copyright (c) 2013-present, Facebook, Inc.
    1600  * All rights reserved.
    1601  *
    1602  * This source code is licensed under the BSD-style license found in the
    1603  * LICENSE file in the root directory of this source tree. An additional grant
    1604  * of patent rights can be found in the PATENTS file in the same directory.
     1248 *
     1249 * This source code is licensed under the MIT license found in the
     1250 * LICENSE file in the root directory of this source tree.
    16051251 *
    16061252 */
     
    16161262module.exports = emptyObject;
    16171263}).call(this,require('_process'))
    1618 },{"_process":1}],17:[function(require,module,exports){
     1264},{"_process":26}],14:[function(require,module,exports){
    16191265/**
    16201266 * Copyright (c) 2013-present, Facebook, Inc.
    1621  * All rights reserved.
    1622  *
    1623  * This source code is licensed under the BSD-style license found in the
    1624  * LICENSE file in the root directory of this source tree. An additional grant
    1625  * of patent rights can be found in the PATENTS file in the same directory.
     1267 *
     1268 * This source code is licensed under the MIT license found in the
     1269 * LICENSE file in the root directory of this source tree.
    16261270 *
    16271271 */
     
    16431287
    16441288module.exports = focusNode;
    1645 },{}],18:[function(require,module,exports){
     1289},{}],15:[function(require,module,exports){
    16461290'use strict';
    16471291
    16481292/**
    16491293 * Copyright (c) 2013-present, Facebook, Inc.
    1650  * All rights reserved.
    1651  *
    1652  * This source code is licensed under the BSD-style license found in the
    1653  * LICENSE file in the root directory of this source tree. An additional grant
    1654  * of patent rights can be found in the PATENTS file in the same directory.
     1294 *
     1295 * This source code is licensed under the MIT license found in the
     1296 * LICENSE file in the root directory of this source tree.
    16551297 *
    16561298 * @typechecks
     
    16821324
    16831325module.exports = getActiveElement;
    1684 },{}],19:[function(require,module,exports){
    1685 (function (process){
     1326},{}],16:[function(require,module,exports){
    16861327'use strict';
    16871328
    16881329/**
    16891330 * Copyright (c) 2013-present, Facebook, Inc.
    1690  * All rights reserved.
    1691  *
    1692  * This source code is licensed under the BSD-style license found in the
    1693  * LICENSE file in the root directory of this source tree. An additional grant
    1694  * of patent rights can be found in the PATENTS file in the same directory.
    1695  *
    1696  */
    1697 
    1698 /*eslint-disable fb-www/unsafe-html */
    1699 
    1700 var ExecutionEnvironment = require('./ExecutionEnvironment');
    1701 
    1702 var invariant = require('./invariant');
    1703 
    1704 /**
    1705  * Dummy container used to detect which wraps are necessary.
    1706  */
    1707 var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
    1708 
    1709 /**
    1710  * Some browsers cannot use `innerHTML` to render certain elements standalone,
    1711  * so we wrap them, render the wrapped nodes, then extract the desired node.
    1712  *
    1713  * In IE8, certain elements cannot render alone, so wrap all elements ('*').
    1714  */
    1715 
    1716 var shouldWrap = {};
    1717 
    1718 var selectWrap = [1, '<select multiple="true">', '</select>'];
    1719 var tableWrap = [1, '<table>', '</table>'];
    1720 var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
    1721 
    1722 var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>'];
    1723 
    1724 var markupWrap = {
    1725   '*': [1, '?<div>', '</div>'],
    1726 
    1727   'area': [1, '<map>', '</map>'],
    1728   'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
    1729   'legend': [1, '<fieldset>', '</fieldset>'],
    1730   'param': [1, '<object>', '</object>'],
    1731   'tr': [2, '<table><tbody>', '</tbody></table>'],
    1732 
    1733   'optgroup': selectWrap,
    1734   'option': selectWrap,
    1735 
    1736   'caption': tableWrap,
    1737   'colgroup': tableWrap,
    1738   'tbody': tableWrap,
    1739   'tfoot': tableWrap,
    1740   'thead': tableWrap,
    1741 
    1742   'td': trWrap,
    1743   'th': trWrap
    1744 };
    1745 
    1746 // Initialize the SVG elements since we know they'll always need to be wrapped
    1747 // consistently. If they are created inside a <div> they will be initialized in
    1748 // the wrong namespace (and will not display).
    1749 var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];
    1750 svgElements.forEach(function (nodeName) {
    1751   markupWrap[nodeName] = svgWrap;
    1752   shouldWrap[nodeName] = true;
    1753 });
    1754 
    1755 /**
    1756  * Gets the markup wrap configuration for the supplied `nodeName`.
    1757  *
    1758  * NOTE: This lazily detects which wraps are necessary for the current browser.
    1759  *
    1760  * @param {string} nodeName Lowercase `nodeName`.
    1761  * @return {?array} Markup wrap configuration, if applicable.
    1762  */
    1763 function getMarkupWrap(nodeName) {
    1764   !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0;
    1765   if (!markupWrap.hasOwnProperty(nodeName)) {
    1766     nodeName = '*';
    1767   }
    1768   if (!shouldWrap.hasOwnProperty(nodeName)) {
    1769     if (nodeName === '*') {
    1770       dummyNode.innerHTML = '<link />';
    1771     } else {
    1772       dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';
    1773     }
    1774     shouldWrap[nodeName] = !dummyNode.firstChild;
    1775   }
    1776   return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
    1777 }
    1778 
    1779 module.exports = getMarkupWrap;
    1780 }).call(this,require('_process'))
    1781 },{"./ExecutionEnvironment":9,"./invariant":23,"_process":1}],20:[function(require,module,exports){
    1782 /**
    1783  * Copyright (c) 2013-present, Facebook, Inc.
    1784  * All rights reserved.
    1785  *
    1786  * This source code is licensed under the BSD-style license found in the
    1787  * LICENSE file in the root directory of this source tree. An additional grant
    1788  * of patent rights can be found in the PATENTS file in the same directory.
    1789  *
    1790  * @typechecks
    1791  */
    1792 
    1793 'use strict';
    1794 
    1795 /**
    1796  * Gets the scroll position of the supplied element or window.
    1797  *
    1798  * The return values are unbounded, unlike `getScrollPosition`. This means they
    1799  * may be negative or exceed the element boundaries (which is possible using
    1800  * inertial scrolling).
    1801  *
    1802  * @param {DOMWindow|DOMElement} scrollable
    1803  * @return {object} Map with `x` and `y` keys.
    1804  */
    1805 
    1806 function getUnboundedScrollPosition(scrollable) {
    1807   if (scrollable.Window && scrollable instanceof scrollable.Window) {
    1808     return {
    1809       x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,
    1810       y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop
    1811     };
    1812   }
    1813   return {
    1814     x: scrollable.scrollLeft,
    1815     y: scrollable.scrollTop
    1816   };
    1817 }
    1818 
    1819 module.exports = getUnboundedScrollPosition;
    1820 },{}],21:[function(require,module,exports){
    1821 'use strict';
    1822 
    1823 /**
    1824  * Copyright (c) 2013-present, Facebook, Inc.
    1825  * All rights reserved.
    1826  *
    1827  * This source code is licensed under the BSD-style license found in the
    1828  * LICENSE file in the root directory of this source tree. An additional grant
    1829  * of patent rights can be found in the PATENTS file in the same directory.
     1331 *
     1332 * This source code is licensed under the MIT license found in the
     1333 * LICENSE file in the root directory of this source tree.
    18301334 *
    18311335 * @typechecks
     
    18511355
    18521356module.exports = hyphenate;
    1853 },{}],22:[function(require,module,exports){
     1357},{}],17:[function(require,module,exports){
    18541358/**
    18551359 * Copyright (c) 2013-present, Facebook, Inc.
    1856  * All rights reserved.
    1857  *
    1858  * This source code is licensed under the BSD-style license found in the
    1859  * LICENSE file in the root directory of this source tree. An additional grant
    1860  * of patent rights can be found in the PATENTS file in the same directory.
     1360 *
     1361 * This source code is licensed under the MIT license found in the
     1362 * LICENSE file in the root directory of this source tree.
    18611363 *
    18621364 * @typechecks
     
    18901392
    18911393module.exports = hyphenateStyleName;
    1892 },{"./hyphenate":21}],23:[function(require,module,exports){
     1394},{"./hyphenate":16}],18:[function(require,module,exports){
    18931395(function (process){
    18941396/**
    18951397 * Copyright (c) 2013-present, Facebook, Inc.
    1896  * All rights reserved.
    1897  *
    1898  * This source code is licensed under the BSD-style license found in the
    1899  * LICENSE file in the root directory of this source tree. An additional grant
    1900  * of patent rights can be found in the PATENTS file in the same directory.
     1398 *
     1399 * This source code is licensed under the MIT license found in the
     1400 * LICENSE file in the root directory of this source tree.
    19011401 *
    19021402 */
     
    19481448module.exports = invariant;
    19491449}).call(this,require('_process'))
    1950 },{"_process":1}],24:[function(require,module,exports){
     1450},{"_process":26}],19:[function(require,module,exports){
    19511451'use strict';
    19521452
    19531453/**
    19541454 * Copyright (c) 2013-present, Facebook, Inc.
    1955  * All rights reserved.
    1956  *
    1957  * This source code is licensed under the BSD-style license found in the
    1958  * LICENSE file in the root directory of this source tree. An additional grant
    1959  * of patent rights can be found in the PATENTS file in the same directory.
     1455 *
     1456 * This source code is licensed under the MIT license found in the
     1457 * LICENSE file in the root directory of this source tree.
    19601458 *
    19611459 * @typechecks
     
    19731471
    19741472module.exports = isNode;
    1975 },{}],25:[function(require,module,exports){
     1473},{}],20:[function(require,module,exports){
    19761474'use strict';
    19771475
    19781476/**
    19791477 * Copyright (c) 2013-present, Facebook, Inc.
    1980  * All rights reserved.
    1981  *
    1982  * This source code is licensed under the BSD-style license found in the
    1983  * LICENSE file in the root directory of this source tree. An additional grant
    1984  * of patent rights can be found in the PATENTS file in the same directory.
     1478 *
     1479 * This source code is licensed under the MIT license found in the
     1480 * LICENSE file in the root directory of this source tree.
    19851481 *
    19861482 * @typechecks
     
    19981494
    19991495module.exports = isTextNode;
    2000 },{"./isNode":24}],26:[function(require,module,exports){
     1496},{"./isNode":19}],21:[function(require,module,exports){
    20011497/**
    20021498 * Copyright (c) 2013-present, Facebook, Inc.
    2003  * All rights reserved.
    2004  *
    2005  * This source code is licensed under the BSD-style license found in the
    2006  * LICENSE file in the root directory of this source tree. An additional grant
    2007  * of patent rights can be found in the PATENTS file in the same directory.
    2008  *
    2009  *
    2010  * @typechecks static-only
     1499 *
     1500 * This source code is licensed under the MIT license found in the
     1501 * LICENSE file in the root directory of this source tree.
     1502 *
     1503 * @typechecks
    20111504 */
    20121505
    20131506'use strict';
    20141507
    2015 /**
    2016  * Memoizes the return value of a function that accepts one string argument.
    2017  */
    2018 
    2019 function memoizeStringOnly(callback) {
    2020   var cache = {};
    2021   return function (string) {
    2022     if (!cache.hasOwnProperty(string)) {
    2023       cache[string] = callback.call(this, string);
    2024     }
    2025     return cache[string];
    2026   };
    2027 }
    2028 
    2029 module.exports = memoizeStringOnly;
    2030 },{}],27:[function(require,module,exports){
     1508var ExecutionEnvironment = require('./ExecutionEnvironment');
     1509
     1510var performance;
     1511
     1512if (ExecutionEnvironment.canUseDOM) {
     1513  performance = window.performance || window.msPerformance || window.webkitPerformance;
     1514}
     1515
     1516module.exports = performance || {};
     1517},{"./ExecutionEnvironment":8}],22:[function(require,module,exports){
     1518'use strict';
     1519
    20311520/**
    20321521 * Copyright (c) 2013-present, Facebook, Inc.
    2033  * All rights reserved.
    2034  *
    2035  * This source code is licensed under the BSD-style license found in the
    2036  * LICENSE file in the root directory of this source tree. An additional grant
    2037  * of patent rights can be found in the PATENTS file in the same directory.
    2038  *
    2039  * @typechecks
    2040  */
    2041 
    2042 'use strict';
    2043 
    2044 var ExecutionEnvironment = require('./ExecutionEnvironment');
    2045 
    2046 var performance;
    2047 
    2048 if (ExecutionEnvironment.canUseDOM) {
    2049   performance = window.performance || window.msPerformance || window.webkitPerformance;
    2050 }
    2051 
    2052 module.exports = performance || {};
    2053 },{"./ExecutionEnvironment":9}],28:[function(require,module,exports){
    2054 'use strict';
    2055 
    2056 /**
    2057  * Copyright (c) 2013-present, Facebook, Inc.
    2058  * All rights reserved.
    2059  *
    2060  * This source code is licensed under the BSD-style license found in the
    2061  * LICENSE file in the root directory of this source tree. An additional grant
    2062  * of patent rights can be found in the PATENTS file in the same directory.
     1522 *
     1523 * This source code is licensed under the MIT license found in the
     1524 * LICENSE file in the root directory of this source tree.
    20631525 *
    20641526 * @typechecks
     
    20851547
    20861548module.exports = performanceNow;
    2087 },{"./performance":27}],29:[function(require,module,exports){
     1549},{"./performance":21}],23:[function(require,module,exports){
    20881550/**
    20891551 * Copyright (c) 2013-present, Facebook, Inc.
    2090  * All rights reserved.
    2091  *
    2092  * This source code is licensed under the BSD-style license found in the
    2093  * LICENSE file in the root directory of this source tree. An additional grant
    2094  * of patent rights can be found in the PATENTS file in the same directory.
     1552 *
     1553 * This source code is licensed under the MIT license found in the
     1554 * LICENSE file in the root directory of this source tree.
    20951555 *
    20961556 * @typechecks
     
    21531613
    21541614module.exports = shallowEqual;
    2155 },{}],30:[function(require,module,exports){
     1615},{}],24:[function(require,module,exports){
    21561616(function (process){
    21571617/**
    2158  * Copyright 2014-2015, Facebook, Inc.
    2159  * All rights reserved.
    2160  *
    2161  * This source code is licensed under the BSD-style license found in the
    2162  * LICENSE file in the root directory of this source tree. An additional grant
    2163  * of patent rights can be found in the PATENTS file in the same directory.
     1618 * Copyright (c) 2014-present, Facebook, Inc.
     1619 *
     1620 * This source code is licensed under the MIT license found in the
     1621 * LICENSE file in the root directory of this source tree.
    21641622 *
    21651623 */
     
    22201678module.exports = warning;
    22211679}).call(this,require('_process'))
    2222 },{"./emptyFunction":15,"_process":1}],31:[function(require,module,exports){
     1680},{"./emptyFunction":12,"_process":26}],25:[function(require,module,exports){
    22231681/*
    22241682object-assign
     
    23121770};
    23131771
    2314 },{}],32:[function(require,module,exports){
     1772},{}],26:[function(require,module,exports){
     1773// shim for using process in browser
     1774var process = module.exports = {};
     1775
     1776// cached from whatever global is present so that test runners that stub it
     1777// don't break things.  But we need to wrap it in a try catch in case it is
     1778// wrapped in strict mode code which doesn't define any globals.  It's inside a
     1779// function because try/catches deoptimize in certain engines.
     1780
     1781var cachedSetTimeout;
     1782var cachedClearTimeout;
     1783
     1784function defaultSetTimout() {
     1785    throw new Error('setTimeout has not been defined');
     1786}
     1787function defaultClearTimeout () {
     1788    throw new Error('clearTimeout has not been defined');
     1789}
     1790(function () {
     1791    try {
     1792        if (typeof setTimeout === 'function') {
     1793            cachedSetTimeout = setTimeout;
     1794        } else {
     1795            cachedSetTimeout = defaultSetTimout;
     1796        }
     1797    } catch (e) {
     1798        cachedSetTimeout = defaultSetTimout;
     1799    }
     1800    try {
     1801        if (typeof clearTimeout === 'function') {
     1802            cachedClearTimeout = clearTimeout;
     1803        } else {
     1804            cachedClearTimeout = defaultClearTimeout;
     1805        }
     1806    } catch (e) {
     1807        cachedClearTimeout = defaultClearTimeout;
     1808    }
     1809} ())
     1810function runTimeout(fun) {
     1811    if (cachedSetTimeout === setTimeout) {
     1812        //normal enviroments in sane situations
     1813        return setTimeout(fun, 0);
     1814    }
     1815    // if setTimeout wasn't available but was latter defined
     1816    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
     1817        cachedSetTimeout = setTimeout;
     1818        return setTimeout(fun, 0);
     1819    }
     1820    try {
     1821        // when when somebody has screwed with setTimeout but no I.E. maddness
     1822        return cachedSetTimeout(fun, 0);
     1823    } catch(e){
     1824        try {
     1825            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
     1826            return cachedSetTimeout.call(null, fun, 0);
     1827        } catch(e){
     1828            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
     1829            return cachedSetTimeout.call(this, fun, 0);
     1830        }
     1831    }
     1832
     1833
     1834}
     1835function runClearTimeout(marker) {
     1836    if (cachedClearTimeout === clearTimeout) {
     1837        //normal enviroments in sane situations
     1838        return clearTimeout(marker);
     1839    }
     1840    // if clearTimeout wasn't available but was latter defined
     1841    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
     1842        cachedClearTimeout = clearTimeout;
     1843        return clearTimeout(marker);
     1844    }
     1845    try {
     1846        // when when somebody has screwed with setTimeout but no I.E. maddness
     1847        return cachedClearTimeout(marker);
     1848    } catch (e){
     1849        try {
     1850            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
     1851            return cachedClearTimeout.call(null, marker);
     1852        } catch (e){
     1853            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
     1854            // Some versions of I.E. have different rules for clearTimeout vs setTimeout
     1855            return cachedClearTimeout.call(this, marker);
     1856        }
     1857    }
     1858
     1859
     1860
     1861}
     1862var queue = [];
     1863var draining = false;
     1864var currentQueue;
     1865var queueIndex = -1;
     1866
     1867function cleanUpNextTick() {
     1868    if (!draining || !currentQueue) {
     1869        return;
     1870    }
     1871    draining = false;
     1872    if (currentQueue.length) {
     1873        queue = currentQueue.concat(queue);
     1874    } else {
     1875        queueIndex = -1;
     1876    }
     1877    if (queue.length) {
     1878        drainQueue();
     1879    }
     1880}
     1881
     1882function drainQueue() {
     1883    if (draining) {
     1884        return;
     1885    }
     1886    var timeout = runTimeout(cleanUpNextTick);
     1887    draining = true;
     1888
     1889    var len = queue.length;
     1890    while(len) {
     1891        currentQueue = queue;
     1892        queue = [];
     1893        while (++queueIndex < len) {
     1894            if (currentQueue) {
     1895                currentQueue[queueIndex].run();
     1896            }
     1897        }
     1898        queueIndex = -1;
     1899        len = queue.length;
     1900    }
     1901    currentQueue = null;
     1902    draining = false;
     1903    runClearTimeout(timeout);
     1904}
     1905
     1906process.nextTick = function (fun) {
     1907    var args = new Array(arguments.length - 1);
     1908    if (arguments.length > 1) {
     1909        for (var i = 1; i < arguments.length; i++) {
     1910            args[i - 1] = arguments[i];
     1911        }
     1912    }
     1913    queue.push(new Item(fun, args));
     1914    if (queue.length === 1 && !draining) {
     1915        runTimeout(drainQueue);
     1916    }
     1917};
     1918
     1919// v8 likes predictible objects
     1920function Item(fun, array) {
     1921    this.fun = fun;
     1922    this.array = array;
     1923}
     1924Item.prototype.run = function () {
     1925    this.fun.apply(null, this.array);
     1926};
     1927process.title = 'browser';
     1928process.browser = true;
     1929process.env = {};
     1930process.argv = [];
     1931process.version = ''; // empty string to avoid regexp issues
     1932process.versions = {};
     1933
     1934function noop() {}
     1935
     1936process.on = noop;
     1937process.addListener = noop;
     1938process.once = noop;
     1939process.off = noop;
     1940process.removeListener = noop;
     1941process.removeAllListeners = noop;
     1942process.emit = noop;
     1943process.prependListener = noop;
     1944process.prependOnceListener = noop;
     1945
     1946process.listeners = function (name) { return [] }
     1947
     1948process.binding = function (name) {
     1949    throw new Error('process.binding is not supported');
     1950};
     1951
     1952process.cwd = function () { return '/' };
     1953process.chdir = function (dir) {
     1954    throw new Error('process.chdir is not supported');
     1955};
     1956process.umask = function() { return 0; };
     1957
     1958},{}],27:[function(require,module,exports){
    23151959(function (process){
    23161960/**
    2317  * Copyright 2013-present, Facebook, Inc.
    2318  * All rights reserved.
    2319  *
    2320  * This source code is licensed under the BSD-style license found in the
    2321  * LICENSE file in the root directory of this source tree. An additional grant
    2322  * of patent rights can be found in the PATENTS file in the same directory.
     1961 * Copyright (c) 2013-present, Facebook, Inc.
     1962 *
     1963 * This source code is licensed under the MIT license found in the
     1964 * LICENSE file in the root directory of this source tree.
    23231965 */
    23241966
     
    23541996          // This is intentionally an invariant that gets caught. It's the same
    23551997          // behavior as without this statement except with a better message.
    2356           invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);
     1998          invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
    23571999          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
    23582000        } catch (ex) {
     
    23772019
    23782020}).call(this,require('_process'))
    2379 },{"./lib/ReactPropTypesSecret":37,"_process":1,"fbjs/lib/invariant":23,"fbjs/lib/warning":30}],33:[function(require,module,exports){
     2021},{"./lib/ReactPropTypesSecret":31,"_process":26,"fbjs/lib/invariant":18,"fbjs/lib/warning":24}],28:[function(require,module,exports){
    23802022/**
    2381  * Copyright 2013-present, Facebook, Inc.
    2382  * All rights reserved.
    2383  *
    2384  * This source code is licensed under the BSD-style license found in the
    2385  * LICENSE file in the root directory of this source tree. An additional grant
    2386  * of patent rights can be found in the PATENTS file in the same directory.
    2387  */
    2388 
    2389 'use strict';
    2390 
    2391 // React 15.5 references this module, and assumes PropTypes are still callable in production.
    2392 // Therefore we re-export development-only version with all the PropTypes checks here.
    2393 // However if one is migrating to the `prop-types` npm library, they will go through the
    2394 // `index.js` entry point, and it will branch depending on the environment.
    2395 var factory = require('./factoryWithTypeCheckers');
    2396 module.exports = function(isValidElement) {
    2397   // It is still allowed in 15.5.
    2398   var throwOnDirectAccess = false;
    2399   return factory(isValidElement, throwOnDirectAccess);
    2400 };
    2401 
    2402 },{"./factoryWithTypeCheckers":35}],34:[function(require,module,exports){
    2403 /**
    2404  * Copyright 2013-present, Facebook, Inc.
    2405  * All rights reserved.
    2406  *
    2407  * This source code is licensed under the BSD-style license found in the
    2408  * LICENSE file in the root directory of this source tree. An additional grant
    2409  * of patent rights can be found in the PATENTS file in the same directory.
     2023 * Copyright (c) 2013-present, Facebook, Inc.
     2024 *
     2025 * This source code is licensed under the MIT license found in the
     2026 * LICENSE file in the root directory of this source tree.
    24102027 */
    24112028
     
    24522069    oneOf: getShim,
    24532070    oneOfType: getShim,
    2454     shape: getShim
     2071    shape: getShim,
     2072    exact: getShim
    24552073  };
    24562074
     
    24612079};
    24622080
    2463 },{"./lib/ReactPropTypesSecret":37,"fbjs/lib/emptyFunction":15,"fbjs/lib/invariant":23}],35:[function(require,module,exports){
     2081},{"./lib/ReactPropTypesSecret":31,"fbjs/lib/emptyFunction":12,"fbjs/lib/invariant":18}],29:[function(require,module,exports){
    24642082(function (process){
    24652083/**
    2466  * Copyright 2013-present, Facebook, Inc.
    2467  * All rights reserved.
    2468  *
    2469  * This source code is licensed under the BSD-style license found in the
    2470  * LICENSE file in the root directory of this source tree. An additional grant
    2471  * of patent rights can be found in the PATENTS file in the same directory.
     2084 * Copyright (c) 2013-present, Facebook, Inc.
     2085 *
     2086 * This source code is licensed under the MIT license found in the
     2087 * LICENSE file in the root directory of this source tree.
    24722088 */
    24732089
     
    24772093var invariant = require('fbjs/lib/invariant');
    24782094var warning = require('fbjs/lib/warning');
     2095var assign = require('object-assign');
    24792096
    24802097var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
     
    25752192    oneOf: createEnumTypeChecker,
    25762193    oneOfType: createUnionTypeChecker,
    2577     shape: createShapeTypeChecker
     2194    shape: createShapeTypeChecker,
     2195    exact: createStrictShapeTypeChecker,
    25782196  };
    25792197
     
    27902408        warning(
    27912409          false,
    2792           'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +
     2410          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
    27932411          'received %s at index %s.',
    27942412          getPostfixForTypeWarning(checker),
     
    28412459      return null;
    28422460    }
     2461    return createChainableTypeChecker(validate);
     2462  }
     2463
     2464  function createStrictShapeTypeChecker(shapeTypes) {
     2465    function validate(props, propName, componentName, location, propFullName) {
     2466      var propValue = props[propName];
     2467      var propType = getPropType(propValue);
     2468      if (propType !== 'object') {
     2469        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
     2470      }
     2471      // We need to check all keys in case some are required but missing from
     2472      // props.
     2473      var allKeys = assign({}, props[propName], shapeTypes);
     2474      for (var key in allKeys) {
     2475        var checker = shapeTypes[key];
     2476        if (!checker) {
     2477          return new PropTypeError(
     2478            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
     2479            '\nBad object: ' + JSON.stringify(props[propName], null, '  ') +
     2480            '\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')
     2481          );
     2482        }
     2483        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
     2484        if (error) {
     2485          return error;
     2486        }
     2487      }
     2488      return null;
     2489    }
     2490
    28432491    return createChainableTypeChecker(validate);
    28442492  }
     
    29772625
    29782626}).call(this,require('_process'))
    2979 },{"./checkPropTypes":32,"./lib/ReactPropTypesSecret":37,"_process":1,"fbjs/lib/emptyFunction":15,"fbjs/lib/invariant":23,"fbjs/lib/warning":30}],36:[function(require,module,exports){
     2627},{"./checkPropTypes":27,"./lib/ReactPropTypesSecret":31,"_process":26,"fbjs/lib/emptyFunction":12,"fbjs/lib/invariant":18,"fbjs/lib/warning":24,"object-assign":25}],30:[function(require,module,exports){
    29802628(function (process){
    29812629/**
    2982  * Copyright 2013-present, Facebook, Inc.
    2983  * All rights reserved.
    2984  *
    2985  * This source code is licensed under the BSD-style license found in the
    2986  * LICENSE file in the root directory of this source tree. An additional grant
    2987  * of patent rights can be found in the PATENTS file in the same directory.
     2630 * Copyright (c) 2013-present, Facebook, Inc.
     2631 *
     2632 * This source code is licensed under the MIT license found in the
     2633 * LICENSE file in the root directory of this source tree.
    29882634 */
    29892635
     
    30112657
    30122658}).call(this,require('_process'))
    3013 },{"./factoryWithThrowingShims":34,"./factoryWithTypeCheckers":35,"_process":1}],37:[function(require,module,exports){
     2659},{"./factoryWithThrowingShims":28,"./factoryWithTypeCheckers":29,"_process":26}],31:[function(require,module,exports){
    30142660/**
    3015  * Copyright 2013-present, Facebook, Inc.
    3016  * All rights reserved.
    3017  *
    3018  * This source code is licensed under the BSD-style license found in the
    3019  * LICENSE file in the root directory of this source tree. An additional grant
    3020  * of patent rights can be found in the PATENTS file in the same directory.
     2661 * Copyright (c) 2013-present, Facebook, Inc.
     2662 *
     2663 * This source code is licensed under the MIT license found in the
     2664 * LICENSE file in the root directory of this source tree.
    30212665 */
    30222666
     
    30272671module.exports = ReactPropTypesSecret;
    30282672
    3029 },{}],38:[function(require,module,exports){
     2673},{}],32:[function(require,module,exports){
     2674/**
     2675 * Copyright (c) 2013-present, Facebook, Inc.
     2676 *
     2677 * This source code is licensed under the MIT license found in the
     2678 * LICENSE file in the root directory of this source tree.
     2679 */
     2680
    30302681'use strict';
    30312682
    3032 module.exports = require('./lib/ReactDOM');
    3033 
    3034 },{"./lib/ReactDOM":68}],39:[function(require,module,exports){
    30352683/**
    3036  * Copyright 2013-present, Facebook, Inc.
    3037  * All rights reserved.
    3038  *
    3039  * This source code is licensed under the BSD-style license found in the
    3040  * LICENSE file in the root directory of this source tree. An additional grant
    3041  * of patent rights can be found in the PATENTS file in the same directory.
    3042  *
     2684 * ReactLink encapsulates a common pattern in which a component wants to modify
     2685 * a prop received from its parent. ReactLink allows the parent to pass down a
     2686 * value coupled with a callback that, when invoked, expresses an intent to
     2687 * modify that value. For example:
     2688 *
     2689 * React.createClass({
     2690 *   getInitialState: function() {
     2691 *     return {value: ''};
     2692 *   },
     2693 *   render: function() {
     2694 *     var valueLink = new ReactLink(this.state.value, this._handleValueChange);
     2695 *     return <input valueLink={valueLink} />;
     2696 *   },
     2697 *   _handleValueChange: function(newValue) {
     2698 *     this.setState({value: newValue});
     2699 *   }
     2700 * });
     2701 *
     2702 * We have provided some sugary mixins to make the creation and
     2703 * consumption of ReactLink easier; see LinkedValueUtils and LinkedStateMixin.
    30432704 */
    30442705
     2706/**
     2707 * Deprecated: An an easy way to express two-way binding with React.
     2708 * See https://facebook.github.io/react/docs/two-way-binding-helpers.html
     2709 *
     2710 * @param {*} value current value of the link
     2711 * @param {function} requestChange callback to request a change
     2712 */
     2713function ReactLink(value, requestChange) {
     2714  this.value = value;
     2715  this.requestChange = requestChange;
     2716}
     2717
     2718var ReactStateSetters = {
     2719  /**
     2720   * Returns a function that calls the provided function, and uses the result
     2721   * of that to set the component's state.
     2722   *
     2723   * @param {ReactCompositeComponent} component
     2724   * @param {function} funcReturningState Returned callback uses this to
     2725   *                                      determine how to update state.
     2726   * @return {function} callback that when invoked uses funcReturningState to
     2727   *                    determined the object literal to setState.
     2728   */
     2729  createStateSetter: function(component, funcReturningState) {
     2730    return function(a, b, c, d, e, f) {
     2731      var partialState = funcReturningState.call(component, a, b, c, d, e, f);
     2732      if (partialState) {
     2733        component.setState(partialState);
     2734      }
     2735    };
     2736  },
     2737
     2738  /**
     2739   * Returns a single-argument callback that can be used to update a single
     2740   * key in the component's state.
     2741   *
     2742   * Note: this is memoized function, which makes it inexpensive to call.
     2743   *
     2744   * @param {ReactCompositeComponent} component
     2745   * @param {string} key The key in the state that you should update.
     2746   * @return {function} callback of 1 argument which calls setState() with
     2747   *                    the provided keyName and callback argument.
     2748   */
     2749  createStateKeySetter: function(component, key) {
     2750    // Memoize the setters.
     2751    var cache = component.__keySetters || (component.__keySetters = {});
     2752    return cache[key] || (cache[key] = createStateKeySetter(component, key));
     2753  }
     2754};
     2755
     2756function createStateKeySetter(component, key) {
     2757  // Partial state is allocated outside of the function closure so it can be
     2758  // reused with every call, avoiding memory allocation when this function
     2759  // is called.
     2760  var partialState = {};
     2761  return function stateKeySetter(value) {
     2762    partialState[key] = value;
     2763    component.setState(partialState);
     2764  };
     2765}
     2766
     2767ReactStateSetters.Mixin = {
     2768  /**
     2769   * Returns a function that calls the provided function, and uses the result
     2770   * of that to set the component's state.
     2771   *
     2772   * For example, these statements are equivalent:
     2773   *
     2774   *   this.setState({x: 1});
     2775   *   this.createStateSetter(function(xValue) {
     2776   *     return {x: xValue};
     2777   *   })(1);
     2778   *
     2779   * @param {function} funcReturningState Returned callback uses this to
     2780   *                                      determine how to update state.
     2781   * @return {function} callback that when invoked uses funcReturningState to
     2782   *                    determined the object literal to setState.
     2783   */
     2784  createStateSetter: function(funcReturningState) {
     2785    return ReactStateSetters.createStateSetter(this, funcReturningState);
     2786  },
     2787
     2788  /**
     2789   * Returns a single-argument callback that can be used to update a single
     2790   * key in the component's state.
     2791   *
     2792   * For example, these statements are equivalent:
     2793   *
     2794   *   this.setState({x: 1});
     2795   *   this.createStateKeySetter('x')(1);
     2796   *
     2797   * Note: this is memoized function, which makes it inexpensive to call.
     2798   *
     2799   * @param {string} key The key in the state that you should update.
     2800   * @return {function} callback of 1 argument which calls setState() with
     2801   *                    the provided keyName and callback argument.
     2802   */
     2803  createStateKeySetter: function(key) {
     2804    return ReactStateSetters.createStateKeySetter(this, key);
     2805  }
     2806};
     2807
     2808/**
     2809 * A simple mixin around ReactLink.forState().
     2810 * See https://facebook.github.io/react/docs/two-way-binding-helpers.html
     2811 */
     2812var LinkedStateMixin = {
     2813  /**
     2814   * Create a ReactLink that's linked to part of this component's state. The
     2815   * ReactLink will have the current value of this.state[key] and will call
     2816   * setState() when a change is requested.
     2817   *
     2818   * @param {string} key state key to update.
     2819   * @return {ReactLink} ReactLink instance linking to the state.
     2820   */
     2821  linkState: function(key) {
     2822    return new ReactLink(
     2823      this.state[key],
     2824      ReactStateSetters.createStateKeySetter(this, key)
     2825    );
     2826  }
     2827};
     2828
     2829module.exports = LinkedStateMixin;
     2830
     2831},{}],33:[function(require,module,exports){
     2832(function (process){
     2833/** @license React v16.0.0
     2834 * react-dom.development.js
     2835 *
     2836 * Copyright (c) 2013-present, Facebook, Inc.
     2837 *
     2838 * This source code is licensed under the MIT license found in the
     2839 * LICENSE file in the root directory of this source tree.
     2840 */
    30452841'use strict';
    30462842
    3047 var ARIADOMPropertyConfig = {
    3048   Properties: {
    3049     // Global States and Properties
    3050     'aria-current': 0, // state
    3051     'aria-details': 0,
    3052     'aria-disabled': 0, // state
    3053     'aria-hidden': 0, // state
    3054     'aria-invalid': 0, // state
    3055     'aria-keyshortcuts': 0,
    3056     'aria-label': 0,
    3057     'aria-roledescription': 0,
    3058     // Widget Attributes
    3059     'aria-autocomplete': 0,
    3060     'aria-checked': 0,
    3061     'aria-expanded': 0,
    3062     'aria-haspopup': 0,
    3063     'aria-level': 0,
    3064     'aria-modal': 0,
    3065     'aria-multiline': 0,
    3066     'aria-multiselectable': 0,
    3067     'aria-orientation': 0,
    3068     'aria-placeholder': 0,
    3069     'aria-pressed': 0,
    3070     'aria-readonly': 0,
    3071     'aria-required': 0,
    3072     'aria-selected': 0,
    3073     'aria-sort': 0,
    3074     'aria-valuemax': 0,
    3075     'aria-valuemin': 0,
    3076     'aria-valuenow': 0,
    3077     'aria-valuetext': 0,
    3078     // Live Region Attributes
    3079     'aria-atomic': 0,
    3080     'aria-busy': 0,
    3081     'aria-live': 0,
    3082     'aria-relevant': 0,
    3083     // Drag-and-Drop Attributes
    3084     'aria-dropeffect': 0,
    3085     'aria-grabbed': 0,
    3086     // Relationship Attributes
    3087     'aria-activedescendant': 0,
    3088     'aria-colcount': 0,
    3089     'aria-colindex': 0,
    3090     'aria-colspan': 0,
    3091     'aria-controls': 0,
    3092     'aria-describedby': 0,
    3093     'aria-errormessage': 0,
    3094     'aria-flowto': 0,
    3095     'aria-labelledby': 0,
    3096     'aria-owns': 0,
    3097     'aria-posinset': 0,
    3098     'aria-rowcount': 0,
    3099     'aria-rowindex': 0,
    3100     'aria-rowspan': 0,
    3101     'aria-setsize': 0
     2843
     2844if (process.env.NODE_ENV !== "production") {
     2845(function() {
     2846
     2847'use strict';
     2848
     2849var react = require('react');
     2850var invariant = require('fbjs/lib/invariant');
     2851var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
     2852var _assign = require('object-assign');
     2853var EventListener = require('fbjs/lib/EventListener');
     2854var require$$0 = require('fbjs/lib/warning');
     2855var hyphenateStyleName = require('fbjs/lib/hyphenateStyleName');
     2856var emptyFunction = require('fbjs/lib/emptyFunction');
     2857var camelizeStyleName = require('fbjs/lib/camelizeStyleName');
     2858var performanceNow = require('fbjs/lib/performanceNow');
     2859var propTypes = require('prop-types');
     2860var emptyObject = require('fbjs/lib/emptyObject');
     2861var checkPropTypes = require('prop-types/checkPropTypes');
     2862var shallowEqual = require('fbjs/lib/shallowEqual');
     2863var containsNode = require('fbjs/lib/containsNode');
     2864var focusNode = require('fbjs/lib/focusNode');
     2865var getActiveElement = require('fbjs/lib/getActiveElement');
     2866
     2867/**
     2868 * Copyright (c) 2013-present, Facebook, Inc.
     2869 *
     2870 * This source code is licensed under the MIT license found in the
     2871 * LICENSE file in the root directory of this source tree.
     2872 *
     2873 * @providesModule reactProdInvariant
     2874 *
     2875 */
     2876
     2877/**
     2878 * Copyright (c) 2013-present, Facebook, Inc.
     2879 *
     2880 * This source code is licensed under the MIT license found in the
     2881 * LICENSE file in the root directory of this source tree.
     2882 *
     2883 * @providesModule checkReact
     2884 *
     2885 */
     2886
     2887
     2888
     2889
     2890!react ? invariant(false, 'ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.') : void 0;
     2891
     2892/**
     2893 * Copyright (c) 2013-present, Facebook, Inc.
     2894 *
     2895 * This source code is licensed under the MIT license found in the
     2896 * LICENSE file in the root directory of this source tree.
     2897 *
     2898 * @providesModule DOMNamespaces
     2899 */
     2900
     2901var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
     2902var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
     2903var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
     2904
     2905var Namespaces = {
     2906  html: HTML_NAMESPACE,
     2907  mathml: MATH_NAMESPACE,
     2908  svg: SVG_NAMESPACE
     2909};
     2910
     2911// Assumes there is no parent namespace.
     2912function getIntrinsicNamespace(type) {
     2913  switch (type) {
     2914    case 'svg':
     2915      return SVG_NAMESPACE;
     2916    case 'math':
     2917      return MATH_NAMESPACE;
     2918    default:
     2919      return HTML_NAMESPACE;
     2920  }
     2921}
     2922
     2923function getChildNamespace$1(parentNamespace, type) {
     2924  if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
     2925    // No (or default) parent namespace: potential entry point.
     2926    return getIntrinsicNamespace(type);
     2927  }
     2928  if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
     2929    // We're leaving SVG.
     2930    return HTML_NAMESPACE;
     2931  }
     2932  // By default, pass namespace below.
     2933  return parentNamespace;
     2934}
     2935
     2936var Namespaces_1 = Namespaces;
     2937var getIntrinsicNamespace_1 = getIntrinsicNamespace;
     2938var getChildNamespace_1 = getChildNamespace$1;
     2939
     2940var DOMNamespaces = {
     2941        Namespaces: Namespaces_1,
     2942        getIntrinsicNamespace: getIntrinsicNamespace_1,
     2943        getChildNamespace: getChildNamespace_1
     2944};
     2945
     2946/**
     2947 * Injectable ordering of event plugins.
     2948 */
     2949var eventPluginOrder = null;
     2950
     2951/**
     2952 * Injectable mapping from names to event plugin modules.
     2953 */
     2954var namesToPlugins = {};
     2955
     2956/**
     2957 * Recomputes the plugin list using the injected plugins and plugin ordering.
     2958 *
     2959 * @private
     2960 */
     2961function recomputePluginOrdering() {
     2962  if (!eventPluginOrder) {
     2963    // Wait until an `eventPluginOrder` is injected.
     2964    return;
     2965  }
     2966  for (var pluginName in namesToPlugins) {
     2967    var pluginModule = namesToPlugins[pluginName];
     2968    var pluginIndex = eventPluginOrder.indexOf(pluginName);
     2969    !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;
     2970    if (EventPluginRegistry.plugins[pluginIndex]) {
     2971      continue;
     2972    }
     2973    !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;
     2974    EventPluginRegistry.plugins[pluginIndex] = pluginModule;
     2975    var publishedEvents = pluginModule.eventTypes;
     2976    for (var eventName in publishedEvents) {
     2977      !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;
     2978    }
     2979  }
     2980}
     2981
     2982/**
     2983 * Publishes an event so that it can be dispatched by the supplied plugin.
     2984 *
     2985 * @param {object} dispatchConfig Dispatch configuration for the event.
     2986 * @param {object} PluginModule Plugin publishing the event.
     2987 * @return {boolean} True if the event was successfully published.
     2988 * @private
     2989 */
     2990function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
     2991  !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : void 0;
     2992  EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
     2993
     2994  var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
     2995  if (phasedRegistrationNames) {
     2996    for (var phaseName in phasedRegistrationNames) {
     2997      if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
     2998        var phasedRegistrationName = phasedRegistrationNames[phaseName];
     2999        publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
     3000      }
     3001    }
     3002    return true;
     3003  } else if (dispatchConfig.registrationName) {
     3004    publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
     3005    return true;
     3006  }
     3007  return false;
     3008}
     3009
     3010/**
     3011 * Publishes a registration name that is used to identify dispatched events.
     3012 *
     3013 * @param {string} registrationName Registration name to add.
     3014 * @param {object} PluginModule Plugin publishing the event.
     3015 * @private
     3016 */
     3017function publishRegistrationName(registrationName, pluginModule, eventName) {
     3018  !!EventPluginRegistry.registrationNameModules[registrationName] ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : void 0;
     3019  EventPluginRegistry.registrationNameModules[registrationName] = pluginModule;
     3020  EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
     3021
     3022  {
     3023    var lowerCasedName = registrationName.toLowerCase();
     3024    EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
     3025
     3026    if (registrationName === 'onDoubleClick') {
     3027      EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
     3028    }
     3029  }
     3030}
     3031
     3032/**
     3033 * Registers plugins so that they can extract and dispatch events.
     3034 *
     3035 * @see {EventPluginHub}
     3036 */
     3037var EventPluginRegistry = {
     3038  /**
     3039   * Ordered list of injected plugins.
     3040   */
     3041  plugins: [],
     3042
     3043  /**
     3044   * Mapping from event name to dispatch config
     3045   */
     3046  eventNameDispatchConfigs: {},
     3047
     3048  /**
     3049   * Mapping from registration name to plugin module
     3050   */
     3051  registrationNameModules: {},
     3052
     3053  /**
     3054   * Mapping from registration name to event name
     3055   */
     3056  registrationNameDependencies: {},
     3057
     3058  /**
     3059   * Mapping from lowercase registration names to the properly cased version,
     3060   * used to warn in the case of missing event handlers. Available
     3061   * only in true.
     3062   * @type {Object}
     3063   */
     3064  possibleRegistrationNames: {},
     3065  // Trust the developer to only use possibleRegistrationNames in true
     3066
     3067  /**
     3068   * Injects an ordering of plugins (by plugin name). This allows the ordering
     3069   * to be decoupled from injection of the actual plugins so that ordering is
     3070   * always deterministic regardless of packaging, on-the-fly injection, etc.
     3071   *
     3072   * @param {array} InjectedEventPluginOrder
     3073   * @internal
     3074   * @see {EventPluginHub.injection.injectEventPluginOrder}
     3075   */
     3076  injectEventPluginOrder: function (injectedEventPluginOrder) {
     3077    !!eventPluginOrder ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : void 0;
     3078    // Clone the ordering so it cannot be dynamically mutated.
     3079    eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
     3080    recomputePluginOrdering();
    31023081  },
    3103   DOMAttributeNames: {},
    3104   DOMPropertyNames: {}
     3082
     3083  /**
     3084   * Injects plugins to be used by `EventPluginHub`. The plugin names must be
     3085   * in the ordering injected by `injectEventPluginOrder`.
     3086   *
     3087   * Plugins can be injected as part of page initialization or on-the-fly.
     3088   *
     3089   * @param {object} injectedNamesToPlugins Map from names to plugin modules.
     3090   * @internal
     3091   * @see {EventPluginHub.injection.injectEventPluginsByName}
     3092   */
     3093  injectEventPluginsByName: function (injectedNamesToPlugins) {
     3094    var isOrderingDirty = false;
     3095    for (var pluginName in injectedNamesToPlugins) {
     3096      if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
     3097        continue;
     3098      }
     3099      var pluginModule = injectedNamesToPlugins[pluginName];
     3100      if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
     3101        !!namesToPlugins[pluginName] ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : void 0;
     3102        namesToPlugins[pluginName] = pluginModule;
     3103        isOrderingDirty = true;
     3104      }
     3105    }
     3106    if (isOrderingDirty) {
     3107      recomputePluginOrdering();
     3108    }
     3109  }
    31053110};
    31063111
    3107 module.exports = ARIADOMPropertyConfig;
    3108 },{}],40:[function(require,module,exports){
     3112var EventPluginRegistry_1 = EventPluginRegistry;
     3113
     3114// These attributes should be all lowercase to allow for
     3115// case insensitive checks
     3116var RESERVED_PROPS = {
     3117  children: true,
     3118  dangerouslySetInnerHTML: true,
     3119  autoFocus: true,
     3120  defaultValue: true,
     3121  defaultChecked: true,
     3122  innerHTML: true,
     3123  suppressContentEditableWarning: true,
     3124  style: true
     3125};
     3126
     3127function checkMask(value, bitmask) {
     3128  return (value & bitmask) === bitmask;
     3129}
     3130
     3131var DOMPropertyInjection = {
     3132  /**
     3133   * Mapping from normalized, camelcased property names to a configuration that
     3134   * specifies how the associated DOM property should be accessed or rendered.
     3135   */
     3136  MUST_USE_PROPERTY: 0x1,
     3137  HAS_BOOLEAN_VALUE: 0x4,
     3138  HAS_NUMERIC_VALUE: 0x8,
     3139  HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
     3140  HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
     3141  HAS_STRING_BOOLEAN_VALUE: 0x40,
     3142
     3143  /**
     3144   * Inject some specialized knowledge about the DOM. This takes a config object
     3145   * with the following properties:
     3146   *
     3147   * Properties: object mapping DOM property name to one of the
     3148   * DOMPropertyInjection constants or null. If your attribute isn't in here,
     3149   * it won't get written to the DOM.
     3150   *
     3151   * DOMAttributeNames: object mapping React attribute name to the DOM
     3152   * attribute name. Attribute names not specified use the **lowercase**
     3153   * normalized name.
     3154   *
     3155   * DOMAttributeNamespaces: object mapping React attribute name to the DOM
     3156   * attribute namespace URL. (Attribute names not specified use no namespace.)
     3157   *
     3158   * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
     3159   * Property names not specified use the normalized name.
     3160   *
     3161   * DOMMutationMethods: Properties that require special mutation methods. If
     3162   * `value` is undefined, the mutation method should unset the property.
     3163   *
     3164   * @param {object} domPropertyConfig the config as described above.
     3165   */
     3166  injectDOMPropertyConfig: function (domPropertyConfig) {
     3167    var Injection = DOMPropertyInjection;
     3168    var Properties = domPropertyConfig.Properties || {};
     3169    var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
     3170    var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
     3171    var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
     3172
     3173    for (var propName in Properties) {
     3174      !!DOMProperty.properties.hasOwnProperty(propName) ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : void 0;
     3175
     3176      var lowerCased = propName.toLowerCase();
     3177      var propConfig = Properties[propName];
     3178
     3179      var propertyInfo = {
     3180        attributeName: lowerCased,
     3181        attributeNamespace: null,
     3182        propertyName: propName,
     3183        mutationMethod: null,
     3184
     3185        mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
     3186        hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
     3187        hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
     3188        hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
     3189        hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE),
     3190        hasStringBooleanValue: checkMask(propConfig, Injection.HAS_STRING_BOOLEAN_VALUE)
     3191      };
     3192      !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : void 0;
     3193
     3194      if (DOMAttributeNames.hasOwnProperty(propName)) {
     3195        var attributeName = DOMAttributeNames[propName];
     3196
     3197        propertyInfo.attributeName = attributeName;
     3198      }
     3199
     3200      if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
     3201        propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
     3202      }
     3203
     3204      if (DOMMutationMethods.hasOwnProperty(propName)) {
     3205        propertyInfo.mutationMethod = DOMMutationMethods[propName];
     3206      }
     3207
     3208      // Downcase references to whitelist properties to check for membership
     3209      // without case-sensitivity. This allows the whitelist to pick up
     3210      // `allowfullscreen`, which should be written using the property configuration
     3211      // for `allowFullscreen`
     3212      DOMProperty.properties[propName] = propertyInfo;
     3213    }
     3214  }
     3215};
     3216
     3217/* eslint-disable max-len */
     3218var ATTRIBUTE_NAME_START_CHAR = ':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';
     3219/* eslint-enable max-len */
     3220
    31093221/**
    3110  * Copyright 2013-present, Facebook, Inc.
    3111  * All rights reserved.
    3112  *
    3113  * This source code is licensed under the BSD-style license found in the
    3114  * LICENSE file in the root directory of this source tree. An additional grant
    3115  * of patent rights can be found in the PATENTS file in the same directory.
    3116  *
     3222 * DOMProperty exports lookup objects that can be used like functions:
     3223 *
     3224 *   > DOMProperty.isValid['id']
     3225 *   true
     3226 *   > DOMProperty.isValid['foobar']
     3227 *   undefined
     3228 *
     3229 * Although this may be confusing, it performs better in general.
     3230 *
     3231 * @see http://jsperf.com/key-exists
     3232 * @see http://jsperf.com/key-missing
    31173233 */
    3118 
    3119 'use strict';
    3120 
    3121 var ReactDOMComponentTree = require('./ReactDOMComponentTree');
    3122 
    3123 var focusNode = require('fbjs/lib/focusNode');
    3124 
    3125 var AutoFocusUtils = {
    3126   focusDOMComponent: function () {
    3127     focusNode(ReactDOMComponentTree.getNodeFromInstance(this));
    3128   }
     3234var DOMProperty = {
     3235  ID_ATTRIBUTE_NAME: 'data-reactid',
     3236  ROOT_ATTRIBUTE_NAME: 'data-reactroot',
     3237
     3238  ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
     3239  ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
     3240
     3241  /**
     3242   * Map from property "standard name" to an object with info about how to set
     3243   * the property in the DOM. Each object contains:
     3244   *
     3245   * attributeName:
     3246   *   Used when rendering markup or with `*Attribute()`.
     3247   * attributeNamespace
     3248   * propertyName:
     3249   *   Used on DOM node instances. (This includes properties that mutate due to
     3250   *   external factors.)
     3251   * mutationMethod:
     3252   *   If non-null, used instead of the property or `setAttribute()` after
     3253   *   initial render.
     3254   * mustUseProperty:
     3255   *   Whether the property must be accessed and mutated as an object property.
     3256   * hasBooleanValue:
     3257   *   Whether the property should be removed when set to a falsey value.
     3258   * hasNumericValue:
     3259   *   Whether the property must be numeric or parse as a numeric and should be
     3260   *   removed when set to a falsey value.
     3261   * hasPositiveNumericValue:
     3262   *   Whether the property must be positive numeric or parse as a positive
     3263   *   numeric and should be removed when set to a falsey value.
     3264   * hasOverloadedBooleanValue:
     3265   *   Whether the property can be used as a flag as well as with a value.
     3266   *   Removed when strictly equal to false; present without a value when
     3267   *   strictly equal to true; present with a value otherwise.
     3268   */
     3269  properties: {},
     3270
     3271  /**
     3272   * Checks whether a property name is a writeable attribute.
     3273   * @method
     3274   */
     3275  shouldSetAttribute: function (name, value) {
     3276    if (DOMProperty.isReservedProp(name)) {
     3277      return false;
     3278    }
     3279    if ((name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
     3280      return false;
     3281    }
     3282    if (value === null) {
     3283      return true;
     3284    }
     3285    switch (typeof value) {
     3286      case 'boolean':
     3287        return DOMProperty.shouldAttributeAcceptBooleanValue(name);
     3288      case 'undefined':
     3289      case 'number':
     3290      case 'string':
     3291      case 'object':
     3292        return true;
     3293      default:
     3294        // function, symbol
     3295        return false;
     3296    }
     3297  },
     3298
     3299  getPropertyInfo: function (name) {
     3300    return DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
     3301  },
     3302  shouldAttributeAcceptBooleanValue: function (name) {
     3303    if (DOMProperty.isReservedProp(name)) {
     3304      return true;
     3305    }
     3306    var propertyInfo = DOMProperty.getPropertyInfo(name);
     3307    if (propertyInfo) {
     3308      return propertyInfo.hasBooleanValue || propertyInfo.hasStringBooleanValue || propertyInfo.hasOverloadedBooleanValue;
     3309    }
     3310    var prefix = name.toLowerCase().slice(0, 5);
     3311    return prefix === 'data-' || prefix === 'aria-';
     3312  },
     3313
     3314
     3315  /**
     3316   * Checks to see if a property name is within the list of properties
     3317   * reserved for internal React operations. These properties should
     3318   * not be set on an HTML element.
     3319   *
     3320   * @private
     3321   * @param {string} name
     3322   * @return {boolean} If the name is within reserved props
     3323   */
     3324  isReservedProp: function (name) {
     3325    return RESERVED_PROPS.hasOwnProperty(name);
     3326  },
     3327
     3328
     3329  injection: DOMPropertyInjection
    31293330};
    31303331
    3131 module.exports = AutoFocusUtils;
    3132 },{"./ReactDOMComponentTree":71,"fbjs/lib/focusNode":17}],41:[function(require,module,exports){
     3332var DOMProperty_1 = DOMProperty;
     3333
    31333334/**
    3134  * Copyright 2013-present Facebook, Inc.
    3135  * All rights reserved.
    3136  *
    3137  * This source code is licensed under the BSD-style license found in the
    3138  * LICENSE file in the root directory of this source tree. An additional grant
    3139  * of patent rights can be found in the PATENTS file in the same directory.
    3140  *
     3335 * Copyright (c) 2015-present, Facebook, Inc.
     3336 *
     3337 * This source code is licensed under the MIT license found in the
     3338 * LICENSE file in the root directory of this source tree.
     3339 *
     3340 * @providesModule ReactDOMComponentFlags
    31413341 */
    31423342
    3143 'use strict';
    3144 
    3145 var EventPropagators = require('./EventPropagators');
    3146 var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
    3147 var FallbackCompositionState = require('./FallbackCompositionState');
    3148 var SyntheticCompositionEvent = require('./SyntheticCompositionEvent');
    3149 var SyntheticInputEvent = require('./SyntheticInputEvent');
    3150 
    3151 var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
    3152 var START_KEYCODE = 229;
    3153 
    3154 var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
    3155 
    3156 var documentMode = null;
    3157 if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
    3158   documentMode = document.documentMode;
    3159 }
    3160 
    3161 // Webkit offers a very useful `textInput` event that can be used to
    3162 // directly represent `beforeInput`. The IE `textinput` event is not as
    3163 // useful, so we don't use it.
    3164 var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
    3165 
    3166 // In IE9+, we have access to composition events, but the data supplied
    3167 // by the native compositionend event may be incorrect. Japanese ideographic
    3168 // spaces, for instance (\u3000) are not recorded correctly.
    3169 var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
     3343var ReactDOMComponentFlags = {
     3344  hasCachedChildNodes: 1 << 0
     3345};
     3346
     3347var ReactDOMComponentFlags_1 = ReactDOMComponentFlags;
    31703348
    31713349/**
    3172  * Opera <= 12 includes TextEvent in window, but does not fire
    3173  * text input events. Rely on keypress instead.
     3350 * Copyright (c) 2013-present, Facebook, Inc.
     3351 *
     3352 * This source code is licensed under the MIT license found in the
     3353 * LICENSE file in the root directory of this source tree.
     3354 *
     3355 * @providesModule ReactTypeOfWork
     3356 *
    31743357 */
    3175 function isPresto() {
    3176   var opera = window.opera;
    3177   return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
    3178 }
    3179 
    3180 var SPACEBAR_CODE = 32;
    3181 var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
    3182 
    3183 // Events and their corresponding property names.
    3184 var eventTypes = {
    3185   beforeInput: {
    3186     phasedRegistrationNames: {
    3187       bubbled: 'onBeforeInput',
    3188       captured: 'onBeforeInputCapture'
    3189     },
    3190     dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']
     3358
     3359var ReactTypeOfWork = {
     3360  IndeterminateComponent: 0, // Before we know whether it is functional or class
     3361  FunctionalComponent: 1,
     3362  ClassComponent: 2,
     3363  HostRoot: 3, // Root of a host tree. Could be nested inside another node.
     3364  HostPortal: 4, // A subtree. Could be an entry point to a different renderer.
     3365  HostComponent: 5,
     3366  HostText: 6,
     3367  CoroutineComponent: 7,
     3368  CoroutineHandlerPhase: 8,
     3369  YieldComponent: 9,
     3370  Fragment: 10
     3371};
     3372
     3373/**
     3374 * Copyright (c) 2013-present, Facebook, Inc.
     3375 *
     3376 * This source code is licensed under the MIT license found in the
     3377 * LICENSE file in the root directory of this source tree.
     3378 *
     3379 * @providesModule HTMLNodeType
     3380 */
     3381
     3382/**
     3383 * HTML nodeType values that represent the type of the node
     3384 */
     3385
     3386var HTMLNodeType = {
     3387  ELEMENT_NODE: 1,
     3388  TEXT_NODE: 3,
     3389  COMMENT_NODE: 8,
     3390  DOCUMENT_NODE: 9,
     3391  DOCUMENT_FRAGMENT_NODE: 11
     3392};
     3393
     3394var HTMLNodeType_1 = HTMLNodeType;
     3395
     3396var HostComponent = ReactTypeOfWork.HostComponent;
     3397var HostText = ReactTypeOfWork.HostText;
     3398
     3399var ELEMENT_NODE$1 = HTMLNodeType_1.ELEMENT_NODE;
     3400var COMMENT_NODE$1 = HTMLNodeType_1.COMMENT_NODE;
     3401
     3402
     3403
     3404var ATTR_NAME = DOMProperty_1.ID_ATTRIBUTE_NAME;
     3405var Flags = ReactDOMComponentFlags_1;
     3406
     3407var randomKey = Math.random().toString(36).slice(2);
     3408
     3409var internalInstanceKey = '__reactInternalInstance$' + randomKey;
     3410
     3411var internalEventHandlersKey = '__reactEventHandlers$' + randomKey;
     3412
     3413/**
     3414 * Check if a given node should be cached.
     3415 */
     3416function shouldPrecacheNode(node, nodeID) {
     3417  return node.nodeType === ELEMENT_NODE$1 && node.getAttribute(ATTR_NAME) === '' + nodeID || node.nodeType === COMMENT_NODE$1 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === COMMENT_NODE$1 && node.nodeValue === ' react-empty: ' + nodeID + ' ';
     3418}
     3419
     3420/**
     3421 * Drill down (through composites and empty components) until we get a host or
     3422 * host text component.
     3423 *
     3424 * This is pretty polymorphic but unavoidable with the current structure we have
     3425 * for `_renderedChildren`.
     3426 */
     3427function getRenderedHostOrTextFromComponent(component) {
     3428  var rendered;
     3429  while (rendered = component._renderedComponent) {
     3430    component = rendered;
     3431  }
     3432  return component;
     3433}
     3434
     3435/**
     3436 * Populate `_hostNode` on the rendered host/text component with the given
     3437 * DOM node. The passed `inst` can be a composite.
     3438 */
     3439function precacheNode(inst, node) {
     3440  var hostInst = getRenderedHostOrTextFromComponent(inst);
     3441  hostInst._hostNode = node;
     3442  node[internalInstanceKey] = hostInst;
     3443}
     3444
     3445function precacheFiberNode$1(hostInst, node) {
     3446  node[internalInstanceKey] = hostInst;
     3447}
     3448
     3449function uncacheNode(inst) {
     3450  var node = inst._hostNode;
     3451  if (node) {
     3452    delete node[internalInstanceKey];
     3453    inst._hostNode = null;
     3454  }
     3455}
     3456
     3457/**
     3458 * Populate `_hostNode` on each child of `inst`, assuming that the children
     3459 * match up with the DOM (element) children of `node`.
     3460 *
     3461 * We cache entire levels at once to avoid an n^2 problem where we access the
     3462 * children of a node sequentially and have to walk from the start to our target
     3463 * node every time.
     3464 *
     3465 * Since we update `_renderedChildren` and the actual DOM at (slightly)
     3466 * different times, we could race here and see a newer `_renderedChildren` than
     3467 * the DOM nodes we see. To avoid this, ReactMultiChild calls
     3468 * `prepareToManageChildren` before we change `_renderedChildren`, at which
     3469 * time the container's child nodes are always cached (until it unmounts).
     3470 */
     3471function precacheChildNodes(inst, node) {
     3472  if (inst._flags & Flags.hasCachedChildNodes) {
     3473    return;
     3474  }
     3475  var children = inst._renderedChildren;
     3476  var childNode = node.firstChild;
     3477  outer: for (var name in children) {
     3478    if (!children.hasOwnProperty(name)) {
     3479      continue;
     3480    }
     3481    var childInst = children[name];
     3482    var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
     3483    if (childID === 0) {
     3484      // We're currently unmounting this child in ReactMultiChild; skip it.
     3485      continue;
     3486    }
     3487    // We assume the child nodes are in the same order as the child instances.
     3488    for (; childNode !== null; childNode = childNode.nextSibling) {
     3489      if (shouldPrecacheNode(childNode, childID)) {
     3490        precacheNode(childInst, childNode);
     3491        continue outer;
     3492      }
     3493    }
     3494    // We reached the end of the DOM children without finding an ID match.
     3495    invariant(false, 'Unable to find element with ID %s.', childID);
     3496  }
     3497  inst._flags |= Flags.hasCachedChildNodes;
     3498}
     3499
     3500/**
     3501 * Given a DOM node, return the closest ReactDOMComponent or
     3502 * ReactDOMTextComponent instance ancestor.
     3503 */
     3504function getClosestInstanceFromNode(node) {
     3505  if (node[internalInstanceKey]) {
     3506    return node[internalInstanceKey];
     3507  }
     3508
     3509  // Walk up the tree until we find an ancestor whose instance we have cached.
     3510  var parents = [];
     3511  while (!node[internalInstanceKey]) {
     3512    parents.push(node);
     3513    if (node.parentNode) {
     3514      node = node.parentNode;
     3515    } else {
     3516      // Top of the tree. This node must not be part of a React tree (or is
     3517      // unmounted, potentially).
     3518      return null;
     3519    }
     3520  }
     3521
     3522  var closest;
     3523  var inst = node[internalInstanceKey];
     3524  if (inst.tag === HostComponent || inst.tag === HostText) {
     3525    // In Fiber, this will always be the deepest root.
     3526    return inst;
     3527  }
     3528  for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {
     3529    closest = inst;
     3530    if (parents.length) {
     3531      precacheChildNodes(inst, node);
     3532    }
     3533  }
     3534
     3535  return closest;
     3536}
     3537
     3538/**
     3539 * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
     3540 * instance, or null if the node was not rendered by this React.
     3541 */
     3542function getInstanceFromNode(node) {
     3543  var inst = node[internalInstanceKey];
     3544  if (inst) {
     3545    if (inst.tag === HostComponent || inst.tag === HostText) {
     3546      return inst;
     3547    } else if (inst._hostNode === node) {
     3548      return inst;
     3549    } else {
     3550      return null;
     3551    }
     3552  }
     3553  inst = getClosestInstanceFromNode(node);
     3554  if (inst != null && inst._hostNode === node) {
     3555    return inst;
     3556  } else {
     3557    return null;
     3558  }
     3559}
     3560
     3561/**
     3562 * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
     3563 * DOM node.
     3564 */
     3565function getNodeFromInstance(inst) {
     3566  if (inst.tag === HostComponent || inst.tag === HostText) {
     3567    // In Fiber this, is just the state node right now. We assume it will be
     3568    // a host component or host text.
     3569    return inst.stateNode;
     3570  }
     3571
     3572  // Without this first invariant, passing a non-DOM-component triggers the next
     3573  // invariant for a missing parent, which is super confusing.
     3574  !(inst._hostNode !== undefined) ? invariant(false, 'getNodeFromInstance: Invalid argument.') : void 0;
     3575
     3576  if (inst._hostNode) {
     3577    return inst._hostNode;
     3578  }
     3579
     3580  // Walk up the tree until we find an ancestor whose DOM node we have cached.
     3581  var parents = [];
     3582  while (!inst._hostNode) {
     3583    parents.push(inst);
     3584    !inst._hostParent ? invariant(false, 'React DOM tree root should always have a node reference.') : void 0;
     3585    inst = inst._hostParent;
     3586  }
     3587
     3588  // Now parents contains each ancestor that does *not* have a cached native
     3589  // node, and `inst` is the deepest ancestor that does.
     3590  for (; parents.length; inst = parents.pop()) {
     3591    precacheChildNodes(inst, inst._hostNode);
     3592  }
     3593
     3594  return inst._hostNode;
     3595}
     3596
     3597function getFiberCurrentPropsFromNode(node) {
     3598  return node[internalEventHandlersKey] || null;
     3599}
     3600
     3601function updateFiberProps$1(node, props) {
     3602  node[internalEventHandlersKey] = props;
     3603}
     3604
     3605var ReactDOMComponentTree = {
     3606  getClosestInstanceFromNode: getClosestInstanceFromNode,
     3607  getInstanceFromNode: getInstanceFromNode,
     3608  getNodeFromInstance: getNodeFromInstance,
     3609  precacheChildNodes: precacheChildNodes,
     3610  precacheNode: precacheNode,
     3611  uncacheNode: uncacheNode,
     3612  precacheFiberNode: precacheFiberNode$1,
     3613  getFiberCurrentPropsFromNode: getFiberCurrentPropsFromNode,
     3614  updateFiberProps: updateFiberProps$1
     3615};
     3616
     3617var ReactDOMComponentTree_1 = ReactDOMComponentTree;
     3618
     3619/**
     3620 * Copyright (c) 2013-present, Facebook, Inc.
     3621 *
     3622 * This source code is licensed under the MIT license found in the
     3623 * LICENSE file in the root directory of this source tree.
     3624 *
     3625 * @providesModule ReactInstanceMap
     3626 */
     3627
     3628/**
     3629 * `ReactInstanceMap` maintains a mapping from a public facing stateful
     3630 * instance (key) and the internal representation (value). This allows public
     3631 * methods to accept the user facing instance as an argument and map them back
     3632 * to internal methods.
     3633 */
     3634
     3635// TODO: Replace this with ES6: var ReactInstanceMap = new Map();
     3636
     3637var ReactInstanceMap = {
     3638  /**
     3639   * This API should be called `delete` but we'd have to make sure to always
     3640   * transform these to strings for IE support. When this transform is fully
     3641   * supported we can rename it.
     3642   */
     3643  remove: function (key) {
     3644    key._reactInternalFiber = undefined;
    31913645  },
    3192   compositionEnd: {
    3193     phasedRegistrationNames: {
    3194       bubbled: 'onCompositionEnd',
    3195       captured: 'onCompositionEndCapture'
    3196     },
    3197     dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
     3646
     3647  get: function (key) {
     3648    return key._reactInternalFiber;
    31983649  },
    3199   compositionStart: {
    3200     phasedRegistrationNames: {
    3201       bubbled: 'onCompositionStart',
    3202       captured: 'onCompositionStartCapture'
    3203     },
    3204     dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
     3650
     3651  has: function (key) {
     3652    return key._reactInternalFiber !== undefined;
    32053653  },
    3206   compositionUpdate: {
    3207     phasedRegistrationNames: {
    3208       bubbled: 'onCompositionUpdate',
    3209       captured: 'onCompositionUpdateCapture'
    3210     },
    3211     dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
     3654
     3655  set: function (key, value) {
     3656    key._reactInternalFiber = value;
    32123657  }
    32133658};
    32143659
    3215 // Track whether we've ever handled a keypress on the space key.
    3216 var hasSpaceKeypress = false;
     3660var ReactInstanceMap_1 = ReactInstanceMap;
     3661
     3662var ReactInternals = react.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
     3663
     3664var ReactGlobalSharedState = {
     3665  ReactCurrentOwner: ReactInternals.ReactCurrentOwner
     3666};
     3667
     3668{
     3669  _assign(ReactGlobalSharedState, {
     3670    ReactComponentTreeHook: ReactInternals.ReactComponentTreeHook,
     3671    ReactDebugCurrentFrame: ReactInternals.ReactDebugCurrentFrame
     3672  });
     3673}
     3674
     3675var ReactGlobalSharedState_1 = ReactGlobalSharedState;
    32173676
    32183677/**
    3219  * Return whether a native keypress event is assumed to be a command.
    3220  * This is required because Firefox fires `keypress` events for key commands
    3221  * (cut, copy, select-all, etc.) even though no character is inserted.
     3678 * Copyright (c) 2013-present, Facebook, Inc.
     3679 *
     3680 * This source code is licensed under the MIT license found in the
     3681 * LICENSE file in the root directory of this source tree.
     3682 *
     3683 * @providesModule getComponentName
     3684 *
    32223685 */
    3223 function isKeypressCommand(nativeEvent) {
    3224   return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
    3225   // ctrlKey && altKey is equivalent to AltGr, and is not a command.
    3226   !(nativeEvent.ctrlKey && nativeEvent.altKey);
    3227 }
     3686
     3687function getComponentName(instanceOrFiber) {
     3688  if (typeof instanceOrFiber.getName === 'function') {
     3689    // Stack reconciler
     3690    var instance = instanceOrFiber;
     3691    return instance.getName();
     3692  }
     3693  if (typeof instanceOrFiber.tag === 'number') {
     3694    // Fiber reconciler
     3695    var fiber = instanceOrFiber;
     3696    var type = fiber.type;
     3697
     3698    if (typeof type === 'string') {
     3699      return type;
     3700    }
     3701    if (typeof type === 'function') {
     3702      return type.displayName || type.name;
     3703    }
     3704  }
     3705  return null;
     3706}
     3707
     3708var getComponentName_1 = getComponentName;
    32283709
    32293710/**
    3230  * Translate native top level events into event types.
    3231  *
    3232  * @param {string} topLevelType
    3233  * @return {object}
     3711 * Copyright (c) 2013-present, Facebook, Inc.
     3712 *
     3713 * This source code is licensed under the MIT license found in the
     3714 * LICENSE file in the root directory of this source tree.
     3715 *
     3716 * @providesModule ReactTypeOfSideEffect
     3717 *
    32343718 */
    3235 function getCompositionEventType(topLevelType) {
    3236   switch (topLevelType) {
    3237     case 'topCompositionStart':
    3238       return eventTypes.compositionStart;
    3239     case 'topCompositionEnd':
    3240       return eventTypes.compositionEnd;
    3241     case 'topCompositionUpdate':
    3242       return eventTypes.compositionUpdate;
    3243   }
     3719
     3720var ReactTypeOfSideEffect = {
     3721  // Don't change these two values:
     3722  NoEffect: 0, //           0b00000000
     3723  PerformedWork: 1, //      0b00000001
     3724  // You can change the rest (and add more).
     3725  Placement: 2, //          0b00000010
     3726  Update: 4, //             0b00000100
     3727  PlacementAndUpdate: 6, // 0b00000110
     3728  Deletion: 8, //           0b00001000
     3729  ContentReset: 16, //      0b00010000
     3730  Callback: 32, //          0b00100000
     3731  Err: 64, //               0b01000000
     3732  Ref: 128 };
     3733
     3734var ReactCurrentOwner = ReactGlobalSharedState_1.ReactCurrentOwner;
     3735
     3736
     3737
     3738
     3739{
     3740  var warning$1 = require$$0;
     3741}
     3742
     3743var ClassComponent = ReactTypeOfWork.ClassComponent;
     3744var HostComponent$1 = ReactTypeOfWork.HostComponent;
     3745var HostRoot$1 = ReactTypeOfWork.HostRoot;
     3746var HostPortal = ReactTypeOfWork.HostPortal;
     3747var HostText$1 = ReactTypeOfWork.HostText;
     3748
     3749var NoEffect = ReactTypeOfSideEffect.NoEffect;
     3750var Placement = ReactTypeOfSideEffect.Placement;
     3751
     3752var MOUNTING = 1;
     3753var MOUNTED = 2;
     3754var UNMOUNTED = 3;
     3755
     3756function isFiberMountedImpl(fiber) {
     3757  var node = fiber;
     3758  if (!fiber.alternate) {
     3759    // If there is no alternate, this might be a new tree that isn't inserted
     3760    // yet. If it is, then it will have a pending insertion effect on it.
     3761    if ((node.effectTag & Placement) !== NoEffect) {
     3762      return MOUNTING;
     3763    }
     3764    while (node['return']) {
     3765      node = node['return'];
     3766      if ((node.effectTag & Placement) !== NoEffect) {
     3767        return MOUNTING;
     3768      }
     3769    }
     3770  } else {
     3771    while (node['return']) {
     3772      node = node['return'];
     3773    }
     3774  }
     3775  if (node.tag === HostRoot$1) {
     3776    // TODO: Check if this was a nested HostRoot when used with
     3777    // renderContainerIntoSubtree.
     3778    return MOUNTED;
     3779  }
     3780  // If we didn't hit the root, that means that we're in an disconnected tree
     3781  // that has been unmounted.
     3782  return UNMOUNTED;
     3783}
     3784var isFiberMounted = function (fiber) {
     3785  return isFiberMountedImpl(fiber) === MOUNTED;
     3786};
     3787
     3788var isMounted = function (component) {
     3789  {
     3790    var owner = ReactCurrentOwner.current;
     3791    if (owner !== null && owner.tag === ClassComponent) {
     3792      var ownerFiber = owner;
     3793      var instance = ownerFiber.stateNode;
     3794      warning$1(instance._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName_1(ownerFiber) || 'A component');
     3795      instance._warnedAboutRefsInRender = true;
     3796    }
     3797  }
     3798
     3799  var fiber = ReactInstanceMap_1.get(component);
     3800  if (!fiber) {
     3801    return false;
     3802  }
     3803  return isFiberMountedImpl(fiber) === MOUNTED;
     3804};
     3805
     3806function assertIsMounted(fiber) {
     3807  !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
     3808}
     3809
     3810function findCurrentFiberUsingSlowPath(fiber) {
     3811  var alternate = fiber.alternate;
     3812  if (!alternate) {
     3813    // If there is no alternate, then we only need to check if it is mounted.
     3814    var state = isFiberMountedImpl(fiber);
     3815    !(state !== UNMOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
     3816    if (state === MOUNTING) {
     3817      return null;
     3818    }
     3819    return fiber;
     3820  }
     3821  // If we have two possible branches, we'll walk backwards up to the root
     3822  // to see what path the root points to. On the way we may hit one of the
     3823  // special cases and we'll deal with them.
     3824  var a = fiber;
     3825  var b = alternate;
     3826  while (true) {
     3827    var parentA = a['return'];
     3828    var parentB = parentA ? parentA.alternate : null;
     3829    if (!parentA || !parentB) {
     3830      // We're at the root.
     3831      break;
     3832    }
     3833
     3834    // If both copies of the parent fiber point to the same child, we can
     3835    // assume that the child is current. This happens when we bailout on low
     3836    // priority: the bailed out fiber's child reuses the current child.
     3837    if (parentA.child === parentB.child) {
     3838      var child = parentA.child;
     3839      while (child) {
     3840        if (child === a) {
     3841          // We've determined that A is the current branch.
     3842          assertIsMounted(parentA);
     3843          return fiber;
     3844        }
     3845        if (child === b) {
     3846          // We've determined that B is the current branch.
     3847          assertIsMounted(parentA);
     3848          return alternate;
     3849        }
     3850        child = child.sibling;
     3851      }
     3852      // We should never have an alternate for any mounting node. So the only
     3853      // way this could possibly happen is if this was unmounted, if at all.
     3854      invariant(false, 'Unable to find node on an unmounted component.');
     3855    }
     3856
     3857    if (a['return'] !== b['return']) {
     3858      // The return pointer of A and the return pointer of B point to different
     3859      // fibers. We assume that return pointers never criss-cross, so A must
     3860      // belong to the child set of A.return, and B must belong to the child
     3861      // set of B.return.
     3862      a = parentA;
     3863      b = parentB;
     3864    } else {
     3865      // The return pointers point to the same fiber. We'll have to use the
     3866      // default, slow path: scan the child sets of each parent alternate to see
     3867      // which child belongs to which set.
     3868      //
     3869      // Search parent A's child set
     3870      var didFindChild = false;
     3871      var _child = parentA.child;
     3872      while (_child) {
     3873        if (_child === a) {
     3874          didFindChild = true;
     3875          a = parentA;
     3876          b = parentB;
     3877          break;
     3878        }
     3879        if (_child === b) {
     3880          didFindChild = true;
     3881          b = parentA;
     3882          a = parentB;
     3883          break;
     3884        }
     3885        _child = _child.sibling;
     3886      }
     3887      if (!didFindChild) {
     3888        // Search parent B's child set
     3889        _child = parentB.child;
     3890        while (_child) {
     3891          if (_child === a) {
     3892            didFindChild = true;
     3893            a = parentB;
     3894            b = parentA;
     3895            break;
     3896          }
     3897          if (_child === b) {
     3898            didFindChild = true;
     3899            b = parentB;
     3900            a = parentA;
     3901            break;
     3902          }
     3903          _child = _child.sibling;
     3904        }
     3905        !didFindChild ? invariant(false, 'Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.') : void 0;
     3906      }
     3907    }
     3908
     3909    !(a.alternate === b) ? invariant(false, 'Return fibers should always be each others\' alternates. This error is likely caused by a bug in React. Please file an issue.') : void 0;
     3910  }
     3911  // If the root is not a host container, we're in a disconnected tree. I.e.
     3912  // unmounted.
     3913  !(a.tag === HostRoot$1) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
     3914  if (a.stateNode.current === a) {
     3915    // We've determined that A is the current branch.
     3916    return fiber;
     3917  }
     3918  // Otherwise B has to be current branch.
     3919  return alternate;
     3920}
     3921var findCurrentFiberUsingSlowPath_1 = findCurrentFiberUsingSlowPath;
     3922
     3923var findCurrentHostFiber = function (parent) {
     3924  var currentParent = findCurrentFiberUsingSlowPath(parent);
     3925  if (!currentParent) {
     3926    return null;
     3927  }
     3928
     3929  // Next we'll drill down this component to find the first HostComponent/Text.
     3930  var node = currentParent;
     3931  while (true) {
     3932    if (node.tag === HostComponent$1 || node.tag === HostText$1) {
     3933      return node;
     3934    } else if (node.child) {
     3935      node.child['return'] = node;
     3936      node = node.child;
     3937      continue;
     3938    }
     3939    if (node === currentParent) {
     3940      return null;
     3941    }
     3942    while (!node.sibling) {
     3943      if (!node['return'] || node['return'] === currentParent) {
     3944        return null;
     3945      }
     3946      node = node['return'];
     3947    }
     3948    node.sibling['return'] = node['return'];
     3949    node = node.sibling;
     3950  }
     3951  // Flow needs the return null here, but ESLint complains about it.
     3952  // eslint-disable-next-line no-unreachable
     3953  return null;
     3954};
     3955
     3956var findCurrentHostFiberWithNoPortals = function (parent) {
     3957  var currentParent = findCurrentFiberUsingSlowPath(parent);
     3958  if (!currentParent) {
     3959    return null;
     3960  }
     3961
     3962  // Next we'll drill down this component to find the first HostComponent/Text.
     3963  var node = currentParent;
     3964  while (true) {
     3965    if (node.tag === HostComponent$1 || node.tag === HostText$1) {
     3966      return node;
     3967    } else if (node.child && node.tag !== HostPortal) {
     3968      node.child['return'] = node;
     3969      node = node.child;
     3970      continue;
     3971    }
     3972    if (node === currentParent) {
     3973      return null;
     3974    }
     3975    while (!node.sibling) {
     3976      if (!node['return'] || node['return'] === currentParent) {
     3977        return null;
     3978      }
     3979      node = node['return'];
     3980    }
     3981    node.sibling['return'] = node['return'];
     3982    node = node.sibling;
     3983  }
     3984  // Flow needs the return null here, but ESLint complains about it.
     3985  // eslint-disable-next-line no-unreachable
     3986  return null;
     3987};
     3988
     3989var ReactFiberTreeReflection = {
     3990        isFiberMounted: isFiberMounted,
     3991        isMounted: isMounted,
     3992        findCurrentFiberUsingSlowPath: findCurrentFiberUsingSlowPath_1,
     3993        findCurrentHostFiber: findCurrentHostFiber,
     3994        findCurrentHostFiberWithNoPortals: findCurrentHostFiberWithNoPortals
     3995};
     3996
     3997var ReactErrorUtils = {
     3998  // Used by Fiber to simulate a try-catch.
     3999  _caughtError: null,
     4000  _hasCaughtError: false,
     4001
     4002  // Used by event system to capture/rethrow the first error.
     4003  _rethrowError: null,
     4004  _hasRethrowError: false,
     4005
     4006  injection: {
     4007    injectErrorUtils: function (injectedErrorUtils) {
     4008      !(typeof injectedErrorUtils.invokeGuardedCallback === 'function') ? invariant(false, 'Injected invokeGuardedCallback() must be a function.') : void 0;
     4009      invokeGuardedCallback = injectedErrorUtils.invokeGuardedCallback;
     4010    }
     4011  },
     4012
     4013  /**
     4014   * Call a function while guarding against errors that happens within it.
     4015   * Returns an error if it throws, otherwise null.
     4016   *
     4017   * In production, this is implemented using a try-catch. The reason we don't
     4018   * use a try-catch directly is so that we can swap out a different
     4019   * implementation in DEV mode.
     4020   *
     4021   * @param {String} name of the guard to use for logging or debugging
     4022   * @param {Function} func The function to invoke
     4023   * @param {*} context The context to use when calling the function
     4024   * @param {...*} args Arguments for function
     4025   */
     4026  invokeGuardedCallback: function (name, func, context, a, b, c, d, e, f) {
     4027    invokeGuardedCallback.apply(ReactErrorUtils, arguments);
     4028  },
     4029
     4030  /**
     4031   * Same as invokeGuardedCallback, but instead of returning an error, it stores
     4032   * it in a global so it can be rethrown by `rethrowCaughtError` later.
     4033   * TODO: See if _caughtError and _rethrowError can be unified.
     4034   *
     4035   * @param {String} name of the guard to use for logging or debugging
     4036   * @param {Function} func The function to invoke
     4037   * @param {*} context The context to use when calling the function
     4038   * @param {...*} args Arguments for function
     4039   */
     4040  invokeGuardedCallbackAndCatchFirstError: function (name, func, context, a, b, c, d, e, f) {
     4041    ReactErrorUtils.invokeGuardedCallback.apply(this, arguments);
     4042    if (ReactErrorUtils.hasCaughtError()) {
     4043      var error = ReactErrorUtils.clearCaughtError();
     4044      if (!ReactErrorUtils._hasRethrowError) {
     4045        ReactErrorUtils._hasRethrowError = true;
     4046        ReactErrorUtils._rethrowError = error;
     4047      }
     4048    }
     4049  },
     4050
     4051  /**
     4052   * During execution of guarded functions we will capture the first error which
     4053   * we will rethrow to be handled by the top level error handler.
     4054   */
     4055  rethrowCaughtError: function () {
     4056    return rethrowCaughtError.apply(ReactErrorUtils, arguments);
     4057  },
     4058
     4059  hasCaughtError: function () {
     4060    return ReactErrorUtils._hasCaughtError;
     4061  },
     4062
     4063  clearCaughtError: function () {
     4064    if (ReactErrorUtils._hasCaughtError) {
     4065      var error = ReactErrorUtils._caughtError;
     4066      ReactErrorUtils._caughtError = null;
     4067      ReactErrorUtils._hasCaughtError = false;
     4068      return error;
     4069    } else {
     4070      invariant(false, 'clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.');
     4071    }
     4072  }
     4073};
     4074
     4075var invokeGuardedCallback = function (name, func, context, a, b, c, d, e, f) {
     4076  ReactErrorUtils._hasCaughtError = false;
     4077  ReactErrorUtils._caughtError = null;
     4078  var funcArgs = Array.prototype.slice.call(arguments, 3);
     4079  try {
     4080    func.apply(context, funcArgs);
     4081  } catch (error) {
     4082    ReactErrorUtils._caughtError = error;
     4083    ReactErrorUtils._hasCaughtError = true;
     4084  }
     4085};
     4086
     4087{
     4088  // In DEV mode, we swap out invokeGuardedCallback for a special version
     4089  // that plays more nicely with the browser's DevTools. The idea is to preserve
     4090  // "Pause on exceptions" behavior. Because React wraps all user-provided
     4091  // functions in invokeGuardedCallback, and the production version of
     4092  // invokeGuardedCallback uses a try-catch, all user exceptions are treated
     4093  // like caught exceptions, and the DevTools won't pause unless the developer
     4094  // takes the extra step of enabling pause on caught exceptions. This is
     4095  // untintuitive, though, because even though React has caught the error, from
     4096  // the developer's perspective, the error is uncaught.
     4097  //
     4098  // To preserve the expected "Pause on exceptions" behavior, we don't use a
     4099  // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
     4100  // DOM node, and call the user-provided callback from inside an event handler
     4101  // for that fake event. If the callback throws, the error is "captured" using
     4102  // a global event handler. But because the error happens in a different
     4103  // event loop context, it does not interrupt the normal program flow.
     4104  // Effectively, this gives us try-catch behavior without actually using
     4105  // try-catch. Neat!
     4106
     4107  // Check that the browser supports the APIs we need to implement our special
     4108  // DEV version of invokeGuardedCallback
     4109  if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
     4110    var fakeNode = document.createElement('react');
     4111
     4112    var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) {
     4113      // Keeps track of whether the user-provided callback threw an error. We
     4114      // set this to true at the beginning, then set it to false right after
     4115      // calling the function. If the function errors, `didError` will never be
     4116      // set to false. This strategy works even if the browser is flaky and
     4117      // fails to call our global error handler, because it doesn't rely on
     4118      // the error event at all.
     4119      var didError = true;
     4120
     4121      // Create an event handler for our fake event. We will synchronously
     4122      // dispatch our fake event using `dispatchEvent`. Inside the handler, we
     4123      // call the user-provided callback.
     4124      var funcArgs = Array.prototype.slice.call(arguments, 3);
     4125      function callCallback() {
     4126        // We immediately remove the callback from event listeners so that
     4127        // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
     4128        // nested call would trigger the fake event handlers of any call higher
     4129        // in the stack.
     4130        fakeNode.removeEventListener(evtType, callCallback, false);
     4131        func.apply(context, funcArgs);
     4132        didError = false;
     4133      }
     4134
     4135      // Create a global error event handler. We use this to capture the value
     4136      // that was thrown. It's possible that this error handler will fire more
     4137      // than once; for example, if non-React code also calls `dispatchEvent`
     4138      // and a handler for that event throws. We should be resilient to most of
     4139      // those cases. Even if our error event handler fires more than once, the
     4140      // last error event is always used. If the callback actually does error,
     4141      // we know that the last error event is the correct one, because it's not
     4142      // possible for anything else to have happened in between our callback
     4143      // erroring and the code that follows the `dispatchEvent` call below. If
     4144      // the callback doesn't error, but the error event was fired, we know to
     4145      // ignore it because `didError` will be false, as described above.
     4146      var error = void 0;
     4147      // Use this to track whether the error event is ever called.
     4148      var didSetError = false;
     4149      var isCrossOriginError = false;
     4150
     4151      function onError(event) {
     4152        error = event.error;
     4153        didSetError = true;
     4154        if (error === null && event.colno === 0 && event.lineno === 0) {
     4155          isCrossOriginError = true;
     4156        }
     4157      }
     4158
     4159      // Create a fake event type.
     4160      var evtType = 'react-' + (name ? name : 'invokeguardedcallback');
     4161
     4162      // Attach our event handlers
     4163      window.addEventListener('error', onError);
     4164      fakeNode.addEventListener(evtType, callCallback, false);
     4165
     4166      // Synchronously dispatch our fake event. If the user-provided function
     4167      // errors, it will trigger our global error handler.
     4168      var evt = document.createEvent('Event');
     4169      evt.initEvent(evtType, false, false);
     4170      fakeNode.dispatchEvent(evt);
     4171
     4172      if (didError) {
     4173        if (!didSetError) {
     4174          // The callback errored, but the error event never fired.
     4175          error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
     4176        } else if (isCrossOriginError) {
     4177          error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://fb.me/react-crossorigin-error for more information.');
     4178        }
     4179        ReactErrorUtils._hasCaughtError = true;
     4180        ReactErrorUtils._caughtError = error;
     4181      } else {
     4182        ReactErrorUtils._hasCaughtError = false;
     4183        ReactErrorUtils._caughtError = null;
     4184      }
     4185
     4186      // Remove our event listeners
     4187      window.removeEventListener('error', onError);
     4188    };
     4189
     4190    invokeGuardedCallback = invokeGuardedCallbackDev;
     4191  }
     4192}
     4193
     4194var rethrowCaughtError = function () {
     4195  if (ReactErrorUtils._hasRethrowError) {
     4196    var error = ReactErrorUtils._rethrowError;
     4197    ReactErrorUtils._rethrowError = null;
     4198    ReactErrorUtils._hasRethrowError = false;
     4199    throw error;
     4200  }
     4201};
     4202
     4203var ReactErrorUtils_1 = ReactErrorUtils;
     4204
     4205{
     4206  var warning$2 = require$$0;
    32444207}
    32454208
    32464209/**
    3247  * Does our fallback best-guess model think this event signifies that
    3248  * composition has begun?
    3249  *
    3250  * @param {string} topLevelType
    3251  * @param {object} nativeEvent
    3252  * @return {boolean}
     4210 * Injected dependencies:
    32534211 */
    3254 function isFallbackCompositionStart(topLevelType, nativeEvent) {
    3255   return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE;
    3256 }
    32574212
    32584213/**
    3259  * Does our fallback mode think that this event is the end of composition?
    3260  *
    3261  * @param {string} topLevelType
    3262  * @param {object} nativeEvent
    3263  * @return {boolean}
     4214 * - `ComponentTree`: [required] Module that can convert between React instances
     4215 *   and actual node references.
    32644216 */
    3265 function isFallbackCompositionEnd(topLevelType, nativeEvent) {
    3266   switch (topLevelType) {
    3267     case 'topKeyUp':
    3268       // Command keys insert or clear IME input.
    3269       return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
    3270     case 'topKeyDown':
    3271       // Expect IME keyCode on each keydown. If we get any other
    3272       // code we must have exited earlier.
    3273       return nativeEvent.keyCode !== START_KEYCODE;
    3274     case 'topKeyPress':
    3275     case 'topMouseDown':
    3276     case 'topBlur':
    3277       // Events are not possible without cancelling IME.
    3278       return true;
     4217var ComponentTree;
     4218var injection = {
     4219  injectComponentTree: function (Injected) {
     4220    ComponentTree = Injected;
     4221    {
     4222      warning$2(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.');
     4223    }
     4224  }
     4225};
     4226
     4227function isEndish(topLevelType) {
     4228  return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel';
     4229}
     4230
     4231function isMoveish(topLevelType) {
     4232  return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove';
     4233}
     4234function isStartish(topLevelType) {
     4235  return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';
     4236}
     4237
     4238var validateEventDispatches;
     4239{
     4240  validateEventDispatches = function (event) {
     4241    var dispatchListeners = event._dispatchListeners;
     4242    var dispatchInstances = event._dispatchInstances;
     4243
     4244    var listenersIsArr = Array.isArray(dispatchListeners);
     4245    var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
     4246
     4247    var instancesIsArr = Array.isArray(dispatchInstances);
     4248    var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
     4249
     4250    warning$2(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.');
     4251  };
     4252}
     4253
     4254/**
     4255 * Dispatch the event to the listener.
     4256 * @param {SyntheticEvent} event SyntheticEvent to handle
     4257 * @param {boolean} simulated If the event is simulated (changes exn behavior)
     4258 * @param {function} listener Application-level callback
     4259 * @param {*} inst Internal component instance
     4260 */
     4261function executeDispatch(event, simulated, listener, inst) {
     4262  var type = event.type || 'unknown-event';
     4263  event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
     4264  ReactErrorUtils_1.invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
     4265  event.currentTarget = null;
     4266}
     4267
     4268/**
     4269 * Standard/simple iteration through an event's collected dispatches.
     4270 */
     4271function executeDispatchesInOrder(event, simulated) {
     4272  var dispatchListeners = event._dispatchListeners;
     4273  var dispatchInstances = event._dispatchInstances;
     4274  {
     4275    validateEventDispatches(event);
     4276  }
     4277  if (Array.isArray(dispatchListeners)) {
     4278    for (var i = 0; i < dispatchListeners.length; i++) {
     4279      if (event.isPropagationStopped()) {
     4280        break;
     4281      }
     4282      // Listeners and Instances are two parallel arrays that are always in sync.
     4283      executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
     4284    }
     4285  } else if (dispatchListeners) {
     4286    executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
     4287  }
     4288  event._dispatchListeners = null;
     4289  event._dispatchInstances = null;
     4290}
     4291
     4292/**
     4293 * Standard/simple iteration through an event's collected dispatches, but stops
     4294 * at the first dispatch execution returning true, and returns that id.
     4295 *
     4296 * @return {?string} id of the first dispatch execution who's listener returns
     4297 * true, or null if no listener returned true.
     4298 */
     4299function executeDispatchesInOrderStopAtTrueImpl(event) {
     4300  var dispatchListeners = event._dispatchListeners;
     4301  var dispatchInstances = event._dispatchInstances;
     4302  {
     4303    validateEventDispatches(event);
     4304  }
     4305  if (Array.isArray(dispatchListeners)) {
     4306    for (var i = 0; i < dispatchListeners.length; i++) {
     4307      if (event.isPropagationStopped()) {
     4308        break;
     4309      }
     4310      // Listeners and Instances are two parallel arrays that are always in sync.
     4311      if (dispatchListeners[i](event, dispatchInstances[i])) {
     4312        return dispatchInstances[i];
     4313      }
     4314    }
     4315  } else if (dispatchListeners) {
     4316    if (dispatchListeners(event, dispatchInstances)) {
     4317      return dispatchInstances;
     4318    }
     4319  }
     4320  return null;
     4321}
     4322
     4323/**
     4324 * @see executeDispatchesInOrderStopAtTrueImpl
     4325 */
     4326function executeDispatchesInOrderStopAtTrue(event) {
     4327  var ret = executeDispatchesInOrderStopAtTrueImpl(event);
     4328  event._dispatchInstances = null;
     4329  event._dispatchListeners = null;
     4330  return ret;
     4331}
     4332
     4333/**
     4334 * Execution of a "direct" dispatch - there must be at most one dispatch
     4335 * accumulated on the event or it is considered an error. It doesn't really make
     4336 * sense for an event with multiple dispatches (bubbled) to keep track of the
     4337 * return values at each dispatch execution, but it does tend to make sense when
     4338 * dealing with "direct" dispatches.
     4339 *
     4340 * @return {*} The return value of executing the single dispatch.
     4341 */
     4342function executeDirectDispatch(event) {
     4343  {
     4344    validateEventDispatches(event);
     4345  }
     4346  var dispatchListener = event._dispatchListeners;
     4347  var dispatchInstance = event._dispatchInstances;
     4348  !!Array.isArray(dispatchListener) ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : void 0;
     4349  event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
     4350  var res = dispatchListener ? dispatchListener(event) : null;
     4351  event.currentTarget = null;
     4352  event._dispatchListeners = null;
     4353  event._dispatchInstances = null;
     4354  return res;
     4355}
     4356
     4357/**
     4358 * @param {SyntheticEvent} event
     4359 * @return {boolean} True iff number of dispatches accumulated is greater than 0.
     4360 */
     4361function hasDispatches(event) {
     4362  return !!event._dispatchListeners;
     4363}
     4364
     4365/**
     4366 * General utilities that are useful in creating custom Event Plugins.
     4367 */
     4368var EventPluginUtils = {
     4369  isEndish: isEndish,
     4370  isMoveish: isMoveish,
     4371  isStartish: isStartish,
     4372
     4373  executeDirectDispatch: executeDirectDispatch,
     4374  executeDispatchesInOrder: executeDispatchesInOrder,
     4375  executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
     4376  hasDispatches: hasDispatches,
     4377
     4378  getFiberCurrentPropsFromNode: function (node) {
     4379    return ComponentTree.getFiberCurrentPropsFromNode(node);
     4380  },
     4381  getInstanceFromNode: function (node) {
     4382    return ComponentTree.getInstanceFromNode(node);
     4383  },
     4384  getNodeFromInstance: function (node) {
     4385    return ComponentTree.getNodeFromInstance(node);
     4386  },
     4387
     4388  injection: injection
     4389};
     4390
     4391var EventPluginUtils_1 = EventPluginUtils;
     4392
     4393// Use to restore controlled state after a change event has fired.
     4394
     4395var fiberHostComponent = null;
     4396
     4397var ReactControlledComponentInjection = {
     4398  injectFiberControlledHostComponent: function (hostComponentImpl) {
     4399    // The fiber implementation doesn't use dynamic dispatch so we need to
     4400    // inject the implementation.
     4401    fiberHostComponent = hostComponentImpl;
     4402  }
     4403};
     4404
     4405var restoreTarget = null;
     4406var restoreQueue = null;
     4407
     4408function restoreStateOfTarget(target) {
     4409  // We perform this translation at the end of the event loop so that we
     4410  // always receive the correct fiber here
     4411  var internalInstance = EventPluginUtils_1.getInstanceFromNode(target);
     4412  if (!internalInstance) {
     4413    // Unmounted
     4414    return;
     4415  }
     4416  if (typeof internalInstance.tag === 'number') {
     4417    !(fiberHostComponent && typeof fiberHostComponent.restoreControlledState === 'function') ? invariant(false, 'Fiber needs to be injected to handle a fiber target for controlled events. This error is likely caused by a bug in React. Please file an issue.') : void 0;
     4418    var props = EventPluginUtils_1.getFiberCurrentPropsFromNode(internalInstance.stateNode);
     4419    fiberHostComponent.restoreControlledState(internalInstance.stateNode, internalInstance.type, props);
     4420    return;
     4421  }
     4422  !(typeof internalInstance.restoreControlledState === 'function') ? invariant(false, 'The internal instance must be a React host component. This error is likely caused by a bug in React. Please file an issue.') : void 0;
     4423  // If it is not a Fiber, we can just use dynamic dispatch.
     4424  internalInstance.restoreControlledState();
     4425}
     4426
     4427var ReactControlledComponent = {
     4428  injection: ReactControlledComponentInjection,
     4429
     4430  enqueueStateRestore: function (target) {
     4431    if (restoreTarget) {
     4432      if (restoreQueue) {
     4433        restoreQueue.push(target);
     4434      } else {
     4435        restoreQueue = [target];
     4436      }
     4437    } else {
     4438      restoreTarget = target;
     4439    }
     4440  },
     4441  restoreStateIfNeeded: function () {
     4442    if (!restoreTarget) {
     4443      return;
     4444    }
     4445    var target = restoreTarget;
     4446    var queuedTargets = restoreQueue;
     4447    restoreTarget = null;
     4448    restoreQueue = null;
     4449
     4450    restoreStateOfTarget(target);
     4451    if (queuedTargets) {
     4452      for (var i = 0; i < queuedTargets.length; i++) {
     4453        restoreStateOfTarget(queuedTargets[i]);
     4454      }
     4455    }
     4456  }
     4457};
     4458
     4459var ReactControlledComponent_1 = ReactControlledComponent;
     4460
     4461// Used as a way to call batchedUpdates when we don't know if we're in a Fiber
     4462// or Stack context. Such as when we're dispatching events or if third party
     4463// libraries need to call batchedUpdates. Eventually, this API will go away when
     4464// everything is batched by default. We'll then have a similar API to opt-out of
     4465// scheduled work and instead do synchronous work.
     4466
     4467// Defaults
     4468var stackBatchedUpdates = function (fn, a, b, c, d, e) {
     4469  return fn(a, b, c, d, e);
     4470};
     4471var fiberBatchedUpdates = function (fn, bookkeeping) {
     4472  return fn(bookkeeping);
     4473};
     4474
     4475function performFiberBatchedUpdates(fn, bookkeeping) {
     4476  // If we have Fiber loaded, we need to wrap this in a batching call so that
     4477  // Fiber can apply its default priority for this call.
     4478  return fiberBatchedUpdates(fn, bookkeeping);
     4479}
     4480function batchedUpdates(fn, bookkeeping) {
     4481  // We first perform work with the stack batching strategy, by passing our
     4482  // indirection to it.
     4483  return stackBatchedUpdates(performFiberBatchedUpdates, fn, bookkeeping);
     4484}
     4485
     4486var isNestingBatched = false;
     4487function batchedUpdatesWithControlledComponents(fn, bookkeeping) {
     4488  if (isNestingBatched) {
     4489    // If we are currently inside another batch, we need to wait until it
     4490    // fully completes before restoring state. Therefore, we add the target to
     4491    // a queue of work.
     4492    return batchedUpdates(fn, bookkeeping);
     4493  }
     4494  isNestingBatched = true;
     4495  try {
     4496    return batchedUpdates(fn, bookkeeping);
     4497  } finally {
     4498    // Here we wait until all updates have propagated, which is important
     4499    // when using controlled components within layers:
     4500    // https://github.com/facebook/react/issues/1698
     4501    // Then we restore state of any controlled component.
     4502    isNestingBatched = false;
     4503    ReactControlledComponent_1.restoreStateIfNeeded();
     4504  }
     4505}
     4506
     4507var ReactGenericBatchingInjection = {
     4508  injectStackBatchedUpdates: function (_batchedUpdates) {
     4509    stackBatchedUpdates = _batchedUpdates;
     4510  },
     4511  injectFiberBatchedUpdates: function (_batchedUpdates) {
     4512    fiberBatchedUpdates = _batchedUpdates;
     4513  }
     4514};
     4515
     4516var ReactGenericBatching = {
     4517  batchedUpdates: batchedUpdatesWithControlledComponents,
     4518  injection: ReactGenericBatchingInjection
     4519};
     4520
     4521var ReactGenericBatching_1 = ReactGenericBatching;
     4522
     4523var TEXT_NODE$1 = HTMLNodeType_1.TEXT_NODE;
     4524
     4525/**
     4526 * Gets the target node from a native browser event by accounting for
     4527 * inconsistencies in browser DOM APIs.
     4528 *
     4529 * @param {object} nativeEvent Native browser event.
     4530 * @return {DOMEventTarget} Target node.
     4531 */
     4532
     4533
     4534function getEventTarget(nativeEvent) {
     4535  var target = nativeEvent.target || nativeEvent.srcElement || window;
     4536
     4537  // Normalize SVG <use> element events #4963
     4538  if (target.correspondingUseElement) {
     4539    target = target.correspondingUseElement;
     4540  }
     4541
     4542  // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
     4543  // @see http://www.quirksmode.org/js/events_properties.html
     4544  return target.nodeType === TEXT_NODE$1 ? target.parentNode : target;
     4545}
     4546
     4547var getEventTarget_1 = getEventTarget;
     4548
     4549var HostRoot = ReactTypeOfWork.HostRoot;
     4550
     4551
     4552var CALLBACK_BOOKKEEPING_POOL_SIZE = 10;
     4553var callbackBookkeepingPool = [];
     4554
     4555/**
     4556 * Find the deepest React component completely containing the root of the
     4557 * passed-in instance (for use when entire React trees are nested within each
     4558 * other). If React trees are not nested, returns null.
     4559 */
     4560function findRootContainerNode(inst) {
     4561  // TODO: It may be a good idea to cache this to prevent unnecessary DOM
     4562  // traversal, but caching is difficult to do correctly without using a
     4563  // mutation observer to listen for all DOM changes.
     4564  if (typeof inst.tag === 'number') {
     4565    while (inst['return']) {
     4566      inst = inst['return'];
     4567    }
     4568    if (inst.tag !== HostRoot) {
     4569      // This can happen if we're in a detached tree.
     4570      return null;
     4571    }
     4572    return inst.stateNode.containerInfo;
     4573  } else {
     4574    while (inst._hostParent) {
     4575      inst = inst._hostParent;
     4576    }
     4577    var rootNode = ReactDOMComponentTree_1.getNodeFromInstance(inst);
     4578    return rootNode.parentNode;
     4579  }
     4580}
     4581
     4582// Used to store ancestor hierarchy in top level callback
     4583function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst) {
     4584  if (callbackBookkeepingPool.length) {
     4585    var instance = callbackBookkeepingPool.pop();
     4586    instance.topLevelType = topLevelType;
     4587    instance.nativeEvent = nativeEvent;
     4588    instance.targetInst = targetInst;
     4589    return instance;
     4590  }
     4591  return {
     4592    topLevelType: topLevelType,
     4593    nativeEvent: nativeEvent,
     4594    targetInst: targetInst,
     4595    ancestors: []
     4596  };
     4597}
     4598
     4599function releaseTopLevelCallbackBookKeeping(instance) {
     4600  instance.topLevelType = null;
     4601  instance.nativeEvent = null;
     4602  instance.targetInst = null;
     4603  instance.ancestors.length = 0;
     4604  if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) {
     4605    callbackBookkeepingPool.push(instance);
     4606  }
     4607}
     4608
     4609function handleTopLevelImpl(bookKeeping) {
     4610  var targetInst = bookKeeping.targetInst;
     4611
     4612  // Loop through the hierarchy, in case there's any nested components.
     4613  // It's important that we build the array of ancestors before calling any
     4614  // event handlers, because event handlers can modify the DOM, leading to
     4615  // inconsistencies with ReactMount's node cache. See #1105.
     4616  var ancestor = targetInst;
     4617  do {
     4618    if (!ancestor) {
     4619      bookKeeping.ancestors.push(ancestor);
     4620      break;
     4621    }
     4622    var root = findRootContainerNode(ancestor);
     4623    if (!root) {
     4624      break;
     4625    }
     4626    bookKeeping.ancestors.push(ancestor);
     4627    ancestor = ReactDOMComponentTree_1.getClosestInstanceFromNode(root);
     4628  } while (ancestor);
     4629
     4630  for (var i = 0; i < bookKeeping.ancestors.length; i++) {
     4631    targetInst = bookKeeping.ancestors[i];
     4632    ReactDOMEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget_1(bookKeeping.nativeEvent));
     4633  }
     4634}
     4635
     4636var ReactDOMEventListener = {
     4637  _enabled: true,
     4638  _handleTopLevel: null,
     4639
     4640  setHandleTopLevel: function (handleTopLevel) {
     4641    ReactDOMEventListener._handleTopLevel = handleTopLevel;
     4642  },
     4643
     4644  setEnabled: function (enabled) {
     4645    ReactDOMEventListener._enabled = !!enabled;
     4646  },
     4647
     4648  isEnabled: function () {
     4649    return ReactDOMEventListener._enabled;
     4650  },
     4651
     4652  /**
     4653   * Traps top-level events by using event bubbling.
     4654   *
     4655   * @param {string} topLevelType Record from `BrowserEventConstants`.
     4656   * @param {string} handlerBaseName Event name (e.g. "click").
     4657   * @param {object} element Element on which to attach listener.
     4658   * @return {?object} An object with a remove function which will forcefully
     4659   *                  remove the listener.
     4660   * @internal
     4661   */
     4662  trapBubbledEvent: function (topLevelType, handlerBaseName, element) {
     4663    if (!element) {
     4664      return null;
     4665    }
     4666    return EventListener.listen(element, handlerBaseName, ReactDOMEventListener.dispatchEvent.bind(null, topLevelType));
     4667  },
     4668
     4669  /**
     4670   * Traps a top-level event by using event capturing.
     4671   *
     4672   * @param {string} topLevelType Record from `BrowserEventConstants`.
     4673   * @param {string} handlerBaseName Event name (e.g. "click").
     4674   * @param {object} element Element on which to attach listener.
     4675   * @return {?object} An object with a remove function which will forcefully
     4676   *                  remove the listener.
     4677   * @internal
     4678   */
     4679  trapCapturedEvent: function (topLevelType, handlerBaseName, element) {
     4680    if (!element) {
     4681      return null;
     4682    }
     4683    return EventListener.capture(element, handlerBaseName, ReactDOMEventListener.dispatchEvent.bind(null, topLevelType));
     4684  },
     4685
     4686  dispatchEvent: function (topLevelType, nativeEvent) {
     4687    if (!ReactDOMEventListener._enabled) {
     4688      return;
     4689    }
     4690
     4691    var nativeEventTarget = getEventTarget_1(nativeEvent);
     4692    var targetInst = ReactDOMComponentTree_1.getClosestInstanceFromNode(nativeEventTarget);
     4693    if (targetInst !== null && typeof targetInst.tag === 'number' && !ReactFiberTreeReflection.isFiberMounted(targetInst)) {
     4694      // If we get an event (ex: img onload) before committing that
     4695      // component's mount, ignore it for now (that is, treat it as if it was an
     4696      // event on a non-React tree). We might also consider queueing events and
     4697      // dispatching them after the mount.
     4698      targetInst = null;
     4699    }
     4700
     4701    var bookKeeping = getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst);
     4702
     4703    try {
     4704      // Event queue being processed in the same cycle allows
     4705      // `preventDefault`.
     4706      ReactGenericBatching_1.batchedUpdates(handleTopLevelImpl, bookKeeping);
     4707    } finally {
     4708      releaseTopLevelCallbackBookKeeping(bookKeeping);
     4709    }
     4710  }
     4711};
     4712
     4713var ReactDOMEventListener_1 = ReactDOMEventListener;
     4714
     4715/**
     4716 * Accumulates items that must not be null or undefined into the first one. This
     4717 * is used to conserve memory by avoiding array allocations, and thus sacrifices
     4718 * API cleanness. Since `current` can be null before being passed in and not
     4719 * null after this function, make sure to assign it back to `current`:
     4720 *
     4721 * `a = accumulateInto(a, b);`
     4722 *
     4723 * This API should be sparingly used. Try `accumulate` for something cleaner.
     4724 *
     4725 * @return {*|array<*>} An accumulation of items.
     4726 */
     4727
     4728function accumulateInto(current, next) {
     4729  !(next != null) ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : void 0;
     4730
     4731  if (current == null) {
     4732    return next;
     4733  }
     4734
     4735  // Both are not empty. Warning: Never call x.concat(y) when you are not
     4736  // certain that x is an Array (x could be a string with concat method).
     4737  if (Array.isArray(current)) {
     4738    if (Array.isArray(next)) {
     4739      current.push.apply(current, next);
     4740      return current;
     4741    }
     4742    current.push(next);
     4743    return current;
     4744  }
     4745
     4746  if (Array.isArray(next)) {
     4747    // A bit too dangerous to mutate `next`.
     4748    return [current].concat(next);
     4749  }
     4750
     4751  return [current, next];
     4752}
     4753
     4754var accumulateInto_1 = accumulateInto;
     4755
     4756/**
     4757 * Copyright (c) 2013-present, Facebook, Inc.
     4758 *
     4759 * This source code is licensed under the MIT license found in the
     4760 * LICENSE file in the root directory of this source tree.
     4761 *
     4762 * @providesModule forEachAccumulated
     4763 *
     4764 */
     4765
     4766/**
     4767 * @param {array} arr an "accumulation" of items which is either an Array or
     4768 * a single item. Useful when paired with the `accumulate` module. This is a
     4769 * simple utility that allows us to reason about a collection of items, but
     4770 * handling the case when there is exactly one item (and we do not need to
     4771 * allocate an array).
     4772 * @param {function} cb Callback invoked with each element or a collection.
     4773 * @param {?} [scope] Scope used as `this` in a callback.
     4774 */
     4775
     4776function forEachAccumulated(arr, cb, scope) {
     4777  if (Array.isArray(arr)) {
     4778    arr.forEach(cb, scope);
     4779  } else if (arr) {
     4780    cb.call(scope, arr);
     4781  }
     4782}
     4783
     4784var forEachAccumulated_1 = forEachAccumulated;
     4785
     4786/**
     4787 * Internal queue of events that have accumulated their dispatches and are
     4788 * waiting to have their dispatches executed.
     4789 */
     4790var eventQueue = null;
     4791
     4792/**
     4793 * Dispatches an event and releases it back into the pool, unless persistent.
     4794 *
     4795 * @param {?object} event Synthetic event to be dispatched.
     4796 * @param {boolean} simulated If the event is simulated (changes exn behavior)
     4797 * @private
     4798 */
     4799var executeDispatchesAndRelease = function (event, simulated) {
     4800  if (event) {
     4801    EventPluginUtils_1.executeDispatchesInOrder(event, simulated);
     4802
     4803    if (!event.isPersistent()) {
     4804      event.constructor.release(event);
     4805    }
     4806  }
     4807};
     4808var executeDispatchesAndReleaseSimulated = function (e) {
     4809  return executeDispatchesAndRelease(e, true);
     4810};
     4811var executeDispatchesAndReleaseTopLevel = function (e) {
     4812  return executeDispatchesAndRelease(e, false);
     4813};
     4814
     4815function isInteractive(tag) {
     4816  return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
     4817}
     4818
     4819function shouldPreventMouseEvent(name, type, props) {
     4820  switch (name) {
     4821    case 'onClick':
     4822    case 'onClickCapture':
     4823    case 'onDoubleClick':
     4824    case 'onDoubleClickCapture':
     4825    case 'onMouseDown':
     4826    case 'onMouseDownCapture':
     4827    case 'onMouseMove':
     4828    case 'onMouseMoveCapture':
     4829    case 'onMouseUp':
     4830    case 'onMouseUpCapture':
     4831      return !!(props.disabled && isInteractive(type));
    32794832    default:
    32804833      return false;
     
    32834836
    32844837/**
    3285  * Google Input Tools provides composition data via a CustomEvent,
    3286  * with the `data` property populated in the `detail` object. If this
    3287  * is available on the event object, use it. If not, this is a plain
    3288  * composition event and we have nothing special to extract.
    3289  *
    3290  * @param {object} nativeEvent
    3291  * @return {?string}
     4838 * This is a unified interface for event plugins to be installed and configured.
     4839 *
     4840 * Event plugins can implement the following properties:
     4841 *
     4842 *   `extractEvents` {function(string, DOMEventTarget, string, object): *}
     4843 *     Required. When a top-level event is fired, this method is expected to
     4844 *     extract synthetic events that will in turn be queued and dispatched.
     4845 *
     4846 *   `eventTypes` {object}
     4847 *     Optional, plugins that fire events must publish a mapping of registration
     4848 *     names that are used to register listeners. Values of this mapping must
     4849 *     be objects that contain `registrationName` or `phasedRegistrationNames`.
     4850 *
     4851 *   `executeDispatch` {function(object, function, string)}
     4852 *     Optional, allows plugins to override how an event gets dispatched. By
     4853 *     default, the listener is simply invoked.
     4854 *
     4855 * Each plugin that is injected into `EventsPluginHub` is immediately operable.
     4856 *
     4857 * @public
    32924858 */
    3293 function getDataFromCustomEvent(nativeEvent) {
    3294   var detail = nativeEvent.detail;
    3295   if (typeof detail === 'object' && 'data' in detail) {
    3296     return detail.data;
    3297   }
    3298   return null;
    3299 }
    3300 
    3301 // Track the current IME composition fallback object, if any.
    3302 var currentComposition = null;
     4859var EventPluginHub = {
     4860  /**
     4861   * Methods for injecting dependencies.
     4862   */
     4863  injection: {
     4864    /**
     4865     * @param {array} InjectedEventPluginOrder
     4866     * @public
     4867     */
     4868    injectEventPluginOrder: EventPluginRegistry_1.injectEventPluginOrder,
     4869
     4870    /**
     4871     * @param {object} injectedNamesToPlugins Map from names to plugin modules.
     4872     */
     4873    injectEventPluginsByName: EventPluginRegistry_1.injectEventPluginsByName
     4874  },
     4875
     4876  /**
     4877   * @param {object} inst The instance, which is the source of events.
     4878   * @param {string} registrationName Name of listener (e.g. `onClick`).
     4879   * @return {?function} The stored callback.
     4880   */
     4881  getListener: function (inst, registrationName) {
     4882    var listener;
     4883
     4884    // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
     4885    // live here; needs to be moved to a better place soon
     4886    if (typeof inst.tag === 'number') {
     4887      var stateNode = inst.stateNode;
     4888      if (!stateNode) {
     4889        // Work in progress (ex: onload events in incremental mode).
     4890        return null;
     4891      }
     4892      var props = EventPluginUtils_1.getFiberCurrentPropsFromNode(stateNode);
     4893      if (!props) {
     4894        // Work in progress.
     4895        return null;
     4896      }
     4897      listener = props[registrationName];
     4898      if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
     4899        return null;
     4900      }
     4901    } else {
     4902      var currentElement = inst._currentElement;
     4903      if (typeof currentElement === 'string' || typeof currentElement === 'number') {
     4904        // Text node, let it bubble through.
     4905        return null;
     4906      }
     4907      if (!inst._rootNodeID) {
     4908        // If the instance is already unmounted, we have no listeners.
     4909        return null;
     4910      }
     4911      var _props = currentElement.props;
     4912      listener = _props[registrationName];
     4913      if (shouldPreventMouseEvent(registrationName, currentElement.type, _props)) {
     4914        return null;
     4915      }
     4916    }
     4917
     4918    !(!listener || typeof listener === 'function') ? invariant(false, 'Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener) : void 0;
     4919    return listener;
     4920  },
     4921
     4922  /**
     4923   * Allows registered plugins an opportunity to extract events from top-level
     4924   * native browser events.
     4925   *
     4926   * @return {*} An accumulation of synthetic events.
     4927   * @internal
     4928   */
     4929  extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
     4930    var events;
     4931    var plugins = EventPluginRegistry_1.plugins;
     4932    for (var i = 0; i < plugins.length; i++) {
     4933      // Not every plugin in the ordering may be loaded at runtime.
     4934      var possiblePlugin = plugins[i];
     4935      if (possiblePlugin) {
     4936        var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
     4937        if (extractedEvents) {
     4938          events = accumulateInto_1(events, extractedEvents);
     4939        }
     4940      }
     4941    }
     4942    return events;
     4943  },
     4944
     4945  /**
     4946   * Enqueues a synthetic event that should be dispatched when
     4947   * `processEventQueue` is invoked.
     4948   *
     4949   * @param {*} events An accumulation of synthetic events.
     4950   * @internal
     4951   */
     4952  enqueueEvents: function (events) {
     4953    if (events) {
     4954      eventQueue = accumulateInto_1(eventQueue, events);
     4955    }
     4956  },
     4957
     4958  /**
     4959   * Dispatches all synthetic events on the event queue.
     4960   *
     4961   * @internal
     4962   */
     4963  processEventQueue: function (simulated) {
     4964    // Set `eventQueue` to null before processing it so that we can tell if more
     4965    // events get enqueued while processing.
     4966    var processingEventQueue = eventQueue;
     4967    eventQueue = null;
     4968    if (simulated) {
     4969      forEachAccumulated_1(processingEventQueue, executeDispatchesAndReleaseSimulated);
     4970    } else {
     4971      forEachAccumulated_1(processingEventQueue, executeDispatchesAndReleaseTopLevel);
     4972    }
     4973    !!eventQueue ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : void 0;
     4974    // This would be a good time to rethrow if any of the event handlers threw.
     4975    ReactErrorUtils_1.rethrowCaughtError();
     4976  }
     4977};
     4978
     4979var EventPluginHub_1 = EventPluginHub;
     4980
     4981function runEventQueueInBatch(events) {
     4982  EventPluginHub_1.enqueueEvents(events);
     4983  EventPluginHub_1.processEventQueue(false);
     4984}
     4985
     4986var ReactEventEmitterMixin = {
     4987  /**
     4988   * Streams a fired top-level event to `EventPluginHub` where plugins have the
     4989   * opportunity to create `ReactEvent`s to be dispatched.
     4990   */
     4991  handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
     4992    var events = EventPluginHub_1.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
     4993    runEventQueueInBatch(events);
     4994  }
     4995};
     4996
     4997var ReactEventEmitterMixin_1 = ReactEventEmitterMixin;
     4998
     4999var useHasFeature;
     5000if (ExecutionEnvironment.canUseDOM) {
     5001  useHasFeature = document.implementation && document.implementation.hasFeature &&
     5002  // always returns true in newer browsers as per the standard.
     5003  // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
     5004  document.implementation.hasFeature('', '') !== true;
     5005}
    33035006
    33045007/**
    3305  * @return {?object} A SyntheticCompositionEvent.
     5008 * Checks if an event is supported in the current execution environment.
     5009 *
     5010 * NOTE: This will not work correctly for non-generic events such as `change`,
     5011 * `reset`, `load`, `error`, and `select`.
     5012 *
     5013 * Borrows from Modernizr.
     5014 *
     5015 * @param {string} eventNameSuffix Event name, e.g. "click".
     5016 * @param {?boolean} capture Check if the capture phase is supported.
     5017 * @return {boolean} True if the event is supported.
     5018 * @internal
     5019 * @license Modernizr 3.0.0pre (Custom Build) | MIT
    33065020 */
    3307 function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
    3308   var eventType;
    3309   var fallbackData;
    3310 
    3311   if (canUseCompositionEvent) {
    3312     eventType = getCompositionEventType(topLevelType);
    3313   } else if (!currentComposition) {
    3314     if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
    3315       eventType = eventTypes.compositionStart;
    3316     }
    3317   } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
    3318     eventType = eventTypes.compositionEnd;
    3319   }
    3320 
    3321   if (!eventType) {
    3322     return null;
    3323   }
    3324 
    3325   if (useFallbackCompositionData) {
    3326     // The current composition is stored statically and must not be
    3327     // overwritten while composition continues.
    3328     if (!currentComposition && eventType === eventTypes.compositionStart) {
    3329       currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);
    3330     } else if (eventType === eventTypes.compositionEnd) {
    3331       if (currentComposition) {
    3332         fallbackData = currentComposition.getData();
    3333       }
    3334     }
    3335   }
    3336 
    3337   var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
    3338 
    3339   if (fallbackData) {
    3340     // Inject data generated from fallback path into the synthetic event.
    3341     // This matches the property of native CompositionEventInterface.
    3342     event.data = fallbackData;
    3343   } else {
    3344     var customData = getDataFromCustomEvent(nativeEvent);
    3345     if (customData !== null) {
    3346       event.data = customData;
    3347     }
    3348   }
    3349 
    3350   EventPropagators.accumulateTwoPhaseDispatches(event);
    3351   return event;
    3352 }
     5021function isEventSupported(eventNameSuffix, capture) {
     5022  if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) {
     5023    return false;
     5024  }
     5025
     5026  var eventName = 'on' + eventNameSuffix;
     5027  var isSupported = eventName in document;
     5028
     5029  if (!isSupported) {
     5030    var element = document.createElement('div');
     5031    element.setAttribute(eventName, 'return;');
     5032    isSupported = typeof element[eventName] === 'function';
     5033  }
     5034
     5035  if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
     5036    // This is the only way to test support for the `wheel` event in IE9+.
     5037    isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
     5038  }
     5039
     5040  return isSupported;
     5041}
     5042
     5043var isEventSupported_1 = isEventSupported;
    33535044
    33545045/**
    3355  * @param {string} topLevelType Record from `EventConstants`.
    3356  * @param {object} nativeEvent Native browser event.
    3357  * @return {?string} The string corresponding to this `beforeInput` event.
     5046 * Generate a mapping of standard vendor prefixes using the defined style property and event name.
     5047 *
     5048 * @param {string} styleProp
     5049 * @param {string} eventName
     5050 * @returns {object}
    33585051 */
    3359 function getNativeBeforeInputChars(topLevelType, nativeEvent) {
    3360   switch (topLevelType) {
    3361     case 'topCompositionEnd':
    3362       return getDataFromCustomEvent(nativeEvent);
    3363     case 'topKeyPress':
    3364       /**
    3365        * If native `textInput` events are available, our goal is to make
    3366        * use of them. However, there is a special case: the spacebar key.
    3367        * In Webkit, preventing default on a spacebar `textInput` event
    3368        * cancels character insertion, but it *also* causes the browser
    3369        * to fall back to its default spacebar behavior of scrolling the
    3370        * page.
    3371        *
    3372        * Tracking at:
    3373        * https://code.google.com/p/chromium/issues/detail?id=355103
    3374        *
    3375        * To avoid this issue, use the keypress event as if no `textInput`
    3376        * event is available.
    3377        */
    3378       var which = nativeEvent.which;
    3379       if (which !== SPACEBAR_CODE) {
    3380         return null;
    3381       }
    3382 
    3383       hasSpaceKeypress = true;
    3384       return SPACEBAR_CHAR;
    3385 
    3386     case 'topTextInput':
    3387       // Record the characters to be added to the DOM.
    3388       var chars = nativeEvent.data;
    3389 
    3390       // If it's a spacebar character, assume that we have already handled
    3391       // it at the keypress level and bail immediately. Android Chrome
    3392       // doesn't give us keycodes, so we need to blacklist it.
    3393       if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
    3394         return null;
    3395       }
    3396 
    3397       return chars;
    3398 
    3399     default:
    3400       // For other native event types, do nothing.
    3401       return null;
    3402   }
     5052function makePrefixMap(styleProp, eventName) {
     5053  var prefixes = {};
     5054
     5055  prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
     5056  prefixes['Webkit' + styleProp] = 'webkit' + eventName;
     5057  prefixes['Moz' + styleProp] = 'moz' + eventName;
     5058  prefixes['ms' + styleProp] = 'MS' + eventName;
     5059  prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
     5060
     5061  return prefixes;
    34035062}
    34045063
    34055064/**
    3406  * For browsers that do not provide the `textInput` event, extract the
    3407  * appropriate string to use for SyntheticInputEvent.
    3408  *
    3409  * @param {string} topLevelType Record from `EventConstants`.
    3410  * @param {object} nativeEvent Native browser event.
    3411  * @return {?string} The fallback string for this `beforeInput` event.
     5065 * A list of event names to a configurable list of vendor prefixes.
    34125066 */
    3413 function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
    3414   // If we are currently composing (IME) and using a fallback to do so,
    3415   // try to extract the composed characters from the fallback object.
    3416   // If composition event is available, we extract a string only at
    3417   // compositionevent, otherwise extract it at fallback events.
    3418   if (currentComposition) {
    3419     if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
    3420       var chars = currentComposition.getData();
    3421       FallbackCompositionState.release(currentComposition);
    3422       currentComposition = null;
    3423       return chars;
    3424     }
    3425     return null;
    3426   }
    3427 
    3428   switch (topLevelType) {
    3429     case 'topPaste':
    3430       // If a paste event occurs after a keypress, throw out the input
    3431       // chars. Paste events should not lead to BeforeInput events.
    3432       return null;
    3433     case 'topKeyPress':
    3434       /**
    3435        * As of v27, Firefox may fire keypress events even when no character
    3436        * will be inserted. A few possibilities:
    3437        *
    3438        * - `which` is `0`. Arrow keys, Esc key, etc.
    3439        *
    3440        * - `which` is the pressed key code, but no char is available.
    3441        *   Ex: 'AltGr + d` in Polish. There is no modified character for
    3442        *   this key combination and no character is inserted into the
    3443        *   document, but FF fires the keypress for char code `100` anyway.
    3444        *   No `input` event will occur.
    3445        *
    3446        * - `which` is the pressed key code, but a command combination is
    3447        *   being used. Ex: `Cmd+C`. No character is inserted, and no
    3448        *   `input` event will occur.
    3449        */
    3450       if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
    3451         return String.fromCharCode(nativeEvent.which);
    3452       }
    3453       return null;
    3454     case 'topCompositionEnd':
    3455       return useFallbackCompositionData ? null : nativeEvent.data;
    3456     default:
    3457       return null;
    3458   }
    3459 }
     5067var vendorPrefixes = {
     5068  animationend: makePrefixMap('Animation', 'AnimationEnd'),
     5069  animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
     5070  animationstart: makePrefixMap('Animation', 'AnimationStart'),
     5071  transitionend: makePrefixMap('Transition', 'TransitionEnd')
     5072};
    34605073
    34615074/**
    3462  * Extract a SyntheticInputEvent for `beforeInput`, based on either native
    3463  * `textInput` or fallback behavior.
    3464  *
    3465  * @return {?object} A SyntheticInputEvent.
     5075 * Event names that have already been detected and prefixed (if applicable).
    34665076 */
    3467 function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
    3468   var chars;
    3469 
    3470   if (canUseTextInputEvent) {
    3471     chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
    3472   } else {
    3473     chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
    3474   }
    3475 
    3476   // If no characters are being inserted, no BeforeInput event should
    3477   // be fired.
    3478   if (!chars) {
    3479     return null;
    3480   }
    3481 
    3482   var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
    3483 
    3484   event.data = chars;
    3485   EventPropagators.accumulateTwoPhaseDispatches(event);
    3486   return event;
    3487 }
     5077var prefixedEventNames = {};
    34885078
    34895079/**
    3490  * Create an `onBeforeInput` event to match
    3491  * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
    3492  *
    3493  * This event plugin is based on the native `textInput` event
    3494  * available in Chrome, Safari, Opera, and IE. This event fires after
    3495  * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
    3496  *
    3497  * `beforeInput` is spec'd but not implemented in any browsers, and
    3498  * the `input` event does not provide any useful information about what has
    3499  * actually been added, contrary to the spec. Thus, `textInput` is the best
    3500  * available event to identify the characters that have actually been inserted
    3501  * into the target node.
    3502  *
    3503  * This plugin is also responsible for emitting `composition` events, thus
    3504  * allowing us to share composition fallback code for both `beforeInput` and
    3505  * `composition` event types.
     5080 * Element to check for prefixes on.
    35065081 */
    3507 var BeforeInputEventPlugin = {
    3508   eventTypes: eventTypes,
    3509 
    3510   extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
    3511     return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];
    3512   }
     5082var style = {};
     5083
     5084/**
     5085 * Bootstrap if a DOM exists.
     5086 */
     5087if (ExecutionEnvironment.canUseDOM) {
     5088  style = document.createElement('div').style;
     5089
     5090  // On some platforms, in particular some releases of Android 4.x,
     5091  // the un-prefixed "animation" and "transition" properties are defined on the
     5092  // style object but the events that fire will still be prefixed, so we need
     5093  // to check if the un-prefixed events are usable, and if not remove them from the map.
     5094  if (!('AnimationEvent' in window)) {
     5095    delete vendorPrefixes.animationend.animation;
     5096    delete vendorPrefixes.animationiteration.animation;
     5097    delete vendorPrefixes.animationstart.animation;
     5098  }
     5099
     5100  // Same as above
     5101  if (!('TransitionEvent' in window)) {
     5102    delete vendorPrefixes.transitionend.transition;
     5103  }
     5104}
     5105
     5106/**
     5107 * Attempts to determine the correct vendor prefixed event name.
     5108 *
     5109 * @param {string} eventName
     5110 * @returns {string}
     5111 */
     5112function getVendorPrefixedEventName(eventName) {
     5113  if (prefixedEventNames[eventName]) {
     5114    return prefixedEventNames[eventName];
     5115  } else if (!vendorPrefixes[eventName]) {
     5116    return eventName;
     5117  }
     5118
     5119  var prefixMap = vendorPrefixes[eventName];
     5120
     5121  for (var styleProp in prefixMap) {
     5122    if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
     5123      return prefixedEventNames[eventName] = prefixMap[styleProp];
     5124    }
     5125  }
     5126
     5127  return '';
     5128}
     5129
     5130var getVendorPrefixedEventName_1 = getVendorPrefixedEventName;
     5131
     5132/**
     5133 * Types of raw signals from the browser caught at the top level.
     5134 *
     5135 * For events like 'submit' which don't consistently bubble (which we
     5136 * trap at a lower node than `document`), binding at `document` would
     5137 * cause duplicate events so we don't include them here.
     5138 */
     5139var topLevelTypes$1 = {
     5140  topAbort: 'abort',
     5141  topAnimationEnd: getVendorPrefixedEventName_1('animationend') || 'animationend',
     5142  topAnimationIteration: getVendorPrefixedEventName_1('animationiteration') || 'animationiteration',
     5143  topAnimationStart: getVendorPrefixedEventName_1('animationstart') || 'animationstart',
     5144  topBlur: 'blur',
     5145  topCancel: 'cancel',
     5146  topCanPlay: 'canplay',
     5147  topCanPlayThrough: 'canplaythrough',
     5148  topChange: 'change',
     5149  topClick: 'click',
     5150  topClose: 'close',
     5151  topCompositionEnd: 'compositionend',
     5152  topCompositionStart: 'compositionstart',
     5153  topCompositionUpdate: 'compositionupdate',
     5154  topContextMenu: 'contextmenu',
     5155  topCopy: 'copy',
     5156  topCut: 'cut',
     5157  topDoubleClick: 'dblclick',
     5158  topDrag: 'drag',
     5159  topDragEnd: 'dragend',
     5160  topDragEnter: 'dragenter',
     5161  topDragExit: 'dragexit',
     5162  topDragLeave: 'dragleave',
     5163  topDragOver: 'dragover',
     5164  topDragStart: 'dragstart',
     5165  topDrop: 'drop',
     5166  topDurationChange: 'durationchange',
     5167  topEmptied: 'emptied',
     5168  topEncrypted: 'encrypted',
     5169  topEnded: 'ended',
     5170  topError: 'error',
     5171  topFocus: 'focus',
     5172  topInput: 'input',
     5173  topKeyDown: 'keydown',
     5174  topKeyPress: 'keypress',
     5175  topKeyUp: 'keyup',
     5176  topLoadedData: 'loadeddata',
     5177  topLoad: 'load',
     5178  topLoadedMetadata: 'loadedmetadata',
     5179  topLoadStart: 'loadstart',
     5180  topMouseDown: 'mousedown',
     5181  topMouseMove: 'mousemove',
     5182  topMouseOut: 'mouseout',
     5183  topMouseOver: 'mouseover',
     5184  topMouseUp: 'mouseup',
     5185  topPaste: 'paste',
     5186  topPause: 'pause',
     5187  topPlay: 'play',
     5188  topPlaying: 'playing',
     5189  topProgress: 'progress',
     5190  topRateChange: 'ratechange',
     5191  topScroll: 'scroll',
     5192  topSeeked: 'seeked',
     5193  topSeeking: 'seeking',
     5194  topSelectionChange: 'selectionchange',
     5195  topStalled: 'stalled',
     5196  topSuspend: 'suspend',
     5197  topTextInput: 'textInput',
     5198  topTimeUpdate: 'timeupdate',
     5199  topToggle: 'toggle',
     5200  topTouchCancel: 'touchcancel',
     5201  topTouchEnd: 'touchend',
     5202  topTouchMove: 'touchmove',
     5203  topTouchStart: 'touchstart',
     5204  topTransitionEnd: getVendorPrefixedEventName_1('transitionend') || 'transitionend',
     5205  topVolumeChange: 'volumechange',
     5206  topWaiting: 'waiting',
     5207  topWheel: 'wheel'
    35135208};
    35145209
    3515 module.exports = BeforeInputEventPlugin;
    3516 },{"./EventPropagators":57,"./FallbackCompositionState":58,"./SyntheticCompositionEvent":122,"./SyntheticInputEvent":126,"fbjs/lib/ExecutionEnvironment":9}],42:[function(require,module,exports){
     5210var BrowserEventConstants = {
     5211  topLevelTypes: topLevelTypes$1
     5212};
     5213
     5214var BrowserEventConstants_1 = BrowserEventConstants;
     5215
     5216var topLevelTypes = BrowserEventConstants_1.topLevelTypes;
     5217
    35175218/**
    3518  * Copyright 2013-present, Facebook, Inc.
    3519  * All rights reserved.
    3520  *
    3521  * This source code is licensed under the BSD-style license found in the
    3522  * LICENSE file in the root directory of this source tree. An additional grant
    3523  * of patent rights can be found in the PATENTS file in the same directory.
    3524  *
     5219 * Summary of `ReactBrowserEventEmitter` event handling:
     5220 *
     5221 *  - Top-level delegation is used to trap most native browser events. This
     5222 *    may only occur in the main thread and is the responsibility of
     5223 *    ReactDOMEventListener, which is injected and can therefore support
     5224 *    pluggable event sources. This is the only work that occurs in the main
     5225 *    thread.
     5226 *
     5227 *  - We normalize and de-duplicate events to account for browser quirks. This
     5228 *    may be done in the worker thread.
     5229 *
     5230 *  - Forward these native events (with the associated top-level type used to
     5231 *    trap it) to `EventPluginHub`, which in turn will ask plugins if they want
     5232 *    to extract any synthetic events.
     5233 *
     5234 *  - The `EventPluginHub` will then process each event by annotating them with
     5235 *    "dispatches", a sequence of listeners and IDs that care about that event.
     5236 *
     5237 *  - The `EventPluginHub` then dispatches the events.
     5238 *
     5239 * Overview of React and the event system:
     5240 *
     5241 * +------------+    .
     5242 * |    DOM     |    .
     5243 * +------------+    .
     5244 *       |           .
     5245 *       v           .
     5246 * +------------+    .
     5247 * | ReactEvent |    .
     5248 * |  Listener  |    .
     5249 * +------------+    .                         +-----------+
     5250 *       |           .               +--------+|SimpleEvent|
     5251 *       |           .               |         |Plugin     |
     5252 * +-----|------+    .               v         +-----------+
     5253 * |     |      |    .    +--------------+                    +------------+
     5254 * |     +-----------.--->|EventPluginHub|                    |    Event   |
     5255 * |            |    .    |              |     +-----------+  | Propagators|
     5256 * | ReactEvent |    .    |              |     |TapEvent   |  |------------|
     5257 * |  Emitter   |    .    |              |<---+|Plugin     |  |other plugin|
     5258 * |            |    .    |              |     +-----------+  |  utilities |
     5259 * |     +-----------.--->|              |                    +------------+
     5260 * |     |      |    .    +--------------+
     5261 * +-----|------+    .                ^        +-----------+
     5262 *       |           .                |        |Enter/Leave|
     5263 *       +           .                +-------+|Plugin     |
     5264 * +-------------+   .                         +-----------+
     5265 * | application |   .
     5266 * |-------------|   .
     5267 * |             |   .
     5268 * |             |   .
     5269 * +-------------+   .
     5270 *                   .
     5271 *    React Core     .  General Purpose Event Plugin System
    35255272 */
    35265273
    3527 'use strict';
     5274var alreadyListeningTo = {};
     5275var reactTopListenersCounter = 0;
     5276
     5277/**
     5278 * To ensure no conflicts with other potential React instances on the page
     5279 */
     5280var topListenersIDKey = '_reactListenersID' + ('' + Math.random()).slice(2);
     5281
     5282function getListeningForDocument(mountAt) {
     5283  // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
     5284  // directly.
     5285  if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
     5286    mountAt[topListenersIDKey] = reactTopListenersCounter++;
     5287    alreadyListeningTo[mountAt[topListenersIDKey]] = {};
     5288  }
     5289  return alreadyListeningTo[mountAt[topListenersIDKey]];
     5290}
     5291
     5292var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin_1, {
     5293  /**
     5294   * Sets whether or not any created callbacks should be enabled.
     5295   *
     5296   * @param {boolean} enabled True if callbacks should be enabled.
     5297   */
     5298  setEnabled: function (enabled) {
     5299    if (ReactDOMEventListener_1) {
     5300      ReactDOMEventListener_1.setEnabled(enabled);
     5301    }
     5302  },
     5303
     5304  /**
     5305   * @return {boolean} True if callbacks are enabled.
     5306   */
     5307  isEnabled: function () {
     5308    return !!(ReactDOMEventListener_1 && ReactDOMEventListener_1.isEnabled());
     5309  },
     5310
     5311  /**
     5312   * We listen for bubbled touch events on the document object.
     5313   *
     5314   * Firefox v8.01 (and possibly others) exhibited strange behavior when
     5315   * mounting `onmousemove` events at some node that was not the document
     5316   * element. The symptoms were that if your mouse is not moving over something
     5317   * contained within that mount point (for example on the background) the
     5318   * top-level listeners for `onmousemove` won't be called. However, if you
     5319   * register the `mousemove` on the document object, then it will of course
     5320   * catch all `mousemove`s. This along with iOS quirks, justifies restricting
     5321   * top-level listeners to the document object only, at least for these
     5322   * movement types of events and possibly all events.
     5323   *
     5324   * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
     5325   *
     5326   * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
     5327   * they bubble to document.
     5328   *
     5329   * @param {string} registrationName Name of listener (e.g. `onClick`).
     5330   * @param {object} contentDocumentHandle Document which owns the container
     5331   */
     5332  listenTo: function (registrationName, contentDocumentHandle) {
     5333    var mountAt = contentDocumentHandle;
     5334    var isListening = getListeningForDocument(mountAt);
     5335    var dependencies = EventPluginRegistry_1.registrationNameDependencies[registrationName];
     5336
     5337    for (var i = 0; i < dependencies.length; i++) {
     5338      var dependency = dependencies[i];
     5339      if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
     5340        if (dependency === 'topWheel') {
     5341          if (isEventSupported_1('wheel')) {
     5342            ReactDOMEventListener_1.trapBubbledEvent('topWheel', 'wheel', mountAt);
     5343          } else if (isEventSupported_1('mousewheel')) {
     5344            ReactDOMEventListener_1.trapBubbledEvent('topWheel', 'mousewheel', mountAt);
     5345          } else {
     5346            // Firefox needs to capture a different mouse scroll event.
     5347            // @see http://www.quirksmode.org/dom/events/tests/scroll.html
     5348            ReactDOMEventListener_1.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
     5349          }
     5350        } else if (dependency === 'topScroll') {
     5351          ReactDOMEventListener_1.trapCapturedEvent('topScroll', 'scroll', mountAt);
     5352        } else if (dependency === 'topFocus' || dependency === 'topBlur') {
     5353          ReactDOMEventListener_1.trapCapturedEvent('topFocus', 'focus', mountAt);
     5354          ReactDOMEventListener_1.trapCapturedEvent('topBlur', 'blur', mountAt);
     5355
     5356          // to make sure blur and focus event listeners are only attached once
     5357          isListening.topBlur = true;
     5358          isListening.topFocus = true;
     5359        } else if (dependency === 'topCancel') {
     5360          if (isEventSupported_1('cancel', true)) {
     5361            ReactDOMEventListener_1.trapCapturedEvent('topCancel', 'cancel', mountAt);
     5362          }
     5363          isListening.topCancel = true;
     5364        } else if (dependency === 'topClose') {
     5365          if (isEventSupported_1('close', true)) {
     5366            ReactDOMEventListener_1.trapCapturedEvent('topClose', 'close', mountAt);
     5367          }
     5368          isListening.topClose = true;
     5369        } else if (topLevelTypes.hasOwnProperty(dependency)) {
     5370          ReactDOMEventListener_1.trapBubbledEvent(dependency, topLevelTypes[dependency], mountAt);
     5371        }
     5372
     5373        isListening[dependency] = true;
     5374      }
     5375    }
     5376  },
     5377
     5378  isListeningToAllDependencies: function (registrationName, mountAt) {
     5379    var isListening = getListeningForDocument(mountAt);
     5380    var dependencies = EventPluginRegistry_1.registrationNameDependencies[registrationName];
     5381    for (var i = 0; i < dependencies.length; i++) {
     5382      var dependency = dependencies[i];
     5383      if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
     5384        return false;
     5385      }
     5386    }
     5387    return true;
     5388  },
     5389
     5390  trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
     5391    return ReactDOMEventListener_1.trapBubbledEvent(topLevelType, handlerBaseName, handle);
     5392  },
     5393
     5394  trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
     5395    return ReactDOMEventListener_1.trapCapturedEvent(topLevelType, handlerBaseName, handle);
     5396  }
     5397});
     5398
     5399var ReactBrowserEventEmitter_1 = ReactBrowserEventEmitter;
     5400
     5401/**
     5402 * Copyright (c) 2013-present, Facebook, Inc.
     5403 *
     5404 * This source code is licensed under the MIT license found in the
     5405 * LICENSE file in the root directory of this source tree.
     5406 *
     5407 * @providesModule ReactDOMFeatureFlags
     5408 */
     5409
     5410var ReactDOMFeatureFlags = {
     5411  fiberAsyncScheduling: false,
     5412  useFiber: true
     5413};
     5414
     5415var ReactDOMFeatureFlags_1 = ReactDOMFeatureFlags;
     5416
     5417/**
     5418 * Copyright (c) 2013-present, Facebook, Inc.
     5419 *
     5420 * This source code is licensed under the MIT license found in the
     5421 * LICENSE file in the root directory of this source tree.
     5422 *
     5423 * @providesModule CSSProperty
     5424 */
    35285425
    35295426/**
     
    35405437  boxOrdinalGroup: true,
    35415438  columnCount: true,
     5439  columns: true,
    35425440  flex: true,
    35435441  flexGrow: true,
     
    36675565};
    36685566
    3669 module.exports = CSSProperty;
    3670 },{}],43:[function(require,module,exports){
    3671 (function (process){
     5567var CSSProperty_1 = CSSProperty;
     5568
     5569var isUnitlessNumber$1 = CSSProperty_1.isUnitlessNumber;
     5570
    36725571/**
    3673  * Copyright 2013-present, Facebook, Inc.
    3674  * All rights reserved.
    3675  *
    3676  * This source code is licensed under the BSD-style license found in the
    3677  * LICENSE file in the root directory of this source tree. An additional grant
    3678  * of patent rights can be found in the PATENTS file in the same directory.
    3679  *
     5572 * Convert a value into the proper css writable value. The style name `name`
     5573 * should be logical (no hyphens), as specified
     5574 * in `CSSProperty.isUnitlessNumber`.
     5575 *
     5576 * @param {string} name CSS property name such as `topMargin`.
     5577 * @param {*} value CSS property value such as `10px`.
     5578 * @return {string} Normalized style value with dimensions applied.
    36805579 */
    3681 
    3682 'use strict';
    3683 
    3684 var CSSProperty = require('./CSSProperty');
    3685 var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
    3686 var ReactInstrumentation = require('./ReactInstrumentation');
    3687 
    3688 var camelizeStyleName = require('fbjs/lib/camelizeStyleName');
    3689 var dangerousStyleValue = require('./dangerousStyleValue');
    3690 var hyphenateStyleName = require('fbjs/lib/hyphenateStyleName');
    3691 var memoizeStringOnly = require('fbjs/lib/memoizeStringOnly');
    3692 var warning = require('fbjs/lib/warning');
    3693 
    3694 var processStyleName = memoizeStringOnly(function (styleName) {
    3695   return hyphenateStyleName(styleName);
    3696 });
     5580function dangerousStyleValue(name, value, isCustomProperty) {
     5581  // Note that we've removed escapeTextForBrowser() calls here since the
     5582  // whole string will be escaped when the attribute is injected into
     5583  // the markup. If you provide unsafe user data here they can inject
     5584  // arbitrary CSS which may be problematic (I couldn't repro this):
     5585  // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
     5586  // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
     5587  // This is not an XSS hole but instead a potential CSS injection issue
     5588  // which has lead to a greater discussion about how we're going to
     5589  // trust URLs moving forward. See #2115901
     5590
     5591  var isEmpty = value == null || typeof value === 'boolean' || value === '';
     5592  if (isEmpty) {
     5593    return '';
     5594  }
     5595
     5596  if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber$1.hasOwnProperty(name) && isUnitlessNumber$1[name])) {
     5597    return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
     5598  }
     5599
     5600  return ('' + value).trim();
     5601}
     5602
     5603var dangerousStyleValue_1 = dangerousStyleValue;
     5604
     5605/**
     5606 * Copyright (c) 2016-present, Facebook, Inc.
     5607 *
     5608 * This source code is licensed under the MIT license found in the
     5609 * LICENSE file in the root directory of this source tree.
     5610 *
     5611 *
     5612 * @providesModule describeComponentFrame
     5613 */
     5614
     5615var describeComponentFrame = function (name, source, ownerName) {
     5616  return '\n    in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
     5617};
     5618
     5619var IndeterminateComponent = ReactTypeOfWork.IndeterminateComponent;
     5620var FunctionalComponent = ReactTypeOfWork.FunctionalComponent;
     5621var ClassComponent$1 = ReactTypeOfWork.ClassComponent;
     5622var HostComponent$2 = ReactTypeOfWork.HostComponent;
     5623
     5624
     5625
     5626
     5627function describeFiber(fiber) {
     5628  switch (fiber.tag) {
     5629    case IndeterminateComponent:
     5630    case FunctionalComponent:
     5631    case ClassComponent$1:
     5632    case HostComponent$2:
     5633      var owner = fiber._debugOwner;
     5634      var source = fiber._debugSource;
     5635      var name = getComponentName_1(fiber);
     5636      var ownerName = null;
     5637      if (owner) {
     5638        ownerName = getComponentName_1(owner);
     5639      }
     5640      return describeComponentFrame(name, source, ownerName);
     5641    default:
     5642      return '';
     5643  }
     5644}
     5645
     5646// This function can only be called with a work-in-progress fiber and
     5647// only during begin or complete phase. Do not call it under any other
     5648// circumstances.
     5649function getStackAddendumByWorkInProgressFiber$1(workInProgress) {
     5650  var info = '';
     5651  var node = workInProgress;
     5652  do {
     5653    info += describeFiber(node);
     5654    // Otherwise this return pointer might point to the wrong tree:
     5655    node = node['return'];
     5656  } while (node);
     5657  return info;
     5658}
     5659
     5660var ReactFiberComponentTreeHook = {
     5661  getStackAddendumByWorkInProgressFiber: getStackAddendumByWorkInProgressFiber$1
     5662};
     5663
     5664var ReactDebugCurrentFrame = ReactGlobalSharedState_1.ReactDebugCurrentFrame;
     5665
     5666{
     5667  var getComponentName$3 = getComponentName_1;
     5668
     5669  var _require2$2 = ReactFiberComponentTreeHook,
     5670      getStackAddendumByWorkInProgressFiber = _require2$2.getStackAddendumByWorkInProgressFiber;
     5671}
     5672
     5673function getCurrentFiberOwnerName$2() {
     5674  {
     5675    var fiber = ReactDebugCurrentFiber.current;
     5676    if (fiber === null) {
     5677      return null;
     5678    }
     5679    if (fiber._debugOwner != null) {
     5680      return getComponentName$3(fiber._debugOwner);
     5681    }
     5682  }
     5683  return null;
     5684}
     5685
     5686function getCurrentFiberStackAddendum$1() {
     5687  {
     5688    var fiber = ReactDebugCurrentFiber.current;
     5689    if (fiber === null) {
     5690      return null;
     5691    }
     5692    // Safe because if current fiber exists, we are reconciling,
     5693    // and it is guaranteed to be the work-in-progress version.
     5694    return getStackAddendumByWorkInProgressFiber(fiber);
     5695  }
     5696  return null;
     5697}
     5698
     5699function resetCurrentFiber() {
     5700  ReactDebugCurrentFrame.getCurrentStack = null;
     5701  ReactDebugCurrentFiber.current = null;
     5702  ReactDebugCurrentFiber.phase = null;
     5703}
     5704
     5705function setCurrentFiber(fiber, phase) {
     5706  ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackAddendum$1;
     5707  ReactDebugCurrentFiber.current = fiber;
     5708  ReactDebugCurrentFiber.phase = phase;
     5709}
     5710
     5711var ReactDebugCurrentFiber = {
     5712  current: null,
     5713  phase: null,
     5714  resetCurrentFiber: resetCurrentFiber,
     5715  setCurrentFiber: setCurrentFiber,
     5716  getCurrentFiberOwnerName: getCurrentFiberOwnerName$2,
     5717  getCurrentFiberStackAddendum: getCurrentFiberStackAddendum$1
     5718};
     5719
     5720var ReactDebugCurrentFiber_1 = ReactDebugCurrentFiber;
     5721
     5722var warnValidStyle$1 = emptyFunction;
     5723
     5724{
     5725  var camelizeStyleName$1 = camelizeStyleName;
     5726  var getComponentName$2 = getComponentName_1;
     5727  var warning$4 = require$$0;
     5728
     5729  var _require$3 = ReactDebugCurrentFiber_1,
     5730      getCurrentFiberOwnerName$1 = _require$3.getCurrentFiberOwnerName;
     5731
     5732  // 'msTransform' is correct, but the other prefixes should be capitalized
     5733
     5734
     5735  var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
     5736
     5737  // style values shouldn't contain a semicolon
     5738  var badStyleValueWithSemicolonPattern = /;\s*$/;
     5739
     5740  var warnedStyleNames = {};
     5741  var warnedStyleValues = {};
     5742  var warnedForNaNValue = false;
     5743  var warnedForInfinityValue = false;
     5744
     5745  var warnHyphenatedStyleName = function (name, owner) {
     5746    if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
     5747      return;
     5748    }
     5749
     5750    warnedStyleNames[name] = true;
     5751    warning$4(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName$1(name), checkRenderMessage(owner));
     5752  };
     5753
     5754  var warnBadVendoredStyleName = function (name, owner) {
     5755    if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
     5756      return;
     5757    }
     5758
     5759    warnedStyleNames[name] = true;
     5760    warning$4(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner));
     5761  };
     5762
     5763  var warnStyleValueWithSemicolon = function (name, value, owner) {
     5764    if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
     5765      return;
     5766    }
     5767
     5768    warnedStyleValues[value] = true;
     5769    warning$4(false, "Style property values shouldn't contain a semicolon.%s " + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, ''));
     5770  };
     5771
     5772  var warnStyleValueIsNaN = function (name, value, owner) {
     5773    if (warnedForNaNValue) {
     5774      return;
     5775    }
     5776
     5777    warnedForNaNValue = true;
     5778    warning$4(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner));
     5779  };
     5780
     5781  var warnStyleValueIsInfinity = function (name, value, owner) {
     5782    if (warnedForInfinityValue) {
     5783      return;
     5784    }
     5785
     5786    warnedForInfinityValue = true;
     5787    warning$4(false, '`Infinity` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner));
     5788  };
     5789
     5790  var checkRenderMessage = function (owner) {
     5791    var ownerName;
     5792    if (owner != null) {
     5793      // Stack passes the owner manually all the way to CSSPropertyOperations.
     5794      ownerName = getComponentName$2(owner);
     5795    } else {
     5796      // Fiber doesn't pass it but uses ReactDebugCurrentFiber to track it.
     5797      // It is only enabled in development and tracks host components too.
     5798      ownerName = getCurrentFiberOwnerName$1();
     5799      // TODO: also report the stack.
     5800    }
     5801    if (ownerName) {
     5802      return '\n\nCheck the render method of `' + ownerName + '`.';
     5803    }
     5804    return '';
     5805  };
     5806
     5807  warnValidStyle$1 = function (name, value, component) {
     5808    var owner;
     5809    if (component) {
     5810      // TODO: this only works with Stack. Seems like we need to add unit tests?
     5811      owner = component._currentElement._owner;
     5812    }
     5813    if (name.indexOf('-') > -1) {
     5814      warnHyphenatedStyleName(name, owner);
     5815    } else if (badVendoredStyleNamePattern.test(name)) {
     5816      warnBadVendoredStyleName(name, owner);
     5817    } else if (badStyleValueWithSemicolonPattern.test(value)) {
     5818      warnStyleValueWithSemicolon(name, value, owner);
     5819    }
     5820
     5821    if (typeof value === 'number') {
     5822      if (isNaN(value)) {
     5823        warnStyleValueIsNaN(name, value, owner);
     5824      } else if (!isFinite(value)) {
     5825        warnStyleValueIsInfinity(name, value, owner);
     5826      }
     5827    }
     5828  };
     5829}
     5830
     5831var warnValidStyle_1 = warnValidStyle$1;
     5832
     5833{
     5834  var hyphenateStyleName$1 = hyphenateStyleName;
     5835  var warnValidStyle = warnValidStyle_1;
     5836}
    36975837
    36985838var hasShorthandPropertyBug = false;
    3699 var styleFloatAccessor = 'cssFloat';
    37005839if (ExecutionEnvironment.canUseDOM) {
    37015840  var tempStyle = document.createElement('div').style;
     
    37065845    hasShorthandPropertyBug = true;
    37075846  }
    3708   // IE8 only supports accessing cssFloat (standard) as styleFloat
    3709   if (document.documentElement.style.cssFloat === undefined) {
    3710     styleFloatAccessor = 'styleFloat';
    3711   }
    3712 }
    3713 
    3714 if (process.env.NODE_ENV !== 'production') {
    3715   // 'msTransform' is correct, but the other prefixes should be capitalized
    3716   var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
    3717 
    3718   // style values shouldn't contain a semicolon
    3719   var badStyleValueWithSemicolonPattern = /;\s*$/;
    3720 
    3721   var warnedStyleNames = {};
    3722   var warnedStyleValues = {};
    3723   var warnedForNaNValue = false;
    3724 
    3725   var warnHyphenatedStyleName = function (name, owner) {
    3726     if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
    3727       return;
    3728     }
    3729 
    3730     warnedStyleNames[name] = true;
    3731     process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;
    3732   };
    3733 
    3734   var warnBadVendoredStyleName = function (name, owner) {
    3735     if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
    3736       return;
    3737     }
    3738 
    3739     warnedStyleNames[name] = true;
    3740     process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0;
    3741   };
    3742 
    3743   var warnStyleValueWithSemicolon = function (name, value, owner) {
    3744     if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
    3745       return;
    3746     }
    3747 
    3748     warnedStyleValues[value] = true;
    3749     process.env.NODE_ENV !== 'production' ? warning(false, "Style property values shouldn't contain a semicolon.%s " + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
    3750   };
    3751 
    3752   var warnStyleValueIsNaN = function (name, value, owner) {
    3753     if (warnedForNaNValue) {
    3754       return;
    3755     }
    3756 
    3757     warnedForNaNValue = true;
    3758     process.env.NODE_ENV !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;
    3759   };
    3760 
    3761   var checkRenderMessage = function (owner) {
    3762     if (owner) {
    3763       var name = owner.getName();
    3764       if (name) {
    3765         return ' Check the render method of `' + name + '`.';
    3766       }
    3767     }
    3768     return '';
    3769   };
    3770 
    3771   /**
    3772    * @param {string} name
    3773    * @param {*} value
    3774    * @param {ReactDOMComponent} component
    3775    */
    3776   var warnValidStyle = function (name, value, component) {
    3777     var owner;
    3778     if (component) {
    3779       owner = component._currentElement._owner;
    3780     }
    3781     if (name.indexOf('-') > -1) {
    3782       warnHyphenatedStyleName(name, owner);
    3783     } else if (badVendoredStyleNamePattern.test(name)) {
    3784       warnBadVendoredStyleName(name, owner);
    3785     } else if (badStyleValueWithSemicolonPattern.test(value)) {
    3786       warnStyleValueWithSemicolon(name, value, owner);
    3787     }
    3788 
    3789     if (typeof value === 'number' && isNaN(value)) {
    3790       warnStyleValueIsNaN(name, value, owner);
    3791     }
    3792   };
    37935847}
    37945848
     
    37985852var CSSPropertyOperations = {
    37995853  /**
    3800    * Serializes a mapping of style properties for use as inline styles:
    3801    *
    3802    *   > createMarkupForStyles({width: '200px', height: 0})
    3803    *   "width:200px;height:0;"
    3804    *
    3805    * Undefined values are ignored so that declarative programming is easier.
    3806    * The result should be HTML-escaped before insertion into the DOM.
    3807    *
    3808    * @param {object} styles
    3809    * @param {ReactDOMComponent} component
    3810    * @return {?string}
     5854   * This creates a string that is expected to be equivalent to the style
     5855   * attribute generated by server-side rendering. It by-passes warnings and
     5856   * security checks so it's not safe to use this value for anything other than
     5857   * comparison. It is only used in DEV for SSR validation.
    38115858   */
    3812   createMarkupForStyles: function (styles, component) {
    3813     var serialized = '';
    3814     for (var styleName in styles) {
    3815       if (!styles.hasOwnProperty(styleName)) {
    3816         continue;
    3817       }
    3818       var isCustomProperty = styleName.indexOf('--') === 0;
    3819       var styleValue = styles[styleName];
    3820       if (process.env.NODE_ENV !== 'production') {
    3821         if (!isCustomProperty) {
    3822           warnValidStyle(styleName, styleValue, component);
     5859  createDangerousStringForStyles: function (styles) {
     5860    {
     5861      var serialized = '';
     5862      var delimiter = '';
     5863      for (var styleName in styles) {
     5864        if (!styles.hasOwnProperty(styleName)) {
     5865          continue;
    38235866        }
    3824       }
    3825       if (styleValue != null) {
    3826         serialized += processStyleName(styleName) + ':';
    3827         serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';';
    3828       }
    3829     }
    3830     return serialized || null;
     5867        var styleValue = styles[styleName];
     5868        if (styleValue != null) {
     5869          var isCustomProperty = styleName.indexOf('--') === 0;
     5870          serialized += delimiter + hyphenateStyleName$1(styleName) + ':';
     5871          serialized += dangerousStyleValue_1(styleName, styleValue, isCustomProperty);
     5872
     5873          delimiter = ';';
     5874        }
     5875      }
     5876      return serialized || null;
     5877    }
    38315878  },
    38325879
     
    38405887   */
    38415888  setValueForStyles: function (node, styles, component) {
    3842     if (process.env.NODE_ENV !== 'production') {
    3843       ReactInstrumentation.debugTool.onHostOperation({
    3844         instanceID: component._debugID,
    3845         type: 'update styles',
    3846         payload: styles
    3847       });
    3848     }
    3849 
    38505889    var style = node.style;
    38515890    for (var styleName in styles) {
     
    38545893      }
    38555894      var isCustomProperty = styleName.indexOf('--') === 0;
    3856       if (process.env.NODE_ENV !== 'production') {
     5895      {
    38575896        if (!isCustomProperty) {
    38585897          warnValidStyle(styleName, styles[styleName], component);
    38595898        }
    38605899      }
    3861       var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty);
    3862       if (styleName === 'float' || styleName === 'cssFloat') {
    3863         styleName = styleFloatAccessor;
     5900      var styleValue = dangerousStyleValue_1(styleName, styles[styleName], isCustomProperty);
     5901      if (styleName === 'float') {
     5902        styleName = 'cssFloat';
    38645903      }
    38655904      if (isCustomProperty) {
     
    38685907        style[styleName] = styleValue;
    38695908      } else {
    3870         var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
     5909        var expansion = hasShorthandPropertyBug && CSSProperty_1.shorthandPropertyExpansions[styleName];
    38715910        if (expansion) {
    38725911          // Shorthand property that IE8 won't like unsetting, so unset each
     
    38835922};
    38845923
    3885 module.exports = CSSPropertyOperations;
    3886 }).call(this,require('_process'))
    3887 },{"./CSSProperty":42,"./ReactInstrumentation":100,"./dangerousStyleValue":139,"_process":1,"fbjs/lib/ExecutionEnvironment":9,"fbjs/lib/camelizeStyleName":11,"fbjs/lib/hyphenateStyleName":22,"fbjs/lib/memoizeStringOnly":26,"fbjs/lib/warning":30}],44:[function(require,module,exports){
    3888 (function (process){
     5924var CSSPropertyOperations_1 = CSSPropertyOperations;
     5925
     5926var ReactInvalidSetStateWarningHook = {};
     5927
     5928{
     5929  var warning$7 = require$$0;
     5930  var processingChildContext = false;
     5931
     5932  var warnInvalidSetState = function () {
     5933    warning$7(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()');
     5934  };
     5935
     5936  ReactInvalidSetStateWarningHook = {
     5937    onBeginProcessingChildContext: function () {
     5938      processingChildContext = true;
     5939    },
     5940    onEndProcessingChildContext: function () {
     5941      processingChildContext = false;
     5942    },
     5943    onSetState: function () {
     5944      warnInvalidSetState();
     5945    }
     5946  };
     5947}
     5948
     5949var ReactInvalidSetStateWarningHook_1 = ReactInvalidSetStateWarningHook;
     5950
    38895951/**
    3890  * Copyright 2013-present, Facebook, Inc.
    3891  * All rights reserved.
    3892  *
    3893  * This source code is licensed under the BSD-style license found in the
    3894  * LICENSE file in the root directory of this source tree. An additional grant
    3895  * of patent rights can be found in the PATENTS file in the same directory.
    3896  *
     5952 * Copyright (c) 2016-present, Facebook, Inc.
     5953 *
     5954 * This source code is licensed under the MIT license found in the
     5955 * LICENSE file in the root directory of this source tree.
     5956 *
     5957 * @providesModule ReactHostOperationHistoryHook
    38975958 *
    38985959 */
    38995960
    3900 'use strict';
    3901 
    3902 var _prodInvariant = require('./reactProdInvariant');
    3903 
    3904 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
    3905 
    3906 var PooledClass = require('./PooledClass');
    3907 
    3908 var invariant = require('fbjs/lib/invariant');
    3909 
    3910 /**
    3911  * A specialized pseudo-event module to help keep track of components waiting to
    3912  * be notified when their DOM representations are available for use.
    3913  *
    3914  * This implements `PooledClass`, so you should never need to instantiate this.
    3915  * Instead, use `CallbackQueue.getPooled()`.
    3916  *
    3917  * @class ReactMountReady
    3918  * @implements PooledClass
    3919  * @internal
    3920  */
    3921 
    3922 var CallbackQueue = function () {
    3923   function CallbackQueue(arg) {
    3924     _classCallCheck(this, CallbackQueue);
    3925 
    3926     this._callbacks = null;
    3927     this._contexts = null;
    3928     this._arg = arg;
    3929   }
    3930 
    3931   /**
    3932    * Enqueues a callback to be invoked when `notifyAll` is invoked.
    3933    *
    3934    * @param {function} callback Invoked when `notifyAll` is invoked.
    3935    * @param {?object} context Context to call `callback` with.
    3936    * @internal
    3937    */
    3938 
    3939 
    3940   CallbackQueue.prototype.enqueue = function enqueue(callback, context) {
    3941     this._callbacks = this._callbacks || [];
    3942     this._callbacks.push(callback);
    3943     this._contexts = this._contexts || [];
    3944     this._contexts.push(context);
     5961// Trust the developer to only use this with a true check
     5962var ReactHostOperationHistoryHook = null;
     5963
     5964{
     5965  var history = [];
     5966
     5967  ReactHostOperationHistoryHook = {
     5968    onHostOperation: function (operation) {
     5969      history.push(operation);
     5970    },
     5971    clearHistory: function () {
     5972      if (ReactHostOperationHistoryHook._preventClearing) {
     5973        // Should only be used for tests.
     5974        return;
     5975      }
     5976
     5977      history = [];
     5978    },
     5979    getHistory: function () {
     5980      return history;
     5981    }
    39455982  };
    3946 
    3947   /**
    3948    * Invokes all enqueued callbacks and clears the queue. This is invoked after
    3949    * the DOM representation of a component has been created or updated.
    3950    *
    3951    * @internal
    3952    */
    3953 
    3954 
    3955   CallbackQueue.prototype.notifyAll = function notifyAll() {
    3956     var callbacks = this._callbacks;
    3957     var contexts = this._contexts;
    3958     var arg = this._arg;
    3959     if (callbacks && contexts) {
    3960       !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;
    3961       this._callbacks = null;
    3962       this._contexts = null;
    3963       for (var i = 0; i < callbacks.length; i++) {
    3964         callbacks[i].call(contexts[i], arg);
    3965       }
    3966       callbacks.length = 0;
    3967       contexts.length = 0;
     5983}
     5984
     5985var ReactHostOperationHistoryHook_1 = ReactHostOperationHistoryHook;
     5986
     5987var ReactComponentTreeHook = ReactGlobalSharedState_1.ReactComponentTreeHook;
     5988
     5989
     5990
     5991{
     5992  var warning$6 = require$$0;
     5993}
     5994
     5995// Trust the developer to only use this with a true check
     5996var ReactDebugTool$1 = null;
     5997
     5998{
     5999  var hooks = [];
     6000  var didHookThrowForEvent = {};
     6001
     6002  var callHook = function (event, fn, context, arg1, arg2, arg3, arg4, arg5) {
     6003    try {
     6004      fn.call(context, arg1, arg2, arg3, arg4, arg5);
     6005    } catch (e) {
     6006      warning$6(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack);
     6007      didHookThrowForEvent[event] = true;
    39686008    }
    39696009  };
    39706010
    3971   CallbackQueue.prototype.checkpoint = function checkpoint() {
    3972     return this._callbacks ? this._callbacks.length : 0;
     6011  var emitEvent = function (event, arg1, arg2, arg3, arg4, arg5) {
     6012    for (var i = 0; i < hooks.length; i++) {
     6013      var hook = hooks[i];
     6014      var fn = hook[event];
     6015      if (fn) {
     6016        callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
     6017      }
     6018    }
    39736019  };
    39746020
    3975   CallbackQueue.prototype.rollback = function rollback(len) {
    3976     if (this._callbacks && this._contexts) {
    3977       this._callbacks.length = len;
    3978       this._contexts.length = len;
    3979     }
     6021  var isProfiling = false;
     6022  var flushHistory = [];
     6023  var lifeCycleTimerStack = [];
     6024  var currentFlushNesting = 0;
     6025  var currentFlushMeasurements = [];
     6026  var currentFlushStartTime = 0;
     6027  var currentTimerDebugID = null;
     6028  var currentTimerStartTime = 0;
     6029  var currentTimerNestedFlushDuration = 0;
     6030  var currentTimerType = null;
     6031
     6032  var lifeCycleTimerHasWarned = false;
     6033
     6034  var clearHistory = function () {
     6035    ReactComponentTreeHook.purgeUnmountedComponents();
     6036    ReactHostOperationHistoryHook_1.clearHistory();
    39806037  };
    39816038
    3982   /**
    3983    * Resets the internal queue.
    3984    *
    3985    * @internal
    3986    */
    3987 
    3988 
    3989   CallbackQueue.prototype.reset = function reset() {
    3990     this._callbacks = null;
    3991     this._contexts = null;
     6039  var getTreeSnapshot = function (registeredIDs) {
     6040    return registeredIDs.reduce(function (tree, id) {
     6041      var ownerID = ReactComponentTreeHook.getOwnerID(id);
     6042      var parentID = ReactComponentTreeHook.getParentID(id);
     6043      tree[id] = {
     6044        displayName: ReactComponentTreeHook.getDisplayName(id),
     6045        text: ReactComponentTreeHook.getText(id),
     6046        updateCount: ReactComponentTreeHook.getUpdateCount(id),
     6047        childIDs: ReactComponentTreeHook.getChildIDs(id),
     6048        // Text nodes don't have owners but this is close enough.
     6049        ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0,
     6050        parentID: parentID
     6051      };
     6052      return tree;
     6053    }, {});
    39926054  };
    39936055
    3994   /**
    3995    * `PooledClass` looks for this.
    3996    */
    3997 
    3998 
    3999   CallbackQueue.prototype.destructor = function destructor() {
    4000     this.reset();
     6056  var resetMeasurements = function () {
     6057    var previousStartTime = currentFlushStartTime;
     6058    var previousMeasurements = currentFlushMeasurements;
     6059    var previousOperations = ReactHostOperationHistoryHook_1.getHistory();
     6060
     6061    if (currentFlushNesting === 0) {
     6062      currentFlushStartTime = 0;
     6063      currentFlushMeasurements = [];
     6064      clearHistory();
     6065      return;
     6066    }
     6067
     6068    if (previousMeasurements.length || previousOperations.length) {
     6069      var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
     6070      flushHistory.push({
     6071        duration: performanceNow() - previousStartTime,
     6072        measurements: previousMeasurements || [],
     6073        operations: previousOperations || [],
     6074        treeSnapshot: getTreeSnapshot(registeredIDs)
     6075      });
     6076    }
     6077
     6078    clearHistory();
     6079    currentFlushStartTime = performanceNow();
     6080    currentFlushMeasurements = [];
    40016081  };
    40026082
    4003   return CallbackQueue;
    4004 }();
    4005 
    4006 module.exports = PooledClass.addPoolingTo(CallbackQueue);
    4007 }).call(this,require('_process'))
    4008 },{"./PooledClass":62,"./reactProdInvariant":158,"_process":1,"fbjs/lib/invariant":23}],45:[function(require,module,exports){
    4009 /**
    4010  * Copyright 2013-present, Facebook, Inc.
    4011  * All rights reserved.
    4012  *
    4013  * This source code is licensed under the BSD-style license found in the
    4014  * LICENSE file in the root directory of this source tree. An additional grant
    4015  * of patent rights can be found in the PATENTS file in the same directory.
    4016  *
    4017  */
    4018 
    4019 'use strict';
    4020 
    4021 var EventPluginHub = require('./EventPluginHub');
    4022 var EventPropagators = require('./EventPropagators');
    4023 var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
    4024 var ReactDOMComponentTree = require('./ReactDOMComponentTree');
    4025 var ReactUpdates = require('./ReactUpdates');
    4026 var SyntheticEvent = require('./SyntheticEvent');
    4027 
    4028 var inputValueTracking = require('./inputValueTracking');
    4029 var getEventTarget = require('./getEventTarget');
    4030 var isEventSupported = require('./isEventSupported');
    4031 var isTextInputElement = require('./isTextInputElement');
    4032 
    4033 var eventTypes = {
    4034   change: {
    4035     phasedRegistrationNames: {
    4036       bubbled: 'onChange',
    4037       captured: 'onChangeCapture'
     6083  var checkDebugID = function (debugID) {
     6084    var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
     6085
     6086    if (allowRoot && debugID === 0) {
     6087      return;
     6088    }
     6089    if (!debugID) {
     6090      warning$6(false, 'ReactDebugTool: debugID may not be empty.');
     6091    }
     6092  };
     6093
     6094  var beginLifeCycleTimer = function (debugID, timerType) {
     6095    if (currentFlushNesting === 0) {
     6096      return;
     6097    }
     6098    if (currentTimerType && !lifeCycleTimerHasWarned) {
     6099      warning$6(false, 'There is an internal error in the React performance measurement code.' + '\n\nDid not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another');
     6100      lifeCycleTimerHasWarned = true;
     6101    }
     6102    currentTimerStartTime = performanceNow();
     6103    currentTimerNestedFlushDuration = 0;
     6104    currentTimerDebugID = debugID;
     6105    currentTimerType = timerType;
     6106  };
     6107
     6108  var endLifeCycleTimer = function (debugID, timerType) {
     6109    if (currentFlushNesting === 0) {
     6110      return;
     6111    }
     6112    if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) {
     6113      warning$6(false, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another');
     6114      lifeCycleTimerHasWarned = true;
     6115    }
     6116    if (isProfiling) {
     6117      currentFlushMeasurements.push({
     6118        timerType: timerType,
     6119        instanceID: debugID,
     6120        duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration
     6121      });
     6122    }
     6123    currentTimerStartTime = 0;
     6124    currentTimerNestedFlushDuration = 0;
     6125    currentTimerDebugID = null;
     6126    currentTimerType = null;
     6127  };
     6128
     6129  var pauseCurrentLifeCycleTimer = function () {
     6130    var currentTimer = {
     6131      startTime: currentTimerStartTime,
     6132      nestedFlushStartTime: performanceNow(),
     6133      debugID: currentTimerDebugID,
     6134      timerType: currentTimerType
     6135    };
     6136    lifeCycleTimerStack.push(currentTimer);
     6137    currentTimerStartTime = 0;
     6138    currentTimerNestedFlushDuration = 0;
     6139    currentTimerDebugID = null;
     6140    currentTimerType = null;
     6141  };
     6142
     6143  var resumeCurrentLifeCycleTimer = function () {
     6144    var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(),
     6145        startTime = _lifeCycleTimerStack$.startTime,
     6146        nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime,
     6147        debugID = _lifeCycleTimerStack$.debugID,
     6148        timerType = _lifeCycleTimerStack$.timerType;
     6149
     6150    var nestedFlushDuration = performanceNow() - nestedFlushStartTime;
     6151    currentTimerStartTime = startTime;
     6152    currentTimerNestedFlushDuration += nestedFlushDuration;
     6153    currentTimerDebugID = debugID;
     6154    currentTimerType = timerType;
     6155  };
     6156
     6157  var lastMarkTimeStamp = 0;
     6158  var canUsePerformanceMeasure = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';
     6159
     6160  var shouldMark = function (debugID) {
     6161    if (!isProfiling || !canUsePerformanceMeasure) {
     6162      return false;
     6163    }
     6164    var element = ReactComponentTreeHook.getElement(debugID);
     6165    if (element == null || typeof element !== 'object') {
     6166      return false;
     6167    }
     6168    var isHostElement = typeof element.type === 'string';
     6169    if (isHostElement) {
     6170      return false;
     6171    }
     6172    return true;
     6173  };
     6174
     6175  var markBegin = function (debugID, markType) {
     6176    if (!shouldMark(debugID)) {
     6177      return;
     6178    }
     6179
     6180    var markName = debugID + '::' + markType;
     6181    lastMarkTimeStamp = performanceNow();
     6182    performance.mark(markName);
     6183  };
     6184
     6185  var markEnd = function (debugID, markType) {
     6186    if (!shouldMark(debugID)) {
     6187      return;
     6188    }
     6189
     6190    var markName = debugID + '::' + markType;
     6191    var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown';
     6192
     6193    // Chrome has an issue of dropping markers recorded too fast:
     6194    // https://bugs.chromium.org/p/chromium/issues/detail?id=640652
     6195    // To work around this, we will not report very small measurements.
     6196    // I determined the magic number by tweaking it back and forth.
     6197    // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe.
     6198    // When the bug is fixed, we can `measure()` unconditionally if we want to.
     6199    var timeStamp = performanceNow();
     6200    if (timeStamp - lastMarkTimeStamp > 0.1) {
     6201      var measurementName = displayName + ' [' + markType + ']';
     6202      performance.measure(measurementName, markName);
     6203    }
     6204
     6205    performance.clearMarks(markName);
     6206    if (measurementName) {
     6207      performance.clearMeasures(measurementName);
     6208    }
     6209  };
     6210
     6211  ReactDebugTool$1 = {
     6212    addHook: function (hook) {
     6213      hooks.push(hook);
    40386214    },
    4039     dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']
    4040   }
    4041 };
    4042 
    4043 function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
    4044   var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, target);
    4045   event.type = 'change';
    4046   EventPropagators.accumulateTwoPhaseDispatches(event);
    4047   return event;
    4048 }
    4049 /**
    4050  * For IE shims
    4051  */
    4052 var activeElement = null;
    4053 var activeElementInst = null;
    4054 
    4055 /**
    4056  * SECTION: handle `change` event
    4057  */
    4058 function shouldUseChangeEvent(elem) {
    4059   var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
    4060   return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
    4061 }
    4062 
    4063 var doesChangeEventBubble = false;
    4064 if (ExecutionEnvironment.canUseDOM) {
    4065   // See `handleChange` comment below
    4066   doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
    4067 }
    4068 
    4069 function manualDispatchChangeEvent(nativeEvent) {
    4070   var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));
    4071 
    4072   // If change and propertychange bubbled, we'd just bind to it like all the
    4073   // other events and have it go through ReactBrowserEventEmitter. Since it
    4074   // doesn't, we manually listen for the events and so we have to enqueue and
    4075   // process the abstract event manually.
    4076   //
    4077   // Batching is necessary here in order to ensure that all event handlers run
    4078   // before the next rerender (including event handlers attached to ancestor
    4079   // elements instead of directly on the input). Without this, controlled
    4080   // components don't work properly in conjunction with event bubbling because
    4081   // the component is rerendered and the value reverted before all the event
    4082   // handlers can run. See https://github.com/facebook/react/issues/708.
    4083   ReactUpdates.batchedUpdates(runEventInBatch, event);
    4084 }
    4085 
    4086 function runEventInBatch(event) {
    4087   EventPluginHub.enqueueEvents(event);
    4088   EventPluginHub.processEventQueue(false);
    4089 }
    4090 
    4091 function startWatchingForChangeEventIE8(target, targetInst) {
    4092   activeElement = target;
    4093   activeElementInst = targetInst;
    4094   activeElement.attachEvent('onchange', manualDispatchChangeEvent);
    4095 }
    4096 
    4097 function stopWatchingForChangeEventIE8() {
    4098   if (!activeElement) {
    4099     return;
    4100   }
    4101   activeElement.detachEvent('onchange', manualDispatchChangeEvent);
    4102   activeElement = null;
    4103   activeElementInst = null;
    4104 }
    4105 
    4106 function getInstIfValueChanged(targetInst, nativeEvent) {
    4107   var updated = inputValueTracking.updateValueIfChanged(targetInst);
    4108   var simulated = nativeEvent.simulated === true && ChangeEventPlugin._allowSimulatedPassThrough;
    4109 
    4110   if (updated || simulated) {
    4111     return targetInst;
    4112   }
    4113 }
    4114 
    4115 function getTargetInstForChangeEvent(topLevelType, targetInst) {
    4116   if (topLevelType === 'topChange') {
    4117     return targetInst;
    4118   }
    4119 }
    4120 
    4121 function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
    4122   if (topLevelType === 'topFocus') {
    4123     // stopWatching() should be a noop here but we call it just in case we
    4124     // missed a blur event somehow.
    4125     stopWatchingForChangeEventIE8();
    4126     startWatchingForChangeEventIE8(target, targetInst);
    4127   } else if (topLevelType === 'topBlur') {
    4128     stopWatchingForChangeEventIE8();
    4129   }
    4130 }
    4131 
    4132 /**
    4133  * SECTION: handle `input` event
    4134  */
    4135 var isInputEventSupported = false;
    4136 if (ExecutionEnvironment.canUseDOM) {
    4137   // IE9 claims to support the input event but fails to trigger it when
    4138   // deleting text, so we ignore its input events.
    4139 
    4140   isInputEventSupported = isEventSupported('input') && (!('documentMode' in document) || document.documentMode > 9);
    4141 }
    4142 
    4143 /**
    4144  * (For IE <=9) Starts tracking propertychange events on the passed-in element
    4145  * and override the value property so that we can distinguish user events from
    4146  * value changes in JS.
    4147  */
    4148 function startWatchingForValueChange(target, targetInst) {
    4149   activeElement = target;
    4150   activeElementInst = targetInst;
    4151   activeElement.attachEvent('onpropertychange', handlePropertyChange);
    4152 }
    4153 
    4154 /**
    4155  * (For IE <=9) Removes the event listeners from the currently-tracked element,
    4156  * if any exists.
    4157  */
    4158 function stopWatchingForValueChange() {
    4159   if (!activeElement) {
    4160     return;
    4161   }
    4162   activeElement.detachEvent('onpropertychange', handlePropertyChange);
    4163 
    4164   activeElement = null;
    4165   activeElementInst = null;
    4166 }
    4167 
    4168 /**
    4169  * (For IE <=9) Handles a propertychange event, sending a `change` event if
    4170  * the value of the active element has changed.
    4171  */
    4172 function handlePropertyChange(nativeEvent) {
    4173   if (nativeEvent.propertyName !== 'value') {
    4174     return;
    4175   }
    4176   if (getInstIfValueChanged(activeElementInst, nativeEvent)) {
    4177     manualDispatchChangeEvent(nativeEvent);
    4178   }
    4179 }
    4180 
    4181 function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
    4182   if (topLevelType === 'topFocus') {
    4183     // In IE8, we can capture almost all .value changes by adding a
    4184     // propertychange handler and looking for events with propertyName
    4185     // equal to 'value'
    4186     // In IE9, propertychange fires for most input events but is buggy and
    4187     // doesn't fire when text is deleted, but conveniently, selectionchange
    4188     // appears to fire in all of the remaining cases so we catch those and
    4189     // forward the event if the value has changed
    4190     // In either case, we don't want to call the event handler if the value
    4191     // is changed from JS so we redefine a setter for `.value` that updates
    4192     // our activeElementValue variable, allowing us to ignore those changes
    4193     //
    4194     // stopWatching() should be a noop here but we call it just in case we
    4195     // missed a blur event somehow.
    4196     stopWatchingForValueChange();
    4197     startWatchingForValueChange(target, targetInst);
    4198   } else if (topLevelType === 'topBlur') {
    4199     stopWatchingForValueChange();
    4200   }
    4201 }
    4202 
    4203 // For IE8 and IE9.
    4204 function getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEvent) {
    4205   if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {
    4206     // On the selectionchange event, the target is just document which isn't
    4207     // helpful for us so just check activeElement instead.
    4208     //
    4209     // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
    4210     // propertychange on the first input event after setting `value` from a
    4211     // script and fires only keydown, keypress, keyup. Catching keyup usually
    4212     // gets it and catching keydown lets us fire an event for the first
    4213     // keystroke if user does a key repeat (it'll be a little delayed: right
    4214     // before the second keystroke). Other input methods (e.g., paste) seem to
    4215     // fire selectionchange normally.
    4216     return getInstIfValueChanged(activeElementInst, nativeEvent);
    4217   }
    4218 }
    4219 
    4220 /**
    4221  * SECTION: handle `click` event
    4222  */
    4223 function shouldUseClickEvent(elem) {
    4224   // Use the `click` event to detect changes to checkbox and radio inputs.
    4225   // This approach works across all browsers, whereas `change` does not fire
    4226   // until `blur` in IE8.
    4227   var nodeName = elem.nodeName;
    4228   return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
    4229 }
    4230 
    4231 function getTargetInstForClickEvent(topLevelType, targetInst, nativeEvent) {
    4232   if (topLevelType === 'topClick') {
    4233     return getInstIfValueChanged(targetInst, nativeEvent);
    4234   }
    4235 }
    4236 
    4237 function getTargetInstForInputOrChangeEvent(topLevelType, targetInst, nativeEvent) {
    4238   if (topLevelType === 'topInput' || topLevelType === 'topChange') {
    4239     return getInstIfValueChanged(targetInst, nativeEvent);
    4240   }
    4241 }
    4242 
    4243 function handleControlledInputBlur(inst, node) {
    4244   // TODO: In IE, inst is occasionally null. Why?
    4245   if (inst == null) {
    4246     return;
    4247   }
    4248 
    4249   // Fiber and ReactDOM keep wrapper state in separate places
    4250   var state = inst._wrapperState || node._wrapperState;
    4251 
    4252   if (!state || !state.controlled || node.type !== 'number') {
    4253     return;
    4254   }
    4255 
    4256   // If controlled, assign the value attribute to the current value on blur
    4257   var value = '' + node.value;
    4258   if (node.getAttribute('value') !== value) {
    4259     node.setAttribute('value', value);
    4260   }
    4261 }
    4262 
    4263 /**
    4264  * This plugin creates an `onChange` event that normalizes change events
    4265  * across form elements. This event fires at a time when it's possible to
    4266  * change the element's value without seeing a flicker.
    4267  *
    4268  * Supported elements are:
    4269  * - input (see `isTextInputElement`)
    4270  * - textarea
    4271  * - select
    4272  */
    4273 var ChangeEventPlugin = {
    4274   eventTypes: eventTypes,
    4275 
    4276   _allowSimulatedPassThrough: true,
    4277   _isInputEventSupported: isInputEventSupported,
    4278 
    4279   extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
    4280     var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
    4281 
    4282     var getTargetInstFunc, handleEventFunc;
    4283     if (shouldUseChangeEvent(targetNode)) {
    4284       if (doesChangeEventBubble) {
    4285         getTargetInstFunc = getTargetInstForChangeEvent;
    4286       } else {
    4287         handleEventFunc = handleEventsForChangeEventIE8;
    4288       }
    4289     } else if (isTextInputElement(targetNode)) {
    4290       if (isInputEventSupported) {
    4291         getTargetInstFunc = getTargetInstForInputOrChangeEvent;
    4292       } else {
    4293         getTargetInstFunc = getTargetInstForInputEventPolyfill;
    4294         handleEventFunc = handleEventsForInputEventPolyfill;
    4295       }
    4296     } else if (shouldUseClickEvent(targetNode)) {
    4297       getTargetInstFunc = getTargetInstForClickEvent;
    4298     }
    4299 
    4300     if (getTargetInstFunc) {
    4301       var inst = getTargetInstFunc(topLevelType, targetInst, nativeEvent);
    4302       if (inst) {
    4303         var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
    4304         return event;
    4305       }
    4306     }
    4307 
    4308     if (handleEventFunc) {
    4309       handleEventFunc(topLevelType, targetNode, targetInst);
    4310     }
    4311 
    4312     // When blurring, set the value attribute for number inputs
    4313     if (topLevelType === 'topBlur') {
    4314       handleControlledInputBlur(targetInst, targetNode);
    4315     }
    4316   }
    4317 };
    4318 
    4319 module.exports = ChangeEventPlugin;
    4320 },{"./EventPluginHub":54,"./EventPropagators":57,"./ReactDOMComponentTree":71,"./ReactUpdates":115,"./SyntheticEvent":124,"./getEventTarget":147,"./inputValueTracking":153,"./isEventSupported":155,"./isTextInputElement":156,"fbjs/lib/ExecutionEnvironment":9}],46:[function(require,module,exports){
    4321 (function (process){
    4322 /**
    4323  * Copyright 2013-present, Facebook, Inc.
    4324  * All rights reserved.
    4325  *
    4326  * This source code is licensed under the BSD-style license found in the
    4327  * LICENSE file in the root directory of this source tree. An additional grant
    4328  * of patent rights can be found in the PATENTS file in the same directory.
    4329  *
    4330  */
    4331 
    4332 'use strict';
    4333 
    4334 var DOMLazyTree = require('./DOMLazyTree');
    4335 var Danger = require('./Danger');
    4336 var ReactDOMComponentTree = require('./ReactDOMComponentTree');
    4337 var ReactInstrumentation = require('./ReactInstrumentation');
    4338 
    4339 var createMicrosoftUnsafeLocalFunction = require('./createMicrosoftUnsafeLocalFunction');
    4340 var setInnerHTML = require('./setInnerHTML');
    4341 var setTextContent = require('./setTextContent');
    4342 
    4343 function getNodeAfter(parentNode, node) {
    4344   // Special case for text components, which return [open, close] comments
    4345   // from getHostNode.
    4346   if (Array.isArray(node)) {
    4347     node = node[1];
    4348   }
    4349   return node ? node.nextSibling : parentNode.firstChild;
    4350 }
    4351 
    4352 /**
    4353  * Inserts `childNode` as a child of `parentNode` at the `index`.
    4354  *
    4355  * @param {DOMElement} parentNode Parent node in which to insert.
    4356  * @param {DOMElement} childNode Child node to insert.
    4357  * @param {number} index Index at which to insert the child.
    4358  * @internal
    4359  */
    4360 var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {
    4361   // We rely exclusively on `insertBefore(node, null)` instead of also using
    4362   // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so
    4363   // we are careful to use `null`.)
    4364   parentNode.insertBefore(childNode, referenceNode);
    4365 });
    4366 
    4367 function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
    4368   DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);
    4369 }
    4370 
    4371 function moveChild(parentNode, childNode, referenceNode) {
    4372   if (Array.isArray(childNode)) {
    4373     moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);
    4374   } else {
    4375     insertChildAt(parentNode, childNode, referenceNode);
    4376   }
    4377 }
    4378 
    4379 function removeChild(parentNode, childNode) {
    4380   if (Array.isArray(childNode)) {
    4381     var closingComment = childNode[1];
    4382     childNode = childNode[0];
    4383     removeDelimitedText(parentNode, childNode, closingComment);
    4384     parentNode.removeChild(closingComment);
    4385   }
    4386   parentNode.removeChild(childNode);
    4387 }
    4388 
    4389 function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {
    4390   var node = openingComment;
    4391   while (true) {
    4392     var nextNode = node.nextSibling;
    4393     insertChildAt(parentNode, node, referenceNode);
    4394     if (node === closingComment) {
    4395       break;
    4396     }
    4397     node = nextNode;
    4398   }
    4399 }
    4400 
    4401 function removeDelimitedText(parentNode, startNode, closingComment) {
    4402   while (true) {
    4403     var node = startNode.nextSibling;
    4404     if (node === closingComment) {
    4405       // The closing comment is removed by ReactMultiChild.
    4406       break;
    4407     } else {
    4408       parentNode.removeChild(node);
    4409     }
    4410   }
    4411 }
    4412 
    4413 function replaceDelimitedText(openingComment, closingComment, stringText) {
    4414   var parentNode = openingComment.parentNode;
    4415   var nodeAfterComment = openingComment.nextSibling;
    4416   if (nodeAfterComment === closingComment) {
    4417     // There are no text nodes between the opening and closing comments; insert
    4418     // a new one if stringText isn't empty.
    4419     if (stringText) {
    4420       insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);
    4421     }
    4422   } else {
    4423     if (stringText) {
    4424       // Set the text content of the first node after the opening comment, and
    4425       // remove all following nodes up until the closing comment.
    4426       setTextContent(nodeAfterComment, stringText);
    4427       removeDelimitedText(parentNode, nodeAfterComment, closingComment);
    4428     } else {
    4429       removeDelimitedText(parentNode, openingComment, closingComment);
    4430     }
    4431   }
    4432 
    4433   if (process.env.NODE_ENV !== 'production') {
    4434     ReactInstrumentation.debugTool.onHostOperation({
    4435       instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID,
    4436       type: 'replace text',
    4437       payload: stringText
    4438     });
    4439   }
    4440 }
    4441 
    4442 var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup;
    4443 if (process.env.NODE_ENV !== 'production') {
    4444   dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) {
    4445     Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);
    4446     if (prevInstance._debugID !== 0) {
    4447       ReactInstrumentation.debugTool.onHostOperation({
    4448         instanceID: prevInstance._debugID,
    4449         type: 'replace with',
    4450         payload: markup.toString()
    4451       });
    4452     } else {
    4453       var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);
    4454       if (nextInstance._debugID !== 0) {
    4455         ReactInstrumentation.debugTool.onHostOperation({
    4456           instanceID: nextInstance._debugID,
    4457           type: 'mount',
    4458           payload: markup.toString()
    4459         });
    4460       }
     6215    removeHook: function (hook) {
     6216      for (var i = 0; i < hooks.length; i++) {
     6217        if (hooks[i] === hook) {
     6218          hooks.splice(i, 1);
     6219          i--;
     6220        }
     6221      }
     6222    },
     6223    isProfiling: function () {
     6224      return isProfiling;
     6225    },
     6226    beginProfiling: function () {
     6227      if (isProfiling) {
     6228        return;
     6229      }
     6230
     6231      isProfiling = true;
     6232      flushHistory.length = 0;
     6233      resetMeasurements();
     6234      ReactDebugTool$1.addHook(ReactHostOperationHistoryHook_1);
     6235    },
     6236    endProfiling: function () {
     6237      if (!isProfiling) {
     6238        return;
     6239      }
     6240
     6241      isProfiling = false;
     6242      resetMeasurements();
     6243      ReactDebugTool$1.removeHook(ReactHostOperationHistoryHook_1);
     6244    },
     6245    getFlushHistory: function () {
     6246      return flushHistory;
     6247    },
     6248    onBeginFlush: function () {
     6249      currentFlushNesting++;
     6250      resetMeasurements();
     6251      pauseCurrentLifeCycleTimer();
     6252      emitEvent('onBeginFlush');
     6253    },
     6254    onEndFlush: function () {
     6255      resetMeasurements();
     6256      currentFlushNesting--;
     6257      resumeCurrentLifeCycleTimer();
     6258      emitEvent('onEndFlush');
     6259    },
     6260    onBeginLifeCycleTimer: function (debugID, timerType) {
     6261      checkDebugID(debugID);
     6262      emitEvent('onBeginLifeCycleTimer', debugID, timerType);
     6263      markBegin(debugID, timerType);
     6264      beginLifeCycleTimer(debugID, timerType);
     6265    },
     6266    onEndLifeCycleTimer: function (debugID, timerType) {
     6267      checkDebugID(debugID);
     6268      endLifeCycleTimer(debugID, timerType);
     6269      markEnd(debugID, timerType);
     6270      emitEvent('onEndLifeCycleTimer', debugID, timerType);
     6271    },
     6272    onBeginProcessingChildContext: function () {
     6273      emitEvent('onBeginProcessingChildContext');
     6274    },
     6275    onEndProcessingChildContext: function () {
     6276      emitEvent('onEndProcessingChildContext');
     6277    },
     6278    onHostOperation: function (operation) {
     6279      checkDebugID(operation.instanceID);
     6280      emitEvent('onHostOperation', operation);
     6281    },
     6282    onSetState: function () {
     6283      emitEvent('onSetState');
     6284    },
     6285    onSetChildren: function (debugID, childDebugIDs) {
     6286      checkDebugID(debugID);
     6287      childDebugIDs.forEach(checkDebugID);
     6288      emitEvent('onSetChildren', debugID, childDebugIDs);
     6289    },
     6290    onBeforeMountComponent: function (debugID, element, parentDebugID) {
     6291      checkDebugID(debugID);
     6292      checkDebugID(parentDebugID, true);
     6293      emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
     6294      markBegin(debugID, 'mount');
     6295    },
     6296    onMountComponent: function (debugID) {
     6297      checkDebugID(debugID);
     6298      markEnd(debugID, 'mount');
     6299      emitEvent('onMountComponent', debugID);
     6300    },
     6301    onBeforeUpdateComponent: function (debugID, element) {
     6302      checkDebugID(debugID);
     6303      emitEvent('onBeforeUpdateComponent', debugID, element);
     6304      markBegin(debugID, 'update');
     6305    },
     6306    onUpdateComponent: function (debugID) {
     6307      checkDebugID(debugID);
     6308      markEnd(debugID, 'update');
     6309      emitEvent('onUpdateComponent', debugID);
     6310    },
     6311    onBeforeUnmountComponent: function (debugID) {
     6312      checkDebugID(debugID);
     6313      emitEvent('onBeforeUnmountComponent', debugID);
     6314      markBegin(debugID, 'unmount');
     6315    },
     6316    onUnmountComponent: function (debugID) {
     6317      checkDebugID(debugID);
     6318      markEnd(debugID, 'unmount');
     6319      emitEvent('onUnmountComponent', debugID);
     6320    },
     6321    onTestEvent: function () {
     6322      emitEvent('onTestEvent');
    44616323    }
    44626324  };
    4463 }
    4464 
    4465 /**
    4466  * Operations for updating with DOM children.
    4467  */
    4468 var DOMChildrenOperations = {
    4469   dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
    4470 
    4471   replaceDelimitedText: replaceDelimitedText,
    4472 
    4473   /**
    4474    * Updates a component's children by processing a series of updates. The
    4475    * update configurations are each expected to have a `parentNode` property.
    4476    *
    4477    * @param {array<object>} updates List of update configurations.
    4478    * @internal
    4479    */
    4480   processUpdates: function (parentNode, updates) {
    4481     if (process.env.NODE_ENV !== 'production') {
    4482       var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID;
    4483     }
    4484 
    4485     for (var k = 0; k < updates.length; k++) {
    4486       var update = updates[k];
    4487       switch (update.type) {
    4488         case 'INSERT_MARKUP':
    4489           insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));
    4490           if (process.env.NODE_ENV !== 'production') {
    4491             ReactInstrumentation.debugTool.onHostOperation({
    4492               instanceID: parentNodeDebugID,
    4493               type: 'insert child',
    4494               payload: {
    4495                 toIndex: update.toIndex,
    4496                 content: update.content.toString()
    4497               }
    4498             });
    4499           }
    4500           break;
    4501         case 'MOVE_EXISTING':
    4502           moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));
    4503           if (process.env.NODE_ENV !== 'production') {
    4504             ReactInstrumentation.debugTool.onHostOperation({
    4505               instanceID: parentNodeDebugID,
    4506               type: 'move child',
    4507               payload: { fromIndex: update.fromIndex, toIndex: update.toIndex }
    4508             });
    4509           }
    4510           break;
    4511         case 'SET_MARKUP':
    4512           setInnerHTML(parentNode, update.content);
    4513           if (process.env.NODE_ENV !== 'production') {
    4514             ReactInstrumentation.debugTool.onHostOperation({
    4515               instanceID: parentNodeDebugID,
    4516               type: 'replace children',
    4517               payload: update.content.toString()
    4518             });
    4519           }
    4520           break;
    4521         case 'TEXT_CONTENT':
    4522           setTextContent(parentNode, update.content);
    4523           if (process.env.NODE_ENV !== 'production') {
    4524             ReactInstrumentation.debugTool.onHostOperation({
    4525               instanceID: parentNodeDebugID,
    4526               type: 'replace text',
    4527               payload: update.content.toString()
    4528             });
    4529           }
    4530           break;
    4531         case 'REMOVE_NODE':
    4532           removeChild(parentNode, update.fromNode);
    4533           if (process.env.NODE_ENV !== 'production') {
    4534             ReactInstrumentation.debugTool.onHostOperation({
    4535               instanceID: parentNodeDebugID,
    4536               type: 'remove child',
    4537               payload: { fromIndex: update.fromIndex }
    4538             });
    4539           }
    4540           break;
    4541       }
    4542     }
    4543   }
    4544 };
    4545 
    4546 module.exports = DOMChildrenOperations;
    4547 }).call(this,require('_process'))
    4548 },{"./DOMLazyTree":47,"./Danger":51,"./ReactDOMComponentTree":71,"./ReactInstrumentation":100,"./createMicrosoftUnsafeLocalFunction":138,"./setInnerHTML":160,"./setTextContent":161,"_process":1}],47:[function(require,module,exports){
    4549 /**
    4550  * Copyright 2015-present, Facebook, Inc.
    4551  * All rights reserved.
    4552  *
    4553  * This source code is licensed under the BSD-style license found in the
    4554  * LICENSE file in the root directory of this source tree. An additional grant
    4555  * of patent rights can be found in the PATENTS file in the same directory.
    4556  *
    4557  */
    4558 
    4559 'use strict';
    4560 
    4561 var DOMNamespaces = require('./DOMNamespaces');
    4562 var setInnerHTML = require('./setInnerHTML');
    4563 
    4564 var createMicrosoftUnsafeLocalFunction = require('./createMicrosoftUnsafeLocalFunction');
    4565 var setTextContent = require('./setTextContent');
    4566 
    4567 var ELEMENT_NODE_TYPE = 1;
    4568 var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
    4569 
    4570 /**
    4571  * In IE (8-11) and Edge, appending nodes with no children is dramatically
    4572  * faster than appending a full subtree, so we essentially queue up the
    4573  * .appendChild calls here and apply them so each node is added to its parent
    4574  * before any children are added.
    4575  *
    4576  * In other browsers, doing so is slower or neutral compared to the other order
    4577  * (in Firefox, twice as slow) so we only do this inversion in IE.
    4578  *
    4579  * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode.
    4580  */
    4581 var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
    4582 
    4583 function insertTreeChildren(tree) {
    4584   if (!enableLazy) {
    4585     return;
    4586   }
    4587   var node = tree.node;
    4588   var children = tree.children;
    4589   if (children.length) {
    4590     for (var i = 0; i < children.length; i++) {
    4591       insertTreeBefore(node, children[i], null);
    4592     }
    4593   } else if (tree.html != null) {
    4594     setInnerHTML(node, tree.html);
    4595   } else if (tree.text != null) {
    4596     setTextContent(node, tree.text);
    4597   }
    4598 }
    4599 
    4600 var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {
    4601   // DocumentFragments aren't actually part of the DOM after insertion so
    4602   // appending children won't update the DOM. We need to ensure the fragment
    4603   // is properly populated first, breaking out of our lazy approach for just
    4604   // this level. Also, some <object> plugins (like Flash Player) will read
    4605   // <param> nodes immediately upon insertion into the DOM, so <object>
    4606   // must also be populated prior to insertion into the DOM.
    4607   if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) {
    4608     insertTreeChildren(tree);
    4609     parentNode.insertBefore(tree.node, referenceNode);
    4610   } else {
    4611     parentNode.insertBefore(tree.node, referenceNode);
    4612     insertTreeChildren(tree);
    4613   }
    4614 });
    4615 
    4616 function replaceChildWithTree(oldNode, newTree) {
    4617   oldNode.parentNode.replaceChild(newTree.node, oldNode);
    4618   insertTreeChildren(newTree);
    4619 }
    4620 
    4621 function queueChild(parentTree, childTree) {
    4622   if (enableLazy) {
    4623     parentTree.children.push(childTree);
    4624   } else {
    4625     parentTree.node.appendChild(childTree.node);
    4626   }
    4627 }
    4628 
    4629 function queueHTML(tree, html) {
    4630   if (enableLazy) {
    4631     tree.html = html;
    4632   } else {
    4633     setInnerHTML(tree.node, html);
    4634   }
    4635 }
    4636 
    4637 function queueText(tree, text) {
    4638   if (enableLazy) {
    4639     tree.text = text;
    4640   } else {
    4641     setTextContent(tree.node, text);
    4642   }
    4643 }
    4644 
    4645 function toString() {
    4646   return this.node.nodeName;
    4647 }
    4648 
    4649 function DOMLazyTree(node) {
    4650   return {
    4651     node: node,
    4652     children: [],
    4653     html: null,
    4654     text: null,
    4655     toString: toString
    4656   };
    4657 }
    4658 
    4659 DOMLazyTree.insertTreeBefore = insertTreeBefore;
    4660 DOMLazyTree.replaceChildWithTree = replaceChildWithTree;
    4661 DOMLazyTree.queueChild = queueChild;
    4662 DOMLazyTree.queueHTML = queueHTML;
    4663 DOMLazyTree.queueText = queueText;
    4664 
    4665 module.exports = DOMLazyTree;
    4666 },{"./DOMNamespaces":48,"./createMicrosoftUnsafeLocalFunction":138,"./setInnerHTML":160,"./setTextContent":161}],48:[function(require,module,exports){
    4667 /**
    4668  * Copyright 2013-present, Facebook, Inc.
    4669  * All rights reserved.
    4670  *
    4671  * This source code is licensed under the BSD-style license found in the
    4672  * LICENSE file in the root directory of this source tree. An additional grant
    4673  * of patent rights can be found in the PATENTS file in the same directory.
    4674  *
    4675  */
    4676 
    4677 'use strict';
    4678 
    4679 var DOMNamespaces = {
    4680   html: 'http://www.w3.org/1999/xhtml',
    4681   mathml: 'http://www.w3.org/1998/Math/MathML',
    4682   svg: 'http://www.w3.org/2000/svg'
    4683 };
    4684 
    4685 module.exports = DOMNamespaces;
    4686 },{}],49:[function(require,module,exports){
    4687 (function (process){
    4688 /**
    4689  * Copyright 2013-present, Facebook, Inc.
    4690  * All rights reserved.
    4691  *
    4692  * This source code is licensed under the BSD-style license found in the
    4693  * LICENSE file in the root directory of this source tree. An additional grant
    4694  * of patent rights can be found in the PATENTS file in the same directory.
    4695  *
    4696  */
    4697 
    4698 'use strict';
    4699 
    4700 var _prodInvariant = require('./reactProdInvariant');
    4701 
    4702 var invariant = require('fbjs/lib/invariant');
    4703 
    4704 function checkMask(value, bitmask) {
    4705   return (value & bitmask) === bitmask;
    4706 }
    4707 
    4708 var DOMPropertyInjection = {
    4709   /**
    4710    * Mapping from normalized, camelcased property names to a configuration that
    4711    * specifies how the associated DOM property should be accessed or rendered.
    4712    */
    4713   MUST_USE_PROPERTY: 0x1,
    4714   HAS_BOOLEAN_VALUE: 0x4,
    4715   HAS_NUMERIC_VALUE: 0x8,
    4716   HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
    4717   HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
    4718 
    4719   /**
    4720    * Inject some specialized knowledge about the DOM. This takes a config object
    4721    * with the following properties:
    4722    *
    4723    * isCustomAttribute: function that given an attribute name will return true
    4724    * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*
    4725    * attributes where it's impossible to enumerate all of the possible
    4726    * attribute names,
    4727    *
    4728    * Properties: object mapping DOM property name to one of the
    4729    * DOMPropertyInjection constants or null. If your attribute isn't in here,
    4730    * it won't get written to the DOM.
    4731    *
    4732    * DOMAttributeNames: object mapping React attribute name to the DOM
    4733    * attribute name. Attribute names not specified use the **lowercase**
    4734    * normalized name.
    4735    *
    4736    * DOMAttributeNamespaces: object mapping React attribute name to the DOM
    4737    * attribute namespace URL. (Attribute names not specified use no namespace.)
    4738    *
    4739    * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
    4740    * Property names not specified use the normalized name.
    4741    *
    4742    * DOMMutationMethods: Properties that require special mutation methods. If
    4743    * `value` is undefined, the mutation method should unset the property.
    4744    *
    4745    * @param {object} domPropertyConfig the config as described above.
    4746    */
    4747   injectDOMPropertyConfig: function (domPropertyConfig) {
    4748     var Injection = DOMPropertyInjection;
    4749     var Properties = domPropertyConfig.Properties || {};
    4750     var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
    4751     var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
    4752     var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
    4753     var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
    4754 
    4755     if (domPropertyConfig.isCustomAttribute) {
    4756       DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
    4757     }
    4758 
    4759     for (var propName in Properties) {
    4760       !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;
    4761 
    4762       var lowerCased = propName.toLowerCase();
    4763       var propConfig = Properties[propName];
    4764 
    4765       var propertyInfo = {
    4766         attributeName: lowerCased,
    4767         attributeNamespace: null,
    4768         propertyName: propName,
    4769         mutationMethod: null,
    4770 
    4771         mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
    4772         hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
    4773         hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
    4774         hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
    4775         hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
    4776       };
    4777       !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;
    4778 
    4779       if (process.env.NODE_ENV !== 'production') {
    4780         DOMProperty.getPossibleStandardName[lowerCased] = propName;
    4781       }
    4782 
    4783       if (DOMAttributeNames.hasOwnProperty(propName)) {
    4784         var attributeName = DOMAttributeNames[propName];
    4785         propertyInfo.attributeName = attributeName;
    4786         if (process.env.NODE_ENV !== 'production') {
    4787           DOMProperty.getPossibleStandardName[attributeName] = propName;
    4788         }
    4789       }
    4790 
    4791       if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
    4792         propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
    4793       }
    4794 
    4795       if (DOMPropertyNames.hasOwnProperty(propName)) {
    4796         propertyInfo.propertyName = DOMPropertyNames[propName];
    4797       }
    4798 
    4799       if (DOMMutationMethods.hasOwnProperty(propName)) {
    4800         propertyInfo.mutationMethod = DOMMutationMethods[propName];
    4801       }
    4802 
    4803       DOMProperty.properties[propName] = propertyInfo;
    4804     }
    4805   }
    4806 };
    4807 
    4808 /* eslint-disable max-len */
    4809 var ATTRIBUTE_NAME_START_CHAR = ':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';
    4810 /* eslint-enable max-len */
    4811 
    4812 /**
    4813  * DOMProperty exports lookup objects that can be used like functions:
    4814  *
    4815  *   > DOMProperty.isValid['id']
    4816  *   true
    4817  *   > DOMProperty.isValid['foobar']
    4818  *   undefined
    4819  *
    4820  * Although this may be confusing, it performs better in general.
    4821  *
    4822  * @see http://jsperf.com/key-exists
    4823  * @see http://jsperf.com/key-missing
    4824  */
    4825 var DOMProperty = {
    4826   ID_ATTRIBUTE_NAME: 'data-reactid',
    4827   ROOT_ATTRIBUTE_NAME: 'data-reactroot',
    4828 
    4829   ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
    4830   ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
    4831 
    4832   /**
    4833    * Map from property "standard name" to an object with info about how to set
    4834    * the property in the DOM. Each object contains:
    4835    *
    4836    * attributeName:
    4837    *   Used when rendering markup or with `*Attribute()`.
    4838    * attributeNamespace
    4839    * propertyName:
    4840    *   Used on DOM node instances. (This includes properties that mutate due to
    4841    *   external factors.)
    4842    * mutationMethod:
    4843    *   If non-null, used instead of the property or `setAttribute()` after
    4844    *   initial render.
    4845    * mustUseProperty:
    4846    *   Whether the property must be accessed and mutated as an object property.
    4847    * hasBooleanValue:
    4848    *   Whether the property should be removed when set to a falsey value.
    4849    * hasNumericValue:
    4850    *   Whether the property must be numeric or parse as a numeric and should be
    4851    *   removed when set to a falsey value.
    4852    * hasPositiveNumericValue:
    4853    *   Whether the property must be positive numeric or parse as a positive
    4854    *   numeric and should be removed when set to a falsey value.
    4855    * hasOverloadedBooleanValue:
    4856    *   Whether the property can be used as a flag as well as with a value.
    4857    *   Removed when strictly equal to false; present without a value when
    4858    *   strictly equal to true; present with a value otherwise.
    4859    */
    4860   properties: {},
    4861 
    4862   /**
    4863    * Mapping from lowercase property names to the properly cased version, used
    4864    * to warn in the case of missing properties. Available only in __DEV__.
    4865    *
    4866    * autofocus is predefined, because adding it to the property whitelist
    4867    * causes unintended side effects.
    4868