aboutsummaryrefslogtreecommitdiffhomepage
path: root/common.js
diff options
context:
space:
mode:
authorWei Zhu <yesmeck@gmail.com>2017-11-15 16:40:59 +0800
committerWei Zhu <yesmeck@gmail.com>2017-11-15 16:40:59 +0800
commitbb1963a38ad0346026efcea67b2714676fe8aad7 (patch)
tree77f2f1c139221e84c88ccba9e72d960e40c728ac /common.js
parentbacf5db378d539192f6840e50e4f46034eb3f8cb (diff)
downloadtime-picker-bb1963a38ad0346026efcea67b2714676fe8aad7.tar.gz
time-picker-bb1963a38ad0346026efcea67b2714676fe8aad7.tar.zst
time-picker-bb1963a38ad0346026efcea67b2714676fe8aad7.zip
Updates
Diffstat (limited to 'common.js')
-rw-r--r--common.js23711
1 files changed, 10735 insertions, 12976 deletions
diff --git a/common.js b/common.js
index fa08be8..c1ed0b1 100644
--- a/common.js
+++ b/common.js
@@ -158,9 +158,9 @@
158/* WEBPACK VAR INJECTION */(function(process) { 158/* WEBPACK VAR INJECTION */(function(process) {
159 159
160if (process.env.NODE_ENV === 'production') { 160if (process.env.NODE_ENV === 'production') {
161 module.exports = __webpack_require__(172); 161 module.exports = __webpack_require__(170);
162} else { 162} else {
163 module.exports = __webpack_require__(171); 163 module.exports = __webpack_require__(169);
164} 164}
165 165
166/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) 166/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
@@ -204,9 +204,9 @@ if (process.env.NODE_ENV === 'production') {
204 // DCE check should happen before ReactDOM bundle executes so that 204 // DCE check should happen before ReactDOM bundle executes so that
205 // DevTools can report bad minification during injection. 205 // DevTools can report bad minification during injection.
206 checkDCE(); 206 checkDCE();
207 module.exports = __webpack_require__(170); 207 module.exports = __webpack_require__(168);
208} else { 208} else {
209 module.exports = __webpack_require__(169); 209 module.exports = __webpack_require__(167);
210} 210}
211 211
212/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) 212/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
@@ -215,41 +215,6 @@ if (process.env.NODE_ENV === 'production') {
215/* 2 */ 215/* 2 */
216/***/ (function(module, exports, __webpack_require__) { 216/***/ (function(module, exports, __webpack_require__) {
217 217
218/* WEBPACK VAR INJECTION */(function(process) {/**
219 * Copyright (c) 2013-present, Facebook, Inc.
220 *
221 * This source code is licensed under the MIT license found in the
222 * LICENSE file in the root directory of this source tree.
223 */
224
225if (process.env.NODE_ENV !== 'production') {
226 var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
227 Symbol.for &&
228 Symbol.for('react.element')) ||
229 0xeac7;
230
231 var isValidElement = function(object) {
232 return typeof object === 'object' &&
233 object !== null &&
234 object.$$typeof === REACT_ELEMENT_TYPE;
235 };
236
237 // By explicitly using `prop-types` you are opting into new development behavior.
238 // http://fb.me/prop-types-in-prod
239 var throwOnDirectAccess = true;
240 module.exports = __webpack_require__(156)(isValidElement, throwOnDirectAccess);
241} else {
242 // By explicitly using `prop-types` you are opting into new production behavior.
243 // http://fb.me/prop-types-in-prod
244 module.exports = __webpack_require__(155)();
245}
246
247/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
248
249/***/ }),
250/* 3 */
251/***/ (function(module, exports, __webpack_require__) {
252
253"use strict"; 218"use strict";
254 219
255 220
@@ -262,7 +227,7 @@ exports.default = function (instance, Constructor) {
262}; 227};
263 228
264/***/ }), 229/***/ }),
265/* 4 */ 230/* 3 */
266/***/ (function(module, exports, __webpack_require__) { 231/***/ (function(module, exports, __webpack_require__) {
267 232
268"use strict"; 233"use strict";
@@ -270,7 +235,7 @@ exports.default = function (instance, Constructor) {
270 235
271exports.__esModule = true; 236exports.__esModule = true;
272 237
273var _defineProperty = __webpack_require__(52); 238var _defineProperty = __webpack_require__(51);
274 239
275var _defineProperty2 = _interopRequireDefault(_defineProperty); 240var _defineProperty2 = _interopRequireDefault(_defineProperty);
276 241
@@ -295,7 +260,7 @@ exports.default = function () {
295}(); 260}();
296 261
297/***/ }), 262/***/ }),
298/* 5 */ 263/* 4 */
299/***/ (function(module, exports, __webpack_require__) { 264/***/ (function(module, exports, __webpack_require__) {
300 265
301"use strict"; 266"use strict";
@@ -334,7 +299,7 @@ exports.default = function (subClass, superClass) {
334}; 299};
335 300
336/***/ }), 301/***/ }),
337/* 6 */ 302/* 5 */
338/***/ (function(module, exports, __webpack_require__) { 303/***/ (function(module, exports, __webpack_require__) {
339 304
340"use strict"; 305"use strict";
@@ -357,6 +322,41 @@ exports.default = function (self, call) {
357}; 322};
358 323
359/***/ }), 324/***/ }),
325/* 6 */
326/***/ (function(module, exports, __webpack_require__) {
327
328/* WEBPACK VAR INJECTION */(function(process) {/**
329 * Copyright (c) 2013-present, Facebook, Inc.
330 *
331 * This source code is licensed under the MIT license found in the
332 * LICENSE file in the root directory of this source tree.
333 */
334
335if (process.env.NODE_ENV !== 'production') {
336 var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
337 Symbol.for &&
338 Symbol.for('react.element')) ||
339 0xeac7;
340
341 var isValidElement = function(object) {
342 return typeof object === 'object' &&
343 object !== null &&
344 object.$$typeof === REACT_ELEMENT_TYPE;
345 };
346
347 // By explicitly using `prop-types` you are opting into new development behavior.
348 // http://fb.me/prop-types-in-prod
349 var throwOnDirectAccess = true;
350 module.exports = __webpack_require__(154)(isValidElement, throwOnDirectAccess);
351} else {
352 // By explicitly using `prop-types` you are opting into new production behavior.
353 // http://fb.me/prop-types-in-prod
354 module.exports = __webpack_require__(153)();
355}
356
357/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
358
359/***/ }),
360/* 7 */ 360/* 7 */
361/***/ (function(module, exports) { 361/***/ (function(module, exports) {
362 362
@@ -551,7 +551,7 @@ process.umask = function() { return 0; };
551/***/ (function(module, exports) { 551/***/ (function(module, exports) {
552 552
553//! moment.js 553//! moment.js
554//! version : 2.19.1 554//! version : 2.19.2
555//! authors : Tim Wood, Iskren Chernev, Moment.js contributors 555//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
556//! license : MIT 556//! license : MIT
557//! momentjs.com 557//! momentjs.com
@@ -1366,7 +1366,7 @@ function get (mom, unit) {
1366 1366
1367function set$1 (mom, unit, value) { 1367function set$1 (mom, unit, value) {
1368 if (mom.isValid() && !isNaN(value)) { 1368 if (mom.isValid() && !isNaN(value)) {
1369 if (unit === 'FullYear' && isLeapYear(mom.year())) { 1369 if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {
1370 mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); 1370 mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));
1371 } 1371 }
1372 else { 1372 else {
@@ -2472,10 +2472,11 @@ function defineLocale (name, config) {
2472 2472
2473function updateLocale(name, config) { 2473function updateLocale(name, config) {
2474 if (config != null) { 2474 if (config != null) {
2475 var locale, parentConfig = baseConfig; 2475 var locale, tmpLocale, parentConfig = baseConfig;
2476 // MERGE 2476 // MERGE
2477 if (locales[name] != null) { 2477 tmpLocale = loadLocale(name);
2478 parentConfig = locales[name]._config; 2478 if (tmpLocale != null) {
2479 parentConfig = tmpLocale._config;
2479 } 2480 }
2480 config = mergeConfigs(parentConfig, config); 2481 config = mergeConfigs(parentConfig, config);
2481 locale = new Locale(config); 2482 locale = new Locale(config);
@@ -5029,7 +5030,7 @@ addParseToken('x', function (input, array, config) {
5029// Side effect imports 5030// Side effect imports
5030 5031
5031 5032
5032hooks.version = '2.19.1'; 5033hooks.version = '2.19.2';
5033 5034
5034setHookCallback(createLocal); 5035setHookCallback(createLocal);
5035 5036
@@ -5137,66 +5138,6 @@ module.exports = emptyFunction;
5137 5138
5138/***/ }), 5139/***/ }),
5139/* 13 */ 5140/* 13 */
5140/***/ (function(module, exports, __webpack_require__) {
5141
5142"use strict";
5143/* WEBPACK VAR INJECTION */(function(process) {/**
5144 * Copyright (c) 2013-present, Facebook, Inc.
5145 *
5146 * This source code is licensed under the MIT license found in the
5147 * LICENSE file in the root directory of this source tree.
5148 *
5149 */
5150
5151
5152
5153/**
5154 * Use invariant() to assert state which your program assumes to be true.
5155 *
5156 * Provide sprintf-style format (only %s is supported) and arguments
5157 * to provide information about what broke and what you were
5158 * expecting.
5159 *
5160 * The invariant message will be stripped in production, but the invariant
5161 * will remain to ensure logic does not differ in production.
5162 */
5163
5164var validateFormat = function validateFormat(format) {};
5165
5166if (process.env.NODE_ENV !== 'production') {
5167 validateFormat = function validateFormat(format) {
5168 if (format === undefined) {
5169 throw new Error('invariant requires an error message argument');
5170 }
5171 };
5172}
5173
5174function invariant(condition, format, a, b, c, d, e, f) {
5175 validateFormat(format);
5176
5177 if (!condition) {
5178 var error;
5179 if (format === undefined) {
5180 error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
5181 } else {
5182 var args = [a, b, c, d, e, f];
5183 var argIndex = 0;
5184 error = new Error(format.replace(/%s/g, function () {
5185 return args[argIndex++];
5186 }));
5187 error.name = 'Invariant Violation';
5188 }
5189
5190 error.framesToPop = 1; // we don't care about invariant's own frame
5191 throw error;
5192 }
5193}
5194
5195module.exports = invariant;
5196/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
5197
5198/***/ }),
5199/* 14 */
5200/***/ (function(module, exports) { 5141/***/ (function(module, exports) {
5201 5142
5202var core = module.exports = { version: '2.5.1' }; 5143var core = module.exports = { version: '2.5.1' };
@@ -5204,7 +5145,7 @@ if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
5204 5145
5205 5146
5206/***/ }), 5147/***/ }),
5207/* 15 */ 5148/* 14 */
5208/***/ (function(module, exports, __webpack_require__) { 5149/***/ (function(module, exports, __webpack_require__) {
5209 5150
5210// Thank's IE8 for his funny defineProperty 5151// Thank's IE8 for his funny defineProperty
@@ -5214,7 +5155,7 @@ module.exports = !__webpack_require__(26)(function () {
5214 5155
5215 5156
5216/***/ }), 5157/***/ }),
5217/* 16 */ 5158/* 15 */
5218/***/ (function(module, exports) { 5159/***/ (function(module, exports) {
5219 5160
5220var hasOwnProperty = {}.hasOwnProperty; 5161var hasOwnProperty = {}.hasOwnProperty;
@@ -5224,15 +5165,15 @@ module.exports = function (it, key) {
5224 5165
5225 5166
5226/***/ }), 5167/***/ }),
5227/* 17 */ 5168/* 16 */
5228/***/ (function(module, exports, __webpack_require__) { 5169/***/ (function(module, exports, __webpack_require__) {
5229 5170
5230var anObject = __webpack_require__(25); 5171var anObject = __webpack_require__(25);
5231var IE8_DOM_DEFINE = __webpack_require__(58); 5172var IE8_DOM_DEFINE = __webpack_require__(57);
5232var toPrimitive = __webpack_require__(46); 5173var toPrimitive = __webpack_require__(46);
5233var dP = Object.defineProperty; 5174var dP = Object.defineProperty;
5234 5175
5235exports.f = __webpack_require__(15) ? Object.defineProperty : function defineProperty(O, P, Attributes) { 5176exports.f = __webpack_require__(14) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
5236 anObject(O); 5177 anObject(O);
5237 P = toPrimitive(P, true); 5178 P = toPrimitive(P, true);
5238 anObject(Attributes); 5179 anObject(Attributes);
@@ -5246,7 +5187,7 @@ exports.f = __webpack_require__(15) ? Object.defineProperty : function definePro
5246 5187
5247 5188
5248/***/ }), 5189/***/ }),
5249/* 18 */ 5190/* 17 */
5250/***/ (function(module, exports, __webpack_require__) { 5191/***/ (function(module, exports, __webpack_require__) {
5251 5192
5252"use strict"; 5193"use strict";
@@ -5343,13 +5284,13 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
5343 5284
5344 5285
5345/***/ }), 5286/***/ }),
5346/* 19 */ 5287/* 18 */
5347/***/ (function(module, exports, __webpack_require__) { 5288/***/ (function(module, exports, __webpack_require__) {
5348 5289
5349var global = __webpack_require__(10); 5290var global = __webpack_require__(10);
5350var core = __webpack_require__(14); 5291var core = __webpack_require__(13);
5351var ctx = __webpack_require__(56); 5292var ctx = __webpack_require__(55);
5352var hide = __webpack_require__(20); 5293var hide = __webpack_require__(19);
5353var PROTOTYPE = 'prototype'; 5294var PROTOTYPE = 'prototype';
5354 5295
5355var $export = function (type, name, source) { 5296var $export = function (type, name, source) {
@@ -5410,12 +5351,12 @@ module.exports = $export;
5410 5351
5411 5352
5412/***/ }), 5353/***/ }),
5413/* 20 */ 5354/* 19 */
5414/***/ (function(module, exports, __webpack_require__) { 5355/***/ (function(module, exports, __webpack_require__) {
5415 5356
5416var dP = __webpack_require__(17); 5357var dP = __webpack_require__(16);
5417var createDesc = __webpack_require__(33); 5358var createDesc = __webpack_require__(33);
5418module.exports = __webpack_require__(15) ? function (object, key, value) { 5359module.exports = __webpack_require__(14) ? function (object, key, value) {
5419 return dP.f(object, key, createDesc(1, value)); 5360 return dP.f(object, key, createDesc(1, value));
5420} : function (object, key, value) { 5361} : function (object, key, value) {
5421 object[key] = value; 5362 object[key] = value;
@@ -5424,11 +5365,11 @@ module.exports = __webpack_require__(15) ? function (object, key, value) {
5424 5365
5425 5366
5426/***/ }), 5367/***/ }),
5427/* 21 */ 5368/* 20 */
5428/***/ (function(module, exports, __webpack_require__) { 5369/***/ (function(module, exports, __webpack_require__) {
5429 5370
5430// to indexed object, toObject with fallback for non-array-like ES3 strings 5371// to indexed object, toObject with fallback for non-array-like ES3 strings
5431var IObject = __webpack_require__(59); 5372var IObject = __webpack_require__(58);
5432var defined = __webpack_require__(36); 5373var defined = __webpack_require__(36);
5433module.exports = function (it) { 5374module.exports = function (it) {
5434 return IObject(defined(it)); 5375 return IObject(defined(it));
@@ -5436,7 +5377,7 @@ module.exports = function (it) {
5436 5377
5437 5378
5438/***/ }), 5379/***/ }),
5439/* 22 */ 5380/* 21 */
5440/***/ (function(module, exports, __webpack_require__) { 5381/***/ (function(module, exports, __webpack_require__) {
5441 5382
5442var store = __webpack_require__(44)('wks'); 5383var store = __webpack_require__(44)('wks');
@@ -5453,7 +5394,7 @@ $exports.store = store;
5453 5394
5454 5395
5455/***/ }), 5396/***/ }),
5456/* 23 */ 5397/* 22 */
5457/***/ (function(module, __webpack_exports__, __webpack_require__) { 5398/***/ (function(module, __webpack_exports__, __webpack_require__) {
5458 5399
5459"use strict"; 5400"use strict";
@@ -6024,6 +5965,66 @@ mix(utils, domUtils);
6024/* harmony default export */ __webpack_exports__["a"] = (utils); 5965/* harmony default export */ __webpack_exports__["a"] = (utils);
6025 5966
6026/***/ }), 5967/***/ }),
5968/* 23 */
5969/***/ (function(module, exports, __webpack_require__) {
5970
5971"use strict";
5972/* WEBPACK VAR INJECTION */(function(process) {/**
5973 * Copyright (c) 2013-present, Facebook, Inc.
5974 *
5975 * This source code is licensed under the MIT license found in the
5976 * LICENSE file in the root directory of this source tree.
5977 *
5978 */
5979
5980
5981
5982/**
5983 * Use invariant() to assert state which your program assumes to be true.
5984 *
5985 * Provide sprintf-style format (only %s is supported) and arguments
5986 * to provide information about what broke and what you were
5987 * expecting.
5988 *
5989 * The invariant message will be stripped in production, but the invariant
5990 * will remain to ensure logic does not differ in production.
5991 */
5992
5993var validateFormat = function validateFormat(format) {};
5994
5995if (process.env.NODE_ENV !== 'production') {
5996 validateFormat = function validateFormat(format) {
5997 if (format === undefined) {
5998 throw new Error('invariant requires an error message argument');
5999 }
6000 };
6001}
6002
6003function invariant(condition, format, a, b, c, d, e, f) {
6004 validateFormat(format);
6005
6006 if (!condition) {
6007 var error;
6008 if (format === undefined) {
6009 error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
6010 } else {
6011 var args = [a, b, c, d, e, f];
6012 var argIndex = 0;
6013 error = new Error(format.replace(/%s/g, function () {
6014 return args[argIndex++];
6015 }));
6016 error.name = 'Invariant Violation';
6017 }
6018
6019 error.framesToPop = 1; // we don't care about invariant's own frame
6020 throw error;
6021 }
6022}
6023
6024module.exports = invariant;
6025/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
6026
6027/***/ }),
6027/* 24 */ 6028/* 24 */
6028/***/ (function(module, exports, __webpack_require__) { 6029/***/ (function(module, exports, __webpack_require__) {
6029 6030
@@ -6210,7 +6211,7 @@ exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.d
6210/***/ (function(module, exports, __webpack_require__) { 6211/***/ (function(module, exports, __webpack_require__) {
6211 6212
6212// 19.1.2.14 / 15.2.3.14 Object.keys(O) 6213// 19.1.2.14 / 15.2.3.14 Object.keys(O)
6213var $keys = __webpack_require__(63); 6214var $keys = __webpack_require__(62);
6214var enumBugKeys = __webpack_require__(37); 6215var enumBugKeys = __webpack_require__(37);
6215 6216
6216module.exports = Object.keys || function keys(O) { 6217module.exports = Object.keys || function keys(O) {
@@ -6259,7 +6260,7 @@ module.exports = function (key) {
6259 6260
6260exports.__esModule = true; 6261exports.__esModule = true;
6261 6262
6262var _defineProperty = __webpack_require__(52); 6263var _defineProperty = __webpack_require__(51);
6263 6264
6264var _defineProperty2 = _interopRequireDefault(_defineProperty); 6265var _defineProperty2 = _interopRequireDefault(_defineProperty);
6265 6266
@@ -6330,7 +6331,7 @@ var PROTOTYPE = 'prototype';
6330// Create object with fake `null` prototype: use iframe Object with cleared prototype 6331// Create object with fake `null` prototype: use iframe Object with cleared prototype
6331var createDict = function () { 6332var createDict = function () {
6332 // Thrash, waste and sodomy: IE GC bug 6333 // Thrash, waste and sodomy: IE GC bug
6333 var iframe = __webpack_require__(57)('iframe'); 6334 var iframe = __webpack_require__(56)('iframe');
6334 var i = enumBugKeys.length; 6335 var i = enumBugKeys.length;
6335 var lt = '<'; 6336 var lt = '<';
6336 var gt = '>'; 6337 var gt = '>';
@@ -6373,9 +6374,9 @@ exports.f = Object.getOwnPropertySymbols;
6373/* 42 */ 6374/* 42 */
6374/***/ (function(module, exports, __webpack_require__) { 6375/***/ (function(module, exports, __webpack_require__) {
6375 6376
6376var def = __webpack_require__(17).f; 6377var def = __webpack_require__(16).f;
6377var has = __webpack_require__(16); 6378var has = __webpack_require__(15);
6378var TAG = __webpack_require__(22)('toStringTag'); 6379var TAG = __webpack_require__(21)('toStringTag');
6379 6380
6380module.exports = function (it, tag, stat) { 6381module.exports = function (it, tag, stat) {
6381 if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); 6382 if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
@@ -6440,10 +6441,10 @@ module.exports = function (it, S) {
6440/***/ (function(module, exports, __webpack_require__) { 6441/***/ (function(module, exports, __webpack_require__) {
6441 6442
6442var global = __webpack_require__(10); 6443var global = __webpack_require__(10);
6443var core = __webpack_require__(14); 6444var core = __webpack_require__(13);
6444var LIBRARY = __webpack_require__(39); 6445var LIBRARY = __webpack_require__(39);
6445var wksExt = __webpack_require__(48); 6446var wksExt = __webpack_require__(48);
6446var defineProperty = __webpack_require__(17).f; 6447var defineProperty = __webpack_require__(16).f;
6447module.exports = function (name) { 6448module.exports = function (name) {
6448 var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); 6449 var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
6449 if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); 6450 if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
@@ -6454,7 +6455,7 @@ module.exports = function (name) {
6454/* 48 */ 6455/* 48 */
6455/***/ (function(module, exports, __webpack_require__) { 6456/***/ (function(module, exports, __webpack_require__) {
6456 6457
6457exports.f = __webpack_require__(22); 6458exports.f = __webpack_require__(21);
6458 6459
6459 6460
6460/***/ }), 6461/***/ }),
@@ -6462,45 +6463,6 @@ exports.f = __webpack_require__(22);
6462/***/ (function(module, exports, __webpack_require__) { 6463/***/ (function(module, exports, __webpack_require__) {
6463 6464
6464"use strict"; 6465"use strict";
6465/**
6466 * Copyright (c) 2013-present, Facebook, Inc.
6467 *
6468 * This source code is licensed under the MIT license found in the
6469 * LICENSE file in the root directory of this source tree.
6470 *
6471 */
6472
6473
6474
6475var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
6476
6477/**
6478 * Simple, lightweight module assisting with the detection and context of
6479 * Worker. Helps avoid circular dependencies and allows code to reason about
6480 * whether or not they are in a Worker, even if they never include the main
6481 * `ReactWorker` dependency.
6482 */
6483var ExecutionEnvironment = {
6484
6485 canUseDOM: canUseDOM,
6486
6487 canUseWorkers: typeof Worker !== 'undefined',
6488
6489 canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
6490
6491 canUseViewport: canUseDOM && !!window.screen,
6492
6493 isInWorker: !canUseDOM // For now, this is true - might change in the future.
6494
6495};
6496
6497module.exports = ExecutionEnvironment;
6498
6499/***/ }),
6500/* 50 */
6501/***/ (function(module, exports, __webpack_require__) {
6502
6503"use strict";
6504/* WEBPACK VAR INJECTION */(function(process) {/** 6466/* WEBPACK VAR INJECTION */(function(process) {/**
6505 * Copyright (c) 2013-present, Facebook, Inc. 6467 * Copyright (c) 2013-present, Facebook, Inc.
6506 * 6468 *
@@ -6511,9 +6473,9 @@ module.exports = ExecutionEnvironment;
6511 6473
6512 6474
6513if (process.env.NODE_ENV !== 'production') { 6475if (process.env.NODE_ENV !== 'production') {
6514 var invariant = __webpack_require__(13); 6476 var invariant = __webpack_require__(23);
6515 var warning = __webpack_require__(29); 6477 var warning = __webpack_require__(29);
6516 var ReactPropTypesSecret = __webpack_require__(51); 6478 var ReactPropTypesSecret = __webpack_require__(50);
6517 var loggedTypeFailures = {}; 6479 var loggedTypeFailures = {};
6518} 6480}
6519 6481
@@ -6564,7 +6526,7 @@ module.exports = checkPropTypes;
6564/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) 6526/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
6565 6527
6566/***/ }), 6528/***/ }),
6567/* 51 */ 6529/* 50 */
6568/***/ (function(module, exports, __webpack_require__) { 6530/***/ (function(module, exports, __webpack_require__) {
6569 6531
6570"use strict"; 6532"use strict";
@@ -6583,13 +6545,13 @@ module.exports = ReactPropTypesSecret;
6583 6545
6584 6546
6585/***/ }), 6547/***/ }),
6586/* 52 */ 6548/* 51 */
6587/***/ (function(module, exports, __webpack_require__) { 6549/***/ (function(module, exports, __webpack_require__) {
6588 6550
6589module.exports = { "default": __webpack_require__(103), __esModule: true }; 6551module.exports = { "default": __webpack_require__(103), __esModule: true };
6590 6552
6591/***/ }), 6553/***/ }),
6592/* 53 */ 6554/* 52 */
6593/***/ (function(module, exports, __webpack_require__) { 6555/***/ (function(module, exports, __webpack_require__) {
6594 6556
6595var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! 6557var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -6644,7 +6606,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
6644 6606
6645 6607
6646/***/ }), 6608/***/ }),
6647/* 54 */ 6609/* 53 */
6648/***/ (function(module, exports) { 6610/***/ (function(module, exports) {
6649 6611
6650module.exports = function(arr, obj){ 6612module.exports = function(arr, obj){
@@ -6656,7 +6618,7 @@ module.exports = function(arr, obj){
6656}; 6618};
6657 6619
6658/***/ }), 6620/***/ }),
6659/* 55 */ 6621/* 54 */
6660/***/ (function(module, exports) { 6622/***/ (function(module, exports) {
6661 6623
6662var toString = {}.toString; 6624var toString = {}.toString;
@@ -6667,7 +6629,7 @@ module.exports = function (it) {
6667 6629
6668 6630
6669/***/ }), 6631/***/ }),
6670/* 56 */ 6632/* 55 */
6671/***/ (function(module, exports, __webpack_require__) { 6633/***/ (function(module, exports, __webpack_require__) {
6672 6634
6673// optional / simple context binding 6635// optional / simple context binding
@@ -6693,7 +6655,7 @@ module.exports = function (fn, that, length) {
6693 6655
6694 6656
6695/***/ }), 6657/***/ }),
6696/* 57 */ 6658/* 56 */
6697/***/ (function(module, exports, __webpack_require__) { 6659/***/ (function(module, exports, __webpack_require__) {
6698 6660
6699var isObject = __webpack_require__(27); 6661var isObject = __webpack_require__(27);
@@ -6706,20 +6668,20 @@ module.exports = function (it) {
6706 6668
6707 6669
6708/***/ }), 6670/***/ }),
6709/* 58 */ 6671/* 57 */
6710/***/ (function(module, exports, __webpack_require__) { 6672/***/ (function(module, exports, __webpack_require__) {
6711 6673
6712module.exports = !__webpack_require__(15) && !__webpack_require__(26)(function () { 6674module.exports = !__webpack_require__(14) && !__webpack_require__(26)(function () {
6713 return Object.defineProperty(__webpack_require__(57)('div'), 'a', { get: function () { return 7; } }).a != 7; 6675 return Object.defineProperty(__webpack_require__(56)('div'), 'a', { get: function () { return 7; } }).a != 7;
6714}); 6676});
6715 6677
6716 6678
6717/***/ }), 6679/***/ }),
6718/* 59 */ 6680/* 58 */
6719/***/ (function(module, exports, __webpack_require__) { 6681/***/ (function(module, exports, __webpack_require__) {
6720 6682
6721// fallback for non-array-like ES3 and non-enumerable old V8 strings 6683// fallback for non-array-like ES3 and non-enumerable old V8 strings
6722var cof = __webpack_require__(55); 6684var cof = __webpack_require__(54);
6723// eslint-disable-next-line no-prototype-builtins 6685// eslint-disable-next-line no-prototype-builtins
6724module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { 6686module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
6725 return cof(it) == 'String' ? it.split('') : Object(it); 6687 return cof(it) == 'String' ? it.split('') : Object(it);
@@ -6727,21 +6689,21 @@ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
6727 6689
6728 6690
6729/***/ }), 6691/***/ }),
6730/* 60 */ 6692/* 59 */
6731/***/ (function(module, exports, __webpack_require__) { 6693/***/ (function(module, exports, __webpack_require__) {
6732 6694
6733"use strict"; 6695"use strict";
6734 6696
6735var LIBRARY = __webpack_require__(39); 6697var LIBRARY = __webpack_require__(39);
6736var $export = __webpack_require__(19); 6698var $export = __webpack_require__(18);
6737var redefine = __webpack_require__(64); 6699var redefine = __webpack_require__(63);
6738var hide = __webpack_require__(20); 6700var hide = __webpack_require__(19);
6739var has = __webpack_require__(16); 6701var has = __webpack_require__(15);
6740var Iterators = __webpack_require__(38); 6702var Iterators = __webpack_require__(38);
6741var $iterCreate = __webpack_require__(113); 6703var $iterCreate = __webpack_require__(113);
6742var setToStringTag = __webpack_require__(42); 6704var setToStringTag = __webpack_require__(42);
6743var getPrototypeOf = __webpack_require__(119); 6705var getPrototypeOf = __webpack_require__(119);
6744var ITERATOR = __webpack_require__(22)('iterator'); 6706var ITERATOR = __webpack_require__(21)('iterator');
6745var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` 6707var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
6746var FF_ITERATOR = '@@iterator'; 6708var FF_ITERATOR = '@@iterator';
6747var KEYS = 'keys'; 6709var KEYS = 'keys';
@@ -6804,18 +6766,18 @@ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE
6804 6766
6805 6767
6806/***/ }), 6768/***/ }),
6807/* 61 */ 6769/* 60 */
6808/***/ (function(module, exports, __webpack_require__) { 6770/***/ (function(module, exports, __webpack_require__) {
6809 6771
6810var pIE = __webpack_require__(32); 6772var pIE = __webpack_require__(32);
6811var createDesc = __webpack_require__(33); 6773var createDesc = __webpack_require__(33);
6812var toIObject = __webpack_require__(21); 6774var toIObject = __webpack_require__(20);
6813var toPrimitive = __webpack_require__(46); 6775var toPrimitive = __webpack_require__(46);
6814var has = __webpack_require__(16); 6776var has = __webpack_require__(15);
6815var IE8_DOM_DEFINE = __webpack_require__(58); 6777var IE8_DOM_DEFINE = __webpack_require__(57);
6816var gOPD = Object.getOwnPropertyDescriptor; 6778var gOPD = Object.getOwnPropertyDescriptor;
6817 6779
6818exports.f = __webpack_require__(15) ? gOPD : function getOwnPropertyDescriptor(O, P) { 6780exports.f = __webpack_require__(14) ? gOPD : function getOwnPropertyDescriptor(O, P) {
6819 O = toIObject(O); 6781 O = toIObject(O);
6820 P = toPrimitive(P, true); 6782 P = toPrimitive(P, true);
6821 if (IE8_DOM_DEFINE) try { 6783 if (IE8_DOM_DEFINE) try {
@@ -6826,11 +6788,11 @@ exports.f = __webpack_require__(15) ? gOPD : function getOwnPropertyDescriptor(O
6826 6788
6827 6789
6828/***/ }), 6790/***/ }),
6829/* 62 */ 6791/* 61 */
6830/***/ (function(module, exports, __webpack_require__) { 6792/***/ (function(module, exports, __webpack_require__) {
6831 6793
6832// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) 6794// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
6833var $keys = __webpack_require__(63); 6795var $keys = __webpack_require__(62);
6834var hiddenKeys = __webpack_require__(37).concat('length', 'prototype'); 6796var hiddenKeys = __webpack_require__(37).concat('length', 'prototype');
6835 6797
6836exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { 6798exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
@@ -6839,11 +6801,11 @@ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
6839 6801
6840 6802
6841/***/ }), 6803/***/ }),
6842/* 63 */ 6804/* 62 */
6843/***/ (function(module, exports, __webpack_require__) { 6805/***/ (function(module, exports, __webpack_require__) {
6844 6806
6845var has = __webpack_require__(16); 6807var has = __webpack_require__(15);
6846var toIObject = __webpack_require__(21); 6808var toIObject = __webpack_require__(20);
6847var arrayIndexOf = __webpack_require__(109)(false); 6809var arrayIndexOf = __webpack_require__(109)(false);
6848var IE_PROTO = __webpack_require__(43)('IE_PROTO'); 6810var IE_PROTO = __webpack_require__(43)('IE_PROTO');
6849 6811
@@ -6862,14 +6824,14 @@ module.exports = function (object, names) {
6862 6824
6863 6825
6864/***/ }), 6826/***/ }),
6865/* 64 */ 6827/* 63 */
6866/***/ (function(module, exports, __webpack_require__) { 6828/***/ (function(module, exports, __webpack_require__) {
6867 6829
6868module.exports = __webpack_require__(20); 6830module.exports = __webpack_require__(19);
6869 6831
6870 6832
6871/***/ }), 6833/***/ }),
6872/* 65 */ 6834/* 64 */
6873/***/ (function(module, exports, __webpack_require__) { 6835/***/ (function(module, exports, __webpack_require__) {
6874 6836
6875// 7.1.13 ToObject(argument) 6837// 7.1.13 ToObject(argument)
@@ -6880,11 +6842,11 @@ module.exports = function (it) {
6880 6842
6881 6843
6882/***/ }), 6844/***/ }),
6883/* 66 */ 6845/* 65 */
6884/***/ (function(module, __webpack_exports__, __webpack_require__) { 6846/***/ (function(module, __webpack_exports__, __webpack_require__) {
6885 6847
6886"use strict"; 6848"use strict";
6887/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(23); 6849/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(22);
6888 6850
6889 6851
6890/** 6852/**
@@ -6932,7 +6894,7 @@ function getOffsetParent(element) {
6932/* harmony default export */ __webpack_exports__["a"] = (getOffsetParent); 6894/* harmony default export */ __webpack_exports__["a"] = (getOffsetParent);
6933 6895
6934/***/ }), 6896/***/ }),
6935/* 67 */ 6897/* 66 */
6936/***/ (function(module, exports, __webpack_require__) { 6898/***/ (function(module, exports, __webpack_require__) {
6937 6899
6938"use strict"; 6900"use strict";
@@ -7013,6 +6975,45 @@ module.exports = EventListener;
7013/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) 6975/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
7014 6976
7015/***/ }), 6977/***/ }),
6978/* 67 */
6979/***/ (function(module, exports, __webpack_require__) {
6980
6981"use strict";
6982/**
6983 * Copyright (c) 2013-present, Facebook, Inc.
6984 *
6985 * This source code is licensed under the MIT license found in the
6986 * LICENSE file in the root directory of this source tree.
6987 *
6988 */
6989
6990
6991
6992var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
6993
6994/**
6995 * Simple, lightweight module assisting with the detection and context of
6996 * Worker. Helps avoid circular dependencies and allows code to reason about
6997 * whether or not they are in a Worker, even if they never include the main
6998 * `ReactWorker` dependency.
6999 */
7000var ExecutionEnvironment = {
7001
7002 canUseDOM: canUseDOM,
7003
7004 canUseWorkers: typeof Worker !== 'undefined',
7005
7006 canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
7007
7008 canUseViewport: canUseDOM && !!window.screen,
7009
7010 isInWorker: !canUseDOM // For now, this is true - might change in the future.
7011
7012};
7013
7014module.exports = ExecutionEnvironment;
7015
7016/***/ }),
7016/* 68 */ 7017/* 68 */
7017/***/ (function(module, exports, __webpack_require__) { 7018/***/ (function(module, exports, __webpack_require__) {
7018 7019
@@ -7232,17 +7233,17 @@ var util = {
7232"use strict"; 7233"use strict";
7233/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(99); 7234/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(99);
7234/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__); 7235/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);
7235/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(3); 7236/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(2);
7236/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__); 7237/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
7237/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(4); 7238/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(3);
7238/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__); 7239/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__);
7239/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(6); 7240/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(5);
7240/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__); 7241/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);
7241/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(5); 7242/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(4);
7242/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__); 7243/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);
7243/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); 7244/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0);
7244/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); 7245/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);
7245/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(2); 7246/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(6);
7246/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); 7247/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
7247 7248
7248 7249
@@ -7454,7 +7455,7 @@ var _EventBaseObject = __webpack_require__(84);
7454 7455
7455var _EventBaseObject2 = _interopRequireDefault(_EventBaseObject); 7456var _EventBaseObject2 = _interopRequireDefault(_EventBaseObject);
7456 7457
7457var _objectAssign = __webpack_require__(18); 7458var _objectAssign = __webpack_require__(17);
7458 7459
7459var _objectAssign2 = _interopRequireDefault(_objectAssign); 7460var _objectAssign2 = _interopRequireDefault(_objectAssign);
7460 7461
@@ -7769,17 +7770,17 @@ module.exports = exports['default'];
7769/***/ (function(module, __webpack_exports__, __webpack_require__) { 7770/***/ (function(module, __webpack_exports__, __webpack_require__) {
7770 7771
7771"use strict"; 7772"use strict";
7772/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(3); 7773/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(2);
7773/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__); 7774/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
7774/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(4); 7775/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(3);
7775/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__); 7776/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__);
7776/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(6); 7777/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(5);
7777/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__); 7778/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
7778/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(5); 7779/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(4);
7779/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__); 7780/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
7780/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); 7781/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
7781/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); 7782/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
7782/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(2); 7783/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(6);
7783/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); 7784/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__);
7784/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Select__ = __webpack_require__(90); 7785/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Select__ = __webpack_require__(90);
7785 7786
@@ -8039,17 +8040,17 @@ Combobox.propTypes = {
8039/***/ (function(module, __webpack_exports__, __webpack_require__) { 8040/***/ (function(module, __webpack_exports__, __webpack_require__) {
8040 8041
8041"use strict"; 8042"use strict";
8042/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(3); 8043/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(2);
8043/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__); 8044/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
8044/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(4); 8045/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(3);
8045/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__); 8046/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__);
8046/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(6); 8047/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(5);
8047/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__); 8048/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
8048/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(5); 8049/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(4);
8049/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__); 8050/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
8050/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); 8051/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
8051/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); 8052/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
8052/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(2); 8053/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(6);
8053/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); 8054/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__);
8054/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_moment__ = __webpack_require__(8); 8055/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_moment__ = __webpack_require__(8);
8055/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_moment__); 8056/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_moment__);
@@ -8292,23 +8293,23 @@ var _initialiseProps = function _initialiseProps() {
8292"use strict"; 8293"use strict";
8293/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(35); 8294/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(35);
8294/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__); 8295/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);
8295/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(3); 8296/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(2);
8296/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__); 8297/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
8297/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(4); 8298/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(3);
8298/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__); 8299/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__);
8299/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(6); 8300/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(5);
8300/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__); 8301/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);
8301/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(5); 8302/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(4);
8302/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__); 8303/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);
8303/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); 8304/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0);
8304/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); 8305/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);
8305/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(2); 8306/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(6);
8306/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); 8307/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
8307/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Header__ = __webpack_require__(88); 8308/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Header__ = __webpack_require__(88);
8308/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Combobox__ = __webpack_require__(87); 8309/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Combobox__ = __webpack_require__(87);
8309/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_moment__ = __webpack_require__(8); 8310/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_moment__ = __webpack_require__(8);
8310/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_moment__); 8311/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_moment__);
8311/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_classnames__ = __webpack_require__(53); 8312/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_classnames__ = __webpack_require__(52);
8312/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_classnames__); 8313/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_classnames__);
8313 8314
8314 8315
@@ -8518,21 +8519,21 @@ Panel.defaultProps = {
8518"use strict"; 8519"use strict";
8519/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(35); 8520/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(35);
8520/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__); 8521/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);
8521/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(3); 8522/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(2);
8522/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__); 8523/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
8523/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(4); 8524/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(3);
8524/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__); 8525/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__);
8525/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(6); 8526/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(5);
8526/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__); 8527/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);
8527/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(5); 8528/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(4);
8528/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__); 8529/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);
8529/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); 8530/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0);
8530/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); 8531/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);
8531/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(2); 8532/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(6);
8532/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); 8533/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
8533/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_dom__ = __webpack_require__(1); 8534/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_dom__ = __webpack_require__(1);
8534/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_dom__); 8535/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_dom__);
8535/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_classnames__ = __webpack_require__(53); 8536/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_classnames__ = __webpack_require__(52);
8536/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_classnames__); 8537/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_classnames__);
8537 8538
8538 8539
@@ -8705,19 +8706,19 @@ Select.propTypes = {
8705/***/ (function(module, __webpack_exports__, __webpack_require__) { 8706/***/ (function(module, __webpack_exports__, __webpack_require__) {
8706 8707
8707"use strict"; 8708"use strict";
8708/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(3); 8709/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(2);
8709/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__); 8710/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
8710/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(4); 8711/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(3);
8711/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__); 8712/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__);
8712/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(6); 8713/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(5);
8713/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__); 8714/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
8714/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(5); 8715/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(4);
8715/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__); 8716/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
8716/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); 8717/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
8717/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); 8718/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
8718/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(2); 8719/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(6);
8719/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); 8720/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__);
8720/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_rc_trigger__ = __webpack_require__(165); 8721/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_rc_trigger__ = __webpack_require__(163);
8721/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Panel__ = __webpack_require__(89); 8722/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Panel__ = __webpack_require__(89);
8722/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__placements__ = __webpack_require__(93); 8723/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__placements__ = __webpack_require__(93);
8723/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_moment__ = __webpack_require__(8); 8724/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_moment__ = __webpack_require__(8);
@@ -8923,6 +8924,11 @@ var Picker = function (_Component) {
8923 this.picker.focus(); 8924 this.picker.focus();
8924 } 8925 }
8925 }, { 8926 }, {
8927 key: 'blur',
8928 value: function blur() {
8929 this.picker.blur();
8930 }
8931 }, {
8926 key: 'render', 8932 key: 'render',
8927 value: function render() { 8933 value: function render() {
8928 var _props5 = this.props, 8934 var _props5 = this.props,
@@ -8938,7 +8944,8 @@ var Picker = function (_Component) {
8938 name = _props5.name, 8944 name = _props5.name,
8939 autoComplete = _props5.autoComplete, 8945 autoComplete = _props5.autoComplete,
8940 onFocus = _props5.onFocus, 8946 onFocus = _props5.onFocus,
8941 onBlur = _props5.onBlur; 8947 onBlur = _props5.onBlur,
8948 autoFocus = _props5.autoFocus;
8942 var _state = this.state, 8949 var _state = this.state,
8943 open = _state.open, 8950 open = _state.open,
8944 value = _state.value; 8951 value = _state.value;
@@ -8969,12 +8976,13 @@ var Picker = function (_Component) {
8969 type: 'text', 8976 type: 'text',
8970 placeholder: placeholder, 8977 placeholder: placeholder,
8971 name: name, 8978 name: name,
8972 readOnly: true,
8973 onKeyDown: this.onKeyDown, 8979 onKeyDown: this.onKeyDown,
8974 disabled: disabled, value: value && value.format(this.getFormat()) || '', 8980 disabled: disabled,
8981 value: value && value.format(this.getFormat()) || '',
8975 autoComplete: autoComplete, 8982 autoComplete: autoComplete,
8976 onFocus: onFocus, 8983 onFocus: onFocus,
8977 onBlur: onBlur 8984 onBlur: onBlur,
8985 autoFocus: autoFocus
8978 }), 8986 }),
8979 __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('span', { className: prefixCls + '-icon' }) 8987 __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('span', { className: prefixCls + '-icon' })
8980 ) 8988 )
@@ -9024,7 +9032,8 @@ Picker.propTypes = {
9024 minuteStep: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, 9032 minuteStep: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number,
9025 secondStep: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, 9033 secondStep: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number,
9026 focusOnOpen: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, 9034 focusOnOpen: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool,
9027 onKeyDown: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func 9035 onKeyDown: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,
9036 autoFocus: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool
9028}; 9037};
9029Picker.defaultProps = { 9038Picker.defaultProps = {
9030 clearText: 'clear', 9039 clearText: 'clear',
@@ -9195,9 +9204,9 @@ exports.default = function (obj, keys) {
9195 */ 9204 */
9196 9205
9197try { 9206try {
9198 var index = __webpack_require__(54); 9207 var index = __webpack_require__(53);
9199} catch (err) { 9208} catch (err) {
9200 var index = __webpack_require__(54); 9209 var index = __webpack_require__(53);
9201} 9210}
9202 9211
9203/** 9212/**
@@ -9388,7 +9397,7 @@ ClassList.prototype.contains = function(name){
9388/***/ (function(module, exports, __webpack_require__) { 9397/***/ (function(module, exports, __webpack_require__) {
9389 9398
9390__webpack_require__(125); 9399__webpack_require__(125);
9391module.exports = __webpack_require__(14).Object.assign; 9400module.exports = __webpack_require__(13).Object.assign;
9392 9401
9393 9402
9394/***/ }), 9403/***/ }),
@@ -9396,7 +9405,7 @@ module.exports = __webpack_require__(14).Object.assign;
9396/***/ (function(module, exports, __webpack_require__) { 9405/***/ (function(module, exports, __webpack_require__) {
9397 9406
9398__webpack_require__(126); 9407__webpack_require__(126);
9399var $Object = __webpack_require__(14).Object; 9408var $Object = __webpack_require__(13).Object;
9400module.exports = function create(P, D) { 9409module.exports = function create(P, D) {
9401 return $Object.create(P, D); 9410 return $Object.create(P, D);
9402}; 9411};
@@ -9407,7 +9416,7 @@ module.exports = function create(P, D) {
9407/***/ (function(module, exports, __webpack_require__) { 9416/***/ (function(module, exports, __webpack_require__) {
9408 9417
9409__webpack_require__(127); 9418__webpack_require__(127);
9410var $Object = __webpack_require__(14).Object; 9419var $Object = __webpack_require__(13).Object;
9411module.exports = function defineProperty(it, key, desc) { 9420module.exports = function defineProperty(it, key, desc) {
9412 return $Object.defineProperty(it, key, desc); 9421 return $Object.defineProperty(it, key, desc);
9413}; 9422};
@@ -9418,7 +9427,7 @@ module.exports = function defineProperty(it, key, desc) {
9418/***/ (function(module, exports, __webpack_require__) { 9427/***/ (function(module, exports, __webpack_require__) {
9419 9428
9420__webpack_require__(128); 9429__webpack_require__(128);
9421module.exports = __webpack_require__(14).Object.setPrototypeOf; 9430module.exports = __webpack_require__(13).Object.setPrototypeOf;
9422 9431
9423 9432
9424/***/ }), 9433/***/ }),
@@ -9429,7 +9438,7 @@ __webpack_require__(131);
9429__webpack_require__(129); 9438__webpack_require__(129);
9430__webpack_require__(132); 9439__webpack_require__(132);
9431__webpack_require__(133); 9440__webpack_require__(133);
9432module.exports = __webpack_require__(14).Symbol; 9441module.exports = __webpack_require__(13).Symbol;
9433 9442
9434 9443
9435/***/ }), 9444/***/ }),
@@ -9464,7 +9473,7 @@ module.exports = function () { /* empty */ };
9464 9473
9465// false -> Array#indexOf 9474// false -> Array#indexOf
9466// true -> Array#includes 9475// true -> Array#includes
9467var toIObject = __webpack_require__(21); 9476var toIObject = __webpack_require__(20);
9468var toLength = __webpack_require__(123); 9477var toLength = __webpack_require__(123);
9469var toAbsoluteIndex = __webpack_require__(122); 9478var toAbsoluteIndex = __webpack_require__(122);
9470module.exports = function (IS_INCLUDES) { 9479module.exports = function (IS_INCLUDES) {
@@ -9521,7 +9530,7 @@ module.exports = document && document.documentElement;
9521/***/ (function(module, exports, __webpack_require__) { 9530/***/ (function(module, exports, __webpack_require__) {
9522 9531
9523// 7.2.2 IsArray(argument) 9532// 7.2.2 IsArray(argument)
9524var cof = __webpack_require__(55); 9533var cof = __webpack_require__(54);
9525module.exports = Array.isArray || function isArray(arg) { 9534module.exports = Array.isArray || function isArray(arg) {
9526 return cof(arg) == 'Array'; 9535 return cof(arg) == 'Array';
9527}; 9536};
@@ -9539,7 +9548,7 @@ var setToStringTag = __webpack_require__(42);
9539var IteratorPrototype = {}; 9548var IteratorPrototype = {};
9540 9549
9541// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() 9550// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
9542__webpack_require__(20)(IteratorPrototype, __webpack_require__(22)('iterator'), function () { return this; }); 9551__webpack_require__(19)(IteratorPrototype, __webpack_require__(21)('iterator'), function () { return this; });
9543 9552
9544module.exports = function (Constructor, NAME, next) { 9553module.exports = function (Constructor, NAME, next) {
9545 Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); 9554 Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
@@ -9562,8 +9571,8 @@ module.exports = function (done, value) {
9562 9571
9563var META = __webpack_require__(34)('meta'); 9572var META = __webpack_require__(34)('meta');
9564var isObject = __webpack_require__(27); 9573var isObject = __webpack_require__(27);
9565var has = __webpack_require__(16); 9574var has = __webpack_require__(15);
9566var setDesc = __webpack_require__(17).f; 9575var setDesc = __webpack_require__(16).f;
9567var id = 0; 9576var id = 0;
9568var isExtensible = Object.isExtensible || function () { 9577var isExtensible = Object.isExtensible || function () {
9569 return true; 9578 return true;
@@ -9625,8 +9634,8 @@ var meta = module.exports = {
9625var getKeys = __webpack_require__(31); 9634var getKeys = __webpack_require__(31);
9626var gOPS = __webpack_require__(41); 9635var gOPS = __webpack_require__(41);
9627var pIE = __webpack_require__(32); 9636var pIE = __webpack_require__(32);
9628var toObject = __webpack_require__(65); 9637var toObject = __webpack_require__(64);
9629var IObject = __webpack_require__(59); 9638var IObject = __webpack_require__(58);
9630var $assign = Object.assign; 9639var $assign = Object.assign;
9631 9640
9632// should work with symbols and should have deterministic property order (V8 bug) 9641// should work with symbols and should have deterministic property order (V8 bug)
@@ -9660,11 +9669,11 @@ module.exports = !$assign || __webpack_require__(26)(function () {
9660/* 117 */ 9669/* 117 */
9661/***/ (function(module, exports, __webpack_require__) { 9670/***/ (function(module, exports, __webpack_require__) {
9662 9671
9663var dP = __webpack_require__(17); 9672var dP = __webpack_require__(16);
9664var anObject = __webpack_require__(25); 9673var anObject = __webpack_require__(25);
9665var getKeys = __webpack_require__(31); 9674var getKeys = __webpack_require__(31);
9666 9675
9667module.exports = __webpack_require__(15) ? Object.defineProperties : function defineProperties(O, Properties) { 9676module.exports = __webpack_require__(14) ? Object.defineProperties : function defineProperties(O, Properties) {
9668 anObject(O); 9677 anObject(O);
9669 var keys = getKeys(Properties); 9678 var keys = getKeys(Properties);
9670 var length = keys.length; 9679 var length = keys.length;
@@ -9680,8 +9689,8 @@ module.exports = __webpack_require__(15) ? Object.defineProperties : function de
9680/***/ (function(module, exports, __webpack_require__) { 9689/***/ (function(module, exports, __webpack_require__) {
9681 9690
9682// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window 9691// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
9683var toIObject = __webpack_require__(21); 9692var toIObject = __webpack_require__(20);
9684var gOPN = __webpack_require__(62).f; 9693var gOPN = __webpack_require__(61).f;
9685var toString = {}.toString; 9694var toString = {}.toString;
9686 9695
9687var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames 9696var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
@@ -9705,8 +9714,8 @@ module.exports.f = function getOwnPropertyNames(it) {
9705/***/ (function(module, exports, __webpack_require__) { 9714/***/ (function(module, exports, __webpack_require__) {
9706 9715
9707// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) 9716// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
9708var has = __webpack_require__(16); 9717var has = __webpack_require__(15);
9709var toObject = __webpack_require__(65); 9718var toObject = __webpack_require__(64);
9710var IE_PROTO = __webpack_require__(43)('IE_PROTO'); 9719var IE_PROTO = __webpack_require__(43)('IE_PROTO');
9711var ObjectProto = Object.prototype; 9720var ObjectProto = Object.prototype;
9712 9721
@@ -9735,7 +9744,7 @@ module.exports = {
9735 set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line 9744 set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
9736 function (test, buggy, set) { 9745 function (test, buggy, set) {
9737 try { 9746 try {
9738 set = __webpack_require__(56)(Function.call, __webpack_require__(61).f(Object.prototype, '__proto__').set, 2); 9747 set = __webpack_require__(55)(Function.call, __webpack_require__(60).f(Object.prototype, '__proto__').set, 2);
9739 set(test, []); 9748 set(test, []);
9740 buggy = !(test instanceof Array); 9749 buggy = !(test instanceof Array);
9741 } catch (e) { buggy = true; } 9750 } catch (e) { buggy = true; }
@@ -9807,13 +9816,13 @@ module.exports = function (it) {
9807var addToUnscopables = __webpack_require__(108); 9816var addToUnscopables = __webpack_require__(108);
9808var step = __webpack_require__(114); 9817var step = __webpack_require__(114);
9809var Iterators = __webpack_require__(38); 9818var Iterators = __webpack_require__(38);
9810var toIObject = __webpack_require__(21); 9819var toIObject = __webpack_require__(20);
9811 9820
9812// 22.1.3.4 Array.prototype.entries() 9821// 22.1.3.4 Array.prototype.entries()
9813// 22.1.3.13 Array.prototype.keys() 9822// 22.1.3.13 Array.prototype.keys()
9814// 22.1.3.29 Array.prototype.values() 9823// 22.1.3.29 Array.prototype.values()
9815// 22.1.3.30 Array.prototype[@@iterator]() 9824// 22.1.3.30 Array.prototype[@@iterator]()
9816module.exports = __webpack_require__(60)(Array, 'Array', function (iterated, kind) { 9825module.exports = __webpack_require__(59)(Array, 'Array', function (iterated, kind) {
9817 this._t = toIObject(iterated); // target 9826 this._t = toIObject(iterated); // target
9818 this._i = 0; // next index 9827 this._i = 0; // next index
9819 this._k = kind; // kind 9828 this._k = kind; // kind
@@ -9844,7 +9853,7 @@ addToUnscopables('entries');
9844/***/ (function(module, exports, __webpack_require__) { 9853/***/ (function(module, exports, __webpack_require__) {
9845 9854
9846// 19.1.3.1 Object.assign(target, source) 9855// 19.1.3.1 Object.assign(target, source)
9847var $export = __webpack_require__(19); 9856var $export = __webpack_require__(18);
9848 9857
9849$export($export.S + $export.F, 'Object', { assign: __webpack_require__(116) }); 9858$export($export.S + $export.F, 'Object', { assign: __webpack_require__(116) });
9850 9859
@@ -9853,7 +9862,7 @@ $export($export.S + $export.F, 'Object', { assign: __webpack_require__(116) });
9853/* 126 */ 9862/* 126 */
9854/***/ (function(module, exports, __webpack_require__) { 9863/***/ (function(module, exports, __webpack_require__) {
9855 9864
9856var $export = __webpack_require__(19); 9865var $export = __webpack_require__(18);
9857// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) 9866// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
9858$export($export.S, 'Object', { create: __webpack_require__(40) }); 9867$export($export.S, 'Object', { create: __webpack_require__(40) });
9859 9868
@@ -9862,9 +9871,9 @@ $export($export.S, 'Object', { create: __webpack_require__(40) });
9862/* 127 */ 9871/* 127 */
9863/***/ (function(module, exports, __webpack_require__) { 9872/***/ (function(module, exports, __webpack_require__) {
9864 9873
9865var $export = __webpack_require__(19); 9874var $export = __webpack_require__(18);
9866// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) 9875// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
9867$export($export.S + $export.F * !__webpack_require__(15), 'Object', { defineProperty: __webpack_require__(17).f }); 9876$export($export.S + $export.F * !__webpack_require__(14), 'Object', { defineProperty: __webpack_require__(16).f });
9868 9877
9869 9878
9870/***/ }), 9879/***/ }),
@@ -9872,7 +9881,7 @@ $export($export.S + $export.F * !__webpack_require__(15), 'Object', { defineProp
9872/***/ (function(module, exports, __webpack_require__) { 9881/***/ (function(module, exports, __webpack_require__) {
9873 9882
9874// 19.1.3.19 Object.setPrototypeOf(O, proto) 9883// 19.1.3.19 Object.setPrototypeOf(O, proto)
9875var $export = __webpack_require__(19); 9884var $export = __webpack_require__(18);
9876$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(120).set }); 9885$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(120).set });
9877 9886
9878 9887
@@ -9891,7 +9900,7 @@ $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(120).set });
9891var $at = __webpack_require__(121)(true); 9900var $at = __webpack_require__(121)(true);
9892 9901
9893// 21.1.3.27 String.prototype[@@iterator]() 9902// 21.1.3.27 String.prototype[@@iterator]()
9894__webpack_require__(60)(String, 'String', function (iterated) { 9903__webpack_require__(59)(String, 'String', function (iterated) {
9895 this._t = String(iterated); // target 9904 this._t = String(iterated); // target
9896 this._i = 0; // next index 9905 this._i = 0; // next index
9897// 21.1.5.2.1 %StringIteratorPrototype%.next() 9906// 21.1.5.2.1 %StringIteratorPrototype%.next()
@@ -9914,28 +9923,28 @@ __webpack_require__(60)(String, 'String', function (iterated) {
9914 9923
9915// ECMAScript 6 symbols shim 9924// ECMAScript 6 symbols shim
9916var global = __webpack_require__(10); 9925var global = __webpack_require__(10);
9917var has = __webpack_require__(16); 9926var has = __webpack_require__(15);
9918var DESCRIPTORS = __webpack_require__(15); 9927var DESCRIPTORS = __webpack_require__(14);
9919var $export = __webpack_require__(19); 9928var $export = __webpack_require__(18);
9920var redefine = __webpack_require__(64); 9929var redefine = __webpack_require__(63);
9921var META = __webpack_require__(115).KEY; 9930var META = __webpack_require__(115).KEY;
9922var $fails = __webpack_require__(26); 9931var $fails = __webpack_require__(26);
9923var shared = __webpack_require__(44); 9932var shared = __webpack_require__(44);
9924var setToStringTag = __webpack_require__(42); 9933var setToStringTag = __webpack_require__(42);
9925var uid = __webpack_require__(34); 9934var uid = __webpack_require__(34);
9926var wks = __webpack_require__(22); 9935var wks = __webpack_require__(21);
9927var wksExt = __webpack_require__(48); 9936var wksExt = __webpack_require__(48);
9928var wksDefine = __webpack_require__(47); 9937var wksDefine = __webpack_require__(47);
9929var enumKeys = __webpack_require__(110); 9938var enumKeys = __webpack_require__(110);
9930var isArray = __webpack_require__(112); 9939var isArray = __webpack_require__(112);
9931var anObject = __webpack_require__(25); 9940var anObject = __webpack_require__(25);
9932var toIObject = __webpack_require__(21); 9941var toIObject = __webpack_require__(20);
9933var toPrimitive = __webpack_require__(46); 9942var toPrimitive = __webpack_require__(46);
9934var createDesc = __webpack_require__(33); 9943var createDesc = __webpack_require__(33);
9935var _create = __webpack_require__(40); 9944var _create = __webpack_require__(40);
9936var gOPNExt = __webpack_require__(118); 9945var gOPNExt = __webpack_require__(118);
9937var $GOPD = __webpack_require__(61); 9946var $GOPD = __webpack_require__(60);
9938var $DP = __webpack_require__(17); 9947var $DP = __webpack_require__(16);
9939var $keys = __webpack_require__(31); 9948var $keys = __webpack_require__(31);
9940var gOPD = $GOPD.f; 9949var gOPD = $GOPD.f;
9941var dP = $DP.f; 9950var dP = $DP.f;
@@ -10059,7 +10068,7 @@ if (!USE_NATIVE) {
10059 10068
10060 $GOPD.f = $getOwnPropertyDescriptor; 10069 $GOPD.f = $getOwnPropertyDescriptor;
10061 $DP.f = $defineProperty; 10070 $DP.f = $defineProperty;
10062 __webpack_require__(62).f = gOPNExt.f = $getOwnPropertyNames; 10071 __webpack_require__(61).f = gOPNExt.f = $getOwnPropertyNames;
10063 __webpack_require__(32).f = $propertyIsEnumerable; 10072 __webpack_require__(32).f = $propertyIsEnumerable;
10064 __webpack_require__(41).f = $getOwnPropertySymbols; 10073 __webpack_require__(41).f = $getOwnPropertySymbols;
10065 10074
@@ -10138,7 +10147,7 @@ $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
10138}); 10147});
10139 10148
10140// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) 10149// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
10141$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(20)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); 10150$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(19)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
10142// 19.4.3.5 Symbol.prototype[@@toStringTag] 10151// 19.4.3.5 Symbol.prototype[@@toStringTag]
10143setToStringTag($Symbol, 'Symbol'); 10152setToStringTag($Symbol, 'Symbol');
10144// 20.2.1.9 Math[@@toStringTag] 10153// 20.2.1.9 Math[@@toStringTag]
@@ -10167,9 +10176,9 @@ __webpack_require__(47)('observable');
10167 10176
10168__webpack_require__(124); 10177__webpack_require__(124);
10169var global = __webpack_require__(10); 10178var global = __webpack_require__(10);
10170var hide = __webpack_require__(20); 10179var hide = __webpack_require__(19);
10171var Iterators = __webpack_require__(38); 10180var Iterators = __webpack_require__(38);
10172var TO_STRING_TAG = __webpack_require__(22)('toStringTag'); 10181var TO_STRING_TAG = __webpack_require__(21)('toStringTag');
10173 10182
10174var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + 10183var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
10175 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + 10184 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
@@ -10201,10 +10210,10 @@ for (var i = 0; i < DOMIterables.length; i++) {
10201 10210
10202 10211
10203 10212
10204var _assign = __webpack_require__(18); 10213var _assign = __webpack_require__(17);
10205 10214
10206var emptyObject = __webpack_require__(28); 10215var emptyObject = __webpack_require__(28);
10207var _invariant = __webpack_require__(13); 10216var _invariant = __webpack_require__(23);
10208 10217
10209if (process.env.NODE_ENV !== 'production') { 10218if (process.env.NODE_ENV !== 'production') {
10210 var warning = __webpack_require__(29); 10219 var warning = __webpack_require__(29);
@@ -11379,7 +11388,7 @@ cssAnimation.isCssAnimationSupported = isCssAnimationSupported;
11379/***/ (function(module, __webpack_exports__, __webpack_require__) { 11388/***/ (function(module, __webpack_exports__, __webpack_require__) {
11380 11389
11381"use strict"; 11390"use strict";
11382/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(23); 11391/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(22);
11383 11392
11384 11393
11385function adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) { 11394function adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) {
@@ -11489,7 +11498,7 @@ function getElFuturePos(elRegion, refNodeRegion, points, offset, targetOffset) {
11489/***/ (function(module, __webpack_exports__, __webpack_require__) { 11498/***/ (function(module, __webpack_exports__, __webpack_require__) {
11490 11499
11491"use strict"; 11500"use strict";
11492/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(23); 11501/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(22);
11493 11502
11494 11503
11495function getRegion(node) { 11504function getRegion(node) {
@@ -11521,8 +11530,8 @@ function getRegion(node) {
11521/***/ (function(module, __webpack_exports__, __webpack_require__) { 11530/***/ (function(module, __webpack_exports__, __webpack_require__) {
11522 11531
11523"use strict"; 11532"use strict";
11524/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(23); 11533/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(22);
11525/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getOffsetParent__ = __webpack_require__(66); 11534/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getOffsetParent__ = __webpack_require__(65);
11526/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isAncestorFixed__ = __webpack_require__(145); 11535/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isAncestorFixed__ = __webpack_require__(145);
11527 11536
11528 11537
@@ -11619,8 +11628,8 @@ function getVisibleRectForElement(element) {
11619 11628
11620"use strict"; 11629"use strict";
11621Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 11630Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
11622/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(23); 11631/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(22);
11623/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getOffsetParent__ = __webpack_require__(66); 11632/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getOffsetParent__ = __webpack_require__(65);
11624/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getVisibleRectForElement__ = __webpack_require__(143); 11633/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getVisibleRectForElement__ = __webpack_require__(143);
11625/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__adjustForViewport__ = __webpack_require__(139); 11634/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__adjustForViewport__ = __webpack_require__(139);
11626/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getRegion__ = __webpack_require__(142); 11635/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getRegion__ = __webpack_require__(142);
@@ -11833,7 +11842,7 @@ domAlign.__getVisibleRectForElement = __WEBPACK_IMPORTED_MODULE_2__getVisibleRec
11833 11842
11834"use strict"; 11843"use strict";
11835/* harmony export (immutable) */ __webpack_exports__["a"] = isAncestorFixed; 11844/* harmony export (immutable) */ __webpack_exports__["a"] = isAncestorFixed;
11836/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(23); 11845/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(22);
11837 11846
11838 11847
11839function isAncestorFixed(element) { 11848function isAncestorFixed(element) {
@@ -12186,76 +12195,13 @@ module.exports = isTextNode;
12186 * 12195 *
12187 * This source code is licensed under the MIT license found in the 12196 * This source code is licensed under the MIT license found in the
12188 * LICENSE file in the root directory of this source tree. 12197 * LICENSE file in the root directory of this source tree.
12189 *
12190 * @typechecks
12191 */
12192
12193
12194
12195var ExecutionEnvironment = __webpack_require__(49);
12196
12197var performance;
12198
12199if (ExecutionEnvironment.canUseDOM) {
12200 performance = window.performance || window.msPerformance || window.webkitPerformance;
12201}
12202
12203module.exports = performance || {};
12204
12205/***/ }),
12206/* 154 */
12207/***/ (function(module, exports, __webpack_require__) {
12208
12209"use strict";
12210
12211
12212/**
12213 * Copyright (c) 2013-present, Facebook, Inc.
12214 *
12215 * This source code is licensed under the MIT license found in the
12216 * LICENSE file in the root directory of this source tree.
12217 *
12218 * @typechecks
12219 */
12220
12221var performance = __webpack_require__(153);
12222
12223var performanceNow;
12224
12225/**
12226 * Detect if we can use `window.performance.now()` and gracefully fallback to
12227 * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
12228 * because of Facebook's testing infrastructure.
12229 */
12230if (performance.now) {
12231 performanceNow = function performanceNow() {
12232 return performance.now();
12233 };
12234} else {
12235 performanceNow = function performanceNow() {
12236 return Date.now();
12237 };
12238}
12239
12240module.exports = performanceNow;
12241
12242/***/ }),
12243/* 155 */
12244/***/ (function(module, exports, __webpack_require__) {
12245
12246"use strict";
12247/**
12248 * Copyright (c) 2013-present, Facebook, Inc.
12249 *
12250 * This source code is licensed under the MIT license found in the
12251 * LICENSE file in the root directory of this source tree.
12252 */ 12198 */
12253 12199
12254 12200
12255 12201
12256var emptyFunction = __webpack_require__(12); 12202var emptyFunction = __webpack_require__(12);
12257var invariant = __webpack_require__(13); 12203var invariant = __webpack_require__(23);
12258var ReactPropTypesSecret = __webpack_require__(51); 12204var ReactPropTypesSecret = __webpack_require__(50);
12259 12205
12260module.exports = function() { 12206module.exports = function() {
12261 function shim(props, propName, componentName, location, propFullName, secret) { 12207 function shim(props, propName, componentName, location, propFullName, secret) {
@@ -12305,7 +12251,7 @@ module.exports = function() {
12305 12251
12306 12252
12307/***/ }), 12253/***/ }),
12308/* 156 */ 12254/* 154 */
12309/***/ (function(module, exports, __webpack_require__) { 12255/***/ (function(module, exports, __webpack_require__) {
12310 12256
12311"use strict"; 12257"use strict";
@@ -12319,12 +12265,12 @@ module.exports = function() {
12319 12265
12320 12266
12321var emptyFunction = __webpack_require__(12); 12267var emptyFunction = __webpack_require__(12);
12322var invariant = __webpack_require__(13); 12268var invariant = __webpack_require__(23);
12323var warning = __webpack_require__(29); 12269var warning = __webpack_require__(29);
12324var assign = __webpack_require__(18); 12270var assign = __webpack_require__(17);
12325 12271
12326var ReactPropTypesSecret = __webpack_require__(51); 12272var ReactPropTypesSecret = __webpack_require__(50);
12327var checkPropTypes = __webpack_require__(50); 12273var checkPropTypes = __webpack_require__(49);
12328 12274
12329module.exports = function(isValidElement, throwOnDirectAccess) { 12275module.exports = function(isValidElement, throwOnDirectAccess) {
12330 /* global Symbol */ 12276 /* global Symbol */
@@ -12855,7 +12801,7 @@ module.exports = function(isValidElement, throwOnDirectAccess) {
12855/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) 12801/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
12856 12802
12857/***/ }), 12803/***/ }),
12858/* 157 */ 12804/* 155 */
12859/***/ (function(module, exports, __webpack_require__) { 12805/***/ (function(module, exports, __webpack_require__) {
12860 12806
12861"use strict"; 12807"use strict";
@@ -12869,7 +12815,7 @@ var _react = __webpack_require__(0);
12869 12815
12870var _react2 = _interopRequireDefault(_react); 12816var _react2 = _interopRequireDefault(_react);
12871 12817
12872var _propTypes = __webpack_require__(2); 12818var _propTypes = __webpack_require__(6);
12873 12819
12874var _propTypes2 = _interopRequireDefault(_propTypes); 12820var _propTypes2 = _interopRequireDefault(_propTypes);
12875 12821
@@ -12885,7 +12831,7 @@ var _addEventListener = __webpack_require__(75);
12885 12831
12886var _addEventListener2 = _interopRequireDefault(_addEventListener); 12832var _addEventListener2 = _interopRequireDefault(_addEventListener);
12887 12833
12888var _isWindow = __webpack_require__(159); 12834var _isWindow = __webpack_require__(157);
12889 12835
12890var _isWindow2 = _interopRequireDefault(_isWindow); 12836var _isWindow2 = _interopRequireDefault(_isWindow);
12891 12837
@@ -13041,7 +12987,7 @@ exports["default"] = Align;
13041module.exports = exports['default']; 12987module.exports = exports['default'];
13042 12988
13043/***/ }), 12989/***/ }),
13044/* 158 */ 12990/* 156 */
13045/***/ (function(module, exports, __webpack_require__) { 12991/***/ (function(module, exports, __webpack_require__) {
13046 12992
13047"use strict"; 12993"use strict";
@@ -13051,7 +12997,7 @@ Object.defineProperty(exports, "__esModule", {
13051 value: true 12997 value: true
13052}); 12998});
13053 12999
13054var _Align = __webpack_require__(157); 13000var _Align = __webpack_require__(155);
13055 13001
13056var _Align2 = _interopRequireDefault(_Align); 13002var _Align2 = _interopRequireDefault(_Align);
13057 13003
@@ -13062,7 +13008,7 @@ exports["default"] = _Align2["default"]; // export this package's api
13062module.exports = exports['default']; 13008module.exports = exports['default'];
13063 13009
13064/***/ }), 13010/***/ }),
13065/* 159 */ 13011/* 157 */
13066/***/ (function(module, exports, __webpack_require__) { 13012/***/ (function(module, exports, __webpack_require__) {
13067 13013
13068"use strict"; 13014"use strict";
@@ -13080,7 +13026,7 @@ function isWindow(obj) {
13080module.exports = exports['default']; 13026module.exports = exports['default'];
13081 13027
13082/***/ }), 13028/***/ }),
13083/* 160 */ 13029/* 158 */
13084/***/ (function(module, __webpack_exports__, __webpack_require__) { 13030/***/ (function(module, __webpack_exports__, __webpack_require__) {
13085 13031
13086"use strict"; 13032"use strict";
@@ -13088,20 +13034,20 @@ module.exports = exports['default'];
13088/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); 13034/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
13089/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(35); 13035/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(35);
13090/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__); 13036/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__);
13091/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(3); 13037/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(2);
13092/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__); 13038/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);
13093/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__ = __webpack_require__(4); 13039/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__ = __webpack_require__(3);
13094/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__); 13040/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__);
13095/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(6); 13041/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(5);
13096/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__); 13042/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);
13097/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(5); 13043/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(4);
13098/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__); 13044/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);
13099/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0); 13045/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
13100/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__); 13046/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
13101/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(2); 13047/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(6);
13102/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__); 13048/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);
13103/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__ = __webpack_require__(162); 13049/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__ = __webpack_require__(160);
13104/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__AnimateChild__ = __webpack_require__(161); 13050/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__AnimateChild__ = __webpack_require__(159);
13105/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__util__ = __webpack_require__(72); 13051/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__util__ = __webpack_require__(72);
13106 13052
13107 13053
@@ -13455,25 +13401,25 @@ var _initialiseProps = function _initialiseProps() {
13455/* harmony default export */ __webpack_exports__["a"] = (Animate); 13401/* harmony default export */ __webpack_exports__["a"] = (Animate);
13456 13402
13457/***/ }), 13403/***/ }),
13458/* 161 */ 13404/* 159 */
13459/***/ (function(module, __webpack_exports__, __webpack_require__) { 13405/***/ (function(module, __webpack_exports__, __webpack_require__) {
13460 13406
13461"use strict"; 13407"use strict";
13462/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__ = __webpack_require__(30); 13408/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__ = __webpack_require__(30);
13463/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__); 13409/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__);
13464/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(3); 13410/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(2);
13465/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__); 13411/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
13466/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(4); 13412/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(3);
13467/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__); 13413/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__);
13468/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(6); 13414/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(5);
13469/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__); 13415/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);
13470/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(5); 13416/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(4);
13471/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__); 13417/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);
13472/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); 13418/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0);
13473/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); 13419/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);
13474/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_dom__ = __webpack_require__(1); 13420/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_dom__ = __webpack_require__(1);
13475/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_dom__); 13421/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_dom__);
13476/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(2); 13422/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(6);
13477/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__); 13423/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);
13478/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_css_animation__ = __webpack_require__(138); 13424/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_css_animation__ = __webpack_require__(138);
13479/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__util__ = __webpack_require__(72); 13425/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__util__ = __webpack_require__(72);
@@ -13591,7 +13537,7 @@ AnimateChild.propTypes = {
13591/* harmony default export */ __webpack_exports__["a"] = (AnimateChild); 13537/* harmony default export */ __webpack_exports__["a"] = (AnimateChild);
13592 13538
13593/***/ }), 13539/***/ }),
13594/* 162 */ 13540/* 160 */
13595/***/ (function(module, __webpack_exports__, __webpack_require__) { 13541/***/ (function(module, __webpack_exports__, __webpack_require__) {
13596 13542
13597"use strict"; 13543"use strict";
@@ -13706,30 +13652,30 @@ function mergeChildren(prev, next) {
13706} 13652}
13707 13653
13708/***/ }), 13654/***/ }),
13709/* 163 */ 13655/* 161 */
13710/***/ (function(module, __webpack_exports__, __webpack_require__) { 13656/***/ (function(module, __webpack_exports__, __webpack_require__) {
13711 13657
13712"use strict"; 13658"use strict";
13713/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(24); 13659/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(24);
13714/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); 13660/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
13715/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(3); 13661/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(2);
13716/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__); 13662/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
13717/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(4); 13663/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(3);
13718/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__); 13664/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__);
13719/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(6); 13665/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(5);
13720/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__); 13666/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);
13721/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(5); 13667/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(4);
13722/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__); 13668/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);
13723/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); 13669/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0);
13724/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); 13670/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);
13725/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(2); 13671/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(6);
13726/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); 13672/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
13727/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_dom__ = __webpack_require__(1); 13673/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_dom__ = __webpack_require__(1);
13728/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_dom__); 13674/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_dom__);
13729/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_rc_align__ = __webpack_require__(158); 13675/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_rc_align__ = __webpack_require__(156);
13730/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_rc_align___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_rc_align__); 13676/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_rc_align___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_rc_align__);
13731/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_rc_animate__ = __webpack_require__(160); 13677/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_rc_animate__ = __webpack_require__(158);
13732/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__PopupInner__ = __webpack_require__(164); 13678/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__PopupInner__ = __webpack_require__(162);
13733/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__LazyRenderBox__ = __webpack_require__(73); 13679/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__LazyRenderBox__ = __webpack_require__(73);
13734/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils__ = __webpack_require__(74); 13680/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils__ = __webpack_require__(74);
13735 13681
@@ -13975,21 +13921,21 @@ var _initialiseProps = function _initialiseProps() {
13975/* harmony default export */ __webpack_exports__["a"] = (Popup); 13921/* harmony default export */ __webpack_exports__["a"] = (Popup);
13976 13922
13977/***/ }), 13923/***/ }),
13978/* 164 */ 13924/* 162 */
13979/***/ (function(module, __webpack_exports__, __webpack_require__) { 13925/***/ (function(module, __webpack_exports__, __webpack_require__) {
13980 13926
13981"use strict"; 13927"use strict";
13982/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(3); 13928/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(2);
13983/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__); 13929/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
13984/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(4); 13930/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(3);
13985/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__); 13931/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__);
13986/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(6); 13932/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(5);
13987/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__); 13933/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
13988/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(5); 13934/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(4);
13989/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__); 13935/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
13990/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); 13936/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
13991/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); 13937/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
13992/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(2); 13938/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(6);
13993/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); 13939/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__);
13994/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__LazyRenderBox__ = __webpack_require__(73); 13940/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__LazyRenderBox__ = __webpack_require__(73);
13995 13941
@@ -14050,7 +13996,7 @@ PopupInner.propTypes = {
14050/* harmony default export */ __webpack_exports__["a"] = (PopupInner); 13996/* harmony default export */ __webpack_exports__["a"] = (PopupInner);
14051 13997
14052/***/ }), 13998/***/ }),
14053/* 165 */ 13999/* 163 */
14054/***/ (function(module, __webpack_exports__, __webpack_require__) { 14000/***/ (function(module, __webpack_exports__, __webpack_require__) {
14055 14001
14056"use strict"; 14002"use strict";
@@ -14058,20 +14004,20 @@ PopupInner.propTypes = {
14058/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); 14004/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
14059/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); 14005/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
14060/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); 14006/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
14061/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(2); 14007/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(6);
14062/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__); 14008/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
14063/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_dom__ = __webpack_require__(1); 14009/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_dom__ = __webpack_require__(1);
14064/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_dom__); 14010/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_dom__);
14065/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_create_react_class__ = __webpack_require__(136); 14011/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_create_react_class__ = __webpack_require__(136);
14066/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_create_react_class__); 14012/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_create_react_class__);
14067/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_rc_util_es_Dom_contains__ = __webpack_require__(166); 14013/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_rc_util_es_Dom_contains__ = __webpack_require__(164);
14068/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_rc_util_lib_Dom_addEventListener__ = __webpack_require__(75); 14014/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_rc_util_lib_Dom_addEventListener__ = __webpack_require__(75);
14069/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_rc_util_lib_Dom_addEventListener___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_rc_util_lib_Dom_addEventListener__); 14015/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_rc_util_lib_Dom_addEventListener___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_rc_util_lib_Dom_addEventListener__);
14070/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Popup__ = __webpack_require__(163); 14016/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Popup__ = __webpack_require__(161);
14071/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils__ = __webpack_require__(74); 14017/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils__ = __webpack_require__(74);
14072/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_rc_util_lib_getContainerRenderMixin__ = __webpack_require__(168); 14018/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_rc_util_lib_getContainerRenderMixin__ = __webpack_require__(166);
14073/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_rc_util_lib_getContainerRenderMixin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_rc_util_lib_getContainerRenderMixin__); 14019/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_rc_util_lib_getContainerRenderMixin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_rc_util_lib_getContainerRenderMixin__);
14074/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_rc_util_lib_Portal__ = __webpack_require__(167); 14020/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_rc_util_lib_Portal__ = __webpack_require__(165);
14075/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_rc_util_lib_Portal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_rc_util_lib_Portal__); 14021/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_rc_util_lib_Portal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_rc_util_lib_Portal__);
14076 14022
14077 14023
@@ -14185,6 +14131,9 @@ var Trigger = __WEBPACK_IMPORTED_MODULE_4_create_react_class___default()({
14185 } else { 14131 } else {
14186 popupVisible = !!props.defaultPopupVisible; 14132 popupVisible = !!props.defaultPopupVisible;
14187 } 14133 }
14134
14135 this.prevPopupVisible = popupVisible;
14136
14188 return { 14137 return {
14189 popupVisible: popupVisible 14138 popupVisible: popupVisible
14190 }; 14139 };
@@ -14222,10 +14171,10 @@ var Trigger = __WEBPACK_IMPORTED_MODULE_4_create_react_class___default()({
14222 }; 14171 };
14223 if (!IS_REACT_16) { 14172 if (!IS_REACT_16) {
14224 this.renderComponent(null, triggerAfterPopupVisibleChange); 14173 this.renderComponent(null, triggerAfterPopupVisibleChange);
14225 } else {
14226 triggerAfterPopupVisibleChange();
14227 } 14174 }
14228 14175
14176 this.prevPopupVisible = prevState.popupVisible;
14177
14229 if (state.popupVisible) { 14178 if (state.popupVisible) {
14230 var currentDocument = void 0; 14179 var currentDocument = void 0;
14231 if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) { 14180 if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {
@@ -14337,6 +14286,11 @@ var Trigger = __WEBPACK_IMPORTED_MODULE_4_create_react_class___default()({
14337 this.close(); 14286 this.close();
14338 } 14287 }
14339 }, 14288 },
14289 handlePortalUpdate: function handlePortalUpdate() {
14290 if (this.prevPopupVisible !== this.state.popupVisible) {
14291 this.props.afterPopupVisibleChange(this.state.popupVisible);
14292 }
14293 },
14340 getPopupDomNode: function getPopupDomNode() { 14294 getPopupDomNode: function getPopupDomNode() {
14341 if (this._component && this._component.getPopupDomNode) { 14295 if (this._component && this._component.getPopupDomNode) {
14342 return this._component.getPopupDomNode(); 14296 return this._component.getPopupDomNode();
@@ -14605,7 +14559,8 @@ var Trigger = __WEBPACK_IMPORTED_MODULE_4_create_react_class___default()({
14605 __WEBPACK_IMPORTED_MODULE_10_rc_util_lib_Portal___default.a, 14559 __WEBPACK_IMPORTED_MODULE_10_rc_util_lib_Portal___default.a,
14606 { 14560 {
14607 key: 'portal', 14561 key: 'portal',
14608 getContainer: this.getContainer 14562 getContainer: this.getContainer,
14563 didUpdate: this.handlePortalUpdate
14609 }, 14564 },
14610 this.getComponent() 14565 this.getComponent()
14611 ); 14566 );
@@ -14618,7 +14573,7 @@ var Trigger = __WEBPACK_IMPORTED_MODULE_4_create_react_class___default()({
14618/* harmony default export */ __webpack_exports__["a"] = (Trigger); 14573/* harmony default export */ __webpack_exports__["a"] = (Trigger);
14619 14574
14620/***/ }), 14575/***/ }),
14621/* 166 */ 14576/* 164 */
14622/***/ (function(module, __webpack_exports__, __webpack_require__) { 14577/***/ (function(module, __webpack_exports__, __webpack_require__) {
14623 14578
14624"use strict"; 14579"use strict";
@@ -14636,7 +14591,7 @@ function contains(root, n) {
14636} 14591}
14637 14592
14638/***/ }), 14593/***/ }),
14639/* 167 */ 14594/* 165 */
14640/***/ (function(module, exports, __webpack_require__) { 14595/***/ (function(module, exports, __webpack_require__) {
14641 14596
14642"use strict"; 14597"use strict";
@@ -14646,19 +14601,19 @@ Object.defineProperty(exports, "__esModule", {
14646 value: true 14601 value: true
14647}); 14602});
14648 14603
14649var _classCallCheck2 = __webpack_require__(3); 14604var _classCallCheck2 = __webpack_require__(2);
14650 14605
14651var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); 14606var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
14652 14607
14653var _createClass2 = __webpack_require__(4); 14608var _createClass2 = __webpack_require__(3);
14654 14609
14655var _createClass3 = _interopRequireDefault(_createClass2); 14610var _createClass3 = _interopRequireDefault(_createClass2);
14656 14611
14657var _possibleConstructorReturn2 = __webpack_require__(6); 14612var _possibleConstructorReturn2 = __webpack_require__(5);
14658 14613
14659var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); 14614var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
14660 14615
14661var _inherits2 = __webpack_require__(5); 14616var _inherits2 = __webpack_require__(4);
14662 14617
14663var _inherits3 = _interopRequireDefault(_inherits2); 14618var _inherits3 = _interopRequireDefault(_inherits2);
14664 14619
@@ -14666,7 +14621,7 @@ var _react = __webpack_require__(0);
14666 14621
14667var _react2 = _interopRequireDefault(_react); 14622var _react2 = _interopRequireDefault(_react);
14668 14623
14669var _propTypes = __webpack_require__(2); 14624var _propTypes = __webpack_require__(6);
14670 14625
14671var _propTypes2 = _interopRequireDefault(_propTypes); 14626var _propTypes2 = _interopRequireDefault(_propTypes);
14672 14627
@@ -14688,6 +14643,15 @@ var Portal = function (_React$Component) {
14688 this.createContainer(); 14643 this.createContainer();
14689 } 14644 }
14690 }, { 14645 }, {
14646 key: 'componentDidUpdate',
14647 value: function componentDidUpdate(prevProps) {
14648 var didUpdate = this.props.didUpdate;
14649
14650 if (didUpdate) {
14651 didUpdate(prevProps);
14652 }
14653 }
14654 }, {
14691 key: 'componentWillUnmount', 14655 key: 'componentWillUnmount',
14692 value: function componentWillUnmount() { 14656 value: function componentWillUnmount() {
14693 this.removeContainer(); 14657 this.removeContainer();
@@ -14719,13 +14683,14 @@ var Portal = function (_React$Component) {
14719 14683
14720Portal.propTypes = { 14684Portal.propTypes = {
14721 getContainer: _propTypes2['default'].func.isRequired, 14685 getContainer: _propTypes2['default'].func.isRequired,
14722 children: _propTypes2['default'].node.isRequired 14686 children: _propTypes2['default'].node.isRequired,
14687 didUpdate: _propTypes2['default'].func
14723}; 14688};
14724exports['default'] = Portal; 14689exports['default'] = Portal;
14725module.exports = exports['default']; 14690module.exports = exports['default'];
14726 14691
14727/***/ }), 14692/***/ }),
14728/* 168 */ 14693/* 166 */
14729/***/ (function(module, exports, __webpack_require__) { 14694/***/ (function(module, exports, __webpack_require__) {
14730 14695
14731"use strict"; 14696"use strict";
@@ -14833,11 +14798,11 @@ function getContainerRenderMixin(config) {
14833module.exports = exports['default']; 14798module.exports = exports['default'];
14834 14799
14835/***/ }), 14800/***/ }),
14836/* 169 */ 14801/* 167 */
14837/***/ (function(module, exports, __webpack_require__) { 14802/***/ (function(module, exports, __webpack_require__) {
14838 14803
14839"use strict"; 14804"use strict";
14840/* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.0.0 14805/* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.1.1
14841 * react-dom.development.js 14806 * react-dom.development.js
14842 * 14807 *
14843 * Copyright (c) 2013-present, Facebook, Inc. 14808 * Copyright (c) 2013-present, Facebook, Inc.
@@ -14849,285 +14814,44 @@ module.exports = exports['default'];
14849 14814
14850 14815
14851if (process.env.NODE_ENV !== "production") { 14816if (process.env.NODE_ENV !== "production") {
14852(function() { 14817 (function() {
14853
14854'use strict'; 14818'use strict';
14855 14819
14856var react = __webpack_require__(0); 14820var React = __webpack_require__(0);
14857var invariant = __webpack_require__(13); 14821var invariant = __webpack_require__(23);
14858var ExecutionEnvironment = __webpack_require__(49); 14822var warning = __webpack_require__(29);
14859var _assign = __webpack_require__(18); 14823var ExecutionEnvironment = __webpack_require__(67);
14860var EventListener = __webpack_require__(67); 14824var _assign = __webpack_require__(17);
14861var require$$0 = __webpack_require__(29); 14825var emptyFunction$1 = __webpack_require__(12);
14862var hyphenateStyleName = __webpack_require__(150); 14826var EventListener = __webpack_require__(66);
14863var emptyFunction = __webpack_require__(12); 14827var getActiveElement = __webpack_require__(70);
14864var camelizeStyleName = __webpack_require__(148);
14865var performanceNow = __webpack_require__(154);
14866var propTypes = __webpack_require__(2);
14867var emptyObject = __webpack_require__(28);
14868var checkPropTypes = __webpack_require__(50);
14869var shallowEqual = __webpack_require__(71); 14828var shallowEqual = __webpack_require__(71);
14870var containsNode = __webpack_require__(68); 14829var containsNode = __webpack_require__(68);
14871var focusNode = __webpack_require__(69); 14830var focusNode = __webpack_require__(69);
14872var getActiveElement = __webpack_require__(70); 14831var emptyObject = __webpack_require__(28);
14873 14832var checkPropTypes = __webpack_require__(49);
14874/** 14833var hyphenateStyleName = __webpack_require__(150);
14875 * Copyright (c) 2013-present, Facebook, Inc. 14834var camelizeStyleName = __webpack_require__(148);
14876 *
14877 * This source code is licensed under the MIT license found in the
14878 * LICENSE file in the root directory of this source tree.
14879 *
14880 * @providesModule reactProdInvariant
14881 *
14882 */
14883
14884/**
14885 * Copyright (c) 2013-present, Facebook, Inc.
14886 *
14887 * This source code is licensed under the MIT license found in the
14888 * LICENSE file in the root directory of this source tree.
14889 *
14890 * @providesModule checkReact
14891 *
14892 */
14893
14894
14895
14896
14897!react ? invariant(false, 'ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.') : void 0;
14898
14899/**
14900 * Copyright (c) 2013-present, Facebook, Inc.
14901 *
14902 * This source code is licensed under the MIT license found in the
14903 * LICENSE file in the root directory of this source tree.
14904 *
14905 * @providesModule DOMNamespaces
14906 */
14907
14908var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
14909var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
14910var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
14911
14912var Namespaces = {
14913 html: HTML_NAMESPACE,
14914 mathml: MATH_NAMESPACE,
14915 svg: SVG_NAMESPACE
14916};
14917
14918// Assumes there is no parent namespace.
14919function getIntrinsicNamespace(type) {
14920 switch (type) {
14921 case 'svg':
14922 return SVG_NAMESPACE;
14923 case 'math':
14924 return MATH_NAMESPACE;
14925 default:
14926 return HTML_NAMESPACE;
14927 }
14928}
14929
14930function getChildNamespace$1(parentNamespace, type) {
14931 if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
14932 // No (or default) parent namespace: potential entry point.
14933 return getIntrinsicNamespace(type);
14934 }
14935 if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
14936 // We're leaving SVG.
14937 return HTML_NAMESPACE;
14938 }
14939 // By default, pass namespace below.
14940 return parentNamespace;
14941}
14942
14943var Namespaces_1 = Namespaces;
14944var getIntrinsicNamespace_1 = getIntrinsicNamespace;
14945var getChildNamespace_1 = getChildNamespace$1;
14946
14947var DOMNamespaces = {
14948 Namespaces: Namespaces_1,
14949 getIntrinsicNamespace: getIntrinsicNamespace_1,
14950 getChildNamespace: getChildNamespace_1
14951};
14952
14953/**
14954 * Injectable ordering of event plugins.
14955 */
14956var eventPluginOrder = null;
14957
14958/**
14959 * Injectable mapping from names to event plugin modules.
14960 */
14961var namesToPlugins = {};
14962
14963/**
14964 * Recomputes the plugin list using the injected plugins and plugin ordering.
14965 *
14966 * @private
14967 */
14968function recomputePluginOrdering() {
14969 if (!eventPluginOrder) {
14970 // Wait until an `eventPluginOrder` is injected.
14971 return;
14972 }
14973 for (var pluginName in namesToPlugins) {
14974 var pluginModule = namesToPlugins[pluginName];
14975 var pluginIndex = eventPluginOrder.indexOf(pluginName);
14976 !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;
14977 if (EventPluginRegistry.plugins[pluginIndex]) {
14978 continue;
14979 }
14980 !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;
14981 EventPluginRegistry.plugins[pluginIndex] = pluginModule;
14982 var publishedEvents = pluginModule.eventTypes;
14983 for (var eventName in publishedEvents) {
14984 !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;
14985 }
14986 }
14987}
14988
14989/**
14990 * Publishes an event so that it can be dispatched by the supplied plugin.
14991 *
14992 * @param {object} dispatchConfig Dispatch configuration for the event.
14993 * @param {object} PluginModule Plugin publishing the event.
14994 * @return {boolean} True if the event was successfully published.
14995 * @private
14996 */
14997function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
14998 !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : void 0;
14999 EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
15000
15001 var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
15002 if (phasedRegistrationNames) {
15003 for (var phaseName in phasedRegistrationNames) {
15004 if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
15005 var phasedRegistrationName = phasedRegistrationNames[phaseName];
15006 publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
15007 }
15008 }
15009 return true;
15010 } else if (dispatchConfig.registrationName) {
15011 publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
15012 return true;
15013 }
15014 return false;
15015}
15016 14835
15017/** 14836/**
15018 * Publishes a registration name that is used to identify dispatched events. 14837 * WARNING: DO NOT manually require this module.
15019 * 14838 * This is a replacement for `invariant(...)` used by the error code system
15020 * @param {string} registrationName Registration name to add. 14839 * and will _only_ be required by the corresponding babel pass.
15021 * @param {object} PluginModule Plugin publishing the event. 14840 * It always throws.
15022 * @private
15023 */ 14841 */
15024function publishRegistrationName(registrationName, pluginModule, eventName) {
15025 !!EventPluginRegistry.registrationNameModules[registrationName] ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : void 0;
15026 EventPluginRegistry.registrationNameModules[registrationName] = pluginModule;
15027 EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
15028
15029 {
15030 var lowerCasedName = registrationName.toLowerCase();
15031 EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
15032 14842
15033 if (registrationName === 'onDoubleClick') { 14843!React ? invariant(false, 'ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.') : void 0;
15034 EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
15035 }
15036 }
15037}
15038
15039/**
15040 * Registers plugins so that they can extract and dispatch events.
15041 *
15042 * @see {EventPluginHub}
15043 */
15044var EventPluginRegistry = {
15045 /**
15046 * Ordered list of injected plugins.
15047 */
15048 plugins: [],
15049
15050 /**
15051 * Mapping from event name to dispatch config
15052 */
15053 eventNameDispatchConfigs: {},
15054
15055 /**
15056 * Mapping from registration name to plugin module
15057 */
15058 registrationNameModules: {},
15059
15060 /**
15061 * Mapping from registration name to event name
15062 */
15063 registrationNameDependencies: {},
15064
15065 /**
15066 * Mapping from lowercase registration names to the properly cased version,
15067 * used to warn in the case of missing event handlers. Available
15068 * only in true.
15069 * @type {Object}
15070 */
15071 possibleRegistrationNames: {},
15072 // Trust the developer to only use possibleRegistrationNames in true
15073
15074 /**
15075 * Injects an ordering of plugins (by plugin name). This allows the ordering
15076 * to be decoupled from injection of the actual plugins so that ordering is
15077 * always deterministic regardless of packaging, on-the-fly injection, etc.
15078 *
15079 * @param {array} InjectedEventPluginOrder
15080 * @internal
15081 * @see {EventPluginHub.injection.injectEventPluginOrder}
15082 */
15083 injectEventPluginOrder: function (injectedEventPluginOrder) {
15084 !!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;
15085 // Clone the ordering so it cannot be dynamically mutated.
15086 eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
15087 recomputePluginOrdering();
15088 },
15089
15090 /**
15091 * Injects plugins to be used by `EventPluginHub`. The plugin names must be
15092 * in the ordering injected by `injectEventPluginOrder`.
15093 *
15094 * Plugins can be injected as part of page initialization or on-the-fly.
15095 *
15096 * @param {object} injectedNamesToPlugins Map from names to plugin modules.
15097 * @internal
15098 * @see {EventPluginHub.injection.injectEventPluginsByName}
15099 */
15100 injectEventPluginsByName: function (injectedNamesToPlugins) {
15101 var isOrderingDirty = false;
15102 for (var pluginName in injectedNamesToPlugins) {
15103 if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
15104 continue;
15105 }
15106 var pluginModule = injectedNamesToPlugins[pluginName];
15107 if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
15108 !!namesToPlugins[pluginName] ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : void 0;
15109 namesToPlugins[pluginName] = pluginModule;
15110 isOrderingDirty = true;
15111 }
15112 }
15113 if (isOrderingDirty) {
15114 recomputePluginOrdering();
15115 }
15116 }
15117};
15118
15119var EventPluginRegistry_1 = EventPluginRegistry;
15120 14844
15121// These attributes should be all lowercase to allow for 14845// These attributes should be all lowercase to allow for
15122// case insensitive checks 14846// case insensitive checks
15123var RESERVED_PROPS = { 14847var RESERVED_PROPS = {
15124 children: true, 14848 children: true,
15125 dangerouslySetInnerHTML: true, 14849 dangerouslySetInnerHTML: true,
15126 autoFocus: true,
15127 defaultValue: true, 14850 defaultValue: true,
15128 defaultChecked: true, 14851 defaultChecked: true,
15129 innerHTML: true, 14852 innerHTML: true,
15130 suppressContentEditableWarning: true, 14853 suppressContentEditableWarning: true,
14854 suppressHydrationWarning: true,
15131 style: true 14855 style: true
15132}; 14856};
15133 14857
@@ -15178,7 +14902,7 @@ var DOMPropertyInjection = {
15178 var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; 14902 var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
15179 14903
15180 for (var propName in Properties) { 14904 for (var propName in Properties) {
15181 !!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; 14905 !!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;
15182 14906
15183 var lowerCased = propName.toLowerCase(); 14907 var lowerCased = propName.toLowerCase();
15184 var propConfig = Properties[propName]; 14908 var propConfig = Properties[propName];
@@ -15196,7 +14920,7 @@ var DOMPropertyInjection = {
15196 hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE), 14920 hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE),
15197 hasStringBooleanValue: checkMask(propConfig, Injection.HAS_STRING_BOOLEAN_VALUE) 14921 hasStringBooleanValue: checkMask(propConfig, Injection.HAS_STRING_BOOLEAN_VALUE)
15198 }; 14922 };
15199 !(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; 14923 !(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;
15200 14924
15201 if (DOMAttributeNames.hasOwnProperty(propName)) { 14925 if (DOMAttributeNames.hasOwnProperty(propName)) {
15202 var attributeName = DOMAttributeNames[propName]; 14926 var attributeName = DOMAttributeNames[propName];
@@ -15216,790 +14940,272 @@ var DOMPropertyInjection = {
15216 // without case-sensitivity. This allows the whitelist to pick up 14940 // without case-sensitivity. This allows the whitelist to pick up
15217 // `allowfullscreen`, which should be written using the property configuration 14941 // `allowfullscreen`, which should be written using the property configuration
15218 // for `allowFullscreen` 14942 // for `allowFullscreen`
15219 DOMProperty.properties[propName] = propertyInfo; 14943 properties[propName] = propertyInfo;
15220 } 14944 }
15221 } 14945 }
15222}; 14946};
15223 14947
15224/* eslint-disable max-len */ 14948/* eslint-disable max-len */
15225var 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'; 14949var 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";
15226/* eslint-enable max-len */ 14950/* eslint-enable max-len */
15227 14951var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
15228/** 14952
15229 * DOMProperty exports lookup objects that can be used like functions: 14953
15230 * 14954var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
15231 * > DOMProperty.isValid['id'] 14955
15232 * true 14956/**
15233 * > DOMProperty.isValid['foobar'] 14957 * Map from property "standard name" to an object with info about how to set
15234 * undefined 14958 * the property in the DOM. Each object contains:
15235 * 14959 *
15236 * Although this may be confusing, it performs better in general. 14960 * attributeName:
15237 * 14961 * Used when rendering markup or with `*Attribute()`.
15238 * @see http://jsperf.com/key-exists 14962 * attributeNamespace
15239 * @see http://jsperf.com/key-missing 14963 * propertyName:
15240 */ 14964 * Used on DOM node instances. (This includes properties that mutate due to
15241var DOMProperty = { 14965 * external factors.)
15242 ID_ATTRIBUTE_NAME: 'data-reactid', 14966 * mutationMethod:
15243 ROOT_ATTRIBUTE_NAME: 'data-reactroot', 14967 * If non-null, used instead of the property or `setAttribute()` after
15244 14968 * initial render.
15245 ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR, 14969 * mustUseProperty:
15246 ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040', 14970 * Whether the property must be accessed and mutated as an object property.
15247 14971 * hasBooleanValue:
15248 /** 14972 * Whether the property should be removed when set to a falsey value.
15249 * Map from property "standard name" to an object with info about how to set 14973 * hasNumericValue:
15250 * the property in the DOM. Each object contains: 14974 * Whether the property must be numeric or parse as a numeric and should be
15251 * 14975 * removed when set to a falsey value.
15252 * attributeName: 14976 * hasPositiveNumericValue:
15253 * Used when rendering markup or with `*Attribute()`. 14977 * Whether the property must be positive numeric or parse as a positive
15254 * attributeNamespace 14978 * numeric and should be removed when set to a falsey value.
15255 * propertyName: 14979 * hasOverloadedBooleanValue:
15256 * Used on DOM node instances. (This includes properties that mutate due to 14980 * Whether the property can be used as a flag as well as with a value.
15257 * external factors.) 14981 * Removed when strictly equal to false; present without a value when
15258 * mutationMethod: 14982 * strictly equal to true; present with a value otherwise.
15259 * If non-null, used instead of the property or `setAttribute()` after 14983 */
15260 * initial render. 14984var properties = {};
15261 * mustUseProperty: 14985
15262 * Whether the property must be accessed and mutated as an object property. 14986/**
15263 * hasBooleanValue: 14987 * Checks whether a property name is a writeable attribute.
15264 * Whether the property should be removed when set to a falsey value. 14988 * @method
15265 * hasNumericValue: 14989 */
15266 * Whether the property must be numeric or parse as a numeric and should be 14990function shouldSetAttribute(name, value) {
15267 * removed when set to a falsey value. 14991 if (isReservedProp(name)) {
15268 * hasPositiveNumericValue: 14992 return false;
15269 * Whether the property must be positive numeric or parse as a positive
15270 * numeric and should be removed when set to a falsey value.
15271 * hasOverloadedBooleanValue:
15272 * Whether the property can be used as a flag as well as with a value.
15273 * Removed when strictly equal to false; present without a value when
15274 * strictly equal to true; present with a value otherwise.
15275 */
15276 properties: {},
15277
15278 /**
15279 * Checks whether a property name is a writeable attribute.
15280 * @method
15281 */
15282 shouldSetAttribute: function (name, value) {
15283 if (DOMProperty.isReservedProp(name)) {
15284 return false;
15285 }
15286 if ((name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
15287 return false;
15288 }
15289 if (value === null) {
15290 return true;
15291 }
15292 switch (typeof value) {
15293 case 'boolean':
15294 return DOMProperty.shouldAttributeAcceptBooleanValue(name);
15295 case 'undefined':
15296 case 'number':
15297 case 'string':
15298 case 'object':
15299 return true;
15300 default:
15301 // function, symbol
15302 return false;
15303 }
15304 },
15305
15306 getPropertyInfo: function (name) {
15307 return DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
15308 },
15309 shouldAttributeAcceptBooleanValue: function (name) {
15310 if (DOMProperty.isReservedProp(name)) {
15311 return true;
15312 }
15313 var propertyInfo = DOMProperty.getPropertyInfo(name);
15314 if (propertyInfo) {
15315 return propertyInfo.hasBooleanValue || propertyInfo.hasStringBooleanValue || propertyInfo.hasOverloadedBooleanValue;
15316 }
15317 var prefix = name.toLowerCase().slice(0, 5);
15318 return prefix === 'data-' || prefix === 'aria-';
15319 },
15320
15321
15322 /**
15323 * Checks to see if a property name is within the list of properties
15324 * reserved for internal React operations. These properties should
15325 * not be set on an HTML element.
15326 *
15327 * @private
15328 * @param {string} name
15329 * @return {boolean} If the name is within reserved props
15330 */
15331 isReservedProp: function (name) {
15332 return RESERVED_PROPS.hasOwnProperty(name);
15333 },
15334
15335
15336 injection: DOMPropertyInjection
15337};
15338
15339var DOMProperty_1 = DOMProperty;
15340
15341/**
15342 * Copyright (c) 2015-present, Facebook, Inc.
15343 *
15344 * This source code is licensed under the MIT license found in the
15345 * LICENSE file in the root directory of this source tree.
15346 *
15347 * @providesModule ReactDOMComponentFlags
15348 */
15349
15350var ReactDOMComponentFlags = {
15351 hasCachedChildNodes: 1 << 0
15352};
15353
15354var ReactDOMComponentFlags_1 = ReactDOMComponentFlags;
15355
15356/**
15357 * Copyright (c) 2013-present, Facebook, Inc.
15358 *
15359 * This source code is licensed under the MIT license found in the
15360 * LICENSE file in the root directory of this source tree.
15361 *
15362 * @providesModule ReactTypeOfWork
15363 *
15364 */
15365
15366var ReactTypeOfWork = {
15367 IndeterminateComponent: 0, // Before we know whether it is functional or class
15368 FunctionalComponent: 1,
15369 ClassComponent: 2,
15370 HostRoot: 3, // Root of a host tree. Could be nested inside another node.
15371 HostPortal: 4, // A subtree. Could be an entry point to a different renderer.
15372 HostComponent: 5,
15373 HostText: 6,
15374 CoroutineComponent: 7,
15375 CoroutineHandlerPhase: 8,
15376 YieldComponent: 9,
15377 Fragment: 10
15378};
15379
15380/**
15381 * Copyright (c) 2013-present, Facebook, Inc.
15382 *
15383 * This source code is licensed under the MIT license found in the
15384 * LICENSE file in the root directory of this source tree.
15385 *
15386 * @providesModule HTMLNodeType
15387 */
15388
15389/**
15390 * HTML nodeType values that represent the type of the node
15391 */
15392
15393var HTMLNodeType = {
15394 ELEMENT_NODE: 1,
15395 TEXT_NODE: 3,
15396 COMMENT_NODE: 8,
15397 DOCUMENT_NODE: 9,
15398 DOCUMENT_FRAGMENT_NODE: 11
15399};
15400
15401var HTMLNodeType_1 = HTMLNodeType;
15402
15403var HostComponent = ReactTypeOfWork.HostComponent;
15404var HostText = ReactTypeOfWork.HostText;
15405
15406var ELEMENT_NODE$1 = HTMLNodeType_1.ELEMENT_NODE;
15407var COMMENT_NODE$1 = HTMLNodeType_1.COMMENT_NODE;
15408
15409
15410
15411var ATTR_NAME = DOMProperty_1.ID_ATTRIBUTE_NAME;
15412var Flags = ReactDOMComponentFlags_1;
15413
15414var randomKey = Math.random().toString(36).slice(2);
15415
15416var internalInstanceKey = '__reactInternalInstance$' + randomKey;
15417
15418var internalEventHandlersKey = '__reactEventHandlers$' + randomKey;
15419
15420/**
15421 * Check if a given node should be cached.
15422 */
15423function shouldPrecacheNode(node, nodeID) {
15424 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 + ' ';
15425}
15426
15427/**
15428 * Drill down (through composites and empty components) until we get a host or
15429 * host text component.
15430 *
15431 * This is pretty polymorphic but unavoidable with the current structure we have
15432 * for `_renderedChildren`.
15433 */
15434function getRenderedHostOrTextFromComponent(component) {
15435 var rendered;
15436 while (rendered = component._renderedComponent) {
15437 component = rendered;
15438 }
15439 return component;
15440}
15441
15442/**
15443 * Populate `_hostNode` on the rendered host/text component with the given
15444 * DOM node. The passed `inst` can be a composite.
15445 */
15446function precacheNode(inst, node) {
15447 var hostInst = getRenderedHostOrTextFromComponent(inst);
15448 hostInst._hostNode = node;
15449 node[internalInstanceKey] = hostInst;
15450}
15451
15452function precacheFiberNode$1(hostInst, node) {
15453 node[internalInstanceKey] = hostInst;
15454}
15455
15456function uncacheNode(inst) {
15457 var node = inst._hostNode;
15458 if (node) {
15459 delete node[internalInstanceKey];
15460 inst._hostNode = null;
15461 }
15462}
15463
15464/**
15465 * Populate `_hostNode` on each child of `inst`, assuming that the children
15466 * match up with the DOM (element) children of `node`.
15467 *
15468 * We cache entire levels at once to avoid an n^2 problem where we access the
15469 * children of a node sequentially and have to walk from the start to our target
15470 * node every time.
15471 *
15472 * Since we update `_renderedChildren` and the actual DOM at (slightly)
15473 * different times, we could race here and see a newer `_renderedChildren` than
15474 * the DOM nodes we see. To avoid this, ReactMultiChild calls
15475 * `prepareToManageChildren` before we change `_renderedChildren`, at which
15476 * time the container's child nodes are always cached (until it unmounts).
15477 */
15478function precacheChildNodes(inst, node) {
15479 if (inst._flags & Flags.hasCachedChildNodes) {
15480 return;
15481 }
15482 var children = inst._renderedChildren;
15483 var childNode = node.firstChild;
15484 outer: for (var name in children) {
15485 if (!children.hasOwnProperty(name)) {
15486 continue;
15487 }
15488 var childInst = children[name];
15489 var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
15490 if (childID === 0) {
15491 // We're currently unmounting this child in ReactMultiChild; skip it.
15492 continue;
15493 }
15494 // We assume the child nodes are in the same order as the child instances.
15495 for (; childNode !== null; childNode = childNode.nextSibling) {
15496 if (shouldPrecacheNode(childNode, childID)) {
15497 precacheNode(childInst, childNode);
15498 continue outer;
15499 }
15500 }
15501 // We reached the end of the DOM children without finding an ID match.
15502 invariant(false, 'Unable to find element with ID %s.', childID);
15503 }
15504 inst._flags |= Flags.hasCachedChildNodes;
15505}
15506
15507/**
15508 * Given a DOM node, return the closest ReactDOMComponent or
15509 * ReactDOMTextComponent instance ancestor.
15510 */
15511function getClosestInstanceFromNode(node) {
15512 if (node[internalInstanceKey]) {
15513 return node[internalInstanceKey];
15514 } 14993 }
15515 14994 if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
15516 // Walk up the tree until we find an ancestor whose instance we have cached. 14995 return false;
15517 var parents = [];
15518 while (!node[internalInstanceKey]) {
15519 parents.push(node);
15520 if (node.parentNode) {
15521 node = node.parentNode;
15522 } else {
15523 // Top of the tree. This node must not be part of a React tree (or is
15524 // unmounted, potentially).
15525 return null;
15526 }
15527 } 14996 }
15528 14997 if (value === null) {
15529 var closest; 14998 return true;
15530 var inst = node[internalInstanceKey];
15531 if (inst.tag === HostComponent || inst.tag === HostText) {
15532 // In Fiber, this will always be the deepest root.
15533 return inst;
15534 } 14999 }
15535 for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) { 15000 switch (typeof value) {
15536 closest = inst; 15001 case 'boolean':
15537 if (parents.length) { 15002 return shouldAttributeAcceptBooleanValue(name);
15538 precacheChildNodes(inst, node); 15003 case 'undefined':
15539 } 15004 case 'number':
15005 case 'string':
15006 case 'object':
15007 return true;
15008 default:
15009 // function, symbol
15010 return false;
15540 } 15011 }
15541
15542 return closest;
15543} 15012}
15544 15013
15545/** 15014function getPropertyInfo(name) {
15546 * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent 15015 return properties.hasOwnProperty(name) ? properties[name] : null;
15547 * instance, or null if the node was not rendered by this React.
15548 */
15549function getInstanceFromNode(node) {
15550 var inst = node[internalInstanceKey];
15551 if (inst) {
15552 if (inst.tag === HostComponent || inst.tag === HostText) {
15553 return inst;
15554 } else if (inst._hostNode === node) {
15555 return inst;
15556 } else {
15557 return null;
15558 }
15559 }
15560 inst = getClosestInstanceFromNode(node);
15561 if (inst != null && inst._hostNode === node) {
15562 return inst;
15563 } else {
15564 return null;
15565 }
15566} 15016}
15567 15017
15568/** 15018function shouldAttributeAcceptBooleanValue(name) {
15569 * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding 15019 if (isReservedProp(name)) {
15570 * DOM node. 15020 return true;
15571 */
15572function getNodeFromInstance(inst) {
15573 if (inst.tag === HostComponent || inst.tag === HostText) {
15574 // In Fiber this, is just the state node right now. We assume it will be
15575 // a host component or host text.
15576 return inst.stateNode;
15577 }
15578
15579 // Without this first invariant, passing a non-DOM-component triggers the next
15580 // invariant for a missing parent, which is super confusing.
15581 !(inst._hostNode !== undefined) ? invariant(false, 'getNodeFromInstance: Invalid argument.') : void 0;
15582
15583 if (inst._hostNode) {
15584 return inst._hostNode;
15585 }
15586
15587 // Walk up the tree until we find an ancestor whose DOM node we have cached.
15588 var parents = [];
15589 while (!inst._hostNode) {
15590 parents.push(inst);
15591 !inst._hostParent ? invariant(false, 'React DOM tree root should always have a node reference.') : void 0;
15592 inst = inst._hostParent;
15593 } 15021 }
15594 15022 var propertyInfo = getPropertyInfo(name);
15595 // Now parents contains each ancestor that does *not* have a cached native 15023 if (propertyInfo) {
15596 // node, and `inst` is the deepest ancestor that does. 15024 return propertyInfo.hasBooleanValue || propertyInfo.hasStringBooleanValue || propertyInfo.hasOverloadedBooleanValue;
15597 for (; parents.length; inst = parents.pop()) {
15598 precacheChildNodes(inst, inst._hostNode);
15599 } 15025 }
15600 15026 var prefix = name.toLowerCase().slice(0, 5);
15601 return inst._hostNode; 15027 return prefix === 'data-' || prefix === 'aria-';
15602}
15603
15604function getFiberCurrentPropsFromNode(node) {
15605 return node[internalEventHandlersKey] || null;
15606} 15028}
15607 15029
15608function updateFiberProps$1(node, props) {
15609 node[internalEventHandlersKey] = props;
15610}
15611
15612var ReactDOMComponentTree = {
15613 getClosestInstanceFromNode: getClosestInstanceFromNode,
15614 getInstanceFromNode: getInstanceFromNode,
15615 getNodeFromInstance: getNodeFromInstance,
15616 precacheChildNodes: precacheChildNodes,
15617 precacheNode: precacheNode,
15618 uncacheNode: uncacheNode,
15619 precacheFiberNode: precacheFiberNode$1,
15620 getFiberCurrentPropsFromNode: getFiberCurrentPropsFromNode,
15621 updateFiberProps: updateFiberProps$1
15622};
15623
15624var ReactDOMComponentTree_1 = ReactDOMComponentTree;
15625
15626/** 15030/**
15627 * Copyright (c) 2013-present, Facebook, Inc. 15031 * Checks to see if a property name is within the list of properties
15628 * 15032 * reserved for internal React operations. These properties should
15629 * This source code is licensed under the MIT license found in the 15033 * not be set on an HTML element.
15630 * LICENSE file in the root directory of this source tree.
15631 * 15034 *
15632 * @providesModule ReactInstanceMap 15035 * @private
15633 */ 15036 * @param {string} name
15634 15037 * @return {boolean} If the name is within reserved props
15635/**
15636 * `ReactInstanceMap` maintains a mapping from a public facing stateful
15637 * instance (key) and the internal representation (value). This allows public
15638 * methods to accept the user facing instance as an argument and map them back
15639 * to internal methods.
15640 */ 15038 */
15039function isReservedProp(name) {
15040 return RESERVED_PROPS.hasOwnProperty(name);
15041}
15641 15042
15642// TODO: Replace this with ES6: var ReactInstanceMap = new Map(); 15043var injection = DOMPropertyInjection;
15643 15044
15644var ReactInstanceMap = { 15045var MUST_USE_PROPERTY = injection.MUST_USE_PROPERTY;
15645 /** 15046var HAS_BOOLEAN_VALUE = injection.HAS_BOOLEAN_VALUE;
15646 * This API should be called `delete` but we'd have to make sure to always 15047var HAS_NUMERIC_VALUE = injection.HAS_NUMERIC_VALUE;
15647 * transform these to strings for IE support. When this transform is fully 15048var HAS_POSITIVE_NUMERIC_VALUE = injection.HAS_POSITIVE_NUMERIC_VALUE;
15648 * supported we can rename it. 15049var HAS_OVERLOADED_BOOLEAN_VALUE = injection.HAS_OVERLOADED_BOOLEAN_VALUE;
15649 */ 15050var HAS_STRING_BOOLEAN_VALUE = injection.HAS_STRING_BOOLEAN_VALUE;
15650 remove: function (key) {
15651 key._reactInternalFiber = undefined;
15652 },
15653 15051
15654 get: function (key) { 15052var HTMLDOMPropertyConfig = {
15655 return key._reactInternalFiber; 15053 // When adding attributes to this list, be sure to also add them to
15054 // the `possibleStandardNames` module to ensure casing and incorrect
15055 // name warnings.
15056 Properties: {
15057 allowFullScreen: HAS_BOOLEAN_VALUE,
15058 // specifies target context for links with `preload` type
15059 async: HAS_BOOLEAN_VALUE,
15060 // Note: there is a special case that prevents it from being written to the DOM
15061 // on the client side because the browsers are inconsistent. Instead we call focus().
15062 autoFocus: HAS_BOOLEAN_VALUE,
15063 autoPlay: HAS_BOOLEAN_VALUE,
15064 capture: HAS_OVERLOADED_BOOLEAN_VALUE,
15065 checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
15066 cols: HAS_POSITIVE_NUMERIC_VALUE,
15067 contentEditable: HAS_STRING_BOOLEAN_VALUE,
15068 controls: HAS_BOOLEAN_VALUE,
15069 'default': HAS_BOOLEAN_VALUE,
15070 defer: HAS_BOOLEAN_VALUE,
15071 disabled: HAS_BOOLEAN_VALUE,
15072 download: HAS_OVERLOADED_BOOLEAN_VALUE,
15073 draggable: HAS_STRING_BOOLEAN_VALUE,
15074 formNoValidate: HAS_BOOLEAN_VALUE,
15075 hidden: HAS_BOOLEAN_VALUE,
15076 loop: HAS_BOOLEAN_VALUE,
15077 // Caution; `option.selected` is not updated if `select.multiple` is
15078 // disabled with `removeAttribute`.
15079 multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
15080 muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
15081 noValidate: HAS_BOOLEAN_VALUE,
15082 open: HAS_BOOLEAN_VALUE,
15083 playsInline: HAS_BOOLEAN_VALUE,
15084 readOnly: HAS_BOOLEAN_VALUE,
15085 required: HAS_BOOLEAN_VALUE,
15086 reversed: HAS_BOOLEAN_VALUE,
15087 rows: HAS_POSITIVE_NUMERIC_VALUE,
15088 rowSpan: HAS_NUMERIC_VALUE,
15089 scoped: HAS_BOOLEAN_VALUE,
15090 seamless: HAS_BOOLEAN_VALUE,
15091 selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
15092 size: HAS_POSITIVE_NUMERIC_VALUE,
15093 start: HAS_NUMERIC_VALUE,
15094 // support for projecting regular DOM Elements via V1 named slots ( shadow dom )
15095 span: HAS_POSITIVE_NUMERIC_VALUE,
15096 spellCheck: HAS_STRING_BOOLEAN_VALUE,
15097 // Style must be explicitly set in the attribute list. React components
15098 // expect a style object
15099 style: 0,
15100 // Keep it in the whitelist because it is case-sensitive for SVG.
15101 tabIndex: 0,
15102 // itemScope is for for Microdata support.
15103 // See http://schema.org/docs/gs.html
15104 itemScope: HAS_BOOLEAN_VALUE,
15105 // These attributes must stay in the white-list because they have
15106 // different attribute names (see DOMAttributeNames below)
15107 acceptCharset: 0,
15108 className: 0,
15109 htmlFor: 0,
15110 httpEquiv: 0,
15111 // Attributes with mutation methods must be specified in the whitelist
15112 // Set the string boolean flag to allow the behavior
15113 value: HAS_STRING_BOOLEAN_VALUE
15656 }, 15114 },
15657 15115 DOMAttributeNames: {
15658 has: function (key) { 15116 acceptCharset: 'accept-charset',
15659 return key._reactInternalFiber !== undefined; 15117 className: 'class',
15118 htmlFor: 'for',
15119 httpEquiv: 'http-equiv'
15660 }, 15120 },
15121 DOMMutationMethods: {
15122 value: function (node, value) {
15123 if (value == null) {
15124 return node.removeAttribute('value');
15125 }
15661 15126
15662 set: function (key, value) { 15127 // Number inputs get special treatment due to some edge cases in
15663 key._reactInternalFiber = value; 15128 // Chrome. Let everything else assign the value attribute as normal.
15129 // https://github.com/facebook/react/issues/7253#issuecomment-236074326
15130 if (node.type !== 'number' || node.hasAttribute('value') === false) {
15131 node.setAttribute('value', '' + value);
15132 } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) {
15133 // Don't assign an attribute if validation reports bad
15134 // input. Chrome will clear the value. Additionally, don't
15135 // operate on inputs that have focus, otherwise Chrome might
15136 // strip off trailing decimal places and cause the user's
15137 // cursor position to jump to the beginning of the input.
15138 //
15139 // In ReactDOMInput, we have an onBlur event that will trigger
15140 // this function again when focus is lost.
15141 node.setAttribute('value', '' + value);
15142 }
15143 }
15664 } 15144 }
15665}; 15145};
15666 15146
15667var ReactInstanceMap_1 = ReactInstanceMap; 15147var HAS_STRING_BOOLEAN_VALUE$1 = injection.HAS_STRING_BOOLEAN_VALUE;
15668 15148
15669var ReactInternals = react.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
15670 15149
15671var ReactGlobalSharedState = { 15150var NS = {
15672 ReactCurrentOwner: ReactInternals.ReactCurrentOwner 15151 xlink: 'http://www.w3.org/1999/xlink',
15152 xml: 'http://www.w3.org/XML/1998/namespace'
15673}; 15153};
15674 15154
15675{
15676 _assign(ReactGlobalSharedState, {
15677 ReactComponentTreeHook: ReactInternals.ReactComponentTreeHook,
15678 ReactDebugCurrentFrame: ReactInternals.ReactDebugCurrentFrame
15679 });
15680}
15681
15682var ReactGlobalSharedState_1 = ReactGlobalSharedState;
15683
15684/** 15155/**
15685 * Copyright (c) 2013-present, Facebook, Inc. 15156 * This is a list of all SVG attributes that need special casing,
15686 * 15157 * namespacing, or boolean value assignment.
15687 * This source code is licensed under the MIT license found in the
15688 * LICENSE file in the root directory of this source tree.
15689 *
15690 * @providesModule getComponentName
15691 *
15692 */
15693
15694function getComponentName(instanceOrFiber) {
15695 if (typeof instanceOrFiber.getName === 'function') {
15696 // Stack reconciler
15697 var instance = instanceOrFiber;
15698 return instance.getName();
15699 }
15700 if (typeof instanceOrFiber.tag === 'number') {
15701 // Fiber reconciler
15702 var fiber = instanceOrFiber;
15703 var type = fiber.type;
15704
15705 if (typeof type === 'string') {
15706 return type;
15707 }
15708 if (typeof type === 'function') {
15709 return type.displayName || type.name;
15710 }
15711 }
15712 return null;
15713}
15714
15715var getComponentName_1 = getComponentName;
15716
15717/**
15718 * Copyright (c) 2013-present, Facebook, Inc.
15719 * 15158 *
15720 * This source code is licensed under the MIT license found in the 15159 * When adding attributes to this list, be sure to also add them to
15721 * LICENSE file in the root directory of this source tree. 15160 * the `possibleStandardNames` module to ensure casing and incorrect
15161 * name warnings.
15722 * 15162 *
15723 * @providesModule ReactTypeOfSideEffect 15163 * SVG Attributes List:
15724 * 15164 * https://www.w3.org/TR/SVG/attindex.html
15165 * SMIL Spec:
15166 * https://www.w3.org/TR/smil
15725 */ 15167 */
15168var ATTRS = ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'x-height', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xmlns:xlink', 'xml:lang', 'xml:space'];
15726 15169
15727var ReactTypeOfSideEffect = { 15170var SVGDOMPropertyConfig = {
15728 // Don't change these two values: 15171 Properties: {
15729 NoEffect: 0, // 0b00000000 15172 autoReverse: HAS_STRING_BOOLEAN_VALUE$1,
15730 PerformedWork: 1, // 0b00000001 15173 externalResourcesRequired: HAS_STRING_BOOLEAN_VALUE$1,
15731 // You can change the rest (and add more). 15174 preserveAlpha: HAS_STRING_BOOLEAN_VALUE$1
15732 Placement: 2, // 0b00000010 15175 },
15733 Update: 4, // 0b00000100 15176 DOMAttributeNames: {
15734 PlacementAndUpdate: 6, // 0b00000110 15177 autoReverse: 'autoReverse',
15735 Deletion: 8, // 0b00001000 15178 externalResourcesRequired: 'externalResourcesRequired',
15736 ContentReset: 16, // 0b00010000 15179 preserveAlpha: 'preserveAlpha'
15737 Callback: 32, // 0b00100000 15180 },
15738 Err: 64, // 0b01000000 15181 DOMAttributeNamespaces: {
15739 Ref: 128 }; 15182 xlinkActuate: NS.xlink,
15740 15183 xlinkArcrole: NS.xlink,
15741var ReactCurrentOwner = ReactGlobalSharedState_1.ReactCurrentOwner; 15184 xlinkHref: NS.xlink,
15742 15185 xlinkRole: NS.xlink,
15743 15186 xlinkShow: NS.xlink,
15744 15187 xlinkTitle: NS.xlink,
15745 15188 xlinkType: NS.xlink,
15746{ 15189 xmlBase: NS.xml,
15747 var warning$1 = require$$0; 15190 xmlLang: NS.xml,
15748} 15191 xmlSpace: NS.xml
15749
15750var ClassComponent = ReactTypeOfWork.ClassComponent;
15751var HostComponent$1 = ReactTypeOfWork.HostComponent;
15752var HostRoot$1 = ReactTypeOfWork.HostRoot;
15753var HostPortal = ReactTypeOfWork.HostPortal;
15754var HostText$1 = ReactTypeOfWork.HostText;
15755
15756var NoEffect = ReactTypeOfSideEffect.NoEffect;
15757var Placement = ReactTypeOfSideEffect.Placement;
15758
15759var MOUNTING = 1;
15760var MOUNTED = 2;
15761var UNMOUNTED = 3;
15762
15763function isFiberMountedImpl(fiber) {
15764 var node = fiber;
15765 if (!fiber.alternate) {
15766 // If there is no alternate, this might be a new tree that isn't inserted
15767 // yet. If it is, then it will have a pending insertion effect on it.
15768 if ((node.effectTag & Placement) !== NoEffect) {
15769 return MOUNTING;
15770 }
15771 while (node['return']) {
15772 node = node['return'];
15773 if ((node.effectTag & Placement) !== NoEffect) {
15774 return MOUNTING;
15775 }
15776 }
15777 } else {
15778 while (node['return']) {
15779 node = node['return'];
15780 }
15781 }
15782 if (node.tag === HostRoot$1) {
15783 // TODO: Check if this was a nested HostRoot when used with
15784 // renderContainerIntoSubtree.
15785 return MOUNTED;
15786 }
15787 // If we didn't hit the root, that means that we're in an disconnected tree
15788 // that has been unmounted.
15789 return UNMOUNTED;
15790}
15791var isFiberMounted = function (fiber) {
15792 return isFiberMountedImpl(fiber) === MOUNTED;
15793};
15794
15795var isMounted = function (component) {
15796 {
15797 var owner = ReactCurrentOwner.current;
15798 if (owner !== null && owner.tag === ClassComponent) {
15799 var ownerFiber = owner;
15800 var instance = ownerFiber.stateNode;
15801 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');
15802 instance._warnedAboutRefsInRender = true;
15803 }
15804 }
15805
15806 var fiber = ReactInstanceMap_1.get(component);
15807 if (!fiber) {
15808 return false;
15809 } 15192 }
15810 return isFiberMountedImpl(fiber) === MOUNTED;
15811}; 15193};
15812 15194
15813function assertIsMounted(fiber) { 15195var CAMELIZE = /[\-\:]([a-z])/g;
15814 !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0; 15196var capitalize = function (token) {
15815} 15197 return token[1].toUpperCase();
15816
15817function findCurrentFiberUsingSlowPath(fiber) {
15818 var alternate = fiber.alternate;
15819 if (!alternate) {
15820 // If there is no alternate, then we only need to check if it is mounted.
15821 var state = isFiberMountedImpl(fiber);
15822 !(state !== UNMOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
15823 if (state === MOUNTING) {
15824 return null;
15825 }
15826 return fiber;
15827 }
15828 // If we have two possible branches, we'll walk backwards up to the root
15829 // to see what path the root points to. On the way we may hit one of the
15830 // special cases and we'll deal with them.
15831 var a = fiber;
15832 var b = alternate;
15833 while (true) {
15834 var parentA = a['return'];
15835 var parentB = parentA ? parentA.alternate : null;
15836 if (!parentA || !parentB) {
15837 // We're at the root.
15838 break;
15839 }
15840
15841 // If both copies of the parent fiber point to the same child, we can
15842 // assume that the child is current. This happens when we bailout on low
15843 // priority: the bailed out fiber's child reuses the current child.
15844 if (parentA.child === parentB.child) {
15845 var child = parentA.child;
15846 while (child) {
15847 if (child === a) {
15848 // We've determined that A is the current branch.
15849 assertIsMounted(parentA);
15850 return fiber;
15851 }
15852 if (child === b) {
15853 // We've determined that B is the current branch.
15854 assertIsMounted(parentA);
15855 return alternate;
15856 }
15857 child = child.sibling;
15858 }
15859 // We should never have an alternate for any mounting node. So the only
15860 // way this could possibly happen is if this was unmounted, if at all.
15861 invariant(false, 'Unable to find node on an unmounted component.');
15862 }
15863
15864 if (a['return'] !== b['return']) {
15865 // The return pointer of A and the return pointer of B point to different
15866 // fibers. We assume that return pointers never criss-cross, so A must
15867 // belong to the child set of A.return, and B must belong to the child
15868 // set of B.return.
15869 a = parentA;
15870 b = parentB;
15871 } else {
15872 // The return pointers point to the same fiber. We'll have to use the
15873 // default, slow path: scan the child sets of each parent alternate to see
15874 // which child belongs to which set.
15875 //
15876 // Search parent A's child set
15877 var didFindChild = false;
15878 var _child = parentA.child;
15879 while (_child) {
15880 if (_child === a) {
15881 didFindChild = true;
15882 a = parentA;
15883 b = parentB;
15884 break;
15885 }
15886 if (_child === b) {
15887 didFindChild = true;
15888 b = parentA;
15889 a = parentB;
15890 break;
15891 }
15892 _child = _child.sibling;
15893 }
15894 if (!didFindChild) {
15895 // Search parent B's child set
15896 _child = parentB.child;
15897 while (_child) {
15898 if (_child === a) {
15899 didFindChild = true;
15900 a = parentB;
15901 b = parentA;
15902 break;
15903 }
15904 if (_child === b) {
15905 didFindChild = true;
15906 b = parentB;
15907 a = parentA;
15908 break;
15909 }
15910 _child = _child.sibling;
15911 }
15912 !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;
15913 }
15914 }
15915
15916 !(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;
15917 }
15918 // If the root is not a host container, we're in a disconnected tree. I.e.
15919 // unmounted.
15920 !(a.tag === HostRoot$1) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
15921 if (a.stateNode.current === a) {
15922 // We've determined that A is the current branch.
15923 return fiber;
15924 }
15925 // Otherwise B has to be current branch.
15926 return alternate;
15927}
15928var findCurrentFiberUsingSlowPath_1 = findCurrentFiberUsingSlowPath;
15929
15930var findCurrentHostFiber = function (parent) {
15931 var currentParent = findCurrentFiberUsingSlowPath(parent);
15932 if (!currentParent) {
15933 return null;
15934 }
15935
15936 // Next we'll drill down this component to find the first HostComponent/Text.
15937 var node = currentParent;
15938 while (true) {
15939 if (node.tag === HostComponent$1 || node.tag === HostText$1) {
15940 return node;
15941 } else if (node.child) {
15942 node.child['return'] = node;
15943 node = node.child;
15944 continue;
15945 }
15946 if (node === currentParent) {
15947 return null;
15948 }
15949 while (!node.sibling) {
15950 if (!node['return'] || node['return'] === currentParent) {
15951 return null;
15952 }
15953 node = node['return'];
15954 }
15955 node.sibling['return'] = node['return'];
15956 node = node.sibling;
15957 }
15958 // Flow needs the return null here, but ESLint complains about it.
15959 // eslint-disable-next-line no-unreachable
15960 return null;
15961}; 15198};
15962 15199
15963var findCurrentHostFiberWithNoPortals = function (parent) { 15200ATTRS.forEach(function (original) {
15964 var currentParent = findCurrentFiberUsingSlowPath(parent); 15201 var reactName = original.replace(CAMELIZE, capitalize);
15965 if (!currentParent) {
15966 return null;
15967 }
15968 15202
15969 // Next we'll drill down this component to find the first HostComponent/Text. 15203 SVGDOMPropertyConfig.Properties[reactName] = 0;
15970 var node = currentParent; 15204 SVGDOMPropertyConfig.DOMAttributeNames[reactName] = original;
15971 while (true) { 15205});
15972 if (node.tag === HostComponent$1 || node.tag === HostText$1) {
15973 return node;
15974 } else if (node.child && node.tag !== HostPortal) {
15975 node.child['return'] = node;
15976 node = node.child;
15977 continue;
15978 }
15979 if (node === currentParent) {
15980 return null;
15981 }
15982 while (!node.sibling) {
15983 if (!node['return'] || node['return'] === currentParent) {
15984 return null;
15985 }
15986 node = node['return'];
15987 }
15988 node.sibling['return'] = node['return'];
15989 node = node.sibling;
15990 }
15991 // Flow needs the return null here, but ESLint complains about it.
15992 // eslint-disable-next-line no-unreachable
15993 return null;
15994};
15995 15206
15996var ReactFiberTreeReflection = { 15207injection.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
15997 isFiberMounted: isFiberMounted, 15208injection.injectDOMPropertyConfig(SVGDOMPropertyConfig);
15998 isMounted: isMounted,
15999 findCurrentFiberUsingSlowPath: findCurrentFiberUsingSlowPath_1,
16000 findCurrentHostFiber: findCurrentHostFiber,
16001 findCurrentHostFiberWithNoPortals: findCurrentHostFiberWithNoPortals
16002};
16003 15209
16004var ReactErrorUtils = { 15210var ReactErrorUtils = {
16005 // Used by Fiber to simulate a try-catch. 15211 // Used by Fiber to simulate a try-catch.
@@ -16207,40 +15413,201 @@ var rethrowCaughtError = function () {
16207 } 15413 }
16208}; 15414};
16209 15415
16210var ReactErrorUtils_1 = ReactErrorUtils; 15416/**
15417 * Injectable ordering of event plugins.
15418 */
15419var eventPluginOrder = null;
16211 15420
16212{ 15421/**
16213 var warning$2 = require$$0; 15422 * Injectable mapping from names to event plugin modules.
15423 */
15424var namesToPlugins = {};
15425
15426/**
15427 * Recomputes the plugin list using the injected plugins and plugin ordering.
15428 *
15429 * @private
15430 */
15431function recomputePluginOrdering() {
15432 if (!eventPluginOrder) {
15433 // Wait until an `eventPluginOrder` is injected.
15434 return;
15435 }
15436 for (var pluginName in namesToPlugins) {
15437 var pluginModule = namesToPlugins[pluginName];
15438 var pluginIndex = eventPluginOrder.indexOf(pluginName);
15439 !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;
15440 if (plugins[pluginIndex]) {
15441 continue;
15442 }
15443 !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;
15444 plugins[pluginIndex] = pluginModule;
15445 var publishedEvents = pluginModule.eventTypes;
15446 for (var eventName in publishedEvents) {
15447 !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;
15448 }
15449 }
15450}
15451
15452/**
15453 * Publishes an event so that it can be dispatched by the supplied plugin.
15454 *
15455 * @param {object} dispatchConfig Dispatch configuration for the event.
15456 * @param {object} PluginModule Plugin publishing the event.
15457 * @return {boolean} True if the event was successfully published.
15458 * @private
15459 */
15460function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
15461 !!eventNameDispatchConfigs.hasOwnProperty(eventName) ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : void 0;
15462 eventNameDispatchConfigs[eventName] = dispatchConfig;
15463
15464 var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
15465 if (phasedRegistrationNames) {
15466 for (var phaseName in phasedRegistrationNames) {
15467 if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
15468 var phasedRegistrationName = phasedRegistrationNames[phaseName];
15469 publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
15470 }
15471 }
15472 return true;
15473 } else if (dispatchConfig.registrationName) {
15474 publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
15475 return true;
15476 }
15477 return false;
16214} 15478}
16215 15479
16216/** 15480/**
16217 * Injected dependencies: 15481 * Publishes a registration name that is used to identify dispatched events.
15482 *
15483 * @param {string} registrationName Registration name to add.
15484 * @param {object} PluginModule Plugin publishing the event.
15485 * @private
15486 */
15487function publishRegistrationName(registrationName, pluginModule, eventName) {
15488 !!registrationNameModules[registrationName] ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : void 0;
15489 registrationNameModules[registrationName] = pluginModule;
15490 registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
15491
15492 {
15493 var lowerCasedName = registrationName.toLowerCase();
15494 possibleRegistrationNames[lowerCasedName] = registrationName;
15495
15496 if (registrationName === 'onDoubleClick') {
15497 possibleRegistrationNames.ondblclick = registrationName;
15498 }
15499 }
15500}
15501
15502/**
15503 * Registers plugins so that they can extract and dispatch events.
15504 *
15505 * @see {EventPluginHub}
15506 */
15507
15508/**
15509 * Ordered list of injected plugins.
15510 */
15511var plugins = [];
15512
15513/**
15514 * Mapping from event name to dispatch config
16218 */ 15515 */
15516var eventNameDispatchConfigs = {};
16219 15517
16220/** 15518/**
16221 * - `ComponentTree`: [required] Module that can convert between React instances 15519 * Mapping from registration name to plugin module
16222 * and actual node references.
16223 */ 15520 */
16224var ComponentTree; 15521var registrationNameModules = {};
16225var injection = { 15522
15523/**
15524 * Mapping from registration name to event name
15525 */
15526var registrationNameDependencies = {};
15527
15528/**
15529 * Mapping from lowercase registration names to the properly cased version,
15530 * used to warn in the case of missing event handlers. Available
15531 * only in true.
15532 * @type {Object}
15533 */
15534var possibleRegistrationNames = {};
15535// Trust the developer to only use possibleRegistrationNames in true
15536
15537/**
15538 * Injects an ordering of plugins (by plugin name). This allows the ordering
15539 * to be decoupled from injection of the actual plugins so that ordering is
15540 * always deterministic regardless of packaging, on-the-fly injection, etc.
15541 *
15542 * @param {array} InjectedEventPluginOrder
15543 * @internal
15544 * @see {EventPluginHub.injection.injectEventPluginOrder}
15545 */
15546function injectEventPluginOrder(injectedEventPluginOrder) {
15547 !!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;
15548 // Clone the ordering so it cannot be dynamically mutated.
15549 eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
15550 recomputePluginOrdering();
15551}
15552
15553/**
15554 * Injects plugins to be used by `EventPluginHub`. The plugin names must be
15555 * in the ordering injected by `injectEventPluginOrder`.
15556 *
15557 * Plugins can be injected as part of page initialization or on-the-fly.
15558 *
15559 * @param {object} injectedNamesToPlugins Map from names to plugin modules.
15560 * @internal
15561 * @see {EventPluginHub.injection.injectEventPluginsByName}
15562 */
15563function injectEventPluginsByName(injectedNamesToPlugins) {
15564 var isOrderingDirty = false;
15565 for (var pluginName in injectedNamesToPlugins) {
15566 if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
15567 continue;
15568 }
15569 var pluginModule = injectedNamesToPlugins[pluginName];
15570 if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
15571 !!namesToPlugins[pluginName] ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : void 0;
15572 namesToPlugins[pluginName] = pluginModule;
15573 isOrderingDirty = true;
15574 }
15575 }
15576 if (isOrderingDirty) {
15577 recomputePluginOrdering();
15578 }
15579}
15580
15581var EventPluginRegistry = Object.freeze({
15582 plugins: plugins,
15583 eventNameDispatchConfigs: eventNameDispatchConfigs,
15584 registrationNameModules: registrationNameModules,
15585 registrationNameDependencies: registrationNameDependencies,
15586 possibleRegistrationNames: possibleRegistrationNames,
15587 injectEventPluginOrder: injectEventPluginOrder,
15588 injectEventPluginsByName: injectEventPluginsByName
15589});
15590
15591var getFiberCurrentPropsFromNode = null;
15592var getInstanceFromNode = null;
15593var getNodeFromInstance = null;
15594
15595var injection$2 = {
16226 injectComponentTree: function (Injected) { 15596 injectComponentTree: function (Injected) {
16227 ComponentTree = Injected; 15597 getFiberCurrentPropsFromNode = Injected.getFiberCurrentPropsFromNode;
15598 getInstanceFromNode = Injected.getInstanceFromNode;
15599 getNodeFromInstance = Injected.getNodeFromInstance;
15600
16228 { 15601 {
16229 warning$2(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.'); 15602 warning(getNodeFromInstance && getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.');
16230 } 15603 }
16231 } 15604 }
16232}; 15605};
16233 15606
16234function isEndish(topLevelType) {
16235 return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel';
16236}
16237 15607
16238function isMoveish(topLevelType) { 15608
16239 return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove'; 15609
16240} 15610
16241function isStartish(topLevelType) {
16242 return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';
16243}
16244 15611
16245var validateEventDispatches; 15612var validateEventDispatches;
16246{ 15613{
@@ -16254,7 +15621,7 @@ var validateEventDispatches;
16254 var instancesIsArr = Array.isArray(dispatchInstances); 15621 var instancesIsArr = Array.isArray(dispatchInstances);
16255 var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0; 15622 var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
16256 15623
16257 warning$2(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.'); 15624 warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.');
16258 }; 15625 };
16259} 15626}
16260 15627
@@ -16267,8 +15634,8 @@ var validateEventDispatches;
16267 */ 15634 */
16268function executeDispatch(event, simulated, listener, inst) { 15635function executeDispatch(event, simulated, listener, inst) {
16269 var type = event.type || 'unknown-event'; 15636 var type = event.type || 'unknown-event';
16270 event.currentTarget = EventPluginUtils.getNodeFromInstance(inst); 15637 event.currentTarget = getNodeFromInstance(inst);
16271 ReactErrorUtils_1.invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event); 15638 ReactErrorUtils.invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
16272 event.currentTarget = null; 15639 event.currentTarget = null;
16273} 15640}
16274 15641
@@ -16297,45 +15664,9 @@ function executeDispatchesInOrder(event, simulated) {
16297} 15664}
16298 15665
16299/** 15666/**
16300 * Standard/simple iteration through an event's collected dispatches, but stops
16301 * at the first dispatch execution returning true, and returns that id.
16302 *
16303 * @return {?string} id of the first dispatch execution who's listener returns
16304 * true, or null if no listener returned true.
16305 */
16306function executeDispatchesInOrderStopAtTrueImpl(event) {
16307 var dispatchListeners = event._dispatchListeners;
16308 var dispatchInstances = event._dispatchInstances;
16309 {
16310 validateEventDispatches(event);
16311 }
16312 if (Array.isArray(dispatchListeners)) {
16313 for (var i = 0; i < dispatchListeners.length; i++) {
16314 if (event.isPropagationStopped()) {
16315 break;
16316 }
16317 // Listeners and Instances are two parallel arrays that are always in sync.
16318 if (dispatchListeners[i](event, dispatchInstances[i])) {
16319 return dispatchInstances[i];
16320 }
16321 }
16322 } else if (dispatchListeners) {
16323 if (dispatchListeners(event, dispatchInstances)) {
16324 return dispatchInstances;
16325 }
16326 }
16327 return null;
16328}
16329
16330/**
16331 * @see executeDispatchesInOrderStopAtTrueImpl 15667 * @see executeDispatchesInOrderStopAtTrueImpl
16332 */ 15668 */
16333function executeDispatchesInOrderStopAtTrue(event) { 15669
16334 var ret = executeDispatchesInOrderStopAtTrueImpl(event);
16335 event._dispatchInstances = null;
16336 event._dispatchListeners = null;
16337 return ret;
16338}
16339 15670
16340/** 15671/**
16341 * Execution of a "direct" dispatch - there must be at most one dispatch 15672 * Execution of a "direct" dispatch - there must be at most one dispatch
@@ -16346,378 +15677,12 @@ function executeDispatchesInOrderStopAtTrue(event) {
16346 * 15677 *
16347 * @return {*} The return value of executing the single dispatch. 15678 * @return {*} The return value of executing the single dispatch.
16348 */ 15679 */
16349function executeDirectDispatch(event) { 15680
16350 {
16351 validateEventDispatches(event);
16352 }
16353 var dispatchListener = event._dispatchListeners;
16354 var dispatchInstance = event._dispatchInstances;
16355 !!Array.isArray(dispatchListener) ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : void 0;
16356 event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
16357 var res = dispatchListener ? dispatchListener(event) : null;
16358 event.currentTarget = null;
16359 event._dispatchListeners = null;
16360 event._dispatchInstances = null;
16361 return res;
16362}
16363 15681
16364/** 15682/**
16365 * @param {SyntheticEvent} event 15683 * @param {SyntheticEvent} event
16366 * @return {boolean} True iff number of dispatches accumulated is greater than 0. 15684 * @return {boolean} True iff number of dispatches accumulated is greater than 0.
16367 */ 15685 */
16368function hasDispatches(event) {
16369 return !!event._dispatchListeners;
16370}
16371
16372/**
16373 * General utilities that are useful in creating custom Event Plugins.
16374 */
16375var EventPluginUtils = {
16376 isEndish: isEndish,
16377 isMoveish: isMoveish,
16378 isStartish: isStartish,
16379
16380 executeDirectDispatch: executeDirectDispatch,
16381 executeDispatchesInOrder: executeDispatchesInOrder,
16382 executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
16383 hasDispatches: hasDispatches,
16384
16385 getFiberCurrentPropsFromNode: function (node) {
16386 return ComponentTree.getFiberCurrentPropsFromNode(node);
16387 },
16388 getInstanceFromNode: function (node) {
16389 return ComponentTree.getInstanceFromNode(node);
16390 },
16391 getNodeFromInstance: function (node) {
16392 return ComponentTree.getNodeFromInstance(node);
16393 },
16394
16395 injection: injection
16396};
16397
16398var EventPluginUtils_1 = EventPluginUtils;
16399
16400// Use to restore controlled state after a change event has fired.
16401
16402var fiberHostComponent = null;
16403
16404var ReactControlledComponentInjection = {
16405 injectFiberControlledHostComponent: function (hostComponentImpl) {
16406 // The fiber implementation doesn't use dynamic dispatch so we need to
16407 // inject the implementation.
16408 fiberHostComponent = hostComponentImpl;
16409 }
16410};
16411
16412var restoreTarget = null;
16413var restoreQueue = null;
16414
16415function restoreStateOfTarget(target) {
16416 // We perform this translation at the end of the event loop so that we
16417 // always receive the correct fiber here
16418 var internalInstance = EventPluginUtils_1.getInstanceFromNode(target);
16419 if (!internalInstance) {
16420 // Unmounted
16421 return;
16422 }
16423 if (typeof internalInstance.tag === 'number') {
16424 !(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;
16425 var props = EventPluginUtils_1.getFiberCurrentPropsFromNode(internalInstance.stateNode);
16426 fiberHostComponent.restoreControlledState(internalInstance.stateNode, internalInstance.type, props);
16427 return;
16428 }
16429 !(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;
16430 // If it is not a Fiber, we can just use dynamic dispatch.
16431 internalInstance.restoreControlledState();
16432}
16433
16434var ReactControlledComponent = {
16435 injection: ReactControlledComponentInjection,
16436
16437 enqueueStateRestore: function (target) {
16438 if (restoreTarget) {
16439 if (restoreQueue) {
16440 restoreQueue.push(target);
16441 } else {
16442 restoreQueue = [target];
16443 }
16444 } else {
16445 restoreTarget = target;
16446 }
16447 },
16448 restoreStateIfNeeded: function () {
16449 if (!restoreTarget) {
16450 return;
16451 }
16452 var target = restoreTarget;
16453 var queuedTargets = restoreQueue;
16454 restoreTarget = null;
16455 restoreQueue = null;
16456
16457 restoreStateOfTarget(target);
16458 if (queuedTargets) {
16459 for (var i = 0; i < queuedTargets.length; i++) {
16460 restoreStateOfTarget(queuedTargets[i]);
16461 }
16462 }
16463 }
16464};
16465
16466var ReactControlledComponent_1 = ReactControlledComponent;
16467
16468// Used as a way to call batchedUpdates when we don't know if we're in a Fiber
16469// or Stack context. Such as when we're dispatching events or if third party
16470// libraries need to call batchedUpdates. Eventually, this API will go away when
16471// everything is batched by default. We'll then have a similar API to opt-out of
16472// scheduled work and instead do synchronous work.
16473
16474// Defaults
16475var stackBatchedUpdates = function (fn, a, b, c, d, e) {
16476 return fn(a, b, c, d, e);
16477};
16478var fiberBatchedUpdates = function (fn, bookkeeping) {
16479 return fn(bookkeeping);
16480};
16481
16482function performFiberBatchedUpdates(fn, bookkeeping) {
16483 // If we have Fiber loaded, we need to wrap this in a batching call so that
16484 // Fiber can apply its default priority for this call.
16485 return fiberBatchedUpdates(fn, bookkeeping);
16486}
16487function batchedUpdates(fn, bookkeeping) {
16488 // We first perform work with the stack batching strategy, by passing our
16489 // indirection to it.
16490 return stackBatchedUpdates(performFiberBatchedUpdates, fn, bookkeeping);
16491}
16492
16493var isNestingBatched = false;
16494function batchedUpdatesWithControlledComponents(fn, bookkeeping) {
16495 if (isNestingBatched) {
16496 // If we are currently inside another batch, we need to wait until it
16497 // fully completes before restoring state. Therefore, we add the target to
16498 // a queue of work.
16499 return batchedUpdates(fn, bookkeeping);
16500 }
16501 isNestingBatched = true;
16502 try {
16503 return batchedUpdates(fn, bookkeeping);
16504 } finally {
16505 // Here we wait until all updates have propagated, which is important
16506 // when using controlled components within layers:
16507 // https://github.com/facebook/react/issues/1698
16508 // Then we restore state of any controlled component.
16509 isNestingBatched = false;
16510 ReactControlledComponent_1.restoreStateIfNeeded();
16511 }
16512}
16513
16514var ReactGenericBatchingInjection = {
16515 injectStackBatchedUpdates: function (_batchedUpdates) {
16516 stackBatchedUpdates = _batchedUpdates;
16517 },
16518 injectFiberBatchedUpdates: function (_batchedUpdates) {
16519 fiberBatchedUpdates = _batchedUpdates;
16520 }
16521};
16522
16523var ReactGenericBatching = {
16524 batchedUpdates: batchedUpdatesWithControlledComponents,
16525 injection: ReactGenericBatchingInjection
16526};
16527
16528var ReactGenericBatching_1 = ReactGenericBatching;
16529
16530var TEXT_NODE$1 = HTMLNodeType_1.TEXT_NODE;
16531
16532/**
16533 * Gets the target node from a native browser event by accounting for
16534 * inconsistencies in browser DOM APIs.
16535 *
16536 * @param {object} nativeEvent Native browser event.
16537 * @return {DOMEventTarget} Target node.
16538 */
16539
16540
16541function getEventTarget(nativeEvent) {
16542 var target = nativeEvent.target || nativeEvent.srcElement || window;
16543
16544 // Normalize SVG <use> element events #4963
16545 if (target.correspondingUseElement) {
16546 target = target.correspondingUseElement;
16547 }
16548
16549 // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
16550 // @see http://www.quirksmode.org/js/events_properties.html
16551 return target.nodeType === TEXT_NODE$1 ? target.parentNode : target;
16552}
16553
16554var getEventTarget_1 = getEventTarget;
16555
16556var HostRoot = ReactTypeOfWork.HostRoot;
16557
16558
16559var CALLBACK_BOOKKEEPING_POOL_SIZE = 10;
16560var callbackBookkeepingPool = [];
16561
16562/**
16563 * Find the deepest React component completely containing the root of the
16564 * passed-in instance (for use when entire React trees are nested within each
16565 * other). If React trees are not nested, returns null.
16566 */
16567function findRootContainerNode(inst) {
16568 // TODO: It may be a good idea to cache this to prevent unnecessary DOM
16569 // traversal, but caching is difficult to do correctly without using a
16570 // mutation observer to listen for all DOM changes.
16571 if (typeof inst.tag === 'number') {
16572 while (inst['return']) {
16573 inst = inst['return'];
16574 }
16575 if (inst.tag !== HostRoot) {
16576 // This can happen if we're in a detached tree.
16577 return null;
16578 }
16579 return inst.stateNode.containerInfo;
16580 } else {
16581 while (inst._hostParent) {
16582 inst = inst._hostParent;
16583 }
16584 var rootNode = ReactDOMComponentTree_1.getNodeFromInstance(inst);
16585 return rootNode.parentNode;
16586 }
16587}
16588
16589// Used to store ancestor hierarchy in top level callback
16590function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst) {
16591 if (callbackBookkeepingPool.length) {
16592 var instance = callbackBookkeepingPool.pop();
16593 instance.topLevelType = topLevelType;
16594 instance.nativeEvent = nativeEvent;
16595 instance.targetInst = targetInst;
16596 return instance;
16597 }
16598 return {
16599 topLevelType: topLevelType,
16600 nativeEvent: nativeEvent,
16601 targetInst: targetInst,
16602 ancestors: []
16603 };
16604}
16605
16606function releaseTopLevelCallbackBookKeeping(instance) {
16607 instance.topLevelType = null;
16608 instance.nativeEvent = null;
16609 instance.targetInst = null;
16610 instance.ancestors.length = 0;
16611 if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) {
16612 callbackBookkeepingPool.push(instance);
16613 }
16614}
16615
16616function handleTopLevelImpl(bookKeeping) {
16617 var targetInst = bookKeeping.targetInst;
16618
16619 // Loop through the hierarchy, in case there's any nested components.
16620 // It's important that we build the array of ancestors before calling any
16621 // event handlers, because event handlers can modify the DOM, leading to
16622 // inconsistencies with ReactMount's node cache. See #1105.
16623 var ancestor = targetInst;
16624 do {
16625 if (!ancestor) {
16626 bookKeeping.ancestors.push(ancestor);
16627 break;
16628 }
16629 var root = findRootContainerNode(ancestor);
16630 if (!root) {
16631 break;
16632 }
16633 bookKeeping.ancestors.push(ancestor);
16634 ancestor = ReactDOMComponentTree_1.getClosestInstanceFromNode(root);
16635 } while (ancestor);
16636
16637 for (var i = 0; i < bookKeeping.ancestors.length; i++) {
16638 targetInst = bookKeeping.ancestors[i];
16639 ReactDOMEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget_1(bookKeeping.nativeEvent));
16640 }
16641}
16642
16643var ReactDOMEventListener = {
16644 _enabled: true,
16645 _handleTopLevel: null,
16646
16647 setHandleTopLevel: function (handleTopLevel) {
16648 ReactDOMEventListener._handleTopLevel = handleTopLevel;
16649 },
16650
16651 setEnabled: function (enabled) {
16652 ReactDOMEventListener._enabled = !!enabled;
16653 },
16654
16655 isEnabled: function () {
16656 return ReactDOMEventListener._enabled;
16657 },
16658
16659 /**
16660 * Traps top-level events by using event bubbling.
16661 *
16662 * @param {string} topLevelType Record from `BrowserEventConstants`.
16663 * @param {string} handlerBaseName Event name (e.g. "click").
16664 * @param {object} element Element on which to attach listener.
16665 * @return {?object} An object with a remove function which will forcefully
16666 * remove the listener.
16667 * @internal
16668 */
16669 trapBubbledEvent: function (topLevelType, handlerBaseName, element) {
16670 if (!element) {
16671 return null;
16672 }
16673 return EventListener.listen(element, handlerBaseName, ReactDOMEventListener.dispatchEvent.bind(null, topLevelType));
16674 },
16675
16676 /**
16677 * Traps a top-level event by using event capturing.
16678 *
16679 * @param {string} topLevelType Record from `BrowserEventConstants`.
16680 * @param {string} handlerBaseName Event name (e.g. "click").
16681 * @param {object} element Element on which to attach listener.
16682 * @return {?object} An object with a remove function which will forcefully
16683 * remove the listener.
16684 * @internal
16685 */
16686 trapCapturedEvent: function (topLevelType, handlerBaseName, element) {
16687 if (!element) {
16688 return null;
16689 }
16690 return EventListener.capture(element, handlerBaseName, ReactDOMEventListener.dispatchEvent.bind(null, topLevelType));
16691 },
16692
16693 dispatchEvent: function (topLevelType, nativeEvent) {
16694 if (!ReactDOMEventListener._enabled) {
16695 return;
16696 }
16697
16698 var nativeEventTarget = getEventTarget_1(nativeEvent);
16699 var targetInst = ReactDOMComponentTree_1.getClosestInstanceFromNode(nativeEventTarget);
16700 if (targetInst !== null && typeof targetInst.tag === 'number' && !ReactFiberTreeReflection.isFiberMounted(targetInst)) {
16701 // If we get an event (ex: img onload) before committing that
16702 // component's mount, ignore it for now (that is, treat it as if it was an
16703 // event on a non-React tree). We might also consider queueing events and
16704 // dispatching them after the mount.
16705 targetInst = null;
16706 }
16707
16708 var bookKeeping = getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst);
16709
16710 try {
16711 // Event queue being processed in the same cycle allows
16712 // `preventDefault`.
16713 ReactGenericBatching_1.batchedUpdates(handleTopLevelImpl, bookKeeping);
16714 } finally {
16715 releaseTopLevelCallbackBookKeeping(bookKeeping);
16716 }
16717 }
16718};
16719
16720var ReactDOMEventListener_1 = ReactDOMEventListener;
16721 15686
16722/** 15687/**
16723 * Accumulates items that must not be null or undefined into the first one. This 15688 * Accumulates items that must not be null or undefined into the first one. This
@@ -16758,18 +15723,6 @@ function accumulateInto(current, next) {
16758 return [current, next]; 15723 return [current, next];
16759} 15724}
16760 15725
16761var accumulateInto_1 = accumulateInto;
16762
16763/**
16764 * Copyright (c) 2013-present, Facebook, Inc.
16765 *
16766 * This source code is licensed under the MIT license found in the
16767 * LICENSE file in the root directory of this source tree.
16768 *
16769 * @providesModule forEachAccumulated
16770 *
16771 */
16772
16773/** 15726/**
16774 * @param {array} arr an "accumulation" of items which is either an Array or 15727 * @param {array} arr an "accumulation" of items which is either an Array or
16775 * a single item. Useful when paired with the `accumulate` module. This is a 15728 * a single item. Useful when paired with the `accumulate` module. This is a
@@ -16779,7 +15732,6 @@ var accumulateInto_1 = accumulateInto;
16779 * @param {function} cb Callback invoked with each element or a collection. 15732 * @param {function} cb Callback invoked with each element or a collection.
16780 * @param {?} [scope] Scope used as `this` in a callback. 15733 * @param {?} [scope] Scope used as `this` in a callback.
16781 */ 15734 */
16782
16783function forEachAccumulated(arr, cb, scope) { 15735function forEachAccumulated(arr, cb, scope) {
16784 if (Array.isArray(arr)) { 15736 if (Array.isArray(arr)) {
16785 arr.forEach(cb, scope); 15737 arr.forEach(cb, scope);
@@ -16788,8 +15740,6 @@ function forEachAccumulated(arr, cb, scope) {
16788 } 15740 }
16789} 15741}
16790 15742
16791var forEachAccumulated_1 = forEachAccumulated;
16792
16793/** 15743/**
16794 * Internal queue of events that have accumulated their dispatches and are 15744 * Internal queue of events that have accumulated their dispatches and are
16795 * waiting to have their dispatches executed. 15745 * waiting to have their dispatches executed.
@@ -16805,7 +15755,7 @@ var eventQueue = null;
16805 */ 15755 */
16806var executeDispatchesAndRelease = function (event, simulated) { 15756var executeDispatchesAndRelease = function (event, simulated) {
16807 if (event) { 15757 if (event) {
16808 EventPluginUtils_1.executeDispatchesInOrder(event, simulated); 15758 executeDispatchesInOrder(event, simulated);
16809 15759
16810 if (!event.isPersistent()) { 15760 if (!event.isPersistent()) {
16811 event.constructor.release(event); 15761 event.constructor.release(event);
@@ -16863,2486 +15813,1444 @@ function shouldPreventMouseEvent(name, type, props) {
16863 * 15813 *
16864 * @public 15814 * @public
16865 */ 15815 */
16866var EventPluginHub = {
16867 /**
16868 * Methods for injecting dependencies.
16869 */
16870 injection: {
16871 /**
16872 * @param {array} InjectedEventPluginOrder
16873 * @public
16874 */
16875 injectEventPluginOrder: EventPluginRegistry_1.injectEventPluginOrder,
16876
16877 /**
16878 * @param {object} injectedNamesToPlugins Map from names to plugin modules.
16879 */
16880 injectEventPluginsByName: EventPluginRegistry_1.injectEventPluginsByName
16881 },
16882
16883 /**
16884 * @param {object} inst The instance, which is the source of events.
16885 * @param {string} registrationName Name of listener (e.g. `onClick`).
16886 * @return {?function} The stored callback.
16887 */
16888 getListener: function (inst, registrationName) {
16889 var listener;
16890
16891 // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
16892 // live here; needs to be moved to a better place soon
16893 if (typeof inst.tag === 'number') {
16894 var stateNode = inst.stateNode;
16895 if (!stateNode) {
16896 // Work in progress (ex: onload events in incremental mode).
16897 return null;
16898 }
16899 var props = EventPluginUtils_1.getFiberCurrentPropsFromNode(stateNode);
16900 if (!props) {
16901 // Work in progress.
16902 return null;
16903 }
16904 listener = props[registrationName];
16905 if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
16906 return null;
16907 }
16908 } else {
16909 var currentElement = inst._currentElement;
16910 if (typeof currentElement === 'string' || typeof currentElement === 'number') {
16911 // Text node, let it bubble through.
16912 return null;
16913 }
16914 if (!inst._rootNodeID) {
16915 // If the instance is already unmounted, we have no listeners.
16916 return null;
16917 }
16918 var _props = currentElement.props;
16919 listener = _props[registrationName];
16920 if (shouldPreventMouseEvent(registrationName, currentElement.type, _props)) {
16921 return null;
16922 }
16923 }
16924
16925 !(!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;
16926 return listener;
16927 },
16928 15816
15817/**
15818 * Methods for injecting dependencies.
15819 */
15820var injection$1 = {
16929 /** 15821 /**
16930 * Allows registered plugins an opportunity to extract events from top-level 15822 * @param {array} InjectedEventPluginOrder
16931 * native browser events. 15823 * @public
16932 *
16933 * @return {*} An accumulation of synthetic events.
16934 * @internal
16935 */ 15824 */
16936 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { 15825 injectEventPluginOrder: injectEventPluginOrder,
16937 var events;
16938 var plugins = EventPluginRegistry_1.plugins;
16939 for (var i = 0; i < plugins.length; i++) {
16940 // Not every plugin in the ordering may be loaded at runtime.
16941 var possiblePlugin = plugins[i];
16942 if (possiblePlugin) {
16943 var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
16944 if (extractedEvents) {
16945 events = accumulateInto_1(events, extractedEvents);
16946 }
16947 }
16948 }
16949 return events;
16950 },
16951 15826
16952 /** 15827 /**
16953 * Enqueues a synthetic event that should be dispatched when 15828 * @param {object} injectedNamesToPlugins Map from names to plugin modules.
16954 * `processEventQueue` is invoked.
16955 *
16956 * @param {*} events An accumulation of synthetic events.
16957 * @internal
16958 */
16959 enqueueEvents: function (events) {
16960 if (events) {
16961 eventQueue = accumulateInto_1(eventQueue, events);
16962 }
16963 },
16964
16965 /**
16966 * Dispatches all synthetic events on the event queue.
16967 *
16968 * @internal
16969 */ 15829 */
16970 processEventQueue: function (simulated) { 15830 injectEventPluginsByName: injectEventPluginsByName
16971 // Set `eventQueue` to null before processing it so that we can tell if more
16972 // events get enqueued while processing.
16973 var processingEventQueue = eventQueue;
16974 eventQueue = null;
16975 if (simulated) {
16976 forEachAccumulated_1(processingEventQueue, executeDispatchesAndReleaseSimulated);
16977 } else {
16978 forEachAccumulated_1(processingEventQueue, executeDispatchesAndReleaseTopLevel);
16979 }
16980 !!eventQueue ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : void 0;
16981 // This would be a good time to rethrow if any of the event handlers threw.
16982 ReactErrorUtils_1.rethrowCaughtError();
16983 }
16984}; 15831};
16985 15832
16986var EventPluginHub_1 = EventPluginHub; 15833/**
15834 * @param {object} inst The instance, which is the source of events.
15835 * @param {string} registrationName Name of listener (e.g. `onClick`).
15836 * @return {?function} The stored callback.
15837 */
15838function getListener(inst, registrationName) {
15839 var listener;
16987 15840
16988function runEventQueueInBatch(events) { 15841 // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
16989 EventPluginHub_1.enqueueEvents(events); 15842 // live here; needs to be moved to a better place soon
16990 EventPluginHub_1.processEventQueue(false); 15843 var stateNode = inst.stateNode;
15844 if (!stateNode) {
15845 // Work in progress (ex: onload events in incremental mode).
15846 return null;
15847 }
15848 var props = getFiberCurrentPropsFromNode(stateNode);
15849 if (!props) {
15850 // Work in progress.
15851 return null;
15852 }
15853 listener = props[registrationName];
15854 if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
15855 return null;
15856 }
15857 !(!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;
15858 return listener;
16991} 15859}
16992 15860
16993var ReactEventEmitterMixin = { 15861/**
16994 /** 15862 * Allows registered plugins an opportunity to extract events from top-level
16995 * Streams a fired top-level event to `EventPluginHub` where plugins have the 15863 * native browser events.
16996 * opportunity to create `ReactEvent`s to be dispatched. 15864 *
16997 */ 15865 * @return {*} An accumulation of synthetic events.
16998 handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { 15866 * @internal
16999 var events = EventPluginHub_1.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); 15867 */
17000 runEventQueueInBatch(events); 15868function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
15869 var events;
15870 for (var i = 0; i < plugins.length; i++) {
15871 // Not every plugin in the ordering may be loaded at runtime.
15872 var possiblePlugin = plugins[i];
15873 if (possiblePlugin) {
15874 var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
15875 if (extractedEvents) {
15876 events = accumulateInto(events, extractedEvents);
15877 }
15878 }
17001 } 15879 }
17002}; 15880 return events;
17003
17004var ReactEventEmitterMixin_1 = ReactEventEmitterMixin;
17005
17006var useHasFeature;
17007if (ExecutionEnvironment.canUseDOM) {
17008 useHasFeature = document.implementation && document.implementation.hasFeature &&
17009 // always returns true in newer browsers as per the standard.
17010 // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
17011 document.implementation.hasFeature('', '') !== true;
17012} 15881}
17013 15882
17014/** 15883/**
17015 * Checks if an event is supported in the current execution environment. 15884 * Enqueues a synthetic event that should be dispatched when
15885 * `processEventQueue` is invoked.
17016 * 15886 *
17017 * NOTE: This will not work correctly for non-generic events such as `change`, 15887 * @param {*} events An accumulation of synthetic events.
17018 * `reset`, `load`, `error`, and `select`. 15888 * @internal
17019 * 15889 */
17020 * Borrows from Modernizr. 15890function enqueueEvents(events) {
15891 if (events) {
15892 eventQueue = accumulateInto(eventQueue, events);
15893 }
15894}
15895
15896/**
15897 * Dispatches all synthetic events on the event queue.
17021 * 15898 *
17022 * @param {string} eventNameSuffix Event name, e.g. "click".
17023 * @param {?boolean} capture Check if the capture phase is supported.
17024 * @return {boolean} True if the event is supported.
17025 * @internal 15899 * @internal
17026 * @license Modernizr 3.0.0pre (Custom Build) | MIT
17027 */ 15900 */
17028function isEventSupported(eventNameSuffix, capture) { 15901function processEventQueue(simulated) {
17029 if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) { 15902 // Set `eventQueue` to null before processing it so that we can tell if more
17030 return false; 15903 // events get enqueued while processing.
15904 var processingEventQueue = eventQueue;
15905 eventQueue = null;
15906 if (simulated) {
15907 forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
15908 } else {
15909 forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
17031 } 15910 }
15911 !!eventQueue ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : void 0;
15912 // This would be a good time to rethrow if any of the event handlers threw.
15913 ReactErrorUtils.rethrowCaughtError();
15914}
17032 15915
17033 var eventName = 'on' + eventNameSuffix; 15916var EventPluginHub = Object.freeze({
17034 var isSupported = eventName in document; 15917 injection: injection$1,
15918 getListener: getListener,
15919 extractEvents: extractEvents,
15920 enqueueEvents: enqueueEvents,
15921 processEventQueue: processEventQueue
15922});
17035 15923
17036 if (!isSupported) { 15924var IndeterminateComponent = 0; // Before we know whether it is functional or class
17037 var element = document.createElement('div'); 15925var FunctionalComponent = 1;
17038 element.setAttribute(eventName, 'return;'); 15926var ClassComponent = 2;
17039 isSupported = typeof element[eventName] === 'function'; 15927var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
17040 } 15928var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
15929var HostComponent = 5;
15930var HostText = 6;
15931var CallComponent = 7;
15932var CallHandlerPhase = 8;
15933var ReturnComponent = 9;
15934var Fragment = 10;
17041 15935
17042 if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') { 15936var randomKey = Math.random().toString(36).slice(2);
17043 // This is the only way to test support for the `wheel` event in IE9+. 15937var internalInstanceKey = '__reactInternalInstance$' + randomKey;
17044 isSupported = document.implementation.hasFeature('Events.wheel', '3.0'); 15938var internalEventHandlersKey = '__reactEventHandlers$' + randomKey;
17045 }
17046 15939
17047 return isSupported; 15940function precacheFiberNode$1(hostInst, node) {
15941 node[internalInstanceKey] = hostInst;
17048} 15942}
17049 15943
17050var isEventSupported_1 = isEventSupported;
17051
17052/** 15944/**
17053 * Generate a mapping of standard vendor prefixes using the defined style property and event name. 15945 * Given a DOM node, return the closest ReactDOMComponent or
17054 * 15946 * ReactDOMTextComponent instance ancestor.
17055 * @param {string} styleProp
17056 * @param {string} eventName
17057 * @returns {object}
17058 */ 15947 */
17059function makePrefixMap(styleProp, eventName) { 15948function getClosestInstanceFromNode(node) {
17060 var prefixes = {}; 15949 if (node[internalInstanceKey]) {
15950 return node[internalInstanceKey];
15951 }
17061 15952
17062 prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); 15953 // Walk up the tree until we find an ancestor whose instance we have cached.
17063 prefixes['Webkit' + styleProp] = 'webkit' + eventName; 15954 var parents = [];
17064 prefixes['Moz' + styleProp] = 'moz' + eventName; 15955 while (!node[internalInstanceKey]) {
17065 prefixes['ms' + styleProp] = 'MS' + eventName; 15956 parents.push(node);
17066 prefixes['O' + styleProp] = 'o' + eventName.toLowerCase(); 15957 if (node.parentNode) {
15958 node = node.parentNode;
15959 } else {
15960 // Top of the tree. This node must not be part of a React tree (or is
15961 // unmounted, potentially).
15962 return null;
15963 }
15964 }
17067 15965
17068 return prefixes; 15966 var closest = void 0;
15967 var inst = node[internalInstanceKey];
15968 if (inst.tag === HostComponent || inst.tag === HostText) {
15969 // In Fiber, this will always be the deepest root.
15970 return inst;
15971 }
15972 for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {
15973 closest = inst;
15974 }
15975
15976 return closest;
17069} 15977}
17070 15978
17071/** 15979/**
17072 * A list of event names to a configurable list of vendor prefixes. 15980 * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
15981 * instance, or null if the node was not rendered by this React.
17073 */ 15982 */
17074var vendorPrefixes = { 15983function getInstanceFromNode$1(node) {
17075 animationend: makePrefixMap('Animation', 'AnimationEnd'), 15984 var inst = node[internalInstanceKey];
17076 animationiteration: makePrefixMap('Animation', 'AnimationIteration'), 15985 if (inst) {
17077 animationstart: makePrefixMap('Animation', 'AnimationStart'), 15986 if (inst.tag === HostComponent || inst.tag === HostText) {
17078 transitionend: makePrefixMap('Transition', 'TransitionEnd') 15987 return inst;
17079}; 15988 } else {
15989 return null;
15990 }
15991 }
15992 return null;
15993}
17080 15994
17081/** 15995/**
17082 * Event names that have already been detected and prefixed (if applicable). 15996 * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
15997 * DOM node.
17083 */ 15998 */
17084var prefixedEventNames = {}; 15999function getNodeFromInstance$1(inst) {
16000 if (inst.tag === HostComponent || inst.tag === HostText) {
16001 // In Fiber this, is just the state node right now. We assume it will be
16002 // a host component or host text.
16003 return inst.stateNode;
16004 }
17085 16005
17086/** 16006 // Without this first invariant, passing a non-DOM-component triggers the next
17087 * Element to check for prefixes on. 16007 // invariant for a missing parent, which is super confusing.
17088 */ 16008 invariant(false, 'getNodeFromInstance: Invalid argument.');
17089var style = {}; 16009}
17090 16010
17091/** 16011function getFiberCurrentPropsFromNode$1(node) {
17092 * Bootstrap if a DOM exists. 16012 return node[internalEventHandlersKey] || null;
17093 */ 16013}
17094if (ExecutionEnvironment.canUseDOM) {
17095 style = document.createElement('div').style;
17096 16014
17097 // On some platforms, in particular some releases of Android 4.x, 16015function updateFiberProps$1(node, props) {
17098 // the un-prefixed "animation" and "transition" properties are defined on the 16016 node[internalEventHandlersKey] = props;
17099 // style object but the events that fire will still be prefixed, so we need 16017}
17100 // to check if the un-prefixed events are usable, and if not remove them from the map.
17101 if (!('AnimationEvent' in window)) {
17102 delete vendorPrefixes.animationend.animation;
17103 delete vendorPrefixes.animationiteration.animation;
17104 delete vendorPrefixes.animationstart.animation;
17105 }
17106 16018
17107 // Same as above 16019var ReactDOMComponentTree = Object.freeze({
17108 if (!('TransitionEvent' in window)) { 16020 precacheFiberNode: precacheFiberNode$1,
17109 delete vendorPrefixes.transitionend.transition; 16021 getClosestInstanceFromNode: getClosestInstanceFromNode,
16022 getInstanceFromNode: getInstanceFromNode$1,
16023 getNodeFromInstance: getNodeFromInstance$1,
16024 getFiberCurrentPropsFromNode: getFiberCurrentPropsFromNode$1,
16025 updateFiberProps: updateFiberProps$1
16026});
16027
16028function getParent(inst) {
16029 do {
16030 inst = inst['return'];
16031 // TODO: If this is a HostRoot we might want to bail out.
16032 // That is depending on if we want nested subtrees (layers) to bubble
16033 // events to their parent. We could also go through parentNode on the
16034 // host node but that wouldn't work for React Native and doesn't let us
16035 // do the portal feature.
16036 } while (inst && inst.tag !== HostComponent);
16037 if (inst) {
16038 return inst;
17110 } 16039 }
16040 return null;
17111} 16041}
17112 16042
17113/** 16043/**
17114 * Attempts to determine the correct vendor prefixed event name. 16044 * Return the lowest common ancestor of A and B, or null if they are in
17115 * 16045 * different trees.
17116 * @param {string} eventName
17117 * @returns {string}
17118 */ 16046 */
17119function getVendorPrefixedEventName(eventName) { 16047function getLowestCommonAncestor(instA, instB) {
17120 if (prefixedEventNames[eventName]) { 16048 var depthA = 0;
17121 return prefixedEventNames[eventName]; 16049 for (var tempA = instA; tempA; tempA = getParent(tempA)) {
17122 } else if (!vendorPrefixes[eventName]) { 16050 depthA++;
17123 return eventName; 16051 }
16052 var depthB = 0;
16053 for (var tempB = instB; tempB; tempB = getParent(tempB)) {
16054 depthB++;
17124 } 16055 }
17125 16056
17126 var prefixMap = vendorPrefixes[eventName]; 16057 // If A is deeper, crawl up.
16058 while (depthA - depthB > 0) {
16059 instA = getParent(instA);
16060 depthA--;
16061 }
17127 16062
17128 for (var styleProp in prefixMap) { 16063 // If B is deeper, crawl up.
17129 if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { 16064 while (depthB - depthA > 0) {
17130 return prefixedEventNames[eventName] = prefixMap[styleProp]; 16065 instB = getParent(instB);
17131 } 16066 depthB--;
17132 } 16067 }
17133 16068
17134 return ''; 16069 // Walk in lockstep until we find a match.
16070 var depth = depthA;
16071 while (depth--) {
16072 if (instA === instB || instA === instB.alternate) {
16073 return instA;
16074 }
16075 instA = getParent(instA);
16076 instB = getParent(instB);
16077 }
16078 return null;
17135} 16079}
17136 16080
17137var getVendorPrefixedEventName_1 = getVendorPrefixedEventName;
17138
17139/** 16081/**
17140 * Types of raw signals from the browser caught at the top level. 16082 * Return if A is an ancestor of B.
17141 *
17142 * For events like 'submit' which don't consistently bubble (which we
17143 * trap at a lower node than `document`), binding at `document` would
17144 * cause duplicate events so we don't include them here.
17145 */ 16083 */
17146var topLevelTypes$1 = {
17147 topAbort: 'abort',
17148 topAnimationEnd: getVendorPrefixedEventName_1('animationend') || 'animationend',
17149 topAnimationIteration: getVendorPrefixedEventName_1('animationiteration') || 'animationiteration',
17150 topAnimationStart: getVendorPrefixedEventName_1('animationstart') || 'animationstart',
17151 topBlur: 'blur',
17152 topCancel: 'cancel',
17153 topCanPlay: 'canplay',
17154 topCanPlayThrough: 'canplaythrough',
17155 topChange: 'change',
17156 topClick: 'click',
17157 topClose: 'close',
17158 topCompositionEnd: 'compositionend',
17159 topCompositionStart: 'compositionstart',
17160 topCompositionUpdate: 'compositionupdate',
17161 topContextMenu: 'contextmenu',
17162 topCopy: 'copy',
17163 topCut: 'cut',
17164 topDoubleClick: 'dblclick',
17165 topDrag: 'drag',
17166 topDragEnd: 'dragend',
17167 topDragEnter: 'dragenter',
17168 topDragExit: 'dragexit',
17169 topDragLeave: 'dragleave',
17170 topDragOver: 'dragover',
17171 topDragStart: 'dragstart',
17172 topDrop: 'drop',
17173 topDurationChange: 'durationchange',
17174 topEmptied: 'emptied',
17175 topEncrypted: 'encrypted',
17176 topEnded: 'ended',
17177 topError: 'error',
17178 topFocus: 'focus',
17179 topInput: 'input',
17180 topKeyDown: 'keydown',
17181 topKeyPress: 'keypress',
17182 topKeyUp: 'keyup',
17183 topLoadedData: 'loadeddata',
17184 topLoad: 'load',
17185 topLoadedMetadata: 'loadedmetadata',
17186 topLoadStart: 'loadstart',
17187 topMouseDown: 'mousedown',
17188 topMouseMove: 'mousemove',
17189 topMouseOut: 'mouseout',
17190 topMouseOver: 'mouseover',
17191 topMouseUp: 'mouseup',
17192 topPaste: 'paste',
17193 topPause: 'pause',
17194 topPlay: 'play',
17195 topPlaying: 'playing',
17196 topProgress: 'progress',
17197 topRateChange: 'ratechange',
17198 topScroll: 'scroll',
17199 topSeeked: 'seeked',
17200 topSeeking: 'seeking',
17201 topSelectionChange: 'selectionchange',
17202 topStalled: 'stalled',
17203 topSuspend: 'suspend',
17204 topTextInput: 'textInput',
17205 topTimeUpdate: 'timeupdate',
17206 topToggle: 'toggle',
17207 topTouchCancel: 'touchcancel',
17208 topTouchEnd: 'touchend',
17209 topTouchMove: 'touchmove',
17210 topTouchStart: 'touchstart',
17211 topTransitionEnd: getVendorPrefixedEventName_1('transitionend') || 'transitionend',
17212 topVolumeChange: 'volumechange',
17213 topWaiting: 'waiting',
17214 topWheel: 'wheel'
17215};
17216 16084
17217var BrowserEventConstants = {
17218 topLevelTypes: topLevelTypes$1
17219};
17220
17221var BrowserEventConstants_1 = BrowserEventConstants;
17222
17223var topLevelTypes = BrowserEventConstants_1.topLevelTypes;
17224 16085
17225/** 16086/**
17226 * Summary of `ReactBrowserEventEmitter` event handling: 16087 * Return the parent instance of the passed-in instance.
17227 *
17228 * - Top-level delegation is used to trap most native browser events. This
17229 * may only occur in the main thread and is the responsibility of
17230 * ReactDOMEventListener, which is injected and can therefore support
17231 * pluggable event sources. This is the only work that occurs in the main
17232 * thread.
17233 *
17234 * - We normalize and de-duplicate events to account for browser quirks. This
17235 * may be done in the worker thread.
17236 *
17237 * - Forward these native events (with the associated top-level type used to
17238 * trap it) to `EventPluginHub`, which in turn will ask plugins if they want
17239 * to extract any synthetic events.
17240 *
17241 * - The `EventPluginHub` will then process each event by annotating them with
17242 * "dispatches", a sequence of listeners and IDs that care about that event.
17243 *
17244 * - The `EventPluginHub` then dispatches the events.
17245 *
17246 * Overview of React and the event system:
17247 *
17248 * +------------+ .
17249 * | DOM | .
17250 * +------------+ .
17251 * | .
17252 * v .
17253 * +------------+ .
17254 * | ReactEvent | .
17255 * | Listener | .
17256 * +------------+ . +-----------+
17257 * | . +--------+|SimpleEvent|
17258 * | . | |Plugin |
17259 * +-----|------+ . v +-----------+
17260 * | | | . +--------------+ +------------+
17261 * | +-----------.--->|EventPluginHub| | Event |
17262 * | | . | | +-----------+ | Propagators|
17263 * | ReactEvent | . | | |TapEvent | |------------|
17264 * | Emitter | . | |<---+|Plugin | |other plugin|
17265 * | | . | | +-----------+ | utilities |
17266 * | +-----------.--->| | +------------+
17267 * | | | . +--------------+
17268 * +-----|------+ . ^ +-----------+
17269 * | . | |Enter/Leave|
17270 * + . +-------+|Plugin |
17271 * +-------------+ . +-----------+
17272 * | application | .
17273 * |-------------| .
17274 * | | .
17275 * | | .
17276 * +-------------+ .
17277 * .
17278 * React Core . General Purpose Event Plugin System
17279 */ 16088 */
17280 16089function getParentInstance(inst) {
17281var alreadyListeningTo = {}; 16090 return getParent(inst);
17282var reactTopListenersCounter = 0; 16091}
17283 16092
17284/** 16093/**
17285 * To ensure no conflicts with other potential React instances on the page 16094 * Simulates the traversal of a two-phase, capture/bubble event dispatch.
17286 */ 16095 */
17287var topListenersIDKey = '_reactListenersID' + ('' + Math.random()).slice(2); 16096function traverseTwoPhase(inst, fn, arg) {
17288 16097 var path = [];
17289function getListeningForDocument(mountAt) { 16098 while (inst) {
17290 // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty` 16099 path.push(inst);
17291 // directly. 16100 inst = getParent(inst);
17292 if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) { 16101 }
17293 mountAt[topListenersIDKey] = reactTopListenersCounter++; 16102 var i;
17294 alreadyListeningTo[mountAt[topListenersIDKey]] = {}; 16103 for (i = path.length; i-- > 0;) {
16104 fn(path[i], 'captured', arg);
16105 }
16106 for (i = 0; i < path.length; i++) {
16107 fn(path[i], 'bubbled', arg);
17295 } 16108 }
17296 return alreadyListeningTo[mountAt[topListenersIDKey]];
17297} 16109}
17298 16110
17299var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin_1, { 16111/**
17300 /** 16112 * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
17301 * Sets whether or not any created callbacks should be enabled. 16113 * should would receive a `mouseEnter` or `mouseLeave` event.
17302 * 16114 *
17303 * @param {boolean} enabled True if callbacks should be enabled. 16115 * Does not invoke the callback on the nearest common ancestor because nothing
17304 */ 16116 * "entered" or "left" that element.
17305 setEnabled: function (enabled) { 16117 */
17306 if (ReactDOMEventListener_1) { 16118function traverseEnterLeave(from, to, fn, argFrom, argTo) {
17307 ReactDOMEventListener_1.setEnabled(enabled); 16119 var common = from && to ? getLowestCommonAncestor(from, to) : null;
16120 var pathFrom = [];
16121 while (true) {
16122 if (!from) {
16123 break;
17308 } 16124 }
17309 }, 16125 if (from === common) {
17310 16126 break;
17311 /**
17312 * @return {boolean} True if callbacks are enabled.
17313 */
17314 isEnabled: function () {
17315 return !!(ReactDOMEventListener_1 && ReactDOMEventListener_1.isEnabled());
17316 },
17317
17318 /**
17319 * We listen for bubbled touch events on the document object.
17320 *
17321 * Firefox v8.01 (and possibly others) exhibited strange behavior when
17322 * mounting `onmousemove` events at some node that was not the document
17323 * element. The symptoms were that if your mouse is not moving over something
17324 * contained within that mount point (for example on the background) the
17325 * top-level listeners for `onmousemove` won't be called. However, if you
17326 * register the `mousemove` on the document object, then it will of course
17327 * catch all `mousemove`s. This along with iOS quirks, justifies restricting
17328 * top-level listeners to the document object only, at least for these
17329 * movement types of events and possibly all events.
17330 *
17331 * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
17332 *
17333 * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
17334 * they bubble to document.
17335 *
17336 * @param {string} registrationName Name of listener (e.g. `onClick`).
17337 * @param {object} contentDocumentHandle Document which owns the container
17338 */
17339 listenTo: function (registrationName, contentDocumentHandle) {
17340 var mountAt = contentDocumentHandle;
17341 var isListening = getListeningForDocument(mountAt);
17342 var dependencies = EventPluginRegistry_1.registrationNameDependencies[registrationName];
17343
17344 for (var i = 0; i < dependencies.length; i++) {
17345 var dependency = dependencies[i];
17346 if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
17347 if (dependency === 'topWheel') {
17348 if (isEventSupported_1('wheel')) {
17349 ReactDOMEventListener_1.trapBubbledEvent('topWheel', 'wheel', mountAt);
17350 } else if (isEventSupported_1('mousewheel')) {
17351 ReactDOMEventListener_1.trapBubbledEvent('topWheel', 'mousewheel', mountAt);
17352 } else {
17353 // Firefox needs to capture a different mouse scroll event.
17354 // @see http://www.quirksmode.org/dom/events/tests/scroll.html
17355 ReactDOMEventListener_1.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
17356 }
17357 } else if (dependency === 'topScroll') {
17358 ReactDOMEventListener_1.trapCapturedEvent('topScroll', 'scroll', mountAt);
17359 } else if (dependency === 'topFocus' || dependency === 'topBlur') {
17360 ReactDOMEventListener_1.trapCapturedEvent('topFocus', 'focus', mountAt);
17361 ReactDOMEventListener_1.trapCapturedEvent('topBlur', 'blur', mountAt);
17362
17363 // to make sure blur and focus event listeners are only attached once
17364 isListening.topBlur = true;
17365 isListening.topFocus = true;
17366 } else if (dependency === 'topCancel') {
17367 if (isEventSupported_1('cancel', true)) {
17368 ReactDOMEventListener_1.trapCapturedEvent('topCancel', 'cancel', mountAt);
17369 }
17370 isListening.topCancel = true;
17371 } else if (dependency === 'topClose') {
17372 if (isEventSupported_1('close', true)) {
17373 ReactDOMEventListener_1.trapCapturedEvent('topClose', 'close', mountAt);
17374 }
17375 isListening.topClose = true;
17376 } else if (topLevelTypes.hasOwnProperty(dependency)) {
17377 ReactDOMEventListener_1.trapBubbledEvent(dependency, topLevelTypes[dependency], mountAt);
17378 }
17379
17380 isListening[dependency] = true;
17381 }
17382 } 16127 }
17383 }, 16128 var alternate = from.alternate;
17384 16129 if (alternate !== null && alternate === common) {
17385 isListeningToAllDependencies: function (registrationName, mountAt) { 16130 break;
17386 var isListening = getListeningForDocument(mountAt);
17387 var dependencies = EventPluginRegistry_1.registrationNameDependencies[registrationName];
17388 for (var i = 0; i < dependencies.length; i++) {
17389 var dependency = dependencies[i];
17390 if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
17391 return false;
17392 }
17393 } 16131 }
17394 return true; 16132 pathFrom.push(from);
17395 }, 16133 from = getParent(from);
17396
17397 trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
17398 return ReactDOMEventListener_1.trapBubbledEvent(topLevelType, handlerBaseName, handle);
17399 },
17400
17401 trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
17402 return ReactDOMEventListener_1.trapCapturedEvent(topLevelType, handlerBaseName, handle);
17403 } 16134 }
17404}); 16135 var pathTo = [];
17405 16136 while (true) {
17406var ReactBrowserEventEmitter_1 = ReactBrowserEventEmitter; 16137 if (!to) {
16138 break;
16139 }
16140 if (to === common) {
16141 break;
16142 }
16143 var _alternate = to.alternate;
16144 if (_alternate !== null && _alternate === common) {
16145 break;
16146 }
16147 pathTo.push(to);
16148 to = getParent(to);
16149 }
16150 for (var i = 0; i < pathFrom.length; i++) {
16151 fn(pathFrom[i], 'bubbled', argFrom);
16152 }
16153 for (var _i = pathTo.length; _i-- > 0;) {
16154 fn(pathTo[_i], 'captured', argTo);
16155 }
16156}
17407 16157
17408/** 16158/**
17409 * Copyright (c) 2013-present, Facebook, Inc. 16159 * Some event types have a notion of different registration names for different
17410 * 16160 * "phases" of propagation. This finds listeners by a given phase.
17411 * This source code is licensed under the MIT license found in the
17412 * LICENSE file in the root directory of this source tree.
17413 *
17414 * @providesModule ReactDOMFeatureFlags
17415 */ 16161 */
17416 16162function listenerAtPhase(inst, event, propagationPhase) {
17417var ReactDOMFeatureFlags = { 16163 var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
17418 fiberAsyncScheduling: false, 16164 return getListener(inst, registrationName);
17419 useFiber: true 16165}
17420};
17421
17422var ReactDOMFeatureFlags_1 = ReactDOMFeatureFlags;
17423 16166
17424/** 16167/**
17425 * Copyright (c) 2013-present, Facebook, Inc. 16168 * A small set of propagation patterns, each of which will accept a small amount
17426 * 16169 * of information, and generate a set of "dispatch ready event objects" - which
17427 * This source code is licensed under the MIT license found in the 16170 * are sets of events that have already been annotated with a set of dispatched
17428 * LICENSE file in the root directory of this source tree. 16171 * listener functions/ids. The API is designed this way to discourage these
17429 * 16172 * propagation strategies from actually executing the dispatches, since we
17430 * @providesModule CSSProperty 16173 * always want to collect the entire set of dispatches before executing even a
16174 * single one.
17431 */ 16175 */
17432 16176
17433/** 16177/**
17434 * CSS properties which accept numbers but are not in units of "px". 16178 * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
16179 * here, allows us to not have to bind or create functions for each event.
16180 * Mutating the event's members allows us to not have to create a wrapping
16181 * "dispatch" object that pairs the event with the listener.
17435 */ 16182 */
17436 16183function accumulateDirectionalDispatches(inst, phase, event) {
17437var isUnitlessNumber = { 16184 {
17438 animationIterationCount: true, 16185 warning(inst, 'Dispatching inst must not be null');
17439 borderImageOutset: true, 16186 }
17440 borderImageSlice: true, 16187 var listener = listenerAtPhase(inst, event, phase);
17441 borderImageWidth: true, 16188 if (listener) {
17442 boxFlex: true, 16189 event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
17443 boxFlexGroup: true, 16190 event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
17444 boxOrdinalGroup: true, 16191 }
17445 columnCount: true, 16192}
17446 columns: true,
17447 flex: true,
17448 flexGrow: true,
17449 flexPositive: true,
17450 flexShrink: true,
17451 flexNegative: true,
17452 flexOrder: true,
17453 gridRow: true,
17454 gridRowEnd: true,
17455 gridRowSpan: true,
17456 gridRowStart: true,
17457 gridColumn: true,
17458 gridColumnEnd: true,
17459 gridColumnSpan: true,
17460 gridColumnStart: true,
17461 fontWeight: true,
17462 lineClamp: true,
17463 lineHeight: true,
17464 opacity: true,
17465 order: true,
17466 orphans: true,
17467 tabSize: true,
17468 widows: true,
17469 zIndex: true,
17470 zoom: true,
17471
17472 // SVG-related properties
17473 fillOpacity: true,
17474 floodOpacity: true,
17475 stopOpacity: true,
17476 strokeDasharray: true,
17477 strokeDashoffset: true,
17478 strokeMiterlimit: true,
17479 strokeOpacity: true,
17480 strokeWidth: true
17481};
17482 16193
17483/** 16194/**
17484 * @param {string} prefix vendor-specific prefix, eg: Webkit 16195 * Collect dispatches (must be entirely collected before dispatching - see unit
17485 * @param {string} key style name, eg: transitionDuration 16196 * tests). Lazily allocate the array to conserve memory. We must loop through
17486 * @return {string} style name prefixed with `prefix`, properly camelCased, eg: 16197 * each event and perform the traversal for each one. We cannot perform a
17487 * WebkitTransitionDuration 16198 * single traversal for the entire collection of events because each event may
16199 * have a different target.
17488 */ 16200 */
17489function prefixKey(prefix, key) { 16201function accumulateTwoPhaseDispatchesSingle(event) {
17490 return prefix + key.charAt(0).toUpperCase() + key.substring(1); 16202 if (event && event.dispatchConfig.phasedRegistrationNames) {
16203 traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
16204 }
17491} 16205}
17492 16206
17493/** 16207/**
17494 * Support style names that may come passed in prefixed by adding permutations 16208 * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.
17495 * of vendor prefixes.
17496 */ 16209 */
17497var prefixes = ['Webkit', 'ms', 'Moz', 'O']; 16210function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
16211 if (event && event.dispatchConfig.phasedRegistrationNames) {
16212 var targetInst = event._targetInst;
16213 var parentInst = targetInst ? getParentInstance(targetInst) : null;
16214 traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
16215 }
16216}
17498 16217
17499// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an 16218/**
17500// infinite loop, because it iterates over the newly added props too. 16219 * Accumulates without regard to direction, does not look for phased
17501Object.keys(isUnitlessNumber).forEach(function (prop) { 16220 * registration names. Same as `accumulateDirectDispatchesSingle` but without
17502 prefixes.forEach(function (prefix) { 16221 * requiring that the `dispatchMarker` be the same as the dispatched ID.
17503 isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; 16222 */
17504 }); 16223function accumulateDispatches(inst, ignoredDirection, event) {
17505}); 16224 if (inst && event && event.dispatchConfig.registrationName) {
16225 var registrationName = event.dispatchConfig.registrationName;
16226 var listener = getListener(inst, registrationName);
16227 if (listener) {
16228 event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
16229 event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
16230 }
16231 }
16232}
17506 16233
17507/** 16234/**
17508 * Most style properties can be unset by doing .style[prop] = '' but IE8 16235 * Accumulates dispatches on an `SyntheticEvent`, but only for the
17509 * doesn't like doing that with shorthand properties so for the properties that 16236 * `dispatchMarker`.
17510 * IE8 breaks on, which are listed here, we instead unset each of the 16237 * @param {SyntheticEvent} event
17511 * individual properties. See http://bugs.jquery.com/ticket/12385. 16238 */
17512 * The 4-value 'clock' properties like margin, padding, border-width seem to 16239function accumulateDirectDispatchesSingle(event) {
17513 * behave without any problems. Curiously, list-style works too without any 16240 if (event && event.dispatchConfig.registrationName) {
17514 * special prodding. 16241 accumulateDispatches(event._targetInst, null, event);
17515 */
17516var shorthandPropertyExpansions = {
17517 background: {
17518 backgroundAttachment: true,
17519 backgroundColor: true,
17520 backgroundImage: true,
17521 backgroundPositionX: true,
17522 backgroundPositionY: true,
17523 backgroundRepeat: true
17524 },
17525 backgroundPosition: {
17526 backgroundPositionX: true,
17527 backgroundPositionY: true
17528 },
17529 border: {
17530 borderWidth: true,
17531 borderStyle: true,
17532 borderColor: true
17533 },
17534 borderBottom: {
17535 borderBottomWidth: true,
17536 borderBottomStyle: true,
17537 borderBottomColor: true
17538 },
17539 borderLeft: {
17540 borderLeftWidth: true,
17541 borderLeftStyle: true,
17542 borderLeftColor: true
17543 },
17544 borderRight: {
17545 borderRightWidth: true,
17546 borderRightStyle: true,
17547 borderRightColor: true
17548 },
17549 borderTop: {
17550 borderTopWidth: true,
17551 borderTopStyle: true,
17552 borderTopColor: true
17553 },
17554 font: {
17555 fontStyle: true,
17556 fontVariant: true,
17557 fontWeight: true,
17558 fontSize: true,
17559 lineHeight: true,
17560 fontFamily: true
17561 },
17562 outline: {
17563 outlineWidth: true,
17564 outlineStyle: true,
17565 outlineColor: true
17566 } 16242 }
17567}; 16243}
17568 16244
17569var CSSProperty = { 16245function accumulateTwoPhaseDispatches(events) {
17570 isUnitlessNumber: isUnitlessNumber, 16246 forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
17571 shorthandPropertyExpansions: shorthandPropertyExpansions 16247}
17572}; 16248
16249function accumulateTwoPhaseDispatchesSkipTarget(events) {
16250 forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
16251}
16252
16253function accumulateEnterLeaveDispatches(leave, enter, from, to) {
16254 traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
16255}
17573 16256
17574var CSSProperty_1 = CSSProperty; 16257function accumulateDirectDispatches(events) {
16258 forEachAccumulated(events, accumulateDirectDispatchesSingle);
16259}
17575 16260
17576var isUnitlessNumber$1 = CSSProperty_1.isUnitlessNumber; 16261var EventPropagators = Object.freeze({
16262 accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
16263 accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
16264 accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches,
16265 accumulateDirectDispatches: accumulateDirectDispatches
16266});
16267
16268var contentKey = null;
17577 16269
17578/** 16270/**
17579 * Convert a value into the proper css writable value. The style name `name` 16271 * Gets the key used to access text content on a DOM node.
17580 * should be logical (no hyphens), as specified
17581 * in `CSSProperty.isUnitlessNumber`.
17582 * 16272 *
17583 * @param {string} name CSS property name such as `topMargin`. 16273 * @return {?string} Key used to access text content.
17584 * @param {*} value CSS property value such as `10px`. 16274 * @internal
17585 * @return {string} Normalized style value with dimensions applied.
17586 */ 16275 */
17587function dangerousStyleValue(name, value, isCustomProperty) { 16276function getTextContentAccessor() {
17588 // Note that we've removed escapeTextForBrowser() calls here since the 16277 if (!contentKey && ExecutionEnvironment.canUseDOM) {
17589 // whole string will be escaped when the attribute is injected into 16278 // Prefer textContent to innerText because many browsers support both but
17590 // the markup. If you provide unsafe user data here they can inject 16279 // SVG <text> elements don't support innerText even when <div> does.
17591 // arbitrary CSS which may be problematic (I couldn't repro this): 16280 contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';
17592 // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
17593 // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
17594 // This is not an XSS hole but instead a potential CSS injection issue
17595 // which has lead to a greater discussion about how we're going to
17596 // trust URLs moving forward. See #2115901
17597
17598 var isEmpty = value == null || typeof value === 'boolean' || value === '';
17599 if (isEmpty) {
17600 return '';
17601 }
17602
17603 if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber$1.hasOwnProperty(name) && isUnitlessNumber$1[name])) {
17604 return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
17605 } 16281 }
17606 16282 return contentKey;
17607 return ('' + value).trim();
17608} 16283}
17609 16284
17610var dangerousStyleValue_1 = dangerousStyleValue;
17611
17612/** 16285/**
17613 * Copyright (c) 2016-present, Facebook, Inc. 16286 * This helper object stores information about text content of a target node,
16287 * allowing comparison of content before and after a given event.
16288 *
16289 * Identify the node where selection currently begins, then observe
16290 * both its text content and its current position in the DOM. Since the
16291 * browser may natively replace the target node during composition, we can
16292 * use its position to find its replacement.
17614 * 16293 *
17615 * This source code is licensed under the MIT license found in the
17616 * LICENSE file in the root directory of this source tree.
17617 * 16294 *
17618 *
17619 * @providesModule describeComponentFrame
17620 */ 16295 */
17621 16296var compositionState = {
17622var describeComponentFrame = function (name, source, ownerName) { 16297 _root: null,
17623 return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : ''); 16298 _startText: null,
16299 _fallbackText: null
17624}; 16300};
17625 16301
17626var IndeterminateComponent = ReactTypeOfWork.IndeterminateComponent; 16302function initialize(nativeEventTarget) {
17627var FunctionalComponent = ReactTypeOfWork.FunctionalComponent; 16303 compositionState._root = nativeEventTarget;
17628var ClassComponent$1 = ReactTypeOfWork.ClassComponent; 16304 compositionState._startText = getText();
17629var HostComponent$2 = ReactTypeOfWork.HostComponent; 16305 return true;
17630
17631
17632
17633
17634function describeFiber(fiber) {
17635 switch (fiber.tag) {
17636 case IndeterminateComponent:
17637 case FunctionalComponent:
17638 case ClassComponent$1:
17639 case HostComponent$2:
17640 var owner = fiber._debugOwner;
17641 var source = fiber._debugSource;
17642 var name = getComponentName_1(fiber);
17643 var ownerName = null;
17644 if (owner) {
17645 ownerName = getComponentName_1(owner);
17646 }
17647 return describeComponentFrame(name, source, ownerName);
17648 default:
17649 return '';
17650 }
17651} 16306}
17652 16307
17653// This function can only be called with a work-in-progress fiber and 16308function reset() {
17654// only during begin or complete phase. Do not call it under any other 16309 compositionState._root = null;
17655// circumstances. 16310 compositionState._startText = null;
17656function getStackAddendumByWorkInProgressFiber$1(workInProgress) { 16311 compositionState._fallbackText = null;
17657 var info = '';
17658 var node = workInProgress;
17659 do {
17660 info += describeFiber(node);
17661 // Otherwise this return pointer might point to the wrong tree:
17662 node = node['return'];
17663 } while (node);
17664 return info;
17665} 16312}
17666 16313
17667var ReactFiberComponentTreeHook = { 16314function getData() {
17668 getStackAddendumByWorkInProgressFiber: getStackAddendumByWorkInProgressFiber$1 16315 if (compositionState._fallbackText) {
17669}; 16316 return compositionState._fallbackText;
17670 16317 }
17671var ReactDebugCurrentFrame = ReactGlobalSharedState_1.ReactDebugCurrentFrame;
17672
17673{
17674 var getComponentName$3 = getComponentName_1;
17675 16318
17676 var _require2$2 = ReactFiberComponentTreeHook, 16319 var start;
17677 getStackAddendumByWorkInProgressFiber = _require2$2.getStackAddendumByWorkInProgressFiber; 16320 var startValue = compositionState._startText;
17678} 16321 var startLength = startValue.length;
16322 var end;
16323 var endValue = getText();
16324 var endLength = endValue.length;
17679 16325
17680function getCurrentFiberOwnerName$2() { 16326 for (start = 0; start < startLength; start++) {
17681 { 16327 if (startValue[start] !== endValue[start]) {
17682 var fiber = ReactDebugCurrentFiber.current; 16328 break;
17683 if (fiber === null) {
17684 return null;
17685 }
17686 if (fiber._debugOwner != null) {
17687 return getComponentName$3(fiber._debugOwner);
17688 } 16329 }
17689 } 16330 }
17690 return null;
17691}
17692 16331
17693function getCurrentFiberStackAddendum$1() { 16332 var minEnd = startLength - start;
17694 { 16333 for (end = 1; end <= minEnd; end++) {
17695 var fiber = ReactDebugCurrentFiber.current; 16334 if (startValue[startLength - end] !== endValue[endLength - end]) {
17696 if (fiber === null) { 16335 break;
17697 return null;
17698 } 16336 }
17699 // Safe because if current fiber exists, we are reconciling,
17700 // and it is guaranteed to be the work-in-progress version.
17701 return getStackAddendumByWorkInProgressFiber(fiber);
17702 } 16337 }
17703 return null;
17704}
17705 16338
17706function resetCurrentFiber() { 16339 var sliceTail = end > 1 ? 1 - end : undefined;
17707 ReactDebugCurrentFrame.getCurrentStack = null; 16340 compositionState._fallbackText = endValue.slice(start, sliceTail);
17708 ReactDebugCurrentFiber.current = null; 16341 return compositionState._fallbackText;
17709 ReactDebugCurrentFiber.phase = null;
17710} 16342}
17711 16343
17712function setCurrentFiber(fiber, phase) { 16344function getText() {
17713 ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackAddendum$1; 16345 if ('value' in compositionState._root) {
17714 ReactDebugCurrentFiber.current = fiber; 16346 return compositionState._root.value;
17715 ReactDebugCurrentFiber.phase = phase; 16347 }
16348 return compositionState._root[getTextContentAccessor()];
17716} 16349}
17717 16350
17718var ReactDebugCurrentFiber = { 16351/* eslint valid-typeof: 0 */
17719 current: null,
17720 phase: null,
17721 resetCurrentFiber: resetCurrentFiber,
17722 setCurrentFiber: setCurrentFiber,
17723 getCurrentFiberOwnerName: getCurrentFiberOwnerName$2,
17724 getCurrentFiberStackAddendum: getCurrentFiberStackAddendum$1
17725};
17726
17727var ReactDebugCurrentFiber_1 = ReactDebugCurrentFiber;
17728
17729var warnValidStyle$1 = emptyFunction;
17730
17731{
17732 var camelizeStyleName$1 = camelizeStyleName;
17733 var getComponentName$2 = getComponentName_1;
17734 var warning$4 = require$$0;
17735 16352
17736 var _require$3 = ReactDebugCurrentFiber_1, 16353var didWarnForAddedNewProperty = false;
17737 getCurrentFiberOwnerName$1 = _require$3.getCurrentFiberOwnerName; 16354var isProxySupported = typeof Proxy === 'function';
17738 16355var EVENT_POOL_SIZE = 10;
17739 // 'msTransform' is correct, but the other prefixes should be capitalized
17740
17741
17742 var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
17743 16356
17744 // style values shouldn't contain a semicolon 16357var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];
17745 var badStyleValueWithSemicolonPattern = /;\s*$/;
17746 16358
17747 var warnedStyleNames = {}; 16359/**
17748 var warnedStyleValues = {}; 16360 * @interface Event
17749 var warnedForNaNValue = false; 16361 * @see http://www.w3.org/TR/DOM-Level-3-Events/
17750 var warnedForInfinityValue = false; 16362 */
16363var EventInterface = {
16364 type: null,
16365 target: null,
16366 // currentTarget is set when dispatching; no use in copying it here
16367 currentTarget: emptyFunction$1.thatReturnsNull,
16368 eventPhase: null,
16369 bubbles: null,
16370 cancelable: null,
16371 timeStamp: function (event) {
16372 return event.timeStamp || Date.now();
16373 },
16374 defaultPrevented: null,
16375 isTrusted: null
16376};
17751 16377
17752 var warnHyphenatedStyleName = function (name, owner) { 16378/**
17753 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { 16379 * Synthetic events are dispatched by event plugins, typically in response to a
17754 return; 16380 * top-level event delegation handler.
17755 } 16381 *
16382 * These systems should generally use pooling to reduce the frequency of garbage
16383 * collection. The system should check `isPersistent` to determine whether the
16384 * event should be released into the pool after being dispatched. Users that
16385 * need a persisted event should invoke `persist`.
16386 *
16387 * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
16388 * normalizing browser quirks. Subclasses do not necessarily have to implement a
16389 * DOM interface; custom application-specific events can also subclass this.
16390 *
16391 * @param {object} dispatchConfig Configuration used to dispatch this event.
16392 * @param {*} targetInst Marker identifying the event target.
16393 * @param {object} nativeEvent Native browser event.
16394 * @param {DOMEventTarget} nativeEventTarget Target node.
16395 */
16396function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
16397 {
16398 // these have a getter/setter for warnings
16399 delete this.nativeEvent;
16400 delete this.preventDefault;
16401 delete this.stopPropagation;
16402 }
17756 16403
17757 warnedStyleNames[name] = true; 16404 this.dispatchConfig = dispatchConfig;
17758 warning$4(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName$1(name), checkRenderMessage(owner)); 16405 this._targetInst = targetInst;
17759 }; 16406 this.nativeEvent = nativeEvent;
17760 16407
17761 var warnBadVendoredStyleName = function (name, owner) { 16408 var Interface = this.constructor.Interface;
17762 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { 16409 for (var propName in Interface) {
17763 return; 16410 if (!Interface.hasOwnProperty(propName)) {
16411 continue;
17764 } 16412 }
17765 16413 {
17766 warnedStyleNames[name] = true; 16414 delete this[propName]; // this has a getter/setter for warnings
17767 warning$4(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner));
17768 };
17769
17770 var warnStyleValueWithSemicolon = function (name, value, owner) {
17771 if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
17772 return;
17773 } 16415 }
17774 16416 var normalize = Interface[propName];
17775 warnedStyleValues[value] = true; 16417 if (normalize) {
17776 warning$4(false, "Style property values shouldn't contain a semicolon.%s " + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')); 16418 this[propName] = normalize(nativeEvent);
17777 }; 16419 } else {
17778 16420 if (propName === 'target') {
17779 var warnStyleValueIsNaN = function (name, value, owner) { 16421 this.target = nativeEventTarget;
17780 if (warnedForNaNValue) { 16422 } else {
17781 return; 16423 this[propName] = nativeEvent[propName];
16424 }
17782 } 16425 }
16426 }
17783 16427
17784 warnedForNaNValue = true; 16428 var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
17785 warning$4(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)); 16429 if (defaultPrevented) {
17786 }; 16430 this.isDefaultPrevented = emptyFunction$1.thatReturnsTrue;
16431 } else {
16432 this.isDefaultPrevented = emptyFunction$1.thatReturnsFalse;
16433 }
16434 this.isPropagationStopped = emptyFunction$1.thatReturnsFalse;
16435 return this;
16436}
17787 16437
17788 var warnStyleValueIsInfinity = function (name, value, owner) { 16438_assign(SyntheticEvent.prototype, {
17789 if (warnedForInfinityValue) { 16439 preventDefault: function () {
16440 this.defaultPrevented = true;
16441 var event = this.nativeEvent;
16442 if (!event) {
17790 return; 16443 return;
17791 } 16444 }
17792 16445
17793 warnedForInfinityValue = true; 16446 if (event.preventDefault) {
17794 warning$4(false, '`Infinity` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)); 16447 event.preventDefault();
17795 }; 16448 } else if (typeof event.returnValue !== 'unknown') {
17796 16449 event.returnValue = false;
17797 var checkRenderMessage = function (owner) {
17798 var ownerName;
17799 if (owner != null) {
17800 // Stack passes the owner manually all the way to CSSPropertyOperations.
17801 ownerName = getComponentName$2(owner);
17802 } else {
17803 // Fiber doesn't pass it but uses ReactDebugCurrentFiber to track it.
17804 // It is only enabled in development and tracks host components too.
17805 ownerName = getCurrentFiberOwnerName$1();
17806 // TODO: also report the stack.
17807 }
17808 if (ownerName) {
17809 return '\n\nCheck the render method of `' + ownerName + '`.';
17810 } 16450 }
17811 return ''; 16451 this.isDefaultPrevented = emptyFunction$1.thatReturnsTrue;
17812 }; 16452 },
17813 16453
17814 warnValidStyle$1 = function (name, value, component) { 16454 stopPropagation: function () {
17815 var owner; 16455 var event = this.nativeEvent;
17816 if (component) { 16456 if (!event) {
17817 // TODO: this only works with Stack. Seems like we need to add unit tests? 16457 return;
17818 owner = component._currentElement._owner;
17819 }
17820 if (name.indexOf('-') > -1) {
17821 warnHyphenatedStyleName(name, owner);
17822 } else if (badVendoredStyleNamePattern.test(name)) {
17823 warnBadVendoredStyleName(name, owner);
17824 } else if (badStyleValueWithSemicolonPattern.test(value)) {
17825 warnStyleValueWithSemicolon(name, value, owner);
17826 } 16458 }
17827 16459
17828 if (typeof value === 'number') { 16460 if (event.stopPropagation) {
17829 if (isNaN(value)) { 16461 event.stopPropagation();
17830 warnStyleValueIsNaN(name, value, owner); 16462 } else if (typeof event.cancelBubble !== 'unknown') {
17831 } else if (!isFinite(value)) { 16463 // The ChangeEventPlugin registers a "propertychange" event for
17832 warnStyleValueIsInfinity(name, value, owner); 16464 // IE. This event does not support bubbling or cancelling, and
17833 } 16465 // any references to cancelBubble throw "Member not found". A
16466 // typeof check of "unknown" circumvents this issue (and is also
16467 // IE specific).
16468 event.cancelBubble = true;
17834 } 16469 }
17835 };
17836}
17837
17838var warnValidStyle_1 = warnValidStyle$1;
17839 16470
17840{ 16471 this.isPropagationStopped = emptyFunction$1.thatReturnsTrue;
17841 var hyphenateStyleName$1 = hyphenateStyleName; 16472 },
17842 var warnValidStyle = warnValidStyle_1;
17843}
17844
17845var hasShorthandPropertyBug = false;
17846if (ExecutionEnvironment.canUseDOM) {
17847 var tempStyle = document.createElement('div').style;
17848 try {
17849 // IE8 throws "Invalid argument." if resetting shorthand style properties.
17850 tempStyle.font = '';
17851 } catch (e) {
17852 hasShorthandPropertyBug = true;
17853 }
17854}
17855 16473
17856/**
17857 * Operations for dealing with CSS properties.
17858 */
17859var CSSPropertyOperations = {
17860 /** 16474 /**
17861 * This creates a string that is expected to be equivalent to the style 16475 * We release all dispatched `SyntheticEvent`s after each event loop, adding
17862 * attribute generated by server-side rendering. It by-passes warnings and 16476 * them back into the pool. This allows a way to hold onto a reference that
17863 * security checks so it's not safe to use this value for anything other than 16477 * won't be added back into the pool.
17864 * comparison. It is only used in DEV for SSR validation.
17865 */ 16478 */
17866 createDangerousStringForStyles: function (styles) { 16479 persist: function () {
17867 { 16480 this.isPersistent = emptyFunction$1.thatReturnsTrue;
17868 var serialized = '';
17869 var delimiter = '';
17870 for (var styleName in styles) {
17871 if (!styles.hasOwnProperty(styleName)) {
17872 continue;
17873 }
17874 var styleValue = styles[styleName];
17875 if (styleValue != null) {
17876 var isCustomProperty = styleName.indexOf('--') === 0;
17877 serialized += delimiter + hyphenateStyleName$1(styleName) + ':';
17878 serialized += dangerousStyleValue_1(styleName, styleValue, isCustomProperty);
17879
17880 delimiter = ';';
17881 }
17882 }
17883 return serialized || null;
17884 }
17885 }, 16481 },
17886 16482
17887 /** 16483 /**
17888 * Sets the value for multiple styles on a node. If a value is specified as 16484 * Checks if this event should be released back into the pool.
17889 * '' (empty string), the corresponding style property will be unset.
17890 * 16485 *
17891 * @param {DOMElement} node 16486 * @return {boolean} True if this should not be released, false otherwise.
17892 * @param {object} styles
17893 * @param {ReactDOMComponent} component
17894 */ 16487 */
17895 setValueForStyles: function (node, styles, component) { 16488 isPersistent: emptyFunction$1.thatReturnsFalse,
17896 var style = node.style; 16489
17897 for (var styleName in styles) { 16490 /**
17898 if (!styles.hasOwnProperty(styleName)) { 16491 * `PooledClass` looks for `destructor` on each instance it releases.
17899 continue; 16492 */
17900 } 16493 destructor: function () {
17901 var isCustomProperty = styleName.indexOf('--') === 0; 16494 var Interface = this.constructor.Interface;
16495 for (var propName in Interface) {
17902 { 16496 {
17903 if (!isCustomProperty) { 16497 Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
17904 warnValidStyle(styleName, styles[styleName], component);
17905 }
17906 }
17907 var styleValue = dangerousStyleValue_1(styleName, styles[styleName], isCustomProperty);
17908 if (styleName === 'float') {
17909 styleName = 'cssFloat';
17910 }
17911 if (isCustomProperty) {
17912 style.setProperty(styleName, styleValue);
17913 } else if (styleValue) {
17914 style[styleName] = styleValue;
17915 } else {
17916 var expansion = hasShorthandPropertyBug && CSSProperty_1.shorthandPropertyExpansions[styleName];
17917 if (expansion) {
17918 // Shorthand property that IE8 won't like unsetting, so unset each
17919 // component to placate it
17920 for (var individualStyleName in expansion) {
17921 style[individualStyleName] = '';
17922 }
17923 } else {
17924 style[styleName] = '';
17925 }
17926 } 16498 }
17927 } 16499 }
17928 } 16500 for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
17929}; 16501 this[shouldBeReleasedProperties[i]] = null;
17930
17931var CSSPropertyOperations_1 = CSSPropertyOperations;
17932
17933var ReactInvalidSetStateWarningHook = {};
17934
17935{
17936 var warning$7 = require$$0;
17937 var processingChildContext = false;
17938
17939 var warnInvalidSetState = function () {
17940 warning$7(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()');
17941 };
17942
17943 ReactInvalidSetStateWarningHook = {
17944 onBeginProcessingChildContext: function () {
17945 processingChildContext = true;
17946 },
17947 onEndProcessingChildContext: function () {
17948 processingChildContext = false;
17949 },
17950 onSetState: function () {
17951 warnInvalidSetState();
17952 } 16502 }
17953 }; 16503 {
17954} 16504 Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
16505 Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction$1));
16506 Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction$1));
16507 }
16508 }
16509});
17955 16510
17956var ReactInvalidSetStateWarningHook_1 = ReactInvalidSetStateWarningHook; 16511SyntheticEvent.Interface = EventInterface;
17957 16512
17958/** 16513/**
17959 * Copyright (c) 2016-present, Facebook, Inc. 16514 * Helper to reduce boilerplate when creating subclasses.
17960 *
17961 * This source code is licensed under the MIT license found in the
17962 * LICENSE file in the root directory of this source tree.
17963 * 16515 *
17964 * @providesModule ReactHostOperationHistoryHook 16516 * @param {function} Class
17965 * 16517 * @param {?object} Interface
17966 */ 16518 */
16519SyntheticEvent.augmentClass = function (Class, Interface) {
16520 var Super = this;
17967 16521
17968// Trust the developer to only use this with a true check 16522 var E = function () {};
17969var ReactHostOperationHistoryHook = null; 16523 E.prototype = Super.prototype;
17970 16524 var prototype = new E();
17971{
17972 var history = [];
17973
17974 ReactHostOperationHistoryHook = {
17975 onHostOperation: function (operation) {
17976 history.push(operation);
17977 },
17978 clearHistory: function () {
17979 if (ReactHostOperationHistoryHook._preventClearing) {
17980 // Should only be used for tests.
17981 return;
17982 }
17983
17984 history = [];
17985 },
17986 getHistory: function () {
17987 return history;
17988 }
17989 };
17990}
17991
17992var ReactHostOperationHistoryHook_1 = ReactHostOperationHistoryHook;
17993
17994var ReactComponentTreeHook = ReactGlobalSharedState_1.ReactComponentTreeHook;
17995
17996
17997 16525
17998{ 16526 _assign(prototype, Class.prototype);
17999 var warning$6 = require$$0; 16527 Class.prototype = prototype;
18000} 16528 Class.prototype.constructor = Class;
18001 16529
18002// Trust the developer to only use this with a true check 16530 Class.Interface = _assign({}, Super.Interface, Interface);
18003var ReactDebugTool$1 = null; 16531 Class.augmentClass = Super.augmentClass;
16532 addEventPoolingTo(Class);
16533};
18004 16534
16535/** Proxying after everything set on SyntheticEvent
16536 * to resolve Proxy issue on some WebKit browsers
16537 * in which some Event properties are set to undefined (GH#10010)
16538 */
18005{ 16539{
18006 var hooks = []; 16540 if (isProxySupported) {
18007 var didHookThrowForEvent = {}; 16541 /*eslint-disable no-func-assign */
18008 16542 SyntheticEvent = new Proxy(SyntheticEvent, {
18009 var callHook = function (event, fn, context, arg1, arg2, arg3, arg4, arg5) { 16543 construct: function (target, args) {
18010 try { 16544 return this.apply(target, Object.create(target.prototype), args);
18011 fn.call(context, arg1, arg2, arg3, arg4, arg5); 16545 },
18012 } catch (e) { 16546 apply: function (constructor, that, args) {
18013 warning$6(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack); 16547 return new Proxy(constructor.apply(that, args), {
18014 didHookThrowForEvent[event] = true; 16548 set: function (target, prop, value) {
18015 } 16549 if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
18016 }; 16550 warning(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.');
18017 16551 didWarnForAddedNewProperty = true;
18018 var emitEvent = function (event, arg1, arg2, arg3, arg4, arg5) { 16552 }
18019 for (var i = 0; i < hooks.length; i++) { 16553 target[prop] = value;
18020 var hook = hooks[i]; 16554 return true;
18021 var fn = hook[event]; 16555 }
18022 if (fn) { 16556 });
18023 callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
18024 } 16557 }
18025 } 16558 });
18026 }; 16559 /*eslint-enable no-func-assign */
16560 }
16561}
18027 16562
18028 var isProfiling = false; 16563addEventPoolingTo(SyntheticEvent);
18029 var flushHistory = [];
18030 var lifeCycleTimerStack = [];
18031 var currentFlushNesting = 0;
18032 var currentFlushMeasurements = [];
18033 var currentFlushStartTime = 0;
18034 var currentTimerDebugID = null;
18035 var currentTimerStartTime = 0;
18036 var currentTimerNestedFlushDuration = 0;
18037 var currentTimerType = null;
18038
18039 var lifeCycleTimerHasWarned = false;
18040
18041 var clearHistory = function () {
18042 ReactComponentTreeHook.purgeUnmountedComponents();
18043 ReactHostOperationHistoryHook_1.clearHistory();
18044 };
18045 16564
18046 var getTreeSnapshot = function (registeredIDs) { 16565/**
18047 return registeredIDs.reduce(function (tree, id) { 16566 * Helper to nullify syntheticEvent instance properties when destructing
18048 var ownerID = ReactComponentTreeHook.getOwnerID(id); 16567 *
18049 var parentID = ReactComponentTreeHook.getParentID(id); 16568 * @param {String} propName
18050 tree[id] = { 16569 * @param {?object} getVal
18051 displayName: ReactComponentTreeHook.getDisplayName(id), 16570 * @return {object} defineProperty object
18052 text: ReactComponentTreeHook.getText(id), 16571 */
18053 updateCount: ReactComponentTreeHook.getUpdateCount(id), 16572function getPooledWarningPropertyDefinition(propName, getVal) {
18054 childIDs: ReactComponentTreeHook.getChildIDs(id), 16573 var isFunction = typeof getVal === 'function';
18055 // Text nodes don't have owners but this is close enough. 16574 return {
18056 ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0, 16575 configurable: true,
18057 parentID: parentID 16576 set: set,
18058 }; 16577 get: get
18059 return tree;
18060 }, {});
18061 }; 16578 };
18062 16579
18063 var resetMeasurements = function () { 16580 function set(val) {
18064 var previousStartTime = currentFlushStartTime; 16581 var action = isFunction ? 'setting the method' : 'setting the property';
18065 var previousMeasurements = currentFlushMeasurements; 16582 warn(action, 'This is effectively a no-op');
18066 var previousOperations = ReactHostOperationHistoryHook_1.getHistory(); 16583 return val;
16584 }
18067 16585
18068 if (currentFlushNesting === 0) { 16586 function get() {
18069 currentFlushStartTime = 0; 16587 var action = isFunction ? 'accessing the method' : 'accessing the property';
18070 currentFlushMeasurements = []; 16588 var result = isFunction ? 'This is a no-op function' : 'This is set to null';
18071 clearHistory(); 16589 warn(action, result);
18072 return; 16590 return getVal;
18073 } 16591 }
18074 16592
18075 if (previousMeasurements.length || previousOperations.length) { 16593 function warn(action, result) {
18076 var registeredIDs = ReactComponentTreeHook.getRegisteredIDs(); 16594 var warningCondition = false;
18077 flushHistory.push({ 16595 warning(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result);
18078 duration: performanceNow() - previousStartTime, 16596 }
18079 measurements: previousMeasurements || [], 16597}
18080 operations: previousOperations || [],
18081 treeSnapshot: getTreeSnapshot(registeredIDs)
18082 });
18083 }
18084 16598
18085 clearHistory(); 16599function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
18086 currentFlushStartTime = performanceNow(); 16600 var EventConstructor = this;
18087 currentFlushMeasurements = []; 16601 if (EventConstructor.eventPool.length) {
18088 }; 16602 var instance = EventConstructor.eventPool.pop();
16603 EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
16604 return instance;
16605 }
16606 return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst);
16607}
18089 16608
18090 var checkDebugID = function (debugID) { 16609function releasePooledEvent(event) {
18091 var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; 16610 var EventConstructor = this;
16611 !(event instanceof EventConstructor) ? invariant(false, 'Trying to release an event instance into a pool of a different type.') : void 0;
16612 event.destructor();
16613 if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {
16614 EventConstructor.eventPool.push(event);
16615 }
16616}
18092 16617
18093 if (allowRoot && debugID === 0) { 16618function addEventPoolingTo(EventConstructor) {
18094 return; 16619 EventConstructor.eventPool = [];
18095 } 16620 EventConstructor.getPooled = getPooledEvent;
18096 if (!debugID) { 16621 EventConstructor.release = releasePooledEvent;
18097 warning$6(false, 'ReactDebugTool: debugID may not be empty.'); 16622}
18098 }
18099 };
18100 16623
18101 var beginLifeCycleTimer = function (debugID, timerType) { 16624var SyntheticEvent$1 = SyntheticEvent;
18102 if (currentFlushNesting === 0) {
18103 return;
18104 }
18105 if (currentTimerType && !lifeCycleTimerHasWarned) {
18106 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');
18107 lifeCycleTimerHasWarned = true;
18108 }
18109 currentTimerStartTime = performanceNow();
18110 currentTimerNestedFlushDuration = 0;
18111 currentTimerDebugID = debugID;
18112 currentTimerType = timerType;
18113 };
18114 16625
18115 var endLifeCycleTimer = function (debugID, timerType) { 16626/**
18116 if (currentFlushNesting === 0) { 16627 * @interface Event
18117 return; 16628 * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
18118 } 16629 */
18119 if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) { 16630var CompositionEventInterface = {
18120 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'); 16631 data: null
18121 lifeCycleTimerHasWarned = true; 16632};
18122 }
18123 if (isProfiling) {
18124 currentFlushMeasurements.push({
18125 timerType: timerType,
18126 instanceID: debugID,
18127 duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration
18128 });
18129 }
18130 currentTimerStartTime = 0;
18131 currentTimerNestedFlushDuration = 0;
18132 currentTimerDebugID = null;
18133 currentTimerType = null;
18134 };
18135 16633
18136 var pauseCurrentLifeCycleTimer = function () { 16634/**
18137 var currentTimer = { 16635 * @param {object} dispatchConfig Configuration used to dispatch this event.
18138 startTime: currentTimerStartTime, 16636 * @param {string} dispatchMarker Marker identifying the event target.
18139 nestedFlushStartTime: performanceNow(), 16637 * @param {object} nativeEvent Native browser event.
18140 debugID: currentTimerDebugID, 16638 * @extends {SyntheticEvent}
18141 timerType: currentTimerType 16639 */
18142 }; 16640function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
18143 lifeCycleTimerStack.push(currentTimer); 16641 return SyntheticEvent$1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
18144 currentTimerStartTime = 0; 16642}
18145 currentTimerNestedFlushDuration = 0;
18146 currentTimerDebugID = null;
18147 currentTimerType = null;
18148 };
18149 16643
18150 var resumeCurrentLifeCycleTimer = function () { 16644SyntheticEvent$1.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);
18151 var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(),
18152 startTime = _lifeCycleTimerStack$.startTime,
18153 nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime,
18154 debugID = _lifeCycleTimerStack$.debugID,
18155 timerType = _lifeCycleTimerStack$.timerType;
18156
18157 var nestedFlushDuration = performanceNow() - nestedFlushStartTime;
18158 currentTimerStartTime = startTime;
18159 currentTimerNestedFlushDuration += nestedFlushDuration;
18160 currentTimerDebugID = debugID;
18161 currentTimerType = timerType;
18162 };
18163 16645
18164 var lastMarkTimeStamp = 0; 16646/**
18165 var canUsePerformanceMeasure = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function'; 16647 * @interface Event
16648 * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
16649 * /#events-inputevents
16650 */
16651var InputEventInterface = {
16652 data: null
16653};
18166 16654
18167 var shouldMark = function (debugID) { 16655/**
18168 if (!isProfiling || !canUsePerformanceMeasure) { 16656 * @param {object} dispatchConfig Configuration used to dispatch this event.
18169 return false; 16657 * @param {string} dispatchMarker Marker identifying the event target.
18170 } 16658 * @param {object} nativeEvent Native browser event.
18171 var element = ReactComponentTreeHook.getElement(debugID); 16659 * @extends {SyntheticEvent}
18172 if (element == null || typeof element !== 'object') { 16660 */
18173 return false; 16661function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
18174 } 16662 return SyntheticEvent$1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
18175 var isHostElement = typeof element.type === 'string'; 16663}
18176 if (isHostElement) {
18177 return false;
18178 }
18179 return true;
18180 };
18181 16664
18182 var markBegin = function (debugID, markType) { 16665SyntheticEvent$1.augmentClass(SyntheticInputEvent, InputEventInterface);
18183 if (!shouldMark(debugID)) {
18184 return;
18185 }
18186 16666
18187 var markName = debugID + '::' + markType; 16667var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
18188 lastMarkTimeStamp = performanceNow(); 16668var START_KEYCODE = 229;
18189 performance.mark(markName);
18190 };
18191 16669
18192 var markEnd = function (debugID, markType) { 16670var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
18193 if (!shouldMark(debugID)) {
18194 return;
18195 }
18196 16671
18197 var markName = debugID + '::' + markType; 16672var documentMode = null;
18198 var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown'; 16673if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
16674 documentMode = document.documentMode;
16675}
18199 16676
18200 // Chrome has an issue of dropping markers recorded too fast: 16677// Webkit offers a very useful `textInput` event that can be used to
18201 // https://bugs.chromium.org/p/chromium/issues/detail?id=640652 16678// directly represent `beforeInput`. The IE `textinput` event is not as
18202 // To work around this, we will not report very small measurements. 16679// useful, so we don't use it.
18203 // I determined the magic number by tweaking it back and forth. 16680var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
18204 // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe.
18205 // When the bug is fixed, we can `measure()` unconditionally if we want to.
18206 var timeStamp = performanceNow();
18207 if (timeStamp - lastMarkTimeStamp > 0.1) {
18208 var measurementName = displayName + ' [' + markType + ']';
18209 performance.measure(measurementName, markName);
18210 }
18211 16681
18212 performance.clearMarks(markName); 16682// In IE9+, we have access to composition events, but the data supplied
18213 if (measurementName) { 16683// by the native compositionend event may be incorrect. Japanese ideographic
18214 performance.clearMeasures(measurementName); 16684// spaces, for instance (\u3000) are not recorded correctly.
18215 } 16685var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
18216 };
18217 16686
18218 ReactDebugTool$1 = { 16687/**
18219 addHook: function (hook) { 16688 * Opera <= 12 includes TextEvent in window, but does not fire
18220 hooks.push(hook); 16689 * text input events. Rely on keypress instead.
18221 }, 16690 */
18222 removeHook: function (hook) { 16691function isPresto() {
18223 for (var i = 0; i < hooks.length; i++) { 16692 var opera = window.opera;
18224 if (hooks[i] === hook) { 16693 return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
18225 hooks.splice(i, 1); 16694}
18226 i--;
18227 }
18228 }
18229 },
18230 isProfiling: function () {
18231 return isProfiling;
18232 },
18233 beginProfiling: function () {
18234 if (isProfiling) {
18235 return;
18236 }
18237 16695
18238 isProfiling = true; 16696var SPACEBAR_CODE = 32;
18239 flushHistory.length = 0; 16697var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
18240 resetMeasurements();
18241 ReactDebugTool$1.addHook(ReactHostOperationHistoryHook_1);
18242 },
18243 endProfiling: function () {
18244 if (!isProfiling) {
18245 return;
18246 }
18247 16698
18248 isProfiling = false; 16699// Events and their corresponding property names.
18249 resetMeasurements(); 16700var eventTypes = {
18250 ReactDebugTool$1.removeHook(ReactHostOperationHistoryHook_1); 16701 beforeInput: {
18251 }, 16702 phasedRegistrationNames: {
18252 getFlushHistory: function () { 16703 bubbled: 'onBeforeInput',
18253 return flushHistory; 16704 captured: 'onBeforeInputCapture'
18254 },
18255 onBeginFlush: function () {
18256 currentFlushNesting++;
18257 resetMeasurements();
18258 pauseCurrentLifeCycleTimer();
18259 emitEvent('onBeginFlush');
18260 },
18261 onEndFlush: function () {
18262 resetMeasurements();
18263 currentFlushNesting--;
18264 resumeCurrentLifeCycleTimer();
18265 emitEvent('onEndFlush');
18266 },
18267 onBeginLifeCycleTimer: function (debugID, timerType) {
18268 checkDebugID(debugID);
18269 emitEvent('onBeginLifeCycleTimer', debugID, timerType);
18270 markBegin(debugID, timerType);
18271 beginLifeCycleTimer(debugID, timerType);
18272 },
18273 onEndLifeCycleTimer: function (debugID, timerType) {
18274 checkDebugID(debugID);
18275 endLifeCycleTimer(debugID, timerType);
18276 markEnd(debugID, timerType);
18277 emitEvent('onEndLifeCycleTimer', debugID, timerType);
18278 },
18279 onBeginProcessingChildContext: function () {
18280 emitEvent('onBeginProcessingChildContext');
18281 },
18282 onEndProcessingChildContext: function () {
18283 emitEvent('onEndProcessingChildContext');
18284 },
18285 onHostOperation: function (operation) {
18286 checkDebugID(operation.instanceID);
18287 emitEvent('onHostOperation', operation);
18288 },
18289 onSetState: function () {
18290 emitEvent('onSetState');
18291 },
18292 onSetChildren: function (debugID, childDebugIDs) {
18293 checkDebugID(debugID);
18294 childDebugIDs.forEach(checkDebugID);
18295 emitEvent('onSetChildren', debugID, childDebugIDs);
18296 },
18297 onBeforeMountComponent: function (debugID, element, parentDebugID) {
18298 checkDebugID(debugID);
18299 checkDebugID(parentDebugID, true);
18300 emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
18301 markBegin(debugID, 'mount');
18302 },
18303 onMountComponent: function (debugID) {
18304 checkDebugID(debugID);
18305 markEnd(debugID, 'mount');
18306 emitEvent('onMountComponent', debugID);
18307 },
18308 onBeforeUpdateComponent: function (debugID, element) {
18309 checkDebugID(debugID);
18310 emitEvent('onBeforeUpdateComponent', debugID, element);
18311 markBegin(debugID, 'update');
18312 }, 16705 },
18313 onUpdateComponent: function (debugID) { 16706 dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']
18314 checkDebugID(debugID); 16707 },
18315 markEnd(debugID, 'update'); 16708 compositionEnd: {
18316 emitEvent('onUpdateComponent', debugID); 16709 phasedRegistrationNames: {
16710 bubbled: 'onCompositionEnd',
16711 captured: 'onCompositionEndCapture'
18317 }, 16712 },
18318 onBeforeUnmountComponent: function (debugID) { 16713 dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
18319 checkDebugID(debugID); 16714 },
18320 emitEvent('onBeforeUnmountComponent', debugID); 16715 compositionStart: {
18321 markBegin(debugID, 'unmount'); 16716 phasedRegistrationNames: {
16717 bubbled: 'onCompositionStart',
16718 captured: 'onCompositionStartCapture'
18322 }, 16719 },
18323 onUnmountComponent: function (debugID) { 16720 dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
18324 checkDebugID(debugID); 16721 },
18325 markEnd(debugID, 'unmount'); 16722 compositionUpdate: {
18326 emitEvent('onUnmountComponent', debugID); 16723 phasedRegistrationNames: {
16724 bubbled: 'onCompositionUpdate',
16725 captured: 'onCompositionUpdateCapture'
18327 }, 16726 },
18328 onTestEvent: function () { 16727 dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
18329 emitEvent('onTestEvent');
18330 }
18331 };
18332
18333 ReactDebugTool$1.addHook(ReactInvalidSetStateWarningHook_1);
18334 ReactDebugTool$1.addHook(ReactComponentTreeHook);
18335 var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
18336 if (/[?&]react_perf\b/.test(url)) {
18337 ReactDebugTool$1.beginProfiling();
18338 } 16728 }
18339} 16729};
18340
18341var ReactDebugTool_1 = ReactDebugTool$1;
18342
18343// Trust the developer to only use ReactInstrumentation with a true check
18344
18345var debugTool = null;
18346
18347{
18348 var ReactDebugTool = ReactDebugTool_1;
18349 debugTool = ReactDebugTool;
18350}
18351 16730
18352var ReactInstrumentation = { debugTool: debugTool }; 16731// Track whether we've ever handled a keypress on the space key.
16732var hasSpaceKeypress = false;
18353 16733
18354{ 16734/**
18355 var warning$5 = require$$0; 16735 * Return whether a native keypress event is assumed to be a command.
16736 * This is required because Firefox fires `keypress` events for key commands
16737 * (cut, copy, select-all, etc.) even though no character is inserted.
16738 */
16739function isKeypressCommand(nativeEvent) {
16740 return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
16741 // ctrlKey && altKey is equivalent to AltGr, and is not a command.
16742 !(nativeEvent.ctrlKey && nativeEvent.altKey);
18356} 16743}
18357 16744
18358// isAttributeNameSafe() is currently duplicated in DOMMarkupOperations. 16745/**
18359// TODO: Find a better place for this. 16746 * Translate native top level events into event types.
18360var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty_1.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty_1.ATTRIBUTE_NAME_CHAR + ']*$'); 16747 *
18361var illegalAttributeNameCache = {}; 16748 * @param {string} topLevelType
18362var validatedAttributeNameCache = {}; 16749 * @return {object}
18363function isAttributeNameSafe(attributeName) { 16750 */
18364 if (validatedAttributeNameCache.hasOwnProperty(attributeName)) { 16751function getCompositionEventType(topLevelType) {
18365 return true; 16752 switch (topLevelType) {
18366 } 16753 case 'topCompositionStart':
18367 if (illegalAttributeNameCache.hasOwnProperty(attributeName)) { 16754 return eventTypes.compositionStart;
18368 return false; 16755 case 'topCompositionEnd':
18369 } 16756 return eventTypes.compositionEnd;
18370 if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { 16757 case 'topCompositionUpdate':
18371 validatedAttributeNameCache[attributeName] = true; 16758 return eventTypes.compositionUpdate;
18372 return true;
18373 }
18374 illegalAttributeNameCache[attributeName] = true;
18375 {
18376 warning$5(false, 'Invalid attribute name: `%s`', attributeName);
18377 } 16759 }
18378 return false;
18379} 16760}
18380 16761
18381// shouldIgnoreValue() is currently duplicated in DOMMarkupOperations. 16762/**
18382// TODO: Find a better place for this. 16763 * Does our fallback best-guess model think this event signifies that
18383function shouldIgnoreValue(propertyInfo, value) { 16764 * composition has begun?
18384 return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false; 16765 *
16766 * @param {string} topLevelType
16767 * @param {object} nativeEvent
16768 * @return {boolean}
16769 */
16770function isFallbackCompositionStart(topLevelType, nativeEvent) {
16771 return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE;
18385} 16772}
18386 16773
18387/** 16774/**
18388 * Operations for dealing with DOM properties. 16775 * Does our fallback mode think that this event is the end of composition?
16776 *
16777 * @param {string} topLevelType
16778 * @param {object} nativeEvent
16779 * @return {boolean}
18389 */ 16780 */
18390var DOMPropertyOperations = { 16781function isFallbackCompositionEnd(topLevelType, nativeEvent) {
18391 setAttributeForID: function (node, id) { 16782 switch (topLevelType) {
18392 node.setAttribute(DOMProperty_1.ID_ATTRIBUTE_NAME, id); 16783 case 'topKeyUp':
18393 }, 16784 // Command keys insert or clear IME input.
18394 16785 return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
18395 setAttributeForRoot: function (node) { 16786 case 'topKeyDown':
18396 node.setAttribute(DOMProperty_1.ROOT_ATTRIBUTE_NAME, ''); 16787 // Expect IME keyCode on each keydown. If we get any other
18397 }, 16788 // code we must have exited earlier.
18398 16789 return nativeEvent.keyCode !== START_KEYCODE;
18399 /** 16790 case 'topKeyPress':
18400 * Get the value for a property on a node. Only used in DEV for SSR validation. 16791 case 'topMouseDown':
18401 * The "expected" argument is used as a hint of what the expected value is. 16792 case 'topBlur':
18402 * Some properties have multiple equivalent values. 16793 // Events are not possible without cancelling IME.
18403 */ 16794 return true;
18404 getValueForProperty: function (node, name, expected) { 16795 default:
18405 { 16796 return false;
18406 var propertyInfo = DOMProperty_1.getPropertyInfo(name); 16797 }
18407 if (propertyInfo) { 16798}
18408 var mutationMethod = propertyInfo.mutationMethod;
18409 if (mutationMethod || propertyInfo.mustUseProperty) {
18410 return node[propertyInfo.propertyName];
18411 } else {
18412 var attributeName = propertyInfo.attributeName;
18413 16799
18414 var stringValue = null; 16800/**
16801 * Google Input Tools provides composition data via a CustomEvent,
16802 * with the `data` property populated in the `detail` object. If this
16803 * is available on the event object, use it. If not, this is a plain
16804 * composition event and we have nothing special to extract.
16805 *
16806 * @param {object} nativeEvent
16807 * @return {?string}
16808 */
16809function getDataFromCustomEvent(nativeEvent) {
16810 var detail = nativeEvent.detail;
16811 if (typeof detail === 'object' && 'data' in detail) {
16812 return detail.data;
16813 }
16814 return null;
16815}
18415 16816
18416 if (propertyInfo.hasOverloadedBooleanValue) { 16817// Track the current IME composition status, if any.
18417 if (node.hasAttribute(attributeName)) { 16818var isComposing = false;
18418 var value = node.getAttribute(attributeName);
18419 if (value === '') {
18420 return true;
18421 }
18422 if (shouldIgnoreValue(propertyInfo, expected)) {
18423 return value;
18424 }
18425 if (value === '' + expected) {
18426 return expected;
18427 }
18428 return value;
18429 }
18430 } else if (node.hasAttribute(attributeName)) {
18431 if (shouldIgnoreValue(propertyInfo, expected)) {
18432 // We had an attribute but shouldn't have had one, so read it
18433 // for the error message.
18434 return node.getAttribute(attributeName);
18435 }
18436 if (propertyInfo.hasBooleanValue) {
18437 // If this was a boolean, it doesn't matter what the value is
18438 // the fact that we have it is the same as the expected.
18439 return expected;
18440 }
18441 // Even if this property uses a namespace we use getAttribute
18442 // because we assume its namespaced name is the same as our config.
18443 // To use getAttributeNS we need the local name which we don't have
18444 // in our config atm.
18445 stringValue = node.getAttribute(attributeName);
18446 }
18447 16819
18448 if (shouldIgnoreValue(propertyInfo, expected)) { 16820/**
18449 return stringValue === null ? expected : stringValue; 16821 * @return {?object} A SyntheticCompositionEvent.
18450 } else if (stringValue === '' + expected) { 16822 */
18451 return expected; 16823function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
18452 } else { 16824 var eventType;
18453 return stringValue; 16825 var fallbackData;
18454 }
18455 }
18456 }
18457 }
18458 },
18459 16826
18460 /** 16827 if (canUseCompositionEvent) {
18461 * Get the value for a attribute on a node. Only used in DEV for SSR validation. 16828 eventType = getCompositionEventType(topLevelType);
18462 * The third argument is used as a hint of what the expected value is. Some 16829 } else if (!isComposing) {
18463 * attributes have multiple equivalent values. 16830 if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
18464 */ 16831 eventType = eventTypes.compositionStart;
18465 getValueForAttribute: function (node, name, expected) {
18466 {
18467 if (!isAttributeNameSafe(name)) {
18468 return;
18469 }
18470 if (!node.hasAttribute(name)) {
18471 return expected === undefined ? undefined : null;
18472 }
18473 var value = node.getAttribute(name);
18474 if (value === '' + expected) {
18475 return expected;
18476 }
18477 return value;
18478 } 16832 }
18479 }, 16833 } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
16834 eventType = eventTypes.compositionEnd;
16835 }
18480 16836
18481 /** 16837 if (!eventType) {
18482 * Sets the value for a property on a node. 16838 return null;
18483 * 16839 }
18484 * @param {DOMElement} node
18485 * @param {string} name
18486 * @param {*} value
18487 */
18488 setValueForProperty: function (node, name, value) {
18489 var propertyInfo = DOMProperty_1.getPropertyInfo(name);
18490 16840
18491 if (propertyInfo && DOMProperty_1.shouldSetAttribute(name, value)) { 16841 if (useFallbackCompositionData) {
18492 var mutationMethod = propertyInfo.mutationMethod; 16842 // The current composition is stored statically and must not be
18493 if (mutationMethod) { 16843 // overwritten while composition continues.
18494 mutationMethod(node, value); 16844 if (!isComposing && eventType === eventTypes.compositionStart) {
18495 } else if (shouldIgnoreValue(propertyInfo, value)) { 16845 isComposing = initialize(nativeEventTarget);
18496 DOMPropertyOperations.deleteValueForProperty(node, name); 16846 } else if (eventType === eventTypes.compositionEnd) {
18497 return; 16847 if (isComposing) {
18498 } else if (propertyInfo.mustUseProperty) { 16848 fallbackData = getData();
18499 // Contrary to `setAttribute`, object properties are properly
18500 // `toString`ed by IE8/9.
18501 node[propertyInfo.propertyName] = value;
18502 } else {
18503 var attributeName = propertyInfo.attributeName;
18504 var namespace = propertyInfo.attributeNamespace;
18505 // `setAttribute` with objects becomes only `[object]` in IE8/9,
18506 // ('' + value) makes it output the correct toString()-value.
18507 if (namespace) {
18508 node.setAttributeNS(namespace, attributeName, '' + value);
18509 } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
18510 node.setAttribute(attributeName, '');
18511 } else {
18512 node.setAttribute(attributeName, '' + value);
18513 }
18514 } 16849 }
18515 } else {
18516 DOMPropertyOperations.setValueForAttribute(node, name, DOMProperty_1.shouldSetAttribute(name, value) ? value : null);
18517 return;
18518 }
18519
18520 {
18521 var payload = {};
18522 payload[name] = value;
18523 ReactInstrumentation.debugTool.onHostOperation({
18524 instanceID: ReactDOMComponentTree_1.getInstanceFromNode(node)._debugID,
18525 type: 'update attribute',
18526 payload: payload
18527 });
18528 }
18529 },
18530
18531 setValueForAttribute: function (node, name, value) {
18532 if (!isAttributeNameSafe(name)) {
18533 return;
18534 }
18535 if (value == null) {
18536 node.removeAttribute(name);
18537 } else {
18538 node.setAttribute(name, '' + value);
18539 }
18540
18541 {
18542 var payload = {};
18543 payload[name] = value;
18544 ReactInstrumentation.debugTool.onHostOperation({
18545 instanceID: ReactDOMComponentTree_1.getInstanceFromNode(node)._debugID,
18546 type: 'update attribute',
18547 payload: payload
18548 });
18549 }
18550 },
18551
18552 /**
18553 * Deletes an attributes from a node.
18554 *
18555 * @param {DOMElement} node
18556 * @param {string} name
18557 */
18558 deleteValueForAttribute: function (node, name) {
18559 node.removeAttribute(name);
18560 {
18561 ReactInstrumentation.debugTool.onHostOperation({
18562 instanceID: ReactDOMComponentTree_1.getInstanceFromNode(node)._debugID,
18563 type: 'remove attribute',
18564 payload: name
18565 });
18566 } 16850 }
18567 }, 16851 }
18568 16852
18569 /** 16853 var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
18570 * Deletes the value for a property on a node.
18571 *
18572 * @param {DOMElement} node
18573 * @param {string} name
18574 */
18575 deleteValueForProperty: function (node, name) {
18576 var propertyInfo = DOMProperty_1.getPropertyInfo(name);
18577 if (propertyInfo) {
18578 var mutationMethod = propertyInfo.mutationMethod;
18579 if (mutationMethod) {
18580 mutationMethod(node, undefined);
18581 } else if (propertyInfo.mustUseProperty) {
18582 var propName = propertyInfo.propertyName;
18583 if (propertyInfo.hasBooleanValue) {
18584 node[propName] = false;
18585 } else {
18586 node[propName] = '';
18587 }
18588 } else {
18589 node.removeAttribute(propertyInfo.attributeName);
18590 }
18591 } else {
18592 node.removeAttribute(name);
18593 }
18594 16854
18595 { 16855 if (fallbackData) {
18596 ReactInstrumentation.debugTool.onHostOperation({ 16856 // Inject data generated from fallback path into the synthetic event.
18597 instanceID: ReactDOMComponentTree_1.getInstanceFromNode(node)._debugID, 16857 // This matches the property of native CompositionEventInterface.
18598 type: 'remove attribute', 16858 event.data = fallbackData;
18599 payload: name 16859 } else {
18600 }); 16860 var customData = getDataFromCustomEvent(nativeEvent);
16861 if (customData !== null) {
16862 event.data = customData;
18601 } 16863 }
18602 } 16864 }
18603};
18604
18605var DOMPropertyOperations_1 = DOMPropertyOperations;
18606
18607var ReactControlledValuePropTypes = {
18608 checkPropTypes: null
18609};
18610
18611{
18612 var warning$9 = require$$0;
18613 var emptyFunction$2 = emptyFunction;
18614 var PropTypes = propTypes;
18615 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
18616 16865
18617 ReactControlledValuePropTypes.checkPropTypes = emptyFunction$2; 16866 accumulateTwoPhaseDispatches(event);
18618 var hasReadOnlyValue = { 16867 return event;
18619 button: true, 16868}
18620 checkbox: true,
18621 image: true,
18622 hidden: true,
18623 radio: true,
18624 reset: true,
18625 submit: true
18626 };
18627 16869
18628 var propTypes$1 = { 16870/**
18629 value: function (props, propName, componentName) { 16871 * @param {TopLevelTypes} topLevelType Record from `BrowserEventConstants`.
18630 if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) { 16872 * @param {object} nativeEvent Native browser event.
18631 return null; 16873 * @return {?string} The string corresponding to this `beforeInput` event.
18632 } 16874 */
18633 return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); 16875function getNativeBeforeInputChars(topLevelType, nativeEvent) {
18634 }, 16876 switch (topLevelType) {
18635 checked: function (props, propName, componentName) { 16877 case 'topCompositionEnd':
18636 if (!props[propName] || props.onChange || props.readOnly || props.disabled) { 16878 return getDataFromCustomEvent(nativeEvent);
16879 case 'topKeyPress':
16880 /**
16881 * If native `textInput` events are available, our goal is to make
16882 * use of them. However, there is a special case: the spacebar key.
16883 * In Webkit, preventing default on a spacebar `textInput` event
16884 * cancels character insertion, but it *also* causes the browser
16885 * to fall back to its default spacebar behavior of scrolling the
16886 * page.
16887 *
16888 * Tracking at:
16889 * https://code.google.com/p/chromium/issues/detail?id=355103
16890 *
16891 * To avoid this issue, use the keypress event as if no `textInput`
16892 * event is available.
16893 */
16894 var which = nativeEvent.which;
16895 if (which !== SPACEBAR_CODE) {
18637 return null; 16896 return null;
18638 } 16897 }
18639 return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
18640 },
18641 onChange: PropTypes.func
18642 };
18643 16898
18644 var loggedTypeFailures = {}; 16899 hasSpaceKeypress = true;
16900 return SPACEBAR_CHAR;
18645 16901
18646 /** 16902 case 'topTextInput':
18647 * Provide a linked `value` attribute for controlled forms. You should not use 16903 // Record the characters to be added to the DOM.
18648 * this outside of the ReactDOM controlled form components. 16904 var chars = nativeEvent.data;
18649 */
18650 ReactControlledValuePropTypes.checkPropTypes = function (tagName, props, getStack) {
18651 for (var propName in propTypes$1) {
18652 if (propTypes$1.hasOwnProperty(propName)) {
18653 var error = propTypes$1[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret);
18654 }
18655 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
18656 // Only monitor this failure once because there tends to be a lot of the
18657 // same error.
18658 loggedTypeFailures[error.message] = true;
18659 16905
18660 warning$9(false, 'Failed form propType: %s%s', error.message, getStack()); 16906 // If it's a spacebar character, assume that we have already handled
16907 // it at the keypress level and bail immediately. Android Chrome
16908 // doesn't give us keycodes, so we need to blacklist it.
16909 if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
16910 return null;
18661 } 16911 }
18662 }
18663 };
18664}
18665
18666var ReactControlledValuePropTypes_1 = ReactControlledValuePropTypes;
18667
18668var getCurrentFiberOwnerName$3 = ReactDebugCurrentFiber_1.getCurrentFiberOwnerName;
18669
18670{
18671 var _require2$3 = ReactDebugCurrentFiber_1,
18672 getCurrentFiberStackAddendum$2 = _require2$3.getCurrentFiberStackAddendum;
18673
18674 var warning$8 = require$$0;
18675}
18676 16912
16913 return chars;
18677 16914
18678 16915 default:
18679var didWarnValueDefaultValue = false; 16916 // For other native event types, do nothing.
18680var didWarnCheckedDefaultChecked = false; 16917 return null;
18681var didWarnControlledToUncontrolled = false; 16918 }
18682var didWarnUncontrolledToControlled = false;
18683
18684function isControlled(props) {
18685 var usesChecked = props.type === 'checkbox' || props.type === 'radio';
18686 return usesChecked ? props.checked != null : props.value != null;
18687} 16919}
18688 16920
18689/** 16921/**
18690 * Implements an <input> host component that allows setting these optional 16922 * For browsers that do not provide the `textInput` event, extract the
18691 * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. 16923 * appropriate string to use for SyntheticInputEvent.
18692 *
18693 * If `checked` or `value` are not supplied (or null/undefined), user actions
18694 * that affect the checked state or value will trigger updates to the element.
18695 *
18696 * If they are supplied (and not null/undefined), the rendered element will not
18697 * trigger updates to the element. Instead, the props must change in order for
18698 * the rendered element to be updated.
18699 *
18700 * The rendered element will be initialized as unchecked (or `defaultChecked`)
18701 * with an empty value (or `defaultValue`).
18702 * 16924 *
18703 * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html 16925 * @param {string} topLevelType Record from `BrowserEventConstants`.
16926 * @param {object} nativeEvent Native browser event.
16927 * @return {?string} The fallback string for this `beforeInput` event.
18704 */ 16928 */
18705var ReactDOMInput = { 16929function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
18706 getHostProps: function (element, props) { 16930 // If we are currently composing (IME) and using a fallback to do so,
18707 var node = element; 16931 // try to extract the composed characters from the fallback object.
18708 var value = props.value; 16932 // If composition event is available, we extract a string only at
18709 var checked = props.checked; 16933 // compositionevent, otherwise extract it at fallback events.
18710 16934 if (isComposing) {
18711 var hostProps = _assign({ 16935 if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
18712 // Make sure we set .type before any other properties (setting .value 16936 var chars = getData();
18713 // before .type means .value is lost in IE11 and below) 16937 reset();
18714 type: undefined, 16938 isComposing = false;
18715 // Make sure we set .step before .value (setting .value before .step 16939 return chars;
18716 // means .value is rounded on mount, based upon step precision)
18717 step: undefined,
18718 // Make sure we set .min & .max before .value (to ensure proper order
18719 // in corner cases such as min or max deriving from value, e.g. Issue #7170)
18720 min: undefined,
18721 max: undefined
18722 }, props, {
18723 defaultChecked: undefined,
18724 defaultValue: undefined,
18725 value: value != null ? value : node._wrapperState.initialValue,
18726 checked: checked != null ? checked : node._wrapperState.initialChecked
18727 });
18728
18729 return hostProps;
18730 },
18731
18732 initWrapperState: function (element, props) {
18733 {
18734 ReactControlledValuePropTypes_1.checkPropTypes('input', props, getCurrentFiberStackAddendum$2);
18735
18736 if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
18737 warning$8(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerName$3() || 'A component', props.type);
18738 didWarnCheckedDefaultChecked = true;
18739 }
18740 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
18741 warning$8(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerName$3() || 'A component', props.type);
18742 didWarnValueDefaultValue = true;
18743 }
18744 }
18745
18746 var defaultValue = props.defaultValue;
18747 var node = element;
18748 node._wrapperState = {
18749 initialChecked: props.checked != null ? props.checked : props.defaultChecked,
18750 initialValue: props.value != null ? props.value : defaultValue,
18751 controlled: isControlled(props)
18752 };
18753 },
18754
18755 updateWrapper: function (element, props) {
18756 var node = element;
18757 {
18758 var controlled = isControlled(props);
18759
18760 if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
18761 warning$8(false, 'A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components%s', props.type, getCurrentFiberStackAddendum$2());
18762 didWarnUncontrolledToControlled = true;
18763 }
18764 if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
18765 warning$8(false, 'A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components%s', props.type, getCurrentFiberStackAddendum$2());
18766 didWarnControlledToUncontrolled = true;
18767 }
18768 }
18769
18770 var checked = props.checked;
18771 if (checked != null) {
18772 DOMPropertyOperations_1.setValueForProperty(node, 'checked', checked || false);
18773 }
18774
18775 var value = props.value;
18776 if (value != null) {
18777 if (value === 0 && node.value === '') {
18778 node.value = '0';
18779 // Note: IE9 reports a number inputs as 'text', so check props instead.
18780 } else if (props.type === 'number') {
18781 // Simulate `input.valueAsNumber`. IE9 does not support it
18782 var valueAsNumber = parseFloat(node.value) || 0;
18783
18784 if (
18785 // eslint-disable-next-line
18786 value != valueAsNumber ||
18787 // eslint-disable-next-line
18788 value == valueAsNumber && node.value != value) {
18789 // Cast `value` to a string to ensure the value is set correctly. While
18790 // browsers typically do this as necessary, jsdom doesn't.
18791 node.value = '' + value;
18792 }
18793 } else if (node.value !== '' + value) {
18794 // Cast `value` to a string to ensure the value is set correctly. While
18795 // browsers typically do this as necessary, jsdom doesn't.
18796 node.value = '' + value;
18797 }
18798 } else {
18799 if (props.value == null && props.defaultValue != null) {
18800 // In Chrome, assigning defaultValue to certain input types triggers input validation.
18801 // For number inputs, the display value loses trailing decimal points. For email inputs,
18802 // Chrome raises "The specified value <x> is not a valid email address".
18803 //
18804 // Here we check to see if the defaultValue has actually changed, avoiding these problems
18805 // when the user is inputting text
18806 //
18807 // https://github.com/facebook/react/issues/7253
18808 if (node.defaultValue !== '' + props.defaultValue) {
18809 node.defaultValue = '' + props.defaultValue;
18810 }
18811 }
18812 if (props.checked == null && props.defaultChecked != null) {
18813 node.defaultChecked = !!props.defaultChecked;
18814 }
18815 }
18816 },
18817
18818 postMountWrapper: function (element, props) {
18819 var node = element;
18820
18821 // Detach value from defaultValue. We won't do anything if we're working on
18822 // submit or reset inputs as those values & defaultValues are linked. They
18823 // are not resetable nodes so this operation doesn't matter and actually
18824 // removes browser-default values (eg "Submit Query") when no value is
18825 // provided.
18826
18827 switch (props.type) {
18828 case 'submit':
18829 case 'reset':
18830 break;
18831 case 'color':
18832 case 'date':
18833 case 'datetime':
18834 case 'datetime-local':
18835 case 'month':
18836 case 'time':
18837 case 'week':
18838 // This fixes the no-show issue on iOS Safari and Android Chrome:
18839 // https://github.com/facebook/react/issues/7233
18840 node.value = '';
18841 node.value = node.defaultValue;
18842 break;
18843 default:
18844 node.value = node.value;
18845 break;
18846 }
18847
18848 // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
18849 // this is needed to work around a chrome bug where setting defaultChecked
18850 // will sometimes influence the value of checked (even after detachment).
18851 // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
18852 // We need to temporarily unset name to avoid disrupting radio button groups.
18853 var name = node.name;
18854 if (name !== '') {
18855 node.name = '';
18856 }
18857 node.defaultChecked = !node.defaultChecked;
18858 node.defaultChecked = !node.defaultChecked;
18859 if (name !== '') {
18860 node.name = name;
18861 } 16940 }
18862 }, 16941 return null;
18863
18864 restoreControlledState: function (element, props) {
18865 var node = element;
18866 ReactDOMInput.updateWrapper(node, props);
18867 updateNamedCousins(node, props);
18868 } 16942 }
18869};
18870
18871function updateNamedCousins(rootNode, props) {
18872 var name = props.name;
18873 if (props.type === 'radio' && name != null) {
18874 var queryRoot = rootNode;
18875
18876 while (queryRoot.parentNode) {
18877 queryRoot = queryRoot.parentNode;
18878 }
18879 16943
18880 // If `rootNode.form` was non-null, then we could try `form.elements`, 16944 switch (topLevelType) {
18881 // but that sometimes behaves strangely in IE8. We could also try using 16945 case 'topPaste':
18882 // `form.getElementsByName`, but that will only return direct children 16946 // If a paste event occurs after a keypress, throw out the input
18883 // and won't include inputs that use the HTML5 `form=` attribute. Since 16947 // chars. Paste events should not lead to BeforeInput events.
18884 // the input might not even be in a form. It might not even be in the 16948 return null;
18885 // document. Let's just use the local `querySelectorAll` to ensure we don't 16949 case 'topKeyPress':
18886 // miss anything. 16950 /**
18887 var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]'); 16951 * As of v27, Firefox may fire keypress events even when no character
18888 16952 * will be inserted. A few possibilities:
18889 for (var i = 0; i < group.length; i++) { 16953 *
18890 var otherNode = group[i]; 16954 * - `which` is `0`. Arrow keys, Esc key, etc.
18891 if (otherNode === rootNode || otherNode.form !== rootNode.form) { 16955 *
18892 continue; 16956 * - `which` is the pressed key code, but no char is available.
16957 * Ex: 'AltGr + d` in Polish. There is no modified character for
16958 * this key combination and no character is inserted into the
16959 * document, but FF fires the keypress for char code `100` anyway.
16960 * No `input` event will occur.
16961 *
16962 * - `which` is the pressed key code, but a command combination is
16963 * being used. Ex: `Cmd+C`. No character is inserted, and no
16964 * `input` event will occur.
16965 */
16966 if (!isKeypressCommand(nativeEvent)) {
16967 // IE fires the `keypress` event when a user types an emoji via
16968 // Touch keyboard of Windows. In such a case, the `char` property
16969 // holds an emoji character like `\uD83D\uDE0A`. Because its length
16970 // is 2, the property `which` does not represent an emoji correctly.
16971 // In such a case, we directly return the `char` property instead of
16972 // using `which`.
16973 if (nativeEvent.char && nativeEvent.char.length > 1) {
16974 return nativeEvent.char;
16975 } else if (nativeEvent.which) {
16976 return String.fromCharCode(nativeEvent.which);
16977 }
18893 } 16978 }
18894 // This will throw if radio buttons rendered by different copies of React 16979 return null;
18895 // and the same name are rendered into the same form (same as #1939). 16980 case 'topCompositionEnd':
18896 // That's probably okay; we don't support it just as we don't support 16981 return useFallbackCompositionData ? null : nativeEvent.data;
18897 // mixing React radio buttons with non-React ones. 16982 default:
18898 var otherProps = ReactDOMComponentTree_1.getFiberCurrentPropsFromNode(otherNode); 16983 return null;
18899 !otherProps ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : void 0;
18900 // If this is a controlled radio button group, forcing the input that
18901 // was previously checked to update will cause it to be come re-checked
18902 // as appropriate.
18903 ReactDOMInput.updateWrapper(otherNode, otherProps);
18904 }
18905 } 16984 }
18906} 16985}
18907 16986
18908var ReactDOMFiberInput = ReactDOMInput; 16987/**
16988 * Extract a SyntheticInputEvent for `beforeInput`, based on either native
16989 * `textInput` or fallback behavior.
16990 *
16991 * @return {?object} A SyntheticInputEvent.
16992 */
16993function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
16994 var chars;
18909 16995
18910{ 16996 if (canUseTextInputEvent) {
18911 var warning$10 = require$$0; 16997 chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
18912} 16998 } else {
16999 chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
17000 }
18913 17001
18914function flattenChildren(children) { 17002 // If no characters are being inserted, no BeforeInput event should
18915 var content = ''; 17003 // be fired.
17004 if (!chars) {
17005 return null;
17006 }
18916 17007
18917 // Flatten children and warn if they aren't strings or numbers; 17008 var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
18918 // invalid types are ignored.
18919 // We can silently skip them because invalid DOM nesting warning
18920 // catches these cases in Fiber.
18921 react.Children.forEach(children, function (child) {
18922 if (child == null) {
18923 return;
18924 }
18925 if (typeof child === 'string' || typeof child === 'number') {
18926 content += child;
18927 }
18928 });
18929 17009
18930 return content; 17010 event.data = chars;
17011 accumulateTwoPhaseDispatches(event);
17012 return event;
18931} 17013}
18932 17014
18933/** 17015/**
18934 * Implements an <option> host component that warns when `selected` is set. 17016 * Create an `onBeforeInput` event to match
17017 * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
17018 *
17019 * This event plugin is based on the native `textInput` event
17020 * available in Chrome, Safari, Opera, and IE. This event fires after
17021 * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
17022 *
17023 * `beforeInput` is spec'd but not implemented in any browsers, and
17024 * the `input` event does not provide any useful information about what has
17025 * actually been added, contrary to the spec. Thus, `textInput` is the best
17026 * available event to identify the characters that have actually been inserted
17027 * into the target node.
17028 *
17029 * This plugin is also responsible for emitting `composition` events, thus
17030 * allowing us to share composition fallback code for both `beforeInput` and
17031 * `composition` event types.
18935 */ 17032 */
18936var ReactDOMOption = { 17033var BeforeInputEventPlugin = {
18937 validateProps: function (element, props) { 17034 eventTypes: eventTypes,
18938 // TODO (yungsters): Remove support for `selected` in <option>.
18939 {
18940 warning$10(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
18941 }
18942 },
18943
18944 postMountWrapper: function (element, props) {
18945 // value="" should make a value attribute (#6219)
18946 if (props.value != null) {
18947 element.setAttribute('value', props.value);
18948 }
18949 },
18950
18951 getHostProps: function (element, props) {
18952 var hostProps = _assign({ children: undefined }, props);
18953
18954 var content = flattenChildren(props.children);
18955
18956 if (content) {
18957 hostProps.children = content;
18958 }
18959 17035
18960 return hostProps; 17036 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
17037 return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];
18961 } 17038 }
18962}; 17039};
18963 17040
18964var ReactDOMFiberOption = ReactDOMOption; 17041// Use to restore controlled state after a change event has fired.
18965
18966var getCurrentFiberOwnerName$4 = ReactDebugCurrentFiber_1.getCurrentFiberOwnerName;
18967
18968{
18969 var didWarnValueDefaultValue$1 = false;
18970 var warning$11 = require$$0;
18971 17042
18972 var _require2$4 = ReactDebugCurrentFiber_1, 17043var fiberHostComponent = null;
18973 getCurrentFiberStackAddendum$3 = _require2$4.getCurrentFiberStackAddendum;
18974}
18975 17044
18976function getDeclarationErrorAddendum() { 17045var ReactControlledComponentInjection = {
18977 var ownerName = getCurrentFiberOwnerName$4(); 17046 injectFiberControlledHostComponent: function (hostComponentImpl) {
18978 if (ownerName) { 17047 // The fiber implementation doesn't use dynamic dispatch so we need to
18979 return '\n\nCheck the render method of `' + ownerName + '`.'; 17048 // inject the implementation.
17049 fiberHostComponent = hostComponentImpl;
18980 } 17050 }
18981 return ''; 17051};
18982}
18983
18984var valuePropNames = ['value', 'defaultValue'];
18985 17052
18986/** 17053var restoreTarget = null;
18987 * Validation function for `value` and `defaultValue`. 17054var restoreQueue = null;
18988 */
18989function checkSelectPropTypes(props) {
18990 ReactControlledValuePropTypes_1.checkPropTypes('select', props, getCurrentFiberStackAddendum$3);
18991 17055
18992 for (var i = 0; i < valuePropNames.length; i++) { 17056function restoreStateOfTarget(target) {
18993 var propName = valuePropNames[i]; 17057 // We perform this translation at the end of the event loop so that we
18994 if (props[propName] == null) { 17058 // always receive the correct fiber here
18995 continue; 17059 var internalInstance = getInstanceFromNode(target);
18996 } 17060 if (!internalInstance) {
18997 var isArray = Array.isArray(props[propName]); 17061 // Unmounted
18998 if (props.multiple && !isArray) { 17062 return;
18999 warning$11(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
19000 } else if (!props.multiple && isArray) {
19001 warning$11(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
19002 }
19003 } 17063 }
17064 !(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;
17065 var props = getFiberCurrentPropsFromNode(internalInstance.stateNode);
17066 fiberHostComponent.restoreControlledState(internalInstance.stateNode, internalInstance.type, props);
19004} 17067}
19005 17068
19006function updateOptions(node, multiple, propValue) { 17069var injection$3 = ReactControlledComponentInjection;
19007 var options = node.options;
19008 17070
19009 if (multiple) { 17071function enqueueStateRestore(target) {
19010 var selectedValues = propValue; 17072 if (restoreTarget) {
19011 var selectedValue = {}; 17073 if (restoreQueue) {
19012 for (var i = 0; i < selectedValues.length; i++) { 17074 restoreQueue.push(target);
19013 // Prefix to avoid chaos with special keys. 17075 } else {
19014 selectedValue['$' + selectedValues[i]] = true; 17076 restoreQueue = [target];
19015 }
19016 for (var _i = 0; _i < options.length; _i++) {
19017 var selected = selectedValue.hasOwnProperty('$' + options[_i].value);
19018 if (options[_i].selected !== selected) {
19019 options[_i].selected = selected;
19020 }
19021 } 17077 }
19022 } else { 17078 } else {
19023 // Do not set `select.value` as exact behavior isn't consistent across all 17079 restoreTarget = target;
19024 // browsers for all cases.
19025 var _selectedValue = '' + propValue;
19026 var defaultSelected = null;
19027 for (var _i2 = 0; _i2 < options.length; _i2++) {
19028 if (options[_i2].value === _selectedValue) {
19029 options[_i2].selected = true;
19030 return;
19031 }
19032 if (defaultSelected === null && !options[_i2].disabled) {
19033 defaultSelected = options[_i2];
19034 }
19035 }
19036 if (defaultSelected !== null) {
19037 defaultSelected.selected = true;
19038 }
19039 } 17080 }
19040} 17081}
19041 17082
19042/** 17083function restoreStateIfNeeded() {
19043 * Implements a <select> host component that allows optionally setting the 17084 if (!restoreTarget) {
19044 * props `value` and `defaultValue`. If `multiple` is false, the prop must be a 17085 return;
19045 * stringable. If `multiple` is true, the prop must be an array of stringables. 17086 }
19046 * 17087 var target = restoreTarget;
19047 * If `value` is not supplied (or null/undefined), user actions that change the 17088 var queuedTargets = restoreQueue;
19048 * selected option will trigger updates to the rendered options. 17089 restoreTarget = null;
19049 * 17090 restoreQueue = null;
19050 * If it is supplied (and not null/undefined), the rendered options will not
19051 * update in response to user actions. Instead, the `value` prop must change in
19052 * order for the rendered options to update.
19053 *
19054 * If `defaultValue` is provided, any options with the supplied values will be
19055 * selected.
19056 */
19057var ReactDOMSelect = {
19058 getHostProps: function (element, props) {
19059 return _assign({}, props, {
19060 value: undefined
19061 });
19062 },
19063
19064 initWrapperState: function (element, props) {
19065 var node = element;
19066 {
19067 checkSelectPropTypes(props);
19068 }
19069
19070 var value = props.value;
19071 node._wrapperState = {
19072 initialValue: value != null ? value : props.defaultValue,
19073 wasMultiple: !!props.multiple
19074 };
19075
19076 {
19077 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {
19078 warning$11(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
19079 didWarnValueDefaultValue$1 = true;
19080 }
19081 }
19082 },
19083 17091
19084 postMountWrapper: function (element, props) { 17092 restoreStateOfTarget(target);
19085 var node = element; 17093 if (queuedTargets) {
19086 node.multiple = !!props.multiple; 17094 for (var i = 0; i < queuedTargets.length; i++) {
19087 var value = props.value; 17095 restoreStateOfTarget(queuedTargets[i]);
19088 if (value != null) {
19089 updateOptions(node, !!props.multiple, value);
19090 } else if (props.defaultValue != null) {
19091 updateOptions(node, !!props.multiple, props.defaultValue);
19092 } 17096 }
19093 }, 17097 }
17098}
19094 17099
19095 postUpdateWrapper: function (element, props) { 17100var ReactControlledComponent = Object.freeze({
19096 var node = element; 17101 injection: injection$3,
19097 // After the initial mount, we control selected-ness manually so don't pass 17102 enqueueStateRestore: enqueueStateRestore,
19098 // this value down 17103 restoreStateIfNeeded: restoreStateIfNeeded
19099 node._wrapperState.initialValue = undefined; 17104});
19100 17105
19101 var wasMultiple = node._wrapperState.wasMultiple; 17106// Used as a way to call batchedUpdates when we don't have a reference to
19102 node._wrapperState.wasMultiple = !!props.multiple; 17107// the renderer. Such as when we're dispatching events or if third party
17108// libraries need to call batchedUpdates. Eventually, this API will go away when
17109// everything is batched by default. We'll then have a similar API to opt-out of
17110// scheduled work and instead do synchronous work.
19103 17111
19104 var value = props.value; 17112// Defaults
19105 if (value != null) { 17113var fiberBatchedUpdates = function (fn, bookkeeping) {
19106 updateOptions(node, !!props.multiple, value); 17114 return fn(bookkeeping);
19107 } else if (wasMultiple !== !!props.multiple) { 17115};
19108 // For simplicity, reapply `defaultValue` if `multiple` is toggled.
19109 if (props.defaultValue != null) {
19110 updateOptions(node, !!props.multiple, props.defaultValue);
19111 } else {
19112 // Revert the select back to its default unselected state.
19113 updateOptions(node, !!props.multiple, props.multiple ? [] : '');
19114 }
19115 }
19116 },
19117 17116
19118 restoreControlledState: function (element, props) { 17117var isNestingBatched = false;
19119 var node = element; 17118function batchedUpdates(fn, bookkeeping) {
19120 var value = props.value; 17119 if (isNestingBatched) {
17120 // If we are currently inside another batch, we need to wait until it
17121 // fully completes before restoring state. Therefore, we add the target to
17122 // a queue of work.
17123 return fiberBatchedUpdates(fn, bookkeeping);
17124 }
17125 isNestingBatched = true;
17126 try {
17127 return fiberBatchedUpdates(fn, bookkeeping);
17128 } finally {
17129 // Here we wait until all updates have propagated, which is important
17130 // when using controlled components within layers:
17131 // https://github.com/facebook/react/issues/1698
17132 // Then we restore state of any controlled component.
17133 isNestingBatched = false;
17134 restoreStateIfNeeded();
17135 }
17136}
19121 17137
19122 if (value != null) { 17138var ReactGenericBatchingInjection = {
19123 updateOptions(node, !!props.multiple, value); 17139 injectFiberBatchedUpdates: function (_batchedUpdates) {
19124 } 17140 fiberBatchedUpdates = _batchedUpdates;
19125 } 17141 }
19126}; 17142};
19127 17143
19128var ReactDOMFiberSelect = ReactDOMSelect; 17144var injection$4 = ReactGenericBatchingInjection;
19129
19130{
19131 var warning$12 = require$$0;
19132
19133 var _require$4 = ReactDebugCurrentFiber_1,
19134 getCurrentFiberStackAddendum$4 = _require$4.getCurrentFiberStackAddendum;
19135}
19136
19137var didWarnValDefaultVal = false;
19138 17145
19139/** 17146/**
19140 * Implements a <textarea> host component that allows setting `value`, and 17147 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
19141 * `defaultValue`. This differs from the traditional DOM API because value is
19142 * usually set as PCDATA children.
19143 *
19144 * If `value` is not supplied (or null/undefined), user actions that affect the
19145 * value will trigger updates to the element.
19146 *
19147 * If `value` is supplied (and not null/undefined), the rendered element will
19148 * not trigger updates to the element. Instead, the `value` prop must change in
19149 * order for the rendered element to be updated.
19150 *
19151 * The rendered element will be initialized with an empty value, the prop
19152 * `defaultValue` if specified, or the children content (deprecated).
19153 */ 17148 */
19154var ReactDOMTextarea = { 17149var supportedInputTypes = {
19155 getHostProps: function (element, props) { 17150 color: true,
19156 var node = element; 17151 date: true,
19157 !(props.dangerouslySetInnerHTML == null) ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : void 0; 17152 datetime: true,
19158 17153 'datetime-local': true,
19159 // Always set children to the same thing. In IE9, the selection range will 17154 email: true,
19160 // get reset if `textContent` is mutated. We could add a check in setTextContent 17155 month: true,
19161 // to only set the value if/when the value differs from the node value (which would 17156 number: true,
19162 // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this 17157 password: true,
19163 // solution. The value can be a boolean or object so that's why it's forced 17158 range: true,
19164 // to be a string. 17159 search: true,
19165 var hostProps = _assign({}, props, { 17160 tel: true,
19166 value: undefined, 17161 text: true,
19167 defaultValue: undefined, 17162 time: true,
19168 children: '' + node._wrapperState.initialValue 17163 url: true,
19169 }); 17164 week: true
19170 17165};
19171 return hostProps;
19172 },
19173
19174 initWrapperState: function (element, props) {
19175 var node = element;
19176 {
19177 ReactControlledValuePropTypes_1.checkPropTypes('textarea', props, getCurrentFiberStackAddendum$4);
19178 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
19179 warning$12(false, 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
19180 didWarnValDefaultVal = true;
19181 }
19182 }
19183
19184 var value = props.value;
19185 var initialValue = value;
19186 17166
19187 // Only bother fetching default value if we're going to use it 17167function isTextInputElement(elem) {
19188 if (value == null) { 17168 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
19189 var defaultValue = props.defaultValue;
19190 // TODO (yungsters): Remove support for children content in <textarea>.
19191 var children = props.children;
19192 if (children != null) {
19193 {
19194 warning$12(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
19195 }
19196 !(defaultValue == null) ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : void 0;
19197 if (Array.isArray(children)) {
19198 !(children.length <= 1) ? invariant(false, '<textarea> can only have at most one child.') : void 0;
19199 children = children[0];
19200 }
19201 17169
19202 defaultValue = '' + children; 17170 if (nodeName === 'input') {
19203 } 17171 return !!supportedInputTypes[elem.type];
19204 if (defaultValue == null) { 17172 }
19205 defaultValue = '';
19206 }
19207 initialValue = defaultValue;
19208 }
19209 17173
19210 node._wrapperState = { 17174 if (nodeName === 'textarea') {
19211 initialValue: '' + initialValue 17175 return true;
19212 }; 17176 }
19213 },
19214 17177
19215 updateWrapper: function (element, props) { 17178 return false;
19216 var node = element; 17179}
19217 var value = props.value;
19218 if (value != null) {
19219 // Cast `value` to a string to ensure the value is set correctly. While
19220 // browsers typically do this as necessary, jsdom doesn't.
19221 var newValue = '' + value;
19222 17180
19223 // To avoid side effects (such as losing text selection), only set value if changed 17181/**
19224 if (newValue !== node.value) { 17182 * HTML nodeType values that represent the type of the node
19225 node.value = newValue; 17183 */
19226 }
19227 if (props.defaultValue == null) {
19228 node.defaultValue = newValue;
19229 }
19230 }
19231 if (props.defaultValue != null) {
19232 node.defaultValue = props.defaultValue;
19233 }
19234 },
19235 17184
19236 postMountWrapper: function (element, props) { 17185var ELEMENT_NODE = 1;
19237 var node = element; 17186var TEXT_NODE = 3;
19238 // This is in postMount because we need access to the DOM node, which is not 17187var COMMENT_NODE = 8;
19239 // available until after the component has mounted. 17188var DOCUMENT_NODE = 9;
19240 var textContent = node.textContent; 17189var DOCUMENT_FRAGMENT_NODE = 11;
19241 17190
19242 // Only set node.value if textContent is equal to the expected 17191/**
19243 // initial value. In IE10/IE11 there is a bug where the placeholder attribute 17192 * Gets the target node from a native browser event by accounting for
19244 // will populate textContent as well. 17193 * inconsistencies in browser DOM APIs.
19245 // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/ 17194 *
19246 if (textContent === node._wrapperState.initialValue) { 17195 * @param {object} nativeEvent Native browser event.
19247 node.value = textContent; 17196 * @return {DOMEventTarget} Target node.
19248 } 17197 */
19249 }, 17198function getEventTarget(nativeEvent) {
17199 var target = nativeEvent.target || nativeEvent.srcElement || window;
19250 17200
19251 restoreControlledState: function (element, props) { 17201 // Normalize SVG <use> element events #4963
19252 // DOM component is still mounted; update 17202 if (target.correspondingUseElement) {
19253 ReactDOMTextarea.updateWrapper(element, props); 17203 target = target.correspondingUseElement;
19254 } 17204 }
19255};
19256 17205
19257var ReactDOMFiberTextarea = ReactDOMTextarea; 17206 // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
17207 // @see http://www.quirksmode.org/js/events_properties.html
17208 return target.nodeType === TEXT_NODE ? target.parentNode : target;
17209}
17210
17211var useHasFeature;
17212if (ExecutionEnvironment.canUseDOM) {
17213 useHasFeature = document.implementation && document.implementation.hasFeature &&
17214 // always returns true in newer browsers as per the standard.
17215 // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
17216 document.implementation.hasFeature('', '') !== true;
17217}
19258 17218
19259/** 17219/**
19260 * Copyright (c) 2013-present, Facebook, Inc. 17220 * Checks if an event is supported in the current execution environment.
19261 * 17221 *
19262 * This source code is licensed under the MIT license found in the 17222 * NOTE: This will not work correctly for non-generic events such as `change`,
19263 * LICENSE file in the root directory of this source tree. 17223 * `reset`, `load`, `error`, and `select`.
19264 * 17224 *
19265 * @providesModule omittedCloseTags 17225 * Borrows from Modernizr.
17226 *
17227 * @param {string} eventNameSuffix Event name, e.g. "click".
17228 * @param {?boolean} capture Check if the capture phase is supported.
17229 * @return {boolean} True if the event is supported.
17230 * @internal
17231 * @license Modernizr 3.0.0pre (Custom Build) | MIT
19266 */ 17232 */
17233function isEventSupported(eventNameSuffix, capture) {
17234 if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) {
17235 return false;
17236 }
19267 17237
19268// For HTML, certain tags should omit their close tag. We keep a whitelist for 17238 var eventName = 'on' + eventNameSuffix;
19269// those special-case tags. 17239 var isSupported = eventName in document;
19270
19271var omittedCloseTags = {
19272 area: true,
19273 base: true,
19274 br: true,
19275 col: true,
19276 embed: true,
19277 hr: true,
19278 img: true,
19279 input: true,
19280 keygen: true,
19281 link: true,
19282 meta: true,
19283 param: true,
19284 source: true,
19285 track: true,
19286 wbr: true
19287};
19288
19289var omittedCloseTags_1 = omittedCloseTags;
19290
19291// For HTML, certain tags cannot have children. This has the same purpose as
19292// `omittedCloseTags` except that `menuitem` should still have its closing tag.
19293
19294var voidElementTags = _assign({
19295 menuitem: true
19296}, omittedCloseTags_1);
19297
19298var voidElementTags_1 = voidElementTags;
19299
19300{
19301 var warning$13 = require$$0;
19302}
19303
19304var HTML$1 = '__html';
19305 17240
19306function getDeclarationErrorAddendum$1(getCurrentOwnerName) { 17241 if (!isSupported) {
19307 { 17242 var element = document.createElement('div');
19308 var ownerName = getCurrentOwnerName(); 17243 element.setAttribute(eventName, 'return;');
19309 if (ownerName) { 17244 isSupported = typeof element[eventName] === 'function';
19310 // TODO: also report the stack.
19311 return '\n\nThis DOM node was rendered by `' + ownerName + '`.';
19312 }
19313 } 17245 }
19314 return '';
19315}
19316 17246
19317function assertValidProps(tag, props, getCurrentOwnerName) { 17247 if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
19318 if (!props) { 17248 // This is the only way to test support for the `wheel` event in IE9+.
19319 return; 17249 isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
19320 }
19321 // Note the use of `==` which checks for null or undefined.
19322 if (voidElementTags_1[tag]) {
19323 !(props.children == null && props.dangerouslySetInnerHTML == null) ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', tag, getDeclarationErrorAddendum$1(getCurrentOwnerName)) : void 0;
19324 }
19325 if (props.dangerouslySetInnerHTML != null) {
19326 !(props.children == null) ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : void 0;
19327 !(typeof props.dangerouslySetInnerHTML === 'object' && HTML$1 in props.dangerouslySetInnerHTML) ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : void 0;
19328 }
19329 {
19330 warning$13(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');
19331 } 17250 }
19332 !(props.style == null || typeof props.style === 'object') ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', getDeclarationErrorAddendum$1(getCurrentOwnerName)) : void 0;
19333}
19334
19335var assertValidProps_1 = assertValidProps;
19336 17251
19337/** 17252 return isSupported;
19338 * Copyright (c) 2013-present, Facebook, Inc. 17253}
19339 *
19340 * This source code is licensed under the MIT license found in the
19341 * LICENSE file in the root directory of this source tree.
19342 *
19343 * @providesModule inputValueTracking
19344 *
19345 */
19346 17254
19347function isCheckable(elem) { 17255function isCheckable(elem) {
19348 var type = elem.type; 17256 var type = elem.type;
@@ -19414,2697 +17322,2267 @@ function trackValueOnNode(node) {
19414 return tracker; 17322 return tracker;
19415} 17323}
19416 17324
19417var inputValueTracking = { 17325function track(node) {
19418 // exposed for testing 17326 if (getTracker(node)) {
19419 _getTrackerFromNode: getTracker, 17327 return;
19420 17328 }
19421 track: function (node) {
19422 if (getTracker(node)) {
19423 return;
19424 }
19425
19426 // TODO: Once it's just Fiber we can move this to node._wrapperState
19427 node._valueTracker = trackValueOnNode(node);
19428 },
19429 updateValueIfChanged: function (node) {
19430 if (!node) {
19431 return false;
19432 }
19433 17329
19434 var tracker = getTracker(node); 17330 // TODO: Once it's just Fiber we can move this to node._wrapperState
19435 // if there is no tracker at this point it's unlikely 17331 node._valueTracker = trackValueOnNode(node);
19436 // that trying again will succeed 17332}
19437 if (!tracker) {
19438 return true;
19439 }
19440 17333
19441 var lastValue = tracker.getValue(); 17334function updateValueIfChanged(node) {
19442 var nextValue = getValueFromNode(node); 17335 if (!node) {
19443 if (nextValue !== lastValue) {
19444 tracker.setValue(nextValue);
19445 return true;
19446 }
19447 return false; 17336 return false;
19448 },
19449 stopTracking: function (node) {
19450 var tracker = getTracker(node);
19451 if (tracker) {
19452 tracker.stopTracking();
19453 }
19454 } 17337 }
19455};
19456
19457var inputValueTracking_1 = inputValueTracking;
19458 17338
19459/** 17339 var tracker = getTracker(node);
19460 * Copyright (c) 2013-present, Facebook, Inc. 17340 // if there is no tracker at this point it's unlikely
19461 * 17341 // that trying again will succeed
19462 * This source code is licensed under the MIT license found in the 17342 if (!tracker) {
19463 * LICENSE file in the root directory of this source tree. 17343 return true;
19464 *
19465 * @providesModule isCustomComponent
19466 *
19467 */
19468
19469function isCustomComponent(tagName, props) {
19470 if (tagName.indexOf('-') === -1) {
19471 return typeof props.is === 'string';
19472 } 17344 }
19473 switch (tagName) { 17345
19474 // These are reserved SVG and MathML elements. 17346 var lastValue = tracker.getValue();
19475 // We don't mind this whitelist too much because we expect it to never grow. 17347 var nextValue = getValueFromNode(node);
19476 // The alternative is to track the namespace in a few places which is convoluted. 17348 if (nextValue !== lastValue) {
19477 // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts 17349 tracker.setValue(nextValue);
19478 case 'annotation-xml': 17350 return true;
19479 case 'color-profile':
19480 case 'font-face':
19481 case 'font-face-src':
19482 case 'font-face-uri':
19483 case 'font-face-format':
19484 case 'font-face-name':
19485 case 'missing-glyph':
19486 return false;
19487 default:
19488 return true;
19489 } 17351 }
17352 return false;
19490} 17353}
19491 17354
19492var isCustomComponent_1 = isCustomComponent; 17355var eventTypes$1 = {
17356 change: {
17357 phasedRegistrationNames: {
17358 bubbled: 'onChange',
17359 captured: 'onChangeCapture'
17360 },
17361 dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']
17362 }
17363};
19493 17364
17365function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
17366 var event = SyntheticEvent$1.getPooled(eventTypes$1.change, inst, nativeEvent, target);
17367 event.type = 'change';
17368 // Flag this event loop as needing state restore.
17369 enqueueStateRestore(target);
17370 accumulateTwoPhaseDispatches(event);
17371 return event;
17372}
19494/** 17373/**
19495 * Copyright (c) 2013-present, Facebook, Inc. 17374 * For IE shims
19496 *
19497 * This source code is licensed under the MIT license found in the
19498 * LICENSE file in the root directory of this source tree.
19499 *
19500 * @providesModule createMicrosoftUnsafeLocalFunction
19501 */ 17375 */
19502 17376var activeElement = null;
19503/* globals MSApp */ 17377var activeElementInst = null;
19504 17378
19505/** 17379/**
19506 * Create a function which has 'unsafe' privileges (required by windows8 apps) 17380 * SECTION: handle `change` event
19507 */ 17381 */
17382function shouldUseChangeEvent(elem) {
17383 var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
17384 return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
17385}
19508 17386
19509var createMicrosoftUnsafeLocalFunction = function (func) { 17387function manualDispatchChangeEvent(nativeEvent) {
19510 if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { 17388 var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));
19511 return function (arg0, arg1, arg2, arg3) {
19512 MSApp.execUnsafeLocalFunction(function () {
19513 return func(arg0, arg1, arg2, arg3);
19514 });
19515 };
19516 } else {
19517 return func;
19518 }
19519};
19520 17389
19521var createMicrosoftUnsafeLocalFunction_1 = createMicrosoftUnsafeLocalFunction; 17390 // If change and propertychange bubbled, we'd just bind to it like all the
17391 // other events and have it go through ReactBrowserEventEmitter. Since it
17392 // doesn't, we manually listen for the events and so we have to enqueue and
17393 // process the abstract event manually.
17394 //
17395 // Batching is necessary here in order to ensure that all event handlers run
17396 // before the next rerender (including event handlers attached to ancestor
17397 // elements instead of directly on the input). Without this, controlled
17398 // components don't work properly in conjunction with event bubbling because
17399 // the component is rerendered and the value reverted before all the event
17400 // handlers can run. See https://github.com/facebook/react/issues/708.
17401 batchedUpdates(runEventInBatch, event);
17402}
19522 17403
19523var Namespaces$1 = DOMNamespaces.Namespaces; 17404function runEventInBatch(event) {
17405 enqueueEvents(event);
17406 processEventQueue(false);
17407}
19524 17408
17409function getInstIfValueChanged(targetInst) {
17410 var targetNode = getNodeFromInstance$1(targetInst);
17411 if (updateValueIfChanged(targetNode)) {
17412 return targetInst;
17413 }
17414}
19525 17415
19526// SVG temp container for IE lacking innerHTML 17416function getTargetInstForChangeEvent(topLevelType, targetInst) {
19527var reusableSVGContainer; 17417 if (topLevelType === 'topChange') {
17418 return targetInst;
17419 }
17420}
19528 17421
19529/** 17422/**
19530 * Set the innerHTML property of a node 17423 * SECTION: handle `input` event
19531 *
19532 * @param {DOMElement} node
19533 * @param {string} html
19534 * @internal
19535 */ 17424 */
19536var setInnerHTML = createMicrosoftUnsafeLocalFunction_1(function (node, html) { 17425var isInputEventSupported = false;
19537 // IE does not have innerHTML for SVG nodes, so instead we inject the 17426if (ExecutionEnvironment.canUseDOM) {
19538 // new markup in a temp node and then move the child nodes across into 17427 // IE9 claims to support the input event but fails to trigger it when
19539 // the target node 17428 // deleting text, so we ignore its input events.
19540 if (node.namespaceURI === Namespaces$1.svg && !('innerHTML' in node)) { 17429 isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
19541 reusableSVGContainer = reusableSVGContainer || document.createElement('div'); 17430}
19542 reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';
19543 var svgNode = reusableSVGContainer.firstChild;
19544 while (svgNode.firstChild) {
19545 node.appendChild(svgNode.firstChild);
19546 }
19547 } else {
19548 node.innerHTML = html;
19549 }
19550});
19551 17431
19552var setInnerHTML_1 = setInnerHTML; 17432/**
17433 * (For IE <=9) Starts tracking propertychange events on the passed-in element
17434 * and override the value property so that we can distinguish user events from
17435 * value changes in JS.
17436 */
17437function startWatchingForValueChange(target, targetInst) {
17438 activeElement = target;
17439 activeElementInst = targetInst;
17440 activeElement.attachEvent('onpropertychange', handlePropertyChange);
17441}
19553 17442
19554/** 17443/**
19555 * Copyright (c) 2016-present, Facebook, Inc. 17444 * (For IE <=9) Removes the event listeners from the currently-tracked element,
19556 * 17445 * if any exists.
19557 * This source code is licensed under the MIT license found in the
19558 * LICENSE file in the root directory of this source tree.
19559 *
19560 * Based on the escape-html library, which is used under the MIT License below:
19561 *
19562 * Copyright (c) 2012-2013 TJ Holowaychuk
19563 * Copyright (c) 2015 Andreas Lubbe
19564 * Copyright (c) 2015 Tiancheng "Timothy" Gu
19565 *
19566 * Permission is hereby granted, free of charge, to any person obtaining
19567 * a copy of this software and associated documentation files (the
19568 * 'Software'), to deal in the Software without restriction, including
19569 * without limitation the rights to use, copy, modify, merge, publish,
19570 * distribute, sublicense, and/or sell copies of the Software, and to
19571 * permit persons to whom the Software is furnished to do so, subject to
19572 * the following conditions:
19573 *
19574 * The above copyright notice and this permission notice shall be
19575 * included in all copies or substantial portions of the Software.
19576 *
19577 * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
19578 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19579 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19580 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19581 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19582 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
19583 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19584 *
19585 * @providesModule escapeTextContentForBrowser
19586 */ 17446 */
17447function stopWatchingForValueChange() {
17448 if (!activeElement) {
17449 return;
17450 }
17451 activeElement.detachEvent('onpropertychange', handlePropertyChange);
17452 activeElement = null;
17453 activeElementInst = null;
17454}
19587 17455
19588// code copied and modified from escape-html
19589/** 17456/**
19590 * Module variables. 17457 * (For IE <=9) Handles a propertychange event, sending a `change` event if
19591 * @private 17458 * the value of the active element has changed.
19592 */ 17459 */
17460function handlePropertyChange(nativeEvent) {
17461 if (nativeEvent.propertyName !== 'value') {
17462 return;
17463 }
17464 if (getInstIfValueChanged(activeElementInst)) {
17465 manualDispatchChangeEvent(nativeEvent);
17466 }
17467}
19593 17468
19594var matchHtmlRegExp = /["'&<>]/; 17469function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
17470 if (topLevelType === 'topFocus') {
17471 // In IE9, propertychange fires for most input events but is buggy and
17472 // doesn't fire when text is deleted, but conveniently, selectionchange
17473 // appears to fire in all of the remaining cases so we catch those and
17474 // forward the event if the value has changed
17475 // In either case, we don't want to call the event handler if the value
17476 // is changed from JS so we redefine a setter for `.value` that updates
17477 // our activeElementValue variable, allowing us to ignore those changes
17478 //
17479 // stopWatching() should be a noop here but we call it just in case we
17480 // missed a blur event somehow.
17481 stopWatchingForValueChange();
17482 startWatchingForValueChange(target, targetInst);
17483 } else if (topLevelType === 'topBlur') {
17484 stopWatchingForValueChange();
17485 }
17486}
17487
17488// For IE8 and IE9.
17489function getTargetInstForInputEventPolyfill(topLevelType, targetInst) {
17490 if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {
17491 // On the selectionchange event, the target is just document which isn't
17492 // helpful for us so just check activeElement instead.
17493 //
17494 // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
17495 // propertychange on the first input event after setting `value` from a
17496 // script and fires only keydown, keypress, keyup. Catching keyup usually
17497 // gets it and catching keydown lets us fire an event for the first
17498 // keystroke if user does a key repeat (it'll be a little delayed: right
17499 // before the second keystroke). Other input methods (e.g., paste) seem to
17500 // fire selectionchange normally.
17501 return getInstIfValueChanged(activeElementInst);
17502 }
17503}
19595 17504
19596/** 17505/**
19597 * Escape special characters in the given string of html. 17506 * SECTION: handle `click` event
19598 *
19599 * @param {string} string The string to escape for inserting into HTML
19600 * @return {string}
19601 * @public
19602 */ 17507 */
17508function shouldUseClickEvent(elem) {
17509 // Use the `click` event to detect changes to checkbox and radio inputs.
17510 // This approach works across all browsers, whereas `change` does not fire
17511 // until `blur` in IE8.
17512 var nodeName = elem.nodeName;
17513 return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
17514}
19603 17515
19604function escapeHtml(string) { 17516function getTargetInstForClickEvent(topLevelType, targetInst) {
19605 var str = '' + string; 17517 if (topLevelType === 'topClick') {
19606 var match = matchHtmlRegExp.exec(str); 17518 return getInstIfValueChanged(targetInst);
19607
19608 if (!match) {
19609 return str;
19610 } 17519 }
17520}
19611 17521
19612 var escape; 17522function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) {
19613 var html = ''; 17523 if (topLevelType === 'topInput' || topLevelType === 'topChange') {
19614 var index = 0; 17524 return getInstIfValueChanged(targetInst);
19615 var lastIndex = 0; 17525 }
17526}
19616 17527
19617 for (index = match.index; index < str.length; index++) { 17528function handleControlledInputBlur(inst, node) {
19618 switch (str.charCodeAt(index)) { 17529 // TODO: In IE, inst is occasionally null. Why?
19619 case 34: 17530 if (inst == null) {
19620 // " 17531 return;
19621 escape = '&quot;'; 17532 }
19622 break;
19623 case 38:
19624 // &
19625 escape = '&amp;';
19626 break;
19627 case 39:
19628 // '
19629 escape = '&#x27;'; // modified from escape-html; used to be '&#39'
19630 break;
19631 case 60:
19632 // <
19633 escape = '&lt;';
19634 break;
19635 case 62:
19636 // >
19637 escape = '&gt;';
19638 break;
19639 default:
19640 continue;
19641 }
19642 17533
19643 if (lastIndex !== index) { 17534 // Fiber and ReactDOM keep wrapper state in separate places
19644 html += str.substring(lastIndex, index); 17535 var state = inst._wrapperState || node._wrapperState;
19645 }
19646 17536
19647 lastIndex = index + 1; 17537 if (!state || !state.controlled || node.type !== 'number') {
19648 html += escape; 17538 return;
19649 } 17539 }
19650 17540
19651 return lastIndex !== index ? html + str.substring(lastIndex, index) : html; 17541 // If controlled, assign the value attribute to the current value on blur
17542 var value = '' + node.value;
17543 if (node.getAttribute('value') !== value) {
17544 node.setAttribute('value', value);
17545 }
19652} 17546}
19653// end code copied and modified from escape-html
19654 17547
19655/** 17548/**
19656 * Escapes text to prevent scripting attacks. 17549 * This plugin creates an `onChange` event that normalizes change events
17550 * across form elements. This event fires at a time when it's possible to
17551 * change the element's value without seeing a flicker.
19657 * 17552 *
19658 * @param {*} text Text value to escape. 17553 * Supported elements are:
19659 * @return {string} An escaped string. 17554 * - input (see `isTextInputElement`)
17555 * - textarea
17556 * - select
19660 */ 17557 */
19661function escapeTextContentForBrowser(text) { 17558var ChangeEventPlugin = {
19662 if (typeof text === 'boolean' || typeof text === 'number') { 17559 eventTypes: eventTypes$1,
19663 // this shortcircuit helps perf for types that we know will never have
19664 // special characters, especially given that this function is used often
19665 // for numeric dom ids.
19666 return '' + text;
19667 }
19668 return escapeHtml(text);
19669}
19670 17560
19671var escapeTextContentForBrowser_1 = escapeTextContentForBrowser; 17561 _isInputEventSupported: isInputEventSupported,
19672 17562
19673var TEXT_NODE$2 = HTMLNodeType_1.TEXT_NODE; 17563 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
17564 var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;
19674 17565
19675/** 17566 var getTargetInstFunc, handleEventFunc;
19676 * Set the textContent property of a node, ensuring that whitespace is preserved 17567 if (shouldUseChangeEvent(targetNode)) {
19677 * even in IE8. innerText is a poor substitute for textContent and, among many 17568 getTargetInstFunc = getTargetInstForChangeEvent;
19678 * issues, inserts <br> instead of the literal newline chars. innerHTML behaves 17569 } else if (isTextInputElement(targetNode)) {
19679 * as it should. 17570 if (isInputEventSupported) {
19680 * 17571 getTargetInstFunc = getTargetInstForInputOrChangeEvent;
19681 * @param {DOMElement} node 17572 } else {
19682 * @param {string} text 17573 getTargetInstFunc = getTargetInstForInputEventPolyfill;
19683 * @internal 17574 handleEventFunc = handleEventsForInputEventPolyfill;
19684 */ 17575 }
17576 } else if (shouldUseClickEvent(targetNode)) {
17577 getTargetInstFunc = getTargetInstForClickEvent;
17578 }
19685 17579
17580 if (getTargetInstFunc) {
17581 var inst = getTargetInstFunc(topLevelType, targetInst);
17582 if (inst) {
17583 var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
17584 return event;
17585 }
17586 }
19686 17587
19687var setTextContent = function (node, text) { 17588 if (handleEventFunc) {
19688 if (text) { 17589 handleEventFunc(topLevelType, targetNode, targetInst);
19689 var firstChild = node.firstChild; 17590 }
19690 17591
19691 if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE$2) { 17592 // When blurring, set the value attribute for number inputs
19692 firstChild.nodeValue = text; 17593 if (topLevelType === 'topBlur') {
19693 return; 17594 handleControlledInputBlur(targetInst, targetNode);
19694 } 17595 }
19695 } 17596 }
19696 node.textContent = text;
19697}; 17597};
19698 17598
19699if (ExecutionEnvironment.canUseDOM) {
19700 if (!('textContent' in document.documentElement)) {
19701 setTextContent = function (node, text) {
19702 if (node.nodeType === TEXT_NODE$2) {
19703 node.nodeValue = text;
19704 return;
19705 }
19706 setInnerHTML_1(node, escapeTextContentForBrowser_1(text));
19707 };
19708 }
19709}
19710
19711var setTextContent_1 = setTextContent;
19712
19713/** 17599/**
19714 * Copyright (c) 2013-present, Facebook, Inc. 17600 * Module that is injectable into `EventPluginHub`, that specifies a
19715 * 17601 * deterministic ordering of `EventPlugin`s. A convenient way to reason about
19716 * This source code is licensed under the MIT license found in the 17602 * plugins, without having to package every one of them. This is better than
19717 * LICENSE file in the root directory of this source tree. 17603 * having plugins be ordered in the same order that they are injected because
19718 * 17604 * that ordering would be influenced by the packaging order.
19719 * @providesModule validAriaProperties 17605 * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
17606 * preventing default on events is convenient in `SimpleEventPlugin` handlers.
19720 */ 17607 */
17608var DOMEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
19721 17609
19722var ariaProperties = { 17610/**
19723 'aria-current': 0, // state 17611 * @interface UIEvent
19724 'aria-details': 0, 17612 * @see http://www.w3.org/TR/DOM-Level-3-Events/
19725 'aria-disabled': 0, // state 17613 */
19726 'aria-hidden': 0, // state 17614var UIEventInterface = {
19727 'aria-invalid': 0, // state 17615 view: null,
19728 'aria-keyshortcuts': 0, 17616 detail: null
19729 'aria-label': 0,
19730 'aria-roledescription': 0,
19731 // Widget Attributes
19732 'aria-autocomplete': 0,
19733 'aria-checked': 0,
19734 'aria-expanded': 0,
19735 'aria-haspopup': 0,
19736 'aria-level': 0,
19737 'aria-modal': 0,
19738 'aria-multiline': 0,
19739 'aria-multiselectable': 0,
19740 'aria-orientation': 0,
19741 'aria-placeholder': 0,
19742 'aria-pressed': 0,
19743 'aria-readonly': 0,
19744 'aria-required': 0,
19745 'aria-selected': 0,
19746 'aria-sort': 0,
19747 'aria-valuemax': 0,
19748 'aria-valuemin': 0,
19749 'aria-valuenow': 0,
19750 'aria-valuetext': 0,
19751 // Live Region Attributes
19752 'aria-atomic': 0,
19753 'aria-busy': 0,
19754 'aria-live': 0,
19755 'aria-relevant': 0,
19756 // Drag-and-Drop Attributes
19757 'aria-dropeffect': 0,
19758 'aria-grabbed': 0,
19759 // Relationship Attributes
19760 'aria-activedescendant': 0,
19761 'aria-colcount': 0,
19762 'aria-colindex': 0,
19763 'aria-colspan': 0,
19764 'aria-controls': 0,
19765 'aria-describedby': 0,
19766 'aria-errormessage': 0,
19767 'aria-flowto': 0,
19768 'aria-labelledby': 0,
19769 'aria-owns': 0,
19770 'aria-posinset': 0,
19771 'aria-rowcount': 0,
19772 'aria-rowindex': 0,
19773 'aria-rowspan': 0,
19774 'aria-setsize': 0
19775}; 17617};
19776 17618
19777var validAriaProperties$1 = ariaProperties; 17619/**
19778 17620 * @param {object} dispatchConfig Configuration used to dispatch this event.
19779var warnedProperties = {}; 17621 * @param {string} dispatchMarker Marker identifying the event target.
19780var rARIA = new RegExp('^(aria)-[' + DOMProperty_1.ATTRIBUTE_NAME_CHAR + ']*$'); 17622 * @param {object} nativeEvent Native browser event.
19781var rARIACamel = new RegExp('^(aria)[A-Z][' + DOMProperty_1.ATTRIBUTE_NAME_CHAR + ']*$'); 17623 * @extends {SyntheticEvent}
19782 17624 */
19783var hasOwnProperty = Object.prototype.hasOwnProperty; 17625function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
19784 17626 return SyntheticEvent$1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
19785{ 17627}
19786 var warning$14 = require$$0;
19787 17628
19788 var _require$5 = ReactGlobalSharedState_1, 17629SyntheticEvent$1.augmentClass(SyntheticUIEvent, UIEventInterface);
19789 ReactComponentTreeHook$1 = _require$5.ReactComponentTreeHook,
19790 ReactDebugCurrentFrame$1 = _require$5.ReactDebugCurrentFrame;
19791 17630
19792 var getStackAddendumByID = ReactComponentTreeHook$1.getStackAddendumByID; 17631/**
17632 * Translation from modifier key to the associated property in the event.
17633 * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
17634 */
19793 17635
17636var modifierKeyToProp = {
17637 Alt: 'altKey',
17638 Control: 'ctrlKey',
17639 Meta: 'metaKey',
17640 Shift: 'shiftKey'
17641};
19794 17642
19795 var validAriaProperties = validAriaProperties$1; 17643// IE8 does not implement getModifierState so we simply map it to the only
17644// modifier keys exposed by the event itself, does not support Lock-keys.
17645// Currently, all major browsers except Chrome seems to support Lock-keys.
17646function modifierStateGetter(keyArg) {
17647 var syntheticEvent = this;
17648 var nativeEvent = syntheticEvent.nativeEvent;
17649 if (nativeEvent.getModifierState) {
17650 return nativeEvent.getModifierState(keyArg);
17651 }
17652 var keyProp = modifierKeyToProp[keyArg];
17653 return keyProp ? !!nativeEvent[keyProp] : false;
19796} 17654}
19797 17655
19798function getStackAddendum(debugID) { 17656function getEventModifierState(nativeEvent) {
19799 if (debugID != null) { 17657 return modifierStateGetter;
19800 // This can only happen on Stack
19801 return getStackAddendumByID(debugID);
19802 } else {
19803 // This can only happen on Fiber / Server
19804 var stack = ReactDebugCurrentFrame$1.getStackAddendum();
19805 return stack != null ? stack : '';
19806 }
19807} 17658}
19808 17659
19809function validateProperty(tagName, name, debugID) { 17660/**
19810 if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) { 17661 * @interface MouseEvent
19811 return true; 17662 * @see http://www.w3.org/TR/DOM-Level-3-Events/
17663 */
17664var MouseEventInterface = {
17665 screenX: null,
17666 screenY: null,
17667 clientX: null,
17668 clientY: null,
17669 pageX: null,
17670 pageY: null,
17671 ctrlKey: null,
17672 shiftKey: null,
17673 altKey: null,
17674 metaKey: null,
17675 getModifierState: getEventModifierState,
17676 button: null,
17677 buttons: null,
17678 relatedTarget: function (event) {
17679 return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
19812 } 17680 }
17681};
19813 17682
19814 if (rARIACamel.test(name)) { 17683/**
19815 var ariaName = 'aria-' + name.slice(4).toLowerCase(); 17684 * @param {object} dispatchConfig Configuration used to dispatch this event.
19816 var correctName = validAriaProperties.hasOwnProperty(ariaName) ? ariaName : null; 17685 * @param {string} dispatchMarker Marker identifying the event target.
17686 * @param {object} nativeEvent Native browser event.
17687 * @extends {SyntheticUIEvent}
17688 */
17689function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
17690 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
17691}
19817 17692
19818 // If this is an aria-* attribute, but is not listed in the known DOM 17693SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
19819 // DOM properties, then it is an invalid aria-* attribute. 17694
19820 if (correctName == null) { 17695var eventTypes$2 = {
19821 warning$14(false, 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.%s', name, getStackAddendum(debugID)); 17696 mouseEnter: {
19822 warnedProperties[name] = true; 17697 registrationName: 'onMouseEnter',
19823 return true; 17698 dependencies: ['topMouseOut', 'topMouseOver']
19824 } 17699 },
19825 // aria-* attributes should be lowercase; suggest the lowercase version. 17700 mouseLeave: {
19826 if (name !== correctName) { 17701 registrationName: 'onMouseLeave',
19827 warning$14(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?%s', name, correctName, getStackAddendum(debugID)); 17702 dependencies: ['topMouseOut', 'topMouseOver']
19828 warnedProperties[name] = true;
19829 return true;
19830 }
19831 } 17703 }
17704};
19832 17705
19833 if (rARIA.test(name)) { 17706var EnterLeaveEventPlugin = {
19834 var lowerCasedName = name.toLowerCase(); 17707 eventTypes: eventTypes$2,
19835 var standardName = validAriaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null;
19836 17708
19837 // If this is an aria-* attribute, but is not listed in the known DOM 17709 /**
19838 // DOM properties, then it is an invalid aria-* attribute. 17710 * For almost every interaction we care about, there will be both a top-level
19839 if (standardName == null) { 17711 * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
19840 warnedProperties[name] = true; 17712 * we do not extract duplicate events. However, moving the mouse into the
19841 return false; 17713 * browser from outside will not fire a `mouseout` event. In this case, we use
17714 * the `mouseover` top-level event.
17715 */
17716 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
17717 if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
17718 return null;
19842 } 17719 }
19843 // aria-* attributes should be lowercase; suggest the lowercase version. 17720 if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') {
19844 if (name !== standardName) { 17721 // Must not be a mouse in or mouse out - ignoring.
19845 warning$14(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?%s', name, standardName, getStackAddendum(debugID)); 17722 return null;
19846 warnedProperties[name] = true;
19847 return true;
19848 } 17723 }
19849 }
19850 17724
19851 return true; 17725 var win;
19852} 17726 if (nativeEventTarget.window === nativeEventTarget) {
17727 // `nativeEventTarget` is probably a window object.
17728 win = nativeEventTarget;
17729 } else {
17730 // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
17731 var doc = nativeEventTarget.ownerDocument;
17732 if (doc) {
17733 win = doc.defaultView || doc.parentWindow;
17734 } else {
17735 win = window;
17736 }
17737 }
19853 17738
19854function warnInvalidARIAProps(type, props, debugID) { 17739 var from;
19855 var invalidProps = []; 17740 var to;
17741 if (topLevelType === 'topMouseOut') {
17742 from = targetInst;
17743 var related = nativeEvent.relatedTarget || nativeEvent.toElement;
17744 to = related ? getClosestInstanceFromNode(related) : null;
17745 } else {
17746 // Moving to a node from outside the window.
17747 from = null;
17748 to = targetInst;
17749 }
19856 17750
19857 for (var key in props) { 17751 if (from === to) {
19858 var isValid = validateProperty(type, key, debugID); 17752 // Nothing pertains to our managed components.
19859 if (!isValid) { 17753 return null;
19860 invalidProps.push(key);
19861 } 17754 }
19862 }
19863 17755
19864 var unknownPropString = invalidProps.map(function (prop) { 17756 var fromNode = from == null ? win : getNodeFromInstance$1(from);
19865 return '`' + prop + '`'; 17757 var toNode = to == null ? win : getNodeFromInstance$1(to);
19866 }).join(', ');
19867 17758
19868 if (invalidProps.length === 1) { 17759 var leave = SyntheticMouseEvent.getPooled(eventTypes$2.mouseLeave, from, nativeEvent, nativeEventTarget);
19869 warning$14(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum(debugID)); 17760 leave.type = 'mouseleave';
19870 } else if (invalidProps.length > 1) { 17761 leave.target = fromNode;
19871 warning$14(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum(debugID)); 17762 leave.relatedTarget = toNode;
19872 }
19873}
19874 17763
19875function validateProperties(type, props, debugID /* Stack only */) { 17764 var enter = SyntheticMouseEvent.getPooled(eventTypes$2.mouseEnter, to, nativeEvent, nativeEventTarget);
19876 if (isCustomComponent_1(type, props)) { 17765 enter.type = 'mouseenter';
19877 return; 17766 enter.target = toNode;
19878 } 17767 enter.relatedTarget = fromNode;
19879 warnInvalidARIAProps(type, props, debugID);
19880}
19881 17768
19882var ReactDOMInvalidARIAHook$1 = { 17769 accumulateEnterLeaveDispatches(leave, enter, from, to);
19883 // Fiber 17770
19884 validateProperties: validateProperties, 17771 return [leave, enter];
19885 // Stack
19886 onBeforeMountComponent: function (debugID, element) {
19887 if (true && element != null && typeof element.type === 'string') {
19888 validateProperties(element.type, element.props, debugID);
19889 }
19890 },
19891 onBeforeUpdateComponent: function (debugID, element) {
19892 if (true && element != null && typeof element.type === 'string') {
19893 validateProperties(element.type, element.props, debugID);
19894 }
19895 } 17772 }
19896}; 17773};
19897 17774
19898var ReactDOMInvalidARIAHook_1 = ReactDOMInvalidARIAHook$1; 17775/**
17776 * `ReactInstanceMap` maintains a mapping from a public facing stateful
17777 * instance (key) and the internal representation (value). This allows public
17778 * methods to accept the user facing instance as an argument and map them back
17779 * to internal methods.
17780 *
17781 * Note that this module is currently shared and assumed to be stateless.
17782 * If this becomes an actual Map, that will break.
17783 */
19899 17784
19900{ 17785/**
19901 var warning$15 = require$$0; 17786 * This API should be called `delete` but we'd have to make sure to always
17787 * transform these to strings for IE support. When this transform is fully
17788 * supported we can rename it.
17789 */
19902 17790
19903 var _require$6 = ReactGlobalSharedState_1,
19904 ReactComponentTreeHook$2 = _require$6.ReactComponentTreeHook,
19905 ReactDebugCurrentFrame$2 = _require$6.ReactDebugCurrentFrame;
19906 17791
19907 var getStackAddendumByID$1 = ReactComponentTreeHook$2.getStackAddendumByID; 17792function get(key) {
17793 return key._reactInternalFiber;
19908} 17794}
19909 17795
19910var didWarnValueNull = false; 17796function has(key) {
19911 17797 return key._reactInternalFiber !== undefined;
19912function getStackAddendum$1(debugID) {
19913 if (debugID != null) {
19914 // This can only happen on Stack
19915 return getStackAddendumByID$1(debugID);
19916 } else {
19917 // This can only happen on Fiber / Server
19918 var stack = ReactDebugCurrentFrame$2.getStackAddendum();
19919 return stack != null ? stack : '';
19920 }
19921} 17798}
19922 17799
19923function validateProperties$1(type, props, debugID /* Stack only */) { 17800function set(key, value) {
19924 if (type !== 'input' && type !== 'textarea' && type !== 'select') { 17801 key._reactInternalFiber = value;
19925 return;
19926 }
19927 if (props != null && props.value === null && !didWarnValueNull) {
19928 warning$15(false, '`value` prop on `%s` should not be null. ' + 'Consider using the empty string to clear the component or `undefined` ' + 'for uncontrolled components.%s', type, getStackAddendum$1(debugID));
19929
19930 didWarnValueNull = true;
19931 }
19932} 17802}
19933 17803
19934var ReactDOMNullInputValuePropHook$1 = { 17804var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
19935 // Fiber
19936 validateProperties: validateProperties$1,
19937 // Stack
19938 onBeforeMountComponent: function (debugID, element) {
19939 if (true && element != null && typeof element.type === 'string') {
19940 validateProperties$1(element.type, element.props, debugID);
19941 }
19942 },
19943 onBeforeUpdateComponent: function (debugID, element) {
19944 if (true && element != null && typeof element.type === 'string') {
19945 validateProperties$1(element.type, element.props, debugID);
19946 }
19947 }
19948};
19949
19950var ReactDOMNullInputValuePropHook_1 = ReactDOMNullInputValuePropHook$1;
19951
19952/**
19953 * Copyright (c) 2013-present, Facebook, Inc.
19954 *
19955 * This source code is licensed under the MIT license found in the
19956 * LICENSE file in the root directory of this source tree.
19957 *
19958 * @providesModule possibleStandardNames
19959 */
19960 17805
19961// When adding attributes to the HTML or SVG whitelist, be sure to 17806var ReactCurrentOwner = ReactInternals.ReactCurrentOwner;
19962// also add them to this module to ensure casing and incorrect name 17807var ReactDebugCurrentFrame = ReactInternals.ReactDebugCurrentFrame;
19963// warnings.
19964var possibleStandardNames$1 = {
19965 // HTML
19966 accept: 'accept',
19967 acceptcharset: 'acceptCharset',
19968 'accept-charset': 'acceptCharset',
19969 accesskey: 'accessKey',
19970 action: 'action',
19971 allowfullscreen: 'allowFullScreen',
19972 allowtransparency: 'allowTransparency',
19973 alt: 'alt',
19974 as: 'as',
19975 async: 'async',
19976 autocapitalize: 'autoCapitalize',
19977 autocomplete: 'autoComplete',
19978 autocorrect: 'autoCorrect',
19979 autofocus: 'autoFocus',
19980 autoplay: 'autoPlay',
19981 autosave: 'autoSave',
19982 capture: 'capture',
19983 cellpadding: 'cellPadding',
19984 cellspacing: 'cellSpacing',
19985 challenge: 'challenge',
19986 charset: 'charSet',
19987 checked: 'checked',
19988 children: 'children',
19989 cite: 'cite',
19990 'class': 'className',
19991 classid: 'classID',
19992 classname: 'className',
19993 cols: 'cols',
19994 colspan: 'colSpan',
19995 content: 'content',
19996 contenteditable: 'contentEditable',
19997 contextmenu: 'contextMenu',
19998 controls: 'controls',
19999 controlslist: 'controlsList',
20000 coords: 'coords',
20001 crossorigin: 'crossOrigin',
20002 dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
20003 data: 'data',
20004 datetime: 'dateTime',
20005 'default': 'default',
20006 defaultchecked: 'defaultChecked',
20007 defaultvalue: 'defaultValue',
20008 defer: 'defer',
20009 dir: 'dir',
20010 disabled: 'disabled',
20011 download: 'download',
20012 draggable: 'draggable',
20013 enctype: 'encType',
20014 'for': 'htmlFor',
20015 form: 'form',
20016 formmethod: 'formMethod',
20017 formaction: 'formAction',
20018 formenctype: 'formEncType',
20019 formnovalidate: 'formNoValidate',
20020 formtarget: 'formTarget',
20021 frameborder: 'frameBorder',
20022 headers: 'headers',
20023 height: 'height',
20024 hidden: 'hidden',
20025 high: 'high',
20026 href: 'href',
20027 hreflang: 'hrefLang',
20028 htmlfor: 'htmlFor',
20029 httpequiv: 'httpEquiv',
20030 'http-equiv': 'httpEquiv',
20031 icon: 'icon',
20032 id: 'id',
20033 innerhtml: 'innerHTML',
20034 inputmode: 'inputMode',
20035 integrity: 'integrity',
20036 is: 'is',
20037 itemid: 'itemID',
20038 itemprop: 'itemProp',
20039 itemref: 'itemRef',
20040 itemscope: 'itemScope',
20041 itemtype: 'itemType',
20042 keyparams: 'keyParams',
20043 keytype: 'keyType',
20044 kind: 'kind',
20045 label: 'label',
20046 lang: 'lang',
20047 list: 'list',
20048 loop: 'loop',
20049 low: 'low',
20050 manifest: 'manifest',
20051 marginwidth: 'marginWidth',
20052 marginheight: 'marginHeight',
20053 max: 'max',
20054 maxlength: 'maxLength',
20055 media: 'media',
20056 mediagroup: 'mediaGroup',
20057 method: 'method',
20058 min: 'min',
20059 minlength: 'minLength',
20060 multiple: 'multiple',
20061 muted: 'muted',
20062 name: 'name',
20063 nonce: 'nonce',
20064 novalidate: 'noValidate',
20065 open: 'open',
20066 optimum: 'optimum',
20067 pattern: 'pattern',
20068 placeholder: 'placeholder',
20069 playsinline: 'playsInline',
20070 poster: 'poster',
20071 preload: 'preload',
20072 profile: 'profile',
20073 radiogroup: 'radioGroup',
20074 readonly: 'readOnly',
20075 referrerpolicy: 'referrerPolicy',
20076 rel: 'rel',
20077 required: 'required',
20078 reversed: 'reversed',
20079 role: 'role',
20080 rows: 'rows',
20081 rowspan: 'rowSpan',
20082 sandbox: 'sandbox',
20083 scope: 'scope',
20084 scoped: 'scoped',
20085 scrolling: 'scrolling',
20086 seamless: 'seamless',
20087 selected: 'selected',
20088 shape: 'shape',
20089 size: 'size',
20090 sizes: 'sizes',
20091 span: 'span',
20092 spellcheck: 'spellCheck',
20093 src: 'src',
20094 srcdoc: 'srcDoc',
20095 srclang: 'srcLang',
20096 srcset: 'srcSet',
20097 start: 'start',
20098 step: 'step',
20099 style: 'style',
20100 summary: 'summary',
20101 tabindex: 'tabIndex',
20102 target: 'target',
20103 title: 'title',
20104 type: 'type',
20105 usemap: 'useMap',
20106 value: 'value',
20107 width: 'width',
20108 wmode: 'wmode',
20109 wrap: 'wrap',
20110 17808
20111 // SVG 17809function getComponentName(fiber) {
20112 about: 'about', 17810 var type = fiber.type;
20113 accentheight: 'accentHeight',
20114 'accent-height': 'accentHeight',
20115 accumulate: 'accumulate',
20116 additive: 'additive',
20117 alignmentbaseline: 'alignmentBaseline',
20118 'alignment-baseline': 'alignmentBaseline',
20119 allowreorder: 'allowReorder',
20120 alphabetic: 'alphabetic',
20121 amplitude: 'amplitude',
20122 arabicform: 'arabicForm',
20123 'arabic-form': 'arabicForm',
20124 ascent: 'ascent',
20125 attributename: 'attributeName',
20126 attributetype: 'attributeType',
20127 autoreverse: 'autoReverse',
20128 azimuth: 'azimuth',
20129 basefrequency: 'baseFrequency',
20130 baselineshift: 'baselineShift',
20131 'baseline-shift': 'baselineShift',
20132 baseprofile: 'baseProfile',
20133 bbox: 'bbox',
20134 begin: 'begin',
20135 bias: 'bias',
20136 by: 'by',
20137 calcmode: 'calcMode',
20138 capheight: 'capHeight',
20139 'cap-height': 'capHeight',
20140 clip: 'clip',
20141 clippath: 'clipPath',
20142 'clip-path': 'clipPath',
20143 clippathunits: 'clipPathUnits',
20144 cliprule: 'clipRule',
20145 'clip-rule': 'clipRule',
20146 color: 'color',
20147 colorinterpolation: 'colorInterpolation',
20148 'color-interpolation': 'colorInterpolation',
20149 colorinterpolationfilters: 'colorInterpolationFilters',
20150 'color-interpolation-filters': 'colorInterpolationFilters',
20151 colorprofile: 'colorProfile',
20152 'color-profile': 'colorProfile',
20153 colorrendering: 'colorRendering',
20154 'color-rendering': 'colorRendering',
20155 contentscripttype: 'contentScriptType',
20156 contentstyletype: 'contentStyleType',
20157 cursor: 'cursor',
20158 cx: 'cx',
20159 cy: 'cy',
20160 d: 'd',
20161 datatype: 'datatype',
20162 decelerate: 'decelerate',
20163 descent: 'descent',
20164 diffuseconstant: 'diffuseConstant',
20165 direction: 'direction',
20166 display: 'display',
20167 divisor: 'divisor',
20168 dominantbaseline: 'dominantBaseline',
20169 'dominant-baseline': 'dominantBaseline',
20170 dur: 'dur',
20171 dx: 'dx',
20172 dy: 'dy',
20173 edgemode: 'edgeMode',
20174 elevation: 'elevation',
20175 enablebackground: 'enableBackground',
20176 'enable-background': 'enableBackground',
20177 end: 'end',
20178 exponent: 'exponent',
20179 externalresourcesrequired: 'externalResourcesRequired',
20180 fill: 'fill',
20181 fillopacity: 'fillOpacity',
20182 'fill-opacity': 'fillOpacity',
20183 fillrule: 'fillRule',
20184 'fill-rule': 'fillRule',
20185 filter: 'filter',
20186 filterres: 'filterRes',
20187 filterunits: 'filterUnits',
20188 floodopacity: 'floodOpacity',
20189 'flood-opacity': 'floodOpacity',
20190 floodcolor: 'floodColor',
20191 'flood-color': 'floodColor',
20192 focusable: 'focusable',
20193 fontfamily: 'fontFamily',
20194 'font-family': 'fontFamily',
20195 fontsize: 'fontSize',
20196 'font-size': 'fontSize',
20197 fontsizeadjust: 'fontSizeAdjust',
20198 'font-size-adjust': 'fontSizeAdjust',
20199 fontstretch: 'fontStretch',
20200 'font-stretch': 'fontStretch',
20201 fontstyle: 'fontStyle',
20202 'font-style': 'fontStyle',
20203 fontvariant: 'fontVariant',
20204 'font-variant': 'fontVariant',
20205 fontweight: 'fontWeight',
20206 'font-weight': 'fontWeight',
20207 format: 'format',
20208 from: 'from',
20209 fx: 'fx',
20210 fy: 'fy',
20211 g1: 'g1',
20212 g2: 'g2',
20213 glyphname: 'glyphName',
20214 'glyph-name': 'glyphName',
20215 glyphorientationhorizontal: 'glyphOrientationHorizontal',
20216 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
20217 glyphorientationvertical: 'glyphOrientationVertical',
20218 'glyph-orientation-vertical': 'glyphOrientationVertical',
20219 glyphref: 'glyphRef',
20220 gradienttransform: 'gradientTransform',
20221 gradientunits: 'gradientUnits',
20222 hanging: 'hanging',
20223 horizadvx: 'horizAdvX',
20224 'horiz-adv-x': 'horizAdvX',
20225 horizoriginx: 'horizOriginX',
20226 'horiz-origin-x': 'horizOriginX',
20227 ideographic: 'ideographic',
20228 imagerendering: 'imageRendering',
20229 'image-rendering': 'imageRendering',
20230 in2: 'in2',
20231 'in': 'in',
20232 inlist: 'inlist',
20233 intercept: 'intercept',
20234 k1: 'k1',
20235 k2: 'k2',
20236 k3: 'k3',
20237 k4: 'k4',
20238 k: 'k',
20239 kernelmatrix: 'kernelMatrix',
20240 kernelunitlength: 'kernelUnitLength',
20241 kerning: 'kerning',
20242 keypoints: 'keyPoints',
20243 keysplines: 'keySplines',
20244 keytimes: 'keyTimes',
20245 lengthadjust: 'lengthAdjust',
20246 letterspacing: 'letterSpacing',
20247 'letter-spacing': 'letterSpacing',
20248 lightingcolor: 'lightingColor',
20249 'lighting-color': 'lightingColor',
20250 limitingconeangle: 'limitingConeAngle',
20251 local: 'local',
20252 markerend: 'markerEnd',
20253 'marker-end': 'markerEnd',
20254 markerheight: 'markerHeight',
20255 markermid: 'markerMid',
20256 'marker-mid': 'markerMid',
20257 markerstart: 'markerStart',
20258 'marker-start': 'markerStart',
20259 markerunits: 'markerUnits',
20260 markerwidth: 'markerWidth',
20261 mask: 'mask',
20262 maskcontentunits: 'maskContentUnits',
20263 maskunits: 'maskUnits',
20264 mathematical: 'mathematical',
20265 mode: 'mode',
20266 numoctaves: 'numOctaves',
20267 offset: 'offset',
20268 opacity: 'opacity',
20269 operator: 'operator',
20270 order: 'order',
20271 orient: 'orient',
20272 orientation: 'orientation',
20273 origin: 'origin',
20274 overflow: 'overflow',
20275 overlineposition: 'overlinePosition',
20276 'overline-position': 'overlinePosition',
20277 overlinethickness: 'overlineThickness',
20278 'overline-thickness': 'overlineThickness',
20279 paintorder: 'paintOrder',
20280 'paint-order': 'paintOrder',
20281 panose1: 'panose1',
20282 'panose-1': 'panose1',
20283 pathlength: 'pathLength',
20284 patterncontentunits: 'patternContentUnits',
20285 patterntransform: 'patternTransform',
20286 patternunits: 'patternUnits',
20287 pointerevents: 'pointerEvents',
20288 'pointer-events': 'pointerEvents',
20289 points: 'points',
20290 pointsatx: 'pointsAtX',
20291 pointsaty: 'pointsAtY',
20292 pointsatz: 'pointsAtZ',
20293 prefix: 'prefix',
20294 preservealpha: 'preserveAlpha',
20295 preserveaspectratio: 'preserveAspectRatio',
20296 primitiveunits: 'primitiveUnits',
20297 property: 'property',
20298 r: 'r',
20299 radius: 'radius',
20300 refx: 'refX',
20301 refy: 'refY',
20302 renderingintent: 'renderingIntent',
20303 'rendering-intent': 'renderingIntent',
20304 repeatcount: 'repeatCount',
20305 repeatdur: 'repeatDur',
20306 requiredextensions: 'requiredExtensions',
20307 requiredfeatures: 'requiredFeatures',
20308 resource: 'resource',
20309 restart: 'restart',
20310 result: 'result',
20311 results: 'results',
20312 rotate: 'rotate',
20313 rx: 'rx',
20314 ry: 'ry',
20315 scale: 'scale',
20316 security: 'security',
20317 seed: 'seed',
20318 shaperendering: 'shapeRendering',
20319 'shape-rendering': 'shapeRendering',
20320 slope: 'slope',
20321 spacing: 'spacing',
20322 specularconstant: 'specularConstant',
20323 specularexponent: 'specularExponent',
20324 speed: 'speed',
20325 spreadmethod: 'spreadMethod',
20326 startoffset: 'startOffset',
20327 stddeviation: 'stdDeviation',
20328 stemh: 'stemh',
20329 stemv: 'stemv',
20330 stitchtiles: 'stitchTiles',
20331 stopcolor: 'stopColor',
20332 'stop-color': 'stopColor',
20333 stopopacity: 'stopOpacity',
20334 'stop-opacity': 'stopOpacity',
20335 strikethroughposition: 'strikethroughPosition',
20336 'strikethrough-position': 'strikethroughPosition',
20337 strikethroughthickness: 'strikethroughThickness',
20338 'strikethrough-thickness': 'strikethroughThickness',
20339 string: 'string',
20340 stroke: 'stroke',
20341 strokedasharray: 'strokeDasharray',
20342 'stroke-dasharray': 'strokeDasharray',
20343 strokedashoffset: 'strokeDashoffset',
20344 'stroke-dashoffset': 'strokeDashoffset',
20345 strokelinecap: 'strokeLinecap',
20346 'stroke-linecap': 'strokeLinecap',
20347 strokelinejoin: 'strokeLinejoin',
20348 'stroke-linejoin': 'strokeLinejoin',
20349 strokemiterlimit: 'strokeMiterlimit',
20350 'stroke-miterlimit': 'strokeMiterlimit',
20351 strokewidth: 'strokeWidth',
20352 'stroke-width': 'strokeWidth',
20353 strokeopacity: 'strokeOpacity',
20354 'stroke-opacity': 'strokeOpacity',
20355 suppresscontenteditablewarning: 'suppressContentEditableWarning',
20356 surfacescale: 'surfaceScale',
20357 systemlanguage: 'systemLanguage',
20358 tablevalues: 'tableValues',
20359 targetx: 'targetX',
20360 targety: 'targetY',
20361 textanchor: 'textAnchor',
20362 'text-anchor': 'textAnchor',
20363 textdecoration: 'textDecoration',
20364 'text-decoration': 'textDecoration',
20365 textlength: 'textLength',
20366 textrendering: 'textRendering',
20367 'text-rendering': 'textRendering',
20368 to: 'to',
20369 transform: 'transform',
20370 'typeof': 'typeof',
20371 u1: 'u1',
20372 u2: 'u2',
20373 underlineposition: 'underlinePosition',
20374 'underline-position': 'underlinePosition',
20375 underlinethickness: 'underlineThickness',
20376 'underline-thickness': 'underlineThickness',
20377 unicode: 'unicode',
20378 unicodebidi: 'unicodeBidi',
20379 'unicode-bidi': 'unicodeBidi',
20380 unicoderange: 'unicodeRange',
20381 'unicode-range': 'unicodeRange',
20382 unitsperem: 'unitsPerEm',
20383 'units-per-em': 'unitsPerEm',
20384 unselectable: 'unselectable',
20385 valphabetic: 'vAlphabetic',
20386 'v-alphabetic': 'vAlphabetic',
20387 values: 'values',
20388 vectoreffect: 'vectorEffect',
20389 'vector-effect': 'vectorEffect',
20390 version: 'version',
20391 vertadvy: 'vertAdvY',
20392 'vert-adv-y': 'vertAdvY',
20393 vertoriginx: 'vertOriginX',
20394 'vert-origin-x': 'vertOriginX',
20395 vertoriginy: 'vertOriginY',
20396 'vert-origin-y': 'vertOriginY',
20397 vhanging: 'vHanging',
20398 'v-hanging': 'vHanging',
20399 videographic: 'vIdeographic',
20400 'v-ideographic': 'vIdeographic',
20401 viewbox: 'viewBox',
20402 viewtarget: 'viewTarget',
20403 visibility: 'visibility',
20404 vmathematical: 'vMathematical',
20405 'v-mathematical': 'vMathematical',
20406 vocab: 'vocab',
20407 widths: 'widths',
20408 wordspacing: 'wordSpacing',
20409 'word-spacing': 'wordSpacing',
20410 writingmode: 'writingMode',
20411 'writing-mode': 'writingMode',
20412 x1: 'x1',
20413 x2: 'x2',
20414 x: 'x',
20415 xchannelselector: 'xChannelSelector',
20416 xheight: 'xHeight',
20417 'x-height': 'xHeight',
20418 xlinkactuate: 'xlinkActuate',
20419 'xlink:actuate': 'xlinkActuate',
20420 xlinkarcrole: 'xlinkArcrole',
20421 'xlink:arcrole': 'xlinkArcrole',
20422 xlinkhref: 'xlinkHref',
20423 'xlink:href': 'xlinkHref',
20424 xlinkrole: 'xlinkRole',
20425 'xlink:role': 'xlinkRole',
20426 xlinkshow: 'xlinkShow',
20427 'xlink:show': 'xlinkShow',
20428 xlinktitle: 'xlinkTitle',
20429 'xlink:title': 'xlinkTitle',
20430 xlinktype: 'xlinkType',
20431 'xlink:type': 'xlinkType',
20432 xmlbase: 'xmlBase',
20433 'xml:base': 'xmlBase',
20434 xmllang: 'xmlLang',
20435 'xml:lang': 'xmlLang',
20436 xmlns: 'xmlns',
20437 'xml:space': 'xmlSpace',
20438 xmlnsxlink: 'xmlnsXlink',
20439 'xmlns:xlink': 'xmlnsXlink',
20440 xmlspace: 'xmlSpace',
20441 y1: 'y1',
20442 y2: 'y2',
20443 y: 'y',
20444 ychannelselector: 'yChannelSelector',
20445 z: 'z',
20446 zoomandpan: 'zoomAndPan'
20447};
20448 17811
20449var possibleStandardNames_1 = possibleStandardNames$1; 17812 if (typeof type === 'string') {
17813 return type;
17814 }
17815 if (typeof type === 'function') {
17816 return type.displayName || type.name;
17817 }
17818 return null;
17819}
20450 17820
20451{ 17821// Don't change these two values:
20452 var warning$16 = require$$0; 17822var NoEffect = 0; // 0b00000000
17823var PerformedWork = 1; // 0b00000001
20453 17824
20454 var _require$7 = ReactGlobalSharedState_1, 17825// You can change the rest (and add more).
20455 ReactComponentTreeHook$3 = _require$7.ReactComponentTreeHook, 17826var Placement = 2; // 0b00000010
20456 ReactDebugCurrentFrame$3 = _require$7.ReactDebugCurrentFrame; 17827var Update = 4; // 0b00000100
17828var PlacementAndUpdate = 6; // 0b00000110
17829var Deletion = 8; // 0b00001000
17830var ContentReset = 16; // 0b00010000
17831var Callback = 32; // 0b00100000
17832var Err = 64; // 0b01000000
17833var Ref = 128; // 0b10000000
20457 17834
20458 var getStackAddendumByID$2 = ReactComponentTreeHook$3.getStackAddendumByID; 17835var MOUNTING = 1;
20459} 17836var MOUNTED = 2;
17837var UNMOUNTED = 3;
20460 17838
20461function getStackAddendum$2(debugID) { 17839function isFiberMountedImpl(fiber) {
20462 if (debugID != null) { 17840 var node = fiber;
20463 // This can only happen on Stack 17841 if (!fiber.alternate) {
20464 return getStackAddendumByID$2(debugID); 17842 // If there is no alternate, this might be a new tree that isn't inserted
17843 // yet. If it is, then it will have a pending insertion effect on it.
17844 if ((node.effectTag & Placement) !== NoEffect) {
17845 return MOUNTING;
17846 }
17847 while (node['return']) {
17848 node = node['return'];
17849 if ((node.effectTag & Placement) !== NoEffect) {
17850 return MOUNTING;
17851 }
17852 }
20465 } else { 17853 } else {
20466 // This can only happen on Fiber / Server 17854 while (node['return']) {
20467 var stack = ReactDebugCurrentFrame$3.getStackAddendum(); 17855 node = node['return'];
20468 return stack != null ? stack : ''; 17856 }
20469 } 17857 }
17858 if (node.tag === HostRoot) {
17859 // TODO: Check if this was a nested HostRoot when used with
17860 // renderContainerIntoSubtree.
17861 return MOUNTED;
17862 }
17863 // If we didn't hit the root, that means that we're in an disconnected tree
17864 // that has been unmounted.
17865 return UNMOUNTED;
20470} 17866}
20471 17867
20472{ 17868function isFiberMounted(fiber) {
20473 var warnedProperties$1 = {}; 17869 return isFiberMountedImpl(fiber) === MOUNTED;
20474 var hasOwnProperty$1 = Object.prototype.hasOwnProperty; 17870}
20475 var EVENT_NAME_REGEX = /^on[A-Z]/;
20476 var rARIA$1 = new RegExp('^(aria)-[' + DOMProperty_1.ATTRIBUTE_NAME_CHAR + ']*$');
20477 var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + DOMProperty_1.ATTRIBUTE_NAME_CHAR + ']*$');
20478 var possibleStandardNames = possibleStandardNames_1;
20479
20480 var validateProperty$1 = function (tagName, name, value, debugID) {
20481 if (hasOwnProperty$1.call(warnedProperties$1, name) && warnedProperties$1[name]) {
20482 return true;
20483 }
20484 17871
20485 if (EventPluginRegistry_1.registrationNameModules.hasOwnProperty(name)) { 17872function isMounted(component) {
20486 return true; 17873 {
17874 var owner = ReactCurrentOwner.current;
17875 if (owner !== null && owner.tag === ClassComponent) {
17876 var ownerFiber = owner;
17877 var instance = ownerFiber.stateNode;
17878 warning(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(ownerFiber) || 'A component');
17879 instance._warnedAboutRefsInRender = true;
20487 } 17880 }
17881 }
20488 17882
20489 if (EventPluginRegistry_1.plugins.length === 0 && EVENT_NAME_REGEX.test(name)) { 17883 var fiber = get(component);
20490 // If no event plugins have been injected, we might be in a server environment. 17884 if (!fiber) {
20491 // Don't check events in this case. 17885 return false;
20492 return true; 17886 }
20493 } 17887 return isFiberMountedImpl(fiber) === MOUNTED;
17888}
20494 17889
20495 var lowerCasedName = name.toLowerCase(); 17890function assertIsMounted(fiber) {
20496 var registrationName = EventPluginRegistry_1.possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? EventPluginRegistry_1.possibleRegistrationNames[lowerCasedName] : null; 17891 !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
17892}
20497 17893
20498 if (registrationName != null) { 17894function findCurrentFiberUsingSlowPath(fiber) {
20499 warning$16(false, 'Invalid event handler property `%s`. Did you mean `%s`?%s', name, registrationName, getStackAddendum$2(debugID)); 17895 var alternate = fiber.alternate;
20500 warnedProperties$1[name] = true; 17896 if (!alternate) {
20501 return true; 17897 // If there is no alternate, then we only need to check if it is mounted.
17898 var state = isFiberMountedImpl(fiber);
17899 !(state !== UNMOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
17900 if (state === MOUNTING) {
17901 return null;
20502 } 17902 }
20503 17903 return fiber;
20504 if (lowerCasedName.indexOf('on') === 0) { 17904 }
20505 warning$16(false, 'Unknown event handler property `%s`. It will be ignored.%s', name, getStackAddendum$2(debugID)); 17905 // If we have two possible branches, we'll walk backwards up to the root
20506 warnedProperties$1[name] = true; 17906 // to see what path the root points to. On the way we may hit one of the
20507 return true; 17907 // special cases and we'll deal with them.
17908 var a = fiber;
17909 var b = alternate;
17910 while (true) {
17911 var parentA = a['return'];
17912 var parentB = parentA ? parentA.alternate : null;
17913 if (!parentA || !parentB) {
17914 // We're at the root.
17915 break;
20508 } 17916 }
20509 17917
20510 // Let the ARIA attribute hook validate ARIA attributes 17918 // If both copies of the parent fiber point to the same child, we can
20511 if (rARIA$1.test(name) || rARIACamel$1.test(name)) { 17919 // assume that the child is current. This happens when we bailout on low
20512 return true; 17920 // priority: the bailed out fiber's child reuses the current child.
17921 if (parentA.child === parentB.child) {
17922 var child = parentA.child;
17923 while (child) {
17924 if (child === a) {
17925 // We've determined that A is the current branch.
17926 assertIsMounted(parentA);
17927 return fiber;
17928 }
17929 if (child === b) {
17930 // We've determined that B is the current branch.
17931 assertIsMounted(parentA);
17932 return alternate;
17933 }
17934 child = child.sibling;
17935 }
17936 // We should never have an alternate for any mounting node. So the only
17937 // way this could possibly happen is if this was unmounted, if at all.
17938 invariant(false, 'Unable to find node on an unmounted component.');
20513 } 17939 }
20514 17940
20515 if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') { 17941 if (a['return'] !== b['return']) {
20516 warning$16(false, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.'); 17942 // The return pointer of A and the return pointer of B point to different
20517 warnedProperties$1[name] = true; 17943 // fibers. We assume that return pointers never criss-cross, so A must
20518 return true; 17944 // belong to the child set of A.return, and B must belong to the child
17945 // set of B.return.
17946 a = parentA;
17947 b = parentB;
17948 } else {
17949 // The return pointers point to the same fiber. We'll have to use the
17950 // default, slow path: scan the child sets of each parent alternate to see
17951 // which child belongs to which set.
17952 //
17953 // Search parent A's child set
17954 var didFindChild = false;
17955 var _child = parentA.child;
17956 while (_child) {
17957 if (_child === a) {
17958 didFindChild = true;
17959 a = parentA;
17960 b = parentB;
17961 break;
17962 }
17963 if (_child === b) {
17964 didFindChild = true;
17965 b = parentA;
17966 a = parentB;
17967 break;
17968 }
17969 _child = _child.sibling;
17970 }
17971 if (!didFindChild) {
17972 // Search parent B's child set
17973 _child = parentB.child;
17974 while (_child) {
17975 if (_child === a) {
17976 didFindChild = true;
17977 a = parentB;
17978 b = parentA;
17979 break;
17980 }
17981 if (_child === b) {
17982 didFindChild = true;
17983 b = parentB;
17984 a = parentA;
17985 break;
17986 }
17987 _child = _child.sibling;
17988 }
17989 !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;
17990 }
20519 } 17991 }
20520 17992
20521 if (lowerCasedName === 'innerhtml') { 17993 !(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;
20522 warning$16(false, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.'); 17994 }
20523 warnedProperties$1[name] = true; 17995 // If the root is not a host container, we're in a disconnected tree. I.e.
20524 return true; 17996 // unmounted.
20525 } 17997 !(a.tag === HostRoot) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
17998 if (a.stateNode.current === a) {
17999 // We've determined that A is the current branch.
18000 return fiber;
18001 }
18002 // Otherwise B has to be current branch.
18003 return alternate;
18004}
20526 18005
20527 if (lowerCasedName === 'aria') { 18006function findCurrentHostFiber(parent) {
20528 warning$16(false, 'The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.'); 18007 var currentParent = findCurrentFiberUsingSlowPath(parent);
20529 warnedProperties$1[name] = true; 18008 if (!currentParent) {
20530 return true; 18009 return null;
20531 } 18010 }
20532 18011
20533 if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') { 18012 // Next we'll drill down this component to find the first HostComponent/Text.
20534 warning$16(false, 'Received a `%s` for string attribute `is`. If this is expected, cast ' + 'the value to a string.%s', typeof value, getStackAddendum$2(debugID)); 18013 var node = currentParent;
20535 warnedProperties$1[name] = true; 18014 while (true) {
20536 return true; 18015 if (node.tag === HostComponent || node.tag === HostText) {
18016 return node;
18017 } else if (node.child) {
18018 node.child['return'] = node;
18019 node = node.child;
18020 continue;
20537 } 18021 }
20538 18022 if (node === currentParent) {
20539 if (typeof value === 'number' && isNaN(value)) { 18023 return null;
20540 warning$16(false, 'Received NaN for numeric attribute `%s`. If this is expected, cast ' + 'the value to a string.%s', name, getStackAddendum$2(debugID));
20541 warnedProperties$1[name] = true;
20542 return true;
20543 } 18024 }
20544 18025 while (!node.sibling) {
20545 var isReserved = DOMProperty_1.isReservedProp(name); 18026 if (!node['return'] || node['return'] === currentParent) {
20546 18027 return null;
20547 // Known attributes should match the casing specified in the property config.
20548 if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
20549 var standardName = possibleStandardNames[lowerCasedName];
20550 if (standardName !== name) {
20551 warning$16(false, 'Invalid DOM property `%s`. Did you mean `%s`?%s', name, standardName, getStackAddendum$2(debugID));
20552 warnedProperties$1[name] = true;
20553 return true;
20554 } 18028 }
20555 } else if (!isReserved && name !== lowerCasedName) { 18029 node = node['return'];
20556 // Unknown attributes should have lowercase casing since that's how they
20557 // will be cased anyway with server rendering.
20558 warning$16(false, 'React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.%s', name, lowerCasedName, getStackAddendum$2(debugID));
20559 warnedProperties$1[name] = true;
20560 return true;
20561 } 18030 }
18031 node.sibling['return'] = node['return'];
18032 node = node.sibling;
18033 }
18034 // Flow needs the return null here, but ESLint complains about it.
18035 // eslint-disable-next-line no-unreachable
18036 return null;
18037}
20562 18038
20563 if (typeof value === 'boolean') { 18039function findCurrentHostFiberWithNoPortals(parent) {
20564 warning$16(DOMProperty_1.shouldAttributeAcceptBooleanValue(name), 'Received `%s` for non-boolean attribute `%s`. If this is expected, cast ' + 'the value to a string.%s', value, name, getStackAddendum$2(debugID)); 18040 var currentParent = findCurrentFiberUsingSlowPath(parent);
20565 warnedProperties$1[name] = true; 18041 if (!currentParent) {
20566 return true; 18042 return null;
20567 } 18043 }
20568 18044
20569 // Now that we've validated casing, do not validate 18045 // Next we'll drill down this component to find the first HostComponent/Text.
20570 // data types for reserved props 18046 var node = currentParent;
20571 if (isReserved) { 18047 while (true) {
20572 return true; 18048 if (node.tag === HostComponent || node.tag === HostText) {
18049 return node;
18050 } else if (node.child && node.tag !== HostPortal) {
18051 node.child['return'] = node;
18052 node = node.child;
18053 continue;
20573 } 18054 }
20574 18055 if (node === currentParent) {
20575 // Warn when a known attribute is a bad type 18056 return null;
20576 if (!DOMProperty_1.shouldSetAttribute(name, value)) {
20577 warnedProperties$1[name] = true;
20578 return false;
20579 } 18057 }
20580 18058 while (!node.sibling) {
20581 return true; 18059 if (!node['return'] || node['return'] === currentParent) {
20582 }; 18060 return null;
20583} 18061 }
20584 18062 node = node['return'];
20585var warnUnknownProperties = function (type, props, debugID) {
20586 var unknownProps = [];
20587 for (var key in props) {
20588 var isValid = validateProperty$1(type, key, props[key], debugID);
20589 if (!isValid) {
20590 unknownProps.push(key);
20591 } 18063 }
18064 node.sibling['return'] = node['return'];
18065 node = node.sibling;
20592 } 18066 }
18067 // Flow needs the return null here, but ESLint complains about it.
18068 // eslint-disable-next-line no-unreachable
18069 return null;
18070}
20593 18071
20594 var unknownPropString = unknownProps.map(function (prop) { 18072var CALLBACK_BOOKKEEPING_POOL_SIZE = 10;
20595 return '`' + prop + '`'; 18073var callbackBookkeepingPool = [];
20596 }).join(', '); 18074
20597 if (unknownProps.length === 1) { 18075/**
20598 warning$16(false, 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior%s', unknownPropString, type, getStackAddendum$2(debugID)); 18076 * Find the deepest React component completely containing the root of the
20599 } else if (unknownProps.length > 1) { 18077 * passed-in instance (for use when entire React trees are nested within each
20600 warning$16(false, 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior%s', unknownPropString, type, getStackAddendum$2(debugID)); 18078 * other). If React trees are not nested, returns null.
18079 */
18080function findRootContainerNode(inst) {
18081 // TODO: It may be a good idea to cache this to prevent unnecessary DOM
18082 // traversal, but caching is difficult to do correctly without using a
18083 // mutation observer to listen for all DOM changes.
18084 while (inst['return']) {
18085 inst = inst['return'];
20601 } 18086 }
20602}; 18087 if (inst.tag !== HostRoot) {
18088 // This can happen if we're in a detached tree.
18089 return null;
18090 }
18091 return inst.stateNode.containerInfo;
18092}
20603 18093
20604function validateProperties$2(type, props, debugID /* Stack only */) { 18094// Used to store ancestor hierarchy in top level callback
20605 if (isCustomComponent_1(type, props)) { 18095function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst) {
20606 return; 18096 if (callbackBookkeepingPool.length) {
18097 var instance = callbackBookkeepingPool.pop();
18098 instance.topLevelType = topLevelType;
18099 instance.nativeEvent = nativeEvent;
18100 instance.targetInst = targetInst;
18101 return instance;
20607 } 18102 }
20608 warnUnknownProperties(type, props, debugID); 18103 return {
18104 topLevelType: topLevelType,
18105 nativeEvent: nativeEvent,
18106 targetInst: targetInst,
18107 ancestors: []
18108 };
20609} 18109}
20610 18110
20611var ReactDOMUnknownPropertyHook$1 = { 18111function releaseTopLevelCallbackBookKeeping(instance) {
20612 // Fiber 18112 instance.topLevelType = null;
20613 validateProperties: validateProperties$2, 18113 instance.nativeEvent = null;
20614 // Stack 18114 instance.targetInst = null;
20615 onBeforeMountComponent: function (debugID, element) { 18115 instance.ancestors.length = 0;
20616 if (true && element != null && typeof element.type === 'string') { 18116 if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) {
20617 validateProperties$2(element.type, element.props, debugID); 18117 callbackBookkeepingPool.push(instance);
20618 }
20619 },
20620 onBeforeUpdateComponent: function (debugID, element) {
20621 if (true && element != null && typeof element.type === 'string') {
20622 validateProperties$2(element.type, element.props, debugID);
20623 }
20624 } 18118 }
20625}; 18119}
20626 18120
20627var ReactDOMUnknownPropertyHook_1 = ReactDOMUnknownPropertyHook$1; 18121function handleTopLevelImpl(bookKeeping) {
18122 var targetInst = bookKeeping.targetInst;
20628 18123
20629var getCurrentFiberOwnerName = ReactDebugCurrentFiber_1.getCurrentFiberOwnerName; 18124 // Loop through the hierarchy, in case there's any nested components.
18125 // It's important that we build the array of ancestors before calling any
18126 // event handlers, because event handlers can modify the DOM, leading to
18127 // inconsistencies with ReactMount's node cache. See #1105.
18128 var ancestor = targetInst;
18129 do {
18130 if (!ancestor) {
18131 bookKeeping.ancestors.push(ancestor);
18132 break;
18133 }
18134 var root = findRootContainerNode(ancestor);
18135 if (!root) {
18136 break;
18137 }
18138 bookKeeping.ancestors.push(ancestor);
18139 ancestor = getClosestInstanceFromNode(root);
18140 } while (ancestor);
20630 18141
20631var DOCUMENT_NODE$1 = HTMLNodeType_1.DOCUMENT_NODE; 18142 for (var i = 0; i < bookKeeping.ancestors.length; i++) {
20632var DOCUMENT_FRAGMENT_NODE$1 = HTMLNodeType_1.DOCUMENT_FRAGMENT_NODE; 18143 targetInst = bookKeeping.ancestors[i];
18144 _handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
18145 }
18146}
20633 18147
18148// TODO: can we stop exporting these?
18149var _enabled = true;
18150var _handleTopLevel = void 0;
20634 18151
18152function setHandleTopLevel(handleTopLevel) {
18153 _handleTopLevel = handleTopLevel;
18154}
20635 18155
18156function setEnabled(enabled) {
18157 _enabled = !!enabled;
18158}
20636 18159
18160function isEnabled() {
18161 return _enabled;
18162}
20637 18163
18164/**
18165 * Traps top-level events by using event bubbling.
18166 *
18167 * @param {string} topLevelType Record from `BrowserEventConstants`.
18168 * @param {string} handlerBaseName Event name (e.g. "click").
18169 * @param {object} element Element on which to attach listener.
18170 * @return {?object} An object with a remove function which will forcefully
18171 * remove the listener.
18172 * @internal
18173 */
18174function trapBubbledEvent(topLevelType, handlerBaseName, element) {
18175 if (!element) {
18176 return null;
18177 }
18178 return EventListener.listen(element, handlerBaseName, dispatchEvent.bind(null, topLevelType));
18179}
20638 18180
18181/**
18182 * Traps a top-level event by using event capturing.
18183 *
18184 * @param {string} topLevelType Record from `BrowserEventConstants`.
18185 * @param {string} handlerBaseName Event name (e.g. "click").
18186 * @param {object} element Element on which to attach listener.
18187 * @return {?object} An object with a remove function which will forcefully
18188 * remove the listener.
18189 * @internal
18190 */
18191function trapCapturedEvent(topLevelType, handlerBaseName, element) {
18192 if (!element) {
18193 return null;
18194 }
18195 return EventListener.capture(element, handlerBaseName, dispatchEvent.bind(null, topLevelType));
18196}
20639 18197
18198function dispatchEvent(topLevelType, nativeEvent) {
18199 if (!_enabled) {
18200 return;
18201 }
20640 18202
20641{ 18203 var nativeEventTarget = getEventTarget(nativeEvent);
20642 var warning$3 = require$$0; 18204 var targetInst = getClosestInstanceFromNode(nativeEventTarget);
18205 if (targetInst !== null && typeof targetInst.tag === 'number' && !isFiberMounted(targetInst)) {
18206 // If we get an event (ex: img onload) before committing that
18207 // component's mount, ignore it for now (that is, treat it as if it was an
18208 // event on a non-React tree). We might also consider queueing events and
18209 // dispatching them after the mount.
18210 targetInst = null;
18211 }
20643 18212
20644 var _require3$1 = ReactDebugCurrentFiber_1, 18213 var bookKeeping = getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst);
20645 getCurrentFiberStackAddendum = _require3$1.getCurrentFiberStackAddendum;
20646 18214
20647 var ReactDOMInvalidARIAHook = ReactDOMInvalidARIAHook_1; 18215 try {
20648 var ReactDOMNullInputValuePropHook = ReactDOMNullInputValuePropHook_1; 18216 // Event queue being processed in the same cycle allows
20649 var ReactDOMUnknownPropertyHook = ReactDOMUnknownPropertyHook_1; 18217 // `preventDefault`.
20650 var validateARIAProperties = ReactDOMInvalidARIAHook.validateProperties; 18218 batchedUpdates(handleTopLevelImpl, bookKeeping);
20651 var validateInputProperties = ReactDOMNullInputValuePropHook.validateProperties; 18219 } finally {
20652 var validateUnknownProperties = ReactDOMUnknownPropertyHook.validateProperties; 18220 releaseTopLevelCallbackBookKeeping(bookKeeping);
18221 }
20653} 18222}
20654 18223
20655var didWarnInvalidHydration = false; 18224var ReactDOMEventListener = Object.freeze({
20656var didWarnShadyDOM = false; 18225 get _enabled () { return _enabled; },
18226 get _handleTopLevel () { return _handleTopLevel; },
18227 setHandleTopLevel: setHandleTopLevel,
18228 setEnabled: setEnabled,
18229 isEnabled: isEnabled,
18230 trapBubbledEvent: trapBubbledEvent,
18231 trapCapturedEvent: trapCapturedEvent,
18232 dispatchEvent: dispatchEvent
18233});
20657 18234
20658var listenTo = ReactBrowserEventEmitter_1.listenTo; 18235/**
20659var registrationNameModules = EventPluginRegistry_1.registrationNameModules; 18236 * Generate a mapping of standard vendor prefixes using the defined style property and event name.
18237 *
18238 * @param {string} styleProp
18239 * @param {string} eventName
18240 * @returns {object}
18241 */
18242function makePrefixMap(styleProp, eventName) {
18243 var prefixes = {};
20660 18244
20661var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML'; 18245 prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
20662var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning'; 18246 prefixes['Webkit' + styleProp] = 'webkit' + eventName;
20663var CHILDREN = 'children'; 18247 prefixes['Moz' + styleProp] = 'moz' + eventName;
20664var STYLE = 'style'; 18248 prefixes['ms' + styleProp] = 'MS' + eventName;
20665var HTML = '__html'; 18249 prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
20666 18250
20667var HTML_NAMESPACE$1 = DOMNamespaces.Namespaces.html; 18251 return prefixes;
20668var getIntrinsicNamespace$1 = DOMNamespaces.getIntrinsicNamespace; 18252}
20669 18253
18254/**
18255 * A list of event names to a configurable list of vendor prefixes.
18256 */
18257var vendorPrefixes = {
18258 animationend: makePrefixMap('Animation', 'AnimationEnd'),
18259 animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
18260 animationstart: makePrefixMap('Animation', 'AnimationStart'),
18261 transitionend: makePrefixMap('Transition', 'TransitionEnd')
18262};
20670 18263
20671{ 18264/**
20672 var warnedUnknownTags = { 18265 * Event names that have already been detected and prefixed (if applicable).
20673 // Chrome is the only major browser not shipping <time>. But as of July 18266 */
20674 // 2017 it intends to ship it due to widespread usage. We intentionally 18267var prefixedEventNames = {};
20675 // *don't* warn for <time> even if it's unrecognized by Chrome because
20676 // it soon will be, and many apps have been using it anyway.
20677 time: true
20678 };
20679 18268
20680 var validatePropertiesInDevelopment = function (type, props) { 18269/**
20681 validateARIAProperties(type, props); 18270 * Element to check for prefixes on.
20682 validateInputProperties(type, props); 18271 */
20683 validateUnknownProperties(type, props); 18272var style = {};
20684 };
20685 18273
20686 var warnForTextDifference = function (serverText, clientText) { 18274/**
20687 if (didWarnInvalidHydration) { 18275 * Bootstrap if a DOM exists.
20688 return; 18276 */
20689 } 18277if (ExecutionEnvironment.canUseDOM) {
20690 didWarnInvalidHydration = true; 18278 style = document.createElement('div').style;
20691 warning$3(false, 'Text content did not match. Server: "%s" Client: "%s"', serverText, clientText);
20692 };
20693 18279
20694 var warnForPropDifference = function (propName, serverValue, clientValue) { 18280 // On some platforms, in particular some releases of Android 4.x,
20695 if (didWarnInvalidHydration) { 18281 // the un-prefixed "animation" and "transition" properties are defined on the
20696 return; 18282 // style object but the events that fire will still be prefixed, so we need
20697 } 18283 // to check if the un-prefixed events are usable, and if not remove them from the map.
20698 didWarnInvalidHydration = true; 18284 if (!('AnimationEvent' in window)) {
20699 warning$3(false, 'Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(serverValue), JSON.stringify(clientValue)); 18285 delete vendorPrefixes.animationend.animation;
20700 }; 18286 delete vendorPrefixes.animationiteration.animation;
18287 delete vendorPrefixes.animationstart.animation;
18288 }
20701 18289
20702 var warnForExtraAttributes = function (attributeNames) { 18290 // Same as above
20703 if (didWarnInvalidHydration) { 18291 if (!('TransitionEvent' in window)) {
20704 return; 18292 delete vendorPrefixes.transitionend.transition;
20705 } 18293 }
20706 didWarnInvalidHydration = true; 18294}
20707 var names = [];
20708 attributeNames.forEach(function (name) {
20709 names.push(name);
20710 });
20711 warning$3(false, 'Extra attributes from the server: %s', names);
20712 };
20713 18295
20714 var warnForInvalidEventListener = function (registrationName, listener) { 18296/**
20715 warning$3(false, 'Expected `%s` listener to be a function, instead got a value of `%s` type.%s', registrationName, typeof listener, getCurrentFiberStackAddendum()); 18297 * Attempts to determine the correct vendor prefixed event name.
20716 }; 18298 *
18299 * @param {string} eventName
18300 * @returns {string}
18301 */
18302function getVendorPrefixedEventName(eventName) {
18303 if (prefixedEventNames[eventName]) {
18304 return prefixedEventNames[eventName];
18305 } else if (!vendorPrefixes[eventName]) {
18306 return eventName;
18307 }
20717 18308
20718 var testDocument; 18309 var prefixMap = vendorPrefixes[eventName];
20719 // Parse the HTML and read it back to normalize the HTML string so that it
20720 // can be used for comparison.
20721 var normalizeHTML = function (parent, html) {
20722 if (!testDocument) {
20723 testDocument = document.implementation.createHTMLDocument();
20724 }
20725 var testElement = parent.namespaceURI === HTML_NAMESPACE$1 ? testDocument.createElement(parent.tagName) : testDocument.createElementNS(parent.namespaceURI, parent.tagName);
20726 testElement.innerHTML = html;
20727 return testElement.innerHTML;
20728 };
20729}
20730 18310
20731function ensureListeningTo(rootContainerElement, registrationName) { 18311 for (var styleProp in prefixMap) {
20732 var isDocumentOrFragment = rootContainerElement.nodeType === DOCUMENT_NODE$1 || rootContainerElement.nodeType === DOCUMENT_FRAGMENT_NODE$1; 18312 if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
20733 var doc = isDocumentOrFragment ? rootContainerElement : rootContainerElement.ownerDocument; 18313 return prefixedEventNames[eventName] = prefixMap[styleProp];
20734 listenTo(registrationName, doc); 18314 }
20735} 18315 }
20736 18316
20737function getOwnerDocumentFromRootContainer(rootContainerElement) { 18317 return '';
20738 return rootContainerElement.nodeType === DOCUMENT_NODE$1 ? rootContainerElement : rootContainerElement.ownerDocument;
20739} 18318}
20740 18319
20741// There are so many media events, it makes sense to just 18320/**
20742// maintain a list rather than create a `trapBubbledEvent` for each 18321 * Types of raw signals from the browser caught at the top level.
20743var mediaEvents = { 18322 *
18323 * For events like 'submit' which don't consistently bubble (which we
18324 * trap at a lower node than `document`), binding at `document` would
18325 * cause duplicate events so we don't include them here.
18326 */
18327var topLevelTypes$1 = {
20744 topAbort: 'abort', 18328 topAbort: 'abort',
18329 topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
18330 topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',
18331 topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',
18332 topBlur: 'blur',
18333 topCancel: 'cancel',
20745 topCanPlay: 'canplay', 18334 topCanPlay: 'canplay',
20746 topCanPlayThrough: 'canplaythrough', 18335 topCanPlayThrough: 'canplaythrough',
18336 topChange: 'change',
18337 topClick: 'click',
18338 topClose: 'close',
18339 topCompositionEnd: 'compositionend',
18340 topCompositionStart: 'compositionstart',
18341 topCompositionUpdate: 'compositionupdate',
18342 topContextMenu: 'contextmenu',
18343 topCopy: 'copy',
18344 topCut: 'cut',
18345 topDoubleClick: 'dblclick',
18346 topDrag: 'drag',
18347 topDragEnd: 'dragend',
18348 topDragEnter: 'dragenter',
18349 topDragExit: 'dragexit',
18350 topDragLeave: 'dragleave',
18351 topDragOver: 'dragover',
18352 topDragStart: 'dragstart',
18353 topDrop: 'drop',
20747 topDurationChange: 'durationchange', 18354 topDurationChange: 'durationchange',
20748 topEmptied: 'emptied', 18355 topEmptied: 'emptied',
20749 topEncrypted: 'encrypted', 18356 topEncrypted: 'encrypted',
20750 topEnded: 'ended', 18357 topEnded: 'ended',
20751 topError: 'error', 18358 topError: 'error',
18359 topFocus: 'focus',
18360 topInput: 'input',
18361 topKeyDown: 'keydown',
18362 topKeyPress: 'keypress',
18363 topKeyUp: 'keyup',
20752 topLoadedData: 'loadeddata', 18364 topLoadedData: 'loadeddata',
18365 topLoad: 'load',
20753 topLoadedMetadata: 'loadedmetadata', 18366 topLoadedMetadata: 'loadedmetadata',
20754 topLoadStart: 'loadstart', 18367 topLoadStart: 'loadstart',
18368 topMouseDown: 'mousedown',
18369 topMouseMove: 'mousemove',
18370 topMouseOut: 'mouseout',
18371 topMouseOver: 'mouseover',
18372 topMouseUp: 'mouseup',
18373 topPaste: 'paste',
20755 topPause: 'pause', 18374 topPause: 'pause',
20756 topPlay: 'play', 18375 topPlay: 'play',
20757 topPlaying: 'playing', 18376 topPlaying: 'playing',
20758 topProgress: 'progress', 18377 topProgress: 'progress',
20759 topRateChange: 'ratechange', 18378 topRateChange: 'ratechange',
18379 topScroll: 'scroll',
20760 topSeeked: 'seeked', 18380 topSeeked: 'seeked',
20761 topSeeking: 'seeking', 18381 topSeeking: 'seeking',
18382 topSelectionChange: 'selectionchange',
20762 topStalled: 'stalled', 18383 topStalled: 'stalled',
20763 topSuspend: 'suspend', 18384 topSuspend: 'suspend',
18385 topTextInput: 'textInput',
20764 topTimeUpdate: 'timeupdate', 18386 topTimeUpdate: 'timeupdate',
18387 topToggle: 'toggle',
18388 topTouchCancel: 'touchcancel',
18389 topTouchEnd: 'touchend',
18390 topTouchMove: 'touchmove',
18391 topTouchStart: 'touchstart',
18392 topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',
20765 topVolumeChange: 'volumechange', 18393 topVolumeChange: 'volumechange',
20766 topWaiting: 'waiting' 18394 topWaiting: 'waiting',
18395 topWheel: 'wheel'
20767}; 18396};
20768 18397
20769function trapClickOnNonInteractiveElement(node) { 18398var BrowserEventConstants = {
20770 // Mobile Safari does not fire properly bubble click events on 18399 topLevelTypes: topLevelTypes$1
20771 // non-interactive elements, which means delegated click listeners do not 18400};
20772 // fire. The workaround for this bug involves attaching an empty click 18401
20773 // listener on the target node. 18402function runEventQueueInBatch(events) {
20774 // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html 18403 enqueueEvents(events);
20775 // Just set it using the onclick property so that we don't have to manage any 18404 processEventQueue(false);
20776 // bookkeeping for it. Not sure if we need to clear it when the listener is
20777 // removed.
20778 // TODO: Only do this for the relevant Safaris maybe?
20779 node.onclick = emptyFunction;
20780} 18405}
20781 18406
20782function setInitialDOMProperties(domElement, rootContainerElement, nextProps, isCustomComponentTag) { 18407/**
20783 for (var propKey in nextProps) { 18408 * Streams a fired top-level event to `EventPluginHub` where plugins have the
20784 if (!nextProps.hasOwnProperty(propKey)) { 18409 * opportunity to create `ReactEvent`s to be dispatched.
20785 continue; 18410 */
20786 } 18411function handleTopLevel(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
20787 var nextProp = nextProps[propKey]; 18412 var events = extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
20788 if (propKey === STYLE) { 18413 runEventQueueInBatch(events);
20789 {
20790 if (nextProp) {
20791 // Freeze the next style object so that we can assume it won't be
20792 // mutated. We have already warned for this in the past.
20793 Object.freeze(nextProp);
20794 }
20795 }
20796 // Relies on `updateStylesByID` not mutating `styleUpdates`.
20797 CSSPropertyOperations_1.setValueForStyles(domElement, nextProp);
20798 } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
20799 var nextHtml = nextProp ? nextProp[HTML] : undefined;
20800 if (nextHtml != null) {
20801 setInnerHTML_1(domElement, nextHtml);
20802 }
20803 } else if (propKey === CHILDREN) {
20804 if (typeof nextProp === 'string') {
20805 setTextContent_1(domElement, nextProp);
20806 } else if (typeof nextProp === 'number') {
20807 setTextContent_1(domElement, '' + nextProp);
20808 }
20809 } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING) {
20810 // Noop
20811 } else if (registrationNameModules.hasOwnProperty(propKey)) {
20812 if (nextProp != null) {
20813 if (true && typeof nextProp !== 'function') {
20814 warnForInvalidEventListener(propKey, nextProp);
20815 }
20816 ensureListeningTo(rootContainerElement, propKey);
20817 }
20818 } else if (isCustomComponentTag) {
20819 DOMPropertyOperations_1.setValueForAttribute(domElement, propKey, nextProp);
20820 } else if (nextProp != null) {
20821 // If we're updating to null or undefined, we should remove the property
20822 // from the DOM node instead of inadvertently setting to a string. This
20823 // brings us in line with the same behavior we have on initial render.
20824 DOMPropertyOperations_1.setValueForProperty(domElement, propKey, nextProp);
20825 }
20826 }
20827} 18414}
20828 18415
20829function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) { 18416var topLevelTypes = BrowserEventConstants.topLevelTypes;
20830 // TODO: Handle wasCustomComponentTag 18417
20831 for (var i = 0; i < updatePayload.length; i += 2) { 18418/**
20832 var propKey = updatePayload[i]; 18419 * Summary of `ReactBrowserEventEmitter` event handling:
20833 var propValue = updatePayload[i + 1]; 18420 *
20834 if (propKey === STYLE) { 18421 * - Top-level delegation is used to trap most native browser events. This
20835 CSSPropertyOperations_1.setValueForStyles(domElement, propValue); 18422 * may only occur in the main thread and is the responsibility of
20836 } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { 18423 * ReactDOMEventListener, which is injected and can therefore support
20837 setInnerHTML_1(domElement, propValue); 18424 * pluggable event sources. This is the only work that occurs in the main
20838 } else if (propKey === CHILDREN) { 18425 * thread.
20839 setTextContent_1(domElement, propValue); 18426 *
20840 } else if (isCustomComponentTag) { 18427 * - We normalize and de-duplicate events to account for browser quirks. This
20841 if (propValue != null) { 18428 * may be done in the worker thread.
20842 DOMPropertyOperations_1.setValueForAttribute(domElement, propKey, propValue); 18429 *
20843 } else { 18430 * - Forward these native events (with the associated top-level type used to
20844 DOMPropertyOperations_1.deleteValueForAttribute(domElement, propKey); 18431 * trap it) to `EventPluginHub`, which in turn will ask plugins if they want
20845 } 18432 * to extract any synthetic events.
20846 } else if (propValue != null) { 18433 *
20847 DOMPropertyOperations_1.setValueForProperty(domElement, propKey, propValue); 18434 * - The `EventPluginHub` will then process each event by annotating them with
20848 } else { 18435 * "dispatches", a sequence of listeners and IDs that care about that event.
20849 // If we're updating to null or undefined, we should remove the property 18436 *
20850 // from the DOM node instead of inadvertently setting to a string. This 18437 * - The `EventPluginHub` then dispatches the events.
20851 // brings us in line with the same behavior we have on initial render. 18438 *
20852 DOMPropertyOperations_1.deleteValueForProperty(domElement, propKey); 18439 * Overview of React and the event system:
20853 } 18440 *
18441 * +------------+ .
18442 * | DOM | .
18443 * +------------+ .
18444 * | .
18445 * v .
18446 * +------------+ .
18447 * | ReactEvent | .
18448 * | Listener | .
18449 * +------------+ . +-----------+
18450 * | . +--------+|SimpleEvent|
18451 * | . | |Plugin |
18452 * +-----|------+ . v +-----------+
18453 * | | | . +--------------+ +------------+
18454 * | +-----------.--->|EventPluginHub| | Event |
18455 * | | . | | +-----------+ | Propagators|
18456 * | ReactEvent | . | | |TapEvent | |------------|
18457 * | Emitter | . | |<---+|Plugin | |other plugin|
18458 * | | . | | +-----------+ | utilities |
18459 * | +-----------.--->| | +------------+
18460 * | | | . +--------------+
18461 * +-----|------+ . ^ +-----------+
18462 * | . | |Enter/Leave|
18463 * + . +-------+|Plugin |
18464 * +-------------+ . +-----------+
18465 * | application | .
18466 * |-------------| .
18467 * | | .
18468 * | | .
18469 * +-------------+ .
18470 * .
18471 * React Core . General Purpose Event Plugin System
18472 */
18473
18474var alreadyListeningTo = {};
18475var reactTopListenersCounter = 0;
18476
18477/**
18478 * To ensure no conflicts with other potential React instances on the page
18479 */
18480var topListenersIDKey = '_reactListenersID' + ('' + Math.random()).slice(2);
18481
18482function getListeningForDocument(mountAt) {
18483 // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
18484 // directly.
18485 if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
18486 mountAt[topListenersIDKey] = reactTopListenersCounter++;
18487 alreadyListeningTo[mountAt[topListenersIDKey]] = {};
20854 } 18488 }
18489 return alreadyListeningTo[mountAt[topListenersIDKey]];
20855} 18490}
20856 18491
20857var ReactDOMFiberComponent = { 18492/**
20858 createElement: function (type, props, rootContainerElement, parentNamespace) { 18493 * We listen for bubbled touch events on the document object.
20859 // We create tags in the namespace of their parent container, except HTML 18494 *
20860 var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement); 18495 * Firefox v8.01 (and possibly others) exhibited strange behavior when
20861 var domElement; 18496 * mounting `onmousemove` events at some node that was not the document
20862 var namespaceURI = parentNamespace; 18497 * element. The symptoms were that if your mouse is not moving over something
20863 if (namespaceURI === HTML_NAMESPACE$1) { 18498 * contained within that mount point (for example on the background) the
20864 namespaceURI = getIntrinsicNamespace$1(type); 18499 * top-level listeners for `onmousemove` won't be called. However, if you
20865 } 18500 * register the `mousemove` on the document object, then it will of course
20866 if (namespaceURI === HTML_NAMESPACE$1) { 18501 * catch all `mousemove`s. This along with iOS quirks, justifies restricting
20867 { 18502 * top-level listeners to the document object only, at least for these
20868 var isCustomComponentTag = isCustomComponent_1(type, props); 18503 * movement types of events and possibly all events.
20869 // Should this check be gated by parent namespace? Not sure we want to 18504 *
20870 // allow <SVG> or <mATH>. 18505 * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
20871 warning$3(isCustomComponentTag || type === type.toLowerCase(), '<%s /> is using uppercase HTML. Always use lowercase HTML tags ' + 'in React.', type); 18506 *
20872 } 18507 * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
20873 18508 * they bubble to document.
20874 if (type === 'script') { 18509 *
20875 // Create the script via .innerHTML so its "parser-inserted" flag is 18510 * @param {string} registrationName Name of listener (e.g. `onClick`).
20876 // set to true and it does not execute 18511 * @param {object} contentDocumentHandle Document which owns the container
20877 var div = ownerDocument.createElement('div'); 18512 */
20878 div.innerHTML = '<script><' + '/script>'; // eslint-disable-line 18513function listenTo(registrationName, contentDocumentHandle) {
20879 // This is guaranteed to yield a script element. 18514 var mountAt = contentDocumentHandle;
20880 var firstChild = div.firstChild; 18515 var isListening = getListeningForDocument(mountAt);
20881 domElement = div.removeChild(firstChild); 18516 var dependencies = registrationNameDependencies[registrationName];
20882 } else if (typeof props.is === 'string') {
20883 // $FlowIssue `createElement` should be updated for Web Components
20884 domElement = ownerDocument.createElement(type, { is: props.is });
20885 } else {
20886 // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
20887 // See discussion in https://github.com/facebook/react/pull/6896
20888 // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
20889 domElement = ownerDocument.createElement(type);
20890 }
20891 } else {
20892 domElement = ownerDocument.createElementNS(namespaceURI, type);
20893 }
20894 18517
20895 { 18518 for (var i = 0; i < dependencies.length; i++) {
20896 if (namespaceURI === HTML_NAMESPACE$1) { 18519 var dependency = dependencies[i];
20897 if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) { 18520 if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
20898 warnedUnknownTags[type] = true; 18521 if (dependency === 'topWheel') {
20899 warning$3(false, 'The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type); 18522 if (isEventSupported('wheel')) {
18523 trapBubbledEvent('topWheel', 'wheel', mountAt);
18524 } else if (isEventSupported('mousewheel')) {
18525 trapBubbledEvent('topWheel', 'mousewheel', mountAt);
18526 } else {
18527 // Firefox needs to capture a different mouse scroll event.
18528 // @see http://www.quirksmode.org/dom/events/tests/scroll.html
18529 trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
20900 } 18530 }
20901 } 18531 } else if (dependency === 'topScroll') {
20902 } 18532 trapCapturedEvent('topScroll', 'scroll', mountAt);
18533 } else if (dependency === 'topFocus' || dependency === 'topBlur') {
18534 trapCapturedEvent('topFocus', 'focus', mountAt);
18535 trapCapturedEvent('topBlur', 'blur', mountAt);
20903 18536
20904 return domElement; 18537 // to make sure blur and focus event listeners are only attached once
20905 }, 18538 isListening.topBlur = true;
20906 createTextNode: function (text, rootContainerElement) { 18539 isListening.topFocus = true;
20907 return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text); 18540 } else if (dependency === 'topCancel') {
20908 }, 18541 if (isEventSupported('cancel', true)) {
20909 setInitialProperties: function (domElement, tag, rawProps, rootContainerElement) { 18542 trapCapturedEvent('topCancel', 'cancel', mountAt);
20910 var isCustomComponentTag = isCustomComponent_1(tag, rawProps); 18543 }
20911 { 18544 isListening.topCancel = true;
20912 validatePropertiesInDevelopment(tag, rawProps); 18545 } else if (dependency === 'topClose') {
20913 if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) { 18546 if (isEventSupported('close', true)) {
20914 warning$3(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerName() || 'A component'); 18547 trapCapturedEvent('topClose', 'close', mountAt);
20915 didWarnShadyDOM = true; 18548 }
18549 isListening.topClose = true;
18550 } else if (topLevelTypes.hasOwnProperty(dependency)) {
18551 trapBubbledEvent(dependency, topLevelTypes[dependency], mountAt);
20916 } 18552 }
20917 }
20918 18553
20919 // TODO: Make sure that we check isMounted before firing any of these events. 18554 isListening[dependency] = true;
20920 var props;
20921 switch (tag) {
20922 case 'iframe':
20923 case 'object':
20924 ReactBrowserEventEmitter_1.trapBubbledEvent('topLoad', 'load', domElement);
20925 props = rawProps;
20926 break;
20927 case 'video':
20928 case 'audio':
20929 // Create listener for each media event
20930 for (var event in mediaEvents) {
20931 if (mediaEvents.hasOwnProperty(event)) {
20932 ReactBrowserEventEmitter_1.trapBubbledEvent(event, mediaEvents[event], domElement);
20933 }
20934 }
20935 props = rawProps;
20936 break;
20937 case 'source':
20938 ReactBrowserEventEmitter_1.trapBubbledEvent('topError', 'error', domElement);
20939 props = rawProps;
20940 break;
20941 case 'img':
20942 case 'image':
20943 ReactBrowserEventEmitter_1.trapBubbledEvent('topError', 'error', domElement);
20944 ReactBrowserEventEmitter_1.trapBubbledEvent('topLoad', 'load', domElement);
20945 props = rawProps;
20946 break;
20947 case 'form':
20948 ReactBrowserEventEmitter_1.trapBubbledEvent('topReset', 'reset', domElement);
20949 ReactBrowserEventEmitter_1.trapBubbledEvent('topSubmit', 'submit', domElement);
20950 props = rawProps;
20951 break;
20952 case 'details':
20953 ReactBrowserEventEmitter_1.trapBubbledEvent('topToggle', 'toggle', domElement);
20954 props = rawProps;
20955 break;
20956 case 'input':
20957 ReactDOMFiberInput.initWrapperState(domElement, rawProps);
20958 props = ReactDOMFiberInput.getHostProps(domElement, rawProps);
20959 ReactBrowserEventEmitter_1.trapBubbledEvent('topInvalid', 'invalid', domElement);
20960 // For controlled components we always need to ensure we're listening
20961 // to onChange. Even if there is no listener.
20962 ensureListeningTo(rootContainerElement, 'onChange');
20963 break;
20964 case 'option':
20965 ReactDOMFiberOption.validateProps(domElement, rawProps);
20966 props = ReactDOMFiberOption.getHostProps(domElement, rawProps);
20967 break;
20968 case 'select':
20969 ReactDOMFiberSelect.initWrapperState(domElement, rawProps);
20970 props = ReactDOMFiberSelect.getHostProps(domElement, rawProps);
20971 ReactBrowserEventEmitter_1.trapBubbledEvent('topInvalid', 'invalid', domElement);
20972 // For controlled components we always need to ensure we're listening
20973 // to onChange. Even if there is no listener.
20974 ensureListeningTo(rootContainerElement, 'onChange');
20975 break;
20976 case 'textarea':
20977 ReactDOMFiberTextarea.initWrapperState(domElement, rawProps);
20978 props = ReactDOMFiberTextarea.getHostProps(domElement, rawProps);
20979 ReactBrowserEventEmitter_1.trapBubbledEvent('topInvalid', 'invalid', domElement);
20980 // For controlled components we always need to ensure we're listening
20981 // to onChange. Even if there is no listener.
20982 ensureListeningTo(rootContainerElement, 'onChange');
20983 break;
20984 default:
20985 props = rawProps;
20986 } 18555 }
18556 }
18557}
20987 18558
20988 assertValidProps_1(tag, props, getCurrentFiberOwnerName); 18559function isListeningToAllDependencies(registrationName, mountAt) {
20989 18560 var isListening = getListeningForDocument(mountAt);
20990 setInitialDOMProperties(domElement, rootContainerElement, props, isCustomComponentTag); 18561 var dependencies = registrationNameDependencies[registrationName];
20991 18562 for (var i = 0; i < dependencies.length; i++) {
20992 switch (tag) { 18563 var dependency = dependencies[i];
20993 case 'input': 18564 if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
20994 // TODO: Make sure we check if this is still unmounted or do any clean 18565 return false;
20995 // up necessary since we never stop tracking anymore.
20996 inputValueTracking_1.track(domElement);
20997 ReactDOMFiberInput.postMountWrapper(domElement, rawProps);
20998 break;
20999 case 'textarea':
21000 // TODO: Make sure we check if this is still unmounted or do any clean
21001 // up necessary since we never stop tracking anymore.
21002 inputValueTracking_1.track(domElement);
21003 ReactDOMFiberTextarea.postMountWrapper(domElement, rawProps);
21004 break;
21005 case 'option':
21006 ReactDOMFiberOption.postMountWrapper(domElement, rawProps);
21007 break;
21008 case 'select':
21009 ReactDOMFiberSelect.postMountWrapper(domElement, rawProps);
21010 break;
21011 default:
21012 if (typeof props.onClick === 'function') {
21013 // TODO: This cast may not be sound for SVG, MathML or custom elements.
21014 trapClickOnNonInteractiveElement(domElement);
21015 }
21016 break;
21017 } 18566 }
21018 }, 18567 }
18568 return true;
18569}
21019 18570
18571/**
18572 * Given any node return the first leaf node without children.
18573 *
18574 * @param {DOMElement|DOMTextNode} node
18575 * @return {DOMElement|DOMTextNode}
18576 */
18577function getLeafNode(node) {
18578 while (node && node.firstChild) {
18579 node = node.firstChild;
18580 }
18581 return node;
18582}
21020 18583
21021 // Calculate the diff between the two objects. 18584/**
21022 diffProperties: function (domElement, tag, lastRawProps, nextRawProps, rootContainerElement) { 18585 * Get the next sibling within a container. This will walk up the
21023 { 18586 * DOM if a node's siblings have been exhausted.
21024 validatePropertiesInDevelopment(tag, nextRawProps); 18587 *
18588 * @param {DOMElement|DOMTextNode} node
18589 * @return {?DOMElement|DOMTextNode}
18590 */
18591function getSiblingNode(node) {
18592 while (node) {
18593 if (node.nextSibling) {
18594 return node.nextSibling;
21025 } 18595 }
18596 node = node.parentNode;
18597 }
18598}
21026 18599
21027 var updatePayload = null; 18600/**
21028 18601 * Get object describing the nodes which contain characters at offset.
21029 var lastProps; 18602 *
21030 var nextProps; 18603 * @param {DOMElement|DOMTextNode} root
21031 switch (tag) { 18604 * @param {number} offset
21032 case 'input': 18605 * @return {?object}
21033 lastProps = ReactDOMFiberInput.getHostProps(domElement, lastRawProps); 18606 */
21034 nextProps = ReactDOMFiberInput.getHostProps(domElement, nextRawProps); 18607function getNodeForCharacterOffset(root, offset) {
21035 updatePayload = []; 18608 var node = getLeafNode(root);
21036 break; 18609 var nodeStart = 0;
21037 case 'option': 18610 var nodeEnd = 0;
21038 lastProps = ReactDOMFiberOption.getHostProps(domElement, lastRawProps);
21039 nextProps = ReactDOMFiberOption.getHostProps(domElement, nextRawProps);
21040 updatePayload = [];
21041 break;
21042 case 'select':
21043 lastProps = ReactDOMFiberSelect.getHostProps(domElement, lastRawProps);
21044 nextProps = ReactDOMFiberSelect.getHostProps(domElement, nextRawProps);
21045 updatePayload = [];
21046 break;
21047 case 'textarea':
21048 lastProps = ReactDOMFiberTextarea.getHostProps(domElement, lastRawProps);
21049 nextProps = ReactDOMFiberTextarea.getHostProps(domElement, nextRawProps);
21050 updatePayload = [];
21051 break;
21052 default:
21053 lastProps = lastRawProps;
21054 nextProps = nextRawProps;
21055 if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {
21056 // TODO: This cast may not be sound for SVG, MathML or custom elements.
21057 trapClickOnNonInteractiveElement(domElement);
21058 }
21059 break;
21060 }
21061 18611
21062 assertValidProps_1(tag, nextProps, getCurrentFiberOwnerName); 18612 while (node) {
18613 if (node.nodeType === TEXT_NODE) {
18614 nodeEnd = nodeStart + node.textContent.length;
21063 18615
21064 var propKey; 18616 if (nodeStart <= offset && nodeEnd >= offset) {
21065 var styleName; 18617 return {
21066 var styleUpdates = null; 18618 node: node,
21067 for (propKey in lastProps) { 18619 offset: offset - nodeStart
21068 if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) { 18620 };
21069 continue;
21070 }
21071 if (propKey === STYLE) {
21072 var lastStyle = lastProps[propKey];
21073 for (styleName in lastStyle) {
21074 if (lastStyle.hasOwnProperty(styleName)) {
21075 if (!styleUpdates) {
21076 styleUpdates = {};
21077 }
21078 styleUpdates[styleName] = '';
21079 }
21080 }
21081 } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {
21082 // Noop. This is handled by the clear text mechanism.
21083 } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING) {
21084 // Noop
21085 } else if (registrationNameModules.hasOwnProperty(propKey)) {
21086 // This is a special case. If any listener updates we need to ensure
21087 // that the "current" fiber pointer gets updated so we need a commit
21088 // to update this element.
21089 if (!updatePayload) {
21090 updatePayload = [];
21091 }
21092 } else {
21093 // For all other deleted properties we add it to the queue. We use
21094 // the whitelist in the commit phase instead.
21095 (updatePayload = updatePayload || []).push(propKey, null);
21096 }
21097 }
21098 for (propKey in nextProps) {
21099 var nextProp = nextProps[propKey];
21100 var lastProp = lastProps != null ? lastProps[propKey] : undefined;
21101 if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
21102 continue;
21103 }
21104 if (propKey === STYLE) {
21105 {
21106 if (nextProp) {
21107 // Freeze the next style object so that we can assume it won't be
21108 // mutated. We have already warned for this in the past.
21109 Object.freeze(nextProp);
21110 }
21111 }
21112 if (lastProp) {
21113 // Unset styles on `lastProp` but not on `nextProp`.
21114 for (styleName in lastProp) {
21115 if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
21116 if (!styleUpdates) {
21117 styleUpdates = {};
21118 }
21119 styleUpdates[styleName] = '';
21120 }
21121 }
21122 // Update styles that changed since `lastProp`.
21123 for (styleName in nextProp) {
21124 if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
21125 if (!styleUpdates) {
21126 styleUpdates = {};
21127 }
21128 styleUpdates[styleName] = nextProp[styleName];
21129 }
21130 }
21131 } else {
21132 // Relies on `updateStylesByID` not mutating `styleUpdates`.
21133 if (!styleUpdates) {
21134 if (!updatePayload) {
21135 updatePayload = [];
21136 }
21137 updatePayload.push(propKey, styleUpdates);
21138 }
21139 styleUpdates = nextProp;
21140 }
21141 } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
21142 var nextHtml = nextProp ? nextProp[HTML] : undefined;
21143 var lastHtml = lastProp ? lastProp[HTML] : undefined;
21144 if (nextHtml != null) {
21145 if (lastHtml !== nextHtml) {
21146 (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);
21147 }
21148 } else {
21149 // TODO: It might be too late to clear this if we have children
21150 // inserted already.
21151 }
21152 } else if (propKey === CHILDREN) {
21153 if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {
21154 (updatePayload = updatePayload || []).push(propKey, '' + nextProp);
21155 }
21156 } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING) {
21157 // Noop
21158 } else if (registrationNameModules.hasOwnProperty(propKey)) {
21159 if (nextProp != null) {
21160 // We eagerly listen to this even though we haven't committed yet.
21161 if (true && typeof nextProp !== 'function') {
21162 warnForInvalidEventListener(propKey, nextProp);
21163 }
21164 ensureListeningTo(rootContainerElement, propKey);
21165 }
21166 if (!updatePayload && lastProp !== nextProp) {
21167 // This is a special case. If any listener updates we need to ensure
21168 // that the "current" props pointer gets updated so we need a commit
21169 // to update this element.
21170 updatePayload = [];
21171 }
21172 } else {
21173 // For any other property we always add it to the queue and then we
21174 // filter it out using the whitelist during the commit.
21175 (updatePayload = updatePayload || []).push(propKey, nextProp);
21176 } 18621 }
18622
18623 nodeStart = nodeEnd;
21177 } 18624 }
21178 if (styleUpdates) {
21179 (updatePayload = updatePayload || []).push(STYLE, styleUpdates);
21180 }
21181 return updatePayload;
21182 },
21183 18625
18626 node = getLeafNode(getSiblingNode(node));
18627 }
18628}
21184 18629
21185 // Apply the diff. 18630/**
21186 updateProperties: function (domElement, updatePayload, tag, lastRawProps, nextRawProps) { 18631 * @param {DOMElement} outerNode
21187 var wasCustomComponentTag = isCustomComponent_1(tag, lastRawProps); 18632 * @return {?object}
21188 var isCustomComponentTag = isCustomComponent_1(tag, nextRawProps); 18633 */
21189 // Apply the diff. 18634function getOffsets(outerNode) {
21190 updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); 18635 var selection = window.getSelection && window.getSelection();
21191
21192 // TODO: Ensure that an update gets scheduled if any of the special props
21193 // changed.
21194 switch (tag) {
21195 case 'input':
21196 // Update the wrapper around inputs *after* updating props. This has to
21197 // happen after `updateDOMProperties`. Otherwise HTML5 input validations
21198 // raise warnings and prevent the new value from being assigned.
21199 ReactDOMFiberInput.updateWrapper(domElement, nextRawProps);
21200
21201 // We also check that we haven't missed a value update, such as a
21202 // Radio group shifting the checked value to another named radio input.
21203 inputValueTracking_1.updateValueIfChanged(domElement);
21204 break;
21205 case 'textarea':
21206 ReactDOMFiberTextarea.updateWrapper(domElement, nextRawProps);
21207 break;
21208 case 'select':
21209 // <select> value update needs to occur after <option> children
21210 // reconciliation
21211 ReactDOMFiberSelect.postUpdateWrapper(domElement, nextRawProps);
21212 break;
21213 }
21214 },
21215 diffHydratedProperties: function (domElement, tag, rawProps, parentNamespace, rootContainerElement) {
21216 {
21217 var isCustomComponentTag = isCustomComponent_1(tag, rawProps);
21218 validatePropertiesInDevelopment(tag, rawProps);
21219 if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) {
21220 warning$3(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerName() || 'A component');
21221 didWarnShadyDOM = true;
21222 }
21223 }
21224 18636
21225 // TODO: Make sure that we check isMounted before firing any of these events. 18637 if (!selection || selection.rangeCount === 0) {
21226 switch (tag) { 18638 return null;
21227 case 'iframe': 18639 }
21228 case 'object':
21229 ReactBrowserEventEmitter_1.trapBubbledEvent('topLoad', 'load', domElement);
21230 break;
21231 case 'video':
21232 case 'audio':
21233 // Create listener for each media event
21234 for (var event in mediaEvents) {
21235 if (mediaEvents.hasOwnProperty(event)) {
21236 ReactBrowserEventEmitter_1.trapBubbledEvent(event, mediaEvents[event], domElement);
21237 }
21238 }
21239 break;
21240 case 'source':
21241 ReactBrowserEventEmitter_1.trapBubbledEvent('topError', 'error', domElement);
21242 break;
21243 case 'img':
21244 case 'image':
21245 ReactBrowserEventEmitter_1.trapBubbledEvent('topError', 'error', domElement);
21246 ReactBrowserEventEmitter_1.trapBubbledEvent('topLoad', 'load', domElement);
21247 break;
21248 case 'form':
21249 ReactBrowserEventEmitter_1.trapBubbledEvent('topReset', 'reset', domElement);
21250 ReactBrowserEventEmitter_1.trapBubbledEvent('topSubmit', 'submit', domElement);
21251 break;
21252 case 'details':
21253 ReactBrowserEventEmitter_1.trapBubbledEvent('topToggle', 'toggle', domElement);
21254 break;
21255 case 'input':
21256 ReactDOMFiberInput.initWrapperState(domElement, rawProps);
21257 ReactBrowserEventEmitter_1.trapBubbledEvent('topInvalid', 'invalid', domElement);
21258 // For controlled components we always need to ensure we're listening
21259 // to onChange. Even if there is no listener.
21260 ensureListeningTo(rootContainerElement, 'onChange');
21261 break;
21262 case 'option':
21263 ReactDOMFiberOption.validateProps(domElement, rawProps);
21264 break;
21265 case 'select':
21266 ReactDOMFiberSelect.initWrapperState(domElement, rawProps);
21267 ReactBrowserEventEmitter_1.trapBubbledEvent('topInvalid', 'invalid', domElement);
21268 // For controlled components we always need to ensure we're listening
21269 // to onChange. Even if there is no listener.
21270 ensureListeningTo(rootContainerElement, 'onChange');
21271 break;
21272 case 'textarea':
21273 ReactDOMFiberTextarea.initWrapperState(domElement, rawProps);
21274 ReactBrowserEventEmitter_1.trapBubbledEvent('topInvalid', 'invalid', domElement);
21275 // For controlled components we always need to ensure we're listening
21276 // to onChange. Even if there is no listener.
21277 ensureListeningTo(rootContainerElement, 'onChange');
21278 break;
21279 }
21280 18640
21281 assertValidProps_1(tag, rawProps, getCurrentFiberOwnerName); 18641 var anchorNode = selection.anchorNode;
18642 var anchorOffset = selection.anchorOffset;
18643 var focusNode$$1 = selection.focusNode;
18644 var focusOffset = selection.focusOffset;
21282 18645
21283 { 18646 // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
21284 var extraAttributeNames = new Set(); 18647 // up/down buttons on an <input type="number">. Anonymous divs do not seem to
21285 var attributes = domElement.attributes; 18648 // expose properties, triggering a "Permission denied error" if any of its
21286 for (var i = 0; i < attributes.length; i++) { 18649 // properties are accessed. The only seemingly possible way to avoid erroring
21287 var name = attributes[i].name.toLowerCase(); 18650 // is to access a property that typically works for non-anonymous divs and
21288 switch (name) { 18651 // catch any error that may otherwise arise. See
21289 // Built-in SSR attribute is whitelisted 18652 // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
21290 case 'data-reactroot': 18653 try {
21291 break; 18654 /* eslint-disable no-unused-expressions */
21292 // Controlled attributes are not validated 18655 anchorNode.nodeType;
21293 // TODO: Only ignore them on controlled tags. 18656 focusNode$$1.nodeType;
21294 case 'value': 18657 /* eslint-enable no-unused-expressions */
21295 break; 18658 } catch (e) {
21296 case 'checked': 18659 return null;
21297 break; 18660 }
21298 case 'selected':
21299 break;
21300 default:
21301 // Intentionally use the original name.
21302 // See discussion in https://github.com/facebook/react/pull/10676.
21303 extraAttributeNames.add(attributes[i].name);
21304 }
21305 }
21306 }
21307 18661
21308 var updatePayload = null; 18662 return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode$$1, focusOffset);
21309 for (var propKey in rawProps) { 18663}
21310 if (!rawProps.hasOwnProperty(propKey)) {
21311 continue;
21312 }
21313 var nextProp = rawProps[propKey];
21314 if (propKey === CHILDREN) {
21315 // For text content children we compare against textContent. This
21316 // might match additional HTML that is hidden when we read it using
21317 // textContent. E.g. "foo" will match "f<span>oo</span>" but that still
21318 // satisfies our requirement. Our requirement is not to produce perfect
21319 // HTML and attributes. Ideally we should preserve structure but it's
21320 // ok not to if the visible content is still enough to indicate what
21321 // even listeners these nodes might be wired up to.
21322 // TODO: Warn if there is more than a single textNode as a child.
21323 // TODO: Should we use domElement.firstChild.nodeValue to compare?
21324 if (typeof nextProp === 'string') {
21325 if (domElement.textContent !== nextProp) {
21326 {
21327 warnForTextDifference(domElement.textContent, nextProp);
21328 }
21329 updatePayload = [CHILDREN, nextProp];
21330 }
21331 } else if (typeof nextProp === 'number') {
21332 if (domElement.textContent !== '' + nextProp) {
21333 {
21334 warnForTextDifference(domElement.textContent, nextProp);
21335 }
21336 updatePayload = [CHILDREN, '' + nextProp];
21337 }
21338 }
21339 } else if (registrationNameModules.hasOwnProperty(propKey)) {
21340 if (nextProp != null) {
21341 if (true && typeof nextProp !== 'function') {
21342 warnForInvalidEventListener(propKey, nextProp);
21343 }
21344 ensureListeningTo(rootContainerElement, propKey);
21345 }
21346 } else {
21347 // Validate that the properties correspond to their expected values.
21348 var serverValue;
21349 var propertyInfo;
21350 if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING ||
21351 // Controlled attributes are not validated
21352 // TODO: Only ignore them on controlled tags.
21353 propKey === 'value' || propKey === 'checked' || propKey === 'selected') {
21354 // Noop
21355 } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
21356 var rawHtml = nextProp ? nextProp[HTML] || '' : '';
21357 var serverHTML = domElement.innerHTML;
21358 var expectedHTML = normalizeHTML(domElement, rawHtml);
21359 if (expectedHTML !== serverHTML) {
21360 warnForPropDifference(propKey, serverHTML, expectedHTML);
21361 }
21362 } else if (propKey === STYLE) {
21363 // $FlowFixMe - Should be inferred as not undefined.
21364 extraAttributeNames['delete'](propKey);
21365 var expectedStyle = CSSPropertyOperations_1.createDangerousStringForStyles(nextProp);
21366 serverValue = domElement.getAttribute('style');
21367 if (expectedStyle !== serverValue) {
21368 warnForPropDifference(propKey, serverValue, expectedStyle);
21369 }
21370 } else if (isCustomComponentTag) {
21371 // $FlowFixMe - Should be inferred as not undefined.
21372 extraAttributeNames['delete'](propKey.toLowerCase());
21373 serverValue = DOMPropertyOperations_1.getValueForAttribute(domElement, propKey, nextProp);
21374 18664
21375 if (nextProp !== serverValue) { 18665/**
21376 warnForPropDifference(propKey, serverValue, nextProp); 18666 * Returns {start, end} where `start` is the character/codepoint index of
21377 } 18667 * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
21378 } else if (DOMProperty_1.shouldSetAttribute(propKey, nextProp)) { 18668 * `end` is the index of (focusNode, focusOffset).
21379 if (propertyInfo = DOMProperty_1.getPropertyInfo(propKey)) { 18669 *
21380 // $FlowFixMe - Should be inferred as not undefined. 18670 * Returns null if you pass in garbage input but we should probably just crash.
21381 extraAttributeNames['delete'](propertyInfo.attributeName); 18671 *
21382 serverValue = DOMPropertyOperations_1.getValueForProperty(domElement, propKey, nextProp); 18672 * Exported only for testing.
21383 } else { 18673 */
21384 var ownNamespace = parentNamespace; 18674function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode$$1, focusOffset) {
21385 if (ownNamespace === HTML_NAMESPACE$1) { 18675 var length = 0;
21386 ownNamespace = getIntrinsicNamespace$1(tag); 18676 var start = -1;
21387 } 18677 var end = -1;
21388 if (ownNamespace === HTML_NAMESPACE$1) { 18678 var indexWithinAnchor = 0;
21389 // $FlowFixMe - Should be inferred as not undefined. 18679 var indexWithinFocus = 0;
21390 extraAttributeNames['delete'](propKey.toLowerCase()); 18680 var node = outerNode;
21391 } else { 18681 var parentNode = null;
21392 // $FlowFixMe - Should be inferred as not undefined.
21393 extraAttributeNames['delete'](propKey);
21394 }
21395 serverValue = DOMPropertyOperations_1.getValueForAttribute(domElement, propKey, nextProp);
21396 }
21397 18682
21398 if (nextProp !== serverValue) { 18683 outer: while (true) {
21399 warnForPropDifference(propKey, serverValue, nextProp); 18684 var next = null;
21400 } 18685
21401 } 18686 while (true) {
18687 if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
18688 start = length + anchorOffset;
18689 }
18690 if (node === focusNode$$1 && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
18691 end = length + focusOffset;
21402 } 18692 }
21403 }
21404 18693
21405 { 18694 if (node.nodeType === TEXT_NODE) {
21406 // $FlowFixMe - Should be inferred as not undefined. 18695 length += node.nodeValue.length;
21407 if (extraAttributeNames.size > 0) {
21408 // $FlowFixMe - Should be inferred as not undefined.
21409 warnForExtraAttributes(extraAttributeNames);
21410 } 18696 }
21411 }
21412 18697
21413 switch (tag) { 18698 if ((next = node.firstChild) === null) {
21414 case 'input':
21415 // TODO: Make sure we check if this is still unmounted or do any clean
21416 // up necessary since we never stop tracking anymore.
21417 inputValueTracking_1.track(domElement);
21418 ReactDOMFiberInput.postMountWrapper(domElement, rawProps);
21419 break;
21420 case 'textarea':
21421 // TODO: Make sure we check if this is still unmounted or do any clean
21422 // up necessary since we never stop tracking anymore.
21423 inputValueTracking_1.track(domElement);
21424 ReactDOMFiberTextarea.postMountWrapper(domElement, rawProps);
21425 break; 18699 break;
21426 case 'select':
21427 case 'option':
21428 // For input and textarea we current always set the value property at
21429 // post mount to force it to diverge from attributes. However, for
21430 // option and select we don't quite do the same thing and select
21431 // is not resilient to the DOM state changing so we don't do that here.
21432 // TODO: Consider not doing this for input and textarea.
21433 break;
21434 default:
21435 if (typeof rawProps.onClick === 'function') {
21436 // TODO: This cast may not be sound for SVG, MathML or custom elements.
21437 trapClickOnNonInteractiveElement(domElement);
21438 }
21439 break;
21440 }
21441
21442 return updatePayload;
21443 },
21444 diffHydratedText: function (textNode, text) {
21445 var isDifferent = textNode.nodeValue !== text;
21446 {
21447 if (isDifferent) {
21448 warnForTextDifference(textNode.nodeValue, text);
21449 } 18700 }
18701 // Moving from `node` to its first child `next`.
18702 parentNode = node;
18703 node = next;
21450 } 18704 }
21451 return isDifferent; 18705
21452 }, 18706 while (true) {
21453 warnForDeletedHydratableElement: function (parentNode, child) { 18707 if (node === outerNode) {
21454 { 18708 // If `outerNode` has children, this is always the second time visiting
21455 if (didWarnInvalidHydration) { 18709 // it. If it has no children, this is still the first loop, and the only
21456 return; 18710 // valid selection is anchorNode and focusNode both equal to this node
18711 // and both offsets 0, in which case we will have handled above.
18712 break outer;
21457 } 18713 }
21458 didWarnInvalidHydration = true; 18714 if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
21459 warning$3(false, 'Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase()); 18715 start = length;
21460 }
21461 },
21462 warnForDeletedHydratableText: function (parentNode, child) {
21463 {
21464 if (didWarnInvalidHydration) {
21465 return;
21466 } 18716 }
21467 didWarnInvalidHydration = true; 18717 if (parentNode === focusNode$$1 && ++indexWithinFocus === focusOffset) {
21468 warning$3(false, 'Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase()); 18718 end = length;
21469 }
21470 },
21471 warnForInsertedHydratedElement: function (parentNode, tag, props) {
21472 {
21473 if (didWarnInvalidHydration) {
21474 return;
21475 }
21476 didWarnInvalidHydration = true;
21477 warning$3(false, 'Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
21478 }
21479 },
21480 warnForInsertedHydratedText: function (parentNode, text) {
21481 {
21482 if (text === '') {
21483 // We expect to insert empty text nodes since they're not represented in
21484 // the HTML.
21485 // TODO: Remove this special case if we can just avoid inserting empty
21486 // text nodes.
21487 return;
21488 } 18719 }
21489 if (didWarnInvalidHydration) { 18720 if ((next = node.nextSibling) !== null) {
21490 return; 18721 break;
21491 } 18722 }
21492 didWarnInvalidHydration = true; 18723 node = parentNode;
21493 warning$3(false, 'Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase()); 18724 parentNode = node.parentNode;
21494 }
21495 },
21496 restoreControlledState: function (domElement, tag, props) {
21497 switch (tag) {
21498 case 'input':
21499 ReactDOMFiberInput.restoreControlledState(domElement, props);
21500 return;
21501 case 'textarea':
21502 ReactDOMFiberTextarea.restoreControlledState(domElement, props);
21503 return;
21504 case 'select':
21505 ReactDOMFiberSelect.restoreControlledState(domElement, props);
21506 return;
21507 } 18725 }
21508 }
21509};
21510 18726
21511var ReactDOMFiberComponent_1 = ReactDOMFiberComponent; 18727 // Moving from `node` to its next sibling `next`.
18728 node = next;
18729 }
21512 18730
21513// This is a built-in polyfill for requestIdleCallback. It works by scheduling 18731 if (start === -1 || end === -1) {
21514// a requestAnimationFrame, storing the time for the start of the frame, then 18732 // This should never happen. (Would happen if the anchor/focus nodes aren't
21515// scheduling a postMessage which gets scheduled after paint. Within the 18733 // actually inside the passed-in node.)
21516// postMessage handler do as much work as possible until time + frame rate. 18734 return null;
21517// By separating the idle call into a separate event tick we ensure that 18735 }
21518// layout, paint and other browser work is counted against the available time.
21519// The frame rate is dynamically adjusted.
21520 18736
18737 return {
18738 start: start,
18739 end: end
18740 };
18741}
21521 18742
18743/**
18744 * In modern non-IE browsers, we can support both forward and backward
18745 * selections.
18746 *
18747 * Note: IE10+ supports the Selection object, but it does not support
18748 * the `extend` method, which means that even in modern IE, it's not possible
18749 * to programmatically create a backward selection. Thus, for all IE
18750 * versions, we use the old IE API to create our selections.
18751 *
18752 * @param {DOMElement|DOMTextNode} node
18753 * @param {object} offsets
18754 */
18755function setOffsets(node, offsets) {
18756 if (!window.getSelection) {
18757 return;
18758 }
21522 18759
21523{ 18760 var selection = window.getSelection();
21524 var warning$17 = require$$0; 18761 var length = node[getTextContentAccessor()].length;
18762 var start = Math.min(offsets.start, length);
18763 var end = offsets.end === undefined ? start : Math.min(offsets.end, length);
21525 18764
21526 if (ExecutionEnvironment.canUseDOM && typeof requestAnimationFrame !== 'function') { 18765 // IE 11 uses modern selection, but doesn't support the extend method.
21527 warning$17(false, 'React depends on requestAnimationFrame. Make sure that you load a ' + 'polyfill in older browsers. http://fb.me/react-polyfills'); 18766 // Flip backward selections, so we can set with a single range.
18767 if (!selection.extend && start > end) {
18768 var temp = end;
18769 end = start;
18770 start = temp;
21528 } 18771 }
21529}
21530 18772
21531// TODO: There's no way to cancel, because Fiber doesn't atm. 18773 var startMarker = getNodeForCharacterOffset(node, start);
21532var rIC = void 0; 18774 var endMarker = getNodeForCharacterOffset(node, end);
21533 18775
21534if (!ExecutionEnvironment.canUseDOM) { 18776 if (startMarker && endMarker) {
21535 rIC = function (frameCallback) { 18777 if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {
21536 setTimeout(function () { 18778 return;
21537 frameCallback({ 18779 }
21538 timeRemaining: function () { 18780 var range = document.createRange();
21539 return Infinity; 18781 range.setStart(startMarker.node, startMarker.offset);
21540 } 18782 selection.removeAllRanges();
21541 });
21542 });
21543 return 0;
21544 };
21545} else if (typeof requestIdleCallback !== 'function') {
21546 // Polyfill requestIdleCallback.
21547 18783
21548 var scheduledRAFCallback = null; 18784 if (start > end) {
21549 var scheduledRICCallback = null; 18785 selection.addRange(range);
18786 selection.extend(endMarker.node, endMarker.offset);
18787 } else {
18788 range.setEnd(endMarker.node, endMarker.offset);
18789 selection.addRange(range);
18790 }
18791 }
18792}
21550 18793
21551 var isIdleScheduled = false; 18794function isInDocument(node) {
21552 var isAnimationFrameScheduled = false; 18795 return containsNode(document.documentElement, node);
18796}
21553 18797
21554 var frameDeadline = 0; 18798/**
21555 // We start out assuming that we run at 30fps but then the heuristic tracking 18799 * @ReactInputSelection: React input selection module. Based on Selection.js,
21556 // will adjust this value to a faster fps if we get more frequent animation 18800 * but modified to be suitable for react and has a couple of bug fixes (doesn't
21557 // frames. 18801 * assume buttons have range selections allowed).
21558 var previousFrameTime = 33; 18802 * Input selection module for React.
21559 var activeFrameTime = 33; 18803 */
21560 18804
21561 var frameDeadlineObject = { 18805function hasSelectionCapabilities(elem) {
21562 timeRemaining: typeof performance === 'object' && typeof performance.now === 'function' ? function () { 18806 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
21563 // We assume that if we have a performance timer that the rAF callback 18807 return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');
21564 // gets a performance timer value. Not sure if this is always true. 18808}
21565 return frameDeadline - performance.now(); 18809
21566 } : function () { 18810function getSelectionInformation() {
21567 // As a fallback we use Date.now. 18811 var focusedElem = getActiveElement();
21568 return frameDeadline - Date.now(); 18812 return {
21569 } 18813 focusedElem: focusedElem,
18814 selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection$1(focusedElem) : null
21570 }; 18815 };
18816}
21571 18817
21572 // We use the postMessage trick to defer idle work until after the repaint. 18818/**
21573 var messageKey = '__reactIdleCallback$' + Math.random().toString(36).slice(2); 18819 * @restoreSelection: If any selection information was potentially lost,
21574 var idleTick = function (event) { 18820 * restore it. This is useful when performing operations that could remove dom
21575 if (event.source !== window || event.data !== messageKey) { 18821 * nodes and place them back in, resulting in focus being lost.
21576 return; 18822 */
21577 } 18823function restoreSelection(priorSelectionInformation) {
21578 isIdleScheduled = false; 18824 var curFocusedElem = getActiveElement();
21579 var callback = scheduledRICCallback; 18825 var priorFocusedElem = priorSelectionInformation.focusedElem;
21580 scheduledRICCallback = null; 18826 var priorSelectionRange = priorSelectionInformation.selectionRange;
21581 if (callback !== null) { 18827 if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
21582 callback(frameDeadlineObject); 18828 if (hasSelectionCapabilities(priorFocusedElem)) {
18829 setSelection(priorFocusedElem, priorSelectionRange);
21583 } 18830 }
21584 };
21585 // Assumes that we have addEventListener in this environment. Might need
21586 // something better for old IE.
21587 window.addEventListener('message', idleTick, false);
21588 18831
21589 var animationTick = function (rafTime) { 18832 // Focusing a node can change the scroll position, which is undesirable
21590 isAnimationFrameScheduled = false; 18833 var ancestors = [];
21591 var nextFrameTime = rafTime - frameDeadline + activeFrameTime; 18834 var ancestor = priorFocusedElem;
21592 if (nextFrameTime < activeFrameTime && previousFrameTime < activeFrameTime) { 18835 while (ancestor = ancestor.parentNode) {
21593 if (nextFrameTime < 8) { 18836 if (ancestor.nodeType === ELEMENT_NODE) {
21594 // Defensive coding. We don't support higher frame rates than 120hz. 18837 ancestors.push({
21595 // If we get lower than that, it is probably a bug. 18838 element: ancestor,
21596 nextFrameTime = 8; 18839 left: ancestor.scrollLeft,
18840 top: ancestor.scrollTop
18841 });
21597 } 18842 }
21598 // If one frame goes long, then the next one can be short to catch up.
21599 // If two frames are short in a row, then that's an indication that we
21600 // actually have a higher frame rate than what we're currently optimizing.
21601 // We adjust our heuristic dynamically accordingly. For example, if we're
21602 // running on 120hz display or 90hz VR display.
21603 // Take the max of the two in case one of them was an anomaly due to
21604 // missed frame deadlines.
21605 activeFrameTime = nextFrameTime < previousFrameTime ? previousFrameTime : nextFrameTime;
21606 } else {
21607 previousFrameTime = nextFrameTime;
21608 }
21609 frameDeadline = rafTime + activeFrameTime;
21610 if (!isIdleScheduled) {
21611 isIdleScheduled = true;
21612 window.postMessage(messageKey, '*');
21613 } 18843 }
21614 var callback = scheduledRAFCallback;
21615 scheduledRAFCallback = null;
21616 if (callback !== null) {
21617 callback(rafTime);
21618 }
21619 };
21620 18844
21621 rIC = function (callback) { 18845 focusNode(priorFocusedElem);
21622 // This assumes that we only schedule one callback at a time because that's 18846
21623 // how Fiber uses it. 18847 for (var i = 0; i < ancestors.length; i++) {
21624 scheduledRICCallback = callback; 18848 var info = ancestors[i];
21625 if (!isAnimationFrameScheduled) { 18849 info.element.scrollLeft = info.left;
21626 // If rAF didn't already schedule one, we need to schedule a frame. 18850 info.element.scrollTop = info.top;
21627 // TODO: If this rAF doesn't materialize because the browser throttles, we
21628 // might want to still have setTimeout trigger rIC as a backup to ensure
21629 // that we keep performing work.
21630 isAnimationFrameScheduled = true;
21631 requestAnimationFrame(animationTick);
21632 } 18851 }
21633 return 0; 18852 }
21634 };
21635} else {
21636 rIC = requestIdleCallback;
21637} 18853}
21638 18854
21639var rIC_1 = rIC;
21640
21641var ReactDOMFrameScheduling = {
21642 rIC: rIC_1
21643};
21644
21645/** 18855/**
21646 * Copyright (c) 2013-present, Facebook, Inc. 18856 * @getSelection: Gets the selection bounds of a focused textarea, input or
21647 * 18857 * contentEditable node.
21648 * This source code is licensed under the MIT license found in the 18858 * -@input: Look up selection bounds of this input
21649 * LICENSE file in the root directory of this source tree. 18859 * -@return {start: selectionStart, end: selectionEnd}
21650 *
21651 * @providesModule ReactFeatureFlags
21652 *
21653 */ 18860 */
18861function getSelection$1(input) {
18862 var selection = void 0;
21654 18863
21655var ReactFeatureFlags = { 18864 if ('selectionStart' in input) {
21656 enableAsyncSubtreeAPI: true 18865 // Modern browser with input or textarea.
21657}; 18866 selection = {
18867 start: input.selectionStart,
18868 end: input.selectionEnd
18869 };
18870 } else {
18871 // Content editable or old IE textarea.
18872 selection = getOffsets(input);
18873 }
21658 18874
21659var ReactFeatureFlags_1 = ReactFeatureFlags; 18875 return selection || { start: 0, end: 0 };
18876}
21660 18877
21661/** 18878/**
21662 * Copyright (c) 2013-present, Facebook, Inc. 18879 * @setSelection: Sets the selection bounds of a textarea or input and focuses
21663 * 18880 * the input.
21664 * This source code is licensed under the MIT license found in the 18881 * -@input Set selection bounds of this input or textarea
21665 * LICENSE file in the root directory of this source tree. 18882 * -@offsets Object of same form that is returned from get*
21666 *
21667 * @providesModule ReactPriorityLevel
21668 *
21669 */ 18883 */
18884function setSelection(input, offsets) {
18885 var start = offsets.start,
18886 end = offsets.end;
21670 18887
21671var ReactPriorityLevel = { 18888 if (end === undefined) {
21672 NoWork: 0, // No work is pending. 18889 end = start;
21673 SynchronousPriority: 1, // For controlled text inputs. Synchronous side-effects. 18890 }
21674 TaskPriority: 2, // Completes at the end of the current tick.
21675 HighPriority: 3, // Interaction that needs to complete pretty soon to feel responsive.
21676 LowPriority: 4, // Data fetching, or result from updating stores.
21677 OffscreenPriority: 5 };
21678 18891
21679var CallbackEffect = ReactTypeOfSideEffect.Callback; 18892 if ('selectionStart' in input) {
18893 input.selectionStart = start;
18894 input.selectionEnd = Math.min(end, input.value.length);
18895 } else {
18896 setOffsets(input, offsets);
18897 }
18898}
21680 18899
21681var NoWork = ReactPriorityLevel.NoWork; 18900var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;
21682var SynchronousPriority = ReactPriorityLevel.SynchronousPriority;
21683var TaskPriority = ReactPriorityLevel.TaskPriority;
21684 18901
21685var ClassComponent$2 = ReactTypeOfWork.ClassComponent; 18902var eventTypes$3 = {
21686var HostRoot$2 = ReactTypeOfWork.HostRoot; 18903 select: {
18904 phasedRegistrationNames: {
18905 bubbled: 'onSelect',
18906 captured: 'onSelectCapture'
18907 },
18908 dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange']
18909 }
18910};
21687 18911
18912var activeElement$1 = null;
18913var activeElementInst$1 = null;
18914var lastSelection = null;
18915var mouseDown = false;
21688 18916
21689{ 18917/**
21690 var warning$19 = require$$0; 18918 * Get an object which is a unique representation of the current selection.
18919 *
18920 * The return value will not be consistent across nodes or browsers, but
18921 * two identical selections on the same node will return identical objects.
18922 *
18923 * @param {DOMElement} node
18924 * @return {object}
18925 */
18926function getSelection(node) {
18927 if ('selectionStart' in node && hasSelectionCapabilities(node)) {
18928 return {
18929 start: node.selectionStart,
18930 end: node.selectionEnd
18931 };
18932 } else if (window.getSelection) {
18933 var selection = window.getSelection();
18934 return {
18935 anchorNode: selection.anchorNode,
18936 anchorOffset: selection.anchorOffset,
18937 focusNode: selection.focusNode,
18938 focusOffset: selection.focusOffset
18939 };
18940 }
21691} 18941}
21692 18942
21693// Callbacks are not validated until invocation 18943/**
18944 * Poll selection to see whether it's changed.
18945 *
18946 * @param {object} nativeEvent
18947 * @return {?SyntheticEvent}
18948 */
18949function constructSelectEvent(nativeEvent, nativeEventTarget) {
18950 // Ensure we have the right element, and that the user is not dragging a
18951 // selection (this matches native `select` event behavior). In HTML5, select
18952 // fires only on input and textarea thus if there's no focused element we
18953 // won't dispatch.
18954 if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement()) {
18955 return null;
18956 }
21694 18957
18958 // Only fire when selection has actually changed.
18959 var currentSelection = getSelection(activeElement$1);
18960 if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
18961 lastSelection = currentSelection;
21695 18962
21696// Singly linked-list of updates. When an update is scheduled, it is added to 18963 var syntheticEvent = SyntheticEvent$1.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);
21697// the queue of the current fiber and the work-in-progress fiber. The two queues
21698// are separate but they share a persistent structure.
21699//
21700// During reconciliation, updates are removed from the work-in-progress fiber,
21701// but they remain on the current fiber. That ensures that if a work-in-progress
21702// is aborted, the aborted updates are recovered by cloning from current.
21703//
21704// The work-in-progress queue is always a subset of the current queue.
21705//
21706// When the tree is committed, the work-in-progress becomes the current.
21707 18964
18965 syntheticEvent.type = 'select';
18966 syntheticEvent.target = activeElement$1;
21708 18967
21709var _queue1 = void 0; 18968 accumulateTwoPhaseDispatches(syntheticEvent);
21710var _queue2 = void 0;
21711 18969
21712function comparePriority(a, b) { 18970 return syntheticEvent;
21713 // When comparing update priorities, treat sync and Task work as equal.
21714 // TODO: Could we avoid the need for this by always coercing sync priority
21715 // to Task when scheduling an update?
21716 if ((a === TaskPriority || a === SynchronousPriority) && (b === TaskPriority || b === SynchronousPriority)) {
21717 return 0;
21718 }
21719 if (a === NoWork && b !== NoWork) {
21720 return -255;
21721 }
21722 if (a !== NoWork && b === NoWork) {
21723 return 255;
21724 } 18971 }
21725 return a - b;
21726}
21727 18972
21728function createUpdateQueue() { 18973 return null;
21729 var queue = {
21730 first: null,
21731 last: null,
21732 hasForceUpdate: false,
21733 callbackList: null
21734 };
21735 {
21736 queue.isProcessing = false;
21737 }
21738 return queue;
21739} 18974}
21740 18975
21741function cloneUpdate(update) { 18976/**
21742 return { 18977 * This plugin creates an `onSelect` event that normalizes select events
21743 priorityLevel: update.priorityLevel, 18978 * across form elements.
21744 partialState: update.partialState, 18979 *
21745 callback: update.callback, 18980 * Supported elements are:
21746 isReplace: update.isReplace, 18981 * - input (see `isTextInputElement`)
21747 isForced: update.isForced, 18982 * - textarea
21748 isTopLevelUnmount: update.isTopLevelUnmount, 18983 * - contentEditable
21749 next: null 18984 *
21750 }; 18985 * This differs from native browser implementations in the following ways:
21751} 18986 * - Fires on contentEditable fields as well as inputs.
18987 * - Fires for collapsed selection.
18988 * - Fires after user input.
18989 */
18990var SelectEventPlugin = {
18991 eventTypes: eventTypes$3,
21752 18992
21753function insertUpdateIntoQueue(queue, update, insertAfter, insertBefore) { 18993 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
21754 if (insertAfter !== null) { 18994 var doc = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget.document : nativeEventTarget.nodeType === DOCUMENT_NODE ? nativeEventTarget : nativeEventTarget.ownerDocument;
21755 insertAfter.next = update; 18995 // Track whether all listeners exists for this plugin. If none exist, we do
21756 } else { 18996 // not extract events. See #3639.
21757 // This is the first item in the queue. 18997 if (!doc || !isListeningToAllDependencies('onSelect', doc)) {
21758 update.next = queue.first; 18998 return null;
21759 queue.first = update; 18999 }
21760 }
21761 19000
21762 if (insertBefore !== null) { 19001 var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;
21763 update.next = insertBefore;
21764 } else {
21765 // This is the last item in the queue.
21766 queue.last = update;
21767 }
21768}
21769 19002
21770// Returns the update after which the incoming update should be inserted into 19003 switch (topLevelType) {
21771// the queue, or null if it should be inserted at beginning. 19004 // Track the input node that has focus.
21772function findInsertionPosition(queue, update) { 19005 case 'topFocus':
21773 var priorityLevel = update.priorityLevel; 19006 if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
21774 var insertAfter = null; 19007 activeElement$1 = targetNode;
21775 var insertBefore = null; 19008 activeElementInst$1 = targetInst;
21776 if (queue.last !== null && comparePriority(queue.last.priorityLevel, priorityLevel) <= 0) { 19009 lastSelection = null;
21777 // Fast path for the common case where the update should be inserted at 19010 }
21778 // the end of the queue. 19011 break;
21779 insertAfter = queue.last; 19012 case 'topBlur':
21780 } else { 19013 activeElement$1 = null;
21781 insertBefore = queue.first; 19014 activeElementInst$1 = null;
21782 while (insertBefore !== null && comparePriority(insertBefore.priorityLevel, priorityLevel) <= 0) { 19015 lastSelection = null;
21783 insertAfter = insertBefore; 19016 break;
21784 insertBefore = insertBefore.next; 19017 // Don't fire the event while the user is dragging. This matches the
19018 // semantics of the native select event.
19019 case 'topMouseDown':
19020 mouseDown = true;
19021 break;
19022 case 'topContextMenu':
19023 case 'topMouseUp':
19024 mouseDown = false;
19025 return constructSelectEvent(nativeEvent, nativeEventTarget);
19026 // Chrome and IE fire non-standard event when selection is changed (and
19027 // sometimes when it hasn't). IE's event fires out of order with respect
19028 // to key and input events on deletion, so we discard it.
19029 //
19030 // Firefox doesn't support selectionchange, so check selection status
19031 // after each key entry. The selection changes after keydown and before
19032 // keyup, but we check on keydown as well in the case of holding down a
19033 // key, when multiple keydown events are fired but only one keyup is.
19034 // This is also our approach for IE handling, for the reason above.
19035 case 'topSelectionChange':
19036 if (skipSelectionChangeEvent) {
19037 break;
19038 }
19039 // falls through
19040 case 'topKeyDown':
19041 case 'topKeyUp':
19042 return constructSelectEvent(nativeEvent, nativeEventTarget);
21785 } 19043 }
19044
19045 return null;
21786 } 19046 }
21787 return insertAfter; 19047};
21788}
21789 19048
21790function ensureUpdateQueues(fiber) { 19049/**
21791 var alternateFiber = fiber.alternate; 19050 * @interface Event
19051 * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
19052 * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
19053 */
19054var AnimationEventInterface = {
19055 animationName: null,
19056 elapsedTime: null,
19057 pseudoElement: null
19058};
21792 19059
21793 var queue1 = fiber.updateQueue; 19060/**
21794 if (queue1 === null) { 19061 * @param {object} dispatchConfig Configuration used to dispatch this event.
21795 queue1 = fiber.updateQueue = createUpdateQueue(); 19062 * @param {string} dispatchMarker Marker identifying the event target.
21796 } 19063 * @param {object} nativeEvent Native browser event.
19064 * @extends {SyntheticEvent}
19065 */
19066function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
19067 return SyntheticEvent$1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
19068}
21797 19069
21798 var queue2 = void 0; 19070SyntheticEvent$1.augmentClass(SyntheticAnimationEvent, AnimationEventInterface);
21799 if (alternateFiber !== null) { 19071
21800 queue2 = alternateFiber.updateQueue; 19072/**
21801 if (queue2 === null) { 19073 * @interface Event
21802 queue2 = alternateFiber.updateQueue = createUpdateQueue(); 19074 * @see http://www.w3.org/TR/clipboard-apis/
21803 } 19075 */
21804 } else { 19076var ClipboardEventInterface = {
21805 queue2 = null; 19077 clipboardData: function (event) {
19078 return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
21806 } 19079 }
19080};
21807 19081
21808 _queue1 = queue1; 19082/**
21809 // Return null if there is no alternate queue, or if its queue is the same. 19083 * @param {object} dispatchConfig Configuration used to dispatch this event.
21810 _queue2 = queue2 !== queue1 ? queue2 : null; 19084 * @param {string} dispatchMarker Marker identifying the event target.
19085 * @param {object} nativeEvent Native browser event.
19086 * @extends {SyntheticEvent}
19087 */
19088function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
19089 return SyntheticEvent$1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
21811} 19090}
21812 19091
21813// The work-in-progress queue is a subset of the current queue (if it exists). 19092SyntheticEvent$1.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
21814// We need to insert the incoming update into both lists. However, it's possible
21815// that the correct position in one list will be different from the position in
21816// the other. Consider the following case:
21817//
21818// Current: 3-5-6
21819// Work-in-progress: 6
21820//
21821// Then we receive an update with priority 4 and insert it into each list:
21822//
21823// Current: 3-4-5-6
21824// Work-in-progress: 4-6
21825//
21826// In the current queue, the new update's `next` pointer points to the update
21827// with priority 5. But in the work-in-progress queue, the pointer points to the
21828// update with priority 6. Because these two queues share the same persistent
21829// data structure, this won't do. (This can only happen when the incoming update
21830// has higher priority than all the updates in the work-in-progress queue.)
21831//
21832// To solve this, in the case where the incoming update needs to be inserted
21833// into two different positions, we'll make a clone of the update and insert
21834// each copy into a separate queue. This forks the list while maintaining a
21835// persistent structure, because the update that is added to the work-in-progress
21836// is always added to the front of the list.
21837//
21838// However, if incoming update is inserted into the same position of both lists,
21839// we shouldn't make a copy.
21840//
21841// If the update is cloned, it returns the cloned update.
21842function insertUpdate(fiber, update) {
21843 // We'll have at least one and at most two distinct update queues.
21844 ensureUpdateQueues(fiber);
21845 var queue1 = _queue1;
21846 var queue2 = _queue2;
21847 19093
21848 // Warn if an update is scheduled from inside an updater function. 19094/**
21849 { 19095 * @interface FocusEvent
21850 if (queue1.isProcessing || queue2 !== null && queue2.isProcessing) { 19096 * @see http://www.w3.org/TR/DOM-Level-3-Events/
21851 warning$19(false, 'An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.'); 19097 */
21852 } 19098var FocusEventInterface = {
21853 } 19099 relatedTarget: null
19100};
21854 19101
21855 // Find the insertion position in the first queue. 19102/**
21856 var insertAfter1 = findInsertionPosition(queue1, update); 19103 * @param {object} dispatchConfig Configuration used to dispatch this event.
21857 var insertBefore1 = insertAfter1 !== null ? insertAfter1.next : queue1.first; 19104 * @param {string} dispatchMarker Marker identifying the event target.
19105 * @param {object} nativeEvent Native browser event.
19106 * @extends {SyntheticUIEvent}
19107 */
19108function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
19109 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
19110}
21858 19111
21859 if (queue2 === null) { 19112SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);
21860 // If there's no alternate queue, there's nothing else to do but insert.
21861 insertUpdateIntoQueue(queue1, update, insertAfter1, insertBefore1);
21862 return null;
21863 }
21864 19113
21865 // If there is an alternate queue, find the insertion position. 19114/**
21866 var insertAfter2 = findInsertionPosition(queue2, update); 19115 * `charCode` represents the actual "character code" and is safe to use with
21867 var insertBefore2 = insertAfter2 !== null ? insertAfter2.next : queue2.first; 19116 * `String.fromCharCode`. As such, only keys that correspond to printable
19117 * characters produce a valid `charCode`, the only exception to this is Enter.
19118 * The Tab-key is considered non-printable and does not have a `charCode`,
19119 * presumably because it does not produce a tab-character in browsers.
19120 *
19121 * @param {object} nativeEvent Native browser event.
19122 * @return {number} Normalized `charCode` property.
19123 */
19124function getEventCharCode(nativeEvent) {
19125 var charCode;
19126 var keyCode = nativeEvent.keyCode;
21868 19127
21869 // Now we can insert into the first queue. This must come after finding both 19128 if ('charCode' in nativeEvent) {
21870 // insertion positions because it mutates the list. 19129 charCode = nativeEvent.charCode;
21871 insertUpdateIntoQueue(queue1, update, insertAfter1, insertBefore1);
21872 19130
21873 // See if the insertion positions are equal. Be careful to only compare 19131 // FF does not set `charCode` for the Enter-key, check against `keyCode`.
21874 // non-null values. 19132 if (charCode === 0 && keyCode === 13) {
21875 if (insertBefore1 === insertBefore2 && insertBefore1 !== null || insertAfter1 === insertAfter2 && insertAfter1 !== null) { 19133 charCode = 13;
21876 // The insertion positions are the same, so when we inserted into the first
21877 // queue, it also inserted into the alternate. All we need to do is update
21878 // the alternate queue's `first` and `last` pointers, in case they
21879 // have changed.
21880 if (insertAfter2 === null) {
21881 queue2.first = update;
21882 }
21883 if (insertBefore2 === null) {
21884 queue2.last = null;
21885 } 19134 }
21886 return null;
21887 } else { 19135 } else {
21888 // The insertion positions are different, so we need to clone the update and 19136 // IE8 does not implement `charCode`, but `keyCode` has the correct value.
21889 // insert the clone into the alternate queue. 19137 charCode = keyCode;
21890 var update2 = cloneUpdate(update);
21891 insertUpdateIntoQueue(queue2, update2, insertAfter2, insertBefore2);
21892 return update2;
21893 }
21894}
21895
21896function addUpdate(fiber, partialState, callback, priorityLevel) {
21897 var update = {
21898 priorityLevel: priorityLevel,
21899 partialState: partialState,
21900 callback: callback,
21901 isReplace: false,
21902 isForced: false,
21903 isTopLevelUnmount: false,
21904 next: null
21905 };
21906 insertUpdate(fiber, update);
21907}
21908var addUpdate_1 = addUpdate;
21909
21910function addReplaceUpdate(fiber, state, callback, priorityLevel) {
21911 var update = {
21912 priorityLevel: priorityLevel,
21913 partialState: state,
21914 callback: callback,
21915 isReplace: true,
21916 isForced: false,
21917 isTopLevelUnmount: false,
21918 next: null
21919 };
21920 insertUpdate(fiber, update);
21921}
21922var addReplaceUpdate_1 = addReplaceUpdate;
21923
21924function addForceUpdate(fiber, callback, priorityLevel) {
21925 var update = {
21926 priorityLevel: priorityLevel,
21927 partialState: null,
21928 callback: callback,
21929 isReplace: false,
21930 isForced: true,
21931 isTopLevelUnmount: false,
21932 next: null
21933 };
21934 insertUpdate(fiber, update);
21935}
21936var addForceUpdate_1 = addForceUpdate;
21937
21938function getUpdatePriority(fiber) {
21939 var updateQueue = fiber.updateQueue;
21940 if (updateQueue === null) {
21941 return NoWork;
21942 } 19138 }
21943 if (fiber.tag !== ClassComponent$2 && fiber.tag !== HostRoot$2) { 19139
21944 return NoWork; 19140 // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
19141 // Must not discard the (non-)printable Enter-key.
19142 if (charCode >= 32 || charCode === 13) {
19143 return charCode;
21945 } 19144 }
21946 return updateQueue.first !== null ? updateQueue.first.priorityLevel : NoWork; 19145
19146 return 0;
21947} 19147}
21948var getUpdatePriority_1 = getUpdatePriority;
21949 19148
21950function addTopLevelUpdate$1(fiber, partialState, callback, priorityLevel) { 19149/**
21951 var isTopLevelUnmount = partialState.element === null; 19150 * Normalization of deprecated HTML5 `key` values
19151 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
19152 */
19153var normalizeKey = {
19154 Esc: 'Escape',
19155 Spacebar: ' ',
19156 Left: 'ArrowLeft',
19157 Up: 'ArrowUp',
19158 Right: 'ArrowRight',
19159 Down: 'ArrowDown',
19160 Del: 'Delete',
19161 Win: 'OS',
19162 Menu: 'ContextMenu',
19163 Apps: 'ContextMenu',
19164 Scroll: 'ScrollLock',
19165 MozPrintableKey: 'Unidentified'
19166};
21952 19167
21953 var update = { 19168/**
21954 priorityLevel: priorityLevel, 19169 * Translation from legacy `keyCode` to HTML5 `key`
21955 partialState: partialState, 19170 * Only special keys supported, all others depend on keyboard layout or browser
21956 callback: callback, 19171 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
21957 isReplace: false, 19172 */
21958 isForced: false, 19173var translateToKey = {
21959 isTopLevelUnmount: isTopLevelUnmount, 19174 '8': 'Backspace',
21960 next: null 19175 '9': 'Tab',
21961 }; 19176 '12': 'Clear',
21962 var update2 = insertUpdate(fiber, update); 19177 '13': 'Enter',
19178 '16': 'Shift',
19179 '17': 'Control',
19180 '18': 'Alt',
19181 '19': 'Pause',
19182 '20': 'CapsLock',
19183 '27': 'Escape',
19184 '32': ' ',
19185 '33': 'PageUp',
19186 '34': 'PageDown',
19187 '35': 'End',
19188 '36': 'Home',
19189 '37': 'ArrowLeft',
19190 '38': 'ArrowUp',
19191 '39': 'ArrowRight',
19192 '40': 'ArrowDown',
19193 '45': 'Insert',
19194 '46': 'Delete',
19195 '112': 'F1',
19196 '113': 'F2',
19197 '114': 'F3',
19198 '115': 'F4',
19199 '116': 'F5',
19200 '117': 'F6',
19201 '118': 'F7',
19202 '119': 'F8',
19203 '120': 'F9',
19204 '121': 'F10',
19205 '122': 'F11',
19206 '123': 'F12',
19207 '144': 'NumLock',
19208 '145': 'ScrollLock',
19209 '224': 'Meta'
19210};
21963 19211
21964 if (isTopLevelUnmount) { 19212/**
21965 // TODO: Redesign the top-level mount/update/unmount API to avoid this 19213 * @param {object} nativeEvent Native browser event.
21966 // special case. 19214 * @return {string} Normalized `key` property.
21967 var queue1 = _queue1; 19215 */
21968 var queue2 = _queue2; 19216function getEventKey(nativeEvent) {
19217 if (nativeEvent.key) {
19218 // Normalize inconsistent values reported by browsers due to
19219 // implementations of a working draft specification.
21969 19220
21970 // Drop all updates that are lower-priority, so that the tree is not 19221 // FireFox implements `key` but returns `MozPrintableKey` for all
21971 // remounted. We need to do this for both queues. 19222 // printable characters (normalized to `Unidentified`), ignore it.
21972 if (queue1 !== null && update.next !== null) { 19223 var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
21973 update.next = null; 19224 if (key !== 'Unidentified') {
21974 queue1.last = update; 19225 return key;
21975 }
21976 if (queue2 !== null && update2 !== null && update2.next !== null) {
21977 update2.next = null;
21978 queue2.last = update;
21979 } 19226 }
21980 } 19227 }
21981}
21982var addTopLevelUpdate_1 = addTopLevelUpdate$1;
21983 19228
21984function getStateFromUpdate(update, instance, prevState, props) { 19229 // Browser does not implement `key`, polyfill as much of it as we can.
21985 var partialState = update.partialState; 19230 if (nativeEvent.type === 'keypress') {
21986 if (typeof partialState === 'function') { 19231 var charCode = getEventCharCode(nativeEvent);
21987 var updateFn = partialState;
21988 return updateFn.call(instance, prevState, props);
21989 } else {
21990 return partialState;
21991 }
21992}
21993 19232
21994function beginUpdateQueue(current, workInProgress, queue, instance, prevState, props, priorityLevel) { 19233 // The enter-key is technically both printable and non-printable and can
21995 if (current !== null && current.updateQueue === queue) { 19234 // thus be captured by `keypress`, no other non-printable key should.
21996 // We need to create a work-in-progress queue, by cloning the current queue. 19235 return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
21997 var currentQueue = queue;
21998 queue = workInProgress.updateQueue = {
21999 first: currentQueue.first,
22000 last: currentQueue.last,
22001 // These fields are no longer valid because they were already committed.
22002 // Reset them.
22003 callbackList: null,
22004 hasForceUpdate: false
22005 };
22006 } 19236 }
22007 19237 if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
22008 { 19238 // While user keyboard layout determines the actual meaning of each
22009 // Set this flag so we can warn if setState is called inside the update 19239 // `keyCode` value, almost all function keys have a universal value.
22010 // function of another setState. 19240 return translateToKey[nativeEvent.keyCode] || 'Unidentified';
22011 queue.isProcessing = true;
22012 } 19241 }
19242 return '';
19243}
22013 19244
22014 // Calculate these using the the existing values as a base. 19245/**
22015 var callbackList = queue.callbackList; 19246 * @interface KeyboardEvent
22016 var hasForceUpdate = queue.hasForceUpdate; 19247 * @see http://www.w3.org/TR/DOM-Level-3-Events/
19248 */
19249var KeyboardEventInterface = {
19250 key: getEventKey,
19251 location: null,
19252 ctrlKey: null,
19253 shiftKey: null,
19254 altKey: null,
19255 metaKey: null,
19256 repeat: null,
19257 locale: null,
19258 getModifierState: getEventModifierState,
19259 // Legacy Interface
19260 charCode: function (event) {
19261 // `charCode` is the result of a KeyPress event and represents the value of
19262 // the actual printable character.
22017 19263
22018 // Applies updates with matching priority to the previous state to create 19264 // KeyPress is deprecated, but its replacement is not yet final and not
22019 // a new state object. 19265 // implemented in any major browser. Only KeyPress has charCode.
22020 var state = prevState; 19266 if (event.type === 'keypress') {
22021 var dontMutatePrevState = true; 19267 return getEventCharCode(event);
22022 var update = queue.first;
22023 while (update !== null && comparePriority(update.priorityLevel, priorityLevel) <= 0) {
22024 // Remove each update from the queue right before it is processed. That way
22025 // if setState is called from inside an updater function, the new update
22026 // will be inserted in the correct position.
22027 queue.first = update.next;
22028 if (queue.first === null) {
22029 queue.last = null;
22030 } 19268 }
19269 return 0;
19270 },
19271 keyCode: function (event) {
19272 // `keyCode` is the result of a KeyDown/Up event and represents the value of
19273 // physical keyboard key.
22031 19274
22032 var _partialState = void 0; 19275 // The actual meaning of the value depends on the users' keyboard layout
22033 if (update.isReplace) { 19276 // which cannot be detected. Assuming that it is a US keyboard layout
22034 state = getStateFromUpdate(update, instance, state, props); 19277 // provides a surprisingly accurate mapping for US and European users.
22035 dontMutatePrevState = true; 19278 // Due to this, it is left to the user to implement at this time.
22036 } else { 19279 if (event.type === 'keydown' || event.type === 'keyup') {
22037 _partialState = getStateFromUpdate(update, instance, state, props); 19280 return event.keyCode;
22038 if (_partialState) {
22039 if (dontMutatePrevState) {
22040 state = _assign({}, state, _partialState);
22041 } else {
22042 state = _assign(state, _partialState);
22043 }
22044 dontMutatePrevState = false;
22045 }
22046 } 19281 }
22047 if (update.isForced) { 19282 return 0;
22048 hasForceUpdate = true; 19283 },
19284 which: function (event) {
19285 // `which` is an alias for either `keyCode` or `charCode` depending on the
19286 // type of the event.
19287 if (event.type === 'keypress') {
19288 return getEventCharCode(event);
22049 } 19289 }
22050 // Second condition ignores top-level unmount callbacks if they are not the 19290 if (event.type === 'keydown' || event.type === 'keyup') {
22051 // last update in the queue, since a subsequent update will cause a remount. 19291 return event.keyCode;
22052 if (update.callback !== null && !(update.isTopLevelUnmount && update.next !== null)) {
22053 callbackList = callbackList !== null ? callbackList : [];
22054 callbackList.push(update.callback);
22055 workInProgress.effectTag |= CallbackEffect;
22056 } 19292 }
22057 update = update.next; 19293 return 0;
22058 } 19294 }
19295};
22059 19296
22060 queue.callbackList = callbackList; 19297/**
22061 queue.hasForceUpdate = hasForceUpdate; 19298 * @param {object} dispatchConfig Configuration used to dispatch this event.
19299 * @param {string} dispatchMarker Marker identifying the event target.
19300 * @param {object} nativeEvent Native browser event.
19301 * @extends {SyntheticUIEvent}
19302 */
19303function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
19304 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
19305}
22062 19306
22063 if (queue.first === null && callbackList === null && !hasForceUpdate) { 19307SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);
22064 // The queue is empty and there are no callbacks. We can reset it.
22065 workInProgress.updateQueue = null;
22066 }
22067 19308
22068 { 19309/**
22069 // No longer processing. 19310 * @interface DragEvent
22070 queue.isProcessing = false; 19311 * @see http://www.w3.org/TR/DOM-Level-3-Events/
22071 } 19312 */
19313var DragEventInterface = {
19314 dataTransfer: null
19315};
22072 19316
22073 return state; 19317/**
19318 * @param {object} dispatchConfig Configuration used to dispatch this event.
19319 * @param {string} dispatchMarker Marker identifying the event target.
19320 * @param {object} nativeEvent Native browser event.
19321 * @extends {SyntheticMouseEvent}
19322 */
19323function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
19324 return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
22074} 19325}
22075var beginUpdateQueue_1 = beginUpdateQueue;
22076 19326
22077function commitCallbacks(finishedWork, queue, context) { 19327SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);
22078 var callbackList = queue.callbackList;
22079 if (callbackList === null) {
22080 return;
22081 }
22082 19328
22083 // Set the list to null to make sure they don't get called more than once. 19329/**
22084 queue.callbackList = null; 19330 * @interface TouchEvent
19331 * @see http://www.w3.org/TR/touch-events/
19332 */
19333var TouchEventInterface = {
19334 touches: null,
19335 targetTouches: null,
19336 changedTouches: null,
19337 altKey: null,
19338 metaKey: null,
19339 ctrlKey: null,
19340 shiftKey: null,
19341 getModifierState: getEventModifierState
19342};
22085 19343
22086 for (var i = 0; i < callbackList.length; i++) { 19344/**
22087 var _callback = callbackList[i]; 19345 * @param {object} dispatchConfig Configuration used to dispatch this event.
22088 !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0; 19346 * @param {string} dispatchMarker Marker identifying the event target.
22089 _callback.call(context); 19347 * @param {object} nativeEvent Native browser event.
22090 } 19348 * @extends {SyntheticUIEvent}
19349 */
19350function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
19351 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
22091} 19352}
22092var commitCallbacks_1 = commitCallbacks;
22093 19353
22094var ReactFiberUpdateQueue = { 19354SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
22095 addUpdate: addUpdate_1, 19355
22096 addReplaceUpdate: addReplaceUpdate_1, 19356/**
22097 addForceUpdate: addForceUpdate_1, 19357 * @interface Event
22098 getUpdatePriority: getUpdatePriority_1, 19358 * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
22099 addTopLevelUpdate: addTopLevelUpdate_1, 19359 * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
22100 beginUpdateQueue: beginUpdateQueue_1, 19360 */
22101 commitCallbacks: commitCallbacks_1 19361var TransitionEventInterface = {
19362 propertyName: null,
19363 elapsedTime: null,
19364 pseudoElement: null
22102}; 19365};
22103 19366
22104{ 19367/**
22105 var warning$21 = require$$0; 19368 * @param {object} dispatchConfig Configuration used to dispatch this event.
19369 * @param {string} dispatchMarker Marker identifying the event target.
19370 * @param {object} nativeEvent Native browser event.
19371 * @extends {SyntheticEvent}
19372 */
19373function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
19374 return SyntheticEvent$1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
19375}
19376
19377SyntheticEvent$1.augmentClass(SyntheticTransitionEvent, TransitionEventInterface);
19378
19379/**
19380 * @interface WheelEvent
19381 * @see http://www.w3.org/TR/DOM-Level-3-Events/
19382 */
19383var WheelEventInterface = {
19384 deltaX: function (event) {
19385 return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
19386 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
19387 },
19388 deltaY: function (event) {
19389 return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
19390 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
19391 'wheelDelta' in event ? -event.wheelDelta : 0;
19392 },
19393 deltaZ: null,
19394
19395 // Browsers without "deltaMode" is reporting in raw wheel delta where one
19396 // notch on the scroll is always +/- 120, roughly equivalent to pixels.
19397 // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
19398 // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
19399 deltaMode: null
19400};
19401
19402/**
19403 * @param {object} dispatchConfig Configuration used to dispatch this event.
19404 * @param {string} dispatchMarker Marker identifying the event target.
19405 * @param {object} nativeEvent Native browser event.
19406 * @extends {SyntheticMouseEvent}
19407 */
19408function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
19409 return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
22106} 19410}
22107 19411
19412SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);
19413
19414/**
19415 * Turns
19416 * ['abort', ...]
19417 * into
19418 * eventTypes = {
19419 * 'abort': {
19420 * phasedRegistrationNames: {
19421 * bubbled: 'onAbort',
19422 * captured: 'onAbortCapture',
19423 * },
19424 * dependencies: ['topAbort'],
19425 * },
19426 * ...
19427 * };
19428 * topLevelEventsToDispatchConfig = {
19429 * 'topAbort': { sameConfig }
19430 * };
19431 */
19432var eventTypes$4 = {};
19433var topLevelEventsToDispatchConfig = {};
19434['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'cancel', 'canPlay', 'canPlayThrough', 'click', 'close', 'contextMenu', 'copy', 'cut', 'doubleClick', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'progress', 'rateChange', 'reset', 'scroll', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'toggle', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) {
19435 var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
19436 var onEvent = 'on' + capitalizedEvent;
19437 var topEvent = 'top' + capitalizedEvent;
19438
19439 var type = {
19440 phasedRegistrationNames: {
19441 bubbled: onEvent,
19442 captured: onEvent + 'Capture'
19443 },
19444 dependencies: [topEvent]
19445 };
19446 eventTypes$4[event] = type;
19447 topLevelEventsToDispatchConfig[topEvent] = type;
19448});
19449
19450// Only used in DEV for exhaustiveness validation.
19451var knownHTMLTopLevelTypes = ['topAbort', 'topCancel', 'topCanPlay', 'topCanPlayThrough', 'topClose', 'topDurationChange', 'topEmptied', 'topEncrypted', 'topEnded', 'topError', 'topInput', 'topInvalid', 'topLoad', 'topLoadedData', 'topLoadedMetadata', 'topLoadStart', 'topPause', 'topPlay', 'topPlaying', 'topProgress', 'topRateChange', 'topReset', 'topSeeked', 'topSeeking', 'topStalled', 'topSubmit', 'topSuspend', 'topTimeUpdate', 'topToggle', 'topVolumeChange', 'topWaiting'];
19452
19453var SimpleEventPlugin = {
19454 eventTypes: eventTypes$4,
19455
19456 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
19457 var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
19458 if (!dispatchConfig) {
19459 return null;
19460 }
19461 var EventConstructor;
19462 switch (topLevelType) {
19463 case 'topKeyPress':
19464 // Firefox creates a keypress event for function keys too. This removes
19465 // the unwanted keypress events. Enter is however both printable and
19466 // non-printable. One would expect Tab to be as well (but it isn't).
19467 if (getEventCharCode(nativeEvent) === 0) {
19468 return null;
19469 }
19470 /* falls through */
19471 case 'topKeyDown':
19472 case 'topKeyUp':
19473 EventConstructor = SyntheticKeyboardEvent;
19474 break;
19475 case 'topBlur':
19476 case 'topFocus':
19477 EventConstructor = SyntheticFocusEvent;
19478 break;
19479 case 'topClick':
19480 // Firefox creates a click event on right mouse clicks. This removes the
19481 // unwanted click events.
19482 if (nativeEvent.button === 2) {
19483 return null;
19484 }
19485 /* falls through */
19486 case 'topDoubleClick':
19487 case 'topMouseDown':
19488 case 'topMouseMove':
19489 case 'topMouseUp':
19490 // TODO: Disabled elements should not respond to mouse events
19491 /* falls through */
19492 case 'topMouseOut':
19493 case 'topMouseOver':
19494 case 'topContextMenu':
19495 EventConstructor = SyntheticMouseEvent;
19496 break;
19497 case 'topDrag':
19498 case 'topDragEnd':
19499 case 'topDragEnter':
19500 case 'topDragExit':
19501 case 'topDragLeave':
19502 case 'topDragOver':
19503 case 'topDragStart':
19504 case 'topDrop':
19505 EventConstructor = SyntheticDragEvent;
19506 break;
19507 case 'topTouchCancel':
19508 case 'topTouchEnd':
19509 case 'topTouchMove':
19510 case 'topTouchStart':
19511 EventConstructor = SyntheticTouchEvent;
19512 break;
19513 case 'topAnimationEnd':
19514 case 'topAnimationIteration':
19515 case 'topAnimationStart':
19516 EventConstructor = SyntheticAnimationEvent;
19517 break;
19518 case 'topTransitionEnd':
19519 EventConstructor = SyntheticTransitionEvent;
19520 break;
19521 case 'topScroll':
19522 EventConstructor = SyntheticUIEvent;
19523 break;
19524 case 'topWheel':
19525 EventConstructor = SyntheticWheelEvent;
19526 break;
19527 case 'topCopy':
19528 case 'topCut':
19529 case 'topPaste':
19530 EventConstructor = SyntheticClipboardEvent;
19531 break;
19532 default:
19533 {
19534 if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) {
19535 warning(false, 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);
19536 }
19537 }
19538 // HTML Events
19539 // @see http://www.w3.org/TR/html5/index.html#events-0
19540 EventConstructor = SyntheticEvent$1;
19541 break;
19542 }
19543 var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
19544 accumulateTwoPhaseDispatches(event);
19545 return event;
19546 }
19547};
19548
19549setHandleTopLevel(handleTopLevel);
19550
19551/**
19552 * Inject modules for resolving DOM hierarchy and plugin ordering.
19553 */
19554injection$1.injectEventPluginOrder(DOMEventPluginOrder);
19555injection$2.injectComponentTree(ReactDOMComponentTree);
19556
19557/**
19558 * Some important event plugins included by default (without having to require
19559 * them).
19560 */
19561injection$1.injectEventPluginsByName({
19562 SimpleEventPlugin: SimpleEventPlugin,
19563 EnterLeaveEventPlugin: EnterLeaveEventPlugin,
19564 ChangeEventPlugin: ChangeEventPlugin,
19565 SelectEventPlugin: SelectEventPlugin,
19566 BeforeInputEventPlugin: BeforeInputEventPlugin
19567});
19568
19569var enableAsyncSubtreeAPI = true;
19570var enableAsyncSchedulingByDefaultInReactDOM = false;
19571// Exports React.Fragment
19572var enableReactFragment = false;
19573// Exports ReactDOM.createRoot
19574var enableCreateRoot = false;
19575var enableUserTimingAPI = true;
19576
19577// Mutating mode (React DOM, React ART, React Native):
19578var enableMutatingReconciler = true;
19579// Experimental noop mode (currently unused):
19580var enableNoopReconciler = false;
19581// Experimental persistent mode (CS):
19582var enablePersistentReconciler = false;
19583
19584// Only used in www builds.
19585
22108var valueStack = []; 19586var valueStack = [];
22109 19587
22110{ 19588{
@@ -22113,27 +19591,25 @@ var valueStack = [];
22113 19591
22114var index = -1; 19592var index = -1;
22115 19593
22116var createCursor$1 = function (defaultValue) { 19594function createCursor(defaultValue) {
22117 return { 19595 return {
22118 current: defaultValue 19596 current: defaultValue
22119 }; 19597 };
22120}; 19598}
19599
22121 19600
22122var isEmpty = function () {
22123 return index === -1;
22124};
22125 19601
22126var pop$1 = function (cursor, fiber) { 19602function pop(cursor, fiber) {
22127 if (index < 0) { 19603 if (index < 0) {
22128 { 19604 {
22129 warning$21(false, 'Unexpected pop.'); 19605 warning(false, 'Unexpected pop.');
22130 } 19606 }
22131 return; 19607 return;
22132 } 19608 }
22133 19609
22134 { 19610 {
22135 if (fiber !== fiberStack[index]) { 19611 if (fiber !== fiberStack[index]) {
22136 warning$21(false, 'Unexpected Fiber popped.'); 19612 warning(false, 'Unexpected Fiber popped.');
22137 } 19613 }
22138 } 19614 }
22139 19615
@@ -22146,9 +19622,9 @@ var pop$1 = function (cursor, fiber) {
22146 } 19622 }
22147 19623
22148 index--; 19624 index--;
22149}; 19625}
22150 19626
22151var push$1 = function (cursor, value, fiber) { 19627function push(cursor, value, fiber) {
22152 index++; 19628 index++;
22153 19629
22154 valueStack[index] = cursor.current; 19630 valueStack[index] = cursor.current;
@@ -22158,9 +19634,9 @@ var push$1 = function (cursor, value, fiber) {
22158 } 19634 }
22159 19635
22160 cursor.current = value; 19636 cursor.current = value;
22161}; 19637}
22162 19638
22163var reset = function () { 19639function reset$1() {
22164 while (index > -1) { 19640 while (index > -1) {
22165 valueStack[index] = null; 19641 valueStack[index] = null;
22166 19642
@@ -22170,384 +19646,498 @@ var reset = function () {
22170 19646
22171 index--; 19647 index--;
22172 } 19648 }
19649}
19650
19651var describeComponentFrame = function (name, source, ownerName) {
19652 return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
19653};
19654
19655function describeFiber(fiber) {
19656 switch (fiber.tag) {
19657 case IndeterminateComponent:
19658 case FunctionalComponent:
19659 case ClassComponent:
19660 case HostComponent:
19661 var owner = fiber._debugOwner;
19662 var source = fiber._debugSource;
19663 var name = getComponentName(fiber);
19664 var ownerName = null;
19665 if (owner) {
19666 ownerName = getComponentName(owner);
19667 }
19668 return describeComponentFrame(name, source, ownerName);
19669 default:
19670 return '';
19671 }
19672}
19673
19674// This function can only be called with a work-in-progress fiber and
19675// only during begin or complete phase. Do not call it under any other
19676// circumstances.
19677function getStackAddendumByWorkInProgressFiber(workInProgress) {
19678 var info = '';
19679 var node = workInProgress;
19680 do {
19681 info += describeFiber(node);
19682 // Otherwise this return pointer might point to the wrong tree:
19683 node = node['return'];
19684 } while (node);
19685 return info;
19686}
19687
19688function getCurrentFiberOwnerName() {
19689 {
19690 var fiber = ReactDebugCurrentFiber.current;
19691 if (fiber === null) {
19692 return null;
19693 }
19694 var owner = fiber._debugOwner;
19695 if (owner !== null && typeof owner !== 'undefined') {
19696 return getComponentName(owner);
19697 }
19698 }
19699 return null;
19700}
19701
19702function getCurrentFiberStackAddendum() {
19703 {
19704 var fiber = ReactDebugCurrentFiber.current;
19705 if (fiber === null) {
19706 return null;
19707 }
19708 // Safe because if current fiber exists, we are reconciling,
19709 // and it is guaranteed to be the work-in-progress version.
19710 return getStackAddendumByWorkInProgressFiber(fiber);
19711 }
19712 return null;
19713}
19714
19715function resetCurrentFiber() {
19716 ReactDebugCurrentFrame.getCurrentStack = null;
19717 ReactDebugCurrentFiber.current = null;
19718 ReactDebugCurrentFiber.phase = null;
19719}
19720
19721function setCurrentFiber(fiber) {
19722 ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackAddendum;
19723 ReactDebugCurrentFiber.current = fiber;
19724 ReactDebugCurrentFiber.phase = null;
19725}
19726
19727function setCurrentPhase(phase) {
19728 ReactDebugCurrentFiber.phase = phase;
19729}
19730
19731var ReactDebugCurrentFiber = {
19732 current: null,
19733 phase: null,
19734 resetCurrentFiber: resetCurrentFiber,
19735 setCurrentFiber: setCurrentFiber,
19736 setCurrentPhase: setCurrentPhase,
19737 getCurrentFiberOwnerName: getCurrentFiberOwnerName,
19738 getCurrentFiberStackAddendum: getCurrentFiberStackAddendum
19739};
19740
19741// Prefix measurements so that it's possible to filter them.
19742// Longer prefixes are hard to read in DevTools.
19743var reactEmoji = '\u269B';
19744var warningEmoji = '\u26D4';
19745var supportsUserTiming = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';
19746
19747// Keep track of current fiber so that we know the path to unwind on pause.
19748// TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them?
19749var currentFiber = null;
19750// If we're in the middle of user code, which fiber and method is it?
19751// Reusing `currentFiber` would be confusing for this because user code fiber
19752// can change during commit phase too, but we don't need to unwind it (since
19753// lifecycles in the commit phase don't resemble a tree).
19754var currentPhase = null;
19755var currentPhaseFiber = null;
19756// Did lifecycle hook schedule an update? This is often a performance problem,
19757// so we will keep track of it, and include it in the report.
19758// Track commits caused by cascading updates.
19759var isCommitting = false;
19760var hasScheduledUpdateInCurrentCommit = false;
19761var hasScheduledUpdateInCurrentPhase = false;
19762var commitCountInCurrentWorkLoop = 0;
19763var effectCountInCurrentCommit = 0;
19764var isWaitingForCallback = false;
19765// During commits, we only show a measurement once per method name
19766// to avoid stretch the commit phase with measurement overhead.
19767var labelsInCurrentCommit = new Set();
19768
19769var formatMarkName = function (markName) {
19770 return reactEmoji + ' ' + markName;
19771};
19772
19773var formatLabel = function (label, warning$$1) {
19774 var prefix = warning$$1 ? warningEmoji + ' ' : reactEmoji + ' ';
19775 var suffix = warning$$1 ? ' Warning: ' + warning$$1 : '';
19776 return '' + prefix + label + suffix;
19777};
19778
19779var beginMark = function (markName) {
19780 performance.mark(formatMarkName(markName));
19781};
19782
19783var clearMark = function (markName) {
19784 performance.clearMarks(formatMarkName(markName));
19785};
19786
19787var endMark = function (label, markName, warning$$1) {
19788 var formattedMarkName = formatMarkName(markName);
19789 var formattedLabel = formatLabel(label, warning$$1);
19790 try {
19791 performance.measure(formattedLabel, formattedMarkName);
19792 } catch (err) {}
19793 // If previous mark was missing for some reason, this will throw.
19794 // This could only happen if React crashed in an unexpected place earlier.
19795 // Don't pile on with more errors.
19796
19797 // Clear marks immediately to avoid growing buffer.
19798 performance.clearMarks(formattedMarkName);
19799 performance.clearMeasures(formattedLabel);
22173}; 19800};
22174 19801
22175var ReactFiberStack = { 19802var getFiberMarkName = function (label, debugID) {
22176 createCursor: createCursor$1, 19803 return label + ' (#' + debugID + ')';
22177 isEmpty: isEmpty,
22178 pop: pop$1,
22179 push: push$1,
22180 reset: reset
22181}; 19804};
22182 19805
22183// Trust the developer to only use this with a true check 19806var getFiberLabel = function (componentName, isMounted, phase) {
22184/** 19807 if (phase === null) {
22185 * Copyright (c) 2013-present, Facebook, Inc. 19808 // These are composite component total time measurements.
22186 * 19809 return componentName + ' [' + (isMounted ? 'update' : 'mount') + ']';
22187 * This source code is licensed under the MIT license found in the 19810 } else {
22188 * LICENSE file in the root directory of this source tree. 19811 // Composite component methods.
22189 * 19812 return componentName + '.' + phase;
22190 * @providesModule ReactDebugFiberPerf 19813 }
22191 * 19814};
22192 */
22193 19815
22194var ReactDebugFiberPerf = null; 19816var beginFiberMark = function (fiber, phase) {
19817 var componentName = getComponentName(fiber) || 'Unknown';
19818 var debugID = fiber._debugID;
19819 var isMounted = fiber.alternate !== null;
19820 var label = getFiberLabel(componentName, isMounted, phase);
22195 19821
22196{ 19822 if (isCommitting && labelsInCurrentCommit.has(label)) {
22197 var _require$8 = ReactTypeOfWork, 19823 // During the commit phase, we don't show duplicate labels because
22198 HostRoot$4 = _require$8.HostRoot, 19824 // there is a fixed overhead for every measurement, and we don't
22199 HostComponent$4 = _require$8.HostComponent, 19825 // want to stretch the commit phase beyond necessary.
22200 HostText$2 = _require$8.HostText, 19826 return false;
22201 HostPortal$1 = _require$8.HostPortal, 19827 }
22202 YieldComponent = _require$8.YieldComponent, 19828 labelsInCurrentCommit.add(label);
22203 Fragment = _require$8.Fragment;
22204
22205 var getComponentName$5 = getComponentName_1;
22206
22207 // Prefix measurements so that it's possible to filter them.
22208 // Longer prefixes are hard to read in DevTools.
22209 var reactEmoji = '\u269B';
22210 var warningEmoji = '\u26D4';
22211 var supportsUserTiming = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';
22212
22213 // Keep track of current fiber so that we know the path to unwind on pause.
22214 // TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them?
22215 var currentFiber = null;
22216 // If we're in the middle of user code, which fiber and method is it?
22217 // Reusing `currentFiber` would be confusing for this because user code fiber
22218 // can change during commit phase too, but we don't need to unwind it (since
22219 // lifecycles in the commit phase don't resemble a tree).
22220 var currentPhase = null;
22221 var currentPhaseFiber = null;
22222 // Did lifecycle hook schedule an update? This is often a performance problem,
22223 // so we will keep track of it, and include it in the report.
22224 // Track commits caused by cascading updates.
22225 var isCommitting = false;
22226 var hasScheduledUpdateInCurrentCommit = false;
22227 var hasScheduledUpdateInCurrentPhase = false;
22228 var commitCountInCurrentWorkLoop = 0;
22229 var effectCountInCurrentCommit = 0;
22230 // During commits, we only show a measurement once per method name
22231 // to avoid stretch the commit phase with measurement overhead.
22232 var labelsInCurrentCommit = new Set();
22233
22234 var formatMarkName = function (markName) {
22235 return reactEmoji + ' ' + markName;
22236 };
22237 19829
22238 var formatLabel = function (label, warning) { 19830 var markName = getFiberMarkName(label, debugID);
22239 var prefix = warning ? warningEmoji + ' ' : reactEmoji + ' '; 19831 beginMark(markName);
22240 var suffix = warning ? ' Warning: ' + warning : ''; 19832 return true;
22241 return '' + prefix + label + suffix; 19833};
22242 };
22243 19834
22244 var beginMark = function (markName) { 19835var clearFiberMark = function (fiber, phase) {
22245 performance.mark(formatMarkName(markName)); 19836 var componentName = getComponentName(fiber) || 'Unknown';
22246 }; 19837 var debugID = fiber._debugID;
19838 var isMounted = fiber.alternate !== null;
19839 var label = getFiberLabel(componentName, isMounted, phase);
19840 var markName = getFiberMarkName(label, debugID);
19841 clearMark(markName);
19842};
22247 19843
22248 var clearMark = function (markName) { 19844var endFiberMark = function (fiber, phase, warning$$1) {
22249 performance.clearMarks(formatMarkName(markName)); 19845 var componentName = getComponentName(fiber) || 'Unknown';
22250 }; 19846 var debugID = fiber._debugID;
19847 var isMounted = fiber.alternate !== null;
19848 var label = getFiberLabel(componentName, isMounted, phase);
19849 var markName = getFiberMarkName(label, debugID);
19850 endMark(label, markName, warning$$1);
19851};
22251 19852
22252 var endMark = function (label, markName, warning) { 19853var shouldIgnoreFiber = function (fiber) {
22253 var formattedMarkName = formatMarkName(markName); 19854 // Host components should be skipped in the timeline.
22254 var formattedLabel = formatLabel(label, warning); 19855 // We could check typeof fiber.type, but does this work with RN?
22255 try { 19856 switch (fiber.tag) {
22256 performance.measure(formattedLabel, formattedMarkName); 19857 case HostRoot:
22257 } catch (err) {} 19858 case HostComponent:
22258 // If previous mark was missing for some reason, this will throw. 19859 case HostText:
22259 // This could only happen if React crashed in an unexpected place earlier. 19860 case HostPortal:
22260 // Don't pile on with more errors. 19861 case ReturnComponent:
22261 19862 case Fragment:
22262 // Clear marks immediately to avoid growing buffer. 19863 return true;
22263 performance.clearMarks(formattedMarkName); 19864 default:
22264 performance.clearMeasures(formattedLabel); 19865 return false;
22265 }; 19866 }
19867};
22266 19868
22267 var getFiberMarkName = function (label, debugID) { 19869var clearPendingPhaseMeasurement = function () {
22268 return label + ' (#' + debugID + ')'; 19870 if (currentPhase !== null && currentPhaseFiber !== null) {
22269 }; 19871 clearFiberMark(currentPhaseFiber, currentPhase);
19872 }
19873 currentPhaseFiber = null;
19874 currentPhase = null;
19875 hasScheduledUpdateInCurrentPhase = false;
19876};
22270 19877
22271 var getFiberLabel = function (componentName, isMounted, phase) { 19878var pauseTimers = function () {
22272 if (phase === null) { 19879 // Stops all currently active measurements so that they can be resumed
22273 // These are composite component total time measurements. 19880 // if we continue in a later deferred loop from the same unit of work.
22274 return componentName + ' [' + (isMounted ? 'update' : 'mount') + ']'; 19881 var fiber = currentFiber;
22275 } else { 19882 while (fiber) {
22276 // Composite component methods. 19883 if (fiber._debugIsCurrentlyTiming) {
22277 return componentName + '.' + phase; 19884 endFiberMark(fiber, null, null);
22278 } 19885 }
22279 }; 19886 fiber = fiber['return'];
19887 }
19888};
19889
19890var resumeTimersRecursively = function (fiber) {
19891 if (fiber['return'] !== null) {
19892 resumeTimersRecursively(fiber['return']);
19893 }
19894 if (fiber._debugIsCurrentlyTiming) {
19895 beginFiberMark(fiber, null);
19896 }
19897};
22280 19898
22281 var beginFiberMark = function (fiber, phase) { 19899var resumeTimers = function () {
22282 var componentName = getComponentName$5(fiber) || 'Unknown'; 19900 // Resumes all measurements that were active during the last deferred loop.
22283 var debugID = fiber._debugID; 19901 if (currentFiber !== null) {
22284 var isMounted = fiber.alternate !== null; 19902 resumeTimersRecursively(currentFiber);
22285 var label = getFiberLabel(componentName, isMounted, phase); 19903 }
19904};
22286 19905
22287 if (isCommitting && labelsInCurrentCommit.has(label)) { 19906function recordEffect() {
22288 // During the commit phase, we don't show duplicate labels because 19907 if (enableUserTimingAPI) {
22289 // there is a fixed overhead for every measurement, and we don't 19908 effectCountInCurrentCommit++;
22290 // want to stretch the commit phase beyond necessary. 19909 }
22291 return false; 19910}
19911
19912function recordScheduleUpdate() {
19913 if (enableUserTimingAPI) {
19914 if (isCommitting) {
19915 hasScheduledUpdateInCurrentCommit = true;
22292 } 19916 }
22293 labelsInCurrentCommit.add(label); 19917 if (currentPhase !== null && currentPhase !== 'componentWillMount' && currentPhase !== 'componentWillReceiveProps') {
19918 hasScheduledUpdateInCurrentPhase = true;
19919 }
19920 }
19921}
22294 19922
22295 var markName = getFiberMarkName(label, debugID); 19923function startRequestCallbackTimer() {
22296 beginMark(markName); 19924 if (enableUserTimingAPI) {
22297 return true; 19925 if (supportsUserTiming && !isWaitingForCallback) {
22298 }; 19926 isWaitingForCallback = true;
19927 beginMark('(Waiting for async callback...)');
19928 }
19929 }
19930}
22299 19931
22300 var clearFiberMark = function (fiber, phase) { 19932function stopRequestCallbackTimer(didExpire) {
22301 var componentName = getComponentName$5(fiber) || 'Unknown'; 19933 if (enableUserTimingAPI) {
22302 var debugID = fiber._debugID; 19934 if (supportsUserTiming) {
22303 var isMounted = fiber.alternate !== null; 19935 isWaitingForCallback = false;
22304 var label = getFiberLabel(componentName, isMounted, phase); 19936 var warning$$1 = didExpire ? 'React was blocked by main thread' : null;
22305 var markName = getFiberMarkName(label, debugID); 19937 endMark('(Waiting for async callback...)', '(Waiting for async callback...)', warning$$1);
22306 clearMark(markName); 19938 }
22307 }; 19939 }
19940}
22308 19941
22309 var endFiberMark = function (fiber, phase, warning) { 19942function startWorkTimer(fiber) {
22310 var componentName = getComponentName$5(fiber) || 'Unknown'; 19943 if (enableUserTimingAPI) {
22311 var debugID = fiber._debugID; 19944 if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
22312 var isMounted = fiber.alternate !== null; 19945 return;
22313 var label = getFiberLabel(componentName, isMounted, phase); 19946 }
22314 var markName = getFiberMarkName(label, debugID); 19947 // If we pause, this is the fiber to unwind from.
22315 endMark(label, markName, warning); 19948 currentFiber = fiber;
22316 }; 19949 if (!beginFiberMark(fiber, null)) {
19950 return;
19951 }
19952 fiber._debugIsCurrentlyTiming = true;
19953 }
19954}
22317 19955
22318 var shouldIgnoreFiber = function (fiber) { 19956function cancelWorkTimer(fiber) {
22319 // Host components should be skipped in the timeline. 19957 if (enableUserTimingAPI) {
22320 // We could check typeof fiber.type, but does this work with RN? 19958 if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
22321 switch (fiber.tag) { 19959 return;
22322 case HostRoot$4:
22323 case HostComponent$4:
22324 case HostText$2:
22325 case HostPortal$1:
22326 case YieldComponent:
22327 case Fragment:
22328 return true;
22329 default:
22330 return false;
22331 } 19960 }
22332 }; 19961 // Remember we shouldn't complete measurement for this fiber.
19962 // Otherwise flamechart will be deep even for small updates.
19963 fiber._debugIsCurrentlyTiming = false;
19964 clearFiberMark(fiber, null);
19965 }
19966}
22333 19967
22334 var clearPendingPhaseMeasurement = function () { 19968function stopWorkTimer(fiber) {
22335 if (currentPhase !== null && currentPhaseFiber !== null) { 19969 if (enableUserTimingAPI) {
22336 clearFiberMark(currentPhaseFiber, currentPhase); 19970 if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
19971 return;
22337 } 19972 }
22338 currentPhaseFiber = null; 19973 // If we pause, its parent is the fiber to unwind from.
22339 currentPhase = null; 19974 currentFiber = fiber['return'];
22340 hasScheduledUpdateInCurrentPhase = false; 19975 if (!fiber._debugIsCurrentlyTiming) {
22341 }; 19976 return;
19977 }
19978 fiber._debugIsCurrentlyTiming = false;
19979 endFiberMark(fiber, null, null);
19980 }
19981}
22342 19982
22343 var pauseTimers = function () { 19983function stopFailedWorkTimer(fiber) {
22344 // Stops all currently active measurements so that they can be resumed 19984 if (enableUserTimingAPI) {
22345 // if we continue in a later deferred loop from the same unit of work. 19985 if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
22346 var fiber = currentFiber; 19986 return;
22347 while (fiber) {
22348 if (fiber._debugIsCurrentlyTiming) {
22349 endFiberMark(fiber, null, null);
22350 }
22351 fiber = fiber['return'];
22352 } 19987 }
22353 }; 19988 // If we pause, its parent is the fiber to unwind from.
19989 currentFiber = fiber['return'];
19990 if (!fiber._debugIsCurrentlyTiming) {
19991 return;
19992 }
19993 fiber._debugIsCurrentlyTiming = false;
19994 var warning$$1 = 'An error was thrown inside this error boundary';
19995 endFiberMark(fiber, null, warning$$1);
19996 }
19997}
22354 19998
22355 var resumeTimersRecursively = function (fiber) { 19999function startPhaseTimer(fiber, phase) {
22356 if (fiber['return'] !== null) { 20000 if (enableUserTimingAPI) {
22357 resumeTimersRecursively(fiber['return']); 20001 if (!supportsUserTiming) {
20002 return;
22358 } 20003 }
22359 if (fiber._debugIsCurrentlyTiming) { 20004 clearPendingPhaseMeasurement();
22360 beginFiberMark(fiber, null); 20005 if (!beginFiberMark(fiber, phase)) {
20006 return;
22361 } 20007 }
22362 }; 20008 currentPhaseFiber = fiber;
20009 currentPhase = phase;
20010 }
20011}
22363 20012
22364 var resumeTimers = function () { 20013function stopPhaseTimer() {
22365 // Resumes all measurements that were active during the last deferred loop. 20014 if (enableUserTimingAPI) {
22366 if (currentFiber !== null) { 20015 if (!supportsUserTiming) {
22367 resumeTimersRecursively(currentFiber); 20016 return;
22368 } 20017 }
22369 }; 20018 if (currentPhase !== null && currentPhaseFiber !== null) {
20019 var warning$$1 = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null;
20020 endFiberMark(currentPhaseFiber, currentPhase, warning$$1);
20021 }
20022 currentPhase = null;
20023 currentPhaseFiber = null;
20024 }
20025}
22370 20026
22371 ReactDebugFiberPerf = { 20027function startWorkLoopTimer(nextUnitOfWork) {
22372 recordEffect: function () { 20028 if (enableUserTimingAPI) {
22373 effectCountInCurrentCommit++; 20029 currentFiber = nextUnitOfWork;
22374 }, 20030 if (!supportsUserTiming) {
22375 recordScheduleUpdate: function () { 20031 return;
22376 if (isCommitting) { 20032 }
22377 hasScheduledUpdateInCurrentCommit = true; 20033 commitCountInCurrentWorkLoop = 0;
22378 } 20034 // This is top level call.
22379 if (currentPhase !== null && currentPhase !== 'componentWillMount' && currentPhase !== 'componentWillReceiveProps') { 20035 // Any other measurements are performed within.
22380 hasScheduledUpdateInCurrentPhase = true; 20036 beginMark('(React Tree Reconciliation)');
22381 } 20037 // Resume any measurements that were in progress during the last loop.
22382 }, 20038 resumeTimers();
22383 startWorkTimer: function (fiber) { 20039 }
22384 if (!supportsUserTiming || shouldIgnoreFiber(fiber)) { 20040}
22385 return;
22386 }
22387 // If we pause, this is the fiber to unwind from.
22388 currentFiber = fiber;
22389 if (!beginFiberMark(fiber, null)) {
22390 return;
22391 }
22392 fiber._debugIsCurrentlyTiming = true;
22393 },
22394 cancelWorkTimer: function (fiber) {
22395 if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
22396 return;
22397 }
22398 // Remember we shouldn't complete measurement for this fiber.
22399 // Otherwise flamechart will be deep even for small updates.
22400 fiber._debugIsCurrentlyTiming = false;
22401 clearFiberMark(fiber, null);
22402 },
22403 stopWorkTimer: function (fiber) {
22404 if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
22405 return;
22406 }
22407 // If we pause, its parent is the fiber to unwind from.
22408 currentFiber = fiber['return'];
22409 if (!fiber._debugIsCurrentlyTiming) {
22410 return;
22411 }
22412 fiber._debugIsCurrentlyTiming = false;
22413 endFiberMark(fiber, null, null);
22414 },
22415 stopFailedWorkTimer: function (fiber) {
22416 if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
22417 return;
22418 }
22419 // If we pause, its parent is the fiber to unwind from.
22420 currentFiber = fiber['return'];
22421 if (!fiber._debugIsCurrentlyTiming) {
22422 return;
22423 }
22424 fiber._debugIsCurrentlyTiming = false;
22425 var warning = 'An error was thrown inside this error boundary';
22426 endFiberMark(fiber, null, warning);
22427 },
22428 startPhaseTimer: function (fiber, phase) {
22429 if (!supportsUserTiming) {
22430 return;
22431 }
22432 clearPendingPhaseMeasurement();
22433 if (!beginFiberMark(fiber, phase)) {
22434 return;
22435 }
22436 currentPhaseFiber = fiber;
22437 currentPhase = phase;
22438 },
22439 stopPhaseTimer: function () {
22440 if (!supportsUserTiming) {
22441 return;
22442 }
22443 if (currentPhase !== null && currentPhaseFiber !== null) {
22444 var warning = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null;
22445 endFiberMark(currentPhaseFiber, currentPhase, warning);
22446 }
22447 currentPhase = null;
22448 currentPhaseFiber = null;
22449 },
22450 startWorkLoopTimer: function () {
22451 if (!supportsUserTiming) {
22452 return;
22453 }
22454 commitCountInCurrentWorkLoop = 0;
22455 // This is top level call.
22456 // Any other measurements are performed within.
22457 beginMark('(React Tree Reconciliation)');
22458 // Resume any measurements that were in progress during the last loop.
22459 resumeTimers();
22460 },
22461 stopWorkLoopTimer: function () {
22462 if (!supportsUserTiming) {
22463 return;
22464 }
22465 var warning = commitCountInCurrentWorkLoop > 1 ? 'There were cascading updates' : null;
22466 commitCountInCurrentWorkLoop = 0;
22467 // Pause any measurements until the next loop.
22468 pauseTimers();
22469 endMark('(React Tree Reconciliation)', '(React Tree Reconciliation)', warning);
22470 },
22471 startCommitTimer: function () {
22472 if (!supportsUserTiming) {
22473 return;
22474 }
22475 isCommitting = true;
22476 hasScheduledUpdateInCurrentCommit = false;
22477 labelsInCurrentCommit.clear();
22478 beginMark('(Committing Changes)');
22479 },
22480 stopCommitTimer: function () {
22481 if (!supportsUserTiming) {
22482 return;
22483 }
22484 20041
22485 var warning = null; 20042function stopWorkLoopTimer(interruptedBy) {
22486 if (hasScheduledUpdateInCurrentCommit) { 20043 if (enableUserTimingAPI) {
22487 warning = 'Lifecycle hook scheduled a cascading update'; 20044 if (!supportsUserTiming) {
22488 } else if (commitCountInCurrentWorkLoop > 0) { 20045 return;
22489 warning = 'Caused by a cascading update in earlier commit'; 20046 }
20047 var warning$$1 = null;
20048 if (interruptedBy !== null) {
20049 if (interruptedBy.tag === HostRoot) {
20050 warning$$1 = 'A top-level update interrupted the previous render';
20051 } else {
20052 var componentName = getComponentName(interruptedBy) || 'Unknown';
20053 warning$$1 = 'An update to ' + componentName + ' interrupted the previous render';
22490 } 20054 }
22491 hasScheduledUpdateInCurrentCommit = false; 20055 } else if (commitCountInCurrentWorkLoop > 1) {
22492 commitCountInCurrentWorkLoop++; 20056 warning$$1 = 'There were cascading updates';
22493 isCommitting = false; 20057 }
22494 labelsInCurrentCommit.clear(); 20058 commitCountInCurrentWorkLoop = 0;
20059 // Pause any measurements until the next loop.
20060 pauseTimers();
20061 endMark('(React Tree Reconciliation)', '(React Tree Reconciliation)', warning$$1);
20062 }
20063}
22495 20064
22496 endMark('(Committing Changes)', '(Committing Changes)', warning); 20065function startCommitTimer() {
22497 }, 20066 if (enableUserTimingAPI) {
22498 startCommitHostEffectsTimer: function () { 20067 if (!supportsUserTiming) {
22499 if (!supportsUserTiming) { 20068 return;
22500 return;
22501 }
22502 effectCountInCurrentCommit = 0;
22503 beginMark('(Committing Host Effects)');
22504 },
22505 stopCommitHostEffectsTimer: function () {
22506 if (!supportsUserTiming) {
22507 return;
22508 }
22509 var count = effectCountInCurrentCommit;
22510 effectCountInCurrentCommit = 0;
22511 endMark('(Committing Host Effects: ' + count + ' Total)', '(Committing Host Effects)', null);
22512 },
22513 startCommitLifeCyclesTimer: function () {
22514 if (!supportsUserTiming) {
22515 return;
22516 }
22517 effectCountInCurrentCommit = 0;
22518 beginMark('(Calling Lifecycle Methods)');
22519 },
22520 stopCommitLifeCyclesTimer: function () {
22521 if (!supportsUserTiming) {
22522 return;
22523 }
22524 var count = effectCountInCurrentCommit;
22525 effectCountInCurrentCommit = 0;
22526 endMark('(Calling Lifecycle Methods: ' + count + ' Total)', '(Calling Lifecycle Methods)', null);
22527 } 20069 }
22528 }; 20070 isCommitting = true;
20071 hasScheduledUpdateInCurrentCommit = false;
20072 labelsInCurrentCommit.clear();
20073 beginMark('(Committing Changes)');
20074 }
22529} 20075}
22530 20076
22531var ReactDebugFiberPerf_1 = ReactDebugFiberPerf; 20077function stopCommitTimer() {
20078 if (enableUserTimingAPI) {
20079 if (!supportsUserTiming) {
20080 return;
20081 }
22532 20082
22533var isFiberMounted$1 = ReactFiberTreeReflection.isFiberMounted; 20083 var warning$$1 = null;
20084 if (hasScheduledUpdateInCurrentCommit) {
20085 warning$$1 = 'Lifecycle hook scheduled a cascading update';
20086 } else if (commitCountInCurrentWorkLoop > 0) {
20087 warning$$1 = 'Caused by a cascading update in earlier commit';
20088 }
20089 hasScheduledUpdateInCurrentCommit = false;
20090 commitCountInCurrentWorkLoop++;
20091 isCommitting = false;
20092 labelsInCurrentCommit.clear();
22534 20093
22535var ClassComponent$3 = ReactTypeOfWork.ClassComponent; 20094 endMark('(Committing Changes)', '(Committing Changes)', warning$$1);
22536var HostRoot$3 = ReactTypeOfWork.HostRoot; 20095 }
20096}
22537 20097
22538var createCursor = ReactFiberStack.createCursor; 20098function startCommitHostEffectsTimer() {
22539var pop = ReactFiberStack.pop; 20099 if (enableUserTimingAPI) {
22540var push = ReactFiberStack.push; 20100 if (!supportsUserTiming) {
20101 return;
20102 }
20103 effectCountInCurrentCommit = 0;
20104 beginMark('(Committing Host Effects)');
20105 }
20106}
22541 20107
22542{ 20108function stopCommitHostEffectsTimer() {
22543 var warning$20 = require$$0; 20109 if (enableUserTimingAPI) {
22544 var checkPropTypes$1 = checkPropTypes; 20110 if (!supportsUserTiming) {
22545 var ReactDebugCurrentFiber$2 = ReactDebugCurrentFiber_1; 20111 return;
20112 }
20113 var count = effectCountInCurrentCommit;
20114 effectCountInCurrentCommit = 0;
20115 endMark('(Committing Host Effects: ' + count + ' Total)', '(Committing Host Effects)', null);
20116 }
20117}
22546 20118
22547 var _require4 = ReactDebugFiberPerf_1, 20119function startCommitLifeCyclesTimer() {
22548 startPhaseTimer = _require4.startPhaseTimer, 20120 if (enableUserTimingAPI) {
22549 stopPhaseTimer = _require4.stopPhaseTimer; 20121 if (!supportsUserTiming) {
20122 return;
20123 }
20124 effectCountInCurrentCommit = 0;
20125 beginMark('(Calling Lifecycle Methods)');
20126 }
20127}
22550 20128
20129function stopCommitLifeCyclesTimer() {
20130 if (enableUserTimingAPI) {
20131 if (!supportsUserTiming) {
20132 return;
20133 }
20134 var count = effectCountInCurrentCommit;
20135 effectCountInCurrentCommit = 0;
20136 endMark('(Calling Lifecycle Methods: ' + count + ' Total)', '(Calling Lifecycle Methods)', null);
20137 }
20138}
20139
20140{
22551 var warnedAboutMissingGetChildContext = {}; 20141 var warnedAboutMissingGetChildContext = {};
22552} 20142}
22553 20143
@@ -22561,7 +20151,7 @@ var didPerformWorkStackCursor = createCursor(false);
22561var previousContext = emptyObject; 20151var previousContext = emptyObject;
22562 20152
22563function getUnmaskedContext(workInProgress) { 20153function getUnmaskedContext(workInProgress) {
22564 var hasOwnContext = isContextProvider$1(workInProgress); 20154 var hasOwnContext = isContextProvider(workInProgress);
22565 if (hasOwnContext) { 20155 if (hasOwnContext) {
22566 // If the fiber is a context provider itself, when we read its context 20156 // If the fiber is a context provider itself, when we read its context
22567 // we have already pushed its own child context on the stack. A context 20157 // we have already pushed its own child context on the stack. A context
@@ -22571,16 +20161,14 @@ function getUnmaskedContext(workInProgress) {
22571 } 20161 }
22572 return contextStackCursor.current; 20162 return contextStackCursor.current;
22573} 20163}
22574var getUnmaskedContext_1 = getUnmaskedContext;
22575 20164
22576function cacheContext(workInProgress, unmaskedContext, maskedContext) { 20165function cacheContext(workInProgress, unmaskedContext, maskedContext) {
22577 var instance = workInProgress.stateNode; 20166 var instance = workInProgress.stateNode;
22578 instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext; 20167 instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
22579 instance.__reactInternalMemoizedMaskedChildContext = maskedContext; 20168 instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
22580} 20169}
22581var cacheContext_1 = cacheContext;
22582 20170
22583var getMaskedContext = function (workInProgress, unmaskedContext) { 20171function getMaskedContext(workInProgress, unmaskedContext) {
22584 var type = workInProgress.type; 20172 var type = workInProgress.type;
22585 var contextTypes = type.contextTypes; 20173 var contextTypes = type.contextTypes;
22586 if (!contextTypes) { 20174 if (!contextTypes) {
@@ -22601,10 +20189,8 @@ var getMaskedContext = function (workInProgress, unmaskedContext) {
22601 } 20189 }
22602 20190
22603 { 20191 {
22604 var name = getComponentName_1(workInProgress) || 'Unknown'; 20192 var name = getComponentName(workInProgress) || 'Unknown';
22605 ReactDebugCurrentFiber$2.setCurrentFiber(workInProgress, null); 20193 checkPropTypes(contextTypes, context, 'context', name, ReactDebugCurrentFiber.getCurrentFiberStackAddendum);
22606 checkPropTypes$1(contextTypes, context, 'context', name, ReactDebugCurrentFiber$2.getCurrentFiberStackAddendum);
22607 ReactDebugCurrentFiber$2.resetCurrentFiber();
22608 } 20194 }
22609 20195
22610 // Cache unmasked context so we can avoid recreating masked context unless necessary. 20196 // Cache unmasked context so we can avoid recreating masked context unless necessary.
@@ -22614,45 +20200,42 @@ var getMaskedContext = function (workInProgress, unmaskedContext) {
22614 } 20200 }
22615 20201
22616 return context; 20202 return context;
22617}; 20203}
22618 20204
22619var hasContextChanged = function () { 20205function hasContextChanged() {
22620 return didPerformWorkStackCursor.current; 20206 return didPerformWorkStackCursor.current;
22621}; 20207}
22622 20208
22623function isContextConsumer(fiber) { 20209function isContextConsumer(fiber) {
22624 return fiber.tag === ClassComponent$3 && fiber.type.contextTypes != null; 20210 return fiber.tag === ClassComponent && fiber.type.contextTypes != null;
22625} 20211}
22626var isContextConsumer_1 = isContextConsumer;
22627 20212
22628function isContextProvider$1(fiber) { 20213function isContextProvider(fiber) {
22629 return fiber.tag === ClassComponent$3 && fiber.type.childContextTypes != null; 20214 return fiber.tag === ClassComponent && fiber.type.childContextTypes != null;
22630} 20215}
22631var isContextProvider_1 = isContextProvider$1;
22632 20216
22633function popContextProvider(fiber) { 20217function popContextProvider(fiber) {
22634 if (!isContextProvider$1(fiber)) { 20218 if (!isContextProvider(fiber)) {
22635 return; 20219 return;
22636 } 20220 }
22637 20221
22638 pop(didPerformWorkStackCursor, fiber); 20222 pop(didPerformWorkStackCursor, fiber);
22639 pop(contextStackCursor, fiber); 20223 pop(contextStackCursor, fiber);
22640} 20224}
22641var popContextProvider_1 = popContextProvider;
22642 20225
22643var popTopLevelContextObject = function (fiber) { 20226function popTopLevelContextObject(fiber) {
22644 pop(didPerformWorkStackCursor, fiber); 20227 pop(didPerformWorkStackCursor, fiber);
22645 pop(contextStackCursor, fiber); 20228 pop(contextStackCursor, fiber);
22646}; 20229}
22647 20230
22648var pushTopLevelContextObject = function (fiber, context, didChange) { 20231function pushTopLevelContextObject(fiber, context, didChange) {
22649 !(contextStackCursor.cursor == null) ? invariant(false, 'Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.') : void 0; 20232 !(contextStackCursor.cursor == null) ? invariant(false, 'Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.') : void 0;
22650 20233
22651 push(contextStackCursor, context, fiber); 20234 push(contextStackCursor, context, fiber);
22652 push(didPerformWorkStackCursor, didChange, fiber); 20235 push(didPerformWorkStackCursor, didChange, fiber);
22653}; 20236}
22654 20237
22655function processChildContext$1(fiber, parentContext, isReconciling) { 20238function processChildContext(fiber, parentContext) {
22656 var instance = fiber.stateNode; 20239 var instance = fiber.stateNode;
22657 var childContextTypes = fiber.type.childContextTypes; 20240 var childContextTypes = fiber.type.childContextTypes;
22658 20241
@@ -22660,11 +20243,11 @@ function processChildContext$1(fiber, parentContext, isReconciling) {
22660 // It has only been added in Fiber to match the (unintentional) behavior in Stack. 20243 // It has only been added in Fiber to match the (unintentional) behavior in Stack.
22661 if (typeof instance.getChildContext !== 'function') { 20244 if (typeof instance.getChildContext !== 'function') {
22662 { 20245 {
22663 var componentName = getComponentName_1(fiber) || 'Unknown'; 20246 var componentName = getComponentName(fiber) || 'Unknown';
22664 20247
22665 if (!warnedAboutMissingGetChildContext[componentName]) { 20248 if (!warnedAboutMissingGetChildContext[componentName]) {
22666 warnedAboutMissingGetChildContext[componentName] = true; 20249 warnedAboutMissingGetChildContext[componentName] = true;
22667 warning$20(false, '%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName); 20250 warning(false, '%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);
22668 } 20251 }
22669 } 20252 }
22670 return parentContext; 20253 return parentContext;
@@ -22672,34 +20255,33 @@ function processChildContext$1(fiber, parentContext, isReconciling) {
22672 20255
22673 var childContext = void 0; 20256 var childContext = void 0;
22674 { 20257 {
22675 ReactDebugCurrentFiber$2.setCurrentFiber(fiber, 'getChildContext'); 20258 ReactDebugCurrentFiber.setCurrentPhase('getChildContext');
22676 startPhaseTimer(fiber, 'getChildContext'); 20259 }
22677 childContext = instance.getChildContext(); 20260 startPhaseTimer(fiber, 'getChildContext');
22678 stopPhaseTimer(); 20261 childContext = instance.getChildContext();
22679 ReactDebugCurrentFiber$2.resetCurrentFiber(); 20262 stopPhaseTimer();
20263 {
20264 ReactDebugCurrentFiber.setCurrentPhase(null);
22680 } 20265 }
22681 for (var contextKey in childContext) { 20266 for (var contextKey in childContext) {
22682 !(contextKey in childContextTypes) ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', getComponentName_1(fiber) || 'Unknown', contextKey) : void 0; 20267 !(contextKey in childContextTypes) ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', getComponentName(fiber) || 'Unknown', contextKey) : void 0;
22683 } 20268 }
22684 { 20269 {
22685 var name = getComponentName_1(fiber) || 'Unknown'; 20270 var name = getComponentName(fiber) || 'Unknown';
22686 // We can only provide accurate element stacks if we pass work-in-progress tree 20271 checkPropTypes(childContextTypes, childContext, 'child context', name,
22687 // during the begin or complete phase. However currently this function is also 20272 // In practice, there is one case in which we won't get a stack. It's when
22688 // called from unstable_renderSubtree legacy implementation. In this case it unsafe to 20273 // somebody calls unstable_renderSubtreeIntoContainer() and we process
22689 // assume anything about the given fiber. We won't pass it down if we aren't sure. 20274 // context from the parent component instance. The stack will be missing
22690 // TODO: remove this hack when we delete unstable_renderSubtree in Fiber. 20275 // because it's outside of the reconciliation, and so the pointer has not
22691 var workInProgress = isReconciling ? fiber : null; 20276 // been set. This is rare and doesn't matter. We'll also remove that API.
22692 ReactDebugCurrentFiber$2.setCurrentFiber(workInProgress, null); 20277 ReactDebugCurrentFiber.getCurrentFiberStackAddendum);
22693 checkPropTypes$1(childContextTypes, childContext, 'child context', name, ReactDebugCurrentFiber$2.getCurrentFiberStackAddendum);
22694 ReactDebugCurrentFiber$2.resetCurrentFiber();
22695 } 20278 }
22696 20279
22697 return _assign({}, parentContext, childContext); 20280 return _assign({}, parentContext, childContext);
22698} 20281}
22699var processChildContext_1 = processChildContext$1;
22700 20282
22701var pushContextProvider = function (workInProgress) { 20283function pushContextProvider(workInProgress) {
22702 if (!isContextProvider$1(workInProgress)) { 20284 if (!isContextProvider(workInProgress)) {
22703 return false; 20285 return false;
22704 } 20286 }
22705 20287
@@ -22710,15 +20292,15 @@ var pushContextProvider = function (workInProgress) {
22710 var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyObject; 20292 var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyObject;
22711 20293
22712 // Remember the parent context so we can merge with it later. 20294 // Remember the parent context so we can merge with it later.
22713 // Inherit the parent's did-perform-work value to avoid inadvertantly blocking updates. 20295 // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.
22714 previousContext = contextStackCursor.current; 20296 previousContext = contextStackCursor.current;
22715 push(contextStackCursor, memoizedMergedChildContext, workInProgress); 20297 push(contextStackCursor, memoizedMergedChildContext, workInProgress);
22716 push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress); 20298 push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);
22717 20299
22718 return true; 20300 return true;
22719}; 20301}
22720 20302
22721var invalidateContextProvider = function (workInProgress, didChange) { 20303function invalidateContextProvider(workInProgress, didChange) {
22722 var instance = workInProgress.stateNode; 20304 var instance = workInProgress.stateNode;
22723 !instance ? invariant(false, 'Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.') : void 0; 20305 !instance ? invariant(false, 'Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.') : void 0;
22724 20306
@@ -22726,7 +20308,7 @@ var invalidateContextProvider = function (workInProgress, didChange) {
22726 // Merge parent and own context. 20308 // Merge parent and own context.
22727 // Skip this if we're not updating due to sCU. 20309 // Skip this if we're not updating due to sCU.
22728 // This avoids unnecessarily recomputing memoized values. 20310 // This avoids unnecessarily recomputing memoized values.
22729 var mergedContext = processChildContext$1(workInProgress, previousContext, true); 20311 var mergedContext = processChildContext(workInProgress, previousContext);
22730 instance.__reactInternalMemoizedMergedChildContext = mergedContext; 20312 instance.__reactInternalMemoizedMergedChildContext = mergedContext;
22731 20313
22732 // Replace the old (or empty) context with the new one. 20314 // Replace the old (or empty) context with the new one.
@@ -22740,22 +20322,22 @@ var invalidateContextProvider = function (workInProgress, didChange) {
22740 pop(didPerformWorkStackCursor, workInProgress); 20322 pop(didPerformWorkStackCursor, workInProgress);
22741 push(didPerformWorkStackCursor, didChange, workInProgress); 20323 push(didPerformWorkStackCursor, didChange, workInProgress);
22742 } 20324 }
22743}; 20325}
22744 20326
22745var resetContext = function () { 20327function resetContext() {
22746 previousContext = emptyObject; 20328 previousContext = emptyObject;
22747 contextStackCursor.current = emptyObject; 20329 contextStackCursor.current = emptyObject;
22748 didPerformWorkStackCursor.current = false; 20330 didPerformWorkStackCursor.current = false;
22749}; 20331}
22750 20332
22751var findCurrentUnmaskedContext$1 = function (fiber) { 20333function findCurrentUnmaskedContext(fiber) {
22752 // Currently this is only used with renderSubtreeIntoContainer; not sure if it 20334 // Currently this is only used with renderSubtreeIntoContainer; not sure if it
22753 // makes sense elsewhere 20335 // makes sense elsewhere
22754 !(isFiberMounted$1(fiber) && fiber.tag === ClassComponent$3) ? invariant(false, 'Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.') : void 0; 20336 !(isFiberMounted(fiber) && fiber.tag === ClassComponent) ? invariant(false, 'Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.') : void 0;
22755 20337
22756 var node = fiber; 20338 var node = fiber;
22757 while (node.tag !== HostRoot$3) { 20339 while (node.tag !== HostRoot) {
22758 if (isContextProvider$1(node)) { 20340 if (isContextProvider(node)) {
22759 return node.stateNode.__reactInternalMemoizedMergedChildContext; 20341 return node.stateNode.__reactInternalMemoizedMergedChildContext;
22760 } 20342 }
22761 var parent = node['return']; 20343 var parent = node['return'];
@@ -22763,60 +20345,34 @@ var findCurrentUnmaskedContext$1 = function (fiber) {
22763 node = parent; 20345 node = parent;
22764 } 20346 }
22765 return node.stateNode.context; 20347 return node.stateNode.context;
22766}; 20348}
22767
22768var ReactFiberContext = {
22769 getUnmaskedContext: getUnmaskedContext_1,
22770 cacheContext: cacheContext_1,
22771 getMaskedContext: getMaskedContext,
22772 hasContextChanged: hasContextChanged,
22773 isContextConsumer: isContextConsumer_1,
22774 isContextProvider: isContextProvider_1,
22775 popContextProvider: popContextProvider_1,
22776 popTopLevelContextObject: popTopLevelContextObject,
22777 pushTopLevelContextObject: pushTopLevelContextObject,
22778 processChildContext: processChildContext_1,
22779 pushContextProvider: pushContextProvider,
22780 invalidateContextProvider: invalidateContextProvider,
22781 resetContext: resetContext,
22782 findCurrentUnmaskedContext: findCurrentUnmaskedContext$1
22783};
22784
22785/**
22786 * Copyright (c) 2013-present, Facebook, Inc.
22787 *
22788 * This source code is licensed under the MIT license found in the
22789 * LICENSE file in the root directory of this source tree.
22790 *
22791 * @providesModule ReactTypeOfInternalContext
22792 *
22793 */
22794 20349
22795var ReactTypeOfInternalContext = { 20350var NoWork = 0; // TODO: Use an opaque type once ESLint et al support the syntax
22796 NoContext: 0,
22797 AsyncUpdates: 1
22798};
22799 20351
22800var IndeterminateComponent$1 = ReactTypeOfWork.IndeterminateComponent; 20352var Sync = 1;
22801var ClassComponent$4 = ReactTypeOfWork.ClassComponent; 20353var Never = 2147483647; // Max int32: Math.pow(2, 31) - 1
22802var HostRoot$5 = ReactTypeOfWork.HostRoot;
22803var HostComponent$5 = ReactTypeOfWork.HostComponent;
22804var HostText$3 = ReactTypeOfWork.HostText;
22805var HostPortal$2 = ReactTypeOfWork.HostPortal;
22806var CoroutineComponent = ReactTypeOfWork.CoroutineComponent;
22807var YieldComponent$1 = ReactTypeOfWork.YieldComponent;
22808var Fragment$1 = ReactTypeOfWork.Fragment;
22809 20354
22810var NoWork$1 = ReactPriorityLevel.NoWork; 20355var UNIT_SIZE = 10;
20356var MAGIC_NUMBER_OFFSET = 2;
22811 20357
22812var NoContext = ReactTypeOfInternalContext.NoContext; 20358// 1 unit of expiration time represents 10ms.
20359function msToExpirationTime(ms) {
20360 // Always add an offset so that we don't clash with the magic number for NoWork.
20361 return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;
20362}
22813 20363
22814var NoEffect$1 = ReactTypeOfSideEffect.NoEffect; 20364function ceiling(num, precision) {
20365 return ((num / precision | 0) + 1) * precision;
20366}
22815 20367
20368function computeExpirationBucket(currentTime, expirationInMs, bucketSizeMs) {
20369 return ceiling(currentTime + expirationInMs / UNIT_SIZE, bucketSizeMs / UNIT_SIZE);
20370}
22816 20371
20372var NoContext = 0;
20373var AsyncUpdates = 1;
22817 20374
22818{ 20375{
22819 var getComponentName$6 = getComponentName_1;
22820 var hasBadMapPolyfill = false; 20376 var hasBadMapPolyfill = false;
22821 try { 20377 try {
22822 var nonExtensibleObject = Object.preventExtensions({}); 20378 var nonExtensibleObject = Object.preventExtensions({});
@@ -22861,13 +20417,13 @@ function FiberNode(tag, key, internalContextTag) {
22861 this.internalContextTag = internalContextTag; 20417 this.internalContextTag = internalContextTag;
22862 20418
22863 // Effects 20419 // Effects
22864 this.effectTag = NoEffect$1; 20420 this.effectTag = NoEffect;
22865 this.nextEffect = null; 20421 this.nextEffect = null;
22866 20422
22867 this.firstEffect = null; 20423 this.firstEffect = null;
22868 this.lastEffect = null; 20424 this.lastEffect = null;
22869 20425
22870 this.pendingWorkPriority = NoWork$1; 20426 this.expirationTime = NoWork;
22871 20427
22872 this.alternate = null; 20428 this.alternate = null;
22873 20429
@@ -22905,7 +20461,7 @@ function shouldConstruct(Component) {
22905} 20461}
22906 20462
22907// This is used to create an alternate fiber to do work on. 20463// This is used to create an alternate fiber to do work on.
22908var createWorkInProgress = function (current, renderPriority) { 20464function createWorkInProgress(current, pendingProps, expirationTime) {
22909 var workInProgress = current.alternate; 20465 var workInProgress = current.alternate;
22910 if (workInProgress === null) { 20466 if (workInProgress === null) {
22911 // We use a double buffering pooling technique because we know that we'll 20467 // We use a double buffering pooling technique because we know that we'll
@@ -22929,7 +20485,7 @@ var createWorkInProgress = function (current, renderPriority) {
22929 } else { 20485 } else {
22930 // We already have an alternate. 20486 // We already have an alternate.
22931 // Reset the effect tag. 20487 // Reset the effect tag.
22932 workInProgress.effectTag = NoEffect$1; 20488 workInProgress.effectTag = NoEffect;
22933 20489
22934 // The effect list is no longer valid. 20490 // The effect list is no longer valid.
22935 workInProgress.nextEffect = null; 20491 workInProgress.nextEffect = null;
@@ -22937,71 +20493,45 @@ var createWorkInProgress = function (current, renderPriority) {
22937 workInProgress.lastEffect = null; 20493 workInProgress.lastEffect = null;
22938 } 20494 }
22939 20495
22940 workInProgress.pendingWorkPriority = renderPriority; 20496 workInProgress.expirationTime = expirationTime;
20497 workInProgress.pendingProps = pendingProps;
22941 20498
22942 workInProgress.child = current.child; 20499 workInProgress.child = current.child;
22943 workInProgress.memoizedProps = current.memoizedProps; 20500 workInProgress.memoizedProps = current.memoizedProps;
22944 workInProgress.memoizedState = current.memoizedState; 20501 workInProgress.memoizedState = current.memoizedState;
22945 workInProgress.updateQueue = current.updateQueue; 20502 workInProgress.updateQueue = current.updateQueue;
22946 20503
22947 // pendingProps is set by the parent during reconciliation.
22948 // TODO: Pass this as an argument.
22949
22950 // These will be overridden during the parent's reconciliation 20504 // These will be overridden during the parent's reconciliation
22951 workInProgress.sibling = current.sibling; 20505 workInProgress.sibling = current.sibling;
22952 workInProgress.index = current.index; 20506 workInProgress.index = current.index;
22953 workInProgress.ref = current.ref; 20507 workInProgress.ref = current.ref;
22954 20508
22955 return workInProgress; 20509 return workInProgress;
22956}; 20510}
22957 20511
22958var createHostRootFiber$1 = function () { 20512function createHostRootFiber() {
22959 var fiber = createFiber(HostRoot$5, null, NoContext); 20513 var fiber = createFiber(HostRoot, null, NoContext);
22960 return fiber; 20514 return fiber;
22961}; 20515}
22962 20516
22963var createFiberFromElement = function (element, internalContextTag, priorityLevel) { 20517function createFiberFromElement(element, internalContextTag, expirationTime) {
22964 var owner = null; 20518 var owner = null;
22965 { 20519 {
22966 owner = element._owner; 20520 owner = element._owner;
22967 } 20521 }
22968 20522
22969 var fiber = createFiberFromElementType(element.type, element.key, internalContextTag, owner);
22970 fiber.pendingProps = element.props;
22971 fiber.pendingWorkPriority = priorityLevel;
22972
22973 {
22974 fiber._debugSource = element._source;
22975 fiber._debugOwner = element._owner;
22976 }
22977
22978 return fiber;
22979};
22980
22981var createFiberFromFragment = function (elements, internalContextTag, priorityLevel) {
22982 // TODO: Consider supporting keyed fragments. Technically, we accidentally
22983 // support that in the existing React.
22984 var fiber = createFiber(Fragment$1, null, internalContextTag);
22985 fiber.pendingProps = elements;
22986 fiber.pendingWorkPriority = priorityLevel;
22987 return fiber;
22988};
22989
22990var createFiberFromText = function (content, internalContextTag, priorityLevel) {
22991 var fiber = createFiber(HostText$3, null, internalContextTag);
22992 fiber.pendingProps = content;
22993 fiber.pendingWorkPriority = priorityLevel;
22994 return fiber;
22995};
22996
22997function createFiberFromElementType(type, key, internalContextTag, debugOwner) {
22998 var fiber = void 0; 20523 var fiber = void 0;
20524 var type = element.type,
20525 key = element.key;
20526
22999 if (typeof type === 'function') { 20527 if (typeof type === 'function') {
23000 fiber = shouldConstruct(type) ? createFiber(ClassComponent$4, key, internalContextTag) : createFiber(IndeterminateComponent$1, key, internalContextTag); 20528 fiber = shouldConstruct(type) ? createFiber(ClassComponent, key, internalContextTag) : createFiber(IndeterminateComponent, key, internalContextTag);
23001 fiber.type = type; 20529 fiber.type = type;
20530 fiber.pendingProps = element.props;
23002 } else if (typeof type === 'string') { 20531 } else if (typeof type === 'string') {
23003 fiber = createFiber(HostComponent$5, key, internalContextTag); 20532 fiber = createFiber(HostComponent, key, internalContextTag);
23004 fiber.type = type; 20533 fiber.type = type;
20534 fiber.pendingProps = element.props;
23005 } else if (typeof type === 'object' && type !== null && typeof type.tag === 'number') { 20535 } else if (typeof type === 'object' && type !== null && typeof type.tag === 'number') {
23006 // Currently assumed to be a continuation and therefore is a fiber already. 20536 // Currently assumed to be a continuation and therefore is a fiber already.
23007 // TODO: The yield system is currently broken for updates in some cases. 20537 // TODO: The yield system is currently broken for updates in some cases.
@@ -23010,309 +20540,911 @@ function createFiberFromElementType(type, key, internalContextTag, debugOwner) {
23010 // we don't know if we can reuse that fiber or if we need to clone it. 20540 // we don't know if we can reuse that fiber or if we need to clone it.
23011 // There is probably a clever way to restructure this. 20541 // There is probably a clever way to restructure this.
23012 fiber = type; 20542 fiber = type;
20543 fiber.pendingProps = element.props;
23013 } else { 20544 } else {
23014 var info = ''; 20545 var info = '';
23015 { 20546 {
23016 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { 20547 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
23017 info += ' You likely forgot to export your component from the file ' + "it's defined in."; 20548 info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
23018 } 20549 }
23019 var ownerName = debugOwner ? getComponentName$6(debugOwner) : null; 20550 var ownerName = owner ? getComponentName(owner) : null;
23020 if (ownerName) { 20551 if (ownerName) {
23021 info += '\n\nCheck the render method of `' + ownerName + '`.'; 20552 info += '\n\nCheck the render method of `' + ownerName + '`.';
23022 } 20553 }
23023 } 20554 }
23024 invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info); 20555 invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info);
23025 } 20556 }
20557
20558 {
20559 fiber._debugSource = element._source;
20560 fiber._debugOwner = element._owner;
20561 }
20562
20563 fiber.expirationTime = expirationTime;
20564
20565 return fiber;
20566}
20567
20568function createFiberFromFragment(elements, internalContextTag, expirationTime, key) {
20569 var fiber = createFiber(Fragment, key, internalContextTag);
20570 fiber.pendingProps = elements;
20571 fiber.expirationTime = expirationTime;
23026 return fiber; 20572 return fiber;
23027} 20573}
23028 20574
23029var createFiberFromElementType_1 = createFiberFromElementType; 20575function createFiberFromText(content, internalContextTag, expirationTime) {
20576 var fiber = createFiber(HostText, null, internalContextTag);
20577 fiber.pendingProps = content;
20578 fiber.expirationTime = expirationTime;
20579 return fiber;
20580}
23030 20581
23031var createFiberFromHostInstanceForDeletion = function () { 20582function createFiberFromHostInstanceForDeletion() {
23032 var fiber = createFiber(HostComponent$5, null, NoContext); 20583 var fiber = createFiber(HostComponent, null, NoContext);
23033 fiber.type = 'DELETED'; 20584 fiber.type = 'DELETED';
23034 return fiber; 20585 return fiber;
23035}; 20586}
23036 20587
23037var createFiberFromCoroutine = function (coroutine, internalContextTag, priorityLevel) { 20588function createFiberFromCall(call, internalContextTag, expirationTime) {
23038 var fiber = createFiber(CoroutineComponent, coroutine.key, internalContextTag); 20589 var fiber = createFiber(CallComponent, call.key, internalContextTag);
23039 fiber.type = coroutine.handler; 20590 fiber.type = call.handler;
23040 fiber.pendingProps = coroutine; 20591 fiber.pendingProps = call;
23041 fiber.pendingWorkPriority = priorityLevel; 20592 fiber.expirationTime = expirationTime;
23042 return fiber; 20593 return fiber;
23043}; 20594}
23044 20595
23045var createFiberFromYield = function (yieldNode, internalContextTag, priorityLevel) { 20596function createFiberFromReturn(returnNode, internalContextTag, expirationTime) {
23046 var fiber = createFiber(YieldComponent$1, null, internalContextTag); 20597 var fiber = createFiber(ReturnComponent, null, internalContextTag);
20598 fiber.expirationTime = expirationTime;
23047 return fiber; 20599 return fiber;
23048}; 20600}
23049 20601
23050var createFiberFromPortal = function (portal, internalContextTag, priorityLevel) { 20602function createFiberFromPortal(portal, internalContextTag, expirationTime) {
23051 var fiber = createFiber(HostPortal$2, portal.key, internalContextTag); 20603 var fiber = createFiber(HostPortal, portal.key, internalContextTag);
23052 fiber.pendingProps = portal.children || []; 20604 fiber.pendingProps = portal.children || [];
23053 fiber.pendingWorkPriority = priorityLevel; 20605 fiber.expirationTime = expirationTime;
23054 fiber.stateNode = { 20606 fiber.stateNode = {
23055 containerInfo: portal.containerInfo, 20607 containerInfo: portal.containerInfo,
20608 pendingChildren: null, // Used by persistent updates
23056 implementation: portal.implementation 20609 implementation: portal.implementation
23057 }; 20610 };
23058 return fiber; 20611 return fiber;
23059}; 20612}
23060
23061var largerPriority = function (p1, p2) {
23062 return p1 !== NoWork$1 && (p2 === NoWork$1 || p2 > p1) ? p1 : p2;
23063};
23064
23065var ReactFiber = {
23066 createWorkInProgress: createWorkInProgress,
23067 createHostRootFiber: createHostRootFiber$1,
23068 createFiberFromElement: createFiberFromElement,
23069 createFiberFromFragment: createFiberFromFragment,
23070 createFiberFromText: createFiberFromText,
23071 createFiberFromElementType: createFiberFromElementType_1,
23072 createFiberFromHostInstanceForDeletion: createFiberFromHostInstanceForDeletion,
23073 createFiberFromCoroutine: createFiberFromCoroutine,
23074 createFiberFromYield: createFiberFromYield,
23075 createFiberFromPortal: createFiberFromPortal,
23076 largerPriority: largerPriority
23077};
23078
23079var createHostRootFiber = ReactFiber.createHostRootFiber;
23080 20613
23081var createFiberRoot$1 = function (containerInfo) { 20614function createFiberRoot(containerInfo, hydrate) {
23082 // Cyclic construction. This cheats the type system right now because 20615 // Cyclic construction. This cheats the type system right now because
23083 // stateNode is any. 20616 // stateNode is any.
23084 var uninitializedFiber = createHostRootFiber(); 20617 var uninitializedFiber = createHostRootFiber();
23085 var root = { 20618 var root = {
23086 current: uninitializedFiber, 20619 current: uninitializedFiber,
23087 containerInfo: containerInfo, 20620 containerInfo: containerInfo,
23088 isScheduled: false, 20621 pendingChildren: null,
23089 nextScheduledRoot: null, 20622 remainingExpirationTime: NoWork,
20623 isReadyForCommit: false,
20624 finishedWork: null,
23090 context: null, 20625 context: null,
23091 pendingContext: null 20626 pendingContext: null,
20627 hydrate: hydrate,
20628 nextScheduledRoot: null
23092 }; 20629 };
23093 uninitializedFiber.stateNode = root; 20630 uninitializedFiber.stateNode = root;
23094 return root; 20631 return root;
23095}; 20632}
23096 20633
23097var ReactFiberRoot = { 20634var onCommitFiberRoot = null;
23098 createFiberRoot: createFiberRoot$1 20635var onCommitFiberUnmount = null;
23099}; 20636var hasLoggedError = false;
23100 20637
23101var defaultShowDialog = function (capturedError) { 20638function catchErrors(fn) {
20639 return function (arg) {
20640 try {
20641 return fn(arg);
20642 } catch (err) {
20643 if (true && !hasLoggedError) {
20644 hasLoggedError = true;
20645 warning(false, 'React DevTools encountered an error: %s', err);
20646 }
20647 }
20648 };
20649}
20650
20651function injectInternals(internals) {
20652 if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
20653 // No DevTools
20654 return false;
20655 }
20656 var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
20657 if (hook.isDisabled) {
20658 // This isn't a real property on the hook, but it can be set to opt out
20659 // of DevTools integration and associated warnings and logs.
20660 // https://github.com/facebook/react/issues/3877
20661 return true;
20662 }
20663 if (!hook.supportsFiber) {
20664 {
20665 warning(false, 'The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://fb.me/react-devtools');
20666 }
20667 // DevTools exists, even though it doesn't support Fiber.
20668 return true;
20669 }
20670 try {
20671 var rendererID = hook.inject(internals);
20672 // We have successfully injected, so now it is safe to set up hooks.
20673 onCommitFiberRoot = catchErrors(function (root) {
20674 return hook.onCommitFiberRoot(rendererID, root);
20675 });
20676 onCommitFiberUnmount = catchErrors(function (fiber) {
20677 return hook.onCommitFiberUnmount(rendererID, fiber);
20678 });
20679 } catch (err) {
20680 // Catch all errors because it is unsafe to throw during initialization.
20681 {
20682 warning(false, 'React DevTools encountered an error: %s.', err);
20683 }
20684 }
20685 // DevTools exists
23102 return true; 20686 return true;
23103}; 20687}
23104 20688
23105var showDialog = defaultShowDialog; 20689function onCommitRoot(root) {
20690 if (typeof onCommitFiberRoot === 'function') {
20691 onCommitFiberRoot(root);
20692 }
20693}
23106 20694
23107function logCapturedError$1(capturedError) { 20695function onCommitUnmount(fiber) {
23108 var logError = showDialog(capturedError); 20696 if (typeof onCommitFiberUnmount === 'function') {
20697 onCommitFiberUnmount(fiber);
20698 }
20699}
23109 20700
23110 // Allow injected showDialog() to prevent default console.error logging. 20701{
23111 // This enables renderers like ReactNative to better manage redbox behavior. 20702 var didWarnUpdateInsideUpdate = false;
23112 if (logError === false) { 20703}
20704
20705// Callbacks are not validated until invocation
20706
20707
20708// Singly linked-list of updates. When an update is scheduled, it is added to
20709// the queue of the current fiber and the work-in-progress fiber. The two queues
20710// are separate but they share a persistent structure.
20711//
20712// During reconciliation, updates are removed from the work-in-progress fiber,
20713// but they remain on the current fiber. That ensures that if a work-in-progress
20714// is aborted, the aborted updates are recovered by cloning from current.
20715//
20716// The work-in-progress queue is always a subset of the current queue.
20717//
20718// When the tree is committed, the work-in-progress becomes the current.
20719
20720
20721function createUpdateQueue(baseState) {
20722 var queue = {
20723 baseState: baseState,
20724 expirationTime: NoWork,
20725 first: null,
20726 last: null,
20727 callbackList: null,
20728 hasForceUpdate: false,
20729 isInitialized: false
20730 };
20731 {
20732 queue.isProcessing = false;
20733 }
20734 return queue;
20735}
20736
20737function insertUpdateIntoQueue(queue, update) {
20738 // Append the update to the end of the list.
20739 if (queue.last === null) {
20740 // Queue is empty
20741 queue.first = queue.last = update;
20742 } else {
20743 queue.last.next = update;
20744 queue.last = update;
20745 }
20746 if (queue.expirationTime === NoWork || queue.expirationTime > update.expirationTime) {
20747 queue.expirationTime = update.expirationTime;
20748 }
20749}
20750
20751function insertUpdateIntoFiber(fiber, update) {
20752 // We'll have at least one and at most two distinct update queues.
20753 var alternateFiber = fiber.alternate;
20754 var queue1 = fiber.updateQueue;
20755 if (queue1 === null) {
20756 // TODO: We don't know what the base state will be until we begin work.
20757 // It depends on which fiber is the next current. Initialize with an empty
20758 // base state, then set to the memoizedState when rendering. Not super
20759 // happy with this approach.
20760 queue1 = fiber.updateQueue = createUpdateQueue(null);
20761 }
20762
20763 var queue2 = void 0;
20764 if (alternateFiber !== null) {
20765 queue2 = alternateFiber.updateQueue;
20766 if (queue2 === null) {
20767 queue2 = alternateFiber.updateQueue = createUpdateQueue(null);
20768 }
20769 } else {
20770 queue2 = null;
20771 }
20772 queue2 = queue2 !== queue1 ? queue2 : null;
20773
20774 // Warn if an update is scheduled from inside an updater function.
20775 {
20776 if ((queue1.isProcessing || queue2 !== null && queue2.isProcessing) && !didWarnUpdateInsideUpdate) {
20777 warning(false, 'An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');
20778 didWarnUpdateInsideUpdate = true;
20779 }
20780 }
20781
20782 // If there's only one queue, add the update to that queue and exit.
20783 if (queue2 === null) {
20784 insertUpdateIntoQueue(queue1, update);
20785 return;
20786 }
20787
20788 // If either queue is empty, we need to add to both queues.
20789 if (queue1.last === null || queue2.last === null) {
20790 insertUpdateIntoQueue(queue1, update);
20791 insertUpdateIntoQueue(queue2, update);
23113 return; 20792 return;
23114 } 20793 }
23115 20794
23116 var error = capturedError.error; 20795 // If both lists are not empty, the last update is the same for both lists
20796 // because of structural sharing. So, we should only append to one of
20797 // the lists.
20798 insertUpdateIntoQueue(queue1, update);
20799 // But we still need to update the `last` pointer of queue2.
20800 queue2.last = update;
20801}
20802
20803function getUpdateExpirationTime(fiber) {
20804 if (fiber.tag !== ClassComponent && fiber.tag !== HostRoot) {
20805 return NoWork;
20806 }
20807 var updateQueue = fiber.updateQueue;
20808 if (updateQueue === null) {
20809 return NoWork;
20810 }
20811 return updateQueue.expirationTime;
20812}
20813
20814function getStateFromUpdate(update, instance, prevState, props) {
20815 var partialState = update.partialState;
20816 if (typeof partialState === 'function') {
20817 var updateFn = partialState;
20818 return updateFn.call(instance, prevState, props);
20819 } else {
20820 return partialState;
20821 }
20822}
20823
20824function processUpdateQueue(current, workInProgress, queue, instance, props, renderExpirationTime) {
20825 if (current !== null && current.updateQueue === queue) {
20826 // We need to create a work-in-progress queue, by cloning the current queue.
20827 var currentQueue = queue;
20828 queue = workInProgress.updateQueue = {
20829 baseState: currentQueue.baseState,
20830 expirationTime: currentQueue.expirationTime,
20831 first: currentQueue.first,
20832 last: currentQueue.last,
20833 isInitialized: currentQueue.isInitialized,
20834 // These fields are no longer valid because they were already committed.
20835 // Reset them.
20836 callbackList: null,
20837 hasForceUpdate: false
20838 };
20839 }
20840
23117 { 20841 {
23118 var componentName = capturedError.componentName, 20842 // Set this flag so we can warn if setState is called inside the update
23119 componentStack = capturedError.componentStack, 20843 // function of another setState.
23120 errorBoundaryName = capturedError.errorBoundaryName, 20844 queue.isProcessing = true;
23121 errorBoundaryFound = capturedError.errorBoundaryFound, 20845 }
23122 willRetry = capturedError.willRetry;
23123 20846
20847 // Reset the remaining expiration time. If we skip over any updates, we'll
20848 // increase this accordingly.
20849 queue.expirationTime = NoWork;
23124 20850
23125 var componentNameMessage = componentName ? 'The above error occurred in the <' + componentName + '> component:' : 'The above error occurred in one of your React components:'; 20851 // TODO: We don't know what the base state will be until we begin work.
20852 // It depends on which fiber is the next current. Initialize with an empty
20853 // base state, then set to the memoizedState when rendering. Not super
20854 // happy with this approach.
20855 var state = void 0;
20856 if (queue.isInitialized) {
20857 state = queue.baseState;
20858 } else {
20859 state = queue.baseState = workInProgress.memoizedState;
20860 queue.isInitialized = true;
20861 }
20862 var dontMutatePrevState = true;
20863 var update = queue.first;
20864 var didSkip = false;
20865 while (update !== null) {
20866 var updateExpirationTime = update.expirationTime;
20867 if (updateExpirationTime > renderExpirationTime) {
20868 // This update does not have sufficient priority. Skip it.
20869 var remainingExpirationTime = queue.expirationTime;
20870 if (remainingExpirationTime === NoWork || remainingExpirationTime > updateExpirationTime) {
20871 // Update the remaining expiration time.
20872 queue.expirationTime = updateExpirationTime;
20873 }
20874 if (!didSkip) {
20875 didSkip = true;
20876 queue.baseState = state;
20877 }
20878 // Continue to the next update.
20879 update = update.next;
20880 continue;
20881 }
23126 20882
23127 var errorBoundaryMessage = void 0; 20883 // This update does have sufficient priority.
23128 // errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow. 20884
23129 if (errorBoundaryFound && errorBoundaryName) { 20885 // If no previous updates were skipped, drop this update from the queue by
23130 if (willRetry) { 20886 // advancing the head of the list.
23131 errorBoundaryMessage = 'React will try to recreate this component tree from scratch ' + ('using the error boundary you provided, ' + errorBoundaryName + '.'); 20887 if (!didSkip) {
23132 } else { 20888 queue.first = update.next;
23133 errorBoundaryMessage = 'This error was initially handled by the error boundary ' + errorBoundaryName + '.\n' + 'Recreating the tree from scratch failed so React will unmount the tree.'; 20889 if (queue.first === null) {
20890 queue.last = null;
23134 } 20891 }
20892 }
20893
20894 // Process the update
20895 var _partialState = void 0;
20896 if (update.isReplace) {
20897 state = getStateFromUpdate(update, instance, state, props);
20898 dontMutatePrevState = true;
23135 } else { 20899 } else {
23136 errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'You can learn more about error boundaries at https://fb.me/react-error-boundaries.'; 20900 _partialState = getStateFromUpdate(update, instance, state, props);
20901 if (_partialState) {
20902 if (dontMutatePrevState) {
20903 // $FlowFixMe: Idk how to type this properly.
20904 state = _assign({}, state, _partialState);
20905 } else {
20906 state = _assign(state, _partialState);
20907 }
20908 dontMutatePrevState = false;
20909 }
23137 } 20910 }
23138 var combinedMessage = '' + componentNameMessage + componentStack + '\n\n' + ('' + errorBoundaryMessage); 20911 if (update.isForced) {
20912 queue.hasForceUpdate = true;
20913 }
20914 if (update.callback !== null) {
20915 // Append to list of callbacks.
20916 var _callbackList = queue.callbackList;
20917 if (_callbackList === null) {
20918 _callbackList = queue.callbackList = [];
20919 }
20920 _callbackList.push(update);
20921 }
20922 update = update.next;
20923 }
23139 20924
23140 // In development, we provide our own message with just the component stack. 20925 if (queue.callbackList !== null) {
23141 // We don't include the original error message and JS stack because the browser 20926 workInProgress.effectTag |= Callback;
23142 // has already printed it. Even if the application swallows the error, it is still 20927 } else if (queue.first === null && !queue.hasForceUpdate) {
23143 // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils. 20928 // The queue is empty. We can reset it.
23144 console.error(combinedMessage); 20929 workInProgress.updateQueue = null;
20930 }
20931
20932 if (!didSkip) {
20933 didSkip = true;
20934 queue.baseState = state;
20935 }
20936
20937 {
20938 // No longer processing.
20939 queue.isProcessing = false;
23145 } 20940 }
20941
20942 return state;
23146} 20943}
23147 20944
23148var injection$1 = { 20945function commitCallbacks(queue, context) {
23149 /** 20946 var callbackList = queue.callbackList;
23150 * Display custom dialog for lifecycle errors. 20947 if (callbackList === null) {
23151 * Return false to prevent default behavior of logging to console.error. 20948 return;
23152 */
23153 injectDialog: function (fn) {
23154 !(showDialog === defaultShowDialog) ? invariant(false, 'The custom dialog was already injected.') : void 0;
23155 !(typeof fn === 'function') ? invariant(false, 'Injected showDialog() must be a function.') : void 0;
23156 showDialog = fn;
23157 } 20949 }
23158}; 20950 // Set the list to null to make sure they don't get called more than once.
20951 queue.callbackList = null;
20952 for (var i = 0; i < callbackList.length; i++) {
20953 var update = callbackList[i];
20954 var _callback = update.callback;
20955 // This update might be processed again. Clear the callback so it's only
20956 // called once.
20957 update.callback = null;
20958 !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0;
20959 _callback.call(context);
20960 }
20961}
23159 20962
23160var logCapturedError_1 = logCapturedError$1; 20963var fakeInternalInstance = {};
20964var isArray = Array.isArray;
23161 20965
23162var ReactFiberErrorLogger = { 20966{
23163 injection: injection$1, 20967 var didWarnAboutStateAssignmentForComponent = {};
23164 logCapturedError: logCapturedError_1
23165};
23166 20968
23167/** 20969 var warnOnInvalidCallback = function (callback, callerName) {
23168 * Copyright (c) 2014-present, Facebook, Inc. 20970 warning(callback === null || typeof callback === 'function', '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
23169 * 20971 };
23170 * This source code is licensed under the MIT license found in the
23171 * LICENSE file in the root directory of this source tree.
23172 *
23173 * @providesModule ReactCoroutine
23174 *
23175 */
23176 20972
23177// The Symbol used to tag the special React types. If there is no native Symbol 20973 // This is so gross but it's at least non-critical and can be removed if
23178// nor polyfill, then a plain number is used for performance. 20974 // it causes problems. This is meant to give a nicer error message for
23179var REACT_COROUTINE_TYPE$1; 20975 // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,
23180var REACT_YIELD_TYPE$1; 20976 // ...)) which otherwise throws a "_processChildContext is not a function"
23181if (typeof Symbol === 'function' && Symbol['for']) { 20977 // exception.
23182 REACT_COROUTINE_TYPE$1 = Symbol['for']('react.coroutine'); 20978 Object.defineProperty(fakeInternalInstance, '_processChildContext', {
23183 REACT_YIELD_TYPE$1 = Symbol['for']('react.yield'); 20979 enumerable: false,
23184} else { 20980 value: function () {
23185 REACT_COROUTINE_TYPE$1 = 0xeac8; 20981 invariant(false, '_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn\'t supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).');
23186 REACT_YIELD_TYPE$1 = 0xeac9; 20982 }
20983 });
20984 Object.freeze(fakeInternalInstance);
23187} 20985}
23188 20986
23189var createCoroutine = function (children, handler, props) { 20987var ReactFiberClassComponent = function (scheduleWork, computeExpirationForFiber, memoizeProps, memoizeState) {
23190 var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; 20988 // Class component state updater
23191 20989 var updater = {
23192 var coroutine = { 20990 isMounted: isMounted,
23193 // This tag allow us to uniquely identify this as a React Coroutine 20991 enqueueSetState: function (instance, partialState, callback) {
23194 $$typeof: REACT_COROUTINE_TYPE$1, 20992 var fiber = get(instance);
23195 key: key == null ? null : '' + key, 20993 callback = callback === undefined ? null : callback;
23196 children: children, 20994 {
23197 handler: handler, 20995 warnOnInvalidCallback(callback, 'setState');
23198 props: props 20996 }
20997 var expirationTime = computeExpirationForFiber(fiber);
20998 var update = {
20999 expirationTime: expirationTime,
21000 partialState: partialState,
21001 callback: callback,
21002 isReplace: false,
21003 isForced: false,
21004 nextCallback: null,
21005 next: null
21006 };
21007 insertUpdateIntoFiber(fiber, update);
21008 scheduleWork(fiber, expirationTime);
21009 },
21010 enqueueReplaceState: function (instance, state, callback) {
21011 var fiber = get(instance);
21012 callback = callback === undefined ? null : callback;
21013 {
21014 warnOnInvalidCallback(callback, 'replaceState');
21015 }
21016 var expirationTime = computeExpirationForFiber(fiber);
21017 var update = {
21018 expirationTime: expirationTime,
21019 partialState: state,
21020 callback: callback,
21021 isReplace: true,
21022 isForced: false,
21023 nextCallback: null,
21024 next: null
21025 };
21026 insertUpdateIntoFiber(fiber, update);
21027 scheduleWork(fiber, expirationTime);
21028 },
21029 enqueueForceUpdate: function (instance, callback) {
21030 var fiber = get(instance);
21031 callback = callback === undefined ? null : callback;
21032 {
21033 warnOnInvalidCallback(callback, 'forceUpdate');
21034 }
21035 var expirationTime = computeExpirationForFiber(fiber);
21036 var update = {
21037 expirationTime: expirationTime,
21038 partialState: null,
21039 callback: callback,
21040 isReplace: false,
21041 isForced: true,
21042 nextCallback: null,
21043 next: null
21044 };
21045 insertUpdateIntoFiber(fiber, update);
21046 scheduleWork(fiber, expirationTime);
21047 }
23199 }; 21048 };
23200 21049
23201 { 21050 function checkShouldComponentUpdate(workInProgress, oldProps, newProps, oldState, newState, newContext) {
23202 // TODO: Add _store property for marking this as validated. 21051 if (oldProps === null || workInProgress.updateQueue !== null && workInProgress.updateQueue.hasForceUpdate) {
23203 if (Object.freeze) { 21052 // If the workInProgress already has an Update effect, return true
23204 Object.freeze(coroutine.props); 21053 return true;
23205 Object.freeze(coroutine);
23206 } 21054 }
21055
21056 var instance = workInProgress.stateNode;
21057 var type = workInProgress.type;
21058 if (typeof instance.shouldComponentUpdate === 'function') {
21059 startPhaseTimer(workInProgress, 'shouldComponentUpdate');
21060 var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, newContext);
21061 stopPhaseTimer();
21062
21063 {
21064 warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(workInProgress) || 'Unknown');
21065 }
21066
21067 return shouldUpdate;
21068 }
21069
21070 if (type.prototype && type.prototype.isPureReactComponent) {
21071 return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);
21072 }
21073
21074 return true;
23207 } 21075 }
23208 21076
23209 return coroutine; 21077 function checkClassInstance(workInProgress) {
23210}; 21078 var instance = workInProgress.stateNode;
21079 var type = workInProgress.type;
21080 {
21081 var name = getComponentName(workInProgress);
21082 var renderPresent = instance.render;
23211 21083
23212var createYield = function (value) { 21084 if (!renderPresent) {
23213 var yieldNode = { 21085 if (type.prototype && typeof type.prototype.render === 'function') {
23214 // This tag allow us to uniquely identify this as a React Yield 21086 warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
23215 $$typeof: REACT_YIELD_TYPE$1, 21087 } else {
23216 value: value 21088 warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
23217 }; 21089 }
21090 }
23218 21091
23219 { 21092 var noGetInitialStateOnES6 = !instance.getInitialState || instance.getInitialState.isReactClassApproved || instance.state;
23220 // TODO: Add _store property for marking this as validated. 21093 warning(noGetInitialStateOnES6, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);
23221 if (Object.freeze) { 21094 var noGetDefaultPropsOnES6 = !instance.getDefaultProps || instance.getDefaultProps.isReactClassApproved;
23222 Object.freeze(yieldNode); 21095 warning(noGetDefaultPropsOnES6, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);
21096 var noInstancePropTypes = !instance.propTypes;
21097 warning(noInstancePropTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);
21098 var noInstanceContextTypes = !instance.contextTypes;
21099 warning(noInstanceContextTypes, 'contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);
21100 var noComponentShouldUpdate = typeof instance.componentShouldUpdate !== 'function';
21101 warning(noComponentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);
21102 if (type.prototype && type.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
21103 warning(false, '%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(workInProgress) || 'A pure component');
21104 }
21105 var noComponentDidUnmount = typeof instance.componentDidUnmount !== 'function';
21106 warning(noComponentDidUnmount, '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);
21107 var noComponentDidReceiveProps = typeof instance.componentDidReceiveProps !== 'function';
21108 warning(noComponentDidReceiveProps, '%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);
21109 var noComponentWillRecieveProps = typeof instance.componentWillRecieveProps !== 'function';
21110 warning(noComponentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);
21111 var hasMutatedProps = instance.props !== workInProgress.pendingProps;
21112 warning(instance.props === undefined || !hasMutatedProps, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name);
21113 var noInstanceDefaultProps = !instance.defaultProps;
21114 warning(noInstanceDefaultProps, 'Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);
21115 }
21116
21117 var state = instance.state;
21118 if (state && (typeof state !== 'object' || isArray(state))) {
21119 invariant(false, '%s.state: must be set to an object or null', getComponentName(workInProgress));
21120 }
21121 if (typeof instance.getChildContext === 'function') {
21122 !(typeof workInProgress.type.childContextTypes === 'object') ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', getComponentName(workInProgress)) : void 0;
23223 } 21123 }
23224 } 21124 }
23225 21125
23226 return yieldNode; 21126 function resetInputPointers(workInProgress, instance) {
23227}; 21127 instance.props = workInProgress.memoizedProps;
21128 instance.state = workInProgress.memoizedState;
21129 }
23228 21130
23229/** 21131 function adoptClassInstance(workInProgress, instance) {
23230 * Verifies the object is a coroutine object. 21132 instance.updater = updater;
23231 */ 21133 workInProgress.stateNode = instance;
23232var isCoroutine = function (object) { 21134 // The instance needs access to the fiber so that it can schedule updates
23233 return typeof object === 'object' && object !== null && object.$$typeof === REACT_COROUTINE_TYPE$1; 21135 set(instance, workInProgress);
23234}; 21136 {
21137 instance._reactInternalInstance = fakeInternalInstance;
21138 }
21139 }
23235 21140
23236/** 21141 function constructClassInstance(workInProgress, props) {
23237 * Verifies the object is a yield object. 21142 var ctor = workInProgress.type;
23238 */ 21143 var unmaskedContext = getUnmaskedContext(workInProgress);
23239var isYield = function (object) { 21144 var needsContext = isContextConsumer(workInProgress);
23240 return typeof object === 'object' && object !== null && object.$$typeof === REACT_YIELD_TYPE$1; 21145 var context = needsContext ? getMaskedContext(workInProgress, unmaskedContext) : emptyObject;
23241}; 21146 var instance = new ctor(props, context);
21147 adoptClassInstance(workInProgress, instance);
23242 21148
23243var REACT_YIELD_TYPE_1 = REACT_YIELD_TYPE$1; 21149 // Cache unmasked context so we can avoid recreating masked context unless necessary.
23244var REACT_COROUTINE_TYPE_1 = REACT_COROUTINE_TYPE$1; 21150 // ReactFiberContext usually updates this cache but can't for newly-created instances.
21151 if (needsContext) {
21152 cacheContext(workInProgress, unmaskedContext, context);
21153 }
23245 21154
23246var ReactCoroutine = { 21155 return instance;
23247 createCoroutine: createCoroutine, 21156 }
23248 createYield: createYield,
23249 isCoroutine: isCoroutine,
23250 isYield: isYield,
23251 REACT_YIELD_TYPE: REACT_YIELD_TYPE_1,
23252 REACT_COROUTINE_TYPE: REACT_COROUTINE_TYPE_1
23253};
23254 21157
23255/** 21158 function callComponentWillMount(workInProgress, instance) {
23256 * Copyright (c) 2014-present, Facebook, Inc. 21159 startPhaseTimer(workInProgress, 'componentWillMount');
23257 * 21160 var oldState = instance.state;
23258 * This source code is licensed under the MIT license found in the 21161 instance.componentWillMount();
23259 * LICENSE file in the root directory of this source tree. 21162
23260 * 21163 stopPhaseTimer();
23261 * @providesModule ReactPortal 21164
23262 * 21165 if (oldState !== instance.state) {
23263 */ 21166 {
21167 warning(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress));
21168 }
21169 updater.enqueueReplaceState(instance, instance.state, null);
21170 }
21171 }
21172
21173 function callComponentWillReceiveProps(workInProgress, instance, newProps, newContext) {
21174 startPhaseTimer(workInProgress, 'componentWillReceiveProps');
21175 var oldState = instance.state;
21176 instance.componentWillReceiveProps(newProps, newContext);
21177 stopPhaseTimer();
21178
21179 if (instance.state !== oldState) {
21180 {
21181 var componentName = getComponentName(workInProgress) || 'Component';
21182 if (!didWarnAboutStateAssignmentForComponent[componentName]) {
21183 warning(false, '%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
21184 didWarnAboutStateAssignmentForComponent[componentName] = true;
21185 }
21186 }
21187 updater.enqueueReplaceState(instance, instance.state, null);
21188 }
21189 }
21190
21191 // Invokes the mount life-cycles on a previously never rendered instance.
21192 function mountClassInstance(workInProgress, renderExpirationTime) {
21193 var current = workInProgress.alternate;
21194
21195 {
21196 checkClassInstance(workInProgress);
21197 }
21198
21199 var instance = workInProgress.stateNode;
21200 var state = instance.state || null;
21201
21202 var props = workInProgress.pendingProps;
21203 !props ? invariant(false, 'There must be pending props for an initial mount. This error is likely caused by a bug in React. Please file an issue.') : void 0;
21204
21205 var unmaskedContext = getUnmaskedContext(workInProgress);
21206
21207 instance.props = props;
21208 instance.state = workInProgress.memoizedState = state;
21209 instance.refs = emptyObject;
21210 instance.context = getMaskedContext(workInProgress, unmaskedContext);
21211
21212 if (enableAsyncSubtreeAPI && workInProgress.type != null && workInProgress.type.prototype != null && workInProgress.type.prototype.unstable_isAsyncReactComponent === true) {
21213 workInProgress.internalContextTag |= AsyncUpdates;
21214 }
21215
21216 if (typeof instance.componentWillMount === 'function') {
21217 callComponentWillMount(workInProgress, instance);
21218 // If we had additional state updates during this life-cycle, let's
21219 // process them now.
21220 var updateQueue = workInProgress.updateQueue;
21221 if (updateQueue !== null) {
21222 instance.state = processUpdateQueue(current, workInProgress, updateQueue, instance, props, renderExpirationTime);
21223 }
21224 }
21225 if (typeof instance.componentDidMount === 'function') {
21226 workInProgress.effectTag |= Update;
21227 }
21228 }
21229
21230 // Called on a preexisting class instance. Returns false if a resumed render
21231 // could be reused.
21232 // function resumeMountClassInstance(
21233 // workInProgress: Fiber,
21234 // priorityLevel: PriorityLevel,
21235 // ): boolean {
21236 // const instance = workInProgress.stateNode;
21237 // resetInputPointers(workInProgress, instance);
21238
21239 // let newState = workInProgress.memoizedState;
21240 // let newProps = workInProgress.pendingProps;
21241 // if (!newProps) {
21242 // // If there isn't any new props, then we'll reuse the memoized props.
21243 // // This could be from already completed work.
21244 // newProps = workInProgress.memoizedProps;
21245 // invariant(
21246 // newProps != null,
21247 // 'There should always be pending or memoized props. This error is ' +
21248 // 'likely caused by a bug in React. Please file an issue.',
21249 // );
21250 // }
21251 // const newUnmaskedContext = getUnmaskedContext(workInProgress);
21252 // const newContext = getMaskedContext(workInProgress, newUnmaskedContext);
21253
21254 // const oldContext = instance.context;
21255 // const oldProps = workInProgress.memoizedProps;
21256
21257 // if (
21258 // typeof instance.componentWillReceiveProps === 'function' &&
21259 // (oldProps !== newProps || oldContext !== newContext)
21260 // ) {
21261 // callComponentWillReceiveProps(
21262 // workInProgress,
21263 // instance,
21264 // newProps,
21265 // newContext,
21266 // );
21267 // }
21268
21269 // // Process the update queue before calling shouldComponentUpdate
21270 // const updateQueue = workInProgress.updateQueue;
21271 // if (updateQueue !== null) {
21272 // newState = processUpdateQueue(
21273 // workInProgress,
21274 // updateQueue,
21275 // instance,
21276 // newState,
21277 // newProps,
21278 // priorityLevel,
21279 // );
21280 // }
21281
21282 // // TODO: Should we deal with a setState that happened after the last
21283 // // componentWillMount and before this componentWillMount? Probably
21284 // // unsupported anyway.
21285
21286 // if (
21287 // !checkShouldComponentUpdate(
21288 // workInProgress,
21289 // workInProgress.memoizedProps,
21290 // newProps,
21291 // workInProgress.memoizedState,
21292 // newState,
21293 // newContext,
21294 // )
21295 // ) {
21296 // // Update the existing instance's state, props, and context pointers even
21297 // // though we're bailing out.
21298 // instance.props = newProps;
21299 // instance.state = newState;
21300 // instance.context = newContext;
21301 // return false;
21302 // }
21303
21304 // // Update the input pointers now so that they are correct when we call
21305 // // componentWillMount
21306 // instance.props = newProps;
21307 // instance.state = newState;
21308 // instance.context = newContext;
21309
21310 // if (typeof instance.componentWillMount === 'function') {
21311 // callComponentWillMount(workInProgress, instance);
21312 // // componentWillMount may have called setState. Process the update queue.
21313 // const newUpdateQueue = workInProgress.updateQueue;
21314 // if (newUpdateQueue !== null) {
21315 // newState = processUpdateQueue(
21316 // workInProgress,
21317 // newUpdateQueue,
21318 // instance,
21319 // newState,
21320 // newProps,
21321 // priorityLevel,
21322 // );
21323 // }
21324 // }
21325
21326 // if (typeof instance.componentDidMount === 'function') {
21327 // workInProgress.effectTag |= Update;
21328 // }
21329
21330 // instance.state = newState;
21331
21332 // return true;
21333 // }
21334
21335 // Invokes the update life-cycles and returns false if it shouldn't rerender.
21336 function updateClassInstance(current, workInProgress, renderExpirationTime) {
21337 var instance = workInProgress.stateNode;
21338 resetInputPointers(workInProgress, instance);
21339
21340 var oldProps = workInProgress.memoizedProps;
21341 var newProps = workInProgress.pendingProps;
21342 if (!newProps) {
21343 // If there aren't any new props, then we'll reuse the memoized props.
21344 // This could be from already completed work.
21345 newProps = oldProps;
21346 !(newProps != null) ? invariant(false, 'There should always be pending or memoized props. This error is likely caused by a bug in React. Please file an issue.') : void 0;
21347 }
21348 var oldContext = instance.context;
21349 var newUnmaskedContext = getUnmaskedContext(workInProgress);
21350 var newContext = getMaskedContext(workInProgress, newUnmaskedContext);
21351
21352 // Note: During these life-cycles, instance.props/instance.state are what
21353 // ever the previously attempted to render - not the "current". However,
21354 // during componentDidUpdate we pass the "current" props.
21355
21356 if (typeof instance.componentWillReceiveProps === 'function' && (oldProps !== newProps || oldContext !== newContext)) {
21357 callComponentWillReceiveProps(workInProgress, instance, newProps, newContext);
21358 }
21359
21360 // Compute the next state using the memoized state and the update queue.
21361 var oldState = workInProgress.memoizedState;
21362 // TODO: Previous state can be null.
21363 var newState = void 0;
21364 if (workInProgress.updateQueue !== null) {
21365 newState = processUpdateQueue(current, workInProgress, workInProgress.updateQueue, instance, newProps, renderExpirationTime);
21366 } else {
21367 newState = oldState;
21368 }
21369
21370 if (oldProps === newProps && oldState === newState && !hasContextChanged() && !(workInProgress.updateQueue !== null && workInProgress.updateQueue.hasForceUpdate)) {
21371 // If an update was already in progress, we should schedule an Update
21372 // effect even though we're bailing out, so that cWU/cDU are called.
21373 if (typeof instance.componentDidUpdate === 'function') {
21374 if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
21375 workInProgress.effectTag |= Update;
21376 }
21377 }
21378 return false;
21379 }
21380
21381 var shouldUpdate = checkShouldComponentUpdate(workInProgress, oldProps, newProps, oldState, newState, newContext);
21382
21383 if (shouldUpdate) {
21384 if (typeof instance.componentWillUpdate === 'function') {
21385 startPhaseTimer(workInProgress, 'componentWillUpdate');
21386 instance.componentWillUpdate(newProps, newState, newContext);
21387 stopPhaseTimer();
21388 }
21389 if (typeof instance.componentDidUpdate === 'function') {
21390 workInProgress.effectTag |= Update;
21391 }
21392 } else {
21393 // If an update was already in progress, we should schedule an Update
21394 // effect even though we're bailing out, so that cWU/cDU are called.
21395 if (typeof instance.componentDidUpdate === 'function') {
21396 if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
21397 workInProgress.effectTag |= Update;
21398 }
21399 }
21400
21401 // If shouldComponentUpdate returned false, we should still update the
21402 // memoized props/state to indicate that this work can be reused.
21403 memoizeProps(workInProgress, newProps);
21404 memoizeState(workInProgress, newState);
21405 }
21406
21407 // Update the existing instance's state, props, and context pointers even
21408 // if shouldComponentUpdate returns false.
21409 instance.props = newProps;
21410 instance.state = newState;
21411 instance.context = newContext;
21412
21413 return shouldUpdate;
21414 }
21415
21416 return {
21417 adoptClassInstance: adoptClassInstance,
21418 constructClassInstance: constructClassInstance,
21419 mountClassInstance: mountClassInstance,
21420 // resumeMountClassInstance,
21421 updateClassInstance: updateClassInstance
21422 };
21423};
23264 21424
23265// The Symbol used to tag the special React types. If there is no native Symbol 21425// The Symbol used to tag the special React types. If there is no native Symbol
23266// nor polyfill, then a plain number is used for performance. 21426// nor polyfill, then a plain number is used for performance.
23267var REACT_PORTAL_TYPE$1 = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.portal') || 0xeaca; 21427var REACT_PORTAL_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.portal') || 0xeaca;
23268 21428
23269var createPortal$1 = function (children, containerInfo, 21429function createPortal$1(children, containerInfo,
23270// TODO: figure out the API for cross-renderer implementation. 21430// TODO: figure out the API for cross-renderer implementation.
23271implementation) { 21431implementation) {
23272 var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; 21432 var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
23273 21433
23274 return { 21434 return {
23275 // This tag allow us to uniquely identify this as a React Portal 21435 // This tag allow us to uniquely identify this as a React Portal
23276 $$typeof: REACT_PORTAL_TYPE$1, 21436 $$typeof: REACT_PORTAL_TYPE,
23277 key: key == null ? null : '' + key, 21437 key: key == null ? null : '' + key,
23278 children: children, 21438 children: children,
23279 containerInfo: containerInfo, 21439 containerInfo: containerInfo,
23280 implementation: implementation 21440 implementation: implementation
23281 }; 21441 };
23282}; 21442}
23283
23284/**
23285 * Verifies the object is a portal object.
23286 */
23287var isPortal = function (object) {
23288 return typeof object === 'object' && object !== null && object.$$typeof === REACT_PORTAL_TYPE$1;
23289};
23290
23291var REACT_PORTAL_TYPE_1 = REACT_PORTAL_TYPE$1;
23292
23293var ReactPortal = {
23294 createPortal: createPortal$1,
23295 isPortal: isPortal,
23296 REACT_PORTAL_TYPE: REACT_PORTAL_TYPE_1
23297};
23298
23299var REACT_COROUTINE_TYPE = ReactCoroutine.REACT_COROUTINE_TYPE;
23300var REACT_YIELD_TYPE = ReactCoroutine.REACT_YIELD_TYPE;
23301
23302var REACT_PORTAL_TYPE = ReactPortal.REACT_PORTAL_TYPE;
23303
23304
23305
23306
23307
23308 21443
21444var getCurrentFiberStackAddendum$1 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
23309 21445
23310 21446
23311{ 21447{
23312 var _require3$4 = ReactDebugCurrentFiber_1,
23313 getCurrentFiberStackAddendum$5 = _require3$4.getCurrentFiberStackAddendum;
23314
23315 var warning$24 = require$$0;
23316 var didWarnAboutMaps = false; 21448 var didWarnAboutMaps = false;
23317 /** 21449 /**
23318 * Warn if there's no key explicitly set on dynamic arrays of children or 21450 * Warn if there's no key explicitly set on dynamic arrays of children or
@@ -23320,6 +21452,7 @@ var REACT_PORTAL_TYPE = ReactPortal.REACT_PORTAL_TYPE;
23320 * updates. 21452 * updates.
23321 */ 21453 */
23322 var ownerHasKeyUseWarning = {}; 21454 var ownerHasKeyUseWarning = {};
21455 var ownerHasFunctionTypeWarning = {};
23323 21456
23324 var warnForMissingKey = function (child) { 21457 var warnForMissingKey = function (child) {
23325 if (child === null || typeof child !== 'object') { 21458 if (child === null || typeof child !== 'object') {
@@ -23331,44 +21464,38 @@ var REACT_PORTAL_TYPE = ReactPortal.REACT_PORTAL_TYPE;
23331 !(typeof child._store === 'object') ? invariant(false, 'React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.') : void 0; 21464 !(typeof child._store === 'object') ? invariant(false, 'React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.') : void 0;
23332 child._store.validated = true; 21465 child._store.validated = true;
23333 21466
23334 var currentComponentErrorInfo = 'Each child in an array or iterator should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.' + (getCurrentFiberStackAddendum$5() || ''); 21467 var currentComponentErrorInfo = 'Each child in an array or iterator should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.' + (getCurrentFiberStackAddendum$1() || '');
23335 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { 21468 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
23336 return; 21469 return;
23337 } 21470 }
23338 ownerHasKeyUseWarning[currentComponentErrorInfo] = true; 21471 ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
23339 21472
23340 warning$24(false, 'Each child in an array or iterator should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.%s', getCurrentFiberStackAddendum$5()); 21473 warning(false, 'Each child in an array or iterator should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.%s', getCurrentFiberStackAddendum$1());
23341 }; 21474 };
23342} 21475}
23343 21476
23344var createWorkInProgress$2 = ReactFiber.createWorkInProgress; 21477var isArray$1 = Array.isArray;
23345var createFiberFromElement$1 = ReactFiber.createFiberFromElement;
23346var createFiberFromFragment$1 = ReactFiber.createFiberFromFragment;
23347var createFiberFromText$1 = ReactFiber.createFiberFromText;
23348var createFiberFromCoroutine$1 = ReactFiber.createFiberFromCoroutine;
23349var createFiberFromYield$1 = ReactFiber.createFiberFromYield;
23350var createFiberFromPortal$1 = ReactFiber.createFiberFromPortal;
23351
23352
23353var isArray = Array.isArray;
23354
23355var FunctionalComponent$2 = ReactTypeOfWork.FunctionalComponent;
23356var ClassComponent$7 = ReactTypeOfWork.ClassComponent;
23357var HostText$5 = ReactTypeOfWork.HostText;
23358var HostPortal$5 = ReactTypeOfWork.HostPortal;
23359var CoroutineComponent$2 = ReactTypeOfWork.CoroutineComponent;
23360var YieldComponent$3 = ReactTypeOfWork.YieldComponent;
23361var Fragment$3 = ReactTypeOfWork.Fragment;
23362var NoEffect$2 = ReactTypeOfSideEffect.NoEffect;
23363var Placement$3 = ReactTypeOfSideEffect.Placement;
23364var Deletion$1 = ReactTypeOfSideEffect.Deletion;
23365
23366 21478
23367var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; 21479var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
23368var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. 21480var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
23369// The Symbol used to tag the ReactElement type. If there is no native Symbol 21481
21482// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
23370// nor polyfill, then a plain number is used for performance. 21483// nor polyfill, then a plain number is used for performance.
23371var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; 21484var REACT_ELEMENT_TYPE;
21485var REACT_CALL_TYPE;
21486var REACT_RETURN_TYPE;
21487var REACT_FRAGMENT_TYPE;
21488if (typeof Symbol === 'function' && Symbol['for']) {
21489 REACT_ELEMENT_TYPE = Symbol['for']('react.element');
21490 REACT_CALL_TYPE = Symbol['for']('react.call');
21491 REACT_RETURN_TYPE = Symbol['for']('react.return');
21492 REACT_FRAGMENT_TYPE = Symbol['for']('react.fragment');
21493} else {
21494 REACT_ELEMENT_TYPE = 0xeac7;
21495 REACT_CALL_TYPE = 0xeac8;
21496 REACT_RETURN_TYPE = 0xeac9;
21497 REACT_FRAGMENT_TYPE = 0xeacb;
21498}
23372 21499
23373function getIteratorFn(maybeIterable) { 21500function getIteratorFn(maybeIterable) {
23374 if (maybeIterable === null || typeof maybeIterable === 'undefined') { 21501 if (maybeIterable === null || typeof maybeIterable === 'undefined') {
@@ -23388,14 +21515,9 @@ function coerceRef(current, element) {
23388 var owner = element._owner; 21515 var owner = element._owner;
23389 var inst = void 0; 21516 var inst = void 0;
23390 if (owner) { 21517 if (owner) {
23391 if (typeof owner.tag === 'number') { 21518 var ownerFiber = owner;
23392 var ownerFiber = owner; 21519 !(ownerFiber.tag === ClassComponent) ? invariant(false, 'Stateless function components cannot have refs.') : void 0;
23393 !(ownerFiber.tag === ClassComponent$7) ? invariant(false, 'Stateless function components cannot have refs.') : void 0; 21520 inst = ownerFiber.stateNode;
23394 inst = ownerFiber.stateNode;
23395 } else {
23396 // Stack
23397 inst = owner.getPublicInstance();
23398 }
23399 } 21521 }
23400 !inst ? invariant(false, 'Missing owner for string ref %s. This error is likely caused by a bug in React. Please file an issue.', mixedRef) : void 0; 21522 !inst ? invariant(false, 'Missing owner for string ref %s. This error is likely caused by a bug in React. Please file an issue.', mixedRef) : void 0;
23401 var stringRef = '' + mixedRef; 21523 var stringRef = '' + mixedRef;
@@ -23425,14 +21547,21 @@ function throwOnInvalidObjectType(returnFiber, newChild) {
23425 if (returnFiber.type !== 'textarea') { 21547 if (returnFiber.type !== 'textarea') {
23426 var addendum = ''; 21548 var addendum = '';
23427 { 21549 {
23428 addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + (getCurrentFiberStackAddendum$5() || ''); 21550 addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + (getCurrentFiberStackAddendum$1() || '');
23429 } 21551 }
23430 invariant(false, 'Objects are not valid as a React child (found: %s).%s', Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild, addendum); 21552 invariant(false, 'Objects are not valid as a React child (found: %s).%s', Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild, addendum);
23431 } 21553 }
23432} 21554}
23433 21555
23434function warnOnFunctionType() { 21556function warnOnFunctionType() {
23435 warning$24(false, 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.%s', getCurrentFiberStackAddendum$5() || ''); 21557 var currentComponentErrorInfo = 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.' + (getCurrentFiberStackAddendum$1() || '');
21558
21559 if (ownerHasFunctionTypeWarning[currentComponentErrorInfo]) {
21560 return;
21561 }
21562 ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true;
21563
21564 warning(false, 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.%s', getCurrentFiberStackAddendum$1() || '');
23436} 21565}
23437 21566
23438// This wrapper function exists because I expect to clone the code in each path 21567// This wrapper function exists because I expect to clone the code in each path
@@ -23467,7 +21596,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
23467 returnFiber.firstEffect = returnFiber.lastEffect = childToDelete; 21596 returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
23468 } 21597 }
23469 childToDelete.nextEffect = null; 21598 childToDelete.nextEffect = null;
23470 childToDelete.effectTag = Deletion$1; 21599 childToDelete.effectTag = Deletion;
23471 } 21600 }
23472 21601
23473 function deleteRemainingChildren(returnFiber, currentFirstChild) { 21602 function deleteRemainingChildren(returnFiber, currentFirstChild) {
@@ -23503,22 +21632,23 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
23503 return existingChildren; 21632 return existingChildren;
23504 } 21633 }
23505 21634
23506 function useFiber(fiber, priority) { 21635 function useFiber(fiber, pendingProps, expirationTime) {
23507 // We currently set sibling to null and index to 0 here because it is easy 21636 // We currently set sibling to null and index to 0 here because it is easy
23508 // to forget to do before returning it. E.g. for the single child case. 21637 // to forget to do before returning it. E.g. for the single child case.
23509 if (shouldClone) { 21638 if (shouldClone) {
23510 var clone = createWorkInProgress$2(fiber, priority); 21639 var clone = createWorkInProgress(fiber, pendingProps, expirationTime);
23511 clone.index = 0; 21640 clone.index = 0;
23512 clone.sibling = null; 21641 clone.sibling = null;
23513 return clone; 21642 return clone;
23514 } else { 21643 } else {
23515 // We override the pending priority even if it is higher, because if 21644 // We override the expiration time even if it is earlier, because if
23516 // we're reconciling at a lower priority that means that this was 21645 // we're reconciling at a later time that means that this was
23517 // down-prioritized. 21646 // down-prioritized.
23518 fiber.pendingWorkPriority = priority; 21647 fiber.expirationTime = expirationTime;
23519 fiber.effectTag = NoEffect$2; 21648 fiber.effectTag = NoEffect;
23520 fiber.index = 0; 21649 fiber.index = 0;
23521 fiber.sibling = null; 21650 fiber.sibling = null;
21651 fiber.pendingProps = pendingProps;
23522 return fiber; 21652 return fiber;
23523 } 21653 }
23524 } 21654 }
@@ -23534,7 +21664,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
23534 var oldIndex = current.index; 21664 var oldIndex = current.index;
23535 if (oldIndex < lastPlacedIndex) { 21665 if (oldIndex < lastPlacedIndex) {
23536 // This is a move. 21666 // This is a move.
23537 newFiber.effectTag = Placement$3; 21667 newFiber.effectTag = Placement;
23538 return lastPlacedIndex; 21668 return lastPlacedIndex;
23539 } else { 21669 } else {
23540 // This item can stay in place. 21670 // This item can stay in place.
@@ -23542,7 +21672,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
23542 } 21672 }
23543 } else { 21673 } else {
23544 // This is an insertion. 21674 // This is an insertion.
23545 newFiber.effectTag = Placement$3; 21675 newFiber.effectTag = Placement;
23546 return lastPlacedIndex; 21676 return lastPlacedIndex;
23547 } 21677 }
23548 } 21678 }
@@ -23551,115 +21681,110 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
23551 // This is simpler for the single child case. We only need to do a 21681 // This is simpler for the single child case. We only need to do a
23552 // placement for inserting new children. 21682 // placement for inserting new children.
23553 if (shouldTrackSideEffects && newFiber.alternate === null) { 21683 if (shouldTrackSideEffects && newFiber.alternate === null) {
23554 newFiber.effectTag = Placement$3; 21684 newFiber.effectTag = Placement;
23555 } 21685 }
23556 return newFiber; 21686 return newFiber;
23557 } 21687 }
23558 21688
23559 function updateTextNode(returnFiber, current, textContent, priority) { 21689 function updateTextNode(returnFiber, current, textContent, expirationTime) {
23560 if (current === null || current.tag !== HostText$5) { 21690 if (current === null || current.tag !== HostText) {
23561 // Insert 21691 // Insert
23562 var created = createFiberFromText$1(textContent, returnFiber.internalContextTag, priority); 21692 var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);
23563 created['return'] = returnFiber; 21693 created['return'] = returnFiber;
23564 return created; 21694 return created;
23565 } else { 21695 } else {
23566 // Update 21696 // Update
23567 var existing = useFiber(current, priority); 21697 var existing = useFiber(current, textContent, expirationTime);
23568 existing.pendingProps = textContent;
23569 existing['return'] = returnFiber; 21698 existing['return'] = returnFiber;
23570 return existing; 21699 return existing;
23571 } 21700 }
23572 } 21701 }
23573 21702
23574 function updateElement(returnFiber, current, element, priority) { 21703 function updateElement(returnFiber, current, element, expirationTime) {
23575 if (current === null || current.type !== element.type) { 21704 if (current !== null && current.type === element.type) {
23576 // Insert
23577 var created = createFiberFromElement$1(element, returnFiber.internalContextTag, priority);
23578 created.ref = coerceRef(current, element);
23579 created['return'] = returnFiber;
23580 return created;
23581 } else {
23582 // Move based on index 21705 // Move based on index
23583 var existing = useFiber(current, priority); 21706 var existing = useFiber(current, element.props, expirationTime);
23584 existing.ref = coerceRef(current, element); 21707 existing.ref = coerceRef(current, element);
23585 existing.pendingProps = element.props;
23586 existing['return'] = returnFiber; 21708 existing['return'] = returnFiber;
23587 { 21709 {
23588 existing._debugSource = element._source; 21710 existing._debugSource = element._source;
23589 existing._debugOwner = element._owner; 21711 existing._debugOwner = element._owner;
23590 } 21712 }
23591 return existing; 21713 return existing;
21714 } else {
21715 // Insert
21716 var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);
21717 created.ref = coerceRef(current, element);
21718 created['return'] = returnFiber;
21719 return created;
23592 } 21720 }
23593 } 21721 }
23594 21722
23595 function updateCoroutine(returnFiber, current, coroutine, priority) { 21723 function updateCall(returnFiber, current, call, expirationTime) {
23596 // TODO: Should this also compare handler to determine whether to reuse? 21724 // TODO: Should this also compare handler to determine whether to reuse?
23597 if (current === null || current.tag !== CoroutineComponent$2) { 21725 if (current === null || current.tag !== CallComponent) {
23598 // Insert 21726 // Insert
23599 var created = createFiberFromCoroutine$1(coroutine, returnFiber.internalContextTag, priority); 21727 var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);
23600 created['return'] = returnFiber; 21728 created['return'] = returnFiber;
23601 return created; 21729 return created;
23602 } else { 21730 } else {
23603 // Move based on index 21731 // Move based on index
23604 var existing = useFiber(current, priority); 21732 var existing = useFiber(current, call, expirationTime);
23605 existing.pendingProps = coroutine;
23606 existing['return'] = returnFiber; 21733 existing['return'] = returnFiber;
23607 return existing; 21734 return existing;
23608 } 21735 }
23609 } 21736 }
23610 21737
23611 function updateYield(returnFiber, current, yieldNode, priority) { 21738 function updateReturn(returnFiber, current, returnNode, expirationTime) {
23612 if (current === null || current.tag !== YieldComponent$3) { 21739 if (current === null || current.tag !== ReturnComponent) {
23613 // Insert 21740 // Insert
23614 var created = createFiberFromYield$1(yieldNode, returnFiber.internalContextTag, priority); 21741 var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);
23615 created.type = yieldNode.value; 21742 created.type = returnNode.value;
23616 created['return'] = returnFiber; 21743 created['return'] = returnFiber;
23617 return created; 21744 return created;
23618 } else { 21745 } else {
23619 // Move based on index 21746 // Move based on index
23620 var existing = useFiber(current, priority); 21747 var existing = useFiber(current, null, expirationTime);
23621 existing.type = yieldNode.value; 21748 existing.type = returnNode.value;
23622 existing['return'] = returnFiber; 21749 existing['return'] = returnFiber;
23623 return existing; 21750 return existing;
23624 } 21751 }
23625 } 21752 }
23626 21753
23627 function updatePortal(returnFiber, current, portal, priority) { 21754 function updatePortal(returnFiber, current, portal, expirationTime) {
23628 if (current === null || current.tag !== HostPortal$5 || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) { 21755 if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
23629 // Insert 21756 // Insert
23630 var created = createFiberFromPortal$1(portal, returnFiber.internalContextTag, priority); 21757 var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);
23631 created['return'] = returnFiber; 21758 created['return'] = returnFiber;
23632 return created; 21759 return created;
23633 } else { 21760 } else {
23634 // Update 21761 // Update
23635 var existing = useFiber(current, priority); 21762 var existing = useFiber(current, portal.children || [], expirationTime);
23636 existing.pendingProps = portal.children || [];
23637 existing['return'] = returnFiber; 21763 existing['return'] = returnFiber;
23638 return existing; 21764 return existing;
23639 } 21765 }
23640 } 21766 }
23641 21767
23642 function updateFragment(returnFiber, current, fragment, priority) { 21768 function updateFragment(returnFiber, current, fragment, expirationTime, key) {
23643 if (current === null || current.tag !== Fragment$3) { 21769 if (current === null || current.tag !== Fragment) {
23644 // Insert 21770 // Insert
23645 var created = createFiberFromFragment$1(fragment, returnFiber.internalContextTag, priority); 21771 var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);
23646 created['return'] = returnFiber; 21772 created['return'] = returnFiber;
23647 return created; 21773 return created;
23648 } else { 21774 } else {
23649 // Update 21775 // Update
23650 var existing = useFiber(current, priority); 21776 var existing = useFiber(current, fragment, expirationTime);
23651 existing.pendingProps = fragment;
23652 existing['return'] = returnFiber; 21777 existing['return'] = returnFiber;
23653 return existing; 21778 return existing;
23654 } 21779 }
23655 } 21780 }
23656 21781
23657 function createChild(returnFiber, newChild, priority) { 21782 function createChild(returnFiber, newChild, expirationTime) {
23658 if (typeof newChild === 'string' || typeof newChild === 'number') { 21783 if (typeof newChild === 'string' || typeof newChild === 'number') {
23659 // Text nodes doesn't have keys. If the previous node is implicitly keyed 21784 // Text nodes don't have keys. If the previous node is implicitly keyed
23660 // we can continue to replace it without aborting even if it is not a text 21785 // we can continue to replace it without aborting even if it is not a text
23661 // node. 21786 // node.
23662 var created = createFiberFromText$1('' + newChild, returnFiber.internalContextTag, priority); 21787 var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);
23663 created['return'] = returnFiber; 21788 created['return'] = returnFiber;
23664 return created; 21789 return created;
23665 } 21790 }
@@ -23668,39 +21793,45 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
23668 switch (newChild.$$typeof) { 21793 switch (newChild.$$typeof) {
23669 case REACT_ELEMENT_TYPE: 21794 case REACT_ELEMENT_TYPE:
23670 { 21795 {
23671 var _created = createFiberFromElement$1(newChild, returnFiber.internalContextTag, priority); 21796 if (newChild.type === REACT_FRAGMENT_TYPE) {
23672 _created.ref = coerceRef(null, newChild); 21797 var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);
23673 _created['return'] = returnFiber; 21798 _created['return'] = returnFiber;
23674 return _created; 21799 return _created;
23675 } 21800 } else {
23676 21801 var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);
23677 case REACT_COROUTINE_TYPE: 21802 _created2.ref = coerceRef(null, newChild);
23678 { 21803 _created2['return'] = returnFiber;
23679 var _created2 = createFiberFromCoroutine$1(newChild, returnFiber.internalContextTag, priority); 21804 return _created2;
23680 _created2['return'] = returnFiber; 21805 }
23681 return _created2;
23682 } 21806 }
23683 21807
23684 case REACT_YIELD_TYPE: 21808 case REACT_CALL_TYPE:
23685 { 21809 {
23686 var _created3 = createFiberFromYield$1(newChild, returnFiber.internalContextTag, priority); 21810 var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);
23687 _created3.type = newChild.value;
23688 _created3['return'] = returnFiber; 21811 _created3['return'] = returnFiber;
23689 return _created3; 21812 return _created3;
23690 } 21813 }
23691 21814
23692 case REACT_PORTAL_TYPE: 21815 case REACT_RETURN_TYPE:
23693 { 21816 {
23694 var _created4 = createFiberFromPortal$1(newChild, returnFiber.internalContextTag, priority); 21817 var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);
21818 _created4.type = newChild.value;
23695 _created4['return'] = returnFiber; 21819 _created4['return'] = returnFiber;
23696 return _created4; 21820 return _created4;
23697 } 21821 }
21822
21823 case REACT_PORTAL_TYPE:
21824 {
21825 var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);
21826 _created5['return'] = returnFiber;
21827 return _created5;
21828 }
23698 } 21829 }
23699 21830
23700 if (isArray(newChild) || getIteratorFn(newChild)) { 21831 if (isArray$1(newChild) || getIteratorFn(newChild)) {
23701 var _created5 = createFiberFromFragment$1(newChild, returnFiber.internalContextTag, priority); 21832 var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);
23702 _created5['return'] = returnFiber; 21833 _created6['return'] = returnFiber;
23703 return _created5; 21834 return _created6;
23704 } 21835 }
23705 21836
23706 throwOnInvalidObjectType(returnFiber, newChild); 21837 throwOnInvalidObjectType(returnFiber, newChild);
@@ -23715,19 +21846,19 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
23715 return null; 21846 return null;
23716 } 21847 }
23717 21848
23718 function updateSlot(returnFiber, oldFiber, newChild, priority) { 21849 function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {
23719 // Update the fiber if the keys match, otherwise return null. 21850 // Update the fiber if the keys match, otherwise return null.
23720 21851
23721 var key = oldFiber !== null ? oldFiber.key : null; 21852 var key = oldFiber !== null ? oldFiber.key : null;
23722 21853
23723 if (typeof newChild === 'string' || typeof newChild === 'number') { 21854 if (typeof newChild === 'string' || typeof newChild === 'number') {
23724 // Text nodes doesn't have keys. If the previous node is implicitly keyed 21855 // Text nodes don't have keys. If the previous node is implicitly keyed
23725 // we can continue to replace it without aborting even if it is not a text 21856 // we can continue to replace it without aborting even if it is not a text
23726 // node. 21857 // node.
23727 if (key !== null) { 21858 if (key !== null) {
23728 return null; 21859 return null;
23729 } 21860 }
23730 return updateTextNode(returnFiber, oldFiber, '' + newChild, priority); 21861 return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);
23731 } 21862 }
23732 21863
23733 if (typeof newChild === 'object' && newChild !== null) { 21864 if (typeof newChild === 'object' && newChild !== null) {
@@ -23735,28 +21866,31 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
23735 case REACT_ELEMENT_TYPE: 21866 case REACT_ELEMENT_TYPE:
23736 { 21867 {
23737 if (newChild.key === key) { 21868 if (newChild.key === key) {
23738 return updateElement(returnFiber, oldFiber, newChild, priority); 21869 if (newChild.type === REACT_FRAGMENT_TYPE) {
21870 return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);
21871 }
21872 return updateElement(returnFiber, oldFiber, newChild, expirationTime);
23739 } else { 21873 } else {
23740 return null; 21874 return null;
23741 } 21875 }
23742 } 21876 }
23743 21877
23744 case REACT_COROUTINE_TYPE: 21878 case REACT_CALL_TYPE:
23745 { 21879 {
23746 if (newChild.key === key) { 21880 if (newChild.key === key) {
23747 return updateCoroutine(returnFiber, oldFiber, newChild, priority); 21881 return updateCall(returnFiber, oldFiber, newChild, expirationTime);
23748 } else { 21882 } else {
23749 return null; 21883 return null;
23750 } 21884 }
23751 } 21885 }
23752 21886
23753 case REACT_YIELD_TYPE: 21887 case REACT_RETURN_TYPE:
23754 { 21888 {
23755 // Yields doesn't have keys. If the previous node is implicitly keyed 21889 // Returns don't have keys. If the previous node is implicitly keyed
23756 // we can continue to replace it without aborting even if it is not a 21890 // we can continue to replace it without aborting even if it is not a
23757 // yield. 21891 // yield.
23758 if (key === null) { 21892 if (key === null) {
23759 return updateYield(returnFiber, oldFiber, newChild, priority); 21893 return updateReturn(returnFiber, oldFiber, newChild, expirationTime);
23760 } else { 21894 } else {
23761 return null; 21895 return null;
23762 } 21896 }
@@ -23765,20 +21899,19 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
23765 case REACT_PORTAL_TYPE: 21899 case REACT_PORTAL_TYPE:
23766 { 21900 {
23767 if (newChild.key === key) { 21901 if (newChild.key === key) {
23768 return updatePortal(returnFiber, oldFiber, newChild, priority); 21902 return updatePortal(returnFiber, oldFiber, newChild, expirationTime);
23769 } else { 21903 } else {
23770 return null; 21904 return null;
23771 } 21905 }
23772 } 21906 }
23773 } 21907 }
23774 21908
23775 if (isArray(newChild) || getIteratorFn(newChild)) { 21909 if (isArray$1(newChild) || getIteratorFn(newChild)) {
23776 // Fragments doesn't have keys so if the previous key is implicit we can
23777 // update it.
23778 if (key !== null) { 21910 if (key !== null) {
23779 return null; 21911 return null;
23780 } 21912 }
23781 return updateFragment(returnFiber, oldFiber, newChild, priority); 21913
21914 return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);
23782 } 21915 }
23783 21916
23784 throwOnInvalidObjectType(returnFiber, newChild); 21917 throwOnInvalidObjectType(returnFiber, newChild);
@@ -23793,12 +21926,12 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
23793 return null; 21926 return null;
23794 } 21927 }
23795 21928
23796 function updateFromMap(existingChildren, returnFiber, newIdx, newChild, priority) { 21929 function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {
23797 if (typeof newChild === 'string' || typeof newChild === 'number') { 21930 if (typeof newChild === 'string' || typeof newChild === 'number') {
23798 // Text nodes doesn't have keys, so we neither have to check the old nor 21931 // Text nodes don't have keys, so we neither have to check the old nor
23799 // new node for the key. If both are text nodes, they match. 21932 // new node for the key. If both are text nodes, they match.
23800 var matchedFiber = existingChildren.get(newIdx) || null; 21933 var matchedFiber = existingChildren.get(newIdx) || null;
23801 return updateTextNode(returnFiber, matchedFiber, '' + newChild, priority); 21934 return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);
23802 } 21935 }
23803 21936
23804 if (typeof newChild === 'object' && newChild !== null) { 21937 if (typeof newChild === 'object' && newChild !== null) {
@@ -23806,33 +21939,36 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
23806 case REACT_ELEMENT_TYPE: 21939 case REACT_ELEMENT_TYPE:
23807 { 21940 {
23808 var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null; 21941 var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
23809 return updateElement(returnFiber, _matchedFiber, newChild, priority); 21942 if (newChild.type === REACT_FRAGMENT_TYPE) {
21943 return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);
21944 }
21945 return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);
23810 } 21946 }
23811 21947
23812 case REACT_COROUTINE_TYPE: 21948 case REACT_CALL_TYPE:
23813 { 21949 {
23814 var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null; 21950 var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
23815 return updateCoroutine(returnFiber, _matchedFiber2, newChild, priority); 21951 return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);
23816 } 21952 }
23817 21953
23818 case REACT_YIELD_TYPE: 21954 case REACT_RETURN_TYPE:
23819 { 21955 {
23820 // Yields doesn't have keys, so we neither have to check the old nor 21956 // Returns don't have keys, so we neither have to check the old nor
23821 // new node for the key. If both are yields, they match. 21957 // new node for the key. If both are returns, they match.
23822 var _matchedFiber3 = existingChildren.get(newIdx) || null; 21958 var _matchedFiber3 = existingChildren.get(newIdx) || null;
23823 return updateYield(returnFiber, _matchedFiber3, newChild, priority); 21959 return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);
23824 } 21960 }
23825 21961
23826 case REACT_PORTAL_TYPE: 21962 case REACT_PORTAL_TYPE:
23827 { 21963 {
23828 var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null; 21964 var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
23829 return updatePortal(returnFiber, _matchedFiber4, newChild, priority); 21965 return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);
23830 } 21966 }
23831 } 21967 }
23832 21968
23833 if (isArray(newChild) || getIteratorFn(newChild)) { 21969 if (isArray$1(newChild) || getIteratorFn(newChild)) {
23834 var _matchedFiber5 = existingChildren.get(newIdx) || null; 21970 var _matchedFiber5 = existingChildren.get(newIdx) || null;
23835 return updateFragment(returnFiber, _matchedFiber5, newChild, priority); 21971 return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);
23836 } 21972 }
23837 21973
23838 throwOnInvalidObjectType(returnFiber, newChild); 21974 throwOnInvalidObjectType(returnFiber, newChild);
@@ -23857,7 +21993,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
23857 } 21993 }
23858 switch (child.$$typeof) { 21994 switch (child.$$typeof) {
23859 case REACT_ELEMENT_TYPE: 21995 case REACT_ELEMENT_TYPE:
23860 case REACT_COROUTINE_TYPE: 21996 case REACT_CALL_TYPE:
23861 case REACT_PORTAL_TYPE: 21997 case REACT_PORTAL_TYPE:
23862 warnForMissingKey(child); 21998 warnForMissingKey(child);
23863 var key = child.key; 21999 var key = child.key;
@@ -23873,7 +22009,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
23873 knownKeys.add(key); 22009 knownKeys.add(key);
23874 break; 22010 break;
23875 } 22011 }
23876 warning$24(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$5()); 22012 warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());
23877 break; 22013 break;
23878 default: 22014 default:
23879 break; 22015 break;
@@ -23882,7 +22018,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
23882 return knownKeys; 22018 return knownKeys;
23883 } 22019 }
23884 22020
23885 function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, priority) { 22021 function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {
23886 // This algorithm can't optimize by searching from boths ends since we 22022 // This algorithm can't optimize by searching from boths ends since we
23887 // don't have backpointers on fibers. I'm trying to see how far we can get 22023 // don't have backpointers on fibers. I'm trying to see how far we can get
23888 // with that model. If it ends up not being worth the tradeoffs, we can 22024 // with that model. If it ends up not being worth the tradeoffs, we can
@@ -23925,7 +22061,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
23925 } else { 22061 } else {
23926 nextOldFiber = oldFiber.sibling; 22062 nextOldFiber = oldFiber.sibling;
23927 } 22063 }
23928 var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], priority); 22064 var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);
23929 if (newFiber === null) { 22065 if (newFiber === null) {
23930 // TODO: This breaks on empty slots like null children. That's 22066 // TODO: This breaks on empty slots like null children. That's
23931 // unfortunate because it triggers the slow path all the time. We need 22067 // unfortunate because it triggers the slow path all the time. We need
@@ -23968,7 +22104,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
23968 // If we don't have any more existing children we can choose a fast path 22104 // If we don't have any more existing children we can choose a fast path
23969 // since the rest will all be insertions. 22105 // since the rest will all be insertions.
23970 for (; newIdx < newChildren.length; newIdx++) { 22106 for (; newIdx < newChildren.length; newIdx++) {
23971 var _newFiber = createChild(returnFiber, newChildren[newIdx], priority); 22107 var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);
23972 if (!_newFiber) { 22108 if (!_newFiber) {
23973 continue; 22109 continue;
23974 } 22110 }
@@ -23989,7 +22125,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
23989 22125
23990 // Keep scanning and use the map to restore deleted items as moves. 22126 // Keep scanning and use the map to restore deleted items as moves.
23991 for (; newIdx < newChildren.length; newIdx++) { 22127 for (; newIdx < newChildren.length; newIdx++) {
23992 var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], priority); 22128 var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);
23993 if (_newFiber2) { 22129 if (_newFiber2) {
23994 if (shouldTrackSideEffects) { 22130 if (shouldTrackSideEffects) {
23995 if (_newFiber2.alternate !== null) { 22131 if (_newFiber2.alternate !== null) {
@@ -24021,7 +22157,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
24021 return resultingFirstChild; 22157 return resultingFirstChild;
24022 } 22158 }
24023 22159
24024 function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, priority) { 22160 function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {
24025 // This is the same implementation as reconcileChildrenArray(), 22161 // This is the same implementation as reconcileChildrenArray(),
24026 // but using the iterator instead. 22162 // but using the iterator instead.
24027 22163
@@ -24033,7 +22169,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
24033 if (typeof newChildrenIterable.entries === 'function') { 22169 if (typeof newChildrenIterable.entries === 'function') {
24034 var possibleMap = newChildrenIterable; 22170 var possibleMap = newChildrenIterable;
24035 if (possibleMap.entries === iteratorFn) { 22171 if (possibleMap.entries === iteratorFn) {
24036 warning$24(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$5()); 22172 warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());
24037 didWarnAboutMaps = true; 22173 didWarnAboutMaps = true;
24038 } 22174 }
24039 } 22175 }
@@ -24070,7 +22206,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
24070 } else { 22206 } else {
24071 nextOldFiber = oldFiber.sibling; 22207 nextOldFiber = oldFiber.sibling;
24072 } 22208 }
24073 var newFiber = updateSlot(returnFiber, oldFiber, step.value, priority); 22209 var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);
24074 if (newFiber === null) { 22210 if (newFiber === null) {
24075 // TODO: This breaks on empty slots like null children. That's 22211 // TODO: This breaks on empty slots like null children. That's
24076 // unfortunate because it triggers the slow path all the time. We need 22212 // unfortunate because it triggers the slow path all the time. We need
@@ -24113,7 +22249,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
24113 // If we don't have any more existing children we can choose a fast path 22249 // If we don't have any more existing children we can choose a fast path
24114 // since the rest will all be insertions. 22250 // since the rest will all be insertions.
24115 for (; !step.done; newIdx++, step = newChildren.next()) { 22251 for (; !step.done; newIdx++, step = newChildren.next()) {
24116 var _newFiber3 = createChild(returnFiber, step.value, priority); 22252 var _newFiber3 = createChild(returnFiber, step.value, expirationTime);
24117 if (_newFiber3 === null) { 22253 if (_newFiber3 === null) {
24118 continue; 22254 continue;
24119 } 22255 }
@@ -24134,7 +22270,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
24134 22270
24135 // Keep scanning and use the map to restore deleted items as moves. 22271 // Keep scanning and use the map to restore deleted items as moves.
24136 for (; !step.done; newIdx++, step = newChildren.next()) { 22272 for (; !step.done; newIdx++, step = newChildren.next()) {
24137 var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, priority); 22273 var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);
24138 if (_newFiber4 !== null) { 22274 if (_newFiber4 !== null) {
24139 if (shouldTrackSideEffects) { 22275 if (shouldTrackSideEffects) {
24140 if (_newFiber4.alternate !== null) { 22276 if (_newFiber4.alternate !== null) {
@@ -24166,38 +22302,36 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
24166 return resultingFirstChild; 22302 return resultingFirstChild;
24167 } 22303 }
24168 22304
24169 function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, priority) { 22305 function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {
24170 // There's no need to check for keys on text nodes since we don't have a 22306 // There's no need to check for keys on text nodes since we don't have a
24171 // way to define them. 22307 // way to define them.
24172 if (currentFirstChild !== null && currentFirstChild.tag === HostText$5) { 22308 if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
24173 // We already have an existing node so let's just update it and delete 22309 // We already have an existing node so let's just update it and delete
24174 // the rest. 22310 // the rest.
24175 deleteRemainingChildren(returnFiber, currentFirstChild.sibling); 22311 deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
24176 var existing = useFiber(currentFirstChild, priority); 22312 var existing = useFiber(currentFirstChild, textContent, expirationTime);
24177 existing.pendingProps = textContent;
24178 existing['return'] = returnFiber; 22313 existing['return'] = returnFiber;
24179 return existing; 22314 return existing;
24180 } 22315 }
24181 // The existing first child is not a text node so we need to create one 22316 // The existing first child is not a text node so we need to create one
24182 // and delete the existing ones. 22317 // and delete the existing ones.
24183 deleteRemainingChildren(returnFiber, currentFirstChild); 22318 deleteRemainingChildren(returnFiber, currentFirstChild);
24184 var created = createFiberFromText$1(textContent, returnFiber.internalContextTag, priority); 22319 var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);
24185 created['return'] = returnFiber; 22320 created['return'] = returnFiber;
24186 return created; 22321 return created;
24187 } 22322 }
24188 22323
24189 function reconcileSingleElement(returnFiber, currentFirstChild, element, priority) { 22324 function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {
24190 var key = element.key; 22325 var key = element.key;
24191 var child = currentFirstChild; 22326 var child = currentFirstChild;
24192 while (child !== null) { 22327 while (child !== null) {
24193 // TODO: If key === null and child.key === null, then this only applies to 22328 // TODO: If key === null and child.key === null, then this only applies to
24194 // the first item in the list. 22329 // the first item in the list.
24195 if (child.key === key) { 22330 if (child.key === key) {
24196 if (child.type === element.type) { 22331 if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {
24197 deleteRemainingChildren(returnFiber, child.sibling); 22332 deleteRemainingChildren(returnFiber, child.sibling);
24198 var existing = useFiber(child, priority); 22333 var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);
24199 existing.ref = coerceRef(child, element); 22334 existing.ref = coerceRef(child, element);
24200 existing.pendingProps = element.props;
24201 existing['return'] = returnFiber; 22335 existing['return'] = returnFiber;
24202 { 22336 {
24203 existing._debugSource = element._source; 22337 existing._debugSource = element._source;
@@ -24214,23 +22348,28 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
24214 child = child.sibling; 22348 child = child.sibling;
24215 } 22349 }
24216 22350
24217 var created = createFiberFromElement$1(element, returnFiber.internalContextTag, priority); 22351 if (element.type === REACT_FRAGMENT_TYPE) {
24218 created.ref = coerceRef(currentFirstChild, element); 22352 var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);
24219 created['return'] = returnFiber; 22353 created['return'] = returnFiber;
24220 return created; 22354 return created;
22355 } else {
22356 var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);
22357 _created7.ref = coerceRef(currentFirstChild, element);
22358 _created7['return'] = returnFiber;
22359 return _created7;
22360 }
24221 } 22361 }
24222 22362
24223 function reconcileSingleCoroutine(returnFiber, currentFirstChild, coroutine, priority) { 22363 function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {
24224 var key = coroutine.key; 22364 var key = call.key;
24225 var child = currentFirstChild; 22365 var child = currentFirstChild;
24226 while (child !== null) { 22366 while (child !== null) {
24227 // TODO: If key === null and child.key === null, then this only applies to 22367 // TODO: If key === null and child.key === null, then this only applies to
24228 // the first item in the list. 22368 // the first item in the list.
24229 if (child.key === key) { 22369 if (child.key === key) {
24230 if (child.tag === CoroutineComponent$2) { 22370 if (child.tag === CallComponent) {
24231 deleteRemainingChildren(returnFiber, child.sibling); 22371 deleteRemainingChildren(returnFiber, child.sibling);
24232 var existing = useFiber(child, priority); 22372 var existing = useFiber(child, call, expirationTime);
24233 existing.pendingProps = coroutine;
24234 existing['return'] = returnFiber; 22373 existing['return'] = returnFiber;
24235 return existing; 22374 return existing;
24236 } else { 22375 } else {
@@ -24243,19 +22382,19 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
24243 child = child.sibling; 22382 child = child.sibling;
24244 } 22383 }
24245 22384
24246 var created = createFiberFromCoroutine$1(coroutine, returnFiber.internalContextTag, priority); 22385 var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);
24247 created['return'] = returnFiber; 22386 created['return'] = returnFiber;
24248 return created; 22387 return created;
24249 } 22388 }
24250 22389
24251 function reconcileSingleYield(returnFiber, currentFirstChild, yieldNode, priority) { 22390 function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {
24252 // There's no need to check for keys on yields since they're stateless. 22391 // There's no need to check for keys on yields since they're stateless.
24253 var child = currentFirstChild; 22392 var child = currentFirstChild;
24254 if (child !== null) { 22393 if (child !== null) {
24255 if (child.tag === YieldComponent$3) { 22394 if (child.tag === ReturnComponent) {
24256 deleteRemainingChildren(returnFiber, child.sibling); 22395 deleteRemainingChildren(returnFiber, child.sibling);
24257 var existing = useFiber(child, priority); 22396 var existing = useFiber(child, null, expirationTime);
24258 existing.type = yieldNode.value; 22397 existing.type = returnNode.value;
24259 existing['return'] = returnFiber; 22398 existing['return'] = returnFiber;
24260 return existing; 22399 return existing;
24261 } else { 22400 } else {
@@ -24263,23 +22402,22 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
24263 } 22402 }
24264 } 22403 }
24265 22404
24266 var created = createFiberFromYield$1(yieldNode, returnFiber.internalContextTag, priority); 22405 var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);
24267 created.type = yieldNode.value; 22406 created.type = returnNode.value;
24268 created['return'] = returnFiber; 22407 created['return'] = returnFiber;
24269 return created; 22408 return created;
24270 } 22409 }
24271 22410
24272 function reconcileSinglePortal(returnFiber, currentFirstChild, portal, priority) { 22411 function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {
24273 var key = portal.key; 22412 var key = portal.key;
24274 var child = currentFirstChild; 22413 var child = currentFirstChild;
24275 while (child !== null) { 22414 while (child !== null) {
24276 // TODO: If key === null and child.key === null, then this only applies to 22415 // TODO: If key === null and child.key === null, then this only applies to
24277 // the first item in the list. 22416 // the first item in the list.
24278 if (child.key === key) { 22417 if (child.key === key) {
24279 if (child.tag === HostPortal$5 && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) { 22418 if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {
24280 deleteRemainingChildren(returnFiber, child.sibling); 22419 deleteRemainingChildren(returnFiber, child.sibling);
24281 var existing = useFiber(child, priority); 22420 var existing = useFiber(child, portal.children || [], expirationTime);
24282 existing.pendingProps = portal.children || [];
24283 existing['return'] = returnFiber; 22421 existing['return'] = returnFiber;
24284 return existing; 22422 return existing;
24285 } else { 22423 } else {
@@ -24292,7 +22430,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
24292 child = child.sibling; 22430 child = child.sibling;
24293 } 22431 }
24294 22432
24295 var created = createFiberFromPortal$1(portal, returnFiber.internalContextTag, priority); 22433 var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);
24296 created['return'] = returnFiber; 22434 created['return'] = returnFiber;
24297 return created; 22435 return created;
24298 } 22436 }
@@ -24300,42 +22438,46 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
24300 // This API will tag the children with the side-effect of the reconciliation 22438 // This API will tag the children with the side-effect of the reconciliation
24301 // itself. They will be added to the side-effect list as we pass through the 22439 // itself. They will be added to the side-effect list as we pass through the
24302 // children and the parent. 22440 // children and the parent.
24303 function reconcileChildFibers(returnFiber, currentFirstChild, newChild, priority) { 22441 function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {
24304 // This function is not recursive. 22442 // This function is not recursive.
24305 // If the top level item is an array, we treat it as a set of children, 22443 // If the top level item is an array, we treat it as a set of children,
24306 // not as a fragment. Nested arrays on the other hand will be treated as 22444 // not as a fragment. Nested arrays on the other hand will be treated as
24307 // fragment nodes. Recursion happens at the normal flow. 22445 // fragment nodes. Recursion happens at the normal flow.
24308 22446
22447 // Handle top level unkeyed fragments as if they were arrays.
22448 // This leads to an ambiguity between <>{[...]}</> and <>...</>.
22449 // We treat the ambiguous cases above the same.
22450 if (enableReactFragment && typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {
22451 newChild = newChild.props.children;
22452 }
22453
24309 // Handle object types 22454 // Handle object types
24310 var isObject = typeof newChild === 'object' && newChild !== null; 22455 var isObject = typeof newChild === 'object' && newChild !== null;
22456
24311 if (isObject) { 22457 if (isObject) {
24312 // Support only the subset of return types that Stack supports. Treat
24313 // everything else as empty, but log a warning.
24314 switch (newChild.$$typeof) { 22458 switch (newChild.$$typeof) {
24315 case REACT_ELEMENT_TYPE: 22459 case REACT_ELEMENT_TYPE:
24316 return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, priority)); 22460 return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));
24317
24318 case REACT_COROUTINE_TYPE:
24319 return placeSingleChild(reconcileSingleCoroutine(returnFiber, currentFirstChild, newChild, priority));
24320
24321 case REACT_YIELD_TYPE:
24322 return placeSingleChild(reconcileSingleYield(returnFiber, currentFirstChild, newChild, priority));
24323 22461
22462 case REACT_CALL_TYPE:
22463 return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));
22464 case REACT_RETURN_TYPE:
22465 return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));
24324 case REACT_PORTAL_TYPE: 22466 case REACT_PORTAL_TYPE:
24325 return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, priority)); 22467 return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));
24326 } 22468 }
24327 } 22469 }
24328 22470
24329 if (typeof newChild === 'string' || typeof newChild === 'number') { 22471 if (typeof newChild === 'string' || typeof newChild === 'number') {
24330 return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, priority)); 22472 return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));
24331 } 22473 }
24332 22474
24333 if (isArray(newChild)) { 22475 if (isArray$1(newChild)) {
24334 return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, priority); 22476 return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);
24335 } 22477 }
24336 22478
24337 if (getIteratorFn(newChild)) { 22479 if (getIteratorFn(newChild)) {
24338 return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, priority); 22480 return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);
24339 } 22481 }
24340 22482
24341 if (isObject) { 22483 if (isObject) {
@@ -24352,7 +22494,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
24352 // component, throw an error. If Fiber return types are disabled, 22494 // component, throw an error. If Fiber return types are disabled,
24353 // we already threw above. 22495 // we already threw above.
24354 switch (returnFiber.tag) { 22496 switch (returnFiber.tag) {
24355 case ClassComponent$7: 22497 case ClassComponent:
24356 { 22498 {
24357 { 22499 {
24358 var instance = returnFiber.stateNode; 22500 var instance = returnFiber.stateNode;
@@ -24365,7 +22507,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
24365 // Intentionally fall through to the next case, which handles both 22507 // Intentionally fall through to the next case, which handles both
24366 // functions and classes 22508 // functions and classes
24367 // eslint-disable-next-lined no-fallthrough 22509 // eslint-disable-next-lined no-fallthrough
24368 case FunctionalComponent$2: 22510 case FunctionalComponent:
24369 { 22511 {
24370 var Component = returnFiber.type; 22512 var Component = returnFiber.type;
24371 invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component'); 22513 invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');
@@ -24380,13 +22522,13 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
24380 return reconcileChildFibers; 22522 return reconcileChildFibers;
24381} 22523}
24382 22524
24383var reconcileChildFibers$1 = ChildReconciler(true, true); 22525var reconcileChildFibers = ChildReconciler(true, true);
24384 22526
24385var reconcileChildFibersInPlace$1 = ChildReconciler(false, true); 22527var reconcileChildFibersInPlace = ChildReconciler(false, true);
24386 22528
24387var mountChildFibersInPlace$1 = ChildReconciler(false, false); 22529var mountChildFibersInPlace = ChildReconciler(false, false);
24388 22530
24389var cloneChildFibers$1 = function (current, workInProgress) { 22531function cloneChildFibers(current, workInProgress) {
24390 !(current === null || workInProgress.child === current.child) ? invariant(false, 'Resuming work not yet implemented.') : void 0; 22532 !(current === null || workInProgress.child === current.child) ? invariant(false, 'Resuming work not yet implemented.') : void 0;
24391 22533
24392 if (workInProgress.child === null) { 22534 if (workInProgress.child === null) {
@@ -24394,549 +22536,23 @@ var cloneChildFibers$1 = function (current, workInProgress) {
24394 } 22536 }
24395 22537
24396 var currentChild = workInProgress.child; 22538 var currentChild = workInProgress.child;
24397 var newChild = createWorkInProgress$2(currentChild, currentChild.pendingWorkPriority); 22539 var newChild = createWorkInProgress(currentChild, currentChild.pendingProps, currentChild.expirationTime);
24398 // TODO: Pass this as an argument, since it's easy to forget.
24399 newChild.pendingProps = currentChild.pendingProps;
24400 workInProgress.child = newChild; 22540 workInProgress.child = newChild;
24401 22541
24402 newChild['return'] = workInProgress; 22542 newChild['return'] = workInProgress;
24403 while (currentChild.sibling !== null) { 22543 while (currentChild.sibling !== null) {
24404 currentChild = currentChild.sibling; 22544 currentChild = currentChild.sibling;
24405 newChild = newChild.sibling = createWorkInProgress$2(currentChild, currentChild.pendingWorkPriority); 22545 newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps, currentChild.expirationTime);
24406 newChild.pendingProps = currentChild.pendingProps;
24407 newChild['return'] = workInProgress; 22546 newChild['return'] = workInProgress;
24408 } 22547 }
24409 newChild.sibling = null; 22548 newChild.sibling = null;
24410};
24411
24412var ReactChildFiber = {
24413 reconcileChildFibers: reconcileChildFibers$1,
24414 reconcileChildFibersInPlace: reconcileChildFibersInPlace$1,
24415 mountChildFibersInPlace: mountChildFibersInPlace$1,
24416 cloneChildFibers: cloneChildFibers$1
24417};
24418
24419var Update$1 = ReactTypeOfSideEffect.Update;
24420
24421
24422
24423var AsyncUpdates$1 = ReactTypeOfInternalContext.AsyncUpdates;
24424
24425var cacheContext$1 = ReactFiberContext.cacheContext;
24426var getMaskedContext$2 = ReactFiberContext.getMaskedContext;
24427var getUnmaskedContext$2 = ReactFiberContext.getUnmaskedContext;
24428var isContextConsumer$1 = ReactFiberContext.isContextConsumer;
24429
24430var addUpdate$1 = ReactFiberUpdateQueue.addUpdate;
24431var addReplaceUpdate$1 = ReactFiberUpdateQueue.addReplaceUpdate;
24432var addForceUpdate$1 = ReactFiberUpdateQueue.addForceUpdate;
24433var beginUpdateQueue$2 = ReactFiberUpdateQueue.beginUpdateQueue;
24434
24435var _require5 = ReactFiberContext;
24436var hasContextChanged$2 = _require5.hasContextChanged;
24437
24438var isMounted$1 = ReactFiberTreeReflection.isMounted;
24439
24440
24441
24442
24443
24444
24445
24446var fakeInternalInstance = {};
24447var isArray$1 = Array.isArray;
24448
24449{
24450 var _require7$1 = ReactDebugFiberPerf_1,
24451 startPhaseTimer$1 = _require7$1.startPhaseTimer,
24452 stopPhaseTimer$1 = _require7$1.stopPhaseTimer;
24453
24454 var warning$25 = require$$0;
24455 var warnOnInvalidCallback = function (callback, callerName) {
24456 warning$25(callback === null || typeof callback === 'function', '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
24457 };
24458
24459 // This is so gross but it's at least non-critical and can be removed if
24460 // it causes problems. This is meant to give a nicer error message for
24461 // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,
24462 // ...)) which otherwise throws a "_processChildContext is not a function"
24463 // exception.
24464 Object.defineProperty(fakeInternalInstance, '_processChildContext', {
24465 enumerable: false,
24466 value: function () {
24467 invariant(false, '_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn\'t supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).');
24468 }
24469 });
24470 Object.freeze(fakeInternalInstance);
24471} 22549}
24472 22550
24473var ReactFiberClassComponent = function (scheduleUpdate, getPriorityContext, memoizeProps, memoizeState) {
24474 // Class component state updater
24475 var updater = {
24476 isMounted: isMounted$1,
24477 enqueueSetState: function (instance, partialState, callback) {
24478 var fiber = ReactInstanceMap_1.get(instance);
24479 var priorityLevel = getPriorityContext(fiber, false);
24480 callback = callback === undefined ? null : callback;
24481 {
24482 warnOnInvalidCallback(callback, 'setState');
24483 }
24484 addUpdate$1(fiber, partialState, callback, priorityLevel);
24485 scheduleUpdate(fiber, priorityLevel);
24486 },
24487 enqueueReplaceState: function (instance, state, callback) {
24488 var fiber = ReactInstanceMap_1.get(instance);
24489 var priorityLevel = getPriorityContext(fiber, false);
24490 callback = callback === undefined ? null : callback;
24491 {
24492 warnOnInvalidCallback(callback, 'replaceState');
24493 }
24494 addReplaceUpdate$1(fiber, state, callback, priorityLevel);
24495 scheduleUpdate(fiber, priorityLevel);
24496 },
24497 enqueueForceUpdate: function (instance, callback) {
24498 var fiber = ReactInstanceMap_1.get(instance);
24499 var priorityLevel = getPriorityContext(fiber, false);
24500 callback = callback === undefined ? null : callback;
24501 {
24502 warnOnInvalidCallback(callback, 'forceUpdate');
24503 }
24504 addForceUpdate$1(fiber, callback, priorityLevel);
24505 scheduleUpdate(fiber, priorityLevel);
24506 }
24507 };
24508
24509 function checkShouldComponentUpdate(workInProgress, oldProps, newProps, oldState, newState, newContext) {
24510 if (oldProps === null || workInProgress.updateQueue !== null && workInProgress.updateQueue.hasForceUpdate) {
24511 // If the workInProgress already has an Update effect, return true
24512 return true;
24513 }
24514
24515 var instance = workInProgress.stateNode;
24516 var type = workInProgress.type;
24517 if (typeof instance.shouldComponentUpdate === 'function') {
24518 {
24519 startPhaseTimer$1(workInProgress, 'shouldComponentUpdate');
24520 }
24521 var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, newContext);
24522 {
24523 stopPhaseTimer$1();
24524 }
24525
24526 {
24527 warning$25(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName_1(workInProgress) || 'Unknown');
24528 }
24529
24530 return shouldUpdate;
24531 }
24532
24533 if (type.prototype && type.prototype.isPureReactComponent) {
24534 return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);
24535 }
24536
24537 return true;
24538 }
24539
24540 function checkClassInstance(workInProgress) {
24541 var instance = workInProgress.stateNode;
24542 var type = workInProgress.type;
24543 {
24544 var name = getComponentName_1(workInProgress);
24545 var renderPresent = instance.render;
24546 warning$25(renderPresent, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
24547 var noGetInitialStateOnES6 = !instance.getInitialState || instance.getInitialState.isReactClassApproved || instance.state;
24548 warning$25(noGetInitialStateOnES6, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);
24549 var noGetDefaultPropsOnES6 = !instance.getDefaultProps || instance.getDefaultProps.isReactClassApproved;
24550 warning$25(noGetDefaultPropsOnES6, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);
24551 var noInstancePropTypes = !instance.propTypes;
24552 warning$25(noInstancePropTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);
24553 var noInstanceContextTypes = !instance.contextTypes;
24554 warning$25(noInstanceContextTypes, 'contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);
24555 var noComponentShouldUpdate = typeof instance.componentShouldUpdate !== 'function';
24556 warning$25(noComponentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);
24557 if (type.prototype && type.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
24558 warning$25(false, '%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName_1(workInProgress) || 'A pure component');
24559 }
24560 var noComponentDidUnmount = typeof instance.componentDidUnmount !== 'function';
24561 warning$25(noComponentDidUnmount, '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);
24562 var noComponentWillRecieveProps = typeof instance.componentWillRecieveProps !== 'function';
24563 warning$25(noComponentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);
24564 var hasMutatedProps = instance.props !== workInProgress.pendingProps;
24565 warning$25(instance.props === undefined || !hasMutatedProps, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name);
24566 var noInstanceDefaultProps = !instance.defaultProps;
24567 warning$25(noInstanceDefaultProps, 'Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);
24568 }
24569
24570 var state = instance.state;
24571 if (state && (typeof state !== 'object' || isArray$1(state))) {
24572 invariant(false, '%s.state: must be set to an object or null', getComponentName_1(workInProgress));
24573 }
24574 if (typeof instance.getChildContext === 'function') {
24575 !(typeof workInProgress.type.childContextTypes === 'object') ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', getComponentName_1(workInProgress)) : void 0;
24576 }
24577 }
24578
24579 function resetInputPointers(workInProgress, instance) {
24580 instance.props = workInProgress.memoizedProps;
24581 instance.state = workInProgress.memoizedState;
24582 }
24583
24584 function adoptClassInstance(workInProgress, instance) {
24585 instance.updater = updater;
24586 workInProgress.stateNode = instance;
24587 // The instance needs access to the fiber so that it can schedule updates
24588 ReactInstanceMap_1.set(instance, workInProgress);
24589 {
24590 instance._reactInternalInstance = fakeInternalInstance;
24591 }
24592 }
24593
24594 function constructClassInstance(workInProgress, props) {
24595 var ctor = workInProgress.type;
24596 var unmaskedContext = getUnmaskedContext$2(workInProgress);
24597 var needsContext = isContextConsumer$1(workInProgress);
24598 var context = needsContext ? getMaskedContext$2(workInProgress, unmaskedContext) : emptyObject;
24599 var instance = new ctor(props, context);
24600 adoptClassInstance(workInProgress, instance);
24601
24602 // Cache unmasked context so we can avoid recreating masked context unless necessary.
24603 // ReactFiberContext usually updates this cache but can't for newly-created instances.
24604 if (needsContext) {
24605 cacheContext$1(workInProgress, unmaskedContext, context);
24606 }
24607
24608 return instance;
24609 }
24610
24611 function callComponentWillMount(workInProgress, instance) {
24612 {
24613 startPhaseTimer$1(workInProgress, 'componentWillMount');
24614 }
24615 var oldState = instance.state;
24616 instance.componentWillMount();
24617 {
24618 stopPhaseTimer$1();
24619 }
24620
24621 if (oldState !== instance.state) {
24622 {
24623 warning$25(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName_1(workInProgress));
24624 }
24625 updater.enqueueReplaceState(instance, instance.state, null);
24626 }
24627 }
24628
24629 function callComponentWillReceiveProps(workInProgress, instance, newProps, newContext) {
24630 {
24631 startPhaseTimer$1(workInProgress, 'componentWillReceiveProps');
24632 }
24633 var oldState = instance.state;
24634 instance.componentWillReceiveProps(newProps, newContext);
24635 {
24636 stopPhaseTimer$1();
24637 }
24638
24639 if (instance.state !== oldState) {
24640 {
24641 warning$25(false, '%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName_1(workInProgress));
24642 }
24643 updater.enqueueReplaceState(instance, instance.state, null);
24644 }
24645 }
24646
24647 // Invokes the mount life-cycles on a previously never rendered instance.
24648 function mountClassInstance(workInProgress, priorityLevel) {
24649 var current = workInProgress.alternate;
24650
24651 {
24652 checkClassInstance(workInProgress);
24653 }
24654
24655 var instance = workInProgress.stateNode;
24656 var state = instance.state || null;
24657
24658 var props = workInProgress.pendingProps;
24659 !props ? invariant(false, 'There must be pending props for an initial mount. This error is likely caused by a bug in React. Please file an issue.') : void 0;
24660
24661 var unmaskedContext = getUnmaskedContext$2(workInProgress);
24662
24663 instance.props = props;
24664 instance.state = state;
24665 instance.refs = emptyObject;
24666 instance.context = getMaskedContext$2(workInProgress, unmaskedContext);
24667
24668 if (ReactFeatureFlags_1.enableAsyncSubtreeAPI && workInProgress.type != null && workInProgress.type.prototype != null && workInProgress.type.prototype.unstable_isAsyncReactComponent === true) {
24669 workInProgress.internalContextTag |= AsyncUpdates$1;
24670 }
24671
24672 if (typeof instance.componentWillMount === 'function') {
24673 callComponentWillMount(workInProgress, instance);
24674 // If we had additional state updates during this life-cycle, let's
24675 // process them now.
24676 var updateQueue = workInProgress.updateQueue;
24677 if (updateQueue !== null) {
24678 instance.state = beginUpdateQueue$2(current, workInProgress, updateQueue, instance, state, props, priorityLevel);
24679 }
24680 }
24681 if (typeof instance.componentDidMount === 'function') {
24682 workInProgress.effectTag |= Update$1;
24683 }
24684 }
24685
24686 // Called on a preexisting class instance. Returns false if a resumed render
24687 // could be reused.
24688 // function resumeMountClassInstance(
24689 // workInProgress: Fiber,
24690 // priorityLevel: PriorityLevel,
24691 // ): boolean {
24692 // const instance = workInProgress.stateNode;
24693 // resetInputPointers(workInProgress, instance);
24694
24695 // let newState = workInProgress.memoizedState;
24696 // let newProps = workInProgress.pendingProps;
24697 // if (!newProps) {
24698 // // If there isn't any new props, then we'll reuse the memoized props.
24699 // // This could be from already completed work.
24700 // newProps = workInProgress.memoizedProps;
24701 // invariant(
24702 // newProps != null,
24703 // 'There should always be pending or memoized props. This error is ' +
24704 // 'likely caused by a bug in React. Please file an issue.',
24705 // );
24706 // }
24707 // const newUnmaskedContext = getUnmaskedContext(workInProgress);
24708 // const newContext = getMaskedContext(workInProgress, newUnmaskedContext);
24709
24710 // const oldContext = instance.context;
24711 // const oldProps = workInProgress.memoizedProps;
24712
24713 // if (
24714 // typeof instance.componentWillReceiveProps === 'function' &&
24715 // (oldProps !== newProps || oldContext !== newContext)
24716 // ) {
24717 // callComponentWillReceiveProps(
24718 // workInProgress,
24719 // instance,
24720 // newProps,
24721 // newContext,
24722 // );
24723 // }
24724
24725 // // Process the update queue before calling shouldComponentUpdate
24726 // const updateQueue = workInProgress.updateQueue;
24727 // if (updateQueue !== null) {
24728 // newState = beginUpdateQueue(
24729 // workInProgress,
24730 // updateQueue,
24731 // instance,
24732 // newState,
24733 // newProps,
24734 // priorityLevel,
24735 // );
24736 // }
24737
24738 // // TODO: Should we deal with a setState that happened after the last
24739 // // componentWillMount and before this componentWillMount? Probably
24740 // // unsupported anyway.
24741
24742 // if (
24743 // !checkShouldComponentUpdate(
24744 // workInProgress,
24745 // workInProgress.memoizedProps,
24746 // newProps,
24747 // workInProgress.memoizedState,
24748 // newState,
24749 // newContext,
24750 // )
24751 // ) {
24752 // // Update the existing instance's state, props, and context pointers even
24753 // // though we're bailing out.
24754 // instance.props = newProps;
24755 // instance.state = newState;
24756 // instance.context = newContext;
24757 // return false;
24758 // }
24759
24760 // // Update the input pointers now so that they are correct when we call
24761 // // componentWillMount
24762 // instance.props = newProps;
24763 // instance.state = newState;
24764 // instance.context = newContext;
24765
24766 // if (typeof instance.componentWillMount === 'function') {
24767 // callComponentWillMount(workInProgress, instance);
24768 // // componentWillMount may have called setState. Process the update queue.
24769 // const newUpdateQueue = workInProgress.updateQueue;
24770 // if (newUpdateQueue !== null) {
24771 // newState = beginUpdateQueue(
24772 // workInProgress,
24773 // newUpdateQueue,
24774 // instance,
24775 // newState,
24776 // newProps,
24777 // priorityLevel,
24778 // );
24779 // }
24780 // }
24781
24782 // if (typeof instance.componentDidMount === 'function') {
24783 // workInProgress.effectTag |= Update;
24784 // }
24785
24786 // instance.state = newState;
24787
24788 // return true;
24789 // }
24790
24791 // Invokes the update life-cycles and returns false if it shouldn't rerender.
24792 function updateClassInstance(current, workInProgress, priorityLevel) {
24793 var instance = workInProgress.stateNode;
24794 resetInputPointers(workInProgress, instance);
24795
24796 var oldProps = workInProgress.memoizedProps;
24797 var newProps = workInProgress.pendingProps;
24798 if (!newProps) {
24799 // If there aren't any new props, then we'll reuse the memoized props.
24800 // This could be from already completed work.
24801 newProps = oldProps;
24802 !(newProps != null) ? invariant(false, 'There should always be pending or memoized props. This error is likely caused by a bug in React. Please file an issue.') : void 0;
24803 }
24804 var oldContext = instance.context;
24805 var newUnmaskedContext = getUnmaskedContext$2(workInProgress);
24806 var newContext = getMaskedContext$2(workInProgress, newUnmaskedContext);
24807
24808 // Note: During these life-cycles, instance.props/instance.state are what
24809 // ever the previously attempted to render - not the "current". However,
24810 // during componentDidUpdate we pass the "current" props.
24811
24812 if (typeof instance.componentWillReceiveProps === 'function' && (oldProps !== newProps || oldContext !== newContext)) {
24813 callComponentWillReceiveProps(workInProgress, instance, newProps, newContext);
24814 }
24815
24816 // Compute the next state using the memoized state and the update queue.
24817 var oldState = workInProgress.memoizedState;
24818 // TODO: Previous state can be null.
24819 var newState = void 0;
24820 if (workInProgress.updateQueue !== null) {
24821 newState = beginUpdateQueue$2(current, workInProgress, workInProgress.updateQueue, instance, oldState, newProps, priorityLevel);
24822 } else {
24823 newState = oldState;
24824 }
24825
24826 if (oldProps === newProps && oldState === newState && !hasContextChanged$2() && !(workInProgress.updateQueue !== null && workInProgress.updateQueue.hasForceUpdate)) {
24827 // If an update was already in progress, we should schedule an Update
24828 // effect even though we're bailing out, so that cWU/cDU are called.
24829 if (typeof instance.componentDidUpdate === 'function') {
24830 if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
24831 workInProgress.effectTag |= Update$1;
24832 }
24833 }
24834 return false;
24835 }
24836
24837 var shouldUpdate = checkShouldComponentUpdate(workInProgress, oldProps, newProps, oldState, newState, newContext);
24838
24839 if (shouldUpdate) {
24840 if (typeof instance.componentWillUpdate === 'function') {
24841 {
24842 startPhaseTimer$1(workInProgress, 'componentWillUpdate');
24843 }
24844 instance.componentWillUpdate(newProps, newState, newContext);
24845 {
24846 stopPhaseTimer$1();
24847 }
24848 }
24849 if (typeof instance.componentDidUpdate === 'function') {
24850 workInProgress.effectTag |= Update$1;
24851 }
24852 } else {
24853 // If an update was already in progress, we should schedule an Update
24854 // effect even though we're bailing out, so that cWU/cDU are called.
24855 if (typeof instance.componentDidUpdate === 'function') {
24856 if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
24857 workInProgress.effectTag |= Update$1;
24858 }
24859 }
24860
24861 // If shouldComponentUpdate returned false, we should still update the
24862 // memoized props/state to indicate that this work can be reused.
24863 memoizeProps(workInProgress, newProps);
24864 memoizeState(workInProgress, newState);
24865 }
24866
24867 // Update the existing instance's state, props, and context pointers even
24868 // if shouldComponentUpdate returns false.
24869 instance.props = newProps;
24870 instance.state = newState;
24871 instance.context = newContext;
24872
24873 return shouldUpdate;
24874 }
24875
24876 return {
24877 adoptClassInstance: adoptClassInstance,
24878 constructClassInstance: constructClassInstance,
24879 mountClassInstance: mountClassInstance,
24880 // resumeMountClassInstance,
24881 updateClassInstance: updateClassInstance
24882 };
24883};
24884
24885var mountChildFibersInPlace = ReactChildFiber.mountChildFibersInPlace;
24886var reconcileChildFibers = ReactChildFiber.reconcileChildFibers;
24887var reconcileChildFibersInPlace = ReactChildFiber.reconcileChildFibersInPlace;
24888var cloneChildFibers = ReactChildFiber.cloneChildFibers;
24889
24890var beginUpdateQueue$1 = ReactFiberUpdateQueue.beginUpdateQueue;
24891
24892
24893
24894var getMaskedContext$1 = ReactFiberContext.getMaskedContext;
24895var getUnmaskedContext$1 = ReactFiberContext.getUnmaskedContext;
24896var hasContextChanged$1 = ReactFiberContext.hasContextChanged;
24897var pushContextProvider$1 = ReactFiberContext.pushContextProvider;
24898var pushTopLevelContextObject$1 = ReactFiberContext.pushTopLevelContextObject;
24899var invalidateContextProvider$1 = ReactFiberContext.invalidateContextProvider;
24900
24901var IndeterminateComponent$2 = ReactTypeOfWork.IndeterminateComponent;
24902var FunctionalComponent$1 = ReactTypeOfWork.FunctionalComponent;
24903var ClassComponent$6 = ReactTypeOfWork.ClassComponent;
24904var HostRoot$7 = ReactTypeOfWork.HostRoot;
24905var HostComponent$7 = ReactTypeOfWork.HostComponent;
24906var HostText$4 = ReactTypeOfWork.HostText;
24907var HostPortal$4 = ReactTypeOfWork.HostPortal;
24908var CoroutineComponent$1 = ReactTypeOfWork.CoroutineComponent;
24909var CoroutineHandlerPhase = ReactTypeOfWork.CoroutineHandlerPhase;
24910var YieldComponent$2 = ReactTypeOfWork.YieldComponent;
24911var Fragment$2 = ReactTypeOfWork.Fragment;
24912
24913var NoWork$3 = ReactPriorityLevel.NoWork;
24914var OffscreenPriority$1 = ReactPriorityLevel.OffscreenPriority;
24915
24916var PerformedWork$1 = ReactTypeOfSideEffect.PerformedWork;
24917var Placement$2 = ReactTypeOfSideEffect.Placement;
24918var ContentReset$1 = ReactTypeOfSideEffect.ContentReset;
24919var Err$1 = ReactTypeOfSideEffect.Err;
24920var Ref$1 = ReactTypeOfSideEffect.Ref;
24921
24922
24923
24924var ReactCurrentOwner$2 = ReactGlobalSharedState_1.ReactCurrentOwner;
24925
24926
24927
24928{ 22551{
24929 var ReactDebugCurrentFiber$4 = ReactDebugCurrentFiber_1;
24930
24931 var _require7 = ReactDebugFiberPerf_1,
24932 cancelWorkTimer = _require7.cancelWorkTimer;
24933
24934 var warning$23 = require$$0;
24935
24936 var warnedAboutStatelessRefs = {}; 22552 var warnedAboutStatelessRefs = {};
24937} 22553}
24938 22554
24939var ReactFiberBeginWork = function (config, hostContext, hydrationContext, scheduleUpdate, getPriorityContext) { 22555var ReactFiberBeginWork = function (config, hostContext, hydrationContext, scheduleWork, computeExpirationForFiber) {
24940 var shouldSetTextContent = config.shouldSetTextContent, 22556 var shouldSetTextContent = config.shouldSetTextContent,
24941 useSyncScheduling = config.useSyncScheduling, 22557 useSyncScheduling = config.useSyncScheduling,
24942 shouldDeprioritizeSubtree = config.shouldDeprioritizeSubtree; 22558 shouldDeprioritizeSubtree = config.shouldDeprioritizeSubtree;
@@ -24946,24 +22562,26 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
24946 resetHydrationState = hydrationContext.resetHydrationState, 22562 resetHydrationState = hydrationContext.resetHydrationState,
24947 tryToClaimNextHydratableInstance = hydrationContext.tryToClaimNextHydratableInstance; 22563 tryToClaimNextHydratableInstance = hydrationContext.tryToClaimNextHydratableInstance;
24948 22564
24949 var _ReactFiberClassCompo = ReactFiberClassComponent(scheduleUpdate, getPriorityContext, memoizeProps, memoizeState), 22565 var _ReactFiberClassCompo = ReactFiberClassComponent(scheduleWork, computeExpirationForFiber, memoizeProps, memoizeState),
24950 adoptClassInstance = _ReactFiberClassCompo.adoptClassInstance, 22566 adoptClassInstance = _ReactFiberClassCompo.adoptClassInstance,
24951 constructClassInstance = _ReactFiberClassCompo.constructClassInstance, 22567 constructClassInstance = _ReactFiberClassCompo.constructClassInstance,
24952 mountClassInstance = _ReactFiberClassCompo.mountClassInstance, 22568 mountClassInstance = _ReactFiberClassCompo.mountClassInstance,
24953 updateClassInstance = _ReactFiberClassCompo.updateClassInstance; 22569 updateClassInstance = _ReactFiberClassCompo.updateClassInstance;
24954 22570
22571 // TODO: Remove this and use reconcileChildrenAtExpirationTime directly.
22572
22573
24955 function reconcileChildren(current, workInProgress, nextChildren) { 22574 function reconcileChildren(current, workInProgress, nextChildren) {
24956 var priorityLevel = workInProgress.pendingWorkPriority; 22575 reconcileChildrenAtExpirationTime(current, workInProgress, nextChildren, workInProgress.expirationTime);
24957 reconcileChildrenAtPriority(current, workInProgress, nextChildren, priorityLevel);
24958 } 22576 }
24959 22577
24960 function reconcileChildrenAtPriority(current, workInProgress, nextChildren, priorityLevel) { 22578 function reconcileChildrenAtExpirationTime(current, workInProgress, nextChildren, renderExpirationTime) {
24961 if (current === null) { 22579 if (current === null) {
24962 // If this is a fresh new component that hasn't been rendered yet, we 22580 // If this is a fresh new component that hasn't been rendered yet, we
24963 // won't update its child set by applying minimal side-effects. Instead, 22581 // won't update its child set by applying minimal side-effects. Instead,
24964 // we will add them all to the child before it gets rendered. That means 22582 // we will add them all to the child before it gets rendered. That means
24965 // we can optimize this reconciliation pass by not tracking side-effects. 22583 // we can optimize this reconciliation pass by not tracking side-effects.
24966 workInProgress.child = mountChildFibersInPlace(workInProgress, workInProgress.child, nextChildren, priorityLevel); 22584 workInProgress.child = mountChildFibersInPlace(workInProgress, workInProgress.child, nextChildren, renderExpirationTime);
24967 } else if (current.child === workInProgress.child) { 22585 } else if (current.child === workInProgress.child) {
24968 // If the current child is the same as the work in progress, it means that 22586 // If the current child is the same as the work in progress, it means that
24969 // we haven't yet started any work on these children. Therefore, we use 22587 // we haven't yet started any work on these children. Therefore, we use
@@ -24971,18 +22589,18 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
24971 22589
24972 // If we had any progressed work already, that is invalid at this point so 22590 // If we had any progressed work already, that is invalid at this point so
24973 // let's throw it out. 22591 // let's throw it out.
24974 workInProgress.child = reconcileChildFibers(workInProgress, workInProgress.child, nextChildren, priorityLevel); 22592 workInProgress.child = reconcileChildFibers(workInProgress, workInProgress.child, nextChildren, renderExpirationTime);
24975 } else { 22593 } else {
24976 // If, on the other hand, it is already using a clone, that means we've 22594 // If, on the other hand, it is already using a clone, that means we've
24977 // already begun some work on this tree and we can continue where we left 22595 // already begun some work on this tree and we can continue where we left
24978 // off by reconciling against the existing children. 22596 // off by reconciling against the existing children.
24979 workInProgress.child = reconcileChildFibersInPlace(workInProgress, workInProgress.child, nextChildren, priorityLevel); 22597 workInProgress.child = reconcileChildFibersInPlace(workInProgress, workInProgress.child, nextChildren, renderExpirationTime);
24980 } 22598 }
24981 } 22599 }
24982 22600
24983 function updateFragment(current, workInProgress) { 22601 function updateFragment(current, workInProgress) {
24984 var nextChildren = workInProgress.pendingProps; 22602 var nextChildren = workInProgress.pendingProps;
24985 if (hasContextChanged$1()) { 22603 if (hasContextChanged()) {
24986 // Normally we can bail out on props equality but if context has changed 22604 // Normally we can bail out on props equality but if context has changed
24987 // we don't do the bailout and we have to reuse existing props instead. 22605 // we don't do the bailout and we have to reuse existing props instead.
24988 if (nextChildren === null) { 22606 if (nextChildren === null) {
@@ -25000,7 +22618,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25000 var ref = workInProgress.ref; 22618 var ref = workInProgress.ref;
25001 if (ref !== null && (!current || current.ref !== ref)) { 22619 if (ref !== null && (!current || current.ref !== ref)) {
25002 // Schedule a Ref effect 22620 // Schedule a Ref effect
25003 workInProgress.effectTag |= Ref$1; 22621 workInProgress.effectTag |= Ref;
25004 } 22622 }
25005 } 22623 }
25006 22624
@@ -25009,7 +22627,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25009 var nextProps = workInProgress.pendingProps; 22627 var nextProps = workInProgress.pendingProps;
25010 22628
25011 var memoizedProps = workInProgress.memoizedProps; 22629 var memoizedProps = workInProgress.memoizedProps;
25012 if (hasContextChanged$1()) { 22630 if (hasContextChanged()) {
25013 // Normally we can bail out on props equality but if context has changed 22631 // Normally we can bail out on props equality but if context has changed
25014 // we don't do the bailout and we have to reuse existing props instead. 22632 // we don't do the bailout and we have to reuse existing props instead.
25015 if (nextProps === null) { 22633 if (nextProps === null) {
@@ -25023,44 +22641,44 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25023 // It used to be here. 22641 // It used to be here.
25024 } 22642 }
25025 22643
25026 var unmaskedContext = getUnmaskedContext$1(workInProgress); 22644 var unmaskedContext = getUnmaskedContext(workInProgress);
25027 var context = getMaskedContext$1(workInProgress, unmaskedContext); 22645 var context = getMaskedContext(workInProgress, unmaskedContext);
25028 22646
25029 var nextChildren; 22647 var nextChildren;
25030 22648
25031 { 22649 {
25032 ReactCurrentOwner$2.current = workInProgress; 22650 ReactCurrentOwner.current = workInProgress;
25033 ReactDebugCurrentFiber$4.setCurrentFiber(workInProgress, 'render'); 22651 ReactDebugCurrentFiber.setCurrentPhase('render');
25034 nextChildren = fn(nextProps, context); 22652 nextChildren = fn(nextProps, context);
25035 ReactDebugCurrentFiber$4.setCurrentFiber(workInProgress, null); 22653 ReactDebugCurrentFiber.setCurrentPhase(null);
25036 } 22654 }
25037 // React DevTools reads this flag. 22655 // React DevTools reads this flag.
25038 workInProgress.effectTag |= PerformedWork$1; 22656 workInProgress.effectTag |= PerformedWork;
25039 reconcileChildren(current, workInProgress, nextChildren); 22657 reconcileChildren(current, workInProgress, nextChildren);
25040 memoizeProps(workInProgress, nextProps); 22658 memoizeProps(workInProgress, nextProps);
25041 return workInProgress.child; 22659 return workInProgress.child;
25042 } 22660 }
25043 22661
25044 function updateClassComponent(current, workInProgress, priorityLevel) { 22662 function updateClassComponent(current, workInProgress, renderExpirationTime) {
25045 // Push context providers early to prevent context stack mismatches. 22663 // Push context providers early to prevent context stack mismatches.
25046 // During mounting we don't know the child context yet as the instance doesn't exist. 22664 // During mounting we don't know the child context yet as the instance doesn't exist.
25047 // We will invalidate the child context in finishClassComponent() right after rendering. 22665 // We will invalidate the child context in finishClassComponent() right after rendering.
25048 var hasContext = pushContextProvider$1(workInProgress); 22666 var hasContext = pushContextProvider(workInProgress);
25049 22667
25050 var shouldUpdate = void 0; 22668 var shouldUpdate = void 0;
25051 if (current === null) { 22669 if (current === null) {
25052 if (!workInProgress.stateNode) { 22670 if (!workInProgress.stateNode) {
25053 // In the initial pass we might need to construct the instance. 22671 // In the initial pass we might need to construct the instance.
25054 constructClassInstance(workInProgress, workInProgress.pendingProps); 22672 constructClassInstance(workInProgress, workInProgress.pendingProps);
25055 mountClassInstance(workInProgress, priorityLevel); 22673 mountClassInstance(workInProgress, renderExpirationTime);
25056 shouldUpdate = true; 22674 shouldUpdate = true;
25057 } else { 22675 } else {
25058 invariant(false, 'Resuming work not yet implemented.'); 22676 invariant(false, 'Resuming work not yet implemented.');
25059 // In a resume, we'll already have an instance we can reuse. 22677 // In a resume, we'll already have an instance we can reuse.
25060 // shouldUpdate = resumeMountClassInstance(workInProgress, priorityLevel); 22678 // shouldUpdate = resumeMountClassInstance(workInProgress, renderExpirationTime);
25061 } 22679 }
25062 } else { 22680 } else {
25063 shouldUpdate = updateClassInstance(current, workInProgress, priorityLevel); 22681 shouldUpdate = updateClassInstance(current, workInProgress, renderExpirationTime);
25064 } 22682 }
25065 return finishClassComponent(current, workInProgress, shouldUpdate, hasContext); 22683 return finishClassComponent(current, workInProgress, shouldUpdate, hasContext);
25066 } 22684 }
@@ -25072,7 +22690,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25072 if (!shouldUpdate) { 22690 if (!shouldUpdate) {
25073 // Context providers should defer to sCU for rendering 22691 // Context providers should defer to sCU for rendering
25074 if (hasContext) { 22692 if (hasContext) {
25075 invalidateContextProvider$1(workInProgress, false); 22693 invalidateContextProvider(workInProgress, false);
25076 } 22694 }
25077 22695
25078 return bailoutOnAlreadyFinishedWork(current, workInProgress); 22696 return bailoutOnAlreadyFinishedWork(current, workInProgress);
@@ -25081,15 +22699,15 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25081 var instance = workInProgress.stateNode; 22699 var instance = workInProgress.stateNode;
25082 22700
25083 // Rerender 22701 // Rerender
25084 ReactCurrentOwner$2.current = workInProgress; 22702 ReactCurrentOwner.current = workInProgress;
25085 var nextChildren = void 0; 22703 var nextChildren = void 0;
25086 { 22704 {
25087 ReactDebugCurrentFiber$4.setCurrentFiber(workInProgress, 'render'); 22705 ReactDebugCurrentFiber.setCurrentPhase('render');
25088 nextChildren = instance.render(); 22706 nextChildren = instance.render();
25089 ReactDebugCurrentFiber$4.setCurrentFiber(workInProgress, null); 22707 ReactDebugCurrentFiber.setCurrentPhase(null);
25090 } 22708 }
25091 // React DevTools reads this flag. 22709 // React DevTools reads this flag.
25092 workInProgress.effectTag |= PerformedWork$1; 22710 workInProgress.effectTag |= PerformedWork;
25093 reconcileChildren(current, workInProgress, nextChildren); 22711 reconcileChildren(current, workInProgress, nextChildren);
25094 // Memoize props and state using the values we just used to render. 22712 // Memoize props and state using the values we just used to render.
25095 // TODO: Restructure so we never read values from the instance. 22713 // TODO: Restructure so we never read values from the instance.
@@ -25098,7 +22716,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25098 22716
25099 // The context might have changed so we need to recalculate it. 22717 // The context might have changed so we need to recalculate it.
25100 if (hasContext) { 22718 if (hasContext) {
25101 invalidateContextProvider$1(workInProgress, true); 22719 invalidateContextProvider(workInProgress, true);
25102 } 22720 }
25103 22721
25104 return workInProgress.child; 22722 return workInProgress.child;
@@ -25107,28 +22725,29 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25107 function pushHostRootContext(workInProgress) { 22725 function pushHostRootContext(workInProgress) {
25108 var root = workInProgress.stateNode; 22726 var root = workInProgress.stateNode;
25109 if (root.pendingContext) { 22727 if (root.pendingContext) {
25110 pushTopLevelContextObject$1(workInProgress, root.pendingContext, root.pendingContext !== root.context); 22728 pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);
25111 } else if (root.context) { 22729 } else if (root.context) {
25112 // Should always be set 22730 // Should always be set
25113 pushTopLevelContextObject$1(workInProgress, root.context, false); 22731 pushTopLevelContextObject(workInProgress, root.context, false);
25114 } 22732 }
25115 pushHostContainer(workInProgress, root.containerInfo); 22733 pushHostContainer(workInProgress, root.containerInfo);
25116 } 22734 }
25117 22735
25118 function updateHostRoot(current, workInProgress, priorityLevel) { 22736 function updateHostRoot(current, workInProgress, renderExpirationTime) {
25119 pushHostRootContext(workInProgress); 22737 pushHostRootContext(workInProgress);
25120 var updateQueue = workInProgress.updateQueue; 22738 var updateQueue = workInProgress.updateQueue;
25121 if (updateQueue !== null) { 22739 if (updateQueue !== null) {
25122 var prevState = workInProgress.memoizedState; 22740 var prevState = workInProgress.memoizedState;
25123 var state = beginUpdateQueue$1(current, workInProgress, updateQueue, null, prevState, null, priorityLevel); 22741 var state = processUpdateQueue(current, workInProgress, updateQueue, null, null, renderExpirationTime);
25124 if (prevState === state) { 22742 if (prevState === state) {
25125 // If the state is the same as before, that's a bailout because we had 22743 // If the state is the same as before, that's a bailout because we had
25126 // no work matching this priority. 22744 // no work that expires at this time.
25127 resetHydrationState(); 22745 resetHydrationState();
25128 return bailoutOnAlreadyFinishedWork(current, workInProgress); 22746 return bailoutOnAlreadyFinishedWork(current, workInProgress);
25129 } 22747 }
25130 var element = state.element; 22748 var element = state.element;
25131 if ((current === null || current.child === null) && enterHydrationState(workInProgress)) { 22749 var root = workInProgress.stateNode;
22750 if ((current === null || current.child === null) && root.hydrate && enterHydrationState(workInProgress)) {
25132 // If we don't have any current children this might be the first pass. 22751 // If we don't have any current children this might be the first pass.
25133 // We always try to hydrate. If this isn't a hydration pass there won't 22752 // We always try to hydrate. If this isn't a hydration pass there won't
25134 // be any children to hydrate which is effectively the same thing as 22753 // be any children to hydrate which is effectively the same thing as
@@ -25138,12 +22757,12 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25138 // know that we're currently in a mounting state. That way isMounted 22757 // know that we're currently in a mounting state. That way isMounted
25139 // works as expected. We must reset this before committing. 22758 // works as expected. We must reset this before committing.
25140 // TODO: Delete this when we delete isMounted and findDOMNode. 22759 // TODO: Delete this when we delete isMounted and findDOMNode.
25141 workInProgress.effectTag |= Placement$2; 22760 workInProgress.effectTag |= Placement;
25142 22761
25143 // Ensure that children mount into this root without tracking 22762 // Ensure that children mount into this root without tracking
25144 // side-effects. This ensures that we don't store Placement effects on 22763 // side-effects. This ensures that we don't store Placement effects on
25145 // nodes that will be hydrated. 22764 // nodes that will be hydrated.
25146 workInProgress.child = mountChildFibersInPlace(workInProgress, workInProgress.child, element, priorityLevel); 22765 workInProgress.child = mountChildFibersInPlace(workInProgress, workInProgress.child, element, renderExpirationTime);
25147 } else { 22766 } else {
25148 // Otherwise reset hydration state in case we aborted and resumed another 22767 // Otherwise reset hydration state in case we aborted and resumed another
25149 // root. 22768 // root.
@@ -25158,7 +22777,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25158 return bailoutOnAlreadyFinishedWork(current, workInProgress); 22777 return bailoutOnAlreadyFinishedWork(current, workInProgress);
25159 } 22778 }
25160 22779
25161 function updateHostComponent(current, workInProgress, renderPriority) { 22780 function updateHostComponent(current, workInProgress, renderExpirationTime) {
25162 pushHostContext(workInProgress); 22781 pushHostContext(workInProgress);
25163 22782
25164 if (current === null) { 22783 if (current === null) {
@@ -25174,7 +22793,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25174 } 22793 }
25175 var prevProps = current !== null ? current.memoizedProps : null; 22794 var prevProps = current !== null ? current.memoizedProps : null;
25176 22795
25177 if (hasContextChanged$1()) { 22796 if (hasContextChanged()) {
25178 // Normally we can bail out on props equality but if context has changed 22797 // Normally we can bail out on props equality but if context has changed
25179 // we don't do the bailout and we have to reuse existing props instead. 22798 // we don't do the bailout and we have to reuse existing props instead.
25180 } else if (nextProps === null || memoizedProps === nextProps) { 22799 } else if (nextProps === null || memoizedProps === nextProps) {
@@ -25193,16 +22812,16 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25193 } else if (prevProps && shouldSetTextContent(type, prevProps)) { 22812 } else if (prevProps && shouldSetTextContent(type, prevProps)) {
25194 // If we're switching from a direct text child to a normal child, or to 22813 // If we're switching from a direct text child to a normal child, or to
25195 // empty, we need to schedule the text content to be reset. 22814 // empty, we need to schedule the text content to be reset.
25196 workInProgress.effectTag |= ContentReset$1; 22815 workInProgress.effectTag |= ContentReset;
25197 } 22816 }
25198 22817
25199 markRef(current, workInProgress); 22818 markRef(current, workInProgress);
25200 22819
25201 // Check the host config to see if the children are offscreen/hidden. 22820 // Check the host config to see if the children are offscreen/hidden.
25202 if (renderPriority !== OffscreenPriority$1 && !useSyncScheduling && shouldDeprioritizeSubtree(type, nextProps)) { 22821 if (renderExpirationTime !== Never && !useSyncScheduling && shouldDeprioritizeSubtree(type, nextProps)) {
25203 // Down-prioritize the children. 22822 // Down-prioritize the children.
25204 workInProgress.pendingWorkPriority = OffscreenPriority$1; 22823 workInProgress.expirationTime = Never;
25205 // Bailout and come back to this fiber later at OffscreenPriority. 22824 // Bailout and come back to this fiber later.
25206 return null; 22825 return null;
25207 } 22826 }
25208 22827
@@ -25225,45 +22844,49 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25225 return null; 22844 return null;
25226 } 22845 }
25227 22846
25228 function mountIndeterminateComponent(current, workInProgress, priorityLevel) { 22847 function mountIndeterminateComponent(current, workInProgress, renderExpirationTime) {
25229 !(current === null) ? invariant(false, 'An indeterminate component should never have mounted. This error is likely caused by a bug in React. Please file an issue.') : void 0; 22848 !(current === null) ? invariant(false, 'An indeterminate component should never have mounted. This error is likely caused by a bug in React. Please file an issue.') : void 0;
25230 var fn = workInProgress.type; 22849 var fn = workInProgress.type;
25231 var props = workInProgress.pendingProps; 22850 var props = workInProgress.pendingProps;
25232 var unmaskedContext = getUnmaskedContext$1(workInProgress); 22851 var unmaskedContext = getUnmaskedContext(workInProgress);
25233 var context = getMaskedContext$1(workInProgress, unmaskedContext); 22852 var context = getMaskedContext(workInProgress, unmaskedContext);
25234 22853
25235 var value; 22854 var value;
25236 22855
25237 { 22856 {
25238 ReactCurrentOwner$2.current = workInProgress; 22857 if (fn.prototype && typeof fn.prototype.render === 'function') {
22858 var componentName = getComponentName(workInProgress);
22859 warning(false, "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);
22860 }
22861 ReactCurrentOwner.current = workInProgress;
25239 value = fn(props, context); 22862 value = fn(props, context);
25240 } 22863 }
25241 // React DevTools reads this flag. 22864 // React DevTools reads this flag.
25242 workInProgress.effectTag |= PerformedWork$1; 22865 workInProgress.effectTag |= PerformedWork;
25243 22866
25244 if (typeof value === 'object' && value !== null && typeof value.render === 'function') { 22867 if (typeof value === 'object' && value !== null && typeof value.render === 'function') {
25245 // Proceed under the assumption that this is a class instance 22868 // Proceed under the assumption that this is a class instance
25246 workInProgress.tag = ClassComponent$6; 22869 workInProgress.tag = ClassComponent;
25247 22870
25248 // Push context providers early to prevent context stack mismatches. 22871 // Push context providers early to prevent context stack mismatches.
25249 // During mounting we don't know the child context yet as the instance doesn't exist. 22872 // During mounting we don't know the child context yet as the instance doesn't exist.
25250 // We will invalidate the child context in finishClassComponent() right after rendering. 22873 // We will invalidate the child context in finishClassComponent() right after rendering.
25251 var hasContext = pushContextProvider$1(workInProgress); 22874 var hasContext = pushContextProvider(workInProgress);
25252 adoptClassInstance(workInProgress, value); 22875 adoptClassInstance(workInProgress, value);
25253 mountClassInstance(workInProgress, priorityLevel); 22876 mountClassInstance(workInProgress, renderExpirationTime);
25254 return finishClassComponent(current, workInProgress, true, hasContext); 22877 return finishClassComponent(current, workInProgress, true, hasContext);
25255 } else { 22878 } else {
25256 // Proceed under the assumption that this is a functional component 22879 // Proceed under the assumption that this is a functional component
25257 workInProgress.tag = FunctionalComponent$1; 22880 workInProgress.tag = FunctionalComponent;
25258 { 22881 {
25259 var Component = workInProgress.type; 22882 var Component = workInProgress.type;
25260 22883
25261 if (Component) { 22884 if (Component) {
25262 warning$23(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component'); 22885 warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component');
25263 } 22886 }
25264 if (workInProgress.ref !== null) { 22887 if (workInProgress.ref !== null) {
25265 var info = ''; 22888 var info = '';
25266 var ownerName = ReactDebugCurrentFiber$4.getCurrentFiberOwnerName(); 22889 var ownerName = ReactDebugCurrentFiber.getCurrentFiberOwnerName();
25267 if (ownerName) { 22890 if (ownerName) {
25268 info += '\n\nCheck the render method of `' + ownerName + '`.'; 22891 info += '\n\nCheck the render method of `' + ownerName + '`.';
25269 } 22892 }
@@ -25275,7 +22898,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25275 } 22898 }
25276 if (!warnedAboutStatelessRefs[warningKey]) { 22899 if (!warnedAboutStatelessRefs[warningKey]) {
25277 warnedAboutStatelessRefs[warningKey] = true; 22900 warnedAboutStatelessRefs[warningKey] = true;
25278 warning$23(false, 'Stateless function components cannot be given refs. ' + 'Attempts to access this ref will fail.%s%s', info, ReactDebugCurrentFiber$4.getCurrentFiberStackAddendum()); 22901 warning(false, 'Stateless function components cannot be given refs. ' + 'Attempts to access this ref will fail.%s%s', info, ReactDebugCurrentFiber.getCurrentFiberStackAddendum());
25279 } 22902 }
25280 } 22903 }
25281 } 22904 }
@@ -25285,46 +22908,44 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25285 } 22908 }
25286 } 22909 }
25287 22910
25288 function updateCoroutineComponent(current, workInProgress) { 22911 function updateCallComponent(current, workInProgress, renderExpirationTime) {
25289 var nextCoroutine = workInProgress.pendingProps; 22912 var nextCall = workInProgress.pendingProps;
25290 if (hasContextChanged$1()) { 22913 if (hasContextChanged()) {
25291 // Normally we can bail out on props equality but if context has changed 22914 // Normally we can bail out on props equality but if context has changed
25292 // we don't do the bailout and we have to reuse existing props instead. 22915 // we don't do the bailout and we have to reuse existing props instead.
25293 if (nextCoroutine === null) { 22916 if (nextCall === null) {
25294 nextCoroutine = current && current.memoizedProps; 22917 nextCall = current && current.memoizedProps;
25295 !(nextCoroutine !== null) ? invariant(false, 'We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue.') : void 0; 22918 !(nextCall !== null) ? invariant(false, 'We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue.') : void 0;
25296 } 22919 }
25297 } else if (nextCoroutine === null || workInProgress.memoizedProps === nextCoroutine) { 22920 } else if (nextCall === null || workInProgress.memoizedProps === nextCall) {
25298 nextCoroutine = workInProgress.memoizedProps; 22921 nextCall = workInProgress.memoizedProps;
25299 // TODO: When bailing out, we might need to return the stateNode instead 22922 // TODO: When bailing out, we might need to return the stateNode instead
25300 // of the child. To check it for work. 22923 // of the child. To check it for work.
25301 // return bailoutOnAlreadyFinishedWork(current, workInProgress); 22924 // return bailoutOnAlreadyFinishedWork(current, workInProgress);
25302 } 22925 }
25303 22926
25304 var nextChildren = nextCoroutine.children; 22927 var nextChildren = nextCall.children;
25305 var priorityLevel = workInProgress.pendingWorkPriority;
25306 22928
25307 // The following is a fork of reconcileChildrenAtPriority but using 22929 // The following is a fork of reconcileChildrenAtExpirationTime but using
25308 // stateNode to store the child. 22930 // stateNode to store the child.
25309 if (current === null) { 22931 if (current === null) {
25310 workInProgress.stateNode = mountChildFibersInPlace(workInProgress, workInProgress.stateNode, nextChildren, priorityLevel); 22932 workInProgress.stateNode = mountChildFibersInPlace(workInProgress, workInProgress.stateNode, nextChildren, renderExpirationTime);
25311 } else if (current.child === workInProgress.child) { 22933 } else if (current.child === workInProgress.child) {
25312 workInProgress.stateNode = reconcileChildFibers(workInProgress, workInProgress.stateNode, nextChildren, priorityLevel); 22934 workInProgress.stateNode = reconcileChildFibers(workInProgress, workInProgress.stateNode, nextChildren, renderExpirationTime);
25313 } else { 22935 } else {
25314 workInProgress.stateNode = reconcileChildFibersInPlace(workInProgress, workInProgress.stateNode, nextChildren, priorityLevel); 22936 workInProgress.stateNode = reconcileChildFibersInPlace(workInProgress, workInProgress.stateNode, nextChildren, renderExpirationTime);
25315 } 22937 }
25316 22938
25317 memoizeProps(workInProgress, nextCoroutine); 22939 memoizeProps(workInProgress, nextCall);
25318 // This doesn't take arbitrary time so we could synchronously just begin 22940 // This doesn't take arbitrary time so we could synchronously just begin
25319 // eagerly do the work of workInProgress.child as an optimization. 22941 // eagerly do the work of workInProgress.child as an optimization.
25320 return workInProgress.stateNode; 22942 return workInProgress.stateNode;
25321 } 22943 }
25322 22944
25323 function updatePortalComponent(current, workInProgress) { 22945 function updatePortalComponent(current, workInProgress, renderExpirationTime) {
25324 pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); 22946 pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
25325 var priorityLevel = workInProgress.pendingWorkPriority;
25326 var nextChildren = workInProgress.pendingProps; 22947 var nextChildren = workInProgress.pendingProps;
25327 if (hasContextChanged$1()) { 22948 if (hasContextChanged()) {
25328 // Normally we can bail out on props equality but if context has changed 22949 // Normally we can bail out on props equality but if context has changed
25329 // we don't do the bailout and we have to reuse existing props instead. 22950 // we don't do the bailout and we have to reuse existing props instead.
25330 if (nextChildren === null) { 22951 if (nextChildren === null) {
@@ -25341,7 +22962,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25341 // flow doesn't do during mount. This doesn't happen at the root because 22962 // flow doesn't do during mount. This doesn't happen at the root because
25342 // the root always starts with a "current" with a null child. 22963 // the root always starts with a "current" with a null child.
25343 // TODO: Consider unifying this with how the root works. 22964 // TODO: Consider unifying this with how the root works.
25344 workInProgress.child = reconcileChildFibersInPlace(workInProgress, workInProgress.child, nextChildren, priorityLevel); 22965 workInProgress.child = reconcileChildFibersInPlace(workInProgress, workInProgress.child, nextChildren, renderExpirationTime);
25345 memoizeProps(workInProgress, nextChildren); 22966 memoizeProps(workInProgress, nextChildren);
25346 } else { 22967 } else {
25347 reconcileChildren(current, workInProgress, nextChildren); 22968 reconcileChildren(current, workInProgress, nextChildren);
@@ -25370,9 +22991,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25370 */ 22991 */
25371 22992
25372 function bailoutOnAlreadyFinishedWork(current, workInProgress) { 22993 function bailoutOnAlreadyFinishedWork(current, workInProgress) {
25373 { 22994 cancelWorkTimer(workInProgress);
25374 cancelWorkTimer(workInProgress);
25375 }
25376 22995
25377 // TODO: We should ideally be able to bail out early if the children have no 22996 // TODO: We should ideally be able to bail out early if the children have no
25378 // more work to do. However, since we don't have a separation of this 22997 // more work to do. However, since we don't have a separation of this
@@ -25393,20 +23012,18 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25393 } 23012 }
25394 23013
25395 function bailoutOnLowPriority(current, workInProgress) { 23014 function bailoutOnLowPriority(current, workInProgress) {
25396 { 23015 cancelWorkTimer(workInProgress);
25397 cancelWorkTimer(workInProgress);
25398 }
25399 23016
25400 // TODO: Handle HostComponent tags here as well and call pushHostContext()? 23017 // TODO: Handle HostComponent tags here as well and call pushHostContext()?
25401 // See PR 8590 discussion for context 23018 // See PR 8590 discussion for context
25402 switch (workInProgress.tag) { 23019 switch (workInProgress.tag) {
25403 case HostRoot$7: 23020 case HostRoot:
25404 pushHostRootContext(workInProgress); 23021 pushHostRootContext(workInProgress);
25405 break; 23022 break;
25406 case ClassComponent$6: 23023 case ClassComponent:
25407 pushContextProvider$1(workInProgress); 23024 pushContextProvider(workInProgress);
25408 break; 23025 break;
25409 case HostPortal$4: 23026 case HostPortal:
25410 pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); 23027 pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
25411 break; 23028 break;
25412 } 23029 }
@@ -25423,57 +23040,53 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25423 function memoizeState(workInProgress, nextState) { 23040 function memoizeState(workInProgress, nextState) {
25424 workInProgress.memoizedState = nextState; 23041 workInProgress.memoizedState = nextState;
25425 // Don't reset the updateQueue, in case there are pending updates. Resetting 23042 // Don't reset the updateQueue, in case there are pending updates. Resetting
25426 // is handled by beginUpdateQueue. 23043 // is handled by processUpdateQueue.
25427 } 23044 }
25428 23045
25429 function beginWork(current, workInProgress, priorityLevel) { 23046 function beginWork(current, workInProgress, renderExpirationTime) {
25430 if (workInProgress.pendingWorkPriority === NoWork$3 || workInProgress.pendingWorkPriority > priorityLevel) { 23047 if (workInProgress.expirationTime === NoWork || workInProgress.expirationTime > renderExpirationTime) {
25431 return bailoutOnLowPriority(current, workInProgress); 23048 return bailoutOnLowPriority(current, workInProgress);
25432 } 23049 }
25433 23050
25434 {
25435 ReactDebugCurrentFiber$4.setCurrentFiber(workInProgress, null);
25436 }
25437
25438 switch (workInProgress.tag) { 23051 switch (workInProgress.tag) {
25439 case IndeterminateComponent$2: 23052 case IndeterminateComponent:
25440 return mountIndeterminateComponent(current, workInProgress, priorityLevel); 23053 return mountIndeterminateComponent(current, workInProgress, renderExpirationTime);
25441 case FunctionalComponent$1: 23054 case FunctionalComponent:
25442 return updateFunctionalComponent(current, workInProgress); 23055 return updateFunctionalComponent(current, workInProgress);
25443 case ClassComponent$6: 23056 case ClassComponent:
25444 return updateClassComponent(current, workInProgress, priorityLevel); 23057 return updateClassComponent(current, workInProgress, renderExpirationTime);
25445 case HostRoot$7: 23058 case HostRoot:
25446 return updateHostRoot(current, workInProgress, priorityLevel); 23059 return updateHostRoot(current, workInProgress, renderExpirationTime);
25447 case HostComponent$7: 23060 case HostComponent:
25448 return updateHostComponent(current, workInProgress, priorityLevel); 23061 return updateHostComponent(current, workInProgress, renderExpirationTime);
25449 case HostText$4: 23062 case HostText:
25450 return updateHostText(current, workInProgress); 23063 return updateHostText(current, workInProgress);
25451 case CoroutineHandlerPhase: 23064 case CallHandlerPhase:
25452 // This is a restart. Reset the tag to the initial phase. 23065 // This is a restart. Reset the tag to the initial phase.
25453 workInProgress.tag = CoroutineComponent$1; 23066 workInProgress.tag = CallComponent;
25454 // Intentionally fall through since this is now the same. 23067 // Intentionally fall through since this is now the same.
25455 case CoroutineComponent$1: 23068 case CallComponent:
25456 return updateCoroutineComponent(current, workInProgress); 23069 return updateCallComponent(current, workInProgress, renderExpirationTime);
25457 case YieldComponent$2: 23070 case ReturnComponent:
25458 // A yield component is just a placeholder, we can just run through the 23071 // A return component is just a placeholder, we can just run through the
25459 // next one immediately. 23072 // next one immediately.
25460 return null; 23073 return null;
25461 case HostPortal$4: 23074 case HostPortal:
25462 return updatePortalComponent(current, workInProgress); 23075 return updatePortalComponent(current, workInProgress, renderExpirationTime);
25463 case Fragment$2: 23076 case Fragment:
25464 return updateFragment(current, workInProgress); 23077 return updateFragment(current, workInProgress);
25465 default: 23078 default:
25466 invariant(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.'); 23079 invariant(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');
25467 } 23080 }
25468 } 23081 }
25469 23082
25470 function beginFailedWork(current, workInProgress, priorityLevel) { 23083 function beginFailedWork(current, workInProgress, renderExpirationTime) {
25471 // Push context providers here to avoid a push/pop context mismatch. 23084 // Push context providers here to avoid a push/pop context mismatch.
25472 switch (workInProgress.tag) { 23085 switch (workInProgress.tag) {
25473 case ClassComponent$6: 23086 case ClassComponent:
25474 pushContextProvider$1(workInProgress); 23087 pushContextProvider(workInProgress);
25475 break; 23088 break;
25476 case HostRoot$7: 23089 case HostRoot:
25477 pushHostRootContext(workInProgress); 23090 pushHostRootContext(workInProgress);
25478 break; 23091 break;
25479 default: 23092 default:
@@ -25481,7 +23094,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25481 } 23094 }
25482 23095
25483 // Add an error effect so we can handle the error during the commit phase 23096 // Add an error effect so we can handle the error during the commit phase
25484 workInProgress.effectTag |= Err$1; 23097 workInProgress.effectTag |= Err;
25485 23098
25486 // This is a weird case where we do "resume" work — work that failed on 23099 // This is a weird case where we do "resume" work — work that failed on
25487 // our first attempt. Because we no longer have a notion of "progressed 23100 // our first attempt. Because we no longer have a notion of "progressed
@@ -25494,7 +23107,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25494 workInProgress.child = current.child; 23107 workInProgress.child = current.child;
25495 } 23108 }
25496 23109
25497 if (workInProgress.pendingWorkPriority === NoWork$3 || workInProgress.pendingWorkPriority > priorityLevel) { 23110 if (workInProgress.expirationTime === NoWork || workInProgress.expirationTime > renderExpirationTime) {
25498 return bailoutOnLowPriority(current, workInProgress); 23111 return bailoutOnLowPriority(current, workInProgress);
25499 } 23112 }
25500 23113
@@ -25505,9 +23118,9 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25505 23118
25506 // Unmount the current children as if the component rendered null 23119 // Unmount the current children as if the component rendered null
25507 var nextChildren = null; 23120 var nextChildren = null;
25508 reconcileChildrenAtPriority(current, workInProgress, nextChildren, priorityLevel); 23121 reconcileChildrenAtExpirationTime(current, workInProgress, nextChildren, renderExpirationTime);
25509 23122
25510 if (workInProgress.tag === ClassComponent$6) { 23123 if (workInProgress.tag === ClassComponent) {
25511 var instance = workInProgress.stateNode; 23124 var instance = workInProgress.stateNode;
25512 workInProgress.memoizedProps = instance.props; 23125 workInProgress.memoizedProps = instance.props;
25513 workInProgress.memoizedState = instance.state; 23126 workInProgress.memoizedState = instance.state;
@@ -25522,43 +23135,14 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
25522 }; 23135 };
25523}; 23136};
25524 23137
25525var reconcileChildFibers$2 = ReactChildFiber.reconcileChildFibers;
25526
25527var popContextProvider$2 = ReactFiberContext.popContextProvider;
25528var popTopLevelContextObject$1 = ReactFiberContext.popTopLevelContextObject;
25529
25530
25531
25532
25533var IndeterminateComponent$3 = ReactTypeOfWork.IndeterminateComponent;
25534var FunctionalComponent$3 = ReactTypeOfWork.FunctionalComponent;
25535var ClassComponent$8 = ReactTypeOfWork.ClassComponent;
25536var HostRoot$8 = ReactTypeOfWork.HostRoot;
25537var HostComponent$8 = ReactTypeOfWork.HostComponent;
25538var HostText$6 = ReactTypeOfWork.HostText;
25539var HostPortal$6 = ReactTypeOfWork.HostPortal;
25540var CoroutineComponent$3 = ReactTypeOfWork.CoroutineComponent;
25541var CoroutineHandlerPhase$1 = ReactTypeOfWork.CoroutineHandlerPhase;
25542var YieldComponent$4 = ReactTypeOfWork.YieldComponent;
25543var Fragment$4 = ReactTypeOfWork.Fragment;
25544var Placement$4 = ReactTypeOfSideEffect.Placement;
25545var Ref$2 = ReactTypeOfSideEffect.Ref;
25546var Update$2 = ReactTypeOfSideEffect.Update;
25547var OffscreenPriority$2 = ReactPriorityLevel.OffscreenPriority;
25548
25549
25550{
25551 var ReactDebugCurrentFiber$5 = ReactDebugCurrentFiber_1;
25552}
25553
25554
25555
25556var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) { 23138var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
25557 var createInstance = config.createInstance, 23139 var createInstance = config.createInstance,
25558 createTextInstance = config.createTextInstance, 23140 createTextInstance = config.createTextInstance,
25559 appendInitialChild = config.appendInitialChild, 23141 appendInitialChild = config.appendInitialChild,
25560 finalizeInitialChildren = config.finalizeInitialChildren, 23142 finalizeInitialChildren = config.finalizeInitialChildren,
25561 prepareUpdate = config.prepareUpdate; 23143 prepareUpdate = config.prepareUpdate,
23144 mutation = config.mutation,
23145 persistence = config.persistence;
25562 var getRootHostContainer = hostContext.getRootHostContainer, 23146 var getRootHostContainer = hostContext.getRootHostContainer,
25563 popHostContext = hostContext.popHostContext, 23147 popHostContext = hostContext.popHostContext,
25564 getHostContext = hostContext.getHostContext, 23148 getHostContext = hostContext.getHostContext,
@@ -25571,23 +23155,23 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
25571 function markUpdate(workInProgress) { 23155 function markUpdate(workInProgress) {
25572 // Tag the fiber with an update effect. This turns a Placement into 23156 // Tag the fiber with an update effect. This turns a Placement into
25573 // an UpdateAndPlacement. 23157 // an UpdateAndPlacement.
25574 workInProgress.effectTag |= Update$2; 23158 workInProgress.effectTag |= Update;
25575 } 23159 }
25576 23160
25577 function markRef(workInProgress) { 23161 function markRef(workInProgress) {
25578 workInProgress.effectTag |= Ref$2; 23162 workInProgress.effectTag |= Ref;
25579 } 23163 }
25580 23164
25581 function appendAllYields(yields, workInProgress) { 23165 function appendAllReturns(returns, workInProgress) {
25582 var node = workInProgress.stateNode; 23166 var node = workInProgress.stateNode;
25583 if (node) { 23167 if (node) {
25584 node['return'] = workInProgress; 23168 node['return'] = workInProgress;
25585 } 23169 }
25586 while (node !== null) { 23170 while (node !== null) {
25587 if (node.tag === HostComponent$8 || node.tag === HostText$6 || node.tag === HostPortal$6) { 23171 if (node.tag === HostComponent || node.tag === HostText || node.tag === HostPortal) {
25588 invariant(false, 'A coroutine cannot have host component children.'); 23172 invariant(false, 'A call cannot have host component children.');
25589 } else if (node.tag === YieldComponent$4) { 23173 } else if (node.tag === ReturnComponent) {
25590 yields.push(node.type); 23174 returns.push(node.type);
25591 } else if (node.child !== null) { 23175 } else if (node.child !== null) {
25592 node.child['return'] = node; 23176 node.child['return'] = node;
25593 node = node.child; 23177 node = node.child;
@@ -25604,31 +23188,29 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
25604 } 23188 }
25605 } 23189 }
25606 23190
25607 function moveCoroutineToHandlerPhase(current, workInProgress) { 23191 function moveCallToHandlerPhase(current, workInProgress, renderExpirationTime) {
25608 var coroutine = workInProgress.memoizedProps; 23192 var call = workInProgress.memoizedProps;
25609 !coroutine ? invariant(false, 'Should be resolved by now. This error is likely caused by a bug in React. Please file an issue.') : void 0; 23193 !call ? invariant(false, 'Should be resolved by now. This error is likely caused by a bug in React. Please file an issue.') : void 0;
25610 23194
25611 // First step of the coroutine has completed. Now we need to do the second. 23195 // First step of the call has completed. Now we need to do the second.
25612 // TODO: It would be nice to have a multi stage coroutine represented by a 23196 // TODO: It would be nice to have a multi stage call represented by a
25613 // single component, or at least tail call optimize nested ones. Currently 23197 // single component, or at least tail call optimize nested ones. Currently
25614 // that requires additional fields that we don't want to add to the fiber. 23198 // that requires additional fields that we don't want to add to the fiber.
25615 // So this requires nested handlers. 23199 // So this requires nested handlers.
25616 // Note: This doesn't mutate the alternate node. I don't think it needs to 23200 // Note: This doesn't mutate the alternate node. I don't think it needs to
25617 // since this stage is reset for every pass. 23201 // since this stage is reset for every pass.
25618 workInProgress.tag = CoroutineHandlerPhase$1; 23202 workInProgress.tag = CallHandlerPhase;
25619 23203
25620 // Build up the yields. 23204 // Build up the returns.
25621 // TODO: Compare this to a generator or opaque helpers like Children. 23205 // TODO: Compare this to a generator or opaque helpers like Children.
25622 var yields = []; 23206 var returns = [];
25623 appendAllYields(yields, workInProgress); 23207 appendAllReturns(returns, workInProgress);
25624 var fn = coroutine.handler; 23208 var fn = call.handler;
25625 var props = coroutine.props; 23209 var props = call.props;
25626 var nextChildren = fn(props, yields); 23210 var nextChildren = fn(props, returns);
25627 23211
25628 var currentFirstChild = current !== null ? current.child : null; 23212 var currentFirstChild = current !== null ? current.child : null;
25629 // Inherit the priority of the returnFiber. 23213 workInProgress.child = reconcileChildFibers(workInProgress, currentFirstChild, nextChildren, renderExpirationTime);
25630 var priority = workInProgress.pendingWorkPriority;
25631 workInProgress.child = reconcileChildFibers$2(workInProgress, currentFirstChild, nextChildren, priority);
25632 return workInProgress.child; 23214 return workInProgress.child;
25633 } 23215 }
25634 23216
@@ -25637,13 +23219,14 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
25637 // children to find all the terminal nodes. 23219 // children to find all the terminal nodes.
25638 var node = workInProgress.child; 23220 var node = workInProgress.child;
25639 while (node !== null) { 23221 while (node !== null) {
25640 if (node.tag === HostComponent$8 || node.tag === HostText$6) { 23222 if (node.tag === HostComponent || node.tag === HostText) {
25641 appendInitialChild(parent, node.stateNode); 23223 appendInitialChild(parent, node.stateNode);
25642 } else if (node.tag === HostPortal$6) { 23224 } else if (node.tag === HostPortal) {
25643 // If we have a portal child, then we don't want to traverse 23225 // If we have a portal child, then we don't want to traverse
25644 // down its children. Instead, we'll get insertions from each child in 23226 // down its children. Instead, we'll get insertions from each child in
25645 // the portal directly. 23227 // the portal directly.
25646 } else if (node.child !== null) { 23228 } else if (node.child !== null) {
23229 node.child['return'] = node;
25647 node = node.child; 23230 node = node.child;
25648 continue; 23231 continue;
25649 } 23232 }
@@ -25656,37 +23239,176 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
25656 } 23239 }
25657 node = node['return']; 23240 node = node['return'];
25658 } 23241 }
23242 node.sibling['return'] = node['return'];
25659 node = node.sibling; 23243 node = node.sibling;
25660 } 23244 }
25661 } 23245 }
25662 23246
25663 function completeWork(current, workInProgress, renderPriority) { 23247 var updateHostContainer = void 0;
25664 { 23248 var updateHostComponent = void 0;
25665 ReactDebugCurrentFiber$5.setCurrentFiber(workInProgress, null); 23249 var updateHostText = void 0;
23250 if (mutation) {
23251 if (enableMutatingReconciler) {
23252 // Mutation mode
23253 updateHostContainer = function (workInProgress) {
23254 // Noop
23255 };
23256 updateHostComponent = function (current, workInProgress, updatePayload, type, oldProps, newProps, rootContainerInstance) {
23257 // TODO: Type this specific to this type of component.
23258 workInProgress.updateQueue = updatePayload;
23259 // If the update payload indicates that there is a change or if there
23260 // is a new ref we mark this as an update. All the work is done in commitWork.
23261 if (updatePayload) {
23262 markUpdate(workInProgress);
23263 }
23264 };
23265 updateHostText = function (current, workInProgress, oldText, newText) {
23266 // If the text differs, mark it as an update. All the work in done in commitWork.
23267 if (oldText !== newText) {
23268 markUpdate(workInProgress);
23269 }
23270 };
23271 } else {
23272 invariant(false, 'Mutating reconciler is disabled.');
23273 }
23274 } else if (persistence) {
23275 if (enablePersistentReconciler) {
23276 // Persistent host tree mode
23277 var cloneInstance = persistence.cloneInstance,
23278 createContainerChildSet = persistence.createContainerChildSet,
23279 appendChildToContainerChildSet = persistence.appendChildToContainerChildSet,
23280 finalizeContainerChildren = persistence.finalizeContainerChildren;
23281
23282 // An unfortunate fork of appendAllChildren because we have two different parent types.
23283
23284 var appendAllChildrenToContainer = function (containerChildSet, workInProgress) {
23285 // We only have the top Fiber that was created but we need recurse down its
23286 // children to find all the terminal nodes.
23287 var node = workInProgress.child;
23288 while (node !== null) {
23289 if (node.tag === HostComponent || node.tag === HostText) {
23290 appendChildToContainerChildSet(containerChildSet, node.stateNode);
23291 } else if (node.tag === HostPortal) {
23292 // If we have a portal child, then we don't want to traverse
23293 // down its children. Instead, we'll get insertions from each child in
23294 // the portal directly.
23295 } else if (node.child !== null) {
23296 node.child['return'] = node;
23297 node = node.child;
23298 continue;
23299 }
23300 if (node === workInProgress) {
23301 return;
23302 }
23303 while (node.sibling === null) {
23304 if (node['return'] === null || node['return'] === workInProgress) {
23305 return;
23306 }
23307 node = node['return'];
23308 }
23309 node.sibling['return'] = node['return'];
23310 node = node.sibling;
23311 }
23312 };
23313 updateHostContainer = function (workInProgress) {
23314 var portalOrRoot = workInProgress.stateNode;
23315 var childrenUnchanged = workInProgress.firstEffect === null;
23316 if (childrenUnchanged) {
23317 // No changes, just reuse the existing instance.
23318 } else {
23319 var container = portalOrRoot.containerInfo;
23320 var newChildSet = createContainerChildSet(container);
23321 if (finalizeContainerChildren(container, newChildSet)) {
23322 markUpdate(workInProgress);
23323 }
23324 portalOrRoot.pendingChildren = newChildSet;
23325 // If children might have changed, we have to add them all to the set.
23326 appendAllChildrenToContainer(newChildSet, workInProgress);
23327 // Schedule an update on the container to swap out the container.
23328 markUpdate(workInProgress);
23329 }
23330 };
23331 updateHostComponent = function (current, workInProgress, updatePayload, type, oldProps, newProps, rootContainerInstance) {
23332 // If there are no effects associated with this node, then none of our children had any updates.
23333 // This guarantees that we can reuse all of them.
23334 var childrenUnchanged = workInProgress.firstEffect === null;
23335 var currentInstance = current.stateNode;
23336 if (childrenUnchanged && updatePayload === null) {
23337 // No changes, just reuse the existing instance.
23338 // Note that this might release a previous clone.
23339 workInProgress.stateNode = currentInstance;
23340 } else {
23341 var recyclableInstance = workInProgress.stateNode;
23342 var newInstance = cloneInstance(currentInstance, updatePayload, type, oldProps, newProps, workInProgress, childrenUnchanged, recyclableInstance);
23343 if (finalizeInitialChildren(newInstance, type, newProps, rootContainerInstance)) {
23344 markUpdate(workInProgress);
23345 }
23346 workInProgress.stateNode = newInstance;
23347 if (childrenUnchanged) {
23348 // If there are no other effects in this tree, we need to flag this node as having one.
23349 // Even though we're not going to use it for anything.
23350 // Otherwise parents won't know that there are new children to propagate upwards.
23351 markUpdate(workInProgress);
23352 } else {
23353 // If children might have changed, we have to add them all to the set.
23354 appendAllChildren(newInstance, workInProgress);
23355 }
23356 }
23357 };
23358 updateHostText = function (current, workInProgress, oldText, newText) {
23359 if (oldText !== newText) {
23360 // If the text content differs, we'll create a new text instance for it.
23361 var rootContainerInstance = getRootHostContainer();
23362 var currentHostContext = getHostContext();
23363 workInProgress.stateNode = createTextInstance(newText, rootContainerInstance, currentHostContext, workInProgress);
23364 // We'll have to mark it as having an effect, even though we won't use the effect for anything.
23365 // This lets the parents know that at least one of their children has changed.
23366 markUpdate(workInProgress);
23367 }
23368 };
23369 } else {
23370 invariant(false, 'Persistent reconciler is disabled.');
23371 }
23372 } else {
23373 if (enableNoopReconciler) {
23374 // No host operations
23375 updateHostContainer = function (workInProgress) {
23376 // Noop
23377 };
23378 updateHostComponent = function (current, workInProgress, updatePayload, type, oldProps, newProps, rootContainerInstance) {
23379 // Noop
23380 };
23381 updateHostText = function (current, workInProgress, oldText, newText) {
23382 // Noop
23383 };
23384 } else {
23385 invariant(false, 'Noop reconciler is disabled.');
25666 } 23386 }
23387 }
25667 23388
23389 function completeWork(current, workInProgress, renderExpirationTime) {
25668 // Get the latest props. 23390 // Get the latest props.
25669 var newProps = workInProgress.pendingProps; 23391 var newProps = workInProgress.pendingProps;
25670 if (newProps === null) { 23392 if (newProps === null) {
25671 newProps = workInProgress.memoizedProps; 23393 newProps = workInProgress.memoizedProps;
25672 } else if (workInProgress.pendingWorkPriority !== OffscreenPriority$2 || renderPriority === OffscreenPriority$2) { 23394 } else if (workInProgress.expirationTime !== Never || renderExpirationTime === Never) {
25673 // Reset the pending props, unless this was a down-prioritization. 23395 // Reset the pending props, unless this was a down-prioritization.
25674 workInProgress.pendingProps = null; 23396 workInProgress.pendingProps = null;
25675 } 23397 }
25676 23398
25677 switch (workInProgress.tag) { 23399 switch (workInProgress.tag) {
25678 case FunctionalComponent$3: 23400 case FunctionalComponent:
25679 return null; 23401 return null;
25680 case ClassComponent$8: 23402 case ClassComponent:
25681 { 23403 {
25682 // We are leaving this subtree, so pop context if any. 23404 // We are leaving this subtree, so pop context if any.
25683 popContextProvider$2(workInProgress); 23405 popContextProvider(workInProgress);
25684 return null; 23406 return null;
25685 } 23407 }
25686 case HostRoot$8: 23408 case HostRoot:
25687 { 23409 {
25688 popHostContainer(workInProgress); 23410 popHostContainer(workInProgress);
25689 popTopLevelContextObject$1(workInProgress); 23411 popTopLevelContextObject(workInProgress);
25690 var fiberRoot = workInProgress.stateNode; 23412 var fiberRoot = workInProgress.stateNode;
25691 if (fiberRoot.pendingContext) { 23413 if (fiberRoot.pendingContext) {
25692 fiberRoot.context = fiberRoot.pendingContext; 23414 fiberRoot.context = fiberRoot.pendingContext;
@@ -25699,11 +23421,12 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
25699 popHydrationState(workInProgress); 23421 popHydrationState(workInProgress);
25700 // This resets the hacky state to fix isMounted before committing. 23422 // This resets the hacky state to fix isMounted before committing.
25701 // TODO: Delete this when we delete isMounted and findDOMNode. 23423 // TODO: Delete this when we delete isMounted and findDOMNode.
25702 workInProgress.effectTag &= ~Placement$4; 23424 workInProgress.effectTag &= ~Placement;
25703 } 23425 }
23426 updateHostContainer(workInProgress);
25704 return null; 23427 return null;
25705 } 23428 }
25706 case HostComponent$8: 23429 case HostComponent:
25707 { 23430 {
25708 popHostContext(workInProgress); 23431 popHostContext(workInProgress);
25709 var rootContainerInstance = getRootHostContainer(); 23432 var rootContainerInstance = getRootHostContainer();
@@ -25720,13 +23443,8 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
25720 var currentHostContext = getHostContext(); 23443 var currentHostContext = getHostContext();
25721 var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); 23444 var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext);
25722 23445
25723 // TODO: Type this specific to this type of component. 23446 updateHostComponent(current, workInProgress, updatePayload, type, oldProps, newProps, rootContainerInstance);
25724 workInProgress.updateQueue = updatePayload; 23447
25725 // If the update payload indicates that there is a change or if there
25726 // is a new ref we mark this as an update.
25727 if (updatePayload) {
25728 markUpdate(workInProgress);
25729 }
25730 if (current.ref !== workInProgress.ref) { 23448 if (current.ref !== workInProgress.ref) {
25731 markRef(workInProgress); 23449 markRef(workInProgress);
25732 } 23450 }
@@ -25744,7 +23462,7 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
25744 // bottom->up. Top->down is faster in IE11. 23462 // bottom->up. Top->down is faster in IE11.
25745 var wasHydrated = popHydrationState(workInProgress); 23463 var wasHydrated = popHydrationState(workInProgress);
25746 if (wasHydrated) { 23464 if (wasHydrated) {
25747 // TOOD: Move this and createInstance step into the beginPhase 23465 // TODO: Move this and createInstance step into the beginPhase
25748 // to consolidate. 23466 // to consolidate.
25749 if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, _currentHostContext)) { 23467 if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, _currentHostContext)) {
25750 // If changes to the hydrated node needs to be applied at the 23468 // If changes to the hydrated node needs to be applied at the
@@ -25772,16 +23490,14 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
25772 } 23490 }
25773 return null; 23491 return null;
25774 } 23492 }
25775 case HostText$6: 23493 case HostText:
25776 { 23494 {
25777 var newText = newProps; 23495 var newText = newProps;
25778 if (current && workInProgress.stateNode != null) { 23496 if (current && workInProgress.stateNode != null) {
25779 var oldText = current.memoizedProps; 23497 var oldText = current.memoizedProps;
25780 // If we have an alternate, that means this is an update and we need 23498 // If we have an alternate, that means this is an update and we need
25781 // to schedule a side-effect to do the updates. 23499 // to schedule a side-effect to do the updates.
25782 if (oldText !== newText) { 23500 updateHostText(current, workInProgress, oldText, newText);
25783 markUpdate(workInProgress);
25784 }
25785 } else { 23501 } else {
25786 if (typeof newText !== 'string') { 23502 if (typeof newText !== 'string') {
25787 !(workInProgress.stateNode !== null) ? invariant(false, 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.') : void 0; 23503 !(workInProgress.stateNode !== null) ? invariant(false, 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.') : void 0;
@@ -25801,24 +23517,23 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
25801 } 23517 }
25802 return null; 23518 return null;
25803 } 23519 }
25804 case CoroutineComponent$3: 23520 case CallComponent:
25805 return moveCoroutineToHandlerPhase(current, workInProgress); 23521 return moveCallToHandlerPhase(current, workInProgress, renderExpirationTime);
25806 case CoroutineHandlerPhase$1: 23522 case CallHandlerPhase:
25807 // Reset the tag to now be a first phase coroutine. 23523 // Reset the tag to now be a first phase call.
25808 workInProgress.tag = CoroutineComponent$3; 23524 workInProgress.tag = CallComponent;
25809 return null; 23525 return null;
25810 case YieldComponent$4: 23526 case ReturnComponent:
25811 // Does nothing. 23527 // Does nothing.
25812 return null; 23528 return null;
25813 case Fragment$4: 23529 case Fragment:
25814 return null; 23530 return null;
25815 case HostPortal$6: 23531 case HostPortal:
25816 // TODO: Only mark this as an update if we have any pending callbacks.
25817 markUpdate(workInProgress);
25818 popHostContainer(workInProgress); 23532 popHostContainer(workInProgress);
23533 updateHostContainer(workInProgress);
25819 return null; 23534 return null;
25820 // Error cases 23535 // Error cases
25821 case IndeterminateComponent$3: 23536 case IndeterminateComponent:
25822 invariant(false, 'An indeterminate component should have become determinate before completing. This error is likely caused by a bug in React. Please file an issue.'); 23537 invariant(false, 'An indeterminate component should have become determinate before completing. This error is likely caused by a bug in React. Please file an issue.');
25823 // eslint-disable-next-line no-fallthrough 23538 // eslint-disable-next-line no-fallthrough
25824 default: 23539 default:
@@ -25831,137 +23546,29 @@ var ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {
25831 }; 23546 };
25832}; 23547};
25833 23548
25834{ 23549var invokeGuardedCallback$2 = ReactErrorUtils.invokeGuardedCallback;
25835 var warning$26 = require$$0; 23550var hasCaughtError$1 = ReactErrorUtils.hasCaughtError;
25836} 23551var clearCaughtError$1 = ReactErrorUtils.clearCaughtError;
25837
25838var onCommitFiberRoot = null;
25839var onCommitFiberUnmount = null;
25840var hasLoggedError = false;
25841
25842function catchErrors(fn) {
25843 return function (arg) {
25844 try {
25845 return fn(arg);
25846 } catch (err) {
25847 if (true && !hasLoggedError) {
25848 hasLoggedError = true;
25849 warning$26(false, 'React DevTools encountered an error: %s', err);
25850 }
25851 }
25852 };
25853}
25854
25855function injectInternals$1(internals) {
25856 if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
25857 // No DevTools
25858 return false;
25859 }
25860 var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
25861 if (!hook.supportsFiber) {
25862 {
25863 warning$26(false, 'The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://fb.me/react-devtools');
25864 }
25865 // DevTools exists, even though it doesn't support Fiber.
25866 return true;
25867 }
25868 try {
25869 var rendererID = hook.inject(internals);
25870 // We have successfully injected, so now it is safe to set up hooks.
25871 onCommitFiberRoot = catchErrors(function (root) {
25872 return hook.onCommitFiberRoot(rendererID, root);
25873 });
25874 onCommitFiberUnmount = catchErrors(function (fiber) {
25875 return hook.onCommitFiberUnmount(rendererID, fiber);
25876 });
25877 } catch (err) {
25878 // Catch all errors because it is unsafe to throw during initialization.
25879 {
25880 warning$26(false, 'React DevTools encountered an error: %s.', err);
25881 }
25882 }
25883 // DevTools exists
25884 return true;
25885}
25886
25887function onCommitRoot$1(root) {
25888 if (typeof onCommitFiberRoot === 'function') {
25889 onCommitFiberRoot(root);
25890 }
25891}
25892
25893function onCommitUnmount$1(fiber) {
25894 if (typeof onCommitFiberUnmount === 'function') {
25895 onCommitFiberUnmount(fiber);
25896 }
25897}
25898
25899var injectInternals_1 = injectInternals$1;
25900var onCommitRoot_1 = onCommitRoot$1;
25901var onCommitUnmount_1 = onCommitUnmount$1;
25902
25903var ReactFiberDevToolsHook = {
25904 injectInternals: injectInternals_1,
25905 onCommitRoot: onCommitRoot_1,
25906 onCommitUnmount: onCommitUnmount_1
25907};
25908
25909var ClassComponent$9 = ReactTypeOfWork.ClassComponent;
25910var HostRoot$9 = ReactTypeOfWork.HostRoot;
25911var HostComponent$9 = ReactTypeOfWork.HostComponent;
25912var HostText$7 = ReactTypeOfWork.HostText;
25913var HostPortal$7 = ReactTypeOfWork.HostPortal;
25914var CoroutineComponent$4 = ReactTypeOfWork.CoroutineComponent;
25915
25916var commitCallbacks$1 = ReactFiberUpdateQueue.commitCallbacks;
25917
25918var onCommitUnmount = ReactFiberDevToolsHook.onCommitUnmount;
25919 23552
25920var invokeGuardedCallback$2 = ReactErrorUtils_1.invokeGuardedCallback;
25921var hasCaughtError$1 = ReactErrorUtils_1.hasCaughtError;
25922var clearCaughtError$1 = ReactErrorUtils_1.clearCaughtError;
25923
25924var Placement$5 = ReactTypeOfSideEffect.Placement;
25925var Update$3 = ReactTypeOfSideEffect.Update;
25926var Callback$1 = ReactTypeOfSideEffect.Callback;
25927var ContentReset$2 = ReactTypeOfSideEffect.ContentReset;
25928
25929
25930
25931{
25932 var _require5$1 = ReactDebugFiberPerf_1,
25933 startPhaseTimer$2 = _require5$1.startPhaseTimer,
25934 stopPhaseTimer$2 = _require5$1.stopPhaseTimer;
25935}
25936 23553
25937var ReactFiberCommitWork = function (config, captureError) { 23554var ReactFiberCommitWork = function (config, captureError) {
25938 var commitMount = config.commitMount, 23555 var getPublicInstance = config.getPublicInstance,
25939 commitUpdate = config.commitUpdate, 23556 mutation = config.mutation,
25940 resetTextContent = config.resetTextContent, 23557 persistence = config.persistence;
25941 commitTextUpdate = config.commitTextUpdate,
25942 appendChild = config.appendChild,
25943 appendChildToContainer = config.appendChildToContainer,
25944 insertBefore = config.insertBefore,
25945 insertInContainerBefore = config.insertInContainerBefore,
25946 removeChild = config.removeChild,
25947 removeChildFromContainer = config.removeChildFromContainer,
25948 getPublicInstance = config.getPublicInstance;
25949 23558
25950 23559
25951 { 23560 var callComponentWillUnmountWithTimer = function (current, instance) {
25952 var callComponentWillUnmountWithTimerInDev = function (current, instance) { 23561 startPhaseTimer(current, 'componentWillUnmount');
25953 startPhaseTimer$2(current, 'componentWillUnmount'); 23562 instance.props = current.memoizedProps;
25954 instance.props = current.memoizedProps; 23563 instance.state = current.memoizedState;
25955 instance.state = current.memoizedState; 23564 instance.componentWillUnmount();
25956 instance.componentWillUnmount(); 23565 stopPhaseTimer();
25957 stopPhaseTimer$2(); 23566 };
25958 };
25959 }
25960 23567
25961 // Capture errors so they don't interrupt unmounting. 23568 // Capture errors so they don't interrupt unmounting.
25962 function safelyCallComponentWillUnmount(current, instance) { 23569 function safelyCallComponentWillUnmount(current, instance) {
25963 { 23570 {
25964 invokeGuardedCallback$2(null, callComponentWillUnmountWithTimerInDev, null, current, instance); 23571 invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);
25965 if (hasCaughtError$1()) { 23572 if (hasCaughtError$1()) {
25966 var unmountError = clearCaughtError$1(); 23573 var unmountError = clearCaughtError$1();
25967 captureError(current, unmountError); 23574 captureError(current, unmountError);
@@ -25982,6 +23589,269 @@ var ReactFiberCommitWork = function (config, captureError) {
25982 } 23589 }
25983 } 23590 }
25984 23591
23592 function commitLifeCycles(current, finishedWork) {
23593 switch (finishedWork.tag) {
23594 case ClassComponent:
23595 {
23596 var instance = finishedWork.stateNode;
23597 if (finishedWork.effectTag & Update) {
23598 if (current === null) {
23599 startPhaseTimer(finishedWork, 'componentDidMount');
23600 instance.props = finishedWork.memoizedProps;
23601 instance.state = finishedWork.memoizedState;
23602 instance.componentDidMount();
23603 stopPhaseTimer();
23604 } else {
23605 var prevProps = current.memoizedProps;
23606 var prevState = current.memoizedState;
23607 startPhaseTimer(finishedWork, 'componentDidUpdate');
23608 instance.props = finishedWork.memoizedProps;
23609 instance.state = finishedWork.memoizedState;
23610 instance.componentDidUpdate(prevProps, prevState);
23611 stopPhaseTimer();
23612 }
23613 }
23614 var updateQueue = finishedWork.updateQueue;
23615 if (updateQueue !== null) {
23616 commitCallbacks(updateQueue, instance);
23617 }
23618 return;
23619 }
23620 case HostRoot:
23621 {
23622 var _updateQueue = finishedWork.updateQueue;
23623 if (_updateQueue !== null) {
23624 var _instance = finishedWork.child !== null ? finishedWork.child.stateNode : null;
23625 commitCallbacks(_updateQueue, _instance);
23626 }
23627 return;
23628 }
23629 case HostComponent:
23630 {
23631 var _instance2 = finishedWork.stateNode;
23632
23633 // Renderers may schedule work to be done after host components are mounted
23634 // (eg DOM renderer may schedule auto-focus for inputs and form controls).
23635 // These effects should only be committed when components are first mounted,
23636 // aka when there is no current/alternate.
23637 if (current === null && finishedWork.effectTag & Update) {
23638 var type = finishedWork.type;
23639 var props = finishedWork.memoizedProps;
23640 commitMount(_instance2, type, props, finishedWork);
23641 }
23642
23643 return;
23644 }
23645 case HostText:
23646 {
23647 // We have no life-cycles associated with text.
23648 return;
23649 }
23650 case HostPortal:
23651 {
23652 // We have no life-cycles associated with portals.
23653 return;
23654 }
23655 default:
23656 {
23657 invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
23658 }
23659 }
23660 }
23661
23662 function commitAttachRef(finishedWork) {
23663 var ref = finishedWork.ref;
23664 if (ref !== null) {
23665 var instance = finishedWork.stateNode;
23666 switch (finishedWork.tag) {
23667 case HostComponent:
23668 ref(getPublicInstance(instance));
23669 break;
23670 default:
23671 ref(instance);
23672 }
23673 }
23674 }
23675
23676 function commitDetachRef(current) {
23677 var currentRef = current.ref;
23678 if (currentRef !== null) {
23679 currentRef(null);
23680 }
23681 }
23682
23683 // User-originating errors (lifecycles and refs) should not interrupt
23684 // deletion, so don't let them throw. Host-originating errors should
23685 // interrupt deletion, so it's okay
23686 function commitUnmount(current) {
23687 if (typeof onCommitUnmount === 'function') {
23688 onCommitUnmount(current);
23689 }
23690
23691 switch (current.tag) {
23692 case ClassComponent:
23693 {
23694 safelyDetachRef(current);
23695 var instance = current.stateNode;
23696 if (typeof instance.componentWillUnmount === 'function') {
23697 safelyCallComponentWillUnmount(current, instance);
23698 }
23699 return;
23700 }
23701 case HostComponent:
23702 {
23703 safelyDetachRef(current);
23704 return;
23705 }
23706 case CallComponent:
23707 {
23708 commitNestedUnmounts(current.stateNode);
23709 return;
23710 }
23711 case HostPortal:
23712 {
23713 // TODO: this is recursive.
23714 // We are also not using this parent because
23715 // the portal will get pushed immediately.
23716 if (enableMutatingReconciler && mutation) {
23717 unmountHostComponents(current);
23718 } else if (enablePersistentReconciler && persistence) {
23719 emptyPortalContainer(current);
23720 }
23721 return;
23722 }
23723 }
23724 }
23725
23726 function commitNestedUnmounts(root) {
23727 // While we're inside a removed host node we don't want to call
23728 // removeChild on the inner nodes because they're removed by the top
23729 // call anyway. We also want to call componentWillUnmount on all
23730 // composites before this host node is removed from the tree. Therefore
23731 var node = root;
23732 while (true) {
23733 commitUnmount(node);
23734 // Visit children because they may contain more composite or host nodes.
23735 // Skip portals because commitUnmount() currently visits them recursively.
23736 if (node.child !== null && (
23737 // If we use mutation we drill down into portals using commitUnmount above.
23738 // If we don't use mutation we drill down into portals here instead.
23739 !mutation || node.tag !== HostPortal)) {
23740 node.child['return'] = node;
23741 node = node.child;
23742 continue;
23743 }
23744 if (node === root) {
23745 return;
23746 }
23747 while (node.sibling === null) {
23748 if (node['return'] === null || node['return'] === root) {
23749 return;
23750 }
23751 node = node['return'];
23752 }
23753 node.sibling['return'] = node['return'];
23754 node = node.sibling;
23755 }
23756 }
23757
23758 function detachFiber(current) {
23759 // Cut off the return pointers to disconnect it from the tree. Ideally, we
23760 // should clear the child pointer of the parent alternate to let this
23761 // get GC:ed but we don't know which for sure which parent is the current
23762 // one so we'll settle for GC:ing the subtree of this child. This child
23763 // itself will be GC:ed when the parent updates the next time.
23764 current['return'] = null;
23765 current.child = null;
23766 if (current.alternate) {
23767 current.alternate.child = null;
23768 current.alternate['return'] = null;
23769 }
23770 }
23771
23772 if (!mutation) {
23773 var commitContainer = void 0;
23774 if (persistence) {
23775 var replaceContainerChildren = persistence.replaceContainerChildren,
23776 createContainerChildSet = persistence.createContainerChildSet;
23777
23778 var emptyPortalContainer = function (current) {
23779 var portal = current.stateNode;
23780 var containerInfo = portal.containerInfo;
23781
23782 var emptyChildSet = createContainerChildSet(containerInfo);
23783 replaceContainerChildren(containerInfo, emptyChildSet);
23784 };
23785 commitContainer = function (finishedWork) {
23786 switch (finishedWork.tag) {
23787 case ClassComponent:
23788 {
23789 return;
23790 }
23791 case HostComponent:
23792 {
23793 return;
23794 }
23795 case HostText:
23796 {
23797 return;
23798 }
23799 case HostRoot:
23800 case HostPortal:
23801 {
23802 var portalOrRoot = finishedWork.stateNode;
23803 var containerInfo = portalOrRoot.containerInfo,
23804 _pendingChildren = portalOrRoot.pendingChildren;
23805
23806 replaceContainerChildren(containerInfo, _pendingChildren);
23807 return;
23808 }
23809 default:
23810 {
23811 invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
23812 }
23813 }
23814 };
23815 } else {
23816 commitContainer = function (finishedWork) {
23817 // Noop
23818 };
23819 }
23820 if (enablePersistentReconciler || enableNoopReconciler) {
23821 return {
23822 commitResetTextContent: function (finishedWork) {},
23823 commitPlacement: function (finishedWork) {},
23824 commitDeletion: function (current) {
23825 // Detach refs and call componentWillUnmount() on the whole subtree.
23826 commitNestedUnmounts(current);
23827 detachFiber(current);
23828 },
23829 commitWork: function (current, finishedWork) {
23830 commitContainer(finishedWork);
23831 },
23832
23833 commitLifeCycles: commitLifeCycles,
23834 commitAttachRef: commitAttachRef,
23835 commitDetachRef: commitDetachRef
23836 };
23837 } else if (persistence) {
23838 invariant(false, 'Persistent reconciler is disabled.');
23839 } else {
23840 invariant(false, 'Noop reconciler is disabled.');
23841 }
23842 }
23843 var commitMount = mutation.commitMount,
23844 commitUpdate = mutation.commitUpdate,
23845 resetTextContent = mutation.resetTextContent,
23846 commitTextUpdate = mutation.commitTextUpdate,
23847 appendChild = mutation.appendChild,
23848 appendChildToContainer = mutation.appendChildToContainer,
23849 insertBefore = mutation.insertBefore,
23850 insertInContainerBefore = mutation.insertInContainerBefore,
23851 removeChild = mutation.removeChild,
23852 removeChildFromContainer = mutation.removeChildFromContainer;
23853
23854
25985 function getHostParentFiber(fiber) { 23855 function getHostParentFiber(fiber) {
25986 var parent = fiber['return']; 23856 var parent = fiber['return'];
25987 while (parent !== null) { 23857 while (parent !== null) {
@@ -25994,7 +23864,7 @@ var ReactFiberCommitWork = function (config, captureError) {
25994 } 23864 }
25995 23865
25996 function isHostParent(fiber) { 23866 function isHostParent(fiber) {
25997 return fiber.tag === HostComponent$9 || fiber.tag === HostRoot$9 || fiber.tag === HostPortal$7; 23867 return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;
25998 } 23868 }
25999 23869
26000 function getHostSibling(fiber) { 23870 function getHostSibling(fiber) {
@@ -26014,16 +23884,16 @@ var ReactFiberCommitWork = function (config, captureError) {
26014 } 23884 }
26015 node.sibling['return'] = node['return']; 23885 node.sibling['return'] = node['return'];
26016 node = node.sibling; 23886 node = node.sibling;
26017 while (node.tag !== HostComponent$9 && node.tag !== HostText$7) { 23887 while (node.tag !== HostComponent && node.tag !== HostText) {
26018 // If it is not host node and, we might have a host node inside it. 23888 // If it is not host node and, we might have a host node inside it.
26019 // Try to search down until we find one. 23889 // Try to search down until we find one.
26020 if (node.effectTag & Placement$5) { 23890 if (node.effectTag & Placement) {
26021 // If we don't have a child, try the siblings instead. 23891 // If we don't have a child, try the siblings instead.
26022 continue siblings; 23892 continue siblings;
26023 } 23893 }
26024 // If we don't have a child, try the siblings instead. 23894 // If we don't have a child, try the siblings instead.
26025 // We also skip portals because they are not part of this host tree. 23895 // We also skip portals because they are not part of this host tree.
26026 if (node.child === null || node.tag === HostPortal$7) { 23896 if (node.child === null || node.tag === HostPortal) {
26027 continue siblings; 23897 continue siblings;
26028 } else { 23898 } else {
26029 node.child['return'] = node; 23899 node.child['return'] = node;
@@ -26031,7 +23901,7 @@ var ReactFiberCommitWork = function (config, captureError) {
26031 } 23901 }
26032 } 23902 }
26033 // Check if this host node is stable or about to be placed. 23903 // Check if this host node is stable or about to be placed.
26034 if (!(node.effectTag & Placement$5)) { 23904 if (!(node.effectTag & Placement)) {
26035 // Found it! 23905 // Found it!
26036 return node.stateNode; 23906 return node.stateNode;
26037 } 23907 }
@@ -26044,26 +23914,26 @@ var ReactFiberCommitWork = function (config, captureError) {
26044 var parent = void 0; 23914 var parent = void 0;
26045 var isContainer = void 0; 23915 var isContainer = void 0;
26046 switch (parentFiber.tag) { 23916 switch (parentFiber.tag) {
26047 case HostComponent$9: 23917 case HostComponent:
26048 parent = parentFiber.stateNode; 23918 parent = parentFiber.stateNode;
26049 isContainer = false; 23919 isContainer = false;
26050 break; 23920 break;
26051 case HostRoot$9: 23921 case HostRoot:
26052 parent = parentFiber.stateNode.containerInfo; 23922 parent = parentFiber.stateNode.containerInfo;
26053 isContainer = true; 23923 isContainer = true;
26054 break; 23924 break;
26055 case HostPortal$7: 23925 case HostPortal:
26056 parent = parentFiber.stateNode.containerInfo; 23926 parent = parentFiber.stateNode.containerInfo;
26057 isContainer = true; 23927 isContainer = true;
26058 break; 23928 break;
26059 default: 23929 default:
26060 invariant(false, 'Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.'); 23930 invariant(false, 'Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.');
26061 } 23931 }
26062 if (parentFiber.effectTag & ContentReset$2) { 23932 if (parentFiber.effectTag & ContentReset) {
26063 // Reset the text content of the parent before doing any insertions 23933 // Reset the text content of the parent before doing any insertions
26064 resetTextContent(parent); 23934 resetTextContent(parent);
26065 // Clear ContentReset from the effect tag 23935 // Clear ContentReset from the effect tag
26066 parentFiber.effectTag &= ~ContentReset$2; 23936 parentFiber.effectTag &= ~ContentReset;
26067 } 23937 }
26068 23938
26069 var before = getHostSibling(finishedWork); 23939 var before = getHostSibling(finishedWork);
@@ -26071,7 +23941,7 @@ var ReactFiberCommitWork = function (config, captureError) {
26071 // children to find all the terminal nodes. 23941 // children to find all the terminal nodes.
26072 var node = finishedWork; 23942 var node = finishedWork;
26073 while (true) { 23943 while (true) {
26074 if (node.tag === HostComponent$9 || node.tag === HostText$7) { 23944 if (node.tag === HostComponent || node.tag === HostText) {
26075 if (before) { 23945 if (before) {
26076 if (isContainer) { 23946 if (isContainer) {
26077 insertInContainerBefore(parent, node.stateNode, before); 23947 insertInContainerBefore(parent, node.stateNode, before);
@@ -26085,7 +23955,7 @@ var ReactFiberCommitWork = function (config, captureError) {
26085 appendChild(parent, node.stateNode); 23955 appendChild(parent, node.stateNode);
26086 } 23956 }
26087 } 23957 }
26088 } else if (node.tag === HostPortal$7) { 23958 } else if (node.tag === HostPortal) {
26089 // If the insertion itself is a portal, then we don't want to traverse 23959 // If the insertion itself is a portal, then we don't want to traverse
26090 // down its children. Instead, we'll get insertions from each child in 23960 // down its children. Instead, we'll get insertions from each child in
26091 // the portal directly. 23961 // the portal directly.
@@ -26108,35 +23978,6 @@ var ReactFiberCommitWork = function (config, captureError) {
26108 } 23978 }
26109 } 23979 }
26110 23980
26111 function commitNestedUnmounts(root) {
26112 // While we're inside a removed host node we don't want to call
26113 // removeChild on the inner nodes because they're removed by the top
26114 // call anyway. We also want to call componentWillUnmount on all
26115 // composites before this host node is removed from the tree. Therefore
26116 var node = root;
26117 while (true) {
26118 commitUnmount(node);
26119 // Visit children because they may contain more composite or host nodes.
26120 // Skip portals because commitUnmount() currently visits them recursively.
26121 if (node.child !== null && node.tag !== HostPortal$7) {
26122 node.child['return'] = node;
26123 node = node.child;
26124 continue;
26125 }
26126 if (node === root) {
26127 return;
26128 }
26129 while (node.sibling === null) {
26130 if (node['return'] === null || node['return'] === root) {
26131 return;
26132 }
26133 node = node['return'];
26134 }
26135 node.sibling['return'] = node['return'];
26136 node = node.sibling;
26137 }
26138 }
26139
26140 function unmountHostComponents(current) { 23981 function unmountHostComponents(current) {
26141 // We only have the top Fiber that was inserted but we need recurse down its 23982 // We only have the top Fiber that was inserted but we need recurse down its
26142 var node = current; 23983 var node = current;
@@ -26153,15 +23994,15 @@ var ReactFiberCommitWork = function (config, captureError) {
26153 findParent: while (true) { 23994 findParent: while (true) {
26154 !(parent !== null) ? invariant(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.') : void 0; 23995 !(parent !== null) ? invariant(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.') : void 0;
26155 switch (parent.tag) { 23996 switch (parent.tag) {
26156 case HostComponent$9: 23997 case HostComponent:
26157 currentParent = parent.stateNode; 23998 currentParent = parent.stateNode;
26158 currentParentIsContainer = false; 23999 currentParentIsContainer = false;
26159 break findParent; 24000 break findParent;
26160 case HostRoot$9: 24001 case HostRoot:
26161 currentParent = parent.stateNode.containerInfo; 24002 currentParent = parent.stateNode.containerInfo;
26162 currentParentIsContainer = true; 24003 currentParentIsContainer = true;
26163 break findParent; 24004 break findParent;
26164 case HostPortal$7: 24005 case HostPortal:
26165 currentParent = parent.stateNode.containerInfo; 24006 currentParent = parent.stateNode.containerInfo;
26166 currentParentIsContainer = true; 24007 currentParentIsContainer = true;
26167 break findParent; 24008 break findParent;
@@ -26171,7 +24012,7 @@ var ReactFiberCommitWork = function (config, captureError) {
26171 currentParentIsValid = true; 24012 currentParentIsValid = true;
26172 } 24013 }
26173 24014
26174 if (node.tag === HostComponent$9 || node.tag === HostText$7) { 24015 if (node.tag === HostComponent || node.tag === HostText) {
26175 commitNestedUnmounts(node); 24016 commitNestedUnmounts(node);
26176 // After all the children have unmounted, it is now safe to remove the 24017 // After all the children have unmounted, it is now safe to remove the
26177 // node from the tree. 24018 // node from the tree.
@@ -26181,7 +24022,7 @@ var ReactFiberCommitWork = function (config, captureError) {
26181 removeChild(currentParent, node.stateNode); 24022 removeChild(currentParent, node.stateNode);
26182 } 24023 }
26183 // Don't visit children because we already visited them. 24024 // Don't visit children because we already visited them.
26184 } else if (node.tag === HostPortal$7) { 24025 } else if (node.tag === HostPortal) {
26185 // When we go into a portal, it becomes the parent to remove from. 24026 // When we go into a portal, it becomes the parent to remove from.
26186 // We will reassign it back when we pop the portal on the way up. 24027 // We will reassign it back when we pop the portal on the way up.
26187 currentParent = node.stateNode.containerInfo; 24028 currentParent = node.stateNode.containerInfo;
@@ -26208,7 +24049,7 @@ var ReactFiberCommitWork = function (config, captureError) {
26208 return; 24049 return;
26209 } 24050 }
26210 node = node['return']; 24051 node = node['return'];
26211 if (node.tag === HostPortal$7) { 24052 if (node.tag === HostPortal) {
26212 // When we go out of the portal, we need to restore the parent. 24053 // When we go out of the portal, we need to restore the parent.
26213 // Since we don't keep a stack of them, we will search for it. 24054 // Since we don't keep a stack of them, we will search for it.
26214 currentParentIsValid = false; 24055 currentParentIsValid = false;
@@ -26223,66 +24064,16 @@ var ReactFiberCommitWork = function (config, captureError) {
26223 // Recursively delete all host nodes from the parent. 24064 // Recursively delete all host nodes from the parent.
26224 // Detach refs and call componentWillUnmount() on the whole subtree. 24065 // Detach refs and call componentWillUnmount() on the whole subtree.
26225 unmountHostComponents(current); 24066 unmountHostComponents(current);
26226 24067 detachFiber(current);
26227 // Cut off the return pointers to disconnect it from the tree. Ideally, we
26228 // should clear the child pointer of the parent alternate to let this
26229 // get GC:ed but we don't know which for sure which parent is the current
26230 // one so we'll settle for GC:ing the subtree of this child. This child
26231 // itself will be GC:ed when the parent updates the next time.
26232 current['return'] = null;
26233 current.child = null;
26234 if (current.alternate) {
26235 current.alternate.child = null;
26236 current.alternate['return'] = null;
26237 }
26238 }
26239
26240 // User-originating errors (lifecycles and refs) should not interrupt
26241 // deletion, so don't let them throw. Host-originating errors should
26242 // interrupt deletion, so it's okay
26243 function commitUnmount(current) {
26244 if (typeof onCommitUnmount === 'function') {
26245 onCommitUnmount(current);
26246 }
26247
26248 switch (current.tag) {
26249 case ClassComponent$9:
26250 {
26251 safelyDetachRef(current);
26252 var instance = current.stateNode;
26253 if (typeof instance.componentWillUnmount === 'function') {
26254 safelyCallComponentWillUnmount(current, instance);
26255 }
26256 return;
26257 }
26258 case HostComponent$9:
26259 {
26260 safelyDetachRef(current);
26261 return;
26262 }
26263 case CoroutineComponent$4:
26264 {
26265 commitNestedUnmounts(current.stateNode);
26266 return;
26267 }
26268 case HostPortal$7:
26269 {
26270 // TODO: this is recursive.
26271 // We are also not using this parent because
26272 // the portal will get pushed immediately.
26273 unmountHostComponents(current);
26274 return;
26275 }
26276 }
26277 } 24068 }
26278 24069
26279 function commitWork(current, finishedWork) { 24070 function commitWork(current, finishedWork) {
26280 switch (finishedWork.tag) { 24071 switch (finishedWork.tag) {
26281 case ClassComponent$9: 24072 case ClassComponent:
26282 { 24073 {
26283 return; 24074 return;
26284 } 24075 }
26285 case HostComponent$9: 24076 case HostComponent:
26286 { 24077 {
26287 var instance = finishedWork.stateNode; 24078 var instance = finishedWork.stateNode;
26288 if (instance != null) { 24079 if (instance != null) {
@@ -26302,7 +24093,7 @@ var ReactFiberCommitWork = function (config, captureError) {
26302 } 24093 }
26303 return; 24094 return;
26304 } 24095 }
26305 case HostText$7: 24096 case HostText:
26306 { 24097 {
26307 !(finishedWork.stateNode !== null) ? invariant(false, 'This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.') : void 0; 24098 !(finishedWork.stateNode !== null) ? invariant(false, 'This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.') : void 0;
26308 var textInstance = finishedWork.stateNode; 24099 var textInstance = finishedWork.stateNode;
@@ -26314,89 +24105,8 @@ var ReactFiberCommitWork = function (config, captureError) {
26314 commitTextUpdate(textInstance, oldText, newText); 24105 commitTextUpdate(textInstance, oldText, newText);
26315 return; 24106 return;
26316 } 24107 }
26317 case HostRoot$9: 24108 case HostRoot:
26318 {
26319 return;
26320 }
26321 case HostPortal$7:
26322 {
26323 return;
26324 }
26325 default:
26326 {
26327 invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
26328 }
26329 }
26330 }
26331
26332 function commitLifeCycles(current, finishedWork) {
26333 switch (finishedWork.tag) {
26334 case ClassComponent$9:
26335 {
26336 var instance = finishedWork.stateNode;
26337 if (finishedWork.effectTag & Update$3) {
26338 if (current === null) {
26339 {
26340 startPhaseTimer$2(finishedWork, 'componentDidMount');
26341 }
26342 instance.props = finishedWork.memoizedProps;
26343 instance.state = finishedWork.memoizedState;
26344 instance.componentDidMount();
26345 {
26346 stopPhaseTimer$2();
26347 }
26348 } else {
26349 var prevProps = current.memoizedProps;
26350 var prevState = current.memoizedState;
26351 {
26352 startPhaseTimer$2(finishedWork, 'componentDidUpdate');
26353 }
26354 instance.props = finishedWork.memoizedProps;
26355 instance.state = finishedWork.memoizedState;
26356 instance.componentDidUpdate(prevProps, prevState);
26357 {
26358 stopPhaseTimer$2();
26359 }
26360 }
26361 }
26362 if (finishedWork.effectTag & Callback$1 && finishedWork.updateQueue !== null) {
26363 commitCallbacks$1(finishedWork, finishedWork.updateQueue, instance);
26364 }
26365 return;
26366 }
26367 case HostRoot$9:
26368 {
26369 var updateQueue = finishedWork.updateQueue;
26370 if (updateQueue !== null) {
26371 var _instance = finishedWork.child && finishedWork.child.stateNode;
26372 commitCallbacks$1(finishedWork, updateQueue, _instance);
26373 }
26374 return;
26375 }
26376 case HostComponent$9:
26377 {
26378 var _instance2 = finishedWork.stateNode;
26379
26380 // Renderers may schedule work to be done after host components are mounted
26381 // (eg DOM renderer may schedule auto-focus for inputs and form controls).
26382 // These effects should only be committed when components are first mounted,
26383 // aka when there is no current/alternate.
26384 if (current === null && finishedWork.effectTag & Update$3) {
26385 var type = finishedWork.type;
26386 var props = finishedWork.memoizedProps;
26387 commitMount(_instance2, type, props, finishedWork);
26388 }
26389
26390 return;
26391 }
26392 case HostText$7:
26393 {
26394 // We have no life-cycles associated with text.
26395 return;
26396 }
26397 case HostPortal$7:
26398 { 24109 {
26399 // We have no life-cycles associated with portals.
26400 return; 24110 return;
26401 } 24111 }
26402 default: 24112 default:
@@ -26406,43 +24116,25 @@ var ReactFiberCommitWork = function (config, captureError) {
26406 } 24116 }
26407 } 24117 }
26408 24118
26409 function commitAttachRef(finishedWork) { 24119 function commitResetTextContent(current) {
26410 var ref = finishedWork.ref; 24120 resetTextContent(current.stateNode);
26411 if (ref !== null) {
26412 var instance = finishedWork.stateNode;
26413 switch (finishedWork.tag) {
26414 case HostComponent$9:
26415 ref(getPublicInstance(instance));
26416 break;
26417 default:
26418 ref(instance);
26419 }
26420 }
26421 } 24121 }
26422 24122
26423 function commitDetachRef(current) { 24123 if (enableMutatingReconciler) {
26424 var currentRef = current.ref; 24124 return {
26425 if (currentRef !== null) { 24125 commitResetTextContent: commitResetTextContent,
26426 currentRef(null); 24126 commitPlacement: commitPlacement,
26427 } 24127 commitDeletion: commitDeletion,
24128 commitWork: commitWork,
24129 commitLifeCycles: commitLifeCycles,
24130 commitAttachRef: commitAttachRef,
24131 commitDetachRef: commitDetachRef
24132 };
24133 } else {
24134 invariant(false, 'Mutating reconciler is disabled.');
26428 } 24135 }
26429
26430 return {
26431 commitPlacement: commitPlacement,
26432 commitDeletion: commitDeletion,
26433 commitWork: commitWork,
26434 commitLifeCycles: commitLifeCycles,
26435 commitAttachRef: commitAttachRef,
26436 commitDetachRef: commitDetachRef
26437 };
26438}; 24136};
26439 24137
26440var createCursor$2 = ReactFiberStack.createCursor;
26441var pop$2 = ReactFiberStack.pop;
26442var push$2 = ReactFiberStack.push;
26443
26444
26445
26446var NO_CONTEXT = {}; 24138var NO_CONTEXT = {};
26447 24139
26448var ReactFiberHostContext = function (config) { 24140var ReactFiberHostContext = function (config) {
@@ -26450,9 +24142,9 @@ var ReactFiberHostContext = function (config) {
26450 getRootHostContext = config.getRootHostContext; 24142 getRootHostContext = config.getRootHostContext;
26451 24143
26452 24144
26453 var contextStackCursor = createCursor$2(NO_CONTEXT); 24145 var contextStackCursor = createCursor(NO_CONTEXT);
26454 var contextFiberStackCursor = createCursor$2(NO_CONTEXT); 24146 var contextFiberStackCursor = createCursor(NO_CONTEXT);
26455 var rootInstanceStackCursor = createCursor$2(NO_CONTEXT); 24147 var rootInstanceStackCursor = createCursor(NO_CONTEXT);
26456 24148
26457 function requiredContext(c) { 24149 function requiredContext(c) {
26458 !(c !== NO_CONTEXT) ? invariant(false, 'Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.') : void 0; 24150 !(c !== NO_CONTEXT) ? invariant(false, 'Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.') : void 0;
@@ -26467,20 +24159,20 @@ var ReactFiberHostContext = function (config) {
26467 function pushHostContainer(fiber, nextRootInstance) { 24159 function pushHostContainer(fiber, nextRootInstance) {
26468 // Push current root instance onto the stack; 24160 // Push current root instance onto the stack;
26469 // This allows us to reset root when portals are popped. 24161 // This allows us to reset root when portals are popped.
26470 push$2(rootInstanceStackCursor, nextRootInstance, fiber); 24162 push(rootInstanceStackCursor, nextRootInstance, fiber);
26471 24163
26472 var nextRootContext = getRootHostContext(nextRootInstance); 24164 var nextRootContext = getRootHostContext(nextRootInstance);
26473 24165
26474 // Track the context and the Fiber that provided it. 24166 // Track the context and the Fiber that provided it.
26475 // This enables us to pop only Fibers that provide unique contexts. 24167 // This enables us to pop only Fibers that provide unique contexts.
26476 push$2(contextFiberStackCursor, fiber, fiber); 24168 push(contextFiberStackCursor, fiber, fiber);
26477 push$2(contextStackCursor, nextRootContext, fiber); 24169 push(contextStackCursor, nextRootContext, fiber);
26478 } 24170 }
26479 24171
26480 function popHostContainer(fiber) { 24172 function popHostContainer(fiber) {
26481 pop$2(contextStackCursor, fiber); 24173 pop(contextStackCursor, fiber);
26482 pop$2(contextFiberStackCursor, fiber); 24174 pop(contextFiberStackCursor, fiber);
26483 pop$2(rootInstanceStackCursor, fiber); 24175 pop(rootInstanceStackCursor, fiber);
26484 } 24176 }
26485 24177
26486 function getHostContext() { 24178 function getHostContext() {
@@ -26500,8 +24192,8 @@ var ReactFiberHostContext = function (config) {
26500 24192
26501 // Track the context and the Fiber that provided it. 24193 // Track the context and the Fiber that provided it.
26502 // This enables us to pop only Fibers that provide unique contexts. 24194 // This enables us to pop only Fibers that provide unique contexts.
26503 push$2(contextFiberStackCursor, fiber, fiber); 24195 push(contextFiberStackCursor, fiber, fiber);
26504 push$2(contextStackCursor, nextContext, fiber); 24196 push(contextStackCursor, nextContext, fiber);
26505 } 24197 }
26506 24198
26507 function popHostContext(fiber) { 24199 function popHostContext(fiber) {
@@ -26511,8 +24203,8 @@ var ReactFiberHostContext = function (config) {
26511 return; 24203 return;
26512 } 24204 }
26513 24205
26514 pop$2(contextStackCursor, fiber); 24206 pop(contextStackCursor, fiber);
26515 pop$2(contextFiberStackCursor, fiber); 24207 pop(contextFiberStackCursor, fiber);
26516 } 24208 }
26517 24209
26518 function resetHostContainer() { 24210 function resetHostContainer() {
@@ -26531,30 +24223,13 @@ var ReactFiberHostContext = function (config) {
26531 }; 24223 };
26532}; 24224};
26533 24225
26534var HostComponent$10 = ReactTypeOfWork.HostComponent;
26535var HostText$8 = ReactTypeOfWork.HostText;
26536var HostRoot$10 = ReactTypeOfWork.HostRoot;
26537
26538var Deletion$2 = ReactTypeOfSideEffect.Deletion;
26539var Placement$6 = ReactTypeOfSideEffect.Placement;
26540
26541var createFiberFromHostInstanceForDeletion$1 = ReactFiber.createFiberFromHostInstanceForDeletion;
26542
26543var ReactFiberHydrationContext = function (config) { 24226var ReactFiberHydrationContext = function (config) {
26544 var shouldSetTextContent = config.shouldSetTextContent, 24227 var shouldSetTextContent = config.shouldSetTextContent,
26545 canHydrateInstance = config.canHydrateInstance, 24228 hydration = config.hydration;
26546 canHydrateTextInstance = config.canHydrateTextInstance,
26547 getNextHydratableSibling = config.getNextHydratableSibling,
26548 getFirstHydratableChild = config.getFirstHydratableChild,
26549 hydrateInstance = config.hydrateInstance,
26550 hydrateTextInstance = config.hydrateTextInstance,
26551 didNotHydrateInstance = config.didNotHydrateInstance,
26552 didNotFindHydratableInstance = config.didNotFindHydratableInstance,
26553 didNotFindHydratableTextInstance = config.didNotFindHydratableTextInstance;
26554 24229
26555 // If this doesn't have hydration mode. 24230 // If this doesn't have hydration mode.
26556 24231
26557 if (!(canHydrateInstance && canHydrateTextInstance && getNextHydratableSibling && getFirstHydratableChild && hydrateInstance && hydrateTextInstance && didNotHydrateInstance && didNotFindHydratableInstance && didNotFindHydratableTextInstance)) { 24232 if (!hydration) {
26558 return { 24233 return {
26559 enterHydrationState: function () { 24234 enterHydrationState: function () {
26560 return false; 24235 return false;
@@ -26573,8 +24248,24 @@ var ReactFiberHydrationContext = function (config) {
26573 }; 24248 };
26574 } 24249 }
26575 24250
24251 var canHydrateInstance = hydration.canHydrateInstance,
24252 canHydrateTextInstance = hydration.canHydrateTextInstance,
24253 getNextHydratableSibling = hydration.getNextHydratableSibling,
24254 getFirstHydratableChild = hydration.getFirstHydratableChild,
24255 hydrateInstance = hydration.hydrateInstance,
24256 hydrateTextInstance = hydration.hydrateTextInstance,
24257 didNotMatchHydratedContainerTextInstance = hydration.didNotMatchHydratedContainerTextInstance,
24258 didNotMatchHydratedTextInstance = hydration.didNotMatchHydratedTextInstance,
24259 didNotHydrateContainerInstance = hydration.didNotHydrateContainerInstance,
24260 didNotHydrateInstance = hydration.didNotHydrateInstance,
24261 didNotFindHydratableContainerInstance = hydration.didNotFindHydratableContainerInstance,
24262 didNotFindHydratableContainerTextInstance = hydration.didNotFindHydratableContainerTextInstance,
24263 didNotFindHydratableInstance = hydration.didNotFindHydratableInstance,
24264 didNotFindHydratableTextInstance = hydration.didNotFindHydratableTextInstance;
24265
26576 // The deepest Fiber on the stack involved in a hydration context. 24266 // The deepest Fiber on the stack involved in a hydration context.
26577 // This may have been an insertion or a hydration. 24267 // This may have been an insertion or a hydration.
24268
26578 var hydrationParentFiber = null; 24269 var hydrationParentFiber = null;
26579 var nextHydratableInstance = null; 24270 var nextHydratableInstance = null;
26580 var isHydrating = false; 24271 var isHydrating = false;
@@ -26590,19 +24281,19 @@ var ReactFiberHydrationContext = function (config) {
26590 function deleteHydratableInstance(returnFiber, instance) { 24281 function deleteHydratableInstance(returnFiber, instance) {
26591 { 24282 {
26592 switch (returnFiber.tag) { 24283 switch (returnFiber.tag) {
26593 case HostRoot$10: 24284 case HostRoot:
26594 didNotHydrateInstance(returnFiber.stateNode.containerInfo, instance); 24285 didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);
26595 break; 24286 break;
26596 case HostComponent$10: 24287 case HostComponent:
26597 didNotHydrateInstance(returnFiber.stateNode, instance); 24288 didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);
26598 break; 24289 break;
26599 } 24290 }
26600 } 24291 }
26601 24292
26602 var childToDelete = createFiberFromHostInstanceForDeletion$1(); 24293 var childToDelete = createFiberFromHostInstanceForDeletion();
26603 childToDelete.stateNode = instance; 24294 childToDelete.stateNode = instance;
26604 childToDelete['return'] = returnFiber; 24295 childToDelete['return'] = returnFiber;
26605 childToDelete.effectTag = Deletion$2; 24296 childToDelete.effectTag = Deletion;
26606 24297
26607 // This might seem like it belongs on progressedFirstDeletion. However, 24298 // This might seem like it belongs on progressedFirstDeletion. However,
26608 // these children are not part of the reconciliation list of children. 24299 // these children are not part of the reconciliation list of children.
@@ -26618,49 +24309,71 @@ var ReactFiberHydrationContext = function (config) {
26618 } 24309 }
26619 24310
26620 function insertNonHydratedInstance(returnFiber, fiber) { 24311 function insertNonHydratedInstance(returnFiber, fiber) {
26621 fiber.effectTag |= Placement$6; 24312 fiber.effectTag |= Placement;
26622 { 24313 {
26623 var parentInstance;
26624 switch (returnFiber.tag) { 24314 switch (returnFiber.tag) {
26625 // TODO: Currently we don't warn for insertions into the root because 24315 case HostRoot:
26626 // we always insert into the root in the non-hydrating case. We just 24316 {
26627 // delete the existing content. Reenable this once we have a better 24317 var parentContainer = returnFiber.stateNode.containerInfo;
26628 // strategy for determining if we're hydrating or not. 24318 switch (fiber.tag) {
26629 // case HostRoot: 24319 case HostComponent:
26630 // parentInstance = returnFiber.stateNode.containerInfo; 24320 var type = fiber.type;
26631 // break; 24321 var props = fiber.pendingProps;
26632 case HostComponent$10: 24322 didNotFindHydratableContainerInstance(parentContainer, type, props);
26633 parentInstance = returnFiber.stateNode; 24323 break;
26634 break; 24324 case HostText:
24325 var text = fiber.pendingProps;
24326 didNotFindHydratableContainerTextInstance(parentContainer, text);
24327 break;
24328 }
24329 break;
24330 }
24331 case HostComponent:
24332 {
24333 var parentType = returnFiber.type;
24334 var parentProps = returnFiber.memoizedProps;
24335 var parentInstance = returnFiber.stateNode;
24336 switch (fiber.tag) {
24337 case HostComponent:
24338 var _type = fiber.type;
24339 var _props = fiber.pendingProps;
24340 didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props);
24341 break;
24342 case HostText:
24343 var _text = fiber.pendingProps;
24344 didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);
24345 break;
24346 }
24347 break;
24348 }
26635 default: 24349 default:
26636 return; 24350 return;
26637 } 24351 }
26638 switch (fiber.tag) {
26639 case HostComponent$10:
26640 var type = fiber.type;
26641 var props = fiber.pendingProps;
26642 didNotFindHydratableInstance(parentInstance, type, props);
26643 break;
26644 case HostText$8:
26645 var text = fiber.pendingProps;
26646 didNotFindHydratableTextInstance(parentInstance, text);
26647 break;
26648 }
26649 } 24352 }
26650 } 24353 }
26651 24354
26652 function canHydrate(fiber, nextInstance) { 24355 function tryHydrate(fiber, nextInstance) {
26653 switch (fiber.tag) { 24356 switch (fiber.tag) {
26654 case HostComponent$10: 24357 case HostComponent:
26655 { 24358 {
26656 var type = fiber.type; 24359 var type = fiber.type;
26657 var props = fiber.pendingProps; 24360 var props = fiber.pendingProps;
26658 return canHydrateInstance(nextInstance, type, props); 24361 var instance = canHydrateInstance(nextInstance, type, props);
24362 if (instance !== null) {
24363 fiber.stateNode = instance;
24364 return true;
24365 }
24366 return false;
26659 } 24367 }
26660 case HostText$8: 24368 case HostText:
26661 { 24369 {
26662 var text = fiber.pendingProps; 24370 var text = fiber.pendingProps;
26663 return canHydrateTextInstance(nextInstance, text); 24371 var textInstance = canHydrateTextInstance(nextInstance, text);
24372 if (textInstance !== null) {
24373 fiber.stateNode = textInstance;
24374 return true;
24375 }
24376 return false;
26664 } 24377 }
26665 default: 24378 default:
26666 return false; 24379 return false;
@@ -26679,12 +24392,12 @@ var ReactFiberHydrationContext = function (config) {
26679 hydrationParentFiber = fiber; 24392 hydrationParentFiber = fiber;
26680 return; 24393 return;
26681 } 24394 }
26682 if (!canHydrate(fiber, nextInstance)) { 24395 if (!tryHydrate(fiber, nextInstance)) {
26683 // If we can't hydrate this instance let's try the next one. 24396 // If we can't hydrate this instance let's try the next one.
26684 // We use this as a heuristic. It's based on intuition and not data so it 24397 // We use this as a heuristic. It's based on intuition and not data so it
26685 // might be flawed or unnecessary. 24398 // might be flawed or unnecessary.
26686 nextInstance = getNextHydratableSibling(nextInstance); 24399 nextInstance = getNextHydratableSibling(nextInstance);
26687 if (!nextInstance || !canHydrate(fiber, nextInstance)) { 24400 if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
26688 // Nothing to hydrate. Make it an insertion. 24401 // Nothing to hydrate. Make it an insertion.
26689 insertNonHydratedInstance(hydrationParentFiber, fiber); 24402 insertNonHydratedInstance(hydrationParentFiber, fiber);
26690 isHydrating = false; 24403 isHydrating = false;
@@ -26697,7 +24410,6 @@ var ReactFiberHydrationContext = function (config) {
26697 // fiber associated with it. 24410 // fiber associated with it.
26698 deleteHydratableInstance(hydrationParentFiber, nextHydratableInstance); 24411 deleteHydratableInstance(hydrationParentFiber, nextHydratableInstance);
26699 } 24412 }
26700 fiber.stateNode = nextInstance;
26701 hydrationParentFiber = fiber; 24413 hydrationParentFiber = fiber;
26702 nextHydratableInstance = getFirstHydratableChild(nextInstance); 24414 nextHydratableInstance = getFirstHydratableChild(nextInstance);
26703 } 24415 }
@@ -26717,13 +24429,39 @@ var ReactFiberHydrationContext = function (config) {
26717 24429
26718 function prepareToHydrateHostTextInstance(fiber) { 24430 function prepareToHydrateHostTextInstance(fiber) {
26719 var textInstance = fiber.stateNode; 24431 var textInstance = fiber.stateNode;
26720 var shouldUpdate = hydrateTextInstance(textInstance, fiber.memoizedProps, fiber); 24432 var textContent = fiber.memoizedProps;
24433 var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
24434 {
24435 if (shouldUpdate) {
24436 // We assume that prepareToHydrateHostTextInstance is called in a context where the
24437 // hydration parent is the parent host component of this host text.
24438 var returnFiber = hydrationParentFiber;
24439 if (returnFiber !== null) {
24440 switch (returnFiber.tag) {
24441 case HostRoot:
24442 {
24443 var parentContainer = returnFiber.stateNode.containerInfo;
24444 didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);
24445 break;
24446 }
24447 case HostComponent:
24448 {
24449 var parentType = returnFiber.type;
24450 var parentProps = returnFiber.memoizedProps;
24451 var parentInstance = returnFiber.stateNode;
24452 didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);
24453 break;
24454 }
24455 }
24456 }
24457 }
24458 }
26721 return shouldUpdate; 24459 return shouldUpdate;
26722 } 24460 }
26723 24461
26724 function popToNextHostParent(fiber) { 24462 function popToNextHostParent(fiber) {
26725 var parent = fiber['return']; 24463 var parent = fiber['return'];
26726 while (parent !== null && parent.tag !== HostComponent$10 && parent.tag !== HostRoot$10) { 24464 while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot) {
26727 parent = parent['return']; 24465 parent = parent['return'];
26728 } 24466 }
26729 hydrationParentFiber = parent; 24467 hydrationParentFiber = parent;
@@ -26751,7 +24489,7 @@ var ReactFiberHydrationContext = function (config) {
26751 // other nodes in them. We also ignore components with pure text content in 24489 // other nodes in them. We also ignore components with pure text content in
26752 // side of them. 24490 // side of them.
26753 // TODO: Better heuristic. 24491 // TODO: Better heuristic.
26754 if (fiber.tag !== HostComponent$10 || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) { 24492 if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {
26755 var nextInstance = nextHydratableInstance; 24493 var nextInstance = nextHydratableInstance;
26756 while (nextInstance) { 24494 while (nextInstance) {
26757 deleteHydratableInstance(fiber, nextInstance); 24495 deleteHydratableInstance(fiber, nextInstance);
@@ -26780,124 +24518,101 @@ var ReactFiberHydrationContext = function (config) {
26780 }; 24518 };
26781}; 24519};
26782 24520
26783/**
26784 * Copyright (c) 2013-present, Facebook, Inc.
26785 *
26786 * This source code is licensed under the MIT license found in the
26787 * LICENSE file in the root directory of this source tree.
26788 *
26789 * @providesModule ReactFiberInstrumentation
26790 *
26791 */
26792
26793// This lets us hook into Fiber to debug what it's doing. 24521// This lets us hook into Fiber to debug what it's doing.
26794// See https://github.com/facebook/react/pull/8033. 24522// See https://github.com/facebook/react/pull/8033.
26795// This is not part of the public API, not even for React DevTools. 24523// This is not part of the public API, not even for React DevTools.
26796// You may only inject a debugTool if you work on React Fiber itself. 24524// You may only inject a debugTool if you work on React Fiber itself.
26797 24525var ReactFiberInstrumentation = {
26798var ReactFiberInstrumentation$2 = {
26799 debugTool: null 24526 debugTool: null
26800}; 24527};
26801 24528
26802var ReactFiberInstrumentation_1 = ReactFiberInstrumentation$2; 24529var ReactFiberInstrumentation_1 = ReactFiberInstrumentation;
26803
26804var popContextProvider$1 = ReactFiberContext.popContextProvider;
26805
26806var reset$1 = ReactFiberStack.reset;
26807
26808var getStackAddendumByWorkInProgressFiber$2 = ReactFiberComponentTreeHook.getStackAddendumByWorkInProgressFiber;
26809
26810var logCapturedError = ReactFiberErrorLogger.logCapturedError;
26811
26812var invokeGuardedCallback$1 = ReactErrorUtils_1.invokeGuardedCallback;
26813var hasCaughtError = ReactErrorUtils_1.hasCaughtError;
26814var clearCaughtError = ReactErrorUtils_1.clearCaughtError;
26815
26816
26817
26818
26819
26820
26821
26822var ReactCurrentOwner$1 = ReactGlobalSharedState_1.ReactCurrentOwner;
26823
26824 24530
24531var defaultShowDialog = function (capturedError) {
24532 return true;
24533};
26825 24534
26826var createWorkInProgress$1 = ReactFiber.createWorkInProgress; 24535var showDialog = defaultShowDialog;
26827var largerPriority$1 = ReactFiber.largerPriority;
26828 24536
26829var onCommitRoot = ReactFiberDevToolsHook.onCommitRoot; 24537function logCapturedError(capturedError) {
24538 var logError = showDialog(capturedError);
26830 24539
26831var NoWork$2 = ReactPriorityLevel.NoWork; 24540 // Allow injected showDialog() to prevent default console.error logging.
26832var SynchronousPriority$1 = ReactPriorityLevel.SynchronousPriority; 24541 // This enables renderers like ReactNative to better manage redbox behavior.
26833var TaskPriority$1 = ReactPriorityLevel.TaskPriority; 24542 if (logError === false) {
26834var HighPriority = ReactPriorityLevel.HighPriority; 24543 return;
26835var LowPriority = ReactPriorityLevel.LowPriority; 24544 }
26836var OffscreenPriority = ReactPriorityLevel.OffscreenPriority;
26837 24545
26838var AsyncUpdates = ReactTypeOfInternalContext.AsyncUpdates; 24546 {
24547 var componentName = capturedError.componentName,
24548 componentStack = capturedError.componentStack,
24549 errorBoundaryName = capturedError.errorBoundaryName,
24550 errorBoundaryFound = capturedError.errorBoundaryFound,
24551 willRetry = capturedError.willRetry;
26839 24552
26840var PerformedWork = ReactTypeOfSideEffect.PerformedWork;
26841var Placement$1 = ReactTypeOfSideEffect.Placement;
26842var Update = ReactTypeOfSideEffect.Update;
26843var PlacementAndUpdate = ReactTypeOfSideEffect.PlacementAndUpdate;
26844var Deletion = ReactTypeOfSideEffect.Deletion;
26845var ContentReset = ReactTypeOfSideEffect.ContentReset;
26846var Callback = ReactTypeOfSideEffect.Callback;
26847var Err = ReactTypeOfSideEffect.Err;
26848var Ref = ReactTypeOfSideEffect.Ref;
26849 24553
26850var HostRoot$6 = ReactTypeOfWork.HostRoot; 24554 var componentNameMessage = componentName ? 'The above error occurred in the <' + componentName + '> component:' : 'The above error occurred in one of your React components:';
26851var HostComponent$6 = ReactTypeOfWork.HostComponent;
26852var HostPortal$3 = ReactTypeOfWork.HostPortal;
26853var ClassComponent$5 = ReactTypeOfWork.ClassComponent;
26854 24555
26855var getUpdatePriority$1 = ReactFiberUpdateQueue.getUpdatePriority; 24556 var errorBoundaryMessage = void 0;
24557 // errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow.
24558 if (errorBoundaryFound && errorBoundaryName) {
24559 if (willRetry) {
24560 errorBoundaryMessage = 'React will try to recreate this component tree from scratch ' + ('using the error boundary you provided, ' + errorBoundaryName + '.');
24561 } else {
24562 errorBoundaryMessage = 'This error was initially handled by the error boundary ' + errorBoundaryName + '.\n' + 'Recreating the tree from scratch failed so React will unmount the tree.';
24563 }
24564 } else {
24565 errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.';
24566 }
24567 var combinedMessage = '' + componentNameMessage + componentStack + '\n\n' + ('' + errorBoundaryMessage);
26856 24568
26857var _require14 = ReactFiberContext; 24569 // In development, we provide our own message with just the component stack.
26858var resetContext$1 = _require14.resetContext; 24570 // We don't include the original error message and JS stack because the browser
24571 // has already printed it. Even if the application swallows the error, it is still
24572 // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.
24573 console.error(combinedMessage);
24574 }
24575}
26859 24576
24577var invokeGuardedCallback$1 = ReactErrorUtils.invokeGuardedCallback;
24578var hasCaughtError = ReactErrorUtils.hasCaughtError;
24579var clearCaughtError = ReactErrorUtils.clearCaughtError;
26860 24580
26861 24581
26862{ 24582{
26863 var warning$22 = require$$0; 24583 var didWarnAboutStateTransition = false;
26864 var ReactFiberInstrumentation$1 = ReactFiberInstrumentation_1; 24584 var didWarnSetStateChildContext = false;
26865 var ReactDebugCurrentFiber$3 = ReactDebugCurrentFiber_1; 24585 var didWarnStateUpdateForUnmountedComponent = {};
26866 24586
26867 var _require15 = ReactDebugFiberPerf_1, 24587 var warnAboutUpdateOnUnmounted = function (fiber) {
26868 recordEffect = _require15.recordEffect, 24588 var componentName = getComponentName(fiber) || 'ReactClass';
26869 recordScheduleUpdate = _require15.recordScheduleUpdate, 24589 if (didWarnStateUpdateForUnmountedComponent[componentName]) {
26870 startWorkTimer = _require15.startWorkTimer, 24590 return;
26871 stopWorkTimer = _require15.stopWorkTimer, 24591 }
26872 stopFailedWorkTimer = _require15.stopFailedWorkTimer, 24592 warning(false, 'Can only update a mounted or mounting ' + 'component. This usually means you called setState, replaceState, ' + 'or forceUpdate on an unmounted component. This is a no-op.\n\nPlease ' + 'check the code for the %s component.', componentName);
26873 startWorkLoopTimer = _require15.startWorkLoopTimer, 24593 didWarnStateUpdateForUnmountedComponent[componentName] = true;
26874 stopWorkLoopTimer = _require15.stopWorkLoopTimer,
26875 startCommitTimer = _require15.startCommitTimer,
26876 stopCommitTimer = _require15.stopCommitTimer,
26877 startCommitHostEffectsTimer = _require15.startCommitHostEffectsTimer,
26878 stopCommitHostEffectsTimer = _require15.stopCommitHostEffectsTimer,
26879 startCommitLifeCyclesTimer = _require15.startCommitLifeCyclesTimer,
26880 stopCommitLifeCyclesTimer = _require15.stopCommitLifeCyclesTimer;
26881
26882 var warnAboutUpdateOnUnmounted = function (instance) {
26883 var ctor = instance.constructor;
26884 warning$22(false, 'Can only update a mounted or mounting component. This usually means ' + 'you called setState, replaceState, or forceUpdate on an unmounted ' + 'component. This is a no-op.\n\nPlease check the code for the ' + '%s component.', ctor && (ctor.displayName || ctor.name) || 'ReactClass');
26885 }; 24594 };
26886 24595
26887 var warnAboutInvalidUpdates = function (instance) { 24596 var warnAboutInvalidUpdates = function (instance) {
26888 switch (ReactDebugCurrentFiber$3.phase) { 24597 switch (ReactDebugCurrentFiber.phase) {
26889 case 'getChildContext': 24598 case 'getChildContext':
26890 warning$22(false, 'setState(...): Cannot call setState() inside getChildContext()'); 24599 if (didWarnSetStateChildContext) {
24600 return;
24601 }
24602 warning(false, 'setState(...): Cannot call setState() inside getChildContext()');
24603 didWarnSetStateChildContext = true;
26891 break; 24604 break;
26892 case 'render': 24605 case 'render':
26893 warning$22(false, 'Cannot update during an existing state transition (such as within ' + "`render` or another component's constructor). Render methods should " + 'be a pure function of props and state; constructor side-effects are ' + 'an anti-pattern, but can be moved to `componentWillMount`.'); 24606 if (didWarnAboutStateTransition) {
24607 return;
24608 }
24609 warning(false, 'Cannot update during an existing state transition (such as within ' + "`render` or another component's constructor). Render methods should " + 'be a pure function of props and state; constructor side-effects are ' + 'an anti-pattern, but can be moved to `componentWillMount`.');
24610 didWarnAboutStateTransition = true;
26894 break; 24611 break;
26895 } 24612 }
26896 }; 24613 };
26897} 24614}
26898 24615
26899var timeHeuristicForUnitOfWork = 1;
26900
26901var ReactFiberScheduler = function (config) { 24616var ReactFiberScheduler = function (config) {
26902 var hostContext = ReactFiberHostContext(config); 24617 var hostContext = ReactFiberHostContext(config);
26903 var hydrationContext = ReactFiberHydrationContext(config); 24618 var hydrationContext = ReactFiberHydrationContext(config);
@@ -26905,7 +24620,7 @@ var ReactFiberScheduler = function (config) {
26905 popHostContext = hostContext.popHostContext, 24620 popHostContext = hostContext.popHostContext,
26906 resetHostContainer = hostContext.resetHostContainer; 24621 resetHostContainer = hostContext.resetHostContainer;
26907 24622
26908 var _ReactFiberBeginWork = ReactFiberBeginWork(config, hostContext, hydrationContext, scheduleUpdate, getPriorityContext), 24623 var _ReactFiberBeginWork = ReactFiberBeginWork(config, hostContext, hydrationContext, scheduleWork, computeExpirationForFiber),
26909 beginWork = _ReactFiberBeginWork.beginWork, 24624 beginWork = _ReactFiberBeginWork.beginWork,
26910 beginFailedWork = _ReactFiberBeginWork.beginFailedWork; 24625 beginFailedWork = _ReactFiberBeginWork.beginFailedWork;
26911 24626
@@ -26913,6 +24628,7 @@ var ReactFiberScheduler = function (config) {
26913 completeWork = _ReactFiberCompleteWo.completeWork; 24628 completeWork = _ReactFiberCompleteWo.completeWork;
26914 24629
26915 var _ReactFiberCommitWork = ReactFiberCommitWork(config, captureError), 24630 var _ReactFiberCommitWork = ReactFiberCommitWork(config, captureError),
24631 commitResetTextContent = _ReactFiberCommitWork.commitResetTextContent,
26916 commitPlacement = _ReactFiberCommitWork.commitPlacement, 24632 commitPlacement = _ReactFiberCommitWork.commitPlacement,
26917 commitDeletion = _ReactFiberCommitWork.commitDeletion, 24633 commitDeletion = _ReactFiberCommitWork.commitDeletion,
26918 commitWork = _ReactFiberCommitWork.commitWork, 24634 commitWork = _ReactFiberCommitWork.commitWork,
@@ -26920,47 +24636,33 @@ var ReactFiberScheduler = function (config) {
26920 commitAttachRef = _ReactFiberCommitWork.commitAttachRef, 24636 commitAttachRef = _ReactFiberCommitWork.commitAttachRef,
26921 commitDetachRef = _ReactFiberCommitWork.commitDetachRef; 24637 commitDetachRef = _ReactFiberCommitWork.commitDetachRef;
26922 24638
26923 var scheduleDeferredCallback = config.scheduleDeferredCallback, 24639 var now = config.now,
24640 scheduleDeferredCallback = config.scheduleDeferredCallback,
26924 useSyncScheduling = config.useSyncScheduling, 24641 useSyncScheduling = config.useSyncScheduling,
26925 prepareForCommit = config.prepareForCommit, 24642 prepareForCommit = config.prepareForCommit,
26926 resetAfterCommit = config.resetAfterCommit; 24643 resetAfterCommit = config.resetAfterCommit;
26927 24644
26928 // The priority level to use when scheduling an update. We use NoWork to 24645 // Represents the current time in ms.
26929 // represent the default priority.
26930 // TODO: Should we change this to an array instead of using the call stack?
26931 // Might be less confusing.
26932 24646
26933 var priorityContext = NoWork$2; 24647 var startTime = now();
24648 var mostRecentCurrentTime = msToExpirationTime(0);
26934 24649
26935 // Keeps track of whether we're currently in a work loop. 24650 // Represents the expiration time that incoming updates should use. (If this
26936 var isPerformingWork = false; 24651 // is NoWork, use the default strategy: async updates in async mode, sync
24652 // updates in sync mode.)
24653 var expirationContext = NoWork;
26937 24654
26938 // Keeps track of whether the current deadline has expired. 24655 var isWorking = false;
26939 var deadlineHasExpired = false;
26940
26941 // Keeps track of whether we should should batch sync updates.
26942 var isBatchingUpdates = false;
26943
26944 // This is needed for the weird case where the initial mount is synchronous
26945 // even inside batchedUpdates :(
26946 var isUnbatchingUpdates = false;
26947 24656
26948 // The next work in progress fiber that we're currently working on. 24657 // The next work in progress fiber that we're currently working on.
26949 var nextUnitOfWork = null; 24658 var nextUnitOfWork = null;
26950 var nextPriorityLevel = NoWork$2; 24659 var nextRoot = null;
24660 // The time at which we're currently rendering work.
24661 var nextRenderExpirationTime = NoWork;
26951 24662
26952 // The next fiber with an effect that we're currently committing. 24663 // The next fiber with an effect that we're currently committing.
26953 var nextEffect = null; 24664 var nextEffect = null;
26954 24665
26955 var pendingCommit = null;
26956
26957 // Linked list of roots with scheduled work on them.
26958 var nextScheduledRoot = null;
26959 var lastScheduledRoot = null;
26960
26961 // Keep track of which host environment callbacks are scheduled.
26962 var isCallbackScheduled = false;
26963
26964 // Keep track of which fibers have captured an error that need to be handled. 24666 // Keep track of which fibers have captured an error that need to be handled.
26965 // Work is removed from this collection after componentDidCatch is called. 24667 // Work is removed from this collection after componentDidCatch is called.
26966 var capturedErrors = null; 24668 var capturedErrors = null;
@@ -26977,88 +24679,27 @@ var ReactFiberScheduler = function (config) {
26977 var isCommitting = false; 24679 var isCommitting = false;
26978 var isUnmounting = false; 24680 var isUnmounting = false;
26979 24681
26980 // Use these to prevent an infinite loop of nested updates 24682 // Used for performance tracking.
26981 var NESTED_UPDATE_LIMIT = 1000; 24683 var interruptedBy = null;
26982 var nestedUpdateCount = 0;
26983 var nextRenderedTree = null;
26984 24684
26985 function resetContextStack() { 24685 function resetContextStack() {
26986 // Reset the stack 24686 // Reset the stack
26987 reset$1(); 24687 reset$1();
26988 // Reset the cursors 24688 // Reset the cursors
26989 resetContext$1(); 24689 resetContext();
26990 resetHostContainer(); 24690 resetHostContainer();
26991 } 24691 }
26992 24692
26993 // resetNextUnitOfWork mutates the current priority context. It is reset after
26994 // after the workLoop exits, so never call resetNextUnitOfWork from outside
26995 // the work loop.
26996 function resetNextUnitOfWork() {
26997 // Clear out roots with no more work on them, or if they have uncaught errors
26998 while (nextScheduledRoot !== null && nextScheduledRoot.current.pendingWorkPriority === NoWork$2) {
26999 // Unschedule this root.
27000 nextScheduledRoot.isScheduled = false;
27001 // Read the next pointer now.
27002 // We need to clear it in case this root gets scheduled again later.
27003 var next = nextScheduledRoot.nextScheduledRoot;
27004 nextScheduledRoot.nextScheduledRoot = null;
27005 // Exit if we cleared all the roots and there's no work to do.
27006 if (nextScheduledRoot === lastScheduledRoot) {
27007 nextScheduledRoot = null;
27008 lastScheduledRoot = null;
27009 nextPriorityLevel = NoWork$2;
27010 return null;
27011 }
27012 // Continue with the next root.
27013 // If there's no work on it, it will get unscheduled too.
27014 nextScheduledRoot = next;
27015 }
27016
27017 var root = nextScheduledRoot;
27018 var highestPriorityRoot = null;
27019 var highestPriorityLevel = NoWork$2;
27020 while (root !== null) {
27021 if (root.current.pendingWorkPriority !== NoWork$2 && (highestPriorityLevel === NoWork$2 || highestPriorityLevel > root.current.pendingWorkPriority)) {
27022 highestPriorityLevel = root.current.pendingWorkPriority;
27023 highestPriorityRoot = root;
27024 }
27025 // We didn't find anything to do in this root, so let's try the next one.
27026 root = root.nextScheduledRoot;
27027 }
27028 if (highestPriorityRoot !== null) {
27029 nextPriorityLevel = highestPriorityLevel;
27030 // Before we start any new work, let's make sure that we have a fresh
27031 // stack to work from.
27032 // TODO: This call is buried a bit too deep. It would be nice to have
27033 // a single point which happens right before any new work and
27034 // unfortunately this is it.
27035 resetContextStack();
27036
27037 nextUnitOfWork = createWorkInProgress$1(highestPriorityRoot.current, highestPriorityLevel);
27038 if (highestPriorityRoot !== nextRenderedTree) {
27039 // We've switched trees. Reset the nested update counter.
27040 nestedUpdateCount = 0;
27041 nextRenderedTree = highestPriorityRoot;
27042 }
27043 return;
27044 }
27045
27046 nextPriorityLevel = NoWork$2;
27047 nextUnitOfWork = null;
27048 nextRenderedTree = null;
27049 return;
27050 }
27051
27052 function commitAllHostEffects() { 24693 function commitAllHostEffects() {
27053 while (nextEffect !== null) { 24694 while (nextEffect !== null) {
27054 { 24695 {
27055 ReactDebugCurrentFiber$3.setCurrentFiber(nextEffect, null); 24696 ReactDebugCurrentFiber.setCurrentFiber(nextEffect);
27056 recordEffect();
27057 } 24697 }
24698 recordEffect();
27058 24699
27059 var effectTag = nextEffect.effectTag; 24700 var effectTag = nextEffect.effectTag;
27060 if (effectTag & ContentReset) { 24701 if (effectTag & ContentReset) {
27061 config.resetTextContent(nextEffect.stateNode); 24702 commitResetTextContent(nextEffect);
27062 } 24703 }
27063 24704
27064 if (effectTag & Ref) { 24705 if (effectTag & Ref) {
@@ -27074,7 +24715,7 @@ var ReactFiberScheduler = function (config) {
27074 // effect tag and switch on that value. 24715 // effect tag and switch on that value.
27075 var primaryEffectTag = effectTag & ~(Callback | Err | ContentReset | Ref | PerformedWork); 24716 var primaryEffectTag = effectTag & ~(Callback | Err | ContentReset | Ref | PerformedWork);
27076 switch (primaryEffectTag) { 24717 switch (primaryEffectTag) {
27077 case Placement$1: 24718 case Placement:
27078 { 24719 {
27079 commitPlacement(nextEffect); 24720 commitPlacement(nextEffect);
27080 // Clear the "placement" from effect tag so that we know that this is inserted, before 24721 // Clear the "placement" from effect tag so that we know that this is inserted, before
@@ -27082,7 +24723,7 @@ var ReactFiberScheduler = function (config) {
27082 // TODO: findDOMNode doesn't rely on this any more but isMounted 24723 // TODO: findDOMNode doesn't rely on this any more but isMounted
27083 // does and isMounted is deprecated anyway so we should be able 24724 // does and isMounted is deprecated anyway so we should be able
27084 // to kill this. 24725 // to kill this.
27085 nextEffect.effectTag &= ~Placement$1; 24726 nextEffect.effectTag &= ~Placement;
27086 break; 24727 break;
27087 } 24728 }
27088 case PlacementAndUpdate: 24729 case PlacementAndUpdate:
@@ -27091,7 +24732,7 @@ var ReactFiberScheduler = function (config) {
27091 commitPlacement(nextEffect); 24732 commitPlacement(nextEffect);
27092 // Clear the "placement" from effect tag so that we know that this is inserted, before 24733 // Clear the "placement" from effect tag so that we know that this is inserted, before
27093 // any life-cycles like componentDidMount gets called. 24734 // any life-cycles like componentDidMount gets called.
27094 nextEffect.effectTag &= ~Placement$1; 24735 nextEffect.effectTag &= ~Placement;
27095 24736
27096 // Update 24737 // Update
27097 var _current = nextEffect.alternate; 24738 var _current = nextEffect.alternate;
@@ -27116,7 +24757,7 @@ var ReactFiberScheduler = function (config) {
27116 } 24757 }
27117 24758
27118 { 24759 {
27119 ReactDebugCurrentFiber$3.resetCurrentFiber(); 24760 ReactDebugCurrentFiber.resetCurrentFiber();
27120 } 24761 }
27121 } 24762 }
27122 24763
@@ -27124,26 +24765,19 @@ var ReactFiberScheduler = function (config) {
27124 while (nextEffect !== null) { 24765 while (nextEffect !== null) {
27125 var effectTag = nextEffect.effectTag; 24766 var effectTag = nextEffect.effectTag;
27126 24767
27127 // Use Task priority for lifecycle updates
27128 if (effectTag & (Update | Callback)) { 24768 if (effectTag & (Update | Callback)) {
27129 { 24769 recordEffect();
27130 recordEffect();
27131 }
27132 var current = nextEffect.alternate; 24770 var current = nextEffect.alternate;
27133 commitLifeCycles(current, nextEffect); 24771 commitLifeCycles(current, nextEffect);
27134 } 24772 }
27135 24773
27136 if (effectTag & Ref) { 24774 if (effectTag & Ref) {
27137 { 24775 recordEffect();
27138 recordEffect();
27139 }
27140 commitAttachRef(nextEffect); 24776 commitAttachRef(nextEffect);
27141 } 24777 }
27142 24778
27143 if (effectTag & Err) { 24779 if (effectTag & Err) {
27144 { 24780 recordEffect();
27145 recordEffect();
27146 }
27147 commitErrorHandling(nextEffect); 24781 commitErrorHandling(nextEffect);
27148 } 24782 }
27149 24783
@@ -27159,28 +24793,21 @@ var ReactFiberScheduler = function (config) {
27159 } 24793 }
27160 } 24794 }
27161 24795
27162 function commitAllWork(finishedWork) { 24796 function commitRoot(finishedWork) {
27163 // We keep track of this so that captureError can collect any boundaries 24797 // We keep track of this so that captureError can collect any boundaries
27164 // that capture an error during the commit phase. The reason these aren't 24798 // that capture an error during the commit phase. The reason these aren't
27165 // local to this function is because errors that occur during cWU are 24799 // local to this function is because errors that occur during cWU are
27166 // captured elsewhere, to prevent the unmount from being interrupted. 24800 // captured elsewhere, to prevent the unmount from being interrupted.
24801 isWorking = true;
27167 isCommitting = true; 24802 isCommitting = true;
27168 { 24803 startCommitTimer();
27169 startCommitTimer();
27170 }
27171 24804
27172 pendingCommit = null;
27173 var root = finishedWork.stateNode; 24805 var root = finishedWork.stateNode;
27174 !(root.current !== finishedWork) ? invariant(false, 'Cannot commit the same tree as before. This is probably a bug related to the return field. This error is likely caused by a bug in React. Please file an issue.') : void 0; 24806 !(root.current !== finishedWork) ? invariant(false, 'Cannot commit the same tree as before. This is probably a bug related to the return field. This error is likely caused by a bug in React. Please file an issue.') : void 0;
27175 24807 root.isReadyForCommit = false;
27176 if (nextPriorityLevel === SynchronousPriority$1 || nextPriorityLevel === TaskPriority$1) {
27177 // Keep track of the number of iterations to prevent an infinite
27178 // update loop.
27179 nestedUpdateCount++;
27180 }
27181 24808
27182 // Reset this to null before calling lifecycles 24809 // Reset this to null before calling lifecycles
27183 ReactCurrentOwner$1.current = null; 24810 ReactCurrentOwner.current = null;
27184 24811
27185 var firstEffect = void 0; 24812 var firstEffect = void 0;
27186 if (finishedWork.effectTag > PerformedWork) { 24813 if (finishedWork.effectTag > PerformedWork) {
@@ -27205,9 +24832,7 @@ var ReactFiberScheduler = function (config) {
27205 // The first pass performs all the host insertions, updates, deletions and 24832 // The first pass performs all the host insertions, updates, deletions and
27206 // ref unmounts. 24833 // ref unmounts.
27207 nextEffect = firstEffect; 24834 nextEffect = firstEffect;
27208 { 24835 startCommitHostEffectsTimer();
27209 startCommitHostEffectsTimer();
27210 }
27211 while (nextEffect !== null) { 24836 while (nextEffect !== null) {
27212 var didError = false; 24837 var didError = false;
27213 var _error = void 0; 24838 var _error = void 0;
@@ -27227,9 +24852,7 @@ var ReactFiberScheduler = function (config) {
27227 } 24852 }
27228 } 24853 }
27229 } 24854 }
27230 { 24855 stopCommitHostEffectsTimer();
27231 stopCommitHostEffectsTimer();
27232 }
27233 24856
27234 resetAfterCommit(); 24857 resetAfterCommit();
27235 24858
@@ -27244,9 +24867,7 @@ var ReactFiberScheduler = function (config) {
27244 // and deletions in the entire tree have already been invoked. 24867 // and deletions in the entire tree have already been invoked.
27245 // This pass also triggers any renderer-specific initial effects. 24868 // This pass also triggers any renderer-specific initial effects.
27246 nextEffect = firstEffect; 24869 nextEffect = firstEffect;
27247 { 24870 startCommitLifeCyclesTimer();
27248 startCommitLifeCyclesTimer();
27249 }
27250 while (nextEffect !== null) { 24871 while (nextEffect !== null) {
27251 var _didError = false; 24872 var _didError = false;
27252 var _error2 = void 0; 24873 var _error2 = void 0;
@@ -27267,15 +24888,14 @@ var ReactFiberScheduler = function (config) {
27267 } 24888 }
27268 24889
27269 isCommitting = false; 24890 isCommitting = false;
27270 { 24891 isWorking = false;
27271 stopCommitLifeCyclesTimer(); 24892 stopCommitLifeCyclesTimer();
27272 stopCommitTimer(); 24893 stopCommitTimer();
27273 }
27274 if (typeof onCommitRoot === 'function') { 24894 if (typeof onCommitRoot === 'function') {
27275 onCommitRoot(finishedWork.stateNode); 24895 onCommitRoot(finishedWork.stateNode);
27276 } 24896 }
27277 if (true && ReactFiberInstrumentation$1.debugTool) { 24897 if (true && ReactFiberInstrumentation_1.debugTool) {
27278 ReactFiberInstrumentation$1.debugTool.onCommitWork(finishedWork); 24898 ReactFiberInstrumentation_1.debugTool.onCommitWork(finishedWork);
27279 } 24899 }
27280 24900
27281 // If we caught any errors during this commit, schedule their boundaries 24901 // If we caught any errors during this commit, schedule their boundaries
@@ -27285,29 +24905,43 @@ var ReactFiberScheduler = function (config) {
27285 commitPhaseBoundaries = null; 24905 commitPhaseBoundaries = null;
27286 } 24906 }
27287 24907
27288 // This tree is done. Reset the unit of work pointer to the next highest 24908 if (firstUncaughtError !== null) {
27289 // priority root. If there's no more work left, the pointer is set to null. 24909 var _error3 = firstUncaughtError;
27290 resetNextUnitOfWork(); 24910 firstUncaughtError = null;
24911 onUncaughtError(_error3);
24912 }
24913
24914 var remainingTime = root.current.expirationTime;
24915
24916 if (remainingTime === NoWork) {
24917 capturedErrors = null;
24918 failedBoundaries = null;
24919 }
24920
24921 return remainingTime;
27291 } 24922 }
27292 24923
27293 function resetWorkPriority(workInProgress, renderPriority) { 24924 function resetExpirationTime(workInProgress, renderTime) {
27294 if (workInProgress.pendingWorkPriority !== NoWork$2 && workInProgress.pendingWorkPriority > renderPriority) { 24925 if (renderTime !== Never && workInProgress.expirationTime === Never) {
27295 // This was a down-prioritization. Don't bubble priority from children. 24926 // The children of this component are hidden. Don't bubble their
24927 // expiration times.
27296 return; 24928 return;
27297 } 24929 }
27298 24930
27299 // Check for pending update priority. 24931 // Check for pending updates.
27300 var newPriority = getUpdatePriority$1(workInProgress); 24932 var newExpirationTime = getUpdateExpirationTime(workInProgress);
27301 24933
27302 // TODO: Coroutines need to visit stateNode 24934 // TODO: Calls need to visit stateNode
27303 24935
24936 // Bubble up the earliest expiration time.
27304 var child = workInProgress.child; 24937 var child = workInProgress.child;
27305 while (child !== null) { 24938 while (child !== null) {
27306 // Ensure that remaining work priority bubbles up. 24939 if (child.expirationTime !== NoWork && (newExpirationTime === NoWork || newExpirationTime > child.expirationTime)) {
27307 newPriority = largerPriority$1(newPriority, child.pendingWorkPriority); 24940 newExpirationTime = child.expirationTime;
24941 }
27308 child = child.sibling; 24942 child = child.sibling;
27309 } 24943 }
27310 workInProgress.pendingWorkPriority = newPriority; 24944 workInProgress.expirationTime = newExpirationTime;
27311 } 24945 }
27312 24946
27313 function completeUnitOfWork(workInProgress) { 24947 function completeUnitOfWork(workInProgress) {
@@ -27317,19 +24951,23 @@ var ReactFiberScheduler = function (config) {
27317 // means that we don't need an additional field on the work in 24951 // means that we don't need an additional field on the work in
27318 // progress. 24952 // progress.
27319 var current = workInProgress.alternate; 24953 var current = workInProgress.alternate;
27320 var next = completeWork(current, workInProgress, nextPriorityLevel); 24954 {
24955 ReactDebugCurrentFiber.setCurrentFiber(workInProgress);
24956 }
24957 var next = completeWork(current, workInProgress, nextRenderExpirationTime);
24958 {
24959 ReactDebugCurrentFiber.resetCurrentFiber();
24960 }
27321 24961
27322 var returnFiber = workInProgress['return']; 24962 var returnFiber = workInProgress['return'];
27323 var siblingFiber = workInProgress.sibling; 24963 var siblingFiber = workInProgress.sibling;
27324 24964
27325 resetWorkPriority(workInProgress, nextPriorityLevel); 24965 resetExpirationTime(workInProgress, nextRenderExpirationTime);
27326 24966
27327 if (next !== null) { 24967 if (next !== null) {
27328 { 24968 stopWorkTimer(workInProgress);
27329 stopWorkTimer(workInProgress); 24969 if (true && ReactFiberInstrumentation_1.debugTool) {
27330 } 24970 ReactFiberInstrumentation_1.debugTool.onCompleteWork(workInProgress);
27331 if (true && ReactFiberInstrumentation$1.debugTool) {
27332 ReactFiberInstrumentation$1.debugTool.onCompleteWork(workInProgress);
27333 } 24971 }
27334 // If completing this work spawned new work, do that next. We'll come 24972 // If completing this work spawned new work, do that next. We'll come
27335 // back here again. 24973 // back here again.
@@ -27369,11 +25007,9 @@ var ReactFiberScheduler = function (config) {
27369 } 25007 }
27370 } 25008 }
27371 25009
27372 { 25010 stopWorkTimer(workInProgress);
27373 stopWorkTimer(workInProgress); 25011 if (true && ReactFiberInstrumentation_1.debugTool) {
27374 } 25012 ReactFiberInstrumentation_1.debugTool.onCompleteWork(workInProgress);
27375 if (true && ReactFiberInstrumentation$1.debugTool) {
27376 ReactFiberInstrumentation$1.debugTool.onCompleteWork(workInProgress);
27377 } 25013 }
27378 25014
27379 if (siblingFiber !== null) { 25015 if (siblingFiber !== null) {
@@ -27384,10 +25020,9 @@ var ReactFiberScheduler = function (config) {
27384 workInProgress = returnFiber; 25020 workInProgress = returnFiber;
27385 continue; 25021 continue;
27386 } else { 25022 } else {
27387 // We've reached the root. Mark the root as pending commit. Depending 25023 // We've reached the root.
27388 // on how much time we have left, we'll either commit it now or in 25024 var root = workInProgress.stateNode;
27389 // the next frame. 25025 root.isReadyForCommit = true;
27390 pendingCommit = workInProgress;
27391 return null; 25026 return null;
27392 } 25027 }
27393 } 25028 }
@@ -27406,12 +25041,16 @@ var ReactFiberScheduler = function (config) {
27406 var current = workInProgress.alternate; 25041 var current = workInProgress.alternate;
27407 25042
27408 // See if beginning this work spawns more work. 25043 // See if beginning this work spawns more work.
25044 startWorkTimer(workInProgress);
25045 {
25046 ReactDebugCurrentFiber.setCurrentFiber(workInProgress);
25047 }
25048 var next = beginWork(current, workInProgress, nextRenderExpirationTime);
27409 { 25049 {
27410 startWorkTimer(workInProgress); 25050 ReactDebugCurrentFiber.resetCurrentFiber();
27411 } 25051 }
27412 var next = beginWork(current, workInProgress, nextPriorityLevel); 25052 if (true && ReactFiberInstrumentation_1.debugTool) {
27413 if (true && ReactFiberInstrumentation$1.debugTool) { 25053 ReactFiberInstrumentation_1.debugTool.onBeginWork(workInProgress);
27414 ReactFiberInstrumentation$1.debugTool.onBeginWork(workInProgress);
27415 } 25054 }
27416 25055
27417 if (next === null) { 25056 if (next === null) {
@@ -27419,10 +25058,7 @@ var ReactFiberScheduler = function (config) {
27419 next = completeUnitOfWork(workInProgress); 25058 next = completeUnitOfWork(workInProgress);
27420 } 25059 }
27421 25060
27422 ReactCurrentOwner$1.current = null; 25061 ReactCurrentOwner.current = null;
27423 {
27424 ReactDebugCurrentFiber$3.resetCurrentFiber();
27425 }
27426 25062
27427 return next; 25063 return next;
27428 } 25064 }
@@ -27435,12 +25071,16 @@ var ReactFiberScheduler = function (config) {
27435 var current = workInProgress.alternate; 25071 var current = workInProgress.alternate;
27436 25072
27437 // See if beginning this work spawns more work. 25073 // See if beginning this work spawns more work.
25074 startWorkTimer(workInProgress);
27438 { 25075 {
27439 startWorkTimer(workInProgress); 25076 ReactDebugCurrentFiber.setCurrentFiber(workInProgress);
27440 } 25077 }
27441 var next = beginFailedWork(current, workInProgress, nextPriorityLevel); 25078 var next = beginFailedWork(current, workInProgress, nextRenderExpirationTime);
27442 if (true && ReactFiberInstrumentation$1.debugTool) { 25079 {
27443 ReactFiberInstrumentation$1.debugTool.onBeginWork(workInProgress); 25080 ReactDebugCurrentFiber.resetCurrentFiber();
25081 }
25082 if (true && ReactFiberInstrumentation_1.debugTool) {
25083 ReactFiberInstrumentation_1.debugTool.onBeginWork(workInProgress);
27444 } 25084 }
27445 25085
27446 if (next === null) { 25086 if (next === null) {
@@ -27448,29 +25088,44 @@ var ReactFiberScheduler = function (config) {
27448 next = completeUnitOfWork(workInProgress); 25088 next = completeUnitOfWork(workInProgress);
27449 } 25089 }
27450 25090
27451 ReactCurrentOwner$1.current = null; 25091 ReactCurrentOwner.current = null;
27452 {
27453 ReactDebugCurrentFiber$3.resetCurrentFiber();
27454 }
27455 25092
27456 return next; 25093 return next;
27457 } 25094 }
27458 25095
27459 function performDeferredWork(deadline) { 25096 function workLoop(expirationTime) {
27460 performWork(OffscreenPriority, deadline); 25097 if (capturedErrors !== null) {
25098 // If there are unhandled errors, switch to the slow work loop.
25099 // TODO: How to avoid this check in the fast path? Maybe the renderer
25100 // could keep track of which roots have unhandled errors and call a
25101 // forked version of renderRoot.
25102 slowWorkLoopThatChecksForFailedWork(expirationTime);
25103 return;
25104 }
25105 if (nextRenderExpirationTime === NoWork || nextRenderExpirationTime > expirationTime) {
25106 return;
25107 }
25108
25109 if (nextRenderExpirationTime <= mostRecentCurrentTime) {
25110 // Flush all expired work.
25111 while (nextUnitOfWork !== null) {
25112 nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
25113 }
25114 } else {
25115 // Flush asynchronous work until the deadline runs out of time.
25116 while (nextUnitOfWork !== null && !shouldYield()) {
25117 nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
25118 }
25119 }
27461 } 25120 }
27462 25121
27463 function handleCommitPhaseErrors() { 25122 function slowWorkLoopThatChecksForFailedWork(expirationTime) {
27464 // This is a special work loop for handling commit phase errors. It's 25123 if (nextRenderExpirationTime === NoWork || nextRenderExpirationTime > expirationTime) {
27465 // similar to the syncrhonous work loop, but does an additional check on 25124 return;
27466 // each fiber to see if it's an error boundary with an unhandled error. If 25125 }
27467 // so, it uses a forked version of performUnitOfWork that unmounts the
27468 // failed subtree.
27469 //
27470 // The loop stops once the children have unmounted and error lifecycles are
27471 // called. Then we return to the regular flow.
27472 25126
27473 if (capturedErrors !== null && capturedErrors.size > 0 && nextPriorityLevel === TaskPriority$1) { 25127 if (nextRenderExpirationTime <= mostRecentCurrentTime) {
25128 // Flush all expired work.
27474 while (nextUnitOfWork !== null) { 25129 while (nextUnitOfWork !== null) {
27475 if (hasCapturedError(nextUnitOfWork)) { 25130 if (hasCapturedError(nextUnitOfWork)) {
27476 // Use a forked version of performUnitOfWork 25131 // Use a forked version of performUnitOfWork
@@ -27478,133 +25133,21 @@ var ReactFiberScheduler = function (config) {
27478 } else { 25133 } else {
27479 nextUnitOfWork = performUnitOfWork(nextUnitOfWork); 25134 nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
27480 } 25135 }
27481 if (nextUnitOfWork === null) {
27482 !(pendingCommit !== null) ? invariant(false, 'Should have a pending commit. This error is likely caused by a bug in React. Please file an issue.') : void 0;
27483 // We just completed a root. Commit it now.
27484 priorityContext = TaskPriority$1;
27485 commitAllWork(pendingCommit);
27486 priorityContext = nextPriorityLevel;
27487
27488 if (capturedErrors === null || capturedErrors.size === 0 || nextPriorityLevel !== TaskPriority$1) {
27489 // There are no more unhandled errors. We can exit this special
27490 // work loop. If there's still additional work, we'll perform it
27491 // using one of the normal work loops.
27492 break;
27493 }
27494 // The commit phase produced additional errors. Continue working.
27495 }
27496 } 25136 }
27497 } 25137 } else {
27498 } 25138 // Flush asynchronous work until the deadline runs out of time.
27499 25139 while (nextUnitOfWork !== null && !shouldYield()) {
27500 function workLoop(minPriorityLevel, deadline) { 25140 if (hasCapturedError(nextUnitOfWork)) {
27501 if (pendingCommit !== null) { 25141 // Use a forked version of performUnitOfWork
27502 priorityContext = TaskPriority$1; 25142 nextUnitOfWork = performFailedUnitOfWork(nextUnitOfWork);
27503 commitAllWork(pendingCommit); 25143 } else {
27504 handleCommitPhaseErrors();
27505 } else if (nextUnitOfWork === null) {
27506 resetNextUnitOfWork();
27507 }
27508
27509 if (nextPriorityLevel === NoWork$2 || nextPriorityLevel > minPriorityLevel) {
27510 return;
27511 }
27512
27513 // During the render phase, updates should have the same priority at which
27514 // we're rendering.
27515 priorityContext = nextPriorityLevel;
27516
27517 loop: do {
27518 if (nextPriorityLevel <= TaskPriority$1) {
27519 // Flush all synchronous and task work.
27520 while (nextUnitOfWork !== null) {
27521 nextUnitOfWork = performUnitOfWork(nextUnitOfWork); 25144 nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
27522 if (nextUnitOfWork === null) {
27523 !(pendingCommit !== null) ? invariant(false, 'Should have a pending commit. This error is likely caused by a bug in React. Please file an issue.') : void 0;
27524 // We just completed a root. Commit it now.
27525 priorityContext = TaskPriority$1;
27526 commitAllWork(pendingCommit);
27527 priorityContext = nextPriorityLevel;
27528 // Clear any errors that were scheduled during the commit phase.
27529 handleCommitPhaseErrors();
27530 // The priority level may have changed. Check again.
27531 if (nextPriorityLevel === NoWork$2 || nextPriorityLevel > minPriorityLevel || nextPriorityLevel > TaskPriority$1) {
27532 // The priority level does not match.
27533 break;
27534 }
27535 }
27536 } 25145 }
27537 } else if (deadline !== null) {
27538 // Flush asynchronous work until the deadline expires.
27539 while (nextUnitOfWork !== null && !deadlineHasExpired) {
27540 if (deadline.timeRemaining() > timeHeuristicForUnitOfWork) {
27541 nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
27542 // In a deferred work batch, iff nextUnitOfWork returns null, we just
27543 // completed a root and a pendingCommit exists. Logically, we could
27544 // omit either of the checks in the following condition, but we need
27545 // both to satisfy Flow.
27546 if (nextUnitOfWork === null) {
27547 !(pendingCommit !== null) ? invariant(false, 'Should have a pending commit. This error is likely caused by a bug in React. Please file an issue.') : void 0;
27548 // We just completed a root. If we have time, commit it now.
27549 // Otherwise, we'll commit it in the next frame.
27550 if (deadline.timeRemaining() > timeHeuristicForUnitOfWork) {
27551 priorityContext = TaskPriority$1;
27552 commitAllWork(pendingCommit);
27553 priorityContext = nextPriorityLevel;
27554 // Clear any errors that were scheduled during the commit phase.
27555 handleCommitPhaseErrors();
27556 // The priority level may have changed. Check again.
27557 if (nextPriorityLevel === NoWork$2 || nextPriorityLevel > minPriorityLevel || nextPriorityLevel < HighPriority) {
27558 // The priority level does not match.
27559 break;
27560 }
27561 } else {
27562 deadlineHasExpired = true;
27563 }
27564 }
27565 } else {
27566 deadlineHasExpired = true;
27567 }
27568 }
27569 }
27570
27571 // There might be work left. Depending on the priority, we should
27572 // either perform it now or schedule a callback to perform it later.
27573 switch (nextPriorityLevel) {
27574 case SynchronousPriority$1:
27575 case TaskPriority$1:
27576 // We have remaining synchronous or task work. Keep performing it,
27577 // regardless of whether we're inside a callback.
27578 if (nextPriorityLevel <= minPriorityLevel) {
27579 continue loop;
27580 }
27581 break loop;
27582 case HighPriority:
27583 case LowPriority:
27584 case OffscreenPriority:
27585 // We have remaining async work.
27586 if (deadline === null) {
27587 // We're not inside a callback. Exit and perform the work during
27588 // the next callback.
27589 break loop;
27590 }
27591 // We are inside a callback.
27592 if (!deadlineHasExpired && nextPriorityLevel <= minPriorityLevel) {
27593 // We still have time. Keep working.
27594 continue loop;
27595 }
27596 // We've run out of time. Exit.
27597 break loop;
27598 case NoWork$2:
27599 // No work left. We can exit.
27600 break loop;
27601 default:
27602 invariant(false, 'Switch statement should be exhuastive. This error is likely caused by a bug in React. Please file an issue.');
27603 } 25146 }
27604 } while (true); 25147 }
27605 } 25148 }
27606 25149
27607 function performWorkCatchBlock(failedWork, boundary, minPriorityLevel, deadline) { 25150 function renderRootCatchBlock(root, failedWork, boundary, expirationTime) {
27608 // We're going to restart the error boundary that captured the error. 25151 // We're going to restart the error boundary that captured the error.
27609 // Conceptually, we're unwinding the stack. We need to unwind the 25152 // Conceptually, we're unwinding the stack. We need to unwind the
27610 // context stack, too. 25153 // context stack, too.
@@ -27618,25 +25161,33 @@ var ReactFiberScheduler = function (config) {
27618 nextUnitOfWork = performFailedUnitOfWork(boundary); 25161 nextUnitOfWork = performFailedUnitOfWork(boundary);
27619 25162
27620 // Continue working. 25163 // Continue working.
27621 workLoop(minPriorityLevel, deadline); 25164 workLoop(expirationTime);
27622 } 25165 }
27623 25166
27624 function performWork(minPriorityLevel, deadline) { 25167 function renderRoot(root, expirationTime) {
27625 { 25168 !!isWorking ? invariant(false, 'renderRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;
27626 startWorkLoopTimer(); 25169 isWorking = true;
27627 }
27628 25170
27629 !!isPerformingWork ? invariant(false, 'performWork was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0; 25171 // We're about to mutate the work-in-progress tree. If the root was pending
27630 isPerformingWork = true; 25172 // commit, it no longer is: we'll need to complete it again.
25173 root.isReadyForCommit = false;
27631 25174
27632 // The priority context changes during the render phase. We'll need to 25175 // Check if we're starting from a fresh stack, or if we're resuming from
27633 // reset it at the end. 25176 // previously yielded work.
27634 var previousPriorityContext = priorityContext; 25177 if (root !== nextRoot || expirationTime !== nextRenderExpirationTime || nextUnitOfWork === null) {
25178 // Reset the stack and start working from the root.
25179 resetContextStack();
25180 nextRoot = root;
25181 nextRenderExpirationTime = expirationTime;
25182 nextUnitOfWork = createWorkInProgress(nextRoot.current, null, expirationTime);
25183 }
25184
25185 startWorkLoopTimer(nextUnitOfWork);
27635 25186
27636 var didError = false; 25187 var didError = false;
27637 var error = null; 25188 var error = null;
27638 { 25189 {
27639 invokeGuardedCallback$1(null, workLoop, null, minPriorityLevel, deadline); 25190 invokeGuardedCallback$1(null, workLoop, null, expirationTime);
27640 if (hasCaughtError()) { 25191 if (hasCaughtError()) {
27641 didError = true; 25192 didError = true;
27642 error = clearCaughtError(); 25193 error = clearCaughtError();
@@ -27673,7 +25224,7 @@ var ReactFiberScheduler = function (config) {
27673 didError = false; 25224 didError = false;
27674 error = null; 25225 error = null;
27675 { 25226 {
27676 invokeGuardedCallback$1(null, performWorkCatchBlock, null, failedWork, boundary, minPriorityLevel, deadline); 25227 invokeGuardedCallback$1(null, renderRootCatchBlock, null, root, failedWork, boundary, expirationTime);
27677 if (hasCaughtError()) { 25228 if (hasCaughtError()) {
27678 didError = true; 25229 didError = true;
27679 error = clearCaughtError(); 25230 error = clearCaughtError();
@@ -27684,47 +25235,28 @@ var ReactFiberScheduler = function (config) {
27684 break; 25235 break;
27685 } 25236 }
27686 25237
27687 // Reset the priority context to its previous value. 25238 var uncaughtError = firstUncaughtError;
27688 priorityContext = previousPriorityContext;
27689
27690 // If we're inside a callback, set this to false, since we just flushed it.
27691 if (deadline !== null) {
27692 isCallbackScheduled = false;
27693 }
27694 // If there's remaining async work, make sure we schedule another callback.
27695 if (nextPriorityLevel > TaskPriority$1 && !isCallbackScheduled) {
27696 scheduleDeferredCallback(performDeferredWork);
27697 isCallbackScheduled = true;
27698 }
27699
27700 var errorToThrow = firstUncaughtError;
27701 25239
27702 // We're done performing work. Time to clean up. 25240 // We're done performing work. Time to clean up.
27703 isPerformingWork = false; 25241 stopWorkLoopTimer(interruptedBy);
27704 deadlineHasExpired = false; 25242 interruptedBy = null;
25243 isWorking = false;
27705 didFatal = false; 25244 didFatal = false;
27706 firstUncaughtError = null; 25245 firstUncaughtError = null;
27707 capturedErrors = null;
27708 failedBoundaries = null;
27709 nextRenderedTree = null;
27710 nestedUpdateCount = 0;
27711 25246
27712 { 25247 if (uncaughtError !== null) {
27713 stopWorkLoopTimer(); 25248 onUncaughtError(uncaughtError);
27714 } 25249 }
27715 25250
27716 // It's safe to throw any unhandled errors. 25251 return root.isReadyForCommit ? root.current.alternate : null;
27717 if (errorToThrow !== null) {
27718 throw errorToThrow;
27719 }
27720 } 25252 }
27721 25253
27722 // Returns the boundary that captured the error, or null if the error is ignored 25254 // Returns the boundary that captured the error, or null if the error is ignored
27723 function captureError(failedWork, error) { 25255 function captureError(failedWork, error) {
27724 // It is no longer valid because we exited the user code. 25256 // It is no longer valid because we exited the user code.
27725 ReactCurrentOwner$1.current = null; 25257 ReactCurrentOwner.current = null;
27726 { 25258 {
27727 ReactDebugCurrentFiber$3.resetCurrentFiber(); 25259 ReactDebugCurrentFiber.resetCurrentFiber();
27728 } 25260 }
27729 25261
27730 // Search for the nearest error boundary. 25262 // Search for the nearest error boundary.
@@ -27738,7 +25270,7 @@ var ReactFiberScheduler = function (config) {
27738 // Host containers are a special case. If the failed work itself is a host 25270 // Host containers are a special case. If the failed work itself is a host
27739 // container, then it acts as its own boundary. In all other cases, we 25271 // container, then it acts as its own boundary. In all other cases, we
27740 // ignore the work itself and only search through the parents. 25272 // ignore the work itself and only search through the parents.
27741 if (failedWork.tag === HostRoot$6) { 25273 if (failedWork.tag === HostRoot) {
27742 boundary = failedWork; 25274 boundary = failedWork;
27743 25275
27744 if (isFailedBoundary(failedWork)) { 25276 if (isFailedBoundary(failedWork)) {
@@ -27750,17 +25282,17 @@ var ReactFiberScheduler = function (config) {
27750 } else { 25282 } else {
27751 var node = failedWork['return']; 25283 var node = failedWork['return'];
27752 while (node !== null && boundary === null) { 25284 while (node !== null && boundary === null) {
27753 if (node.tag === ClassComponent$5) { 25285 if (node.tag === ClassComponent) {
27754 var instance = node.stateNode; 25286 var instance = node.stateNode;
27755 if (typeof instance.componentDidCatch === 'function') { 25287 if (typeof instance.componentDidCatch === 'function') {
27756 errorBoundaryFound = true; 25288 errorBoundaryFound = true;
27757 errorBoundaryName = getComponentName_1(node); 25289 errorBoundaryName = getComponentName(node);
27758 25290
27759 // Found an error boundary! 25291 // Found an error boundary!
27760 boundary = node; 25292 boundary = node;
27761 willRetry = true; 25293 willRetry = true;
27762 } 25294 }
27763 } else if (node.tag === HostRoot$6) { 25295 } else if (node.tag === HostRoot) {
27764 // Treat the root like a no-op error boundary 25296 // Treat the root like a no-op error boundary
27765 boundary = node; 25297 boundary = node;
27766 } 25298 }
@@ -27805,8 +25337,8 @@ var ReactFiberScheduler = function (config) {
27805 // We might be in the commit phase when an error is captured. 25337 // We might be in the commit phase when an error is captured.
27806 // The risk is that the return path from this Fiber may not be accurate. 25338 // The risk is that the return path from this Fiber may not be accurate.
27807 // That risk is acceptable given the benefit of providing users more context. 25339 // That risk is acceptable given the benefit of providing users more context.
27808 var _componentStack = getStackAddendumByWorkInProgressFiber$2(failedWork); 25340 var _componentStack = getStackAddendumByWorkInProgressFiber(failedWork);
27809 var _componentName = getComponentName_1(failedWork); 25341 var _componentName = getComponentName(failedWork);
27810 25342
27811 // Add to the collection of captured errors. This is stored as a global 25343 // Add to the collection of captured errors. This is stored as a global
27812 // map of errors and their component stack location keyed by the boundaries 25344 // map of errors and their component stack location keyed by the boundaries
@@ -27887,7 +25419,7 @@ var ReactFiberScheduler = function (config) {
27887 !(capturedError != null) ? invariant(false, 'No error for given unit of work. This error is likely caused by a bug in React. Please file an issue.') : void 0; 25419 !(capturedError != null) ? invariant(false, 'No error for given unit of work. This error is likely caused by a bug in React. Please file an issue.') : void 0;
27888 25420
27889 switch (effectfulFiber.tag) { 25421 switch (effectfulFiber.tag) {
27890 case ClassComponent$5: 25422 case ClassComponent:
27891 var instance = effectfulFiber.stateNode; 25423 var instance = effectfulFiber.stateNode;
27892 25424
27893 var info = { 25425 var info = {
@@ -27898,11 +25430,8 @@ var ReactFiberScheduler = function (config) {
27898 // an update to itself 25430 // an update to itself
27899 instance.componentDidCatch(capturedError.error, info); 25431 instance.componentDidCatch(capturedError.error, info);
27900 return; 25432 return;
27901 case HostRoot$6: 25433 case HostRoot:
27902 if (firstUncaughtError === null) { 25434 if (firstUncaughtError === null) {
27903 // If this is the host container, we treat it as a no-op error
27904 // boundary. We'll throw the first uncaught error once it's safe to
27905 // do so, at the end of the batch.
27906 firstUncaughtError = capturedError.error; 25435 firstUncaughtError = capturedError.error;
27907 } 25436 }
27908 return; 25437 return;
@@ -27915,23 +25444,21 @@ var ReactFiberScheduler = function (config) {
27915 var node = from; 25444 var node = from;
27916 while (node !== null) { 25445 while (node !== null) {
27917 switch (node.tag) { 25446 switch (node.tag) {
27918 case ClassComponent$5: 25447 case ClassComponent:
27919 popContextProvider$1(node); 25448 popContextProvider(node);
27920 break; 25449 break;
27921 case HostComponent$6: 25450 case HostComponent:
27922 popHostContext(node); 25451 popHostContext(node);
27923 break; 25452 break;
27924 case HostRoot$6: 25453 case HostRoot:
27925 popHostContainer(node); 25454 popHostContainer(node);
27926 break; 25455 break;
27927 case HostPortal$3: 25456 case HostPortal:
27928 popHostContainer(node); 25457 popHostContainer(node);
27929 break; 25458 break;
27930 } 25459 }
27931 if (node === to || node.alternate === to) { 25460 if (node === to || node.alternate === to) {
27932 { 25461 stopFailedWorkTimer(node);
27933 stopFailedWorkTimer(node);
27934 }
27935 break; 25462 break;
27936 } else { 25463 } else {
27937 stopWorkTimer(node); 25464 stopWorkTimer(node);
@@ -27940,105 +25467,89 @@ var ReactFiberScheduler = function (config) {
27940 } 25467 }
27941 } 25468 }
27942 25469
27943 function scheduleRoot(root, priorityLevel) { 25470 function computeAsyncExpiration() {
27944 if (priorityLevel === NoWork$2) { 25471 // Given the current clock time, returns an expiration time. We use rounding
27945 return; 25472 // to batch like updates together.
27946 } 25473 // Should complete within ~1000ms. 1200ms max.
25474 var currentTime = recalculateCurrentTime();
25475 var expirationMs = 1000;
25476 var bucketSizeMs = 200;
25477 return computeExpirationBucket(currentTime, expirationMs, bucketSizeMs);
25478 }
27947 25479
27948 if (!root.isScheduled) { 25480 function computeExpirationForFiber(fiber) {
27949 root.isScheduled = true; 25481 var expirationTime = void 0;
27950 if (lastScheduledRoot) { 25482 if (expirationContext !== NoWork) {
27951 // Schedule ourselves to the end. 25483 // An explicit expiration context was set;
27952 lastScheduledRoot.nextScheduledRoot = root; 25484 expirationTime = expirationContext;
27953 lastScheduledRoot = root; 25485 } else if (isWorking) {
25486 if (isCommitting) {
25487 // Updates that occur during the commit phase should have sync priority
25488 // by default.
25489 expirationTime = Sync;
27954 } else { 25490 } else {
27955 // We're the only work scheduled. 25491 // Updates during the render phase should expire at the same time as
27956 nextScheduledRoot = root; 25492 // the work that is being rendered.
27957 lastScheduledRoot = root; 25493 expirationTime = nextRenderExpirationTime;
25494 }
25495 } else {
25496 // No explicit expiration context was set, and we're not currently
25497 // performing work. Calculate a new expiration time.
25498 if (useSyncScheduling && !(fiber.internalContextTag & AsyncUpdates)) {
25499 // This is a sync update
25500 expirationTime = Sync;
25501 } else {
25502 // This is an async update
25503 expirationTime = computeAsyncExpiration();
27958 } 25504 }
27959 } 25505 }
25506 return expirationTime;
27960 } 25507 }
27961 25508
27962 function scheduleUpdate(fiber, priorityLevel) { 25509 function scheduleWork(fiber, expirationTime) {
27963 return scheduleUpdateImpl(fiber, priorityLevel, false); 25510 return scheduleWorkImpl(fiber, expirationTime, false);
27964 } 25511 }
27965 25512
27966 function scheduleUpdateImpl(fiber, priorityLevel, isErrorRecovery) { 25513 function scheduleWorkImpl(fiber, expirationTime, isErrorRecovery) {
27967 { 25514 recordScheduleUpdate();
27968 recordScheduleUpdate();
27969 }
27970
27971 if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
27972 didFatal = true;
27973 invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');
27974 }
27975
27976 if (!isPerformingWork && priorityLevel <= nextPriorityLevel) {
27977 // We must reset the current unit of work pointer so that we restart the
27978 // search from the root during the next tick, in case there is now higher
27979 // priority work somewhere earlier than before.
27980 nextUnitOfWork = null;
27981 }
27982 25515
27983 { 25516 {
27984 if (!isErrorRecovery && fiber.tag === ClassComponent$5) { 25517 if (!isErrorRecovery && fiber.tag === ClassComponent) {
27985 var instance = fiber.stateNode; 25518 var instance = fiber.stateNode;
27986 warnAboutInvalidUpdates(instance); 25519 warnAboutInvalidUpdates(instance);
27987 } 25520 }
27988 } 25521 }
27989 25522
27990 var node = fiber; 25523 var node = fiber;
27991 var shouldContinue = true; 25524 while (node !== null) {
27992 while (node !== null && shouldContinue) { 25525 // Walk the parent path to the root and update each node's
27993 // Walk the parent path to the root and update each node's priority. Once 25526 // expiration time.
27994 // we reach a node whose priority matches (and whose alternate's priority 25527 if (node.expirationTime === NoWork || node.expirationTime > expirationTime) {
27995 // matches) we can exit safely knowing that the rest of the path is correct. 25528 node.expirationTime = expirationTime;
27996 shouldContinue = false;
27997 if (node.pendingWorkPriority === NoWork$2 || node.pendingWorkPriority > priorityLevel) {
27998 // Priority did not match. Update and keep going.
27999 shouldContinue = true;
28000 node.pendingWorkPriority = priorityLevel;
28001 } 25529 }
28002 if (node.alternate !== null) { 25530 if (node.alternate !== null) {
28003 if (node.alternate.pendingWorkPriority === NoWork$2 || node.alternate.pendingWorkPriority > priorityLevel) { 25531 if (node.alternate.expirationTime === NoWork || node.alternate.expirationTime > expirationTime) {
28004 // Priority did not match. Update and keep going. 25532 node.alternate.expirationTime = expirationTime;
28005 shouldContinue = true;
28006 node.alternate.pendingWorkPriority = priorityLevel;
28007 } 25533 }
28008 } 25534 }
28009 if (node['return'] === null) { 25535 if (node['return'] === null) {
28010 if (node.tag === HostRoot$6) { 25536 if (node.tag === HostRoot) {
28011 var root = node.stateNode; 25537 var root = node.stateNode;
28012 scheduleRoot(root, priorityLevel); 25538 if (!isWorking && root === nextRoot && expirationTime <= nextRenderExpirationTime) {
28013 if (!isPerformingWork) { 25539 // Restart the root from the top.
28014 switch (priorityLevel) { 25540 if (nextUnitOfWork !== null) {
28015 case SynchronousPriority$1: 25541 // This is an interruption. (Used for performance tracking.)
28016 // Perform this update now. 25542 interruptedBy = fiber;
28017 if (isUnbatchingUpdates) {
28018 // We're inside unbatchedUpdates, which is inside either
28019 // batchedUpdates or a lifecycle. We should only flush
28020 // synchronous work, not task work.
28021 performWork(SynchronousPriority$1, null);
28022 } else {
28023 // Flush both synchronous and task work.
28024 performWork(TaskPriority$1, null);
28025 }
28026 break;
28027 case TaskPriority$1:
28028 !isBatchingUpdates ? invariant(false, 'Task updates can only be scheduled as a nested update or inside batchedUpdates.') : void 0;
28029 break;
28030 default:
28031 // Schedule a callback to perform the work later.
28032 if (!isCallbackScheduled) {
28033 scheduleDeferredCallback(performDeferredWork);
28034 isCallbackScheduled = true;
28035 }
28036 } 25543 }
25544 nextRoot = null;
25545 nextUnitOfWork = null;
25546 nextRenderExpirationTime = NoWork;
28037 } 25547 }
25548 requestWork(root, expirationTime);
28038 } else { 25549 } else {
28039 { 25550 {
28040 if (!isErrorRecovery && fiber.tag === ClassComponent$5) { 25551 if (!isErrorRecovery && fiber.tag === ClassComponent) {
28041 warnAboutUpdateOnUnmounted(fiber.stateNode); 25552 warnAboutUpdateOnUnmounted(fiber);
28042 } 25553 }
28043 } 25554 }
28044 return; 25555 return;
@@ -28048,28 +25559,310 @@ var ReactFiberScheduler = function (config) {
28048 } 25559 }
28049 } 25560 }
28050 25561
28051 function getPriorityContext(fiber, forceAsync) { 25562 function scheduleErrorRecovery(fiber) {
28052 var priorityLevel = priorityContext; 25563 scheduleWorkImpl(fiber, Sync, true);
28053 if (priorityLevel === NoWork$2) { 25564 }
28054 if (!useSyncScheduling || fiber.internalContextTag & AsyncUpdates || forceAsync) { 25565
28055 priorityLevel = LowPriority; 25566 function recalculateCurrentTime() {
25567 // Subtract initial time so it fits inside 32bits
25568 var ms = now() - startTime;
25569 mostRecentCurrentTime = msToExpirationTime(ms);
25570 return mostRecentCurrentTime;
25571 }
25572
25573 function deferredUpdates(fn) {
25574 var previousExpirationContext = expirationContext;
25575 expirationContext = computeAsyncExpiration();
25576 try {
25577 return fn();
25578 } finally {
25579 expirationContext = previousExpirationContext;
25580 }
25581 }
25582
25583 function syncUpdates(fn) {
25584 var previousExpirationContext = expirationContext;
25585 expirationContext = Sync;
25586 try {
25587 return fn();
25588 } finally {
25589 expirationContext = previousExpirationContext;
25590 }
25591 }
25592
25593 // TODO: Everything below this is written as if it has been lifted to the
25594 // renderers. I'll do this in a follow-up.
25595
25596 // Linked-list of roots
25597 var firstScheduledRoot = null;
25598 var lastScheduledRoot = null;
25599
25600 var isCallbackScheduled = false;
25601 var isRendering = false;
25602 var nextFlushedRoot = null;
25603 var nextFlushedExpirationTime = NoWork;
25604 var deadlineDidExpire = false;
25605 var hasUnhandledError = false;
25606 var unhandledError = null;
25607 var deadline = null;
25608
25609 var isBatchingUpdates = false;
25610 var isUnbatchingUpdates = false;
25611
25612 // Use these to prevent an infinite loop of nested updates
25613 var NESTED_UPDATE_LIMIT = 1000;
25614 var nestedUpdateCount = 0;
25615
25616 var timeHeuristicForUnitOfWork = 1;
25617
25618 // requestWork is called by the scheduler whenever a root receives an update.
25619 // It's up to the renderer to call renderRoot at some point in the future.
25620 function requestWork(root, expirationTime) {
25621 if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
25622 invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');
25623 }
25624
25625 // Add the root to the schedule.
25626 // Check if this root is already part of the schedule.
25627 if (root.nextScheduledRoot === null) {
25628 // This root is not already scheduled. Add it.
25629 root.remainingExpirationTime = expirationTime;
25630 if (lastScheduledRoot === null) {
25631 firstScheduledRoot = lastScheduledRoot = root;
25632 root.nextScheduledRoot = root;
28056 } else { 25633 } else {
28057 priorityLevel = SynchronousPriority$1; 25634 lastScheduledRoot.nextScheduledRoot = root;
25635 lastScheduledRoot = root;
25636 lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;
25637 }
25638 } else {
25639 // This root is already scheduled, but its priority may have increased.
25640 var remainingExpirationTime = root.remainingExpirationTime;
25641 if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {
25642 // Update the priority.
25643 root.remainingExpirationTime = expirationTime;
28058 } 25644 }
28059 } 25645 }
28060 25646
28061 // If we're in a batch, or if we're already performing work, downgrade sync 25647 if (isRendering) {
28062 // priority to task priority 25648 // Prevent reentrancy. Remaining work will be scheduled at the end of
28063 if (priorityLevel === SynchronousPriority$1 && (isPerformingWork || isBatchingUpdates)) { 25649 // the currently rendering batch.
28064 return TaskPriority$1; 25650 return;
25651 }
25652
25653 if (isBatchingUpdates) {
25654 // Flush work at the end of the batch.
25655 if (isUnbatchingUpdates) {
25656 // ...unless we're inside unbatchedUpdates, in which case we should
25657 // flush it now.
25658 performWorkOnRoot(root, Sync);
25659 }
25660 return;
25661 }
25662
25663 // TODO: Get rid of Sync and use current time?
25664 if (expirationTime === Sync) {
25665 performWork(Sync, null);
25666 } else if (!isCallbackScheduled) {
25667 isCallbackScheduled = true;
25668 startRequestCallbackTimer();
25669 scheduleDeferredCallback(performAsyncWork);
28065 } 25670 }
28066 return priorityLevel;
28067 } 25671 }
28068 25672
28069 function scheduleErrorRecovery(fiber) { 25673 function findHighestPriorityRoot() {
28070 scheduleUpdateImpl(fiber, TaskPriority$1, true); 25674 var highestPriorityWork = NoWork;
25675 var highestPriorityRoot = null;
25676
25677 if (lastScheduledRoot !== null) {
25678 var previousScheduledRoot = lastScheduledRoot;
25679 var root = firstScheduledRoot;
25680 while (root !== null) {
25681 var remainingExpirationTime = root.remainingExpirationTime;
25682 if (remainingExpirationTime === NoWork) {
25683 // This root no longer has work. Remove it from the scheduler.
25684
25685 // TODO: This check is redudant, but Flow is confused by the branch
25686 // below where we set lastScheduledRoot to null, even though we break
25687 // from the loop right after.
25688 !(previousScheduledRoot !== null && lastScheduledRoot !== null) ? invariant(false, 'Should have a previous and last root. This error is likely caused by a bug in React. Please file an issue.') : void 0;
25689 if (root === root.nextScheduledRoot) {
25690 // This is the only root in the list.
25691 root.nextScheduledRoot = null;
25692 firstScheduledRoot = lastScheduledRoot = null;
25693 break;
25694 } else if (root === firstScheduledRoot) {
25695 // This is the first root in the list.
25696 var next = root.nextScheduledRoot;
25697 firstScheduledRoot = next;
25698 lastScheduledRoot.nextScheduledRoot = next;
25699 root.nextScheduledRoot = null;
25700 } else if (root === lastScheduledRoot) {
25701 // This is the last root in the list.
25702 lastScheduledRoot = previousScheduledRoot;
25703 lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;
25704 root.nextScheduledRoot = null;
25705 break;
25706 } else {
25707 previousScheduledRoot.nextScheduledRoot = root.nextScheduledRoot;
25708 root.nextScheduledRoot = null;
25709 }
25710 root = previousScheduledRoot.nextScheduledRoot;
25711 } else {
25712 if (highestPriorityWork === NoWork || remainingExpirationTime < highestPriorityWork) {
25713 // Update the priority, if it's higher
25714 highestPriorityWork = remainingExpirationTime;
25715 highestPriorityRoot = root;
25716 }
25717 if (root === lastScheduledRoot) {
25718 break;
25719 }
25720 previousScheduledRoot = root;
25721 root = root.nextScheduledRoot;
25722 }
25723 }
25724 }
25725
25726 // If the next root is the same as the previous root, this is a nested
25727 // update. To prevent an infinite loop, increment the nested update count.
25728 var previousFlushedRoot = nextFlushedRoot;
25729 if (previousFlushedRoot !== null && previousFlushedRoot === highestPriorityRoot) {
25730 nestedUpdateCount++;
25731 } else {
25732 // Reset whenever we switch roots.
25733 nestedUpdateCount = 0;
25734 }
25735 nextFlushedRoot = highestPriorityRoot;
25736 nextFlushedExpirationTime = highestPriorityWork;
25737 }
25738
25739 function performAsyncWork(dl) {
25740 performWork(NoWork, dl);
28071 } 25741 }
28072 25742
25743 function performWork(minExpirationTime, dl) {
25744 deadline = dl;
25745
25746 // Keep working on roots until there's no more work, or until the we reach
25747 // the deadline.
25748 findHighestPriorityRoot();
25749
25750 if (enableUserTimingAPI && deadline !== null) {
25751 var didExpire = nextFlushedExpirationTime < recalculateCurrentTime();
25752 stopRequestCallbackTimer(didExpire);
25753 }
25754
25755 while (nextFlushedRoot !== null && nextFlushedExpirationTime !== NoWork && (minExpirationTime === NoWork || nextFlushedExpirationTime <= minExpirationTime) && !deadlineDidExpire) {
25756 performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);
25757 // Find the next highest priority work.
25758 findHighestPriorityRoot();
25759 }
25760
25761 // We're done flushing work. Either we ran out of time in this callback,
25762 // or there's no more work left with sufficient priority.
25763
25764 // If we're inside a callback, set this to false since we just completed it.
25765 if (deadline !== null) {
25766 isCallbackScheduled = false;
25767 }
25768 // If there's work left over, schedule a new callback.
25769 if (nextFlushedRoot !== null && !isCallbackScheduled) {
25770 isCallbackScheduled = true;
25771 startRequestCallbackTimer();
25772 scheduleDeferredCallback(performAsyncWork);
25773 }
25774
25775 // Clean-up.
25776 deadline = null;
25777 deadlineDidExpire = false;
25778 nestedUpdateCount = 0;
25779
25780 if (hasUnhandledError) {
25781 var _error4 = unhandledError;
25782 unhandledError = null;
25783 hasUnhandledError = false;
25784 throw _error4;
25785 }
25786 }
25787
25788 function performWorkOnRoot(root, expirationTime) {
25789 !!isRendering ? invariant(false, 'performWorkOnRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;
25790
25791 isRendering = true;
25792
25793 // Check if this is async work or sync/expired work.
25794 // TODO: Pass current time as argument to renderRoot, commitRoot
25795 if (expirationTime <= recalculateCurrentTime()) {
25796 // Flush sync work.
25797 var finishedWork = root.finishedWork;
25798 if (finishedWork !== null) {
25799 // This root is already complete. We can commit it.
25800 root.finishedWork = null;
25801 root.remainingExpirationTime = commitRoot(finishedWork);
25802 } else {
25803 root.finishedWork = null;
25804 finishedWork = renderRoot(root, expirationTime);
25805 if (finishedWork !== null) {
25806 // We've completed the root. Commit it.
25807 root.remainingExpirationTime = commitRoot(finishedWork);
25808 }
25809 }
25810 } else {
25811 // Flush async work.
25812 var _finishedWork = root.finishedWork;
25813 if (_finishedWork !== null) {
25814 // This root is already complete. We can commit it.
25815 root.finishedWork = null;
25816 root.remainingExpirationTime = commitRoot(_finishedWork);
25817 } else {
25818 root.finishedWork = null;
25819 _finishedWork = renderRoot(root, expirationTime);
25820 if (_finishedWork !== null) {
25821 // We've completed the root. Check the deadline one more time
25822 // before committing.
25823 if (!shouldYield()) {
25824 // Still time left. Commit the root.
25825 root.remainingExpirationTime = commitRoot(_finishedWork);
25826 } else {
25827 // There's no time left. Mark this root as complete. We'll come
25828 // back and commit it later.
25829 root.finishedWork = _finishedWork;
25830 }
25831 }
25832 }
25833 }
25834
25835 isRendering = false;
25836 }
25837
25838 // When working on async work, the reconciler asks the renderer if it should
25839 // yield execution. For DOM, we implement this with requestIdleCallback.
25840 function shouldYield() {
25841 if (deadline === null) {
25842 return false;
25843 }
25844 if (deadline.timeRemaining() > timeHeuristicForUnitOfWork) {
25845 return false;
25846 }
25847 deadlineDidExpire = true;
25848 return true;
25849 }
25850
25851 // TODO: Not happy about this hook. Conceptually, renderRoot should return a
25852 // tuple of (isReadyForCommit, didError, error)
25853 function onUncaughtError(error) {
25854 !(nextFlushedRoot !== null) ? invariant(false, 'Should be working on a root. This error is likely caused by a bug in React. Please file an issue.') : void 0;
25855 // Unschedule this root so we don't work on it again until there's
25856 // another update.
25857 nextFlushedRoot.remainingExpirationTime = NoWork;
25858 if (!hasUnhandledError) {
25859 hasUnhandledError = true;
25860 unhandledError = error;
25861 }
25862 }
25863
25864 // TODO: Batching should be implemented at the renderer level, not inside
25865 // the reconciler.
28073 function batchedUpdates(fn, a) { 25866 function batchedUpdates(fn, a) {
28074 var previousIsBatchingUpdates = isBatchingUpdates; 25867 var previousIsBatchingUpdates = isBatchingUpdates;
28075 isBatchingUpdates = true; 25868 isBatchingUpdates = true;
@@ -28077,57 +25870,44 @@ var ReactFiberScheduler = function (config) {
28077 return fn(a); 25870 return fn(a);
28078 } finally { 25871 } finally {
28079 isBatchingUpdates = previousIsBatchingUpdates; 25872 isBatchingUpdates = previousIsBatchingUpdates;
28080 // If we're not already inside a batch, we need to flush any task work 25873 if (!isBatchingUpdates && !isRendering) {
28081 // that was created by the user-provided function. 25874 performWork(Sync, null);
28082 if (!isPerformingWork && !isBatchingUpdates) {
28083 performWork(TaskPriority$1, null);
28084 } 25875 }
28085 } 25876 }
28086 } 25877 }
28087 25878
25879 // TODO: Batching should be implemented at the renderer level, not inside
25880 // the reconciler.
28088 function unbatchedUpdates(fn) { 25881 function unbatchedUpdates(fn) {
28089 var previousIsUnbatchingUpdates = isUnbatchingUpdates; 25882 if (isBatchingUpdates && !isUnbatchingUpdates) {
28090 var previousIsBatchingUpdates = isBatchingUpdates; 25883 isUnbatchingUpdates = true;
28091 // This is only true if we're nested inside batchedUpdates. 25884 try {
28092 isUnbatchingUpdates = isBatchingUpdates; 25885 return fn();
28093 isBatchingUpdates = false; 25886 } finally {
28094 try { 25887 isUnbatchingUpdates = false;
28095 return fn(); 25888 }
28096 } finally {
28097 isBatchingUpdates = previousIsBatchingUpdates;
28098 isUnbatchingUpdates = previousIsUnbatchingUpdates;
28099 } 25889 }
25890 return fn();
28100 } 25891 }
28101 25892
28102 function flushSync(batch) { 25893 // TODO: Batching should be implemented at the renderer level, not within
25894 // the reconciler.
25895 function flushSync(fn) {
28103 var previousIsBatchingUpdates = isBatchingUpdates; 25896 var previousIsBatchingUpdates = isBatchingUpdates;
28104 var previousPriorityContext = priorityContext;
28105 isBatchingUpdates = true; 25897 isBatchingUpdates = true;
28106 priorityContext = SynchronousPriority$1;
28107 try { 25898 try {
28108 return batch(); 25899 return syncUpdates(fn);
28109 } finally { 25900 } finally {
28110 isBatchingUpdates = previousIsBatchingUpdates; 25901 isBatchingUpdates = previousIsBatchingUpdates;
28111 priorityContext = previousPriorityContext; 25902 !!isRendering ? invariant(false, 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.') : void 0;
28112 25903 performWork(Sync, null);
28113 !!isPerformingWork ? invariant(false, 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.') : void 0;
28114 performWork(TaskPriority$1, null);
28115 }
28116 }
28117
28118 function deferredUpdates(fn) {
28119 var previousPriorityContext = priorityContext;
28120 priorityContext = LowPriority;
28121 try {
28122 return fn();
28123 } finally {
28124 priorityContext = previousPriorityContext;
28125 } 25904 }
28126 } 25905 }
28127 25906
28128 return { 25907 return {
28129 scheduleUpdate: scheduleUpdate, 25908 computeAsyncExpiration: computeAsyncExpiration,
28130 getPriorityContext: getPriorityContext, 25909 computeExpirationForFiber: computeExpirationForFiber,
25910 scheduleWork: scheduleWork,
28131 batchedUpdates: batchedUpdates, 25911 batchedUpdates: batchedUpdates,
28132 unbatchedUpdates: unbatchedUpdates, 25912 unbatchedUpdates: unbatchedUpdates,
28133 flushSync: flushSync, 25913 flushSync: flushSync,
@@ -28135,79 +25915,31 @@ var ReactFiberScheduler = function (config) {
28135 }; 25915 };
28136}; 25916};
28137 25917
28138/** 25918{
28139 * Copyright (c) 2013-present, Facebook, Inc. 25919 var didWarnAboutNestedUpdates = false;
28140 * 25920}
28141 * This source code is licensed under the MIT license found in the
28142 * LICENSE file in the root directory of this source tree.
28143 *
28144 * @providesModule getContextForSubtree
28145 *
28146 */
28147
28148
28149
28150
28151 25921
25922// 0 is PROD, 1 is DEV.
25923// Might add PROFILE later.
28152 25924
28153var getContextFiber = function (arg) {
28154 invariant(false, 'Missing injection for fiber getContextForSubtree');
28155};
28156 25925
28157function getContextForSubtree(parentComponent) { 25926function getContextForSubtree(parentComponent) {
28158 if (!parentComponent) { 25927 if (!parentComponent) {
28159 return emptyObject; 25928 return emptyObject;
28160 } 25929 }
28161 25930
28162 var instance = ReactInstanceMap_1.get(parentComponent); 25931 var fiber = get(parentComponent);
28163 if (typeof instance.tag === 'number') {
28164 return getContextFiber(instance);
28165 } else {
28166 return instance._processChildContext(instance._context);
28167 }
28168}
28169
28170getContextForSubtree._injectFiber = function (fn) {
28171 getContextFiber = fn;
28172};
28173
28174var getContextForSubtree_1 = getContextForSubtree;
28175
28176var addTopLevelUpdate = ReactFiberUpdateQueue.addTopLevelUpdate;
28177
28178var findCurrentUnmaskedContext = ReactFiberContext.findCurrentUnmaskedContext;
28179var isContextProvider = ReactFiberContext.isContextProvider;
28180var processChildContext = ReactFiberContext.processChildContext;
28181
28182var createFiberRoot = ReactFiberRoot.createFiberRoot;
28183
28184
28185
28186var HostComponent$3 = ReactTypeOfWork.HostComponent;
28187
28188{
28189 var warning$18 = require$$0;
28190 var ReactFiberInstrumentation = ReactFiberInstrumentation_1;
28191 var ReactDebugCurrentFiber$1 = ReactDebugCurrentFiber_1;
28192 var getComponentName$4 = getComponentName_1;
28193}
28194
28195var findCurrentHostFiber$1 = ReactFiberTreeReflection.findCurrentHostFiber;
28196var findCurrentHostFiberWithNoPortals$1 = ReactFiberTreeReflection.findCurrentHostFiberWithNoPortals;
28197
28198
28199
28200getContextForSubtree_1._injectFiber(function (fiber) {
28201 var parentContext = findCurrentUnmaskedContext(fiber); 25932 var parentContext = findCurrentUnmaskedContext(fiber);
28202 return isContextProvider(fiber) ? processChildContext(fiber, parentContext, false) : parentContext; 25933 return isContextProvider(fiber) ? processChildContext(fiber, parentContext) : parentContext;
28203}); 25934}
28204 25935
28205var ReactFiberReconciler = function (config) { 25936var ReactFiberReconciler$1 = function (config) {
28206 var getPublicInstance = config.getPublicInstance; 25937 var getPublicInstance = config.getPublicInstance;
28207 25938
28208 var _ReactFiberScheduler = ReactFiberScheduler(config), 25939 var _ReactFiberScheduler = ReactFiberScheduler(config),
28209 scheduleUpdate = _ReactFiberScheduler.scheduleUpdate, 25940 computeAsyncExpiration = _ReactFiberScheduler.computeAsyncExpiration,
28210 getPriorityContext = _ReactFiberScheduler.getPriorityContext, 25941 computeExpirationForFiber = _ReactFiberScheduler.computeExpirationForFiber,
25942 scheduleWork = _ReactFiberScheduler.scheduleWork,
28211 batchedUpdates = _ReactFiberScheduler.batchedUpdates, 25943 batchedUpdates = _ReactFiberScheduler.batchedUpdates,
28212 unbatchedUpdates = _ReactFiberScheduler.unbatchedUpdates, 25944 unbatchedUpdates = _ReactFiberScheduler.unbatchedUpdates,
28213 flushSync = _ReactFiberScheduler.flushSync, 25945 flushSync = _ReactFiberScheduler.flushSync,
@@ -28215,46 +25947,69 @@ var ReactFiberReconciler = function (config) {
28215 25947
28216 function scheduleTopLevelUpdate(current, element, callback) { 25948 function scheduleTopLevelUpdate(current, element, callback) {
28217 { 25949 {
28218 if (ReactDebugCurrentFiber$1.phase === 'render' && ReactDebugCurrentFiber$1.current !== null) { 25950 if (ReactDebugCurrentFiber.phase === 'render' && ReactDebugCurrentFiber.current !== null && !didWarnAboutNestedUpdates) {
28219 warning$18(false, 'Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + 'Check the render method of %s.', getComponentName$4(ReactDebugCurrentFiber$1.current) || 'Unknown'); 25951 didWarnAboutNestedUpdates = true;
25952 warning(false, 'Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + 'Check the render method of %s.', getComponentName(ReactDebugCurrentFiber.current) || 'Unknown');
28220 } 25953 }
28221 } 25954 }
28222 25955
28223 // Check if the top-level element is an async wrapper component. If so, treat
28224 // updates to the root as async. This is a bit weird but lets us avoid a separate
28225 // `renderAsync` API.
28226 var forceAsync = ReactFeatureFlags_1.enableAsyncSubtreeAPI && element != null && element.type != null && element.type.prototype != null && element.type.prototype.unstable_isAsyncReactComponent === true;
28227 var priorityLevel = getPriorityContext(current, forceAsync);
28228 var nextState = { element: element };
28229 callback = callback === undefined ? null : callback; 25956 callback = callback === undefined ? null : callback;
28230 { 25957 {
28231 warning$18(callback === null || typeof callback === 'function', 'render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback); 25958 warning(callback === null || typeof callback === 'function', 'render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);
25959 }
25960
25961 var expirationTime = void 0;
25962 // Check if the top-level element is an async wrapper component. If so,
25963 // treat updates to the root as async. This is a bit weird but lets us
25964 // avoid a separate `renderAsync` API.
25965 if (enableAsyncSubtreeAPI && element != null && element.type != null && element.type.prototype != null && element.type.prototype.unstable_isAsyncReactComponent === true) {
25966 expirationTime = computeAsyncExpiration();
25967 } else {
25968 expirationTime = computeExpirationForFiber(current);
28232 } 25969 }
28233 addTopLevelUpdate(current, nextState, callback, priorityLevel); 25970
28234 scheduleUpdate(current, priorityLevel); 25971 var update = {
25972 expirationTime: expirationTime,
25973 partialState: { element: element },
25974 callback: callback,
25975 isReplace: false,
25976 isForced: false,
25977 nextCallback: null,
25978 next: null
25979 };
25980 insertUpdateIntoFiber(current, update);
25981 scheduleWork(current, expirationTime);
25982 }
25983
25984 function findHostInstance(fiber) {
25985 var hostFiber = findCurrentHostFiber(fiber);
25986 if (hostFiber === null) {
25987 return null;
25988 }
25989 return hostFiber.stateNode;
28235 } 25990 }
28236 25991
28237 return { 25992 return {
28238 createContainer: function (containerInfo) { 25993 createContainer: function (containerInfo, hydrate) {
28239 return createFiberRoot(containerInfo); 25994 return createFiberRoot(containerInfo, hydrate);
28240 }, 25995 },
28241 updateContainer: function (element, container, parentComponent, callback) { 25996 updateContainer: function (element, container, parentComponent, callback) {
28242 // TODO: If this is a nested container, this won't be the root. 25997 // TODO: If this is a nested container, this won't be the root.
28243 var current = container.current; 25998 var current = container.current;
28244 25999
28245 { 26000 {
28246 if (ReactFiberInstrumentation.debugTool) { 26001 if (ReactFiberInstrumentation_1.debugTool) {
28247 if (current.alternate === null) { 26002 if (current.alternate === null) {
28248 ReactFiberInstrumentation.debugTool.onMountContainer(container); 26003 ReactFiberInstrumentation_1.debugTool.onMountContainer(container);
28249 } else if (element === null) { 26004 } else if (element === null) {
28250 ReactFiberInstrumentation.debugTool.onUnmountContainer(container); 26005 ReactFiberInstrumentation_1.debugTool.onUnmountContainer(container);
28251 } else { 26006 } else {
28252 ReactFiberInstrumentation.debugTool.onUpdateContainer(container); 26007 ReactFiberInstrumentation_1.debugTool.onUpdateContainer(container);
28253 } 26008 }
28254 } 26009 }
28255 } 26010 }
28256 26011
28257 var context = getContextForSubtree_1(parentComponent); 26012 var context = getContextForSubtree(parentComponent);
28258 if (container.context === null) { 26013 if (container.context === null) {
28259 container.context = context; 26014 container.context = context;
28260 } else { 26015 } else {
@@ -28279,456 +26034,194 @@ var ReactFiberReconciler = function (config) {
28279 return null; 26034 return null;
28280 } 26035 }
28281 switch (containerFiber.child.tag) { 26036 switch (containerFiber.child.tag) {
28282 case HostComponent$3: 26037 case HostComponent:
28283 return getPublicInstance(containerFiber.child.stateNode); 26038 return getPublicInstance(containerFiber.child.stateNode);
28284 default: 26039 default:
28285 return containerFiber.child.stateNode; 26040 return containerFiber.child.stateNode;
28286 } 26041 }
28287 }, 26042 },
28288 findHostInstance: function (fiber) { 26043
28289 var hostFiber = findCurrentHostFiber$1(fiber); 26044
28290 if (hostFiber === null) { 26045 findHostInstance: findHostInstance,
28291 return null; 26046
28292 }
28293 return hostFiber.stateNode;
28294 },
28295 findHostInstanceWithNoPortals: function (fiber) { 26047 findHostInstanceWithNoPortals: function (fiber) {
28296 var hostFiber = findCurrentHostFiberWithNoPortals$1(fiber); 26048 var hostFiber = findCurrentHostFiberWithNoPortals(fiber);
28297 if (hostFiber === null) { 26049 if (hostFiber === null) {
28298 return null; 26050 return null;
28299 } 26051 }
28300 return hostFiber.stateNode; 26052 return hostFiber.stateNode;
26053 },
26054 injectIntoDevTools: function (devToolsConfig) {
26055 var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
26056
26057 return injectInternals(_assign({}, devToolsConfig, {
26058 findHostInstanceByFiber: function (fiber) {
26059 return findHostInstance(fiber);
26060 },
26061 findFiberByHostInstance: function (instance) {
26062 if (!findFiberByHostInstance) {
26063 // Might not be implemented by the renderer.
26064 return null;
26065 }
26066 return findFiberByHostInstance(instance);
26067 }
26068 }));
28301 } 26069 }
28302 }; 26070 };
28303}; 26071};
28304 26072
28305var TEXT_NODE$3 = HTMLNodeType_1.TEXT_NODE; 26073var ReactFiberReconciler$2 = Object.freeze({
28306 26074 default: ReactFiberReconciler$1
28307/** 26075});
28308 * Given any node return the first leaf node without children.
28309 *
28310 * @param {DOMElement|DOMTextNode} node
28311 * @return {DOMElement|DOMTextNode}
28312 */
28313
28314
28315function getLeafNode(node) {
28316 while (node && node.firstChild) {
28317 node = node.firstChild;
28318 }
28319 return node;
28320}
28321 26076
28322/** 26077var ReactFiberReconciler$3 = ( ReactFiberReconciler$2 && ReactFiberReconciler$1 ) || ReactFiberReconciler$2;
28323 * Get the next sibling within a container. This will walk up the
28324 * DOM if a node's siblings have been exhausted.
28325 *
28326 * @param {DOMElement|DOMTextNode} node
28327 * @return {?DOMElement|DOMTextNode}
28328 */
28329function getSiblingNode(node) {
28330 while (node) {
28331 if (node.nextSibling) {
28332 return node.nextSibling;
28333 }
28334 node = node.parentNode;
28335 }
28336}
28337 26078
28338/** 26079// TODO: bundle Flow types with the package.
28339 * Get object describing the nodes which contain characters at offset.
28340 *
28341 * @param {DOMElement|DOMTextNode} root
28342 * @param {number} offset
28343 * @return {?object}
28344 */
28345function getNodeForCharacterOffset(root, offset) {
28346 var node = getLeafNode(root);
28347 var nodeStart = 0;
28348 var nodeEnd = 0;
28349 26080
28350 while (node) {
28351 if (node.nodeType === TEXT_NODE$3) {
28352 nodeEnd = nodeStart + node.textContent.length;
28353 26081
28354 if (nodeStart <= offset && nodeEnd >= offset) {
28355 return {
28356 node: node,
28357 offset: offset - nodeStart
28358 };
28359 }
28360 26082
28361 nodeStart = nodeEnd; 26083// TODO: decide on the top-level export form.
28362 } 26084// This is hacky but makes it work with both Rollup and Jest.
26085var reactReconciler = ReactFiberReconciler$3['default'] ? ReactFiberReconciler$3['default'] : ReactFiberReconciler$3;
28363 26086
28364 node = getLeafNode(getSiblingNode(node)); 26087// TODO: this is special because it gets imported during build.
28365 }
28366}
28367 26088
28368var getNodeForCharacterOffset_1 = getNodeForCharacterOffset; 26089var ReactVersion = '16.1.1';
28369 26090
28370var contentKey = null; 26091// a requestAnimationFrame, storing the time for the start of the frame, then
26092// scheduling a postMessage which gets scheduled after paint. Within the
26093// postMessage handler do as much work as possible until time + frame rate.
26094// By separating the idle call into a separate event tick we ensure that
26095// layout, paint and other browser work is counted against the available time.
26096// The frame rate is dynamically adjusted.
28371 26097
28372/** 26098{
28373 * Gets the key used to access text content on a DOM node. 26099 if (ExecutionEnvironment.canUseDOM && typeof requestAnimationFrame !== 'function') {
28374 * 26100 warning(false, 'React depends on requestAnimationFrame. Make sure that you load a ' + 'polyfill in older browsers. http://fb.me/react-polyfills');
28375 * @return {?string} Key used to access text content.
28376 * @internal
28377 */
28378function getTextContentAccessor() {
28379 if (!contentKey && ExecutionEnvironment.canUseDOM) {
28380 // Prefer textContent to innerText because many browsers support both but
28381 // SVG <text> elements don't support innerText even when <div> does.
28382 contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';
28383 } 26101 }
28384 return contentKey;
28385}
28386
28387var getTextContentAccessor_1 = getTextContentAccessor;
28388
28389/**
28390 * While `isCollapsed` is available on the Selection object and `collapsed`
28391 * is available on the Range object, IE11 sometimes gets them wrong.
28392 * If the anchor/focus nodes and offsets are the same, the range is collapsed.
28393 */
28394function isCollapsed(anchorNode, anchorOffset, focusNode$$1, focusOffset) {
28395 return anchorNode === focusNode$$1 && anchorOffset === focusOffset;
28396} 26102}
28397 26103
28398/** 26104var hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
28399 * @param {DOMElement} node
28400 * @return {?object}
28401 */
28402function getModernOffsets(node) {
28403 var selection = window.getSelection && window.getSelection();
28404
28405 if (!selection || selection.rangeCount === 0) {
28406 return null;
28407 }
28408 26105
28409 var anchorNode = selection.anchorNode; 26106var now = void 0;
28410 var anchorOffset = selection.anchorOffset; 26107if (hasNativePerformanceNow) {
28411 var focusNode$$1 = selection.focusNode; 26108 now = function () {
28412 var focusOffset = selection.focusOffset; 26109 return performance.now();
28413 26110 };
28414 var currentRange = selection.getRangeAt(0); 26111} else {
28415 26112 now = function () {
28416 // In Firefox, range.startContainer and range.endContainer can be "anonymous 26113 return Date.now();
28417 // divs", e.g. the up/down buttons on an <input type="number">. Anonymous
28418 // divs do not seem to expose properties, triggering a "Permission denied
28419 // error" if any of its properties are accessed. The only seemingly possible
28420 // way to avoid erroring is to access a property that typically works for
28421 // non-anonymous divs and catch any error that may otherwise arise. See
28422 // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
28423 try {
28424 /* eslint-disable no-unused-expressions */
28425 currentRange.startContainer.nodeType;
28426 currentRange.endContainer.nodeType;
28427 /* eslint-enable no-unused-expressions */
28428 } catch (e) {
28429 return null;
28430 }
28431
28432 // If the node and offset values are the same, the selection is collapsed.
28433 // `Selection.isCollapsed` is available natively, but IE sometimes gets
28434 // this value wrong.
28435 var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);
28436
28437 var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;
28438
28439 var tempRange = currentRange.cloneRange();
28440 tempRange.selectNodeContents(node);
28441 tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);
28442
28443 var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset);
28444
28445 var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;
28446 var end = start + rangeLength;
28447
28448 // Detect whether the selection is backward.
28449 var detectionRange = document.createRange();
28450 detectionRange.setStart(anchorNode, anchorOffset);
28451 detectionRange.setEnd(focusNode$$1, focusOffset);
28452 var isBackward = detectionRange.collapsed;
28453
28454 return {
28455 start: isBackward ? end : start,
28456 end: isBackward ? start : end
28457 }; 26114 };
28458} 26115}
28459 26116
28460/** 26117// TODO: There's no way to cancel, because Fiber doesn't atm.
28461 * In modern non-IE browsers, we can support both forward and backward 26118var rIC = void 0;
28462 * selections.
28463 *
28464 * Note: IE10+ supports the Selection object, but it does not support
28465 * the `extend` method, which means that even in modern IE, it's not possible
28466 * to programmatically create a backward selection. Thus, for all IE
28467 * versions, we use the old IE API to create our selections.
28468 *
28469 * @param {DOMElement|DOMTextNode} node
28470 * @param {object} offsets
28471 */
28472function setModernOffsets(node, offsets) {
28473 if (!window.getSelection) {
28474 return;
28475 }
28476
28477 var selection = window.getSelection();
28478 var length = node[getTextContentAccessor_1()].length;
28479 var start = Math.min(offsets.start, length);
28480 var end = offsets.end === undefined ? start : Math.min(offsets.end, length);
28481
28482 // IE 11 uses modern selection, but doesn't support the extend method.
28483 // Flip backward selections, so we can set with a single range.
28484 if (!selection.extend && start > end) {
28485 var temp = end;
28486 end = start;
28487 start = temp;
28488 }
28489
28490 var startMarker = getNodeForCharacterOffset_1(node, start);
28491 var endMarker = getNodeForCharacterOffset_1(node, end);
28492
28493 if (startMarker && endMarker) {
28494 var range = document.createRange();
28495 range.setStart(startMarker.node, startMarker.offset);
28496 selection.removeAllRanges();
28497
28498 if (start > end) {
28499 selection.addRange(range);
28500 selection.extend(endMarker.node, endMarker.offset);
28501 } else {
28502 range.setEnd(endMarker.node, endMarker.offset);
28503 selection.addRange(range);
28504 }
28505 }
28506}
28507
28508var ReactDOMSelection = {
28509 /**
28510 * @param {DOMElement} node
28511 */
28512 getOffsets: getModernOffsets,
28513
28514 /**
28515 * @param {DOMElement|DOMTextNode} node
28516 * @param {object} offsets
28517 */
28518 setOffsets: setModernOffsets
28519};
28520
28521var ReactDOMSelection_1 = ReactDOMSelection;
28522
28523var ELEMENT_NODE$2 = HTMLNodeType_1.ELEMENT_NODE;
28524
28525
28526
28527
28528 26119
28529function isInDocument(node) { 26120if (!ExecutionEnvironment.canUseDOM) {
28530 return containsNode(document.documentElement, node); 26121 rIC = function (frameCallback) {
28531} 26122 setTimeout(function () {
26123 frameCallback({
26124 timeRemaining: function () {
26125 return Infinity;
26126 }
26127 });
26128 });
26129 return 0;
26130 };
26131} else if (typeof requestIdleCallback !== 'function') {
26132 // Polyfill requestIdleCallback.
28532 26133
28533/** 26134 var scheduledRICCallback = null;
28534 * @ReactInputSelection: React input selection module. Based on Selection.js,
28535 * but modified to be suitable for react and has a couple of bug fixes (doesn't
28536 * assume buttons have range selections allowed).
28537 * Input selection module for React.
28538 */
28539var ReactInputSelection = {
28540 hasSelectionCapabilities: function (elem) {
28541 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
28542 return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');
28543 },
28544 26135
28545 getSelectionInformation: function () { 26136 var isIdleScheduled = false;
28546 var focusedElem = getActiveElement(); 26137 var isAnimationFrameScheduled = false;
28547 return {
28548 focusedElem: focusedElem,
28549 selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null
28550 };
28551 },
28552 26138
28553 /** 26139 var frameDeadline = 0;
28554 * @restoreSelection: If any selection information was potentially lost, 26140 // We start out assuming that we run at 30fps but then the heuristic tracking
28555 * restore it. This is useful when performing operations that could remove dom 26141 // will adjust this value to a faster fps if we get more frequent animation
28556 * nodes and place them back in, resulting in focus being lost. 26142 // frames.
28557 */ 26143 var previousFrameTime = 33;
28558 restoreSelection: function (priorSelectionInformation) { 26144 var activeFrameTime = 33;
28559 var curFocusedElem = getActiveElement();
28560 var priorFocusedElem = priorSelectionInformation.focusedElem;
28561 var priorSelectionRange = priorSelectionInformation.selectionRange;
28562 if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
28563 if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {
28564 ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange);
28565 }
28566 26145
28567 // Focusing a node can change the scroll position, which is undesirable 26146 var frameDeadlineObject;
28568 var ancestors = []; 26147 if (hasNativePerformanceNow) {
28569 var ancestor = priorFocusedElem; 26148 frameDeadlineObject = {
28570 while (ancestor = ancestor.parentNode) { 26149 timeRemaining: function () {
28571 if (ancestor.nodeType === ELEMENT_NODE$2) { 26150 // We assume that if we have a performance timer that the rAF callback
28572 ancestors.push({ 26151 // gets a performance timer value. Not sure if this is always true.
28573 element: ancestor, 26152 return frameDeadline - performance.now();
28574 left: ancestor.scrollLeft,
28575 top: ancestor.scrollTop
28576 });
28577 }
28578 } 26153 }
28579 26154 };
28580 focusNode(priorFocusedElem); 26155 } else {
28581 26156 frameDeadlineObject = {
28582 for (var i = 0; i < ancestors.length; i++) { 26157 timeRemaining: function () {
28583 var info = ancestors[i]; 26158 // Fallback to Date.now()
28584 info.element.scrollLeft = info.left; 26159 return frameDeadline - Date.now();
28585 info.element.scrollTop = info.top;
28586 } 26160 }
28587 } 26161 };
28588 }, 26162 }
28589 26163
28590 /** 26164 // We use the postMessage trick to defer idle work until after the repaint.
28591 * @getSelection: Gets the selection bounds of a focused textarea, input or 26165 var messageKey = '__reactIdleCallback$' + Math.random().toString(36).slice(2);
28592 * contentEditable node. 26166 var idleTick = function (event) {
28593 * -@input: Look up selection bounds of this input 26167 if (event.source !== window || event.data !== messageKey) {
28594 * -@return {start: selectionStart, end: selectionEnd} 26168 return;
28595 */
28596 getSelection: function (input) {
28597 var selection;
28598
28599 if ('selectionStart' in input) {
28600 // Modern browser with input or textarea.
28601 selection = {
28602 start: input.selectionStart,
28603 end: input.selectionEnd
28604 };
28605 } else {
28606 // Content editable or old IE textarea.
28607 selection = ReactDOMSelection_1.getOffsets(input);
28608 } 26169 }
28609 26170 isIdleScheduled = false;
28610 return selection || { start: 0, end: 0 }; 26171 var callback = scheduledRICCallback;
28611 }, 26172 scheduledRICCallback = null;
28612 26173 if (callback !== null) {
28613 /** 26174 callback(frameDeadlineObject);
28614 * @setSelection: Sets the selection bounds of a textarea or input and focuses
28615 * the input.
28616 * -@input Set selection bounds of this input or textarea
28617 * -@offsets Object of same form that is returned from get*
28618 */
28619 setSelection: function (input, offsets) {
28620 var start = offsets.start;
28621 var end = offsets.end;
28622 if (end === undefined) {
28623 end = start;
28624 } 26175 }
26176 };
26177 // Assumes that we have addEventListener in this environment. Might need
26178 // something better for old IE.
26179 window.addEventListener('message', idleTick, false);
28625 26180
28626 if ('selectionStart' in input) { 26181 var animationTick = function (rafTime) {
28627 input.selectionStart = start; 26182 isAnimationFrameScheduled = false;
28628 input.selectionEnd = Math.min(end, input.value.length); 26183 var nextFrameTime = rafTime - frameDeadline + activeFrameTime;
26184 if (nextFrameTime < activeFrameTime && previousFrameTime < activeFrameTime) {
26185 if (nextFrameTime < 8) {
26186 // Defensive coding. We don't support higher frame rates than 120hz.
26187 // If we get lower than that, it is probably a bug.
26188 nextFrameTime = 8;
26189 }
26190 // If one frame goes long, then the next one can be short to catch up.
26191 // If two frames are short in a row, then that's an indication that we
26192 // actually have a higher frame rate than what we're currently optimizing.
26193 // We adjust our heuristic dynamically accordingly. For example, if we're
26194 // running on 120hz display or 90hz VR display.
26195 // Take the max of the two in case one of them was an anomaly due to
26196 // missed frame deadlines.
26197 activeFrameTime = nextFrameTime < previousFrameTime ? previousFrameTime : nextFrameTime;
28629 } else { 26198 } else {
28630 ReactDOMSelection_1.setOffsets(input, offsets); 26199 previousFrameTime = nextFrameTime;
28631 } 26200 }
28632 } 26201 frameDeadline = rafTime + activeFrameTime;
28633}; 26202 if (!isIdleScheduled) {
28634 26203 isIdleScheduled = true;
28635var ReactInputSelection_1 = ReactInputSelection; 26204 window.postMessage(messageKey, '*');
28636
28637/**
28638 * Copyright (c) 2013-present, Facebook, Inc.
28639 *
28640 * This source code is licensed under the MIT license found in the
28641 * LICENSE file in the root directory of this source tree.
28642 *
28643 * @providesModule ReactVersion
28644 */
28645
28646var ReactVersion = '16.0.0';
28647
28648/**
28649 * Copyright (c) 2013-present, Facebook, Inc.
28650 *
28651 * This source code is licensed under the MIT license found in the
28652 * LICENSE file in the root directory of this source tree.
28653 *
28654 * @providesModule findDOMNode
28655 *
28656 */
28657
28658
28659
28660var ELEMENT_NODE$3 = HTMLNodeType_1.ELEMENT_NODE;
28661
28662var ReactCurrentOwner$3 = ReactGlobalSharedState_1.ReactCurrentOwner;
28663
28664
28665
28666
28667{
28668 var warning$27 = require$$0;
28669}
28670
28671var findFiber = function (arg) {
28672 invariant(false, 'Missing injection for fiber findDOMNode');
28673};
28674var findStack = function (arg) {
28675 invariant(false, 'Missing injection for stack findDOMNode');
28676};
28677
28678var findDOMNode = function (componentOrElement) {
28679 {
28680 var owner = ReactCurrentOwner$3.current;
28681 if (owner !== null) {
28682 var isFiber = typeof owner.tag === 'number';
28683 var warnedAboutRefsInRender = isFiber ? owner.stateNode._warnedAboutRefsInRender : owner._warnedAboutRefsInRender;
28684 warning$27(warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + '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(owner) || 'A component');
28685 if (isFiber) {
28686 owner.stateNode._warnedAboutRefsInRender = true;
28687 } else {
28688 owner._warnedAboutRefsInRender = true;
28689 }
28690 } 26205 }
28691 } 26206 };
28692 if (componentOrElement == null) {
28693 return null;
28694 }
28695 if (componentOrElement.nodeType === ELEMENT_NODE$3) {
28696 return componentOrElement;
28697 }
28698 26207
28699 var inst = ReactInstanceMap_1.get(componentOrElement); 26208 rIC = function (callback) {
28700 if (inst) { 26209 // This assumes that we only schedule one callback at a time because that's
28701 if (typeof inst.tag === 'number') { 26210 // how Fiber uses it.
28702 return findFiber(inst); 26211 scheduledRICCallback = callback;
28703 } else { 26212 if (!isAnimationFrameScheduled) {
28704 return findStack(inst); 26213 // If rAF didn't already schedule one, we need to schedule a frame.
26214 // TODO: If this rAF doesn't materialize because the browser throttles, we
26215 // might want to still have setTimeout trigger rIC as a backup to ensure
26216 // that we keep performing work.
26217 isAnimationFrameScheduled = true;
26218 requestAnimationFrame(animationTick);
28705 } 26219 }
28706 } 26220 return 0;
28707 26221 };
28708 if (typeof componentOrElement.render === 'function') { 26222} else {
28709 invariant(false, 'Unable to find node on an unmounted component.'); 26223 rIC = requestIdleCallback;
28710 } else { 26224}
28711 invariant(false, 'Element appears to be neither ReactComponent nor DOMNode. Keys: %s', Object.keys(componentOrElement));
28712 }
28713};
28714
28715findDOMNode._injectFiber = function (fn) {
28716 findFiber = fn;
28717};
28718findDOMNode._injectStack = function (fn) {
28719 findStack = fn;
28720};
28721
28722var findDOMNode_1 = findDOMNode;
28723
28724/**
28725 * Copyright (c) 2014-present, Facebook, Inc.
28726 *
28727 * This source code is licensed under the MIT license found in the
28728 * LICENSE file in the root directory of this source tree.
28729 *
28730 * @providesModule lowPriorityWarning
28731 */
28732 26225
28733/** 26226/**
28734 * Forked from fbjs/warning: 26227 * Forked from fbjs/warning:
@@ -28744,7 +26237,7 @@ var findDOMNode_1 = findDOMNode;
28744 * same logic and follow the same code paths. 26237 * same logic and follow the same code paths.
28745 */ 26238 */
28746 26239
28747var lowPriorityWarning$1 = function () {}; 26240var lowPriorityWarning = function () {};
28748 26241
28749{ 26242{
28750 var printWarning = function (format) { 26243 var printWarning = function (format) {
@@ -28767,7 +26260,7 @@ var lowPriorityWarning$1 = function () {};
28767 } catch (x) {} 26260 } catch (x) {}
28768 }; 26261 };
28769 26262
28770 lowPriorityWarning$1 = function (condition, format) { 26263 lowPriorityWarning = function (condition, format) {
28771 if (format === undefined) { 26264 if (format === undefined) {
28772 throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); 26265 throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
28773 } 26266 }
@@ -28781,2868 +26274,3410 @@ var lowPriorityWarning$1 = function () {};
28781 }; 26274 };
28782} 26275}
28783 26276
28784var lowPriorityWarning_1 = lowPriorityWarning$1; 26277var lowPriorityWarning$1 = lowPriorityWarning;
28785
28786var validateDOMNesting$1 = emptyFunction;
28787
28788{
28789 var warning$28 = require$$0;
28790 26278
28791 var _require$13 = ReactDebugCurrentFiber_1, 26279// isAttributeNameSafe() is currently duplicated in DOMMarkupOperations.
28792 getCurrentFiberStackAddendum$6 = _require$13.getCurrentFiberStackAddendum; 26280// TODO: Find a better place for this.
28793 26281var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
28794 // This validation code was written based on the HTML5 parsing spec: 26282var illegalAttributeNameCache = {};
28795 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope 26283var validatedAttributeNameCache = {};
28796 // 26284function isAttributeNameSafe(attributeName) {
28797 // Note: this does not catch all invalid nesting, nor does it try to (as it's 26285 if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {
28798 // not clear what practical benefit doing so provides); instead, we warn only 26286 return true;
28799 // for cases where the parser will give a parse tree differing from what React 26287 }
28800 // intended. For example, <b><div></div></b> is invalid but we don't warn 26288 if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {
28801 // because it still parses correctly; we do warn for other cases like nested 26289 return false;
28802 // <p> tags where the beginning of the second element implicitly closes the 26290 }
28803 // first, causing a confusing mess. 26291 if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
28804 26292 validatedAttributeNameCache[attributeName] = true;
28805 // https://html.spec.whatwg.org/multipage/syntax.html#special 26293 return true;
26294 }
26295 illegalAttributeNameCache[attributeName] = true;
26296 {
26297 warning(false, 'Invalid attribute name: `%s`', attributeName);
26298 }
26299 return false;
26300}
28806 26301
26302// shouldIgnoreValue() is currently duplicated in DOMMarkupOperations.
26303// TODO: Find a better place for this.
26304function shouldIgnoreValue(propertyInfo, value) {
26305 return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;
26306}
28807 26307
28808 var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; 26308/**
26309 * Operations for dealing with DOM properties.
26310 */
28809 26311
28810 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
28811 var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template',
28812 26312
28813 // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
28814 // TODO: Distinguish by namespace here -- for <title>, including it here
28815 // errs on the side of fewer warnings
28816 'foreignObject', 'desc', 'title'];
28817 26313
28818 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
28819 var buttonScopeTags = inScopeTags.concat(['button']);
28820 26314
28821 // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
28822 var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
28823 26315
28824 var emptyAncestorInfo = { 26316/**
28825 current: null, 26317 * Get the value for a property on a node. Only used in DEV for SSR validation.
26318 * The "expected" argument is used as a hint of what the expected value is.
26319 * Some properties have multiple equivalent values.
26320 */
26321function getValueForProperty(node, name, expected) {
26322 {
26323 var propertyInfo = getPropertyInfo(name);
26324 if (propertyInfo) {
26325 var mutationMethod = propertyInfo.mutationMethod;
26326 if (mutationMethod || propertyInfo.mustUseProperty) {
26327 return node[propertyInfo.propertyName];
26328 } else {
26329 var attributeName = propertyInfo.attributeName;
28826 26330
28827 formTag: null, 26331 var stringValue = null;
28828 aTagInScope: null,
28829 buttonTagInScope: null,
28830 nobrTagInScope: null,
28831 pTagInButtonScope: null,
28832 26332
28833 listItemTagAutoclosing: null, 26333 if (propertyInfo.hasOverloadedBooleanValue) {
28834 dlItemTagAutoclosing: null 26334 if (node.hasAttribute(attributeName)) {
28835 }; 26335 var value = node.getAttribute(attributeName);
26336 if (value === '') {
26337 return true;
26338 }
26339 if (shouldIgnoreValue(propertyInfo, expected)) {
26340 return value;
26341 }
26342 if (value === '' + expected) {
26343 return expected;
26344 }
26345 return value;
26346 }
26347 } else if (node.hasAttribute(attributeName)) {
26348 if (shouldIgnoreValue(propertyInfo, expected)) {
26349 // We had an attribute but shouldn't have had one, so read it
26350 // for the error message.
26351 return node.getAttribute(attributeName);
26352 }
26353 if (propertyInfo.hasBooleanValue) {
26354 // If this was a boolean, it doesn't matter what the value is
26355 // the fact that we have it is the same as the expected.
26356 return expected;
26357 }
26358 // Even if this property uses a namespace we use getAttribute
26359 // because we assume its namespaced name is the same as our config.
26360 // To use getAttributeNS we need the local name which we don't have
26361 // in our config atm.
26362 stringValue = node.getAttribute(attributeName);
26363 }
28836 26364
28837 var updatedAncestorInfo$1 = function (oldInfo, tag, instance) { 26365 if (shouldIgnoreValue(propertyInfo, expected)) {
28838 var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo); 26366 return stringValue === null ? expected : stringValue;
28839 var info = { tag: tag, instance: instance }; 26367 } else if (stringValue === '' + expected) {
26368 return expected;
26369 } else {
26370 return stringValue;
26371 }
26372 }
26373 }
26374 }
26375}
28840 26376
28841 if (inScopeTags.indexOf(tag) !== -1) { 26377/**
28842 ancestorInfo.aTagInScope = null; 26378 * Get the value for a attribute on a node. Only used in DEV for SSR validation.
28843 ancestorInfo.buttonTagInScope = null; 26379 * The third argument is used as a hint of what the expected value is. Some
28844 ancestorInfo.nobrTagInScope = null; 26380 * attributes have multiple equivalent values.
26381 */
26382function getValueForAttribute(node, name, expected) {
26383 {
26384 if (!isAttributeNameSafe(name)) {
26385 return;
28845 } 26386 }
28846 if (buttonScopeTags.indexOf(tag) !== -1) { 26387 if (!node.hasAttribute(name)) {
28847 ancestorInfo.pTagInButtonScope = null; 26388 return expected === undefined ? undefined : null;
26389 }
26390 var value = node.getAttribute(name);
26391 if (value === '' + expected) {
26392 return expected;
28848 } 26393 }
26394 return value;
26395 }
26396}
28849 26397
28850 // See rules for 'li', 'dd', 'dt' start tags in 26398/**
28851 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody 26399 * Sets the value for a property on a node.
28852 if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') { 26400 *
28853 ancestorInfo.listItemTagAutoclosing = null; 26401 * @param {DOMElement} node
28854 ancestorInfo.dlItemTagAutoclosing = null; 26402 * @param {string} name
26403 * @param {*} value
26404 */
26405function setValueForProperty(node, name, value) {
26406 var propertyInfo = getPropertyInfo(name);
26407
26408 if (propertyInfo && shouldSetAttribute(name, value)) {
26409 var mutationMethod = propertyInfo.mutationMethod;
26410 if (mutationMethod) {
26411 mutationMethod(node, value);
26412 } else if (shouldIgnoreValue(propertyInfo, value)) {
26413 deleteValueForProperty(node, name);
26414 return;
26415 } else if (propertyInfo.mustUseProperty) {
26416 // Contrary to `setAttribute`, object properties are properly
26417 // `toString`ed by IE8/9.
26418 node[propertyInfo.propertyName] = value;
26419 } else {
26420 var attributeName = propertyInfo.attributeName;
26421 var namespace = propertyInfo.attributeNamespace;
26422 // `setAttribute` with objects becomes only `[object]` in IE8/9,
26423 // ('' + value) makes it output the correct toString()-value.
26424 if (namespace) {
26425 node.setAttributeNS(namespace, attributeName, '' + value);
26426 } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
26427 node.setAttribute(attributeName, '');
26428 } else {
26429 node.setAttribute(attributeName, '' + value);
26430 }
28855 } 26431 }
26432 } else {
26433 setValueForAttribute(node, name, shouldSetAttribute(name, value) ? value : null);
26434 return;
26435 }
28856 26436
28857 ancestorInfo.current = info; 26437 {
26438
26439 }
26440}
28858 26441
28859 if (tag === 'form') { 26442function setValueForAttribute(node, name, value) {
28860 ancestorInfo.formTag = info; 26443 if (!isAttributeNameSafe(name)) {
28861 } 26444 return;
28862 if (tag === 'a') { 26445 }
28863 ancestorInfo.aTagInScope = info; 26446 if (value == null) {
28864 } 26447 node.removeAttribute(name);
28865 if (tag === 'button') { 26448 } else {
28866 ancestorInfo.buttonTagInScope = info; 26449 node.setAttribute(name, '' + value);
28867 } 26450 }
28868 if (tag === 'nobr') {
28869 ancestorInfo.nobrTagInScope = info;
28870 }
28871 if (tag === 'p') {
28872 ancestorInfo.pTagInButtonScope = info;
28873 }
28874 if (tag === 'li') {
28875 ancestorInfo.listItemTagAutoclosing = info;
28876 }
28877 if (tag === 'dd' || tag === 'dt') {
28878 ancestorInfo.dlItemTagAutoclosing = info;
28879 }
28880 26451
28881 return ancestorInfo; 26452 {
28882 }; 26453
26454 }
26455}
28883 26456
28884 /** 26457/**
28885 * Returns whether 26458 * Deletes an attributes from a node.
28886 */ 26459 *
28887 var isTagValidWithParent = function (tag, parentTag) { 26460 * @param {DOMElement} node
28888 // First, let's check if we're in an unusual parsing mode... 26461 * @param {string} name
28889 switch (parentTag) { 26462 */
28890 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect 26463function deleteValueForAttribute(node, name) {
28891 case 'select': 26464 node.removeAttribute(name);
28892 return tag === 'option' || tag === 'optgroup' || tag === '#text'; 26465}
28893 case 'optgroup':
28894 return tag === 'option' || tag === '#text';
28895 // Strictly speaking, seeing an <option> doesn't mean we're in a <select>
28896 // but
28897 case 'option':
28898 return tag === '#text';
28899 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
28900 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
28901 // No special behavior since these rules fall back to "in body" mode for
28902 // all except special table nodes which cause bad parsing behavior anyway.
28903 26466
28904 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr 26467/**
28905 case 'tr': 26468 * Deletes the value for a property on a node.
28906 return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template'; 26469 *
28907 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody 26470 * @param {DOMElement} node
28908 case 'tbody': 26471 * @param {string} name
28909 case 'thead': 26472 */
28910 case 'tfoot': 26473function deleteValueForProperty(node, name) {
28911 return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template'; 26474 var propertyInfo = getPropertyInfo(name);
28912 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup 26475 if (propertyInfo) {
28913 case 'colgroup': 26476 var mutationMethod = propertyInfo.mutationMethod;
28914 return tag === 'col' || tag === 'template'; 26477 if (mutationMethod) {
28915 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable 26478 mutationMethod(node, undefined);
28916 case 'table': 26479 } else if (propertyInfo.mustUseProperty) {
28917 return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template'; 26480 var propName = propertyInfo.propertyName;
28918 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead 26481 if (propertyInfo.hasBooleanValue) {
28919 case 'head': 26482 node[propName] = false;
28920 return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template'; 26483 } else {
28921 // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element 26484 node[propName] = '';
28922 case 'html': 26485 }
28923 return tag === 'head' || tag === 'body'; 26486 } else {
28924 case '#document': 26487 node.removeAttribute(propertyInfo.attributeName);
28925 return tag === 'html';
28926 } 26488 }
26489 } else {
26490 node.removeAttribute(name);
26491 }
26492}
28927 26493
28928 // Probably in the "in body" parsing mode, so we outlaw only tag combos 26494var ReactControlledValuePropTypes = {
28929 // where the parsing rules cause implicit opens or closes to be added. 26495 checkPropTypes: null
28930 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody 26496};
28931 switch (tag) {
28932 case 'h1':
28933 case 'h2':
28934 case 'h3':
28935 case 'h4':
28936 case 'h5':
28937 case 'h6':
28938 return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
28939 26497
28940 case 'rp': 26498{
28941 case 'rt': 26499 var hasReadOnlyValue = {
28942 return impliedEndTags.indexOf(parentTag) === -1; 26500 button: true,
26501 checkbox: true,
26502 image: true,
26503 hidden: true,
26504 radio: true,
26505 reset: true,
26506 submit: true
26507 };
28943 26508
28944 case 'body': 26509 var propTypes = {
28945 case 'caption': 26510 value: function (props, propName, componentName) {
28946 case 'col': 26511 if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
28947 case 'colgroup': 26512 return null;
28948 case 'frame': 26513 }
28949 case 'head': 26514 return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
28950 case 'html': 26515 },
28951 case 'tbody': 26516 checked: function (props, propName, componentName) {
28952 case 'td': 26517 if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
28953 case 'tfoot': 26518 return null;
28954 case 'th': 26519 }
28955 case 'thead': 26520 return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
28956 case 'tr':
28957 // These tags are only valid with a few parents that have special child
28958 // parsing rules -- if we're down here, then none of those matched and
28959 // so we allow it only if we don't know what the parent is, as all other
28960 // cases are invalid.
28961 return parentTag == null;
28962 } 26521 }
28963
28964 return true;
28965 }; 26522 };
28966 26523
28967 /** 26524 /**
28968 * Returns whether 26525 * Provide a linked `value` attribute for controlled forms. You should not use
26526 * this outside of the ReactDOM controlled form components.
28969 */ 26527 */
28970 var findInvalidAncestorForTag = function (tag, ancestorInfo) { 26528 ReactControlledValuePropTypes.checkPropTypes = function (tagName, props, getStack) {
28971 switch (tag) { 26529 checkPropTypes(propTypes, props, 'prop', tagName, getStack);
28972 case 'address': 26530 };
28973 case 'article': 26531}
28974 case 'aside':
28975 case 'blockquote':
28976 case 'center':
28977 case 'details':
28978 case 'dialog':
28979 case 'dir':
28980 case 'div':
28981 case 'dl':
28982 case 'fieldset':
28983 case 'figcaption':
28984 case 'figure':
28985 case 'footer':
28986 case 'header':
28987 case 'hgroup':
28988 case 'main':
28989 case 'menu':
28990 case 'nav':
28991 case 'ol':
28992 case 'p':
28993 case 'section':
28994 case 'summary':
28995 case 'ul':
28996 case 'pre':
28997 case 'listing':
28998 case 'table':
28999 case 'hr':
29000 case 'xmp':
29001 case 'h1':
29002 case 'h2':
29003 case 'h3':
29004 case 'h4':
29005 case 'h5':
29006 case 'h6':
29007 return ancestorInfo.pTagInButtonScope;
29008 26532
29009 case 'form': 26533// TODO: direct imports like some-package/src/* are bad. Fix me.
29010 return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope; 26534var getCurrentFiberOwnerName$2 = ReactDebugCurrentFiber.getCurrentFiberOwnerName;
26535var getCurrentFiberStackAddendum$3 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
29011 26536
29012 case 'li': 26537var didWarnValueDefaultValue = false;
29013 return ancestorInfo.listItemTagAutoclosing; 26538var didWarnCheckedDefaultChecked = false;
26539var didWarnControlledToUncontrolled = false;
26540var didWarnUncontrolledToControlled = false;
29014 26541
29015 case 'dd': 26542function isControlled(props) {
29016 case 'dt': 26543 var usesChecked = props.type === 'checkbox' || props.type === 'radio';
29017 return ancestorInfo.dlItemTagAutoclosing; 26544 return usesChecked ? props.checked != null : props.value != null;
26545}
29018 26546
29019 case 'button': 26547/**
29020 return ancestorInfo.buttonTagInScope; 26548 * Implements an <input> host component that allows setting these optional
26549 * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
26550 *
26551 * If `checked` or `value` are not supplied (or null/undefined), user actions
26552 * that affect the checked state or value will trigger updates to the element.
26553 *
26554 * If they are supplied (and not null/undefined), the rendered element will not
26555 * trigger updates to the element. Instead, the props must change in order for
26556 * the rendered element to be updated.
26557 *
26558 * The rendered element will be initialized as unchecked (or `defaultChecked`)
26559 * with an empty value (or `defaultValue`).
26560 *
26561 * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
26562 */
29021 26563
29022 case 'a': 26564function getHostProps(element, props) {
29023 // Spec says something about storing a list of markers, but it sounds 26565 var node = element;
29024 // equivalent to this check. 26566 var value = props.value;
29025 return ancestorInfo.aTagInScope; 26567 var checked = props.checked;
26568
26569 var hostProps = _assign({
26570 // Make sure we set .type before any other properties (setting .value
26571 // before .type means .value is lost in IE11 and below)
26572 type: undefined,
26573 // Make sure we set .step before .value (setting .value before .step
26574 // means .value is rounded on mount, based upon step precision)
26575 step: undefined,
26576 // Make sure we set .min & .max before .value (to ensure proper order
26577 // in corner cases such as min or max deriving from value, e.g. Issue #7170)
26578 min: undefined,
26579 max: undefined
26580 }, props, {
26581 defaultChecked: undefined,
26582 defaultValue: undefined,
26583 value: value != null ? value : node._wrapperState.initialValue,
26584 checked: checked != null ? checked : node._wrapperState.initialChecked
26585 });
29026 26586
29027 case 'nobr': 26587 return hostProps;
29028 return ancestorInfo.nobrTagInScope; 26588}
29029 }
29030 26589
29031 return null; 26590function initWrapperState(element, props) {
29032 }; 26591 {
26592 ReactControlledValuePropTypes.checkPropTypes('input', props, getCurrentFiberStackAddendum$3);
29033 26593
29034 /** 26594 if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
29035 * Given a ReactCompositeComponent instance, return a list of its recursive 26595 warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerName$2() || 'A component', props.type);
29036 * owners, starting at the root and ending with the instance itself. 26596 didWarnCheckedDefaultChecked = true;
29037 */
29038 var findOwnerStack = function (instance) {
29039 if (!instance) {
29040 return [];
29041 } 26597 }
29042 26598 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
29043 var stack = []; 26599 warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerName$2() || 'A component', props.type);
29044 do { 26600 didWarnValueDefaultValue = true;
29045 stack.push(instance);
29046 } while (instance = instance._currentElement._owner);
29047 stack.reverse();
29048 return stack;
29049 };
29050
29051 var getOwnerInfo = function (childInstance, childTag, ancestorInstance, ancestorTag, isParent) {
29052 var childOwner = childInstance && childInstance._currentElement._owner;
29053 var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner;
29054
29055 var childOwners = findOwnerStack(childOwner);
29056 var ancestorOwners = findOwnerStack(ancestorOwner);
29057
29058 var minStackLen = Math.min(childOwners.length, ancestorOwners.length);
29059 var i;
29060
29061 var deepestCommon = -1;
29062 for (i = 0; i < minStackLen; i++) {
29063 if (childOwners[i] === ancestorOwners[i]) {
29064 deepestCommon = i;
29065 } else {
29066 break;
29067 }
29068 } 26601 }
26602 }
29069 26603
29070 var UNKNOWN = '(unknown)'; 26604 var defaultValue = props.defaultValue;
29071 var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) { 26605 var node = element;
29072 return getComponentName_1(inst) || UNKNOWN; 26606 node._wrapperState = {
29073 }); 26607 initialChecked: props.checked != null ? props.checked : props.defaultChecked,
29074 var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) { 26608 initialValue: props.value != null ? props.value : defaultValue,
29075 return getComponentName_1(inst) || UNKNOWN; 26609 controlled: isControlled(props)
29076 });
29077 var ownerInfo = [].concat(
29078 // If the parent and child instances have a common owner ancestor, start
29079 // with that -- otherwise we just start with the parent's owners.
29080 deepestCommon !== -1 ? getComponentName_1(childOwners[deepestCommon]) || UNKNOWN : [], ancestorOwnerNames, ancestorTag,
29081 // If we're warning about an invalid (non-parent) ancestry, add '...'
29082 isParent ? [] : ['...'], childOwnerNames, childTag).join(' > ');
29083
29084 return ownerInfo;
29085 }; 26610 };
26611}
29086 26612
29087 var didWarn = {}; 26613function updateWrapper(element, props) {
29088 26614 var node = element;
29089 validateDOMNesting$1 = function (childTag, childText, childInstance, ancestorInfo) { 26615 {
29090 ancestorInfo = ancestorInfo || emptyAncestorInfo; 26616 var controlled = isControlled(props);
29091 var parentInfo = ancestorInfo.current;
29092 var parentTag = parentInfo && parentInfo.tag;
29093 26617
29094 if (childText != null) { 26618 if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
29095 warning$28(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null'); 26619 warning(false, 'A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components%s', props.type, getCurrentFiberStackAddendum$3());
29096 childTag = '#text'; 26620 didWarnUncontrolledToControlled = true;
29097 } 26621 }
29098 26622 if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
29099 var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo; 26623 warning(false, 'A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components%s', props.type, getCurrentFiberStackAddendum$3());
29100 var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo); 26624 didWarnControlledToUncontrolled = true;
29101 var invalidParentOrAncestor = invalidParent || invalidAncestor;
29102 if (!invalidParentOrAncestor) {
29103 return;
29104 } 26625 }
26626 }
29105 26627
29106 var ancestorInstance = invalidParentOrAncestor.instance; 26628 var checked = props.checked;
29107 var ancestorTag = invalidParentOrAncestor.tag; 26629 if (checked != null) {
29108 var addendum; 26630 setValueForProperty(node, 'checked', checked || false);
26631 }
29109 26632
29110 if (childInstance != null) { 26633 var value = props.value;
29111 addendum = ' See ' + getOwnerInfo(childInstance, childTag, ancestorInstance, ancestorTag, !!invalidParent) + '.'; 26634 if (value != null) {
29112 } else { 26635 if (value === 0 && node.value === '') {
29113 addendum = getCurrentFiberStackAddendum$6(); 26636 node.value = '0';
29114 } 26637 // Note: IE9 reports a number inputs as 'text', so check props instead.
26638 } else if (props.type === 'number') {
26639 // Simulate `input.valueAsNumber`. IE9 does not support it
26640 var valueAsNumber = parseFloat(node.value) || 0;
29115 26641
29116 var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + addendum; 26642 if (
29117 if (didWarn[warnKey]) { 26643 // eslint-disable-next-line
29118 return; 26644 value != valueAsNumber ||
29119 } 26645 // eslint-disable-next-line
29120 didWarn[warnKey] = true; 26646 value == valueAsNumber && node.value != value) {
29121 26647 // Cast `value` to a string to ensure the value is set correctly. While
29122 var tagDisplayName = childTag; 26648 // browsers typically do this as necessary, jsdom doesn't.
29123 var whitespaceInfo = ''; 26649 node.value = '' + value;
29124 if (childTag === '#text') {
29125 if (/\S/.test(childText)) {
29126 tagDisplayName = 'Text nodes';
29127 } else {
29128 tagDisplayName = 'Whitespace text nodes';
29129 whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
29130 } 26650 }
29131 } else { 26651 } else if (node.value !== '' + value) {
29132 tagDisplayName = '<' + childTag + '>'; 26652 // Cast `value` to a string to ensure the value is set correctly. While
26653 // browsers typically do this as necessary, jsdom doesn't.
26654 node.value = '' + value;
29133 } 26655 }
29134 26656 } else {
29135 if (invalidParent) { 26657 if (props.value == null && props.defaultValue != null) {
29136 var info = ''; 26658 // In Chrome, assigning defaultValue to certain input types triggers input validation.
29137 if (ancestorTag === 'table' && childTag === 'tr') { 26659 // For number inputs, the display value loses trailing decimal points. For email inputs,
29138 info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.'; 26660 // Chrome raises "The specified value <x> is not a valid email address".
26661 //
26662 // Here we check to see if the defaultValue has actually changed, avoiding these problems
26663 // when the user is inputting text
26664 //
26665 // https://github.com/facebook/react/issues/7253
26666 if (node.defaultValue !== '' + props.defaultValue) {
26667 node.defaultValue = '' + props.defaultValue;
29139 } 26668 }
29140 warning$28(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info, addendum);
29141 } else {
29142 warning$28(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.%s', tagDisplayName, ancestorTag, addendum);
29143 } 26669 }
29144 }; 26670 if (props.checked == null && props.defaultChecked != null) {
29145 26671 node.defaultChecked = !!props.defaultChecked;
29146 validateDOMNesting$1.updatedAncestorInfo = updatedAncestorInfo$1;
29147
29148 // For testing
29149 validateDOMNesting$1.isTagValidInContext = function (tag, ancestorInfo) {
29150 ancestorInfo = ancestorInfo || emptyAncestorInfo;
29151 var parentInfo = ancestorInfo.current;
29152 var parentTag = parentInfo && parentInfo.tag;
29153 return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo);
29154 };
29155}
29156
29157var validateDOMNesting_1 = validateDOMNesting$1;
29158
29159var HostComponent$11 = ReactTypeOfWork.HostComponent;
29160
29161function getParent(inst) {
29162 if (inst._hostParent !== undefined) {
29163 return inst._hostParent;
29164 }
29165 if (typeof inst.tag === 'number') {
29166 do {
29167 inst = inst['return'];
29168 // TODO: If this is a HostRoot we might want to bail out.
29169 // That is depending on if we want nested subtrees (layers) to bubble
29170 // events to their parent. We could also go through parentNode on the
29171 // host node but that wouldn't work for React Native and doesn't let us
29172 // do the portal feature.
29173 } while (inst && inst.tag !== HostComponent$11);
29174 if (inst) {
29175 return inst;
29176 } 26672 }
29177 } 26673 }
29178 return null;
29179} 26674}
29180 26675
29181/** 26676function postMountWrapper(element, props) {
29182 * Return the lowest common ancestor of A and B, or null if they are in 26677 var node = element;
29183 * different trees.
29184 */
29185function getLowestCommonAncestor(instA, instB) {
29186 var depthA = 0;
29187 for (var tempA = instA; tempA; tempA = getParent(tempA)) {
29188 depthA++;
29189 }
29190 var depthB = 0;
29191 for (var tempB = instB; tempB; tempB = getParent(tempB)) {
29192 depthB++;
29193 }
29194 26678
29195 // If A is deeper, crawl up. 26679 // Detach value from defaultValue. We won't do anything if we're working on
29196 while (depthA - depthB > 0) { 26680 // submit or reset inputs as those values & defaultValues are linked. They
29197 instA = getParent(instA); 26681 // are not resetable nodes so this operation doesn't matter and actually
29198 depthA--; 26682 // removes browser-default values (eg "Submit Query") when no value is
29199 } 26683 // provided.
29200 26684
29201 // If B is deeper, crawl up. 26685 switch (props.type) {
29202 while (depthB - depthA > 0) { 26686 case 'submit':
29203 instB = getParent(instB); 26687 case 'reset':
29204 depthB--; 26688 break;
26689 case 'color':
26690 case 'date':
26691 case 'datetime':
26692 case 'datetime-local':
26693 case 'month':
26694 case 'time':
26695 case 'week':
26696 // This fixes the no-show issue on iOS Safari and Android Chrome:
26697 // https://github.com/facebook/react/issues/7233
26698 node.value = '';
26699 node.value = node.defaultValue;
26700 break;
26701 default:
26702 node.value = node.value;
26703 break;
29205 } 26704 }
29206 26705
29207 // Walk in lockstep until we find a match. 26706 // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
29208 var depth = depthA; 26707 // this is needed to work around a chrome bug where setting defaultChecked
29209 while (depth--) { 26708 // will sometimes influence the value of checked (even after detachment).
29210 if (instA === instB || instA === instB.alternate) { 26709 // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
29211 return instA; 26710 // We need to temporarily unset name to avoid disrupting radio button groups.
29212 } 26711 var name = node.name;
29213 instA = getParent(instA); 26712 if (name !== '') {
29214 instB = getParent(instB); 26713 node.name = '';
29215 } 26714 }
29216 return null; 26715 node.defaultChecked = !node.defaultChecked;
29217} 26716 node.defaultChecked = !node.defaultChecked;
29218 26717 if (name !== '') {
29219/** 26718 node.name = name;
29220 * Return if A is an ancestor of B.
29221 */
29222function isAncestor(instA, instB) {
29223 while (instB) {
29224 if (instA === instB || instA === instB.alternate) {
29225 return true;
29226 }
29227 instB = getParent(instB);
29228 } 26719 }
29229 return false;
29230} 26720}
29231 26721
29232/** 26722function restoreControlledState$1(element, props) {
29233 * Return the parent instance of the passed-in instance. 26723 var node = element;
29234 */ 26724 updateWrapper(node, props);
29235function getParentInstance(inst) { 26725 updateNamedCousins(node, props);
29236 return getParent(inst);
29237} 26726}
29238 26727
29239/** 26728function updateNamedCousins(rootNode, props) {
29240 * Simulates the traversal of a two-phase, capture/bubble event dispatch. 26729 var name = props.name;
29241 */ 26730 if (props.type === 'radio' && name != null) {
29242function traverseTwoPhase(inst, fn, arg) { 26731 var queryRoot = rootNode;
29243 var path = [];
29244 while (inst) {
29245 path.push(inst);
29246 inst = getParent(inst);
29247 }
29248 var i;
29249 for (i = path.length; i-- > 0;) {
29250 fn(path[i], 'captured', arg);
29251 }
29252 for (i = 0; i < path.length; i++) {
29253 fn(path[i], 'bubbled', arg);
29254 }
29255}
29256 26732
29257/** 26733 while (queryRoot.parentNode) {
29258 * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that 26734 queryRoot = queryRoot.parentNode;
29259 * should would receive a `mouseEnter` or `mouseLeave` event. 26735 }
29260 * 26736
29261 * Does not invoke the callback on the nearest common ancestor because nothing 26737 // If `rootNode.form` was non-null, then we could try `form.elements`,
29262 * "entered" or "left" that element. 26738 // but that sometimes behaves strangely in IE8. We could also try using
29263 */ 26739 // `form.getElementsByName`, but that will only return direct children
29264function traverseEnterLeave(from, to, fn, argFrom, argTo) { 26740 // and won't include inputs that use the HTML5 `form=` attribute. Since
29265 var common = from && to ? getLowestCommonAncestor(from, to) : null; 26741 // the input might not even be in a form. It might not even be in the
29266 var pathFrom = []; 26742 // document. Let's just use the local `querySelectorAll` to ensure we don't
29267 while (from && from !== common) { 26743 // miss anything.
29268 pathFrom.push(from); 26744 var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
29269 from = getParent(from); 26745
29270 } 26746 for (var i = 0; i < group.length; i++) {
29271 var pathTo = []; 26747 var otherNode = group[i];
29272 while (to && to !== common) { 26748 if (otherNode === rootNode || otherNode.form !== rootNode.form) {
29273 pathTo.push(to); 26749 continue;
29274 to = getParent(to); 26750 }
29275 } 26751 // This will throw if radio buttons rendered by different copies of React
29276 var i; 26752 // and the same name are rendered into the same form (same as #1939).
29277 for (i = 0; i < pathFrom.length; i++) { 26753 // That's probably okay; we don't support it just as we don't support
29278 fn(pathFrom[i], 'bubbled', argFrom); 26754 // mixing React radio buttons with non-React ones.
29279 } 26755 var otherProps = getFiberCurrentPropsFromNode$1(otherNode);
29280 for (i = pathTo.length; i-- > 0;) { 26756 !otherProps ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : void 0;
29281 fn(pathTo[i], 'captured', argTo); 26757 // If this is a controlled radio button group, forcing the input that
26758 // was previously checked to update will cause it to be come re-checked
26759 // as appropriate.
26760 updateWrapper(otherNode, otherProps);
26761 }
29282 } 26762 }
29283} 26763}
29284 26764
29285var ReactTreeTraversal = { 26765function flattenChildren(children) {
29286 isAncestor: isAncestor, 26766 var content = '';
29287 getLowestCommonAncestor: getLowestCommonAncestor,
29288 getParentInstance: getParentInstance,
29289 traverseTwoPhase: traverseTwoPhase,
29290 traverseEnterLeave: traverseEnterLeave
29291};
29292 26767
29293var getListener = EventPluginHub_1.getListener; 26768 // Flatten children and warn if they aren't strings or numbers;
26769 // invalid types are ignored.
26770 // We can silently skip them because invalid DOM nesting warning
26771 // catches these cases in Fiber.
26772 React.Children.forEach(children, function (child) {
26773 if (child == null) {
26774 return;
26775 }
26776 if (typeof child === 'string' || typeof child === 'number') {
26777 content += child;
26778 }
26779 });
29294 26780
29295{ 26781 return content;
29296 var warning$29 = require$$0;
29297} 26782}
29298 26783
29299/** 26784/**
29300 * Some event types have a notion of different registration names for different 26785 * Implements an <option> host component that warns when `selected` is set.
29301 * "phases" of propagation. This finds listeners by a given phase.
29302 */ 26786 */
29303function listenerAtPhase(inst, event, propagationPhase) {
29304 var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
29305 return getListener(inst, registrationName);
29306}
29307 26787
29308/** 26788function validateProps(element, props) {
29309 * Tags a `SyntheticEvent` with dispatched listeners. Creating this function 26789 // TODO (yungsters): Remove support for `selected` in <option>.
29310 * here, allows us to not have to bind or create functions for each event.
29311 * Mutating the event's members allows us to not have to create a wrapping
29312 * "dispatch" object that pairs the event with the listener.
29313 */
29314function accumulateDirectionalDispatches(inst, phase, event) {
29315 { 26790 {
29316 warning$29(inst, 'Dispatching inst must not be null'); 26791 warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
29317 }
29318 var listener = listenerAtPhase(inst, event, phase);
29319 if (listener) {
29320 event._dispatchListeners = accumulateInto_1(event._dispatchListeners, listener);
29321 event._dispatchInstances = accumulateInto_1(event._dispatchInstances, inst);
29322 } 26792 }
29323} 26793}
29324 26794
29325/** 26795function postMountWrapper$1(element, props) {
29326 * Collect dispatches (must be entirely collected before dispatching - see unit 26796 // value="" should make a value attribute (#6219)
29327 * tests). Lazily allocate the array to conserve memory. We must loop through 26797 if (props.value != null) {
29328 * each event and perform the traversal for each one. We cannot perform a 26798 element.setAttribute('value', props.value);
29329 * single traversal for the entire collection of events because each event may
29330 * have a different target.
29331 */
29332function accumulateTwoPhaseDispatchesSingle(event) {
29333 if (event && event.dispatchConfig.phasedRegistrationNames) {
29334 ReactTreeTraversal.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
29335 } 26799 }
29336} 26800}
29337 26801
29338/** 26802function getHostProps$1(element, props) {
29339 * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID. 26803 var hostProps = _assign({ children: undefined }, props);
29340 */
29341function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
29342 if (event && event.dispatchConfig.phasedRegistrationNames) {
29343 var targetInst = event._targetInst;
29344 var parentInst = targetInst ? ReactTreeTraversal.getParentInstance(targetInst) : null;
29345 ReactTreeTraversal.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
29346 }
29347}
29348 26804
29349/** 26805 var content = flattenChildren(props.children);
29350 * Accumulates without regard to direction, does not look for phased
29351 * registration names. Same as `accumulateDirectDispatchesSingle` but without
29352 * requiring that the `dispatchMarker` be the same as the dispatched ID.
29353 */
29354function accumulateDispatches(inst, ignoredDirection, event) {
29355 if (inst && event && event.dispatchConfig.registrationName) {
29356 var registrationName = event.dispatchConfig.registrationName;
29357 var listener = getListener(inst, registrationName);
29358 if (listener) {
29359 event._dispatchListeners = accumulateInto_1(event._dispatchListeners, listener);
29360 event._dispatchInstances = accumulateInto_1(event._dispatchInstances, inst);
29361 }
29362 }
29363}
29364 26806
29365/** 26807 if (content) {
29366 * Accumulates dispatches on an `SyntheticEvent`, but only for the 26808 hostProps.children = content;
29367 * `dispatchMarker`.
29368 * @param {SyntheticEvent} event
29369 */
29370function accumulateDirectDispatchesSingle(event) {
29371 if (event && event.dispatchConfig.registrationName) {
29372 accumulateDispatches(event._targetInst, null, event);
29373 } 26809 }
29374}
29375 26810
29376function accumulateTwoPhaseDispatches(events) { 26811 return hostProps;
29377 forEachAccumulated_1(events, accumulateTwoPhaseDispatchesSingle);
29378} 26812}
29379 26813
29380function accumulateTwoPhaseDispatchesSkipTarget(events) { 26814// TODO: direct imports like some-package/src/* are bad. Fix me.
29381 forEachAccumulated_1(events, accumulateTwoPhaseDispatchesSingleSkipTarget); 26815var getCurrentFiberOwnerName$3 = ReactDebugCurrentFiber.getCurrentFiberOwnerName;
29382} 26816var getCurrentFiberStackAddendum$4 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
29383 26817
29384function accumulateEnterLeaveDispatches(leave, enter, from, to) {
29385 ReactTreeTraversal.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
29386}
29387 26818
29388function accumulateDirectDispatches(events) { 26819{
29389 forEachAccumulated_1(events, accumulateDirectDispatchesSingle); 26820 var didWarnValueDefaultValue$1 = false;
29390} 26821}
29391 26822
29392/** 26823function getDeclarationErrorAddendum() {
29393 * A small set of propagation patterns, each of which will accept a small amount 26824 var ownerName = getCurrentFiberOwnerName$3();
29394 * of information, and generate a set of "dispatch ready event objects" - which 26825 if (ownerName) {
29395 * are sets of events that have already been annotated with a set of dispatched 26826 return '\n\nCheck the render method of `' + ownerName + '`.';
29396 * listener functions/ids. The API is designed this way to discourage these 26827 }
29397 * propagation strategies from actually executing the dispatches, since we 26828 return '';
29398 * always want to collect the entire set of dispatches before executing even a 26829}
29399 * single one.
29400 *
29401 * @constructor EventPropagators
29402 */
29403var EventPropagators = {
29404 accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
29405 accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
29406 accumulateDirectDispatches: accumulateDirectDispatches,
29407 accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
29408};
29409 26830
29410var EventPropagators_1 = EventPropagators; 26831var valuePropNames = ['value', 'defaultValue'];
29411 26832
29412/** 26833/**
29413 * This helper object stores information about text content of a target node, 26834 * Validation function for `value` and `defaultValue`.
29414 * allowing comparison of content before and after a given event.
29415 *
29416 * Identify the node where selection currently begins, then observe
29417 * both its text content and its current position in the DOM. Since the
29418 * browser may natively replace the target node during composition, we can
29419 * use its position to find its replacement.
29420 *
29421 *
29422 */ 26835 */
29423var compositionState = { 26836function checkSelectPropTypes(props) {
29424 _root: null, 26837 ReactControlledValuePropTypes.checkPropTypes('select', props, getCurrentFiberStackAddendum$4);
29425 _startText: null,
29426 _fallbackText: null
29427};
29428 26838
29429var FallbackCompositionState = { 26839 for (var i = 0; i < valuePropNames.length; i++) {
29430 initialize: function (nativeEventTarget) { 26840 var propName = valuePropNames[i];
29431 compositionState._root = nativeEventTarget; 26841 if (props[propName] == null) {
29432 compositionState._startText = FallbackCompositionState.getText(); 26842 continue;
29433 return true;
29434 },
29435 reset: function () {
29436 compositionState._root = null;
29437 compositionState._startText = null;
29438 compositionState._fallbackText = null;
29439 },
29440 getData: function () {
29441 if (compositionState._fallbackText) {
29442 return compositionState._fallbackText;
29443 } 26843 }
26844 var isArray = Array.isArray(props[propName]);
26845 if (props.multiple && !isArray) {
26846 warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
26847 } else if (!props.multiple && isArray) {
26848 warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
26849 }
26850 }
26851}
29444 26852
29445 var start; 26853function updateOptions(node, multiple, propValue, setDefaultSelected) {
29446 var startValue = compositionState._startText; 26854 var options = node.options;
29447 var startLength = startValue.length;
29448 var end;
29449 var endValue = FallbackCompositionState.getText();
29450 var endLength = endValue.length;
29451 26855
29452 for (start = 0; start < startLength; start++) { 26856 if (multiple) {
29453 if (startValue[start] !== endValue[start]) { 26857 var selectedValues = propValue;
29454 break; 26858 var selectedValue = {};
26859 for (var i = 0; i < selectedValues.length; i++) {
26860 // Prefix to avoid chaos with special keys.
26861 selectedValue['$' + selectedValues[i]] = true;
26862 }
26863 for (var _i = 0; _i < options.length; _i++) {
26864 var selected = selectedValue.hasOwnProperty('$' + options[_i].value);
26865 if (options[_i].selected !== selected) {
26866 options[_i].selected = selected;
26867 }
26868 if (selected && setDefaultSelected) {
26869 options[_i].defaultSelected = true;
29455 } 26870 }
29456 } 26871 }
29457 26872 } else {
29458 var minEnd = startLength - start; 26873 // Do not set `select.value` as exact behavior isn't consistent across all
29459 for (end = 1; end <= minEnd; end++) { 26874 // browsers for all cases.
29460 if (startValue[startLength - end] !== endValue[endLength - end]) { 26875 var _selectedValue = '' + propValue;
29461 break; 26876 var defaultSelected = null;
26877 for (var _i2 = 0; _i2 < options.length; _i2++) {
26878 if (options[_i2].value === _selectedValue) {
26879 options[_i2].selected = true;
26880 if (setDefaultSelected) {
26881 options[_i2].defaultSelected = true;
26882 }
26883 return;
26884 }
26885 if (defaultSelected === null && !options[_i2].disabled) {
26886 defaultSelected = options[_i2];
29462 } 26887 }
29463 } 26888 }
29464 26889 if (defaultSelected !== null) {
29465 var sliceTail = end > 1 ? 1 - end : undefined; 26890 defaultSelected.selected = true;
29466 compositionState._fallbackText = endValue.slice(start, sliceTail);
29467 return compositionState._fallbackText;
29468 },
29469 getText: function () {
29470 if ('value' in compositionState._root) {
29471 return compositionState._root.value;
29472 } 26891 }
29473 return compositionState._root[getTextContentAccessor_1()];
29474 } 26892 }
29475};
29476
29477var FallbackCompositionState_1 = FallbackCompositionState;
29478
29479var didWarnForAddedNewProperty = false;
29480var isProxySupported = typeof Proxy === 'function';
29481var EVENT_POOL_SIZE = 10;
29482
29483{
29484 var warning$30 = require$$0;
29485} 26893}
29486 26894
29487var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];
29488
29489/** 26895/**
29490 * @interface Event 26896 * Implements a <select> host component that allows optionally setting the
29491 * @see http://www.w3.org/TR/DOM-Level-3-Events/ 26897 * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
29492 */ 26898 * stringable. If `multiple` is true, the prop must be an array of stringables.
29493var EventInterface = {
29494 type: null,
29495 target: null,
29496 // currentTarget is set when dispatching; no use in copying it here
29497 currentTarget: emptyFunction.thatReturnsNull,
29498 eventPhase: null,
29499 bubbles: null,
29500 cancelable: null,
29501 timeStamp: function (event) {
29502 return event.timeStamp || Date.now();
29503 },
29504 defaultPrevented: null,
29505 isTrusted: null
29506};
29507
29508/**
29509 * Synthetic events are dispatched by event plugins, typically in response to a
29510 * top-level event delegation handler.
29511 * 26899 *
29512 * These systems should generally use pooling to reduce the frequency of garbage 26900 * If `value` is not supplied (or null/undefined), user actions that change the
29513 * collection. The system should check `isPersistent` to determine whether the 26901 * selected option will trigger updates to the rendered options.
29514 * event should be released into the pool after being dispatched. Users that
29515 * need a persisted event should invoke `persist`.
29516 * 26902 *
29517 * Synthetic events (and subclasses) implement the DOM Level 3 Events API by 26903 * If it is supplied (and not null/undefined), the rendered options will not
29518 * normalizing browser quirks. Subclasses do not necessarily have to implement a 26904 * update in response to user actions. Instead, the `value` prop must change in
29519 * DOM interface; custom application-specific events can also subclass this. 26905 * order for the rendered options to update.
29520 * 26906 *
29521 * @param {object} dispatchConfig Configuration used to dispatch this event. 26907 * If `defaultValue` is provided, any options with the supplied values will be
29522 * @param {*} targetInst Marker identifying the event target. 26908 * selected.
29523 * @param {object} nativeEvent Native browser event.
29524 * @param {DOMEventTarget} nativeEventTarget Target node.
29525 */ 26909 */
29526function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) { 26910
26911function getHostProps$2(element, props) {
26912 return _assign({}, props, {
26913 value: undefined
26914 });
26915}
26916
26917function initWrapperState$1(element, props) {
26918 var node = element;
29527 { 26919 {
29528 // these have a getter/setter for warnings 26920 checkSelectPropTypes(props);
29529 delete this.nativeEvent;
29530 delete this.preventDefault;
29531 delete this.stopPropagation;
29532 } 26921 }
29533 26922
29534 this.dispatchConfig = dispatchConfig; 26923 var value = props.value;
29535 this._targetInst = targetInst; 26924 node._wrapperState = {
29536 this.nativeEvent = nativeEvent; 26925 initialValue: value != null ? value : props.defaultValue,
26926 wasMultiple: !!props.multiple
26927 };
29537 26928
29538 var Interface = this.constructor.Interface; 26929 {
29539 for (var propName in Interface) { 26930 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {
29540 if (!Interface.hasOwnProperty(propName)) { 26931 warning(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
29541 continue; 26932 didWarnValueDefaultValue$1 = true;
29542 }
29543 {
29544 delete this[propName]; // this has a getter/setter for warnings
29545 }
29546 var normalize = Interface[propName];
29547 if (normalize) {
29548 this[propName] = normalize(nativeEvent);
29549 } else {
29550 if (propName === 'target') {
29551 this.target = nativeEventTarget;
29552 } else {
29553 this[propName] = nativeEvent[propName];
29554 }
29555 } 26933 }
29556 } 26934 }
26935}
29557 26936
29558 var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false; 26937function postMountWrapper$2(element, props) {
29559 if (defaultPrevented) { 26938 var node = element;
29560 this.isDefaultPrevented = emptyFunction.thatReturnsTrue; 26939 node.multiple = !!props.multiple;
29561 } else { 26940 var value = props.value;
29562 this.isDefaultPrevented = emptyFunction.thatReturnsFalse; 26941 if (value != null) {
26942 updateOptions(node, !!props.multiple, value, false);
26943 } else if (props.defaultValue != null) {
26944 updateOptions(node, !!props.multiple, props.defaultValue, true);
29563 } 26945 }
29564 this.isPropagationStopped = emptyFunction.thatReturnsFalse;
29565 return this;
29566} 26946}
29567 26947
29568_assign(SyntheticEvent.prototype, { 26948function postUpdateWrapper(element, props) {
29569 preventDefault: function () { 26949 var node = element;
29570 this.defaultPrevented = true; 26950 // After the initial mount, we control selected-ness manually so don't pass
29571 var event = this.nativeEvent; 26951 // this value down
29572 if (!event) { 26952 node._wrapperState.initialValue = undefined;
29573 return;
29574 }
29575
29576 if (event.preventDefault) {
29577 event.preventDefault();
29578 } else if (typeof event.returnValue !== 'unknown') {
29579 event.returnValue = false;
29580 }
29581 this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
29582 },
29583 26953
29584 stopPropagation: function () { 26954 var wasMultiple = node._wrapperState.wasMultiple;
29585 var event = this.nativeEvent; 26955 node._wrapperState.wasMultiple = !!props.multiple;
29586 if (!event) {
29587 return;
29588 }
29589 26956
29590 if (event.stopPropagation) { 26957 var value = props.value;
29591 event.stopPropagation(); 26958 if (value != null) {
29592 } else if (typeof event.cancelBubble !== 'unknown') { 26959 updateOptions(node, !!props.multiple, value, false);
29593 // The ChangeEventPlugin registers a "propertychange" event for 26960 } else if (wasMultiple !== !!props.multiple) {
29594 // IE. This event does not support bubbling or cancelling, and 26961 // For simplicity, reapply `defaultValue` if `multiple` is toggled.
29595 // any references to cancelBubble throw "Member not found". A 26962 if (props.defaultValue != null) {
29596 // typeof check of "unknown" circumvents this issue (and is also 26963 updateOptions(node, !!props.multiple, props.defaultValue, true);
29597 // IE specific). 26964 } else {
29598 event.cancelBubble = true; 26965 // Revert the select back to its default unselected state.
26966 updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);
29599 } 26967 }
26968 }
26969}
29600 26970
29601 this.isPropagationStopped = emptyFunction.thatReturnsTrue; 26971function restoreControlledState$2(element, props) {
29602 }, 26972 var node = element;
29603 26973 var value = props.value;
29604 /**
29605 * We release all dispatched `SyntheticEvent`s after each event loop, adding
29606 * them back into the pool. This allows a way to hold onto a reference that
29607 * won't be added back into the pool.
29608 */
29609 persist: function () {
29610 this.isPersistent = emptyFunction.thatReturnsTrue;
29611 },
29612
29613 /**
29614 * Checks if this event should be released back into the pool.
29615 *
29616 * @return {boolean} True if this should not be released, false otherwise.
29617 */
29618 isPersistent: emptyFunction.thatReturnsFalse,
29619 26974
29620 /** 26975 if (value != null) {
29621 * `PooledClass` looks for `destructor` on each instance it releases. 26976 updateOptions(node, !!props.multiple, value, false);
29622 */
29623 destructor: function () {
29624 var Interface = this.constructor.Interface;
29625 for (var propName in Interface) {
29626 {
29627 Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
29628 }
29629 }
29630 for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
29631 this[shouldBeReleasedProperties[i]] = null;
29632 }
29633 {
29634 Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
29635 Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
29636 Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
29637 }
29638 } 26977 }
29639}); 26978}
29640 26979
29641SyntheticEvent.Interface = EventInterface; 26980// TODO: direct imports like some-package/src/* are bad. Fix me.
26981var getCurrentFiberStackAddendum$5 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
26982
26983var didWarnValDefaultVal = false;
29642 26984
29643/** 26985/**
29644 * Helper to reduce boilerplate when creating subclasses. 26986 * Implements a <textarea> host component that allows setting `value`, and
26987 * `defaultValue`. This differs from the traditional DOM API because value is
26988 * usually set as PCDATA children.
29645 * 26989 *
29646 * @param {function} Class 26990 * If `value` is not supplied (or null/undefined), user actions that affect the
29647 * @param {?object} Interface 26991 * value will trigger updates to the element.
26992 *
26993 * If `value` is supplied (and not null/undefined), the rendered element will
26994 * not trigger updates to the element. Instead, the `value` prop must change in
26995 * order for the rendered element to be updated.
26996 *
26997 * The rendered element will be initialized with an empty value, the prop
26998 * `defaultValue` if specified, or the children content (deprecated).
29648 */ 26999 */
29649SyntheticEvent.augmentClass = function (Class, Interface) {
29650 var Super = this;
29651 27000
29652 var E = function () {}; 27001function getHostProps$3(element, props) {
29653 E.prototype = Super.prototype; 27002 var node = element;
29654 var prototype = new E(); 27003 !(props.dangerouslySetInnerHTML == null) ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : void 0;
29655 27004
29656 _assign(prototype, Class.prototype); 27005 // Always set children to the same thing. In IE9, the selection range will
29657 Class.prototype = prototype; 27006 // get reset if `textContent` is mutated. We could add a check in setTextContent
29658 Class.prototype.constructor = Class; 27007 // to only set the value if/when the value differs from the node value (which would
27008 // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this
27009 // solution. The value can be a boolean or object so that's why it's forced
27010 // to be a string.
27011 var hostProps = _assign({}, props, {
27012 value: undefined,
27013 defaultValue: undefined,
27014 children: '' + node._wrapperState.initialValue
27015 });
29659 27016
29660 Class.Interface = _assign({}, Super.Interface, Interface); 27017 return hostProps;
29661 Class.augmentClass = Super.augmentClass; 27018}
29662 addEventPoolingTo(Class);
29663};
29664 27019
29665/** Proxying after everything set on SyntheticEvent 27020function initWrapperState$2(element, props) {
29666 * to resolve Proxy issue on some WebKit browsers 27021 var node = element;
29667 * in which some Event properties are set to undefined (GH#10010) 27022 {
29668 */ 27023 ReactControlledValuePropTypes.checkPropTypes('textarea', props, getCurrentFiberStackAddendum$5);
29669{ 27024 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
29670 if (isProxySupported) { 27025 warning(false, 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
29671 /*eslint-disable no-func-assign */ 27026 didWarnValDefaultVal = true;
29672 SyntheticEvent = new Proxy(SyntheticEvent, { 27027 }
29673 construct: function (target, args) {
29674 return this.apply(target, Object.create(target.prototype), args);
29675 },
29676 apply: function (constructor, that, args) {
29677 return new Proxy(constructor.apply(that, args), {
29678 set: function (target, prop, value) {
29679 if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
29680 warning$30(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.');
29681 didWarnForAddedNewProperty = true;
29682 }
29683 target[prop] = value;
29684 return true;
29685 }
29686 });
29687 }
29688 });
29689 /*eslint-enable no-func-assign */
29690 } 27028 }
29691}
29692 27029
29693addEventPoolingTo(SyntheticEvent); 27030 var value = props.value;
27031 var initialValue = value;
29694 27032
29695var SyntheticEvent_1 = SyntheticEvent; 27033 // Only bother fetching default value if we're going to use it
27034 if (value == null) {
27035 var defaultValue = props.defaultValue;
27036 // TODO (yungsters): Remove support for children content in <textarea>.
27037 var children = props.children;
27038 if (children != null) {
27039 {
27040 warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
27041 }
27042 !(defaultValue == null) ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : void 0;
27043 if (Array.isArray(children)) {
27044 !(children.length <= 1) ? invariant(false, '<textarea> can only have at most one child.') : void 0;
27045 children = children[0];
27046 }
29696 27047
29697/** 27048 defaultValue = '' + children;
29698 * Helper to nullify syntheticEvent instance properties when destructing 27049 }
29699 * 27050 if (defaultValue == null) {
29700 * @param {String} propName 27051 defaultValue = '';
29701 * @param {?object} getVal 27052 }
29702 * @return {object} defineProperty object 27053 initialValue = defaultValue;
29703 */ 27054 }
29704function getPooledWarningPropertyDefinition(propName, getVal) { 27055
29705 var isFunction = typeof getVal === 'function'; 27056 node._wrapperState = {
29706 return { 27057 initialValue: '' + initialValue
29707 configurable: true,
29708 set: set,
29709 get: get
29710 }; 27058 };
27059}
29711 27060
29712 function set(val) { 27061function updateWrapper$1(element, props) {
29713 var action = isFunction ? 'setting the method' : 'setting the property'; 27062 var node = element;
29714 warn(action, 'This is effectively a no-op'); 27063 var value = props.value;
29715 return val; 27064 if (value != null) {
29716 } 27065 // Cast `value` to a string to ensure the value is set correctly. While
27066 // browsers typically do this as necessary, jsdom doesn't.
27067 var newValue = '' + value;
29717 27068
29718 function get() { 27069 // To avoid side effects (such as losing text selection), only set value if changed
29719 var action = isFunction ? 'accessing the method' : 'accessing the property'; 27070 if (newValue !== node.value) {
29720 var result = isFunction ? 'This is a no-op function' : 'This is set to null'; 27071 node.value = newValue;
29721 warn(action, result); 27072 }
29722 return getVal; 27073 if (props.defaultValue == null) {
27074 node.defaultValue = newValue;
27075 }
29723 } 27076 }
29724 27077 if (props.defaultValue != null) {
29725 function warn(action, result) { 27078 node.defaultValue = props.defaultValue;
29726 var warningCondition = false;
29727 warning$30(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result);
29728 } 27079 }
29729} 27080}
29730 27081
29731function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) { 27082function postMountWrapper$3(element, props) {
29732 var EventConstructor = this; 27083 var node = element;
29733 if (EventConstructor.eventPool.length) { 27084 // This is in postMount because we need access to the DOM node, which is not
29734 var instance = EventConstructor.eventPool.pop(); 27085 // available until after the component has mounted.
29735 EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst); 27086 var textContent = node.textContent;
29736 return instance; 27087
27088 // Only set node.value if textContent is equal to the expected
27089 // initial value. In IE10/IE11 there is a bug where the placeholder attribute
27090 // will populate textContent as well.
27091 // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
27092 if (textContent === node._wrapperState.initialValue) {
27093 node.value = textContent;
29737 } 27094 }
29738 return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst);
29739} 27095}
29740 27096
29741function releasePooledEvent(event) { 27097function restoreControlledState$3(element, props) {
29742 var EventConstructor = this; 27098 // DOM component is still mounted; update
29743 !(event instanceof EventConstructor) ? invariant(false, 'Trying to release an event instance into a pool of a different type.') : void 0; 27099 updateWrapper$1(element, props);
29744 event.destructor(); 27100}
29745 if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) { 27101
29746 EventConstructor.eventPool.push(event); 27102var HTML_NAMESPACE$1 = 'http://www.w3.org/1999/xhtml';
27103var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
27104var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
27105
27106var Namespaces = {
27107 html: HTML_NAMESPACE$1,
27108 mathml: MATH_NAMESPACE,
27109 svg: SVG_NAMESPACE
27110};
27111
27112// Assumes there is no parent namespace.
27113function getIntrinsicNamespace(type) {
27114 switch (type) {
27115 case 'svg':
27116 return SVG_NAMESPACE;
27117 case 'math':
27118 return MATH_NAMESPACE;
27119 default:
27120 return HTML_NAMESPACE$1;
29747 } 27121 }
29748} 27122}
29749 27123
29750function addEventPoolingTo(EventConstructor) { 27124function getChildNamespace(parentNamespace, type) {
29751 EventConstructor.eventPool = []; 27125 if (parentNamespace == null || parentNamespace === HTML_NAMESPACE$1) {
29752 EventConstructor.getPooled = getPooledEvent; 27126 // No (or default) parent namespace: potential entry point.
29753 EventConstructor.release = releasePooledEvent; 27127 return getIntrinsicNamespace(type);
27128 }
27129 if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
27130 // We're leaving SVG.
27131 return HTML_NAMESPACE$1;
27132 }
27133 // By default, pass namespace below.
27134 return parentNamespace;
29754} 27135}
29755 27136
27137/* globals MSApp */
27138
29756/** 27139/**
29757 * @interface Event 27140 * Create a function which has 'unsafe' privileges (required by windows8 apps)
29758 * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
29759 */ 27141 */
29760var CompositionEventInterface = { 27142var createMicrosoftUnsafeLocalFunction = function (func) {
29761 data: null 27143 if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
27144 return function (arg0, arg1, arg2, arg3) {
27145 MSApp.execUnsafeLocalFunction(function () {
27146 return func(arg0, arg1, arg2, arg3);
27147 });
27148 };
27149 } else {
27150 return func;
27151 }
29762}; 27152};
29763 27153
27154// SVG temp container for IE lacking innerHTML
27155var reusableSVGContainer = void 0;
27156
29764/** 27157/**
29765 * @param {object} dispatchConfig Configuration used to dispatch this event. 27158 * Set the innerHTML property of a node
29766 * @param {string} dispatchMarker Marker identifying the event target. 27159 *
29767 * @param {object} nativeEvent Native browser event. 27160 * @param {DOMElement} node
29768 * @extends {SyntheticUIEvent} 27161 * @param {string} html
27162 * @internal
29769 */ 27163 */
29770function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { 27164var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
29771 return SyntheticEvent_1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); 27165 // IE does not have innerHTML for SVG nodes, so instead we inject the
29772} 27166 // new markup in a temp node and then move the child nodes across into
29773 27167 // the target node
29774SyntheticEvent_1.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);
29775 27168
29776var SyntheticCompositionEvent_1 = SyntheticCompositionEvent; 27169 if (node.namespaceURI === Namespaces.svg && !('innerHTML' in node)) {
27170 reusableSVGContainer = reusableSVGContainer || document.createElement('div');
27171 reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';
27172 var svgNode = reusableSVGContainer.firstChild;
27173 while (node.firstChild) {
27174 node.removeChild(node.firstChild);
27175 }
27176 while (svgNode.firstChild) {
27177 node.appendChild(svgNode.firstChild);
27178 }
27179 } else {
27180 node.innerHTML = html;
27181 }
27182});
29777 27183
27184// code copied and modified from escape-html
29778/** 27185/**
29779 * @interface Event 27186 * Module variables.
29780 * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 27187 * @private
29781 * /#events-inputevents
29782 */ 27188 */
29783var InputEventInterface = { 27189
29784 data: null 27190var matchHtmlRegExp = /["'&<>]/;
29785};
29786 27191
29787/** 27192/**
29788 * @param {object} dispatchConfig Configuration used to dispatch this event. 27193 * Escape special characters in the given string of html.
29789 * @param {string} dispatchMarker Marker identifying the event target. 27194 *
29790 * @param {object} nativeEvent Native browser event. 27195 * @param {string} string The string to escape for inserting into HTML
29791 * @extends {SyntheticUIEvent} 27196 * @return {string}
27197 * @public
29792 */ 27198 */
29793function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
29794 return SyntheticEvent_1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
29795}
29796 27199
29797SyntheticEvent_1.augmentClass(SyntheticInputEvent, InputEventInterface); 27200function escapeHtml(string) {
27201 var str = '' + string;
27202 var match = matchHtmlRegExp.exec(str);
29798 27203
29799var SyntheticInputEvent_1 = SyntheticInputEvent; 27204 if (!match) {
27205 return str;
27206 }
29800 27207
29801var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space 27208 var escape;
29802var START_KEYCODE = 229; 27209 var html = '';
27210 var index = 0;
27211 var lastIndex = 0;
29803 27212
29804var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window; 27213 for (index = match.index; index < str.length; index++) {
27214 switch (str.charCodeAt(index)) {
27215 case 34:
27216 // "
27217 escape = '&quot;';
27218 break;
27219 case 38:
27220 // &
27221 escape = '&amp;';
27222 break;
27223 case 39:
27224 // '
27225 escape = '&#x27;'; // modified from escape-html; used to be '&#39'
27226 break;
27227 case 60:
27228 // <
27229 escape = '&lt;';
27230 break;
27231 case 62:
27232 // >
27233 escape = '&gt;';
27234 break;
27235 default:
27236 continue;
27237 }
29805 27238
29806var documentMode = null; 27239 if (lastIndex !== index) {
29807if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { 27240 html += str.substring(lastIndex, index);
29808 documentMode = document.documentMode; 27241 }
29809}
29810 27242
29811// Webkit offers a very useful `textInput` event that can be used to 27243 lastIndex = index + 1;
29812// directly represent `beforeInput`. The IE `textinput` event is not as 27244 html += escape;
29813// useful, so we don't use it. 27245 }
29814var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
29815 27246
29816// In IE9+, we have access to composition events, but the data supplied 27247 return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
29817// by the native compositionend event may be incorrect. Japanese ideographic 27248}
29818// spaces, for instance (\u3000) are not recorded correctly. 27249// end code copied and modified from escape-html
29819var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
29820 27250
29821/** 27251/**
29822 * Opera <= 12 includes TextEvent in window, but does not fire 27252 * Escapes text to prevent scripting attacks.
29823 * text input events. Rely on keypress instead. 27253 *
27254 * @param {*} text Text value to escape.
27255 * @return {string} An escaped string.
29824 */ 27256 */
29825function isPresto() { 27257function escapeTextContentForBrowser(text) {
29826 var opera = window.opera; 27258 if (typeof text === 'boolean' || typeof text === 'number') {
29827 return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12; 27259 // this shortcircuit helps perf for types that we know will never have
27260 // special characters, especially given that this function is used often
27261 // for numeric dom ids.
27262 return '' + text;
27263 }
27264 return escapeHtml(text);
29828} 27265}
29829 27266
29830var SPACEBAR_CODE = 32; 27267/**
29831var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); 27268 * Set the textContent property of a node, ensuring that whitespace is preserved
27269 * even in IE8. innerText is a poor substitute for textContent and, among many
27270 * issues, inserts <br> instead of the literal newline chars. innerHTML behaves
27271 * as it should.
27272 *
27273 * @param {DOMElement} node
27274 * @param {string} text
27275 * @internal
27276 */
27277var setTextContent = function (node, text) {
27278 if (text) {
27279 var firstChild = node.firstChild;
29832 27280
29833// Events and their corresponding property names. 27281 if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
29834var eventTypes = { 27282 firstChild.nodeValue = text;
29835 beforeInput: { 27283 return;
29836 phasedRegistrationNames: { 27284 }
29837 bubbled: 'onBeforeInput',
29838 captured: 'onBeforeInputCapture'
29839 },
29840 dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']
29841 },
29842 compositionEnd: {
29843 phasedRegistrationNames: {
29844 bubbled: 'onCompositionEnd',
29845 captured: 'onCompositionEndCapture'
29846 },
29847 dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
29848 },
29849 compositionStart: {
29850 phasedRegistrationNames: {
29851 bubbled: 'onCompositionStart',
29852 captured: 'onCompositionStartCapture'
29853 },
29854 dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
29855 },
29856 compositionUpdate: {
29857 phasedRegistrationNames: {
29858 bubbled: 'onCompositionUpdate',
29859 captured: 'onCompositionUpdateCapture'
29860 },
29861 dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
29862 } 27285 }
27286 node.textContent = text;
29863}; 27287};
29864 27288
29865// Track whether we've ever handled a keypress on the space key. 27289if (ExecutionEnvironment.canUseDOM) {
29866var hasSpaceKeypress = false; 27290 if (!('textContent' in document.documentElement)) {
27291 setTextContent = function (node, text) {
27292 if (node.nodeType === TEXT_NODE) {
27293 node.nodeValue = text;
27294 return;
27295 }
27296 setInnerHTML(node, escapeTextContentForBrowser(text));
27297 };
27298 }
27299}
27300
27301var setTextContent$1 = setTextContent;
29867 27302
29868/** 27303/**
29869 * Return whether a native keypress event is assumed to be a command. 27304 * CSS properties which accept numbers but are not in units of "px".
29870 * This is required because Firefox fires `keypress` events for key commands
29871 * (cut, copy, select-all, etc.) even though no character is inserted.
29872 */ 27305 */
29873function isKeypressCommand(nativeEvent) { 27306var isUnitlessNumber = {
29874 return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && 27307 animationIterationCount: true,
29875 // ctrlKey && altKey is equivalent to AltGr, and is not a command. 27308 borderImageOutset: true,
29876 !(nativeEvent.ctrlKey && nativeEvent.altKey); 27309 borderImageSlice: true,
29877} 27310 borderImageWidth: true,
27311 boxFlex: true,
27312 boxFlexGroup: true,
27313 boxOrdinalGroup: true,
27314 columnCount: true,
27315 columns: true,
27316 flex: true,
27317 flexGrow: true,
27318 flexPositive: true,
27319 flexShrink: true,
27320 flexNegative: true,
27321 flexOrder: true,
27322 gridRow: true,
27323 gridRowEnd: true,
27324 gridRowSpan: true,
27325 gridRowStart: true,
27326 gridColumn: true,
27327 gridColumnEnd: true,
27328 gridColumnSpan: true,
27329 gridColumnStart: true,
27330 fontWeight: true,
27331 lineClamp: true,
27332 lineHeight: true,
27333 opacity: true,
27334 order: true,
27335 orphans: true,
27336 tabSize: true,
27337 widows: true,
27338 zIndex: true,
27339 zoom: true,
27340
27341 // SVG-related properties
27342 fillOpacity: true,
27343 floodOpacity: true,
27344 stopOpacity: true,
27345 strokeDasharray: true,
27346 strokeDashoffset: true,
27347 strokeMiterlimit: true,
27348 strokeOpacity: true,
27349 strokeWidth: true
27350};
29878 27351
29879/** 27352/**
29880 * Translate native top level events into event types. 27353 * @param {string} prefix vendor-specific prefix, eg: Webkit
29881 * 27354 * @param {string} key style name, eg: transitionDuration
29882 * @param {string} topLevelType 27355 * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
29883 * @return {object} 27356 * WebkitTransitionDuration
29884 */ 27357 */
29885function getCompositionEventType(topLevelType) { 27358function prefixKey(prefix, key) {
29886 switch (topLevelType) { 27359 return prefix + key.charAt(0).toUpperCase() + key.substring(1);
29887 case 'topCompositionStart':
29888 return eventTypes.compositionStart;
29889 case 'topCompositionEnd':
29890 return eventTypes.compositionEnd;
29891 case 'topCompositionUpdate':
29892 return eventTypes.compositionUpdate;
29893 }
29894} 27360}
29895 27361
29896/** 27362/**
29897 * Does our fallback best-guess model think this event signifies that 27363 * Support style names that may come passed in prefixed by adding permutations
29898 * composition has begun? 27364 * of vendor prefixes.
29899 *
29900 * @param {string} topLevelType
29901 * @param {object} nativeEvent
29902 * @return {boolean}
29903 */ 27365 */
29904function isFallbackCompositionStart(topLevelType, nativeEvent) { 27366var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
29905 return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE; 27367
29906} 27368// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
27369// infinite loop, because it iterates over the newly added props too.
27370Object.keys(isUnitlessNumber).forEach(function (prop) {
27371 prefixes.forEach(function (prefix) {
27372 isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
27373 });
27374});
29907 27375
29908/** 27376/**
29909 * Does our fallback mode think that this event is the end of composition? 27377 * Convert a value into the proper css writable value. The style name `name`
27378 * should be logical (no hyphens), as specified
27379 * in `CSSProperty.isUnitlessNumber`.
29910 * 27380 *
29911 * @param {string} topLevelType 27381 * @param {string} name CSS property name such as `topMargin`.
29912 * @param {object} nativeEvent 27382 * @param {*} value CSS property value such as `10px`.
29913 * @return {boolean} 27383 * @return {string} Normalized style value with dimensions applied.
29914 */ 27384 */
29915function isFallbackCompositionEnd(topLevelType, nativeEvent) { 27385function dangerousStyleValue(name, value, isCustomProperty) {
29916 switch (topLevelType) { 27386 // Note that we've removed escapeTextForBrowser() calls here since the
29917 case 'topKeyUp': 27387 // whole string will be escaped when the attribute is injected into
29918 // Command keys insert or clear IME input. 27388 // the markup. If you provide unsafe user data here they can inject
29919 return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; 27389 // arbitrary CSS which may be problematic (I couldn't repro this):
29920 case 'topKeyDown': 27390 // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
29921 // Expect IME keyCode on each keydown. If we get any other 27391 // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
29922 // code we must have exited earlier. 27392 // This is not an XSS hole but instead a potential CSS injection issue
29923 return nativeEvent.keyCode !== START_KEYCODE; 27393 // which has lead to a greater discussion about how we're going to
29924 case 'topKeyPress': 27394 // trust URLs moving forward. See #2115901
29925 case 'topMouseDown': 27395
29926 case 'topBlur': 27396 var isEmpty = value == null || typeof value === 'boolean' || value === '';
29927 // Events are not possible without cancelling IME. 27397 if (isEmpty) {
29928 return true; 27398 return '';
29929 default:
29930 return false;
29931 } 27399 }
29932}
29933 27400
29934/** 27401 if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
29935 * Google Input Tools provides composition data via a CustomEvent, 27402 return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
29936 * with the `data` property populated in the `detail` object. If this
29937 * is available on the event object, use it. If not, this is a plain
29938 * composition event and we have nothing special to extract.
29939 *
29940 * @param {object} nativeEvent
29941 * @return {?string}
29942 */
29943function getDataFromCustomEvent(nativeEvent) {
29944 var detail = nativeEvent.detail;
29945 if (typeof detail === 'object' && 'data' in detail) {
29946 return detail.data;
29947 } 27403 }
29948 return null; 27404
27405 return ('' + value).trim();
29949} 27406}
29950 27407
29951// Track the current IME composition status, if any. 27408var warnValidStyle = emptyFunction$1;
29952var isComposing = false;
29953 27409
29954/** 27410{
29955 * @return {?object} A SyntheticCompositionEvent. 27411 // 'msTransform' is correct, but the other prefixes should be capitalized
29956 */ 27412 var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
29957function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
29958 var eventType;
29959 var fallbackData;
29960 27413
29961 if (canUseCompositionEvent) { 27414 // style values shouldn't contain a semicolon
29962 eventType = getCompositionEventType(topLevelType); 27415 var badStyleValueWithSemicolonPattern = /;\s*$/;
29963 } else if (!isComposing) {
29964 if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
29965 eventType = eventTypes.compositionStart;
29966 }
29967 } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
29968 eventType = eventTypes.compositionEnd;
29969 }
29970 27416
29971 if (!eventType) { 27417 var warnedStyleNames = {};
29972 return null; 27418 var warnedStyleValues = {};
29973 } 27419 var warnedForNaNValue = false;
27420 var warnedForInfinityValue = false;
29974 27421
29975 if (useFallbackCompositionData) { 27422 var warnHyphenatedStyleName = function (name, getStack) {
29976 // The current composition is stored statically and must not be 27423 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
29977 // overwritten while composition continues. 27424 return;
29978 if (!isComposing && eventType === eventTypes.compositionStart) {
29979 isComposing = FallbackCompositionState_1.initialize(nativeEventTarget);
29980 } else if (eventType === eventTypes.compositionEnd) {
29981 if (isComposing) {
29982 fallbackData = FallbackCompositionState_1.getData();
29983 }
29984 } 27425 }
29985 }
29986 27426
29987 var event = SyntheticCompositionEvent_1.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget); 27427 warnedStyleNames[name] = true;
27428 warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), getStack());
27429 };
29988 27430
29989 if (fallbackData) { 27431 var warnBadVendoredStyleName = function (name, getStack) {
29990 // Inject data generated from fallback path into the synthetic event. 27432 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
29991 // This matches the property of native CompositionEventInterface. 27433 return;
29992 event.data = fallbackData;
29993 } else {
29994 var customData = getDataFromCustomEvent(nativeEvent);
29995 if (customData !== null) {
29996 event.data = customData;
29997 } 27434 }
29998 }
29999 27435
30000 EventPropagators_1.accumulateTwoPhaseDispatches(event); 27436 warnedStyleNames[name] = true;
30001 return event; 27437 warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), getStack());
30002} 27438 };
30003 27439
30004/** 27440 var warnStyleValueWithSemicolon = function (name, value, getStack) {
30005 * @param {TopLevelTypes} topLevelType Record from `BrowserEventConstants`. 27441 if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
30006 * @param {object} nativeEvent Native browser event. 27442 return;
30007 * @return {?string} The string corresponding to this `beforeInput` event. 27443 }
30008 */
30009function getNativeBeforeInputChars(topLevelType, nativeEvent) {
30010 switch (topLevelType) {
30011 case 'topCompositionEnd':
30012 return getDataFromCustomEvent(nativeEvent);
30013 case 'topKeyPress':
30014 /**
30015 * If native `textInput` events are available, our goal is to make
30016 * use of them. However, there is a special case: the spacebar key.
30017 * In Webkit, preventing default on a spacebar `textInput` event
30018 * cancels character insertion, but it *also* causes the browser
30019 * to fall back to its default spacebar behavior of scrolling the
30020 * page.
30021 *
30022 * Tracking at:
30023 * https://code.google.com/p/chromium/issues/detail?id=355103
30024 *
30025 * To avoid this issue, use the keypress event as if no `textInput`
30026 * event is available.
30027 */
30028 var which = nativeEvent.which;
30029 if (which !== SPACEBAR_CODE) {
30030 return null;
30031 }
30032 27444
30033 hasSpaceKeypress = true; 27445 warnedStyleValues[value] = true;
30034 return SPACEBAR_CHAR; 27446 warning(false, "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.%s', name, value.replace(badStyleValueWithSemicolonPattern, ''), getStack());
27447 };
30035 27448
30036 case 'topTextInput': 27449 var warnStyleValueIsNaN = function (name, value, getStack) {
30037 // Record the characters to be added to the DOM. 27450 if (warnedForNaNValue) {
30038 var chars = nativeEvent.data; 27451 return;
27452 }
30039 27453
30040 // If it's a spacebar character, assume that we have already handled 27454 warnedForNaNValue = true;
30041 // it at the keypress level and bail immediately. Android Chrome 27455 warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, getStack());
30042 // doesn't give us keycodes, so we need to blacklist it. 27456 };
30043 if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
30044 return null;
30045 }
30046 27457
30047 return chars; 27458 var warnStyleValueIsInfinity = function (name, value, getStack) {
27459 if (warnedForInfinityValue) {
27460 return;
27461 }
30048 27462
30049 default: 27463 warnedForInfinityValue = true;
30050 // For other native event types, do nothing. 27464 warning(false, '`Infinity` is an invalid value for the `%s` css style property.%s', name, getStack());
30051 return null; 27465 };
30052 }
30053}
30054 27466
30055/** 27467 warnValidStyle = function (name, value, getStack) {
30056 * For browsers that do not provide the `textInput` event, extract the 27468 if (name.indexOf('-') > -1) {
30057 * appropriate string to use for SyntheticInputEvent. 27469 warnHyphenatedStyleName(name, getStack);
30058 * 27470 } else if (badVendoredStyleNamePattern.test(name)) {
30059 * @param {string} topLevelType Record from `BrowserEventConstants`. 27471 warnBadVendoredStyleName(name, getStack);
30060 * @param {object} nativeEvent Native browser event. 27472 } else if (badStyleValueWithSemicolonPattern.test(value)) {
30061 * @return {?string} The fallback string for this `beforeInput` event. 27473 warnStyleValueWithSemicolon(name, value, getStack);
30062 */
30063function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
30064 // If we are currently composing (IME) and using a fallback to do so,
30065 // try to extract the composed characters from the fallback object.
30066 // If composition event is available, we extract a string only at
30067 // compositionevent, otherwise extract it at fallback events.
30068 if (isComposing) {
30069 if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
30070 var chars = FallbackCompositionState_1.getData();
30071 FallbackCompositionState_1.reset();
30072 isComposing = false;
30073 return chars;
30074 } 27474 }
30075 return null;
30076 }
30077 27475
30078 switch (topLevelType) { 27476 if (typeof value === 'number') {
30079 case 'topPaste': 27477 if (isNaN(value)) {
30080 // If a paste event occurs after a keypress, throw out the input 27478 warnStyleValueIsNaN(name, value, getStack);
30081 // chars. Paste events should not lead to BeforeInput events. 27479 } else if (!isFinite(value)) {
30082 return null; 27480 warnStyleValueIsInfinity(name, value, getStack);
30083 case 'topKeyPress':
30084 /**
30085 * As of v27, Firefox may fire keypress events even when no character
30086 * will be inserted. A few possibilities:
30087 *
30088 * - `which` is `0`. Arrow keys, Esc key, etc.
30089 *
30090 * - `which` is the pressed key code, but no char is available.
30091 * Ex: 'AltGr + d` in Polish. There is no modified character for
30092 * this key combination and no character is inserted into the
30093 * document, but FF fires the keypress for char code `100` anyway.
30094 * No `input` event will occur.
30095 *
30096 * - `which` is the pressed key code, but a command combination is
30097 * being used. Ex: `Cmd+C`. No character is inserted, and no
30098 * `input` event will occur.
30099 */
30100 if (!isKeypressCommand(nativeEvent)) {
30101 // IE fires the `keypress` event when a user types an emoji via
30102 // Touch keyboard of Windows. In such a case, the `char` property
30103 // holds an emoji character like `\uD83D\uDE0A`. Because its length
30104 // is 2, the property `which` does not represent an emoji correctly.
30105 // In such a case, we directly return the `char` property instead of
30106 // using `which`.
30107 if (nativeEvent.char && nativeEvent.char.length > 1) {
30108 return nativeEvent.char;
30109 } else if (nativeEvent.which) {
30110 return String.fromCharCode(nativeEvent.which);
30111 }
30112 } 27481 }
30113 return null; 27482 }
30114 case 'topCompositionEnd': 27483 };
30115 return useFallbackCompositionData ? null : nativeEvent.data;
30116 default:
30117 return null;
30118 }
30119} 27484}
30120 27485
27486var warnValidStyle$1 = warnValidStyle;
27487
30121/** 27488/**
30122 * Extract a SyntheticInputEvent for `beforeInput`, based on either native 27489 * Operations for dealing with CSS properties.
30123 * `textInput` or fallback behavior.
30124 *
30125 * @return {?object} A SyntheticInputEvent.
30126 */ 27490 */
30127function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
30128 var chars;
30129 27491
30130 if (canUseTextInputEvent) { 27492/**
30131 chars = getNativeBeforeInputChars(topLevelType, nativeEvent); 27493 * This creates a string that is expected to be equivalent to the style
30132 } else { 27494 * attribute generated by server-side rendering. It by-passes warnings and
30133 chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); 27495 * security checks so it's not safe to use this value for anything other than
30134 } 27496 * comparison. It is only used in DEV for SSR validation.
27497 */
27498function createDangerousStringForStyles(styles) {
27499 {
27500 var serialized = '';
27501 var delimiter = '';
27502 for (var styleName in styles) {
27503 if (!styles.hasOwnProperty(styleName)) {
27504 continue;
27505 }
27506 var styleValue = styles[styleName];
27507 if (styleValue != null) {
27508 var isCustomProperty = styleName.indexOf('--') === 0;
27509 serialized += delimiter + hyphenateStyleName(styleName) + ':';
27510 serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
30135 27511
30136 // If no characters are being inserted, no BeforeInput event should 27512 delimiter = ';';
30137 // be fired. 27513 }
30138 if (!chars) { 27514 }
30139 return null; 27515 return serialized || null;
30140 } 27516 }
30141
30142 var event = SyntheticInputEvent_1.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
30143
30144 event.data = chars;
30145 EventPropagators_1.accumulateTwoPhaseDispatches(event);
30146 return event;
30147} 27517}
30148 27518
30149/** 27519/**
30150 * Create an `onBeforeInput` event to match 27520 * Sets the value for multiple styles on a node. If a value is specified as
30151 * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. 27521 * '' (empty string), the corresponding style property will be unset.
30152 *
30153 * This event plugin is based on the native `textInput` event
30154 * available in Chrome, Safari, Opera, and IE. This event fires after
30155 * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
30156 * 27522 *
30157 * `beforeInput` is spec'd but not implemented in any browsers, and 27523 * @param {DOMElement} node
30158 * the `input` event does not provide any useful information about what has 27524 * @param {object} styles
30159 * actually been added, contrary to the spec. Thus, `textInput` is the best
30160 * available event to identify the characters that have actually been inserted
30161 * into the target node.
30162 *
30163 * This plugin is also responsible for emitting `composition` events, thus
30164 * allowing us to share composition fallback code for both `beforeInput` and
30165 * `composition` event types.
30166 */ 27525 */
30167var BeforeInputEventPlugin = { 27526function setValueForStyles(node, styles, getStack) {
30168 eventTypes: eventTypes, 27527 var style = node.style;
30169 27528 for (var styleName in styles) {
30170 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { 27529 if (!styles.hasOwnProperty(styleName)) {
30171 return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)]; 27530 continue;
27531 }
27532 var isCustomProperty = styleName.indexOf('--') === 0;
27533 {
27534 if (!isCustomProperty) {
27535 warnValidStyle$1(styleName, styles[styleName], getStack);
27536 }
27537 }
27538 var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);
27539 if (styleName === 'float') {
27540 styleName = 'cssFloat';
27541 }
27542 if (isCustomProperty) {
27543 style.setProperty(styleName, styleValue);
27544 } else {
27545 style[styleName] = styleValue;
27546 }
30172 } 27547 }
30173}; 27548}
30174 27549
30175var BeforeInputEventPlugin_1 = BeforeInputEventPlugin; 27550// For HTML, certain tags should omit their close tag. We keep a whitelist for
27551// those special-case tags.
30176 27552
30177/** 27553var omittedCloseTags = {
30178 * Copyright (c) 2013-present, Facebook, Inc. 27554 area: true,
30179 * 27555 base: true,
30180 * This source code is licensed under the MIT license found in the 27556 br: true,
30181 * LICENSE file in the root directory of this source tree. 27557 col: true,
30182 * 27558 embed: true,
30183 * @providesModule isTextInputElement 27559 hr: true,
30184 * 27560 img: true,
30185 */ 27561 input: true,
27562 keygen: true,
27563 link: true,
27564 meta: true,
27565 param: true,
27566 source: true,
27567 track: true,
27568 wbr: true
27569};
30186 27570
30187/** 27571// For HTML, certain tags cannot have children. This has the same purpose as
30188 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary 27572// `omittedCloseTags` except that `menuitem` should still have its closing tag.
30189 */
30190 27573
30191var supportedInputTypes = { 27574var voidElementTags = _assign({
30192 color: true, 27575 menuitem: true
30193 date: true, 27576}, omittedCloseTags);
30194 datetime: true,
30195 'datetime-local': true,
30196 email: true,
30197 month: true,
30198 number: true,
30199 password: true,
30200 range: true,
30201 search: true,
30202 tel: true,
30203 text: true,
30204 time: true,
30205 url: true,
30206 week: true
30207};
30208 27577
30209function isTextInputElement(elem) { 27578var HTML$1 = '__html';
30210 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
30211 27579
30212 if (nodeName === 'input') { 27580function assertValidProps(tag, props, getStack) {
30213 return !!supportedInputTypes[elem.type]; 27581 if (!props) {
27582 return;
30214 } 27583 }
30215 27584 // Note the use of `==` which checks for null or undefined.
30216 if (nodeName === 'textarea') { 27585 if (voidElementTags[tag]) {
30217 return true; 27586 !(props.children == null && props.dangerouslySetInnerHTML == null) ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', tag, getStack()) : void 0;
30218 } 27587 }
30219 27588 if (props.dangerouslySetInnerHTML != null) {
30220 return false; 27589 !(props.children == null) ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : void 0;
27590 !(typeof props.dangerouslySetInnerHTML === 'object' && HTML$1 in props.dangerouslySetInnerHTML) ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : void 0;
27591 }
27592 {
27593 warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.%s', getStack());
27594 }
27595 !(props.style == null || typeof props.style === 'object') ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', getStack()) : void 0;
30221} 27596}
30222 27597
30223var isTextInputElement_1 = isTextInputElement; 27598function isCustomComponent(tagName, props) {
30224 27599 if (tagName.indexOf('-') === -1) {
30225var eventTypes$1 = { 27600 return typeof props.is === 'string';
30226 change: { 27601 }
30227 phasedRegistrationNames: { 27602 switch (tagName) {
30228 bubbled: 'onChange', 27603 // These are reserved SVG and MathML elements.
30229 captured: 'onChangeCapture' 27604 // We don't mind this whitelist too much because we expect it to never grow.
30230 }, 27605 // The alternative is to track the namespace in a few places which is convoluted.
30231 dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange'] 27606 // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
27607 case 'annotation-xml':
27608 case 'color-profile':
27609 case 'font-face':
27610 case 'font-face-src':
27611 case 'font-face-uri':
27612 case 'font-face-format':
27613 case 'font-face-name':
27614 case 'missing-glyph':
27615 return false;
27616 default:
27617 return true;
30232 } 27618 }
30233};
30234
30235function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
30236 var event = SyntheticEvent_1.getPooled(eventTypes$1.change, inst, nativeEvent, target);
30237 event.type = 'change';
30238 // Flag this event loop as needing state restore.
30239 ReactControlledComponent_1.enqueueStateRestore(target);
30240 EventPropagators_1.accumulateTwoPhaseDispatches(event);
30241 return event;
30242} 27619}
30243/**
30244 * For IE shims
30245 */
30246var activeElement = null;
30247var activeElementInst = null;
30248 27620
30249/** 27621var ariaProperties = {
30250 * SECTION: handle `change` event 27622 'aria-current': 0, // state
30251 */ 27623 'aria-details': 0,
30252function shouldUseChangeEvent(elem) { 27624 'aria-disabled': 0, // state
30253 var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); 27625 'aria-hidden': 0, // state
30254 return nodeName === 'select' || nodeName === 'input' && elem.type === 'file'; 27626 'aria-invalid': 0, // state
30255} 27627 'aria-keyshortcuts': 0,
27628 'aria-label': 0,
27629 'aria-roledescription': 0,
27630 // Widget Attributes
27631 'aria-autocomplete': 0,
27632 'aria-checked': 0,
27633 'aria-expanded': 0,
27634 'aria-haspopup': 0,
27635 'aria-level': 0,
27636 'aria-modal': 0,
27637 'aria-multiline': 0,
27638 'aria-multiselectable': 0,
27639 'aria-orientation': 0,
27640 'aria-placeholder': 0,
27641 'aria-pressed': 0,
27642 'aria-readonly': 0,
27643 'aria-required': 0,
27644 'aria-selected': 0,
27645 'aria-sort': 0,
27646 'aria-valuemax': 0,
27647 'aria-valuemin': 0,
27648 'aria-valuenow': 0,
27649 'aria-valuetext': 0,
27650 // Live Region Attributes
27651 'aria-atomic': 0,
27652 'aria-busy': 0,
27653 'aria-live': 0,
27654 'aria-relevant': 0,
27655 // Drag-and-Drop Attributes
27656 'aria-dropeffect': 0,
27657 'aria-grabbed': 0,
27658 // Relationship Attributes
27659 'aria-activedescendant': 0,
27660 'aria-colcount': 0,
27661 'aria-colindex': 0,
27662 'aria-colspan': 0,
27663 'aria-controls': 0,
27664 'aria-describedby': 0,
27665 'aria-errormessage': 0,
27666 'aria-flowto': 0,
27667 'aria-labelledby': 0,
27668 'aria-owns': 0,
27669 'aria-posinset': 0,
27670 'aria-rowcount': 0,
27671 'aria-rowindex': 0,
27672 'aria-rowspan': 0,
27673 'aria-setsize': 0
27674};
30256 27675
30257function manualDispatchChangeEvent(nativeEvent) { 27676var warnedProperties = {};
30258 var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget_1(nativeEvent)); 27677var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
27678var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
30259 27679
30260 // If change and propertychange bubbled, we'd just bind to it like all the 27680var hasOwnProperty = Object.prototype.hasOwnProperty;
30261 // other events and have it go through ReactBrowserEventEmitter. Since it
30262 // doesn't, we manually listen for the events and so we have to enqueue and
30263 // process the abstract event manually.
30264 //
30265 // Batching is necessary here in order to ensure that all event handlers run
30266 // before the next rerender (including event handlers attached to ancestor
30267 // elements instead of directly on the input). Without this, controlled
30268 // components don't work properly in conjunction with event bubbling because
30269 // the component is rerendered and the value reverted before all the event
30270 // handlers can run. See https://github.com/facebook/react/issues/708.
30271 ReactGenericBatching_1.batchedUpdates(runEventInBatch, event);
30272}
30273 27681
30274function runEventInBatch(event) { 27682function getStackAddendum() {
30275 EventPluginHub_1.enqueueEvents(event); 27683 var stack = ReactDebugCurrentFrame.getStackAddendum();
30276 EventPluginHub_1.processEventQueue(false); 27684 return stack != null ? stack : '';
30277} 27685}
30278 27686
30279function getInstIfValueChanged(targetInst) { 27687function validateProperty(tagName, name) {
30280 var targetNode = ReactDOMComponentTree_1.getNodeFromInstance(targetInst); 27688 if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) {
30281 if (inputValueTracking_1.updateValueIfChanged(targetNode)) { 27689 return true;
30282 return targetInst;
30283 } 27690 }
30284}
30285 27691
30286function getTargetInstForChangeEvent(topLevelType, targetInst) { 27692 if (rARIACamel.test(name)) {
30287 if (topLevelType === 'topChange') { 27693 var ariaName = 'aria-' + name.slice(4).toLowerCase();
30288 return targetInst; 27694 var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null;
30289 }
30290}
30291 27695
30292/** 27696 // If this is an aria-* attribute, but is not listed in the known DOM
30293 * SECTION: handle `input` event 27697 // DOM properties, then it is an invalid aria-* attribute.
30294 */ 27698 if (correctName == null) {
30295var isInputEventSupported = false; 27699 warning(false, 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.%s', name, getStackAddendum());
30296if (ExecutionEnvironment.canUseDOM) { 27700 warnedProperties[name] = true;
30297 // IE9 claims to support the input event but fails to trigger it when 27701 return true;
30298 // deleting text, so we ignore its input events. 27702 }
30299 isInputEventSupported = isEventSupported_1('input') && (!document.documentMode || document.documentMode > 9); 27703 // aria-* attributes should be lowercase; suggest the lowercase version.
30300} 27704 if (name !== correctName) {
27705 warning(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?%s', name, correctName, getStackAddendum());
27706 warnedProperties[name] = true;
27707 return true;
27708 }
27709 }
30301 27710
30302/** 27711 if (rARIA.test(name)) {
30303 * (For IE <=9) Starts tracking propertychange events on the passed-in element 27712 var lowerCasedName = name.toLowerCase();
30304 * and override the value property so that we can distinguish user events from 27713 var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null;
30305 * value changes in JS.
30306 */
30307function startWatchingForValueChange(target, targetInst) {
30308 activeElement = target;
30309 activeElementInst = targetInst;
30310 activeElement.attachEvent('onpropertychange', handlePropertyChange);
30311}
30312 27714
30313/** 27715 // If this is an aria-* attribute, but is not listed in the known DOM
30314 * (For IE <=9) Removes the event listeners from the currently-tracked element, 27716 // DOM properties, then it is an invalid aria-* attribute.
30315 * if any exists. 27717 if (standardName == null) {
30316 */ 27718 warnedProperties[name] = true;
30317function stopWatchingForValueChange() { 27719 return false;
30318 if (!activeElement) { 27720 }
30319 return; 27721 // aria-* attributes should be lowercase; suggest the lowercase version.
27722 if (name !== standardName) {
27723 warning(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?%s', name, standardName, getStackAddendum());
27724 warnedProperties[name] = true;
27725 return true;
27726 }
30320 } 27727 }
30321 activeElement.detachEvent('onpropertychange', handlePropertyChange);
30322 activeElement = null;
30323 activeElementInst = null;
30324}
30325 27728
30326/** 27729 return true;
30327 * (For IE <=9) Handles a propertychange event, sending a `change` event if
30328 * the value of the active element has changed.
30329 */
30330function handlePropertyChange(nativeEvent) {
30331 if (nativeEvent.propertyName !== 'value') {
30332 return;
30333 }
30334 if (getInstIfValueChanged(activeElementInst)) {
30335 manualDispatchChangeEvent(nativeEvent);
30336 }
30337} 27730}
30338 27731
30339function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) { 27732function warnInvalidARIAProps(type, props) {
30340 if (topLevelType === 'topFocus') { 27733 var invalidProps = [];
30341 // In IE9, propertychange fires for most input events but is buggy and
30342 // doesn't fire when text is deleted, but conveniently, selectionchange
30343 // appears to fire in all of the remaining cases so we catch those and
30344 // forward the event if the value has changed
30345 // In either case, we don't want to call the event handler if the value
30346 // is changed from JS so we redefine a setter for `.value` that updates
30347 // our activeElementValue variable, allowing us to ignore those changes
30348 //
30349 // stopWatching() should be a noop here but we call it just in case we
30350 // missed a blur event somehow.
30351 stopWatchingForValueChange();
30352 startWatchingForValueChange(target, targetInst);
30353 } else if (topLevelType === 'topBlur') {
30354 stopWatchingForValueChange();
30355 }
30356}
30357 27734
30358// For IE8 and IE9. 27735 for (var key in props) {
30359function getTargetInstForInputEventPolyfill(topLevelType, targetInst) { 27736 var isValid = validateProperty(type, key);
30360 if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') { 27737 if (!isValid) {
30361 // On the selectionchange event, the target is just document which isn't 27738 invalidProps.push(key);
30362 // helpful for us so just check activeElement instead. 27739 }
30363 //
30364 // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
30365 // propertychange on the first input event after setting `value` from a
30366 // script and fires only keydown, keypress, keyup. Catching keyup usually
30367 // gets it and catching keydown lets us fire an event for the first
30368 // keystroke if user does a key repeat (it'll be a little delayed: right
30369 // before the second keystroke). Other input methods (e.g., paste) seem to
30370 // fire selectionchange normally.
30371 return getInstIfValueChanged(activeElementInst);
30372 } 27740 }
30373}
30374 27741
30375/** 27742 var unknownPropString = invalidProps.map(function (prop) {
30376 * SECTION: handle `click` event 27743 return '`' + prop + '`';
30377 */ 27744 }).join(', ');
30378function shouldUseClickEvent(elem) {
30379 // Use the `click` event to detect changes to checkbox and radio inputs.
30380 // This approach works across all browsers, whereas `change` does not fire
30381 // until `blur` in IE8.
30382 var nodeName = elem.nodeName;
30383 return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
30384}
30385 27745
30386function getTargetInstForClickEvent(topLevelType, targetInst) { 27746 if (invalidProps.length === 1) {
30387 if (topLevelType === 'topClick') { 27747 warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
30388 return getInstIfValueChanged(targetInst); 27748 } else if (invalidProps.length > 1) {
27749 warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
30389 } 27750 }
30390} 27751}
30391 27752
30392function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) { 27753function validateProperties(type, props) {
30393 if (topLevelType === 'topInput' || topLevelType === 'topChange') { 27754 if (isCustomComponent(type, props)) {
30394 return getInstIfValueChanged(targetInst); 27755 return;
30395 } 27756 }
27757 warnInvalidARIAProps(type, props);
30396} 27758}
30397 27759
30398function handleControlledInputBlur(inst, node) { 27760var didWarnValueNull = false;
30399 // TODO: In IE, inst is occasionally null. Why?
30400 if (inst == null) {
30401 return;
30402 }
30403 27761
30404 // Fiber and ReactDOM keep wrapper state in separate places 27762function getStackAddendum$1() {
30405 var state = inst._wrapperState || node._wrapperState; 27763 var stack = ReactDebugCurrentFrame.getStackAddendum();
27764 return stack != null ? stack : '';
27765}
30406 27766
30407 if (!state || !state.controlled || node.type !== 'number') { 27767function validateProperties$1(type, props) {
27768 if (type !== 'input' && type !== 'textarea' && type !== 'select') {
30408 return; 27769 return;
30409 } 27770 }
30410 27771
30411 // If controlled, assign the value attribute to the current value on blur 27772 if (props != null && props.value === null && !didWarnValueNull) {
30412 var value = '' + node.value; 27773 didWarnValueNull = true;
30413 if (node.getAttribute('value') !== value) { 27774 if (type === 'select' && props.multiple) {
30414 node.setAttribute('value', value); 27775 warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.%s', type, getStackAddendum$1());
27776 } else {
27777 warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.%s', type, getStackAddendum$1());
27778 }
30415 } 27779 }
30416} 27780}
30417 27781
30418/** 27782// When adding attributes to the HTML or SVG whitelist, be sure to
30419 * This plugin creates an `onChange` event that normalizes change events 27783// also add them to this module to ensure casing and incorrect name
30420 * across form elements. This event fires at a time when it's possible to 27784// warnings.
30421 * change the element's value without seeing a flicker. 27785var possibleStandardNames = {
30422 * 27786 // HTML
30423 * Supported elements are: 27787 accept: 'accept',
30424 * - input (see `isTextInputElement`) 27788 acceptcharset: 'acceptCharset',
30425 * - textarea 27789 'accept-charset': 'acceptCharset',
30426 * - select 27790 accesskey: 'accessKey',
30427 */ 27791 action: 'action',
30428var ChangeEventPlugin = { 27792 allowfullscreen: 'allowFullScreen',
30429 eventTypes: eventTypes$1, 27793 alt: 'alt',
27794 as: 'as',
27795 async: 'async',
27796 autocapitalize: 'autoCapitalize',
27797 autocomplete: 'autoComplete',
27798 autocorrect: 'autoCorrect',
27799 autofocus: 'autoFocus',
27800 autoplay: 'autoPlay',
27801 autosave: 'autoSave',
27802 capture: 'capture',
27803 cellpadding: 'cellPadding',
27804 cellspacing: 'cellSpacing',
27805 challenge: 'challenge',
27806 charset: 'charSet',
27807 checked: 'checked',
27808 children: 'children',
27809 cite: 'cite',
27810 'class': 'className',
27811 classid: 'classID',
27812 classname: 'className',
27813 cols: 'cols',
27814 colspan: 'colSpan',
27815 content: 'content',
27816 contenteditable: 'contentEditable',
27817 contextmenu: 'contextMenu',
27818 controls: 'controls',
27819 controlslist: 'controlsList',
27820 coords: 'coords',
27821 crossorigin: 'crossOrigin',
27822 dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
27823 data: 'data',
27824 datetime: 'dateTime',
27825 'default': 'default',
27826 defaultchecked: 'defaultChecked',
27827 defaultvalue: 'defaultValue',
27828 defer: 'defer',
27829 dir: 'dir',
27830 disabled: 'disabled',
27831 download: 'download',
27832 draggable: 'draggable',
27833 enctype: 'encType',
27834 'for': 'htmlFor',
27835 form: 'form',
27836 formmethod: 'formMethod',
27837 formaction: 'formAction',
27838 formenctype: 'formEncType',
27839 formnovalidate: 'formNoValidate',
27840 formtarget: 'formTarget',
27841 frameborder: 'frameBorder',
27842 headers: 'headers',
27843 height: 'height',
27844 hidden: 'hidden',
27845 high: 'high',
27846 href: 'href',
27847 hreflang: 'hrefLang',
27848 htmlfor: 'htmlFor',
27849 httpequiv: 'httpEquiv',
27850 'http-equiv': 'httpEquiv',
27851 icon: 'icon',
27852 id: 'id',
27853 innerhtml: 'innerHTML',
27854 inputmode: 'inputMode',
27855 integrity: 'integrity',
27856 is: 'is',
27857 itemid: 'itemID',
27858 itemprop: 'itemProp',
27859 itemref: 'itemRef',
27860 itemscope: 'itemScope',
27861 itemtype: 'itemType',
27862 keyparams: 'keyParams',
27863 keytype: 'keyType',
27864 kind: 'kind',
27865 label: 'label',
27866 lang: 'lang',
27867 list: 'list',
27868 loop: 'loop',
27869 low: 'low',
27870 manifest: 'manifest',
27871 marginwidth: 'marginWidth',
27872 marginheight: 'marginHeight',
27873 max: 'max',
27874 maxlength: 'maxLength',
27875 media: 'media',
27876 mediagroup: 'mediaGroup',
27877 method: 'method',
27878 min: 'min',
27879 minlength: 'minLength',
27880 multiple: 'multiple',
27881 muted: 'muted',
27882 name: 'name',
27883 nonce: 'nonce',
27884 novalidate: 'noValidate',
27885 open: 'open',
27886 optimum: 'optimum',
27887 pattern: 'pattern',
27888 placeholder: 'placeholder',
27889 playsinline: 'playsInline',
27890 poster: 'poster',
27891 preload: 'preload',
27892 profile: 'profile',
27893 radiogroup: 'radioGroup',
27894 readonly: 'readOnly',
27895 referrerpolicy: 'referrerPolicy',
27896 rel: 'rel',
27897 required: 'required',
27898 reversed: 'reversed',
27899 role: 'role',
27900 rows: 'rows',
27901 rowspan: 'rowSpan',
27902 sandbox: 'sandbox',
27903 scope: 'scope',
27904 scoped: 'scoped',
27905 scrolling: 'scrolling',
27906 seamless: 'seamless',
27907 selected: 'selected',
27908 shape: 'shape',
27909 size: 'size',
27910 sizes: 'sizes',
27911 span: 'span',
27912 spellcheck: 'spellCheck',
27913 src: 'src',
27914 srcdoc: 'srcDoc',
27915 srclang: 'srcLang',
27916 srcset: 'srcSet',
27917 start: 'start',
27918 step: 'step',
27919 style: 'style',
27920 summary: 'summary',
27921 tabindex: 'tabIndex',
27922 target: 'target',
27923 title: 'title',
27924 type: 'type',
27925 usemap: 'useMap',
27926 value: 'value',
27927 width: 'width',
27928 wmode: 'wmode',
27929 wrap: 'wrap',
30430 27930
30431 _isInputEventSupported: isInputEventSupported, 27931 // SVG
27932 about: 'about',
27933 accentheight: 'accentHeight',
27934 'accent-height': 'accentHeight',
27935 accumulate: 'accumulate',
27936 additive: 'additive',
27937 alignmentbaseline: 'alignmentBaseline',
27938 'alignment-baseline': 'alignmentBaseline',
27939 allowreorder: 'allowReorder',
27940 alphabetic: 'alphabetic',
27941 amplitude: 'amplitude',
27942 arabicform: 'arabicForm',
27943 'arabic-form': 'arabicForm',
27944 ascent: 'ascent',
27945 attributename: 'attributeName',
27946 attributetype: 'attributeType',
27947 autoreverse: 'autoReverse',
27948 azimuth: 'azimuth',
27949 basefrequency: 'baseFrequency',
27950 baselineshift: 'baselineShift',
27951 'baseline-shift': 'baselineShift',
27952 baseprofile: 'baseProfile',
27953 bbox: 'bbox',
27954 begin: 'begin',
27955 bias: 'bias',
27956 by: 'by',
27957 calcmode: 'calcMode',
27958 capheight: 'capHeight',
27959 'cap-height': 'capHeight',
27960 clip: 'clip',
27961 clippath: 'clipPath',
27962 'clip-path': 'clipPath',
27963 clippathunits: 'clipPathUnits',
27964 cliprule: 'clipRule',
27965 'clip-rule': 'clipRule',
27966 color: 'color',
27967 colorinterpolation: 'colorInterpolation',
27968 'color-interpolation': 'colorInterpolation',
27969 colorinterpolationfilters: 'colorInterpolationFilters',
27970 'color-interpolation-filters': 'colorInterpolationFilters',
27971 colorprofile: 'colorProfile',
27972 'color-profile': 'colorProfile',
27973 colorrendering: 'colorRendering',
27974 'color-rendering': 'colorRendering',
27975 contentscripttype: 'contentScriptType',
27976 contentstyletype: 'contentStyleType',
27977 cursor: 'cursor',
27978 cx: 'cx',
27979 cy: 'cy',
27980 d: 'd',
27981 datatype: 'datatype',
27982 decelerate: 'decelerate',
27983 descent: 'descent',
27984 diffuseconstant: 'diffuseConstant',
27985 direction: 'direction',
27986 display: 'display',
27987 divisor: 'divisor',
27988 dominantbaseline: 'dominantBaseline',
27989 'dominant-baseline': 'dominantBaseline',
27990 dur: 'dur',
27991 dx: 'dx',
27992 dy: 'dy',
27993 edgemode: 'edgeMode',
27994 elevation: 'elevation',
27995 enablebackground: 'enableBackground',
27996 'enable-background': 'enableBackground',
27997 end: 'end',
27998 exponent: 'exponent',
27999 externalresourcesrequired: 'externalResourcesRequired',
28000 fill: 'fill',
28001 fillopacity: 'fillOpacity',
28002 'fill-opacity': 'fillOpacity',
28003 fillrule: 'fillRule',
28004 'fill-rule': 'fillRule',
28005 filter: 'filter',
28006 filterres: 'filterRes',
28007 filterunits: 'filterUnits',
28008 floodopacity: 'floodOpacity',
28009 'flood-opacity': 'floodOpacity',
28010 floodcolor: 'floodColor',
28011 'flood-color': 'floodColor',
28012 focusable: 'focusable',
28013 fontfamily: 'fontFamily',
28014 'font-family': 'fontFamily',
28015 fontsize: 'fontSize',
28016 'font-size': 'fontSize',
28017 fontsizeadjust: 'fontSizeAdjust',
28018 'font-size-adjust': 'fontSizeAdjust',
28019 fontstretch: 'fontStretch',
28020 'font-stretch': 'fontStretch',
28021 fontstyle: 'fontStyle',
28022 'font-style': 'fontStyle',
28023 fontvariant: 'fontVariant',
28024 'font-variant': 'fontVariant',
28025 fontweight: 'fontWeight',
28026 'font-weight': 'fontWeight',
28027 format: 'format',
28028 from: 'from',
28029 fx: 'fx',
28030 fy: 'fy',
28031 g1: 'g1',
28032 g2: 'g2',
28033 glyphname: 'glyphName',
28034 'glyph-name': 'glyphName',
28035 glyphorientationhorizontal: 'glyphOrientationHorizontal',
28036 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
28037 glyphorientationvertical: 'glyphOrientationVertical',
28038 'glyph-orientation-vertical': 'glyphOrientationVertical',
28039 glyphref: 'glyphRef',
28040 gradienttransform: 'gradientTransform',
28041 gradientunits: 'gradientUnits',
28042 hanging: 'hanging',
28043 horizadvx: 'horizAdvX',
28044 'horiz-adv-x': 'horizAdvX',
28045 horizoriginx: 'horizOriginX',
28046 'horiz-origin-x': 'horizOriginX',
28047 ideographic: 'ideographic',
28048 imagerendering: 'imageRendering',
28049 'image-rendering': 'imageRendering',
28050 in2: 'in2',
28051 'in': 'in',
28052 inlist: 'inlist',
28053 intercept: 'intercept',
28054 k1: 'k1',
28055 k2: 'k2',
28056 k3: 'k3',
28057 k4: 'k4',
28058 k: 'k',
28059 kernelmatrix: 'kernelMatrix',
28060 kernelunitlength: 'kernelUnitLength',
28061 kerning: 'kerning',
28062 keypoints: 'keyPoints',
28063 keysplines: 'keySplines',
28064 keytimes: 'keyTimes',
28065 lengthadjust: 'lengthAdjust',
28066 letterspacing: 'letterSpacing',
28067 'letter-spacing': 'letterSpacing',
28068 lightingcolor: 'lightingColor',
28069 'lighting-color': 'lightingColor',
28070 limitingconeangle: 'limitingConeAngle',
28071 local: 'local',
28072 markerend: 'markerEnd',
28073 'marker-end': 'markerEnd',
28074 markerheight: 'markerHeight',
28075 markermid: 'markerMid',
28076 'marker-mid': 'markerMid',
28077 markerstart: 'markerStart',
28078 'marker-start': 'markerStart',
28079 markerunits: 'markerUnits',
28080 markerwidth: 'markerWidth',
28081 mask: 'mask',
28082 maskcontentunits: 'maskContentUnits',
28083 maskunits: 'maskUnits',
28084 mathematical: 'mathematical',
28085 mode: 'mode',
28086 numoctaves: 'numOctaves',
28087 offset: 'offset',
28088 opacity: 'opacity',
28089 operator: 'operator',
28090 order: 'order',
28091 orient: 'orient',
28092 orientation: 'orientation',
28093 origin: 'origin',
28094 overflow: 'overflow',
28095 overlineposition: 'overlinePosition',
28096 'overline-position': 'overlinePosition',
28097 overlinethickness: 'overlineThickness',
28098 'overline-thickness': 'overlineThickness',
28099 paintorder: 'paintOrder',
28100 'paint-order': 'paintOrder',
28101 panose1: 'panose1',
28102 'panose-1': 'panose1',
28103 pathlength: 'pathLength',
28104 patterncontentunits: 'patternContentUnits',
28105 patterntransform: 'patternTransform',
28106 patternunits: 'patternUnits',
28107 pointerevents: 'pointerEvents',
28108 'pointer-events': 'pointerEvents',
28109 points: 'points',
28110 pointsatx: 'pointsAtX',
28111 pointsaty: 'pointsAtY',
28112 pointsatz: 'pointsAtZ',
28113 prefix: 'prefix',
28114 preservealpha: 'preserveAlpha',
28115 preserveaspectratio: 'preserveAspectRatio',
28116 primitiveunits: 'primitiveUnits',
28117 property: 'property',
28118 r: 'r',
28119 radius: 'radius',
28120 refx: 'refX',
28121 refy: 'refY',
28122 renderingintent: 'renderingIntent',
28123 'rendering-intent': 'renderingIntent',
28124 repeatcount: 'repeatCount',
28125 repeatdur: 'repeatDur',
28126 requiredextensions: 'requiredExtensions',
28127 requiredfeatures: 'requiredFeatures',
28128 resource: 'resource',
28129 restart: 'restart',
28130 result: 'result',
28131 results: 'results',
28132 rotate: 'rotate',
28133 rx: 'rx',
28134 ry: 'ry',
28135 scale: 'scale',
28136 security: 'security',
28137 seed: 'seed',
28138 shaperendering: 'shapeRendering',
28139 'shape-rendering': 'shapeRendering',
28140 slope: 'slope',
28141 spacing: 'spacing',
28142 specularconstant: 'specularConstant',
28143 specularexponent: 'specularExponent',
28144 speed: 'speed',
28145 spreadmethod: 'spreadMethod',
28146 startoffset: 'startOffset',
28147 stddeviation: 'stdDeviation',
28148 stemh: 'stemh',
28149 stemv: 'stemv',
28150 stitchtiles: 'stitchTiles',
28151 stopcolor: 'stopColor',
28152 'stop-color': 'stopColor',
28153 stopopacity: 'stopOpacity',
28154 'stop-opacity': 'stopOpacity',
28155 strikethroughposition: 'strikethroughPosition',
28156 'strikethrough-position': 'strikethroughPosition',
28157 strikethroughthickness: 'strikethroughThickness',
28158 'strikethrough-thickness': 'strikethroughThickness',
28159 string: 'string',
28160 stroke: 'stroke',
28161 strokedasharray: 'strokeDasharray',
28162 'stroke-dasharray': 'strokeDasharray',
28163 strokedashoffset: 'strokeDashoffset',
28164 'stroke-dashoffset': 'strokeDashoffset',
28165 strokelinecap: 'strokeLinecap',
28166 'stroke-linecap': 'strokeLinecap',
28167 strokelinejoin: 'strokeLinejoin',
28168 'stroke-linejoin': 'strokeLinejoin',
28169 strokemiterlimit: 'strokeMiterlimit',
28170 'stroke-miterlimit': 'strokeMiterlimit',
28171 strokewidth: 'strokeWidth',
28172 'stroke-width': 'strokeWidth',
28173 strokeopacity: 'strokeOpacity',
28174 'stroke-opacity': 'strokeOpacity',
28175 suppresscontenteditablewarning: 'suppressContentEditableWarning',
28176 suppresshydrationwarning: 'suppressHydrationWarning',
28177 surfacescale: 'surfaceScale',
28178 systemlanguage: 'systemLanguage',
28179 tablevalues: 'tableValues',
28180 targetx: 'targetX',
28181 targety: 'targetY',
28182 textanchor: 'textAnchor',
28183 'text-anchor': 'textAnchor',
28184 textdecoration: 'textDecoration',
28185 'text-decoration': 'textDecoration',
28186 textlength: 'textLength',
28187 textrendering: 'textRendering',
28188 'text-rendering': 'textRendering',
28189 to: 'to',
28190 transform: 'transform',
28191 'typeof': 'typeof',
28192 u1: 'u1',
28193 u2: 'u2',
28194 underlineposition: 'underlinePosition',
28195 'underline-position': 'underlinePosition',
28196 underlinethickness: 'underlineThickness',
28197 'underline-thickness': 'underlineThickness',
28198 unicode: 'unicode',
28199 unicodebidi: 'unicodeBidi',
28200 'unicode-bidi': 'unicodeBidi',
28201 unicoderange: 'unicodeRange',
28202 'unicode-range': 'unicodeRange',
28203 unitsperem: 'unitsPerEm',
28204 'units-per-em': 'unitsPerEm',
28205 unselectable: 'unselectable',
28206 valphabetic: 'vAlphabetic',
28207 'v-alphabetic': 'vAlphabetic',
28208 values: 'values',
28209 vectoreffect: 'vectorEffect',
28210 'vector-effect': 'vectorEffect',
28211 version: 'version',
28212 vertadvy: 'vertAdvY',
28213 'vert-adv-y': 'vertAdvY',
28214 vertoriginx: 'vertOriginX',
28215 'vert-origin-x': 'vertOriginX',
28216 vertoriginy: 'vertOriginY',
28217 'vert-origin-y': 'vertOriginY',
28218 vhanging: 'vHanging',
28219 'v-hanging': 'vHanging',
28220 videographic: 'vIdeographic',
28221 'v-ideographic': 'vIdeographic',
28222 viewbox: 'viewBox',
28223 viewtarget: 'viewTarget',
28224 visibility: 'visibility',
28225 vmathematical: 'vMathematical',
28226 'v-mathematical': 'vMathematical',
28227 vocab: 'vocab',
28228 widths: 'widths',
28229 wordspacing: 'wordSpacing',
28230 'word-spacing': 'wordSpacing',
28231 writingmode: 'writingMode',
28232 'writing-mode': 'writingMode',
28233 x1: 'x1',
28234 x2: 'x2',
28235 x: 'x',
28236 xchannelselector: 'xChannelSelector',
28237 xheight: 'xHeight',
28238 'x-height': 'xHeight',
28239 xlinkactuate: 'xlinkActuate',
28240 'xlink:actuate': 'xlinkActuate',
28241 xlinkarcrole: 'xlinkArcrole',
28242 'xlink:arcrole': 'xlinkArcrole',
28243 xlinkhref: 'xlinkHref',
28244 'xlink:href': 'xlinkHref',
28245 xlinkrole: 'xlinkRole',
28246 'xlink:role': 'xlinkRole',
28247 xlinkshow: 'xlinkShow',
28248 'xlink:show': 'xlinkShow',
28249 xlinktitle: 'xlinkTitle',
28250 'xlink:title': 'xlinkTitle',
28251 xlinktype: 'xlinkType',
28252 'xlink:type': 'xlinkType',
28253 xmlbase: 'xmlBase',
28254 'xml:base': 'xmlBase',
28255 xmllang: 'xmlLang',
28256 'xml:lang': 'xmlLang',
28257 xmlns: 'xmlns',
28258 'xml:space': 'xmlSpace',
28259 xmlnsxlink: 'xmlnsXlink',
28260 'xmlns:xlink': 'xmlnsXlink',
28261 xmlspace: 'xmlSpace',
28262 y1: 'y1',
28263 y2: 'y2',
28264 y: 'y',
28265 ychannelselector: 'yChannelSelector',
28266 z: 'z',
28267 zoomandpan: 'zoomAndPan'
28268};
30432 28269
30433 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { 28270function getStackAddendum$2() {
30434 var targetNode = targetInst ? ReactDOMComponentTree_1.getNodeFromInstance(targetInst) : window; 28271 var stack = ReactDebugCurrentFrame.getStackAddendum();
28272 return stack != null ? stack : '';
28273}
30435 28274
30436 var getTargetInstFunc, handleEventFunc; 28275{
30437 if (shouldUseChangeEvent(targetNode)) { 28276 var warnedProperties$1 = {};
30438 getTargetInstFunc = getTargetInstForChangeEvent; 28277 var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
30439 } else if (isTextInputElement_1(targetNode)) { 28278 var EVENT_NAME_REGEX = /^on[A-Z]/;
30440 if (isInputEventSupported) { 28279 var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
30441 getTargetInstFunc = getTargetInstForInputOrChangeEvent; 28280 var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
30442 } else { 28281
30443 getTargetInstFunc = getTargetInstForInputEventPolyfill; 28282 var validateProperty$1 = function (tagName, name, value) {
30444 handleEventFunc = handleEventsForInputEventPolyfill; 28283 if (hasOwnProperty$1.call(warnedProperties$1, name) && warnedProperties$1[name]) {
30445 } 28284 return true;
30446 } else if (shouldUseClickEvent(targetNode)) {
30447 getTargetInstFunc = getTargetInstForClickEvent;
30448 } 28285 }
30449 28286
30450 if (getTargetInstFunc) { 28287 if (registrationNameModules.hasOwnProperty(name)) {
30451 var inst = getTargetInstFunc(topLevelType, targetInst); 28288 return true;
30452 if (inst) {
30453 var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
30454 return event;
30455 }
30456 } 28289 }
30457 28290
30458 if (handleEventFunc) { 28291 if (plugins.length === 0 && EVENT_NAME_REGEX.test(name)) {
30459 handleEventFunc(topLevelType, targetNode, targetInst); 28292 // If no event plugins have been injected, we might be in a server environment.
28293 // Don't check events in this case.
28294 return true;
30460 } 28295 }
30461 28296
30462 // When blurring, set the value attribute for number inputs 28297 var lowerCasedName = name.toLowerCase();
30463 if (topLevelType === 'topBlur') { 28298 var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
30464 handleControlledInputBlur(targetInst, targetNode); 28299
28300 if (registrationName != null) {
28301 warning(false, 'Invalid event handler property `%s`. Did you mean `%s`?%s', name, registrationName, getStackAddendum$2());
28302 warnedProperties$1[name] = true;
28303 return true;
30465 } 28304 }
30466 }
30467};
30468 28305
30469var ChangeEventPlugin_1 = ChangeEventPlugin; 28306 if (lowerCasedName.indexOf('on') === 0 && lowerCasedName.length > 2) {
28307 warning(false, 'Unknown event handler property `%s`. It will be ignored.%s', name, getStackAddendum$2());
28308 warnedProperties$1[name] = true;
28309 return true;
28310 }
30470 28311
30471/** 28312 // Let the ARIA attribute hook validate ARIA attributes
30472 * Copyright (c) 2013-present, Facebook, Inc. 28313 if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
30473 * 28314 return true;
30474 * This source code is licensed under the MIT license found in the 28315 }
30475 * LICENSE file in the root directory of this source tree.
30476 *
30477 * @providesModule DOMEventPluginOrder
30478 */
30479 28316
30480/** 28317 if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
30481 * Module that is injectable into `EventPluginHub`, that specifies a 28318 warning(false, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');
30482 * deterministic ordering of `EventPlugin`s. A convenient way to reason about 28319 warnedProperties$1[name] = true;
30483 * plugins, without having to package every one of them. This is better than 28320 return true;
30484 * having plugins be ordered in the same order that they are injected because 28321 }
30485 * that ordering would be influenced by the packaging order.
30486 * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
30487 * preventing default on events is convenient in `SimpleEventPlugin` handlers.
30488 */
30489 28322
30490var DOMEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin']; 28323 if (lowerCasedName === 'innerhtml') {
28324 warning(false, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
28325 warnedProperties$1[name] = true;
28326 return true;
28327 }
30491 28328
30492var DOMEventPluginOrder_1 = DOMEventPluginOrder; 28329 if (lowerCasedName === 'aria') {
28330 warning(false, 'The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
28331 warnedProperties$1[name] = true;
28332 return true;
28333 }
30493 28334
30494/** 28335 if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
30495 * @interface UIEvent 28336 warning(false, 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.%s', typeof value, getStackAddendum$2());
30496 * @see http://www.w3.org/TR/DOM-Level-3-Events/ 28337 warnedProperties$1[name] = true;
30497 */ 28338 return true;
30498var UIEventInterface = {
30499 view: function (event) {
30500 if (event.view) {
30501 return event.view;
30502 } 28339 }
30503 28340
30504 var target = getEventTarget_1(event); 28341 if (typeof value === 'number' && isNaN(value)) {
30505 if (target.window === target) { 28342 warning(false, 'Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.%s', name, getStackAddendum$2());
30506 // target is a window object 28343 warnedProperties$1[name] = true;
30507 return target; 28344 return true;
30508 } 28345 }
30509 28346
30510 var doc = target.ownerDocument; 28347 var isReserved = isReservedProp(name);
30511 // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. 28348
30512 if (doc) { 28349 // Known attributes should match the casing specified in the property config.
30513 return doc.defaultView || doc.parentWindow; 28350 if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
30514 } else { 28351 var standardName = possibleStandardNames[lowerCasedName];
30515 return window; 28352 if (standardName !== name) {
28353 warning(false, 'Invalid DOM property `%s`. Did you mean `%s`?%s', name, standardName, getStackAddendum$2());
28354 warnedProperties$1[name] = true;
28355 return true;
28356 }
28357 } else if (!isReserved && name !== lowerCasedName) {
28358 // Unknown attributes should have lowercase casing since that's how they
28359 // will be cased anyway with server rendering.
28360 warning(false, 'React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.%s', name, lowerCasedName, getStackAddendum$2());
28361 warnedProperties$1[name] = true;
28362 return true;
30516 } 28363 }
30517 },
30518 detail: function (event) {
30519 return event.detail || 0;
30520 }
30521};
30522 28364
30523/** 28365 if (typeof value === 'boolean' && !shouldAttributeAcceptBooleanValue(name)) {
30524 * @param {object} dispatchConfig Configuration used to dispatch this event. 28366 if (value) {
30525 * @param {string} dispatchMarker Marker identifying the event target. 28367 warning(false, 'Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.%s', value, name, name, value, name, getStackAddendum$2());
30526 * @param {object} nativeEvent Native browser event. 28368 } else {
30527 * @extends {SyntheticEvent} 28369 warning(false, 'Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.%s', value, name, name, value, name, name, name, getStackAddendum$2());
30528 */ 28370 }
30529function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { 28371 warnedProperties$1[name] = true;
30530 return SyntheticEvent_1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); 28372 return true;
30531} 28373 }
30532 28374
30533SyntheticEvent_1.augmentClass(SyntheticUIEvent, UIEventInterface); 28375 // Now that we've validated casing, do not validate
28376 // data types for reserved props
28377 if (isReserved) {
28378 return true;
28379 }
30534 28380
30535var SyntheticUIEvent_1 = SyntheticUIEvent; 28381 // Warn when a known attribute is a bad type
28382 if (!shouldSetAttribute(name, value)) {
28383 warnedProperties$1[name] = true;
28384 return false;
28385 }
30536 28386
30537/** 28387 return true;
30538 * Copyright (c) 2013-present, Facebook, Inc. 28388 };
30539 * 28389}
30540 * This source code is licensed under the MIT license found in the
30541 * LICENSE file in the root directory of this source tree.
30542 *
30543 * @providesModule getEventModifierState
30544 */
30545 28390
30546/** 28391var warnUnknownProperties = function (type, props) {
30547 * Translation from modifier key to the associated property in the event. 28392 var unknownProps = [];
30548 * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers 28393 for (var key in props) {
30549 */ 28394 var isValid = validateProperty$1(type, key, props[key]);
28395 if (!isValid) {
28396 unknownProps.push(key);
28397 }
28398 }
30550 28399
30551var modifierKeyToProp = { 28400 var unknownPropString = unknownProps.map(function (prop) {
30552 Alt: 'altKey', 28401 return '`' + prop + '`';
30553 Control: 'ctrlKey', 28402 }).join(', ');
30554 Meta: 'metaKey', 28403 if (unknownProps.length === 1) {
30555 Shift: 'shiftKey' 28404 warning(false, 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior%s', unknownPropString, type, getStackAddendum$2());
28405 } else if (unknownProps.length > 1) {
28406 warning(false, 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior%s', unknownPropString, type, getStackAddendum$2());
28407 }
30556}; 28408};
30557 28409
30558// IE8 does not implement getModifierState so we simply map it to the only 28410function validateProperties$2(type, props) {
30559// modifier keys exposed by the event itself, does not support Lock-keys. 28411 if (isCustomComponent(type, props)) {
30560// Currently, all major browsers except Chrome seems to support Lock-keys. 28412 return;
30561function modifierStateGetter(keyArg) {
30562 var syntheticEvent = this;
30563 var nativeEvent = syntheticEvent.nativeEvent;
30564 if (nativeEvent.getModifierState) {
30565 return nativeEvent.getModifierState(keyArg);
30566 } 28413 }
30567 var keyProp = modifierKeyToProp[keyArg]; 28414 warnUnknownProperties(type, props);
30568 return keyProp ? !!nativeEvent[keyProp] : false;
30569} 28415}
30570 28416
30571function getEventModifierState(nativeEvent) { 28417// TODO: direct imports like some-package/src/* are bad. Fix me.
30572 return modifierStateGetter; 28418var getCurrentFiberOwnerName$1 = ReactDebugCurrentFiber.getCurrentFiberOwnerName;
30573} 28419var getCurrentFiberStackAddendum$2 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
30574 28420
30575var getEventModifierState_1 = getEventModifierState; 28421var didWarnInvalidHydration = false;
28422var didWarnShadyDOM = false;
30576 28423
30577/** 28424var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';
30578 * @interface MouseEvent 28425var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';
30579 * @see http://www.w3.org/TR/DOM-Level-3-Events/ 28426var SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';
30580 */ 28427var AUTOFOCUS = 'autoFocus';
30581var MouseEventInterface = { 28428var CHILDREN = 'children';
30582 screenX: null, 28429var STYLE = 'style';
30583 screenY: null, 28430var HTML = '__html';
30584 clientX: null,
30585 clientY: null,
30586 pageX: null,
30587 pageY: null,
30588 ctrlKey: null,
30589 shiftKey: null,
30590 altKey: null,
30591 metaKey: null,
30592 getModifierState: getEventModifierState_1,
30593 button: null,
30594 buttons: null,
30595 relatedTarget: function (event) {
30596 return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
30597 }
30598};
30599 28431
30600/** 28432var HTML_NAMESPACE = Namespaces.html;
30601 * @param {object} dispatchConfig Configuration used to dispatch this event.
30602 * @param {string} dispatchMarker Marker identifying the event target.
30603 * @param {object} nativeEvent Native browser event.
30604 * @extends {SyntheticUIEvent}
30605 */
30606function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
30607 return SyntheticUIEvent_1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
30608}
30609 28433
30610SyntheticUIEvent_1.augmentClass(SyntheticMouseEvent, MouseEventInterface);
30611 28434
30612var SyntheticMouseEvent_1 = SyntheticMouseEvent; 28435var getStack = emptyFunction$1.thatReturns('');
30613 28436
30614var eventTypes$2 = { 28437{
30615 mouseEnter: { 28438 getStack = getCurrentFiberStackAddendum$2;
30616 registrationName: 'onMouseEnter',
30617 dependencies: ['topMouseOut', 'topMouseOver']
30618 },
30619 mouseLeave: {
30620 registrationName: 'onMouseLeave',
30621 dependencies: ['topMouseOut', 'topMouseOver']
30622 }
30623};
30624 28439
30625var EnterLeaveEventPlugin = { 28440 var warnedUnknownTags = {
30626 eventTypes: eventTypes$2, 28441 // Chrome is the only major browser not shipping <time>. But as of July
28442 // 2017 it intends to ship it due to widespread usage. We intentionally
28443 // *don't* warn for <time> even if it's unrecognized by Chrome because
28444 // it soon will be, and many apps have been using it anyway.
28445 time: true,
28446 // There are working polyfills for <dialog>. Let people use it.
28447 dialog: true
28448 };
30627 28449
30628 /** 28450 var validatePropertiesInDevelopment = function (type, props) {
30629 * For almost every interaction we care about, there will be both a top-level 28451 validateProperties(type, props);
30630 * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that 28452 validateProperties$1(type, props);
30631 * we do not extract duplicate events. However, moving the mouse into the 28453 validateProperties$2(type, props);
30632 * browser from outside will not fire a `mouseout` event. In this case, we use 28454 };
30633 * the `mouseover` top-level event. 28455
30634 */ 28456 // HTML parsing normalizes CR and CRLF to LF.
30635 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { 28457 // It also can turn \u0000 into \uFFFD inside attributes.
30636 if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { 28458 // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream
30637 return null; 28459 // If we have a mismatch, it might be caused by that.
28460 // We will still patch up in this case but not fire the warning.
28461 var NORMALIZE_NEWLINES_REGEX = /\r\n?/g;
28462 var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;
28463
28464 var normalizeMarkupForTextOrAttribute = function (markup) {
28465 var markupString = typeof markup === 'string' ? markup : '' + markup;
28466 return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');
28467 };
28468
28469 var warnForTextDifference = function (serverText, clientText) {
28470 if (didWarnInvalidHydration) {
28471 return;
30638 } 28472 }
30639 if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') { 28473 var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);
30640 // Must not be a mouse in or mouse out - ignoring. 28474 var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);
30641 return null; 28475 if (normalizedServerText === normalizedClientText) {
28476 return;
30642 } 28477 }
28478 didWarnInvalidHydration = true;
28479 warning(false, 'Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
28480 };
30643 28481
30644 var win; 28482 var warnForPropDifference = function (propName, serverValue, clientValue) {
30645 if (nativeEventTarget.window === nativeEventTarget) { 28483 if (didWarnInvalidHydration) {
30646 // `nativeEventTarget` is probably a window object. 28484 return;
30647 win = nativeEventTarget;
30648 } else {
30649 // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
30650 var doc = nativeEventTarget.ownerDocument;
30651 if (doc) {
30652 win = doc.defaultView || doc.parentWindow;
30653 } else {
30654 win = window;
30655 }
30656 } 28485 }
30657 28486 var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);
30658 var from; 28487 var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);
30659 var to; 28488 if (normalizedServerValue === normalizedClientValue) {
30660 if (topLevelType === 'topMouseOut') { 28489 return;
30661 from = targetInst;
30662 var related = nativeEvent.relatedTarget || nativeEvent.toElement;
30663 to = related ? ReactDOMComponentTree_1.getClosestInstanceFromNode(related) : null;
30664 } else {
30665 // Moving to a node from outside the window.
30666 from = null;
30667 to = targetInst;
30668 } 28490 }
28491 didWarnInvalidHydration = true;
28492 warning(false, 'Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
28493 };
30669 28494
30670 if (from === to) { 28495 var warnForExtraAttributes = function (attributeNames) {
30671 // Nothing pertains to our managed components. 28496 if (didWarnInvalidHydration) {
30672 return null; 28497 return;
30673 } 28498 }
28499 didWarnInvalidHydration = true;
28500 var names = [];
28501 attributeNames.forEach(function (name) {
28502 names.push(name);
28503 });
28504 warning(false, 'Extra attributes from the server: %s', names);
28505 };
30674 28506
30675 var fromNode = from == null ? win : ReactDOMComponentTree_1.getNodeFromInstance(from); 28507 var warnForInvalidEventListener = function (registrationName, listener) {
30676 var toNode = to == null ? win : ReactDOMComponentTree_1.getNodeFromInstance(to); 28508 if (listener === false) {
28509 warning(false, 'Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.%s', registrationName, registrationName, registrationName, getCurrentFiberStackAddendum$2());
28510 } else {
28511 warning(false, 'Expected `%s` listener to be a function, instead got a value of `%s` type.%s', registrationName, typeof listener, getCurrentFiberStackAddendum$2());
28512 }
28513 };
30677 28514
30678 var leave = SyntheticMouseEvent_1.getPooled(eventTypes$2.mouseLeave, from, nativeEvent, nativeEventTarget); 28515 // Parse the HTML and read it back to normalize the HTML string so that it
30679 leave.type = 'mouseleave'; 28516 // can be used for comparison.
30680 leave.target = fromNode; 28517 var normalizeHTML = function (parent, html) {
30681 leave.relatedTarget = toNode; 28518 // We could have created a separate document here to avoid
28519 // re-initializing custom elements if they exist. But this breaks
28520 // how <noscript> is being handled. So we use the same document.
28521 // See the discussion in https://github.com/facebook/react/pull/11157.
28522 var testElement = parent.namespaceURI === HTML_NAMESPACE ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);
28523 testElement.innerHTML = html;
28524 return testElement.innerHTML;
28525 };
28526}
30682 28527
30683 var enter = SyntheticMouseEvent_1.getPooled(eventTypes$2.mouseEnter, to, nativeEvent, nativeEventTarget); 28528function ensureListeningTo(rootContainerElement, registrationName) {
30684 enter.type = 'mouseenter'; 28529 var isDocumentOrFragment = rootContainerElement.nodeType === DOCUMENT_NODE || rootContainerElement.nodeType === DOCUMENT_FRAGMENT_NODE;
30685 enter.target = toNode; 28530 var doc = isDocumentOrFragment ? rootContainerElement : rootContainerElement.ownerDocument;
30686 enter.relatedTarget = fromNode; 28531 listenTo(registrationName, doc);
28532}
30687 28533
30688 EventPropagators_1.accumulateEnterLeaveDispatches(leave, enter, from, to); 28534function getOwnerDocumentFromRootContainer(rootContainerElement) {
28535 return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;
28536}
30689 28537
30690 return [leave, enter]; 28538// There are so many media events, it makes sense to just
30691 } 28539// maintain a list rather than create a `trapBubbledEvent` for each
28540var mediaEvents = {
28541 topAbort: 'abort',
28542 topCanPlay: 'canplay',
28543 topCanPlayThrough: 'canplaythrough',
28544 topDurationChange: 'durationchange',
28545 topEmptied: 'emptied',
28546 topEncrypted: 'encrypted',
28547 topEnded: 'ended',
28548 topError: 'error',
28549 topLoadedData: 'loadeddata',
28550 topLoadedMetadata: 'loadedmetadata',
28551 topLoadStart: 'loadstart',
28552 topPause: 'pause',
28553 topPlay: 'play',
28554 topPlaying: 'playing',
28555 topProgress: 'progress',
28556 topRateChange: 'ratechange',
28557 topSeeked: 'seeked',
28558 topSeeking: 'seeking',
28559 topStalled: 'stalled',
28560 topSuspend: 'suspend',
28561 topTimeUpdate: 'timeupdate',
28562 topVolumeChange: 'volumechange',
28563 topWaiting: 'waiting'
30692}; 28564};
30693 28565
30694var EnterLeaveEventPlugin_1 = EnterLeaveEventPlugin; 28566function trapClickOnNonInteractiveElement(node) {
28567 // Mobile Safari does not fire properly bubble click events on
28568 // non-interactive elements, which means delegated click listeners do not
28569 // fire. The workaround for this bug involves attaching an empty click
28570 // listener on the target node.
28571 // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
28572 // Just set it using the onclick property so that we don't have to manage any
28573 // bookkeeping for it. Not sure if we need to clear it when the listener is
28574 // removed.
28575 // TODO: Only do this for the relevant Safaris maybe?
28576 node.onclick = emptyFunction$1;
28577}
30695 28578
30696var DOCUMENT_NODE$2 = HTMLNodeType_1.DOCUMENT_NODE; 28579function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {
28580 for (var propKey in nextProps) {
28581 if (!nextProps.hasOwnProperty(propKey)) {
28582 continue;
28583 }
28584 var nextProp = nextProps[propKey];
28585 if (propKey === STYLE) {
28586 {
28587 if (nextProp) {
28588 // Freeze the next style object so that we can assume it won't be
28589 // mutated. We have already warned for this in the past.
28590 Object.freeze(nextProp);
28591 }
28592 }
28593 // Relies on `updateStylesByID` not mutating `styleUpdates`.
28594 setValueForStyles(domElement, nextProp, getStack);
28595 } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
28596 var nextHtml = nextProp ? nextProp[HTML] : undefined;
28597 if (nextHtml != null) {
28598 setInnerHTML(domElement, nextHtml);
28599 }
28600 } else if (propKey === CHILDREN) {
28601 if (typeof nextProp === 'string') {
28602 // Avoid setting initial textContent when the text is empty. In IE11 setting
28603 // textContent on a <textarea> will cause the placeholder to not
28604 // show within the <textarea> until it has been focused and blurred again.
28605 // https://github.com/facebook/react/issues/6731#issuecomment-254874553
28606 var canSetTextContent = tag !== 'textarea' || nextProp !== '';
28607 if (canSetTextContent) {
28608 setTextContent$1(domElement, nextProp);
28609 }
28610 } else if (typeof nextProp === 'number') {
28611 setTextContent$1(domElement, '' + nextProp);
28612 }
28613 } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {
28614 // Noop
28615 } else if (propKey === AUTOFOCUS) {
28616 // We polyfill it separately on the client during commit.
28617 // We blacklist it here rather than in the property list because we emit it in SSR.
28618 } else if (registrationNameModules.hasOwnProperty(propKey)) {
28619 if (nextProp != null) {
28620 if (true && typeof nextProp !== 'function') {
28621 warnForInvalidEventListener(propKey, nextProp);
28622 }
28623 ensureListeningTo(rootContainerElement, propKey);
28624 }
28625 } else if (isCustomComponentTag) {
28626 setValueForAttribute(domElement, propKey, nextProp);
28627 } else if (nextProp != null) {
28628 // If we're updating to null or undefined, we should remove the property
28629 // from the DOM node instead of inadvertently setting to a string. This
28630 // brings us in line with the same behavior we have on initial render.
28631 setValueForProperty(domElement, propKey, nextProp);
28632 }
28633 }
28634}
30697 28635
28636function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
28637 // TODO: Handle wasCustomComponentTag
28638 for (var i = 0; i < updatePayload.length; i += 2) {
28639 var propKey = updatePayload[i];
28640 var propValue = updatePayload[i + 1];
28641 if (propKey === STYLE) {
28642 setValueForStyles(domElement, propValue, getStack);
28643 } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
28644 setInnerHTML(domElement, propValue);
28645 } else if (propKey === CHILDREN) {
28646 setTextContent$1(domElement, propValue);
28647 } else if (isCustomComponentTag) {
28648 if (propValue != null) {
28649 setValueForAttribute(domElement, propKey, propValue);
28650 } else {
28651 deleteValueForAttribute(domElement, propKey);
28652 }
28653 } else if (propValue != null) {
28654 setValueForProperty(domElement, propKey, propValue);
28655 } else {
28656 // If we're updating to null or undefined, we should remove the property
28657 // from the DOM node instead of inadvertently setting to a string. This
28658 // brings us in line with the same behavior we have on initial render.
28659 deleteValueForProperty(domElement, propKey);
28660 }
28661 }
28662}
30698 28663
28664function createElement$1(type, props, rootContainerElement, parentNamespace) {
28665 // We create tags in the namespace of their parent container, except HTML
28666 var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
28667 var domElement;
28668 var namespaceURI = parentNamespace;
28669 if (namespaceURI === HTML_NAMESPACE) {
28670 namespaceURI = getIntrinsicNamespace(type);
28671 }
28672 if (namespaceURI === HTML_NAMESPACE) {
28673 {
28674 var isCustomComponentTag = isCustomComponent(type, props);
28675 // Should this check be gated by parent namespace? Not sure we want to
28676 // allow <SVG> or <mATH>.
28677 warning(isCustomComponentTag || type === type.toLowerCase(), '<%s /> is using uppercase HTML. Always use lowercase HTML tags ' + 'in React.', type);
28678 }
28679
28680 if (type === 'script') {
28681 // Create the script via .innerHTML so its "parser-inserted" flag is
28682 // set to true and it does not execute
28683 var div = ownerDocument.createElement('div');
28684 div.innerHTML = '<script><' + '/script>'; // eslint-disable-line
28685 // This is guaranteed to yield a script element.
28686 var firstChild = div.firstChild;
28687 domElement = div.removeChild(firstChild);
28688 } else if (typeof props.is === 'string') {
28689 // $FlowIssue `createElement` should be updated for Web Components
28690 domElement = ownerDocument.createElement(type, { is: props.is });
28691 } else {
28692 // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
28693 // See discussion in https://github.com/facebook/react/pull/6896
28694 // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
28695 domElement = ownerDocument.createElement(type);
28696 }
28697 } else {
28698 domElement = ownerDocument.createElementNS(namespaceURI, type);
28699 }
30699 28700
28701 {
28702 if (namespaceURI === HTML_NAMESPACE) {
28703 if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) {
28704 warnedUnknownTags[type] = true;
28705 warning(false, 'The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);
28706 }
28707 }
28708 }
30700 28709
28710 return domElement;
28711}
30701 28712
30702var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11; 28713function createTextNode$1(text, rootContainerElement) {
28714 return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);
28715}
30703 28716
30704var eventTypes$3 = { 28717function setInitialProperties$1(domElement, tag, rawProps, rootContainerElement) {
30705 select: { 28718 var isCustomComponentTag = isCustomComponent(tag, rawProps);
30706 phasedRegistrationNames: { 28719 {
30707 bubbled: 'onSelect', 28720 validatePropertiesInDevelopment(tag, rawProps);
30708 captured: 'onSelectCapture' 28721 if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) {
30709 }, 28722 warning(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerName$1() || 'A component');
30710 dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange'] 28723 didWarnShadyDOM = true;
28724 }
30711 } 28725 }
30712};
30713 28726
30714var activeElement$1 = null; 28727 // TODO: Make sure that we check isMounted before firing any of these events.
30715var activeElementInst$1 = null; 28728 var props;
30716var lastSelection = null; 28729 switch (tag) {
30717var mouseDown = false; 28730 case 'iframe':
28731 case 'object':
28732 trapBubbledEvent('topLoad', 'load', domElement);
28733 props = rawProps;
28734 break;
28735 case 'video':
28736 case 'audio':
28737 // Create listener for each media event
28738 for (var event in mediaEvents) {
28739 if (mediaEvents.hasOwnProperty(event)) {
28740 trapBubbledEvent(event, mediaEvents[event], domElement);
28741 }
28742 }
28743 props = rawProps;
28744 break;
28745 case 'source':
28746 trapBubbledEvent('topError', 'error', domElement);
28747 props = rawProps;
28748 break;
28749 case 'img':
28750 case 'image':
28751 trapBubbledEvent('topError', 'error', domElement);
28752 trapBubbledEvent('topLoad', 'load', domElement);
28753 props = rawProps;
28754 break;
28755 case 'form':
28756 trapBubbledEvent('topReset', 'reset', domElement);
28757 trapBubbledEvent('topSubmit', 'submit', domElement);
28758 props = rawProps;
28759 break;
28760 case 'details':
28761 trapBubbledEvent('topToggle', 'toggle', domElement);
28762 props = rawProps;
28763 break;
28764 case 'input':
28765 initWrapperState(domElement, rawProps);
28766 props = getHostProps(domElement, rawProps);
28767 trapBubbledEvent('topInvalid', 'invalid', domElement);
28768 // For controlled components we always need to ensure we're listening
28769 // to onChange. Even if there is no listener.
28770 ensureListeningTo(rootContainerElement, 'onChange');
28771 break;
28772 case 'option':
28773 validateProps(domElement, rawProps);
28774 props = getHostProps$1(domElement, rawProps);
28775 break;
28776 case 'select':
28777 initWrapperState$1(domElement, rawProps);
28778 props = getHostProps$2(domElement, rawProps);
28779 trapBubbledEvent('topInvalid', 'invalid', domElement);
28780 // For controlled components we always need to ensure we're listening
28781 // to onChange. Even if there is no listener.
28782 ensureListeningTo(rootContainerElement, 'onChange');
28783 break;
28784 case 'textarea':
28785 initWrapperState$2(domElement, rawProps);
28786 props = getHostProps$3(domElement, rawProps);
28787 trapBubbledEvent('topInvalid', 'invalid', domElement);
28788 // For controlled components we always need to ensure we're listening
28789 // to onChange. Even if there is no listener.
28790 ensureListeningTo(rootContainerElement, 'onChange');
28791 break;
28792 default:
28793 props = rawProps;
28794 }
30718 28795
30719// Track whether all listeners exists for this plugin. If none exist, we do 28796 assertValidProps(tag, props, getStack);
30720// not extract events. See #3639.
30721var isListeningToAllDependencies = ReactBrowserEventEmitter_1.isListeningToAllDependencies;
30722 28797
30723/** 28798 setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);
30724 * Get an object which is a unique representation of the current selection. 28799
30725 * 28800 switch (tag) {
30726 * The return value will not be consistent across nodes or browsers, but 28801 case 'input':
30727 * two identical selections on the same node will return identical objects. 28802 // TODO: Make sure we check if this is still unmounted or do any clean
30728 * 28803 // up necessary since we never stop tracking anymore.
30729 * @param {DOMElement} node 28804 track(domElement);
30730 * @return {object} 28805 postMountWrapper(domElement, rawProps);
30731 */ 28806 break;
30732function getSelection(node) { 28807 case 'textarea':
30733 if ('selectionStart' in node && ReactInputSelection_1.hasSelectionCapabilities(node)) { 28808 // TODO: Make sure we check if this is still unmounted or do any clean
30734 return { 28809 // up necessary since we never stop tracking anymore.
30735 start: node.selectionStart, 28810 track(domElement);
30736 end: node.selectionEnd 28811 postMountWrapper$3(domElement, rawProps);
30737 }; 28812 break;
30738 } else if (window.getSelection) { 28813 case 'option':
30739 var selection = window.getSelection(); 28814 postMountWrapper$1(domElement, rawProps);
30740 return { 28815 break;
30741 anchorNode: selection.anchorNode, 28816 case 'select':
30742 anchorOffset: selection.anchorOffset, 28817 postMountWrapper$2(domElement, rawProps);
30743 focusNode: selection.focusNode, 28818 break;
30744 focusOffset: selection.focusOffset 28819 default:
30745 }; 28820 if (typeof props.onClick === 'function') {
28821 // TODO: This cast may not be sound for SVG, MathML or custom elements.
28822 trapClickOnNonInteractiveElement(domElement);
28823 }
28824 break;
30746 } 28825 }
30747} 28826}
30748 28827
30749/** 28828// Calculate the diff between the two objects.
30750 * Poll selection to see whether it's changed. 28829function diffProperties$1(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
30751 * 28830 {
30752 * @param {object} nativeEvent 28831 validatePropertiesInDevelopment(tag, nextRawProps);
30753 * @return {?SyntheticEvent}
30754 */
30755function constructSelectEvent(nativeEvent, nativeEventTarget) {
30756 // Ensure we have the right element, and that the user is not dragging a
30757 // selection (this matches native `select` event behavior). In HTML5, select
30758 // fires only on input and textarea thus if there's no focused element we
30759 // won't dispatch.
30760 if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement()) {
30761 return null;
30762 } 28832 }
30763 28833
30764 // Only fire when selection has actually changed. 28834 var updatePayload = null;
30765 var currentSelection = getSelection(activeElement$1);
30766 if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
30767 lastSelection = currentSelection;
30768
30769 var syntheticEvent = SyntheticEvent_1.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);
30770
30771 syntheticEvent.type = 'select';
30772 syntheticEvent.target = activeElement$1;
30773 28835
30774 EventPropagators_1.accumulateTwoPhaseDispatches(syntheticEvent); 28836 var lastProps;
30775 28837 var nextProps;
30776 return syntheticEvent; 28838 switch (tag) {
28839 case 'input':
28840 lastProps = getHostProps(domElement, lastRawProps);
28841 nextProps = getHostProps(domElement, nextRawProps);
28842 updatePayload = [];
28843 break;
28844 case 'option':
28845 lastProps = getHostProps$1(domElement, lastRawProps);
28846 nextProps = getHostProps$1(domElement, nextRawProps);
28847 updatePayload = [];
28848 break;
28849 case 'select':
28850 lastProps = getHostProps$2(domElement, lastRawProps);
28851 nextProps = getHostProps$2(domElement, nextRawProps);
28852 updatePayload = [];
28853 break;
28854 case 'textarea':
28855 lastProps = getHostProps$3(domElement, lastRawProps);
28856 nextProps = getHostProps$3(domElement, nextRawProps);
28857 updatePayload = [];
28858 break;
28859 default:
28860 lastProps = lastRawProps;
28861 nextProps = nextRawProps;
28862 if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {
28863 // TODO: This cast may not be sound for SVG, MathML or custom elements.
28864 trapClickOnNonInteractiveElement(domElement);
28865 }
28866 break;
30777 } 28867 }
30778 28868
30779 return null; 28869 assertValidProps(tag, nextProps, getStack);
30780}
30781
30782/**
30783 * This plugin creates an `onSelect` event that normalizes select events
30784 * across form elements.
30785 *
30786 * Supported elements are:
30787 * - input (see `isTextInputElement`)
30788 * - textarea
30789 * - contentEditable
30790 *
30791 * This differs from native browser implementations in the following ways:
30792 * - Fires on contentEditable fields as well as inputs.
30793 * - Fires for collapsed selection.
30794 * - Fires after user input.
30795 */
30796var SelectEventPlugin = {
30797 eventTypes: eventTypes$3,
30798 28870
30799 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { 28871 var propKey;
30800 var doc = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget.document : nativeEventTarget.nodeType === DOCUMENT_NODE$2 ? nativeEventTarget : nativeEventTarget.ownerDocument; 28872 var styleName;
30801 if (!doc || !isListeningToAllDependencies('onSelect', doc)) { 28873 var styleUpdates = null;
30802 return null; 28874 for (propKey in lastProps) {
28875 if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
28876 continue;
30803 } 28877 }
30804 28878 if (propKey === STYLE) {
30805 var targetNode = targetInst ? ReactDOMComponentTree_1.getNodeFromInstance(targetInst) : window; 28879 var lastStyle = lastProps[propKey];
30806 28880 for (styleName in lastStyle) {
30807 switch (topLevelType) { 28881 if (lastStyle.hasOwnProperty(styleName)) {
30808 // Track the input node that has focus. 28882 if (!styleUpdates) {
30809 case 'topFocus': 28883 styleUpdates = {};
30810 if (isTextInputElement_1(targetNode) || targetNode.contentEditable === 'true') { 28884 }
30811 activeElement$1 = targetNode; 28885 styleUpdates[styleName] = '';
30812 activeElementInst$1 = targetInst;
30813 lastSelection = null;
30814 } 28886 }
30815 break; 28887 }
30816 case 'topBlur': 28888 } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {
30817 activeElement$1 = null; 28889 // Noop. This is handled by the clear text mechanism.
30818 activeElementInst$1 = null; 28890 } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {
30819 lastSelection = null; 28891 // Noop
30820 break; 28892 } else if (propKey === AUTOFOCUS) {
30821 // Don't fire the event while the user is dragging. This matches the 28893 // Noop. It doesn't work on updates anyway.
30822 // semantics of the native select event. 28894 } else if (registrationNameModules.hasOwnProperty(propKey)) {
30823 case 'topMouseDown': 28895 // This is a special case. If any listener updates we need to ensure
30824 mouseDown = true; 28896 // that the "current" fiber pointer gets updated so we need a commit
30825 break; 28897 // to update this element.
30826 case 'topContextMenu': 28898 if (!updatePayload) {
30827 case 'topMouseUp': 28899 updatePayload = [];
30828 mouseDown = false; 28900 }
30829 return constructSelectEvent(nativeEvent, nativeEventTarget); 28901 } else {
30830 // Chrome and IE fire non-standard event when selection is changed (and 28902 // For all other deleted properties we add it to the queue. We use
30831 // sometimes when it hasn't). IE's event fires out of order with respect 28903 // the whitelist in the commit phase instead.
30832 // to key and input events on deletion, so we discard it. 28904 (updatePayload = updatePayload || []).push(propKey, null);
30833 // 28905 }
30834 // Firefox doesn't support selectionchange, so check selection status 28906 }
30835 // after each key entry. The selection changes after keydown and before 28907 for (propKey in nextProps) {
30836 // keyup, but we check on keydown as well in the case of holding down a 28908 var nextProp = nextProps[propKey];
30837 // key, when multiple keydown events are fired but only one keyup is. 28909 var lastProp = lastProps != null ? lastProps[propKey] : undefined;
30838 // This is also our approach for IE handling, for the reason above. 28910 if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
30839 case 'topSelectionChange': 28911 continue;
30840 if (skipSelectionChangeEvent) { 28912 }
30841 break; 28913 if (propKey === STYLE) {
28914 {
28915 if (nextProp) {
28916 // Freeze the next style object so that we can assume it won't be
28917 // mutated. We have already warned for this in the past.
28918 Object.freeze(nextProp);
30842 } 28919 }
30843 // falls through 28920 }
30844 case 'topKeyDown': 28921 if (lastProp) {
30845 case 'topKeyUp': 28922 // Unset styles on `lastProp` but not on `nextProp`.
30846 return constructSelectEvent(nativeEvent, nativeEventTarget); 28923 for (styleName in lastProp) {
28924 if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
28925 if (!styleUpdates) {
28926 styleUpdates = {};
28927 }
28928 styleUpdates[styleName] = '';
28929 }
28930 }
28931 // Update styles that changed since `lastProp`.
28932 for (styleName in nextProp) {
28933 if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
28934 if (!styleUpdates) {
28935 styleUpdates = {};
28936 }
28937 styleUpdates[styleName] = nextProp[styleName];
28938 }
28939 }
28940 } else {
28941 // Relies on `updateStylesByID` not mutating `styleUpdates`.
28942 if (!styleUpdates) {
28943 if (!updatePayload) {
28944 updatePayload = [];
28945 }
28946 updatePayload.push(propKey, styleUpdates);
28947 }
28948 styleUpdates = nextProp;
28949 }
28950 } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
28951 var nextHtml = nextProp ? nextProp[HTML] : undefined;
28952 var lastHtml = lastProp ? lastProp[HTML] : undefined;
28953 if (nextHtml != null) {
28954 if (lastHtml !== nextHtml) {
28955 (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);
28956 }
28957 } else {
28958 // TODO: It might be too late to clear this if we have children
28959 // inserted already.
28960 }
28961 } else if (propKey === CHILDREN) {
28962 if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {
28963 (updatePayload = updatePayload || []).push(propKey, '' + nextProp);
28964 }
28965 } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {
28966 // Noop
28967 } else if (registrationNameModules.hasOwnProperty(propKey)) {
28968 if (nextProp != null) {
28969 // We eagerly listen to this even though we haven't committed yet.
28970 if (true && typeof nextProp !== 'function') {
28971 warnForInvalidEventListener(propKey, nextProp);
28972 }
28973 ensureListeningTo(rootContainerElement, propKey);
28974 }
28975 if (!updatePayload && lastProp !== nextProp) {
28976 // This is a special case. If any listener updates we need to ensure
28977 // that the "current" props pointer gets updated so we need a commit
28978 // to update this element.
28979 updatePayload = [];
28980 }
28981 } else {
28982 // For any other property we always add it to the queue and then we
28983 // filter it out using the whitelist during the commit.
28984 (updatePayload = updatePayload || []).push(propKey, nextProp);
30847 } 28985 }
30848
30849 return null;
30850 } 28986 }
30851}; 28987 if (styleUpdates) {
30852 28988 (updatePayload = updatePayload || []).push(STYLE, styleUpdates);
30853var SelectEventPlugin_1 = SelectEventPlugin; 28989 }
30854 28990 return updatePayload;
30855/**
30856 * @interface Event
30857 * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
30858 * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
30859 */
30860var AnimationEventInterface = {
30861 animationName: null,
30862 elapsedTime: null,
30863 pseudoElement: null
30864};
30865
30866/**
30867 * @param {object} dispatchConfig Configuration used to dispatch this event.
30868 * @param {string} dispatchMarker Marker identifying the event target.
30869 * @param {object} nativeEvent Native browser event.
30870 * @extends {SyntheticEvent}
30871 */
30872function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
30873 return SyntheticEvent_1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
30874} 28991}
30875 28992
30876SyntheticEvent_1.augmentClass(SyntheticAnimationEvent, AnimationEventInterface); 28993// Apply the diff.
30877 28994function updateProperties$1(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
30878var SyntheticAnimationEvent_1 = SyntheticAnimationEvent; 28995 var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
28996 var isCustomComponentTag = isCustomComponent(tag, nextRawProps);
28997 // Apply the diff.
28998 updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag);
30879 28999
30880/** 29000 // TODO: Ensure that an update gets scheduled if any of the special props
30881 * @interface Event 29001 // changed.
30882 * @see http://www.w3.org/TR/clipboard-apis/ 29002 switch (tag) {
30883 */ 29003 case 'input':
30884var ClipboardEventInterface = { 29004 // Update the wrapper around inputs *after* updating props. This has to
30885 clipboardData: function (event) { 29005 // happen after `updateDOMProperties`. Otherwise HTML5 input validations
30886 return 'clipboardData' in event ? event.clipboardData : window.clipboardData; 29006 // raise warnings and prevent the new value from being assigned.
29007 updateWrapper(domElement, nextRawProps);
29008
29009 // We also check that we haven't missed a value update, such as a
29010 // Radio group shifting the checked value to another named radio input.
29011 updateValueIfChanged(domElement);
29012 break;
29013 case 'textarea':
29014 updateWrapper$1(domElement, nextRawProps);
29015 break;
29016 case 'select':
29017 // <select> value update needs to occur after <option> children
29018 // reconciliation
29019 postUpdateWrapper(domElement, nextRawProps);
29020 break;
30887 } 29021 }
30888};
30889
30890/**
30891 * @param {object} dispatchConfig Configuration used to dispatch this event.
30892 * @param {string} dispatchMarker Marker identifying the event target.
30893 * @param {object} nativeEvent Native browser event.
30894 * @extends {SyntheticUIEvent}
30895 */
30896function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
30897 return SyntheticEvent_1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
30898} 29022}
30899 29023
30900SyntheticEvent_1.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface); 29024function diffHydratedProperties$1(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
30901 29025 {
30902var SyntheticClipboardEvent_1 = SyntheticClipboardEvent; 29026 var suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING$1] === true;
30903 29027 var isCustomComponentTag = isCustomComponent(tag, rawProps);
30904/** 29028 validatePropertiesInDevelopment(tag, rawProps);
30905 * @interface FocusEvent 29029 if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) {
30906 * @see http://www.w3.org/TR/DOM-Level-3-Events/ 29030 warning(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerName$1() || 'A component');
30907 */ 29031 didWarnShadyDOM = true;
30908var FocusEventInterface = { 29032 }
30909 relatedTarget: null 29033 }
30910};
30911
30912/**
30913 * @param {object} dispatchConfig Configuration used to dispatch this event.
30914 * @param {string} dispatchMarker Marker identifying the event target.
30915 * @param {object} nativeEvent Native browser event.
30916 * @extends {SyntheticUIEvent}
30917 */
30918function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
30919 return SyntheticUIEvent_1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
30920}
30921 29034
30922SyntheticUIEvent_1.augmentClass(SyntheticFocusEvent, FocusEventInterface); 29035 // TODO: Make sure that we check isMounted before firing any of these events.
29036 switch (tag) {
29037 case 'iframe':
29038 case 'object':
29039 trapBubbledEvent('topLoad', 'load', domElement);
29040 break;
29041 case 'video':
29042 case 'audio':
29043 // Create listener for each media event
29044 for (var event in mediaEvents) {
29045 if (mediaEvents.hasOwnProperty(event)) {
29046 trapBubbledEvent(event, mediaEvents[event], domElement);
29047 }
29048 }
29049 break;
29050 case 'source':
29051 trapBubbledEvent('topError', 'error', domElement);
29052 break;
29053 case 'img':
29054 case 'image':
29055 trapBubbledEvent('topError', 'error', domElement);
29056 trapBubbledEvent('topLoad', 'load', domElement);
29057 break;
29058 case 'form':
29059 trapBubbledEvent('topReset', 'reset', domElement);
29060 trapBubbledEvent('topSubmit', 'submit', domElement);
29061 break;
29062 case 'details':
29063 trapBubbledEvent('topToggle', 'toggle', domElement);
29064 break;
29065 case 'input':
29066 initWrapperState(domElement, rawProps);
29067 trapBubbledEvent('topInvalid', 'invalid', domElement);
29068 // For controlled components we always need to ensure we're listening
29069 // to onChange. Even if there is no listener.
29070 ensureListeningTo(rootContainerElement, 'onChange');
29071 break;
29072 case 'option':
29073 validateProps(domElement, rawProps);
29074 break;
29075 case 'select':
29076 initWrapperState$1(domElement, rawProps);
29077 trapBubbledEvent('topInvalid', 'invalid', domElement);
29078 // For controlled components we always need to ensure we're listening
29079 // to onChange. Even if there is no listener.
29080 ensureListeningTo(rootContainerElement, 'onChange');
29081 break;
29082 case 'textarea':
29083 initWrapperState$2(domElement, rawProps);
29084 trapBubbledEvent('topInvalid', 'invalid', domElement);
29085 // For controlled components we always need to ensure we're listening
29086 // to onChange. Even if there is no listener.
29087 ensureListeningTo(rootContainerElement, 'onChange');
29088 break;
29089 }
30923 29090
30924var SyntheticFocusEvent_1 = SyntheticFocusEvent; 29091 assertValidProps(tag, rawProps, getStack);
30925 29092
30926/** 29093 {
30927 * Copyright (c) 2013-present, Facebook, Inc. 29094 var extraAttributeNames = new Set();
30928 * 29095 var attributes = domElement.attributes;
30929 * This source code is licensed under the MIT license found in the 29096 for (var i = 0; i < attributes.length; i++) {
30930 * LICENSE file in the root directory of this source tree. 29097 var name = attributes[i].name.toLowerCase();
30931 * 29098 switch (name) {
30932 * @providesModule getEventCharCode 29099 // Built-in SSR attribute is whitelisted
30933 */ 29100 case 'data-reactroot':
29101 break;
29102 // Controlled attributes are not validated
29103 // TODO: Only ignore them on controlled tags.
29104 case 'value':
29105 break;
29106 case 'checked':
29107 break;
29108 case 'selected':
29109 break;
29110 default:
29111 // Intentionally use the original name.
29112 // See discussion in https://github.com/facebook/react/pull/10676.
29113 extraAttributeNames.add(attributes[i].name);
29114 }
29115 }
29116 }
30934 29117
30935/** 29118 var updatePayload = null;
30936 * `charCode` represents the actual "character code" and is safe to use with 29119 for (var propKey in rawProps) {
30937 * `String.fromCharCode`. As such, only keys that correspond to printable 29120 if (!rawProps.hasOwnProperty(propKey)) {
30938 * characters produce a valid `charCode`, the only exception to this is Enter. 29121 continue;
30939 * The Tab-key is considered non-printable and does not have a `charCode`, 29122 }
30940 * presumably because it does not produce a tab-character in browsers. 29123 var nextProp = rawProps[propKey];
30941 * 29124 if (propKey === CHILDREN) {
30942 * @param {object} nativeEvent Native browser event. 29125 // For text content children we compare against textContent. This
30943 * @return {number} Normalized `charCode` property. 29126 // might match additional HTML that is hidden when we read it using
30944 */ 29127 // textContent. E.g. "foo" will match "f<span>oo</span>" but that still
29128 // satisfies our requirement. Our requirement is not to produce perfect
29129 // HTML and attributes. Ideally we should preserve structure but it's
29130 // ok not to if the visible content is still enough to indicate what
29131 // even listeners these nodes might be wired up to.
29132 // TODO: Warn if there is more than a single textNode as a child.
29133 // TODO: Should we use domElement.firstChild.nodeValue to compare?
29134 if (typeof nextProp === 'string') {
29135 if (domElement.textContent !== nextProp) {
29136 if (true && !suppressHydrationWarning) {
29137 warnForTextDifference(domElement.textContent, nextProp);
29138 }
29139 updatePayload = [CHILDREN, nextProp];
29140 }
29141 } else if (typeof nextProp === 'number') {
29142 if (domElement.textContent !== '' + nextProp) {
29143 if (true && !suppressHydrationWarning) {
29144 warnForTextDifference(domElement.textContent, nextProp);
29145 }
29146 updatePayload = [CHILDREN, '' + nextProp];
29147 }
29148 }
29149 } else if (registrationNameModules.hasOwnProperty(propKey)) {
29150 if (nextProp != null) {
29151 if (true && typeof nextProp !== 'function') {
29152 warnForInvalidEventListener(propKey, nextProp);
29153 }
29154 ensureListeningTo(rootContainerElement, propKey);
29155 }
29156 } else {
29157 // Validate that the properties correspond to their expected values.
29158 var serverValue;
29159 var propertyInfo;
29160 if (suppressHydrationWarning) {
29161 // Don't bother comparing. We're ignoring all these warnings.
29162 } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1 ||
29163 // Controlled attributes are not validated
29164 // TODO: Only ignore them on controlled tags.
29165 propKey === 'value' || propKey === 'checked' || propKey === 'selected') {
29166 // Noop
29167 } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
29168 var rawHtml = nextProp ? nextProp[HTML] || '' : '';
29169 var serverHTML = domElement.innerHTML;
29170 var expectedHTML = normalizeHTML(domElement, rawHtml);
29171 if (expectedHTML !== serverHTML) {
29172 warnForPropDifference(propKey, serverHTML, expectedHTML);
29173 }
29174 } else if (propKey === STYLE) {
29175 // $FlowFixMe - Should be inferred as not undefined.
29176 extraAttributeNames['delete'](propKey);
29177 var expectedStyle = createDangerousStringForStyles(nextProp);
29178 serverValue = domElement.getAttribute('style');
29179 if (expectedStyle !== serverValue) {
29180 warnForPropDifference(propKey, serverValue, expectedStyle);
29181 }
29182 } else if (isCustomComponentTag) {
29183 // $FlowFixMe - Should be inferred as not undefined.
29184 extraAttributeNames['delete'](propKey.toLowerCase());
29185 serverValue = getValueForAttribute(domElement, propKey, nextProp);
30945 29186
30946function getEventCharCode(nativeEvent) { 29187 if (nextProp !== serverValue) {
30947 var charCode; 29188 warnForPropDifference(propKey, serverValue, nextProp);
30948 var keyCode = nativeEvent.keyCode; 29189 }
29190 } else if (shouldSetAttribute(propKey, nextProp)) {
29191 if (propertyInfo = getPropertyInfo(propKey)) {
29192 // $FlowFixMe - Should be inferred as not undefined.
29193 extraAttributeNames['delete'](propertyInfo.attributeName);
29194 serverValue = getValueForProperty(domElement, propKey, nextProp);
29195 } else {
29196 var ownNamespace = parentNamespace;
29197 if (ownNamespace === HTML_NAMESPACE) {
29198 ownNamespace = getIntrinsicNamespace(tag);
29199 }
29200 if (ownNamespace === HTML_NAMESPACE) {
29201 // $FlowFixMe - Should be inferred as not undefined.
29202 extraAttributeNames['delete'](propKey.toLowerCase());
29203 } else {
29204 // $FlowFixMe - Should be inferred as not undefined.
29205 extraAttributeNames['delete'](propKey);
29206 }
29207 serverValue = getValueForAttribute(domElement, propKey, nextProp);
29208 }
30949 29209
30950 if ('charCode' in nativeEvent) { 29210 if (nextProp !== serverValue) {
30951 charCode = nativeEvent.charCode; 29211 warnForPropDifference(propKey, serverValue, nextProp);
29212 }
29213 }
29214 }
29215 }
30952 29216
30953 // FF does not set `charCode` for the Enter-key, check against `keyCode`. 29217 {
30954 if (charCode === 0 && keyCode === 13) { 29218 // $FlowFixMe - Should be inferred as not undefined.
30955 charCode = 13; 29219 if (extraAttributeNames.size > 0 && !suppressHydrationWarning) {
29220 // $FlowFixMe - Should be inferred as not undefined.
29221 warnForExtraAttributes(extraAttributeNames);
30956 } 29222 }
30957 } else {
30958 // IE8 does not implement `charCode`, but `keyCode` has the correct value.
30959 charCode = keyCode;
30960 } 29223 }
30961 29224
30962 // Some non-printable keys are reported in `charCode`/`keyCode`, discard them. 29225 switch (tag) {
30963 // Must not discard the (non-)printable Enter-key. 29226 case 'input':
30964 if (charCode >= 32 || charCode === 13) { 29227 // TODO: Make sure we check if this is still unmounted or do any clean
30965 return charCode; 29228 // up necessary since we never stop tracking anymore.
29229 track(domElement);
29230 postMountWrapper(domElement, rawProps);
29231 break;
29232 case 'textarea':
29233 // TODO: Make sure we check if this is still unmounted or do any clean
29234 // up necessary since we never stop tracking anymore.
29235 track(domElement);
29236 postMountWrapper$3(domElement, rawProps);
29237 break;
29238 case 'select':
29239 case 'option':
29240 // For input and textarea we current always set the value property at
29241 // post mount to force it to diverge from attributes. However, for
29242 // option and select we don't quite do the same thing and select
29243 // is not resilient to the DOM state changing so we don't do that here.
29244 // TODO: Consider not doing this for input and textarea.
29245 break;
29246 default:
29247 if (typeof rawProps.onClick === 'function') {
29248 // TODO: This cast may not be sound for SVG, MathML or custom elements.
29249 trapClickOnNonInteractiveElement(domElement);
29250 }
29251 break;
30966 } 29252 }
30967 29253
30968 return 0; 29254 return updatePayload;
30969} 29255}
30970 29256
30971var getEventCharCode_1 = getEventCharCode; 29257function diffHydratedText$1(textNode, text) {
30972 29258 var isDifferent = textNode.nodeValue !== text;
30973/** 29259 return isDifferent;
30974 * Normalization of deprecated HTML5 `key` values 29260}
30975 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
30976 */
30977var normalizeKey = {
30978 Esc: 'Escape',
30979 Spacebar: ' ',
30980 Left: 'ArrowLeft',
30981 Up: 'ArrowUp',
30982 Right: 'ArrowRight',
30983 Down: 'ArrowDown',
30984 Del: 'Delete',
30985 Win: 'OS',
30986 Menu: 'ContextMenu',
30987 Apps: 'ContextMenu',
30988 Scroll: 'ScrollLock',
30989 MozPrintableKey: 'Unidentified'
30990};
30991
30992/**
30993 * Translation from legacy `keyCode` to HTML5 `key`
30994 * Only special keys supported, all others depend on keyboard layout or browser
30995 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
30996 */
30997var translateToKey = {
30998 8: 'Backspace',
30999 9: 'Tab',
31000 12: 'Clear',
31001 13: 'Enter',
31002 16: 'Shift',
31003 17: 'Control',
31004 18: 'Alt',
31005 19: 'Pause',
31006 20: 'CapsLock',
31007 27: 'Escape',
31008 32: ' ',
31009 33: 'PageUp',
31010 34: 'PageDown',
31011 35: 'End',
31012 36: 'Home',
31013 37: 'ArrowLeft',
31014 38: 'ArrowUp',
31015 39: 'ArrowRight',
31016 40: 'ArrowDown',
31017 45: 'Insert',
31018 46: 'Delete',
31019 112: 'F1',
31020 113: 'F2',
31021 114: 'F3',
31022 115: 'F4',
31023 116: 'F5',
31024 117: 'F6',
31025 118: 'F7',
31026 119: 'F8',
31027 120: 'F9',
31028 121: 'F10',
31029 122: 'F11',
31030 123: 'F12',
31031 144: 'NumLock',
31032 145: 'ScrollLock',
31033 224: 'Meta'
31034};
31035 29261
31036/** 29262function warnForUnmatchedText$1(textNode, text) {
31037 * @param {object} nativeEvent Native browser event. 29263 {
31038 * @return {string} Normalized `key` property. 29264 warnForTextDifference(textNode.nodeValue, text);
31039 */ 29265 }
31040function getEventKey(nativeEvent) { 29266}
31041 if (nativeEvent.key) {
31042 // Normalize inconsistent values reported by browsers due to
31043 // implementations of a working draft specification.
31044 29267
31045 // FireFox implements `key` but returns `MozPrintableKey` for all 29268function warnForDeletedHydratableElement$1(parentNode, child) {
31046 // printable characters (normalized to `Unidentified`), ignore it. 29269 {
31047 var key = normalizeKey[nativeEvent.key] || nativeEvent.key; 29270 if (didWarnInvalidHydration) {
31048 if (key !== 'Unidentified') { 29271 return;
31049 return key;
31050 } 29272 }
29273 didWarnInvalidHydration = true;
29274 warning(false, 'Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
31051 } 29275 }
29276}
31052 29277
31053 // Browser does not implement `key`, polyfill as much of it as we can. 29278function warnForDeletedHydratableText$1(parentNode, child) {
31054 if (nativeEvent.type === 'keypress') { 29279 {
31055 var charCode = getEventCharCode_1(nativeEvent); 29280 if (didWarnInvalidHydration) {
31056 29281 return;
31057 // The enter-key is technically both printable and non-printable and can 29282 }
31058 // thus be captured by `keypress`, no other non-printable key should. 29283 didWarnInvalidHydration = true;
31059 return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); 29284 warning(false, 'Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
31060 }
31061 if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
31062 // While user keyboard layout determines the actual meaning of each
31063 // `keyCode` value, almost all function keys have a universal value.
31064 return translateToKey[nativeEvent.keyCode] || 'Unidentified';
31065 } 29285 }
31066 return '';
31067} 29286}
31068 29287
31069var getEventKey_1 = getEventKey; 29288function warnForInsertedHydratedElement$1(parentNode, tag, props) {
31070 29289 {
31071/** 29290 if (didWarnInvalidHydration) {
31072 * @interface KeyboardEvent 29291 return;
31073 * @see http://www.w3.org/TR/DOM-Level-3-Events/
31074 */
31075var KeyboardEventInterface = {
31076 key: getEventKey_1,
31077 location: null,
31078 ctrlKey: null,
31079 shiftKey: null,
31080 altKey: null,
31081 metaKey: null,
31082 repeat: null,
31083 locale: null,
31084 getModifierState: getEventModifierState_1,
31085 // Legacy Interface
31086 charCode: function (event) {
31087 // `charCode` is the result of a KeyPress event and represents the value of
31088 // the actual printable character.
31089
31090 // KeyPress is deprecated, but its replacement is not yet final and not
31091 // implemented in any major browser. Only KeyPress has charCode.
31092 if (event.type === 'keypress') {
31093 return getEventCharCode_1(event);
31094 } 29292 }
31095 return 0; 29293 didWarnInvalidHydration = true;
31096 }, 29294 warning(false, 'Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
31097 keyCode: function (event) { 29295 }
31098 // `keyCode` is the result of a KeyDown/Up event and represents the value of 29296}
31099 // physical keyboard key.
31100 29297
31101 // The actual meaning of the value depends on the users' keyboard layout 29298function warnForInsertedHydratedText$1(parentNode, text) {
31102 // which cannot be detected. Assuming that it is a US keyboard layout 29299 {
31103 // provides a surprisingly accurate mapping for US and European users. 29300 if (text === '') {
31104 // Due to this, it is left to the user to implement at this time. 29301 // We expect to insert empty text nodes since they're not represented in
31105 if (event.type === 'keydown' || event.type === 'keyup') { 29302 // the HTML.
31106 return event.keyCode; 29303 // TODO: Remove this special case if we can just avoid inserting empty
31107 } 29304 // text nodes.
31108 return 0; 29305 return;
31109 },
31110 which: function (event) {
31111 // `which` is an alias for either `keyCode` or `charCode` depending on the
31112 // type of the event.
31113 if (event.type === 'keypress') {
31114 return getEventCharCode_1(event);
31115 } 29306 }
31116 if (event.type === 'keydown' || event.type === 'keyup') { 29307 if (didWarnInvalidHydration) {
31117 return event.keyCode; 29308 return;
31118 } 29309 }
31119 return 0; 29310 didWarnInvalidHydration = true;
29311 warning(false, 'Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
31120 } 29312 }
31121};
31122
31123/**
31124 * @param {object} dispatchConfig Configuration used to dispatch this event.
31125 * @param {string} dispatchMarker Marker identifying the event target.
31126 * @param {object} nativeEvent Native browser event.
31127 * @extends {SyntheticUIEvent}
31128 */
31129function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
31130 return SyntheticUIEvent_1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
31131} 29313}
31132 29314
31133SyntheticUIEvent_1.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface); 29315function restoreControlledState(domElement, tag, props) {
31134 29316 switch (tag) {
31135var SyntheticKeyboardEvent_1 = SyntheticKeyboardEvent; 29317 case 'input':
31136 29318 restoreControlledState$1(domElement, props);
31137/** 29319 return;
31138 * @interface DragEvent 29320 case 'textarea':
31139 * @see http://www.w3.org/TR/DOM-Level-3-Events/ 29321 restoreControlledState$3(domElement, props);
31140 */ 29322 return;
31141var DragEventInterface = { 29323 case 'select':
31142 dataTransfer: null 29324 restoreControlledState$2(domElement, props);
31143}; 29325 return;
31144 29326 }
31145/**
31146 * @param {object} dispatchConfig Configuration used to dispatch this event.
31147 * @param {string} dispatchMarker Marker identifying the event target.
31148 * @param {object} nativeEvent Native browser event.
31149 * @extends {SyntheticUIEvent}
31150 */
31151function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
31152 return SyntheticMouseEvent_1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
31153} 29327}
31154 29328
31155SyntheticMouseEvent_1.augmentClass(SyntheticDragEvent, DragEventInterface); 29329var ReactDOMFiberComponent = Object.freeze({
31156 29330 createElement: createElement$1,
31157var SyntheticDragEvent_1 = SyntheticDragEvent; 29331 createTextNode: createTextNode$1,
31158 29332 setInitialProperties: setInitialProperties$1,
31159/** 29333 diffProperties: diffProperties$1,
31160 * @interface TouchEvent 29334 updateProperties: updateProperties$1,
31161 * @see http://www.w3.org/TR/touch-events/ 29335 diffHydratedProperties: diffHydratedProperties$1,
31162 */ 29336 diffHydratedText: diffHydratedText$1,
31163var TouchEventInterface = { 29337 warnForUnmatchedText: warnForUnmatchedText$1,
31164 touches: null, 29338 warnForDeletedHydratableElement: warnForDeletedHydratableElement$1,
31165 targetTouches: null, 29339 warnForDeletedHydratableText: warnForDeletedHydratableText$1,
31166 changedTouches: null, 29340 warnForInsertedHydratedElement: warnForInsertedHydratedElement$1,
31167 altKey: null, 29341 warnForInsertedHydratedText: warnForInsertedHydratedText$1,
31168 metaKey: null, 29342 restoreControlledState: restoreControlledState
31169 ctrlKey: null, 29343});
31170 shiftKey: null,
31171 getModifierState: getEventModifierState_1
31172};
31173 29344
31174/** 29345// TODO: direct imports like some-package/src/* are bad. Fix me.
31175 * @param {object} dispatchConfig Configuration used to dispatch this event. 29346var getCurrentFiberStackAddendum$6 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
31176 * @param {string} dispatchMarker Marker identifying the event target.
31177 * @param {object} nativeEvent Native browser event.
31178 * @extends {SyntheticUIEvent}
31179 */
31180function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
31181 return SyntheticUIEvent_1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
31182}
31183 29347
31184SyntheticUIEvent_1.augmentClass(SyntheticTouchEvent, TouchEventInterface); 29348var validateDOMNesting = emptyFunction$1;
31185 29349
31186var SyntheticTouchEvent_1 = SyntheticTouchEvent; 29350{
29351 // This validation code was written based on the HTML5 parsing spec:
29352 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
29353 //
29354 // Note: this does not catch all invalid nesting, nor does it try to (as it's
29355 // not clear what practical benefit doing so provides); instead, we warn only
29356 // for cases where the parser will give a parse tree differing from what React
29357 // intended. For example, <b><div></div></b> is invalid but we don't warn
29358 // because it still parses correctly; we do warn for other cases like nested
29359 // <p> tags where the beginning of the second element implicitly closes the
29360 // first, causing a confusing mess.
31187 29361
31188/** 29362 // https://html.spec.whatwg.org/multipage/syntax.html#special
31189 * @interface Event 29363 var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp'];
31190 * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
31191 * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
31192 */
31193var TransitionEventInterface = {
31194 propertyName: null,
31195 elapsedTime: null,
31196 pseudoElement: null
31197};
31198 29364
31199/** 29365 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
31200 * @param {object} dispatchConfig Configuration used to dispatch this event. 29366 var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template',
31201 * @param {string} dispatchMarker Marker identifying the event target.
31202 * @param {object} nativeEvent Native browser event.
31203 * @extends {SyntheticEvent}
31204 */
31205function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
31206 return SyntheticEvent_1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
31207}
31208 29367
31209SyntheticEvent_1.augmentClass(SyntheticTransitionEvent, TransitionEventInterface); 29368 // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
29369 // TODO: Distinguish by namespace here -- for <title>, including it here
29370 // errs on the side of fewer warnings
29371 'foreignObject', 'desc', 'title'];
31210 29372
31211var SyntheticTransitionEvent_1 = SyntheticTransitionEvent; 29373 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
29374 var buttonScopeTags = inScopeTags.concat(['button']);
31212 29375
31213/** 29376 // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
31214 * @interface WheelEvent 29377 var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
31215 * @see http://www.w3.org/TR/DOM-Level-3-Events/
31216 */
31217var WheelEventInterface = {
31218 deltaX: function (event) {
31219 return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
31220 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
31221 },
31222 deltaY: function (event) {
31223 return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
31224 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
31225 'wheelDelta' in event ? -event.wheelDelta : 0;
31226 },
31227 deltaZ: null,
31228 29378
31229 // Browsers without "deltaMode" is reporting in raw wheel delta where one 29379 var emptyAncestorInfo = {
31230 // notch on the scroll is always +/- 120, roughly equivalent to pixels. 29380 current: null,
31231 // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
31232 // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
31233 deltaMode: null
31234};
31235 29381
31236/** 29382 formTag: null,
31237 * @param {object} dispatchConfig Configuration used to dispatch this event. 29383 aTagInScope: null,
31238 * @param {string} dispatchMarker Marker identifying the event target. 29384 buttonTagInScope: null,
31239 * @param {object} nativeEvent Native browser event. 29385 nobrTagInScope: null,
31240 * @extends {SyntheticMouseEvent} 29386 pTagInButtonScope: null,
31241 */
31242function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
31243 return SyntheticMouseEvent_1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
31244}
31245 29387
31246SyntheticMouseEvent_1.augmentClass(SyntheticWheelEvent, WheelEventInterface); 29388 listItemTagAutoclosing: null,
29389 dlItemTagAutoclosing: null
29390 };
31247 29391
31248var SyntheticWheelEvent_1 = SyntheticWheelEvent; 29392 var updatedAncestorInfo$1 = function (oldInfo, tag, instance) {
29393 var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
29394 var info = { tag: tag, instance: instance };
31249 29395
31250/** 29396 if (inScopeTags.indexOf(tag) !== -1) {
31251 * Turns 29397 ancestorInfo.aTagInScope = null;
31252 * ['abort', ...] 29398 ancestorInfo.buttonTagInScope = null;
31253 * into 29399 ancestorInfo.nobrTagInScope = null;
31254 * eventTypes = { 29400 }
31255 * 'abort': { 29401 if (buttonScopeTags.indexOf(tag) !== -1) {
31256 * phasedRegistrationNames: { 29402 ancestorInfo.pTagInButtonScope = null;
31257 * bubbled: 'onAbort', 29403 }
31258 * captured: 'onAbortCapture',
31259 * },
31260 * dependencies: ['topAbort'],
31261 * },
31262 * ...
31263 * };
31264 * topLevelEventsToDispatchConfig = {
31265 * 'topAbort': { sameConfig }
31266 * };
31267 */
31268var eventTypes$4 = {};
31269var topLevelEventsToDispatchConfig = {};
31270['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'cancel', 'canPlay', 'canPlayThrough', 'click', 'close', 'contextMenu', 'copy', 'cut', 'doubleClick', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'progress', 'rateChange', 'reset', 'scroll', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'toggle', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) {
31271 var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
31272 var onEvent = 'on' + capitalizedEvent;
31273 var topEvent = 'top' + capitalizedEvent;
31274 29404
31275 var type = { 29405 // See rules for 'li', 'dd', 'dt' start tags in
31276 phasedRegistrationNames: { 29406 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
31277 bubbled: onEvent, 29407 if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
31278 captured: onEvent + 'Capture' 29408 ancestorInfo.listItemTagAutoclosing = null;
31279 }, 29409 ancestorInfo.dlItemTagAutoclosing = null;
31280 dependencies: [topEvent] 29410 }
31281 };
31282 eventTypes$4[event] = type;
31283 topLevelEventsToDispatchConfig[topEvent] = type;
31284});
31285 29411
31286var SimpleEventPlugin = { 29412 ancestorInfo.current = info;
31287 eventTypes: eventTypes$4,
31288 29413
31289 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { 29414 if (tag === 'form') {
31290 var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; 29415 ancestorInfo.formTag = info;
31291 if (!dispatchConfig) {
31292 return null;
31293 } 29416 }
31294 var EventConstructor; 29417 if (tag === 'a') {
31295 switch (topLevelType) { 29418 ancestorInfo.aTagInScope = info;
31296 case 'topAbort': 29419 }
31297 case 'topCancel': 29420 if (tag === 'button') {
31298 case 'topCanPlay': 29421 ancestorInfo.buttonTagInScope = info;
31299 case 'topCanPlayThrough': 29422 }
31300 case 'topClose': 29423 if (tag === 'nobr') {
31301 case 'topDurationChange': 29424 ancestorInfo.nobrTagInScope = info;
31302 case 'topEmptied': 29425 }
31303 case 'topEncrypted': 29426 if (tag === 'p') {
31304 case 'topEnded': 29427 ancestorInfo.pTagInButtonScope = info;
31305 case 'topError': 29428 }
31306 case 'topInput': 29429 if (tag === 'li') {
31307 case 'topInvalid': 29430 ancestorInfo.listItemTagAutoclosing = info;
31308 case 'topLoad': 29431 }
31309 case 'topLoadedData': 29432 if (tag === 'dd' || tag === 'dt') {
31310 case 'topLoadedMetadata': 29433 ancestorInfo.dlItemTagAutoclosing = info;
31311 case 'topLoadStart':
31312 case 'topPause':
31313 case 'topPlay':
31314 case 'topPlaying':
31315 case 'topProgress':
31316 case 'topRateChange':
31317 case 'topReset':
31318 case 'topSeeked':
31319 case 'topSeeking':
31320 case 'topStalled':
31321 case 'topSubmit':
31322 case 'topSuspend':
31323 case 'topTimeUpdate':
31324 case 'topToggle':
31325 case 'topVolumeChange':
31326 case 'topWaiting':
31327 // HTML Events
31328 // @see http://www.w3.org/TR/html5/index.html#events-0
31329 EventConstructor = SyntheticEvent_1;
31330 break;
31331 case 'topKeyPress':
31332 // Firefox creates a keypress event for function keys too. This removes
31333 // the unwanted keypress events. Enter is however both printable and
31334 // non-printable. One would expect Tab to be as well (but it isn't).
31335 if (getEventCharCode_1(nativeEvent) === 0) {
31336 return null;
31337 }
31338 /* falls through */
31339 case 'topKeyDown':
31340 case 'topKeyUp':
31341 EventConstructor = SyntheticKeyboardEvent_1;
31342 break;
31343 case 'topBlur':
31344 case 'topFocus':
31345 EventConstructor = SyntheticFocusEvent_1;
31346 break;
31347 case 'topClick':
31348 // Firefox creates a click event on right mouse clicks. This removes the
31349 // unwanted click events.
31350 if (nativeEvent.button === 2) {
31351 return null;
31352 }
31353 /* falls through */
31354 case 'topDoubleClick':
31355 case 'topMouseDown':
31356 case 'topMouseMove':
31357 case 'topMouseUp':
31358 // TODO: Disabled elements should not respond to mouse events
31359 /* falls through */
31360 case 'topMouseOut':
31361 case 'topMouseOver':
31362 case 'topContextMenu':
31363 EventConstructor = SyntheticMouseEvent_1;
31364 break;
31365 case 'topDrag':
31366 case 'topDragEnd':
31367 case 'topDragEnter':
31368 case 'topDragExit':
31369 case 'topDragLeave':
31370 case 'topDragOver':
31371 case 'topDragStart':
31372 case 'topDrop':
31373 EventConstructor = SyntheticDragEvent_1;
31374 break;
31375 case 'topTouchCancel':
31376 case 'topTouchEnd':
31377 case 'topTouchMove':
31378 case 'topTouchStart':
31379 EventConstructor = SyntheticTouchEvent_1;
31380 break;
31381 case 'topAnimationEnd':
31382 case 'topAnimationIteration':
31383 case 'topAnimationStart':
31384 EventConstructor = SyntheticAnimationEvent_1;
31385 break;
31386 case 'topTransitionEnd':
31387 EventConstructor = SyntheticTransitionEvent_1;
31388 break;
31389 case 'topScroll':
31390 EventConstructor = SyntheticUIEvent_1;
31391 break;
31392 case 'topWheel':
31393 EventConstructor = SyntheticWheelEvent_1;
31394 break;
31395 case 'topCopy':
31396 case 'topCut':
31397 case 'topPaste':
31398 EventConstructor = SyntheticClipboardEvent_1;
31399 break;
31400 } 29434 }
31401 !EventConstructor ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : void 0;
31402 var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
31403 EventPropagators_1.accumulateTwoPhaseDispatches(event);
31404 return event;
31405 }
31406};
31407
31408var SimpleEventPlugin_1 = SimpleEventPlugin;
31409 29435
31410ReactDOMEventListener_1.setHandleTopLevel(ReactBrowserEventEmitter_1.handleTopLevel); 29436 return ancestorInfo;
29437 };
31411 29438
31412/** 29439 /**
31413 * Inject modules for resolving DOM hierarchy and plugin ordering. 29440 * Returns whether
31414 */ 29441 */
31415EventPluginHub_1.injection.injectEventPluginOrder(DOMEventPluginOrder_1); 29442 var isTagValidWithParent = function (tag, parentTag) {
31416EventPluginUtils_1.injection.injectComponentTree(ReactDOMComponentTree_1); 29443 // First, let's check if we're in an unusual parsing mode...
29444 switch (parentTag) {
29445 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
29446 case 'select':
29447 return tag === 'option' || tag === 'optgroup' || tag === '#text';
29448 case 'optgroup':
29449 return tag === 'option' || tag === '#text';
29450 // Strictly speaking, seeing an <option> doesn't mean we're in a <select>
29451 // but
29452 case 'option':
29453 return tag === '#text';
29454 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
29455 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
29456 // No special behavior since these rules fall back to "in body" mode for
29457 // all except special table nodes which cause bad parsing behavior anyway.
31417 29458
31418/** 29459 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
31419 * Some important event plugins included by default (without having to require 29460 case 'tr':
31420 * them). 29461 return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
31421 */ 29462 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
31422EventPluginHub_1.injection.injectEventPluginsByName({ 29463 case 'tbody':
31423 SimpleEventPlugin: SimpleEventPlugin_1, 29464 case 'thead':
31424 EnterLeaveEventPlugin: EnterLeaveEventPlugin_1, 29465 case 'tfoot':
31425 ChangeEventPlugin: ChangeEventPlugin_1, 29466 return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
31426 SelectEventPlugin: SelectEventPlugin_1, 29467 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
31427 BeforeInputEventPlugin: BeforeInputEventPlugin_1 29468 case 'colgroup':
31428}); 29469 return tag === 'col' || tag === 'template';
29470 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
29471 case 'table':
29472 return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
29473 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
29474 case 'head':
29475 return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
29476 // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
29477 case 'html':
29478 return tag === 'head' || tag === 'body';
29479 case '#document':
29480 return tag === 'html';
29481 }
31429 29482
31430var MUST_USE_PROPERTY = DOMProperty_1.injection.MUST_USE_PROPERTY; 29483 // Probably in the "in body" parsing mode, so we outlaw only tag combos
31431var HAS_BOOLEAN_VALUE = DOMProperty_1.injection.HAS_BOOLEAN_VALUE; 29484 // where the parsing rules cause implicit opens or closes to be added.
31432var HAS_NUMERIC_VALUE = DOMProperty_1.injection.HAS_NUMERIC_VALUE; 29485 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
31433var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty_1.injection.HAS_POSITIVE_NUMERIC_VALUE; 29486 switch (tag) {
31434var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty_1.injection.HAS_OVERLOADED_BOOLEAN_VALUE; 29487 case 'h1':
31435var HAS_STRING_BOOLEAN_VALUE = DOMProperty_1.injection.HAS_STRING_BOOLEAN_VALUE; 29488 case 'h2':
29489 case 'h3':
29490 case 'h4':
29491 case 'h5':
29492 case 'h6':
29493 return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
31436 29494
31437var HTMLDOMPropertyConfig = { 29495 case 'rp':
31438 // When adding attributes to this list, be sure to also add them to 29496 case 'rt':
31439 // the `possibleStandardNames` module to ensure casing and incorrect 29497 return impliedEndTags.indexOf(parentTag) === -1;
31440 // name warnings.
31441 Properties: {
31442 allowFullScreen: HAS_BOOLEAN_VALUE,
31443 // IE only true/false iFrame attribute
31444 // https://msdn.microsoft.com/en-us/library/ms533072(v=vs.85).aspx
31445 allowTransparency: HAS_STRING_BOOLEAN_VALUE,
31446 // specifies target context for links with `preload` type
31447 async: HAS_BOOLEAN_VALUE,
31448 // autoFocus is polyfilled/normalized by AutoFocusUtils
31449 // autoFocus: HAS_BOOLEAN_VALUE,
31450 autoPlay: HAS_BOOLEAN_VALUE,
31451 capture: HAS_BOOLEAN_VALUE,
31452 checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
31453 cols: HAS_POSITIVE_NUMERIC_VALUE,
31454 contentEditable: HAS_STRING_BOOLEAN_VALUE,
31455 controls: HAS_BOOLEAN_VALUE,
31456 'default': HAS_BOOLEAN_VALUE,
31457 defer: HAS_BOOLEAN_VALUE,
31458 disabled: HAS_BOOLEAN_VALUE,
31459 download: HAS_OVERLOADED_BOOLEAN_VALUE,
31460 draggable: HAS_STRING_BOOLEAN_VALUE,
31461 formNoValidate: HAS_BOOLEAN_VALUE,
31462 hidden: HAS_BOOLEAN_VALUE,
31463 loop: HAS_BOOLEAN_VALUE,
31464 // Caution; `option.selected` is not updated if `select.multiple` is
31465 // disabled with `removeAttribute`.
31466 multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
31467 muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
31468 noValidate: HAS_BOOLEAN_VALUE,
31469 open: HAS_BOOLEAN_VALUE,
31470 playsInline: HAS_BOOLEAN_VALUE,
31471 readOnly: HAS_BOOLEAN_VALUE,
31472 required: HAS_BOOLEAN_VALUE,
31473 reversed: HAS_BOOLEAN_VALUE,
31474 rows: HAS_POSITIVE_NUMERIC_VALUE,
31475 rowSpan: HAS_NUMERIC_VALUE,
31476 scoped: HAS_BOOLEAN_VALUE,
31477 seamless: HAS_BOOLEAN_VALUE,
31478 selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
31479 size: HAS_POSITIVE_NUMERIC_VALUE,
31480 start: HAS_NUMERIC_VALUE,
31481 // support for projecting regular DOM Elements via V1 named slots ( shadow dom )
31482 span: HAS_POSITIVE_NUMERIC_VALUE,
31483 spellCheck: HAS_STRING_BOOLEAN_VALUE,
31484 // Style must be explicitly set in the attribute list. React components
31485 // expect a style object
31486 style: 0,
31487 // itemScope is for for Microdata support.
31488 // See http://schema.org/docs/gs.html
31489 itemScope: HAS_BOOLEAN_VALUE,
31490 // These attributes must stay in the white-list because they have
31491 // different attribute names (see DOMAttributeNames below)
31492 acceptCharset: 0,
31493 className: 0,
31494 htmlFor: 0,
31495 httpEquiv: 0,
31496 // Attributes with mutation methods must be specified in the whitelist
31497 // Set the string boolean flag to allow the behavior
31498 value: HAS_STRING_BOOLEAN_VALUE
31499 },
31500 DOMAttributeNames: {
31501 acceptCharset: 'accept-charset',
31502 className: 'class',
31503 htmlFor: 'for',
31504 httpEquiv: 'http-equiv'
31505 },
31506 DOMMutationMethods: {
31507 value: function (node, value) {
31508 if (value == null) {
31509 return node.removeAttribute('value');
31510 }
31511 29498
31512 // Number inputs get special treatment due to some edge cases in 29499 case 'body':
31513 // Chrome. Let everything else assign the value attribute as normal. 29500 case 'caption':
31514 // https://github.com/facebook/react/issues/7253#issuecomment-236074326 29501 case 'col':
31515 if (node.type !== 'number' || node.hasAttribute('value') === false) { 29502 case 'colgroup':
31516 node.setAttribute('value', '' + value); 29503 case 'frame':
31517 } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) { 29504 case 'head':
31518 // Don't assign an attribute if validation reports bad 29505 case 'html':
31519 // input. Chrome will clear the value. Additionally, don't 29506 case 'tbody':
31520 // operate on inputs that have focus, otherwise Chrome might 29507 case 'td':
31521 // strip off trailing decimal places and cause the user's 29508 case 'tfoot':
31522 // cursor position to jump to the beginning of the input. 29509 case 'th':
31523 // 29510 case 'thead':
31524 // In ReactDOMInput, we have an onBlur event that will trigger 29511 case 'tr':
31525 // this function again when focus is lost. 29512 // These tags are only valid with a few parents that have special child
31526 node.setAttribute('value', '' + value); 29513 // parsing rules -- if we're down here, then none of those matched and
31527 } 29514 // so we allow it only if we don't know what the parent is, as all other
29515 // cases are invalid.
29516 return parentTag == null;
31528 } 29517 }
31529 }
31530};
31531 29518
31532var HTMLDOMPropertyConfig_1 = HTMLDOMPropertyConfig; 29519 return true;
29520 };
29521
29522 /**
29523 * Returns whether
29524 */
29525 var findInvalidAncestorForTag = function (tag, ancestorInfo) {
29526 switch (tag) {
29527 case 'address':
29528 case 'article':
29529 case 'aside':
29530 case 'blockquote':
29531 case 'center':
29532 case 'details':
29533 case 'dialog':
29534 case 'dir':
29535 case 'div':
29536 case 'dl':
29537 case 'fieldset':
29538 case 'figcaption':
29539 case 'figure':
29540 case 'footer':
29541 case 'header':
29542 case 'hgroup':
29543 case 'main':
29544 case 'menu':
29545 case 'nav':
29546 case 'ol':
29547 case 'p':
29548 case 'section':
29549 case 'summary':
29550 case 'ul':
29551 case 'pre':
29552 case 'listing':
29553 case 'table':
29554 case 'hr':
29555 case 'xmp':
29556 case 'h1':
29557 case 'h2':
29558 case 'h3':
29559 case 'h4':
29560 case 'h5':
29561 case 'h6':
29562 return ancestorInfo.pTagInButtonScope;
31533 29563
31534var HAS_STRING_BOOLEAN_VALUE$1 = DOMProperty_1.injection.HAS_STRING_BOOLEAN_VALUE; 29564 case 'form':
29565 return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
31535 29566
29567 case 'li':
29568 return ancestorInfo.listItemTagAutoclosing;
31536 29569
31537var NS = { 29570 case 'dd':
31538 xlink: 'http://www.w3.org/1999/xlink', 29571 case 'dt':
31539 xml: 'http://www.w3.org/XML/1998/namespace' 29572 return ancestorInfo.dlItemTagAutoclosing;
31540};
31541 29573
31542/** 29574 case 'button':
31543 * This is a list of all SVG attributes that need special casing, 29575 return ancestorInfo.buttonTagInScope;
31544 * namespacing, or boolean value assignment.
31545 *
31546 * When adding attributes to this list, be sure to also add them to
31547 * the `possibleStandardNames` module to ensure casing and incorrect
31548 * name warnings.
31549 *
31550 * SVG Attributes List:
31551 * https://www.w3.org/TR/SVG/attindex.html
31552 * SMIL Spec:
31553 * https://www.w3.org/TR/smil
31554 */
31555var ATTRS = ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'x-height', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xmlns:xlink', 'xml:lang', 'xml:space'];
31556 29576
31557var SVGDOMPropertyConfig = { 29577 case 'a':
31558 Properties: { 29578 // Spec says something about storing a list of markers, but it sounds
31559 autoReverse: HAS_STRING_BOOLEAN_VALUE$1, 29579 // equivalent to this check.
31560 externalResourcesRequired: HAS_STRING_BOOLEAN_VALUE$1, 29580 return ancestorInfo.aTagInScope;
31561 preserveAlpha: HAS_STRING_BOOLEAN_VALUE$1
31562 },
31563 DOMAttributeNames: {
31564 autoReverse: 'autoReverse',
31565 externalResourcesRequired: 'externalResourcesRequired',
31566 preserveAlpha: 'preserveAlpha'
31567 },
31568 DOMAttributeNamespaces: {
31569 xlinkActuate: NS.xlink,
31570 xlinkArcrole: NS.xlink,
31571 xlinkHref: NS.xlink,
31572 xlinkRole: NS.xlink,
31573 xlinkShow: NS.xlink,
31574 xlinkTitle: NS.xlink,
31575 xlinkType: NS.xlink,
31576 xmlBase: NS.xml,
31577 xmlLang: NS.xml,
31578 xmlSpace: NS.xml
31579 }
31580};
31581 29581
31582var CAMELIZE = /[\-\:]([a-z])/g; 29582 case 'nobr':
31583var capitalize = function (token) { 29583 return ancestorInfo.nobrTagInScope;
31584 return token[1].toUpperCase(); 29584 }
31585};
31586 29585
31587ATTRS.forEach(function (original) { 29586 return null;
31588 var reactName = original.replace(CAMELIZE, capitalize); 29587 };
31589 29588
31590 SVGDOMPropertyConfig.Properties[reactName] = 0; 29589 var didWarn = {};
31591 SVGDOMPropertyConfig.DOMAttributeNames[reactName] = original;
31592});
31593 29590
31594var SVGDOMPropertyConfig_1 = SVGDOMPropertyConfig; 29591 validateDOMNesting = function (childTag, childText, ancestorInfo) {
29592 ancestorInfo = ancestorInfo || emptyAncestorInfo;
29593 var parentInfo = ancestorInfo.current;
29594 var parentTag = parentInfo && parentInfo.tag;
31595 29595
31596DOMProperty_1.injection.injectDOMPropertyConfig(HTMLDOMPropertyConfig_1); 29596 if (childText != null) {
31597DOMProperty_1.injection.injectDOMPropertyConfig(SVGDOMPropertyConfig_1); 29597 warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null');
29598 childTag = '#text';
29599 }
31598 29600
31599var injectInternals = ReactFiberDevToolsHook.injectInternals; 29601 var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
29602 var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
29603 var invalidParentOrAncestor = invalidParent || invalidAncestor;
29604 if (!invalidParentOrAncestor) {
29605 return;
29606 }
31600 29607
31601var ELEMENT_NODE = HTMLNodeType_1.ELEMENT_NODE; 29608 var ancestorTag = invalidParentOrAncestor.tag;
31602var TEXT_NODE = HTMLNodeType_1.TEXT_NODE; 29609 var addendum = getCurrentFiberStackAddendum$6();
31603var COMMENT_NODE = HTMLNodeType_1.COMMENT_NODE;
31604var DOCUMENT_NODE = HTMLNodeType_1.DOCUMENT_NODE;
31605var DOCUMENT_FRAGMENT_NODE = HTMLNodeType_1.DOCUMENT_FRAGMENT_NODE;
31606 29610
31607var ROOT_ATTRIBUTE_NAME = DOMProperty_1.ROOT_ATTRIBUTE_NAME; 29611 var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + addendum;
29612 if (didWarn[warnKey]) {
29613 return;
29614 }
29615 didWarn[warnKey] = true;
31608 29616
29617 var tagDisplayName = childTag;
29618 var whitespaceInfo = '';
29619 if (childTag === '#text') {
29620 if (/\S/.test(childText)) {
29621 tagDisplayName = 'Text nodes';
29622 } else {
29623 tagDisplayName = 'Whitespace text nodes';
29624 whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
29625 }
29626 } else {
29627 tagDisplayName = '<' + childTag + '>';
29628 }
31609 29629
29630 if (invalidParent) {
29631 var info = '';
29632 if (ancestorTag === 'table' && childTag === 'tr') {
29633 info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
29634 }
29635 warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info, addendum);
29636 } else {
29637 warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.%s', tagDisplayName, ancestorTag, addendum);
29638 }
29639 };
31610 29640
29641 // TODO: turn this into a named export
29642 validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo$1;
31611 29643
31612var getChildNamespace = DOMNamespaces.getChildNamespace; 29644 // For testing
31613var createElement = ReactDOMFiberComponent_1.createElement; 29645 validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) {
31614var createTextNode = ReactDOMFiberComponent_1.createTextNode; 29646 ancestorInfo = ancestorInfo || emptyAncestorInfo;
31615var setInitialProperties = ReactDOMFiberComponent_1.setInitialProperties; 29647 var parentInfo = ancestorInfo.current;
31616var diffProperties = ReactDOMFiberComponent_1.diffProperties; 29648 var parentTag = parentInfo && parentInfo.tag;
31617var updateProperties = ReactDOMFiberComponent_1.updateProperties; 29649 return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo);
31618var diffHydratedProperties = ReactDOMFiberComponent_1.diffHydratedProperties; 29650 };
31619var diffHydratedText = ReactDOMFiberComponent_1.diffHydratedText; 29651}
31620var warnForDeletedHydratableElement = ReactDOMFiberComponent_1.warnForDeletedHydratableElement;
31621var warnForDeletedHydratableText = ReactDOMFiberComponent_1.warnForDeletedHydratableText;
31622var warnForInsertedHydratedElement = ReactDOMFiberComponent_1.warnForInsertedHydratedElement;
31623var warnForInsertedHydratedText = ReactDOMFiberComponent_1.warnForInsertedHydratedText;
31624var precacheFiberNode = ReactDOMComponentTree_1.precacheFiberNode;
31625var updateFiberProps = ReactDOMComponentTree_1.updateFiberProps;
31626 29652
29653var validateDOMNesting$1 = validateDOMNesting;
31627 29654
31628{ 29655// TODO: direct imports like some-package/src/* are bad. Fix me.
31629 var lowPriorityWarning = lowPriorityWarning_1; 29656var createElement = createElement$1;
31630 var warning = require$$0; 29657var createTextNode = createTextNode$1;
31631 var validateDOMNesting = validateDOMNesting_1; 29658var setInitialProperties = setInitialProperties$1;
31632 var updatedAncestorInfo = validateDOMNesting.updatedAncestorInfo; 29659var diffProperties = diffProperties$1;
29660var updateProperties = updateProperties$1;
29661var diffHydratedProperties = diffHydratedProperties$1;
29662var diffHydratedText = diffHydratedText$1;
29663var warnForUnmatchedText = warnForUnmatchedText$1;
29664var warnForDeletedHydratableElement = warnForDeletedHydratableElement$1;
29665var warnForDeletedHydratableText = warnForDeletedHydratableText$1;
29666var warnForInsertedHydratedElement = warnForInsertedHydratedElement$1;
29667var warnForInsertedHydratedText = warnForInsertedHydratedText$1;
29668var updatedAncestorInfo = validateDOMNesting$1.updatedAncestorInfo;
29669var precacheFiberNode = precacheFiberNode$1;
29670var updateFiberProps = updateFiberProps$1;
31633 29671
31634 29672
29673{
29674 var SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';
31635 if (typeof Map !== 'function' || Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') { 29675 if (typeof Map !== 'function' || Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {
31636 warning(false, 'React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. http://fb.me/react-polyfills'); 29676 warning(false, 'React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. http://fb.me/react-polyfills');
31637 } 29677 }
31638} 29678}
31639 29679
31640 29680injection$3.injectFiberControlledHostComponent(ReactDOMFiberComponent);
31641
31642ReactControlledComponent_1.injection.injectFiberControlledHostComponent(ReactDOMFiberComponent_1);
31643findDOMNode_1._injectFiber(function (fiber) {
31644 return DOMRenderer.findHostInstance(fiber);
31645});
31646 29681
31647var eventsEnabled = null; 29682var eventsEnabled = null;
31648var selectionInformation = null; 29683var selectionInformation = null;
@@ -31686,19 +29721,28 @@ function shouldAutoFocusHostComponent(type, props) {
31686 return false; 29721 return false;
31687} 29722}
31688 29723
31689var DOMRenderer = ReactFiberReconciler({ 29724var DOMRenderer = reactReconciler({
31690 getRootHostContext: function (rootContainerInstance) { 29725 getRootHostContext: function (rootContainerInstance) {
31691 var type = void 0; 29726 var type = void 0;
31692 var namespace = void 0; 29727 var namespace = void 0;
31693 if (rootContainerInstance.nodeType === DOCUMENT_NODE) { 29728 var nodeType = rootContainerInstance.nodeType;
31694 type = '#document'; 29729 switch (nodeType) {
31695 var root = rootContainerInstance.documentElement; 29730 case DOCUMENT_NODE:
31696 namespace = root ? root.namespaceURI : getChildNamespace(null, ''); 29731 case DOCUMENT_FRAGMENT_NODE:
31697 } else { 29732 {
31698 var container = rootContainerInstance.nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance; 29733 type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';
31699 var ownNamespace = container.namespaceURI || null; 29734 var root = rootContainerInstance.documentElement;
31700 type = container.tagName; 29735 namespace = root ? root.namespaceURI : getChildNamespace(null, '');
31701 namespace = getChildNamespace(ownNamespace, type); 29736 break;
29737 }
29738 default:
29739 {
29740 var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;
29741 var ownNamespace = container.namespaceURI || null;
29742 type = container.tagName;
29743 namespace = getChildNamespace(ownNamespace, type);
29744 break;
29745 }
31702 } 29746 }
31703 { 29747 {
31704 var validatedTag = type.toLowerCase(); 29748 var validatedTag = type.toLowerCase();
@@ -31721,14 +29765,14 @@ var DOMRenderer = ReactFiberReconciler({
31721 return instance; 29765 return instance;
31722 }, 29766 },
31723 prepareForCommit: function () { 29767 prepareForCommit: function () {
31724 eventsEnabled = ReactBrowserEventEmitter_1.isEnabled(); 29768 eventsEnabled = isEnabled();
31725 selectionInformation = ReactInputSelection_1.getSelectionInformation(); 29769 selectionInformation = getSelectionInformation();
31726 ReactBrowserEventEmitter_1.setEnabled(false); 29770 setEnabled(false);
31727 }, 29771 },
31728 resetAfterCommit: function () { 29772 resetAfterCommit: function () {
31729 ReactInputSelection_1.restoreSelection(selectionInformation); 29773 restoreSelection(selectionInformation);
31730 selectionInformation = null; 29774 selectionInformation = null;
31731 ReactBrowserEventEmitter_1.setEnabled(eventsEnabled); 29775 setEnabled(eventsEnabled);
31732 eventsEnabled = null; 29776 eventsEnabled = null;
31733 }, 29777 },
31734 createInstance: function (type, props, rootContainerInstance, hostContext, internalInstanceHandle) { 29778 createInstance: function (type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
@@ -31736,11 +29780,11 @@ var DOMRenderer = ReactFiberReconciler({
31736 { 29780 {
31737 // TODO: take namespace into account when validating. 29781 // TODO: take namespace into account when validating.
31738 var hostContextDev = hostContext; 29782 var hostContextDev = hostContext;
31739 validateDOMNesting(type, null, null, hostContextDev.ancestorInfo); 29783 validateDOMNesting$1(type, null, hostContextDev.ancestorInfo);
31740 if (typeof props.children === 'string' || typeof props.children === 'number') { 29784 if (typeof props.children === 'string' || typeof props.children === 'number') {
31741 var string = '' + props.children; 29785 var string = '' + props.children;
31742 var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type, null); 29786 var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type, null);
31743 validateDOMNesting(null, string, null, ownAncestorInfo); 29787 validateDOMNesting$1(null, string, ownAncestorInfo);
31744 } 29788 }
31745 parentNamespace = hostContextDev.namespace; 29789 parentNamespace = hostContextDev.namespace;
31746 } 29790 }
@@ -31762,135 +29806,183 @@ var DOMRenderer = ReactFiberReconciler({
31762 if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) { 29806 if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {
31763 var string = '' + newProps.children; 29807 var string = '' + newProps.children;
31764 var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type, null); 29808 var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type, null);
31765 validateDOMNesting(null, string, null, ownAncestorInfo); 29809 validateDOMNesting$1(null, string, ownAncestorInfo);
31766 } 29810 }
31767 } 29811 }
31768 return diffProperties(domElement, type, oldProps, newProps, rootContainerInstance); 29812 return diffProperties(domElement, type, oldProps, newProps, rootContainerInstance);
31769 }, 29813 },
31770 commitMount: function (domElement, type, newProps, internalInstanceHandle) {
31771 domElement.focus();
31772 },
31773 commitUpdate: function (domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {
31774 // Update the props handle so that we know which props are the ones with
31775 // with current event handlers.
31776 updateFiberProps(domElement, newProps);
31777 // Apply the diff to the DOM node.
31778 updateProperties(domElement, updatePayload, type, oldProps, newProps);
31779 },
31780 shouldSetTextContent: function (type, props) { 29814 shouldSetTextContent: function (type, props) {
31781 return type === 'textarea' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && typeof props.dangerouslySetInnerHTML.__html === 'string'; 29815 return type === 'textarea' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && typeof props.dangerouslySetInnerHTML.__html === 'string';
31782 }, 29816 },
31783 resetTextContent: function (domElement) {
31784 domElement.textContent = '';
31785 },
31786 shouldDeprioritizeSubtree: function (type, props) { 29817 shouldDeprioritizeSubtree: function (type, props) {
31787 return !!props.hidden; 29818 return !!props.hidden;
31788 }, 29819 },
31789 createTextInstance: function (text, rootContainerInstance, hostContext, internalInstanceHandle) { 29820 createTextInstance: function (text, rootContainerInstance, hostContext, internalInstanceHandle) {
31790 { 29821 {
31791 var hostContextDev = hostContext; 29822 var hostContextDev = hostContext;
31792 validateDOMNesting(null, text, null, hostContextDev.ancestorInfo); 29823 validateDOMNesting$1(null, text, hostContextDev.ancestorInfo);
31793 } 29824 }
31794 var textNode = createTextNode(text, rootContainerInstance); 29825 var textNode = createTextNode(text, rootContainerInstance);
31795 precacheFiberNode(internalInstanceHandle, textNode); 29826 precacheFiberNode(internalInstanceHandle, textNode);
31796 return textNode; 29827 return textNode;
31797 }, 29828 },
31798 commitTextUpdate: function (textInstance, oldText, newText) { 29829
31799 textInstance.nodeValue = newText; 29830
31800 }, 29831 now: now,
31801 appendChild: function (parentInstance, child) { 29832
31802 parentInstance.appendChild(child); 29833 mutation: {
31803 }, 29834 commitMount: function (domElement, type, newProps, internalInstanceHandle) {
31804 appendChildToContainer: function (container, child) { 29835 domElement.focus();
31805 if (container.nodeType === COMMENT_NODE) { 29836 },
31806 container.parentNode.insertBefore(child, container); 29837 commitUpdate: function (domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {
31807 } else { 29838 // Update the props handle so that we know which props are the ones with
31808 container.appendChild(child); 29839 // with current event handlers.
31809 } 29840 updateFiberProps(domElement, newProps);
31810 }, 29841 // Apply the diff to the DOM node.
31811 insertBefore: function (parentInstance, child, beforeChild) { 29842 updateProperties(domElement, updatePayload, type, oldProps, newProps);
31812 parentInstance.insertBefore(child, beforeChild); 29843 },
31813 }, 29844 resetTextContent: function (domElement) {
31814 insertInContainerBefore: function (container, child, beforeChild) { 29845 domElement.textContent = '';
31815 if (container.nodeType === COMMENT_NODE) { 29846 },
31816 container.parentNode.insertBefore(child, beforeChild); 29847 commitTextUpdate: function (textInstance, oldText, newText) {
31817 } else { 29848 textInstance.nodeValue = newText;
31818 container.insertBefore(child, beforeChild); 29849 },
31819 } 29850 appendChild: function (parentInstance, child) {
31820 }, 29851 parentInstance.appendChild(child);
31821 removeChild: function (parentInstance, child) { 29852 },
31822 parentInstance.removeChild(child); 29853 appendChildToContainer: function (container, child) {
31823 }, 29854 if (container.nodeType === COMMENT_NODE) {
31824 removeChildFromContainer: function (container, child) { 29855 container.parentNode.insertBefore(child, container);
31825 if (container.nodeType === COMMENT_NODE) { 29856 } else {
31826 container.parentNode.removeChild(child); 29857 container.appendChild(child);
31827 } else { 29858 }
31828 container.removeChild(child); 29859 },
31829 } 29860 insertBefore: function (parentInstance, child, beforeChild) {
31830 }, 29861 parentInstance.insertBefore(child, beforeChild);
31831 canHydrateInstance: function (instance, type, props) { 29862 },
31832 return instance.nodeType === ELEMENT_NODE && type === instance.nodeName.toLowerCase(); 29863 insertInContainerBefore: function (container, child, beforeChild) {
31833 }, 29864 if (container.nodeType === COMMENT_NODE) {
31834 canHydrateTextInstance: function (instance, text) { 29865 container.parentNode.insertBefore(child, beforeChild);
31835 if (text === '') { 29866 } else {
31836 // Empty strings are not parsed by HTML so there won't be a correct match here. 29867 container.insertBefore(child, beforeChild);
31837 return false; 29868 }
31838 } 29869 },
31839 return instance.nodeType === TEXT_NODE; 29870 removeChild: function (parentInstance, child) {
31840 }, 29871 parentInstance.removeChild(child);
31841 getNextHydratableSibling: function (instance) { 29872 },
31842 var node = instance.nextSibling; 29873 removeChildFromContainer: function (container, child) {
31843 // Skip non-hydratable nodes. 29874 if (container.nodeType === COMMENT_NODE) {
31844 while (node && node.nodeType !== ELEMENT_NODE && node.nodeType !== TEXT_NODE) { 29875 container.parentNode.removeChild(child);
31845 node = node.nextSibling; 29876 } else {
31846 } 29877 container.removeChild(child);
31847 return node; 29878 }
31848 },
31849 getFirstHydratableChild: function (parentInstance) {
31850 var next = parentInstance.firstChild;
31851 // Skip non-hydratable nodes.
31852 while (next && next.nodeType !== ELEMENT_NODE && next.nodeType !== TEXT_NODE) {
31853 next = next.nextSibling;
31854 }
31855 return next;
31856 },
31857 hydrateInstance: function (instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
31858 precacheFiberNode(internalInstanceHandle, instance);
31859 // TODO: Possibly defer this until the commit phase where all the events
31860 // get attached.
31861 updateFiberProps(instance, props);
31862 var parentNamespace = void 0;
31863 {
31864 var hostContextDev = hostContext;
31865 parentNamespace = hostContextDev.namespace;
31866 } 29879 }
31867 return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance);
31868 },
31869 hydrateTextInstance: function (textInstance, text, internalInstanceHandle) {
31870 precacheFiberNode(internalInstanceHandle, textInstance);
31871 return diffHydratedText(textInstance, text);
31872 }, 29880 },
31873 didNotHydrateInstance: function (parentInstance, instance) { 29881
31874 if (instance.nodeType === 1) { 29882 hydration: {
31875 warnForDeletedHydratableElement(parentInstance, instance); 29883 canHydrateInstance: function (instance, type, props) {
31876 } else { 29884 if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {
31877 warnForDeletedHydratableText(parentInstance, instance); 29885 return null;
29886 }
29887 // This has now been refined to an element node.
29888 return instance;
29889 },
29890 canHydrateTextInstance: function (instance, text) {
29891 if (text === '' || instance.nodeType !== TEXT_NODE) {
29892 // Empty strings are not parsed by HTML so there won't be a correct match here.
29893 return null;
29894 }
29895 // This has now been refined to a text node.
29896 return instance;
29897 },
29898 getNextHydratableSibling: function (instance) {
29899 var node = instance.nextSibling;
29900 // Skip non-hydratable nodes.
29901 while (node && node.nodeType !== ELEMENT_NODE && node.nodeType !== TEXT_NODE) {
29902 node = node.nextSibling;
29903 }
29904 return node;
29905 },
29906 getFirstHydratableChild: function (parentInstance) {
29907 var next = parentInstance.firstChild;
29908 // Skip non-hydratable nodes.
29909 while (next && next.nodeType !== ELEMENT_NODE && next.nodeType !== TEXT_NODE) {
29910 next = next.nextSibling;
29911 }
29912 return next;
29913 },
29914 hydrateInstance: function (instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
29915 precacheFiberNode(internalInstanceHandle, instance);
29916 // TODO: Possibly defer this until the commit phase where all the events
29917 // get attached.
29918 updateFiberProps(instance, props);
29919 var parentNamespace = void 0;
29920 {
29921 var hostContextDev = hostContext;
29922 parentNamespace = hostContextDev.namespace;
29923 }
29924 return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance);
29925 },
29926 hydrateTextInstance: function (textInstance, text, internalInstanceHandle) {
29927 precacheFiberNode(internalInstanceHandle, textInstance);
29928 return diffHydratedText(textInstance, text);
29929 },
29930 didNotMatchHydratedContainerTextInstance: function (parentContainer, textInstance, text) {
29931 {
29932 warnForUnmatchedText(textInstance, text);
29933 }
29934 },
29935 didNotMatchHydratedTextInstance: function (parentType, parentProps, parentInstance, textInstance, text) {
29936 if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {
29937 warnForUnmatchedText(textInstance, text);
29938 }
29939 },
29940 didNotHydrateContainerInstance: function (parentContainer, instance) {
29941 {
29942 if (instance.nodeType === 1) {
29943 warnForDeletedHydratableElement(parentContainer, instance);
29944 } else {
29945 warnForDeletedHydratableText(parentContainer, instance);
29946 }
29947 }
29948 },
29949 didNotHydrateInstance: function (parentType, parentProps, parentInstance, instance) {
29950 if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {
29951 if (instance.nodeType === 1) {
29952 warnForDeletedHydratableElement(parentInstance, instance);
29953 } else {
29954 warnForDeletedHydratableText(parentInstance, instance);
29955 }
29956 }
29957 },
29958 didNotFindHydratableContainerInstance: function (parentContainer, type, props) {
29959 {
29960 warnForInsertedHydratedElement(parentContainer, type, props);
29961 }
29962 },
29963 didNotFindHydratableContainerTextInstance: function (parentContainer, text) {
29964 {
29965 warnForInsertedHydratedText(parentContainer, text);
29966 }
29967 },
29968 didNotFindHydratableInstance: function (parentType, parentProps, parentInstance, type, props) {
29969 if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {
29970 warnForInsertedHydratedElement(parentInstance, type, props);
29971 }
29972 },
29973 didNotFindHydratableTextInstance: function (parentType, parentProps, parentInstance, text) {
29974 if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {
29975 warnForInsertedHydratedText(parentInstance, text);
29976 }
31878 } 29977 }
31879 }, 29978 },
31880 didNotFindHydratableInstance: function (parentInstance, type, props) {
31881 warnForInsertedHydratedElement(parentInstance, type, props);
31882 },
31883 didNotFindHydratableTextInstance: function (parentInstance, text) {
31884 warnForInsertedHydratedText(parentInstance, text);
31885 },
31886
31887 29979
31888 scheduleDeferredCallback: ReactDOMFrameScheduling.rIC, 29980 scheduleDeferredCallback: rIC,
31889 29981
31890 useSyncScheduling: !ReactDOMFeatureFlags_1.fiberAsyncScheduling 29982 useSyncScheduling: !enableAsyncSchedulingByDefaultInReactDOM
31891}); 29983});
31892 29984
31893ReactGenericBatching_1.injection.injectFiberBatchedUpdates(DOMRenderer.batchedUpdates); 29985injection$4.injectFiberBatchedUpdates(DOMRenderer.batchedUpdates);
31894 29986
31895var warnedAboutHydrateAPI = false; 29987var warnedAboutHydrateAPI = false;
31896 29988
@@ -31907,7 +29999,7 @@ function renderSubtreeIntoContainer(parentComponent, children, container, forceH
31907 29999
31908 var isRootRenderedBySomeReact = !!container._reactRootContainer; 30000 var isRootRenderedBySomeReact = !!container._reactRootContainer;
31909 var rootEl = getReactRootElementInContainer(container); 30001 var rootEl = getReactRootElementInContainer(container);
31910 var hasNonRootReactChild = !!(rootEl && ReactDOMComponentTree_1.getInstanceFromNode(rootEl)); 30002 var hasNonRootReactChild = !!(rootEl && getInstanceFromNode$1(rootEl));
31911 30003
31912 warning(!hasNonRootReactChild || isRootRenderedBySomeReact, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.'); 30004 warning(!hasNonRootReactChild || isRootRenderedBySomeReact, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');
31913 30005
@@ -31934,10 +30026,10 @@ function renderSubtreeIntoContainer(parentComponent, children, container, forceH
31934 { 30026 {
31935 if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) { 30027 if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) {
31936 warnedAboutHydrateAPI = true; 30028 warnedAboutHydrateAPI = true;
31937 lowPriorityWarning(false, 'render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v17. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.'); 30029 lowPriorityWarning$1(false, 'render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v17. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.');
31938 } 30030 }
31939 } 30031 }
31940 var newRoot = DOMRenderer.createContainer(container); 30032 var newRoot = DOMRenderer.createContainer(container, shouldHydrate);
31941 root = container._reactRootContainer = newRoot; 30033 root = container._reactRootContainer = newRoot;
31942 // Initial mount should not be batched. 30034 // Initial mount should not be batched.
31943 DOMRenderer.unbatchedUpdates(function () { 30035 DOMRenderer.unbatchedUpdates(function () {
@@ -31954,12 +30046,52 @@ function createPortal(children, container) {
31954 30046
31955 !isValidContainer(container) ? invariant(false, 'Target container is not a DOM element.') : void 0; 30047 !isValidContainer(container) ? invariant(false, 'Target container is not a DOM element.') : void 0;
31956 // TODO: pass ReactDOM portal implementation as third argument 30048 // TODO: pass ReactDOM portal implementation as third argument
31957 return ReactPortal.createPortal(children, container, null, key); 30049 return createPortal$1(children, container, null, key);
31958} 30050}
31959 30051
31960var ReactDOMFiber = { 30052function ReactRoot(container, hydrate) {
30053 var root = DOMRenderer.createContainer(container, hydrate);
30054 this._reactRootContainer = root;
30055}
30056ReactRoot.prototype.render = function (children, callback) {
30057 var root = this._reactRootContainer;
30058 DOMRenderer.updateContainer(children, root, null, callback);
30059};
30060ReactRoot.prototype.unmount = function (callback) {
30061 var root = this._reactRootContainer;
30062 DOMRenderer.updateContainer(null, root, null, callback);
30063};
30064
30065var ReactDOM = {
31961 createPortal: createPortal, 30066 createPortal: createPortal,
31962 30067
30068 findDOMNode: function (componentOrElement) {
30069 {
30070 var owner = ReactCurrentOwner.current;
30071 if (owner !== null) {
30072 var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;
30073 warning(warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + '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(owner) || 'A component');
30074 owner.stateNode._warnedAboutRefsInRender = true;
30075 }
30076 }
30077 if (componentOrElement == null) {
30078 return null;
30079 }
30080 if (componentOrElement.nodeType === ELEMENT_NODE) {
30081 return componentOrElement;
30082 }
30083
30084 var inst = get(componentOrElement);
30085 if (inst) {
30086 return DOMRenderer.findHostInstance(inst);
30087 }
30088
30089 if (typeof componentOrElement.render === 'function') {
30090 invariant(false, 'Unable to find node on an unmounted component.');
30091 } else {
30092 invariant(false, 'Element appears to be neither ReactComponent nor DOMNode. Keys: %s', Object.keys(componentOrElement));
30093 }
30094 },
31963 hydrate: function (element, container, callback) { 30095 hydrate: function (element, container, callback) {
31964 // TODO: throw or warn if we couldn't hydrate? 30096 // TODO: throw or warn if we couldn't hydrate?
31965 return renderSubtreeIntoContainer(null, element, container, true, callback); 30097 return renderSubtreeIntoContainer(null, element, container, true, callback);
@@ -31968,7 +30100,7 @@ var ReactDOMFiber = {
31968 return renderSubtreeIntoContainer(null, element, container, false, callback); 30100 return renderSubtreeIntoContainer(null, element, container, false, callback);
31969 }, 30101 },
31970 unstable_renderSubtreeIntoContainer: function (parentComponent, element, containerNode, callback) { 30102 unstable_renderSubtreeIntoContainer: function (parentComponent, element, containerNode, callback) {
31971 !(parentComponent != null && ReactInstanceMap_1.has(parentComponent)) ? invariant(false, 'parentComponent must be a valid React Component') : void 0; 30103 !(parentComponent != null && has(parentComponent)) ? invariant(false, 'parentComponent must be a valid React Component') : void 0;
31972 return renderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback); 30104 return renderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);
31973 }, 30105 },
31974 unmountComponentAtNode: function (container) { 30106 unmountComponentAtNode: function (container) {
@@ -31977,7 +30109,7 @@ var ReactDOMFiber = {
31977 if (container._reactRootContainer) { 30109 if (container._reactRootContainer) {
31978 { 30110 {
31979 var rootEl = getReactRootElementInContainer(container); 30111 var rootEl = getReactRootElementInContainer(container);
31980 var renderedByDifferentReact = rootEl && !ReactDOMComponentTree_1.getInstanceFromNode(rootEl); 30112 var renderedByDifferentReact = rootEl && !getInstanceFromNode$1(rootEl);
31981 warning(!renderedByDifferentReact, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.'); 30113 warning(!renderedByDifferentReact, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.');
31982 } 30114 }
31983 30115
@@ -31993,7 +30125,7 @@ var ReactDOMFiber = {
31993 } else { 30125 } else {
31994 { 30126 {
31995 var _rootEl = getReactRootElementInContainer(container); 30127 var _rootEl = getReactRootElementInContainer(container);
31996 var hasNonRootReactChild = !!(_rootEl && ReactDOMComponentTree_1.getInstanceFromNode(_rootEl)); 30128 var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode$1(_rootEl));
31997 30129
31998 // Check if the container itself is a React root node. 30130 // Check if the container itself is a React root node.
31999 var isContainerReactRoot = container.nodeType === 1 && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer; 30131 var isContainerReactRoot = container.nodeType === 1 && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;
@@ -32006,13 +30138,11 @@ var ReactDOMFiber = {
32006 }, 30138 },
32007 30139
32008 30140
32009 findDOMNode: findDOMNode_1,
32010
32011 // Temporary alias since we already shipped React 16 RC with it. 30141 // Temporary alias since we already shipped React 16 RC with it.
32012 // TODO: remove in React 17. 30142 // TODO: remove in React 17.
32013 unstable_createPortal: createPortal, 30143 unstable_createPortal: createPortal,
32014 30144
32015 unstable_batchedUpdates: ReactGenericBatching_1.batchedUpdates, 30145 unstable_batchedUpdates: batchedUpdates,
32016 30146
32017 unstable_deferredUpdates: DOMRenderer.deferredUpdates, 30147 unstable_deferredUpdates: DOMRenderer.deferredUpdates,
32018 30148
@@ -32020,20 +30150,25 @@ var ReactDOMFiber = {
32020 30150
32021 __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: { 30151 __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
32022 // For TapEventPlugin which is popular in open source 30152 // For TapEventPlugin which is popular in open source
32023 EventPluginHub: EventPluginHub_1, 30153 EventPluginHub: EventPluginHub,
32024 // Used by test-utils 30154 // Used by test-utils
32025 EventPluginRegistry: EventPluginRegistry_1, 30155 EventPluginRegistry: EventPluginRegistry,
32026 EventPropagators: EventPropagators_1, 30156 EventPropagators: EventPropagators,
32027 ReactControlledComponent: ReactControlledComponent_1, 30157 ReactControlledComponent: ReactControlledComponent,
32028 ReactDOMComponentTree: ReactDOMComponentTree_1, 30158 ReactDOMComponentTree: ReactDOMComponentTree,
32029 ReactDOMEventListener: ReactDOMEventListener_1 30159 ReactDOMEventListener: ReactDOMEventListener
32030 } 30160 }
32031}; 30161};
32032 30162
32033var foundDevTools = injectInternals({ 30163if (enableCreateRoot) {
32034 findFiberByHostInstance: ReactDOMComponentTree_1.getClosestInstanceFromNode, 30164 ReactDOM.createRoot = function createRoot(container, options) {
32035 findHostInstanceByFiber: DOMRenderer.findHostInstance, 30165 var hydrate = options != null && options.hydrate === true;
32036 // This is an enum because we may add more (e.g. profiler build) 30166 return new ReactRoot(container, hydrate);
30167 };
30168}
30169
30170var foundDevTools = DOMRenderer.injectIntoDevTools({
30171 findFiberByHostInstance: getClosestInstanceFromNode,
32037 bundleType: 1, 30172 bundleType: 1,
32038 version: ReactVersion, 30173 version: ReactVersion,
32039 rendererPackageName: 'react-dom' 30174 rendererPackageName: 'react-dom'
@@ -32052,284 +30187,264 @@ var foundDevTools = injectInternals({
32052 } 30187 }
32053} 30188}
32054 30189
32055var ReactDOMFiberEntry = ReactDOMFiber;
32056 30190
32057module.exports = ReactDOMFiberEntry;
32058 30191
32059})(); 30192var ReactDOM$2 = Object.freeze({
30193 default: ReactDOM
30194});
30195
30196var ReactDOM$3 = ( ReactDOM$2 && ReactDOM ) || ReactDOM$2;
30197
30198// TODO: decide on the top-level export form.
30199// This is hacky but makes it work with both Rollup and Jest.
30200var reactDom = ReactDOM$3['default'] ? ReactDOM$3['default'] : ReactDOM$3;
30201
30202module.exports = reactDom;
30203 })();
32060} 30204}
32061 30205
32062/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) 30206/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
32063 30207
32064/***/ }), 30208/***/ }),
32065/* 170 */ 30209/* 168 */
32066/***/ (function(module, exports, __webpack_require__) { 30210/***/ (function(module, exports, __webpack_require__) {
32067 30211
32068"use strict"; 30212"use strict";
30213/** @license React v16.1.1
30214 * react-dom.production.min.js
30215 *
30216 * Copyright (c) 2013-present, Facebook, Inc.
30217 *
30218 * This source code is licensed under the MIT license found in the
30219 * LICENSE file in the root directory of this source tree.
30220 */
32069/* 30221/*
32070 React v16.0.0
32071 react-dom.production.min.js
32072
32073 Copyright (c) 2013-present, Facebook, Inc.
32074
32075 This source code is licensed under the MIT license found in the
32076 LICENSE file in the root directory of this source tree.
32077 Modernizr 3.0.0pre (Custom Build) | MIT 30222 Modernizr 3.0.0pre (Custom Build) | MIT
32078*/ 30223*/
32079var aa=__webpack_require__(0);__webpack_require__(13);var l=__webpack_require__(49),n=__webpack_require__(18),ba=__webpack_require__(67),ca=__webpack_require__(12),da=__webpack_require__(28),ea=__webpack_require__(71),fa=__webpack_require__(68),ha=__webpack_require__(69),ia=__webpack_require__(70); 30224var aa=__webpack_require__(0),m=__webpack_require__(67),A=__webpack_require__(17),B=__webpack_require__(12),ca=__webpack_require__(66),da=__webpack_require__(70),ea=__webpack_require__(71),ha=__webpack_require__(68),ia=__webpack_require__(69),C=__webpack_require__(28);
32080function w(a){for(var b=arguments.length-1,c="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,d=0;d<b;d++)c+="\x26args[]\x3d"+encodeURIComponent(arguments[d+1]);b=Error(c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");b.name="Invariant Violation";b.framesToPop=1;throw b;}aa?void 0:w("227"); 30225function D(a){for(var b=arguments.length-1,c="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,d=0;d<b;d++)c+="\x26args[]\x3d"+encodeURIComponent(arguments[d+1]);b=Error(c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");b.name="Invariant Violation";b.framesToPop=1;throw b;}aa?void 0:D("227");
32081function ja(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}} 30226var la={children:!0,dangerouslySetInnerHTML:!0,defaultValue:!0,defaultChecked:!0,innerHTML:!0,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,style:!0};function qa(a,b){return(a&b)===b}
32082var ka={Namespaces:{html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"},getIntrinsicNamespace:ja,getChildNamespace:function(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?ja(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}},la=null,oa={}; 30227var ra={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,HAS_STRING_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(a){var b=ra,c=a.Properties||{},d=a.DOMAttributeNamespaces||{},e=a.DOMAttributeNames||{};a=a.DOMMutationMethods||{};for(var f in c){sa.hasOwnProperty(f)?D("48",f):void 0;var g=f.toLowerCase(),k=c[f];g={attributeName:g,attributeNamespace:null,propertyName:f,mutationMethod:null,mustUseProperty:qa(k,b.MUST_USE_PROPERTY),
32083function pa(){if(la)for(var a in oa){var b=oa[a],c=la.indexOf(a);-1<c?void 0:w("96",a);if(!qa.plugins[c]){b.extractEvents?void 0:w("97",a);qa.plugins[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,h=d;qa.eventNameDispatchConfigs.hasOwnProperty(h)?w("99",h):void 0;qa.eventNameDispatchConfigs[h]=f;var k=f.phasedRegistrationNames;if(k){for(e in k)k.hasOwnProperty(e)&&ra(k[e],g,h);e=!0}else f.registrationName?(ra(f.registrationName,g,h),e=!0):e=!1;e?void 0:w("98",d,a)}}}} 30228hasBooleanValue:qa(k,b.HAS_BOOLEAN_VALUE),hasNumericValue:qa(k,b.HAS_NUMERIC_VALUE),hasPositiveNumericValue:qa(k,b.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:qa(k,b.HAS_OVERLOADED_BOOLEAN_VALUE),hasStringBooleanValue:qa(k,b.HAS_STRING_BOOLEAN_VALUE)};1>=g.hasBooleanValue+g.hasNumericValue+g.hasOverloadedBooleanValue?void 0:D("50",f);e.hasOwnProperty(f)&&(g.attributeName=e[f]);d.hasOwnProperty(f)&&(g.attributeNamespace=d[f]);a.hasOwnProperty(f)&&(g.mutationMethod=a[f]);sa[f]=g}}},sa={};
32084function ra(a,b,c){qa.registrationNameModules[a]?w("100",a):void 0;qa.registrationNameModules[a]=b;qa.registrationNameDependencies[a]=b.eventTypes[c].dependencies} 30229function ta(a,b){if(la.hasOwnProperty(a)||2<a.length&&("o"===a[0]||"O"===a[0])&&("n"===a[1]||"N"===a[1]))return!1;if(null===b)return!0;switch(typeof b){case "boolean":return la.hasOwnProperty(a)?a=!0:(b=ua(a))?a=b.hasBooleanValue||b.hasStringBooleanValue||b.hasOverloadedBooleanValue:(a=a.toLowerCase().slice(0,5),a="data-"===a||"aria-"===a),a;case "undefined":case "number":case "string":case "object":return!0;default:return!1}}function ua(a){return sa.hasOwnProperty(a)?sa[a]:null}
32085var qa={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(a){la?w("101"):void 0;la=Array.prototype.slice.call(a);pa()},injectEventPluginsByName:function(a){var b=!1,c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];oa.hasOwnProperty(c)&&oa[c]===d||(oa[c]?w("102",c):void 0,oa[c]=d,b=!0)}b&&pa()}},sa=qa,ta={children:!0,dangerouslySetInnerHTML:!0,autoFocus:!0,defaultValue:!0,defaultChecked:!0, 30230var va=ra,wa=va.MUST_USE_PROPERTY,H=va.HAS_BOOLEAN_VALUE,xa=va.HAS_NUMERIC_VALUE,ya=va.HAS_POSITIVE_NUMERIC_VALUE,za=va.HAS_OVERLOADED_BOOLEAN_VALUE,Aa=va.HAS_STRING_BOOLEAN_VALUE,Ba={Properties:{allowFullScreen:H,async:H,autoFocus:H,autoPlay:H,capture:za,checked:wa|H,cols:ya,contentEditable:Aa,controls:H,"default":H,defer:H,disabled:H,download:za,draggable:Aa,formNoValidate:H,hidden:H,loop:H,multiple:wa|H,muted:wa|H,noValidate:H,open:H,playsInline:H,readOnly:H,required:H,reversed:H,rows:ya,rowSpan:xa,
32086innerHTML:!0,suppressContentEditableWarning:!0,style:!0};function ua(a,b){return(a&b)===b} 30231scoped:H,seamless:H,selected:wa|H,size:ya,start:xa,span:ya,spellCheck:Aa,style:0,tabIndex:0,itemScope:H,acceptCharset:0,className:0,htmlFor:0,httpEquiv:0,value:Aa},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMMutationMethods:{value:function(a,b){if(null==b)return a.removeAttribute("value");"number"!==a.type||!1===a.hasAttribute("value")?a.setAttribute("value",""+b):a.validity&&!a.validity.badInput&&a.ownerDocument.activeElement!==a&&
32087var wa={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,HAS_STRING_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(a){var b=wa,c=a.Properties||{},d=a.DOMAttributeNamespaces||{},e=a.DOMAttributeNames||{};a=a.DOMMutationMethods||{};for(var f in c){xa.properties.hasOwnProperty(f)?w("48",f):void 0;var g=f.toLowerCase(),h=c[f];g={attributeName:g,attributeNamespace:null,propertyName:f,mutationMethod:null,mustUseProperty:ua(h,b.MUST_USE_PROPERTY), 30232a.setAttribute("value",""+b)}}},Ca=va.HAS_STRING_BOOLEAN_VALUE,K={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Da={Properties:{autoReverse:Ca,externalResourcesRequired:Ca,preserveAlpha:Ca},DOMAttributeNames:{autoReverse:"autoReverse",externalResourcesRequired:"externalResourcesRequired",preserveAlpha:"preserveAlpha"},DOMAttributeNamespaces:{xlinkActuate:K.xlink,xlinkArcrole:K.xlink,xlinkHref:K.xlink,xlinkRole:K.xlink,xlinkShow:K.xlink,xlinkTitle:K.xlink,xlinkType:K.xlink,
32088hasBooleanValue:ua(h,b.HAS_BOOLEAN_VALUE),hasNumericValue:ua(h,b.HAS_NUMERIC_VALUE),hasPositiveNumericValue:ua(h,b.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:ua(h,b.HAS_OVERLOADED_BOOLEAN_VALUE),hasStringBooleanValue:ua(h,b.HAS_STRING_BOOLEAN_VALUE)};1>=g.hasBooleanValue+g.hasNumericValue+g.hasOverloadedBooleanValue?void 0:w("50",f);e.hasOwnProperty(f)&&(g.attributeName=e[f]);d.hasOwnProperty(f)&&(g.attributeNamespace=d[f]);a.hasOwnProperty(f)&&(g.mutationMethod=a[f]);xa.properties[f]= 30233xmlBase:K.xml,xmlLang:K.xml,xmlSpace:K.xml}},Ea=/[\-\:]([a-z])/g;function Ha(a){return a[1].toUpperCase()}
32089g}}},xa={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",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",ATTRIBUTE_NAME_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\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040", 30234"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode x-height xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xmlns:xlink xml:lang xml:space".split(" ").forEach(function(a){var b=a.replace(Ea,
32090properties:{},shouldSetAttribute:function(a,b){if(xa.isReservedProp(a)||!("o"!==a[0]&&"O"!==a[0]||"n"!==a[1]&&"N"!==a[1]))return!1;if(null===b)return!0;switch(typeof b){case "boolean":return xa.shouldAttributeAcceptBooleanValue(a);case "undefined":case "number":case "string":case "object":return!0;default:return!1}},getPropertyInfo:function(a){return xa.properties.hasOwnProperty(a)?xa.properties[a]:null},shouldAttributeAcceptBooleanValue:function(a){if(xa.isReservedProp(a))return!0;var b=xa.getPropertyInfo(a); 30235Ha);Da.Properties[b]=0;Da.DOMAttributeNames[b]=a});va.injectDOMPropertyConfig(Ba);va.injectDOMPropertyConfig(Da);
32091if(b)return b.hasBooleanValue||b.hasStringBooleanValue||b.hasOverloadedBooleanValue;a=a.toLowerCase().slice(0,5);return"data-"===a||"aria-"===a},isReservedProp:function(a){return ta.hasOwnProperty(a)},injection:wa},A=xa,E={IndeterminateComponent:0,FunctionalComponent:1,ClassComponent:2,HostRoot:3,HostPortal:4,HostComponent:5,HostText:6,CoroutineComponent:7,CoroutineHandlerPhase:8,YieldComponent:9,Fragment:10},F={ELEMENT_NODE:1,TEXT_NODE:3,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_FRAGMENT_NODE:11}, 30236var N={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,injection:{injectErrorUtils:function(a){"function"!==typeof a.invokeGuardedCallback?D("197"):void 0;Ia=a.invokeGuardedCallback}},invokeGuardedCallback:function(a,b,c,d,e,f,g,k,h){Ia.apply(N,arguments)},invokeGuardedCallbackAndCatchFirstError:function(a,b,c,d,e,f,g,k,h){N.invokeGuardedCallback.apply(this,arguments);if(N.hasCaughtError()){var r=N.clearCaughtError();N._hasRethrowError||(N._hasRethrowError=!0,N._rethrowError=
32092ya=E.HostComponent,za=E.HostText,Aa=F.ELEMENT_NODE,Ba=F.COMMENT_NODE,Ea=A.ID_ATTRIBUTE_NAME,Fa={hasCachedChildNodes:1},Ga=Math.random().toString(36).slice(2),Ha="__reactInternalInstance$"+Ga,Ia="__reactEventHandlers$"+Ga;function La(a){for(var b;b=a._renderedComponent;)a=b;return a}function Ma(a,b){a=La(a);a._hostNode=b;b[Ha]=a} 30237r)}},rethrowCaughtError:function(){return Ja.apply(N,arguments)},hasCaughtError:function(){return N._hasCaughtError},clearCaughtError:function(){if(N._hasCaughtError){var a=N._caughtError;N._caughtError=null;N._hasCaughtError=!1;return a}D("198")}};function Ia(a,b,c,d,e,f,g,k,h){N._hasCaughtError=!1;N._caughtError=null;var r=Array.prototype.slice.call(arguments,3);try{b.apply(c,r)}catch(n){N._caughtError=n,N._hasCaughtError=!0}}
32093function Na(a,b){if(!(a._flags&Fa.hasCachedChildNodes)){var c=a._renderedChildren;b=b.firstChild;var d;a:for(d in c)if(c.hasOwnProperty(d)){var e=c[d],f=La(e)._domID;if(0!==f){for(;null!==b;b=b.nextSibling){var g=b,h=f;if(g.nodeType===Aa&&g.getAttribute(Ea)===""+h||g.nodeType===Ba&&g.nodeValue===" react-text: "+h+" "||g.nodeType===Ba&&g.nodeValue===" react-empty: "+h+" "){Ma(e,b);continue a}}w("32",f)}}a._flags|=Fa.hasCachedChildNodes}} 30238function Ja(){if(N._hasRethrowError){var a=N._rethrowError;N._rethrowError=null;N._hasRethrowError=!1;throw a;}}var Ka=null,La={};
32094function Oa(a){if(a[Ha])return a[Ha];for(var b=[];!a[Ha];)if(b.push(a),a.parentNode)a=a.parentNode;else return null;var c=a[Ha];if(c.tag===ya||c.tag===za)return c;for(;a&&(c=a[Ha]);a=b.pop()){var d=c;b.length&&Na(c,a)}return d} 30239function Ma(){if(Ka)for(var a in La){var b=La[a],c=Ka.indexOf(a);-1<c?void 0:D("96",a);if(!Na[c]){b.extractEvents?void 0:D("97",a);Na[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,k=d;Oa.hasOwnProperty(k)?D("99",k):void 0;Oa[k]=f;var h=f.phasedRegistrationNames;if(h){for(e in h)h.hasOwnProperty(e)&&Pa(h[e],g,k);e=!0}else f.registrationName?(Pa(f.registrationName,g,k),e=!0):e=!1;e?void 0:D("98",d,a)}}}}
32095var G={getClosestInstanceFromNode:Oa,getInstanceFromNode:function(a){var b=a[Ha];if(b)return b.tag===ya||b.tag===za?b:b._hostNode===a?b:null;b=Oa(a);return null!=b&&b._hostNode===a?b:null},getNodeFromInstance:function(a){if(a.tag===ya||a.tag===za)return a.stateNode;void 0===a._hostNode?w("33"):void 0;if(a._hostNode)return a._hostNode;for(var b=[];!a._hostNode;)b.push(a),a._hostParent?void 0:w("34"),a=a._hostParent;for(;b.length;a=b.pop())Na(a,a._hostNode);return a._hostNode},precacheChildNodes:Na, 30240function Pa(a,b,c){Qa[a]?D("100",a):void 0;Qa[a]=b;Ra[a]=b.eventTypes[c].dependencies}var Na=[],Oa={},Qa={},Ra={};function Sa(a){Ka?D("101"):void 0;Ka=Array.prototype.slice.call(a);Ma()}function Ta(a){var b=!1,c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];La.hasOwnProperty(c)&&La[c]===d||(La[c]?D("102",c):void 0,La[c]=d,b=!0)}b&&Ma()}
32096precacheNode:Ma,uncacheNode:function(a){var b=a._hostNode;b&&(delete b[Ha],a._hostNode=null)},precacheFiberNode:function(a,b){b[Ha]=a},getFiberCurrentPropsFromNode:function(a){return a[Ia]||null},updateFiberProps:function(a,b){a[Ia]=b}},Pa={remove:function(a){a._reactInternalFiber=void 0},get:function(a){return a._reactInternalFiber},has:function(a){return void 0!==a._reactInternalFiber},set:function(a,b){a._reactInternalFiber=b}},Qa={ReactCurrentOwner:aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner}; 30241var Ua=Object.freeze({plugins:Na,eventNameDispatchConfigs:Oa,registrationNameModules:Qa,registrationNameDependencies:Ra,possibleRegistrationNames:null,injectEventPluginOrder:Sa,injectEventPluginsByName:Ta}),Va=null,Wa=null,Xa=null;function Ya(a,b,c,d){b=a.type||"unknown-event";a.currentTarget=Xa(d);N.invokeGuardedCallbackAndCatchFirstError(b,c,void 0,a);a.currentTarget=null}
32097function Ra(a){if("function"===typeof a.getName)return a.getName();if("number"===typeof a.tag){a=a.type;if("string"===typeof a)return a;if("function"===typeof a)return a.displayName||a.name}return null}var J={NoEffect:0,PerformedWork:1,Placement:2,Update:4,PlacementAndUpdate:6,Deletion:8,ContentReset:16,Callback:32,Err:64,Ref:128},Sa=E.HostComponent,Ta=E.HostRoot,Ua=E.HostPortal,Va=E.HostText,Wa=J.NoEffect,Xa=J.Placement; 30242function Za(a,b){null==b?D("30"):void 0;if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function $a(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}var ab=null;
32098function Za(a){var b=a;if(a.alternate)for(;b["return"];)b=b["return"];else{if((b.effectTag&Xa)!==Wa)return 1;for(;b["return"];)if(b=b["return"],(b.effectTag&Xa)!==Wa)return 1}return b.tag===Ta?2:3}function $a(a){2!==Za(a)?w("188"):void 0} 30243function bb(a,b){if(a){var c=a._dispatchListeners,d=a._dispatchInstances;if(Array.isArray(c))for(var e=0;e<c.length&&!a.isPropagationStopped();e++)Ya(a,b,c[e],d[e]);else c&&Ya(a,b,c,d);a._dispatchListeners=null;a._dispatchInstances=null;a.isPersistent()||a.constructor.release(a)}}function cb(a){return bb(a,!0)}function db(a){return bb(a,!1)}var ib={injectEventPluginOrder:Sa,injectEventPluginsByName:Ta};
32099function ab(a){var b=a.alternate;if(!b)return b=Za(a),3===b?w("188"):void 0,1===b?null:a;for(var c=a,d=b;;){var e=c["return"],f=e?e.alternate:null;if(!e||!f)break;if(e.child===f.child){for(var g=e.child;g;){if(g===c)return $a(e),a;if(g===d)return $a(e),b;g=g.sibling}w("188")}if(c["return"]!==d["return"])c=e,d=f;else{g=!1;for(var h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}g? 30244function jb(a,b){var c=a.stateNode;if(!c)return null;var d=Va(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;c&&"function"!==typeof c?D("231",b,typeof c):void 0;
32100void 0:w("189")}}c.alternate!==d?w("190"):void 0}c.tag!==Ta?w("188"):void 0;return c.stateNode.current===c?a:b} 30245return c}function kb(a,b,c,d){for(var e,f=0;f<Na.length;f++){var g=Na[f];g&&(g=g.extractEvents(a,b,c,d))&&(e=Za(e,g))}return e}function lb(a){a&&(ab=Za(ab,a))}function mb(a){var b=ab;ab=null;a?$a(b,cb):$a(b,db);ab?D("95"):void 0;N.rethrowCaughtError()}var nb=Object.freeze({injection:ib,getListener:jb,extractEvents:kb,enqueueEvents:lb,processEventQueue:mb}),ob=Math.random().toString(36).slice(2),O="__reactInternalInstance$"+ob,pb="__reactEventHandlers$"+ob;
32101var bb={isFiberMounted:function(a){return 2===Za(a)},isMounted:function(a){return(a=Pa.get(a))?2===Za(a):!1},findCurrentFiberUsingSlowPath:ab,findCurrentHostFiber:function(a){a=ab(a);if(!a)return null;for(var b=a;;){if(b.tag===Sa||b.tag===Va)return b;if(b.child)b.child["return"]=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b["return"]||b["return"]===a)return null;b=b["return"]}b.sibling["return"]=b["return"];b=b.sibling}}return null},findCurrentHostFiberWithNoPortals:function(a){a=ab(a); 30246function qb(a){if(a[O])return a[O];for(var b=[];!a[O];)if(b.push(a),a.parentNode)a=a.parentNode;else return null;var c=void 0,d=a[O];if(5===d.tag||6===d.tag)return d;for(;a&&(d=a[O]);a=b.pop())c=d;return c}function rb(a){if(5===a.tag||6===a.tag)return a.stateNode;D("33")}function sb(a){return a[pb]||null}
32102if(!a)return null;for(var b=a;;){if(b.tag===Sa||b.tag===Va)return b;if(b.child&&b.tag!==Ua)b.child["return"]=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b["return"]||b["return"]===a)return null;b=b["return"]}b.sibling["return"]=b["return"];b=b.sibling}}return null}},K={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,injection:{injectErrorUtils:function(a){"function"!==typeof a.invokeGuardedCallback?w("197"):void 0;cb=a.invokeGuardedCallback}},invokeGuardedCallback:function(a, 30247var tb=Object.freeze({precacheFiberNode:function(a,b){b[O]=a},getClosestInstanceFromNode:qb,getInstanceFromNode:function(a){a=a[O];return!a||5!==a.tag&&6!==a.tag?null:a},getNodeFromInstance:rb,getFiberCurrentPropsFromNode:sb,updateFiberProps:function(a,b){a[pb]=b}});function Q(a){do a=a["return"];while(a&&5!==a.tag);return a?a:null}function ub(a,b,c){for(var d=[];a;)d.push(a),a=Q(a);for(a=d.length;0<a--;)b(d[a],"captured",c);for(a=0;a<d.length;a++)b(d[a],"bubbled",c)}
32103b,c,d,e,f,g,h,k){cb.apply(K,arguments)},invokeGuardedCallbackAndCatchFirstError:function(a,b,c,d,e,f,g,h,k){K.invokeGuardedCallback.apply(this,arguments);if(K.hasCaughtError()){var p=K.clearCaughtError();K._hasRethrowError||(K._hasRethrowError=!0,K._rethrowError=p)}},rethrowCaughtError:function(){return db.apply(K,arguments)},hasCaughtError:function(){return K._hasCaughtError},clearCaughtError:function(){if(K._hasCaughtError){var a=K._caughtError;K._caughtError=null;K._hasCaughtError=!1;return a}w("198")}}; 30248function vb(a,b,c){if(b=jb(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=Za(c._dispatchListeners,b),c._dispatchInstances=Za(c._dispatchInstances,a)}function wb(a){a&&a.dispatchConfig.phasedRegistrationNames&&ub(a._targetInst,vb,a)}function xb(a){if(a&&a.dispatchConfig.phasedRegistrationNames){var b=a._targetInst;b=b?Q(b):null;ub(b,vb,a)}}
32104function cb(a,b,c,d,e,f,g,h,k){K._hasCaughtError=!1;K._caughtError=null;var p=Array.prototype.slice.call(arguments,3);try{b.apply(c,p)}catch(x){K._caughtError=x,K._hasCaughtError=!0}}function db(){if(K._hasRethrowError){var a=K._rethrowError;K._rethrowError=null;K._hasRethrowError=!1;throw a;}}var eb=K,fb;function gb(a,b,c,d){b=a.type||"unknown-event";a.currentTarget=hb.getNodeFromInstance(d);eb.invokeGuardedCallbackAndCatchFirstError(b,c,void 0,a);a.currentTarget=null} 30249function yb(a,b,c){a&&c&&c.dispatchConfig.registrationName&&(b=jb(a,c.dispatchConfig.registrationName))&&(c._dispatchListeners=Za(c._dispatchListeners,b),c._dispatchInstances=Za(c._dispatchInstances,a))}function zb(a){a&&a.dispatchConfig.registrationName&&yb(a._targetInst,null,a)}function Ab(a){$a(a,wb)}
32105var hb={isEndish:function(a){return"topMouseUp"===a||"topTouchEnd"===a||"topTouchCancel"===a},isMoveish:function(a){return"topMouseMove"===a||"topTouchMove"===a},isStartish:function(a){return"topMouseDown"===a||"topTouchStart"===a},executeDirectDispatch:function(a){var b=a._dispatchListeners,c=a._dispatchInstances;Array.isArray(b)?w("103"):void 0;a.currentTarget=b?hb.getNodeFromInstance(c):null;b=b?b(a):null;a.currentTarget=null;a._dispatchListeners=null;a._dispatchInstances=null;return b},executeDispatchesInOrder:function(a, 30250function Bb(a,b,c,d){if(c&&d)a:{var e=c;for(var f=d,g=0,k=e;k;k=Q(k))g++;k=0;for(var h=f;h;h=Q(h))k++;for(;0<g-k;)e=Q(e),g--;for(;0<k-g;)f=Q(f),k--;for(;g--;){if(e===f||e===f.alternate)break a;e=Q(e);f=Q(f)}e=null}else e=null;f=e;for(e=[];c&&c!==f;){g=c.alternate;if(null!==g&&g===f)break;e.push(c);c=Q(c)}for(c=[];d&&d!==f;){g=d.alternate;if(null!==g&&g===f)break;c.push(d);d=Q(d)}for(d=0;d<e.length;d++)yb(e[d],"bubbled",a);for(a=c.length;0<a--;)yb(c[a],"captured",b)}
32106b){var c=a._dispatchListeners,d=a._dispatchInstances;if(Array.isArray(c))for(var e=0;e<c.length&&!a.isPropagationStopped();e++)gb(a,b,c[e],d[e]);else c&&gb(a,b,c,d);a._dispatchListeners=null;a._dispatchInstances=null},executeDispatchesInOrderStopAtTrue:function(a){a:{var b=a._dispatchListeners;var c=a._dispatchInstances;if(Array.isArray(b))for(var d=0;d<b.length&&!a.isPropagationStopped();d++){if(b[d](a,c[d])){b=c[d];break a}}else if(b&&b(a,c)){b=c;break a}b=null}a._dispatchInstances=null;a._dispatchListeners= 30251var Cb=Object.freeze({accumulateTwoPhaseDispatches:Ab,accumulateTwoPhaseDispatchesSkipTarget:function(a){$a(a,xb)},accumulateEnterLeaveDispatches:Bb,accumulateDirectDispatches:function(a){$a(a,zb)}}),Db=null;function Eb(){!Db&&m.canUseDOM&&(Db="textContent"in document.documentElement?"textContent":"innerText");return Db}var R={_root:null,_startText:null,_fallbackText:null};
32107null;return b},hasDispatches:function(a){return!!a._dispatchListeners},getFiberCurrentPropsFromNode:function(a){return fb.getFiberCurrentPropsFromNode(a)},getInstanceFromNode:function(a){return fb.getInstanceFromNode(a)},getNodeFromInstance:function(a){return fb.getNodeFromInstance(a)},injection:{injectComponentTree:function(a){fb=a}}},ib=hb,jb=null,kb=null,lb=null; 30252function Fb(){if(R._fallbackText)return R._fallbackText;var a,b=R._startText,c=b.length,d,e=Gb(),f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);R._fallbackText=e.slice(a,1<d?1-d:void 0);return R._fallbackText}function Gb(){return"value"in R._root?R._root.value:R._root[Eb()]}
32108function mb(a){if(a=ib.getInstanceFromNode(a))if("number"===typeof a.tag){jb&&"function"===typeof jb.restoreControlledState?void 0:w("194");var b=ib.getFiberCurrentPropsFromNode(a.stateNode);jb.restoreControlledState(a.stateNode,a.type,b)}else"function"!==typeof a.restoreControlledState?w("195"):void 0,a.restoreControlledState()} 30253var Hb="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),Ib={type:null,target:null,currentTarget:B.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};
32109var nb={injection:{injectFiberControlledHostComponent:function(a){jb=a}},enqueueStateRestore:function(a){kb?lb?lb.push(a):lb=[a]:kb=a},restoreStateIfNeeded:function(){if(kb){var a=kb,b=lb;lb=kb=null;mb(a);if(b)for(a=0;a<b.length;a++)mb(b[a])}}};function ob(a,b,c,d,e,f){return a(b,c,d,e,f)}function pb(a,b){return a(b)}function qb(a,b){return pb(a,b)} 30254function S(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=d:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?B.thatReturnsTrue:B.thatReturnsFalse;this.isPropagationStopped=B.thatReturnsFalse;return this}
32110var rb=!1,sb={batchedUpdates:function(a,b){if(rb)return ob(qb,a,b);rb=!0;try{return ob(qb,a,b)}finally{rb=!1,nb.restoreStateIfNeeded()}},injection:{injectStackBatchedUpdates:function(a){ob=a},injectFiberBatchedUpdates:function(a){pb=a}}},tb=F.TEXT_NODE;function ub(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return a.nodeType===tb?a.parentNode:a}var vb=E.HostRoot,wb=[]; 30255A(S.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=B.thatReturnsTrue)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=B.thatReturnsTrue)},persist:function(){this.isPersistent=B.thatReturnsTrue},isPersistent:B.thatReturnsFalse,
32111function xb(a){var b=a.targetInst;do{if(!b){a.ancestors.push(b);break}var c=b;if("number"===typeof c.tag){for(;c["return"];)c=c["return"];c=c.tag!==vb?null:c.stateNode.containerInfo}else{for(;c._hostParent;)c=c._hostParent;c=G.getNodeFromInstance(c).parentNode}if(!c)break;a.ancestors.push(b);b=G.getClosestInstanceFromNode(c)}while(b);for(c=0;c<a.ancestors.length;c++)b=a.ancestors[c],yb._handleTopLevel(a.topLevelType,b,a.nativeEvent,ub(a.nativeEvent))} 30256destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;for(a=0;a<Hb.length;a++)this[Hb[a]]=null}});S.Interface=Ib;S.augmentClass=function(a,b){function c(){}c.prototype=this.prototype;var d=new c;A(d,a.prototype);a.prototype=d;a.prototype.constructor=a;a.Interface=A({},this.Interface,b);a.augmentClass=this.augmentClass;Jb(a)};Jb(S);function Qb(a,b,c,d){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,a,b,c,d);return e}return new this(a,b,c,d)}
32112var yb={_enabled:!0,_handleTopLevel:null,setHandleTopLevel:function(a){yb._handleTopLevel=a},setEnabled:function(a){yb._enabled=!!a},isEnabled:function(){return yb._enabled},trapBubbledEvent:function(a,b,c){return c?ba.listen(c,b,yb.dispatchEvent.bind(null,a)):null},trapCapturedEvent:function(a,b,c){return c?ba.capture(c,b,yb.dispatchEvent.bind(null,a)):null},dispatchEvent:function(a,b){if(yb._enabled){var c=ub(b);c=G.getClosestInstanceFromNode(c);null===c||"number"!==typeof c.tag||bb.isFiberMounted(c)|| 30257function Rb(a){a instanceof this?void 0:D("223");a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function Jb(a){a.eventPool=[];a.getPooled=Qb;a.release=Rb}function Sb(a,b,c,d){return S.call(this,a,b,c,d)}S.augmentClass(Sb,{data:null});function Tb(a,b,c,d){return S.call(this,a,b,c,d)}S.augmentClass(Tb,{data:null});var Ub=[9,13,27,32],Vb=m.canUseDOM&&"CompositionEvent"in window,Wb=null;m.canUseDOM&&"documentMode"in document&&(Wb=document.documentMode);var Xb;
32113(c=null);if(wb.length){var d=wb.pop();d.topLevelType=a;d.nativeEvent=b;d.targetInst=c;a=d}else a={topLevelType:a,nativeEvent:b,targetInst:c,ancestors:[]};try{sb.batchedUpdates(xb,a)}finally{a.topLevelType=null,a.nativeEvent=null,a.targetInst=null,a.ancestors.length=0,10>wb.length&&wb.push(a)}}}},L=yb;function Cb(a,b){null==b?w("30"):void 0;if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]} 30258if(Xb=m.canUseDOM&&"TextEvent"in window&&!Wb){var Yb=window.opera;Xb=!("object"===typeof Yb&&"function"===typeof Yb.version&&12>=parseInt(Yb.version(),10))}
32114function Db(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}var Eb=null;function Fb(a,b){a&&(ib.executeDispatchesInOrder(a,b),a.isPersistent()||a.constructor.release(a))}function Gb(a){return Fb(a,!0)}function Hb(a){return Fb(a,!1)} 30259var Zb=Xb,$b=m.canUseDOM&&(!Vb||Wb&&8<Wb&&11>=Wb),ac=String.fromCharCode(32),bc={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",
32115function Ib(a,b,c){switch(a){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":return!(!c.disabled||"button"!==b&&"input"!==b&&"select"!==b&&"textarea"!==b);default:return!1}} 30260captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},cc=!1;
32116var Jb={injection:{injectEventPluginOrder:sa.injectEventPluginOrder,injectEventPluginsByName:sa.injectEventPluginsByName},getListener:function(a,b){if("number"===typeof a.tag){var c=a.stateNode;if(!c)return null;var d=ib.getFiberCurrentPropsFromNode(c);if(!d)return null;c=d[b];if(Ib(b,a.type,d))return null}else{d=a._currentElement;if("string"===typeof d||"number"===typeof d||!a._rootNodeID)return null;a=d.props;c=a[b];if(Ib(b,d.type,a))return null}c&&"function"!==typeof c?w("231",b,typeof c):void 0; 30261function dc(a,b){switch(a){case "topKeyUp":return-1!==Ub.indexOf(b.keyCode);case "topKeyDown":return 229!==b.keyCode;case "topKeyPress":case "topMouseDown":case "topBlur":return!0;default:return!1}}function ec(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var fc=!1;function gc(a,b){switch(a){case "topCompositionEnd":return ec(b);case "topKeyPress":if(32!==b.which)return null;cc=!0;return ac;case "topTextInput":return a=b.data,a===ac&&cc?null:a;default:return null}}
32117return c},extractEvents:function(a,b,c,d){for(var e,f=sa.plugins,g=0;g<f.length;g++){var h=f[g];h&&(h=h.extractEvents(a,b,c,d))&&(e=Cb(e,h))}return e},enqueueEvents:function(a){a&&(Eb=Cb(Eb,a))},processEventQueue:function(a){var b=Eb;Eb=null;a?Db(b,Gb):Db(b,Hb);Eb?w("95"):void 0;eb.rethrowCaughtError()}},Kb;l.canUseDOM&&(Kb=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")); 30262function hc(a,b){if(fc)return"topCompositionEnd"===a||!Vb&&dc(a,b)?(a=Fb(),R._root=null,R._startText=null,R._fallbackText=null,fc=!1,a):null;switch(a){case "topPaste":return null;case "topKeyPress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "topCompositionEnd":return $b?null:b.data;default:return null}}
32118function Lb(a,b){if(!l.canUseDOM||b&&!("addEventListener"in document))return!1;b="on"+a;var c=b in document;c||(c=document.createElement("div"),c.setAttribute(b,"return;"),c="function"===typeof c[b]);!c&&Kb&&"wheel"===a&&(c=document.implementation.hasFeature("Events.wheel","3.0"));return c}function Mb(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;c["ms"+a]="MS"+b;c["O"+a]="o"+b.toLowerCase();return c} 30263var ic={eventTypes:bc,extractEvents:function(a,b,c,d){var e;if(Vb)b:{switch(a){case "topCompositionStart":var f=bc.compositionStart;break b;case "topCompositionEnd":f=bc.compositionEnd;break b;case "topCompositionUpdate":f=bc.compositionUpdate;break b}f=void 0}else fc?dc(a,c)&&(f=bc.compositionEnd):"topKeyDown"===a&&229===c.keyCode&&(f=bc.compositionStart);f?($b&&(fc||f!==bc.compositionStart?f===bc.compositionEnd&&fc&&(e=Fb()):(R._root=d,R._startText=Gb(),fc=!0)),f=Sb.getPooled(f,b,c,d),e?f.data=
32119var Nb={animationend:Mb("Animation","AnimationEnd"),animationiteration:Mb("Animation","AnimationIteration"),animationstart:Mb("Animation","AnimationStart"),transitionend:Mb("Transition","TransitionEnd")},Ob={},Pb={};l.canUseDOM&&(Pb=document.createElement("div").style,"AnimationEvent"in window||(delete Nb.animationend.animation,delete Nb.animationiteration.animation,delete Nb.animationstart.animation),"TransitionEvent"in window||delete Nb.transitionend.transition); 30264e:(e=ec(c),null!==e&&(f.data=e)),Ab(f),e=f):e=null;(a=Zb?gc(a,c):hc(a,c))?(b=Tb.getPooled(bc.beforeInput,b,c,d),b.data=a,Ab(b)):b=null;return[e,b]}},jc=null,kc=null,lc=null;function mc(a){if(a=Wa(a)){jc&&"function"===typeof jc.restoreControlledState?void 0:D("194");var b=Va(a.stateNode);jc.restoreControlledState(a.stateNode,a.type,b)}}var nc={injectFiberControlledHostComponent:function(a){jc=a}};function oc(a){kc?lc?lc.push(a):lc=[a]:kc=a}
32120function Qb(a){if(Ob[a])return Ob[a];if(!Nb[a])return a;var b=Nb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Pb)return Ob[a]=b[c];return""} 30265function pc(){if(kc){var a=kc,b=lc;lc=kc=null;mc(a);if(b)for(a=0;a<b.length;a++)mc(b[a])}}var qc=Object.freeze({injection:nc,enqueueStateRestore:oc,restoreStateIfNeeded:pc});function rc(a,b){return a(b)}var sc=!1;function tc(a,b){if(sc)return rc(a,b);sc=!0;try{return rc(a,b)}finally{sc=!1,pc()}}var uc={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};
32121var Rb={topAbort:"abort",topAnimationEnd:Qb("animationend")||"animationend",topAnimationIteration:Qb("animationiteration")||"animationiteration",topAnimationStart:Qb("animationstart")||"animationstart",topBlur:"blur",topCancel:"cancel",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topClose:"close",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy", 30266function vc(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!uc[a.type]:"textarea"===b?!0:!1}function wc(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var xc;m.canUseDOM&&(xc=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""));
30267function yc(a,b){if(!m.canUseDOM||b&&!("addEventListener"in document))return!1;b="on"+a;var c=b in document;c||(c=document.createElement("div"),c.setAttribute(b,"return;"),c="function"===typeof c[b]);!c&&xc&&"wheel"===a&&(c=document.implementation.hasFeature("Events.wheel","3.0"));return c}function zc(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}
30268function Ac(a){var b=zc(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"function"===typeof c.get&&"function"===typeof c.set)return Object.defineProperty(a,b,{enumerable:c.enumerable,configurable:!0,get:function(){return c.get.call(this)},set:function(a){d=""+a;c.set.call(this,a)}}),{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=null;delete a[b]}}}
30269function Bc(a){a._valueTracker||(a._valueTracker=Ac(a))}function Cc(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=zc(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}var Dc={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}};
30270function Ec(a,b,c){a=S.getPooled(Dc.change,a,b,c);a.type="change";oc(c);Ab(a);return a}var Fc=null,Gc=null;function Hc(a){lb(a);mb(!1)}function Ic(a){var b=rb(a);if(Cc(b))return a}function Jc(a,b){if("topChange"===a)return b}var Qc=!1;m.canUseDOM&&(Qc=yc("input")&&(!document.documentMode||9<document.documentMode));function Rc(){Fc&&(Fc.detachEvent("onpropertychange",Sc),Gc=Fc=null)}function Sc(a){"value"===a.propertyName&&Ic(Gc)&&(a=Ec(Gc,a,wc(a)),tc(Hc,a))}
30271function Tc(a,b,c){"topFocus"===a?(Rc(),Fc=b,Gc=c,Fc.attachEvent("onpropertychange",Sc)):"topBlur"===a&&Rc()}function Uc(a){if("topSelectionChange"===a||"topKeyUp"===a||"topKeyDown"===a)return Ic(Gc)}function Vc(a,b){if("topClick"===a)return Ic(b)}function Wc(a,b){if("topInput"===a||"topChange"===a)return Ic(b)}
30272var Xc={eventTypes:Dc,_isInputEventSupported:Qc,extractEvents:function(a,b,c,d){var e=b?rb(b):window,f=e.nodeName&&e.nodeName.toLowerCase();if("select"===f||"input"===f&&"file"===e.type)var g=Jc;else if(vc(e))if(Qc)g=Wc;else{g=Uc;var k=Tc}else f=e.nodeName,!f||"input"!==f.toLowerCase()||"checkbox"!==e.type&&"radio"!==e.type||(g=Vc);if(g&&(g=g(a,b)))return Ec(g,c,d);k&&k(a,e,b);"topBlur"===a&&null!=b&&(a=b._wrapperState||e._wrapperState)&&a.controlled&&"number"===e.type&&(a=""+e.value,e.getAttribute("value")!==
30273a&&e.setAttribute("value",a))}};function Yc(a,b,c,d){return S.call(this,a,b,c,d)}S.augmentClass(Yc,{view:null,detail:null});var Zc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $c(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Zc[a])?!!b[a]:!1}function ad(){return $c}function bd(a,b,c,d){return S.call(this,a,b,c,d)}
30274Yc.augmentClass(bd,{screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:ad,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)}});
30275var cd={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},dd={eventTypes:cd,extractEvents:function(a,b,c,d){if("topMouseOver"===a&&(c.relatedTarget||c.fromElement)||"topMouseOut"!==a&&"topMouseOver"!==a)return null;var e=d.window===d?d:(e=d.ownerDocument)?e.defaultView||e.parentWindow:window;"topMouseOut"===a?(a=b,b=(b=c.relatedTarget||c.toElement)?qb(b):null):a=null;if(a===
30276b)return null;var f=null==a?e:rb(a);e=null==b?e:rb(b);var g=bd.getPooled(cd.mouseLeave,a,c,d);g.type="mouseleave";g.target=f;g.relatedTarget=e;c=bd.getPooled(cd.mouseEnter,b,c,d);c.type="mouseenter";c.target=e;c.relatedTarget=f;Bb(g,c,a,b);return[g,c]}},ed=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner;function fd(a){a=a.type;return"string"===typeof a?a:"function"===typeof a?a.displayName||a.name:null}
30277function gd(a){var b=a;if(a.alternate)for(;b["return"];)b=b["return"];else{if(0!==(b.effectTag&2))return 1;for(;b["return"];)if(b=b["return"],0!==(b.effectTag&2))return 1}return 3===b.tag?2:3}function hd(a){return(a=a._reactInternalFiber)?2===gd(a):!1}function id(a){2!==gd(a)?D("188"):void 0}
30278function jd(a){var b=a.alternate;if(!b)return b=gd(a),3===b?D("188"):void 0,1===b?null:a;for(var c=a,d=b;;){var e=c["return"],f=e?e.alternate:null;if(!e||!f)break;if(e.child===f.child){for(var g=e.child;g;){if(g===c)return id(e),a;if(g===d)return id(e),b;g=g.sibling}D("188")}if(c["return"]!==d["return"])c=e,d=f;else{g=!1;for(var k=e.child;k;){if(k===c){g=!0;c=e;d=f;break}if(k===d){g=!0;d=e;c=f;break}k=k.sibling}if(!g){for(k=f.child;k;){if(k===c){g=!0;c=f;d=e;break}if(k===d){g=!0;d=f;c=e;break}k=k.sibling}g?
30279void 0:D("189")}}c.alternate!==d?D("190"):void 0}3!==c.tag?D("188"):void 0;return c.stateNode.current===c?a:b}function kd(a){a=jd(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child["return"]=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b["return"]||b["return"]===a)return null;b=b["return"]}b.sibling["return"]=b["return"];b=b.sibling}}return null}
30280function ld(a){a=jd(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child&&4!==b.tag)b.child["return"]=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b["return"]||b["return"]===a)return null;b=b["return"]}b.sibling["return"]=b["return"];b=b.sibling}}return null}var md=[];
30281function nd(a){var b=a.targetInst;do{if(!b){a.ancestors.push(b);break}var c;for(c=b;c["return"];)c=c["return"];c=3!==c.tag?null:c.stateNode.containerInfo;if(!c)break;a.ancestors.push(b);b=qb(c)}while(b);for(c=0;c<a.ancestors.length;c++)b=a.ancestors[c],od(a.topLevelType,b,a.nativeEvent,wc(a.nativeEvent))}var pd=!0,od=void 0;function qd(a){pd=!!a}function U(a,b,c){return c?ca.listen(c,b,rd.bind(null,a)):null}function sd(a,b,c){return c?ca.capture(c,b,rd.bind(null,a)):null}
30282function rd(a,b){if(pd){var c=wc(b);c=qb(c);null===c||"number"!==typeof c.tag||2===gd(c)||(c=null);if(md.length){var d=md.pop();d.topLevelType=a;d.nativeEvent=b;d.targetInst=c;a=d}else a={topLevelType:a,nativeEvent:b,targetInst:c,ancestors:[]};try{tc(nd,a)}finally{a.topLevelType=null,a.nativeEvent=null,a.targetInst=null,a.ancestors.length=0,10>md.length&&md.push(a)}}}
30283var td=Object.freeze({get _enabled(){return pd},get _handleTopLevel(){return od},setHandleTopLevel:function(a){od=a},setEnabled:qd,isEnabled:function(){return pd},trapBubbledEvent:U,trapCapturedEvent:sd,dispatchEvent:rd});function ud(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;c["ms"+a]="MS"+b;c["O"+a]="o"+b.toLowerCase();return c}
30284var vd={animationend:ud("Animation","AnimationEnd"),animationiteration:ud("Animation","AnimationIteration"),animationstart:ud("Animation","AnimationStart"),transitionend:ud("Transition","TransitionEnd")},wd={},xd={};m.canUseDOM&&(xd=document.createElement("div").style,"AnimationEvent"in window||(delete vd.animationend.animation,delete vd.animationiteration.animation,delete vd.animationstart.animation),"TransitionEvent"in window||delete vd.transitionend.transition);
30285function yd(a){if(wd[a])return wd[a];if(!vd[a])return a;var b=vd[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in xd)return wd[a]=b[c];return""}
30286var zd={topAbort:"abort",topAnimationEnd:yd("animationend")||"animationend",topAnimationIteration:yd("animationiteration")||"animationiteration",topAnimationStart:yd("animationstart")||"animationstart",topBlur:"blur",topCancel:"cancel",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topClose:"close",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",
32122topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoad:"load",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart", 30287topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoad:"load",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",
32123topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove", 30288topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",
32124topTouchStart:"touchstart",topTransitionEnd:Qb("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},Sb={},Tb=0,Ub="_reactListenersID"+(""+Math.random()).slice(2);function Vb(a){Object.prototype.hasOwnProperty.call(a,Ub)||(a[Ub]=Tb++,Sb[a[Ub]]={});return Sb[a[Ub]]} 30289topTouchStart:"touchstart",topTransitionEnd:yd("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},Ad={},Bd=0,Cd="_reactListenersID"+(""+Math.random()).slice(2);function Dd(a){Object.prototype.hasOwnProperty.call(a,Cd)||(a[Cd]=Bd++,Ad[a[Cd]]={});return Ad[a[Cd]]}function Ed(a){for(;a&&a.firstChild;)a=a.firstChild;return a}
32125var M=n({},{handleTopLevel:function(a,b,c,d){a=Jb.extractEvents(a,b,c,d);Jb.enqueueEvents(a);Jb.processEventQueue(!1)}},{setEnabled:function(a){L&&L.setEnabled(a)},isEnabled:function(){return!(!L||!L.isEnabled())},listenTo:function(a,b){var c=Vb(b);a=sa.registrationNameDependencies[a];for(var d=0;d<a.length;d++){var e=a[d];c.hasOwnProperty(e)&&c[e]||("topWheel"===e?Lb("wheel")?L.trapBubbledEvent("topWheel","wheel",b):Lb("mousewheel")?L.trapBubbledEvent("topWheel","mousewheel",b):L.trapBubbledEvent("topWheel", 30290function Fd(a,b){var c=Ed(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Ed(c)}}function Gd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&"text"===a.type||"textarea"===b||"true"===a.contentEditable)}
32126"DOMMouseScroll",b):"topScroll"===e?L.trapCapturedEvent("topScroll","scroll",b):"topFocus"===e||"topBlur"===e?(L.trapCapturedEvent("topFocus","focus",b),L.trapCapturedEvent("topBlur","blur",b),c.topBlur=!0,c.topFocus=!0):"topCancel"===e?(Lb("cancel",!0)&&L.trapCapturedEvent("topCancel","cancel",b),c.topCancel=!0):"topClose"===e?(Lb("close",!0)&&L.trapCapturedEvent("topClose","close",b),c.topClose=!0):Rb.hasOwnProperty(e)&&L.trapBubbledEvent(e,Rb[e],b),c[e]=!0)}},isListeningToAllDependencies:function(a, 30291var Hd=m.canUseDOM&&"documentMode"in document&&11>=document.documentMode,Id={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},Jd=null,Kd=null,Ld=null,Md=!1;
32127b){b=Vb(b);a=sa.registrationNameDependencies[a];for(var c=0;c<a.length;c++){var d=a[c];if(!b.hasOwnProperty(d)||!b[d])return!1}return!0},trapBubbledEvent:function(a,b,c){return L.trapBubbledEvent(a,b,c)},trapCapturedEvent:function(a,b,c){return L.trapCapturedEvent(a,b,c)}}),Wb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0, 30292function Nd(a,b){if(Md||null==Jd||Jd!==da())return null;var c=Jd;"selectionStart"in c&&Gd(c)?c={start:c.selectionStart,end:c.selectionEnd}:window.getSelection?(c=window.getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}):c=void 0;return Ld&&ea(Ld,c)?null:(Ld=c,a=S.getPooled(Id.select,Kd,a,b),a.type="select",a.target=Jd,Ab(a),a)}
32128flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Xb=["Webkit","ms","Moz","O"]; 30293var Od={eventTypes:Id,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=Dd(e);f=Ra.onSelect;for(var g=0;g<f.length;g++){var k=f[g];if(!e.hasOwnProperty(k)||!e[k]){e=!1;break a}}e=!0}f=!e}if(f)return null;e=b?rb(b):window;switch(a){case "topFocus":if(vc(e)||"true"===e.contentEditable)Jd=e,Kd=b,Ld=null;break;case "topBlur":Ld=Kd=Jd=null;break;case "topMouseDown":Md=!0;break;case "topContextMenu":case "topMouseUp":return Md=!1,Nd(c,d);case "topSelectionChange":if(Hd)break;
32129Object.keys(Wb).forEach(function(a){Xb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Wb[b]=Wb[a]})}); 30294case "topKeyDown":case "topKeyUp":return Nd(c,d)}return null}};function Pd(a,b,c,d){return S.call(this,a,b,c,d)}S.augmentClass(Pd,{animationName:null,elapsedTime:null,pseudoElement:null});function Qd(a,b,c,d){return S.call(this,a,b,c,d)}S.augmentClass(Qd,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}});function Rd(a,b,c,d){return S.call(this,a,b,c,d)}Yc.augmentClass(Rd,{relatedTarget:null});
32130var Yb={isUnitlessNumber:Wb,shorthandPropertyExpansions:{background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0, 30295function Sd(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;return 32<=a||13===a?a:0}
32131borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}}},Zb=Yb.isUnitlessNumber,$b=!1;if(l.canUseDOM){var ac=document.createElement("div").style;try{ac.font=""}catch(a){$b=!0}} 30296var Td={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ud={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",
32132var bc={createDangerousStringForStyles:function(){},setValueForStyles:function(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--");var e=c;var f=b[c];e=null==f||"boolean"===typeof f||""===f?"":d||"number"!==typeof f||0===f||Zb.hasOwnProperty(e)&&Zb[e]?(""+f).trim():f+"px";"float"===c&&(c="cssFloat");if(d)a.setProperty(c,e);else if(e)a[c]=e;else if(d=$b&&Yb.shorthandPropertyExpansions[c])for(var g in d)a[g]="";else a[c]=""}}},cc=new RegExp("^["+A.ATTRIBUTE_NAME_START_CHAR+ 30297116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};function Vd(a,b,c,d){return S.call(this,a,b,c,d)}
32133"]["+A.ATTRIBUTE_NAME_CHAR+"]*$"),dc={},ec={};function fc(a){if(ec.hasOwnProperty(a))return!0;if(dc.hasOwnProperty(a))return!1;if(cc.test(a))return ec[a]=!0;dc[a]=!0;return!1} 30298Yc.augmentClass(Vd,{key:function(a){if(a.key){var b=Td[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=Sd(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Ud[a.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:ad,charCode:function(a){return"keypress"===a.type?Sd(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===
32134var gc={setAttributeForID:function(a,b){a.setAttribute(A.ID_ATTRIBUTE_NAME,b)},setAttributeForRoot:function(a){a.setAttribute(A.ROOT_ATTRIBUTE_NAME,"")},getValueForProperty:function(){},getValueForAttribute:function(){},setValueForProperty:function(a,b,c){var d=A.getPropertyInfo(b);if(d&&A.shouldSetAttribute(b,c)){var e=d.mutationMethod;e?e(a,c):null==c||d.hasBooleanValue&&!c||d.hasNumericValue&&isNaN(c)||d.hasPositiveNumericValue&&1>c||d.hasOverloadedBooleanValue&&!1===c?gc.deleteValueForProperty(a, 30299a.type?Sd(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}});function Wd(a,b,c,d){return S.call(this,a,b,c,d)}bd.augmentClass(Wd,{dataTransfer:null});function Xd(a,b,c,d){return S.call(this,a,b,c,d)}Yc.augmentClass(Xd,{touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:ad});function Yd(a,b,c,d){return S.call(this,a,b,c,d)}S.augmentClass(Yd,{propertyName:null,elapsedTime:null,pseudoElement:null});
32135b):d.mustUseProperty?a[d.propertyName]=c:(b=d.attributeName,(e=d.attributeNamespace)?a.setAttributeNS(e,b,""+c):d.hasBooleanValue||d.hasOverloadedBooleanValue&&!0===c?a.setAttribute(b,""):a.setAttribute(b,""+c))}else gc.setValueForAttribute(a,b,A.shouldSetAttribute(b,c)?c:null)},setValueForAttribute:function(a,b,c){fc(b)&&(null==c?a.removeAttribute(b):a.setAttribute(b,""+c))},deleteValueForAttribute:function(a,b){a.removeAttribute(b)},deleteValueForProperty:function(a,b){var c=A.getPropertyInfo(b); 30300function Zd(a,b,c,d){return S.call(this,a,b,c,d)}bd.augmentClass(Zd,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null});var $d={},ae={};
32136c?(b=c.mutationMethod)?b(a,void 0):c.mustUseProperty?a[c.propertyName]=c.hasBooleanValue?!1:"":a.removeAttribute(c.attributeName):a.removeAttribute(b)}},hc=gc,ic=Qa.ReactDebugCurrentFrame;function jc(){return null}
32137var kc={current:null,phase:null,resetCurrentFiber:function(){ic.getCurrentStack=null;kc.current=null;kc.phase=null},setCurrentFiber:function(a,b){ic.getCurrentStack=jc;kc.current=a;kc.phase=b},getCurrentFiberOwnerName:function(){return null},getCurrentFiberStackAddendum:jc},lc=kc,mc={getHostProps:function(a,b){var c=b.value,d=b.checked;return n({type:void 0,step:void 0,min:void 0,max:void 0},b,{defaultChecked:void 0,defaultValue:void 0,value:null!=c?c:a._wrapperState.initialValue,checked:null!=d?
32138d:a._wrapperState.initialChecked})},initWrapperState:function(a,b){var c=b.defaultValue;a._wrapperState={initialChecked:null!=b.checked?b.checked:b.defaultChecked,initialValue:null!=b.value?b.value:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}},updateWrapper:function(a,b){var c=b.checked;null!=c&&hc.setValueForProperty(a,"checked",c||!1);c=b.value;if(null!=c)if(0===c&&""===a.value)a.value="0";else if("number"===b.type){if(b=parseFloat(a.value)||0,c!=b||c==b&&a.value!=
32139c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else null==b.value&&null!=b.defaultValue&&a.defaultValue!==""+b.defaultValue&&(a.defaultValue=""+b.defaultValue),null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)},postMountWrapper:function(a,b){switch(b.type){case "submit":case "reset":break;case "color":case "date":case "datetime":case "datetime-local":case "month":case "time":case "week":a.value="";a.value=a.defaultValue;break;default:a.value=a.value}b=a.name;""!==
32140b&&(a.name="");a.defaultChecked=!a.defaultChecked;a.defaultChecked=!a.defaultChecked;""!==b&&(a.name=b)},restoreControlledState:function(a,b){mc.updateWrapper(a,b);var c=b.name;if("radio"===b.type&&null!=c){for(b=a;b.parentNode;)b=b.parentNode;c=b.querySelectorAll("input[name\x3d"+JSON.stringify(""+c)+'][type\x3d"radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=G.getFiberCurrentPropsFromNode(d);e?void 0:w("90");mc.updateWrapper(d,e)}}}}},qc=mc;
32141function rc(a){var b="";aa.Children.forEach(a,function(a){null==a||"string"!==typeof a&&"number"!==typeof a||(b+=a)});return b}var sc={validateProps:function(){},postMountWrapper:function(a,b){null!=b.value&&a.setAttribute("value",b.value)},getHostProps:function(a,b){a=n({children:void 0},b);if(b=rc(b.children))a.children=b;return a}};
32142function tc(a,b,c){a=a.options;if(b){b={};for(var d=0;d<c.length;d++)b["$"+c[d]]=!0;for(c=0;c<a.length;c++)d=b.hasOwnProperty("$"+a[c].value),a[c].selected!==d&&(a[c].selected=d)}else{c=""+c;b=null;for(d=0;d<a.length;d++){if(a[d].value===c){a[d].selected=!0;return}null!==b||a[d].disabled||(b=a[d])}null!==b&&(b.selected=!0)}}
32143var uc={getHostProps:function(a,b){return n({},b,{value:void 0})},initWrapperState:function(a,b){var c=b.value;a._wrapperState={initialValue:null!=c?c:b.defaultValue,wasMultiple:!!b.multiple}},postMountWrapper:function(a,b){a.multiple=!!b.multiple;var c=b.value;null!=c?tc(a,!!b.multiple,c):null!=b.defaultValue&&tc(a,!!b.multiple,b.defaultValue)},postUpdateWrapper:function(a,b){a._wrapperState.initialValue=void 0;var c=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!b.multiple;var d=b.value;
32144null!=d?tc(a,!!b.multiple,d):c!==!!b.multiple&&(null!=b.defaultValue?tc(a,!!b.multiple,b.defaultValue):tc(a,!!b.multiple,b.multiple?[]:""))},restoreControlledState:function(a,b){var c=b.value;null!=c&&tc(a,!!b.multiple,c)}},vc={getHostProps:function(a,b){null!=b.dangerouslySetInnerHTML?w("91"):void 0;return n({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})},initWrapperState:function(a,b){var c=b.value,d=c;null==c&&(c=b.defaultValue,b=b.children,null!=b&&(null!=c?
32145w("92"):void 0,Array.isArray(b)&&(1>=b.length?void 0:w("93"),b=b[0]),c=""+b),null==c&&(c=""),d=c);a._wrapperState={initialValue:""+d}},updateWrapper:function(a,b){var c=b.value;null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&(a.defaultValue=c));null!=b.defaultValue&&(a.defaultValue=b.defaultValue)},postMountWrapper:function(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)},restoreControlledState:function(a,b){vc.updateWrapper(a,b)}},wc=vc,xc=n({menuitem:!0},{area:!0,
32146base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function yc(a,b){b&&(xc[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?w("137",a,""):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?w("60"):void 0,"object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML?void 0:w("61")),null!=b.style&&"object"!==typeof b.style?w("62",""):void 0)}
32147function zc(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}
32148function Ac(a){var b=zc(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"function"===typeof c.get&&"function"===typeof c.set)return Object.defineProperty(a,b,{enumerable:c.enumerable,configurable:!0,get:function(){return c.get.call(this)},set:function(a){d=""+a;c.set.call(this,a)}}),{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=null;delete a[b]}}}
32149var Bc={_getTrackerFromNode:function(a){return a._valueTracker},track:function(a){a._valueTracker||(a._valueTracker=Ac(a))},updateValueIfChanged:function(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=zc(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1},stopTracking:function(a){(a=a._valueTracker)&&a.stopTracking()}};
32150function Cc(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}
32151var Dc=ka.Namespaces,Ec,Fc=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Dc.svg||"innerHTML"in a)a.innerHTML=b;else for(Ec=Ec||document.createElement("div"),Ec.innerHTML="\x3csvg\x3e"+b+"\x3c/svg\x3e",b=Ec.firstChild;b.firstChild;)a.appendChild(b.firstChild)}),Gc=/["'&<>]/,Hc=F.TEXT_NODE;
32152function Ic(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&c.nodeType===Hc){c.nodeValue=b;return}}a.textContent=b}
32153l.canUseDOM&&("textContent"in document.documentElement||(Ic=function(a,b){if(a.nodeType===Hc)a.nodeValue=b;else{if("boolean"===typeof b||"number"===typeof b)b=""+b;else{b=""+b;var c=Gc.exec(b);if(c){var d="",e,f=0;for(e=c.index;e<b.length;e++){switch(b.charCodeAt(e)){case 34:c="\x26quot;";break;case 38:c="\x26amp;";break;case 39:c="\x26#x27;";break;case 60:c="\x26lt;";break;case 62:c="\x26gt;";break;default:continue}f!==e&&(d+=b.substring(f,e));f=e+1;d+=c}b=f!==e?d+b.substring(f,e):d}}Fc(a,b)}}));
32154var Jc=Ic,Kc=lc.getCurrentFiberOwnerName,Lc=F.DOCUMENT_NODE,Mc=F.DOCUMENT_FRAGMENT_NODE,Nc=M.listenTo,Oc=sa.registrationNameModules,Pc=ka.Namespaces.html,Qc=ka.getIntrinsicNamespace;function Rc(a,b){Nc(b,a.nodeType===Lc||a.nodeType===Mc?a:a.ownerDocument)}
32155var Sc={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",
32156topWaiting:"waiting"},N={createElement:function(a,b,c,d){c=c.nodeType===Lc?c:c.ownerDocument;d===Pc&&(d=Qc(a));d===Pc?"script"===a?(a=c.createElement("div"),a.innerHTML="\x3cscript\x3e\x3c/script\x3e",a=a.removeChild(a.firstChild)):a="string"===typeof b.is?c.createElement(a,{is:b.is}):c.createElement(a):a=c.createElementNS(d,a);return a},createTextNode:function(a,b){return(b.nodeType===Lc?b:b.ownerDocument).createTextNode(a)},setInitialProperties:function(a,b,c,d){var e=Cc(b,c);switch(b){case "iframe":case "object":M.trapBubbledEvent("topLoad",
32157"load",a);var f=c;break;case "video":case "audio":for(f in Sc)Sc.hasOwnProperty(f)&&M.trapBubbledEvent(f,Sc[f],a);f=c;break;case "source":M.trapBubbledEvent("topError","error",a);f=c;break;case "img":case "image":M.trapBubbledEvent("topError","error",a);M.trapBubbledEvent("topLoad","load",a);f=c;break;case "form":M.trapBubbledEvent("topReset","reset",a);M.trapBubbledEvent("topSubmit","submit",a);f=c;break;case "details":M.trapBubbledEvent("topToggle","toggle",a);f=c;break;case "input":qc.initWrapperState(a,
32158c);f=qc.getHostProps(a,c);M.trapBubbledEvent("topInvalid","invalid",a);Rc(d,"onChange");break;case "option":sc.validateProps(a,c);f=sc.getHostProps(a,c);break;case "select":uc.initWrapperState(a,c);f=uc.getHostProps(a,c);M.trapBubbledEvent("topInvalid","invalid",a);Rc(d,"onChange");break;case "textarea":wc.initWrapperState(a,c);f=wc.getHostProps(a,c);M.trapBubbledEvent("topInvalid","invalid",a);Rc(d,"onChange");break;default:f=c}yc(b,f,Kc);var g=f,h;for(h in g)if(g.hasOwnProperty(h)){var k=g[h];"style"===
32159h?bc.setValueForStyles(a,k):"dangerouslySetInnerHTML"===h?(k=k?k.__html:void 0,null!=k&&Fc(a,k)):"children"===h?"string"===typeof k?Jc(a,k):"number"===typeof k&&Jc(a,""+k):"suppressContentEditableWarning"!==h&&(Oc.hasOwnProperty(h)?null!=k&&Rc(d,h):e?hc.setValueForAttribute(a,h,k):null!=k&&hc.setValueForProperty(a,h,k))}switch(b){case "input":Bc.track(a);qc.postMountWrapper(a,c);break;case "textarea":Bc.track(a);wc.postMountWrapper(a,c);break;case "option":sc.postMountWrapper(a,c);break;case "select":uc.postMountWrapper(a,
32160c);break;default:"function"===typeof f.onClick&&(a.onclick=ca)}},diffProperties:function(a,b,c,d,e){var f=null;switch(b){case "input":c=qc.getHostProps(a,c);d=qc.getHostProps(a,d);f=[];break;case "option":c=sc.getHostProps(a,c);d=sc.getHostProps(a,d);f=[];break;case "select":c=uc.getHostProps(a,c);d=uc.getHostProps(a,d);f=[];break;case "textarea":c=wc.getHostProps(a,c);d=wc.getHostProps(a,d);f=[];break;default:"function"!==typeof c.onClick&&"function"===typeof d.onClick&&(a.onclick=ca)}yc(b,d,Kc);
32161var g,h;a=null;for(g in c)if(!d.hasOwnProperty(g)&&c.hasOwnProperty(g)&&null!=c[g])if("style"===g)for(h in b=c[g],b)b.hasOwnProperty(h)&&(a||(a={}),a[h]="");else"dangerouslySetInnerHTML"!==g&&"children"!==g&&"suppressContentEditableWarning"!==g&&(Oc.hasOwnProperty(g)?f||(f=[]):(f=f||[]).push(g,null));for(g in d){var k=d[g];b=null!=c?c[g]:void 0;if(d.hasOwnProperty(g)&&k!==b&&(null!=k||null!=b))if("style"===g)if(b){for(h in b)!b.hasOwnProperty(h)||k&&k.hasOwnProperty(h)||(a||(a={}),a[h]="");for(h in k)k.hasOwnProperty(h)&&
32162b[h]!==k[h]&&(a||(a={}),a[h]=k[h])}else a||(f||(f=[]),f.push(g,a)),a=k;else"dangerouslySetInnerHTML"===g?(k=k?k.__html:void 0,b=b?b.__html:void 0,null!=k&&b!==k&&(f=f||[]).push(g,""+k)):"children"===g?b===k||"string"!==typeof k&&"number"!==typeof k||(f=f||[]).push(g,""+k):"suppressContentEditableWarning"!==g&&(Oc.hasOwnProperty(g)?(null!=k&&Rc(e,g),f||b===k||(f=[])):(f=f||[]).push(g,k))}a&&(f=f||[]).push("style",a);return f},updateProperties:function(a,b,c,d,e){Cc(c,d);d=Cc(c,e);for(var f=0;f<b.length;f+=
321632){var g=b[f],h=b[f+1];"style"===g?bc.setValueForStyles(a,h):"dangerouslySetInnerHTML"===g?Fc(a,h):"children"===g?Jc(a,h):d?null!=h?hc.setValueForAttribute(a,g,h):hc.deleteValueForAttribute(a,g):null!=h?hc.setValueForProperty(a,g,h):hc.deleteValueForProperty(a,g)}switch(c){case "input":qc.updateWrapper(a,e);Bc.updateValueIfChanged(a);break;case "textarea":wc.updateWrapper(a,e);break;case "select":uc.postUpdateWrapper(a,e)}},diffHydratedProperties:function(a,b,c,d,e){switch(b){case "iframe":case "object":M.trapBubbledEvent("topLoad",
32164"load",a);break;case "video":case "audio":for(var f in Sc)Sc.hasOwnProperty(f)&&M.trapBubbledEvent(f,Sc[f],a);break;case "source":M.trapBubbledEvent("topError","error",a);break;case "img":case "image":M.trapBubbledEvent("topError","error",a);M.trapBubbledEvent("topLoad","load",a);break;case "form":M.trapBubbledEvent("topReset","reset",a);M.trapBubbledEvent("topSubmit","submit",a);break;case "details":M.trapBubbledEvent("topToggle","toggle",a);break;case "input":qc.initWrapperState(a,c);M.trapBubbledEvent("topInvalid",
32165"invalid",a);Rc(e,"onChange");break;case "option":sc.validateProps(a,c);break;case "select":uc.initWrapperState(a,c);M.trapBubbledEvent("topInvalid","invalid",a);Rc(e,"onChange");break;case "textarea":wc.initWrapperState(a,c),M.trapBubbledEvent("topInvalid","invalid",a),Rc(e,"onChange")}yc(b,c,Kc);d=null;for(var g in c)c.hasOwnProperty(g)&&(f=c[g],"children"===g?"string"===typeof f?a.textContent!==f&&(d=["children",f]):"number"===typeof f&&a.textContent!==""+f&&(d=["children",""+f]):Oc.hasOwnProperty(g)&&
32166null!=f&&Rc(e,g));switch(b){case "input":Bc.track(a);qc.postMountWrapper(a,c);break;case "textarea":Bc.track(a);wc.postMountWrapper(a,c);break;case "select":case "option":break;default:"function"===typeof c.onClick&&(a.onclick=ca)}return d},diffHydratedText:function(a,b){return a.nodeValue!==b},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(a,
32167b,c){switch(b){case "input":qc.restoreControlledState(a,c);break;case "textarea":wc.restoreControlledState(a,c);break;case "select":uc.restoreControlledState(a,c)}}},Tc=void 0;
32168if(l.canUseDOM)if("function"!==typeof requestIdleCallback){var Uc=null,Vc=null,Wc=!1,Xc=!1,Yc=0,Zc=33,$c=33,ad={timeRemaining:"object"===typeof performance&&"function"===typeof performance.now?function(){return Yc-performance.now()}:function(){return Yc-Date.now()}},bd="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(a){a.source===window&&a.data===bd&&(Wc=!1,a=Vc,Vc=null,null!==a&&a(ad))},!1);var cd=function(a){Xc=!1;var b=a-Yc+$c;b<$c&&Zc<$c?(8>
32169b&&(b=8),$c=b<Zc?Zc:b):Zc=b;Yc=a+$c;Wc||(Wc=!0,window.postMessage(bd,"*"));b=Uc;Uc=null;null!==b&&b(a)};Tc=function(a){Vc=a;Xc||(Xc=!0,requestAnimationFrame(cd));return 0}}else Tc=requestIdleCallback;else Tc=function(a){setTimeout(function(){a({timeRemaining:function(){return Infinity}})});return 0};
32170var dd={rIC:Tc},ed={enableAsyncSubtreeAPI:!0},Q={NoWork:0,SynchronousPriority:1,TaskPriority:2,HighPriority:3,LowPriority:4,OffscreenPriority:5},fd=J.Callback,gd=Q.NoWork,hd=Q.SynchronousPriority,id=Q.TaskPriority,jd=E.ClassComponent,kd=E.HostRoot,md=void 0,nd=void 0;function od(a,b){return a!==id&&a!==hd||b!==id&&b!==hd?a===gd&&b!==gd?-255:a!==gd&&b===gd?255:a-b:0}function pd(){return{first:null,last:null,hasForceUpdate:!1,callbackList:null}}
32171function qd(a,b,c,d){null!==c?c.next=b:(b.next=a.first,a.first=b);null!==d?b.next=d:a.last=b}function rd(a,b){b=b.priorityLevel;var c=null;if(null!==a.last&&0>=od(a.last.priorityLevel,b))c=a.last;else for(a=a.first;null!==a&&0>=od(a.priorityLevel,b);)c=a,a=a.next;return c}
32172function sd(a,b){var c=a.alternate,d=a.updateQueue;null===d&&(d=a.updateQueue=pd());null!==c?(a=c.updateQueue,null===a&&(a=c.updateQueue=pd())):a=null;md=d;nd=a!==d?a:null;var e=md;c=nd;var f=rd(e,b),g=null!==f?f.next:e.first;if(null===c)return qd(e,b,f,g),null;d=rd(c,b);a=null!==d?d.next:c.first;qd(e,b,f,g);if(g===a&&null!==g||f===d&&null!==f)return null===d&&(c.first=b),null===a&&(c.last=null),null;b={priorityLevel:b.priorityLevel,partialState:b.partialState,callback:b.callback,isReplace:b.isReplace,
32173isForced:b.isForced,isTopLevelUnmount:b.isTopLevelUnmount,next:null};qd(c,b,d,a);return b}function td(a,b,c,d){a=a.partialState;return"function"===typeof a?a.call(b,c,d):a}
32174var ud={addUpdate:function(a,b,c,d){sd(a,{priorityLevel:d,partialState:b,callback:c,isReplace:!1,isForced:!1,isTopLevelUnmount:!1,next:null})},addReplaceUpdate:function(a,b,c,d){sd(a,{priorityLevel:d,partialState:b,callback:c,isReplace:!0,isForced:!1,isTopLevelUnmount:!1,next:null})},addForceUpdate:function(a,b,c){sd(a,{priorityLevel:c,partialState:null,callback:b,isReplace:!1,isForced:!0,isTopLevelUnmount:!1,next:null})},getUpdatePriority:function(a){var b=a.updateQueue;return null===b||a.tag!==
32175jd&&a.tag!==kd?gd:null!==b.first?b.first.priorityLevel:gd},addTopLevelUpdate:function(a,b,c,d){var e=null===b.element;b={priorityLevel:d,partialState:b,callback:c,isReplace:!1,isForced:!1,isTopLevelUnmount:e,next:null};a=sd(a,b);e&&(e=md,c=nd,null!==e&&null!==b.next&&(b.next=null,e.last=b),null!==c&&null!==a&&null!==a.next&&(a.next=null,c.last=b))},beginUpdateQueue:function(a,b,c,d,e,f,g){null!==a&&a.updateQueue===c&&(c=b.updateQueue={first:c.first,last:c.last,callbackList:null,hasForceUpdate:!1});
32176a=c.callbackList;for(var h=c.hasForceUpdate,k=!0,p=c.first;null!==p&&0>=od(p.priorityLevel,g);){c.first=p.next;null===c.first&&(c.last=null);var x;if(p.isReplace)e=td(p,d,e,f),k=!0;else if(x=td(p,d,e,f))e=k?n({},e,x):n(e,x),k=!1;p.isForced&&(h=!0);null===p.callback||p.isTopLevelUnmount&&null!==p.next||(a=null!==a?a:[],a.push(p.callback),b.effectTag|=fd);p=p.next}c.callbackList=a;c.hasForceUpdate=h;null!==c.first||null!==a||h||(b.updateQueue=null);return e},commitCallbacks:function(a,b,c){a=b.callbackList;
32177if(null!==a)for(b.callbackList=null,b=0;b<a.length;b++){var d=a[b];"function"!==typeof d?w("191",d):void 0;d.call(c)}}},vd=[],wd=-1,xd={createCursor:function(a){return{current:a}},isEmpty:function(){return-1===wd},pop:function(a){0>wd||(a.current=vd[wd],vd[wd]=null,wd--)},push:function(a,b){wd++;vd[wd]=a.current;a.current=b},reset:function(){for(;-1<wd;)vd[wd]=null,wd--}},yd=bb.isFiberMounted,zd=E.ClassComponent,Ad=E.HostRoot,Bd=xd.createCursor,Cd=xd.pop,Dd=xd.push,Ed=Bd(da),Fd=Bd(!1),Ld=da;
32178function Md(a,b,c){a=a.stateNode;a.__reactInternalMemoizedUnmaskedChildContext=b;a.__reactInternalMemoizedMaskedChildContext=c}function Nd(a){return a.tag===zd&&null!=a.type.childContextTypes}function Od(a,b){var c=a.stateNode,d=a.type.childContextTypes;if("function"!==typeof c.getChildContext)return b;c=c.getChildContext();for(var e in c)e in d?void 0:w("108",Ra(a)||"Unknown",e);return n({},b,c)}
32179var R={getUnmaskedContext:function(a){return Nd(a)?Ld:Ed.current},cacheContext:Md,getMaskedContext:function(a,b){var c=a.type.contextTypes;if(!c)return da;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&Md(a,b,e);return e},hasContextChanged:function(){return Fd.current},isContextConsumer:function(a){return a.tag===zd&&null!=a.type.contextTypes},isContextProvider:Nd,popContextProvider:function(a){Nd(a)&&
32180(Cd(Fd,a),Cd(Ed,a))},popTopLevelContextObject:function(a){Cd(Fd,a);Cd(Ed,a)},pushTopLevelContextObject:function(a,b,c){null!=Ed.cursor?w("168"):void 0;Dd(Ed,b,a);Dd(Fd,c,a)},processChildContext:Od,pushContextProvider:function(a){if(!Nd(a))return!1;var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||da;Ld=Ed.current;Dd(Ed,b,a);Dd(Fd,Fd.current,a);return!0},invalidateContextProvider:function(a,b){var c=a.stateNode;c?void 0:w("169");if(b){var d=Od(a,Ld,!0);c.__reactInternalMemoizedMergedChildContext=
32181d;Cd(Fd,a);Cd(Ed,a);Dd(Ed,d,a)}else Cd(Fd,a);Dd(Fd,b,a)},resetContext:function(){Ld=da;Ed.current=da;Fd.current=!1},findCurrentUnmaskedContext:function(a){for(yd(a)&&a.tag===zd?void 0:w("170");a.tag!==Ad;){if(Nd(a))return a.stateNode.__reactInternalMemoizedMergedChildContext;(a=a["return"])?void 0:w("171")}return a.stateNode.context}},Pd={NoContext:0,AsyncUpdates:1},Qd=E.IndeterminateComponent,Rd=E.ClassComponent,Sd=E.HostRoot,Td=E.HostComponent,Ud=E.HostText,Vd=E.HostPortal,Wd=E.CoroutineComponent,
32182Xd=E.YieldComponent,Yd=E.Fragment,Zd=Q.NoWork,$d=Pd.NoContext,ae=J.NoEffect;function be(a,b,c){this.tag=a;this.key=b;this.stateNode=this.type=null;this.sibling=this.child=this["return"]=null;this.index=0;this.memoizedState=this.updateQueue=this.memoizedProps=this.pendingProps=this.ref=null;this.internalContextTag=c;this.effectTag=ae;this.lastEffect=this.firstEffect=this.nextEffect=null;this.pendingWorkPriority=Zd;this.alternate=null}
32183function ce(a,b,c){var d=void 0;"function"===typeof a?(d=a.prototype&&a.prototype.isReactComponent?new be(Rd,b,c):new be(Qd,b,c),d.type=a):"string"===typeof a?(d=new be(Td,b,c),d.type=a):"object"===typeof a&&null!==a&&"number"===typeof a.tag?d=a:w("130",null==a?a:typeof a,"");return d}
32184var de={createWorkInProgress:function(a,b){var c=a.alternate;null===c?(c=new be(a.tag,a.key,a.internalContextTag),c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.effectTag=ae,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.pendingWorkPriority=b;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c},createHostRootFiber:function(){return new be(Sd,null,$d)},
32185createFiberFromElement:function(a,b,c){b=ce(a.type,a.key,b,null);b.pendingProps=a.props;b.pendingWorkPriority=c;return b},createFiberFromFragment:function(a,b,c){b=new be(Yd,null,b);b.pendingProps=a;b.pendingWorkPriority=c;return b},createFiberFromText:function(a,b,c){b=new be(Ud,null,b);b.pendingProps=a;b.pendingWorkPriority=c;return b},createFiberFromElementType:ce,createFiberFromHostInstanceForDeletion:function(){var a=new be(Td,null,$d);a.type="DELETED";return a},createFiberFromCoroutine:function(a,
32186b,c){b=new be(Wd,a.key,b);b.type=a.handler;b.pendingProps=a;b.pendingWorkPriority=c;return b},createFiberFromYield:function(a,b){return new be(Xd,null,b)},createFiberFromPortal:function(a,b,c){b=new be(Vd,a.key,b);b.pendingProps=a.children||[];b.pendingWorkPriority=c;b.stateNode={containerInfo:a.containerInfo,implementation:a.implementation};return b},largerPriority:function(a,b){return a!==Zd&&(b===Zd||b>a)?a:b}},ee=de.createHostRootFiber,fe=E.IndeterminateComponent,ge=E.FunctionalComponent,he=E.ClassComponent,
32187ie=E.HostComponent,je,ke;"function"===typeof Symbol&&Symbol["for"]?(je=Symbol["for"]("react.coroutine"),ke=Symbol["for"]("react.yield")):(je=60104,ke=60105);
32188var le={createCoroutine:function(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:je,key:null==d?null:""+d,children:a,handler:b,props:c}},createYield:function(a){return{$$typeof:ke,value:a}},isCoroutine:function(a){return"object"===typeof a&&null!==a&&a.$$typeof===je},isYield:function(a){return"object"===typeof a&&null!==a&&a.$$typeof===ke},REACT_YIELD_TYPE:ke,REACT_COROUTINE_TYPE:je},me="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.portal")||
3218960106,ne={createPortal:function(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:me,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}},isPortal:function(a){return"object"===typeof a&&null!==a&&a.$$typeof===me},REACT_PORTAL_TYPE:me},oe=le.REACT_COROUTINE_TYPE,pe=le.REACT_YIELD_TYPE,qe=ne.REACT_PORTAL_TYPE,re=de.createWorkInProgress,se=de.createFiberFromElement,te=de.createFiberFromFragment,ue=de.createFiberFromText,ve=de.createFiberFromCoroutine,
32190we=de.createFiberFromYield,xe=de.createFiberFromPortal,ye=Array.isArray,ze=E.FunctionalComponent,Ae=E.ClassComponent,Be=E.HostText,Ce=E.HostPortal,De=E.CoroutineComponent,Ee=E.YieldComponent,Fe=E.Fragment,Ge=J.NoEffect,He=J.Placement,Ie=J.Deletion,Je="function"===typeof Symbol&&Symbol.iterator,Ke="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;
32191function Le(a){if(null===a||"undefined"===typeof a)return null;a=Je&&a[Je]||a["@@iterator"];return"function"===typeof a?a:null}
32192function Me(a,b){var c=b.ref;if(null!==c&&"function"!==typeof c){if(b._owner){b=b._owner;var d=void 0;b&&("number"===typeof b.tag?(b.tag!==Ae?w("110"):void 0,d=b.stateNode):d=b.getPublicInstance());d?void 0:w("147",c);var e=""+c;if(null!==a&&null!==a.ref&&a.ref._stringRef===e)return a.ref;a=function(a){var b=d.refs===da?d.refs={}:d.refs;null===a?delete b[e]:b[e]=a};a._stringRef=e;return a}"string"!==typeof c?w("148"):void 0;b._owner?void 0:w("149",c)}return c}
32193function Ne(a,b){"textarea"!==a.type&&w("31","[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b,"")}
32194function Oe(a,b){function c(c,d){if(b){if(!a){if(null===d.alternate)return;d=d.alternate}var m=c.lastEffect;null!==m?(m.nextEffect=d,c.lastEffect=d):c.firstEffect=c.lastEffect=d;d.nextEffect=null;d.effectTag=Ie}}function d(a,d){if(!b)return null;for(;null!==d;)c(a,d),d=d.sibling;return null}function e(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function f(b,c){if(a)return b=re(b,c),b.index=0,b.sibling=null,b;b.pendingWorkPriority=c;b.effectTag=Ge;
32195b.index=0;b.sibling=null;return b}function g(a,c,d){a.index=d;if(!b)return c;d=a.alternate;if(null!==d)return d=d.index,d<c?(a.effectTag=He,c):d;a.effectTag=He;return c}function h(a){b&&null===a.alternate&&(a.effectTag=He);return a}function k(a,b,c,d){if(null===b||b.tag!==Be)return c=ue(c,a.internalContextTag,d),c["return"]=a,c;b=f(b,d);b.pendingProps=c;b["return"]=a;return b}function p(a,b,c,d){if(null===b||b.type!==c.type)return d=se(c,a.internalContextTag,d),d.ref=Me(b,c),d["return"]=a,d;d=f(b,
32196d);d.ref=Me(b,c);d.pendingProps=c.props;d["return"]=a;return d}function x(a,b,c,d){if(null===b||b.tag!==De)return c=ve(c,a.internalContextTag,d),c["return"]=a,c;b=f(b,d);b.pendingProps=c;b["return"]=a;return b}function S(a,b,c,d){if(null===b||b.tag!==Ee)return b=we(c,a.internalContextTag,d),b.type=c.value,b["return"]=a,b;b=f(b,d);b.type=c.value;b["return"]=a;return b}function D(a,b,c,d){if(null===b||b.tag!==Ce||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return c=
32197xe(c,a.internalContextTag,d),c["return"]=a,c;b=f(b,d);b.pendingProps=c.children||[];b["return"]=a;return b}function y(a,b,c,d){if(null===b||b.tag!==Fe)return c=te(c,a.internalContextTag,d),c["return"]=a,c;b=f(b,d);b.pendingProps=c;b["return"]=a;return b}function B(a,b,c){if("string"===typeof b||"number"===typeof b)return b=ue(""+b,a.internalContextTag,c),b["return"]=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case Ke:return c=se(b,a.internalContextTag,c),c.ref=Me(null,b),c["return"]=
32198a,c;case oe:return b=ve(b,a.internalContextTag,c),b["return"]=a,b;case pe:return c=we(b,a.internalContextTag,c),c.type=b.value,c["return"]=a,c;case qe:return b=xe(b,a.internalContextTag,c),b["return"]=a,b}if(ye(b)||Le(b))return b=te(b,a.internalContextTag,c),b["return"]=a,b;Ne(a,b)}return null}function H(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:k(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case Ke:return c.key===e?p(a,
32199b,c,d):null;case oe:return c.key===e?x(a,b,c,d):null;case pe:return null===e?S(a,b,c,d):null;case qe:return c.key===e?D(a,b,c,d):null}if(ye(c)||Le(c))return null!==e?null:y(a,b,c,d);Ne(a,c)}return null}function C(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=a.get(c)||null,k(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case Ke:return a=a.get(null===d.key?c:d.key)||null,p(b,a,d,e);case oe:return a=a.get(null===d.key?c:d.key)||null,x(b,a,d,e);case pe:return a=a.get(c)||
32200null,S(b,a,d,e);case qe:return a=a.get(null===d.key?c:d.key)||null,D(b,a,d,e)}if(ye(d)||Le(d))return a=a.get(c)||null,y(b,a,d,e);Ne(b,d)}return null}function Ca(a,f,h,k){for(var m=null,t=null,q=f,r=f=0,p=null;null!==q&&r<h.length;r++){q.index>r?(p=q,q=null):p=q.sibling;var v=H(a,q,h[r],k);if(null===v){null===q&&(q=p);break}b&&q&&null===v.alternate&&c(a,q);f=g(v,f,r);null===t?m=v:t.sibling=v;t=v;q=p}if(r===h.length)return d(a,q),m;if(null===q){for(;r<h.length;r++)if(q=B(a,h[r],k))f=g(q,f,r),null===
32201t?m=q:t.sibling=q,t=q;return m}for(q=e(a,q);r<h.length;r++)if(p=C(q,a,r,h[r],k)){if(b&&null!==p.alternate)q["delete"](null===p.key?r:p.key);f=g(p,f,r);null===t?m=p:t.sibling=p;t=p}b&&q.forEach(function(b){return c(a,b)});return m}function r(a,f,h,r){var m=Le(h);"function"!==typeof m?w("150"):void 0;h=m.call(h);null==h?w("151"):void 0;for(var t=m=null,q=f,k=f=0,p=null,v=h.next();null!==q&&!v.done;k++,v=h.next()){q.index>k?(p=q,q=null):p=q.sibling;var V=H(a,q,v.value,r);if(null===V){q||(q=p);break}b&&
32202q&&null===V.alternate&&c(a,q);f=g(V,f,k);null===t?m=V:t.sibling=V;t=V;q=p}if(v.done)return d(a,q),m;if(null===q){for(;!v.done;k++,v=h.next())v=B(a,v.value,r),null!==v&&(f=g(v,f,k),null===t?m=v:t.sibling=v,t=v);return m}for(q=e(a,q);!v.done;k++,v=h.next())if(v=C(q,a,k,v.value,r),null!==v){if(b&&null!==v.alternate)q["delete"](null===v.key?k:v.key);f=g(v,f,k);null===t?m=v:t.sibling=v;t=v}b&&q.forEach(function(b){return c(a,b)});return m}return function(a,b,e,g){var m="object"===typeof e&&null!==e;if(m)switch(e.$$typeof){case Ke:a:{var C=
32203e.key;for(m=b;null!==m;){if(m.key===C)if(m.type===e.type){d(a,m.sibling);b=f(m,g);b.ref=Me(m,e);b.pendingProps=e.props;b["return"]=a;a=b;break a}else{d(a,m);break}else c(a,m);m=m.sibling}g=se(e,a.internalContextTag,g);g.ref=Me(b,e);g["return"]=a;a=g}return h(a);case oe:a:{for(m=e.key;null!==b;){if(b.key===m)if(b.tag===De){d(a,b.sibling);b=f(b,g);b.pendingProps=e;b["return"]=a;a=b;break a}else{d(a,b);break}else c(a,b);b=b.sibling}e=ve(e,a.internalContextTag,g);e["return"]=a;a=e}return h(a);case pe:a:{if(null!==
32204b)if(b.tag===Ee){d(a,b.sibling);b=f(b,g);b.type=e.value;b["return"]=a;a=b;break a}else d(a,b);b=we(e,a.internalContextTag,g);b.type=e.value;b["return"]=a;a=b}return h(a);case qe:a:{for(m=e.key;null!==b;){if(b.key===m)if(b.tag===Ce&&b.stateNode.containerInfo===e.containerInfo&&b.stateNode.implementation===e.implementation){d(a,b.sibling);b=f(b,g);b.pendingProps=e.children||[];b["return"]=a;a=b;break a}else{d(a,b);break}else c(a,b);b=b.sibling}e=xe(e,a.internalContextTag,g);e["return"]=a;a=e}return h(a)}if("string"===
32205typeof e||"number"===typeof e)return e=""+e,null!==b&&b.tag===Be?(d(a,b.sibling),b=f(b,g),b.pendingProps=e,b["return"]=a,a=b):(d(a,b),e=ue(e,a.internalContextTag,g),e["return"]=a,a=e),h(a);if(ye(e))return Ca(a,b,e,g);if(Le(e))return r(a,b,e,g);m&&Ne(a,e);if("undefined"===typeof e)switch(a.tag){case Ae:case ze:e=a.type,w("152",e.displayName||e.name||"Component")}return d(a,b)}}
32206var Pe=Oe(!0,!0),Qe=Oe(!1,!0),Re=Oe(!1,!1),Se={reconcileChildFibers:Pe,reconcileChildFibersInPlace:Qe,mountChildFibersInPlace:Re,cloneChildFibers:function(a,b){null!==a&&b.child!==a.child?w("153"):void 0;if(null!==b.child){a=b.child;var c=re(a,a.pendingWorkPriority);c.pendingProps=a.pendingProps;b.child=c;for(c["return"]=b;null!==a.sibling;)a=a.sibling,c=c.sibling=re(a,a.pendingWorkPriority),c.pendingProps=a.pendingProps,c["return"]=b;c.sibling=null}}},Te=J.Update,Ue=Pd.AsyncUpdates,Ve=R.cacheContext,
32207We=R.getMaskedContext,Xe=R.getUnmaskedContext,Ye=R.isContextConsumer,Ze=ud.addUpdate,$e=ud.addReplaceUpdate,af=ud.addForceUpdate,bf=ud.beginUpdateQueue,cf=R.hasContextChanged,df=bb.isMounted;
32208function ef(a,b,c,d){function e(a,b){b.updater=f;a.stateNode=b;Pa.set(b,a)}var f={isMounted:df,enqueueSetState:function(c,d,e){c=Pa.get(c);var f=b(c,!1);Ze(c,d,void 0===e?null:e,f);a(c,f)},enqueueReplaceState:function(c,d,e){c=Pa.get(c);var f=b(c,!1);$e(c,d,void 0===e?null:e,f);a(c,f)},enqueueForceUpdate:function(c,d){c=Pa.get(c);var e=b(c,!1);af(c,void 0===d?null:d,e);a(c,e)}};return{adoptClassInstance:e,constructClassInstance:function(a,b){var c=a.type,d=Xe(a),f=Ye(a),g=f?We(a,d):da;b=new c(b,g);
32209e(a,b);f&&Ve(a,d,g);return b},mountClassInstance:function(a,b){var c=a.alternate,d=a.stateNode,e=d.state||null,g=a.pendingProps;g?void 0:w("158");var h=Xe(a);d.props=g;d.state=e;d.refs=da;d.context=We(a,h);ed.enableAsyncSubtreeAPI&&null!=a.type&&null!=a.type.prototype&&!0===a.type.prototype.unstable_isAsyncReactComponent&&(a.internalContextTag|=Ue);"function"===typeof d.componentWillMount&&(h=d.state,d.componentWillMount(),h!==d.state&&f.enqueueReplaceState(d,d.state,null),h=a.updateQueue,null!==
32210h&&(d.state=bf(c,a,h,d,e,g,b)));"function"===typeof d.componentDidMount&&(a.effectTag|=Te)},updateClassInstance:function(a,b,e){var g=b.stateNode;g.props=b.memoizedProps;g.state=b.memoizedState;var h=b.memoizedProps,k=b.pendingProps;k||(k=h,null==k?w("159"):void 0);var D=g.context,y=Xe(b);y=We(b,y);"function"!==typeof g.componentWillReceiveProps||h===k&&D===y||(D=g.state,g.componentWillReceiveProps(k,y),g.state!==D&&f.enqueueReplaceState(g,g.state,null));D=b.memoizedState;e=null!==b.updateQueue?bf(a,
32211b,b.updateQueue,g,D,k,e):D;if(!(h!==k||D!==e||cf()||null!==b.updateQueue&&b.updateQueue.hasForceUpdate))return"function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&D===a.memoizedState||(b.effectTag|=Te),!1;var B=k;if(null===h||null!==b.updateQueue&&b.updateQueue.hasForceUpdate)B=!0;else{var H=b.stateNode,C=b.type;B="function"===typeof H.shouldComponentUpdate?H.shouldComponentUpdate(B,e,y):C.prototype&&C.prototype.isPureReactComponent?!ea(h,B)||!ea(D,e):!0}B?("function"===typeof g.componentWillUpdate&&
32212g.componentWillUpdate(k,e,y),"function"===typeof g.componentDidUpdate&&(b.effectTag|=Te)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&D===a.memoizedState||(b.effectTag|=Te),c(b,k),d(b,e));g.props=k;g.state=e;g.context=y;return B}}}
32213var ff=Se.mountChildFibersInPlace,gf=Se.reconcileChildFibers,hf=Se.reconcileChildFibersInPlace,jf=Se.cloneChildFibers,kf=ud.beginUpdateQueue,lf=R.getMaskedContext,mf=R.getUnmaskedContext,nf=R.hasContextChanged,of=R.pushContextProvider,pf=R.pushTopLevelContextObject,qf=R.invalidateContextProvider,rf=E.IndeterminateComponent,sf=E.FunctionalComponent,tf=E.ClassComponent,uf=E.HostRoot,wf=E.HostComponent,xf=E.HostText,yf=E.HostPortal,zf=E.CoroutineComponent,Af=E.CoroutineHandlerPhase,Bf=E.YieldComponent,
32214Cf=E.Fragment,Df=Q.NoWork,Ef=Q.OffscreenPriority,Ff=J.PerformedWork,Gf=J.Placement,Hf=J.ContentReset,If=J.Err,Jf=J.Ref,Kf=Qa.ReactCurrentOwner;
32215function Lf(a,b,c,d,e){function f(a,b,c){g(a,b,c,b.pendingWorkPriority)}function g(a,b,c,d){b.child=null===a?ff(b,b.child,c,d):a.child===b.child?gf(b,b.child,c,d):hf(b,b.child,c,d)}function h(a,b){var c=b.ref;null===c||a&&a.ref===c||(b.effectTag|=Jf)}function k(a,b,c,d){h(a,b);if(!c)return d&&qf(b,!1),x(a,b);c=b.stateNode;Kf.current=b;var e=c.render();b.effectTag|=Ff;f(a,b,e);b.memoizedState=c.state;b.memoizedProps=c.props;d&&qf(b,!0);return b.child}function p(a){var b=a.stateNode;b.pendingContext?
32216pf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&pf(a,b.context,!1);C(a,b.containerInfo)}function x(a,b){jf(a,b);return b.child}function S(a,b){switch(b.tag){case uf:p(b);break;case tf:of(b);break;case yf:C(b,b.stateNode.containerInfo)}return null}var D=a.shouldSetTextContent,y=a.useSyncScheduling,B=a.shouldDeprioritizeSubtree,H=b.pushHostContext,C=b.pushHostContainer,Ca=c.enterHydrationState,r=c.resetHydrationState,m=c.tryToClaimNextHydratableInstance;a=ef(d,e,function(a,b){a.memoizedProps=
32217b},function(a,b){a.memoizedState=b});var t=a.adoptClassInstance,v=a.constructClassInstance,V=a.mountClassInstance,ld=a.updateClassInstance;return{beginWork:function(a,b,c){if(b.pendingWorkPriority===Df||b.pendingWorkPriority>c)return S(a,b);switch(b.tag){case rf:null!==a?w("155"):void 0;var d=b.type,e=b.pendingProps,g=mf(b);g=lf(b,g);d=d(e,g);b.effectTag|=Ff;"object"===typeof d&&null!==d&&"function"===typeof d.render?(b.tag=tf,e=of(b),t(b,d),V(b,c),b=k(a,b,!0,e)):(b.tag=sf,f(a,b,d),b.memoizedProps=
32218e,b=b.child);return b;case sf:a:{e=b.type;c=b.pendingProps;d=b.memoizedProps;if(nf())null===c&&(c=d);else if(null===c||d===c){b=x(a,b);break a}d=mf(b);d=lf(b,d);e=e(c,d);b.effectTag|=Ff;f(a,b,e);b.memoizedProps=c;b=b.child}return b;case tf:return e=of(b),d=void 0,null===a?b.stateNode?w("153"):(v(b,b.pendingProps),V(b,c),d=!0):d=ld(a,b,c),k(a,b,d,e);case uf:return p(b),d=b.updateQueue,null!==d?(e=b.memoizedState,d=kf(a,b,d,null,e,null,c),e===d?(r(),b=x(a,b)):(e=d.element,null!==a&&null!==a.child||
32219!Ca(b)?(r(),f(a,b,e)):(b.effectTag|=Gf,b.child=ff(b,b.child,e,c)),b.memoizedState=d,b=b.child)):(r(),b=x(a,b)),b;case wf:H(b);null===a&&m(b);e=b.type;var q=b.memoizedProps;d=b.pendingProps;null===d&&(d=q,null===d?w("154"):void 0);g=null!==a?a.memoizedProps:null;nf()||null!==d&&q!==d?(q=d.children,D(e,d)?q=null:g&&D(e,g)&&(b.effectTag|=Hf),h(a,b),c!==Ef&&!y&&B(e,d)?(b.pendingWorkPriority=Ef,b=null):(f(a,b,q),b.memoizedProps=d,b=b.child)):b=x(a,b);return b;case xf:return null===a&&m(b),a=b.pendingProps,
32220null===a&&(a=b.memoizedProps),b.memoizedProps=a,null;case Af:b.tag=zf;case zf:c=b.pendingProps;if(nf())null===c&&(c=a&&a.memoizedProps,null===c?w("154"):void 0);else if(null===c||b.memoizedProps===c)c=b.memoizedProps;e=c.children;d=b.pendingWorkPriority;b.stateNode=null===a?ff(b,b.stateNode,e,d):a.child===b.child?gf(b,b.stateNode,e,d):hf(b,b.stateNode,e,d);b.memoizedProps=c;return b.stateNode;case Bf:return null;case yf:a:{C(b,b.stateNode.containerInfo);c=b.pendingWorkPriority;e=b.pendingProps;if(nf())null===
32221e&&(e=a&&a.memoizedProps,null==e?w("154"):void 0);else if(null===e||b.memoizedProps===e){b=x(a,b);break a}null===a?b.child=hf(b,b.child,e,c):f(a,b,e);b.memoizedProps=e;b=b.child}return b;case Cf:a:{c=b.pendingProps;if(nf())null===c&&(c=b.memoizedProps);else if(null===c||b.memoizedProps===c){b=x(a,b);break a}f(a,b,c);b.memoizedProps=c;b=b.child}return b;default:w("156")}},beginFailedWork:function(a,b,c){switch(b.tag){case tf:of(b);break;case uf:p(b);break;default:w("157")}b.effectTag|=If;null===a?
32222b.child=null:b.child!==a.child&&(b.child=a.child);if(b.pendingWorkPriority===Df||b.pendingWorkPriority>c)return S(a,b);b.firstEffect=null;b.lastEffect=null;g(a,b,null,c);b.tag===tf&&(a=b.stateNode,b.memoizedProps=a.props,b.memoizedState=a.state);return b.child}}}
32223var Mf=Se.reconcileChildFibers,Nf=R.popContextProvider,Of=R.popTopLevelContextObject,Pf=E.IndeterminateComponent,Qf=E.FunctionalComponent,Rf=E.ClassComponent,Sf=E.HostRoot,Tf=E.HostComponent,Uf=E.HostText,Vf=E.HostPortal,Wf=E.CoroutineComponent,Xf=E.CoroutineHandlerPhase,Yf=E.YieldComponent,Zf=E.Fragment,ag=J.Placement,bg=J.Ref,cg=J.Update,dg=Q.OffscreenPriority;
32224function eg(a,b,c){var d=a.createInstance,e=a.createTextInstance,f=a.appendInitialChild,g=a.finalizeInitialChildren,h=a.prepareUpdate,k=b.getRootHostContainer,p=b.popHostContext,x=b.getHostContext,S=b.popHostContainer,D=c.prepareToHydrateHostInstance,y=c.prepareToHydrateHostTextInstance,B=c.popHydrationState;return{completeWork:function(a,b,c){var r=b.pendingProps;if(null===r)r=b.memoizedProps;else if(b.pendingWorkPriority!==dg||c===dg)b.pendingProps=null;switch(b.tag){case Qf:return null;case Rf:return Nf(b),
32225null;case Sf:S(b);Of(b);r=b.stateNode;r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null);if(null===a||null===a.child)B(b),b.effectTag&=~ag;return null;case Tf:p(b);c=k();var m=b.type;if(null!==a&&null!=b.stateNode){var t=a.memoizedProps,C=b.stateNode,V=x();r=h(C,m,t,r,c,V);if(b.updateQueue=r)b.effectTag|=cg;a.ref!==b.ref&&(b.effectTag|=bg)}else{if(!r)return null===b.stateNode?w("166"):void 0,null;a=x();if(B(b))D(b,c,a)&&(b.effectTag|=cg);else{a=d(m,r,c,a,b);a:for(t=b.child;null!==
32226t;){if(t.tag===Tf||t.tag===Uf)f(a,t.stateNode);else if(t.tag!==Vf&&null!==t.child){t=t.child;continue}if(t===b)break a;for(;null===t.sibling;){if(null===t["return"]||t["return"]===b)break a;t=t["return"]}t=t.sibling}g(a,m,r,c)&&(b.effectTag|=cg);b.stateNode=a}null!==b.ref&&(b.effectTag|=bg)}return null;case Uf:if(a&&null!=b.stateNode)a.memoizedProps!==r&&(b.effectTag|=cg);else{if("string"!==typeof r)return null===b.stateNode?w("166"):void 0,null;a=k();c=x();B(b)?y(b)&&(b.effectTag|=cg):b.stateNode=
32227e(r,a,c,b)}return null;case Wf:(r=b.memoizedProps)?void 0:w("165");b.tag=Xf;c=[];a:for((m=b.stateNode)&&(m["return"]=b);null!==m;){if(m.tag===Tf||m.tag===Uf||m.tag===Vf)w("164");else if(m.tag===Yf)c.push(m.type);else if(null!==m.child){m.child["return"]=m;m=m.child;continue}for(;null===m.sibling;){if(null===m["return"]||m["return"]===b)break a;m=m["return"]}m.sibling["return"]=m["return"];m=m.sibling}m=r.handler;r=m(r.props,c);b.child=Mf(b,null!==a?a.child:null,r,b.pendingWorkPriority);return b.child;
32228case Xf:return b.tag=Wf,null;case Yf:return null;case Zf:return null;case Vf:return b.effectTag|=cg,S(b),null;case Pf:w("167");default:w("156")}}}}var fg=null,gg=null;function hg(a){return function(b){try{return a(b)}catch(c){}}}
32229var ig={injectInternals:function(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!b.supportsFiber)return!0;try{var c=b.inject(a);fg=hg(function(a){return b.onCommitFiberRoot(c,a)});gg=hg(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0},onCommitRoot:function(a){"function"===typeof fg&&fg(a)},onCommitUnmount:function(a){"function"===typeof gg&&gg(a)}},jg=E.ClassComponent,kg=E.HostRoot,lg=E.HostComponent,mg=E.HostText,ng=
32230E.HostPortal,og=E.CoroutineComponent,pg=ud.commitCallbacks,qg=ig.onCommitUnmount,rg=J.Placement,sg=J.Update,tg=J.Callback,ug=J.ContentReset;
32231function vg(a,b){function c(a){var c=a.ref;if(null!==c)try{c(null)}catch(t){b(a,t)}}function d(a){return a.tag===lg||a.tag===kg||a.tag===ng}function e(a){for(var b=a;;)if(g(b),null!==b.child&&b.tag!==ng)b.child["return"]=b,b=b.child;else{if(b===a)break;for(;null===b.sibling;){if(null===b["return"]||b["return"]===a)return;b=b["return"]}b.sibling["return"]=b["return"];b=b.sibling}}function f(a){for(var b=a,c=!1,d=void 0,f=void 0;;){if(!c){c=b["return"];a:for(;;){null===c?w("160"):void 0;switch(c.tag){case lg:d=
32232c.stateNode;f=!1;break a;case kg:d=c.stateNode.containerInfo;f=!0;break a;case ng:d=c.stateNode.containerInfo;f=!0;break a}c=c["return"]}c=!0}if(b.tag===lg||b.tag===mg)e(b),f?C(d,b.stateNode):H(d,b.stateNode);else if(b.tag===ng?d=b.stateNode.containerInfo:g(b),null!==b.child){b.child["return"]=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b["return"]||b["return"]===a)return;b=b["return"];b.tag===ng&&(c=!1)}b.sibling["return"]=b["return"];b=b.sibling}}function g(a){"function"===
32233typeof qg&&qg(a);switch(a.tag){case jg:c(a);var d=a.stateNode;if("function"===typeof d.componentWillUnmount)try{d.props=a.memoizedProps,d.state=a.memoizedState,d.componentWillUnmount()}catch(t){b(a,t)}break;case lg:c(a);break;case og:e(a.stateNode);break;case ng:f(a)}}var h=a.commitMount,k=a.commitUpdate,p=a.resetTextContent,x=a.commitTextUpdate,S=a.appendChild,D=a.appendChildToContainer,y=a.insertBefore,B=a.insertInContainerBefore,H=a.removeChild,C=a.removeChildFromContainer,Ca=a.getPublicInstance;
32234return{commitPlacement:function(a){a:{for(var b=a["return"];null!==b;){if(d(b)){var c=b;break a}b=b["return"]}w("160");c=void 0}var e=b=void 0;switch(c.tag){case lg:b=c.stateNode;e=!1;break;case kg:b=c.stateNode.containerInfo;e=!0;break;case ng:b=c.stateNode.containerInfo;e=!0;break;default:w("161")}c.effectTag&ug&&(p(b),c.effectTag&=~ug);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c["return"]||d(c["return"])){c=null;break a}c=c["return"]}c.sibling["return"]=c["return"];for(c=c.sibling;c.tag!==
32235lg&&c.tag!==mg;){if(c.effectTag&rg)continue b;if(null===c.child||c.tag===ng)continue b;else c.child["return"]=c,c=c.child}if(!(c.effectTag&rg)){c=c.stateNode;break a}}for(var f=a;;){if(f.tag===lg||f.tag===mg)c?e?B(b,f.stateNode,c):y(b,f.stateNode,c):e?D(b,f.stateNode):S(b,f.stateNode);else if(f.tag!==ng&&null!==f.child){f.child["return"]=f;f=f.child;continue}if(f===a)break;for(;null===f.sibling;){if(null===f["return"]||f["return"]===a)return;f=f["return"]}f.sibling["return"]=f["return"];f=f.sibling}},
32236commitDeletion:function(a){f(a);a["return"]=null;a.child=null;a.alternate&&(a.alternate.child=null,a.alternate["return"]=null)},commitWork:function(a,b){switch(b.tag){case jg:break;case lg:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&k(c,f,e,a,d,b)}break;case mg:null===b.stateNode?w("162"):void 0;c=b.memoizedProps;x(b.stateNode,null!==a?a.memoizedProps:c,c);break;case kg:break;case ng:break;default:w("163")}},
32237commitLifeCycles:function(a,b){switch(b.tag){case jg:var c=b.stateNode;if(b.effectTag&sg)if(null===a)c.props=b.memoizedProps,c.state=b.memoizedState,c.componentDidMount();else{var d=a.memoizedProps;a=a.memoizedState;c.props=b.memoizedProps;c.state=b.memoizedState;c.componentDidUpdate(d,a)}b.effectTag&tg&&null!==b.updateQueue&&pg(b,b.updateQueue,c);break;case kg:a=b.updateQueue;null!==a&&pg(b,a,b.child&&b.child.stateNode);break;case lg:c=b.stateNode;null===a&&b.effectTag&sg&&h(c,b.type,b.memoizedProps,
32238b);break;case mg:break;case ng:break;default:w("163")}},commitAttachRef:function(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case lg:b(Ca(c));break;default:b(c)}}},commitDetachRef:function(a){a=a.ref;null!==a&&a(null)}}}var wg=xd.createCursor,xg=xd.pop,yg=xd.push,zg={};
32239function Ag(a){function b(a){a===zg?w("174"):void 0;return a}var c=a.getChildHostContext,d=a.getRootHostContext,e=wg(zg),f=wg(zg),g=wg(zg);return{getHostContext:function(){return b(e.current)},getRootHostContainer:function(){return b(g.current)},popHostContainer:function(a){xg(e,a);xg(f,a);xg(g,a)},popHostContext:function(a){f.current===a&&(xg(e,a),xg(f,a))},pushHostContainer:function(a,b){yg(g,b,a);b=d(b);yg(f,a,a);yg(e,b,a)},pushHostContext:function(a){var d=b(g.current),h=b(e.current);d=c(h,a.type,
32240d);h!==d&&(yg(f,a,a),yg(e,d,a))},resetHostContainer:function(){e.current=zg;g.current=zg}}}var Bg=E.HostComponent,Cg=E.HostText,Dg=E.HostRoot,Eg=J.Deletion,Fg=J.Placement,Gg=de.createFiberFromHostInstanceForDeletion;
32241function Hg(a){function b(a,b){var c=Gg();c.stateNode=b;c["return"]=a;c.effectTag=Eg;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function c(a,b){switch(a.tag){case Bg:return f(b,a.type,a.pendingProps);case Cg:return g(b,a.pendingProps);default:return!1}}function d(a){for(a=a["return"];null!==a&&a.tag!==Bg&&a.tag!==Dg;)a=a["return"];y=a}var e=a.shouldSetTextContent,f=a.canHydrateInstance,g=a.canHydrateTextInstance,h=a.getNextHydratableSibling,k=a.getFirstHydratableChild,
32242p=a.hydrateInstance,x=a.hydrateTextInstance,S=a.didNotHydrateInstance,D=a.didNotFindHydratableInstance;a=a.didNotFindHydratableTextInstance;if(!(f&&g&&h&&k&&p&&x&&S&&D&&a))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){w("175")},prepareToHydrateHostTextInstance:function(){w("176")},popHydrationState:function(){return!1}};var y=null,B=null,H=!1;return{enterHydrationState:function(a){B=
32243k(a.stateNode.containerInfo);y=a;return H=!0},resetHydrationState:function(){B=y=null;H=!1},tryToClaimNextHydratableInstance:function(a){if(H){var d=B;if(d){if(!c(a,d)){d=h(d);if(!d||!c(a,d)){a.effectTag|=Fg;H=!1;y=a;return}b(y,B)}a.stateNode=d;y=a;B=k(d)}else a.effectTag|=Fg,H=!1,y=a}},prepareToHydrateHostInstance:function(a,b,c){b=p(a.stateNode,a.type,a.memoizedProps,b,c,a);a.updateQueue=b;return null!==b?!0:!1},prepareToHydrateHostTextInstance:function(a){return x(a.stateNode,a.memoizedProps,a)},
32244popHydrationState:function(a){if(a!==y)return!1;if(!H)return d(a),H=!0,!1;var c=a.type;if(a.tag!==Bg||"head"!==c&&"body"!==c&&!e(c,a.memoizedProps))for(c=B;c;)b(a,c),c=h(c);d(a);B=y?h(a.stateNode):null;return!0}}}
32245var Ig=R.popContextProvider,Jg=xd.reset,Kg=Qa.ReactCurrentOwner,Lg=de.createWorkInProgress,Mg=de.largerPriority,Ng=ig.onCommitRoot,T=Q.NoWork,Og=Q.SynchronousPriority,U=Q.TaskPriority,Pg=Q.HighPriority,Qg=Q.LowPriority,Rg=Q.OffscreenPriority,Sg=Pd.AsyncUpdates,Tg=J.PerformedWork,Ug=J.Placement,Vg=J.Update,Wg=J.PlacementAndUpdate,Xg=J.Deletion,Yg=J.ContentReset,Zg=J.Callback,$g=J.Err,ah=J.Ref,bh=E.HostRoot,ch=E.HostComponent,dh=E.HostPortal,eh=E.ClassComponent,fh=ud.getUpdatePriority,gh=R.resetContext;
32246function hh(a){function b(){for(;null!==ma&&ma.current.pendingWorkPriority===T;){ma.isScheduled=!1;var a=ma.nextScheduledRoot;ma.nextScheduledRoot=null;if(ma===zb)return zb=ma=null,z=T,null;ma=a}a=ma;for(var b=null,c=T;null!==a;)a.current.pendingWorkPriority!==T&&(c===T||c>a.current.pendingWorkPriority)&&(c=a.current.pendingWorkPriority,b=a),a=a.nextScheduledRoot;null!==b?(z=c,Jg(),gh(),t(),I=Lg(b.current,c),b!==nc&&(oc=0,nc=b)):(z=T,nc=I=null)}function c(c){Hd=!0;na=null;var d=c.stateNode;d.current===
32247c?w("177"):void 0;z!==Og&&z!==U||oc++;Kg.current=null;if(c.effectTag>Tg)if(null!==c.lastEffect){c.lastEffect.nextEffect=c;var e=c.firstEffect}else e=c;else e=c.firstEffect;Ui();for(u=e;null!==u;){var f=!1,g=void 0;try{for(;null!==u;){var h=u.effectTag;h&Yg&&a.resetTextContent(u.stateNode);if(h&ah){var k=u.alternate;null!==k&&Ph(k)}switch(h&~(Zg|$g|Yg|ah|Tg)){case Ug:q(u);u.effectTag&=~Ug;break;case Wg:q(u);u.effectTag&=~Ug;vf(u.alternate,u);break;case Vg:vf(u.alternate,u);break;case Xg:Id=!0,Mh(u),
32248Id=!1}u=u.nextEffect}}catch(Jd){f=!0,g=Jd}f&&(null===u?w("178"):void 0,x(u,g),null!==u&&(u=u.nextEffect))}Vi();d.current=c;for(u=e;null!==u;){d=!1;e=void 0;try{for(;null!==u;){var Gd=u.effectTag;Gd&(Vg|Zg)&&Nh(u.alternate,u);Gd&ah&&Oh(u);if(Gd&$g)switch(f=u,g=void 0,null!==P&&(g=P.get(f),P["delete"](f),null==g&&null!==f.alternate&&(f=f.alternate,g=P.get(f),P["delete"](f))),null==g?w("184"):void 0,f.tag){case eh:f.stateNode.componentDidCatch(g.error,{componentStack:g.componentStack});break;case bh:null===
32249Ja&&(Ja=g.error);break;default:w("157")}var m=u.nextEffect;u.nextEffect=null;u=m}}catch(Jd){d=!0,e=Jd}d&&(null===u?w("178"):void 0,x(u,e),null!==u&&(u=u.nextEffect))}Hd=!1;"function"===typeof Ng&&Ng(c.stateNode);va&&(va.forEach(H),va=null);b()}function d(a){for(;;){var b=Lh(a.alternate,a,z),c=a["return"],d=a.sibling;var e=a;if(!(e.pendingWorkPriority!==T&&e.pendingWorkPriority>z)){for(var f=fh(e),g=e.child;null!==g;)f=Mg(f,g.pendingWorkPriority),g=g.sibling;e.pendingWorkPriority=f}if(null!==b)return b;
32250null!==c&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),a.effectTag>Tg&&(null!==c.lastEffect?c.lastEffect.nextEffect=a:c.firstEffect=a,c.lastEffect=a));if(null!==d)return d;if(null!==c)a=c;else{na=a;break}}return null}function e(a){var b=V(a.alternate,a,z);null===b&&(b=d(a));Kg.current=null;return b}function f(a){var b=ld(a.alternate,a,z);null===b&&(b=d(a));Kg.current=null;return b}
32251function g(a){p(Rg,a)}function h(){if(null!==P&&0<P.size&&z===U)for(;null!==I;){var a=I;I=null!==P&&(P.has(a)||null!==a.alternate&&P.has(a.alternate))?f(I):e(I);if(null===I&&(null===na?w("179"):void 0,O=U,c(na),O=z,null===P||0===P.size||z!==U))break}}function k(a,d){null!==na?(O=U,c(na),h()):null===I&&b();if(!(z===T||z>a)){O=z;a:do{if(z<=U)for(;null!==I&&!(I=e(I),null===I&&(null===na?w("179"):void 0,O=U,c(na),O=z,h(),z===T||z>a||z>U)););else if(null!==d)for(;null!==I&&!Ab;)if(1<d.timeRemaining()){if(I=
32252e(I),null===I)if(null===na?w("179"):void 0,1<d.timeRemaining()){if(O=U,c(na),O=z,h(),z===T||z>a||z<Pg)break}else Ab=!0}else Ab=!0;switch(z){case Og:case U:if(z<=a)continue a;break a;case Pg:case Qg:case Rg:if(null===d)break a;if(!Ab&&z<=a)continue a;break a;case T:break a;default:w("181")}}while(1)}}function p(a,b){Da?w("182"):void 0;Da=!0;var c=O,d=!1,e=null;try{k(a,b)}catch(Kd){d=!0,e=Kd}for(;d;){if(Ya){Ja=e;break}var h=I;if(null===h)Ya=!0;else{var p=x(h,e);null===p?w("183"):void 0;if(!Ya){try{d=
32253p;e=a;p=b;for(var q=d;null!==h;){switch(h.tag){case eh:Ig(h);break;case ch:m(h);break;case bh:r(h);break;case dh:r(h)}if(h===q||h.alternate===q)break;h=h["return"]}I=f(d);k(e,p)}catch(Kd){d=!0;e=Kd;continue}break}}}O=c;null!==b&&(Bb=!1);z>U&&!Bb&&($f(g),Bb=!0);a=Ja;Ya=Ab=Da=!1;nc=Ka=P=Ja=null;oc=0;if(null!==a)throw a;}function x(a,b){var c=Kg.current=null,d=!1,e=!1,f=null;if(a.tag===bh)c=a,S(a)&&(Ya=!0);else for(var g=a["return"];null!==g&&null===c;){g.tag===eh?"function"===typeof g.stateNode.componentDidCatch&&
32254(d=!0,f=Ra(g),c=g,e=!0):g.tag===bh&&(c=g);if(S(g)){if(Id||null!==va&&(va.has(g)||null!==g.alternate&&va.has(g.alternate)))return null;c=null;e=!1}g=g["return"]}if(null!==c){null===Ka&&(Ka=new Set);Ka.add(c);var h="";g=a;do{a:switch(g.tag){case fe:case ge:case he:case ie:var k=g._debugOwner,m=g._debugSource;var p=Ra(g);var q=null;k&&(q=Ra(k));k=m;p="\n in "+(p||"Unknown")+(k?" (at "+k.fileName.replace(/^.*[\\\/]/,"")+":"+k.lineNumber+")":q?" (created by "+q+")":"");break a;default:p=""}h+=p;g=g["return"]}while(g);
32255g=h;a=Ra(a);null===P&&(P=new Map);b={componentName:a,componentStack:g,error:b,errorBoundary:d?c.stateNode:null,errorBoundaryFound:d,errorBoundaryName:f,willRetry:e};P.set(c,b);try{console.error(b.error)}catch(Wi){console.error(Wi)}Hd?(null===va&&(va=new Set),va.add(c)):H(c);return c}null===Ja&&(Ja=b);return null}function S(a){return null!==Ka&&(Ka.has(a)||null!==a.alternate&&Ka.has(a.alternate))}function D(a,b){return y(a,b,!1)}function y(a,b){oc>Xi&&(Ya=!0,w("185"));!Da&&b<=z&&(I=null);for(var c=
32256!0;null!==a&&c;){c=!1;if(a.pendingWorkPriority===T||a.pendingWorkPriority>b)c=!0,a.pendingWorkPriority=b;null!==a.alternate&&(a.alternate.pendingWorkPriority===T||a.alternate.pendingWorkPriority>b)&&(c=!0,a.alternate.pendingWorkPriority=b);if(null===a["return"])if(a.tag===bh){var d=a.stateNode;b===T||d.isScheduled||(d.isScheduled=!0,zb?zb.nextScheduledRoot=d:ma=d,zb=d);if(!Da)switch(b){case Og:pc?p(Og,null):p(U,null);break;case U:W?void 0:w("186");break;default:Bb||($f(g),Bb=!0)}}else break;a=a["return"]}}
32257function B(a,b){var c=O;c===T&&(c=!Yi||a.internalContextTag&Sg||b?Qg:Og);return c===Og&&(Da||W)?U:c}function H(a){y(a,U,!0)}var C=Ag(a),Ca=Hg(a),r=C.popHostContainer,m=C.popHostContext,t=C.resetHostContainer,v=Lf(a,C,Ca,D,B),V=v.beginWork,ld=v.beginFailedWork,Lh=eg(a,C,Ca).completeWork;C=vg(a,x);var q=C.commitPlacement,Mh=C.commitDeletion,vf=C.commitWork,Nh=C.commitLifeCycles,Oh=C.commitAttachRef,Ph=C.commitDetachRef,$f=a.scheduleDeferredCallback,Yi=a.useSyncScheduling,Ui=a.prepareForCommit,Vi=a.resetAfterCommit,
32258O=T,Da=!1,Ab=!1,W=!1,pc=!1,I=null,z=T,u=null,na=null,ma=null,zb=null,Bb=!1,P=null,Ka=null,va=null,Ja=null,Ya=!1,Hd=!1,Id=!1,Xi=1E3,oc=0,nc=null;return{scheduleUpdate:D,getPriorityContext:B,batchedUpdates:function(a,b){var c=W;W=!0;try{return a(b)}finally{W=c,Da||W||p(U,null)}},unbatchedUpdates:function(a){var b=pc,c=W;pc=W;W=!1;try{return a()}finally{W=c,pc=b}},flushSync:function(a){var b=W,c=O;W=!0;O=Og;try{return a()}finally{W=b,O=c,Da?w("187"):void 0,p(U,null)}},deferredUpdates:function(a){var b=
32259O;O=Qg;try{return a()}finally{O=b}}}}function ih(){w("196")}function jh(a){if(!a)return da;a=Pa.get(a);return"number"===typeof a.tag?ih(a):a._processChildContext(a._context)}jh._injectFiber=function(a){ih=a};var kh=ud.addTopLevelUpdate,lh=R.findCurrentUnmaskedContext,mh=R.isContextProvider,nh=R.processChildContext,oh=E.HostComponent,ph=bb.findCurrentHostFiber,qh=bb.findCurrentHostFiberWithNoPortals;jh._injectFiber(function(a){var b=lh(a);return mh(a)?nh(a,b,!1):b});var rh=F.TEXT_NODE;
32260function sh(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function th(a,b){var c=sh(a);a=0;for(var d;c;){if(c.nodeType===rh){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=sh(c)}}var uh=null;function vh(){!uh&&l.canUseDOM&&(uh="textContent"in document.documentElement?"textContent":"innerText");return uh}
32261var wh={getOffsets:function(a){var b=window.getSelection&&window.getSelection();if(!b||0===b.rangeCount)return null;var c=b.anchorNode,d=b.anchorOffset,e=b.focusNode,f=b.focusOffset,g=b.getRangeAt(0);try{g.startContainer.nodeType,g.endContainer.nodeType}catch(k){return null}b=b.anchorNode===b.focusNode&&b.anchorOffset===b.focusOffset?0:g.toString().length;var h=g.cloneRange();h.selectNodeContents(a);h.setEnd(g.startContainer,g.startOffset);a=h.startContainer===h.endContainer&&h.startOffset===h.endOffset?
322620:h.toString().length;g=a+b;b=document.createRange();b.setStart(c,d);b.setEnd(e,f);c=b.collapsed;return{start:c?g:a,end:c?a:g}},setOffsets:function(a,b){if(window.getSelection){var c=window.getSelection(),d=a[vh()].length,e=Math.min(b.start,d);b=void 0===b.end?e:Math.min(b.end,d);!c.extend&&e>b&&(d=b,b=e,e=d);d=th(a,e);a=th(a,b);if(d&&a){var f=document.createRange();f.setStart(d.node,d.offset);c.removeAllRanges();e>b?(c.addRange(f),c.extend(a.node,a.offset)):(f.setEnd(a.node,a.offset),c.addRange(f))}}}},
32263xh=F.ELEMENT_NODE,yh={hasSelectionCapabilities:function(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&"text"===a.type||"textarea"===b||"true"===a.contentEditable)},getSelectionInformation:function(){var a=ia();return{focusedElem:a,selectionRange:yh.hasSelectionCapabilities(a)?yh.getSelection(a):null}},restoreSelection:function(a){var b=ia(),c=a.focusedElem;a=a.selectionRange;if(b!==c&&fa(document.documentElement,c)){yh.hasSelectionCapabilities(c)&&yh.setSelection(c,a);b=
32264[];for(a=c;a=a.parentNode;)a.nodeType===xh&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});ha(c);for(c=0;c<b.length;c++)a=b[c],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}},getSelection:function(a){return("selectionStart"in a?{start:a.selectionStart,end:a.selectionEnd}:wh.getOffsets(a))||{start:0,end:0}},setSelection:function(a,b){var c=b.start,d=b.end;void 0===d&&(d=c);"selectionStart"in a?(a.selectionStart=c,a.selectionEnd=Math.min(d,a.value.length)):wh.setOffsets(a,b)}},zh=yh,
32265Ah=F.ELEMENT_NODE;function Bh(){w("211")}function Ch(){w("212")}function Dh(a){if(null==a)return null;if(a.nodeType===Ah)return a;var b=Pa.get(a);if(b)return"number"===typeof b.tag?Bh(b):Ch(b);"function"===typeof a.render?w("188"):w("213",Object.keys(a))}Dh._injectFiber=function(a){Bh=a};Dh._injectStack=function(a){Ch=a};var Eh=E.HostComponent;function Fh(a){if(void 0!==a._hostParent)return a._hostParent;if("number"===typeof a.tag){do a=a["return"];while(a&&a.tag!==Eh);if(a)return a}return null}
32266function Gh(a,b){for(var c=0,d=a;d;d=Fh(d))c++;d=0;for(var e=b;e;e=Fh(e))d++;for(;0<c-d;)a=Fh(a),c--;for(;0<d-c;)b=Fh(b),d--;for(;c--;){if(a===b||a===b.alternate)return a;a=Fh(a);b=Fh(b)}return null}
32267var Hh={isAncestor:function(a,b){for(;b;){if(a===b||a===b.alternate)return!0;b=Fh(b)}return!1},getLowestCommonAncestor:Gh,getParentInstance:function(a){return Fh(a)},traverseTwoPhase:function(a,b,c){for(var d=[];a;)d.push(a),a=Fh(a);for(a=d.length;0<a--;)b(d[a],"captured",c);for(a=0;a<d.length;a++)b(d[a],"bubbled",c)},traverseEnterLeave:function(a,b,c,d,e){for(var f=a&&b?Gh(a,b):null,g=[];a&&a!==f;)g.push(a),a=Fh(a);for(a=[];b&&b!==f;)a.push(b),b=Fh(b);for(b=0;b<g.length;b++)c(g[b],"bubbled",d);for(b=
32268a.length;0<b--;)c(a[b],"captured",e)}},Ih=Jb.getListener;function Jh(a,b,c){if(b=Ih(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=Cb(c._dispatchListeners,b),c._dispatchInstances=Cb(c._dispatchInstances,a)}function Kh(a){a&&a.dispatchConfig.phasedRegistrationNames&&Hh.traverseTwoPhase(a._targetInst,Jh,a)}function Qh(a){if(a&&a.dispatchConfig.phasedRegistrationNames){var b=a._targetInst;b=b?Hh.getParentInstance(b):null;Hh.traverseTwoPhase(b,Jh,a)}}
32269function Rh(a,b,c){a&&c&&c.dispatchConfig.registrationName&&(b=Ih(a,c.dispatchConfig.registrationName))&&(c._dispatchListeners=Cb(c._dispatchListeners,b),c._dispatchInstances=Cb(c._dispatchInstances,a))}function Sh(a){a&&a.dispatchConfig.registrationName&&Rh(a._targetInst,null,a)}
32270var Th={accumulateTwoPhaseDispatches:function(a){Db(a,Kh)},accumulateTwoPhaseDispatchesSkipTarget:function(a){Db(a,Qh)},accumulateDirectDispatches:function(a){Db(a,Sh)},accumulateEnterLeaveDispatches:function(a,b,c,d){Hh.traverseEnterLeave(c,d,Rh,a,b)}},X={_root:null,_startText:null,_fallbackText:null},Uh={initialize:function(a){X._root=a;X._startText=Uh.getText();return!0},reset:function(){X._root=null;X._startText=null;X._fallbackText=null},getData:function(){if(X._fallbackText)return X._fallbackText;
32271var a,b=X._startText,c=b.length,d,e=Uh.getText(),f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);X._fallbackText=e.slice(a,1<d?1-d:void 0);return X._fallbackText},getText:function(){return"value"in X._root?X._root.value:X._root[vh()]}},Vh=Uh,Wh="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),Xh={type:null,target:null,currentTarget:ca.thatReturnsNull,eventPhase:null,bubbles:null,
32272cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};
32273function Y(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=d:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?ca.thatReturnsTrue:ca.thatReturnsFalse;this.isPropagationStopped=ca.thatReturnsFalse;return this}
32274n(Y.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=ca.thatReturnsTrue)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=ca.thatReturnsTrue)},persist:function(){this.isPersistent=ca.thatReturnsTrue},isPersistent:ca.thatReturnsFalse,
32275destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;for(a=0;a<Wh.length;a++)this[Wh[a]]=null}});Y.Interface=Xh;Y.augmentClass=function(a,b){function c(){}c.prototype=this.prototype;var d=new c;n(d,a.prototype);a.prototype=d;a.prototype.constructor=a;a.Interface=n({},this.Interface,b);a.augmentClass=this.augmentClass;Yh(a)};Yh(Y);function Zh(a,b,c,d){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,a,b,c,d);return e}return new this(a,b,c,d)}
32276function $h(a){a instanceof this?void 0:w("223");a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function Yh(a){a.eventPool=[];a.getPooled=Zh;a.release=$h}function ai(a,b,c,d){return Y.call(this,a,b,c,d)}Y.augmentClass(ai,{data:null});function bi(a,b,c,d){return Y.call(this,a,b,c,d)}Y.augmentClass(bi,{data:null});var ci=[9,13,27,32],di=l.canUseDOM&&"CompositionEvent"in window,ei=null;l.canUseDOM&&"documentMode"in document&&(ei=document.documentMode);var fi;
32277if(fi=l.canUseDOM&&"TextEvent"in window&&!ei){var gi=window.opera;fi=!("object"===typeof gi&&"function"===typeof gi.version&&12>=parseInt(gi.version(),10))}
32278var hi=fi,ii=l.canUseDOM&&(!di||ei&&8<ei&&11>=ei),ji=String.fromCharCode(32),ki={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",
32279captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},li=!1;
32280function mi(a,b){switch(a){case "topKeyUp":return-1!==ci.indexOf(b.keyCode);case "topKeyDown":return 229!==b.keyCode;case "topKeyPress":case "topMouseDown":case "topBlur":return!0;default:return!1}}function ni(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var oi=!1;function pi(a,b){switch(a){case "topCompositionEnd":return ni(b);case "topKeyPress":if(32!==b.which)return null;li=!0;return ji;case "topTextInput":return a=b.data,a===ji&&li?null:a;default:return null}}
32281function qi(a,b){if(oi)return"topCompositionEnd"===a||!di&&mi(a,b)?(a=Vh.getData(),Vh.reset(),oi=!1,a):null;switch(a){case "topPaste":return null;case "topKeyPress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "topCompositionEnd":return ii?null:b.data;default:return null}}
32282var ri={eventTypes:ki,extractEvents:function(a,b,c,d){var e;if(di)b:{switch(a){case "topCompositionStart":var f=ki.compositionStart;break b;case "topCompositionEnd":f=ki.compositionEnd;break b;case "topCompositionUpdate":f=ki.compositionUpdate;break b}f=void 0}else oi?mi(a,c)&&(f=ki.compositionEnd):"topKeyDown"===a&&229===c.keyCode&&(f=ki.compositionStart);f?(ii&&(oi||f!==ki.compositionStart?f===ki.compositionEnd&&oi&&(e=Vh.getData()):oi=Vh.initialize(d)),f=ai.getPooled(f,b,c,d),e?f.data=e:(e=ni(c),
32283null!==e&&(f.data=e)),Th.accumulateTwoPhaseDispatches(f),e=f):e=null;(a=hi?pi(a,c):qi(a,c))?(b=bi.getPooled(ki.beforeInput,b,c,d),b.data=a,Th.accumulateTwoPhaseDispatches(b)):b=null;return[e,b]}},si={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ti(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!si[a.type]:"textarea"===b?!0:!1}
32284var ui={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}};function vi(a,b,c){a=Y.getPooled(ui.change,a,b,c);a.type="change";nb.enqueueStateRestore(c);Th.accumulateTwoPhaseDispatches(a);return a}var wi=null,xi=null;function yi(a){Jb.enqueueEvents(a);Jb.processEventQueue(!1)}
32285function zi(a){var b=G.getNodeFromInstance(a);if(Bc.updateValueIfChanged(b))return a}function Ai(a,b){if("topChange"===a)return b}var Bi=!1;l.canUseDOM&&(Bi=Lb("input")&&(!document.documentMode||9<document.documentMode));function Ci(){wi&&(wi.detachEvent("onpropertychange",Di),xi=wi=null)}function Di(a){"value"===a.propertyName&&zi(xi)&&(a=vi(xi,a,ub(a)),sb.batchedUpdates(yi,a))}function Ei(a,b,c){"topFocus"===a?(Ci(),wi=b,xi=c,wi.attachEvent("onpropertychange",Di)):"topBlur"===a&&Ci()}
32286function Fi(a){if("topSelectionChange"===a||"topKeyUp"===a||"topKeyDown"===a)return zi(xi)}function Gi(a,b){if("topClick"===a)return zi(b)}function Hi(a,b){if("topInput"===a||"topChange"===a)return zi(b)}
32287var Ii={eventTypes:ui,_isInputEventSupported:Bi,extractEvents:function(a,b,c,d){var e=b?G.getNodeFromInstance(b):window,f=e.nodeName&&e.nodeName.toLowerCase();if("select"===f||"input"===f&&"file"===e.type)var g=Ai;else if(ti(e))if(Bi)g=Hi;else{g=Fi;var h=Ei}else f=e.nodeName,!f||"input"!==f.toLowerCase()||"checkbox"!==e.type&&"radio"!==e.type||(g=Gi);if(g&&(g=g(a,b)))return vi(g,c,d);h&&h(a,e,b);"topBlur"===a&&null!=b&&(a=b._wrapperState||e._wrapperState)&&a.controlled&&"number"===e.type&&(a=""+e.value,
32288e.getAttribute("value")!==a&&e.setAttribute("value",a))}};function Ji(a,b,c,d){return Y.call(this,a,b,c,d)}Y.augmentClass(Ji,{view:function(a){if(a.view)return a.view;a=ub(a);return a.window===a?a:(a=a.ownerDocument)?a.defaultView||a.parentWindow:window},detail:function(a){return a.detail||0}});var Ki={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Li(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Ki[a])?!!b[a]:!1}function Mi(){return Li}
32289function Ni(a,b,c,d){return Y.call(this,a,b,c,d)}Ji.augmentClass(Ni,{screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Mi,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)}});
32290var Oi={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},Pi={eventTypes:Oi,extractEvents:function(a,b,c,d){if("topMouseOver"===a&&(c.relatedTarget||c.fromElement)||"topMouseOut"!==a&&"topMouseOver"!==a)return null;var e=d.window===d?d:(e=d.ownerDocument)?e.defaultView||e.parentWindow:window;"topMouseOut"===a?(a=b,b=(b=c.relatedTarget||c.toElement)?G.getClosestInstanceFromNode(b):
32291null):a=null;if(a===b)return null;var f=null==a?e:G.getNodeFromInstance(a);e=null==b?e:G.getNodeFromInstance(b);var g=Ni.getPooled(Oi.mouseLeave,a,c,d);g.type="mouseleave";g.target=f;g.relatedTarget=e;c=Ni.getPooled(Oi.mouseEnter,b,c,d);c.type="mouseenter";c.target=e;c.relatedTarget=f;Th.accumulateEnterLeaveDispatches(g,c,a,b);return[g,c]}},Qi=F.DOCUMENT_NODE,Ri=l.canUseDOM&&"documentMode"in document&&11>=document.documentMode,Si={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},
32292dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},Ti=null,Zi=null,$i=null,aj=!1,bj=M.isListeningToAllDependencies;
32293function cj(a,b){if(aj||null==Ti||Ti!==ia())return null;var c=Ti;"selectionStart"in c&&zh.hasSelectionCapabilities(c)?c={start:c.selectionStart,end:c.selectionEnd}:window.getSelection?(c=window.getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}):c=void 0;return $i&&ea($i,c)?null:($i=c,a=Y.getPooled(Si.select,Zi,a,b),a.type="select",a.target=Ti,Th.accumulateTwoPhaseDispatches(a),a)}
32294var dj={eventTypes:Si,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:d.nodeType===Qi?d:d.ownerDocument;if(!e||!bj("onSelect",e))return null;e=b?G.getNodeFromInstance(b):window;switch(a){case "topFocus":if(ti(e)||"true"===e.contentEditable)Ti=e,Zi=b,$i=null;break;case "topBlur":$i=Zi=Ti=null;break;case "topMouseDown":aj=!0;break;case "topContextMenu":case "topMouseUp":return aj=!1,cj(c,d);case "topSelectionChange":if(Ri)break;case "topKeyDown":case "topKeyUp":return cj(c,d)}return null}};
32295function ej(a,b,c,d){return Y.call(this,a,b,c,d)}Y.augmentClass(ej,{animationName:null,elapsedTime:null,pseudoElement:null});function fj(a,b,c,d){return Y.call(this,a,b,c,d)}Y.augmentClass(fj,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}});function gj(a,b,c,d){return Y.call(this,a,b,c,d)}Ji.augmentClass(gj,{relatedTarget:null});function hj(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;return 32<=a||13===a?a:0}
32296var ij={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jj={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",
32297116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};function kj(a,b,c,d){return Y.call(this,a,b,c,d)}
32298Ji.augmentClass(kj,{key:function(a){if(a.key){var b=ij[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=hj(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?jj[a.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Mi,charCode:function(a){return"keypress"===a.type?hj(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===
32299a.type?hj(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}});function lj(a,b,c,d){return Y.call(this,a,b,c,d)}Ni.augmentClass(lj,{dataTransfer:null});function mj(a,b,c,d){return Y.call(this,a,b,c,d)}Ji.augmentClass(mj,{touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Mi});function nj(a,b,c,d){return Y.call(this,a,b,c,d)}Y.augmentClass(nj,{propertyName:null,elapsedTime:null,pseudoElement:null});
32300function oj(a,b,c,d){return Y.call(this,a,b,c,d)}Ni.augmentClass(oj,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null});var pj={},qj={};
32301"abort animationEnd animationIteration animationStart blur cancel canPlay canPlayThrough click close contextMenu copy cut doubleClick drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error focus input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing progress rateChange reset scroll seeked seeking stalled submit suspend timeUpdate toggle touchCancel touchEnd touchMove touchStart transitionEnd volumeChange waiting wheel".split(" ").forEach(function(a){var b=a[0].toUpperCase()+ 30301"abort animationEnd animationIteration animationStart blur cancel canPlay canPlayThrough click close contextMenu copy cut doubleClick drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error focus input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing progress rateChange reset scroll seeked seeking stalled submit suspend timeUpdate toggle touchCancel touchEnd touchMove touchStart transitionEnd volumeChange waiting wheel".split(" ").forEach(function(a){var b=a[0].toUpperCase()+
32302a.slice(1),c="on"+b;b="top"+b;c={phasedRegistrationNames:{bubbled:c,captured:c+"Capture"},dependencies:[b]};pj[a]=c;qj[b]=c}); 30302a.slice(1),c="on"+b;b="top"+b;c={phasedRegistrationNames:{bubbled:c,captured:c+"Capture"},dependencies:[b]};$d[a]=c;ae[b]=c});
32303var rj={eventTypes:pj,extractEvents:function(a,b,c,d){var e=qj[a];if(!e)return null;switch(a){case "topAbort":case "topCancel":case "topCanPlay":case "topCanPlayThrough":case "topClose":case "topDurationChange":case "topEmptied":case "topEncrypted":case "topEnded":case "topError":case "topInput":case "topInvalid":case "topLoad":case "topLoadedData":case "topLoadedMetadata":case "topLoadStart":case "topPause":case "topPlay":case "topPlaying":case "topProgress":case "topRateChange":case "topReset":case "topSeeked":case "topSeeking":case "topStalled":case "topSubmit":case "topSuspend":case "topTimeUpdate":case "topToggle":case "topVolumeChange":case "topWaiting":var f=Y; 30303var be={eventTypes:$d,extractEvents:function(a,b,c,d){var e=ae[a];if(!e)return null;switch(a){case "topKeyPress":if(0===Sd(c))return null;case "topKeyDown":case "topKeyUp":a=Vd;break;case "topBlur":case "topFocus":a=Rd;break;case "topClick":if(2===c.button)return null;case "topDoubleClick":case "topMouseDown":case "topMouseMove":case "topMouseUp":case "topMouseOut":case "topMouseOver":case "topContextMenu":a=bd;break;case "topDrag":case "topDragEnd":case "topDragEnter":case "topDragExit":case "topDragLeave":case "topDragOver":case "topDragStart":case "topDrop":a=
32304break;case "topKeyPress":if(0===hj(c))return null;case "topKeyDown":case "topKeyUp":f=kj;break;case "topBlur":case "topFocus":f=gj;break;case "topClick":if(2===c.button)return null;case "topDoubleClick":case "topMouseDown":case "topMouseMove":case "topMouseUp":case "topMouseOut":case "topMouseOver":case "topContextMenu":f=Ni;break;case "topDrag":case "topDragEnd":case "topDragEnter":case "topDragExit":case "topDragLeave":case "topDragOver":case "topDragStart":case "topDrop":f=lj;break;case "topTouchCancel":case "topTouchEnd":case "topTouchMove":case "topTouchStart":f= 30304Wd;break;case "topTouchCancel":case "topTouchEnd":case "topTouchMove":case "topTouchStart":a=Xd;break;case "topAnimationEnd":case "topAnimationIteration":case "topAnimationStart":a=Pd;break;case "topTransitionEnd":a=Yd;break;case "topScroll":a=Yc;break;case "topWheel":a=Zd;break;case "topCopy":case "topCut":case "topPaste":a=Qd;break;default:a=S}b=a.getPooled(e,b,c,d);Ab(b);return b}};od=function(a,b,c,d){a=kb(a,b,c,d);lb(a);mb(!1)};ib.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" "));
32305mj;break;case "topAnimationEnd":case "topAnimationIteration":case "topAnimationStart":f=ej;break;case "topTransitionEnd":f=nj;break;case "topScroll":f=Ji;break;case "topWheel":f=oj;break;case "topCopy":case "topCut":case "topPaste":f=fj}f?void 0:w("86",a);a=f.getPooled(e,b,c,d);Th.accumulateTwoPhaseDispatches(a);return a}};L.setHandleTopLevel(M.handleTopLevel);Jb.injection.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")); 30305Va=tb.getFiberCurrentPropsFromNode;Wa=tb.getInstanceFromNode;Xa=tb.getNodeFromInstance;ib.injectEventPluginsByName({SimpleEventPlugin:be,EnterLeaveEventPlugin:dd,ChangeEventPlugin:Xc,SelectEventPlugin:Od,BeforeInputEventPlugin:ic});var ce=[],de=-1;function V(a){0>de||(a.current=ce[de],ce[de]=null,de--)}function W(a,b){de++;ce[de]=a.current;a.current=b}new Set;var ee={current:C},X={current:!1},fe=C;function ge(a){return he(a)?fe:ee.current}
32306ib.injection.injectComponentTree(G);Jb.injection.injectEventPluginsByName({SimpleEventPlugin:rj,EnterLeaveEventPlugin:Pi,ChangeEventPlugin:Ii,SelectEventPlugin:dj,BeforeInputEventPlugin:ri}); 30306function ie(a,b){var c=a.type.contextTypes;if(!c)return C;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function he(a){return 2===a.tag&&null!=a.type.childContextTypes}function je(a){he(a)&&(V(X,a),V(ee,a))}
32307var sj=A.injection.MUST_USE_PROPERTY,Z=A.injection.HAS_BOOLEAN_VALUE,tj=A.injection.HAS_NUMERIC_VALUE,uj=A.injection.HAS_POSITIVE_NUMERIC_VALUE,vj=A.injection.HAS_STRING_BOOLEAN_VALUE,wj={Properties:{allowFullScreen:Z,allowTransparency:vj,async:Z,autoPlay:Z,capture:Z,checked:sj|Z,cols:uj,contentEditable:vj,controls:Z,"default":Z,defer:Z,disabled:Z,download:A.injection.HAS_OVERLOADED_BOOLEAN_VALUE,draggable:vj,formNoValidate:Z,hidden:Z,loop:Z,multiple:sj|Z,muted:sj|Z,noValidate:Z,open:Z,playsInline:Z, 30307function ke(a,b,c){null!=ee.cursor?D("168"):void 0;W(ee,b,a);W(X,c,a)}function le(a,b){var c=a.stateNode,d=a.type.childContextTypes;if("function"!==typeof c.getChildContext)return b;c=c.getChildContext();for(var e in c)e in d?void 0:D("108",fd(a)||"Unknown",e);return A({},b,c)}function me(a){if(!he(a))return!1;var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||C;fe=ee.current;W(ee,b,a);W(X,X.current,a);return!0}
32308readOnly:Z,required:Z,reversed:Z,rows:uj,rowSpan:tj,scoped:Z,seamless:Z,selected:sj|Z,size:uj,start:tj,span:uj,spellCheck:vj,style:0,itemScope:Z,acceptCharset:0,className:0,htmlFor:0,httpEquiv:0,value:vj},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMMutationMethods:{value:function(a,b){if(null==b)return a.removeAttribute("value");"number"!==a.type||!1===a.hasAttribute("value")?a.setAttribute("value",""+b):a.validity&&!a.validity.badInput&& 30308function ne(a,b){var c=a.stateNode;c?void 0:D("169");if(b){var d=le(a,fe);c.__reactInternalMemoizedMergedChildContext=d;V(X,a);V(ee,a);W(ee,d,a)}else V(X,a);W(X,b,a)}
32309a.ownerDocument.activeElement!==a&&a.setAttribute("value",""+b)}}},xj=A.injection.HAS_STRING_BOOLEAN_VALUE,yj={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},zj={Properties:{autoReverse:xj,externalResourcesRequired:xj,preserveAlpha:xj},DOMAttributeNames:{autoReverse:"autoReverse",externalResourcesRequired:"externalResourcesRequired",preserveAlpha:"preserveAlpha"},DOMAttributeNamespaces:{xlinkActuate:yj.xlink,xlinkArcrole:yj.xlink,xlinkHref:yj.xlink,xlinkRole:yj.xlink, 30309function Y(a,b,c){this.tag=a;this.key=b;this.stateNode=this.type=null;this.sibling=this.child=this["return"]=null;this.index=0;this.memoizedState=this.updateQueue=this.memoizedProps=this.pendingProps=this.ref=null;this.internalContextTag=c;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.expirationTime=0;this.alternate=null}
32310xlinkShow:yj.xlink,xlinkTitle:yj.xlink,xlinkType:yj.xlink,xmlBase:yj.xml,xmlLang:yj.xml,xmlSpace:yj.xml}},Aj=/[\-\:]([a-z])/g;function Bj(a){return a[1].toUpperCase()} 30310function oe(a,b,c){var d=a.alternate;null===d?(d=new Y(a.tag,a.key,a.internalContextTag),d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.effectTag=0,d.nextEffect=null,d.firstEffect=null,d.lastEffect=null);d.expirationTime=c;d.pendingProps=b;d.child=a.child;d.memoizedProps=a.memoizedProps;d.memoizedState=a.memoizedState;d.updateQueue=a.updateQueue;d.sibling=a.sibling;d.index=a.index;d.ref=a.ref;return d}
32311"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode x-height xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xmlns:xlink xml:lang xml:space".split(" ").forEach(function(a){var b=a.replace(Aj, 30311function pe(a,b,c){var d=void 0,e=a.type,f=a.key;"function"===typeof e?(d=e.prototype&&e.prototype.isReactComponent?new Y(2,f,b):new Y(0,f,b),d.type=e,d.pendingProps=a.props):"string"===typeof e?(d=new Y(5,f,b),d.type=e,d.pendingProps=a.props):"object"===typeof e&&null!==e&&"number"===typeof e.tag?(d=e,d.pendingProps=a.props):D("130",null==e?e:typeof e,"");d.expirationTime=c;return d}function qe(a,b,c,d){b=new Y(10,d,b);b.pendingProps=a;b.expirationTime=c;return b}
32312Bj);zj.Properties[b]=0;zj.DOMAttributeNames[b]=a});A.injection.injectDOMPropertyConfig(wj);A.injection.injectDOMPropertyConfig(zj); 30312function re(a,b,c){b=new Y(6,null,b);b.pendingProps=a;b.expirationTime=c;return b}function se(a,b,c){b=new Y(7,a.key,b);b.type=a.handler;b.pendingProps=a;b.expirationTime=c;return b}function te(a,b,c){a=new Y(9,null,b);a.expirationTime=c;return a}function ue(a,b,c){b=new Y(4,a.key,b);b.pendingProps=a.children||[];b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}var ve=null,we=null;
32313var Cj=ig.injectInternals,Dj=F.ELEMENT_NODE,Ej=F.TEXT_NODE,Fj=F.COMMENT_NODE,Gj=F.DOCUMENT_NODE,Hj=F.DOCUMENT_FRAGMENT_NODE,Ij=A.ROOT_ATTRIBUTE_NAME,Jj=ka.getChildNamespace,Kj=N.createElement,Lj=N.createTextNode,Mj=N.setInitialProperties,Nj=N.diffProperties,Oj=N.updateProperties,Pj=N.diffHydratedProperties,Qj=N.diffHydratedText,Rj=N.warnForDeletedHydratableElement,Sj=N.warnForDeletedHydratableText,Tj=N.warnForInsertedHydratedElement,Uj=N.warnForInsertedHydratedText,Vj=G.precacheFiberNode,Wj=G.updateFiberProps; 30313function xe(a){return function(b){try{return a(b)}catch(c){}}}function ye(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);ve=xe(function(a){return b.onCommitFiberRoot(c,a)});we=xe(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}function ze(a){"function"===typeof ve&&ve(a)}function Ae(a){"function"===typeof we&&we(a)}
32314nb.injection.injectFiberControlledHostComponent(N);Dh._injectFiber(function(a){return Xj.findHostInstance(a)});var Yj=null,Zj=null;function ak(a){return!(!a||a.nodeType!==Dj&&a.nodeType!==Gj&&a.nodeType!==Hj&&(a.nodeType!==Fj||" react-mount-point-unstable "!==a.nodeValue))}function bk(a){a=a?a.nodeType===Gj?a.documentElement:a.firstChild:null;return!(!a||a.nodeType!==Dj||!a.hasAttribute(Ij))} 30314function Be(a){return{baseState:a,expirationTime:0,first:null,last:null,callbackList:null,hasForceUpdate:!1,isInitialized:!1}}function Ce(a,b){null===a.last?a.first=a.last=b:(a.last.next=b,a.last=b);if(0===a.expirationTime||a.expirationTime>b.expirationTime)a.expirationTime=b.expirationTime}
32315var Xj=function(a){var b=a.getPublicInstance;a=hh(a);var c=a.scheduleUpdate,d=a.getPriorityContext;return{createContainer:function(a){var b=ee();a={current:b,containerInfo:a,isScheduled:!1,nextScheduledRoot:null,context:null,pendingContext:null};return b.stateNode=a},updateContainer:function(a,b,g,h){var e=b.current;g=jh(g);null===b.context?b.context=g:b.pendingContext=g;b=h;h=d(e,ed.enableAsyncSubtreeAPI&&null!=a&&null!=a.type&&null!=a.type.prototype&&!0===a.type.prototype.unstable_isAsyncReactComponent); 30315function De(a,b){var c=a.alternate,d=a.updateQueue;null===d&&(d=a.updateQueue=Be(null));null!==c?(a=c.updateQueue,null===a&&(a=c.updateQueue=Be(null))):a=null;a=a!==d?a:null;null===a?Ce(d,b):null===d.last||null===a.last?(Ce(d,b),Ce(a,b)):(Ce(d,b),a.last=b)}function Ee(a,b,c,d){a=a.partialState;return"function"===typeof a?a.call(b,c,d):a}
32316a={element:a};kh(e,a,void 0===b?null:b,h);c(e,h)},batchedUpdates:a.batchedUpdates,unbatchedUpdates:a.unbatchedUpdates,deferredUpdates:a.deferredUpdates,flushSync:a.flushSync,getPublicRootInstance:function(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case oh:return b(a.child.stateNode);default:return a.child.stateNode}},findHostInstance:function(a){a=ph(a);return null===a?null:a.stateNode},findHostInstanceWithNoPortals:function(a){a=qh(a);return null===a?null:a.stateNode}}}({getRootHostContext:function(a){if(a.nodeType=== 30316function Le(a,b,c,d,e,f){null!==a&&a.updateQueue===c&&(c=b.updateQueue={baseState:c.baseState,expirationTime:c.expirationTime,first:c.first,last:c.last,isInitialized:c.isInitialized,callbackList:null,hasForceUpdate:!1});c.expirationTime=0;c.isInitialized?a=c.baseState:(a=c.baseState=b.memoizedState,c.isInitialized=!0);for(var g=!0,k=c.first,h=!1;null!==k;){var r=k.expirationTime;if(r>f){var n=c.expirationTime;if(0===n||n>r)c.expirationTime=r;h||(h=!0,c.baseState=a)}else{h||(c.first=k.next,null===
32317Gj)a=(a=a.documentElement)?a.namespaceURI:Jj(null,"");else{var b=a.nodeType===Fj?a.parentNode:a;a=b.namespaceURI||null;b=b.tagName;a=Jj(a,b)}return a},getChildHostContext:function(a,b){return Jj(a,b)},getPublicInstance:function(a){return a},prepareForCommit:function(){Yj=M.isEnabled();Zj=zh.getSelectionInformation();M.setEnabled(!1)},resetAfterCommit:function(){zh.restoreSelection(Zj);Zj=null;M.setEnabled(Yj);Yj=null},createInstance:function(a,b,c,d,e){a=Kj(a,b,c,d);Vj(e,a);Wj(a,b);return a},appendInitialChild:function(a, 30317c.first&&(c.last=null));if(k.isReplace)a=Ee(k,d,a,e),g=!0;else if(r=Ee(k,d,a,e))a=g?A({},a,r):A(a,r),g=!1;k.isForced&&(c.hasForceUpdate=!0);null!==k.callback&&(r=c.callbackList,null===r&&(r=c.callbackList=[]),r.push(k))}k=k.next}null!==c.callbackList?b.effectTag|=32:null!==c.first||c.hasForceUpdate||(b.updateQueue=null);h||(c.baseState=a);return a}
32318b){a.appendChild(b)},finalizeInitialChildren:function(a,b,c,d){Mj(a,b,c,d);a:{switch(b){case "button":case "input":case "select":case "textarea":a=!!c.autoFocus;break a}a=!1}return a},prepareUpdate:function(a,b,c,d,e){return Nj(a,b,c,d,e)},commitMount:function(a){a.focus()},commitUpdate:function(a,b,c,d,e){Wj(a,e);Oj(a,b,c,d,e)},shouldSetTextContent:function(a,b){return"textarea"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&& 30318function Me(a,b){var c=a.callbackList;if(null!==c)for(a.callbackList=null,a=0;a<c.length;a++){var d=c[a],e=d.callback;d.callback=null;"function"!==typeof e?D("191",e):void 0;e.call(b)}}
32319"string"===typeof b.dangerouslySetInnerHTML.__html},resetTextContent:function(a){a.textContent=""},shouldDeprioritizeSubtree:function(a,b){return!!b.hidden},createTextInstance:function(a,b,c,d){a=Lj(a,b);Vj(d,a);return a},commitTextUpdate:function(a,b,c){a.nodeValue=c},appendChild:function(a,b){a.appendChild(b)},appendChildToContainer:function(a,b){a.nodeType===Fj?a.parentNode.insertBefore(b,a):a.appendChild(b)},insertBefore:function(a,b,c){a.insertBefore(b,c)},insertInContainerBefore:function(a, 30319function Ne(a,b,c,d){function e(a,b){b.updater=f;a.stateNode=b;b._reactInternalFiber=a}var f={isMounted:hd,enqueueSetState:function(c,d,e){c=c._reactInternalFiber;e=void 0===e?null:e;var g=b(c);De(c,{expirationTime:g,partialState:d,callback:e,isReplace:!1,isForced:!1,nextCallback:null,next:null});a(c,g)},enqueueReplaceState:function(c,d,e){c=c._reactInternalFiber;e=void 0===e?null:e;var f=b(c);De(c,{expirationTime:f,partialState:d,callback:e,isReplace:!0,isForced:!1,nextCallback:null,next:null});
32320b,c){a.nodeType===Fj?a.parentNode.insertBefore(b,c):a.insertBefore(b,c)},removeChild:function(a,b){a.removeChild(b)},removeChildFromContainer:function(a,b){a.nodeType===Fj?a.parentNode.removeChild(b):a.removeChild(b)},canHydrateInstance:function(a,b){return a.nodeType===Dj&&b===a.nodeName.toLowerCase()},canHydrateTextInstance:function(a,b){return""===b?!1:a.nodeType===Ej},getNextHydratableSibling:function(a){for(a=a.nextSibling;a&&a.nodeType!==Dj&&a.nodeType!==Ej;)a=a.nextSibling;return a},getFirstHydratableChild:function(a){for(a= 30320a(c,f)},enqueueForceUpdate:function(c,d){c=c._reactInternalFiber;d=void 0===d?null:d;var e=b(c);De(c,{expirationTime:e,partialState:null,callback:d,isReplace:!1,isForced:!0,nextCallback:null,next:null});a(c,e)}};return{adoptClassInstance:e,constructClassInstance:function(a,b){var c=a.type,d=ge(a),f=2===a.tag&&null!=a.type.contextTypes,g=f?ie(a,d):C;b=new c(b,g);e(a,b);f&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=d,a.__reactInternalMemoizedMaskedChildContext=g);return b},mountClassInstance:function(a,
32321a.firstChild;a&&a.nodeType!==Dj&&a.nodeType!==Ej;)a=a.nextSibling;return a},hydrateInstance:function(a,b,c,d,e,f){Vj(f,a);Wj(a,c);return Pj(a,b,c,e,d)},hydrateTextInstance:function(a,b,c){Vj(c,a);return Qj(a,b)},didNotHydrateInstance:function(a,b){1===b.nodeType?Rj(a,b):Sj(a,b)},didNotFindHydratableInstance:function(a,b,c){Tj(a,b,c)},didNotFindHydratableTextInstance:function(a,b){Uj(a,b)},scheduleDeferredCallback:dd.rIC,useSyncScheduling:!0});sb.injection.injectFiberBatchedUpdates(Xj.batchedUpdates); 30321b){var c=a.alternate,d=a.stateNode,e=d.state||null,g=a.pendingProps;g?void 0:D("158");var k=ge(a);d.props=g;d.state=a.memoizedState=e;d.refs=C;d.context=ie(a,k);null!=a.type&&null!=a.type.prototype&&!0===a.type.prototype.unstable_isAsyncReactComponent&&(a.internalContextTag|=1);"function"===typeof d.componentWillMount&&(e=d.state,d.componentWillMount(),e!==d.state&&f.enqueueReplaceState(d,d.state,null),e=a.updateQueue,null!==e&&(d.state=Le(c,a,e,d,g,b)));"function"===typeof d.componentDidMount&&(a.effectTag|=
32322function ck(a,b,c,d,e){ak(c)?void 0:w("200");var f=c._reactRootContainer;if(f)Xj.updateContainer(b,f,a,e);else{if(!d&&!bk(c))for(d=void 0;d=c.lastChild;)c.removeChild(d);var g=Xj.createContainer(c);f=c._reactRootContainer=g;Xj.unbatchedUpdates(function(){Xj.updateContainer(b,g,a,e)})}return Xj.getPublicRootInstance(f)}function dk(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;ak(b)?void 0:w("200");return ne.createPortal(a,b,null,c)} 303224)},updateClassInstance:function(a,b,e){var g=b.stateNode;g.props=b.memoizedProps;g.state=b.memoizedState;var k=b.memoizedProps,h=b.pendingProps;h||(h=k,null==h?D("159"):void 0);var u=g.context,x=ge(b);x=ie(b,x);"function"!==typeof g.componentWillReceiveProps||k===h&&u===x||(u=g.state,g.componentWillReceiveProps(h,x),g.state!==u&&f.enqueueReplaceState(g,g.state,null));u=b.memoizedState;e=null!==b.updateQueue?Le(a,b,b.updateQueue,g,h,e):u;if(!(k!==h||u!==e||X.current||null!==b.updateQueue&&b.updateQueue.hasForceUpdate))return"function"!==
32323var ek={createPortal:dk,hydrate:function(a,b,c){return ck(null,a,b,!0,c)},render:function(a,b,c){return ck(null,a,b,!1,c)},unstable_renderSubtreeIntoContainer:function(a,b,c,d){null!=a&&Pa.has(a)?void 0:w("38");return ck(a,b,c,!1,d)},unmountComponentAtNode:function(a){ak(a)?void 0:w("40");return a._reactRootContainer?(Xj.unbatchedUpdates(function(){ck(null,null,a,!1,function(){a._reactRootContainer=null})}),!0):!1},findDOMNode:Dh,unstable_createPortal:dk,unstable_batchedUpdates:sb.batchedUpdates, 30323typeof g.componentDidUpdate||k===a.memoizedProps&&u===a.memoizedState||(b.effectTag|=4),!1;var F=h;if(null===k||null!==b.updateQueue&&b.updateQueue.hasForceUpdate)F=!0;else{var L=b.stateNode,G=b.type;F="function"===typeof L.shouldComponentUpdate?L.shouldComponentUpdate(F,e,x):G.prototype&&G.prototype.isPureReactComponent?!ea(k,F)||!ea(u,e):!0}F?("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(h,e,x),"function"===typeof g.componentDidUpdate&&(b.effectTag|=4)):("function"!==typeof g.componentDidUpdate||
32324unstable_deferredUpdates:Xj.deferredUpdates,flushSync:Xj.flushSync,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:Jb,EventPluginRegistry:sa,EventPropagators:Th,ReactControlledComponent:nb,ReactDOMComponentTree:G,ReactDOMEventListener:L}};Cj({findFiberByHostInstance:G.getClosestInstanceFromNode,findHostInstanceByFiber:Xj.findHostInstance,bundleType:0,version:"16.0.0",rendererPackageName:"react-dom"});module.exports=ek; 30324k===a.memoizedProps&&u===a.memoizedState||(b.effectTag|=4),c(b,h),d(b,e));g.props=h;g.state=e;g.context=x;return F}}}var Oe="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.portal")||60106;function Pe(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Oe,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}var Qe=Array.isArray,Re="function"===typeof Symbol&&Symbol.iterator,Se,Te,Ue,Ve;
30325"function"===typeof Symbol&&Symbol["for"]?(Se=Symbol["for"]("react.element"),Te=Symbol["for"]("react.call"),Ue=Symbol["for"]("react.return"),Ve=Symbol["for"]("react.fragment")):(Se=60103,Te=60104,Ue=60105,Ve=60107);function We(a){if(null===a||"undefined"===typeof a)return null;a=Re&&a[Re]||a["@@iterator"];return"function"===typeof a?a:null}
30326function Xe(a,b){var c=b.ref;if(null!==c&&"function"!==typeof c){if(b._owner){b=b._owner;var d=void 0;b&&(2!==b.tag?D("110"):void 0,d=b.stateNode);d?void 0:D("147",c);var e=""+c;if(null!==a&&null!==a.ref&&a.ref._stringRef===e)return a.ref;a=function(a){var b=d.refs===C?d.refs={}:d.refs;null===a?delete b[e]:b[e]=a};a._stringRef=e;return a}"string"!==typeof c?D("148"):void 0;b._owner?void 0:D("149",c)}return c}
30327function Ye(a,b){"textarea"!==a.type&&D("31","[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b,"")}
30328function Ze(a,b){function c(c,d){if(b){if(!a){if(null===d.alternate)return;d=d.alternate}var p=c.lastEffect;null!==p?(p.nextEffect=d,c.lastEffect=d):c.firstEffect=c.lastEffect=d;d.nextEffect=null;d.effectTag=8}}function d(a,d){if(!b)return null;for(;null!==d;)c(a,d),d=d.sibling;return null}function e(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function f(b,c,d){if(a)return b=oe(b,c,d),b.index=0,b.sibling=null,b;b.expirationTime=d;b.effectTag=0;b.index=
303290;b.sibling=null;b.pendingProps=c;return b}function g(a,c,d){a.index=d;if(!b)return c;d=a.alternate;if(null!==d)return d=d.index,d<c?(a.effectTag=2,c):d;a.effectTag=2;return c}function k(a){b&&null===a.alternate&&(a.effectTag=2);return a}function h(a,b,c,d){if(null===b||6!==b.tag)return b=re(c,a.internalContextTag,d),b["return"]=a,b;b=f(b,c,d);b["return"]=a;return b}function r(a,b,c,d){if(null!==b&&b.type===c.type)return d=f(b,c.props,d),d.ref=Xe(b,c),d["return"]=a,d;d=pe(c,a.internalContextTag,d);
30330d.ref=Xe(b,c);d["return"]=a;return d}function n(a,b,c,d){if(null===b||7!==b.tag)return b=se(c,a.internalContextTag,d),b["return"]=a,b;b=f(b,c,d);b["return"]=a;return b}function y(a,b,c,d){if(null===b||9!==b.tag)return b=te(c,a.internalContextTag,d),b.type=c.value,b["return"]=a,b;b=f(b,null,d);b.type=c.value;b["return"]=a;return b}function u(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=ue(c,a.internalContextTag,
30331d),b["return"]=a,b;b=f(b,c.children||[],d);b["return"]=a;return b}function x(a,b,c,d,e){if(null===b||10!==b.tag)return b=qe(c,a.internalContextTag,d,e),b["return"]=a,b;b=f(b,c,d);b["return"]=a;return b}function F(a,b,c){if("string"===typeof b||"number"===typeof b)return b=re(""+b,a.internalContextTag,c),b["return"]=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case Se:if(b.type===Ve)return b=qe(b.props.children,a.internalContextTag,c,b.key),b["return"]=a,b;c=pe(b,a.internalContextTag,c);
30332c.ref=Xe(null,b);c["return"]=a;return c;case Te:return b=se(b,a.internalContextTag,c),b["return"]=a,b;case Ue:return c=te(b,a.internalContextTag,c),c.type=b.value,c["return"]=a,c;case Oe:return b=ue(b,a.internalContextTag,c),b["return"]=a,b}if(Qe(b)||We(b))return b=qe(b,a.internalContextTag,c,null),b["return"]=a,b;Ye(a,b)}return null}function L(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case Se:return c.key===
30333e?c.type===Ve?x(a,b,c.props.children,d,e):r(a,b,c,d):null;case Te:return c.key===e?n(a,b,c,d):null;case Ue:return null===e?y(a,b,c,d):null;case Oe:return c.key===e?u(a,b,c,d):null}if(Qe(c)||We(c))return null!==e?null:x(a,b,c,d,null);Ye(a,c)}return null}function G(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case Se:return a=a.get(null===d.key?c:d.key)||null,d.type===Ve?x(b,a,d.props.children,e,d.key):
30334r(b,a,d,e);case Te:return a=a.get(null===d.key?c:d.key)||null,n(b,a,d,e);case Ue:return a=a.get(c)||null,y(b,a,d,e);case Oe:return a=a.get(null===d.key?c:d.key)||null,u(b,a,d,e)}if(Qe(d)||We(d))return a=a.get(c)||null,x(b,a,d,e,null);Ye(b,d)}return null}function T(a,f,v,k){for(var p=null,z=null,l=f,h=f=0,t=null;null!==l&&h<v.length;h++){l.index>h?(t=l,l=null):t=l.sibling;var w=L(a,l,v[h],k);if(null===w){null===l&&(l=t);break}b&&l&&null===w.alternate&&c(a,l);f=g(w,f,h);null===z?p=w:z.sibling=w;z=w;
30335l=t}if(h===v.length)return d(a,l),p;if(null===l){for(;h<v.length;h++)if(l=F(a,v[h],k))f=g(l,f,h),null===z?p=l:z.sibling=l,z=l;return p}for(l=e(a,l);h<v.length;h++)if(t=G(l,a,h,v[h],k)){if(b&&null!==t.alternate)l["delete"](null===t.key?h:t.key);f=g(t,f,h);null===z?p=t:z.sibling=t;z=t}b&&l.forEach(function(b){return c(a,b)});return p}function I(a,f,v,k){var p=We(v);"function"!==typeof p?D("150"):void 0;v=p.call(v);null==v?D("151"):void 0;for(var h=p=null,l=f,z=f=0,t=null,w=v.next();null!==l&&!w.done;z++,
30336w=v.next()){l.index>z?(t=l,l=null):t=l.sibling;var n=L(a,l,w.value,k);if(null===n){l||(l=t);break}b&&l&&null===n.alternate&&c(a,l);f=g(n,f,z);null===h?p=n:h.sibling=n;h=n;l=t}if(w.done)return d(a,l),p;if(null===l){for(;!w.done;z++,w=v.next())w=F(a,w.value,k),null!==w&&(f=g(w,f,z),null===h?p=w:h.sibling=w,h=w);return p}for(l=e(a,l);!w.done;z++,w=v.next())if(w=G(l,a,z,w.value,k),null!==w){if(b&&null!==w.alternate)l["delete"](null===w.key?z:w.key);f=g(w,f,z);null===h?p=w:h.sibling=w;h=w}b&&l.forEach(function(b){return c(a,
30337b)});return p}return function(a,b,e,g){var h="object"===typeof e&&null!==e;if(h)switch(e.$$typeof){case Se:a:{var v=e.key;for(h=b;null!==h;){if(h.key===v)if(10===h.tag?e.type===Ve:h.type===e.type){d(a,h.sibling);b=f(h,e.type===Ve?e.props.children:e.props,g);b.ref=Xe(h,e);b["return"]=a;a=b;break a}else{d(a,h);break}else c(a,h);h=h.sibling}e.type===Ve?(e=qe(e.props.children,a.internalContextTag,g,e.key),e["return"]=a,a=e):(g=pe(e,a.internalContextTag,g),g.ref=Xe(b,e),g["return"]=a,a=g)}return k(a);
30338case Te:a:{for(h=e.key;null!==b;){if(b.key===h)if(7===b.tag){d(a,b.sibling);e=f(b,e,g);e["return"]=a;a=e;break a}else{d(a,b);break}else c(a,b);b=b.sibling}e=se(e,a.internalContextTag,g);e["return"]=a;a=e}return k(a);case Ue:a:{if(null!==b)if(9===b.tag){d(a,b.sibling);b=f(b,null,g);b.type=e.value;b["return"]=a;a=b;break a}else d(a,b);b=te(e,a.internalContextTag,g);b.type=e.value;b["return"]=a;a=b}return k(a);case Oe:a:{for(h=e.key;null!==b;){if(b.key===h)if(4===b.tag&&b.stateNode.containerInfo===e.containerInfo&&
30339b.stateNode.implementation===e.implementation){d(a,b.sibling);e=f(b,e.children||[],g);e["return"]=a;a=e;break a}else{d(a,b);break}else c(a,b);b=b.sibling}e=ue(e,a.internalContextTag,g);e["return"]=a;a=e}return k(a)}if("string"===typeof e||"number"===typeof e)return e=""+e,null!==b&&6===b.tag?(d(a,b.sibling),e=f(b,e,g)):(d(a,b),e=re(e,a.internalContextTag,g)),e["return"]=a,a=e,k(a);if(Qe(e))return T(a,b,e,g);if(We(e))return I(a,b,e,g);h&&Ye(a,e);if("undefined"===typeof e)switch(a.tag){case 2:case 1:e=
30340a.type,D("152",e.displayName||e.name||"Component")}return d(a,b)}}var $e=Ze(!0,!0),af=Ze(!1,!0),bf=Ze(!1,!1);
30341function cf(a,b,c,d,e){function f(a,b,c){g(a,b,c,b.expirationTime)}function g(a,b,c,d){b.child=null===a?bf(b,b.child,c,d):a.child===b.child?$e(b,b.child,c,d):af(b,b.child,c,d)}function k(a,b){var c=b.ref;null===c||a&&a.ref===c||(b.effectTag|=128)}function h(a,b,c,d){k(a,b);if(!c)return d&&ne(b,!1),n(a,b);c=b.stateNode;ed.current=b;var e=c.render();b.effectTag|=1;f(a,b,e);b.memoizedState=c.state;b.memoizedProps=c.props;d&&ne(b,!0);return b.child}function r(a){var b=a.stateNode;b.pendingContext?ke(a,
30342b.pendingContext,b.pendingContext!==b.context):b.context&&ke(a,b.context,!1);G(a,b.containerInfo)}function n(a,b){null!==a&&b.child!==a.child?D("153"):void 0;if(null!==b.child){a=b.child;var c=oe(a,a.pendingProps,a.expirationTime);b.child=c;for(c["return"]=b;null!==a.sibling;)a=a.sibling,c=c.sibling=oe(a,a.pendingProps,a.expirationTime),c["return"]=b;c.sibling=null}return b.child}function y(a,b){switch(b.tag){case 3:r(b);break;case 2:me(b);break;case 4:G(b,b.stateNode.containerInfo)}return null}var u=
30343a.shouldSetTextContent,x=a.useSyncScheduling,F=a.shouldDeprioritizeSubtree,L=b.pushHostContext,G=b.pushHostContainer,T=c.enterHydrationState,I=c.resetHydrationState,z=c.tryToClaimNextHydratableInstance;a=Ne(d,e,function(a,b){a.memoizedProps=b},function(a,b){a.memoizedState=b});var p=a.adoptClassInstance,v=a.constructClassInstance,t=a.mountClassInstance,Kb=a.updateClassInstance;return{beginWork:function(a,b,c){if(0===b.expirationTime||b.expirationTime>c)return y(a,b);switch(b.tag){case 0:null!==a?
30344D("155"):void 0;var d=b.type,e=b.pendingProps,g=ge(b);g=ie(b,g);d=d(e,g);b.effectTag|=1;"object"===typeof d&&null!==d&&"function"===typeof d.render?(b.tag=2,e=me(b),p(b,d),t(b,c),b=h(a,b,!0,e)):(b.tag=1,f(a,b,d),b.memoizedProps=e,b=b.child);return b;case 1:a:{e=b.type;c=b.pendingProps;d=b.memoizedProps;if(X.current)null===c&&(c=d);else if(null===c||d===c){b=n(a,b);break a}d=ge(b);d=ie(b,d);e=e(c,d);b.effectTag|=1;f(a,b,e);b.memoizedProps=c;b=b.child}return b;case 2:return e=me(b),d=void 0,null===
30345a?b.stateNode?D("153"):(v(b,b.pendingProps),t(b,c),d=!0):d=Kb(a,b,c),h(a,b,d,e);case 3:return r(b),e=b.updateQueue,null!==e?(d=b.memoizedState,e=Le(a,b,e,null,null,c),d===e?(I(),b=n(a,b)):(d=e.element,g=b.stateNode,(null===a||null===a.child)&&g.hydrate&&T(b)?(b.effectTag|=2,b.child=bf(b,b.child,d,c)):(I(),f(a,b,d)),b.memoizedState=e,b=b.child)):(I(),b=n(a,b)),b;case 5:L(b);null===a&&z(b);e=b.type;var l=b.memoizedProps;d=b.pendingProps;null===d&&(d=l,null===d?D("154"):void 0);g=null!==a?a.memoizedProps:
30346null;X.current||null!==d&&l!==d?(l=d.children,u(e,d)?l=null:g&&u(e,g)&&(b.effectTag|=16),k(a,b),2147483647!==c&&!x&&F(e,d)?(b.expirationTime=2147483647,b=null):(f(a,b,l),b.memoizedProps=d,b=b.child)):b=n(a,b);return b;case 6:return null===a&&z(b),a=b.pendingProps,null===a&&(a=b.memoizedProps),b.memoizedProps=a,null;case 8:b.tag=7;case 7:e=b.pendingProps;if(X.current)null===e&&(e=a&&a.memoizedProps,null===e?D("154"):void 0);else if(null===e||b.memoizedProps===e)e=b.memoizedProps;d=e.children;b.stateNode=
30347null===a?bf(b,b.stateNode,d,c):a.child===b.child?$e(b,b.stateNode,d,c):af(b,b.stateNode,d,c);b.memoizedProps=e;return b.stateNode;case 9:return null;case 4:a:{G(b,b.stateNode.containerInfo);e=b.pendingProps;if(X.current)null===e&&(e=a&&a.memoizedProps,null==e?D("154"):void 0);else if(null===e||b.memoizedProps===e){b=n(a,b);break a}null===a?b.child=af(b,b.child,e,c):f(a,b,e);b.memoizedProps=e;b=b.child}return b;case 10:a:{c=b.pendingProps;if(X.current)null===c&&(c=b.memoizedProps);else if(null===c||
30348b.memoizedProps===c){b=n(a,b);break a}f(a,b,c);b.memoizedProps=c;b=b.child}return b;default:D("156")}},beginFailedWork:function(a,b,c){switch(b.tag){case 2:me(b);break;case 3:r(b);break;default:D("157")}b.effectTag|=64;null===a?b.child=null:b.child!==a.child&&(b.child=a.child);if(0===b.expirationTime||b.expirationTime>c)return y(a,b);b.firstEffect=null;b.lastEffect=null;g(a,b,null,c);2===b.tag&&(a=b.stateNode,b.memoizedProps=a.props,b.memoizedState=a.state);return b.child}}}
30349function df(a,b,c){function d(a){a.effectTag|=4}var e=a.createInstance,f=a.createTextInstance,g=a.appendInitialChild,k=a.finalizeInitialChildren,h=a.prepareUpdate,r=a.persistence,n=b.getRootHostContainer,y=b.popHostContext,u=b.getHostContext,x=b.popHostContainer,F=c.prepareToHydrateHostInstance,L=c.prepareToHydrateHostTextInstance,G=c.popHydrationState,T=void 0,I=void 0,z=void 0;a.mutation?(T=function(){},I=function(a,b,c){(b.updateQueue=c)&&d(b)},z=function(a,b,c,e){c!==e&&d(b)}):r?D("235"):D("236");
30350return{completeWork:function(a,b,c){var p=b.pendingProps;if(null===p)p=b.memoizedProps;else if(2147483647!==b.expirationTime||2147483647===c)b.pendingProps=null;switch(b.tag){case 1:return null;case 2:return je(b),null;case 3:x(b);V(X,b);V(ee,b);p=b.stateNode;p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null);if(null===a||null===a.child)G(b),b.effectTag&=-3;T(b);return null;case 5:y(b);c=n();var v=b.type;if(null!==a&&null!=b.stateNode){var l=a.memoizedProps,t=b.stateNode,r=u();t=
30351h(t,v,l,p,c,r);I(a,b,t,v,l,p,c);a.ref!==b.ref&&(b.effectTag|=128)}else{if(!p)return null===b.stateNode?D("166"):void 0,null;a=u();if(G(b))F(b,c,a)&&d(b);else{a=e(v,p,c,a,b);a:for(l=b.child;null!==l;){if(5===l.tag||6===l.tag)g(a,l.stateNode);else if(4!==l.tag&&null!==l.child){l.child["return"]=l;l=l.child;continue}if(l===b)break;for(;null===l.sibling;){if(null===l["return"]||l["return"]===b)break a;l=l["return"]}l.sibling["return"]=l["return"];l=l.sibling}k(a,v,p,c)&&d(b);b.stateNode=a}null!==b.ref&&
30352(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)z(a,b,a.memoizedProps,p);else{if("string"!==typeof p)return null===b.stateNode?D("166"):void 0,null;a=n();c=u();G(b)?L(b)&&d(b):b.stateNode=f(p,a,c,b)}return null;case 7:(p=b.memoizedProps)?void 0:D("165");b.tag=8;v=[];a:for((l=b.stateNode)&&(l["return"]=b);null!==l;){if(5===l.tag||6===l.tag||4===l.tag)D("247");else if(9===l.tag)v.push(l.type);else if(null!==l.child){l.child["return"]=l;l=l.child;continue}for(;null===l.sibling;){if(null===
30353l["return"]||l["return"]===b)break a;l=l["return"]}l.sibling["return"]=l["return"];l=l.sibling}l=p.handler;p=l(p.props,v);b.child=$e(b,null!==a?a.child:null,p,c);return b.child;case 8:return b.tag=7,null;case 9:return null;case 10:return null;case 4:return x(b),T(b),null;case 0:D("167");default:D("156")}}}}
30354function ef(a,b){function c(a){var c=a.ref;if(null!==c)try{c(null)}catch(v){b(a,v)}}function d(a){"function"===typeof Ae&&Ae(a);switch(a.tag){case 2:c(a);var d=a.stateNode;if("function"===typeof d.componentWillUnmount)try{d.props=a.memoizedProps,d.state=a.memoizedState,d.componentWillUnmount()}catch(v){b(a,v)}break;case 5:c(a);break;case 7:e(a.stateNode);break;case 4:h&&g(a)}}function e(a){for(var b=a;;)if(d(b),null===b.child||h&&4===b.tag){if(b===a)break;for(;null===b.sibling;){if(null===b["return"]||
30355b["return"]===a)return;b=b["return"]}b.sibling["return"]=b["return"];b=b.sibling}else b.child["return"]=b,b=b.child}function f(a){return 5===a.tag||3===a.tag||4===a.tag}function g(a){for(var b=a,c=!1,f=void 0,g=void 0;;){if(!c){c=b["return"];a:for(;;){null===c?D("160"):void 0;switch(c.tag){case 5:f=c.stateNode;g=!1;break a;case 3:f=c.stateNode.containerInfo;g=!0;break a;case 4:f=c.stateNode.containerInfo;g=!0;break a}c=c["return"]}c=!0}if(5===b.tag||6===b.tag)e(b),g?I(f,b.stateNode):T(f,b.stateNode);
30356else if(4===b.tag?f=b.stateNode.containerInfo:d(b),null!==b.child){b.child["return"]=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b["return"]||b["return"]===a)return;b=b["return"];4===b.tag&&(c=!1)}b.sibling["return"]=b["return"];b=b.sibling}}var k=a.getPublicInstance,h=a.mutation;a=a.persistence;h||(a?D("235"):D("236"));var r=h.commitMount,n=h.commitUpdate,y=h.resetTextContent,u=h.commitTextUpdate,x=h.appendChild,F=h.appendChildToContainer,L=h.insertBefore,G=h.insertInContainerBefore,
30357T=h.removeChild,I=h.removeChildFromContainer;return{commitResetTextContent:function(a){y(a.stateNode)},commitPlacement:function(a){a:{for(var b=a["return"];null!==b;){if(f(b)){var c=b;break a}b=b["return"]}D("160");c=void 0}var d=b=void 0;switch(c.tag){case 5:b=c.stateNode;d=!1;break;case 3:b=c.stateNode.containerInfo;d=!0;break;case 4:b=c.stateNode.containerInfo;d=!0;break;default:D("161")}c.effectTag&16&&(y(b),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c["return"]||f(c["return"])){c=
30358null;break a}c=c["return"]}c.sibling["return"]=c["return"];for(c=c.sibling;5!==c.tag&&6!==c.tag;){if(c.effectTag&2)continue b;if(null===c.child||4===c.tag)continue b;else c.child["return"]=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var e=a;;){if(5===e.tag||6===e.tag)c?d?G(b,e.stateNode,c):L(b,e.stateNode,c):d?F(b,e.stateNode):x(b,e.stateNode);else if(4!==e.tag&&null!==e.child){e.child["return"]=e;e=e.child;continue}if(e===a)break;for(;null===e.sibling;){if(null===e["return"]||e["return"]===
30359a)return;e=e["return"]}e.sibling["return"]=e["return"];e=e.sibling}},commitDeletion:function(a){g(a);a["return"]=null;a.child=null;a.alternate&&(a.alternate.child=null,a.alternate["return"]=null)},commitWork:function(a,b){switch(b.tag){case 2:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&n(c,f,e,a,d,b)}break;case 6:null===b.stateNode?D("162"):void 0;c=b.memoizedProps;u(b.stateNode,null!==a?a.memoizedProps:
30360c,c);break;case 3:break;default:D("163")}},commitLifeCycles:function(a,b){switch(b.tag){case 2:var c=b.stateNode;if(b.effectTag&4)if(null===a)c.props=b.memoizedProps,c.state=b.memoizedState,c.componentDidMount();else{var d=a.memoizedProps;a=a.memoizedState;c.props=b.memoizedProps;c.state=b.memoizedState;c.componentDidUpdate(d,a)}b=b.updateQueue;null!==b&&Me(b,c);break;case 3:c=b.updateQueue;null!==c&&Me(c,null!==b.child?b.child.stateNode:null);break;case 5:c=b.stateNode;null===a&&b.effectTag&4&&r(c,
30361b.type,b.memoizedProps,b);break;case 6:break;case 4:break;default:D("163")}},commitAttachRef:function(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:b(k(c));break;default:b(c)}}},commitDetachRef:function(a){a=a.ref;null!==a&&a(null)}}}var ff={};
30362function gf(a){function b(a){a===ff?D("174"):void 0;return a}var c=a.getChildHostContext,d=a.getRootHostContext,e={current:ff},f={current:ff},g={current:ff};return{getHostContext:function(){return b(e.current)},getRootHostContainer:function(){return b(g.current)},popHostContainer:function(a){V(e,a);V(f,a);V(g,a)},popHostContext:function(a){f.current===a&&(V(e,a),V(f,a))},pushHostContainer:function(a,b){W(g,b,a);b=d(b);W(f,a,a);W(e,b,a)},pushHostContext:function(a){var d=b(g.current),k=b(e.current);
30363d=c(k,a.type,d);k!==d&&(W(f,a,a),W(e,d,a))},resetHostContainer:function(){e.current=ff;g.current=ff}}}
30364function hf(a){function b(a,b){var c=new Y(5,null,0);c.type="DELETED";c.stateNode=b;c["return"]=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function c(a,b){switch(a.tag){case 5:return b=f(b,a.type,a.pendingProps),null!==b?(a.stateNode=b,!0):!1;case 6:return b=g(b,a.pendingProps),null!==b?(a.stateNode=b,!0):!1;default:return!1}}function d(a){for(a=a["return"];null!==a&&5!==a.tag&&3!==a.tag;)a=a["return"];y=a}var e=a.shouldSetTextContent;
30365a=a.hydration;if(!a)return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){D("175")},prepareToHydrateHostTextInstance:function(){D("176")},popHydrationState:function(){return!1}};var f=a.canHydrateInstance,g=a.canHydrateTextInstance,k=a.getNextHydratableSibling,h=a.getFirstHydratableChild,r=a.hydrateInstance,n=a.hydrateTextInstance,y=null,u=null,x=!1;return{enterHydrationState:function(a){u=
30366h(a.stateNode.containerInfo);y=a;return x=!0},resetHydrationState:function(){u=y=null;x=!1},tryToClaimNextHydratableInstance:function(a){if(x){var d=u;if(d){if(!c(a,d)){d=k(d);if(!d||!c(a,d)){a.effectTag|=2;x=!1;y=a;return}b(y,u)}y=a;u=h(d)}else a.effectTag|=2,x=!1,y=a}},prepareToHydrateHostInstance:function(a,b,c){b=r(a.stateNode,a.type,a.memoizedProps,b,c,a);a.updateQueue=b;return null!==b?!0:!1},prepareToHydrateHostTextInstance:function(a){return n(a.stateNode,a.memoizedProps,a)},popHydrationState:function(a){if(a!==
30367y)return!1;if(!x)return d(a),x=!0,!1;var c=a.type;if(5!==a.tag||"head"!==c&&"body"!==c&&!e(c,a.memoizedProps))for(c=u;c;)b(a,c),c=k(c);d(a);u=y?k(a.stateNode):null;return!0}}}
30368function jf(a){function b(a){Lb=ma=!0;var b=a.stateNode;b.current===a?D("177"):void 0;b.isReadyForCommit=!1;ed.current=null;if(1<a.effectTag)if(null!==a.lastEffect){a.lastEffect.nextEffect=a;var c=a.firstEffect}else c=a;else c=a.firstEffect;vg();for(q=c;null!==q;){var d=!1,e=void 0;try{for(;null!==q;){var f=q.effectTag;f&16&&wg(q);if(f&128){var g=q.alternate;null!==g&&xg(g)}switch(f&-242){case 2:He(q);q.effectTag&=-3;break;case 6:He(q);q.effectTag&=-3;Ie(q.alternate,q);break;case 4:Ie(q.alternate,
30369q);break;case 8:Lc=!0,yg(q),Lc=!1}q=q.nextEffect}}catch(Mc){d=!0,e=Mc}d&&(null===q?D("178"):void 0,k(q,e),null!==q&&(q=q.nextEffect))}zg();b.current=a;for(q=c;null!==q;){c=!1;d=void 0;try{for(;null!==q;){var h=q.effectTag;h&36&&Ag(q.alternate,q);h&128&&Bg(q);if(h&64)switch(e=q,f=void 0,null!==P&&(f=P.get(e),P["delete"](e),null==f&&null!==e.alternate&&(e=e.alternate,f=P.get(e),P["delete"](e))),null==f?D("184"):void 0,e.tag){case 2:e.stateNode.componentDidCatch(f.error,{componentStack:f.componentStack});
30370break;case 3:null===ba&&(ba=f.error);break;default:D("157")}var Fa=q.nextEffect;q.nextEffect=null;q=Fa}}catch(Mc){c=!0,d=Mc}c&&(null===q?D("178"):void 0,k(q,d),null!==q&&(q=q.nextEffect))}ma=Lb=!1;"function"===typeof ze&&ze(a.stateNode);fa&&(fa.forEach(F),fa=null);null!==ba&&(a=ba,ba=null,v(a));b=b.current.expirationTime;0===b&&(na=P=null);return b}function c(a){for(;;){var b=og(a.alternate,a,J),c=a["return"],d=a.sibling;var e=a;if(2147483647===J||2147483647!==e.expirationTime){if(2!==e.tag&&3!==
30371e.tag)var f=0;else f=e.updateQueue,f=null===f?0:f.expirationTime;for(var g=e.child;null!==g;)0!==g.expirationTime&&(0===f||f>g.expirationTime)&&(f=g.expirationTime),g=g.sibling;e.expirationTime=f}if(null!==b)return b;null!==c&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1<a.effectTag&&(null!==c.lastEffect?c.lastEffect.nextEffect=a:c.firstEffect=a,c.lastEffect=a));if(null!==d)return d;
30372if(null!==c)a=c;else{a.stateNode.isReadyForCommit=!0;break}}return null}function d(a){var b=w(a.alternate,a,J);null===b&&(b=c(a));ed.current=null;return b}function e(a){var b=ng(a.alternate,a,J);null===b&&(b=c(a));ed.current=null;return b}function f(a){if(null!==P){if(!(0===J||J>a))if(J<=Nc)for(;null!==E;)E=h(E)?e(E):d(E);else for(;null!==E&&!p();)E=h(E)?e(E):d(E)}else if(!(0===J||J>a))if(J<=Nc)for(;null!==E;)E=d(E);else for(;null!==E&&!p();)E=d(E)}function g(a,b){ma?D("243"):void 0;ma=!0;a.isReadyForCommit=
30373!1;if(a!==eb||b!==J||null===E){for(;-1<de;)ce[de]=null,de--;fe=C;ee.current=C;X.current=!1;mg();eb=a;J=b;E=oe(eb.current,null,b)}var c=!1,d=null;try{f(b)}catch(Kc){c=!0,d=Kc}for(;c;){if(fb){ba=d;break}var g=E;if(null===g)fb=!0;else{var h=k(g,d);null===h?D("183"):void 0;if(!fb){try{c=h;d=b;for(h=c;null!==g;){switch(g.tag){case 2:je(g);break;case 5:l(g);break;case 3:Fe(g);break;case 4:Fe(g)}if(g===h||g.alternate===h)break;g=g["return"]}E=e(c);f(d)}catch(Kc){c=!0;d=Kc;continue}break}}}b=ba;fb=ma=!1;
30374ba=null;null!==b&&v(b);return a.isReadyForCommit?a.current.alternate:null}function k(a,b){var c=ed.current=null,d=!1,e=!1,f=null;if(3===a.tag)c=a,r(a)&&(fb=!0);else for(var g=a["return"];null!==g&&null===c;){2===g.tag?"function"===typeof g.stateNode.componentDidCatch&&(d=!0,f=fd(g),c=g,e=!0):3===g.tag&&(c=g);if(r(g)){if(Lc||null!==fa&&(fa.has(g)||null!==g.alternate&&fa.has(g.alternate)))return null;c=null;e=!1}g=g["return"]}if(null!==c){null===na&&(na=new Set);na.add(c);var h="";g=a;do{a:switch(g.tag){case 0:case 1:case 2:case 5:var k=
30375g._debugOwner,l=g._debugSource;var Fa=fd(g);var n=null;k&&(n=fd(k));k=l;Fa="\n in "+(Fa||"Unknown")+(k?" (at "+k.fileName.replace(/^.*[\\\/]/,"")+":"+k.lineNumber+")":n?" (created by "+n+")":"");break a;default:Fa=""}h+=Fa;g=g["return"]}while(g);g=h;a=fd(a);null===P&&(P=new Map);b={componentName:a,componentStack:g,error:b,errorBoundary:d?c.stateNode:null,errorBoundaryFound:d,errorBoundaryName:f,willRetry:e};P.set(c,b);try{console.error(b.error)}catch(Cg){console.error(Cg)}Lb?(null===fa&&(fa=new Set),
30376fa.add(c)):F(c);return c}null===ba&&(ba=b);return null}function h(a){return null!==P&&(P.has(a)||null!==a.alternate&&P.has(a.alternate))}function r(a){return null!==na&&(na.has(a)||null!==a.alternate&&na.has(a.alternate))}function n(){return 20*(((L()+100)/20|0)+1)}function y(a){return 0!==ja?ja:ma?Lb?1:J:!Dg||a.internalContextTag&1?n():1}function u(a,b){return x(a,b,!1)}function x(a,b){for(;null!==a;){if(0===a.expirationTime||a.expirationTime>b)a.expirationTime=b;null!==a.alternate&&(0===a.alternate.expirationTime||
30377a.alternate.expirationTime>b)&&(a.alternate.expirationTime=b);if(null===a["return"])if(3===a.tag){var c=a.stateNode;!ma&&c===eb&&b<=J&&(E=eb=null,J=0);var d=b;Mb>Eg&&D("185");if(null===c.nextScheduledRoot)c.remainingExpirationTime=d,null===M?(oa=M=c,c.nextScheduledRoot=c):(M=M.nextScheduledRoot=c,M.nextScheduledRoot=oa);else{var e=c.remainingExpirationTime;if(0===e||d<e)c.remainingExpirationTime=d}Ga||(ka?Nb&&z(c,1):1===d?I(1,null):gb||(gb=!0,Je(T)))}else break;a=a["return"]}}function F(a){x(a,1,
30378!0)}function L(){return Nc=((Ke()-Fg)/10|0)+2}function G(){var a=0,b=null;if(null!==M)for(var c=M,d=oa;null!==d;){var e=d.remainingExpirationTime;if(0===e){null===c||null===M?D("244"):void 0;if(d===d.nextScheduledRoot){oa=M=d.nextScheduledRoot=null;break}else if(d===oa)oa=e=d.nextScheduledRoot,M.nextScheduledRoot=e,d.nextScheduledRoot=null;else if(d===M){M=c;M.nextScheduledRoot=oa;d.nextScheduledRoot=null;break}else c.nextScheduledRoot=d.nextScheduledRoot,d.nextScheduledRoot=null;d=c.nextScheduledRoot}else{if(0===
30379a||e<a)a=e,b=d;if(d===M)break;c=d;d=d.nextScheduledRoot}}c=pa;null!==c&&c===b?Mb++:Mb=0;pa=b;Ob=a}function T(a){I(0,a)}function I(a,b){hb=b;for(G();null!==pa&&0!==Ob&&(0===a||Ob<=a)&&!Oc;)z(pa,Ob),G();null!==hb&&(gb=!1);null===pa||gb||(gb=!0,Je(T));hb=null;Oc=!1;Mb=0;if(Pb)throw a=Pc,Pc=null,Pb=!1,a;}function z(a,c){Ga?D("245"):void 0;Ga=!0;if(c<=L()){var d=a.finishedWork;null!==d?(a.finishedWork=null,a.remainingExpirationTime=b(d)):(a.finishedWork=null,d=g(a,c),null!==d&&(a.remainingExpirationTime=
30380b(d)))}else d=a.finishedWork,null!==d?(a.finishedWork=null,a.remainingExpirationTime=b(d)):(a.finishedWork=null,d=g(a,c),null!==d&&(p()?a.finishedWork=d:a.remainingExpirationTime=b(d)));Ga=!1}function p(){return null===hb||hb.timeRemaining()>Gg?!1:Oc=!0}function v(a){null===pa?D("246"):void 0;pa.remainingExpirationTime=0;Pb||(Pb=!0,Pc=a)}var t=gf(a),Kb=hf(a),Fe=t.popHostContainer,l=t.popHostContext,mg=t.resetHostContainer,Ge=cf(a,t,Kb,u,y),w=Ge.beginWork,ng=Ge.beginFailedWork,og=df(a,t,Kb).completeWork;
30381t=ef(a,k);var wg=t.commitResetTextContent,He=t.commitPlacement,yg=t.commitDeletion,Ie=t.commitWork,Ag=t.commitLifeCycles,Bg=t.commitAttachRef,xg=t.commitDetachRef,Ke=a.now,Je=a.scheduleDeferredCallback,Dg=a.useSyncScheduling,vg=a.prepareForCommit,zg=a.resetAfterCommit,Fg=Ke(),Nc=2,ja=0,ma=!1,E=null,eb=null,J=0,q=null,P=null,na=null,fa=null,ba=null,fb=!1,Lb=!1,Lc=!1,oa=null,M=null,gb=!1,Ga=!1,pa=null,Ob=0,Oc=!1,Pb=!1,Pc=null,hb=null,ka=!1,Nb=!1,Eg=1E3,Mb=0,Gg=1;return{computeAsyncExpiration:n,computeExpirationForFiber:y,
30382scheduleWork:u,batchedUpdates:function(a,b){var c=ka;ka=!0;try{return a(b)}finally{(ka=c)||Ga||I(1,null)}},unbatchedUpdates:function(a){if(ka&&!Nb){Nb=!0;try{return a()}finally{Nb=!1}}return a()},flushSync:function(a){var b=ka;ka=!0;try{a:{var c=ja;ja=1;try{var d=a();break a}finally{ja=c}d=void 0}return d}finally{ka=b,Ga?D("187"):void 0,I(1,null)}},deferredUpdates:function(a){var b=ja;ja=n();try{return a()}finally{ja=b}}}}
30383function kf(a){function b(a){a=kd(a);return null===a?null:a.stateNode}var c=a.getPublicInstance;a=jf(a);var d=a.computeAsyncExpiration,e=a.computeExpirationForFiber,f=a.scheduleWork;return{createContainer:function(a,b){var c=new Y(3,null,0);a={current:c,containerInfo:a,pendingChildren:null,remainingExpirationTime:0,isReadyForCommit:!1,finishedWork:null,context:null,pendingContext:null,hydrate:b,nextScheduledRoot:null};return c.stateNode=a},updateContainer:function(a,b,c,r){var g=b.current;if(c){c=
30384c._reactInternalFiber;var h;b:{2===gd(c)&&2===c.tag?void 0:D("170");for(h=c;3!==h.tag;){if(he(h)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}(h=h["return"])?void 0:D("171")}h=h.stateNode.context}c=he(c)?le(c,h):h}else c=C;null===b.context?b.context=c:b.pendingContext=c;b=r;b=void 0===b?null:b;r=null!=a&&null!=a.type&&null!=a.type.prototype&&!0===a.type.prototype.unstable_isAsyncReactComponent?d():e(g);De(g,{expirationTime:r,partialState:{element:a},callback:b,isReplace:!1,isForced:!1,
30385nextCallback:null,next:null});f(g,r)},batchedUpdates:a.batchedUpdates,unbatchedUpdates:a.unbatchedUpdates,deferredUpdates:a.deferredUpdates,flushSync:a.flushSync,getPublicRootInstance:function(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return c(a.child.stateNode);default:return a.child.stateNode}},findHostInstance:b,findHostInstanceWithNoPortals:function(a){a=ld(a);return null===a?null:a.stateNode},injectIntoDevTools:function(a){var c=a.findFiberByHostInstance;return ye(A({},
30386a,{findHostInstanceByFiber:function(a){return b(a)},findFiberByHostInstance:function(a){return c?c(a):null}}))}}}var lf=Object.freeze({default:kf}),mf=lf&&kf||lf,nf=mf["default"]?mf["default"]:mf,of="object"===typeof performance&&"function"===typeof performance.now,pf=void 0;pf=of?function(){return performance.now()}:function(){return Date.now()};var qf=void 0;
30387if(m.canUseDOM)if("function"!==typeof requestIdleCallback){var rf=null,sf=!1,tf=!1,uf=0,vf=33,wf=33,xf;xf=of?{timeRemaining:function(){return uf-performance.now()}}:{timeRemaining:function(){return uf-Date.now()}};var yf="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(a){a.source===window&&a.data===yf&&(sf=!1,a=rf,rf=null,null!==a&&a(xf))},!1);var zf=function(a){tf=!1;var b=a-uf+wf;b<wf&&vf<wf?(8>b&&(b=8),wf=b<vf?vf:b):vf=b;uf=a+wf;sf||(sf=!0,
30388window.postMessage(yf,"*"))};qf=function(a){rf=a;tf||(tf=!0,requestAnimationFrame(zf));return 0}}else qf=requestIdleCallback;else qf=function(a){setTimeout(function(){a({timeRemaining:function(){return Infinity}})});return 0};
30389var Af=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Bf={},Cf={};function Df(a){if(Cf.hasOwnProperty(a))return!0;if(Bf.hasOwnProperty(a))return!1;if(Af.test(a))return Cf[a]=!0;Bf[a]=!0;return!1}
30390function Ef(a,b,c){var d=ua(b);if(d&&ta(b,c)){var e=d.mutationMethod;e?e(a,c):null==c||d.hasBooleanValue&&!c||d.hasNumericValue&&isNaN(c)||d.hasPositiveNumericValue&&1>c||d.hasOverloadedBooleanValue&&!1===c?Ff(a,b):d.mustUseProperty?a[d.propertyName]=c:(b=d.attributeName,(e=d.attributeNamespace)?a.setAttributeNS(e,b,""+c):d.hasBooleanValue||d.hasOverloadedBooleanValue&&!0===c?a.setAttribute(b,""):a.setAttribute(b,""+c))}else Gf(a,b,ta(b,c)?c:null)}
30391function Gf(a,b,c){Df(b)&&(null==c?a.removeAttribute(b):a.setAttribute(b,""+c))}function Ff(a,b){var c=ua(b);c?(b=c.mutationMethod)?b(a,void 0):c.mustUseProperty?a[c.propertyName]=c.hasBooleanValue?!1:"":a.removeAttribute(c.attributeName):a.removeAttribute(b)}
30392function Hf(a,b){var c=b.value,d=b.checked;return A({type:void 0,step:void 0,min:void 0,max:void 0},b,{defaultChecked:void 0,defaultValue:void 0,value:null!=c?c:a._wrapperState.initialValue,checked:null!=d?d:a._wrapperState.initialChecked})}function If(a,b){var c=b.defaultValue;a._wrapperState={initialChecked:null!=b.checked?b.checked:b.defaultChecked,initialValue:null!=b.value?b.value:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}
30393function Jf(a,b){var c=b.checked;null!=c&&Ef(a,"checked",c||!1);c=b.value;if(null!=c)if(0===c&&""===a.value)a.value="0";else if("number"===b.type){if(b=parseFloat(a.value)||0,c!=b||c==b&&a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else null==b.value&&null!=b.defaultValue&&a.defaultValue!==""+b.defaultValue&&(a.defaultValue=""+b.defaultValue),null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}
30394function Kf(a,b){switch(b.type){case "submit":case "reset":break;case "color":case "date":case "datetime":case "datetime-local":case "month":case "time":case "week":a.value="";a.value=a.defaultValue;break;default:a.value=a.value}b=a.name;""!==b&&(a.name="");a.defaultChecked=!a.defaultChecked;a.defaultChecked=!a.defaultChecked;""!==b&&(a.name=b)}function Lf(a){var b="";aa.Children.forEach(a,function(a){null==a||"string"!==typeof a&&"number"!==typeof a||(b+=a)});return b}
30395function Mf(a,b){a=A({children:void 0},b);if(b=Lf(b.children))a.children=b;return a}function Nf(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+c;b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}
30396function Of(a,b){var c=b.value;a._wrapperState={initialValue:null!=c?c:b.defaultValue,wasMultiple:!!b.multiple}}function Pf(a,b){null!=b.dangerouslySetInnerHTML?D("91"):void 0;return A({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Qf(a,b){var c=b.value,d=c;null==c&&(c=b.defaultValue,b=b.children,null!=b&&(null!=c?D("92"):void 0,Array.isArray(b)&&(1>=b.length?void 0:D("93"),b=b[0]),c=""+b),null==c&&(c=""),d=c);a._wrapperState={initialValue:""+d}}
30397function Rf(a,b){var c=b.value;null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&(a.defaultValue=c));null!=b.defaultValue&&(a.defaultValue=b.defaultValue)}function Sf(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var Tf={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
30398function Uf(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Vf(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Uf(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}
30399var Wf=void 0,Xf=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Tf.svg||"innerHTML"in a)a.innerHTML=b;else{Wf=Wf||document.createElement("div");Wf.innerHTML="\x3csvg\x3e"+b+"\x3c/svg\x3e";for(b=Wf.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}),Yf=/["'&<>]/;
30400function Zf(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}
30401m.canUseDOM&&("textContent"in document.documentElement||(Zf=function(a,b){if(3===a.nodeType)a.nodeValue=b;else{if("boolean"===typeof b||"number"===typeof b)b=""+b;else{b=""+b;var c=Yf.exec(b);if(c){var d="",e,f=0;for(e=c.index;e<b.length;e++){switch(b.charCodeAt(e)){case 34:c="\x26quot;";break;case 38:c="\x26amp;";break;case 39:c="\x26#x27;";break;case 60:c="\x26lt;";break;case 62:c="\x26gt;";break;default:continue}f!==e&&(d+=b.substring(f,e));f=e+1;d+=c}b=f!==e?d+b.substring(f,e):d}}Xf(a,b)}}));
30402var $f=Zf,ag={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,
30403floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bg=["Webkit","ms","Moz","O"];Object.keys(ag).forEach(function(a){bg.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);ag[b]=ag[a]})});
30404function cg(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--");var e=c;var f=b[c];e=null==f||"boolean"===typeof f||""===f?"":d||"number"!==typeof f||0===f||ag.hasOwnProperty(e)&&ag[e]?(""+f).trim():f+"px";"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var dg=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});
30405function eg(a,b,c){b&&(dg[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?D("137",a,c()):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?D("60"):void 0,"object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML?void 0:D("61")),null!=b.style&&"object"!==typeof b.style?D("62",c()):void 0)}
30406function fg(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}var gg=Tf.html,hg=B.thatReturns("");
30407function ig(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Dd(a);b=Ra[b];for(var d=0;d<b.length;d++){var e=b[d];c.hasOwnProperty(e)&&c[e]||("topWheel"===e?yc("wheel")?U("topWheel","wheel",a):yc("mousewheel")?U("topWheel","mousewheel",a):U("topWheel","DOMMouseScroll",a):"topScroll"===e?sd("topScroll","scroll",a):"topFocus"===e||"topBlur"===e?(sd("topFocus","focus",a),sd("topBlur","blur",a),c.topBlur=!0,c.topFocus=!0):"topCancel"===e?(yc("cancel",!0)&&sd("topCancel","cancel",a),c.topCancel=
30408!0):"topClose"===e?(yc("close",!0)&&sd("topClose","close",a),c.topClose=!0):zd.hasOwnProperty(e)&&U(e,zd[e],a),c[e]=!0)}}
30409var jg={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",
30410topWaiting:"waiting"};function kg(a,b,c,d){c=9===c.nodeType?c:c.ownerDocument;d===gg&&(d=Uf(a));d===gg?"script"===a?(a=c.createElement("div"),a.innerHTML="\x3cscript\x3e\x3c/script\x3e",a=a.removeChild(a.firstChild)):a="string"===typeof b.is?c.createElement(a,{is:b.is}):c.createElement(a):a=c.createElementNS(d,a);return a}function lg(a,b){return(9===b.nodeType?b:b.ownerDocument).createTextNode(a)}
30411function pg(a,b,c,d){var e=fg(b,c);switch(b){case "iframe":case "object":U("topLoad","load",a);var f=c;break;case "video":case "audio":for(f in jg)jg.hasOwnProperty(f)&&U(f,jg[f],a);f=c;break;case "source":U("topError","error",a);f=c;break;case "img":case "image":U("topError","error",a);U("topLoad","load",a);f=c;break;case "form":U("topReset","reset",a);U("topSubmit","submit",a);f=c;break;case "details":U("topToggle","toggle",a);f=c;break;case "input":If(a,c);f=Hf(a,c);U("topInvalid","invalid",a);
30412ig(d,"onChange");break;case "option":f=Mf(a,c);break;case "select":Of(a,c);f=A({},c,{value:void 0});U("topInvalid","invalid",a);ig(d,"onChange");break;case "textarea":Qf(a,c);f=Pf(a,c);U("topInvalid","invalid",a);ig(d,"onChange");break;default:f=c}eg(b,f,hg);var g=f,k;for(k in g)if(g.hasOwnProperty(k)){var h=g[k];"style"===k?cg(a,h,hg):"dangerouslySetInnerHTML"===k?(h=h?h.__html:void 0,null!=h&&Xf(a,h)):"children"===k?"string"===typeof h?("textarea"!==b||""!==h)&&$f(a,h):"number"===typeof h&&$f(a,
30413""+h):"suppressContentEditableWarning"!==k&&"suppressHydrationWarning"!==k&&"autoFocus"!==k&&(Qa.hasOwnProperty(k)?null!=h&&ig(d,k):e?Gf(a,k,h):null!=h&&Ef(a,k,h))}switch(b){case "input":Bc(a);Kf(a,c);break;case "textarea":Bc(a);Sf(a,c);break;case "option":null!=c.value&&a.setAttribute("value",c.value);break;case "select":a.multiple=!!c.multiple;b=c.value;null!=b?Nf(a,!!c.multiple,b,!1):null!=c.defaultValue&&Nf(a,!!c.multiple,c.defaultValue,!0);break;default:"function"===typeof f.onClick&&(a.onclick=
30414B)}}
30415function qg(a,b,c,d,e){var f=null;switch(b){case "input":c=Hf(a,c);d=Hf(a,d);f=[];break;case "option":c=Mf(a,c);d=Mf(a,d);f=[];break;case "select":c=A({},c,{value:void 0});d=A({},d,{value:void 0});f=[];break;case "textarea":c=Pf(a,c);d=Pf(a,d);f=[];break;default:"function"!==typeof c.onClick&&"function"===typeof d.onClick&&(a.onclick=B)}eg(b,d,hg);var g,k;a=null;for(g in c)if(!d.hasOwnProperty(g)&&c.hasOwnProperty(g)&&null!=c[g])if("style"===g)for(k in b=c[g],b)b.hasOwnProperty(k)&&(a||(a={}),a[k]=
30416"");else"dangerouslySetInnerHTML"!==g&&"children"!==g&&"suppressContentEditableWarning"!==g&&"suppressHydrationWarning"!==g&&"autoFocus"!==g&&(Qa.hasOwnProperty(g)?f||(f=[]):(f=f||[]).push(g,null));for(g in d){var h=d[g];b=null!=c?c[g]:void 0;if(d.hasOwnProperty(g)&&h!==b&&(null!=h||null!=b))if("style"===g)if(b){for(k in b)!b.hasOwnProperty(k)||h&&h.hasOwnProperty(k)||(a||(a={}),a[k]="");for(k in h)h.hasOwnProperty(k)&&b[k]!==h[k]&&(a||(a={}),a[k]=h[k])}else a||(f||(f=[]),f.push(g,a)),a=h;else"dangerouslySetInnerHTML"===
30417g?(h=h?h.__html:void 0,b=b?b.__html:void 0,null!=h&&b!==h&&(f=f||[]).push(g,""+h)):"children"===g?b===h||"string"!==typeof h&&"number"!==typeof h||(f=f||[]).push(g,""+h):"suppressContentEditableWarning"!==g&&"suppressHydrationWarning"!==g&&(Qa.hasOwnProperty(g)?(null!=h&&ig(e,g),f||b===h||(f=[])):(f=f||[]).push(g,h))}a&&(f=f||[]).push("style",a);return f}
30418function rg(a,b,c,d,e){fg(c,d);d=fg(c,e);for(var f=0;f<b.length;f+=2){var g=b[f],k=b[f+1];"style"===g?cg(a,k,hg):"dangerouslySetInnerHTML"===g?Xf(a,k):"children"===g?$f(a,k):d?null!=k?Gf(a,g,k):a.removeAttribute(g):null!=k?Ef(a,g,k):Ff(a,g)}switch(c){case "input":Jf(a,e);Cc(a);break;case "textarea":Rf(a,e);break;case "select":a._wrapperState.initialValue=void 0,b=a._wrapperState.wasMultiple,a._wrapperState.wasMultiple=!!e.multiple,c=e.value,null!=c?Nf(a,!!e.multiple,c,!1):b!==!!e.multiple&&(null!=
30419e.defaultValue?Nf(a,!!e.multiple,e.defaultValue,!0):Nf(a,!!e.multiple,e.multiple?[]:"",!1))}}
30420function sg(a,b,c,d,e){switch(b){case "iframe":case "object":U("topLoad","load",a);break;case "video":case "audio":for(var f in jg)jg.hasOwnProperty(f)&&U(f,jg[f],a);break;case "source":U("topError","error",a);break;case "img":case "image":U("topError","error",a);U("topLoad","load",a);break;case "form":U("topReset","reset",a);U("topSubmit","submit",a);break;case "details":U("topToggle","toggle",a);break;case "input":If(a,c);U("topInvalid","invalid",a);ig(e,"onChange");break;case "select":Of(a,c);
30421U("topInvalid","invalid",a);ig(e,"onChange");break;case "textarea":Qf(a,c),U("topInvalid","invalid",a),ig(e,"onChange")}eg(b,c,hg);d=null;for(var g in c)c.hasOwnProperty(g)&&(f=c[g],"children"===g?"string"===typeof f?a.textContent!==f&&(d=["children",f]):"number"===typeof f&&a.textContent!==""+f&&(d=["children",""+f]):Qa.hasOwnProperty(g)&&null!=f&&ig(e,g));switch(b){case "input":Bc(a);Kf(a,c);break;case "textarea":Bc(a);Sf(a,c);break;case "select":case "option":break;default:"function"===typeof c.onClick&&
30422(a.onclick=B)}return d}function tg(a,b){return a.nodeValue!==b}
30423var ug=Object.freeze({createElement:kg,createTextNode:lg,setInitialProperties:pg,diffProperties:qg,updateProperties:rg,diffHydratedProperties:sg,diffHydratedText:tg,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(a,b,c){switch(b){case "input":Jf(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=
30424c.parentNode;c=c.querySelectorAll("input[name\x3d"+JSON.stringify(""+b)+'][type\x3d"radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=sb(d);e?void 0:D("90");Jf(d,e)}}}break;case "textarea":Rf(a,c);break;case "select":b=c.value,null!=b&&Nf(a,!!c.multiple,b,!1)}}});nc.injectFiberControlledHostComponent(ug);var Hg=null,Ig=null;function Jg(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}
30425function Kg(a){a=a?9===a.nodeType?a.documentElement:a.firstChild:null;return!(!a||1!==a.nodeType||!a.hasAttribute("data-reactroot"))}
30426var Z=nf({getRootHostContext:function(a){var b=a.nodeType;switch(b){case 9:case 11:a=(a=a.documentElement)?a.namespaceURI:Vf(null,"");break;default:b=8===b?a.parentNode:a,a=b.namespaceURI||null,b=b.tagName,a=Vf(a,b)}return a},getChildHostContext:function(a,b){return Vf(a,b)},getPublicInstance:function(a){return a},prepareForCommit:function(){Hg=pd;var a=da();if(Gd(a)){if("selectionStart"in a)var b={start:a.selectionStart,end:a.selectionEnd};else a:{var c=window.getSelection&&window.getSelection();
30427if(c&&0!==c.rangeCount){b=c.anchorNode;var d=c.anchorOffset,e=c.focusNode;c=c.focusOffset;try{b.nodeType,e.nodeType}catch(x){b=null;break a}var f=0,g=-1,k=-1,h=0,r=0,n=a,y=null;b:for(;;){for(var u;;){n!==b||0!==d&&3!==n.nodeType||(g=f+d);n!==e||0!==c&&3!==n.nodeType||(k=f+c);3===n.nodeType&&(f+=n.nodeValue.length);if(null===(u=n.firstChild))break;y=n;n=u}for(;;){if(n===a)break b;y===b&&++h===d&&(g=f);y===e&&++r===c&&(k=f);if(null!==(u=n.nextSibling))break;n=y;y=n.parentNode}n=u}b=-1===g||-1===k?null:
30428{start:g,end:k}}else b=null}b=b||{start:0,end:0}}else b=null;Ig={focusedElem:a,selectionRange:b};qd(!1)},resetAfterCommit:function(){var a=Ig,b=da(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&ha(document.documentElement,c)){if(Gd(c))if(b=d.start,a=d.end,void 0===a&&(a=b),"selectionStart"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(window.getSelection){b=window.getSelection();var e=c[Eb()].length;a=Math.min(d.start,e);d=void 0===d.end?a:Math.min(d.end,e);!b.extend&&a>
30429d&&(e=d,d=a,a=e);e=Fd(c,a);var f=Fd(c,d);if(e&&f&&(1!==b.rangeCount||b.anchorNode!==e.node||b.anchorOffset!==e.offset||b.focusNode!==f.node||b.focusOffset!==f.offset)){var g=document.createRange();g.setStart(e.node,e.offset);b.removeAllRanges();a>d?(b.addRange(g),b.extend(f.node,f.offset)):(g.setEnd(f.node,f.offset),b.addRange(g))}}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});ia(c);for(c=0;c<b.length;c++)a=b[c],a.element.scrollLeft=a.left,a.element.scrollTop=
30430a.top}Ig=null;qd(Hg);Hg=null},createInstance:function(a,b,c,d,e){a=kg(a,b,c,d);a[O]=e;a[pb]=b;return a},appendInitialChild:function(a,b){a.appendChild(b)},finalizeInitialChildren:function(a,b,c,d){pg(a,b,c,d);a:{switch(b){case "button":case "input":case "select":case "textarea":a=!!c.autoFocus;break a}a=!1}return a},prepareUpdate:function(a,b,c,d,e){return qg(a,b,c,d,e)},shouldSetTextContent:function(a,b){return"textarea"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===
30431typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&"string"===typeof b.dangerouslySetInnerHTML.__html},shouldDeprioritizeSubtree:function(a,b){return!!b.hidden},createTextInstance:function(a,b,c,d){a=lg(a,b);a[O]=d;return a},now:pf,mutation:{commitMount:function(a){a.focus()},commitUpdate:function(a,b,c,d,e){a[pb]=e;rg(a,b,c,d,e)},resetTextContent:function(a){a.textContent=""},commitTextUpdate:function(a,b,c){a.nodeValue=c},appendChild:function(a,b){a.appendChild(b)},appendChildToContainer:function(a,
30432b){8===a.nodeType?a.parentNode.insertBefore(b,a):a.appendChild(b)},insertBefore:function(a,b,c){a.insertBefore(b,c)},insertInContainerBefore:function(a,b,c){8===a.nodeType?a.parentNode.insertBefore(b,c):a.insertBefore(b,c)},removeChild:function(a,b){a.removeChild(b)},removeChildFromContainer:function(a,b){8===a.nodeType?a.parentNode.removeChild(b):a.removeChild(b)}},hydration:{canHydrateInstance:function(a,b){return 1!==a.nodeType||b.toLowerCase()!==a.nodeName.toLowerCase()?null:a},canHydrateTextInstance:function(a,
30433b){return""===b||3!==a.nodeType?null:a},getNextHydratableSibling:function(a){for(a=a.nextSibling;a&&1!==a.nodeType&&3!==a.nodeType;)a=a.nextSibling;return a},getFirstHydratableChild:function(a){for(a=a.firstChild;a&&1!==a.nodeType&&3!==a.nodeType;)a=a.nextSibling;return a},hydrateInstance:function(a,b,c,d,e,f){a[O]=f;a[pb]=c;return sg(a,b,c,e,d)},hydrateTextInstance:function(a,b,c){a[O]=c;return tg(a,b)},didNotMatchHydratedContainerTextInstance:function(){},didNotMatchHydratedTextInstance:function(){},
30434didNotHydrateContainerInstance:function(){},didNotHydrateInstance:function(){},didNotFindHydratableContainerInstance:function(){},didNotFindHydratableContainerTextInstance:function(){},didNotFindHydratableInstance:function(){},didNotFindHydratableTextInstance:function(){}},scheduleDeferredCallback:qf,useSyncScheduling:!0});rc=Z.batchedUpdates;
30435function Lg(a,b,c,d,e){Jg(c)?void 0:D("200");var f=c._reactRootContainer;if(f)Z.updateContainer(b,f,a,e);else{d=d||Kg(c);if(!d)for(f=void 0;f=c.lastChild;)c.removeChild(f);var g=Z.createContainer(c,d);f=c._reactRootContainer=g;Z.unbatchedUpdates(function(){Z.updateContainer(b,g,a,e)})}return Z.getPublicRootInstance(f)}function Mg(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;Jg(b)?void 0:D("200");return Pe(a,b,null,c)}
30436function Ng(a,b){this._reactRootContainer=Z.createContainer(a,b)}Ng.prototype.render=function(a,b){Z.updateContainer(a,this._reactRootContainer,null,b)};Ng.prototype.unmount=function(a){Z.updateContainer(null,this._reactRootContainer,null,a)};
30437var Og={createPortal:Mg,findDOMNode:function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternalFiber;if(b)return Z.findHostInstance(b);"function"===typeof a.render?D("188"):D("213",Object.keys(a))},hydrate:function(a,b,c){return Lg(null,a,b,!0,c)},render:function(a,b,c){return Lg(null,a,b,!1,c)},unstable_renderSubtreeIntoContainer:function(a,b,c,d){null==a||void 0===a._reactInternalFiber?D("38"):void 0;return Lg(a,b,c,!1,d)},unmountComponentAtNode:function(a){Jg(a)?void 0:
30438D("40");return a._reactRootContainer?(Z.unbatchedUpdates(function(){Lg(null,null,a,!1,function(){a._reactRootContainer=null})}),!0):!1},unstable_createPortal:Mg,unstable_batchedUpdates:tc,unstable_deferredUpdates:Z.deferredUpdates,flushSync:Z.flushSync,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:nb,EventPluginRegistry:Ua,EventPropagators:Cb,ReactControlledComponent:qc,ReactDOMComponentTree:tb,ReactDOMEventListener:td}};
30439Z.injectIntoDevTools({findFiberByHostInstance:qb,bundleType:0,version:"16.1.1",rendererPackageName:"react-dom"});var Pg=Object.freeze({default:Og}),Qg=Pg&&Og||Pg;module.exports=Qg["default"]?Qg["default"]:Qg;
32325 30440
32326 30441
32327/***/ }), 30442/***/ }),
32328/* 171 */ 30443/* 169 */
32329/***/ (function(module, exports, __webpack_require__) { 30444/***/ (function(module, exports, __webpack_require__) {
32330 30445
32331"use strict"; 30446"use strict";
32332/* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.0.0 30447/* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.1.1
32333 * react.development.js 30448 * react.development.js
32334 * 30449 *
32335 * Copyright (c) 2013-present, Facebook, Inc. 30450 * Copyright (c) 2013-present, Facebook, Inc.
@@ -32341,35 +30456,107 @@ unstable_deferredUpdates:Xj.deferredUpdates,flushSync:Xj.flushSync,__SECRET_INTE
32341 30456
32342 30457
32343if (process.env.NODE_ENV !== "production") { 30458if (process.env.NODE_ENV !== "production") {
32344(function() { 30459 (function() {
32345
32346'use strict'; 30460'use strict';
32347 30461
32348var objectAssign$1 = __webpack_require__(18); 30462var _assign = __webpack_require__(17);
32349var require$$0 = __webpack_require__(29); 30463var invariant = __webpack_require__(23);
32350var emptyObject = __webpack_require__(28); 30464var emptyObject = __webpack_require__(28);
32351var invariant = __webpack_require__(13); 30465var warning = __webpack_require__(29);
32352var emptyFunction = __webpack_require__(12); 30466var emptyFunction = __webpack_require__(12);
32353var checkPropTypes = __webpack_require__(50); 30467var checkPropTypes = __webpack_require__(49);
30468
30469// TODO: this is special because it gets imported during build.
30470
30471var ReactVersion = '16.1.1';
32354 30472
32355/** 30473/**
32356 * Copyright (c) 2013-present, Facebook, Inc. 30474 * WARNING: DO NOT manually require this module.
32357 * 30475 * This is a replacement for `invariant(...)` used by the error code system
32358 * This source code is licensed under the MIT license found in the 30476 * and will _only_ be required by the corresponding babel pass.
32359 * LICENSE file in the root directory of this source tree. 30477 * It always throws.
30478 */
30479
30480// Exports React.Fragment
30481var enableReactFragment = false;
30482// Exports ReactDOM.createRoot
30483
30484
30485
30486// Mutating mode (React DOM, React ART, React Native):
30487
30488// Experimental noop mode (currently unused):
30489
30490// Experimental persistent mode (CS):
30491
30492
30493// Only used in www builds.
30494
30495/**
30496 * Forked from fbjs/warning:
30497 * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
32360 * 30498 *
32361 * @providesModule reactProdInvariant 30499 * Only change is we use console.warn instead of console.error,
32362 * 30500 * and do nothing when 'console' is not supported.
30501 * This really simplifies the code.
30502 * ---
30503 * Similar to invariant but only logs a warning if the condition is not met.
30504 * This can be used to log issues in development environments in critical
30505 * paths. Removing the logging code for production environments will keep the
30506 * same logic and follow the same code paths.
32363 */ 30507 */
32364 30508
30509var lowPriorityWarning = function () {};
30510
32365{ 30511{
32366 var warning = require$$0; 30512 var printWarning = function (format) {
30513 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
30514 args[_key - 1] = arguments[_key];
30515 }
30516
30517 var argIndex = 0;
30518 var message = 'Warning: ' + format.replace(/%s/g, function () {
30519 return args[argIndex++];
30520 });
30521 if (typeof console !== 'undefined') {
30522 console.warn(message);
30523 }
30524 try {
30525 // --- Welcome to debugging React ---
30526 // This error was thrown as a convenience so that you can use this stack
30527 // to find the callsite that caused this warning to fire.
30528 throw new Error(message);
30529 } catch (x) {}
30530 };
30531
30532 lowPriorityWarning = function (condition, format) {
30533 if (format === undefined) {
30534 throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
30535 }
30536 if (!condition) {
30537 for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
30538 args[_key2 - 2] = arguments[_key2];
30539 }
30540
30541 printWarning.apply(undefined, [format].concat(args));
30542 }
30543 };
32367} 30544}
32368 30545
30546var lowPriorityWarning$1 = lowPriorityWarning;
30547
30548var didWarnStateUpdateForUnmountedComponent = {};
30549
32369function warnNoop(publicInstance, callerName) { 30550function warnNoop(publicInstance, callerName) {
32370 { 30551 {
32371 var constructor = publicInstance.constructor; 30552 var constructor = publicInstance.constructor;
32372 warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op.\n\nPlease check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass'); 30553 var componentName = constructor && (constructor.displayName || constructor.name) || 'ReactClass';
30554 var warningKey = componentName + '.' + callerName;
30555 if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
30556 return;
30557 }
30558 warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op.\n\nPlease check the code for the %s component.', callerName, callerName, componentName);
30559 didWarnStateUpdateForUnmountedComponent[warningKey] = true;
32373 } 30560 }
32374} 30561}
32375 30562
@@ -32441,83 +30628,19 @@ var ReactNoopUpdateQueue = {
32441 } 30628 }
32442}; 30629};
32443 30630
32444var ReactNoopUpdateQueue_1 = ReactNoopUpdateQueue;
32445
32446/**
32447 * Copyright (c) 2014-present, Facebook, Inc.
32448 *
32449 * This source code is licensed under the MIT license found in the
32450 * LICENSE file in the root directory of this source tree.
32451 *
32452 * @providesModule lowPriorityWarning
32453 */
32454
32455/**
32456 * Forked from fbjs/warning:
32457 * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
32458 *
32459 * Only change is we use console.warn instead of console.error,
32460 * and do nothing when 'console' is not supported.
32461 * This really simplifies the code.
32462 * ---
32463 * Similar to invariant but only logs a warning if the condition is not met.
32464 * This can be used to log issues in development environments in critical
32465 * paths. Removing the logging code for production environments will keep the
32466 * same logic and follow the same code paths.
32467 */
32468
32469var lowPriorityWarning = function () {};
32470
32471{
32472 var printWarning = function (format) {
32473 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
32474 args[_key - 1] = arguments[_key];
32475 }
32476
32477 var argIndex = 0;
32478 var message = 'Warning: ' + format.replace(/%s/g, function () {
32479 return args[argIndex++];
32480 });
32481 if (typeof console !== 'undefined') {
32482 console.warn(message);
32483 }
32484 try {
32485 // --- Welcome to debugging React ---
32486 // This error was thrown as a convenience so that you can use this stack
32487 // to find the callsite that caused this warning to fire.
32488 throw new Error(message);
32489 } catch (x) {}
32490 };
32491
32492 lowPriorityWarning = function (condition, format) {
32493 if (format === undefined) {
32494 throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
32495 }
32496 if (!condition) {
32497 for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
32498 args[_key2 - 2] = arguments[_key2];
32499 }
32500
32501 printWarning.apply(undefined, [format].concat(args));
32502 }
32503 };
32504}
32505
32506var lowPriorityWarning_1 = lowPriorityWarning;
32507
32508/** 30631/**
32509 * Base class helpers for the updating state of a component. 30632 * Base class helpers for the updating state of a component.
32510 */ 30633 */
32511function ReactComponent(props, context, updater) { 30634function Component(props, context, updater) {
32512 this.props = props; 30635 this.props = props;
32513 this.context = context; 30636 this.context = context;
32514 this.refs = emptyObject; 30637 this.refs = emptyObject;
32515 // We initialize the default updater but the real one gets injected by the 30638 // We initialize the default updater but the real one gets injected by the
32516 // renderer. 30639 // renderer.
32517 this.updater = updater || ReactNoopUpdateQueue_1; 30640 this.updater = updater || ReactNoopUpdateQueue;
32518} 30641}
32519 30642
32520ReactComponent.prototype.isReactComponent = {}; 30643Component.prototype.isReactComponent = {};
32521 30644
32522/** 30645/**
32523 * Sets a subset of the state. Always use this to mutate 30646 * Sets a subset of the state. Always use this to mutate
@@ -32544,7 +30667,7 @@ ReactComponent.prototype.isReactComponent = {};
32544 * @final 30667 * @final
32545 * @protected 30668 * @protected
32546 */ 30669 */
32547ReactComponent.prototype.setState = function (partialState, callback) { 30670Component.prototype.setState = function (partialState, callback) {
32548 !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0; 30671 !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0;
32549 this.updater.enqueueSetState(this, partialState, callback, 'setState'); 30672 this.updater.enqueueSetState(this, partialState, callback, 'setState');
32550}; 30673};
@@ -32563,7 +30686,7 @@ ReactComponent.prototype.setState = function (partialState, callback) {
32563 * @final 30686 * @final
32564 * @protected 30687 * @protected
32565 */ 30688 */
32566ReactComponent.prototype.forceUpdate = function (callback) { 30689Component.prototype.forceUpdate = function (callback) {
32567 this.updater.enqueueForceUpdate(this, callback, 'forceUpdate'); 30690 this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
32568}; 30691};
32569 30692
@@ -32578,9 +30701,9 @@ ReactComponent.prototype.forceUpdate = function (callback) {
32578 replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] 30701 replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
32579 }; 30702 };
32580 var defineDeprecationWarning = function (methodName, info) { 30703 var defineDeprecationWarning = function (methodName, info) {
32581 Object.defineProperty(ReactComponent.prototype, methodName, { 30704 Object.defineProperty(Component.prototype, methodName, {
32582 get: function () { 30705 get: function () {
32583 lowPriorityWarning_1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]); 30706 lowPriorityWarning$1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
32584 return undefined; 30707 return undefined;
32585 } 30708 }
32586 }); 30709 });
@@ -32595,59 +30718,43 @@ ReactComponent.prototype.forceUpdate = function (callback) {
32595/** 30718/**
32596 * Base class helpers for the updating state of a component. 30719 * Base class helpers for the updating state of a component.
32597 */ 30720 */
32598function ReactPureComponent(props, context, updater) { 30721function PureComponent(props, context, updater) {
32599 // Duplicated from ReactComponent. 30722 // Duplicated from Component.
32600 this.props = props; 30723 this.props = props;
32601 this.context = context; 30724 this.context = context;
32602 this.refs = emptyObject; 30725 this.refs = emptyObject;
32603 // We initialize the default updater but the real one gets injected by the 30726 // We initialize the default updater but the real one gets injected by the
32604 // renderer. 30727 // renderer.
32605 this.updater = updater || ReactNoopUpdateQueue_1; 30728 this.updater = updater || ReactNoopUpdateQueue;
32606} 30729}
32607 30730
32608function ComponentDummy() {} 30731function ComponentDummy() {}
32609ComponentDummy.prototype = ReactComponent.prototype; 30732ComponentDummy.prototype = Component.prototype;
32610var pureComponentPrototype = ReactPureComponent.prototype = new ComponentDummy(); 30733var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
32611pureComponentPrototype.constructor = ReactPureComponent; 30734pureComponentPrototype.constructor = PureComponent;
32612// Avoid an extra prototype jump for these methods. 30735// Avoid an extra prototype jump for these methods.
32613objectAssign$1(pureComponentPrototype, ReactComponent.prototype); 30736_assign(pureComponentPrototype, Component.prototype);
32614pureComponentPrototype.isPureReactComponent = true; 30737pureComponentPrototype.isPureReactComponent = true;
32615 30738
32616function ReactAsyncComponent(props, context, updater) { 30739function AsyncComponent(props, context, updater) {
32617 // Duplicated from ReactComponent. 30740 // Duplicated from Component.
32618 this.props = props; 30741 this.props = props;
32619 this.context = context; 30742 this.context = context;
32620 this.refs = emptyObject; 30743 this.refs = emptyObject;
32621 // We initialize the default updater but the real one gets injected by the 30744 // We initialize the default updater but the real one gets injected by the
32622 // renderer. 30745 // renderer.
32623 this.updater = updater || ReactNoopUpdateQueue_1; 30746 this.updater = updater || ReactNoopUpdateQueue;
32624} 30747}
32625 30748
32626var asyncComponentPrototype = ReactAsyncComponent.prototype = new ComponentDummy(); 30749var asyncComponentPrototype = AsyncComponent.prototype = new ComponentDummy();
32627asyncComponentPrototype.constructor = ReactAsyncComponent; 30750asyncComponentPrototype.constructor = AsyncComponent;
32628// Avoid an extra prototype jump for these methods. 30751// Avoid an extra prototype jump for these methods.
32629objectAssign$1(asyncComponentPrototype, ReactComponent.prototype); 30752_assign(asyncComponentPrototype, Component.prototype);
32630asyncComponentPrototype.unstable_isAsyncReactComponent = true; 30753asyncComponentPrototype.unstable_isAsyncReactComponent = true;
32631asyncComponentPrototype.render = function () { 30754asyncComponentPrototype.render = function () {
32632 return this.props.children; 30755 return this.props.children;
32633}; 30756};
32634 30757
32635var ReactBaseClasses = {
32636 Component: ReactComponent,
32637 PureComponent: ReactPureComponent,
32638 AsyncComponent: ReactAsyncComponent
32639};
32640
32641/**
32642 * Copyright (c) 2013-present, Facebook, Inc.
32643 *
32644 * This source code is licensed under the MIT license found in the
32645 * LICENSE file in the root directory of this source tree.
32646 *
32647 * @providesModule ReactCurrentOwner
32648 *
32649 */
32650
32651/** 30758/**
32652 * Keeps track of the current owner. 30759 * Keeps track of the current owner.
32653 * 30760 *
@@ -32662,14 +30769,8 @@ var ReactCurrentOwner = {
32662 current: null 30769 current: null
32663}; 30770};
32664 30771
32665var ReactCurrentOwner_1 = ReactCurrentOwner;
32666
32667var hasOwnProperty = Object.prototype.hasOwnProperty; 30772var hasOwnProperty = Object.prototype.hasOwnProperty;
32668 30773
32669{
32670 var warning$2 = require$$0;
32671}
32672
32673// The Symbol used to tag the ReactElement type. If there is no native Symbol 30774// The Symbol used to tag the ReactElement type. If there is no native Symbol
32674// nor polyfill, then a plain number is used for performance. 30775// nor polyfill, then a plain number is used for performance.
32675var REACT_ELEMENT_TYPE$1 = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; 30776var REACT_ELEMENT_TYPE$1 = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
@@ -32712,7 +30813,7 @@ function defineKeyPropWarningGetter(props, displayName) {
32712 var warnAboutAccessingKey = function () { 30813 var warnAboutAccessingKey = function () {
32713 if (!specialPropKeyWarningShown) { 30814 if (!specialPropKeyWarningShown) {
32714 specialPropKeyWarningShown = true; 30815 specialPropKeyWarningShown = true;
32715 warning$2(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); 30816 warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
32716 } 30817 }
32717 }; 30818 };
32718 warnAboutAccessingKey.isReactWarning = true; 30819 warnAboutAccessingKey.isReactWarning = true;
@@ -32726,7 +30827,7 @@ function defineRefPropWarningGetter(props, displayName) {
32726 var warnAboutAccessingRef = function () { 30827 var warnAboutAccessingRef = function () {
32727 if (!specialPropRefWarningShown) { 30828 if (!specialPropRefWarningShown) {
32728 specialPropRefWarningShown = true; 30829 specialPropRefWarningShown = true;
32729 warning$2(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); 30830 warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
32730 } 30831 }
32731 }; 30832 };
32732 warnAboutAccessingRef.isReactWarning = true; 30833 warnAboutAccessingRef.isReactWarning = true;
@@ -32814,9 +30915,9 @@ var ReactElement = function (type, key, ref, self, source, owner, props) {
32814 30915
32815/** 30916/**
32816 * Create and return a new ReactElement of the given type. 30917 * Create and return a new ReactElement of the given type.
32817 * See https://facebook.github.io/react/docs/react-api.html#createelement 30918 * See https://reactjs.org/docs/react-api.html#createelement
32818 */ 30919 */
32819ReactElement.createElement = function (type, config, children) { 30920function createElement(type, config, children) {
32820 var propName; 30921 var propName;
32821 30922
32822 // Reserved names are extracted 30923 // Reserved names are extracted
@@ -32885,39 +30986,30 @@ ReactElement.createElement = function (type, config, children) {
32885 } 30986 }
32886 } 30987 }
32887 } 30988 }
32888 return ReactElement(type, key, ref, self, source, ReactCurrentOwner_1.current, props); 30989 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
32889}; 30990}
32890 30991
32891/** 30992/**
32892 * Return a function that produces ReactElements of a given type. 30993 * Return a function that produces ReactElements of a given type.
32893 * See https://facebook.github.io/react/docs/react-api.html#createfactory 30994 * See https://reactjs.org/docs/react-api.html#createfactory
32894 */ 30995 */
32895ReactElement.createFactory = function (type) { 30996
32896 var factory = ReactElement.createElement.bind(null, type);
32897 // Expose the type on the factory and the prototype so that it can be
32898 // easily accessed on elements. E.g. `<Foo />.type === Foo`.
32899 // This should not be named `constructor` since this may not be the function
32900 // that created the element, and it may not even be a constructor.
32901 // Legacy hook TODO: Warn if this is accessed
32902 factory.type = type;
32903 return factory;
32904};
32905 30997
32906ReactElement.cloneAndReplaceKey = function (oldElement, newKey) { 30998function cloneAndReplaceKey(oldElement, newKey) {
32907 var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); 30999 var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
32908 31000
32909 return newElement; 31001 return newElement;
32910}; 31002}
32911 31003
32912/** 31004/**
32913 * Clone and return a new ReactElement using element as the starting point. 31005 * Clone and return a new ReactElement using element as the starting point.
32914 * See https://facebook.github.io/react/docs/react-api.html#cloneelement 31006 * See https://reactjs.org/docs/react-api.html#cloneelement
32915 */ 31007 */
32916ReactElement.cloneElement = function (element, config, children) { 31008function cloneElement(element, config, children) {
32917 var propName; 31009 var propName;
32918 31010
32919 // Original props are copied 31011 // Original props are copied
32920 var props = objectAssign$1({}, element.props); 31012 var props = _assign({}, element.props);
32921 31013
32922 // Reserved names are extracted 31014 // Reserved names are extracted
32923 var key = element.key; 31015 var key = element.key;
@@ -32936,7 +31028,7 @@ ReactElement.cloneElement = function (element, config, children) {
32936 if (hasValidRef(config)) { 31028 if (hasValidRef(config)) {
32937 // Silently steal the ref from the parent. 31029 // Silently steal the ref from the parent.
32938 ref = config.ref; 31030 ref = config.ref;
32939 owner = ReactCurrentOwner_1.current; 31031 owner = ReactCurrentOwner.current;
32940 } 31032 }
32941 if (hasValidKey(config)) { 31033 if (hasValidKey(config)) {
32942 key = '' + config.key; 31034 key = '' + config.key;
@@ -32973,30 +31065,18 @@ ReactElement.cloneElement = function (element, config, children) {
32973 } 31065 }
32974 31066
32975 return ReactElement(element.type, key, ref, self, source, owner, props); 31067 return ReactElement(element.type, key, ref, self, source, owner, props);
32976}; 31068}
32977 31069
32978/** 31070/**
32979 * Verifies the object is a ReactElement. 31071 * Verifies the object is a ReactElement.
32980 * See https://facebook.github.io/react/docs/react-api.html#isvalidelement 31072 * See https://reactjs.org/docs/react-api.html#isvalidelement
32981 * @param {?object} object 31073 * @param {?object} object
32982 * @return {boolean} True if `object` is a valid component. 31074 * @return {boolean} True if `object` is a valid component.
32983 * @final 31075 * @final
32984 */ 31076 */
32985ReactElement.isValidElement = function (object) { 31077function isValidElement(object) {
32986 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE$1; 31078 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE$1;
32987}; 31079}
32988
32989var ReactElement_1 = ReactElement;
32990
32991/**
32992 * Copyright (c) 2013-present, Facebook, Inc.
32993 *
32994 * This source code is licensed under the MIT license found in the
32995 * LICENSE file in the root directory of this source tree.
32996 *
32997 * @providesModule ReactDebugCurrentFrame
32998 *
32999 */
33000 31080
33001var ReactDebugCurrentFrame = {}; 31081var ReactDebugCurrentFrame = {};
33002 31082
@@ -33013,21 +31093,12 @@ var ReactDebugCurrentFrame = {};
33013 }; 31093 };
33014} 31094}
33015 31095
33016var ReactDebugCurrentFrame_1 = ReactDebugCurrentFrame;
33017
33018{
33019 var warning$1 = require$$0;
33020
33021 var _require = ReactDebugCurrentFrame_1,
33022 getStackAddendum = _require.getStackAddendum;
33023}
33024
33025var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; 31096var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
33026var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. 31097var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
33027// The Symbol used to tag the ReactElement type. If there is no native Symbol 31098// The Symbol used to tag the ReactElement type. If there is no native Symbol
33028// nor polyfill, then a plain number is used for performance. 31099// nor polyfill, then a plain number is used for performance.
33029var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; 31100var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
33030 31101var REACT_PORTAL_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.portal') || 0xeaca;
33031var SEPARATOR = '.'; 31102var SEPARATOR = '.';
33032var SUBSEPARATOR = ':'; 31103var SUBSEPARATOR = ':';
33033 31104
@@ -33114,7 +31185,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
33114 if (children === null || type === 'string' || type === 'number' || 31185 if (children === null || type === 'string' || type === 'number' ||
33115 // The following is inlined from ReactElement. This means we can optimize 31186 // The following is inlined from ReactElement. This means we can optimize
33116 // some checks. React Fiber also inlines this logic for similar purposes. 31187 // some checks. React Fiber also inlines this logic for similar purposes.
33117 type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { 31188 type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE || type === 'object' && children.$$typeof === REACT_PORTAL_TYPE) {
33118 callback(traverseContext, children, 31189 callback(traverseContext, children,
33119 // If it's the only child, treat the name as if it was wrapped in an array 31190 // If it's the only child, treat the name as if it was wrapped in an array
33120 // so that it's consistent if the number of children grows. 31191 // so that it's consistent if the number of children grows.
@@ -33139,7 +31210,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
33139 { 31210 {
33140 // Warn about using Maps as children 31211 // Warn about using Maps as children
33141 if (iteratorFn === children.entries) { 31212 if (iteratorFn === children.entries) {
33142 warning$1(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getStackAddendum()); 31213 warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', ReactDebugCurrentFrame.getStackAddendum());
33143 didWarnAboutMaps = true; 31214 didWarnAboutMaps = true;
33144 } 31215 }
33145 } 31216 }
@@ -33155,7 +31226,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
33155 } else if (type === 'object') { 31226 } else if (type === 'object') {
33156 var addendum = ''; 31227 var addendum = '';
33157 { 31228 {
33158 addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + getStackAddendum(); 31229 addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
33159 } 31230 }
33160 var childrenString = '' + children; 31231 var childrenString = '' + children;
33161 invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum); 31232 invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum);
@@ -33217,7 +31288,7 @@ function forEachSingleChild(bookKeeping, child, name) {
33217/** 31288/**
33218 * Iterates through children that are typically specified as `props.children`. 31289 * Iterates through children that are typically specified as `props.children`.
33219 * 31290 *
33220 * See https://facebook.github.io/react/docs/react-api.html#react.children.foreach 31291 * See https://reactjs.org/docs/react-api.html#react.children.foreach
33221 * 31292 *
33222 * The provided forEachFunc(child, index) will be called for each 31293 * The provided forEachFunc(child, index) will be called for each
33223 * leaf child. 31294 * leaf child.
@@ -33246,8 +31317,8 @@ function mapSingleChildIntoContext(bookKeeping, child, childKey) {
33246 if (Array.isArray(mappedChild)) { 31317 if (Array.isArray(mappedChild)) {
33247 mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument); 31318 mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
33248 } else if (mappedChild != null) { 31319 } else if (mappedChild != null) {
33249 if (ReactElement_1.isValidElement(mappedChild)) { 31320 if (isValidElement(mappedChild)) {
33250 mappedChild = ReactElement_1.cloneAndReplaceKey(mappedChild, 31321 mappedChild = cloneAndReplaceKey(mappedChild,
33251 // Keep both the (mapped) and old keys if they differ, just as 31322 // Keep both the (mapped) and old keys if they differ, just as
33252 // traverseAllChildren used to do for objects as children 31323 // traverseAllChildren used to do for objects as children
33253 keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); 31324 keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
@@ -33269,7 +31340,7 @@ function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
33269/** 31340/**
33270 * Maps children that are typically specified as `props.children`. 31341 * Maps children that are typically specified as `props.children`.
33271 * 31342 *
33272 * See https://facebook.github.io/react/docs/react-api.html#react.children.map 31343 * See https://reactjs.org/docs/react-api.html#react.children.map
33273 * 31344 *
33274 * The provided mapFunction(child, key, index) will be called for each 31345 * The provided mapFunction(child, key, index) will be called for each
33275 * leaf child. 31346 * leaf child.
@@ -33292,7 +31363,7 @@ function mapChildren(children, func, context) {
33292 * Count the number of children that are typically specified as 31363 * Count the number of children that are typically specified as
33293 * `props.children`. 31364 * `props.children`.
33294 * 31365 *
33295 * See https://facebook.github.io/react/docs/react-api.html#react.children.count 31366 * See https://reactjs.org/docs/react-api.html#react.children.count
33296 * 31367 *
33297 * @param {?*} children Children tree container. 31368 * @param {?*} children Children tree container.
33298 * @return {number} The number of children. 31369 * @return {number} The number of children.
@@ -33305,7 +31376,7 @@ function countChildren(children, context) {
33305 * Flatten a children object (typically specified as `props.children`) and 31376 * Flatten a children object (typically specified as `props.children`) and
33306 * return an array with appropriately re-keyed children. 31377 * return an array with appropriately re-keyed children.
33307 * 31378 *
33308 * See https://facebook.github.io/react/docs/react-api.html#react.children.toarray 31379 * See https://reactjs.org/docs/react-api.html#react.children.toarray
33309 */ 31380 */
33310function toArray(children) { 31381function toArray(children) {
33311 var result = []; 31382 var result = [];
@@ -33313,31 +31384,11 @@ function toArray(children) {
33313 return result; 31384 return result;
33314} 31385}
33315 31386
33316var ReactChildren = {
33317 forEach: forEachChildren,
33318 map: mapChildren,
33319 count: countChildren,
33320 toArray: toArray
33321};
33322
33323var ReactChildren_1 = ReactChildren;
33324
33325/**
33326 * Copyright (c) 2013-present, Facebook, Inc.
33327 *
33328 * This source code is licensed under the MIT license found in the
33329 * LICENSE file in the root directory of this source tree.
33330 *
33331 * @providesModule ReactVersion
33332 */
33333
33334var ReactVersion = '16.0.0';
33335
33336/** 31387/**
33337 * Returns the first child in a collection of children and verifies that there 31388 * Returns the first child in a collection of children and verifies that there
33338 * is only one child in the collection. 31389 * is only one child in the collection.
33339 * 31390 *
33340 * See https://facebook.github.io/react/docs/react-api.html#react.children.only 31391 * See https://reactjs.org/docs/react-api.html#react.children.only
33341 * 31392 *
33342 * The current implementation of this function assumes that a single child gets 31393 * The current implementation of this function assumes that a single child gets
33343 * passed without a wrapper, but the purpose of this helper function is to 31394 * passed without a wrapper, but the purpose of this helper function is to
@@ -33348,67 +31399,34 @@ var ReactVersion = '16.0.0';
33348 * structure. 31399 * structure.
33349 */ 31400 */
33350function onlyChild(children) { 31401function onlyChild(children) {
33351 !ReactElement_1.isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0; 31402 !isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0;
33352 return children; 31403 return children;
33353} 31404}
33354 31405
33355var onlyChild_1 = onlyChild; 31406var describeComponentFrame = function (name, source, ownerName) {
33356
33357/**
33358 * Copyright (c) 2016-present, Facebook, Inc.
33359 *
33360 * This source code is licensed under the MIT license found in the
33361 * LICENSE file in the root directory of this source tree.
33362 *
33363 *
33364 * @providesModule describeComponentFrame
33365 */
33366
33367var describeComponentFrame$1 = function (name, source, ownerName) {
33368 return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : ''); 31407 return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
33369}; 31408};
33370 31409
33371/** 31410function getComponentName(fiber) {
33372 * Copyright (c) 2013-present, Facebook, Inc. 31411 var type = fiber.type;
33373 *
33374 * This source code is licensed under the MIT license found in the
33375 * LICENSE file in the root directory of this source tree.
33376 *
33377 * @providesModule getComponentName
33378 *
33379 */
33380 31412
33381function getComponentName$1(instanceOrFiber) { 31413 if (typeof type === 'string') {
33382 if (typeof instanceOrFiber.getName === 'function') { 31414 return type;
33383 // Stack reconciler
33384 var instance = instanceOrFiber;
33385 return instance.getName();
33386 } 31415 }
33387 if (typeof instanceOrFiber.tag === 'number') { 31416 if (typeof type === 'function') {
33388 // Fiber reconciler 31417 return type.displayName || type.name;
33389 var fiber = instanceOrFiber;
33390 var type = fiber.type;
33391
33392 if (typeof type === 'string') {
33393 return type;
33394 }
33395 if (typeof type === 'function') {
33396 return type.displayName || type.name;
33397 }
33398 } 31418 }
33399 return null; 31419 return null;
33400} 31420}
33401 31421
33402var getComponentName_1 = getComponentName$1; 31422/**
31423 * ReactElementValidator provides a wrapper around a element factory
31424 * which validates the props passed to the element. This is intended to be
31425 * used only in DEV and could be replaced by a static type checker for languages
31426 * that support it.
31427 */
33403 31428
33404{ 31429{
33405 var checkPropTypes$1 = checkPropTypes;
33406 var lowPriorityWarning$1 = lowPriorityWarning_1;
33407 var ReactDebugCurrentFrame$1 = ReactDebugCurrentFrame_1;
33408 var warning$3 = require$$0;
33409 var describeComponentFrame = describeComponentFrame$1;
33410 var getComponentName = getComponentName_1;
33411
33412 var currentlyValidatingElement = null; 31430 var currentlyValidatingElement = null;
33413 31431
33414 var getDisplayName = function (element) { 31432 var getDisplayName = function (element) {
@@ -33418,29 +31436,35 @@ var getComponentName_1 = getComponentName$1;
33418 return '#text'; 31436 return '#text';
33419 } else if (typeof element.type === 'string') { 31437 } else if (typeof element.type === 'string') {
33420 return element.type; 31438 return element.type;
31439 } else if (element.type === REACT_FRAGMENT_TYPE$1) {
31440 return 'React.Fragment';
33421 } else { 31441 } else {
33422 return element.type.displayName || element.type.name || 'Unknown'; 31442 return element.type.displayName || element.type.name || 'Unknown';
33423 } 31443 }
33424 }; 31444 };
33425 31445
33426 var getStackAddendum$1 = function () { 31446 var getStackAddendum = function () {
33427 var stack = ''; 31447 var stack = '';
33428 if (currentlyValidatingElement) { 31448 if (currentlyValidatingElement) {
33429 var name = getDisplayName(currentlyValidatingElement); 31449 var name = getDisplayName(currentlyValidatingElement);
33430 var owner = currentlyValidatingElement._owner; 31450 var owner = currentlyValidatingElement._owner;
33431 stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner)); 31451 stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner));
33432 } 31452 }
33433 stack += ReactDebugCurrentFrame$1.getStackAddendum() || ''; 31453 stack += ReactDebugCurrentFrame.getStackAddendum() || '';
33434 return stack; 31454 return stack;
33435 }; 31455 };
31456
31457 var REACT_FRAGMENT_TYPE$1 = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.fragment') || 0xeacb;
31458
31459 var VALID_FRAGMENT_PROPS = new Map([['children', true], ['key', true]]);
33436} 31460}
33437 31461
33438var ITERATOR_SYMBOL$1 = typeof Symbol === 'function' && Symbol.iterator; 31462var ITERATOR_SYMBOL$1 = typeof Symbol === 'function' && Symbol.iterator;
33439var FAUX_ITERATOR_SYMBOL$1 = '@@iterator'; // Before Symbol spec. 31463var FAUX_ITERATOR_SYMBOL$1 = '@@iterator'; // Before Symbol spec.
33440 31464
33441function getDeclarationErrorAddendum() { 31465function getDeclarationErrorAddendum() {
33442 if (ReactCurrentOwner_1.current) { 31466 if (ReactCurrentOwner.current) {
33443 var name = getComponentName(ReactCurrentOwner_1.current); 31467 var name = getComponentName(ReactCurrentOwner.current);
33444 if (name) { 31468 if (name) {
33445 return '\n\nCheck the render method of `' + name + '`.'; 31469 return '\n\nCheck the render method of `' + name + '`.';
33446 } 31470 }
@@ -33504,14 +31528,14 @@ function validateExplicitKey(element, parentType) {
33504 // property, it may be the creator of the child that's responsible for 31528 // property, it may be the creator of the child that's responsible for
33505 // assigning it a key. 31529 // assigning it a key.
33506 var childOwner = ''; 31530 var childOwner = '';
33507 if (element && element._owner && element._owner !== ReactCurrentOwner_1.current) { 31531 if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
33508 // Give the component that originally created this child. 31532 // Give the component that originally created this child.
33509 childOwner = ' It was passed a child from ' + getComponentName(element._owner) + '.'; 31533 childOwner = ' It was passed a child from ' + getComponentName(element._owner) + '.';
33510 } 31534 }
33511 31535
33512 currentlyValidatingElement = element; 31536 currentlyValidatingElement = element;
33513 { 31537 {
33514 warning$3(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, getStackAddendum$1()); 31538 warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, getStackAddendum());
33515 } 31539 }
33516 currentlyValidatingElement = null; 31540 currentlyValidatingElement = null;
33517} 31541}
@@ -33532,11 +31556,11 @@ function validateChildKeys(node, parentType) {
33532 if (Array.isArray(node)) { 31556 if (Array.isArray(node)) {
33533 for (var i = 0; i < node.length; i++) { 31557 for (var i = 0; i < node.length; i++) {
33534 var child = node[i]; 31558 var child = node[i];
33535 if (ReactElement_1.isValidElement(child)) { 31559 if (isValidElement(child)) {
33536 validateExplicitKey(child, parentType); 31560 validateExplicitKey(child, parentType);
33537 } 31561 }
33538 } 31562 }
33539 } else if (ReactElement_1.isValidElement(node)) { 31563 } else if (isValidElement(node)) {
33540 // This element was passed in a valid location. 31564 // This element was passed in a valid location.
33541 if (node._store) { 31565 if (node._store) {
33542 node._store.validated = true; 31566 node._store.validated = true;
@@ -33550,7 +31574,7 @@ function validateChildKeys(node, parentType) {
33550 var iterator = iteratorFn.call(node); 31574 var iterator = iteratorFn.call(node);
33551 var step; 31575 var step;
33552 while (!(step = iterator.next()).done) { 31576 while (!(step = iterator.next()).done) {
33553 if (ReactElement_1.isValidElement(step.value)) { 31577 if (isValidElement(step.value)) {
33554 validateExplicitKey(step.value, parentType); 31578 validateExplicitKey(step.value, parentType);
33555 } 31579 }
33556 } 31580 }
@@ -33575,489 +31599,224 @@ function validatePropTypes(element) {
33575 31599
33576 if (propTypes) { 31600 if (propTypes) {
33577 currentlyValidatingElement = element; 31601 currentlyValidatingElement = element;
33578 checkPropTypes$1(propTypes, element.props, 'prop', name, getStackAddendum$1); 31602 checkPropTypes(propTypes, element.props, 'prop', name, getStackAddendum);
33579 currentlyValidatingElement = null; 31603 currentlyValidatingElement = null;
33580 } 31604 }
33581 if (typeof componentClass.getDefaultProps === 'function') { 31605 if (typeof componentClass.getDefaultProps === 'function') {
33582 warning$3(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.'); 31606 warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
33583 } 31607 }
33584} 31608}
33585 31609
33586var ReactElementValidator$1 = { 31610/**
33587 createElement: function (type, props, children) { 31611 * Given a fragment, validate that it can only be provided with fragment props
33588 var validType = typeof type === 'string' || typeof type === 'function'; 31612 * @param {ReactElement} fragment
33589 // We warn in this case but don't throw. We expect the element creation to 31613 */
33590 // succeed and there will likely be errors in render. 31614function validateFragmentProps(fragment) {
33591 if (!validType) { 31615 currentlyValidatingElement = fragment;
33592 var info = '';
33593 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
33594 info += ' You likely forgot to export your component from the file ' + "it's defined in.";
33595 }
33596
33597 var sourceInfo = getSourceInfoErrorAddendum(props);
33598 if (sourceInfo) {
33599 info += sourceInfo;
33600 } else {
33601 info += getDeclarationErrorAddendum();
33602 }
33603 31616
33604 info += ReactDebugCurrentFrame$1.getStackAddendum() || ''; 31617 var _iteratorNormalCompletion = true;
31618 var _didIteratorError = false;
31619 var _iteratorError = undefined;
33605 31620
33606 warning$3(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info); 31621 try {
33607 } 31622 for (var _iterator = Object.keys(fragment.props)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
33608 31623 var key = _step.value;
33609 var element = ReactElement_1.createElement.apply(this, arguments);
33610 31624
33611 // The result can be nullish if a mock or a custom function is used. 31625 if (!VALID_FRAGMENT_PROPS.has(key)) {
33612 // TODO: Drop this when these are no longer allowed as the type argument. 31626 warning(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.%s', key, getStackAddendum());
33613 if (element == null) { 31627 break;
33614 return element; 31628 }
33615 } 31629 }
33616 31630 } catch (err) {
33617 // Skip key warning if the type isn't valid since our key validation logic 31631 _didIteratorError = true;
33618 // doesn't expect a non-string/function type and can throw confusing errors. 31632 _iteratorError = err;
33619 // We don't want exception behavior to differ between dev and prod. 31633 } finally {
33620 // (Rendering will throw with a helpful message and as soon as the type is 31634 try {
33621 // fixed, the key warnings will appear.) 31635 if (!_iteratorNormalCompletion && _iterator['return']) {
33622 if (validType) { 31636 _iterator['return']();
33623 for (var i = 2; i < arguments.length; i++) { 31637 }
33624 validateChildKeys(arguments[i], type); 31638 } finally {
31639 if (_didIteratorError) {
31640 throw _iteratorError;
33625 } 31641 }
33626 } 31642 }
31643 }
33627 31644
33628 validatePropTypes(element); 31645 if (fragment.ref !== null) {
33629 31646 warning(false, 'Invalid attribute `ref` supplied to `React.Fragment`.%s', getStackAddendum());
33630 return element; 31647 }
33631 },
33632 31648
33633 createFactory: function (type) { 31649 currentlyValidatingElement = null;
33634 var validatedFactory = ReactElementValidator$1.createElement.bind(null, type); 31650}
33635 // Legacy hook TODO: Warn if this is accessed
33636 validatedFactory.type = type;
33637 31651
33638 { 31652function createElementWithValidation(type, props, children) {
33639 Object.defineProperty(validatedFactory, 'type', { 31653 var validType = typeof type === 'string' || typeof type === 'function' || typeof type === 'symbol' || typeof type === 'number';
33640 enumerable: false, 31654 // We warn in this case but don't throw. We expect the element creation to
33641 get: function () { 31655 // succeed and there will likely be errors in render.
33642 lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.'); 31656 if (!validType) {
33643 Object.defineProperty(this, 'type', { 31657 var info = '';
33644 value: type 31658 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
33645 }); 31659 info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
33646 return type;
33647 }
33648 });
33649 } 31660 }
33650 31661
33651 return validatedFactory; 31662 var sourceInfo = getSourceInfoErrorAddendum(props);
33652 }, 31663 if (sourceInfo) {
33653 31664 info += sourceInfo;
33654 cloneElement: function (element, props, children) { 31665 } else {
33655 var newElement = ReactElement_1.cloneElement.apply(this, arguments); 31666 info += getDeclarationErrorAddendum();
33656 for (var i = 2; i < arguments.length; i++) {
33657 validateChildKeys(arguments[i], newElement.type);
33658 } 31667 }
33659 validatePropTypes(newElement);
33660 return newElement;
33661 }
33662};
33663 31668
33664var ReactElementValidator_1 = ReactElementValidator$1; 31669 info += getStackAddendum() || '';
33665 31670
33666{ 31671 warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info);
33667 var warning$4 = require$$0;
33668}
33669
33670function isNative(fn) {
33671 // Based on isNative() from Lodash
33672 var funcToString = Function.prototype.toString;
33673 var reIsNative = RegExp('^' + funcToString
33674 // Take an example native function source for comparison
33675 .call(Object.prototype.hasOwnProperty)
33676 // Strip regex characters so we can use it for regex
33677 .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
33678 // Remove hasOwnProperty from the template to make it generic
33679 .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
33680 try {
33681 var source = funcToString.call(fn);
33682 return reIsNative.test(source);
33683 } catch (err) {
33684 return false;
33685 } 31672 }
33686}
33687
33688var canUseCollections =
33689// Array.from
33690typeof Array.from === 'function' &&
33691// Map
33692typeof Map === 'function' && isNative(Map) &&
33693// Map.prototype.keys
33694Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
33695// Set
33696typeof Set === 'function' && isNative(Set) &&
33697// Set.prototype.keys
33698Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
33699
33700var setItem;
33701var getItem;
33702var removeItem;
33703var getItemIDs;
33704var addRoot;
33705var removeRoot;
33706var getRootIDs;
33707
33708if (canUseCollections) {
33709 var itemMap = new Map();
33710 var rootIDSet = new Set();
33711
33712 setItem = function (id, item) {
33713 itemMap.set(id, item);
33714 };
33715 getItem = function (id) {
33716 return itemMap.get(id);
33717 };
33718 removeItem = function (id) {
33719 itemMap['delete'](id);
33720 };
33721 getItemIDs = function () {
33722 return Array.from(itemMap.keys());
33723 };
33724
33725 addRoot = function (id) {
33726 rootIDSet.add(id);
33727 };
33728 removeRoot = function (id) {
33729 rootIDSet['delete'](id);
33730 };
33731 getRootIDs = function () {
33732 return Array.from(rootIDSet.keys());
33733 };
33734} else {
33735 var itemByKey = {};
33736 var rootByKey = {};
33737
33738 // Use non-numeric keys to prevent V8 performance issues:
33739 // https://github.com/facebook/react/pull/7232
33740 var getKeyFromID = function (id) {
33741 return '.' + id;
33742 };
33743 var getIDFromKey = function (key) {
33744 return parseInt(key.substr(1), 10);
33745 };
33746
33747 setItem = function (id, item) {
33748 var key = getKeyFromID(id);
33749 itemByKey[key] = item;
33750 };
33751 getItem = function (id) {
33752 var key = getKeyFromID(id);
33753 return itemByKey[key];
33754 };
33755 removeItem = function (id) {
33756 var key = getKeyFromID(id);
33757 delete itemByKey[key];
33758 };
33759 getItemIDs = function () {
33760 return Object.keys(itemByKey).map(getIDFromKey);
33761 };
33762
33763 addRoot = function (id) {
33764 var key = getKeyFromID(id);
33765 rootByKey[key] = true;
33766 };
33767 removeRoot = function (id) {
33768 var key = getKeyFromID(id);
33769 delete rootByKey[key];
33770 };
33771 getRootIDs = function () {
33772 return Object.keys(rootByKey).map(getIDFromKey);
33773 };
33774}
33775 31673
33776var unmountedIDs = []; 31674 var element = createElement.apply(this, arguments);
33777 31675
33778function purgeDeep(id) { 31676 // The result can be nullish if a mock or a custom function is used.
33779 var item = getItem(id); 31677 // TODO: Drop this when these are no longer allowed as the type argument.
33780 if (item) { 31678 if (element == null) {
33781 var childIDs = item.childIDs; 31679 return element;
31680 }
33782 31681
33783 removeItem(id); 31682 // Skip key warning if the type isn't valid since our key validation logic
33784 childIDs.forEach(purgeDeep); 31683 // doesn't expect a non-string/function type and can throw confusing errors.
31684 // We don't want exception behavior to differ between dev and prod.
31685 // (Rendering will throw with a helpful message and as soon as the type is
31686 // fixed, the key warnings will appear.)
31687 if (validType) {
31688 for (var i = 2; i < arguments.length; i++) {
31689 validateChildKeys(arguments[i], type);
31690 }
33785 } 31691 }
33786}
33787 31692
33788function getDisplayName$1(element) { 31693 if (typeof type === 'symbol' && type === REACT_FRAGMENT_TYPE$1) {
33789 if (element == null) { 31694 validateFragmentProps(element);
33790 return '#empty';
33791 } else if (typeof element === 'string' || typeof element === 'number') {
33792 return '#text';
33793 } else if (typeof element.type === 'string') {
33794 return element.type;
33795 } else { 31695 } else {
33796 return element.type.displayName || element.type.name || 'Unknown'; 31696 validatePropTypes(element);
33797 } 31697 }
33798}
33799 31698
33800function describeID(id) { 31699 return element;
33801 var name = ReactComponentTreeHook.getDisplayName(id);
33802 var element = ReactComponentTreeHook.getElement(id);
33803 var ownerID = ReactComponentTreeHook.getOwnerID(id);
33804 var ownerName = void 0;
33805
33806 if (ownerID) {
33807 ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
33808 }
33809 warning$4(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id);
33810 return describeComponentFrame$1(name || '', element && element._source, ownerName || '');
33811} 31700}
33812 31701
33813var ReactComponentTreeHook = { 31702function createFactoryWithValidation(type) {
33814 onSetChildren: function (id, nextChildIDs) { 31703 var validatedFactory = createElementWithValidation.bind(null, type);
33815 var item = getItem(id); 31704 // Legacy hook TODO: Warn if this is accessed
33816 !item ? invariant(false, 'Item must have been set') : void 0; 31705 validatedFactory.type = type;
33817 item.childIDs = nextChildIDs;
33818
33819 for (var i = 0; i < nextChildIDs.length; i++) {
33820 var nextChildID = nextChildIDs[i];
33821 var nextChild = getItem(nextChildID);
33822 !nextChild ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : void 0;
33823 !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : void 0;
33824 !nextChild.isMounted ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : void 0;
33825 if (nextChild.parentID == null) {
33826 nextChild.parentID = id;
33827 // TODO: This shouldn't be necessary but mounting a new root during in
33828 // componentWillMount currently causes not-yet-mounted components to
33829 // be purged from our tree data so their parent id is missing.
33830 }
33831 !(nextChild.parentID === id) ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : void 0;
33832 }
33833 },
33834 onBeforeMountComponent: function (id, element, parentID) {
33835 var item = {
33836 element: element,
33837 parentID: parentID,
33838 text: null,
33839 childIDs: [],
33840 isMounted: false,
33841 updateCount: 0
33842 };
33843 setItem(id, item);
33844 },
33845 onBeforeUpdateComponent: function (id, element) {
33846 var item = getItem(id);
33847 if (!item || !item.isMounted) {
33848 // We may end up here as a result of setState() in componentWillUnmount().
33849 // In this case, ignore the element.
33850 return;
33851 }
33852 item.element = element;
33853 },
33854 onMountComponent: function (id) {
33855 var item = getItem(id);
33856 !item ? invariant(false, 'Item must have been set') : void 0;
33857 item.isMounted = true;
33858 var isRoot = item.parentID === 0;
33859 if (isRoot) {
33860 addRoot(id);
33861 }
33862 },
33863 onUpdateComponent: function (id) {
33864 var item = getItem(id);
33865 if (!item || !item.isMounted) {
33866 // We may end up here as a result of setState() in componentWillUnmount().
33867 // In this case, ignore the element.
33868 return;
33869 }
33870 item.updateCount++;
33871 },
33872 onUnmountComponent: function (id) {
33873 var item = getItem(id);
33874 if (item) {
33875 // We need to check if it exists.
33876 // `item` might not exist if it is inside an error boundary, and a sibling
33877 // error boundary child threw while mounting. Then this instance never
33878 // got a chance to mount, but it still gets an unmounting event during
33879 // the error boundary cleanup.
33880 item.isMounted = false;
33881 var isRoot = item.parentID === 0;
33882 if (isRoot) {
33883 removeRoot(id);
33884 }
33885 }
33886 unmountedIDs.push(id);
33887 },
33888 purgeUnmountedComponents: function () {
33889 if (ReactComponentTreeHook._preventPurging) {
33890 // Should only be used for testing.
33891 return;
33892 }
33893 31706
33894 for (var i = 0; i < unmountedIDs.length; i++) { 31707 {
33895 var id = unmountedIDs[i]; 31708 Object.defineProperty(validatedFactory, 'type', {
33896 purgeDeep(id); 31709 enumerable: false,
33897 } 31710 get: function () {
33898 unmountedIDs.length = 0; 31711 lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
33899 }, 31712 Object.defineProperty(this, 'type', {
33900 isMounted: function (id) { 31713 value: type
33901 var item = getItem(id); 31714 });
33902 return item ? item.isMounted : false; 31715 return type;
33903 },
33904 getCurrentStackAddendum: function () {
33905 var info = '';
33906 var currentOwner = ReactCurrentOwner_1.current;
33907 if (currentOwner) {
33908 !(typeof currentOwner.tag !== 'number') ? invariant(false, 'Fiber owners should not show up in Stack stack traces.') : void 0;
33909 if (typeof currentOwner._debugID === 'number') {
33910 info += ReactComponentTreeHook.getStackAddendumByID(currentOwner._debugID);
33911 } 31716 }
33912 } 31717 });
33913 return info; 31718 }
33914 },
33915 getStackAddendumByID: function (id) {
33916 var info = '';
33917 while (id) {
33918 info += describeID(id);
33919 id = ReactComponentTreeHook.getParentID(id);
33920 }
33921 return info;
33922 },
33923 getChildIDs: function (id) {
33924 var item = getItem(id);
33925 return item ? item.childIDs : [];
33926 },
33927 getDisplayName: function (id) {
33928 var element = ReactComponentTreeHook.getElement(id);
33929 if (!element) {
33930 return null;
33931 }
33932 return getDisplayName$1(element);
33933 },
33934 getElement: function (id) {
33935 var item = getItem(id);
33936 return item ? item.element : null;
33937 },
33938 getOwnerID: function (id) {
33939 var element = ReactComponentTreeHook.getElement(id);
33940 if (!element || !element._owner) {
33941 return null;
33942 }
33943 return element._owner._debugID;
33944 },
33945 getParentID: function (id) {
33946 var item = getItem(id);
33947 return item ? item.parentID : null;
33948 },
33949 getSource: function (id) {
33950 var item = getItem(id);
33951 var element = item ? item.element : null;
33952 var source = element != null ? element._source : null;
33953 return source;
33954 },
33955 getText: function (id) {
33956 var element = ReactComponentTreeHook.getElement(id);
33957 if (typeof element === 'string') {
33958 return element;
33959 } else if (typeof element === 'number') {
33960 return '' + element;
33961 } else {
33962 return null;
33963 }
33964 },
33965 getUpdateCount: function (id) {
33966 var item = getItem(id);
33967 return item ? item.updateCount : 0;
33968 },
33969
33970
33971 getRootIDs: getRootIDs,
33972 getRegisteredIDs: getItemIDs
33973};
33974
33975var ReactComponentTreeHook_1 = ReactComponentTreeHook;
33976 31719
33977var createElement = ReactElement_1.createElement; 31720 return validatedFactory;
33978var createFactory = ReactElement_1.createFactory; 31721}
33979var cloneElement = ReactElement_1.cloneElement;
33980 31722
33981{ 31723function cloneElementWithValidation(element, props, children) {
33982 var ReactElementValidator = ReactElementValidator_1; 31724 var newElement = cloneElement.apply(this, arguments);
33983 createElement = ReactElementValidator.createElement; 31725 for (var i = 2; i < arguments.length; i++) {
33984 createFactory = ReactElementValidator.createFactory; 31726 validateChildKeys(arguments[i], newElement.type);
33985 cloneElement = ReactElementValidator.cloneElement; 31727 }
31728 validatePropTypes(newElement);
31729 return newElement;
33986} 31730}
33987 31731
31732var REACT_FRAGMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.fragment') || 0xeacb;
31733
33988var React = { 31734var React = {
33989 Children: { 31735 Children: {
33990 map: ReactChildren_1.map, 31736 map: mapChildren,
33991 forEach: ReactChildren_1.forEach, 31737 forEach: forEachChildren,
33992 count: ReactChildren_1.count, 31738 count: countChildren,
33993 toArray: ReactChildren_1.toArray, 31739 toArray: toArray,
33994 only: onlyChild_1 31740 only: onlyChild
33995 }, 31741 },
33996 31742
33997 Component: ReactBaseClasses.Component, 31743 Component: Component,
33998 PureComponent: ReactBaseClasses.PureComponent, 31744 PureComponent: PureComponent,
33999 unstable_AsyncComponent: ReactBaseClasses.AsyncComponent, 31745 unstable_AsyncComponent: AsyncComponent,
34000 31746
34001 createElement: createElement, 31747 createElement: createElementWithValidation,
34002 cloneElement: cloneElement, 31748 cloneElement: cloneElementWithValidation,
34003 isValidElement: ReactElement_1.isValidElement, 31749 createFactory: createFactoryWithValidation,
34004 31750 isValidElement: isValidElement,
34005 createFactory: createFactory,
34006 31751
34007 version: ReactVersion, 31752 version: ReactVersion,
34008 31753
34009 __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: { 31754 __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
34010 ReactCurrentOwner: ReactCurrentOwner_1, 31755 ReactCurrentOwner: ReactCurrentOwner,
34011 // Used by renderers to avoid bundling object-assign twice in UMD bundles: 31756 // Used by renderers to avoid bundling object-assign twice in UMD bundles:
34012 assign: objectAssign$1 31757 assign: _assign
34013 } 31758 }
34014}; 31759};
34015 31760
31761if (enableReactFragment) {
31762 React.Fragment = REACT_FRAGMENT_TYPE;
31763}
31764
34016{ 31765{
34017 objectAssign$1(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, { 31766 _assign(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
34018 // These should not be included in production. 31767 // These should not be included in production.
34019 ReactComponentTreeHook: ReactComponentTreeHook_1, 31768 ReactDebugCurrentFrame: ReactDebugCurrentFrame,
34020 ReactDebugCurrentFrame: ReactDebugCurrentFrame_1 31769 // Shim for React DOM 16.0.0 which still destructured (but not used) this.
31770 // TODO: remove in React 17.0.
31771 ReactComponentTreeHook: {}
34021 }); 31772 });
34022} 31773}
34023 31774
34024var ReactEntry = React;
34025 31775
34026module.exports = ReactEntry;
34027 31776
34028})(); 31777var React$2 = Object.freeze({
31778 default: React
31779});
31780
31781var React$3 = ( React$2 && React ) || React$2;
31782
31783// TODO: decide on the top-level export form.
31784// This is hacky but makes it work with both Rollup and Jest.
31785var react = React$3['default'] ? React$3['default'] : React$3;
31786
31787module.exports = react;
31788 })();
34029} 31789}
34030 31790
34031/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) 31791/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
34032 31792
34033/***/ }), 31793/***/ }),
34034/* 172 */ 31794/* 170 */
34035/***/ (function(module, exports, __webpack_require__) { 31795/***/ (function(module, exports, __webpack_require__) {
34036 31796
34037"use strict"; 31797"use strict";
34038/* 31798/** @license React v16.1.1
34039 React v16.0.0 31799 * react.production.min.js
34040 react.production.min.js 31800 *
34041 31801 * Copyright (c) 2013-present, Facebook, Inc.
34042 Copyright (c) 2013-present, Facebook, Inc. 31802 *
34043 31803 * This source code is licensed under the MIT license found in the
34044 This source code is licensed under the MIT license found in the 31804 * LICENSE file in the root directory of this source tree.
34045 LICENSE file in the root directory of this source tree. 31805 */
34046*/ 31806var m=__webpack_require__(17),n=__webpack_require__(28),p=__webpack_require__(12);
34047var f=__webpack_require__(18),p=__webpack_require__(28);__webpack_require__(13);var r=__webpack_require__(12); 31807function q(a){for(var b=arguments.length-1,e="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,d=0;d<b;d++)e+="\x26args[]\x3d"+encodeURIComponent(arguments[d+1]);b=Error(e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");b.name="Invariant Violation";b.framesToPop=1;throw b;}
34048function t(a){for(var b=arguments.length-1,d="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,e=0;e<b;e++)d+="\x26args[]\x3d"+encodeURIComponent(arguments[e+1]);b=Error(d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");b.name="Invariant Violation";b.framesToPop=1;throw b;} 31808var r={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function t(a,b,e){this.props=a;this.context=b;this.refs=n;this.updater=e||r}t.prototype.isReactComponent={};t.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?q("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};t.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};
34049var u={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function v(a,b,d){this.props=a;this.context=b;this.refs=p;this.updater=d||u}v.prototype.isReactComponent={};v.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?t("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};v.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")}; 31809function u(a,b,e){this.props=a;this.context=b;this.refs=n;this.updater=e||r}function v(){}v.prototype=t.prototype;var w=u.prototype=new v;w.constructor=u;m(w,t.prototype);w.isPureReactComponent=!0;function x(a,b,e){this.props=a;this.context=b;this.refs=n;this.updater=e||r}var y=x.prototype=new v;y.constructor=x;m(y,t.prototype);y.unstable_isAsyncReactComponent=!0;y.render=function(){return this.props.children};
34050function w(a,b,d){this.props=a;this.context=b;this.refs=p;this.updater=d||u}function x(){}x.prototype=v.prototype;var y=w.prototype=new x;y.constructor=w;f(y,v.prototype);y.isPureReactComponent=!0;function z(a,b,d){this.props=a;this.context=b;this.refs=p;this.updater=d||u}var A=z.prototype=new x;A.constructor=z;f(A,v.prototype);A.unstable_isAsyncReactComponent=!0;A.render=function(){return this.props.children}; 31810var z={current:null},A=Object.prototype.hasOwnProperty,B="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103,C={key:!0,ref:!0,__self:!0,__source:!0};
34051var B={Component:v,PureComponent:w,AsyncComponent:z},C={current:null},D=Object.prototype.hasOwnProperty,E="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103,F={key:!0,ref:!0,__self:!0,__source:!0};function G(a,b,d,e,c,g,k){return{$$typeof:E,type:a,key:b,ref:d,props:k,_owner:g}} 31811function D(a,b,e){var d,c={},h=null,k=null;if(null!=b)for(d in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(h=""+b.key),b)A.call(b,d)&&!C.hasOwnProperty(d)&&(c[d]=b[d]);var f=arguments.length-2;if(1===f)c.children=e;else if(1<f){for(var g=Array(f),l=0;l<f;l++)g[l]=arguments[l+2];c.children=g}if(a&&a.defaultProps)for(d in f=a.defaultProps,f)void 0===c[d]&&(c[d]=f[d]);return{$$typeof:B,type:a,key:h,ref:k,props:c,_owner:z.current}}function E(a){return"object"===typeof a&&null!==a&&a.$$typeof===B}
34052G.createElement=function(a,b,d){var e,c={},g=null,k=null,m=null,q=null;if(null!=b)for(e in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=""+b.key),m=void 0===b.__self?null:b.__self,q=void 0===b.__source?null:b.__source,b)D.call(b,e)&&!F.hasOwnProperty(e)&&(c[e]=b[e]);var l=arguments.length-2;if(1===l)c.children=d;else if(1<l){for(var h=Array(l),n=0;n<l;n++)h[n]=arguments[n+2];c.children=h}if(a&&a.defaultProps)for(e in l=a.defaultProps,l)void 0===c[e]&&(c[e]=l[e]);return G(a,g,k,m,q,C.current,c)}; 31812var F="function"===typeof Symbol&&Symbol.iterator,G="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103,H="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.portal")||60106;function escape(a){var b={"\x3d":"\x3d0",":":"\x3d2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var I=/\/+/g,J=[];
34053G.createFactory=function(a){var b=G.createElement.bind(null,a);b.type=a;return b};G.cloneAndReplaceKey=function(a,b){return G(a.type,b,a.ref,a._self,a._source,a._owner,a.props)}; 31813function K(a,b,e,d){if(J.length){var c=J.pop();c.result=a;c.keyPrefix=b;c.func=e;c.context=d;c.count=0;return c}return{result:a,keyPrefix:b,func:e,context:d,count:0}}function L(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>J.length&&J.push(a)}
34054G.cloneElement=function(a,b,d){var e=f({},a.props),c=a.key,g=a.ref,k=a._self,m=a._source,q=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,q=C.current);void 0!==b.key&&(c=""+b.key);if(a.type&&a.type.defaultProps)var l=a.type.defaultProps;for(h in b)D.call(b,h)&&!F.hasOwnProperty(h)&&(e[h]=void 0===b[h]&&void 0!==l?l[h]:b[h])}var h=arguments.length-2;if(1===h)e.children=d;else if(1<h){l=Array(h);for(var n=0;n<h;n++)l[n]=arguments[n+2];e.children=l}return G(a.type,c,g,k,m,q,e)}; 31814function M(a,b,e,d){var c=typeof a;if("undefined"===c||"boolean"===c)a=null;if(null===a||"string"===c||"number"===c||"object"===c&&a.$$typeof===G||"object"===c&&a.$$typeof===H)return e(d,a,""===b?"."+N(a,0):b),1;var h=0;b=""===b?".":b+":";if(Array.isArray(a))for(var k=0;k<a.length;k++){c=a[k];var f=b+N(c,k);h+=M(c,f,e,d)}else if(f=F&&a[F]||a["@@iterator"],"function"===typeof f)for(a=f.call(a),k=0;!(c=a.next()).done;)c=c.value,f=b+N(c,k++),h+=M(c,f,e,d);else"object"===c&&(e=""+a,q("31","[object Object]"===
34055G.isValidElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===E};var H="function"===typeof Symbol&&Symbol.iterator,I="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;function escape(a){var b={"\x3d":"\x3d0",":":"\x3d2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var J=/\/+/g,K=[]; 31815e?"object with keys {"+Object.keys(a).join(", ")+"}":e,""));return h}function N(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function O(a,b){a.func.call(a.context,b,a.count++)}
34056function L(a,b,d,e){if(K.length){var c=K.pop();c.result=a;c.keyPrefix=b;c.func=d;c.context=e;c.count=0;return c}return{result:a,keyPrefix:b,func:d,context:e,count:0}}function M(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>K.length&&K.push(a)} 31816function P(a,b,e){var d=a.result,c=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?Q(a,d,e,p.thatReturnsArgument):null!=a&&(E(a)&&(b=c+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(I,"$\x26/")+"/")+e,a={$$typeof:B,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}),d.push(a))}function Q(a,b,e,d,c){var h="";null!=e&&(h=(""+e).replace(I,"$\x26/")+"/");b=K(b,h,d,c);null==a||M(a,"",P,b);L(b)}"function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.fragment");
34057function N(a,b,d,e){var c=typeof a;if("undefined"===c||"boolean"===c)a=null;if(null===a||"string"===c||"number"===c||"object"===c&&a.$$typeof===I)return d(e,a,""===b?"."+O(a,0):b),1;var g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var k=0;k<a.length;k++){c=a[k];var m=b+O(c,k);g+=N(c,m,d,e)}else if(m=H&&a[H]||a["@@iterator"],"function"===typeof m)for(a=m.call(a),k=0;!(c=a.next()).done;)c=c.value,m=b+O(c,k++),g+=N(c,m,d,e);else"object"===c&&(d=""+a,t("31","[object Object]"===d?"object with keys {"+ 31817var R={Children:{map:function(a,b,e){if(null==a)return a;var d=[];Q(a,d,null,b,e);return d},forEach:function(a,b,e){if(null==a)return a;b=K(null,null,b,e);null==a||M(a,"",O,b);L(b)},count:function(a){return null==a?0:M(a,"",p.thatReturnsNull,null)},toArray:function(a){var b=[];Q(a,b,null,p.thatReturnsArgument);return b},only:function(a){E(a)?void 0:q("143");return a}},Component:t,PureComponent:u,unstable_AsyncComponent:x,createElement:D,cloneElement:function(a,b,e){var d=m({},a.props),c=a.key,h=a.ref,
34058Object.keys(a).join(", ")+"}":d,""));return g}function O(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function P(a,b){a.func.call(a.context,b,a.count++)}function Q(a,b,d){var e=a.result,c=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?R(a,e,d,r.thatReturnsArgument):null!=a&&(G.isValidElement(a)&&(a=G.cloneAndReplaceKey(a,c+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(J,"$\x26/")+"/")+d)),e.push(a))} 31818k=a._owner;if(null!=b){void 0!==b.ref&&(h=b.ref,k=z.current);void 0!==b.key&&(c=""+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(g in b)A.call(b,g)&&!C.hasOwnProperty(g)&&(d[g]=void 0===b[g]&&void 0!==f?f[g]:b[g])}var g=arguments.length-2;if(1===g)d.children=e;else if(1<g){f=Array(g);for(var l=0;l<g;l++)f[l]=arguments[l+2];d.children=f}return{$$typeof:B,type:a.type,key:c,ref:h,props:d,_owner:k}},createFactory:function(a){var b=D.bind(null,a);b.type=a;return b},isValidElement:E,
34059function R(a,b,d,e,c){var g="";null!=d&&(g=(""+d).replace(J,"$\x26/")+"/");b=L(b,g,e,c);null==a||N(a,"",Q,b);M(b)}var S={forEach:function(a,b,d){if(null==a)return a;b=L(null,null,b,d);null==a||N(a,"",P,b);M(b)},map:function(a,b,d){if(null==a)return a;var e=[];R(a,e,null,b,d);return e},count:function(a){return null==a?0:N(a,"",r.thatReturnsNull,null)},toArray:function(a){var b=[];R(a,b,null,r.thatReturnsArgument);return b}}; 31819version:"16.1.1",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:z,assign:m}},S=Object.freeze({default:R}),T=S&&R||S;module.exports=T["default"]?T["default"]:T;
34060module.exports={Children:{map:S.map,forEach:S.forEach,count:S.count,toArray:S.toArray,only:function(a){G.isValidElement(a)?void 0:t("143");return a}},Component:B.Component,PureComponent:B.PureComponent,unstable_AsyncComponent:B.AsyncComponent,createElement:G.createElement,cloneElement:G.cloneElement,isValidElement:G.isValidElement,createFactory:G.createFactory,version:"16.0.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:C,assign:f}};
34061 31820
34062 31821
34063/***/ }) 31822/***/ })