UNPKG

762 kBJavaScriptView Raw
1exports["server"] =
2/******/ (function(modules) { // webpackBootstrap
3/******/ // The module cache
4/******/ var installedModules = {};
5/******/
6/******/ // The require function
7/******/ function __webpack_require__(moduleId) {
8/******/
9/******/ // Check if module is in cache
10/******/ if(installedModules[moduleId]) {
11/******/ return installedModules[moduleId].exports;
12/******/ }
13/******/ // Create a new module (and put it into the cache)
14/******/ var module = installedModules[moduleId] = {
15/******/ i: moduleId,
16/******/ l: false,
17/******/ exports: {}
18/******/ };
19/******/
20/******/ // Execute the module function
21/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22/******/
23/******/ // Flag the module as loaded
24/******/ module.l = true;
25/******/
26/******/ // Return the exports of the module
27/******/ return module.exports;
28/******/ }
29/******/
30/******/
31/******/ // expose the modules object (__webpack_modules__)
32/******/ __webpack_require__.m = modules;
33/******/
34/******/ // expose the module cache
35/******/ __webpack_require__.c = installedModules;
36/******/
37/******/ // identity function for calling harmony imports with the correct context
38/******/ __webpack_require__.i = function(value) { return value; };
39/******/
40/******/ // define getter function for harmony exports
41/******/ __webpack_require__.d = function(exports, name, getter) {
42/******/ if(!__webpack_require__.o(exports, name)) {
43/******/ Object.defineProperty(exports, name, {
44/******/ configurable: false,
45/******/ enumerable: true,
46/******/ get: getter
47/******/ });
48/******/ }
49/******/ };
50/******/
51/******/ // getDefaultExport function for compatibility with non-harmony modules
52/******/ __webpack_require__.n = function(module) {
53/******/ var getter = module && module.__esModule ?
54/******/ function getDefault() { return module['default']; } :
55/******/ function getModuleExports() { return module; };
56/******/ __webpack_require__.d(getter, 'a', getter);
57/******/ return getter;
58/******/ };
59/******/
60/******/ // Object.prototype.hasOwnProperty.call
61/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
62/******/
63/******/ // __webpack_public_path__
64/******/ __webpack_require__.p = "";
65/******/
66/******/ // Load entry module and return exports
67/******/ return __webpack_require__(__webpack_require__.s = 84);
68/******/ })
69/************************************************************************/
70/******/ ([
71/* 0 */
72/***/ (function(module, exports, __webpack_require__) {
73
74"use strict";
75/**
76 * Copyright (c) 2013-present, Facebook, Inc.
77 *
78 * This source code is licensed under the MIT license found in the
79 * LICENSE file in the root directory of this source tree.
80 *
81 */
82
83
84
85/**
86 * Use invariant() to assert state which your program assumes to be true.
87 *
88 * Provide sprintf-style format (only %s is supported) and arguments
89 * to provide information about what broke and what you were
90 * expecting.
91 *
92 * The invariant message will be stripped in production, but the invariant
93 * will remain to ensure logic does not differ in production.
94 */
95
96var validateFormat = function validateFormat(format) {};
97
98if (process.env.NODE_ENV !== 'production') {
99 validateFormat = function validateFormat(format) {
100 if (format === undefined) {
101 throw new Error('invariant requires an error message argument');
102 }
103 };
104}
105
106function invariant(condition, format, a, b, c, d, e, f) {
107 validateFormat(format);
108
109 if (!condition) {
110 var error;
111 if (format === undefined) {
112 error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
113 } else {
114 var args = [a, b, c, d, e, f];
115 var argIndex = 0;
116 error = new Error(format.replace(/%s/g, function () {
117 return args[argIndex++];
118 }));
119 error.name = 'Invariant Violation';
120 }
121
122 error.framesToPop = 1; // we don't care about invariant's own frame
123 throw error;
124 }
125}
126
127module.exports = invariant;
128
129/***/ }),
130/* 1 */
131/***/ (function(module, exports, __webpack_require__) {
132
133"use strict";
134/**
135 * Copyright (c) 2014-present, Facebook, Inc.
136 *
137 * This source code is licensed under the MIT license found in the
138 * LICENSE file in the root directory of this source tree.
139 *
140 */
141
142
143
144var emptyFunction = __webpack_require__(7);
145
146/**
147 * Similar to invariant but only logs a warning if the condition is not met.
148 * This can be used to log issues in development environments in critical
149 * paths. Removing the logging code for production environments will keep the
150 * same logic and follow the same code paths.
151 */
152
153var warning = emptyFunction;
154
155if (process.env.NODE_ENV !== 'production') {
156 var printWarning = function printWarning(format) {
157 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
158 args[_key - 1] = arguments[_key];
159 }
160
161 var argIndex = 0;
162 var message = 'Warning: ' + format.replace(/%s/g, function () {
163 return args[argIndex++];
164 });
165 if (typeof console !== 'undefined') {
166 console.error(message);
167 }
168 try {
169 // --- Welcome to debugging React ---
170 // This error was thrown as a convenience so that you can use this stack
171 // to find the callsite that caused this warning to fire.
172 throw new Error(message);
173 } catch (x) {}
174 };
175
176 warning = function warning(condition, format) {
177 if (format === undefined) {
178 throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
179 }
180
181 if (format.indexOf('Failed Composite propType: ') === 0) {
182 return; // Ignore CompositeComponent proptype check.
183 }
184
185 if (!condition) {
186 for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
187 args[_key2 - 2] = arguments[_key2];
188 }
189
190 printWarning.apply(undefined, [format].concat(args));
191 }
192 };
193}
194
195module.exports = warning;
196
197/***/ }),
198/* 2 */
199/***/ (function(module, exports, __webpack_require__) {
200
201"use strict";
202/**
203 * Copyright (c) 2013-present, Facebook, Inc.
204 *
205 * This source code is licensed under the MIT license found in the
206 * LICENSE file in the root directory of this source tree.
207 *
208 *
209 */
210
211
212/**
213 * WARNING: DO NOT manually require this module.
214 * This is a replacement for `invariant(...)` used by the error code system
215 * and will _only_ be required by the corresponding babel pass.
216 * It always throws.
217 */
218
219function reactProdInvariant(code) {
220 var argCount = arguments.length - 1;
221
222 var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
223
224 for (var argIdx = 0; argIdx < argCount; argIdx++) {
225 message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
226 }
227
228 message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
229
230 var error = new Error(message);
231 error.name = 'Invariant Violation';
232 error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
233
234 throw error;
235}
236
237module.exports = reactProdInvariant;
238
239/***/ }),
240/* 3 */
241/***/ (function(module, exports) {
242
243module.exports = require("object-assign");
244
245/***/ }),
246/* 4 */
247/***/ (function(module, exports, __webpack_require__) {
248
249"use strict";
250/**
251 * Copyright (c) 2013-present, Facebook, Inc.
252 *
253 * This source code is licensed under the MIT license found in the
254 * LICENSE file in the root directory of this source tree.
255 *
256 */
257
258
259
260var _prodInvariant = __webpack_require__(2);
261
262var DOMProperty = __webpack_require__(16);
263var ReactDOMComponentFlags = __webpack_require__(56);
264
265var invariant = __webpack_require__(0);
266
267var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
268var Flags = ReactDOMComponentFlags;
269
270var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);
271
272/**
273 * Check if a given node should be cached.
274 */
275function shouldPrecacheNode(node, nodeID) {
276 return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' ';
277}
278
279/**
280 * Drill down (through composites and empty components) until we get a host or
281 * host text component.
282 *
283 * This is pretty polymorphic but unavoidable with the current structure we have
284 * for `_renderedChildren`.
285 */
286function getRenderedHostOrTextFromComponent(component) {
287 var rendered;
288 while (rendered = component._renderedComponent) {
289 component = rendered;
290 }
291 return component;
292}
293
294/**
295 * Populate `_hostNode` on the rendered host/text component with the given
296 * DOM node. The passed `inst` can be a composite.
297 */
298function precacheNode(inst, node) {
299 var hostInst = getRenderedHostOrTextFromComponent(inst);
300 hostInst._hostNode = node;
301 node[internalInstanceKey] = hostInst;
302}
303
304function uncacheNode(inst) {
305 var node = inst._hostNode;
306 if (node) {
307 delete node[internalInstanceKey];
308 inst._hostNode = null;
309 }
310}
311
312/**
313 * Populate `_hostNode` on each child of `inst`, assuming that the children
314 * match up with the DOM (element) children of `node`.
315 *
316 * We cache entire levels at once to avoid an n^2 problem where we access the
317 * children of a node sequentially and have to walk from the start to our target
318 * node every time.
319 *
320 * Since we update `_renderedChildren` and the actual DOM at (slightly)
321 * different times, we could race here and see a newer `_renderedChildren` than
322 * the DOM nodes we see. To avoid this, ReactMultiChild calls
323 * `prepareToManageChildren` before we change `_renderedChildren`, at which
324 * time the container's child nodes are always cached (until it unmounts).
325 */
326function precacheChildNodes(inst, node) {
327 if (inst._flags & Flags.hasCachedChildNodes) {
328 return;
329 }
330 var children = inst._renderedChildren;
331 var childNode = node.firstChild;
332 outer: for (var name in children) {
333 if (!children.hasOwnProperty(name)) {
334 continue;
335 }
336 var childInst = children[name];
337 var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
338 if (childID === 0) {
339 // We're currently unmounting this child in ReactMultiChild; skip it.
340 continue;
341 }
342 // We assume the child nodes are in the same order as the child instances.
343 for (; childNode !== null; childNode = childNode.nextSibling) {
344 if (shouldPrecacheNode(childNode, childID)) {
345 precacheNode(childInst, childNode);
346 continue outer;
347 }
348 }
349 // We reached the end of the DOM children without finding an ID match.
350 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0;
351 }
352 inst._flags |= Flags.hasCachedChildNodes;
353}
354
355/**
356 * Given a DOM node, return the closest ReactDOMComponent or
357 * ReactDOMTextComponent instance ancestor.
358 */
359function getClosestInstanceFromNode(node) {
360 if (node[internalInstanceKey]) {
361 return node[internalInstanceKey];
362 }
363
364 // Walk up the tree until we find an ancestor whose instance we have cached.
365 var parents = [];
366 while (!node[internalInstanceKey]) {
367 parents.push(node);
368 if (node.parentNode) {
369 node = node.parentNode;
370 } else {
371 // Top of the tree. This node must not be part of a React tree (or is
372 // unmounted, potentially).
373 return null;
374 }
375 }
376
377 var closest;
378 var inst;
379 for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {
380 closest = inst;
381 if (parents.length) {
382 precacheChildNodes(inst, node);
383 }
384 }
385
386 return closest;
387}
388
389/**
390 * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
391 * instance, or null if the node was not rendered by this React.
392 */
393function getInstanceFromNode(node) {
394 var inst = getClosestInstanceFromNode(node);
395 if (inst != null && inst._hostNode === node) {
396 return inst;
397 } else {
398 return null;
399 }
400}
401
402/**
403 * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
404 * DOM node.
405 */
406function getNodeFromInstance(inst) {
407 // Without this first invariant, passing a non-DOM-component triggers the next
408 // invariant for a missing parent, which is super confusing.
409 !(inst._hostNode !== undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
410
411 if (inst._hostNode) {
412 return inst._hostNode;
413 }
414
415 // Walk up the tree until we find an ancestor whose DOM node we have cached.
416 var parents = [];
417 while (!inst._hostNode) {
418 parents.push(inst);
419 !inst._hostParent ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0;
420 inst = inst._hostParent;
421 }
422
423 // Now parents contains each ancestor that does *not* have a cached native
424 // node, and `inst` is the deepest ancestor that does.
425 for (; parents.length; inst = parents.pop()) {
426 precacheChildNodes(inst, inst._hostNode);
427 }
428
429 return inst._hostNode;
430}
431
432var ReactDOMComponentTree = {
433 getClosestInstanceFromNode: getClosestInstanceFromNode,
434 getInstanceFromNode: getInstanceFromNode,
435 getNodeFromInstance: getNodeFromInstance,
436 precacheChildNodes: precacheChildNodes,
437 precacheNode: precacheNode,
438 uncacheNode: uncacheNode
439};
440
441module.exports = ReactDOMComponentTree;
442
443/***/ }),
444/* 5 */
445/***/ (function(module, exports, __webpack_require__) {
446
447"use strict";
448/**
449 * Copyright (c) 2013-present, Facebook, Inc.
450 *
451 * This source code is licensed under the MIT license found in the
452 * LICENSE file in the root directory of this source tree.
453 *
454 */
455
456
457
458var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
459
460/**
461 * Simple, lightweight module assisting with the detection and context of
462 * Worker. Helps avoid circular dependencies and allows code to reason about
463 * whether or not they are in a Worker, even if they never include the main
464 * `ReactWorker` dependency.
465 */
466var ExecutionEnvironment = {
467
468 canUseDOM: canUseDOM,
469
470 canUseWorkers: typeof Worker !== 'undefined',
471
472 canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
473
474 canUseViewport: canUseDOM && !!window.screen,
475
476 isInWorker: !canUseDOM // For now, this is true - might change in the future.
477
478};
479
480module.exports = ExecutionEnvironment;
481
482/***/ }),
483/* 6 */
484/***/ (function(module, exports, __webpack_require__) {
485
486"use strict";
487/**
488 * Copyright (c) 2016-present, Facebook, Inc.
489 *
490 * This source code is licensed under the MIT license found in the
491 * LICENSE file in the root directory of this source tree.
492 *
493 *
494 */
495
496
497
498// Trust the developer to only use ReactInstrumentation with a __DEV__ check
499
500var debugTool = null;
501
502if (process.env.NODE_ENV !== 'production') {
503 var ReactDebugTool = __webpack_require__(145);
504 debugTool = ReactDebugTool;
505}
506
507module.exports = { debugTool: debugTool };
508
509/***/ }),
510/* 7 */
511/***/ (function(module, exports, __webpack_require__) {
512
513"use strict";
514
515
516/**
517 * Copyright (c) 2013-present, Facebook, Inc.
518 *
519 * This source code is licensed under the MIT license found in the
520 * LICENSE file in the root directory of this source tree.
521 *
522 *
523 */
524
525function makeEmptyFunction(arg) {
526 return function () {
527 return arg;
528 };
529}
530
531/**
532 * This function accepts and discards inputs; it has no side effects. This is
533 * primarily useful idiomatically for overridable function endpoints which
534 * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
535 */
536var emptyFunction = function emptyFunction() {};
537
538emptyFunction.thatReturns = makeEmptyFunction;
539emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
540emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
541emptyFunction.thatReturnsNull = makeEmptyFunction(null);
542emptyFunction.thatReturnsThis = function () {
543 return this;
544};
545emptyFunction.thatReturnsArgument = function (arg) {
546 return arg;
547};
548
549module.exports = emptyFunction;
550
551/***/ }),
552/* 8 */
553/***/ (function(module, exports, __webpack_require__) {
554
555"use strict";
556/**
557 * Copyright (c) 2016-present, Facebook, Inc.
558 *
559 * This source code is licensed under the MIT license found in the
560 * LICENSE file in the root directory of this source tree.
561 *
562 *
563 */
564
565
566
567var _prodInvariant = __webpack_require__(14);
568
569var ReactCurrentOwner = __webpack_require__(11);
570
571var invariant = __webpack_require__(0);
572var warning = __webpack_require__(1);
573
574function isNative(fn) {
575 // Based on isNative() from Lodash
576 var funcToString = Function.prototype.toString;
577 var hasOwnProperty = Object.prototype.hasOwnProperty;
578 var reIsNative = RegExp('^' + funcToString
579 // Take an example native function source for comparison
580 .call(hasOwnProperty
581 // Strip regex characters so we can use it for regex
582 ).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&'
583 // Remove hasOwnProperty from the template to make it generic
584 ).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
585 try {
586 var source = funcToString.call(fn);
587 return reIsNative.test(source);
588 } catch (err) {
589 return false;
590 }
591}
592
593var canUseCollections =
594// Array.from
595typeof Array.from === 'function' &&
596// Map
597typeof Map === 'function' && isNative(Map) &&
598// Map.prototype.keys
599Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
600// Set
601typeof Set === 'function' && isNative(Set) &&
602// Set.prototype.keys
603Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
604
605var setItem;
606var getItem;
607var removeItem;
608var getItemIDs;
609var addRoot;
610var removeRoot;
611var getRootIDs;
612
613if (canUseCollections) {
614 var itemMap = new Map();
615 var rootIDSet = new Set();
616
617 setItem = function (id, item) {
618 itemMap.set(id, item);
619 };
620 getItem = function (id) {
621 return itemMap.get(id);
622 };
623 removeItem = function (id) {
624 itemMap['delete'](id);
625 };
626 getItemIDs = function () {
627 return Array.from(itemMap.keys());
628 };
629
630 addRoot = function (id) {
631 rootIDSet.add(id);
632 };
633 removeRoot = function (id) {
634 rootIDSet['delete'](id);
635 };
636 getRootIDs = function () {
637 return Array.from(rootIDSet.keys());
638 };
639} else {
640 var itemByKey = {};
641 var rootByKey = {};
642
643 // Use non-numeric keys to prevent V8 performance issues:
644 // https://github.com/facebook/react/pull/7232
645 var getKeyFromID = function (id) {
646 return '.' + id;
647 };
648 var getIDFromKey = function (key) {
649 return parseInt(key.substr(1), 10);
650 };
651
652 setItem = function (id, item) {
653 var key = getKeyFromID(id);
654 itemByKey[key] = item;
655 };
656 getItem = function (id) {
657 var key = getKeyFromID(id);
658 return itemByKey[key];
659 };
660 removeItem = function (id) {
661 var key = getKeyFromID(id);
662 delete itemByKey[key];
663 };
664 getItemIDs = function () {
665 return Object.keys(itemByKey).map(getIDFromKey);
666 };
667
668 addRoot = function (id) {
669 var key = getKeyFromID(id);
670 rootByKey[key] = true;
671 };
672 removeRoot = function (id) {
673 var key = getKeyFromID(id);
674 delete rootByKey[key];
675 };
676 getRootIDs = function () {
677 return Object.keys(rootByKey).map(getIDFromKey);
678 };
679}
680
681var unmountedIDs = [];
682
683function purgeDeep(id) {
684 var item = getItem(id);
685 if (item) {
686 var childIDs = item.childIDs;
687
688 removeItem(id);
689 childIDs.forEach(purgeDeep);
690 }
691}
692
693function describeComponentFrame(name, source, ownerName) {
694 return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
695}
696
697function getDisplayName(element) {
698 if (element == null) {
699 return '#empty';
700 } else if (typeof element === 'string' || typeof element === 'number') {
701 return '#text';
702 } else if (typeof element.type === 'string') {
703 return element.type;
704 } else {
705 return element.type.displayName || element.type.name || 'Unknown';
706 }
707}
708
709function describeID(id) {
710 var name = ReactComponentTreeHook.getDisplayName(id);
711 var element = ReactComponentTreeHook.getElement(id);
712 var ownerID = ReactComponentTreeHook.getOwnerID(id);
713 var ownerName;
714 if (ownerID) {
715 ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
716 }
717 process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
718 return describeComponentFrame(name, element && element._source, ownerName);
719}
720
721var ReactComponentTreeHook = {
722 onSetChildren: function (id, nextChildIDs) {
723 var item = getItem(id);
724 !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
725 item.childIDs = nextChildIDs;
726
727 for (var i = 0; i < nextChildIDs.length; i++) {
728 var nextChildID = nextChildIDs[i];
729 var nextChild = getItem(nextChildID);
730 !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;
731 !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;
732 !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
733 if (nextChild.parentID == null) {
734 nextChild.parentID = id;
735 // TODO: This shouldn't be necessary but mounting a new root during in
736 // componentWillMount currently causes not-yet-mounted components to
737 // be purged from our tree data so their parent id is missing.
738 }
739 !(nextChild.parentID === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0;
740 }
741 },
742 onBeforeMountComponent: function (id, element, parentID) {
743 var item = {
744 element: element,
745 parentID: parentID,
746 text: null,
747 childIDs: [],
748 isMounted: false,
749 updateCount: 0
750 };
751 setItem(id, item);
752 },
753 onBeforeUpdateComponent: function (id, element) {
754 var item = getItem(id);
755 if (!item || !item.isMounted) {
756 // We may end up here as a result of setState() in componentWillUnmount().
757 // In this case, ignore the element.
758 return;
759 }
760 item.element = element;
761 },
762 onMountComponent: function (id) {
763 var item = getItem(id);
764 !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
765 item.isMounted = true;
766 var isRoot = item.parentID === 0;
767 if (isRoot) {
768 addRoot(id);
769 }
770 },
771 onUpdateComponent: function (id) {
772 var item = getItem(id);
773 if (!item || !item.isMounted) {
774 // We may end up here as a result of setState() in componentWillUnmount().
775 // In this case, ignore the element.
776 return;
777 }
778 item.updateCount++;
779 },
780 onUnmountComponent: function (id) {
781 var item = getItem(id);
782 if (item) {
783 // We need to check if it exists.
784 // `item` might not exist if it is inside an error boundary, and a sibling
785 // error boundary child threw while mounting. Then this instance never
786 // got a chance to mount, but it still gets an unmounting event during
787 // the error boundary cleanup.
788 item.isMounted = false;
789 var isRoot = item.parentID === 0;
790 if (isRoot) {
791 removeRoot(id);
792 }
793 }
794 unmountedIDs.push(id);
795 },
796 purgeUnmountedComponents: function () {
797 if (ReactComponentTreeHook._preventPurging) {
798 // Should only be used for testing.
799 return;
800 }
801
802 for (var i = 0; i < unmountedIDs.length; i++) {
803 var id = unmountedIDs[i];
804 purgeDeep(id);
805 }
806 unmountedIDs.length = 0;
807 },
808 isMounted: function (id) {
809 var item = getItem(id);
810 return item ? item.isMounted : false;
811 },
812 getCurrentStackAddendum: function (topElement) {
813 var info = '';
814 if (topElement) {
815 var name = getDisplayName(topElement);
816 var owner = topElement._owner;
817 info += describeComponentFrame(name, topElement._source, owner && owner.getName());
818 }
819
820 var currentOwner = ReactCurrentOwner.current;
821 var id = currentOwner && currentOwner._debugID;
822
823 info += ReactComponentTreeHook.getStackAddendumByID(id);
824 return info;
825 },
826 getStackAddendumByID: function (id) {
827 var info = '';
828 while (id) {
829 info += describeID(id);
830 id = ReactComponentTreeHook.getParentID(id);
831 }
832 return info;
833 },
834 getChildIDs: function (id) {
835 var item = getItem(id);
836 return item ? item.childIDs : [];
837 },
838 getDisplayName: function (id) {
839 var element = ReactComponentTreeHook.getElement(id);
840 if (!element) {
841 return null;
842 }
843 return getDisplayName(element);
844 },
845 getElement: function (id) {
846 var item = getItem(id);
847 return item ? item.element : null;
848 },
849 getOwnerID: function (id) {
850 var element = ReactComponentTreeHook.getElement(id);
851 if (!element || !element._owner) {
852 return null;
853 }
854 return element._owner._debugID;
855 },
856 getParentID: function (id) {
857 var item = getItem(id);
858 return item ? item.parentID : null;
859 },
860 getSource: function (id) {
861 var item = getItem(id);
862 var element = item ? item.element : null;
863 var source = element != null ? element._source : null;
864 return source;
865 },
866 getText: function (id) {
867 var element = ReactComponentTreeHook.getElement(id);
868 if (typeof element === 'string') {
869 return element;
870 } else if (typeof element === 'number') {
871 return '' + element;
872 } else {
873 return null;
874 }
875 },
876 getUpdateCount: function (id) {
877 var item = getItem(id);
878 return item ? item.updateCount : 0;
879 },
880
881
882 getRootIDs: getRootIDs,
883 getRegisteredIDs: getItemIDs,
884
885 pushNonStandardWarningStack: function (isCreatingElement, currentSource) {
886 if (typeof console.reactStack !== 'function') {
887 return;
888 }
889
890 var stack = [];
891 var currentOwner = ReactCurrentOwner.current;
892 var id = currentOwner && currentOwner._debugID;
893
894 try {
895 if (isCreatingElement) {
896 stack.push({
897 name: id ? ReactComponentTreeHook.getDisplayName(id) : null,
898 fileName: currentSource ? currentSource.fileName : null,
899 lineNumber: currentSource ? currentSource.lineNumber : null
900 });
901 }
902
903 while (id) {
904 var element = ReactComponentTreeHook.getElement(id);
905 var parentID = ReactComponentTreeHook.getParentID(id);
906 var ownerID = ReactComponentTreeHook.getOwnerID(id);
907 var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null;
908 var source = element && element._source;
909 stack.push({
910 name: ownerName,
911 fileName: source ? source.fileName : null,
912 lineNumber: source ? source.lineNumber : null
913 });
914 id = parentID;
915 }
916 } catch (err) {
917 // Internal state is messed up.
918 // Stop building the stack (it's just a nice to have).
919 }
920
921 console.reactStack(stack);
922 },
923 popNonStandardWarningStack: function () {
924 if (typeof console.reactStackEnd !== 'function') {
925 return;
926 }
927 console.reactStackEnd();
928 }
929};
930
931module.exports = ReactComponentTreeHook;
932
933/***/ }),
934/* 9 */
935/***/ (function(module, exports, __webpack_require__) {
936
937"use strict";
938/**
939 * Copyright (c) 2013-present, Facebook, Inc.
940 *
941 * This source code is licensed under the MIT license found in the
942 * LICENSE file in the root directory of this source tree.
943 *
944 */
945
946
947
948var _prodInvariant = __webpack_require__(2),
949 _assign = __webpack_require__(3);
950
951var CallbackQueue = __webpack_require__(54);
952var PooledClass = __webpack_require__(12);
953var ReactFeatureFlags = __webpack_require__(150);
954var ReactReconciler = __webpack_require__(19);
955var Transaction = __webpack_require__(24);
956
957var invariant = __webpack_require__(0);
958
959var dirtyComponents = [];
960var updateBatchNumber = 0;
961var asapCallbackQueue = CallbackQueue.getPooled();
962var asapEnqueued = false;
963
964var batchingStrategy = null;
965
966function ensureInjected() {
967 !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;
968}
969
970var NESTED_UPDATES = {
971 initialize: function () {
972 this.dirtyComponentsLength = dirtyComponents.length;
973 },
974 close: function () {
975 if (this.dirtyComponentsLength !== dirtyComponents.length) {
976 // Additional updates were enqueued by componentDidUpdate handlers or
977 // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run
978 // these new updates so that if A's componentDidUpdate calls setState on
979 // B, B will update before the callback A's updater provided when calling
980 // setState.
981 dirtyComponents.splice(0, this.dirtyComponentsLength);
982 flushBatchedUpdates();
983 } else {
984 dirtyComponents.length = 0;
985 }
986 }
987};
988
989var UPDATE_QUEUEING = {
990 initialize: function () {
991 this.callbackQueue.reset();
992 },
993 close: function () {
994 this.callbackQueue.notifyAll();
995 }
996};
997
998var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
999
1000function ReactUpdatesFlushTransaction() {
1001 this.reinitializeTransaction();
1002 this.dirtyComponentsLength = null;
1003 this.callbackQueue = CallbackQueue.getPooled();
1004 this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(
1005 /* useCreateElement */true);
1006}
1007
1008_assign(ReactUpdatesFlushTransaction.prototype, Transaction, {
1009 getTransactionWrappers: function () {
1010 return TRANSACTION_WRAPPERS;
1011 },
1012
1013 destructor: function () {
1014 this.dirtyComponentsLength = null;
1015 CallbackQueue.release(this.callbackQueue);
1016 this.callbackQueue = null;
1017 ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
1018 this.reconcileTransaction = null;
1019 },
1020
1021 perform: function (method, scope, a) {
1022 // Essentially calls `this.reconcileTransaction.perform(method, scope, a)`
1023 // with this transaction's wrappers around it.
1024 return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
1025 }
1026});
1027
1028PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
1029
1030function batchedUpdates(callback, a, b, c, d, e) {
1031 ensureInjected();
1032 return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
1033}
1034
1035/**
1036 * Array comparator for ReactComponents by mount ordering.
1037 *
1038 * @param {ReactComponent} c1 first component you're comparing
1039 * @param {ReactComponent} c2 second component you're comparing
1040 * @return {number} Return value usable by Array.prototype.sort().
1041 */
1042function mountOrderComparator(c1, c2) {
1043 return c1._mountOrder - c2._mountOrder;
1044}
1045
1046function runBatchedUpdates(transaction) {
1047 var len = transaction.dirtyComponentsLength;
1048 !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0;
1049
1050 // Since reconciling a component higher in the owner hierarchy usually (not
1051 // always -- see shouldComponentUpdate()) will reconcile children, reconcile
1052 // them before their children by sorting the array.
1053 dirtyComponents.sort(mountOrderComparator);
1054
1055 // Any updates enqueued while reconciling must be performed after this entire
1056 // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and
1057 // C, B could update twice in a single batch if C's render enqueues an update
1058 // to B (since B would have already updated, we should skip it, and the only
1059 // way we can know to do so is by checking the batch counter).
1060 updateBatchNumber++;
1061
1062 for (var i = 0; i < len; i++) {
1063 // If a component is unmounted before pending changes apply, it will still
1064 // be here, but we assume that it has cleared its _pendingCallbacks and
1065 // that performUpdateIfNecessary is a noop.
1066 var component = dirtyComponents[i];
1067
1068 // If performUpdateIfNecessary happens to enqueue any new updates, we
1069 // shouldn't execute the callbacks until the next render happens, so
1070 // stash the callbacks first
1071 var callbacks = component._pendingCallbacks;
1072 component._pendingCallbacks = null;
1073
1074 var markerName;
1075 if (ReactFeatureFlags.logTopLevelRenders) {
1076 var namedComponent = component;
1077 // Duck type TopLevelWrapper. This is probably always true.
1078 if (component._currentElement.type.isReactTopLevelWrapper) {
1079 namedComponent = component._renderedComponent;
1080 }
1081 markerName = 'React update: ' + namedComponent.getName();
1082 console.time(markerName);
1083 }
1084
1085 ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);
1086
1087 if (markerName) {
1088 console.timeEnd(markerName);
1089 }
1090
1091 if (callbacks) {
1092 for (var j = 0; j < callbacks.length; j++) {
1093 transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
1094 }
1095 }
1096 }
1097}
1098
1099var flushBatchedUpdates = function () {
1100 // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents
1101 // array and perform any updates enqueued by mount-ready handlers (i.e.,
1102 // componentDidUpdate) but we need to check here too in order to catch
1103 // updates enqueued by setState callbacks and asap calls.
1104 while (dirtyComponents.length || asapEnqueued) {
1105 if (dirtyComponents.length) {
1106 var transaction = ReactUpdatesFlushTransaction.getPooled();
1107 transaction.perform(runBatchedUpdates, null, transaction);
1108 ReactUpdatesFlushTransaction.release(transaction);
1109 }
1110
1111 if (asapEnqueued) {
1112 asapEnqueued = false;
1113 var queue = asapCallbackQueue;
1114 asapCallbackQueue = CallbackQueue.getPooled();
1115 queue.notifyAll();
1116 CallbackQueue.release(queue);
1117 }
1118 }
1119};
1120
1121/**
1122 * Mark a component as needing a rerender, adding an optional callback to a
1123 * list of functions which will be executed once the rerender occurs.
1124 */
1125function enqueueUpdate(component) {
1126 ensureInjected();
1127
1128 // Various parts of our code (such as ReactCompositeComponent's
1129 // _renderValidatedComponent) assume that calls to render aren't nested;
1130 // verify that that's the case. (This is called by each top-level update
1131 // function, like setState, forceUpdate, etc.; creation and
1132 // destruction of top-level components is guarded in ReactMount.)
1133
1134 if (!batchingStrategy.isBatchingUpdates) {
1135 batchingStrategy.batchedUpdates(enqueueUpdate, component);
1136 return;
1137 }
1138
1139 dirtyComponents.push(component);
1140 if (component._updateBatchNumber == null) {
1141 component._updateBatchNumber = updateBatchNumber + 1;
1142 }
1143}
1144
1145/**
1146 * Enqueue a callback to be run at the end of the current batching cycle. Throws
1147 * if no updates are currently being performed.
1148 */
1149function asap(callback, context) {
1150 invariant(batchingStrategy.isBatchingUpdates, "ReactUpdates.asap: Can't enqueue an asap callback in a context where" + 'updates are not being batched.');
1151 asapCallbackQueue.enqueue(callback, context);
1152 asapEnqueued = true;
1153}
1154
1155var ReactUpdatesInjection = {
1156 injectReconcileTransaction: function (ReconcileTransaction) {
1157 !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;
1158 ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
1159 },
1160
1161 injectBatchingStrategy: function (_batchingStrategy) {
1162 !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;
1163 !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;
1164 !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;
1165 batchingStrategy = _batchingStrategy;
1166 }
1167};
1168
1169var ReactUpdates = {
1170 /**
1171 * React references `ReactReconcileTransaction` using this property in order
1172 * to allow dependency injection.
1173 *
1174 * @internal
1175 */
1176 ReactReconcileTransaction: null,
1177
1178 batchedUpdates: batchedUpdates,
1179 enqueueUpdate: enqueueUpdate,
1180 flushBatchedUpdates: flushBatchedUpdates,
1181 injection: ReactUpdatesInjection,
1182 asap: asap
1183};
1184
1185module.exports = ReactUpdates;
1186
1187/***/ }),
1188/* 10 */
1189/***/ (function(module, exports, __webpack_require__) {
1190
1191"use strict";
1192/**
1193 * Copyright (c) 2013-present, Facebook, Inc.
1194 *
1195 * This source code is licensed under the MIT license found in the
1196 * LICENSE file in the root directory of this source tree.
1197 *
1198 */
1199
1200
1201
1202var _assign = __webpack_require__(3);
1203
1204var PooledClass = __webpack_require__(12);
1205
1206var emptyFunction = __webpack_require__(7);
1207var warning = __webpack_require__(1);
1208
1209var didWarnForAddedNewProperty = false;
1210var isProxySupported = typeof Proxy === 'function';
1211
1212var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];
1213
1214/**
1215 * @interface Event
1216 * @see http://www.w3.org/TR/DOM-Level-3-Events/
1217 */
1218var EventInterface = {
1219 type: null,
1220 target: null,
1221 // currentTarget is set when dispatching; no use in copying it here
1222 currentTarget: emptyFunction.thatReturnsNull,
1223 eventPhase: null,
1224 bubbles: null,
1225 cancelable: null,
1226 timeStamp: function (event) {
1227 return event.timeStamp || Date.now();
1228 },
1229 defaultPrevented: null,
1230 isTrusted: null
1231};
1232
1233/**
1234 * Synthetic events are dispatched by event plugins, typically in response to a
1235 * top-level event delegation handler.
1236 *
1237 * These systems should generally use pooling to reduce the frequency of garbage
1238 * collection. The system should check `isPersistent` to determine whether the
1239 * event should be released into the pool after being dispatched. Users that
1240 * need a persisted event should invoke `persist`.
1241 *
1242 * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
1243 * normalizing browser quirks. Subclasses do not necessarily have to implement a
1244 * DOM interface; custom application-specific events can also subclass this.
1245 *
1246 * @param {object} dispatchConfig Configuration used to dispatch this event.
1247 * @param {*} targetInst Marker identifying the event target.
1248 * @param {object} nativeEvent Native browser event.
1249 * @param {DOMEventTarget} nativeEventTarget Target node.
1250 */
1251function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
1252 if (process.env.NODE_ENV !== 'production') {
1253 // these have a getter/setter for warnings
1254 delete this.nativeEvent;
1255 delete this.preventDefault;
1256 delete this.stopPropagation;
1257 }
1258
1259 this.dispatchConfig = dispatchConfig;
1260 this._targetInst = targetInst;
1261 this.nativeEvent = nativeEvent;
1262
1263 var Interface = this.constructor.Interface;
1264 for (var propName in Interface) {
1265 if (!Interface.hasOwnProperty(propName)) {
1266 continue;
1267 }
1268 if (process.env.NODE_ENV !== 'production') {
1269 delete this[propName]; // this has a getter/setter for warnings
1270 }
1271 var normalize = Interface[propName];
1272 if (normalize) {
1273 this[propName] = normalize(nativeEvent);
1274 } else {
1275 if (propName === 'target') {
1276 this.target = nativeEventTarget;
1277 } else {
1278 this[propName] = nativeEvent[propName];
1279 }
1280 }
1281 }
1282
1283 var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
1284 if (defaultPrevented) {
1285 this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
1286 } else {
1287 this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
1288 }
1289 this.isPropagationStopped = emptyFunction.thatReturnsFalse;
1290 return this;
1291}
1292
1293_assign(SyntheticEvent.prototype, {
1294 preventDefault: function () {
1295 this.defaultPrevented = true;
1296 var event = this.nativeEvent;
1297 if (!event) {
1298 return;
1299 }
1300
1301 if (event.preventDefault) {
1302 event.preventDefault();
1303 // eslint-disable-next-line valid-typeof
1304 } else if (typeof event.returnValue !== 'unknown') {
1305 event.returnValue = false;
1306 }
1307 this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
1308 },
1309
1310 stopPropagation: function () {
1311 var event = this.nativeEvent;
1312 if (!event) {
1313 return;
1314 }
1315
1316 if (event.stopPropagation) {
1317 event.stopPropagation();
1318 // eslint-disable-next-line valid-typeof
1319 } else if (typeof event.cancelBubble !== 'unknown') {
1320 // The ChangeEventPlugin registers a "propertychange" event for
1321 // IE. This event does not support bubbling or cancelling, and
1322 // any references to cancelBubble throw "Member not found". A
1323 // typeof check of "unknown" circumvents this issue (and is also
1324 // IE specific).
1325 event.cancelBubble = true;
1326 }
1327
1328 this.isPropagationStopped = emptyFunction.thatReturnsTrue;
1329 },
1330
1331 /**
1332 * We release all dispatched `SyntheticEvent`s after each event loop, adding
1333 * them back into the pool. This allows a way to hold onto a reference that
1334 * won't be added back into the pool.
1335 */
1336 persist: function () {
1337 this.isPersistent = emptyFunction.thatReturnsTrue;
1338 },
1339
1340 /**
1341 * Checks if this event should be released back into the pool.
1342 *
1343 * @return {boolean} True if this should not be released, false otherwise.
1344 */
1345 isPersistent: emptyFunction.thatReturnsFalse,
1346
1347 /**
1348 * `PooledClass` looks for `destructor` on each instance it releases.
1349 */
1350 destructor: function () {
1351 var Interface = this.constructor.Interface;
1352 for (var propName in Interface) {
1353 if (process.env.NODE_ENV !== 'production') {
1354 Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
1355 } else {
1356 this[propName] = null;
1357 }
1358 }
1359 for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
1360 this[shouldBeReleasedProperties[i]] = null;
1361 }
1362 if (process.env.NODE_ENV !== 'production') {
1363 Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
1364 Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
1365 Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
1366 }
1367 }
1368});
1369
1370SyntheticEvent.Interface = EventInterface;
1371
1372/**
1373 * Helper to reduce boilerplate when creating subclasses.
1374 *
1375 * @param {function} Class
1376 * @param {?object} Interface
1377 */
1378SyntheticEvent.augmentClass = function (Class, Interface) {
1379 var Super = this;
1380
1381 var E = function () {};
1382 E.prototype = Super.prototype;
1383 var prototype = new E();
1384
1385 _assign(prototype, Class.prototype);
1386 Class.prototype = prototype;
1387 Class.prototype.constructor = Class;
1388
1389 Class.Interface = _assign({}, Super.Interface, Interface);
1390 Class.augmentClass = Super.augmentClass;
1391
1392 PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);
1393};
1394
1395/** Proxying after everything set on SyntheticEvent
1396 * to resolve Proxy issue on some WebKit browsers
1397 * in which some Event properties are set to undefined (GH#10010)
1398 */
1399if (process.env.NODE_ENV !== 'production') {
1400 if (isProxySupported) {
1401 /*eslint-disable no-func-assign */
1402 SyntheticEvent = new Proxy(SyntheticEvent, {
1403 construct: function (target, args) {
1404 return this.apply(target, Object.create(target.prototype), args);
1405 },
1406 apply: function (constructor, that, args) {
1407 return new Proxy(constructor.apply(that, args), {
1408 set: function (target, prop, value) {
1409 if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
1410 process.env.NODE_ENV !== 'production' ? 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.') : void 0;
1411 didWarnForAddedNewProperty = true;
1412 }
1413 target[prop] = value;
1414 return true;
1415 }
1416 });
1417 }
1418 });
1419 /*eslint-enable no-func-assign */
1420 }
1421}
1422
1423PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler);
1424
1425module.exports = SyntheticEvent;
1426
1427/**
1428 * Helper to nullify syntheticEvent instance properties when destructing
1429 *
1430 * @param {object} SyntheticEvent
1431 * @param {String} propName
1432 * @return {object} defineProperty object
1433 */
1434function getPooledWarningPropertyDefinition(propName, getVal) {
1435 var isFunction = typeof getVal === 'function';
1436 return {
1437 configurable: true,
1438 set: set,
1439 get: get
1440 };
1441
1442 function set(val) {
1443 var action = isFunction ? 'setting the method' : 'setting the property';
1444 warn(action, 'This is effectively a no-op');
1445 return val;
1446 }
1447
1448 function get() {
1449 var action = isFunction ? 'accessing the method' : 'accessing the property';
1450 var result = isFunction ? 'This is a no-op function' : 'This is set to null';
1451 warn(action, result);
1452 return getVal;
1453 }
1454
1455 function warn(action, result) {
1456 var warningCondition = false;
1457 process.env.NODE_ENV !== 'production' ? 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) : void 0;
1458 }
1459}
1460
1461/***/ }),
1462/* 11 */
1463/***/ (function(module, exports, __webpack_require__) {
1464
1465"use strict";
1466/**
1467 * Copyright (c) 2013-present, Facebook, Inc.
1468 *
1469 * This source code is licensed under the MIT license found in the
1470 * LICENSE file in the root directory of this source tree.
1471 *
1472 *
1473 */
1474
1475
1476
1477/**
1478 * Keeps track of the current owner.
1479 *
1480 * The current owner is the component who should own any components that are
1481 * currently being constructed.
1482 */
1483var ReactCurrentOwner = {
1484 /**
1485 * @internal
1486 * @type {ReactComponent}
1487 */
1488 current: null
1489};
1490
1491module.exports = ReactCurrentOwner;
1492
1493/***/ }),
1494/* 12 */
1495/***/ (function(module, exports, __webpack_require__) {
1496
1497"use strict";
1498/**
1499 * Copyright (c) 2013-present, Facebook, Inc.
1500 *
1501 * This source code is licensed under the MIT license found in the
1502 * LICENSE file in the root directory of this source tree.
1503 *
1504 *
1505 */
1506
1507
1508
1509var _prodInvariant = __webpack_require__(2);
1510
1511var invariant = __webpack_require__(0);
1512
1513/**
1514 * Static poolers. Several custom versions for each potential number of
1515 * arguments. A completely generic pooler is easy to implement, but would
1516 * require accessing the `arguments` object. In each of these, `this` refers to
1517 * the Class itself, not an instance. If any others are needed, simply add them
1518 * here, or in their own files.
1519 */
1520var oneArgumentPooler = function (copyFieldsFrom) {
1521 var Klass = this;
1522 if (Klass.instancePool.length) {
1523 var instance = Klass.instancePool.pop();
1524 Klass.call(instance, copyFieldsFrom);
1525 return instance;
1526 } else {
1527 return new Klass(copyFieldsFrom);
1528 }
1529};
1530
1531var twoArgumentPooler = function (a1, a2) {
1532 var Klass = this;
1533 if (Klass.instancePool.length) {
1534 var instance = Klass.instancePool.pop();
1535 Klass.call(instance, a1, a2);
1536 return instance;
1537 } else {
1538 return new Klass(a1, a2);
1539 }
1540};
1541
1542var threeArgumentPooler = function (a1, a2, a3) {
1543 var Klass = this;
1544 if (Klass.instancePool.length) {
1545 var instance = Klass.instancePool.pop();
1546 Klass.call(instance, a1, a2, a3);
1547 return instance;
1548 } else {
1549 return new Klass(a1, a2, a3);
1550 }
1551};
1552
1553var fourArgumentPooler = function (a1, a2, a3, a4) {
1554 var Klass = this;
1555 if (Klass.instancePool.length) {
1556 var instance = Klass.instancePool.pop();
1557 Klass.call(instance, a1, a2, a3, a4);
1558 return instance;
1559 } else {
1560 return new Klass(a1, a2, a3, a4);
1561 }
1562};
1563
1564var standardReleaser = function (instance) {
1565 var Klass = this;
1566 !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
1567 instance.destructor();
1568 if (Klass.instancePool.length < Klass.poolSize) {
1569 Klass.instancePool.push(instance);
1570 }
1571};
1572
1573var DEFAULT_POOL_SIZE = 10;
1574var DEFAULT_POOLER = oneArgumentPooler;
1575
1576/**
1577 * Augments `CopyConstructor` to be a poolable class, augmenting only the class
1578 * itself (statically) not adding any prototypical fields. Any CopyConstructor
1579 * you give this may have a `poolSize` property, and will look for a
1580 * prototypical `destructor` on instances.
1581 *
1582 * @param {Function} CopyConstructor Constructor that can be used to reset.
1583 * @param {Function} pooler Customizable pooler.
1584 */
1585var addPoolingTo = function (CopyConstructor, pooler) {
1586 // Casting as any so that flow ignores the actual implementation and trusts
1587 // it to match the type we declared
1588 var NewKlass = CopyConstructor;
1589 NewKlass.instancePool = [];
1590 NewKlass.getPooled = pooler || DEFAULT_POOLER;
1591 if (!NewKlass.poolSize) {
1592 NewKlass.poolSize = DEFAULT_POOL_SIZE;
1593 }
1594 NewKlass.release = standardReleaser;
1595 return NewKlass;
1596};
1597
1598var PooledClass = {
1599 addPoolingTo: addPoolingTo,
1600 oneArgumentPooler: oneArgumentPooler,
1601 twoArgumentPooler: twoArgumentPooler,
1602 threeArgumentPooler: threeArgumentPooler,
1603 fourArgumentPooler: fourArgumentPooler
1604};
1605
1606module.exports = PooledClass;
1607
1608/***/ }),
1609/* 13 */
1610/***/ (function(module, exports, __webpack_require__) {
1611
1612"use strict";
1613/**
1614 * Copyright (c) 2014-present, Facebook, Inc.
1615 *
1616 * This source code is licensed under the MIT license found in the
1617 * LICENSE file in the root directory of this source tree.
1618 *
1619 */
1620
1621
1622
1623var _assign = __webpack_require__(3);
1624
1625var ReactCurrentOwner = __webpack_require__(11);
1626
1627var warning = __webpack_require__(1);
1628var canDefineProperty = __webpack_require__(26);
1629var hasOwnProperty = Object.prototype.hasOwnProperty;
1630
1631var REACT_ELEMENT_TYPE = __webpack_require__(76);
1632
1633var RESERVED_PROPS = {
1634 key: true,
1635 ref: true,
1636 __self: true,
1637 __source: true
1638};
1639
1640var specialPropKeyWarningShown, specialPropRefWarningShown;
1641
1642function hasValidRef(config) {
1643 if (process.env.NODE_ENV !== 'production') {
1644 if (hasOwnProperty.call(config, 'ref')) {
1645 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
1646 if (getter && getter.isReactWarning) {
1647 return false;
1648 }
1649 }
1650 }
1651 return config.ref !== undefined;
1652}
1653
1654function hasValidKey(config) {
1655 if (process.env.NODE_ENV !== 'production') {
1656 if (hasOwnProperty.call(config, 'key')) {
1657 var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
1658 if (getter && getter.isReactWarning) {
1659 return false;
1660 }
1661 }
1662 }
1663 return config.key !== undefined;
1664}
1665
1666function defineKeyPropWarningGetter(props, displayName) {
1667 var warnAboutAccessingKey = function () {
1668 if (!specialPropKeyWarningShown) {
1669 specialPropKeyWarningShown = true;
1670 process.env.NODE_ENV !== 'production' ? 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) : void 0;
1671 }
1672 };
1673 warnAboutAccessingKey.isReactWarning = true;
1674 Object.defineProperty(props, 'key', {
1675 get: warnAboutAccessingKey,
1676 configurable: true
1677 });
1678}
1679
1680function defineRefPropWarningGetter(props, displayName) {
1681 var warnAboutAccessingRef = function () {
1682 if (!specialPropRefWarningShown) {
1683 specialPropRefWarningShown = true;
1684 process.env.NODE_ENV !== 'production' ? 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) : void 0;
1685 }
1686 };
1687 warnAboutAccessingRef.isReactWarning = true;
1688 Object.defineProperty(props, 'ref', {
1689 get: warnAboutAccessingRef,
1690 configurable: true
1691 });
1692}
1693
1694/**
1695 * Factory method to create a new React element. This no longer adheres to
1696 * the class pattern, so do not use new to call it. Also, no instanceof check
1697 * will work. Instead test $$typeof field against Symbol.for('react.element') to check
1698 * if something is a React Element.
1699 *
1700 * @param {*} type
1701 * @param {*} key
1702 * @param {string|object} ref
1703 * @param {*} self A *temporary* helper to detect places where `this` is
1704 * different from the `owner` when React.createElement is called, so that we
1705 * can warn. We want to get rid of owner and replace string `ref`s with arrow
1706 * functions, and as long as `this` and owner are the same, there will be no
1707 * change in behavior.
1708 * @param {*} source An annotation object (added by a transpiler or otherwise)
1709 * indicating filename, line number, and/or other information.
1710 * @param {*} owner
1711 * @param {*} props
1712 * @internal
1713 */
1714var ReactElement = function (type, key, ref, self, source, owner, props) {
1715 var element = {
1716 // This tag allow us to uniquely identify this as a React Element
1717 $$typeof: REACT_ELEMENT_TYPE,
1718
1719 // Built-in properties that belong on the element
1720 type: type,
1721 key: key,
1722 ref: ref,
1723 props: props,
1724
1725 // Record the component responsible for creating this element.
1726 _owner: owner
1727 };
1728
1729 if (process.env.NODE_ENV !== 'production') {
1730 // The validation flag is currently mutative. We put it on
1731 // an external backing store so that we can freeze the whole object.
1732 // This can be replaced with a WeakMap once they are implemented in
1733 // commonly used development environments.
1734 element._store = {};
1735
1736 // To make comparing ReactElements easier for testing purposes, we make
1737 // the validation flag non-enumerable (where possible, which should
1738 // include every environment we run tests in), so the test framework
1739 // ignores it.
1740 if (canDefineProperty) {
1741 Object.defineProperty(element._store, 'validated', {
1742 configurable: false,
1743 enumerable: false,
1744 writable: true,
1745 value: false
1746 });
1747 // self and source are DEV only properties.
1748 Object.defineProperty(element, '_self', {
1749 configurable: false,
1750 enumerable: false,
1751 writable: false,
1752 value: self
1753 });
1754 // Two elements created in two different places should be considered
1755 // equal for testing purposes and therefore we hide it from enumeration.
1756 Object.defineProperty(element, '_source', {
1757 configurable: false,
1758 enumerable: false,
1759 writable: false,
1760 value: source
1761 });
1762 } else {
1763 element._store.validated = false;
1764 element._self = self;
1765 element._source = source;
1766 }
1767 if (Object.freeze) {
1768 Object.freeze(element.props);
1769 Object.freeze(element);
1770 }
1771 }
1772
1773 return element;
1774};
1775
1776/**
1777 * Create and return a new ReactElement of the given type.
1778 * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement
1779 */
1780ReactElement.createElement = function (type, config, children) {
1781 var propName;
1782
1783 // Reserved names are extracted
1784 var props = {};
1785
1786 var key = null;
1787 var ref = null;
1788 var self = null;
1789 var source = null;
1790
1791 if (config != null) {
1792 if (hasValidRef(config)) {
1793 ref = config.ref;
1794 }
1795 if (hasValidKey(config)) {
1796 key = '' + config.key;
1797 }
1798
1799 self = config.__self === undefined ? null : config.__self;
1800 source = config.__source === undefined ? null : config.__source;
1801 // Remaining properties are added to a new props object
1802 for (propName in config) {
1803 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
1804 props[propName] = config[propName];
1805 }
1806 }
1807 }
1808
1809 // Children can be more than one argument, and those are transferred onto
1810 // the newly allocated props object.
1811 var childrenLength = arguments.length - 2;
1812 if (childrenLength === 1) {
1813 props.children = children;
1814 } else if (childrenLength > 1) {
1815 var childArray = Array(childrenLength);
1816 for (var i = 0; i < childrenLength; i++) {
1817 childArray[i] = arguments[i + 2];
1818 }
1819 if (process.env.NODE_ENV !== 'production') {
1820 if (Object.freeze) {
1821 Object.freeze(childArray);
1822 }
1823 }
1824 props.children = childArray;
1825 }
1826
1827 // Resolve default props
1828 if (type && type.defaultProps) {
1829 var defaultProps = type.defaultProps;
1830 for (propName in defaultProps) {
1831 if (props[propName] === undefined) {
1832 props[propName] = defaultProps[propName];
1833 }
1834 }
1835 }
1836 if (process.env.NODE_ENV !== 'production') {
1837 if (key || ref) {
1838 if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
1839 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
1840 if (key) {
1841 defineKeyPropWarningGetter(props, displayName);
1842 }
1843 if (ref) {
1844 defineRefPropWarningGetter(props, displayName);
1845 }
1846 }
1847 }
1848 }
1849 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
1850};
1851
1852/**
1853 * Return a function that produces ReactElements of a given type.
1854 * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory
1855 */
1856ReactElement.createFactory = function (type) {
1857 var factory = ReactElement.createElement.bind(null, type);
1858 // Expose the type on the factory and the prototype so that it can be
1859 // easily accessed on elements. E.g. `<Foo />.type === Foo`.
1860 // This should not be named `constructor` since this may not be the function
1861 // that created the element, and it may not even be a constructor.
1862 // Legacy hook TODO: Warn if this is accessed
1863 factory.type = type;
1864 return factory;
1865};
1866
1867ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
1868 var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
1869
1870 return newElement;
1871};
1872
1873/**
1874 * Clone and return a new ReactElement using element as the starting point.
1875 * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement
1876 */
1877ReactElement.cloneElement = function (element, config, children) {
1878 var propName;
1879
1880 // Original props are copied
1881 var props = _assign({}, element.props);
1882
1883 // Reserved names are extracted
1884 var key = element.key;
1885 var ref = element.ref;
1886 // Self is preserved since the owner is preserved.
1887 var self = element._self;
1888 // Source is preserved since cloneElement is unlikely to be targeted by a
1889 // transpiler, and the original source is probably a better indicator of the
1890 // true owner.
1891 var source = element._source;
1892
1893 // Owner will be preserved, unless ref is overridden
1894 var owner = element._owner;
1895
1896 if (config != null) {
1897 if (hasValidRef(config)) {
1898 // Silently steal the ref from the parent.
1899 ref = config.ref;
1900 owner = ReactCurrentOwner.current;
1901 }
1902 if (hasValidKey(config)) {
1903 key = '' + config.key;
1904 }
1905
1906 // Remaining properties override existing props
1907 var defaultProps;
1908 if (element.type && element.type.defaultProps) {
1909 defaultProps = element.type.defaultProps;
1910 }
1911 for (propName in config) {
1912 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
1913 if (config[propName] === undefined && defaultProps !== undefined) {
1914 // Resolve default props
1915 props[propName] = defaultProps[propName];
1916 } else {
1917 props[propName] = config[propName];
1918 }
1919 }
1920 }
1921 }
1922
1923 // Children can be more than one argument, and those are transferred onto
1924 // the newly allocated props object.
1925 var childrenLength = arguments.length - 2;
1926 if (childrenLength === 1) {
1927 props.children = children;
1928 } else if (childrenLength > 1) {
1929 var childArray = Array(childrenLength);
1930 for (var i = 0; i < childrenLength; i++) {
1931 childArray[i] = arguments[i + 2];
1932 }
1933 props.children = childArray;
1934 }
1935
1936 return ReactElement(element.type, key, ref, self, source, owner, props);
1937};
1938
1939/**
1940 * Verifies the object is a ReactElement.
1941 * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement
1942 * @param {?object} object
1943 * @return {boolean} True if `object` is a valid component.
1944 * @final
1945 */
1946ReactElement.isValidElement = function (object) {
1947 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1948};
1949
1950module.exports = ReactElement;
1951
1952/***/ }),
1953/* 14 */
1954/***/ (function(module, exports, __webpack_require__) {
1955
1956"use strict";
1957/**
1958 * Copyright (c) 2013-present, Facebook, Inc.
1959 *
1960 * This source code is licensed under the MIT license found in the
1961 * LICENSE file in the root directory of this source tree.
1962 *
1963 *
1964 */
1965
1966
1967/**
1968 * WARNING: DO NOT manually require this module.
1969 * This is a replacement for `invariant(...)` used by the error code system
1970 * and will _only_ be required by the corresponding babel pass.
1971 * It always throws.
1972 */
1973
1974function reactProdInvariant(code) {
1975 var argCount = arguments.length - 1;
1976
1977 var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
1978
1979 for (var argIdx = 0; argIdx < argCount; argIdx++) {
1980 message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
1981 }
1982
1983 message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
1984
1985 var error = new Error(message);
1986 error.name = 'Invariant Violation';
1987 error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
1988
1989 throw error;
1990}
1991
1992module.exports = reactProdInvariant;
1993
1994/***/ }),
1995/* 15 */
1996/***/ (function(module, exports, __webpack_require__) {
1997
1998"use strict";
1999/**
2000 * Copyright (c) 2015-present, Facebook, Inc.
2001 *
2002 * This source code is licensed under the MIT license found in the
2003 * LICENSE file in the root directory of this source tree.
2004 *
2005 */
2006
2007
2008
2009var DOMNamespaces = __webpack_require__(29);
2010var setInnerHTML = __webpack_require__(43);
2011
2012var createMicrosoftUnsafeLocalFunction = __webpack_require__(38);
2013var setTextContent = __webpack_require__(72);
2014
2015var ELEMENT_NODE_TYPE = 1;
2016var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
2017
2018/**
2019 * In IE (8-11) and Edge, appending nodes with no children is dramatically
2020 * faster than appending a full subtree, so we essentially queue up the
2021 * .appendChild calls here and apply them so each node is added to its parent
2022 * before any children are added.
2023 *
2024 * In other browsers, doing so is slower or neutral compared to the other order
2025 * (in Firefox, twice as slow) so we only do this inversion in IE.
2026 *
2027 * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode.
2028 */
2029var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
2030
2031function insertTreeChildren(tree) {
2032 if (!enableLazy) {
2033 return;
2034 }
2035 var node = tree.node;
2036 var children = tree.children;
2037 if (children.length) {
2038 for (var i = 0; i < children.length; i++) {
2039 insertTreeBefore(node, children[i], null);
2040 }
2041 } else if (tree.html != null) {
2042 setInnerHTML(node, tree.html);
2043 } else if (tree.text != null) {
2044 setTextContent(node, tree.text);
2045 }
2046}
2047
2048var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {
2049 // DocumentFragments aren't actually part of the DOM after insertion so
2050 // appending children won't update the DOM. We need to ensure the fragment
2051 // is properly populated first, breaking out of our lazy approach for just
2052 // this level. Also, some <object> plugins (like Flash Player) will read
2053 // <param> nodes immediately upon insertion into the DOM, so <object>
2054 // must also be populated prior to insertion into the DOM.
2055 if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) {
2056 insertTreeChildren(tree);
2057 parentNode.insertBefore(tree.node, referenceNode);
2058 } else {
2059 parentNode.insertBefore(tree.node, referenceNode);
2060 insertTreeChildren(tree);
2061 }
2062});
2063
2064function replaceChildWithTree(oldNode, newTree) {
2065 oldNode.parentNode.replaceChild(newTree.node, oldNode);
2066 insertTreeChildren(newTree);
2067}
2068
2069function queueChild(parentTree, childTree) {
2070 if (enableLazy) {
2071 parentTree.children.push(childTree);
2072 } else {
2073 parentTree.node.appendChild(childTree.node);
2074 }
2075}
2076
2077function queueHTML(tree, html) {
2078 if (enableLazy) {
2079 tree.html = html;
2080 } else {
2081 setInnerHTML(tree.node, html);
2082 }
2083}
2084
2085function queueText(tree, text) {
2086 if (enableLazy) {
2087 tree.text = text;
2088 } else {
2089 setTextContent(tree.node, text);
2090 }
2091}
2092
2093function toString() {
2094 return this.node.nodeName;
2095}
2096
2097function DOMLazyTree(node) {
2098 return {
2099 node: node,
2100 children: [],
2101 html: null,
2102 text: null,
2103 toString: toString
2104 };
2105}
2106
2107DOMLazyTree.insertTreeBefore = insertTreeBefore;
2108DOMLazyTree.replaceChildWithTree = replaceChildWithTree;
2109DOMLazyTree.queueChild = queueChild;
2110DOMLazyTree.queueHTML = queueHTML;
2111DOMLazyTree.queueText = queueText;
2112
2113module.exports = DOMLazyTree;
2114
2115/***/ }),
2116/* 16 */
2117/***/ (function(module, exports, __webpack_require__) {
2118
2119"use strict";
2120/**
2121 * Copyright (c) 2013-present, Facebook, Inc.
2122 *
2123 * This source code is licensed under the MIT license found in the
2124 * LICENSE file in the root directory of this source tree.
2125 *
2126 */
2127
2128
2129
2130var _prodInvariant = __webpack_require__(2);
2131
2132var invariant = __webpack_require__(0);
2133
2134function checkMask(value, bitmask) {
2135 return (value & bitmask) === bitmask;
2136}
2137
2138var DOMPropertyInjection = {
2139 /**
2140 * Mapping from normalized, camelcased property names to a configuration that
2141 * specifies how the associated DOM property should be accessed or rendered.
2142 */
2143 MUST_USE_PROPERTY: 0x1,
2144 HAS_BOOLEAN_VALUE: 0x4,
2145 HAS_NUMERIC_VALUE: 0x8,
2146 HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
2147 HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
2148
2149 /**
2150 * Inject some specialized knowledge about the DOM. This takes a config object
2151 * with the following properties:
2152 *
2153 * isCustomAttribute: function that given an attribute name will return true
2154 * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*
2155 * attributes where it's impossible to enumerate all of the possible
2156 * attribute names,
2157 *
2158 * Properties: object mapping DOM property name to one of the
2159 * DOMPropertyInjection constants or null. If your attribute isn't in here,
2160 * it won't get written to the DOM.
2161 *
2162 * DOMAttributeNames: object mapping React attribute name to the DOM
2163 * attribute name. Attribute names not specified use the **lowercase**
2164 * normalized name.
2165 *
2166 * DOMAttributeNamespaces: object mapping React attribute name to the DOM
2167 * attribute namespace URL. (Attribute names not specified use no namespace.)
2168 *
2169 * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
2170 * Property names not specified use the normalized name.
2171 *
2172 * DOMMutationMethods: Properties that require special mutation methods. If
2173 * `value` is undefined, the mutation method should unset the property.
2174 *
2175 * @param {object} domPropertyConfig the config as described above.
2176 */
2177 injectDOMPropertyConfig: function (domPropertyConfig) {
2178 var Injection = DOMPropertyInjection;
2179 var Properties = domPropertyConfig.Properties || {};
2180 var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
2181 var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
2182 var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
2183 var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
2184
2185 if (domPropertyConfig.isCustomAttribute) {
2186 DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
2187 }
2188
2189 for (var propName in Properties) {
2190 !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;
2191
2192 var lowerCased = propName.toLowerCase();
2193 var propConfig = Properties[propName];
2194
2195 var propertyInfo = {
2196 attributeName: lowerCased,
2197 attributeNamespace: null,
2198 propertyName: propName,
2199 mutationMethod: null,
2200
2201 mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
2202 hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
2203 hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
2204 hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
2205 hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
2206 };
2207 !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;
2208
2209 if (process.env.NODE_ENV !== 'production') {
2210 DOMProperty.getPossibleStandardName[lowerCased] = propName;
2211 }
2212
2213 if (DOMAttributeNames.hasOwnProperty(propName)) {
2214 var attributeName = DOMAttributeNames[propName];
2215 propertyInfo.attributeName = attributeName;
2216 if (process.env.NODE_ENV !== 'production') {
2217 DOMProperty.getPossibleStandardName[attributeName] = propName;
2218 }
2219 }
2220
2221 if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
2222 propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
2223 }
2224
2225 if (DOMPropertyNames.hasOwnProperty(propName)) {
2226 propertyInfo.propertyName = DOMPropertyNames[propName];
2227 }
2228
2229 if (DOMMutationMethods.hasOwnProperty(propName)) {
2230 propertyInfo.mutationMethod = DOMMutationMethods[propName];
2231 }
2232
2233 DOMProperty.properties[propName] = propertyInfo;
2234 }
2235 }
2236};
2237
2238/* eslint-disable max-len */
2239var 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';
2240/* eslint-enable max-len */
2241
2242/**
2243 * DOMProperty exports lookup objects that can be used like functions:
2244 *
2245 * > DOMProperty.isValid['id']
2246 * true
2247 * > DOMProperty.isValid['foobar']
2248 * undefined
2249 *
2250 * Although this may be confusing, it performs better in general.
2251 *
2252 * @see http://jsperf.com/key-exists
2253 * @see http://jsperf.com/key-missing
2254 */
2255var DOMProperty = {
2256 ID_ATTRIBUTE_NAME: 'data-reactid',
2257 ROOT_ATTRIBUTE_NAME: 'data-reactroot',
2258
2259 ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
2260 ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
2261
2262 /**
2263 * Map from property "standard name" to an object with info about how to set
2264 * the property in the DOM. Each object contains:
2265 *
2266 * attributeName:
2267 * Used when rendering markup or with `*Attribute()`.
2268 * attributeNamespace
2269 * propertyName:
2270 * Used on DOM node instances. (This includes properties that mutate due to
2271 * external factors.)
2272 * mutationMethod:
2273 * If non-null, used instead of the property or `setAttribute()` after
2274 * initial render.
2275 * mustUseProperty:
2276 * Whether the property must be accessed and mutated as an object property.
2277 * hasBooleanValue:
2278 * Whether the property should be removed when set to a falsey value.
2279 * hasNumericValue:
2280 * Whether the property must be numeric or parse as a numeric and should be
2281 * removed when set to a falsey value.
2282 * hasPositiveNumericValue:
2283 * Whether the property must be positive numeric or parse as a positive
2284 * numeric and should be removed when set to a falsey value.
2285 * hasOverloadedBooleanValue:
2286 * Whether the property can be used as a flag as well as with a value.
2287 * Removed when strictly equal to false; present without a value when
2288 * strictly equal to true; present with a value otherwise.
2289 */
2290 properties: {},
2291
2292 /**
2293 * Mapping from lowercase property names to the properly cased version, used
2294 * to warn in the case of missing properties. Available only in __DEV__.
2295 *
2296 * autofocus is predefined, because adding it to the property whitelist
2297 * causes unintended side effects.
2298 *
2299 * @type {Object}
2300 */
2301 getPossibleStandardName: process.env.NODE_ENV !== 'production' ? { autofocus: 'autoFocus' } : null,
2302
2303 /**
2304 * All of the isCustomAttribute() functions that have been injected.
2305 */
2306 _isCustomAttributeFunctions: [],
2307
2308 /**
2309 * Checks whether a property name is a custom attribute.
2310 * @method
2311 */
2312 isCustomAttribute: function (attributeName) {
2313 for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
2314 var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
2315 if (isCustomAttributeFn(attributeName)) {
2316 return true;
2317 }
2318 }
2319 return false;
2320 },
2321
2322 injection: DOMPropertyInjection
2323};
2324
2325module.exports = DOMProperty;
2326
2327/***/ }),
2328/* 17 */
2329/***/ (function(module, exports, __webpack_require__) {
2330
2331"use strict";
2332/**
2333 * Copyright (c) 2013-present, Facebook, Inc.
2334 *
2335 * This source code is licensed under the MIT license found in the
2336 * LICENSE file in the root directory of this source tree.
2337 *
2338 */
2339
2340
2341
2342var _prodInvariant = __webpack_require__(2);
2343
2344var EventPluginRegistry = __webpack_require__(30);
2345var EventPluginUtils = __webpack_require__(31);
2346var ReactErrorUtils = __webpack_require__(36);
2347
2348var accumulateInto = __webpack_require__(66);
2349var forEachAccumulated = __webpack_require__(67);
2350var invariant = __webpack_require__(0);
2351
2352/**
2353 * Internal store for event listeners
2354 */
2355var listenerBank = {};
2356
2357/**
2358 * Internal queue of events that have accumulated their dispatches and are
2359 * waiting to have their dispatches executed.
2360 */
2361var eventQueue = null;
2362
2363/**
2364 * Dispatches an event and releases it back into the pool, unless persistent.
2365 *
2366 * @param {?object} event Synthetic event to be dispatched.
2367 * @param {boolean} simulated If the event is simulated (changes exn behavior)
2368 * @private
2369 */
2370var executeDispatchesAndRelease = function (event, simulated) {
2371 if (event) {
2372 EventPluginUtils.executeDispatchesInOrder(event, simulated);
2373
2374 if (!event.isPersistent()) {
2375 event.constructor.release(event);
2376 }
2377 }
2378};
2379var executeDispatchesAndReleaseSimulated = function (e) {
2380 return executeDispatchesAndRelease(e, true);
2381};
2382var executeDispatchesAndReleaseTopLevel = function (e) {
2383 return executeDispatchesAndRelease(e, false);
2384};
2385
2386var getDictionaryKey = function (inst) {
2387 // Prevents V8 performance issue:
2388 // https://github.com/facebook/react/pull/7232
2389 return '.' + inst._rootNodeID;
2390};
2391
2392function isInteractive(tag) {
2393 return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
2394}
2395
2396function shouldPreventMouseEvent(name, type, props) {
2397 switch (name) {
2398 case 'onClick':
2399 case 'onClickCapture':
2400 case 'onDoubleClick':
2401 case 'onDoubleClickCapture':
2402 case 'onMouseDown':
2403 case 'onMouseDownCapture':
2404 case 'onMouseMove':
2405 case 'onMouseMoveCapture':
2406 case 'onMouseUp':
2407 case 'onMouseUpCapture':
2408 return !!(props.disabled && isInteractive(type));
2409 default:
2410 return false;
2411 }
2412}
2413
2414/**
2415 * This is a unified interface for event plugins to be installed and configured.
2416 *
2417 * Event plugins can implement the following properties:
2418 *
2419 * `extractEvents` {function(string, DOMEventTarget, string, object): *}
2420 * Required. When a top-level event is fired, this method is expected to
2421 * extract synthetic events that will in turn be queued and dispatched.
2422 *
2423 * `eventTypes` {object}
2424 * Optional, plugins that fire events must publish a mapping of registration
2425 * names that are used to register listeners. Values of this mapping must
2426 * be objects that contain `registrationName` or `phasedRegistrationNames`.
2427 *
2428 * `executeDispatch` {function(object, function, string)}
2429 * Optional, allows plugins to override how an event gets dispatched. By
2430 * default, the listener is simply invoked.
2431 *
2432 * Each plugin that is injected into `EventsPluginHub` is immediately operable.
2433 *
2434 * @public
2435 */
2436var EventPluginHub = {
2437 /**
2438 * Methods for injecting dependencies.
2439 */
2440 injection: {
2441 /**
2442 * @param {array} InjectedEventPluginOrder
2443 * @public
2444 */
2445 injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
2446
2447 /**
2448 * @param {object} injectedNamesToPlugins Map from names to plugin modules.
2449 */
2450 injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
2451 },
2452
2453 /**
2454 * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent.
2455 *
2456 * @param {object} inst The instance, which is the source of events.
2457 * @param {string} registrationName Name of listener (e.g. `onClick`).
2458 * @param {function} listener The callback to store.
2459 */
2460 putListener: function (inst, registrationName, listener) {
2461 !(typeof listener === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0;
2462
2463 var key = getDictionaryKey(inst);
2464 var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
2465 bankForRegistrationName[key] = listener;
2466
2467 var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
2468 if (PluginModule && PluginModule.didPutListener) {
2469 PluginModule.didPutListener(inst, registrationName, listener);
2470 }
2471 },
2472
2473 /**
2474 * @param {object} inst The instance, which is the source of events.
2475 * @param {string} registrationName Name of listener (e.g. `onClick`).
2476 * @return {?function} The stored callback.
2477 */
2478 getListener: function (inst, registrationName) {
2479 // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
2480 // live here; needs to be moved to a better place soon
2481 var bankForRegistrationName = listenerBank[registrationName];
2482 if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) {
2483 return null;
2484 }
2485 var key = getDictionaryKey(inst);
2486 return bankForRegistrationName && bankForRegistrationName[key];
2487 },
2488
2489 /**
2490 * Deletes a listener from the registration bank.
2491 *
2492 * @param {object} inst The instance, which is the source of events.
2493 * @param {string} registrationName Name of listener (e.g. `onClick`).
2494 */
2495 deleteListener: function (inst, registrationName) {
2496 var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
2497 if (PluginModule && PluginModule.willDeleteListener) {
2498 PluginModule.willDeleteListener(inst, registrationName);
2499 }
2500
2501 var bankForRegistrationName = listenerBank[registrationName];
2502 // TODO: This should never be null -- when is it?
2503 if (bankForRegistrationName) {
2504 var key = getDictionaryKey(inst);
2505 delete bankForRegistrationName[key];
2506 }
2507 },
2508
2509 /**
2510 * Deletes all listeners for the DOM element with the supplied ID.
2511 *
2512 * @param {object} inst The instance, which is the source of events.
2513 */
2514 deleteAllListeners: function (inst) {
2515 var key = getDictionaryKey(inst);
2516 for (var registrationName in listenerBank) {
2517 if (!listenerBank.hasOwnProperty(registrationName)) {
2518 continue;
2519 }
2520
2521 if (!listenerBank[registrationName][key]) {
2522 continue;
2523 }
2524
2525 var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
2526 if (PluginModule && PluginModule.willDeleteListener) {
2527 PluginModule.willDeleteListener(inst, registrationName);
2528 }
2529
2530 delete listenerBank[registrationName][key];
2531 }
2532 },
2533
2534 /**
2535 * Allows registered plugins an opportunity to extract events from top-level
2536 * native browser events.
2537 *
2538 * @return {*} An accumulation of synthetic events.
2539 * @internal
2540 */
2541 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
2542 var events;
2543 var plugins = EventPluginRegistry.plugins;
2544 for (var i = 0; i < plugins.length; i++) {
2545 // Not every plugin in the ordering may be loaded at runtime.
2546 var possiblePlugin = plugins[i];
2547 if (possiblePlugin) {
2548 var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
2549 if (extractedEvents) {
2550 events = accumulateInto(events, extractedEvents);
2551 }
2552 }
2553 }
2554 return events;
2555 },
2556
2557 /**
2558 * Enqueues a synthetic event that should be dispatched when
2559 * `processEventQueue` is invoked.
2560 *
2561 * @param {*} events An accumulation of synthetic events.
2562 * @internal
2563 */
2564 enqueueEvents: function (events) {
2565 if (events) {
2566 eventQueue = accumulateInto(eventQueue, events);
2567 }
2568 },
2569
2570 /**
2571 * Dispatches all synthetic events on the event queue.
2572 *
2573 * @internal
2574 */
2575 processEventQueue: function (simulated) {
2576 // Set `eventQueue` to null before processing it so that we can tell if more
2577 // events get enqueued while processing.
2578 var processingEventQueue = eventQueue;
2579 eventQueue = null;
2580 if (simulated) {
2581 forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
2582 } else {
2583 forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
2584 }
2585 !!eventQueue ? process.env.NODE_ENV !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0;
2586 // This would be a good time to rethrow if any of the event handlers threw.
2587 ReactErrorUtils.rethrowCaughtError();
2588 },
2589
2590 /**
2591 * These are needed for tests only. Do not use!
2592 */
2593 __purge: function () {
2594 listenerBank = {};
2595 },
2596
2597 __getListenerBank: function () {
2598 return listenerBank;
2599 }
2600};
2601
2602module.exports = EventPluginHub;
2603
2604/***/ }),
2605/* 18 */
2606/***/ (function(module, exports, __webpack_require__) {
2607
2608"use strict";
2609/**
2610 * Copyright (c) 2013-present, Facebook, Inc.
2611 *
2612 * This source code is licensed under the MIT license found in the
2613 * LICENSE file in the root directory of this source tree.
2614 *
2615 */
2616
2617
2618
2619var EventPluginHub = __webpack_require__(17);
2620var EventPluginUtils = __webpack_require__(31);
2621
2622var accumulateInto = __webpack_require__(66);
2623var forEachAccumulated = __webpack_require__(67);
2624var warning = __webpack_require__(1);
2625
2626var getListener = EventPluginHub.getListener;
2627
2628/**
2629 * Some event types have a notion of different registration names for different
2630 * "phases" of propagation. This finds listeners by a given phase.
2631 */
2632function listenerAtPhase(inst, event, propagationPhase) {
2633 var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
2634 return getListener(inst, registrationName);
2635}
2636
2637/**
2638 * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
2639 * here, allows us to not have to bind or create functions for each event.
2640 * Mutating the event's members allows us to not have to create a wrapping
2641 * "dispatch" object that pairs the event with the listener.
2642 */
2643function accumulateDirectionalDispatches(inst, phase, event) {
2644 if (process.env.NODE_ENV !== 'production') {
2645 process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;
2646 }
2647 var listener = listenerAtPhase(inst, event, phase);
2648 if (listener) {
2649 event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
2650 event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
2651 }
2652}
2653
2654/**
2655 * Collect dispatches (must be entirely collected before dispatching - see unit
2656 * tests). Lazily allocate the array to conserve memory. We must loop through
2657 * each event and perform the traversal for each one. We cannot perform a
2658 * single traversal for the entire collection of events because each event may
2659 * have a different target.
2660 */
2661function accumulateTwoPhaseDispatchesSingle(event) {
2662 if (event && event.dispatchConfig.phasedRegistrationNames) {
2663 EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
2664 }
2665}
2666
2667/**
2668 * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.
2669 */
2670function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
2671 if (event && event.dispatchConfig.phasedRegistrationNames) {
2672 var targetInst = event._targetInst;
2673 var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
2674 EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
2675 }
2676}
2677
2678/**
2679 * Accumulates without regard to direction, does not look for phased
2680 * registration names. Same as `accumulateDirectDispatchesSingle` but without
2681 * requiring that the `dispatchMarker` be the same as the dispatched ID.
2682 */
2683function accumulateDispatches(inst, ignoredDirection, event) {
2684 if (event && event.dispatchConfig.registrationName) {
2685 var registrationName = event.dispatchConfig.registrationName;
2686 var listener = getListener(inst, registrationName);
2687 if (listener) {
2688 event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
2689 event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
2690 }
2691 }
2692}
2693
2694/**
2695 * Accumulates dispatches on an `SyntheticEvent`, but only for the
2696 * `dispatchMarker`.
2697 * @param {SyntheticEvent} event
2698 */
2699function accumulateDirectDispatchesSingle(event) {
2700 if (event && event.dispatchConfig.registrationName) {
2701 accumulateDispatches(event._targetInst, null, event);
2702 }
2703}
2704
2705function accumulateTwoPhaseDispatches(events) {
2706 forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
2707}
2708
2709function accumulateTwoPhaseDispatchesSkipTarget(events) {
2710 forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
2711}
2712
2713function accumulateEnterLeaveDispatches(leave, enter, from, to) {
2714 EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
2715}
2716
2717function accumulateDirectDispatches(events) {
2718 forEachAccumulated(events, accumulateDirectDispatchesSingle);
2719}
2720
2721/**
2722 * A small set of propagation patterns, each of which will accept a small amount
2723 * of information, and generate a set of "dispatch ready event objects" - which
2724 * are sets of events that have already been annotated with a set of dispatched
2725 * listener functions/ids. The API is designed this way to discourage these
2726 * propagation strategies from actually executing the dispatches, since we
2727 * always want to collect the entire set of dispatches before executing event a
2728 * single one.
2729 *
2730 * @constructor EventPropagators
2731 */
2732var EventPropagators = {
2733 accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
2734 accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
2735 accumulateDirectDispatches: accumulateDirectDispatches,
2736 accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
2737};
2738
2739module.exports = EventPropagators;
2740
2741/***/ }),
2742/* 19 */
2743/***/ (function(module, exports, __webpack_require__) {
2744
2745"use strict";
2746/**
2747 * Copyright (c) 2013-present, Facebook, Inc.
2748 *
2749 * This source code is licensed under the MIT license found in the
2750 * LICENSE file in the root directory of this source tree.
2751 *
2752 */
2753
2754
2755
2756var ReactRef = __webpack_require__(160);
2757var ReactInstrumentation = __webpack_require__(6);
2758
2759var warning = __webpack_require__(1);
2760
2761/**
2762 * Helper to call ReactRef.attachRefs with this composite component, split out
2763 * to avoid allocations in the transaction mount-ready queue.
2764 */
2765function attachRefs() {
2766 ReactRef.attachRefs(this, this._currentElement);
2767}
2768
2769var ReactReconciler = {
2770 /**
2771 * Initializes the component, renders markup, and registers event listeners.
2772 *
2773 * @param {ReactComponent} internalInstance
2774 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
2775 * @param {?object} the containing host component instance
2776 * @param {?object} info about the host container
2777 * @return {?string} Rendered markup to be inserted into the DOM.
2778 * @final
2779 * @internal
2780 */
2781 mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID) // 0 in production and for roots
2782 {
2783 if (process.env.NODE_ENV !== 'production') {
2784 if (internalInstance._debugID !== 0) {
2785 ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
2786 }
2787 }
2788 var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
2789 if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
2790 transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
2791 }
2792 if (process.env.NODE_ENV !== 'production') {
2793 if (internalInstance._debugID !== 0) {
2794 ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);
2795 }
2796 }
2797 return markup;
2798 },
2799
2800 /**
2801 * Returns a value that can be passed to
2802 * ReactComponentEnvironment.replaceNodeWithMarkup.
2803 */
2804 getHostNode: function (internalInstance) {
2805 return internalInstance.getHostNode();
2806 },
2807
2808 /**
2809 * Releases any resources allocated by `mountComponent`.
2810 *
2811 * @final
2812 * @internal
2813 */
2814 unmountComponent: function (internalInstance, safely) {
2815 if (process.env.NODE_ENV !== 'production') {
2816 if (internalInstance._debugID !== 0) {
2817 ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);
2818 }
2819 }
2820 ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
2821 internalInstance.unmountComponent(safely);
2822 if (process.env.NODE_ENV !== 'production') {
2823 if (internalInstance._debugID !== 0) {
2824 ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);
2825 }
2826 }
2827 },
2828
2829 /**
2830 * Update a component using a new element.
2831 *
2832 * @param {ReactComponent} internalInstance
2833 * @param {ReactElement} nextElement
2834 * @param {ReactReconcileTransaction} transaction
2835 * @param {object} context
2836 * @internal
2837 */
2838 receiveComponent: function (internalInstance, nextElement, transaction, context) {
2839 var prevElement = internalInstance._currentElement;
2840
2841 if (nextElement === prevElement && context === internalInstance._context) {
2842 // Since elements are immutable after the owner is rendered,
2843 // we can do a cheap identity compare here to determine if this is a
2844 // superfluous reconcile. It's possible for state to be mutable but such
2845 // change should trigger an update of the owner which would recreate
2846 // the element. We explicitly check for the existence of an owner since
2847 // it's possible for an element created outside a composite to be
2848 // deeply mutated and reused.
2849
2850 // TODO: Bailing out early is just a perf optimization right?
2851 // TODO: Removing the return statement should affect correctness?
2852 return;
2853 }
2854
2855 if (process.env.NODE_ENV !== 'production') {
2856 if (internalInstance._debugID !== 0) {
2857 ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
2858 }
2859 }
2860
2861 var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);
2862
2863 if (refsChanged) {
2864 ReactRef.detachRefs(internalInstance, prevElement);
2865 }
2866
2867 internalInstance.receiveComponent(nextElement, transaction, context);
2868
2869 if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
2870 transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
2871 }
2872
2873 if (process.env.NODE_ENV !== 'production') {
2874 if (internalInstance._debugID !== 0) {
2875 ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
2876 }
2877 }
2878 },
2879
2880 /**
2881 * Flush any dirty changes in a component.
2882 *
2883 * @param {ReactComponent} internalInstance
2884 * @param {ReactReconcileTransaction} transaction
2885 * @internal
2886 */
2887 performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) {
2888 if (internalInstance._updateBatchNumber !== updateBatchNumber) {
2889 // The component's enqueued batch number should always be the current
2890 // batch or the following one.
2891 process.env.NODE_ENV !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0;
2892 return;
2893 }
2894 if (process.env.NODE_ENV !== 'production') {
2895 if (internalInstance._debugID !== 0) {
2896 ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);
2897 }
2898 }
2899 internalInstance.performUpdateIfNecessary(transaction);
2900 if (process.env.NODE_ENV !== 'production') {
2901 if (internalInstance._debugID !== 0) {
2902 ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
2903 }
2904 }
2905 }
2906};
2907
2908module.exports = ReactReconciler;
2909
2910/***/ }),
2911/* 20 */
2912/***/ (function(module, exports, __webpack_require__) {
2913
2914"use strict";
2915/**
2916 * Copyright (c) 2013-present, Facebook, Inc.
2917 *
2918 * This source code is licensed under the MIT license found in the
2919 * LICENSE file in the root directory of this source tree.
2920 *
2921 */
2922
2923
2924
2925var SyntheticEvent = __webpack_require__(10);
2926
2927var getEventTarget = __webpack_require__(41);
2928
2929/**
2930 * @interface UIEvent
2931 * @see http://www.w3.org/TR/DOM-Level-3-Events/
2932 */
2933var UIEventInterface = {
2934 view: function (event) {
2935 if (event.view) {
2936 return event.view;
2937 }
2938
2939 var target = getEventTarget(event);
2940 if (target.window === target) {
2941 // target is a window object
2942 return target;
2943 }
2944
2945 var doc = target.ownerDocument;
2946 // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
2947 if (doc) {
2948 return doc.defaultView || doc.parentWindow;
2949 } else {
2950 return window;
2951 }
2952 },
2953 detail: function (event) {
2954 return event.detail || 0;
2955 }
2956};
2957
2958/**
2959 * @param {object} dispatchConfig Configuration used to dispatch this event.
2960 * @param {string} dispatchMarker Marker identifying the event target.
2961 * @param {object} nativeEvent Native browser event.
2962 * @extends {SyntheticEvent}
2963 */
2964function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
2965 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
2966}
2967
2968SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);
2969
2970module.exports = SyntheticUIEvent;
2971
2972/***/ }),
2973/* 21 */
2974/***/ (function(module, exports, __webpack_require__) {
2975
2976"use strict";
2977/**
2978 * Copyright (c) 2013-present, Facebook, Inc.
2979 *
2980 * This source code is licensed under the MIT license found in the
2981 * LICENSE file in the root directory of this source tree.
2982 *
2983 */
2984
2985
2986
2987var _assign = __webpack_require__(3);
2988
2989var ReactBaseClasses = __webpack_require__(75);
2990var ReactChildren = __webpack_require__(190);
2991var ReactDOMFactories = __webpack_require__(191);
2992var ReactElement = __webpack_require__(13);
2993var ReactPropTypes = __webpack_require__(193);
2994var ReactVersion = __webpack_require__(195);
2995
2996var createReactClass = __webpack_require__(197);
2997var onlyChild = __webpack_require__(199);
2998
2999var createElement = ReactElement.createElement;
3000var createFactory = ReactElement.createFactory;
3001var cloneElement = ReactElement.cloneElement;
3002
3003if (process.env.NODE_ENV !== 'production') {
3004 var lowPriorityWarning = __webpack_require__(45);
3005 var canDefineProperty = __webpack_require__(26);
3006 var ReactElementValidator = __webpack_require__(77);
3007 var didWarnPropTypesDeprecated = false;
3008 createElement = ReactElementValidator.createElement;
3009 createFactory = ReactElementValidator.createFactory;
3010 cloneElement = ReactElementValidator.cloneElement;
3011}
3012
3013var __spread = _assign;
3014var createMixin = function (mixin) {
3015 return mixin;
3016};
3017
3018if (process.env.NODE_ENV !== 'production') {
3019 var warnedForSpread = false;
3020 var warnedForCreateMixin = false;
3021 __spread = function () {
3022 lowPriorityWarning(warnedForSpread, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.');
3023 warnedForSpread = true;
3024 return _assign.apply(null, arguments);
3025 };
3026
3027 createMixin = function (mixin) {
3028 lowPriorityWarning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. ' + 'In React v16.0, it will be removed. ' + 'You can use this mixin directly instead. ' + 'See https://fb.me/createmixin-was-never-implemented for more info.');
3029 warnedForCreateMixin = true;
3030 return mixin;
3031 };
3032}
3033
3034var React = {
3035 // Modern
3036
3037 Children: {
3038 map: ReactChildren.map,
3039 forEach: ReactChildren.forEach,
3040 count: ReactChildren.count,
3041 toArray: ReactChildren.toArray,
3042 only: onlyChild
3043 },
3044
3045 Component: ReactBaseClasses.Component,
3046 PureComponent: ReactBaseClasses.PureComponent,
3047
3048 createElement: createElement,
3049 cloneElement: cloneElement,
3050 isValidElement: ReactElement.isValidElement,
3051
3052 // Classic
3053
3054 PropTypes: ReactPropTypes,
3055 createClass: createReactClass,
3056 createFactory: createFactory,
3057 createMixin: createMixin,
3058
3059 // This looks DOM specific but these are actually isomorphic helpers
3060 // since they are just generating DOM strings.
3061 DOM: ReactDOMFactories,
3062
3063 version: ReactVersion,
3064
3065 // Deprecated hook for JSX spread, don't use this for anything.
3066 __spread: __spread
3067};
3068
3069if (process.env.NODE_ENV !== 'production') {
3070 var warnedForCreateClass = false;
3071 if (canDefineProperty) {
3072 Object.defineProperty(React, 'PropTypes', {
3073 get: function () {
3074 lowPriorityWarning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated,' + ' and will be removed in React v16.0.' + ' Use the latest available v15.* prop-types package from npm instead.' + ' For info on usage, compatibility, migration and more, see ' + 'https://fb.me/prop-types-docs');
3075 didWarnPropTypesDeprecated = true;
3076 return ReactPropTypes;
3077 }
3078 });
3079
3080 Object.defineProperty(React, 'createClass', {
3081 get: function () {
3082 lowPriorityWarning(warnedForCreateClass, 'Accessing createClass via the main React package is deprecated,' + ' and will be removed in React v16.0.' + " Use a plain JavaScript class instead. If you're not yet " + 'ready to migrate, create-react-class v15.* is available ' + 'on npm as a temporary, drop-in replacement. ' + 'For more info see https://fb.me/react-create-class');
3083 warnedForCreateClass = true;
3084 return createReactClass;
3085 }
3086 });
3087 }
3088
3089 // React.DOM factories are deprecated. Wrap these methods so that
3090 // invocations of the React.DOM namespace and alert users to switch
3091 // to the `react-dom-factories` package.
3092 React.DOM = {};
3093 var warnedForFactories = false;
3094 Object.keys(ReactDOMFactories).forEach(function (factory) {
3095 React.DOM[factory] = function () {
3096 if (!warnedForFactories) {
3097 lowPriorityWarning(false, 'Accessing factories like React.DOM.%s has been deprecated ' + 'and will be removed in v16.0+. Use the ' + 'react-dom-factories package instead. ' + ' Version 1.0 provides a drop-in replacement.' + ' For more info, see https://fb.me/react-dom-factories', factory);
3098 warnedForFactories = true;
3099 }
3100 return ReactDOMFactories[factory].apply(ReactDOMFactories, arguments);
3101 };
3102 });
3103}
3104
3105module.exports = React;
3106
3107/***/ }),
3108/* 22 */
3109/***/ (function(module, exports, __webpack_require__) {
3110
3111"use strict";
3112/**
3113 * Copyright (c) 2013-present, Facebook, Inc.
3114 *
3115 * This source code is licensed under the MIT license found in the
3116 * LICENSE file in the root directory of this source tree.
3117 *
3118 */
3119
3120
3121
3122var emptyObject = {};
3123
3124if (process.env.NODE_ENV !== 'production') {
3125 Object.freeze(emptyObject);
3126}
3127
3128module.exports = emptyObject;
3129
3130/***/ }),
3131/* 23 */
3132/***/ (function(module, exports, __webpack_require__) {
3133
3134"use strict";
3135/**
3136 * Copyright (c) 2013-present, Facebook, Inc.
3137 *
3138 * This source code is licensed under the MIT license found in the
3139 * LICENSE file in the root directory of this source tree.
3140 *
3141 */
3142
3143
3144
3145var SyntheticUIEvent = __webpack_require__(20);
3146var ViewportMetrics = __webpack_require__(65);
3147
3148var getEventModifierState = __webpack_require__(40);
3149
3150/**
3151 * @interface MouseEvent
3152 * @see http://www.w3.org/TR/DOM-Level-3-Events/
3153 */
3154var MouseEventInterface = {
3155 screenX: null,
3156 screenY: null,
3157 clientX: null,
3158 clientY: null,
3159 ctrlKey: null,
3160 shiftKey: null,
3161 altKey: null,
3162 metaKey: null,
3163 getModifierState: getEventModifierState,
3164 button: function (event) {
3165 // Webkit, Firefox, IE9+
3166 // which: 1 2 3
3167 // button: 0 1 2 (standard)
3168 var button = event.button;
3169 if ('which' in event) {
3170 return button;
3171 }
3172 // IE<9
3173 // which: undefined
3174 // button: 0 0 0
3175 // button: 1 4 2 (onmouseup)
3176 return button === 2 ? 2 : button === 4 ? 1 : 0;
3177 },
3178 buttons: null,
3179 relatedTarget: function (event) {
3180 return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
3181 },
3182 // "Proprietary" Interface.
3183 pageX: function (event) {
3184 return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;
3185 },
3186 pageY: function (event) {
3187 return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;
3188 }
3189};
3190
3191/**
3192 * @param {object} dispatchConfig Configuration used to dispatch this event.
3193 * @param {string} dispatchMarker Marker identifying the event target.
3194 * @param {object} nativeEvent Native browser event.
3195 * @extends {SyntheticUIEvent}
3196 */
3197function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
3198 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
3199}
3200
3201SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
3202
3203module.exports = SyntheticMouseEvent;
3204
3205/***/ }),
3206/* 24 */
3207/***/ (function(module, exports, __webpack_require__) {
3208
3209"use strict";
3210/**
3211 * Copyright (c) 2013-present, Facebook, Inc.
3212 *
3213 * This source code is licensed under the MIT license found in the
3214 * LICENSE file in the root directory of this source tree.
3215 *
3216 *
3217 */
3218
3219
3220
3221var _prodInvariant = __webpack_require__(2);
3222
3223var invariant = __webpack_require__(0);
3224
3225var OBSERVED_ERROR = {};
3226
3227/**
3228 * `Transaction` creates a black box that is able to wrap any method such that
3229 * certain invariants are maintained before and after the method is invoked
3230 * (Even if an exception is thrown while invoking the wrapped method). Whoever
3231 * instantiates a transaction can provide enforcers of the invariants at
3232 * creation time. The `Transaction` class itself will supply one additional
3233 * automatic invariant for you - the invariant that any transaction instance
3234 * should not be run while it is already being run. You would typically create a
3235 * single instance of a `Transaction` for reuse multiple times, that potentially
3236 * is used to wrap several different methods. Wrappers are extremely simple -
3237 * they only require implementing two methods.
3238 *
3239 * <pre>
3240 * wrappers (injected at creation time)
3241 * + +
3242 * | |
3243 * +-----------------|--------|--------------+
3244 * | v | |
3245 * | +---------------+ | |
3246 * | +--| wrapper1 |---|----+ |
3247 * | | +---------------+ v | |
3248 * | | +-------------+ | |
3249 * | | +----| wrapper2 |--------+ |
3250 * | | | +-------------+ | | |
3251 * | | | | | |
3252 * | v v v v | wrapper
3253 * | +---+ +---+ +---------+ +---+ +---+ | invariants
3254 * perform(anyMethod) | | | | | | | | | | | | maintained
3255 * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->
3256 * | | | | | | | | | | | |
3257 * | | | | | | | | | | | |
3258 * | | | | | | | | | | | |
3259 * | +---+ +---+ +---------+ +---+ +---+ |
3260 * | initialize close |
3261 * +-----------------------------------------+
3262 * </pre>
3263 *
3264 * Use cases:
3265 * - Preserving the input selection ranges before/after reconciliation.
3266 * Restoring selection even in the event of an unexpected error.
3267 * - Deactivating events while rearranging the DOM, preventing blurs/focuses,
3268 * while guaranteeing that afterwards, the event system is reactivated.
3269 * - Flushing a queue of collected DOM mutations to the main UI thread after a
3270 * reconciliation takes place in a worker thread.
3271 * - Invoking any collected `componentDidUpdate` callbacks after rendering new
3272 * content.
3273 * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue
3274 * to preserve the `scrollTop` (an automatic scroll aware DOM).
3275 * - (Future use case): Layout calculations before and after DOM updates.
3276 *
3277 * Transactional plugin API:
3278 * - A module that has an `initialize` method that returns any precomputation.
3279 * - and a `close` method that accepts the precomputation. `close` is invoked
3280 * when the wrapped process is completed, or has failed.
3281 *
3282 * @param {Array<TransactionalWrapper>} transactionWrapper Wrapper modules
3283 * that implement `initialize` and `close`.
3284 * @return {Transaction} Single transaction for reuse in thread.
3285 *
3286 * @class Transaction
3287 */
3288var TransactionImpl = {
3289 /**
3290 * Sets up this instance so that it is prepared for collecting metrics. Does
3291 * so such that this setup method may be used on an instance that is already
3292 * initialized, in a way that does not consume additional memory upon reuse.
3293 * That can be useful if you decide to make your subclass of this mixin a
3294 * "PooledClass".
3295 */
3296 reinitializeTransaction: function () {
3297 this.transactionWrappers = this.getTransactionWrappers();
3298 if (this.wrapperInitData) {
3299 this.wrapperInitData.length = 0;
3300 } else {
3301 this.wrapperInitData = [];
3302 }
3303 this._isInTransaction = false;
3304 },
3305
3306 _isInTransaction: false,
3307
3308 /**
3309 * @abstract
3310 * @return {Array<TransactionWrapper>} Array of transaction wrappers.
3311 */
3312 getTransactionWrappers: null,
3313
3314 isInTransaction: function () {
3315 return !!this._isInTransaction;
3316 },
3317
3318 /* eslint-disable space-before-function-paren */
3319
3320 /**
3321 * Executes the function within a safety window. Use this for the top level
3322 * methods that result in large amounts of computation/mutations that would
3323 * need to be safety checked. The optional arguments helps prevent the need
3324 * to bind in many cases.
3325 *
3326 * @param {function} method Member of scope to call.
3327 * @param {Object} scope Scope to invoke from.
3328 * @param {Object?=} a Argument to pass to the method.
3329 * @param {Object?=} b Argument to pass to the method.
3330 * @param {Object?=} c Argument to pass to the method.
3331 * @param {Object?=} d Argument to pass to the method.
3332 * @param {Object?=} e Argument to pass to the method.
3333 * @param {Object?=} f Argument to pass to the method.
3334 *
3335 * @return {*} Return value from `method`.
3336 */
3337 perform: function (method, scope, a, b, c, d, e, f) {
3338 /* eslint-enable space-before-function-paren */
3339 !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;
3340 var errorThrown;
3341 var ret;
3342 try {
3343 this._isInTransaction = true;
3344 // Catching errors makes debugging more difficult, so we start with
3345 // errorThrown set to true before setting it to false after calling
3346 // close -- if it's still set to true in the finally block, it means
3347 // one of these calls threw.
3348 errorThrown = true;
3349 this.initializeAll(0);
3350 ret = method.call(scope, a, b, c, d, e, f);
3351 errorThrown = false;
3352 } finally {
3353 try {
3354 if (errorThrown) {
3355 // If `method` throws, prefer to show that stack trace over any thrown
3356 // by invoking `closeAll`.
3357 try {
3358 this.closeAll(0);
3359 } catch (err) {}
3360 } else {
3361 // Since `method` didn't throw, we don't want to silence the exception
3362 // here.
3363 this.closeAll(0);
3364 }
3365 } finally {
3366 this._isInTransaction = false;
3367 }
3368 }
3369 return ret;
3370 },
3371
3372 initializeAll: function (startIndex) {
3373 var transactionWrappers = this.transactionWrappers;
3374 for (var i = startIndex; i < transactionWrappers.length; i++) {
3375 var wrapper = transactionWrappers[i];
3376 try {
3377 // Catching errors makes debugging more difficult, so we start with the
3378 // OBSERVED_ERROR state before overwriting it with the real return value
3379 // of initialize -- if it's still set to OBSERVED_ERROR in the finally
3380 // block, it means wrapper.initialize threw.
3381 this.wrapperInitData[i] = OBSERVED_ERROR;
3382 this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;
3383 } finally {
3384 if (this.wrapperInitData[i] === OBSERVED_ERROR) {
3385 // The initializer for wrapper i threw an error; initialize the
3386 // remaining wrappers but silence any exceptions from them to ensure
3387 // that the first error is the one to bubble up.
3388 try {
3389 this.initializeAll(i + 1);
3390 } catch (err) {}
3391 }
3392 }
3393 }
3394 },
3395
3396 /**
3397 * Invokes each of `this.transactionWrappers.close[i]` functions, passing into
3398 * them the respective return values of `this.transactionWrappers.init[i]`
3399 * (`close`rs that correspond to initializers that failed will not be
3400 * invoked).
3401 */
3402 closeAll: function (startIndex) {
3403 !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0;
3404 var transactionWrappers = this.transactionWrappers;
3405 for (var i = startIndex; i < transactionWrappers.length; i++) {
3406 var wrapper = transactionWrappers[i];
3407 var initData = this.wrapperInitData[i];
3408 var errorThrown;
3409 try {
3410 // Catching errors makes debugging more difficult, so we start with
3411 // errorThrown set to true before setting it to false after calling
3412 // close -- if it's still set to true in the finally block, it means
3413 // wrapper.close threw.
3414 errorThrown = true;
3415 if (initData !== OBSERVED_ERROR && wrapper.close) {
3416 wrapper.close.call(this, initData);
3417 }
3418 errorThrown = false;
3419 } finally {
3420 if (errorThrown) {
3421 // The closer for wrapper i threw an error; close the remaining
3422 // wrappers but silence any exceptions from them to ensure that the
3423 // first error is the one to bubble up.
3424 try {
3425 this.closeAll(i + 1);
3426 } catch (e) {}
3427 }
3428 }
3429 }
3430 this.wrapperInitData.length = 0;
3431 }
3432};
3433
3434module.exports = TransactionImpl;
3435
3436/***/ }),
3437/* 25 */
3438/***/ (function(module, exports, __webpack_require__) {
3439
3440"use strict";
3441/**
3442 * Copyright (c) 2016-present, Facebook, Inc.
3443 *
3444 * This source code is licensed under the MIT license found in the
3445 * LICENSE file in the root directory of this source tree.
3446 *
3447 * Based on the escape-html library, which is used under the MIT License below:
3448 *
3449 * Copyright (c) 2012-2013 TJ Holowaychuk
3450 * Copyright (c) 2015 Andreas Lubbe
3451 * Copyright (c) 2015 Tiancheng "Timothy" Gu
3452 *
3453 * Permission is hereby granted, free of charge, to any person obtaining
3454 * a copy of this software and associated documentation files (the
3455 * 'Software'), to deal in the Software without restriction, including
3456 * without limitation the rights to use, copy, modify, merge, publish,
3457 * distribute, sublicense, and/or sell copies of the Software, and to
3458 * permit persons to whom the Software is furnished to do so, subject to
3459 * the following conditions:
3460 *
3461 * The above copyright notice and this permission notice shall be
3462 * included in all copies or substantial portions of the Software.
3463 *
3464 * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
3465 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
3466 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
3467 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
3468 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
3469 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
3470 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3471 *
3472 */
3473
3474
3475
3476// code copied and modified from escape-html
3477/**
3478 * Module variables.
3479 * @private
3480 */
3481
3482var matchHtmlRegExp = /["'&<>]/;
3483
3484/**
3485 * Escape special characters in the given string of html.
3486 *
3487 * @param {string} string The string to escape for inserting into HTML
3488 * @return {string}
3489 * @public
3490 */
3491
3492function escapeHtml(string) {
3493 var str = '' + string;
3494 var match = matchHtmlRegExp.exec(str);
3495
3496 if (!match) {
3497 return str;
3498 }
3499
3500 var escape;
3501 var html = '';
3502 var index = 0;
3503 var lastIndex = 0;
3504
3505 for (index = match.index; index < str.length; index++) {
3506 switch (str.charCodeAt(index)) {
3507 case 34:
3508 // "
3509 escape = '&quot;';
3510 break;
3511 case 38:
3512 // &
3513 escape = '&amp;';
3514 break;
3515 case 39:
3516 // '
3517 escape = '&#x27;'; // modified from escape-html; used to be '&#39'
3518 break;
3519 case 60:
3520 // <
3521 escape = '&lt;';
3522 break;
3523 case 62:
3524 // >
3525 escape = '&gt;';
3526 break;
3527 default:
3528 continue;
3529 }
3530
3531 if (lastIndex !== index) {
3532 html += str.substring(lastIndex, index);
3533 }
3534
3535 lastIndex = index + 1;
3536 html += escape;
3537 }
3538
3539 return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
3540}
3541// end code copied and modified from escape-html
3542
3543/**
3544 * Escapes text to prevent scripting attacks.
3545 *
3546 * @param {*} text Text value to escape.
3547 * @return {string} An escaped string.
3548 */
3549function escapeTextContentForBrowser(text) {
3550 if (typeof text === 'boolean' || typeof text === 'number') {
3551 // this shortcircuit helps perf for types that we know will never have
3552 // special characters, especially given that this function is used often
3553 // for numeric dom ids.
3554 return '' + text;
3555 }
3556 return escapeHtml(text);
3557}
3558
3559module.exports = escapeTextContentForBrowser;
3560
3561/***/ }),
3562/* 26 */
3563/***/ (function(module, exports, __webpack_require__) {
3564
3565"use strict";
3566/**
3567 * Copyright (c) 2013-present, Facebook, Inc.
3568 *
3569 * This source code is licensed under the MIT license found in the
3570 * LICENSE file in the root directory of this source tree.
3571 *
3572 *
3573 */
3574
3575
3576
3577var canDefineProperty = false;
3578if (process.env.NODE_ENV !== 'production') {
3579 try {
3580 // $FlowFixMe https://github.com/facebook/flow/issues/285
3581 Object.defineProperty({}, 'x', { get: function () {} });
3582 canDefineProperty = true;
3583 } catch (x) {
3584 // IE will fail on defineProperty
3585 }
3586}
3587
3588module.exports = canDefineProperty;
3589
3590/***/ }),
3591/* 27 */
3592/***/ (function(module, exports, __webpack_require__) {
3593
3594"use strict";
3595/**
3596 * Copyright (c) 2013-present, Facebook, Inc.
3597 *
3598 * This source code is licensed under the MIT license found in the
3599 * LICENSE file in the root directory of this source tree.
3600 *
3601 * @typechecks
3602 *
3603 */
3604
3605/*eslint-disable no-self-compare */
3606
3607
3608
3609var hasOwnProperty = Object.prototype.hasOwnProperty;
3610
3611/**
3612 * inlined Object.is polyfill to avoid requiring consumers ship their own
3613 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
3614 */
3615function is(x, y) {
3616 // SameValue algorithm
3617 if (x === y) {
3618 // Steps 1-5, 7-10
3619 // Steps 6.b-6.e: +0 != -0
3620 // Added the nonzero y check to make Flow happy, but it is redundant
3621 return x !== 0 || y !== 0 || 1 / x === 1 / y;
3622 } else {
3623 // Step 6.a: NaN == NaN
3624 return x !== x && y !== y;
3625 }
3626}
3627
3628/**
3629 * Performs equality by iterating through keys on an object and returning false
3630 * when any key has values which are not strictly equal between the arguments.
3631 * Returns true when the values of all keys are strictly equal.
3632 */
3633function shallowEqual(objA, objB) {
3634 if (is(objA, objB)) {
3635 return true;
3636 }
3637
3638 if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
3639 return false;
3640 }
3641
3642 var keysA = Object.keys(objA);
3643 var keysB = Object.keys(objB);
3644
3645 if (keysA.length !== keysB.length) {
3646 return false;
3647 }
3648
3649 // Test for A's keys different from B.
3650 for (var i = 0; i < keysA.length; i++) {
3651 if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
3652 return false;
3653 }
3654 }
3655
3656 return true;
3657}
3658
3659module.exports = shallowEqual;
3660
3661/***/ }),
3662/* 28 */
3663/***/ (function(module, exports, __webpack_require__) {
3664
3665"use strict";
3666/**
3667 * Copyright (c) 2013-present, Facebook, Inc.
3668 *
3669 * This source code is licensed under the MIT license found in the
3670 * LICENSE file in the root directory of this source tree.
3671 *
3672 */
3673
3674
3675
3676var DOMLazyTree = __webpack_require__(15);
3677var Danger = __webpack_require__(126);
3678var ReactDOMComponentTree = __webpack_require__(4);
3679var ReactInstrumentation = __webpack_require__(6);
3680
3681var createMicrosoftUnsafeLocalFunction = __webpack_require__(38);
3682var setInnerHTML = __webpack_require__(43);
3683var setTextContent = __webpack_require__(72);
3684
3685function getNodeAfter(parentNode, node) {
3686 // Special case for text components, which return [open, close] comments
3687 // from getHostNode.
3688 if (Array.isArray(node)) {
3689 node = node[1];
3690 }
3691 return node ? node.nextSibling : parentNode.firstChild;
3692}
3693
3694/**
3695 * Inserts `childNode` as a child of `parentNode` at the `index`.
3696 *
3697 * @param {DOMElement} parentNode Parent node in which to insert.
3698 * @param {DOMElement} childNode Child node to insert.
3699 * @param {number} index Index at which to insert the child.
3700 * @internal
3701 */
3702var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {
3703 // We rely exclusively on `insertBefore(node, null)` instead of also using
3704 // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so
3705 // we are careful to use `null`.)
3706 parentNode.insertBefore(childNode, referenceNode);
3707});
3708
3709function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
3710 DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);
3711}
3712
3713function moveChild(parentNode, childNode, referenceNode) {
3714 if (Array.isArray(childNode)) {
3715 moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);
3716 } else {
3717 insertChildAt(parentNode, childNode, referenceNode);
3718 }
3719}
3720
3721function removeChild(parentNode, childNode) {
3722 if (Array.isArray(childNode)) {
3723 var closingComment = childNode[1];
3724 childNode = childNode[0];
3725 removeDelimitedText(parentNode, childNode, closingComment);
3726 parentNode.removeChild(closingComment);
3727 }
3728 parentNode.removeChild(childNode);
3729}
3730
3731function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {
3732 var node = openingComment;
3733 while (true) {
3734 var nextNode = node.nextSibling;
3735 insertChildAt(parentNode, node, referenceNode);
3736 if (node === closingComment) {
3737 break;
3738 }
3739 node = nextNode;
3740 }
3741}
3742
3743function removeDelimitedText(parentNode, startNode, closingComment) {
3744 while (true) {
3745 var node = startNode.nextSibling;
3746 if (node === closingComment) {
3747 // The closing comment is removed by ReactMultiChild.
3748 break;
3749 } else {
3750 parentNode.removeChild(node);
3751 }
3752 }
3753}
3754
3755function replaceDelimitedText(openingComment, closingComment, stringText) {
3756 var parentNode = openingComment.parentNode;
3757 var nodeAfterComment = openingComment.nextSibling;
3758 if (nodeAfterComment === closingComment) {
3759 // There are no text nodes between the opening and closing comments; insert
3760 // a new one if stringText isn't empty.
3761 if (stringText) {
3762 insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);
3763 }
3764 } else {
3765 if (stringText) {
3766 // Set the text content of the first node after the opening comment, and
3767 // remove all following nodes up until the closing comment.
3768 setTextContent(nodeAfterComment, stringText);
3769 removeDelimitedText(parentNode, nodeAfterComment, closingComment);
3770 } else {
3771 removeDelimitedText(parentNode, openingComment, closingComment);
3772 }
3773 }
3774
3775 if (process.env.NODE_ENV !== 'production') {
3776 ReactInstrumentation.debugTool.onHostOperation({
3777 instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID,
3778 type: 'replace text',
3779 payload: stringText
3780 });
3781 }
3782}
3783
3784var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup;
3785if (process.env.NODE_ENV !== 'production') {
3786 dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) {
3787 Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);
3788 if (prevInstance._debugID !== 0) {
3789 ReactInstrumentation.debugTool.onHostOperation({
3790 instanceID: prevInstance._debugID,
3791 type: 'replace with',
3792 payload: markup.toString()
3793 });
3794 } else {
3795 var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);
3796 if (nextInstance._debugID !== 0) {
3797 ReactInstrumentation.debugTool.onHostOperation({
3798 instanceID: nextInstance._debugID,
3799 type: 'mount',
3800 payload: markup.toString()
3801 });
3802 }
3803 }
3804 };
3805}
3806
3807/**
3808 * Operations for updating with DOM children.
3809 */
3810var DOMChildrenOperations = {
3811 dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
3812
3813 replaceDelimitedText: replaceDelimitedText,
3814
3815 /**
3816 * Updates a component's children by processing a series of updates. The
3817 * update configurations are each expected to have a `parentNode` property.
3818 *
3819 * @param {array<object>} updates List of update configurations.
3820 * @internal
3821 */
3822 processUpdates: function (parentNode, updates) {
3823 if (process.env.NODE_ENV !== 'production') {
3824 var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID;
3825 }
3826
3827 for (var k = 0; k < updates.length; k++) {
3828 var update = updates[k];
3829 switch (update.type) {
3830 case 'INSERT_MARKUP':
3831 insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));
3832 if (process.env.NODE_ENV !== 'production') {
3833 ReactInstrumentation.debugTool.onHostOperation({
3834 instanceID: parentNodeDebugID,
3835 type: 'insert child',
3836 payload: {
3837 toIndex: update.toIndex,
3838 content: update.content.toString()
3839 }
3840 });
3841 }
3842 break;
3843 case 'MOVE_EXISTING':
3844 moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));
3845 if (process.env.NODE_ENV !== 'production') {
3846 ReactInstrumentation.debugTool.onHostOperation({
3847 instanceID: parentNodeDebugID,
3848 type: 'move child',
3849 payload: { fromIndex: update.fromIndex, toIndex: update.toIndex }
3850 });
3851 }
3852 break;
3853 case 'SET_MARKUP':
3854 setInnerHTML(parentNode, update.content);
3855 if (process.env.NODE_ENV !== 'production') {
3856 ReactInstrumentation.debugTool.onHostOperation({
3857 instanceID: parentNodeDebugID,
3858 type: 'replace children',
3859 payload: update.content.toString()
3860 });
3861 }
3862 break;
3863 case 'TEXT_CONTENT':
3864 setTextContent(parentNode, update.content);
3865 if (process.env.NODE_ENV !== 'production') {
3866 ReactInstrumentation.debugTool.onHostOperation({
3867 instanceID: parentNodeDebugID,
3868 type: 'replace text',
3869 payload: update.content.toString()
3870 });
3871 }
3872 break;
3873 case 'REMOVE_NODE':
3874 removeChild(parentNode, update.fromNode);
3875 if (process.env.NODE_ENV !== 'production') {
3876 ReactInstrumentation.debugTool.onHostOperation({
3877 instanceID: parentNodeDebugID,
3878 type: 'remove child',
3879 payload: { fromIndex: update.fromIndex }
3880 });
3881 }
3882 break;
3883 }
3884 }
3885 }
3886};
3887
3888module.exports = DOMChildrenOperations;
3889
3890/***/ }),
3891/* 29 */
3892/***/ (function(module, exports, __webpack_require__) {
3893
3894"use strict";
3895/**
3896 * Copyright (c) 2013-present, Facebook, Inc.
3897 *
3898 * This source code is licensed under the MIT license found in the
3899 * LICENSE file in the root directory of this source tree.
3900 *
3901 */
3902
3903
3904
3905var DOMNamespaces = {
3906 html: 'http://www.w3.org/1999/xhtml',
3907 mathml: 'http://www.w3.org/1998/Math/MathML',
3908 svg: 'http://www.w3.org/2000/svg'
3909};
3910
3911module.exports = DOMNamespaces;
3912
3913/***/ }),
3914/* 30 */
3915/***/ (function(module, exports, __webpack_require__) {
3916
3917"use strict";
3918/**
3919 * Copyright (c) 2013-present, Facebook, Inc.
3920 *
3921 * This source code is licensed under the MIT license found in the
3922 * LICENSE file in the root directory of this source tree.
3923 *
3924 *
3925 */
3926
3927
3928
3929var _prodInvariant = __webpack_require__(2);
3930
3931var invariant = __webpack_require__(0);
3932
3933/**
3934 * Injectable ordering of event plugins.
3935 */
3936var eventPluginOrder = null;
3937
3938/**
3939 * Injectable mapping from names to event plugin modules.
3940 */
3941var namesToPlugins = {};
3942
3943/**
3944 * Recomputes the plugin list using the injected plugins and plugin ordering.
3945 *
3946 * @private
3947 */
3948function recomputePluginOrdering() {
3949 if (!eventPluginOrder) {
3950 // Wait until an `eventPluginOrder` is injected.
3951 return;
3952 }
3953 for (var pluginName in namesToPlugins) {
3954 var pluginModule = namesToPlugins[pluginName];
3955 var pluginIndex = eventPluginOrder.indexOf(pluginName);
3956 !(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0;
3957 if (EventPluginRegistry.plugins[pluginIndex]) {
3958 continue;
3959 }
3960 !pluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0;
3961 EventPluginRegistry.plugins[pluginIndex] = pluginModule;
3962 var publishedEvents = pluginModule.eventTypes;
3963 for (var eventName in publishedEvents) {
3964 !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0;
3965 }
3966 }
3967}
3968
3969/**
3970 * Publishes an event so that it can be dispatched by the supplied plugin.
3971 *
3972 * @param {object} dispatchConfig Dispatch configuration for the event.
3973 * @param {object} PluginModule Plugin publishing the event.
3974 * @return {boolean} True if the event was successfully published.
3975 * @private
3976 */
3977function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
3978 !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0;
3979 EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
3980
3981 var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
3982 if (phasedRegistrationNames) {
3983 for (var phaseName in phasedRegistrationNames) {
3984 if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
3985 var phasedRegistrationName = phasedRegistrationNames[phaseName];
3986 publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
3987 }
3988 }
3989 return true;
3990 } else if (dispatchConfig.registrationName) {
3991 publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
3992 return true;
3993 }
3994 return false;
3995}
3996
3997/**
3998 * Publishes a registration name that is used to identify dispatched events and
3999 * can be used with `EventPluginHub.putListener` to register listeners.
4000 *
4001 * @param {string} registrationName Registration name to add.
4002 * @param {object} PluginModule Plugin publishing the event.
4003 * @private
4004 */
4005function publishRegistrationName(registrationName, pluginModule, eventName) {
4006 !!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0;
4007 EventPluginRegistry.registrationNameModules[registrationName] = pluginModule;
4008 EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
4009
4010 if (process.env.NODE_ENV !== 'production') {
4011 var lowerCasedName = registrationName.toLowerCase();
4012 EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
4013
4014 if (registrationName === 'onDoubleClick') {
4015 EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
4016 }
4017 }
4018}
4019
4020/**
4021 * Registers plugins so that they can extract and dispatch events.
4022 *
4023 * @see {EventPluginHub}
4024 */
4025var EventPluginRegistry = {
4026 /**
4027 * Ordered list of injected plugins.
4028 */
4029 plugins: [],
4030
4031 /**
4032 * Mapping from event name to dispatch config
4033 */
4034 eventNameDispatchConfigs: {},
4035
4036 /**
4037 * Mapping from registration name to plugin module
4038 */
4039 registrationNameModules: {},
4040
4041 /**
4042 * Mapping from registration name to event name
4043 */
4044 registrationNameDependencies: {},
4045
4046 /**
4047 * Mapping from lowercase registration names to the properly cased version,
4048 * used to warn in the case of missing event handlers. Available
4049 * only in __DEV__.
4050 * @type {Object}
4051 */
4052 possibleRegistrationNames: process.env.NODE_ENV !== 'production' ? {} : null,
4053 // Trust the developer to only use possibleRegistrationNames in __DEV__
4054
4055 /**
4056 * Injects an ordering of plugins (by plugin name). This allows the ordering
4057 * to be decoupled from injection of the actual plugins so that ordering is
4058 * always deterministic regardless of packaging, on-the-fly injection, etc.
4059 *
4060 * @param {array} InjectedEventPluginOrder
4061 * @internal
4062 * @see {EventPluginHub.injection.injectEventPluginOrder}
4063 */
4064 injectEventPluginOrder: function (injectedEventPluginOrder) {
4065 !!eventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0;
4066 // Clone the ordering so it cannot be dynamically mutated.
4067 eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
4068 recomputePluginOrdering();
4069 },
4070
4071 /**
4072 * Injects plugins to be used by `EventPluginHub`. The plugin names must be
4073 * in the ordering injected by `injectEventPluginOrder`.
4074 *
4075 * Plugins can be injected as part of page initialization or on-the-fly.
4076 *
4077 * @param {object} injectedNamesToPlugins Map from names to plugin modules.
4078 * @internal
4079 * @see {EventPluginHub.injection.injectEventPluginsByName}
4080 */
4081 injectEventPluginsByName: function (injectedNamesToPlugins) {
4082 var isOrderingDirty = false;
4083 for (var pluginName in injectedNamesToPlugins) {
4084 if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
4085 continue;
4086 }
4087 var pluginModule = injectedNamesToPlugins[pluginName];
4088 if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
4089 !!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0;
4090 namesToPlugins[pluginName] = pluginModule;
4091 isOrderingDirty = true;
4092 }
4093 }
4094 if (isOrderingDirty) {
4095 recomputePluginOrdering();
4096 }
4097 },
4098
4099 /**
4100 * Looks up the plugin for the supplied event.
4101 *
4102 * @param {object} event A synthetic event.
4103 * @return {?object} The plugin that created the supplied event.
4104 * @internal
4105 */
4106 getPluginModuleForEvent: function (event) {
4107 var dispatchConfig = event.dispatchConfig;
4108 if (dispatchConfig.registrationName) {
4109 return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;
4110 }
4111 if (dispatchConfig.phasedRegistrationNames !== undefined) {
4112 // pulling phasedRegistrationNames out of dispatchConfig helps Flow see
4113 // that it is not undefined.
4114 var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
4115
4116 for (var phase in phasedRegistrationNames) {
4117 if (!phasedRegistrationNames.hasOwnProperty(phase)) {
4118 continue;
4119 }
4120 var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]];
4121 if (pluginModule) {
4122 return pluginModule;
4123 }
4124 }
4125 }
4126 return null;
4127 },
4128
4129 /**
4130 * Exposed for unit testing.
4131 * @private
4132 */
4133 _resetEventPlugins: function () {
4134 eventPluginOrder = null;
4135 for (var pluginName in namesToPlugins) {
4136 if (namesToPlugins.hasOwnProperty(pluginName)) {
4137 delete namesToPlugins[pluginName];
4138 }
4139 }
4140 EventPluginRegistry.plugins.length = 0;
4141
4142 var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
4143 for (var eventName in eventNameDispatchConfigs) {
4144 if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {
4145 delete eventNameDispatchConfigs[eventName];
4146 }
4147 }
4148
4149 var registrationNameModules = EventPluginRegistry.registrationNameModules;
4150 for (var registrationName in registrationNameModules) {
4151 if (registrationNameModules.hasOwnProperty(registrationName)) {
4152 delete registrationNameModules[registrationName];
4153 }
4154 }
4155
4156 if (process.env.NODE_ENV !== 'production') {
4157 var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;
4158 for (var lowerCasedName in possibleRegistrationNames) {
4159 if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {
4160 delete possibleRegistrationNames[lowerCasedName];
4161 }
4162 }
4163 }
4164 }
4165};
4166
4167module.exports = EventPluginRegistry;
4168
4169/***/ }),
4170/* 31 */
4171/***/ (function(module, exports, __webpack_require__) {
4172
4173"use strict";
4174/**
4175 * Copyright (c) 2013-present, Facebook, Inc.
4176 *
4177 * This source code is licensed under the MIT license found in the
4178 * LICENSE file in the root directory of this source tree.
4179 *
4180 */
4181
4182
4183
4184var _prodInvariant = __webpack_require__(2);
4185
4186var ReactErrorUtils = __webpack_require__(36);
4187
4188var invariant = __webpack_require__(0);
4189var warning = __webpack_require__(1);
4190
4191/**
4192 * Injected dependencies:
4193 */
4194
4195/**
4196 * - `ComponentTree`: [required] Module that can convert between React instances
4197 * and actual node references.
4198 */
4199var ComponentTree;
4200var TreeTraversal;
4201var injection = {
4202 injectComponentTree: function (Injected) {
4203 ComponentTree = Injected;
4204 if (process.env.NODE_ENV !== 'production') {
4205 process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
4206 }
4207 },
4208 injectTreeTraversal: function (Injected) {
4209 TreeTraversal = Injected;
4210 if (process.env.NODE_ENV !== 'production') {
4211 process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0;
4212 }
4213 }
4214};
4215
4216function isEndish(topLevelType) {
4217 return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel';
4218}
4219
4220function isMoveish(topLevelType) {
4221 return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove';
4222}
4223function isStartish(topLevelType) {
4224 return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';
4225}
4226
4227var validateEventDispatches;
4228if (process.env.NODE_ENV !== 'production') {
4229 validateEventDispatches = function (event) {
4230 var dispatchListeners = event._dispatchListeners;
4231 var dispatchInstances = event._dispatchInstances;
4232
4233 var listenersIsArr = Array.isArray(dispatchListeners);
4234 var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
4235
4236 var instancesIsArr = Array.isArray(dispatchInstances);
4237 var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
4238
4239 process.env.NODE_ENV !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0;
4240 };
4241}
4242
4243/**
4244 * Dispatch the event to the listener.
4245 * @param {SyntheticEvent} event SyntheticEvent to handle
4246 * @param {boolean} simulated If the event is simulated (changes exn behavior)
4247 * @param {function} listener Application-level callback
4248 * @param {*} inst Internal component instance
4249 */
4250function executeDispatch(event, simulated, listener, inst) {
4251 var type = event.type || 'unknown-event';
4252 event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
4253 if (simulated) {
4254 ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);
4255 } else {
4256 ReactErrorUtils.invokeGuardedCallback(type, listener, event);
4257 }
4258 event.currentTarget = null;
4259}
4260
4261/**
4262 * Standard/simple iteration through an event's collected dispatches.
4263 */
4264function executeDispatchesInOrder(event, simulated) {
4265 var dispatchListeners = event._dispatchListeners;
4266 var dispatchInstances = event._dispatchInstances;
4267 if (process.env.NODE_ENV !== 'production') {
4268 validateEventDispatches(event);
4269 }
4270 if (Array.isArray(dispatchListeners)) {
4271 for (var i = 0; i < dispatchListeners.length; i++) {
4272 if (event.isPropagationStopped()) {
4273 break;
4274 }
4275 // Listeners and Instances are two parallel arrays that are always in sync.
4276 executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
4277 }
4278 } else if (dispatchListeners) {
4279 executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
4280 }
4281 event._dispatchListeners = null;
4282 event._dispatchInstances = null;
4283}
4284
4285/**
4286 * Standard/simple iteration through an event's collected dispatches, but stops
4287 * at the first dispatch execution returning true, and returns that id.
4288 *
4289 * @return {?string} id of the first dispatch execution who's listener returns
4290 * true, or null if no listener returned true.
4291 */
4292function executeDispatchesInOrderStopAtTrueImpl(event) {
4293 var dispatchListeners = event._dispatchListeners;
4294 var dispatchInstances = event._dispatchInstances;
4295 if (process.env.NODE_ENV !== 'production') {
4296 validateEventDispatches(event);
4297 }
4298 if (Array.isArray(dispatchListeners)) {
4299 for (var i = 0; i < dispatchListeners.length; i++) {
4300 if (event.isPropagationStopped()) {
4301 break;
4302 }
4303 // Listeners and Instances are two parallel arrays that are always in sync.
4304 if (dispatchListeners[i](event, dispatchInstances[i])) {
4305 return dispatchInstances[i];
4306 }
4307 }
4308 } else if (dispatchListeners) {
4309 if (dispatchListeners(event, dispatchInstances)) {
4310 return dispatchInstances;
4311 }
4312 }
4313 return null;
4314}
4315
4316/**
4317 * @see executeDispatchesInOrderStopAtTrueImpl
4318 */
4319function executeDispatchesInOrderStopAtTrue(event) {
4320 var ret = executeDispatchesInOrderStopAtTrueImpl(event);
4321 event._dispatchInstances = null;
4322 event._dispatchListeners = null;
4323 return ret;
4324}
4325
4326/**
4327 * Execution of a "direct" dispatch - there must be at most one dispatch
4328 * accumulated on the event or it is considered an error. It doesn't really make
4329 * sense for an event with multiple dispatches (bubbled) to keep track of the
4330 * return values at each dispatch execution, but it does tend to make sense when
4331 * dealing with "direct" dispatches.
4332 *
4333 * @return {*} The return value of executing the single dispatch.
4334 */
4335function executeDirectDispatch(event) {
4336 if (process.env.NODE_ENV !== 'production') {
4337 validateEventDispatches(event);
4338 }
4339 var dispatchListener = event._dispatchListeners;
4340 var dispatchInstance = event._dispatchInstances;
4341 !!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0;
4342 event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
4343 var res = dispatchListener ? dispatchListener(event) : null;
4344 event.currentTarget = null;
4345 event._dispatchListeners = null;
4346 event._dispatchInstances = null;
4347 return res;
4348}
4349
4350/**
4351 * @param {SyntheticEvent} event
4352 * @return {boolean} True iff number of dispatches accumulated is greater than 0.
4353 */
4354function hasDispatches(event) {
4355 return !!event._dispatchListeners;
4356}
4357
4358/**
4359 * General utilities that are useful in creating custom Event Plugins.
4360 */
4361var EventPluginUtils = {
4362 isEndish: isEndish,
4363 isMoveish: isMoveish,
4364 isStartish: isStartish,
4365
4366 executeDirectDispatch: executeDirectDispatch,
4367 executeDispatchesInOrder: executeDispatchesInOrder,
4368 executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
4369 hasDispatches: hasDispatches,
4370
4371 getInstanceFromNode: function (node) {
4372 return ComponentTree.getInstanceFromNode(node);
4373 },
4374 getNodeFromInstance: function (node) {
4375 return ComponentTree.getNodeFromInstance(node);
4376 },
4377 isAncestor: function (a, b) {
4378 return TreeTraversal.isAncestor(a, b);
4379 },
4380 getLowestCommonAncestor: function (a, b) {
4381 return TreeTraversal.getLowestCommonAncestor(a, b);
4382 },
4383 getParentInstance: function (inst) {
4384 return TreeTraversal.getParentInstance(inst);
4385 },
4386 traverseTwoPhase: function (target, fn, arg) {
4387 return TreeTraversal.traverseTwoPhase(target, fn, arg);
4388 },
4389 traverseEnterLeave: function (from, to, fn, argFrom, argTo) {
4390 return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);
4391 },
4392
4393 injection: injection
4394};
4395
4396module.exports = EventPluginUtils;
4397
4398/***/ }),
4399/* 32 */
4400/***/ (function(module, exports, __webpack_require__) {
4401
4402"use strict";
4403/**
4404 * Copyright (c) 2013-present, Facebook, Inc.
4405 *
4406 * This source code is licensed under the MIT license found in the
4407 * LICENSE file in the root directory of this source tree.
4408 *
4409 *
4410 */
4411
4412
4413
4414/**
4415 * Escape and wrap key so it is safe to use as a reactid
4416 *
4417 * @param {string} key to be escaped.
4418 * @return {string} the escaped key.
4419 */
4420
4421function escape(key) {
4422 var escapeRegex = /[=:]/g;
4423 var escaperLookup = {
4424 '=': '=0',
4425 ':': '=2'
4426 };
4427 var escapedString = ('' + key).replace(escapeRegex, function (match) {
4428 return escaperLookup[match];
4429 });
4430
4431 return '$' + escapedString;
4432}
4433
4434/**
4435 * Unescape and unwrap key for human-readable display
4436 *
4437 * @param {string} key to unescape.
4438 * @return {string} the unescaped key.
4439 */
4440function unescape(key) {
4441 var unescapeRegex = /(=0|=2)/g;
4442 var unescaperLookup = {
4443 '=0': '=',
4444 '=2': ':'
4445 };
4446 var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
4447
4448 return ('' + keySubstring).replace(unescapeRegex, function (match) {
4449 return unescaperLookup[match];
4450 });
4451}
4452
4453var KeyEscapeUtils = {
4454 escape: escape,
4455 unescape: unescape
4456};
4457
4458module.exports = KeyEscapeUtils;
4459
4460/***/ }),
4461/* 33 */
4462/***/ (function(module, exports, __webpack_require__) {
4463
4464"use strict";
4465/**
4466 * Copyright (c) 2013-present, Facebook, Inc.
4467 *
4468 * This source code is licensed under the MIT license found in the
4469 * LICENSE file in the root directory of this source tree.
4470 *
4471 */
4472
4473
4474
4475var _prodInvariant = __webpack_require__(2);
4476
4477var ReactPropTypesSecret = __webpack_require__(62);
4478var propTypesFactory = __webpack_require__(51);
4479
4480var React = __webpack_require__(21);
4481var PropTypes = propTypesFactory(React.isValidElement);
4482
4483var invariant = __webpack_require__(0);
4484var warning = __webpack_require__(1);
4485
4486var hasReadOnlyValue = {
4487 button: true,
4488 checkbox: true,
4489 image: true,
4490 hidden: true,
4491 radio: true,
4492 reset: true,
4493 submit: true
4494};
4495
4496function _assertSingleLink(inputProps) {
4497 !(inputProps.checkedLink == null || inputProps.valueLink == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don\'t want to use valueLink and vice versa.') : _prodInvariant('87') : void 0;
4498}
4499function _assertValueLink(inputProps) {
4500 _assertSingleLink(inputProps);
4501 !(inputProps.value == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don\'t want to use valueLink.') : _prodInvariant('88') : void 0;
4502}
4503
4504function _assertCheckedLink(inputProps) {
4505 _assertSingleLink(inputProps);
4506 !(inputProps.checked == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don\'t want to use checkedLink') : _prodInvariant('89') : void 0;
4507}
4508
4509var propTypes = {
4510 value: function (props, propName, componentName) {
4511 if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
4512 return null;
4513 }
4514 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`.');
4515 },
4516 checked: function (props, propName, componentName) {
4517 if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
4518 return null;
4519 }
4520 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`.');
4521 },
4522 onChange: PropTypes.func
4523};
4524
4525var loggedTypeFailures = {};
4526function getDeclarationErrorAddendum(owner) {
4527 if (owner) {
4528 var name = owner.getName();
4529 if (name) {
4530 return ' Check the render method of `' + name + '`.';
4531 }
4532 }
4533 return '';
4534}
4535
4536/**
4537 * Provide a linked `value` attribute for controlled forms. You should not use
4538 * this outside of the ReactDOM controlled form components.
4539 */
4540var LinkedValueUtils = {
4541 checkPropTypes: function (tagName, props, owner) {
4542 for (var propName in propTypes) {
4543 if (propTypes.hasOwnProperty(propName)) {
4544 var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret);
4545 }
4546 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
4547 // Only monitor this failure once because there tends to be a lot of the
4548 // same error.
4549 loggedTypeFailures[error.message] = true;
4550
4551 var addendum = getDeclarationErrorAddendum(owner);
4552 process.env.NODE_ENV !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0;
4553 }
4554 }
4555 },
4556
4557 /**
4558 * @param {object} inputProps Props for form component
4559 * @return {*} current value of the input either from value prop or link.
4560 */
4561 getValue: function (inputProps) {
4562 if (inputProps.valueLink) {
4563 _assertValueLink(inputProps);
4564 return inputProps.valueLink.value;
4565 }
4566 return inputProps.value;
4567 },
4568
4569 /**
4570 * @param {object} inputProps Props for form component
4571 * @return {*} current checked status of the input either from checked prop
4572 * or link.
4573 */
4574 getChecked: function (inputProps) {
4575 if (inputProps.checkedLink) {
4576 _assertCheckedLink(inputProps);
4577 return inputProps.checkedLink.value;
4578 }
4579 return inputProps.checked;
4580 },
4581
4582 /**
4583 * @param {object} inputProps Props for form component
4584 * @param {SyntheticEvent} event change event to handle
4585 */
4586 executeOnChange: function (inputProps, event) {
4587 if (inputProps.valueLink) {
4588 _assertValueLink(inputProps);
4589 return inputProps.valueLink.requestChange(event.target.value);
4590 } else if (inputProps.checkedLink) {
4591 _assertCheckedLink(inputProps);
4592 return inputProps.checkedLink.requestChange(event.target.checked);
4593 } else if (inputProps.onChange) {
4594 return inputProps.onChange.call(undefined, event);
4595 }
4596 }
4597};
4598
4599module.exports = LinkedValueUtils;
4600
4601/***/ }),
4602/* 34 */
4603/***/ (function(module, exports, __webpack_require__) {
4604
4605"use strict";
4606/**
4607 * Copyright (c) 2013-present, Facebook, Inc.
4608 *
4609 * This source code is licensed under the MIT license found in the
4610 * LICENSE file in the root directory of this source tree.
4611 *
4612 */
4613
4614
4615
4616var _assign = __webpack_require__(3);
4617
4618var EventPluginRegistry = __webpack_require__(30);
4619var ReactEventEmitterMixin = __webpack_require__(148);
4620var ViewportMetrics = __webpack_require__(65);
4621
4622var getVendorPrefixedEventName = __webpack_require__(185);
4623var isEventSupported = __webpack_require__(42);
4624
4625/**
4626 * Summary of `ReactBrowserEventEmitter` event handling:
4627 *
4628 * - Top-level delegation is used to trap most native browser events. This
4629 * may only occur in the main thread and is the responsibility of
4630 * ReactEventListener, which is injected and can therefore support pluggable
4631 * event sources. This is the only work that occurs in the main thread.
4632 *
4633 * - We normalize and de-duplicate events to account for browser quirks. This
4634 * may be done in the worker thread.
4635 *
4636 * - Forward these native events (with the associated top-level type used to
4637 * trap it) to `EventPluginHub`, which in turn will ask plugins if they want
4638 * to extract any synthetic events.
4639 *
4640 * - The `EventPluginHub` will then process each event by annotating them with
4641 * "dispatches", a sequence of listeners and IDs that care about that event.
4642 *
4643 * - The `EventPluginHub` then dispatches the events.
4644 *
4645 * Overview of React and the event system:
4646 *
4647 * +------------+ .
4648 * | DOM | .
4649 * +------------+ .
4650 * | .
4651 * v .
4652 * +------------+ .
4653 * | ReactEvent | .
4654 * | Listener | .
4655 * +------------+ . +-----------+
4656 * | . +--------+|SimpleEvent|
4657 * | . | |Plugin |
4658 * +-----|------+ . v +-----------+
4659 * | | | . +--------------+ +------------+
4660 * | +-----------.--->|EventPluginHub| | Event |
4661 * | | . | | +-----------+ | Propagators|
4662 * | ReactEvent | . | | |TapEvent | |------------|
4663 * | Emitter | . | |<---+|Plugin | |other plugin|
4664 * | | . | | +-----------+ | utilities |
4665 * | +-----------.--->| | +------------+
4666 * | | | . +--------------+
4667 * +-----|------+ . ^ +-----------+
4668 * | . | |Enter/Leave|
4669 * + . +-------+|Plugin |
4670 * +-------------+ . +-----------+
4671 * | application | .
4672 * |-------------| .
4673 * | | .
4674 * | | .
4675 * +-------------+ .
4676 * .
4677 * React Core . General Purpose Event Plugin System
4678 */
4679
4680var hasEventPageXY;
4681var alreadyListeningTo = {};
4682var isMonitoringScrollValue = false;
4683var reactTopListenersCounter = 0;
4684
4685// For events like 'submit' which don't consistently bubble (which we trap at a
4686// lower node than `document`), binding at `document` would cause duplicate
4687// events so we don't include them here
4688var topEventMapping = {
4689 topAbort: 'abort',
4690 topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
4691 topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',
4692 topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',
4693 topBlur: 'blur',
4694 topCanPlay: 'canplay',
4695 topCanPlayThrough: 'canplaythrough',
4696 topChange: 'change',
4697 topClick: 'click',
4698 topCompositionEnd: 'compositionend',
4699 topCompositionStart: 'compositionstart',
4700 topCompositionUpdate: 'compositionupdate',
4701 topContextMenu: 'contextmenu',
4702 topCopy: 'copy',
4703 topCut: 'cut',
4704 topDoubleClick: 'dblclick',
4705 topDrag: 'drag',
4706 topDragEnd: 'dragend',
4707 topDragEnter: 'dragenter',
4708 topDragExit: 'dragexit',
4709 topDragLeave: 'dragleave',
4710 topDragOver: 'dragover',
4711 topDragStart: 'dragstart',
4712 topDrop: 'drop',
4713 topDurationChange: 'durationchange',
4714 topEmptied: 'emptied',
4715 topEncrypted: 'encrypted',
4716 topEnded: 'ended',
4717 topError: 'error',
4718 topFocus: 'focus',
4719 topInput: 'input',
4720 topKeyDown: 'keydown',
4721 topKeyPress: 'keypress',
4722 topKeyUp: 'keyup',
4723 topLoadedData: 'loadeddata',
4724 topLoadedMetadata: 'loadedmetadata',
4725 topLoadStart: 'loadstart',
4726 topMouseDown: 'mousedown',
4727 topMouseMove: 'mousemove',
4728 topMouseOut: 'mouseout',
4729 topMouseOver: 'mouseover',
4730 topMouseUp: 'mouseup',
4731 topPaste: 'paste',
4732 topPause: 'pause',
4733 topPlay: 'play',
4734 topPlaying: 'playing',
4735 topProgress: 'progress',
4736 topRateChange: 'ratechange',
4737 topScroll: 'scroll',
4738 topSeeked: 'seeked',
4739 topSeeking: 'seeking',
4740 topSelectionChange: 'selectionchange',
4741 topStalled: 'stalled',
4742 topSuspend: 'suspend',
4743 topTextInput: 'textInput',
4744 topTimeUpdate: 'timeupdate',
4745 topTouchCancel: 'touchcancel',
4746 topTouchEnd: 'touchend',
4747 topTouchMove: 'touchmove',
4748 topTouchStart: 'touchstart',
4749 topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',
4750 topVolumeChange: 'volumechange',
4751 topWaiting: 'waiting',
4752 topWheel: 'wheel'
4753};
4754
4755/**
4756 * To ensure no conflicts with other potential React instances on the page
4757 */
4758var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);
4759
4760function getListeningForDocument(mountAt) {
4761 // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
4762 // directly.
4763 if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
4764 mountAt[topListenersIDKey] = reactTopListenersCounter++;
4765 alreadyListeningTo[mountAt[topListenersIDKey]] = {};
4766 }
4767 return alreadyListeningTo[mountAt[topListenersIDKey]];
4768}
4769
4770/**
4771 * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For
4772 * example:
4773 *
4774 * EventPluginHub.putListener('myID', 'onClick', myFunction);
4775 *
4776 * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'.
4777 *
4778 * @internal
4779 */
4780var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
4781 /**
4782 * Injectable event backend
4783 */
4784 ReactEventListener: null,
4785
4786 injection: {
4787 /**
4788 * @param {object} ReactEventListener
4789 */
4790 injectReactEventListener: function (ReactEventListener) {
4791 ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);
4792 ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
4793 }
4794 },
4795
4796 /**
4797 * Sets whether or not any created callbacks should be enabled.
4798 *
4799 * @param {boolean} enabled True if callbacks should be enabled.
4800 */
4801 setEnabled: function (enabled) {
4802 if (ReactBrowserEventEmitter.ReactEventListener) {
4803 ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
4804 }
4805 },
4806
4807 /**
4808 * @return {boolean} True if callbacks are enabled.
4809 */
4810 isEnabled: function () {
4811 return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());
4812 },
4813
4814 /**
4815 * We listen for bubbled touch events on the document object.
4816 *
4817 * Firefox v8.01 (and possibly others) exhibited strange behavior when
4818 * mounting `onmousemove` events at some node that was not the document
4819 * element. The symptoms were that if your mouse is not moving over something
4820 * contained within that mount point (for example on the background) the
4821 * top-level listeners for `onmousemove` won't be called. However, if you
4822 * register the `mousemove` on the document object, then it will of course
4823 * catch all `mousemove`s. This along with iOS quirks, justifies restricting
4824 * top-level listeners to the document object only, at least for these
4825 * movement types of events and possibly all events.
4826 *
4827 * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
4828 *
4829 * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
4830 * they bubble to document.
4831 *
4832 * @param {string} registrationName Name of listener (e.g. `onClick`).
4833 * @param {object} contentDocumentHandle Document which owns the container
4834 */
4835 listenTo: function (registrationName, contentDocumentHandle) {
4836 var mountAt = contentDocumentHandle;
4837 var isListening = getListeningForDocument(mountAt);
4838 var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
4839
4840 for (var i = 0; i < dependencies.length; i++) {
4841 var dependency = dependencies[i];
4842 if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
4843 if (dependency === 'topWheel') {
4844 if (isEventSupported('wheel')) {
4845 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt);
4846 } else if (isEventSupported('mousewheel')) {
4847 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt);
4848 } else {
4849 // Firefox needs to capture a different mouse scroll event.
4850 // @see http://www.quirksmode.org/dom/events/tests/scroll.html
4851 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
4852 }
4853 } else if (dependency === 'topScroll') {
4854 if (isEventSupported('scroll', true)) {
4855 ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);
4856 } else {
4857 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
4858 }
4859 } else if (dependency === 'topFocus' || dependency === 'topBlur') {
4860 if (isEventSupported('focus', true)) {
4861 ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);
4862 ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);
4863 } else if (isEventSupported('focusin')) {
4864 // IE has `focusin` and `focusout` events which bubble.
4865 // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html
4866 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt);
4867 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt);
4868 }
4869
4870 // to make sure blur and focus event listeners are only attached once
4871 isListening.topBlur = true;
4872 isListening.topFocus = true;
4873 } else if (topEventMapping.hasOwnProperty(dependency)) {
4874 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
4875 }
4876
4877 isListening[dependency] = true;
4878 }
4879 }
4880 },
4881
4882 trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
4883 return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
4884 },
4885
4886 trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
4887 return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
4888 },
4889
4890 /**
4891 * Protect against document.createEvent() returning null
4892 * Some popup blocker extensions appear to do this:
4893 * https://github.com/facebook/react/issues/6887
4894 */
4895 supportsEventPageXY: function () {
4896 if (!document.createEvent) {
4897 return false;
4898 }
4899 var ev = document.createEvent('MouseEvent');
4900 return ev != null && 'pageX' in ev;
4901 },
4902
4903 /**
4904 * Listens to window scroll and resize events. We cache scroll values so that
4905 * application code can access them without triggering reflows.
4906 *
4907 * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when
4908 * pageX/pageY isn't supported (legacy browsers).
4909 *
4910 * NOTE: Scroll events do not bubble.
4911 *
4912 * @see http://www.quirksmode.org/dom/events/scroll.html
4913 */
4914 ensureScrollValueMonitoring: function () {
4915 if (hasEventPageXY === undefined) {
4916 hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
4917 }
4918 if (!hasEventPageXY && !isMonitoringScrollValue) {
4919 var refresh = ViewportMetrics.refreshScrollValues;
4920 ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
4921 isMonitoringScrollValue = true;
4922 }
4923 }
4924});
4925
4926module.exports = ReactBrowserEventEmitter;
4927
4928/***/ }),
4929/* 35 */
4930/***/ (function(module, exports, __webpack_require__) {
4931
4932"use strict";
4933/**
4934 * Copyright (c) 2014-present, Facebook, Inc.
4935 *
4936 * This source code is licensed under the MIT license found in the
4937 * LICENSE file in the root directory of this source tree.
4938 *
4939 *
4940 */
4941
4942
4943
4944var _prodInvariant = __webpack_require__(2);
4945
4946var invariant = __webpack_require__(0);
4947
4948var injected = false;
4949
4950var ReactComponentEnvironment = {
4951 /**
4952 * Optionally injectable hook for swapping out mount images in the middle of
4953 * the tree.
4954 */
4955 replaceNodeWithMarkup: null,
4956
4957 /**
4958 * Optionally injectable hook for processing a queue of child updates. Will
4959 * later move into MultiChildComponents.
4960 */
4961 processChildrenUpdates: null,
4962
4963 injection: {
4964 injectEnvironment: function (environment) {
4965 !!injected ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0;
4966 ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;
4967 ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;
4968 injected = true;
4969 }
4970 }
4971};
4972
4973module.exports = ReactComponentEnvironment;
4974
4975/***/ }),
4976/* 36 */
4977/***/ (function(module, exports, __webpack_require__) {
4978
4979"use strict";
4980/**
4981 * Copyright (c) 2013-present, Facebook, Inc.
4982 *
4983 * This source code is licensed under the MIT license found in the
4984 * LICENSE file in the root directory of this source tree.
4985 *
4986 *
4987 */
4988
4989
4990
4991var caughtError = null;
4992
4993/**
4994 * Call a function while guarding against errors that happens within it.
4995 *
4996 * @param {String} name of the guard to use for logging or debugging
4997 * @param {Function} func The function to invoke
4998 * @param {*} a First argument
4999 * @param {*} b Second argument
5000 */
5001function invokeGuardedCallback(name, func, a) {
5002 try {
5003 func(a);
5004 } catch (x) {
5005 if (caughtError === null) {
5006 caughtError = x;
5007 }
5008 }
5009}
5010
5011var ReactErrorUtils = {
5012 invokeGuardedCallback: invokeGuardedCallback,
5013
5014 /**
5015 * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event
5016 * handler are sure to be rethrown by rethrowCaughtError.
5017 */
5018 invokeGuardedCallbackWithCatch: invokeGuardedCallback,
5019
5020 /**
5021 * During execution of guarded functions we will capture the first error which
5022 * we will rethrow to be handled by the top level error handler.
5023 */
5024 rethrowCaughtError: function () {
5025 if (caughtError) {
5026 var error = caughtError;
5027 caughtError = null;
5028 throw error;
5029 }
5030 }
5031};
5032
5033if (process.env.NODE_ENV !== 'production') {
5034 /**
5035 * To help development we can get better devtools integration by simulating a
5036 * real browser event.
5037 */
5038 if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
5039 var fakeNode = document.createElement('react');
5040 ReactErrorUtils.invokeGuardedCallback = function (name, func, a) {
5041 var boundFunc = function () {
5042 func(a);
5043 };
5044 var evtType = 'react-' + name;
5045 fakeNode.addEventListener(evtType, boundFunc, false);
5046 var evt = document.createEvent('Event');
5047 evt.initEvent(evtType, false, false);
5048 fakeNode.dispatchEvent(evt);
5049 fakeNode.removeEventListener(evtType, boundFunc, false);
5050 };
5051 }
5052}
5053
5054module.exports = ReactErrorUtils;
5055
5056/***/ }),
5057/* 37 */
5058/***/ (function(module, exports, __webpack_require__) {
5059
5060"use strict";
5061/**
5062 * Copyright (c) 2013-present, Facebook, Inc.
5063 *
5064 * This source code is licensed under the MIT license found in the
5065 * LICENSE file in the root directory of this source tree.
5066 *
5067 */
5068
5069
5070
5071/**
5072 * `ReactInstanceMap` maintains a mapping from a public facing stateful
5073 * instance (key) and the internal representation (value). This allows public
5074 * methods to accept the user facing instance as an argument and map them back
5075 * to internal methods.
5076 */
5077
5078// TODO: Replace this with ES6: var ReactInstanceMap = new Map();
5079
5080var ReactInstanceMap = {
5081 /**
5082 * This API should be called `delete` but we'd have to make sure to always
5083 * transform these to strings for IE support. When this transform is fully
5084 * supported we can rename it.
5085 */
5086 remove: function (key) {
5087 key._reactInternalInstance = undefined;
5088 },
5089
5090 get: function (key) {
5091 return key._reactInternalInstance;
5092 },
5093
5094 has: function (key) {
5095 return key._reactInternalInstance !== undefined;
5096 },
5097
5098 set: function (key, value) {
5099 key._reactInternalInstance = value;
5100 }
5101};
5102
5103module.exports = ReactInstanceMap;
5104
5105/***/ }),
5106/* 38 */
5107/***/ (function(module, exports, __webpack_require__) {
5108
5109"use strict";
5110/**
5111 * Copyright (c) 2013-present, Facebook, Inc.
5112 *
5113 * This source code is licensed under the MIT license found in the
5114 * LICENSE file in the root directory of this source tree.
5115 *
5116 */
5117
5118/* globals MSApp */
5119
5120
5121
5122/**
5123 * Create a function which has 'unsafe' privileges (required by windows8 apps)
5124 */
5125
5126var createMicrosoftUnsafeLocalFunction = function (func) {
5127 if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
5128 return function (arg0, arg1, arg2, arg3) {
5129 MSApp.execUnsafeLocalFunction(function () {
5130 return func(arg0, arg1, arg2, arg3);
5131 });
5132 };
5133 } else {
5134 return func;
5135 }
5136};
5137
5138module.exports = createMicrosoftUnsafeLocalFunction;
5139
5140/***/ }),
5141/* 39 */
5142/***/ (function(module, exports, __webpack_require__) {
5143
5144"use strict";
5145/**
5146 * Copyright (c) 2013-present, Facebook, Inc.
5147 *
5148 * This source code is licensed under the MIT license found in the
5149 * LICENSE file in the root directory of this source tree.
5150 *
5151 */
5152
5153
5154
5155/**
5156 * `charCode` represents the actual "character code" and is safe to use with
5157 * `String.fromCharCode`. As such, only keys that correspond to printable
5158 * characters produce a valid `charCode`, the only exception to this is Enter.
5159 * The Tab-key is considered non-printable and does not have a `charCode`,
5160 * presumably because it does not produce a tab-character in browsers.
5161 *
5162 * @param {object} nativeEvent Native browser event.
5163 * @return {number} Normalized `charCode` property.
5164 */
5165
5166function getEventCharCode(nativeEvent) {
5167 var charCode;
5168 var keyCode = nativeEvent.keyCode;
5169
5170 if ('charCode' in nativeEvent) {
5171 charCode = nativeEvent.charCode;
5172
5173 // FF does not set `charCode` for the Enter-key, check against `keyCode`.
5174 if (charCode === 0 && keyCode === 13) {
5175 charCode = 13;
5176 }
5177 } else {
5178 // IE8 does not implement `charCode`, but `keyCode` has the correct value.
5179 charCode = keyCode;
5180 }
5181
5182 // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
5183 // Must not discard the (non-)printable Enter-key.
5184 if (charCode >= 32 || charCode === 13) {
5185 return charCode;
5186 }
5187
5188 return 0;
5189}
5190
5191module.exports = getEventCharCode;
5192
5193/***/ }),
5194/* 40 */
5195/***/ (function(module, exports, __webpack_require__) {
5196
5197"use strict";
5198/**
5199 * Copyright (c) 2013-present, Facebook, Inc.
5200 *
5201 * This source code is licensed under the MIT license found in the
5202 * LICENSE file in the root directory of this source tree.
5203 *
5204 */
5205
5206
5207
5208/**
5209 * Translation from modifier key to the associated property in the event.
5210 * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
5211 */
5212
5213var modifierKeyToProp = {
5214 Alt: 'altKey',
5215 Control: 'ctrlKey',
5216 Meta: 'metaKey',
5217 Shift: 'shiftKey'
5218};
5219
5220// IE8 does not implement getModifierState so we simply map it to the only
5221// modifier keys exposed by the event itself, does not support Lock-keys.
5222// Currently, all major browsers except Chrome seems to support Lock-keys.
5223function modifierStateGetter(keyArg) {
5224 var syntheticEvent = this;
5225 var nativeEvent = syntheticEvent.nativeEvent;
5226 if (nativeEvent.getModifierState) {
5227 return nativeEvent.getModifierState(keyArg);
5228 }
5229 var keyProp = modifierKeyToProp[keyArg];
5230 return keyProp ? !!nativeEvent[keyProp] : false;
5231}
5232
5233function getEventModifierState(nativeEvent) {
5234 return modifierStateGetter;
5235}
5236
5237module.exports = getEventModifierState;
5238
5239/***/ }),
5240/* 41 */
5241/***/ (function(module, exports, __webpack_require__) {
5242
5243"use strict";
5244/**
5245 * Copyright (c) 2013-present, Facebook, Inc.
5246 *
5247 * This source code is licensed under the MIT license found in the
5248 * LICENSE file in the root directory of this source tree.
5249 *
5250 */
5251
5252
5253
5254/**
5255 * Gets the target node from a native browser event by accounting for
5256 * inconsistencies in browser DOM APIs.
5257 *
5258 * @param {object} nativeEvent Native browser event.
5259 * @return {DOMEventTarget} Target node.
5260 */
5261
5262function getEventTarget(nativeEvent) {
5263 var target = nativeEvent.target || nativeEvent.srcElement || window;
5264
5265 // Normalize SVG <use> element events #4963
5266 if (target.correspondingUseElement) {
5267 target = target.correspondingUseElement;
5268 }
5269
5270 // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
5271 // @see http://www.quirksmode.org/js/events_properties.html
5272 return target.nodeType === 3 ? target.parentNode : target;
5273}
5274
5275module.exports = getEventTarget;
5276
5277/***/ }),
5278/* 42 */
5279/***/ (function(module, exports, __webpack_require__) {
5280
5281"use strict";
5282/**
5283 * Copyright (c) 2013-present, Facebook, Inc.
5284 *
5285 * This source code is licensed under the MIT license found in the
5286 * LICENSE file in the root directory of this source tree.
5287 *
5288 */
5289
5290
5291
5292var ExecutionEnvironment = __webpack_require__(5);
5293
5294var useHasFeature;
5295if (ExecutionEnvironment.canUseDOM) {
5296 useHasFeature = document.implementation && document.implementation.hasFeature &&
5297 // always returns true in newer browsers as per the standard.
5298 // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
5299 document.implementation.hasFeature('', '') !== true;
5300}
5301
5302/**
5303 * Checks if an event is supported in the current execution environment.
5304 *
5305 * NOTE: This will not work correctly for non-generic events such as `change`,
5306 * `reset`, `load`, `error`, and `select`.
5307 *
5308 * Borrows from Modernizr.
5309 *
5310 * @param {string} eventNameSuffix Event name, e.g. "click".
5311 * @param {?boolean} capture Check if the capture phase is supported.
5312 * @return {boolean} True if the event is supported.
5313 * @internal
5314 * @license Modernizr 3.0.0pre (Custom Build) | MIT
5315 */
5316function isEventSupported(eventNameSuffix, capture) {
5317 if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) {
5318 return false;
5319 }
5320
5321 var eventName = 'on' + eventNameSuffix;
5322 var isSupported = eventName in document;
5323
5324 if (!isSupported) {
5325 var element = document.createElement('div');
5326 element.setAttribute(eventName, 'return;');
5327 isSupported = typeof element[eventName] === 'function';
5328 }
5329
5330 if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
5331 // This is the only way to test support for the `wheel` event in IE9+.
5332 isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
5333 }
5334
5335 return isSupported;
5336}
5337
5338module.exports = isEventSupported;
5339
5340/***/ }),
5341/* 43 */
5342/***/ (function(module, exports, __webpack_require__) {
5343
5344"use strict";
5345/**
5346 * Copyright (c) 2013-present, Facebook, Inc.
5347 *
5348 * This source code is licensed under the MIT license found in the
5349 * LICENSE file in the root directory of this source tree.
5350 *
5351 */
5352
5353
5354
5355var ExecutionEnvironment = __webpack_require__(5);
5356var DOMNamespaces = __webpack_require__(29);
5357
5358var WHITESPACE_TEST = /^[ \r\n\t\f]/;
5359var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;
5360
5361var createMicrosoftUnsafeLocalFunction = __webpack_require__(38);
5362
5363// SVG temp container for IE lacking innerHTML
5364var reusableSVGContainer;
5365
5366/**
5367 * Set the innerHTML property of a node, ensuring that whitespace is preserved
5368 * even in IE8.
5369 *
5370 * @param {DOMElement} node
5371 * @param {string} html
5372 * @internal
5373 */
5374var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
5375 // IE does not have innerHTML for SVG nodes, so instead we inject the
5376 // new markup in a temp node and then move the child nodes across into
5377 // the target node
5378 if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {
5379 reusableSVGContainer = reusableSVGContainer || document.createElement('div');
5380 reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';
5381 var svgNode = reusableSVGContainer.firstChild;
5382 while (svgNode.firstChild) {
5383 node.appendChild(svgNode.firstChild);
5384 }
5385 } else {
5386 node.innerHTML = html;
5387 }
5388});
5389
5390if (ExecutionEnvironment.canUseDOM) {
5391 // IE8: When updating a just created node with innerHTML only leading
5392 // whitespace is removed. When updating an existing node with innerHTML
5393 // whitespace in root TextNodes is also collapsed.
5394 // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html
5395
5396 // Feature detection; only IE8 is known to behave improperly like this.
5397 var testElement = document.createElement('div');
5398 testElement.innerHTML = ' ';
5399 if (testElement.innerHTML === '') {
5400 setInnerHTML = function (node, html) {
5401 // Magic theory: IE8 supposedly differentiates between added and updated
5402 // nodes when processing innerHTML, innerHTML on updated nodes suffers
5403 // from worse whitespace behavior. Re-adding a node like this triggers
5404 // the initial and more favorable whitespace behavior.
5405 // TODO: What to do on a detached node?
5406 if (node.parentNode) {
5407 node.parentNode.replaceChild(node, node);
5408 }
5409
5410 // We also implement a workaround for non-visible tags disappearing into
5411 // thin air on IE8, this only happens if there is no visible text
5412 // in-front of the non-visible tags. Piggyback on the whitespace fix
5413 // and simply check if any non-visible tags appear in the source.
5414 if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) {
5415 // Recover leading whitespace by temporarily prepending any character.
5416 // \uFEFF has the potential advantage of being zero-width/invisible.
5417 // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode
5418 // in hopes that this is preserved even if "\uFEFF" is transformed to
5419 // the actual Unicode character (by Babel, for example).
5420 // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216
5421 node.innerHTML = String.fromCharCode(0xfeff) + html;
5422
5423 // deleteData leaves an empty `TextNode` which offsets the index of all
5424 // children. Definitely want to avoid this.
5425 var textNode = node.firstChild;
5426 if (textNode.data.length === 1) {
5427 node.removeChild(textNode);
5428 } else {
5429 textNode.deleteData(0, 1);
5430 }
5431 } else {
5432 node.innerHTML = html;
5433 }
5434 };
5435 }
5436 testElement = null;
5437}
5438
5439module.exports = setInnerHTML;
5440
5441/***/ }),
5442/* 44 */
5443/***/ (function(module, exports, __webpack_require__) {
5444
5445"use strict";
5446/**
5447 * Copyright (c) 2015-present, Facebook, Inc.
5448 *
5449 * This source code is licensed under the MIT license found in the
5450 * LICENSE file in the root directory of this source tree.
5451 *
5452 */
5453
5454
5455
5456var _assign = __webpack_require__(3);
5457
5458var emptyFunction = __webpack_require__(7);
5459var warning = __webpack_require__(1);
5460
5461var validateDOMNesting = emptyFunction;
5462
5463if (process.env.NODE_ENV !== 'production') {
5464 // This validation code was written based on the HTML5 parsing spec:
5465 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
5466 //
5467 // Note: this does not catch all invalid nesting, nor does it try to (as it's
5468 // not clear what practical benefit doing so provides); instead, we warn only
5469 // for cases where the parser will give a parse tree differing from what React
5470 // intended. For example, <b><div></div></b> is invalid but we don't warn
5471 // because it still parses correctly; we do warn for other cases like nested
5472 // <p> tags where the beginning of the second element implicitly closes the
5473 // first, causing a confusing mess.
5474
5475 // https://html.spec.whatwg.org/multipage/syntax.html#special
5476 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'];
5477
5478 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
5479 var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template',
5480
5481 // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
5482 // TODO: Distinguish by namespace here -- for <title>, including it here
5483 // errs on the side of fewer warnings
5484 'foreignObject', 'desc', 'title'];
5485
5486 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
5487 var buttonScopeTags = inScopeTags.concat(['button']);
5488
5489 // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
5490 var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
5491
5492 var emptyAncestorInfo = {
5493 current: null,
5494
5495 formTag: null,
5496 aTagInScope: null,
5497 buttonTagInScope: null,
5498 nobrTagInScope: null,
5499 pTagInButtonScope: null,
5500
5501 listItemTagAutoclosing: null,
5502 dlItemTagAutoclosing: null
5503 };
5504
5505 var updatedAncestorInfo = function (oldInfo, tag, instance) {
5506 var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
5507 var info = { tag: tag, instance: instance };
5508
5509 if (inScopeTags.indexOf(tag) !== -1) {
5510 ancestorInfo.aTagInScope = null;
5511 ancestorInfo.buttonTagInScope = null;
5512 ancestorInfo.nobrTagInScope = null;
5513 }
5514 if (buttonScopeTags.indexOf(tag) !== -1) {
5515 ancestorInfo.pTagInButtonScope = null;
5516 }
5517
5518 // See rules for 'li', 'dd', 'dt' start tags in
5519 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
5520 if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
5521 ancestorInfo.listItemTagAutoclosing = null;
5522 ancestorInfo.dlItemTagAutoclosing = null;
5523 }
5524
5525 ancestorInfo.current = info;
5526
5527 if (tag === 'form') {
5528 ancestorInfo.formTag = info;
5529 }
5530 if (tag === 'a') {
5531 ancestorInfo.aTagInScope = info;
5532 }
5533 if (tag === 'button') {
5534 ancestorInfo.buttonTagInScope = info;
5535 }
5536 if (tag === 'nobr') {
5537 ancestorInfo.nobrTagInScope = info;
5538 }
5539 if (tag === 'p') {
5540 ancestorInfo.pTagInButtonScope = info;
5541 }
5542 if (tag === 'li') {
5543 ancestorInfo.listItemTagAutoclosing = info;
5544 }
5545 if (tag === 'dd' || tag === 'dt') {
5546 ancestorInfo.dlItemTagAutoclosing = info;
5547 }
5548
5549 return ancestorInfo;
5550 };
5551
5552 /**
5553 * Returns whether
5554 */
5555 var isTagValidWithParent = function (tag, parentTag) {
5556 // First, let's check if we're in an unusual parsing mode...
5557 switch (parentTag) {
5558 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
5559 case 'select':
5560 return tag === 'option' || tag === 'optgroup' || tag === '#text';
5561 case 'optgroup':
5562 return tag === 'option' || tag === '#text';
5563 // Strictly speaking, seeing an <option> doesn't mean we're in a <select>
5564 // but
5565 case 'option':
5566 return tag === '#text';
5567 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
5568 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
5569 // No special behavior since these rules fall back to "in body" mode for
5570 // all except special table nodes which cause bad parsing behavior anyway.
5571
5572 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
5573 case 'tr':
5574 return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
5575 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
5576 case 'tbody':
5577 case 'thead':
5578 case 'tfoot':
5579 return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
5580 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
5581 case 'colgroup':
5582 return tag === 'col' || tag === 'template';
5583 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
5584 case 'table':
5585 return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
5586 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
5587 case 'head':
5588 return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
5589 // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
5590 case 'html':
5591 return tag === 'head' || tag === 'body';
5592 case '#document':
5593 return tag === 'html';
5594 }
5595
5596 // Probably in the "in body" parsing mode, so we outlaw only tag combos
5597 // where the parsing rules cause implicit opens or closes to be added.
5598 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
5599 switch (tag) {
5600 case 'h1':
5601 case 'h2':
5602 case 'h3':
5603 case 'h4':
5604 case 'h5':
5605 case 'h6':
5606 return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
5607
5608 case 'rp':
5609 case 'rt':
5610 return impliedEndTags.indexOf(parentTag) === -1;
5611
5612 case 'body':
5613 case 'caption':
5614 case 'col':
5615 case 'colgroup':
5616 case 'frame':
5617 case 'head':
5618 case 'html':
5619 case 'tbody':
5620 case 'td':
5621 case 'tfoot':
5622 case 'th':
5623 case 'thead':
5624 case 'tr':
5625 // These tags are only valid with a few parents that have special child
5626 // parsing rules -- if we're down here, then none of those matched and
5627 // so we allow it only if we don't know what the parent is, as all other
5628 // cases are invalid.
5629 return parentTag == null;
5630 }
5631
5632 return true;
5633 };
5634
5635 /**
5636 * Returns whether
5637 */
5638 var findInvalidAncestorForTag = function (tag, ancestorInfo) {
5639 switch (tag) {
5640 case 'address':
5641 case 'article':
5642 case 'aside':
5643 case 'blockquote':
5644 case 'center':
5645 case 'details':
5646 case 'dialog':
5647 case 'dir':
5648 case 'div':
5649 case 'dl':
5650 case 'fieldset':
5651 case 'figcaption':
5652 case 'figure':
5653 case 'footer':
5654 case 'header':
5655 case 'hgroup':
5656 case 'main':
5657 case 'menu':
5658 case 'nav':
5659 case 'ol':
5660 case 'p':
5661 case 'section':
5662 case 'summary':
5663 case 'ul':
5664 case 'pre':
5665 case 'listing':
5666 case 'table':
5667 case 'hr':
5668 case 'xmp':
5669 case 'h1':
5670 case 'h2':
5671 case 'h3':
5672 case 'h4':
5673 case 'h5':
5674 case 'h6':
5675 return ancestorInfo.pTagInButtonScope;
5676
5677 case 'form':
5678 return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
5679
5680 case 'li':
5681 return ancestorInfo.listItemTagAutoclosing;
5682
5683 case 'dd':
5684 case 'dt':
5685 return ancestorInfo.dlItemTagAutoclosing;
5686
5687 case 'button':
5688 return ancestorInfo.buttonTagInScope;
5689
5690 case 'a':
5691 // Spec says something about storing a list of markers, but it sounds
5692 // equivalent to this check.
5693 return ancestorInfo.aTagInScope;
5694
5695 case 'nobr':
5696 return ancestorInfo.nobrTagInScope;
5697 }
5698
5699 return null;
5700 };
5701
5702 /**
5703 * Given a ReactCompositeComponent instance, return a list of its recursive
5704 * owners, starting at the root and ending with the instance itself.
5705 */
5706 var findOwnerStack = function (instance) {
5707 if (!instance) {
5708 return [];
5709 }
5710
5711 var stack = [];
5712 do {
5713 stack.push(instance);
5714 } while (instance = instance._currentElement._owner);
5715 stack.reverse();
5716 return stack;
5717 };
5718
5719 var didWarn = {};
5720
5721 validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) {
5722 ancestorInfo = ancestorInfo || emptyAncestorInfo;
5723 var parentInfo = ancestorInfo.current;
5724 var parentTag = parentInfo && parentInfo.tag;
5725
5726 if (childText != null) {
5727 process.env.NODE_ENV !== 'production' ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
5728 childTag = '#text';
5729 }
5730
5731 var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
5732 var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
5733 var problematic = invalidParent || invalidAncestor;
5734
5735 if (problematic) {
5736 var ancestorTag = problematic.tag;
5737 var ancestorInstance = problematic.instance;
5738
5739 var childOwner = childInstance && childInstance._currentElement._owner;
5740 var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner;
5741
5742 var childOwners = findOwnerStack(childOwner);
5743 var ancestorOwners = findOwnerStack(ancestorOwner);
5744
5745 var minStackLen = Math.min(childOwners.length, ancestorOwners.length);
5746 var i;
5747
5748 var deepestCommon = -1;
5749 for (i = 0; i < minStackLen; i++) {
5750 if (childOwners[i] === ancestorOwners[i]) {
5751 deepestCommon = i;
5752 } else {
5753 break;
5754 }
5755 }
5756
5757 var UNKNOWN = '(unknown)';
5758 var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) {
5759 return inst.getName() || UNKNOWN;
5760 });
5761 var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) {
5762 return inst.getName() || UNKNOWN;
5763 });
5764 var ownerInfo = [].concat(
5765 // If the parent and child instances have a common owner ancestor, start
5766 // with that -- otherwise we just start with the parent's owners.
5767 deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag,
5768 // If we're warning about an invalid (non-parent) ancestry, add '...'
5769 invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > ');
5770
5771 var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo;
5772 if (didWarn[warnKey]) {
5773 return;
5774 }
5775 didWarn[warnKey] = true;
5776
5777 var tagDisplayName = childTag;
5778 var whitespaceInfo = '';
5779 if (childTag === '#text') {
5780 if (/\S/.test(childText)) {
5781 tagDisplayName = 'Text nodes';
5782 } else {
5783 tagDisplayName = 'Whitespace text nodes';
5784 whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
5785 }
5786 } else {
5787 tagDisplayName = '<' + childTag + '>';
5788 }
5789
5790 if (invalidParent) {
5791 var info = '';
5792 if (ancestorTag === 'table' && childTag === 'tr') {
5793 info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
5794 }
5795 process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0;
5796 } else {
5797 process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0;
5798 }
5799 }
5800 };
5801
5802 validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo;
5803
5804 // For testing
5805 validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) {
5806 ancestorInfo = ancestorInfo || emptyAncestorInfo;
5807 var parentInfo = ancestorInfo.current;
5808 var parentTag = parentInfo && parentInfo.tag;
5809 return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo);
5810 };
5811}
5812
5813module.exports = validateDOMNesting;
5814
5815/***/ }),
5816/* 45 */
5817/***/ (function(module, exports, __webpack_require__) {
5818
5819"use strict";
5820/**
5821 * Copyright (c) 2014-present, Facebook, Inc.
5822 *
5823 * This source code is licensed under the MIT license found in the
5824 * LICENSE file in the root directory of this source tree.
5825 *
5826 */
5827
5828
5829
5830/**
5831 * Forked from fbjs/warning:
5832 * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
5833 *
5834 * Only change is we use console.warn instead of console.error,
5835 * and do nothing when 'console' is not supported.
5836 * This really simplifies the code.
5837 * ---
5838 * Similar to invariant but only logs a warning if the condition is not met.
5839 * This can be used to log issues in development environments in critical
5840 * paths. Removing the logging code for production environments will keep the
5841 * same logic and follow the same code paths.
5842 */
5843
5844var lowPriorityWarning = function () {};
5845
5846if (process.env.NODE_ENV !== 'production') {
5847 var printWarning = function (format) {
5848 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
5849 args[_key - 1] = arguments[_key];
5850 }
5851
5852 var argIndex = 0;
5853 var message = 'Warning: ' + format.replace(/%s/g, function () {
5854 return args[argIndex++];
5855 });
5856 if (typeof console !== 'undefined') {
5857 console.warn(message);
5858 }
5859 try {
5860 // --- Welcome to debugging React ---
5861 // This error was thrown as a convenience so that you can use this stack
5862 // to find the callsite that caused this warning to fire.
5863 throw new Error(message);
5864 } catch (x) {}
5865 };
5866
5867 lowPriorityWarning = function (condition, format) {
5868 if (format === undefined) {
5869 throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
5870 }
5871 if (!condition) {
5872 for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
5873 args[_key2 - 2] = arguments[_key2];
5874 }
5875
5876 printWarning.apply(undefined, [format].concat(args));
5877 }
5878 };
5879}
5880
5881module.exports = lowPriorityWarning;
5882
5883/***/ }),
5884/* 46 */
5885/***/ (function(module, exports) {
5886
5887module.exports = require("react");
5888
5889/***/ }),
5890/* 47 */
5891/***/ (function(module, exports, __webpack_require__) {
5892
5893"use strict";
5894
5895
5896var _undefined = __webpack_require__(97)(); // Support ES3 engines
5897
5898module.exports = function (val) {
5899 return (val !== _undefined) && (val !== null);
5900};
5901
5902
5903/***/ }),
5904/* 48 */
5905/***/ (function(module, exports, __webpack_require__) {
5906
5907"use strict";
5908
5909
5910/**
5911 * Copyright (c) 2013-present, Facebook, Inc.
5912 *
5913 * This source code is licensed under the MIT license found in the
5914 * LICENSE file in the root directory of this source tree.
5915 *
5916 * @typechecks
5917 */
5918
5919var emptyFunction = __webpack_require__(7);
5920
5921/**
5922 * Upstream version of event listener. Does not take into account specific
5923 * nature of platform.
5924 */
5925var EventListener = {
5926 /**
5927 * Listen to DOM events during the bubble phase.
5928 *
5929 * @param {DOMEventTarget} target DOM element to register listener on.
5930 * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
5931 * @param {function} callback Callback function.
5932 * @return {object} Object with a `remove` method.
5933 */
5934 listen: function listen(target, eventType, callback) {
5935 if (target.addEventListener) {
5936 target.addEventListener(eventType, callback, false);
5937 return {
5938 remove: function remove() {
5939 target.removeEventListener(eventType, callback, false);
5940 }
5941 };
5942 } else if (target.attachEvent) {
5943 target.attachEvent('on' + eventType, callback);
5944 return {
5945 remove: function remove() {
5946 target.detachEvent('on' + eventType, callback);
5947 }
5948 };
5949 }
5950 },
5951
5952 /**
5953 * Listen to DOM events during the capture phase.
5954 *
5955 * @param {DOMEventTarget} target DOM element to register listener on.
5956 * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
5957 * @param {function} callback Callback function.
5958 * @return {object} Object with a `remove` method.
5959 */
5960 capture: function capture(target, eventType, callback) {
5961 if (target.addEventListener) {
5962 target.addEventListener(eventType, callback, true);
5963 return {
5964 remove: function remove() {
5965 target.removeEventListener(eventType, callback, true);
5966 }
5967 };
5968 } else {
5969 if (process.env.NODE_ENV !== 'production') {
5970 console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.');
5971 }
5972 return {
5973 remove: emptyFunction
5974 };
5975 }
5976 },
5977
5978 registerDefault: function registerDefault() {}
5979};
5980
5981module.exports = EventListener;
5982
5983/***/ }),
5984/* 49 */
5985/***/ (function(module, exports, __webpack_require__) {
5986
5987"use strict";
5988/**
5989 * Copyright (c) 2013-present, Facebook, Inc.
5990 *
5991 * This source code is licensed under the MIT license found in the
5992 * LICENSE file in the root directory of this source tree.
5993 *
5994 */
5995
5996
5997
5998/**
5999 * @param {DOMElement} node input/textarea to focus
6000 */
6001
6002function focusNode(node) {
6003 // IE8 can throw "Can't move focus to the control because it is invisible,
6004 // not enabled, or of a type that does not accept the focus." for all kinds of
6005 // reasons that are too expensive and fragile to test.
6006 try {
6007 node.focus();
6008 } catch (e) {}
6009}
6010
6011module.exports = focusNode;
6012
6013/***/ }),
6014/* 50 */
6015/***/ (function(module, exports, __webpack_require__) {
6016
6017"use strict";
6018
6019
6020/**
6021 * Copyright (c) 2013-present, Facebook, Inc.
6022 *
6023 * This source code is licensed under the MIT license found in the
6024 * LICENSE file in the root directory of this source tree.
6025 *
6026 * @typechecks
6027 */
6028
6029/* eslint-disable fb-www/typeof-undefined */
6030
6031/**
6032 * Same as document.activeElement but wraps in a try-catch block. In IE it is
6033 * not safe to call document.activeElement if there is nothing focused.
6034 *
6035 * The activeElement will be null only if the document or document body is not
6036 * yet defined.
6037 *
6038 * @param {?DOMDocument} doc Defaults to current document.
6039 * @return {?DOMElement}
6040 */
6041function getActiveElement(doc) /*?DOMElement*/{
6042 doc = doc || (typeof document !== 'undefined' ? document : undefined);
6043 if (typeof doc === 'undefined') {
6044 return null;
6045 }
6046 try {
6047 return doc.activeElement || doc.body;
6048 } catch (e) {
6049 return doc.body;
6050 }
6051}
6052
6053module.exports = getActiveElement;
6054
6055/***/ }),
6056/* 51 */
6057/***/ (function(module, exports, __webpack_require__) {
6058
6059"use strict";
6060/**
6061 * Copyright (c) 2013-present, Facebook, Inc.
6062 *
6063 * This source code is licensed under the MIT license found in the
6064 * LICENSE file in the root directory of this source tree.
6065 */
6066
6067
6068
6069// React 15.5 references this module, and assumes PropTypes are still callable in production.
6070// Therefore we re-export development-only version with all the PropTypes checks here.
6071// However if one is migrating to the `prop-types` npm library, they will go through the
6072// `index.js` entry point, and it will branch depending on the environment.
6073var factory = __webpack_require__(120);
6074module.exports = function(isValidElement) {
6075 // It is still allowed in 15.5.
6076 var throwOnDirectAccess = false;
6077 return factory(isValidElement, throwOnDirectAccess);
6078};
6079
6080
6081/***/ }),
6082/* 52 */
6083/***/ (function(module, exports, __webpack_require__) {
6084
6085"use strict";
6086/**
6087 * Copyright (c) 2013-present, Facebook, Inc.
6088 *
6089 * This source code is licensed under the MIT license found in the
6090 * LICENSE file in the root directory of this source tree.
6091 */
6092
6093
6094
6095var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
6096
6097module.exports = ReactPropTypesSecret;
6098
6099
6100/***/ }),
6101/* 53 */
6102/***/ (function(module, exports, __webpack_require__) {
6103
6104"use strict";
6105/**
6106 * Copyright (c) 2013-present, Facebook, Inc.
6107 *
6108 * This source code is licensed under the MIT license found in the
6109 * LICENSE file in the root directory of this source tree.
6110 *
6111 */
6112
6113
6114
6115/**
6116 * CSS properties which accept numbers but are not in units of "px".
6117 */
6118
6119var isUnitlessNumber = {
6120 animationIterationCount: true,
6121 borderImageOutset: true,
6122 borderImageSlice: true,
6123 borderImageWidth: true,
6124 boxFlex: true,
6125 boxFlexGroup: true,
6126 boxOrdinalGroup: true,
6127 columnCount: true,
6128 columns: true,
6129 flex: true,
6130 flexGrow: true,
6131 flexPositive: true,
6132 flexShrink: true,
6133 flexNegative: true,
6134 flexOrder: true,
6135 gridRow: true,
6136 gridRowEnd: true,
6137 gridRowSpan: true,
6138 gridRowStart: true,
6139 gridColumn: true,
6140 gridColumnEnd: true,
6141 gridColumnSpan: true,
6142 gridColumnStart: true,
6143 fontWeight: true,
6144 lineClamp: true,
6145 lineHeight: true,
6146 opacity: true,
6147 order: true,
6148 orphans: true,
6149 tabSize: true,
6150 widows: true,
6151 zIndex: true,
6152 zoom: true,
6153
6154 // SVG-related properties
6155 fillOpacity: true,
6156 floodOpacity: true,
6157 stopOpacity: true,
6158 strokeDasharray: true,
6159 strokeDashoffset: true,
6160 strokeMiterlimit: true,
6161 strokeOpacity: true,
6162 strokeWidth: true
6163};
6164
6165/**
6166 * @param {string} prefix vendor-specific prefix, eg: Webkit
6167 * @param {string} key style name, eg: transitionDuration
6168 * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
6169 * WebkitTransitionDuration
6170 */
6171function prefixKey(prefix, key) {
6172 return prefix + key.charAt(0).toUpperCase() + key.substring(1);
6173}
6174
6175/**
6176 * Support style names that may come passed in prefixed by adding permutations
6177 * of vendor prefixes.
6178 */
6179var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
6180
6181// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
6182// infinite loop, because it iterates over the newly added props too.
6183Object.keys(isUnitlessNumber).forEach(function (prop) {
6184 prefixes.forEach(function (prefix) {
6185 isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
6186 });
6187});
6188
6189/**
6190 * Most style properties can be unset by doing .style[prop] = '' but IE8
6191 * doesn't like doing that with shorthand properties so for the properties that
6192 * IE8 breaks on, which are listed here, we instead unset each of the
6193 * individual properties. See http://bugs.jquery.com/ticket/12385.
6194 * The 4-value 'clock' properties like margin, padding, border-width seem to
6195 * behave without any problems. Curiously, list-style works too without any
6196 * special prodding.
6197 */
6198var shorthandPropertyExpansions = {
6199 background: {
6200 backgroundAttachment: true,
6201 backgroundColor: true,
6202 backgroundImage: true,
6203 backgroundPositionX: true,
6204 backgroundPositionY: true,
6205 backgroundRepeat: true
6206 },
6207 backgroundPosition: {
6208 backgroundPositionX: true,
6209 backgroundPositionY: true
6210 },
6211 border: {
6212 borderWidth: true,
6213 borderStyle: true,
6214 borderColor: true
6215 },
6216 borderBottom: {
6217 borderBottomWidth: true,
6218 borderBottomStyle: true,
6219 borderBottomColor: true
6220 },
6221 borderLeft: {
6222 borderLeftWidth: true,
6223 borderLeftStyle: true,
6224 borderLeftColor: true
6225 },
6226 borderRight: {
6227 borderRightWidth: true,
6228 borderRightStyle: true,
6229 borderRightColor: true
6230 },
6231 borderTop: {
6232 borderTopWidth: true,
6233 borderTopStyle: true,
6234 borderTopColor: true
6235 },
6236 font: {
6237 fontStyle: true,
6238 fontVariant: true,
6239 fontWeight: true,
6240 fontSize: true,
6241 lineHeight: true,
6242 fontFamily: true
6243 },
6244 outline: {
6245 outlineWidth: true,
6246 outlineStyle: true,
6247 outlineColor: true
6248 }
6249};
6250
6251var CSSProperty = {
6252 isUnitlessNumber: isUnitlessNumber,
6253 shorthandPropertyExpansions: shorthandPropertyExpansions
6254};
6255
6256module.exports = CSSProperty;
6257
6258/***/ }),
6259/* 54 */
6260/***/ (function(module, exports, __webpack_require__) {
6261
6262"use strict";
6263/**
6264 * Copyright (c) 2013-present, Facebook, Inc.
6265 *
6266 * This source code is licensed under the MIT license found in the
6267 * LICENSE file in the root directory of this source tree.
6268 *
6269 *
6270 */
6271
6272
6273
6274var _prodInvariant = __webpack_require__(2);
6275
6276function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6277
6278var PooledClass = __webpack_require__(12);
6279
6280var invariant = __webpack_require__(0);
6281
6282/**
6283 * A specialized pseudo-event module to help keep track of components waiting to
6284 * be notified when their DOM representations are available for use.
6285 *
6286 * This implements `PooledClass`, so you should never need to instantiate this.
6287 * Instead, use `CallbackQueue.getPooled()`.
6288 *
6289 * @class ReactMountReady
6290 * @implements PooledClass
6291 * @internal
6292 */
6293
6294var CallbackQueue = function () {
6295 function CallbackQueue(arg) {
6296 _classCallCheck(this, CallbackQueue);
6297
6298 this._callbacks = null;
6299 this._contexts = null;
6300 this._arg = arg;
6301 }
6302
6303 /**
6304 * Enqueues a callback to be invoked when `notifyAll` is invoked.
6305 *
6306 * @param {function} callback Invoked when `notifyAll` is invoked.
6307 * @param {?object} context Context to call `callback` with.
6308 * @internal
6309 */
6310
6311
6312 CallbackQueue.prototype.enqueue = function enqueue(callback, context) {
6313 this._callbacks = this._callbacks || [];
6314 this._callbacks.push(callback);
6315 this._contexts = this._contexts || [];
6316 this._contexts.push(context);
6317 };
6318
6319 /**
6320 * Invokes all enqueued callbacks and clears the queue. This is invoked after
6321 * the DOM representation of a component has been created or updated.
6322 *
6323 * @internal
6324 */
6325
6326
6327 CallbackQueue.prototype.notifyAll = function notifyAll() {
6328 var callbacks = this._callbacks;
6329 var contexts = this._contexts;
6330 var arg = this._arg;
6331 if (callbacks && contexts) {
6332 !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;
6333 this._callbacks = null;
6334 this._contexts = null;
6335 for (var i = 0; i < callbacks.length; i++) {
6336 callbacks[i].call(contexts[i], arg);
6337 }
6338 callbacks.length = 0;
6339 contexts.length = 0;
6340 }
6341 };
6342
6343 CallbackQueue.prototype.checkpoint = function checkpoint() {
6344 return this._callbacks ? this._callbacks.length : 0;
6345 };
6346
6347 CallbackQueue.prototype.rollback = function rollback(len) {
6348 if (this._callbacks && this._contexts) {
6349 this._callbacks.length = len;
6350 this._contexts.length = len;
6351 }
6352 };
6353
6354 /**
6355 * Resets the internal queue.
6356 *
6357 * @internal
6358 */
6359
6360
6361 CallbackQueue.prototype.reset = function reset() {
6362 this._callbacks = null;
6363 this._contexts = null;
6364 };
6365
6366 /**
6367 * `PooledClass` looks for this.
6368 */
6369
6370
6371 CallbackQueue.prototype.destructor = function destructor() {
6372 this.reset();
6373 };
6374
6375 return CallbackQueue;
6376}();
6377
6378module.exports = PooledClass.addPoolingTo(CallbackQueue);
6379
6380/***/ }),
6381/* 55 */
6382/***/ (function(module, exports, __webpack_require__) {
6383
6384"use strict";
6385/**
6386 * Copyright (c) 2013-present, Facebook, Inc.
6387 *
6388 * This source code is licensed under the MIT license found in the
6389 * LICENSE file in the root directory of this source tree.
6390 *
6391 */
6392
6393
6394
6395var DOMProperty = __webpack_require__(16);
6396var ReactDOMComponentTree = __webpack_require__(4);
6397var ReactInstrumentation = __webpack_require__(6);
6398
6399var quoteAttributeValueForBrowser = __webpack_require__(186);
6400var warning = __webpack_require__(1);
6401
6402var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
6403var illegalAttributeNameCache = {};
6404var validatedAttributeNameCache = {};
6405
6406function isAttributeNameSafe(attributeName) {
6407 if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {
6408 return true;
6409 }
6410 if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {
6411 return false;
6412 }
6413 if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
6414 validatedAttributeNameCache[attributeName] = true;
6415 return true;
6416 }
6417 illegalAttributeNameCache[attributeName] = true;
6418 process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0;
6419 return false;
6420}
6421
6422function shouldIgnoreValue(propertyInfo, value) {
6423 return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;
6424}
6425
6426/**
6427 * Operations for dealing with DOM properties.
6428 */
6429var DOMPropertyOperations = {
6430 /**
6431 * Creates markup for the ID property.
6432 *
6433 * @param {string} id Unescaped ID.
6434 * @return {string} Markup string.
6435 */
6436 createMarkupForID: function (id) {
6437 return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);
6438 },
6439
6440 setAttributeForID: function (node, id) {
6441 node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);
6442 },
6443
6444 createMarkupForRoot: function () {
6445 return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""';
6446 },
6447
6448 setAttributeForRoot: function (node) {
6449 node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, '');
6450 },
6451
6452 /**
6453 * Creates markup for a property.
6454 *
6455 * @param {string} name
6456 * @param {*} value
6457 * @return {?string} Markup string, or null if the property was invalid.
6458 */
6459 createMarkupForProperty: function (name, value) {
6460 var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
6461 if (propertyInfo) {
6462 if (shouldIgnoreValue(propertyInfo, value)) {
6463 return '';
6464 }
6465 var attributeName = propertyInfo.attributeName;
6466 if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
6467 return attributeName + '=""';
6468 }
6469 return attributeName + '=' + quoteAttributeValueForBrowser(value);
6470 } else if (DOMProperty.isCustomAttribute(name)) {
6471 if (value == null) {
6472 return '';
6473 }
6474 return name + '=' + quoteAttributeValueForBrowser(value);
6475 }
6476 return null;
6477 },
6478
6479 /**
6480 * Creates markup for a custom property.
6481 *
6482 * @param {string} name
6483 * @param {*} value
6484 * @return {string} Markup string, or empty string if the property was invalid.
6485 */
6486 createMarkupForCustomAttribute: function (name, value) {
6487 if (!isAttributeNameSafe(name) || value == null) {
6488 return '';
6489 }
6490 return name + '=' + quoteAttributeValueForBrowser(value);
6491 },
6492
6493 /**
6494 * Sets the value for a property on a node.
6495 *
6496 * @param {DOMElement} node
6497 * @param {string} name
6498 * @param {*} value
6499 */
6500 setValueForProperty: function (node, name, value) {
6501 var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
6502 if (propertyInfo) {
6503 var mutationMethod = propertyInfo.mutationMethod;
6504 if (mutationMethod) {
6505 mutationMethod(node, value);
6506 } else if (shouldIgnoreValue(propertyInfo, value)) {
6507 this.deleteValueForProperty(node, name);
6508 return;
6509 } else if (propertyInfo.mustUseProperty) {
6510 // Contrary to `setAttribute`, object properties are properly
6511 // `toString`ed by IE8/9.
6512 node[propertyInfo.propertyName] = value;
6513 } else {
6514 var attributeName = propertyInfo.attributeName;
6515 var namespace = propertyInfo.attributeNamespace;
6516 // `setAttribute` with objects becomes only `[object]` in IE8/9,
6517 // ('' + value) makes it output the correct toString()-value.
6518 if (namespace) {
6519 node.setAttributeNS(namespace, attributeName, '' + value);
6520 } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
6521 node.setAttribute(attributeName, '');
6522 } else {
6523 node.setAttribute(attributeName, '' + value);
6524 }
6525 }
6526 } else if (DOMProperty.isCustomAttribute(name)) {
6527 DOMPropertyOperations.setValueForAttribute(node, name, value);
6528 return;
6529 }
6530
6531 if (process.env.NODE_ENV !== 'production') {
6532 var payload = {};
6533 payload[name] = value;
6534 ReactInstrumentation.debugTool.onHostOperation({
6535 instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
6536 type: 'update attribute',
6537 payload: payload
6538 });
6539 }
6540 },
6541
6542 setValueForAttribute: function (node, name, value) {
6543 if (!isAttributeNameSafe(name)) {
6544 return;
6545 }
6546 if (value == null) {
6547 node.removeAttribute(name);
6548 } else {
6549 node.setAttribute(name, '' + value);
6550 }
6551
6552 if (process.env.NODE_ENV !== 'production') {
6553 var payload = {};
6554 payload[name] = value;
6555 ReactInstrumentation.debugTool.onHostOperation({
6556 instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
6557 type: 'update attribute',
6558 payload: payload
6559 });
6560 }
6561 },
6562
6563 /**
6564 * Deletes an attributes from a node.
6565 *
6566 * @param {DOMElement} node
6567 * @param {string} name
6568 */
6569 deleteValueForAttribute: function (node, name) {
6570 node.removeAttribute(name);
6571 if (process.env.NODE_ENV !== 'production') {
6572 ReactInstrumentation.debugTool.onHostOperation({
6573 instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
6574 type: 'remove attribute',
6575 payload: name
6576 });
6577 }
6578 },
6579
6580 /**
6581 * Deletes the value for a property on a node.
6582 *
6583 * @param {DOMElement} node
6584 * @param {string} name
6585 */
6586 deleteValueForProperty: function (node, name) {
6587 var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
6588 if (propertyInfo) {
6589 var mutationMethod = propertyInfo.mutationMethod;
6590 if (mutationMethod) {
6591 mutationMethod(node, undefined);
6592 } else if (propertyInfo.mustUseProperty) {
6593 var propName = propertyInfo.propertyName;
6594 if (propertyInfo.hasBooleanValue) {
6595 node[propName] = false;
6596 } else {
6597 node[propName] = '';
6598 }
6599 } else {
6600 node.removeAttribute(propertyInfo.attributeName);
6601 }
6602 } else if (DOMProperty.isCustomAttribute(name)) {
6603 node.removeAttribute(name);
6604 }
6605
6606 if (process.env.NODE_ENV !== 'production') {
6607 ReactInstrumentation.debugTool.onHostOperation({
6608 instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
6609 type: 'remove attribute',
6610 payload: name
6611 });
6612 }
6613 }
6614};
6615
6616module.exports = DOMPropertyOperations;
6617
6618/***/ }),
6619/* 56 */
6620/***/ (function(module, exports, __webpack_require__) {
6621
6622"use strict";
6623/**
6624 * Copyright (c) 2015-present, Facebook, Inc.
6625 *
6626 * This source code is licensed under the MIT license found in the
6627 * LICENSE file in the root directory of this source tree.
6628 *
6629 */
6630
6631
6632
6633var ReactDOMComponentFlags = {
6634 hasCachedChildNodes: 1 << 0
6635};
6636
6637module.exports = ReactDOMComponentFlags;
6638
6639/***/ }),
6640/* 57 */
6641/***/ (function(module, exports, __webpack_require__) {
6642
6643"use strict";
6644/**
6645 * Copyright (c) 2013-present, Facebook, Inc.
6646 *
6647 * This source code is licensed under the MIT license found in the
6648 * LICENSE file in the root directory of this source tree.
6649 *
6650 */
6651
6652
6653
6654var _assign = __webpack_require__(3);
6655
6656var LinkedValueUtils = __webpack_require__(33);
6657var ReactDOMComponentTree = __webpack_require__(4);
6658var ReactUpdates = __webpack_require__(9);
6659
6660var warning = __webpack_require__(1);
6661
6662var didWarnValueLink = false;
6663var didWarnValueDefaultValue = false;
6664
6665function updateOptionsIfPendingUpdateAndMounted() {
6666 if (this._rootNodeID && this._wrapperState.pendingUpdate) {
6667 this._wrapperState.pendingUpdate = false;
6668
6669 var props = this._currentElement.props;
6670 var value = LinkedValueUtils.getValue(props);
6671
6672 if (value != null) {
6673 updateOptions(this, Boolean(props.multiple), value);
6674 }
6675 }
6676}
6677
6678function getDeclarationErrorAddendum(owner) {
6679 if (owner) {
6680 var name = owner.getName();
6681 if (name) {
6682 return ' Check the render method of `' + name + '`.';
6683 }
6684 }
6685 return '';
6686}
6687
6688var valuePropNames = ['value', 'defaultValue'];
6689
6690/**
6691 * Validation function for `value` and `defaultValue`.
6692 * @private
6693 */
6694function checkSelectPropTypes(inst, props) {
6695 var owner = inst._currentElement._owner;
6696 LinkedValueUtils.checkPropTypes('select', props, owner);
6697
6698 if (props.valueLink !== undefined && !didWarnValueLink) {
6699 process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;
6700 didWarnValueLink = true;
6701 }
6702
6703 for (var i = 0; i < valuePropNames.length; i++) {
6704 var propName = valuePropNames[i];
6705 if (props[propName] == null) {
6706 continue;
6707 }
6708 var isArray = Array.isArray(props[propName]);
6709 if (props.multiple && !isArray) {
6710 process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
6711 } else if (!props.multiple && isArray) {
6712 process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
6713 }
6714 }
6715}
6716
6717/**
6718 * @param {ReactDOMComponent} inst
6719 * @param {boolean} multiple
6720 * @param {*} propValue A stringable (with `multiple`, a list of stringables).
6721 * @private
6722 */
6723function updateOptions(inst, multiple, propValue) {
6724 var selectedValue, i;
6725 var options = ReactDOMComponentTree.getNodeFromInstance(inst).options;
6726
6727 if (multiple) {
6728 selectedValue = {};
6729 for (i = 0; i < propValue.length; i++) {
6730 selectedValue['' + propValue[i]] = true;
6731 }
6732 for (i = 0; i < options.length; i++) {
6733 var selected = selectedValue.hasOwnProperty(options[i].value);
6734 if (options[i].selected !== selected) {
6735 options[i].selected = selected;
6736 }
6737 }
6738 } else {
6739 // Do not set `select.value` as exact behavior isn't consistent across all
6740 // browsers for all cases.
6741 selectedValue = '' + propValue;
6742 for (i = 0; i < options.length; i++) {
6743 if (options[i].value === selectedValue) {
6744 options[i].selected = true;
6745 return;
6746 }
6747 }
6748 if (options.length) {
6749 options[0].selected = true;
6750 }
6751 }
6752}
6753
6754/**
6755 * Implements a <select> host component that allows optionally setting the
6756 * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
6757 * stringable. If `multiple` is true, the prop must be an array of stringables.
6758 *
6759 * If `value` is not supplied (or null/undefined), user actions that change the
6760 * selected option will trigger updates to the rendered options.
6761 *
6762 * If it is supplied (and not null/undefined), the rendered options will not
6763 * update in response to user actions. Instead, the `value` prop must change in
6764 * order for the rendered options to update.
6765 *
6766 * If `defaultValue` is provided, any options with the supplied values will be
6767 * selected.
6768 */
6769var ReactDOMSelect = {
6770 getHostProps: function (inst, props) {
6771 return _assign({}, props, {
6772 onChange: inst._wrapperState.onChange,
6773 value: undefined
6774 });
6775 },
6776
6777 mountWrapper: function (inst, props) {
6778 if (process.env.NODE_ENV !== 'production') {
6779 checkSelectPropTypes(inst, props);
6780 }
6781
6782 var value = LinkedValueUtils.getValue(props);
6783 inst._wrapperState = {
6784 pendingUpdate: false,
6785 initialValue: value != null ? value : props.defaultValue,
6786 listeners: null,
6787 onChange: _handleChange.bind(inst),
6788 wasMultiple: Boolean(props.multiple)
6789 };
6790
6791 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
6792 process.env.NODE_ENV !== 'production' ? 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') : void 0;
6793 didWarnValueDefaultValue = true;
6794 }
6795 },
6796
6797 getSelectValueContext: function (inst) {
6798 // ReactDOMOption looks at this initial value so the initial generated
6799 // markup has correct `selected` attributes
6800 return inst._wrapperState.initialValue;
6801 },
6802
6803 postUpdateWrapper: function (inst) {
6804 var props = inst._currentElement.props;
6805
6806 // After the initial mount, we control selected-ness manually so don't pass
6807 // this value down
6808 inst._wrapperState.initialValue = undefined;
6809
6810 var wasMultiple = inst._wrapperState.wasMultiple;
6811 inst._wrapperState.wasMultiple = Boolean(props.multiple);
6812
6813 var value = LinkedValueUtils.getValue(props);
6814 if (value != null) {
6815 inst._wrapperState.pendingUpdate = false;
6816 updateOptions(inst, Boolean(props.multiple), value);
6817 } else if (wasMultiple !== Boolean(props.multiple)) {
6818 // For simplicity, reapply `defaultValue` if `multiple` is toggled.
6819 if (props.defaultValue != null) {
6820 updateOptions(inst, Boolean(props.multiple), props.defaultValue);
6821 } else {
6822 // Revert the select back to its default unselected state.
6823 updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : '');
6824 }
6825 }
6826 }
6827};
6828
6829function _handleChange(event) {
6830 var props = this._currentElement.props;
6831 var returnValue = LinkedValueUtils.executeOnChange(props, event);
6832
6833 if (this._rootNodeID) {
6834 this._wrapperState.pendingUpdate = true;
6835 }
6836 ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);
6837 return returnValue;
6838}
6839
6840module.exports = ReactDOMSelect;
6841
6842/***/ }),
6843/* 58 */
6844/***/ (function(module, exports, __webpack_require__) {
6845
6846"use strict";
6847/**
6848 * Copyright (c) 2013-present, Facebook, Inc.
6849 *
6850 * This source code is licensed under the MIT license found in the
6851 * LICENSE file in the root directory of this source tree.
6852 *
6853 */
6854
6855
6856
6857var _assign = __webpack_require__(3);
6858
6859var ReactUpdates = __webpack_require__(9);
6860var Transaction = __webpack_require__(24);
6861
6862var emptyFunction = __webpack_require__(7);
6863
6864var RESET_BATCHED_UPDATES = {
6865 initialize: emptyFunction,
6866 close: function () {
6867 ReactDefaultBatchingStrategy.isBatchingUpdates = false;
6868 }
6869};
6870
6871var FLUSH_BATCHED_UPDATES = {
6872 initialize: emptyFunction,
6873 close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)
6874};
6875
6876var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];
6877
6878function ReactDefaultBatchingStrategyTransaction() {
6879 this.reinitializeTransaction();
6880}
6881
6882_assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, {
6883 getTransactionWrappers: function () {
6884 return TRANSACTION_WRAPPERS;
6885 }
6886});
6887
6888var transaction = new ReactDefaultBatchingStrategyTransaction();
6889
6890var ReactDefaultBatchingStrategy = {
6891 isBatchingUpdates: false,
6892
6893 /**
6894 * Call the provided function in a context within which calls to `setState`
6895 * and friends are batched such that components aren't updated unnecessarily.
6896 */
6897 batchedUpdates: function (callback, a, b, c, d, e) {
6898 var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;
6899
6900 ReactDefaultBatchingStrategy.isBatchingUpdates = true;
6901
6902 // The code is written this way to avoid extra allocations
6903 if (alreadyBatchingUpdates) {
6904 return callback(a, b, c, d, e);
6905 } else {
6906 return transaction.perform(callback, null, a, b, c, d, e);
6907 }
6908 }
6909};
6910
6911module.exports = ReactDefaultBatchingStrategy;
6912
6913/***/ }),
6914/* 59 */
6915/***/ (function(module, exports, __webpack_require__) {
6916
6917"use strict";
6918/**
6919 * Copyright (c) 2014-present, Facebook, Inc.
6920 *
6921 * This source code is licensed under the MIT license found in the
6922 * LICENSE file in the root directory of this source tree.
6923 *
6924 */
6925
6926
6927
6928var emptyComponentFactory;
6929
6930var ReactEmptyComponentInjection = {
6931 injectEmptyComponentFactory: function (factory) {
6932 emptyComponentFactory = factory;
6933 }
6934};
6935
6936var ReactEmptyComponent = {
6937 create: function (instantiate) {
6938 return emptyComponentFactory(instantiate);
6939 }
6940};
6941
6942ReactEmptyComponent.injection = ReactEmptyComponentInjection;
6943
6944module.exports = ReactEmptyComponent;
6945
6946/***/ }),
6947/* 60 */
6948/***/ (function(module, exports, __webpack_require__) {
6949
6950"use strict";
6951/**
6952 * Copyright (c) 2014-present, Facebook, Inc.
6953 *
6954 * This source code is licensed under the MIT license found in the
6955 * LICENSE file in the root directory of this source tree.
6956 *
6957 */
6958
6959
6960
6961var _prodInvariant = __webpack_require__(2);
6962
6963var invariant = __webpack_require__(0);
6964
6965var genericComponentClass = null;
6966var textComponentClass = null;
6967
6968var ReactHostComponentInjection = {
6969 // This accepts a class that receives the tag string. This is a catch all
6970 // that can render any kind of tag.
6971 injectGenericComponentClass: function (componentClass) {
6972 genericComponentClass = componentClass;
6973 },
6974 // This accepts a text component class that takes the text string to be
6975 // rendered as props.
6976 injectTextComponentClass: function (componentClass) {
6977 textComponentClass = componentClass;
6978 }
6979};
6980
6981/**
6982 * Get a host internal component class for a specific tag.
6983 *
6984 * @param {ReactElement} element The element to create.
6985 * @return {function} The internal class constructor function.
6986 */
6987function createInternalComponent(element) {
6988 !genericComponentClass ? process.env.NODE_ENV !== 'production' ? invariant(false, 'There is no registered component for the tag %s', element.type) : _prodInvariant('111', element.type) : void 0;
6989 return new genericComponentClass(element);
6990}
6991
6992/**
6993 * @param {ReactText} text
6994 * @return {ReactComponent}
6995 */
6996function createInstanceForText(text) {
6997 return new textComponentClass(text);
6998}
6999
7000/**
7001 * @param {ReactComponent} component
7002 * @return {boolean}
7003 */
7004function isTextComponent(component) {
7005 return component instanceof textComponentClass;
7006}
7007
7008var ReactHostComponent = {
7009 createInternalComponent: createInternalComponent,
7010 createInstanceForText: createInstanceForText,
7011 isTextComponent: isTextComponent,
7012 injection: ReactHostComponentInjection
7013};
7014
7015module.exports = ReactHostComponent;
7016
7017/***/ }),
7018/* 61 */
7019/***/ (function(module, exports, __webpack_require__) {
7020
7021"use strict";
7022/**
7023 * Copyright (c) 2013-present, Facebook, Inc.
7024 *
7025 * This source code is licensed under the MIT license found in the
7026 * LICENSE file in the root directory of this source tree.
7027 *
7028 */
7029
7030
7031
7032var ReactDOMSelection = __webpack_require__(140);
7033
7034var containsNode = __webpack_require__(107);
7035var focusNode = __webpack_require__(49);
7036var getActiveElement = __webpack_require__(50);
7037
7038function isInDocument(node) {
7039 return containsNode(document.documentElement, node);
7040}
7041
7042/**
7043 * @ReactInputSelection: React input selection module. Based on Selection.js,
7044 * but modified to be suitable for react and has a couple of bug fixes (doesn't
7045 * assume buttons have range selections allowed).
7046 * Input selection module for React.
7047 */
7048var ReactInputSelection = {
7049 hasSelectionCapabilities: function (elem) {
7050 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
7051 return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');
7052 },
7053
7054 getSelectionInformation: function () {
7055 var focusedElem = getActiveElement();
7056 return {
7057 focusedElem: focusedElem,
7058 selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null
7059 };
7060 },
7061
7062 /**
7063 * @restoreSelection: If any selection information was potentially lost,
7064 * restore it. This is useful when performing operations that could remove dom
7065 * nodes and place them back in, resulting in focus being lost.
7066 */
7067 restoreSelection: function (priorSelectionInformation) {
7068 var curFocusedElem = getActiveElement();
7069 var priorFocusedElem = priorSelectionInformation.focusedElem;
7070 var priorSelectionRange = priorSelectionInformation.selectionRange;
7071 if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
7072 if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {
7073 ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange);
7074 }
7075 focusNode(priorFocusedElem);
7076 }
7077 },
7078
7079 /**
7080 * @getSelection: Gets the selection bounds of a focused textarea, input or
7081 * contentEditable node.
7082 * -@input: Look up selection bounds of this input
7083 * -@return {start: selectionStart, end: selectionEnd}
7084 */
7085 getSelection: function (input) {
7086 var selection;
7087
7088 if ('selectionStart' in input) {
7089 // Modern browser with input or textarea.
7090 selection = {
7091 start: input.selectionStart,
7092 end: input.selectionEnd
7093 };
7094 } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
7095 // IE8 input.
7096 var range = document.selection.createRange();
7097 // There can only be one selection per document in IE, so it must
7098 // be in our element.
7099 if (range.parentElement() === input) {
7100 selection = {
7101 start: -range.moveStart('character', -input.value.length),
7102 end: -range.moveEnd('character', -input.value.length)
7103 };
7104 }
7105 } else {
7106 // Content editable or old IE textarea.
7107 selection = ReactDOMSelection.getOffsets(input);
7108 }
7109
7110 return selection || { start: 0, end: 0 };
7111 },
7112
7113 /**
7114 * @setSelection: Sets the selection bounds of a textarea or input and focuses
7115 * the input.
7116 * -@input Set selection bounds of this input or textarea
7117 * -@offsets Object of same form that is returned from get*
7118 */
7119 setSelection: function (input, offsets) {
7120 var start = offsets.start;
7121 var end = offsets.end;
7122 if (end === undefined) {
7123 end = start;
7124 }
7125
7126 if ('selectionStart' in input) {
7127 input.selectionStart = start;
7128 input.selectionEnd = Math.min(end, input.value.length);
7129 } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
7130 var range = input.createTextRange();
7131 range.collapse(true);
7132 range.moveStart('character', start);
7133 range.moveEnd('character', end - start);
7134 range.select();
7135 } else {
7136 ReactDOMSelection.setOffsets(input, offsets);
7137 }
7138 }
7139};
7140
7141module.exports = ReactInputSelection;
7142
7143/***/ }),
7144/* 62 */
7145/***/ (function(module, exports, __webpack_require__) {
7146
7147"use strict";
7148/**
7149 * Copyright (c) 2013-present, Facebook, Inc.
7150 *
7151 * This source code is licensed under the MIT license found in the
7152 * LICENSE file in the root directory of this source tree.
7153 *
7154 *
7155 */
7156
7157
7158
7159var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
7160
7161module.exports = ReactPropTypesSecret;
7162
7163/***/ }),
7164/* 63 */
7165/***/ (function(module, exports, __webpack_require__) {
7166
7167"use strict";
7168/**
7169 * Copyright (c) 2014-present, Facebook, Inc.
7170 *
7171 * This source code is licensed under the MIT license found in the
7172 * LICENSE file in the root directory of this source tree.
7173 *
7174 */
7175
7176
7177
7178var _assign = __webpack_require__(3);
7179
7180var PooledClass = __webpack_require__(12);
7181var Transaction = __webpack_require__(24);
7182var ReactInstrumentation = __webpack_require__(6);
7183var ReactServerUpdateQueue = __webpack_require__(163);
7184
7185/**
7186 * Executed within the scope of the `Transaction` instance. Consider these as
7187 * being member methods, but with an implied ordering while being isolated from
7188 * each other.
7189 */
7190var TRANSACTION_WRAPPERS = [];
7191
7192if (process.env.NODE_ENV !== 'production') {
7193 TRANSACTION_WRAPPERS.push({
7194 initialize: ReactInstrumentation.debugTool.onBeginFlush,
7195 close: ReactInstrumentation.debugTool.onEndFlush
7196 });
7197}
7198
7199var noopCallbackQueue = {
7200 enqueue: function () {}
7201};
7202
7203/**
7204 * @class ReactServerRenderingTransaction
7205 * @param {boolean} renderToStaticMarkup
7206 */
7207function ReactServerRenderingTransaction(renderToStaticMarkup) {
7208 this.reinitializeTransaction();
7209 this.renderToStaticMarkup = renderToStaticMarkup;
7210 this.useCreateElement = false;
7211 this.updateQueue = new ReactServerUpdateQueue(this);
7212}
7213
7214var Mixin = {
7215 /**
7216 * @see Transaction
7217 * @abstract
7218 * @final
7219 * @return {array} Empty list of operation wrap procedures.
7220 */
7221 getTransactionWrappers: function () {
7222 return TRANSACTION_WRAPPERS;
7223 },
7224
7225 /**
7226 * @return {object} The queue to collect `onDOMReady` callbacks with.
7227 */
7228 getReactMountReady: function () {
7229 return noopCallbackQueue;
7230 },
7231
7232 /**
7233 * @return {object} The queue to collect React async events.
7234 */
7235 getUpdateQueue: function () {
7236 return this.updateQueue;
7237 },
7238
7239 /**
7240 * `PooledClass` looks for this, and will invoke this before allowing this
7241 * instance to be reused.
7242 */
7243 destructor: function () {},
7244
7245 checkpoint: function () {},
7246
7247 rollback: function () {}
7248};
7249
7250_assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin);
7251
7252PooledClass.addPoolingTo(ReactServerRenderingTransaction);
7253
7254module.exports = ReactServerRenderingTransaction;
7255
7256/***/ }),
7257/* 64 */
7258/***/ (function(module, exports, __webpack_require__) {
7259
7260"use strict";
7261/**
7262 * Copyright (c) 2015-present, Facebook, Inc.
7263 *
7264 * This source code is licensed under the MIT license found in the
7265 * LICENSE file in the root directory of this source tree.
7266 *
7267 */
7268
7269
7270
7271var _prodInvariant = __webpack_require__(2);
7272
7273var ReactCurrentOwner = __webpack_require__(11);
7274var ReactInstanceMap = __webpack_require__(37);
7275var ReactInstrumentation = __webpack_require__(6);
7276var ReactUpdates = __webpack_require__(9);
7277
7278var invariant = __webpack_require__(0);
7279var warning = __webpack_require__(1);
7280
7281function enqueueUpdate(internalInstance) {
7282 ReactUpdates.enqueueUpdate(internalInstance);
7283}
7284
7285function formatUnexpectedArgument(arg) {
7286 var type = typeof arg;
7287 if (type !== 'object') {
7288 return type;
7289 }
7290 var displayName = arg.constructor && arg.constructor.name || type;
7291 var keys = Object.keys(arg);
7292 if (keys.length > 0 && keys.length < 20) {
7293 return displayName + ' (keys: ' + keys.join(', ') + ')';
7294 }
7295 return displayName;
7296}
7297
7298function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
7299 var internalInstance = ReactInstanceMap.get(publicInstance);
7300 if (!internalInstance) {
7301 if (process.env.NODE_ENV !== 'production') {
7302 var ctor = publicInstance.constructor;
7303 // Only warn when we have a callerName. Otherwise we should be silent.
7304 // We're probably calling from enqueueCallback. We don't want to warn
7305 // there because we already warned for the corresponding lifecycle method.
7306 process.env.NODE_ENV !== 'production' ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, ctor && (ctor.displayName || ctor.name) || 'ReactClass') : void 0;
7307 }
7308 return null;
7309 }
7310
7311 if (process.env.NODE_ENV !== 'production') {
7312 process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): 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`.', callerName) : void 0;
7313 }
7314
7315 return internalInstance;
7316}
7317
7318/**
7319 * ReactUpdateQueue allows for state updates to be scheduled into a later
7320 * reconciliation step.
7321 */
7322var ReactUpdateQueue = {
7323 /**
7324 * Checks whether or not this composite component is mounted.
7325 * @param {ReactClass} publicInstance The instance we want to test.
7326 * @return {boolean} True if mounted, false otherwise.
7327 * @protected
7328 * @final
7329 */
7330 isMounted: function (publicInstance) {
7331 if (process.env.NODE_ENV !== 'production') {
7332 var owner = ReactCurrentOwner.current;
7333 if (owner !== null) {
7334 process.env.NODE_ENV !== 'production' ? warning(owner._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.', owner.getName() || 'A component') : void 0;
7335 owner._warnedAboutRefsInRender = true;
7336 }
7337 }
7338 var internalInstance = ReactInstanceMap.get(publicInstance);
7339 if (internalInstance) {
7340 // During componentWillMount and render this will still be null but after
7341 // that will always render to something. At least for now. So we can use
7342 // this hack.
7343 return !!internalInstance._renderedComponent;
7344 } else {
7345 return false;
7346 }
7347 },
7348
7349 /**
7350 * Enqueue a callback that will be executed after all the pending updates
7351 * have processed.
7352 *
7353 * @param {ReactClass} publicInstance The instance to use as `this` context.
7354 * @param {?function} callback Called after state is updated.
7355 * @param {string} callerName Name of the calling function in the public API.
7356 * @internal
7357 */
7358 enqueueCallback: function (publicInstance, callback, callerName) {
7359 ReactUpdateQueue.validateCallback(callback, callerName);
7360 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);
7361
7362 // Previously we would throw an error if we didn't have an internal
7363 // instance. Since we want to make it a no-op instead, we mirror the same
7364 // behavior we have in other enqueue* methods.
7365 // We also need to ignore callbacks in componentWillMount. See
7366 // enqueueUpdates.
7367 if (!internalInstance) {
7368 return null;
7369 }
7370
7371 if (internalInstance._pendingCallbacks) {
7372 internalInstance._pendingCallbacks.push(callback);
7373 } else {
7374 internalInstance._pendingCallbacks = [callback];
7375 }
7376 // TODO: The callback here is ignored when setState is called from
7377 // componentWillMount. Either fix it or disallow doing so completely in
7378 // favor of getInitialState. Alternatively, we can disallow
7379 // componentWillMount during server-side rendering.
7380 enqueueUpdate(internalInstance);
7381 },
7382
7383 enqueueCallbackInternal: function (internalInstance, callback) {
7384 if (internalInstance._pendingCallbacks) {
7385 internalInstance._pendingCallbacks.push(callback);
7386 } else {
7387 internalInstance._pendingCallbacks = [callback];
7388 }
7389 enqueueUpdate(internalInstance);
7390 },
7391
7392 /**
7393 * Forces an update. This should only be invoked when it is known with
7394 * certainty that we are **not** in a DOM transaction.
7395 *
7396 * You may want to call this when you know that some deeper aspect of the
7397 * component's state has changed but `setState` was not called.
7398 *
7399 * This will not invoke `shouldComponentUpdate`, but it will invoke
7400 * `componentWillUpdate` and `componentDidUpdate`.
7401 *
7402 * @param {ReactClass} publicInstance The instance that should rerender.
7403 * @internal
7404 */
7405 enqueueForceUpdate: function (publicInstance) {
7406 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate');
7407
7408 if (!internalInstance) {
7409 return;
7410 }
7411
7412 internalInstance._pendingForceUpdate = true;
7413
7414 enqueueUpdate(internalInstance);
7415 },
7416
7417 /**
7418 * Replaces all of the state. Always use this or `setState` to mutate state.
7419 * You should treat `this.state` as immutable.
7420 *
7421 * There is no guarantee that `this.state` will be immediately updated, so
7422 * accessing `this.state` after calling this method may return the old value.
7423 *
7424 * @param {ReactClass} publicInstance The instance that should rerender.
7425 * @param {object} completeState Next state.
7426 * @internal
7427 */
7428 enqueueReplaceState: function (publicInstance, completeState, callback) {
7429 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState');
7430
7431 if (!internalInstance) {
7432 return;
7433 }
7434
7435 internalInstance._pendingStateQueue = [completeState];
7436 internalInstance._pendingReplaceState = true;
7437
7438 // Future-proof 15.5
7439 if (callback !== undefined && callback !== null) {
7440 ReactUpdateQueue.validateCallback(callback, 'replaceState');
7441 if (internalInstance._pendingCallbacks) {
7442 internalInstance._pendingCallbacks.push(callback);
7443 } else {
7444 internalInstance._pendingCallbacks = [callback];
7445 }
7446 }
7447
7448 enqueueUpdate(internalInstance);
7449 },
7450
7451 /**
7452 * Sets a subset of the state. This only exists because _pendingState is
7453 * internal. This provides a merging strategy that is not available to deep
7454 * properties which is confusing. TODO: Expose pendingState or don't use it
7455 * during the merge.
7456 *
7457 * @param {ReactClass} publicInstance The instance that should rerender.
7458 * @param {object} partialState Next partial state to be merged with state.
7459 * @internal
7460 */
7461 enqueueSetState: function (publicInstance, partialState) {
7462 if (process.env.NODE_ENV !== 'production') {
7463 ReactInstrumentation.debugTool.onSetState();
7464 process.env.NODE_ENV !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0;
7465 }
7466
7467 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState');
7468
7469 if (!internalInstance) {
7470 return;
7471 }
7472
7473 var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []);
7474 queue.push(partialState);
7475
7476 enqueueUpdate(internalInstance);
7477 },
7478
7479 enqueueElementInternal: function (internalInstance, nextElement, nextContext) {
7480 internalInstance._pendingElement = nextElement;
7481 // TODO: introduce _pendingContext instead of setting it directly.
7482 internalInstance._context = nextContext;
7483 enqueueUpdate(internalInstance);
7484 },
7485
7486 validateCallback: function (callback, callerName) {
7487 !(!callback || typeof callback === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) : void 0;
7488 }
7489};
7490
7491module.exports = ReactUpdateQueue;
7492
7493/***/ }),
7494/* 65 */
7495/***/ (function(module, exports, __webpack_require__) {
7496
7497"use strict";
7498/**
7499 * Copyright (c) 2013-present, Facebook, Inc.
7500 *
7501 * This source code is licensed under the MIT license found in the
7502 * LICENSE file in the root directory of this source tree.
7503 *
7504 */
7505
7506
7507
7508var ViewportMetrics = {
7509 currentScrollLeft: 0,
7510
7511 currentScrollTop: 0,
7512
7513 refreshScrollValues: function (scrollPosition) {
7514 ViewportMetrics.currentScrollLeft = scrollPosition.x;
7515 ViewportMetrics.currentScrollTop = scrollPosition.y;
7516 }
7517};
7518
7519module.exports = ViewportMetrics;
7520
7521/***/ }),
7522/* 66 */
7523/***/ (function(module, exports, __webpack_require__) {
7524
7525"use strict";
7526/**
7527 * Copyright (c) 2014-present, Facebook, Inc.
7528 *
7529 * This source code is licensed under the MIT license found in the
7530 * LICENSE file in the root directory of this source tree.
7531 *
7532 *
7533 */
7534
7535
7536
7537var _prodInvariant = __webpack_require__(2);
7538
7539var invariant = __webpack_require__(0);
7540
7541/**
7542 * Accumulates items that must not be null or undefined into the first one. This
7543 * is used to conserve memory by avoiding array allocations, and thus sacrifices
7544 * API cleanness. Since `current` can be null before being passed in and not
7545 * null after this function, make sure to assign it back to `current`:
7546 *
7547 * `a = accumulateInto(a, b);`
7548 *
7549 * This API should be sparingly used. Try `accumulate` for something cleaner.
7550 *
7551 * @return {*|array<*>} An accumulation of items.
7552 */
7553
7554function accumulateInto(current, next) {
7555 !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0;
7556
7557 if (current == null) {
7558 return next;
7559 }
7560
7561 // Both are not empty. Warning: Never call x.concat(y) when you are not
7562 // certain that x is an Array (x could be a string with concat method).
7563 if (Array.isArray(current)) {
7564 if (Array.isArray(next)) {
7565 current.push.apply(current, next);
7566 return current;
7567 }
7568 current.push(next);
7569 return current;
7570 }
7571
7572 if (Array.isArray(next)) {
7573 // A bit too dangerous to mutate `next`.
7574 return [current].concat(next);
7575 }
7576
7577 return [current, next];
7578}
7579
7580module.exports = accumulateInto;
7581
7582/***/ }),
7583/* 67 */
7584/***/ (function(module, exports, __webpack_require__) {
7585
7586"use strict";
7587/**
7588 * Copyright (c) 2013-present, Facebook, Inc.
7589 *
7590 * This source code is licensed under the MIT license found in the
7591 * LICENSE file in the root directory of this source tree.
7592 *
7593 *
7594 */
7595
7596
7597
7598/**
7599 * @param {array} arr an "accumulation" of items which is either an Array or
7600 * a single item. Useful when paired with the `accumulate` module. This is a
7601 * simple utility that allows us to reason about a collection of items, but
7602 * handling the case when there is exactly one item (and we do not need to
7603 * allocate an array).
7604 */
7605
7606function forEachAccumulated(arr, cb, scope) {
7607 if (Array.isArray(arr)) {
7608 arr.forEach(cb, scope);
7609 } else if (arr) {
7610 cb.call(scope, arr);
7611 }
7612}
7613
7614module.exports = forEachAccumulated;
7615
7616/***/ }),
7617/* 68 */
7618/***/ (function(module, exports, __webpack_require__) {
7619
7620"use strict";
7621/**
7622 * Copyright (c) 2013-present, Facebook, Inc.
7623 *
7624 * This source code is licensed under the MIT license found in the
7625 * LICENSE file in the root directory of this source tree.
7626 *
7627 */
7628
7629
7630
7631var ExecutionEnvironment = __webpack_require__(5);
7632
7633var contentKey = null;
7634
7635/**
7636 * Gets the key used to access text content on a DOM node.
7637 *
7638 * @return {?string} Key used to access text content.
7639 * @internal
7640 */
7641function getTextContentAccessor() {
7642 if (!contentKey && ExecutionEnvironment.canUseDOM) {
7643 // Prefer textContent to innerText because many browsers support both but
7644 // SVG <text> elements don't support innerText even when <div> does.
7645 contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';
7646 }
7647 return contentKey;
7648}
7649
7650module.exports = getTextContentAccessor;
7651
7652/***/ }),
7653/* 69 */
7654/***/ (function(module, exports, __webpack_require__) {
7655
7656"use strict";
7657/**
7658 * Copyright (c) 2013-present, Facebook, Inc.
7659 *
7660 * This source code is licensed under the MIT license found in the
7661 * LICENSE file in the root directory of this source tree.
7662 *
7663 */
7664
7665
7666
7667var ReactDOMComponentTree = __webpack_require__(4);
7668
7669function isCheckable(elem) {
7670 var type = elem.type;
7671 var nodeName = elem.nodeName;
7672 return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
7673}
7674
7675function getTracker(inst) {
7676 return inst._wrapperState.valueTracker;
7677}
7678
7679function attachTracker(inst, tracker) {
7680 inst._wrapperState.valueTracker = tracker;
7681}
7682
7683function detachTracker(inst) {
7684 inst._wrapperState.valueTracker = null;
7685}
7686
7687function getValueFromNode(node) {
7688 var value;
7689 if (node) {
7690 value = isCheckable(node) ? '' + node.checked : node.value;
7691 }
7692 return value;
7693}
7694
7695var inputValueTracking = {
7696 // exposed for testing
7697 _getTrackerFromNode: function (node) {
7698 return getTracker(ReactDOMComponentTree.getInstanceFromNode(node));
7699 },
7700
7701
7702 track: function (inst) {
7703 if (getTracker(inst)) {
7704 return;
7705 }
7706
7707 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
7708 var valueField = isCheckable(node) ? 'checked' : 'value';
7709 var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
7710
7711 var currentValue = '' + node[valueField];
7712
7713 // if someone has already defined a value or Safari, then bail
7714 // and don't track value will cause over reporting of changes,
7715 // but it's better then a hard failure
7716 // (needed for certain tests that spyOn input values and Safari)
7717 if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
7718 return;
7719 }
7720
7721 Object.defineProperty(node, valueField, {
7722 enumerable: descriptor.enumerable,
7723 configurable: true,
7724 get: function () {
7725 return descriptor.get.call(this);
7726 },
7727 set: function (value) {
7728 currentValue = '' + value;
7729 descriptor.set.call(this, value);
7730 }
7731 });
7732
7733 attachTracker(inst, {
7734 getValue: function () {
7735 return currentValue;
7736 },
7737 setValue: function (value) {
7738 currentValue = '' + value;
7739 },
7740 stopTracking: function () {
7741 detachTracker(inst);
7742 delete node[valueField];
7743 }
7744 });
7745 },
7746
7747 updateValueIfChanged: function (inst) {
7748 if (!inst) {
7749 return false;
7750 }
7751 var tracker = getTracker(inst);
7752
7753 if (!tracker) {
7754 inputValueTracking.track(inst);
7755 return true;
7756 }
7757
7758 var lastValue = tracker.getValue();
7759 var nextValue = getValueFromNode(ReactDOMComponentTree.getNodeFromInstance(inst));
7760
7761 if (nextValue !== lastValue) {
7762 tracker.setValue(nextValue);
7763 return true;
7764 }
7765
7766 return false;
7767 },
7768 stopTracking: function (inst) {
7769 var tracker = getTracker(inst);
7770 if (tracker) {
7771 tracker.stopTracking();
7772 }
7773 }
7774};
7775
7776module.exports = inputValueTracking;
7777
7778/***/ }),
7779/* 70 */
7780/***/ (function(module, exports, __webpack_require__) {
7781
7782"use strict";
7783/**
7784 * Copyright (c) 2013-present, Facebook, Inc.
7785 *
7786 * This source code is licensed under the MIT license found in the
7787 * LICENSE file in the root directory of this source tree.
7788 *
7789 */
7790
7791
7792
7793var _prodInvariant = __webpack_require__(2),
7794 _assign = __webpack_require__(3);
7795
7796var ReactCompositeComponent = __webpack_require__(133);
7797var ReactEmptyComponent = __webpack_require__(59);
7798var ReactHostComponent = __webpack_require__(60);
7799
7800var getNextDebugID = __webpack_require__(198);
7801var invariant = __webpack_require__(0);
7802var warning = __webpack_require__(1);
7803
7804// To avoid a cyclic dependency, we create the final class in this module
7805var ReactCompositeComponentWrapper = function (element) {
7806 this.construct(element);
7807};
7808
7809function getDeclarationErrorAddendum(owner) {
7810 if (owner) {
7811 var name = owner.getName();
7812 if (name) {
7813 return ' Check the render method of `' + name + '`.';
7814 }
7815 }
7816 return '';
7817}
7818
7819/**
7820 * Check if the type reference is a known internal type. I.e. not a user
7821 * provided composite type.
7822 *
7823 * @param {function} type
7824 * @return {boolean} Returns true if this is a valid internal type.
7825 */
7826function isInternalComponentType(type) {
7827 return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function';
7828}
7829
7830/**
7831 * Given a ReactNode, create an instance that will actually be mounted.
7832 *
7833 * @param {ReactNode} node
7834 * @param {boolean} shouldHaveDebugID
7835 * @return {object} A new instance of the element's constructor.
7836 * @protected
7837 */
7838function instantiateReactComponent(node, shouldHaveDebugID) {
7839 var instance;
7840
7841 if (node === null || node === false) {
7842 instance = ReactEmptyComponent.create(instantiateReactComponent);
7843 } else if (typeof node === 'object') {
7844 var element = node;
7845 var type = element.type;
7846 if (typeof type !== 'function' && typeof type !== 'string') {
7847 var info = '';
7848 if (process.env.NODE_ENV !== 'production') {
7849 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
7850 info += ' You likely forgot to export your component from the file ' + "it's defined in.";
7851 }
7852 }
7853 info += getDeclarationErrorAddendum(element._owner);
7854 true ? process.env.NODE_ENV !== 'production' ? 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) : _prodInvariant('130', type == null ? type : typeof type, info) : void 0;
7855 }
7856
7857 // Special case string values
7858 if (typeof element.type === 'string') {
7859 instance = ReactHostComponent.createInternalComponent(element);
7860 } else if (isInternalComponentType(element.type)) {
7861 // This is temporarily available for custom components that are not string
7862 // representations. I.e. ART. Once those are updated to use the string
7863 // representation, we can drop this code path.
7864 instance = new element.type(element);
7865
7866 // We renamed this. Allow the old name for compat. :(
7867 if (!instance.getHostNode) {
7868 instance.getHostNode = instance.getNativeNode;
7869 }
7870 } else {
7871 instance = new ReactCompositeComponentWrapper(element);
7872 }
7873 } else if (typeof node === 'string' || typeof node === 'number') {
7874 instance = ReactHostComponent.createInstanceForText(node);
7875 } else {
7876 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0;
7877 }
7878
7879 if (process.env.NODE_ENV !== 'production') {
7880 process.env.NODE_ENV !== 'production' ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0;
7881 }
7882
7883 // These two fields are used by the DOM and ART diffing algorithms
7884 // respectively. Instead of using expandos on components, we should be
7885 // storing the state needed by the diffing algorithms elsewhere.
7886 instance._mountIndex = 0;
7887 instance._mountImage = null;
7888
7889 if (process.env.NODE_ENV !== 'production') {
7890 instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0;
7891 }
7892
7893 // Internal instances should fully constructed at this point, so they should
7894 // not get any new fields added to them at this point.
7895 if (process.env.NODE_ENV !== 'production') {
7896 if (Object.preventExtensions) {
7897 Object.preventExtensions(instance);
7898 }
7899 }
7900
7901 return instance;
7902}
7903
7904_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, {
7905 _instantiateReactComponent: instantiateReactComponent
7906});
7907
7908module.exports = instantiateReactComponent;
7909
7910/***/ }),
7911/* 71 */
7912/***/ (function(module, exports, __webpack_require__) {
7913
7914"use strict";
7915/**
7916 * Copyright (c) 2013-present, Facebook, Inc.
7917 *
7918 * This source code is licensed under the MIT license found in the
7919 * LICENSE file in the root directory of this source tree.
7920 *
7921 *
7922 */
7923
7924
7925
7926/**
7927 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
7928 */
7929
7930var supportedInputTypes = {
7931 color: true,
7932 date: true,
7933 datetime: true,
7934 'datetime-local': true,
7935 email: true,
7936 month: true,
7937 number: true,
7938 password: true,
7939 range: true,
7940 search: true,
7941 tel: true,
7942 text: true,
7943 time: true,
7944 url: true,
7945 week: true
7946};
7947
7948function isTextInputElement(elem) {
7949 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
7950
7951 if (nodeName === 'input') {
7952 return !!supportedInputTypes[elem.type];
7953 }
7954
7955 if (nodeName === 'textarea') {
7956 return true;
7957 }
7958
7959 return false;
7960}
7961
7962module.exports = isTextInputElement;
7963
7964/***/ }),
7965/* 72 */
7966/***/ (function(module, exports, __webpack_require__) {
7967
7968"use strict";
7969/**
7970 * Copyright (c) 2013-present, Facebook, Inc.
7971 *
7972 * This source code is licensed under the MIT license found in the
7973 * LICENSE file in the root directory of this source tree.
7974 *
7975 */
7976
7977
7978
7979var ExecutionEnvironment = __webpack_require__(5);
7980var escapeTextContentForBrowser = __webpack_require__(25);
7981var setInnerHTML = __webpack_require__(43);
7982
7983/**
7984 * Set the textContent property of a node, ensuring that whitespace is preserved
7985 * even in IE8. innerText is a poor substitute for textContent and, among many
7986 * issues, inserts <br> instead of the literal newline chars. innerHTML behaves
7987 * as it should.
7988 *
7989 * @param {DOMElement} node
7990 * @param {string} text
7991 * @internal
7992 */
7993var setTextContent = function (node, text) {
7994 if (text) {
7995 var firstChild = node.firstChild;
7996
7997 if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) {
7998 firstChild.nodeValue = text;
7999 return;
8000 }
8001 }
8002 node.textContent = text;
8003};
8004
8005if (ExecutionEnvironment.canUseDOM) {
8006 if (!('textContent' in document.documentElement)) {
8007 setTextContent = function (node, text) {
8008 if (node.nodeType === 3) {
8009 node.nodeValue = text;
8010 return;
8011 }
8012 setInnerHTML(node, escapeTextContentForBrowser(text));
8013 };
8014 }
8015}
8016
8017module.exports = setTextContent;
8018
8019/***/ }),
8020/* 73 */
8021/***/ (function(module, exports, __webpack_require__) {
8022
8023"use strict";
8024/**
8025 * Copyright (c) 2013-present, Facebook, Inc.
8026 *
8027 * This source code is licensed under the MIT license found in the
8028 * LICENSE file in the root directory of this source tree.
8029 *
8030 */
8031
8032
8033
8034/**
8035 * Given a `prevElement` and `nextElement`, determines if the existing
8036 * instance should be updated as opposed to being destroyed or replaced by a new
8037 * instance. Both arguments are elements. This ensures that this logic can
8038 * operate on stateless trees without any backing instance.
8039 *
8040 * @param {?object} prevElement
8041 * @param {?object} nextElement
8042 * @return {boolean} True if the existing instance should be updated.
8043 * @protected
8044 */
8045
8046function shouldUpdateReactComponent(prevElement, nextElement) {
8047 var prevEmpty = prevElement === null || prevElement === false;
8048 var nextEmpty = nextElement === null || nextElement === false;
8049 if (prevEmpty || nextEmpty) {
8050 return prevEmpty === nextEmpty;
8051 }
8052
8053 var prevType = typeof prevElement;
8054 var nextType = typeof nextElement;
8055 if (prevType === 'string' || prevType === 'number') {
8056 return nextType === 'string' || nextType === 'number';
8057 } else {
8058 return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key;
8059 }
8060}
8061
8062module.exports = shouldUpdateReactComponent;
8063
8064/***/ }),
8065/* 74 */
8066/***/ (function(module, exports, __webpack_require__) {
8067
8068"use strict";
8069/**
8070 * Copyright (c) 2013-present, Facebook, Inc.
8071 *
8072 * This source code is licensed under the MIT license found in the
8073 * LICENSE file in the root directory of this source tree.
8074 *
8075 */
8076
8077
8078
8079var _prodInvariant = __webpack_require__(2);
8080
8081var ReactCurrentOwner = __webpack_require__(11);
8082var REACT_ELEMENT_TYPE = __webpack_require__(147);
8083
8084var getIteratorFn = __webpack_require__(183);
8085var invariant = __webpack_require__(0);
8086var KeyEscapeUtils = __webpack_require__(32);
8087var warning = __webpack_require__(1);
8088
8089var SEPARATOR = '.';
8090var SUBSEPARATOR = ':';
8091
8092/**
8093 * This is inlined from ReactElement since this file is shared between
8094 * isomorphic and renderers. We could extract this to a
8095 *
8096 */
8097
8098/**
8099 * TODO: Test that a single child and an array with one item have the same key
8100 * pattern.
8101 */
8102
8103var didWarnAboutMaps = false;
8104
8105/**
8106 * Generate a key string that identifies a component within a set.
8107 *
8108 * @param {*} component A component that could contain a manual key.
8109 * @param {number} index Index that is used if a manual key is not provided.
8110 * @return {string}
8111 */
8112function getComponentKey(component, index) {
8113 // Do some typechecking here since we call this blindly. We want to ensure
8114 // that we don't block potential future ES APIs.
8115 if (component && typeof component === 'object' && component.key != null) {
8116 // Explicit key
8117 return KeyEscapeUtils.escape(component.key);
8118 }
8119 // Implicit key determined by the index in the set
8120 return index.toString(36);
8121}
8122
8123/**
8124 * @param {?*} children Children tree container.
8125 * @param {!string} nameSoFar Name of the key path so far.
8126 * @param {!function} callback Callback to invoke with each child found.
8127 * @param {?*} traverseContext Used to pass information throughout the traversal
8128 * process.
8129 * @return {!number} The number of children in this subtree.
8130 */
8131function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
8132 var type = typeof children;
8133
8134 if (type === 'undefined' || type === 'boolean') {
8135 // All of the above are perceived as null.
8136 children = null;
8137 }
8138
8139 if (children === null || type === 'string' || type === 'number' ||
8140 // The following is inlined from ReactElement. This means we can optimize
8141 // some checks. React Fiber also inlines this logic for similar purposes.
8142 type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
8143 callback(traverseContext, children,
8144 // If it's the only child, treat the name as if it was wrapped in an array
8145 // so that it's consistent if the number of children grows.
8146 nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
8147 return 1;
8148 }
8149
8150 var child;
8151 var nextName;
8152 var subtreeCount = 0; // Count of children found in the current subtree.
8153 var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
8154
8155 if (Array.isArray(children)) {
8156 for (var i = 0; i < children.length; i++) {
8157 child = children[i];
8158 nextName = nextNamePrefix + getComponentKey(child, i);
8159 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
8160 }
8161 } else {
8162 var iteratorFn = getIteratorFn(children);
8163 if (iteratorFn) {
8164 var iterator = iteratorFn.call(children);
8165 var step;
8166 if (iteratorFn !== children.entries) {
8167 var ii = 0;
8168 while (!(step = iterator.next()).done) {
8169 child = step.value;
8170 nextName = nextNamePrefix + getComponentKey(child, ii++);
8171 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
8172 }
8173 } else {
8174 if (process.env.NODE_ENV !== 'production') {
8175 var mapsAsChildrenAddendum = '';
8176 if (ReactCurrentOwner.current) {
8177 var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
8178 if (mapsAsChildrenOwnerName) {
8179 mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
8180 }
8181 }
8182 process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;
8183 didWarnAboutMaps = true;
8184 }
8185 // Iterator will provide entry [k,v] tuples rather than values.
8186 while (!(step = iterator.next()).done) {
8187 var entry = step.value;
8188 if (entry) {
8189 child = entry[1];
8190 nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
8191 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
8192 }
8193 }
8194 }
8195 } else if (type === 'object') {
8196 var addendum = '';
8197 if (process.env.NODE_ENV !== 'production') {
8198 addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
8199 if (children._isReactElement) {
8200 addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.';
8201 }
8202 if (ReactCurrentOwner.current) {
8203 var name = ReactCurrentOwner.current.getName();
8204 if (name) {
8205 addendum += ' Check the render method of `' + name + '`.';
8206 }
8207 }
8208 }
8209 var childrenString = String(children);
8210 true ? process.env.NODE_ENV !== 'production' ? 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) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
8211 }
8212 }
8213
8214 return subtreeCount;
8215}
8216
8217/**
8218 * Traverses children that are typically specified as `props.children`, but
8219 * might also be specified through attributes:
8220 *
8221 * - `traverseAllChildren(this.props.children, ...)`
8222 * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
8223 *
8224 * The `traverseContext` is an optional argument that is passed through the
8225 * entire traversal. It can be used to store accumulations or anything else that
8226 * the callback might find relevant.
8227 *
8228 * @param {?*} children Children tree object.
8229 * @param {!function} callback To invoke upon traversing each child.
8230 * @param {?*} traverseContext Context for traversal.
8231 * @return {!number} The number of children in this subtree.
8232 */
8233function traverseAllChildren(children, callback, traverseContext) {
8234 if (children == null) {
8235 return 0;
8236 }
8237
8238 return traverseAllChildrenImpl(children, '', callback, traverseContext);
8239}
8240
8241module.exports = traverseAllChildren;
8242
8243/***/ }),
8244/* 75 */
8245/***/ (function(module, exports, __webpack_require__) {
8246
8247"use strict";
8248/**
8249 * Copyright (c) 2013-present, Facebook, Inc.
8250 *
8251 * This source code is licensed under the MIT license found in the
8252 * LICENSE file in the root directory of this source tree.
8253 *
8254 */
8255
8256
8257
8258var _prodInvariant = __webpack_require__(14),
8259 _assign = __webpack_require__(3);
8260
8261var ReactNoopUpdateQueue = __webpack_require__(78);
8262
8263var canDefineProperty = __webpack_require__(26);
8264var emptyObject = __webpack_require__(22);
8265var invariant = __webpack_require__(0);
8266var lowPriorityWarning = __webpack_require__(45);
8267
8268/**
8269 * Base class helpers for the updating state of a component.
8270 */
8271function ReactComponent(props, context, updater) {
8272 this.props = props;
8273 this.context = context;
8274 this.refs = emptyObject;
8275 // We initialize the default updater but the real one gets injected by the
8276 // renderer.
8277 this.updater = updater || ReactNoopUpdateQueue;
8278}
8279
8280ReactComponent.prototype.isReactComponent = {};
8281
8282/**
8283 * Sets a subset of the state. Always use this to mutate
8284 * state. You should treat `this.state` as immutable.
8285 *
8286 * There is no guarantee that `this.state` will be immediately updated, so
8287 * accessing `this.state` after calling this method may return the old value.
8288 *
8289 * There is no guarantee that calls to `setState` will run synchronously,
8290 * as they may eventually be batched together. You can provide an optional
8291 * callback that will be executed when the call to setState is actually
8292 * completed.
8293 *
8294 * When a function is provided to setState, it will be called at some point in
8295 * the future (not synchronously). It will be called with the up to date
8296 * component arguments (state, props, context). These values can be different
8297 * from this.* because your function may be called after receiveProps but before
8298 * shouldComponentUpdate, and this new state, props, and context will not yet be
8299 * assigned to this.
8300 *
8301 * @param {object|function} partialState Next partial state or function to
8302 * produce next partial state to be merged with current state.
8303 * @param {?function} callback Called after state is updated.
8304 * @final
8305 * @protected
8306 */
8307ReactComponent.prototype.setState = function (partialState, callback) {
8308 !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0;
8309 this.updater.enqueueSetState(this, partialState);
8310 if (callback) {
8311 this.updater.enqueueCallback(this, callback, 'setState');
8312 }
8313};
8314
8315/**
8316 * Forces an update. This should only be invoked when it is known with
8317 * certainty that we are **not** in a DOM transaction.
8318 *
8319 * You may want to call this when you know that some deeper aspect of the
8320 * component's state has changed but `setState` was not called.
8321 *
8322 * This will not invoke `shouldComponentUpdate`, but it will invoke
8323 * `componentWillUpdate` and `componentDidUpdate`.
8324 *
8325 * @param {?function} callback Called after update is complete.
8326 * @final
8327 * @protected
8328 */
8329ReactComponent.prototype.forceUpdate = function (callback) {
8330 this.updater.enqueueForceUpdate(this);
8331 if (callback) {
8332 this.updater.enqueueCallback(this, callback, 'forceUpdate');
8333 }
8334};
8335
8336/**
8337 * Deprecated APIs. These APIs used to exist on classic React classes but since
8338 * we would like to deprecate them, we're not going to move them over to this
8339 * modern base class. Instead, we define a getter that warns if it's accessed.
8340 */
8341if (process.env.NODE_ENV !== 'production') {
8342 var deprecatedAPIs = {
8343 isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
8344 replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
8345 };
8346 var defineDeprecationWarning = function (methodName, info) {
8347 if (canDefineProperty) {
8348 Object.defineProperty(ReactComponent.prototype, methodName, {
8349 get: function () {
8350 lowPriorityWarning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
8351 return undefined;
8352 }
8353 });
8354 }
8355 };
8356 for (var fnName in deprecatedAPIs) {
8357 if (deprecatedAPIs.hasOwnProperty(fnName)) {
8358 defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
8359 }
8360 }
8361}
8362
8363/**
8364 * Base class helpers for the updating state of a component.
8365 */
8366function ReactPureComponent(props, context, updater) {
8367 // Duplicated from ReactComponent.
8368 this.props = props;
8369 this.context = context;
8370 this.refs = emptyObject;
8371 // We initialize the default updater but the real one gets injected by the
8372 // renderer.
8373 this.updater = updater || ReactNoopUpdateQueue;
8374}
8375
8376function ComponentDummy() {}
8377ComponentDummy.prototype = ReactComponent.prototype;
8378ReactPureComponent.prototype = new ComponentDummy();
8379ReactPureComponent.prototype.constructor = ReactPureComponent;
8380// Avoid an extra prototype jump for these methods.
8381_assign(ReactPureComponent.prototype, ReactComponent.prototype);
8382ReactPureComponent.prototype.isPureReactComponent = true;
8383
8384module.exports = {
8385 Component: ReactComponent,
8386 PureComponent: ReactPureComponent
8387};
8388
8389/***/ }),
8390/* 76 */
8391/***/ (function(module, exports, __webpack_require__) {
8392
8393"use strict";
8394/**
8395 * Copyright (c) 2014-present, Facebook, Inc.
8396 *
8397 * This source code is licensed under the MIT license found in the
8398 * LICENSE file in the root directory of this source tree.
8399 *
8400 *
8401 */
8402
8403
8404
8405// The Symbol used to tag the ReactElement type. If there is no native Symbol
8406// nor polyfill, then a plain number is used for performance.
8407
8408var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
8409
8410module.exports = REACT_ELEMENT_TYPE;
8411
8412/***/ }),
8413/* 77 */
8414/***/ (function(module, exports, __webpack_require__) {
8415
8416"use strict";
8417/**
8418 * Copyright (c) 2014-present, Facebook, Inc.
8419 *
8420 * This source code is licensed under the MIT license found in the
8421 * LICENSE file in the root directory of this source tree.
8422 *
8423 */
8424
8425/**
8426 * ReactElementValidator provides a wrapper around a element factory
8427 * which validates the props passed to the element. This is intended to be
8428 * used only in DEV and could be replaced by a static type checker for languages
8429 * that support it.
8430 */
8431
8432
8433
8434var ReactCurrentOwner = __webpack_require__(11);
8435var ReactComponentTreeHook = __webpack_require__(8);
8436var ReactElement = __webpack_require__(13);
8437
8438var checkReactTypeSpec = __webpack_require__(196);
8439
8440var canDefineProperty = __webpack_require__(26);
8441var getIteratorFn = __webpack_require__(79);
8442var warning = __webpack_require__(1);
8443var lowPriorityWarning = __webpack_require__(45);
8444
8445function getDeclarationErrorAddendum() {
8446 if (ReactCurrentOwner.current) {
8447 var name = ReactCurrentOwner.current.getName();
8448 if (name) {
8449 return ' Check the render method of `' + name + '`.';
8450 }
8451 }
8452 return '';
8453}
8454
8455function getSourceInfoErrorAddendum(elementProps) {
8456 if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
8457 var source = elementProps.__source;
8458 var fileName = source.fileName.replace(/^.*[\\\/]/, '');
8459 var lineNumber = source.lineNumber;
8460 return ' Check your code at ' + fileName + ':' + lineNumber + '.';
8461 }
8462 return '';
8463}
8464
8465/**
8466 * Warn if there's no key explicitly set on dynamic arrays of children or
8467 * object keys are not valid. This allows us to keep track of children between
8468 * updates.
8469 */
8470var ownerHasKeyUseWarning = {};
8471
8472function getCurrentComponentErrorInfo(parentType) {
8473 var info = getDeclarationErrorAddendum();
8474
8475 if (!info) {
8476 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
8477 if (parentName) {
8478 info = ' Check the top-level render call using <' + parentName + '>.';
8479 }
8480 }
8481 return info;
8482}
8483
8484/**
8485 * Warn if the element doesn't have an explicit key assigned to it.
8486 * This element is in an array. The array could grow and shrink or be
8487 * reordered. All children that haven't already been validated are required to
8488 * have a "key" property assigned to it. Error statuses are cached so a warning
8489 * will only be shown once.
8490 *
8491 * @internal
8492 * @param {ReactElement} element Element that requires a key.
8493 * @param {*} parentType element's parent's type.
8494 */
8495function validateExplicitKey(element, parentType) {
8496 if (!element._store || element._store.validated || element.key != null) {
8497 return;
8498 }
8499 element._store.validated = true;
8500
8501 var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {});
8502
8503 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
8504 if (memoizer[currentComponentErrorInfo]) {
8505 return;
8506 }
8507 memoizer[currentComponentErrorInfo] = true;
8508
8509 // Usually the current owner is the offender, but if it accepts children as a
8510 // property, it may be the creator of the child that's responsible for
8511 // assigning it a key.
8512 var childOwner = '';
8513 if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
8514 // Give the component that originally created this child.
8515 childOwner = ' It was passed a child from ' + element._owner.getName() + '.';
8516 }
8517
8518 process.env.NODE_ENV !== 'production' ? 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, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0;
8519}
8520
8521/**
8522 * Ensure that every element either is passed in a static location, in an
8523 * array with an explicit keys property defined, or in an object literal
8524 * with valid key property.
8525 *
8526 * @internal
8527 * @param {ReactNode} node Statically passed child of any type.
8528 * @param {*} parentType node's parent's type.
8529 */
8530function validateChildKeys(node, parentType) {
8531 if (typeof node !== 'object') {
8532 return;
8533 }
8534 if (Array.isArray(node)) {
8535 for (var i = 0; i < node.length; i++) {
8536 var child = node[i];
8537 if (ReactElement.isValidElement(child)) {
8538 validateExplicitKey(child, parentType);
8539 }
8540 }
8541 } else if (ReactElement.isValidElement(node)) {
8542 // This element was passed in a valid location.
8543 if (node._store) {
8544 node._store.validated = true;
8545 }
8546 } else if (node) {
8547 var iteratorFn = getIteratorFn(node);
8548 // Entry iterators provide implicit keys.
8549 if (iteratorFn) {
8550 if (iteratorFn !== node.entries) {
8551 var iterator = iteratorFn.call(node);
8552 var step;
8553 while (!(step = iterator.next()).done) {
8554 if (ReactElement.isValidElement(step.value)) {
8555 validateExplicitKey(step.value, parentType);
8556 }
8557 }
8558 }
8559 }
8560 }
8561}
8562
8563/**
8564 * Given an element, validate that its props follow the propTypes definition,
8565 * provided by the type.
8566 *
8567 * @param {ReactElement} element
8568 */
8569function validatePropTypes(element) {
8570 var componentClass = element.type;
8571 if (typeof componentClass !== 'function') {
8572 return;
8573 }
8574 var name = componentClass.displayName || componentClass.name;
8575 if (componentClass.propTypes) {
8576 checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null);
8577 }
8578 if (typeof componentClass.getDefaultProps === 'function') {
8579 process.env.NODE_ENV !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
8580 }
8581}
8582
8583var ReactElementValidator = {
8584 createElement: function (type, props, children) {
8585 var validType = typeof type === 'string' || typeof type === 'function';
8586 // We warn in this case but don't throw. We expect the element creation to
8587 // succeed and there will likely be errors in render.
8588 if (!validType) {
8589 if (typeof type !== 'function' && typeof type !== 'string') {
8590 var info = '';
8591 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
8592 info += ' You likely forgot to export your component from the file ' + "it's defined in.";
8593 }
8594
8595 var sourceInfo = getSourceInfoErrorAddendum(props);
8596 if (sourceInfo) {
8597 info += sourceInfo;
8598 } else {
8599 info += getDeclarationErrorAddendum();
8600 }
8601
8602 info += ReactComponentTreeHook.getCurrentStackAddendum();
8603
8604 var currentSource = props !== null && props !== undefined && props.__source !== undefined ? props.__source : null;
8605 ReactComponentTreeHook.pushNonStandardWarningStack(true, currentSource);
8606 process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;
8607 ReactComponentTreeHook.popNonStandardWarningStack();
8608 }
8609 }
8610
8611 var element = ReactElement.createElement.apply(this, arguments);
8612
8613 // The result can be nullish if a mock or a custom function is used.
8614 // TODO: Drop this when these are no longer allowed as the type argument.
8615 if (element == null) {
8616 return element;
8617 }
8618
8619 // Skip key warning if the type isn't valid since our key validation logic
8620 // doesn't expect a non-string/function type and can throw confusing errors.
8621 // We don't want exception behavior to differ between dev and prod.
8622 // (Rendering will throw with a helpful message and as soon as the type is
8623 // fixed, the key warnings will appear.)
8624 if (validType) {
8625 for (var i = 2; i < arguments.length; i++) {
8626 validateChildKeys(arguments[i], type);
8627 }
8628 }
8629
8630 validatePropTypes(element);
8631
8632 return element;
8633 },
8634
8635 createFactory: function (type) {
8636 var validatedFactory = ReactElementValidator.createElement.bind(null, type);
8637 // Legacy hook TODO: Warn if this is accessed
8638 validatedFactory.type = type;
8639
8640 if (process.env.NODE_ENV !== 'production') {
8641 if (canDefineProperty) {
8642 Object.defineProperty(validatedFactory, 'type', {
8643 enumerable: false,
8644 get: function () {
8645 lowPriorityWarning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
8646 Object.defineProperty(this, 'type', {
8647 value: type
8648 });
8649 return type;
8650 }
8651 });
8652 }
8653 }
8654
8655 return validatedFactory;
8656 },
8657
8658 cloneElement: function (element, props, children) {
8659 var newElement = ReactElement.cloneElement.apply(this, arguments);
8660 for (var i = 2; i < arguments.length; i++) {
8661 validateChildKeys(arguments[i], newElement.type);
8662 }
8663 validatePropTypes(newElement);
8664 return newElement;
8665 }
8666};
8667
8668module.exports = ReactElementValidator;
8669
8670/***/ }),
8671/* 78 */
8672/***/ (function(module, exports, __webpack_require__) {
8673
8674"use strict";
8675/**
8676 * Copyright (c) 2015-present, Facebook, Inc.
8677 *
8678 * This source code is licensed under the MIT license found in the
8679 * LICENSE file in the root directory of this source tree.
8680 *
8681 */
8682
8683
8684
8685var warning = __webpack_require__(1);
8686
8687function warnNoop(publicInstance, callerName) {
8688 if (process.env.NODE_ENV !== 'production') {
8689 var constructor = publicInstance.constructor;
8690 process.env.NODE_ENV !== 'production' ? 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. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;
8691 }
8692}
8693
8694/**
8695 * This is the abstract API for an update queue.
8696 */
8697var ReactNoopUpdateQueue = {
8698 /**
8699 * Checks whether or not this composite component is mounted.
8700 * @param {ReactClass} publicInstance The instance we want to test.
8701 * @return {boolean} True if mounted, false otherwise.
8702 * @protected
8703 * @final
8704 */
8705 isMounted: function (publicInstance) {
8706 return false;
8707 },
8708
8709 /**
8710 * Enqueue a callback that will be executed after all the pending updates
8711 * have processed.
8712 *
8713 * @param {ReactClass} publicInstance The instance to use as `this` context.
8714 * @param {?function} callback Called after state is updated.
8715 * @internal
8716 */
8717 enqueueCallback: function (publicInstance, callback) {},
8718
8719 /**
8720 * Forces an update. This should only be invoked when it is known with
8721 * certainty that we are **not** in a DOM transaction.
8722 *
8723 * You may want to call this when you know that some deeper aspect of the
8724 * component's state has changed but `setState` was not called.
8725 *
8726 * This will not invoke `shouldComponentUpdate`, but it will invoke
8727 * `componentWillUpdate` and `componentDidUpdate`.
8728 *
8729 * @param {ReactClass} publicInstance The instance that should rerender.
8730 * @internal
8731 */
8732 enqueueForceUpdate: function (publicInstance) {
8733 warnNoop(publicInstance, 'forceUpdate');
8734 },
8735
8736 /**
8737 * Replaces all of the state. Always use this or `setState` to mutate state.
8738 * You should treat `this.state` as immutable.
8739 *
8740 * There is no guarantee that `this.state` will be immediately updated, so
8741 * accessing `this.state` after calling this method may return the old value.
8742 *
8743 * @param {ReactClass} publicInstance The instance that should rerender.
8744 * @param {object} completeState Next state.
8745 * @internal
8746 */
8747 enqueueReplaceState: function (publicInstance, completeState) {
8748 warnNoop(publicInstance, 'replaceState');
8749 },
8750
8751 /**
8752 * Sets a subset of the state. This only exists because _pendingState is
8753 * internal. This provides a merging strategy that is not available to deep
8754 * properties which is confusing. TODO: Expose pendingState or don't use it
8755 * during the merge.
8756 *
8757 * @param {ReactClass} publicInstance The instance that should rerender.
8758 * @param {object} partialState Next partial state to be merged with state.
8759 * @internal
8760 */
8761 enqueueSetState: function (publicInstance, partialState) {
8762 warnNoop(publicInstance, 'setState');
8763 }
8764};
8765
8766module.exports = ReactNoopUpdateQueue;
8767
8768/***/ }),
8769/* 79 */
8770/***/ (function(module, exports, __webpack_require__) {
8771
8772"use strict";
8773/**
8774 * Copyright (c) 2013-present, Facebook, Inc.
8775 *
8776 * This source code is licensed under the MIT license found in the
8777 * LICENSE file in the root directory of this source tree.
8778 *
8779 *
8780 */
8781
8782
8783
8784/* global Symbol */
8785
8786var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
8787var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
8788
8789/**
8790 * Returns the iterator method function contained on the iterable object.
8791 *
8792 * Be sure to invoke the function with the iterable as context:
8793 *
8794 * var iteratorFn = getIteratorFn(myIterable);
8795 * if (iteratorFn) {
8796 * var iterator = iteratorFn.call(myIterable);
8797 * ...
8798 * }
8799 *
8800 * @param {?object} maybeIterable
8801 * @return {?function}
8802 */
8803function getIteratorFn(maybeIterable) {
8804 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
8805 if (typeof iteratorFn === 'function') {
8806 return iteratorFn;
8807 }
8808}
8809
8810module.exports = getIteratorFn;
8811
8812/***/ }),
8813/* 80 */
8814/***/ (function(module, exports) {
8815
8816module.exports = require("async");
8817
8818/***/ }),
8819/* 81 */
8820/***/ (function(module, exports) {
8821
8822module.exports = require("fs");
8823
8824/***/ }),
8825/* 82 */
8826/***/ (function(module, exports) {
8827
8828module.exports = require("path");
8829
8830/***/ }),
8831/* 83 */
8832/***/ (function(module, exports, __webpack_require__) {
8833
8834"use strict";
8835
8836
8837Object.defineProperty(exports, "__esModule", {
8838 value: true
8839});
8840
8841var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
8842
8843var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
8844
8845__webpack_require__(91);
8846
8847var _async = __webpack_require__(80);
8848
8849var _async2 = _interopRequireDefault(_async);
8850
8851var _cookie = __webpack_require__(202);
8852
8853var _cookie2 = _interopRequireDefault(_cookie);
8854
8855var _bodyParser = __webpack_require__(201);
8856
8857var _bodyParser2 = _interopRequireDefault(_bodyParser);
8858
8859var _cookieParser = __webpack_require__(203);
8860
8861var _cookieParser2 = _interopRequireDefault(_cookieParser);
8862
8863var _express = __webpack_require__(205);
8864
8865var _express2 = _interopRequireDefault(_express);
8866
8867var _InternationalizationHandler = __webpack_require__(95);
8868
8869var _InternationalizationHandler2 = _interopRequireDefault(_InternationalizationHandler);
8870
8871var _UniversalPageHandler = __webpack_require__(94);
8872
8873var _UniversalPageHandler2 = _interopRequireDefault(_UniversalPageHandler);
8874
8875var _path = __webpack_require__(82);
8876
8877var _path2 = _interopRequireDefault(_path);
8878
8879var _preconditions = __webpack_require__(211);
8880
8881var _preconditions2 = _interopRequireDefault(_preconditions);
8882
8883var _querystring = __webpack_require__(212);
8884
8885var _querystring2 = _interopRequireDefault(_querystring);
8886
8887var _react = __webpack_require__(46);
8888
8889var _react2 = _interopRequireDefault(_react);
8890
8891var _server = __webpack_require__(187);
8892
8893var _reactRedux = __webpack_require__(213);
8894
8895var _reactRouter = __webpack_require__(214);
8896
8897var _redux = __webpack_require__(215);
8898
8899var _reduxThunk = __webpack_require__(216);
8900
8901var _reduxThunk2 = _interopRequireDefault(_reduxThunk);
8902
8903var _SimpleHtmlRenderer = __webpack_require__(93);
8904
8905var _SimpleHtmlRenderer2 = _interopRequireDefault(_SimpleHtmlRenderer);
8906
8907var _core = __webpack_require__(88);
8908
8909var _resolveToString = __webpack_require__(102);
8910
8911var _resolveToString2 = _interopRequireDefault(_resolveToString);
8912
8913var _forcedomain = __webpack_require__(207);
8914
8915var _forcedomain2 = _interopRequireDefault(_forcedomain);
8916
8917var _url = __webpack_require__(218);
8918
8919var _url2 = _interopRequireDefault(_url);
8920
8921var _rotatingFileStream = __webpack_require__(217);
8922
8923var _rotatingFileStream2 = _interopRequireDefault(_rotatingFileStream);
8924
8925var _morgan = __webpack_require__(209);
8926
8927var _morgan2 = _interopRequireDefault(_morgan);
8928
8929var _fs = __webpack_require__(81);
8930
8931var _fs2 = _interopRequireDefault(_fs);
8932
8933var _parseurl = __webpack_require__(210);
8934
8935var _parseurl2 = _interopRequireDefault(_parseurl);
8936
8937function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8938
8939function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8940
8941var project = __PROJECT__;
8942var logger = global.Logger.getLogger('ExpressUniversalApplicationServer');
8943// Currently supported locale is /{lang}-{country}/*
8944var LOCALE_REGEX = /^\/([a-z]{2})-([a-z]{2})(.*)$/;
8945var LOCALE_DEFAULT = 'id-id';
8946
8947var QS_REGEX = /^\?(.*)$/;
8948
8949var createStoreWithMiddleware = (0, _redux.applyMiddleware)(_reduxThunk2.default)(_redux.createStore);
8950
8951// handle error, so that server won't crash
8952process.on('uncaughtException', function (err) {
8953 console.log("[CRASH] [ERROR] error log: ", err);
8954});
8955
8956var ExpressUniversalApplicationServer = function () {
8957 function ExpressUniversalApplicationServer(options) {
8958 _classCallCheck(this, ExpressUniversalApplicationServer);
8959
8960 var pc = _preconditions2.default.instance(options);
8961 pc.shouldBeDefined('port', 'port must be defined.');
8962 pc.shouldBeDefined('rootApplicationPath', 'rootApplicationPath must be defined.');
8963 pc.shouldBeDefined('rootDeploymentApplicationPath', 'rootDeploymentApplicationPath must be defined.');
8964 this._options = options;
8965 this._app = (0, _express2.default)();
8966 this._routes = this.getRoutes();
8967 this._reducers = this.getReducers();
8968 this._initialize();
8969 }
8970
8971 _createClass(ExpressUniversalApplicationServer, [{
8972 key: '_initialize',
8973 value: function _initialize() {
8974 // this._setupRequestLogMiddleware()
8975 this._setupForceDomain();
8976 this._setupAssetsServing();
8977 this._setupCookieParser();
8978 this._setupBodyParser();
8979 this._setupHtmlRenderer();
8980 this._setupInternationalizedRoutes();
8981 this._setupI18nHandler();
8982 this._setupXSSPrevention();
8983 }
8984 }, {
8985 key: '_setupRequestLogMiddleware',
8986 value: function _setupRequestLogMiddleware() {
8987 var logDirectory = '/logs/' + project.applicationName;
8988 _fs2.default.existsSync(logDirectory) || _fs2.default.mkdirSync(logDirectory);
8989
8990 function pad(num) {
8991 return (num > 9 ? '' : '0') + num;
8992 }
8993
8994 function generator(time, index) {
8995 logger.info('[GENERATOR] Request log rotation ' + time + '-' + index);
8996 if (!time) {
8997 // return request.log
8998 }
8999
9000 var yearMonth = time.getFullYear() + '-' + pad(time.getMonth() + 1);
9001 var day = pad(time.getDate());
9002 var hour = pad(time.getHours());
9003 var minute = pad(time.getMinutes());
9004 var seconds = pad(time.getSeconds());
9005
9006 logger.info('[GENERATOR] ' + logDirectory + '/request-' + yearMonth + '-' + day + '-' + hour + '-' + minute + '-' + seconds + '.log.gz');
9007
9008 return 'request-' + yearMonth + '-' + day + '-' + hour + '-' + minute + '-' + seconds + 'log.gz';
9009 }
9010
9011 this._accessLogStream = (0, _rotatingFileStream2.default)(generator, {
9012 path: logDirectory,
9013 compress: true,
9014 interval: '10s',
9015 rotate: 7
9016 });
9017
9018 logger.info('Setting up morgan (Request Log Middleware)');
9019 this._app.use((0, _morgan2.default)('combined', { stream: this._accessLogStream }));
9020 }
9021 }, {
9022 key: '_setupAssetsServing',
9023 value: function _setupAssetsServing() {
9024 console.log(_path2.default.join(this._options.rootDeploymentApplicationPath, 'build', this._options.environment, 'client'));
9025 // TODO : this should be configurable, but we hard code it for now
9026 var artifactPath = _path2.default.join(this._options.rootDeploymentApplicationPath, 'build', this._options.environment, 'client', __BUILD_ID__);
9027 logger.info('Using ' + artifactPath + ', with ' + project.applicationAssetHost + ' as artifacts serving routes');
9028 this._app.use(project.artifactPath, _express2.default.static(artifactPath));
9029
9030 var assetPath = _path2.default.join(this._options.rootDeploymentApplicationPath, 'build', this._options.environment, 'client');
9031 logger.info('Using ' + assetPath + ', with ' + project.applicationAssetHost + ' as assets serving routes');
9032 this._app.use(project.assetPath, _express2.default.static(assetPath));
9033
9034 var serverDebuggingPath = _path2.default.join(this._options.rootDeploymentApplicationPath, 'build', this._options.environment, 'server', 'debugging');
9035 logger.info('Using ' + serverDebuggingPath + ', with /__dev/assets/server/debugging as server-debugging serving routes');
9036 this._app.use('/__dev/assets/server/debugging', _express2.default.static(serverDebuggingPath));
9037
9038 // TODO : this should be configurable, but we hard code it for now
9039 var staticPath = _path2.default.join(this._options.rootDeploymentApplicationPath, 'assets');
9040 logger.info('Using ' + staticPath + ', with /assets/static as static non-compileable assets serving routes');
9041 this._app.use('/assets/static', _express2.default.static(staticPath));
9042 }
9043 }, {
9044 key: '_setupCookieParser',
9045 value: function _setupCookieParser() {
9046 this._app.use((0, _cookieParser2.default)());
9047 }
9048 }, {
9049 key: '_setupBodyParser',
9050 value: function _setupBodyParser() {
9051 this._app.use(_bodyParser2.default.urlencoded({ extended: true }));
9052 this._app.use(_bodyParser2.default.json());
9053 }
9054 }, {
9055 key: '_setupHtmlRenderer',
9056 value: function _setupHtmlRenderer() {
9057 var htmlRendererOptions = {
9058 path: _path2.default.join(this._options.rootDeploymentApplicationPath, 'html'),
9059 cache: !(this._options.environment === 'development')
9060 };
9061 this._renderer = new _SimpleHtmlRenderer2.default(htmlRendererOptions);
9062 }
9063 }, {
9064 key: '_setupInternationalizedRoutes',
9065 value: function _setupInternationalizedRoutes() {
9066 var finalRoutes = null;
9067 var originalRoutes = this.getRoutes();
9068 var generatedRoutes = [];
9069 this._options.locales.forEach(function (locale) {
9070 var internationalRoute = _react2.default.createElement(
9071 _reactRouter.Route,
9072 { key: locale, path: locale, component: _InternationalizationHandler2.default },
9073 originalRoutes
9074 );
9075 generatedRoutes.push(internationalRoute);
9076 });
9077
9078 generatedRoutes.push(originalRoutes);
9079
9080 finalRoutes = _react2.default.createElement(
9081 _reactRouter.Route,
9082 { path: '/', component: _UniversalPageHandler2.default },
9083 generatedRoutes.map(function (route) {
9084 return route;
9085 })
9086 );
9087
9088 this._routes = finalRoutes;
9089 }
9090 }, {
9091 key: '_setupI18nHandler',
9092 value: function _setupI18nHandler() {
9093 var _this = this;
9094
9095 this._app.use(function (req, res, next) {
9096 var match = LOCALE_REGEX.exec(req.url);
9097 var url = null;
9098 if (match != null) {
9099 var lang = match[1];
9100 var country = match[2];
9101 url = match[3];
9102 req.locale = lang + '-' + country;
9103 } else {
9104 req.locale = LOCALE_DEFAULT;
9105 }
9106 if (_this._options.locales.indexOf(req.locale) >= 0) {
9107 next();
9108 } else {
9109 if (_this._options.locales.length === 0) {
9110 next();
9111 } else {
9112 if (url == null || typeof url === 'undefined' || url.length === 0) {
9113 res.redirect('/');
9114 } else {
9115 res.redirect(url);
9116 }
9117 }
9118 }
9119 });
9120 }
9121 }, {
9122 key: '_setupXSSPrevention',
9123 value: function _setupXSSPrevention() {
9124 this._app.use(function (req, res, next) {
9125 var completeUrl = req.url.toUpperCase();
9126 if (completeUrl.indexOf('SCRIPT') != -1 || completeUrl.indexOf('%3C') != -1 || completeUrl.indexOf('%3E') != -1) {
9127 return res.redirect('/');
9128 } else next();
9129 });
9130 }
9131 }, {
9132 key: '_isIP',
9133 value: function _isIP(host) {
9134 var ipRegex = /^(?!0)(?!.*\.$)((1?\d?\d|25[0-5]|2[0-4]\d)(\.|$)){4}$/;
9135 return ipRegex.test(host);
9136 }
9137 }, {
9138 key: '_setupForceDomain',
9139 value: function _setupForceDomain() {
9140 var protocol = 'http';
9141 if (this._options.forceHttps === true) {
9142 protocol = 'https';
9143 }
9144 var hostName = this._stripProtocol(this._options.applicationHost);
9145 if (!this._isIP(hostName)) {
9146 var parsedApplicationHost = _url2.default.parse(this._options.applicationHost);
9147 if (parsedApplicationHost.port == null) {
9148 this._app.use((0, _forcedomain2.default)({
9149 hostname: parsedApplicationHost.host,
9150 protocol: protocol
9151 }));
9152 }
9153 }
9154 }
9155 }, {
9156 key: '_stripProtocol',
9157 value: function _stripProtocol(url) {
9158 if (url != null && typeof url !== 'undefined') {
9159 var result = url.replace(/.*?:\/\//g, '');
9160 return result;
9161 }
9162 return null;
9163 }
9164 }, {
9165 key: '_handleError500',
9166 value: function _handleError500(message, err, res) {
9167 logger.error(message, err);
9168 if (this._options.environment === 'production') {
9169 res.redirect(this.getErrorHandler());
9170 } else {
9171 var error = '<br />';
9172 if (this._options.environment === 'development') {
9173 if (err != null && typeof err !== 'undefined') {
9174 error += err.stack;
9175 }
9176 }
9177 error = error.replace('\n', '<br />');
9178 this._renderer.render('500.html', function (err, rendered) {
9179 if (err) {
9180 logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 500.', err);
9181 return res.status(500).end('An unknown error occurred when trying to render error 500\n' + err.stack);
9182 } else {
9183 return res.status(500).end((0, _resolveToString2.default)(rendered, { ERROR: error }));
9184 }
9185 });
9186 }
9187 }
9188 }, {
9189 key: '_handleNotFound404',
9190 value: function _handleNotFound404(res) {
9191 this._renderer.render('404.html', function (err, rendered) {
9192 if (err) {
9193 logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 404.', err);
9194 return res.status(500).end('An unknown error occurred when trying to render error 404\n' + err.stack);
9195 } else {
9196 return res.status(404).end((0, _resolveToString2.default)(rendered, {}));
9197 }
9198 });
9199 }
9200 }, {
9201 key: '_runFilterPreFetchStage',
9202 value: function _runFilterPreFetchStage(filterQueue, renderProps, renderedServerComponents, req, res, context) {
9203 var _this2 = this;
9204
9205 if (filterQueue.length > 0) {
9206 var filterFnQueue = [];
9207 filterQueue.reverse().forEach(function (filterFn) {
9208 filterFnQueue.push(function (callback) {
9209 var filterCallContext = {
9210 get: function get() {
9211 return context;
9212 },
9213 next: function next(booleanResult) {
9214 if (typeof booleanResult === 'undefined' || booleanResult == null) {
9215 booleanResult = true;
9216 }
9217 callback(null, booleanResult);
9218 },
9219 redirect: function redirect(_redirect, statusCode) {
9220 callback({ type: 'REDIRECTION', redirect: _redirect, statusCode: statusCode }, false);
9221 },
9222 notFound: function notFound() {
9223 callback({ type: 'NOT_FOUND' }, false);
9224 },
9225 abortWithError: function abortWithError() {
9226 callback({ type: 'SERVER_ERROR' }, false);
9227 }
9228 };
9229 filterFn(filterCallContext);
9230 });
9231 });
9232 _async2.default.series(filterFnQueue, function (err, results) {
9233 if (err) {
9234 if (err.type === 'REDIRECTION') {
9235 var statusCode = err.statusCode ? err.statusCode : 302;
9236 return res.redirect(statusCode, err.redirect);
9237 } else if (err.type === 'NOT_FOUND') {
9238 _this2._renderer.render('404.html', function (err, rendered) {
9239 if (err) {
9240 logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 404.', err);
9241 return res.status(500).end('An unknown error occurred when trying to render error 404\n' + err.stack);
9242 } else {
9243 return res.status(404).end((0, _resolveToString2.default)(rendered, {}));
9244 }
9245 });
9246 } else if (err.type === 'SERVER_ERROR') {
9247 _this2._renderer.render('500.html', function (err, rendered) {
9248 if (err) {
9249 logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 500.', err);
9250 return res.status(500).end('An unknown error occurred when trying to render error 500\n' + err.stack);
9251 } else {
9252 return res.status(500).end((0, _resolveToString2.default)(rendered, {}));
9253 }
9254 });
9255 } else {
9256 _this2._renderer.render('500.html', function (err, rendered) {
9257 if (err) {
9258 logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 500.', err);
9259 return res.status(500).end('An unknown error occurred when trying to render error 500\n' + err.stack);
9260 } else {
9261 return res.status(500).end((0, _resolveToString2.default)(rendered, {}));
9262 }
9263 });
9264 }
9265 } else {
9266 _this2._runFetchStage(renderProps, renderedServerComponents, req, res, context);
9267 }
9268 });
9269 } else {
9270 this._runFetchStage(renderProps, renderedServerComponents, req, res, context);
9271 }
9272 }
9273 }, {
9274 key: '_runFetchStage',
9275 value: function _runFetchStage(renderProps, renderedServerComponents, req, res, context) {
9276 var _this3 = this;
9277
9278 var fetchDataQueue = [];
9279 var dataContextObject = {};
9280
9281 renderedServerComponents.forEach(function (rsc) {
9282 if (rsc.__fetchData != null && typeof rsc.__fetchData !== 'undefined') {
9283 var fnFetchCall = function fnFetchCall(callback) {
9284 setTimeout(function () {
9285 rsc.__fetchData(dataContextObject, context, callback);
9286 }, 1);
9287 };
9288 fetchDataQueue.push(fnFetchCall);
9289 }
9290 });
9291
9292 var reducers = this._reducers;
9293
9294 _async2.default.series(fetchDataQueue, function (err, results) {
9295 if (err) {
9296 return _this3._handleError500('[FETCH_DATA_ERROR] An unknown error occurred when trying to fetch data.', err, res);
9297 } else {
9298 var fetchedDataContext = {};
9299 results.forEach(function (result) {
9300 fetchedDataContext = _extends({}, fetchedDataContext, result);
9301 });
9302
9303 var allReducers = _extends({}, reducers, {
9304 view: _core.serverFetchReducer
9305 });
9306 var store = createStoreWithMiddleware((0, _redux.combineReducers)(allReducers));
9307
9308 store.dispatch({
9309 type: '__SET_VIEW_STATE__',
9310 data: fetchedDataContext
9311 });
9312
9313 var InitialComponent = _react2.default.createElement(
9314 _reactRedux.Provider,
9315 { store: store },
9316 _react2.default.createElement(_reactRouter.RouterContext, renderProps)
9317 );
9318
9319 var postFetchFilterQueue = [];
9320
9321 renderedServerComponents.forEach(function (rsc) {
9322 if (rsc.__postFetchFilter != null && typeof rsc.__postFetchFilter !== 'undefined') {
9323 postFetchFilterQueue = postFetchFilterQueue.concat(rsc.__postFetchFilter);
9324 }
9325 });
9326 _this3._runFilterPostFetchStage(postFetchFilterQueue, store, InitialComponent, renderedServerComponents, req, res, context);
9327 }
9328 });
9329 }
9330 }, {
9331 key: '_runFilterPostFetchStage',
9332 value: function _runFilterPostFetchStage(filterQueue, _store, InitialComponent, renderedServerComponents, req, res, context) {
9333 var _this4 = this;
9334
9335 if (filterQueue.length > 0) {
9336 var filterFnQueue = [];
9337 filterQueue.reverse().forEach(function (filterFn) {
9338 filterFnQueue.push(function (callback) {
9339 var filterCallContext = {
9340 store: function store() {
9341 return _store.getState().view;
9342 },
9343 get: function get() {
9344 return context;
9345 },
9346 next: function next(booleanResult) {
9347 if (typeof booleanResult === 'undefined' || booleanResult == null) {
9348 booleanResult = true;
9349 }
9350 callback(null, booleanResult);
9351 },
9352 redirect: function redirect(_redirect2, statusCode) {
9353 callback({ type: 'REDIRECTION', redirect: _redirect2, statusCode: statusCode }, false);
9354 },
9355 notFound: function notFound() {
9356 callback({ type: 'NOT_FOUND' }, false);
9357 }
9358 };
9359 filterFn(filterCallContext);
9360 });
9361 });
9362 _async2.default.series(filterFnQueue, function (err, results) {
9363 if (err) {
9364 if (err.type === 'REDIRECTION') {
9365 var statusCode = err.statusCode ? err.statusCode : 302;
9366 return res.redirect(statusCode, err.redirect);
9367 } else if (err.type === 'NOT_FOUND') {
9368 _this4._renderer.render('404.html', function (err, rendered) {
9369 if (err) {
9370 logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 404.', err);
9371 return res.status(500).end('An unknown error occurred when trying to render error 404\n' + err.stack);
9372 } else {
9373 return res.status(404).end((0, _resolveToString2.default)(rendered, {}));
9374 }
9375 });
9376 } else {
9377 // TODO what case need to be handled?
9378 }
9379 } else {
9380 _this4._runRenderStage(_store, InitialComponent, renderedServerComponents, req, res, context);
9381 }
9382 });
9383 } else {
9384 this._runRenderStage(_store, InitialComponent, renderedServerComponents, req, res, context);
9385 }
9386 }
9387 }, {
9388 key: '_createCookieSerializationOption',
9389 value: function _createCookieSerializationOption(header) {
9390 var option = {
9391 path: header.path,
9392 domain: header.domain,
9393 version: header.version
9394 };
9395
9396 if (header.maxAge > 0) {
9397 option.maxAge = header.maxAge;
9398 }
9399
9400 return option;
9401 }
9402 }, {
9403 key: '_runSendResponseStage',
9404 value: function _runSendResponseStage(res, PAGE_HTML, context) {
9405 var _this5 = this;
9406
9407 var responseCookies = context.response.cookies;
9408 var responseHeaders = context.response.headers.cookies;
9409
9410 Object.keys(responseCookies).forEach(function (krc) {
9411 var __cookie = responseCookies[krc];
9412 var __cookieHeader = {};
9413 if (responseHeaders != null && typeof responseHeaders !== 'undefined') {
9414 __cookieHeader = responseHeaders[krc];
9415 }
9416 if (__cookie != null && typeof __cookie !== 'undefined') {
9417 var serializedCookie = _cookie2.default.serialize(krc, __cookie, _this5._createCookieSerializationOption(__cookieHeader));
9418 res.append('Set-Cookie', serializedCookie);
9419 }
9420 });
9421 res.set('Content-Type', 'text/html');
9422 res.end(PAGE_HTML);
9423 }
9424 }, {
9425 key: '_runRenderStage',
9426 value: function _runRenderStage(store, InitialComponent, renderedServerComponents, req, res, context) {
9427 var _this6 = this;
9428
9429 var finalRenderPage = 'main.html';
9430 renderedServerComponents.forEach(function (rsc) {
9431 if (rsc.__renderPage != null && typeof rsc.__renderPage !== 'undefined') {
9432 finalRenderPage = rsc.__renderPage;
9433 }
9434 });
9435 var renderBindFnQueue = [];
9436 renderedServerComponents.forEach(function (rsc) {
9437 if (rsc.__renderBindFn != null && typeof rsc.__renderBindFn !== 'undefined') {
9438 var bindFnCall = function bindFnCall(callback) {
9439 setTimeout(function () {
9440 rsc.__renderBindFn(store.getState(), context, callback);
9441 }, 1);
9442 };
9443 renderBindFnQueue.push(bindFnCall);
9444 }
9445 });
9446
9447 if (renderBindFnQueue.length > 0) {
9448 _async2.default.series(renderBindFnQueue, function (err, results) {
9449 if (err) {
9450 return _this6._handleError500('[RENDER_BIND_PHASE] FATAL_ERROR in render data binding phase.', err, res);
9451 } else {
9452 _this6._renderer.render(finalRenderPage, function (err, rendered) {
9453 if (err) {
9454 return _this6._handleError500('[RENDER_VIEW_PHASE] FATAL_ERROR in render view template phase.', err, res);
9455 } else {
9456 var bindData = {};
9457 if (results != null && typeof results !== 'undefined') {
9458 results.forEach(function (r) {
9459 bindData = _extends({}, bindData, r);
9460 });
9461 }
9462 try {
9463 var HTML = (0, _server.renderToStaticMarkup)(InitialComponent);
9464 var PAGE_HTML = (0, _resolveToString2.default)(rendered, _extends({}, bindData, {
9465 HTML: HTML,
9466 DATA: store.getState()
9467 }), { partial: true });
9468 return _this6._runSendResponseStage(res, PAGE_HTML, context);
9469 } catch (err) {
9470 return _this6._handleError500('[RENDER_STATIC_MARKUP_PHASE] FATAL_ERROR in render staticMarkup phase.', err, res);
9471 }
9472 }
9473 });
9474 }
9475 });
9476 } else {
9477 this._renderer.render(finalRenderPage, function (err, rendered) {
9478 if (err) {
9479 return _this6._handleError500('[RENDER_VIEW_PHASE] FATAL_ERROR in render view template phase.', err, res);
9480 } else {
9481 var bindData = {};
9482 try {
9483 var HTML = (0, _server.renderToStaticMarkup)(InitialComponent);
9484 var PAGE_HTML = (0, _resolveToString2.default)(rendered, _extends({}, bindData, {
9485 HTML: HTML,
9486 DATA: store.getState()
9487 }), { partial: true });
9488 return _this6._runSendResponseStage(res, PAGE_HTML, context);
9489 } catch (err) {
9490 return _this6._handleError500('[RENDER_STATIC_MARKUP_PHASE] FATAL_ERROR in render staticMarkup phase.', err, res);
9491 }
9492 }
9493 });
9494 }
9495 }
9496 }, {
9497 key: '_importRequestCookie',
9498 value: function _importRequestCookie(context, req) {
9499 var cookies = req.cookies;
9500 Object.keys(cookies).forEach(function (ck) {
9501 context.request.cookies[ck] = req.cookies[ck];
9502 });
9503 }
9504 }, {
9505 key: '_handleHealthCheck',
9506 value: function _handleHealthCheck(res) {
9507 return res.status(200).send('ok');
9508 }
9509 }, {
9510 key: '_setupRoutingHandler',
9511 value: function _setupRoutingHandler() {
9512 var _this7 = this;
9513
9514 var routes = this._routes;
9515 this._app.use(function (req, res) {
9516 var location = req.url;
9517 var pathname = (0, _parseurl2.default)(req).pathname;
9518 var locale = req.locale;
9519
9520 if (req.url == '/healthz') {
9521 return _this7._handleHealthCheck(res);
9522 }
9523
9524 logger.info('[HANDLING_ROUTE] path: ' + req.url + ', locale: ' + locale);
9525 (0, _reactRouter.match)({ routes: routes, location: location }, function (err, redirectLocation, renderProps) {
9526 if (err) {
9527 return _this7._handleError500('[MATCH_ROUTE_FATAL_ERROR] An unknown error occurred when trying to match routes.', err, res);
9528 }
9529
9530 if (!renderProps) {
9531 logger.info('[ROUTE_NOT_FOUND] path: ' + req.url + ', locale: ' + locale);
9532 return _this7._handleNotFound404(res);
9533 }
9534
9535 var query = {};
9536 var queryStringMatch = QS_REGEX.exec(renderProps.location.search);
9537 var queryString = '';
9538 if (queryStringMatch != null && typeof queryStringMatch !== 'undefined') {
9539 queryString = queryStringMatch[1];
9540 }
9541 if (queryString != null && typeof queryString !== 'undefined') {
9542 query = _querystring2.default.parse(queryString);
9543 }
9544
9545 var simplifiedRoutes = {
9546 name: renderProps.routes[renderProps.routes.length - 1].name,
9547 path: renderProps.routes[renderProps.routes.length - 1].path
9548 };
9549
9550 var context = {
9551 host: _this7._options.applicationHost,
9552 url: req.url,
9553 path: pathname,
9554 locale: locale,
9555 params: renderProps.params,
9556 query: query,
9557 routes: simplifiedRoutes,
9558 environment: _this7._options.environment,
9559 server: true,
9560 client: false,
9561 useragent: req.useragent,
9562 request: {
9563 cookies: {},
9564 headers: {}
9565 },
9566 response: {
9567 cookies: {},
9568 headers: {}
9569 }
9570 };
9571
9572 _this7._importRequestCookie(context, req);
9573
9574 var renderedServerComponents = renderProps.components;
9575 var preFetchFilterQueue = [];
9576
9577 renderedServerComponents.forEach(function (rsc) {
9578 if (rsc.__preFetchFilter != null && typeof rsc.__preFetchFilter !== 'undefined') {
9579 preFetchFilterQueue = preFetchFilterQueue.concat(rsc.__preFetchFilter);
9580 }
9581 });
9582
9583 _this7._runFilterPreFetchStage(preFetchFilterQueue, renderProps, renderedServerComponents, req, res, context);
9584 });
9585 });
9586 }
9587 }, {
9588 key: 'app',
9589 value: function app() {
9590 return this._app;
9591 }
9592 }, {
9593 key: 'getErrorHandler',
9594 value: function getErrorHandler() {
9595 return '/';
9596 }
9597 }, {
9598 key: 'run',
9599 value: function run() {
9600 var _this8 = this;
9601
9602 this._setupRoutingHandler();
9603 this._app.listen(this._options.port, function (err) {
9604 if (err) logger.error(err);else {
9605 logger.info('[EXPRESS_UNIVERSAL_APPLICATION_SERVER] Server listening on port : ' + _this8._options.port);
9606 }
9607 });
9608
9609 var pingApp = (0, _express2.default)();
9610 pingApp.use('/ping', function (req, res) {
9611 res.end('pong');
9612 });
9613 pingApp.listen(this._options.pingPort, function (err) {
9614 if (err) logger.error(err);else {
9615 logger.info('[EXPRESS_UNIVERSAL_APPLICATION_SERVER] Ping server listening on port : ' + _this8._options.pingPort);
9616 }
9617 });
9618 }
9619 }]);
9620
9621 return ExpressUniversalApplicationServer;
9622}();
9623
9624exports.default = ExpressUniversalApplicationServer;
9625module.exports = exports['default'];
9626
9627/***/ }),
9628/* 84 */
9629/***/ (function(module, exports, __webpack_require__) {
9630
9631"use strict";
9632
9633
9634Object.defineProperty(exports, "__esModule", {
9635 value: true
9636});
9637
9638var _ExpressUniversalApplicationServer = __webpack_require__(83);
9639
9640var _ExpressUniversalApplicationServer2 = _interopRequireDefault(_ExpressUniversalApplicationServer);
9641
9642function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9643
9644exports.default = {
9645 CatelaApplicationServer: _ExpressUniversalApplicationServer2.default
9646};
9647module.exports = exports['default'];
9648
9649/***/ }),
9650/* 85 */
9651/***/ (function(module, exports, __webpack_require__) {
9652
9653"use strict";
9654
9655
9656Object.defineProperty(exports, "__esModule", {
9657 value: true
9658});
9659
9660var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
9661
9662function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
9663
9664var DataFetch = function () {
9665 function DataFetch() {
9666 _classCallCheck(this, DataFetch);
9667 }
9668
9669 _createClass(DataFetch, [{
9670 key: "fetch",
9671 value: function fetch(store, context, callback) {}
9672 }]);
9673
9674 return DataFetch;
9675}();
9676
9677exports.default = DataFetch;
9678module.exports = exports["default"];
9679
9680/***/ }),
9681/* 86 */
9682/***/ (function(module, exports, __webpack_require__) {
9683
9684"use strict";
9685
9686
9687Object.defineProperty(exports, "__esModule", {
9688 value: true
9689});
9690
9691var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
9692
9693var _DataFetch2 = __webpack_require__(85);
9694
9695var _DataFetch3 = _interopRequireDefault(_DataFetch2);
9696
9697function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9698
9699function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
9700
9701function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
9702
9703function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
9704
9705var FetchableInstance = function (_DataFetch) {
9706 _inherits(FetchableInstance, _DataFetch);
9707
9708 function FetchableInstance(FetchClass) {
9709 _classCallCheck(this, FetchableInstance);
9710
9711 var _this = _possibleConstructorReturn(this, (FetchableInstance.__proto__ || Object.getPrototypeOf(FetchableInstance)).call(this));
9712
9713 _this._innerFetchInstance = new FetchClass();
9714 _this._innerFetchInstance.disableClient = FetchClass.disableClient;
9715 return _this;
9716 }
9717
9718 _createClass(FetchableInstance, [{
9719 key: 'fetch',
9720 value: function fetch(store, context, callback) {
9721 this._innerFetchInstance.fetch(store, context, function (err, results) {
9722 callback(err, results);
9723 });
9724 }
9725 }, {
9726 key: 'disableClient',
9727 value: function disableClient() {
9728 return this._innerFetchInstance.disableClient;
9729 }
9730 }]);
9731
9732 return FetchableInstance;
9733}(_DataFetch3.default);
9734
9735exports.default = FetchableInstance;
9736module.exports = exports['default'];
9737
9738/***/ }),
9739/* 87 */
9740/***/ (function(module, exports, __webpack_require__) {
9741
9742"use strict";
9743
9744
9745Object.defineProperty(exports, "__esModule", {
9746 value: true
9747});
9748
9749var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
9750
9751var _FetchableInstance = __webpack_require__(86);
9752
9753var _FetchableInstance2 = _interopRequireDefault(_FetchableInstance);
9754
9755function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9756
9757function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
9758
9759var FetchableInstanceFactory = function () {
9760 function FetchableInstanceFactory() {
9761 _classCallCheck(this, FetchableInstanceFactory);
9762
9763 this._dataFetchInstanceCache = new Map();
9764 }
9765
9766 _createClass(FetchableInstanceFactory, [{
9767 key: 'getFetchableInstance',
9768 value: function getFetchableInstance(FetchClass) {
9769 var construct = true;
9770 if (FetchClass.KeyProperty != null && typeof FetchClass.KeyProperty !== 'undefined') {
9771 if (FetchClass.EnableCache === true) {
9772 if (this._dataFetchInstanceCache.get(FetchClass.Key) != null && typeof FetchClass.Key !== 'undefined') {
9773 construct = false;
9774 }
9775 }
9776 }
9777 if (construct) {
9778 var fetchableInstance = new _FetchableInstance2.default(FetchClass);
9779 this._dataFetchInstanceCache.set(FetchClass.KeyProperty, fetchableInstance);
9780 return fetchableInstance;
9781 } else {
9782 return this._dataFetchInstanceCache.get(FetchClass.Key);
9783 }
9784 }
9785 }]);
9786
9787 return FetchableInstanceFactory;
9788}();
9789
9790exports.default = FetchableInstanceFactory;
9791module.exports = exports['default'];
9792
9793/***/ }),
9794/* 88 */
9795/***/ (function(module, exports, __webpack_require__) {
9796
9797"use strict";
9798
9799
9800Object.defineProperty(exports, "__esModule", {
9801 value: true
9802});
9803
9804var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
9805
9806var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
9807
9808var _async = __webpack_require__(80);
9809
9810var _async2 = _interopRequireDefault(_async);
9811
9812var _FetchableInstanceFactory = __webpack_require__(87);
9813
9814var _FetchableInstanceFactory2 = _interopRequireDefault(_FetchableInstanceFactory);
9815
9816var _hoistNonReactStatics = __webpack_require__(208);
9817
9818var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
9819
9820function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9821
9822function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
9823
9824function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
9825
9826function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
9827
9828var fetchableInstanceFactory = new _FetchableInstanceFactory2.default();
9829
9830function getDisplayName(WrappedComponent) {
9831 return WrappedComponent.displayName || WrappedComponent.name || 'Component';
9832}
9833
9834function fetch(fetchClasses) {
9835 return function wrapWithFetch(WrappedComponent) {
9836 var fetchableDisplayName = 'Fetchable(' + getDisplayName(WrappedComponent) + ')';
9837
9838 var FetchableWrappedComponent = function (_WrappedComponent) {
9839 _inherits(FetchableWrappedComponent, _WrappedComponent);
9840
9841 function FetchableWrappedComponent(props, context) {
9842 _classCallCheck(this, FetchableWrappedComponent);
9843
9844 var _this = _possibleConstructorReturn(this, (FetchableWrappedComponent.__proto__ || Object.getPrototypeOf(FetchableWrappedComponent)).call(this, props, context));
9845
9846 _this.fetch = {};
9847 _this.model = _this.context.model;
9848 return _this;
9849 }
9850
9851 _createClass(FetchableWrappedComponent, [{
9852 key: 'render',
9853 value: function render() {
9854 return this.__innerRender();
9855 }
9856 }]);
9857
9858 return FetchableWrappedComponent;
9859 }(WrappedComponent);
9860
9861 FetchableWrappedComponent.displayName = fetchableDisplayName;
9862 FetchableWrappedComponent.prototype.__innerRender = WrappedComponent.prototype.render;
9863 FetchableWrappedComponent.__fetchData = function (store, context, callback) {
9864 if (typeof fetchClasses !== 'undefined' && fetchClasses != null) {
9865 var asyncCalls = {};
9866 Object.keys(fetchClasses).forEach(function (kc) {
9867 asyncCalls[kc] = function (callback) {
9868 var fetchDataInstance = fetchableInstanceFactory.getFetchableInstance(fetchClasses[kc]);
9869 if (fetchDataInstance.disableClient() && !context.server) {
9870 callback(null, []);
9871 } else {
9872 fetchDataInstance.fetch(store, context, function (err, results) {
9873 if (err) {
9874 console.log('[' + kc + '] Unknown error occurred when trying to fetch data. ', err);
9875 callback(err, null);
9876 } else {
9877 store[kc] = results;
9878 callback(null, results);
9879 }
9880 });
9881 }
9882 };
9883 });
9884 _async2.default.series(asyncCalls, function (err, results) {
9885 if (err) {
9886 callback(err, null);
9887 } else {
9888 callback(null, results);
9889 }
9890 });
9891 } else {
9892 callback(null, store);
9893 }
9894 };
9895 return (0, _hoistNonReactStatics2.default)(FetchableWrappedComponent, WrappedComponent);
9896 };
9897}
9898
9899function simpleReducer() {
9900 var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9901 var action = arguments[1];
9902
9903 switch (action.type) {
9904 case '__SET_VIEW_STATE__':
9905 var newState = _extends({}, state, action.data);
9906 return newState;
9907 default:
9908 return state;
9909 }
9910 return state;
9911}
9912
9913exports.default = {
9914 fetch: fetch,
9915 serverFetchReducer: simpleReducer
9916};
9917module.exports = exports['default'];
9918
9919/***/ }),
9920/* 89 */
9921/***/ (function(module, exports, __webpack_require__) {
9922
9923"use strict";
9924
9925
9926Object.defineProperty(exports, "__esModule", {
9927 value: true
9928});
9929
9930var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
9931
9932var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
9933
9934var _fluentLogger = __webpack_require__(206);
9935
9936var _fluentLogger2 = _interopRequireDefault(_fluentLogger);
9937
9938function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9939
9940function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
9941
9942var FluentdLogger = function () {
9943 function FluentdLogger(context) {
9944 _classCallCheck(this, FluentdLogger);
9945
9946 this._context = context;
9947 this._prefix = context;
9948 this.init(context);
9949 }
9950
9951 _createClass(FluentdLogger, [{
9952 key: 'init',
9953 value: function init() {
9954 var application_name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
9955 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9956
9957 this._logger = _fluentLogger2.default.createFluentSender(application_name, _extends({
9958 host: options.host || 'localhost',
9959 application_name: options.application_name || application_name,
9960 port: options.port || 24224,
9961 timeout: options.timeout || 3,
9962 reconnectInterval: options.reconnectInterval || 60000
9963 }, options));
9964 }
9965 }, {
9966 key: 'log',
9967 value: function log(level, _log, data) {
9968 this._logger.emit(level, _extends({}, this._generateDetails(), {
9969 message: _log,
9970 data: data,
9971 tag: [this._context]
9972 }));
9973 }
9974 }, {
9975 key: 'getLogger',
9976 value: function getLogger() {
9977 return this;
9978 }
9979 }, {
9980 key: '_generateDetails',
9981 value: function _generateDetails() {
9982 return {
9983 application_name: this._context,
9984 prefix: this._prefix
9985 };
9986 }
9987 }, {
9988 key: '_extractRequestObject',
9989 value: function _extractRequestObject(req) {
9990 if (!req) return {};
9991 return {
9992 domain: req.domain,
9993 headers: JSON.stringify(req.headers),
9994 url: req.url,
9995 method: req.method,
9996 user_agent: req.get['User-Agent']
9997 };
9998 }
9999 }]);
10000
10001 return FluentdLogger;
10002}();
10003
10004exports.default = FluentdLogger;
10005module.exports = exports['default'];
10006
10007/***/ }),
10008/* 90 */
10009/***/ (function(module, exports, __webpack_require__) {
10010
10011"use strict";
10012
10013
10014Object.defineProperty(exports, "__esModule", {
10015 value: true
10016});
10017
10018var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
10019
10020var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
10021
10022var _winston = __webpack_require__(219);
10023
10024var _winston2 = _interopRequireDefault(_winston);
10025
10026var _winstonDailyRotateFile = __webpack_require__(220);
10027
10028var _winstonDailyRotateFile2 = _interopRequireDefault(_winstonDailyRotateFile);
10029
10030var _FluentdLogger = __webpack_require__(89);
10031
10032var _FluentdLogger2 = _interopRequireDefault(_FluentdLogger);
10033
10034function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10035
10036function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10037
10038_winston2.default.transports.DailyRotateFile = _winstonDailyRotateFile2.default;
10039
10040var LoggerComponent = function () {
10041 function LoggerComponent(context) {
10042 _classCallCheck(this, LoggerComponent);
10043
10044 this._context = context;
10045 this.__logPath = '/logs/' + context;
10046 }
10047
10048 _createClass(LoggerComponent, [{
10049 key: 'initFluentd',
10050 value: function initFluentd() {
10051 var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10052
10053 return new _FluentdLogger2.default(this._context, options);
10054 }
10055 }, {
10056 key: 'initWinston',
10057 value: function initWinston() {
10058 var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10059
10060 return new _winston2.default.Logger(_extends({}, options, {
10061 transports: [new _winston2.default.transports.Console({
10062 colorize: true,
10063 prettyPrint: true
10064 }), new _winston2.default.transports.DailyRotateFile({
10065 tailable: true,
10066 filename: this.__logPath + '/' + this._context,
10067 datePattern: '.yyyy-MM-dd.log',
10068 timestamp: true,
10069 maxFiles: 10,
10070 colorize: true,
10071 prettyPrint: true
10072 })]
10073 }));
10074 }
10075 }, {
10076 key: 'initFluentdWinston',
10077 value: function initFluentdWinston() {
10078 var fluentdOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10079 var winstonOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10080
10081 var winston = this.initWinston(winstonOptions);
10082 var fluentd = this.initFluentd(fluentdOptions);
10083
10084 var log = function log(level, _log, data) {
10085 winston.log(level, _log, data);
10086 fluentd.log(level, _log, data);
10087 };
10088
10089 return _extends({}, winston, fluentd, {
10090 log: log
10091 });
10092 }
10093 }, {
10094 key: 'getLogger',
10095 value: function getLogger() {
10096 return this._logger;
10097 }
10098 }], [{
10099 key: 'setupLogger',
10100 value: function setupLogger(_ref) {
10101 var context = _ref.context,
10102 loggerOptions = _ref.loggerOptions;
10103
10104 var log = loggerOptions || {};
10105 var type = log ? log.type : 'winston';
10106
10107 var lg = new LoggerComponent(context);
10108 if (type === 'fluentd') lg._logger = lg.initFluentd(log.fluentd);else if (type === 'fdw') lg._logger = lg.initFluentdWinston(log.fluentd, log.winston);else lg._logger = lg.initWinston(log.winston);
10109
10110 return lg;
10111 }
10112 }]);
10113
10114 return LoggerComponent;
10115}();
10116
10117var DecoratedContextLogger = function () {
10118 function DecoratedContextLogger(logger, logContextName) {
10119 _classCallCheck(this, DecoratedContextLogger);
10120
10121 this._context = logContextName;
10122 this._logger = logger;
10123 }
10124
10125 _createClass(DecoratedContextLogger, [{
10126 key: 'log',
10127 value: function log(level, _log2, data) {
10128 this._logger.log(level, '[' + this._context + '] ' + _log2, data);
10129 }
10130 }, {
10131 key: 'view',
10132 value: function view(data) {
10133 var dataObj = {};
10134 if (typeof data !== 'undefined' && data !== null) {
10135 dataObj.data = data;
10136 }
10137 this._logger.log('info', '[' + this._context + '] ', dataObj);
10138 }
10139 }, {
10140 key: 'info',
10141 value: function info(log, data) {
10142 var dataObj = {};
10143 if (typeof data !== 'undefined' && data !== null) {
10144 dataObj.data = data;
10145 }
10146 this._logger.log('info', '[' + this._context + '] ' + log, dataObj);
10147 }
10148 }, {
10149 key: 'warn',
10150 value: function warn(log, data) {
10151 var dataObj = {};
10152 if (typeof data !== 'undefined' && data != null) {
10153 dataObj.data = data;
10154 }
10155 this._logger.log('warn', '[' + this._context + '] ' + log, dataObj);
10156 }
10157 }, {
10158 key: 'error',
10159 value: function error(log, exception, data) {
10160 var dataObj = {};
10161 if (typeof data !== 'undefined' && data != null) {
10162 dataObj.data = data;
10163 }
10164 if (typeof exception !== 'undefined' && exception != null) {
10165 dataObj.ex = exception;
10166 }
10167 this._logger.log('error', '[' + this._context + '] ' + log, {
10168 stackTrace: exception.stack,
10169 data: dataObj.data
10170 });
10171 }
10172 }, {
10173 key: 'debug',
10174 value: function debug(log, data) {
10175 var dataObj = {};
10176 if (typeof data !== 'undefined' && data != null) {
10177 dataObj.data = data;
10178 }
10179 this._logger.log('debug', '[' + this._context + '] ' + log, dataObj);
10180 }
10181 }]);
10182
10183 return DecoratedContextLogger;
10184}();
10185
10186var LogManager = function () {
10187 function LogManager(loggerComponent) {
10188 _classCallCheck(this, LogManager);
10189
10190 this._loggerComponent = loggerComponent;
10191 }
10192
10193 _createClass(LogManager, [{
10194 key: 'getLogger',
10195 value: function getLogger(logContextName) {
10196 var decoratedLogger = new DecoratedContextLogger(this._loggerComponent.getLogger(), logContextName);
10197 return decoratedLogger;
10198 }
10199 }]);
10200
10201 return LogManager;
10202}();
10203
10204exports.default = {
10205 /**
10206 * function configure
10207 * @param { string } context this is used for application name or logging context name
10208 * @param { object } logger options for the logger to be used with 'type' [fleutnd, fdw (fluentd & winston), default (winston)] keywords and additional options for related logger
10209 *
10210 */
10211 configure: function configure(_ref2) {
10212 var context = _ref2.context,
10213 loggerOptions = _ref2.loggerOptions;
10214
10215 var contextLoggerComponent = LoggerComponent.setupLogger({
10216 context: context,
10217 loggerOptions: loggerOptions
10218 });
10219
10220 return new LogManager(contextLoggerComponent);
10221 }
10222};
10223module.exports = exports['default'];
10224
10225/***/ }),
10226/* 91 */
10227/***/ (function(module, exports, __webpack_require__) {
10228
10229"use strict";
10230
10231
10232var _LoggerComponent = __webpack_require__(90);
10233
10234var _LoggerComponent2 = _interopRequireDefault(_LoggerComponent);
10235
10236function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10237
10238var project = __PROJECT__;
10239
10240(function installServerLogger() {
10241 if (global.Logger === null || typeof global.Logger === 'undefined') {
10242 global.Logger = _LoggerComponent2.default.configure({
10243 context: project.applicationName,
10244 loggerOptions: project.loggerOptions
10245 });
10246 }
10247})();
10248
10249/***/ }),
10250/* 92 */
10251/***/ (function(module, exports, __webpack_require__) {
10252
10253"use strict";
10254
10255
10256Object.defineProperty(exports, "__esModule", {
10257 value: true
10258});
10259
10260var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
10261
10262function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10263
10264var ServerRenderer = function () {
10265 function ServerRenderer() {
10266 _classCallCheck(this, ServerRenderer);
10267 }
10268
10269 _createClass(ServerRenderer, [{
10270 key: "render",
10271 value: function render(path, callback) {}
10272 }]);
10273
10274 return ServerRenderer;
10275}();
10276
10277exports.default = ServerRenderer;
10278module.exports = exports["default"];
10279
10280/***/ }),
10281/* 93 */
10282/***/ (function(module, exports, __webpack_require__) {
10283
10284"use strict";
10285
10286
10287Object.defineProperty(exports, "__esModule", {
10288 value: true
10289});
10290
10291var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
10292
10293var _compile = __webpack_require__(100);
10294
10295var _compile2 = _interopRequireDefault(_compile);
10296
10297var _fs = __webpack_require__(81);
10298
10299var _fs2 = _interopRequireDefault(_fs);
10300
10301var _path = __webpack_require__(82);
10302
10303var _path2 = _interopRequireDefault(_path);
10304
10305var _ServerRenderer2 = __webpack_require__(92);
10306
10307var _ServerRenderer3 = _interopRequireDefault(_ServerRenderer2);
10308
10309function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10310
10311function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10312
10313function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
10314
10315function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
10316
10317var logger = global.Logger.getLogger('SimpleHtmlRenderer');
10318
10319var SimpleHtmlRenderer = function (_ServerRenderer) {
10320 _inherits(SimpleHtmlRenderer, _ServerRenderer);
10321
10322 function SimpleHtmlRenderer(options) {
10323 _classCallCheck(this, SimpleHtmlRenderer);
10324
10325 var _this = _possibleConstructorReturn(this, (SimpleHtmlRenderer.__proto__ || Object.getPrototypeOf(SimpleHtmlRenderer)).call(this));
10326
10327 _this._options = options;
10328 _this._pageCache = {};
10329 return _this;
10330 }
10331
10332 _createClass(SimpleHtmlRenderer, [{
10333 key: '_loadHtml',
10334 value: function _loadHtml(htmlPath, callback) {
10335 var _this2 = this;
10336
10337 logger.info('[RENDERING]', htmlPath);
10338 _fs2.default.readFile(htmlPath, function (err, data) {
10339 if (err) {
10340 callback(err, null);
10341 } else {
10342 var start = new Date().getTime();
10343 var htmlTemplate = (0, _compile2.default)(data.toString());
10344 var end = new Date().getTime();
10345 var elapsed = end - start;
10346 logger.info('[TEMPLATE_COMPILATION] Finish compiling ' + htmlPath + ', elapsed: ' + elapsed + 'ms');
10347 if (_this2._options.cache) {
10348 logger.info('[TEMPLATE_CACHING] Caching ' + htmlPath);
10349 _this2._pageCache[htmlPath] = htmlTemplate;
10350 }
10351 end = new Date().getTime();
10352 elapsed = end - start;
10353 logger.info('[FINISH_RENDERING] ' + htmlPath + ' in: ' + elapsed + 'ms');
10354 callback(null, htmlTemplate);
10355 }
10356 });
10357 }
10358 }, {
10359 key: 'render',
10360 value: function render(file, callback) {
10361 var basePath = this._options.path;
10362 var finalPath = _path2.default.join(basePath, file);
10363 if (this._pageCache[finalPath] == null || typeof this._pageCache[finalPath] === 'undefined') {
10364 this._loadHtml(finalPath, callback);
10365 } else {
10366 callback(null, this._pageCache[finalPath]);
10367 }
10368 }
10369 }]);
10370
10371 return SimpleHtmlRenderer;
10372}(_ServerRenderer3.default);
10373
10374exports.default = SimpleHtmlRenderer;
10375module.exports = exports['default'];
10376
10377/***/ }),
10378/* 94 */
10379/***/ (function(module, exports, __webpack_require__) {
10380
10381"use strict";
10382
10383
10384Object.defineProperty(exports, "__esModule", {
10385 value: true
10386});
10387
10388var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
10389
10390var _react = __webpack_require__(46);
10391
10392var _react2 = _interopRequireDefault(_react);
10393
10394function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10395
10396function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10397
10398function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
10399
10400function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
10401
10402var UniversalPageHandler = function (_React$Component) {
10403 _inherits(UniversalPageHandler, _React$Component);
10404
10405 function UniversalPageHandler() {
10406 _classCallCheck(this, UniversalPageHandler);
10407
10408 return _possibleConstructorReturn(this, (UniversalPageHandler.__proto__ || Object.getPrototypeOf(UniversalPageHandler)).apply(this, arguments));
10409 }
10410
10411 _createClass(UniversalPageHandler, [{
10412 key: 'render',
10413 value: function render() {
10414 return _react2.default.createElement(
10415 'div',
10416 null,
10417 this.props.children
10418 );
10419 }
10420 }]);
10421
10422 return UniversalPageHandler;
10423}(_react2.default.Component);
10424
10425UniversalPageHandler.propTypes = {
10426 children: _react2.default.PropTypes.any
10427};
10428
10429exports.default = UniversalPageHandler;
10430module.exports = exports['default'];
10431
10432/***/ }),
10433/* 95 */
10434/***/ (function(module, exports, __webpack_require__) {
10435
10436"use strict";
10437
10438
10439Object.defineProperty(exports, "__esModule", {
10440 value: true
10441});
10442
10443var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
10444
10445var _react = __webpack_require__(46);
10446
10447var _react2 = _interopRequireDefault(_react);
10448
10449function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10450
10451function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10452
10453function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
10454
10455function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
10456
10457var InternationalizationHandler = function (_React$Component) {
10458 _inherits(InternationalizationHandler, _React$Component);
10459
10460 function InternationalizationHandler() {
10461 _classCallCheck(this, InternationalizationHandler);
10462
10463 return _possibleConstructorReturn(this, (InternationalizationHandler.__proto__ || Object.getPrototypeOf(InternationalizationHandler)).call(this));
10464 }
10465
10466 _createClass(InternationalizationHandler, [{
10467 key: 'render',
10468 value: function render() {
10469 return _react2.default.createElement(
10470 'div',
10471 null,
10472 this.props.children
10473 );
10474 }
10475 }]);
10476
10477 return InternationalizationHandler;
10478}(_react2.default.Component);
10479
10480InternationalizationHandler.propTypes = {
10481 children: _react2.default.PropTypes.any
10482};
10483
10484InternationalizationHandler.contextTypes = {
10485 intl: _react2.default.PropTypes.object
10486};
10487
10488exports.default = InternationalizationHandler;
10489module.exports = exports['default'];
10490
10491/***/ }),
10492/* 96 */
10493/***/ (function(module, exports, __webpack_require__) {
10494
10495"use strict";
10496/**
10497 * Copyright (c) 2013-present, Facebook, Inc.
10498 *
10499 * This source code is licensed under the MIT license found in the
10500 * LICENSE file in the root directory of this source tree.
10501 *
10502 */
10503
10504
10505
10506var _assign = __webpack_require__(3);
10507
10508var emptyObject = __webpack_require__(22);
10509var _invariant = __webpack_require__(0);
10510
10511if (process.env.NODE_ENV !== 'production') {
10512 var warning = __webpack_require__(1);
10513}
10514
10515var MIXINS_KEY = 'mixins';
10516
10517// Helper function to allow the creation of anonymous functions which do not
10518// have .name set to the name of the variable being assigned to.
10519function identity(fn) {
10520 return fn;
10521}
10522
10523var ReactPropTypeLocationNames;
10524if (process.env.NODE_ENV !== 'production') {
10525 ReactPropTypeLocationNames = {
10526 prop: 'prop',
10527 context: 'context',
10528 childContext: 'child context'
10529 };
10530} else {
10531 ReactPropTypeLocationNames = {};
10532}
10533
10534function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
10535 /**
10536 * Policies that describe methods in `ReactClassInterface`.
10537 */
10538
10539 var injectedMixins = [];
10540
10541 /**
10542 * Composite components are higher-level components that compose other composite
10543 * or host components.
10544 *
10545 * To create a new type of `ReactClass`, pass a specification of
10546 * your new class to `React.createClass`. The only requirement of your class
10547 * specification is that you implement a `render` method.
10548 *
10549 * var MyComponent = React.createClass({
10550 * render: function() {
10551 * return <div>Hello World</div>;
10552 * }
10553 * });
10554 *
10555 * The class specification supports a specific protocol of methods that have
10556 * special meaning (e.g. `render`). See `ReactClassInterface` for
10557 * more the comprehensive protocol. Any other properties and methods in the
10558 * class specification will be available on the prototype.
10559 *
10560 * @interface ReactClassInterface
10561 * @internal
10562 */
10563 var ReactClassInterface = {
10564 /**
10565 * An array of Mixin objects to include when defining your component.
10566 *
10567 * @type {array}
10568 * @optional
10569 */
10570 mixins: 'DEFINE_MANY',
10571
10572 /**
10573 * An object containing properties and methods that should be defined on
10574 * the component's constructor instead of its prototype (static methods).
10575 *
10576 * @type {object}
10577 * @optional
10578 */
10579 statics: 'DEFINE_MANY',
10580
10581 /**
10582 * Definition of prop types for this component.
10583 *
10584 * @type {object}
10585 * @optional
10586 */
10587 propTypes: 'DEFINE_MANY',
10588
10589 /**
10590 * Definition of context types for this component.
10591 *
10592 * @type {object}
10593 * @optional
10594 */
10595 contextTypes: 'DEFINE_MANY',
10596
10597 /**
10598 * Definition of context types this component sets for its children.
10599 *
10600 * @type {object}
10601 * @optional
10602 */
10603 childContextTypes: 'DEFINE_MANY',
10604
10605 // ==== Definition methods ====
10606
10607 /**
10608 * Invoked when the component is mounted. Values in the mapping will be set on
10609 * `this.props` if that prop is not specified (i.e. using an `in` check).
10610 *
10611 * This method is invoked before `getInitialState` and therefore cannot rely
10612 * on `this.state` or use `this.setState`.
10613 *
10614 * @return {object}
10615 * @optional
10616 */
10617 getDefaultProps: 'DEFINE_MANY_MERGED',
10618
10619 /**
10620 * Invoked once before the component is mounted. The return value will be used
10621 * as the initial value of `this.state`.
10622 *
10623 * getInitialState: function() {
10624 * return {
10625 * isOn: false,
10626 * fooBaz: new BazFoo()
10627 * }
10628 * }
10629 *
10630 * @return {object}
10631 * @optional
10632 */
10633 getInitialState: 'DEFINE_MANY_MERGED',
10634
10635 /**
10636 * @return {object}
10637 * @optional
10638 */
10639 getChildContext: 'DEFINE_MANY_MERGED',
10640
10641 /**
10642 * Uses props from `this.props` and state from `this.state` to render the
10643 * structure of the component.
10644 *
10645 * No guarantees are made about when or how often this method is invoked, so
10646 * it must not have side effects.
10647 *
10648 * render: function() {
10649 * var name = this.props.name;
10650 * return <div>Hello, {name}!</div>;
10651 * }
10652 *
10653 * @return {ReactComponent}
10654 * @required
10655 */
10656 render: 'DEFINE_ONCE',
10657
10658 // ==== Delegate methods ====
10659
10660 /**
10661 * Invoked when the component is initially created and about to be mounted.
10662 * This may have side effects, but any external subscriptions or data created
10663 * by this method must be cleaned up in `componentWillUnmount`.
10664 *
10665 * @optional
10666 */
10667 componentWillMount: 'DEFINE_MANY',
10668
10669 /**
10670 * Invoked when the component has been mounted and has a DOM representation.
10671 * However, there is no guarantee that the DOM node is in the document.
10672 *
10673 * Use this as an opportunity to operate on the DOM when the component has
10674 * been mounted (initialized and rendered) for the first time.
10675 *
10676 * @param {DOMElement} rootNode DOM element representing the component.
10677 * @optional
10678 */
10679 componentDidMount: 'DEFINE_MANY',
10680
10681 /**
10682 * Invoked before the component receives new props.
10683 *
10684 * Use this as an opportunity to react to a prop transition by updating the
10685 * state using `this.setState`. Current props are accessed via `this.props`.
10686 *
10687 * componentWillReceiveProps: function(nextProps, nextContext) {
10688 * this.setState({
10689 * likesIncreasing: nextProps.likeCount > this.props.likeCount
10690 * });
10691 * }
10692 *
10693 * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
10694 * transition may cause a state change, but the opposite is not true. If you
10695 * need it, you are probably looking for `componentWillUpdate`.
10696 *
10697 * @param {object} nextProps
10698 * @optional
10699 */
10700 componentWillReceiveProps: 'DEFINE_MANY',
10701
10702 /**
10703 * Invoked while deciding if the component should be updated as a result of
10704 * receiving new props, state and/or context.
10705 *
10706 * Use this as an opportunity to `return false` when you're certain that the
10707 * transition to the new props/state/context will not require a component
10708 * update.
10709 *
10710 * shouldComponentUpdate: function(nextProps, nextState, nextContext) {
10711 * return !equal(nextProps, this.props) ||
10712 * !equal(nextState, this.state) ||
10713 * !equal(nextContext, this.context);
10714 * }
10715 *
10716 * @param {object} nextProps
10717 * @param {?object} nextState
10718 * @param {?object} nextContext
10719 * @return {boolean} True if the component should update.
10720 * @optional
10721 */
10722 shouldComponentUpdate: 'DEFINE_ONCE',
10723
10724 /**
10725 * Invoked when the component is about to update due to a transition from
10726 * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
10727 * and `nextContext`.
10728 *
10729 * Use this as an opportunity to perform preparation before an update occurs.
10730 *
10731 * NOTE: You **cannot** use `this.setState()` in this method.
10732 *
10733 * @param {object} nextProps
10734 * @param {?object} nextState
10735 * @param {?object} nextContext
10736 * @param {ReactReconcileTransaction} transaction
10737 * @optional
10738 */
10739 componentWillUpdate: 'DEFINE_MANY',
10740
10741 /**
10742 * Invoked when the component's DOM representation has been updated.
10743 *
10744 * Use this as an opportunity to operate on the DOM when the component has
10745 * been updated.
10746 *
10747 * @param {object} prevProps
10748 * @param {?object} prevState
10749 * @param {?object} prevContext
10750 * @param {DOMElement} rootNode DOM element representing the component.
10751 * @optional
10752 */
10753 componentDidUpdate: 'DEFINE_MANY',
10754
10755 /**
10756 * Invoked when the component is about to be removed from its parent and have
10757 * its DOM representation destroyed.
10758 *
10759 * Use this as an opportunity to deallocate any external resources.
10760 *
10761 * NOTE: There is no `componentDidUnmount` since your component will have been
10762 * destroyed by that point.
10763 *
10764 * @optional
10765 */
10766 componentWillUnmount: 'DEFINE_MANY',
10767
10768 /**
10769 * Replacement for (deprecated) `componentWillMount`.
10770 *
10771 * @optional
10772 */
10773 UNSAFE_componentWillMount: 'DEFINE_MANY',
10774
10775 /**
10776 * Replacement for (deprecated) `componentWillReceiveProps`.
10777 *
10778 * @optional
10779 */
10780 UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',
10781
10782 /**
10783 * Replacement for (deprecated) `componentWillUpdate`.
10784 *
10785 * @optional
10786 */
10787 UNSAFE_componentWillUpdate: 'DEFINE_MANY',
10788
10789 // ==== Advanced methods ====
10790
10791 /**
10792 * Updates the component's currently mounted DOM representation.
10793 *
10794 * By default, this implements React's rendering and reconciliation algorithm.
10795 * Sophisticated clients may wish to override this.
10796 *
10797 * @param {ReactReconcileTransaction} transaction
10798 * @internal
10799 * @overridable
10800 */
10801 updateComponent: 'OVERRIDE_BASE'
10802 };
10803
10804 /**
10805 * Similar to ReactClassInterface but for static methods.
10806 */
10807 var ReactClassStaticInterface = {
10808 /**
10809 * This method is invoked after a component is instantiated and when it
10810 * receives new props. Return an object to update state in response to
10811 * prop changes. Return null to indicate no change to state.
10812 *
10813 * If an object is returned, its keys will be merged into the existing state.
10814 *
10815 * @return {object || null}
10816 * @optional
10817 */
10818 getDerivedStateFromProps: 'DEFINE_MANY_MERGED'
10819 };
10820
10821 /**
10822 * Mapping from class specification keys to special processing functions.
10823 *
10824 * Although these are declared like instance properties in the specification
10825 * when defining classes using `React.createClass`, they are actually static
10826 * and are accessible on the constructor instead of the prototype. Despite
10827 * being static, they must be defined outside of the "statics" key under
10828 * which all other static methods are defined.
10829 */
10830 var RESERVED_SPEC_KEYS = {
10831 displayName: function(Constructor, displayName) {
10832 Constructor.displayName = displayName;
10833 },
10834 mixins: function(Constructor, mixins) {
10835 if (mixins) {
10836 for (var i = 0; i < mixins.length; i++) {
10837 mixSpecIntoComponent(Constructor, mixins[i]);
10838 }
10839 }
10840 },
10841 childContextTypes: function(Constructor, childContextTypes) {
10842 if (process.env.NODE_ENV !== 'production') {
10843 validateTypeDef(Constructor, childContextTypes, 'childContext');
10844 }
10845 Constructor.childContextTypes = _assign(
10846 {},
10847 Constructor.childContextTypes,
10848 childContextTypes
10849 );
10850 },
10851 contextTypes: function(Constructor, contextTypes) {
10852 if (process.env.NODE_ENV !== 'production') {
10853 validateTypeDef(Constructor, contextTypes, 'context');
10854 }
10855 Constructor.contextTypes = _assign(
10856 {},
10857 Constructor.contextTypes,
10858 contextTypes
10859 );
10860 },
10861 /**
10862 * Special case getDefaultProps which should move into statics but requires
10863 * automatic merging.
10864 */
10865 getDefaultProps: function(Constructor, getDefaultProps) {
10866 if (Constructor.getDefaultProps) {
10867 Constructor.getDefaultProps = createMergedResultFunction(
10868 Constructor.getDefaultProps,
10869 getDefaultProps
10870 );
10871 } else {
10872 Constructor.getDefaultProps = getDefaultProps;
10873 }
10874 },
10875 propTypes: function(Constructor, propTypes) {
10876 if (process.env.NODE_ENV !== 'production') {
10877 validateTypeDef(Constructor, propTypes, 'prop');
10878 }
10879 Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
10880 },
10881 statics: function(Constructor, statics) {
10882 mixStaticSpecIntoComponent(Constructor, statics);
10883 },
10884 autobind: function() {}
10885 };
10886
10887 function validateTypeDef(Constructor, typeDef, location) {
10888 for (var propName in typeDef) {
10889 if (typeDef.hasOwnProperty(propName)) {
10890 // use a warning instead of an _invariant so components
10891 // don't show up in prod but only in __DEV__
10892 if (process.env.NODE_ENV !== 'production') {
10893 warning(
10894 typeof typeDef[propName] === 'function',
10895 '%s: %s type `%s` is invalid; it must be a function, usually from ' +
10896 'React.PropTypes.',
10897 Constructor.displayName || 'ReactClass',
10898 ReactPropTypeLocationNames[location],
10899 propName
10900 );
10901 }
10902 }
10903 }
10904 }
10905
10906 function validateMethodOverride(isAlreadyDefined, name) {
10907 var specPolicy = ReactClassInterface.hasOwnProperty(name)
10908 ? ReactClassInterface[name]
10909 : null;
10910
10911 // Disallow overriding of base class methods unless explicitly allowed.
10912 if (ReactClassMixin.hasOwnProperty(name)) {
10913 _invariant(
10914 specPolicy === 'OVERRIDE_BASE',
10915 'ReactClassInterface: You are attempting to override ' +
10916 '`%s` from your class specification. Ensure that your method names ' +
10917 'do not overlap with React methods.',
10918 name
10919 );
10920 }
10921
10922 // Disallow defining methods more than once unless explicitly allowed.
10923 if (isAlreadyDefined) {
10924 _invariant(
10925 specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',
10926 'ReactClassInterface: You are attempting to define ' +
10927 '`%s` on your component more than once. This conflict may be due ' +
10928 'to a mixin.',
10929 name
10930 );
10931 }
10932 }
10933
10934 /**
10935 * Mixin helper which handles policy validation and reserved
10936 * specification keys when building React classes.
10937 */
10938 function mixSpecIntoComponent(Constructor, spec) {
10939 if (!spec) {
10940 if (process.env.NODE_ENV !== 'production') {
10941 var typeofSpec = typeof spec;
10942 var isMixinValid = typeofSpec === 'object' && spec !== null;
10943
10944 if (process.env.NODE_ENV !== 'production') {
10945 warning(
10946 isMixinValid,
10947 "%s: You're attempting to include a mixin that is either null " +
10948 'or not an object. Check the mixins included by the component, ' +
10949 'as well as any mixins they include themselves. ' +
10950 'Expected object but got %s.',
10951 Constructor.displayName || 'ReactClass',
10952 spec === null ? null : typeofSpec
10953 );
10954 }
10955 }
10956
10957 return;
10958 }
10959
10960 _invariant(
10961 typeof spec !== 'function',
10962 "ReactClass: You're attempting to " +
10963 'use a component class or function as a mixin. Instead, just use a ' +
10964 'regular object.'
10965 );
10966 _invariant(
10967 !isValidElement(spec),
10968 "ReactClass: You're attempting to " +
10969 'use a component as a mixin. Instead, just use a regular object.'
10970 );
10971
10972 var proto = Constructor.prototype;
10973 var autoBindPairs = proto.__reactAutoBindPairs;
10974
10975 // By handling mixins before any other properties, we ensure the same
10976 // chaining order is applied to methods with DEFINE_MANY policy, whether
10977 // mixins are listed before or after these methods in the spec.
10978 if (spec.hasOwnProperty(MIXINS_KEY)) {
10979 RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
10980 }
10981
10982 for (var name in spec) {
10983 if (!spec.hasOwnProperty(name)) {
10984 continue;
10985 }
10986
10987 if (name === MIXINS_KEY) {
10988 // We have already handled mixins in a special case above.
10989 continue;
10990 }
10991
10992 var property = spec[name];
10993 var isAlreadyDefined = proto.hasOwnProperty(name);
10994 validateMethodOverride(isAlreadyDefined, name);
10995
10996 if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
10997 RESERVED_SPEC_KEYS[name](Constructor, property);
10998 } else {
10999 // Setup methods on prototype:
11000 // The following member methods should not be automatically bound:
11001 // 1. Expected ReactClass methods (in the "interface").
11002 // 2. Overridden methods (that were mixed in).
11003 var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
11004 var isFunction = typeof property === 'function';
11005 var shouldAutoBind =
11006 isFunction &&
11007 !isReactClassMethod &&
11008 !isAlreadyDefined &&
11009 spec.autobind !== false;
11010
11011 if (shouldAutoBind) {
11012 autoBindPairs.push(name, property);
11013 proto[name] = property;
11014 } else {
11015 if (isAlreadyDefined) {
11016 var specPolicy = ReactClassInterface[name];
11017
11018 // These cases should already be caught by validateMethodOverride.
11019 _invariant(
11020 isReactClassMethod &&
11021 (specPolicy === 'DEFINE_MANY_MERGED' ||
11022 specPolicy === 'DEFINE_MANY'),
11023 'ReactClass: Unexpected spec policy %s for key %s ' +
11024 'when mixing in component specs.',
11025 specPolicy,
11026 name
11027 );
11028
11029 // For methods which are defined more than once, call the existing
11030 // methods before calling the new property, merging if appropriate.
11031 if (specPolicy === 'DEFINE_MANY_MERGED') {
11032 proto[name] = createMergedResultFunction(proto[name], property);
11033 } else if (specPolicy === 'DEFINE_MANY') {
11034 proto[name] = createChainedFunction(proto[name], property);
11035 }
11036 } else {
11037 proto[name] = property;
11038 if (process.env.NODE_ENV !== 'production') {
11039 // Add verbose displayName to the function, which helps when looking
11040 // at profiling tools.
11041 if (typeof property === 'function' && spec.displayName) {
11042 proto[name].displayName = spec.displayName + '_' + name;
11043 }
11044 }
11045 }
11046 }
11047 }
11048 }
11049 }
11050
11051 function mixStaticSpecIntoComponent(Constructor, statics) {
11052 if (!statics) {
11053 return;
11054 }
11055
11056 for (var name in statics) {
11057 var property = statics[name];
11058 if (!statics.hasOwnProperty(name)) {
11059 continue;
11060 }
11061
11062 var isReserved = name in RESERVED_SPEC_KEYS;
11063 _invariant(
11064 !isReserved,
11065 'ReactClass: You are attempting to define a reserved ' +
11066 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +
11067 'as an instance property instead; it will still be accessible on the ' +
11068 'constructor.',
11069 name
11070 );
11071
11072 var isAlreadyDefined = name in Constructor;
11073 if (isAlreadyDefined) {
11074 var specPolicy = ReactClassStaticInterface.hasOwnProperty(name)
11075 ? ReactClassStaticInterface[name]
11076 : null;
11077
11078 _invariant(
11079 specPolicy === 'DEFINE_MANY_MERGED',
11080 'ReactClass: You are attempting to define ' +
11081 '`%s` on your component more than once. This conflict may be ' +
11082 'due to a mixin.',
11083 name
11084 );
11085
11086 Constructor[name] = createMergedResultFunction(Constructor[name], property);
11087
11088 return;
11089 }
11090
11091 Constructor[name] = property;
11092 }
11093 }
11094
11095 /**
11096 * Merge two objects, but throw if both contain the same key.
11097 *
11098 * @param {object} one The first object, which is mutated.
11099 * @param {object} two The second object
11100 * @return {object} one after it has been mutated to contain everything in two.
11101 */
11102 function mergeIntoWithNoDuplicateKeys(one, two) {
11103 _invariant(
11104 one && two && typeof one === 'object' && typeof two === 'object',
11105 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
11106 );
11107
11108 for (var key in two) {
11109 if (two.hasOwnProperty(key)) {
11110 _invariant(
11111 one[key] === undefined,
11112 'mergeIntoWithNoDuplicateKeys(): ' +
11113 'Tried to merge two objects with the same key: `%s`. This conflict ' +
11114 'may be due to a mixin; in particular, this may be caused by two ' +
11115 'getInitialState() or getDefaultProps() methods returning objects ' +
11116 'with clashing keys.',
11117 key
11118 );
11119 one[key] = two[key];
11120 }
11121 }
11122 return one;
11123 }
11124
11125 /**
11126 * Creates a function that invokes two functions and merges their return values.
11127 *
11128 * @param {function} one Function to invoke first.
11129 * @param {function} two Function to invoke second.
11130 * @return {function} Function that invokes the two argument functions.
11131 * @private
11132 */
11133 function createMergedResultFunction(one, two) {
11134 return function mergedResult() {
11135 var a = one.apply(this, arguments);
11136 var b = two.apply(this, arguments);
11137 if (a == null) {
11138 return b;
11139 } else if (b == null) {
11140 return a;
11141 }
11142 var c = {};
11143 mergeIntoWithNoDuplicateKeys(c, a);
11144 mergeIntoWithNoDuplicateKeys(c, b);
11145 return c;
11146 };
11147 }
11148
11149 /**
11150 * Creates a function that invokes two functions and ignores their return vales.
11151 *
11152 * @param {function} one Function to invoke first.
11153 * @param {function} two Function to invoke second.
11154 * @return {function} Function that invokes the two argument functions.
11155 * @private
11156 */
11157 function createChainedFunction(one, two) {
11158 return function chainedFunction() {
11159 one.apply(this, arguments);
11160 two.apply(this, arguments);
11161 };
11162 }
11163
11164 /**
11165 * Binds a method to the component.
11166 *
11167 * @param {object} component Component whose method is going to be bound.
11168 * @param {function} method Method to be bound.
11169 * @return {function} The bound method.
11170 */
11171 function bindAutoBindMethod(component, method) {
11172 var boundMethod = method.bind(component);
11173 if (process.env.NODE_ENV !== 'production') {
11174 boundMethod.__reactBoundContext = component;
11175 boundMethod.__reactBoundMethod = method;
11176 boundMethod.__reactBoundArguments = null;
11177 var componentName = component.constructor.displayName;
11178 var _bind = boundMethod.bind;
11179 boundMethod.bind = function(newThis) {
11180 for (
11181 var _len = arguments.length,
11182 args = Array(_len > 1 ? _len - 1 : 0),
11183 _key = 1;
11184 _key < _len;
11185 _key++
11186 ) {
11187 args[_key - 1] = arguments[_key];
11188 }
11189
11190 // User is trying to bind() an autobound method; we effectively will
11191 // ignore the value of "this" that the user is trying to use, so
11192 // let's warn.
11193 if (newThis !== component && newThis !== null) {
11194 if (process.env.NODE_ENV !== 'production') {
11195 warning(
11196 false,
11197 'bind(): React component methods may only be bound to the ' +
11198 'component instance. See %s',
11199 componentName
11200 );
11201 }
11202 } else if (!args.length) {
11203 if (process.env.NODE_ENV !== 'production') {
11204 warning(
11205 false,
11206 'bind(): You are binding a component method to the component. ' +
11207 'React does this for you automatically in a high-performance ' +
11208 'way, so you can safely remove this call. See %s',
11209 componentName
11210 );
11211 }
11212 return boundMethod;
11213 }
11214 var reboundMethod = _bind.apply(boundMethod, arguments);
11215 reboundMethod.__reactBoundContext = component;
11216 reboundMethod.__reactBoundMethod = method;
11217 reboundMethod.__reactBoundArguments = args;
11218 return reboundMethod;
11219 };
11220 }
11221 return boundMethod;
11222 }
11223
11224 /**
11225 * Binds all auto-bound methods in a component.
11226 *
11227 * @param {object} component Component whose method is going to be bound.
11228 */
11229 function bindAutoBindMethods(component) {
11230 var pairs = component.__reactAutoBindPairs;
11231 for (var i = 0; i < pairs.length; i += 2) {
11232 var autoBindKey = pairs[i];
11233 var method = pairs[i + 1];
11234 component[autoBindKey] = bindAutoBindMethod(component, method);
11235 }
11236 }
11237
11238 var IsMountedPreMixin = {
11239 componentDidMount: function() {
11240 this.__isMounted = true;
11241 }
11242 };
11243
11244 var IsMountedPostMixin = {
11245 componentWillUnmount: function() {
11246 this.__isMounted = false;
11247 }
11248 };
11249
11250 /**
11251 * Add more to the ReactClass base class. These are all legacy features and
11252 * therefore not already part of the modern ReactComponent.
11253 */
11254 var ReactClassMixin = {
11255 /**
11256 * TODO: This will be deprecated because state should always keep a consistent
11257 * type signature and the only use case for this, is to avoid that.
11258 */
11259 replaceState: function(newState, callback) {
11260 this.updater.enqueueReplaceState(this, newState, callback);
11261 },
11262
11263 /**
11264 * Checks whether or not this composite component is mounted.
11265 * @return {boolean} True if mounted, false otherwise.
11266 * @protected
11267 * @final
11268 */
11269 isMounted: function() {
11270 if (process.env.NODE_ENV !== 'production') {
11271 warning(
11272 this.__didWarnIsMounted,
11273 '%s: isMounted is deprecated. Instead, make sure to clean up ' +
11274 'subscriptions and pending requests in componentWillUnmount to ' +
11275 'prevent memory leaks.',
11276 (this.constructor && this.constructor.displayName) ||
11277 this.name ||
11278 'Component'
11279 );
11280 this.__didWarnIsMounted = true;
11281 }
11282 return !!this.__isMounted;
11283 }
11284 };
11285
11286 var ReactClassComponent = function() {};
11287 _assign(
11288 ReactClassComponent.prototype,
11289 ReactComponent.prototype,
11290 ReactClassMixin
11291 );
11292
11293 /**
11294 * Creates a composite component class given a class specification.
11295 * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
11296 *
11297 * @param {object} spec Class specification (which must define `render`).
11298 * @return {function} Component constructor function.
11299 * @public
11300 */
11301 function createClass(spec) {
11302 // To keep our warnings more understandable, we'll use a little hack here to
11303 // ensure that Constructor.name !== 'Constructor'. This makes sure we don't
11304 // unnecessarily identify a class without displayName as 'Constructor'.
11305 var Constructor = identity(function(props, context, updater) {
11306 // This constructor gets overridden by mocks. The argument is used
11307 // by mocks to assert on what gets mounted.
11308
11309 if (process.env.NODE_ENV !== 'production') {
11310 warning(
11311 this instanceof Constructor,
11312 'Something is calling a React component directly. Use a factory or ' +
11313 'JSX instead. See: https://fb.me/react-legacyfactory'
11314 );
11315 }
11316
11317 // Wire up auto-binding
11318 if (this.__reactAutoBindPairs.length) {
11319 bindAutoBindMethods(this);
11320 }
11321
11322 this.props = props;
11323 this.context = context;
11324 this.refs = emptyObject;
11325 this.updater = updater || ReactNoopUpdateQueue;
11326
11327 this.state = null;
11328
11329 // ReactClasses doesn't have constructors. Instead, they use the
11330 // getInitialState and componentWillMount methods for initialization.
11331
11332 var initialState = this.getInitialState ? this.getInitialState() : null;
11333 if (process.env.NODE_ENV !== 'production') {
11334 // We allow auto-mocks to proceed as if they're returning null.
11335 if (
11336 initialState === undefined &&
11337 this.getInitialState._isMockFunction
11338 ) {
11339 // This is probably bad practice. Consider warning here and
11340 // deprecating this convenience.
11341 initialState = null;
11342 }
11343 }
11344 _invariant(
11345 typeof initialState === 'object' && !Array.isArray(initialState),
11346 '%s.getInitialState(): must return an object or null',
11347 Constructor.displayName || 'ReactCompositeComponent'
11348 );
11349
11350 this.state = initialState;
11351 });
11352 Constructor.prototype = new ReactClassComponent();
11353 Constructor.prototype.constructor = Constructor;
11354 Constructor.prototype.__reactAutoBindPairs = [];
11355
11356 injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
11357
11358 mixSpecIntoComponent(Constructor, IsMountedPreMixin);
11359 mixSpecIntoComponent(Constructor, spec);
11360 mixSpecIntoComponent(Constructor, IsMountedPostMixin);
11361
11362 // Initialize the defaultProps property after all mixins have been merged.
11363 if (Constructor.getDefaultProps) {
11364 Constructor.defaultProps = Constructor.getDefaultProps();
11365 }
11366
11367 if (process.env.NODE_ENV !== 'production') {
11368 // This is a tag to indicate that the use of these method names is ok,
11369 // since it's used with createClass. If it's not, then it's likely a
11370 // mistake so we'll warn you to use the static property, property
11371 // initializer or constructor respectively.
11372 if (Constructor.getDefaultProps) {
11373 Constructor.getDefaultProps.isReactClassApproved = {};
11374 }
11375 if (Constructor.prototype.getInitialState) {
11376 Constructor.prototype.getInitialState.isReactClassApproved = {};
11377 }
11378 }
11379
11380 _invariant(
11381 Constructor.prototype.render,
11382 'createClass(...): Class specification must implement a `render` method.'
11383 );
11384
11385 if (process.env.NODE_ENV !== 'production') {
11386 warning(
11387 !Constructor.prototype.componentShouldUpdate,
11388 '%s has a method called ' +
11389 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
11390 'The name is phrased as a question because the function is ' +
11391 'expected to return a value.',
11392 spec.displayName || 'A component'
11393 );
11394 warning(
11395 !Constructor.prototype.componentWillRecieveProps,
11396 '%s has a method called ' +
11397 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
11398 spec.displayName || 'A component'
11399 );
11400 warning(
11401 !Constructor.prototype.UNSAFE_componentWillRecieveProps,
11402 '%s has a method called UNSAFE_componentWillRecieveProps(). ' +
11403 'Did you mean UNSAFE_componentWillReceiveProps()?',
11404 spec.displayName || 'A component'
11405 );
11406 }
11407
11408 // Reduce time spent doing lookups by setting these on the prototype.
11409 for (var methodName in ReactClassInterface) {
11410 if (!Constructor.prototype[methodName]) {
11411 Constructor.prototype[methodName] = null;
11412 }
11413 }
11414
11415 return Constructor;
11416 }
11417
11418 return createClass;
11419}
11420
11421module.exports = factory;
11422
11423
11424/***/ }),
11425/* 97 */
11426/***/ (function(module, exports, __webpack_require__) {
11427
11428"use strict";
11429
11430
11431// eslint-disable-next-line no-empty-function
11432module.exports = function () {};
11433
11434
11435/***/ }),
11436/* 98 */
11437/***/ (function(module, exports, __webpack_require__) {
11438
11439"use strict";
11440
11441
11442var isValue = __webpack_require__(47);
11443
11444var forEach = Array.prototype.forEach, create = Object.create;
11445
11446var process = function (src, obj) {
11447 var key;
11448 for (key in src) obj[key] = src[key];
11449};
11450
11451// eslint-disable-next-line no-unused-vars
11452module.exports = function (opts1 /*, …options*/) {
11453 var result = create(null);
11454 forEach.call(arguments, function (options) {
11455 if (!isValue(options)) return;
11456 process(Object(options), result);
11457 });
11458 return result;
11459};
11460
11461
11462/***/ }),
11463/* 99 */
11464/***/ (function(module, exports, __webpack_require__) {
11465
11466"use strict";
11467
11468
11469var isValue = __webpack_require__(47);
11470
11471module.exports = function (value) {
11472 if (!isValue(value)) throw new TypeError("Cannot use null or undefined");
11473 return value;
11474};
11475
11476
11477/***/ }),
11478/* 100 */
11479/***/ (function(module, exports, __webpack_require__) {
11480
11481"use strict";
11482
11483
11484var esniff = __webpack_require__(204)
11485
11486 , i, current, literals, substitutions, sOut, sEscape, sAhead, sIn, sInEscape, template;
11487
11488sOut = function (char) {
11489 if (char === '\\') return sEscape;
11490 if (char === '$') return sAhead;
11491 current += char;
11492 return sOut;
11493};
11494sEscape = function (char) {
11495 if ((char !== '\\') && (char !== '$')) current += '\\';
11496 current += char;
11497 return sOut;
11498};
11499sAhead = function (char) {
11500 if (char === '{') {
11501 literals.push(current);
11502 current = '';
11503 return sIn;
11504 }
11505 if (char === '$') {
11506 current += '$';
11507 return sAhead;
11508 }
11509 current += '$' + char;
11510 return sOut;
11511};
11512sIn = function (char) {
11513 var code = template.slice(i), end;
11514 esniff(code, '}', function (j) {
11515 if (esniff.nest >= 0) return esniff.next();
11516 end = j;
11517 });
11518 if (end != null) {
11519 substitutions.push(template.slice(i, i + end));
11520 i += end;
11521 current = '';
11522 return sOut;
11523 }
11524 end = code.length;
11525 i += end;
11526 current += code;
11527 return sIn;
11528};
11529sInEscape = function (char) {
11530 if ((char !== '\\') && (char !== '}')) current += '\\';
11531 current += char;
11532 return sIn;
11533};
11534
11535module.exports = function (str) {
11536 var length, state, result;
11537 current = '';
11538 literals = [];
11539 substitutions = [];
11540
11541 template = String(str);
11542 length = template.length;
11543
11544 state = sOut;
11545 for (i = 0; i < length; ++i) state = state(template[i]);
11546 if (state === sOut) {
11547 literals.push(current);
11548 } else if (state === sEscape) {
11549 literals.push(current + '\\');
11550 } else if (state === sAhead) {
11551 literals.push(current + '$');
11552 } else if (state === sIn) {
11553 literals[literals.length - 1] += '${' + current;
11554 } else if (state === sInEscape) {
11555 literals[literals.length - 1] += '${' + current + '\\';
11556 }
11557 result = { literals: literals, substitutions: substitutions };
11558 literals = substitutions = null;
11559 return result;
11560};
11561
11562
11563/***/ }),
11564/* 101 */
11565/***/ (function(module, exports, __webpack_require__) {
11566
11567"use strict";
11568
11569
11570var reduce = Array.prototype.reduce;
11571
11572module.exports = function (literals/*, …substitutions*/) {
11573 var args = arguments;
11574 return reduce.call(literals, function (a, b, i) {
11575 return a + ((args[i] === undefined) ? '' : String(args[i])) + b;
11576 });
11577};
11578
11579
11580/***/ }),
11581/* 102 */
11582/***/ (function(module, exports, __webpack_require__) {
11583
11584"use strict";
11585
11586
11587var resolve = __webpack_require__(103)
11588 , passthru = __webpack_require__(101);
11589
11590module.exports = function (data, context/*, options*/) {
11591 return passthru.apply(null, resolve(data, context, arguments[2]));
11592};
11593
11594
11595/***/ }),
11596/* 103 */
11597/***/ (function(module, exports, __webpack_require__) {
11598
11599"use strict";
11600
11601
11602var value = __webpack_require__(99)
11603 , normalize = __webpack_require__(98)
11604 , isVarNameValid = __webpack_require__(104)
11605
11606 , map = Array.prototype.map, keys = Object.keys
11607 , stringify = JSON.stringify;
11608
11609module.exports = function (data, context/*, options*/) {
11610 var names, argNames, argValues, options = Object(arguments[2]);
11611
11612 (value(data) && value(data.literals) && value(data.substitutions));
11613 context = normalize(context);
11614 names = keys(context).filter(isVarNameValid);
11615 argNames = names.join(', ');
11616 argValues = names.map(function (name) { return context[name]; });
11617 return [data.literals].concat(map.call(data.substitutions, function (expr) {
11618 var resolver;
11619 if (!expr) return undefined;
11620 try {
11621 resolver = new Function(argNames, 'return (' + expr + ')');
11622 } catch (e) {
11623 throw new TypeError("Unable to compile expression:\n\targs: " + stringify(argNames) +
11624 "\n\tbody: " + stringify(expr) + "\n\terror: " + e.stack);
11625 }
11626 try {
11627 return resolver.apply(null, argValues);
11628 } catch (e) {
11629 if (options.partial) return '${' + expr + '}';
11630 throw new TypeError("Unable to resolve expression:\n\targs: " + stringify(argNames) +
11631 "\n\tbody: " + stringify(expr) + "\n\terror: " + e.stack);
11632 }
11633 }));
11634};
11635
11636
11637/***/ }),
11638/* 104 */
11639/***/ (function(module, exports, __webpack_require__) {
11640
11641"use strict";
11642// Credit: Mathias Bynens -> https://mathiasbynens.be/demo/javascript-identifier-regex
11643
11644
11645
11646module.exports = RegExp.prototype.test.bind(/^(?!(?:do|if|in|for|let|new|try|var|case|else|enum|eval|null|this|true|void|with|await|break|catch|class|const|false|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$)(?:[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D])(?:[\$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF])*$/);
11647
11648
11649/***/ }),
11650/* 105 */
11651/***/ (function(module, exports, __webpack_require__) {
11652
11653"use strict";
11654
11655
11656/**
11657 * Copyright (c) 2013-present, Facebook, Inc.
11658 *
11659 * This source code is licensed under the MIT license found in the
11660 * LICENSE file in the root directory of this source tree.
11661 *
11662 * @typechecks
11663 */
11664
11665var _hyphenPattern = /-(.)/g;
11666
11667/**
11668 * Camelcases a hyphenated string, for example:
11669 *
11670 * > camelize('background-color')
11671 * < "backgroundColor"
11672 *
11673 * @param {string} string
11674 * @return {string}
11675 */
11676function camelize(string) {
11677 return string.replace(_hyphenPattern, function (_, character) {
11678 return character.toUpperCase();
11679 });
11680}
11681
11682module.exports = camelize;
11683
11684/***/ }),
11685/* 106 */
11686/***/ (function(module, exports, __webpack_require__) {
11687
11688"use strict";
11689/**
11690 * Copyright (c) 2013-present, Facebook, Inc.
11691 *
11692 * This source code is licensed under the MIT license found in the
11693 * LICENSE file in the root directory of this source tree.
11694 *
11695 * @typechecks
11696 */
11697
11698
11699
11700var camelize = __webpack_require__(105);
11701
11702var msPattern = /^-ms-/;
11703
11704/**
11705 * Camelcases a hyphenated CSS property name, for example:
11706 *
11707 * > camelizeStyleName('background-color')
11708 * < "backgroundColor"
11709 * > camelizeStyleName('-moz-transition')
11710 * < "MozTransition"
11711 * > camelizeStyleName('-ms-transition')
11712 * < "msTransition"
11713 *
11714 * As Andi Smith suggests
11715 * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
11716 * is converted to lowercase `ms`.
11717 *
11718 * @param {string} string
11719 * @return {string}
11720 */
11721function camelizeStyleName(string) {
11722 return camelize(string.replace(msPattern, 'ms-'));
11723}
11724
11725module.exports = camelizeStyleName;
11726
11727/***/ }),
11728/* 107 */
11729/***/ (function(module, exports, __webpack_require__) {
11730
11731"use strict";
11732
11733
11734/**
11735 * Copyright (c) 2013-present, Facebook, Inc.
11736 *
11737 * This source code is licensed under the MIT license found in the
11738 * LICENSE file in the root directory of this source tree.
11739 *
11740 *
11741 */
11742
11743var isTextNode = __webpack_require__(115);
11744
11745/*eslint-disable no-bitwise */
11746
11747/**
11748 * Checks if a given DOM node contains or is another DOM node.
11749 */
11750function containsNode(outerNode, innerNode) {
11751 if (!outerNode || !innerNode) {
11752 return false;
11753 } else if (outerNode === innerNode) {
11754 return true;
11755 } else if (isTextNode(outerNode)) {
11756 return false;
11757 } else if (isTextNode(innerNode)) {
11758 return containsNode(outerNode, innerNode.parentNode);
11759 } else if ('contains' in outerNode) {
11760 return outerNode.contains(innerNode);
11761 } else if (outerNode.compareDocumentPosition) {
11762 return !!(outerNode.compareDocumentPosition(innerNode) & 16);
11763 } else {
11764 return false;
11765 }
11766}
11767
11768module.exports = containsNode;
11769
11770/***/ }),
11771/* 108 */
11772/***/ (function(module, exports, __webpack_require__) {
11773
11774"use strict";
11775
11776
11777/**
11778 * Copyright (c) 2013-present, Facebook, Inc.
11779 *
11780 * This source code is licensed under the MIT license found in the
11781 * LICENSE file in the root directory of this source tree.
11782 *
11783 * @typechecks
11784 */
11785
11786var invariant = __webpack_require__(0);
11787
11788/**
11789 * Convert array-like objects to arrays.
11790 *
11791 * This API assumes the caller knows the contents of the data type. For less
11792 * well defined inputs use createArrayFromMixed.
11793 *
11794 * @param {object|function|filelist} obj
11795 * @return {array}
11796 */
11797function toArray(obj) {
11798 var length = obj.length;
11799
11800 // Some browsers builtin objects can report typeof 'function' (e.g. NodeList
11801 // in old versions of Safari).
11802 !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;
11803
11804 !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;
11805
11806 !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;
11807
11808 !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0;
11809
11810 // Old IE doesn't give collections access to hasOwnProperty. Assume inputs
11811 // without method will throw during the slice call and skip straight to the
11812 // fallback.
11813 if (obj.hasOwnProperty) {
11814 try {
11815 return Array.prototype.slice.call(obj);
11816 } catch (e) {
11817 // IE < 9 does not support Array#slice on collections objects
11818 }
11819 }
11820
11821 // Fall back to copying key by key. This assumes all keys have a value,
11822 // so will not preserve sparsely populated inputs.
11823 var ret = Array(length);
11824 for (var ii = 0; ii < length; ii++) {
11825 ret[ii] = obj[ii];
11826 }
11827 return ret;
11828}
11829
11830/**
11831 * Perform a heuristic test to determine if an object is "array-like".
11832 *
11833 * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?"
11834 * Joshu replied: "Mu."
11835 *
11836 * This function determines if its argument has "array nature": it returns
11837 * true if the argument is an actual array, an `arguments' object, or an
11838 * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).
11839 *
11840 * It will return false for other array-like objects like Filelist.
11841 *
11842 * @param {*} obj
11843 * @return {boolean}
11844 */
11845function hasArrayNature(obj) {
11846 return (
11847 // not null/false
11848 !!obj && (
11849 // arrays are objects, NodeLists are functions in Safari
11850 typeof obj == 'object' || typeof obj == 'function') &&
11851 // quacks like an array
11852 'length' in obj &&
11853 // not window
11854 !('setInterval' in obj) &&
11855 // no DOM node should be considered an array-like
11856 // a 'select' element has 'length' and 'item' properties on IE8
11857 typeof obj.nodeType != 'number' && (
11858 // a real array
11859 Array.isArray(obj) ||
11860 // arguments
11861 'callee' in obj ||
11862 // HTMLCollection/NodeList
11863 'item' in obj)
11864 );
11865}
11866
11867/**
11868 * Ensure that the argument is an array by wrapping it in an array if it is not.
11869 * Creates a copy of the argument if it is already an array.
11870 *
11871 * This is mostly useful idiomatically:
11872 *
11873 * var createArrayFromMixed = require('createArrayFromMixed');
11874 *
11875 * function takesOneOrMoreThings(things) {
11876 * things = createArrayFromMixed(things);
11877 * ...
11878 * }
11879 *
11880 * This allows you to treat `things' as an array, but accept scalars in the API.
11881 *
11882 * If you need to convert an array-like object, like `arguments`, into an array
11883 * use toArray instead.
11884 *
11885 * @param {*} obj
11886 * @return {array}
11887 */
11888function createArrayFromMixed(obj) {
11889 if (!hasArrayNature(obj)) {
11890 return [obj];
11891 } else if (Array.isArray(obj)) {
11892 return obj.slice();
11893 } else {
11894 return toArray(obj);
11895 }
11896}
11897
11898module.exports = createArrayFromMixed;
11899
11900/***/ }),
11901/* 109 */
11902/***/ (function(module, exports, __webpack_require__) {
11903
11904"use strict";
11905
11906
11907/**
11908 * Copyright (c) 2013-present, Facebook, Inc.
11909 *
11910 * This source code is licensed under the MIT license found in the
11911 * LICENSE file in the root directory of this source tree.
11912 *
11913 * @typechecks
11914 */
11915
11916/*eslint-disable fb-www/unsafe-html*/
11917
11918var ExecutionEnvironment = __webpack_require__(5);
11919
11920var createArrayFromMixed = __webpack_require__(108);
11921var getMarkupWrap = __webpack_require__(110);
11922var invariant = __webpack_require__(0);
11923
11924/**
11925 * Dummy container used to render all markup.
11926 */
11927var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
11928
11929/**
11930 * Pattern used by `getNodeName`.
11931 */
11932var nodeNamePattern = /^\s*<(\w+)/;
11933
11934/**
11935 * Extracts the `nodeName` of the first element in a string of markup.
11936 *
11937 * @param {string} markup String of markup.
11938 * @return {?string} Node name of the supplied markup.
11939 */
11940function getNodeName(markup) {
11941 var nodeNameMatch = markup.match(nodeNamePattern);
11942 return nodeNameMatch && nodeNameMatch[1].toLowerCase();
11943}
11944
11945/**
11946 * Creates an array containing the nodes rendered from the supplied markup. The
11947 * optionally supplied `handleScript` function will be invoked once for each
11948 * <script> element that is rendered. If no `handleScript` function is supplied,
11949 * an exception is thrown if any <script> elements are rendered.
11950 *
11951 * @param {string} markup A string of valid HTML markup.
11952 * @param {?function} handleScript Invoked once for each rendered <script>.
11953 * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes.
11954 */
11955function createNodesFromMarkup(markup, handleScript) {
11956 var node = dummyNode;
11957 !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0;
11958 var nodeName = getNodeName(markup);
11959
11960 var wrap = nodeName && getMarkupWrap(nodeName);
11961 if (wrap) {
11962 node.innerHTML = wrap[1] + markup + wrap[2];
11963
11964 var wrapDepth = wrap[0];
11965 while (wrapDepth--) {
11966 node = node.lastChild;
11967 }
11968 } else {
11969 node.innerHTML = markup;
11970 }
11971
11972 var scripts = node.getElementsByTagName('script');
11973 if (scripts.length) {
11974 !handleScript ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0;
11975 createArrayFromMixed(scripts).forEach(handleScript);
11976 }
11977
11978 var nodes = Array.from(node.childNodes);
11979 while (node.lastChild) {
11980 node.removeChild(node.lastChild);
11981 }
11982 return nodes;
11983}
11984
11985module.exports = createNodesFromMarkup;
11986
11987/***/ }),
11988/* 110 */
11989/***/ (function(module, exports, __webpack_require__) {
11990
11991"use strict";
11992
11993
11994/**
11995 * Copyright (c) 2013-present, Facebook, Inc.
11996 *
11997 * This source code is licensed under the MIT license found in the
11998 * LICENSE file in the root directory of this source tree.
11999 *
12000 */
12001
12002/*eslint-disable fb-www/unsafe-html */
12003
12004var ExecutionEnvironment = __webpack_require__(5);
12005
12006var invariant = __webpack_require__(0);
12007
12008/**
12009 * Dummy container used to detect which wraps are necessary.
12010 */
12011var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
12012
12013/**
12014 * Some browsers cannot use `innerHTML` to render certain elements standalone,
12015 * so we wrap them, render the wrapped nodes, then extract the desired node.
12016 *
12017 * In IE8, certain elements cannot render alone, so wrap all elements ('*').
12018 */
12019
12020var shouldWrap = {};
12021
12022var selectWrap = [1, '<select multiple="true">', '</select>'];
12023var tableWrap = [1, '<table>', '</table>'];
12024var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
12025
12026var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>'];
12027
12028var markupWrap = {
12029 '*': [1, '?<div>', '</div>'],
12030
12031 'area': [1, '<map>', '</map>'],
12032 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
12033 'legend': [1, '<fieldset>', '</fieldset>'],
12034 'param': [1, '<object>', '</object>'],
12035 'tr': [2, '<table><tbody>', '</tbody></table>'],
12036
12037 'optgroup': selectWrap,
12038 'option': selectWrap,
12039
12040 'caption': tableWrap,
12041 'colgroup': tableWrap,
12042 'tbody': tableWrap,
12043 'tfoot': tableWrap,
12044 'thead': tableWrap,
12045
12046 'td': trWrap,
12047 'th': trWrap
12048};
12049
12050// Initialize the SVG elements since we know they'll always need to be wrapped
12051// consistently. If they are created inside a <div> they will be initialized in
12052// the wrong namespace (and will not display).
12053var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];
12054svgElements.forEach(function (nodeName) {
12055 markupWrap[nodeName] = svgWrap;
12056 shouldWrap[nodeName] = true;
12057});
12058
12059/**
12060 * Gets the markup wrap configuration for the supplied `nodeName`.
12061 *
12062 * NOTE: This lazily detects which wraps are necessary for the current browser.
12063 *
12064 * @param {string} nodeName Lowercase `nodeName`.
12065 * @return {?array} Markup wrap configuration, if applicable.
12066 */
12067function getMarkupWrap(nodeName) {
12068 !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0;
12069 if (!markupWrap.hasOwnProperty(nodeName)) {
12070 nodeName = '*';
12071 }
12072 if (!shouldWrap.hasOwnProperty(nodeName)) {
12073 if (nodeName === '*') {
12074 dummyNode.innerHTML = '<link />';
12075 } else {
12076 dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';
12077 }
12078 shouldWrap[nodeName] = !dummyNode.firstChild;
12079 }
12080 return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
12081}
12082
12083module.exports = getMarkupWrap;
12084
12085/***/ }),
12086/* 111 */
12087/***/ (function(module, exports, __webpack_require__) {
12088
12089"use strict";
12090/**
12091 * Copyright (c) 2013-present, Facebook, Inc.
12092 *
12093 * This source code is licensed under the MIT license found in the
12094 * LICENSE file in the root directory of this source tree.
12095 *
12096 * @typechecks
12097 */
12098
12099
12100
12101/**
12102 * Gets the scroll position of the supplied element or window.
12103 *
12104 * The return values are unbounded, unlike `getScrollPosition`. This means they
12105 * may be negative or exceed the element boundaries (which is possible using
12106 * inertial scrolling).
12107 *
12108 * @param {DOMWindow|DOMElement} scrollable
12109 * @return {object} Map with `x` and `y` keys.
12110 */
12111
12112function getUnboundedScrollPosition(scrollable) {
12113 if (scrollable.Window && scrollable instanceof scrollable.Window) {
12114 return {
12115 x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,
12116 y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop
12117 };
12118 }
12119 return {
12120 x: scrollable.scrollLeft,
12121 y: scrollable.scrollTop
12122 };
12123}
12124
12125module.exports = getUnboundedScrollPosition;
12126
12127/***/ }),
12128/* 112 */
12129/***/ (function(module, exports, __webpack_require__) {
12130
12131"use strict";
12132
12133
12134/**
12135 * Copyright (c) 2013-present, Facebook, Inc.
12136 *
12137 * This source code is licensed under the MIT license found in the
12138 * LICENSE file in the root directory of this source tree.
12139 *
12140 * @typechecks
12141 */
12142
12143var _uppercasePattern = /([A-Z])/g;
12144
12145/**
12146 * Hyphenates a camelcased string, for example:
12147 *
12148 * > hyphenate('backgroundColor')
12149 * < "background-color"
12150 *
12151 * For CSS style names, use `hyphenateStyleName` instead which works properly
12152 * with all vendor prefixes, including `ms`.
12153 *
12154 * @param {string} string
12155 * @return {string}
12156 */
12157function hyphenate(string) {
12158 return string.replace(_uppercasePattern, '-$1').toLowerCase();
12159}
12160
12161module.exports = hyphenate;
12162
12163/***/ }),
12164/* 113 */
12165/***/ (function(module, exports, __webpack_require__) {
12166
12167"use strict";
12168/**
12169 * Copyright (c) 2013-present, Facebook, Inc.
12170 *
12171 * This source code is licensed under the MIT license found in the
12172 * LICENSE file in the root directory of this source tree.
12173 *
12174 * @typechecks
12175 */
12176
12177
12178
12179var hyphenate = __webpack_require__(112);
12180
12181var msPattern = /^ms-/;
12182
12183/**
12184 * Hyphenates a camelcased CSS property name, for example:
12185 *
12186 * > hyphenateStyleName('backgroundColor')
12187 * < "background-color"
12188 * > hyphenateStyleName('MozTransition')
12189 * < "-moz-transition"
12190 * > hyphenateStyleName('msTransition')
12191 * < "-ms-transition"
12192 *
12193 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
12194 * is converted to `-ms-`.
12195 *
12196 * @param {string} string
12197 * @return {string}
12198 */
12199function hyphenateStyleName(string) {
12200 return hyphenate(string).replace(msPattern, '-ms-');
12201}
12202
12203module.exports = hyphenateStyleName;
12204
12205/***/ }),
12206/* 114 */
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
12221/**
12222 * @param {*} object The object to check.
12223 * @return {boolean} Whether or not the object is a DOM node.
12224 */
12225function isNode(object) {
12226 var doc = object ? object.ownerDocument || object : document;
12227 var defaultView = doc.defaultView || window;
12228 return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
12229}
12230
12231module.exports = isNode;
12232
12233/***/ }),
12234/* 115 */
12235/***/ (function(module, exports, __webpack_require__) {
12236
12237"use strict";
12238
12239
12240/**
12241 * Copyright (c) 2013-present, Facebook, Inc.
12242 *
12243 * This source code is licensed under the MIT license found in the
12244 * LICENSE file in the root directory of this source tree.
12245 *
12246 * @typechecks
12247 */
12248
12249var isNode = __webpack_require__(114);
12250
12251/**
12252 * @param {*} object The object to check.
12253 * @return {boolean} Whether or not the object is a DOM text node.
12254 */
12255function isTextNode(object) {
12256 return isNode(object) && object.nodeType == 3;
12257}
12258
12259module.exports = isTextNode;
12260
12261/***/ }),
12262/* 116 */
12263/***/ (function(module, exports, __webpack_require__) {
12264
12265"use strict";
12266/**
12267 * Copyright (c) 2013-present, Facebook, Inc.
12268 *
12269 * This source code is licensed under the MIT license found in the
12270 * LICENSE file in the root directory of this source tree.
12271 *
12272 *
12273 * @typechecks static-only
12274 */
12275
12276
12277
12278/**
12279 * Memoizes the return value of a function that accepts one string argument.
12280 */
12281
12282function memoizeStringOnly(callback) {
12283 var cache = {};
12284 return function (string) {
12285 if (!cache.hasOwnProperty(string)) {
12286 cache[string] = callback.call(this, string);
12287 }
12288 return cache[string];
12289 };
12290}
12291
12292module.exports = memoizeStringOnly;
12293
12294/***/ }),
12295/* 117 */
12296/***/ (function(module, exports, __webpack_require__) {
12297
12298"use strict";
12299/**
12300 * Copyright (c) 2013-present, Facebook, Inc.
12301 *
12302 * This source code is licensed under the MIT license found in the
12303 * LICENSE file in the root directory of this source tree.
12304 *
12305 * @typechecks
12306 */
12307
12308
12309
12310var ExecutionEnvironment = __webpack_require__(5);
12311
12312var performance;
12313
12314if (ExecutionEnvironment.canUseDOM) {
12315 performance = window.performance || window.msPerformance || window.webkitPerformance;
12316}
12317
12318module.exports = performance || {};
12319
12320/***/ }),
12321/* 118 */
12322/***/ (function(module, exports, __webpack_require__) {
12323
12324"use strict";
12325
12326
12327/**
12328 * Copyright (c) 2013-present, Facebook, Inc.
12329 *
12330 * This source code is licensed under the MIT license found in the
12331 * LICENSE file in the root directory of this source tree.
12332 *
12333 * @typechecks
12334 */
12335
12336var performance = __webpack_require__(117);
12337
12338var performanceNow;
12339
12340/**
12341 * Detect if we can use `window.performance.now()` and gracefully fallback to
12342 * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
12343 * because of Facebook's testing infrastructure.
12344 */
12345if (performance.now) {
12346 performanceNow = function performanceNow() {
12347 return performance.now();
12348 };
12349} else {
12350 performanceNow = function performanceNow() {
12351 return Date.now();
12352 };
12353}
12354
12355module.exports = performanceNow;
12356
12357/***/ }),
12358/* 119 */
12359/***/ (function(module, exports, __webpack_require__) {
12360
12361"use strict";
12362/**
12363 * Copyright (c) 2013-present, Facebook, Inc.
12364 *
12365 * This source code is licensed under the MIT license found in the
12366 * LICENSE file in the root directory of this source tree.
12367 */
12368
12369
12370
12371var printWarning = function() {};
12372
12373if (process.env.NODE_ENV !== 'production') {
12374 var ReactPropTypesSecret = __webpack_require__(52);
12375 var loggedTypeFailures = {};
12376
12377 printWarning = function(text) {
12378 var message = 'Warning: ' + text;
12379 if (typeof console !== 'undefined') {
12380 console.error(message);
12381 }
12382 try {
12383 // --- Welcome to debugging React ---
12384 // This error was thrown as a convenience so that you can use this stack
12385 // to find the callsite that caused this warning to fire.
12386 throw new Error(message);
12387 } catch (x) {}
12388 };
12389}
12390
12391/**
12392 * Assert that the values match with the type specs.
12393 * Error messages are memorized and will only be shown once.
12394 *
12395 * @param {object} typeSpecs Map of name to a ReactPropType
12396 * @param {object} values Runtime values that need to be type-checked
12397 * @param {string} location e.g. "prop", "context", "child context"
12398 * @param {string} componentName Name of the component for error messages.
12399 * @param {?Function} getStack Returns the component stack.
12400 * @private
12401 */
12402function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
12403 if (process.env.NODE_ENV !== 'production') {
12404 for (var typeSpecName in typeSpecs) {
12405 if (typeSpecs.hasOwnProperty(typeSpecName)) {
12406 var error;
12407 // Prop type validation may throw. In case they do, we don't want to
12408 // fail the render phase where it didn't fail before. So we log it.
12409 // After these have been cleaned up, we'll let them throw.
12410 try {
12411 // This is intentionally an invariant that gets caught. It's the same
12412 // behavior as without this statement except with a better message.
12413 if (typeof typeSpecs[typeSpecName] !== 'function') {
12414 var err = Error(
12415 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
12416 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
12417 );
12418 err.name = 'Invariant Violation';
12419 throw err;
12420 }
12421 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
12422 } catch (ex) {
12423 error = ex;
12424 }
12425 if (error && !(error instanceof Error)) {
12426 printWarning(
12427 (componentName || 'React class') + ': type specification of ' +
12428 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
12429 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
12430 'You may have forgotten to pass an argument to the type checker ' +
12431 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
12432 'shape all require an argument).'
12433 )
12434
12435 }
12436 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
12437 // Only monitor this failure once because there tends to be a lot of the
12438 // same error.
12439 loggedTypeFailures[error.message] = true;
12440
12441 var stack = getStack ? getStack() : '';
12442
12443 printWarning(
12444 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
12445 );
12446 }
12447 }
12448 }
12449 }
12450}
12451
12452module.exports = checkPropTypes;
12453
12454
12455/***/ }),
12456/* 120 */
12457/***/ (function(module, exports, __webpack_require__) {
12458
12459"use strict";
12460/**
12461 * Copyright (c) 2013-present, Facebook, Inc.
12462 *
12463 * This source code is licensed under the MIT license found in the
12464 * LICENSE file in the root directory of this source tree.
12465 */
12466
12467
12468
12469var assign = __webpack_require__(3);
12470
12471var ReactPropTypesSecret = __webpack_require__(52);
12472var checkPropTypes = __webpack_require__(119);
12473
12474var printWarning = function() {};
12475
12476if (process.env.NODE_ENV !== 'production') {
12477 printWarning = function(text) {
12478 var message = 'Warning: ' + text;
12479 if (typeof console !== 'undefined') {
12480 console.error(message);
12481 }
12482 try {
12483 // --- Welcome to debugging React ---
12484 // This error was thrown as a convenience so that you can use this stack
12485 // to find the callsite that caused this warning to fire.
12486 throw new Error(message);
12487 } catch (x) {}
12488 };
12489}
12490
12491function emptyFunctionThatReturnsNull() {
12492 return null;
12493}
12494
12495module.exports = function(isValidElement, throwOnDirectAccess) {
12496 /* global Symbol */
12497 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
12498 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
12499
12500 /**
12501 * Returns the iterator method function contained on the iterable object.
12502 *
12503 * Be sure to invoke the function with the iterable as context:
12504 *
12505 * var iteratorFn = getIteratorFn(myIterable);
12506 * if (iteratorFn) {
12507 * var iterator = iteratorFn.call(myIterable);
12508 * ...
12509 * }
12510 *
12511 * @param {?object} maybeIterable
12512 * @return {?function}
12513 */
12514 function getIteratorFn(maybeIterable) {
12515 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
12516 if (typeof iteratorFn === 'function') {
12517 return iteratorFn;
12518 }
12519 }
12520
12521 /**
12522 * Collection of methods that allow declaration and validation of props that are
12523 * supplied to React components. Example usage:
12524 *
12525 * var Props = require('ReactPropTypes');
12526 * var MyArticle = React.createClass({
12527 * propTypes: {
12528 * // An optional string prop named "description".
12529 * description: Props.string,
12530 *
12531 * // A required enum prop named "category".
12532 * category: Props.oneOf(['News','Photos']).isRequired,
12533 *
12534 * // A prop named "dialog" that requires an instance of Dialog.
12535 * dialog: Props.instanceOf(Dialog).isRequired
12536 * },
12537 * render: function() { ... }
12538 * });
12539 *
12540 * A more formal specification of how these methods are used:
12541 *
12542 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
12543 * decl := ReactPropTypes.{type}(.isRequired)?
12544 *
12545 * Each and every declaration produces a function with the same signature. This
12546 * allows the creation of custom validation functions. For example:
12547 *
12548 * var MyLink = React.createClass({
12549 * propTypes: {
12550 * // An optional string or URI prop named "href".
12551 * href: function(props, propName, componentName) {
12552 * var propValue = props[propName];
12553 * if (propValue != null && typeof propValue !== 'string' &&
12554 * !(propValue instanceof URI)) {
12555 * return new Error(
12556 * 'Expected a string or an URI for ' + propName + ' in ' +
12557 * componentName
12558 * );
12559 * }
12560 * }
12561 * },
12562 * render: function() {...}
12563 * });
12564 *
12565 * @internal
12566 */
12567
12568 var ANONYMOUS = '<<anonymous>>';
12569
12570 // Important!
12571 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
12572 var ReactPropTypes = {
12573 array: createPrimitiveTypeChecker('array'),
12574 bool: createPrimitiveTypeChecker('boolean'),
12575 func: createPrimitiveTypeChecker('function'),
12576 number: createPrimitiveTypeChecker('number'),
12577 object: createPrimitiveTypeChecker('object'),
12578 string: createPrimitiveTypeChecker('string'),
12579 symbol: createPrimitiveTypeChecker('symbol'),
12580
12581 any: createAnyTypeChecker(),
12582 arrayOf: createArrayOfTypeChecker,
12583 element: createElementTypeChecker(),
12584 instanceOf: createInstanceTypeChecker,
12585 node: createNodeChecker(),
12586 objectOf: createObjectOfTypeChecker,
12587 oneOf: createEnumTypeChecker,
12588 oneOfType: createUnionTypeChecker,
12589 shape: createShapeTypeChecker,
12590 exact: createStrictShapeTypeChecker,
12591 };
12592
12593 /**
12594 * inlined Object.is polyfill to avoid requiring consumers ship their own
12595 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
12596 */
12597 /*eslint-disable no-self-compare*/
12598 function is(x, y) {
12599 // SameValue algorithm
12600 if (x === y) {
12601 // Steps 1-5, 7-10
12602 // Steps 6.b-6.e: +0 != -0
12603 return x !== 0 || 1 / x === 1 / y;
12604 } else {
12605 // Step 6.a: NaN == NaN
12606 return x !== x && y !== y;
12607 }
12608 }
12609 /*eslint-enable no-self-compare*/
12610
12611 /**
12612 * We use an Error-like object for backward compatibility as people may call
12613 * PropTypes directly and inspect their output. However, we don't use real
12614 * Errors anymore. We don't inspect their stack anyway, and creating them
12615 * is prohibitively expensive if they are created too often, such as what
12616 * happens in oneOfType() for any type before the one that matched.
12617 */
12618 function PropTypeError(message) {
12619 this.message = message;
12620 this.stack = '';
12621 }
12622 // Make `instanceof Error` still work for returned errors.
12623 PropTypeError.prototype = Error.prototype;
12624
12625 function createChainableTypeChecker(validate) {
12626 if (process.env.NODE_ENV !== 'production') {
12627 var manualPropTypeCallCache = {};
12628 var manualPropTypeWarningCount = 0;
12629 }
12630 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
12631 componentName = componentName || ANONYMOUS;
12632 propFullName = propFullName || propName;
12633
12634 if (secret !== ReactPropTypesSecret) {
12635 if (throwOnDirectAccess) {
12636 // New behavior only for users of `prop-types` package
12637 var err = new Error(
12638 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
12639 'Use `PropTypes.checkPropTypes()` to call them. ' +
12640 'Read more at http://fb.me/use-check-prop-types'
12641 );
12642 err.name = 'Invariant Violation';
12643 throw err;
12644 } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
12645 // Old behavior for people using React.PropTypes
12646 var cacheKey = componentName + ':' + propName;
12647 if (
12648 !manualPropTypeCallCache[cacheKey] &&
12649 // Avoid spamming the console because they are often not actionable except for lib authors
12650 manualPropTypeWarningCount < 3
12651 ) {
12652 printWarning(
12653 'You are manually calling a React.PropTypes validation ' +
12654 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
12655 'and will throw in the standalone `prop-types` package. ' +
12656 'You may be seeing this warning due to a third-party PropTypes ' +
12657 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
12658 );
12659 manualPropTypeCallCache[cacheKey] = true;
12660 manualPropTypeWarningCount++;
12661 }
12662 }
12663 }
12664 if (props[propName] == null) {
12665 if (isRequired) {
12666 if (props[propName] === null) {
12667 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
12668 }
12669 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
12670 }
12671 return null;
12672 } else {
12673 return validate(props, propName, componentName, location, propFullName);
12674 }
12675 }
12676
12677 var chainedCheckType = checkType.bind(null, false);
12678 chainedCheckType.isRequired = checkType.bind(null, true);
12679
12680 return chainedCheckType;
12681 }
12682
12683 function createPrimitiveTypeChecker(expectedType) {
12684 function validate(props, propName, componentName, location, propFullName, secret) {
12685 var propValue = props[propName];
12686 var propType = getPropType(propValue);
12687 if (propType !== expectedType) {
12688 // `propValue` being instance of, say, date/regexp, pass the 'object'
12689 // check, but we can offer a more precise error message here rather than
12690 // 'of type `object`'.
12691 var preciseType = getPreciseType(propValue);
12692
12693 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
12694 }
12695 return null;
12696 }
12697 return createChainableTypeChecker(validate);
12698 }
12699
12700 function createAnyTypeChecker() {
12701 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
12702 }
12703
12704 function createArrayOfTypeChecker(typeChecker) {
12705 function validate(props, propName, componentName, location, propFullName) {
12706 if (typeof typeChecker !== 'function') {
12707 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
12708 }
12709 var propValue = props[propName];
12710 if (!Array.isArray(propValue)) {
12711 var propType = getPropType(propValue);
12712 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
12713 }
12714 for (var i = 0; i < propValue.length; i++) {
12715 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
12716 if (error instanceof Error) {
12717 return error;
12718 }
12719 }
12720 return null;
12721 }
12722 return createChainableTypeChecker(validate);
12723 }
12724
12725 function createElementTypeChecker() {
12726 function validate(props, propName, componentName, location, propFullName) {
12727 var propValue = props[propName];
12728 if (!isValidElement(propValue)) {
12729 var propType = getPropType(propValue);
12730 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
12731 }
12732 return null;
12733 }
12734 return createChainableTypeChecker(validate);
12735 }
12736
12737 function createInstanceTypeChecker(expectedClass) {
12738 function validate(props, propName, componentName, location, propFullName) {
12739 if (!(props[propName] instanceof expectedClass)) {
12740 var expectedClassName = expectedClass.name || ANONYMOUS;
12741 var actualClassName = getClassName(props[propName]);
12742 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
12743 }
12744 return null;
12745 }
12746 return createChainableTypeChecker(validate);
12747 }
12748
12749 function createEnumTypeChecker(expectedValues) {
12750 if (!Array.isArray(expectedValues)) {
12751 process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
12752 return emptyFunctionThatReturnsNull;
12753 }
12754
12755 function validate(props, propName, componentName, location, propFullName) {
12756 var propValue = props[propName];
12757 for (var i = 0; i < expectedValues.length; i++) {
12758 if (is(propValue, expectedValues[i])) {
12759 return null;
12760 }
12761 }
12762
12763 var valuesString = JSON.stringify(expectedValues);
12764 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
12765 }
12766 return createChainableTypeChecker(validate);
12767 }
12768
12769 function createObjectOfTypeChecker(typeChecker) {
12770 function validate(props, propName, componentName, location, propFullName) {
12771 if (typeof typeChecker !== 'function') {
12772 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
12773 }
12774 var propValue = props[propName];
12775 var propType = getPropType(propValue);
12776 if (propType !== 'object') {
12777 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
12778 }
12779 for (var key in propValue) {
12780 if (propValue.hasOwnProperty(key)) {
12781 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
12782 if (error instanceof Error) {
12783 return error;
12784 }
12785 }
12786 }
12787 return null;
12788 }
12789 return createChainableTypeChecker(validate);
12790 }
12791
12792 function createUnionTypeChecker(arrayOfTypeCheckers) {
12793 if (!Array.isArray(arrayOfTypeCheckers)) {
12794 process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
12795 return emptyFunctionThatReturnsNull;
12796 }
12797
12798 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
12799 var checker = arrayOfTypeCheckers[i];
12800 if (typeof checker !== 'function') {
12801 printWarning(
12802 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
12803 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
12804 );
12805 return emptyFunctionThatReturnsNull;
12806 }
12807 }
12808
12809 function validate(props, propName, componentName, location, propFullName) {
12810 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
12811 var checker = arrayOfTypeCheckers[i];
12812 if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
12813 return null;
12814 }
12815 }
12816
12817 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
12818 }
12819 return createChainableTypeChecker(validate);
12820 }
12821
12822 function createNodeChecker() {
12823 function validate(props, propName, componentName, location, propFullName) {
12824 if (!isNode(props[propName])) {
12825 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
12826 }
12827 return null;
12828 }
12829 return createChainableTypeChecker(validate);
12830 }
12831
12832 function createShapeTypeChecker(shapeTypes) {
12833 function validate(props, propName, componentName, location, propFullName) {
12834 var propValue = props[propName];
12835 var propType = getPropType(propValue);
12836 if (propType !== 'object') {
12837 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
12838 }
12839 for (var key in shapeTypes) {
12840 var checker = shapeTypes[key];
12841 if (!checker) {
12842 continue;
12843 }
12844 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
12845 if (error) {
12846 return error;
12847 }
12848 }
12849 return null;
12850 }
12851 return createChainableTypeChecker(validate);
12852 }
12853
12854 function createStrictShapeTypeChecker(shapeTypes) {
12855 function validate(props, propName, componentName, location, propFullName) {
12856 var propValue = props[propName];
12857 var propType = getPropType(propValue);
12858 if (propType !== 'object') {
12859 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
12860 }
12861 // We need to check all keys in case some are required but missing from
12862 // props.
12863 var allKeys = assign({}, props[propName], shapeTypes);
12864 for (var key in allKeys) {
12865 var checker = shapeTypes[key];
12866 if (!checker) {
12867 return new PropTypeError(
12868 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
12869 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
12870 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
12871 );
12872 }
12873 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
12874 if (error) {
12875 return error;
12876 }
12877 }
12878 return null;
12879 }
12880
12881 return createChainableTypeChecker(validate);
12882 }
12883
12884 function isNode(propValue) {
12885 switch (typeof propValue) {
12886 case 'number':
12887 case 'string':
12888 case 'undefined':
12889 return true;
12890 case 'boolean':
12891 return !propValue;
12892 case 'object':
12893 if (Array.isArray(propValue)) {
12894 return propValue.every(isNode);
12895 }
12896 if (propValue === null || isValidElement(propValue)) {
12897 return true;
12898 }
12899
12900 var iteratorFn = getIteratorFn(propValue);
12901 if (iteratorFn) {
12902 var iterator = iteratorFn.call(propValue);
12903 var step;
12904 if (iteratorFn !== propValue.entries) {
12905 while (!(step = iterator.next()).done) {
12906 if (!isNode(step.value)) {
12907 return false;
12908 }
12909 }
12910 } else {
12911 // Iterator will provide entry [k,v] tuples rather than values.
12912 while (!(step = iterator.next()).done) {
12913 var entry = step.value;
12914 if (entry) {
12915 if (!isNode(entry[1])) {
12916 return false;
12917 }
12918 }
12919 }
12920 }
12921 } else {
12922 return false;
12923 }
12924
12925 return true;
12926 default:
12927 return false;
12928 }
12929 }
12930
12931 function isSymbol(propType, propValue) {
12932 // Native Symbol.
12933 if (propType === 'symbol') {
12934 return true;
12935 }
12936
12937 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
12938 if (propValue['@@toStringTag'] === 'Symbol') {
12939 return true;
12940 }
12941
12942 // Fallback for non-spec compliant Symbols which are polyfilled.
12943 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
12944 return true;
12945 }
12946
12947 return false;
12948 }
12949
12950 // Equivalent of `typeof` but with special handling for array and regexp.
12951 function getPropType(propValue) {
12952 var propType = typeof propValue;
12953 if (Array.isArray(propValue)) {
12954 return 'array';
12955 }
12956 if (propValue instanceof RegExp) {
12957 // Old webkits (at least until Android 4.0) return 'function' rather than
12958 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
12959 // passes PropTypes.object.
12960 return 'object';
12961 }
12962 if (isSymbol(propType, propValue)) {
12963 return 'symbol';
12964 }
12965 return propType;
12966 }
12967
12968 // This handles more types than `getPropType`. Only used for error messages.
12969 // See `createPrimitiveTypeChecker`.
12970 function getPreciseType(propValue) {
12971 if (typeof propValue === 'undefined' || propValue === null) {
12972 return '' + propValue;
12973 }
12974 var propType = getPropType(propValue);
12975 if (propType === 'object') {
12976 if (propValue instanceof Date) {
12977 return 'date';
12978 } else if (propValue instanceof RegExp) {
12979 return 'regexp';
12980 }
12981 }
12982 return propType;
12983 }
12984
12985 // Returns a string that is postfixed to a warning about an invalid type.
12986 // For example, "undefined" or "of type array"
12987 function getPostfixForTypeWarning(value) {
12988 var type = getPreciseType(value);
12989 switch (type) {
12990 case 'array':
12991 case 'object':
12992 return 'an ' + type;
12993 case 'boolean':
12994 case 'date':
12995 case 'regexp':
12996 return 'a ' + type;
12997 default:
12998 return type;
12999 }
13000 }
13001
13002 // Returns class name of the object, if any.
13003 function getClassName(propValue) {
13004 if (!propValue.constructor || !propValue.constructor.name) {
13005 return ANONYMOUS;
13006 }
13007 return propValue.constructor.name;
13008 }
13009
13010 ReactPropTypes.checkPropTypes = checkPropTypes;
13011 ReactPropTypes.PropTypes = ReactPropTypes;
13012
13013 return ReactPropTypes;
13014};
13015
13016
13017/***/ }),
13018/* 121 */
13019/***/ (function(module, exports, __webpack_require__) {
13020
13021"use strict";
13022/**
13023 * Copyright (c) 2013-present, Facebook, Inc.
13024 *
13025 * This source code is licensed under the MIT license found in the
13026 * LICENSE file in the root directory of this source tree.
13027 *
13028 */
13029
13030
13031
13032var ARIADOMPropertyConfig = {
13033 Properties: {
13034 // Global States and Properties
13035 'aria-current': 0, // state
13036 'aria-details': 0,
13037 'aria-disabled': 0, // state
13038 'aria-hidden': 0, // state
13039 'aria-invalid': 0, // state
13040 'aria-keyshortcuts': 0,
13041 'aria-label': 0,
13042 'aria-roledescription': 0,
13043 // Widget Attributes
13044 'aria-autocomplete': 0,
13045 'aria-checked': 0,
13046 'aria-expanded': 0,
13047 'aria-haspopup': 0,
13048 'aria-level': 0,
13049 'aria-modal': 0,
13050 'aria-multiline': 0,
13051 'aria-multiselectable': 0,
13052 'aria-orientation': 0,
13053 'aria-placeholder': 0,
13054 'aria-pressed': 0,
13055 'aria-readonly': 0,
13056 'aria-required': 0,
13057 'aria-selected': 0,
13058 'aria-sort': 0,
13059 'aria-valuemax': 0,
13060 'aria-valuemin': 0,
13061 'aria-valuenow': 0,
13062 'aria-valuetext': 0,
13063 // Live Region Attributes
13064 'aria-atomic': 0,
13065 'aria-busy': 0,
13066 'aria-live': 0,
13067 'aria-relevant': 0,
13068 // Drag-and-Drop Attributes
13069 'aria-dropeffect': 0,
13070 'aria-grabbed': 0,
13071 // Relationship Attributes
13072 'aria-activedescendant': 0,
13073 'aria-colcount': 0,
13074 'aria-colindex': 0,
13075 'aria-colspan': 0,
13076 'aria-controls': 0,
13077 'aria-describedby': 0,
13078 'aria-errormessage': 0,
13079 'aria-flowto': 0,
13080 'aria-labelledby': 0,
13081 'aria-owns': 0,
13082 'aria-posinset': 0,
13083 'aria-rowcount': 0,
13084 'aria-rowindex': 0,
13085 'aria-rowspan': 0,
13086 'aria-setsize': 0
13087 },
13088 DOMAttributeNames: {},
13089 DOMPropertyNames: {}
13090};
13091
13092module.exports = ARIADOMPropertyConfig;
13093
13094/***/ }),
13095/* 122 */
13096/***/ (function(module, exports, __webpack_require__) {
13097
13098"use strict";
13099/**
13100 * Copyright (c) 2013-present, Facebook, Inc.
13101 *
13102 * This source code is licensed under the MIT license found in the
13103 * LICENSE file in the root directory of this source tree.
13104 *
13105 */
13106
13107
13108
13109var ReactDOMComponentTree = __webpack_require__(4);
13110
13111var focusNode = __webpack_require__(49);
13112
13113var AutoFocusUtils = {
13114 focusDOMComponent: function () {
13115 focusNode(ReactDOMComponentTree.getNodeFromInstance(this));
13116 }
13117};
13118
13119module.exports = AutoFocusUtils;
13120
13121/***/ }),
13122/* 123 */
13123/***/ (function(module, exports, __webpack_require__) {
13124
13125"use strict";
13126/**
13127 * Copyright (c) 2013-present, Facebook, Inc.
13128 *
13129 * This source code is licensed under the MIT license found in the
13130 * LICENSE file in the root directory of this source tree.
13131 *
13132 */
13133
13134
13135
13136var EventPropagators = __webpack_require__(18);
13137var ExecutionEnvironment = __webpack_require__(5);
13138var FallbackCompositionState = __webpack_require__(129);
13139var SyntheticCompositionEvent = __webpack_require__(170);
13140var SyntheticInputEvent = __webpack_require__(173);
13141
13142var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
13143var START_KEYCODE = 229;
13144
13145var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
13146
13147var documentMode = null;
13148if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
13149 documentMode = document.documentMode;
13150}
13151
13152// Webkit offers a very useful `textInput` event that can be used to
13153// directly represent `beforeInput`. The IE `textinput` event is not as
13154// useful, so we don't use it.
13155var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
13156
13157// In IE9+, we have access to composition events, but the data supplied
13158// by the native compositionend event may be incorrect. Japanese ideographic
13159// spaces, for instance (\u3000) are not recorded correctly.
13160var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
13161
13162/**
13163 * Opera <= 12 includes TextEvent in window, but does not fire
13164 * text input events. Rely on keypress instead.
13165 */
13166function isPresto() {
13167 var opera = window.opera;
13168 return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
13169}
13170
13171var SPACEBAR_CODE = 32;
13172var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
13173
13174// Events and their corresponding property names.
13175var eventTypes = {
13176 beforeInput: {
13177 phasedRegistrationNames: {
13178 bubbled: 'onBeforeInput',
13179 captured: 'onBeforeInputCapture'
13180 },
13181 dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']
13182 },
13183 compositionEnd: {
13184 phasedRegistrationNames: {
13185 bubbled: 'onCompositionEnd',
13186 captured: 'onCompositionEndCapture'
13187 },
13188 dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
13189 },
13190 compositionStart: {
13191 phasedRegistrationNames: {
13192 bubbled: 'onCompositionStart',
13193 captured: 'onCompositionStartCapture'
13194 },
13195 dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
13196 },
13197 compositionUpdate: {
13198 phasedRegistrationNames: {
13199 bubbled: 'onCompositionUpdate',
13200 captured: 'onCompositionUpdateCapture'
13201 },
13202 dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
13203 }
13204};
13205
13206// Track whether we've ever handled a keypress on the space key.
13207var hasSpaceKeypress = false;
13208
13209/**
13210 * Return whether a native keypress event is assumed to be a command.
13211 * This is required because Firefox fires `keypress` events for key commands
13212 * (cut, copy, select-all, etc.) even though no character is inserted.
13213 */
13214function isKeypressCommand(nativeEvent) {
13215 return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
13216 // ctrlKey && altKey is equivalent to AltGr, and is not a command.
13217 !(nativeEvent.ctrlKey && nativeEvent.altKey);
13218}
13219
13220/**
13221 * Translate native top level events into event types.
13222 *
13223 * @param {string} topLevelType
13224 * @return {object}
13225 */
13226function getCompositionEventType(topLevelType) {
13227 switch (topLevelType) {
13228 case 'topCompositionStart':
13229 return eventTypes.compositionStart;
13230 case 'topCompositionEnd':
13231 return eventTypes.compositionEnd;
13232 case 'topCompositionUpdate':
13233 return eventTypes.compositionUpdate;
13234 }
13235}
13236
13237/**
13238 * Does our fallback best-guess model think this event signifies that
13239 * composition has begun?
13240 *
13241 * @param {string} topLevelType
13242 * @param {object} nativeEvent
13243 * @return {boolean}
13244 */
13245function isFallbackCompositionStart(topLevelType, nativeEvent) {
13246 return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE;
13247}
13248
13249/**
13250 * Does our fallback mode think that this event is the end of composition?
13251 *
13252 * @param {string} topLevelType
13253 * @param {object} nativeEvent
13254 * @return {boolean}
13255 */
13256function isFallbackCompositionEnd(topLevelType, nativeEvent) {
13257 switch (topLevelType) {
13258 case 'topKeyUp':
13259 // Command keys insert or clear IME input.
13260 return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
13261 case 'topKeyDown':
13262 // Expect IME keyCode on each keydown. If we get any other
13263 // code we must have exited earlier.
13264 return nativeEvent.keyCode !== START_KEYCODE;
13265 case 'topKeyPress':
13266 case 'topMouseDown':
13267 case 'topBlur':
13268 // Events are not possible without cancelling IME.
13269 return true;
13270 default:
13271 return false;
13272 }
13273}
13274
13275/**
13276 * Google Input Tools provides composition data via a CustomEvent,
13277 * with the `data` property populated in the `detail` object. If this
13278 * is available on the event object, use it. If not, this is a plain
13279 * composition event and we have nothing special to extract.
13280 *
13281 * @param {object} nativeEvent
13282 * @return {?string}
13283 */
13284function getDataFromCustomEvent(nativeEvent) {
13285 var detail = nativeEvent.detail;
13286 if (typeof detail === 'object' && 'data' in detail) {
13287 return detail.data;
13288 }
13289 return null;
13290}
13291
13292// Track the current IME composition fallback object, if any.
13293var currentComposition = null;
13294
13295/**
13296 * @return {?object} A SyntheticCompositionEvent.
13297 */
13298function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
13299 var eventType;
13300 var fallbackData;
13301
13302 if (canUseCompositionEvent) {
13303 eventType = getCompositionEventType(topLevelType);
13304 } else if (!currentComposition) {
13305 if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
13306 eventType = eventTypes.compositionStart;
13307 }
13308 } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
13309 eventType = eventTypes.compositionEnd;
13310 }
13311
13312 if (!eventType) {
13313 return null;
13314 }
13315
13316 if (useFallbackCompositionData) {
13317 // The current composition is stored statically and must not be
13318 // overwritten while composition continues.
13319 if (!currentComposition && eventType === eventTypes.compositionStart) {
13320 currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);
13321 } else if (eventType === eventTypes.compositionEnd) {
13322 if (currentComposition) {
13323 fallbackData = currentComposition.getData();
13324 }
13325 }
13326 }
13327
13328 var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
13329
13330 if (fallbackData) {
13331 // Inject data generated from fallback path into the synthetic event.
13332 // This matches the property of native CompositionEventInterface.
13333 event.data = fallbackData;
13334 } else {
13335 var customData = getDataFromCustomEvent(nativeEvent);
13336 if (customData !== null) {
13337 event.data = customData;
13338 }
13339 }
13340
13341 EventPropagators.accumulateTwoPhaseDispatches(event);
13342 return event;
13343}
13344
13345/**
13346 * @param {string} topLevelType Record from `EventConstants`.
13347 * @param {object} nativeEvent Native browser event.
13348 * @return {?string} The string corresponding to this `beforeInput` event.
13349 */
13350function getNativeBeforeInputChars(topLevelType, nativeEvent) {
13351 switch (topLevelType) {
13352 case 'topCompositionEnd':
13353 return getDataFromCustomEvent(nativeEvent);
13354 case 'topKeyPress':
13355 /**
13356 * If native `textInput` events are available, our goal is to make
13357 * use of them. However, there is a special case: the spacebar key.
13358 * In Webkit, preventing default on a spacebar `textInput` event
13359 * cancels character insertion, but it *also* causes the browser
13360 * to fall back to its default spacebar behavior of scrolling the
13361 * page.
13362 *
13363 * Tracking at:
13364 * https://code.google.com/p/chromium/issues/detail?id=355103
13365 *
13366 * To avoid this issue, use the keypress event as if no `textInput`
13367 * event is available.
13368 */
13369 var which = nativeEvent.which;
13370 if (which !== SPACEBAR_CODE) {
13371 return null;
13372 }
13373
13374 hasSpaceKeypress = true;
13375 return SPACEBAR_CHAR;
13376
13377 case 'topTextInput':
13378 // Record the characters to be added to the DOM.
13379 var chars = nativeEvent.data;
13380
13381 // If it's a spacebar character, assume that we have already handled
13382 // it at the keypress level and bail immediately. Android Chrome
13383 // doesn't give us keycodes, so we need to blacklist it.
13384 if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
13385 return null;
13386 }
13387
13388 return chars;
13389
13390 default:
13391 // For other native event types, do nothing.
13392 return null;
13393 }
13394}
13395
13396/**
13397 * For browsers that do not provide the `textInput` event, extract the
13398 * appropriate string to use for SyntheticInputEvent.
13399 *
13400 * @param {string} topLevelType Record from `EventConstants`.
13401 * @param {object} nativeEvent Native browser event.
13402 * @return {?string} The fallback string for this `beforeInput` event.
13403 */
13404function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
13405 // If we are currently composing (IME) and using a fallback to do so,
13406 // try to extract the composed characters from the fallback object.
13407 // If composition event is available, we extract a string only at
13408 // compositionevent, otherwise extract it at fallback events.
13409 if (currentComposition) {
13410 if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
13411 var chars = currentComposition.getData();
13412 FallbackCompositionState.release(currentComposition);
13413 currentComposition = null;
13414 return chars;
13415 }
13416 return null;
13417 }
13418
13419 switch (topLevelType) {
13420 case 'topPaste':
13421 // If a paste event occurs after a keypress, throw out the input
13422 // chars. Paste events should not lead to BeforeInput events.
13423 return null;
13424 case 'topKeyPress':
13425 /**
13426 * As of v27, Firefox may fire keypress events even when no character
13427 * will be inserted. A few possibilities:
13428 *
13429 * - `which` is `0`. Arrow keys, Esc key, etc.
13430 *
13431 * - `which` is the pressed key code, but no char is available.
13432 * Ex: 'AltGr + d` in Polish. There is no modified character for
13433 * this key combination and no character is inserted into the
13434 * document, but FF fires the keypress for char code `100` anyway.
13435 * No `input` event will occur.
13436 *
13437 * - `which` is the pressed key code, but a command combination is
13438 * being used. Ex: `Cmd+C`. No character is inserted, and no
13439 * `input` event will occur.
13440 */
13441 if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
13442 return String.fromCharCode(nativeEvent.which);
13443 }
13444 return null;
13445 case 'topCompositionEnd':
13446 return useFallbackCompositionData ? null : nativeEvent.data;
13447 default:
13448 return null;
13449 }
13450}
13451
13452/**
13453 * Extract a SyntheticInputEvent for `beforeInput`, based on either native
13454 * `textInput` or fallback behavior.
13455 *
13456 * @return {?object} A SyntheticInputEvent.
13457 */
13458function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
13459 var chars;
13460
13461 if (canUseTextInputEvent) {
13462 chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
13463 } else {
13464 chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
13465 }
13466
13467 // If no characters are being inserted, no BeforeInput event should
13468 // be fired.
13469 if (!chars) {
13470 return null;
13471 }
13472
13473 var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
13474
13475 event.data = chars;
13476 EventPropagators.accumulateTwoPhaseDispatches(event);
13477 return event;
13478}
13479
13480/**
13481 * Create an `onBeforeInput` event to match
13482 * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
13483 *
13484 * This event plugin is based on the native `textInput` event
13485 * available in Chrome, Safari, Opera, and IE. This event fires after
13486 * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
13487 *
13488 * `beforeInput` is spec'd but not implemented in any browsers, and
13489 * the `input` event does not provide any useful information about what has
13490 * actually been added, contrary to the spec. Thus, `textInput` is the best
13491 * available event to identify the characters that have actually been inserted
13492 * into the target node.
13493 *
13494 * This plugin is also responsible for emitting `composition` events, thus
13495 * allowing us to share composition fallback code for both `beforeInput` and
13496 * `composition` event types.
13497 */
13498var BeforeInputEventPlugin = {
13499 eventTypes: eventTypes,
13500
13501 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
13502 return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];
13503 }
13504};
13505
13506module.exports = BeforeInputEventPlugin;
13507
13508/***/ }),
13509/* 124 */
13510/***/ (function(module, exports, __webpack_require__) {
13511
13512"use strict";
13513/**
13514 * Copyright (c) 2013-present, Facebook, Inc.
13515 *
13516 * This source code is licensed under the MIT license found in the
13517 * LICENSE file in the root directory of this source tree.
13518 *
13519 */
13520
13521
13522
13523var CSSProperty = __webpack_require__(53);
13524var ExecutionEnvironment = __webpack_require__(5);
13525var ReactInstrumentation = __webpack_require__(6);
13526
13527var camelizeStyleName = __webpack_require__(106);
13528var dangerousStyleValue = __webpack_require__(180);
13529var hyphenateStyleName = __webpack_require__(113);
13530var memoizeStringOnly = __webpack_require__(116);
13531var warning = __webpack_require__(1);
13532
13533var processStyleName = memoizeStringOnly(function (styleName) {
13534 return hyphenateStyleName(styleName);
13535});
13536
13537var hasShorthandPropertyBug = false;
13538var styleFloatAccessor = 'cssFloat';
13539if (ExecutionEnvironment.canUseDOM) {
13540 var tempStyle = document.createElement('div').style;
13541 try {
13542 // IE8 throws "Invalid argument." if resetting shorthand style properties.
13543 tempStyle.font = '';
13544 } catch (e) {
13545 hasShorthandPropertyBug = true;
13546 }
13547 // IE8 only supports accessing cssFloat (standard) as styleFloat
13548 if (document.documentElement.style.cssFloat === undefined) {
13549 styleFloatAccessor = 'styleFloat';
13550 }
13551}
13552
13553if (process.env.NODE_ENV !== 'production') {
13554 // 'msTransform' is correct, but the other prefixes should be capitalized
13555 var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
13556
13557 // style values shouldn't contain a semicolon
13558 var badStyleValueWithSemicolonPattern = /;\s*$/;
13559
13560 var warnedStyleNames = {};
13561 var warnedStyleValues = {};
13562 var warnedForNaNValue = false;
13563
13564 var warnHyphenatedStyleName = function (name, owner) {
13565 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
13566 return;
13567 }
13568
13569 warnedStyleNames[name] = true;
13570 process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;
13571 };
13572
13573 var warnBadVendoredStyleName = function (name, owner) {
13574 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
13575 return;
13576 }
13577
13578 warnedStyleNames[name] = true;
13579 process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0;
13580 };
13581
13582 var warnStyleValueWithSemicolon = function (name, value, owner) {
13583 if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
13584 return;
13585 }
13586
13587 warnedStyleValues[value] = true;
13588 process.env.NODE_ENV !== 'production' ? warning(false, "Style property values shouldn't contain a semicolon.%s " + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
13589 };
13590
13591 var warnStyleValueIsNaN = function (name, value, owner) {
13592 if (warnedForNaNValue) {
13593 return;
13594 }
13595
13596 warnedForNaNValue = true;
13597 process.env.NODE_ENV !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;
13598 };
13599
13600 var checkRenderMessage = function (owner) {
13601 if (owner) {
13602 var name = owner.getName();
13603 if (name) {
13604 return ' Check the render method of `' + name + '`.';
13605 }
13606 }
13607 return '';
13608 };
13609
13610 /**
13611 * @param {string} name
13612 * @param {*} value
13613 * @param {ReactDOMComponent} component
13614 */
13615 var warnValidStyle = function (name, value, component) {
13616 var owner;
13617 if (component) {
13618 owner = component._currentElement._owner;
13619 }
13620 if (name.indexOf('-') > -1) {
13621 warnHyphenatedStyleName(name, owner);
13622 } else if (badVendoredStyleNamePattern.test(name)) {
13623 warnBadVendoredStyleName(name, owner);
13624 } else if (badStyleValueWithSemicolonPattern.test(value)) {
13625 warnStyleValueWithSemicolon(name, value, owner);
13626 }
13627
13628 if (typeof value === 'number' && isNaN(value)) {
13629 warnStyleValueIsNaN(name, value, owner);
13630 }
13631 };
13632}
13633
13634/**
13635 * Operations for dealing with CSS properties.
13636 */
13637var CSSPropertyOperations = {
13638 /**
13639 * Serializes a mapping of style properties for use as inline styles:
13640 *
13641 * > createMarkupForStyles({width: '200px', height: 0})
13642 * "width:200px;height:0;"
13643 *
13644 * Undefined values are ignored so that declarative programming is easier.
13645 * The result should be HTML-escaped before insertion into the DOM.
13646 *
13647 * @param {object} styles
13648 * @param {ReactDOMComponent} component
13649 * @return {?string}
13650 */
13651 createMarkupForStyles: function (styles, component) {
13652 var serialized = '';
13653 for (var styleName in styles) {
13654 if (!styles.hasOwnProperty(styleName)) {
13655 continue;
13656 }
13657 var isCustomProperty = styleName.indexOf('--') === 0;
13658 var styleValue = styles[styleName];
13659 if (process.env.NODE_ENV !== 'production') {
13660 if (!isCustomProperty) {
13661 warnValidStyle(styleName, styleValue, component);
13662 }
13663 }
13664 if (styleValue != null) {
13665 serialized += processStyleName(styleName) + ':';
13666 serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';';
13667 }
13668 }
13669 return serialized || null;
13670 },
13671
13672 /**
13673 * Sets the value for multiple styles on a node. If a value is specified as
13674 * '' (empty string), the corresponding style property will be unset.
13675 *
13676 * @param {DOMElement} node
13677 * @param {object} styles
13678 * @param {ReactDOMComponent} component
13679 */
13680 setValueForStyles: function (node, styles, component) {
13681 if (process.env.NODE_ENV !== 'production') {
13682 ReactInstrumentation.debugTool.onHostOperation({
13683 instanceID: component._debugID,
13684 type: 'update styles',
13685 payload: styles
13686 });
13687 }
13688
13689 var style = node.style;
13690 for (var styleName in styles) {
13691 if (!styles.hasOwnProperty(styleName)) {
13692 continue;
13693 }
13694 var isCustomProperty = styleName.indexOf('--') === 0;
13695 if (process.env.NODE_ENV !== 'production') {
13696 if (!isCustomProperty) {
13697 warnValidStyle(styleName, styles[styleName], component);
13698 }
13699 }
13700 var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty);
13701 if (styleName === 'float' || styleName === 'cssFloat') {
13702 styleName = styleFloatAccessor;
13703 }
13704 if (isCustomProperty) {
13705 style.setProperty(styleName, styleValue);
13706 } else if (styleValue) {
13707 style[styleName] = styleValue;
13708 } else {
13709 var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
13710 if (expansion) {
13711 // Shorthand property that IE8 won't like unsetting, so unset each
13712 // component to placate it
13713 for (var individualStyleName in expansion) {
13714 style[individualStyleName] = '';
13715 }
13716 } else {
13717 style[styleName] = '';
13718 }
13719 }
13720 }
13721 }
13722};
13723
13724module.exports = CSSPropertyOperations;
13725
13726/***/ }),
13727/* 125 */
13728/***/ (function(module, exports, __webpack_require__) {
13729
13730"use strict";
13731/**
13732 * Copyright (c) 2013-present, Facebook, Inc.
13733 *
13734 * This source code is licensed under the MIT license found in the
13735 * LICENSE file in the root directory of this source tree.
13736 *
13737 */
13738
13739
13740
13741var EventPluginHub = __webpack_require__(17);
13742var EventPropagators = __webpack_require__(18);
13743var ExecutionEnvironment = __webpack_require__(5);
13744var ReactDOMComponentTree = __webpack_require__(4);
13745var ReactUpdates = __webpack_require__(9);
13746var SyntheticEvent = __webpack_require__(10);
13747
13748var inputValueTracking = __webpack_require__(69);
13749var getEventTarget = __webpack_require__(41);
13750var isEventSupported = __webpack_require__(42);
13751var isTextInputElement = __webpack_require__(71);
13752
13753var eventTypes = {
13754 change: {
13755 phasedRegistrationNames: {
13756 bubbled: 'onChange',
13757 captured: 'onChangeCapture'
13758 },
13759 dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']
13760 }
13761};
13762
13763function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
13764 var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, target);
13765 event.type = 'change';
13766 EventPropagators.accumulateTwoPhaseDispatches(event);
13767 return event;
13768}
13769/**
13770 * For IE shims
13771 */
13772var activeElement = null;
13773var activeElementInst = null;
13774
13775/**
13776 * SECTION: handle `change` event
13777 */
13778function shouldUseChangeEvent(elem) {
13779 var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
13780 return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
13781}
13782
13783var doesChangeEventBubble = false;
13784if (ExecutionEnvironment.canUseDOM) {
13785 // See `handleChange` comment below
13786 doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
13787}
13788
13789function manualDispatchChangeEvent(nativeEvent) {
13790 var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));
13791
13792 // If change and propertychange bubbled, we'd just bind to it like all the
13793 // other events and have it go through ReactBrowserEventEmitter. Since it
13794 // doesn't, we manually listen for the events and so we have to enqueue and
13795 // process the abstract event manually.
13796 //
13797 // Batching is necessary here in order to ensure that all event handlers run
13798 // before the next rerender (including event handlers attached to ancestor
13799 // elements instead of directly on the input). Without this, controlled
13800 // components don't work properly in conjunction with event bubbling because
13801 // the component is rerendered and the value reverted before all the event
13802 // handlers can run. See https://github.com/facebook/react/issues/708.
13803 ReactUpdates.batchedUpdates(runEventInBatch, event);
13804}
13805
13806function runEventInBatch(event) {
13807 EventPluginHub.enqueueEvents(event);
13808 EventPluginHub.processEventQueue(false);
13809}
13810
13811function startWatchingForChangeEventIE8(target, targetInst) {
13812 activeElement = target;
13813 activeElementInst = targetInst;
13814 activeElement.attachEvent('onchange', manualDispatchChangeEvent);
13815}
13816
13817function stopWatchingForChangeEventIE8() {
13818 if (!activeElement) {
13819 return;
13820 }
13821 activeElement.detachEvent('onchange', manualDispatchChangeEvent);
13822 activeElement = null;
13823 activeElementInst = null;
13824}
13825
13826function getInstIfValueChanged(targetInst, nativeEvent) {
13827 var updated = inputValueTracking.updateValueIfChanged(targetInst);
13828 var simulated = nativeEvent.simulated === true && ChangeEventPlugin._allowSimulatedPassThrough;
13829
13830 if (updated || simulated) {
13831 return targetInst;
13832 }
13833}
13834
13835function getTargetInstForChangeEvent(topLevelType, targetInst) {
13836 if (topLevelType === 'topChange') {
13837 return targetInst;
13838 }
13839}
13840
13841function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
13842 if (topLevelType === 'topFocus') {
13843 // stopWatching() should be a noop here but we call it just in case we
13844 // missed a blur event somehow.
13845 stopWatchingForChangeEventIE8();
13846 startWatchingForChangeEventIE8(target, targetInst);
13847 } else if (topLevelType === 'topBlur') {
13848 stopWatchingForChangeEventIE8();
13849 }
13850}
13851
13852/**
13853 * SECTION: handle `input` event
13854 */
13855var isInputEventSupported = false;
13856if (ExecutionEnvironment.canUseDOM) {
13857 // IE9 claims to support the input event but fails to trigger it when
13858 // deleting text, so we ignore its input events.
13859
13860 isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
13861}
13862
13863/**
13864 * (For IE <=9) Starts tracking propertychange events on the passed-in element
13865 * and override the value property so that we can distinguish user events from
13866 * value changes in JS.
13867 */
13868function startWatchingForValueChange(target, targetInst) {
13869 activeElement = target;
13870 activeElementInst = targetInst;
13871 activeElement.attachEvent('onpropertychange', handlePropertyChange);
13872}
13873
13874/**
13875 * (For IE <=9) Removes the event listeners from the currently-tracked element,
13876 * if any exists.
13877 */
13878function stopWatchingForValueChange() {
13879 if (!activeElement) {
13880 return;
13881 }
13882 activeElement.detachEvent('onpropertychange', handlePropertyChange);
13883
13884 activeElement = null;
13885 activeElementInst = null;
13886}
13887
13888/**
13889 * (For IE <=9) Handles a propertychange event, sending a `change` event if
13890 * the value of the active element has changed.
13891 */
13892function handlePropertyChange(nativeEvent) {
13893 if (nativeEvent.propertyName !== 'value') {
13894 return;
13895 }
13896 if (getInstIfValueChanged(activeElementInst, nativeEvent)) {
13897 manualDispatchChangeEvent(nativeEvent);
13898 }
13899}
13900
13901function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
13902 if (topLevelType === 'topFocus') {
13903 // In IE8, we can capture almost all .value changes by adding a
13904 // propertychange handler and looking for events with propertyName
13905 // equal to 'value'
13906 // In IE9, propertychange fires for most input events but is buggy and
13907 // doesn't fire when text is deleted, but conveniently, selectionchange
13908 // appears to fire in all of the remaining cases so we catch those and
13909 // forward the event if the value has changed
13910 // In either case, we don't want to call the event handler if the value
13911 // is changed from JS so we redefine a setter for `.value` that updates
13912 // our activeElementValue variable, allowing us to ignore those changes
13913 //
13914 // stopWatching() should be a noop here but we call it just in case we
13915 // missed a blur event somehow.
13916 stopWatchingForValueChange();
13917 startWatchingForValueChange(target, targetInst);
13918 } else if (topLevelType === 'topBlur') {
13919 stopWatchingForValueChange();
13920 }
13921}
13922
13923// For IE8 and IE9.
13924function getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEvent) {
13925 if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {
13926 // On the selectionchange event, the target is just document which isn't
13927 // helpful for us so just check activeElement instead.
13928 //
13929 // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
13930 // propertychange on the first input event after setting `value` from a
13931 // script and fires only keydown, keypress, keyup. Catching keyup usually
13932 // gets it and catching keydown lets us fire an event for the first
13933 // keystroke if user does a key repeat (it'll be a little delayed: right
13934 // before the second keystroke). Other input methods (e.g., paste) seem to
13935 // fire selectionchange normally.
13936 return getInstIfValueChanged(activeElementInst, nativeEvent);
13937 }
13938}
13939
13940/**
13941 * SECTION: handle `click` event
13942 */
13943function shouldUseClickEvent(elem) {
13944 // Use the `click` event to detect changes to checkbox and radio inputs.
13945 // This approach works across all browsers, whereas `change` does not fire
13946 // until `blur` in IE8.
13947 var nodeName = elem.nodeName;
13948 return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
13949}
13950
13951function getTargetInstForClickEvent(topLevelType, targetInst, nativeEvent) {
13952 if (topLevelType === 'topClick') {
13953 return getInstIfValueChanged(targetInst, nativeEvent);
13954 }
13955}
13956
13957function getTargetInstForInputOrChangeEvent(topLevelType, targetInst, nativeEvent) {
13958 if (topLevelType === 'topInput' || topLevelType === 'topChange') {
13959 return getInstIfValueChanged(targetInst, nativeEvent);
13960 }
13961}
13962
13963function handleControlledInputBlur(inst, node) {
13964 // TODO: In IE, inst is occasionally null. Why?
13965 if (inst == null) {
13966 return;
13967 }
13968
13969 // Fiber and ReactDOM keep wrapper state in separate places
13970 var state = inst._wrapperState || node._wrapperState;
13971
13972 if (!state || !state.controlled || node.type !== 'number') {
13973 return;
13974 }
13975
13976 // If controlled, assign the value attribute to the current value on blur
13977 var value = '' + node.value;
13978 if (node.getAttribute('value') !== value) {
13979 node.setAttribute('value', value);
13980 }
13981}
13982
13983/**
13984 * This plugin creates an `onChange` event that normalizes change events
13985 * across form elements. This event fires at a time when it's possible to
13986 * change the element's value without seeing a flicker.
13987 *
13988 * Supported elements are:
13989 * - input (see `isTextInputElement`)
13990 * - textarea
13991 * - select
13992 */
13993var ChangeEventPlugin = {
13994 eventTypes: eventTypes,
13995
13996 _allowSimulatedPassThrough: true,
13997 _isInputEventSupported: isInputEventSupported,
13998
13999 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
14000 var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
14001
14002 var getTargetInstFunc, handleEventFunc;
14003 if (shouldUseChangeEvent(targetNode)) {
14004 if (doesChangeEventBubble) {
14005 getTargetInstFunc = getTargetInstForChangeEvent;
14006 } else {
14007 handleEventFunc = handleEventsForChangeEventIE8;
14008 }
14009 } else if (isTextInputElement(targetNode)) {
14010 if (isInputEventSupported) {
14011 getTargetInstFunc = getTargetInstForInputOrChangeEvent;
14012 } else {
14013 getTargetInstFunc = getTargetInstForInputEventPolyfill;
14014 handleEventFunc = handleEventsForInputEventPolyfill;
14015 }
14016 } else if (shouldUseClickEvent(targetNode)) {
14017 getTargetInstFunc = getTargetInstForClickEvent;
14018 }
14019
14020 if (getTargetInstFunc) {
14021 var inst = getTargetInstFunc(topLevelType, targetInst, nativeEvent);
14022 if (inst) {
14023 var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
14024 return event;
14025 }
14026 }
14027
14028 if (handleEventFunc) {
14029 handleEventFunc(topLevelType, targetNode, targetInst);
14030 }
14031
14032 // When blurring, set the value attribute for number inputs
14033 if (topLevelType === 'topBlur') {
14034 handleControlledInputBlur(targetInst, targetNode);
14035 }
14036 }
14037};
14038
14039module.exports = ChangeEventPlugin;
14040
14041/***/ }),
14042/* 126 */
14043/***/ (function(module, exports, __webpack_require__) {
14044
14045"use strict";
14046/**
14047 * Copyright (c) 2013-present, Facebook, Inc.
14048 *
14049 * This source code is licensed under the MIT license found in the
14050 * LICENSE file in the root directory of this source tree.
14051 *
14052 */
14053
14054
14055
14056var _prodInvariant = __webpack_require__(2);
14057
14058var DOMLazyTree = __webpack_require__(15);
14059var ExecutionEnvironment = __webpack_require__(5);
14060
14061var createNodesFromMarkup = __webpack_require__(109);
14062var emptyFunction = __webpack_require__(7);
14063var invariant = __webpack_require__(0);
14064
14065var Danger = {
14066 /**
14067 * Replaces a node with a string of markup at its current position within its
14068 * parent. The markup must render into a single root node.
14069 *
14070 * @param {DOMElement} oldChild Child node to replace.
14071 * @param {string} markup Markup to render in place of the child node.
14072 * @internal
14073 */
14074 dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {
14075 !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0;
14076 !markup ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0;
14077 !(oldChild.nodeName !== 'HTML') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0;
14078
14079 if (typeof markup === 'string') {
14080 var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
14081 oldChild.parentNode.replaceChild(newChild, oldChild);
14082 } else {
14083 DOMLazyTree.replaceChildWithTree(oldChild, markup);
14084 }
14085 }
14086};
14087
14088module.exports = Danger;
14089
14090/***/ }),
14091/* 127 */
14092/***/ (function(module, exports, __webpack_require__) {
14093
14094"use strict";
14095/**
14096 * Copyright (c) 2013-present, Facebook, Inc.
14097 *
14098 * This source code is licensed under the MIT license found in the
14099 * LICENSE file in the root directory of this source tree.
14100 *
14101 */
14102
14103
14104
14105/**
14106 * Module that is injectable into `EventPluginHub`, that specifies a
14107 * deterministic ordering of `EventPlugin`s. A convenient way to reason about
14108 * plugins, without having to package every one of them. This is better than
14109 * having plugins be ordered in the same order that they are injected because
14110 * that ordering would be influenced by the packaging order.
14111 * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
14112 * preventing default on events is convenient in `SimpleEventPlugin` handlers.
14113 */
14114
14115var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
14116
14117module.exports = DefaultEventPluginOrder;
14118
14119/***/ }),
14120/* 128 */
14121/***/ (function(module, exports, __webpack_require__) {
14122
14123"use strict";
14124/**
14125 * Copyright (c) 2013-present, Facebook, Inc.
14126 *
14127 * This source code is licensed under the MIT license found in the
14128 * LICENSE file in the root directory of this source tree.
14129 *
14130 */
14131
14132
14133
14134var EventPropagators = __webpack_require__(18);
14135var ReactDOMComponentTree = __webpack_require__(4);
14136var SyntheticMouseEvent = __webpack_require__(23);
14137
14138var eventTypes = {
14139 mouseEnter: {
14140 registrationName: 'onMouseEnter',
14141 dependencies: ['topMouseOut', 'topMouseOver']
14142 },
14143 mouseLeave: {
14144 registrationName: 'onMouseLeave',
14145 dependencies: ['topMouseOut', 'topMouseOver']
14146 }
14147};
14148
14149var EnterLeaveEventPlugin = {
14150 eventTypes: eventTypes,
14151
14152 /**
14153 * For almost every interaction we care about, there will be both a top-level
14154 * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
14155 * we do not extract duplicate events. However, moving the mouse into the
14156 * browser from outside will not fire a `mouseout` event. In this case, we use
14157 * the `mouseover` top-level event.
14158 */
14159 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
14160 if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
14161 return null;
14162 }
14163 if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') {
14164 // Must not be a mouse in or mouse out - ignoring.
14165 return null;
14166 }
14167
14168 var win;
14169 if (nativeEventTarget.window === nativeEventTarget) {
14170 // `nativeEventTarget` is probably a window object.
14171 win = nativeEventTarget;
14172 } else {
14173 // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
14174 var doc = nativeEventTarget.ownerDocument;
14175 if (doc) {
14176 win = doc.defaultView || doc.parentWindow;
14177 } else {
14178 win = window;
14179 }
14180 }
14181
14182 var from;
14183 var to;
14184 if (topLevelType === 'topMouseOut') {
14185 from = targetInst;
14186 var related = nativeEvent.relatedTarget || nativeEvent.toElement;
14187 to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;
14188 } else {
14189 // Moving to a node from outside the window.
14190 from = null;
14191 to = targetInst;
14192 }
14193
14194 if (from === to) {
14195 // Nothing pertains to our managed components.
14196 return null;
14197 }
14198
14199 var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from);
14200 var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to);
14201
14202 var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);
14203 leave.type = 'mouseleave';
14204 leave.target = fromNode;
14205 leave.relatedTarget = toNode;
14206
14207 var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);
14208 enter.type = 'mouseenter';
14209 enter.target = toNode;
14210 enter.relatedTarget = fromNode;
14211
14212 EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to);
14213
14214 return [leave, enter];
14215 }
14216};
14217
14218module.exports = EnterLeaveEventPlugin;
14219
14220/***/ }),
14221/* 129 */
14222/***/ (function(module, exports, __webpack_require__) {
14223
14224"use strict";
14225/**
14226 * Copyright (c) 2013-present, Facebook, Inc.
14227 *
14228 * This source code is licensed under the MIT license found in the
14229 * LICENSE file in the root directory of this source tree.
14230 *
14231 */
14232
14233
14234
14235var _assign = __webpack_require__(3);
14236
14237var PooledClass = __webpack_require__(12);
14238
14239var getTextContentAccessor = __webpack_require__(68);
14240
14241/**
14242 * This helper class stores information about text content of a target node,
14243 * allowing comparison of content before and after a given event.
14244 *
14245 * Identify the node where selection currently begins, then observe
14246 * both its text content and its current position in the DOM. Since the
14247 * browser may natively replace the target node during composition, we can
14248 * use its position to find its replacement.
14249 *
14250 * @param {DOMEventTarget} root
14251 */
14252function FallbackCompositionState(root) {
14253 this._root = root;
14254 this._startText = this.getText();
14255 this._fallbackText = null;
14256}
14257
14258_assign(FallbackCompositionState.prototype, {
14259 destructor: function () {
14260 this._root = null;
14261 this._startText = null;
14262 this._fallbackText = null;
14263 },
14264
14265 /**
14266 * Get current text of input.
14267 *
14268 * @return {string}
14269 */
14270 getText: function () {
14271 if ('value' in this._root) {
14272 return this._root.value;
14273 }
14274 return this._root[getTextContentAccessor()];
14275 },
14276
14277 /**
14278 * Determine the differing substring between the initially stored
14279 * text content and the current content.
14280 *
14281 * @return {string}
14282 */
14283 getData: function () {
14284 if (this._fallbackText) {
14285 return this._fallbackText;
14286 }
14287
14288 var start;
14289 var startValue = this._startText;
14290 var startLength = startValue.length;
14291 var end;
14292 var endValue = this.getText();
14293 var endLength = endValue.length;
14294
14295 for (start = 0; start < startLength; start++) {
14296 if (startValue[start] !== endValue[start]) {
14297 break;
14298 }
14299 }
14300
14301 var minEnd = startLength - start;
14302 for (end = 1; end <= minEnd; end++) {
14303 if (startValue[startLength - end] !== endValue[endLength - end]) {
14304 break;
14305 }
14306 }
14307
14308 var sliceTail = end > 1 ? 1 - end : undefined;
14309 this._fallbackText = endValue.slice(start, sliceTail);
14310 return this._fallbackText;
14311 }
14312});
14313
14314PooledClass.addPoolingTo(FallbackCompositionState);
14315
14316module.exports = FallbackCompositionState;
14317
14318/***/ }),
14319/* 130 */
14320/***/ (function(module, exports, __webpack_require__) {
14321
14322"use strict";
14323/**
14324 * Copyright (c) 2013-present, Facebook, Inc.
14325 *
14326 * This source code is licensed under the MIT license found in the
14327 * LICENSE file in the root directory of this source tree.
14328 *
14329 */
14330
14331
14332
14333var DOMProperty = __webpack_require__(16);
14334
14335var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
14336var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
14337var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
14338var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
14339var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
14340
14341var HTMLDOMPropertyConfig = {
14342 isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
14343 Properties: {
14344 /**
14345 * Standard Properties
14346 */
14347 accept: 0,
14348 acceptCharset: 0,
14349 accessKey: 0,
14350 action: 0,
14351 allowFullScreen: HAS_BOOLEAN_VALUE,
14352 allowTransparency: 0,
14353 alt: 0,
14354 // specifies target context for links with `preload` type
14355 as: 0,
14356 async: HAS_BOOLEAN_VALUE,
14357 autoComplete: 0,
14358 // autoFocus is polyfilled/normalized by AutoFocusUtils
14359 // autoFocus: HAS_BOOLEAN_VALUE,
14360 autoPlay: HAS_BOOLEAN_VALUE,
14361 capture: HAS_BOOLEAN_VALUE,
14362 cellPadding: 0,
14363 cellSpacing: 0,
14364 charSet: 0,
14365 challenge: 0,
14366 checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
14367 cite: 0,
14368 classID: 0,
14369 className: 0,
14370 cols: HAS_POSITIVE_NUMERIC_VALUE,
14371 colSpan: 0,
14372 content: 0,
14373 contentEditable: 0,
14374 contextMenu: 0,
14375 controls: HAS_BOOLEAN_VALUE,
14376 controlsList: 0,
14377 coords: 0,
14378 crossOrigin: 0,
14379 data: 0, // For `<object />` acts as `src`.
14380 dateTime: 0,
14381 'default': HAS_BOOLEAN_VALUE,
14382 defer: HAS_BOOLEAN_VALUE,
14383 dir: 0,
14384 disabled: HAS_BOOLEAN_VALUE,
14385 download: HAS_OVERLOADED_BOOLEAN_VALUE,
14386 draggable: 0,
14387 encType: 0,
14388 form: 0,
14389 formAction: 0,
14390 formEncType: 0,
14391 formMethod: 0,
14392 formNoValidate: HAS_BOOLEAN_VALUE,
14393 formTarget: 0,
14394 frameBorder: 0,
14395 headers: 0,
14396 height: 0,
14397 hidden: HAS_BOOLEAN_VALUE,
14398 high: 0,
14399 href: 0,
14400 hrefLang: 0,
14401 htmlFor: 0,
14402 httpEquiv: 0,
14403 icon: 0,
14404 id: 0,
14405 inputMode: 0,
14406 integrity: 0,
14407 is: 0,
14408 keyParams: 0,
14409 keyType: 0,
14410 kind: 0,
14411 label: 0,
14412 lang: 0,
14413 list: 0,
14414 loop: HAS_BOOLEAN_VALUE,
14415 low: 0,
14416 manifest: 0,
14417 marginHeight: 0,
14418 marginWidth: 0,
14419 max: 0,
14420 maxLength: 0,
14421 media: 0,
14422 mediaGroup: 0,
14423 method: 0,
14424 min: 0,
14425 minLength: 0,
14426 // Caution; `option.selected` is not updated if `select.multiple` is
14427 // disabled with `removeAttribute`.
14428 multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
14429 muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
14430 name: 0,
14431 nonce: 0,
14432 noValidate: HAS_BOOLEAN_VALUE,
14433 open: HAS_BOOLEAN_VALUE,
14434 optimum: 0,
14435 pattern: 0,
14436 placeholder: 0,
14437 playsInline: HAS_BOOLEAN_VALUE,
14438 poster: 0,
14439 preload: 0,
14440 profile: 0,
14441 radioGroup: 0,
14442 readOnly: HAS_BOOLEAN_VALUE,
14443 referrerPolicy: 0,
14444 rel: 0,
14445 required: HAS_BOOLEAN_VALUE,
14446 reversed: HAS_BOOLEAN_VALUE,
14447 role: 0,
14448 rows: HAS_POSITIVE_NUMERIC_VALUE,
14449 rowSpan: HAS_NUMERIC_VALUE,
14450 sandbox: 0,
14451 scope: 0,
14452 scoped: HAS_BOOLEAN_VALUE,
14453 scrolling: 0,
14454 seamless: HAS_BOOLEAN_VALUE,
14455 selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
14456 shape: 0,
14457 size: HAS_POSITIVE_NUMERIC_VALUE,
14458 sizes: 0,
14459 span: HAS_POSITIVE_NUMERIC_VALUE,
14460 spellCheck: 0,
14461 src: 0,
14462 srcDoc: 0,
14463 srcLang: 0,
14464 srcSet: 0,
14465 start: HAS_NUMERIC_VALUE,
14466 step: 0,
14467 style: 0,
14468 summary: 0,
14469 tabIndex: 0,
14470 target: 0,
14471 title: 0,
14472 // Setting .type throws on non-<input> tags
14473 type: 0,
14474 useMap: 0,
14475 value: 0,
14476 width: 0,
14477 wmode: 0,
14478 wrap: 0,
14479
14480 /**
14481 * RDFa Properties
14482 */
14483 about: 0,
14484 datatype: 0,
14485 inlist: 0,
14486 prefix: 0,
14487 // property is also supported for OpenGraph in meta tags.
14488 property: 0,
14489 resource: 0,
14490 'typeof': 0,
14491 vocab: 0,
14492
14493 /**
14494 * Non-standard Properties
14495 */
14496 // autoCapitalize and autoCorrect are supported in Mobile Safari for
14497 // keyboard hints.
14498 autoCapitalize: 0,
14499 autoCorrect: 0,
14500 // autoSave allows WebKit/Blink to persist values of input fields on page reloads
14501 autoSave: 0,
14502 // color is for Safari mask-icon link
14503 color: 0,
14504 // itemProp, itemScope, itemType are for
14505 // Microdata support. See http://schema.org/docs/gs.html
14506 itemProp: 0,
14507 itemScope: HAS_BOOLEAN_VALUE,
14508 itemType: 0,
14509 // itemID and itemRef are for Microdata support as well but
14510 // only specified in the WHATWG spec document. See
14511 // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
14512 itemID: 0,
14513 itemRef: 0,
14514 // results show looking glass icon and recent searches on input
14515 // search fields in WebKit/Blink
14516 results: 0,
14517 // IE-only attribute that specifies security restrictions on an iframe
14518 // as an alternative to the sandbox attribute on IE<10
14519 security: 0,
14520 // IE-only attribute that controls focus behavior
14521 unselectable: 0
14522 },
14523 DOMAttributeNames: {
14524 acceptCharset: 'accept-charset',
14525 className: 'class',
14526 htmlFor: 'for',
14527 httpEquiv: 'http-equiv'
14528 },
14529 DOMPropertyNames: {},
14530 DOMMutationMethods: {
14531 value: function (node, value) {
14532 if (value == null) {
14533 return node.removeAttribute('value');
14534 }
14535
14536 // Number inputs get special treatment due to some edge cases in
14537 // Chrome. Let everything else assign the value attribute as normal.
14538 // https://github.com/facebook/react/issues/7253#issuecomment-236074326
14539 if (node.type !== 'number' || node.hasAttribute('value') === false) {
14540 node.setAttribute('value', '' + value);
14541 } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) {
14542 // Don't assign an attribute if validation reports bad
14543 // input. Chrome will clear the value. Additionally, don't
14544 // operate on inputs that have focus, otherwise Chrome might
14545 // strip off trailing decimal places and cause the user's
14546 // cursor position to jump to the beginning of the input.
14547 //
14548 // In ReactDOMInput, we have an onBlur event that will trigger
14549 // this function again when focus is lost.
14550 node.setAttribute('value', '' + value);
14551 }
14552 }
14553 }
14554};
14555
14556module.exports = HTMLDOMPropertyConfig;
14557
14558/***/ }),
14559/* 131 */
14560/***/ (function(module, exports, __webpack_require__) {
14561
14562"use strict";
14563/**
14564 * Copyright (c) 2014-present, Facebook, Inc.
14565 *
14566 * This source code is licensed under the MIT license found in the
14567 * LICENSE file in the root directory of this source tree.
14568 *
14569 */
14570
14571
14572
14573var ReactReconciler = __webpack_require__(19);
14574
14575var instantiateReactComponent = __webpack_require__(70);
14576var KeyEscapeUtils = __webpack_require__(32);
14577var shouldUpdateReactComponent = __webpack_require__(73);
14578var traverseAllChildren = __webpack_require__(74);
14579var warning = __webpack_require__(1);
14580
14581var ReactComponentTreeHook;
14582
14583if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
14584 // Temporary hack.
14585 // Inline requires don't work well with Jest:
14586 // https://github.com/facebook/react/issues/7240
14587 // Remove the inline requires when we don't need them anymore:
14588 // https://github.com/facebook/react/pull/7178
14589 ReactComponentTreeHook = __webpack_require__(8);
14590}
14591
14592function instantiateChild(childInstances, child, name, selfDebugID) {
14593 // We found a component instance.
14594 var keyUnique = childInstances[name] === undefined;
14595 if (process.env.NODE_ENV !== 'production') {
14596 if (!ReactComponentTreeHook) {
14597 ReactComponentTreeHook = __webpack_require__(8);
14598 }
14599 if (!keyUnique) {
14600 process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
14601 }
14602 }
14603 if (child != null && keyUnique) {
14604 childInstances[name] = instantiateReactComponent(child, true);
14605 }
14606}
14607
14608/**
14609 * ReactChildReconciler provides helpers for initializing or updating a set of
14610 * children. Its output is suitable for passing it onto ReactMultiChild which
14611 * does diffed reordering and insertion.
14612 */
14613var ReactChildReconciler = {
14614 /**
14615 * Generates a "mount image" for each of the supplied children. In the case
14616 * of `ReactDOMComponent`, a mount image is a string of markup.
14617 *
14618 * @param {?object} nestedChildNodes Nested child maps.
14619 * @return {?object} A set of child instances.
14620 * @internal
14621 */
14622 instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID) // 0 in production and for roots
14623 {
14624 if (nestedChildNodes == null) {
14625 return null;
14626 }
14627 var childInstances = {};
14628
14629 if (process.env.NODE_ENV !== 'production') {
14630 traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {
14631 return instantiateChild(childInsts, child, name, selfDebugID);
14632 }, childInstances);
14633 } else {
14634 traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);
14635 }
14636 return childInstances;
14637 },
14638
14639 /**
14640 * Updates the rendered children and returns a new set of children.
14641 *
14642 * @param {?object} prevChildren Previously initialized set of children.
14643 * @param {?object} nextChildren Flat child element maps.
14644 * @param {ReactReconcileTransaction} transaction
14645 * @param {object} context
14646 * @return {?object} A new set of child instances.
14647 * @internal
14648 */
14649 updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) // 0 in production and for roots
14650 {
14651 // We currently don't have a way to track moves here but if we use iterators
14652 // instead of for..in we can zip the iterators and check if an item has
14653 // moved.
14654 // TODO: If nothing has changed, return the prevChildren object so that we
14655 // can quickly bailout if nothing has changed.
14656 if (!nextChildren && !prevChildren) {
14657 return;
14658 }
14659 var name;
14660 var prevChild;
14661 for (name in nextChildren) {
14662 if (!nextChildren.hasOwnProperty(name)) {
14663 continue;
14664 }
14665 prevChild = prevChildren && prevChildren[name];
14666 var prevElement = prevChild && prevChild._currentElement;
14667 var nextElement = nextChildren[name];
14668 if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {
14669 ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);
14670 nextChildren[name] = prevChild;
14671 } else {
14672 if (prevChild) {
14673 removedNodes[name] = ReactReconciler.getHostNode(prevChild);
14674 ReactReconciler.unmountComponent(prevChild, false);
14675 }
14676 // The child must be instantiated before it's mounted.
14677 var nextChildInstance = instantiateReactComponent(nextElement, true);
14678 nextChildren[name] = nextChildInstance;
14679 // Creating mount image now ensures refs are resolved in right order
14680 // (see https://github.com/facebook/react/pull/7101 for explanation).
14681 var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);
14682 mountImages.push(nextChildMountImage);
14683 }
14684 }
14685 // Unmount children that are no longer present.
14686 for (name in prevChildren) {
14687 if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
14688 prevChild = prevChildren[name];
14689 removedNodes[name] = ReactReconciler.getHostNode(prevChild);
14690 ReactReconciler.unmountComponent(prevChild, false);
14691 }
14692 }
14693 },
14694
14695 /**
14696 * Unmounts all rendered children. This should be used to clean up children
14697 * when this component is unmounted.
14698 *
14699 * @param {?object} renderedChildren Previously initialized set of children.
14700 * @internal
14701 */
14702 unmountChildren: function (renderedChildren, safely) {
14703 for (var name in renderedChildren) {
14704 if (renderedChildren.hasOwnProperty(name)) {
14705 var renderedChild = renderedChildren[name];
14706 ReactReconciler.unmountComponent(renderedChild, safely);
14707 }
14708 }
14709 }
14710};
14711
14712module.exports = ReactChildReconciler;
14713
14714/***/ }),
14715/* 132 */
14716/***/ (function(module, exports, __webpack_require__) {
14717
14718"use strict";
14719/**
14720 * Copyright (c) 2013-present, Facebook, Inc.
14721 *
14722 * This source code is licensed under the MIT license found in the
14723 * LICENSE file in the root directory of this source tree.
14724 *
14725 */
14726
14727
14728
14729var DOMChildrenOperations = __webpack_require__(28);
14730var ReactDOMIDOperations = __webpack_require__(137);
14731
14732/**
14733 * Abstracts away all functionality of the reconciler that requires knowledge of
14734 * the browser context. TODO: These callers should be refactored to avoid the
14735 * need for this injection.
14736 */
14737var ReactComponentBrowserEnvironment = {
14738 processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
14739
14740 replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
14741};
14742
14743module.exports = ReactComponentBrowserEnvironment;
14744
14745/***/ }),
14746/* 133 */
14747/***/ (function(module, exports, __webpack_require__) {
14748
14749"use strict";
14750/**
14751 * Copyright (c) 2013-present, Facebook, Inc.
14752 *
14753 * This source code is licensed under the MIT license found in the
14754 * LICENSE file in the root directory of this source tree.
14755 *
14756 */
14757
14758
14759
14760var _prodInvariant = __webpack_require__(2),
14761 _assign = __webpack_require__(3);
14762
14763var React = __webpack_require__(21);
14764var ReactComponentEnvironment = __webpack_require__(35);
14765var ReactCurrentOwner = __webpack_require__(11);
14766var ReactErrorUtils = __webpack_require__(36);
14767var ReactInstanceMap = __webpack_require__(37);
14768var ReactInstrumentation = __webpack_require__(6);
14769var ReactNodeTypes = __webpack_require__(156);
14770var ReactReconciler = __webpack_require__(19);
14771
14772if (process.env.NODE_ENV !== 'production') {
14773 var checkReactTypeSpec = __webpack_require__(179);
14774}
14775
14776var emptyObject = __webpack_require__(22);
14777var invariant = __webpack_require__(0);
14778var shallowEqual = __webpack_require__(27);
14779var shouldUpdateReactComponent = __webpack_require__(73);
14780var warning = __webpack_require__(1);
14781
14782var CompositeTypes = {
14783 ImpureClass: 0,
14784 PureClass: 1,
14785 StatelessFunctional: 2
14786};
14787
14788function StatelessComponent(Component) {}
14789StatelessComponent.prototype.render = function () {
14790 var Component = ReactInstanceMap.get(this)._currentElement.type;
14791 var element = Component(this.props, this.context, this.updater);
14792 warnIfInvalidElement(Component, element);
14793 return element;
14794};
14795
14796function warnIfInvalidElement(Component, element) {
14797 if (process.env.NODE_ENV !== 'production') {
14798 process.env.NODE_ENV !== 'production' ? warning(element === null || element === false || React.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0;
14799 process.env.NODE_ENV !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0;
14800 }
14801}
14802
14803function shouldConstruct(Component) {
14804 return !!(Component.prototype && Component.prototype.isReactComponent);
14805}
14806
14807function isPureComponent(Component) {
14808 return !!(Component.prototype && Component.prototype.isPureReactComponent);
14809}
14810
14811// Separated into a function to contain deoptimizations caused by try/finally.
14812function measureLifeCyclePerf(fn, debugID, timerType) {
14813 if (debugID === 0) {
14814 // Top-level wrappers (see ReactMount) and empty components (see
14815 // ReactDOMEmptyComponent) are invisible to hooks and devtools.
14816 // Both are implementation details that should go away in the future.
14817 return fn();
14818 }
14819
14820 ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);
14821 try {
14822 return fn();
14823 } finally {
14824 ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);
14825 }
14826}
14827
14828/**
14829 * ------------------ The Life-Cycle of a Composite Component ------------------
14830 *
14831 * - constructor: Initialization of state. The instance is now retained.
14832 * - componentWillMount
14833 * - render
14834 * - [children's constructors]
14835 * - [children's componentWillMount and render]
14836 * - [children's componentDidMount]
14837 * - componentDidMount
14838 *
14839 * Update Phases:
14840 * - componentWillReceiveProps (only called if parent updated)
14841 * - shouldComponentUpdate
14842 * - componentWillUpdate
14843 * - render
14844 * - [children's constructors or receive props phases]
14845 * - componentDidUpdate
14846 *
14847 * - componentWillUnmount
14848 * - [children's componentWillUnmount]
14849 * - [children destroyed]
14850 * - (destroyed): The instance is now blank, released by React and ready for GC.
14851 *
14852 * -----------------------------------------------------------------------------
14853 */
14854
14855/**
14856 * An incrementing ID assigned to each component when it is mounted. This is
14857 * used to enforce the order in which `ReactUpdates` updates dirty components.
14858 *
14859 * @private
14860 */
14861var nextMountID = 1;
14862
14863/**
14864 * @lends {ReactCompositeComponent.prototype}
14865 */
14866var ReactCompositeComponent = {
14867 /**
14868 * Base constructor for all composite component.
14869 *
14870 * @param {ReactElement} element
14871 * @final
14872 * @internal
14873 */
14874 construct: function (element) {
14875 this._currentElement = element;
14876 this._rootNodeID = 0;
14877 this._compositeType = null;
14878 this._instance = null;
14879 this._hostParent = null;
14880 this._hostContainerInfo = null;
14881
14882 // See ReactUpdateQueue
14883 this._updateBatchNumber = null;
14884 this._pendingElement = null;
14885 this._pendingStateQueue = null;
14886 this._pendingReplaceState = false;
14887 this._pendingForceUpdate = false;
14888
14889 this._renderedNodeType = null;
14890 this._renderedComponent = null;
14891 this._context = null;
14892 this._mountOrder = 0;
14893 this._topLevelWrapper = null;
14894
14895 // See ReactUpdates and ReactUpdateQueue.
14896 this._pendingCallbacks = null;
14897
14898 // ComponentWillUnmount shall only be called once
14899 this._calledComponentWillUnmount = false;
14900
14901 if (process.env.NODE_ENV !== 'production') {
14902 this._warnedAboutRefsInRender = false;
14903 }
14904 },
14905
14906 /**
14907 * Initializes the component, renders markup, and registers event listeners.
14908 *
14909 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
14910 * @param {?object} hostParent
14911 * @param {?object} hostContainerInfo
14912 * @param {?object} context
14913 * @return {?string} Rendered markup to be inserted into the DOM.
14914 * @final
14915 * @internal
14916 */
14917 mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
14918 var _this = this;
14919
14920 this._context = context;
14921 this._mountOrder = nextMountID++;
14922 this._hostParent = hostParent;
14923 this._hostContainerInfo = hostContainerInfo;
14924
14925 var publicProps = this._currentElement.props;
14926 var publicContext = this._processContext(context);
14927
14928 var Component = this._currentElement.type;
14929
14930 var updateQueue = transaction.getUpdateQueue();
14931
14932 // Initialize the public class
14933 var doConstruct = shouldConstruct(Component);
14934 var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);
14935 var renderedElement;
14936
14937 // Support functional components
14938 if (!doConstruct && (inst == null || inst.render == null)) {
14939 renderedElement = inst;
14940 warnIfInvalidElement(Component, renderedElement);
14941 !(inst === null || inst === false || React.isValidElement(inst)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : _prodInvariant('105', Component.displayName || Component.name || 'Component') : void 0;
14942 inst = new StatelessComponent(Component);
14943 this._compositeType = CompositeTypes.StatelessFunctional;
14944 } else {
14945 if (isPureComponent(Component)) {
14946 this._compositeType = CompositeTypes.PureClass;
14947 } else {
14948 this._compositeType = CompositeTypes.ImpureClass;
14949 }
14950 }
14951
14952 if (process.env.NODE_ENV !== 'production') {
14953 // This will throw later in _renderValidatedComponent, but add an early
14954 // warning now to help debugging
14955 if (inst.render == null) {
14956 process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component') : void 0;
14957 }
14958
14959 var propsMutated = inst.props !== publicProps;
14960 var componentName = Component.displayName || Component.name || 'Component';
14961
14962 process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", componentName, componentName) : void 0;
14963 }
14964
14965 // These should be set up in the constructor, but as a convenience for
14966 // simpler class abstractions, we set them up after the fact.
14967 inst.props = publicProps;
14968 inst.context = publicContext;
14969 inst.refs = emptyObject;
14970 inst.updater = updateQueue;
14971
14972 this._instance = inst;
14973
14974 // Store a reference from the instance back to the internal representation
14975 ReactInstanceMap.set(inst, this);
14976
14977 if (process.env.NODE_ENV !== 'production') {
14978 // Since plain JS classes are defined without any special initialization
14979 // logic, we can not catch common errors early. Therefore, we have to
14980 // catch them here, at initialization time, instead.
14981 process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, '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?', this.getName() || 'a component') : void 0;
14982 process.env.NODE_ENV !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, '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.', this.getName() || 'a component') : void 0;
14983 process.env.NODE_ENV !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0;
14984 process.env.NODE_ENV !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0;
14985 process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%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.', this.getName() || 'A component') : void 0;
14986 process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : void 0;
14987 process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0;
14988 }
14989
14990 var initialState = inst.state;
14991 if (initialState === undefined) {
14992 inst.state = initialState = null;
14993 }
14994 !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0;
14995
14996 this._pendingStateQueue = null;
14997 this._pendingReplaceState = false;
14998 this._pendingForceUpdate = false;
14999
15000 var markup;
15001 if (inst.unstable_handleError) {
15002 markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
15003 } else {
15004 markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
15005 }
15006
15007 if (inst.componentDidMount) {
15008 if (process.env.NODE_ENV !== 'production') {
15009 transaction.getReactMountReady().enqueue(function () {
15010 measureLifeCyclePerf(function () {
15011 return inst.componentDidMount();
15012 }, _this._debugID, 'componentDidMount');
15013 });
15014 } else {
15015 transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
15016 }
15017 }
15018
15019 return markup;
15020 },
15021
15022 _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) {
15023 if (process.env.NODE_ENV !== 'production' && !doConstruct) {
15024 ReactCurrentOwner.current = this;
15025 try {
15026 return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
15027 } finally {
15028 ReactCurrentOwner.current = null;
15029 }
15030 } else {
15031 return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
15032 }
15033 },
15034
15035 _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) {
15036 var Component = this._currentElement.type;
15037
15038 if (doConstruct) {
15039 if (process.env.NODE_ENV !== 'production') {
15040 return measureLifeCyclePerf(function () {
15041 return new Component(publicProps, publicContext, updateQueue);
15042 }, this._debugID, 'ctor');
15043 } else {
15044 return new Component(publicProps, publicContext, updateQueue);
15045 }
15046 }
15047
15048 // This can still be an instance in case of factory components
15049 // but we'll count this as time spent rendering as the more common case.
15050 if (process.env.NODE_ENV !== 'production') {
15051 return measureLifeCyclePerf(function () {
15052 return Component(publicProps, publicContext, updateQueue);
15053 }, this._debugID, 'render');
15054 } else {
15055 return Component(publicProps, publicContext, updateQueue);
15056 }
15057 },
15058
15059 performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
15060 var markup;
15061 var checkpoint = transaction.checkpoint();
15062 try {
15063 markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
15064 } catch (e) {
15065 // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint
15066 transaction.rollback(checkpoint);
15067 this._instance.unstable_handleError(e);
15068 if (this._pendingStateQueue) {
15069 this._instance.state = this._processPendingState(this._instance.props, this._instance.context);
15070 }
15071 checkpoint = transaction.checkpoint();
15072
15073 this._renderedComponent.unmountComponent(true);
15074 transaction.rollback(checkpoint);
15075
15076 // Try again - we've informed the component about the error, so they can render an error message this time.
15077 // If this throws again, the error will bubble up (and can be caught by a higher error boundary).
15078 markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
15079 }
15080 return markup;
15081 },
15082
15083 performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
15084 var inst = this._instance;
15085
15086 var debugID = 0;
15087 if (process.env.NODE_ENV !== 'production') {
15088 debugID = this._debugID;
15089 }
15090
15091 if (inst.componentWillMount) {
15092 if (process.env.NODE_ENV !== 'production') {
15093 measureLifeCyclePerf(function () {
15094 return inst.componentWillMount();
15095 }, debugID, 'componentWillMount');
15096 } else {
15097 inst.componentWillMount();
15098 }
15099 // When mounting, calls to `setState` by `componentWillMount` will set
15100 // `this._pendingStateQueue` without triggering a re-render.
15101 if (this._pendingStateQueue) {
15102 inst.state = this._processPendingState(inst.props, inst.context);
15103 }
15104 }
15105
15106 // If not a stateless component, we now render
15107 if (renderedElement === undefined) {
15108 renderedElement = this._renderValidatedComponent();
15109 }
15110
15111 var nodeType = ReactNodeTypes.getType(renderedElement);
15112 this._renderedNodeType = nodeType;
15113 var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */
15114 );
15115 this._renderedComponent = child;
15116
15117 var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
15118
15119 if (process.env.NODE_ENV !== 'production') {
15120 if (debugID !== 0) {
15121 var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
15122 ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
15123 }
15124 }
15125
15126 return markup;
15127 },
15128
15129 getHostNode: function () {
15130 return ReactReconciler.getHostNode(this._renderedComponent);
15131 },
15132
15133 /**
15134 * Releases any resources allocated by `mountComponent`.
15135 *
15136 * @final
15137 * @internal
15138 */
15139 unmountComponent: function (safely) {
15140 if (!this._renderedComponent) {
15141 return;
15142 }
15143
15144 var inst = this._instance;
15145
15146 if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {
15147 inst._calledComponentWillUnmount = true;
15148
15149 if (safely) {
15150 var name = this.getName() + '.componentWillUnmount()';
15151 ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
15152 } else {
15153 if (process.env.NODE_ENV !== 'production') {
15154 measureLifeCyclePerf(function () {
15155 return inst.componentWillUnmount();
15156 }, this._debugID, 'componentWillUnmount');
15157 } else {
15158 inst.componentWillUnmount();
15159 }
15160 }
15161 }
15162
15163 if (this._renderedComponent) {
15164 ReactReconciler.unmountComponent(this._renderedComponent, safely);
15165 this._renderedNodeType = null;
15166 this._renderedComponent = null;
15167 this._instance = null;
15168 }
15169
15170 // Reset pending fields
15171 // Even if this component is scheduled for another update in ReactUpdates,
15172 // it would still be ignored because these fields are reset.
15173 this._pendingStateQueue = null;
15174 this._pendingReplaceState = false;
15175 this._pendingForceUpdate = false;
15176 this._pendingCallbacks = null;
15177 this._pendingElement = null;
15178
15179 // These fields do not really need to be reset since this object is no
15180 // longer accessible.
15181 this._context = null;
15182 this._rootNodeID = 0;
15183 this._topLevelWrapper = null;
15184
15185 // Delete the reference from the instance to this internal representation
15186 // which allow the internals to be properly cleaned up even if the user
15187 // leaks a reference to the public instance.
15188 ReactInstanceMap.remove(inst);
15189
15190 // Some existing components rely on inst.props even after they've been
15191 // destroyed (in event handlers).
15192 // TODO: inst.props = null;
15193 // TODO: inst.state = null;
15194 // TODO: inst.context = null;
15195 },
15196
15197 /**
15198 * Filters the context object to only contain keys specified in
15199 * `contextTypes`
15200 *
15201 * @param {object} context
15202 * @return {?object}
15203 * @private
15204 */
15205 _maskContext: function (context) {
15206 var Component = this._currentElement.type;
15207 var contextTypes = Component.contextTypes;
15208 if (!contextTypes) {
15209 return emptyObject;
15210 }
15211 var maskedContext = {};
15212 for (var contextName in contextTypes) {
15213 maskedContext[contextName] = context[contextName];
15214 }
15215 return maskedContext;
15216 },
15217
15218 /**
15219 * Filters the context object to only contain keys specified in
15220 * `contextTypes`, and asserts that they are valid.
15221 *
15222 * @param {object} context
15223 * @return {?object}
15224 * @private
15225 */
15226 _processContext: function (context) {
15227 var maskedContext = this._maskContext(context);
15228 if (process.env.NODE_ENV !== 'production') {
15229 var Component = this._currentElement.type;
15230 if (Component.contextTypes) {
15231 this._checkContextTypes(Component.contextTypes, maskedContext, 'context');
15232 }
15233 }
15234 return maskedContext;
15235 },
15236
15237 /**
15238 * @param {object} currentContext
15239 * @return {object}
15240 * @private
15241 */
15242 _processChildContext: function (currentContext) {
15243 var Component = this._currentElement.type;
15244 var inst = this._instance;
15245 var childContext;
15246
15247 if (inst.getChildContext) {
15248 if (process.env.NODE_ENV !== 'production') {
15249 ReactInstrumentation.debugTool.onBeginProcessingChildContext();
15250 try {
15251 childContext = inst.getChildContext();
15252 } finally {
15253 ReactInstrumentation.debugTool.onEndProcessingChildContext();
15254 }
15255 } else {
15256 childContext = inst.getChildContext();
15257 }
15258 }
15259
15260 if (childContext) {
15261 !(typeof Component.childContextTypes === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0;
15262 if (process.env.NODE_ENV !== 'production') {
15263 this._checkContextTypes(Component.childContextTypes, childContext, 'child context');
15264 }
15265 for (var name in childContext) {
15266 !(name in Component.childContextTypes) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0;
15267 }
15268 return _assign({}, currentContext, childContext);
15269 }
15270 return currentContext;
15271 },
15272
15273 /**
15274 * Assert that the context types are valid
15275 *
15276 * @param {object} typeSpecs Map of context field to a ReactPropType
15277 * @param {object} values Runtime values that need to be type-checked
15278 * @param {string} location e.g. "prop", "context", "child context"
15279 * @private
15280 */
15281 _checkContextTypes: function (typeSpecs, values, location) {
15282 if (process.env.NODE_ENV !== 'production') {
15283 checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID);
15284 }
15285 },
15286
15287 receiveComponent: function (nextElement, transaction, nextContext) {
15288 var prevElement = this._currentElement;
15289 var prevContext = this._context;
15290
15291 this._pendingElement = null;
15292
15293 this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);
15294 },
15295
15296 /**
15297 * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate`
15298 * is set, update the component.
15299 *
15300 * @param {ReactReconcileTransaction} transaction
15301 * @internal
15302 */
15303 performUpdateIfNecessary: function (transaction) {
15304 if (this._pendingElement != null) {
15305 ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context);
15306 } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
15307 this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context);
15308 } else {
15309 this._updateBatchNumber = null;
15310 }
15311 },
15312
15313 /**
15314 * Perform an update to a mounted component. The componentWillReceiveProps and
15315 * shouldComponentUpdate methods are called, then (assuming the update isn't
15316 * skipped) the remaining update lifecycle methods are called and the DOM
15317 * representation is updated.
15318 *
15319 * By default, this implements React's rendering and reconciliation algorithm.
15320 * Sophisticated clients may wish to override this.
15321 *
15322 * @param {ReactReconcileTransaction} transaction
15323 * @param {ReactElement} prevParentElement
15324 * @param {ReactElement} nextParentElement
15325 * @internal
15326 * @overridable
15327 */
15328 updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {
15329 var inst = this._instance;
15330 !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', this.getName() || 'ReactCompositeComponent') : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') : void 0;
15331
15332 var willReceive = false;
15333 var nextContext;
15334
15335 // Determine if the context has changed or not
15336 if (this._context === nextUnmaskedContext) {
15337 nextContext = inst.context;
15338 } else {
15339 nextContext = this._processContext(nextUnmaskedContext);
15340 willReceive = true;
15341 }
15342
15343 var prevProps = prevParentElement.props;
15344 var nextProps = nextParentElement.props;
15345
15346 // Not a simple state update but a props update
15347 if (prevParentElement !== nextParentElement) {
15348 willReceive = true;
15349 }
15350
15351 // An update here will schedule an update but immediately set
15352 // _pendingStateQueue which will ensure that any state updates gets
15353 // immediately reconciled instead of waiting for the next batch.
15354 if (willReceive && inst.componentWillReceiveProps) {
15355 if (process.env.NODE_ENV !== 'production') {
15356 measureLifeCyclePerf(function () {
15357 return inst.componentWillReceiveProps(nextProps, nextContext);
15358 }, this._debugID, 'componentWillReceiveProps');
15359 } else {
15360 inst.componentWillReceiveProps(nextProps, nextContext);
15361 }
15362 }
15363
15364 var nextState = this._processPendingState(nextProps, nextContext);
15365 var shouldUpdate = true;
15366
15367 if (!this._pendingForceUpdate) {
15368 if (inst.shouldComponentUpdate) {
15369 if (process.env.NODE_ENV !== 'production') {
15370 shouldUpdate = measureLifeCyclePerf(function () {
15371 return inst.shouldComponentUpdate(nextProps, nextState, nextContext);
15372 }, this._debugID, 'shouldComponentUpdate');
15373 } else {
15374 shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);
15375 }
15376 } else {
15377 if (this._compositeType === CompositeTypes.PureClass) {
15378 shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState);
15379 }
15380 }
15381 }
15382
15383 if (process.env.NODE_ENV !== 'production') {
15384 process.env.NODE_ENV !== 'production' ? warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : void 0;
15385 }
15386
15387 this._updateBatchNumber = null;
15388 if (shouldUpdate) {
15389 this._pendingForceUpdate = false;
15390 // Will set `this.props`, `this.state` and `this.context`.
15391 this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext);
15392 } else {
15393 // If it's determined that a component should not update, we still want
15394 // to set props and state but we shortcut the rest of the update.
15395 this._currentElement = nextParentElement;
15396 this._context = nextUnmaskedContext;
15397 inst.props = nextProps;
15398 inst.state = nextState;
15399 inst.context = nextContext;
15400 }
15401 },
15402
15403 _processPendingState: function (props, context) {
15404 var inst = this._instance;
15405 var queue = this._pendingStateQueue;
15406 var replace = this._pendingReplaceState;
15407 this._pendingReplaceState = false;
15408 this._pendingStateQueue = null;
15409
15410 if (!queue) {
15411 return inst.state;
15412 }
15413
15414 if (replace && queue.length === 1) {
15415 return queue[0];
15416 }
15417
15418 var nextState = _assign({}, replace ? queue[0] : inst.state);
15419 for (var i = replace ? 1 : 0; i < queue.length; i++) {
15420 var partial = queue[i];
15421 _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);
15422 }
15423
15424 return nextState;
15425 },
15426
15427 /**
15428 * Merges new props and state, notifies delegate methods of update and
15429 * performs update.
15430 *
15431 * @param {ReactElement} nextElement Next element
15432 * @param {object} nextProps Next public object to set as properties.
15433 * @param {?object} nextState Next object to set as state.
15434 * @param {?object} nextContext Next public object to set as context.
15435 * @param {ReactReconcileTransaction} transaction
15436 * @param {?object} unmaskedContext
15437 * @private
15438 */
15439 _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
15440 var _this2 = this;
15441
15442 var inst = this._instance;
15443
15444 var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
15445 var prevProps;
15446 var prevState;
15447 var prevContext;
15448 if (hasComponentDidUpdate) {
15449 prevProps = inst.props;
15450 prevState = inst.state;
15451 prevContext = inst.context;
15452 }
15453
15454 if (inst.componentWillUpdate) {
15455 if (process.env.NODE_ENV !== 'production') {
15456 measureLifeCyclePerf(function () {
15457 return inst.componentWillUpdate(nextProps, nextState, nextContext);
15458 }, this._debugID, 'componentWillUpdate');
15459 } else {
15460 inst.componentWillUpdate(nextProps, nextState, nextContext);
15461 }
15462 }
15463
15464 this._currentElement = nextElement;
15465 this._context = unmaskedContext;
15466 inst.props = nextProps;
15467 inst.state = nextState;
15468 inst.context = nextContext;
15469
15470 this._updateRenderedComponent(transaction, unmaskedContext);
15471
15472 if (hasComponentDidUpdate) {
15473 if (process.env.NODE_ENV !== 'production') {
15474 transaction.getReactMountReady().enqueue(function () {
15475 measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate');
15476 });
15477 } else {
15478 transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
15479 }
15480 }
15481 },
15482
15483 /**
15484 * Call the component's `render` method and update the DOM accordingly.
15485 *
15486 * @param {ReactReconcileTransaction} transaction
15487 * @internal
15488 */
15489 _updateRenderedComponent: function (transaction, context) {
15490 var prevComponentInstance = this._renderedComponent;
15491 var prevRenderedElement = prevComponentInstance._currentElement;
15492 var nextRenderedElement = this._renderValidatedComponent();
15493
15494 var debugID = 0;
15495 if (process.env.NODE_ENV !== 'production') {
15496 debugID = this._debugID;
15497 }
15498
15499 if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
15500 ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));
15501 } else {
15502 var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance);
15503 ReactReconciler.unmountComponent(prevComponentInstance, false);
15504
15505 var nodeType = ReactNodeTypes.getType(nextRenderedElement);
15506 this._renderedNodeType = nodeType;
15507 var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */
15508 );
15509 this._renderedComponent = child;
15510
15511 var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);
15512
15513 if (process.env.NODE_ENV !== 'production') {
15514 if (debugID !== 0) {
15515 var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
15516 ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
15517 }
15518 }
15519
15520 this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance);
15521 }
15522 },
15523
15524 /**
15525 * Overridden in shallow rendering.
15526 *
15527 * @protected
15528 */
15529 _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) {
15530 ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance);
15531 },
15532
15533 /**
15534 * @protected
15535 */
15536 _renderValidatedComponentWithoutOwnerOrContext: function () {
15537 var inst = this._instance;
15538 var renderedElement;
15539
15540 if (process.env.NODE_ENV !== 'production') {
15541 renderedElement = measureLifeCyclePerf(function () {
15542 return inst.render();
15543 }, this._debugID, 'render');
15544 } else {
15545 renderedElement = inst.render();
15546 }
15547
15548 if (process.env.NODE_ENV !== 'production') {
15549 // We allow auto-mocks to proceed as if they're returning null.
15550 if (renderedElement === undefined && inst.render._isMockFunction) {
15551 // This is probably bad practice. Consider warning here and
15552 // deprecating this convenience.
15553 renderedElement = null;
15554 }
15555 }
15556
15557 return renderedElement;
15558 },
15559
15560 /**
15561 * @private
15562 */
15563 _renderValidatedComponent: function () {
15564 var renderedElement;
15565 if (process.env.NODE_ENV !== 'production' || this._compositeType !== CompositeTypes.StatelessFunctional) {
15566 ReactCurrentOwner.current = this;
15567 try {
15568 renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
15569 } finally {
15570 ReactCurrentOwner.current = null;
15571 }
15572 } else {
15573 renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
15574 }
15575 !(
15576 // TODO: An `isValidNode` function would probably be more appropriate
15577 renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') : void 0;
15578
15579 return renderedElement;
15580 },
15581
15582 /**
15583 * Lazily allocates the refs object and stores `component` as `ref`.
15584 *
15585 * @param {string} ref Reference name.
15586 * @param {component} component Component to store as `ref`.
15587 * @final
15588 * @private
15589 */
15590 attachRef: function (ref, component) {
15591 var inst = this.getPublicInstance();
15592 !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0;
15593 var publicComponentInstance = component.getPublicInstance();
15594 if (process.env.NODE_ENV !== 'production') {
15595 var componentName = component && component.getName ? component.getName() : 'a component';
15596 process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0;
15597 }
15598 var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
15599 refs[ref] = publicComponentInstance;
15600 },
15601
15602 /**
15603 * Detaches a reference name.
15604 *
15605 * @param {string} ref Name to dereference.
15606 * @final
15607 * @private
15608 */
15609 detachRef: function (ref) {
15610 var refs = this.getPublicInstance().refs;
15611 delete refs[ref];
15612 },
15613
15614 /**
15615 * Get a text description of the component that can be used to identify it
15616 * in error messages.
15617 * @return {string} The name or null.
15618 * @internal
15619 */
15620 getName: function () {
15621 var type = this._currentElement.type;
15622 var constructor = this._instance && this._instance.constructor;
15623 return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null;
15624 },
15625
15626 /**
15627 * Get the publicly accessible representation of this component - i.e. what
15628 * is exposed by refs and returned by render. Can be null for stateless
15629 * components.
15630 *
15631 * @return {ReactComponent} the public component instance.
15632 * @internal
15633 */
15634 getPublicInstance: function () {
15635 var inst = this._instance;
15636 if (this._compositeType === CompositeTypes.StatelessFunctional) {
15637 return null;
15638 }
15639 return inst;
15640 },
15641
15642 // Stub
15643 _instantiateReactComponent: null
15644};
15645
15646module.exports = ReactCompositeComponent;
15647
15648/***/ }),
15649/* 134 */
15650/***/ (function(module, exports, __webpack_require__) {
15651
15652"use strict";
15653/**
15654 * Copyright (c) 2013-present, Facebook, Inc.
15655 *
15656 * This source code is licensed under the MIT license found in the
15657 * LICENSE file in the root directory of this source tree.
15658 *
15659 */
15660
15661/* global hasOwnProperty:true */
15662
15663
15664
15665var _prodInvariant = __webpack_require__(2),
15666 _assign = __webpack_require__(3);
15667
15668var AutoFocusUtils = __webpack_require__(122);
15669var CSSPropertyOperations = __webpack_require__(124);
15670var DOMLazyTree = __webpack_require__(15);
15671var DOMNamespaces = __webpack_require__(29);
15672var DOMProperty = __webpack_require__(16);
15673var DOMPropertyOperations = __webpack_require__(55);
15674var EventPluginHub = __webpack_require__(17);
15675var EventPluginRegistry = __webpack_require__(30);
15676var ReactBrowserEventEmitter = __webpack_require__(34);
15677var ReactDOMComponentFlags = __webpack_require__(56);
15678var ReactDOMComponentTree = __webpack_require__(4);
15679var ReactDOMInput = __webpack_require__(138);
15680var ReactDOMOption = __webpack_require__(139);
15681var ReactDOMSelect = __webpack_require__(57);
15682var ReactDOMTextarea = __webpack_require__(143);
15683var ReactInstrumentation = __webpack_require__(6);
15684var ReactMultiChild = __webpack_require__(155);
15685var ReactServerRenderingTransaction = __webpack_require__(63);
15686
15687var emptyFunction = __webpack_require__(7);
15688var escapeTextContentForBrowser = __webpack_require__(25);
15689var invariant = __webpack_require__(0);
15690var isEventSupported = __webpack_require__(42);
15691var shallowEqual = __webpack_require__(27);
15692var inputValueTracking = __webpack_require__(69);
15693var validateDOMNesting = __webpack_require__(44);
15694var warning = __webpack_require__(1);
15695
15696var Flags = ReactDOMComponentFlags;
15697var deleteListener = EventPluginHub.deleteListener;
15698var getNode = ReactDOMComponentTree.getNodeFromInstance;
15699var listenTo = ReactBrowserEventEmitter.listenTo;
15700var registrationNameModules = EventPluginRegistry.registrationNameModules;
15701
15702// For quickly matching children type, to test if can be treated as content.
15703var CONTENT_TYPES = { string: true, number: true };
15704
15705var STYLE = 'style';
15706var HTML = '__html';
15707var RESERVED_PROPS = {
15708 children: null,
15709 dangerouslySetInnerHTML: null,
15710 suppressContentEditableWarning: null
15711};
15712
15713// Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE).
15714var DOC_FRAGMENT_TYPE = 11;
15715
15716function getDeclarationErrorAddendum(internalInstance) {
15717 if (internalInstance) {
15718 var owner = internalInstance._currentElement._owner || null;
15719 if (owner) {
15720 var name = owner.getName();
15721 if (name) {
15722 return ' This DOM node was rendered by `' + name + '`.';
15723 }
15724 }
15725 }
15726 return '';
15727}
15728
15729function friendlyStringify(obj) {
15730 if (typeof obj === 'object') {
15731 if (Array.isArray(obj)) {
15732 return '[' + obj.map(friendlyStringify).join(', ') + ']';
15733 } else {
15734 var pairs = [];
15735 for (var key in obj) {
15736 if (Object.prototype.hasOwnProperty.call(obj, key)) {
15737 var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key);
15738 pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key]));
15739 }
15740 }
15741 return '{' + pairs.join(', ') + '}';
15742 }
15743 } else if (typeof obj === 'string') {
15744 return JSON.stringify(obj);
15745 } else if (typeof obj === 'function') {
15746 return '[function object]';
15747 }
15748 // Differs from JSON.stringify in that undefined because undefined and that
15749 // inf and nan don't become null
15750 return String(obj);
15751}
15752
15753var styleMutationWarning = {};
15754
15755function checkAndWarnForMutatedStyle(style1, style2, component) {
15756 if (style1 == null || style2 == null) {
15757 return;
15758 }
15759 if (shallowEqual(style1, style2)) {
15760 return;
15761 }
15762
15763 var componentName = component._tag;
15764 var owner = component._currentElement._owner;
15765 var ownerName;
15766 if (owner) {
15767 ownerName = owner.getName();
15768 }
15769
15770 var hash = ownerName + '|' + componentName;
15771
15772 if (styleMutationWarning.hasOwnProperty(hash)) {
15773 return;
15774 }
15775
15776 styleMutationWarning[hash] = true;
15777
15778 process.env.NODE_ENV !== 'production' ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0;
15779}
15780
15781/**
15782 * @param {object} component
15783 * @param {?object} props
15784 */
15785function assertValidProps(component, props) {
15786 if (!props) {
15787 return;
15788 }
15789 // Note the use of `==` which checks for null or undefined.
15790 if (voidElementTags[component._tag]) {
15791 !(props.children == null && props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : _prodInvariant('137', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : void 0;
15792 }
15793 if (props.dangerouslySetInnerHTML != null) {
15794 !(props.children == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0;
15795 !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : _prodInvariant('61') : void 0;
15796 }
15797 if (process.env.NODE_ENV !== 'production') {
15798 process.env.NODE_ENV !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0;
15799 process.env.NODE_ENV !== 'production' ? 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.') : void 0;
15800 process.env.NODE_ENV !== 'production' ? warning(props.onFocusIn == null && props.onFocusOut == null, '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.') : void 0;
15801 }
15802 !(props.style == null || typeof props.style === 'object') ? process.env.NODE_ENV !== 'production' ? 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(component)) : _prodInvariant('62', getDeclarationErrorAddendum(component)) : void 0;
15803}
15804
15805function enqueuePutListener(inst, registrationName, listener, transaction) {
15806 if (transaction instanceof ReactServerRenderingTransaction) {
15807 return;
15808 }
15809 if (process.env.NODE_ENV !== 'production') {
15810 // IE8 has no API for event capturing and the `onScroll` event doesn't
15811 // bubble.
15812 process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), "This browser doesn't support the `onScroll` event") : void 0;
15813 }
15814 var containerInfo = inst._hostContainerInfo;
15815 var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE;
15816 var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument;
15817 listenTo(registrationName, doc);
15818 transaction.getReactMountReady().enqueue(putListener, {
15819 inst: inst,
15820 registrationName: registrationName,
15821 listener: listener
15822 });
15823}
15824
15825function putListener() {
15826 var listenerToPut = this;
15827 EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener);
15828}
15829
15830function inputPostMount() {
15831 var inst = this;
15832 ReactDOMInput.postMountWrapper(inst);
15833}
15834
15835function textareaPostMount() {
15836 var inst = this;
15837 ReactDOMTextarea.postMountWrapper(inst);
15838}
15839
15840function optionPostMount() {
15841 var inst = this;
15842 ReactDOMOption.postMountWrapper(inst);
15843}
15844
15845var setAndValidateContentChildDev = emptyFunction;
15846if (process.env.NODE_ENV !== 'production') {
15847 setAndValidateContentChildDev = function (content) {
15848 var hasExistingContent = this._contentDebugID != null;
15849 var debugID = this._debugID;
15850 // This ID represents the inlined child that has no backing instance:
15851 var contentDebugID = -debugID;
15852
15853 if (content == null) {
15854 if (hasExistingContent) {
15855 ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID);
15856 }
15857 this._contentDebugID = null;
15858 return;
15859 }
15860
15861 validateDOMNesting(null, String(content), this, this._ancestorInfo);
15862 this._contentDebugID = contentDebugID;
15863 if (hasExistingContent) {
15864 ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);
15865 ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID);
15866 } else {
15867 ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID);
15868 ReactInstrumentation.debugTool.onMountComponent(contentDebugID);
15869 ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]);
15870 }
15871 };
15872}
15873
15874// There are so many media events, it makes sense to just
15875// maintain a list rather than create a `trapBubbledEvent` for each
15876var mediaEvents = {
15877 topAbort: 'abort',
15878 topCanPlay: 'canplay',
15879 topCanPlayThrough: 'canplaythrough',
15880 topDurationChange: 'durationchange',
15881 topEmptied: 'emptied',
15882 topEncrypted: 'encrypted',
15883 topEnded: 'ended',
15884 topError: 'error',
15885 topLoadedData: 'loadeddata',
15886 topLoadedMetadata: 'loadedmetadata',
15887 topLoadStart: 'loadstart',
15888 topPause: 'pause',
15889 topPlay: 'play',
15890 topPlaying: 'playing',
15891 topProgress: 'progress',
15892 topRateChange: 'ratechange',
15893 topSeeked: 'seeked',
15894 topSeeking: 'seeking',
15895 topStalled: 'stalled',
15896 topSuspend: 'suspend',
15897 topTimeUpdate: 'timeupdate',
15898 topVolumeChange: 'volumechange',
15899 topWaiting: 'waiting'
15900};
15901
15902function trackInputValue() {
15903 inputValueTracking.track(this);
15904}
15905
15906function trapBubbledEventsLocal() {
15907 var inst = this;
15908 // If a component renders to null or if another component fatals and causes
15909 // the state of the tree to be corrupted, `node` here can be null.
15910 !inst._rootNodeID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0;
15911 var node = getNode(inst);
15912 !node ? process.env.NODE_ENV !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0;
15913
15914 switch (inst._tag) {
15915 case 'iframe':
15916 case 'object':
15917 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];
15918 break;
15919 case 'video':
15920 case 'audio':
15921 inst._wrapperState.listeners = [];
15922 // Create listener for each media event
15923 for (var event in mediaEvents) {
15924 if (mediaEvents.hasOwnProperty(event)) {
15925 inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node));
15926 }
15927 }
15928 break;
15929 case 'source':
15930 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)];
15931 break;
15932 case 'img':
15933 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];
15934 break;
15935 case 'form':
15936 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)];
15937 break;
15938 case 'input':
15939 case 'select':
15940 case 'textarea':
15941 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)];
15942 break;
15943 }
15944}
15945
15946function postUpdateSelectWrapper() {
15947 ReactDOMSelect.postUpdateWrapper(this);
15948}
15949
15950// For HTML, certain tags should omit their close tag. We keep a whitelist for
15951// those special-case tags.
15952
15953var omittedCloseTags = {
15954 area: true,
15955 base: true,
15956 br: true,
15957 col: true,
15958 embed: true,
15959 hr: true,
15960 img: true,
15961 input: true,
15962 keygen: true,
15963 link: true,
15964 meta: true,
15965 param: true,
15966 source: true,
15967 track: true,
15968 wbr: true
15969 // NOTE: menuitem's close tag should be omitted, but that causes problems.
15970};
15971
15972var newlineEatingTags = {
15973 listing: true,
15974 pre: true,
15975 textarea: true
15976};
15977
15978// For HTML, certain tags cannot have children. This has the same purpose as
15979// `omittedCloseTags` except that `menuitem` should still have its closing tag.
15980
15981var voidElementTags = _assign({
15982 menuitem: true
15983}, omittedCloseTags);
15984
15985// We accept any tag to be rendered but since this gets injected into arbitrary
15986// HTML, we want to make sure that it's a safe tag.
15987// http://www.w3.org/TR/REC-xml/#NT-Name
15988
15989var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
15990var validatedTagCache = {};
15991var hasOwnProperty = {}.hasOwnProperty;
15992
15993function validateDangerousTag(tag) {
15994 if (!hasOwnProperty.call(validatedTagCache, tag)) {
15995 !VALID_TAG_REGEX.test(tag) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0;
15996 validatedTagCache[tag] = true;
15997 }
15998}
15999
16000function isCustomComponent(tagName, props) {
16001 return tagName.indexOf('-') >= 0 || props.is != null;
16002}
16003
16004var globalIdCounter = 1;
16005
16006/**
16007 * Creates a new React class that is idempotent and capable of containing other
16008 * React components. It accepts event listeners and DOM properties that are
16009 * valid according to `DOMProperty`.
16010 *
16011 * - Event listeners: `onClick`, `onMouseDown`, etc.
16012 * - DOM properties: `className`, `name`, `title`, etc.
16013 *
16014 * The `style` property functions differently from the DOM API. It accepts an
16015 * object mapping of style properties to values.
16016 *
16017 * @constructor ReactDOMComponent
16018 * @extends ReactMultiChild
16019 */
16020function ReactDOMComponent(element) {
16021 var tag = element.type;
16022 validateDangerousTag(tag);
16023 this._currentElement = element;
16024 this._tag = tag.toLowerCase();
16025 this._namespaceURI = null;
16026 this._renderedChildren = null;
16027 this._previousStyle = null;
16028 this._previousStyleCopy = null;
16029 this._hostNode = null;
16030 this._hostParent = null;
16031 this._rootNodeID = 0;
16032 this._domID = 0;
16033 this._hostContainerInfo = null;
16034 this._wrapperState = null;
16035 this._topLevelWrapper = null;
16036 this._flags = 0;
16037 if (process.env.NODE_ENV !== 'production') {
16038 this._ancestorInfo = null;
16039 setAndValidateContentChildDev.call(this, null);
16040 }
16041}
16042
16043ReactDOMComponent.displayName = 'ReactDOMComponent';
16044
16045ReactDOMComponent.Mixin = {
16046 /**
16047 * Generates root tag markup then recurses. This method has side effects and
16048 * is not idempotent.
16049 *
16050 * @internal
16051 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
16052 * @param {?ReactDOMComponent} the parent component instance
16053 * @param {?object} info about the host container
16054 * @param {object} context
16055 * @return {string} The computed markup.
16056 */
16057 mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
16058 this._rootNodeID = globalIdCounter++;
16059 this._domID = hostContainerInfo._idCounter++;
16060 this._hostParent = hostParent;
16061 this._hostContainerInfo = hostContainerInfo;
16062
16063 var props = this._currentElement.props;
16064
16065 switch (this._tag) {
16066 case 'audio':
16067 case 'form':
16068 case 'iframe':
16069 case 'img':
16070 case 'link':
16071 case 'object':
16072 case 'source':
16073 case 'video':
16074 this._wrapperState = {
16075 listeners: null
16076 };
16077 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
16078 break;
16079 case 'input':
16080 ReactDOMInput.mountWrapper(this, props, hostParent);
16081 props = ReactDOMInput.getHostProps(this, props);
16082 transaction.getReactMountReady().enqueue(trackInputValue, this);
16083 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
16084 break;
16085 case 'option':
16086 ReactDOMOption.mountWrapper(this, props, hostParent);
16087 props = ReactDOMOption.getHostProps(this, props);
16088 break;
16089 case 'select':
16090 ReactDOMSelect.mountWrapper(this, props, hostParent);
16091 props = ReactDOMSelect.getHostProps(this, props);
16092 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
16093 break;
16094 case 'textarea':
16095 ReactDOMTextarea.mountWrapper(this, props, hostParent);
16096 props = ReactDOMTextarea.getHostProps(this, props);
16097 transaction.getReactMountReady().enqueue(trackInputValue, this);
16098 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
16099 break;
16100 }
16101
16102 assertValidProps(this, props);
16103
16104 // We create tags in the namespace of their parent container, except HTML
16105 // tags get no namespace.
16106 var namespaceURI;
16107 var parentTag;
16108 if (hostParent != null) {
16109 namespaceURI = hostParent._namespaceURI;
16110 parentTag = hostParent._tag;
16111 } else if (hostContainerInfo._tag) {
16112 namespaceURI = hostContainerInfo._namespaceURI;
16113 parentTag = hostContainerInfo._tag;
16114 }
16115 if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') {
16116 namespaceURI = DOMNamespaces.html;
16117 }
16118 if (namespaceURI === DOMNamespaces.html) {
16119 if (this._tag === 'svg') {
16120 namespaceURI = DOMNamespaces.svg;
16121 } else if (this._tag === 'math') {
16122 namespaceURI = DOMNamespaces.mathml;
16123 }
16124 }
16125 this._namespaceURI = namespaceURI;
16126
16127 if (process.env.NODE_ENV !== 'production') {
16128 var parentInfo;
16129 if (hostParent != null) {
16130 parentInfo = hostParent._ancestorInfo;
16131 } else if (hostContainerInfo._tag) {
16132 parentInfo = hostContainerInfo._ancestorInfo;
16133 }
16134 if (parentInfo) {
16135 // parentInfo should always be present except for the top-level
16136 // component when server rendering
16137 validateDOMNesting(this._tag, null, this, parentInfo);
16138 }
16139 this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);
16140 }
16141
16142 var mountImage;
16143 if (transaction.useCreateElement) {
16144 var ownerDocument = hostContainerInfo._ownerDocument;
16145 var el;
16146 if (namespaceURI === DOMNamespaces.html) {
16147 if (this._tag === 'script') {
16148 // Create the script via .innerHTML so its "parser-inserted" flag is
16149 // set to true and it does not execute
16150 var div = ownerDocument.createElement('div');
16151 var type = this._currentElement.type;
16152 div.innerHTML = '<' + type + '></' + type + '>';
16153 el = div.removeChild(div.firstChild);
16154 } else if (props.is) {
16155 el = ownerDocument.createElement(this._currentElement.type, props.is);
16156 } else {
16157 // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug.
16158 // See discussion in https://github.com/facebook/react/pull/6896
16159 // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
16160 el = ownerDocument.createElement(this._currentElement.type);
16161 }
16162 } else {
16163 el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type);
16164 }
16165 ReactDOMComponentTree.precacheNode(this, el);
16166 this._flags |= Flags.hasCachedChildNodes;
16167 if (!this._hostParent) {
16168 DOMPropertyOperations.setAttributeForRoot(el);
16169 }
16170 this._updateDOMProperties(null, props, transaction);
16171 var lazyTree = DOMLazyTree(el);
16172 this._createInitialChildren(transaction, props, context, lazyTree);
16173 mountImage = lazyTree;
16174 } else {
16175 var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);
16176 var tagContent = this._createContentMarkup(transaction, props, context);
16177 if (!tagContent && omittedCloseTags[this._tag]) {
16178 mountImage = tagOpen + '/>';
16179 } else {
16180 mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';
16181 }
16182 }
16183
16184 switch (this._tag) {
16185 case 'input':
16186 transaction.getReactMountReady().enqueue(inputPostMount, this);
16187 if (props.autoFocus) {
16188 transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
16189 }
16190 break;
16191 case 'textarea':
16192 transaction.getReactMountReady().enqueue(textareaPostMount, this);
16193 if (props.autoFocus) {
16194 transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
16195 }
16196 break;
16197 case 'select':
16198 if (props.autoFocus) {
16199 transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
16200 }
16201 break;
16202 case 'button':
16203 if (props.autoFocus) {
16204 transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
16205 }
16206 break;
16207 case 'option':
16208 transaction.getReactMountReady().enqueue(optionPostMount, this);
16209 break;
16210 }
16211
16212 return mountImage;
16213 },
16214
16215 /**
16216 * Creates markup for the open tag and all attributes.
16217 *
16218 * This method has side effects because events get registered.
16219 *
16220 * Iterating over object properties is faster than iterating over arrays.
16221 * @see http://jsperf.com/obj-vs-arr-iteration
16222 *
16223 * @private
16224 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
16225 * @param {object} props
16226 * @return {string} Markup of opening tag.
16227 */
16228 _createOpenTagMarkupAndPutListeners: function (transaction, props) {
16229 var ret = '<' + this._currentElement.type;
16230
16231 for (var propKey in props) {
16232 if (!props.hasOwnProperty(propKey)) {
16233 continue;
16234 }
16235 var propValue = props[propKey];
16236 if (propValue == null) {
16237 continue;
16238 }
16239 if (registrationNameModules.hasOwnProperty(propKey)) {
16240 if (propValue) {
16241 enqueuePutListener(this, propKey, propValue, transaction);
16242 }
16243 } else {
16244 if (propKey === STYLE) {
16245 if (propValue) {
16246 if (process.env.NODE_ENV !== 'production') {
16247 // See `_updateDOMProperties`. style block
16248 this._previousStyle = propValue;
16249 }
16250 propValue = this._previousStyleCopy = _assign({}, props.style);
16251 }
16252 propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this);
16253 }
16254 var markup = null;
16255 if (this._tag != null && isCustomComponent(this._tag, props)) {
16256 if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
16257 markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue);
16258 }
16259 } else {
16260 markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue);
16261 }
16262 if (markup) {
16263 ret += ' ' + markup;
16264 }
16265 }
16266 }
16267
16268 // For static pages, no need to put React ID and checksum. Saves lots of
16269 // bytes.
16270 if (transaction.renderToStaticMarkup) {
16271 return ret;
16272 }
16273
16274 if (!this._hostParent) {
16275 ret += ' ' + DOMPropertyOperations.createMarkupForRoot();
16276 }
16277 ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID);
16278 return ret;
16279 },
16280
16281 /**
16282 * Creates markup for the content between the tags.
16283 *
16284 * @private
16285 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
16286 * @param {object} props
16287 * @param {object} context
16288 * @return {string} Content markup.
16289 */
16290 _createContentMarkup: function (transaction, props, context) {
16291 var ret = '';
16292
16293 // Intentional use of != to avoid catching zero/false.
16294 var innerHTML = props.dangerouslySetInnerHTML;
16295 if (innerHTML != null) {
16296 if (innerHTML.__html != null) {
16297 ret = innerHTML.__html;
16298 }
16299 } else {
16300 var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
16301 var childrenToUse = contentToUse != null ? null : props.children;
16302 if (contentToUse != null) {
16303 // TODO: Validate that text is allowed as a child of this node
16304 ret = escapeTextContentForBrowser(contentToUse);
16305 if (process.env.NODE_ENV !== 'production') {
16306 setAndValidateContentChildDev.call(this, contentToUse);
16307 }
16308 } else if (childrenToUse != null) {
16309 var mountImages = this.mountChildren(childrenToUse, transaction, context);
16310 ret = mountImages.join('');
16311 }
16312 }
16313 if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') {
16314 // text/html ignores the first character in these tags if it's a newline
16315 // Prefer to break application/xml over text/html (for now) by adding
16316 // a newline specifically to get eaten by the parser. (Alternately for
16317 // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first
16318 // \r is normalized out by HTMLTextAreaElement#value.)
16319 // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>
16320 // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>
16321 // See: <http://www.w3.org/TR/html5/syntax.html#newlines>
16322 // See: Parsing of "textarea" "listing" and "pre" elements
16323 // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>
16324 return '\n' + ret;
16325 } else {
16326 return ret;
16327 }
16328 },
16329
16330 _createInitialChildren: function (transaction, props, context, lazyTree) {
16331 // Intentional use of != to avoid catching zero/false.
16332 var innerHTML = props.dangerouslySetInnerHTML;
16333 if (innerHTML != null) {
16334 if (innerHTML.__html != null) {
16335 DOMLazyTree.queueHTML(lazyTree, innerHTML.__html);
16336 }
16337 } else {
16338 var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
16339 var childrenToUse = contentToUse != null ? null : props.children;
16340 // TODO: Validate that text is allowed as a child of this node
16341 if (contentToUse != null) {
16342 // Avoid setting textContent when the text is empty. In IE11 setting
16343 // textContent on a text area will cause the placeholder to not
16344 // show within the textarea until it has been focused and blurred again.
16345 // https://github.com/facebook/react/issues/6731#issuecomment-254874553
16346 if (contentToUse !== '') {
16347 if (process.env.NODE_ENV !== 'production') {
16348 setAndValidateContentChildDev.call(this, contentToUse);
16349 }
16350 DOMLazyTree.queueText(lazyTree, contentToUse);
16351 }
16352 } else if (childrenToUse != null) {
16353 var mountImages = this.mountChildren(childrenToUse, transaction, context);
16354 for (var i = 0; i < mountImages.length; i++) {
16355 DOMLazyTree.queueChild(lazyTree, mountImages[i]);
16356 }
16357 }
16358 }
16359 },
16360
16361 /**
16362 * Receives a next element and updates the component.
16363 *
16364 * @internal
16365 * @param {ReactElement} nextElement
16366 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
16367 * @param {object} context
16368 */
16369 receiveComponent: function (nextElement, transaction, context) {
16370 var prevElement = this._currentElement;
16371 this._currentElement = nextElement;
16372 this.updateComponent(transaction, prevElement, nextElement, context);
16373 },
16374
16375 /**
16376 * Updates a DOM component after it has already been allocated and
16377 * attached to the DOM. Reconciles the root DOM node, then recurses.
16378 *
16379 * @param {ReactReconcileTransaction} transaction
16380 * @param {ReactElement} prevElement
16381 * @param {ReactElement} nextElement
16382 * @internal
16383 * @overridable
16384 */
16385 updateComponent: function (transaction, prevElement, nextElement, context) {
16386 var lastProps = prevElement.props;
16387 var nextProps = this._currentElement.props;
16388
16389 switch (this._tag) {
16390 case 'input':
16391 lastProps = ReactDOMInput.getHostProps(this, lastProps);
16392 nextProps = ReactDOMInput.getHostProps(this, nextProps);
16393 break;
16394 case 'option':
16395 lastProps = ReactDOMOption.getHostProps(this, lastProps);
16396 nextProps = ReactDOMOption.getHostProps(this, nextProps);
16397 break;
16398 case 'select':
16399 lastProps = ReactDOMSelect.getHostProps(this, lastProps);
16400 nextProps = ReactDOMSelect.getHostProps(this, nextProps);
16401 break;
16402 case 'textarea':
16403 lastProps = ReactDOMTextarea.getHostProps(this, lastProps);
16404 nextProps = ReactDOMTextarea.getHostProps(this, nextProps);
16405 break;
16406 }
16407
16408 assertValidProps(this, nextProps);
16409 this._updateDOMProperties(lastProps, nextProps, transaction);
16410 this._updateDOMChildren(lastProps, nextProps, transaction, context);
16411
16412 switch (this._tag) {
16413 case 'input':
16414 // Update the wrapper around inputs *after* updating props. This has to
16415 // happen after `_updateDOMProperties`. Otherwise HTML5 input validations
16416 // raise warnings and prevent the new value from being assigned.
16417 ReactDOMInput.updateWrapper(this);
16418
16419 // We also check that we haven't missed a value update, such as a
16420 // Radio group shifting the checked value to another named radio input.
16421 inputValueTracking.updateValueIfChanged(this);
16422 break;
16423 case 'textarea':
16424 ReactDOMTextarea.updateWrapper(this);
16425 break;
16426 case 'select':
16427 // <select> value update needs to occur after <option> children
16428 // reconciliation
16429 transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
16430 break;
16431 }
16432 },
16433
16434 /**
16435 * Reconciles the properties by detecting differences in property values and
16436 * updating the DOM as necessary. This function is probably the single most
16437 * critical path for performance optimization.
16438 *
16439 * TODO: Benchmark whether checking for changed values in memory actually
16440 * improves performance (especially statically positioned elements).
16441 * TODO: Benchmark the effects of putting this at the top since 99% of props
16442 * do not change for a given reconciliation.
16443 * TODO: Benchmark areas that can be improved with caching.
16444 *
16445 * @private
16446 * @param {object} lastProps
16447 * @param {object} nextProps
16448 * @param {?DOMElement} node
16449 */
16450 _updateDOMProperties: function (lastProps, nextProps, transaction) {
16451 var propKey;
16452 var styleName;
16453 var styleUpdates;
16454 for (propKey in lastProps) {
16455 if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
16456 continue;
16457 }
16458 if (propKey === STYLE) {
16459 var lastStyle = this._previousStyleCopy;
16460 for (styleName in lastStyle) {
16461 if (lastStyle.hasOwnProperty(styleName)) {
16462 styleUpdates = styleUpdates || {};
16463 styleUpdates[styleName] = '';
16464 }
16465 }
16466 this._previousStyleCopy = null;
16467 } else if (registrationNameModules.hasOwnProperty(propKey)) {
16468 if (lastProps[propKey]) {
16469 // Only call deleteListener if there was a listener previously or
16470 // else willDeleteListener gets called when there wasn't actually a
16471 // listener (e.g., onClick={null})
16472 deleteListener(this, propKey);
16473 }
16474 } else if (isCustomComponent(this._tag, lastProps)) {
16475 if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
16476 DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey);
16477 }
16478 } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
16479 DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey);
16480 }
16481 }
16482 for (propKey in nextProps) {
16483 var nextProp = nextProps[propKey];
16484 var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined;
16485 if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
16486 continue;
16487 }
16488 if (propKey === STYLE) {
16489 if (nextProp) {
16490 if (process.env.NODE_ENV !== 'production') {
16491 checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this);
16492 this._previousStyle = nextProp;
16493 }
16494 nextProp = this._previousStyleCopy = _assign({}, nextProp);
16495 } else {
16496 this._previousStyleCopy = null;
16497 }
16498 if (lastProp) {
16499 // Unset styles on `lastProp` but not on `nextProp`.
16500 for (styleName in lastProp) {
16501 if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
16502 styleUpdates = styleUpdates || {};
16503 styleUpdates[styleName] = '';
16504 }
16505 }
16506 // Update styles that changed since `lastProp`.
16507 for (styleName in nextProp) {
16508 if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
16509 styleUpdates = styleUpdates || {};
16510 styleUpdates[styleName] = nextProp[styleName];
16511 }
16512 }
16513 } else {
16514 // Relies on `updateStylesByID` not mutating `styleUpdates`.
16515 styleUpdates = nextProp;
16516 }
16517 } else if (registrationNameModules.hasOwnProperty(propKey)) {
16518 if (nextProp) {
16519 enqueuePutListener(this, propKey, nextProp, transaction);
16520 } else if (lastProp) {
16521 deleteListener(this, propKey);
16522 }
16523 } else if (isCustomComponent(this._tag, nextProps)) {
16524 if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
16525 DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp);
16526 }
16527 } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
16528 var node = getNode(this);
16529 // If we're updating to null or undefined, we should remove the property
16530 // from the DOM node instead of inadvertently setting to a string. This
16531 // brings us in line with the same behavior we have on initial render.
16532 if (nextProp != null) {
16533 DOMPropertyOperations.setValueForProperty(node, propKey, nextProp);
16534 } else {
16535 DOMPropertyOperations.deleteValueForProperty(node, propKey);
16536 }
16537 }
16538 }
16539 if (styleUpdates) {
16540 CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this);
16541 }
16542 },
16543
16544 /**
16545 * Reconciles the children with the various properties that affect the
16546 * children content.
16547 *
16548 * @param {object} lastProps
16549 * @param {object} nextProps
16550 * @param {ReactReconcileTransaction} transaction
16551 * @param {object} context
16552 */
16553 _updateDOMChildren: function (lastProps, nextProps, transaction, context) {
16554 var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;
16555 var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;
16556
16557 var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html;
16558 var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html;
16559
16560 // Note the use of `!=` which checks for null or undefined.
16561 var lastChildren = lastContent != null ? null : lastProps.children;
16562 var nextChildren = nextContent != null ? null : nextProps.children;
16563
16564 // If we're switching from children to content/html or vice versa, remove
16565 // the old content
16566 var lastHasContentOrHtml = lastContent != null || lastHtml != null;
16567 var nextHasContentOrHtml = nextContent != null || nextHtml != null;
16568 if (lastChildren != null && nextChildren == null) {
16569 this.updateChildren(null, transaction, context);
16570 } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {
16571 this.updateTextContent('');
16572 if (process.env.NODE_ENV !== 'production') {
16573 ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
16574 }
16575 }
16576
16577 if (nextContent != null) {
16578 if (lastContent !== nextContent) {
16579 this.updateTextContent('' + nextContent);
16580 if (process.env.NODE_ENV !== 'production') {
16581 setAndValidateContentChildDev.call(this, nextContent);
16582 }
16583 }
16584 } else if (nextHtml != null) {
16585 if (lastHtml !== nextHtml) {
16586 this.updateMarkup('' + nextHtml);
16587 }
16588 if (process.env.NODE_ENV !== 'production') {
16589 ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
16590 }
16591 } else if (nextChildren != null) {
16592 if (process.env.NODE_ENV !== 'production') {
16593 setAndValidateContentChildDev.call(this, null);
16594 }
16595
16596 this.updateChildren(nextChildren, transaction, context);
16597 }
16598 },
16599
16600 getHostNode: function () {
16601 return getNode(this);
16602 },
16603
16604 /**
16605 * Destroys all event registrations for this instance. Does not remove from
16606 * the DOM. That must be done by the parent.
16607 *
16608 * @internal
16609 */
16610 unmountComponent: function (safely) {
16611 switch (this._tag) {
16612 case 'audio':
16613 case 'form':
16614 case 'iframe':
16615 case 'img':
16616 case 'link':
16617 case 'object':
16618 case 'source':
16619 case 'video':
16620 var listeners = this._wrapperState.listeners;
16621 if (listeners) {
16622 for (var i = 0; i < listeners.length; i++) {
16623 listeners[i].remove();
16624 }
16625 }
16626 break;
16627 case 'input':
16628 case 'textarea':
16629 inputValueTracking.stopTracking(this);
16630 break;
16631 case 'html':
16632 case 'head':
16633 case 'body':
16634 /**
16635 * Components like <html> <head> and <body> can't be removed or added
16636 * easily in a cross-browser way, however it's valuable to be able to
16637 * take advantage of React's reconciliation for styling and <title>
16638 * management. So we just document it and throw in dangerous cases.
16639 */
16640 true ? process.env.NODE_ENV !== 'production' ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', this._tag) : _prodInvariant('66', this._tag) : void 0;
16641 break;
16642 }
16643
16644 this.unmountChildren(safely);
16645 ReactDOMComponentTree.uncacheNode(this);
16646 EventPluginHub.deleteAllListeners(this);
16647 this._rootNodeID = 0;
16648 this._domID = 0;
16649 this._wrapperState = null;
16650
16651 if (process.env.NODE_ENV !== 'production') {
16652 setAndValidateContentChildDev.call(this, null);
16653 }
16654 },
16655
16656 getPublicInstance: function () {
16657 return getNode(this);
16658 }
16659};
16660
16661_assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);
16662
16663module.exports = ReactDOMComponent;
16664
16665/***/ }),
16666/* 135 */
16667/***/ (function(module, exports, __webpack_require__) {
16668
16669"use strict";
16670/**
16671 * Copyright (c) 2013-present, Facebook, Inc.
16672 *
16673 * This source code is licensed under the MIT license found in the
16674 * LICENSE file in the root directory of this source tree.
16675 *
16676 */
16677
16678
16679
16680var validateDOMNesting = __webpack_require__(44);
16681
16682var DOC_NODE_TYPE = 9;
16683
16684function ReactDOMContainerInfo(topLevelWrapper, node) {
16685 var info = {
16686 _topLevelWrapper: topLevelWrapper,
16687 _idCounter: 1,
16688 _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null,
16689 _node: node,
16690 _tag: node ? node.nodeName.toLowerCase() : null,
16691 _namespaceURI: node ? node.namespaceURI : null
16692 };
16693 if (process.env.NODE_ENV !== 'production') {
16694 info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null;
16695 }
16696 return info;
16697}
16698
16699module.exports = ReactDOMContainerInfo;
16700
16701/***/ }),
16702/* 136 */
16703/***/ (function(module, exports, __webpack_require__) {
16704
16705"use strict";
16706/**
16707 * Copyright (c) 2014-present, Facebook, Inc.
16708 *
16709 * This source code is licensed under the MIT license found in the
16710 * LICENSE file in the root directory of this source tree.
16711 *
16712 */
16713
16714
16715
16716var _assign = __webpack_require__(3);
16717
16718var DOMLazyTree = __webpack_require__(15);
16719var ReactDOMComponentTree = __webpack_require__(4);
16720
16721var ReactDOMEmptyComponent = function (instantiate) {
16722 // ReactCompositeComponent uses this:
16723 this._currentElement = null;
16724 // ReactDOMComponentTree uses these:
16725 this._hostNode = null;
16726 this._hostParent = null;
16727 this._hostContainerInfo = null;
16728 this._domID = 0;
16729};
16730_assign(ReactDOMEmptyComponent.prototype, {
16731 mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
16732 var domID = hostContainerInfo._idCounter++;
16733 this._domID = domID;
16734 this._hostParent = hostParent;
16735 this._hostContainerInfo = hostContainerInfo;
16736
16737 var nodeValue = ' react-empty: ' + this._domID + ' ';
16738 if (transaction.useCreateElement) {
16739 var ownerDocument = hostContainerInfo._ownerDocument;
16740 var node = ownerDocument.createComment(nodeValue);
16741 ReactDOMComponentTree.precacheNode(this, node);
16742 return DOMLazyTree(node);
16743 } else {
16744 if (transaction.renderToStaticMarkup) {
16745 // Normally we'd insert a comment node, but since this is a situation
16746 // where React won't take over (static pages), we can simply return
16747 // nothing.
16748 return '';
16749 }
16750 return '<!--' + nodeValue + '-->';
16751 }
16752 },
16753 receiveComponent: function () {},
16754 getHostNode: function () {
16755 return ReactDOMComponentTree.getNodeFromInstance(this);
16756 },
16757 unmountComponent: function () {
16758 ReactDOMComponentTree.uncacheNode(this);
16759 }
16760});
16761
16762module.exports = ReactDOMEmptyComponent;
16763
16764/***/ }),
16765/* 137 */
16766/***/ (function(module, exports, __webpack_require__) {
16767
16768"use strict";
16769/**
16770 * Copyright (c) 2013-present, Facebook, Inc.
16771 *
16772 * This source code is licensed under the MIT license found in the
16773 * LICENSE file in the root directory of this source tree.
16774 *
16775 */
16776
16777
16778
16779var DOMChildrenOperations = __webpack_require__(28);
16780var ReactDOMComponentTree = __webpack_require__(4);
16781
16782/**
16783 * Operations used to process updates to DOM nodes.
16784 */
16785var ReactDOMIDOperations = {
16786 /**
16787 * Updates a component's children by processing a series of updates.
16788 *
16789 * @param {array<object>} updates List of update configurations.
16790 * @internal
16791 */
16792 dangerouslyProcessChildrenUpdates: function (parentInst, updates) {
16793 var node = ReactDOMComponentTree.getNodeFromInstance(parentInst);
16794 DOMChildrenOperations.processUpdates(node, updates);
16795 }
16796};
16797
16798module.exports = ReactDOMIDOperations;
16799
16800/***/ }),
16801/* 138 */
16802/***/ (function(module, exports, __webpack_require__) {
16803
16804"use strict";
16805/**
16806 * Copyright (c) 2013-present, Facebook, Inc.
16807 *
16808 * This source code is licensed under the MIT license found in the
16809 * LICENSE file in the root directory of this source tree.
16810 *
16811 */
16812
16813
16814
16815var _prodInvariant = __webpack_require__(2),
16816 _assign = __webpack_require__(3);
16817
16818var DOMPropertyOperations = __webpack_require__(55);
16819var LinkedValueUtils = __webpack_require__(33);
16820var ReactDOMComponentTree = __webpack_require__(4);
16821var ReactUpdates = __webpack_require__(9);
16822
16823var invariant = __webpack_require__(0);
16824var warning = __webpack_require__(1);
16825
16826var didWarnValueLink = false;
16827var didWarnCheckedLink = false;
16828var didWarnValueDefaultValue = false;
16829var didWarnCheckedDefaultChecked = false;
16830var didWarnControlledToUncontrolled = false;
16831var didWarnUncontrolledToControlled = false;
16832
16833function forceUpdateIfMounted() {
16834 if (this._rootNodeID) {
16835 // DOM component is still mounted; update
16836 ReactDOMInput.updateWrapper(this);
16837 }
16838}
16839
16840function isControlled(props) {
16841 var usesChecked = props.type === 'checkbox' || props.type === 'radio';
16842 return usesChecked ? props.checked != null : props.value != null;
16843}
16844
16845/**
16846 * Implements an <input> host component that allows setting these optional
16847 * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
16848 *
16849 * If `checked` or `value` are not supplied (or null/undefined), user actions
16850 * that affect the checked state or value will trigger updates to the element.
16851 *
16852 * If they are supplied (and not null/undefined), the rendered element will not
16853 * trigger updates to the element. Instead, the props must change in order for
16854 * the rendered element to be updated.
16855 *
16856 * The rendered element will be initialized as unchecked (or `defaultChecked`)
16857 * with an empty value (or `defaultValue`).
16858 *
16859 * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
16860 */
16861var ReactDOMInput = {
16862 getHostProps: function (inst, props) {
16863 var value = LinkedValueUtils.getValue(props);
16864 var checked = LinkedValueUtils.getChecked(props);
16865
16866 var hostProps = _assign({
16867 // Make sure we set .type before any other properties (setting .value
16868 // before .type means .value is lost in IE11 and below)
16869 type: undefined,
16870 // Make sure we set .step before .value (setting .value before .step
16871 // means .value is rounded on mount, based upon step precision)
16872 step: undefined,
16873 // Make sure we set .min & .max before .value (to ensure proper order
16874 // in corner cases such as min or max deriving from value, e.g. Issue #7170)
16875 min: undefined,
16876 max: undefined
16877 }, props, {
16878 defaultChecked: undefined,
16879 defaultValue: undefined,
16880 value: value != null ? value : inst._wrapperState.initialValue,
16881 checked: checked != null ? checked : inst._wrapperState.initialChecked,
16882 onChange: inst._wrapperState.onChange
16883 });
16884
16885 return hostProps;
16886 },
16887
16888 mountWrapper: function (inst, props) {
16889 if (process.env.NODE_ENV !== 'production') {
16890 LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner);
16891
16892 var owner = inst._currentElement._owner;
16893
16894 if (props.valueLink !== undefined && !didWarnValueLink) {
16895 process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
16896 didWarnValueLink = true;
16897 }
16898 if (props.checkedLink !== undefined && !didWarnCheckedLink) {
16899 process.env.NODE_ENV !== 'production' ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
16900 didWarnCheckedLink = true;
16901 }
16902 if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
16903 process.env.NODE_ENV !== 'production' ? 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', owner && owner.getName() || 'A component', props.type) : void 0;
16904 didWarnCheckedDefaultChecked = true;
16905 }
16906 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
16907 process.env.NODE_ENV !== 'production' ? 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', owner && owner.getName() || 'A component', props.type) : void 0;
16908 didWarnValueDefaultValue = true;
16909 }
16910 }
16911
16912 var defaultValue = props.defaultValue;
16913 inst._wrapperState = {
16914 initialChecked: props.checked != null ? props.checked : props.defaultChecked,
16915 initialValue: props.value != null ? props.value : defaultValue,
16916 listeners: null,
16917 onChange: _handleChange.bind(inst),
16918 controlled: isControlled(props)
16919 };
16920 },
16921
16922 updateWrapper: function (inst) {
16923 var props = inst._currentElement.props;
16924
16925 if (process.env.NODE_ENV !== 'production') {
16926 var controlled = isControlled(props);
16927 var owner = inst._currentElement._owner;
16928
16929 if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
16930 process.env.NODE_ENV !== 'production' ? warning(false, '%s 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', owner && owner.getName() || 'A component', props.type) : void 0;
16931 didWarnUncontrolledToControlled = true;
16932 }
16933 if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
16934 process.env.NODE_ENV !== 'production' ? warning(false, '%s 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', owner && owner.getName() || 'A component', props.type) : void 0;
16935 didWarnControlledToUncontrolled = true;
16936 }
16937 }
16938
16939 // TODO: Shouldn't this be getChecked(props)?
16940 var checked = props.checked;
16941 if (checked != null) {
16942 DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false);
16943 }
16944
16945 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
16946 var value = LinkedValueUtils.getValue(props);
16947 if (value != null) {
16948 if (value === 0 && node.value === '') {
16949 node.value = '0';
16950 // Note: IE9 reports a number inputs as 'text', so check props instead.
16951 } else if (props.type === 'number') {
16952 // Simulate `input.valueAsNumber`. IE9 does not support it
16953 var valueAsNumber = parseFloat(node.value, 10) || 0;
16954
16955 if (
16956 // eslint-disable-next-line
16957 value != valueAsNumber ||
16958 // eslint-disable-next-line
16959 value == valueAsNumber && node.value != value) {
16960 // Cast `value` to a string to ensure the value is set correctly. While
16961 // browsers typically do this as necessary, jsdom doesn't.
16962 node.value = '' + value;
16963 }
16964 } else if (node.value !== '' + value) {
16965 // Cast `value` to a string to ensure the value is set correctly. While
16966 // browsers typically do this as necessary, jsdom doesn't.
16967 node.value = '' + value;
16968 }
16969 } else {
16970 if (props.value == null && props.defaultValue != null) {
16971 // In Chrome, assigning defaultValue to certain input types triggers input validation.
16972 // For number inputs, the display value loses trailing decimal points. For email inputs,
16973 // Chrome raises "The specified value <x> is not a valid email address".
16974 //
16975 // Here we check to see if the defaultValue has actually changed, avoiding these problems
16976 // when the user is inputting text
16977 //
16978 // https://github.com/facebook/react/issues/7253
16979 if (node.defaultValue !== '' + props.defaultValue) {
16980 node.defaultValue = '' + props.defaultValue;
16981 }
16982 }
16983 if (props.checked == null && props.defaultChecked != null) {
16984 node.defaultChecked = !!props.defaultChecked;
16985 }
16986 }
16987 },
16988
16989 postMountWrapper: function (inst) {
16990 var props = inst._currentElement.props;
16991
16992 // This is in postMount because we need access to the DOM node, which is not
16993 // available until after the component has mounted.
16994 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
16995
16996 // Detach value from defaultValue. We won't do anything if we're working on
16997 // submit or reset inputs as those values & defaultValues are linked. They
16998 // are not resetable nodes so this operation doesn't matter and actually
16999 // removes browser-default values (eg "Submit Query") when no value is
17000 // provided.
17001
17002 switch (props.type) {
17003 case 'submit':
17004 case 'reset':
17005 break;
17006 case 'color':
17007 case 'date':
17008 case 'datetime':
17009 case 'datetime-local':
17010 case 'month':
17011 case 'time':
17012 case 'week':
17013 // This fixes the no-show issue on iOS Safari and Android Chrome:
17014 // https://github.com/facebook/react/issues/7233
17015 node.value = '';
17016 node.value = node.defaultValue;
17017 break;
17018 default:
17019 node.value = node.value;
17020 break;
17021 }
17022
17023 // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
17024 // this is needed to work around a chrome bug where setting defaultChecked
17025 // will sometimes influence the value of checked (even after detachment).
17026 // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
17027 // We need to temporarily unset name to avoid disrupting radio button groups.
17028 var name = node.name;
17029 if (name !== '') {
17030 node.name = '';
17031 }
17032 node.defaultChecked = !node.defaultChecked;
17033 node.defaultChecked = !node.defaultChecked;
17034 if (name !== '') {
17035 node.name = name;
17036 }
17037 }
17038};
17039
17040function _handleChange(event) {
17041 var props = this._currentElement.props;
17042
17043 var returnValue = LinkedValueUtils.executeOnChange(props, event);
17044
17045 // Here we use asap to wait until all updates have propagated, which
17046 // is important when using controlled components within layers:
17047 // https://github.com/facebook/react/issues/1698
17048 ReactUpdates.asap(forceUpdateIfMounted, this);
17049
17050 var name = props.name;
17051 if (props.type === 'radio' && name != null) {
17052 var rootNode = ReactDOMComponentTree.getNodeFromInstance(this);
17053 var queryRoot = rootNode;
17054
17055 while (queryRoot.parentNode) {
17056 queryRoot = queryRoot.parentNode;
17057 }
17058
17059 // If `rootNode.form` was non-null, then we could try `form.elements`,
17060 // but that sometimes behaves strangely in IE8. We could also try using
17061 // `form.getElementsByName`, but that will only return direct children
17062 // and won't include inputs that use the HTML5 `form=` attribute. Since
17063 // the input might not even be in a form, let's just use the global
17064 // `querySelectorAll` to ensure we don't miss anything.
17065 var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
17066
17067 for (var i = 0; i < group.length; i++) {
17068 var otherNode = group[i];
17069 if (otherNode === rootNode || otherNode.form !== rootNode.form) {
17070 continue;
17071 }
17072 // This will throw if radio buttons rendered by different copies of React
17073 // and the same name are rendered into the same form (same as #1939).
17074 // That's probably okay; we don't support it just as we don't support
17075 // mixing React radio buttons with non-React ones.
17076 var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode);
17077 !otherInstance ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0;
17078 // If this is a controlled radio button group, forcing the input that
17079 // was previously checked to update will cause it to be come re-checked
17080 // as appropriate.
17081 ReactUpdates.asap(forceUpdateIfMounted, otherInstance);
17082 }
17083 }
17084
17085 return returnValue;
17086}
17087
17088module.exports = ReactDOMInput;
17089
17090/***/ }),
17091/* 139 */
17092/***/ (function(module, exports, __webpack_require__) {
17093
17094"use strict";
17095/**
17096 * Copyright (c) 2013-present, Facebook, Inc.
17097 *
17098 * This source code is licensed under the MIT license found in the
17099 * LICENSE file in the root directory of this source tree.
17100 *
17101 */
17102
17103
17104
17105var _assign = __webpack_require__(3);
17106
17107var React = __webpack_require__(21);
17108var ReactDOMComponentTree = __webpack_require__(4);
17109var ReactDOMSelect = __webpack_require__(57);
17110
17111var warning = __webpack_require__(1);
17112var didWarnInvalidOptionChildren = false;
17113
17114function flattenChildren(children) {
17115 var content = '';
17116
17117 // Flatten children and warn if they aren't strings or numbers;
17118 // invalid types are ignored.
17119 React.Children.forEach(children, function (child) {
17120 if (child == null) {
17121 return;
17122 }
17123 if (typeof child === 'string' || typeof child === 'number') {
17124 content += child;
17125 } else if (!didWarnInvalidOptionChildren) {
17126 didWarnInvalidOptionChildren = true;
17127 process.env.NODE_ENV !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0;
17128 }
17129 });
17130
17131 return content;
17132}
17133
17134/**
17135 * Implements an <option> host component that warns when `selected` is set.
17136 */
17137var ReactDOMOption = {
17138 mountWrapper: function (inst, props, hostParent) {
17139 // TODO (yungsters): Remove support for `selected` in <option>.
17140 if (process.env.NODE_ENV !== 'production') {
17141 process.env.NODE_ENV !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0;
17142 }
17143
17144 // Look up whether this option is 'selected'
17145 var selectValue = null;
17146 if (hostParent != null) {
17147 var selectParent = hostParent;
17148
17149 if (selectParent._tag === 'optgroup') {
17150 selectParent = selectParent._hostParent;
17151 }
17152
17153 if (selectParent != null && selectParent._tag === 'select') {
17154 selectValue = ReactDOMSelect.getSelectValueContext(selectParent);
17155 }
17156 }
17157
17158 // If the value is null (e.g., no specified value or after initial mount)
17159 // or missing (e.g., for <datalist>), we don't change props.selected
17160 var selected = null;
17161 if (selectValue != null) {
17162 var value;
17163 if (props.value != null) {
17164 value = props.value + '';
17165 } else {
17166 value = flattenChildren(props.children);
17167 }
17168 selected = false;
17169 if (Array.isArray(selectValue)) {
17170 // multiple
17171 for (var i = 0; i < selectValue.length; i++) {
17172 if ('' + selectValue[i] === value) {
17173 selected = true;
17174 break;
17175 }
17176 }
17177 } else {
17178 selected = '' + selectValue === value;
17179 }
17180 }
17181
17182 inst._wrapperState = { selected: selected };
17183 },
17184
17185 postMountWrapper: function (inst) {
17186 // value="" should make a value attribute (#6219)
17187 var props = inst._currentElement.props;
17188 if (props.value != null) {
17189 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
17190 node.setAttribute('value', props.value);
17191 }
17192 },
17193
17194 getHostProps: function (inst, props) {
17195 var hostProps = _assign({ selected: undefined, children: undefined }, props);
17196
17197 // Read state only from initial mount because <select> updates value
17198 // manually; we need the initial state only for server rendering
17199 if (inst._wrapperState.selected != null) {
17200 hostProps.selected = inst._wrapperState.selected;
17201 }
17202
17203 var content = flattenChildren(props.children);
17204
17205 if (content) {
17206 hostProps.children = content;
17207 }
17208
17209 return hostProps;
17210 }
17211};
17212
17213module.exports = ReactDOMOption;
17214
17215/***/ }),
17216/* 140 */
17217/***/ (function(module, exports, __webpack_require__) {
17218
17219"use strict";
17220/**
17221 * Copyright (c) 2013-present, Facebook, Inc.
17222 *
17223 * This source code is licensed under the MIT license found in the
17224 * LICENSE file in the root directory of this source tree.
17225 *
17226 */
17227
17228
17229
17230var ExecutionEnvironment = __webpack_require__(5);
17231
17232var getNodeForCharacterOffset = __webpack_require__(184);
17233var getTextContentAccessor = __webpack_require__(68);
17234
17235/**
17236 * While `isCollapsed` is available on the Selection object and `collapsed`
17237 * is available on the Range object, IE11 sometimes gets them wrong.
17238 * If the anchor/focus nodes and offsets are the same, the range is collapsed.
17239 */
17240function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {
17241 return anchorNode === focusNode && anchorOffset === focusOffset;
17242}
17243
17244/**
17245 * Get the appropriate anchor and focus node/offset pairs for IE.
17246 *
17247 * The catch here is that IE's selection API doesn't provide information
17248 * about whether the selection is forward or backward, so we have to
17249 * behave as though it's always forward.
17250 *
17251 * IE text differs from modern selection in that it behaves as though
17252 * block elements end with a new line. This means character offsets will
17253 * differ between the two APIs.
17254 *
17255 * @param {DOMElement} node
17256 * @return {object}
17257 */
17258function getIEOffsets(node) {
17259 var selection = document.selection;
17260 var selectedRange = selection.createRange();
17261 var selectedLength = selectedRange.text.length;
17262
17263 // Duplicate selection so we can move range without breaking user selection.
17264 var fromStart = selectedRange.duplicate();
17265 fromStart.moveToElementText(node);
17266 fromStart.setEndPoint('EndToStart', selectedRange);
17267
17268 var startOffset = fromStart.text.length;
17269 var endOffset = startOffset + selectedLength;
17270
17271 return {
17272 start: startOffset,
17273 end: endOffset
17274 };
17275}
17276
17277/**
17278 * @param {DOMElement} node
17279 * @return {?object}
17280 */
17281function getModernOffsets(node) {
17282 var selection = window.getSelection && window.getSelection();
17283
17284 if (!selection || selection.rangeCount === 0) {
17285 return null;
17286 }
17287
17288 var anchorNode = selection.anchorNode;
17289 var anchorOffset = selection.anchorOffset;
17290 var focusNode = selection.focusNode;
17291 var focusOffset = selection.focusOffset;
17292
17293 var currentRange = selection.getRangeAt(0);
17294
17295 // In Firefox, range.startContainer and range.endContainer can be "anonymous
17296 // divs", e.g. the up/down buttons on an <input type="number">. Anonymous
17297 // divs do not seem to expose properties, triggering a "Permission denied
17298 // error" if any of its properties are accessed. The only seemingly possible
17299 // way to avoid erroring is to access a property that typically works for
17300 // non-anonymous divs and catch any error that may otherwise arise. See
17301 // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
17302 try {
17303 /* eslint-disable no-unused-expressions */
17304 currentRange.startContainer.nodeType;
17305 currentRange.endContainer.nodeType;
17306 /* eslint-enable no-unused-expressions */
17307 } catch (e) {
17308 return null;
17309 }
17310
17311 // If the node and offset values are the same, the selection is collapsed.
17312 // `Selection.isCollapsed` is available natively, but IE sometimes gets
17313 // this value wrong.
17314 var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);
17315
17316 var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;
17317
17318 var tempRange = currentRange.cloneRange();
17319 tempRange.selectNodeContents(node);
17320 tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);
17321
17322 var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset);
17323
17324 var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;
17325 var end = start + rangeLength;
17326
17327 // Detect whether the selection is backward.
17328 var detectionRange = document.createRange();
17329 detectionRange.setStart(anchorNode, anchorOffset);
17330 detectionRange.setEnd(focusNode, focusOffset);
17331 var isBackward = detectionRange.collapsed;
17332
17333 return {
17334 start: isBackward ? end : start,
17335 end: isBackward ? start : end
17336 };
17337}
17338
17339/**
17340 * @param {DOMElement|DOMTextNode} node
17341 * @param {object} offsets
17342 */
17343function setIEOffsets(node, offsets) {
17344 var range = document.selection.createRange().duplicate();
17345 var start, end;
17346
17347 if (offsets.end === undefined) {
17348 start = offsets.start;
17349 end = start;
17350 } else if (offsets.start > offsets.end) {
17351 start = offsets.end;
17352 end = offsets.start;
17353 } else {
17354 start = offsets.start;
17355 end = offsets.end;
17356 }
17357
17358 range.moveToElementText(node);
17359 range.moveStart('character', start);
17360 range.setEndPoint('EndToStart', range);
17361 range.moveEnd('character', end - start);
17362 range.select();
17363}
17364
17365/**
17366 * In modern non-IE browsers, we can support both forward and backward
17367 * selections.
17368 *
17369 * Note: IE10+ supports the Selection object, but it does not support
17370 * the `extend` method, which means that even in modern IE, it's not possible
17371 * to programmatically create a backward selection. Thus, for all IE
17372 * versions, we use the old IE API to create our selections.
17373 *
17374 * @param {DOMElement|DOMTextNode} node
17375 * @param {object} offsets
17376 */
17377function setModernOffsets(node, offsets) {
17378 if (!window.getSelection) {
17379 return;
17380 }
17381
17382 var selection = window.getSelection();
17383 var length = node[getTextContentAccessor()].length;
17384 var start = Math.min(offsets.start, length);
17385 var end = offsets.end === undefined ? start : Math.min(offsets.end, length);
17386
17387 // IE 11 uses modern selection, but doesn't support the extend method.
17388 // Flip backward selections, so we can set with a single range.
17389 if (!selection.extend && start > end) {
17390 var temp = end;
17391 end = start;
17392 start = temp;
17393 }
17394
17395 var startMarker = getNodeForCharacterOffset(node, start);
17396 var endMarker = getNodeForCharacterOffset(node, end);
17397
17398 if (startMarker && endMarker) {
17399 var range = document.createRange();
17400 range.setStart(startMarker.node, startMarker.offset);
17401 selection.removeAllRanges();
17402
17403 if (start > end) {
17404 selection.addRange(range);
17405 selection.extend(endMarker.node, endMarker.offset);
17406 } else {
17407 range.setEnd(endMarker.node, endMarker.offset);
17408 selection.addRange(range);
17409 }
17410 }
17411}
17412
17413var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window);
17414
17415var ReactDOMSelection = {
17416 /**
17417 * @param {DOMElement} node
17418 */
17419 getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,
17420
17421 /**
17422 * @param {DOMElement|DOMTextNode} node
17423 * @param {object} offsets
17424 */
17425 setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
17426};
17427
17428module.exports = ReactDOMSelection;
17429
17430/***/ }),
17431/* 141 */
17432/***/ (function(module, exports, __webpack_require__) {
17433
17434"use strict";
17435/**
17436 * Copyright (c) 2013-present, Facebook, Inc.
17437 *
17438 * This source code is licensed under the MIT license found in the
17439 * LICENSE file in the root directory of this source tree.
17440 *
17441 */
17442
17443
17444
17445var ReactDefaultInjection = __webpack_require__(146);
17446var ReactServerRendering = __webpack_require__(162);
17447var ReactVersion = __webpack_require__(164);
17448
17449ReactDefaultInjection.inject();
17450
17451var ReactDOMServer = {
17452 renderToString: ReactServerRendering.renderToString,
17453 renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup,
17454 version: ReactVersion
17455};
17456
17457module.exports = ReactDOMServer;
17458
17459/***/ }),
17460/* 142 */
17461/***/ (function(module, exports, __webpack_require__) {
17462
17463"use strict";
17464/**
17465 * Copyright (c) 2013-present, Facebook, Inc.
17466 *
17467 * This source code is licensed under the MIT license found in the
17468 * LICENSE file in the root directory of this source tree.
17469 *
17470 */
17471
17472
17473
17474var _prodInvariant = __webpack_require__(2),
17475 _assign = __webpack_require__(3);
17476
17477var DOMChildrenOperations = __webpack_require__(28);
17478var DOMLazyTree = __webpack_require__(15);
17479var ReactDOMComponentTree = __webpack_require__(4);
17480
17481var escapeTextContentForBrowser = __webpack_require__(25);
17482var invariant = __webpack_require__(0);
17483var validateDOMNesting = __webpack_require__(44);
17484
17485/**
17486 * Text nodes violate a couple assumptions that React makes about components:
17487 *
17488 * - When mounting text into the DOM, adjacent text nodes are merged.
17489 * - Text nodes cannot be assigned a React root ID.
17490 *
17491 * This component is used to wrap strings between comment nodes so that they
17492 * can undergo the same reconciliation that is applied to elements.
17493 *
17494 * TODO: Investigate representing React components in the DOM with text nodes.
17495 *
17496 * @class ReactDOMTextComponent
17497 * @extends ReactComponent
17498 * @internal
17499 */
17500var ReactDOMTextComponent = function (text) {
17501 // TODO: This is really a ReactText (ReactNode), not a ReactElement
17502 this._currentElement = text;
17503 this._stringText = '' + text;
17504 // ReactDOMComponentTree uses these:
17505 this._hostNode = null;
17506 this._hostParent = null;
17507
17508 // Properties
17509 this._domID = 0;
17510 this._mountIndex = 0;
17511 this._closingComment = null;
17512 this._commentNodes = null;
17513};
17514
17515_assign(ReactDOMTextComponent.prototype, {
17516 /**
17517 * Creates the markup for this text node. This node is not intended to have
17518 * any features besides containing text content.
17519 *
17520 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
17521 * @return {string} Markup for this text node.
17522 * @internal
17523 */
17524 mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
17525 if (process.env.NODE_ENV !== 'production') {
17526 var parentInfo;
17527 if (hostParent != null) {
17528 parentInfo = hostParent._ancestorInfo;
17529 } else if (hostContainerInfo != null) {
17530 parentInfo = hostContainerInfo._ancestorInfo;
17531 }
17532 if (parentInfo) {
17533 // parentInfo should always be present except for the top-level
17534 // component when server rendering
17535 validateDOMNesting(null, this._stringText, this, parentInfo);
17536 }
17537 }
17538
17539 var domID = hostContainerInfo._idCounter++;
17540 var openingValue = ' react-text: ' + domID + ' ';
17541 var closingValue = ' /react-text ';
17542 this._domID = domID;
17543 this._hostParent = hostParent;
17544 if (transaction.useCreateElement) {
17545 var ownerDocument = hostContainerInfo._ownerDocument;
17546 var openingComment = ownerDocument.createComment(openingValue);
17547 var closingComment = ownerDocument.createComment(closingValue);
17548 var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment());
17549 DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment));
17550 if (this._stringText) {
17551 DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText)));
17552 }
17553 DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment));
17554 ReactDOMComponentTree.precacheNode(this, openingComment);
17555 this._closingComment = closingComment;
17556 return lazyTree;
17557 } else {
17558 var escapedText = escapeTextContentForBrowser(this._stringText);
17559
17560 if (transaction.renderToStaticMarkup) {
17561 // Normally we'd wrap this between comment nodes for the reasons stated
17562 // above, but since this is a situation where React won't take over
17563 // (static pages), we can simply return the text as it is.
17564 return escapedText;
17565 }
17566
17567 return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->';
17568 }
17569 },
17570
17571 /**
17572 * Updates this component by updating the text content.
17573 *
17574 * @param {ReactText} nextText The next text content
17575 * @param {ReactReconcileTransaction} transaction
17576 * @internal
17577 */
17578 receiveComponent: function (nextText, transaction) {
17579 if (nextText !== this._currentElement) {
17580 this._currentElement = nextText;
17581 var nextStringText = '' + nextText;
17582 if (nextStringText !== this._stringText) {
17583 // TODO: Save this as pending props and use performUpdateIfNecessary
17584 // and/or updateComponent to do the actual update for consistency with
17585 // other component types?
17586 this._stringText = nextStringText;
17587 var commentNodes = this.getHostNode();
17588 DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText);
17589 }
17590 }
17591 },
17592
17593 getHostNode: function () {
17594 var hostNode = this._commentNodes;
17595 if (hostNode) {
17596 return hostNode;
17597 }
17598 if (!this._closingComment) {
17599 var openingComment = ReactDOMComponentTree.getNodeFromInstance(this);
17600 var node = openingComment.nextSibling;
17601 while (true) {
17602 !(node != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0;
17603 if (node.nodeType === 8 && node.nodeValue === ' /react-text ') {
17604 this._closingComment = node;
17605 break;
17606 }
17607 node = node.nextSibling;
17608 }
17609 }
17610 hostNode = [this._hostNode, this._closingComment];
17611 this._commentNodes = hostNode;
17612 return hostNode;
17613 },
17614
17615 unmountComponent: function () {
17616 this._closingComment = null;
17617 this._commentNodes = null;
17618 ReactDOMComponentTree.uncacheNode(this);
17619 }
17620});
17621
17622module.exports = ReactDOMTextComponent;
17623
17624/***/ }),
17625/* 143 */
17626/***/ (function(module, exports, __webpack_require__) {
17627
17628"use strict";
17629/**
17630 * Copyright (c) 2013-present, Facebook, Inc.
17631 *
17632 * This source code is licensed under the MIT license found in the
17633 * LICENSE file in the root directory of this source tree.
17634 *
17635 */
17636
17637
17638
17639var _prodInvariant = __webpack_require__(2),
17640 _assign = __webpack_require__(3);
17641
17642var LinkedValueUtils = __webpack_require__(33);
17643var ReactDOMComponentTree = __webpack_require__(4);
17644var ReactUpdates = __webpack_require__(9);
17645
17646var invariant = __webpack_require__(0);
17647var warning = __webpack_require__(1);
17648
17649var didWarnValueLink = false;
17650var didWarnValDefaultVal = false;
17651
17652function forceUpdateIfMounted() {
17653 if (this._rootNodeID) {
17654 // DOM component is still mounted; update
17655 ReactDOMTextarea.updateWrapper(this);
17656 }
17657}
17658
17659/**
17660 * Implements a <textarea> host component that allows setting `value`, and
17661 * `defaultValue`. This differs from the traditional DOM API because value is
17662 * usually set as PCDATA children.
17663 *
17664 * If `value` is not supplied (or null/undefined), user actions that affect the
17665 * value will trigger updates to the element.
17666 *
17667 * If `value` is supplied (and not null/undefined), the rendered element will
17668 * not trigger updates to the element. Instead, the `value` prop must change in
17669 * order for the rendered element to be updated.
17670 *
17671 * The rendered element will be initialized with an empty value, the prop
17672 * `defaultValue` if specified, or the children content (deprecated).
17673 */
17674var ReactDOMTextarea = {
17675 getHostProps: function (inst, props) {
17676 !(props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0;
17677
17678 // Always set children to the same thing. In IE9, the selection range will
17679 // get reset if `textContent` is mutated. We could add a check in setTextContent
17680 // to only set the value if/when the value differs from the node value (which would
17681 // completely solve this IE9 bug), but Sebastian+Ben seemed to like this solution.
17682 // The value can be a boolean or object so that's why it's forced to be a string.
17683 var hostProps = _assign({}, props, {
17684 value: undefined,
17685 defaultValue: undefined,
17686 children: '' + inst._wrapperState.initialValue,
17687 onChange: inst._wrapperState.onChange
17688 });
17689
17690 return hostProps;
17691 },
17692
17693 mountWrapper: function (inst, props) {
17694 if (process.env.NODE_ENV !== 'production') {
17695 LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner);
17696 if (props.valueLink !== undefined && !didWarnValueLink) {
17697 process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0;
17698 didWarnValueLink = true;
17699 }
17700 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
17701 process.env.NODE_ENV !== 'production' ? 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') : void 0;
17702 didWarnValDefaultVal = true;
17703 }
17704 }
17705
17706 var value = LinkedValueUtils.getValue(props);
17707 var initialValue = value;
17708
17709 // Only bother fetching default value if we're going to use it
17710 if (value == null) {
17711 var defaultValue = props.defaultValue;
17712 // TODO (yungsters): Remove support for children content in <textarea>.
17713 var children = props.children;
17714 if (children != null) {
17715 if (process.env.NODE_ENV !== 'production') {
17716 process.env.NODE_ENV !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0;
17717 }
17718 !(defaultValue == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0;
17719 if (Array.isArray(children)) {
17720 !(children.length <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0;
17721 children = children[0];
17722 }
17723
17724 defaultValue = '' + children;
17725 }
17726 if (defaultValue == null) {
17727 defaultValue = '';
17728 }
17729 initialValue = defaultValue;
17730 }
17731
17732 inst._wrapperState = {
17733 initialValue: '' + initialValue,
17734 listeners: null,
17735 onChange: _handleChange.bind(inst)
17736 };
17737 },
17738
17739 updateWrapper: function (inst) {
17740 var props = inst._currentElement.props;
17741
17742 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
17743 var value = LinkedValueUtils.getValue(props);
17744 if (value != null) {
17745 // Cast `value` to a string to ensure the value is set correctly. While
17746 // browsers typically do this as necessary, jsdom doesn't.
17747 var newValue = '' + value;
17748
17749 // To avoid side effects (such as losing text selection), only set value if changed
17750 if (newValue !== node.value) {
17751 node.value = newValue;
17752 }
17753 if (props.defaultValue == null) {
17754 node.defaultValue = newValue;
17755 }
17756 }
17757 if (props.defaultValue != null) {
17758 node.defaultValue = props.defaultValue;
17759 }
17760 },
17761
17762 postMountWrapper: function (inst) {
17763 // This is in postMount because we need access to the DOM node, which is not
17764 // available until after the component has mounted.
17765 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
17766 var textContent = node.textContent;
17767
17768 // Only set node.value if textContent is equal to the expected
17769 // initial value. In IE10/IE11 there is a bug where the placeholder attribute
17770 // will populate textContent as well.
17771 // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
17772 if (textContent === inst._wrapperState.initialValue) {
17773 node.value = textContent;
17774 }
17775 }
17776};
17777
17778function _handleChange(event) {
17779 var props = this._currentElement.props;
17780 var returnValue = LinkedValueUtils.executeOnChange(props, event);
17781 ReactUpdates.asap(forceUpdateIfMounted, this);
17782 return returnValue;
17783}
17784
17785module.exports = ReactDOMTextarea;
17786
17787/***/ }),
17788/* 144 */
17789/***/ (function(module, exports, __webpack_require__) {
17790
17791"use strict";
17792/**
17793 * Copyright (c) 2015-present, Facebook, Inc.
17794 *
17795 * This source code is licensed under the MIT license found in the
17796 * LICENSE file in the root directory of this source tree.
17797 *
17798 */
17799
17800
17801
17802var _prodInvariant = __webpack_require__(2);
17803
17804var invariant = __webpack_require__(0);
17805
17806/**
17807 * Return the lowest common ancestor of A and B, or null if they are in
17808 * different trees.
17809 */
17810function getLowestCommonAncestor(instA, instB) {
17811 !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
17812 !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
17813
17814 var depthA = 0;
17815 for (var tempA = instA; tempA; tempA = tempA._hostParent) {
17816 depthA++;
17817 }
17818 var depthB = 0;
17819 for (var tempB = instB; tempB; tempB = tempB._hostParent) {
17820 depthB++;
17821 }
17822
17823 // If A is deeper, crawl up.
17824 while (depthA - depthB > 0) {
17825 instA = instA._hostParent;
17826 depthA--;
17827 }
17828
17829 // If B is deeper, crawl up.
17830 while (depthB - depthA > 0) {
17831 instB = instB._hostParent;
17832 depthB--;
17833 }
17834
17835 // Walk in lockstep until we find a match.
17836 var depth = depthA;
17837 while (depth--) {
17838 if (instA === instB) {
17839 return instA;
17840 }
17841 instA = instA._hostParent;
17842 instB = instB._hostParent;
17843 }
17844 return null;
17845}
17846
17847/**
17848 * Return if A is an ancestor of B.
17849 */
17850function isAncestor(instA, instB) {
17851 !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
17852 !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
17853
17854 while (instB) {
17855 if (instB === instA) {
17856 return true;
17857 }
17858 instB = instB._hostParent;
17859 }
17860 return false;
17861}
17862
17863/**
17864 * Return the parent instance of the passed-in instance.
17865 */
17866function getParentInstance(inst) {
17867 !('_hostNode' in inst) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0;
17868
17869 return inst._hostParent;
17870}
17871
17872/**
17873 * Simulates the traversal of a two-phase, capture/bubble event dispatch.
17874 */
17875function traverseTwoPhase(inst, fn, arg) {
17876 var path = [];
17877 while (inst) {
17878 path.push(inst);
17879 inst = inst._hostParent;
17880 }
17881 var i;
17882 for (i = path.length; i-- > 0;) {
17883 fn(path[i], 'captured', arg);
17884 }
17885 for (i = 0; i < path.length; i++) {
17886 fn(path[i], 'bubbled', arg);
17887 }
17888}
17889
17890/**
17891 * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
17892 * should would receive a `mouseEnter` or `mouseLeave` event.
17893 *
17894 * Does not invoke the callback on the nearest common ancestor because nothing
17895 * "entered" or "left" that element.
17896 */
17897function traverseEnterLeave(from, to, fn, argFrom, argTo) {
17898 var common = from && to ? getLowestCommonAncestor(from, to) : null;
17899 var pathFrom = [];
17900 while (from && from !== common) {
17901 pathFrom.push(from);
17902 from = from._hostParent;
17903 }
17904 var pathTo = [];
17905 while (to && to !== common) {
17906 pathTo.push(to);
17907 to = to._hostParent;
17908 }
17909 var i;
17910 for (i = 0; i < pathFrom.length; i++) {
17911 fn(pathFrom[i], 'bubbled', argFrom);
17912 }
17913 for (i = pathTo.length; i-- > 0;) {
17914 fn(pathTo[i], 'captured', argTo);
17915 }
17916}
17917
17918module.exports = {
17919 isAncestor: isAncestor,
17920 getLowestCommonAncestor: getLowestCommonAncestor,
17921 getParentInstance: getParentInstance,
17922 traverseTwoPhase: traverseTwoPhase,
17923 traverseEnterLeave: traverseEnterLeave
17924};
17925
17926/***/ }),
17927/* 145 */
17928/***/ (function(module, exports, __webpack_require__) {
17929
17930"use strict";
17931/**
17932 * Copyright (c) 2016-present, Facebook, Inc.
17933 *
17934 * This source code is licensed under the MIT license found in the
17935 * LICENSE file in the root directory of this source tree.
17936 *
17937 *
17938 */
17939
17940
17941
17942var ReactInvalidSetStateWarningHook = __webpack_require__(153);
17943var ReactHostOperationHistoryHook = __webpack_require__(151);
17944var ReactComponentTreeHook = __webpack_require__(8);
17945var ExecutionEnvironment = __webpack_require__(5);
17946
17947var performanceNow = __webpack_require__(118);
17948var warning = __webpack_require__(1);
17949
17950var hooks = [];
17951var didHookThrowForEvent = {};
17952
17953function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
17954 try {
17955 fn.call(context, arg1, arg2, arg3, arg4, arg5);
17956 } catch (e) {
17957 process.env.NODE_ENV !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0;
17958 didHookThrowForEvent[event] = true;
17959 }
17960}
17961
17962function emitEvent(event, arg1, arg2, arg3, arg4, arg5) {
17963 for (var i = 0; i < hooks.length; i++) {
17964 var hook = hooks[i];
17965 var fn = hook[event];
17966 if (fn) {
17967 callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
17968 }
17969 }
17970}
17971
17972var isProfiling = false;
17973var flushHistory = [];
17974var lifeCycleTimerStack = [];
17975var currentFlushNesting = 0;
17976var currentFlushMeasurements = [];
17977var currentFlushStartTime = 0;
17978var currentTimerDebugID = null;
17979var currentTimerStartTime = 0;
17980var currentTimerNestedFlushDuration = 0;
17981var currentTimerType = null;
17982
17983var lifeCycleTimerHasWarned = false;
17984
17985function clearHistory() {
17986 ReactComponentTreeHook.purgeUnmountedComponents();
17987 ReactHostOperationHistoryHook.clearHistory();
17988}
17989
17990function getTreeSnapshot(registeredIDs) {
17991 return registeredIDs.reduce(function (tree, id) {
17992 var ownerID = ReactComponentTreeHook.getOwnerID(id);
17993 var parentID = ReactComponentTreeHook.getParentID(id);
17994 tree[id] = {
17995 displayName: ReactComponentTreeHook.getDisplayName(id),
17996 text: ReactComponentTreeHook.getText(id),
17997 updateCount: ReactComponentTreeHook.getUpdateCount(id),
17998 childIDs: ReactComponentTreeHook.getChildIDs(id),
17999 // Text nodes don't have owners but this is close enough.
18000 ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0,
18001 parentID: parentID
18002 };
18003 return tree;
18004 }, {});
18005}
18006
18007function resetMeasurements() {
18008 var previousStartTime = currentFlushStartTime;
18009 var previousMeasurements = currentFlushMeasurements;
18010 var previousOperations = ReactHostOperationHistoryHook.getHistory();
18011
18012 if (currentFlushNesting === 0) {
18013 currentFlushStartTime = 0;
18014 currentFlushMeasurements = [];
18015 clearHistory();
18016 return;
18017 }
18018
18019 if (previousMeasurements.length || previousOperations.length) {
18020 var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
18021 flushHistory.push({
18022 duration: performanceNow() - previousStartTime,
18023 measurements: previousMeasurements || [],
18024 operations: previousOperations || [],
18025 treeSnapshot: getTreeSnapshot(registeredIDs)
18026 });
18027 }
18028
18029 clearHistory();
18030 currentFlushStartTime = performanceNow();
18031 currentFlushMeasurements = [];
18032}
18033
18034function checkDebugID(debugID) {
18035 var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
18036
18037 if (allowRoot && debugID === 0) {
18038 return;
18039 }
18040 if (!debugID) {
18041 process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0;
18042 }
18043}
18044
18045function beginLifeCycleTimer(debugID, timerType) {
18046 if (currentFlushNesting === 0) {
18047 return;
18048 }
18049 if (currentTimerType && !lifeCycleTimerHasWarned) {
18050 process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
18051 lifeCycleTimerHasWarned = true;
18052 }
18053 currentTimerStartTime = performanceNow();
18054 currentTimerNestedFlushDuration = 0;
18055 currentTimerDebugID = debugID;
18056 currentTimerType = timerType;
18057}
18058
18059function endLifeCycleTimer(debugID, timerType) {
18060 if (currentFlushNesting === 0) {
18061 return;
18062 }
18063 if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) {
18064 process.env.NODE_ENV !== 'production' ? warning(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') : void 0;
18065 lifeCycleTimerHasWarned = true;
18066 }
18067 if (isProfiling) {
18068 currentFlushMeasurements.push({
18069 timerType: timerType,
18070 instanceID: debugID,
18071 duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration
18072 });
18073 }
18074 currentTimerStartTime = 0;
18075 currentTimerNestedFlushDuration = 0;
18076 currentTimerDebugID = null;
18077 currentTimerType = null;
18078}
18079
18080function pauseCurrentLifeCycleTimer() {
18081 var currentTimer = {
18082 startTime: currentTimerStartTime,
18083 nestedFlushStartTime: performanceNow(),
18084 debugID: currentTimerDebugID,
18085 timerType: currentTimerType
18086 };
18087 lifeCycleTimerStack.push(currentTimer);
18088 currentTimerStartTime = 0;
18089 currentTimerNestedFlushDuration = 0;
18090 currentTimerDebugID = null;
18091 currentTimerType = null;
18092}
18093
18094function resumeCurrentLifeCycleTimer() {
18095 var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(),
18096 startTime = _lifeCycleTimerStack$.startTime,
18097 nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime,
18098 debugID = _lifeCycleTimerStack$.debugID,
18099 timerType = _lifeCycleTimerStack$.timerType;
18100
18101 var nestedFlushDuration = performanceNow() - nestedFlushStartTime;
18102 currentTimerStartTime = startTime;
18103 currentTimerNestedFlushDuration += nestedFlushDuration;
18104 currentTimerDebugID = debugID;
18105 currentTimerType = timerType;
18106}
18107
18108var lastMarkTimeStamp = 0;
18109var canUsePerformanceMeasure = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';
18110
18111function shouldMark(debugID) {
18112 if (!isProfiling || !canUsePerformanceMeasure) {
18113 return false;
18114 }
18115 var element = ReactComponentTreeHook.getElement(debugID);
18116 if (element == null || typeof element !== 'object') {
18117 return false;
18118 }
18119 var isHostElement = typeof element.type === 'string';
18120 if (isHostElement) {
18121 return false;
18122 }
18123 return true;
18124}
18125
18126function markBegin(debugID, markType) {
18127 if (!shouldMark(debugID)) {
18128 return;
18129 }
18130
18131 var markName = debugID + '::' + markType;
18132 lastMarkTimeStamp = performanceNow();
18133 performance.mark(markName);
18134}
18135
18136function markEnd(debugID, markType) {
18137 if (!shouldMark(debugID)) {
18138 return;
18139 }
18140
18141 var markName = debugID + '::' + markType;
18142 var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown';
18143
18144 // Chrome has an issue of dropping markers recorded too fast:
18145 // https://bugs.chromium.org/p/chromium/issues/detail?id=640652
18146 // To work around this, we will not report very small measurements.
18147 // I determined the magic number by tweaking it back and forth.
18148 // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe.
18149 // When the bug is fixed, we can `measure()` unconditionally if we want to.
18150 var timeStamp = performanceNow();
18151 if (timeStamp - lastMarkTimeStamp > 0.1) {
18152 var measurementName = displayName + ' [' + markType + ']';
18153 performance.measure(measurementName, markName);
18154 }
18155
18156 performance.clearMarks(markName);
18157 if (measurementName) {
18158 performance.clearMeasures(measurementName);
18159 }
18160}
18161
18162var ReactDebugTool = {
18163 addHook: function (hook) {
18164 hooks.push(hook);
18165 },
18166 removeHook: function (hook) {
18167 for (var i = 0; i < hooks.length; i++) {
18168 if (hooks[i] === hook) {
18169 hooks.splice(i, 1);
18170 i--;
18171 }
18172 }
18173 },
18174 isProfiling: function () {
18175 return isProfiling;
18176 },
18177 beginProfiling: function () {
18178 if (isProfiling) {
18179 return;
18180 }
18181
18182 isProfiling = true;
18183 flushHistory.length = 0;
18184 resetMeasurements();
18185 ReactDebugTool.addHook(ReactHostOperationHistoryHook);
18186 },
18187 endProfiling: function () {
18188 if (!isProfiling) {
18189 return;
18190 }
18191
18192 isProfiling = false;
18193 resetMeasurements();
18194 ReactDebugTool.removeHook(ReactHostOperationHistoryHook);
18195 },
18196 getFlushHistory: function () {
18197 return flushHistory;
18198 },
18199 onBeginFlush: function () {
18200 currentFlushNesting++;
18201 resetMeasurements();
18202 pauseCurrentLifeCycleTimer();
18203 emitEvent('onBeginFlush');
18204 },
18205 onEndFlush: function () {
18206 resetMeasurements();
18207 currentFlushNesting--;
18208 resumeCurrentLifeCycleTimer();
18209 emitEvent('onEndFlush');
18210 },
18211 onBeginLifeCycleTimer: function (debugID, timerType) {
18212 checkDebugID(debugID);
18213 emitEvent('onBeginLifeCycleTimer', debugID, timerType);
18214 markBegin(debugID, timerType);
18215 beginLifeCycleTimer(debugID, timerType);
18216 },
18217 onEndLifeCycleTimer: function (debugID, timerType) {
18218 checkDebugID(debugID);
18219 endLifeCycleTimer(debugID, timerType);
18220 markEnd(debugID, timerType);
18221 emitEvent('onEndLifeCycleTimer', debugID, timerType);
18222 },
18223 onBeginProcessingChildContext: function () {
18224 emitEvent('onBeginProcessingChildContext');
18225 },
18226 onEndProcessingChildContext: function () {
18227 emitEvent('onEndProcessingChildContext');
18228 },
18229 onHostOperation: function (operation) {
18230 checkDebugID(operation.instanceID);
18231 emitEvent('onHostOperation', operation);
18232 },
18233 onSetState: function () {
18234 emitEvent('onSetState');
18235 },
18236 onSetChildren: function (debugID, childDebugIDs) {
18237 checkDebugID(debugID);
18238 childDebugIDs.forEach(checkDebugID);
18239 emitEvent('onSetChildren', debugID, childDebugIDs);
18240 },
18241 onBeforeMountComponent: function (debugID, element, parentDebugID) {
18242 checkDebugID(debugID);
18243 checkDebugID(parentDebugID, true);
18244 emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
18245 markBegin(debugID, 'mount');
18246 },
18247 onMountComponent: function (debugID) {
18248 checkDebugID(debugID);
18249 markEnd(debugID, 'mount');
18250 emitEvent('onMountComponent', debugID);
18251 },
18252 onBeforeUpdateComponent: function (debugID, element) {
18253 checkDebugID(debugID);
18254 emitEvent('onBeforeUpdateComponent', debugID, element);
18255 markBegin(debugID, 'update');
18256 },
18257 onUpdateComponent: function (debugID) {
18258 checkDebugID(debugID);
18259 markEnd(debugID, 'update');
18260 emitEvent('onUpdateComponent', debugID);
18261 },
18262 onBeforeUnmountComponent: function (debugID) {
18263 checkDebugID(debugID);
18264 emitEvent('onBeforeUnmountComponent', debugID);
18265 markBegin(debugID, 'unmount');
18266 },
18267 onUnmountComponent: function (debugID) {
18268 checkDebugID(debugID);
18269 markEnd(debugID, 'unmount');
18270 emitEvent('onUnmountComponent', debugID);
18271 },
18272 onTestEvent: function () {
18273 emitEvent('onTestEvent');
18274 }
18275};
18276
18277// TODO remove these when RN/www gets updated
18278ReactDebugTool.addDevtool = ReactDebugTool.addHook;
18279ReactDebugTool.removeDevtool = ReactDebugTool.removeHook;
18280
18281ReactDebugTool.addHook(ReactInvalidSetStateWarningHook);
18282ReactDebugTool.addHook(ReactComponentTreeHook);
18283var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
18284if (/[?&]react_perf\b/.test(url)) {
18285 ReactDebugTool.beginProfiling();
18286}
18287
18288module.exports = ReactDebugTool;
18289
18290/***/ }),
18291/* 146 */
18292/***/ (function(module, exports, __webpack_require__) {
18293
18294"use strict";
18295/**
18296 * Copyright (c) 2013-present, Facebook, Inc.
18297 *
18298 * This source code is licensed under the MIT license found in the
18299 * LICENSE file in the root directory of this source tree.
18300 *
18301 */
18302
18303
18304
18305var ARIADOMPropertyConfig = __webpack_require__(121);
18306var BeforeInputEventPlugin = __webpack_require__(123);
18307var ChangeEventPlugin = __webpack_require__(125);
18308var DefaultEventPluginOrder = __webpack_require__(127);
18309var EnterLeaveEventPlugin = __webpack_require__(128);
18310var HTMLDOMPropertyConfig = __webpack_require__(130);
18311var ReactComponentBrowserEnvironment = __webpack_require__(132);
18312var ReactDOMComponent = __webpack_require__(134);
18313var ReactDOMComponentTree = __webpack_require__(4);
18314var ReactDOMEmptyComponent = __webpack_require__(136);
18315var ReactDOMTreeTraversal = __webpack_require__(144);
18316var ReactDOMTextComponent = __webpack_require__(142);
18317var ReactDefaultBatchingStrategy = __webpack_require__(58);
18318var ReactEventListener = __webpack_require__(149);
18319var ReactInjection = __webpack_require__(152);
18320var ReactReconcileTransaction = __webpack_require__(159);
18321var SVGDOMPropertyConfig = __webpack_require__(165);
18322var SelectEventPlugin = __webpack_require__(166);
18323var SimpleEventPlugin = __webpack_require__(167);
18324
18325var alreadyInjected = false;
18326
18327function inject() {
18328 if (alreadyInjected) {
18329 // TODO: This is currently true because these injections are shared between
18330 // the client and the server package. They should be built independently
18331 // and not share any injection state. Then this problem will be solved.
18332 return;
18333 }
18334 alreadyInjected = true;
18335
18336 ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);
18337
18338 /**
18339 * Inject modules for resolving DOM hierarchy and plugin ordering.
18340 */
18341 ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);
18342 ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree);
18343 ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal);
18344
18345 /**
18346 * Some important event plugins included by default (without having to require
18347 * them).
18348 */
18349 ReactInjection.EventPluginHub.injectEventPluginsByName({
18350 SimpleEventPlugin: SimpleEventPlugin,
18351 EnterLeaveEventPlugin: EnterLeaveEventPlugin,
18352 ChangeEventPlugin: ChangeEventPlugin,
18353 SelectEventPlugin: SelectEventPlugin,
18354 BeforeInputEventPlugin: BeforeInputEventPlugin
18355 });
18356
18357 ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent);
18358
18359 ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent);
18360
18361 ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig);
18362 ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
18363 ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);
18364
18365 ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) {
18366 return new ReactDOMEmptyComponent(instantiate);
18367 });
18368
18369 ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction);
18370 ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);
18371
18372 ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);
18373}
18374
18375module.exports = {
18376 inject: inject
18377};
18378
18379/***/ }),
18380/* 147 */
18381/***/ (function(module, exports, __webpack_require__) {
18382
18383"use strict";
18384/**
18385 * Copyright (c) 2014-present, Facebook, Inc.
18386 *
18387 * This source code is licensed under the MIT license found in the
18388 * LICENSE file in the root directory of this source tree.
18389 *
18390 *
18391 */
18392
18393
18394
18395// The Symbol used to tag the ReactElement type. If there is no native Symbol
18396// nor polyfill, then a plain number is used for performance.
18397
18398var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
18399
18400module.exports = REACT_ELEMENT_TYPE;
18401
18402/***/ }),
18403/* 148 */
18404/***/ (function(module, exports, __webpack_require__) {
18405
18406"use strict";
18407/**
18408 * Copyright (c) 2013-present, Facebook, Inc.
18409 *
18410 * This source code is licensed under the MIT license found in the
18411 * LICENSE file in the root directory of this source tree.
18412 *
18413 */
18414
18415
18416
18417var EventPluginHub = __webpack_require__(17);
18418
18419function runEventQueueInBatch(events) {
18420 EventPluginHub.enqueueEvents(events);
18421 EventPluginHub.processEventQueue(false);
18422}
18423
18424var ReactEventEmitterMixin = {
18425 /**
18426 * Streams a fired top-level event to `EventPluginHub` where plugins have the
18427 * opportunity to create `ReactEvent`s to be dispatched.
18428 */
18429 handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
18430 var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
18431 runEventQueueInBatch(events);
18432 }
18433};
18434
18435module.exports = ReactEventEmitterMixin;
18436
18437/***/ }),
18438/* 149 */
18439/***/ (function(module, exports, __webpack_require__) {
18440
18441"use strict";
18442/**
18443 * Copyright (c) 2013-present, Facebook, Inc.
18444 *
18445 * This source code is licensed under the MIT license found in the
18446 * LICENSE file in the root directory of this source tree.
18447 *
18448 */
18449
18450
18451
18452var _assign = __webpack_require__(3);
18453
18454var EventListener = __webpack_require__(48);
18455var ExecutionEnvironment = __webpack_require__(5);
18456var PooledClass = __webpack_require__(12);
18457var ReactDOMComponentTree = __webpack_require__(4);
18458var ReactUpdates = __webpack_require__(9);
18459
18460var getEventTarget = __webpack_require__(41);
18461var getUnboundedScrollPosition = __webpack_require__(111);
18462
18463/**
18464 * Find the deepest React component completely containing the root of the
18465 * passed-in instance (for use when entire React trees are nested within each
18466 * other). If React trees are not nested, returns null.
18467 */
18468function findParent(inst) {
18469 // TODO: It may be a good idea to cache this to prevent unnecessary DOM
18470 // traversal, but caching is difficult to do correctly without using a
18471 // mutation observer to listen for all DOM changes.
18472 while (inst._hostParent) {
18473 inst = inst._hostParent;
18474 }
18475 var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst);
18476 var container = rootNode.parentNode;
18477 return ReactDOMComponentTree.getClosestInstanceFromNode(container);
18478}
18479
18480// Used to store ancestor hierarchy in top level callback
18481function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {
18482 this.topLevelType = topLevelType;
18483 this.nativeEvent = nativeEvent;
18484 this.ancestors = [];
18485}
18486_assign(TopLevelCallbackBookKeeping.prototype, {
18487 destructor: function () {
18488 this.topLevelType = null;
18489 this.nativeEvent = null;
18490 this.ancestors.length = 0;
18491 }
18492});
18493PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);
18494
18495function handleTopLevelImpl(bookKeeping) {
18496 var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent);
18497 var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget);
18498
18499 // Loop through the hierarchy, in case there's any nested components.
18500 // It's important that we build the array of ancestors before calling any
18501 // event handlers, because event handlers can modify the DOM, leading to
18502 // inconsistencies with ReactMount's node cache. See #1105.
18503 var ancestor = targetInst;
18504 do {
18505 bookKeeping.ancestors.push(ancestor);
18506 ancestor = ancestor && findParent(ancestor);
18507 } while (ancestor);
18508
18509 for (var i = 0; i < bookKeeping.ancestors.length; i++) {
18510 targetInst = bookKeeping.ancestors[i];
18511 ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
18512 }
18513}
18514
18515function scrollValueMonitor(cb) {
18516 var scrollPosition = getUnboundedScrollPosition(window);
18517 cb(scrollPosition);
18518}
18519
18520var ReactEventListener = {
18521 _enabled: true,
18522 _handleTopLevel: null,
18523
18524 WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,
18525
18526 setHandleTopLevel: function (handleTopLevel) {
18527 ReactEventListener._handleTopLevel = handleTopLevel;
18528 },
18529
18530 setEnabled: function (enabled) {
18531 ReactEventListener._enabled = !!enabled;
18532 },
18533
18534 isEnabled: function () {
18535 return ReactEventListener._enabled;
18536 },
18537
18538 /**
18539 * Traps top-level events by using event bubbling.
18540 *
18541 * @param {string} topLevelType Record from `EventConstants`.
18542 * @param {string} handlerBaseName Event name (e.g. "click").
18543 * @param {object} element Element on which to attach listener.
18544 * @return {?object} An object with a remove function which will forcefully
18545 * remove the listener.
18546 * @internal
18547 */
18548 trapBubbledEvent: function (topLevelType, handlerBaseName, element) {
18549 if (!element) {
18550 return null;
18551 }
18552 return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
18553 },
18554
18555 /**
18556 * Traps a top-level event by using event capturing.
18557 *
18558 * @param {string} topLevelType Record from `EventConstants`.
18559 * @param {string} handlerBaseName Event name (e.g. "click").
18560 * @param {object} element Element on which to attach listener.
18561 * @return {?object} An object with a remove function which will forcefully
18562 * remove the listener.
18563 * @internal
18564 */
18565 trapCapturedEvent: function (topLevelType, handlerBaseName, element) {
18566 if (!element) {
18567 return null;
18568 }
18569 return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
18570 },
18571
18572 monitorScrollValue: function (refresh) {
18573 var callback = scrollValueMonitor.bind(null, refresh);
18574 EventListener.listen(window, 'scroll', callback);
18575 },
18576
18577 dispatchEvent: function (topLevelType, nativeEvent) {
18578 if (!ReactEventListener._enabled) {
18579 return;
18580 }
18581
18582 var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent);
18583 try {
18584 // Event queue being processed in the same cycle allows
18585 // `preventDefault`.
18586 ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);
18587 } finally {
18588 TopLevelCallbackBookKeeping.release(bookKeeping);
18589 }
18590 }
18591};
18592
18593module.exports = ReactEventListener;
18594
18595/***/ }),
18596/* 150 */
18597/***/ (function(module, exports, __webpack_require__) {
18598
18599"use strict";
18600/**
18601 * Copyright (c) 2013-present, Facebook, Inc.
18602 *
18603 * This source code is licensed under the MIT license found in the
18604 * LICENSE file in the root directory of this source tree.
18605 *
18606 *
18607 */
18608
18609
18610
18611var ReactFeatureFlags = {
18612 // When true, call console.time() before and .timeEnd() after each top-level
18613 // render (both initial renders and updates). Useful when looking at prod-mode
18614 // timeline profiles in Chrome, for example.
18615 logTopLevelRenders: false
18616};
18617
18618module.exports = ReactFeatureFlags;
18619
18620/***/ }),
18621/* 151 */
18622/***/ (function(module, exports, __webpack_require__) {
18623
18624"use strict";
18625/**
18626 * Copyright (c) 2016-present, Facebook, Inc.
18627 *
18628 * This source code is licensed under the MIT license found in the
18629 * LICENSE file in the root directory of this source tree.
18630 *
18631 *
18632 */
18633
18634
18635
18636var history = [];
18637
18638var ReactHostOperationHistoryHook = {
18639 onHostOperation: function (operation) {
18640 history.push(operation);
18641 },
18642 clearHistory: function () {
18643 if (ReactHostOperationHistoryHook._preventClearing) {
18644 // Should only be used for tests.
18645 return;
18646 }
18647
18648 history = [];
18649 },
18650 getHistory: function () {
18651 return history;
18652 }
18653};
18654
18655module.exports = ReactHostOperationHistoryHook;
18656
18657/***/ }),
18658/* 152 */
18659/***/ (function(module, exports, __webpack_require__) {
18660
18661"use strict";
18662/**
18663 * Copyright (c) 2013-present, Facebook, Inc.
18664 *
18665 * This source code is licensed under the MIT license found in the
18666 * LICENSE file in the root directory of this source tree.
18667 *
18668 */
18669
18670
18671
18672var DOMProperty = __webpack_require__(16);
18673var EventPluginHub = __webpack_require__(17);
18674var EventPluginUtils = __webpack_require__(31);
18675var ReactComponentEnvironment = __webpack_require__(35);
18676var ReactEmptyComponent = __webpack_require__(59);
18677var ReactBrowserEventEmitter = __webpack_require__(34);
18678var ReactHostComponent = __webpack_require__(60);
18679var ReactUpdates = __webpack_require__(9);
18680
18681var ReactInjection = {
18682 Component: ReactComponentEnvironment.injection,
18683 DOMProperty: DOMProperty.injection,
18684 EmptyComponent: ReactEmptyComponent.injection,
18685 EventPluginHub: EventPluginHub.injection,
18686 EventPluginUtils: EventPluginUtils.injection,
18687 EventEmitter: ReactBrowserEventEmitter.injection,
18688 HostComponent: ReactHostComponent.injection,
18689 Updates: ReactUpdates.injection
18690};
18691
18692module.exports = ReactInjection;
18693
18694/***/ }),
18695/* 153 */
18696/***/ (function(module, exports, __webpack_require__) {
18697
18698"use strict";
18699/**
18700 * Copyright (c) 2016-present, Facebook, Inc.
18701 *
18702 * This source code is licensed under the MIT license found in the
18703 * LICENSE file in the root directory of this source tree.
18704 *
18705 *
18706 */
18707
18708
18709
18710var warning = __webpack_require__(1);
18711
18712if (process.env.NODE_ENV !== 'production') {
18713 var processingChildContext = false;
18714
18715 var warnInvalidSetState = function () {
18716 process.env.NODE_ENV !== 'production' ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0;
18717 };
18718}
18719
18720var ReactInvalidSetStateWarningHook = {
18721 onBeginProcessingChildContext: function () {
18722 processingChildContext = true;
18723 },
18724 onEndProcessingChildContext: function () {
18725 processingChildContext = false;
18726 },
18727 onSetState: function () {
18728 warnInvalidSetState();
18729 }
18730};
18731
18732module.exports = ReactInvalidSetStateWarningHook;
18733
18734/***/ }),
18735/* 154 */
18736/***/ (function(module, exports, __webpack_require__) {
18737
18738"use strict";
18739/**
18740 * Copyright (c) 2013-present, Facebook, Inc.
18741 *
18742 * This source code is licensed under the MIT license found in the
18743 * LICENSE file in the root directory of this source tree.
18744 *
18745 */
18746
18747
18748
18749var adler32 = __webpack_require__(178);
18750
18751var TAG_END = /\/?>/;
18752var COMMENT_START = /^<\!\-\-/;
18753
18754var ReactMarkupChecksum = {
18755 CHECKSUM_ATTR_NAME: 'data-react-checksum',
18756
18757 /**
18758 * @param {string} markup Markup string
18759 * @return {string} Markup string with checksum attribute attached
18760 */
18761 addChecksumToMarkup: function (markup) {
18762 var checksum = adler32(markup);
18763
18764 // Add checksum (handle both parent tags, comments and self-closing tags)
18765 if (COMMENT_START.test(markup)) {
18766 return markup;
18767 } else {
18768 return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&');
18769 }
18770 },
18771
18772 /**
18773 * @param {string} markup to use
18774 * @param {DOMElement} element root React element
18775 * @returns {boolean} whether or not the markup is the same
18776 */
18777 canReuseMarkup: function (markup, element) {
18778 var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
18779 existingChecksum = existingChecksum && parseInt(existingChecksum, 10);
18780 var markupChecksum = adler32(markup);
18781 return markupChecksum === existingChecksum;
18782 }
18783};
18784
18785module.exports = ReactMarkupChecksum;
18786
18787/***/ }),
18788/* 155 */
18789/***/ (function(module, exports, __webpack_require__) {
18790
18791"use strict";
18792/**
18793 * Copyright (c) 2013-present, Facebook, Inc.
18794 *
18795 * This source code is licensed under the MIT license found in the
18796 * LICENSE file in the root directory of this source tree.
18797 *
18798 */
18799
18800
18801
18802var _prodInvariant = __webpack_require__(2);
18803
18804var ReactComponentEnvironment = __webpack_require__(35);
18805var ReactInstanceMap = __webpack_require__(37);
18806var ReactInstrumentation = __webpack_require__(6);
18807
18808var ReactCurrentOwner = __webpack_require__(11);
18809var ReactReconciler = __webpack_require__(19);
18810var ReactChildReconciler = __webpack_require__(131);
18811
18812var emptyFunction = __webpack_require__(7);
18813var flattenChildren = __webpack_require__(181);
18814var invariant = __webpack_require__(0);
18815
18816/**
18817 * Make an update for markup to be rendered and inserted at a supplied index.
18818 *
18819 * @param {string} markup Markup that renders into an element.
18820 * @param {number} toIndex Destination index.
18821 * @private
18822 */
18823function makeInsertMarkup(markup, afterNode, toIndex) {
18824 // NOTE: Null values reduce hidden classes.
18825 return {
18826 type: 'INSERT_MARKUP',
18827 content: markup,
18828 fromIndex: null,
18829 fromNode: null,
18830 toIndex: toIndex,
18831 afterNode: afterNode
18832 };
18833}
18834
18835/**
18836 * Make an update for moving an existing element to another index.
18837 *
18838 * @param {number} fromIndex Source index of the existing element.
18839 * @param {number} toIndex Destination index of the element.
18840 * @private
18841 */
18842function makeMove(child, afterNode, toIndex) {
18843 // NOTE: Null values reduce hidden classes.
18844 return {
18845 type: 'MOVE_EXISTING',
18846 content: null,
18847 fromIndex: child._mountIndex,
18848 fromNode: ReactReconciler.getHostNode(child),
18849 toIndex: toIndex,
18850 afterNode: afterNode
18851 };
18852}
18853
18854/**
18855 * Make an update for removing an element at an index.
18856 *
18857 * @param {number} fromIndex Index of the element to remove.
18858 * @private
18859 */
18860function makeRemove(child, node) {
18861 // NOTE: Null values reduce hidden classes.
18862 return {
18863 type: 'REMOVE_NODE',
18864 content: null,
18865 fromIndex: child._mountIndex,
18866 fromNode: node,
18867 toIndex: null,
18868 afterNode: null
18869 };
18870}
18871
18872/**
18873 * Make an update for setting the markup of a node.
18874 *
18875 * @param {string} markup Markup that renders into an element.
18876 * @private
18877 */
18878function makeSetMarkup(markup) {
18879 // NOTE: Null values reduce hidden classes.
18880 return {
18881 type: 'SET_MARKUP',
18882 content: markup,
18883 fromIndex: null,
18884 fromNode: null,
18885 toIndex: null,
18886 afterNode: null
18887 };
18888}
18889
18890/**
18891 * Make an update for setting the text content.
18892 *
18893 * @param {string} textContent Text content to set.
18894 * @private
18895 */
18896function makeTextContent(textContent) {
18897 // NOTE: Null values reduce hidden classes.
18898 return {
18899 type: 'TEXT_CONTENT',
18900 content: textContent,
18901 fromIndex: null,
18902 fromNode: null,
18903 toIndex: null,
18904 afterNode: null
18905 };
18906}
18907
18908/**
18909 * Push an update, if any, onto the queue. Creates a new queue if none is
18910 * passed and always returns the queue. Mutative.
18911 */
18912function enqueue(queue, update) {
18913 if (update) {
18914 queue = queue || [];
18915 queue.push(update);
18916 }
18917 return queue;
18918}
18919
18920/**
18921 * Processes any enqueued updates.
18922 *
18923 * @private
18924 */
18925function processQueue(inst, updateQueue) {
18926 ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue);
18927}
18928
18929var setChildrenForInstrumentation = emptyFunction;
18930if (process.env.NODE_ENV !== 'production') {
18931 var getDebugID = function (inst) {
18932 if (!inst._debugID) {
18933 // Check for ART-like instances. TODO: This is silly/gross.
18934 var internal;
18935 if (internal = ReactInstanceMap.get(inst)) {
18936 inst = internal;
18937 }
18938 }
18939 return inst._debugID;
18940 };
18941 setChildrenForInstrumentation = function (children) {
18942 var debugID = getDebugID(this);
18943 // TODO: React Native empty components are also multichild.
18944 // This means they still get into this method but don't have _debugID.
18945 if (debugID !== 0) {
18946 ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) {
18947 return children[key]._debugID;
18948 }) : []);
18949 }
18950 };
18951}
18952
18953/**
18954 * ReactMultiChild are capable of reconciling multiple children.
18955 *
18956 * @class ReactMultiChild
18957 * @internal
18958 */
18959var ReactMultiChild = {
18960 /**
18961 * Provides common functionality for components that must reconcile multiple
18962 * children. This is used by `ReactDOMComponent` to mount, update, and
18963 * unmount child components.
18964 *
18965 * @lends {ReactMultiChild.prototype}
18966 */
18967 Mixin: {
18968 _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) {
18969 if (process.env.NODE_ENV !== 'production') {
18970 var selfDebugID = getDebugID(this);
18971 if (this._currentElement) {
18972 try {
18973 ReactCurrentOwner.current = this._currentElement._owner;
18974 return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID);
18975 } finally {
18976 ReactCurrentOwner.current = null;
18977 }
18978 }
18979 }
18980 return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);
18981 },
18982
18983 _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) {
18984 var nextChildren;
18985 var selfDebugID = 0;
18986 if (process.env.NODE_ENV !== 'production') {
18987 selfDebugID = getDebugID(this);
18988 if (this._currentElement) {
18989 try {
18990 ReactCurrentOwner.current = this._currentElement._owner;
18991 nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
18992 } finally {
18993 ReactCurrentOwner.current = null;
18994 }
18995 ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
18996 return nextChildren;
18997 }
18998 }
18999 nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
19000 ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
19001 return nextChildren;
19002 },
19003
19004 /**
19005 * Generates a "mount image" for each of the supplied children. In the case
19006 * of `ReactDOMComponent`, a mount image is a string of markup.
19007 *
19008 * @param {?object} nestedChildren Nested child maps.
19009 * @return {array} An array of mounted representations.
19010 * @internal
19011 */
19012 mountChildren: function (nestedChildren, transaction, context) {
19013 var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context);
19014 this._renderedChildren = children;
19015
19016 var mountImages = [];
19017 var index = 0;
19018 for (var name in children) {
19019 if (children.hasOwnProperty(name)) {
19020 var child = children[name];
19021 var selfDebugID = 0;
19022 if (process.env.NODE_ENV !== 'production') {
19023 selfDebugID = getDebugID(this);
19024 }
19025 var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);
19026 child._mountIndex = index++;
19027 mountImages.push(mountImage);
19028 }
19029 }
19030
19031 if (process.env.NODE_ENV !== 'production') {
19032 setChildrenForInstrumentation.call(this, children);
19033 }
19034
19035 return mountImages;
19036 },
19037
19038 /**
19039 * Replaces any rendered children with a text content string.
19040 *
19041 * @param {string} nextContent String of content.
19042 * @internal
19043 */
19044 updateTextContent: function (nextContent) {
19045 var prevChildren = this._renderedChildren;
19046 // Remove any rendered children.
19047 ReactChildReconciler.unmountChildren(prevChildren, false);
19048 for (var name in prevChildren) {
19049 if (prevChildren.hasOwnProperty(name)) {
19050 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
19051 }
19052 }
19053 // Set new text content.
19054 var updates = [makeTextContent(nextContent)];
19055 processQueue(this, updates);
19056 },
19057
19058 /**
19059 * Replaces any rendered children with a markup string.
19060 *
19061 * @param {string} nextMarkup String of markup.
19062 * @internal
19063 */
19064 updateMarkup: function (nextMarkup) {
19065 var prevChildren = this._renderedChildren;
19066 // Remove any rendered children.
19067 ReactChildReconciler.unmountChildren(prevChildren, false);
19068 for (var name in prevChildren) {
19069 if (prevChildren.hasOwnProperty(name)) {
19070 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
19071 }
19072 }
19073 var updates = [makeSetMarkup(nextMarkup)];
19074 processQueue(this, updates);
19075 },
19076
19077 /**
19078 * Updates the rendered children with new children.
19079 *
19080 * @param {?object} nextNestedChildrenElements Nested child element maps.
19081 * @param {ReactReconcileTransaction} transaction
19082 * @internal
19083 */
19084 updateChildren: function (nextNestedChildrenElements, transaction, context) {
19085 // Hook used by React ART
19086 this._updateChildren(nextNestedChildrenElements, transaction, context);
19087 },
19088
19089 /**
19090 * @param {?object} nextNestedChildrenElements Nested child element maps.
19091 * @param {ReactReconcileTransaction} transaction
19092 * @final
19093 * @protected
19094 */
19095 _updateChildren: function (nextNestedChildrenElements, transaction, context) {
19096 var prevChildren = this._renderedChildren;
19097 var removedNodes = {};
19098 var mountImages = [];
19099 var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context);
19100 if (!nextChildren && !prevChildren) {
19101 return;
19102 }
19103 var updates = null;
19104 var name;
19105 // `nextIndex` will increment for each child in `nextChildren`, but
19106 // `lastIndex` will be the last index visited in `prevChildren`.
19107 var nextIndex = 0;
19108 var lastIndex = 0;
19109 // `nextMountIndex` will increment for each newly mounted child.
19110 var nextMountIndex = 0;
19111 var lastPlacedNode = null;
19112 for (name in nextChildren) {
19113 if (!nextChildren.hasOwnProperty(name)) {
19114 continue;
19115 }
19116 var prevChild = prevChildren && prevChildren[name];
19117 var nextChild = nextChildren[name];
19118 if (prevChild === nextChild) {
19119 updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex));
19120 lastIndex = Math.max(prevChild._mountIndex, lastIndex);
19121 prevChild._mountIndex = nextIndex;
19122 } else {
19123 if (prevChild) {
19124 // Update `lastIndex` before `_mountIndex` gets unset by unmounting.
19125 lastIndex = Math.max(prevChild._mountIndex, lastIndex);
19126 // The `removedNodes` loop below will actually remove the child.
19127 }
19128 // The child must be instantiated before it's mounted.
19129 updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context));
19130 nextMountIndex++;
19131 }
19132 nextIndex++;
19133 lastPlacedNode = ReactReconciler.getHostNode(nextChild);
19134 }
19135 // Remove children that are no longer present.
19136 for (name in removedNodes) {
19137 if (removedNodes.hasOwnProperty(name)) {
19138 updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name]));
19139 }
19140 }
19141 if (updates) {
19142 processQueue(this, updates);
19143 }
19144 this._renderedChildren = nextChildren;
19145
19146 if (process.env.NODE_ENV !== 'production') {
19147 setChildrenForInstrumentation.call(this, nextChildren);
19148 }
19149 },
19150
19151 /**
19152 * Unmounts all rendered children. This should be used to clean up children
19153 * when this component is unmounted. It does not actually perform any
19154 * backend operations.
19155 *
19156 * @internal
19157 */
19158 unmountChildren: function (safely) {
19159 var renderedChildren = this._renderedChildren;
19160 ReactChildReconciler.unmountChildren(renderedChildren, safely);
19161 this._renderedChildren = null;
19162 },
19163
19164 /**
19165 * Moves a child component to the supplied index.
19166 *
19167 * @param {ReactComponent} child Component to move.
19168 * @param {number} toIndex Destination index of the element.
19169 * @param {number} lastIndex Last index visited of the siblings of `child`.
19170 * @protected
19171 */
19172 moveChild: function (child, afterNode, toIndex, lastIndex) {
19173 // If the index of `child` is less than `lastIndex`, then it needs to
19174 // be moved. Otherwise, we do not need to move it because a child will be
19175 // inserted or moved before `child`.
19176 if (child._mountIndex < lastIndex) {
19177 return makeMove(child, afterNode, toIndex);
19178 }
19179 },
19180
19181 /**
19182 * Creates a child component.
19183 *
19184 * @param {ReactComponent} child Component to create.
19185 * @param {string} mountImage Markup to insert.
19186 * @protected
19187 */
19188 createChild: function (child, afterNode, mountImage) {
19189 return makeInsertMarkup(mountImage, afterNode, child._mountIndex);
19190 },
19191
19192 /**
19193 * Removes a child component.
19194 *
19195 * @param {ReactComponent} child Child to remove.
19196 * @protected
19197 */
19198 removeChild: function (child, node) {
19199 return makeRemove(child, node);
19200 },
19201
19202 /**
19203 * Mounts a child with the supplied name.
19204 *
19205 * NOTE: This is part of `updateChildren` and is here for readability.
19206 *
19207 * @param {ReactComponent} child Component to mount.
19208 * @param {string} name Name of the child.
19209 * @param {number} index Index at which to insert the child.
19210 * @param {ReactReconcileTransaction} transaction
19211 * @private
19212 */
19213 _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) {
19214 child._mountIndex = index;
19215 return this.createChild(child, afterNode, mountImage);
19216 },
19217
19218 /**
19219 * Unmounts a rendered child.
19220 *
19221 * NOTE: This is part of `updateChildren` and is here for readability.
19222 *
19223 * @param {ReactComponent} child Component to unmount.
19224 * @private
19225 */
19226 _unmountChild: function (child, node) {
19227 var update = this.removeChild(child, node);
19228 child._mountIndex = null;
19229 return update;
19230 }
19231 }
19232};
19233
19234module.exports = ReactMultiChild;
19235
19236/***/ }),
19237/* 156 */
19238/***/ (function(module, exports, __webpack_require__) {
19239
19240"use strict";
19241/**
19242 * Copyright (c) 2013-present, Facebook, Inc.
19243 *
19244 * This source code is licensed under the MIT license found in the
19245 * LICENSE file in the root directory of this source tree.
19246 *
19247 *
19248 */
19249
19250
19251
19252var _prodInvariant = __webpack_require__(2);
19253
19254var React = __webpack_require__(21);
19255
19256var invariant = __webpack_require__(0);
19257
19258var ReactNodeTypes = {
19259 HOST: 0,
19260 COMPOSITE: 1,
19261 EMPTY: 2,
19262
19263 getType: function (node) {
19264 if (node === null || node === false) {
19265 return ReactNodeTypes.EMPTY;
19266 } else if (React.isValidElement(node)) {
19267 if (typeof node.type === 'function') {
19268 return ReactNodeTypes.COMPOSITE;
19269 } else {
19270 return ReactNodeTypes.HOST;
19271 }
19272 }
19273 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0;
19274 }
19275};
19276
19277module.exports = ReactNodeTypes;
19278
19279/***/ }),
19280/* 157 */
19281/***/ (function(module, exports, __webpack_require__) {
19282
19283"use strict";
19284/**
19285 * Copyright (c) 2013-present, Facebook, Inc.
19286 *
19287 * This source code is licensed under the MIT license found in the
19288 * LICENSE file in the root directory of this source tree.
19289 *
19290 *
19291 */
19292
19293
19294
19295var _prodInvariant = __webpack_require__(2);
19296
19297var invariant = __webpack_require__(0);
19298
19299/**
19300 * @param {?object} object
19301 * @return {boolean} True if `object` is a valid owner.
19302 * @final
19303 */
19304function isValidOwner(object) {
19305 return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');
19306}
19307
19308/**
19309 * ReactOwners are capable of storing references to owned components.
19310 *
19311 * All components are capable of //being// referenced by owner components, but
19312 * only ReactOwner components are capable of //referencing// owned components.
19313 * The named reference is known as a "ref".
19314 *
19315 * Refs are available when mounted and updated during reconciliation.
19316 *
19317 * var MyComponent = React.createClass({
19318 * render: function() {
19319 * return (
19320 * <div onClick={this.handleClick}>
19321 * <CustomComponent ref="custom" />
19322 * </div>
19323 * );
19324 * },
19325 * handleClick: function() {
19326 * this.refs.custom.handleClick();
19327 * },
19328 * componentDidMount: function() {
19329 * this.refs.custom.initialize();
19330 * }
19331 * });
19332 *
19333 * Refs should rarely be used. When refs are used, they should only be done to
19334 * control data that is not handled by React's data flow.
19335 *
19336 * @class ReactOwner
19337 */
19338var ReactOwner = {
19339 /**
19340 * Adds a component by ref to an owner component.
19341 *
19342 * @param {ReactComponent} component Component to reference.
19343 * @param {string} ref Name by which to refer to the component.
19344 * @param {ReactOwner} owner Component on which to record the ref.
19345 * @final
19346 * @internal
19347 */
19348 addComponentAsRefTo: function (component, ref, owner) {
19349 !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0;
19350 owner.attachRef(ref, component);
19351 },
19352
19353 /**
19354 * Removes a component by ref from an owner component.
19355 *
19356 * @param {ReactComponent} component Component to dereference.
19357 * @param {string} ref Name of the ref to remove.
19358 * @param {ReactOwner} owner Component on which the ref is recorded.
19359 * @final
19360 * @internal
19361 */
19362 removeComponentAsRefFrom: function (component, ref, owner) {
19363 !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0;
19364 var ownerPublicInstance = owner.getPublicInstance();
19365 // Check that `component`'s owner is still alive and that `component` is still the current ref
19366 // because we do not want to detach the ref if another component stole it.
19367 if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) {
19368 owner.detachRef(ref);
19369 }
19370 }
19371};
19372
19373module.exports = ReactOwner;
19374
19375/***/ }),
19376/* 158 */
19377/***/ (function(module, exports, __webpack_require__) {
19378
19379"use strict";
19380/**
19381 * Copyright (c) 2013-present, Facebook, Inc.
19382 *
19383 * This source code is licensed under the MIT license found in the
19384 * LICENSE file in the root directory of this source tree.
19385 *
19386 *
19387 */
19388
19389
19390
19391var ReactPropTypeLocationNames = {};
19392
19393if (process.env.NODE_ENV !== 'production') {
19394 ReactPropTypeLocationNames = {
19395 prop: 'prop',
19396 context: 'context',
19397 childContext: 'child context'
19398 };
19399}
19400
19401module.exports = ReactPropTypeLocationNames;
19402
19403/***/ }),
19404/* 159 */
19405/***/ (function(module, exports, __webpack_require__) {
19406
19407"use strict";
19408/**
19409 * Copyright (c) 2013-present, Facebook, Inc.
19410 *
19411 * This source code is licensed under the MIT license found in the
19412 * LICENSE file in the root directory of this source tree.
19413 *
19414 */
19415
19416
19417
19418var _assign = __webpack_require__(3);
19419
19420var CallbackQueue = __webpack_require__(54);
19421var PooledClass = __webpack_require__(12);
19422var ReactBrowserEventEmitter = __webpack_require__(34);
19423var ReactInputSelection = __webpack_require__(61);
19424var ReactInstrumentation = __webpack_require__(6);
19425var Transaction = __webpack_require__(24);
19426var ReactUpdateQueue = __webpack_require__(64);
19427
19428/**
19429 * Ensures that, when possible, the selection range (currently selected text
19430 * input) is not disturbed by performing the transaction.
19431 */
19432var SELECTION_RESTORATION = {
19433 /**
19434 * @return {Selection} Selection information.
19435 */
19436 initialize: ReactInputSelection.getSelectionInformation,
19437 /**
19438 * @param {Selection} sel Selection information returned from `initialize`.
19439 */
19440 close: ReactInputSelection.restoreSelection
19441};
19442
19443/**
19444 * Suppresses events (blur/focus) that could be inadvertently dispatched due to
19445 * high level DOM manipulations (like temporarily removing a text input from the
19446 * DOM).
19447 */
19448var EVENT_SUPPRESSION = {
19449 /**
19450 * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before
19451 * the reconciliation.
19452 */
19453 initialize: function () {
19454 var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();
19455 ReactBrowserEventEmitter.setEnabled(false);
19456 return currentlyEnabled;
19457 },
19458
19459 /**
19460 * @param {boolean} previouslyEnabled Enabled status of
19461 * `ReactBrowserEventEmitter` before the reconciliation occurred. `close`
19462 * restores the previous value.
19463 */
19464 close: function (previouslyEnabled) {
19465 ReactBrowserEventEmitter.setEnabled(previouslyEnabled);
19466 }
19467};
19468
19469/**
19470 * Provides a queue for collecting `componentDidMount` and
19471 * `componentDidUpdate` callbacks during the transaction.
19472 */
19473var ON_DOM_READY_QUEUEING = {
19474 /**
19475 * Initializes the internal `onDOMReady` queue.
19476 */
19477 initialize: function () {
19478 this.reactMountReady.reset();
19479 },
19480
19481 /**
19482 * After DOM is flushed, invoke all registered `onDOMReady` callbacks.
19483 */
19484 close: function () {
19485 this.reactMountReady.notifyAll();
19486 }
19487};
19488
19489/**
19490 * Executed within the scope of the `Transaction` instance. Consider these as
19491 * being member methods, but with an implied ordering while being isolated from
19492 * each other.
19493 */
19494var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING];
19495
19496if (process.env.NODE_ENV !== 'production') {
19497 TRANSACTION_WRAPPERS.push({
19498 initialize: ReactInstrumentation.debugTool.onBeginFlush,
19499 close: ReactInstrumentation.debugTool.onEndFlush
19500 });
19501}
19502
19503/**
19504 * Currently:
19505 * - The order that these are listed in the transaction is critical:
19506 * - Suppresses events.
19507 * - Restores selection range.
19508 *
19509 * Future:
19510 * - Restore document/overflow scroll positions that were unintentionally
19511 * modified via DOM insertions above the top viewport boundary.
19512 * - Implement/integrate with customized constraint based layout system and keep
19513 * track of which dimensions must be remeasured.
19514 *
19515 * @class ReactReconcileTransaction
19516 */
19517function ReactReconcileTransaction(useCreateElement) {
19518 this.reinitializeTransaction();
19519 // Only server-side rendering really needs this option (see
19520 // `ReactServerRendering`), but server-side uses
19521 // `ReactServerRenderingTransaction` instead. This option is here so that it's
19522 // accessible and defaults to false when `ReactDOMComponent` and
19523 // `ReactDOMTextComponent` checks it in `mountComponent`.`
19524 this.renderToStaticMarkup = false;
19525 this.reactMountReady = CallbackQueue.getPooled(null);
19526 this.useCreateElement = useCreateElement;
19527}
19528
19529var Mixin = {
19530 /**
19531 * @see Transaction
19532 * @abstract
19533 * @final
19534 * @return {array<object>} List of operation wrap procedures.
19535 * TODO: convert to array<TransactionWrapper>
19536 */
19537 getTransactionWrappers: function () {
19538 return TRANSACTION_WRAPPERS;
19539 },
19540
19541 /**
19542 * @return {object} The queue to collect `onDOMReady` callbacks with.
19543 */
19544 getReactMountReady: function () {
19545 return this.reactMountReady;
19546 },
19547
19548 /**
19549 * @return {object} The queue to collect React async events.
19550 */
19551 getUpdateQueue: function () {
19552 return ReactUpdateQueue;
19553 },
19554
19555 /**
19556 * Save current transaction state -- if the return value from this method is
19557 * passed to `rollback`, the transaction will be reset to that state.
19558 */
19559 checkpoint: function () {
19560 // reactMountReady is the our only stateful wrapper
19561 return this.reactMountReady.checkpoint();
19562 },
19563
19564 rollback: function (checkpoint) {
19565 this.reactMountReady.rollback(checkpoint);
19566 },
19567
19568 /**
19569 * `PooledClass` looks for this, and will invoke this before allowing this
19570 * instance to be reused.
19571 */
19572 destructor: function () {
19573 CallbackQueue.release(this.reactMountReady);
19574 this.reactMountReady = null;
19575 }
19576};
19577
19578_assign(ReactReconcileTransaction.prototype, Transaction, Mixin);
19579
19580PooledClass.addPoolingTo(ReactReconcileTransaction);
19581
19582module.exports = ReactReconcileTransaction;
19583
19584/***/ }),
19585/* 160 */
19586/***/ (function(module, exports, __webpack_require__) {
19587
19588"use strict";
19589/**
19590 * Copyright (c) 2013-present, Facebook, Inc.
19591 *
19592 * This source code is licensed under the MIT license found in the
19593 * LICENSE file in the root directory of this source tree.
19594 *
19595 *
19596 */
19597
19598
19599
19600var ReactOwner = __webpack_require__(157);
19601
19602var ReactRef = {};
19603
19604function attachRef(ref, component, owner) {
19605 if (typeof ref === 'function') {
19606 ref(component.getPublicInstance());
19607 } else {
19608 // Legacy ref
19609 ReactOwner.addComponentAsRefTo(component, ref, owner);
19610 }
19611}
19612
19613function detachRef(ref, component, owner) {
19614 if (typeof ref === 'function') {
19615 ref(null);
19616 } else {
19617 // Legacy ref
19618 ReactOwner.removeComponentAsRefFrom(component, ref, owner);
19619 }
19620}
19621
19622ReactRef.attachRefs = function (instance, element) {
19623 if (element === null || typeof element !== 'object') {
19624 return;
19625 }
19626 var ref = element.ref;
19627 if (ref != null) {
19628 attachRef(ref, instance, element._owner);
19629 }
19630};
19631
19632ReactRef.shouldUpdateRefs = function (prevElement, nextElement) {
19633 // If either the owner or a `ref` has changed, make sure the newest owner
19634 // has stored a reference to `this`, and the previous owner (if different)
19635 // has forgotten the reference to `this`. We use the element instead
19636 // of the public this.props because the post processing cannot determine
19637 // a ref. The ref conceptually lives on the element.
19638
19639 // TODO: Should this even be possible? The owner cannot change because
19640 // it's forbidden by shouldUpdateReactComponent. The ref can change
19641 // if you swap the keys of but not the refs. Reconsider where this check
19642 // is made. It probably belongs where the key checking and
19643 // instantiateReactComponent is done.
19644
19645 var prevRef = null;
19646 var prevOwner = null;
19647 if (prevElement !== null && typeof prevElement === 'object') {
19648 prevRef = prevElement.ref;
19649 prevOwner = prevElement._owner;
19650 }
19651
19652 var nextRef = null;
19653 var nextOwner = null;
19654 if (nextElement !== null && typeof nextElement === 'object') {
19655 nextRef = nextElement.ref;
19656 nextOwner = nextElement._owner;
19657 }
19658
19659 return prevRef !== nextRef ||
19660 // If owner changes but we have an unchanged function ref, don't update refs
19661 typeof nextRef === 'string' && nextOwner !== prevOwner;
19662};
19663
19664ReactRef.detachRefs = function (instance, element) {
19665 if (element === null || typeof element !== 'object') {
19666 return;
19667 }
19668 var ref = element.ref;
19669 if (ref != null) {
19670 detachRef(ref, instance, element._owner);
19671 }
19672};
19673
19674module.exports = ReactRef;
19675
19676/***/ }),
19677/* 161 */
19678/***/ (function(module, exports, __webpack_require__) {
19679
19680"use strict";
19681/**
19682 * Copyright (c) 2014-present, Facebook, Inc.
19683 *
19684 * This source code is licensed under the MIT license found in the
19685 * LICENSE file in the root directory of this source tree.
19686 *
19687 */
19688
19689
19690
19691var ReactServerBatchingStrategy = {
19692 isBatchingUpdates: false,
19693 batchedUpdates: function (callback) {
19694 // Don't do anything here. During the server rendering we don't want to
19695 // schedule any updates. We will simply ignore them.
19696 }
19697};
19698
19699module.exports = ReactServerBatchingStrategy;
19700
19701/***/ }),
19702/* 162 */
19703/***/ (function(module, exports, __webpack_require__) {
19704
19705"use strict";
19706/**
19707 * Copyright (c) 2013-present, Facebook, Inc.
19708 *
19709 * This source code is licensed under the MIT license found in the
19710 * LICENSE file in the root directory of this source tree.
19711 *
19712 */
19713
19714
19715var _prodInvariant = __webpack_require__(2);
19716
19717var React = __webpack_require__(21);
19718var ReactDOMContainerInfo = __webpack_require__(135);
19719var ReactDefaultBatchingStrategy = __webpack_require__(58);
19720var ReactInstrumentation = __webpack_require__(6);
19721var ReactMarkupChecksum = __webpack_require__(154);
19722var ReactReconciler = __webpack_require__(19);
19723var ReactServerBatchingStrategy = __webpack_require__(161);
19724var ReactServerRenderingTransaction = __webpack_require__(63);
19725var ReactUpdates = __webpack_require__(9);
19726
19727var emptyObject = __webpack_require__(22);
19728var instantiateReactComponent = __webpack_require__(70);
19729var invariant = __webpack_require__(0);
19730
19731var pendingTransactions = 0;
19732
19733/**
19734 * @param {ReactElement} element
19735 * @return {string} the HTML markup
19736 */
19737function renderToStringImpl(element, makeStaticMarkup) {
19738 var transaction;
19739 try {
19740 ReactUpdates.injection.injectBatchingStrategy(ReactServerBatchingStrategy);
19741
19742 transaction = ReactServerRenderingTransaction.getPooled(makeStaticMarkup);
19743
19744 pendingTransactions++;
19745
19746 return transaction.perform(function () {
19747 var componentInstance = instantiateReactComponent(element, true);
19748 var markup = ReactReconciler.mountComponent(componentInstance, transaction, null, ReactDOMContainerInfo(), emptyObject, 0 /* parentDebugID */
19749 );
19750 if (process.env.NODE_ENV !== 'production') {
19751 ReactInstrumentation.debugTool.onUnmountComponent(componentInstance._debugID);
19752 }
19753 if (!makeStaticMarkup) {
19754 markup = ReactMarkupChecksum.addChecksumToMarkup(markup);
19755 }
19756 return markup;
19757 }, null);
19758 } finally {
19759 pendingTransactions--;
19760 ReactServerRenderingTransaction.release(transaction);
19761 // Revert to the DOM batching strategy since these two renderers
19762 // currently share these stateful modules.
19763 if (!pendingTransactions) {
19764 ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy);
19765 }
19766 }
19767}
19768
19769/**
19770 * Render a ReactElement to its initial HTML. This should only be used on the
19771 * server.
19772 * See https://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostring
19773 */
19774function renderToString(element) {
19775 !React.isValidElement(element) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'renderToString(): You must pass a valid ReactElement.') : _prodInvariant('46') : void 0;
19776 return renderToStringImpl(element, false);
19777}
19778
19779/**
19780 * Similar to renderToString, except this doesn't create extra DOM attributes
19781 * such as data-react-id that React uses internally.
19782 * See https://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostaticmarkup
19783 */
19784function renderToStaticMarkup(element) {
19785 !React.isValidElement(element) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'renderToStaticMarkup(): You must pass a valid ReactElement.') : _prodInvariant('47') : void 0;
19786 return renderToStringImpl(element, true);
19787}
19788
19789module.exports = {
19790 renderToString: renderToString,
19791 renderToStaticMarkup: renderToStaticMarkup
19792};
19793
19794/***/ }),
19795/* 163 */
19796/***/ (function(module, exports, __webpack_require__) {
19797
19798"use strict";
19799/**
19800 * Copyright (c) 2015-present, Facebook, Inc.
19801 *
19802 * This source code is licensed under the MIT license found in the
19803 * LICENSE file in the root directory of this source tree.
19804 *
19805 *
19806 */
19807
19808
19809
19810function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19811
19812var ReactUpdateQueue = __webpack_require__(64);
19813
19814var warning = __webpack_require__(1);
19815
19816function warnNoop(publicInstance, callerName) {
19817 if (process.env.NODE_ENV !== 'production') {
19818 var constructor = publicInstance.constructor;
19819 process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;
19820 }
19821}
19822
19823/**
19824 * This is the update queue used for server rendering.
19825 * It delegates to ReactUpdateQueue while server rendering is in progress and
19826 * switches to ReactNoopUpdateQueue after the transaction has completed.
19827 * @class ReactServerUpdateQueue
19828 * @param {Transaction} transaction
19829 */
19830
19831var ReactServerUpdateQueue = function () {
19832 function ReactServerUpdateQueue(transaction) {
19833 _classCallCheck(this, ReactServerUpdateQueue);
19834
19835 this.transaction = transaction;
19836 }
19837
19838 /**
19839 * Checks whether or not this composite component is mounted.
19840 * @param {ReactClass} publicInstance The instance we want to test.
19841 * @return {boolean} True if mounted, false otherwise.
19842 * @protected
19843 * @final
19844 */
19845
19846
19847 ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) {
19848 return false;
19849 };
19850
19851 /**
19852 * Enqueue a callback that will be executed after all the pending updates
19853 * have processed.
19854 *
19855 * @param {ReactClass} publicInstance The instance to use as `this` context.
19856 * @param {?function} callback Called after state is updated.
19857 * @internal
19858 */
19859
19860
19861 ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) {
19862 if (this.transaction.isInTransaction()) {
19863 ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName);
19864 }
19865 };
19866
19867 /**
19868 * Forces an update. This should only be invoked when it is known with
19869 * certainty that we are **not** in a DOM transaction.
19870 *
19871 * You may want to call this when you know that some deeper aspect of the
19872 * component's state has changed but `setState` was not called.
19873 *
19874 * This will not invoke `shouldComponentUpdate`, but it will invoke
19875 * `componentWillUpdate` and `componentDidUpdate`.
19876 *
19877 * @param {ReactClass} publicInstance The instance that should rerender.
19878 * @internal
19879 */
19880
19881
19882 ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) {
19883 if (this.transaction.isInTransaction()) {
19884 ReactUpdateQueue.enqueueForceUpdate(publicInstance);
19885 } else {
19886 warnNoop(publicInstance, 'forceUpdate');
19887 }
19888 };
19889
19890 /**
19891 * Replaces all of the state. Always use this or `setState` to mutate state.
19892 * You should treat `this.state` as immutable.
19893 *
19894 * There is no guarantee that `this.state` will be immediately updated, so
19895 * accessing `this.state` after calling this method may return the old value.
19896 *
19897 * @param {ReactClass} publicInstance The instance that should rerender.
19898 * @param {object|function} completeState Next state.
19899 * @internal
19900 */
19901
19902
19903 ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) {
19904 if (this.transaction.isInTransaction()) {
19905 ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState);
19906 } else {
19907 warnNoop(publicInstance, 'replaceState');
19908 }
19909 };
19910
19911 /**
19912 * Sets a subset of the state. This only exists because _pendingState is
19913 * internal. This provides a merging strategy that is not available to deep
19914 * properties which is confusing. TODO: Expose pendingState or don't use it
19915 * during the merge.
19916 *
19917 * @param {ReactClass} publicInstance The instance that should rerender.
19918 * @param {object|function} partialState Next partial state to be merged with state.
19919 * @internal
19920 */
19921
19922
19923 ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) {
19924 if (this.transaction.isInTransaction()) {
19925 ReactUpdateQueue.enqueueSetState(publicInstance, partialState);
19926 } else {
19927 warnNoop(publicInstance, 'setState');
19928 }
19929 };
19930
19931 return ReactServerUpdateQueue;
19932}();
19933
19934module.exports = ReactServerUpdateQueue;
19935
19936/***/ }),
19937/* 164 */
19938/***/ (function(module, exports, __webpack_require__) {
19939
19940"use strict";
19941/**
19942 * Copyright (c) 2013-present, Facebook, Inc.
19943 *
19944 * This source code is licensed under the MIT license found in the
19945 * LICENSE file in the root directory of this source tree.
19946 *
19947 */
19948
19949
19950
19951module.exports = '15.6.2';
19952
19953/***/ }),
19954/* 165 */
19955/***/ (function(module, exports, __webpack_require__) {
19956
19957"use strict";
19958/**
19959 * Copyright (c) 2013-present, Facebook, Inc.
19960 *
19961 * This source code is licensed under the MIT license found in the
19962 * LICENSE file in the root directory of this source tree.
19963 *
19964 */
19965
19966
19967
19968var NS = {
19969 xlink: 'http://www.w3.org/1999/xlink',
19970 xml: 'http://www.w3.org/XML/1998/namespace'
19971};
19972
19973// We use attributes for everything SVG so let's avoid some duplication and run
19974// code instead.
19975// The following are all specified in the HTML config already so we exclude here.
19976// - class (as className)
19977// - color
19978// - height
19979// - id
19980// - lang
19981// - max
19982// - media
19983// - method
19984// - min
19985// - name
19986// - style
19987// - target
19988// - type
19989// - width
19990var ATTRS = {
19991 accentHeight: 'accent-height',
19992 accumulate: 0,
19993 additive: 0,
19994 alignmentBaseline: 'alignment-baseline',
19995 allowReorder: 'allowReorder',
19996 alphabetic: 0,
19997 amplitude: 0,
19998 arabicForm: 'arabic-form',
19999 ascent: 0,
20000 attributeName: 'attributeName',
20001 attributeType: 'attributeType',
20002 autoReverse: 'autoReverse',
20003 azimuth: 0,
20004 baseFrequency: 'baseFrequency',
20005 baseProfile: 'baseProfile',
20006 baselineShift: 'baseline-shift',
20007 bbox: 0,
20008 begin: 0,
20009 bias: 0,
20010 by: 0,
20011 calcMode: 'calcMode',
20012 capHeight: 'cap-height',
20013 clip: 0,
20014 clipPath: 'clip-path',
20015 clipRule: 'clip-rule',
20016 clipPathUnits: 'clipPathUnits',
20017 colorInterpolation: 'color-interpolation',
20018 colorInterpolationFilters: 'color-interpolation-filters',
20019 colorProfile: 'color-profile',
20020 colorRendering: 'color-rendering',
20021 contentScriptType: 'contentScriptType',
20022 contentStyleType: 'contentStyleType',
20023 cursor: 0,
20024 cx: 0,
20025 cy: 0,
20026 d: 0,
20027 decelerate: 0,
20028 descent: 0,
20029 diffuseConstant: 'diffuseConstant',
20030 direction: 0,
20031 display: 0,
20032 divisor: 0,
20033 dominantBaseline: 'dominant-baseline',
20034 dur: 0,
20035 dx: 0,
20036 dy: 0,
20037 edgeMode: 'edgeMode',
20038 elevation: 0,
20039 enableBackground: 'enable-background',
20040 end: 0,
20041 exponent: 0,
20042 externalResourcesRequired: 'externalResourcesRequired',
20043 fill: 0,
20044 fillOpacity: 'fill-opacity',
20045 fillRule: 'fill-rule',
20046 filter: 0,
20047 filterRes: 'filterRes',
20048 filterUnits: 'filterUnits',
20049 floodColor: 'flood-color',
20050 floodOpacity: 'flood-opacity',
20051 focusable: 0,
20052 fontFamily: 'font-family',
20053 fontSize: 'font-size',
20054 fontSizeAdjust: 'font-size-adjust',
20055 fontStretch: 'font-stretch',
20056 fontStyle: 'font-style',
20057 fontVariant: 'font-variant',
20058 fontWeight: 'font-weight',
20059 format: 0,
20060 from: 0,
20061 fx: 0,
20062 fy: 0,
20063 g1: 0,
20064 g2: 0,
20065 glyphName: 'glyph-name',
20066 glyphOrientationHorizontal: 'glyph-orientation-horizontal',
20067 glyphOrientationVertical: 'glyph-orientation-vertical',
20068 glyphRef: 'glyphRef',
20069 gradientTransform: 'gradientTransform',
20070 gradientUnits: 'gradientUnits',
20071 hanging: 0,
20072 horizAdvX: 'horiz-adv-x',
20073 horizOriginX: 'horiz-origin-x',
20074 ideographic: 0,
20075 imageRendering: 'image-rendering',
20076 'in': 0,
20077 in2: 0,
20078 intercept: 0,
20079 k: 0,
20080 k1: 0,
20081 k2: 0,
20082 k3: 0,
20083 k4: 0,
20084 kernelMatrix: 'kernelMatrix',
20085 kernelUnitLength: 'kernelUnitLength',
20086 kerning: 0,
20087 keyPoints: 'keyPoints',
20088 keySplines: 'keySplines',
20089 keyTimes: 'keyTimes',
20090 lengthAdjust: 'lengthAdjust',
20091 letterSpacing: 'letter-spacing',
20092 lightingColor: 'lighting-color',
20093 limitingConeAngle: 'limitingConeAngle',
20094 local: 0,
20095 markerEnd: 'marker-end',
20096 markerMid: 'marker-mid',
20097 markerStart: 'marker-start',
20098 markerHeight: 'markerHeight',
20099 markerUnits: 'markerUnits',
20100 markerWidth: 'markerWidth',
20101 mask: 0,
20102 maskContentUnits: 'maskContentUnits',
20103 maskUnits: 'maskUnits',
20104 mathematical: 0,
20105 mode: 0,
20106 numOctaves: 'numOctaves',
20107 offset: 0,
20108 opacity: 0,
20109 operator: 0,
20110 order: 0,
20111 orient: 0,
20112 orientation: 0,
20113 origin: 0,
20114 overflow: 0,
20115 overlinePosition: 'overline-position',
20116 overlineThickness: 'overline-thickness',
20117 paintOrder: 'paint-order',
20118 panose1: 'panose-1',
20119 pathLength: 'pathLength',
20120 patternContentUnits: 'patternContentUnits',
20121 patternTransform: 'patternTransform',
20122 patternUnits: 'patternUnits',
20123 pointerEvents: 'pointer-events',
20124 points: 0,
20125 pointsAtX: 'pointsAtX',
20126 pointsAtY: 'pointsAtY',
20127 pointsAtZ: 'pointsAtZ',
20128 preserveAlpha: 'preserveAlpha',
20129 preserveAspectRatio: 'preserveAspectRatio',
20130 primitiveUnits: 'primitiveUnits',
20131 r: 0,
20132 radius: 0,
20133 refX: 'refX',
20134 refY: 'refY',
20135 renderingIntent: 'rendering-intent',
20136 repeatCount: 'repeatCount',
20137 repeatDur: 'repeatDur',
20138 requiredExtensions: 'requiredExtensions',
20139 requiredFeatures: 'requiredFeatures',
20140 restart: 0,
20141 result: 0,
20142 rotate: 0,
20143 rx: 0,
20144 ry: 0,
20145 scale: 0,
20146 seed: 0,
20147 shapeRendering: 'shape-rendering',
20148 slope: 0,
20149 spacing: 0,
20150 specularConstant: 'specularConstant',
20151 specularExponent: 'specularExponent',
20152 speed: 0,
20153 spreadMethod: 'spreadMethod',
20154 startOffset: 'startOffset',
20155 stdDeviation: 'stdDeviation',
20156 stemh: 0,
20157 stemv: 0,
20158 stitchTiles: 'stitchTiles',
20159 stopColor: 'stop-color',
20160 stopOpacity: 'stop-opacity',
20161 strikethroughPosition: 'strikethrough-position',
20162 strikethroughThickness: 'strikethrough-thickness',
20163 string: 0,
20164 stroke: 0,
20165 strokeDasharray: 'stroke-dasharray',
20166 strokeDashoffset: 'stroke-dashoffset',
20167 strokeLinecap: 'stroke-linecap',
20168 strokeLinejoin: 'stroke-linejoin',
20169 strokeMiterlimit: 'stroke-miterlimit',
20170 strokeOpacity: 'stroke-opacity',
20171 strokeWidth: 'stroke-width',
20172 surfaceScale: 'surfaceScale',
20173 systemLanguage: 'systemLanguage',
20174 tableValues: 'tableValues',
20175 targetX: 'targetX',
20176 targetY: 'targetY',
20177 textAnchor: 'text-anchor',
20178 textDecoration: 'text-decoration',
20179 textRendering: 'text-rendering',
20180 textLength: 'textLength',
20181 to: 0,
20182 transform: 0,
20183 u1: 0,
20184 u2: 0,
20185 underlinePosition: 'underline-position',
20186 underlineThickness: 'underline-thickness',
20187 unicode: 0,
20188 unicodeBidi: 'unicode-bidi',
20189 unicodeRange: 'unicode-range',
20190 unitsPerEm: 'units-per-em',
20191 vAlphabetic: 'v-alphabetic',
20192 vHanging: 'v-hanging',
20193 vIdeographic: 'v-ideographic',
20194 vMathematical: 'v-mathematical',
20195 values: 0,
20196 vectorEffect: 'vector-effect',
20197 version: 0,
20198 vertAdvY: 'vert-adv-y',
20199 vertOriginX: 'vert-origin-x',
20200 vertOriginY: 'vert-origin-y',
20201 viewBox: 'viewBox',
20202 viewTarget: 'viewTarget',
20203 visibility: 0,
20204 widths: 0,
20205 wordSpacing: 'word-spacing',
20206 writingMode: 'writing-mode',
20207 x: 0,
20208 xHeight: 'x-height',
20209 x1: 0,
20210 x2: 0,
20211 xChannelSelector: 'xChannelSelector',
20212 xlinkActuate: 'xlink:actuate',
20213 xlinkArcrole: 'xlink:arcrole',
20214 xlinkHref: 'xlink:href',
20215 xlinkRole: 'xlink:role',
20216 xlinkShow: 'xlink:show',
20217 xlinkTitle: 'xlink:title',
20218 xlinkType: 'xlink:type',
20219 xmlBase: 'xml:base',
20220 xmlns: 0,
20221 xmlnsXlink: 'xmlns:xlink',
20222 xmlLang: 'xml:lang',
20223 xmlSpace: 'xml:space',
20224 y: 0,
20225 y1: 0,
20226 y2: 0,
20227 yChannelSelector: 'yChannelSelector',
20228 z: 0,
20229 zoomAndPan: 'zoomAndPan'
20230};
20231
20232var SVGDOMPropertyConfig = {
20233 Properties: {},
20234 DOMAttributeNamespaces: {
20235 xlinkActuate: NS.xlink,
20236 xlinkArcrole: NS.xlink,
20237 xlinkHref: NS.xlink,
20238 xlinkRole: NS.xlink,
20239 xlinkShow: NS.xlink,
20240 xlinkTitle: NS.xlink,
20241 xlinkType: NS.xlink,
20242 xmlBase: NS.xml,
20243 xmlLang: NS.xml,
20244 xmlSpace: NS.xml
20245 },
20246 DOMAttributeNames: {}
20247};
20248
20249Object.keys(ATTRS).forEach(function (key) {
20250 SVGDOMPropertyConfig.Properties[key] = 0;
20251 if (ATTRS[key]) {
20252 SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key];
20253 }
20254});
20255
20256module.exports = SVGDOMPropertyConfig;
20257
20258/***/ }),
20259/* 166 */
20260/***/ (function(module, exports, __webpack_require__) {
20261
20262"use strict";
20263/**
20264 * Copyright (c) 2013-present, Facebook, Inc.
20265 *
20266 * This source code is licensed under the MIT license found in the
20267 * LICENSE file in the root directory of this source tree.
20268 *
20269 */
20270
20271
20272
20273var EventPropagators = __webpack_require__(18);
20274var ExecutionEnvironment = __webpack_require__(5);
20275var ReactDOMComponentTree = __webpack_require__(4);
20276var ReactInputSelection = __webpack_require__(61);
20277var SyntheticEvent = __webpack_require__(10);
20278
20279var getActiveElement = __webpack_require__(50);
20280var isTextInputElement = __webpack_require__(71);
20281var shallowEqual = __webpack_require__(27);
20282
20283var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;
20284
20285var eventTypes = {
20286 select: {
20287 phasedRegistrationNames: {
20288 bubbled: 'onSelect',
20289 captured: 'onSelectCapture'
20290 },
20291 dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange']
20292 }
20293};
20294
20295var activeElement = null;
20296var activeElementInst = null;
20297var lastSelection = null;
20298var mouseDown = false;
20299
20300// Track whether a listener exists for this plugin. If none exist, we do
20301// not extract events. See #3639.
20302var hasListener = false;
20303
20304/**
20305 * Get an object which is a unique representation of the current selection.
20306 *
20307 * The return value will not be consistent across nodes or browsers, but
20308 * two identical selections on the same node will return identical objects.
20309 *
20310 * @param {DOMElement} node
20311 * @return {object}
20312 */
20313function getSelection(node) {
20314 if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) {
20315 return {
20316 start: node.selectionStart,
20317 end: node.selectionEnd
20318 };
20319 } else if (window.getSelection) {
20320 var selection = window.getSelection();
20321 return {
20322 anchorNode: selection.anchorNode,
20323 anchorOffset: selection.anchorOffset,
20324 focusNode: selection.focusNode,
20325 focusOffset: selection.focusOffset
20326 };
20327 } else if (document.selection) {
20328 var range = document.selection.createRange();
20329 return {
20330 parentElement: range.parentElement(),
20331 text: range.text,
20332 top: range.boundingTop,
20333 left: range.boundingLeft
20334 };
20335 }
20336}
20337
20338/**
20339 * Poll selection to see whether it's changed.
20340 *
20341 * @param {object} nativeEvent
20342 * @return {?SyntheticEvent}
20343 */
20344function constructSelectEvent(nativeEvent, nativeEventTarget) {
20345 // Ensure we have the right element, and that the user is not dragging a
20346 // selection (this matches native `select` event behavior). In HTML5, select
20347 // fires only on input and textarea thus if there's no focused element we
20348 // won't dispatch.
20349 if (mouseDown || activeElement == null || activeElement !== getActiveElement()) {
20350 return null;
20351 }
20352
20353 // Only fire when selection has actually changed.
20354 var currentSelection = getSelection(activeElement);
20355 if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
20356 lastSelection = currentSelection;
20357
20358 var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget);
20359
20360 syntheticEvent.type = 'select';
20361 syntheticEvent.target = activeElement;
20362
20363 EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);
20364
20365 return syntheticEvent;
20366 }
20367
20368 return null;
20369}
20370
20371/**
20372 * This plugin creates an `onSelect` event that normalizes select events
20373 * across form elements.
20374 *
20375 * Supported elements are:
20376 * - input (see `isTextInputElement`)
20377 * - textarea
20378 * - contentEditable
20379 *
20380 * This differs from native browser implementations in the following ways:
20381 * - Fires on contentEditable fields as well as inputs.
20382 * - Fires for collapsed selection.
20383 * - Fires after user input.
20384 */
20385var SelectEventPlugin = {
20386 eventTypes: eventTypes,
20387
20388 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
20389 if (!hasListener) {
20390 return null;
20391 }
20392
20393 var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
20394
20395 switch (topLevelType) {
20396 // Track the input node that has focus.
20397 case 'topFocus':
20398 if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
20399 activeElement = targetNode;
20400 activeElementInst = targetInst;
20401 lastSelection = null;
20402 }
20403 break;
20404 case 'topBlur':
20405 activeElement = null;
20406 activeElementInst = null;
20407 lastSelection = null;
20408 break;
20409 // Don't fire the event while the user is dragging. This matches the
20410 // semantics of the native select event.
20411 case 'topMouseDown':
20412 mouseDown = true;
20413 break;
20414 case 'topContextMenu':
20415 case 'topMouseUp':
20416 mouseDown = false;
20417 return constructSelectEvent(nativeEvent, nativeEventTarget);
20418 // Chrome and IE fire non-standard event when selection is changed (and
20419 // sometimes when it hasn't). IE's event fires out of order with respect
20420 // to key and input events on deletion, so we discard it.
20421 //
20422 // Firefox doesn't support selectionchange, so check selection status
20423 // after each key entry. The selection changes after keydown and before
20424 // keyup, but we check on keydown as well in the case of holding down a
20425 // key, when multiple keydown events are fired but only one keyup is.
20426 // This is also our approach for IE handling, for the reason above.
20427 case 'topSelectionChange':
20428 if (skipSelectionChangeEvent) {
20429 break;
20430 }
20431 // falls through
20432 case 'topKeyDown':
20433 case 'topKeyUp':
20434 return constructSelectEvent(nativeEvent, nativeEventTarget);
20435 }
20436
20437 return null;
20438 },
20439
20440 didPutListener: function (inst, registrationName, listener) {
20441 if (registrationName === 'onSelect') {
20442 hasListener = true;
20443 }
20444 }
20445};
20446
20447module.exports = SelectEventPlugin;
20448
20449/***/ }),
20450/* 167 */
20451/***/ (function(module, exports, __webpack_require__) {
20452
20453"use strict";
20454/**
20455 * Copyright (c) 2013-present, Facebook, Inc.
20456 *
20457 * This source code is licensed under the MIT license found in the
20458 * LICENSE file in the root directory of this source tree.
20459 *
20460 *
20461 */
20462
20463
20464
20465var _prodInvariant = __webpack_require__(2);
20466
20467var EventListener = __webpack_require__(48);
20468var EventPropagators = __webpack_require__(18);
20469var ReactDOMComponentTree = __webpack_require__(4);
20470var SyntheticAnimationEvent = __webpack_require__(168);
20471var SyntheticClipboardEvent = __webpack_require__(169);
20472var SyntheticEvent = __webpack_require__(10);
20473var SyntheticFocusEvent = __webpack_require__(172);
20474var SyntheticKeyboardEvent = __webpack_require__(174);
20475var SyntheticMouseEvent = __webpack_require__(23);
20476var SyntheticDragEvent = __webpack_require__(171);
20477var SyntheticTouchEvent = __webpack_require__(175);
20478var SyntheticTransitionEvent = __webpack_require__(176);
20479var SyntheticUIEvent = __webpack_require__(20);
20480var SyntheticWheelEvent = __webpack_require__(177);
20481
20482var emptyFunction = __webpack_require__(7);
20483var getEventCharCode = __webpack_require__(39);
20484var invariant = __webpack_require__(0);
20485
20486/**
20487 * Turns
20488 * ['abort', ...]
20489 * into
20490 * eventTypes = {
20491 * 'abort': {
20492 * phasedRegistrationNames: {
20493 * bubbled: 'onAbort',
20494 * captured: 'onAbortCapture',
20495 * },
20496 * dependencies: ['topAbort'],
20497 * },
20498 * ...
20499 * };
20500 * topLevelEventsToDispatchConfig = {
20501 * 'topAbort': { sameConfig }
20502 * };
20503 */
20504var eventTypes = {};
20505var topLevelEventsToDispatchConfig = {};
20506['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'canPlay', 'canPlayThrough', 'click', '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', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) {
20507 var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
20508 var onEvent = 'on' + capitalizedEvent;
20509 var topEvent = 'top' + capitalizedEvent;
20510
20511 var type = {
20512 phasedRegistrationNames: {
20513 bubbled: onEvent,
20514 captured: onEvent + 'Capture'
20515 },
20516 dependencies: [topEvent]
20517 };
20518 eventTypes[event] = type;
20519 topLevelEventsToDispatchConfig[topEvent] = type;
20520});
20521
20522var onClickListeners = {};
20523
20524function getDictionaryKey(inst) {
20525 // Prevents V8 performance issue:
20526 // https://github.com/facebook/react/pull/7232
20527 return '.' + inst._rootNodeID;
20528}
20529
20530function isInteractive(tag) {
20531 return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
20532}
20533
20534var SimpleEventPlugin = {
20535 eventTypes: eventTypes,
20536
20537 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
20538 var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
20539 if (!dispatchConfig) {
20540 return null;
20541 }
20542 var EventConstructor;
20543 switch (topLevelType) {
20544 case 'topAbort':
20545 case 'topCanPlay':
20546 case 'topCanPlayThrough':
20547 case 'topDurationChange':
20548 case 'topEmptied':
20549 case 'topEncrypted':
20550 case 'topEnded':
20551 case 'topError':
20552 case 'topInput':
20553 case 'topInvalid':
20554 case 'topLoad':
20555 case 'topLoadedData':
20556 case 'topLoadedMetadata':
20557 case 'topLoadStart':
20558 case 'topPause':
20559 case 'topPlay':
20560 case 'topPlaying':
20561 case 'topProgress':
20562 case 'topRateChange':
20563 case 'topReset':
20564 case 'topSeeked':
20565 case 'topSeeking':
20566 case 'topStalled':
20567 case 'topSubmit':
20568 case 'topSuspend':
20569 case 'topTimeUpdate':
20570 case 'topVolumeChange':
20571 case 'topWaiting':
20572 // HTML Events
20573 // @see http://www.w3.org/TR/html5/index.html#events-0
20574 EventConstructor = SyntheticEvent;
20575 break;
20576 case 'topKeyPress':
20577 // Firefox creates a keypress event for function keys too. This removes
20578 // the unwanted keypress events. Enter is however both printable and
20579 // non-printable. One would expect Tab to be as well (but it isn't).
20580 if (getEventCharCode(nativeEvent) === 0) {
20581 return null;
20582 }
20583 /* falls through */
20584 case 'topKeyDown':
20585 case 'topKeyUp':
20586 EventConstructor = SyntheticKeyboardEvent;
20587 break;
20588 case 'topBlur':
20589 case 'topFocus':
20590 EventConstructor = SyntheticFocusEvent;
20591 break;
20592 case 'topClick':
20593 // Firefox creates a click event on right mouse clicks. This removes the
20594 // unwanted click events.
20595 if (nativeEvent.button === 2) {
20596 return null;
20597 }
20598 /* falls through */
20599 case 'topDoubleClick':
20600 case 'topMouseDown':
20601 case 'topMouseMove':
20602 case 'topMouseUp':
20603 // TODO: Disabled elements should not respond to mouse events
20604 /* falls through */
20605 case 'topMouseOut':
20606 case 'topMouseOver':
20607 case 'topContextMenu':
20608 EventConstructor = SyntheticMouseEvent;
20609 break;
20610 case 'topDrag':
20611 case 'topDragEnd':
20612 case 'topDragEnter':
20613 case 'topDragExit':
20614 case 'topDragLeave':
20615 case 'topDragOver':
20616 case 'topDragStart':
20617 case 'topDrop':
20618 EventConstructor = SyntheticDragEvent;
20619 break;
20620 case 'topTouchCancel':
20621 case 'topTouchEnd':
20622 case 'topTouchMove':
20623 case 'topTouchStart':
20624 EventConstructor = SyntheticTouchEvent;
20625 break;
20626 case 'topAnimationEnd':
20627 case 'topAnimationIteration':
20628 case 'topAnimationStart':
20629 EventConstructor = SyntheticAnimationEvent;
20630 break;
20631 case 'topTransitionEnd':
20632 EventConstructor = SyntheticTransitionEvent;
20633 break;
20634 case 'topScroll':
20635 EventConstructor = SyntheticUIEvent;
20636 break;
20637 case 'topWheel':
20638 EventConstructor = SyntheticWheelEvent;
20639 break;
20640 case 'topCopy':
20641 case 'topCut':
20642 case 'topPaste':
20643 EventConstructor = SyntheticClipboardEvent;
20644 break;
20645 }
20646 !EventConstructor ? process.env.NODE_ENV !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0;
20647 var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
20648 EventPropagators.accumulateTwoPhaseDispatches(event);
20649 return event;
20650 },
20651
20652 didPutListener: function (inst, registrationName, listener) {
20653 // Mobile Safari does not fire properly bubble click events on
20654 // non-interactive elements, which means delegated click listeners do not
20655 // fire. The workaround for this bug involves attaching an empty click
20656 // listener on the target node.
20657 // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
20658 if (registrationName === 'onClick' && !isInteractive(inst._tag)) {
20659 var key = getDictionaryKey(inst);
20660 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
20661 if (!onClickListeners[key]) {
20662 onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction);
20663 }
20664 }
20665 },
20666
20667 willDeleteListener: function (inst, registrationName) {
20668 if (registrationName === 'onClick' && !isInteractive(inst._tag)) {
20669 var key = getDictionaryKey(inst);
20670 onClickListeners[key].remove();
20671 delete onClickListeners[key];
20672 }
20673 }
20674};
20675
20676module.exports = SimpleEventPlugin;
20677
20678/***/ }),
20679/* 168 */
20680/***/ (function(module, exports, __webpack_require__) {
20681
20682"use strict";
20683/**
20684 * Copyright (c) 2013-present, Facebook, Inc.
20685 *
20686 * This source code is licensed under the MIT license found in the
20687 * LICENSE file in the root directory of this source tree.
20688 *
20689 */
20690
20691
20692
20693var SyntheticEvent = __webpack_require__(10);
20694
20695/**
20696 * @interface Event
20697 * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
20698 * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
20699 */
20700var AnimationEventInterface = {
20701 animationName: null,
20702 elapsedTime: null,
20703 pseudoElement: null
20704};
20705
20706/**
20707 * @param {object} dispatchConfig Configuration used to dispatch this event.
20708 * @param {string} dispatchMarker Marker identifying the event target.
20709 * @param {object} nativeEvent Native browser event.
20710 * @extends {SyntheticEvent}
20711 */
20712function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20713 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20714}
20715
20716SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface);
20717
20718module.exports = SyntheticAnimationEvent;
20719
20720/***/ }),
20721/* 169 */
20722/***/ (function(module, exports, __webpack_require__) {
20723
20724"use strict";
20725/**
20726 * Copyright (c) 2013-present, Facebook, Inc.
20727 *
20728 * This source code is licensed under the MIT license found in the
20729 * LICENSE file in the root directory of this source tree.
20730 *
20731 */
20732
20733
20734
20735var SyntheticEvent = __webpack_require__(10);
20736
20737/**
20738 * @interface Event
20739 * @see http://www.w3.org/TR/clipboard-apis/
20740 */
20741var ClipboardEventInterface = {
20742 clipboardData: function (event) {
20743 return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
20744 }
20745};
20746
20747/**
20748 * @param {object} dispatchConfig Configuration used to dispatch this event.
20749 * @param {string} dispatchMarker Marker identifying the event target.
20750 * @param {object} nativeEvent Native browser event.
20751 * @extends {SyntheticUIEvent}
20752 */
20753function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20754 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20755}
20756
20757SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
20758
20759module.exports = SyntheticClipboardEvent;
20760
20761/***/ }),
20762/* 170 */
20763/***/ (function(module, exports, __webpack_require__) {
20764
20765"use strict";
20766/**
20767 * Copyright (c) 2013-present, Facebook, Inc.
20768 *
20769 * This source code is licensed under the MIT license found in the
20770 * LICENSE file in the root directory of this source tree.
20771 *
20772 */
20773
20774
20775
20776var SyntheticEvent = __webpack_require__(10);
20777
20778/**
20779 * @interface Event
20780 * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
20781 */
20782var CompositionEventInterface = {
20783 data: null
20784};
20785
20786/**
20787 * @param {object} dispatchConfig Configuration used to dispatch this event.
20788 * @param {string} dispatchMarker Marker identifying the event target.
20789 * @param {object} nativeEvent Native browser event.
20790 * @extends {SyntheticUIEvent}
20791 */
20792function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20793 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20794}
20795
20796SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);
20797
20798module.exports = SyntheticCompositionEvent;
20799
20800/***/ }),
20801/* 171 */
20802/***/ (function(module, exports, __webpack_require__) {
20803
20804"use strict";
20805/**
20806 * Copyright (c) 2013-present, Facebook, Inc.
20807 *
20808 * This source code is licensed under the MIT license found in the
20809 * LICENSE file in the root directory of this source tree.
20810 *
20811 */
20812
20813
20814
20815var SyntheticMouseEvent = __webpack_require__(23);
20816
20817/**
20818 * @interface DragEvent
20819 * @see http://www.w3.org/TR/DOM-Level-3-Events/
20820 */
20821var DragEventInterface = {
20822 dataTransfer: null
20823};
20824
20825/**
20826 * @param {object} dispatchConfig Configuration used to dispatch this event.
20827 * @param {string} dispatchMarker Marker identifying the event target.
20828 * @param {object} nativeEvent Native browser event.
20829 * @extends {SyntheticUIEvent}
20830 */
20831function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20832 return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20833}
20834
20835SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);
20836
20837module.exports = SyntheticDragEvent;
20838
20839/***/ }),
20840/* 172 */
20841/***/ (function(module, exports, __webpack_require__) {
20842
20843"use strict";
20844/**
20845 * Copyright (c) 2013-present, Facebook, Inc.
20846 *
20847 * This source code is licensed under the MIT license found in the
20848 * LICENSE file in the root directory of this source tree.
20849 *
20850 */
20851
20852
20853
20854var SyntheticUIEvent = __webpack_require__(20);
20855
20856/**
20857 * @interface FocusEvent
20858 * @see http://www.w3.org/TR/DOM-Level-3-Events/
20859 */
20860var FocusEventInterface = {
20861 relatedTarget: null
20862};
20863
20864/**
20865 * @param {object} dispatchConfig Configuration used to dispatch this event.
20866 * @param {string} dispatchMarker Marker identifying the event target.
20867 * @param {object} nativeEvent Native browser event.
20868 * @extends {SyntheticUIEvent}
20869 */
20870function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20871 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20872}
20873
20874SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);
20875
20876module.exports = SyntheticFocusEvent;
20877
20878/***/ }),
20879/* 173 */
20880/***/ (function(module, exports, __webpack_require__) {
20881
20882"use strict";
20883/**
20884 * Copyright (c) 2013-present, Facebook, Inc.
20885 *
20886 * This source code is licensed under the MIT license found in the
20887 * LICENSE file in the root directory of this source tree.
20888 *
20889 */
20890
20891
20892
20893var SyntheticEvent = __webpack_require__(10);
20894
20895/**
20896 * @interface Event
20897 * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
20898 * /#events-inputevents
20899 */
20900var InputEventInterface = {
20901 data: null
20902};
20903
20904/**
20905 * @param {object} dispatchConfig Configuration used to dispatch this event.
20906 * @param {string} dispatchMarker Marker identifying the event target.
20907 * @param {object} nativeEvent Native browser event.
20908 * @extends {SyntheticUIEvent}
20909 */
20910function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20911 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20912}
20913
20914SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);
20915
20916module.exports = SyntheticInputEvent;
20917
20918/***/ }),
20919/* 174 */
20920/***/ (function(module, exports, __webpack_require__) {
20921
20922"use strict";
20923/**
20924 * Copyright (c) 2013-present, Facebook, Inc.
20925 *
20926 * This source code is licensed under the MIT license found in the
20927 * LICENSE file in the root directory of this source tree.
20928 *
20929 */
20930
20931
20932
20933var SyntheticUIEvent = __webpack_require__(20);
20934
20935var getEventCharCode = __webpack_require__(39);
20936var getEventKey = __webpack_require__(182);
20937var getEventModifierState = __webpack_require__(40);
20938
20939/**
20940 * @interface KeyboardEvent
20941 * @see http://www.w3.org/TR/DOM-Level-3-Events/
20942 */
20943var KeyboardEventInterface = {
20944 key: getEventKey,
20945 location: null,
20946 ctrlKey: null,
20947 shiftKey: null,
20948 altKey: null,
20949 metaKey: null,
20950 repeat: null,
20951 locale: null,
20952 getModifierState: getEventModifierState,
20953 // Legacy Interface
20954 charCode: function (event) {
20955 // `charCode` is the result of a KeyPress event and represents the value of
20956 // the actual printable character.
20957
20958 // KeyPress is deprecated, but its replacement is not yet final and not
20959 // implemented in any major browser. Only KeyPress has charCode.
20960 if (event.type === 'keypress') {
20961 return getEventCharCode(event);
20962 }
20963 return 0;
20964 },
20965 keyCode: function (event) {
20966 // `keyCode` is the result of a KeyDown/Up event and represents the value of
20967 // physical keyboard key.
20968
20969 // The actual meaning of the value depends on the users' keyboard layout
20970 // which cannot be detected. Assuming that it is a US keyboard layout
20971 // provides a surprisingly accurate mapping for US and European users.
20972 // Due to this, it is left to the user to implement at this time.
20973 if (event.type === 'keydown' || event.type === 'keyup') {
20974 return event.keyCode;
20975 }
20976 return 0;
20977 },
20978 which: function (event) {
20979 // `which` is an alias for either `keyCode` or `charCode` depending on the
20980 // type of the event.
20981 if (event.type === 'keypress') {
20982 return getEventCharCode(event);
20983 }
20984 if (event.type === 'keydown' || event.type === 'keyup') {
20985 return event.keyCode;
20986 }
20987 return 0;
20988 }
20989};
20990
20991/**
20992 * @param {object} dispatchConfig Configuration used to dispatch this event.
20993 * @param {string} dispatchMarker Marker identifying the event target.
20994 * @param {object} nativeEvent Native browser event.
20995 * @extends {SyntheticUIEvent}
20996 */
20997function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20998 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20999}
21000
21001SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);
21002
21003module.exports = SyntheticKeyboardEvent;
21004
21005/***/ }),
21006/* 175 */
21007/***/ (function(module, exports, __webpack_require__) {
21008
21009"use strict";
21010/**
21011 * Copyright (c) 2013-present, Facebook, Inc.
21012 *
21013 * This source code is licensed under the MIT license found in the
21014 * LICENSE file in the root directory of this source tree.
21015 *
21016 */
21017
21018
21019
21020var SyntheticUIEvent = __webpack_require__(20);
21021
21022var getEventModifierState = __webpack_require__(40);
21023
21024/**
21025 * @interface TouchEvent
21026 * @see http://www.w3.org/TR/touch-events/
21027 */
21028var TouchEventInterface = {
21029 touches: null,
21030 targetTouches: null,
21031 changedTouches: null,
21032 altKey: null,
21033 metaKey: null,
21034 ctrlKey: null,
21035 shiftKey: null,
21036 getModifierState: getEventModifierState
21037};
21038
21039/**
21040 * @param {object} dispatchConfig Configuration used to dispatch this event.
21041 * @param {string} dispatchMarker Marker identifying the event target.
21042 * @param {object} nativeEvent Native browser event.
21043 * @extends {SyntheticUIEvent}
21044 */
21045function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
21046 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
21047}
21048
21049SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
21050
21051module.exports = SyntheticTouchEvent;
21052
21053/***/ }),
21054/* 176 */
21055/***/ (function(module, exports, __webpack_require__) {
21056
21057"use strict";
21058/**
21059 * Copyright (c) 2013-present, Facebook, Inc.
21060 *
21061 * This source code is licensed under the MIT license found in the
21062 * LICENSE file in the root directory of this source tree.
21063 *
21064 */
21065
21066
21067
21068var SyntheticEvent = __webpack_require__(10);
21069
21070/**
21071 * @interface Event
21072 * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
21073 * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
21074 */
21075var TransitionEventInterface = {
21076 propertyName: null,
21077 elapsedTime: null,
21078 pseudoElement: null
21079};
21080
21081/**
21082 * @param {object} dispatchConfig Configuration used to dispatch this event.
21083 * @param {string} dispatchMarker Marker identifying the event target.
21084 * @param {object} nativeEvent Native browser event.
21085 * @extends {SyntheticEvent}
21086 */
21087function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
21088 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
21089}
21090
21091SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface);
21092
21093module.exports = SyntheticTransitionEvent;
21094
21095/***/ }),
21096/* 177 */
21097/***/ (function(module, exports, __webpack_require__) {
21098
21099"use strict";
21100/**
21101 * Copyright (c) 2013-present, Facebook, Inc.
21102 *
21103 * This source code is licensed under the MIT license found in the
21104 * LICENSE file in the root directory of this source tree.
21105 *
21106 */
21107
21108
21109
21110var SyntheticMouseEvent = __webpack_require__(23);
21111
21112/**
21113 * @interface WheelEvent
21114 * @see http://www.w3.org/TR/DOM-Level-3-Events/
21115 */
21116var WheelEventInterface = {
21117 deltaX: function (event) {
21118 return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
21119 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
21120 },
21121 deltaY: function (event) {
21122 return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
21123 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
21124 'wheelDelta' in event ? -event.wheelDelta : 0;
21125 },
21126 deltaZ: null,
21127
21128 // Browsers without "deltaMode" is reporting in raw wheel delta where one
21129 // notch on the scroll is always +/- 120, roughly equivalent to pixels.
21130 // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
21131 // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
21132 deltaMode: null
21133};
21134
21135/**
21136 * @param {object} dispatchConfig Configuration used to dispatch this event.
21137 * @param {string} dispatchMarker Marker identifying the event target.
21138 * @param {object} nativeEvent Native browser event.
21139 * @extends {SyntheticMouseEvent}
21140 */
21141function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
21142 return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
21143}
21144
21145SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);
21146
21147module.exports = SyntheticWheelEvent;
21148
21149/***/ }),
21150/* 178 */
21151/***/ (function(module, exports, __webpack_require__) {
21152
21153"use strict";
21154/**
21155 * Copyright (c) 2013-present, Facebook, Inc.
21156 *
21157 * This source code is licensed under the MIT license found in the
21158 * LICENSE file in the root directory of this source tree.
21159 *
21160 *
21161 */
21162
21163
21164
21165var MOD = 65521;
21166
21167// adler32 is not cryptographically strong, and is only used to sanity check that
21168// markup generated on the server matches the markup generated on the client.
21169// This implementation (a modified version of the SheetJS version) has been optimized
21170// for our use case, at the expense of conforming to the adler32 specification
21171// for non-ascii inputs.
21172function adler32(data) {
21173 var a = 1;
21174 var b = 0;
21175 var i = 0;
21176 var l = data.length;
21177 var m = l & ~0x3;
21178 while (i < m) {
21179 var n = Math.min(i + 4096, m);
21180 for (; i < n; i += 4) {
21181 b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3));
21182 }
21183 a %= MOD;
21184 b %= MOD;
21185 }
21186 for (; i < l; i++) {
21187 b += a += data.charCodeAt(i);
21188 }
21189 a %= MOD;
21190 b %= MOD;
21191 return a | b << 16;
21192}
21193
21194module.exports = adler32;
21195
21196/***/ }),
21197/* 179 */
21198/***/ (function(module, exports, __webpack_require__) {
21199
21200"use strict";
21201/**
21202 * Copyright (c) 2013-present, Facebook, Inc.
21203 *
21204 * This source code is licensed under the MIT license found in the
21205 * LICENSE file in the root directory of this source tree.
21206 *
21207 */
21208
21209
21210
21211var _prodInvariant = __webpack_require__(2);
21212
21213var ReactPropTypeLocationNames = __webpack_require__(158);
21214var ReactPropTypesSecret = __webpack_require__(62);
21215
21216var invariant = __webpack_require__(0);
21217var warning = __webpack_require__(1);
21218
21219var ReactComponentTreeHook;
21220
21221if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
21222 // Temporary hack.
21223 // Inline requires don't work well with Jest:
21224 // https://github.com/facebook/react/issues/7240
21225 // Remove the inline requires when we don't need them anymore:
21226 // https://github.com/facebook/react/pull/7178
21227 ReactComponentTreeHook = __webpack_require__(8);
21228}
21229
21230var loggedTypeFailures = {};
21231
21232/**
21233 * Assert that the values match with the type specs.
21234 * Error messages are memorized and will only be shown once.
21235 *
21236 * @param {object} typeSpecs Map of name to a ReactPropType
21237 * @param {object} values Runtime values that need to be type-checked
21238 * @param {string} location e.g. "prop", "context", "child context"
21239 * @param {string} componentName Name of the component for error messages.
21240 * @param {?object} element The React element that is being type-checked
21241 * @param {?number} debugID The React component instance that is being type-checked
21242 * @private
21243 */
21244function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
21245 for (var typeSpecName in typeSpecs) {
21246 if (typeSpecs.hasOwnProperty(typeSpecName)) {
21247 var error;
21248 // Prop type validation may throw. In case they do, we don't want to
21249 // fail the render phase where it didn't fail before. So we log it.
21250 // After these have been cleaned up, we'll let them throw.
21251 try {
21252 // This is intentionally an invariant that gets caught. It's the same
21253 // behavior as without this statement except with a better message.
21254 !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;
21255 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
21256 } catch (ex) {
21257 error = ex;
21258 }
21259 process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;
21260 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
21261 // Only monitor this failure once because there tends to be a lot of the
21262 // same error.
21263 loggedTypeFailures[error.message] = true;
21264
21265 var componentStackInfo = '';
21266
21267 if (process.env.NODE_ENV !== 'production') {
21268 if (!ReactComponentTreeHook) {
21269 ReactComponentTreeHook = __webpack_require__(8);
21270 }
21271 if (debugID !== null) {
21272 componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
21273 } else if (element !== null) {
21274 componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
21275 }
21276 }
21277
21278 process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
21279 }
21280 }
21281 }
21282}
21283
21284module.exports = checkReactTypeSpec;
21285
21286/***/ }),
21287/* 180 */
21288/***/ (function(module, exports, __webpack_require__) {
21289
21290"use strict";
21291/**
21292 * Copyright (c) 2013-present, Facebook, Inc.
21293 *
21294 * This source code is licensed under the MIT license found in the
21295 * LICENSE file in the root directory of this source tree.
21296 *
21297 */
21298
21299
21300
21301var CSSProperty = __webpack_require__(53);
21302var warning = __webpack_require__(1);
21303
21304var isUnitlessNumber = CSSProperty.isUnitlessNumber;
21305var styleWarnings = {};
21306
21307/**
21308 * Convert a value into the proper css writable value. The style name `name`
21309 * should be logical (no hyphens), as specified
21310 * in `CSSProperty.isUnitlessNumber`.
21311 *
21312 * @param {string} name CSS property name such as `topMargin`.
21313 * @param {*} value CSS property value such as `10px`.
21314 * @param {ReactDOMComponent} component
21315 * @return {string} Normalized style value with dimensions applied.
21316 */
21317function dangerousStyleValue(name, value, component, isCustomProperty) {
21318 // Note that we've removed escapeTextForBrowser() calls here since the
21319 // whole string will be escaped when the attribute is injected into
21320 // the markup. If you provide unsafe user data here they can inject
21321 // arbitrary CSS which may be problematic (I couldn't repro this):
21322 // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
21323 // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
21324 // This is not an XSS hole but instead a potential CSS injection issue
21325 // which has lead to a greater discussion about how we're going to
21326 // trust URLs moving forward. See #2115901
21327
21328 var isEmpty = value == null || typeof value === 'boolean' || value === '';
21329 if (isEmpty) {
21330 return '';
21331 }
21332
21333 var isNonNumeric = isNaN(value);
21334 if (isCustomProperty || isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
21335 return '' + value; // cast to string
21336 }
21337
21338 if (typeof value === 'string') {
21339 if (process.env.NODE_ENV !== 'production') {
21340 // Allow '0' to pass through without warning. 0 is already special and
21341 // doesn't require units, so we don't need to warn about it.
21342 if (component && value !== '0') {
21343 var owner = component._currentElement._owner;
21344 var ownerName = owner ? owner.getName() : null;
21345 if (ownerName && !styleWarnings[ownerName]) {
21346 styleWarnings[ownerName] = {};
21347 }
21348 var warned = false;
21349 if (ownerName) {
21350 var warnings = styleWarnings[ownerName];
21351 warned = warnings[name];
21352 if (!warned) {
21353 warnings[name] = true;
21354 }
21355 }
21356 if (!warned) {
21357 process.env.NODE_ENV !== 'production' ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0;
21358 }
21359 }
21360 }
21361 value = value.trim();
21362 }
21363 return value + 'px';
21364}
21365
21366module.exports = dangerousStyleValue;
21367
21368/***/ }),
21369/* 181 */
21370/***/ (function(module, exports, __webpack_require__) {
21371
21372"use strict";
21373/**
21374 * Copyright (c) 2013-present, Facebook, Inc.
21375 *
21376 * This source code is licensed under the MIT license found in the
21377 * LICENSE file in the root directory of this source tree.
21378 *
21379 *
21380 */
21381
21382
21383
21384var KeyEscapeUtils = __webpack_require__(32);
21385var traverseAllChildren = __webpack_require__(74);
21386var warning = __webpack_require__(1);
21387
21388var ReactComponentTreeHook;
21389
21390if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
21391 // Temporary hack.
21392 // Inline requires don't work well with Jest:
21393 // https://github.com/facebook/react/issues/7240
21394 // Remove the inline requires when we don't need them anymore:
21395 // https://github.com/facebook/react/pull/7178
21396 ReactComponentTreeHook = __webpack_require__(8);
21397}
21398
21399/**
21400 * @param {function} traverseContext Context passed through traversal.
21401 * @param {?ReactComponent} child React child component.
21402 * @param {!string} name String name of key path to child.
21403 * @param {number=} selfDebugID Optional debugID of the current internal instance.
21404 */
21405function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {
21406 // We found a component instance.
21407 if (traverseContext && typeof traverseContext === 'object') {
21408 var result = traverseContext;
21409 var keyUnique = result[name] === undefined;
21410 if (process.env.NODE_ENV !== 'production') {
21411 if (!ReactComponentTreeHook) {
21412 ReactComponentTreeHook = __webpack_require__(8);
21413 }
21414 if (!keyUnique) {
21415 process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
21416 }
21417 }
21418 if (keyUnique && child != null) {
21419 result[name] = child;
21420 }
21421 }
21422}
21423
21424/**
21425 * Flattens children that are typically specified as `props.children`. Any null
21426 * children will not be included in the resulting object.
21427 * @return {!object} flattened children keyed by name.
21428 */
21429function flattenChildren(children, selfDebugID) {
21430 if (children == null) {
21431 return children;
21432 }
21433 var result = {};
21434
21435 if (process.env.NODE_ENV !== 'production') {
21436 traverseAllChildren(children, function (traverseContext, child, name) {
21437 return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);
21438 }, result);
21439 } else {
21440 traverseAllChildren(children, flattenSingleChildIntoContext, result);
21441 }
21442 return result;
21443}
21444
21445module.exports = flattenChildren;
21446
21447/***/ }),
21448/* 182 */
21449/***/ (function(module, exports, __webpack_require__) {
21450
21451"use strict";
21452/**
21453 * Copyright (c) 2013-present, Facebook, Inc.
21454 *
21455 * This source code is licensed under the MIT license found in the
21456 * LICENSE file in the root directory of this source tree.
21457 *
21458 */
21459
21460
21461
21462var getEventCharCode = __webpack_require__(39);
21463
21464/**
21465 * Normalization of deprecated HTML5 `key` values
21466 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
21467 */
21468var normalizeKey = {
21469 Esc: 'Escape',
21470 Spacebar: ' ',
21471 Left: 'ArrowLeft',
21472 Up: 'ArrowUp',
21473 Right: 'ArrowRight',
21474 Down: 'ArrowDown',
21475 Del: 'Delete',
21476 Win: 'OS',
21477 Menu: 'ContextMenu',
21478 Apps: 'ContextMenu',
21479 Scroll: 'ScrollLock',
21480 MozPrintableKey: 'Unidentified'
21481};
21482
21483/**
21484 * Translation from legacy `keyCode` to HTML5 `key`
21485 * Only special keys supported, all others depend on keyboard layout or browser
21486 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
21487 */
21488var translateToKey = {
21489 8: 'Backspace',
21490 9: 'Tab',
21491 12: 'Clear',
21492 13: 'Enter',
21493 16: 'Shift',
21494 17: 'Control',
21495 18: 'Alt',
21496 19: 'Pause',
21497 20: 'CapsLock',
21498 27: 'Escape',
21499 32: ' ',
21500 33: 'PageUp',
21501 34: 'PageDown',
21502 35: 'End',
21503 36: 'Home',
21504 37: 'ArrowLeft',
21505 38: 'ArrowUp',
21506 39: 'ArrowRight',
21507 40: 'ArrowDown',
21508 45: 'Insert',
21509 46: 'Delete',
21510 112: 'F1',
21511 113: 'F2',
21512 114: 'F3',
21513 115: 'F4',
21514 116: 'F5',
21515 117: 'F6',
21516 118: 'F7',
21517 119: 'F8',
21518 120: 'F9',
21519 121: 'F10',
21520 122: 'F11',
21521 123: 'F12',
21522 144: 'NumLock',
21523 145: 'ScrollLock',
21524 224: 'Meta'
21525};
21526
21527/**
21528 * @param {object} nativeEvent Native browser event.
21529 * @return {string} Normalized `key` property.
21530 */
21531function getEventKey(nativeEvent) {
21532 if (nativeEvent.key) {
21533 // Normalize inconsistent values reported by browsers due to
21534 // implementations of a working draft specification.
21535
21536 // FireFox implements `key` but returns `MozPrintableKey` for all
21537 // printable characters (normalized to `Unidentified`), ignore it.
21538 var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
21539 if (key !== 'Unidentified') {
21540 return key;
21541 }
21542 }
21543
21544 // Browser does not implement `key`, polyfill as much of it as we can.
21545 if (nativeEvent.type === 'keypress') {
21546 var charCode = getEventCharCode(nativeEvent);
21547
21548 // The enter-key is technically both printable and non-printable and can
21549 // thus be captured by `keypress`, no other non-printable key should.
21550 return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
21551 }
21552 if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
21553 // While user keyboard layout determines the actual meaning of each
21554 // `keyCode` value, almost all function keys have a universal value.
21555 return translateToKey[nativeEvent.keyCode] || 'Unidentified';
21556 }
21557 return '';
21558}
21559
21560module.exports = getEventKey;
21561
21562/***/ }),
21563/* 183 */
21564/***/ (function(module, exports, __webpack_require__) {
21565
21566"use strict";
21567/**
21568 * Copyright (c) 2013-present, Facebook, Inc.
21569 *
21570 * This source code is licensed under the MIT license found in the
21571 * LICENSE file in the root directory of this source tree.
21572 *
21573 *
21574 */
21575
21576
21577
21578/* global Symbol */
21579
21580var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
21581var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
21582
21583/**
21584 * Returns the iterator method function contained on the iterable object.
21585 *
21586 * Be sure to invoke the function with the iterable as context:
21587 *
21588 * var iteratorFn = getIteratorFn(myIterable);
21589 * if (iteratorFn) {
21590 * var iterator = iteratorFn.call(myIterable);
21591 * ...
21592 * }
21593 *
21594 * @param {?object} maybeIterable
21595 * @return {?function}
21596 */
21597function getIteratorFn(maybeIterable) {
21598 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
21599 if (typeof iteratorFn === 'function') {
21600 return iteratorFn;
21601 }
21602}
21603
21604module.exports = getIteratorFn;
21605
21606/***/ }),
21607/* 184 */
21608/***/ (function(module, exports, __webpack_require__) {
21609
21610"use strict";
21611/**
21612 * Copyright (c) 2013-present, Facebook, Inc.
21613 *
21614 * This source code is licensed under the MIT license found in the
21615 * LICENSE file in the root directory of this source tree.
21616 *
21617 */
21618
21619
21620
21621/**
21622 * Given any node return the first leaf node without children.
21623 *
21624 * @param {DOMElement|DOMTextNode} node
21625 * @return {DOMElement|DOMTextNode}
21626 */
21627
21628function getLeafNode(node) {
21629 while (node && node.firstChild) {
21630 node = node.firstChild;
21631 }
21632 return node;
21633}
21634
21635/**
21636 * Get the next sibling within a container. This will walk up the
21637 * DOM if a node's siblings have been exhausted.
21638 *
21639 * @param {DOMElement|DOMTextNode} node
21640 * @return {?DOMElement|DOMTextNode}
21641 */
21642function getSiblingNode(node) {
21643 while (node) {
21644 if (node.nextSibling) {
21645 return node.nextSibling;
21646 }
21647 node = node.parentNode;
21648 }
21649}
21650
21651/**
21652 * Get object describing the nodes which contain characters at offset.
21653 *
21654 * @param {DOMElement|DOMTextNode} root
21655 * @param {number} offset
21656 * @return {?object}
21657 */
21658function getNodeForCharacterOffset(root, offset) {
21659 var node = getLeafNode(root);
21660 var nodeStart = 0;
21661 var nodeEnd = 0;
21662
21663 while (node) {
21664 if (node.nodeType === 3) {
21665 nodeEnd = nodeStart + node.textContent.length;
21666
21667 if (nodeStart <= offset && nodeEnd >= offset) {
21668 return {
21669 node: node,
21670 offset: offset - nodeStart
21671 };
21672 }
21673
21674 nodeStart = nodeEnd;
21675 }
21676
21677 node = getLeafNode(getSiblingNode(node));
21678 }
21679}
21680
21681module.exports = getNodeForCharacterOffset;
21682
21683/***/ }),
21684/* 185 */
21685/***/ (function(module, exports, __webpack_require__) {
21686
21687"use strict";
21688/**
21689 * Copyright (c) 2013-present, Facebook, Inc.
21690 *
21691 * This source code is licensed under the MIT license found in the
21692 * LICENSE file in the root directory of this source tree.
21693 *
21694 */
21695
21696
21697
21698var ExecutionEnvironment = __webpack_require__(5);
21699
21700/**
21701 * Generate a mapping of standard vendor prefixes using the defined style property and event name.
21702 *
21703 * @param {string} styleProp
21704 * @param {string} eventName
21705 * @returns {object}
21706 */
21707function makePrefixMap(styleProp, eventName) {
21708 var prefixes = {};
21709
21710 prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
21711 prefixes['Webkit' + styleProp] = 'webkit' + eventName;
21712 prefixes['Moz' + styleProp] = 'moz' + eventName;
21713 prefixes['ms' + styleProp] = 'MS' + eventName;
21714 prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
21715
21716 return prefixes;
21717}
21718
21719/**
21720 * A list of event names to a configurable list of vendor prefixes.
21721 */
21722var vendorPrefixes = {
21723 animationend: makePrefixMap('Animation', 'AnimationEnd'),
21724 animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
21725 animationstart: makePrefixMap('Animation', 'AnimationStart'),
21726 transitionend: makePrefixMap('Transition', 'TransitionEnd')
21727};
21728
21729/**
21730 * Event names that have already been detected and prefixed (if applicable).
21731 */
21732var prefixedEventNames = {};
21733
21734/**
21735 * Element to check for prefixes on.
21736 */
21737var style = {};
21738
21739/**
21740 * Bootstrap if a DOM exists.
21741 */
21742if (ExecutionEnvironment.canUseDOM) {
21743 style = document.createElement('div').style;
21744
21745 // On some platforms, in particular some releases of Android 4.x,
21746 // the un-prefixed "animation" and "transition" properties are defined on the
21747 // style object but the events that fire will still be prefixed, so we need
21748 // to check if the un-prefixed events are usable, and if not remove them from the map.
21749 if (!('AnimationEvent' in window)) {
21750 delete vendorPrefixes.animationend.animation;
21751 delete vendorPrefixes.animationiteration.animation;
21752 delete vendorPrefixes.animationstart.animation;
21753 }
21754
21755 // Same as above
21756 if (!('TransitionEvent' in window)) {
21757 delete vendorPrefixes.transitionend.transition;
21758 }
21759}
21760
21761/**
21762 * Attempts to determine the correct vendor prefixed event name.
21763 *
21764 * @param {string} eventName
21765 * @returns {string}
21766 */
21767function getVendorPrefixedEventName(eventName) {
21768 if (prefixedEventNames[eventName]) {
21769 return prefixedEventNames[eventName];
21770 } else if (!vendorPrefixes[eventName]) {
21771 return eventName;
21772 }
21773
21774 var prefixMap = vendorPrefixes[eventName];
21775
21776 for (var styleProp in prefixMap) {
21777 if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
21778 return prefixedEventNames[eventName] = prefixMap[styleProp];
21779 }
21780 }
21781
21782 return '';
21783}
21784
21785module.exports = getVendorPrefixedEventName;
21786
21787/***/ }),
21788/* 186 */
21789/***/ (function(module, exports, __webpack_require__) {
21790
21791"use strict";
21792/**
21793 * Copyright (c) 2013-present, Facebook, Inc.
21794 *
21795 * This source code is licensed under the MIT license found in the
21796 * LICENSE file in the root directory of this source tree.
21797 *
21798 */
21799
21800
21801
21802var escapeTextContentForBrowser = __webpack_require__(25);
21803
21804/**
21805 * Escapes attribute value to prevent scripting attacks.
21806 *
21807 * @param {*} value Value to escape.
21808 * @return {string} An escaped string.
21809 */
21810function quoteAttributeValueForBrowser(value) {
21811 return '"' + escapeTextContentForBrowser(value) + '"';
21812}
21813
21814module.exports = quoteAttributeValueForBrowser;
21815
21816/***/ }),
21817/* 187 */
21818/***/ (function(module, exports, __webpack_require__) {
21819
21820"use strict";
21821
21822
21823module.exports = __webpack_require__(141);
21824
21825
21826/***/ }),
21827/* 188 */
21828/***/ (function(module, exports, __webpack_require__) {
21829
21830"use strict";
21831/**
21832 * Copyright (c) 2013-present, Facebook, Inc.
21833 *
21834 * This source code is licensed under the MIT license found in the
21835 * LICENSE file in the root directory of this source tree.
21836 *
21837 *
21838 */
21839
21840
21841
21842/**
21843 * Escape and wrap key so it is safe to use as a reactid
21844 *
21845 * @param {string} key to be escaped.
21846 * @return {string} the escaped key.
21847 */
21848
21849function escape(key) {
21850 var escapeRegex = /[=:]/g;
21851 var escaperLookup = {
21852 '=': '=0',
21853 ':': '=2'
21854 };
21855 var escapedString = ('' + key).replace(escapeRegex, function (match) {
21856 return escaperLookup[match];
21857 });
21858
21859 return '$' + escapedString;
21860}
21861
21862/**
21863 * Unescape and unwrap key for human-readable display
21864 *
21865 * @param {string} key to unescape.
21866 * @return {string} the unescaped key.
21867 */
21868function unescape(key) {
21869 var unescapeRegex = /(=0|=2)/g;
21870 var unescaperLookup = {
21871 '=0': '=',
21872 '=2': ':'
21873 };
21874 var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
21875
21876 return ('' + keySubstring).replace(unescapeRegex, function (match) {
21877 return unescaperLookup[match];
21878 });
21879}
21880
21881var KeyEscapeUtils = {
21882 escape: escape,
21883 unescape: unescape
21884};
21885
21886module.exports = KeyEscapeUtils;
21887
21888/***/ }),
21889/* 189 */
21890/***/ (function(module, exports, __webpack_require__) {
21891
21892"use strict";
21893/**
21894 * Copyright (c) 2013-present, Facebook, Inc.
21895 *
21896 * This source code is licensed under the MIT license found in the
21897 * LICENSE file in the root directory of this source tree.
21898 *
21899 *
21900 */
21901
21902
21903
21904var _prodInvariant = __webpack_require__(14);
21905
21906var invariant = __webpack_require__(0);
21907
21908/**
21909 * Static poolers. Several custom versions for each potential number of
21910 * arguments. A completely generic pooler is easy to implement, but would
21911 * require accessing the `arguments` object. In each of these, `this` refers to
21912 * the Class itself, not an instance. If any others are needed, simply add them
21913 * here, or in their own files.
21914 */
21915var oneArgumentPooler = function (copyFieldsFrom) {
21916 var Klass = this;
21917 if (Klass.instancePool.length) {
21918 var instance = Klass.instancePool.pop();
21919 Klass.call(instance, copyFieldsFrom);
21920 return instance;
21921 } else {
21922 return new Klass(copyFieldsFrom);
21923 }
21924};
21925
21926var twoArgumentPooler = function (a1, a2) {
21927 var Klass = this;
21928 if (Klass.instancePool.length) {
21929 var instance = Klass.instancePool.pop();
21930 Klass.call(instance, a1, a2);
21931 return instance;
21932 } else {
21933 return new Klass(a1, a2);
21934 }
21935};
21936
21937var threeArgumentPooler = function (a1, a2, a3) {
21938 var Klass = this;
21939 if (Klass.instancePool.length) {
21940 var instance = Klass.instancePool.pop();
21941 Klass.call(instance, a1, a2, a3);
21942 return instance;
21943 } else {
21944 return new Klass(a1, a2, a3);
21945 }
21946};
21947
21948var fourArgumentPooler = function (a1, a2, a3, a4) {
21949 var Klass = this;
21950 if (Klass.instancePool.length) {
21951 var instance = Klass.instancePool.pop();
21952 Klass.call(instance, a1, a2, a3, a4);
21953 return instance;
21954 } else {
21955 return new Klass(a1, a2, a3, a4);
21956 }
21957};
21958
21959var standardReleaser = function (instance) {
21960 var Klass = this;
21961 !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
21962 instance.destructor();
21963 if (Klass.instancePool.length < Klass.poolSize) {
21964 Klass.instancePool.push(instance);
21965 }
21966};
21967
21968var DEFAULT_POOL_SIZE = 10;
21969var DEFAULT_POOLER = oneArgumentPooler;
21970
21971/**
21972 * Augments `CopyConstructor` to be a poolable class, augmenting only the class
21973 * itself (statically) not adding any prototypical fields. Any CopyConstructor
21974 * you give this may have a `poolSize` property, and will look for a
21975 * prototypical `destructor` on instances.
21976 *
21977 * @param {Function} CopyConstructor Constructor that can be used to reset.
21978 * @param {Function} pooler Customizable pooler.
21979 */
21980var addPoolingTo = function (CopyConstructor, pooler) {
21981 // Casting as any so that flow ignores the actual implementation and trusts
21982 // it to match the type we declared
21983 var NewKlass = CopyConstructor;
21984 NewKlass.instancePool = [];
21985 NewKlass.getPooled = pooler || DEFAULT_POOLER;
21986 if (!NewKlass.poolSize) {
21987 NewKlass.poolSize = DEFAULT_POOL_SIZE;
21988 }
21989 NewKlass.release = standardReleaser;
21990 return NewKlass;
21991};
21992
21993var PooledClass = {
21994 addPoolingTo: addPoolingTo,
21995 oneArgumentPooler: oneArgumentPooler,
21996 twoArgumentPooler: twoArgumentPooler,
21997 threeArgumentPooler: threeArgumentPooler,
21998 fourArgumentPooler: fourArgumentPooler
21999};
22000
22001module.exports = PooledClass;
22002
22003/***/ }),
22004/* 190 */
22005/***/ (function(module, exports, __webpack_require__) {
22006
22007"use strict";
22008/**
22009 * Copyright (c) 2013-present, Facebook, Inc.
22010 *
22011 * This source code is licensed under the MIT license found in the
22012 * LICENSE file in the root directory of this source tree.
22013 *
22014 */
22015
22016
22017
22018var PooledClass = __webpack_require__(189);
22019var ReactElement = __webpack_require__(13);
22020
22021var emptyFunction = __webpack_require__(7);
22022var traverseAllChildren = __webpack_require__(200);
22023
22024var twoArgumentPooler = PooledClass.twoArgumentPooler;
22025var fourArgumentPooler = PooledClass.fourArgumentPooler;
22026
22027var userProvidedKeyEscapeRegex = /\/+/g;
22028function escapeUserProvidedKey(text) {
22029 return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
22030}
22031
22032/**
22033 * PooledClass representing the bookkeeping associated with performing a child
22034 * traversal. Allows avoiding binding callbacks.
22035 *
22036 * @constructor ForEachBookKeeping
22037 * @param {!function} forEachFunction Function to perform traversal with.
22038 * @param {?*} forEachContext Context to perform context with.
22039 */
22040function ForEachBookKeeping(forEachFunction, forEachContext) {
22041 this.func = forEachFunction;
22042 this.context = forEachContext;
22043 this.count = 0;
22044}
22045ForEachBookKeeping.prototype.destructor = function () {
22046 this.func = null;
22047 this.context = null;
22048 this.count = 0;
22049};
22050PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
22051
22052function forEachSingleChild(bookKeeping, child, name) {
22053 var func = bookKeeping.func,
22054 context = bookKeeping.context;
22055
22056 func.call(context, child, bookKeeping.count++);
22057}
22058
22059/**
22060 * Iterates through children that are typically specified as `props.children`.
22061 *
22062 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach
22063 *
22064 * The provided forEachFunc(child, index) will be called for each
22065 * leaf child.
22066 *
22067 * @param {?*} children Children tree container.
22068 * @param {function(*, int)} forEachFunc
22069 * @param {*} forEachContext Context for forEachContext.
22070 */
22071function forEachChildren(children, forEachFunc, forEachContext) {
22072 if (children == null) {
22073 return children;
22074 }
22075 var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
22076 traverseAllChildren(children, forEachSingleChild, traverseContext);
22077 ForEachBookKeeping.release(traverseContext);
22078}
22079
22080/**
22081 * PooledClass representing the bookkeeping associated with performing a child
22082 * mapping. Allows avoiding binding callbacks.
22083 *
22084 * @constructor MapBookKeeping
22085 * @param {!*} mapResult Object containing the ordered map of results.
22086 * @param {!function} mapFunction Function to perform mapping with.
22087 * @param {?*} mapContext Context to perform mapping with.
22088 */
22089function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
22090 this.result = mapResult;
22091 this.keyPrefix = keyPrefix;
22092 this.func = mapFunction;
22093 this.context = mapContext;
22094 this.count = 0;
22095}
22096MapBookKeeping.prototype.destructor = function () {
22097 this.result = null;
22098 this.keyPrefix = null;
22099 this.func = null;
22100 this.context = null;
22101 this.count = 0;
22102};
22103PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
22104
22105function mapSingleChildIntoContext(bookKeeping, child, childKey) {
22106 var result = bookKeeping.result,
22107 keyPrefix = bookKeeping.keyPrefix,
22108 func = bookKeeping.func,
22109 context = bookKeeping.context;
22110
22111
22112 var mappedChild = func.call(context, child, bookKeeping.count++);
22113 if (Array.isArray(mappedChild)) {
22114 mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
22115 } else if (mappedChild != null) {
22116 if (ReactElement.isValidElement(mappedChild)) {
22117 mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
22118 // Keep both the (mapped) and old keys if they differ, just as
22119 // traverseAllChildren used to do for objects as children
22120 keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
22121 }
22122 result.push(mappedChild);
22123 }
22124}
22125
22126function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
22127 var escapedPrefix = '';
22128 if (prefix != null) {
22129 escapedPrefix = escapeUserProvidedKey(prefix) + '/';
22130 }
22131 var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
22132 traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
22133 MapBookKeeping.release(traverseContext);
22134}
22135
22136/**
22137 * Maps children that are typically specified as `props.children`.
22138 *
22139 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map
22140 *
22141 * The provided mapFunction(child, key, index) will be called for each
22142 * leaf child.
22143 *
22144 * @param {?*} children Children tree container.
22145 * @param {function(*, int)} func The map function.
22146 * @param {*} context Context for mapFunction.
22147 * @return {object} Object containing the ordered map of results.
22148 */
22149function mapChildren(children, func, context) {
22150 if (children == null) {
22151 return children;
22152 }
22153 var result = [];
22154 mapIntoWithKeyPrefixInternal(children, result, null, func, context);
22155 return result;
22156}
22157
22158function forEachSingleChildDummy(traverseContext, child, name) {
22159 return null;
22160}
22161
22162/**
22163 * Count the number of children that are typically specified as
22164 * `props.children`.
22165 *
22166 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count
22167 *
22168 * @param {?*} children Children tree container.
22169 * @return {number} The number of children.
22170 */
22171function countChildren(children, context) {
22172 return traverseAllChildren(children, forEachSingleChildDummy, null);
22173}
22174
22175/**
22176 * Flatten a children object (typically specified as `props.children`) and
22177 * return an array with appropriately re-keyed children.
22178 *
22179 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray
22180 */
22181function toArray(children) {
22182 var result = [];
22183 mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
22184 return result;
22185}
22186
22187var ReactChildren = {
22188 forEach: forEachChildren,
22189 map: mapChildren,
22190 mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
22191 count: countChildren,
22192 toArray: toArray
22193};
22194
22195module.exports = ReactChildren;
22196
22197/***/ }),
22198/* 191 */
22199/***/ (function(module, exports, __webpack_require__) {
22200
22201"use strict";
22202/**
22203 * Copyright (c) 2013-present, Facebook, Inc.
22204 *
22205 * This source code is licensed under the MIT license found in the
22206 * LICENSE file in the root directory of this source tree.
22207 *
22208 */
22209
22210
22211
22212var ReactElement = __webpack_require__(13);
22213
22214/**
22215 * Create a factory that creates HTML tag elements.
22216 *
22217 * @private
22218 */
22219var createDOMFactory = ReactElement.createFactory;
22220if (process.env.NODE_ENV !== 'production') {
22221 var ReactElementValidator = __webpack_require__(77);
22222 createDOMFactory = ReactElementValidator.createFactory;
22223}
22224
22225/**
22226 * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
22227 *
22228 * @public
22229 */
22230var ReactDOMFactories = {
22231 a: createDOMFactory('a'),
22232 abbr: createDOMFactory('abbr'),
22233 address: createDOMFactory('address'),
22234 area: createDOMFactory('area'),
22235 article: createDOMFactory('article'),
22236 aside: createDOMFactory('aside'),
22237 audio: createDOMFactory('audio'),
22238 b: createDOMFactory('b'),
22239 base: createDOMFactory('base'),
22240 bdi: createDOMFactory('bdi'),
22241 bdo: createDOMFactory('bdo'),
22242 big: createDOMFactory('big'),
22243 blockquote: createDOMFactory('blockquote'),
22244 body: createDOMFactory('body'),
22245 br: createDOMFactory('br'),
22246 button: createDOMFactory('button'),
22247 canvas: createDOMFactory('canvas'),
22248 caption: createDOMFactory('caption'),
22249 cite: createDOMFactory('cite'),
22250 code: createDOMFactory('code'),
22251 col: createDOMFactory('col'),
22252 colgroup: createDOMFactory('colgroup'),
22253 data: createDOMFactory('data'),
22254 datalist: createDOMFactory('datalist'),
22255 dd: createDOMFactory('dd'),
22256 del: createDOMFactory('del'),
22257 details: createDOMFactory('details'),
22258 dfn: createDOMFactory('dfn'),
22259 dialog: createDOMFactory('dialog'),
22260 div: createDOMFactory('div'),
22261 dl: createDOMFactory('dl'),
22262 dt: createDOMFactory('dt'),
22263 em: createDOMFactory('em'),
22264 embed: createDOMFactory('embed'),
22265 fieldset: createDOMFactory('fieldset'),
22266 figcaption: createDOMFactory('figcaption'),
22267 figure: createDOMFactory('figure'),
22268 footer: createDOMFactory('footer'),
22269 form: createDOMFactory('form'),
22270 h1: createDOMFactory('h1'),
22271 h2: createDOMFactory('h2'),
22272 h3: createDOMFactory('h3'),
22273 h4: createDOMFactory('h4'),
22274 h5: createDOMFactory('h5'),
22275 h6: createDOMFactory('h6'),
22276 head: createDOMFactory('head'),
22277 header: createDOMFactory('header'),
22278 hgroup: createDOMFactory('hgroup'),
22279 hr: createDOMFactory('hr'),
22280 html: createDOMFactory('html'),
22281 i: createDOMFactory('i'),
22282 iframe: createDOMFactory('iframe'),
22283 img: createDOMFactory('img'),
22284 input: createDOMFactory('input'),
22285 ins: createDOMFactory('ins'),
22286 kbd: createDOMFactory('kbd'),
22287 keygen: createDOMFactory('keygen'),
22288 label: createDOMFactory('label'),
22289 legend: createDOMFactory('legend'),
22290 li: createDOMFactory('li'),
22291 link: createDOMFactory('link'),
22292 main: createDOMFactory('main'),
22293 map: createDOMFactory('map'),
22294 mark: createDOMFactory('mark'),
22295 menu: createDOMFactory('menu'),
22296 menuitem: createDOMFactory('menuitem'),
22297 meta: createDOMFactory('meta'),
22298 meter: createDOMFactory('meter'),
22299 nav: createDOMFactory('nav'),
22300 noscript: createDOMFactory('noscript'),
22301 object: createDOMFactory('object'),
22302 ol: createDOMFactory('ol'),
22303 optgroup: createDOMFactory('optgroup'),
22304 option: createDOMFactory('option'),
22305 output: createDOMFactory('output'),
22306 p: createDOMFactory('p'),
22307 param: createDOMFactory('param'),
22308 picture: createDOMFactory('picture'),
22309 pre: createDOMFactory('pre'),
22310 progress: createDOMFactory('progress'),
22311 q: createDOMFactory('q'),
22312 rp: createDOMFactory('rp'),
22313 rt: createDOMFactory('rt'),
22314 ruby: createDOMFactory('ruby'),
22315 s: createDOMFactory('s'),
22316 samp: createDOMFactory('samp'),
22317 script: createDOMFactory('script'),
22318 section: createDOMFactory('section'),
22319 select: createDOMFactory('select'),
22320 small: createDOMFactory('small'),
22321 source: createDOMFactory('source'),
22322 span: createDOMFactory('span'),
22323 strong: createDOMFactory('strong'),
22324 style: createDOMFactory('style'),
22325 sub: createDOMFactory('sub'),
22326 summary: createDOMFactory('summary'),
22327 sup: createDOMFactory('sup'),
22328 table: createDOMFactory('table'),
22329 tbody: createDOMFactory('tbody'),
22330 td: createDOMFactory('td'),
22331 textarea: createDOMFactory('textarea'),
22332 tfoot: createDOMFactory('tfoot'),
22333 th: createDOMFactory('th'),
22334 thead: createDOMFactory('thead'),
22335 time: createDOMFactory('time'),
22336 title: createDOMFactory('title'),
22337 tr: createDOMFactory('tr'),
22338 track: createDOMFactory('track'),
22339 u: createDOMFactory('u'),
22340 ul: createDOMFactory('ul'),
22341 'var': createDOMFactory('var'),
22342 video: createDOMFactory('video'),
22343 wbr: createDOMFactory('wbr'),
22344
22345 // SVG
22346 circle: createDOMFactory('circle'),
22347 clipPath: createDOMFactory('clipPath'),
22348 defs: createDOMFactory('defs'),
22349 ellipse: createDOMFactory('ellipse'),
22350 g: createDOMFactory('g'),
22351 image: createDOMFactory('image'),
22352 line: createDOMFactory('line'),
22353 linearGradient: createDOMFactory('linearGradient'),
22354 mask: createDOMFactory('mask'),
22355 path: createDOMFactory('path'),
22356 pattern: createDOMFactory('pattern'),
22357 polygon: createDOMFactory('polygon'),
22358 polyline: createDOMFactory('polyline'),
22359 radialGradient: createDOMFactory('radialGradient'),
22360 rect: createDOMFactory('rect'),
22361 stop: createDOMFactory('stop'),
22362 svg: createDOMFactory('svg'),
22363 text: createDOMFactory('text'),
22364 tspan: createDOMFactory('tspan')
22365};
22366
22367module.exports = ReactDOMFactories;
22368
22369/***/ }),
22370/* 192 */
22371/***/ (function(module, exports, __webpack_require__) {
22372
22373"use strict";
22374/**
22375 * Copyright (c) 2013-present, Facebook, Inc.
22376 *
22377 * This source code is licensed under the MIT license found in the
22378 * LICENSE file in the root directory of this source tree.
22379 *
22380 *
22381 */
22382
22383
22384
22385var ReactPropTypeLocationNames = {};
22386
22387if (process.env.NODE_ENV !== 'production') {
22388 ReactPropTypeLocationNames = {
22389 prop: 'prop',
22390 context: 'context',
22391 childContext: 'child context'
22392 };
22393}
22394
22395module.exports = ReactPropTypeLocationNames;
22396
22397/***/ }),
22398/* 193 */
22399/***/ (function(module, exports, __webpack_require__) {
22400
22401"use strict";
22402/**
22403 * Copyright (c) 2013-present, Facebook, Inc.
22404 *
22405 * This source code is licensed under the MIT license found in the
22406 * LICENSE file in the root directory of this source tree.
22407 *
22408 */
22409
22410
22411
22412var _require = __webpack_require__(13),
22413 isValidElement = _require.isValidElement;
22414
22415var factory = __webpack_require__(51);
22416
22417module.exports = factory(isValidElement);
22418
22419/***/ }),
22420/* 194 */
22421/***/ (function(module, exports, __webpack_require__) {
22422
22423"use strict";
22424/**
22425 * Copyright (c) 2013-present, Facebook, Inc.
22426 *
22427 * This source code is licensed under the MIT license found in the
22428 * LICENSE file in the root directory of this source tree.
22429 *
22430 *
22431 */
22432
22433
22434
22435var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
22436
22437module.exports = ReactPropTypesSecret;
22438
22439/***/ }),
22440/* 195 */
22441/***/ (function(module, exports, __webpack_require__) {
22442
22443"use strict";
22444/**
22445 * Copyright (c) 2013-present, Facebook, Inc.
22446 *
22447 * This source code is licensed under the MIT license found in the
22448 * LICENSE file in the root directory of this source tree.
22449 *
22450 */
22451
22452
22453
22454module.exports = '15.6.2';
22455
22456/***/ }),
22457/* 196 */
22458/***/ (function(module, exports, __webpack_require__) {
22459
22460"use strict";
22461/**
22462 * Copyright (c) 2013-present, Facebook, Inc.
22463 *
22464 * This source code is licensed under the MIT license found in the
22465 * LICENSE file in the root directory of this source tree.
22466 *
22467 */
22468
22469
22470
22471var _prodInvariant = __webpack_require__(14);
22472
22473var ReactPropTypeLocationNames = __webpack_require__(192);
22474var ReactPropTypesSecret = __webpack_require__(194);
22475
22476var invariant = __webpack_require__(0);
22477var warning = __webpack_require__(1);
22478
22479var ReactComponentTreeHook;
22480
22481if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
22482 // Temporary hack.
22483 // Inline requires don't work well with Jest:
22484 // https://github.com/facebook/react/issues/7240
22485 // Remove the inline requires when we don't need them anymore:
22486 // https://github.com/facebook/react/pull/7178
22487 ReactComponentTreeHook = __webpack_require__(8);
22488}
22489
22490var loggedTypeFailures = {};
22491
22492/**
22493 * Assert that the values match with the type specs.
22494 * Error messages are memorized and will only be shown once.
22495 *
22496 * @param {object} typeSpecs Map of name to a ReactPropType
22497 * @param {object} values Runtime values that need to be type-checked
22498 * @param {string} location e.g. "prop", "context", "child context"
22499 * @param {string} componentName Name of the component for error messages.
22500 * @param {?object} element The React element that is being type-checked
22501 * @param {?number} debugID The React component instance that is being type-checked
22502 * @private
22503 */
22504function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
22505 for (var typeSpecName in typeSpecs) {
22506 if (typeSpecs.hasOwnProperty(typeSpecName)) {
22507 var error;
22508 // Prop type validation may throw. In case they do, we don't want to
22509 // fail the render phase where it didn't fail before. So we log it.
22510 // After these have been cleaned up, we'll let them throw.
22511 try {
22512 // This is intentionally an invariant that gets caught. It's the same
22513 // behavior as without this statement except with a better message.
22514 !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;
22515 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
22516 } catch (ex) {
22517 error = ex;
22518 }
22519 process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;
22520 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
22521 // Only monitor this failure once because there tends to be a lot of the
22522 // same error.
22523 loggedTypeFailures[error.message] = true;
22524
22525 var componentStackInfo = '';
22526
22527 if (process.env.NODE_ENV !== 'production') {
22528 if (!ReactComponentTreeHook) {
22529 ReactComponentTreeHook = __webpack_require__(8);
22530 }
22531 if (debugID !== null) {
22532 componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
22533 } else if (element !== null) {
22534 componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
22535 }
22536 }
22537
22538 process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
22539 }
22540 }
22541 }
22542}
22543
22544module.exports = checkReactTypeSpec;
22545
22546/***/ }),
22547/* 197 */
22548/***/ (function(module, exports, __webpack_require__) {
22549
22550"use strict";
22551/**
22552 * Copyright (c) 2013-present, Facebook, Inc.
22553 *
22554 * This source code is licensed under the MIT license found in the
22555 * LICENSE file in the root directory of this source tree.
22556 *
22557 */
22558
22559
22560
22561var _require = __webpack_require__(75),
22562 Component = _require.Component;
22563
22564var _require2 = __webpack_require__(13),
22565 isValidElement = _require2.isValidElement;
22566
22567var ReactNoopUpdateQueue = __webpack_require__(78);
22568var factory = __webpack_require__(96);
22569
22570module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue);
22571
22572/***/ }),
22573/* 198 */
22574/***/ (function(module, exports, __webpack_require__) {
22575
22576"use strict";
22577/**
22578 * Copyright (c) 2013-present, Facebook, Inc.
22579 *
22580 * This source code is licensed under the MIT license found in the
22581 * LICENSE file in the root directory of this source tree.
22582 *
22583 *
22584 */
22585
22586
22587
22588var nextDebugID = 1;
22589
22590function getNextDebugID() {
22591 return nextDebugID++;
22592}
22593
22594module.exports = getNextDebugID;
22595
22596/***/ }),
22597/* 199 */
22598/***/ (function(module, exports, __webpack_require__) {
22599
22600"use strict";
22601/**
22602 * Copyright (c) 2013-present, Facebook, Inc.
22603 *
22604 * This source code is licensed under the MIT license found in the
22605 * LICENSE file in the root directory of this source tree.
22606 *
22607 */
22608
22609
22610var _prodInvariant = __webpack_require__(14);
22611
22612var ReactElement = __webpack_require__(13);
22613
22614var invariant = __webpack_require__(0);
22615
22616/**
22617 * Returns the first child in a collection of children and verifies that there
22618 * is only one child in the collection.
22619 *
22620 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only
22621 *
22622 * The current implementation of this function assumes that a single child gets
22623 * passed without a wrapper, but the purpose of this helper function is to
22624 * abstract away the particular structure of children.
22625 *
22626 * @param {?object} children Child collection structure.
22627 * @return {ReactElement} The first and only `ReactElement` contained in the
22628 * structure.
22629 */
22630function onlyChild(children) {
22631 !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0;
22632 return children;
22633}
22634
22635module.exports = onlyChild;
22636
22637/***/ }),
22638/* 200 */
22639/***/ (function(module, exports, __webpack_require__) {
22640
22641"use strict";
22642/**
22643 * Copyright (c) 2013-present, Facebook, Inc.
22644 *
22645 * This source code is licensed under the MIT license found in the
22646 * LICENSE file in the root directory of this source tree.
22647 *
22648 */
22649
22650
22651
22652var _prodInvariant = __webpack_require__(14);
22653
22654var ReactCurrentOwner = __webpack_require__(11);
22655var REACT_ELEMENT_TYPE = __webpack_require__(76);
22656
22657var getIteratorFn = __webpack_require__(79);
22658var invariant = __webpack_require__(0);
22659var KeyEscapeUtils = __webpack_require__(188);
22660var warning = __webpack_require__(1);
22661
22662var SEPARATOR = '.';
22663var SUBSEPARATOR = ':';
22664
22665/**
22666 * This is inlined from ReactElement since this file is shared between
22667 * isomorphic and renderers. We could extract this to a
22668 *
22669 */
22670
22671/**
22672 * TODO: Test that a single child and an array with one item have the same key
22673 * pattern.
22674 */
22675
22676var didWarnAboutMaps = false;
22677
22678/**
22679 * Generate a key string that identifies a component within a set.
22680 *
22681 * @param {*} component A component that could contain a manual key.
22682 * @param {number} index Index that is used if a manual key is not provided.
22683 * @return {string}
22684 */
22685function getComponentKey(component, index) {
22686 // Do some typechecking here since we call this blindly. We want to ensure
22687 // that we don't block potential future ES APIs.
22688 if (component && typeof component === 'object' && component.key != null) {
22689 // Explicit key
22690 return KeyEscapeUtils.escape(component.key);
22691 }
22692 // Implicit key determined by the index in the set
22693 return index.toString(36);
22694}
22695
22696/**
22697 * @param {?*} children Children tree container.
22698 * @param {!string} nameSoFar Name of the key path so far.
22699 * @param {!function} callback Callback to invoke with each child found.
22700 * @param {?*} traverseContext Used to pass information throughout the traversal
22701 * process.
22702 * @return {!number} The number of children in this subtree.
22703 */
22704function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
22705 var type = typeof children;
22706
22707 if (type === 'undefined' || type === 'boolean') {
22708 // All of the above are perceived as null.
22709 children = null;
22710 }
22711
22712 if (children === null || type === 'string' || type === 'number' ||
22713 // The following is inlined from ReactElement. This means we can optimize
22714 // some checks. React Fiber also inlines this logic for similar purposes.
22715 type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
22716 callback(traverseContext, children,
22717 // If it's the only child, treat the name as if it was wrapped in an array
22718 // so that it's consistent if the number of children grows.
22719 nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
22720 return 1;
22721 }
22722
22723 var child;
22724 var nextName;
22725 var subtreeCount = 0; // Count of children found in the current subtree.
22726 var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
22727
22728 if (Array.isArray(children)) {
22729 for (var i = 0; i < children.length; i++) {
22730 child = children[i];
22731 nextName = nextNamePrefix + getComponentKey(child, i);
22732 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
22733 }
22734 } else {
22735 var iteratorFn = getIteratorFn(children);
22736 if (iteratorFn) {
22737 var iterator = iteratorFn.call(children);
22738 var step;
22739 if (iteratorFn !== children.entries) {
22740 var ii = 0;
22741 while (!(step = iterator.next()).done) {
22742 child = step.value;
22743 nextName = nextNamePrefix + getComponentKey(child, ii++);
22744 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
22745 }
22746 } else {
22747 if (process.env.NODE_ENV !== 'production') {
22748 var mapsAsChildrenAddendum = '';
22749 if (ReactCurrentOwner.current) {
22750 var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
22751 if (mapsAsChildrenOwnerName) {
22752 mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
22753 }
22754 }
22755 process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;
22756 didWarnAboutMaps = true;
22757 }
22758 // Iterator will provide entry [k,v] tuples rather than values.
22759 while (!(step = iterator.next()).done) {
22760 var entry = step.value;
22761 if (entry) {
22762 child = entry[1];
22763 nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
22764 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
22765 }
22766 }
22767 }
22768 } else if (type === 'object') {
22769 var addendum = '';
22770 if (process.env.NODE_ENV !== 'production') {
22771 addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
22772 if (children._isReactElement) {
22773 addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.';
22774 }
22775 if (ReactCurrentOwner.current) {
22776 var name = ReactCurrentOwner.current.getName();
22777 if (name) {
22778 addendum += ' Check the render method of `' + name + '`.';
22779 }
22780 }
22781 }
22782 var childrenString = String(children);
22783 true ? process.env.NODE_ENV !== 'production' ? 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) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
22784 }
22785 }
22786
22787 return subtreeCount;
22788}
22789
22790/**
22791 * Traverses children that are typically specified as `props.children`, but
22792 * might also be specified through attributes:
22793 *
22794 * - `traverseAllChildren(this.props.children, ...)`
22795 * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
22796 *
22797 * The `traverseContext` is an optional argument that is passed through the
22798 * entire traversal. It can be used to store accumulations or anything else that
22799 * the callback might find relevant.
22800 *
22801 * @param {?*} children Children tree object.
22802 * @param {!function} callback To invoke upon traversing each child.
22803 * @param {?*} traverseContext Context for traversal.
22804 * @return {!number} The number of children in this subtree.
22805 */
22806function traverseAllChildren(children, callback, traverseContext) {
22807 if (children == null) {
22808 return 0;
22809 }
22810
22811 return traverseAllChildrenImpl(children, '', callback, traverseContext);
22812}
22813
22814module.exports = traverseAllChildren;
22815
22816/***/ }),
22817/* 201 */
22818/***/ (function(module, exports) {
22819
22820module.exports = require("body-parser");
22821
22822/***/ }),
22823/* 202 */
22824/***/ (function(module, exports) {
22825
22826module.exports = require("cookie");
22827
22828/***/ }),
22829/* 203 */
22830/***/ (function(module, exports) {
22831
22832module.exports = require("cookie-parser");
22833
22834/***/ }),
22835/* 204 */
22836/***/ (function(module, exports) {
22837
22838module.exports = require("esniff");
22839
22840/***/ }),
22841/* 205 */
22842/***/ (function(module, exports) {
22843
22844module.exports = require("express");
22845
22846/***/ }),
22847/* 206 */
22848/***/ (function(module, exports) {
22849
22850module.exports = require("fluent-logger");
22851
22852/***/ }),
22853/* 207 */
22854/***/ (function(module, exports) {
22855
22856module.exports = require("forcedomain");
22857
22858/***/ }),
22859/* 208 */
22860/***/ (function(module, exports) {
22861
22862module.exports = require("hoist-non-react-statics");
22863
22864/***/ }),
22865/* 209 */
22866/***/ (function(module, exports) {
22867
22868module.exports = require("morgan");
22869
22870/***/ }),
22871/* 210 */
22872/***/ (function(module, exports) {
22873
22874module.exports = require("parseurl");
22875
22876/***/ }),
22877/* 211 */
22878/***/ (function(module, exports) {
22879
22880module.exports = require("preconditions");
22881
22882/***/ }),
22883/* 212 */
22884/***/ (function(module, exports) {
22885
22886module.exports = require("querystring");
22887
22888/***/ }),
22889/* 213 */
22890/***/ (function(module, exports) {
22891
22892module.exports = require("react-redux");
22893
22894/***/ }),
22895/* 214 */
22896/***/ (function(module, exports) {
22897
22898module.exports = require("react-router");
22899
22900/***/ }),
22901/* 215 */
22902/***/ (function(module, exports) {
22903
22904module.exports = require("redux");
22905
22906/***/ }),
22907/* 216 */
22908/***/ (function(module, exports) {
22909
22910module.exports = require("redux-thunk");
22911
22912/***/ }),
22913/* 217 */
22914/***/ (function(module, exports) {
22915
22916module.exports = require("rotating-file-stream");
22917
22918/***/ }),
22919/* 218 */
22920/***/ (function(module, exports) {
22921
22922module.exports = require("url");
22923
22924/***/ }),
22925/* 219 */
22926/***/ (function(module, exports) {
22927
22928module.exports = require("winston");
22929
22930/***/ }),
22931/* 220 */
22932/***/ (function(module, exports) {
22933
22934module.exports = require("winston-daily-rotate-file");
22935
22936/***/ })
22937/******/ ]);
22938//# sourceMappingURL=catela.build.server.js.map
\No newline at end of file