UNPKG

753 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__(6);
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
489/**
490 * Copyright (c) 2013-present, Facebook, Inc.
491 *
492 * This source code is licensed under the MIT license found in the
493 * LICENSE file in the root directory of this source tree.
494 *
495 *
496 */
497
498function makeEmptyFunction(arg) {
499 return function () {
500 return arg;
501 };
502}
503
504/**
505 * This function accepts and discards inputs; it has no side effects. This is
506 * primarily useful idiomatically for overridable function endpoints which
507 * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
508 */
509var emptyFunction = function emptyFunction() {};
510
511emptyFunction.thatReturns = makeEmptyFunction;
512emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
513emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
514emptyFunction.thatReturnsNull = makeEmptyFunction(null);
515emptyFunction.thatReturnsThis = function () {
516 return this;
517};
518emptyFunction.thatReturnsArgument = function (arg) {
519 return arg;
520};
521
522module.exports = emptyFunction;
523
524/***/ }),
525/* 7 */
526/***/ (function(module, exports, __webpack_require__) {
527
528"use strict";
529/**
530 * Copyright (c) 2016-present, Facebook, Inc.
531 *
532 * This source code is licensed under the MIT license found in the
533 * LICENSE file in the root directory of this source tree.
534 *
535 *
536 */
537
538
539
540// Trust the developer to only use ReactInstrumentation with a __DEV__ check
541
542var debugTool = null;
543
544if (process.env.NODE_ENV !== 'production') {
545 var ReactDebugTool = __webpack_require__(144);
546 debugTool = ReactDebugTool;
547}
548
549module.exports = { debugTool: debugTool };
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__(149);
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__(6);
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__(159);
2757var ReactInstrumentation = __webpack_require__(7);
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__(189);
2991var ReactDOMFactories = __webpack_require__(190);
2992var ReactElement = __webpack_require__(13);
2993var ReactPropTypes = __webpack_require__(192);
2994var ReactVersion = __webpack_require__(194);
2995
2996var createReactClass = __webpack_require__(196);
2997var onlyChild = __webpack_require__(198);
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__(125);
3678var ReactDOMComponentTree = __webpack_require__(4);
3679var ReactInstrumentation = __webpack_require__(7);
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__(147);
4620var ViewportMetrics = __webpack_require__(65);
4621
4622var getVendorPrefixedEventName = __webpack_require__(184);
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__(6);
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__(96)(); // 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__(6);
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__(119);
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__(7);
6398
6399var quoteAttributeValueForBrowser = __webpack_require__(185);
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__(6);
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__(139);
7033
7034var containsNode = __webpack_require__(106);
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__(7);
7183var ReactServerUpdateQueue = __webpack_require__(162);
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__(7);
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__(132);
7797var ReactEmptyComponent = __webpack_require__(59);
7798var ReactHostComponent = __webpack_require__(60);
7799
7800var getNextDebugID = __webpack_require__(197);
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__(146);
8083
8084var getIteratorFn = __webpack_require__(182);
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__(195);
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__(90);
8846
8847var _async = __webpack_require__(80);
8848
8849var _async2 = _interopRequireDefault(_async);
8850
8851var _cookie = __webpack_require__(201);
8852
8853var _cookie2 = _interopRequireDefault(_cookie);
8854
8855var _bodyParser = __webpack_require__(200);
8856
8857var _bodyParser2 = _interopRequireDefault(_bodyParser);
8858
8859var _cookieParser = __webpack_require__(202);
8860
8861var _cookieParser2 = _interopRequireDefault(_cookieParser);
8862
8863var _express = __webpack_require__(204);
8864
8865var _express2 = _interopRequireDefault(_express);
8866
8867var _InternationalizationHandler = __webpack_require__(94);
8868
8869var _InternationalizationHandler2 = _interopRequireDefault(_InternationalizationHandler);
8870
8871var _UniversalPageHandler = __webpack_require__(93);
8872
8873var _UniversalPageHandler2 = _interopRequireDefault(_UniversalPageHandler);
8874
8875var _path = __webpack_require__(82);
8876
8877var _path2 = _interopRequireDefault(_path);
8878
8879var _preconditions = __webpack_require__(209);
8880
8881var _preconditions2 = _interopRequireDefault(_preconditions);
8882
8883var _querystring = __webpack_require__(210);
8884
8885var _querystring2 = _interopRequireDefault(_querystring);
8886
8887var _react = __webpack_require__(46);
8888
8889var _react2 = _interopRequireDefault(_react);
8890
8891var _server = __webpack_require__(186);
8892
8893var _reactRedux = __webpack_require__(211);
8894
8895var _reactRouter = __webpack_require__(212);
8896
8897var _redux = __webpack_require__(213);
8898
8899var _reduxThunk = __webpack_require__(214);
8900
8901var _reduxThunk2 = _interopRequireDefault(_reduxThunk);
8902
8903var _SimpleHtmlRenderer = __webpack_require__(92);
8904
8905var _SimpleHtmlRenderer2 = _interopRequireDefault(_SimpleHtmlRenderer);
8906
8907var _core = __webpack_require__(88);
8908
8909var _resolveToString = __webpack_require__(101);
8910
8911var _resolveToString2 = _interopRequireDefault(_resolveToString);
8912
8913var _forcedomain = __webpack_require__(205);
8914
8915var _forcedomain2 = _interopRequireDefault(_forcedomain);
8916
8917var _url = __webpack_require__(216);
8918
8919var _url2 = _interopRequireDefault(_url);
8920
8921var _rotatingFileStream = __webpack_require__(215);
8922
8923var _rotatingFileStream2 = _interopRequireDefault(_rotatingFileStream);
8924
8925var _morgan = __webpack_require__(207);
8926
8927var _morgan2 = _interopRequireDefault(_morgan);
8928
8929var _fs = __webpack_require__(81);
8930
8931var _fs2 = _interopRequireDefault(_fs);
8932
8933var _parseurl = __webpack_require__(208);
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
8951var ExpressUniversalApplicationServer = function () {
8952 function ExpressUniversalApplicationServer(options) {
8953 _classCallCheck(this, ExpressUniversalApplicationServer);
8954
8955 var pc = _preconditions2.default.instance(options);
8956 pc.shouldBeDefined('port', 'port must be defined.');
8957 pc.shouldBeDefined('rootApplicationPath', 'rootApplicationPath must be defined.');
8958 pc.shouldBeDefined('rootDeploymentApplicationPath', 'rootDeploymentApplicationPath must be defined.');
8959 this._options = options;
8960 this._app = (0, _express2.default)();
8961 this._routes = this.getRoutes();
8962 this._reducers = this.getReducers();
8963 this._initialize();
8964 }
8965
8966 _createClass(ExpressUniversalApplicationServer, [{
8967 key: '_initialize',
8968 value: function _initialize() {
8969 // this._setupRequestLogMiddleware()
8970 this._setupForceDomain();
8971 this._setupAssetsServing();
8972 this._setupCookieParser();
8973 this._setupBodyParser();
8974 this._setupHtmlRenderer();
8975 this._setupInternationalizedRoutes();
8976 this._setupI18nHandler();
8977 }
8978 }, {
8979 key: '_setupRequestLogMiddleware',
8980 value: function _setupRequestLogMiddleware() {
8981 var logDirectory = '/logs/' + project.applicationName;
8982 _fs2.default.existsSync(logDirectory) || _fs2.default.mkdirSync(logDirectory);
8983
8984 function pad(num) {
8985 return (num > 9 ? '' : '0') + num;
8986 }
8987
8988 function generator(time, index) {
8989 logger.info('[GENERATOR] Request log rotation ' + time + '-' + index);
8990 if (!time) {
8991 // return request.log
8992 }
8993
8994 var yearMonth = time.getFullYear() + '-' + pad(time.getMonth() + 1);
8995 var day = pad(time.getDate());
8996 var hour = pad(time.getHours());
8997 var minute = pad(time.getMinutes());
8998 var seconds = pad(time.getSeconds());
8999
9000 logger.info('[GENERATOR] ' + logDirectory + '/request-' + yearMonth + '-' + day + '-' + hour + '-' + minute + '-' + seconds + '.log.gz');
9001
9002 return 'request-' + yearMonth + '-' + day + '-' + hour + '-' + minute + '-' + seconds + 'log.gz';
9003 }
9004
9005 this._accessLogStream = (0, _rotatingFileStream2.default)(generator, {
9006 path: logDirectory,
9007 compress: true,
9008 interval: '10s',
9009 rotate: 7
9010 });
9011
9012 logger.info('Setting up morgan (Request Log Middleware)');
9013 this._app.use((0, _morgan2.default)('combined', { stream: this._accessLogStream }));
9014 }
9015 }, {
9016 key: '_setupAssetsServing',
9017 value: function _setupAssetsServing() {
9018 console.log(_path2.default.join(this._options.rootDeploymentApplicationPath, 'build', this._options.environment, 'client'));
9019 // TODO : this should be configurable, but we hard code it for now
9020 logger.info('Using ' + _path2.default.join(this._options.rootDeploymentApplicationPath, 'build', this._options.environment, 'client') + ', with /assets as assets serving routes');
9021 this._app.use('/assets', _express2.default.static(_path2.default.join(this._options.rootDeploymentApplicationPath, 'build', this._options.environment, 'client')));
9022
9023 logger.info('Using ' + _path2.default.join(this._options.rootDeploymentApplicationPath, 'build', this._options.environment, 'server', 'debugging') + ', with /__dev/assets/server/debugging as server-debugging serving routes');
9024 this._app.use('/__dev/assets/server/debugging', _express2.default.static(_path2.default.join(this._options.rootDeploymentApplicationPath, 'build', this._options.environment, 'server', 'debugging')));
9025
9026 // TODO : this should be configurable, but we hard code it for now
9027 logger.info('Using ' + _path2.default.join(this._options.rootDeploymentApplicationPath, 'assets') + ', with /assets/static as static non-compileable assets serving routes');
9028 this._app.use('/assets/static', _express2.default.static(_path2.default.join(this._options.rootDeploymentApplicationPath, 'assets')));
9029 }
9030 }, {
9031 key: '_setupCookieParser',
9032 value: function _setupCookieParser() {
9033 this._app.use((0, _cookieParser2.default)());
9034 }
9035 }, {
9036 key: '_setupBodyParser',
9037 value: function _setupBodyParser() {
9038 this._app.use(_bodyParser2.default.urlencoded({ extended: true }));
9039 this._app.use(_bodyParser2.default.json());
9040 }
9041 }, {
9042 key: '_setupHtmlRenderer',
9043 value: function _setupHtmlRenderer() {
9044 var htmlRendererOptions = {
9045 path: _path2.default.join(this._options.rootDeploymentApplicationPath, 'html'),
9046 cache: !(this._options.environment === 'development')
9047 };
9048 this._renderer = new _SimpleHtmlRenderer2.default(htmlRendererOptions);
9049 }
9050 }, {
9051 key: '_setupInternationalizedRoutes',
9052 value: function _setupInternationalizedRoutes() {
9053 var finalRoutes = null;
9054 var originalRoutes = this.getRoutes();
9055 var generatedRoutes = [];
9056 this._options.locales.forEach(function (locale) {
9057 var internationalRoute = _react2.default.createElement(
9058 _reactRouter.Route,
9059 { key: locale, path: locale, component: _InternationalizationHandler2.default },
9060 originalRoutes
9061 );
9062 generatedRoutes.push(internationalRoute);
9063 });
9064
9065 generatedRoutes.push(originalRoutes);
9066
9067 finalRoutes = _react2.default.createElement(
9068 _reactRouter.Route,
9069 { path: '/', component: _UniversalPageHandler2.default },
9070 generatedRoutes.map(function (route) {
9071 return route;
9072 })
9073 );
9074
9075 this._routes = finalRoutes;
9076 }
9077 }, {
9078 key: '_setupI18nHandler',
9079 value: function _setupI18nHandler() {
9080 var _this = this;
9081
9082 this._app.use(function (req, res, next) {
9083 var match = LOCALE_REGEX.exec(req.url);
9084 var url = null;
9085 if (match != null) {
9086 var lang = match[1];
9087 var country = match[2];
9088 url = match[3];
9089 req.locale = lang + '-' + country;
9090 } else {
9091 req.locale = LOCALE_DEFAULT;
9092 }
9093 if (_this._options.locales.indexOf(req.locale) >= 0) {
9094 next();
9095 } else {
9096 if (_this._options.locales.length === 0) {
9097 next();
9098 } else {
9099 if (url == null || typeof url === 'undefined' || url.length === 0) {
9100 res.redirect('/');
9101 } else {
9102 res.redirect(url);
9103 }
9104 }
9105 }
9106 });
9107 }
9108 }, {
9109 key: '_isIP',
9110 value: function _isIP(host) {
9111 var ipRegex = /^(?!0)(?!.*\.$)((1?\d?\d|25[0-5]|2[0-4]\d)(\.|$)){4}$/;
9112 return ipRegex.test(host);
9113 }
9114 }, {
9115 key: '_setupForceDomain',
9116 value: function _setupForceDomain() {
9117 var protocol = 'http';
9118 if (this._options.forceHttps === true) {
9119 protocol = 'https';
9120 }
9121 var hostName = this._stripProtocol(this._options.applicationHost);
9122 if (!this._isIP(hostName)) {
9123 var parsedApplicationHost = _url2.default.parse(this._options.applicationHost);
9124 if (parsedApplicationHost.port == null) {
9125 this._app.use((0, _forcedomain2.default)({
9126 hostname: parsedApplicationHost.host,
9127 protocol: protocol
9128 }));
9129 }
9130 }
9131 }
9132 }, {
9133 key: '_stripProtocol',
9134 value: function _stripProtocol(url) {
9135 if (url != null && typeof url !== 'undefined') {
9136 var result = url.replace(/.*?:\/\//g, '');
9137 return result;
9138 }
9139 return null;
9140 }
9141 }, {
9142 key: '_handleError500',
9143 value: function _handleError500(message, err, res) {
9144 logger.error(message, err);
9145 if (this._options.environment === 'production') {
9146 res.redirect(this.getErrorHandler());
9147 } else {
9148 var error = '<br />';
9149 if (this._options.environment === 'development') {
9150 if (err != null && typeof err !== 'undefined') {
9151 error += err.stack;
9152 }
9153 }
9154 error = error.replace('\n', '<br />');
9155 this._renderer.render('500.html', function (err, rendered) {
9156 if (err) {
9157 logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 500.', err);
9158 return res.status(500).end('An unknown error occurred when trying to render error 500\n' + err.stack);
9159 } else {
9160 return res.status(500).end((0, _resolveToString2.default)(rendered, { ERROR: error }));
9161 }
9162 });
9163 }
9164 }
9165 }, {
9166 key: '_handleNotFound404',
9167 value: function _handleNotFound404(res) {
9168 this._renderer.render('404.html', function (err, rendered) {
9169 if (err) {
9170 logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 404.', err);
9171 return res.status(500).end('An unknown error occurred when trying to render error 404\n' + err.stack);
9172 } else {
9173 return res.status(404).end((0, _resolveToString2.default)(rendered, {}));
9174 }
9175 });
9176 }
9177 }, {
9178 key: '_runFilterPreFetchStage',
9179 value: function _runFilterPreFetchStage(filterQueue, renderProps, renderedServerComponents, req, res, context) {
9180 var _this2 = this;
9181
9182 if (filterQueue.length > 0) {
9183 var filterFnQueue = [];
9184 filterQueue.reverse().forEach(function (filterFn) {
9185 filterFnQueue.push(function (callback) {
9186 var filterCallContext = {
9187 get: function get() {
9188 return context;
9189 },
9190 next: function next(booleanResult) {
9191 if (typeof booleanResult === 'undefined' || booleanResult == null) {
9192 booleanResult = true;
9193 }
9194 callback(null, booleanResult);
9195 },
9196 redirect: function redirect(_redirect) {
9197 callback({ type: 'REDIRECTION', redirect: _redirect }, false);
9198 },
9199 notFound: function notFound() {
9200 callback({ type: 'NOT_FOUND' }, false);
9201 },
9202 abortWithError: function abortWithError() {
9203 callback({ type: 'SERVER_ERROR' }, false);
9204 }
9205 };
9206 filterFn(filterCallContext);
9207 });
9208 });
9209 _async2.default.series(filterFnQueue, function (err, results) {
9210 if (err) {
9211 if (err.type === 'REDIRECTION') {
9212 return res.redirect(err.redirect);
9213 } else if (err.type === 'NOT_FOUND') {
9214 _this2._renderer.render('404.html', function (err, rendered) {
9215 if (err) {
9216 logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 404.', err);
9217 return res.status(500).end('An unknown error occurred when trying to render error 404\n' + err.stack);
9218 } else {
9219 return res.status(404).end((0, _resolveToString2.default)(rendered, {}));
9220 }
9221 });
9222 } else if (err.type === 'SERVER_ERROR') {
9223 _this2._renderer.render('500.html', function (err, rendered) {
9224 if (err) {
9225 logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 500.', err);
9226 return res.status(500).end('An unknown error occurred when trying to render error 500\n' + err.stack);
9227 } else {
9228 return res.status(500).end((0, _resolveToString2.default)(rendered, {}));
9229 }
9230 });
9231 } else {
9232 _this2._renderer.render('500.html', function (err, rendered) {
9233 if (err) {
9234 logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 500.', err);
9235 return res.status(500).end('An unknown error occurred when trying to render error 500\n' + err.stack);
9236 } else {
9237 return res.status(500).end((0, _resolveToString2.default)(rendered, {}));
9238 }
9239 });
9240 }
9241 } else {
9242 _this2._runFetchStage(renderProps, renderedServerComponents, req, res, context);
9243 }
9244 });
9245 } else {
9246 this._runFetchStage(renderProps, renderedServerComponents, req, res, context);
9247 }
9248 }
9249 }, {
9250 key: '_runFetchStage',
9251 value: function _runFetchStage(renderProps, renderedServerComponents, req, res, context) {
9252 var _this3 = this;
9253
9254 var fetchDataQueue = [];
9255 var dataContextObject = {};
9256
9257 renderedServerComponents.forEach(function (rsc) {
9258 if (rsc.__fetchData != null && typeof rsc.__fetchData !== 'undefined') {
9259 var fnFetchCall = function fnFetchCall(callback) {
9260 setTimeout(function () {
9261 rsc.__fetchData(dataContextObject, context, callback);
9262 }, 1);
9263 };
9264 fetchDataQueue.push(fnFetchCall);
9265 }
9266 });
9267
9268 var reducers = this._reducers;
9269
9270 _async2.default.series(fetchDataQueue, function (err, results) {
9271 if (err) {
9272 return _this3._handleError500('[FETCH_DATA_ERROR] An unknown error occurred when trying to fetch data.', err, res);
9273 } else {
9274 var fetchedDataContext = {};
9275 results.forEach(function (result) {
9276 fetchedDataContext = _extends({}, fetchedDataContext, result);
9277 });
9278
9279 var allReducers = _extends({}, reducers, {
9280 view: _core.serverFetchReducer
9281 });
9282 var store = createStoreWithMiddleware((0, _redux.combineReducers)(allReducers));
9283
9284 store.dispatch({
9285 type: '__SET_VIEW_STATE__',
9286 data: fetchedDataContext
9287 });
9288
9289 var InitialComponent = _react2.default.createElement(
9290 _reactRedux.Provider,
9291 { store: store },
9292 _react2.default.createElement(_reactRouter.RouterContext, renderProps)
9293 );
9294
9295 var postFetchFilterQueue = [];
9296
9297 renderedServerComponents.forEach(function (rsc) {
9298 if (rsc.__postFetchFilter != null && typeof rsc.__postFetchFilter !== 'undefined') {
9299 postFetchFilterQueue = postFetchFilterQueue.concat(rsc.__postFetchFilter);
9300 }
9301 });
9302 _this3._runFilterPostFetchStage(postFetchFilterQueue, store, InitialComponent, renderedServerComponents, req, res, context);
9303 }
9304 });
9305 }
9306 }, {
9307 key: '_runFilterPostFetchStage',
9308 value: function _runFilterPostFetchStage(filterQueue, _store, InitialComponent, renderedServerComponents, req, res, context) {
9309 var _this4 = this;
9310
9311 if (filterQueue.length > 0) {
9312 var filterFnQueue = [];
9313 filterQueue.reverse().forEach(function (filterFn) {
9314 filterFnQueue.push(function (callback) {
9315 var filterCallContext = {
9316 store: function store() {
9317 return _store.getState().view;
9318 },
9319 get: function get() {
9320 return context;
9321 },
9322 next: function next(booleanResult) {
9323 if (typeof booleanResult === 'undefined' || booleanResult == null) {
9324 booleanResult = true;
9325 }
9326 callback(null, booleanResult);
9327 },
9328 redirect: function redirect(_redirect2) {
9329 callback({ type: 'REDIRECTION', redirect: _redirect2 }, false);
9330 },
9331 notFound: function notFound() {
9332 callback({ type: 'NOT_FOUND' }, false);
9333 }
9334 };
9335 filterFn(filterCallContext);
9336 });
9337 });
9338 _async2.default.series(filterFnQueue, function (err, results) {
9339 if (err) {
9340 if (err.type === 'REDIRECTION') {
9341 return res.redirect(err.redirect);
9342 } else if (err.type === 'NOT_FOUND') {
9343 _this4._renderer.render('404.html', function (err, rendered) {
9344 if (err) {
9345 logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 404.', err);
9346 return res.status(500).end('An unknown error occurred when trying to render error 404\n' + err.stack);
9347 } else {
9348 return res.status(404).end((0, _resolveToString2.default)(rendered, {}));
9349 }
9350 });
9351 } else {
9352 // TODO what case need to be handled?
9353 }
9354 } else {
9355 _this4._runRenderStage(_store, InitialComponent, renderedServerComponents, req, res, context);
9356 }
9357 });
9358 } else {
9359 this._runRenderStage(_store, InitialComponent, renderedServerComponents, req, res, context);
9360 }
9361 }
9362 }, {
9363 key: '_createCookieSerializationOption',
9364 value: function _createCookieSerializationOption(header) {
9365 var option = {
9366 path: header.path,
9367 domain: header.domain,
9368 version: header.version
9369 };
9370
9371 if (header.maxAge > 0) {
9372 option.maxAge = header.maxAge;
9373 }
9374
9375 return option;
9376 }
9377 }, {
9378 key: '_runSendResponseStage',
9379 value: function _runSendResponseStage(res, PAGE_HTML, context) {
9380 var _this5 = this;
9381
9382 var responseCookies = context.response.cookies;
9383 var responseHeaders = context.response.headers.cookies;
9384
9385 Object.keys(responseCookies).forEach(function (krc) {
9386 var __cookie = responseCookies[krc];
9387 var __cookieHeader = {};
9388 if (responseHeaders != null && typeof responseHeaders !== 'undefined') {
9389 __cookieHeader = responseHeaders[krc];
9390 }
9391 if (__cookie != null && typeof __cookie !== 'undefined') {
9392 var serializedCookie = _cookie2.default.serialize(krc, __cookie, _this5._createCookieSerializationOption(__cookieHeader));
9393 res.append('Set-Cookie', serializedCookie);
9394 }
9395 });
9396 res.end(PAGE_HTML);
9397 }
9398 }, {
9399 key: '_runRenderStage',
9400 value: function _runRenderStage(store, InitialComponent, renderedServerComponents, req, res, context) {
9401 var _this6 = this;
9402
9403 var finalRenderPage = 'main.html';
9404 renderedServerComponents.forEach(function (rsc) {
9405 if (rsc.__renderPage != null && typeof rsc.__renderPage !== 'undefined') {
9406 finalRenderPage = rsc.__renderPage;
9407 }
9408 });
9409 var renderBindFnQueue = [];
9410 renderedServerComponents.forEach(function (rsc) {
9411 if (rsc.__renderBindFn != null && typeof rsc.__renderBindFn !== 'undefined') {
9412 var bindFnCall = function bindFnCall(callback) {
9413 setTimeout(function () {
9414 rsc.__renderBindFn(store.getState(), context, callback);
9415 }, 1);
9416 };
9417 renderBindFnQueue.push(bindFnCall);
9418 }
9419 });
9420
9421 if (renderBindFnQueue.length > 0) {
9422 _async2.default.series(renderBindFnQueue, function (err, results) {
9423 if (err) {
9424 return _this6._handleError500('[RENDER_BIND_PHASE] FATAL_ERROR in render data binding phase.', err, res);
9425 } else {
9426 _this6._renderer.render(finalRenderPage, function (err, rendered) {
9427 if (err) {
9428 return _this6._handleError500('[RENDER_VIEW_PHASE] FATAL_ERROR in render view template phase.', err, res);
9429 } else {
9430 var bindData = {};
9431 if (results != null && typeof results !== 'undefined') {
9432 results.forEach(function (r) {
9433 bindData = _extends({}, bindData, r);
9434 });
9435 }
9436 try {
9437 var HTML = (0, _server.renderToStaticMarkup)(InitialComponent);
9438 var PAGE_HTML = (0, _resolveToString2.default)(rendered, _extends({}, bindData, {
9439 HTML: HTML,
9440 DATA: store.getState()
9441 }), { partial: true });
9442 return _this6._runSendResponseStage(res, PAGE_HTML, context);
9443 } catch (err) {
9444 return _this6._handleError500('[RENDER_STATIC_MARKUP_PHASE] FATAL_ERROR in render staticMarkup phase.', err, res);
9445 }
9446 }
9447 });
9448 }
9449 });
9450 } else {
9451 this._renderer.render(finalRenderPage, function (err, rendered) {
9452 if (err) {
9453 return _this6._handleError500('[RENDER_VIEW_PHASE] FATAL_ERROR in render view template phase.', err, res);
9454 } else {
9455 var bindData = {};
9456 try {
9457 var HTML = (0, _server.renderToStaticMarkup)(InitialComponent);
9458 var PAGE_HTML = (0, _resolveToString2.default)(rendered, _extends({}, bindData, {
9459 HTML: HTML,
9460 DATA: store.getState()
9461 }), { partial: true });
9462 return _this6._runSendResponseStage(res, PAGE_HTML, context);
9463 } catch (err) {
9464 return _this6._handleError500('[RENDER_STATIC_MARKUP_PHASE] FATAL_ERROR in render staticMarkup phase.', err, res);
9465 }
9466 }
9467 });
9468 }
9469 }
9470 }, {
9471 key: '_importRequestCookie',
9472 value: function _importRequestCookie(context, req) {
9473 var cookies = req.cookies;
9474 Object.keys(cookies).forEach(function (ck) {
9475 context.request.cookies[ck] = req.cookies[ck];
9476 });
9477 }
9478 }, {
9479 key: '_handleHealthCheck',
9480 value: function _handleHealthCheck(res) {
9481 return res.status(200).send('ok');
9482 }
9483 }, {
9484 key: '_setupRoutingHandler',
9485 value: function _setupRoutingHandler() {
9486 var _this7 = this;
9487
9488 var routes = this._routes;
9489 this._app.use(function (req, res) {
9490 var location = req.url;
9491 var pathname = (0, _parseurl2.default)(req).pathname;
9492 var locale = req.locale;
9493
9494 if (req.url == '/healthz') {
9495 return _this7._handleHealthCheck(res);
9496 }
9497
9498 logger.info('[HANDLING_ROUTE] path: ' + req.url + ', locale: ' + locale);
9499 (0, _reactRouter.match)({ routes: routes, location: location }, function (err, redirectLocation, renderProps) {
9500 if (err) {
9501 return _this7._handleError500('[MATCH_ROUTE_FATAL_ERROR] An unknown error occurred when trying to match routes.', err, res);
9502 }
9503
9504 if (!renderProps) {
9505 logger.info('[ROUTE_NOT_FOUND] path: ' + req.url + ', locale: ' + locale);
9506 return _this7._handleNotFound404(res);
9507 }
9508
9509 var query = {};
9510 var queryStringMatch = QS_REGEX.exec(renderProps.location.search);
9511 var queryString = '';
9512 if (queryStringMatch != null && typeof queryStringMatch !== 'undefined') {
9513 queryString = queryStringMatch[1];
9514 }
9515 if (queryString != null && typeof queryString !== 'undefined') {
9516 query = _querystring2.default.parse(queryString);
9517 }
9518
9519 var simplifiedRoutes = {
9520 name: renderProps.routes[renderProps.routes.length - 1].name,
9521 path: renderProps.routes[renderProps.routes.length - 1].path
9522 };
9523
9524 var context = {
9525 host: _this7._options.applicationHost,
9526 url: req.url,
9527 path: pathname,
9528 locale: locale,
9529 params: renderProps.params,
9530 query: query,
9531 routes: simplifiedRoutes,
9532 environment: _this7._options.environment,
9533 server: true,
9534 client: false,
9535 useragent: req.useragent,
9536 request: {
9537 cookies: {},
9538 headers: {}
9539 },
9540 response: {
9541 cookies: {},
9542 headers: {}
9543 }
9544 };
9545
9546 _this7._importRequestCookie(context, req);
9547
9548 var renderedServerComponents = renderProps.components;
9549 var preFetchFilterQueue = [];
9550
9551 renderedServerComponents.forEach(function (rsc) {
9552 if (rsc.__preFetchFilter != null && typeof rsc.__preFetchFilter !== 'undefined') {
9553 preFetchFilterQueue = preFetchFilterQueue.concat(rsc.__preFetchFilter);
9554 }
9555 });
9556
9557 _this7._runFilterPreFetchStage(preFetchFilterQueue, renderProps, renderedServerComponents, req, res, context);
9558 });
9559 });
9560 }
9561 }, {
9562 key: 'app',
9563 value: function app() {
9564 return this._app;
9565 }
9566 }, {
9567 key: 'getErrorHandler',
9568 value: function getErrorHandler() {
9569 return '/';
9570 }
9571 }, {
9572 key: 'run',
9573 value: function run() {
9574 var _this8 = this;
9575
9576 this._setupRoutingHandler();
9577 this._app.listen(this._options.port, function (err) {
9578 if (err) logger.error(err);else {
9579 logger.info('[EXPRESS_UNIVERSAL_APPLICATION_SERVER] Server listening on port : ' + _this8._options.port);
9580 }
9581 });
9582
9583 var pingApp = (0, _express2.default)();
9584 pingApp.use('/ping', function (req, res) {
9585 res.end('pong');
9586 });
9587 pingApp.listen(this._options.pingPort, function (err) {
9588 if (err) logger.error(err);else {
9589 logger.info('[EXPRESS_UNIVERSAL_APPLICATION_SERVER] Ping server listening on port : ' + _this8._options.pingPort);
9590 }
9591 });
9592 }
9593 }]);
9594
9595 return ExpressUniversalApplicationServer;
9596}();
9597
9598exports.default = ExpressUniversalApplicationServer;
9599module.exports = exports['default'];
9600
9601/***/ }),
9602/* 84 */
9603/***/ (function(module, exports, __webpack_require__) {
9604
9605"use strict";
9606
9607
9608Object.defineProperty(exports, "__esModule", {
9609 value: true
9610});
9611
9612var _ExpressUniversalApplicationServer = __webpack_require__(83);
9613
9614var _ExpressUniversalApplicationServer2 = _interopRequireDefault(_ExpressUniversalApplicationServer);
9615
9616function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9617
9618exports.default = {
9619 CatelaApplicationServer: _ExpressUniversalApplicationServer2.default
9620};
9621module.exports = exports['default'];
9622
9623/***/ }),
9624/* 85 */
9625/***/ (function(module, exports, __webpack_require__) {
9626
9627"use strict";
9628
9629
9630Object.defineProperty(exports, "__esModule", {
9631 value: true
9632});
9633
9634var _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; }; }();
9635
9636function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
9637
9638var DataFetch = function () {
9639 function DataFetch() {
9640 _classCallCheck(this, DataFetch);
9641 }
9642
9643 _createClass(DataFetch, [{
9644 key: "fetch",
9645 value: function fetch(store, context, callback) {}
9646 }]);
9647
9648 return DataFetch;
9649}();
9650
9651exports.default = DataFetch;
9652module.exports = exports["default"];
9653
9654/***/ }),
9655/* 86 */
9656/***/ (function(module, exports, __webpack_require__) {
9657
9658"use strict";
9659
9660
9661Object.defineProperty(exports, "__esModule", {
9662 value: true
9663});
9664
9665var _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; }; }();
9666
9667var _DataFetch2 = __webpack_require__(85);
9668
9669var _DataFetch3 = _interopRequireDefault(_DataFetch2);
9670
9671function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9672
9673function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
9674
9675function _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; }
9676
9677function _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; }
9678
9679var FetchableInstance = function (_DataFetch) {
9680 _inherits(FetchableInstance, _DataFetch);
9681
9682 function FetchableInstance(FetchClass) {
9683 _classCallCheck(this, FetchableInstance);
9684
9685 var _this = _possibleConstructorReturn(this, (FetchableInstance.__proto__ || Object.getPrototypeOf(FetchableInstance)).call(this));
9686
9687 _this._innerFetchInstance = new FetchClass();
9688 _this._innerFetchInstance.disableClient = FetchClass.disableClient;
9689 return _this;
9690 }
9691
9692 _createClass(FetchableInstance, [{
9693 key: 'fetch',
9694 value: function fetch(store, context, callback) {
9695 this._innerFetchInstance.fetch(store, context, function (err, results) {
9696 callback(err, results);
9697 });
9698 }
9699 }, {
9700 key: 'disableClient',
9701 value: function disableClient() {
9702 return this._innerFetchInstance.disableClient;
9703 }
9704 }]);
9705
9706 return FetchableInstance;
9707}(_DataFetch3.default);
9708
9709exports.default = FetchableInstance;
9710module.exports = exports['default'];
9711
9712/***/ }),
9713/* 87 */
9714/***/ (function(module, exports, __webpack_require__) {
9715
9716"use strict";
9717
9718
9719Object.defineProperty(exports, "__esModule", {
9720 value: true
9721});
9722
9723var _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; }; }();
9724
9725var _FetchableInstance = __webpack_require__(86);
9726
9727var _FetchableInstance2 = _interopRequireDefault(_FetchableInstance);
9728
9729function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9730
9731function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
9732
9733var FetchableInstanceFactory = function () {
9734 function FetchableInstanceFactory() {
9735 _classCallCheck(this, FetchableInstanceFactory);
9736
9737 this._dataFetchInstanceCache = new Map();
9738 }
9739
9740 _createClass(FetchableInstanceFactory, [{
9741 key: 'getFetchableInstance',
9742 value: function getFetchableInstance(FetchClass) {
9743 var construct = true;
9744 if (FetchClass.KeyProperty != null && typeof FetchClass.KeyProperty !== 'undefined') {
9745 if (FetchClass.EnableCache === true) {
9746 if (this._dataFetchInstanceCache.get(FetchClass.Key) != null && typeof FetchClass.Key !== 'undefined') {
9747 construct = false;
9748 }
9749 }
9750 }
9751 if (construct) {
9752 var fetchableInstance = new _FetchableInstance2.default(FetchClass);
9753 this._dataFetchInstanceCache.set(FetchClass.KeyProperty, fetchableInstance);
9754 return fetchableInstance;
9755 } else {
9756 return this._dataFetchInstanceCache.get(FetchClass.Key);
9757 }
9758 }
9759 }]);
9760
9761 return FetchableInstanceFactory;
9762}();
9763
9764exports.default = FetchableInstanceFactory;
9765module.exports = exports['default'];
9766
9767/***/ }),
9768/* 88 */
9769/***/ (function(module, exports, __webpack_require__) {
9770
9771"use strict";
9772
9773
9774Object.defineProperty(exports, "__esModule", {
9775 value: true
9776});
9777
9778var _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; };
9779
9780var _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; }; }();
9781
9782var _async = __webpack_require__(80);
9783
9784var _async2 = _interopRequireDefault(_async);
9785
9786var _FetchableInstanceFactory = __webpack_require__(87);
9787
9788var _FetchableInstanceFactory2 = _interopRequireDefault(_FetchableInstanceFactory);
9789
9790var _hoistNonReactStatics = __webpack_require__(206);
9791
9792var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
9793
9794function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9795
9796function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
9797
9798function _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; }
9799
9800function _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; }
9801
9802var fetchableInstanceFactory = new _FetchableInstanceFactory2.default();
9803
9804function getDisplayName(WrappedComponent) {
9805 return WrappedComponent.displayName || WrappedComponent.name || 'Component';
9806}
9807
9808function fetch(fetchClasses) {
9809 return function wrapWithFetch(WrappedComponent) {
9810 var fetchableDisplayName = 'Fetchable(' + getDisplayName(WrappedComponent) + ')';
9811
9812 var FetchableWrappedComponent = function (_WrappedComponent) {
9813 _inherits(FetchableWrappedComponent, _WrappedComponent);
9814
9815 function FetchableWrappedComponent(props, context) {
9816 _classCallCheck(this, FetchableWrappedComponent);
9817
9818 var _this = _possibleConstructorReturn(this, (FetchableWrappedComponent.__proto__ || Object.getPrototypeOf(FetchableWrappedComponent)).call(this, props, context));
9819
9820 _this.fetch = {};
9821 _this.model = _this.context.model;
9822 return _this;
9823 }
9824
9825 _createClass(FetchableWrappedComponent, [{
9826 key: 'render',
9827 value: function render() {
9828 return this.__innerRender();
9829 }
9830 }]);
9831
9832 return FetchableWrappedComponent;
9833 }(WrappedComponent);
9834
9835 FetchableWrappedComponent.displayName = fetchableDisplayName;
9836 FetchableWrappedComponent.prototype.__innerRender = WrappedComponent.prototype.render;
9837 FetchableWrappedComponent.__fetchData = function (store, context, callback) {
9838 if (typeof fetchClasses !== 'undefined' && fetchClasses != null) {
9839 var asyncCalls = {};
9840 Object.keys(fetchClasses).forEach(function (kc) {
9841 asyncCalls[kc] = function (callback) {
9842 var fetchDataInstance = fetchableInstanceFactory.getFetchableInstance(fetchClasses[kc]);
9843 if (fetchDataInstance.disableClient() && !context.server) {
9844 callback(null, []);
9845 } else {
9846 fetchDataInstance.fetch(store, context, function (err, results) {
9847 if (err) {
9848 console.log('[' + kc + '] Unknown error occurred when trying to fetch data. ', err);
9849 callback(err, null);
9850 } else {
9851 store[kc] = results;
9852 callback(null, results);
9853 }
9854 });
9855 }
9856 };
9857 });
9858 _async2.default.series(asyncCalls, function (err, results) {
9859 if (err) {
9860 callback(err, null);
9861 } else {
9862 callback(null, results);
9863 }
9864 });
9865 } else {
9866 callback(null, store);
9867 }
9868 };
9869 return (0, _hoistNonReactStatics2.default)(FetchableWrappedComponent, WrappedComponent);
9870 };
9871}
9872
9873function simpleReducer() {
9874 var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9875 var action = arguments[1];
9876
9877 switch (action.type) {
9878 case '__SET_VIEW_STATE__':
9879 var newState = _extends({}, state, action.data);
9880 return newState;
9881 default:
9882 return state;
9883 }
9884 return state;
9885}
9886
9887exports.default = {
9888 fetch: fetch,
9889 serverFetchReducer: simpleReducer
9890};
9891module.exports = exports['default'];
9892
9893/***/ }),
9894/* 89 */
9895/***/ (function(module, exports, __webpack_require__) {
9896
9897"use strict";
9898
9899
9900Object.defineProperty(exports, "__esModule", {
9901 value: true
9902});
9903
9904var _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; }; }();
9905
9906var _winston = __webpack_require__(217);
9907
9908var _winston2 = _interopRequireDefault(_winston);
9909
9910var _winstonDailyRotateFile = __webpack_require__(218);
9911
9912var _winstonDailyRotateFile2 = _interopRequireDefault(_winstonDailyRotateFile);
9913
9914function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9915
9916function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
9917
9918_winston2.default.transports.DailyRotateFile = _winstonDailyRotateFile2.default;
9919
9920var LoggerComponent = function () {
9921 function LoggerComponent(context) {
9922 _classCallCheck(this, LoggerComponent);
9923
9924 this._context = context;
9925 this.__logPath = '/logs/' + context;
9926 this.init();
9927 }
9928
9929 _createClass(LoggerComponent, [{
9930 key: 'init',
9931 value: function init() {
9932 this._logger = new _winston2.default.Logger({
9933 transports: [new _winston2.default.transports.Console({
9934 colorize: true,
9935 prettyPrint: true
9936 }), new _winston2.default.transports.DailyRotateFile({
9937 tailable: true,
9938 filename: this.__logPath + '/' + this._context,
9939 datePattern: '.yyyy-MM-dd.log',
9940 timestamp: true,
9941 maxFiles: 10,
9942 colorize: true,
9943 prettyPrint: true
9944 })]
9945 });
9946 }
9947 }, {
9948 key: 'getLogger',
9949 value: function getLogger() {
9950 return this._logger;
9951 }
9952 }]);
9953
9954 return LoggerComponent;
9955}();
9956
9957var DecoratedContextLogger = function () {
9958 function DecoratedContextLogger(logger, logContextName) {
9959 _classCallCheck(this, DecoratedContextLogger);
9960
9961 this._context = logContextName;
9962 this._logger = logger;
9963 }
9964
9965 _createClass(DecoratedContextLogger, [{
9966 key: 'log',
9967 value: function log(level, _log, data) {
9968 this._logger.log(level, '[' + this._context + '] ' + _log, data);
9969 }
9970 }, {
9971 key: 'view',
9972 value: function view(data) {
9973 var dataObj = {};
9974 if (typeof data !== 'undefined' && data !== null) {
9975 dataObj.data = data;
9976 }
9977 this._logger.log('info', '[' + this._context + '] ', dataObj);
9978 }
9979 }, {
9980 key: 'info',
9981 value: function info(log, data) {
9982 var dataObj = {};
9983 if (typeof data !== 'undefined' && data !== null) {
9984 dataObj.data = data;
9985 }
9986 this._logger.log('info', '[' + this._context + '] ' + log, dataObj);
9987 }
9988 }, {
9989 key: 'warn',
9990 value: function warn(log, data) {
9991 var dataObj = {};
9992 if (typeof data !== 'undefined' && data != null) {
9993 dataObj.data = data;
9994 }
9995 this._logger.log('warn', '[' + this._context + '] ' + log, dataObj);
9996 }
9997 }, {
9998 key: 'error',
9999 value: function error(log, exception, data) {
10000 var dataObj = {};
10001 if (typeof data !== 'undefined' && data != null) {
10002 dataObj.data = data;
10003 }
10004 if (typeof exception !== 'undefined' && exception != null) {
10005 dataObj.ex = exception;
10006 }
10007 this._logger.log('error', '[' + this._context + '] ' + log, {
10008 stackTrace: exception.stack,
10009 data: dataObj.data
10010 });
10011 }
10012 }, {
10013 key: 'debug',
10014 value: function debug(log, data) {
10015 var dataObj = {};
10016 if (typeof data !== 'undefined' && data != null) {
10017 dataObj.data = data;
10018 }
10019 this._logger.log('debug', '[' + this._context + '] ' + log, dataObj);
10020 }
10021 }]);
10022
10023 return DecoratedContextLogger;
10024}();
10025
10026var LogManager = function () {
10027 function LogManager(loggerComponent) {
10028 _classCallCheck(this, LogManager);
10029
10030 this._loggerComponent = loggerComponent;
10031 }
10032
10033 _createClass(LogManager, [{
10034 key: 'getLogger',
10035 value: function getLogger(logContextName) {
10036 var decoratedLogger = new DecoratedContextLogger(this._loggerComponent.getLogger(), logContextName);
10037 return decoratedLogger;
10038 }
10039 }]);
10040
10041 return LogManager;
10042}();
10043
10044exports.default = {
10045 configure: function configure(context) {
10046 var contextLoggerComponent = new LoggerComponent(context);
10047 return new LogManager(contextLoggerComponent);
10048 }
10049};
10050module.exports = exports['default'];
10051
10052/***/ }),
10053/* 90 */
10054/***/ (function(module, exports, __webpack_require__) {
10055
10056"use strict";
10057
10058
10059var _LoggerComponent = __webpack_require__(89);
10060
10061var _LoggerComponent2 = _interopRequireDefault(_LoggerComponent);
10062
10063function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10064
10065var project = __PROJECT__;
10066
10067(function installServerLogger() {
10068 if (global.Logger === null || typeof global.Logger === 'undefined') {
10069 global.Logger = _LoggerComponent2.default.configure(project.applicationName);
10070 }
10071})();
10072
10073/***/ }),
10074/* 91 */
10075/***/ (function(module, exports, __webpack_require__) {
10076
10077"use strict";
10078
10079
10080Object.defineProperty(exports, "__esModule", {
10081 value: true
10082});
10083
10084var _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; }; }();
10085
10086function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10087
10088var ServerRenderer = function () {
10089 function ServerRenderer() {
10090 _classCallCheck(this, ServerRenderer);
10091 }
10092
10093 _createClass(ServerRenderer, [{
10094 key: "render",
10095 value: function render(path, callback) {}
10096 }]);
10097
10098 return ServerRenderer;
10099}();
10100
10101exports.default = ServerRenderer;
10102module.exports = exports["default"];
10103
10104/***/ }),
10105/* 92 */
10106/***/ (function(module, exports, __webpack_require__) {
10107
10108"use strict";
10109
10110
10111Object.defineProperty(exports, "__esModule", {
10112 value: true
10113});
10114
10115var _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; }; }();
10116
10117var _compile = __webpack_require__(99);
10118
10119var _compile2 = _interopRequireDefault(_compile);
10120
10121var _fs = __webpack_require__(81);
10122
10123var _fs2 = _interopRequireDefault(_fs);
10124
10125var _path = __webpack_require__(82);
10126
10127var _path2 = _interopRequireDefault(_path);
10128
10129var _ServerRenderer2 = __webpack_require__(91);
10130
10131var _ServerRenderer3 = _interopRequireDefault(_ServerRenderer2);
10132
10133function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10134
10135function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10136
10137function _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; }
10138
10139function _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; }
10140
10141var logger = global.Logger.getLogger('SimpleHtmlRenderer');
10142
10143var SimpleHtmlRenderer = function (_ServerRenderer) {
10144 _inherits(SimpleHtmlRenderer, _ServerRenderer);
10145
10146 function SimpleHtmlRenderer(options) {
10147 _classCallCheck(this, SimpleHtmlRenderer);
10148
10149 var _this = _possibleConstructorReturn(this, (SimpleHtmlRenderer.__proto__ || Object.getPrototypeOf(SimpleHtmlRenderer)).call(this));
10150
10151 _this._options = options;
10152 _this._pageCache = {};
10153 return _this;
10154 }
10155
10156 _createClass(SimpleHtmlRenderer, [{
10157 key: '_loadHtml',
10158 value: function _loadHtml(htmlPath, callback) {
10159 var _this2 = this;
10160
10161 logger.info('[RENDERING]', htmlPath);
10162 _fs2.default.readFile(htmlPath, function (err, data) {
10163 if (err) {
10164 callback(err, null);
10165 } else {
10166 var start = new Date().getTime();
10167 var htmlTemplate = (0, _compile2.default)(data.toString());
10168 var end = new Date().getTime();
10169 var elapsed = end - start;
10170 logger.info('[TEMPLATE_COMPILATION] Finish compiling ' + htmlPath + ', elapsed: ' + elapsed + 'ms');
10171 if (_this2._options.cache) {
10172 logger.info('[TEMPLATE_CACHING] Caching ' + htmlPath);
10173 _this2._pageCache[htmlPath] = htmlTemplate;
10174 }
10175 end = new Date().getTime();
10176 elapsed = end - start;
10177 logger.info('[FINISH_RENDERING] ' + htmlPath + ' in: ' + elapsed + 'ms');
10178 callback(null, htmlTemplate);
10179 }
10180 });
10181 }
10182 }, {
10183 key: 'render',
10184 value: function render(file, callback) {
10185 var basePath = this._options.path;
10186 var finalPath = _path2.default.join(basePath, file);
10187 if (this._pageCache[finalPath] == null || typeof this._pageCache[finalPath] === 'undefined') {
10188 this._loadHtml(finalPath, callback);
10189 } else {
10190 callback(null, this._pageCache[finalPath]);
10191 }
10192 }
10193 }]);
10194
10195 return SimpleHtmlRenderer;
10196}(_ServerRenderer3.default);
10197
10198exports.default = SimpleHtmlRenderer;
10199module.exports = exports['default'];
10200
10201/***/ }),
10202/* 93 */
10203/***/ (function(module, exports, __webpack_require__) {
10204
10205"use strict";
10206
10207
10208Object.defineProperty(exports, "__esModule", {
10209 value: true
10210});
10211
10212var _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; }; }();
10213
10214var _react = __webpack_require__(46);
10215
10216var _react2 = _interopRequireDefault(_react);
10217
10218function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10219
10220function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10221
10222function _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; }
10223
10224function _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; }
10225
10226var UniversalPageHandler = function (_React$Component) {
10227 _inherits(UniversalPageHandler, _React$Component);
10228
10229 function UniversalPageHandler() {
10230 _classCallCheck(this, UniversalPageHandler);
10231
10232 return _possibleConstructorReturn(this, (UniversalPageHandler.__proto__ || Object.getPrototypeOf(UniversalPageHandler)).apply(this, arguments));
10233 }
10234
10235 _createClass(UniversalPageHandler, [{
10236 key: 'render',
10237 value: function render() {
10238 return _react2.default.createElement(
10239 'div',
10240 null,
10241 this.props.children
10242 );
10243 }
10244 }]);
10245
10246 return UniversalPageHandler;
10247}(_react2.default.Component);
10248
10249UniversalPageHandler.propTypes = {
10250 children: _react2.default.PropTypes.any
10251};
10252
10253exports.default = UniversalPageHandler;
10254module.exports = exports['default'];
10255
10256/***/ }),
10257/* 94 */
10258/***/ (function(module, exports, __webpack_require__) {
10259
10260"use strict";
10261
10262
10263Object.defineProperty(exports, "__esModule", {
10264 value: true
10265});
10266
10267var _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; }; }();
10268
10269var _react = __webpack_require__(46);
10270
10271var _react2 = _interopRequireDefault(_react);
10272
10273function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10274
10275function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10276
10277function _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; }
10278
10279function _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; }
10280
10281var InternationalizationHandler = function (_React$Component) {
10282 _inherits(InternationalizationHandler, _React$Component);
10283
10284 function InternationalizationHandler() {
10285 _classCallCheck(this, InternationalizationHandler);
10286
10287 return _possibleConstructorReturn(this, (InternationalizationHandler.__proto__ || Object.getPrototypeOf(InternationalizationHandler)).call(this));
10288 }
10289
10290 _createClass(InternationalizationHandler, [{
10291 key: 'render',
10292 value: function render() {
10293 return _react2.default.createElement(
10294 'div',
10295 null,
10296 this.props.children
10297 );
10298 }
10299 }]);
10300
10301 return InternationalizationHandler;
10302}(_react2.default.Component);
10303
10304InternationalizationHandler.propTypes = {
10305 children: _react2.default.PropTypes.any
10306};
10307
10308InternationalizationHandler.contextTypes = {
10309 intl: _react2.default.PropTypes.object
10310};
10311
10312exports.default = InternationalizationHandler;
10313module.exports = exports['default'];
10314
10315/***/ }),
10316/* 95 */
10317/***/ (function(module, exports, __webpack_require__) {
10318
10319"use strict";
10320/**
10321 * Copyright (c) 2013-present, Facebook, Inc.
10322 *
10323 * This source code is licensed under the MIT license found in the
10324 * LICENSE file in the root directory of this source tree.
10325 *
10326 */
10327
10328
10329
10330var _assign = __webpack_require__(3);
10331
10332var emptyObject = __webpack_require__(22);
10333var _invariant = __webpack_require__(0);
10334
10335if (process.env.NODE_ENV !== 'production') {
10336 var warning = __webpack_require__(1);
10337}
10338
10339var MIXINS_KEY = 'mixins';
10340
10341// Helper function to allow the creation of anonymous functions which do not
10342// have .name set to the name of the variable being assigned to.
10343function identity(fn) {
10344 return fn;
10345}
10346
10347var ReactPropTypeLocationNames;
10348if (process.env.NODE_ENV !== 'production') {
10349 ReactPropTypeLocationNames = {
10350 prop: 'prop',
10351 context: 'context',
10352 childContext: 'child context'
10353 };
10354} else {
10355 ReactPropTypeLocationNames = {};
10356}
10357
10358function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
10359 /**
10360 * Policies that describe methods in `ReactClassInterface`.
10361 */
10362
10363 var injectedMixins = [];
10364
10365 /**
10366 * Composite components are higher-level components that compose other composite
10367 * or host components.
10368 *
10369 * To create a new type of `ReactClass`, pass a specification of
10370 * your new class to `React.createClass`. The only requirement of your class
10371 * specification is that you implement a `render` method.
10372 *
10373 * var MyComponent = React.createClass({
10374 * render: function() {
10375 * return <div>Hello World</div>;
10376 * }
10377 * });
10378 *
10379 * The class specification supports a specific protocol of methods that have
10380 * special meaning (e.g. `render`). See `ReactClassInterface` for
10381 * more the comprehensive protocol. Any other properties and methods in the
10382 * class specification will be available on the prototype.
10383 *
10384 * @interface ReactClassInterface
10385 * @internal
10386 */
10387 var ReactClassInterface = {
10388 /**
10389 * An array of Mixin objects to include when defining your component.
10390 *
10391 * @type {array}
10392 * @optional
10393 */
10394 mixins: 'DEFINE_MANY',
10395
10396 /**
10397 * An object containing properties and methods that should be defined on
10398 * the component's constructor instead of its prototype (static methods).
10399 *
10400 * @type {object}
10401 * @optional
10402 */
10403 statics: 'DEFINE_MANY',
10404
10405 /**
10406 * Definition of prop types for this component.
10407 *
10408 * @type {object}
10409 * @optional
10410 */
10411 propTypes: 'DEFINE_MANY',
10412
10413 /**
10414 * Definition of context types for this component.
10415 *
10416 * @type {object}
10417 * @optional
10418 */
10419 contextTypes: 'DEFINE_MANY',
10420
10421 /**
10422 * Definition of context types this component sets for its children.
10423 *
10424 * @type {object}
10425 * @optional
10426 */
10427 childContextTypes: 'DEFINE_MANY',
10428
10429 // ==== Definition methods ====
10430
10431 /**
10432 * Invoked when the component is mounted. Values in the mapping will be set on
10433 * `this.props` if that prop is not specified (i.e. using an `in` check).
10434 *
10435 * This method is invoked before `getInitialState` and therefore cannot rely
10436 * on `this.state` or use `this.setState`.
10437 *
10438 * @return {object}
10439 * @optional
10440 */
10441 getDefaultProps: 'DEFINE_MANY_MERGED',
10442
10443 /**
10444 * Invoked once before the component is mounted. The return value will be used
10445 * as the initial value of `this.state`.
10446 *
10447 * getInitialState: function() {
10448 * return {
10449 * isOn: false,
10450 * fooBaz: new BazFoo()
10451 * }
10452 * }
10453 *
10454 * @return {object}
10455 * @optional
10456 */
10457 getInitialState: 'DEFINE_MANY_MERGED',
10458
10459 /**
10460 * @return {object}
10461 * @optional
10462 */
10463 getChildContext: 'DEFINE_MANY_MERGED',
10464
10465 /**
10466 * Uses props from `this.props` and state from `this.state` to render the
10467 * structure of the component.
10468 *
10469 * No guarantees are made about when or how often this method is invoked, so
10470 * it must not have side effects.
10471 *
10472 * render: function() {
10473 * var name = this.props.name;
10474 * return <div>Hello, {name}!</div>;
10475 * }
10476 *
10477 * @return {ReactComponent}
10478 * @required
10479 */
10480 render: 'DEFINE_ONCE',
10481
10482 // ==== Delegate methods ====
10483
10484 /**
10485 * Invoked when the component is initially created and about to be mounted.
10486 * This may have side effects, but any external subscriptions or data created
10487 * by this method must be cleaned up in `componentWillUnmount`.
10488 *
10489 * @optional
10490 */
10491 componentWillMount: 'DEFINE_MANY',
10492
10493 /**
10494 * Invoked when the component has been mounted and has a DOM representation.
10495 * However, there is no guarantee that the DOM node is in the document.
10496 *
10497 * Use this as an opportunity to operate on the DOM when the component has
10498 * been mounted (initialized and rendered) for the first time.
10499 *
10500 * @param {DOMElement} rootNode DOM element representing the component.
10501 * @optional
10502 */
10503 componentDidMount: 'DEFINE_MANY',
10504
10505 /**
10506 * Invoked before the component receives new props.
10507 *
10508 * Use this as an opportunity to react to a prop transition by updating the
10509 * state using `this.setState`. Current props are accessed via `this.props`.
10510 *
10511 * componentWillReceiveProps: function(nextProps, nextContext) {
10512 * this.setState({
10513 * likesIncreasing: nextProps.likeCount > this.props.likeCount
10514 * });
10515 * }
10516 *
10517 * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
10518 * transition may cause a state change, but the opposite is not true. If you
10519 * need it, you are probably looking for `componentWillUpdate`.
10520 *
10521 * @param {object} nextProps
10522 * @optional
10523 */
10524 componentWillReceiveProps: 'DEFINE_MANY',
10525
10526 /**
10527 * Invoked while deciding if the component should be updated as a result of
10528 * receiving new props, state and/or context.
10529 *
10530 * Use this as an opportunity to `return false` when you're certain that the
10531 * transition to the new props/state/context will not require a component
10532 * update.
10533 *
10534 * shouldComponentUpdate: function(nextProps, nextState, nextContext) {
10535 * return !equal(nextProps, this.props) ||
10536 * !equal(nextState, this.state) ||
10537 * !equal(nextContext, this.context);
10538 * }
10539 *
10540 * @param {object} nextProps
10541 * @param {?object} nextState
10542 * @param {?object} nextContext
10543 * @return {boolean} True if the component should update.
10544 * @optional
10545 */
10546 shouldComponentUpdate: 'DEFINE_ONCE',
10547
10548 /**
10549 * Invoked when the component is about to update due to a transition from
10550 * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
10551 * and `nextContext`.
10552 *
10553 * Use this as an opportunity to perform preparation before an update occurs.
10554 *
10555 * NOTE: You **cannot** use `this.setState()` in this method.
10556 *
10557 * @param {object} nextProps
10558 * @param {?object} nextState
10559 * @param {?object} nextContext
10560 * @param {ReactReconcileTransaction} transaction
10561 * @optional
10562 */
10563 componentWillUpdate: 'DEFINE_MANY',
10564
10565 /**
10566 * Invoked when the component's DOM representation has been updated.
10567 *
10568 * Use this as an opportunity to operate on the DOM when the component has
10569 * been updated.
10570 *
10571 * @param {object} prevProps
10572 * @param {?object} prevState
10573 * @param {?object} prevContext
10574 * @param {DOMElement} rootNode DOM element representing the component.
10575 * @optional
10576 */
10577 componentDidUpdate: 'DEFINE_MANY',
10578
10579 /**
10580 * Invoked when the component is about to be removed from its parent and have
10581 * its DOM representation destroyed.
10582 *
10583 * Use this as an opportunity to deallocate any external resources.
10584 *
10585 * NOTE: There is no `componentDidUnmount` since your component will have been
10586 * destroyed by that point.
10587 *
10588 * @optional
10589 */
10590 componentWillUnmount: 'DEFINE_MANY',
10591
10592 // ==== Advanced methods ====
10593
10594 /**
10595 * Updates the component's currently mounted DOM representation.
10596 *
10597 * By default, this implements React's rendering and reconciliation algorithm.
10598 * Sophisticated clients may wish to override this.
10599 *
10600 * @param {ReactReconcileTransaction} transaction
10601 * @internal
10602 * @overridable
10603 */
10604 updateComponent: 'OVERRIDE_BASE'
10605 };
10606
10607 /**
10608 * Mapping from class specification keys to special processing functions.
10609 *
10610 * Although these are declared like instance properties in the specification
10611 * when defining classes using `React.createClass`, they are actually static
10612 * and are accessible on the constructor instead of the prototype. Despite
10613 * being static, they must be defined outside of the "statics" key under
10614 * which all other static methods are defined.
10615 */
10616 var RESERVED_SPEC_KEYS = {
10617 displayName: function(Constructor, displayName) {
10618 Constructor.displayName = displayName;
10619 },
10620 mixins: function(Constructor, mixins) {
10621 if (mixins) {
10622 for (var i = 0; i < mixins.length; i++) {
10623 mixSpecIntoComponent(Constructor, mixins[i]);
10624 }
10625 }
10626 },
10627 childContextTypes: function(Constructor, childContextTypes) {
10628 if (process.env.NODE_ENV !== 'production') {
10629 validateTypeDef(Constructor, childContextTypes, 'childContext');
10630 }
10631 Constructor.childContextTypes = _assign(
10632 {},
10633 Constructor.childContextTypes,
10634 childContextTypes
10635 );
10636 },
10637 contextTypes: function(Constructor, contextTypes) {
10638 if (process.env.NODE_ENV !== 'production') {
10639 validateTypeDef(Constructor, contextTypes, 'context');
10640 }
10641 Constructor.contextTypes = _assign(
10642 {},
10643 Constructor.contextTypes,
10644 contextTypes
10645 );
10646 },
10647 /**
10648 * Special case getDefaultProps which should move into statics but requires
10649 * automatic merging.
10650 */
10651 getDefaultProps: function(Constructor, getDefaultProps) {
10652 if (Constructor.getDefaultProps) {
10653 Constructor.getDefaultProps = createMergedResultFunction(
10654 Constructor.getDefaultProps,
10655 getDefaultProps
10656 );
10657 } else {
10658 Constructor.getDefaultProps = getDefaultProps;
10659 }
10660 },
10661 propTypes: function(Constructor, propTypes) {
10662 if (process.env.NODE_ENV !== 'production') {
10663 validateTypeDef(Constructor, propTypes, 'prop');
10664 }
10665 Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
10666 },
10667 statics: function(Constructor, statics) {
10668 mixStaticSpecIntoComponent(Constructor, statics);
10669 },
10670 autobind: function() {}
10671 };
10672
10673 function validateTypeDef(Constructor, typeDef, location) {
10674 for (var propName in typeDef) {
10675 if (typeDef.hasOwnProperty(propName)) {
10676 // use a warning instead of an _invariant so components
10677 // don't show up in prod but only in __DEV__
10678 if (process.env.NODE_ENV !== 'production') {
10679 warning(
10680 typeof typeDef[propName] === 'function',
10681 '%s: %s type `%s` is invalid; it must be a function, usually from ' +
10682 'React.PropTypes.',
10683 Constructor.displayName || 'ReactClass',
10684 ReactPropTypeLocationNames[location],
10685 propName
10686 );
10687 }
10688 }
10689 }
10690 }
10691
10692 function validateMethodOverride(isAlreadyDefined, name) {
10693 var specPolicy = ReactClassInterface.hasOwnProperty(name)
10694 ? ReactClassInterface[name]
10695 : null;
10696
10697 // Disallow overriding of base class methods unless explicitly allowed.
10698 if (ReactClassMixin.hasOwnProperty(name)) {
10699 _invariant(
10700 specPolicy === 'OVERRIDE_BASE',
10701 'ReactClassInterface: You are attempting to override ' +
10702 '`%s` from your class specification. Ensure that your method names ' +
10703 'do not overlap with React methods.',
10704 name
10705 );
10706 }
10707
10708 // Disallow defining methods more than once unless explicitly allowed.
10709 if (isAlreadyDefined) {
10710 _invariant(
10711 specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',
10712 'ReactClassInterface: You are attempting to define ' +
10713 '`%s` on your component more than once. This conflict may be due ' +
10714 'to a mixin.',
10715 name
10716 );
10717 }
10718 }
10719
10720 /**
10721 * Mixin helper which handles policy validation and reserved
10722 * specification keys when building React classes.
10723 */
10724 function mixSpecIntoComponent(Constructor, spec) {
10725 if (!spec) {
10726 if (process.env.NODE_ENV !== 'production') {
10727 var typeofSpec = typeof spec;
10728 var isMixinValid = typeofSpec === 'object' && spec !== null;
10729
10730 if (process.env.NODE_ENV !== 'production') {
10731 warning(
10732 isMixinValid,
10733 "%s: You're attempting to include a mixin that is either null " +
10734 'or not an object. Check the mixins included by the component, ' +
10735 'as well as any mixins they include themselves. ' +
10736 'Expected object but got %s.',
10737 Constructor.displayName || 'ReactClass',
10738 spec === null ? null : typeofSpec
10739 );
10740 }
10741 }
10742
10743 return;
10744 }
10745
10746 _invariant(
10747 typeof spec !== 'function',
10748 "ReactClass: You're attempting to " +
10749 'use a component class or function as a mixin. Instead, just use a ' +
10750 'regular object.'
10751 );
10752 _invariant(
10753 !isValidElement(spec),
10754 "ReactClass: You're attempting to " +
10755 'use a component as a mixin. Instead, just use a regular object.'
10756 );
10757
10758 var proto = Constructor.prototype;
10759 var autoBindPairs = proto.__reactAutoBindPairs;
10760
10761 // By handling mixins before any other properties, we ensure the same
10762 // chaining order is applied to methods with DEFINE_MANY policy, whether
10763 // mixins are listed before or after these methods in the spec.
10764 if (spec.hasOwnProperty(MIXINS_KEY)) {
10765 RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
10766 }
10767
10768 for (var name in spec) {
10769 if (!spec.hasOwnProperty(name)) {
10770 continue;
10771 }
10772
10773 if (name === MIXINS_KEY) {
10774 // We have already handled mixins in a special case above.
10775 continue;
10776 }
10777
10778 var property = spec[name];
10779 var isAlreadyDefined = proto.hasOwnProperty(name);
10780 validateMethodOverride(isAlreadyDefined, name);
10781
10782 if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
10783 RESERVED_SPEC_KEYS[name](Constructor, property);
10784 } else {
10785 // Setup methods on prototype:
10786 // The following member methods should not be automatically bound:
10787 // 1. Expected ReactClass methods (in the "interface").
10788 // 2. Overridden methods (that were mixed in).
10789 var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
10790 var isFunction = typeof property === 'function';
10791 var shouldAutoBind =
10792 isFunction &&
10793 !isReactClassMethod &&
10794 !isAlreadyDefined &&
10795 spec.autobind !== false;
10796
10797 if (shouldAutoBind) {
10798 autoBindPairs.push(name, property);
10799 proto[name] = property;
10800 } else {
10801 if (isAlreadyDefined) {
10802 var specPolicy = ReactClassInterface[name];
10803
10804 // These cases should already be caught by validateMethodOverride.
10805 _invariant(
10806 isReactClassMethod &&
10807 (specPolicy === 'DEFINE_MANY_MERGED' ||
10808 specPolicy === 'DEFINE_MANY'),
10809 'ReactClass: Unexpected spec policy %s for key %s ' +
10810 'when mixing in component specs.',
10811 specPolicy,
10812 name
10813 );
10814
10815 // For methods which are defined more than once, call the existing
10816 // methods before calling the new property, merging if appropriate.
10817 if (specPolicy === 'DEFINE_MANY_MERGED') {
10818 proto[name] = createMergedResultFunction(proto[name], property);
10819 } else if (specPolicy === 'DEFINE_MANY') {
10820 proto[name] = createChainedFunction(proto[name], property);
10821 }
10822 } else {
10823 proto[name] = property;
10824 if (process.env.NODE_ENV !== 'production') {
10825 // Add verbose displayName to the function, which helps when looking
10826 // at profiling tools.
10827 if (typeof property === 'function' && spec.displayName) {
10828 proto[name].displayName = spec.displayName + '_' + name;
10829 }
10830 }
10831 }
10832 }
10833 }
10834 }
10835 }
10836
10837 function mixStaticSpecIntoComponent(Constructor, statics) {
10838 if (!statics) {
10839 return;
10840 }
10841 for (var name in statics) {
10842 var property = statics[name];
10843 if (!statics.hasOwnProperty(name)) {
10844 continue;
10845 }
10846
10847 var isReserved = name in RESERVED_SPEC_KEYS;
10848 _invariant(
10849 !isReserved,
10850 'ReactClass: You are attempting to define a reserved ' +
10851 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +
10852 'as an instance property instead; it will still be accessible on the ' +
10853 'constructor.',
10854 name
10855 );
10856
10857 var isInherited = name in Constructor;
10858 _invariant(
10859 !isInherited,
10860 'ReactClass: You are attempting to define ' +
10861 '`%s` on your component more than once. This conflict may be ' +
10862 'due to a mixin.',
10863 name
10864 );
10865 Constructor[name] = property;
10866 }
10867 }
10868
10869 /**
10870 * Merge two objects, but throw if both contain the same key.
10871 *
10872 * @param {object} one The first object, which is mutated.
10873 * @param {object} two The second object
10874 * @return {object} one after it has been mutated to contain everything in two.
10875 */
10876 function mergeIntoWithNoDuplicateKeys(one, two) {
10877 _invariant(
10878 one && two && typeof one === 'object' && typeof two === 'object',
10879 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
10880 );
10881
10882 for (var key in two) {
10883 if (two.hasOwnProperty(key)) {
10884 _invariant(
10885 one[key] === undefined,
10886 'mergeIntoWithNoDuplicateKeys(): ' +
10887 'Tried to merge two objects with the same key: `%s`. This conflict ' +
10888 'may be due to a mixin; in particular, this may be caused by two ' +
10889 'getInitialState() or getDefaultProps() methods returning objects ' +
10890 'with clashing keys.',
10891 key
10892 );
10893 one[key] = two[key];
10894 }
10895 }
10896 return one;
10897 }
10898
10899 /**
10900 * Creates a function that invokes two functions and merges their return values.
10901 *
10902 * @param {function} one Function to invoke first.
10903 * @param {function} two Function to invoke second.
10904 * @return {function} Function that invokes the two argument functions.
10905 * @private
10906 */
10907 function createMergedResultFunction(one, two) {
10908 return function mergedResult() {
10909 var a = one.apply(this, arguments);
10910 var b = two.apply(this, arguments);
10911 if (a == null) {
10912 return b;
10913 } else if (b == null) {
10914 return a;
10915 }
10916 var c = {};
10917 mergeIntoWithNoDuplicateKeys(c, a);
10918 mergeIntoWithNoDuplicateKeys(c, b);
10919 return c;
10920 };
10921 }
10922
10923 /**
10924 * Creates a function that invokes two functions and ignores their return vales.
10925 *
10926 * @param {function} one Function to invoke first.
10927 * @param {function} two Function to invoke second.
10928 * @return {function} Function that invokes the two argument functions.
10929 * @private
10930 */
10931 function createChainedFunction(one, two) {
10932 return function chainedFunction() {
10933 one.apply(this, arguments);
10934 two.apply(this, arguments);
10935 };
10936 }
10937
10938 /**
10939 * Binds a method to the component.
10940 *
10941 * @param {object} component Component whose method is going to be bound.
10942 * @param {function} method Method to be bound.
10943 * @return {function} The bound method.
10944 */
10945 function bindAutoBindMethod(component, method) {
10946 var boundMethod = method.bind(component);
10947 if (process.env.NODE_ENV !== 'production') {
10948 boundMethod.__reactBoundContext = component;
10949 boundMethod.__reactBoundMethod = method;
10950 boundMethod.__reactBoundArguments = null;
10951 var componentName = component.constructor.displayName;
10952 var _bind = boundMethod.bind;
10953 boundMethod.bind = function(newThis) {
10954 for (
10955 var _len = arguments.length,
10956 args = Array(_len > 1 ? _len - 1 : 0),
10957 _key = 1;
10958 _key < _len;
10959 _key++
10960 ) {
10961 args[_key - 1] = arguments[_key];
10962 }
10963
10964 // User is trying to bind() an autobound method; we effectively will
10965 // ignore the value of "this" that the user is trying to use, so
10966 // let's warn.
10967 if (newThis !== component && newThis !== null) {
10968 if (process.env.NODE_ENV !== 'production') {
10969 warning(
10970 false,
10971 'bind(): React component methods may only be bound to the ' +
10972 'component instance. See %s',
10973 componentName
10974 );
10975 }
10976 } else if (!args.length) {
10977 if (process.env.NODE_ENV !== 'production') {
10978 warning(
10979 false,
10980 'bind(): You are binding a component method to the component. ' +
10981 'React does this for you automatically in a high-performance ' +
10982 'way, so you can safely remove this call. See %s',
10983 componentName
10984 );
10985 }
10986 return boundMethod;
10987 }
10988 var reboundMethod = _bind.apply(boundMethod, arguments);
10989 reboundMethod.__reactBoundContext = component;
10990 reboundMethod.__reactBoundMethod = method;
10991 reboundMethod.__reactBoundArguments = args;
10992 return reboundMethod;
10993 };
10994 }
10995 return boundMethod;
10996 }
10997
10998 /**
10999 * Binds all auto-bound methods in a component.
11000 *
11001 * @param {object} component Component whose method is going to be bound.
11002 */
11003 function bindAutoBindMethods(component) {
11004 var pairs = component.__reactAutoBindPairs;
11005 for (var i = 0; i < pairs.length; i += 2) {
11006 var autoBindKey = pairs[i];
11007 var method = pairs[i + 1];
11008 component[autoBindKey] = bindAutoBindMethod(component, method);
11009 }
11010 }
11011
11012 var IsMountedPreMixin = {
11013 componentDidMount: function() {
11014 this.__isMounted = true;
11015 }
11016 };
11017
11018 var IsMountedPostMixin = {
11019 componentWillUnmount: function() {
11020 this.__isMounted = false;
11021 }
11022 };
11023
11024 /**
11025 * Add more to the ReactClass base class. These are all legacy features and
11026 * therefore not already part of the modern ReactComponent.
11027 */
11028 var ReactClassMixin = {
11029 /**
11030 * TODO: This will be deprecated because state should always keep a consistent
11031 * type signature and the only use case for this, is to avoid that.
11032 */
11033 replaceState: function(newState, callback) {
11034 this.updater.enqueueReplaceState(this, newState, callback);
11035 },
11036
11037 /**
11038 * Checks whether or not this composite component is mounted.
11039 * @return {boolean} True if mounted, false otherwise.
11040 * @protected
11041 * @final
11042 */
11043 isMounted: function() {
11044 if (process.env.NODE_ENV !== 'production') {
11045 warning(
11046 this.__didWarnIsMounted,
11047 '%s: isMounted is deprecated. Instead, make sure to clean up ' +
11048 'subscriptions and pending requests in componentWillUnmount to ' +
11049 'prevent memory leaks.',
11050 (this.constructor && this.constructor.displayName) ||
11051 this.name ||
11052 'Component'
11053 );
11054 this.__didWarnIsMounted = true;
11055 }
11056 return !!this.__isMounted;
11057 }
11058 };
11059
11060 var ReactClassComponent = function() {};
11061 _assign(
11062 ReactClassComponent.prototype,
11063 ReactComponent.prototype,
11064 ReactClassMixin
11065 );
11066
11067 /**
11068 * Creates a composite component class given a class specification.
11069 * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
11070 *
11071 * @param {object} spec Class specification (which must define `render`).
11072 * @return {function} Component constructor function.
11073 * @public
11074 */
11075 function createClass(spec) {
11076 // To keep our warnings more understandable, we'll use a little hack here to
11077 // ensure that Constructor.name !== 'Constructor'. This makes sure we don't
11078 // unnecessarily identify a class without displayName as 'Constructor'.
11079 var Constructor = identity(function(props, context, updater) {
11080 // This constructor gets overridden by mocks. The argument is used
11081 // by mocks to assert on what gets mounted.
11082
11083 if (process.env.NODE_ENV !== 'production') {
11084 warning(
11085 this instanceof Constructor,
11086 'Something is calling a React component directly. Use a factory or ' +
11087 'JSX instead. See: https://fb.me/react-legacyfactory'
11088 );
11089 }
11090
11091 // Wire up auto-binding
11092 if (this.__reactAutoBindPairs.length) {
11093 bindAutoBindMethods(this);
11094 }
11095
11096 this.props = props;
11097 this.context = context;
11098 this.refs = emptyObject;
11099 this.updater = updater || ReactNoopUpdateQueue;
11100
11101 this.state = null;
11102
11103 // ReactClasses doesn't have constructors. Instead, they use the
11104 // getInitialState and componentWillMount methods for initialization.
11105
11106 var initialState = this.getInitialState ? this.getInitialState() : null;
11107 if (process.env.NODE_ENV !== 'production') {
11108 // We allow auto-mocks to proceed as if they're returning null.
11109 if (
11110 initialState === undefined &&
11111 this.getInitialState._isMockFunction
11112 ) {
11113 // This is probably bad practice. Consider warning here and
11114 // deprecating this convenience.
11115 initialState = null;
11116 }
11117 }
11118 _invariant(
11119 typeof initialState === 'object' && !Array.isArray(initialState),
11120 '%s.getInitialState(): must return an object or null',
11121 Constructor.displayName || 'ReactCompositeComponent'
11122 );
11123
11124 this.state = initialState;
11125 });
11126 Constructor.prototype = new ReactClassComponent();
11127 Constructor.prototype.constructor = Constructor;
11128 Constructor.prototype.__reactAutoBindPairs = [];
11129
11130 injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
11131
11132 mixSpecIntoComponent(Constructor, IsMountedPreMixin);
11133 mixSpecIntoComponent(Constructor, spec);
11134 mixSpecIntoComponent(Constructor, IsMountedPostMixin);
11135
11136 // Initialize the defaultProps property after all mixins have been merged.
11137 if (Constructor.getDefaultProps) {
11138 Constructor.defaultProps = Constructor.getDefaultProps();
11139 }
11140
11141 if (process.env.NODE_ENV !== 'production') {
11142 // This is a tag to indicate that the use of these method names is ok,
11143 // since it's used with createClass. If it's not, then it's likely a
11144 // mistake so we'll warn you to use the static property, property
11145 // initializer or constructor respectively.
11146 if (Constructor.getDefaultProps) {
11147 Constructor.getDefaultProps.isReactClassApproved = {};
11148 }
11149 if (Constructor.prototype.getInitialState) {
11150 Constructor.prototype.getInitialState.isReactClassApproved = {};
11151 }
11152 }
11153
11154 _invariant(
11155 Constructor.prototype.render,
11156 'createClass(...): Class specification must implement a `render` method.'
11157 );
11158
11159 if (process.env.NODE_ENV !== 'production') {
11160 warning(
11161 !Constructor.prototype.componentShouldUpdate,
11162 '%s has a method called ' +
11163 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
11164 'The name is phrased as a question because the function is ' +
11165 'expected to return a value.',
11166 spec.displayName || 'A component'
11167 );
11168 warning(
11169 !Constructor.prototype.componentWillRecieveProps,
11170 '%s has a method called ' +
11171 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
11172 spec.displayName || 'A component'
11173 );
11174 }
11175
11176 // Reduce time spent doing lookups by setting these on the prototype.
11177 for (var methodName in ReactClassInterface) {
11178 if (!Constructor.prototype[methodName]) {
11179 Constructor.prototype[methodName] = null;
11180 }
11181 }
11182
11183 return Constructor;
11184 }
11185
11186 return createClass;
11187}
11188
11189module.exports = factory;
11190
11191
11192/***/ }),
11193/* 96 */
11194/***/ (function(module, exports, __webpack_require__) {
11195
11196"use strict";
11197
11198
11199// eslint-disable-next-line no-empty-function
11200module.exports = function () {};
11201
11202
11203/***/ }),
11204/* 97 */
11205/***/ (function(module, exports, __webpack_require__) {
11206
11207"use strict";
11208
11209
11210var isValue = __webpack_require__(47);
11211
11212var forEach = Array.prototype.forEach, create = Object.create;
11213
11214var process = function (src, obj) {
11215 var key;
11216 for (key in src) obj[key] = src[key];
11217};
11218
11219// eslint-disable-next-line no-unused-vars
11220module.exports = function (opts1 /*, …options*/) {
11221 var result = create(null);
11222 forEach.call(arguments, function (options) {
11223 if (!isValue(options)) return;
11224 process(Object(options), result);
11225 });
11226 return result;
11227};
11228
11229
11230/***/ }),
11231/* 98 */
11232/***/ (function(module, exports, __webpack_require__) {
11233
11234"use strict";
11235
11236
11237var isValue = __webpack_require__(47);
11238
11239module.exports = function (value) {
11240 if (!isValue(value)) throw new TypeError("Cannot use null or undefined");
11241 return value;
11242};
11243
11244
11245/***/ }),
11246/* 99 */
11247/***/ (function(module, exports, __webpack_require__) {
11248
11249"use strict";
11250
11251
11252var esniff = __webpack_require__(203)
11253
11254 , i, current, literals, substitutions, sOut, sEscape, sAhead, sIn, sInEscape, template;
11255
11256sOut = function (char) {
11257 if (char === '\\') return sEscape;
11258 if (char === '$') return sAhead;
11259 current += char;
11260 return sOut;
11261};
11262sEscape = function (char) {
11263 if ((char !== '\\') && (char !== '$')) current += '\\';
11264 current += char;
11265 return sOut;
11266};
11267sAhead = function (char) {
11268 if (char === '{') {
11269 literals.push(current);
11270 current = '';
11271 return sIn;
11272 }
11273 if (char === '$') {
11274 current += '$';
11275 return sAhead;
11276 }
11277 current += '$' + char;
11278 return sOut;
11279};
11280sIn = function (char) {
11281 var code = template.slice(i), end;
11282 esniff(code, '}', function (j) {
11283 if (esniff.nest >= 0) return esniff.next();
11284 end = j;
11285 });
11286 if (end != null) {
11287 substitutions.push(template.slice(i, i + end));
11288 i += end;
11289 current = '';
11290 return sOut;
11291 }
11292 end = code.length;
11293 i += end;
11294 current += code;
11295 return sIn;
11296};
11297sInEscape = function (char) {
11298 if ((char !== '\\') && (char !== '}')) current += '\\';
11299 current += char;
11300 return sIn;
11301};
11302
11303module.exports = function (str) {
11304 var length, state, result;
11305 current = '';
11306 literals = [];
11307 substitutions = [];
11308
11309 template = String(str);
11310 length = template.length;
11311
11312 state = sOut;
11313 for (i = 0; i < length; ++i) state = state(template[i]);
11314 if (state === sOut) {
11315 literals.push(current);
11316 } else if (state === sEscape) {
11317 literals.push(current + '\\');
11318 } else if (state === sAhead) {
11319 literals.push(current + '$');
11320 } else if (state === sIn) {
11321 literals[literals.length - 1] += '${' + current;
11322 } else if (state === sInEscape) {
11323 literals[literals.length - 1] += '${' + current + '\\';
11324 }
11325 result = { literals: literals, substitutions: substitutions };
11326 literals = substitutions = null;
11327 return result;
11328};
11329
11330
11331/***/ }),
11332/* 100 */
11333/***/ (function(module, exports, __webpack_require__) {
11334
11335"use strict";
11336
11337
11338var reduce = Array.prototype.reduce;
11339
11340module.exports = function (literals/*, …substitutions*/) {
11341 var args = arguments;
11342 return reduce.call(literals, function (a, b, i) {
11343 return a + ((args[i] === undefined) ? '' : String(args[i])) + b;
11344 });
11345};
11346
11347
11348/***/ }),
11349/* 101 */
11350/***/ (function(module, exports, __webpack_require__) {
11351
11352"use strict";
11353
11354
11355var resolve = __webpack_require__(102)
11356 , passthru = __webpack_require__(100);
11357
11358module.exports = function (data, context/*, options*/) {
11359 return passthru.apply(null, resolve(data, context, arguments[2]));
11360};
11361
11362
11363/***/ }),
11364/* 102 */
11365/***/ (function(module, exports, __webpack_require__) {
11366
11367"use strict";
11368
11369
11370var value = __webpack_require__(98)
11371 , normalize = __webpack_require__(97)
11372 , isVarNameValid = __webpack_require__(103)
11373
11374 , map = Array.prototype.map, keys = Object.keys
11375 , stringify = JSON.stringify;
11376
11377module.exports = function (data, context/*, options*/) {
11378 var names, argNames, argValues, options = Object(arguments[2]);
11379
11380 (value(data) && value(data.literals) && value(data.substitutions));
11381 context = normalize(context);
11382 names = keys(context).filter(isVarNameValid);
11383 argNames = names.join(', ');
11384 argValues = names.map(function (name) { return context[name]; });
11385 return [data.literals].concat(map.call(data.substitutions, function (expr) {
11386 var resolver;
11387 if (!expr) return undefined;
11388 try {
11389 resolver = new Function(argNames, 'return (' + expr + ')');
11390 } catch (e) {
11391 throw new TypeError("Unable to compile expression:\n\targs: " + stringify(argNames) +
11392 "\n\tbody: " + stringify(expr) + "\n\terror: " + e.stack);
11393 }
11394 try {
11395 return resolver.apply(null, argValues);
11396 } catch (e) {
11397 if (options.partial) return '${' + expr + '}';
11398 throw new TypeError("Unable to resolve expression:\n\targs: " + stringify(argNames) +
11399 "\n\tbody: " + stringify(expr) + "\n\terror: " + e.stack);
11400 }
11401 }));
11402};
11403
11404
11405/***/ }),
11406/* 103 */
11407/***/ (function(module, exports, __webpack_require__) {
11408
11409"use strict";
11410// Credit: Mathias Bynens -> https://mathiasbynens.be/demo/javascript-identifier-regex
11411
11412
11413
11414module.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])*$/);
11415
11416
11417/***/ }),
11418/* 104 */
11419/***/ (function(module, exports, __webpack_require__) {
11420
11421"use strict";
11422
11423
11424/**
11425 * Copyright (c) 2013-present, Facebook, Inc.
11426 *
11427 * This source code is licensed under the MIT license found in the
11428 * LICENSE file in the root directory of this source tree.
11429 *
11430 * @typechecks
11431 */
11432
11433var _hyphenPattern = /-(.)/g;
11434
11435/**
11436 * Camelcases a hyphenated string, for example:
11437 *
11438 * > camelize('background-color')
11439 * < "backgroundColor"
11440 *
11441 * @param {string} string
11442 * @return {string}
11443 */
11444function camelize(string) {
11445 return string.replace(_hyphenPattern, function (_, character) {
11446 return character.toUpperCase();
11447 });
11448}
11449
11450module.exports = camelize;
11451
11452/***/ }),
11453/* 105 */
11454/***/ (function(module, exports, __webpack_require__) {
11455
11456"use strict";
11457/**
11458 * Copyright (c) 2013-present, Facebook, Inc.
11459 *
11460 * This source code is licensed under the MIT license found in the
11461 * LICENSE file in the root directory of this source tree.
11462 *
11463 * @typechecks
11464 */
11465
11466
11467
11468var camelize = __webpack_require__(104);
11469
11470var msPattern = /^-ms-/;
11471
11472/**
11473 * Camelcases a hyphenated CSS property name, for example:
11474 *
11475 * > camelizeStyleName('background-color')
11476 * < "backgroundColor"
11477 * > camelizeStyleName('-moz-transition')
11478 * < "MozTransition"
11479 * > camelizeStyleName('-ms-transition')
11480 * < "msTransition"
11481 *
11482 * As Andi Smith suggests
11483 * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
11484 * is converted to lowercase `ms`.
11485 *
11486 * @param {string} string
11487 * @return {string}
11488 */
11489function camelizeStyleName(string) {
11490 return camelize(string.replace(msPattern, 'ms-'));
11491}
11492
11493module.exports = camelizeStyleName;
11494
11495/***/ }),
11496/* 106 */
11497/***/ (function(module, exports, __webpack_require__) {
11498
11499"use strict";
11500
11501
11502/**
11503 * Copyright (c) 2013-present, Facebook, Inc.
11504 *
11505 * This source code is licensed under the MIT license found in the
11506 * LICENSE file in the root directory of this source tree.
11507 *
11508 *
11509 */
11510
11511var isTextNode = __webpack_require__(114);
11512
11513/*eslint-disable no-bitwise */
11514
11515/**
11516 * Checks if a given DOM node contains or is another DOM node.
11517 */
11518function containsNode(outerNode, innerNode) {
11519 if (!outerNode || !innerNode) {
11520 return false;
11521 } else if (outerNode === innerNode) {
11522 return true;
11523 } else if (isTextNode(outerNode)) {
11524 return false;
11525 } else if (isTextNode(innerNode)) {
11526 return containsNode(outerNode, innerNode.parentNode);
11527 } else if ('contains' in outerNode) {
11528 return outerNode.contains(innerNode);
11529 } else if (outerNode.compareDocumentPosition) {
11530 return !!(outerNode.compareDocumentPosition(innerNode) & 16);
11531 } else {
11532 return false;
11533 }
11534}
11535
11536module.exports = containsNode;
11537
11538/***/ }),
11539/* 107 */
11540/***/ (function(module, exports, __webpack_require__) {
11541
11542"use strict";
11543
11544
11545/**
11546 * Copyright (c) 2013-present, Facebook, Inc.
11547 *
11548 * This source code is licensed under the MIT license found in the
11549 * LICENSE file in the root directory of this source tree.
11550 *
11551 * @typechecks
11552 */
11553
11554var invariant = __webpack_require__(0);
11555
11556/**
11557 * Convert array-like objects to arrays.
11558 *
11559 * This API assumes the caller knows the contents of the data type. For less
11560 * well defined inputs use createArrayFromMixed.
11561 *
11562 * @param {object|function|filelist} obj
11563 * @return {array}
11564 */
11565function toArray(obj) {
11566 var length = obj.length;
11567
11568 // Some browsers builtin objects can report typeof 'function' (e.g. NodeList
11569 // in old versions of Safari).
11570 !(!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;
11571
11572 !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;
11573
11574 !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;
11575
11576 !(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;
11577
11578 // Old IE doesn't give collections access to hasOwnProperty. Assume inputs
11579 // without method will throw during the slice call and skip straight to the
11580 // fallback.
11581 if (obj.hasOwnProperty) {
11582 try {
11583 return Array.prototype.slice.call(obj);
11584 } catch (e) {
11585 // IE < 9 does not support Array#slice on collections objects
11586 }
11587 }
11588
11589 // Fall back to copying key by key. This assumes all keys have a value,
11590 // so will not preserve sparsely populated inputs.
11591 var ret = Array(length);
11592 for (var ii = 0; ii < length; ii++) {
11593 ret[ii] = obj[ii];
11594 }
11595 return ret;
11596}
11597
11598/**
11599 * Perform a heuristic test to determine if an object is "array-like".
11600 *
11601 * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?"
11602 * Joshu replied: "Mu."
11603 *
11604 * This function determines if its argument has "array nature": it returns
11605 * true if the argument is an actual array, an `arguments' object, or an
11606 * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).
11607 *
11608 * It will return false for other array-like objects like Filelist.
11609 *
11610 * @param {*} obj
11611 * @return {boolean}
11612 */
11613function hasArrayNature(obj) {
11614 return (
11615 // not null/false
11616 !!obj && (
11617 // arrays are objects, NodeLists are functions in Safari
11618 typeof obj == 'object' || typeof obj == 'function') &&
11619 // quacks like an array
11620 'length' in obj &&
11621 // not window
11622 !('setInterval' in obj) &&
11623 // no DOM node should be considered an array-like
11624 // a 'select' element has 'length' and 'item' properties on IE8
11625 typeof obj.nodeType != 'number' && (
11626 // a real array
11627 Array.isArray(obj) ||
11628 // arguments
11629 'callee' in obj ||
11630 // HTMLCollection/NodeList
11631 'item' in obj)
11632 );
11633}
11634
11635/**
11636 * Ensure that the argument is an array by wrapping it in an array if it is not.
11637 * Creates a copy of the argument if it is already an array.
11638 *
11639 * This is mostly useful idiomatically:
11640 *
11641 * var createArrayFromMixed = require('createArrayFromMixed');
11642 *
11643 * function takesOneOrMoreThings(things) {
11644 * things = createArrayFromMixed(things);
11645 * ...
11646 * }
11647 *
11648 * This allows you to treat `things' as an array, but accept scalars in the API.
11649 *
11650 * If you need to convert an array-like object, like `arguments`, into an array
11651 * use toArray instead.
11652 *
11653 * @param {*} obj
11654 * @return {array}
11655 */
11656function createArrayFromMixed(obj) {
11657 if (!hasArrayNature(obj)) {
11658 return [obj];
11659 } else if (Array.isArray(obj)) {
11660 return obj.slice();
11661 } else {
11662 return toArray(obj);
11663 }
11664}
11665
11666module.exports = createArrayFromMixed;
11667
11668/***/ }),
11669/* 108 */
11670/***/ (function(module, exports, __webpack_require__) {
11671
11672"use strict";
11673
11674
11675/**
11676 * Copyright (c) 2013-present, Facebook, Inc.
11677 *
11678 * This source code is licensed under the MIT license found in the
11679 * LICENSE file in the root directory of this source tree.
11680 *
11681 * @typechecks
11682 */
11683
11684/*eslint-disable fb-www/unsafe-html*/
11685
11686var ExecutionEnvironment = __webpack_require__(5);
11687
11688var createArrayFromMixed = __webpack_require__(107);
11689var getMarkupWrap = __webpack_require__(109);
11690var invariant = __webpack_require__(0);
11691
11692/**
11693 * Dummy container used to render all markup.
11694 */
11695var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
11696
11697/**
11698 * Pattern used by `getNodeName`.
11699 */
11700var nodeNamePattern = /^\s*<(\w+)/;
11701
11702/**
11703 * Extracts the `nodeName` of the first element in a string of markup.
11704 *
11705 * @param {string} markup String of markup.
11706 * @return {?string} Node name of the supplied markup.
11707 */
11708function getNodeName(markup) {
11709 var nodeNameMatch = markup.match(nodeNamePattern);
11710 return nodeNameMatch && nodeNameMatch[1].toLowerCase();
11711}
11712
11713/**
11714 * Creates an array containing the nodes rendered from the supplied markup. The
11715 * optionally supplied `handleScript` function will be invoked once for each
11716 * <script> element that is rendered. If no `handleScript` function is supplied,
11717 * an exception is thrown if any <script> elements are rendered.
11718 *
11719 * @param {string} markup A string of valid HTML markup.
11720 * @param {?function} handleScript Invoked once for each rendered <script>.
11721 * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes.
11722 */
11723function createNodesFromMarkup(markup, handleScript) {
11724 var node = dummyNode;
11725 !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0;
11726 var nodeName = getNodeName(markup);
11727
11728 var wrap = nodeName && getMarkupWrap(nodeName);
11729 if (wrap) {
11730 node.innerHTML = wrap[1] + markup + wrap[2];
11731
11732 var wrapDepth = wrap[0];
11733 while (wrapDepth--) {
11734 node = node.lastChild;
11735 }
11736 } else {
11737 node.innerHTML = markup;
11738 }
11739
11740 var scripts = node.getElementsByTagName('script');
11741 if (scripts.length) {
11742 !handleScript ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0;
11743 createArrayFromMixed(scripts).forEach(handleScript);
11744 }
11745
11746 var nodes = Array.from(node.childNodes);
11747 while (node.lastChild) {
11748 node.removeChild(node.lastChild);
11749 }
11750 return nodes;
11751}
11752
11753module.exports = createNodesFromMarkup;
11754
11755/***/ }),
11756/* 109 */
11757/***/ (function(module, exports, __webpack_require__) {
11758
11759"use strict";
11760
11761
11762/**
11763 * Copyright (c) 2013-present, Facebook, Inc.
11764 *
11765 * This source code is licensed under the MIT license found in the
11766 * LICENSE file in the root directory of this source tree.
11767 *
11768 */
11769
11770/*eslint-disable fb-www/unsafe-html */
11771
11772var ExecutionEnvironment = __webpack_require__(5);
11773
11774var invariant = __webpack_require__(0);
11775
11776/**
11777 * Dummy container used to detect which wraps are necessary.
11778 */
11779var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
11780
11781/**
11782 * Some browsers cannot use `innerHTML` to render certain elements standalone,
11783 * so we wrap them, render the wrapped nodes, then extract the desired node.
11784 *
11785 * In IE8, certain elements cannot render alone, so wrap all elements ('*').
11786 */
11787
11788var shouldWrap = {};
11789
11790var selectWrap = [1, '<select multiple="true">', '</select>'];
11791var tableWrap = [1, '<table>', '</table>'];
11792var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
11793
11794var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>'];
11795
11796var markupWrap = {
11797 '*': [1, '?<div>', '</div>'],
11798
11799 'area': [1, '<map>', '</map>'],
11800 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
11801 'legend': [1, '<fieldset>', '</fieldset>'],
11802 'param': [1, '<object>', '</object>'],
11803 'tr': [2, '<table><tbody>', '</tbody></table>'],
11804
11805 'optgroup': selectWrap,
11806 'option': selectWrap,
11807
11808 'caption': tableWrap,
11809 'colgroup': tableWrap,
11810 'tbody': tableWrap,
11811 'tfoot': tableWrap,
11812 'thead': tableWrap,
11813
11814 'td': trWrap,
11815 'th': trWrap
11816};
11817
11818// Initialize the SVG elements since we know they'll always need to be wrapped
11819// consistently. If they are created inside a <div> they will be initialized in
11820// the wrong namespace (and will not display).
11821var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];
11822svgElements.forEach(function (nodeName) {
11823 markupWrap[nodeName] = svgWrap;
11824 shouldWrap[nodeName] = true;
11825});
11826
11827/**
11828 * Gets the markup wrap configuration for the supplied `nodeName`.
11829 *
11830 * NOTE: This lazily detects which wraps are necessary for the current browser.
11831 *
11832 * @param {string} nodeName Lowercase `nodeName`.
11833 * @return {?array} Markup wrap configuration, if applicable.
11834 */
11835function getMarkupWrap(nodeName) {
11836 !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0;
11837 if (!markupWrap.hasOwnProperty(nodeName)) {
11838 nodeName = '*';
11839 }
11840 if (!shouldWrap.hasOwnProperty(nodeName)) {
11841 if (nodeName === '*') {
11842 dummyNode.innerHTML = '<link />';
11843 } else {
11844 dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';
11845 }
11846 shouldWrap[nodeName] = !dummyNode.firstChild;
11847 }
11848 return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
11849}
11850
11851module.exports = getMarkupWrap;
11852
11853/***/ }),
11854/* 110 */
11855/***/ (function(module, exports, __webpack_require__) {
11856
11857"use strict";
11858/**
11859 * Copyright (c) 2013-present, Facebook, Inc.
11860 *
11861 * This source code is licensed under the MIT license found in the
11862 * LICENSE file in the root directory of this source tree.
11863 *
11864 * @typechecks
11865 */
11866
11867
11868
11869/**
11870 * Gets the scroll position of the supplied element or window.
11871 *
11872 * The return values are unbounded, unlike `getScrollPosition`. This means they
11873 * may be negative or exceed the element boundaries (which is possible using
11874 * inertial scrolling).
11875 *
11876 * @param {DOMWindow|DOMElement} scrollable
11877 * @return {object} Map with `x` and `y` keys.
11878 */
11879
11880function getUnboundedScrollPosition(scrollable) {
11881 if (scrollable.Window && scrollable instanceof scrollable.Window) {
11882 return {
11883 x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,
11884 y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop
11885 };
11886 }
11887 return {
11888 x: scrollable.scrollLeft,
11889 y: scrollable.scrollTop
11890 };
11891}
11892
11893module.exports = getUnboundedScrollPosition;
11894
11895/***/ }),
11896/* 111 */
11897/***/ (function(module, exports, __webpack_require__) {
11898
11899"use strict";
11900
11901
11902/**
11903 * Copyright (c) 2013-present, Facebook, Inc.
11904 *
11905 * This source code is licensed under the MIT license found in the
11906 * LICENSE file in the root directory of this source tree.
11907 *
11908 * @typechecks
11909 */
11910
11911var _uppercasePattern = /([A-Z])/g;
11912
11913/**
11914 * Hyphenates a camelcased string, for example:
11915 *
11916 * > hyphenate('backgroundColor')
11917 * < "background-color"
11918 *
11919 * For CSS style names, use `hyphenateStyleName` instead which works properly
11920 * with all vendor prefixes, including `ms`.
11921 *
11922 * @param {string} string
11923 * @return {string}
11924 */
11925function hyphenate(string) {
11926 return string.replace(_uppercasePattern, '-$1').toLowerCase();
11927}
11928
11929module.exports = hyphenate;
11930
11931/***/ }),
11932/* 112 */
11933/***/ (function(module, exports, __webpack_require__) {
11934
11935"use strict";
11936/**
11937 * Copyright (c) 2013-present, Facebook, Inc.
11938 *
11939 * This source code is licensed under the MIT license found in the
11940 * LICENSE file in the root directory of this source tree.
11941 *
11942 * @typechecks
11943 */
11944
11945
11946
11947var hyphenate = __webpack_require__(111);
11948
11949var msPattern = /^ms-/;
11950
11951/**
11952 * Hyphenates a camelcased CSS property name, for example:
11953 *
11954 * > hyphenateStyleName('backgroundColor')
11955 * < "background-color"
11956 * > hyphenateStyleName('MozTransition')
11957 * < "-moz-transition"
11958 * > hyphenateStyleName('msTransition')
11959 * < "-ms-transition"
11960 *
11961 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
11962 * is converted to `-ms-`.
11963 *
11964 * @param {string} string
11965 * @return {string}
11966 */
11967function hyphenateStyleName(string) {
11968 return hyphenate(string).replace(msPattern, '-ms-');
11969}
11970
11971module.exports = hyphenateStyleName;
11972
11973/***/ }),
11974/* 113 */
11975/***/ (function(module, exports, __webpack_require__) {
11976
11977"use strict";
11978
11979
11980/**
11981 * Copyright (c) 2013-present, Facebook, Inc.
11982 *
11983 * This source code is licensed under the MIT license found in the
11984 * LICENSE file in the root directory of this source tree.
11985 *
11986 * @typechecks
11987 */
11988
11989/**
11990 * @param {*} object The object to check.
11991 * @return {boolean} Whether or not the object is a DOM node.
11992 */
11993function isNode(object) {
11994 var doc = object ? object.ownerDocument || object : document;
11995 var defaultView = doc.defaultView || window;
11996 return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
11997}
11998
11999module.exports = isNode;
12000
12001/***/ }),
12002/* 114 */
12003/***/ (function(module, exports, __webpack_require__) {
12004
12005"use strict";
12006
12007
12008/**
12009 * Copyright (c) 2013-present, Facebook, Inc.
12010 *
12011 * This source code is licensed under the MIT license found in the
12012 * LICENSE file in the root directory of this source tree.
12013 *
12014 * @typechecks
12015 */
12016
12017var isNode = __webpack_require__(113);
12018
12019/**
12020 * @param {*} object The object to check.
12021 * @return {boolean} Whether or not the object is a DOM text node.
12022 */
12023function isTextNode(object) {
12024 return isNode(object) && object.nodeType == 3;
12025}
12026
12027module.exports = isTextNode;
12028
12029/***/ }),
12030/* 115 */
12031/***/ (function(module, exports, __webpack_require__) {
12032
12033"use strict";
12034/**
12035 * Copyright (c) 2013-present, Facebook, Inc.
12036 *
12037 * This source code is licensed under the MIT license found in the
12038 * LICENSE file in the root directory of this source tree.
12039 *
12040 *
12041 * @typechecks static-only
12042 */
12043
12044
12045
12046/**
12047 * Memoizes the return value of a function that accepts one string argument.
12048 */
12049
12050function memoizeStringOnly(callback) {
12051 var cache = {};
12052 return function (string) {
12053 if (!cache.hasOwnProperty(string)) {
12054 cache[string] = callback.call(this, string);
12055 }
12056 return cache[string];
12057 };
12058}
12059
12060module.exports = memoizeStringOnly;
12061
12062/***/ }),
12063/* 116 */
12064/***/ (function(module, exports, __webpack_require__) {
12065
12066"use strict";
12067/**
12068 * Copyright (c) 2013-present, Facebook, Inc.
12069 *
12070 * This source code is licensed under the MIT license found in the
12071 * LICENSE file in the root directory of this source tree.
12072 *
12073 * @typechecks
12074 */
12075
12076
12077
12078var ExecutionEnvironment = __webpack_require__(5);
12079
12080var performance;
12081
12082if (ExecutionEnvironment.canUseDOM) {
12083 performance = window.performance || window.msPerformance || window.webkitPerformance;
12084}
12085
12086module.exports = performance || {};
12087
12088/***/ }),
12089/* 117 */
12090/***/ (function(module, exports, __webpack_require__) {
12091
12092"use strict";
12093
12094
12095/**
12096 * Copyright (c) 2013-present, Facebook, Inc.
12097 *
12098 * This source code is licensed under the MIT license found in the
12099 * LICENSE file in the root directory of this source tree.
12100 *
12101 * @typechecks
12102 */
12103
12104var performance = __webpack_require__(116);
12105
12106var performanceNow;
12107
12108/**
12109 * Detect if we can use `window.performance.now()` and gracefully fallback to
12110 * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
12111 * because of Facebook's testing infrastructure.
12112 */
12113if (performance.now) {
12114 performanceNow = function performanceNow() {
12115 return performance.now();
12116 };
12117} else {
12118 performanceNow = function performanceNow() {
12119 return Date.now();
12120 };
12121}
12122
12123module.exports = performanceNow;
12124
12125/***/ }),
12126/* 118 */
12127/***/ (function(module, exports, __webpack_require__) {
12128
12129"use strict";
12130/**
12131 * Copyright (c) 2013-present, Facebook, Inc.
12132 *
12133 * This source code is licensed under the MIT license found in the
12134 * LICENSE file in the root directory of this source tree.
12135 */
12136
12137
12138
12139if (process.env.NODE_ENV !== 'production') {
12140 var invariant = __webpack_require__(0);
12141 var warning = __webpack_require__(1);
12142 var ReactPropTypesSecret = __webpack_require__(52);
12143 var loggedTypeFailures = {};
12144}
12145
12146/**
12147 * Assert that the values match with the type specs.
12148 * Error messages are memorized and will only be shown once.
12149 *
12150 * @param {object} typeSpecs Map of name to a ReactPropType
12151 * @param {object} values Runtime values that need to be type-checked
12152 * @param {string} location e.g. "prop", "context", "child context"
12153 * @param {string} componentName Name of the component for error messages.
12154 * @param {?Function} getStack Returns the component stack.
12155 * @private
12156 */
12157function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
12158 if (process.env.NODE_ENV !== 'production') {
12159 for (var typeSpecName in typeSpecs) {
12160 if (typeSpecs.hasOwnProperty(typeSpecName)) {
12161 var error;
12162 // Prop type validation may throw. In case they do, we don't want to
12163 // fail the render phase where it didn't fail before. So we log it.
12164 // After these have been cleaned up, we'll let them throw.
12165 try {
12166 // This is intentionally an invariant that gets caught. It's the same
12167 // behavior as without this statement except with a better message.
12168 invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
12169 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
12170 } catch (ex) {
12171 error = ex;
12172 }
12173 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', location, typeSpecName, typeof error);
12174 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
12175 // Only monitor this failure once because there tends to be a lot of the
12176 // same error.
12177 loggedTypeFailures[error.message] = true;
12178
12179 var stack = getStack ? getStack() : '';
12180
12181 warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
12182 }
12183 }
12184 }
12185 }
12186}
12187
12188module.exports = checkPropTypes;
12189
12190
12191/***/ }),
12192/* 119 */
12193/***/ (function(module, exports, __webpack_require__) {
12194
12195"use strict";
12196/**
12197 * Copyright (c) 2013-present, Facebook, Inc.
12198 *
12199 * This source code is licensed under the MIT license found in the
12200 * LICENSE file in the root directory of this source tree.
12201 */
12202
12203
12204
12205var emptyFunction = __webpack_require__(6);
12206var invariant = __webpack_require__(0);
12207var warning = __webpack_require__(1);
12208var assign = __webpack_require__(3);
12209
12210var ReactPropTypesSecret = __webpack_require__(52);
12211var checkPropTypes = __webpack_require__(118);
12212
12213module.exports = function(isValidElement, throwOnDirectAccess) {
12214 /* global Symbol */
12215 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
12216 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
12217
12218 /**
12219 * Returns the iterator method function contained on the iterable object.
12220 *
12221 * Be sure to invoke the function with the iterable as context:
12222 *
12223 * var iteratorFn = getIteratorFn(myIterable);
12224 * if (iteratorFn) {
12225 * var iterator = iteratorFn.call(myIterable);
12226 * ...
12227 * }
12228 *
12229 * @param {?object} maybeIterable
12230 * @return {?function}
12231 */
12232 function getIteratorFn(maybeIterable) {
12233 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
12234 if (typeof iteratorFn === 'function') {
12235 return iteratorFn;
12236 }
12237 }
12238
12239 /**
12240 * Collection of methods that allow declaration and validation of props that are
12241 * supplied to React components. Example usage:
12242 *
12243 * var Props = require('ReactPropTypes');
12244 * var MyArticle = React.createClass({
12245 * propTypes: {
12246 * // An optional string prop named "description".
12247 * description: Props.string,
12248 *
12249 * // A required enum prop named "category".
12250 * category: Props.oneOf(['News','Photos']).isRequired,
12251 *
12252 * // A prop named "dialog" that requires an instance of Dialog.
12253 * dialog: Props.instanceOf(Dialog).isRequired
12254 * },
12255 * render: function() { ... }
12256 * });
12257 *
12258 * A more formal specification of how these methods are used:
12259 *
12260 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
12261 * decl := ReactPropTypes.{type}(.isRequired)?
12262 *
12263 * Each and every declaration produces a function with the same signature. This
12264 * allows the creation of custom validation functions. For example:
12265 *
12266 * var MyLink = React.createClass({
12267 * propTypes: {
12268 * // An optional string or URI prop named "href".
12269 * href: function(props, propName, componentName) {
12270 * var propValue = props[propName];
12271 * if (propValue != null && typeof propValue !== 'string' &&
12272 * !(propValue instanceof URI)) {
12273 * return new Error(
12274 * 'Expected a string or an URI for ' + propName + ' in ' +
12275 * componentName
12276 * );
12277 * }
12278 * }
12279 * },
12280 * render: function() {...}
12281 * });
12282 *
12283 * @internal
12284 */
12285
12286 var ANONYMOUS = '<<anonymous>>';
12287
12288 // Important!
12289 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
12290 var ReactPropTypes = {
12291 array: createPrimitiveTypeChecker('array'),
12292 bool: createPrimitiveTypeChecker('boolean'),
12293 func: createPrimitiveTypeChecker('function'),
12294 number: createPrimitiveTypeChecker('number'),
12295 object: createPrimitiveTypeChecker('object'),
12296 string: createPrimitiveTypeChecker('string'),
12297 symbol: createPrimitiveTypeChecker('symbol'),
12298
12299 any: createAnyTypeChecker(),
12300 arrayOf: createArrayOfTypeChecker,
12301 element: createElementTypeChecker(),
12302 instanceOf: createInstanceTypeChecker,
12303 node: createNodeChecker(),
12304 objectOf: createObjectOfTypeChecker,
12305 oneOf: createEnumTypeChecker,
12306 oneOfType: createUnionTypeChecker,
12307 shape: createShapeTypeChecker,
12308 exact: createStrictShapeTypeChecker,
12309 };
12310
12311 /**
12312 * inlined Object.is polyfill to avoid requiring consumers ship their own
12313 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
12314 */
12315 /*eslint-disable no-self-compare*/
12316 function is(x, y) {
12317 // SameValue algorithm
12318 if (x === y) {
12319 // Steps 1-5, 7-10
12320 // Steps 6.b-6.e: +0 != -0
12321 return x !== 0 || 1 / x === 1 / y;
12322 } else {
12323 // Step 6.a: NaN == NaN
12324 return x !== x && y !== y;
12325 }
12326 }
12327 /*eslint-enable no-self-compare*/
12328
12329 /**
12330 * We use an Error-like object for backward compatibility as people may call
12331 * PropTypes directly and inspect their output. However, we don't use real
12332 * Errors anymore. We don't inspect their stack anyway, and creating them
12333 * is prohibitively expensive if they are created too often, such as what
12334 * happens in oneOfType() for any type before the one that matched.
12335 */
12336 function PropTypeError(message) {
12337 this.message = message;
12338 this.stack = '';
12339 }
12340 // Make `instanceof Error` still work for returned errors.
12341 PropTypeError.prototype = Error.prototype;
12342
12343 function createChainableTypeChecker(validate) {
12344 if (process.env.NODE_ENV !== 'production') {
12345 var manualPropTypeCallCache = {};
12346 var manualPropTypeWarningCount = 0;
12347 }
12348 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
12349 componentName = componentName || ANONYMOUS;
12350 propFullName = propFullName || propName;
12351
12352 if (secret !== ReactPropTypesSecret) {
12353 if (throwOnDirectAccess) {
12354 // New behavior only for users of `prop-types` package
12355 invariant(
12356 false,
12357 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
12358 'Use `PropTypes.checkPropTypes()` to call them. ' +
12359 'Read more at http://fb.me/use-check-prop-types'
12360 );
12361 } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
12362 // Old behavior for people using React.PropTypes
12363 var cacheKey = componentName + ':' + propName;
12364 if (
12365 !manualPropTypeCallCache[cacheKey] &&
12366 // Avoid spamming the console because they are often not actionable except for lib authors
12367 manualPropTypeWarningCount < 3
12368 ) {
12369 warning(
12370 false,
12371 'You are manually calling a React.PropTypes validation ' +
12372 'function for the `%s` prop on `%s`. This is deprecated ' +
12373 'and will throw in the standalone `prop-types` package. ' +
12374 'You may be seeing this warning due to a third-party PropTypes ' +
12375 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
12376 propFullName,
12377 componentName
12378 );
12379 manualPropTypeCallCache[cacheKey] = true;
12380 manualPropTypeWarningCount++;
12381 }
12382 }
12383 }
12384 if (props[propName] == null) {
12385 if (isRequired) {
12386 if (props[propName] === null) {
12387 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
12388 }
12389 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
12390 }
12391 return null;
12392 } else {
12393 return validate(props, propName, componentName, location, propFullName);
12394 }
12395 }
12396
12397 var chainedCheckType = checkType.bind(null, false);
12398 chainedCheckType.isRequired = checkType.bind(null, true);
12399
12400 return chainedCheckType;
12401 }
12402
12403 function createPrimitiveTypeChecker(expectedType) {
12404 function validate(props, propName, componentName, location, propFullName, secret) {
12405 var propValue = props[propName];
12406 var propType = getPropType(propValue);
12407 if (propType !== expectedType) {
12408 // `propValue` being instance of, say, date/regexp, pass the 'object'
12409 // check, but we can offer a more precise error message here rather than
12410 // 'of type `object`'.
12411 var preciseType = getPreciseType(propValue);
12412
12413 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
12414 }
12415 return null;
12416 }
12417 return createChainableTypeChecker(validate);
12418 }
12419
12420 function createAnyTypeChecker() {
12421 return createChainableTypeChecker(emptyFunction.thatReturnsNull);
12422 }
12423
12424 function createArrayOfTypeChecker(typeChecker) {
12425 function validate(props, propName, componentName, location, propFullName) {
12426 if (typeof typeChecker !== 'function') {
12427 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
12428 }
12429 var propValue = props[propName];
12430 if (!Array.isArray(propValue)) {
12431 var propType = getPropType(propValue);
12432 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
12433 }
12434 for (var i = 0; i < propValue.length; i++) {
12435 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
12436 if (error instanceof Error) {
12437 return error;
12438 }
12439 }
12440 return null;
12441 }
12442 return createChainableTypeChecker(validate);
12443 }
12444
12445 function createElementTypeChecker() {
12446 function validate(props, propName, componentName, location, propFullName) {
12447 var propValue = props[propName];
12448 if (!isValidElement(propValue)) {
12449 var propType = getPropType(propValue);
12450 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
12451 }
12452 return null;
12453 }
12454 return createChainableTypeChecker(validate);
12455 }
12456
12457 function createInstanceTypeChecker(expectedClass) {
12458 function validate(props, propName, componentName, location, propFullName) {
12459 if (!(props[propName] instanceof expectedClass)) {
12460 var expectedClassName = expectedClass.name || ANONYMOUS;
12461 var actualClassName = getClassName(props[propName]);
12462 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
12463 }
12464 return null;
12465 }
12466 return createChainableTypeChecker(validate);
12467 }
12468
12469 function createEnumTypeChecker(expectedValues) {
12470 if (!Array.isArray(expectedValues)) {
12471 process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
12472 return emptyFunction.thatReturnsNull;
12473 }
12474
12475 function validate(props, propName, componentName, location, propFullName) {
12476 var propValue = props[propName];
12477 for (var i = 0; i < expectedValues.length; i++) {
12478 if (is(propValue, expectedValues[i])) {
12479 return null;
12480 }
12481 }
12482
12483 var valuesString = JSON.stringify(expectedValues);
12484 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
12485 }
12486 return createChainableTypeChecker(validate);
12487 }
12488
12489 function createObjectOfTypeChecker(typeChecker) {
12490 function validate(props, propName, componentName, location, propFullName) {
12491 if (typeof typeChecker !== 'function') {
12492 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
12493 }
12494 var propValue = props[propName];
12495 var propType = getPropType(propValue);
12496 if (propType !== 'object') {
12497 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
12498 }
12499 for (var key in propValue) {
12500 if (propValue.hasOwnProperty(key)) {
12501 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
12502 if (error instanceof Error) {
12503 return error;
12504 }
12505 }
12506 }
12507 return null;
12508 }
12509 return createChainableTypeChecker(validate);
12510 }
12511
12512 function createUnionTypeChecker(arrayOfTypeCheckers) {
12513 if (!Array.isArray(arrayOfTypeCheckers)) {
12514 process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
12515 return emptyFunction.thatReturnsNull;
12516 }
12517
12518 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
12519 var checker = arrayOfTypeCheckers[i];
12520 if (typeof checker !== 'function') {
12521 warning(
12522 false,
12523 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
12524 'received %s at index %s.',
12525 getPostfixForTypeWarning(checker),
12526 i
12527 );
12528 return emptyFunction.thatReturnsNull;
12529 }
12530 }
12531
12532 function validate(props, propName, componentName, location, propFullName) {
12533 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
12534 var checker = arrayOfTypeCheckers[i];
12535 if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
12536 return null;
12537 }
12538 }
12539
12540 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
12541 }
12542 return createChainableTypeChecker(validate);
12543 }
12544
12545 function createNodeChecker() {
12546 function validate(props, propName, componentName, location, propFullName) {
12547 if (!isNode(props[propName])) {
12548 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
12549 }
12550 return null;
12551 }
12552 return createChainableTypeChecker(validate);
12553 }
12554
12555 function createShapeTypeChecker(shapeTypes) {
12556 function validate(props, propName, componentName, location, propFullName) {
12557 var propValue = props[propName];
12558 var propType = getPropType(propValue);
12559 if (propType !== 'object') {
12560 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
12561 }
12562 for (var key in shapeTypes) {
12563 var checker = shapeTypes[key];
12564 if (!checker) {
12565 continue;
12566 }
12567 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
12568 if (error) {
12569 return error;
12570 }
12571 }
12572 return null;
12573 }
12574 return createChainableTypeChecker(validate);
12575 }
12576
12577 function createStrictShapeTypeChecker(shapeTypes) {
12578 function validate(props, propName, componentName, location, propFullName) {
12579 var propValue = props[propName];
12580 var propType = getPropType(propValue);
12581 if (propType !== 'object') {
12582 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
12583 }
12584 // We need to check all keys in case some are required but missing from
12585 // props.
12586 var allKeys = assign({}, props[propName], shapeTypes);
12587 for (var key in allKeys) {
12588 var checker = shapeTypes[key];
12589 if (!checker) {
12590 return new PropTypeError(
12591 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
12592 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
12593 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
12594 );
12595 }
12596 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
12597 if (error) {
12598 return error;
12599 }
12600 }
12601 return null;
12602 }
12603
12604 return createChainableTypeChecker(validate);
12605 }
12606
12607 function isNode(propValue) {
12608 switch (typeof propValue) {
12609 case 'number':
12610 case 'string':
12611 case 'undefined':
12612 return true;
12613 case 'boolean':
12614 return !propValue;
12615 case 'object':
12616 if (Array.isArray(propValue)) {
12617 return propValue.every(isNode);
12618 }
12619 if (propValue === null || isValidElement(propValue)) {
12620 return true;
12621 }
12622
12623 var iteratorFn = getIteratorFn(propValue);
12624 if (iteratorFn) {
12625 var iterator = iteratorFn.call(propValue);
12626 var step;
12627 if (iteratorFn !== propValue.entries) {
12628 while (!(step = iterator.next()).done) {
12629 if (!isNode(step.value)) {
12630 return false;
12631 }
12632 }
12633 } else {
12634 // Iterator will provide entry [k,v] tuples rather than values.
12635 while (!(step = iterator.next()).done) {
12636 var entry = step.value;
12637 if (entry) {
12638 if (!isNode(entry[1])) {
12639 return false;
12640 }
12641 }
12642 }
12643 }
12644 } else {
12645 return false;
12646 }
12647
12648 return true;
12649 default:
12650 return false;
12651 }
12652 }
12653
12654 function isSymbol(propType, propValue) {
12655 // Native Symbol.
12656 if (propType === 'symbol') {
12657 return true;
12658 }
12659
12660 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
12661 if (propValue['@@toStringTag'] === 'Symbol') {
12662 return true;
12663 }
12664
12665 // Fallback for non-spec compliant Symbols which are polyfilled.
12666 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
12667 return true;
12668 }
12669
12670 return false;
12671 }
12672
12673 // Equivalent of `typeof` but with special handling for array and regexp.
12674 function getPropType(propValue) {
12675 var propType = typeof propValue;
12676 if (Array.isArray(propValue)) {
12677 return 'array';
12678 }
12679 if (propValue instanceof RegExp) {
12680 // Old webkits (at least until Android 4.0) return 'function' rather than
12681 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
12682 // passes PropTypes.object.
12683 return 'object';
12684 }
12685 if (isSymbol(propType, propValue)) {
12686 return 'symbol';
12687 }
12688 return propType;
12689 }
12690
12691 // This handles more types than `getPropType`. Only used for error messages.
12692 // See `createPrimitiveTypeChecker`.
12693 function getPreciseType(propValue) {
12694 if (typeof propValue === 'undefined' || propValue === null) {
12695 return '' + propValue;
12696 }
12697 var propType = getPropType(propValue);
12698 if (propType === 'object') {
12699 if (propValue instanceof Date) {
12700 return 'date';
12701 } else if (propValue instanceof RegExp) {
12702 return 'regexp';
12703 }
12704 }
12705 return propType;
12706 }
12707
12708 // Returns a string that is postfixed to a warning about an invalid type.
12709 // For example, "undefined" or "of type array"
12710 function getPostfixForTypeWarning(value) {
12711 var type = getPreciseType(value);
12712 switch (type) {
12713 case 'array':
12714 case 'object':
12715 return 'an ' + type;
12716 case 'boolean':
12717 case 'date':
12718 case 'regexp':
12719 return 'a ' + type;
12720 default:
12721 return type;
12722 }
12723 }
12724
12725 // Returns class name of the object, if any.
12726 function getClassName(propValue) {
12727 if (!propValue.constructor || !propValue.constructor.name) {
12728 return ANONYMOUS;
12729 }
12730 return propValue.constructor.name;
12731 }
12732
12733 ReactPropTypes.checkPropTypes = checkPropTypes;
12734 ReactPropTypes.PropTypes = ReactPropTypes;
12735
12736 return ReactPropTypes;
12737};
12738
12739
12740/***/ }),
12741/* 120 */
12742/***/ (function(module, exports, __webpack_require__) {
12743
12744"use strict";
12745/**
12746 * Copyright (c) 2013-present, Facebook, Inc.
12747 *
12748 * This source code is licensed under the MIT license found in the
12749 * LICENSE file in the root directory of this source tree.
12750 *
12751 */
12752
12753
12754
12755var ARIADOMPropertyConfig = {
12756 Properties: {
12757 // Global States and Properties
12758 'aria-current': 0, // state
12759 'aria-details': 0,
12760 'aria-disabled': 0, // state
12761 'aria-hidden': 0, // state
12762 'aria-invalid': 0, // state
12763 'aria-keyshortcuts': 0,
12764 'aria-label': 0,
12765 'aria-roledescription': 0,
12766 // Widget Attributes
12767 'aria-autocomplete': 0,
12768 'aria-checked': 0,
12769 'aria-expanded': 0,
12770 'aria-haspopup': 0,
12771 'aria-level': 0,
12772 'aria-modal': 0,
12773 'aria-multiline': 0,
12774 'aria-multiselectable': 0,
12775 'aria-orientation': 0,
12776 'aria-placeholder': 0,
12777 'aria-pressed': 0,
12778 'aria-readonly': 0,
12779 'aria-required': 0,
12780 'aria-selected': 0,
12781 'aria-sort': 0,
12782 'aria-valuemax': 0,
12783 'aria-valuemin': 0,
12784 'aria-valuenow': 0,
12785 'aria-valuetext': 0,
12786 // Live Region Attributes
12787 'aria-atomic': 0,
12788 'aria-busy': 0,
12789 'aria-live': 0,
12790 'aria-relevant': 0,
12791 // Drag-and-Drop Attributes
12792 'aria-dropeffect': 0,
12793 'aria-grabbed': 0,
12794 // Relationship Attributes
12795 'aria-activedescendant': 0,
12796 'aria-colcount': 0,
12797 'aria-colindex': 0,
12798 'aria-colspan': 0,
12799 'aria-controls': 0,
12800 'aria-describedby': 0,
12801 'aria-errormessage': 0,
12802 'aria-flowto': 0,
12803 'aria-labelledby': 0,
12804 'aria-owns': 0,
12805 'aria-posinset': 0,
12806 'aria-rowcount': 0,
12807 'aria-rowindex': 0,
12808 'aria-rowspan': 0,
12809 'aria-setsize': 0
12810 },
12811 DOMAttributeNames: {},
12812 DOMPropertyNames: {}
12813};
12814
12815module.exports = ARIADOMPropertyConfig;
12816
12817/***/ }),
12818/* 121 */
12819/***/ (function(module, exports, __webpack_require__) {
12820
12821"use strict";
12822/**
12823 * Copyright (c) 2013-present, Facebook, Inc.
12824 *
12825 * This source code is licensed under the MIT license found in the
12826 * LICENSE file in the root directory of this source tree.
12827 *
12828 */
12829
12830
12831
12832var ReactDOMComponentTree = __webpack_require__(4);
12833
12834var focusNode = __webpack_require__(49);
12835
12836var AutoFocusUtils = {
12837 focusDOMComponent: function () {
12838 focusNode(ReactDOMComponentTree.getNodeFromInstance(this));
12839 }
12840};
12841
12842module.exports = AutoFocusUtils;
12843
12844/***/ }),
12845/* 122 */
12846/***/ (function(module, exports, __webpack_require__) {
12847
12848"use strict";
12849/**
12850 * Copyright (c) 2013-present, Facebook, Inc.
12851 *
12852 * This source code is licensed under the MIT license found in the
12853 * LICENSE file in the root directory of this source tree.
12854 *
12855 */
12856
12857
12858
12859var EventPropagators = __webpack_require__(18);
12860var ExecutionEnvironment = __webpack_require__(5);
12861var FallbackCompositionState = __webpack_require__(128);
12862var SyntheticCompositionEvent = __webpack_require__(169);
12863var SyntheticInputEvent = __webpack_require__(172);
12864
12865var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
12866var START_KEYCODE = 229;
12867
12868var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
12869
12870var documentMode = null;
12871if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
12872 documentMode = document.documentMode;
12873}
12874
12875// Webkit offers a very useful `textInput` event that can be used to
12876// directly represent `beforeInput`. The IE `textinput` event is not as
12877// useful, so we don't use it.
12878var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
12879
12880// In IE9+, we have access to composition events, but the data supplied
12881// by the native compositionend event may be incorrect. Japanese ideographic
12882// spaces, for instance (\u3000) are not recorded correctly.
12883var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
12884
12885/**
12886 * Opera <= 12 includes TextEvent in window, but does not fire
12887 * text input events. Rely on keypress instead.
12888 */
12889function isPresto() {
12890 var opera = window.opera;
12891 return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
12892}
12893
12894var SPACEBAR_CODE = 32;
12895var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
12896
12897// Events and their corresponding property names.
12898var eventTypes = {
12899 beforeInput: {
12900 phasedRegistrationNames: {
12901 bubbled: 'onBeforeInput',
12902 captured: 'onBeforeInputCapture'
12903 },
12904 dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']
12905 },
12906 compositionEnd: {
12907 phasedRegistrationNames: {
12908 bubbled: 'onCompositionEnd',
12909 captured: 'onCompositionEndCapture'
12910 },
12911 dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
12912 },
12913 compositionStart: {
12914 phasedRegistrationNames: {
12915 bubbled: 'onCompositionStart',
12916 captured: 'onCompositionStartCapture'
12917 },
12918 dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
12919 },
12920 compositionUpdate: {
12921 phasedRegistrationNames: {
12922 bubbled: 'onCompositionUpdate',
12923 captured: 'onCompositionUpdateCapture'
12924 },
12925 dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
12926 }
12927};
12928
12929// Track whether we've ever handled a keypress on the space key.
12930var hasSpaceKeypress = false;
12931
12932/**
12933 * Return whether a native keypress event is assumed to be a command.
12934 * This is required because Firefox fires `keypress` events for key commands
12935 * (cut, copy, select-all, etc.) even though no character is inserted.
12936 */
12937function isKeypressCommand(nativeEvent) {
12938 return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
12939 // ctrlKey && altKey is equivalent to AltGr, and is not a command.
12940 !(nativeEvent.ctrlKey && nativeEvent.altKey);
12941}
12942
12943/**
12944 * Translate native top level events into event types.
12945 *
12946 * @param {string} topLevelType
12947 * @return {object}
12948 */
12949function getCompositionEventType(topLevelType) {
12950 switch (topLevelType) {
12951 case 'topCompositionStart':
12952 return eventTypes.compositionStart;
12953 case 'topCompositionEnd':
12954 return eventTypes.compositionEnd;
12955 case 'topCompositionUpdate':
12956 return eventTypes.compositionUpdate;
12957 }
12958}
12959
12960/**
12961 * Does our fallback best-guess model think this event signifies that
12962 * composition has begun?
12963 *
12964 * @param {string} topLevelType
12965 * @param {object} nativeEvent
12966 * @return {boolean}
12967 */
12968function isFallbackCompositionStart(topLevelType, nativeEvent) {
12969 return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE;
12970}
12971
12972/**
12973 * Does our fallback mode think that this event is the end of composition?
12974 *
12975 * @param {string} topLevelType
12976 * @param {object} nativeEvent
12977 * @return {boolean}
12978 */
12979function isFallbackCompositionEnd(topLevelType, nativeEvent) {
12980 switch (topLevelType) {
12981 case 'topKeyUp':
12982 // Command keys insert or clear IME input.
12983 return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
12984 case 'topKeyDown':
12985 // Expect IME keyCode on each keydown. If we get any other
12986 // code we must have exited earlier.
12987 return nativeEvent.keyCode !== START_KEYCODE;
12988 case 'topKeyPress':
12989 case 'topMouseDown':
12990 case 'topBlur':
12991 // Events are not possible without cancelling IME.
12992 return true;
12993 default:
12994 return false;
12995 }
12996}
12997
12998/**
12999 * Google Input Tools provides composition data via a CustomEvent,
13000 * with the `data` property populated in the `detail` object. If this
13001 * is available on the event object, use it. If not, this is a plain
13002 * composition event and we have nothing special to extract.
13003 *
13004 * @param {object} nativeEvent
13005 * @return {?string}
13006 */
13007function getDataFromCustomEvent(nativeEvent) {
13008 var detail = nativeEvent.detail;
13009 if (typeof detail === 'object' && 'data' in detail) {
13010 return detail.data;
13011 }
13012 return null;
13013}
13014
13015// Track the current IME composition fallback object, if any.
13016var currentComposition = null;
13017
13018/**
13019 * @return {?object} A SyntheticCompositionEvent.
13020 */
13021function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
13022 var eventType;
13023 var fallbackData;
13024
13025 if (canUseCompositionEvent) {
13026 eventType = getCompositionEventType(topLevelType);
13027 } else if (!currentComposition) {
13028 if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
13029 eventType = eventTypes.compositionStart;
13030 }
13031 } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
13032 eventType = eventTypes.compositionEnd;
13033 }
13034
13035 if (!eventType) {
13036 return null;
13037 }
13038
13039 if (useFallbackCompositionData) {
13040 // The current composition is stored statically and must not be
13041 // overwritten while composition continues.
13042 if (!currentComposition && eventType === eventTypes.compositionStart) {
13043 currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);
13044 } else if (eventType === eventTypes.compositionEnd) {
13045 if (currentComposition) {
13046 fallbackData = currentComposition.getData();
13047 }
13048 }
13049 }
13050
13051 var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
13052
13053 if (fallbackData) {
13054 // Inject data generated from fallback path into the synthetic event.
13055 // This matches the property of native CompositionEventInterface.
13056 event.data = fallbackData;
13057 } else {
13058 var customData = getDataFromCustomEvent(nativeEvent);
13059 if (customData !== null) {
13060 event.data = customData;
13061 }
13062 }
13063
13064 EventPropagators.accumulateTwoPhaseDispatches(event);
13065 return event;
13066}
13067
13068/**
13069 * @param {string} topLevelType Record from `EventConstants`.
13070 * @param {object} nativeEvent Native browser event.
13071 * @return {?string} The string corresponding to this `beforeInput` event.
13072 */
13073function getNativeBeforeInputChars(topLevelType, nativeEvent) {
13074 switch (topLevelType) {
13075 case 'topCompositionEnd':
13076 return getDataFromCustomEvent(nativeEvent);
13077 case 'topKeyPress':
13078 /**
13079 * If native `textInput` events are available, our goal is to make
13080 * use of them. However, there is a special case: the spacebar key.
13081 * In Webkit, preventing default on a spacebar `textInput` event
13082 * cancels character insertion, but it *also* causes the browser
13083 * to fall back to its default spacebar behavior of scrolling the
13084 * page.
13085 *
13086 * Tracking at:
13087 * https://code.google.com/p/chromium/issues/detail?id=355103
13088 *
13089 * To avoid this issue, use the keypress event as if no `textInput`
13090 * event is available.
13091 */
13092 var which = nativeEvent.which;
13093 if (which !== SPACEBAR_CODE) {
13094 return null;
13095 }
13096
13097 hasSpaceKeypress = true;
13098 return SPACEBAR_CHAR;
13099
13100 case 'topTextInput':
13101 // Record the characters to be added to the DOM.
13102 var chars = nativeEvent.data;
13103
13104 // If it's a spacebar character, assume that we have already handled
13105 // it at the keypress level and bail immediately. Android Chrome
13106 // doesn't give us keycodes, so we need to blacklist it.
13107 if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
13108 return null;
13109 }
13110
13111 return chars;
13112
13113 default:
13114 // For other native event types, do nothing.
13115 return null;
13116 }
13117}
13118
13119/**
13120 * For browsers that do not provide the `textInput` event, extract the
13121 * appropriate string to use for SyntheticInputEvent.
13122 *
13123 * @param {string} topLevelType Record from `EventConstants`.
13124 * @param {object} nativeEvent Native browser event.
13125 * @return {?string} The fallback string for this `beforeInput` event.
13126 */
13127function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
13128 // If we are currently composing (IME) and using a fallback to do so,
13129 // try to extract the composed characters from the fallback object.
13130 // If composition event is available, we extract a string only at
13131 // compositionevent, otherwise extract it at fallback events.
13132 if (currentComposition) {
13133 if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
13134 var chars = currentComposition.getData();
13135 FallbackCompositionState.release(currentComposition);
13136 currentComposition = null;
13137 return chars;
13138 }
13139 return null;
13140 }
13141
13142 switch (topLevelType) {
13143 case 'topPaste':
13144 // If a paste event occurs after a keypress, throw out the input
13145 // chars. Paste events should not lead to BeforeInput events.
13146 return null;
13147 case 'topKeyPress':
13148 /**
13149 * As of v27, Firefox may fire keypress events even when no character
13150 * will be inserted. A few possibilities:
13151 *
13152 * - `which` is `0`. Arrow keys, Esc key, etc.
13153 *
13154 * - `which` is the pressed key code, but no char is available.
13155 * Ex: 'AltGr + d` in Polish. There is no modified character for
13156 * this key combination and no character is inserted into the
13157 * document, but FF fires the keypress for char code `100` anyway.
13158 * No `input` event will occur.
13159 *
13160 * - `which` is the pressed key code, but a command combination is
13161 * being used. Ex: `Cmd+C`. No character is inserted, and no
13162 * `input` event will occur.
13163 */
13164 if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
13165 return String.fromCharCode(nativeEvent.which);
13166 }
13167 return null;
13168 case 'topCompositionEnd':
13169 return useFallbackCompositionData ? null : nativeEvent.data;
13170 default:
13171 return null;
13172 }
13173}
13174
13175/**
13176 * Extract a SyntheticInputEvent for `beforeInput`, based on either native
13177 * `textInput` or fallback behavior.
13178 *
13179 * @return {?object} A SyntheticInputEvent.
13180 */
13181function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
13182 var chars;
13183
13184 if (canUseTextInputEvent) {
13185 chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
13186 } else {
13187 chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
13188 }
13189
13190 // If no characters are being inserted, no BeforeInput event should
13191 // be fired.
13192 if (!chars) {
13193 return null;
13194 }
13195
13196 var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
13197
13198 event.data = chars;
13199 EventPropagators.accumulateTwoPhaseDispatches(event);
13200 return event;
13201}
13202
13203/**
13204 * Create an `onBeforeInput` event to match
13205 * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
13206 *
13207 * This event plugin is based on the native `textInput` event
13208 * available in Chrome, Safari, Opera, and IE. This event fires after
13209 * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
13210 *
13211 * `beforeInput` is spec'd but not implemented in any browsers, and
13212 * the `input` event does not provide any useful information about what has
13213 * actually been added, contrary to the spec. Thus, `textInput` is the best
13214 * available event to identify the characters that have actually been inserted
13215 * into the target node.
13216 *
13217 * This plugin is also responsible for emitting `composition` events, thus
13218 * allowing us to share composition fallback code for both `beforeInput` and
13219 * `composition` event types.
13220 */
13221var BeforeInputEventPlugin = {
13222 eventTypes: eventTypes,
13223
13224 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
13225 return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];
13226 }
13227};
13228
13229module.exports = BeforeInputEventPlugin;
13230
13231/***/ }),
13232/* 123 */
13233/***/ (function(module, exports, __webpack_require__) {
13234
13235"use strict";
13236/**
13237 * Copyright (c) 2013-present, Facebook, Inc.
13238 *
13239 * This source code is licensed under the MIT license found in the
13240 * LICENSE file in the root directory of this source tree.
13241 *
13242 */
13243
13244
13245
13246var CSSProperty = __webpack_require__(53);
13247var ExecutionEnvironment = __webpack_require__(5);
13248var ReactInstrumentation = __webpack_require__(7);
13249
13250var camelizeStyleName = __webpack_require__(105);
13251var dangerousStyleValue = __webpack_require__(179);
13252var hyphenateStyleName = __webpack_require__(112);
13253var memoizeStringOnly = __webpack_require__(115);
13254var warning = __webpack_require__(1);
13255
13256var processStyleName = memoizeStringOnly(function (styleName) {
13257 return hyphenateStyleName(styleName);
13258});
13259
13260var hasShorthandPropertyBug = false;
13261var styleFloatAccessor = 'cssFloat';
13262if (ExecutionEnvironment.canUseDOM) {
13263 var tempStyle = document.createElement('div').style;
13264 try {
13265 // IE8 throws "Invalid argument." if resetting shorthand style properties.
13266 tempStyle.font = '';
13267 } catch (e) {
13268 hasShorthandPropertyBug = true;
13269 }
13270 // IE8 only supports accessing cssFloat (standard) as styleFloat
13271 if (document.documentElement.style.cssFloat === undefined) {
13272 styleFloatAccessor = 'styleFloat';
13273 }
13274}
13275
13276if (process.env.NODE_ENV !== 'production') {
13277 // 'msTransform' is correct, but the other prefixes should be capitalized
13278 var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
13279
13280 // style values shouldn't contain a semicolon
13281 var badStyleValueWithSemicolonPattern = /;\s*$/;
13282
13283 var warnedStyleNames = {};
13284 var warnedStyleValues = {};
13285 var warnedForNaNValue = false;
13286
13287 var warnHyphenatedStyleName = function (name, owner) {
13288 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
13289 return;
13290 }
13291
13292 warnedStyleNames[name] = true;
13293 process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;
13294 };
13295
13296 var warnBadVendoredStyleName = function (name, owner) {
13297 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
13298 return;
13299 }
13300
13301 warnedStyleNames[name] = true;
13302 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;
13303 };
13304
13305 var warnStyleValueWithSemicolon = function (name, value, owner) {
13306 if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
13307 return;
13308 }
13309
13310 warnedStyleValues[value] = true;
13311 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;
13312 };
13313
13314 var warnStyleValueIsNaN = function (name, value, owner) {
13315 if (warnedForNaNValue) {
13316 return;
13317 }
13318
13319 warnedForNaNValue = true;
13320 process.env.NODE_ENV !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;
13321 };
13322
13323 var checkRenderMessage = function (owner) {
13324 if (owner) {
13325 var name = owner.getName();
13326 if (name) {
13327 return ' Check the render method of `' + name + '`.';
13328 }
13329 }
13330 return '';
13331 };
13332
13333 /**
13334 * @param {string} name
13335 * @param {*} value
13336 * @param {ReactDOMComponent} component
13337 */
13338 var warnValidStyle = function (name, value, component) {
13339 var owner;
13340 if (component) {
13341 owner = component._currentElement._owner;
13342 }
13343 if (name.indexOf('-') > -1) {
13344 warnHyphenatedStyleName(name, owner);
13345 } else if (badVendoredStyleNamePattern.test(name)) {
13346 warnBadVendoredStyleName(name, owner);
13347 } else if (badStyleValueWithSemicolonPattern.test(value)) {
13348 warnStyleValueWithSemicolon(name, value, owner);
13349 }
13350
13351 if (typeof value === 'number' && isNaN(value)) {
13352 warnStyleValueIsNaN(name, value, owner);
13353 }
13354 };
13355}
13356
13357/**
13358 * Operations for dealing with CSS properties.
13359 */
13360var CSSPropertyOperations = {
13361 /**
13362 * Serializes a mapping of style properties for use as inline styles:
13363 *
13364 * > createMarkupForStyles({width: '200px', height: 0})
13365 * "width:200px;height:0;"
13366 *
13367 * Undefined values are ignored so that declarative programming is easier.
13368 * The result should be HTML-escaped before insertion into the DOM.
13369 *
13370 * @param {object} styles
13371 * @param {ReactDOMComponent} component
13372 * @return {?string}
13373 */
13374 createMarkupForStyles: function (styles, component) {
13375 var serialized = '';
13376 for (var styleName in styles) {
13377 if (!styles.hasOwnProperty(styleName)) {
13378 continue;
13379 }
13380 var isCustomProperty = styleName.indexOf('--') === 0;
13381 var styleValue = styles[styleName];
13382 if (process.env.NODE_ENV !== 'production') {
13383 if (!isCustomProperty) {
13384 warnValidStyle(styleName, styleValue, component);
13385 }
13386 }
13387 if (styleValue != null) {
13388 serialized += processStyleName(styleName) + ':';
13389 serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';';
13390 }
13391 }
13392 return serialized || null;
13393 },
13394
13395 /**
13396 * Sets the value for multiple styles on a node. If a value is specified as
13397 * '' (empty string), the corresponding style property will be unset.
13398 *
13399 * @param {DOMElement} node
13400 * @param {object} styles
13401 * @param {ReactDOMComponent} component
13402 */
13403 setValueForStyles: function (node, styles, component) {
13404 if (process.env.NODE_ENV !== 'production') {
13405 ReactInstrumentation.debugTool.onHostOperation({
13406 instanceID: component._debugID,
13407 type: 'update styles',
13408 payload: styles
13409 });
13410 }
13411
13412 var style = node.style;
13413 for (var styleName in styles) {
13414 if (!styles.hasOwnProperty(styleName)) {
13415 continue;
13416 }
13417 var isCustomProperty = styleName.indexOf('--') === 0;
13418 if (process.env.NODE_ENV !== 'production') {
13419 if (!isCustomProperty) {
13420 warnValidStyle(styleName, styles[styleName], component);
13421 }
13422 }
13423 var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty);
13424 if (styleName === 'float' || styleName === 'cssFloat') {
13425 styleName = styleFloatAccessor;
13426 }
13427 if (isCustomProperty) {
13428 style.setProperty(styleName, styleValue);
13429 } else if (styleValue) {
13430 style[styleName] = styleValue;
13431 } else {
13432 var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
13433 if (expansion) {
13434 // Shorthand property that IE8 won't like unsetting, so unset each
13435 // component to placate it
13436 for (var individualStyleName in expansion) {
13437 style[individualStyleName] = '';
13438 }
13439 } else {
13440 style[styleName] = '';
13441 }
13442 }
13443 }
13444 }
13445};
13446
13447module.exports = CSSPropertyOperations;
13448
13449/***/ }),
13450/* 124 */
13451/***/ (function(module, exports, __webpack_require__) {
13452
13453"use strict";
13454/**
13455 * Copyright (c) 2013-present, Facebook, Inc.
13456 *
13457 * This source code is licensed under the MIT license found in the
13458 * LICENSE file in the root directory of this source tree.
13459 *
13460 */
13461
13462
13463
13464var EventPluginHub = __webpack_require__(17);
13465var EventPropagators = __webpack_require__(18);
13466var ExecutionEnvironment = __webpack_require__(5);
13467var ReactDOMComponentTree = __webpack_require__(4);
13468var ReactUpdates = __webpack_require__(9);
13469var SyntheticEvent = __webpack_require__(10);
13470
13471var inputValueTracking = __webpack_require__(69);
13472var getEventTarget = __webpack_require__(41);
13473var isEventSupported = __webpack_require__(42);
13474var isTextInputElement = __webpack_require__(71);
13475
13476var eventTypes = {
13477 change: {
13478 phasedRegistrationNames: {
13479 bubbled: 'onChange',
13480 captured: 'onChangeCapture'
13481 },
13482 dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']
13483 }
13484};
13485
13486function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
13487 var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, target);
13488 event.type = 'change';
13489 EventPropagators.accumulateTwoPhaseDispatches(event);
13490 return event;
13491}
13492/**
13493 * For IE shims
13494 */
13495var activeElement = null;
13496var activeElementInst = null;
13497
13498/**
13499 * SECTION: handle `change` event
13500 */
13501function shouldUseChangeEvent(elem) {
13502 var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
13503 return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
13504}
13505
13506var doesChangeEventBubble = false;
13507if (ExecutionEnvironment.canUseDOM) {
13508 // See `handleChange` comment below
13509 doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
13510}
13511
13512function manualDispatchChangeEvent(nativeEvent) {
13513 var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));
13514
13515 // If change and propertychange bubbled, we'd just bind to it like all the
13516 // other events and have it go through ReactBrowserEventEmitter. Since it
13517 // doesn't, we manually listen for the events and so we have to enqueue and
13518 // process the abstract event manually.
13519 //
13520 // Batching is necessary here in order to ensure that all event handlers run
13521 // before the next rerender (including event handlers attached to ancestor
13522 // elements instead of directly on the input). Without this, controlled
13523 // components don't work properly in conjunction with event bubbling because
13524 // the component is rerendered and the value reverted before all the event
13525 // handlers can run. See https://github.com/facebook/react/issues/708.
13526 ReactUpdates.batchedUpdates(runEventInBatch, event);
13527}
13528
13529function runEventInBatch(event) {
13530 EventPluginHub.enqueueEvents(event);
13531 EventPluginHub.processEventQueue(false);
13532}
13533
13534function startWatchingForChangeEventIE8(target, targetInst) {
13535 activeElement = target;
13536 activeElementInst = targetInst;
13537 activeElement.attachEvent('onchange', manualDispatchChangeEvent);
13538}
13539
13540function stopWatchingForChangeEventIE8() {
13541 if (!activeElement) {
13542 return;
13543 }
13544 activeElement.detachEvent('onchange', manualDispatchChangeEvent);
13545 activeElement = null;
13546 activeElementInst = null;
13547}
13548
13549function getInstIfValueChanged(targetInst, nativeEvent) {
13550 var updated = inputValueTracking.updateValueIfChanged(targetInst);
13551 var simulated = nativeEvent.simulated === true && ChangeEventPlugin._allowSimulatedPassThrough;
13552
13553 if (updated || simulated) {
13554 return targetInst;
13555 }
13556}
13557
13558function getTargetInstForChangeEvent(topLevelType, targetInst) {
13559 if (topLevelType === 'topChange') {
13560 return targetInst;
13561 }
13562}
13563
13564function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
13565 if (topLevelType === 'topFocus') {
13566 // stopWatching() should be a noop here but we call it just in case we
13567 // missed a blur event somehow.
13568 stopWatchingForChangeEventIE8();
13569 startWatchingForChangeEventIE8(target, targetInst);
13570 } else if (topLevelType === 'topBlur') {
13571 stopWatchingForChangeEventIE8();
13572 }
13573}
13574
13575/**
13576 * SECTION: handle `input` event
13577 */
13578var isInputEventSupported = false;
13579if (ExecutionEnvironment.canUseDOM) {
13580 // IE9 claims to support the input event but fails to trigger it when
13581 // deleting text, so we ignore its input events.
13582
13583 isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
13584}
13585
13586/**
13587 * (For IE <=9) Starts tracking propertychange events on the passed-in element
13588 * and override the value property so that we can distinguish user events from
13589 * value changes in JS.
13590 */
13591function startWatchingForValueChange(target, targetInst) {
13592 activeElement = target;
13593 activeElementInst = targetInst;
13594 activeElement.attachEvent('onpropertychange', handlePropertyChange);
13595}
13596
13597/**
13598 * (For IE <=9) Removes the event listeners from the currently-tracked element,
13599 * if any exists.
13600 */
13601function stopWatchingForValueChange() {
13602 if (!activeElement) {
13603 return;
13604 }
13605 activeElement.detachEvent('onpropertychange', handlePropertyChange);
13606
13607 activeElement = null;
13608 activeElementInst = null;
13609}
13610
13611/**
13612 * (For IE <=9) Handles a propertychange event, sending a `change` event if
13613 * the value of the active element has changed.
13614 */
13615function handlePropertyChange(nativeEvent) {
13616 if (nativeEvent.propertyName !== 'value') {
13617 return;
13618 }
13619 if (getInstIfValueChanged(activeElementInst, nativeEvent)) {
13620 manualDispatchChangeEvent(nativeEvent);
13621 }
13622}
13623
13624function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
13625 if (topLevelType === 'topFocus') {
13626 // In IE8, we can capture almost all .value changes by adding a
13627 // propertychange handler and looking for events with propertyName
13628 // equal to 'value'
13629 // In IE9, propertychange fires for most input events but is buggy and
13630 // doesn't fire when text is deleted, but conveniently, selectionchange
13631 // appears to fire in all of the remaining cases so we catch those and
13632 // forward the event if the value has changed
13633 // In either case, we don't want to call the event handler if the value
13634 // is changed from JS so we redefine a setter for `.value` that updates
13635 // our activeElementValue variable, allowing us to ignore those changes
13636 //
13637 // stopWatching() should be a noop here but we call it just in case we
13638 // missed a blur event somehow.
13639 stopWatchingForValueChange();
13640 startWatchingForValueChange(target, targetInst);
13641 } else if (topLevelType === 'topBlur') {
13642 stopWatchingForValueChange();
13643 }
13644}
13645
13646// For IE8 and IE9.
13647function getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEvent) {
13648 if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {
13649 // On the selectionchange event, the target is just document which isn't
13650 // helpful for us so just check activeElement instead.
13651 //
13652 // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
13653 // propertychange on the first input event after setting `value` from a
13654 // script and fires only keydown, keypress, keyup. Catching keyup usually
13655 // gets it and catching keydown lets us fire an event for the first
13656 // keystroke if user does a key repeat (it'll be a little delayed: right
13657 // before the second keystroke). Other input methods (e.g., paste) seem to
13658 // fire selectionchange normally.
13659 return getInstIfValueChanged(activeElementInst, nativeEvent);
13660 }
13661}
13662
13663/**
13664 * SECTION: handle `click` event
13665 */
13666function shouldUseClickEvent(elem) {
13667 // Use the `click` event to detect changes to checkbox and radio inputs.
13668 // This approach works across all browsers, whereas `change` does not fire
13669 // until `blur` in IE8.
13670 var nodeName = elem.nodeName;
13671 return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
13672}
13673
13674function getTargetInstForClickEvent(topLevelType, targetInst, nativeEvent) {
13675 if (topLevelType === 'topClick') {
13676 return getInstIfValueChanged(targetInst, nativeEvent);
13677 }
13678}
13679
13680function getTargetInstForInputOrChangeEvent(topLevelType, targetInst, nativeEvent) {
13681 if (topLevelType === 'topInput' || topLevelType === 'topChange') {
13682 return getInstIfValueChanged(targetInst, nativeEvent);
13683 }
13684}
13685
13686function handleControlledInputBlur(inst, node) {
13687 // TODO: In IE, inst is occasionally null. Why?
13688 if (inst == null) {
13689 return;
13690 }
13691
13692 // Fiber and ReactDOM keep wrapper state in separate places
13693 var state = inst._wrapperState || node._wrapperState;
13694
13695 if (!state || !state.controlled || node.type !== 'number') {
13696 return;
13697 }
13698
13699 // If controlled, assign the value attribute to the current value on blur
13700 var value = '' + node.value;
13701 if (node.getAttribute('value') !== value) {
13702 node.setAttribute('value', value);
13703 }
13704}
13705
13706/**
13707 * This plugin creates an `onChange` event that normalizes change events
13708 * across form elements. This event fires at a time when it's possible to
13709 * change the element's value without seeing a flicker.
13710 *
13711 * Supported elements are:
13712 * - input (see `isTextInputElement`)
13713 * - textarea
13714 * - select
13715 */
13716var ChangeEventPlugin = {
13717 eventTypes: eventTypes,
13718
13719 _allowSimulatedPassThrough: true,
13720 _isInputEventSupported: isInputEventSupported,
13721
13722 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
13723 var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
13724
13725 var getTargetInstFunc, handleEventFunc;
13726 if (shouldUseChangeEvent(targetNode)) {
13727 if (doesChangeEventBubble) {
13728 getTargetInstFunc = getTargetInstForChangeEvent;
13729 } else {
13730 handleEventFunc = handleEventsForChangeEventIE8;
13731 }
13732 } else if (isTextInputElement(targetNode)) {
13733 if (isInputEventSupported) {
13734 getTargetInstFunc = getTargetInstForInputOrChangeEvent;
13735 } else {
13736 getTargetInstFunc = getTargetInstForInputEventPolyfill;
13737 handleEventFunc = handleEventsForInputEventPolyfill;
13738 }
13739 } else if (shouldUseClickEvent(targetNode)) {
13740 getTargetInstFunc = getTargetInstForClickEvent;
13741 }
13742
13743 if (getTargetInstFunc) {
13744 var inst = getTargetInstFunc(topLevelType, targetInst, nativeEvent);
13745 if (inst) {
13746 var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
13747 return event;
13748 }
13749 }
13750
13751 if (handleEventFunc) {
13752 handleEventFunc(topLevelType, targetNode, targetInst);
13753 }
13754
13755 // When blurring, set the value attribute for number inputs
13756 if (topLevelType === 'topBlur') {
13757 handleControlledInputBlur(targetInst, targetNode);
13758 }
13759 }
13760};
13761
13762module.exports = ChangeEventPlugin;
13763
13764/***/ }),
13765/* 125 */
13766/***/ (function(module, exports, __webpack_require__) {
13767
13768"use strict";
13769/**
13770 * Copyright (c) 2013-present, Facebook, Inc.
13771 *
13772 * This source code is licensed under the MIT license found in the
13773 * LICENSE file in the root directory of this source tree.
13774 *
13775 */
13776
13777
13778
13779var _prodInvariant = __webpack_require__(2);
13780
13781var DOMLazyTree = __webpack_require__(15);
13782var ExecutionEnvironment = __webpack_require__(5);
13783
13784var createNodesFromMarkup = __webpack_require__(108);
13785var emptyFunction = __webpack_require__(6);
13786var invariant = __webpack_require__(0);
13787
13788var Danger = {
13789 /**
13790 * Replaces a node with a string of markup at its current position within its
13791 * parent. The markup must render into a single root node.
13792 *
13793 * @param {DOMElement} oldChild Child node to replace.
13794 * @param {string} markup Markup to render in place of the child node.
13795 * @internal
13796 */
13797 dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {
13798 !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;
13799 !markup ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0;
13800 !(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;
13801
13802 if (typeof markup === 'string') {
13803 var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
13804 oldChild.parentNode.replaceChild(newChild, oldChild);
13805 } else {
13806 DOMLazyTree.replaceChildWithTree(oldChild, markup);
13807 }
13808 }
13809};
13810
13811module.exports = Danger;
13812
13813/***/ }),
13814/* 126 */
13815/***/ (function(module, exports, __webpack_require__) {
13816
13817"use strict";
13818/**
13819 * Copyright (c) 2013-present, Facebook, Inc.
13820 *
13821 * This source code is licensed under the MIT license found in the
13822 * LICENSE file in the root directory of this source tree.
13823 *
13824 */
13825
13826
13827
13828/**
13829 * Module that is injectable into `EventPluginHub`, that specifies a
13830 * deterministic ordering of `EventPlugin`s. A convenient way to reason about
13831 * plugins, without having to package every one of them. This is better than
13832 * having plugins be ordered in the same order that they are injected because
13833 * that ordering would be influenced by the packaging order.
13834 * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
13835 * preventing default on events is convenient in `SimpleEventPlugin` handlers.
13836 */
13837
13838var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
13839
13840module.exports = DefaultEventPluginOrder;
13841
13842/***/ }),
13843/* 127 */
13844/***/ (function(module, exports, __webpack_require__) {
13845
13846"use strict";
13847/**
13848 * Copyright (c) 2013-present, Facebook, Inc.
13849 *
13850 * This source code is licensed under the MIT license found in the
13851 * LICENSE file in the root directory of this source tree.
13852 *
13853 */
13854
13855
13856
13857var EventPropagators = __webpack_require__(18);
13858var ReactDOMComponentTree = __webpack_require__(4);
13859var SyntheticMouseEvent = __webpack_require__(23);
13860
13861var eventTypes = {
13862 mouseEnter: {
13863 registrationName: 'onMouseEnter',
13864 dependencies: ['topMouseOut', 'topMouseOver']
13865 },
13866 mouseLeave: {
13867 registrationName: 'onMouseLeave',
13868 dependencies: ['topMouseOut', 'topMouseOver']
13869 }
13870};
13871
13872var EnterLeaveEventPlugin = {
13873 eventTypes: eventTypes,
13874
13875 /**
13876 * For almost every interaction we care about, there will be both a top-level
13877 * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
13878 * we do not extract duplicate events. However, moving the mouse into the
13879 * browser from outside will not fire a `mouseout` event. In this case, we use
13880 * the `mouseover` top-level event.
13881 */
13882 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
13883 if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
13884 return null;
13885 }
13886 if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') {
13887 // Must not be a mouse in or mouse out - ignoring.
13888 return null;
13889 }
13890
13891 var win;
13892 if (nativeEventTarget.window === nativeEventTarget) {
13893 // `nativeEventTarget` is probably a window object.
13894 win = nativeEventTarget;
13895 } else {
13896 // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
13897 var doc = nativeEventTarget.ownerDocument;
13898 if (doc) {
13899 win = doc.defaultView || doc.parentWindow;
13900 } else {
13901 win = window;
13902 }
13903 }
13904
13905 var from;
13906 var to;
13907 if (topLevelType === 'topMouseOut') {
13908 from = targetInst;
13909 var related = nativeEvent.relatedTarget || nativeEvent.toElement;
13910 to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;
13911 } else {
13912 // Moving to a node from outside the window.
13913 from = null;
13914 to = targetInst;
13915 }
13916
13917 if (from === to) {
13918 // Nothing pertains to our managed components.
13919 return null;
13920 }
13921
13922 var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from);
13923 var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to);
13924
13925 var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);
13926 leave.type = 'mouseleave';
13927 leave.target = fromNode;
13928 leave.relatedTarget = toNode;
13929
13930 var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);
13931 enter.type = 'mouseenter';
13932 enter.target = toNode;
13933 enter.relatedTarget = fromNode;
13934
13935 EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to);
13936
13937 return [leave, enter];
13938 }
13939};
13940
13941module.exports = EnterLeaveEventPlugin;
13942
13943/***/ }),
13944/* 128 */
13945/***/ (function(module, exports, __webpack_require__) {
13946
13947"use strict";
13948/**
13949 * Copyright (c) 2013-present, Facebook, Inc.
13950 *
13951 * This source code is licensed under the MIT license found in the
13952 * LICENSE file in the root directory of this source tree.
13953 *
13954 */
13955
13956
13957
13958var _assign = __webpack_require__(3);
13959
13960var PooledClass = __webpack_require__(12);
13961
13962var getTextContentAccessor = __webpack_require__(68);
13963
13964/**
13965 * This helper class stores information about text content of a target node,
13966 * allowing comparison of content before and after a given event.
13967 *
13968 * Identify the node where selection currently begins, then observe
13969 * both its text content and its current position in the DOM. Since the
13970 * browser may natively replace the target node during composition, we can
13971 * use its position to find its replacement.
13972 *
13973 * @param {DOMEventTarget} root
13974 */
13975function FallbackCompositionState(root) {
13976 this._root = root;
13977 this._startText = this.getText();
13978 this._fallbackText = null;
13979}
13980
13981_assign(FallbackCompositionState.prototype, {
13982 destructor: function () {
13983 this._root = null;
13984 this._startText = null;
13985 this._fallbackText = null;
13986 },
13987
13988 /**
13989 * Get current text of input.
13990 *
13991 * @return {string}
13992 */
13993 getText: function () {
13994 if ('value' in this._root) {
13995 return this._root.value;
13996 }
13997 return this._root[getTextContentAccessor()];
13998 },
13999
14000 /**
14001 * Determine the differing substring between the initially stored
14002 * text content and the current content.
14003 *
14004 * @return {string}
14005 */
14006 getData: function () {
14007 if (this._fallbackText) {
14008 return this._fallbackText;
14009 }
14010
14011 var start;
14012 var startValue = this._startText;
14013 var startLength = startValue.length;
14014 var end;
14015 var endValue = this.getText();
14016 var endLength = endValue.length;
14017
14018 for (start = 0; start < startLength; start++) {
14019 if (startValue[start] !== endValue[start]) {
14020 break;
14021 }
14022 }
14023
14024 var minEnd = startLength - start;
14025 for (end = 1; end <= minEnd; end++) {
14026 if (startValue[startLength - end] !== endValue[endLength - end]) {
14027 break;
14028 }
14029 }
14030
14031 var sliceTail = end > 1 ? 1 - end : undefined;
14032 this._fallbackText = endValue.slice(start, sliceTail);
14033 return this._fallbackText;
14034 }
14035});
14036
14037PooledClass.addPoolingTo(FallbackCompositionState);
14038
14039module.exports = FallbackCompositionState;
14040
14041/***/ }),
14042/* 129 */
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 DOMProperty = __webpack_require__(16);
14057
14058var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
14059var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
14060var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
14061var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
14062var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
14063
14064var HTMLDOMPropertyConfig = {
14065 isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
14066 Properties: {
14067 /**
14068 * Standard Properties
14069 */
14070 accept: 0,
14071 acceptCharset: 0,
14072 accessKey: 0,
14073 action: 0,
14074 allowFullScreen: HAS_BOOLEAN_VALUE,
14075 allowTransparency: 0,
14076 alt: 0,
14077 // specifies target context for links with `preload` type
14078 as: 0,
14079 async: HAS_BOOLEAN_VALUE,
14080 autoComplete: 0,
14081 // autoFocus is polyfilled/normalized by AutoFocusUtils
14082 // autoFocus: HAS_BOOLEAN_VALUE,
14083 autoPlay: HAS_BOOLEAN_VALUE,
14084 capture: HAS_BOOLEAN_VALUE,
14085 cellPadding: 0,
14086 cellSpacing: 0,
14087 charSet: 0,
14088 challenge: 0,
14089 checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
14090 cite: 0,
14091 classID: 0,
14092 className: 0,
14093 cols: HAS_POSITIVE_NUMERIC_VALUE,
14094 colSpan: 0,
14095 content: 0,
14096 contentEditable: 0,
14097 contextMenu: 0,
14098 controls: HAS_BOOLEAN_VALUE,
14099 controlsList: 0,
14100 coords: 0,
14101 crossOrigin: 0,
14102 data: 0, // For `<object />` acts as `src`.
14103 dateTime: 0,
14104 'default': HAS_BOOLEAN_VALUE,
14105 defer: HAS_BOOLEAN_VALUE,
14106 dir: 0,
14107 disabled: HAS_BOOLEAN_VALUE,
14108 download: HAS_OVERLOADED_BOOLEAN_VALUE,
14109 draggable: 0,
14110 encType: 0,
14111 form: 0,
14112 formAction: 0,
14113 formEncType: 0,
14114 formMethod: 0,
14115 formNoValidate: HAS_BOOLEAN_VALUE,
14116 formTarget: 0,
14117 frameBorder: 0,
14118 headers: 0,
14119 height: 0,
14120 hidden: HAS_BOOLEAN_VALUE,
14121 high: 0,
14122 href: 0,
14123 hrefLang: 0,
14124 htmlFor: 0,
14125 httpEquiv: 0,
14126 icon: 0,
14127 id: 0,
14128 inputMode: 0,
14129 integrity: 0,
14130 is: 0,
14131 keyParams: 0,
14132 keyType: 0,
14133 kind: 0,
14134 label: 0,
14135 lang: 0,
14136 list: 0,
14137 loop: HAS_BOOLEAN_VALUE,
14138 low: 0,
14139 manifest: 0,
14140 marginHeight: 0,
14141 marginWidth: 0,
14142 max: 0,
14143 maxLength: 0,
14144 media: 0,
14145 mediaGroup: 0,
14146 method: 0,
14147 min: 0,
14148 minLength: 0,
14149 // Caution; `option.selected` is not updated if `select.multiple` is
14150 // disabled with `removeAttribute`.
14151 multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
14152 muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
14153 name: 0,
14154 nonce: 0,
14155 noValidate: HAS_BOOLEAN_VALUE,
14156 open: HAS_BOOLEAN_VALUE,
14157 optimum: 0,
14158 pattern: 0,
14159 placeholder: 0,
14160 playsInline: HAS_BOOLEAN_VALUE,
14161 poster: 0,
14162 preload: 0,
14163 profile: 0,
14164 radioGroup: 0,
14165 readOnly: HAS_BOOLEAN_VALUE,
14166 referrerPolicy: 0,
14167 rel: 0,
14168 required: HAS_BOOLEAN_VALUE,
14169 reversed: HAS_BOOLEAN_VALUE,
14170 role: 0,
14171 rows: HAS_POSITIVE_NUMERIC_VALUE,
14172 rowSpan: HAS_NUMERIC_VALUE,
14173 sandbox: 0,
14174 scope: 0,
14175 scoped: HAS_BOOLEAN_VALUE,
14176 scrolling: 0,
14177 seamless: HAS_BOOLEAN_VALUE,
14178 selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
14179 shape: 0,
14180 size: HAS_POSITIVE_NUMERIC_VALUE,
14181 sizes: 0,
14182 span: HAS_POSITIVE_NUMERIC_VALUE,
14183 spellCheck: 0,
14184 src: 0,
14185 srcDoc: 0,
14186 srcLang: 0,
14187 srcSet: 0,
14188 start: HAS_NUMERIC_VALUE,
14189 step: 0,
14190 style: 0,
14191 summary: 0,
14192 tabIndex: 0,
14193 target: 0,
14194 title: 0,
14195 // Setting .type throws on non-<input> tags
14196 type: 0,
14197 useMap: 0,
14198 value: 0,
14199 width: 0,
14200 wmode: 0,
14201 wrap: 0,
14202
14203 /**
14204 * RDFa Properties
14205 */
14206 about: 0,
14207 datatype: 0,
14208 inlist: 0,
14209 prefix: 0,
14210 // property is also supported for OpenGraph in meta tags.
14211 property: 0,
14212 resource: 0,
14213 'typeof': 0,
14214 vocab: 0,
14215
14216 /**
14217 * Non-standard Properties
14218 */
14219 // autoCapitalize and autoCorrect are supported in Mobile Safari for
14220 // keyboard hints.
14221 autoCapitalize: 0,
14222 autoCorrect: 0,
14223 // autoSave allows WebKit/Blink to persist values of input fields on page reloads
14224 autoSave: 0,
14225 // color is for Safari mask-icon link
14226 color: 0,
14227 // itemProp, itemScope, itemType are for
14228 // Microdata support. See http://schema.org/docs/gs.html
14229 itemProp: 0,
14230 itemScope: HAS_BOOLEAN_VALUE,
14231 itemType: 0,
14232 // itemID and itemRef are for Microdata support as well but
14233 // only specified in the WHATWG spec document. See
14234 // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
14235 itemID: 0,
14236 itemRef: 0,
14237 // results show looking glass icon and recent searches on input
14238 // search fields in WebKit/Blink
14239 results: 0,
14240 // IE-only attribute that specifies security restrictions on an iframe
14241 // as an alternative to the sandbox attribute on IE<10
14242 security: 0,
14243 // IE-only attribute that controls focus behavior
14244 unselectable: 0
14245 },
14246 DOMAttributeNames: {
14247 acceptCharset: 'accept-charset',
14248 className: 'class',
14249 htmlFor: 'for',
14250 httpEquiv: 'http-equiv'
14251 },
14252 DOMPropertyNames: {},
14253 DOMMutationMethods: {
14254 value: function (node, value) {
14255 if (value == null) {
14256 return node.removeAttribute('value');
14257 }
14258
14259 // Number inputs get special treatment due to some edge cases in
14260 // Chrome. Let everything else assign the value attribute as normal.
14261 // https://github.com/facebook/react/issues/7253#issuecomment-236074326
14262 if (node.type !== 'number' || node.hasAttribute('value') === false) {
14263 node.setAttribute('value', '' + value);
14264 } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) {
14265 // Don't assign an attribute if validation reports bad
14266 // input. Chrome will clear the value. Additionally, don't
14267 // operate on inputs that have focus, otherwise Chrome might
14268 // strip off trailing decimal places and cause the user's
14269 // cursor position to jump to the beginning of the input.
14270 //
14271 // In ReactDOMInput, we have an onBlur event that will trigger
14272 // this function again when focus is lost.
14273 node.setAttribute('value', '' + value);
14274 }
14275 }
14276 }
14277};
14278
14279module.exports = HTMLDOMPropertyConfig;
14280
14281/***/ }),
14282/* 130 */
14283/***/ (function(module, exports, __webpack_require__) {
14284
14285"use strict";
14286/**
14287 * Copyright (c) 2014-present, Facebook, Inc.
14288 *
14289 * This source code is licensed under the MIT license found in the
14290 * LICENSE file in the root directory of this source tree.
14291 *
14292 */
14293
14294
14295
14296var ReactReconciler = __webpack_require__(19);
14297
14298var instantiateReactComponent = __webpack_require__(70);
14299var KeyEscapeUtils = __webpack_require__(32);
14300var shouldUpdateReactComponent = __webpack_require__(73);
14301var traverseAllChildren = __webpack_require__(74);
14302var warning = __webpack_require__(1);
14303
14304var ReactComponentTreeHook;
14305
14306if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
14307 // Temporary hack.
14308 // Inline requires don't work well with Jest:
14309 // https://github.com/facebook/react/issues/7240
14310 // Remove the inline requires when we don't need them anymore:
14311 // https://github.com/facebook/react/pull/7178
14312 ReactComponentTreeHook = __webpack_require__(8);
14313}
14314
14315function instantiateChild(childInstances, child, name, selfDebugID) {
14316 // We found a component instance.
14317 var keyUnique = childInstances[name] === undefined;
14318 if (process.env.NODE_ENV !== 'production') {
14319 if (!ReactComponentTreeHook) {
14320 ReactComponentTreeHook = __webpack_require__(8);
14321 }
14322 if (!keyUnique) {
14323 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;
14324 }
14325 }
14326 if (child != null && keyUnique) {
14327 childInstances[name] = instantiateReactComponent(child, true);
14328 }
14329}
14330
14331/**
14332 * ReactChildReconciler provides helpers for initializing or updating a set of
14333 * children. Its output is suitable for passing it onto ReactMultiChild which
14334 * does diffed reordering and insertion.
14335 */
14336var ReactChildReconciler = {
14337 /**
14338 * Generates a "mount image" for each of the supplied children. In the case
14339 * of `ReactDOMComponent`, a mount image is a string of markup.
14340 *
14341 * @param {?object} nestedChildNodes Nested child maps.
14342 * @return {?object} A set of child instances.
14343 * @internal
14344 */
14345 instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID) // 0 in production and for roots
14346 {
14347 if (nestedChildNodes == null) {
14348 return null;
14349 }
14350 var childInstances = {};
14351
14352 if (process.env.NODE_ENV !== 'production') {
14353 traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {
14354 return instantiateChild(childInsts, child, name, selfDebugID);
14355 }, childInstances);
14356 } else {
14357 traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);
14358 }
14359 return childInstances;
14360 },
14361
14362 /**
14363 * Updates the rendered children and returns a new set of children.
14364 *
14365 * @param {?object} prevChildren Previously initialized set of children.
14366 * @param {?object} nextChildren Flat child element maps.
14367 * @param {ReactReconcileTransaction} transaction
14368 * @param {object} context
14369 * @return {?object} A new set of child instances.
14370 * @internal
14371 */
14372 updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) // 0 in production and for roots
14373 {
14374 // We currently don't have a way to track moves here but if we use iterators
14375 // instead of for..in we can zip the iterators and check if an item has
14376 // moved.
14377 // TODO: If nothing has changed, return the prevChildren object so that we
14378 // can quickly bailout if nothing has changed.
14379 if (!nextChildren && !prevChildren) {
14380 return;
14381 }
14382 var name;
14383 var prevChild;
14384 for (name in nextChildren) {
14385 if (!nextChildren.hasOwnProperty(name)) {
14386 continue;
14387 }
14388 prevChild = prevChildren && prevChildren[name];
14389 var prevElement = prevChild && prevChild._currentElement;
14390 var nextElement = nextChildren[name];
14391 if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {
14392 ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);
14393 nextChildren[name] = prevChild;
14394 } else {
14395 if (prevChild) {
14396 removedNodes[name] = ReactReconciler.getHostNode(prevChild);
14397 ReactReconciler.unmountComponent(prevChild, false);
14398 }
14399 // The child must be instantiated before it's mounted.
14400 var nextChildInstance = instantiateReactComponent(nextElement, true);
14401 nextChildren[name] = nextChildInstance;
14402 // Creating mount image now ensures refs are resolved in right order
14403 // (see https://github.com/facebook/react/pull/7101 for explanation).
14404 var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);
14405 mountImages.push(nextChildMountImage);
14406 }
14407 }
14408 // Unmount children that are no longer present.
14409 for (name in prevChildren) {
14410 if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
14411 prevChild = prevChildren[name];
14412 removedNodes[name] = ReactReconciler.getHostNode(prevChild);
14413 ReactReconciler.unmountComponent(prevChild, false);
14414 }
14415 }
14416 },
14417
14418 /**
14419 * Unmounts all rendered children. This should be used to clean up children
14420 * when this component is unmounted.
14421 *
14422 * @param {?object} renderedChildren Previously initialized set of children.
14423 * @internal
14424 */
14425 unmountChildren: function (renderedChildren, safely) {
14426 for (var name in renderedChildren) {
14427 if (renderedChildren.hasOwnProperty(name)) {
14428 var renderedChild = renderedChildren[name];
14429 ReactReconciler.unmountComponent(renderedChild, safely);
14430 }
14431 }
14432 }
14433};
14434
14435module.exports = ReactChildReconciler;
14436
14437/***/ }),
14438/* 131 */
14439/***/ (function(module, exports, __webpack_require__) {
14440
14441"use strict";
14442/**
14443 * Copyright (c) 2013-present, Facebook, Inc.
14444 *
14445 * This source code is licensed under the MIT license found in the
14446 * LICENSE file in the root directory of this source tree.
14447 *
14448 */
14449
14450
14451
14452var DOMChildrenOperations = __webpack_require__(28);
14453var ReactDOMIDOperations = __webpack_require__(136);
14454
14455/**
14456 * Abstracts away all functionality of the reconciler that requires knowledge of
14457 * the browser context. TODO: These callers should be refactored to avoid the
14458 * need for this injection.
14459 */
14460var ReactComponentBrowserEnvironment = {
14461 processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
14462
14463 replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
14464};
14465
14466module.exports = ReactComponentBrowserEnvironment;
14467
14468/***/ }),
14469/* 132 */
14470/***/ (function(module, exports, __webpack_require__) {
14471
14472"use strict";
14473/**
14474 * Copyright (c) 2013-present, Facebook, Inc.
14475 *
14476 * This source code is licensed under the MIT license found in the
14477 * LICENSE file in the root directory of this source tree.
14478 *
14479 */
14480
14481
14482
14483var _prodInvariant = __webpack_require__(2),
14484 _assign = __webpack_require__(3);
14485
14486var React = __webpack_require__(21);
14487var ReactComponentEnvironment = __webpack_require__(35);
14488var ReactCurrentOwner = __webpack_require__(11);
14489var ReactErrorUtils = __webpack_require__(36);
14490var ReactInstanceMap = __webpack_require__(37);
14491var ReactInstrumentation = __webpack_require__(7);
14492var ReactNodeTypes = __webpack_require__(155);
14493var ReactReconciler = __webpack_require__(19);
14494
14495if (process.env.NODE_ENV !== 'production') {
14496 var checkReactTypeSpec = __webpack_require__(178);
14497}
14498
14499var emptyObject = __webpack_require__(22);
14500var invariant = __webpack_require__(0);
14501var shallowEqual = __webpack_require__(27);
14502var shouldUpdateReactComponent = __webpack_require__(73);
14503var warning = __webpack_require__(1);
14504
14505var CompositeTypes = {
14506 ImpureClass: 0,
14507 PureClass: 1,
14508 StatelessFunctional: 2
14509};
14510
14511function StatelessComponent(Component) {}
14512StatelessComponent.prototype.render = function () {
14513 var Component = ReactInstanceMap.get(this)._currentElement.type;
14514 var element = Component(this.props, this.context, this.updater);
14515 warnIfInvalidElement(Component, element);
14516 return element;
14517};
14518
14519function warnIfInvalidElement(Component, element) {
14520 if (process.env.NODE_ENV !== 'production') {
14521 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;
14522 process.env.NODE_ENV !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0;
14523 }
14524}
14525
14526function shouldConstruct(Component) {
14527 return !!(Component.prototype && Component.prototype.isReactComponent);
14528}
14529
14530function isPureComponent(Component) {
14531 return !!(Component.prototype && Component.prototype.isPureReactComponent);
14532}
14533
14534// Separated into a function to contain deoptimizations caused by try/finally.
14535function measureLifeCyclePerf(fn, debugID, timerType) {
14536 if (debugID === 0) {
14537 // Top-level wrappers (see ReactMount) and empty components (see
14538 // ReactDOMEmptyComponent) are invisible to hooks and devtools.
14539 // Both are implementation details that should go away in the future.
14540 return fn();
14541 }
14542
14543 ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);
14544 try {
14545 return fn();
14546 } finally {
14547 ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);
14548 }
14549}
14550
14551/**
14552 * ------------------ The Life-Cycle of a Composite Component ------------------
14553 *
14554 * - constructor: Initialization of state. The instance is now retained.
14555 * - componentWillMount
14556 * - render
14557 * - [children's constructors]
14558 * - [children's componentWillMount and render]
14559 * - [children's componentDidMount]
14560 * - componentDidMount
14561 *
14562 * Update Phases:
14563 * - componentWillReceiveProps (only called if parent updated)
14564 * - shouldComponentUpdate
14565 * - componentWillUpdate
14566 * - render
14567 * - [children's constructors or receive props phases]
14568 * - componentDidUpdate
14569 *
14570 * - componentWillUnmount
14571 * - [children's componentWillUnmount]
14572 * - [children destroyed]
14573 * - (destroyed): The instance is now blank, released by React and ready for GC.
14574 *
14575 * -----------------------------------------------------------------------------
14576 */
14577
14578/**
14579 * An incrementing ID assigned to each component when it is mounted. This is
14580 * used to enforce the order in which `ReactUpdates` updates dirty components.
14581 *
14582 * @private
14583 */
14584var nextMountID = 1;
14585
14586/**
14587 * @lends {ReactCompositeComponent.prototype}
14588 */
14589var ReactCompositeComponent = {
14590 /**
14591 * Base constructor for all composite component.
14592 *
14593 * @param {ReactElement} element
14594 * @final
14595 * @internal
14596 */
14597 construct: function (element) {
14598 this._currentElement = element;
14599 this._rootNodeID = 0;
14600 this._compositeType = null;
14601 this._instance = null;
14602 this._hostParent = null;
14603 this._hostContainerInfo = null;
14604
14605 // See ReactUpdateQueue
14606 this._updateBatchNumber = null;
14607 this._pendingElement = null;
14608 this._pendingStateQueue = null;
14609 this._pendingReplaceState = false;
14610 this._pendingForceUpdate = false;
14611
14612 this._renderedNodeType = null;
14613 this._renderedComponent = null;
14614 this._context = null;
14615 this._mountOrder = 0;
14616 this._topLevelWrapper = null;
14617
14618 // See ReactUpdates and ReactUpdateQueue.
14619 this._pendingCallbacks = null;
14620
14621 // ComponentWillUnmount shall only be called once
14622 this._calledComponentWillUnmount = false;
14623
14624 if (process.env.NODE_ENV !== 'production') {
14625 this._warnedAboutRefsInRender = false;
14626 }
14627 },
14628
14629 /**
14630 * Initializes the component, renders markup, and registers event listeners.
14631 *
14632 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
14633 * @param {?object} hostParent
14634 * @param {?object} hostContainerInfo
14635 * @param {?object} context
14636 * @return {?string} Rendered markup to be inserted into the DOM.
14637 * @final
14638 * @internal
14639 */
14640 mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
14641 var _this = this;
14642
14643 this._context = context;
14644 this._mountOrder = nextMountID++;
14645 this._hostParent = hostParent;
14646 this._hostContainerInfo = hostContainerInfo;
14647
14648 var publicProps = this._currentElement.props;
14649 var publicContext = this._processContext(context);
14650
14651 var Component = this._currentElement.type;
14652
14653 var updateQueue = transaction.getUpdateQueue();
14654
14655 // Initialize the public class
14656 var doConstruct = shouldConstruct(Component);
14657 var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);
14658 var renderedElement;
14659
14660 // Support functional components
14661 if (!doConstruct && (inst == null || inst.render == null)) {
14662 renderedElement = inst;
14663 warnIfInvalidElement(Component, renderedElement);
14664 !(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;
14665 inst = new StatelessComponent(Component);
14666 this._compositeType = CompositeTypes.StatelessFunctional;
14667 } else {
14668 if (isPureComponent(Component)) {
14669 this._compositeType = CompositeTypes.PureClass;
14670 } else {
14671 this._compositeType = CompositeTypes.ImpureClass;
14672 }
14673 }
14674
14675 if (process.env.NODE_ENV !== 'production') {
14676 // This will throw later in _renderValidatedComponent, but add an early
14677 // warning now to help debugging
14678 if (inst.render == null) {
14679 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;
14680 }
14681
14682 var propsMutated = inst.props !== publicProps;
14683 var componentName = Component.displayName || Component.name || 'Component';
14684
14685 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;
14686 }
14687
14688 // These should be set up in the constructor, but as a convenience for
14689 // simpler class abstractions, we set them up after the fact.
14690 inst.props = publicProps;
14691 inst.context = publicContext;
14692 inst.refs = emptyObject;
14693 inst.updater = updateQueue;
14694
14695 this._instance = inst;
14696
14697 // Store a reference from the instance back to the internal representation
14698 ReactInstanceMap.set(inst, this);
14699
14700 if (process.env.NODE_ENV !== 'production') {
14701 // Since plain JS classes are defined without any special initialization
14702 // logic, we can not catch common errors early. Therefore, we have to
14703 // catch them here, at initialization time, instead.
14704 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;
14705 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;
14706 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;
14707 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;
14708 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;
14709 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;
14710 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;
14711 }
14712
14713 var initialState = inst.state;
14714 if (initialState === undefined) {
14715 inst.state = initialState = null;
14716 }
14717 !(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;
14718
14719 this._pendingStateQueue = null;
14720 this._pendingReplaceState = false;
14721 this._pendingForceUpdate = false;
14722
14723 var markup;
14724 if (inst.unstable_handleError) {
14725 markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
14726 } else {
14727 markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
14728 }
14729
14730 if (inst.componentDidMount) {
14731 if (process.env.NODE_ENV !== 'production') {
14732 transaction.getReactMountReady().enqueue(function () {
14733 measureLifeCyclePerf(function () {
14734 return inst.componentDidMount();
14735 }, _this._debugID, 'componentDidMount');
14736 });
14737 } else {
14738 transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
14739 }
14740 }
14741
14742 return markup;
14743 },
14744
14745 _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) {
14746 if (process.env.NODE_ENV !== 'production' && !doConstruct) {
14747 ReactCurrentOwner.current = this;
14748 try {
14749 return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
14750 } finally {
14751 ReactCurrentOwner.current = null;
14752 }
14753 } else {
14754 return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
14755 }
14756 },
14757
14758 _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) {
14759 var Component = this._currentElement.type;
14760
14761 if (doConstruct) {
14762 if (process.env.NODE_ENV !== 'production') {
14763 return measureLifeCyclePerf(function () {
14764 return new Component(publicProps, publicContext, updateQueue);
14765 }, this._debugID, 'ctor');
14766 } else {
14767 return new Component(publicProps, publicContext, updateQueue);
14768 }
14769 }
14770
14771 // This can still be an instance in case of factory components
14772 // but we'll count this as time spent rendering as the more common case.
14773 if (process.env.NODE_ENV !== 'production') {
14774 return measureLifeCyclePerf(function () {
14775 return Component(publicProps, publicContext, updateQueue);
14776 }, this._debugID, 'render');
14777 } else {
14778 return Component(publicProps, publicContext, updateQueue);
14779 }
14780 },
14781
14782 performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
14783 var markup;
14784 var checkpoint = transaction.checkpoint();
14785 try {
14786 markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
14787 } catch (e) {
14788 // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint
14789 transaction.rollback(checkpoint);
14790 this._instance.unstable_handleError(e);
14791 if (this._pendingStateQueue) {
14792 this._instance.state = this._processPendingState(this._instance.props, this._instance.context);
14793 }
14794 checkpoint = transaction.checkpoint();
14795
14796 this._renderedComponent.unmountComponent(true);
14797 transaction.rollback(checkpoint);
14798
14799 // Try again - we've informed the component about the error, so they can render an error message this time.
14800 // If this throws again, the error will bubble up (and can be caught by a higher error boundary).
14801 markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
14802 }
14803 return markup;
14804 },
14805
14806 performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
14807 var inst = this._instance;
14808
14809 var debugID = 0;
14810 if (process.env.NODE_ENV !== 'production') {
14811 debugID = this._debugID;
14812 }
14813
14814 if (inst.componentWillMount) {
14815 if (process.env.NODE_ENV !== 'production') {
14816 measureLifeCyclePerf(function () {
14817 return inst.componentWillMount();
14818 }, debugID, 'componentWillMount');
14819 } else {
14820 inst.componentWillMount();
14821 }
14822 // When mounting, calls to `setState` by `componentWillMount` will set
14823 // `this._pendingStateQueue` without triggering a re-render.
14824 if (this._pendingStateQueue) {
14825 inst.state = this._processPendingState(inst.props, inst.context);
14826 }
14827 }
14828
14829 // If not a stateless component, we now render
14830 if (renderedElement === undefined) {
14831 renderedElement = this._renderValidatedComponent();
14832 }
14833
14834 var nodeType = ReactNodeTypes.getType(renderedElement);
14835 this._renderedNodeType = nodeType;
14836 var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */
14837 );
14838 this._renderedComponent = child;
14839
14840 var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
14841
14842 if (process.env.NODE_ENV !== 'production') {
14843 if (debugID !== 0) {
14844 var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
14845 ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
14846 }
14847 }
14848
14849 return markup;
14850 },
14851
14852 getHostNode: function () {
14853 return ReactReconciler.getHostNode(this._renderedComponent);
14854 },
14855
14856 /**
14857 * Releases any resources allocated by `mountComponent`.
14858 *
14859 * @final
14860 * @internal
14861 */
14862 unmountComponent: function (safely) {
14863 if (!this._renderedComponent) {
14864 return;
14865 }
14866
14867 var inst = this._instance;
14868
14869 if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {
14870 inst._calledComponentWillUnmount = true;
14871
14872 if (safely) {
14873 var name = this.getName() + '.componentWillUnmount()';
14874 ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
14875 } else {
14876 if (process.env.NODE_ENV !== 'production') {
14877 measureLifeCyclePerf(function () {
14878 return inst.componentWillUnmount();
14879 }, this._debugID, 'componentWillUnmount');
14880 } else {
14881 inst.componentWillUnmount();
14882 }
14883 }
14884 }
14885
14886 if (this._renderedComponent) {
14887 ReactReconciler.unmountComponent(this._renderedComponent, safely);
14888 this._renderedNodeType = null;
14889 this._renderedComponent = null;
14890 this._instance = null;
14891 }
14892
14893 // Reset pending fields
14894 // Even if this component is scheduled for another update in ReactUpdates,
14895 // it would still be ignored because these fields are reset.
14896 this._pendingStateQueue = null;
14897 this._pendingReplaceState = false;
14898 this._pendingForceUpdate = false;
14899 this._pendingCallbacks = null;
14900 this._pendingElement = null;
14901
14902 // These fields do not really need to be reset since this object is no
14903 // longer accessible.
14904 this._context = null;
14905 this._rootNodeID = 0;
14906 this._topLevelWrapper = null;
14907
14908 // Delete the reference from the instance to this internal representation
14909 // which allow the internals to be properly cleaned up even if the user
14910 // leaks a reference to the public instance.
14911 ReactInstanceMap.remove(inst);
14912
14913 // Some existing components rely on inst.props even after they've been
14914 // destroyed (in event handlers).
14915 // TODO: inst.props = null;
14916 // TODO: inst.state = null;
14917 // TODO: inst.context = null;
14918 },
14919
14920 /**
14921 * Filters the context object to only contain keys specified in
14922 * `contextTypes`
14923 *
14924 * @param {object} context
14925 * @return {?object}
14926 * @private
14927 */
14928 _maskContext: function (context) {
14929 var Component = this._currentElement.type;
14930 var contextTypes = Component.contextTypes;
14931 if (!contextTypes) {
14932 return emptyObject;
14933 }
14934 var maskedContext = {};
14935 for (var contextName in contextTypes) {
14936 maskedContext[contextName] = context[contextName];
14937 }
14938 return maskedContext;
14939 },
14940
14941 /**
14942 * Filters the context object to only contain keys specified in
14943 * `contextTypes`, and asserts that they are valid.
14944 *
14945 * @param {object} context
14946 * @return {?object}
14947 * @private
14948 */
14949 _processContext: function (context) {
14950 var maskedContext = this._maskContext(context);
14951 if (process.env.NODE_ENV !== 'production') {
14952 var Component = this._currentElement.type;
14953 if (Component.contextTypes) {
14954 this._checkContextTypes(Component.contextTypes, maskedContext, 'context');
14955 }
14956 }
14957 return maskedContext;
14958 },
14959
14960 /**
14961 * @param {object} currentContext
14962 * @return {object}
14963 * @private
14964 */
14965 _processChildContext: function (currentContext) {
14966 var Component = this._currentElement.type;
14967 var inst = this._instance;
14968 var childContext;
14969
14970 if (inst.getChildContext) {
14971 if (process.env.NODE_ENV !== 'production') {
14972 ReactInstrumentation.debugTool.onBeginProcessingChildContext();
14973 try {
14974 childContext = inst.getChildContext();
14975 } finally {
14976 ReactInstrumentation.debugTool.onEndProcessingChildContext();
14977 }
14978 } else {
14979 childContext = inst.getChildContext();
14980 }
14981 }
14982
14983 if (childContext) {
14984 !(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;
14985 if (process.env.NODE_ENV !== 'production') {
14986 this._checkContextTypes(Component.childContextTypes, childContext, 'child context');
14987 }
14988 for (var name in childContext) {
14989 !(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;
14990 }
14991 return _assign({}, currentContext, childContext);
14992 }
14993 return currentContext;
14994 },
14995
14996 /**
14997 * Assert that the context types are valid
14998 *
14999 * @param {object} typeSpecs Map of context field to a ReactPropType
15000 * @param {object} values Runtime values that need to be type-checked
15001 * @param {string} location e.g. "prop", "context", "child context"
15002 * @private
15003 */
15004 _checkContextTypes: function (typeSpecs, values, location) {
15005 if (process.env.NODE_ENV !== 'production') {
15006 checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID);
15007 }
15008 },
15009
15010 receiveComponent: function (nextElement, transaction, nextContext) {
15011 var prevElement = this._currentElement;
15012 var prevContext = this._context;
15013
15014 this._pendingElement = null;
15015
15016 this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);
15017 },
15018
15019 /**
15020 * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate`
15021 * is set, update the component.
15022 *
15023 * @param {ReactReconcileTransaction} transaction
15024 * @internal
15025 */
15026 performUpdateIfNecessary: function (transaction) {
15027 if (this._pendingElement != null) {
15028 ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context);
15029 } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
15030 this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context);
15031 } else {
15032 this._updateBatchNumber = null;
15033 }
15034 },
15035
15036 /**
15037 * Perform an update to a mounted component. The componentWillReceiveProps and
15038 * shouldComponentUpdate methods are called, then (assuming the update isn't
15039 * skipped) the remaining update lifecycle methods are called and the DOM
15040 * representation is updated.
15041 *
15042 * By default, this implements React's rendering and reconciliation algorithm.
15043 * Sophisticated clients may wish to override this.
15044 *
15045 * @param {ReactReconcileTransaction} transaction
15046 * @param {ReactElement} prevParentElement
15047 * @param {ReactElement} nextParentElement
15048 * @internal
15049 * @overridable
15050 */
15051 updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {
15052 var inst = this._instance;
15053 !(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;
15054
15055 var willReceive = false;
15056 var nextContext;
15057
15058 // Determine if the context has changed or not
15059 if (this._context === nextUnmaskedContext) {
15060 nextContext = inst.context;
15061 } else {
15062 nextContext = this._processContext(nextUnmaskedContext);
15063 willReceive = true;
15064 }
15065
15066 var prevProps = prevParentElement.props;
15067 var nextProps = nextParentElement.props;
15068
15069 // Not a simple state update but a props update
15070 if (prevParentElement !== nextParentElement) {
15071 willReceive = true;
15072 }
15073
15074 // An update here will schedule an update but immediately set
15075 // _pendingStateQueue which will ensure that any state updates gets
15076 // immediately reconciled instead of waiting for the next batch.
15077 if (willReceive && inst.componentWillReceiveProps) {
15078 if (process.env.NODE_ENV !== 'production') {
15079 measureLifeCyclePerf(function () {
15080 return inst.componentWillReceiveProps(nextProps, nextContext);
15081 }, this._debugID, 'componentWillReceiveProps');
15082 } else {
15083 inst.componentWillReceiveProps(nextProps, nextContext);
15084 }
15085 }
15086
15087 var nextState = this._processPendingState(nextProps, nextContext);
15088 var shouldUpdate = true;
15089
15090 if (!this._pendingForceUpdate) {
15091 if (inst.shouldComponentUpdate) {
15092 if (process.env.NODE_ENV !== 'production') {
15093 shouldUpdate = measureLifeCyclePerf(function () {
15094 return inst.shouldComponentUpdate(nextProps, nextState, nextContext);
15095 }, this._debugID, 'shouldComponentUpdate');
15096 } else {
15097 shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);
15098 }
15099 } else {
15100 if (this._compositeType === CompositeTypes.PureClass) {
15101 shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState);
15102 }
15103 }
15104 }
15105
15106 if (process.env.NODE_ENV !== 'production') {
15107 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;
15108 }
15109
15110 this._updateBatchNumber = null;
15111 if (shouldUpdate) {
15112 this._pendingForceUpdate = false;
15113 // Will set `this.props`, `this.state` and `this.context`.
15114 this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext);
15115 } else {
15116 // If it's determined that a component should not update, we still want
15117 // to set props and state but we shortcut the rest of the update.
15118 this._currentElement = nextParentElement;
15119 this._context = nextUnmaskedContext;
15120 inst.props = nextProps;
15121 inst.state = nextState;
15122 inst.context = nextContext;
15123 }
15124 },
15125
15126 _processPendingState: function (props, context) {
15127 var inst = this._instance;
15128 var queue = this._pendingStateQueue;
15129 var replace = this._pendingReplaceState;
15130 this._pendingReplaceState = false;
15131 this._pendingStateQueue = null;
15132
15133 if (!queue) {
15134 return inst.state;
15135 }
15136
15137 if (replace && queue.length === 1) {
15138 return queue[0];
15139 }
15140
15141 var nextState = _assign({}, replace ? queue[0] : inst.state);
15142 for (var i = replace ? 1 : 0; i < queue.length; i++) {
15143 var partial = queue[i];
15144 _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);
15145 }
15146
15147 return nextState;
15148 },
15149
15150 /**
15151 * Merges new props and state, notifies delegate methods of update and
15152 * performs update.
15153 *
15154 * @param {ReactElement} nextElement Next element
15155 * @param {object} nextProps Next public object to set as properties.
15156 * @param {?object} nextState Next object to set as state.
15157 * @param {?object} nextContext Next public object to set as context.
15158 * @param {ReactReconcileTransaction} transaction
15159 * @param {?object} unmaskedContext
15160 * @private
15161 */
15162 _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
15163 var _this2 = this;
15164
15165 var inst = this._instance;
15166
15167 var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
15168 var prevProps;
15169 var prevState;
15170 var prevContext;
15171 if (hasComponentDidUpdate) {
15172 prevProps = inst.props;
15173 prevState = inst.state;
15174 prevContext = inst.context;
15175 }
15176
15177 if (inst.componentWillUpdate) {
15178 if (process.env.NODE_ENV !== 'production') {
15179 measureLifeCyclePerf(function () {
15180 return inst.componentWillUpdate(nextProps, nextState, nextContext);
15181 }, this._debugID, 'componentWillUpdate');
15182 } else {
15183 inst.componentWillUpdate(nextProps, nextState, nextContext);
15184 }
15185 }
15186
15187 this._currentElement = nextElement;
15188 this._context = unmaskedContext;
15189 inst.props = nextProps;
15190 inst.state = nextState;
15191 inst.context = nextContext;
15192
15193 this._updateRenderedComponent(transaction, unmaskedContext);
15194
15195 if (hasComponentDidUpdate) {
15196 if (process.env.NODE_ENV !== 'production') {
15197 transaction.getReactMountReady().enqueue(function () {
15198 measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate');
15199 });
15200 } else {
15201 transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
15202 }
15203 }
15204 },
15205
15206 /**
15207 * Call the component's `render` method and update the DOM accordingly.
15208 *
15209 * @param {ReactReconcileTransaction} transaction
15210 * @internal
15211 */
15212 _updateRenderedComponent: function (transaction, context) {
15213 var prevComponentInstance = this._renderedComponent;
15214 var prevRenderedElement = prevComponentInstance._currentElement;
15215 var nextRenderedElement = this._renderValidatedComponent();
15216
15217 var debugID = 0;
15218 if (process.env.NODE_ENV !== 'production') {
15219 debugID = this._debugID;
15220 }
15221
15222 if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
15223 ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));
15224 } else {
15225 var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance);
15226 ReactReconciler.unmountComponent(prevComponentInstance, false);
15227
15228 var nodeType = ReactNodeTypes.getType(nextRenderedElement);
15229 this._renderedNodeType = nodeType;
15230 var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */
15231 );
15232 this._renderedComponent = child;
15233
15234 var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);
15235
15236 if (process.env.NODE_ENV !== 'production') {
15237 if (debugID !== 0) {
15238 var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
15239 ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
15240 }
15241 }
15242
15243 this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance);
15244 }
15245 },
15246
15247 /**
15248 * Overridden in shallow rendering.
15249 *
15250 * @protected
15251 */
15252 _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) {
15253 ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance);
15254 },
15255
15256 /**
15257 * @protected
15258 */
15259 _renderValidatedComponentWithoutOwnerOrContext: function () {
15260 var inst = this._instance;
15261 var renderedElement;
15262
15263 if (process.env.NODE_ENV !== 'production') {
15264 renderedElement = measureLifeCyclePerf(function () {
15265 return inst.render();
15266 }, this._debugID, 'render');
15267 } else {
15268 renderedElement = inst.render();
15269 }
15270
15271 if (process.env.NODE_ENV !== 'production') {
15272 // We allow auto-mocks to proceed as if they're returning null.
15273 if (renderedElement === undefined && inst.render._isMockFunction) {
15274 // This is probably bad practice. Consider warning here and
15275 // deprecating this convenience.
15276 renderedElement = null;
15277 }
15278 }
15279
15280 return renderedElement;
15281 },
15282
15283 /**
15284 * @private
15285 */
15286 _renderValidatedComponent: function () {
15287 var renderedElement;
15288 if (process.env.NODE_ENV !== 'production' || this._compositeType !== CompositeTypes.StatelessFunctional) {
15289 ReactCurrentOwner.current = this;
15290 try {
15291 renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
15292 } finally {
15293 ReactCurrentOwner.current = null;
15294 }
15295 } else {
15296 renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
15297 }
15298 !(
15299 // TODO: An `isValidNode` function would probably be more appropriate
15300 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;
15301
15302 return renderedElement;
15303 },
15304
15305 /**
15306 * Lazily allocates the refs object and stores `component` as `ref`.
15307 *
15308 * @param {string} ref Reference name.
15309 * @param {component} component Component to store as `ref`.
15310 * @final
15311 * @private
15312 */
15313 attachRef: function (ref, component) {
15314 var inst = this.getPublicInstance();
15315 !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0;
15316 var publicComponentInstance = component.getPublicInstance();
15317 if (process.env.NODE_ENV !== 'production') {
15318 var componentName = component && component.getName ? component.getName() : 'a component';
15319 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;
15320 }
15321 var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
15322 refs[ref] = publicComponentInstance;
15323 },
15324
15325 /**
15326 * Detaches a reference name.
15327 *
15328 * @param {string} ref Name to dereference.
15329 * @final
15330 * @private
15331 */
15332 detachRef: function (ref) {
15333 var refs = this.getPublicInstance().refs;
15334 delete refs[ref];
15335 },
15336
15337 /**
15338 * Get a text description of the component that can be used to identify it
15339 * in error messages.
15340 * @return {string} The name or null.
15341 * @internal
15342 */
15343 getName: function () {
15344 var type = this._currentElement.type;
15345 var constructor = this._instance && this._instance.constructor;
15346 return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null;
15347 },
15348
15349 /**
15350 * Get the publicly accessible representation of this component - i.e. what
15351 * is exposed by refs and returned by render. Can be null for stateless
15352 * components.
15353 *
15354 * @return {ReactComponent} the public component instance.
15355 * @internal
15356 */
15357 getPublicInstance: function () {
15358 var inst = this._instance;
15359 if (this._compositeType === CompositeTypes.StatelessFunctional) {
15360 return null;
15361 }
15362 return inst;
15363 },
15364
15365 // Stub
15366 _instantiateReactComponent: null
15367};
15368
15369module.exports = ReactCompositeComponent;
15370
15371/***/ }),
15372/* 133 */
15373/***/ (function(module, exports, __webpack_require__) {
15374
15375"use strict";
15376/**
15377 * Copyright (c) 2013-present, Facebook, Inc.
15378 *
15379 * This source code is licensed under the MIT license found in the
15380 * LICENSE file in the root directory of this source tree.
15381 *
15382 */
15383
15384/* global hasOwnProperty:true */
15385
15386
15387
15388var _prodInvariant = __webpack_require__(2),
15389 _assign = __webpack_require__(3);
15390
15391var AutoFocusUtils = __webpack_require__(121);
15392var CSSPropertyOperations = __webpack_require__(123);
15393var DOMLazyTree = __webpack_require__(15);
15394var DOMNamespaces = __webpack_require__(29);
15395var DOMProperty = __webpack_require__(16);
15396var DOMPropertyOperations = __webpack_require__(55);
15397var EventPluginHub = __webpack_require__(17);
15398var EventPluginRegistry = __webpack_require__(30);
15399var ReactBrowserEventEmitter = __webpack_require__(34);
15400var ReactDOMComponentFlags = __webpack_require__(56);
15401var ReactDOMComponentTree = __webpack_require__(4);
15402var ReactDOMInput = __webpack_require__(137);
15403var ReactDOMOption = __webpack_require__(138);
15404var ReactDOMSelect = __webpack_require__(57);
15405var ReactDOMTextarea = __webpack_require__(142);
15406var ReactInstrumentation = __webpack_require__(7);
15407var ReactMultiChild = __webpack_require__(154);
15408var ReactServerRenderingTransaction = __webpack_require__(63);
15409
15410var emptyFunction = __webpack_require__(6);
15411var escapeTextContentForBrowser = __webpack_require__(25);
15412var invariant = __webpack_require__(0);
15413var isEventSupported = __webpack_require__(42);
15414var shallowEqual = __webpack_require__(27);
15415var inputValueTracking = __webpack_require__(69);
15416var validateDOMNesting = __webpack_require__(44);
15417var warning = __webpack_require__(1);
15418
15419var Flags = ReactDOMComponentFlags;
15420var deleteListener = EventPluginHub.deleteListener;
15421var getNode = ReactDOMComponentTree.getNodeFromInstance;
15422var listenTo = ReactBrowserEventEmitter.listenTo;
15423var registrationNameModules = EventPluginRegistry.registrationNameModules;
15424
15425// For quickly matching children type, to test if can be treated as content.
15426var CONTENT_TYPES = { string: true, number: true };
15427
15428var STYLE = 'style';
15429var HTML = '__html';
15430var RESERVED_PROPS = {
15431 children: null,
15432 dangerouslySetInnerHTML: null,
15433 suppressContentEditableWarning: null
15434};
15435
15436// Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE).
15437var DOC_FRAGMENT_TYPE = 11;
15438
15439function getDeclarationErrorAddendum(internalInstance) {
15440 if (internalInstance) {
15441 var owner = internalInstance._currentElement._owner || null;
15442 if (owner) {
15443 var name = owner.getName();
15444 if (name) {
15445 return ' This DOM node was rendered by `' + name + '`.';
15446 }
15447 }
15448 }
15449 return '';
15450}
15451
15452function friendlyStringify(obj) {
15453 if (typeof obj === 'object') {
15454 if (Array.isArray(obj)) {
15455 return '[' + obj.map(friendlyStringify).join(', ') + ']';
15456 } else {
15457 var pairs = [];
15458 for (var key in obj) {
15459 if (Object.prototype.hasOwnProperty.call(obj, key)) {
15460 var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key);
15461 pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key]));
15462 }
15463 }
15464 return '{' + pairs.join(', ') + '}';
15465 }
15466 } else if (typeof obj === 'string') {
15467 return JSON.stringify(obj);
15468 } else if (typeof obj === 'function') {
15469 return '[function object]';
15470 }
15471 // Differs from JSON.stringify in that undefined because undefined and that
15472 // inf and nan don't become null
15473 return String(obj);
15474}
15475
15476var styleMutationWarning = {};
15477
15478function checkAndWarnForMutatedStyle(style1, style2, component) {
15479 if (style1 == null || style2 == null) {
15480 return;
15481 }
15482 if (shallowEqual(style1, style2)) {
15483 return;
15484 }
15485
15486 var componentName = component._tag;
15487 var owner = component._currentElement._owner;
15488 var ownerName;
15489 if (owner) {
15490 ownerName = owner.getName();
15491 }
15492
15493 var hash = ownerName + '|' + componentName;
15494
15495 if (styleMutationWarning.hasOwnProperty(hash)) {
15496 return;
15497 }
15498
15499 styleMutationWarning[hash] = true;
15500
15501 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;
15502}
15503
15504/**
15505 * @param {object} component
15506 * @param {?object} props
15507 */
15508function assertValidProps(component, props) {
15509 if (!props) {
15510 return;
15511 }
15512 // Note the use of `==` which checks for null or undefined.
15513 if (voidElementTags[component._tag]) {
15514 !(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;
15515 }
15516 if (props.dangerouslySetInnerHTML != null) {
15517 !(props.children == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0;
15518 !(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;
15519 }
15520 if (process.env.NODE_ENV !== 'production') {
15521 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;
15522 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;
15523 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;
15524 }
15525 !(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;
15526}
15527
15528function enqueuePutListener(inst, registrationName, listener, transaction) {
15529 if (transaction instanceof ReactServerRenderingTransaction) {
15530 return;
15531 }
15532 if (process.env.NODE_ENV !== 'production') {
15533 // IE8 has no API for event capturing and the `onScroll` event doesn't
15534 // bubble.
15535 process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), "This browser doesn't support the `onScroll` event") : void 0;
15536 }
15537 var containerInfo = inst._hostContainerInfo;
15538 var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE;
15539 var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument;
15540 listenTo(registrationName, doc);
15541 transaction.getReactMountReady().enqueue(putListener, {
15542 inst: inst,
15543 registrationName: registrationName,
15544 listener: listener
15545 });
15546}
15547
15548function putListener() {
15549 var listenerToPut = this;
15550 EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener);
15551}
15552
15553function inputPostMount() {
15554 var inst = this;
15555 ReactDOMInput.postMountWrapper(inst);
15556}
15557
15558function textareaPostMount() {
15559 var inst = this;
15560 ReactDOMTextarea.postMountWrapper(inst);
15561}
15562
15563function optionPostMount() {
15564 var inst = this;
15565 ReactDOMOption.postMountWrapper(inst);
15566}
15567
15568var setAndValidateContentChildDev = emptyFunction;
15569if (process.env.NODE_ENV !== 'production') {
15570 setAndValidateContentChildDev = function (content) {
15571 var hasExistingContent = this._contentDebugID != null;
15572 var debugID = this._debugID;
15573 // This ID represents the inlined child that has no backing instance:
15574 var contentDebugID = -debugID;
15575
15576 if (content == null) {
15577 if (hasExistingContent) {
15578 ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID);
15579 }
15580 this._contentDebugID = null;
15581 return;
15582 }
15583
15584 validateDOMNesting(null, String(content), this, this._ancestorInfo);
15585 this._contentDebugID = contentDebugID;
15586 if (hasExistingContent) {
15587 ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);
15588 ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID);
15589 } else {
15590 ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID);
15591 ReactInstrumentation.debugTool.onMountComponent(contentDebugID);
15592 ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]);
15593 }
15594 };
15595}
15596
15597// There are so many media events, it makes sense to just
15598// maintain a list rather than create a `trapBubbledEvent` for each
15599var mediaEvents = {
15600 topAbort: 'abort',
15601 topCanPlay: 'canplay',
15602 topCanPlayThrough: 'canplaythrough',
15603 topDurationChange: 'durationchange',
15604 topEmptied: 'emptied',
15605 topEncrypted: 'encrypted',
15606 topEnded: 'ended',
15607 topError: 'error',
15608 topLoadedData: 'loadeddata',
15609 topLoadedMetadata: 'loadedmetadata',
15610 topLoadStart: 'loadstart',
15611 topPause: 'pause',
15612 topPlay: 'play',
15613 topPlaying: 'playing',
15614 topProgress: 'progress',
15615 topRateChange: 'ratechange',
15616 topSeeked: 'seeked',
15617 topSeeking: 'seeking',
15618 topStalled: 'stalled',
15619 topSuspend: 'suspend',
15620 topTimeUpdate: 'timeupdate',
15621 topVolumeChange: 'volumechange',
15622 topWaiting: 'waiting'
15623};
15624
15625function trackInputValue() {
15626 inputValueTracking.track(this);
15627}
15628
15629function trapBubbledEventsLocal() {
15630 var inst = this;
15631 // If a component renders to null or if another component fatals and causes
15632 // the state of the tree to be corrupted, `node` here can be null.
15633 !inst._rootNodeID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0;
15634 var node = getNode(inst);
15635 !node ? process.env.NODE_ENV !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0;
15636
15637 switch (inst._tag) {
15638 case 'iframe':
15639 case 'object':
15640 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];
15641 break;
15642 case 'video':
15643 case 'audio':
15644 inst._wrapperState.listeners = [];
15645 // Create listener for each media event
15646 for (var event in mediaEvents) {
15647 if (mediaEvents.hasOwnProperty(event)) {
15648 inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node));
15649 }
15650 }
15651 break;
15652 case 'source':
15653 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)];
15654 break;
15655 case 'img':
15656 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];
15657 break;
15658 case 'form':
15659 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)];
15660 break;
15661 case 'input':
15662 case 'select':
15663 case 'textarea':
15664 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)];
15665 break;
15666 }
15667}
15668
15669function postUpdateSelectWrapper() {
15670 ReactDOMSelect.postUpdateWrapper(this);
15671}
15672
15673// For HTML, certain tags should omit their close tag. We keep a whitelist for
15674// those special-case tags.
15675
15676var omittedCloseTags = {
15677 area: true,
15678 base: true,
15679 br: true,
15680 col: true,
15681 embed: true,
15682 hr: true,
15683 img: true,
15684 input: true,
15685 keygen: true,
15686 link: true,
15687 meta: true,
15688 param: true,
15689 source: true,
15690 track: true,
15691 wbr: true
15692 // NOTE: menuitem's close tag should be omitted, but that causes problems.
15693};
15694
15695var newlineEatingTags = {
15696 listing: true,
15697 pre: true,
15698 textarea: true
15699};
15700
15701// For HTML, certain tags cannot have children. This has the same purpose as
15702// `omittedCloseTags` except that `menuitem` should still have its closing tag.
15703
15704var voidElementTags = _assign({
15705 menuitem: true
15706}, omittedCloseTags);
15707
15708// We accept any tag to be rendered but since this gets injected into arbitrary
15709// HTML, we want to make sure that it's a safe tag.
15710// http://www.w3.org/TR/REC-xml/#NT-Name
15711
15712var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
15713var validatedTagCache = {};
15714var hasOwnProperty = {}.hasOwnProperty;
15715
15716function validateDangerousTag(tag) {
15717 if (!hasOwnProperty.call(validatedTagCache, tag)) {
15718 !VALID_TAG_REGEX.test(tag) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0;
15719 validatedTagCache[tag] = true;
15720 }
15721}
15722
15723function isCustomComponent(tagName, props) {
15724 return tagName.indexOf('-') >= 0 || props.is != null;
15725}
15726
15727var globalIdCounter = 1;
15728
15729/**
15730 * Creates a new React class that is idempotent and capable of containing other
15731 * React components. It accepts event listeners and DOM properties that are
15732 * valid according to `DOMProperty`.
15733 *
15734 * - Event listeners: `onClick`, `onMouseDown`, etc.
15735 * - DOM properties: `className`, `name`, `title`, etc.
15736 *
15737 * The `style` property functions differently from the DOM API. It accepts an
15738 * object mapping of style properties to values.
15739 *
15740 * @constructor ReactDOMComponent
15741 * @extends ReactMultiChild
15742 */
15743function ReactDOMComponent(element) {
15744 var tag = element.type;
15745 validateDangerousTag(tag);
15746 this._currentElement = element;
15747 this._tag = tag.toLowerCase();
15748 this._namespaceURI = null;
15749 this._renderedChildren = null;
15750 this._previousStyle = null;
15751 this._previousStyleCopy = null;
15752 this._hostNode = null;
15753 this._hostParent = null;
15754 this._rootNodeID = 0;
15755 this._domID = 0;
15756 this._hostContainerInfo = null;
15757 this._wrapperState = null;
15758 this._topLevelWrapper = null;
15759 this._flags = 0;
15760 if (process.env.NODE_ENV !== 'production') {
15761 this._ancestorInfo = null;
15762 setAndValidateContentChildDev.call(this, null);
15763 }
15764}
15765
15766ReactDOMComponent.displayName = 'ReactDOMComponent';
15767
15768ReactDOMComponent.Mixin = {
15769 /**
15770 * Generates root tag markup then recurses. This method has side effects and
15771 * is not idempotent.
15772 *
15773 * @internal
15774 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
15775 * @param {?ReactDOMComponent} the parent component instance
15776 * @param {?object} info about the host container
15777 * @param {object} context
15778 * @return {string} The computed markup.
15779 */
15780 mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
15781 this._rootNodeID = globalIdCounter++;
15782 this._domID = hostContainerInfo._idCounter++;
15783 this._hostParent = hostParent;
15784 this._hostContainerInfo = hostContainerInfo;
15785
15786 var props = this._currentElement.props;
15787
15788 switch (this._tag) {
15789 case 'audio':
15790 case 'form':
15791 case 'iframe':
15792 case 'img':
15793 case 'link':
15794 case 'object':
15795 case 'source':
15796 case 'video':
15797 this._wrapperState = {
15798 listeners: null
15799 };
15800 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
15801 break;
15802 case 'input':
15803 ReactDOMInput.mountWrapper(this, props, hostParent);
15804 props = ReactDOMInput.getHostProps(this, props);
15805 transaction.getReactMountReady().enqueue(trackInputValue, this);
15806 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
15807 break;
15808 case 'option':
15809 ReactDOMOption.mountWrapper(this, props, hostParent);
15810 props = ReactDOMOption.getHostProps(this, props);
15811 break;
15812 case 'select':
15813 ReactDOMSelect.mountWrapper(this, props, hostParent);
15814 props = ReactDOMSelect.getHostProps(this, props);
15815 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
15816 break;
15817 case 'textarea':
15818 ReactDOMTextarea.mountWrapper(this, props, hostParent);
15819 props = ReactDOMTextarea.getHostProps(this, props);
15820 transaction.getReactMountReady().enqueue(trackInputValue, this);
15821 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
15822 break;
15823 }
15824
15825 assertValidProps(this, props);
15826
15827 // We create tags in the namespace of their parent container, except HTML
15828 // tags get no namespace.
15829 var namespaceURI;
15830 var parentTag;
15831 if (hostParent != null) {
15832 namespaceURI = hostParent._namespaceURI;
15833 parentTag = hostParent._tag;
15834 } else if (hostContainerInfo._tag) {
15835 namespaceURI = hostContainerInfo._namespaceURI;
15836 parentTag = hostContainerInfo._tag;
15837 }
15838 if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') {
15839 namespaceURI = DOMNamespaces.html;
15840 }
15841 if (namespaceURI === DOMNamespaces.html) {
15842 if (this._tag === 'svg') {
15843 namespaceURI = DOMNamespaces.svg;
15844 } else if (this._tag === 'math') {
15845 namespaceURI = DOMNamespaces.mathml;
15846 }
15847 }
15848 this._namespaceURI = namespaceURI;
15849
15850 if (process.env.NODE_ENV !== 'production') {
15851 var parentInfo;
15852 if (hostParent != null) {
15853 parentInfo = hostParent._ancestorInfo;
15854 } else if (hostContainerInfo._tag) {
15855 parentInfo = hostContainerInfo._ancestorInfo;
15856 }
15857 if (parentInfo) {
15858 // parentInfo should always be present except for the top-level
15859 // component when server rendering
15860 validateDOMNesting(this._tag, null, this, parentInfo);
15861 }
15862 this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);
15863 }
15864
15865 var mountImage;
15866 if (transaction.useCreateElement) {
15867 var ownerDocument = hostContainerInfo._ownerDocument;
15868 var el;
15869 if (namespaceURI === DOMNamespaces.html) {
15870 if (this._tag === 'script') {
15871 // Create the script via .innerHTML so its "parser-inserted" flag is
15872 // set to true and it does not execute
15873 var div = ownerDocument.createElement('div');
15874 var type = this._currentElement.type;
15875 div.innerHTML = '<' + type + '></' + type + '>';
15876 el = div.removeChild(div.firstChild);
15877 } else if (props.is) {
15878 el = ownerDocument.createElement(this._currentElement.type, props.is);
15879 } else {
15880 // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug.
15881 // See discussion in https://github.com/facebook/react/pull/6896
15882 // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
15883 el = ownerDocument.createElement(this._currentElement.type);
15884 }
15885 } else {
15886 el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type);
15887 }
15888 ReactDOMComponentTree.precacheNode(this, el);
15889 this._flags |= Flags.hasCachedChildNodes;
15890 if (!this._hostParent) {
15891 DOMPropertyOperations.setAttributeForRoot(el);
15892 }
15893 this._updateDOMProperties(null, props, transaction);
15894 var lazyTree = DOMLazyTree(el);
15895 this._createInitialChildren(transaction, props, context, lazyTree);
15896 mountImage = lazyTree;
15897 } else {
15898 var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);
15899 var tagContent = this._createContentMarkup(transaction, props, context);
15900 if (!tagContent && omittedCloseTags[this._tag]) {
15901 mountImage = tagOpen + '/>';
15902 } else {
15903 mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';
15904 }
15905 }
15906
15907 switch (this._tag) {
15908 case 'input':
15909 transaction.getReactMountReady().enqueue(inputPostMount, this);
15910 if (props.autoFocus) {
15911 transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
15912 }
15913 break;
15914 case 'textarea':
15915 transaction.getReactMountReady().enqueue(textareaPostMount, this);
15916 if (props.autoFocus) {
15917 transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
15918 }
15919 break;
15920 case 'select':
15921 if (props.autoFocus) {
15922 transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
15923 }
15924 break;
15925 case 'button':
15926 if (props.autoFocus) {
15927 transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
15928 }
15929 break;
15930 case 'option':
15931 transaction.getReactMountReady().enqueue(optionPostMount, this);
15932 break;
15933 }
15934
15935 return mountImage;
15936 },
15937
15938 /**
15939 * Creates markup for the open tag and all attributes.
15940 *
15941 * This method has side effects because events get registered.
15942 *
15943 * Iterating over object properties is faster than iterating over arrays.
15944 * @see http://jsperf.com/obj-vs-arr-iteration
15945 *
15946 * @private
15947 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
15948 * @param {object} props
15949 * @return {string} Markup of opening tag.
15950 */
15951 _createOpenTagMarkupAndPutListeners: function (transaction, props) {
15952 var ret = '<' + this._currentElement.type;
15953
15954 for (var propKey in props) {
15955 if (!props.hasOwnProperty(propKey)) {
15956 continue;
15957 }
15958 var propValue = props[propKey];
15959 if (propValue == null) {
15960 continue;
15961 }
15962 if (registrationNameModules.hasOwnProperty(propKey)) {
15963 if (propValue) {
15964 enqueuePutListener(this, propKey, propValue, transaction);
15965 }
15966 } else {
15967 if (propKey === STYLE) {
15968 if (propValue) {
15969 if (process.env.NODE_ENV !== 'production') {
15970 // See `_updateDOMProperties`. style block
15971 this._previousStyle = propValue;
15972 }
15973 propValue = this._previousStyleCopy = _assign({}, props.style);
15974 }
15975 propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this);
15976 }
15977 var markup = null;
15978 if (this._tag != null && isCustomComponent(this._tag, props)) {
15979 if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
15980 markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue);
15981 }
15982 } else {
15983 markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue);
15984 }
15985 if (markup) {
15986 ret += ' ' + markup;
15987 }
15988 }
15989 }
15990
15991 // For static pages, no need to put React ID and checksum. Saves lots of
15992 // bytes.
15993 if (transaction.renderToStaticMarkup) {
15994 return ret;
15995 }
15996
15997 if (!this._hostParent) {
15998 ret += ' ' + DOMPropertyOperations.createMarkupForRoot();
15999 }
16000 ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID);
16001 return ret;
16002 },
16003
16004 /**
16005 * Creates markup for the content between the tags.
16006 *
16007 * @private
16008 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
16009 * @param {object} props
16010 * @param {object} context
16011 * @return {string} Content markup.
16012 */
16013 _createContentMarkup: function (transaction, props, context) {
16014 var ret = '';
16015
16016 // Intentional use of != to avoid catching zero/false.
16017 var innerHTML = props.dangerouslySetInnerHTML;
16018 if (innerHTML != null) {
16019 if (innerHTML.__html != null) {
16020 ret = innerHTML.__html;
16021 }
16022 } else {
16023 var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
16024 var childrenToUse = contentToUse != null ? null : props.children;
16025 if (contentToUse != null) {
16026 // TODO: Validate that text is allowed as a child of this node
16027 ret = escapeTextContentForBrowser(contentToUse);
16028 if (process.env.NODE_ENV !== 'production') {
16029 setAndValidateContentChildDev.call(this, contentToUse);
16030 }
16031 } else if (childrenToUse != null) {
16032 var mountImages = this.mountChildren(childrenToUse, transaction, context);
16033 ret = mountImages.join('');
16034 }
16035 }
16036 if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') {
16037 // text/html ignores the first character in these tags if it's a newline
16038 // Prefer to break application/xml over text/html (for now) by adding
16039 // a newline specifically to get eaten by the parser. (Alternately for
16040 // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first
16041 // \r is normalized out by HTMLTextAreaElement#value.)
16042 // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>
16043 // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>
16044 // See: <http://www.w3.org/TR/html5/syntax.html#newlines>
16045 // See: Parsing of "textarea" "listing" and "pre" elements
16046 // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>
16047 return '\n' + ret;
16048 } else {
16049 return ret;
16050 }
16051 },
16052
16053 _createInitialChildren: function (transaction, props, context, lazyTree) {
16054 // Intentional use of != to avoid catching zero/false.
16055 var innerHTML = props.dangerouslySetInnerHTML;
16056 if (innerHTML != null) {
16057 if (innerHTML.__html != null) {
16058 DOMLazyTree.queueHTML(lazyTree, innerHTML.__html);
16059 }
16060 } else {
16061 var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
16062 var childrenToUse = contentToUse != null ? null : props.children;
16063 // TODO: Validate that text is allowed as a child of this node
16064 if (contentToUse != null) {
16065 // Avoid setting textContent when the text is empty. In IE11 setting
16066 // textContent on a text area will cause the placeholder to not
16067 // show within the textarea until it has been focused and blurred again.
16068 // https://github.com/facebook/react/issues/6731#issuecomment-254874553
16069 if (contentToUse !== '') {
16070 if (process.env.NODE_ENV !== 'production') {
16071 setAndValidateContentChildDev.call(this, contentToUse);
16072 }
16073 DOMLazyTree.queueText(lazyTree, contentToUse);
16074 }
16075 } else if (childrenToUse != null) {
16076 var mountImages = this.mountChildren(childrenToUse, transaction, context);
16077 for (var i = 0; i < mountImages.length; i++) {
16078 DOMLazyTree.queueChild(lazyTree, mountImages[i]);
16079 }
16080 }
16081 }
16082 },
16083
16084 /**
16085 * Receives a next element and updates the component.
16086 *
16087 * @internal
16088 * @param {ReactElement} nextElement
16089 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
16090 * @param {object} context
16091 */
16092 receiveComponent: function (nextElement, transaction, context) {
16093 var prevElement = this._currentElement;
16094 this._currentElement = nextElement;
16095 this.updateComponent(transaction, prevElement, nextElement, context);
16096 },
16097
16098 /**
16099 * Updates a DOM component after it has already been allocated and
16100 * attached to the DOM. Reconciles the root DOM node, then recurses.
16101 *
16102 * @param {ReactReconcileTransaction} transaction
16103 * @param {ReactElement} prevElement
16104 * @param {ReactElement} nextElement
16105 * @internal
16106 * @overridable
16107 */
16108 updateComponent: function (transaction, prevElement, nextElement, context) {
16109 var lastProps = prevElement.props;
16110 var nextProps = this._currentElement.props;
16111
16112 switch (this._tag) {
16113 case 'input':
16114 lastProps = ReactDOMInput.getHostProps(this, lastProps);
16115 nextProps = ReactDOMInput.getHostProps(this, nextProps);
16116 break;
16117 case 'option':
16118 lastProps = ReactDOMOption.getHostProps(this, lastProps);
16119 nextProps = ReactDOMOption.getHostProps(this, nextProps);
16120 break;
16121 case 'select':
16122 lastProps = ReactDOMSelect.getHostProps(this, lastProps);
16123 nextProps = ReactDOMSelect.getHostProps(this, nextProps);
16124 break;
16125 case 'textarea':
16126 lastProps = ReactDOMTextarea.getHostProps(this, lastProps);
16127 nextProps = ReactDOMTextarea.getHostProps(this, nextProps);
16128 break;
16129 }
16130
16131 assertValidProps(this, nextProps);
16132 this._updateDOMProperties(lastProps, nextProps, transaction);
16133 this._updateDOMChildren(lastProps, nextProps, transaction, context);
16134
16135 switch (this._tag) {
16136 case 'input':
16137 // Update the wrapper around inputs *after* updating props. This has to
16138 // happen after `_updateDOMProperties`. Otherwise HTML5 input validations
16139 // raise warnings and prevent the new value from being assigned.
16140 ReactDOMInput.updateWrapper(this);
16141
16142 // We also check that we haven't missed a value update, such as a
16143 // Radio group shifting the checked value to another named radio input.
16144 inputValueTracking.updateValueIfChanged(this);
16145 break;
16146 case 'textarea':
16147 ReactDOMTextarea.updateWrapper(this);
16148 break;
16149 case 'select':
16150 // <select> value update needs to occur after <option> children
16151 // reconciliation
16152 transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
16153 break;
16154 }
16155 },
16156
16157 /**
16158 * Reconciles the properties by detecting differences in property values and
16159 * updating the DOM as necessary. This function is probably the single most
16160 * critical path for performance optimization.
16161 *
16162 * TODO: Benchmark whether checking for changed values in memory actually
16163 * improves performance (especially statically positioned elements).
16164 * TODO: Benchmark the effects of putting this at the top since 99% of props
16165 * do not change for a given reconciliation.
16166 * TODO: Benchmark areas that can be improved with caching.
16167 *
16168 * @private
16169 * @param {object} lastProps
16170 * @param {object} nextProps
16171 * @param {?DOMElement} node
16172 */
16173 _updateDOMProperties: function (lastProps, nextProps, transaction) {
16174 var propKey;
16175 var styleName;
16176 var styleUpdates;
16177 for (propKey in lastProps) {
16178 if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
16179 continue;
16180 }
16181 if (propKey === STYLE) {
16182 var lastStyle = this._previousStyleCopy;
16183 for (styleName in lastStyle) {
16184 if (lastStyle.hasOwnProperty(styleName)) {
16185 styleUpdates = styleUpdates || {};
16186 styleUpdates[styleName] = '';
16187 }
16188 }
16189 this._previousStyleCopy = null;
16190 } else if (registrationNameModules.hasOwnProperty(propKey)) {
16191 if (lastProps[propKey]) {
16192 // Only call deleteListener if there was a listener previously or
16193 // else willDeleteListener gets called when there wasn't actually a
16194 // listener (e.g., onClick={null})
16195 deleteListener(this, propKey);
16196 }
16197 } else if (isCustomComponent(this._tag, lastProps)) {
16198 if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
16199 DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey);
16200 }
16201 } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
16202 DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey);
16203 }
16204 }
16205 for (propKey in nextProps) {
16206 var nextProp = nextProps[propKey];
16207 var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined;
16208 if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
16209 continue;
16210 }
16211 if (propKey === STYLE) {
16212 if (nextProp) {
16213 if (process.env.NODE_ENV !== 'production') {
16214 checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this);
16215 this._previousStyle = nextProp;
16216 }
16217 nextProp = this._previousStyleCopy = _assign({}, nextProp);
16218 } else {
16219 this._previousStyleCopy = null;
16220 }
16221 if (lastProp) {
16222 // Unset styles on `lastProp` but not on `nextProp`.
16223 for (styleName in lastProp) {
16224 if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
16225 styleUpdates = styleUpdates || {};
16226 styleUpdates[styleName] = '';
16227 }
16228 }
16229 // Update styles that changed since `lastProp`.
16230 for (styleName in nextProp) {
16231 if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
16232 styleUpdates = styleUpdates || {};
16233 styleUpdates[styleName] = nextProp[styleName];
16234 }
16235 }
16236 } else {
16237 // Relies on `updateStylesByID` not mutating `styleUpdates`.
16238 styleUpdates = nextProp;
16239 }
16240 } else if (registrationNameModules.hasOwnProperty(propKey)) {
16241 if (nextProp) {
16242 enqueuePutListener(this, propKey, nextProp, transaction);
16243 } else if (lastProp) {
16244 deleteListener(this, propKey);
16245 }
16246 } else if (isCustomComponent(this._tag, nextProps)) {
16247 if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
16248 DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp);
16249 }
16250 } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
16251 var node = getNode(this);
16252 // If we're updating to null or undefined, we should remove the property
16253 // from the DOM node instead of inadvertently setting to a string. This
16254 // brings us in line with the same behavior we have on initial render.
16255 if (nextProp != null) {
16256 DOMPropertyOperations.setValueForProperty(node, propKey, nextProp);
16257 } else {
16258 DOMPropertyOperations.deleteValueForProperty(node, propKey);
16259 }
16260 }
16261 }
16262 if (styleUpdates) {
16263 CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this);
16264 }
16265 },
16266
16267 /**
16268 * Reconciles the children with the various properties that affect the
16269 * children content.
16270 *
16271 * @param {object} lastProps
16272 * @param {object} nextProps
16273 * @param {ReactReconcileTransaction} transaction
16274 * @param {object} context
16275 */
16276 _updateDOMChildren: function (lastProps, nextProps, transaction, context) {
16277 var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;
16278 var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;
16279
16280 var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html;
16281 var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html;
16282
16283 // Note the use of `!=` which checks for null or undefined.
16284 var lastChildren = lastContent != null ? null : lastProps.children;
16285 var nextChildren = nextContent != null ? null : nextProps.children;
16286
16287 // If we're switching from children to content/html or vice versa, remove
16288 // the old content
16289 var lastHasContentOrHtml = lastContent != null || lastHtml != null;
16290 var nextHasContentOrHtml = nextContent != null || nextHtml != null;
16291 if (lastChildren != null && nextChildren == null) {
16292 this.updateChildren(null, transaction, context);
16293 } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {
16294 this.updateTextContent('');
16295 if (process.env.NODE_ENV !== 'production') {
16296 ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
16297 }
16298 }
16299
16300 if (nextContent != null) {
16301 if (lastContent !== nextContent) {
16302 this.updateTextContent('' + nextContent);
16303 if (process.env.NODE_ENV !== 'production') {
16304 setAndValidateContentChildDev.call(this, nextContent);
16305 }
16306 }
16307 } else if (nextHtml != null) {
16308 if (lastHtml !== nextHtml) {
16309 this.updateMarkup('' + nextHtml);
16310 }
16311 if (process.env.NODE_ENV !== 'production') {
16312 ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
16313 }
16314 } else if (nextChildren != null) {
16315 if (process.env.NODE_ENV !== 'production') {
16316 setAndValidateContentChildDev.call(this, null);
16317 }
16318
16319 this.updateChildren(nextChildren, transaction, context);
16320 }
16321 },
16322
16323 getHostNode: function () {
16324 return getNode(this);
16325 },
16326
16327 /**
16328 * Destroys all event registrations for this instance. Does not remove from
16329 * the DOM. That must be done by the parent.
16330 *
16331 * @internal
16332 */
16333 unmountComponent: function (safely) {
16334 switch (this._tag) {
16335 case 'audio':
16336 case 'form':
16337 case 'iframe':
16338 case 'img':
16339 case 'link':
16340 case 'object':
16341 case 'source':
16342 case 'video':
16343 var listeners = this._wrapperState.listeners;
16344 if (listeners) {
16345 for (var i = 0; i < listeners.length; i++) {
16346 listeners[i].remove();
16347 }
16348 }
16349 break;
16350 case 'input':
16351 case 'textarea':
16352 inputValueTracking.stopTracking(this);
16353 break;
16354 case 'html':
16355 case 'head':
16356 case 'body':
16357 /**
16358 * Components like <html> <head> and <body> can't be removed or added
16359 * easily in a cross-browser way, however it's valuable to be able to
16360 * take advantage of React's reconciliation for styling and <title>
16361 * management. So we just document it and throw in dangerous cases.
16362 */
16363 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;
16364 break;
16365 }
16366
16367 this.unmountChildren(safely);
16368 ReactDOMComponentTree.uncacheNode(this);
16369 EventPluginHub.deleteAllListeners(this);
16370 this._rootNodeID = 0;
16371 this._domID = 0;
16372 this._wrapperState = null;
16373
16374 if (process.env.NODE_ENV !== 'production') {
16375 setAndValidateContentChildDev.call(this, null);
16376 }
16377 },
16378
16379 getPublicInstance: function () {
16380 return getNode(this);
16381 }
16382};
16383
16384_assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);
16385
16386module.exports = ReactDOMComponent;
16387
16388/***/ }),
16389/* 134 */
16390/***/ (function(module, exports, __webpack_require__) {
16391
16392"use strict";
16393/**
16394 * Copyright (c) 2013-present, Facebook, Inc.
16395 *
16396 * This source code is licensed under the MIT license found in the
16397 * LICENSE file in the root directory of this source tree.
16398 *
16399 */
16400
16401
16402
16403var validateDOMNesting = __webpack_require__(44);
16404
16405var DOC_NODE_TYPE = 9;
16406
16407function ReactDOMContainerInfo(topLevelWrapper, node) {
16408 var info = {
16409 _topLevelWrapper: topLevelWrapper,
16410 _idCounter: 1,
16411 _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null,
16412 _node: node,
16413 _tag: node ? node.nodeName.toLowerCase() : null,
16414 _namespaceURI: node ? node.namespaceURI : null
16415 };
16416 if (process.env.NODE_ENV !== 'production') {
16417 info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null;
16418 }
16419 return info;
16420}
16421
16422module.exports = ReactDOMContainerInfo;
16423
16424/***/ }),
16425/* 135 */
16426/***/ (function(module, exports, __webpack_require__) {
16427
16428"use strict";
16429/**
16430 * Copyright (c) 2014-present, Facebook, Inc.
16431 *
16432 * This source code is licensed under the MIT license found in the
16433 * LICENSE file in the root directory of this source tree.
16434 *
16435 */
16436
16437
16438
16439var _assign = __webpack_require__(3);
16440
16441var DOMLazyTree = __webpack_require__(15);
16442var ReactDOMComponentTree = __webpack_require__(4);
16443
16444var ReactDOMEmptyComponent = function (instantiate) {
16445 // ReactCompositeComponent uses this:
16446 this._currentElement = null;
16447 // ReactDOMComponentTree uses these:
16448 this._hostNode = null;
16449 this._hostParent = null;
16450 this._hostContainerInfo = null;
16451 this._domID = 0;
16452};
16453_assign(ReactDOMEmptyComponent.prototype, {
16454 mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
16455 var domID = hostContainerInfo._idCounter++;
16456 this._domID = domID;
16457 this._hostParent = hostParent;
16458 this._hostContainerInfo = hostContainerInfo;
16459
16460 var nodeValue = ' react-empty: ' + this._domID + ' ';
16461 if (transaction.useCreateElement) {
16462 var ownerDocument = hostContainerInfo._ownerDocument;
16463 var node = ownerDocument.createComment(nodeValue);
16464 ReactDOMComponentTree.precacheNode(this, node);
16465 return DOMLazyTree(node);
16466 } else {
16467 if (transaction.renderToStaticMarkup) {
16468 // Normally we'd insert a comment node, but since this is a situation
16469 // where React won't take over (static pages), we can simply return
16470 // nothing.
16471 return '';
16472 }
16473 return '<!--' + nodeValue + '-->';
16474 }
16475 },
16476 receiveComponent: function () {},
16477 getHostNode: function () {
16478 return ReactDOMComponentTree.getNodeFromInstance(this);
16479 },
16480 unmountComponent: function () {
16481 ReactDOMComponentTree.uncacheNode(this);
16482 }
16483});
16484
16485module.exports = ReactDOMEmptyComponent;
16486
16487/***/ }),
16488/* 136 */
16489/***/ (function(module, exports, __webpack_require__) {
16490
16491"use strict";
16492/**
16493 * Copyright (c) 2013-present, Facebook, Inc.
16494 *
16495 * This source code is licensed under the MIT license found in the
16496 * LICENSE file in the root directory of this source tree.
16497 *
16498 */
16499
16500
16501
16502var DOMChildrenOperations = __webpack_require__(28);
16503var ReactDOMComponentTree = __webpack_require__(4);
16504
16505/**
16506 * Operations used to process updates to DOM nodes.
16507 */
16508var ReactDOMIDOperations = {
16509 /**
16510 * Updates a component's children by processing a series of updates.
16511 *
16512 * @param {array<object>} updates List of update configurations.
16513 * @internal
16514 */
16515 dangerouslyProcessChildrenUpdates: function (parentInst, updates) {
16516 var node = ReactDOMComponentTree.getNodeFromInstance(parentInst);
16517 DOMChildrenOperations.processUpdates(node, updates);
16518 }
16519};
16520
16521module.exports = ReactDOMIDOperations;
16522
16523/***/ }),
16524/* 137 */
16525/***/ (function(module, exports, __webpack_require__) {
16526
16527"use strict";
16528/**
16529 * Copyright (c) 2013-present, Facebook, Inc.
16530 *
16531 * This source code is licensed under the MIT license found in the
16532 * LICENSE file in the root directory of this source tree.
16533 *
16534 */
16535
16536
16537
16538var _prodInvariant = __webpack_require__(2),
16539 _assign = __webpack_require__(3);
16540
16541var DOMPropertyOperations = __webpack_require__(55);
16542var LinkedValueUtils = __webpack_require__(33);
16543var ReactDOMComponentTree = __webpack_require__(4);
16544var ReactUpdates = __webpack_require__(9);
16545
16546var invariant = __webpack_require__(0);
16547var warning = __webpack_require__(1);
16548
16549var didWarnValueLink = false;
16550var didWarnCheckedLink = false;
16551var didWarnValueDefaultValue = false;
16552var didWarnCheckedDefaultChecked = false;
16553var didWarnControlledToUncontrolled = false;
16554var didWarnUncontrolledToControlled = false;
16555
16556function forceUpdateIfMounted() {
16557 if (this._rootNodeID) {
16558 // DOM component is still mounted; update
16559 ReactDOMInput.updateWrapper(this);
16560 }
16561}
16562
16563function isControlled(props) {
16564 var usesChecked = props.type === 'checkbox' || props.type === 'radio';
16565 return usesChecked ? props.checked != null : props.value != null;
16566}
16567
16568/**
16569 * Implements an <input> host component that allows setting these optional
16570 * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
16571 *
16572 * If `checked` or `value` are not supplied (or null/undefined), user actions
16573 * that affect the checked state or value will trigger updates to the element.
16574 *
16575 * If they are supplied (and not null/undefined), the rendered element will not
16576 * trigger updates to the element. Instead, the props must change in order for
16577 * the rendered element to be updated.
16578 *
16579 * The rendered element will be initialized as unchecked (or `defaultChecked`)
16580 * with an empty value (or `defaultValue`).
16581 *
16582 * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
16583 */
16584var ReactDOMInput = {
16585 getHostProps: function (inst, props) {
16586 var value = LinkedValueUtils.getValue(props);
16587 var checked = LinkedValueUtils.getChecked(props);
16588
16589 var hostProps = _assign({
16590 // Make sure we set .type before any other properties (setting .value
16591 // before .type means .value is lost in IE11 and below)
16592 type: undefined,
16593 // Make sure we set .step before .value (setting .value before .step
16594 // means .value is rounded on mount, based upon step precision)
16595 step: undefined,
16596 // Make sure we set .min & .max before .value (to ensure proper order
16597 // in corner cases such as min or max deriving from value, e.g. Issue #7170)
16598 min: undefined,
16599 max: undefined
16600 }, props, {
16601 defaultChecked: undefined,
16602 defaultValue: undefined,
16603 value: value != null ? value : inst._wrapperState.initialValue,
16604 checked: checked != null ? checked : inst._wrapperState.initialChecked,
16605 onChange: inst._wrapperState.onChange
16606 });
16607
16608 return hostProps;
16609 },
16610
16611 mountWrapper: function (inst, props) {
16612 if (process.env.NODE_ENV !== 'production') {
16613 LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner);
16614
16615 var owner = inst._currentElement._owner;
16616
16617 if (props.valueLink !== undefined && !didWarnValueLink) {
16618 process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
16619 didWarnValueLink = true;
16620 }
16621 if (props.checkedLink !== undefined && !didWarnCheckedLink) {
16622 process.env.NODE_ENV !== 'production' ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
16623 didWarnCheckedLink = true;
16624 }
16625 if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
16626 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;
16627 didWarnCheckedDefaultChecked = true;
16628 }
16629 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
16630 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;
16631 didWarnValueDefaultValue = true;
16632 }
16633 }
16634
16635 var defaultValue = props.defaultValue;
16636 inst._wrapperState = {
16637 initialChecked: props.checked != null ? props.checked : props.defaultChecked,
16638 initialValue: props.value != null ? props.value : defaultValue,
16639 listeners: null,
16640 onChange: _handleChange.bind(inst),
16641 controlled: isControlled(props)
16642 };
16643 },
16644
16645 updateWrapper: function (inst) {
16646 var props = inst._currentElement.props;
16647
16648 if (process.env.NODE_ENV !== 'production') {
16649 var controlled = isControlled(props);
16650 var owner = inst._currentElement._owner;
16651
16652 if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
16653 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;
16654 didWarnUncontrolledToControlled = true;
16655 }
16656 if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
16657 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;
16658 didWarnControlledToUncontrolled = true;
16659 }
16660 }
16661
16662 // TODO: Shouldn't this be getChecked(props)?
16663 var checked = props.checked;
16664 if (checked != null) {
16665 DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false);
16666 }
16667
16668 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
16669 var value = LinkedValueUtils.getValue(props);
16670 if (value != null) {
16671 if (value === 0 && node.value === '') {
16672 node.value = '0';
16673 // Note: IE9 reports a number inputs as 'text', so check props instead.
16674 } else if (props.type === 'number') {
16675 // Simulate `input.valueAsNumber`. IE9 does not support it
16676 var valueAsNumber = parseFloat(node.value, 10) || 0;
16677
16678 if (
16679 // eslint-disable-next-line
16680 value != valueAsNumber ||
16681 // eslint-disable-next-line
16682 value == valueAsNumber && node.value != value) {
16683 // Cast `value` to a string to ensure the value is set correctly. While
16684 // browsers typically do this as necessary, jsdom doesn't.
16685 node.value = '' + value;
16686 }
16687 } else if (node.value !== '' + value) {
16688 // Cast `value` to a string to ensure the value is set correctly. While
16689 // browsers typically do this as necessary, jsdom doesn't.
16690 node.value = '' + value;
16691 }
16692 } else {
16693 if (props.value == null && props.defaultValue != null) {
16694 // In Chrome, assigning defaultValue to certain input types triggers input validation.
16695 // For number inputs, the display value loses trailing decimal points. For email inputs,
16696 // Chrome raises "The specified value <x> is not a valid email address".
16697 //
16698 // Here we check to see if the defaultValue has actually changed, avoiding these problems
16699 // when the user is inputting text
16700 //
16701 // https://github.com/facebook/react/issues/7253
16702 if (node.defaultValue !== '' + props.defaultValue) {
16703 node.defaultValue = '' + props.defaultValue;
16704 }
16705 }
16706 if (props.checked == null && props.defaultChecked != null) {
16707 node.defaultChecked = !!props.defaultChecked;
16708 }
16709 }
16710 },
16711
16712 postMountWrapper: function (inst) {
16713 var props = inst._currentElement.props;
16714
16715 // This is in postMount because we need access to the DOM node, which is not
16716 // available until after the component has mounted.
16717 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
16718
16719 // Detach value from defaultValue. We won't do anything if we're working on
16720 // submit or reset inputs as those values & defaultValues are linked. They
16721 // are not resetable nodes so this operation doesn't matter and actually
16722 // removes browser-default values (eg "Submit Query") when no value is
16723 // provided.
16724
16725 switch (props.type) {
16726 case 'submit':
16727 case 'reset':
16728 break;
16729 case 'color':
16730 case 'date':
16731 case 'datetime':
16732 case 'datetime-local':
16733 case 'month':
16734 case 'time':
16735 case 'week':
16736 // This fixes the no-show issue on iOS Safari and Android Chrome:
16737 // https://github.com/facebook/react/issues/7233
16738 node.value = '';
16739 node.value = node.defaultValue;
16740 break;
16741 default:
16742 node.value = node.value;
16743 break;
16744 }
16745
16746 // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
16747 // this is needed to work around a chrome bug where setting defaultChecked
16748 // will sometimes influence the value of checked (even after detachment).
16749 // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
16750 // We need to temporarily unset name to avoid disrupting radio button groups.
16751 var name = node.name;
16752 if (name !== '') {
16753 node.name = '';
16754 }
16755 node.defaultChecked = !node.defaultChecked;
16756 node.defaultChecked = !node.defaultChecked;
16757 if (name !== '') {
16758 node.name = name;
16759 }
16760 }
16761};
16762
16763function _handleChange(event) {
16764 var props = this._currentElement.props;
16765
16766 var returnValue = LinkedValueUtils.executeOnChange(props, event);
16767
16768 // Here we use asap to wait until all updates have propagated, which
16769 // is important when using controlled components within layers:
16770 // https://github.com/facebook/react/issues/1698
16771 ReactUpdates.asap(forceUpdateIfMounted, this);
16772
16773 var name = props.name;
16774 if (props.type === 'radio' && name != null) {
16775 var rootNode = ReactDOMComponentTree.getNodeFromInstance(this);
16776 var queryRoot = rootNode;
16777
16778 while (queryRoot.parentNode) {
16779 queryRoot = queryRoot.parentNode;
16780 }
16781
16782 // If `rootNode.form` was non-null, then we could try `form.elements`,
16783 // but that sometimes behaves strangely in IE8. We could also try using
16784 // `form.getElementsByName`, but that will only return direct children
16785 // and won't include inputs that use the HTML5 `form=` attribute. Since
16786 // the input might not even be in a form, let's just use the global
16787 // `querySelectorAll` to ensure we don't miss anything.
16788 var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
16789
16790 for (var i = 0; i < group.length; i++) {
16791 var otherNode = group[i];
16792 if (otherNode === rootNode || otherNode.form !== rootNode.form) {
16793 continue;
16794 }
16795 // This will throw if radio buttons rendered by different copies of React
16796 // and the same name are rendered into the same form (same as #1939).
16797 // That's probably okay; we don't support it just as we don't support
16798 // mixing React radio buttons with non-React ones.
16799 var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode);
16800 !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;
16801 // If this is a controlled radio button group, forcing the input that
16802 // was previously checked to update will cause it to be come re-checked
16803 // as appropriate.
16804 ReactUpdates.asap(forceUpdateIfMounted, otherInstance);
16805 }
16806 }
16807
16808 return returnValue;
16809}
16810
16811module.exports = ReactDOMInput;
16812
16813/***/ }),
16814/* 138 */
16815/***/ (function(module, exports, __webpack_require__) {
16816
16817"use strict";
16818/**
16819 * Copyright (c) 2013-present, Facebook, Inc.
16820 *
16821 * This source code is licensed under the MIT license found in the
16822 * LICENSE file in the root directory of this source tree.
16823 *
16824 */
16825
16826
16827
16828var _assign = __webpack_require__(3);
16829
16830var React = __webpack_require__(21);
16831var ReactDOMComponentTree = __webpack_require__(4);
16832var ReactDOMSelect = __webpack_require__(57);
16833
16834var warning = __webpack_require__(1);
16835var didWarnInvalidOptionChildren = false;
16836
16837function flattenChildren(children) {
16838 var content = '';
16839
16840 // Flatten children and warn if they aren't strings or numbers;
16841 // invalid types are ignored.
16842 React.Children.forEach(children, function (child) {
16843 if (child == null) {
16844 return;
16845 }
16846 if (typeof child === 'string' || typeof child === 'number') {
16847 content += child;
16848 } else if (!didWarnInvalidOptionChildren) {
16849 didWarnInvalidOptionChildren = true;
16850 process.env.NODE_ENV !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0;
16851 }
16852 });
16853
16854 return content;
16855}
16856
16857/**
16858 * Implements an <option> host component that warns when `selected` is set.
16859 */
16860var ReactDOMOption = {
16861 mountWrapper: function (inst, props, hostParent) {
16862 // TODO (yungsters): Remove support for `selected` in <option>.
16863 if (process.env.NODE_ENV !== 'production') {
16864 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;
16865 }
16866
16867 // Look up whether this option is 'selected'
16868 var selectValue = null;
16869 if (hostParent != null) {
16870 var selectParent = hostParent;
16871
16872 if (selectParent._tag === 'optgroup') {
16873 selectParent = selectParent._hostParent;
16874 }
16875
16876 if (selectParent != null && selectParent._tag === 'select') {
16877 selectValue = ReactDOMSelect.getSelectValueContext(selectParent);
16878 }
16879 }
16880
16881 // If the value is null (e.g., no specified value or after initial mount)
16882 // or missing (e.g., for <datalist>), we don't change props.selected
16883 var selected = null;
16884 if (selectValue != null) {
16885 var value;
16886 if (props.value != null) {
16887 value = props.value + '';
16888 } else {
16889 value = flattenChildren(props.children);
16890 }
16891 selected = false;
16892 if (Array.isArray(selectValue)) {
16893 // multiple
16894 for (var i = 0; i < selectValue.length; i++) {
16895 if ('' + selectValue[i] === value) {
16896 selected = true;
16897 break;
16898 }
16899 }
16900 } else {
16901 selected = '' + selectValue === value;
16902 }
16903 }
16904
16905 inst._wrapperState = { selected: selected };
16906 },
16907
16908 postMountWrapper: function (inst) {
16909 // value="" should make a value attribute (#6219)
16910 var props = inst._currentElement.props;
16911 if (props.value != null) {
16912 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
16913 node.setAttribute('value', props.value);
16914 }
16915 },
16916
16917 getHostProps: function (inst, props) {
16918 var hostProps = _assign({ selected: undefined, children: undefined }, props);
16919
16920 // Read state only from initial mount because <select> updates value
16921 // manually; we need the initial state only for server rendering
16922 if (inst._wrapperState.selected != null) {
16923 hostProps.selected = inst._wrapperState.selected;
16924 }
16925
16926 var content = flattenChildren(props.children);
16927
16928 if (content) {
16929 hostProps.children = content;
16930 }
16931
16932 return hostProps;
16933 }
16934};
16935
16936module.exports = ReactDOMOption;
16937
16938/***/ }),
16939/* 139 */
16940/***/ (function(module, exports, __webpack_require__) {
16941
16942"use strict";
16943/**
16944 * Copyright (c) 2013-present, Facebook, Inc.
16945 *
16946 * This source code is licensed under the MIT license found in the
16947 * LICENSE file in the root directory of this source tree.
16948 *
16949 */
16950
16951
16952
16953var ExecutionEnvironment = __webpack_require__(5);
16954
16955var getNodeForCharacterOffset = __webpack_require__(183);
16956var getTextContentAccessor = __webpack_require__(68);
16957
16958/**
16959 * While `isCollapsed` is available on the Selection object and `collapsed`
16960 * is available on the Range object, IE11 sometimes gets them wrong.
16961 * If the anchor/focus nodes and offsets are the same, the range is collapsed.
16962 */
16963function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {
16964 return anchorNode === focusNode && anchorOffset === focusOffset;
16965}
16966
16967/**
16968 * Get the appropriate anchor and focus node/offset pairs for IE.
16969 *
16970 * The catch here is that IE's selection API doesn't provide information
16971 * about whether the selection is forward or backward, so we have to
16972 * behave as though it's always forward.
16973 *
16974 * IE text differs from modern selection in that it behaves as though
16975 * block elements end with a new line. This means character offsets will
16976 * differ between the two APIs.
16977 *
16978 * @param {DOMElement} node
16979 * @return {object}
16980 */
16981function getIEOffsets(node) {
16982 var selection = document.selection;
16983 var selectedRange = selection.createRange();
16984 var selectedLength = selectedRange.text.length;
16985
16986 // Duplicate selection so we can move range without breaking user selection.
16987 var fromStart = selectedRange.duplicate();
16988 fromStart.moveToElementText(node);
16989 fromStart.setEndPoint('EndToStart', selectedRange);
16990
16991 var startOffset = fromStart.text.length;
16992 var endOffset = startOffset + selectedLength;
16993
16994 return {
16995 start: startOffset,
16996 end: endOffset
16997 };
16998}
16999
17000/**
17001 * @param {DOMElement} node
17002 * @return {?object}
17003 */
17004function getModernOffsets(node) {
17005 var selection = window.getSelection && window.getSelection();
17006
17007 if (!selection || selection.rangeCount === 0) {
17008 return null;
17009 }
17010
17011 var anchorNode = selection.anchorNode;
17012 var anchorOffset = selection.anchorOffset;
17013 var focusNode = selection.focusNode;
17014 var focusOffset = selection.focusOffset;
17015
17016 var currentRange = selection.getRangeAt(0);
17017
17018 // In Firefox, range.startContainer and range.endContainer can be "anonymous
17019 // divs", e.g. the up/down buttons on an <input type="number">. Anonymous
17020 // divs do not seem to expose properties, triggering a "Permission denied
17021 // error" if any of its properties are accessed. The only seemingly possible
17022 // way to avoid erroring is to access a property that typically works for
17023 // non-anonymous divs and catch any error that may otherwise arise. See
17024 // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
17025 try {
17026 /* eslint-disable no-unused-expressions */
17027 currentRange.startContainer.nodeType;
17028 currentRange.endContainer.nodeType;
17029 /* eslint-enable no-unused-expressions */
17030 } catch (e) {
17031 return null;
17032 }
17033
17034 // If the node and offset values are the same, the selection is collapsed.
17035 // `Selection.isCollapsed` is available natively, but IE sometimes gets
17036 // this value wrong.
17037 var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);
17038
17039 var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;
17040
17041 var tempRange = currentRange.cloneRange();
17042 tempRange.selectNodeContents(node);
17043 tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);
17044
17045 var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset);
17046
17047 var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;
17048 var end = start + rangeLength;
17049
17050 // Detect whether the selection is backward.
17051 var detectionRange = document.createRange();
17052 detectionRange.setStart(anchorNode, anchorOffset);
17053 detectionRange.setEnd(focusNode, focusOffset);
17054 var isBackward = detectionRange.collapsed;
17055
17056 return {
17057 start: isBackward ? end : start,
17058 end: isBackward ? start : end
17059 };
17060}
17061
17062/**
17063 * @param {DOMElement|DOMTextNode} node
17064 * @param {object} offsets
17065 */
17066function setIEOffsets(node, offsets) {
17067 var range = document.selection.createRange().duplicate();
17068 var start, end;
17069
17070 if (offsets.end === undefined) {
17071 start = offsets.start;
17072 end = start;
17073 } else if (offsets.start > offsets.end) {
17074 start = offsets.end;
17075 end = offsets.start;
17076 } else {
17077 start = offsets.start;
17078 end = offsets.end;
17079 }
17080
17081 range.moveToElementText(node);
17082 range.moveStart('character', start);
17083 range.setEndPoint('EndToStart', range);
17084 range.moveEnd('character', end - start);
17085 range.select();
17086}
17087
17088/**
17089 * In modern non-IE browsers, we can support both forward and backward
17090 * selections.
17091 *
17092 * Note: IE10+ supports the Selection object, but it does not support
17093 * the `extend` method, which means that even in modern IE, it's not possible
17094 * to programmatically create a backward selection. Thus, for all IE
17095 * versions, we use the old IE API to create our selections.
17096 *
17097 * @param {DOMElement|DOMTextNode} node
17098 * @param {object} offsets
17099 */
17100function setModernOffsets(node, offsets) {
17101 if (!window.getSelection) {
17102 return;
17103 }
17104
17105 var selection = window.getSelection();
17106 var length = node[getTextContentAccessor()].length;
17107 var start = Math.min(offsets.start, length);
17108 var end = offsets.end === undefined ? start : Math.min(offsets.end, length);
17109
17110 // IE 11 uses modern selection, but doesn't support the extend method.
17111 // Flip backward selections, so we can set with a single range.
17112 if (!selection.extend && start > end) {
17113 var temp = end;
17114 end = start;
17115 start = temp;
17116 }
17117
17118 var startMarker = getNodeForCharacterOffset(node, start);
17119 var endMarker = getNodeForCharacterOffset(node, end);
17120
17121 if (startMarker && endMarker) {
17122 var range = document.createRange();
17123 range.setStart(startMarker.node, startMarker.offset);
17124 selection.removeAllRanges();
17125
17126 if (start > end) {
17127 selection.addRange(range);
17128 selection.extend(endMarker.node, endMarker.offset);
17129 } else {
17130 range.setEnd(endMarker.node, endMarker.offset);
17131 selection.addRange(range);
17132 }
17133 }
17134}
17135
17136var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window);
17137
17138var ReactDOMSelection = {
17139 /**
17140 * @param {DOMElement} node
17141 */
17142 getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,
17143
17144 /**
17145 * @param {DOMElement|DOMTextNode} node
17146 * @param {object} offsets
17147 */
17148 setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
17149};
17150
17151module.exports = ReactDOMSelection;
17152
17153/***/ }),
17154/* 140 */
17155/***/ (function(module, exports, __webpack_require__) {
17156
17157"use strict";
17158/**
17159 * Copyright (c) 2013-present, Facebook, Inc.
17160 *
17161 * This source code is licensed under the MIT license found in the
17162 * LICENSE file in the root directory of this source tree.
17163 *
17164 */
17165
17166
17167
17168var ReactDefaultInjection = __webpack_require__(145);
17169var ReactServerRendering = __webpack_require__(161);
17170var ReactVersion = __webpack_require__(163);
17171
17172ReactDefaultInjection.inject();
17173
17174var ReactDOMServer = {
17175 renderToString: ReactServerRendering.renderToString,
17176 renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup,
17177 version: ReactVersion
17178};
17179
17180module.exports = ReactDOMServer;
17181
17182/***/ }),
17183/* 141 */
17184/***/ (function(module, exports, __webpack_require__) {
17185
17186"use strict";
17187/**
17188 * Copyright (c) 2013-present, Facebook, Inc.
17189 *
17190 * This source code is licensed under the MIT license found in the
17191 * LICENSE file in the root directory of this source tree.
17192 *
17193 */
17194
17195
17196
17197var _prodInvariant = __webpack_require__(2),
17198 _assign = __webpack_require__(3);
17199
17200var DOMChildrenOperations = __webpack_require__(28);
17201var DOMLazyTree = __webpack_require__(15);
17202var ReactDOMComponentTree = __webpack_require__(4);
17203
17204var escapeTextContentForBrowser = __webpack_require__(25);
17205var invariant = __webpack_require__(0);
17206var validateDOMNesting = __webpack_require__(44);
17207
17208/**
17209 * Text nodes violate a couple assumptions that React makes about components:
17210 *
17211 * - When mounting text into the DOM, adjacent text nodes are merged.
17212 * - Text nodes cannot be assigned a React root ID.
17213 *
17214 * This component is used to wrap strings between comment nodes so that they
17215 * can undergo the same reconciliation that is applied to elements.
17216 *
17217 * TODO: Investigate representing React components in the DOM with text nodes.
17218 *
17219 * @class ReactDOMTextComponent
17220 * @extends ReactComponent
17221 * @internal
17222 */
17223var ReactDOMTextComponent = function (text) {
17224 // TODO: This is really a ReactText (ReactNode), not a ReactElement
17225 this._currentElement = text;
17226 this._stringText = '' + text;
17227 // ReactDOMComponentTree uses these:
17228 this._hostNode = null;
17229 this._hostParent = null;
17230
17231 // Properties
17232 this._domID = 0;
17233 this._mountIndex = 0;
17234 this._closingComment = null;
17235 this._commentNodes = null;
17236};
17237
17238_assign(ReactDOMTextComponent.prototype, {
17239 /**
17240 * Creates the markup for this text node. This node is not intended to have
17241 * any features besides containing text content.
17242 *
17243 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
17244 * @return {string} Markup for this text node.
17245 * @internal
17246 */
17247 mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
17248 if (process.env.NODE_ENV !== 'production') {
17249 var parentInfo;
17250 if (hostParent != null) {
17251 parentInfo = hostParent._ancestorInfo;
17252 } else if (hostContainerInfo != null) {
17253 parentInfo = hostContainerInfo._ancestorInfo;
17254 }
17255 if (parentInfo) {
17256 // parentInfo should always be present except for the top-level
17257 // component when server rendering
17258 validateDOMNesting(null, this._stringText, this, parentInfo);
17259 }
17260 }
17261
17262 var domID = hostContainerInfo._idCounter++;
17263 var openingValue = ' react-text: ' + domID + ' ';
17264 var closingValue = ' /react-text ';
17265 this._domID = domID;
17266 this._hostParent = hostParent;
17267 if (transaction.useCreateElement) {
17268 var ownerDocument = hostContainerInfo._ownerDocument;
17269 var openingComment = ownerDocument.createComment(openingValue);
17270 var closingComment = ownerDocument.createComment(closingValue);
17271 var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment());
17272 DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment));
17273 if (this._stringText) {
17274 DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText)));
17275 }
17276 DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment));
17277 ReactDOMComponentTree.precacheNode(this, openingComment);
17278 this._closingComment = closingComment;
17279 return lazyTree;
17280 } else {
17281 var escapedText = escapeTextContentForBrowser(this._stringText);
17282
17283 if (transaction.renderToStaticMarkup) {
17284 // Normally we'd wrap this between comment nodes for the reasons stated
17285 // above, but since this is a situation where React won't take over
17286 // (static pages), we can simply return the text as it is.
17287 return escapedText;
17288 }
17289
17290 return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->';
17291 }
17292 },
17293
17294 /**
17295 * Updates this component by updating the text content.
17296 *
17297 * @param {ReactText} nextText The next text content
17298 * @param {ReactReconcileTransaction} transaction
17299 * @internal
17300 */
17301 receiveComponent: function (nextText, transaction) {
17302 if (nextText !== this._currentElement) {
17303 this._currentElement = nextText;
17304 var nextStringText = '' + nextText;
17305 if (nextStringText !== this._stringText) {
17306 // TODO: Save this as pending props and use performUpdateIfNecessary
17307 // and/or updateComponent to do the actual update for consistency with
17308 // other component types?
17309 this._stringText = nextStringText;
17310 var commentNodes = this.getHostNode();
17311 DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText);
17312 }
17313 }
17314 },
17315
17316 getHostNode: function () {
17317 var hostNode = this._commentNodes;
17318 if (hostNode) {
17319 return hostNode;
17320 }
17321 if (!this._closingComment) {
17322 var openingComment = ReactDOMComponentTree.getNodeFromInstance(this);
17323 var node = openingComment.nextSibling;
17324 while (true) {
17325 !(node != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0;
17326 if (node.nodeType === 8 && node.nodeValue === ' /react-text ') {
17327 this._closingComment = node;
17328 break;
17329 }
17330 node = node.nextSibling;
17331 }
17332 }
17333 hostNode = [this._hostNode, this._closingComment];
17334 this._commentNodes = hostNode;
17335 return hostNode;
17336 },
17337
17338 unmountComponent: function () {
17339 this._closingComment = null;
17340 this._commentNodes = null;
17341 ReactDOMComponentTree.uncacheNode(this);
17342 }
17343});
17344
17345module.exports = ReactDOMTextComponent;
17346
17347/***/ }),
17348/* 142 */
17349/***/ (function(module, exports, __webpack_require__) {
17350
17351"use strict";
17352/**
17353 * Copyright (c) 2013-present, Facebook, Inc.
17354 *
17355 * This source code is licensed under the MIT license found in the
17356 * LICENSE file in the root directory of this source tree.
17357 *
17358 */
17359
17360
17361
17362var _prodInvariant = __webpack_require__(2),
17363 _assign = __webpack_require__(3);
17364
17365var LinkedValueUtils = __webpack_require__(33);
17366var ReactDOMComponentTree = __webpack_require__(4);
17367var ReactUpdates = __webpack_require__(9);
17368
17369var invariant = __webpack_require__(0);
17370var warning = __webpack_require__(1);
17371
17372var didWarnValueLink = false;
17373var didWarnValDefaultVal = false;
17374
17375function forceUpdateIfMounted() {
17376 if (this._rootNodeID) {
17377 // DOM component is still mounted; update
17378 ReactDOMTextarea.updateWrapper(this);
17379 }
17380}
17381
17382/**
17383 * Implements a <textarea> host component that allows setting `value`, and
17384 * `defaultValue`. This differs from the traditional DOM API because value is
17385 * usually set as PCDATA children.
17386 *
17387 * If `value` is not supplied (or null/undefined), user actions that affect the
17388 * value will trigger updates to the element.
17389 *
17390 * If `value` is supplied (and not null/undefined), the rendered element will
17391 * not trigger updates to the element. Instead, the `value` prop must change in
17392 * order for the rendered element to be updated.
17393 *
17394 * The rendered element will be initialized with an empty value, the prop
17395 * `defaultValue` if specified, or the children content (deprecated).
17396 */
17397var ReactDOMTextarea = {
17398 getHostProps: function (inst, props) {
17399 !(props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0;
17400
17401 // Always set children to the same thing. In IE9, the selection range will
17402 // get reset if `textContent` is mutated. We could add a check in setTextContent
17403 // to only set the value if/when the value differs from the node value (which would
17404 // completely solve this IE9 bug), but Sebastian+Ben seemed to like this solution.
17405 // The value can be a boolean or object so that's why it's forced to be a string.
17406 var hostProps = _assign({}, props, {
17407 value: undefined,
17408 defaultValue: undefined,
17409 children: '' + inst._wrapperState.initialValue,
17410 onChange: inst._wrapperState.onChange
17411 });
17412
17413 return hostProps;
17414 },
17415
17416 mountWrapper: function (inst, props) {
17417 if (process.env.NODE_ENV !== 'production') {
17418 LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner);
17419 if (props.valueLink !== undefined && !didWarnValueLink) {
17420 process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0;
17421 didWarnValueLink = true;
17422 }
17423 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
17424 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;
17425 didWarnValDefaultVal = true;
17426 }
17427 }
17428
17429 var value = LinkedValueUtils.getValue(props);
17430 var initialValue = value;
17431
17432 // Only bother fetching default value if we're going to use it
17433 if (value == null) {
17434 var defaultValue = props.defaultValue;
17435 // TODO (yungsters): Remove support for children content in <textarea>.
17436 var children = props.children;
17437 if (children != null) {
17438 if (process.env.NODE_ENV !== 'production') {
17439 process.env.NODE_ENV !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0;
17440 }
17441 !(defaultValue == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0;
17442 if (Array.isArray(children)) {
17443 !(children.length <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0;
17444 children = children[0];
17445 }
17446
17447 defaultValue = '' + children;
17448 }
17449 if (defaultValue == null) {
17450 defaultValue = '';
17451 }
17452 initialValue = defaultValue;
17453 }
17454
17455 inst._wrapperState = {
17456 initialValue: '' + initialValue,
17457 listeners: null,
17458 onChange: _handleChange.bind(inst)
17459 };
17460 },
17461
17462 updateWrapper: function (inst) {
17463 var props = inst._currentElement.props;
17464
17465 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
17466 var value = LinkedValueUtils.getValue(props);
17467 if (value != null) {
17468 // Cast `value` to a string to ensure the value is set correctly. While
17469 // browsers typically do this as necessary, jsdom doesn't.
17470 var newValue = '' + value;
17471
17472 // To avoid side effects (such as losing text selection), only set value if changed
17473 if (newValue !== node.value) {
17474 node.value = newValue;
17475 }
17476 if (props.defaultValue == null) {
17477 node.defaultValue = newValue;
17478 }
17479 }
17480 if (props.defaultValue != null) {
17481 node.defaultValue = props.defaultValue;
17482 }
17483 },
17484
17485 postMountWrapper: function (inst) {
17486 // This is in postMount because we need access to the DOM node, which is not
17487 // available until after the component has mounted.
17488 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
17489 var textContent = node.textContent;
17490
17491 // Only set node.value if textContent is equal to the expected
17492 // initial value. In IE10/IE11 there is a bug where the placeholder attribute
17493 // will populate textContent as well.
17494 // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
17495 if (textContent === inst._wrapperState.initialValue) {
17496 node.value = textContent;
17497 }
17498 }
17499};
17500
17501function _handleChange(event) {
17502 var props = this._currentElement.props;
17503 var returnValue = LinkedValueUtils.executeOnChange(props, event);
17504 ReactUpdates.asap(forceUpdateIfMounted, this);
17505 return returnValue;
17506}
17507
17508module.exports = ReactDOMTextarea;
17509
17510/***/ }),
17511/* 143 */
17512/***/ (function(module, exports, __webpack_require__) {
17513
17514"use strict";
17515/**
17516 * Copyright (c) 2015-present, Facebook, Inc.
17517 *
17518 * This source code is licensed under the MIT license found in the
17519 * LICENSE file in the root directory of this source tree.
17520 *
17521 */
17522
17523
17524
17525var _prodInvariant = __webpack_require__(2);
17526
17527var invariant = __webpack_require__(0);
17528
17529/**
17530 * Return the lowest common ancestor of A and B, or null if they are in
17531 * different trees.
17532 */
17533function getLowestCommonAncestor(instA, instB) {
17534 !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
17535 !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
17536
17537 var depthA = 0;
17538 for (var tempA = instA; tempA; tempA = tempA._hostParent) {
17539 depthA++;
17540 }
17541 var depthB = 0;
17542 for (var tempB = instB; tempB; tempB = tempB._hostParent) {
17543 depthB++;
17544 }
17545
17546 // If A is deeper, crawl up.
17547 while (depthA - depthB > 0) {
17548 instA = instA._hostParent;
17549 depthA--;
17550 }
17551
17552 // If B is deeper, crawl up.
17553 while (depthB - depthA > 0) {
17554 instB = instB._hostParent;
17555 depthB--;
17556 }
17557
17558 // Walk in lockstep until we find a match.
17559 var depth = depthA;
17560 while (depth--) {
17561 if (instA === instB) {
17562 return instA;
17563 }
17564 instA = instA._hostParent;
17565 instB = instB._hostParent;
17566 }
17567 return null;
17568}
17569
17570/**
17571 * Return if A is an ancestor of B.
17572 */
17573function isAncestor(instA, instB) {
17574 !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
17575 !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
17576
17577 while (instB) {
17578 if (instB === instA) {
17579 return true;
17580 }
17581 instB = instB._hostParent;
17582 }
17583 return false;
17584}
17585
17586/**
17587 * Return the parent instance of the passed-in instance.
17588 */
17589function getParentInstance(inst) {
17590 !('_hostNode' in inst) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0;
17591
17592 return inst._hostParent;
17593}
17594
17595/**
17596 * Simulates the traversal of a two-phase, capture/bubble event dispatch.
17597 */
17598function traverseTwoPhase(inst, fn, arg) {
17599 var path = [];
17600 while (inst) {
17601 path.push(inst);
17602 inst = inst._hostParent;
17603 }
17604 var i;
17605 for (i = path.length; i-- > 0;) {
17606 fn(path[i], 'captured', arg);
17607 }
17608 for (i = 0; i < path.length; i++) {
17609 fn(path[i], 'bubbled', arg);
17610 }
17611}
17612
17613/**
17614 * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
17615 * should would receive a `mouseEnter` or `mouseLeave` event.
17616 *
17617 * Does not invoke the callback on the nearest common ancestor because nothing
17618 * "entered" or "left" that element.
17619 */
17620function traverseEnterLeave(from, to, fn, argFrom, argTo) {
17621 var common = from && to ? getLowestCommonAncestor(from, to) : null;
17622 var pathFrom = [];
17623 while (from && from !== common) {
17624 pathFrom.push(from);
17625 from = from._hostParent;
17626 }
17627 var pathTo = [];
17628 while (to && to !== common) {
17629 pathTo.push(to);
17630 to = to._hostParent;
17631 }
17632 var i;
17633 for (i = 0; i < pathFrom.length; i++) {
17634 fn(pathFrom[i], 'bubbled', argFrom);
17635 }
17636 for (i = pathTo.length; i-- > 0;) {
17637 fn(pathTo[i], 'captured', argTo);
17638 }
17639}
17640
17641module.exports = {
17642 isAncestor: isAncestor,
17643 getLowestCommonAncestor: getLowestCommonAncestor,
17644 getParentInstance: getParentInstance,
17645 traverseTwoPhase: traverseTwoPhase,
17646 traverseEnterLeave: traverseEnterLeave
17647};
17648
17649/***/ }),
17650/* 144 */
17651/***/ (function(module, exports, __webpack_require__) {
17652
17653"use strict";
17654/**
17655 * Copyright (c) 2016-present, Facebook, Inc.
17656 *
17657 * This source code is licensed under the MIT license found in the
17658 * LICENSE file in the root directory of this source tree.
17659 *
17660 *
17661 */
17662
17663
17664
17665var ReactInvalidSetStateWarningHook = __webpack_require__(152);
17666var ReactHostOperationHistoryHook = __webpack_require__(150);
17667var ReactComponentTreeHook = __webpack_require__(8);
17668var ExecutionEnvironment = __webpack_require__(5);
17669
17670var performanceNow = __webpack_require__(117);
17671var warning = __webpack_require__(1);
17672
17673var hooks = [];
17674var didHookThrowForEvent = {};
17675
17676function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
17677 try {
17678 fn.call(context, arg1, arg2, arg3, arg4, arg5);
17679 } catch (e) {
17680 process.env.NODE_ENV !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0;
17681 didHookThrowForEvent[event] = true;
17682 }
17683}
17684
17685function emitEvent(event, arg1, arg2, arg3, arg4, arg5) {
17686 for (var i = 0; i < hooks.length; i++) {
17687 var hook = hooks[i];
17688 var fn = hook[event];
17689 if (fn) {
17690 callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
17691 }
17692 }
17693}
17694
17695var isProfiling = false;
17696var flushHistory = [];
17697var lifeCycleTimerStack = [];
17698var currentFlushNesting = 0;
17699var currentFlushMeasurements = [];
17700var currentFlushStartTime = 0;
17701var currentTimerDebugID = null;
17702var currentTimerStartTime = 0;
17703var currentTimerNestedFlushDuration = 0;
17704var currentTimerType = null;
17705
17706var lifeCycleTimerHasWarned = false;
17707
17708function clearHistory() {
17709 ReactComponentTreeHook.purgeUnmountedComponents();
17710 ReactHostOperationHistoryHook.clearHistory();
17711}
17712
17713function getTreeSnapshot(registeredIDs) {
17714 return registeredIDs.reduce(function (tree, id) {
17715 var ownerID = ReactComponentTreeHook.getOwnerID(id);
17716 var parentID = ReactComponentTreeHook.getParentID(id);
17717 tree[id] = {
17718 displayName: ReactComponentTreeHook.getDisplayName(id),
17719 text: ReactComponentTreeHook.getText(id),
17720 updateCount: ReactComponentTreeHook.getUpdateCount(id),
17721 childIDs: ReactComponentTreeHook.getChildIDs(id),
17722 // Text nodes don't have owners but this is close enough.
17723 ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0,
17724 parentID: parentID
17725 };
17726 return tree;
17727 }, {});
17728}
17729
17730function resetMeasurements() {
17731 var previousStartTime = currentFlushStartTime;
17732 var previousMeasurements = currentFlushMeasurements;
17733 var previousOperations = ReactHostOperationHistoryHook.getHistory();
17734
17735 if (currentFlushNesting === 0) {
17736 currentFlushStartTime = 0;
17737 currentFlushMeasurements = [];
17738 clearHistory();
17739 return;
17740 }
17741
17742 if (previousMeasurements.length || previousOperations.length) {
17743 var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
17744 flushHistory.push({
17745 duration: performanceNow() - previousStartTime,
17746 measurements: previousMeasurements || [],
17747 operations: previousOperations || [],
17748 treeSnapshot: getTreeSnapshot(registeredIDs)
17749 });
17750 }
17751
17752 clearHistory();
17753 currentFlushStartTime = performanceNow();
17754 currentFlushMeasurements = [];
17755}
17756
17757function checkDebugID(debugID) {
17758 var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
17759
17760 if (allowRoot && debugID === 0) {
17761 return;
17762 }
17763 if (!debugID) {
17764 process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0;
17765 }
17766}
17767
17768function beginLifeCycleTimer(debugID, timerType) {
17769 if (currentFlushNesting === 0) {
17770 return;
17771 }
17772 if (currentTimerType && !lifeCycleTimerHasWarned) {
17773 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;
17774 lifeCycleTimerHasWarned = true;
17775 }
17776 currentTimerStartTime = performanceNow();
17777 currentTimerNestedFlushDuration = 0;
17778 currentTimerDebugID = debugID;
17779 currentTimerType = timerType;
17780}
17781
17782function endLifeCycleTimer(debugID, timerType) {
17783 if (currentFlushNesting === 0) {
17784 return;
17785 }
17786 if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) {
17787 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;
17788 lifeCycleTimerHasWarned = true;
17789 }
17790 if (isProfiling) {
17791 currentFlushMeasurements.push({
17792 timerType: timerType,
17793 instanceID: debugID,
17794 duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration
17795 });
17796 }
17797 currentTimerStartTime = 0;
17798 currentTimerNestedFlushDuration = 0;
17799 currentTimerDebugID = null;
17800 currentTimerType = null;
17801}
17802
17803function pauseCurrentLifeCycleTimer() {
17804 var currentTimer = {
17805 startTime: currentTimerStartTime,
17806 nestedFlushStartTime: performanceNow(),
17807 debugID: currentTimerDebugID,
17808 timerType: currentTimerType
17809 };
17810 lifeCycleTimerStack.push(currentTimer);
17811 currentTimerStartTime = 0;
17812 currentTimerNestedFlushDuration = 0;
17813 currentTimerDebugID = null;
17814 currentTimerType = null;
17815}
17816
17817function resumeCurrentLifeCycleTimer() {
17818 var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(),
17819 startTime = _lifeCycleTimerStack$.startTime,
17820 nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime,
17821 debugID = _lifeCycleTimerStack$.debugID,
17822 timerType = _lifeCycleTimerStack$.timerType;
17823
17824 var nestedFlushDuration = performanceNow() - nestedFlushStartTime;
17825 currentTimerStartTime = startTime;
17826 currentTimerNestedFlushDuration += nestedFlushDuration;
17827 currentTimerDebugID = debugID;
17828 currentTimerType = timerType;
17829}
17830
17831var lastMarkTimeStamp = 0;
17832var canUsePerformanceMeasure = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';
17833
17834function shouldMark(debugID) {
17835 if (!isProfiling || !canUsePerformanceMeasure) {
17836 return false;
17837 }
17838 var element = ReactComponentTreeHook.getElement(debugID);
17839 if (element == null || typeof element !== 'object') {
17840 return false;
17841 }
17842 var isHostElement = typeof element.type === 'string';
17843 if (isHostElement) {
17844 return false;
17845 }
17846 return true;
17847}
17848
17849function markBegin(debugID, markType) {
17850 if (!shouldMark(debugID)) {
17851 return;
17852 }
17853
17854 var markName = debugID + '::' + markType;
17855 lastMarkTimeStamp = performanceNow();
17856 performance.mark(markName);
17857}
17858
17859function markEnd(debugID, markType) {
17860 if (!shouldMark(debugID)) {
17861 return;
17862 }
17863
17864 var markName = debugID + '::' + markType;
17865 var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown';
17866
17867 // Chrome has an issue of dropping markers recorded too fast:
17868 // https://bugs.chromium.org/p/chromium/issues/detail?id=640652
17869 // To work around this, we will not report very small measurements.
17870 // I determined the magic number by tweaking it back and forth.
17871 // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe.
17872 // When the bug is fixed, we can `measure()` unconditionally if we want to.
17873 var timeStamp = performanceNow();
17874 if (timeStamp - lastMarkTimeStamp > 0.1) {
17875 var measurementName = displayName + ' [' + markType + ']';
17876 performance.measure(measurementName, markName);
17877 }
17878
17879 performance.clearMarks(markName);
17880 if (measurementName) {
17881 performance.clearMeasures(measurementName);
17882 }
17883}
17884
17885var ReactDebugTool = {
17886 addHook: function (hook) {
17887 hooks.push(hook);
17888 },
17889 removeHook: function (hook) {
17890 for (var i = 0; i < hooks.length; i++) {
17891 if (hooks[i] === hook) {
17892 hooks.splice(i, 1);
17893 i--;
17894 }
17895 }
17896 },
17897 isProfiling: function () {
17898 return isProfiling;
17899 },
17900 beginProfiling: function () {
17901 if (isProfiling) {
17902 return;
17903 }
17904
17905 isProfiling = true;
17906 flushHistory.length = 0;
17907 resetMeasurements();
17908 ReactDebugTool.addHook(ReactHostOperationHistoryHook);
17909 },
17910 endProfiling: function () {
17911 if (!isProfiling) {
17912 return;
17913 }
17914
17915 isProfiling = false;
17916 resetMeasurements();
17917 ReactDebugTool.removeHook(ReactHostOperationHistoryHook);
17918 },
17919 getFlushHistory: function () {
17920 return flushHistory;
17921 },
17922 onBeginFlush: function () {
17923 currentFlushNesting++;
17924 resetMeasurements();
17925 pauseCurrentLifeCycleTimer();
17926 emitEvent('onBeginFlush');
17927 },
17928 onEndFlush: function () {
17929 resetMeasurements();
17930 currentFlushNesting--;
17931 resumeCurrentLifeCycleTimer();
17932 emitEvent('onEndFlush');
17933 },
17934 onBeginLifeCycleTimer: function (debugID, timerType) {
17935 checkDebugID(debugID);
17936 emitEvent('onBeginLifeCycleTimer', debugID, timerType);
17937 markBegin(debugID, timerType);
17938 beginLifeCycleTimer(debugID, timerType);
17939 },
17940 onEndLifeCycleTimer: function (debugID, timerType) {
17941 checkDebugID(debugID);
17942 endLifeCycleTimer(debugID, timerType);
17943 markEnd(debugID, timerType);
17944 emitEvent('onEndLifeCycleTimer', debugID, timerType);
17945 },
17946 onBeginProcessingChildContext: function () {
17947 emitEvent('onBeginProcessingChildContext');
17948 },
17949 onEndProcessingChildContext: function () {
17950 emitEvent('onEndProcessingChildContext');
17951 },
17952 onHostOperation: function (operation) {
17953 checkDebugID(operation.instanceID);
17954 emitEvent('onHostOperation', operation);
17955 },
17956 onSetState: function () {
17957 emitEvent('onSetState');
17958 },
17959 onSetChildren: function (debugID, childDebugIDs) {
17960 checkDebugID(debugID);
17961 childDebugIDs.forEach(checkDebugID);
17962 emitEvent('onSetChildren', debugID, childDebugIDs);
17963 },
17964 onBeforeMountComponent: function (debugID, element, parentDebugID) {
17965 checkDebugID(debugID);
17966 checkDebugID(parentDebugID, true);
17967 emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
17968 markBegin(debugID, 'mount');
17969 },
17970 onMountComponent: function (debugID) {
17971 checkDebugID(debugID);
17972 markEnd(debugID, 'mount');
17973 emitEvent('onMountComponent', debugID);
17974 },
17975 onBeforeUpdateComponent: function (debugID, element) {
17976 checkDebugID(debugID);
17977 emitEvent('onBeforeUpdateComponent', debugID, element);
17978 markBegin(debugID, 'update');
17979 },
17980 onUpdateComponent: function (debugID) {
17981 checkDebugID(debugID);
17982 markEnd(debugID, 'update');
17983 emitEvent('onUpdateComponent', debugID);
17984 },
17985 onBeforeUnmountComponent: function (debugID) {
17986 checkDebugID(debugID);
17987 emitEvent('onBeforeUnmountComponent', debugID);
17988 markBegin(debugID, 'unmount');
17989 },
17990 onUnmountComponent: function (debugID) {
17991 checkDebugID(debugID);
17992 markEnd(debugID, 'unmount');
17993 emitEvent('onUnmountComponent', debugID);
17994 },
17995 onTestEvent: function () {
17996 emitEvent('onTestEvent');
17997 }
17998};
17999
18000// TODO remove these when RN/www gets updated
18001ReactDebugTool.addDevtool = ReactDebugTool.addHook;
18002ReactDebugTool.removeDevtool = ReactDebugTool.removeHook;
18003
18004ReactDebugTool.addHook(ReactInvalidSetStateWarningHook);
18005ReactDebugTool.addHook(ReactComponentTreeHook);
18006var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
18007if (/[?&]react_perf\b/.test(url)) {
18008 ReactDebugTool.beginProfiling();
18009}
18010
18011module.exports = ReactDebugTool;
18012
18013/***/ }),
18014/* 145 */
18015/***/ (function(module, exports, __webpack_require__) {
18016
18017"use strict";
18018/**
18019 * Copyright (c) 2013-present, Facebook, Inc.
18020 *
18021 * This source code is licensed under the MIT license found in the
18022 * LICENSE file in the root directory of this source tree.
18023 *
18024 */
18025
18026
18027
18028var ARIADOMPropertyConfig = __webpack_require__(120);
18029var BeforeInputEventPlugin = __webpack_require__(122);
18030var ChangeEventPlugin = __webpack_require__(124);
18031var DefaultEventPluginOrder = __webpack_require__(126);
18032var EnterLeaveEventPlugin = __webpack_require__(127);
18033var HTMLDOMPropertyConfig = __webpack_require__(129);
18034var ReactComponentBrowserEnvironment = __webpack_require__(131);
18035var ReactDOMComponent = __webpack_require__(133);
18036var ReactDOMComponentTree = __webpack_require__(4);
18037var ReactDOMEmptyComponent = __webpack_require__(135);
18038var ReactDOMTreeTraversal = __webpack_require__(143);
18039var ReactDOMTextComponent = __webpack_require__(141);
18040var ReactDefaultBatchingStrategy = __webpack_require__(58);
18041var ReactEventListener = __webpack_require__(148);
18042var ReactInjection = __webpack_require__(151);
18043var ReactReconcileTransaction = __webpack_require__(158);
18044var SVGDOMPropertyConfig = __webpack_require__(164);
18045var SelectEventPlugin = __webpack_require__(165);
18046var SimpleEventPlugin = __webpack_require__(166);
18047
18048var alreadyInjected = false;
18049
18050function inject() {
18051 if (alreadyInjected) {
18052 // TODO: This is currently true because these injections are shared between
18053 // the client and the server package. They should be built independently
18054 // and not share any injection state. Then this problem will be solved.
18055 return;
18056 }
18057 alreadyInjected = true;
18058
18059 ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);
18060
18061 /**
18062 * Inject modules for resolving DOM hierarchy and plugin ordering.
18063 */
18064 ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);
18065 ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree);
18066 ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal);
18067
18068 /**
18069 * Some important event plugins included by default (without having to require
18070 * them).
18071 */
18072 ReactInjection.EventPluginHub.injectEventPluginsByName({
18073 SimpleEventPlugin: SimpleEventPlugin,
18074 EnterLeaveEventPlugin: EnterLeaveEventPlugin,
18075 ChangeEventPlugin: ChangeEventPlugin,
18076 SelectEventPlugin: SelectEventPlugin,
18077 BeforeInputEventPlugin: BeforeInputEventPlugin
18078 });
18079
18080 ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent);
18081
18082 ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent);
18083
18084 ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig);
18085 ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
18086 ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);
18087
18088 ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) {
18089 return new ReactDOMEmptyComponent(instantiate);
18090 });
18091
18092 ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction);
18093 ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);
18094
18095 ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);
18096}
18097
18098module.exports = {
18099 inject: inject
18100};
18101
18102/***/ }),
18103/* 146 */
18104/***/ (function(module, exports, __webpack_require__) {
18105
18106"use strict";
18107/**
18108 * Copyright (c) 2014-present, Facebook, Inc.
18109 *
18110 * This source code is licensed under the MIT license found in the
18111 * LICENSE file in the root directory of this source tree.
18112 *
18113 *
18114 */
18115
18116
18117
18118// The Symbol used to tag the ReactElement type. If there is no native Symbol
18119// nor polyfill, then a plain number is used for performance.
18120
18121var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
18122
18123module.exports = REACT_ELEMENT_TYPE;
18124
18125/***/ }),
18126/* 147 */
18127/***/ (function(module, exports, __webpack_require__) {
18128
18129"use strict";
18130/**
18131 * Copyright (c) 2013-present, Facebook, Inc.
18132 *
18133 * This source code is licensed under the MIT license found in the
18134 * LICENSE file in the root directory of this source tree.
18135 *
18136 */
18137
18138
18139
18140var EventPluginHub = __webpack_require__(17);
18141
18142function runEventQueueInBatch(events) {
18143 EventPluginHub.enqueueEvents(events);
18144 EventPluginHub.processEventQueue(false);
18145}
18146
18147var ReactEventEmitterMixin = {
18148 /**
18149 * Streams a fired top-level event to `EventPluginHub` where plugins have the
18150 * opportunity to create `ReactEvent`s to be dispatched.
18151 */
18152 handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
18153 var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
18154 runEventQueueInBatch(events);
18155 }
18156};
18157
18158module.exports = ReactEventEmitterMixin;
18159
18160/***/ }),
18161/* 148 */
18162/***/ (function(module, exports, __webpack_require__) {
18163
18164"use strict";
18165/**
18166 * Copyright (c) 2013-present, Facebook, Inc.
18167 *
18168 * This source code is licensed under the MIT license found in the
18169 * LICENSE file in the root directory of this source tree.
18170 *
18171 */
18172
18173
18174
18175var _assign = __webpack_require__(3);
18176
18177var EventListener = __webpack_require__(48);
18178var ExecutionEnvironment = __webpack_require__(5);
18179var PooledClass = __webpack_require__(12);
18180var ReactDOMComponentTree = __webpack_require__(4);
18181var ReactUpdates = __webpack_require__(9);
18182
18183var getEventTarget = __webpack_require__(41);
18184var getUnboundedScrollPosition = __webpack_require__(110);
18185
18186/**
18187 * Find the deepest React component completely containing the root of the
18188 * passed-in instance (for use when entire React trees are nested within each
18189 * other). If React trees are not nested, returns null.
18190 */
18191function findParent(inst) {
18192 // TODO: It may be a good idea to cache this to prevent unnecessary DOM
18193 // traversal, but caching is difficult to do correctly without using a
18194 // mutation observer to listen for all DOM changes.
18195 while (inst._hostParent) {
18196 inst = inst._hostParent;
18197 }
18198 var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst);
18199 var container = rootNode.parentNode;
18200 return ReactDOMComponentTree.getClosestInstanceFromNode(container);
18201}
18202
18203// Used to store ancestor hierarchy in top level callback
18204function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {
18205 this.topLevelType = topLevelType;
18206 this.nativeEvent = nativeEvent;
18207 this.ancestors = [];
18208}
18209_assign(TopLevelCallbackBookKeeping.prototype, {
18210 destructor: function () {
18211 this.topLevelType = null;
18212 this.nativeEvent = null;
18213 this.ancestors.length = 0;
18214 }
18215});
18216PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);
18217
18218function handleTopLevelImpl(bookKeeping) {
18219 var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent);
18220 var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget);
18221
18222 // Loop through the hierarchy, in case there's any nested components.
18223 // It's important that we build the array of ancestors before calling any
18224 // event handlers, because event handlers can modify the DOM, leading to
18225 // inconsistencies with ReactMount's node cache. See #1105.
18226 var ancestor = targetInst;
18227 do {
18228 bookKeeping.ancestors.push(ancestor);
18229 ancestor = ancestor && findParent(ancestor);
18230 } while (ancestor);
18231
18232 for (var i = 0; i < bookKeeping.ancestors.length; i++) {
18233 targetInst = bookKeeping.ancestors[i];
18234 ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
18235 }
18236}
18237
18238function scrollValueMonitor(cb) {
18239 var scrollPosition = getUnboundedScrollPosition(window);
18240 cb(scrollPosition);
18241}
18242
18243var ReactEventListener = {
18244 _enabled: true,
18245 _handleTopLevel: null,
18246
18247 WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,
18248
18249 setHandleTopLevel: function (handleTopLevel) {
18250 ReactEventListener._handleTopLevel = handleTopLevel;
18251 },
18252
18253 setEnabled: function (enabled) {
18254 ReactEventListener._enabled = !!enabled;
18255 },
18256
18257 isEnabled: function () {
18258 return ReactEventListener._enabled;
18259 },
18260
18261 /**
18262 * Traps top-level events by using event bubbling.
18263 *
18264 * @param {string} topLevelType Record from `EventConstants`.
18265 * @param {string} handlerBaseName Event name (e.g. "click").
18266 * @param {object} element Element on which to attach listener.
18267 * @return {?object} An object with a remove function which will forcefully
18268 * remove the listener.
18269 * @internal
18270 */
18271 trapBubbledEvent: function (topLevelType, handlerBaseName, element) {
18272 if (!element) {
18273 return null;
18274 }
18275 return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
18276 },
18277
18278 /**
18279 * Traps a top-level event by using event capturing.
18280 *
18281 * @param {string} topLevelType Record from `EventConstants`.
18282 * @param {string} handlerBaseName Event name (e.g. "click").
18283 * @param {object} element Element on which to attach listener.
18284 * @return {?object} An object with a remove function which will forcefully
18285 * remove the listener.
18286 * @internal
18287 */
18288 trapCapturedEvent: function (topLevelType, handlerBaseName, element) {
18289 if (!element) {
18290 return null;
18291 }
18292 return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
18293 },
18294
18295 monitorScrollValue: function (refresh) {
18296 var callback = scrollValueMonitor.bind(null, refresh);
18297 EventListener.listen(window, 'scroll', callback);
18298 },
18299
18300 dispatchEvent: function (topLevelType, nativeEvent) {
18301 if (!ReactEventListener._enabled) {
18302 return;
18303 }
18304
18305 var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent);
18306 try {
18307 // Event queue being processed in the same cycle allows
18308 // `preventDefault`.
18309 ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);
18310 } finally {
18311 TopLevelCallbackBookKeeping.release(bookKeeping);
18312 }
18313 }
18314};
18315
18316module.exports = ReactEventListener;
18317
18318/***/ }),
18319/* 149 */
18320/***/ (function(module, exports, __webpack_require__) {
18321
18322"use strict";
18323/**
18324 * Copyright (c) 2013-present, Facebook, Inc.
18325 *
18326 * This source code is licensed under the MIT license found in the
18327 * LICENSE file in the root directory of this source tree.
18328 *
18329 *
18330 */
18331
18332
18333
18334var ReactFeatureFlags = {
18335 // When true, call console.time() before and .timeEnd() after each top-level
18336 // render (both initial renders and updates). Useful when looking at prod-mode
18337 // timeline profiles in Chrome, for example.
18338 logTopLevelRenders: false
18339};
18340
18341module.exports = ReactFeatureFlags;
18342
18343/***/ }),
18344/* 150 */
18345/***/ (function(module, exports, __webpack_require__) {
18346
18347"use strict";
18348/**
18349 * Copyright (c) 2016-present, Facebook, Inc.
18350 *
18351 * This source code is licensed under the MIT license found in the
18352 * LICENSE file in the root directory of this source tree.
18353 *
18354 *
18355 */
18356
18357
18358
18359var history = [];
18360
18361var ReactHostOperationHistoryHook = {
18362 onHostOperation: function (operation) {
18363 history.push(operation);
18364 },
18365 clearHistory: function () {
18366 if (ReactHostOperationHistoryHook._preventClearing) {
18367 // Should only be used for tests.
18368 return;
18369 }
18370
18371 history = [];
18372 },
18373 getHistory: function () {
18374 return history;
18375 }
18376};
18377
18378module.exports = ReactHostOperationHistoryHook;
18379
18380/***/ }),
18381/* 151 */
18382/***/ (function(module, exports, __webpack_require__) {
18383
18384"use strict";
18385/**
18386 * Copyright (c) 2013-present, Facebook, Inc.
18387 *
18388 * This source code is licensed under the MIT license found in the
18389 * LICENSE file in the root directory of this source tree.
18390 *
18391 */
18392
18393
18394
18395var DOMProperty = __webpack_require__(16);
18396var EventPluginHub = __webpack_require__(17);
18397var EventPluginUtils = __webpack_require__(31);
18398var ReactComponentEnvironment = __webpack_require__(35);
18399var ReactEmptyComponent = __webpack_require__(59);
18400var ReactBrowserEventEmitter = __webpack_require__(34);
18401var ReactHostComponent = __webpack_require__(60);
18402var ReactUpdates = __webpack_require__(9);
18403
18404var ReactInjection = {
18405 Component: ReactComponentEnvironment.injection,
18406 DOMProperty: DOMProperty.injection,
18407 EmptyComponent: ReactEmptyComponent.injection,
18408 EventPluginHub: EventPluginHub.injection,
18409 EventPluginUtils: EventPluginUtils.injection,
18410 EventEmitter: ReactBrowserEventEmitter.injection,
18411 HostComponent: ReactHostComponent.injection,
18412 Updates: ReactUpdates.injection
18413};
18414
18415module.exports = ReactInjection;
18416
18417/***/ }),
18418/* 152 */
18419/***/ (function(module, exports, __webpack_require__) {
18420
18421"use strict";
18422/**
18423 * Copyright (c) 2016-present, Facebook, Inc.
18424 *
18425 * This source code is licensed under the MIT license found in the
18426 * LICENSE file in the root directory of this source tree.
18427 *
18428 *
18429 */
18430
18431
18432
18433var warning = __webpack_require__(1);
18434
18435if (process.env.NODE_ENV !== 'production') {
18436 var processingChildContext = false;
18437
18438 var warnInvalidSetState = function () {
18439 process.env.NODE_ENV !== 'production' ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0;
18440 };
18441}
18442
18443var ReactInvalidSetStateWarningHook = {
18444 onBeginProcessingChildContext: function () {
18445 processingChildContext = true;
18446 },
18447 onEndProcessingChildContext: function () {
18448 processingChildContext = false;
18449 },
18450 onSetState: function () {
18451 warnInvalidSetState();
18452 }
18453};
18454
18455module.exports = ReactInvalidSetStateWarningHook;
18456
18457/***/ }),
18458/* 153 */
18459/***/ (function(module, exports, __webpack_require__) {
18460
18461"use strict";
18462/**
18463 * Copyright (c) 2013-present, Facebook, Inc.
18464 *
18465 * This source code is licensed under the MIT license found in the
18466 * LICENSE file in the root directory of this source tree.
18467 *
18468 */
18469
18470
18471
18472var adler32 = __webpack_require__(177);
18473
18474var TAG_END = /\/?>/;
18475var COMMENT_START = /^<\!\-\-/;
18476
18477var ReactMarkupChecksum = {
18478 CHECKSUM_ATTR_NAME: 'data-react-checksum',
18479
18480 /**
18481 * @param {string} markup Markup string
18482 * @return {string} Markup string with checksum attribute attached
18483 */
18484 addChecksumToMarkup: function (markup) {
18485 var checksum = adler32(markup);
18486
18487 // Add checksum (handle both parent tags, comments and self-closing tags)
18488 if (COMMENT_START.test(markup)) {
18489 return markup;
18490 } else {
18491 return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&');
18492 }
18493 },
18494
18495 /**
18496 * @param {string} markup to use
18497 * @param {DOMElement} element root React element
18498 * @returns {boolean} whether or not the markup is the same
18499 */
18500 canReuseMarkup: function (markup, element) {
18501 var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
18502 existingChecksum = existingChecksum && parseInt(existingChecksum, 10);
18503 var markupChecksum = adler32(markup);
18504 return markupChecksum === existingChecksum;
18505 }
18506};
18507
18508module.exports = ReactMarkupChecksum;
18509
18510/***/ }),
18511/* 154 */
18512/***/ (function(module, exports, __webpack_require__) {
18513
18514"use strict";
18515/**
18516 * Copyright (c) 2013-present, Facebook, Inc.
18517 *
18518 * This source code is licensed under the MIT license found in the
18519 * LICENSE file in the root directory of this source tree.
18520 *
18521 */
18522
18523
18524
18525var _prodInvariant = __webpack_require__(2);
18526
18527var ReactComponentEnvironment = __webpack_require__(35);
18528var ReactInstanceMap = __webpack_require__(37);
18529var ReactInstrumentation = __webpack_require__(7);
18530
18531var ReactCurrentOwner = __webpack_require__(11);
18532var ReactReconciler = __webpack_require__(19);
18533var ReactChildReconciler = __webpack_require__(130);
18534
18535var emptyFunction = __webpack_require__(6);
18536var flattenChildren = __webpack_require__(180);
18537var invariant = __webpack_require__(0);
18538
18539/**
18540 * Make an update for markup to be rendered and inserted at a supplied index.
18541 *
18542 * @param {string} markup Markup that renders into an element.
18543 * @param {number} toIndex Destination index.
18544 * @private
18545 */
18546function makeInsertMarkup(markup, afterNode, toIndex) {
18547 // NOTE: Null values reduce hidden classes.
18548 return {
18549 type: 'INSERT_MARKUP',
18550 content: markup,
18551 fromIndex: null,
18552 fromNode: null,
18553 toIndex: toIndex,
18554 afterNode: afterNode
18555 };
18556}
18557
18558/**
18559 * Make an update for moving an existing element to another index.
18560 *
18561 * @param {number} fromIndex Source index of the existing element.
18562 * @param {number} toIndex Destination index of the element.
18563 * @private
18564 */
18565function makeMove(child, afterNode, toIndex) {
18566 // NOTE: Null values reduce hidden classes.
18567 return {
18568 type: 'MOVE_EXISTING',
18569 content: null,
18570 fromIndex: child._mountIndex,
18571 fromNode: ReactReconciler.getHostNode(child),
18572 toIndex: toIndex,
18573 afterNode: afterNode
18574 };
18575}
18576
18577/**
18578 * Make an update for removing an element at an index.
18579 *
18580 * @param {number} fromIndex Index of the element to remove.
18581 * @private
18582 */
18583function makeRemove(child, node) {
18584 // NOTE: Null values reduce hidden classes.
18585 return {
18586 type: 'REMOVE_NODE',
18587 content: null,
18588 fromIndex: child._mountIndex,
18589 fromNode: node,
18590 toIndex: null,
18591 afterNode: null
18592 };
18593}
18594
18595/**
18596 * Make an update for setting the markup of a node.
18597 *
18598 * @param {string} markup Markup that renders into an element.
18599 * @private
18600 */
18601function makeSetMarkup(markup) {
18602 // NOTE: Null values reduce hidden classes.
18603 return {
18604 type: 'SET_MARKUP',
18605 content: markup,
18606 fromIndex: null,
18607 fromNode: null,
18608 toIndex: null,
18609 afterNode: null
18610 };
18611}
18612
18613/**
18614 * Make an update for setting the text content.
18615 *
18616 * @param {string} textContent Text content to set.
18617 * @private
18618 */
18619function makeTextContent(textContent) {
18620 // NOTE: Null values reduce hidden classes.
18621 return {
18622 type: 'TEXT_CONTENT',
18623 content: textContent,
18624 fromIndex: null,
18625 fromNode: null,
18626 toIndex: null,
18627 afterNode: null
18628 };
18629}
18630
18631/**
18632 * Push an update, if any, onto the queue. Creates a new queue if none is
18633 * passed and always returns the queue. Mutative.
18634 */
18635function enqueue(queue, update) {
18636 if (update) {
18637 queue = queue || [];
18638 queue.push(update);
18639 }
18640 return queue;
18641}
18642
18643/**
18644 * Processes any enqueued updates.
18645 *
18646 * @private
18647 */
18648function processQueue(inst, updateQueue) {
18649 ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue);
18650}
18651
18652var setChildrenForInstrumentation = emptyFunction;
18653if (process.env.NODE_ENV !== 'production') {
18654 var getDebugID = function (inst) {
18655 if (!inst._debugID) {
18656 // Check for ART-like instances. TODO: This is silly/gross.
18657 var internal;
18658 if (internal = ReactInstanceMap.get(inst)) {
18659 inst = internal;
18660 }
18661 }
18662 return inst._debugID;
18663 };
18664 setChildrenForInstrumentation = function (children) {
18665 var debugID = getDebugID(this);
18666 // TODO: React Native empty components are also multichild.
18667 // This means they still get into this method but don't have _debugID.
18668 if (debugID !== 0) {
18669 ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) {
18670 return children[key]._debugID;
18671 }) : []);
18672 }
18673 };
18674}
18675
18676/**
18677 * ReactMultiChild are capable of reconciling multiple children.
18678 *
18679 * @class ReactMultiChild
18680 * @internal
18681 */
18682var ReactMultiChild = {
18683 /**
18684 * Provides common functionality for components that must reconcile multiple
18685 * children. This is used by `ReactDOMComponent` to mount, update, and
18686 * unmount child components.
18687 *
18688 * @lends {ReactMultiChild.prototype}
18689 */
18690 Mixin: {
18691 _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) {
18692 if (process.env.NODE_ENV !== 'production') {
18693 var selfDebugID = getDebugID(this);
18694 if (this._currentElement) {
18695 try {
18696 ReactCurrentOwner.current = this._currentElement._owner;
18697 return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID);
18698 } finally {
18699 ReactCurrentOwner.current = null;
18700 }
18701 }
18702 }
18703 return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);
18704 },
18705
18706 _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) {
18707 var nextChildren;
18708 var selfDebugID = 0;
18709 if (process.env.NODE_ENV !== 'production') {
18710 selfDebugID = getDebugID(this);
18711 if (this._currentElement) {
18712 try {
18713 ReactCurrentOwner.current = this._currentElement._owner;
18714 nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
18715 } finally {
18716 ReactCurrentOwner.current = null;
18717 }
18718 ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
18719 return nextChildren;
18720 }
18721 }
18722 nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
18723 ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
18724 return nextChildren;
18725 },
18726
18727 /**
18728 * Generates a "mount image" for each of the supplied children. In the case
18729 * of `ReactDOMComponent`, a mount image is a string of markup.
18730 *
18731 * @param {?object} nestedChildren Nested child maps.
18732 * @return {array} An array of mounted representations.
18733 * @internal
18734 */
18735 mountChildren: function (nestedChildren, transaction, context) {
18736 var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context);
18737 this._renderedChildren = children;
18738
18739 var mountImages = [];
18740 var index = 0;
18741 for (var name in children) {
18742 if (children.hasOwnProperty(name)) {
18743 var child = children[name];
18744 var selfDebugID = 0;
18745 if (process.env.NODE_ENV !== 'production') {
18746 selfDebugID = getDebugID(this);
18747 }
18748 var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);
18749 child._mountIndex = index++;
18750 mountImages.push(mountImage);
18751 }
18752 }
18753
18754 if (process.env.NODE_ENV !== 'production') {
18755 setChildrenForInstrumentation.call(this, children);
18756 }
18757
18758 return mountImages;
18759 },
18760
18761 /**
18762 * Replaces any rendered children with a text content string.
18763 *
18764 * @param {string} nextContent String of content.
18765 * @internal
18766 */
18767 updateTextContent: function (nextContent) {
18768 var prevChildren = this._renderedChildren;
18769 // Remove any rendered children.
18770 ReactChildReconciler.unmountChildren(prevChildren, false);
18771 for (var name in prevChildren) {
18772 if (prevChildren.hasOwnProperty(name)) {
18773 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
18774 }
18775 }
18776 // Set new text content.
18777 var updates = [makeTextContent(nextContent)];
18778 processQueue(this, updates);
18779 },
18780
18781 /**
18782 * Replaces any rendered children with a markup string.
18783 *
18784 * @param {string} nextMarkup String of markup.
18785 * @internal
18786 */
18787 updateMarkup: function (nextMarkup) {
18788 var prevChildren = this._renderedChildren;
18789 // Remove any rendered children.
18790 ReactChildReconciler.unmountChildren(prevChildren, false);
18791 for (var name in prevChildren) {
18792 if (prevChildren.hasOwnProperty(name)) {
18793 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
18794 }
18795 }
18796 var updates = [makeSetMarkup(nextMarkup)];
18797 processQueue(this, updates);
18798 },
18799
18800 /**
18801 * Updates the rendered children with new children.
18802 *
18803 * @param {?object} nextNestedChildrenElements Nested child element maps.
18804 * @param {ReactReconcileTransaction} transaction
18805 * @internal
18806 */
18807 updateChildren: function (nextNestedChildrenElements, transaction, context) {
18808 // Hook used by React ART
18809 this._updateChildren(nextNestedChildrenElements, transaction, context);
18810 },
18811
18812 /**
18813 * @param {?object} nextNestedChildrenElements Nested child element maps.
18814 * @param {ReactReconcileTransaction} transaction
18815 * @final
18816 * @protected
18817 */
18818 _updateChildren: function (nextNestedChildrenElements, transaction, context) {
18819 var prevChildren = this._renderedChildren;
18820 var removedNodes = {};
18821 var mountImages = [];
18822 var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context);
18823 if (!nextChildren && !prevChildren) {
18824 return;
18825 }
18826 var updates = null;
18827 var name;
18828 // `nextIndex` will increment for each child in `nextChildren`, but
18829 // `lastIndex` will be the last index visited in `prevChildren`.
18830 var nextIndex = 0;
18831 var lastIndex = 0;
18832 // `nextMountIndex` will increment for each newly mounted child.
18833 var nextMountIndex = 0;
18834 var lastPlacedNode = null;
18835 for (name in nextChildren) {
18836 if (!nextChildren.hasOwnProperty(name)) {
18837 continue;
18838 }
18839 var prevChild = prevChildren && prevChildren[name];
18840 var nextChild = nextChildren[name];
18841 if (prevChild === nextChild) {
18842 updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex));
18843 lastIndex = Math.max(prevChild._mountIndex, lastIndex);
18844 prevChild._mountIndex = nextIndex;
18845 } else {
18846 if (prevChild) {
18847 // Update `lastIndex` before `_mountIndex` gets unset by unmounting.
18848 lastIndex = Math.max(prevChild._mountIndex, lastIndex);
18849 // The `removedNodes` loop below will actually remove the child.
18850 }
18851 // The child must be instantiated before it's mounted.
18852 updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context));
18853 nextMountIndex++;
18854 }
18855 nextIndex++;
18856 lastPlacedNode = ReactReconciler.getHostNode(nextChild);
18857 }
18858 // Remove children that are no longer present.
18859 for (name in removedNodes) {
18860 if (removedNodes.hasOwnProperty(name)) {
18861 updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name]));
18862 }
18863 }
18864 if (updates) {
18865 processQueue(this, updates);
18866 }
18867 this._renderedChildren = nextChildren;
18868
18869 if (process.env.NODE_ENV !== 'production') {
18870 setChildrenForInstrumentation.call(this, nextChildren);
18871 }
18872 },
18873
18874 /**
18875 * Unmounts all rendered children. This should be used to clean up children
18876 * when this component is unmounted. It does not actually perform any
18877 * backend operations.
18878 *
18879 * @internal
18880 */
18881 unmountChildren: function (safely) {
18882 var renderedChildren = this._renderedChildren;
18883 ReactChildReconciler.unmountChildren(renderedChildren, safely);
18884 this._renderedChildren = null;
18885 },
18886
18887 /**
18888 * Moves a child component to the supplied index.
18889 *
18890 * @param {ReactComponent} child Component to move.
18891 * @param {number} toIndex Destination index of the element.
18892 * @param {number} lastIndex Last index visited of the siblings of `child`.
18893 * @protected
18894 */
18895 moveChild: function (child, afterNode, toIndex, lastIndex) {
18896 // If the index of `child` is less than `lastIndex`, then it needs to
18897 // be moved. Otherwise, we do not need to move it because a child will be
18898 // inserted or moved before `child`.
18899 if (child._mountIndex < lastIndex) {
18900 return makeMove(child, afterNode, toIndex);
18901 }
18902 },
18903
18904 /**
18905 * Creates a child component.
18906 *
18907 * @param {ReactComponent} child Component to create.
18908 * @param {string} mountImage Markup to insert.
18909 * @protected
18910 */
18911 createChild: function (child, afterNode, mountImage) {
18912 return makeInsertMarkup(mountImage, afterNode, child._mountIndex);
18913 },
18914
18915 /**
18916 * Removes a child component.
18917 *
18918 * @param {ReactComponent} child Child to remove.
18919 * @protected
18920 */
18921 removeChild: function (child, node) {
18922 return makeRemove(child, node);
18923 },
18924
18925 /**
18926 * Mounts a child with the supplied name.
18927 *
18928 * NOTE: This is part of `updateChildren` and is here for readability.
18929 *
18930 * @param {ReactComponent} child Component to mount.
18931 * @param {string} name Name of the child.
18932 * @param {number} index Index at which to insert the child.
18933 * @param {ReactReconcileTransaction} transaction
18934 * @private
18935 */
18936 _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) {
18937 child._mountIndex = index;
18938 return this.createChild(child, afterNode, mountImage);
18939 },
18940
18941 /**
18942 * Unmounts a rendered child.
18943 *
18944 * NOTE: This is part of `updateChildren` and is here for readability.
18945 *
18946 * @param {ReactComponent} child Component to unmount.
18947 * @private
18948 */
18949 _unmountChild: function (child, node) {
18950 var update = this.removeChild(child, node);
18951 child._mountIndex = null;
18952 return update;
18953 }
18954 }
18955};
18956
18957module.exports = ReactMultiChild;
18958
18959/***/ }),
18960/* 155 */
18961/***/ (function(module, exports, __webpack_require__) {
18962
18963"use strict";
18964/**
18965 * Copyright (c) 2013-present, Facebook, Inc.
18966 *
18967 * This source code is licensed under the MIT license found in the
18968 * LICENSE file in the root directory of this source tree.
18969 *
18970 *
18971 */
18972
18973
18974
18975var _prodInvariant = __webpack_require__(2);
18976
18977var React = __webpack_require__(21);
18978
18979var invariant = __webpack_require__(0);
18980
18981var ReactNodeTypes = {
18982 HOST: 0,
18983 COMPOSITE: 1,
18984 EMPTY: 2,
18985
18986 getType: function (node) {
18987 if (node === null || node === false) {
18988 return ReactNodeTypes.EMPTY;
18989 } else if (React.isValidElement(node)) {
18990 if (typeof node.type === 'function') {
18991 return ReactNodeTypes.COMPOSITE;
18992 } else {
18993 return ReactNodeTypes.HOST;
18994 }
18995 }
18996 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0;
18997 }
18998};
18999
19000module.exports = ReactNodeTypes;
19001
19002/***/ }),
19003/* 156 */
19004/***/ (function(module, exports, __webpack_require__) {
19005
19006"use strict";
19007/**
19008 * Copyright (c) 2013-present, Facebook, Inc.
19009 *
19010 * This source code is licensed under the MIT license found in the
19011 * LICENSE file in the root directory of this source tree.
19012 *
19013 *
19014 */
19015
19016
19017
19018var _prodInvariant = __webpack_require__(2);
19019
19020var invariant = __webpack_require__(0);
19021
19022/**
19023 * @param {?object} object
19024 * @return {boolean} True if `object` is a valid owner.
19025 * @final
19026 */
19027function isValidOwner(object) {
19028 return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');
19029}
19030
19031/**
19032 * ReactOwners are capable of storing references to owned components.
19033 *
19034 * All components are capable of //being// referenced by owner components, but
19035 * only ReactOwner components are capable of //referencing// owned components.
19036 * The named reference is known as a "ref".
19037 *
19038 * Refs are available when mounted and updated during reconciliation.
19039 *
19040 * var MyComponent = React.createClass({
19041 * render: function() {
19042 * return (
19043 * <div onClick={this.handleClick}>
19044 * <CustomComponent ref="custom" />
19045 * </div>
19046 * );
19047 * },
19048 * handleClick: function() {
19049 * this.refs.custom.handleClick();
19050 * },
19051 * componentDidMount: function() {
19052 * this.refs.custom.initialize();
19053 * }
19054 * });
19055 *
19056 * Refs should rarely be used. When refs are used, they should only be done to
19057 * control data that is not handled by React's data flow.
19058 *
19059 * @class ReactOwner
19060 */
19061var ReactOwner = {
19062 /**
19063 * Adds a component by ref to an owner component.
19064 *
19065 * @param {ReactComponent} component Component to reference.
19066 * @param {string} ref Name by which to refer to the component.
19067 * @param {ReactOwner} owner Component on which to record the ref.
19068 * @final
19069 * @internal
19070 */
19071 addComponentAsRefTo: function (component, ref, owner) {
19072 !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;
19073 owner.attachRef(ref, component);
19074 },
19075
19076 /**
19077 * Removes a component by ref from an owner component.
19078 *
19079 * @param {ReactComponent} component Component to dereference.
19080 * @param {string} ref Name of the ref to remove.
19081 * @param {ReactOwner} owner Component on which the ref is recorded.
19082 * @final
19083 * @internal
19084 */
19085 removeComponentAsRefFrom: function (component, ref, owner) {
19086 !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;
19087 var ownerPublicInstance = owner.getPublicInstance();
19088 // Check that `component`'s owner is still alive and that `component` is still the current ref
19089 // because we do not want to detach the ref if another component stole it.
19090 if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) {
19091 owner.detachRef(ref);
19092 }
19093 }
19094};
19095
19096module.exports = ReactOwner;
19097
19098/***/ }),
19099/* 157 */
19100/***/ (function(module, exports, __webpack_require__) {
19101
19102"use strict";
19103/**
19104 * Copyright (c) 2013-present, Facebook, Inc.
19105 *
19106 * This source code is licensed under the MIT license found in the
19107 * LICENSE file in the root directory of this source tree.
19108 *
19109 *
19110 */
19111
19112
19113
19114var ReactPropTypeLocationNames = {};
19115
19116if (process.env.NODE_ENV !== 'production') {
19117 ReactPropTypeLocationNames = {
19118 prop: 'prop',
19119 context: 'context',
19120 childContext: 'child context'
19121 };
19122}
19123
19124module.exports = ReactPropTypeLocationNames;
19125
19126/***/ }),
19127/* 158 */
19128/***/ (function(module, exports, __webpack_require__) {
19129
19130"use strict";
19131/**
19132 * Copyright (c) 2013-present, Facebook, Inc.
19133 *
19134 * This source code is licensed under the MIT license found in the
19135 * LICENSE file in the root directory of this source tree.
19136 *
19137 */
19138
19139
19140
19141var _assign = __webpack_require__(3);
19142
19143var CallbackQueue = __webpack_require__(54);
19144var PooledClass = __webpack_require__(12);
19145var ReactBrowserEventEmitter = __webpack_require__(34);
19146var ReactInputSelection = __webpack_require__(61);
19147var ReactInstrumentation = __webpack_require__(7);
19148var Transaction = __webpack_require__(24);
19149var ReactUpdateQueue = __webpack_require__(64);
19150
19151/**
19152 * Ensures that, when possible, the selection range (currently selected text
19153 * input) is not disturbed by performing the transaction.
19154 */
19155var SELECTION_RESTORATION = {
19156 /**
19157 * @return {Selection} Selection information.
19158 */
19159 initialize: ReactInputSelection.getSelectionInformation,
19160 /**
19161 * @param {Selection} sel Selection information returned from `initialize`.
19162 */
19163 close: ReactInputSelection.restoreSelection
19164};
19165
19166/**
19167 * Suppresses events (blur/focus) that could be inadvertently dispatched due to
19168 * high level DOM manipulations (like temporarily removing a text input from the
19169 * DOM).
19170 */
19171var EVENT_SUPPRESSION = {
19172 /**
19173 * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before
19174 * the reconciliation.
19175 */
19176 initialize: function () {
19177 var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();
19178 ReactBrowserEventEmitter.setEnabled(false);
19179 return currentlyEnabled;
19180 },
19181
19182 /**
19183 * @param {boolean} previouslyEnabled Enabled status of
19184 * `ReactBrowserEventEmitter` before the reconciliation occurred. `close`
19185 * restores the previous value.
19186 */
19187 close: function (previouslyEnabled) {
19188 ReactBrowserEventEmitter.setEnabled(previouslyEnabled);
19189 }
19190};
19191
19192/**
19193 * Provides a queue for collecting `componentDidMount` and
19194 * `componentDidUpdate` callbacks during the transaction.
19195 */
19196var ON_DOM_READY_QUEUEING = {
19197 /**
19198 * Initializes the internal `onDOMReady` queue.
19199 */
19200 initialize: function () {
19201 this.reactMountReady.reset();
19202 },
19203
19204 /**
19205 * After DOM is flushed, invoke all registered `onDOMReady` callbacks.
19206 */
19207 close: function () {
19208 this.reactMountReady.notifyAll();
19209 }
19210};
19211
19212/**
19213 * Executed within the scope of the `Transaction` instance. Consider these as
19214 * being member methods, but with an implied ordering while being isolated from
19215 * each other.
19216 */
19217var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING];
19218
19219if (process.env.NODE_ENV !== 'production') {
19220 TRANSACTION_WRAPPERS.push({
19221 initialize: ReactInstrumentation.debugTool.onBeginFlush,
19222 close: ReactInstrumentation.debugTool.onEndFlush
19223 });
19224}
19225
19226/**
19227 * Currently:
19228 * - The order that these are listed in the transaction is critical:
19229 * - Suppresses events.
19230 * - Restores selection range.
19231 *
19232 * Future:
19233 * - Restore document/overflow scroll positions that were unintentionally
19234 * modified via DOM insertions above the top viewport boundary.
19235 * - Implement/integrate with customized constraint based layout system and keep
19236 * track of which dimensions must be remeasured.
19237 *
19238 * @class ReactReconcileTransaction
19239 */
19240function ReactReconcileTransaction(useCreateElement) {
19241 this.reinitializeTransaction();
19242 // Only server-side rendering really needs this option (see
19243 // `ReactServerRendering`), but server-side uses
19244 // `ReactServerRenderingTransaction` instead. This option is here so that it's
19245 // accessible and defaults to false when `ReactDOMComponent` and
19246 // `ReactDOMTextComponent` checks it in `mountComponent`.`
19247 this.renderToStaticMarkup = false;
19248 this.reactMountReady = CallbackQueue.getPooled(null);
19249 this.useCreateElement = useCreateElement;
19250}
19251
19252var Mixin = {
19253 /**
19254 * @see Transaction
19255 * @abstract
19256 * @final
19257 * @return {array<object>} List of operation wrap procedures.
19258 * TODO: convert to array<TransactionWrapper>
19259 */
19260 getTransactionWrappers: function () {
19261 return TRANSACTION_WRAPPERS;
19262 },
19263
19264 /**
19265 * @return {object} The queue to collect `onDOMReady` callbacks with.
19266 */
19267 getReactMountReady: function () {
19268 return this.reactMountReady;
19269 },
19270
19271 /**
19272 * @return {object} The queue to collect React async events.
19273 */
19274 getUpdateQueue: function () {
19275 return ReactUpdateQueue;
19276 },
19277
19278 /**
19279 * Save current transaction state -- if the return value from this method is
19280 * passed to `rollback`, the transaction will be reset to that state.
19281 */
19282 checkpoint: function () {
19283 // reactMountReady is the our only stateful wrapper
19284 return this.reactMountReady.checkpoint();
19285 },
19286
19287 rollback: function (checkpoint) {
19288 this.reactMountReady.rollback(checkpoint);
19289 },
19290
19291 /**
19292 * `PooledClass` looks for this, and will invoke this before allowing this
19293 * instance to be reused.
19294 */
19295 destructor: function () {
19296 CallbackQueue.release(this.reactMountReady);
19297 this.reactMountReady = null;
19298 }
19299};
19300
19301_assign(ReactReconcileTransaction.prototype, Transaction, Mixin);
19302
19303PooledClass.addPoolingTo(ReactReconcileTransaction);
19304
19305module.exports = ReactReconcileTransaction;
19306
19307/***/ }),
19308/* 159 */
19309/***/ (function(module, exports, __webpack_require__) {
19310
19311"use strict";
19312/**
19313 * Copyright (c) 2013-present, Facebook, Inc.
19314 *
19315 * This source code is licensed under the MIT license found in the
19316 * LICENSE file in the root directory of this source tree.
19317 *
19318 *
19319 */
19320
19321
19322
19323var ReactOwner = __webpack_require__(156);
19324
19325var ReactRef = {};
19326
19327function attachRef(ref, component, owner) {
19328 if (typeof ref === 'function') {
19329 ref(component.getPublicInstance());
19330 } else {
19331 // Legacy ref
19332 ReactOwner.addComponentAsRefTo(component, ref, owner);
19333 }
19334}
19335
19336function detachRef(ref, component, owner) {
19337 if (typeof ref === 'function') {
19338 ref(null);
19339 } else {
19340 // Legacy ref
19341 ReactOwner.removeComponentAsRefFrom(component, ref, owner);
19342 }
19343}
19344
19345ReactRef.attachRefs = function (instance, element) {
19346 if (element === null || typeof element !== 'object') {
19347 return;
19348 }
19349 var ref = element.ref;
19350 if (ref != null) {
19351 attachRef(ref, instance, element._owner);
19352 }
19353};
19354
19355ReactRef.shouldUpdateRefs = function (prevElement, nextElement) {
19356 // If either the owner or a `ref` has changed, make sure the newest owner
19357 // has stored a reference to `this`, and the previous owner (if different)
19358 // has forgotten the reference to `this`. We use the element instead
19359 // of the public this.props because the post processing cannot determine
19360 // a ref. The ref conceptually lives on the element.
19361
19362 // TODO: Should this even be possible? The owner cannot change because
19363 // it's forbidden by shouldUpdateReactComponent. The ref can change
19364 // if you swap the keys of but not the refs. Reconsider where this check
19365 // is made. It probably belongs where the key checking and
19366 // instantiateReactComponent is done.
19367
19368 var prevRef = null;
19369 var prevOwner = null;
19370 if (prevElement !== null && typeof prevElement === 'object') {
19371 prevRef = prevElement.ref;
19372 prevOwner = prevElement._owner;
19373 }
19374
19375 var nextRef = null;
19376 var nextOwner = null;
19377 if (nextElement !== null && typeof nextElement === 'object') {
19378 nextRef = nextElement.ref;
19379 nextOwner = nextElement._owner;
19380 }
19381
19382 return prevRef !== nextRef ||
19383 // If owner changes but we have an unchanged function ref, don't update refs
19384 typeof nextRef === 'string' && nextOwner !== prevOwner;
19385};
19386
19387ReactRef.detachRefs = function (instance, element) {
19388 if (element === null || typeof element !== 'object') {
19389 return;
19390 }
19391 var ref = element.ref;
19392 if (ref != null) {
19393 detachRef(ref, instance, element._owner);
19394 }
19395};
19396
19397module.exports = ReactRef;
19398
19399/***/ }),
19400/* 160 */
19401/***/ (function(module, exports, __webpack_require__) {
19402
19403"use strict";
19404/**
19405 * Copyright (c) 2014-present, Facebook, Inc.
19406 *
19407 * This source code is licensed under the MIT license found in the
19408 * LICENSE file in the root directory of this source tree.
19409 *
19410 */
19411
19412
19413
19414var ReactServerBatchingStrategy = {
19415 isBatchingUpdates: false,
19416 batchedUpdates: function (callback) {
19417 // Don't do anything here. During the server rendering we don't want to
19418 // schedule any updates. We will simply ignore them.
19419 }
19420};
19421
19422module.exports = ReactServerBatchingStrategy;
19423
19424/***/ }),
19425/* 161 */
19426/***/ (function(module, exports, __webpack_require__) {
19427
19428"use strict";
19429/**
19430 * Copyright (c) 2013-present, Facebook, Inc.
19431 *
19432 * This source code is licensed under the MIT license found in the
19433 * LICENSE file in the root directory of this source tree.
19434 *
19435 */
19436
19437
19438var _prodInvariant = __webpack_require__(2);
19439
19440var React = __webpack_require__(21);
19441var ReactDOMContainerInfo = __webpack_require__(134);
19442var ReactDefaultBatchingStrategy = __webpack_require__(58);
19443var ReactInstrumentation = __webpack_require__(7);
19444var ReactMarkupChecksum = __webpack_require__(153);
19445var ReactReconciler = __webpack_require__(19);
19446var ReactServerBatchingStrategy = __webpack_require__(160);
19447var ReactServerRenderingTransaction = __webpack_require__(63);
19448var ReactUpdates = __webpack_require__(9);
19449
19450var emptyObject = __webpack_require__(22);
19451var instantiateReactComponent = __webpack_require__(70);
19452var invariant = __webpack_require__(0);
19453
19454var pendingTransactions = 0;
19455
19456/**
19457 * @param {ReactElement} element
19458 * @return {string} the HTML markup
19459 */
19460function renderToStringImpl(element, makeStaticMarkup) {
19461 var transaction;
19462 try {
19463 ReactUpdates.injection.injectBatchingStrategy(ReactServerBatchingStrategy);
19464
19465 transaction = ReactServerRenderingTransaction.getPooled(makeStaticMarkup);
19466
19467 pendingTransactions++;
19468
19469 return transaction.perform(function () {
19470 var componentInstance = instantiateReactComponent(element, true);
19471 var markup = ReactReconciler.mountComponent(componentInstance, transaction, null, ReactDOMContainerInfo(), emptyObject, 0 /* parentDebugID */
19472 );
19473 if (process.env.NODE_ENV !== 'production') {
19474 ReactInstrumentation.debugTool.onUnmountComponent(componentInstance._debugID);
19475 }
19476 if (!makeStaticMarkup) {
19477 markup = ReactMarkupChecksum.addChecksumToMarkup(markup);
19478 }
19479 return markup;
19480 }, null);
19481 } finally {
19482 pendingTransactions--;
19483 ReactServerRenderingTransaction.release(transaction);
19484 // Revert to the DOM batching strategy since these two renderers
19485 // currently share these stateful modules.
19486 if (!pendingTransactions) {
19487 ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy);
19488 }
19489 }
19490}
19491
19492/**
19493 * Render a ReactElement to its initial HTML. This should only be used on the
19494 * server.
19495 * See https://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostring
19496 */
19497function renderToString(element) {
19498 !React.isValidElement(element) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'renderToString(): You must pass a valid ReactElement.') : _prodInvariant('46') : void 0;
19499 return renderToStringImpl(element, false);
19500}
19501
19502/**
19503 * Similar to renderToString, except this doesn't create extra DOM attributes
19504 * such as data-react-id that React uses internally.
19505 * See https://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostaticmarkup
19506 */
19507function renderToStaticMarkup(element) {
19508 !React.isValidElement(element) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'renderToStaticMarkup(): You must pass a valid ReactElement.') : _prodInvariant('47') : void 0;
19509 return renderToStringImpl(element, true);
19510}
19511
19512module.exports = {
19513 renderToString: renderToString,
19514 renderToStaticMarkup: renderToStaticMarkup
19515};
19516
19517/***/ }),
19518/* 162 */
19519/***/ (function(module, exports, __webpack_require__) {
19520
19521"use strict";
19522/**
19523 * Copyright (c) 2015-present, Facebook, Inc.
19524 *
19525 * This source code is licensed under the MIT license found in the
19526 * LICENSE file in the root directory of this source tree.
19527 *
19528 *
19529 */
19530
19531
19532
19533function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19534
19535var ReactUpdateQueue = __webpack_require__(64);
19536
19537var warning = __webpack_require__(1);
19538
19539function warnNoop(publicInstance, callerName) {
19540 if (process.env.NODE_ENV !== 'production') {
19541 var constructor = publicInstance.constructor;
19542 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;
19543 }
19544}
19545
19546/**
19547 * This is the update queue used for server rendering.
19548 * It delegates to ReactUpdateQueue while server rendering is in progress and
19549 * switches to ReactNoopUpdateQueue after the transaction has completed.
19550 * @class ReactServerUpdateQueue
19551 * @param {Transaction} transaction
19552 */
19553
19554var ReactServerUpdateQueue = function () {
19555 function ReactServerUpdateQueue(transaction) {
19556 _classCallCheck(this, ReactServerUpdateQueue);
19557
19558 this.transaction = transaction;
19559 }
19560
19561 /**
19562 * Checks whether or not this composite component is mounted.
19563 * @param {ReactClass} publicInstance The instance we want to test.
19564 * @return {boolean} True if mounted, false otherwise.
19565 * @protected
19566 * @final
19567 */
19568
19569
19570 ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) {
19571 return false;
19572 };
19573
19574 /**
19575 * Enqueue a callback that will be executed after all the pending updates
19576 * have processed.
19577 *
19578 * @param {ReactClass} publicInstance The instance to use as `this` context.
19579 * @param {?function} callback Called after state is updated.
19580 * @internal
19581 */
19582
19583
19584 ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) {
19585 if (this.transaction.isInTransaction()) {
19586 ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName);
19587 }
19588 };
19589
19590 /**
19591 * Forces an update. This should only be invoked when it is known with
19592 * certainty that we are **not** in a DOM transaction.
19593 *
19594 * You may want to call this when you know that some deeper aspect of the
19595 * component's state has changed but `setState` was not called.
19596 *
19597 * This will not invoke `shouldComponentUpdate`, but it will invoke
19598 * `componentWillUpdate` and `componentDidUpdate`.
19599 *
19600 * @param {ReactClass} publicInstance The instance that should rerender.
19601 * @internal
19602 */
19603
19604
19605 ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) {
19606 if (this.transaction.isInTransaction()) {
19607 ReactUpdateQueue.enqueueForceUpdate(publicInstance);
19608 } else {
19609 warnNoop(publicInstance, 'forceUpdate');
19610 }
19611 };
19612
19613 /**
19614 * Replaces all of the state. Always use this or `setState` to mutate state.
19615 * You should treat `this.state` as immutable.
19616 *
19617 * There is no guarantee that `this.state` will be immediately updated, so
19618 * accessing `this.state` after calling this method may return the old value.
19619 *
19620 * @param {ReactClass} publicInstance The instance that should rerender.
19621 * @param {object|function} completeState Next state.
19622 * @internal
19623 */
19624
19625
19626 ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) {
19627 if (this.transaction.isInTransaction()) {
19628 ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState);
19629 } else {
19630 warnNoop(publicInstance, 'replaceState');
19631 }
19632 };
19633
19634 /**
19635 * Sets a subset of the state. This only exists because _pendingState is
19636 * internal. This provides a merging strategy that is not available to deep
19637 * properties which is confusing. TODO: Expose pendingState or don't use it
19638 * during the merge.
19639 *
19640 * @param {ReactClass} publicInstance The instance that should rerender.
19641 * @param {object|function} partialState Next partial state to be merged with state.
19642 * @internal
19643 */
19644
19645
19646 ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) {
19647 if (this.transaction.isInTransaction()) {
19648 ReactUpdateQueue.enqueueSetState(publicInstance, partialState);
19649 } else {
19650 warnNoop(publicInstance, 'setState');
19651 }
19652 };
19653
19654 return ReactServerUpdateQueue;
19655}();
19656
19657module.exports = ReactServerUpdateQueue;
19658
19659/***/ }),
19660/* 163 */
19661/***/ (function(module, exports, __webpack_require__) {
19662
19663"use strict";
19664/**
19665 * Copyright (c) 2013-present, Facebook, Inc.
19666 *
19667 * This source code is licensed under the MIT license found in the
19668 * LICENSE file in the root directory of this source tree.
19669 *
19670 */
19671
19672
19673
19674module.exports = '15.6.2';
19675
19676/***/ }),
19677/* 164 */
19678/***/ (function(module, exports, __webpack_require__) {
19679
19680"use strict";
19681/**
19682 * Copyright (c) 2013-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 NS = {
19692 xlink: 'http://www.w3.org/1999/xlink',
19693 xml: 'http://www.w3.org/XML/1998/namespace'
19694};
19695
19696// We use attributes for everything SVG so let's avoid some duplication and run
19697// code instead.
19698// The following are all specified in the HTML config already so we exclude here.
19699// - class (as className)
19700// - color
19701// - height
19702// - id
19703// - lang
19704// - max
19705// - media
19706// - method
19707// - min
19708// - name
19709// - style
19710// - target
19711// - type
19712// - width
19713var ATTRS = {
19714 accentHeight: 'accent-height',
19715 accumulate: 0,
19716 additive: 0,
19717 alignmentBaseline: 'alignment-baseline',
19718 allowReorder: 'allowReorder',
19719 alphabetic: 0,
19720 amplitude: 0,
19721 arabicForm: 'arabic-form',
19722 ascent: 0,
19723 attributeName: 'attributeName',
19724 attributeType: 'attributeType',
19725 autoReverse: 'autoReverse',
19726 azimuth: 0,
19727 baseFrequency: 'baseFrequency',
19728 baseProfile: 'baseProfile',
19729 baselineShift: 'baseline-shift',
19730 bbox: 0,
19731 begin: 0,
19732 bias: 0,
19733 by: 0,
19734 calcMode: 'calcMode',
19735 capHeight: 'cap-height',
19736 clip: 0,
19737 clipPath: 'clip-path',
19738 clipRule: 'clip-rule',
19739 clipPathUnits: 'clipPathUnits',
19740 colorInterpolation: 'color-interpolation',
19741 colorInterpolationFilters: 'color-interpolation-filters',
19742 colorProfile: 'color-profile',
19743 colorRendering: 'color-rendering',
19744 contentScriptType: 'contentScriptType',
19745 contentStyleType: 'contentStyleType',
19746 cursor: 0,
19747 cx: 0,
19748 cy: 0,
19749 d: 0,
19750 decelerate: 0,
19751 descent: 0,
19752 diffuseConstant: 'diffuseConstant',
19753 direction: 0,
19754 display: 0,
19755 divisor: 0,
19756 dominantBaseline: 'dominant-baseline',
19757 dur: 0,
19758 dx: 0,
19759 dy: 0,
19760 edgeMode: 'edgeMode',
19761 elevation: 0,
19762 enableBackground: 'enable-background',
19763 end: 0,
19764 exponent: 0,
19765 externalResourcesRequired: 'externalResourcesRequired',
19766 fill: 0,
19767 fillOpacity: 'fill-opacity',
19768 fillRule: 'fill-rule',
19769 filter: 0,
19770 filterRes: 'filterRes',
19771 filterUnits: 'filterUnits',
19772 floodColor: 'flood-color',
19773 floodOpacity: 'flood-opacity',
19774 focusable: 0,
19775 fontFamily: 'font-family',
19776 fontSize: 'font-size',
19777 fontSizeAdjust: 'font-size-adjust',
19778 fontStretch: 'font-stretch',
19779 fontStyle: 'font-style',
19780 fontVariant: 'font-variant',
19781 fontWeight: 'font-weight',
19782 format: 0,
19783 from: 0,
19784 fx: 0,
19785 fy: 0,
19786 g1: 0,
19787 g2: 0,
19788 glyphName: 'glyph-name',
19789 glyphOrientationHorizontal: 'glyph-orientation-horizontal',
19790 glyphOrientationVertical: 'glyph-orientation-vertical',
19791 glyphRef: 'glyphRef',
19792 gradientTransform: 'gradientTransform',
19793 gradientUnits: 'gradientUnits',
19794 hanging: 0,
19795 horizAdvX: 'horiz-adv-x',
19796 horizOriginX: 'horiz-origin-x',
19797 ideographic: 0,
19798 imageRendering: 'image-rendering',
19799 'in': 0,
19800 in2: 0,
19801 intercept: 0,
19802 k: 0,
19803 k1: 0,
19804 k2: 0,
19805 k3: 0,
19806 k4: 0,
19807 kernelMatrix: 'kernelMatrix',
19808 kernelUnitLength: 'kernelUnitLength',
19809 kerning: 0,
19810 keyPoints: 'keyPoints',
19811 keySplines: 'keySplines',
19812 keyTimes: 'keyTimes',
19813 lengthAdjust: 'lengthAdjust',
19814 letterSpacing: 'letter-spacing',
19815 lightingColor: 'lighting-color',
19816 limitingConeAngle: 'limitingConeAngle',
19817 local: 0,
19818 markerEnd: 'marker-end',
19819 markerMid: 'marker-mid',
19820 markerStart: 'marker-start',
19821 markerHeight: 'markerHeight',
19822 markerUnits: 'markerUnits',
19823 markerWidth: 'markerWidth',
19824 mask: 0,
19825 maskContentUnits: 'maskContentUnits',
19826 maskUnits: 'maskUnits',
19827 mathematical: 0,
19828 mode: 0,
19829 numOctaves: 'numOctaves',
19830 offset: 0,
19831 opacity: 0,
19832 operator: 0,
19833 order: 0,
19834 orient: 0,
19835 orientation: 0,
19836 origin: 0,
19837 overflow: 0,
19838 overlinePosition: 'overline-position',
19839 overlineThickness: 'overline-thickness',
19840 paintOrder: 'paint-order',
19841 panose1: 'panose-1',
19842 pathLength: 'pathLength',
19843 patternContentUnits: 'patternContentUnits',
19844 patternTransform: 'patternTransform',
19845 patternUnits: 'patternUnits',
19846 pointerEvents: 'pointer-events',
19847 points: 0,
19848 pointsAtX: 'pointsAtX',
19849 pointsAtY: 'pointsAtY',
19850 pointsAtZ: 'pointsAtZ',
19851 preserveAlpha: 'preserveAlpha',
19852 preserveAspectRatio: 'preserveAspectRatio',
19853 primitiveUnits: 'primitiveUnits',
19854 r: 0,
19855 radius: 0,
19856 refX: 'refX',
19857 refY: 'refY',
19858 renderingIntent: 'rendering-intent',
19859 repeatCount: 'repeatCount',
19860 repeatDur: 'repeatDur',
19861 requiredExtensions: 'requiredExtensions',
19862 requiredFeatures: 'requiredFeatures',
19863 restart: 0,
19864 result: 0,
19865 rotate: 0,
19866 rx: 0,
19867 ry: 0,
19868 scale: 0,
19869 seed: 0,
19870 shapeRendering: 'shape-rendering',
19871 slope: 0,
19872 spacing: 0,
19873 specularConstant: 'specularConstant',
19874 specularExponent: 'specularExponent',
19875 speed: 0,
19876 spreadMethod: 'spreadMethod',
19877 startOffset: 'startOffset',
19878 stdDeviation: 'stdDeviation',
19879 stemh: 0,
19880 stemv: 0,
19881 stitchTiles: 'stitchTiles',
19882 stopColor: 'stop-color',
19883 stopOpacity: 'stop-opacity',
19884 strikethroughPosition: 'strikethrough-position',
19885 strikethroughThickness: 'strikethrough-thickness',
19886 string: 0,
19887 stroke: 0,
19888 strokeDasharray: 'stroke-dasharray',
19889 strokeDashoffset: 'stroke-dashoffset',
19890 strokeLinecap: 'stroke-linecap',
19891 strokeLinejoin: 'stroke-linejoin',
19892 strokeMiterlimit: 'stroke-miterlimit',
19893 strokeOpacity: 'stroke-opacity',
19894 strokeWidth: 'stroke-width',
19895 surfaceScale: 'surfaceScale',
19896 systemLanguage: 'systemLanguage',
19897 tableValues: 'tableValues',
19898 targetX: 'targetX',
19899 targetY: 'targetY',
19900 textAnchor: 'text-anchor',
19901 textDecoration: 'text-decoration',
19902 textRendering: 'text-rendering',
19903 textLength: 'textLength',
19904 to: 0,
19905 transform: 0,
19906 u1: 0,
19907 u2: 0,
19908 underlinePosition: 'underline-position',
19909 underlineThickness: 'underline-thickness',
19910 unicode: 0,
19911 unicodeBidi: 'unicode-bidi',
19912 unicodeRange: 'unicode-range',
19913 unitsPerEm: 'units-per-em',
19914 vAlphabetic: 'v-alphabetic',
19915 vHanging: 'v-hanging',
19916 vIdeographic: 'v-ideographic',
19917 vMathematical: 'v-mathematical',
19918 values: 0,
19919 vectorEffect: 'vector-effect',
19920 version: 0,
19921 vertAdvY: 'vert-adv-y',
19922 vertOriginX: 'vert-origin-x',
19923 vertOriginY: 'vert-origin-y',
19924 viewBox: 'viewBox',
19925 viewTarget: 'viewTarget',
19926 visibility: 0,
19927 widths: 0,
19928 wordSpacing: 'word-spacing',
19929 writingMode: 'writing-mode',
19930 x: 0,
19931 xHeight: 'x-height',
19932 x1: 0,
19933 x2: 0,
19934 xChannelSelector: 'xChannelSelector',
19935 xlinkActuate: 'xlink:actuate',
19936 xlinkArcrole: 'xlink:arcrole',
19937 xlinkHref: 'xlink:href',
19938 xlinkRole: 'xlink:role',
19939 xlinkShow: 'xlink:show',
19940 xlinkTitle: 'xlink:title',
19941 xlinkType: 'xlink:type',
19942 xmlBase: 'xml:base',
19943 xmlns: 0,
19944 xmlnsXlink: 'xmlns:xlink',
19945 xmlLang: 'xml:lang',
19946 xmlSpace: 'xml:space',
19947 y: 0,
19948 y1: 0,
19949 y2: 0,
19950 yChannelSelector: 'yChannelSelector',
19951 z: 0,
19952 zoomAndPan: 'zoomAndPan'
19953};
19954
19955var SVGDOMPropertyConfig = {
19956 Properties: {},
19957 DOMAttributeNamespaces: {
19958 xlinkActuate: NS.xlink,
19959 xlinkArcrole: NS.xlink,
19960 xlinkHref: NS.xlink,
19961 xlinkRole: NS.xlink,
19962 xlinkShow: NS.xlink,
19963 xlinkTitle: NS.xlink,
19964 xlinkType: NS.xlink,
19965 xmlBase: NS.xml,
19966 xmlLang: NS.xml,
19967 xmlSpace: NS.xml
19968 },
19969 DOMAttributeNames: {}
19970};
19971
19972Object.keys(ATTRS).forEach(function (key) {
19973 SVGDOMPropertyConfig.Properties[key] = 0;
19974 if (ATTRS[key]) {
19975 SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key];
19976 }
19977});
19978
19979module.exports = SVGDOMPropertyConfig;
19980
19981/***/ }),
19982/* 165 */
19983/***/ (function(module, exports, __webpack_require__) {
19984
19985"use strict";
19986/**
19987 * Copyright (c) 2013-present, Facebook, Inc.
19988 *
19989 * This source code is licensed under the MIT license found in the
19990 * LICENSE file in the root directory of this source tree.
19991 *
19992 */
19993
19994
19995
19996var EventPropagators = __webpack_require__(18);
19997var ExecutionEnvironment = __webpack_require__(5);
19998var ReactDOMComponentTree = __webpack_require__(4);
19999var ReactInputSelection = __webpack_require__(61);
20000var SyntheticEvent = __webpack_require__(10);
20001
20002var getActiveElement = __webpack_require__(50);
20003var isTextInputElement = __webpack_require__(71);
20004var shallowEqual = __webpack_require__(27);
20005
20006var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;
20007
20008var eventTypes = {
20009 select: {
20010 phasedRegistrationNames: {
20011 bubbled: 'onSelect',
20012 captured: 'onSelectCapture'
20013 },
20014 dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange']
20015 }
20016};
20017
20018var activeElement = null;
20019var activeElementInst = null;
20020var lastSelection = null;
20021var mouseDown = false;
20022
20023// Track whether a listener exists for this plugin. If none exist, we do
20024// not extract events. See #3639.
20025var hasListener = false;
20026
20027/**
20028 * Get an object which is a unique representation of the current selection.
20029 *
20030 * The return value will not be consistent across nodes or browsers, but
20031 * two identical selections on the same node will return identical objects.
20032 *
20033 * @param {DOMElement} node
20034 * @return {object}
20035 */
20036function getSelection(node) {
20037 if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) {
20038 return {
20039 start: node.selectionStart,
20040 end: node.selectionEnd
20041 };
20042 } else if (window.getSelection) {
20043 var selection = window.getSelection();
20044 return {
20045 anchorNode: selection.anchorNode,
20046 anchorOffset: selection.anchorOffset,
20047 focusNode: selection.focusNode,
20048 focusOffset: selection.focusOffset
20049 };
20050 } else if (document.selection) {
20051 var range = document.selection.createRange();
20052 return {
20053 parentElement: range.parentElement(),
20054 text: range.text,
20055 top: range.boundingTop,
20056 left: range.boundingLeft
20057 };
20058 }
20059}
20060
20061/**
20062 * Poll selection to see whether it's changed.
20063 *
20064 * @param {object} nativeEvent
20065 * @return {?SyntheticEvent}
20066 */
20067function constructSelectEvent(nativeEvent, nativeEventTarget) {
20068 // Ensure we have the right element, and that the user is not dragging a
20069 // selection (this matches native `select` event behavior). In HTML5, select
20070 // fires only on input and textarea thus if there's no focused element we
20071 // won't dispatch.
20072 if (mouseDown || activeElement == null || activeElement !== getActiveElement()) {
20073 return null;
20074 }
20075
20076 // Only fire when selection has actually changed.
20077 var currentSelection = getSelection(activeElement);
20078 if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
20079 lastSelection = currentSelection;
20080
20081 var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget);
20082
20083 syntheticEvent.type = 'select';
20084 syntheticEvent.target = activeElement;
20085
20086 EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);
20087
20088 return syntheticEvent;
20089 }
20090
20091 return null;
20092}
20093
20094/**
20095 * This plugin creates an `onSelect` event that normalizes select events
20096 * across form elements.
20097 *
20098 * Supported elements are:
20099 * - input (see `isTextInputElement`)
20100 * - textarea
20101 * - contentEditable
20102 *
20103 * This differs from native browser implementations in the following ways:
20104 * - Fires on contentEditable fields as well as inputs.
20105 * - Fires for collapsed selection.
20106 * - Fires after user input.
20107 */
20108var SelectEventPlugin = {
20109 eventTypes: eventTypes,
20110
20111 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
20112 if (!hasListener) {
20113 return null;
20114 }
20115
20116 var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
20117
20118 switch (topLevelType) {
20119 // Track the input node that has focus.
20120 case 'topFocus':
20121 if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
20122 activeElement = targetNode;
20123 activeElementInst = targetInst;
20124 lastSelection = null;
20125 }
20126 break;
20127 case 'topBlur':
20128 activeElement = null;
20129 activeElementInst = null;
20130 lastSelection = null;
20131 break;
20132 // Don't fire the event while the user is dragging. This matches the
20133 // semantics of the native select event.
20134 case 'topMouseDown':
20135 mouseDown = true;
20136 break;
20137 case 'topContextMenu':
20138 case 'topMouseUp':
20139 mouseDown = false;
20140 return constructSelectEvent(nativeEvent, nativeEventTarget);
20141 // Chrome and IE fire non-standard event when selection is changed (and
20142 // sometimes when it hasn't). IE's event fires out of order with respect
20143 // to key and input events on deletion, so we discard it.
20144 //
20145 // Firefox doesn't support selectionchange, so check selection status
20146 // after each key entry. The selection changes after keydown and before
20147 // keyup, but we check on keydown as well in the case of holding down a
20148 // key, when multiple keydown events are fired but only one keyup is.
20149 // This is also our approach for IE handling, for the reason above.
20150 case 'topSelectionChange':
20151 if (skipSelectionChangeEvent) {
20152 break;
20153 }
20154 // falls through
20155 case 'topKeyDown':
20156 case 'topKeyUp':
20157 return constructSelectEvent(nativeEvent, nativeEventTarget);
20158 }
20159
20160 return null;
20161 },
20162
20163 didPutListener: function (inst, registrationName, listener) {
20164 if (registrationName === 'onSelect') {
20165 hasListener = true;
20166 }
20167 }
20168};
20169
20170module.exports = SelectEventPlugin;
20171
20172/***/ }),
20173/* 166 */
20174/***/ (function(module, exports, __webpack_require__) {
20175
20176"use strict";
20177/**
20178 * Copyright (c) 2013-present, Facebook, Inc.
20179 *
20180 * This source code is licensed under the MIT license found in the
20181 * LICENSE file in the root directory of this source tree.
20182 *
20183 *
20184 */
20185
20186
20187
20188var _prodInvariant = __webpack_require__(2);
20189
20190var EventListener = __webpack_require__(48);
20191var EventPropagators = __webpack_require__(18);
20192var ReactDOMComponentTree = __webpack_require__(4);
20193var SyntheticAnimationEvent = __webpack_require__(167);
20194var SyntheticClipboardEvent = __webpack_require__(168);
20195var SyntheticEvent = __webpack_require__(10);
20196var SyntheticFocusEvent = __webpack_require__(171);
20197var SyntheticKeyboardEvent = __webpack_require__(173);
20198var SyntheticMouseEvent = __webpack_require__(23);
20199var SyntheticDragEvent = __webpack_require__(170);
20200var SyntheticTouchEvent = __webpack_require__(174);
20201var SyntheticTransitionEvent = __webpack_require__(175);
20202var SyntheticUIEvent = __webpack_require__(20);
20203var SyntheticWheelEvent = __webpack_require__(176);
20204
20205var emptyFunction = __webpack_require__(6);
20206var getEventCharCode = __webpack_require__(39);
20207var invariant = __webpack_require__(0);
20208
20209/**
20210 * Turns
20211 * ['abort', ...]
20212 * into
20213 * eventTypes = {
20214 * 'abort': {
20215 * phasedRegistrationNames: {
20216 * bubbled: 'onAbort',
20217 * captured: 'onAbortCapture',
20218 * },
20219 * dependencies: ['topAbort'],
20220 * },
20221 * ...
20222 * };
20223 * topLevelEventsToDispatchConfig = {
20224 * 'topAbort': { sameConfig }
20225 * };
20226 */
20227var eventTypes = {};
20228var topLevelEventsToDispatchConfig = {};
20229['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) {
20230 var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
20231 var onEvent = 'on' + capitalizedEvent;
20232 var topEvent = 'top' + capitalizedEvent;
20233
20234 var type = {
20235 phasedRegistrationNames: {
20236 bubbled: onEvent,
20237 captured: onEvent + 'Capture'
20238 },
20239 dependencies: [topEvent]
20240 };
20241 eventTypes[event] = type;
20242 topLevelEventsToDispatchConfig[topEvent] = type;
20243});
20244
20245var onClickListeners = {};
20246
20247function getDictionaryKey(inst) {
20248 // Prevents V8 performance issue:
20249 // https://github.com/facebook/react/pull/7232
20250 return '.' + inst._rootNodeID;
20251}
20252
20253function isInteractive(tag) {
20254 return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
20255}
20256
20257var SimpleEventPlugin = {
20258 eventTypes: eventTypes,
20259
20260 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
20261 var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
20262 if (!dispatchConfig) {
20263 return null;
20264 }
20265 var EventConstructor;
20266 switch (topLevelType) {
20267 case 'topAbort':
20268 case 'topCanPlay':
20269 case 'topCanPlayThrough':
20270 case 'topDurationChange':
20271 case 'topEmptied':
20272 case 'topEncrypted':
20273 case 'topEnded':
20274 case 'topError':
20275 case 'topInput':
20276 case 'topInvalid':
20277 case 'topLoad':
20278 case 'topLoadedData':
20279 case 'topLoadedMetadata':
20280 case 'topLoadStart':
20281 case 'topPause':
20282 case 'topPlay':
20283 case 'topPlaying':
20284 case 'topProgress':
20285 case 'topRateChange':
20286 case 'topReset':
20287 case 'topSeeked':
20288 case 'topSeeking':
20289 case 'topStalled':
20290 case 'topSubmit':
20291 case 'topSuspend':
20292 case 'topTimeUpdate':
20293 case 'topVolumeChange':
20294 case 'topWaiting':
20295 // HTML Events
20296 // @see http://www.w3.org/TR/html5/index.html#events-0
20297 EventConstructor = SyntheticEvent;
20298 break;
20299 case 'topKeyPress':
20300 // Firefox creates a keypress event for function keys too. This removes
20301 // the unwanted keypress events. Enter is however both printable and
20302 // non-printable. One would expect Tab to be as well (but it isn't).
20303 if (getEventCharCode(nativeEvent) === 0) {
20304 return null;
20305 }
20306 /* falls through */
20307 case 'topKeyDown':
20308 case 'topKeyUp':
20309 EventConstructor = SyntheticKeyboardEvent;
20310 break;
20311 case 'topBlur':
20312 case 'topFocus':
20313 EventConstructor = SyntheticFocusEvent;
20314 break;
20315 case 'topClick':
20316 // Firefox creates a click event on right mouse clicks. This removes the
20317 // unwanted click events.
20318 if (nativeEvent.button === 2) {
20319 return null;
20320 }
20321 /* falls through */
20322 case 'topDoubleClick':
20323 case 'topMouseDown':
20324 case 'topMouseMove':
20325 case 'topMouseUp':
20326 // TODO: Disabled elements should not respond to mouse events
20327 /* falls through */
20328 case 'topMouseOut':
20329 case 'topMouseOver':
20330 case 'topContextMenu':
20331 EventConstructor = SyntheticMouseEvent;
20332 break;
20333 case 'topDrag':
20334 case 'topDragEnd':
20335 case 'topDragEnter':
20336 case 'topDragExit':
20337 case 'topDragLeave':
20338 case 'topDragOver':
20339 case 'topDragStart':
20340 case 'topDrop':
20341 EventConstructor = SyntheticDragEvent;
20342 break;
20343 case 'topTouchCancel':
20344 case 'topTouchEnd':
20345 case 'topTouchMove':
20346 case 'topTouchStart':
20347 EventConstructor = SyntheticTouchEvent;
20348 break;
20349 case 'topAnimationEnd':
20350 case 'topAnimationIteration':
20351 case 'topAnimationStart':
20352 EventConstructor = SyntheticAnimationEvent;
20353 break;
20354 case 'topTransitionEnd':
20355 EventConstructor = SyntheticTransitionEvent;
20356 break;
20357 case 'topScroll':
20358 EventConstructor = SyntheticUIEvent;
20359 break;
20360 case 'topWheel':
20361 EventConstructor = SyntheticWheelEvent;
20362 break;
20363 case 'topCopy':
20364 case 'topCut':
20365 case 'topPaste':
20366 EventConstructor = SyntheticClipboardEvent;
20367 break;
20368 }
20369 !EventConstructor ? process.env.NODE_ENV !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0;
20370 var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
20371 EventPropagators.accumulateTwoPhaseDispatches(event);
20372 return event;
20373 },
20374
20375 didPutListener: function (inst, registrationName, listener) {
20376 // Mobile Safari does not fire properly bubble click events on
20377 // non-interactive elements, which means delegated click listeners do not
20378 // fire. The workaround for this bug involves attaching an empty click
20379 // listener on the target node.
20380 // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
20381 if (registrationName === 'onClick' && !isInteractive(inst._tag)) {
20382 var key = getDictionaryKey(inst);
20383 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
20384 if (!onClickListeners[key]) {
20385 onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction);
20386 }
20387 }
20388 },
20389
20390 willDeleteListener: function (inst, registrationName) {
20391 if (registrationName === 'onClick' && !isInteractive(inst._tag)) {
20392 var key = getDictionaryKey(inst);
20393 onClickListeners[key].remove();
20394 delete onClickListeners[key];
20395 }
20396 }
20397};
20398
20399module.exports = SimpleEventPlugin;
20400
20401/***/ }),
20402/* 167 */
20403/***/ (function(module, exports, __webpack_require__) {
20404
20405"use strict";
20406/**
20407 * Copyright (c) 2013-present, Facebook, Inc.
20408 *
20409 * This source code is licensed under the MIT license found in the
20410 * LICENSE file in the root directory of this source tree.
20411 *
20412 */
20413
20414
20415
20416var SyntheticEvent = __webpack_require__(10);
20417
20418/**
20419 * @interface Event
20420 * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
20421 * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
20422 */
20423var AnimationEventInterface = {
20424 animationName: null,
20425 elapsedTime: null,
20426 pseudoElement: null
20427};
20428
20429/**
20430 * @param {object} dispatchConfig Configuration used to dispatch this event.
20431 * @param {string} dispatchMarker Marker identifying the event target.
20432 * @param {object} nativeEvent Native browser event.
20433 * @extends {SyntheticEvent}
20434 */
20435function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20436 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20437}
20438
20439SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface);
20440
20441module.exports = SyntheticAnimationEvent;
20442
20443/***/ }),
20444/* 168 */
20445/***/ (function(module, exports, __webpack_require__) {
20446
20447"use strict";
20448/**
20449 * Copyright (c) 2013-present, Facebook, Inc.
20450 *
20451 * This source code is licensed under the MIT license found in the
20452 * LICENSE file in the root directory of this source tree.
20453 *
20454 */
20455
20456
20457
20458var SyntheticEvent = __webpack_require__(10);
20459
20460/**
20461 * @interface Event
20462 * @see http://www.w3.org/TR/clipboard-apis/
20463 */
20464var ClipboardEventInterface = {
20465 clipboardData: function (event) {
20466 return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
20467 }
20468};
20469
20470/**
20471 * @param {object} dispatchConfig Configuration used to dispatch this event.
20472 * @param {string} dispatchMarker Marker identifying the event target.
20473 * @param {object} nativeEvent Native browser event.
20474 * @extends {SyntheticUIEvent}
20475 */
20476function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20477 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20478}
20479
20480SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
20481
20482module.exports = SyntheticClipboardEvent;
20483
20484/***/ }),
20485/* 169 */
20486/***/ (function(module, exports, __webpack_require__) {
20487
20488"use strict";
20489/**
20490 * Copyright (c) 2013-present, Facebook, Inc.
20491 *
20492 * This source code is licensed under the MIT license found in the
20493 * LICENSE file in the root directory of this source tree.
20494 *
20495 */
20496
20497
20498
20499var SyntheticEvent = __webpack_require__(10);
20500
20501/**
20502 * @interface Event
20503 * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
20504 */
20505var CompositionEventInterface = {
20506 data: null
20507};
20508
20509/**
20510 * @param {object} dispatchConfig Configuration used to dispatch this event.
20511 * @param {string} dispatchMarker Marker identifying the event target.
20512 * @param {object} nativeEvent Native browser event.
20513 * @extends {SyntheticUIEvent}
20514 */
20515function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20516 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20517}
20518
20519SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);
20520
20521module.exports = SyntheticCompositionEvent;
20522
20523/***/ }),
20524/* 170 */
20525/***/ (function(module, exports, __webpack_require__) {
20526
20527"use strict";
20528/**
20529 * Copyright (c) 2013-present, Facebook, Inc.
20530 *
20531 * This source code is licensed under the MIT license found in the
20532 * LICENSE file in the root directory of this source tree.
20533 *
20534 */
20535
20536
20537
20538var SyntheticMouseEvent = __webpack_require__(23);
20539
20540/**
20541 * @interface DragEvent
20542 * @see http://www.w3.org/TR/DOM-Level-3-Events/
20543 */
20544var DragEventInterface = {
20545 dataTransfer: null
20546};
20547
20548/**
20549 * @param {object} dispatchConfig Configuration used to dispatch this event.
20550 * @param {string} dispatchMarker Marker identifying the event target.
20551 * @param {object} nativeEvent Native browser event.
20552 * @extends {SyntheticUIEvent}
20553 */
20554function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20555 return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20556}
20557
20558SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);
20559
20560module.exports = SyntheticDragEvent;
20561
20562/***/ }),
20563/* 171 */
20564/***/ (function(module, exports, __webpack_require__) {
20565
20566"use strict";
20567/**
20568 * Copyright (c) 2013-present, Facebook, Inc.
20569 *
20570 * This source code is licensed under the MIT license found in the
20571 * LICENSE file in the root directory of this source tree.
20572 *
20573 */
20574
20575
20576
20577var SyntheticUIEvent = __webpack_require__(20);
20578
20579/**
20580 * @interface FocusEvent
20581 * @see http://www.w3.org/TR/DOM-Level-3-Events/
20582 */
20583var FocusEventInterface = {
20584 relatedTarget: null
20585};
20586
20587/**
20588 * @param {object} dispatchConfig Configuration used to dispatch this event.
20589 * @param {string} dispatchMarker Marker identifying the event target.
20590 * @param {object} nativeEvent Native browser event.
20591 * @extends {SyntheticUIEvent}
20592 */
20593function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20594 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20595}
20596
20597SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);
20598
20599module.exports = SyntheticFocusEvent;
20600
20601/***/ }),
20602/* 172 */
20603/***/ (function(module, exports, __webpack_require__) {
20604
20605"use strict";
20606/**
20607 * Copyright (c) 2013-present, Facebook, Inc.
20608 *
20609 * This source code is licensed under the MIT license found in the
20610 * LICENSE file in the root directory of this source tree.
20611 *
20612 */
20613
20614
20615
20616var SyntheticEvent = __webpack_require__(10);
20617
20618/**
20619 * @interface Event
20620 * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
20621 * /#events-inputevents
20622 */
20623var InputEventInterface = {
20624 data: null
20625};
20626
20627/**
20628 * @param {object} dispatchConfig Configuration used to dispatch this event.
20629 * @param {string} dispatchMarker Marker identifying the event target.
20630 * @param {object} nativeEvent Native browser event.
20631 * @extends {SyntheticUIEvent}
20632 */
20633function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20634 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20635}
20636
20637SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);
20638
20639module.exports = SyntheticInputEvent;
20640
20641/***/ }),
20642/* 173 */
20643/***/ (function(module, exports, __webpack_require__) {
20644
20645"use strict";
20646/**
20647 * Copyright (c) 2013-present, Facebook, Inc.
20648 *
20649 * This source code is licensed under the MIT license found in the
20650 * LICENSE file in the root directory of this source tree.
20651 *
20652 */
20653
20654
20655
20656var SyntheticUIEvent = __webpack_require__(20);
20657
20658var getEventCharCode = __webpack_require__(39);
20659var getEventKey = __webpack_require__(181);
20660var getEventModifierState = __webpack_require__(40);
20661
20662/**
20663 * @interface KeyboardEvent
20664 * @see http://www.w3.org/TR/DOM-Level-3-Events/
20665 */
20666var KeyboardEventInterface = {
20667 key: getEventKey,
20668 location: null,
20669 ctrlKey: null,
20670 shiftKey: null,
20671 altKey: null,
20672 metaKey: null,
20673 repeat: null,
20674 locale: null,
20675 getModifierState: getEventModifierState,
20676 // Legacy Interface
20677 charCode: function (event) {
20678 // `charCode` is the result of a KeyPress event and represents the value of
20679 // the actual printable character.
20680
20681 // KeyPress is deprecated, but its replacement is not yet final and not
20682 // implemented in any major browser. Only KeyPress has charCode.
20683 if (event.type === 'keypress') {
20684 return getEventCharCode(event);
20685 }
20686 return 0;
20687 },
20688 keyCode: function (event) {
20689 // `keyCode` is the result of a KeyDown/Up event and represents the value of
20690 // physical keyboard key.
20691
20692 // The actual meaning of the value depends on the users' keyboard layout
20693 // which cannot be detected. Assuming that it is a US keyboard layout
20694 // provides a surprisingly accurate mapping for US and European users.
20695 // Due to this, it is left to the user to implement at this time.
20696 if (event.type === 'keydown' || event.type === 'keyup') {
20697 return event.keyCode;
20698 }
20699 return 0;
20700 },
20701 which: function (event) {
20702 // `which` is an alias for either `keyCode` or `charCode` depending on the
20703 // type of the event.
20704 if (event.type === 'keypress') {
20705 return getEventCharCode(event);
20706 }
20707 if (event.type === 'keydown' || event.type === 'keyup') {
20708 return event.keyCode;
20709 }
20710 return 0;
20711 }
20712};
20713
20714/**
20715 * @param {object} dispatchConfig Configuration used to dispatch this event.
20716 * @param {string} dispatchMarker Marker identifying the event target.
20717 * @param {object} nativeEvent Native browser event.
20718 * @extends {SyntheticUIEvent}
20719 */
20720function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20721 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20722}
20723
20724SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);
20725
20726module.exports = SyntheticKeyboardEvent;
20727
20728/***/ }),
20729/* 174 */
20730/***/ (function(module, exports, __webpack_require__) {
20731
20732"use strict";
20733/**
20734 * Copyright (c) 2013-present, Facebook, Inc.
20735 *
20736 * This source code is licensed under the MIT license found in the
20737 * LICENSE file in the root directory of this source tree.
20738 *
20739 */
20740
20741
20742
20743var SyntheticUIEvent = __webpack_require__(20);
20744
20745var getEventModifierState = __webpack_require__(40);
20746
20747/**
20748 * @interface TouchEvent
20749 * @see http://www.w3.org/TR/touch-events/
20750 */
20751var TouchEventInterface = {
20752 touches: null,
20753 targetTouches: null,
20754 changedTouches: null,
20755 altKey: null,
20756 metaKey: null,
20757 ctrlKey: null,
20758 shiftKey: null,
20759 getModifierState: getEventModifierState
20760};
20761
20762/**
20763 * @param {object} dispatchConfig Configuration used to dispatch this event.
20764 * @param {string} dispatchMarker Marker identifying the event target.
20765 * @param {object} nativeEvent Native browser event.
20766 * @extends {SyntheticUIEvent}
20767 */
20768function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20769 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20770}
20771
20772SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
20773
20774module.exports = SyntheticTouchEvent;
20775
20776/***/ }),
20777/* 175 */
20778/***/ (function(module, exports, __webpack_require__) {
20779
20780"use strict";
20781/**
20782 * Copyright (c) 2013-present, Facebook, Inc.
20783 *
20784 * This source code is licensed under the MIT license found in the
20785 * LICENSE file in the root directory of this source tree.
20786 *
20787 */
20788
20789
20790
20791var SyntheticEvent = __webpack_require__(10);
20792
20793/**
20794 * @interface Event
20795 * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
20796 * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
20797 */
20798var TransitionEventInterface = {
20799 propertyName: null,
20800 elapsedTime: null,
20801 pseudoElement: null
20802};
20803
20804/**
20805 * @param {object} dispatchConfig Configuration used to dispatch this event.
20806 * @param {string} dispatchMarker Marker identifying the event target.
20807 * @param {object} nativeEvent Native browser event.
20808 * @extends {SyntheticEvent}
20809 */
20810function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20811 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20812}
20813
20814SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface);
20815
20816module.exports = SyntheticTransitionEvent;
20817
20818/***/ }),
20819/* 176 */
20820/***/ (function(module, exports, __webpack_require__) {
20821
20822"use strict";
20823/**
20824 * Copyright (c) 2013-present, Facebook, Inc.
20825 *
20826 * This source code is licensed under the MIT license found in the
20827 * LICENSE file in the root directory of this source tree.
20828 *
20829 */
20830
20831
20832
20833var SyntheticMouseEvent = __webpack_require__(23);
20834
20835/**
20836 * @interface WheelEvent
20837 * @see http://www.w3.org/TR/DOM-Level-3-Events/
20838 */
20839var WheelEventInterface = {
20840 deltaX: function (event) {
20841 return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
20842 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
20843 },
20844 deltaY: function (event) {
20845 return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
20846 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
20847 'wheelDelta' in event ? -event.wheelDelta : 0;
20848 },
20849 deltaZ: null,
20850
20851 // Browsers without "deltaMode" is reporting in raw wheel delta where one
20852 // notch on the scroll is always +/- 120, roughly equivalent to pixels.
20853 // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
20854 // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
20855 deltaMode: null
20856};
20857
20858/**
20859 * @param {object} dispatchConfig Configuration used to dispatch this event.
20860 * @param {string} dispatchMarker Marker identifying the event target.
20861 * @param {object} nativeEvent Native browser event.
20862 * @extends {SyntheticMouseEvent}
20863 */
20864function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20865 return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20866}
20867
20868SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);
20869
20870module.exports = SyntheticWheelEvent;
20871
20872/***/ }),
20873/* 177 */
20874/***/ (function(module, exports, __webpack_require__) {
20875
20876"use strict";
20877/**
20878 * Copyright (c) 2013-present, Facebook, Inc.
20879 *
20880 * This source code is licensed under the MIT license found in the
20881 * LICENSE file in the root directory of this source tree.
20882 *
20883 *
20884 */
20885
20886
20887
20888var MOD = 65521;
20889
20890// adler32 is not cryptographically strong, and is only used to sanity check that
20891// markup generated on the server matches the markup generated on the client.
20892// This implementation (a modified version of the SheetJS version) has been optimized
20893// for our use case, at the expense of conforming to the adler32 specification
20894// for non-ascii inputs.
20895function adler32(data) {
20896 var a = 1;
20897 var b = 0;
20898 var i = 0;
20899 var l = data.length;
20900 var m = l & ~0x3;
20901 while (i < m) {
20902 var n = Math.min(i + 4096, m);
20903 for (; i < n; i += 4) {
20904 b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3));
20905 }
20906 a %= MOD;
20907 b %= MOD;
20908 }
20909 for (; i < l; i++) {
20910 b += a += data.charCodeAt(i);
20911 }
20912 a %= MOD;
20913 b %= MOD;
20914 return a | b << 16;
20915}
20916
20917module.exports = adler32;
20918
20919/***/ }),
20920/* 178 */
20921/***/ (function(module, exports, __webpack_require__) {
20922
20923"use strict";
20924/**
20925 * Copyright (c) 2013-present, Facebook, Inc.
20926 *
20927 * This source code is licensed under the MIT license found in the
20928 * LICENSE file in the root directory of this source tree.
20929 *
20930 */
20931
20932
20933
20934var _prodInvariant = __webpack_require__(2);
20935
20936var ReactPropTypeLocationNames = __webpack_require__(157);
20937var ReactPropTypesSecret = __webpack_require__(62);
20938
20939var invariant = __webpack_require__(0);
20940var warning = __webpack_require__(1);
20941
20942var ReactComponentTreeHook;
20943
20944if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
20945 // Temporary hack.
20946 // Inline requires don't work well with Jest:
20947 // https://github.com/facebook/react/issues/7240
20948 // Remove the inline requires when we don't need them anymore:
20949 // https://github.com/facebook/react/pull/7178
20950 ReactComponentTreeHook = __webpack_require__(8);
20951}
20952
20953var loggedTypeFailures = {};
20954
20955/**
20956 * Assert that the values match with the type specs.
20957 * Error messages are memorized and will only be shown once.
20958 *
20959 * @param {object} typeSpecs Map of name to a ReactPropType
20960 * @param {object} values Runtime values that need to be type-checked
20961 * @param {string} location e.g. "prop", "context", "child context"
20962 * @param {string} componentName Name of the component for error messages.
20963 * @param {?object} element The React element that is being type-checked
20964 * @param {?number} debugID The React component instance that is being type-checked
20965 * @private
20966 */
20967function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
20968 for (var typeSpecName in typeSpecs) {
20969 if (typeSpecs.hasOwnProperty(typeSpecName)) {
20970 var error;
20971 // Prop type validation may throw. In case they do, we don't want to
20972 // fail the render phase where it didn't fail before. So we log it.
20973 // After these have been cleaned up, we'll let them throw.
20974 try {
20975 // This is intentionally an invariant that gets caught. It's the same
20976 // behavior as without this statement except with a better message.
20977 !(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;
20978 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
20979 } catch (ex) {
20980 error = ex;
20981 }
20982 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;
20983 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
20984 // Only monitor this failure once because there tends to be a lot of the
20985 // same error.
20986 loggedTypeFailures[error.message] = true;
20987
20988 var componentStackInfo = '';
20989
20990 if (process.env.NODE_ENV !== 'production') {
20991 if (!ReactComponentTreeHook) {
20992 ReactComponentTreeHook = __webpack_require__(8);
20993 }
20994 if (debugID !== null) {
20995 componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
20996 } else if (element !== null) {
20997 componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
20998 }
20999 }
21000
21001 process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
21002 }
21003 }
21004 }
21005}
21006
21007module.exports = checkReactTypeSpec;
21008
21009/***/ }),
21010/* 179 */
21011/***/ (function(module, exports, __webpack_require__) {
21012
21013"use strict";
21014/**
21015 * Copyright (c) 2013-present, Facebook, Inc.
21016 *
21017 * This source code is licensed under the MIT license found in the
21018 * LICENSE file in the root directory of this source tree.
21019 *
21020 */
21021
21022
21023
21024var CSSProperty = __webpack_require__(53);
21025var warning = __webpack_require__(1);
21026
21027var isUnitlessNumber = CSSProperty.isUnitlessNumber;
21028var styleWarnings = {};
21029
21030/**
21031 * Convert a value into the proper css writable value. The style name `name`
21032 * should be logical (no hyphens), as specified
21033 * in `CSSProperty.isUnitlessNumber`.
21034 *
21035 * @param {string} name CSS property name such as `topMargin`.
21036 * @param {*} value CSS property value such as `10px`.
21037 * @param {ReactDOMComponent} component
21038 * @return {string} Normalized style value with dimensions applied.
21039 */
21040function dangerousStyleValue(name, value, component, isCustomProperty) {
21041 // Note that we've removed escapeTextForBrowser() calls here since the
21042 // whole string will be escaped when the attribute is injected into
21043 // the markup. If you provide unsafe user data here they can inject
21044 // arbitrary CSS which may be problematic (I couldn't repro this):
21045 // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
21046 // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
21047 // This is not an XSS hole but instead a potential CSS injection issue
21048 // which has lead to a greater discussion about how we're going to
21049 // trust URLs moving forward. See #2115901
21050
21051 var isEmpty = value == null || typeof value === 'boolean' || value === '';
21052 if (isEmpty) {
21053 return '';
21054 }
21055
21056 var isNonNumeric = isNaN(value);
21057 if (isCustomProperty || isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
21058 return '' + value; // cast to string
21059 }
21060
21061 if (typeof value === 'string') {
21062 if (process.env.NODE_ENV !== 'production') {
21063 // Allow '0' to pass through without warning. 0 is already special and
21064 // doesn't require units, so we don't need to warn about it.
21065 if (component && value !== '0') {
21066 var owner = component._currentElement._owner;
21067 var ownerName = owner ? owner.getName() : null;
21068 if (ownerName && !styleWarnings[ownerName]) {
21069 styleWarnings[ownerName] = {};
21070 }
21071 var warned = false;
21072 if (ownerName) {
21073 var warnings = styleWarnings[ownerName];
21074 warned = warnings[name];
21075 if (!warned) {
21076 warnings[name] = true;
21077 }
21078 }
21079 if (!warned) {
21080 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;
21081 }
21082 }
21083 }
21084 value = value.trim();
21085 }
21086 return value + 'px';
21087}
21088
21089module.exports = dangerousStyleValue;
21090
21091/***/ }),
21092/* 180 */
21093/***/ (function(module, exports, __webpack_require__) {
21094
21095"use strict";
21096/**
21097 * Copyright (c) 2013-present, Facebook, Inc.
21098 *
21099 * This source code is licensed under the MIT license found in the
21100 * LICENSE file in the root directory of this source tree.
21101 *
21102 *
21103 */
21104
21105
21106
21107var KeyEscapeUtils = __webpack_require__(32);
21108var traverseAllChildren = __webpack_require__(74);
21109var warning = __webpack_require__(1);
21110
21111var ReactComponentTreeHook;
21112
21113if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
21114 // Temporary hack.
21115 // Inline requires don't work well with Jest:
21116 // https://github.com/facebook/react/issues/7240
21117 // Remove the inline requires when we don't need them anymore:
21118 // https://github.com/facebook/react/pull/7178
21119 ReactComponentTreeHook = __webpack_require__(8);
21120}
21121
21122/**
21123 * @param {function} traverseContext Context passed through traversal.
21124 * @param {?ReactComponent} child React child component.
21125 * @param {!string} name String name of key path to child.
21126 * @param {number=} selfDebugID Optional debugID of the current internal instance.
21127 */
21128function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {
21129 // We found a component instance.
21130 if (traverseContext && typeof traverseContext === 'object') {
21131 var result = traverseContext;
21132 var keyUnique = result[name] === undefined;
21133 if (process.env.NODE_ENV !== 'production') {
21134 if (!ReactComponentTreeHook) {
21135 ReactComponentTreeHook = __webpack_require__(8);
21136 }
21137 if (!keyUnique) {
21138 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;
21139 }
21140 }
21141 if (keyUnique && child != null) {
21142 result[name] = child;
21143 }
21144 }
21145}
21146
21147/**
21148 * Flattens children that are typically specified as `props.children`. Any null
21149 * children will not be included in the resulting object.
21150 * @return {!object} flattened children keyed by name.
21151 */
21152function flattenChildren(children, selfDebugID) {
21153 if (children == null) {
21154 return children;
21155 }
21156 var result = {};
21157
21158 if (process.env.NODE_ENV !== 'production') {
21159 traverseAllChildren(children, function (traverseContext, child, name) {
21160 return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);
21161 }, result);
21162 } else {
21163 traverseAllChildren(children, flattenSingleChildIntoContext, result);
21164 }
21165 return result;
21166}
21167
21168module.exports = flattenChildren;
21169
21170/***/ }),
21171/* 181 */
21172/***/ (function(module, exports, __webpack_require__) {
21173
21174"use strict";
21175/**
21176 * Copyright (c) 2013-present, Facebook, Inc.
21177 *
21178 * This source code is licensed under the MIT license found in the
21179 * LICENSE file in the root directory of this source tree.
21180 *
21181 */
21182
21183
21184
21185var getEventCharCode = __webpack_require__(39);
21186
21187/**
21188 * Normalization of deprecated HTML5 `key` values
21189 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
21190 */
21191var normalizeKey = {
21192 Esc: 'Escape',
21193 Spacebar: ' ',
21194 Left: 'ArrowLeft',
21195 Up: 'ArrowUp',
21196 Right: 'ArrowRight',
21197 Down: 'ArrowDown',
21198 Del: 'Delete',
21199 Win: 'OS',
21200 Menu: 'ContextMenu',
21201 Apps: 'ContextMenu',
21202 Scroll: 'ScrollLock',
21203 MozPrintableKey: 'Unidentified'
21204};
21205
21206/**
21207 * Translation from legacy `keyCode` to HTML5 `key`
21208 * Only special keys supported, all others depend on keyboard layout or browser
21209 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
21210 */
21211var translateToKey = {
21212 8: 'Backspace',
21213 9: 'Tab',
21214 12: 'Clear',
21215 13: 'Enter',
21216 16: 'Shift',
21217 17: 'Control',
21218 18: 'Alt',
21219 19: 'Pause',
21220 20: 'CapsLock',
21221 27: 'Escape',
21222 32: ' ',
21223 33: 'PageUp',
21224 34: 'PageDown',
21225 35: 'End',
21226 36: 'Home',
21227 37: 'ArrowLeft',
21228 38: 'ArrowUp',
21229 39: 'ArrowRight',
21230 40: 'ArrowDown',
21231 45: 'Insert',
21232 46: 'Delete',
21233 112: 'F1',
21234 113: 'F2',
21235 114: 'F3',
21236 115: 'F4',
21237 116: 'F5',
21238 117: 'F6',
21239 118: 'F7',
21240 119: 'F8',
21241 120: 'F9',
21242 121: 'F10',
21243 122: 'F11',
21244 123: 'F12',
21245 144: 'NumLock',
21246 145: 'ScrollLock',
21247 224: 'Meta'
21248};
21249
21250/**
21251 * @param {object} nativeEvent Native browser event.
21252 * @return {string} Normalized `key` property.
21253 */
21254function getEventKey(nativeEvent) {
21255 if (nativeEvent.key) {
21256 // Normalize inconsistent values reported by browsers due to
21257 // implementations of a working draft specification.
21258
21259 // FireFox implements `key` but returns `MozPrintableKey` for all
21260 // printable characters (normalized to `Unidentified`), ignore it.
21261 var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
21262 if (key !== 'Unidentified') {
21263 return key;
21264 }
21265 }
21266
21267 // Browser does not implement `key`, polyfill as much of it as we can.
21268 if (nativeEvent.type === 'keypress') {
21269 var charCode = getEventCharCode(nativeEvent);
21270
21271 // The enter-key is technically both printable and non-printable and can
21272 // thus be captured by `keypress`, no other non-printable key should.
21273 return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
21274 }
21275 if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
21276 // While user keyboard layout determines the actual meaning of each
21277 // `keyCode` value, almost all function keys have a universal value.
21278 return translateToKey[nativeEvent.keyCode] || 'Unidentified';
21279 }
21280 return '';
21281}
21282
21283module.exports = getEventKey;
21284
21285/***/ }),
21286/* 182 */
21287/***/ (function(module, exports, __webpack_require__) {
21288
21289"use strict";
21290/**
21291 * Copyright (c) 2013-present, Facebook, Inc.
21292 *
21293 * This source code is licensed under the MIT license found in the
21294 * LICENSE file in the root directory of this source tree.
21295 *
21296 *
21297 */
21298
21299
21300
21301/* global Symbol */
21302
21303var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
21304var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
21305
21306/**
21307 * Returns the iterator method function contained on the iterable object.
21308 *
21309 * Be sure to invoke the function with the iterable as context:
21310 *
21311 * var iteratorFn = getIteratorFn(myIterable);
21312 * if (iteratorFn) {
21313 * var iterator = iteratorFn.call(myIterable);
21314 * ...
21315 * }
21316 *
21317 * @param {?object} maybeIterable
21318 * @return {?function}
21319 */
21320function getIteratorFn(maybeIterable) {
21321 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
21322 if (typeof iteratorFn === 'function') {
21323 return iteratorFn;
21324 }
21325}
21326
21327module.exports = getIteratorFn;
21328
21329/***/ }),
21330/* 183 */
21331/***/ (function(module, exports, __webpack_require__) {
21332
21333"use strict";
21334/**
21335 * Copyright (c) 2013-present, Facebook, Inc.
21336 *
21337 * This source code is licensed under the MIT license found in the
21338 * LICENSE file in the root directory of this source tree.
21339 *
21340 */
21341
21342
21343
21344/**
21345 * Given any node return the first leaf node without children.
21346 *
21347 * @param {DOMElement|DOMTextNode} node
21348 * @return {DOMElement|DOMTextNode}
21349 */
21350
21351function getLeafNode(node) {
21352 while (node && node.firstChild) {
21353 node = node.firstChild;
21354 }
21355 return node;
21356}
21357
21358/**
21359 * Get the next sibling within a container. This will walk up the
21360 * DOM if a node's siblings have been exhausted.
21361 *
21362 * @param {DOMElement|DOMTextNode} node
21363 * @return {?DOMElement|DOMTextNode}
21364 */
21365function getSiblingNode(node) {
21366 while (node) {
21367 if (node.nextSibling) {
21368 return node.nextSibling;
21369 }
21370 node = node.parentNode;
21371 }
21372}
21373
21374/**
21375 * Get object describing the nodes which contain characters at offset.
21376 *
21377 * @param {DOMElement|DOMTextNode} root
21378 * @param {number} offset
21379 * @return {?object}
21380 */
21381function getNodeForCharacterOffset(root, offset) {
21382 var node = getLeafNode(root);
21383 var nodeStart = 0;
21384 var nodeEnd = 0;
21385
21386 while (node) {
21387 if (node.nodeType === 3) {
21388 nodeEnd = nodeStart + node.textContent.length;
21389
21390 if (nodeStart <= offset && nodeEnd >= offset) {
21391 return {
21392 node: node,
21393 offset: offset - nodeStart
21394 };
21395 }
21396
21397 nodeStart = nodeEnd;
21398 }
21399
21400 node = getLeafNode(getSiblingNode(node));
21401 }
21402}
21403
21404module.exports = getNodeForCharacterOffset;
21405
21406/***/ }),
21407/* 184 */
21408/***/ (function(module, exports, __webpack_require__) {
21409
21410"use strict";
21411/**
21412 * Copyright (c) 2013-present, Facebook, Inc.
21413 *
21414 * This source code is licensed under the MIT license found in the
21415 * LICENSE file in the root directory of this source tree.
21416 *
21417 */
21418
21419
21420
21421var ExecutionEnvironment = __webpack_require__(5);
21422
21423/**
21424 * Generate a mapping of standard vendor prefixes using the defined style property and event name.
21425 *
21426 * @param {string} styleProp
21427 * @param {string} eventName
21428 * @returns {object}
21429 */
21430function makePrefixMap(styleProp, eventName) {
21431 var prefixes = {};
21432
21433 prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
21434 prefixes['Webkit' + styleProp] = 'webkit' + eventName;
21435 prefixes['Moz' + styleProp] = 'moz' + eventName;
21436 prefixes['ms' + styleProp] = 'MS' + eventName;
21437 prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
21438
21439 return prefixes;
21440}
21441
21442/**
21443 * A list of event names to a configurable list of vendor prefixes.
21444 */
21445var vendorPrefixes = {
21446 animationend: makePrefixMap('Animation', 'AnimationEnd'),
21447 animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
21448 animationstart: makePrefixMap('Animation', 'AnimationStart'),
21449 transitionend: makePrefixMap('Transition', 'TransitionEnd')
21450};
21451
21452/**
21453 * Event names that have already been detected and prefixed (if applicable).
21454 */
21455var prefixedEventNames = {};
21456
21457/**
21458 * Element to check for prefixes on.
21459 */
21460var style = {};
21461
21462/**
21463 * Bootstrap if a DOM exists.
21464 */
21465if (ExecutionEnvironment.canUseDOM) {
21466 style = document.createElement('div').style;
21467
21468 // On some platforms, in particular some releases of Android 4.x,
21469 // the un-prefixed "animation" and "transition" properties are defined on the
21470 // style object but the events that fire will still be prefixed, so we need
21471 // to check if the un-prefixed events are usable, and if not remove them from the map.
21472 if (!('AnimationEvent' in window)) {
21473 delete vendorPrefixes.animationend.animation;
21474 delete vendorPrefixes.animationiteration.animation;
21475 delete vendorPrefixes.animationstart.animation;
21476 }
21477
21478 // Same as above
21479 if (!('TransitionEvent' in window)) {
21480 delete vendorPrefixes.transitionend.transition;
21481 }
21482}
21483
21484/**
21485 * Attempts to determine the correct vendor prefixed event name.
21486 *
21487 * @param {string} eventName
21488 * @returns {string}
21489 */
21490function getVendorPrefixedEventName(eventName) {
21491 if (prefixedEventNames[eventName]) {
21492 return prefixedEventNames[eventName];
21493 } else if (!vendorPrefixes[eventName]) {
21494 return eventName;
21495 }
21496
21497 var prefixMap = vendorPrefixes[eventName];
21498
21499 for (var styleProp in prefixMap) {
21500 if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
21501 return prefixedEventNames[eventName] = prefixMap[styleProp];
21502 }
21503 }
21504
21505 return '';
21506}
21507
21508module.exports = getVendorPrefixedEventName;
21509
21510/***/ }),
21511/* 185 */
21512/***/ (function(module, exports, __webpack_require__) {
21513
21514"use strict";
21515/**
21516 * Copyright (c) 2013-present, Facebook, Inc.
21517 *
21518 * This source code is licensed under the MIT license found in the
21519 * LICENSE file in the root directory of this source tree.
21520 *
21521 */
21522
21523
21524
21525var escapeTextContentForBrowser = __webpack_require__(25);
21526
21527/**
21528 * Escapes attribute value to prevent scripting attacks.
21529 *
21530 * @param {*} value Value to escape.
21531 * @return {string} An escaped string.
21532 */
21533function quoteAttributeValueForBrowser(value) {
21534 return '"' + escapeTextContentForBrowser(value) + '"';
21535}
21536
21537module.exports = quoteAttributeValueForBrowser;
21538
21539/***/ }),
21540/* 186 */
21541/***/ (function(module, exports, __webpack_require__) {
21542
21543"use strict";
21544
21545
21546module.exports = __webpack_require__(140);
21547
21548
21549/***/ }),
21550/* 187 */
21551/***/ (function(module, exports, __webpack_require__) {
21552
21553"use strict";
21554/**
21555 * Copyright (c) 2013-present, Facebook, Inc.
21556 *
21557 * This source code is licensed under the MIT license found in the
21558 * LICENSE file in the root directory of this source tree.
21559 *
21560 *
21561 */
21562
21563
21564
21565/**
21566 * Escape and wrap key so it is safe to use as a reactid
21567 *
21568 * @param {string} key to be escaped.
21569 * @return {string} the escaped key.
21570 */
21571
21572function escape(key) {
21573 var escapeRegex = /[=:]/g;
21574 var escaperLookup = {
21575 '=': '=0',
21576 ':': '=2'
21577 };
21578 var escapedString = ('' + key).replace(escapeRegex, function (match) {
21579 return escaperLookup[match];
21580 });
21581
21582 return '$' + escapedString;
21583}
21584
21585/**
21586 * Unescape and unwrap key for human-readable display
21587 *
21588 * @param {string} key to unescape.
21589 * @return {string} the unescaped key.
21590 */
21591function unescape(key) {
21592 var unescapeRegex = /(=0|=2)/g;
21593 var unescaperLookup = {
21594 '=0': '=',
21595 '=2': ':'
21596 };
21597 var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
21598
21599 return ('' + keySubstring).replace(unescapeRegex, function (match) {
21600 return unescaperLookup[match];
21601 });
21602}
21603
21604var KeyEscapeUtils = {
21605 escape: escape,
21606 unescape: unescape
21607};
21608
21609module.exports = KeyEscapeUtils;
21610
21611/***/ }),
21612/* 188 */
21613/***/ (function(module, exports, __webpack_require__) {
21614
21615"use strict";
21616/**
21617 * Copyright (c) 2013-present, Facebook, Inc.
21618 *
21619 * This source code is licensed under the MIT license found in the
21620 * LICENSE file in the root directory of this source tree.
21621 *
21622 *
21623 */
21624
21625
21626
21627var _prodInvariant = __webpack_require__(14);
21628
21629var invariant = __webpack_require__(0);
21630
21631/**
21632 * Static poolers. Several custom versions for each potential number of
21633 * arguments. A completely generic pooler is easy to implement, but would
21634 * require accessing the `arguments` object. In each of these, `this` refers to
21635 * the Class itself, not an instance. If any others are needed, simply add them
21636 * here, or in their own files.
21637 */
21638var oneArgumentPooler = function (copyFieldsFrom) {
21639 var Klass = this;
21640 if (Klass.instancePool.length) {
21641 var instance = Klass.instancePool.pop();
21642 Klass.call(instance, copyFieldsFrom);
21643 return instance;
21644 } else {
21645 return new Klass(copyFieldsFrom);
21646 }
21647};
21648
21649var twoArgumentPooler = function (a1, a2) {
21650 var Klass = this;
21651 if (Klass.instancePool.length) {
21652 var instance = Klass.instancePool.pop();
21653 Klass.call(instance, a1, a2);
21654 return instance;
21655 } else {
21656 return new Klass(a1, a2);
21657 }
21658};
21659
21660var threeArgumentPooler = function (a1, a2, a3) {
21661 var Klass = this;
21662 if (Klass.instancePool.length) {
21663 var instance = Klass.instancePool.pop();
21664 Klass.call(instance, a1, a2, a3);
21665 return instance;
21666 } else {
21667 return new Klass(a1, a2, a3);
21668 }
21669};
21670
21671var fourArgumentPooler = function (a1, a2, a3, a4) {
21672 var Klass = this;
21673 if (Klass.instancePool.length) {
21674 var instance = Klass.instancePool.pop();
21675 Klass.call(instance, a1, a2, a3, a4);
21676 return instance;
21677 } else {
21678 return new Klass(a1, a2, a3, a4);
21679 }
21680};
21681
21682var standardReleaser = function (instance) {
21683 var Klass = this;
21684 !(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;
21685 instance.destructor();
21686 if (Klass.instancePool.length < Klass.poolSize) {
21687 Klass.instancePool.push(instance);
21688 }
21689};
21690
21691var DEFAULT_POOL_SIZE = 10;
21692var DEFAULT_POOLER = oneArgumentPooler;
21693
21694/**
21695 * Augments `CopyConstructor` to be a poolable class, augmenting only the class
21696 * itself (statically) not adding any prototypical fields. Any CopyConstructor
21697 * you give this may have a `poolSize` property, and will look for a
21698 * prototypical `destructor` on instances.
21699 *
21700 * @param {Function} CopyConstructor Constructor that can be used to reset.
21701 * @param {Function} pooler Customizable pooler.
21702 */
21703var addPoolingTo = function (CopyConstructor, pooler) {
21704 // Casting as any so that flow ignores the actual implementation and trusts
21705 // it to match the type we declared
21706 var NewKlass = CopyConstructor;
21707 NewKlass.instancePool = [];
21708 NewKlass.getPooled = pooler || DEFAULT_POOLER;
21709 if (!NewKlass.poolSize) {
21710 NewKlass.poolSize = DEFAULT_POOL_SIZE;
21711 }
21712 NewKlass.release = standardReleaser;
21713 return NewKlass;
21714};
21715
21716var PooledClass = {
21717 addPoolingTo: addPoolingTo,
21718 oneArgumentPooler: oneArgumentPooler,
21719 twoArgumentPooler: twoArgumentPooler,
21720 threeArgumentPooler: threeArgumentPooler,
21721 fourArgumentPooler: fourArgumentPooler
21722};
21723
21724module.exports = PooledClass;
21725
21726/***/ }),
21727/* 189 */
21728/***/ (function(module, exports, __webpack_require__) {
21729
21730"use strict";
21731/**
21732 * Copyright (c) 2013-present, Facebook, Inc.
21733 *
21734 * This source code is licensed under the MIT license found in the
21735 * LICENSE file in the root directory of this source tree.
21736 *
21737 */
21738
21739
21740
21741var PooledClass = __webpack_require__(188);
21742var ReactElement = __webpack_require__(13);
21743
21744var emptyFunction = __webpack_require__(6);
21745var traverseAllChildren = __webpack_require__(199);
21746
21747var twoArgumentPooler = PooledClass.twoArgumentPooler;
21748var fourArgumentPooler = PooledClass.fourArgumentPooler;
21749
21750var userProvidedKeyEscapeRegex = /\/+/g;
21751function escapeUserProvidedKey(text) {
21752 return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
21753}
21754
21755/**
21756 * PooledClass representing the bookkeeping associated with performing a child
21757 * traversal. Allows avoiding binding callbacks.
21758 *
21759 * @constructor ForEachBookKeeping
21760 * @param {!function} forEachFunction Function to perform traversal with.
21761 * @param {?*} forEachContext Context to perform context with.
21762 */
21763function ForEachBookKeeping(forEachFunction, forEachContext) {
21764 this.func = forEachFunction;
21765 this.context = forEachContext;
21766 this.count = 0;
21767}
21768ForEachBookKeeping.prototype.destructor = function () {
21769 this.func = null;
21770 this.context = null;
21771 this.count = 0;
21772};
21773PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
21774
21775function forEachSingleChild(bookKeeping, child, name) {
21776 var func = bookKeeping.func,
21777 context = bookKeeping.context;
21778
21779 func.call(context, child, bookKeeping.count++);
21780}
21781
21782/**
21783 * Iterates through children that are typically specified as `props.children`.
21784 *
21785 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach
21786 *
21787 * The provided forEachFunc(child, index) will be called for each
21788 * leaf child.
21789 *
21790 * @param {?*} children Children tree container.
21791 * @param {function(*, int)} forEachFunc
21792 * @param {*} forEachContext Context for forEachContext.
21793 */
21794function forEachChildren(children, forEachFunc, forEachContext) {
21795 if (children == null) {
21796 return children;
21797 }
21798 var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
21799 traverseAllChildren(children, forEachSingleChild, traverseContext);
21800 ForEachBookKeeping.release(traverseContext);
21801}
21802
21803/**
21804 * PooledClass representing the bookkeeping associated with performing a child
21805 * mapping. Allows avoiding binding callbacks.
21806 *
21807 * @constructor MapBookKeeping
21808 * @param {!*} mapResult Object containing the ordered map of results.
21809 * @param {!function} mapFunction Function to perform mapping with.
21810 * @param {?*} mapContext Context to perform mapping with.
21811 */
21812function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
21813 this.result = mapResult;
21814 this.keyPrefix = keyPrefix;
21815 this.func = mapFunction;
21816 this.context = mapContext;
21817 this.count = 0;
21818}
21819MapBookKeeping.prototype.destructor = function () {
21820 this.result = null;
21821 this.keyPrefix = null;
21822 this.func = null;
21823 this.context = null;
21824 this.count = 0;
21825};
21826PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
21827
21828function mapSingleChildIntoContext(bookKeeping, child, childKey) {
21829 var result = bookKeeping.result,
21830 keyPrefix = bookKeeping.keyPrefix,
21831 func = bookKeeping.func,
21832 context = bookKeeping.context;
21833
21834
21835 var mappedChild = func.call(context, child, bookKeeping.count++);
21836 if (Array.isArray(mappedChild)) {
21837 mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
21838 } else if (mappedChild != null) {
21839 if (ReactElement.isValidElement(mappedChild)) {
21840 mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
21841 // Keep both the (mapped) and old keys if they differ, just as
21842 // traverseAllChildren used to do for objects as children
21843 keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
21844 }
21845 result.push(mappedChild);
21846 }
21847}
21848
21849function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
21850 var escapedPrefix = '';
21851 if (prefix != null) {
21852 escapedPrefix = escapeUserProvidedKey(prefix) + '/';
21853 }
21854 var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
21855 traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
21856 MapBookKeeping.release(traverseContext);
21857}
21858
21859/**
21860 * Maps children that are typically specified as `props.children`.
21861 *
21862 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map
21863 *
21864 * The provided mapFunction(child, key, index) will be called for each
21865 * leaf child.
21866 *
21867 * @param {?*} children Children tree container.
21868 * @param {function(*, int)} func The map function.
21869 * @param {*} context Context for mapFunction.
21870 * @return {object} Object containing the ordered map of results.
21871 */
21872function mapChildren(children, func, context) {
21873 if (children == null) {
21874 return children;
21875 }
21876 var result = [];
21877 mapIntoWithKeyPrefixInternal(children, result, null, func, context);
21878 return result;
21879}
21880
21881function forEachSingleChildDummy(traverseContext, child, name) {
21882 return null;
21883}
21884
21885/**
21886 * Count the number of children that are typically specified as
21887 * `props.children`.
21888 *
21889 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count
21890 *
21891 * @param {?*} children Children tree container.
21892 * @return {number} The number of children.
21893 */
21894function countChildren(children, context) {
21895 return traverseAllChildren(children, forEachSingleChildDummy, null);
21896}
21897
21898/**
21899 * Flatten a children object (typically specified as `props.children`) and
21900 * return an array with appropriately re-keyed children.
21901 *
21902 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray
21903 */
21904function toArray(children) {
21905 var result = [];
21906 mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
21907 return result;
21908}
21909
21910var ReactChildren = {
21911 forEach: forEachChildren,
21912 map: mapChildren,
21913 mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
21914 count: countChildren,
21915 toArray: toArray
21916};
21917
21918module.exports = ReactChildren;
21919
21920/***/ }),
21921/* 190 */
21922/***/ (function(module, exports, __webpack_require__) {
21923
21924"use strict";
21925/**
21926 * Copyright (c) 2013-present, Facebook, Inc.
21927 *
21928 * This source code is licensed under the MIT license found in the
21929 * LICENSE file in the root directory of this source tree.
21930 *
21931 */
21932
21933
21934
21935var ReactElement = __webpack_require__(13);
21936
21937/**
21938 * Create a factory that creates HTML tag elements.
21939 *
21940 * @private
21941 */
21942var createDOMFactory = ReactElement.createFactory;
21943if (process.env.NODE_ENV !== 'production') {
21944 var ReactElementValidator = __webpack_require__(77);
21945 createDOMFactory = ReactElementValidator.createFactory;
21946}
21947
21948/**
21949 * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
21950 *
21951 * @public
21952 */
21953var ReactDOMFactories = {
21954 a: createDOMFactory('a'),
21955 abbr: createDOMFactory('abbr'),
21956 address: createDOMFactory('address'),
21957 area: createDOMFactory('area'),
21958 article: createDOMFactory('article'),
21959 aside: createDOMFactory('aside'),
21960 audio: createDOMFactory('audio'),
21961 b: createDOMFactory('b'),
21962 base: createDOMFactory('base'),
21963 bdi: createDOMFactory('bdi'),
21964 bdo: createDOMFactory('bdo'),
21965 big: createDOMFactory('big'),
21966 blockquote: createDOMFactory('blockquote'),
21967 body: createDOMFactory('body'),
21968 br: createDOMFactory('br'),
21969 button: createDOMFactory('button'),
21970 canvas: createDOMFactory('canvas'),
21971 caption: createDOMFactory('caption'),
21972 cite: createDOMFactory('cite'),
21973 code: createDOMFactory('code'),
21974 col: createDOMFactory('col'),
21975 colgroup: createDOMFactory('colgroup'),
21976 data: createDOMFactory('data'),
21977 datalist: createDOMFactory('datalist'),
21978 dd: createDOMFactory('dd'),
21979 del: createDOMFactory('del'),
21980 details: createDOMFactory('details'),
21981 dfn: createDOMFactory('dfn'),
21982 dialog: createDOMFactory('dialog'),
21983 div: createDOMFactory('div'),
21984 dl: createDOMFactory('dl'),
21985 dt: createDOMFactory('dt'),
21986 em: createDOMFactory('em'),
21987 embed: createDOMFactory('embed'),
21988 fieldset: createDOMFactory('fieldset'),
21989 figcaption: createDOMFactory('figcaption'),
21990 figure: createDOMFactory('figure'),
21991 footer: createDOMFactory('footer'),
21992 form: createDOMFactory('form'),
21993 h1: createDOMFactory('h1'),
21994 h2: createDOMFactory('h2'),
21995 h3: createDOMFactory('h3'),
21996 h4: createDOMFactory('h4'),
21997 h5: createDOMFactory('h5'),
21998 h6: createDOMFactory('h6'),
21999 head: createDOMFactory('head'),
22000 header: createDOMFactory('header'),
22001 hgroup: createDOMFactory('hgroup'),
22002 hr: createDOMFactory('hr'),
22003 html: createDOMFactory('html'),
22004 i: createDOMFactory('i'),
22005 iframe: createDOMFactory('iframe'),
22006 img: createDOMFactory('img'),
22007 input: createDOMFactory('input'),
22008 ins: createDOMFactory('ins'),
22009 kbd: createDOMFactory('kbd'),
22010 keygen: createDOMFactory('keygen'),
22011 label: createDOMFactory('label'),
22012 legend: createDOMFactory('legend'),
22013 li: createDOMFactory('li'),
22014 link: createDOMFactory('link'),
22015 main: createDOMFactory('main'),
22016 map: createDOMFactory('map'),
22017 mark: createDOMFactory('mark'),
22018 menu: createDOMFactory('menu'),
22019 menuitem: createDOMFactory('menuitem'),
22020 meta: createDOMFactory('meta'),
22021 meter: createDOMFactory('meter'),
22022 nav: createDOMFactory('nav'),
22023 noscript: createDOMFactory('noscript'),
22024 object: createDOMFactory('object'),
22025 ol: createDOMFactory('ol'),
22026 optgroup: createDOMFactory('optgroup'),
22027 option: createDOMFactory('option'),
22028 output: createDOMFactory('output'),
22029 p: createDOMFactory('p'),
22030 param: createDOMFactory('param'),
22031 picture: createDOMFactory('picture'),
22032 pre: createDOMFactory('pre'),
22033 progress: createDOMFactory('progress'),
22034 q: createDOMFactory('q'),
22035 rp: createDOMFactory('rp'),
22036 rt: createDOMFactory('rt'),
22037 ruby: createDOMFactory('ruby'),
22038 s: createDOMFactory('s'),
22039 samp: createDOMFactory('samp'),
22040 script: createDOMFactory('script'),
22041 section: createDOMFactory('section'),
22042 select: createDOMFactory('select'),
22043 small: createDOMFactory('small'),
22044 source: createDOMFactory('source'),
22045 span: createDOMFactory('span'),
22046 strong: createDOMFactory('strong'),
22047 style: createDOMFactory('style'),
22048 sub: createDOMFactory('sub'),
22049 summary: createDOMFactory('summary'),
22050 sup: createDOMFactory('sup'),
22051 table: createDOMFactory('table'),
22052 tbody: createDOMFactory('tbody'),
22053 td: createDOMFactory('td'),
22054 textarea: createDOMFactory('textarea'),
22055 tfoot: createDOMFactory('tfoot'),
22056 th: createDOMFactory('th'),
22057 thead: createDOMFactory('thead'),
22058 time: createDOMFactory('time'),
22059 title: createDOMFactory('title'),
22060 tr: createDOMFactory('tr'),
22061 track: createDOMFactory('track'),
22062 u: createDOMFactory('u'),
22063 ul: createDOMFactory('ul'),
22064 'var': createDOMFactory('var'),
22065 video: createDOMFactory('video'),
22066 wbr: createDOMFactory('wbr'),
22067
22068 // SVG
22069 circle: createDOMFactory('circle'),
22070 clipPath: createDOMFactory('clipPath'),
22071 defs: createDOMFactory('defs'),
22072 ellipse: createDOMFactory('ellipse'),
22073 g: createDOMFactory('g'),
22074 image: createDOMFactory('image'),
22075 line: createDOMFactory('line'),
22076 linearGradient: createDOMFactory('linearGradient'),
22077 mask: createDOMFactory('mask'),
22078 path: createDOMFactory('path'),
22079 pattern: createDOMFactory('pattern'),
22080 polygon: createDOMFactory('polygon'),
22081 polyline: createDOMFactory('polyline'),
22082 radialGradient: createDOMFactory('radialGradient'),
22083 rect: createDOMFactory('rect'),
22084 stop: createDOMFactory('stop'),
22085 svg: createDOMFactory('svg'),
22086 text: createDOMFactory('text'),
22087 tspan: createDOMFactory('tspan')
22088};
22089
22090module.exports = ReactDOMFactories;
22091
22092/***/ }),
22093/* 191 */
22094/***/ (function(module, exports, __webpack_require__) {
22095
22096"use strict";
22097/**
22098 * Copyright (c) 2013-present, Facebook, Inc.
22099 *
22100 * This source code is licensed under the MIT license found in the
22101 * LICENSE file in the root directory of this source tree.
22102 *
22103 *
22104 */
22105
22106
22107
22108var ReactPropTypeLocationNames = {};
22109
22110if (process.env.NODE_ENV !== 'production') {
22111 ReactPropTypeLocationNames = {
22112 prop: 'prop',
22113 context: 'context',
22114 childContext: 'child context'
22115 };
22116}
22117
22118module.exports = ReactPropTypeLocationNames;
22119
22120/***/ }),
22121/* 192 */
22122/***/ (function(module, exports, __webpack_require__) {
22123
22124"use strict";
22125/**
22126 * Copyright (c) 2013-present, Facebook, Inc.
22127 *
22128 * This source code is licensed under the MIT license found in the
22129 * LICENSE file in the root directory of this source tree.
22130 *
22131 */
22132
22133
22134
22135var _require = __webpack_require__(13),
22136 isValidElement = _require.isValidElement;
22137
22138var factory = __webpack_require__(51);
22139
22140module.exports = factory(isValidElement);
22141
22142/***/ }),
22143/* 193 */
22144/***/ (function(module, exports, __webpack_require__) {
22145
22146"use strict";
22147/**
22148 * Copyright (c) 2013-present, Facebook, Inc.
22149 *
22150 * This source code is licensed under the MIT license found in the
22151 * LICENSE file in the root directory of this source tree.
22152 *
22153 *
22154 */
22155
22156
22157
22158var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
22159
22160module.exports = ReactPropTypesSecret;
22161
22162/***/ }),
22163/* 194 */
22164/***/ (function(module, exports, __webpack_require__) {
22165
22166"use strict";
22167/**
22168 * Copyright (c) 2013-present, Facebook, Inc.
22169 *
22170 * This source code is licensed under the MIT license found in the
22171 * LICENSE file in the root directory of this source tree.
22172 *
22173 */
22174
22175
22176
22177module.exports = '15.6.2';
22178
22179/***/ }),
22180/* 195 */
22181/***/ (function(module, exports, __webpack_require__) {
22182
22183"use strict";
22184/**
22185 * Copyright (c) 2013-present, Facebook, Inc.
22186 *
22187 * This source code is licensed under the MIT license found in the
22188 * LICENSE file in the root directory of this source tree.
22189 *
22190 */
22191
22192
22193
22194var _prodInvariant = __webpack_require__(14);
22195
22196var ReactPropTypeLocationNames = __webpack_require__(191);
22197var ReactPropTypesSecret = __webpack_require__(193);
22198
22199var invariant = __webpack_require__(0);
22200var warning = __webpack_require__(1);
22201
22202var ReactComponentTreeHook;
22203
22204if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
22205 // Temporary hack.
22206 // Inline requires don't work well with Jest:
22207 // https://github.com/facebook/react/issues/7240
22208 // Remove the inline requires when we don't need them anymore:
22209 // https://github.com/facebook/react/pull/7178
22210 ReactComponentTreeHook = __webpack_require__(8);
22211}
22212
22213var loggedTypeFailures = {};
22214
22215/**
22216 * Assert that the values match with the type specs.
22217 * Error messages are memorized and will only be shown once.
22218 *
22219 * @param {object} typeSpecs Map of name to a ReactPropType
22220 * @param {object} values Runtime values that need to be type-checked
22221 * @param {string} location e.g. "prop", "context", "child context"
22222 * @param {string} componentName Name of the component for error messages.
22223 * @param {?object} element The React element that is being type-checked
22224 * @param {?number} debugID The React component instance that is being type-checked
22225 * @private
22226 */
22227function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
22228 for (var typeSpecName in typeSpecs) {
22229 if (typeSpecs.hasOwnProperty(typeSpecName)) {
22230 var error;
22231 // Prop type validation may throw. In case they do, we don't want to
22232 // fail the render phase where it didn't fail before. So we log it.
22233 // After these have been cleaned up, we'll let them throw.
22234 try {
22235 // This is intentionally an invariant that gets caught. It's the same
22236 // behavior as without this statement except with a better message.
22237 !(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;
22238 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
22239 } catch (ex) {
22240 error = ex;
22241 }
22242 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;
22243 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
22244 // Only monitor this failure once because there tends to be a lot of the
22245 // same error.
22246 loggedTypeFailures[error.message] = true;
22247
22248 var componentStackInfo = '';
22249
22250 if (process.env.NODE_ENV !== 'production') {
22251 if (!ReactComponentTreeHook) {
22252 ReactComponentTreeHook = __webpack_require__(8);
22253 }
22254 if (debugID !== null) {
22255 componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
22256 } else if (element !== null) {
22257 componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
22258 }
22259 }
22260
22261 process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
22262 }
22263 }
22264 }
22265}
22266
22267module.exports = checkReactTypeSpec;
22268
22269/***/ }),
22270/* 196 */
22271/***/ (function(module, exports, __webpack_require__) {
22272
22273"use strict";
22274/**
22275 * Copyright (c) 2013-present, Facebook, Inc.
22276 *
22277 * This source code is licensed under the MIT license found in the
22278 * LICENSE file in the root directory of this source tree.
22279 *
22280 */
22281
22282
22283
22284var _require = __webpack_require__(75),
22285 Component = _require.Component;
22286
22287var _require2 = __webpack_require__(13),
22288 isValidElement = _require2.isValidElement;
22289
22290var ReactNoopUpdateQueue = __webpack_require__(78);
22291var factory = __webpack_require__(95);
22292
22293module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue);
22294
22295/***/ }),
22296/* 197 */
22297/***/ (function(module, exports, __webpack_require__) {
22298
22299"use strict";
22300/**
22301 * Copyright (c) 2013-present, Facebook, Inc.
22302 *
22303 * This source code is licensed under the MIT license found in the
22304 * LICENSE file in the root directory of this source tree.
22305 *
22306 *
22307 */
22308
22309
22310
22311var nextDebugID = 1;
22312
22313function getNextDebugID() {
22314 return nextDebugID++;
22315}
22316
22317module.exports = getNextDebugID;
22318
22319/***/ }),
22320/* 198 */
22321/***/ (function(module, exports, __webpack_require__) {
22322
22323"use strict";
22324/**
22325 * Copyright (c) 2013-present, Facebook, Inc.
22326 *
22327 * This source code is licensed under the MIT license found in the
22328 * LICENSE file in the root directory of this source tree.
22329 *
22330 */
22331
22332
22333var _prodInvariant = __webpack_require__(14);
22334
22335var ReactElement = __webpack_require__(13);
22336
22337var invariant = __webpack_require__(0);
22338
22339/**
22340 * Returns the first child in a collection of children and verifies that there
22341 * is only one child in the collection.
22342 *
22343 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only
22344 *
22345 * The current implementation of this function assumes that a single child gets
22346 * passed without a wrapper, but the purpose of this helper function is to
22347 * abstract away the particular structure of children.
22348 *
22349 * @param {?object} children Child collection structure.
22350 * @return {ReactElement} The first and only `ReactElement` contained in the
22351 * structure.
22352 */
22353function onlyChild(children) {
22354 !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;
22355 return children;
22356}
22357
22358module.exports = onlyChild;
22359
22360/***/ }),
22361/* 199 */
22362/***/ (function(module, exports, __webpack_require__) {
22363
22364"use strict";
22365/**
22366 * Copyright (c) 2013-present, Facebook, Inc.
22367 *
22368 * This source code is licensed under the MIT license found in the
22369 * LICENSE file in the root directory of this source tree.
22370 *
22371 */
22372
22373
22374
22375var _prodInvariant = __webpack_require__(14);
22376
22377var ReactCurrentOwner = __webpack_require__(11);
22378var REACT_ELEMENT_TYPE = __webpack_require__(76);
22379
22380var getIteratorFn = __webpack_require__(79);
22381var invariant = __webpack_require__(0);
22382var KeyEscapeUtils = __webpack_require__(187);
22383var warning = __webpack_require__(1);
22384
22385var SEPARATOR = '.';
22386var SUBSEPARATOR = ':';
22387
22388/**
22389 * This is inlined from ReactElement since this file is shared between
22390 * isomorphic and renderers. We could extract this to a
22391 *
22392 */
22393
22394/**
22395 * TODO: Test that a single child and an array with one item have the same key
22396 * pattern.
22397 */
22398
22399var didWarnAboutMaps = false;
22400
22401/**
22402 * Generate a key string that identifies a component within a set.
22403 *
22404 * @param {*} component A component that could contain a manual key.
22405 * @param {number} index Index that is used if a manual key is not provided.
22406 * @return {string}
22407 */
22408function getComponentKey(component, index) {
22409 // Do some typechecking here since we call this blindly. We want to ensure
22410 // that we don't block potential future ES APIs.
22411 if (component && typeof component === 'object' && component.key != null) {
22412 // Explicit key
22413 return KeyEscapeUtils.escape(component.key);
22414 }
22415 // Implicit key determined by the index in the set
22416 return index.toString(36);
22417}
22418
22419/**
22420 * @param {?*} children Children tree container.
22421 * @param {!string} nameSoFar Name of the key path so far.
22422 * @param {!function} callback Callback to invoke with each child found.
22423 * @param {?*} traverseContext Used to pass information throughout the traversal
22424 * process.
22425 * @return {!number} The number of children in this subtree.
22426 */
22427function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
22428 var type = typeof children;
22429
22430 if (type === 'undefined' || type === 'boolean') {
22431 // All of the above are perceived as null.
22432 children = null;
22433 }
22434
22435 if (children === null || type === 'string' || type === 'number' ||
22436 // The following is inlined from ReactElement. This means we can optimize
22437 // some checks. React Fiber also inlines this logic for similar purposes.
22438 type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
22439 callback(traverseContext, children,
22440 // If it's the only child, treat the name as if it was wrapped in an array
22441 // so that it's consistent if the number of children grows.
22442 nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
22443 return 1;
22444 }
22445
22446 var child;
22447 var nextName;
22448 var subtreeCount = 0; // Count of children found in the current subtree.
22449 var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
22450
22451 if (Array.isArray(children)) {
22452 for (var i = 0; i < children.length; i++) {
22453 child = children[i];
22454 nextName = nextNamePrefix + getComponentKey(child, i);
22455 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
22456 }
22457 } else {
22458 var iteratorFn = getIteratorFn(children);
22459 if (iteratorFn) {
22460 var iterator = iteratorFn.call(children);
22461 var step;
22462 if (iteratorFn !== children.entries) {
22463 var ii = 0;
22464 while (!(step = iterator.next()).done) {
22465 child = step.value;
22466 nextName = nextNamePrefix + getComponentKey(child, ii++);
22467 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
22468 }
22469 } else {
22470 if (process.env.NODE_ENV !== 'production') {
22471 var mapsAsChildrenAddendum = '';
22472 if (ReactCurrentOwner.current) {
22473 var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
22474 if (mapsAsChildrenOwnerName) {
22475 mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
22476 }
22477 }
22478 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;
22479 didWarnAboutMaps = true;
22480 }
22481 // Iterator will provide entry [k,v] tuples rather than values.
22482 while (!(step = iterator.next()).done) {
22483 var entry = step.value;
22484 if (entry) {
22485 child = entry[1];
22486 nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
22487 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
22488 }
22489 }
22490 }
22491 } else if (type === 'object') {
22492 var addendum = '';
22493 if (process.env.NODE_ENV !== 'production') {
22494 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.';
22495 if (children._isReactElement) {
22496 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.';
22497 }
22498 if (ReactCurrentOwner.current) {
22499 var name = ReactCurrentOwner.current.getName();
22500 if (name) {
22501 addendum += ' Check the render method of `' + name + '`.';
22502 }
22503 }
22504 }
22505 var childrenString = String(children);
22506 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;
22507 }
22508 }
22509
22510 return subtreeCount;
22511}
22512
22513/**
22514 * Traverses children that are typically specified as `props.children`, but
22515 * might also be specified through attributes:
22516 *
22517 * - `traverseAllChildren(this.props.children, ...)`
22518 * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
22519 *
22520 * The `traverseContext` is an optional argument that is passed through the
22521 * entire traversal. It can be used to store accumulations or anything else that
22522 * the callback might find relevant.
22523 *
22524 * @param {?*} children Children tree object.
22525 * @param {!function} callback To invoke upon traversing each child.
22526 * @param {?*} traverseContext Context for traversal.
22527 * @return {!number} The number of children in this subtree.
22528 */
22529function traverseAllChildren(children, callback, traverseContext) {
22530 if (children == null) {
22531 return 0;
22532 }
22533
22534 return traverseAllChildrenImpl(children, '', callback, traverseContext);
22535}
22536
22537module.exports = traverseAllChildren;
22538
22539/***/ }),
22540/* 200 */
22541/***/ (function(module, exports) {
22542
22543module.exports = require("body-parser");
22544
22545/***/ }),
22546/* 201 */
22547/***/ (function(module, exports) {
22548
22549module.exports = require("cookie");
22550
22551/***/ }),
22552/* 202 */
22553/***/ (function(module, exports) {
22554
22555module.exports = require("cookie-parser");
22556
22557/***/ }),
22558/* 203 */
22559/***/ (function(module, exports) {
22560
22561module.exports = require("esniff");
22562
22563/***/ }),
22564/* 204 */
22565/***/ (function(module, exports) {
22566
22567module.exports = require("express");
22568
22569/***/ }),
22570/* 205 */
22571/***/ (function(module, exports) {
22572
22573module.exports = require("forcedomain");
22574
22575/***/ }),
22576/* 206 */
22577/***/ (function(module, exports) {
22578
22579module.exports = require("hoist-non-react-statics");
22580
22581/***/ }),
22582/* 207 */
22583/***/ (function(module, exports) {
22584
22585module.exports = require("morgan");
22586
22587/***/ }),
22588/* 208 */
22589/***/ (function(module, exports) {
22590
22591module.exports = require("parseurl");
22592
22593/***/ }),
22594/* 209 */
22595/***/ (function(module, exports) {
22596
22597module.exports = require("preconditions");
22598
22599/***/ }),
22600/* 210 */
22601/***/ (function(module, exports) {
22602
22603module.exports = require("querystring");
22604
22605/***/ }),
22606/* 211 */
22607/***/ (function(module, exports) {
22608
22609module.exports = require("react-redux");
22610
22611/***/ }),
22612/* 212 */
22613/***/ (function(module, exports) {
22614
22615module.exports = require("react-router");
22616
22617/***/ }),
22618/* 213 */
22619/***/ (function(module, exports) {
22620
22621module.exports = require("redux");
22622
22623/***/ }),
22624/* 214 */
22625/***/ (function(module, exports) {
22626
22627module.exports = require("redux-thunk");
22628
22629/***/ }),
22630/* 215 */
22631/***/ (function(module, exports) {
22632
22633module.exports = require("rotating-file-stream");
22634
22635/***/ }),
22636/* 216 */
22637/***/ (function(module, exports) {
22638
22639module.exports = require("url");
22640
22641/***/ }),
22642/* 217 */
22643/***/ (function(module, exports) {
22644
22645module.exports = require("winston");
22646
22647/***/ }),
22648/* 218 */
22649/***/ (function(module, exports) {
22650
22651module.exports = require("winston-daily-rotate-file");
22652
22653/***/ })
22654/******/ ]);
22655//# sourceMappingURL=catela.build.server.js.map
\No newline at end of file