vendor: 5,907 bytes, lines 1-163
1/******/ (function(modules) { // webpackBootstrap 2/******/ // The module cache 3/******/ var installedModules = {}; 4/******/ 5/******/ // The require function 6/******/ function __webpack_require__(moduleId) { 7/******/ 8/******/ // Check if module is in cache 9/******/ if(installedModules[moduleId]) { 10/******/ return installedModules[moduleId].exports; 11/******/ } 12/******/ // Create a new module (and put it into the cache) 13/******/ var module = installedModules[moduleId] = { 14/******/ i: moduleId, 15/******/ l: false, 16/******/ exports: {} 17/******/ }; 18/******/ 19/******/ // Execute the module function 20/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21/******/ 22/******/ // Flag the module as loaded 23/******/ module.l = true; 24/******/ 25/******/ // Return the exports of the module 26/******/ return module.exports; 27/******/ } 28/******/ 29/******/ 30/******/ // expose the modules object (__webpack_modules__) 31/******/ __webpack_require__.m = modules; 32/******/ 33/******/ // expose the module cache 34/******/ __webpack_require__.c = installedModules; 35/******/ 36/******/ // identity function for calling harmony imports with the correct context 37/******/ __webpack_require__.i = function(value) { return value; }; 38/******/ 39/******/ // define getter function for harmony exports 40/******/ __webpack_require__.d = function(exports, name, getter) { 41/******/ if(!__webpack_require__.o(exports, name)) { 42/******/ Object.defineProperty(exports, name, { 43/******/ configurable: false, 44/******/ enumerable: true, 45/******/ get: getter 46/******/ }); 47/******/ } 48/******/ }; 49/******/ 50/******/ // getDefaultExport function for compatibility with non-harmony modules 51/******/ __webpack_require__.n = function(module) { 52/******/ var getter = module && module.__esModule ? 53/******/ function getDefault() { return module['default']; } : 54/******/ function getModuleExports() { return module; }; 55/******/ __webpack_require__.d(getter, 'a', getter); 56/******/ return getter; 57/******/ }; 58/******/ 59/******/ // Object.prototype.hasOwnProperty.call 60/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 61/******/ 62/******/ // __webpack_public_path__ 63/******/ __webpack_require__.p = ""; 64/******/ 65/******/ // Load entry module and return exports 66/******/ return __webpack_require__(__webpack_require__.s = 85); 67/******/ }) 68/************************************************************************/ 69/******/ ([ 70/* 0 */ 71/***/ (function(module, exports) { 72 73// shim for using process in browser 74var process = module.exports = {}; 75 76// cached from whatever global is present so that test runners that stub it 77// don't break things. But we need to wrap it in a try catch in case it is 78// wrapped in strict mode code which doesn't define any globals. It's inside a 79// function because try/catches deoptimize in certain engines. 80 81var cachedSetTimeout; 82var cachedClearTimeout; 83 84function defaultSetTimout() { 85 throw new Error('setTimeout has not been defined'); 86} 87function defaultClearTimeout () { 88 throw new Error('clearTimeout has not been defined'); 89} 90(function () { 91 try { 92 if (typeof setTimeout === 'function') { 93 cachedSetTimeout = setTimeout; 94 } else { 95 cachedSetTimeout = defaultSetTimout; 96 } 97 } catch (e) { 98 cachedSetTimeout = defaultSetTimout; 99 } 100 try { 101 if (typeof clearTimeout === 'function') { 102 cachedClearTimeout = clearTimeout; 103 } else { 104 cachedClearTimeout = defaultClearTimeout; 105 } 106 } catch (e) { 107 cachedClearTimeout = defaultClearTimeout; 108 } 109} ()) 110function runTimeout(fun) { 111 if (cachedSetTimeout === setTimeout) { 112 //normal enviroments in sane situations 113 return setTimeout(fun, 0); 114 } 115 // if setTimeout wasn't available but was latter defined 116 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { 117 cachedSetTimeout = setTimeout; 118 return setTimeout(fun, 0); 119 } 120 try { 121 // when when somebody has screwed with setTimeout but no I.E. maddness 122 return cachedSetTimeout(fun, 0); 123 } catch(e){ 124 try { 125 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally 126 return cachedSetTimeout.call(null, fun, 0); 127 } catch(e){ 128 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error 129 return cachedSetTimeout.call(this, fun, 0); 130 } 131 } 132 133 134} 135function runClearTimeout(marker) { 136 if (cachedClearTimeout === clearTimeout) { 137 //normal enviroments in sane situations 138 return clearTimeout(marker); 139 } 140 // if clearTimeout wasn't available but was latter defined 141 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { 142 cachedClearTimeout = clearTimeout; 143 return clearTimeout(marker); 144 } 145 try { 146 // when when somebody has screwed with setTimeout but no I.E. maddness 147 return cachedClearTimeout(marker); 148 } catch (e){ 149 try { 150 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally 151 return cachedClearTimeout.call(null, marker); 152 } catch (e){ 153 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. 154 // Some versions of I.E. have different rules for clearTimeout vs setTimeout 155 return cachedClearTimeout.call(this, marker); 156 } 157 } 158 159 160 161} 162var queue = []; 163var draining = false;
vendor: 5,255 bytes, lines 164-362
164var currentQueue; 165var queueIndex = -1; 166 167function cleanUpNextTick() { 168 if (!draining || !currentQueue) { 169 return; 170 } 171 draining = false; 172 if (currentQueue.length) { 173 queue = currentQueue.concat(queue); 174 } else { 175 queueIndex = -1; 176 } 177 if (queue.length) { 178 drainQueue(); 179 } 180} 181 182function drainQueue() { 183 if (draining) { 184 return; 185 } 186 var timeout = runTimeout(cleanUpNextTick); 187 draining = true; 188 189 var len = queue.length; 190 while(len) { 191 currentQueue = queue; 192 queue = []; 193 while (++queueIndex < len) { 194 if (currentQueue) { 195 currentQueue[queueIndex].run(); 196 } 197 } 198 queueIndex = -1; 199 len = queue.length; 200 } 201 currentQueue = null; 202 draining = false; 203 runClearTimeout(timeout); 204} 205 206process.nextTick = function (fun) { 207 var args = new Array(arguments.length - 1); 208 if (arguments.length > 1) { 209 for (var i = 1; i < arguments.length; i++) { 210 args[i - 1] = arguments[i]; 211 } 212 } 213 queue.push(new Item(fun, args)); 214 if (queue.length === 1 && !draining) { 215 runTimeout(drainQueue); 216 } 217}; 218 219// v8 likes predictible objects 220function Item(fun, array) { 221 this.fun = fun; 222 this.array = array; 223} 224Item.prototype.run = function () { 225 this.fun.apply(null, this.array); 226}; 227process.title = 'browser'; 228process.browser = true; 229process.env = {}; 230process.argv = []; 231process.version = ''; // empty string to avoid regexp issues 232process.versions = {}; 233 234function noop() {} 235 236process.on = noop; 237process.addListener = noop; 238process.once = noop; 239process.off = noop; 240process.removeListener = noop; 241process.removeAllListeners = noop; 242process.emit = noop; 243process.prependListener = noop; 244process.prependOnceListener = noop; 245 246process.listeners = function (name) { return [] } 247 248process.binding = function (name) { 249 throw new Error('process.binding is not supported'); 250}; 251 252process.cwd = function () { return '/' }; 253process.chdir = function (dir) { 254 throw new Error('process.chdir is not supported'); 255}; 256process.umask = function() { return 0; }; 257 258 259/***/ }), 260/* 1 */ 261/***/ (function(module, exports, __webpack_require__) { 262 263"use strict"; 264/* WEBPACK VAR INJECTION */(function(process) {/** 265 * Copyright (c) 2013-present, Facebook, Inc. 266 * All rights reserved. 267 * 268 * This source code is licensed under the BSD-style license found in the 269 * LICENSE file in the root directory of this source tree. An additional grant 270 * of patent rights can be found in the PATENTS file in the same directory. 271 * 272 */ 273 274 275 276/** 277 * Use invariant() to assert state which your program assumes to be true. 278 * 279 * Provide sprintf-style format (only %s is supported) and arguments 280 * to provide information about what broke and what you were 281 * expecting. 282 * 283 * The invariant message will be stripped in production, but the invariant 284 * will remain to ensure logic does not differ in production. 285 */ 286 287var validateFormat = function validateFormat(format) {}; 288 289if (process.env.NODE_ENV !== 'production') { 290 validateFormat = function validateFormat(format) { 291 if (format === undefined) { 292 throw new Error('invariant requires an error message argument'); 293 } 294 }; 295} 296 297function invariant(condition, format, a, b, c, d, e, f) { 298 validateFormat(format); 299 300 if (!condition) { 301 var error; 302 if (format === undefined) { 303 error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); 304 } else { 305 var args = [a, b, c, d, e, f]; 306 var argIndex = 0; 307 error = new Error(format.replace(/%s/g, function () { 308 return args[argIndex++]; 309 })); 310 error.name = 'Invariant Violation'; 311 } 312 313 error.framesToPop = 1; // we don't care about invariant's own frame 314 throw error; 315 } 316} 317 318module.exports = invariant; 319/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 320 321/***/ }), 322/* 2 */ 323/***/ (function(module, exports, __webpack_require__) { 324 325"use strict"; 326/* WEBPACK VAR INJECTION */(function(process) {/** 327 * Copyright 2014-2015, Facebook, Inc. 328 * All rights reserved. 329 * 330 * This source code is licensed under the BSD-style license found in the 331 * LICENSE file in the root directory of this source tree. An additional grant 332 * of patent rights can be found in the PATENTS file in the same directory. 333 * 334 */ 335 336 337 338var emptyFunction = __webpack_require__(9); 339 340/** 341 * Similar to invariant but only logs a warning if the condition is not met. 342 * This can be used to log issues in development environments in critical 343 * paths. Removing the logging code for production environments will keep the 344 * same logic and follow the same code paths. 345 */ 346 347var warning = emptyFunction; 348 349if (process.env.NODE_ENV !== 'production') { 350 (function () { 351 var printWarning = function printWarning(format) { 352 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 353 args[_key - 1] = arguments[_key]; 354 } 355 356 var argIndex = 0; 357 var message = 'Warning: ' + format.replace(/%s/g, function () { 358 return args[argIndex++]; 359 }); 360 if (typeof console !== 'undefined') { 361 console.error(message); 362 }
363 try { 364 // --- Welcome to debugging React --- 365 // This error was thrown as a convenience so that you can use this stack 366 // to find the callsite that caused this warning to fire. 367 throw new Error(message); 368 } catch (x) {} 369 }; 370 371 warning = function warning(condition, format) { 372 if (format === undefined) { 373 throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); 374 } 375 376 if (format.indexOf('Failed Composite propType: ') === 0) { 377 return; // Ignore CompositeComponent proptype check. 378 } 379 380 if (!condition) { 381 for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { 382 args[_key2 - 2] = arguments[_key2]; 383 } 384 385 printWarning.apply(undefined, [format].concat(args)); 386 } 387 }; 388 })(); 389} 390 391module.exports = warning; 392/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 393 394/***/ }), 395/* 3 */ 396/***/ (function(module, exports, __webpack_require__) { 397 398"use strict"; 399/** 400 * Copyright (c) 2013-present, Facebook, Inc. 401 * All rights reserved. 402 * 403 * This source code is licensed under the BSD-style license found in the 404 * LICENSE file in the root directory of this source tree. An additional grant 405 * of patent rights can be found in the PATENTS file in the same directory. 406 * 407 * 408 */ 409 410 411/** 412 * WARNING: DO NOT manually require this module. 413 * This is a replacement for `invariant(...)` used by the error code system 414 * and will _only_ be required by the corresponding babel pass. 415 * It always throws. 416 */ 417 418function reactProdInvariant(code) { 419 var argCount = arguments.length - 1; 420 421 var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; 422 423 for (var argIdx = 0; argIdx < argCount; argIdx++) { 424 message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); 425 } 426 427 message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; 428 429 var error = new Error(message); 430 error.name = 'Invariant Violation'; 431 error.framesToPop = 1; // we don't care about reactProdInvariant's own frame 432 433 throw error; 434} 435 436module.exports = reactProdInvariant; 437 438/***/ }), 439/* 4 */ 440/***/ (function(module, exports, __webpack_require__) { 441 442"use strict"; 443/* 444object-assign 445(c) Sindre Sorhus 446@license MIT
447*/ 448 449 450/* eslint-disable no-unused-vars */ 451var getOwnPropertySymbols = Object.getOwnPropertySymbols; 452var hasOwnProperty = Object.prototype.hasOwnProperty; 453var propIsEnumerable = Object.prototype.propertyIsEnumerable; 454 455function toObject(val) { 456 if (val === null || val === undefined) { 457 throw new TypeError('Object.assign cannot be called with null or undefined'); 458 } 459 460 return Object(val); 461} 462 463function shouldUseNative() { 464 try { 465 if (!Object.assign) { 466 return false; 467 } 468 469 // Detect buggy property enumeration order in older V8 versions. 470 471 // https://bugs.chromium.org/p/v8/issues/detail?id=4118 472 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers 473 test1[5] = 'de'; 474 if (Object.getOwnPropertyNames(test1)[0] === '5') { 475 return false; 476 } 477 478 // https://bugs.chromium.org/p/v8/issues/detail?id=3056 479 var test2 = {}; 480 for (var i = 0; i < 10; i++) { 481 test2['_' + String.fromCharCode(i)] = i; 482 } 483 var order2 = Object.getOwnPropertyNames(test2).map(function (n) { 484 return test2[n]; 485 }); 486 if (order2.join('') !== '0123456789') { 487 return false; 488 } 489 490 // https://bugs.chromium.org/p/v8/issues/detail?id=3056 491 var test3 = {}; 492 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { 493 test3[letter] = letter; 494 }); 495 if (Object.keys(Object.assign({}, test3)).join('') !== 496 'abcdefghijklmnopqrst') { 497 return false; 498 } 499 500 return true; 501 } catch (err) { 502 // We don't expect any of the above to throw, but better to be safe. 503 return false; 504 } 505} 506 507module.exports = shouldUseNative() ? Object.assign : function (target, source) { 508 var from; 509 var to = toObject(target); 510 var symbols; 511 512 for (var s = 1; s < arguments.length; s++) { 513 from = Object(arguments[s]); 514 515 for (var key in from) { 516 if (hasOwnProperty.call(from, key)) { 517 to[key] = from[key]; 518 } 519 } 520 521 if (getOwnPropertySymbols) { 522 symbols = getOwnPropertySymbols(from); 523 for (var i = 0; i < symbols.length; i++) { 524 if (propIsEnumerable.call(from, symbols[i])) { 525 to[symbols[i]] = from[symbols[i]]; 526 } 527 } 528 } 529 } 530 531 return to; 532}; 533 534 535/***/ }), 536/* 5 */ 537/***/ (function(module, exports, __webpack_require__) { 538 539"use strict"; 540/* WEBPACK VAR INJECTION */(function(process) {/** 541 * Copyright 2013-present, Facebook, Inc. 542 * All rights reserved. 543 * 544 * This source code is licensed under the BSD-style license found in the 545 * LICENSE file in the root directory of this source tree. An additional grant 546 * of patent rights can be found in the PATENTS file in the same directory. 547 * 548 */ 549 550 551 552var _prodInvariant = __webpack_require__(3); 553 554var DOMProperty = __webpack_require__(13); 555var ReactDOMComponentFlags = __webpack_require__(59); 556 557var invariant = __webpack_require__(1); 558 559var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; 560var Flags = ReactDOMComponentFlags; 561 562var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2); 563 564/** 565 * Check if a given node should be cached. 566 */ 567function shouldPrecacheNode(node, nodeID) { 568 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 + ' '; 569} 570 571/** 572 * Drill down (through composites and empty components) until we get a host or 573 * host text component. 574 * 575 * This is pretty polymorphic but unavoidable with the current structure we have 576 * for `_renderedChildren`. 577 */ 578function getRenderedHostOrTextFromComponent(component) { 579 var rendered; 580 while (rendered = component._renderedComponent) { 581 component = rendered; 582 } 583 return component; 584} 585 586/** 587 * Populate `_hostNode` on the rendered host/text component with the given 588 * DOM node. The passed `inst` can be a composite. 589 */ 590function precacheNode(inst, node) { 591 var hostInst = getRenderedHostOrTextFromComponent(inst); 592 hostInst._hostNode = node; 593 node[internalInstanceKey] = hostInst; 594} 595 596function uncacheNode(inst) { 597 var node = inst._hostNode; 598 if (node) { 599 delete node[internalInstanceKey]; 600 inst._hostNode = null; 601 } 602} 603 604/** 605 * Populate `_hostNode` on each child of `inst`, assuming that the children 606 * match up with the DOM (element) children of `node`. 607 * 608 * We cache entire levels at once to avoid an n^2 problem where we access the 609 * children of a node sequentially and have to walk from the start to our target 610 * node every time. 611 * 612 * Since we update `_renderedChildren` and the actual DOM at (slightly) 613 * different times, we could race here and see a newer `_renderedChildren` than 614 * the DOM nodes we see. To avoid this, ReactMultiChild calls 615 * `prepareToManageChildren` before we change `_renderedChildren`, at which 616 * time the container's child nodes are always cached (until it unmounts). 617 */ 618function precacheChildNodes(inst, node) { 619 if (inst._flags & Flags.hasCachedChildNodes) { 620 return; 621 } 622 var children = inst._renderedChildren; 623 var childNode = node.firstChild; 624 outer: for (var name in children) { 625 if (!children.hasOwnProperty(name)) { 626 continue; 627 } 628 var childInst = children[name]; 629 var childID = getRenderedHostOrTextFromComponent(childInst)._domID; 630 if (childID === 0) { 631 // We're currently unmounting this child in ReactMultiChild; skip it. 632 continue; 633 } 634 // We assume the child nodes are in the same order as the child instances. 635 for (; childNode !== null; childNode = childNode.nextSibling) { 636 if (shouldPrecacheNode(childNode, childID)) { 637 precacheNode(childInst, childNode); 638 continue outer; 639 } 640 } 641 // We reached the end of the DOM children without finding an ID match. 642 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0; 643 } 644 inst._flags |= Flags.hasCachedChildNodes; 645} 646 647/** 648 * Given a DOM node, return the closest ReactDOMComponent or 649 * ReactDOMTextComponent instance ancestor. 650 */ 651function getClosestInstanceFromNode(node) { 652 if (node[internalInstanceKey]) { 653 return node[internalInstanceKey]; 654 } 655 656 // Walk up the tree until we find an ancestor whose instance we have cached. 657 var parents = []; 658 while (!node[internalInstanceKey]) { 659 parents.push(node); 660 if (node.parentNode) { 661 node = node.parentNode; 662 } else { 663 // Top of the tree. This node must not be part of a React tree (or is 664 // unmounted, potentially). 665 return null; 666 } 667 } 668 669 var closest; 670 var inst; 671 for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) { 672 closest = inst; 673 if (parents.length) { 674 precacheChildNodes(inst, node); 675 } 676 } 677 678 return closest; 679} 680
681/** 682 * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent 683 * instance, or null if the node was not rendered by this React. 684 */ 685function getInstanceFromNode(node) { 686 var inst = getClosestInstanceFromNode(node); 687 if (inst != null && inst._hostNode === node) { 688 return inst; 689 } else { 690 return null; 691 } 692} 693 694/** 695 * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding 696 * DOM node. 697 */ 698function getNodeFromInstance(inst) { 699 // Without this first invariant, passing a non-DOM-component triggers the next 700 // invariant for a missing parent, which is super confusing. 701 !(inst._hostNode !== undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; 702 703 if (inst._hostNode) { 704 return inst._hostNode; 705 } 706 707 // Walk up the tree until we find an ancestor whose DOM node we have cached. 708 var parents = []; 709 while (!inst._hostNode) { 710 parents.push(inst); 711 !inst._hostParent ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0; 712 inst = inst._hostParent; 713 } 714 715 // Now parents contains each ancestor that does *not* have a cached native 716 // node, and `inst` is the deepest ancestor that does. 717 for (; parents.length; inst = parents.pop()) { 718 precacheChildNodes(inst, inst._hostNode); 719 } 720 721 return inst._hostNode; 722} 723 724var ReactDOMComponentTree = { 725 getClosestInstanceFromNode: getClosestInstanceFromNode, 726 getInstanceFromNode: getInstanceFromNode, 727 getNodeFromInstance: getNodeFromInstance, 728 precacheChildNodes: precacheChildNodes, 729 precacheNode: precacheNode, 730 uncacheNode: uncacheNode 731}; 732 733module.exports = ReactDOMComponentTree; 734/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 735 736/***/ }), 737/* 6 */ 738/***/ (function(module, exports, __webpack_require__) { 739 740"use strict"; 741/** 742 * Copyright (c) 2013-present, Facebook, Inc. 743 * All rights reserved. 744 * 745 * This source code is licensed under the BSD-style license found in the 746 * LICENSE file in the root directory of this source tree. An additional grant 747 * of patent rights can be found in the PATENTS file in the same directory. 748 * 749 */ 750 751 752 753var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); 754 755/** 756 * Simple, lightweight module assisting with the detection and context of 757 * Worker. Helps avoid circular dependencies and allows code to reason about 758 * whether or not they are in a Worker, even if they never include the main 759 * `ReactWorker` dependency. 760 */ 761var ExecutionEnvironment = { 762 763 canUseDOM: canUseDOM, 764 765 canUseWorkers: typeof Worker !== 'undefined', 766 767 canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), 768 769 canUseViewport: canUseDOM && !!window.screen, 770 771 isInWorker: !canUseDOM // For now, this is true - might change in the future. 772 773}; 774 775module.exports = ExecutionEnvironment; 776 777/***/ }), 778/* 7 */ 779/***/ (function(module, exports, __webpack_require__) { 780 781"use strict"; 782/* WEBPACK VAR INJECTION */(function(process) {/** 783 * Copyright 2016-present, Facebook, Inc. 784 * All rights reserved. 785 * 786 * This source code is licensed under the BSD-style license found in the 787 * LICENSE file in the root directory of this source tree. An additional grant 788 * of patent rights can be found in the PATENTS file in the same directory. 789 * 790 * 791 */ 792 793 794 795var _prodInvariant = __webpack_require__(16); 796 797var ReactCurrentOwner = __webpack_require__(11); 798 799var invariant = __webpack_require__(1); 800var warning = __webpack_require__(2); 801 802function isNative(fn) { 803 // Based on isNative() from Lodash 804 var funcToString = Function.prototype.toString; 805 var hasOwnProperty = Object.prototype.hasOwnProperty; 806 var reIsNative = RegExp('^' + funcToString 807 // Take an example native function source for comparison 808 .call(hasOwnProperty) 809 // Strip regex characters so we can use it for regex 810 .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') 811 // Remove hasOwnProperty from the template to make it generic 812 .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); 813 try { 814 var source = funcToString.call(fn); 815 return reIsNative.test(source); 816 } catch (err) { 817 return false;
818 } 819} 820 821var canUseCollections = 822// Array.from 823typeof Array.from === 'function' && 824// Map 825typeof Map === 'function' && isNative(Map) && 826// Map.prototype.keys 827Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) && 828// Set 829typeof Set === 'function' && isNative(Set) && 830// Set.prototype.keys 831Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys); 832 833var setItem; 834var getItem; 835var removeItem; 836var getItemIDs; 837var addRoot; 838var removeRoot; 839var getRootIDs; 840 841if (canUseCollections) { 842 var itemMap = new Map(); 843 var rootIDSet = new Set(); 844 845 setItem = function (id, item) { 846 itemMap.set(id, item); 847 }; 848 getItem = function (id) { 849 return itemMap.get(id); 850 }; 851 removeItem = function (id) { 852 itemMap['delete'](id); 853 }; 854 getItemIDs = function () { 855 return Array.from(itemMap.keys()); 856 }; 857 858 addRoot = function (id) { 859 rootIDSet.add(id); 860 }; 861 removeRoot = function (id) { 862 rootIDSet['delete'](id); 863 }; 864 getRootIDs = function () { 865 return Array.from(rootIDSet.keys()); 866 }; 867} else { 868 var itemByKey = {}; 869 var rootByKey = {}; 870 871 // Use non-numeric keys to prevent V8 performance issues: 872 // https://github.com/facebook/react/pull/7232 873 var getKeyFromID = function (id) { 874 return '.' + id; 875 }; 876 var getIDFromKey = function (key) { 877 return parseInt(key.substr(1), 10); 878 }; 879 880 setItem = function (id, item) { 881 var key = getKeyFromID(id); 882 itemByKey[key] = item; 883 }; 884 getItem = function (id) { 885 var key = getKeyFromID(id); 886 return itemByKey[key]; 887 }; 888 removeItem = function (id) { 889 var key = getKeyFromID(id); 890 delete itemByKey[key]; 891 }; 892 getItemIDs = function () { 893 return Object.keys(itemByKey).map(getIDFromKey); 894 }; 895 896 addRoot = function (id) { 897 var key = getKeyFromID(id); 898 rootByKey[key] = true; 899 }; 900 removeRoot = function (id) { 901 var key = getKeyFromID(id); 902 delete rootByKey[key]; 903 }; 904 getRootIDs = function () { 905 return Object.keys(rootByKey).map(getIDFromKey); 906 }; 907} 908 909var unmountedIDs = []; 910 911function purgeDeep(id) { 912 var item = getItem(id); 913 if (item) { 914 var childIDs = item.childIDs; 915 916 removeItem(id); 917 childIDs.forEach(purgeDeep); 918 } 919} 920 921function describeComponentFrame(name, source, ownerName) { 922 return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : ''); 923} 924 925function getDisplayName(element) { 926 if (element == null) { 927 return '#empty'; 928 } else if (typeof element === 'string' || typeof element === 'number') { 929 return '#text'; 930 } else if (typeof element.type === 'string') { 931 return element.type; 932 } else { 933 return element.type.displayName || element.type.name || 'Unknown'; 934 } 935} 936 937function describeID(id) { 938 var name = ReactComponentTreeHook.getDisplayName(id); 939 var element = ReactComponentTreeHook.getElement(id); 940 var ownerID = ReactComponentTreeHook.getOwnerID(id); 941 var ownerName; 942 if (ownerID) { 943 ownerName = ReactComponentTreeHook.getDisplayName(ownerID); 944 } 945 process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0; 946 return describeComponentFrame(name, element && element._source, ownerName); 947} 948 949var ReactComponentTreeHook = { 950 onSetChildren: function (id, nextChildIDs) { 951 var item = getItem(id); 952 !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0; 953 item.childIDs = nextChildIDs; 954 955 for (var i = 0; i < nextChildIDs.length; i++) { 956 var nextChildID = nextChildIDs[i]; 957 var nextChild = getItem(nextChildID); 958 !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; 959 !(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; 960 !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; 961 if (nextChild.parentID == null) { 962 nextChild.parentID = id; 963 // TODO: This shouldn't be necessary but mounting a new root during in 964 // componentWillMount currently causes not-yet-mounted components to 965 // be purged from our tree data so their parent id is missing. 966 } 967 !(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; 968 } 969 }, 970 onBeforeMountComponent: function (id, element, parentID) { 971 var item = { 972 element: element, 973 parentID: parentID, 974 text: null, 975 childIDs: [], 976 isMounted: false, 977 updateCount: 0 978 }; 979 setItem(id, item); 980 }, 981 onBeforeUpdateComponent: function (id, element) { 982 var item = getItem(id); 983 if (!item || !item.isMounted) { 984 // We may end up here as a result of setState() in componentWillUnmount(). 985 // In this case, ignore the element. 986 return; 987 } 988 item.element = element; 989 }, 990 onMountComponent: function (id) { 991 var item = getItem(id); 992 !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0; 993 item.isMounted = true;
994 var isRoot = item.parentID === 0; 995 if (isRoot) { 996 addRoot(id); 997 } 998 }, 999 onUpdateComponent: function (id) { 1000 var item = getItem(id); 1001 if (!item || !item.isMounted) { 1002 // We may end up here as a result of setState() in componentWillUnmount(). 1003 // In this case, ignore the element. 1004 return; 1005 } 1006 item.updateCount++; 1007 }, 1008 onUnmountComponent: function (id) { 1009 var item = getItem(id); 1010 if (item) { 1011 // We need to check if it exists. 1012 // `item` might not exist if it is inside an error boundary, and a sibling 1013 // error boundary child threw while mounting. Then this instance never 1014 // got a chance to mount, but it still gets an unmounting event during 1015 // the error boundary cleanup. 1016 item.isMounted = false; 1017 var isRoot = item.parentID === 0; 1018 if (isRoot) { 1019 removeRoot(id); 1020 } 1021 } 1022 unmountedIDs.push(id); 1023 }, 1024 purgeUnmountedComponents: function () { 1025 if (ReactComponentTreeHook._preventPurging) { 1026 // Should only be used for testing. 1027 return; 1028 } 1029 1030 for (var i = 0; i < unmountedIDs.length; i++) { 1031 var id = unmountedIDs[i]; 1032 purgeDeep(id); 1033 } 1034 unmountedIDs.length = 0; 1035 }, 1036 isMounted: function (id) { 1037 var item = getItem(id); 1038 return item ? item.isMounted : false; 1039 }, 1040 getCurrentStackAddendum: function (topElement) { 1041 var info = ''; 1042 if (topElement) { 1043 var name = getDisplayName(topElement); 1044 var owner = topElement._owner; 1045 info += describeComponentFrame(name, topElement._source, owner && owner.getName()); 1046 } 1047 1048 var currentOwner = ReactCurrentOwner.current; 1049 var id = currentOwner && currentOwner._debugID; 1050 1051 info += ReactComponentTreeHook.getStackAddendumByID(id); 1052 return info; 1053 }, 1054 getStackAddendumByID: function (id) { 1055 var info = ''; 1056 while (id) { 1057 info += describeID(id); 1058 id = ReactComponentTreeHook.getParentID(id); 1059 } 1060 return info; 1061 }, 1062 getChildIDs: function (id) { 1063 var item = getItem(id); 1064 return item ? item.childIDs : []; 1065 }, 1066 getDisplayName: function (id) { 1067 var element = ReactComponentTreeHook.getElement(id); 1068 if (!element) { 1069 return null; 1070 } 1071 return getDisplayName(element); 1072 }, 1073 getElement: function (id) { 1074 var item = getItem(id); 1075 return item ? item.element : null; 1076 }, 1077 getOwnerID: function (id) { 1078 var element = ReactComponentTreeHook.getElement(id); 1079 if (!element || !element._owner) { 1080 return null; 1081 } 1082 return element._owner._debugID; 1083 }, 1084 getParentID: function (id) { 1085 var item = getItem(id); 1086 return item ? item.parentID : null; 1087 }, 1088 getSource: function (id) { 1089 var item = getItem(id); 1090 var element = item ? item.element : null; 1091 var source = element != null ? element._source : null; 1092 return source; 1093 }, 1094 getText: function (id) { 1095 var element = ReactComponentTreeHook.getElement(id); 1096 if (typeof element === 'string') { 1097 return element; 1098 } else if (typeof element === 'number') { 1099 return '' + element; 1100 } else { 1101 return null; 1102 } 1103 }, 1104 getUpdateCount: function (id) { 1105 var item = getItem(id); 1106 return item ? item.updateCount : 0; 1107 }, 1108 1109 1110 getRootIDs: getRootIDs, 1111 getRegisteredIDs: getItemIDs 1112}; 1113 1114module.exports = ReactComponentTreeHook; 1115/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 1116 1117/***/ }), 1118/* 8 */ 1119/***/ (function(module, exports, __webpack_require__) { 1120 1121"use strict"; 1122/* WEBPACK VAR INJECTION */(function(process) {/** 1123 * Copyright 2016-present, Facebook, Inc. 1124 * All rights reserved. 1125 * 1126 * This source code is licensed under the BSD-style license found in the 1127 * LICENSE file in the root directory of this source tree. An additional grant 1128 * of patent rights can be found in the PATENTS file in the same directory. 1129 * 1130 * 1131 */ 1132 1133 1134 1135// Trust the developer to only use ReactInstrumentation with a __DEV__ check 1136 1137var debugTool = null; 1138 1139if (process.env.NODE_ENV !== 'production') { 1140 var ReactDebugTool = __webpack_require__(133); 1141 debugTool = ReactDebugTool; 1142} 1143 1144module.exports = { debugTool: debugTool }; 1145/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 1146 1147/***/ }), 1148/* 9 */ 1149/***/ (function(module, exports, __webpack_require__) { 1150 1151"use strict"; 1152 1153 1154/** 1155 * Copyright (c) 2013-present, Facebook, Inc. 1156 * All rights reserved. 1157 * 1158 * This source code is licensed under the BSD-style license found in the 1159 * LICENSE file in the root directory of this source tree. An additional grant 1160 * of patent rights can be found in the PATENTS file in the same directory. 1161 * 1162 * 1163 */ 1164 1165function makeEmptyFunction(arg) { 1166 return function () { 1167 return arg; 1168 }; 1169} 1170 1171/** 1172 * This function accepts and discards inputs; it has no side effects. This is 1173 * primarily useful idiomatically for overridable function endpoints which 1174 * always need to be callable, since JS lacks a null-call idiom ala Cocoa. 1175 */ 1176var emptyFunction = function emptyFunction() {}; 1177 1178emptyFunction.thatReturns = makeEmptyFunction; 1179emptyFunction.thatReturnsFalse = makeEmptyFunction(false); 1180emptyFunction.thatReturnsTrue = makeEmptyFunction(true); 1181emptyFunction.thatReturnsNull = makeEmptyFunction(null); 1182emptyFunction.thatReturnsThis = function () { 1183 return this; 1184}; 1185emptyFunction.thatReturnsArgument = function (arg) { 1186 return arg; 1187}; 1188 1189module.exports = emptyFunction; 1190 1191/***/ }), 1192/* 10 */ 1193/***/ (function(module, exports, __webpack_require__) { 1194 1195"use strict"; 1196/* WEBPACK VAR INJECTION */(function(process) {/** 1197 * Copyright 2013-present, Facebook, Inc. 1198 * All rights reserved. 1199 * 1200 * This source code is licensed under the BSD-style license found in the 1201 * LICENSE file in the root directory of this source tree. An additional grant 1202 * of patent rights can be found in the PATENTS file in the same directory. 1203 * 1204 */ 1205 1206 1207 1208var _prodInvariant = __webpack_require__(3), 1209 _assign = __webpack_require__(4); 1210 1211var CallbackQueue = __webpack_require__(57); 1212var PooledClass = __webpack_require__(14); 1213var ReactFeatureFlags = __webpack_require__(62); 1214var ReactReconciler = __webpack_require__(18); 1215var Transaction = __webpack_require__(29); 1216 1217var invariant = __webpack_require__(1); 1218 1219var dirtyComponents = []; 1220var updateBatchNumber = 0; 1221var asapCallbackQueue = CallbackQueue.getPooled(); 1222var asapEnqueued = false;
1223 1224var batchingStrategy = null; 1225 1226function ensureInjected() { 1227 !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0; 1228} 1229 1230var NESTED_UPDATES = { 1231 initialize: function () { 1232 this.dirtyComponentsLength = dirtyComponents.length; 1233 }, 1234 close: function () { 1235 if (this.dirtyComponentsLength !== dirtyComponents.length) { 1236 // Additional updates were enqueued by componentDidUpdate handlers or 1237 // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run 1238 // these new updates so that if A's componentDidUpdate calls setState on 1239 // B, B will update before the callback A's updater provided when calling 1240 // setState. 1241 dirtyComponents.splice(0, this.dirtyComponentsLength); 1242 flushBatchedUpdates(); 1243 } else { 1244 dirtyComponents.length = 0; 1245 } 1246 } 1247}; 1248 1249var UPDATE_QUEUEING = { 1250 initialize: function () { 1251 this.callbackQueue.reset(); 1252 }, 1253 close: function () { 1254 this.callbackQueue.notifyAll(); 1255 } 1256}; 1257 1258var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING]; 1259 1260function ReactUpdatesFlushTransaction() { 1261 this.reinitializeTransaction(); 1262 this.dirtyComponentsLength = null; 1263 this.callbackQueue = CallbackQueue.getPooled(); 1264 this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled( 1265 /* useCreateElement */true); 1266} 1267 1268_assign(ReactUpdatesFlushTransaction.prototype, Transaction, { 1269 getTransactionWrappers: function () { 1270 return TRANSACTION_WRAPPERS; 1271 }, 1272 1273 destructor: function () { 1274 this.dirtyComponentsLength = null; 1275 CallbackQueue.release(this.callbackQueue); 1276 this.callbackQueue = null; 1277 ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction); 1278 this.reconcileTransaction = null; 1279 }, 1280 1281 perform: function (method, scope, a) { 1282 // Essentially calls `this.reconcileTransaction.perform(method, scope, a)` 1283 // with this transaction's wrappers around it. 1284 return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a); 1285 } 1286}); 1287 1288PooledClass.addPoolingTo(ReactUpdatesFlushTransaction); 1289 1290function batchedUpdates(callback, a, b, c, d, e) { 1291 ensureInjected(); 1292 return batchingStrategy.batchedUpdates(callback, a, b, c, d, e); 1293} 1294 1295/** 1296 * Array comparator for ReactComponents by mount ordering. 1297 * 1298 * @param {ReactComponent} c1 first component you're comparing 1299 * @param {ReactComponent} c2 second component you're comparing 1300 * @return {number} Return value usable by Array.prototype.sort(). 1301 */ 1302function mountOrderComparator(c1, c2) { 1303 return c1._mountOrder - c2._mountOrder; 1304} 1305 1306function runBatchedUpdates(transaction) { 1307 var len = transaction.dirtyComponentsLength; 1308 !(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; 1309 1310 // Since reconciling a component higher in the owner hierarchy usually (not 1311 // always -- see shouldComponentUpdate()) will reconcile children, reconcile 1312 // them before their children by sorting the array. 1313 dirtyComponents.sort(mountOrderComparator); 1314 1315 // Any updates enqueued while reconciling must be performed after this entire 1316 // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and 1317 // C, B could update twice in a single batch if C's render enqueues an update 1318 // to B (since B would have already updated, we should skip it, and the only 1319 // way we can know to do so is by checking the batch counter). 1320 updateBatchNumber++; 1321 1322 for (var i = 0; i < len; i++) { 1323 // If a component is unmounted before pending changes apply, it will still 1324 // be here, but we assume that it has cleared its _pendingCallbacks and 1325 // that performUpdateIfNecessary is a noop. 1326 var component = dirtyComponents[i]; 1327 1328 // If performUpdateIfNecessary happens to enqueue any new updates, we 1329 // shouldn't execute the callbacks until the next render happens, so 1330 // stash the callbacks first 1331 var callbacks = component._pendingCallbacks; 1332 component._pendingCallbacks = null; 1333 1334 var markerName; 1335 if (ReactFeatureFlags.logTopLevelRenders) { 1336 var namedComponent = component; 1337 // Duck type TopLevelWrapper. This is probably always true. 1338 if (component._currentElement.type.isReactTopLevelWrapper) { 1339 namedComponent = component._renderedComponent; 1340 } 1341 markerName = 'React update: ' + namedComponent.getName(); 1342 console.time(markerName); 1343 } 1344 1345 ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber); 1346 1347 if (markerName) { 1348 console.timeEnd(markerName); 1349 } 1350 1351 if (callbacks) { 1352 for (var j = 0; j < callbacks.length; j++) { 1353 transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance()); 1354 } 1355 } 1356 } 1357} 1358
1359var flushBatchedUpdates = function () { 1360 // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents 1361 // array and perform any updates enqueued by mount-ready handlers (i.e., 1362 // componentDidUpdate) but we need to check here too in order to catch 1363 // updates enqueued by setState callbacks and asap calls. 1364 while (dirtyComponents.length || asapEnqueued) { 1365 if (dirtyComponents.length) { 1366 var transaction = ReactUpdatesFlushTransaction.getPooled(); 1367 transaction.perform(runBatchedUpdates, null, transaction); 1368 ReactUpdatesFlushTransaction.release(transaction); 1369 } 1370 1371 if (asapEnqueued) { 1372 asapEnqueued = false; 1373 var queue = asapCallbackQueue; 1374 asapCallbackQueue = CallbackQueue.getPooled(); 1375 queue.notifyAll(); 1376 CallbackQueue.release(queue); 1377 } 1378 } 1379}; 1380 1381/** 1382 * Mark a component as needing a rerender, adding an optional callback to a 1383 * list of functions which will be executed once the rerender occurs. 1384 */ 1385function enqueueUpdate(component) { 1386 ensureInjected(); 1387 1388 // Various parts of our code (such as ReactCompositeComponent's 1389 // _renderValidatedComponent) assume that calls to render aren't nested; 1390 // verify that that's the case. (This is called by each top-level update 1391 // function, like setState, forceUpdate, etc.; creation and 1392 // destruction of top-level components is guarded in ReactMount.) 1393 1394 if (!batchingStrategy.isBatchingUpdates) { 1395 batchingStrategy.batchedUpdates(enqueueUpdate, component); 1396 return; 1397 } 1398 1399 dirtyComponents.push(component); 1400 if (component._updateBatchNumber == null) { 1401 component._updateBatchNumber = updateBatchNumber + 1; 1402 } 1403} 1404 1405/** 1406 * Enqueue a callback to be run at the end of the current batching cycle. Throws 1407 * if no updates are currently being performed. 1408 */ 1409function asap(callback, context) { 1410 !batchingStrategy.isBatchingUpdates ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0; 1411 asapCallbackQueue.enqueue(callback, context); 1412 asapEnqueued = true; 1413} 1414 1415var ReactUpdatesInjection = { 1416 injectReconcileTransaction: function (ReconcileTransaction) { 1417 !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0; 1418 ReactUpdates.ReactReconcileTransaction = ReconcileTransaction; 1419 }, 1420 1421 injectBatchingStrategy: function (_batchingStrategy) { 1422 !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0; 1423 !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0; 1424 !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0; 1425 batchingStrategy = _batchingStrategy; 1426 } 1427}; 1428 1429var ReactUpdates = { 1430 /** 1431 * React references `ReactReconcileTransaction` using this property in order 1432 * to allow dependency injection. 1433 * 1434 * @internal 1435 */ 1436 ReactReconcileTransaction: null, 1437 1438 batchedUpdates: batchedUpdates, 1439 enqueueUpdate: enqueueUpdate, 1440 flushBatchedUpdates: flushBatchedUpdates, 1441 injection: ReactUpdatesInjection, 1442 asap: asap 1443}; 1444 1445module.exports = ReactUpdates; 1446/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 1447 1448/***/ }), 1449/* 11 */ 1450/***/ (function(module, exports, __webpack_require__) { 1451 1452"use strict"; 1453/** 1454 * Copyright 2013-present, Facebook, Inc. 1455 * All rights reserved. 1456 * 1457 * This source code is licensed under the BSD-style license found in the 1458 * LICENSE file in the root directory of this source tree. An additional grant 1459 * of patent rights can be found in the PATENTS file in the same directory. 1460 * 1461 * 1462 */ 1463 1464 1465 1466/** 1467 * Keeps track of the current owner. 1468 * 1469 * The current owner is the component who should own any components that are 1470 * currently being constructed. 1471 */ 1472var ReactCurrentOwner = { 1473 1474 /** 1475 * @internal 1476 * @type {ReactComponent} 1477 */ 1478 current: null 1479 1480}; 1481 1482module.exports = ReactCurrentOwner; 1483 1484/***/ }), 1485/* 12 */ 1486/***/ (function(module, exports, __webpack_require__) { 1487 1488"use strict"; 1489/* WEBPACK VAR INJECTION */(function(process) {/** 1490 * Copyright 2013-present, Facebook, Inc. 1491 * All rights reserved. 1492 * 1493 * This source code is licensed under the BSD-style license found in the 1494 * LICENSE file in the root directory of this source tree. An additional grant 1495 * of patent rights can be found in the PATENTS file in the same directory. 1496 * 1497 */ 1498 1499 1500 1501var _assign = __webpack_require__(4); 1502 1503var PooledClass = __webpack_require__(14); 1504 1505var emptyFunction = __webpack_require__(9); 1506var warning = __webpack_require__(2); 1507 1508var didWarnForAddedNewProperty = false;
1509var isProxySupported = typeof Proxy === 'function'; 1510 1511var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances']; 1512 1513/** 1514 * @interface Event 1515 * @see http://www.w3.org/TR/DOM-Level-3-Events/ 1516 */ 1517var EventInterface = { 1518 type: null, 1519 target: null, 1520 // currentTarget is set when dispatching; no use in copying it here 1521 currentTarget: emptyFunction.thatReturnsNull, 1522 eventPhase: null, 1523 bubbles: null, 1524 cancelable: null, 1525 timeStamp: function (event) { 1526 return event.timeStamp || Date.now(); 1527 }, 1528 defaultPrevented: null, 1529 isTrusted: null 1530}; 1531 1532/** 1533 * Synthetic events are dispatched by event plugins, typically in response to a 1534 * top-level event delegation handler. 1535 * 1536 * These systems should generally use pooling to reduce the frequency of garbage 1537 * collection. The system should check `isPersistent` to determine whether the 1538 * event should be released into the pool after being dispatched. Users that 1539 * need a persisted event should invoke `persist`. 1540 * 1541 * Synthetic events (and subclasses) implement the DOM Level 3 Events API by 1542 * normalizing browser quirks. Subclasses do not necessarily have to implement a 1543 * DOM interface; custom application-specific events can also subclass this. 1544 * 1545 * @param {object} dispatchConfig Configuration used to dispatch this event. 1546 * @param {*} targetInst Marker identifying the event target. 1547 * @param {object} nativeEvent Native browser event. 1548 * @param {DOMEventTarget} nativeEventTarget Target node. 1549 */ 1550function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) { 1551 if (process.env.NODE_ENV !== 'production') { 1552 // these have a getter/setter for warnings 1553 delete this.nativeEvent; 1554 delete this.preventDefault; 1555 delete this.stopPropagation; 1556 } 1557 1558 this.dispatchConfig = dispatchConfig; 1559 this._targetInst = targetInst; 1560 this.nativeEvent = nativeEvent; 1561 1562 var Interface = this.constructor.Interface; 1563 for (var propName in Interface) { 1564 if (!Interface.hasOwnProperty(propName)) { 1565 continue; 1566 } 1567 if (process.env.NODE_ENV !== 'production') { 1568 delete this[propName]; // this has a getter/setter for warnings 1569 } 1570 var normalize = Interface[propName]; 1571 if (normalize) { 1572 this[propName] = normalize(nativeEvent); 1573 } else { 1574 if (propName === 'target') { 1575 this.target = nativeEventTarget; 1576 } else { 1577 this[propName] = nativeEvent[propName]; 1578 } 1579 } 1580 } 1581 1582 var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false; 1583 if (defaultPrevented) { 1584 this.isDefaultPrevented = emptyFunction.thatReturnsTrue; 1585 } else { 1586 this.isDefaultPrevented = emptyFunction.thatReturnsFalse; 1587 } 1588 this.isPropagationStopped = emptyFunction.thatReturnsFalse; 1589 return this; 1590} 1591 1592_assign(SyntheticEvent.prototype, { 1593 1594 preventDefault: function () { 1595 this.defaultPrevented = true; 1596 var event = this.nativeEvent; 1597 if (!event) { 1598 return; 1599 } 1600 1601 if (event.preventDefault) { 1602 event.preventDefault(); 1603 } else if (typeof event.returnValue !== 'unknown') { 1604 // eslint-disable-line valid-typeof 1605 event.returnValue = false; 1606 } 1607 this.isDefaultPrevented = emptyFunction.thatReturnsTrue; 1608 }, 1609 1610 stopPropagation: function () { 1611 var event = this.nativeEvent; 1612 if (!event) { 1613 return; 1614 } 1615 1616 if (event.stopPropagation) { 1617 event.stopPropagation(); 1618 } else if (typeof event.cancelBubble !== 'unknown') { 1619 // eslint-disable-line valid-typeof 1620 // The ChangeEventPlugin registers a "propertychange" event for 1621 // IE. This event does not support bubbling or cancelling, and 1622 // any references to cancelBubble throw "Member not found". A 1623 // typeof check of "unknown" circumvents this issue (and is also 1624 // IE specific). 1625 event.cancelBubble = true; 1626 } 1627 1628 this.isPropagationStopped = emptyFunction.thatReturnsTrue; 1629 }, 1630 1631 /** 1632 * We release all dispatched `SyntheticEvent`s after each event loop, adding 1633 * them back into the pool. This allows a way to hold onto a reference that 1634 * won't be added back into the pool. 1635 */ 1636 persist: function () { 1637 this.isPersistent = emptyFunction.thatReturnsTrue; 1638 }, 1639 1640 /** 1641 * Checks if this event should be released back into the pool. 1642 * 1643 * @return {boolean} True if this should not be released, false otherwise. 1644 */ 1645 isPersistent: emptyFunction.thatReturnsFalse, 1646 1647 /** 1648 * `PooledClass` looks for `destructor` on each instance it releases. 1649 */ 1650 destructor: function () { 1651 var Interface = this.constructor.Interface; 1652 for (var propName in Interface) { 1653 if (process.env.NODE_ENV !== 'production') { 1654 Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName])); 1655 } else { 1656 this[propName] = null; 1657 } 1658 } 1659 for (var i = 0; i < shouldBeReleasedProperties.length; i++) { 1660 this[shouldBeReleasedProperties[i]] = null; 1661 } 1662 if (process.env.NODE_ENV !== 'production') { 1663 Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null)); 1664 Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction)); 1665 Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction)); 1666 } 1667 } 1668 1669}); 1670 1671SyntheticEvent.Interface = EventInterface; 1672 1673if (process.env.NODE_ENV !== 'production') { 1674 if (isProxySupported) { 1675 /*eslint-disable no-func-assign */ 1676 SyntheticEvent = new Proxy(SyntheticEvent, { 1677 construct: function (target, args) { 1678 return this.apply(target, Object.create(target.prototype), args); 1679 }, 1680 apply: function (constructor, that, args) { 1681 return new Proxy(constructor.apply(that, args), { 1682 set: function (target, prop, value) { 1683 if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) { 1684 process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent
1684(), '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; 1685 didWarnForAddedNewProperty = true; 1686 } 1687 target[prop] = value; 1688 return true; 1689 } 1690 }); 1691 } 1692 }); 1693 /*eslint-enable no-func-assign */ 1694 } 1695} 1696/** 1697 * Helper to reduce boilerplate when creating subclasses. 1698 * 1699 * @param {function} Class 1700 * @param {?object} Interface 1701 */ 1702SyntheticEvent.augmentClass = function (Class, Interface) { 1703 var Super = this; 1704 1705 var E = function () {}; 1706 E.prototype = Super.prototype; 1707 var prototype = new E(); 1708 1709 _assign(prototype, Class.prototype); 1710 Class.prototype = prototype; 1711 Class.prototype.constructor = Class; 1712 1713 Class.Interface = _assign({}, Super.Interface, Interface); 1714 Class.augmentClass = Super.augmentClass; 1715 1716 PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler); 1717}; 1718 1719PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler); 1720 1721module.exports = SyntheticEvent; 1722 1723/** 1724 * Helper to nullify syntheticEvent instance properties when destructing 1725 * 1726 * @param {object} SyntheticEvent 1727 * @param {String} propName 1728 * @return {object} defineProperty object 1729 */ 1730function getPooledWarningPropertyDefinition(propName, getVal) { 1731 var isFunction = typeof getVal === 'function'; 1732 return { 1733 configurable: true, 1734 set: set, 1735 get: get 1736 }; 1737 1738 function set(val) { 1739 var action = isFunction ? 'setting the method' : 'setting the property'; 1740 warn(action, 'This is effectively a no-op'); 1741 return val; 1742 } 1743 1744 function get() { 1745 var action = isFunction ? 'accessing the method' : 'accessing the property'; 1746 var result = isFunction ? 'This is a no-op function' : 'This is set to null'; 1747 warn(action, result); 1748 return getVal; 1749 } 1750 1751 function warn(action, result) { 1752 var warningCondition = false; 1753 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; 1754 } 1755} 1756/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 1757 1758/***/ }), 1759/* 13 */ 1760/***/ (function(module, exports, __webpack_require__) { 1761 1762"use strict"; 1763/* WEBPACK VAR INJECTION */(function(process) {/** 1764 * Copyright 2013-present, Facebook, Inc. 1765 * All rights reserved. 1766 * 1767 * This source code is licensed under the BSD-style license found in the 1768 * LICENSE file in the root directory of this source tree. An additional grant 1769 * of patent rights can be found in the PATENTS file in the same directory. 1770 * 1771 */ 1772 1773 1774 1775var _prodInvariant = __webpack_require__(3); 1776 1777var invariant = __webpack_require__(1); 1778 1779function checkMask(value, bitmask) { 1780 return (value & bitmask) === bitmask; 1781} 1782 1783var DOMPropertyInjection = { 1784 /** 1785 * Mapping from normalized, camelcased property names to a configuration that 1786 * specifies how the associated DOM property should be accessed or rendered. 1787 */ 1788 MUST_USE_PROPERTY: 0x1, 1789 HAS_BOOLEAN_VALUE: 0x4, 1790 HAS_NUMERIC_VALUE: 0x8, 1791 HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8, 1792 HAS_OVERLOADED_BOOLEAN_VALUE: 0x20, 1793 1794 /** 1795 * Inject some specialized knowledge about the DOM. This takes a config object 1796 * with the following properties: 1797 * 1798 * isCustomAttribute: function that given an attribute name will return true 1799 * if it can be inserted into the DOM verbatim. Useful for data-* or aria-* 1800 * attributes where it's impossible to enumerate all of the possible 1801 * attribute names, 1802 * 1803 * Properties: object mapping DOM property name to one of the 1804 * DOMPropertyInjection constants or null. If your attribute isn't in here, 1805 * it won't get written to the DOM. 1806 * 1807 * DOMAttributeNames: object mapping React attribute name to the DOM 1808 * attribute name. Attribute names not specified use the **lowercase** 1809 * normalized name. 1810 * 1811 * DOMAttributeNamespaces: object mapping React attribute name to the DOM 1812 * attribute namespace URL. (Attribute names not specified use no namespace.) 1813 * 1814 * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. 1815 * Property names not specified use the normalized name. 1816 * 1817 * DOMMutationMethods: Properties that require special mutation methods. If 1818 * `value` is undefined, the mutation method should unset the property. 1819 * 1820 * @param {object} domPropertyConfig the config as described above. 1821 */ 1822 injectDOMPropertyConfig: function (domPropertyConfig) { 1823 var Injection = DOMPropertyInjection; 1824 var Properties = domPropertyConfig.Properties || {}; 1825 var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}; 1826 var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; 1827 var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; 1828 var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; 1829 1830 if (domPropertyConfig.isCustomAttribute) { 1831 DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); 1832 } 1833 1834 for (var propName in Properties) { 1835 !!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; 1836 1837 var lowerCased = propName.toLowerCase(); 1838 var propConfig = Properties[propName]; 1839 1840 var propertyInfo = { 1841 attributeName: lowerCased, 1842 attributeNamespace: null, 1843 propertyName: propName, 1844 mutationMethod: null, 1845 1846 mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY), 1847 hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE), 1848 hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE), 1849 hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE), 1850 hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE) 1851 }; 1852 !(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; 1853 1854 if (process.env.NODE_ENV !== 'production') { 1855 DOMProperty.getPossibleStandardName[lowerCased] = propName; 1856 } 1857 1858 if (DOMAttributeNames.hasOwnProperty(propName)) { 1859 var attributeName = DOMAttributeNames[propName]; 1860 propertyInfo.attributeName = attributeName; 1861 if (process.env.NODE_ENV !== 'production') { 1862 DOMProperty.getPossibleStandardName[attributeName] = propName; 1863 } 1864 } 1865 1866 if (DOMAttributeNamespaces.hasOwnProperty(propName)) { 1867 propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]; 1868 } 1869 1870 if (DOMPropertyNames.hasOwnProperty(propName)) { 1871 propertyInfo.propertyName = DOMPropertyNames[propName]; 1872 } 1873 1874 if (DOMMutationMethods.hasOwnProperty(propName)) { 1875 propertyInfo.mutationMethod = DOMMutationMethods[propName]; 1876 } 1877 1878 DOMProperty.properties[propName] = propertyInfo; 1879 } 1880 } 1881}; 1882 1883/* eslint-disable max-len */ 1884var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
1884037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; 1885/* eslint-enable max-len */ 1886 1887/** 1888 * DOMProperty exports lookup objects that can be used like functions: 1889 * 1890 * > DOMProperty.isValid['id'] 1891 * true 1892 * > DOMProperty.isValid['foobar'] 1893 * undefined 1894 * 1895 * Although this may be confusing, it performs better in general. 1896 * 1897 * @see http://jsperf.com/key-exists 1898 * @see http://jsperf.com/key-missing 1899 */ 1900var DOMProperty = { 1901 1902 ID_ATTRIBUTE_NAME: 'data-reactid', 1903 ROOT_ATTRIBUTE_NAME: 'data-reactroot', 1904 1905 ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR, 1906 ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040', 1907 1908 /** 1909 * Map from property "standard name" to an object with info about how to set 1910 * the property in the DOM. Each object contains: 1911 * 1912 * attributeName: 1913 * Used when rendering markup or with `*Attribute()`. 1914 * attributeNamespace 1915 * propertyName: 1916 * Used on DOM node instances. (This includes properties that mutate due to 1917 * external factors.) 1918 * mutationMethod: 1919 * If non-null, used instead of the property or `setAttribute()` after 1920 * initial render. 1921 * mustUseProperty: 1922 * Whether the property must be accessed and mutated as an object property. 1923 * hasBooleanValue: 1924 * Whether the property should be removed when set to a falsey value. 1925 * hasNumericValue: 1926 * Whether the property must be numeric or parse as a numeric and should be 1927 * removed when set to a falsey value. 1928 * hasPositiveNumericValue: 1929 * Whether the property must be positive numeric or parse as a positive 1930 * numeric and should be removed when set to a falsey value. 1931 * hasOverloadedBooleanValue: 1932 * Whether the property can be used as a flag as well as with a value. 1933 * Removed when strictly equal to false; present without a value when 1934 * strictly equal to true; present with a value otherwise. 1935 */ 1936 properties: {}, 1937 1938 /** 1939 * Mapping from lowercase property names to the properly cased version, used 1940 * to warn in the case of missing properties. Available only in __DEV__. 1941 * 1942 * autofocus is predefined, because adding it to the property whitelist 1943 * causes unintended side effects. 1944 * 1945 * @type {Object} 1946 */ 1947 getPossibleStandardName: process.env.NODE_ENV !== 'production' ? { autofocus: 'autoFocus' } : null, 1948 1949 /** 1950 * All of the isCustomAttribute() functions that have been injected. 1951 */ 1952 _isCustomAttributeFunctions: [], 1953 1954 /** 1955 * Checks whether a property name is a custom attribute. 1956 * @method 1957 */ 1958 isCustomAttribute: function (attributeName) { 1959 for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { 1960 var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; 1961 if (isCustomAttributeFn(attributeName)) { 1962 return true; 1963 } 1964 } 1965 return false; 1966 }, 1967 1968 injection: DOMPropertyInjection 1969}; 1970 1971module.exports = DOMProperty; 1972/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 1973 1974/***/ }), 1975/* 14 */ 1976/***/ (function(module, exports, __webpack_require__) { 1977 1978"use strict"; 1979/* WEBPACK VAR INJECTION */(function(process) {/** 1980 * Copyright 2013-present, Facebook, Inc. 1981 * All rights reserved. 1982 * 1983 * This source code is licensed under the BSD-style license found in the 1984 * LICENSE file in the root directory of this source tree. An additional grant 1985 * of patent rights can be found in the PATENTS file in the same directory. 1986 * 1987 * 1988 */ 1989 1990 1991 1992var _prodInvariant = __webpack_require__(3); 1993 1994var invariant = __webpack_require__(1); 1995 1996/** 1997 * Static poolers. Several custom versions for each potential number of 1998 * arguments. A completely generic pooler is easy to implement, but would 1999 * require accessing the `arguments` object. In each of these, `this` refers to 2000 * the Class itself, not an instance. If any others are needed, simply add them
2001 * here, or in their own files. 2002 */ 2003var oneArgumentPooler = function (copyFieldsFrom) { 2004 var Klass = this; 2005 if (Klass.instancePool.length) { 2006 var instance = Klass.instancePool.pop(); 2007 Klass.call(instance, copyFieldsFrom); 2008 return instance; 2009 } else { 2010 return new Klass(copyFieldsFrom); 2011 } 2012}; 2013 2014var twoArgumentPooler = function (a1, a2) { 2015 var Klass = this; 2016 if (Klass.instancePool.length) { 2017 var instance = Klass.instancePool.pop(); 2018 Klass.call(instance, a1, a2); 2019 return instance; 2020 } else { 2021 return new Klass(a1, a2); 2022 } 2023}; 2024 2025var threeArgumentPooler = function (a1, a2, a3) { 2026 var Klass = this; 2027 if (Klass.instancePool.length) { 2028 var instance = Klass.instancePool.pop(); 2029 Klass.call(instance, a1, a2, a3); 2030 return instance; 2031 } else { 2032 return new Klass(a1, a2, a3); 2033 } 2034}; 2035 2036var fourArgumentPooler = function (a1, a2, a3, a4) { 2037 var Klass = this; 2038 if (Klass.instancePool.length) { 2039 var instance = Klass.instancePool.pop(); 2040 Klass.call(instance, a1, a2, a3, a4); 2041 return instance; 2042 } else { 2043 return new Klass(a1, a2, a3, a4); 2044 } 2045}; 2046 2047var standardReleaser = function (instance) { 2048 var Klass = this; 2049 !(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; 2050 instance.destructor(); 2051 if (Klass.instancePool.length < Klass.poolSize) { 2052 Klass.instancePool.push(instance); 2053 } 2054}; 2055 2056var DEFAULT_POOL_SIZE = 10; 2057var DEFAULT_POOLER = oneArgumentPooler; 2058 2059/** 2060 * Augments `CopyConstructor` to be a poolable class, augmenting only the class 2061 * itself (statically) not adding any prototypical fields. Any CopyConstructor 2062 * you give this may have a `poolSize` property, and will look for a 2063 * prototypical `destructor` on instances. 2064 * 2065 * @param {Function} CopyConstructor Constructor that can be used to reset. 2066 * @param {Function} pooler Customizable pooler. 2067 */ 2068var addPoolingTo = function (CopyConstructor, pooler) { 2069 // Casting as any so that flow ignores the actual implementation and trusts 2070 // it to match the type we declared 2071 var NewKlass = CopyConstructor; 2072 NewKlass.instancePool = []; 2073 NewKlass.getPooled = pooler || DEFAULT_POOLER; 2074 if (!NewKlass.poolSize) { 2075 NewKlass.poolSize = DEFAULT_POOL_SIZE; 2076 } 2077 NewKlass.release = standardReleaser; 2078 return NewKlass; 2079}; 2080 2081var PooledClass = { 2082 addPoolingTo: addPoolingTo, 2083 oneArgumentPooler: oneArgumentPooler, 2084 twoArgumentPooler: twoArgumentPooler, 2085 threeArgumentPooler: threeArgumentPooler, 2086 fourArgumentPooler: fourArgumentPooler 2087}; 2088 2089module.exports = PooledClass; 2090/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 2091 2092/***/ }), 2093/* 15 */ 2094/***/ (function(module, exports, __webpack_require__) { 2095 2096"use strict"; 2097/* WEBPACK VAR INJECTION */(function(process) {/** 2098 * Copyright 2014-present, Facebook, Inc. 2099 * All rights reserved. 2100 * 2101 * This source code is licensed under the BSD-style license found in the 2102 * LICENSE file in the root directory of this source tree. An additional grant 2103 * of patent rights can be found in the PATENTS file in the same directory. 2104 * 2105 */ 2106 2107 2108 2109var _assign = __webpack_require__(4); 2110 2111var ReactCurrentOwner = __webpack_require__(11); 2112 2113var warning = __webpack_require__(2); 2114var canDefineProperty = __webpack_require__(32); 2115var hasOwnProperty = Object.prototype.hasOwnProperty; 2116 2117var REACT_ELEMENT_TYPE = __webpack_require__(77); 2118 2119var RESERVED_PROPS = { 2120 key: true, 2121 ref: true, 2122 __self: true, 2123 __source: true 2124}; 2125 2126var specialPropKeyWarningShown, specialPropRefWarningShown; 2127 2128function hasValidRef(config) { 2129 if (process.env.NODE_ENV !== 'production') { 2130 if (hasOwnProperty.call(config, 'ref')) { 2131 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; 2132 if (getter && getter.isReactWarning) { 2133 return false; 2134 } 2135 } 2136 } 2137 return config.ref !== undefined; 2138} 2139 2140function hasValidKey(config) { 2141 if (process.env.NODE_ENV !== 'production') { 2142 if (hasOwnProperty.call(config, 'key')) { 2143 var getter = Object.getOwnPropertyDescriptor(config, 'key').get; 2144 if (getter && getter.isReactWarning) { 2145 return false;
2146 } 2147 } 2148 } 2149 return config.key !== undefined; 2150} 2151 2152function defineKeyPropWarningGetter(props, displayName) { 2153 var warnAboutAccessingKey = function () { 2154 if (!specialPropKeyWarningShown) { 2155 specialPropKeyWarningShown = true; 2156 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; 2157 } 2158 }; 2159 warnAboutAccessingKey.isReactWarning = true; 2160 Object.defineProperty(props, 'key', { 2161 get: warnAboutAccessingKey, 2162 configurable: true 2163 }); 2164} 2165 2166function defineRefPropWarningGetter(props, displayName) { 2167 var warnAboutAccessingRef = function () { 2168 if (!specialPropRefWarningShown) { 2169 specialPropRefWarningShown = true; 2170 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; 2171 } 2172 }; 2173 warnAboutAccessingRef.isReactWarning = true; 2174 Object.defineProperty(props, 'ref', { 2175 get: warnAboutAccessingRef, 2176 configurable: true 2177 }); 2178} 2179 2180/** 2181 * Factory method to create a new React element. This no longer adheres to 2182 * the class pattern, so do not use new to call it. Also, no instanceof check 2183 * will work. Instead test $$typeof field against Symbol.for('react.element') to check 2184 * if something is a React Element. 2185 * 2186 * @param {*} type 2187 * @param {*} key 2188 * @param {string|object} ref 2189 * @param {*} self A *temporary* helper to detect places where `this` is 2190 * different from the `owner` when React.createElement is called, so that we 2191 * can warn. We want to get rid of owner and replace string `ref`s with arrow 2192 * functions, and as long as `this` and owner are the same, there will be no 2193 * change in behavior. 2194 * @param {*} source An annotation object (added by a transpiler or otherwise) 2195 * indicating filename, line number, and/or other information. 2196 * @param {*} owner 2197 * @param {*} props 2198 * @internal 2199 */ 2200var ReactElement = function (type, key, ref, self, source, owner, props) { 2201 var element = { 2202 // This tag allow us to uniquely identify this as a React Element 2203 $$typeof: REACT_ELEMENT_TYPE, 2204 2205 // Built-in properties that belong on the element 2206 type: type, 2207 key: key, 2208 ref: ref, 2209 props: props, 2210 2211 // Record the component responsible for creating this element. 2212 _owner: owner 2213 }; 2214 2215 if (process.env.NODE_ENV !== 'production') { 2216 // The validation flag is currently mutative. We put it on 2217 // an external backing store so that we can freeze the whole object. 2218 // This can be replaced with a WeakMap once they are implemented in 2219 // commonly used development environments. 2220 element._store = {}; 2221 2222 // To make comparing ReactElements easier for testing purposes, we make 2223 // the validation flag non-enumerable (where possible, which should 2224 // include every environment we run tests in), so the test framework 2225 // ignores it. 2226 if (canDefineProperty) { 2227 Object.defineProperty(element._store, 'validated', { 2228 configurable: false, 2229 enumerable: false, 2230 writable: true, 2231 value: false 2232 }); 2233 // self and source are DEV only properties. 2234 Object.defineProperty(element, '_self', { 2235 configurable: false, 2236 enumerable: false, 2237 writable: false, 2238 value: self 2239 }); 2240 // Two elements created in two different places should be considered 2241 // equal for testing purposes and therefore we hide it from enumeration. 2242 Object.defineProperty(element, '_source', { 2243 configurable: false, 2244 enumerable: false, 2245 writable: false, 2246 value: source 2247 }); 2248 } else { 2249 element._store.validated = false; 2250 element._self = self; 2251 element._source = source; 2252 } 2253 if (Object.freeze) { 2254 Object.freeze(element.props); 2255 Object.freeze(element); 2256 } 2257 } 2258 2259 return element; 2260}; 2261 2262/** 2263 * Create and return a new ReactElement of the given type. 2264 * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement 2265 */ 2266ReactElement.createElement = function (type, config, children) { 2267 var propName; 2268 2269 // Reserved names are extracted 2270 var props = {}; 2271 2272 var key = null; 2273 var ref = null; 2274 var self = null; 2275 var source = null; 2276 2277 if (config != null) { 2278 if (hasValidRef(config)) { 2279 ref = config.ref; 2280 } 2281 if (hasValidKey(config)) { 2282 key = '' + config.key; 2283 } 2284 2285 self = config.__self === undefined ? null : config.__self; 2286 source = config.__source === undefined ? null : config.__source; 2287 // Remaining properties are added to a new props object 2288 for (propName in config) { 2289 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { 2290 props[propName] = config[propName]; 2291 } 2292 } 2293 } 2294 2295 // Children can be more than one argument, and those are transferred onto 2296 // the newly allocated props object. 2297 var childrenLength = arguments.length - 2; 2298 if (childrenLength === 1) { 2299 props.children = children; 2300 } else if (childrenLength > 1) { 2301 var childArray = Array(childrenLength); 2302 for (var i = 0; i < childrenLength; i++) { 2303 childArray[i] = arguments[i + 2]; 2304 } 2305 if (process.env.NODE_ENV !== 'production') { 2306 if (Object.freeze) { 2307 Object.freeze(childArray); 2308 } 2309 } 2310 props.children = childArray; 2311 } 2312 2313 // Resolve default props 2314 if (type && type.defaultProps) { 2315 var defaultProps = type.defaultProps; 2316 for (propName in defaultProps) { 2317 if (props[propName] === undefined) { 2318 props[propName] = defaultProps[propName]; 2319 } 2320 } 2321 } 2322 if (process.env.NODE_ENV !== 'production') { 2323 if (key || ref) { 2324 if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) { 2325 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; 2326 if (key) { 2327 defineKeyPropWarningGetter(props, displayName); 2328 } 2329 if (ref) { 2330 defineRefPropWarningGetter(props, displayName); 2331 } 2332 } 2333 } 2334 } 2335 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); 2336}; 2337 2338/** 2339 * Return a function that produces ReactElements of a given type. 2340 * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory 2341 */ 2342ReactElement.createFactory = function (type) { 2343 var factory = ReactElement.createElement.bind(null, type); 2344 // Expose the type on the factory and the prototype so that it can be 2345 // easily accessed on elements. E.g. `<Foo />.type === Foo`. 2346 // This should not be named `constructor` since this may not be the function 2347 // that created the element, and it may not even be a constructor. 2348 // Legacy hook TODO: Warn if this is accessed 2349 factory.type = type; 2350 return factory; 2351}; 2352 2353ReactElement.cloneAndReplaceKey = function (oldElement, newKey) { 2354 var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); 2355 2356 return newElement; 2357}; 2358 2359/** 2360 * Clone and return a new ReactElement using element as the starting point. 2361 * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement 2362 */ 2363ReactElement.cloneElement = function (element, config, children) { 2364 var propName; 2365 2366 // Original props are copied 2367 var props = _assign({}, element.props); 2368 2369 // Reserved names are extracted 2370 var key = element.key; 2371 var ref = element.ref; 2372 // Self is preserved since the owner is preserved. 2373 var self = element._self; 2374 // Source is preserved since cloneElement is unlikely to be targeted by a 2375 // transpiler, and the original source is probably a better indicator of the 2376 // true owner. 2377 var source = element._source; 2378 2379 // Owner will be preserved, unless ref is overridden 2380 var owner = element._owner; 2381 2382 if (config != null) { 2383 if (hasValidRef(config)) { 2384 // Silently steal the ref from the parent. 2385 ref = config.ref; 2386 owner = ReactCurrentOwner.current; 2387 } 2388 if (hasValidKey(config)) { 2389 key = '' + config.key; 2390 } 2391 2392 // Remaining properties override existing props 2393 var defaultProps; 2394 if (element.type && element.type.defaultProps) { 2395 defaultProps = element.type.defaultProps; 2396 } 2397 for (propName in config) { 2398 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { 2399 if (config[propName] === undefined && defaultProps !== undefined) { 2400 // Resolve default props 2401 props[propName] = defaultProps[propName]; 2402 } else { 2403 props[propName] = config[propName]; 2404 } 2405 } 2406 } 2407 } 2408 2409 // Children can be more than one argument, and those are transferred onto 2410 // the newly allocated props object. 2411 var childrenLength = arguments.length - 2; 2412 if (childrenLength === 1) { 2413 props.children = children; 2414 } else if (childrenLength > 1) { 2415 var childArray = Array(childrenLength); 2416 for (var i = 0; i < childrenLength; i++) { 2417 childArray[i] = arguments[i + 2]; 2418 } 2419 props.children = childArray; 2420 } 2421 2422 return ReactElement(element.type, key, ref, self, source, owner, props); 2423}; 2424 2425/** 2426 * Verifies the object is a ReactElement. 2427 * See https://facebook.github.io/react/docs/top-level-api.html#react.isvali
2427delement 2428 * @param {?object} object 2429 * @return {boolean} True if `object` is a valid component. 2430 * @final 2431 */ 2432ReactElement.isValidElement = function (object) { 2433 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; 2434}; 2435 2436module.exports = ReactElement; 2437/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 2438 2439/***/ }), 2440/* 16 */ 2441/***/ (function(module, exports, __webpack_require__) { 2442 2443"use strict"; 2444/** 2445 * Copyright (c) 2013-present, Facebook, Inc. 2446 * All rights reserved. 2447 * 2448 * This source code is licensed under the BSD-style license found in the 2449 * LICENSE file in the root directory of this source tree. An additional grant 2450 * of patent rights can be found in the PATENTS file in the same directory. 2451 * 2452 * 2453 */ 2454 2455 2456/** 2457 * WARNING: DO NOT manually require this module. 2458 * This is a replacement for `invariant(...)` used by the error code system 2459 * and will _only_ be required by the corresponding babel pass. 2460 * It always throws. 2461 */ 2462 2463function reactProdInvariant(code) { 2464 var argCount = arguments.length - 1; 2465 2466 var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; 2467 2468 for (var argIdx = 0; argIdx < argCount; argIdx++) { 2469 message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); 2470 } 2471 2472 message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; 2473 2474 var error = new Error(message); 2475 error.name = 'Invariant Violation'; 2476 error.framesToPop = 1; // we don't care about reactProdInvariant's own frame 2477 2478 throw error; 2479} 2480 2481module.exports = reactProdInvariant; 2482 2483/***/ }), 2484/* 17 */ 2485/***/ (function(module, exports, __webpack_require__) { 2486 2487"use strict"; 2488/** 2489 * Copyright 2015-present, Facebook, Inc. 2490 * All rights reserved. 2491 * 2492 * This source code is licensed under the BSD-style license found in the 2493 * LICENSE file in the root directory of this source tree. An additional grant 2494 * of patent rights can be found in the PATENTS file in the same directory. 2495 * 2496 */ 2497 2498 2499 2500var DOMNamespaces = __webpack_require__(35); 2501var setInnerHTML = __webpack_require__(31); 2502 2503var createMicrosoftUnsafeLocalFunction = __webpack_require__(42); 2504var setTextContent = __webpack_require__(75); 2505 2506var ELEMENT_NODE_TYPE = 1; 2507var DOCUMENT_FRAGMENT_NODE_TYPE = 11; 2508 2509/** 2510 * In IE (8-11) and Edge, appending nodes with no children is dramatically 2511 * faster than appending a full subtree, so we essentially queue up the 2512 * .appendChild calls here and apply them so each node is added to its parent 2513 * before any children are added. 2514 * 2515 * In other browsers, doing so is slower or neutral compared to the other order 2516 * (in Firefox, twice as slow) so we only do this inversion in IE. 2517 * 2518 * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode. 2519 */ 2520var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent); 2521 2522function insertTreeChildren(tree) { 2523 if (!enableLazy) { 2524 return; 2525 } 2526 var node = tree.node; 2527 var children = tree.children; 2528 if (children.length) { 2529 for (var i = 0; i < children.length; i++) { 2530 insertTreeBefore(node, children[i], null); 2531 } 2532 } else if (tree.html != null) { 2533 setInnerHTML(node, tree.html); 2534 } else if (tree.text != null) { 2535 setTextContent(node, tree.text); 2536 } 2537} 2538 2539var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) { 2540 // DocumentFragments aren't actually part of the DOM after insertion so 2541 // appending children won't update the DOM. We need to ensure the fragment 2542 // is properly populated first, breaking out of our lazy approach for just 2543 // this level. Also, some <object> plugins (like Flash Player) will read 2544 // <param> nodes immediately upon insertion into the DOM, so <object> 2545 // must also be populated prior to insertion into the DOM. 2546 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)) { 2547 insertTreeChildren(tree); 2548 parentNode.insertBefore(tree.node, referenceNode); 2549 } else { 2550 parentNode.insertBefore(tree.node, referenceNode); 2551 insertTreeChildren(tree); 2552 } 2553}); 2554 2555function replaceChildWithTree(oldNode, newTree) { 2556 oldNode.parentNode.replaceChild(newTree.node, oldNode); 2557 insertTreeChildren(newTree); 2558} 2559 2560function queueChild(parentTree, childTree) { 2561 if (enableLazy) { 2562 parentTree.children.push(childTree); 2563 } else { 2564 parentTree.node.appendChild(childTree.node); 2565 } 2566} 2567 2568function queueHTML(tree, html) { 2569 if (enableLazy) { 2570 tree.html = html; 2571 } else { 2572 setInnerHTML(tree.node, html); 2573 } 2574} 2575 2576function queueText(tree, text) { 2577 if (enableLazy) { 2578 tree.text = text; 2579 } else { 2580 setTextContent(tree.node, text); 2581 } 2582} 2583 2584function toString() { 2585 return this.node.nodeName; 2586} 2587 2588function DOMLazyTree(node) { 2589 return { 2590 node: node, 2591 children: [], 2592 html: null, 2593 text: null, 2594 toString: toString 2595 }; 2596} 2597 2598DOMLazyTree.insertTreeBefore = insertTreeBefore; 2599DOMLazyTree.replaceChildWithTree = replaceChildWithTree; 2600DOMLazyTree.queueChild = queueChild; 2601DOMLazyTree.queueHTML = queueHTML; 2602DOMLazyTree.queueText = queueText; 2603 2604module.exports = DOMLazyTree; 2605 2606/***/ }), 2607/* 18 */ 2608/***/ (function(module, exports, __webpack_require__) { 2609 2610"use strict"; 2611/* WEBPACK VAR INJECTION */(function(process) {/** 2612 * Copyright 2013-present, Facebook, Inc. 2613 * All rights reserved. 2614 * 2615 * This source code is licensed under the BSD-style license found in the 2616 * LICENSE file in the root directory of this source tree. An additional grant 2617 * of patent rights can be found in the PATENTS file in the same directory. 2618 * 2619 */ 2620 2621 2622 2623var ReactRef = __webpack_require__(147); 2624var ReactInstrumentation = __webpack_require__(8); 2625 2626var warning = __webpack_require__(2); 2627 2628/** 2629 * Helper to call ReactRef.attachRefs with this composite component, split out 2630 * to avoid allocations in the transaction mount-ready queue. 2631 */ 2632function attachRefs() { 2633 ReactRef.attachRefs(this, this._currentElement); 2634} 2635 2636var ReactReconciler = { 2637 2638 /** 2639 * Initializes the component, renders markup, and registers event listeners. 2640 * 2641 * @param {ReactComponent} internalInstance 2642 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction 2643 * @param {?object} the containing host component instance 2644 * @param {?object} info about the host container 2645 * @return {?string} Rendered markup to be inserted into the DOM. 2646 * @final 2647 * @internal 2648 */ 2649 mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots 2650 ) { 2651 if (process.env.NODE_ENV !== 'production') { 2652 if (internalInstance._debugID !== 0) { 2653 ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID); 2654 } 2655 } 2656 var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID); 2657 if (internalInstance._currentElement && internalInstance._currentElement.ref != null) { 2658 transaction.getReactMountReady().enqueue(attachRefs, internalInstance); 2659 } 2660 if (process.env.NODE_ENV !== 'production') { 2661 if (internalInstance._debugID !== 0) { 2662 ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID); 2663 } 2664 } 2665 return markup; 2666 }, 2667 2668 /** 2669 * Returns a value that can be passed to 2670 * ReactComponentEnvironment.replaceNodeWithMarkup. 2671 */ 2672 getHostNode: function (internalInstance) { 2673 return internalInstance.getHostNode(); 2674 }, 2675 2676 /** 2677 * Releases any resources allocated by `mountComponent`. 2678 * 2679 * @final 2680 * @internal 2681 */ 2682 unmountComponent: function (internalInstance, safely) { 2683 if (process.env.NODE_ENV !== 'production') { 2684 if (internalInstance._debugID !== 0) { 2685 ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID); 2686 } 2687 } 2688 ReactRef.detachRefs(internalInstance, internalInstance._currentElement); 2689 internalInstance.unmountComponent(safely); 2690 if (process.env.NODE_ENV !== 'production') { 2691 if (internalInstance._debugID !== 0) { 2692 ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID); 2693 } 2694 } 2695 }, 2696 2697 /** 2698 * Update a component using a new element. 2699 * 2700 * @param {ReactComponent} internalInstance 2701 * @param {ReactElement} nextElement 2702 * @param {ReactReconcileTransaction} transaction 2703 * @param {object} context 2704 * @internal 2705 */ 2706 receiveComponent: function (internalInstance, nextElement, transaction, context) { 2707 var prevElement = internalInstance._currentElement; 2708 2709 if (nextElement === prevElement && context === internalInstance._context) { 2710 // Since elements are immutable after the owner is rendered, 2711 // we can do a cheap identity compare here to determine if this is a 2712 // superfluous reconcile. It's possible for state to be mutable but such 2713 // change should trigger an update of the owner which would recreate 2714 // the element. We explicitly check for the existence of an owner since 2715 // it's possible for an element created outside a composite to be 2716 // deeply mutated and reused. 2717 2718 // TODO: Bailing out early is just a perf optimization right? 2719 // TODO: Removing the return statement should affect correctness? 2720 return; 2721 } 2722 2723 if (process.env.NODE_ENV !== 'production') { 2724 if (internalInstance._debugID !== 0) { 2725 ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement); 2726 } 2727 } 2728 2729 var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement); 2730 2731 if (refsChanged) { 2732 ReactRef.detachRefs(internalInstance, prevElement); 2733 } 2734 2735 internalInstance.receiveComponent(nextElement, transaction, context); 2736 2737 if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) { 2738 transaction.getReactMountReady().enqueue(attachRefs, internalInstance); 2739 } 2740 2741 if (process.env.NODE_ENV !== 'production') { 2742 if (internalInstance._debugID !== 0) { 2743 ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); 2744 } 2745 } 2746 }, 2747 2748 /** 2749 * Flush any dirty changes in a component. 2750 * 2751 * @param {ReactComponent} internalInstance 2752 * @param {ReactReconcileTransaction} transaction 2753 * @internal 2754 */ 2755 performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) { 2756 if (internalInstance._updateBatchNumber !== updateBatchNumber) { 2757 // The component's enqueued batch number should always be the current 2758 // batch or the following one. 2759 process.env.NODE_ENV !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending
2759%s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0; 2760 return; 2761 } 2762 if (process.env.NODE_ENV !== 'production') { 2763 if (internalInstance._debugID !== 0) { 2764 ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement); 2765 } 2766 } 2767 internalInstance.performUpdateIfNecessary(transaction); 2768 if (process.env.NODE_ENV !== 'production') { 2769 if (internalInstance._debugID !== 0) { 2770 ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); 2771 } 2772 } 2773 } 2774 2775}; 2776 2777module.exports = ReactReconciler; 2778/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 2779 2780/***/ }), 2781/* 19 */ 2782/***/ (function(module, exports, __webpack_require__) { 2783 2784"use strict"; 2785/* WEBPACK VAR INJECTION */(function(process) {/** 2786 * Copyright 2013-present, Facebook, Inc. 2787 * All rights reserved. 2788 * 2789 * This source code is licensed under the BSD-style license found in the 2790 * LICENSE file in the root directory of this source tree. An additional grant 2791 * of patent rights can be found in the PATENTS file in the same directory. 2792 * 2793 */ 2794 2795 2796 2797var _assign = __webpack_require__(4); 2798 2799var ReactChildren = __webpack_require__(177); 2800var ReactComponent = __webpack_require__(49); 2801var ReactPureComponent = __webpack_require__(182); 2802var ReactClass = __webpack_require__(178); 2803var ReactDOMFactories = __webpack_require__(179); 2804var ReactElement = __webpack_require__(15); 2805var ReactPropTypes = __webpack_require__(180); 2806var ReactVersion = __webpack_require__(183); 2807 2808var onlyChild = __webpack_require__(186); 2809var warning = __webpack_require__(2); 2810 2811var createElement = ReactElement.createElement; 2812var createFactory = ReactElement.createFactory; 2813var cloneElement = ReactElement.cloneElement; 2814 2815if (process.env.NODE_ENV !== 'production') { 2816 var canDefineProperty = __webpack_require__(32); 2817 var ReactElementValidator = __webpack_require__(78); 2818 var didWarnPropTypesDeprecated = false; 2819 createElement = ReactElementValidator.createElement; 2820 createFactory = ReactElementValidator.createFactory; 2821 cloneElement = ReactElementValidator.cloneElement; 2822} 2823 2824var __spread = _assign; 2825 2826if (process.env.NODE_ENV !== 'production') { 2827 var warned = false; 2828 __spread = function () { 2829 process.env.NODE_ENV !== 'production' ? warning(warned, '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.') : void 0; 2830 warned = true; 2831 return _assign.apply(null, arguments); 2832 }; 2833} 2834 2835var React = { 2836 2837 // Modern 2838 2839 Children: { 2840 map: ReactChildren.map, 2841 forEach: ReactChildren.forEach, 2842 count: ReactChildren.count, 2843 toArray: ReactChildren.toArray, 2844 only: onlyChild 2845 }, 2846 2847 Component: ReactComponent, 2848 PureComponent: ReactPureComponent, 2849 2850 createElement: createElement, 2851 cloneElement: cloneElement, 2852 isValidElement: ReactElement.isValidElement, 2853 2854 // Classic 2855 2856 PropTypes: ReactPropTypes, 2857 createClass: ReactClass.createClass, 2858 createFactory: createFactory, 2859 createMixin: function (mixin) { 2860 // Currently a noop. Will be used to validate and trace mixins. 2861 return mixin; 2862 }, 2863 2864 // This looks DOM specific but these are actually isomorphic helpers 2865 // since they are just generating DOM strings. 2866 DOM: ReactDOMFactories, 2867 2868 version: ReactVersion, 2869 2870 // Deprecated hook for JSX spread, don't use this for anything. 2871 __spread: __spread 2872}; 2873 2874// TODO: Fix tests so that this deprecation warning doesn't cause failures. 2875if (process.env.NODE_ENV !== 'production') { 2876 if (canDefineProperty) { 2877 Object.defineProperty(React, 'PropTypes', { 2878 get: function () { 2879 process.env.NODE_ENV !== 'production' ? warning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated. Use ' + 'the prop-types package from npm instead.') : void 0; 2880 didWarnPropTypesDeprecated = true; 2881 return ReactPropTypes; 2882 } 2883 }); 2884 } 2885} 2886 2887module.exports = React; 2888/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 2889 2890/***/ }), 2891/* 20 */ 2892/***/ (function(module, exports, __webpack_require__) { 2893 2894"use strict"; 2895/* WEBPACK VAR INJECTION */(function(process) {/** 2896 * Copyright (c) 2013-present, Facebook, Inc. 2897 * All rights reserved. 2898 * 2899 * This source code is licensed under the BSD-style license found in the 2900 * LICENSE file in the root directory of this source tree. An additional grant 2901 * of patent rights can be found in the PATENTS file in the same directory. 2902 * 2903 */ 2904 2905 2906 2907var emptyObject = {}; 2908 2909if (process.env.NODE_ENV !== 'production') { 2910 Object.freeze(emptyObject); 2911} 2912 2913module.exports = emptyObject; 2914/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 2915 2916/***/ }), 2917/* 21 */ 2918/***/ (function(module, exports, __webpack_require__) { 2919 2920"use strict"; 2921/* WEBPACK VAR INJECTION */(function(process) {/** 2922 * Copyright 2013-present, Facebook, Inc. 2923 * All rights reserved. 2924 * 2925 * This source code is licensed under the BSD-style license found in the 2926 * LICENSE file in the root directory of this source tree. An additional grant 2927 * of patent rights can be found in the PATENTS file in the same directory. 2928 * 2929 */ 2930 2931 2932 2933var _prodInvariant = __webpack_require__(3); 2934 2935var EventPluginRegistry = __webpack_require__(26); 2936var EventPluginUtils = __webpack_require__(36); 2937var ReactErrorUtils = __webpack_require__(40); 2938 2939var accumulateInto = __webpack_require__(69);
2940var forEachAccumulated = __webpack_require__(70); 2941var invariant = __webpack_require__(1); 2942 2943/** 2944 * Internal store for event listeners 2945 */ 2946var listenerBank = {}; 2947 2948/** 2949 * Internal queue of events that have accumulated their dispatches and are 2950 * waiting to have their dispatches executed. 2951 */ 2952var eventQueue = null; 2953 2954/** 2955 * Dispatches an event and releases it back into the pool, unless persistent. 2956 * 2957 * @param {?object} event Synthetic event to be dispatched. 2958 * @param {boolean} simulated If the event is simulated (changes exn behavior) 2959 * @private 2960 */ 2961var executeDispatchesAndRelease = function (event, simulated) { 2962 if (event) { 2963 EventPluginUtils.executeDispatchesInOrder(event, simulated); 2964 2965 if (!event.isPersistent()) { 2966 event.constructor.release(event); 2967 } 2968 } 2969}; 2970var executeDispatchesAndReleaseSimulated = function (e) { 2971 return executeDispatchesAndRelease(e, true); 2972}; 2973var executeDispatchesAndReleaseTopLevel = function (e) { 2974 return executeDispatchesAndRelease(e, false); 2975}; 2976 2977var getDictionaryKey = function (inst) { 2978 // Prevents V8 performance issue: 2979 // https://github.com/facebook/react/pull/7232 2980 return '.' + inst._rootNodeID; 2981}; 2982 2983function isInteractive(tag) { 2984 return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; 2985} 2986 2987function shouldPreventMouseEvent(name, type, props) { 2988 switch (name) { 2989 case 'onClick': 2990 case 'onClickCapture': 2991 case 'onDoubleClick': 2992 case 'onDoubleClickCapture': 2993 case 'onMouseDown': 2994 case 'onMouseDownCapture': 2995 case 'onMouseMove': 2996 case 'onMouseMoveCapture': 2997 case 'onMouseUp': 2998 case 'onMouseUpCapture': 2999 return !!(props.disabled && isInteractive(type)); 3000 default: 3001 return false; 3002 } 3003} 3004 3005/** 3006 * This is a unified interface for event plugins to be installed and configured. 3007 * 3008 * Event plugins can implement the following properties: 3009 * 3010 * `extractEvents` {function(string, DOMEventTarget, string, object): *} 3011 * Required. When a top-level event is fired, this method is expected to 3012 * extract synthetic events that will in turn be queued and dispatched. 3013 * 3014 * `eventTypes` {object} 3015 * Optional, plugins that fire events must publish a mapping of registration 3016 * names that are used to register listeners. Values of this mapping must 3017 * be objects that contain `registrationName` or `phasedRegistrationNames`. 3018 * 3019 * `executeDispatch` {function(object, function, string)} 3020 * Optional, allows plugins to override how an event gets dispatched. By 3021 * default, the listener is simply invoked. 3022 * 3023 * Each plugin that is injected into `EventsPluginHub` is immediately operable. 3024 * 3025 * @public 3026 */ 3027var EventPluginHub = { 3028 3029 /** 3030 * Methods for injecting dependencies. 3031 */ 3032 injection: { 3033 3034 /** 3035 * @param {array} InjectedEventPluginOrder 3036 * @public 3037 */ 3038 injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder, 3039 3040 /** 3041 * @param {object} injectedNamesToPlugins Map from names to plugin modules. 3042 */ 3043 injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName 3044 3045 }, 3046 3047 /** 3048 * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent. 3049 * 3050 * @param {object} inst The instance, which is the source of events. 3051 * @param {string} registrationName Name of listener (e.g. `onClick`). 3052 * @param {function} listener The callback to store. 3053 */ 3054 putListener: function (inst, registrationName, listener) { 3055 !(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; 3056 3057 var key = getDictionaryKey(inst); 3058 var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {}); 3059 bankForRegistrationName[key] = listener; 3060 3061 var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; 3062 if (PluginModule && PluginModule.didPutListener) { 3063 PluginModule.didPutListener(inst, registrationName, listener); 3064 } 3065 }, 3066 3067 /** 3068 * @param {object} inst The instance, which is the source of events. 3069 * @param {string} registrationName Name of listener (e.g. `onClick`). 3070 * @return {?function} The stored callback. 3071 */ 3072 getListener: function (inst, registrationName) { 3073 // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not 3074 // live here; needs to be moved to a better place soon 3075 var bankForRegistrationName = listenerBank[registrationName]; 3076 if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) { 3077 return null; 3078 } 3079 var key = getDictionaryKey(inst); 3080 return bankForRegistrationName && bankForRegistrationName[key]; 3081 }, 3082 3083 /** 3084 * Deletes a listener from the registration bank. 3085 * 3086 * @param {object} inst The instance, which is the source of events. 3087 * @param {string} registrationName Name of listener (e.g. `onClick`). 3088 */ 3089 deleteListener: function (inst, registrationName) { 3090 var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; 3091 if (PluginModule && PluginModule.willDeleteListener) { 3092 PluginModule.willDeleteListener(inst, registrationName); 3093 } 3094 3095 var bankForRegistrationName = listenerBank[registrationName]; 3096 // TODO: This should never be null -- when is it? 3097 if (bankForRegistrationName) { 3098 var key = getDictionaryKey(inst); 3099 delete bankForRegistrationName[key]; 3100 } 3101 }, 3102 3103 /** 3104 * Deletes all listeners for the DOM element with the supplied ID. 3105 * 3106 * @param {object} inst The instance, which is the source of events. 3107 */ 3108 deleteAllListeners: function (inst) { 3109 var key = getDictionaryKey(inst); 3110 for (var registrationName in listenerBank) { 3111 if (!listenerBank.hasOwnProperty(registrationName)) { 3112 continue; 3113 } 3114 3115 if (!listenerBank[registrationName][key]) { 3116 continue; 3117 } 3118 3119 var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; 3120 if (PluginModule && PluginModule.willDeleteListener) { 3121 PluginModule.willDeleteListener(inst, registrationName); 3122 } 3123 3124 delete listenerBank[registrationName][key]; 3125 } 3126 }, 3127 3128 /** 3129 * Allows registered plugins an opportunity to extract events from top-level 3130 * native browser events. 3131 * 3132 * @return {*} An accumulation of synthetic events. 3133 * @internal 3134 */ 3135 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { 3136 var events; 3137 var plugins = EventPluginRegistry.plugins; 3138 for (var i = 0; i < plugins.length; i++) { 3139 // Not every plugin in the ordering may be loaded at runtime. 3140 var possiblePlugin = plugins[i]; 3141 if (possiblePlugin) { 3142 var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); 3143 if (extractedEvents) { 3144 events = accumulateInto(events, extractedEvents); 3145 } 3146 } 3147 } 3148 return events; 3149 }, 3150 3151 /** 3152 * Enqueues a synthetic event that should be dispatched when 3153 * `processEventQueue` is invoked. 3154 * 3155 * @param {*} events An accumulation of synthetic events. 3156 * @internal 3157 */ 3158 enqueueEvents: function (events) { 3159 if (events) { 3160 eventQueue = accumulateInto(eventQueue, events); 3161 } 3162 }, 3163 3164 /** 3165 * Dispatches all synthetic events on the event queue. 3166 * 3167 * @internal 3168 */ 3169 processEventQueue: function (simulated) { 3170 // Set `eventQueue` to null before processing it so that we can tell if more
3171 // events get enqueued while processing. 3172 var processingEventQueue = eventQueue; 3173 eventQueue = null; 3174 if (simulated) { 3175 forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated); 3176 } else { 3177 forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); 3178 } 3179 !!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; 3180 // This would be a good time to rethrow if any of the event handlers threw. 3181 ReactErrorUtils.rethrowCaughtError(); 3182 }, 3183 3184 /** 3185 * These are needed for tests only. Do not use! 3186 */ 3187 __purge: function () { 3188 listenerBank = {}; 3189 }, 3190 3191 __getListenerBank: function () { 3192 return listenerBank; 3193 } 3194 3195}; 3196 3197module.exports = EventPluginHub; 3198/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 3199 3200/***/ }), 3201/* 22 */ 3202/***/ (function(module, exports, __webpack_require__) { 3203 3204"use strict"; 3205/* WEBPACK VAR INJECTION */(function(process) {/** 3206 * Copyright 2013-present, Facebook, Inc. 3207 * All rights reserved. 3208 * 3209 * This source code is licensed under the BSD-style license found in the 3210 * LICENSE file in the root directory of this source tree. An additional grant 3211 * of patent rights can be found in the PATENTS file in the same directory. 3212 * 3213 */ 3214 3215 3216 3217var EventPluginHub = __webpack_require__(21); 3218var EventPluginUtils = __webpack_require__(36); 3219 3220var accumulateInto = __webpack_require__(69); 3221var forEachAccumulated = __webpack_require__(70); 3222var warning = __webpack_require__(2); 3223 3224var getListener = EventPluginHub.getListener; 3225 3226/** 3227 * Some event types have a notion of different registration names for different 3228 * "phases" of propagation. This finds listeners by a given phase. 3229 */ 3230function listenerAtPhase(inst, event, propagationPhase) {
3231 var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; 3232 return getListener(inst, registrationName); 3233} 3234 3235/** 3236 * Tags a `SyntheticEvent` with dispatched listeners. Creating this function 3237 * here, allows us to not have to bind or create functions for each event. 3238 * Mutating the event's members allows us to not have to create a wrapping 3239 * "dispatch" object that pairs the event with the listener. 3240 */ 3241function accumulateDirectionalDispatches(inst, phase, event) { 3242 if (process.env.NODE_ENV !== 'production') { 3243 process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0; 3244 } 3245 var listener = listenerAtPhase(inst, event, phase); 3246 if (listener) { 3247 event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); 3248 event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); 3249 } 3250} 3251 3252/** 3253 * Collect dispatches (must be entirely collected before dispatching - see unit 3254 * tests). Lazily allocate the array to conserve memory. We must loop through 3255 * each event and perform the traversal for each one. We cannot perform a 3256 * single traversal for the entire collection of events because each event may 3257 * have a different target. 3258 */ 3259function accumulateTwoPhaseDispatchesSingle(event) {
3260 if (event && event.dispatchConfig.phasedRegistrationNames) { 3261 EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); 3262 } 3263} 3264 3265/** 3266 * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID. 3267 */ 3268function accumulateTwoPhaseDispatchesSingleSkipTarget(event) { 3269 if (event && event.dispatchConfig.phasedRegistrationNames) { 3270 var targetInst = event._targetInst; 3271 var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null; 3272 EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event); 3273 } 3274} 3275 3276/** 3277 * Accumulates without regard to direction, does not look for phased 3278 * registration names. Same as `accumulateDirectDispatchesSingle` but without 3279 * requiring that the `dispatchMarker` be the same as the dispatched ID. 3280 */ 3281function accumulateDispatches(inst, ignoredDirection, event) { 3282 if (event && event.dispatchConfig.registrationName) { 3283 var registrationName = event.dispatchConfig.registrationName; 3284 var listener = getListener(inst, registrationName); 3285 if (listener) { 3286 event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); 3287 event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); 3288 } 3289 } 3290} 3291 3292/** 3293 * Accumulates dispatches on an `SyntheticEvent`, but only for the 3294 * `dispatchMarker`. 3295 * @param {SyntheticEvent} event 3296 */ 3297function accumulateDirectDispatchesSingle(event) { 3298 if (event && event.dispatchConfig.registrationName) { 3299 accumulateDispatches(event._targetInst, null, event); 3300 } 3301} 3302 3303function accumulateTwoPhaseDispatches(events) { 3304 forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); 3305} 3306 3307function accumulateTwoPhaseDispatchesSkipTarget(events) { 3308 forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget); 3309} 3310 3311function accumulateEnterLeaveDispatches(leave, enter, from, to) { 3312 EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter); 3313} 3314 3315function accumulateDirectDispatches(events) { 3316 forEachAccumulated(events, accumulateDirectDispatchesSingle); 3317} 3318 3319/** 3320 * A small set of propagation patterns, each of which will accept a small amount 3321 * of information, and generate a set of "dispatch ready event objects" - which 3322 * are sets of events that have already been annotated with a set of dispatched 3323 * listener functions/ids. The API is designed this way to discourage these 3324 * propagation strategies from actually executing the dispatches, since we 3325 * always want to collect the entire set of dispatches before executing event a 3326 * single one. 3327 * 3328 * @constructor EventPropagators 3329 */ 3330var EventPropagators = { 3331 accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches, 3332 accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget, 3333 accumulateDirectDispatches: accumulateDirectDispatches, 3334 accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches 3335}; 3336 3337module.exports = EventPropagators; 3338/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 3339 3340/***/ }), 3341/* 23 */ 3342/***/ (function(module, exports, __webpack_require__) { 3343 3344"use strict"; 3345/** 3346 * Copyright 2013-present, Facebook, Inc. 3347 * All rights reserved. 3348 * 3349 * This source code is licensed under the BSD-style license found in the 3350 * LICENSE file in the root directory of this source tree. An additional grant 3351 * of patent rights can be found in the PATENTS file in the same directory. 3352 * 3353 */ 3354 3355 3356 3357/** 3358 * `ReactInstanceMap` maintains a mapping from a public facing stateful 3359 * instance (key) and the internal representation (value). This allows public 3360 * methods to accept the user facing instance as an argument and map them back 3361 * to internal methods. 3362 */ 3363 3364// TODO: Replace this with ES6: var ReactInstanceMap = new Map(); 3365 3366var ReactInstanceMap = { 3367 3368 /** 3369 * This API should be called `delete` but we'd have to make sure to always 3370 * transform these to strings for IE support. When this transform is fully 3371 * supported we can rename it. 3372 */ 3373 remove: function (key) { 3374 key._reactInternalInstance = undefined; 3375 }, 3376 3377 get: function (key) { 3378 return key._reactInternalInstance; 3379 }, 3380 3381 has: function (key) { 3382 return key._reactInternalInstance !== undefined; 3383 }, 3384 3385 set: function (key, value) { 3386 key._reactInternalInstance = value; 3387 } 3388 3389}; 3390 3391module.exports = ReactInstanceMap; 3392 3393/***/ }), 3394/* 24 */ 3395/***/ (function(module, exports, __webpack_require__) { 3396 3397"use strict"; 3398/** 3399 * Copyright 2013-present, Facebook, Inc. 3400 * All rights reserved. 3401 * 3402 * This source code is licensed under the BSD-style license found in the 3403 * LICENSE file in the root directory of this source tree. An additional grant 3404 * of patent rights can be found in the PATENTS file in the same directory. 3405 * 3406 */ 3407 3408 3409 3410var SyntheticEvent = __webpack_require__(12); 3411 3412var getEventTarget = __webpack_require__(45); 3413 3414/** 3415 * @interface UIEvent 3416 * @see http://www.w3.org/TR/DOM-Level-3-Events/ 3417 */ 3418var UIEventInterface = { 3419 view: function (event) { 3420 if (event.view) { 3421 return event.view; 3422 } 3423 3424 var target = getEventTarget(event); 3425 if (target.window === target) { 3426 // target is a window object 3427 return target; 3428 } 3429 3430 var doc = target.ownerDocument; 3431 // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. 3432 if (doc) { 3433 return doc.defaultView || doc.parentWindow; 3434 } else { 3435 return window; 3436 } 3437 }, 3438 detail: function (event) { 3439 return event.detail || 0; 3440 } 3441}; 3442 3443/** 3444 * @param {object} dispatchConfig Configuration used to dispatch this event. 3445 * @param {string} dispatchMarker Marker identifying the event target. 3446 * @param {object} nativeEvent Native browser event. 3447 * @extends {SyntheticEvent} 3448 */
3449function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { 3450 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); 3451} 3452 3453SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); 3454 3455module.exports = SyntheticUIEvent; 3456 3457/***/ }), 3458/* 25 */ 3459/***/ (function(module, exports, __webpack_require__) { 3460 3461"use strict"; 3462 3463 3464module.exports = __webpack_require__(19); 3465 3466 3467/***/ }), 3468/* 26 */ 3469/***/ (function(module, exports, __webpack_require__) { 3470 3471"use strict"; 3472/* WEBPACK VAR INJECTION */(function(process) {/** 3473 * Copyright 2013-present, Facebook, Inc. 3474 * All rights reserved. 3475 * 3476 * This source code is licensed under the BSD-style license found in the 3477 * LICENSE file in the root directory of this source tree. An additional grant 3478 * of patent rights can be found in the PATENTS file in the same directory. 3479 * 3480 * 3481 */ 3482 3483 3484 3485var _prodInvariant = __webpack_require__(3); 3486 3487var invariant = __webpack_require__(1); 3488 3489/** 3490 * Injectable ordering of event plugins. 3491 */ 3492var eventPluginOrder = null; 3493 3494/** 3495 * Injectable mapping from names to event plugin modules. 3496 */ 3497var namesToPlugins = {}; 3498 3499/** 3500 * Recomputes the plugin list using the injected plugins and plugin ordering. 3501 * 3502 * @private 3503 */ 3504function recomputePluginOrdering() { 3505 if (!eventPluginOrder) { 3506 // Wait until an `eventPluginOrder` is injected. 3507 return; 3508 } 3509 for (var pluginName in namesToPlugins) { 3510 var pluginModule = namesToPlugins[pluginName]; 3511 var pluginIndex = eventPluginOrder.indexOf(pluginName); 3512 !(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; 3513 if (EventPluginRegistry.plugins[pluginIndex]) { 3514 continue; 3515 } 3516 !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; 3517 EventPluginRegistry.plugins[pluginIndex] = pluginModule; 3518 var publishedEvents = pluginModule.eventTypes; 3519 for (var eventName in publishedEvents) { 3520 !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; 3521 } 3522 } 3523} 3524 3525/** 3526 * Publishes an event so that it can be dispatched by the supplied plugin. 3527 * 3528 * @param {object} dispatchConfig Dispatch configuration for the event. 3529 * @param {object} PluginModule Plugin publishing the event. 3530 * @return {boolean} True if the event was successfully published. 3531 * @private 3532 */ 3533function publishEventForPlugin(dispatchConfig, pluginModule, eventName) { 3534 !!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; 3535 EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig; 3536
3537 var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; 3538 if (phasedRegistrationNames) { 3539 for (var phaseName in phasedRegistrationNames) { 3540 if (phasedRegistrationNames.hasOwnProperty(phaseName)) { 3541 var phasedRegistrationName = phasedRegistrationNames[phaseName]; 3542 publishRegistrationName(phasedRegistrationName, pluginModule, eventName); 3543 } 3544 } 3545 return true; 3546 } else if (dispatchConfig.registrationName) { 3547 publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName); 3548 return true; 3549 } 3550 return false; 3551} 3552 3553/** 3554 * Publishes a registration name that is used to identify dispatched events and 3555 * can be used with `EventPluginHub.putListener` to register listeners. 3556 * 3557 * @param {string} registrationName Registration name to add. 3558 * @param {object} PluginModule Plugin publishing the event. 3559 * @private 3560 */ 3561function publishRegistrationName(registrationName, pluginModule, eventName) { 3562 !!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; 3563 EventPluginRegistry.registrationNameModules[registrationName] = pluginModule; 3564 EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies; 3565 3566 if (process.env.NODE_ENV !== 'production') { 3567 var lowerCasedName = registrationName.toLowerCase(); 3568 EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName; 3569 3570 if (registrationName === 'onDoubleClick') { 3571 EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName; 3572 } 3573 } 3574} 3575 3576/** 3577 * Registers plugins so that they can extract and dispatch events. 3578 * 3579 * @see {EventPluginHub} 3580 */ 3581var EventPluginRegistry = { 3582 3583 /** 3584 * Ordered list of injected plugins. 3585 */ 3586 plugins: [], 3587 3588 /** 3589 * Mapping from event name to dispatch config 3590 */ 3591 eventNameDispatchConfigs: {}, 3592 3593 /** 3594 * Mapping from registration name to plugin module 3595 */ 3596 registrationNameModules: {}, 3597 3598 /** 3599 * Mapping from registration name to event name 3600 */ 3601 registrationNameDependencies: {}, 3602 3603 /** 3604 * Mapping from lowercase registration names to the properly cased version, 3605 * used to warn in the case of missing event handlers. Available 3606 * only in __DEV__. 3607 * @type {Object} 3608 */ 3609 possibleRegistrationNames: process.env.NODE_ENV !== 'production' ? {} : null, 3610 // Trust the developer to only use possibleRegistrationNames in __DEV__ 3611 3612 /** 3613 * Injects an ordering of plugins (by plugin name). This allows the ordering 3614 * to be decoupled from injection of the actual plugins so that ordering is 3615 * always deterministic regardless of packaging, on-the-fly injection, etc. 3616 * 3617 * @param {array} InjectedEventPluginOrder 3618 * @internal 3619 * @see {EventPluginHub.injection.injectEventPluginOrder} 3620 */ 3621 injectEventPluginOrder: function (injectedEventPluginOrder) { 3622 !!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; 3623 // Clone the ordering so it cannot be dynamically mutated. 3624 eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder); 3625 recomputePluginOrdering(); 3626 }, 3627 3628 /** 3629 * Injects plugins to be used by `EventPluginHub`. The plugin names must be 3630 * in the ordering injected by `injectEventPluginOrder`. 3631 * 3632 * Plugins can be injected as part of page initialization or on-the-fly. 3633 * 3634 * @param {object} injectedNamesToPlugins Map from names to plugin modules. 3635 * @internal 3636 * @see {EventPluginHub.injection.injectEventPluginsByName} 3637 */ 3638 injectEventPluginsByName: function (injectedNamesToPlugins) { 3639 var isOrderingDirty = false; 3640 for (var pluginName in injectedNamesToPlugins) { 3641 if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { 3642 continue; 3643 } 3644 var pluginModule = injectedNamesToPlugins[pluginName]; 3645 if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) { 3646 !!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; 3647 namesToPlugins[pluginName] = pluginModule; 3648 isOrderingDirty = true; 3649 } 3650 } 3651 if (isOrderingDirty) { 3652 recomputePluginOrdering(); 3653 } 3654 }, 3655 3656 /** 3657 * Looks up the plugin for the supplied event. 3658 * 3659 * @param {object} event A synthetic event. 3660 * @return {?object} The plugin that created the supplied event. 3661 * @internal 3662 */ 3663 getPluginModuleForEvent: function (event) { 3664 var dispatchConfig = event.dispatchConfig;
3665 if (dispatchConfig.registrationName) { 3666 return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null; 3667 } 3668 if (dispatchConfig.phasedRegistrationNames !== undefined) { 3669 // pulling phasedRegistrationNames out of dispatchConfig helps Flow see 3670 // that it is not undefined. 3671 var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; 3672 3673 for (var phase in phasedRegistrationNames) { 3674 if (!phasedRegistrationNames.hasOwnProperty(phase)) { 3675 continue; 3676 } 3677 var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]]; 3678 if (pluginModule) { 3679 return pluginModule; 3680 } 3681 } 3682 } 3683 return null; 3684 }, 3685 3686 /** 3687 * Exposed for unit testing. 3688 * @private 3689 */ 3690 _resetEventPlugins: function () { 3691 eventPluginOrder = null; 3692 for (var pluginName in namesToPlugins) { 3693 if (namesToPlugins.hasOwnProperty(pluginName)) { 3694 delete namesToPlugins[pluginName]; 3695 } 3696 } 3697 EventPluginRegistry.plugins.length = 0; 3698 3699 var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs; 3700 for (var eventName in eventNameDispatchConfigs) { 3701 if (eventNameDispatchConfigs.hasOwnProperty(eventName)) { 3702 delete eventNameDispatchConfigs[eventName]; 3703 } 3704 } 3705 3706 var registrationNameModules = EventPluginRegistry.registrationNameModules; 3707 for (var registrationName in registrationNameModules) { 3708 if (registrationNameModules.hasOwnProperty(registrationName)) { 3709 delete registrationNameModules[registrationName]; 3710 } 3711 } 3712 3713 if (process.env.NODE_ENV !== 'production') { 3714 var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames; 3715 for (var lowerCasedName in possibleRegistrationNames) { 3716 if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) { 3717 delete possibleRegistrationNames[lowerCasedName]; 3718 } 3719 } 3720 } 3721 } 3722 3723}; 3724 3725module.exports = EventPluginRegistry; 3726/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 3727 3728/***/ }), 3729/* 27 */ 3730/***/ (function(module, exports, __webpack_require__) { 3731 3732"use strict"; 3733/** 3734 * Copyright 2013-present, Facebook, Inc. 3735 * All rights reserved. 3736 * 3737 * This source code is licensed under the BSD-style license found in the 3738 * LICENSE file in the root directory of this source tree. An additional grant 3739 * of patent rights can be found in the PATENTS file in the same directory. 3740 * 3741 */ 3742 3743 3744 3745var _assign = __webpack_require__(4); 3746 3747var EventPluginRegistry = __webpack_require__(26); 3748var ReactEventEmitterMixin = __webpack_require__(137); 3749var ViewportMetrics = __webpack_require__(68); 3750 3751var getVendorPrefixedEventName = __webpack_require__(172); 3752var isEventSupported = __webpack_require__(46); 3753 3754/** 3755 * Summary of `ReactBrowserEventEmitter` event handling: 3756 * 3757 * - Top-level delegation is used to trap most native browser events. This 3758 * may only occur in the main thread and is the responsibility of 3759 * ReactEventListener, which is injected and can therefore support pluggable 3760 * event sources. This is the only work that occurs in the main thread. 3761 * 3762 * - We normalize and de-duplicate events to account for browser quirks. This 3763 * may be done in the worker thread. 3764 * 3765 * - Forward these native events (with the associated top-level type used to 3766 * trap it) to `EventPluginHub`, which in turn will ask plugins if they want 3767 * to extract any synthetic events. 3768 * 3769 * - The `EventPluginHub` will then process each event by annotating them with 3770 * "dispatches", a sequence of listeners and IDs that care about that event. 3771 * 3772 * - The `EventPluginHub` then dispatches the events. 3773 * 3774 * Overview of React and the event system: 3775 * 3776 * +------------+ . 3777 * | DOM | . 3778 * +------------+ . 3779 * | . 3780 * v . 3781 * +------------+ . 3782 * | ReactEvent | . 3783 * | Listener | . 3784 * +------------+ . +-----------+ 3785 * | . +--------+|SimpleEvent| 3786 * | . | |Plugin | 3787 * +-----|------+ . v +-----------+ 3788 * | | | . +--------------+ +------------+ 3789 * | +-----------.--->|EventPluginHub| | Event | 3790 * | | . | | +-----------+ | Propagators| 3791 * | ReactEvent | . | | |TapEvent | |------------| 3792 * | Emitter | . | |<---+|Plugin | |other plugin| 3793 * | | . | | +-----------+ | utilities | 3794 * | +-----------.--->| | +------------+ 3795 * | | | . +--------------+ 3796 * +-----|------+ . ^ +-----------+ 3797 * | . | |Enter/Leave|
3798 * + . +-------+|Plugin | 3799 * +-------------+ . +-----------+ 3800 * | application | . 3801 * |-------------| . 3802 * | | . 3803 * | | . 3804 * +-------------+ . 3805 * . 3806 * React Core . General Purpose Event Plugin System 3807 */ 3808 3809var hasEventPageXY; 3810var alreadyListeningTo = {}; 3811var isMonitoringScrollValue = false; 3812var reactTopListenersCounter = 0; 3813 3814// For events like 'submit' which don't consistently bubble (which we trap at a 3815// lower node than `document`), binding at `document` would cause duplicate 3816// events so we don't include them here 3817var topEventMapping = { 3818 topAbort: 'abort', 3819 topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend', 3820 topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration', 3821 topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart', 3822 topBlur: 'blur', 3823 topCanPlay: 'canplay', 3824 topCanPlayThrough: 'canplaythrough', 3825 topChange: 'change', 3826 topClick: 'click', 3827 topCompositionEnd: 'compositionend', 3828 topCompositionStart: 'compositionstart', 3829 topCompositionUpdate: 'compositionupdate', 3830 topContextMenu: 'contextmenu', 3831 topCopy: 'copy', 3832 topCut: 'cut', 3833 topDoubleClick: 'dblclick', 3834 topDrag: 'drag', 3835 topDragEnd: 'dragend', 3836 topDragEnter: 'dragenter', 3837 topDragExit: 'dragexit', 3838 topDragLeave: 'dragleave', 3839 topDragOver: 'dragover', 3840 topDragStart: 'dragstart', 3841 topDrop: 'drop', 3842 topDurationChange: 'durationchange', 3843 topEmptied: 'emptied', 3844 topEncrypted: 'encrypted', 3845 topEnded: 'ended', 3846 topError: 'error', 3847 topFocus: 'focus', 3848 topInput: 'input', 3849 topKeyDown: 'keydown', 3850 topKeyPress: 'keypress', 3851 topKeyUp: 'keyup', 3852 topLoadedData: 'loadeddata', 3853 topLoadedMetadata: 'loadedmetadata', 3854 topLoadStart: 'loadstart', 3855 topMouseDown: 'mousedown', 3856 topMouseMove: 'mousemove', 3857 topMouseOut: 'mouseout', 3858 topMouseOver: 'mouseover', 3859 topMouseUp: 'mouseup', 3860 topPaste: 'paste', 3861 topPause: 'pause', 3862 topPlay: 'play', 3863 topPlaying: 'playing', 3864 topProgress: 'progress', 3865 topRateChange: 'ratechange', 3866 topScroll: 'scroll', 3867 topSeeked: 'seeked', 3868 topSeeking: 'seeking', 3869 topSelectionChange: 'selectionchange', 3870 topStalled: 'stalled', 3871 topSuspend: 'suspend', 3872 topTextInput: 'textInput', 3873 topTimeUpdate: 'timeupdate', 3874 topTouchCancel: 'touchcancel', 3875 topTouchEnd: 'touchend', 3876 topTouchMove: 'touchmove', 3877 topTouchStart: 'touchstart', 3878 topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend', 3879 topVolumeChange: 'volumechange', 3880 topWaiting: 'waiting', 3881 topWheel: 'wheel' 3882}; 3883 3884/** 3885 * To ensure no conflicts with other potential React instances on the page 3886 */ 3887var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2); 3888 3889function getListeningForDocument(mountAt) { 3890 // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty` 3891 // directly. 3892 if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) { 3893 mountAt[topListenersIDKey] = reactTopListenersCounter++; 3894 alreadyListeningTo[mountAt[topListenersIDKey]] = {}; 3895 } 3896 return alreadyListeningTo[mountAt[topListenersIDKey]]; 3897} 3898 3899/** 3900 * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For 3901 * example: 3902 * 3903 * EventPluginHub.putListener('myID', 'onClick', myFunction); 3904 * 3905 * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'. 3906 * 3907 * @internal 3908 */ 3909var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { 3910 3911 /** 3912 * Injectable event backend 3913 */ 3914 ReactEventListener: null, 3915 3916 injection: { 3917 /** 3918 * @param {object} ReactEventListener 3919 */ 3920 injectReactEventListener: function (ReactEventListener) { 3921 ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel); 3922 ReactBrowserEventEmitter.ReactEventListener = ReactEventListener; 3923 } 3924 }, 3925 3926 /** 3927 * Sets whether or not any created callbacks should be enabled. 3928 * 3929 * @param {boolean} enabled True if callbacks should be enabled. 3930 */ 3931 setEnabled: function (enabled) { 3932 if (ReactBrowserEventEmitter.ReactEventListener) { 3933 ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled); 3934 } 3935 }, 3936 3937 /** 3938 * @return {boolean} True if callbacks are enabled. 3939 */ 3940 isEnabled: function () { 3941 return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled()); 3942 }, 3943 3944 /** 3945 * We listen for bubbled touch events on the document object. 3946 * 3947 * Firefox v8.01 (and possibly others) exhibited strange behavior when 3948 * mounting `onmousemove` events at some node that was not the document 3949 * element. The symptoms were that if your mouse is not moving over something 3950 * contained within that mount point (for example on the background) the 3951 * top-level listeners for `onmousemove` won't be called. However, if you 3952 * register the `mousemove` on the document object, then it will of course 3953 * catch all `mousemove`s. This along with iOS quirks, justifies restricting 3954 * top-level listeners to the document object only, at least for these 3955 * movement types of events and possibly all events. 3956 * 3957 * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html 3958 * 3959 * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but 3960 * they bubble to document. 3961 * 3962 * @param {string} registrationName Name of listener (e.g. `onClick`). 3963 * @param {object} contentDocumentHandle Document which owns the container 3964 */ 3965 listenTo: function (registrationName, contentDocumentHandle) { 3966 var mountAt = contentDocumentHandle; 3967 var isListening = getListeningForDocument(mountAt); 3968 var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName]; 3969 3970 for (var i = 0; i < dependencies.length; i++) {
3971 var dependency = dependencies[i]; 3972 if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) { 3973 if (dependency === 'topWheel') { 3974 if (isEventSupported('wheel')) { 3975 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt); 3976 } else if (isEventSupported('mousewheel')) { 3977 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt); 3978 } else { 3979 // Firefox needs to capture a different mouse scroll event. 3980 // @see http://www.quirksmode.org/dom/events/tests/scroll.html 3981 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt); 3982 } 3983 } else if (dependency === 'topScroll') { 3984 3985 if (isEventSupported('scroll', true)) { 3986 ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt); 3987 } else { 3988 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE); 3989 } 3990 } else if (dependency === 'topFocus' || dependency === 'topBlur') { 3991 3992 if (isEventSupported('focus', true)) { 3993 ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt); 3994 ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt); 3995 } else if (isEventSupported('focusin')) { 3996 // IE has `focusin` and `focusout` events which bubble. 3997 // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html 3998 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt); 3999 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt); 4000 } 4001 4002 // to make sure blur and focus event listeners are only attached once 4003 isListening.topBlur = true; 4004 isListening.topFocus = true; 4005 } else if (topEventMapping.hasOwnProperty(dependency)) { 4006 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt); 4007 } 4008 4009 isListening[dependency] = true; 4010 } 4011 } 4012 }, 4013 4014 trapBubbledEvent: function (topLevelType, handlerBaseName, handle) { 4015 return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle); 4016 }, 4017 4018 trapCapturedEvent: function (topLevelType, handlerBaseName, handle) { 4019 return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle); 4020 }, 4021 4022 /** 4023 * Protect against document.createEvent() returning null 4024 * Some popup blocker extensions appear to do this: 4025 * https://github.com/facebook/react/issues/6887 4026 */ 4027 supportsEventPageXY: function () { 4028 if (!document.createEvent) { 4029 return false; 4030 } 4031 var ev = document.createEvent('MouseEvent'); 4032 return ev != null && 'pageX' in ev; 4033 }, 4034 4035 /** 4036 * Listens to window scroll and resize events. We cache scroll values so that 4037 * application code can access them without triggering reflows. 4038 * 4039 * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when 4040 * pageX/pageY isn't supported (legacy browsers). 4041 * 4042 * NOTE: Scroll events do not bubble. 4043 * 4044 * @see http://www.quirksmode.org/dom/events/scroll.html 4045 */ 4046 ensureScrollValueMonitoring: function () { 4047 if (hasEventPageXY === undefined) { 4048 hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY(); 4049 } 4050 if (!hasEventPageXY && !isMonitoringScrollValue) { 4051 var refresh = ViewportMetrics.refreshScrollValues; 4052 ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh); 4053 isMonitoringScrollValue = true; 4054 } 4055 } 4056 4057}); 4058 4059module.exports = ReactBrowserEventEmitter; 4060 4061/***/ }), 4062/* 28 */ 4063/***/ (function(module, exports, __webpack_require__) { 4064 4065"use strict"; 4066/** 4067 * Copyright 2013-present, Facebook, Inc. 4068 * All rights reserved. 4069 * 4070 * This source code is licensed under the BSD-style license found in the 4071 * LICENSE file in the root directory of this source tree. An additional grant 4072 * of patent rights can be found in the PATENTS file in the same directory. 4073 * 4074 */ 4075 4076 4077 4078var SyntheticUIEvent = __webpack_require__(24); 4079var ViewportMetrics = __webpack_require__(68); 4080 4081var getEventModifierState = __webpack_require__(44); 4082 4083/** 4084 * @interface MouseEvent 4085 * @see http://www.w3.org/TR/DOM-Level-3-Events/ 4086 */ 4087var MouseEventInterface = { 4088 screenX: null, 4089 screenY: null, 4090 clientX: null, 4091 clientY: null, 4092 ctrlKey: null, 4093 shiftKey: null, 4094 altKey: null, 4095 metaKey: null, 4096 getModifierState: getEventModifierState, 4097 button: function (event) { 4098 // Webkit, Firefox, IE9+ 4099 // which: 1 2 3 4100 // button: 0 1 2 (standard) 4101 var button = event.button; 4102 if ('which' in event) { 4103 return button; 4104 } 4105 // IE<9 4106 // which: undefined 4107 // button: 0 0 0 4108 // button: 1 4 2 (onmouseup) 4109 return button === 2 ? 2 : button === 4 ? 1 : 0; 4110 }, 4111 buttons: null, 4112 relatedTarget: function (event) { 4113 return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement); 4114 }, 4115 // "Proprietary" Interface. 4116 pageX: function (event) { 4117 return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft; 4118 }, 4119 pageY: function (event) { 4120 return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop; 4121 } 4122}; 4123 4124/** 4125 * @param {object} dispatchConfig Configuration used to dispatch this event. 4126 * @param {string} dispatchMarker Marker identifying the event target. 4127 * @param {object} nativeEvent Native browser event. 4128 * @extends {SyntheticUIEvent} 4129 */
4130function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { 4131 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); 4132} 4133 4134SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface); 4135 4136module.exports = SyntheticMouseEvent; 4137 4138/***/ }), 4139/* 29 */ 4140/***/ (function(module, exports, __webpack_require__) { 4141 4142"use strict"; 4143/* WEBPACK VAR INJECTION */(function(process) {/** 4144 * Copyright 2013-present, Facebook, Inc. 4145 * All rights reserved. 4146 * 4147 * This source code is licensed under the BSD-style license found in the 4148 * LICENSE file in the root directory of this source tree. An additional grant 4149 * of patent rights can be found in the PATENTS file in the same directory. 4150 * 4151 * 4152 */ 4153 4154 4155 4156var _prodInvariant = __webpack_require__(3); 4157 4158var invariant = __webpack_require__(1); 4159 4160var OBSERVED_ERROR = {}; 4161 4162/** 4163 * `Transaction` creates a black box that is able to wrap any method such that 4164 * certain invariants are maintained before and after the method is invoked 4165 * (Even if an exception is thrown while invoking the wrapped method). Whoever 4166 * instantiates a transaction can provide enforcers of the invariants at 4167 * creation time. The `Transaction` class itself will supply one additional 4168 * automatic invariant for you - the invariant that any transaction instance 4169 * should not be run while it is already being run. You would typically create a 4170 * single instance of a `Transaction` for reuse multiple times, that potentially 4171 * is used to wrap several different methods. Wrappers are extremely simple - 4172 * they only require implementing two methods. 4173 * 4174 * <pre> 4175 * wrappers (injected at creation time) 4176 * + + 4177 * | | 4178 * +-----------------|--------|--------------+ 4179 * | v | | 4180 * | +---------------+ | | 4181 * | +--| wrapper1 |---|----+ | 4182 * | | +---------------+ v | | 4183 * | | +-------------+ | | 4184 * | | +----| wrapper2 |--------+ | 4185 * | | | +-------------+ | | | 4186 * | | | | | | 4187 * | v v v v | wrapper 4188 * | +---+ +---+ +---------+ +---+ +---+ | invariants 4189 * perform(anyMethod) | | | | | | | | | | | | maintained 4190 * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|--------> 4191 * | | | | | | | | | | | | 4192 * | | | | | | | | | | | | 4193 * | | | | | | | | | | | | 4194 * | +---+ +---+ +---------+ +---+ +---+ | 4195 * | initialize close | 4196 * +-----------------------------------------+ 4197 * </pre> 4198 * 4199 * Use cases: 4200 * - Preserving the input selection ranges before/after reconciliation. 4201 * Restoring selection even in the event of an unexpected error. 4202 * - Deactivating events while rearranging the DOM, preventing blurs/focuses, 4203 * while guaranteeing that afterwards, the event system is reactivated. 4204 * - Flushing a queue of collected DOM mutations to the main UI thread after a 4205 * reconciliation takes place in a worker thread. 4206 * - Invoking any collected `componentDidUpdate` callbacks after rendering new 4207 * content. 4208 * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue 4209 * to preserve the `scrollTop` (an automatic scroll aware DOM). 4210 * - (Future use case): Layout calculations before and after DOM updates. 4211 * 4212 * Transactional plugin API: 4213 * - A module that has an `initialize` method that returns any precomputation. 4214 * - and a `close` method that accepts the precomputation. `close` is invoked 4215 * when the wrapped process is completed, or has failed. 4216 * 4217 * @param {Array<TransactionalWrapper>} transactionWrapper Wrapper modules 4218 * that implement `initialize` and `close`. 4219 * @return {Transaction} Single transaction for reuse in thread. 4220 * 4221 * @class Transaction 4222 */ 4223var TransactionImpl = { 4224 /** 4225 * Sets up this instance so that it is prepared for collecting metrics. Does 4226 * so such that this setup method may be used on an instance that is already 4227 * initialized, in a way that does not consume additional memory upon reuse. 4228 * That can be useful if you decide to make your subclass of this mixin a 4229 * "PooledClass". 4230 */ 4231 reinitializeTransaction: function () { 4232 this.transactionWrappers = this.getTransactionWrappers(); 4233 if (this.wrapperInitData) { 4234 this.wrapperInitData.length = 0; 4235 } else { 4236 this.wrapperInitData = []; 4237 } 4238 this._isInTransaction = false;
4239 }, 4240 4241 _isInTransaction: false, 4242 4243 /** 4244 * @abstract 4245 * @return {Array<TransactionWrapper>} Array of transaction wrappers. 4246 */ 4247 getTransactionWrappers: null, 4248 4249 isInTransaction: function () { 4250 return !!this._isInTransaction; 4251 }, 4252 4253 /** 4254 * Executes the function within a safety window. Use this for the top level 4255 * methods that result in large amounts of computation/mutations that would 4256 * need to be safety checked. The optional arguments helps prevent the need 4257 * to bind in many cases. 4258 * 4259 * @param {function} method Member of scope to call. 4260 * @param {Object} scope Scope to invoke from. 4261 * @param {Object?=} a Argument to pass to the method. 4262 * @param {Object?=} b Argument to pass to the method. 4263 * @param {Object?=} c Argument to pass to the method. 4264 * @param {Object?=} d Argument to pass to the method. 4265 * @param {Object?=} e Argument to pass to the method. 4266 * @param {Object?=} f Argument to pass to the method. 4267 * 4268 * @return {*} Return value from `method`. 4269 */ 4270 perform: function (method, scope, a, b, c, d, e, f) { 4271 !!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; 4272 var errorThrown; 4273 var ret; 4274 try { 4275 this._isInTransaction = true; 4276 // Catching errors makes debugging more difficult, so we start with 4277 // errorThrown set to true before setting it to false after calling 4278 // close -- if it's still set to true in the finally block, it means 4279 // one of these calls threw. 4280 errorThrown = true; 4281 this.initializeAll(0); 4282 ret = method.call(scope, a, b, c, d, e, f); 4283 errorThrown = false; 4284 } finally { 4285 try { 4286 if (errorThrown) { 4287 // If `method` throws, prefer to show that stack trace over any thrown 4288 // by invoking `closeAll`. 4289 try { 4290 this.closeAll(0); 4291 } catch (err) {} 4292 } else { 4293 // Since `method` didn't throw, we don't want to silence the exception 4294 // here. 4295 this.closeAll(0); 4296 } 4297 } finally { 4298 this._isInTransaction = false; 4299 } 4300 } 4301 return ret; 4302 }, 4303 4304 initializeAll: function (startIndex) { 4305 var transactionWrappers = this.transactionWrappers; 4306 for (var i = startIndex; i < transactionWrappers.length; i++) { 4307 var wrapper = transactionWrappers[i]; 4308 try { 4309 // Catching errors makes debugging more difficult, so we start with the 4310 // OBSERVED_ERROR state before overwriting it with the real return value 4311 // of initialize -- if it's still set to OBSERVED_ERROR in the finally 4312 // block, it means wrapper.initialize threw. 4313 this.wrapperInitData[i] = OBSERVED_ERROR; 4314 this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null; 4315 } finally { 4316 if (this.wrapperInitData[i] === OBSERVED_ERROR) { 4317 // The initializer for wrapper i threw an error; initialize the 4318 // remaining wrappers but silence any exceptions from them to ensure 4319 // that the first error is the one to bubble up. 4320 try { 4321 this.initializeAll(i + 1); 4322 } catch (err) {} 4323 } 4324 } 4325 } 4326 }, 4327 4328 /** 4329 * Invokes each of `this.transactionWrappers.close[i]` functions, passing into 4330 * them the respective return values of `this.transactionWrappers.init[i]` 4331 * (`close`rs that correspond to initializers that failed will not be 4332 * invoked). 4333 */ 4334 closeAll: function (startIndex) { 4335 !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0; 4336 var transactionWrappers = this.transactionWrappers; 4337 for (var i = startIndex; i < transactionWrappers.length; i++) { 4338 var wrapper = transactionWrappers[i]; 4339 var initData = this.wrapperInitData[i]; 4340 var errorThrown; 4341 try { 4342 // Catching errors makes debugging more difficult, so we start with
4343 // errorThrown set to true before setting it to false after calling 4344 // close -- if it's still set to true in the finally block, it means 4345 // wrapper.close threw. 4346 errorThrown = true; 4347 if (initData !== OBSERVED_ERROR && wrapper.close) { 4348 wrapper.close.call(this, initData); 4349 } 4350 errorThrown = false; 4351 } finally { 4352 if (errorThrown) { 4353 // The closer for wrapper i threw an error; close the remaining 4354 // wrappers but silence any exceptions from them to ensure that the 4355 // first error is the one to bubble up. 4356 try { 4357 this.closeAll(i + 1); 4358 } catch (e) {} 4359 } 4360 } 4361 } 4362 this.wrapperInitData.length = 0; 4363 } 4364}; 4365 4366module.exports = TransactionImpl; 4367/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 4368 4369/***/ }), 4370/* 30 */ 4371/***/ (function(module, exports, __webpack_require__) { 4372 4373"use strict"; 4374/** 4375 * Copyright 2016-present, Facebook, Inc. 4376 * All rights reserved. 4377 * 4378 * This source code is licensed under the BSD-style license found in the 4379 * LICENSE file in the root directory of this source tree. An additional grant 4380 * of patent rights can be found in the PATENTS file in the same directory. 4381 * 4382 * Based on the escape-html library, which is used under the MIT License below: 4383 * 4384 * Copyright (c) 2012-2013 TJ Holowaychuk 4385 * Copyright (c) 2015 Andreas Lubbe 4386 * Copyright (c) 2015 Tiancheng "Timothy" Gu 4387 * 4388 * Permission is hereby granted, free of charge, to any person obtaining 4389 * a copy of this software and associated documentation files (the 4390 * 'Software'), to deal in the Software without restriction, including 4391 * without limitation the rights to use, copy, modify, merge, publish, 4392 * distribute, sublicense, and/or sell copies of the Software, and to 4393 * permit persons to whom the Software is furnished to do so, subject to 4394 * the following conditions: 4395 * 4396 * The above copyright notice and this permission notice shall be 4397 * included in all copies or substantial portions of the Software. 4398 * 4399 * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 4400 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 4401 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 4402 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 4403 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 4404 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 4405 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 4406 * 4407 */ 4408 4409 4410 4411// code copied and modified from escape-html 4412/** 4413 * Module variables. 4414 * @private 4415 */ 4416 4417var matchHtmlRegExp = /["'&<>]/; 4418 4419/** 4420 * Escape special characters in the given string of html. 4421 * 4422 * @param {string} string The string to escape for inserting into HTML 4423 * @return {string} 4424 * @public 4425 */ 4426 4427function escapeHtml(string) { 4428 var str = '' + string; 4429 var match = matchHtmlRegExp.exec(str); 4430 4431 if (!match) { 4432 return str; 4433 } 4434 4435 var escape; 4436 var html = ''; 4437 var index = 0; 4438 var lastIndex = 0; 4439 4440 for (index = match.index; index < str.length; index++) { 4441 switch (str.charCodeAt(index)) { 4442 case 34: 4443 // " 4444 escape = '"'; 4445 break; 4446 case 38: 4447 // & 4448 escape = '&'; 4449 break; 4450 case 39: 4451 // ' 4452 escape = '''; // modified from escape-html; used to be ''' 4453 break; 4454 case 60: 4455 // < 4456 escape = '<'; 4457 break; 4458 case 62: 4459 // > 4460 escape = '>'; 4461 break; 4462 default: 4463 continue; 4464 } 4465 4466 if (lastIndex !== index) { 4467 html += str.substring(lastIndex, index); 4468 } 4469 4470 lastIndex = index + 1; 4471 html += escape; 4472 } 4473 4474 return lastIndex !== index ? html + str.substring(lastIndex, index) : html; 4475} 4476// end code copied and modified from escape-html 4477 4478 4479/** 4480 * Escapes text to prevent scripting attacks. 4481 * 4482 * @param {*} text Text value to escape. 4483 * @return {string} An escaped string. 4484 */ 4485function escapeTextContentForBrowser(text) { 4486 if (typeof text === 'boolean' || typeof text === 'number') {
4487 // this shortcircuit helps perf for types that we know will never have 4488 // special characters, especially given that this function is used often 4489 // for numeric dom ids. 4490 return '' + text; 4491 } 4492 return escapeHtml(text); 4493} 4494 4495module.exports = escapeTextContentForBrowser; 4496 4497/***/ }), 4498/* 31 */ 4499/***/ (function(module, exports, __webpack_require__) { 4500 4501"use strict"; 4502/** 4503 * Copyright 2013-present, Facebook, Inc. 4504 * All rights reserved. 4505 * 4506 * This source code is licensed under the BSD-style license found in the 4507 * LICENSE file in the root directory of this source tree. An additional grant 4508 * of patent rights can be found in the PATENTS file in the same directory. 4509 * 4510 */ 4511 4512 4513 4514var ExecutionEnvironment = __webpack_require__(6); 4515var DOMNamespaces = __webpack_require__(35); 4516 4517var WHITESPACE_TEST = /^[ \r\n\t\f]/; 4518var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; 4519 4520var createMicrosoftUnsafeLocalFunction = __webpack_require__(42); 4521 4522// SVG temp container for IE lacking innerHTML 4523var reusableSVGContainer; 4524 4525/** 4526 * Set the innerHTML property of a node, ensuring that whitespace is preserved 4527 * even in IE8. 4528 * 4529 * @param {DOMElement} node 4530 * @param {string} html 4531 * @internal 4532 */ 4533var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) { 4534 // IE does not have innerHTML for SVG nodes, so instead we inject the 4535 // new markup in a temp node and then move the child nodes across into 4536 // the target node 4537 if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) { 4538 reusableSVGContainer = reusableSVGContainer || document.createElement('div'); 4539 reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>'; 4540 var svgNode = reusableSVGContainer.firstChild; 4541 while (svgNode.firstChild) { 4542 node.appendChild(svgNode.firstChild); 4543 } 4544 } else { 4545 node.innerHTML = html; 4546 } 4547}); 4548 4549if (ExecutionEnvironment.canUseDOM) { 4550 // IE8: When updating a just created node with innerHTML only leading 4551 // whitespace is removed. When updating an existing node with innerHTML 4552 // whitespace in root TextNodes is also collapsed. 4553 // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html 4554 4555 // Feature detection; only IE8 is known to behave improperly like this. 4556 var testElement = document.createElement('div'); 4557 testElement.innerHTML = ' '; 4558 if (testElement.innerHTML === '') { 4559 setInnerHTML = function (node, html) { 4560 // Magic theory: IE8 supposedly differentiates between added and updated 4561 // nodes when processing innerHTML, innerHTML on updated nodes suffers 4562 // from worse whitespace behavior. Re-adding a node like this triggers 4563 // the initial and more favorable whitespace behavior. 4564 // TODO: What to do on a detached node? 4565 if (node.parentNode) { 4566 node.parentNode.replaceChild(node, node); 4567 } 4568 4569 // We also implement a workaround for non-visible tags disappearing into 4570 // thin air on IE8, this only happens if there is no visible text 4571 // in-front of the non-visible tags. Piggyback on the whitespace fix 4572 // and simply check if any non-visible tags appear in the source. 4573 if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) { 4574 // Recover leading whitespace by temporarily prepending any character. 4575 // \uFEFF has the potential advantage of being zero-width/invisible. 4576 // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode 4577 // in hopes that this is preserved even if "\uFEFF" is transformed to 4578 // the actual Unicode character (by Babel, for example). 4579 // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216 4580 node.innerHTML = String.fromCharCode(0xFEFF) + html; 4581 4582 // deleteData leaves an empty `TextNode` which offsets the index of all 4583 // children. Definitely want to avoid this. 4584 var textNode = node.firstChild; 4585 if (textNode.data.length === 1) { 4586 node.removeChild(textNode); 4587 } else { 4588 textNode.deleteData(0, 1); 4589 } 4590 } else { 4591 node.innerHTML = html; 4592 } 4593 }; 4594 } 4595 testElement = null; 4596} 4597 4598module.exports = setInnerHTML; 4599 4600/***/ }), 4601/* 32 */ 4602/***/ (function(module, exports, __webpack_require__) { 4603 4604"use strict"; 4605/* WEBPACK VAR INJECTION */(function(process) {/** 4606 * Copyright 2013-present, Facebook, Inc. 4607 * All rights reserved. 4608 * 4609 * This source code is licensed under the BSD-style license found in the 4610 * LICENSE file in the root directory of this source tree. An additional grant 4611 * of patent rights can be found in the PATENTS file in the same directory. 4612 * 4613 * 4614 */ 4615 4616 4617 4618var canDefineProperty = false;
4619if (process.env.NODE_ENV !== 'production') { 4620 try { 4621 // $FlowFixMe https://github.com/facebook/flow/issues/285 4622 Object.defineProperty({}, 'x', { get: function () {} }); 4623 canDefineProperty = true; 4624 } catch (x) { 4625 // IE will fail on defineProperty 4626 } 4627} 4628 4629module.exports = canDefineProperty; 4630/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 4631 4632/***/ }), 4633/* 33 */ 4634/***/ (function(module, exports, __webpack_require__) { 4635 4636"use strict"; 4637/** 4638 * Copyright (c) 2013-present, Facebook, Inc. 4639 * All rights reserved. 4640 * 4641 * This source code is licensed under the BSD-style license found in the 4642 * LICENSE file in the root directory of this source tree. An additional grant 4643 * of patent rights can be found in the PATENTS file in the same directory. 4644 * 4645 * @typechecks 4646 * 4647 */ 4648 4649/*eslint-disable no-self-compare */ 4650 4651 4652 4653var hasOwnProperty = Object.prototype.hasOwnProperty; 4654 4655/** 4656 * inlined Object.is polyfill to avoid requiring consumers ship their own 4657 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is 4658 */ 4659function is(x, y) { 4660 // SameValue algorithm 4661 if (x === y) { 4662 // Steps 1-5, 7-10 4663 // Steps 6.b-6.e: +0 != -0 4664 // Added the nonzero y check to make Flow happy, but it is redundant 4665 return x !== 0 || y !== 0 || 1 / x === 1 / y; 4666 } else { 4667 // Step 6.a: NaN == NaN 4668 return x !== x && y !== y; 4669 } 4670} 4671 4672/** 4673 * Performs equality by iterating through keys on an object and returning false 4674 * when any key has values which are not strictly equal between the arguments. 4675 * Returns true when the values of all keys are strictly equal. 4676 */ 4677function shallowEqual(objA, objB) { 4678 if (is(objA, objB)) { 4679 return true; 4680 } 4681 4682 if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { 4683 return false; 4684 } 4685 4686 var keysA = Object.keys(objA); 4687 var keysB = Object.keys(objB); 4688 4689 if (keysA.length !== keysB.length) { 4690 return false; 4691 } 4692 4693 // Test for A's keys different from B. 4694 for (var i = 0; i < keysA.length; i++) { 4695 if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { 4696 return false; 4697 } 4698 } 4699 4700 return true; 4701} 4702 4703module.exports = shallowEqual; 4704 4705/***/ }), 4706/* 34 */ 4707/***/ (function(module, exports, __webpack_require__) { 4708 4709"use strict"; 4710/* WEBPACK VAR INJECTION */(function(process) {/** 4711 * Copyright 2013-present, Facebook, Inc. 4712 * All rights reserved. 4713 * 4714 * This source code is licensed under the BSD-style license found in the 4715 * LICENSE file in the root directory of this source tree. An additional grant 4716 * of patent rights can be found in the PATENTS file in the same directory. 4717 * 4718 */ 4719 4720 4721 4722var DOMLazyTree = __webpack_require__(17); 4723var Danger = __webpack_require__(110); 4724var ReactDOMComponentTree = __webpack_require__(5); 4725var ReactInstrumentation = __webpack_require__(8); 4726 4727var createMicrosoftUnsafeLocalFunction = __webpack_require__(42); 4728var setInnerHTML = __webpack_require__(31); 4729var setTextContent = __webpack_require__(75); 4730 4731function getNodeAfter(parentNode, node) { 4732 // Special case for text components, which return [open, close] comments 4733 // from getHostNode. 4734 if (Array.isArray(node)) { 4735 node = node[1]; 4736 } 4737 return node ? node.nextSibling : parentNode.firstChild; 4738} 4739 4740/** 4741 * Inserts `childNode` as a child of `parentNode` at the `index`. 4742 * 4743 * @param {DOMElement} parentNode Parent node in which to insert. 4744 * @param {DOMElement} childNode Child node to insert. 4745 * @param {number} index Index at which to insert the child. 4746 * @internal 4747 */ 4748var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) { 4749 // We rely exclusively on `insertBefore(node, null)` instead of also using 4750 // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so 4751 // we are careful to use `null`.) 4752 parentNode.insertBefore(childNode, referenceNode); 4753}); 4754 4755function insertLazyTreeChildAt(parentNode, childTree, referenceNode) { 4756 DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode); 4757} 4758 4759function moveChild(parentNode, childNode, referenceNode) { 4760 if (Array.isArray(childNode)) { 4761 moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode); 4762 } else { 4763 insertChildAt(parentNode, childNode, referenceNode); 4764 } 4765} 4766 4767function removeChild(parentNode, childNode) { 4768 if (Array.isArray(childNode)) { 4769 var closingComment = childNode[1]; 4770 childNode = childNode[0]; 4771 removeDelimitedText(parentNode, childNode, closingComment); 4772 parentNode.removeChild(closingComment); 4773 } 4774 parentNode.removeChild(childNode); 4775} 4776 4777function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) { 4778 var node = openingComment; 4779 while (true) { 4780 var nextNode = node.nextSibling; 4781 insertChildAt(parentNode, node, referenceNode); 4782 if (node === closingComment) { 4783 break; 4784 } 4785 node = nextNode; 4786 } 4787} 4788 4789function removeDelimitedText(parentNode, startNode, closingComment) { 4790 while (true) { 4791 var node = startNode.nextSibling; 4792 if (node === closingComment) { 4793 // The closing comment is removed by ReactMultiChild. 4794 break; 4795 } else { 4796 parentNode.removeChild(node); 4797 } 4798 } 4799} 4800 4801function replaceDelimitedText(openingComment, closingComment, stringText) { 4802 var parentNode = openingComment.parentNode;
4803 var nodeAfterComment = openingComment.nextSibling; 4804 if (nodeAfterComment === closingComment) { 4805 // There are no text nodes between the opening and closing comments; insert 4806 // a new one if stringText isn't empty. 4807 if (stringText) { 4808 insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment); 4809 } 4810 } else { 4811 if (stringText) { 4812 // Set the text content of the first node after the opening comment, and 4813 // remove all following nodes up until the closing comment. 4814 setTextContent(nodeAfterComment, stringText); 4815 removeDelimitedText(parentNode, nodeAfterComment, closingComment); 4816 } else { 4817 removeDelimitedText(parentNode, openingComment, closingComment); 4818 } 4819 } 4820 4821 if (process.env.NODE_ENV !== 'production') { 4822 ReactInstrumentation.debugTool.onHostOperation({ 4823 instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID, 4824 type: 'replace text', 4825 payload: stringText 4826 }); 4827 } 4828} 4829 4830var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup; 4831if (process.env.NODE_ENV !== 'production') { 4832 dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) { 4833 Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup); 4834 if (prevInstance._debugID !== 0) { 4835 ReactInstrumentation.debugTool.onHostOperation({ 4836 instanceID: prevInstance._debugID, 4837 type: 'replace with', 4838 payload: markup.toString() 4839 }); 4840 } else { 4841 var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node); 4842 if (nextInstance._debugID !== 0) { 4843 ReactInstrumentation.debugTool.onHostOperation({ 4844 instanceID: nextInstance._debugID, 4845 type: 'mount', 4846 payload: markup.toString() 4847 }); 4848 } 4849 } 4850 }; 4851} 4852 4853/** 4854 * Operations for updating with DOM children. 4855 */ 4856var DOMChildrenOperations = { 4857 4858 dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup, 4859 4860 replaceDelimitedText: replaceDelimitedText, 4861 4862 /** 4863 * Updates a component's children by processing a series of updates. The 4864 * update configurations are each expected to have a `parentNode` property. 4865 * 4866 * @param {array<object>} updates List of update configurations. 4867 * @internal 4868 */ 4869 processUpdates: function (parentNode, updates) { 4870 if (process.env.NODE_ENV !== 'production') { 4871 var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID; 4872 } 4873 4874 for (var k = 0; k < updates.length; k++) { 4875 var update = updates[k]; 4876 switch (update.type) { 4877 case 'INSERT_MARKUP': 4878 insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode)); 4879 if (process.env.NODE_ENV !== 'production') { 4880 ReactInstrumentation.debugTool.onHostOperation({ 4881 instanceID: parentNodeDebugID, 4882 type: 'insert child', 4883 payload: { toIndex: update.toIndex, content: update.content.toString() } 4884 }); 4885 } 4886 break; 4887 case 'MOVE_EXISTING': 4888 moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode)); 4889 if (process.env.NODE_ENV !== 'production') { 4890 ReactInstrumentation.debugTool.onHostOperation({ 4891 instanceID: parentNodeDebugID, 4892 type: 'move child', 4893 payload: { fromIndex: update.fromIndex, toIndex: update.toIndex } 4894 }); 4895 } 4896 break; 4897 case 'SET_MARKUP': 4898 setInnerHTML(parentNode, update.content); 4899 if (process.env.NODE_ENV !== 'production') { 4900 ReactInstrumentation.debugTool.onHostOperation({ 4901 instanceID: parentNodeDebugID, 4902 type: 'replace children', 4903 payload: update.content.toString() 4904 }); 4905 } 4906 break; 4907 case 'TEXT_CONTENT': 4908 setTextContent(parentNode, update.content); 4909 if (process.env.NODE_ENV !== 'production') { 4910 ReactInstrumentation.debugTool.onHostOperation({ 4911 instanceID: parentNodeDebugID, 4912 type: 'replace text', 4913 payload: update.content.toString() 4914 }); 4915 } 4916 break; 4917 case 'REMOVE_NODE': 4918 removeChild(parentNode, update.fromNode); 4919 if (process.env.NODE_ENV !== 'production') { 4920 ReactInstrumentation.debugTool.onHostOperation({ 4921 instanceID: parentNodeDebugID, 4922 type: 'remove child', 4923 payload: { fromIndex: update.fromIndex } 4924 }); 4925 } 4926 break; 4927 } 4928 } 4929 } 4930 4931}; 4932 4933module.exports = DOMChildrenOperations; 4934/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 4935 4936/***/ }), 4937/* 35 */ 4938/***/ (function(module, exports, __webpack_require__) { 4939 4940"use strict"; 4941/** 4942 * Copyright 2013-present, Facebook, Inc. 4943 * All rights reserved. 4944 * 4945 * This source code is licensed under the BSD-style license found in the 4946 * LICENSE file in the root directory of this source tree. An additional grant 4947 * of patent rights can be found in the PATENTS file in the same directory. 4948 * 4949 */ 4950 4951 4952 4953var DOMNamespaces = { 4954 html: 'http://www.w3.org/1999/xhtml', 4955 mathml: 'http://www.w3.org/1998/Math/MathML', 4956 svg: 'http://www.w3.org/2000/svg' 4957}; 4958 4959module.exports = DOMNamespaces; 4960 4961/***/ }), 4962/* 36 */ 4963/***/ (function(module, exports, __webpack_require__) { 4964 4965"use strict"; 4966/* WEBPACK VAR INJECTION */(function(process) {/** 4967 * Copyright 2013-present, Facebook, Inc. 4968 * All rights reserved. 4969 * 4970 * This source code is licensed under the BSD-style license found in the 4971 * LICENSE file in the root directory of this source tree. An additional grant 4972 * of patent rights can be found in the PATENTS file in the same directory. 4973 * 4974 */ 4975 4976 4977 4978var _prodInvariant = __webpack_require__(3); 4979 4980var ReactErrorUtils = __webpack_require__(40); 4981 4982var invariant = __webpack_require__(1); 4983var warning = __webpack_require__(2); 4984 4985/** 4986 * Injected dependencies: 4987 */ 4988 4989/** 4990 * - `ComponentTree`: [required] Module that can convert between React instances 4991 * and actual node references. 4992 */ 4993var ComponentTree; 4994var TreeTraversal; 4995var injection = { 4996 injectComponentTree: function (Injected) { 4997 ComponentTree = Injected; 4998 if (process.env.NODE_ENV !== 'production') { 4999 process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0; 5000 } 5001 }, 5002 injectTreeTraversal: function (Injected) { 5003 TreeTraversal = Injected; 5004 if (process.env.NODE_ENV !== 'production') { 5005 process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0; 5006 } 5007 } 5008}; 5009 5010function isEndish(topLevelType) { 5011 return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel'; 5012} 5013 5014function isMoveish(topLevelType) { 5015 return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove'; 5016} 5017function isStartish(topLevelType) { 5018 return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart'; 5019} 5020 5021var validateEventDispatches; 5022if (process.env.NODE_ENV !== 'production') { 5023 validateEventDispatches = function (event) { 5024 var dispatchListeners = event._dispatchListeners; 5025 var dispatchInstances = event._dispatchInstances; 5026 5027 var listenersIsArr = Array.isArray(dispatchListeners); 5028 var listenersLen = listenersIsArr ? dispatchListeners.length : dis
5028patchListeners ? 1 : 0; 5029 5030 var instancesIsArr = Array.isArray(dispatchInstances); 5031 var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0; 5032 5033 process.env.NODE_ENV !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0; 5034 }; 5035} 5036 5037/** 5038 * Dispatch the event to the listener. 5039 * @param {SyntheticEvent} event SyntheticEvent to handle 5040 * @param {boolean} simulated If the event is simulated (changes exn behavior) 5041 * @param {function} listener Application-level callback 5042 * @param {*} inst Internal component instance 5043 */ 5044function executeDispatch(event, simulated, listener, inst) { 5045 var type = event.type || 'unknown-event'; 5046 event.currentTarget = EventPluginUtils.getNodeFromInstance(inst); 5047 if (simulated) { 5048 ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event); 5049 } else { 5050 ReactErrorUtils.invokeGuardedCallback(type, listener, event); 5051 } 5052 event.currentTarget = null; 5053} 5054 5055/** 5056 * Standard/simple iteration through an event's collected dispatches. 5057 */ 5058function executeDispatchesInOrder(event, simulated) { 5059 var dispatchListeners = event._dispatchListeners; 5060 var dispatchInstances = event._dispatchInstances; 5061 if (process.env.NODE_ENV !== 'production') { 5062 validateEventDispatches(event); 5063 } 5064 if (Array.isArray(dispatchListeners)) { 5065 for (var i = 0; i < dispatchListeners.length; i++) { 5066 if (event.isPropagationStopped()) { 5067 break; 5068 } 5069 // Listeners and Instances are two parallel arrays that are always in sync. 5070 executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]); 5071 } 5072 } else if (dispatchListeners) { 5073 executeDispatch(event, simulated, dispatchListeners, dispatchInstances); 5074 } 5075 event._dispatchListeners = null; 5076 event._dispatchInstances = null; 5077} 5078 5079/** 5080 * Standard/simple iteration through an event's collected dispatches, but stops 5081 * at the first dispatch execution returning true, and returns that id. 5082 * 5083 * @return {?string} id of the first dispatch execution who's listener returns 5084 * true, or null if no listener returned true. 5085 */ 5086function executeDispatchesInOrderStopAtTrueImpl(event) { 5087 var dispatchListeners = event._dispatchListeners; 5088 var dispatchInstances = event._dispatchInstances; 5089 if (process.env.NODE_ENV !== 'production') { 5090 validateEventDispatches(event); 5091 } 5092 if (Array.isArray(dispatchListeners)) { 5093 for (var i = 0; i < dispatchListeners.length; i++) { 5094 if (event.isPropagationStopped()) { 5095 break; 5096 } 5097 // Listeners and Instances are two parallel arrays that are always in sync. 5098 if (dispatchListeners[i](event, dispatchInstances[i])) { 5099 return dispatchInstances[i]; 5100 } 5101 } 5102 } else if (dispatchListeners) { 5103 if (dispatchListeners(event, dispatchInstances)) { 5104 return dispatchInstances; 5105 } 5106 } 5107 return null; 5108} 5109 5110/** 5111 * @see executeDispatchesInOrderStopAtTrueImpl 5112 */ 5113function executeDispatchesInOrderStopAtTrue(event) { 5114 var ret = executeDispatchesInOrderStopAtTrueImpl(event); 5115 event._dispatchInstances = null; 5116 event._dispatchListeners = null; 5117 return ret; 5118} 5119 5120/** 5121 * Execution of a "direct" dispatch - there must be at most one dispatch 5122 * accumulated on the event or it is considered an error. It doesn't really make 5123 * sense for an event with multiple dispatches (bubbled) to keep track of the 5124 * return values at each dispatch execution, but it does tend to make sense when 5125 * dealing with "direct" dispatches. 5126 * 5127 * @return {*} The return value of executing the single dispatch. 5128 */ 5129function executeDirectDispatch(event) { 5130 if (process.env.NODE_ENV !== 'production') { 5131 validateEventDispatches(event); 5132 } 5133 var dispatchListener = event._dispatchListeners; 5134 var dispatchInstance = event._dispatchInstances; 5135 !!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0; 5136 event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null; 5137 var res = dispatchListener ? dispatchListener(event) : null; 5138 event.currentTarget = null; 5139 event._dispatchListeners = null; 5140 event._dispatchInstances = null; 5141 return res; 5142} 5143 5144/** 5145 * @param {SyntheticEvent} event 5146 * @return {boolean} True iff number of dispatches accumulated is greater than 0. 5147 */ 5148function hasDispatches(event) { 5149 return !!event._dispatchListeners; 5150} 5151 5152/** 5153 * General utilities that are useful in creating custom Event Plugins. 5154 */ 5155var EventPluginUtils = { 5156 isEndish: isEndish, 5157 isMoveish: isMoveish, 5158 isStartish: isStartish, 5159 5160 executeDirectDispatch: executeDirectDispatch, 5161 executeDispatchesInOrder: executeDispatchesInOrder, 5162 executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue, 5163 hasDispatches: hasDispatches, 5164 5165 getInstanceFromNode: function (node) { 5166 return ComponentTree.getInstanceFromNode(node); 5167 }, 5168 getNodeFromInstance: function (node) { 5169 return ComponentTree.getNodeFromInstance(node); 5170 }, 5171 isAncestor: function (a, b) { 5172 return TreeTraversal.isAncestor(a, b); 5173 }, 5174 getLowestCommonAncestor: function (a, b) { 5175 return TreeTraversal.getLowestCommonAncestor(a, b); 5176 }, 5177 getParentInstance: function (inst) { 5178 return TreeTraversal.getParentInstance(inst); 5179 }, 5180 traverseTwoPhase: function (target, fn, arg) { 5181 return TreeTraversal.traverseTwoPhase(target, fn, arg); 5182 }, 5183 traverseEnterLeave: function (from, to, fn, argFrom, argTo) { 5184 return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo); 5185 }, 5186 5187 injection: injection 5188}; 5189 5190module.exports = EventPluginUtils; 5191/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 5192 5193/***/ }), 5194/* 37 */ 5195/***/ (function(module, exports, __webpack_require__) { 5196 5197"use strict"; 5198/** 5199 * Copyright 2013-present, Facebook, Inc. 5200 * All rights reserved. 5201 * 5202 * This source code is licensed under the BSD-style license found in the 5203 * LICENSE file in the root directory of this source tree. An additional grant 5204 * of patent rights can be found in the PATENTS file in the same directory. 5205 * 5206 * 5207 */ 5208 5209 5210 5211/** 5212 * Escape and wrap key so it is safe to use as a reactid 5213 * 5214 * @param {string} key to be escaped. 5215 * @return {string} the escaped key. 5216 */ 5217 5218function escape(key) { 5219 var escapeRegex = /[=:]/g; 5220 var escaperLookup = { 5221 '=': '=0', 5222 ':': '=2' 5223 }; 5224 var escapedString = ('' + key).replace(escapeRegex, function (match) { 5225 return escaperLookup[match]; 5226 }); 5227 5228 return '$' + escapedString; 5229} 5230 5231/** 5232 * Unescape and unwrap key for human-readable display 5233 * 5234 * @param {string} key to unescape. 5235 * @return {string} the unescaped key. 5236 */ 5237function unescape(key) { 5238 var unescapeRegex = /(=0|=2)/g; 5239 var unescaperLookup = { 5240 '=0': '=', 5241 '=2': ':' 5242 }; 5243 var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); 5244 5245 return ('' + keySubstring).replace(unescapeRegex, function (match) { 5246 return unescaperLookup[match]; 5247 }); 5248} 5249 5250var KeyEscapeUtils = { 5251 escape: escape, 5252 unescape: unescape 5253}; 5254 5255module.exports = KeyEscapeUtils; 5256 5257/***/ }), 5258/* 38 */ 5259/***/ (function(module, exports, __webpack_require__) { 5260 5261"use strict"; 5262/* WEBPACK VAR INJECTION */(function(process) {/** 5263 * Copyright 2013-present, Facebook, Inc. 5264 * All rights reserved. 5265 * 5266 * This source code is licensed under the BSD-style license found in the 5267 * LICENSE file in the root directory of this source tree. An additional grant 5268 * of patent rights can be found in the PATENTS file in the same directory. 5269 * 5270 */ 5271 5272 5273 5274var _prodInvariant = __webpack_require__(3); 5275 5276var ReactPropTypesSecret = __webpack_require__(67); 5277var propTypesFactory = __webpack_require__(54); 5278 5279var React = __webpack_require__(19);
5280var PropTypes = propTypesFactory(React.isValidElement); 5281 5282var invariant = __webpack_require__(1); 5283var warning = __webpack_require__(2); 5284 5285var hasReadOnlyValue = { 5286 'button': true, 5287 'checkbox': true, 5288 'image': true, 5289 'hidden': true, 5290 'radio': true, 5291 'reset': true, 5292 'submit': true 5293}; 5294 5295function _assertSingleLink(inputProps) { 5296 !(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; 5297} 5298function _assertValueLink(inputProps) { 5299 _assertSingleLink(inputProps); 5300 !(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; 5301} 5302 5303function _assertCheckedLink(inputProps) { 5304 _assertSingleLink(inputProps); 5305 !(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; 5306} 5307 5308var propTypes = { 5309 value: function (props, propName, componentName) { 5310 if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) { 5311 return null; 5312 } 5313 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`.'); 5314 }, 5315 checked: function (props, propName, componentName) { 5316 if (!props[propName] || props.onChange || props.readOnly || props.disabled) { 5317 return null; 5318 } 5319 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`.'); 5320 }, 5321 onChange: PropTypes.func 5322}; 5323 5324var loggedTypeFailures = {}; 5325function getDeclarationErrorAddendum(owner) { 5326 if (owner) { 5327 var name = owner.getName(); 5328 if (name) { 5329 return ' Check the render method of `' + name + '`.'; 5330 } 5331 } 5332 return ''; 5333} 5334 5335/** 5336 * Provide a linked `value` attribute for controlled forms. You should not use 5337 * this outside of the ReactDOM controlled form components. 5338 */ 5339var LinkedValueUtils = { 5340 checkPropTypes: function (tagName, props, owner) { 5341 for (var propName in propTypes) { 5342 if (propTypes.hasOwnProperty(propName)) { 5343 var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret); 5344 } 5345 if (error instanceof Error && !(error.message in loggedTypeFailures)) { 5346 // Only monitor this failure once because there tends to be a lot of the 5347 // same error. 5348 loggedTypeFailures[error.message] = true; 5349 5350 var addendum = getDeclarationErrorAddendum(owner); 5351 process.env.NODE_ENV !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0; 5352 } 5353 } 5354 }, 5355 5356 /** 5357 * @param {object} inputProps Props for form component 5358 * @return {*} current value of the input either from value prop or link. 5359 */ 5360 getValue: function (inputProps) { 5361 if (inputProps.valueLink) { 5362 _assertValueLink(inputProps); 5363 return inputProps.valueLink.value; 5364 } 5365 return inputProps.value; 5366 }, 5367 5368 /** 5369 * @param {object} inputProps Props for form component 5370 * @return {*} current checked status of the input either from checked prop 5371 * or link. 5372 */ 5373 getChecked: function (inputProps) { 5374 if (inputProps.checkedLink) { 5375 _assertCheckedLink(inputProps); 5376 return inputProps.checkedLink.value; 5377 } 5378 return inputProps.checked; 5379 }, 5380 5381 /** 5382 * @param {object} inputProps Props for form component 5383 * @param {SyntheticEvent} event change event to handle 5384 */ 5385 executeOnChange: function (inputProps, event) { 5386 if (inputProps.valueLink) { 5387 _assertValueLink(inputProps); 5388 return inputProps.valueLink.requestChange(event.target.value); 5389 } else if (inputProps.checkedLink) { 5390 _assertCheckedLink(inputProps); 5391 return inputProps.checkedLink.requestChange(event.target.checked); 5392 } else if (inputProps.onChange) { 5393 return inputProps.onChange.call(undefined, event); 5394 } 5395 } 5396}; 5397 5398module.exports = LinkedValueUtils; 5399/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 5400 5401/***/ }), 5402/* 39 */ 5403/***/ (function(module, exports, __webpack_require__) { 5404 5405"use strict"; 5406/* WEBPACK VAR INJECTION */(function(process) {/** 5407 * Copyright 2014-present, Facebook, Inc. 5408 * All rights reserved. 5409 * 5410 * This source code is licensed under the BSD-style license found in the 5411 * LICENSE file in the root directory of this source tree. An additional grant 5412 * of patent rights can be found in the PATENTS file in the same directory. 5413 * 5414 * 5415 */ 5416 5417 5418 5419var _prodInvariant = __webpack_require__(3); 5420 5421var invariant = __webpack_require__(1); 5422 5423var injected = false;
5424 5425var ReactComponentEnvironment = { 5426 5427 /** 5428 * Optionally injectable hook for swapping out mount images in the middle of 5429 * the tree. 5430 */ 5431 replaceNodeWithMarkup: null, 5432 5433 /** 5434 * Optionally injectable hook for processing a queue of child updates. Will 5435 * later move into MultiChildComponents. 5436 */ 5437 processChildrenUpdates: null, 5438 5439 injection: { 5440 injectEnvironment: function (environment) { 5441 !!injected ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0; 5442 ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup; 5443 ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates; 5444 injected = true; 5445 } 5446 } 5447 5448}; 5449 5450module.exports = ReactComponentEnvironment; 5451/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 5452 5453/***/ }), 5454/* 40 */ 5455/***/ (function(module, exports, __webpack_require__) { 5456 5457"use strict"; 5458/* WEBPACK VAR INJECTION */(function(process) {/** 5459 * Copyright 2013-present, Facebook, Inc. 5460 * All rights reserved. 5461 * 5462 * This source code is licensed under the BSD-style license found in the 5463 * LICENSE file in the root directory of this source tree. An additional grant 5464 * of patent rights can be found in the PATENTS file in the same directory. 5465 * 5466 * 5467 */ 5468 5469 5470 5471var caughtError = null; 5472 5473/** 5474 * Call a function while guarding against errors that happens within it. 5475 * 5476 * @param {String} name of the guard to use for logging or debugging 5477 * @param {Function} func The function to invoke 5478 * @param {*} a First argument 5479 * @param {*} b Second argument 5480 */ 5481function invokeGuardedCallback(name, func, a) { 5482 try { 5483 func(a); 5484 } catch (x) { 5485 if (caughtError === null) { 5486 caughtError = x; 5487 } 5488 } 5489} 5490 5491var ReactErrorUtils = { 5492 invokeGuardedCallback: invokeGuardedCallback, 5493 5494 /** 5495 * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event 5496 * handler are sure to be rethrown by rethrowCaughtError. 5497 */ 5498 invokeGuardedCallbackWithCatch: invokeGuardedCallback, 5499 5500 /** 5501 * During execution of guarded functions we will capture the first error which 5502 * we will rethrow to be handled by the top level error handler. 5503 */ 5504 rethrowCaughtError: function () { 5505 if (caughtError) { 5506 var error = caughtError; 5507 caughtError = null; 5508 throw error; 5509 } 5510 } 5511}; 5512 5513if (process.env.NODE_ENV !== 'production') { 5514 /** 5515 * To help development we can get better devtools integration by simulating a 5516 * real browser event. 5517 */ 5518 if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') { 5519 var fakeNode = document.createElement('react'); 5520 ReactErrorUtils.invokeGuardedCallback = function (name, func, a) { 5521 var boundFunc = func.bind(null, a); 5522 var evtType = 'react-' + name; 5523 fakeNode.addEventListener(evtType, boundFunc, false); 5524 var evt = document.createEvent('Event'); 5525 evt.initEvent(evtType, false, false); 5526 fakeNode.dispatchEvent(evt); 5527 fakeNode.removeEventListener(evtType, boundFunc, false); 5528 }; 5529 } 5530} 5531 5532module.exports = ReactErrorUtils; 5533/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 5534 5535/***/ }), 5536/* 41 */ 5537/***/ (function(module, exports, __webpack_require__) { 5538 5539"use strict"; 5540/* WEBPACK VAR INJECTION */(function(process) {/** 5541 * Copyright 2015-present, Facebook, Inc. 5542 * All rights reserved. 5543 * 5544 * This source code is licensed under the BSD-style license found in the 5545 * LICENSE file in the root directory of this source tree. An additional grant 5546 * of patent rights can be found in the PATENTS file in the same directory. 5547 * 5548 */ 5549 5550 5551 5552var _prodInvariant = __webpack_require__(3); 5553 5554var ReactCurrentOwner = __webpack_require__(11); 5555var ReactInstanceMap = __webpack_require__(23); 5556var ReactInstrumentation = __webpack_require__(8); 5557var ReactUpdates = __webpack_require__(10); 5558 5559var invariant = __webpack_require__(1); 5560var warning = __webpack_require__(2); 5561 5562function enqueueUpdate(internalInstance) { 5563 ReactUpdates.enqueueUpdate(internalInstance); 5564} 5565 5566function formatUnexpectedArgument(arg) { 5567 var type = typeof arg; 5568 if (type !== 'object') { 5569 return type; 5570 } 5571 var displayName = arg.constructor && arg.constructor.name || type; 5572 var keys = Object.keys(arg); 5573 if (keys.length > 0 && keys.length < 20) {
5574 return displayName + ' (keys: ' + keys.join(', ') + ')'; 5575 } 5576 return displayName; 5577} 5578 5579function getInternalInstanceReadyForUpdate(publicInstance, callerName) { 5580 var internalInstance = ReactInstanceMap.get(publicInstance); 5581 if (!internalInstance) { 5582 if (process.env.NODE_ENV !== 'production') { 5583 var ctor = publicInstance.constructor; 5584 // Only warn when we have a callerName. Otherwise we should be silent. 5585 // We're probably calling from enqueueCallback. We don't want to warn 5586 // there because we already warned for the corresponding lifecycle method. 5587 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; 5588 } 5589 return null; 5590 } 5591 5592 if (process.env.NODE_ENV !== 'production') { 5593 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; 5594 } 5595 5596 return internalInstance; 5597} 5598 5599/** 5600 * ReactUpdateQueue allows for state updates to be scheduled into a later 5601 * reconciliation step. 5602 */ 5603var ReactUpdateQueue = { 5604 5605 /** 5606 * Checks whether or not this composite component is mounted. 5607 * @param {ReactClass} publicInstance The instance we want to test. 5608 * @return {boolean} True if mounted, false otherwise. 5609 * @protected 5610 * @final 5611 */ 5612 isMounted: function (publicInstance) { 5613 if (process.env.NODE_ENV !== 'production') { 5614 var owner = ReactCurrentOwner.current; 5615 if (owner !== null) { 5616 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 c
5616omponent') : void 0; 5617 owner._warnedAboutRefsInRender = true; 5618 } 5619 } 5620 var internalInstance = ReactInstanceMap.get(publicInstance); 5621 if (internalInstance) { 5622 // During componentWillMount and render this will still be null but after 5623 // that will always render to something. At least for now. So we can use 5624 // this hack. 5625 return !!internalInstance._renderedComponent; 5626 } else { 5627 return false; 5628 } 5629 }, 5630 5631 /** 5632 * Enqueue a callback that will be executed after all the pending updates 5633 * have processed. 5634 * 5635 * @param {ReactClass} publicInstance The instance to use as `this` context. 5636 * @param {?function} callback Called after state is updated. 5637 * @param {string} callerName Name of the calling function in the public API. 5638 * @internal 5639 */ 5640 enqueueCallback: function (publicInstance, callback, callerName) { 5641 ReactUpdateQueue.validateCallback(callback, callerName); 5642 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance); 5643 5644 // Previously we would throw an error if we didn't have an internal 5645 // instance. Since we want to make it a no-op instead, we mirror the same 5646 // behavior we have in other enqueue* methods. 5647 // We also need to ignore callbacks in componentWillMount. See 5648 // enqueueUpdates. 5649 if (!internalInstance) { 5650 return null; 5651 } 5652 5653 if (internalInstance._pendingCallbacks) { 5654 internalInstance._pendingCallbacks.push(callback); 5655 } else { 5656 internalInstance._pendingCallbacks = [callback]; 5657 } 5658 // TODO: The callback here is ignored when setState is called from 5659 // componentWillMount. Either fix it or disallow doing so completely in 5660 // favor of getInitialState. Alternatively, we can disallow 5661 // componentWillMount during server-side rendering. 5662 enqueueUpdate(internalInstance); 5663 }, 5664 5665 enqueueCallbackInternal: function (internalInstance, callback) { 5666 if (internalInstance._pendingCallbacks) { 5667 internalInstance._pendingCallbacks.push(callback); 5668 } else { 5669 internalInstance._pendingCallbacks = [callback]; 5670 } 5671 enqueueUpdate(internalInstance); 5672 }, 5673 5674 /** 5675 * Forces an update. This should only be invoked when it is known with 5676 * certainty that we are **not** in a DOM transaction. 5677 * 5678 * You may want to call this when you know that some deeper aspect of the 5679 * component's state has changed but `setState` was not called. 5680 * 5681 * This will not invoke `shouldComponentUpdate`, but it will invoke 5682 * `componentWillUpdate` and `componentDidUpdate`. 5683 * 5684 * @param {ReactClass} publicInstance The instance that should rerender. 5685 * @internal 5686 */ 5687 enqueueForceUpdate: function (publicInstance) { 5688 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate'); 5689 5690 if (!internalInstance) { 5691 return; 5692 } 5693 5694 internalInstance._pendingForceUpdate = true; 5695 5696 enqueueUpdate(internalInstance); 5697 }, 5698 5699 /** 5700 * Replaces all of the state. Always use this or `setState` to mutate state. 5701 * You should treat `this.state` as immutable. 5702 * 5703 * There is no guarantee that `this.state` will be immediately updated, so 5704 * accessing `this.state` after calling this method may return the old value. 5705 * 5706 * @param {ReactClass} publicInstance The instance that should rerender. 5707 * @param {object} completeState Next state. 5708 * @internal 5709 */ 5710 enqueueReplaceState: function (publicInstance, completeState, callback) { 5711 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState'); 5712 5713 if (!internalInstance) { 5714 return; 5715 } 5716 5717 internalInstance._pendingStateQueue = [completeState]; 5718 internalInstance._pendingReplaceState = true; 5719 5720 // Future-proof 15.5 5721 if (callback !== undefined && callback !== null) { 5722 ReactUpdateQueue.validateCallback(callback, 'replaceState'); 5723 if (internalInstance._pendingCallbacks) { 5724 internalInstance._pendingCallbacks.push(callback); 5725 } else { 5726 internalInstance._pendingCallbacks = [callback]; 5727 } 5728 } 5729 5730 enqueueUpdate(internalInstance); 5731 }, 5732 5733 /** 5734 * Sets a subset of the state. This only exists because _pendingState is 5735 * internal. This provides a merging strategy that is not available to deep 5736 * properties which is confusing. TODO: Expose pendingState or don't use it 5737 * during the merge. 5738 * 5739 * @param {ReactClass} publicInstance The instance that should rerender. 5740 * @param {object} partialState Next partial state to be merged with state. 5741 * @internal 5742 */ 5743 enqueueSetState: function (publicInstance, partialState) { 5744 if (process.env.NODE_ENV !== 'production') { 5745 ReactInstrumentation.debugTool.onSetState(); 5746 process.env.NODE_ENV !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0; 5747 } 5748 5749 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState'); 5750 5751 if (!internalInstance) { 5752 return; 5753 } 5754 5755 var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []); 5756 queue.push(partialState); 5757 5758 enqueueUpdate(internalInstance); 5759 }, 5760 5761 enqueueElementInternal: function (internalInstance, nextElement, nextContext) { 5762 internalInstance._pendingElement = nextElement; 5763 // TODO: introduce _pendingContext instead of setting it directly. 5764 internalInstance._context = nextContext; 5765 enqueueUpdate(internalInstance); 5766 }, 5767 5768 validateCallback: function (callback, callerName) { 5769 !(!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; 5770 } 5771 5772}; 5773 5774module.exports = ReactUpdateQueue; 5775/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 5776 5777/***/ }), 5778/* 42 */ 5779/***/ (function(module, exports, __webpack_require__) { 5780 5781"use strict"; 5782/** 5783 * Copyright 2013-present, Facebook, Inc. 5784 * All rights reserved. 5785 * 5786 * This source code is licensed under the BSD-style license found in the 5787 * LICENSE file in the root directory of this source tree. An additional grant 5788 * of patent rights can be found in the PATENTS file in the same directory. 5789 * 5790 */ 5791 5792/* globals MSApp */ 5793 5794 5795 5796/** 5797 * Create a function which has 'unsafe' privileges (required by windows8 apps) 5798 */ 5799 5800var createMicrosoftUnsafeLocalFunction = function (func) { 5801 if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { 5802 return function (arg0, arg1, arg2, arg3) { 5803 MSApp.execUnsafeLocalFunction(function () { 5804 return func(arg0, arg1, arg2, arg3); 5805 }); 5806 }; 5807 } else { 5808 return func; 5809 } 5810}; 5811 5812module.exports = createMicrosoftUnsafeLocalFunction; 5813 5814/***/ }), 5815/* 43 */ 5816/***/ (function(module, exports, __webpack_require__) { 5817 5818"use strict"; 5819/** 5820 * Copyright 2013-present, Facebook, Inc. 5821 * All rights reserved. 5822 * 5823 * This source code is licensed under the BSD-style license found in the 5824 * LICENSE file in the root directory of this source tree. An additional grant 5825 * of patent rights can be found in the PATENTS file in the same directory. 5826 * 5827 */ 5828 5829 5830 5831/** 5832 * `charCode` represents the actual "character code" and is safe to use with 5833 * `String.fromCharCode`. As such, only keys that correspond to printable 5834 * characters produce a valid `charCode`, the only exception to this is Enter. 5835 * The Tab-key is considered non-printable and does not have a `charCode`, 5836 * presumably because it does not produce a tab-character in browsers. 5837 * 5838 * @param {object} nativeEvent Native browser event. 5839 * @return {number} Normalized `charCode` property. 5840 */ 5841
5842function getEventCharCode(nativeEvent) { 5843 var charCode; 5844 var keyCode = nativeEvent.keyCode; 5845 5846 if ('charCode' in nativeEvent) { 5847 charCode = nativeEvent.charCode; 5848 5849 // FF does not set `charCode` for the Enter-key, check against `keyCode`. 5850 if (charCode === 0 && keyCode === 13) { 5851 charCode = 13; 5852 } 5853 } else { 5854 // IE8 does not implement `charCode`, but `keyCode` has the correct value. 5855 charCode = keyCode; 5856 } 5857 5858 // Some non-printable keys are reported in `charCode`/`keyCode`, discard them. 5859 // Must not discard the (non-)printable Enter-key. 5860 if (charCode >= 32 || charCode === 13) { 5861 return charCode; 5862 } 5863 5864 return 0; 5865} 5866 5867module.exports = getEventCharCode; 5868 5869/***/ }), 5870/* 44 */ 5871/***/ (function(module, exports, __webpack_require__) { 5872 5873"use strict"; 5874/** 5875 * Copyright 2013-present, Facebook, Inc. 5876 * All rights reserved. 5877 * 5878 * This source code is licensed under the BSD-style license found in the 5879 * LICENSE file in the root directory of this source tree. An additional grant 5880 * of patent rights can be found in the PATENTS file in the same directory. 5881 * 5882 */ 5883 5884 5885 5886/** 5887 * Translation from modifier key to the associated property in the event. 5888 * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers 5889 */ 5890 5891var modifierKeyToProp = { 5892 'Alt': 'altKey', 5893 'Control': 'ctrlKey', 5894 'Meta': 'metaKey', 5895 'Shift': 'shiftKey' 5896}; 5897 5898// IE8 does not implement getModifierState so we simply map it to the only 5899// modifier keys exposed by the event itself, does not support Lock-keys. 5900// Currently, all major browsers except Chrome seems to support Lock-keys. 5901function modifierStateGetter(keyArg) { 5902 var syntheticEvent = this; 5903 var nativeEvent = syntheticEvent.nativeEvent; 5904 if (nativeEvent.getModifierState) { 5905 return nativeEvent.getModifierState(keyArg); 5906 } 5907 var keyProp = modifierKeyToProp[keyArg]; 5908 return keyProp ? !!nativeEvent[keyProp] : false; 5909} 5910 5911function getEventModifierState(nativeEvent) { 5912 return modifierStateGetter; 5913} 5914 5915module.exports = getEventModifierState; 5916 5917/***/ }), 5918/* 45 */ 5919/***/ (function(module, exports, __webpack_require__) { 5920 5921"use strict"; 5922/** 5923 * Copyright 2013-present, Facebook, Inc. 5924 * All rights reserved. 5925 * 5926 * This source code is licensed under the BSD-style license found in the 5927 * LICENSE file in the root directory of this source tree. An additional grant 5928 * of patent rights can be found in the PATENTS file in the same directory. 5929 * 5930 */ 5931 5932 5933 5934/** 5935 * Gets the target node from a native browser event by accounting for 5936 * inconsistencies in browser DOM APIs. 5937 * 5938 * @param {object} nativeEvent Native browser event. 5939 * @return {DOMEventTarget} Target node. 5940 */ 5941 5942function getEventTarget(nativeEvent) { 5943 var target = nativeEvent.target || nativeEvent.srcElement || window; 5944 5945 // Normalize SVG <use> element events #4963 5946 if (target.correspondingUseElement) { 5947 target = target.correspondingUseElement; 5948 } 5949 5950 // Safari may fire events on text nodes (Node.TEXT_NODE is 3). 5951 // @see http://www.quirksmode.org/js/events_properties.html 5952 return target.nodeType === 3 ? target.parentNode : target; 5953} 5954 5955module.exports = getEventTarget; 5956 5957/***/ }), 5958/* 46 */ 5959/***/ (function(module, exports, __webpack_require__) { 5960 5961"use strict"; 5962/** 5963 * Copyright 2013-present, Facebook, Inc. 5964 * All rights reserved. 5965 * 5966 * This source code is licensed under the BSD-style license found in the 5967 * LICENSE file in the root directory of this source tree. An additional grant 5968 * of patent rights can be found in the PATENTS file in the same directory. 5969 * 5970 */ 5971 5972 5973 5974var ExecutionEnvironment = __webpack_require__(6); 5975 5976var useHasFeature; 5977if (ExecutionEnvironment.canUseDOM) { 5978 useHasFeature = document.implementation && document.implementation.hasFeature && 5979 // always returns true in newer browsers as per the standard. 5980 // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature 5981 document.implementation.hasFeature('', '') !== true; 5982} 5983 5984/** 5985 * Checks if an event is supported in the current execution environment. 5986 * 5987 * NOTE: This will not work correctly for non-generic events such as `change`, 5988 * `reset`, `load`, `error`, and `select`. 5989 * 5990 * Borrows from Modernizr. 5991 * 5992 * @param {string} eventNameSuffix Event name, e.g. "click". 5993 * @param {?boolean} capture Check if the capture phase is supported. 5994 * @return {boolean} True if the event is supported. 5995 * @internal 5996 * @license Modernizr 3.0.0pre (Custom Build) | MIT 5997 */ 5998function isEventSupported(eventNameSuffix, capture) { 5999 if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) { 6000 return false;
6001 } 6002 6003 var eventName = 'on' + eventNameSuffix; 6004 var isSupported = eventName in document; 6005 6006 if (!isSupported) { 6007 var element = document.createElement('div'); 6008 element.setAttribute(eventName, 'return;'); 6009 isSupported = typeof element[eventName] === 'function'; 6010 } 6011 6012 if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') { 6013 // This is the only way to test support for the `wheel` event in IE9+. 6014 isSupported = document.implementation.hasFeature('Events.wheel', '3.0'); 6015 } 6016 6017 return isSupported; 6018} 6019 6020module.exports = isEventSupported; 6021 6022/***/ }), 6023/* 47 */ 6024/***/ (function(module, exports, __webpack_require__) { 6025 6026"use strict"; 6027/** 6028 * Copyright 2013-present, Facebook, Inc. 6029 * All rights reserved. 6030 * 6031 * This source code is licensed under the BSD-style license found in the 6032 * LICENSE file in the root directory of this source tree. An additional grant 6033 * of patent rights can be found in the PATENTS file in the same directory. 6034 * 6035 */ 6036 6037 6038 6039/** 6040 * Given a `prevElement` and `nextElement`, determines if the existing 6041 * instance should be updated as opposed to being destroyed or replaced by a new 6042 * instance. Both arguments are elements. This ensures that this logic can 6043 * operate on stateless trees without any backing instance. 6044 * 6045 * @param {?object} prevElement 6046 * @param {?object} nextElement 6047 * @return {boolean} True if the existing instance should be updated. 6048 * @protected 6049 */ 6050 6051function shouldUpdateReactComponent(prevElement, nextElement) { 6052 var prevEmpty = prevElement === null || prevElement === false; 6053 var nextEmpty = nextElement === null || nextElement === false; 6054 if (prevEmpty || nextEmpty) { 6055 return prevEmpty === nextEmpty; 6056 } 6057 6058 var prevType = typeof prevElement; 6059 var nextType = typeof nextElement; 6060 if (prevType === 'string' || prevType === 'number') { 6061 return nextType === 'string' || nextType === 'number'; 6062 } else { 6063 return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key; 6064 } 6065} 6066 6067module.exports = shouldUpdateReactComponent; 6068 6069/***/ }), 6070/* 48 */ 6071/***/ (function(module, exports, __webpack_require__) { 6072 6073"use strict"; 6074/* WEBPACK VAR INJECTION */(function(process) {/** 6075 * Copyright 2015-present, Facebook, Inc. 6076 * All rights reserved. 6077 * 6078 * This source code is licensed under the BSD-style license found in the 6079 * LICENSE file in the root directory of this source tree. An additional grant 6080 * of patent rights can be found in the PATENTS file in the same directory. 6081 * 6082 */ 6083 6084 6085 6086var _assign = __webpack_require__(4); 6087 6088var emptyFunction = __webpack_require__(9); 6089var warning = __webpack_require__(2); 6090 6091var validateDOMNesting = emptyFunction; 6092 6093if (process.env.NODE_ENV !== 'production') { 6094 // This validation code was written based on the HTML5 parsing spec: 6095 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope 6096 // 6097 // Note: this does not catch all invalid nesting, nor does it try to (as it's 6098 // not clear what practical benefit doing so provides); instead, we warn only 6099 // for cases where the parser will give a parse tree differing from what React 6100 // intended. For example, <b><div></div></b> is invalid but we don't warn 6101 // because it still parses correctly; we do warn for other cases like nested 6102 // <p> tags where the beginning of the second element implicitly closes the 6103 // first, causing a confusing mess. 6104 6105 // https://html.spec.whatwg.org/multipage/syntax.html#special 6106 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', 'n
vendor: 5,908 bytes, lines 6106-6262
6106oscript', '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']; 6107 6108 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope 6109 var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', 6110 6111 // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point 6112 // TODO: Distinguish by namespace here -- for <title>, including it here 6113 // errs on the side of fewer warnings 6114 'foreignObject', 'desc', 'title']; 6115 6116 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope 6117 var buttonScopeTags = inScopeTags.concat(['button']); 6118 6119 // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags 6120 var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt']; 6121 6122 var emptyAncestorInfo = { 6123 current: null, 6124 6125 formTag: null, 6126 aTagInScope: null, 6127 buttonTagInScope: null, 6128 nobrTagInScope: null, 6129 pTagInButtonScope: null, 6130 6131 listItemTagAutoclosing: null, 6132 dlItemTagAutoclosing: null 6133 }; 6134 6135 var updatedAncestorInfo = function (oldInfo, tag, instance) { 6136 var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo); 6137 var info = { tag: tag, instance: instance }; 6138 6139 if (inScopeTags.indexOf(tag) !== -1) { 6140 ancestorInfo.aTagInScope = null; 6141 ancestorInfo.buttonTagInScope = null; 6142 ancestorInfo.nobrTagInScope = null; 6143 } 6144 if (buttonScopeTags.indexOf(tag) !== -1) { 6145 ancestorInfo.pTagInButtonScope = null; 6146 } 6147 6148 // See rules for 'li', 'dd', 'dt' start tags in 6149 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody 6150 if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') { 6151 ancestorInfo.listItemTagAutoclosing = null; 6152 ancestorInfo.dlItemTagAutoclosing = null; 6153 } 6154 6155 ancestorInfo.current = info; 6156 6157 if (tag === 'form') { 6158 ancestorInfo.formTag = info; 6159 } 6160 if (tag === 'a') { 6161 ancestorInfo.aTagInScope = info; 6162 } 6163 if (tag === 'button') { 6164 ancestorInfo.buttonTagInScope = info; 6165 } 6166 if (tag === 'nobr') { 6167 ancestorInfo.nobrTagInScope = info; 6168 } 6169 if (tag === 'p') { 6170 ancestorInfo.pTagInButtonScope = info; 6171 } 6172 if (tag === 'li') { 6173 ancestorInfo.listItemTagAutoclosing = info; 6174 } 6175 if (tag === 'dd' || tag === 'dt') { 6176 ancestorInfo.dlItemTagAutoclosing = info; 6177 } 6178 6179 return ancestorInfo; 6180 }; 6181 6182 /** 6183 * Returns whether 6184 */ 6185 var isTagValidWithParent = function (tag, parentTag) { 6186 // First, let's check if we're in an unusual parsing mode... 6187 switch (parentTag) { 6188 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect 6189 case 'select': 6190 return tag === 'option' || tag === 'optgroup' || tag === '#text'; 6191 case 'optgroup': 6192 return tag === 'option' || tag === '#text'; 6193 // Strictly speaking, seeing an <option> doesn't mean we're in a <select> 6194 // but 6195 case 'option': 6196 return tag === '#text'; 6197 6198 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd 6199 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption 6200 // No special behavior since these rules fall back to "in body" mode for 6201 // all except special table nodes which cause bad parsing behavior anyway. 6202 6203 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr 6204 case 'tr': 6205 return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template'; 6206 6207 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody 6208 case 'tbody': 6209 case 'thead': 6210 case 'tfoot': 6211 return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template'; 6212 6213 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup 6214 case 'colgroup': 6215 return tag === 'col' || tag === 'template'; 6216 6217 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable 6218 case 'table': 6219 return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template'; 6220 6221 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead 6222 case 'head': 6223 return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template'; 6224 6225 // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element 6226 case 'html': 6227 return tag === 'head' || tag === 'body'; 6228 case '#document': 6229 return tag === 'html'; 6230 } 6231 6232 // Probably in the "in body" parsing mode, so we outlaw only tag combos 6233 // where the parsing rules cause implicit opens or closes to be added. 6234 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody 6235 switch (tag) { 6236 case 'h1': 6237 case 'h2': 6238 case 'h3': 6239 case 'h4': 6240 case 'h5': 6241 case 'h6': 6242 return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6'; 6243 6244 case 'rp': 6245 case 'rt': 6246 return impliedEndTags.indexOf(parentTag) === -1; 6247 6248 case 'body': 6249 case 'caption': 6250 case 'col': 6251 case 'colgroup': 6252 case 'frame': 6253 case 'head': 6254 case 'html': 6255 case 'tbody': 6256 case 'td': 6257 case 'tfoot': 6258 case 'th': 6259 case 'thead': 6260 case 'tr': 6261 // These tags are only valid with a few parents that have special child 6262 // parsing rules -- if we're down here, then none of those matched and
6263 // so we allow it only if we don't know what the parent is, as all other 6264 // cases are invalid. 6265 return parentTag == null; 6266 } 6267 6268 return true; 6269 }; 6270 6271 /** 6272 * Returns whether 6273 */ 6274 var findInvalidAncestorForTag = function (tag, ancestorInfo) { 6275 switch (tag) { 6276 case 'address': 6277 case 'article': 6278 case 'aside': 6279 case 'blockquote': 6280 case 'center': 6281 case 'details': 6282 case 'dialog': 6283 case 'dir': 6284 case 'div': 6285 case 'dl': 6286 case 'fieldset': 6287 case 'figcaption': 6288 case 'figure': 6289 case 'footer': 6290 case 'header': 6291 case 'hgroup': 6292 case 'main': 6293 case 'menu': 6294 case 'nav': 6295 case 'ol': 6296 case 'p': 6297 case 'section': 6298 case 'summary': 6299 case 'ul': 6300 case 'pre': 6301 case 'listing': 6302 case 'table': 6303 case 'hr': 6304 case 'xmp': 6305 case 'h1': 6306 case 'h2': 6307 case 'h3': 6308 case 'h4': 6309 case 'h5': 6310 case 'h6': 6311 return ancestorInfo.pTagInButtonScope; 6312 6313 case 'form': 6314 return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope; 6315 6316 case 'li': 6317 return ancestorInfo.listItemTagAutoclosing; 6318 6319 case 'dd': 6320 case 'dt': 6321 return ancestorInfo.dlItemTagAutoclosing; 6322 6323 case 'button': 6324 return ancestorInfo.buttonTagInScope; 6325 6326 case 'a': 6327 // Spec says something about storing a list of markers, but it sounds 6328 // equivalent to this check. 6329 return ancestorInfo.aTagInScope; 6330 6331 case 'nobr': 6332 return ancestorInfo.nobrTagInScope; 6333 } 6334 6335 return null; 6336 }; 6337 6338 /** 6339 * Given a ReactCompositeComponent instance, return a list of its recursive 6340 * owners, starting at the root and ending with the instance itself. 6341 */ 6342 var findOwnerStack = function (instance) { 6343 if (!instance) { 6344 return []; 6345 } 6346 6347 var stack = []; 6348 do { 6349 stack.push(instance); 6350 } while (instance = instance._currentElement._owner); 6351 stack.reverse(); 6352 return stack; 6353 }; 6354 6355 var didWarn = {}; 6356 6357 validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) { 6358 ancestorInfo = ancestorInfo || emptyAncestorInfo; 6359 var parentInfo = ancestorInfo.current; 6360 var parentTag = parentInfo && parentInfo.tag; 6361 6362 if (childText != null) { 6363 process.env.NODE_ENV !== 'production' ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0; 6364 childTag = '#text'; 6365 } 6366 6367 var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo; 6368 var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo); 6369 var problematic = invalidParent || invalidAncestor; 6370 6371 if (problematic) { 6372 var ancestorTag = problematic.tag; 6373 var ancestorInstance = problematic.instance; 6374 6375 var childOwner = childInstance && childInstance._currentElement._owner; 6376 var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner; 6377 6378 var childOwners = findOwnerStack(childOwner); 6379 var ancestorOwners = findOwnerStack(ancestorOwner); 6380 6381 var minStackLen = Math.min(childOwners.length, ancestorOwners.length); 6382 var i; 6383 6384 var deepestCommon = -1; 6385 for (i = 0; i < minStackLen; i++) { 6386 if (childOwners[i] === ancestorOwners[i]) { 6387 deepestCommon = i; 6388 } else { 6389 break; 6390 } 6391 } 6392 6393 var UNKNOWN = '(unknown)'; 6394 var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) { 6395 return inst.getName() || UNKNOWN; 6396 }); 6397 var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) { 6398 return inst.getName() || UNKNOWN; 6399 }); 6400 var ownerInfo = [].concat( 6401 // If the parent and child instances have a common owner ancestor, start 6402 // with that -- otherwise we just start with the parent's owners. 6403 deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag, 6404 // If we're warning about an invalid (non-parent) ancestry, add '...' 6405 invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > '); 6406 6407 var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo; 6408 if (didWarn[warnKey]) { 6409 return; 6410 } 6411 didWarn[warnKey] = true; 6412 6413 var tagDisplayName = childTag; 6414 var whitespaceInfo = ''; 6415 if (childTag === '#text') { 6416 if (/\S/.test(childText)) { 6417 tagDisplayName = 'Text nodes'; 6418 } else { 6419 tagDisplayName = 'Whitespace text nodes'; 6420 whitespaceInfo = ' Make sure you don\'t have any extra whitespace between tags on ' + 'each line of your source code.'; 6421 } 6422 } else { 6423 tagDisplayName = '<' + childTag + '>'; 6424 } 6425 6426 if (invalidParent) { 6427 var info = ''; 6428 if (ancestorTag === 'table' && childTag === 'tr') { 6429 info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.'; 6430 } 6431 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; 6432 } else { 6433 process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0; 6434 } 6435 } 6436 }; 6437 6438 validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo; 6439 6440 // For testing 6441 validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) { 6442 ancestorInfo = ancestorInfo || emptyAncestorInfo; 6443 var parentInfo = ancestorInfo.current; 6444 var parentTag = parentInfo && parentInfo.tag;
6445 return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo); 6446 }; 6447} 6448 6449module.exports = validateDOMNesting; 6450/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 6451 6452/***/ }), 6453/* 49 */ 6454/***/ (function(module, exports, __webpack_require__) { 6455 6456"use strict"; 6457/* WEBPACK VAR INJECTION */(function(process) {/** 6458 * Copyright 2013-present, Facebook, Inc. 6459 * All rights reserved. 6460 * 6461 * This source code is licensed under the BSD-style license found in the 6462 * LICENSE file in the root directory of this source tree. An additional grant 6463 * of patent rights can be found in the PATENTS file in the same directory. 6464 * 6465 */ 6466 6467 6468 6469var _prodInvariant = __webpack_require__(16); 6470 6471var ReactNoopUpdateQueue = __webpack_require__(50); 6472 6473var canDefineProperty = __webpack_require__(32); 6474var emptyObject = __webpack_require__(20); 6475var invariant = __webpack_require__(1); 6476var warning = __webpack_require__(2); 6477 6478/** 6479 * Base class helpers for the updating state of a component. 6480 */ 6481function ReactComponent(props, context, updater) { 6482 this.props = props; 6483 this.context = context; 6484 this.refs = emptyObject; 6485 // We initialize the default updater but the real one gets injected by the 6486 // renderer. 6487 this.updater = updater || ReactNoopUpdateQueue; 6488} 6489 6490ReactComponent.prototype.isReactComponent = {}; 6491 6492/** 6493 * Sets a subset of the state. Always use this to mutate 6494 * state. You should treat `this.state` as immutable. 6495 * 6496 * There is no guarantee that `this.state` will be immediately updated, so 6497 * accessing `this.state` after calling this method may return the old value. 6498 * 6499 * There is no guarantee that calls to `setState` will run synchronously, 6500 * as they may eventually be batched together. You can provide an optional 6501 * callback that will be executed when the call to setState is actually 6502 * completed. 6503 * 6504 * When a function is provided to setState, it will be called at some point in 6505 * the future (not synchronously). It will be called with the up to date 6506 * component arguments (state, props, context). These values can be different 6507 * from this.* because your function may be called after receiveProps but before 6508 * shouldComponentUpdate, and this new state, props, and context will not yet be 6509 * assigned to this. 6510 * 6511 * @param {object|function} partialState Next partial state or function to 6512 * produce next partial state to be merged with current state. 6513 * @param {?function} callback Called after state is updated. 6514 * @final 6515 * @protected 6516 */ 6517ReactComponent.prototype.setState = function (partialState, callback) { 6518 !(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; 6519 this.updater.enqueueSetState(this, partialState); 6520 if (callback) { 6521 this.updater.enqueueCallback(this, callback, 'setState'); 6522 } 6523}; 6524 6525/** 6526 * Forces an update. This should only be invoked when it is known with 6527 * certainty that we are **not** in a DOM transaction. 6528 * 6529 * You may want to call this when you know that some deeper aspect of the 6530 * component's state has changed but `setState` was not called. 6531 * 6532 * This will not invoke `shouldComponentUpdate`, but it will invoke 6533 * `componentWillUpdate` and `componentDidUpdate`. 6534 * 6535 * @param {?function} callback Called after update is complete. 6536 * @final 6537 * @protected 6538 */ 6539ReactComponent.prototype.forceUpdate = function (callback) { 6540 this.updater.enqueueForceUpdate(this); 6541 if (callback) { 6542 this.updater.enqueueCallback(this, callback, 'forceUpdate'); 6543 } 6544}; 6545 6546/** 6547 * Deprecated APIs. These APIs used to exist on classic React classes but since 6548 * we would like to deprecate them, we're not going to move them over to this 6549 * modern base class. Instead, we define a getter that warns if it's accessed. 6550 */ 6551if (process.env.NODE_ENV !== 'production') { 6552 var deprecatedAPIs = { 6553 isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
6554 replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] 6555 }; 6556 var defineDeprecationWarning = function (methodName, info) { 6557 if (canDefineProperty) { 6558 Object.defineProperty(ReactComponent.prototype, methodName, { 6559 get: function () { 6560 process.env.NODE_ENV !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : void 0; 6561 return undefined; 6562 } 6563 }); 6564 } 6565 }; 6566 for (var fnName in deprecatedAPIs) { 6567 if (deprecatedAPIs.hasOwnProperty(fnName)) { 6568 defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); 6569 } 6570 } 6571} 6572 6573module.exports = ReactComponent; 6574/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 6575 6576/***/ }), 6577/* 50 */ 6578/***/ (function(module, exports, __webpack_require__) { 6579 6580"use strict"; 6581/* WEBPACK VAR INJECTION */(function(process) {/** 6582 * Copyright 2015-present, Facebook, Inc. 6583 * All rights reserved. 6584 * 6585 * This source code is licensed under the BSD-style license found in the 6586 * LICENSE file in the root directory of this source tree. An additional grant 6587 * of patent rights can be found in the PATENTS file in the same directory. 6588 * 6589 */ 6590 6591 6592 6593var warning = __webpack_require__(2); 6594 6595function warnNoop(publicInstance, callerName) { 6596 if (process.env.NODE_ENV !== 'production') { 6597 var constructor = publicInstance.constructor; 6598 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; 6599 } 6600} 6601 6602/** 6603 * This is the abstract API for an update queue. 6604 */ 6605var ReactNoopUpdateQueue = { 6606 6607 /** 6608 * Checks whether or not this composite component is mounted. 6609 * @param {ReactClass} publicInstance The instance we want to test. 6610 * @return {boolean} True if mounted, false otherwise. 6611 * @protected 6612 * @final 6613 */ 6614 isMounted: function (publicInstance) { 6615 return false; 6616 }, 6617 6618 /** 6619 * Enqueue a callback that will be executed after all the pending updates 6620 * have processed. 6621 * 6622 * @param {ReactClass} publicInstance The instance to use as `this` context. 6623 * @param {?function} callback Called after state is updated. 6624 * @internal 6625 */ 6626 enqueueCallback: function (publicInstance, callback) {}, 6627 6628 /** 6629 * Forces an update. This should only be invoked when it is known with 6630 * certainty that we are **not** in a DOM transaction. 6631 * 6632 * You may want to call this when you know that some deeper aspect of the 6633 * component's state has changed but `setState` was not called. 6634 * 6635 * This will not invoke `shouldComponentUpdate`, but it will invoke 6636 * `componentWillUpdate` and `componentDidUpdate`. 6637 * 6638 * @param {ReactClass} publicInstance The instance that should rerender. 6639 * @internal 6640 */ 6641 enqueueForceUpdate: function (publicInstance) { 6642 warnNoop(publicInstance, 'forceUpdate'); 6643 }, 6644 6645 /** 6646 * Replaces all of the state. Always use this or `setState` to mutate state. 6647 * You should treat `this.state` as immutable. 6648 * 6649 * There is no guarantee that `this.state` will be immediately updated, so 6650 * accessing `this.state` after calling this method may return the old value. 6651 * 6652 * @param {ReactClass} publicInstance The instance that should rerender. 6653 * @param {object} completeState Next state. 6654 * @internal 6655 */ 6656 enqueueReplaceState: function (publicInstance, completeState) { 6657 warnNoop(publicInstance, 'replaceState'); 6658 }, 6659 6660 /** 6661 * Sets a subset of the state. This only exists because _pendingState is 6662 * internal. This provides a merging strategy that is not available to deep 6663 * properties which is confusing. TODO: Expose pendingState or don't use it 6664 * during the merge. 6665 * 6666 * @param {ReactClass} publicInstance The instance that should rerender. 6667 * @param {object} partialState Next partial state to be merged with state. 6668 * @internal 6669 */ 6670 enqueueSetState: function (publicInstance, partialState) { 6671 warnNoop(publicInstance, 'setState'); 6672 } 6673}; 6674 6675module.exports = ReactNoopUpdateQueue; 6676/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 6677 6678/***/ }), 6679/* 51 */ 6680/***/ (function(module, exports, __webpack_require__) { 6681 6682"use strict"; 6683/* WEBPACK VAR INJECTION */(function(process) { 6684 6685/** 6686 * Copyright (c) 2013-present, Facebook, Inc. 6687 * 6688 * Licensed under the Apache License, Version 2.0 (the "License");
6689 * you may not use this file except in compliance with the License. 6690 * You may obtain a copy of the License at 6691 * 6692 * http://www.apache.org/licenses/LICENSE-2.0 6693 * 6694 * Unless required by applicable law or agreed to in writing, software 6695 * distributed under the License is distributed on an "AS IS" BASIS, 6696 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6697 * See the License for the specific language governing permissions and 6698 * limitations under the License. 6699 * 6700 * @typechecks 6701 */ 6702 6703var emptyFunction = __webpack_require__(9); 6704 6705/** 6706 * Upstream version of event listener. Does not take into account specific 6707 * nature of platform. 6708 */ 6709var EventListener = { 6710 /** 6711 * Listen to DOM events during the bubble phase. 6712 * 6713 * @param {DOMEventTarget} target DOM element to register listener on. 6714 * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. 6715 * @param {function} callback Callback function. 6716 * @return {object} Object with a `remove` method. 6717 */ 6718 listen: function listen(target, eventType, callback) { 6719 if (target.addEventListener) { 6720 target.addEventListener(eventType, callback, false); 6721 return { 6722 remove: function remove() { 6723 target.removeEventListener(eventType, callback, false); 6724 } 6725 }; 6726 } else if (target.attachEvent) { 6727 target.attachEvent('on' + eventType, callback); 6728 return { 6729 remove: function remove() { 6730 target.detachEvent('on' + eventType, callback); 6731 } 6732 }; 6733 } 6734 }, 6735 6736 /** 6737 * Listen to DOM events during the capture phase. 6738 * 6739 * @param {DOMEventTarget} target DOM element to register listener on. 6740 * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. 6741 * @param {function} callback Callback function. 6742 * @return {object} Object with a `remove` method. 6743 */ 6744 capture: function capture(target, eventType, callback) { 6745 if (target.addEventListener) { 6746 target.addEventListener(eventType, callback, true); 6747 return { 6748 remove: function remove() { 6749 target.removeEventListener(eventType, callback, true); 6750 } 6751 }; 6752 } else { 6753 if (process.env.NODE_ENV !== 'production') { 6754 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.'); 6755 } 6756 return { 6757 remove: emptyFunction 6758 }; 6759 } 6760 }, 6761 6762 registerDefault: function registerDefault() {} 6763}; 6764 6765module.exports = EventListener; 6766/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 6767 6768/***/ }), 6769/* 52 */ 6770/***/ (function(module, exports, __webpack_require__) { 6771 6772"use strict"; 6773/** 6774 * Copyright (c) 2013-present, Facebook, Inc. 6775 * All rights reserved. 6776 * 6777 * This source code is licensed under the BSD-style license found in the 6778 * LICENSE file in the root directory of this source tree. An additional grant 6779 * of patent rights can be found in the PATENTS file in the same directory. 6780 * 6781 */ 6782 6783 6784 6785/** 6786 * @param {DOMElement} node input/textarea to focus 6787 */ 6788 6789function focusNode(node) { 6790 // IE8 can throw "Can't move focus to the control because it is invisible, 6791 // not enabled, or of a type that does not accept the focus." for all kinds of 6792 // reasons that are too expensive and fragile to test. 6793 try { 6794 node.focus(); 6795 } catch (e) {} 6796} 6797 6798module.exports = focusNode; 6799 6800/***/ }), 6801/* 53 */ 6802/***/ (function(module, exports, __webpack_require__) { 6803 6804"use strict"; 6805 6806 6807/** 6808 * Copyright (c) 2013-present, Facebook, Inc. 6809 * All rights reserved. 6810 * 6811 * This source code is licensed under the BSD-style license found in the 6812 * LICENSE file in the root directory of this source tree. An additional grant 6813 * of patent rights can be found in the PATENTS file in the same directory. 6814 * 6815 * @typechecks 6816 */ 6817 6818/* eslint-disable fb-www/typeof-undefined */ 6819 6820/** 6821 * Same as document.activeElement but wraps in a try-catch block. In IE it is 6822 * not safe to call document.activeElement if there is nothing focused. 6823 * 6824 * The activeElement will be null only if the document or document body is not 6825 * yet defined. 6826 * 6827 * @param {?DOMDocument} doc Defaults to current document. 6828 * @return {?DOMElement} 6829 */ 6830function getActiveElement(doc) /*?DOMElement*/{ 6831 doc = doc || (typeof document !== 'undefined' ? document : undefined); 6832 if (typeof doc === 'undefined') { 6833 return null; 6834 } 6835 try { 6836 return doc.activeElement || doc.body; 6837 } catch (e) { 6838 return doc.body; 6839 } 6840} 6841 6842module.exports = getActiveElement; 6843 6844/***/ }), 6845/* 54 */ 6846/***/ (function(module, exports, __webpack_require__) { 6847 6848"use strict"; 6849/** 6850 * Copyright 2013-present, Facebook, Inc. 6851 * All rights reserved. 6852 * 6853 * This source code is licensed under the BSD-style license found in the 6854 * LICENSE file in the root directory of this source tree. An additional grant 6855 * of patent rights can be found in the PATENTS file in the same directory. 6856 */ 6857 6858 6859 6860// React 15.5 references this module, and assumes PropTypes are still callable in production. 6861// Therefore we re-export development-only version with all the PropTypes checks here. 6862// However if one is migrating to the `prop-types` npm library, they will go through the
6863// `index.js` entry point, and it will branch depending on the environment. 6864var factory = __webpack_require__(104); 6865module.exports = function(isValidElement) { 6866 // It is still allowed in 15.5. 6867 var throwOnDirectAccess = false; 6868 return factory(isValidElement, throwOnDirectAccess); 6869}; 6870 6871 6872/***/ }), 6873/* 55 */ 6874/***/ (function(module, exports, __webpack_require__) { 6875 6876"use strict"; 6877/** 6878 * Copyright 2013-present, Facebook, Inc. 6879 * All rights reserved. 6880 * 6881 * This source code is licensed under the BSD-style license found in the 6882 * LICENSE file in the root directory of this source tree. An additional grant 6883 * of patent rights can be found in the PATENTS file in the same directory. 6884 */ 6885 6886 6887 6888var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; 6889 6890module.exports = ReactPropTypesSecret; 6891 6892 6893/***/ }), 6894/* 56 */ 6895/***/ (function(module, exports, __webpack_require__) { 6896 6897"use strict"; 6898/** 6899 * Copyright 2013-present, Facebook, Inc. 6900 * All rights reserved. 6901 * 6902 * This source code is licensed under the BSD-style license found in the 6903 * LICENSE file in the root directory of this source tree. An additional grant 6904 * of patent rights can be found in the PATENTS file in the same directory. 6905 * 6906 */ 6907 6908 6909 6910/** 6911 * CSS properties which accept numbers but are not in units of "px". 6912 */ 6913 6914var isUnitlessNumber = { 6915 animationIterationCount: true, 6916 borderImageOutset: true, 6917 borderImageSlice: true, 6918 borderImageWidth: true, 6919 boxFlex: true, 6920 boxFlexGroup: true, 6921 boxOrdinalGroup: true, 6922 columnCount: true, 6923 flex: true, 6924 flexGrow: true, 6925 flexPositive: true, 6926 flexShrink: true, 6927 flexNegative: true, 6928 flexOrder: true, 6929 gridRow: true, 6930 gridColumn: true, 6931 fontWeight: true, 6932 lineClamp: true, 6933 lineHeight: true, 6934 opacity: true, 6935 order: true, 6936 orphans: true, 6937 tabSize: true, 6938 widows: true, 6939 zIndex: true, 6940 zoom: true, 6941 6942 // SVG-related properties 6943 fillOpacity: true, 6944 floodOpacity: true, 6945 stopOpacity: true, 6946 strokeDasharray: true, 6947 strokeDashoffset: true, 6948 strokeMiterlimit: true, 6949 strokeOpacity: true, 6950 strokeWidth: true 6951}; 6952 6953/** 6954 * @param {string} prefix vendor-specific prefix, eg: Webkit 6955 * @param {string} key style name, eg: transitionDuration 6956 * @return {string} style name prefixed with `prefix`, properly camelCased, eg: 6957 * WebkitTransitionDuration 6958 */ 6959function prefixKey(prefix, key) { 6960 return prefix + key.charAt(0).toUpperCase() + key.substring(1); 6961} 6962 6963/** 6964 * Support style names that may come passed in prefixed by adding permutations 6965 * of vendor prefixes. 6966 */ 6967var prefixes = ['Webkit', 'ms', 'Moz', 'O']; 6968 6969// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an 6970// infinite loop, because it iterates over the newly added props too. 6971Object.keys(isUnitlessNumber).forEach(function (prop) { 6972 prefixes.forEach(function (prefix) { 6973 isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; 6974 }); 6975}); 6976 6977/** 6978 * Most style properties can be unset by doing .style[prop] = '' but IE8 6979 * doesn't like doing that with shorthand properties so for the properties that 6980 * IE8 breaks on, which are listed here, we instead unset each of the 6981 * individual properties. See http://bugs.jquery.com/ticket/12385. 6982 * The 4-value 'clock' properties like margin, padding, border-width seem to 6983 * behave without any problems. Curiously, list-style works too without any 6984 * special prodding. 6985 */ 6986var shorthandPropertyExpansions = { 6987 background: { 6988 backgroundAttachment: true, 6989 backgroundColor: true, 6990 backgroundImage: true, 6991 backgroundPositionX: true, 6992 backgroundPositionY: true, 6993 backgroundRepeat: true 6994 }, 6995 backgroundPosition: { 6996 backgroundPositionX: true, 6997 backgroundPositionY: true 6998 }, 6999 border: { 7000 borderWidth: true, 7001 borderStyle: true, 7002 borderColor: true 7003 }, 7004 borderBottom: { 7005 borderBottomWidth: true, 7006 borderBottomStyle: true, 7007 borderBottomColor: true 7008 }, 7009 borderLeft: { 7010 borderLeftWidth: true, 7011 borderLeftStyle: true, 7012 borderLeftColor: true 7013 }, 7014 borderRight: { 7015 borderRightWidth: true, 7016 borderRightStyle: true, 7017 borderRightColor: true 7018 }, 7019 borderTop: { 7020 borderTopWidth: true, 7021 borderTopStyle: true, 7022 borderTopColor: true 7023 }, 7024 font: { 7025 fontStyle: true, 7026 fontVariant: true, 7027 fontWeight: true, 7028 fontSize: true, 7029 lineHeight: true, 7030 fontFamily: true 7031 }, 7032 outline: { 7033 outlineWidth: true, 7034 outlineStyle: true, 7035 outlineColor: true 7036 } 7037}; 7038 7039var CSSProperty = { 7040 isUnitlessNumber: isUnitlessNumber, 7041 shorthandPropertyExpansions: shorthandPropertyExpansions 7042}; 7043 7044module.exports = CSSProperty; 7045 7046/***/ }), 7047/* 57 */ 7048/***/ (function(module, exports, __webpack_require__) { 7049 7050"use strict"; 7051/* WEBPACK VAR INJECTION */(function(process) {/** 7052 * Copyright 2013-present, Facebook, Inc. 7053 * All rights reserved. 7054 * 7055 * This source code is licensed under the BSD-style license found in the 7056 * LICENSE file in the root directory of this source tree. An additional grant 7057 * of patent rights can be found in the PATENTS file in the same directory. 7058 * 7059 * 7060 */ 7061 7062 7063 7064var _prodInvariant = __webpack_require__(3); 7065 7066function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 7067 7068var PooledClass = __webpack_require__(14); 7069 7070var invariant = __webpack_require__(1); 7071 7072/** 7073 * A specialized pseudo-event module to help keep track of components waiting to 7074 * be notified when their DOM representations are available for use. 7075 * 7076 * This implements `PooledClass`, so you should never need to instantiate this. 7077 * Instead, use `CallbackQueue.getPooled()`. 7078 * 7079 * @class ReactMountReady 7080 * @implements PooledClass 7081 * @internal 7082 */ 7083 7084var CallbackQueue = function () { 7085 function CallbackQueue(arg) { 7086 _classCallCheck(this, CallbackQueue); 7087 7088 this._callbacks = null; 7089 this._contexts = null; 7090 this._arg = arg; 7091 } 7092 7093 /** 7094 * Enqueues a callback to be invoked when `notifyAll` is invoked. 7095 * 7096 * @param {function} callback Invoked when `notifyAll` is invoked. 7097 * @param {?object} context Context to call `callback` with. 7098 * @internal 7099 */ 7100 7101 7102 CallbackQueue.prototype.enqueue = function enqueue(callback, context) { 7103 this._callbacks = this._callbacks || []; 7104 this._callbacks.push(callback); 7105 this._contexts = this._contexts || []; 7106 this._contexts.push(context); 7107 }; 7108 7109 /** 7110 * Invokes all enqueued callbacks and clears the queue. This is invoked after 7111 * the DOM representation of a component has been created or updated. 7112 * 7113 * @internal 7114 */ 7115 7116 7117 CallbackQueue.prototype.notifyAll = function notifyAll() { 7118 var callbacks = this._callbacks; 7119 var contexts = this._contexts; 7120 var arg = this._arg; 7121 if (callbacks && contexts) { 7122 !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0; 7123 this._callbacks = null; 7124 this._contexts = null; 7125 for (var i = 0; i < callbacks.length; i++) { 7126 callbacks[i].call(contexts[i], arg); 7127 } 7128 callbacks.length = 0; 7129 contexts.length = 0; 7130 } 7131 }; 7132 7133 CallbackQueue.prototype.checkpoint = function checkpoint() { 7134 return this._callbacks ? this._callbacks.length : 0; 7135 }; 7136 7137 CallbackQueue.prototype.rollback = function rollback(len) { 7138 if (this._callbacks && this._contexts) { 7139 this._callbacks.length = len; 7140 this._contexts.length = len; 7141 } 7142 }; 7143 7144 /** 7145 * Resets the internal queue. 7146 * 7147 * @internal 7148 */ 7149 7150 7151 CallbackQueue.prototype.reset = function reset() { 7152 this._callbacks = null; 7153 this._contexts = null; 7154 }; 7155 7156 /** 7157 * `PooledClass` looks for this. 7158 */ 7159 7160 7161 CallbackQueue.prototype.destructor = function destructor() { 7162 this.reset(); 7163 }; 7164 7165 return CallbackQueue; 7166}(); 7167 7168module.exports = PooledClass.addPoolingTo(CallbackQueue);
7169/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 7170 7171/***/ }), 7172/* 58 */ 7173/***/ (function(module, exports, __webpack_require__) { 7174 7175"use strict"; 7176/* WEBPACK VAR INJECTION */(function(process) {/** 7177 * Copyright 2013-present, Facebook, Inc. 7178 * All rights reserved. 7179 * 7180 * This source code is licensed under the BSD-style license found in the 7181 * LICENSE file in the root directory of this source tree. An additional grant 7182 * of patent rights can be found in the PATENTS file in the same directory. 7183 * 7184 */ 7185 7186 7187 7188var DOMProperty = __webpack_require__(13); 7189var ReactDOMComponentTree = __webpack_require__(5); 7190var ReactInstrumentation = __webpack_require__(8); 7191 7192var quoteAttributeValueForBrowser = __webpack_require__(173); 7193var warning = __webpack_require__(2); 7194 7195var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$'); 7196var illegalAttributeNameCache = {}; 7197var validatedAttributeNameCache = {}; 7198 7199function isAttributeNameSafe(attributeName) { 7200 if (validatedAttributeNameCache.hasOwnProperty(attributeName)) { 7201 return true; 7202 } 7203 if (illegalAttributeNameCache.hasOwnProperty(attributeName)) { 7204 return false; 7205 } 7206 if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { 7207 validatedAttributeNameCache[attributeName] = true; 7208 return true; 7209 } 7210 illegalAttributeNameCache[attributeName] = true; 7211 process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0; 7212 return false; 7213} 7214 7215function shouldIgnoreValue(propertyInfo, value) { 7216 return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false; 7217} 7218 7219/** 7220 * Operations for dealing with DOM properties. 7221 */ 7222var DOMPropertyOperations = { 7223 7224 /** 7225 * Creates markup for the ID property. 7226 * 7227 * @param {string} id Unescaped ID. 7228 * @return {string} Markup string. 7229 */ 7230 createMarkupForID: function (id) { 7231 return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id); 7232 }, 7233 7234 setAttributeForID: function (node, id) { 7235 node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id); 7236 }, 7237 7238 createMarkupForRoot: function () { 7239 return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""'; 7240 }, 7241 7242 setAttributeForRoot: function (node) { 7243 node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, ''); 7244 }, 7245 7246 /** 7247 * Creates markup for a property. 7248 * 7249 * @param {string} name 7250 * @param {*} value 7251 * @return {?string} Markup string, or null if the property was invalid. 7252 */ 7253 createMarkupForProperty: function (name, value) { 7254 var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; 7255 if (propertyInfo) { 7256 if (shouldIgnoreValue(propertyInfo, value)) { 7257 return ''; 7258 } 7259 var attributeName = propertyInfo.attributeName; 7260 if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) { 7261 return attributeName + '=""'; 7262 } 7263 return attributeName + '=' + quoteAttributeValueForBrowser(value); 7264 } else if (DOMProperty.isCustomAttribute(name)) { 7265 if (value == null) { 7266 return ''; 7267 } 7268 return name + '=' + quoteAttributeValueForBrowser(value); 7269 } 7270 return null; 7271 }, 7272 7273 /** 7274 * Creates markup for a custom property. 7275 * 7276 * @param {string} name 7277 * @param {*} value 7278 * @return {string} Markup string, or empty string if the property was invalid. 7279 */ 7280 createMarkupForCustomAttribute: function (name, value) { 7281 if (!isAttributeNameSafe(name) || value == null) { 7282 return ''; 7283 } 7284 return name + '=' + quoteAttributeValueForBrowser(value); 7285 }, 7286 7287 /** 7288 * Sets the value for a property on a node. 7289 * 7290 * @param {DOMElement} node 7291 * @param {string} name 7292 * @param {*} value 7293 */ 7294 setValueForProperty: function (node, name, value) { 7295 var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; 7296 if (propertyInfo) { 7297 var mutationMethod = propertyInfo.mutationMethod; 7298 if (mutationMethod) { 7299 mutationMethod(node, value); 7300 } else if (shouldIgnoreValue(propertyInfo, value)) { 7301 this.deleteValueForProperty(node, name); 7302 return; 7303 } else if (propertyInfo.mustUseProperty) { 7304 // Contrary to `setAttribute`, object properties are properly 7305 // `toString`ed by IE8/9. 7306 node[propertyInfo.propertyName] = value; 7307 } else { 7308 var attributeName = propertyInfo.attributeName; 7309 var namespace = propertyInfo.attributeNamespace; 7310 // `setAttribute` with objects becomes only `[object]` in IE8/9, 7311 // ('' + value) makes it output the correct toString()-value. 7312 if (namespace) { 7313 node.setAttributeNS(namespace, attributeName, '' + value); 7314 } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) { 7315 node.setAttribute(attributeName, ''); 7316 } else { 7317 node.setAttribute(attributeName, '' + value); 7318 } 7319 } 7320 } else if (DOMProperty.isCustomAttribute(name)) { 7321 DOMPropertyOperations.setValueForAttribute(node, name, value); 7322 return; 7323 } 7324 7325 if (process.env.NODE_ENV !== 'production') { 7326 var payload = {}; 7327 payload[name] = value; 7328 ReactInstrumentation.debugTool.onHostOperation({ 7329 instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 7330 type: 'update attribute', 7331 payload: payload 7332 }); 7333 } 7334 }, 7335 7336 setValueForAttribute: function (node, name, value) { 7337 if (!isAttributeNameSafe(name)) { 7338 return; 7339 } 7340 if (value == null) { 7341 node.removeAttribute(name); 7342 } else { 7343 node.setAttribute(name, '' + value); 7344 } 7345 7346 if (process.env.NODE_ENV !== 'production') { 7347 var payload = {}; 7348 payload[name] = value; 7349 ReactInstrumentation.debugTool.onHostOperation({ 7350 instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 7351 type: 'update attribute', 7352 payload: payload 7353 }); 7354 } 7355 }, 7356 7357 /** 7358 * Deletes an attributes from a node. 7359 * 7360 * @param {DOMElement} node 7361 * @param {string} name 7362 */ 7363 deleteValueForAttribute: function (node, name) { 7364 node.removeAttribute(name); 7365 if (process.env.NODE_ENV !== 'production') { 7366 ReactInstrumentation.debugTool.onHostOperation({ 7367 instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 7368 type: 'remove attribute', 7369 payload: name 7370 }); 7371 } 7372 }, 7373 7374 /** 7375 * Deletes the value for a property on a node. 7376 * 7377 * @param {DOMElement} node 7378 * @param {string} name 7379 */ 7380 deleteValueForProperty: function (node, name) { 7381 var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; 7382 if (propertyInfo) { 7383 var mutationMethod = propertyInfo.mutationMethod; 7384 if (mutationMethod) { 7385 mutationMethod(node, undefined); 7386 } else if (propertyInfo.mustUseProperty) { 7387 var propName = propertyInfo.propertyName; 7388 if (propertyInfo.hasBooleanValue) { 7389 node[propName] = false;
7390 } else { 7391 node[propName] = ''; 7392 } 7393 } else { 7394 node.removeAttribute(propertyInfo.attributeName); 7395 } 7396 } else if (DOMProperty.isCustomAttribute(name)) { 7397 node.removeAttribute(name); 7398 } 7399 7400 if (process.env.NODE_ENV !== 'production') { 7401 ReactInstrumentation.debugTool.onHostOperation({ 7402 instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 7403 type: 'remove attribute', 7404 payload: name 7405 }); 7406 } 7407 } 7408 7409}; 7410 7411module.exports = DOMPropertyOperations; 7412/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 7413 7414/***/ }), 7415/* 59 */ 7416/***/ (function(module, exports, __webpack_require__) { 7417 7418"use strict"; 7419/** 7420 * Copyright 2015-present, Facebook, Inc. 7421 * All rights reserved. 7422 * 7423 * This source code is licensed under the BSD-style license found in the 7424 * LICENSE file in the root directory of this source tree. An additional grant 7425 * of patent rights can be found in the PATENTS file in the same directory. 7426 * 7427 */ 7428 7429 7430 7431var ReactDOMComponentFlags = { 7432 hasCachedChildNodes: 1 << 0 7433}; 7434 7435module.exports = ReactDOMComponentFlags; 7436 7437/***/ }), 7438/* 60 */ 7439/***/ (function(module, exports, __webpack_require__) { 7440 7441"use strict"; 7442/* WEBPACK VAR INJECTION */(function(process) {/** 7443 * Copyright 2013-present, Facebook, Inc. 7444 * All rights reserved. 7445 * 7446 * This source code is licensed under the BSD-style license found in the 7447 * LICENSE file in the root directory of this source tree. An additional grant 7448 * of patent rights can be found in the PATENTS file in the same directory. 7449 * 7450 */ 7451 7452 7453 7454var _assign = __webpack_require__(4); 7455 7456var LinkedValueUtils = __webpack_require__(38); 7457var ReactDOMComponentTree = __webpack_require__(5); 7458var ReactUpdates = __webpack_require__(10); 7459 7460var warning = __webpack_require__(2); 7461 7462var didWarnValueLink = false; 7463var didWarnValueDefaultValue = false; 7464 7465function updateOptionsIfPendingUpdateAndMounted() { 7466 if (this._rootNodeID && this._wrapperState.pendingUpdate) { 7467 this._wrapperState.pendingUpdate = false; 7468 7469 var props = this._currentElement.props; 7470 var value = LinkedValueUtils.getValue(props); 7471 7472 if (value != null) { 7473 updateOptions(this, Boolean(props.multiple), value); 7474 } 7475 } 7476} 7477 7478function getDeclarationErrorAddendum(owner) { 7479 if (owner) { 7480 var name = owner.getName(); 7481 if (name) { 7482 return ' Check the render method of `' + name + '`.'; 7483 } 7484 } 7485 return ''; 7486} 7487 7488var valuePropNames = ['value', 'defaultValue']; 7489 7490/** 7491 * Validation function for `value` and `defaultValue`. 7492 * @private 7493 */ 7494function checkSelectPropTypes(inst, props) { 7495 var owner = inst._currentElement._owner; 7496 LinkedValueUtils.checkPropTypes('select', props, owner); 7497 7498 if (props.valueLink !== undefined && !didWarnValueLink) { 7499 process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0; 7500 didWarnValueLink = true; 7501 } 7502 7503 for (var i = 0; i < valuePropNames.length; i++) { 7504 var propName = valuePropNames[i]; 7505 if (props[propName] == null) { 7506 continue; 7507 } 7508 var isArray = Array.isArray(props[propName]); 7509 if (props.multiple && !isArray) { 7510 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; 7511 } else if (!props.multiple && isArray) { 7512 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; 7513 } 7514 } 7515} 7516 7517/** 7518 * @param {ReactDOMComponent} inst 7519 * @param {boolean} multiple 7520 * @param {*} propValue A stringable (with `multiple`, a list of stringables). 7521 * @private 7522 */ 7523function updateOptions(inst, multiple, propValue) { 7524 var selectedValue, i; 7525 var options = ReactDOMComponentTree.getNodeFromInstance(inst).options; 7526 7527 if (multiple) { 7528 selectedValue = {}; 7529 for (i = 0; i < propValue.length; i++) { 7530 selectedValue['' + propValue[i]] = true; 7531 } 7532 for (i = 0; i < options.length; i++) { 7533 var selected = selectedValue.hasOwnProperty(options[i].value); 7534 if (options[i].selected !== selected) { 7535 options[i].selected = selected; 7536 } 7537 } 7538 } else {
7539 // Do not set `select.value` as exact behavior isn't consistent across all 7540 // browsers for all cases. 7541 selectedValue = '' + propValue; 7542 for (i = 0; i < options.length; i++) { 7543 if (options[i].value === selectedValue) { 7544 options[i].selected = true; 7545 return; 7546 } 7547 } 7548 if (options.length) { 7549 options[0].selected = true; 7550 } 7551 } 7552} 7553 7554/** 7555 * Implements a <select> host component that allows optionally setting the 7556 * props `value` and `defaultValue`. If `multiple` is false, the prop must be a 7557 * stringable. If `multiple` is true, the prop must be an array of stringables. 7558 * 7559 * If `value` is not supplied (or null/undefined), user actions that change the 7560 * selected option will trigger updates to the rendered options. 7561 * 7562 * If it is supplied (and not null/undefined), the rendered options will not 7563 * update in response to user actions. Instead, the `value` prop must change in 7564 * order for the rendered options to update. 7565 * 7566 * If `defaultValue` is provided, any options with the supplied values will be 7567 * selected. 7568 */ 7569var ReactDOMSelect = { 7570 getHostProps: function (inst, props) { 7571 return _assign({}, props, { 7572 onChange: inst._wrapperState.onChange, 7573 value: undefined 7574 }); 7575 }, 7576 7577 mountWrapper: function (inst, props) { 7578 if (process.env.NODE_ENV !== 'production') { 7579 checkSelectPropTypes(inst, props); 7580 } 7581 7582 var value = LinkedValueUtils.getValue(props); 7583 inst._wrapperState = { 7584 pendingUpdate: false, 7585 initialValue: value != null ? value : props.defaultValue, 7586 listeners: null, 7587 onChange: _handleChange.bind(inst), 7588 wasMultiple: Boolean(props.multiple) 7589 }; 7590 7591 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { 7592 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; 7593 didWarnValueDefaultValue = true; 7594 } 7595 }, 7596 7597 getSelectValueContext: function (inst) { 7598 // ReactDOMOption looks at this initial value so the initial generated 7599 // markup has correct `selected` attributes 7600 return inst._wrapperState.initialValue; 7601 }, 7602 7603 postUpdateWrapper: function (inst) { 7604 var props = inst._currentElement.props; 7605 7606 // After the initial mount, we control selected-ness manually so don't pass 7607 // this value down 7608 inst._wrapperState.initialValue = undefined; 7609 7610 var wasMultiple = inst._wrapperState.wasMultiple; 7611 inst._wrapperState.wasMultiple = Boolean(props.multiple); 7612 7613 var value = LinkedValueUtils.getValue(props); 7614 if (value != null) { 7615 inst._wrapperState.pendingUpdate = false; 7616 updateOptions(inst, Boolean(props.multiple), value); 7617 } else if (wasMultiple !== Boolean(props.multiple)) { 7618 // For simplicity, reapply `defaultValue` if `multiple` is toggled. 7619 if (props.defaultValue != null) { 7620 updateOptions(inst, Boolean(props.multiple), props.defaultValue); 7621 } else { 7622 // Revert the select back to its default unselected state. 7623 updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : ''); 7624 } 7625 } 7626 } 7627}; 7628 7629function _handleChange(event) { 7630 var props = this._currentElement.props; 7631 var returnValue = LinkedValueUtils.executeOnChange(props, event); 7632 7633 if (this._rootNodeID) { 7634 this._wrapperState.pendingUpdate = true; 7635 } 7636 ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this); 7637 return returnValue; 7638} 7639 7640module.exports = ReactDOMSelect; 7641/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 7642 7643/***/ }), 7644/* 61 */ 7645/***/ (function(module, exports, __webpack_require__) { 7646 7647"use strict"; 7648/** 7649 * Copyright 2014-present, Facebook, Inc. 7650 * All rights reserved. 7651 * 7652 * This source code is licensed under the BSD-style license found in the 7653 * LICENSE file in the root directory of this source tree. An additional grant 7654 * of patent rights can be found in the PATENTS file in the same directory. 7655 * 7656 */ 7657 7658 7659 7660var emptyComponentFactory; 7661 7662var ReactEmptyComponentInjection = { 7663 injectEmptyComponentFactory: function (factory) { 7664 emptyComponentFactory = factory; 7665 } 7666}; 7667 7668var ReactEmptyComponent = { 7669 create: function (instantiate) { 7670 return emptyComponentFactory(instantiate); 7671 } 7672}; 7673 7674ReactEmptyComponent.injection = ReactEmptyComponentInjection; 7675 7676module.exports = ReactEmptyComponent; 7677 7678/***/ }), 7679/* 62 */ 7680/***/ (function(module, exports, __webpack_require__) { 7681 7682"use strict"; 7683/** 7684 * Copyright 2013-present, Facebook, Inc. 7685 * All rights reserved. 7686 * 7687 * This source code is licensed under the BSD-style license found in the 7688 * LICENSE file in the root directory of this source tree. An additional grant 7689 * of patent rights can be found in the PATENTS file in the same directory. 7690 * 7691 * 7692 */ 7693 7694 7695 7696var ReactFeatureFlags = { 7697 // When true, call console.time() before and .timeEnd() after each top-level 7698 // render (both initial renders and updates). Useful when looking at prod-mode 7699 // timeline profiles in Chrome, for example. 7700 logTopLevelRenders: false 7701}; 7702 7703module.exports = ReactFeatureFlags; 7704 7705/***/ }), 7706/* 63 */ 7707/***/ (function(module, exports, __webpack_require__) { 7708 7709"use strict"; 7710/* WEBPACK VAR INJECTION */(function(process) {/** 7711 * Copyright 2014-present, Facebook, Inc. 7712 * All rights reserved. 7713 * 7714 * This source code is licensed under the BSD-style license found in the 7715 * LICENSE file in the root directory of this source tree. An additional grant 7716 * of patent rights can be found in the PATENTS file in the same directory. 7717 * 7718 */ 7719 7720 7721 7722var _prodInvariant = __webpack_require__(3); 7723 7724var invariant = __webpack_require__(1); 7725 7726var genericComponentClass = null; 7727var textComponentClass = null; 7728 7729var ReactHostComponentInjection = { 7730 // This accepts a class that receives the tag string. This is a catch all 7731 // that can render any kind of tag. 7732 injectGenericComponentClass: function (componentClass) { 7733 genericComponentClass = componentClass; 7734 }, 7735 // This accepts a text component class that takes the text str
7735ing to be 7736 // rendered as props. 7737 injectTextComponentClass: function (componentClass) { 7738 textComponentClass = componentClass; 7739 } 7740}; 7741 7742/** 7743 * Get a host internal component class for a specific tag. 7744 * 7745 * @param {ReactElement} element The element to create. 7746 * @return {function} The internal class constructor function. 7747 */ 7748function createInternalComponent(element) { 7749 !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; 7750 return new genericComponentClass(element); 7751} 7752 7753/** 7754 * @param {ReactText} text 7755 * @return {ReactComponent} 7756 */ 7757function createInstanceForText(text) { 7758 return new textComponentClass(text); 7759} 7760 7761/** 7762 * @param {ReactComponent} component 7763 * @return {boolean} 7764 */ 7765function isTextComponent(component) { 7766 return component instanceof textComponentClass; 7767} 7768 7769var ReactHostComponent = { 7770 createInternalComponent: createInternalComponent, 7771 createInstanceForText: createInstanceForText, 7772 isTextComponent: isTextComponent, 7773 injection: ReactHostComponentInjection 7774}; 7775 7776module.exports = ReactHostComponent; 7777/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 7778 7779/***/ }), 7780/* 64 */ 7781/***/ (function(module, exports, __webpack_require__) { 7782 7783"use strict"; 7784/** 7785 * Copyright 2013-present, Facebook, Inc. 7786 * All rights reserved. 7787 * 7788 * This source code is licensed under the BSD-style license found in the 7789 * LICENSE file in the root directory of this source tree. An additional grant 7790 * of patent rights can be found in the PATENTS file in the same directory. 7791 * 7792 */ 7793 7794 7795 7796var ReactDOMSelection = __webpack_require__(128); 7797 7798var containsNode = __webpack_require__(90); 7799var focusNode = __webpack_require__(52); 7800var getActiveElement = __webpack_require__(53); 7801 7802function isInDocument(node) { 7803 return containsNode(document.documentElement, node); 7804} 7805 7806/** 7807 * @ReactInputSelection: React input selection module. Based on Selection.js, 7808 * but modified to be suitable for react and has a couple of bug fixes (doesn't 7809 * assume buttons have range selections allowed). 7810 * Input selection module for React. 7811 */ 7812var ReactInputSelection = { 7813 7814 hasSelectionCapabilities: function (elem) { 7815 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); 7816 return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true'); 7817 }, 7818 7819 getSelectionInformation: function () { 7820 var focusedElem = getActiveElement(); 7821 return { 7822 focusedElem: focusedElem, 7823 selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null 7824 }; 7825 }, 7826 7827 /** 7828 * @restoreSelection: If any selection information was potentially lost, 7829 * restore it. This is useful when performing operations that could remove dom 7830 * nodes and place them back in, resulting in focus being lost. 7831 */ 7832 restoreSelection: function (priorSelectionInformation) { 7833 var curFocusedElem = getActiveElement(); 7834 var priorFocusedElem = priorSelectionInformation.focusedElem; 7835 var priorSelectionRange = priorSelectionInformation.selectionRange; 7836 if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) { 7837 if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) { 7838 ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange); 7839 } 7840 focusNode(priorFocusedElem); 7841 } 7842 }, 7843 7844 /** 7845 * @getSelection: Gets the selection bounds of a focused textarea, input or 7846 * contentEditable node. 7847 * -@input: Look up selection bounds of this input 7848 * -@return {start: selectionStart, end: selectionEnd} 7849 */ 7850 getSelection: function (input) { 7851 var selection; 7852 7853 if ('selectionStart' in input) { 7854 // Modern browser with input or textarea. 7855 selection = { 7856 start: input.selectionStart, 7857 end: input.selectionEnd 7858 }; 7859 } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') { 7860 // IE8 input. 7861 var range = document.selection.createRange(); 7862 // There can only be one selection per document in IE, so it must 7863 // be in our element. 7864 if (range.parentElement() === input) { 7865 selection = { 7866 start: -range.moveStart('character', -input.value.length), 7867 end: -range.moveEnd('character', -input.value.length) 7868 }; 7869 } 7870 } else { 7871 // Content editable or old IE textarea. 7872 selection = ReactDOMSelection.getOffsets(input); 7873 } 7874 7875 return selection || { start: 0, end: 0 }; 7876 }, 7877 7878 /** 7879 * @setSelection: Sets the selection bounds of a textarea or input and focuses 7880 * the input. 7881 * -@input Set selection bounds of this input or textarea 7882 * -@offsets Object of same form that is returned from get* 7883 */ 7884 setSelection: function (input, offsets) { 7885 var start = offsets.start; 7886 var end = offsets.end; 7887 if (end === undefined) { 7888 end = start; 7889 } 7890 7891 if ('selectionStart' in input) { 7892 input.selectionStart = start; 7893 input.selectionEnd = Math.min(end, input.value.length); 7894 } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') { 7895 var range = input.createTextRange(); 7896 range.collapse(true); 7897 range.moveStart('character', start); 7898 range.moveEnd('character', end - start); 7899 range.select(); 7900 } else { 7901 ReactDOMSelection.setOffsets(input, offsets); 7902 } 7903 } 7904}; 7905 7906module.exports = ReactInputSelection; 7907 7908/***/ }), 7909/* 65 */ 7910/***/ (function(module, exports, __webpack_require__) { 7911 7912"use strict"; 7913/* WEBPACK VAR INJECTION */(function(process) {/** 7914 * Copyright 2013-present, Facebook, Inc. 7915 * All rights reserved. 7916 * 7917 * This source code is licensed under the BSD-style license found in the 7918 * LICENSE file in the root directory of this source tree. An additional grant 7919 * of patent rights can be found in the PATENTS file in the same directory. 7920 * 7921 */ 7922 7923 7924 7925var _prodInvariant = __webpack_require__(3); 7926 7927var DOMLazyTree = __webpack_require__(17); 7928var DOMProperty = __webpack_require__(13); 7929var React = __webpack_require__(19); 7930var ReactBrowserEventEmitter = __webpack_require__(27); 7931var ReactCurrentOwner = __webpack_require__(11); 7932var ReactDOMComponentTree = __webpack_require__(5); 7933var ReactDOMContainerInfo = __webpack_require__(120); 7934var ReactDOMFeatureFlags = __webpack_require__(122); 7935var ReactFeatureFlags = __webpack_require__(62); 7936var ReactInstanceMap = __webpack_require__(23); 7937var ReactInstrumentation = __webpack_require__(8); 7938var ReactMarkupChecksum = __webpack_require__(142); 7939var ReactReconciler = __webpack_require__(18); 7940var ReactUpdateQueue = __webpack_require__(41); 7941var ReactUpdates = __webpack_require__(10); 7942 7943var emptyObject = __webpack_require__(20); 7944var instantiateReactComponent = __webpack_require__(73); 7945var invariant = __webpack_require__(1); 7946var setInnerHTML = __webpack_require__(31); 7947var shouldUpdateReactComponent = __webpack_require__(47); 7948var warning = __webpack_require__(2); 7949 7950var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; 7951var ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME; 7952 7953var ELEMENT_NODE_TYPE = 1; 7954var DOC_NODE_TYPE = 9; 7955var DOCUMENT_FRAGMENT_NODE_TYPE = 11; 7956 7957var instancesByReactRootID = {}; 7958 7959/** 7960 * Finds the index of the first character 7961 * that's not common between the two given strings. 7962 * 7963 * @return {number} the index of the character where the strings diverge 7964 */ 7965function firstDifferenceIndex(string1, string2) { 7966 var minLen = Math.min(string1.length, string2.length); 7967 for (var i = 0; i < minLen; i++) { 7968 if (string1.charAt(i) !== string2.charAt(i)) { 7969 return i; 7970 } 7971 } 7972 return string1.length === string2.length ? -1 : minLen; 7973} 7974 7975/** 7976 * @param {DOMElement|DOMDocument} container DOM element that may contain 7977 * a React component 7978 * @return {?*} DOM element that may have the reactRoot ID, or null. 7979 */ 7980function getReactRootElementInContainer(container) { 7981 if (!container) { 7982 return null; 7983 } 7984 7985 if (container.nodeType === DOC_NODE_TYPE) { 7986 return container.documentElement; 7987 } else { 7988 return container.firstChild; 7989 } 7990} 7991 7992function internalGetID(node) { 7993 // If node is something like a window, document, or text node, none of 7994 // which support attributes or a .getAttribute method, gracefully return 7995 // the empty string, as if the attribute were missing. 7996 return node.getAttribute && node.getAttribute(ATTR_NAME) || ''; 7997} 7998 7999/** 8000 * Mounts this component and inserts it into the DOM. 8001 * 8002 * @param {ReactComponent} componentInstance The instance to mount. 8003 * @param {DOMElement} container DOM element to mount into. 8004 * @param {ReactReconcileTransaction} transaction 8005 * @param {boolean} shouldReuseMarkup If true, do not insert markup 8006 */ 8007function mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) { 8008 var markerName; 8009 if (ReactFeatureFlags.logTopLevelRenders) { 8010 var wrappedElement = wrapperInstance._currentElement.props.child; 8011 var type = wrappedElement.type; 8012 markerName = 'React mount: ' + (typeof type === 'string' ? type : type.displayName || type.name); 8013 console.time(markerName); 8014 } 8015 8016 var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0 /* parentDebugID */ 8017 ); 8018 8019 if (markerName) { 8020 console.timeEnd(markerName); 8021 } 8022 8023 wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance; 8024 ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction); 8025} 8026 8027/** 8028 * Batched mount. 8029 * 8030 * @param {ReactComponent} componentInstance The instance to mount. 8031 * @param {DOMElement} container DOM element to mount into. 8032 * @param {boolean} shouldReuseMarkup If true, do not insert markup 8033 */ 8034function batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) { 8035 var transaction = ReactUpdates.ReactReconcileTransaction.getPooled( 8036 /* useCreateElement */ 8037 !shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement); 8038 transaction.perform(mountComponentIntoNode, null, componentInstance, container, transaction, shouldReuseMarkup, context); 8039 ReactUpdates.ReactReconcileTransaction.release(transaction); 8040} 8041 8042/** 8043 * Unmounts a component and removes it from the DOM. 8044 * 8045 * @param {ReactComponent} instance React component instance. 8046 * @param {DOMElement} container DOM element to unmount from. 8047 * @final 8048 * @internal 8049 * @see {ReactMount.unmountComponentAtNode} 8050 */ 8051function unmountComponentFromNode(instance, container, safely) { 8052 if (process.env.NODE_ENV !== 'production') { 8053 ReactInstrumentation.debugTool.onBeginFlush(); 8054 } 8055 ReactReconciler.unmountComponent(instance, safely); 8056 if (process.env.NODE_ENV !== 'production') { 8057 ReactInstrumentation.debugTool.onEndFlush(); 8058 } 8059 8060 if (container.nodeType === DOC_NODE_TYPE) { 8061 container = container.documentElement; 8062 } 8063 8064 // http://jsperf.com/emptying-a-node 8065 while (container.lastChild) { 8066 container.removeChild(container.lastChild); 8067 } 8068} 8069 8070/** 8071 * True if the supplied DOM node has a direct React-rendered child that is 8072 * not a React root element. Useful for warning in `render`, 8073 * `unmountComponentAtNode`, etc. 8074 * 8075 * @param {?DOMElement} node The candidate DOM node. 8076 * @return {boolean} True if the DOM element contains a direct child that was 8077 * rendered by React but is not a root element. 8078 * @internal 8079 */ 8080function hasNonRootReactChild(container) { 8081 var rootEl = getReactRootElementInContainer(container); 8082 if (rootEl) { 8083 var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl); 8084 return !!(inst && inst._hostParent); 8085 } 8086} 8087 8088/** 8089 * True if the supplied DOM node is a React DOM element and 8090 * it has been rendered by another copy of React. 8091 * 8092 * @param {?DOMElement} node The candidate DOM node. 8093 * @return {boolean} True if the DOM has been rendered by another copy of React 8094 * @internal 8095 */ 8096function nodeIsRenderedByOtherInstance(container) { 8097 var rootEl = getReactRootElementInContainer(container); 8098 return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl)); 8099} 8100 8101/** 8102 * True if the supplied DOM node is a valid node element. 8103 * 8104 * @param {?DOMElement} node The candidate DOM node. 8105 * @return {boolean} True if the DOM is a valid DOM node. 8106 * @internal 8107 */ 8108function isValidContainer(node) { 8109 return !!(node && (node.nodeType === ELEMENT_NODE_TYPE || node.nodeType === DOC_NODE_TYPE || node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE)); 8110} 8111 8112/** 8113 * True if the supplied DOM node is a valid React node element. 8114 * 8115 * @param {?DOMElement} node The candidate DOM node. 8116 * @return {boolean} True if the DOM is a valid React DOM node. 8117 * @internal 8118 */ 8119function isReactNode(node) { 8120 return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME)); 8121} 8122 8123function getHostRootInstanceInContainer(container) { 8124 var rootEl = getReactRootElementInContainer(container); 8125 var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl); 8126 return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null; 8127} 8128 8129function getTopLevelWrapperInContainer(container) { 8130 var root = getHostRootInstanceInContainer(container); 8131 return root ? root._hostContainerInfo._topLevelWrapper : null; 8132} 8133 8134/** 8135 * Temporary (?) hack so that we can store all top-level pending updates on 8136 * composites instead of having to worry about different types of components 8137 * here. 8138 */ 8139var topLevelRootCounter = 1; 8140var TopLevelWrapper = function () { 8141 this.rootID = topLevelRootCounter++; 8142}; 8143TopLevelWrapper.prototype.isReactComponent = {}; 8144if (process.env.NODE_ENV !== 'production') { 8145 TopLevelWrapper.displayName = 'TopLevelWrapper'; 8146} 8147TopLevelWrapper.prototype.render = function () { 8148 return this.props.child; 8149}; 8150TopLevelWrapper.isReactTopLevelWrapper = true; 8151 8152/** 8153 * Mounting is the process of initializing a React component by creating its 8154 * representative DOM elements and inserting them into a supplied `container`. 8155 * Any prior content inside `container` is destroyed in the process. 8156 * 8157 * ReactMount.render( 8158 * component, 8159 * document.getElementById('container') 8160 * ); 8161 * 8162 * <div id="container"> <-- Supplied `container`. 8163 * <div data-reactid=".3"> <-- Rendered reactRoot of React 8164 * // ... component.
8165 * </div> 8166 * </div> 8167 * 8168 * Inside of `container`, the first element rendered is the "reactRoot". 8169 */ 8170var ReactMount = { 8171 8172 TopLevelWrapper: TopLevelWrapper, 8173 8174 /** 8175 * Used by devtools. The keys are not important. 8176 */ 8177 _instancesByReactRootID: instancesByReactRootID, 8178 8179 /** 8180 * This is a hook provided to support rendering React components while 8181 * ensuring that the apparent scroll position of its `container` does not 8182 * change. 8183 * 8184 * @param {DOMElement} container The `container` being rendered into. 8185 * @param {function} renderCallback This must be called once to do the render. 8186 */ 8187 scrollMonitor: function (container, renderCallback) { 8188 renderCallback(); 8189 }, 8190 8191 /** 8192 * Take a component that's already mounted into the DOM and replace its props 8193 * @param {ReactComponent} prevComponent component instance already in the DOM 8194 * @param {ReactElement} nextElement component instance to render 8195 * @param {DOMElement} container container to render into 8196 * @param {?function} callback function triggered on completion 8197 */ 8198 _updateRootComponent: function (prevComponent, nextElement, nextContext, container, callback) { 8199 ReactMount.scrollMonitor(container, function () { 8200 ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext); 8201 if (callback) { 8202 ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback); 8203 } 8204 }); 8205 8206 return prevComponent; 8207 }, 8208 8209 /** 8210 * Render a new component into the DOM. Hooked by hooks! 8211 * 8212 * @param {ReactElement} nextElement element to render 8213 * @param {DOMElement} container container to render into 8214 * @param {boolean} shouldReuseMarkup if we should skip the markup insertion 8215 * @return {ReactComponent} nextComponent 8216 */ 8217 _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) { 8218 // Various parts of our code (such as ReactCompositeComponent's 8219 // _renderValidatedComponent) assume that calls to render aren't nested; 8220 // verify that that's the case. 8221 process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0; 8222 8223 !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : _prodInvariant('37') : void 0; 8224 8225 ReactBrowserEventEmitter.ensureScrollValueMonitoring(); 8226 var componentInstance = instantiateReactComponent(nextElement, false); 8227 8228 // The initial render is synchronous but any updates that happen during 8229 // rendering, in componentWillMount or componentDidMount, will be batched 8230 // according to the current batching strategy. 8231 8232 ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, container, shouldReuseMarkup, context); 8233 8234 var wrapperID = componentInstance._instance.rootID; 8235 instancesByReactRootID[wrapperID] = componentInstance; 8236 8237 return componentInstance; 8238 }, 8239 8240 /** 8241 * Renders a React component into the DOM in the supplied `container`. 8242 * 8243 * If the React component was previously rendered into `container`, this will 8244 * perform an update on it and only mutate the DOM as necessary to reflect the 8245 * latest React component. 8246 * 8247 * @param {ReactComponent} parentComponent The conceptual parent of this render tree. 8248 * @param {ReactElement} nextElement Component element to render. 8249 * @param {DOMElement} container DOM element to render into. 8250 * @param {?function} callback function triggered on completion 8251 * @return {ReactComponent} Component instance rendered in `container`. 8252 */ 8253 renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { 8254 !(parentComponent != null && ReactInstanceMap.has(parentComponent)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'parentComponent must be a valid React Component') : _prodInvariant('38') : void 0; 8255 return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback); 8256 }, 8257 8258 _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { 8259 ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render'); 8260 !React.isValidElement(nextElement) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : 8261 // Check if it quacks like an element 8262 nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0; 8263 8264 process.env.NODE_ENV !== 'production' ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0; 8265 8266 var nextWrappedElement = React.createElement(TopLevelWrapper, { child: nextElement }); 8267 8268 var nextContext; 8269 if (parentComponent) { 8270 var parentInst = ReactInstanceMap.get(parentComponent); 8271 nextContext = parentInst._processChildContext(parentInst._context); 8272 } else { 8273 nextContext = emptyObject; 8274 } 8275 8276 var prevComponent = getTopLevelWrapperInContainer(container); 8277 8278 if (prevComponent) { 8279 var prevWrappedElement = prevComponent._currentElement; 8280 var prevElement = prevWrappedElement.props.child; 8281 if (shouldUpdateReactComponent(prevElement, nextElement)) { 8282 var publicInst = prevComponent._renderedComponent.getPublicInstance(); 8283 var updatedCallback = callback && function () { 8284 callback.call(publicInst); 8285 }; 8286 ReactMount._updateRootComponent(prevComponent, nextWrappedElement, nextContext, container, updatedCallback); 8287 return publicInst; 8288 } else { 8289 ReactMount.unmountComponentAtNode(container); 8290 } 8291 } 8292 8293 var reactRootElement = getReactRootElementInContainer(container); 8294 var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement); 8295 var containerHasNonRootReactChild = hasNonRootReactChild(container); 8296 8297 if (process.env.NODE_ENV !== 'production') { 8298 process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0; 8299 8300 if (!containerHasReactMarkup || reactRootElement.nextSibling) { 8301 var rootElementSibling = reactRootElement; 8302 while (rootElementSibling) { 8303 if (internalGetID(rootElementSibling)) { 8304 process.env.NODE_ENV !== 'production' ? warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.') : void 0; 8305 break; 8306 } 8307 rootElementSibling = rootElementSibling.nextSibling; 8308 } 8309 } 8310 } 8311 8312 var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild; 8313 var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, nextContext)._renderedComponent.getPublicInstance(); 8314 if (callback) { 8315 callback.call(component); 8316 } 8317 return component; 8318 }, 8319 8320 /** 8321 * Renders a React component into the DOM in the supplied `container`. 8322 * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.render 8323 * 8324 * If the React component was previously rendered into `container`, this will 8325 * perform an update on it and only mutate the DOM as necessary to reflect the 8326 * latest React component. 8327 * 8328 * @param {ReactElement} nextElement Component element to render. 8329 * @param {DOMElement} container DOM element to render into. 8330 * @param {?function} callback function triggered on completion 8331 * @return {ReactComponent} Component instance rendered in `container`. 8332 */ 8333 render: function (nextElement, container, callback) { 8334 return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback); 8335 }, 8336 8337 /** 8338 * Unmounts and destroys the React component rendered in the `container`. 8339 * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.unmountcomponentatnode 8340 * 8341 * @param {DOMElement} container DOM element containing a React component. 8342 * @return {boolean} True if a component was found in and unmounted from 8343 * `container` 8344 */ 8345 unmountComponentAtNode: function (container) { 8346 // Various parts of our code (such as ReactCompositeComponent's 8347 // _renderValidatedComponent) assume that calls to render aren't nested; 8348 // verify that that's the case. (Strictly speaking, unmounting won't
8348cause a 8349 // render but we still don't expect to be in a render call here.) 8350 process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0; 8351 8352 !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0; 8353 8354 if (process.env.NODE_ENV !== 'production') { 8355 process.env.NODE_ENV !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by another copy of React.') : void 0; 8356 } 8357 8358 var prevComponent = getTopLevelWrapperInContainer(container); 8359 if (!prevComponent) { 8360 // Check if the node being unmounted was rendered by React, but isn't a 8361 // root node. 8362 var containerHasNonRootReactChild = hasNonRootReactChild(container); 8363 8364 // Check if the container itself is a React root node. 8365 var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME); 8366 8367 if (process.env.NODE_ENV !== 'production') { 8368 process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0; 8369 } 8370 8371 return false; 8372 } 8373 delete instancesByReactRootID[prevComponent._instance.rootID]; 8374 ReactUpdates.batchedUpdates(unmountComponentFromNode, prevComponent, container, false); 8375 return true; 8376 }, 8377 8378 _mountImageIntoNode: function (markup, container, instance, shouldReuseMarkup, transaction) { 8379 !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : _prodInvariant('41') : void 0; 8380 8381 if (shouldReuseMarkup) { 8382 var rootElement = getReactRootElementInContainer(container); 8383 if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) { 8384 ReactDOMComponentTree.precacheNode(instance, rootElement); 8385 return; 8386 } else { 8387 var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); 8388 rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); 8389 8390 var rootMarkup = rootElement.outerHTML; 8391 rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum); 8392 8393 var normalizedMarkup = markup; 8394 if (process.env.NODE_ENV !== 'production') { 8395 // because rootMarkup is retrieved from the DOM, various normalizations 8396 // will have occurred which will not be present in `markup`. Here, 8397 // insert markup into a <div> or <iframe> depending on the container 8398 // type to perform the same normalizations before comparing. 8399 var normalizer; 8400 if (container.nodeType === ELEMENT_NODE_TYPE) { 8401 normalizer = document.createElement('div'); 8402 normalizer.innerHTML = markup; 8403 normalizedMarkup = normalizer.innerHTML; 8404 } else { 8405 normalizer = document.createElement('iframe'); 8406 document.body.appendChild(normalizer); 8407 normalizer.contentDocument.write(markup); 8408 normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML; 8409 document.body.removeChild(normalizer); 8410 } 8411 } 8412 8413 var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup); 8414 var difference = ' (client) ' + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20); 8415 8416 !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\'re trying to render a component to the document using server rendering but the checksum was invali
8416d. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\n%s', difference) : _prodInvariant('42', difference) : void 0; 8417 8418 if (process.env.NODE_ENV !== 'production') { 8419 process.env.NODE_ENV !== 'production' ? warning(false, 'React attempted to reuse markup in a container but the ' + 'checksum was invalid. This generally means that you are ' + 'using server rendering and the markup generated on the ' + 'server was not what the client was expecting. React injected ' + 'new markup to compensate which works but you have lost many ' + 'of the benefits of server rendering. Instead, figure out ' + 'why the markup being generated is different on the client ' + 'or server:\n%s', difference) : void 0; 8420 } 8421 } 8422 } 8423 8424 !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\'re trying to render a component to the document but you didn\'t use server rendering. We can\'t do this without using server rendering due to cross-browser quirks. See ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('43') : void 0; 8425 8426 if (transaction.useCreateElement) { 8427 while (container.lastChild) { 8428 container.removeChild(container.lastChild); 8429 } 8430 DOMLazyTree.insertTreeBefore(container, markup, null); 8431 } else { 8432 setInnerHTML(container, markup); 8433 ReactDOMComponentTree.precacheNode(instance, container.firstChild); 8434 } 8435 8436 if (process.env.NODE_ENV !== 'production') { 8437 var hostNode = ReactDOMComponentTree.getInstanceFromNode(container.firstChild); 8438 if (hostNode._debugID !== 0) { 8439 ReactInstrumentation.debugTool.onHostOperation({ 8440 instanceID: hostNode._debugID, 8441 type: 'mount', 8442 payload: markup.toString() 8443 }); 8444 } 8445 } 8446 } 8447}; 8448 8449module.exports = ReactMount; 8450/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 8451 8452/***/ }), 8453/* 66 */ 8454/***/ (function(module, exports, __webpack_require__) { 8455 8456"use strict"; 8457/* WEBPACK VAR INJECTION */(function(process) {/** 8458 * Copyright 2013-present, Facebook, Inc. 8459 * All rights reserved. 8460 * 8461 * This source code is licensed under the BSD-style license found in the 8462 * LICENSE file in the root directory of this source tree. An additional grant 8463 * of patent rights can be found in the PATENTS file in the same directory. 8464 * 8465 * 8466 */ 8467 8468 8469 8470var _prodInvariant = __webpack_require__(3); 8471 8472var React = __webpack_require__(19); 8473 8474var invariant = __webpack_require__(1); 8475 8476var ReactNodeTypes = { 8477 HOST: 0, 8478 COMPOSITE: 1, 8479 EMPTY: 2, 8480 8481 getType: function (node) { 8482 if (node === null || node === false) { 8483 return ReactNodeTypes.EMPTY; 8484 } else if (React.isValidElement(node)) { 8485 if (typeof node.type === 'function') { 8486 return ReactNodeTypes.COMPOSITE; 8487 } else { 8488 return ReactNodeTypes.HOST; 8489 } 8490 } 8491 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0; 8492 } 8493}; 8494 8495module.exports = ReactNodeTypes; 8496/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 8497 8498/***/ }), 8499/* 67 */ 8500/***/ (function(module, exports, __webpack_require__) { 8501 8502"use strict"; 8503/** 8504 * Copyright 2013-present, Facebook, Inc. 8505 * All rights reserved. 8506 * 8507 * This source code is licensed under the BSD-style license found in the 8508 * LICENSE file in the root directory of this source tree. An additional grant 8509 * of patent rights can be found in the PATENTS file in the same directory. 8510 * 8511 * 8512 */ 8513 8514 8515 8516var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; 8517 8518module.exports = ReactPropTypesSecret; 8519 8520/***/ }), 8521/* 68 */ 8522/***/ (function(module, exports, __webpack_require__) { 8523 8524"use strict"; 8525/** 8526 * Copyright 2013-present, Facebook, Inc. 8527 * All rights reserved. 8528 * 8529 * This source code is licensed under the BSD-style license found in the 8530 * LICENSE file in the root directory of this source tree. An additional grant 8531 * of patent rights can be found in the PATENTS file in the same directory. 8532 * 8533 */ 8534 8535 8536 8537var ViewportMetrics = { 8538 8539 currentScrollLeft: 0, 8540 8541 currentScrollTop: 0, 8542 8543 refreshScrollValues: function (scrollPosition) { 8544 ViewportMetrics.currentScrollLeft = scrollPosition.x; 8545 ViewportMetrics.currentScrollTop = scrollPosition.y; 8546 } 8547 8548}; 8549 8550module.exports = ViewportMetrics; 8551 8552/***/ }), 8553/* 69 */ 8554/***/ (function(module, exports, __webpack_require__) { 8555 8556"use strict"; 8557/* WEBPACK VAR INJECTION */(function(process) {/** 8558 * Copyright 2014-present, Facebook, Inc. 8559 * All rights reserved. 8560 * 8561 * This source code is licensed under the BSD-style license found in the 8562 * LICENSE file in the root directory of this source tree. An additional grant 8563 * of patent rights can be found in the PATENTS file in the same directory. 8564 * 8565 * 8566 */ 8567 8568 8569 8570var _prodInvariant = __webpack_require__(3); 8571 8572var invariant = __webpack_require__(1); 8573 8574/** 8575 * Accumulates items that must not be null or undefined into the first one. This 8576 * is used to conserve memory by avoiding array allocations, and thus sacrifices 8577 * API cleanness. Since `current` can be null before being passed in and not 8578 * null after this function, make sure to assign it back to `current`: 8579 * 8580 * `a = accumulateInto(a, b);` 8581 * 8582 * This API should be sparingly used. Try `accumulate` for something cleaner. 8583 * 8584 * @return {*|array<*>} An accumulation of items. 8585 */ 8586 8587function accumulateInto(current, next) { 8588 !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0; 8589 8590 if (current == null) { 8591 return next; 8592 } 8593 8594 // Both are not empty. Warning: Never call x.concat(y) when you are not 8595 // certain that x is an Array (x could be a string with concat method). 8596 if (Array.isArray(current)) { 8597 if (Array.isArray(next)) { 8598 current.push.apply(current, next); 8599 return current; 8600 } 8601 current.push(next); 8602 return current; 8603 } 8604 8605 if (Array.isArray(next)) { 8606 // A bit too dangerous to mutate `next`. 8607 return [current].concat(next); 8608 } 8609 8610 return [current, next]; 8611} 8612 8613module.exports = accumulateInto;
8614/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 8615 8616/***/ }), 8617/* 70 */ 8618/***/ (function(module, exports, __webpack_require__) { 8619 8620"use strict"; 8621/** 8622 * Copyright 2013-present, Facebook, Inc. 8623 * All rights reserved. 8624 * 8625 * This source code is licensed under the BSD-style license found in the 8626 * LICENSE file in the root directory of this source tree. An additional grant 8627 * of patent rights can be found in the PATENTS file in the same directory. 8628 * 8629 * 8630 */ 8631 8632 8633 8634/** 8635 * @param {array} arr an "accumulation" of items which is either an Array or 8636 * a single item. Useful when paired with the `accumulate` module. This is a 8637 * simple utility that allows us to reason about a collection of items, but 8638 * handling the case when there is exactly one item (and we do not need to 8639 * allocate an array). 8640 */ 8641 8642function forEachAccumulated(arr, cb, scope) { 8643 if (Array.isArray(arr)) { 8644 arr.forEach(cb, scope); 8645 } else if (arr) { 8646 cb.call(scope, arr); 8647 } 8648} 8649 8650module.exports = forEachAccumulated; 8651 8652/***/ }), 8653/* 71 */ 8654/***/ (function(module, exports, __webpack_require__) { 8655 8656"use strict"; 8657/** 8658 * Copyright 2013-present, Facebook, Inc. 8659 * All rights reserved. 8660 * 8661 * This source code is licensed under the BSD-style license found in the 8662 * LICENSE file in the root directory of this source tree. An additional grant 8663 * of patent rights can be found in the PATENTS file in the same directory. 8664 * 8665 */ 8666 8667 8668 8669var ReactNodeTypes = __webpack_require__(66); 8670 8671function getHostComponentFromComposite(inst) { 8672 var type; 8673 8674 while ((type = inst._renderedNodeType) === ReactNodeTypes.COMPOSITE) { 8675 inst = inst._renderedComponent; 8676 } 8677 8678 if (type === ReactNodeTypes.HOST) { 8679 return inst._renderedComponent; 8680 } else if (type === ReactNodeTypes.EMPTY) { 8681 return null; 8682 } 8683} 8684 8685module.exports = getHostComponentFromComposite; 8686 8687/***/ }), 8688/* 72 */ 8689/***/ (function(module, exports, __webpack_require__) { 8690 8691"use strict"; 8692/** 8693 * Copyright 2013-present, Facebook, Inc. 8694 * All rights reserved. 8695 * 8696 * This source code is licensed under the BSD-style license found in the 8697 * LICENSE file in the root directory of this source tree. An additional grant 8698 * of patent rights can be found in the PATENTS file in the same directory. 8699 * 8700 */ 8701 8702 8703 8704var ExecutionEnvironment = __webpack_require__(6); 8705 8706var contentKey = null; 8707 8708/** 8709 * Gets the key used to access text content on a DOM node. 8710 * 8711 * @return {?string} Key used to access text content. 8712 * @internal 8713 */ 8714function getTextContentAccessor() { 8715 if (!contentKey && ExecutionEnvironment.canUseDOM) { 8716 // Prefer textContent to innerText because many browsers support both but 8717 // SVG <text> elements don't support innerText even when <div> does. 8718 contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText'; 8719 } 8720 return contentKey; 8721} 8722 8723module.exports = getTextContentAccessor; 8724 8725/***/ }), 8726/* 73 */ 8727/***/ (function(module, exports, __webpack_require__) { 8728 8729"use strict"; 8730/* WEBPACK VAR INJECTION */(function(process) {/** 8731 * Copyright 2013-present, Facebook, Inc. 8732 * All rights reserved. 8733 * 8734 * This source code is licensed under the BSD-style license found in the 8735 * LICENSE file in the root directory of this source tree. An additional grant 8736 * of patent rights can be found in the PATENTS file in the same directory. 8737 * 8738 */ 8739 8740 8741 8742var _prodInvariant = __webpack_require__(3), 8743 _assign = __webpack_require__(4); 8744 8745var ReactCompositeComponent = __webpack_require__(117); 8746var ReactEmptyComponent = __webpack_require__(61); 8747var ReactHostComponent = __webpack_require__(63); 8748 8749var getNextDebugID = __webpack_require__(185); 8750var invariant = __webpack_require__(1); 8751var warning = __webpack_require__(2); 8752 8753// To avoid a cyclic dependency, we create the final class in this module 8754var ReactCompositeComponentWrapper = function (element) { 8755 this.construct(element); 8756}; 8757 8758function getDeclarationErrorAddendum(owner) { 8759 if (owner) { 8760 var name = owner.getName(); 8761 if (name) { 8762 return ' Check the render method of `' + name + '`.'; 8763 } 8764 } 8765 return ''; 8766} 8767 8768/** 8769 * Check if the type reference is a known internal type. I.e. not a user 8770 * provided composite type. 8771 * 8772 * @param {function} type 8773 * @return {boolean} Returns true if this is a valid internal type. 8774 */ 8775function isInternalComponentType(type) { 8776 return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function'; 8777} 8778 8779/** 8780 * Given a ReactNode, create an instance that will actually be mounted. 8781 * 8782 * @param {ReactNode} node 8783 * @param {boolean} shouldHaveDebugID 8784 * @return {object} A new instance of the element's constructor. 8785 * @protected 8786 */ 8787function instantiateReactComponent(node, shouldHaveDebugID) { 8788 var instance; 8789 8790 if (node === null || node === false) { 8791 instance = ReactEmptyComponent.create(instantiateReactComponent); 8792 } else if (typeof node === 'object') { 8793 var element = node; 8794 var type = element.type; 8795 if (typeof type !== 'function' && typeof type !== 'string') { 8796 var info = ''; 8797 if (process.env.NODE_ENV !== 'production') { 8798 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { 8799 info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.'; 8800 } 8801 } 8802 info += getDeclarationErrorAddendum(element._owner); 8803 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invali
8803d: 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; 8804 } 8805 8806 // Special case string values 8807 if (typeof element.type === 'string') { 8808 instance = ReactHostComponent.createInternalComponent(element); 8809 } else if (isInternalComponentType(element.type)) { 8810 // This is temporarily available for custom components that are not string 8811 // representations. I.e. ART. Once those are updated to use the string 8812 // representation, we can drop this code path. 8813 instance = new element.type(element); 8814 8815 // We renamed this. Allow the old name for compat. :( 8816 if (!instance.getHostNode) { 8817 instance.getHostNode = instance.getNativeNode; 8818 } 8819 } else { 8820 instance = new ReactCompositeComponentWrapper(element); 8821 } 8822 } else if (typeof node === 'string' || typeof node === 'number') { 8823 instance = ReactHostComponent.createInstanceForText(node); 8824 } else { 8825 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0; 8826 } 8827 8828 if (process.env.NODE_ENV !== 'production') { 8829 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; 8830 } 8831 8832 // These two fields are used by the DOM and ART diffing algorithms 8833 // respectively. Instead of using expandos on components, we should be 8834 // storing the state needed by the diffing algorithms elsewhere. 8835 instance._mountIndex = 0; 8836 instance._mountImage = null; 8837 8838 if (process.env.NODE_ENV !== 'production') { 8839 instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0; 8840 } 8841 8842 // Internal instances should fully constructed at this point, so they should 8843 // not get any new fields added to them at this point. 8844 if (process.env.NODE_ENV !== 'production') { 8845 if (Object.preventExtensions) { 8846 Object.preventExtensions(instance); 8847 } 8848 } 8849 8850 return instance; 8851} 8852 8853_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, { 8854 _instantiateReactComponent: instantiateReactComponent 8855}); 8856 8857module.exports = instantiateReactComponent; 8858/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 8859 8860/***/ }), 8861/* 74 */ 8862/***/ (function(module, exports, __webpack_require__) { 8863 8864"use strict"; 8865/** 8866 * Copyright 2013-present, Facebook, Inc. 8867 * All rights reserved. 8868 * 8869 * This source code is licensed under the BSD-style license found in the 8870 * LICENSE file in the root directory of this source tree. An additional grant 8871 * of patent rights can be found in the PATENTS file in the same directory. 8872 * 8873 * 8874 */ 8875 8876 8877 8878/** 8879 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary 8880 */ 8881 8882var supportedInputTypes = { 8883 'color': true, 8884 'date': true, 8885 'datetime': true, 8886 'datetime-local': true, 8887 'email': true, 8888 'month': true, 8889 'number': true, 8890 'password': true, 8891 'range': true, 8892 'search': true, 8893 'tel': true, 8894 'text': true, 8895 'time': true, 8896 'url': true, 8897 'week': true 8898}; 8899 8900function isTextInputElement(elem) { 8901 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); 8902 8903 if (nodeName === 'input') { 8904 return !!supportedInputTypes[elem.type]; 8905 } 8906 8907 if (nodeName === 'textarea') { 8908 return true; 8909 } 8910 8911 return false; 8912} 8913 8914module.exports = isTextInputElement; 8915 8916/***/ }), 8917/* 75 */ 8918/***/ (function(module, exports, __webpack_require__) { 8919 8920"use strict"; 8921/** 8922 * Copyright 2013-present, Facebook, Inc. 8923 * All rights reserved. 8924 * 8925 * This source code is licensed under the BSD-style license found in the 8926 * LICENSE file in the root directory of this source tree. An additional grant 8927 * of patent rights can be found in the PATENTS file in the same directory. 8928 * 8929 */ 8930 8931 8932 8933var ExecutionEnvironment = __webpack_require__(6); 8934var escapeTextContentForBrowser = __webpack_require__(30); 8935var setInnerHTML = __webpack_require__(31); 8936 8937/** 8938 * Set the textContent property of a node, ensuring that whitespace is preserved 8939 * even in IE8. innerText is a poor substitute for textContent and, among many 8940 * issues, inserts <br> instead of the literal newline chars. innerHTML behaves 8941 * as it should. 8942 * 8943 * @param {DOMElement} node 8944 * @param {string} text 8945 * @internal 8946 */ 8947var setTextContent = function (node, text) { 8948 if (text) { 8949 var firstChild = node.firstChild; 8950
8951 if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) { 8952 firstChild.nodeValue = text; 8953 return; 8954 } 8955 } 8956 node.textContent = text; 8957}; 8958 8959if (ExecutionEnvironment.canUseDOM) { 8960 if (!('textContent' in document.documentElement)) { 8961 setTextContent = function (node, text) { 8962 if (node.nodeType === 3) { 8963 node.nodeValue = text; 8964 return; 8965 } 8966 setInnerHTML(node, escapeTextContentForBrowser(text)); 8967 }; 8968 } 8969} 8970 8971module.exports = setTextContent; 8972 8973/***/ }), 8974/* 76 */ 8975/***/ (function(module, exports, __webpack_require__) { 8976 8977"use strict"; 8978/* WEBPACK VAR INJECTION */(function(process) {/** 8979 * Copyright 2013-present, Facebook, Inc. 8980 * All rights reserved. 8981 * 8982 * This source code is licensed under the BSD-style license found in the 8983 * LICENSE file in the root directory of this source tree. An additional grant 8984 * of patent rights can be found in the PATENTS file in the same directory. 8985 * 8986 */ 8987 8988 8989 8990var _prodInvariant = __webpack_require__(3); 8991 8992var ReactCurrentOwner = __webpack_require__(11); 8993var REACT_ELEMENT_TYPE = __webpack_require__(136); 8994 8995var getIteratorFn = __webpack_require__(170); 8996var invariant = __webpack_require__(1); 8997var KeyEscapeUtils = __webpack_require__(37); 8998var warning = __webpack_require__(2); 8999 9000var SEPARATOR = '.'; 9001var SUBSEPARATOR = ':'; 9002 9003/** 9004 * This is inlined from ReactElement since this file is shared between 9005 * isomorphic and renderers. We could extract this to a 9006 * 9007 */ 9008 9009/** 9010 * TODO: Test that a single child and an array with one item have the same key 9011 * pattern. 9012 */ 9013 9014var didWarnAboutMaps = false; 9015 9016/** 9017 * Generate a key string that identifies a component within a set. 9018 * 9019 * @param {*} component A component that could contain a manual key. 9020 * @param {number} index Index that is used if a manual key is not provided. 9021 * @return {string} 9022 */ 9023function getComponentKey(component, index) { 9024 // Do some typechecking here since we call this blindly. We want to ensure 9025 // that we don't block potential future ES APIs. 9026 if (component && typeof component === 'object' && component.key != null) { 9027 // Explicit key 9028 return KeyEscapeUtils.escape(component.key); 9029 } 9030 // Implicit key determined by the index in the set 9031 return index.toString(36); 9032} 9033 9034/** 9035 * @param {?*} children Children tree container. 9036 * @param {!string} nameSoFar Name of the key path so far. 9037 * @param {!function} callback Callback to invoke with each child found. 9038 * @param {?*} traverseContext Used to pass information throughout the traversal 9039 * process. 9040 * @return {!number} The number of children in this subtree. 9041 */ 9042function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { 9043 var type = typeof children; 9044 9045 if (type === 'undefined' || type === 'boolean') { 9046 // All of the above are perceived as null. 9047 children = null; 9048 } 9049 9050 if (children === null || type === 'string' || type === 'number' || 9051 // The following is inlined from ReactElement. This means we can optimize 9052 // some checks. React Fiber also inlines this logic for similar purposes. 9053 type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { 9054 callback(traverseContext, children, 9055 // If it's the only child, treat the name as if it was wrapped in an array 9056 // so that it's consistent if the number of children grows. 9057 nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); 9058 return 1; 9059 } 9060 9061 var child; 9062 var nextName; 9063 var subtreeCount = 0; // Count of children found in the current subtree.
9064 var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; 9065 9066 if (Array.isArray(children)) { 9067 for (var i = 0; i < children.length; i++) { 9068 child = children[i]; 9069 nextName = nextNamePrefix + getComponentKey(child, i); 9070 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); 9071 } 9072 } else { 9073 var iteratorFn = getIteratorFn(children); 9074 if (iteratorFn) { 9075 var iterator = iteratorFn.call(children); 9076 var step; 9077 if (iteratorFn !== children.entries) { 9078 var ii = 0; 9079 while (!(step = iterator.next()).done) { 9080 child = step.value; 9081 nextName = nextNamePrefix + getComponentKey(child, ii++); 9082 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); 9083 } 9084 } else { 9085 if (process.env.NODE_ENV !== 'production') { 9086 var mapsAsChildrenAddendum = ''; 9087 if (ReactCurrentOwner.current) { 9088 var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); 9089 if (mapsAsChildrenOwnerName) { 9090 mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; 9091 } 9092 } 9093 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; 9094 didWarnAboutMaps = true; 9095 } 9096 // Iterator will provide entry [k,v] tuples rather than values. 9097 while (!(step = iterator.next()).done) { 9098 var entry = step.value; 9099 if (entry) { 9100 child = entry[1]; 9101 nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); 9102 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); 9103 } 9104 } 9105 } 9106 } else if (type === 'object') { 9107 var addendum = ''; 9108 if (process.env.NODE_ENV !== 'production') { 9109 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.'; 9110 if (children._isReactElement) { 9111 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.'; 9112 } 9113 if (ReactCurrentOwner.current) { 9114 var name = ReactCurrentOwner.current.getName(); 9115 if (name) { 9116 addendum += ' Check the render method of `' + name + '`.'; 9117 } 9118 } 9119 } 9120 var childrenString = String(children); 9121 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; 9122 } 9123 } 9124 9125 return subtreeCount; 9126} 9127 9128/** 9129 * Traverses children that are typically specified as `props.children`, but 9130 * might also be specified through attributes: 9131 * 9132 * - `traverseAllChildren(this.props.children, ...)` 9133 * - `traverseAllChildren(this.props.leftPanelChildren, ...)` 9134 * 9135 * The `traverseContext` is an optional argument that is passed through the 9136 * entire traversal. It can be used to store accumulations or anything else that 9137 * the callback might find relevant. 9138 * 9139 * @param {?*} children Children tree object. 9140 * @param {!function} callback To invoke upon traversing each child. 9141 * @param {?*} traverseContext Context for traversal. 9142 * @return {!number} The number of children in this subtree. 9143 */ 9144function traverseAllChildren(children, callback, traverseContext) { 9145 if (children == null) { 9146 return 0; 9147 } 9148 9149 return traverseAllChildrenImpl(children, '', callback, traverseContext); 9150} 9151 9152module.exports = traverseAllChildren; 9153/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 9154 9155/***/ }), 9156/* 77 */ 9157/***/ (function(module, exports, __webpack_require__) { 9158 9159"use strict"; 9160/** 9161 * Copyright 2014-present, Facebook, Inc. 9162 * All rights reserved. 9163 * 9164 * This source code is licensed under the BSD-style license found in the 9165 * LICENSE file in the root directory of this source tree. An additional grant 9166 * of patent rights can be found in the PATENTS file in the same directory. 9167 * 9168 * 9169 */ 9170 9171 9172 9173// The Symbol used to tag the ReactElement type. If there is no native Symbol 9174// nor polyfill, then a plain number is used for performance. 9175 9176var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; 9177 9178module.exports = REACT_ELEMENT_TYPE; 9179 9180/***/ }), 9181/* 78 */ 9182/***/ (function(module, exports, __webpack_require__) { 9183 9184"use strict"; 9185/* WEBPACK VAR INJECTION */(function(process) {/** 9186 * Copyright 2014-present, Facebook, Inc. 9187 * All rights reserved. 9188 * 9189 * This source code is licensed under the BSD-style license found in the 9190 * LICENSE file in the root directory of this source tree. An additional grant 9191 * of patent rights can be found in the PATENTS file in the same directory. 9192 * 9193 */ 9194 9195/** 9196 * ReactElementValidator provides a wrapper around a element factory 9197 * which validates the props passed to the element. This is intended to be 9198 * used only in DEV and could be replaced by a static type checker for languages 9199 * that support it. 9200 */ 9201 9202 9203 9204var ReactCurrentOwner = __webpack_require__(11); 9205var ReactComponentTreeHook = __webpack_require__(7); 9206var ReactElement = __webpack_require__(15); 9207 9208var checkReactTypeSpec = __webpack_require__(184); 9209 9210var canDefineProperty = __webpack_require__(32); 9211var getIteratorFn = __webpack_require__(80); 9212var warning = __webpack_require__(2); 9213 9214function getDeclarationErrorAddendum() { 9215 if (ReactCurrentOwner.current) { 9216 var name = ReactCurrentOwner.current.getName(); 9217 if (name) { 9218 return ' Check the render method of `' + name + '`.'; 9219 } 9220 } 9221 return ''; 9222} 9223 9224function getSourceInfoErrorAddendum(elementProps) { 9225 if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) { 9226 var source = elementProps.__source; 9227 var fileName = source.fileName.replace(/^.*[\\\/]/, ''); 9228 var lineNumber = source.lineNumber; 9229 return ' Check your code at ' + fileName + ':' + lineNumber + '.'; 9230 } 9231 return ''; 9232} 9233 9234/** 9235 * Warn if there's no key explicitly set on dynamic arrays of children or 9236 * object keys are not valid. This allows us to keep track of children between 9237 * updates. 9238 */ 9239var ownerHasKeyUseWarning = {}; 9240
9241function getCurrentComponentErrorInfo(parentType) { 9242 var info = getDeclarationErrorAddendum(); 9243 9244 if (!info) { 9245 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; 9246 if (parentName) { 9247 info = ' Check the top-level render call using <' + parentName + '>.'; 9248 } 9249 } 9250 return info; 9251} 9252 9253/** 9254 * Warn if the element doesn't have an explicit key assigned to it. 9255 * This element is in an array. The array could grow and shrink or be 9256 * reordered. All children that haven't already been validated are required to 9257 * have a "key" property assigned to it. Error statuses are cached so a warning 9258 * will only be shown once. 9259 * 9260 * @internal 9261 * @param {ReactElement} element Element that requires a key. 9262 * @param {*} parentType element's parent's type. 9263 */ 9264function validateExplicitKey(element, parentType) { 9265 if (!element._store || element._store.validated || element.key != null) { 9266 return; 9267 } 9268 element._store.validated = true; 9269 9270 var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {}); 9271 9272 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); 9273 if (memoizer[currentComponentErrorInfo]) { 9274 return; 9275 } 9276 memoizer[currentComponentErrorInfo] = true; 9277 9278 // Usually the current owner is the offender, but if it accepts children as a 9279 // property, it may be the creator of the child that's responsible for 9280 // assigning it a key. 9281 var childOwner = ''; 9282 if (element && element._owner && element._owner !== ReactCurrentOwner.current) { 9283 // Give the component that originally created this child. 9284 childOwner = ' It was passed a child from ' + element._owner.getName() + '.'; 9285 } 9286 9287 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; 9288} 9289 9290/** 9291 * Ensure that every element either is passed in a static location, in an 9292 * array with an explicit keys property defined, or in an object literal 9293 * with valid key property. 9294 * 9295 * @internal 9296 * @param {ReactNode} node Statically passed child of any type. 9297 * @param {*} parentType node's parent's type. 9298 */ 9299function validateChildKeys(node, parentType) { 9300 if (typeof node !== 'object') { 9301 return; 9302 } 9303 if (Array.isArray(node)) { 9304 for (var i = 0; i < node.length; i++) { 9305 var child = node[i]; 9306 if (ReactElement.isValidElement(child)) { 9307 validateExplicitKey(child, parentType); 9308 } 9309 } 9310 } else if (ReactElement.isValidElement(node)) { 9311 // This element was passed in a valid location. 9312 if (node._store) { 9313 node._store.validated = true; 9314 } 9315 } else if (node) { 9316 var iteratorFn = getIteratorFn(node); 9317 // Entry iterators provide implicit keys. 9318 if (iteratorFn) { 9319 if (iteratorFn !== node.entries) { 9320 var iterator = iteratorFn.call(node); 9321 var step; 9322 while (!(step = iterator.next()).done) { 9323 if (ReactElement.isValidElement(step.value)) { 9324 validateExplicitKey(step.value, parentType); 9325 } 9326 } 9327 } 9328 } 9329 } 9330} 9331 9332/** 9333 * Given an element, validate that its props follow the propTypes definition, 9334 * provided by the type. 9335 * 9336 * @param {ReactElement} element 9337 */ 9338function validatePropTypes(element) { 9339 var componentClass = element.type; 9340 if (typeof componentClass !== 'function') { 9341 return; 9342 } 9343 var name = componentClass.displayName || componentClass.name; 9344 if (componentClass.propTypes) { 9345 checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null); 9346 } 9347 if (typeof componentClass.getDefaultProps === 'function') { 9348 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; 9349 } 9350} 9351 9352var ReactElementValidator = { 9353 9354 createElement: function (type, props, children) {
9355 var validType = typeof type === 'string' || typeof type === 'function'; 9356 // We warn in this case but don't throw. We expect the element creation to 9357 // succeed and there will likely be errors in render. 9358 if (!validType) { 9359 if (typeof type !== 'function' && typeof type !== 'string') { 9360 var info = ''; 9361 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { 9362 info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.'; 9363 } 9364 9365 var sourceInfo = getSourceInfoErrorAddendum(props); 9366 if (sourceInfo) { 9367 info += sourceInfo; 9368 } else { 9369 info += getDeclarationErrorAddendum(); 9370 } 9371 9372 info += ReactComponentTreeHook.getCurrentStackAddendum(); 9373 9374 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; 9375 } 9376 } 9377 9378 var element = ReactElement.createElement.apply(this, arguments); 9379 9380 // The result can be nullish if a mock or a custom function is used. 9381 // TODO: Drop this when these are no longer allowed as the type argument. 9382 if (element == null) { 9383 return element; 9384 } 9385 9386 // Skip key warning if the type isn't valid since our key validation logic 9387 // doesn't expect a non-string/function type and can throw confusing errors. 9388 // We don't want exception behavior to differ between dev and prod. 9389 // (Rendering will throw with a helpful message and as soon as the type is 9390 // fixed, the key warnings will appear.) 9391 if (validType) { 9392 for (var i = 2; i < arguments.length; i++) { 9393 validateChildKeys(arguments[i], type); 9394 } 9395 } 9396 9397 validatePropTypes(element); 9398 9399 return element; 9400 }, 9401 9402 createFactory: function (type) { 9403 var validatedFactory = ReactElementValidator.createElement.bind(null, type); 9404 // Legacy hook TODO: Warn if this is accessed 9405 validatedFactory.type = type; 9406 9407 if (process.env.NODE_ENV !== 'production') { 9408 if (canDefineProperty) { 9409 Object.defineProperty(validatedFactory, 'type', { 9410 enumerable: false, 9411 get: function () { 9412 process.env.NODE_ENV !== 'production' ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : void 0; 9413 Object.defineProperty(this, 'type', { 9414 value: type 9415 }); 9416 return type; 9417 } 9418 }); 9419 } 9420 } 9421 9422 return validatedFactory; 9423 }, 9424 9425 cloneElement: function (element, props, children) { 9426 var newElement = ReactElement.cloneElement.apply(this, arguments); 9427 for (var i = 2; i < arguments.length; i++) { 9428 validateChildKeys(arguments[i], newElement.type); 9429 } 9430 validatePropTypes(newElement); 9431 return newElement; 9432 } 9433 9434}; 9435 9436module.exports = ReactElementValidator; 9437/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 9438 9439/***/ }), 9440/* 79 */ 9441/***/ (function(module, exports, __webpack_require__) { 9442 9443"use strict"; 9444/* WEBPACK VAR INJECTION */(function(process) {/** 9445 * Copyright 2013-present, Facebook, Inc. 9446 * All rights reserved. 9447 * 9448 * This source code is licensed under the BSD-style license found in the 9449 * LICENSE file in the root directory of this source tree. An additional grant 9450 * of patent rights can be found in the PATENTS file in the same directory. 9451 * 9452 * 9453 */ 9454 9455 9456 9457var ReactPropTypeLocationNames = {}; 9458 9459if (process.env.NODE_ENV !== 'production') { 9460 ReactPropTypeLocationNames = { 9461 prop: 'prop', 9462 context: 'context', 9463 childContext: 'child context' 9464 }; 9465} 9466 9467module.exports = ReactPropTypeLocationNames; 9468/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 9469 9470/***/ }), 9471/* 80 */ 9472/***/ (function(module, exports, __webpack_require__) { 9473 9474"use strict"; 9475/** 9476 * Copyright 2013-present, Facebook, Inc. 9477 * All rights reserved. 9478 * 9479 * This source code is licensed under the BSD-style license found in the 9480 * LICENSE file in the root directory of this source tree. An additional grant 9481 * of patent rights can be found in the PATENTS file in the same directory. 9482 * 9483 * 9484 */ 9485 9486 9487 9488/* global Symbol */ 9489 9490var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; 9491var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. 9492 9493/** 9494 * Returns the iterator method function contained on the iterable object. 9495 * 9496 * Be sure to invoke the function with the iterable as context: 9497 * 9498 * var iteratorFn = getIteratorFn(myIterable); 9499 * if (iteratorFn) { 9500 * var iterator = iteratorFn.call(myIterable); 9501 * ... 9502 * } 9503 * 9504 * @param {?object} maybeIterable 9505 * @return {?function} 9506 */ 9507function getIteratorFn(maybeIterable) { 9508 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); 9509 if (typeof iteratorFn === 'function') { 9510 return iteratorFn; 9511 } 9512} 9513 9514module.exports = getIteratorFn; 9515 9516/***/ }), 9517/* 81 */ 9518/***/ (function(module, exports, __webpack_require__) { 9519 9520"use strict"; 9521 9522 9523Object.defineProperty(exports, "__esModule", { 9524 value: true 9525}); 9526 9527var _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; }; }(); 9528 9529var _react = __webpack_require__(25); 9530 9531var _react2 = _interopRequireDefault(_react); 9532 9533__webpack_require__(188); 9534 9535var _ProjectContainer = __webpack_require__(84); 9536 9537var _ProjectContainer2 = _interopRequireDefault(_ProjectContainer); 9538 9539function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 9540 9541function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 9542 9543function _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; } 9544 9545function _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, { c
9545onstructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } 9546 9547var App = function (_Component) { 9548 _inherits(App, _Component); 9549 9550 function App() { 9551 _classCallCheck(this, App); 9552 9553 return _possibleConstructorReturn(this, (App.__proto__ || Object.getPrototypeOf(App)).apply(this, arguments)); 9554 } 9555 9556 _createClass(App, [{ 9557 key: 'render', 9558 value: function render() { 9559 return _react2.default.createElement(_ProjectContainer2.default, null); 9560 } 9561 }]); 9562 9563 return App; 9564}(_react.Component); 9565 9566exports.default = App; 9567 9568/***/ }), 9569/* 82 */ 9570/***/ (function(module, exports, __webpack_require__) { 9571 9572"use strict"; 9573 9574 9575module.exports = __webpack_require__(118); 9576 9577 9578/***/ }), 9579/* 83 */ 9580/***/ (function(module, exports, __webpack_require__) { 9581 9582"use strict"; 9583 9584 9585Object.defineProperty(exports, "__esModule", { 9586 value: true 9587}); 9588 9589var _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; }; }(); 9590 9591var _react = __webpack_require__(25); 9592 9593var _react2 = _interopRequireDefault(_react); 9594 9595function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 9596 9597function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 9598 9599function _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; } 9600 9601function _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; } 9602 9603var Project = function (_Component) { 9604 _inherits(Project, _Component); 9605 9606 function Project() { 9607 _classCallCheck(this, Project); 9608 9609 return _possibleConstructorReturn(this, (Project.__proto__ || Object.getPrototypeOf(Project)).apply(this, arguments)); 9610 } 9611 9612 _createClass(Project, [{ 9613 key: "render", 9614 value: function render() { 9615 return _react2.default.createElement( 9616 "div", 9617 { 9618 className: "project project-tile project-stack" + (this.props.index % 3 === 2 ? " last-in-row" : "") }, 9619 _react2.default.createElement(ProjectName, { name: this.props.repo.name, url: this.props.repo.url }), 9620 _react2.default.createElement(ProjectData, { repo: this.props.repo }), 9621 this.props.repo.homepage && _react2.default.createElement(ProjectPage, { homepage: this.props.repo.homepage }) 9622 ); 9623 } 9624 }]); 9625 9626 return Project; 9627}(_react.Component); 9628 9629var ProjectName = function (_Component2) { 9630 _inherits(ProjectName, _Component2); 9631 9632 function ProjectName() { 9633 _classCallCheck(this, ProjectName); 9634 9635 return _possibleConstructorReturn(this, (ProjectName.__proto__ || Object.getPrototypeOf(ProjectName)).apply(this, arguments)); 9636 } 9637 9638 _createClass(ProjectName, [{ 9639 key: "render", 9640 value: function render() { 9641 return _react2.default.createElement( 9642 "div", 9643 { className: "project-item header-link" }, 9644 _react2.default.createElement( 9645 "h5", 9646 null, 9647 _react2.default.createElement( 9648 "a", 9649 { href: this.props.url, target: "_blank" }, 9650 this.props.name 9651 ) 9652 ) 9653 ); 9654 } 9655 }]); 9656 9657 return ProjectName; 9658}(_react.Component); 9659 9660var ProjectData = function (_Component3) { 9661 _inherits(ProjectData, _Component3); 9662 9663 function ProjectData() { 9664 _classCallCheck(this, ProjectData); 9665 9666 return _possibleConstructorReturn(this, (ProjectData.__proto__ || Object.getPrototypeOf(ProjectData)).apply(this, arguments)); 9667 } 9668 9669 _createClass(ProjectData, [{ 9670 key: "render", 9671 value: function render() { 9672 return _react2.default.createElement( 9673 "div", 9674 { className: "project-item" }, 9675 _react2.default.createElement( 9676 "div", 9677 { className: "repo-info" }, 9678 _react2.default.createElement( 9679 "span", 9680 null, 9681 _react2.default.createElement("i", { className: "octicon octicon-star" }), 9682 this.props.repo.stargazers 9683 ), 9684 _react2.default.createElement( 9685 "span", 9686 null, 9687 _react2.default.createElement("i", { className: "octicon octicon-repo-forked" }), 9688 this.props.repo.forks 9689 ), 9690 _react2.default.createElement( 9691 "span", 9692 { className: "language " + this.props.repo.language }, 9693 this.props.repo.language 9694 ) 9695 ), 9696 _react2.default.createElement( 9697 "p", 9698 null, 9699 this.props.repo.description 9700 ) 9701 ); 9702 } 9703 }]); 9704 9705 return ProjectData; 9706}(_react.Component); 9707 9708var ProjectPage = function (_Component4) { 9709 _inherits(ProjectPage, _Component4); 9710 9711 function ProjectPage() { 9712 _classCallCheck(this, ProjectPage); 9713 9714 return _possibleConstructorReturn(this, (ProjectPage.__proto__ || Object.getPrototypeOf(ProjectPage)).apply(this, arguments)); 9715 } 9716 9717 _createClass(ProjectPage, [{ 9718 key: "render", 9719 value: function render() { 9720 return _react2.default.createElement( 9721 "div", 9722 { className: "project-item bottom-links" }, 9723 _react2.default.createElement( 9724 "a", 9725 { href: this.props.homepage, target: "_blank" }, 9726 _react2.default.createElement("i", { className: "octicon octicon-browser" }), 9727 _react2.default.createElement( 9728 "span", 9729 null, 9730 "Go to" 9731 ) 9732 ) 9733 ); 9734 } 9735 }]); 9736 9737 return ProjectPage; 9738}(_react.Component); 9739 9740exports.default = Project; 9741 9742/***/ }), 9743/* 84 */ 9744/***/ (function(module, exports, __webpack_require__) { 9745 9746"use strict"; 9747 9748 9749Object.defineProperty(exports, "__esModule", { 9750 value: true 9751}); 9752 9753var _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; }; }(); 9754 9755var _react = __webpack_require__(25); 9756 9757var _react2 = _interopRequireDefault(_react); 9758 9759var _isomorphicFetch = __webpack_require__(102); 9760 9761var _isomorphicFetch2 = _interopRequireDefault(_isomorphicFetch); 9762 9763var _Project = __webpack_require__(83); 9764 9765var _Project2 = _interopRequireDefault(_Project); 9766 9767function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 9768 9769function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 9770 9771function _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; } 9772 9773function _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, { c
9773onstructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } 9774 9775var ProjectContainer = function (_Component) { 9776 _inherits(ProjectContainer, _Component); 9777 9778 function ProjectContainer(props) { 9779 _classCallCheck(this, ProjectContainer); 9780 9781 var _this = _possibleConstructorReturn(this, (ProjectContainer.__proto__ || Object.getPrototypeOf(ProjectContainer)).call(this, props)); 9782 9783 _this.state = { repos: [], hasError: false }; 9784 return _this; 9785 } 9786 9787 _createClass(ProjectContainer, [{ 9788 key: 'componentDidMount', 9789 value: function componentDidMount() { 9790 var _this2 = this; 9791 9792 (0, _isomorphicFetch2.default)("https://api.github.com/users/adorow/repos").then(function (response) { 9793 if (response.status >= 400) { 9794 throw new Error("Bad response from server"); 9795 } 9796 return response.json(); 9797 }).then(function (jsonResponse) { 9798 return jsonResponse.map(function (ghRepo) { 9799 return { 9800 name: ghRepo.name, 9801 url: ghRepo.html_url, 9802 description: ghRepo.description, 9803 homepage: ghRepo.homepage, 9804 language: ghRepo.language, 9805 forks: ghRepo.forks_count, 9806 stargazers: ghRepo.stargazers_count, 9807 watchers: ghRepo.watchers_count, 9808 score: ghRepo.stargazers_count + ghRepo.forks_count 9809 }; 9810 }); 9811 }).then(function (repos) { 9812 return repos.sort(function (a, b) { 9813 return b.score - a.score; 9814 }); 9815 }).then(function (repos) { 9816 return _this2.setState({ repos: repos }); 9817 }).catch(function (error) { 9818 console.log(error); 9819 _this2.setState({ hasError: true }); 9820 }); 9821 } 9822 }, { 9823 key: 'render', 9824 value: function render() { 9825 if (this.state.hasError) { 9826 return _react2.default.createElement(FetchError, null); 9827 } 9828 9829 if (this.state.repos.length === 0) { 9830 return _react2.default.createElement(LoadingImage, null); 9831 } 9832 9833 return _react2.default.createElement( 9834 'div', 9835 null, 9836 this.state.repos.map(function (repo, i) { 9837 return _react2.default.createElement(_Project2.default, { key: repo.name, repo: repo, index: i }); 9838 }) 9839 ); 9840 } 9841 }]); 9842 9843 return ProjectContainer; 9844}(_react.Component); 9845 9846var FetchError = function (_Component2) { 9847 _inherits(FetchError, _Component2); 9848 9849 function FetchError() { 9850 _classCallCheck(this, FetchError); 9851 9852 return _possibleConstructorReturn(this, (FetchError.__proto__ || Object.getPrototypeOf(FetchError)).apply(this, arguments)); 9853 } 9854 9855 _createClass(FetchError, [{ 9856 key: 'render', 9857 value: function render() { 9858 return _react2.default.createElement( 9859 'div', 9860 null, 9861 _react2.default.createElement( 9862 'div', 9863 { id: 'projects-error-wrapper', className: 'wrapper-error-content' }, 9864 _react2.default.createElement( 9865 'div', 9866 { id: 'error-box', role: 'main', className: 'page-error-content' }, 9867 _react2.default.createElement( 9868 'p', 9869 null, 9870 _react2.default.createElement( 9871 'span', 9872 null, 9873 'There was an error retrieving the projects from GitHub, try again later.' 9874 ), 9875 _react2.default.createElement('br', null), 9876 _react2.default.createElement( 9877 'span', 9878 null, 9879 'If the errors persist, I would appreciate if you contact me about it in the links in the footer.' 9880 ) 9881 ) 9882 ) 9883 ) 9884 ); 9885 } 9886 }]); 9887 9888 return FetchError; 9889}(_react.Component); 9890 9891var LoadingImage = function (_Component3) { 9892 _inherits(LoadingImage, _Component3); 9893 9894 function LoadingImage() { 9895 _classCallCheck(this, LoadingImage); 9896 9897 return _possibleConstructorReturn(this, (LoadingImage.__proto__ || Object.getPrototypeOf(LoadingImage)).apply(this, arguments)); 9898 } 9899 9900 _createClass(LoadingImage, [{ 9901 key: 'render', 9902 value: function render() { 9903 return _react2.default.createElement('div', { className: 'loading loading-projects' }); 9904 } 9905 }]); 9906 9907 return LoadingImage; 9908}(_react.Component); 9909 9910exports.default = ProjectContainer; 9911 9912/***/ }), 9913/* 85 */ 9914/***/ (function(module, exports, __webpack_require__) { 9915 9916"use strict"; 9917 9918 9919var _react = __webpack_require__(25); 9920 9921var _react2 = _interopRequireDefault(_react); 9922 9923var _reactDom = __webpack_require__(82); 9924 9925var _reactDom2 = _interopRequireDefault(_reactDom); 9926 9927var _App = __webpack_require__(81); 9928 9929var _App2 = _interopRequireDefault(_App); 9930 9931function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 9932 9933_reactDom2.default.render(_react2.default.createElement(_App2.default, null), document.getElementById('projects-root')); 9934 9935/***/ }), 9936/* 86 */ 9937/***/ (function(module, exports, __webpack_require__) { 9938 9939exports = module.exports = __webpack_require__(87)(undefined); 9940// imports 9941 9942 9943// module 9944exports.push([module.i, ".projects {\n overflow: auto; }\n\n.project-tile {\n cursor: pointer;\n float: left;\n font-size: 12px;\n margin-bottom: 24px;\n margin-right: 15px;\n position: relative;\n height: 200px;\n width: 230px;\n border: 1px solid #ccc;\n border-radius: 4px; }\n\n.projects h5 {\n margin: 0; }\n\n.project-tile.last-in-row {\n margin-right: 0px; }\n\n.project-stack {\n padding: 0; }\n\n.project-stack > .project-item:first-child {\n border-top: none; }\n\n.project-stack > .project-item {\n padding: 14px 11px 11px;\n border-top: 1px solid #ccc; }\n\n.project .repo-info {\n color: #ccc;\n font-size: 12px;\n margin-bottom: 10px; }\n\n.project .repo-info span {\n margin-right: 20px; }\n\n.project .repo-info .language {\n color: #999;\n font-weight: bold; }\n\n.project .repo-info .Groovy {\n color: #228222; }\n\n.project .repo-info .Python {\n color: #da6200; }\n\n.project .repo-info .Haskell {\n color: #000; }\n\n.project .repo-info .Java {\n color: #1b55d2; }\n\n.project .repo-info .Ruby {\n color: #d21221; }\n\n.repo-info .octicon {\n font-size: 12px; }\n\n.repo-info .octicon.octicon-star {\n font-size: 14px; }\n\n.project .bottom-links .octicon {\n margin-right: 6px; }\n\n.project .bottom-links .octicon-browser {\n font-size: 12px; }\n\n.project .bottom-links {\n color: #4183C4; }\n\n.project .bottom-links {\n border-bottom-left-radius: 2px;\n border-bottom-right-radius: 2px;\n width: 100%;\n position: absolute;\n bottom: 0; }\n\n.project .header-link:hover, .bottom-links:hover {\n background: #eee; }\n\n.project .bottom-links a {\n font-size: 12px;\n font-weight: bold; }\n", ""]); 9945
vendor: 4,754 bytes, lines 9946-10137
9946// exports 9947 9948 9949/***/ }), 9950/* 87 */ 9951/***/ (function(module, exports) { 9952 9953/* 9954 MIT License http://www.opensource.org/licenses/mit-license.php 9955 Author Tobias Koppers @sokra 9956*/ 9957// css base code, injected by the css-loader 9958module.exports = function(useSourceMap) { 9959 var list = []; 9960 9961 // return the list of modules as css string 9962 list.toString = function toString() { 9963 return this.map(function (item) { 9964 var content = cssWithMappingToString(item, useSourceMap); 9965 if(item[2]) { 9966 return "@media " + item[2] + "{" + content + "}"; 9967 } else { 9968 return content; 9969 } 9970 }).join(""); 9971 }; 9972 9973 // import a list of modules into the list 9974 list.i = function(modules, mediaQuery) { 9975 if(typeof modules === "string") 9976 modules = [[null, modules, ""]]; 9977 var alreadyImportedModules = {}; 9978 for(var i = 0; i < this.length; i++) { 9979 var id = this[i][0]; 9980 if(typeof id === "number") 9981 alreadyImportedModules[id] = true; 9982 } 9983 for(i = 0; i < modules.length; i++) { 9984 var item = modules[i]; 9985 // skip already imported module 9986 // this implementation is not 100% perfect for weird media query combinations 9987 // when a module is imported multiple times with different media queries. 9988 // I hope this will never occur (Hey this way we have smaller bundles) 9989 if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { 9990 if(mediaQuery && !item[2]) { 9991 item[2] = mediaQuery; 9992 } else if(mediaQuery) { 9993 item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; 9994 } 9995 list.push(item); 9996 } 9997 } 9998 }; 9999 return list; 10000}; 10001 10002function cssWithMappingToString(item, useSourceMap) { 10003 var content = item[1] || ''; 10004 var cssMapping = item[3]; 10005 if (!cssMapping) { 10006 return content; 10007 } 10008 10009 if (useSourceMap && typeof btoa === 'function') { 10010 var sourceMapping = toComment(cssMapping); 10011 var sourceURLs = cssMapping.sources.map(function (source) { 10012 return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */' 10013 }); 10014 10015 return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); 10016 } 10017 10018 return [content].join('\n'); 10019} 10020 10021// Adapted from convert-source-map (MIT) 10022function toComment(sourceMap) { 10023 // eslint-disable-next-line no-undef 10024 var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); 10025 var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; 10026 10027 return '/*# ' + data + ' */'; 10028} 10029 10030 10031/***/ }), 10032/* 88 */ 10033/***/ (function(module, exports, __webpack_require__) { 10034 10035"use strict"; 10036 10037 10038/** 10039 * Copyright (c) 2013-present, Facebook, Inc. 10040 * All rights reserved. 10041 * 10042 * This source code is licensed under the BSD-style license found in the 10043 * LICENSE file in the root directory of this source tree. An additional grant 10044 * of patent rights can be found in the PATENTS file in the same directory. 10045 * 10046 * @typechecks 10047 */ 10048 10049var _hyphenPattern = /-(.)/g; 10050 10051/** 10052 * Camelcases a hyphenated string, for example: 10053 * 10054 * > camelize('background-color') 10055 * < "backgroundColor" 10056 * 10057 * @param {string} string 10058 * @return {string} 10059 */ 10060function camelize(string) { 10061 return string.replace(_hyphenPattern, function (_, character) { 10062 return character.toUpperCase(); 10063 }); 10064} 10065 10066module.exports = camelize; 10067 10068/***/ }), 10069/* 89 */ 10070/***/ (function(module, exports, __webpack_require__) { 10071 10072"use strict"; 10073/** 10074 * Copyright (c) 2013-present, Facebook, Inc. 10075 * All rights reserved. 10076 * 10077 * This source code is licensed under the BSD-style license found in the 10078 * LICENSE file in the root directory of this source tree. An additional grant 10079 * of patent rights can be found in the PATENTS file in the same directory. 10080 * 10081 * @typechecks 10082 */ 10083 10084 10085 10086var camelize = __webpack_require__(88); 10087 10088var msPattern = /^-ms-/; 10089 10090/** 10091 * Camelcases a hyphenated CSS property name, for example: 10092 * 10093 * > camelizeStyleName('background-color') 10094 * < "backgroundColor" 10095 * > camelizeStyleName('-moz-transition') 10096 * < "MozTransition" 10097 * > camelizeStyleName('-ms-transition') 10098 * < "msTransition" 10099 * 10100 * As Andi Smith suggests 10101 * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix 10102 * is converted to lowercase `ms`. 10103 * 10104 * @param {string} string 10105 * @return {string} 10106 */ 10107function camelizeStyleName(string) { 10108 return camelize(string.replace(msPattern, 'ms-')); 10109} 10110 10111module.exports = camelizeStyleName; 10112 10113/***/ }), 10114/* 90 */ 10115/***/ (function(module, exports, __webpack_require__) { 10116 10117"use strict"; 10118 10119 10120/** 10121 * Copyright (c) 2013-present, Facebook, Inc. 10122 * All rights reserved. 10123 * 10124 * This source code is licensed under the BSD-style license found in the 10125 * LICENSE file in the root directory of this source tree. An additional grant 10126 * of patent rights can be found in the PATENTS file in the same directory. 10127 * 10128 * 10129 */ 10130 10131var isTextNode = __webpack_require__(98); 10132 10133/*eslint-disable no-bitwise */ 10134 10135/** 10136 * Checks if a given DOM node contains or is another DOM node. 10137 */
10138function containsNode(outerNode, innerNode) { 10139 if (!outerNode || !innerNode) { 10140 return false; 10141 } else if (outerNode === innerNode) { 10142 return true; 10143 } else if (isTextNode(outerNode)) { 10144 return false; 10145 } else if (isTextNode(innerNode)) { 10146 return containsNode(outerNode, innerNode.parentNode); 10147 } else if ('contains' in outerNode) { 10148 return outerNode.contains(innerNode); 10149 } else if (outerNode.compareDocumentPosition) { 10150 return !!(outerNode.compareDocumentPosition(innerNode) & 16); 10151 } else { 10152 return false; 10153 } 10154} 10155 10156module.exports = containsNode; 10157 10158/***/ }), 10159/* 91 */ 10160/***/ (function(module, exports, __webpack_require__) { 10161 10162"use strict"; 10163/* WEBPACK VAR INJECTION */(function(process) { 10164 10165/** 10166 * Copyright (c) 2013-present, Facebook, Inc. 10167 * All rights reserved. 10168 * 10169 * This source code is licensed under the BSD-style license found in the 10170 * LICENSE file in the root directory of this source tree. An additional grant 10171 * of patent rights can be found in the PATENTS file in the same directory. 10172 * 10173 * @typechecks 10174 */ 10175 10176var invariant = __webpack_require__(1); 10177 10178/** 10179 * Convert array-like objects to arrays. 10180 * 10181 * This API assumes the caller knows the contents of the data type. For less 10182 * well defined inputs use createArrayFromMixed. 10183 * 10184 * @param {object|function|filelist} obj 10185 * @return {array} 10186 */ 10187function toArray(obj) { 10188 var length = obj.length; 10189 10190 // Some browsers builtin objects can report typeof 'function' (e.g. NodeList 10191 // in old versions of Safari). 10192 !(!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; 10193 10194 !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0; 10195 10196 !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0; 10197 10198 !(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; 10199 10200 // Old IE doesn't give collections access to hasOwnProperty. Assume inputs 10201 // without method will throw during the slice call and skip straight to the 10202 // fallback. 10203 if (obj.hasOwnProperty) { 10204 try { 10205 return Array.prototype.slice.call(obj); 10206 } catch (e) { 10207 // IE < 9 does not support Array#slice on collections objects 10208 } 10209 } 10210 10211 // Fall back to copying key by key. This assumes all keys have a value, 10212 // so will not preserve sparsely populated inputs. 10213 var ret = Array(length); 10214 for (var ii = 0; ii < length; ii++) { 10215 ret[ii] = obj[ii]; 10216 } 10217 return ret; 10218} 10219 10220/** 10221 * Perform a heuristic test to determine if an object is "array-like". 10222 * 10223 * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" 10224 * Joshu replied: "Mu." 10225 * 10226 * This function determines if its argument has "array nature": it returns 10227 * true if the argument is an actual array, an `arguments' object, or an 10228 * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). 10229 * 10230 * It will return false for other array-like objects like Filelist. 10231 * 10232 * @param {*} obj 10233 * @return {boolean} 10234 */ 10235function hasArrayNature(obj) { 10236 return ( 10237 // not null/false 10238 !!obj && ( 10239 // arrays are objects, NodeLists are functions in Safari 10240 typeof obj == 'object' || typeof obj == 'function') && 10241 // quacks like an array 10242 'length' in obj && 10243 // not window 10244 !('setInterval' in obj) && 10245 // no DOM node should be considered an array-like 10246 // a 'select' element has 'length' and 'item' properties on IE8 10247 typeof obj.nodeType != 'number' && ( 10248 // a real array 10249 Array.isArray(obj) || 10250 // arguments 10251 'callee' in obj || 10252 // HTMLCollection/NodeList 10253 'item' in obj) 10254 ); 10255} 10256 10257/** 10258 * Ensure that the argument is an array by wrapping it in an array if it is not. 10259 * Creates a copy of the argument if it is already an array.
10260 * 10261 * This is mostly useful idiomatically: 10262 * 10263 * var createArrayFromMixed = require('createArrayFromMixed'); 10264 * 10265 * function takesOneOrMoreThings(things) { 10266 * things = createArrayFromMixed(things); 10267 * ... 10268 * } 10269 * 10270 * This allows you to treat `things' as an array, but accept scalars in the API. 10271 * 10272 * If you need to convert an array-like object, like `arguments`, into an array 10273 * use toArray instead. 10274 * 10275 * @param {*} obj 10276 * @return {array} 10277 */ 10278function createArrayFromMixed(obj) { 10279 if (!hasArrayNature(obj)) { 10280 return [obj]; 10281 } else if (Array.isArray(obj)) { 10282 return obj.slice(); 10283 } else { 10284 return toArray(obj); 10285 } 10286} 10287 10288module.exports = createArrayFromMixed; 10289/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 10290 10291/***/ }), 10292/* 92 */ 10293/***/ (function(module, exports, __webpack_require__) { 10294 10295"use strict"; 10296/* WEBPACK VAR INJECTION */(function(process) { 10297 10298/** 10299 * Copyright (c) 2013-present, Facebook, Inc. 10300 * All rights reserved. 10301 * 10302 * This source code is licensed under the BSD-style license found in the 10303 * LICENSE file in the root directory of this source tree. An additional grant 10304 * of patent rights can be found in the PATENTS file in the same directory. 10305 * 10306 * @typechecks 10307 */ 10308 10309/*eslint-disable fb-www/unsafe-html*/ 10310 10311var ExecutionEnvironment = __webpack_require__(6); 10312 10313var createArrayFromMixed = __webpack_require__(91); 10314var getMarkupWrap = __webpack_require__(93); 10315var invariant = __webpack_require__(1); 10316 10317/** 10318 * Dummy container used to render all markup. 10319 */ 10320var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; 10321 10322/** 10323 * Pattern used by `getNodeName`. 10324 */ 10325var nodeNamePattern = /^\s*<(\w+)/; 10326 10327/** 10328 * Extracts the `nodeName` of the first element in a string of markup. 10329 * 10330 * @param {string} markup String of markup. 10331 * @return {?string} Node name of the supplied markup. 10332 */ 10333function getNodeName(markup) { 10334 var nodeNameMatch = markup.match(nodeNamePattern); 10335 return nodeNameMatch && nodeNameMatch[1].toLowerCase(); 10336} 10337 10338/** 10339 * Creates an array containing the nodes rendered from the supplied markup. The 10340 * optionally supplied `handleScript` function will be invoked once for each 10341 * <script> element that is rendered. If no `handleScript` function is supplied, 10342 * an exception is thrown if any <script> elements are rendered. 10343 * 10344 * @param {string} markup A string of valid HTML markup. 10345 * @param {?function} handleScript Invoked once for each rendered <script>. 10346 * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes. 10347 */ 10348function createNodesFromMarkup(markup, handleScript) { 10349 var node = dummyNode; 10350 !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0; 10351 var nodeName = getNodeName(markup); 10352 10353 var wrap = nodeName && getMarkupWrap(nodeName); 10354 if (wrap) { 10355 node.innerHTML = wrap[1] + markup + wrap[2]; 10356 10357 var wrapDepth = wrap[0]; 10358 while (wrapDepth--) { 10359 node = node.lastChild; 10360 } 10361 } else { 10362 node.innerHTML = markup; 10363 } 10364 10365 var scripts = node.getElementsByTagName('script'); 10366 if (scripts.length) { 10367 !handleScript ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0; 10368 createArrayFromMixed(scripts).forEach(handleScript); 10369 } 10370 10371 var nodes = Array.from(node.childNodes); 10372 while (node.lastChild) { 10373 node.removeChild(node.lastChild); 10374 } 10375 return nodes; 10376} 10377 10378module.exports = createNodesFromMarkup; 10379/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 10380 10381/***/ }), 10382/* 93 */ 10383/***/ (function(module, exports, __webpack_require__) { 10384 10385"use strict"; 10386/* WEBPACK VAR INJECTION */(function(process) { 10387 10388/** 10389 * Copyright (c) 2013-present, Facebook, Inc. 10390 * All rights reserved. 10391 * 10392 * This source code is licensed under the BSD-style license found in the 10393 * LICENSE file in the root directory of this source tree. An additional grant 10394 * of patent rights can be found in the PATENTS file in the same directory. 10395 * 10396 */ 10397 10398/*eslint-disable fb-www/unsafe-html */ 10399 10400var ExecutionEnvironment = __webpack_require__(6); 10401 10402var invariant = __webpack_require__(1); 10403 10404/** 10405 * Dummy container used to detect which wraps are necessary. 10406 */ 10407var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; 10408 10409/** 10410 * Some browsers cannot use `innerHTML` to render certain elements standalone,
10411 * so we wrap them, render the wrapped nodes, then extract the desired node. 10412 * 10413 * In IE8, certain elements cannot render alone, so wrap all elements ('*'). 10414 */ 10415 10416var shouldWrap = {}; 10417 10418var selectWrap = [1, '<select multiple="true">', '</select>']; 10419var tableWrap = [1, '<table>', '</table>']; 10420var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>']; 10421 10422var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>']; 10423 10424var markupWrap = { 10425 '*': [1, '?<div>', '</div>'], 10426 10427 'area': [1, '<map>', '</map>'], 10428 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'], 10429 'legend': [1, '<fieldset>', '</fieldset>'], 10430 'param': [1, '<object>', '</object>'], 10431 'tr': [2, '<table><tbody>', '</tbody></table>'], 10432 10433 'optgroup': selectWrap, 10434 'option': selectWrap, 10435 10436 'caption': tableWrap, 10437 'colgroup': tableWrap, 10438 'tbody': tableWrap, 10439 'tfoot': tableWrap, 10440 'thead': tableWrap, 10441 10442 'td': trWrap, 10443 'th': trWrap 10444}; 10445 10446// Initialize the SVG elements since we know they'll always need to be wrapped 10447// consistently. If they are created inside a <div> they will be initialized in 10448// the wrong namespace (and will not display). 10449var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan']; 10450svgElements.forEach(function (nodeName) { 10451 markupWrap[nodeName] = svgWrap; 10452 shouldWrap[nodeName] = true; 10453}); 10454 10455/** 10456 * Gets the markup wrap configuration for the supplied `nodeName`. 10457 * 10458 * NOTE: This lazily detects which wraps are necessary for the current browser. 10459 * 10460 * @param {string} nodeName Lowercase `nodeName`. 10461 * @return {?array} Markup wrap configuration, if applicable. 10462 */ 10463function getMarkupWrap(nodeName) { 10464 !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0; 10465 if (!markupWrap.hasOwnProperty(nodeName)) { 10466 nodeName = '*'; 10467 } 10468 if (!shouldWrap.hasOwnProperty(nodeName)) { 10469 if (nodeName === '*') { 10470 dummyNode.innerHTML = '<link />'; 10471 } else { 10472 dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>'; 10473 } 10474 shouldWrap[nodeName] = !dummyNode.firstChild; 10475 } 10476 return shouldWrap[nodeName] ? markupWrap[nodeName] : null; 10477} 10478 10479module.exports = getMarkupWrap; 10480/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 10481 10482/***/ }), 10483/* 94 */ 10484/***/ (function(module, exports, __webpack_require__) { 10485 10486"use strict"; 10487/** 10488 * Copyright (c) 2013-present, Facebook, Inc. 10489 * All rights reserved. 10490 * 10491 * This source code is licensed under the BSD-style license found in the 10492 * LICENSE file in the root directory of this source tree. An additional grant 10493 * of patent rights can be found in the PATENTS file in the same directory. 10494 * 10495 * @typechecks 10496 */ 10497 10498 10499 10500/** 10501 * Gets the scroll position of the supplied element or window. 10502 * 10503 * The return values are unbounded, unlike `getScrollPosition`. This means they 10504 * may be negative or exceed the element boundaries (which is possible using 10505 * inertial scrolling). 10506 * 10507 * @param {DOMWindow|DOMElement} scrollable 10508 * @return {object} Map with `x` and `y` keys. 10509 */ 10510 10511function getUnboundedScrollPosition(scrollable) { 10512 if (scrollable.Window && scrollable instanceof scrollable.Window) { 10513 return { 10514 x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft, 10515 y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop 10516 }; 10517 } 10518 return { 10519 x: scrollable.scrollLeft, 10520 y: scrollable.scrollTop 10521 }; 10522} 10523 10524module.exports = getUnboundedScrollPosition; 10525 10526/***/ }), 10527/* 95 */ 10528/***/ (function(module, exports, __webpack_require__) { 10529 10530"use strict"; 10531 10532 10533/** 10534 * Copyright (c) 2013-present, Facebook, Inc. 10535 * All rights reserved. 10536 * 10537 * This source code is licensed under the BSD-style license found in the 10538 * LICENSE file in the root directory of this source tree. An additional grant 10539 * of patent rights can be found in the PATENTS file in the same directory. 10540 * 10541 * @typechecks 10542 */ 10543 10544var _uppercasePattern = /([A-Z])/g; 10545 10546/** 10547 * Hyphenates a camelcased string, for example: 10548 * 10549 * > hyphenate('backgroundColor') 10550 * < "background-color" 10551 * 10552 * For CSS style names, use `hyphenateStyleName` instead which w
10552orks properly 10553 * with all vendor prefixes, including `ms`. 10554 * 10555 * @param {string} string 10556 * @return {string} 10557 */ 10558function hyphenate(string) { 10559 return string.replace(_uppercasePattern, '-$1').toLowerCase(); 10560} 10561 10562module.exports = hyphenate; 10563 10564/***/ }), 10565/* 96 */ 10566/***/ (function(module, exports, __webpack_require__) { 10567 10568"use strict"; 10569/** 10570 * Copyright (c) 2013-present, Facebook, Inc. 10571 * All rights reserved. 10572 * 10573 * This source code is licensed under the BSD-style license found in the 10574 * LICENSE file in the root directory of this source tree. An additional grant 10575 * of patent rights can be found in the PATENTS file in the same directory. 10576 * 10577 * @typechecks 10578 */ 10579 10580 10581 10582var hyphenate = __webpack_require__(95); 10583 10584var msPattern = /^ms-/; 10585 10586/** 10587 * Hyphenates a camelcased CSS property name, for example: 10588 * 10589 * > hyphenateStyleName('backgroundColor') 10590 * < "background-color" 10591 * > hyphenateStyleName('MozTransition') 10592 * < "-moz-transition" 10593 * > hyphenateStyleName('msTransition') 10594 * < "-ms-transition" 10595 * 10596 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix 10597 * is converted to `-ms-`. 10598 * 10599 * @param {string} string 10600 * @return {string} 10601 */ 10602function hyphenateStyleName(string) { 10603 return hyphenate(string).replace(msPattern, '-ms-'); 10604} 10605 10606module.exports = hyphenateStyleName; 10607 10608/***/ }), 10609/* 97 */ 10610/***/ (function(module, exports, __webpack_require__) { 10611 10612"use strict"; 10613 10614 10615/** 10616 * Copyright (c) 2013-present, Facebook, Inc. 10617 * All rights reserved. 10618 * 10619 * This source code is licensed under the BSD-style license found in the 10620 * LICENSE file in the root directory of this source tree. An additional grant 10621 * of patent rights can be found in the PATENTS file in the same directory. 10622 * 10623 * @typechecks 10624 */ 10625 10626/** 10627 * @param {*} object The object to check. 10628 * @return {boolean} Whether or not the object is a DOM node. 10629 */ 10630function isNode(object) { 10631 var doc = object ? object.ownerDocument || object : document; 10632 var defaultView = doc.defaultView || window; 10633 return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string')); 10634} 10635 10636module.exports = isNode; 10637 10638/***/ }), 10639/* 98 */ 10640/***/ (function(module, exports, __webpack_require__) { 10641 10642"use strict"; 10643 10644 10645/** 10646 * Copyright (c) 2013-present, Facebook, Inc. 10647 * All rights reserved. 10648 * 10649 * This source code is licensed under the BSD-style license found in the 10650 * LICENSE file in the root directory of this source tree. An additional grant 10651 * of patent rights can be found in the PATENTS file in the same directory. 10652 * 10653 * @typechecks 10654 */ 10655 10656var isNode = __webpack_require__(97); 10657 10658/** 10659 * @param {*} object The object to check. 10660 * @return {boolean} Whether or not the object is a DOM text node. 10661 */ 10662function isTextNode(object) { 10663 return isNode(object) && object.nodeType == 3; 10664} 10665 10666module.exports = isTextNode; 10667 10668/***/ }), 10669/* 99 */ 10670/***/ (function(module, exports, __webpack_require__) { 10671 10672"use strict"; 10673/** 10674 * Copyright (c) 2013-present, Facebook, Inc. 10675 * All rights reserved. 10676 * 10677 * This source code is licensed under the BSD-style license found in the 10678 * LICENSE file in the root directory of this source tree. An additional grant 10679 * of patent rights can be found in the PATENTS file in the same directory. 10680 * 10681 * 10682 * @typechecks static-only 10683 */ 10684 10685 10686 10687/** 10688 * Memoizes the return value of a function that accepts one string argument. 10689 */ 10690 10691function memoizeStringOnly(callback) { 10692 var cache = {}; 10693 return function (string) { 10694 if (!cache.hasOwnProperty(string)) { 10695 cache[string] = callback.call(this, string); 10696 } 10697 return cache[string]; 10698 }; 10699} 10700 10701module.exports = memoizeStringOnly; 10702 10703/***/ }), 10704/* 100 */ 10705/***/ (function(module, exports, __webpack_require__) { 10706 10707"use strict"; 10708/** 10709 * Copyright (c) 2013-present, Facebook, Inc. 10710 * All rights reserved. 10711 * 10712 * This source code is licensed under the BSD-style license found in the 10713 * LICENSE file in the root directory of this source tree. An additional grant 10714 * of patent rights can be found in the PATENTS file in the same directory. 10715 * 10716 * @typechecks 10717 */ 10718 10719 10720 10721var ExecutionEnvironment = __webpack_require__(6); 10722 10723var performance; 10724 10725if (ExecutionEnvironment.canUseDOM) { 10726 performance = window.performance || window.msPerformance || window.webkitPerformance; 10727} 10728 10729module.exports = performance || {}; 10730 10731/***/ }), 10732/* 101 */ 10733/***/ (function(module, exports, __webpack_require__) { 10734 10735"use strict"; 10736 10737 10738/** 10739 * Copyright (c) 2013-present, Facebook, Inc. 10740 * All rights reserved. 10741 * 10742 * This source code is licensed under the BSD-style license found in the 10743 * LICENSE file in the root directory of this source tree. An additional grant 10744 * of patent rights can be found in the PATENTS file in the same directory. 10745 * 10746 * @typechecks 10747 */ 10748 10749var performance = __webpack_require__(100); 10750 10751var performanceNow; 10752 10753/** 10754 * Detect if we can use `window.performance.now()` and gracefully fallback to 10755 * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
10756 * because of Facebook's testing infrastructure. 10757 */ 10758if (performance.now) { 10759 performanceNow = function performanceNow() { 10760 return performance.now(); 10761 }; 10762} else { 10763 performanceNow = function performanceNow() { 10764 return Date.now(); 10765 }; 10766} 10767 10768module.exports = performanceNow; 10769 10770/***/ }), 10771/* 102 */ 10772/***/ (function(module, exports, __webpack_require__) { 10773 10774// the whatwg-fetch polyfill installs the fetch() function 10775// on the global object (window or self) 10776// 10777// Return that as the export for use in Webpack, Browserify etc. 10778__webpack_require__(191); 10779module.exports = self.fetch.bind(self); 10780 10781 10782/***/ }), 10783/* 103 */ 10784/***/ (function(module, exports, __webpack_require__) { 10785 10786"use strict"; 10787/* WEBPACK VAR INJECTION */(function(process) {/** 10788 * Copyright 2013-present, Facebook, Inc. 10789 * All rights reserved. 10790 * 10791 * This source code is licensed under the BSD-style license found in the 10792 * LICENSE file in the root directory of this source tree. An additional grant 10793 * of patent rights can be found in the PATENTS file in the same directory. 10794 */ 10795 10796 10797 10798if (process.env.NODE_ENV !== 'production') { 10799 var invariant = __webpack_require__(1); 10800 var warning = __webpack_require__(2); 10801 var ReactPropTypesSecret = __webpack_require__(55); 10802 var loggedTypeFailures = {}; 10803} 10804 10805/** 10806 * Assert that the values match with the type specs. 10807 * Error messages are memorized and will only be shown once. 10808 * 10809 * @param {object} typeSpecs Map of name to a ReactPropType 10810 * @param {object} values Runtime values that need to be type-checked 10811 * @param {string} location e.g. "prop", "context", "child context" 10812 * @param {string} componentName Name of the component for error messages. 10813 * @param {?Function} getStack Returns the component stack. 10814 * @private 10815 */ 10816function checkPropTypes(typeSpecs, values, location, componentName, getStack) { 10817 if (process.env.NODE_ENV !== 'production') { 10818 for (var typeSpecName in typeSpecs) { 10819 if (typeSpecs.hasOwnProperty(typeSpecName)) { 10820 var error; 10821 // Prop type validation may throw. In case they do, we don't want to 10822 // fail the render phase where it didn't fail before. So we log it. 10823 // After these have been cleaned up, we'll let them throw. 10824 try { 10825 // This is intentionally an invariant that gets caught. It's the same 10826 // behavior as without this statement except with a better message. 10827 invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); 10828 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); 10829 } catch (ex) { 10830 error = ex; 10831 } 10832 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); 10833 if (error instanceof Error && !(error.message in loggedTypeFailures)) { 10834 // Only monitor this failure once because there tends to be a lot of the 10835 // same error. 10836 loggedTypeFailures[error.message] = true; 10837 10838 var stack = getStack ? getStack() : ''; 10839 10840 warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); 10841 } 10842 } 10843 } 10844 } 10845} 10846 10847module.exports = checkPropTypes; 10848 10849/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 10850 10851/***/ }), 10852/* 104 */ 10853/***/ (function(module, exports, __webpack_require__) { 10854 10855"use strict"; 10856/* WEBPACK VAR INJECTION */(function(process) {/** 10857 * Copyright 2013-present, Facebook, Inc. 10858 * All rights reserved. 10859 * 10860 * This source code is licensed under the BSD-style license found in the 10861 * LICENSE file in the root directory of this source tree. An additional grant 10862 * of patent rights can be found in the PATENTS file in the same directory. 10863 */ 10864 10865 10866 10867var emptyFunction = __webpack_require__(9); 10868var invariant = __webpack_require__(1); 10869var warning = __webpack_require__(2); 10870 10871var ReactPropTypesSecret = __webpack_require__(55); 10872var checkPropTypes = __webpack_require__(103); 10873 10874module.exports = function(isValidElement, throwOnDirectAccess) { 10875 /* global Symbol */ 10876 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; 10877 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. 10878 10879 /** 10880 * Returns the iterator method function contained on the iterable object. 10881 * 10882 * Be sure to invoke the function with the iterable as context: 10883 * 10884 * var iteratorFn = getIteratorFn(myIterable); 10885 * if (iteratorFn) { 10886 * var iterator = iteratorFn.call(myIterable); 10887 * ... 10888 * } 10889 * 10890 * @param {?object} maybeIterable 10891 * @return {?function} 10892 */ 10893 function getIteratorFn(maybeIterable) { 10894 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); 10895 if (typeof iteratorFn === 'function') { 10896 return iteratorFn; 10897 } 10898 } 10899 10900 /** 10901 * Collection of methods that allow declaration and validation of props that are 10902 * supplied to React components. Example usage: 10903 * 10904 * var Props = require('ReactPropTypes'); 10905 * var MyArticle = React.createClass({ 10906 * propTypes: { 10907 * // An optional string prop named "description". 10908 * description: Props.string, 10909 * 10910 * // A required enum prop named "category". 10911 * category: Props.oneOf(['News','Photos']).isRequired, 10912 * 10913 * // A prop named "dialog" that requires an instance of Dialog. 10914 * dialog: Props.instanceOf(Dialog).isRequired 10915 * }, 10916 * render: function() { ... } 10917 * }); 10918 * 10919 * A more formal specification of how these methods are used: 10920 * 10921 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) 10922 * decl := ReactPropTypes.{type}(.isRequired)? 10923 * 10924 * Each and every declaration produces a function with the same signature. This 10925 * allows the creation of custom validation functions. For example: 10926 * 10927 * var MyLink = React.createClass({ 10928 * propTypes: { 10929 * // An optional string or URI prop named "href". 10930 * href: function(props, propName, componentName) { 10931 * var propValue = props[propName]; 10932 * if (propValue != null && typeof propValue !== 'string' && 10933 * !(propValue instanceof URI)) { 10934 * return new Error( 10935 * 'Expected a string or an URI for ' + propName + ' in ' + 10936 * componentName 10937 * ); 10938 * } 10939 * } 10940 * }, 10941 * render: function() {...} 10942 * }); 10943 * 10944 * @internal 10945 */ 10946 10947 var ANONYMOUS = '<<anonymous>>'; 10948 10949 // Important! 10950 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. 10951 var ReactPropTypes = { 10952 array: createPrimitiveTypeChecker('array'), 10953 bool: createPrimitiveTypeChecker('boolean'), 10954 func: createPrimitiveTypeChecker('function'), 10955 number: createPrimitiveTypeChecker('number'), 10956 object: createPrimitiveTypeChecker('object'), 10957 string: createPrimitiveTypeChecker('string'), 10958 symbol: createPrimitiveTypeChecker('symbol'), 10959 10960 any: createAnyTypeChecker(), 10961 arrayOf: createArrayOfTypeChecker, 10962 element: createElementTypeChecker(), 10963 instanceOf: createInstanceTypeChecker, 10964 node: createNodeChecker(), 10965 objectOf: createObjectOfTypeChecker, 10966 oneOf: createEnumTypeChecker, 10967 oneOfType: createUnionTypeChecker, 10968 shape: createShapeTypeChecker 10969 }; 10970 10971 /** 10972 * inlined Object.is polyfill to avoid requiring consumers ship their own 10973 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is 10974 */ 10975 /*eslint-disable no-self-compare*/ 10976 function is(x, y) { 10977 // SameValue algorithm 10978 if (x === y) { 10979 // Steps 1-5, 7-10 10980 // Steps 6.b-6.e: +0 != -0 10981 return x !== 0 || 1 / x === 1 / y; 10982 } else { 10983 // Step 6.a: NaN == NaN 10984 return x !== x && y !== y; 10985 } 10986 } 10987 /*eslint-enable no-self-compare*/ 10988 10989 /** 10990 * We use an Error-like object for backward compatibility as people may call 10991 * PropTypes directly and inspect their output. However, we don't use real 10992 * Errors anymore. We don't inspect their stack anyway, and creating them 10993 * is prohibitively expensive if they are created too often, such as what 10994 * happens in oneOfType() for any type before the one that matched. 10995 */ 10996 function PropTypeError(message) { 10997 this.message = message; 10998 this.stack = ''; 10999 } 11000 // Make `instanceof Error` still work for returned errors. 11001 PropTypeError.prototype = Error.prototype; 11002 11003 function createChainableTypeChecker(validate) { 11004 if (process.env.NODE_ENV !== 'production') { 11005 var manualPropTypeCallCache = {}; 11006 var manualPropTypeWarningCount = 0; 11007 } 11008 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { 11009 componentName = componentName || ANONYMOUS; 11010 propFullName = propFullName || propName; 11011 11012 if (secret !== ReactPropTypesSecret) { 11013 if (throwOnDirectAccess) { 11014 // New behavior only for users of `prop-types` package 11015 invariant( 11016 false, 11017 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 11018 'Use `PropTypes.checkPropTypes()` to call them. ' + 11019 'Read more at http://fb.me/use-check-prop-types' 11020 ); 11021 } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') { 11022 // Old behavior for people using React.PropTypes 11023 var cacheKey = componentName + ':' + propName; 11024 if ( 11025 !manualPropTypeCallCache[cacheKey] && 11026 // Avoid spamming the console because they are often not actionable except for lib authors 11027 manualPropTypeWarningCount < 3 11028 ) { 11029 warning( 11030 false, 11031 'You are manually calling a React.PropTypes validation ' + 11032 'function for the `%s` prop on `%s`. This is deprecated ' + 11033 'and will throw in the standalone `prop-types` package. ' + 11034 'You may be seeing this warning due to a third-party PropTypes ' + 11035 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', 11036 propFullName, 11037 componentName 11038 ); 11039 manualPropTypeCallCache[cacheKey] = true; 11040 manualPropTypeWarningCount++; 11041 } 11042 } 11043 } 11044 if (props[propName] == null) { 11045 if (isRequired) { 11046 if (props[propName] === null) { 11047 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); 11048 } 11049 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); 11050 } 11051 return null; 11052 } else { 11053 return validate(props, propName, componentName, location, propFullName); 11054 } 11055 } 11056 11057 var chainedCheckType = checkType.bind(null, false); 11058 chainedCheckType.isRequired = checkType.bind(null, true); 11059 11060 return chainedCheckType; 11061 } 11062 11063 function createPrimitiveTypeChecker(expectedType) { 11064 function validate(props, propName, componentName, location, propFullName, secret) { 11065 var propValue = props[propName]; 11066 var propType = getPropType(propValue); 11067 if (propType !== expectedType) { 11068 // `propValue` being instance of, say, date/regexp, pass the 'object' 11069 // check, but we can offer a more precise error message here rather than 11070 // 'of type `object`'. 11071 var preciseType = getPreciseType(propValue); 11072 11073 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); 11074 } 11075 return null; 11076 } 11077 return createChainableTypeChecker(validate); 11078 } 11079 11080 function createAnyTypeChecker() { 11081 return createChainableTypeChecker(emptyFunction.thatReturnsNull); 11082 } 11083 11084 function createArrayOfTypeChecker(typeChecker) { 11085 function validate(props, propName, componentName, location, propFullName) { 11086 if (typeof typeChecker !== 'function') { 11087 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invali
vendor: 5,721 bytes, lines 11087-11220
11087d PropType notation inside arrayOf.'); 11088 } 11089 var propValue = props[propName]; 11090 if (!Array.isArray(propValue)) { 11091 var propType = getPropType(propValue); 11092 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); 11093 } 11094 for (var i = 0; i < propValue.length; i++) { 11095 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); 11096 if (error instanceof Error) { 11097 return error; 11098 } 11099 } 11100 return null; 11101 } 11102 return createChainableTypeChecker(validate); 11103 } 11104 11105 function createElementTypeChecker() { 11106 function validate(props, propName, componentName, location, propFullName) { 11107 var propValue = props[propName]; 11108 if (!isValidElement(propValue)) { 11109 var propType = getPropType(propValue); 11110 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); 11111 } 11112 return null; 11113 } 11114 return createChainableTypeChecker(validate); 11115 } 11116 11117 function createInstanceTypeChecker(expectedClass) { 11118 function validate(props, propName, componentName, location, propFullName) { 11119 if (!(props[propName] instanceof expectedClass)) { 11120 var expectedClassName = expectedClass.name || ANONYMOUS; 11121 var actualClassName = getClassName(props[propName]); 11122 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); 11123 } 11124 return null; 11125 } 11126 return createChainableTypeChecker(validate); 11127 } 11128 11129 function createEnumTypeChecker(expectedValues) { 11130 if (!Array.isArray(expectedValues)) { 11131 process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0; 11132 return emptyFunction.thatReturnsNull; 11133 } 11134 11135 function validate(props, propName, componentName, location, propFullName) { 11136 var propValue = props[propName]; 11137 for (var i = 0; i < expectedValues.length; i++) { 11138 if (is(propValue, expectedValues[i])) { 11139 return null; 11140 } 11141 } 11142 11143 var valuesString = JSON.stringify(expectedValues); 11144 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); 11145 } 11146 return createChainableTypeChecker(validate); 11147 } 11148 11149 function createObjectOfTypeChecker(typeChecker) { 11150 function validate(props, propName, componentName, location, propFullName) { 11151 if (typeof typeChecker !== 'function') { 11152 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); 11153 } 11154 var propValue = props[propName]; 11155 var propType = getPropType(propValue); 11156 if (propType !== 'object') { 11157 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); 11158 } 11159 for (var key in propValue) { 11160 if (propValue.hasOwnProperty(key)) { 11161 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); 11162 if (error instanceof Error) { 11163 return error; 11164 } 11165 } 11166 } 11167 return null; 11168 } 11169 return createChainableTypeChecker(validate); 11170 } 11171 11172 function createUnionTypeChecker(arrayOfTypeCheckers) { 11173 if (!Array.isArray(arrayOfTypeCheckers)) { 11174 process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; 11175 return emptyFunction.thatReturnsNull; 11176 } 11177 11178 for (var i = 0; i < arrayOfTypeCheckers.length; i++) { 11179 var checker = arrayOfTypeCheckers[i]; 11180 if (typeof checker !== 'function') { 11181 warning( 11182 false, 11183 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' + 11184 'received %s at index %s.', 11185 getPostfixForTypeWarning(checker), 11186 i 11187 ); 11188 return emptyFunction.thatReturnsNull; 11189 } 11190 } 11191 11192 function validate(props, propName, componentName, location, propFullName) { 11193 for (var i = 0; i < arrayOfTypeCheckers.length; i++) { 11194 var checker = arrayOfTypeCheckers[i]; 11195 if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { 11196 return null; 11197 } 11198 } 11199 11200 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); 11201 } 11202 return createChainableTypeChecker(validate); 11203 } 11204 11205 function createNodeChecker() { 11206 function validate(props, propName, componentName, location, propFullName) { 11207 if (!isNode(props[propName])) { 11208 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); 11209 } 11210 return null; 11211 } 11212 return createChainableTypeChecker(validate); 11213 } 11214 11215 function createShapeTypeChecker(shapeTypes) { 11216 function validate(props, propName, componentName, location, propFullName) { 11217 var propValue = props[propName]; 11218 var propType = getPropType(propValue); 11219 if (propType !== 'object') { 11220 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propT
vendor: 4,944 bytes, lines 11220-11404
11220ype + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); 11221 } 11222 for (var key in shapeTypes) { 11223 var checker = shapeTypes[key]; 11224 if (!checker) { 11225 continue; 11226 } 11227 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); 11228 if (error) { 11229 return error; 11230 } 11231 } 11232 return null; 11233 } 11234 return createChainableTypeChecker(validate); 11235 } 11236 11237 function isNode(propValue) { 11238 switch (typeof propValue) { 11239 case 'number': 11240 case 'string': 11241 case 'undefined': 11242 return true; 11243 case 'boolean': 11244 return !propValue; 11245 case 'object': 11246 if (Array.isArray(propValue)) { 11247 return propValue.every(isNode); 11248 } 11249 if (propValue === null || isValidElement(propValue)) { 11250 return true; 11251 } 11252 11253 var iteratorFn = getIteratorFn(propValue); 11254 if (iteratorFn) { 11255 var iterator = iteratorFn.call(propValue); 11256 var step; 11257 if (iteratorFn !== propValue.entries) { 11258 while (!(step = iterator.next()).done) { 11259 if (!isNode(step.value)) { 11260 return false; 11261 } 11262 } 11263 } else { 11264 // Iterator will provide entry [k,v] tuples rather than values. 11265 while (!(step = iterator.next()).done) { 11266 var entry = step.value; 11267 if (entry) { 11268 if (!isNode(entry[1])) { 11269 return false; 11270 } 11271 } 11272 } 11273 } 11274 } else { 11275 return false; 11276 } 11277 11278 return true; 11279 default: 11280 return false; 11281 } 11282 } 11283 11284 function isSymbol(propType, propValue) { 11285 // Native Symbol. 11286 if (propType === 'symbol') { 11287 return true; 11288 } 11289 11290 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' 11291 if (propValue['@@toStringTag'] === 'Symbol') { 11292 return true; 11293 } 11294 11295 // Fallback for non-spec compliant Symbols which are polyfilled. 11296 if (typeof Symbol === 'function' && propValue instanceof Symbol) { 11297 return true; 11298 } 11299 11300 return false; 11301 } 11302 11303 // Equivalent of `typeof` but with special handling for array and regexp. 11304 function getPropType(propValue) { 11305 var propType = typeof propValue; 11306 if (Array.isArray(propValue)) { 11307 return 'array'; 11308 } 11309 if (propValue instanceof RegExp) { 11310 // Old webkits (at least until Android 4.0) return 'function' rather than 11311 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ 11312 // passes PropTypes.object. 11313 return 'object'; 11314 } 11315 if (isSymbol(propType, propValue)) { 11316 return 'symbol'; 11317 } 11318 return propType; 11319 } 11320 11321 // This handles more types than `getPropType`. Only used for error messages. 11322 // See `createPrimitiveTypeChecker`. 11323 function getPreciseType(propValue) { 11324 if (typeof propValue === 'undefined' || propValue === null) { 11325 return '' + propValue; 11326 } 11327 var propType = getPropType(propValue); 11328 if (propType === 'object') { 11329 if (propValue instanceof Date) { 11330 return 'date'; 11331 } else if (propValue instanceof RegExp) { 11332 return 'regexp'; 11333 } 11334 } 11335 return propType; 11336 } 11337 11338 // Returns a string that is postfixed to a warning about an invalid type. 11339 // For example, "undefined" or "of type array" 11340 function getPostfixForTypeWarning(value) { 11341 var type = getPreciseType(value); 11342 switch (type) { 11343 case 'array': 11344 case 'object': 11345 return 'an ' + type; 11346 case 'boolean': 11347 case 'date': 11348 case 'regexp': 11349 return 'a ' + type; 11350 default: 11351 return type; 11352 } 11353 } 11354 11355 // Returns class name of the object, if any. 11356 function getClassName(propValue) { 11357 if (!propValue.constructor || !propValue.constructor.name) { 11358 return ANONYMOUS; 11359 } 11360 return propValue.constructor.name; 11361 } 11362 11363 ReactPropTypes.checkPropTypes = checkPropTypes; 11364 ReactPropTypes.PropTypes = ReactPropTypes; 11365 11366 return ReactPropTypes; 11367}; 11368 11369/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 11370 11371/***/ }), 11372/* 105 */ 11373/***/ (function(module, exports, __webpack_require__) { 11374 11375"use strict"; 11376/** 11377 * Copyright 2013-present, Facebook, Inc. 11378 * All rights reserved. 11379 * 11380 * This source code is licensed under the BSD-style license found in the 11381 * LICENSE file in the root directory of this source tree. An additional grant 11382 * of patent rights can be found in the PATENTS file in the same directory. 11383 * 11384 */ 11385 11386 11387 11388var ARIADOMPropertyConfig = { 11389 Properties: { 11390 // Global States and Properties 11391 'aria-current': 0, // state 11392 'aria-details': 0, 11393 'aria-disabled': 0, // state 11394 'aria-hidden': 0, // state 11395 'aria-invalid': 0, // state 11396 'aria-keyshortcuts': 0, 11397 'aria-label': 0, 11398 'aria-roledescription': 0, 11399 // Widget Attributes 11400 'aria-autocomplete': 0, 11401 'aria-checked': 0, 11402 'aria-expanded': 0, 11403 'aria-haspopup': 0, 11404 'aria-level': 0,
11405 'aria-modal': 0, 11406 'aria-multiline': 0, 11407 'aria-multiselectable': 0, 11408 'aria-orientation': 0, 11409 'aria-placeholder': 0, 11410 'aria-pressed': 0, 11411 'aria-readonly': 0, 11412 'aria-required': 0, 11413 'aria-selected': 0, 11414 'aria-sort': 0, 11415 'aria-valuemax': 0, 11416 'aria-valuemin': 0, 11417 'aria-valuenow': 0, 11418 'aria-valuetext': 0, 11419 // Live Region Attributes 11420 'aria-atomic': 0, 11421 'aria-busy': 0, 11422 'aria-live': 0, 11423 'aria-relevant': 0, 11424 // Drag-and-Drop Attributes 11425 'aria-dropeffect': 0, 11426 'aria-grabbed': 0, 11427 // Relationship Attributes 11428 'aria-activedescendant': 0, 11429 'aria-colcount': 0, 11430 'aria-colindex': 0, 11431 'aria-colspan': 0, 11432 'aria-controls': 0, 11433 'aria-describedby': 0, 11434 'aria-errormessage': 0, 11435 'aria-flowto': 0, 11436 'aria-labelledby': 0, 11437 'aria-owns': 0, 11438 'aria-posinset': 0, 11439 'aria-rowcount': 0, 11440 'aria-rowindex': 0, 11441 'aria-rowspan': 0, 11442 'aria-setsize': 0 11443 }, 11444 DOMAttributeNames: {}, 11445 DOMPropertyNames: {} 11446}; 11447 11448module.exports = ARIADOMPropertyConfig; 11449 11450/***/ }), 11451/* 106 */ 11452/***/ (function(module, exports, __webpack_require__) { 11453 11454"use strict"; 11455/** 11456 * Copyright 2013-present, Facebook, Inc. 11457 * All rights reserved. 11458 * 11459 * This source code is licensed under the BSD-style license found in the 11460 * LICENSE file in the root directory of this source tree. An additional grant 11461 * of patent rights can be found in the PATENTS file in the same directory. 11462 * 11463 */ 11464 11465 11466 11467var ReactDOMComponentTree = __webpack_require__(5); 11468 11469var focusNode = __webpack_require__(52); 11470 11471var AutoFocusUtils = { 11472 focusDOMComponent: function () { 11473 focusNode(ReactDOMComponentTree.getNodeFromInstance(this)); 11474 } 11475}; 11476 11477module.exports = AutoFocusUtils; 11478 11479/***/ }), 11480/* 107 */ 11481/***/ (function(module, exports, __webpack_require__) { 11482 11483"use strict"; 11484/** 11485 * Copyright 2013-present Facebook, Inc. 11486 * All rights reserved. 11487 * 11488 * This source code is licensed under the BSD-style license found in the 11489 * LICENSE file in the root directory of this source tree. An additional grant 11490 * of patent rights can be found in the PATENTS file in the same directory. 11491 * 11492 */ 11493 11494 11495 11496var EventPropagators = __webpack_require__(22); 11497var ExecutionEnvironment = __webpack_require__(6); 11498var FallbackCompositionState = __webpack_require__(113); 11499var SyntheticCompositionEvent = __webpack_require__(156); 11500var SyntheticInputEvent = __webpack_require__(159); 11501 11502var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space 11503var START_KEYCODE = 229; 11504 11505var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window; 11506 11507var documentMode = null; 11508if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { 11509 documentMode = document.documentMode; 11510} 11511 11512// Webkit offers a very useful `textInput` event that can be used to 11513// directly represent `beforeInput`. The IE `textinput` event is not as 11514// useful, so we don't use it. 11515var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto(); 11516 11517// In IE9+, we have access to composition events, but the data supplied 11518// by the native compositionend event may be incorrect. Japanese ideographic 11519// spaces, for instance (\u3000) are not recorded correctly. 11520var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11); 11521 11522/** 11523 * Opera <= 12 includes TextEvent in window, but does not fire 11524 * text input events. Rely on keypress instead. 11525 */ 11526function isPresto() { 11527 var opera = window.opera; 11528 return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12; 11529} 11530 11531var SPACEBAR_CODE = 32; 11532var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); 11533 11534// Events and their corresponding property names. 11535var eventTypes = { 11536 beforeInput: { 11537 phasedRegistrationNames: { 11538 bubbled: 'onBeforeInput', 11539 captured: 'onBeforeInputCapture' 11540 }, 11541 dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste'] 11542 }, 11543 compositionEnd: { 11544 phasedRegistrationNames: { 11545 bubbled: 'onCompositionEnd', 11546 captured: 'onCompositionEndCapture' 11547 }, 11548 dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] 11549 }, 11550 compositionStart: {
11551 phasedRegistrationNames: { 11552 bubbled: 'onCompositionStart', 11553 captured: 'onCompositionStartCapture' 11554 }, 11555 dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] 11556 }, 11557 compositionUpdate: { 11558 phasedRegistrationNames: { 11559 bubbled: 'onCompositionUpdate', 11560 captured: 'onCompositionUpdateCapture' 11561 }, 11562 dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] 11563 } 11564}; 11565 11566// Track whether we've ever handled a keypress on the space key. 11567var hasSpaceKeypress = false; 11568 11569/** 11570 * Return whether a native keypress event is assumed to be a command. 11571 * This is required because Firefox fires `keypress` events for key commands 11572 * (cut, copy, select-all, etc.) even though no character is inserted. 11573 */ 11574function isKeypressCommand(nativeEvent) { 11575 return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && 11576 // ctrlKey && altKey is equivalent to AltGr, and is not a command. 11577 !(nativeEvent.ctrlKey && nativeEvent.altKey); 11578} 11579 11580/** 11581 * Translate native top level events into event types. 11582 * 11583 * @param {string} topLevelType 11584 * @return {object} 11585 */ 11586function getCompositionEventType(topLevelType) { 11587 switch (topLevelType) { 11588 case 'topCompositionStart': 11589 return eventTypes.compositionStart; 11590 case 'topCompositionEnd': 11591 return eventTypes.compositionEnd; 11592 case 'topCompositionUpdate': 11593 return eventTypes.compositionUpdate; 11594 } 11595} 11596 11597/** 11598 * Does our fallback best-guess model think this event signifies that 11599 * composition has begun? 11600 * 11601 * @param {string} topLevelType 11602 * @param {object} nativeEvent 11603 * @return {boolean} 11604 */ 11605function isFallbackCompositionStart(topLevelType, nativeEvent) { 11606 return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE; 11607} 11608 11609/** 11610 * Does our fallback mode think that this event is the end of composition? 11611 * 11612 * @param {string} topLevelType 11613 * @param {object} nativeEvent 11614 * @return {boolean} 11615 */ 11616function isFallbackCompositionEnd(topLevelType, nativeEvent) { 11617 switch (topLevelType) { 11618 case 'topKeyUp': 11619 // Command keys insert or clear IME input. 11620 return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; 11621 case 'topKeyDown': 11622 // Expect IME keyCode on each keydown. If we get any other 11623 // code we must have exited earlier. 11624 return nativeEvent.keyCode !== START_KEYCODE; 11625 case 'topKeyPress': 11626 case 'topMouseDown': 11627 case 'topBlur': 11628 // Events are not possible without cancelling IME. 11629 return true; 11630 default: 11631 return false; 11632 } 11633} 11634 11635/** 11636 * Google Input Tools provides composition data via a CustomEvent, 11637 * with the `data` property populated in the `detail` object. If this 11638 * is available on the event object, use it. If not, this is a plain 11639 * composition event and we have nothing special to extract. 11640 * 11641 * @param {object} nativeEvent 11642 * @return {?string} 11643 */ 11644function getDataFromCustomEvent(nativeEvent) { 11645 var detail = nativeEvent.detail; 11646 if (typeof detail === 'object' && 'data' in detail) { 11647 return detail.data; 11648 } 11649 return null; 11650} 11651 11652// Track the current IME composition fallback object, if any. 11653var currentComposition = null; 11654 11655/** 11656 * @return {?object} A SyntheticCompositionEvent. 11657 */ 11658function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { 11659 var eventType; 11660 var fallbackData; 11661 11662 if (canUseCompositionEvent) { 11663 eventType = getCompositionEventType(topLevelType); 11664 } else if (!currentComposition) { 11665 if (isFallbackCompositionStart(topLevelType, nativeEvent)) { 11666 eventType = eventTypes.compositionStart; 11667 } 11668 } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { 11669 eventType = eventTypes.compositionEnd; 11670 } 11671 11672 if (!eventType) { 11673 return null; 11674 } 11675 11676 if (useFallbackCompositionData) { 11677 // The current composition is stored statically and must not be 11678 // overwritten while composition continues. 11679 if (!currentComposition && eventType === eventTypes.compositionStart) { 11680 currentComposition = FallbackCompositionState.getPooled(nativeEventTarget); 11681 } else if (eventType === eventTypes.compositionEnd) { 11682 if (currentComposition) { 11683 fallbackData = currentComposition.getData(); 11684 } 11685 } 11686 } 11687 11688 var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget); 11689 11690 if (fallbackData) { 11691 // Inject data generated from fallback path into the synthetic event. 11692 // This matches the property of native CompositionEventInterface. 11693 event.data = fallbackData; 11694 } else { 11695 var customData = getDataFromCustomEvent(nativeEvent); 11696 if (customData !== null) { 11697 event.data = customData; 11698 } 11699 } 11700 11701 EventPropagators.accumulateTwoPhaseDispatches(event); 11702 return event; 11703} 11704
11705/** 11706 * @param {string} topLevelType Record from `EventConstants`. 11707 * @param {object} nativeEvent Native browser event. 11708 * @return {?string} The string corresponding to this `beforeInput` event. 11709 */ 11710function getNativeBeforeInputChars(topLevelType, nativeEvent) { 11711 switch (topLevelType) { 11712 case 'topCompositionEnd': 11713 return getDataFromCustomEvent(nativeEvent); 11714 case 'topKeyPress': 11715 /** 11716 * If native `textInput` events are available, our goal is to make 11717 * use of them. However, there is a special case: the spacebar key. 11718 * In Webkit, preventing default on a spacebar `textInput` event 11719 * cancels character insertion, but it *also* causes the browser 11720 * to fall back to its default spacebar behavior of scrolling the 11721 * page. 11722 * 11723 * Tracking at: 11724 * https://code.google.com/p/chromium/issues/detail?id=355103 11725 * 11726 * To avoid this issue, use the keypress event as if no `textInput` 11727 * event is available. 11728 */ 11729 var which = nativeEvent.which; 11730 if (which !== SPACEBAR_CODE) { 11731 return null; 11732 } 11733 11734 hasSpaceKeypress = true; 11735 return SPACEBAR_CHAR; 11736 11737 case 'topTextInput': 11738 // Record the characters to be added to the DOM. 11739 var chars = nativeEvent.data; 11740 11741 // If it's a spacebar character, assume that we have already handled 11742 // it at the keypress level and bail immediately. Android Chrome 11743 // doesn't give us keycodes, so we need to blacklist it. 11744 if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { 11745 return null; 11746 } 11747 11748 return chars; 11749 11750 default: 11751 // For other native event types, do nothing. 11752 return null; 11753 } 11754} 11755 11756/** 11757 * For browsers that do not provide the `textInput` event, extract the 11758 * appropriate string to use for SyntheticInputEvent. 11759 * 11760 * @param {string} topLevelType Record from `EventConstants`. 11761 * @param {object} nativeEvent Native browser event. 11762 * @return {?string} The fallback string for this `beforeInput` event. 11763 */ 11764function getFallbackBeforeInputChars(topLevelType, nativeEvent) { 11765 // If we are currently composing (IME) and using a fallback to do so, 11766 // try to extract the composed characters from the fallback object. 11767 // If composition event is available, we extract a string only at 11768 // compositionevent, otherwise extract it at fallback events. 11769 if (currentComposition) { 11770 if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) { 11771 var chars = currentComposition.getData(); 11772 FallbackCompositionState.release(currentComposition); 11773 currentComposition = null; 11774 return chars; 11775 } 11776 return null; 11777 } 11778 11779 switch (topLevelType) { 11780 case 'topPaste': 11781 // If a paste event occurs after a keypress, throw out the input 11782 // chars. Paste events should not lead to BeforeInput events. 11783 return null; 11784 case 'topKeyPress': 11785 /** 11786 * As of v27, Firefox may fire keypress events even when no character 11787 * will be inserted. A few possibilities: 11788 * 11789 * - `which` is `0`. Arrow keys, Esc key, etc. 11790 * 11791 * - `which` is the pressed key code, but no char is available. 11792 * Ex: 'AltGr + d` in Polish. There is no modified character for 11793 * this key combination and no character is inserted into the 11794 * document, but FF fires the keypress for char code `100` anyway. 11795 * No `input` event will occur. 11796 * 11797 * - `which` is the pressed key code, but a command combination is 11798 * being used. Ex: `Cmd+C`. No character is inserted, and no 11799 * `input` event will occur. 11800 */ 11801 if (nativeEvent.which && !isKeypressCommand(nativeEvent)) { 11802 return String.fromCharCode(nativeEvent.which); 11803 } 11804 return null; 11805 case 'topCompositionEnd': 11806 return useFallbackCompositionData ? null : nativeEvent.data; 11807 default: 11808 return null; 11809 } 11810} 11811 11812/** 11813 * Extract a SyntheticInputEvent for `beforeInput`, based on either native 11814 * `textInput` or fallback behavior. 11815 * 11816 * @return {?object} A SyntheticInputEvent. 11817 */ 11818function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { 11819 var chars; 11820 11821 if (canUseTextInputEvent) { 11822 chars = getNativeBeforeInputChars(topLevelType, nativeEvent); 11823 } else { 11824 chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); 11825 } 11826 11827 // If no characters are being inserted, no BeforeInput event should 11828 // be fired. 11829 if (!chars) { 11830 return null; 11831 } 11832 11833 var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget); 11834 11835 event.data = chars; 11836 EventPropagators.accumulateTwoPhaseDispatches(event); 11837 return event; 11838} 11839
11840/** 11841 * Create an `onBeforeInput` event to match 11842 * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. 11843 * 11844 * This event plugin is based on the native `textInput` event 11845 * available in Chrome, Safari, Opera, and IE. This event fires after 11846 * `onKeyPress` and `onCompositionEnd`, but before `onInput`. 11847 * 11848 * `beforeInput` is spec'd but not implemented in any browsers, and 11849 * the `input` event does not provide any useful information about what has 11850 * actually been added, contrary to the spec. Thus, `textInput` is the best 11851 * available event to identify the characters that have actually been inserted 11852 * into the target node. 11853 * 11854 * This plugin is also responsible for emitting `composition` events, thus 11855 * allowing us to share composition fallback code for both `beforeInput` and 11856 * `composition` event types. 11857 */ 11858var BeforeInputEventPlugin = { 11859 11860 eventTypes: eventTypes, 11861 11862 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { 11863 return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)]; 11864 } 11865}; 11866 11867module.exports = BeforeInputEventPlugin; 11868 11869/***/ }), 11870/* 108 */ 11871/***/ (function(module, exports, __webpack_require__) { 11872 11873"use strict"; 11874/* WEBPACK VAR INJECTION */(function(process) {/** 11875 * Copyright 2013-present, Facebook, Inc. 11876 * All rights reserved. 11877 * 11878 * This source code is licensed under the BSD-style license found in the 11879 * LICENSE file in the root directory of this source tree. An additional grant 11880 * of patent rights can be found in the PATENTS file in the same directory. 11881 * 11882 */ 11883 11884 11885 11886var CSSProperty = __webpack_require__(56); 11887var ExecutionEnvironment = __webpack_require__(6); 11888var ReactInstrumentation = __webpack_require__(8); 11889 11890var camelizeStyleName = __webpack_require__(89); 11891var dangerousStyleValue = __webpack_require__(166); 11892var hyphenateStyleName = __webpack_require__(96); 11893var memoizeStringOnly = __webpack_require__(99); 11894var warning = __webpack_require__(2); 11895 11896var processStyleName = memoizeStringOnly(function (styleName) { 11897 return hyphenateStyleName(styleName); 11898}); 11899 11900var hasShorthandPropertyBug = false; 11901var styleFloatAccessor = 'cssFloat'; 11902if (ExecutionEnvironment.canUseDOM) { 11903 var tempStyle = document.createElement('div').style; 11904 try { 11905 // IE8 throws "Invalid argument." if resetting shorthand style properties. 11906 tempStyle.font = ''; 11907 } catch (e) { 11908 hasShorthandPropertyBug = true; 11909 } 11910 // IE8 only supports accessing cssFloat (standard) as styleFloat 11911 if (document.documentElement.style.cssFloat === undefined) { 11912 styleFloatAccessor = 'styleFloat'; 11913 } 11914} 11915 11916if (process.env.NODE_ENV !== 'production') { 11917 // 'msTransform' is correct, but the other prefixes should be capitalized 11918 var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; 11919 11920 // style values shouldn't contain a semicolon 11921 var badStyleValueWithSemicolonPattern = /;\s*$/; 11922 11923 var warnedStyleNames = {}; 11924 var warnedStyleValues = {}; 11925 var warnedForNaNValue = false; 11926 11927 var warnHyphenatedStyleName = function (name, owner) { 11928 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { 11929 return; 11930 } 11931 11932 warnedStyleNames[name] = true; 11933 process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0; 11934 }; 11935 11936 var warnBadVendoredStyleName = function (name, owner) { 11937 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { 11938 return; 11939 } 11940 11941 warnedStyleNames[name] = true; 11942 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; 11943 }; 11944 11945 var warnStyleValueWithSemicolon = function (name, value, owner) { 11946 if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { 11947 return; 11948 } 11949 11950 warnedStyleValues[value] = true; 11951 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; 11952 }; 11953 11954 var warnStyleValueIsNaN = function (name, value, owner) { 11955 if (warnedForNaNValue) { 11956 return; 11957 } 11958 11959 warnedForNaNValue = true; 11960 process.env.NODE_ENV !== 'production' ? warning(false, '`NaN` is an invali
11960d value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0; 11961 }; 11962 11963 var checkRenderMessage = function (owner) { 11964 if (owner) { 11965 var name = owner.getName(); 11966 if (name) { 11967 return ' Check the render method of `' + name + '`.'; 11968 } 11969 } 11970 return ''; 11971 }; 11972 11973 /** 11974 * @param {string} name 11975 * @param {*} value 11976 * @param {ReactDOMComponent} component 11977 */ 11978 var warnValidStyle = function (name, value, component) { 11979 var owner; 11980 if (component) { 11981 owner = component._currentElement._owner; 11982 } 11983 if (name.indexOf('-') > -1) { 11984 warnHyphenatedStyleName(name, owner); 11985 } else if (badVendoredStyleNamePattern.test(name)) { 11986 warnBadVendoredStyleName(name, owner); 11987 } else if (badStyleValueWithSemicolonPattern.test(value)) { 11988 warnStyleValueWithSemicolon(name, value, owner); 11989 } 11990 11991 if (typeof value === 'number' && isNaN(value)) { 11992 warnStyleValueIsNaN(name, value, owner); 11993 } 11994 }; 11995} 11996 11997/** 11998 * Operations for dealing with CSS properties. 11999 */ 12000var CSSPropertyOperations = { 12001 12002 /** 12003 * Serializes a mapping of style properties for use as inline styles: 12004 * 12005 * > createMarkupForStyles({width: '200px', height: 0}) 12006 * "width:200px;height:0;" 12007 * 12008 * Undefined values are ignored so that declarative programming is easier. 12009 * The result should be HTML-escaped before insertion into the DOM. 12010 * 12011 * @param {object} styles 12012 * @param {ReactDOMComponent} component 12013 * @return {?string} 12014 */ 12015 createMarkupForStyles: function (styles, component) { 12016 var serialized = ''; 12017 for (var styleName in styles) { 12018 if (!styles.hasOwnProperty(styleName)) { 12019 continue; 12020 } 12021 var styleValue = styles[styleName]; 12022 if (process.env.NODE_ENV !== 'production') { 12023 warnValidStyle(styleName, styleValue, component); 12024 } 12025 if (styleValue != null) { 12026 serialized += processStyleName(styleName) + ':'; 12027 serialized += dangerousStyleValue(styleName, styleValue, component) + ';'; 12028 } 12029 } 12030 return serialized || null; 12031 }, 12032 12033 /** 12034 * Sets the value for multiple styles on a node. If a value is specified as 12035 * '' (empty string), the corresponding style property will be unset. 12036 * 12037 * @param {DOMElement} node 12038 * @param {object} styles 12039 * @param {ReactDOMComponent} component 12040 */ 12041 setValueForStyles: function (node, styles, component) { 12042 if (process.env.NODE_ENV !== 'production') { 12043 ReactInstrumentation.debugTool.onHostOperation({ 12044 instanceID: component._debugID, 12045 type: 'update styles', 12046 payload: styles 12047 }); 12048 } 12049 12050 var style = node.style; 12051 for (var styleName in styles) { 12052 if (!styles.hasOwnProperty(styleName)) { 12053 continue; 12054 } 12055 if (process.env.NODE_ENV !== 'production') { 12056 warnValidStyle(styleName, styles[styleName], component); 12057 } 12058 var styleValue = dangerousStyleValue(styleName, styles[styleName], component); 12059 if (styleName === 'float' || styleName === 'cssFloat') { 12060 styleName = styleFloatAccessor; 12061 } 12062 if (styleValue) { 12063 style[styleName] = styleValue; 12064 } else { 12065 var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName]; 12066 if (expansion) { 12067 // Shorthand property that IE8 won't like unsetting, so unset each 12068 // component to placate it 12069 for (var individualStyleName in expansion) { 12070 style[individualStyleName] = ''; 12071 } 12072 } else { 12073 style[styleName] = ''; 12074 } 12075 } 12076 } 12077 } 12078 12079}; 12080 12081module.exports = CSSPropertyOperations; 12082/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 12083 12084/***/ }), 12085/* 109 */ 12086/***/ (function(module, exports, __webpack_require__) { 12087 12088"use strict"; 12089/** 12090 * Copyright 2013-present, Facebook, Inc. 12091 * All rights reserved. 12092 * 12093 * This source code is licensed under the BSD-style license found in the 12094 * LICENSE file in the root directory of this source tree. An additional grant 12095 * of patent rights can be found in the PATENTS file in the same directory. 12096 * 12097 */ 12098 12099 12100 12101var EventPluginHub = __webpack_require__(21); 12102var EventPropagators = __webpack_require__(22); 12103var ExecutionEnvironment = __webpack_require__(6); 12104var ReactDOMComponentTree = __webpack_require__(5); 12105var ReactUpdates = __webpack_require__(10); 12106var SyntheticEvent = __webpack_require__(12); 12107 12108var getEventTarget = __webpack_require__(45); 12109var isEventSupported = __webpack_require__(46); 12110var isTextInputElement = __webpack_require__(74); 12111 12112var eventTypes = { 12113 change: {
12114 phasedRegistrationNames: { 12115 bubbled: 'onChange', 12116 captured: 'onChangeCapture' 12117 }, 12118 dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange'] 12119 } 12120}; 12121 12122/** 12123 * For IE shims 12124 */ 12125var activeElement = null; 12126var activeElementInst = null; 12127var activeElementValue = null; 12128var activeElementValueProp = null; 12129 12130/** 12131 * SECTION: handle `change` event 12132 */ 12133function shouldUseChangeEvent(elem) { 12134 var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); 12135 return nodeName === 'select' || nodeName === 'input' && elem.type === 'file'; 12136} 12137 12138var doesChangeEventBubble = false; 12139if (ExecutionEnvironment.canUseDOM) { 12140 // See `handleChange` comment below 12141 doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8); 12142} 12143 12144function manualDispatchChangeEvent(nativeEvent) { 12145 var event = SyntheticEvent.getPooled(eventTypes.change, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); 12146 EventPropagators.accumulateTwoPhaseDispatches(event); 12147 12148 // If change and propertychange bubbled, we'd just bind to it like all the 12149 // other events and have it go through ReactBrowserEventEmitter. Since it 12150 // doesn't, we manually listen for the events and so we have to enqueue and 12151 // process the abstract event manually. 12152 // 12153 // Batching is necessary here in order to ensure that all event handlers run 12154 // before the next rerender (including event handlers attached to ancestor 12155 // elements instead of directly on the input). Without this, controlled 12156 // components don't work properly in conjunction with event bubbling because 12157 // the component is rerendered and the value reverted before all the event 12158 // handlers can run. See https://github.com/facebook/react/issues/708. 12159 ReactUpdates.batchedUpdates(runEventInBatch, event); 12160} 12161 12162function runEventInBatch(event) { 12163 EventPluginHub.enqueueEvents(event); 12164 EventPluginHub.processEventQueue(false); 12165} 12166 12167function startWatchingForChangeEventIE8(target, targetInst) { 12168 activeElement = target; 12169 activeElementInst = targetInst; 12170 activeElement.attachEvent('onchange', manualDispatchChangeEvent); 12171} 12172 12173function stopWatchingForChangeEventIE8() { 12174 if (!activeElement) { 12175 return; 12176 } 12177 activeElement.detachEvent('onchange', manualDispatchChangeEvent); 12178 activeElement = null; 12179 activeElementInst = null; 12180} 12181 12182function getTargetInstForChangeEvent(topLevelType, targetInst) { 12183 if (topLevelType === 'topChange') { 12184 return targetInst; 12185 } 12186} 12187function handleEventsForChangeEventIE8(topLevelType, target, targetInst) { 12188 if (topLevelType === 'topFocus') { 12189 // stopWatching() should be a noop here but we call it just in case we 12190 // missed a blur event somehow. 12191 stopWatchingForChangeEventIE8(); 12192 startWatchingForChangeEventIE8(target, targetInst); 12193 } else if (topLevelType === 'topBlur') { 12194 stopWatchingForChangeEventIE8(); 12195 } 12196} 12197 12198/** 12199 * SECTION: handle `input` event 12200 */ 12201var isInputEventSupported = false; 12202if (ExecutionEnvironment.canUseDOM) { 12203 // IE9 claims to support the input event but fails to trigger it when 12204 // deleting text, so we ignore its input events. 12205 // IE10+ fire input events to often, such when a placeholder 12206 // changes or when an input with a placeholder is focused. 12207 isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11); 12208} 12209 12210/** 12211 * (For IE <=11) Replacement getter/setter for the `value` property that gets 12212 * set on the active element. 12213 */ 12214var newValueProp = { 12215 get: function () { 12216 return activeElementValueProp.get.call(this); 12217 }, 12218 set: function (val) { 12219 // Cast to a string so we can do equality checks. 12220 activeElementValue = '' + val; 12221 activeElementValueProp.set.call(this, val); 12222 } 12223}; 12224 12225/** 12226 * (For IE <=11) Starts tracking propertychange events on the passed-in element 12227 * and override the value property so that we can distinguish user events from 12228 * value changes in JS. 12229 */ 12230function startWatchingForValueChange(target, targetInst) { 12231 activeElement = target; 12232 activeElementInst = targetInst; 12233 activeElementValue = target.value; 12234 activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value'); 12235 12236 // Not guarded in a canDefineProperty check: IE8 supports defineProperty only 12237 // on DOM elements 12238 Object.defineProperty(activeElement, 'value', newValueProp); 12239 if (activeElement.attachEvent) { 12240 activeElement.attachEvent('onpropertychange', handlePropertyChange); 12241 } else { 12242 activeElement.addEventListener('propertychange', handlePropertyChange, false); 12243 } 12244} 12245 12246/** 12247 * (For IE <=11) Removes the event listeners from the currently-tracked element, 12248 * if any exists. 12249 */ 12250function stopWatchingForValueChange() { 12251 if (!activeElement) { 12252 return; 12253 } 12254 12255 // delete restores the original property definition 12256 delete activeElement.value; 12257 12258 if (activeElement.detachEvent) { 12259 activeElement.detachEvent('onpropertychange', handlePropertyChange); 12260 } else { 12261 activeElement.removeEventListener('propertychange', handlePropertyChange, false); 12262 } 12263 12264 activeElement = null; 12265 activeElementInst = null; 12266 activeElementValue = null; 12267 activeElementValueProp = null; 12268} 12269 12270/** 12271 * (For IE <=11) Handles a propertychange event, sending a `change` event if 12272 * the value of the active element has changed. 12273 */ 12274function handlePropertyChange(nativeEvent) { 12275 if (nativeEvent.propertyName !== 'value') { 12276 return; 12277 } 12278 var value = nativeEvent.srcElement.value; 12279 if (value === activeElementValue) { 12280 return; 12281 } 12282 activeElementValue = value; 12283 12284 manualDispatchChangeEvent(nativeEvent); 12285} 12286 12287/** 12288 * If a `change` event should be fired, returns the target's ID. 12289 */ 12290function getTargetInstForInputEvent(topLevelType, targetInst) { 12291 if (topLevelType === 'topInput') { 12292 // In modern browsers (i.e., not IE8 or IE9), the input event is exactly 12293 // what we want so fall through here and trigger an abstract event 12294 return targetInst; 12295 } 12296} 12297 12298function handleEventsForInputEventIE(topLevelType, target, targetInst) { 12299 if (topLevelType === 'topFocus') { 12300 // In IE8, we can capture almost all .value changes by adding a 12301 // propertychange handler and looking for events with propertyName 12302 // equal to 'value' 12303 // In IE9-11, propertychange fires for most input events but is buggy and 12304 // doesn't fire when text is deleted, but conveniently, selectionchange 12305 // appears to fire in all of the remaining cases so we catch those and 12306 // forward the event if the value has changed 12307 // In either case, we don't want to call the event handler if the value 12308 // is changed from JS so we redefine a setter for `.value` that updates 12309 // our activeElementValue variable, allowing us to ignore those changes 12310 // 12311 // stopWatching() should be a noop here but we call it just in case we 12312 // missed a blur event somehow. 12313 stopWatchingForValueChange(); 12314 startWatchingForValueChange(target, targetInst); 12315 } else if (topLevelType === 'topBlur') { 12316 stopWatchingForValueChange(); 12317 } 12318} 12319 12320// For IE8 and IE9. 12321function getTargetInstForInputEventIE(topLevelType, targetInst) { 12322 if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') { 12323 // On the selectionchange event, the target is just document which isn't 12324 // helpful for us so just check activeElement instead. 12325 // 12326 // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire 12327 // propertychange on the first input event after setting `value` from a 12328 // script and fires only keydown, keypress, keyup. Catching keyup usually
12329 // gets it and catching keydown lets us fire an event for the first 12330 // keystroke if user does a key repeat (it'll be a little delayed: right 12331 // before the second keystroke). Other input methods (e.g., paste) seem to 12332 // fire selectionchange normally. 12333 if (activeElement && activeElement.value !== activeElementValue) { 12334 activeElementValue = activeElement.value; 12335 return activeElementInst; 12336 } 12337 } 12338} 12339 12340/** 12341 * SECTION: handle `click` event 12342 */ 12343function shouldUseClickEvent(elem) { 12344 // Use the `click` event to detect changes to checkbox and radio inputs. 12345 // This approach works across all browsers, whereas `change` does not fire 12346 // until `blur` in IE8. 12347 return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio'); 12348} 12349 12350function getTargetInstForClickEvent(topLevelType, targetInst) { 12351 if (topLevelType === 'topClick') { 12352 return targetInst; 12353 } 12354} 12355 12356function handleControlledInputBlur(inst, node) { 12357 // TODO: In IE, inst is occasionally null. Why? 12358 if (inst == null) { 12359 return; 12360 } 12361 12362 // Fiber and ReactDOM keep wrapper state in separate places 12363 var state = inst._wrapperState || node._wrapperState; 12364 12365 if (!state || !state.controlled || node.type !== 'number') { 12366 return; 12367 } 12368 12369 // If controlled, assign the value attribute to the current value on blur 12370 var value = '' + node.value; 12371 if (node.getAttribute('value') !== value) { 12372 node.setAttribute('value', value); 12373 } 12374} 12375 12376/** 12377 * This plugin creates an `onChange` event that normalizes change events 12378 * across form elements. This event fires at a time when it's possible to 12379 * change the element's value without seeing a flicker. 12380 * 12381 * Supported elements are: 12382 * - input (see `isTextInputElement`) 12383 * - textarea 12384 * - select 12385 */ 12386var ChangeEventPlugin = { 12387 12388 eventTypes: eventTypes, 12389 12390 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { 12391 var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; 12392 12393 var getTargetInstFunc, handleEventFunc; 12394 if (shouldUseChangeEvent(targetNode)) { 12395 if (doesChangeEventBubble) { 12396 getTargetInstFunc = getTargetInstForChangeEvent; 12397 } else { 12398 handleEventFunc = handleEventsForChangeEventIE8; 12399 } 12400 } else if (isTextInputElement(targetNode)) { 12401 if (isInputEventSupported) { 12402 getTargetInstFunc = getTargetInstForInputEvent; 12403 } else { 12404 getTargetInstFunc = getTargetInstForInputEventIE; 12405 handleEventFunc = handleEventsForInputEventIE; 12406 } 12407 } else if (shouldUseClickEvent(targetNode)) { 12408 getTargetInstFunc = getTargetInstForClickEvent; 12409 } 12410 12411 if (getTargetInstFunc) { 12412 var inst = getTargetInstFunc(topLevelType, targetInst); 12413 if (inst) { 12414 var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget); 12415 event.type = 'change'; 12416 EventPropagators.accumulateTwoPhaseDispatches(event); 12417 return event; 12418 } 12419 } 12420 12421 if (handleEventFunc) { 12422 handleEventFunc(topLevelType, targetNode, targetInst); 12423 } 12424 12425 // When blurring, set the value attribute for number inputs 12426 if (topLevelType === 'topBlur') { 12427 handleControlledInputBlur(targetInst, targetNode); 12428 } 12429 } 12430 12431}; 12432 12433module.exports = ChangeEventPlugin; 12434 12435/***/ }), 12436/* 110 */ 12437/***/ (function(module, exports, __webpack_require__) { 12438 12439"use strict"; 12440/* WEBPACK VAR INJECTION */(function(process) {/** 12441 * Copyright 2013-present, Facebook, Inc. 12442 * All rights reserved. 12443 * 12444 * This source code is licensed under the BSD-style license found in the 12445 * LICENSE file in the root directory of this source tree. An additional grant 12446 * of patent rights can be found in the PATENTS file in the same directory. 12447 * 12448 */ 12449 12450 12451 12452var _prodInvariant = __webpack_require__(3); 12453 12454var DOMLazyTree = __webpack_require__(17); 12455var ExecutionEnvironment = __webpack_require__(6); 12456 12457var createNodesFromMarkup = __webpack_require__(92); 12458var emptyFunction = __webpack_require__(9); 12459var invariant = __webpack_require__(1); 12460 12461var Danger = { 12462 12463 /** 12464 * Replaces a node with a string of markup at its current position within its 12465 * parent. The markup must render into a single root node. 12466 * 12467 * @param {DOMElement} oldChild Child node to replace. 12468 * @param {string} markup Markup to render in place of the child node. 12469 * @internal 12470 */ 12471 dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) { 12472 !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; 12473 !markup ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0; 12474 !(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; 12475 12476 if (typeof markup === 'string') { 12477 var newChild = createNodesFromMarkup(markup, emptyFunction)[0]; 12478 oldChild.parentNode.replaceChild(newChild, oldChild); 12479 } else { 12480 DOMLazyTree.replaceChildWithTree(oldChild, markup); 12481 } 12482 } 12483 12484}; 12485 12486module.exports = Danger; 12487/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 12488 12489/***/ }), 12490/* 111 */ 12491/***/ (function(module, exports, __webpack_require__) { 12492 12493"use strict"; 12494/** 12495 * Copyright 2013-present, Facebook, Inc. 12496 * All rights reserved. 12497 * 12498 * This source code is licensed under the BSD-style license found in the 12499 * LICENSE file in the root directory of this source tree. An additional grant 12500 * of patent rights can be found in the PATENTS file in the same directory. 12501 * 12502 */ 12503 12504 12505 12506/** 12507 * Module that is injectable into `EventPluginHub`, that specifies a 12508 * deterministic ordering of `EventPlugin`s. A convenient way to reason about 12509 * plugins, without having to package every one of them. This is better than 12510 * having plugins be ordered in the same order that they are injected because 12511 * that ordering would be influenced by the packaging order. 12512 * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that 12513 * preventing default on events is convenient in `SimpleEventPlugin` handlers. 12514 */ 12515 12516var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin']; 12517 12518module.exports = DefaultEventPluginOrder; 12519 12520/***/ }), 12521/* 112 */ 12522/***/ (function(module, exports, __webpack_require__) { 12523 12524"use strict"; 12525/** 12526 * Copyright 2013-present, Facebook, Inc. 12527 * All rights reserved. 12528 * 12529 * This source code is licensed under the BSD-style license found in the 12530 * LICENSE file in the root directory of this source tree. An additional grant 12531 * of patent rights can be found in the PATENTS file in the same directory. 12532 * 12533 */ 12534 12535 12536 12537var EventPropagators = __webpack_require__(22); 12538var ReactDOMComponentTree = __webpack_require__(5); 12539var SyntheticMouseEvent = __webpack_require__(28); 12540 12541var eventTypes = {
12542 mouseEnter: { 12543 registrationName: 'onMouseEnter', 12544 dependencies: ['topMouseOut', 'topMouseOver'] 12545 }, 12546 mouseLeave: { 12547 registrationName: 'onMouseLeave', 12548 dependencies: ['topMouseOut', 'topMouseOver'] 12549 } 12550}; 12551 12552var EnterLeaveEventPlugin = { 12553 12554 eventTypes: eventTypes, 12555 12556 /** 12557 * For almost every interaction we care about, there will be both a top-level 12558 * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that 12559 * we do not extract duplicate events. However, moving the mouse into the 12560 * browser from outside will not fire a `mouseout` event. In this case, we use 12561 * the `mouseover` top-level event. 12562 */ 12563 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { 12564 if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { 12565 return null; 12566 } 12567 if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') { 12568 // Must not be a mouse in or mouse out - ignoring. 12569 return null; 12570 } 12571 12572 var win; 12573 if (nativeEventTarget.window === nativeEventTarget) { 12574 // `nativeEventTarget` is probably a window object. 12575 win = nativeEventTarget; 12576 } else { 12577 // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. 12578 var doc = nativeEventTarget.ownerDocument; 12579 if (doc) { 12580 win = doc.defaultView || doc.parentWindow; 12581 } else { 12582 win = window; 12583 } 12584 } 12585 12586 var from; 12587 var to; 12588 if (topLevelType === 'topMouseOut') { 12589 from = targetInst; 12590 var related = nativeEvent.relatedTarget || nativeEvent.toElement; 12591 to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null; 12592 } else { 12593 // Moving to a node from outside the window. 12594 from = null; 12595 to = targetInst; 12596 } 12597 12598 if (from === to) { 12599 // Nothing pertains to our managed components. 12600 return null; 12601 } 12602 12603 var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from); 12604 var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to); 12605 12606 var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget); 12607 leave.type = 'mouseleave'; 12608 leave.target = fromNode; 12609 leave.relatedTarget = toNode; 12610 12611 var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget); 12612 enter.type = 'mouseenter'; 12613 enter.target = toNode; 12614 enter.relatedTarget = fromNode; 12615 12616 EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to); 12617 12618 return [leave, enter]; 12619 } 12620 12621}; 12622 12623module.exports = EnterLeaveEventPlugin; 12624 12625/***/ }), 12626/* 113 */ 12627/***/ (function(module, exports, __webpack_require__) { 12628 12629"use strict"; 12630/** 12631 * Copyright 2013-present, Facebook, Inc. 12632 * All rights reserved. 12633 * 12634 * This source code is licensed under the BSD-style license found in the 12635 * LICENSE file in the root directory of this source tree. An additional grant 12636 * of patent rights can be found in the PATENTS file in the same directory. 12637 * 12638 */ 12639 12640 12641 12642var _assign = __webpack_require__(4); 12643 12644var PooledClass = __webpack_require__(14); 12645 12646var getTextContentAccessor = __webpack_require__(72); 12647 12648/** 12649 * This helper class stores information about text content of a target node, 12650 * allowing comparison of content before and after a given event. 12651 * 12652 * Identify the node where selection currently begins, then observe 12653 * both its text content and its current position in the DOM. Since the 12654 * browser may natively replace the target node during composition, we can 12655 * use its position to find its replacement. 12656 * 12657 * @param {DOMEventTarget} root 12658 */ 12659function FallbackCompositionState(root) { 12660 this._root = root; 12661 this._startText = this.getText(); 12662 this._fallbackText = null; 12663} 12664 12665_assign(FallbackCompositionState.prototype, { 12666 destructor: function () { 12667 this._root = null; 12668 this._startText = null; 12669 this._fallbackText = null; 12670 }, 12671 12672 /** 12673 * Get current text of input. 12674 * 12675 * @return {string} 12676 */ 12677 getText: function () { 12678 if ('value' in this._root) { 12679 return this._root.value; 12680 } 12681 return this._root[getTextContentAccessor()]; 12682 }, 12683 12684 /** 12685 * Determine the differing substring between the initially stored 12686 * text content and the current content. 12687 * 12688 * @return {string} 12689 */ 12690 getData: function () { 12691 if (this._fallbackText) { 12692 return this._fallbackText; 12693 } 12694 12695 var start; 12696 var startValue = this._startText; 12697 var startLength = startValue.length; 12698 var end; 12699 var endValue = this.getText(); 12700 var endLength = endValue.length; 12701 12702 for (start = 0; start < startLength; start++) { 12703 if (startValue[start] !== endValue[start]) { 12704 break; 12705 } 12706 } 12707 12708 var minEnd = startLength - start; 12709 for (end = 1; end <= minEnd; end++) { 12710 if (startValue[startLength - end] !== endValue[endLength - end]) { 12711 break; 12712 } 12713 } 12714 12715 var sliceTail = end > 1 ? 1 - end : undefined; 12716 this._fallbackText = endValue.slice(start, sliceTail); 12717 return this._fallbackText; 12718 } 12719}); 12720 12721PooledClass.addPoolingTo(FallbackCompositionState); 12722 12723module.exports = FallbackCompositionState; 12724 12725/***/ }), 12726/* 114 */ 12727/***/ (function(module, exports, __webpack_require__) { 12728 12729"use strict"; 12730/** 12731 * Copyright 2013-present, Facebook, Inc. 12732 * All rights reserved. 12733 * 12734 * This source code is licensed under the BSD-style license found in the 12735 * LICENSE file in the root directory of this source tree. An additional grant 12736 * of patent rights can be found in the PATENTS file in the same directory. 12737 * 12738 */ 12739 12740 12741 12742var DOMProperty = __webpack_require__(13); 12743 12744var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; 12745var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; 12746var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE; 12747var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE; 12748var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE; 12749 12750var HTMLDOMPropertyConfig = { 12751 isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')), 12752 Properties: { 12753 /** 12754 * Standard Properties 12755 */ 12756 accept: 0, 12757 acceptCharset: 0, 12758 accessKey: 0, 12759 action: 0, 12760 allowFullScreen: HAS_BOOLEAN_VALUE, 12761 allowTransparency: 0, 12762 alt: 0, 12763 // specifies target context for links with `preload` type 12764 as: 0, 12765 async: HAS_BOOLEAN_VALUE, 12766 autoComplete: 0, 12767 // autoFocus is polyfilled/normalized by AutoFocusUtils 12768 // autoFocus: HAS_BOOLEAN_VALUE, 12769 autoPlay: HAS_BOOLEAN_VALUE, 12770 capture: HAS_BOOLEAN_VALUE, 12771 cellPadding: 0, 12772 cellSpacing: 0, 12773 charSet: 0, 12774 challenge: 0, 12775 checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, 12776 cite: 0, 12777 classID: 0, 12778 className: 0, 12779 cols: HAS_POSITIVE_NUMERIC_VALUE, 12780 colSpan: 0, 12781 content: 0, 12782 contentEditable: 0, 12783 contextMenu: 0, 12784 controls: HAS_BOOLEAN_VALUE, 12785 coords: 0, 12786 crossOrigin: 0, 12787 data: 0, // For `<object />` acts as `src`. 12788 dateTime: 0, 12789 'default': HAS_BOOLEAN_VALUE, 12790 defer: HAS_BOOLEAN_VALUE, 12791 dir: 0, 12792 disabled: HAS_BOOLEAN_VALUE, 12793 download: HAS_OVERLOADED_BOOLEAN_VALUE, 12794 draggable: 0, 12795 encType: 0, 12796 form: 0, 12797 formAction: 0, 12798 formEncType: 0, 12799 formMethod: 0, 12800 formNoValidate: HAS_BOOLEAN_VALUE, 12801 formTarget: 0, 12802 frameBorder: 0, 12803 headers: 0, 12804 height: 0, 12805 hidden: HAS_BOOLEAN_VALUE, 12806 high: 0, 12807 href: 0, 12808 hrefLang: 0, 12809 htmlFor: 0, 12810 httpEquiv: 0, 12811 icon: 0, 12812 id: 0, 12813 inputMode: 0, 12814 integrity: 0, 12815 is: 0, 12816 keyParams: 0, 12817 keyType: 0, 12818 kind: 0, 12819 label: 0, 12820 lang: 0, 12821 list: 0, 12822 loop: HAS_BOOLEAN_VALUE, 12823 low: 0, 12824 manifest: 0, 12825 marginHeight: 0, 12826 marginWidth: 0, 12827 max: 0, 12828 maxLength: 0, 12829 media: 0, 12830 mediaGroup: 0, 12831 method: 0, 12832 min: 0, 12833 minLength: 0, 12834 // Caution; `option.selected` is not updated if `select.multiple` is
12835 // disabled with `removeAttribute`. 12836 multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, 12837 muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, 12838 name: 0, 12839 nonce: 0, 12840 noValidate: HAS_BOOLEAN_VALUE, 12841 open: HAS_BOOLEAN_VALUE, 12842 optimum: 0, 12843 pattern: 0, 12844 placeholder: 0, 12845 playsInline: HAS_BOOLEAN_VALUE, 12846 poster: 0, 12847 preload: 0, 12848 profile: 0, 12849 radioGroup: 0, 12850 readOnly: HAS_BOOLEAN_VALUE, 12851 referrerPolicy: 0, 12852 rel: 0, 12853 required: HAS_BOOLEAN_VALUE, 12854 reversed: HAS_BOOLEAN_VALUE, 12855 role: 0, 12856 rows: HAS_POSITIVE_NUMERIC_VALUE, 12857 rowSpan: HAS_NUMERIC_VALUE, 12858 sandbox: 0, 12859 scope: 0, 12860 scoped: HAS_BOOLEAN_VALUE, 12861 scrolling: 0, 12862 seamless: HAS_BOOLEAN_VALUE, 12863 selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, 12864 shape: 0, 12865 size: HAS_POSITIVE_NUMERIC_VALUE, 12866 sizes: 0, 12867 span: HAS_POSITIVE_NUMERIC_VALUE, 12868 spellCheck: 0, 12869 src: 0, 12870 srcDoc: 0, 12871 srcLang: 0, 12872 srcSet: 0, 12873 start: HAS_NUMERIC_VALUE, 12874 step: 0, 12875 style: 0, 12876 summary: 0, 12877 tabIndex: 0, 12878 target: 0, 12879 title: 0, 12880 // Setting .type throws on non-<input> tags 12881 type: 0, 12882 useMap: 0, 12883 value: 0, 12884 width: 0, 12885 wmode: 0, 12886 wrap: 0, 12887 12888 /** 12889 * RDFa Properties 12890 */ 12891 about: 0, 12892 datatype: 0, 12893 inlist: 0, 12894 prefix: 0, 12895 // property is also supported for OpenGraph in meta tags. 12896 property: 0, 12897 resource: 0, 12898 'typeof': 0, 12899 vocab: 0, 12900 12901 /** 12902 * Non-standard Properties 12903 */ 12904 // autoCapitalize and autoCorrect are supported in Mobile Safari for 12905 // keyboard hints. 12906 autoCapitalize: 0, 12907 autoCorrect: 0, 12908 // autoSave allows WebKit/Blink to persist values of input fields on page reloads 12909 autoSave: 0, 12910 // color is for Safari mask-icon link 12911 color: 0, 12912 // itemProp, itemScope, itemType are for 12913 // Microdata support. See http://schema.org/docs/gs.html 12914 itemProp: 0, 12915 itemScope: HAS_BOOLEAN_VALUE, 12916 itemType: 0, 12917 // itemID and itemRef are for Microdata support as well but 12918 // only specified in the WHATWG spec document. See 12919 // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api 12920 itemID: 0, 12921 itemRef: 0, 12922 // results show looking glass icon and recent searches on input 12923 // search fields in WebKit/Blink 12924 results: 0, 12925 // IE-only attribute that specifies security restrictions on an iframe 12926 // as an alternative to the sandbox attribute on IE<10 12927 security: 0, 12928 // IE-only attribute that controls focus behavior 12929 unselectable: 0 12930 }, 12931 DOMAttributeNames: { 12932 acceptCharset: 'accept-charset', 12933 className: 'class', 12934 htmlFor: 'for', 12935 httpEquiv: 'http-equiv' 12936 }, 12937 DOMPropertyNames: {}, 12938 DOMMutationMethods: { 12939 value: function (node, value) { 12940 if (value == null) { 12941 return node.removeAttribute('value'); 12942 } 12943 12944 // Number inputs get special treatment due to some edge cases in 12945 // Chrome. Let everything else assign the value attribute as normal. 12946 // https://github.com/facebook/react/issues/7253#issuecomment-236074326 12947 if (node.type !== 'number' || node.hasAttribute('value') === false) { 12948 node.setAttribute('value', '' + value); 12949 } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) { 12950 // Don't assign an attribute if validation reports bad 12951 // input. Chrome will clear the value. Additionally, don't 12952 // operate on inputs that have focus, otherwise Chrome might 12953 // strip off trailing decimal places and cause the user's 12954 // cursor position to jump to the beginning of the input. 12955 // 12956 // In ReactDOMInput, we have an onBlur event that will trigger 12957 // this function again when focus is lost. 12958 node.setAttribute('value', '' + value); 12959 } 12960 } 12961 } 12962}; 12963 12964module.exports = HTMLDOMPropertyConfig; 12965 12966/***/ }), 12967/* 115 */ 12968/***/ (function(module, exports, __webpack_require__) { 12969 12970"use strict"; 12971/* WEBPACK VAR INJECTION */(function(process) {/** 12972 * Copyright 2014-present, Facebook, Inc. 12973 * All rights reserved. 12974 * 12975 * This source code is licensed under the BSD-style license found in the 12976 * LICENSE file in the root directory of this source tree. An additional grant 12977 * of patent rights can be found in the PATENTS file in the same directory. 12978 * 12979 */ 12980 12981 12982 12983var ReactReconciler = __webpack_require__(18); 12984 12985var instantiateReactComponent = __webpack_require__(73); 12986var KeyEscapeUtils = __webpack_require__(37); 12987var shouldUpdateReactComponent = __webpack_require__(47); 12988var traverseAllChildren = __webpack_require__(76); 12989var warning = __webpack_require__(2); 12990 12991var ReactComponentTreeHook; 12992 12993if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { 12994 // Temporary hack. 12995 // Inline requires don't work well with Jest: 12996 // https://github.com/facebook/react/issues/7240 12997 // Remove the inline requires when we don't need them anymore: 12998 // https://github.com/facebook/react/pull/7178 12999 ReactComponentTreeHook = __webpack_require__(7); 13000} 13001 13002function instantiateChild(childInstances, child, name, selfDebugID) { 13003 // We found a component instance. 13004 var keyUnique = childInstances[name] === undefined; 13005 if (process.env.NODE_ENV !== 'production') { 13006 if (!ReactComponentTreeHook) { 13007 ReactComponentTreeHook = __webpack_require__(7); 13008 } 13009 if (!keyUnique) { 13010 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; 13011 } 13012 } 13013 if (child != null && keyUnique) { 13014 childInstances[name] = instantiateReactComponent(child, true); 13015 } 13016} 13017 13018/** 13019 * ReactChildReconciler provides helpers for initializing or updating a set of 13020 * children. Its output is suitable for passing it onto ReactMultiChild which 13021 * does diffed reordering and insertion. 13022 */ 13023var ReactChildReconciler = { 13024 /** 13025 * Generates a "mount image" for each of the supplied children. In the case 13026 * of `ReactDOMComponent`, a mount image is a string of markup. 13027 * 13028 * @param {?object} nestedChildNodes Nested child maps. 13029 * @return {?object} A set of child instances. 13030 * @internal 13031 */ 13032 instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots 13033 ) { 13034 if (nestedChildNodes == null) { 13035 return null; 13036 } 13037 var childInstances = {}; 13038 13039 if (process.env.NODE_ENV !== 'production') { 13040 traverseAllChildren(nestedChildNodes, function (childInsts, child, name) { 13041 return instantiateChild(childInsts, child, name, selfDebugID); 13042 }, childInstances); 13043 } else { 13044 traverseAllChildren(nestedChildNodes, instantiateChild, childInstances); 13045 } 13046 return childInstances; 13047 }, 13048 13049 /** 13050 * Updates the rendered children and returns a new set of children. 13051 * 13052 * @param {?object} prevChildren Previously initialized set of children. 13053 * @param {?object} nextChildren Flat child element maps. 13054 * @param {ReactReconcileTransaction} transaction 13055 * @param {object} context 13056 * @return {?object} A new set of child instances. 13057 * @internal 13058 */ 13059 updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots 13060 ) { 13061 // We currently don't have a way to track moves here but if we use iterators 13062 // instead of for..in we can zip the iterators and check if an item has 13063 // moved. 13064 // TODO: If nothing has changed, return the prevChildren object so that we 13065 // can quickly bailout if nothing has changed. 13066 if (!nextChildren && !prevChildren) { 13067 return; 13068 } 13069 var name; 13070 var prevChild; 13071 for (name in nextChildren) { 13072 if (!nextChildren.hasOwnProperty(name)) { 13073 continue; 13074 } 13075 prevChild = prevChildren && prevChildren[name]; 13076 var prevElement = prevChild && prevChild._currentElement; 13077 var nextElement = nextChildren[name]; 13078 if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) { 13079 ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context); 13080 nextChildren[name] = prevChild; 13081 } else { 13082 if (prevChild) { 13083 removedNodes[name] = ReactReconciler.getHostNode(prevChild); 13084 ReactReconciler.unmountComponent(prevChild, false); 13085 } 13086 // The child must be instantiated before it's mounted. 13087 var nextChildInstance = instantiateReactComponent(nextElement, true); 13088 nextChildren[name] = nextChildInstance;
13089 // Creating mount image now ensures refs are resolved in right order 13090 // (see https://github.com/facebook/react/pull/7101 for explanation). 13091 var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID); 13092 mountImages.push(nextChildMountImage); 13093 } 13094 } 13095 // Unmount children that are no longer present. 13096 for (name in prevChildren) { 13097 if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) { 13098 prevChild = prevChildren[name]; 13099 removedNodes[name] = ReactReconciler.getHostNode(prevChild); 13100 ReactReconciler.unmountComponent(prevChild, false); 13101 } 13102 } 13103 }, 13104 13105 /** 13106 * Unmounts all rendered children. This should be used to clean up children 13107 * when this component is unmounted. 13108 * 13109 * @param {?object} renderedChildren Previously initialized set of children. 13110 * @internal 13111 */ 13112 unmountChildren: function (renderedChildren, safely) { 13113 for (var name in renderedChildren) { 13114 if (renderedChildren.hasOwnProperty(name)) { 13115 var renderedChild = renderedChildren[name]; 13116 ReactReconciler.unmountComponent(renderedChild, safely); 13117 } 13118 } 13119 } 13120 13121}; 13122 13123module.exports = ReactChildReconciler; 13124/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 13125 13126/***/ }), 13127/* 116 */ 13128/***/ (function(module, exports, __webpack_require__) { 13129 13130"use strict"; 13131/** 13132 * Copyright 2013-present, Facebook, Inc. 13133 * All rights reserved. 13134 * 13135 * This source code is licensed under the BSD-style license found in the 13136 * LICENSE file in the root directory of this source tree. An additional grant 13137 * of patent rights can be found in the PATENTS file in the same directory. 13138 * 13139 */ 13140 13141 13142 13143var DOMChildrenOperations = __webpack_require__(34); 13144var ReactDOMIDOperations = __webpack_require__(123); 13145 13146/** 13147 * Abstracts away all functionality of the reconciler that requires knowledge of 13148 * the browser context. TODO: These callers should be refactored to avoid the 13149 * need for this injection. 13150 */ 13151var ReactComponentBrowserEnvironment = { 13152 13153 processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, 13154 13155 replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup 13156 13157}; 13158 13159module.exports = ReactComponentBrowserEnvironment; 13160 13161/***/ }), 13162/* 117 */ 13163/***/ (function(module, exports, __webpack_require__) { 13164 13165"use strict"; 13166/* WEBPACK VAR INJECTION */(function(process) {/** 13167 * Copyright 2013-present, Facebook, Inc. 13168 * All rights reserved. 13169 * 13170 * This source code is licensed under the BSD-style license found in the 13171 * LICENSE file in the root directory of this source tree. An additional grant 13172 * of patent rights can be found in the PATENTS file in the same directory. 13173 * 13174 */ 13175 13176 13177 13178var _prodInvariant = __webpack_require__(3), 13179 _assign = __webpack_require__(4); 13180 13181var React = __webpack_require__(19); 13182var ReactComponentEnvironment = __webpack_require__(39); 13183var ReactCurrentOwner = __webpack_require__(11); 13184var ReactErrorUtils = __webpack_require__(40); 13185var ReactInstanceMap = __webpack_require__(23); 13186var ReactInstrumentation = __webpack_require__(8); 13187var ReactNodeTypes = __webpack_require__(66); 13188var ReactReconciler = __webpack_require__(18); 13189 13190if (process.env.NODE_ENV !== 'production') { 13191 var checkReactTypeSpec = __webpack_require__(165); 13192} 13193 13194var emptyObject = __webpack_require__(20); 13195var invariant = __webpack_require__(1); 13196var shallowEqual = __webpack_require__(33); 13197var shouldUpdateReactComponent = __webpack_require__(47); 13198var warning = __webpack_require__(2); 13199 13200var CompositeTypes = { 13201 ImpureClass: 0, 13202 PureClass: 1, 13203 StatelessFunctional: 2 13204}; 13205 13206function StatelessComponent(Component) {} 13207StatelessComponent.prototype.render = function () { 13208 var Component = ReactInstanceMap.get(this)._currentElement.type; 13209 var element = Component(this.props, this.context, this.updater); 13210 warnIfInvalidElement(Component, element); 13211 return element; 13212}; 13213 13214function warnIfInvalidElement(Component, element) { 13215 if (process.env.NODE_ENV !== 'production') { 13216 process.env.NODE_ENV !== 'production' ? warning(element === null || element === false || React.isValidElement(element), '%s(...): A val
13216id 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; 13217 process.env.NODE_ENV !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0; 13218 } 13219} 13220 13221function shouldConstruct(Component) { 13222 return !!(Component.prototype && Component.prototype.isReactComponent); 13223} 13224 13225function isPureComponent(Component) { 13226 return !!(Component.prototype && Component.prototype.isPureReactComponent); 13227} 13228 13229// Separated into a function to contain deoptimizations caused by try/finally. 13230function measureLifeCyclePerf(fn, debugID, timerType) { 13231 if (debugID === 0) { 13232 // Top-level wrappers (see ReactMount) and empty components (see 13233 // ReactDOMEmptyComponent) are invisible to hooks and devtools. 13234 // Both are implementation details that should go away in the future. 13235 return fn(); 13236 } 13237 13238 ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType); 13239 try { 13240 return fn(); 13241 } finally { 13242 ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType); 13243 } 13244} 13245 13246/** 13247 * ------------------ The Life-Cycle of a Composite Component ------------------ 13248 * 13249 * - constructor: Initialization of state. The instance is now retained. 13250 * - componentWillMount 13251 * - render 13252 * - [children's constructors] 13253 * - [children's componentWillMount and render] 13254 * - [children's componentDidMount] 13255 * - componentDidMount 13256 * 13257 * Update Phases: 13258 * - componentWillReceiveProps (only called if parent updated) 13259 * - shouldComponentUpdate 13260 * - componentWillUpdate 13261 * - render 13262 * - [children's constructors or receive props phases] 13263 * - componentDidUpdate 13264 * 13265 * - componentWillUnmount 13266 * - [children's componentWillUnmount] 13267 * - [children destroyed] 13268 * - (destroyed): The instance is now blank, released by React and ready for GC. 13269 * 13270 * ----------------------------------------------------------------------------- 13271 */ 13272 13273/** 13274 * An incrementing ID assigned to each component when it is mounted. This is 13275 * used to enforce the order in which `ReactUpdates` updates dirty components. 13276 * 13277 * @private 13278 */ 13279var nextMountID = 1; 13280 13281/** 13282 * @lends {ReactCompositeComponent.prototype} 13283 */ 13284var ReactCompositeComponent = { 13285 13286 /** 13287 * Base constructor for all composite component. 13288 * 13289 * @param {ReactElement} element 13290 * @final 13291 * @internal 13292 */ 13293 construct: function (element) { 13294 this._currentElement = element; 13295 this._rootNodeID = 0; 13296 this._compositeType = null; 13297 this._instance = null; 13298 this._hostParent = null; 13299 this._hostContainerInfo = null; 13300 13301 // See ReactUpdateQueue 13302 this._updateBatchNumber = null; 13303 this._pendingElement = null; 13304 this._pendingStateQueue = null; 13305 this._pendingReplaceState = false; 13306 this._pendingForceUpdate = false; 13307 13308 this._renderedNodeType = null; 13309 this._renderedComponent = null; 13310 this._context = null; 13311 this._mountOrder = 0; 13312 this._topLevelWrapper = null; 13313 13314 // See ReactUpdates and ReactUpdateQueue. 13315 this._pendingCallbacks = null; 13316 13317 // ComponentWillUnmount shall only be called once 13318 this._calledComponentWillUnmount = false; 13319 13320 if (process.env.NODE_ENV !== 'production') { 13321 this._warnedAboutRefsInRender = false;
13322 } 13323 }, 13324 13325 /** 13326 * Initializes the component, renders markup, and registers event listeners. 13327 * 13328 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction 13329 * @param {?object} hostParent 13330 * @param {?object} hostContainerInfo 13331 * @param {?object} context 13332 * @return {?string} Rendered markup to be inserted into the DOM. 13333 * @final 13334 * @internal 13335 */ 13336 mountComponent: function (transaction, hostParent, hostContainerInfo, context) { 13337 var _this = this; 13338 13339 this._context = context; 13340 this._mountOrder = nextMountID++; 13341 this._hostParent = hostParent; 13342 this._hostContainerInfo = hostContainerInfo; 13343 13344 var publicProps = this._currentElement.props; 13345 var publicContext = this._processContext(context); 13346 13347 var Component = this._currentElement.type; 13348 13349 var updateQueue = transaction.getUpdateQueue(); 13350 13351 // Initialize the public class 13352 var doConstruct = shouldConstruct(Component); 13353 var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue); 13354 var renderedElement; 13355 13356 // Support functional components 13357 if (!doConstruct && (inst == null || inst.render == null)) { 13358 renderedElement = inst; 13359 warnIfInvalidElement(Component, renderedElement); 13360 !(inst === null || inst === false || React.isValidElement(inst)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): A val
13360id 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; 13361 inst = new StatelessComponent(Component); 13362 this._compositeType = CompositeTypes.StatelessFunctional; 13363 } else { 13364 if (isPureComponent(Component)) { 13365 this._compositeType = CompositeTypes.PureClass; 13366 } else { 13367 this._compositeType = CompositeTypes.ImpureClass; 13368 } 13369 } 13370 13371 if (process.env.NODE_ENV !== 'production') { 13372 // This will throw later in _renderValidatedComponent, but add an early 13373 // warning now to help debugging 13374 if (inst.render == null) { 13375 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; 13376 } 13377 13378 var propsMutated = inst.props !== publicProps; 13379 var componentName = Component.displayName || Component.name || 'Component'; 13380 13381 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; 13382 } 13383 13384 // These should be set up in the constructor, but as a convenience for 13385 // simpler class abstractions, we set them up after the fact. 13386 inst.props = publicProps; 13387 inst.context = publicContext; 13388 inst.refs = emptyObject; 13389 inst.updater = updateQueue; 13390 13391 this._instance = inst; 13392 13393 // Store a reference from the instance back to the internal representation 13394 ReactInstanceMap.set(inst, this); 13395 13396 if (process.env.NODE_ENV !== 'production') { 13397 // Since plain JS classes are defined without any special initialization 13398 // logic, we can not catch common errors early. Therefore, we have to 13399 // catch them here, at initialization time, instead. 13400 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; 13401 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; 13402 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; 13403 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; 13404 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 c
13404omponent') : void 0; 13405 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; 13406 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; 13407 } 13408 13409 var initialState = inst.state; 13410 if (initialState === undefined) { 13411 inst.state = initialState = null; 13412 } 13413 !(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; 13414 13415 this._pendingStateQueue = null; 13416 this._pendingReplaceState = false; 13417 this._pendingForceUpdate = false; 13418 13419 var markup; 13420 if (inst.unstable_handleError) { 13421 markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context); 13422 } else { 13423 markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); 13424 } 13425 13426 if (inst.componentDidMount) { 13427 if (process.env.NODE_ENV !== 'production') { 13428 transaction.getReactMountReady().enqueue(function () { 13429 measureLifeCyclePerf(function () { 13430 return inst.componentDidMount(); 13431 }, _this._debugID, 'componentDidMount'); 13432 }); 13433 } else { 13434 transaction.getReactMountReady().enqueue(inst.componentDidMount, inst); 13435 } 13436 } 13437 13438 return markup; 13439 }, 13440 13441 _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) { 13442 if (process.env.NODE_ENV !== 'production') { 13443 ReactCurrentOwner.current = this; 13444 try { 13445 return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue); 13446 } finally { 13447 ReactCurrentOwner.current = null; 13448 } 13449 } else { 13450 return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue); 13451 } 13452 }, 13453 13454 _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) { 13455 var Component = this._currentElement.type; 13456 13457 if (doConstruct) { 13458 if (process.env.NODE_ENV !== 'production') { 13459 return measureLifeCyclePerf(function () { 13460 return new Component(publicProps, publicContext, updateQueue); 13461 }, this._debugID, 'ctor'); 13462 } else { 13463 return new Component(publicProps, publicContext, updateQueue); 13464 } 13465 } 13466 13467 // This can still be an instance in case of factory components 13468 // but we'll count this as time spent rendering as the more common case. 13469 if (process.env.NODE_ENV !== 'production') { 13470 return measureLifeCyclePerf(function () { 13471 return Component(publicProps, publicContext, updateQueue); 13472 }, this._debugID, 'render'); 13473 } else { 13474 return Component(publicProps, publicContext, updateQueue); 13475 } 13476 }, 13477 13478 performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { 13479 var markup; 13480 var checkpoint = transaction.checkpoint(); 13481 try { 13482 markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); 13483 } catch (e) { 13484 // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint 13485 transaction.rollback(checkpoint); 13486 this._instance.unstable_handleError(e); 13487 if (this._pendingStateQueue) { 13488 this._instance.state = this._processPendingState(this._instance.props, this._instance.context); 13489 } 13490 checkpoint = transaction.checkpoint(); 13491 13492 this._renderedComponent.unmountComponent(true); 13493 transaction.rollback(checkpoint); 13494 13495 // Try again - we've informed the component about the error, so they can render an error message this time. 13496 // If this throws again, the error will bubble up (and can be caught by a higher error boundary). 13497 markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); 13498 } 13499 return markup; 13500 }, 13501 13502 performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { 13503 var inst = this._instance; 13504 13505 var debugID = 0; 13506 if (process.env.NODE_ENV !== 'production') { 13507 debugID = this._debugID; 13508 } 13509 13510 if (inst.componentWillMount) { 13511 if (process.env.NODE_ENV !== 'production') { 13512 measureLifeCyclePerf(function () { 13513 return inst.componentWillMount(); 13514 }, debugID, 'componentWillMount'); 13515 } else { 13516 inst.componentWillMount(); 13517 } 13518 // When mounting, calls to `setState` by `componentWillMount` will set 13519 // `this._pendingStateQueue` without triggering a re-render.
13520 if (this._pendingStateQueue) { 13521 inst.state = this._processPendingState(inst.props, inst.context); 13522 } 13523 } 13524 13525 // If not a stateless component, we now render 13526 if (renderedElement === undefined) { 13527 renderedElement = this._renderValidatedComponent(); 13528 } 13529 13530 var nodeType = ReactNodeTypes.getType(renderedElement); 13531 this._renderedNodeType = nodeType; 13532 var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */ 13533 ); 13534 this._renderedComponent = child; 13535 13536 var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID); 13537 13538 if (process.env.NODE_ENV !== 'production') { 13539 if (debugID !== 0) { 13540 var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; 13541 ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); 13542 } 13543 } 13544 13545 return markup; 13546 }, 13547 13548 getHostNode: function () { 13549 return ReactReconciler.getHostNode(this._renderedComponent); 13550 }, 13551 13552 /** 13553 * Releases any resources allocated by `mountComponent`. 13554 * 13555 * @final 13556 * @internal 13557 */ 13558 unmountComponent: function (safely) { 13559 if (!this._renderedComponent) { 13560 return; 13561 } 13562 13563 var inst = this._instance; 13564 13565 if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) { 13566 inst._calledComponentWillUnmount = true; 13567 13568 if (safely) { 13569 var name = this.getName() + '.componentWillUnmount()'; 13570 ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst)); 13571 } else { 13572 if (process.env.NODE_ENV !== 'production') { 13573 measureLifeCyclePerf(function () { 13574 return inst.componentWillUnmount(); 13575 }, this._debugID, 'componentWillUnmount'); 13576 } else { 13577 inst.componentWillUnmount(); 13578 } 13579 } 13580 } 13581 13582 if (this._renderedComponent) { 13583 ReactReconciler.unmountComponent(this._renderedComponent, safely); 13584 this._renderedNodeType = null; 13585 this._renderedComponent = null; 13586 this._instance = null; 13587 } 13588 13589 // Reset pending fields 13590 // Even if this component is scheduled for another update in ReactUpdates, 13591 // it would still be ignored because these fields are reset. 13592 this._pendingStateQueue = null; 13593 this._pendingReplaceState = false; 13594 this._pendingForceUpdate = false; 13595 this._pendingCallbacks = null; 13596 this._pendingElement = null; 13597 13598 // These fields do not really need to be reset since this object is no 13599 // longer accessible. 13600 this._context = null; 13601 this._rootNodeID = 0; 13602 this._topLevelWrapper = null; 13603 13604 // Delete the reference from the instance to this internal representation 13605 // which allow the internals to be properly cleaned up even if the user 13606 // leaks a reference to the public instance. 13607 ReactInstanceMap.remove(inst); 13608 13609 // Some existing components rely on inst.props even after they've been 13610 // destroyed (in event handlers). 13611 // TODO: inst.props = null; 13612 // TODO: inst.state = null; 13613 // TODO: inst.context = null; 13614 }, 13615 13616 /** 13617 * Filters the context object to only contain keys specified in 13618 * `contextTypes` 13619 * 13620 * @param {object} context 13621 * @return {?object} 13622 * @private 13623 */ 13624 _maskContext: function (context) { 13625 var Component = this._currentElement.type; 13626 var contextTypes = Component.contextTypes; 13627 if (!contextTypes) { 13628 return emptyObject; 13629 } 13630 var maskedContext = {}; 13631 for (var contextName in contextTypes) { 13632 maskedContext[contextName] = context[contextName]; 13633 } 13634 return maskedContext; 13635 }, 13636 13637 /** 13638 * Filters the context object to only contain keys specified in 13639 * `contextTypes`, and asserts that they are valid. 13640 * 13641 * @param {object} context 13642 * @return {?object} 13643 * @private 13644 */ 13645 _processContext: function (context) { 13646 var maskedContext = this._maskContext(context); 13647 if (process.env.NODE_ENV !== 'production') { 13648 var Component = this._currentElement.type; 13649 if (Component.contextTypes) { 13650 this._checkContextTypes(Component.contextTypes, maskedContext, 'context'); 13651 } 13652 } 13653 return maskedContext; 13654 }, 13655 13656 /** 13657 * @param {object} currentContext 13658 * @return {object} 13659 * @private 13660 */ 13661 _processChildContext: function (currentContext) { 13662 var Component = this._currentElement.type; 13663 var inst = this._instance; 13664 var childContext; 13665 13666 if (inst.getChildContext) { 13667 if (process.env.NODE_ENV !== 'production') { 13668 ReactInstrumentation.debugTool.onBeginProcessingChildContext(); 13669 try { 13670 childContext = inst.getChildContext(); 13671 } finally { 13672 ReactInstrumentation.debugTool.onEndProcessingChildContext(); 13673 } 13674 } else { 13675 childContext = inst.getChildContext(); 13676 } 13677 } 13678 13679 if (childContext) { 13680 !(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; 13681 if (process.env.NODE_ENV !== 'production') { 13682 this._checkContextTypes(Component.childContextTypes, childContext, 'child context'); 13683 } 13684 for (var name in childContext) { 13685 !(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; 13686 } 13687 return _assign({}, currentContext, childContext); 13688 } 13689 return currentContext; 13690 }, 13691 13692 /** 13693 * Assert that the context types are valid 13694 * 13695 * @param {object} typeSpecs Map of context field to a ReactPropType 13696 * @param {object} values Runtime values that need to be type-checked 13697 * @param {string} location e.g. "prop", "context", "child context" 13698 * @private 13699 */ 13700 _checkContextTypes: function (typeSpecs, values, location) { 13701 if (process.env.NODE_ENV !== 'production') { 13702 checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID); 13703 } 13704 }, 13705 13706 receiveComponent: function (nextElement, transaction, nextContext) { 13707 var prevElement = this._currentElement; 13708 var prevContext = this._context; 13709 13710 this._pendingElement = null; 13711 13712 this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext); 13713 }, 13714 13715 /** 13716 * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate` 13717 * is set, update the component. 13718 * 13719 * @param {ReactReconcileTransaction} transaction 13720 * @internal 13721 */ 13722 performUpdateIfNecessary: function (transaction) {
13723 if (this._pendingElement != null) { 13724 ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context); 13725 } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) { 13726 this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context); 13727 } else { 13728 this._updateBatchNumber = null; 13729 } 13730 }, 13731 13732 /** 13733 * Perform an update to a mounted component. The componentWillReceiveProps and 13734 * shouldComponentUpdate methods are called, then (assuming the update isn't 13735 * skipped) the remaining update lifecycle methods are called and the DOM 13736 * representation is updated. 13737 * 13738 * By default, this implements React's rendering and reconciliation algorithm. 13739 * Sophisticated clients may wish to override this. 13740 * 13741 * @param {ReactReconcileTransaction} transaction 13742 * @param {ReactElement} prevParentElement 13743 * @param {ReactElement} nextParentElement 13744 * @internal 13745 * @overridable 13746 */ 13747 updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) { 13748 var inst = this._instance; 13749 !(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; 13750 13751 var willReceive = false; 13752 var nextContext; 13753 13754 // Determine if the context has changed or not 13755 if (this._context === nextUnmaskedContext) { 13756 nextContext = inst.context; 13757 } else { 13758 nextContext = this._processContext(nextUnmaskedContext); 13759 willReceive = true; 13760 } 13761 13762 var prevProps = prevParentElement.props; 13763 var nextProps = nextParentElement.props; 13764 13765 // Not a simple state update but a props update 13766 if (prevParentElement !== nextParentElement) { 13767 willReceive = true; 13768 } 13769 13770 // An update here will schedule an update but immediately set 13771 // _pendingStateQueue which will ensure that any state updates gets 13772 // immediately reconciled instead of waiting for the next batch. 13773 if (willReceive && inst.componentWillReceiveProps) { 13774 if (process.env.NODE_ENV !== 'production') { 13775 measureLifeCyclePerf(function () { 13776 return inst.componentWillReceiveProps(nextProps, nextContext); 13777 }, this._debugID, 'componentWillReceiveProps'); 13778 } else { 13779 inst.componentWillReceiveProps(nextProps, nextContext); 13780 } 13781 } 13782 13783 var nextState = this._processPendingState(nextProps, nextContext); 13784 var shouldUpdate = true; 13785 13786 if (!this._pendingForceUpdate) { 13787 if (inst.shouldComponentUpdate) { 13788 if (process.env.NODE_ENV !== 'production') { 13789 shouldUpdate = measureLifeCyclePerf(function () { 13790 return inst.shouldComponentUpdate(nextProps, nextState, nextContext); 13791 }, this._debugID, 'shouldComponentUpdate'); 13792 } else { 13793 shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext); 13794 } 13795 } else { 13796 if (this._compositeType === CompositeTypes.PureClass) { 13797 shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState); 13798 } 13799 } 13800 } 13801 13802 if (process.env.NODE_ENV !== 'production') { 13803 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; 13804 } 13805 13806 this._updateBatchNumber = null; 13807 if (shouldUpdate) { 13808 this._pendingForceUpdate = false; 13809 // Will set `this.props`, `this.state` and `this.context`. 13810 this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext); 13811 } else { 13812 // If it's determined that a component should not update, we still want 13813 // to set props and state but we shortcut the rest of the update. 13814 this._currentElement = nextParentElement; 13815 this._context = nextUnmaskedContext; 13816 inst.props = nextProps; 13817 inst.state = nextState; 13818 inst.context = nextContext; 13819 } 13820 }, 13821 13822 _processPendingState: function (props, context) { 13823 var inst = this._instance; 13824 var queue = this._pendingStateQueue; 13825 var replace = this._pendingReplaceState; 13826 this._pendingReplaceState = false;
13827 this._pendingStateQueue = null; 13828 13829 if (!queue) { 13830 return inst.state; 13831 } 13832 13833 if (replace && queue.length === 1) { 13834 return queue[0]; 13835 } 13836 13837 var nextState = _assign({}, replace ? queue[0] : inst.state); 13838 for (var i = replace ? 1 : 0; i < queue.length; i++) { 13839 var partial = queue[i]; 13840 _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial); 13841 } 13842 13843 return nextState; 13844 }, 13845 13846 /** 13847 * Merges new props and state, notifies delegate methods of update and 13848 * performs update. 13849 * 13850 * @param {ReactElement} nextElement Next element 13851 * @param {object} nextProps Next public object to set as properties. 13852 * @param {?object} nextState Next object to set as state. 13853 * @param {?object} nextContext Next public object to set as context. 13854 * @param {ReactReconcileTransaction} transaction 13855 * @param {?object} unmaskedContext 13856 * @private 13857 */ 13858 _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) { 13859 var _this2 = this; 13860 13861 var inst = this._instance; 13862 13863 var hasComponentDidUpdate = Boolean(inst.componentDidUpdate); 13864 var prevProps; 13865 var prevState; 13866 var prevContext; 13867 if (hasComponentDidUpdate) { 13868 prevProps = inst.props; 13869 prevState = inst.state; 13870 prevContext = inst.context; 13871 } 13872 13873 if (inst.componentWillUpdate) { 13874 if (process.env.NODE_ENV !== 'production') { 13875 measureLifeCyclePerf(function () { 13876 return inst.componentWillUpdate(nextProps, nextState, nextContext); 13877 }, this._debugID, 'componentWillUpdate'); 13878 } else { 13879 inst.componentWillUpdate(nextProps, nextState, nextContext); 13880 } 13881 } 13882 13883 this._currentElement = nextElement; 13884 this._context = unmaskedContext; 13885 inst.props = nextProps; 13886 inst.state = nextState; 13887 inst.context = nextContext; 13888 13889 this._updateRenderedComponent(transaction, unmaskedContext); 13890 13891 if (hasComponentDidUpdate) { 13892 if (process.env.NODE_ENV !== 'production') { 13893 transaction.getReactMountReady().enqueue(function () { 13894 measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate'); 13895 }); 13896 } else { 13897 transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst); 13898 } 13899 } 13900 }, 13901 13902 /** 13903 * Call the component's `render` method and update the DOM accordingly. 13904 * 13905 * @param {ReactReconcileTransaction} transaction 13906 * @internal 13907 */ 13908 _updateRenderedComponent: function (transaction, context) { 13909 var prevComponentInstance = this._renderedComponent; 13910 var prevRenderedElement = prevComponentInstance._currentElement; 13911 var nextRenderedElement = this._renderValidatedComponent(); 13912 13913 var debugID = 0; 13914 if (process.env.NODE_ENV !== 'production') { 13915 debugID = this._debugID; 13916 } 13917 13918 if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) { 13919 ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context)); 13920 } else { 13921 var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance); 13922 ReactReconciler.unmountComponent(prevComponentInstance, false); 13923 13924 var nodeType = ReactNodeTypes.getType(nextRenderedElement); 13925 this._renderedNodeType = nodeType; 13926 var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */ 13927 ); 13928 this._renderedComponent = child; 13929 13930 var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID); 13931 13932 if (process.env.NODE_ENV !== 'production') { 13933 if (debugID !== 0) { 13934 var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; 13935 ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); 13936 } 13937 } 13938 13939 this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance); 13940 } 13941 }, 13942 13943 /** 13944 * Overridden in shallow rendering. 13945 * 13946 * @protected 13947 */ 13948 _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) { 13949 ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance); 13950 }, 13951 13952 /** 13953 * @protected 13954 */ 13955 _renderValidatedComponentWithoutOwnerOrContext: function () { 13956 var inst = this._instance; 13957 var renderedElement; 13958 13959 if (process.env.NODE_ENV !== 'production') { 13960 renderedElement = measureLifeCyclePerf(function () { 13961 return inst.render(); 13962 }, this._debugID, 'render'); 13963 } else { 13964 renderedElement = inst.render(); 13965 } 13966 13967 if (process.env.NODE_ENV !== 'production') { 13968 // We allow auto-mocks to proceed as if they're returning null. 13969 if (renderedElement === undefined && inst.render._isMockFunction) { 13970 // This is probably bad practice. Consider warning here and 13971 // deprecating this convenience. 13972 renderedElement = null; 13973 } 13974 } 13975 13976 return renderedElement; 13977 }, 13978 13979 /** 13980 * @private 13981 */ 13982 _renderValidatedComponent: function () { 13983 var renderedElement; 13984 if (process.env.NODE_ENV !== 'production' || this._compositeType !== CompositeTypes.StatelessFunctional) { 13985 ReactCurrentOwner.current = this;
13986 try { 13987 renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); 13988 } finally { 13989 ReactCurrentOwner.current = null; 13990 } 13991 } else { 13992 renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); 13993 } 13994 !( 13995 // TODO: An `isValidNode` function would probably be more appropriate 13996 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; 13997 13998 return renderedElement; 13999 }, 14000 14001 /** 14002 * Lazily allocates the refs object and stores `component` as `ref`. 14003 * 14004 * @param {string} ref Reference name. 14005 * @param {component} component Component to store as `ref`. 14006 * @final 14007 * @private 14008 */ 14009 attachRef: function (ref, component) { 14010 var inst = this.getPublicInstance(); 14011 !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0; 14012 var publicComponentInstance = component.getPublicInstance(); 14013 if (process.env.NODE_ENV !== 'production') { 14014 var componentName = component && component.getName ? component.getName() : 'a component'; 14015 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; 14016 } 14017 var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs; 14018 refs[ref] = publicComponentInstance; 14019 }, 14020 14021 /** 14022 * Detaches a reference name. 14023 * 14024 * @param {string} ref Name to dereference. 14025 * @final 14026 * @private 14027 */ 14028 detachRef: function (ref) { 14029 var refs = this.getPublicInstance().refs; 14030 delete refs[ref]; 14031 }, 14032 14033 /** 14034 * Get a text description of the component that can be used to identify it 14035 * in error messages. 14036 * @return {string} The name or null. 14037 * @internal 14038 */ 14039 getName: function () { 14040 var type = this._currentElement.type; 14041 var constructor = this._instance && this._instance.constructor; 14042 return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null; 14043 }, 14044 14045 /** 14046 * Get the publicly accessible representation of this component - i.e. what 14047 * is exposed by refs and returned by render. Can be null for stateless 14048 * components. 14049 * 14050 * @return {ReactComponent} the public component instance. 14051 * @internal 14052 */ 14053 getPublicInstance: function () { 14054 var inst = this._instance; 14055 if (this._compositeType === CompositeTypes.StatelessFunctional) { 14056 return null; 14057 } 14058 return inst; 14059 }, 14060 14061 // Stub 14062 _instantiateReactComponent: null 14063 14064}; 14065 14066module.exports = ReactCompositeComponent; 14067/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 14068 14069/***/ }), 14070/* 118 */ 14071/***/ (function(module, exports, __webpack_require__) { 14072 14073"use strict"; 14074/* WEBPACK VAR INJECTION */(function(process) {/** 14075 * Copyright 2013-present, Facebook, Inc. 14076 * All rights reserved. 14077 * 14078 * This source code is licensed under the BSD-style license found in the 14079 * LICENSE file in the root directory of this source tree. An additional grant 14080 * of patent rights can be found in the PATENTS file in the same directory. 14081 * 14082 */ 14083 14084/* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/ 14085 14086 14087 14088var ReactDOMComponentTree = __webpack_require__(5); 14089var ReactDefaultInjection = __webpack_require__(135); 14090var ReactMount = __webpack_require__(65); 14091var ReactReconciler = __webpack_require__(18); 14092var ReactUpdates = __webpack_require__(10); 14093var ReactVersion = __webpack_require__(150); 14094 14095var findDOMNode = __webpack_require__(167); 14096var getHostComponentFromComposite = __webpack_require__(71); 14097var renderSubtreeIntoContainer = __webpack_require__(174); 14098var warning = __webpack_require__(2); 14099 14100ReactDefaultInjection.inject(); 14101 14102var ReactDOM = { 14103 findDOMNode: findDOMNode, 14104 render: ReactMount.render, 14105 unmountComponentAtNode: ReactMount.unmountComponentAtNode, 14106 version: ReactVersion, 14107 14108 /* eslint-disable camelcase */ 14109 unstable_batchedUpdates: ReactUpdates.batchedUpdates, 14110 unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer 14111}; 14112 14113// Inject the runtime into a devtools global hook regardless of browser. 14114// Allows for debugging when the hook is injected on the page. 14115if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { 14116 __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ 14117 ComponentTree: { 14118 getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode, 14119 getNodeFromInstance: function (inst) { 14120 // inst is an internal instance (but could be a composite) 14121 if (inst._renderedComponent) { 14122 inst = getHostComponentFromComposite(inst); 14123 } 14124 if (inst) { 14125 return ReactDOMComponentTree.getNodeFromInstance(inst); 14126 } else { 14127 return null; 14128 } 14129 } 14130 }, 14131 Mount: ReactMount, 14132 Reconciler: ReactReconciler 14133 }); 14134} 14135 14136if (process.env.NODE_ENV !== 'production') { 14137 var ExecutionEnvironment = __webpack_require__(6); 14138 if (ExecutionEnvironment.canUseDOM && window.top === window.self) { 14139 14140 // First check if devtools is not installed 14141 if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { 14142 // If we're in Chrome or Firefox, provide a download link if not installed. 14143 if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) { 14144 // Firefox does not have the issue with devtools loaded over file:// 14145 var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1; 14146 console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools'); 14147 } 14148 } 14149 14150 var testFunc = function testFn() {}; 14151 process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, 'It looks like you\'re using a minified copy of the development build ' + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0; 14152 14153 // If we're in IE8, check to see if we are in compatibility mode and provide 14154 // information on preventing compatibility mode 14155 var ieCompatibilityMode = document.documentMode && document.documentMode < 8; 14156 14157 process.env.NODE_ENV !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />') : void 0; 14158 14159 var expectedFeatures = [ 14160 // shims 14161 Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.trim]; 14162 14163 for (var i = 0; i < expectedFeatures.length; i++) { 14164 if (!expectedFeatures[i]) { 14165 process.env.NODE_ENV !== 'production' ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0; 14166 break; 14167 } 14168 } 14169 } 14170} 14171 14172if (process.env.NODE_ENV !== 'production') { 14173 var ReactInstrumentation = __webpack_require__(8); 14174 var ReactDOMUnknownPropertyHook = __webpack_require__(132); 14175 var ReactDOMNullInputValuePropHook = __webpack_require__(126); 14176 var ReactDOMInvalidARIAHook = __webpack_require__(125); 14177 14178 ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook); 14179 ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook); 14180 ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook); 14181} 14182 14183module.exports = ReactDOM;
14184/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 14185 14186/***/ }), 14187/* 119 */ 14188/***/ (function(module, exports, __webpack_require__) { 14189 14190"use strict"; 14191/* WEBPACK VAR INJECTION */(function(process) {/** 14192 * Copyright 2013-present, Facebook, Inc. 14193 * All rights reserved. 14194 * 14195 * This source code is licensed under the BSD-style license found in the 14196 * LICENSE file in the root directory of this source tree. An additional grant 14197 * of patent rights can be found in the PATENTS file in the same directory. 14198 * 14199 */ 14200 14201/* global hasOwnProperty:true */ 14202 14203 14204 14205var _prodInvariant = __webpack_require__(3), 14206 _assign = __webpack_require__(4); 14207 14208var AutoFocusUtils = __webpack_require__(106); 14209var CSSPropertyOperations = __webpack_require__(108); 14210var DOMLazyTree = __webpack_require__(17); 14211var DOMNamespaces = __webpack_require__(35); 14212var DOMProperty = __webpack_require__(13); 14213var DOMPropertyOperations = __webpack_require__(58); 14214var EventPluginHub = __webpack_require__(21); 14215var EventPluginRegistry = __webpack_require__(26); 14216var ReactBrowserEventEmitter = __webpack_require__(27); 14217var ReactDOMComponentFlags = __webpack_require__(59); 14218var ReactDOMComponentTree = __webpack_require__(5); 14219var ReactDOMInput = __webpack_require__(124); 14220var ReactDOMOption = __webpack_require__(127); 14221var ReactDOMSelect = __webpack_require__(60); 14222var ReactDOMTextarea = __webpack_require__(130); 14223var ReactInstrumentation = __webpack_require__(8); 14224var ReactMultiChild = __webpack_require__(143); 14225var ReactServerRenderingTransaction = __webpack_require__(148); 14226 14227var emptyFunction = __webpack_require__(9); 14228var escapeTextContentForBrowser = __webpack_require__(30); 14229var invariant = __webpack_require__(1); 14230var isEventSupported = __webpack_require__(46); 14231var shallowEqual = __webpack_require__(33); 14232var validateDOMNesting = __webpack_require__(48); 14233var warning = __webpack_require__(2); 14234 14235var Flags = ReactDOMComponentFlags; 14236var deleteListener = EventPluginHub.deleteListener; 14237var getNode = ReactDOMComponentTree.getNodeFromInstance; 14238var listenTo = ReactBrowserEventEmitter.listenTo; 14239var registrationNameModules = EventPluginRegistry.registrationNameModules; 14240 14241// For quickly matching children type, to test if can be treated as content. 14242var CONTENT_TYPES = { 'string': true, 'number': true }; 14243 14244var STYLE = 'style'; 14245var HTML = '__html'; 14246var RESERVED_PROPS = { 14247 children: null, 14248 dangerouslySetInnerHTML: null, 14249 suppressContentEditableWarning: null 14250}; 14251 14252// Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE). 14253var DOC_FRAGMENT_TYPE = 11; 14254 14255function getDeclarationErrorAddendum(internalInstance) { 14256 if (internalInstance) { 14257 var owner = internalInstance._currentElement._owner || null; 14258 if (owner) { 14259 var name = owner.getName(); 14260 if (name) { 14261 return ' This DOM node was rendered by `' + name + '`.'; 14262 } 14263 } 14264 } 14265 return ''; 14266} 14267 14268function friendlyStringify(obj) { 14269 if (typeof obj === 'object') { 14270 if (Array.isArray(obj)) { 14271 return '[' + obj.map(friendlyStringify).join(', ') + ']'; 14272 } else { 14273 var pairs = []; 14274 for (var key in obj) { 14275 if (Object.prototype.hasOwnProperty.call(obj, key)) { 14276 var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key); 14277 pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key])); 14278 } 14279 } 14280 return '{' + pairs.join(', ') + '}'; 14281 } 14282 } else if (typeof obj === 'string') { 14283 return JSON.stringify(obj); 14284 } else if (typeof obj === 'function') { 14285 return '[function object]'; 14286 } 14287 // Differs from JSON.stringify in that undefined because undefined and that 14288 // inf and nan don't become null 14289 return String(obj); 14290} 14291 14292var styleMutationWarning = {}; 14293 14294function checkAndWarnForMutatedStyle(style1, style2, component) { 14295 if (style1 == null || style2 == null) { 14296 return; 14297 } 14298 if (shallowEqual(style1, style2)) { 14299 return; 14300 } 14301 14302 var componentName = component._tag; 14303 var owner = component._currentElement._owner; 14304 var ownerName; 14305 if (owner) { 14306 ownerName = owner.getName(); 14307 } 14308 14309 var hash = ownerName + '|' + componentName; 14310 14311 if (styleMutationWarning.hasOwnProperty(hash)) { 14312 return; 14313 } 14314 14315 styleMutationWarning[hash] = true; 14316 14317 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; 14318} 14319 14320/** 14321 * @param {object} component 14322 * @param {?object} props 14323 */ 14324function assertValidProps(component, props) { 14325 if (!props) { 14326 return; 14327 } 14328 // Note the use of `==` which checks for null or undefined. 14329 if (voidElementTags[component._tag]) { 14330 !(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; 14331 } 14332 if (props.dangerouslySetInnerHTML != null) { 14333 !(props.children == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.')
14333: _prodInvariant('60') : void 0; 14334 !(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; 14335 } 14336 if (process.env.NODE_ENV !== 'production') { 14337 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; 14338 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; 14339 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; 14340 } 14341 !(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; 14342} 14343 14344function enqueuePutListener(inst, registrationName, listener, transaction) { 14345 if (transaction instanceof ReactServerRenderingTransaction) { 14346 return; 14347 } 14348 if (process.env.NODE_ENV !== 'production') { 14349 // IE8 has no API for event capturing and the `onScroll` event doesn't 14350 // bubble. 14351 process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : void 0; 14352 } 14353 var containerInfo = inst._hostContainerInfo; 14354 var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE; 14355 var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument; 14356 listenTo(registrationName, doc); 14357 transaction.getReactMountReady().enqueue(putListener, { 14358 inst: inst, 14359 registrationName: registrationName, 14360 listener: listener 14361 }); 14362} 14363 14364function putListener() { 14365 var listenerToPut = this; 14366 EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener); 14367} 14368 14369function inputPostMount() { 14370 var inst = this; 14371 ReactDOMInput.postMountWrapper(inst); 14372} 14373 14374function textareaPostMount() { 14375 var inst = this; 14376 ReactDOMTextarea.postMountWrapper(inst); 14377} 14378 14379function optionPostMount() { 14380 var inst = this; 14381 ReactDOMOption.postMountWrapper(inst); 14382} 14383 14384var setAndValidateContentChildDev = emptyFunction; 14385if (process.env.NODE_ENV !== 'production') { 14386 setAndValidateContentChildDev = function (content) { 14387 var hasExistingContent = this._contentDebugID != null; 14388 var debugID = this._debugID; 14389 // This ID represents the inlined child that has no backing instance: 14390 var contentDebugID = -debugID; 14391 14392 if (content == null) { 14393 if (hasExistingContent) { 14394 ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID); 14395 } 14396 this._contentDebugID = null; 14397 return; 14398 } 14399 14400 validateDOMNesting(null, String(content), this, this._ancestorInfo); 14401 this._contentDebugID = contentDebugID; 14402 if (hasExistingContent) { 14403 ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content); 14404 ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID); 14405 } else { 14406 ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID); 14407 ReactInstrumentation.debugTool.onMountComponent(contentDebugID); 14408 ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]); 14409 } 14410 }; 14411} 14412 14413// There are so many media events, it makes sense to just
14414// maintain a list rather than create a `trapBubbledEvent` for each 14415var mediaEvents = { 14416 topAbort: 'abort', 14417 topCanPlay: 'canplay', 14418 topCanPlayThrough: 'canplaythrough', 14419 topDurationChange: 'durationchange', 14420 topEmptied: 'emptied', 14421 topEncrypted: 'encrypted', 14422 topEnded: 'ended', 14423 topError: 'error', 14424 topLoadedData: 'loadeddata', 14425 topLoadedMetadata: 'loadedmetadata', 14426 topLoadStart: 'loadstart', 14427 topPause: 'pause', 14428 topPlay: 'play', 14429 topPlaying: 'playing', 14430 topProgress: 'progress', 14431 topRateChange: 'ratechange', 14432 topSeeked: 'seeked', 14433 topSeeking: 'seeking', 14434 topStalled: 'stalled', 14435 topSuspend: 'suspend', 14436 topTimeUpdate: 'timeupdate', 14437 topVolumeChange: 'volumechange', 14438 topWaiting: 'waiting' 14439}; 14440 14441function trapBubbledEventsLocal() { 14442 var inst = this; 14443 // If a component renders to null or if another component fatals and causes 14444 // the state of the tree to be corrupted, `node` here can be null. 14445 !inst._rootNodeID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0; 14446 var node = getNode(inst); 14447 !node ? process.env.NODE_ENV !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0; 14448 14449 switch (inst._tag) { 14450 case 'iframe': 14451 case 'object': 14452 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)]; 14453 break; 14454 case 'video': 14455 case 'audio': 14456 14457 inst._wrapperState.listeners = []; 14458 // Create listener for each media event 14459 for (var event in mediaEvents) { 14460 if (mediaEvents.hasOwnProperty(event)) { 14461 inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node)); 14462 } 14463 } 14464 break; 14465 case 'source': 14466 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)]; 14467 break; 14468 case 'img': 14469 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)]; 14470 break; 14471 case 'form': 14472 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)]; 14473 break; 14474 case 'input': 14475 case 'select': 14476 case 'textarea': 14477 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)]; 14478 break; 14479 } 14480} 14481 14482function postUpdateSelectWrapper() { 14483 ReactDOMSelect.postUpdateWrapper(this); 14484} 14485 14486// For HTML, certain tags should omit their close tag. We keep a whitelist for 14487// those special-case tags. 14488 14489var omittedCloseTags = { 14490 'area': true, 14491 'base': true, 14492 'br': true, 14493 'col': true, 14494 'embed': true, 14495 'hr': true, 14496 'img': true, 14497 'input': true, 14498 'keygen': true, 14499 'link': true, 14500 'meta': true, 14501 'param': true, 14502 'source': true, 14503 'track': true, 14504 'wbr': true 14505}; 14506 14507var newlineEatingTags = { 14508 'listing': true, 14509 'pre': true, 14510 'textarea': true 14511}; 14512 14513// For HTML, certain tags cannot have children. This has the same purpose as 14514// `omittedCloseTags` except that `menuitem` should still have its closing tag. 14515 14516var voidElementTags = _assign({ 14517 'menuitem': true 14518}, omittedCloseTags); 14519 14520// We accept any tag to be rendered but since this gets injected into arbitrary 14521// HTML, we want to make sure that it's a safe tag. 14522// http://www.w3.org/TR/REC-xml/#NT-Name 14523 14524var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset 14525var validatedTagCache = {}; 14526var hasOwnProperty = {}.hasOwnProperty; 14527 14528function validateDangerousTag(tag) { 14529 if (!hasOwnProperty.call(validatedTagCache, tag)) { 14530 !VALID_TAG_REGEX.test(tag) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0; 14531 validatedTagCache[tag] = true; 14532 } 14533} 14534 14535function isCustomComponent(tagName, props) { 14536 return tagName.indexOf('-') >= 0 || props.is != null; 14537} 14538 14539var globalIdCounter = 1; 14540 14541/** 14542 * Creates a new React class that is idempotent and capable of containing other 14543 * React components. It accepts event listeners and DOM properties that are 14544 * valid according to `DOMProperty`. 14545 * 14546 * - Event listeners: `onClick`, `onMouseDown`, etc. 14547 * - DOM properties: `className`, `name`, `title`, etc. 14548 * 14549 * The `style` property functions differently from the DOM API. It accepts an 14550 * object mapping of style properties to values. 14551 * 14552 * @constructor ReactDOMComponent 14553 * @extends ReactMultiChild 14554 */ 14555function ReactDOMComponent(element) { 14556 var tag = element.type; 14557 validateDangerousTag(tag); 14558 this._currentElement = element; 14559 this._tag = tag.toLowerCase(); 14560 this._namespaceURI = null; 14561 this._renderedChildren = null; 14562 this._previousStyle = null; 14563 this._previousStyleCopy = null; 14564 this._hostNode = null; 14565 this._hostParent = null; 14566 this._rootNodeID = 0; 14567 this._domID = 0; 14568 this._hostContainerInfo = null; 14569 this._wrapperState = null; 14570 this._topLevelWrapper = null; 14571 this._flags = 0; 14572 if (process.env.NODE_ENV !== 'production') { 14573 this._ancestorInfo = null; 14574 setAndValidateContentChildDev.call(this, null); 14575 } 14576} 14577 14578ReactDOMComponent.displayName = 'ReactDOMComponent'; 14579 14580ReactDOMComponent.Mixin = { 14581 14582 /** 14583 * Generates root tag markup then recurses. This method has side effects and 14584 * is not idempotent. 14585 * 14586 * @internal 14587 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction 14588 * @param {?ReactDOMComponent} the parent component instance 14589 * @param {?object} info about the host container 14590 * @param {object} context 14591 * @return {string} The computed markup. 14592 */ 14593 mountComponent: function (transaction, hostParent, hostContainerInfo, context) { 14594 this._rootNodeID = globalIdCounter++; 14595 this._domID = hostContainerInfo._idCounter++; 14596 this._hostParent = hostParent; 14597 this._hostContainerInfo = hostContainerInfo; 14598 14599 var props = this._currentElement.props; 14600 14601 switch (this._tag) { 14602 case 'audio': 14603 case 'form': 14604 case 'iframe': 14605 case 'img': 14606 case 'link': 14607 case 'object': 14608 case 'source': 14609 case 'video': 14610 this._wrapperState = { 14611 listeners: null 14612 }; 14613 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); 14614 break; 14615 case 'input': 14616 ReactDOMInput.mountWrapper(this, props, hostParent); 14617 props = ReactDOMInput.getHostProps(this, props); 14618 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); 14619 break; 14620 case 'option': 14621 ReactDOMOption.mountWrapper(this, props, hostParent); 14622 props = ReactDOMOption.getHostProps(this, props); 14623 break; 14624 case 'select': 14625 ReactDOMSelect.mountWrapper(this, props, hostParent); 14626 props = ReactDOMSelect.getHostProps(this, props); 14627 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); 14628 break; 14629 case 'textarea': 14630 ReactDOMTextarea.mountWrapper(this, props, hostParent); 14631 props = ReactDOMTextarea.getHostProps(this, props); 14632 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); 14633 break; 14634 } 14635 14636 assertValidProps(this, props); 14637 14638 // We create tags in the namespace of their parent container, except HTML 14639 // tags get no namespace. 14640 var namespaceURI; 14641 var parentTag; 14642 if (hostParent != null) { 14643 namespaceURI = hostParent._namespaceURI; 14644 parentTag = hostParent._tag; 14645 } else if (hostContainerInfo._tag) { 14646 namespaceURI = hostContainerInfo._namespaceURI; 14647 parentTag = hostContainerInfo._tag; 14648 } 14649 if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') { 14650 namespaceURI = DOMNamespaces.html; 14651 } 14652 if (namespaceURI === DOMNamespaces.html) { 14653 if (this._tag === 'svg') { 14654 namespaceURI = DOMNamespaces.svg; 14655 } else if (this._tag === 'math') { 14656 namespaceURI = DOMNamespaces.mathml; 14657 } 14658 } 14659 this._namespaceURI = namespaceURI; 14660 14661 if (process.env.NODE_ENV !== 'production') { 14662 var parentInfo; 14663 if (hostParent != null) { 14664 parentInfo = hostParent._ancestorInfo; 14665 } else if (hostContainerInfo._tag) { 14666 parentInfo = hostContainerInfo._ancestorInfo; 14667 } 14668 if (parentInfo) { 14669 // parentInfo should always be present except for the top-level 14670 // component when server rendering 14671 validateDOMNesting(this._tag, null, this, parentInfo); 14672 } 14673 this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(p
14673arentInfo, this._tag, this); 14674 } 14675 14676 var mountImage; 14677 if (transaction.useCreateElement) { 14678 var ownerDocument = hostContainerInfo._ownerDocument; 14679 var el; 14680 if (namespaceURI === DOMNamespaces.html) { 14681 if (this._tag === 'script') { 14682 // Create the script via .innerHTML so its "parser-inserted" flag is 14683 // set to true and it does not execute 14684 var div = ownerDocument.createElement('div'); 14685 var type = this._currentElement.type; 14686 div.innerHTML = '<' + type + '></' + type + '>'; 14687 el = div.removeChild(div.firstChild); 14688 } else if (props.is) { 14689 el = ownerDocument.createElement(this._currentElement.type, props.is); 14690 } else { 14691 // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug. 14692 // See discussion in https://github.com/facebook/react/pull/6896 14693 // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240 14694 el = ownerDocument.createElement(this._currentElement.type); 14695 } 14696 } else { 14697 el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type); 14698 } 14699 ReactDOMComponentTree.precacheNode(this, el); 14700 this._flags |= Flags.hasCachedChildNodes; 14701 if (!this._hostParent) { 14702 DOMPropertyOperations.setAttributeForRoot(el); 14703 } 14704 this._updateDOMProperties(null, props, transaction); 14705 var lazyTree = DOMLazyTree(el); 14706 this._createInitialChildren(transaction, props, context, lazyTree); 14707 mountImage = lazyTree; 14708 } else { 14709 var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props); 14710 var tagContent = this._createContentMarkup(transaction, props, context); 14711 if (!tagContent && omittedCloseTags[this._tag]) { 14712 mountImage = tagOpen + '/>'; 14713 } else { 14714 mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>'; 14715 } 14716 } 14717 14718 switch (this._tag) { 14719 case 'input': 14720 transaction.getReactMountReady().enqueue(inputPostMount, this); 14721 if (props.autoFocus) { 14722 transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); 14723 } 14724 break; 14725 case 'textarea': 14726 transaction.getReactMountReady().enqueue(textareaPostMount, this); 14727 if (props.autoFocus) { 14728 transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); 14729 } 14730 break; 14731 case 'select': 14732 if (props.autoFocus) { 14733 transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); 14734 } 14735 break; 14736 case 'button': 14737 if (props.autoFocus) { 14738 transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); 14739 } 14740 break; 14741 case 'option': 14742 transaction.getReactMountReady().enqueue(optionPostMount, this); 14743 break; 14744 } 14745 14746 return mountImage; 14747 }, 14748 14749 /** 14750 * Creates markup for the open tag and all attributes. 14751 * 14752 * This method has side effects because events get registered. 14753 * 14754 * Iterating over object properties is faster than iterating over arrays. 14755 * @see http://jsperf.com/obj-vs-arr-iteration 14756 * 14757 * @private 14758 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction 14759 * @param {object} props 14760 * @return {string} Markup of opening tag. 14761 */ 14762 _createOpenTagMarkupAndPutListeners: function (transaction, props) { 14763 var ret = '<' + this._currentElement.type; 14764 14765 for (var propKey in props) { 14766 if (!props.hasOwnProperty(propKey)) { 14767 continue; 14768 } 14769 var propValue = props[propKey]; 14770 if (propValue == null) { 14771 continue; 14772 } 14773 if (registrationNameModules.hasOwnProperty(propKey)) { 14774 if (propValue) { 14775 enqueuePutListener(this, propKey, propValue, transaction); 14776 } 14777 } else { 14778 if (propKey === STYLE) { 14779 if (propValue) { 14780 if (process.env.NODE_ENV !== 'production') { 14781 // See `_updateDOMProperties`. style block 14782 this._previousStyle = propValue; 14783 } 14784 propValue = this._previousStyleCopy = _assign({}, props.style); 14785 } 14786 propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this); 14787 } 14788 var markup = null; 14789 if (this._tag != null && isCustomComponent(this._tag, props)) { 14790 if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
14791 markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue); 14792 } 14793 } else { 14794 markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue); 14795 } 14796 if (markup) { 14797 ret += ' ' + markup; 14798 } 14799 } 14800 } 14801 14802 // For static pages, no need to put React ID and checksum. Saves lots of 14803 // bytes. 14804 if (transaction.renderToStaticMarkup) { 14805 return ret; 14806 } 14807 14808 if (!this._hostParent) { 14809 ret += ' ' + DOMPropertyOperations.createMarkupForRoot(); 14810 } 14811 ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID); 14812 return ret; 14813 }, 14814 14815 /** 14816 * Creates markup for the content between the tags. 14817 * 14818 * @private 14819 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction 14820 * @param {object} props 14821 * @param {object} context 14822 * @return {string} Content markup. 14823 */ 14824 _createContentMarkup: function (transaction, props, context) { 14825 var ret = ''; 14826 14827 // Intentional use of != to avoid catching zero/false. 14828 var innerHTML = props.dangerouslySetInnerHTML; 14829 if (innerHTML != null) { 14830 if (innerHTML.__html != null) { 14831 ret = innerHTML.__html; 14832 } 14833 } else { 14834 var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; 14835 var childrenToUse = contentToUse != null ? null : props.children; 14836 if (contentToUse != null) { 14837 // TODO: Validate that text is allowed as a child of this node 14838 ret = escapeTextContentForBrowser(contentToUse); 14839 if (process.env.NODE_ENV !== 'production') { 14840 setAndValidateContentChildDev.call(this, contentToUse); 14841 } 14842 } else if (childrenToUse != null) { 14843 var mountImages = this.mountChildren(childrenToUse, transaction, context); 14844 ret = mountImages.join(''); 14845 } 14846 } 14847 if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') { 14848 // text/html ignores the first character in these tags if it's a newline 14849 // Prefer to break application/xml over text/html (for now) by adding 14850 // a newline specifically to get eaten by the parser. (Alternately for 14851 // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first 14852 // \r is normalized out by HTMLTextAreaElement#value.) 14853 // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> 14854 // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> 14855 // See: <http://www.w3.org/TR/html5/syntax.html#newlines> 14856 // See: Parsing of "textarea" "listing" and "pre" elements 14857 // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> 14858 return '\n' + ret; 14859 } else { 14860 return ret; 14861 } 14862 }, 14863 14864 _createInitialChildren: function (transaction, props, context, lazyTree) { 14865 // Intentional use of != to avoid catching zero/false. 14866 var innerHTML = props.dangerouslySetInnerHTML; 14867 if (innerHTML != null) { 14868 if (innerHTML.__html != null) { 14869 DOMLazyTree.queueHTML(lazyTree, innerHTML.__html); 14870 } 14871 } else { 14872 var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; 14873 var childrenToUse = contentToUse != null ? null : props.children; 14874 // TODO: Validate that text is allowed as a child of this node 14875 if (contentToUse != null) { 14876 // Avoid setting textContent when the text is empty. In IE11 setting 14877 // textContent on a text area will cause the placeholder to not 14878 // show within the textarea until it has been focused and blurred again. 14879 // https://github.com/facebook/react/issues/6731#issuecomment-254874553 14880 if (contentToUse !== '') { 14881 if (process.env.NODE_ENV !== 'production') { 14882 setAndValidateContentChildDev.call(this, contentToUse); 14883 } 14884 DOMLazyTree.queueText(lazyTree, contentToUse); 14885 } 14886 } else if (childrenToUse != null) { 14887 var mountImages = this.mountChildren(childrenToUse, transaction, context); 14888 for (var i = 0; i < mountImages.length; i++) { 14889 DOMLazyTree.queueChild(lazyTree, mountImages[i]); 14890 } 14891 } 14892 } 14893 }, 14894 14895 /** 14896 * Receives a next element and updates the component. 14897 * 14898 * @internal 14899 * @param {ReactElement} nextElement 14900 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction 14901 * @param {object} context 14902 */ 14903 receiveComponent: function (nextElement, transaction, context) { 14904 var prevElement = this._currentElement; 14905 this._currentElement = nextElement; 14906 this.updateComponent(transaction, prevElement, nextElement, context); 14907 }, 14908 14909 /** 14910 * Updates a DOM component after it has already been allocated and 14911 * attached to the DOM. Reconciles the root DOM node, then recurses. 14912 * 14913 * @param {ReactReconcileTransaction} transaction 14914 * @param {ReactElement} prevElement 14915 * @param {ReactElement} nextElement 14916 * @internal 14917 * @overridable 14918 */ 14919 updateComponent: function (transaction, prevElement, nextElement, context) { 14920 var lastProps = prevElement.props; 14921 var nextProps = this._currentElement.props; 14922 14923 switch (this._tag) { 14924 case 'input': 14925 lastProps = ReactDOMInput.getHostProps(this, lastProps); 14926 nextProps = ReactDOMInput.getHostProps(this, nextProps); 14927 break; 14928 case 'option': 14929 lastProps = ReactDOMOption.getHostProps(this, lastProps); 14930 nextProps = ReactDOMOption.getHostProps(this, nextProps); 14931 break; 14932 case 'select': 14933 lastProps = ReactDOMSelect.getHostProps(this, lastProps); 14934 nextProps = ReactDOMSelect.getHostProps(this, nextProps); 14935 break; 14936 case 'textarea': 14937 lastProps = ReactDOMTextarea.getHostProps(this, lastProps); 14938 nextProps = ReactDOMTextarea.getHostProps(this, nextProps); 14939 break; 14940 } 14941 14942 assertValidProps(this, nextProps); 14943 this._updateDOMProperties(lastProps, nextProps, transaction); 14944 this._updateDOMChildren(lastProps, nextProps, transaction, context); 14945 14946 switch (this._tag) { 14947 case 'input':
14948 // Update the wrapper around inputs *after* updating props. This has to 14949 // happen after `_updateDOMProperties`. Otherwise HTML5 input validations 14950 // raise warnings and prevent the new value from being assigned. 14951 ReactDOMInput.updateWrapper(this); 14952 break; 14953 case 'textarea': 14954 ReactDOMTextarea.updateWrapper(this); 14955 break; 14956 case 'select': 14957 // <select> value update needs to occur after <option> children 14958 // reconciliation 14959 transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this); 14960 break; 14961 } 14962 }, 14963 14964 /** 14965 * Reconciles the properties by detecting differences in property values and 14966 * updating the DOM as necessary. This function is probably the single most 14967 * critical path for performance optimization. 14968 * 14969 * TODO: Benchmark whether checking for changed values in memory actually 14970 * improves performance (especially statically positioned elements). 14971 * TODO: Benchmark the effects of putting this at the top since 99% of props 14972 * do not change for a given reconciliation. 14973 * TODO: Benchmark areas that can be improved with caching. 14974 * 14975 * @private 14976 * @param {object} lastProps 14977 * @param {object} nextProps 14978 * @param {?DOMElement} node 14979 */ 14980 _updateDOMProperties: function (lastProps, nextProps, transaction) { 14981 var propKey; 14982 var styleName; 14983 var styleUpdates; 14984 for (propKey in lastProps) { 14985 if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) { 14986 continue; 14987 } 14988 if (propKey === STYLE) { 14989 var lastStyle = this._previousStyleCopy; 14990 for (styleName in lastStyle) { 14991 if (lastStyle.hasOwnProperty(styleName)) { 14992 styleUpdates = styleUpdates || {}; 14993 styleUpdates[styleName] = ''; 14994 } 14995 } 14996 this._previousStyleCopy = null; 14997 } else if (registrationNameModules.hasOwnProperty(propKey)) { 14998 if (lastProps[propKey]) { 14999 // Only call deleteListener if there was a listener previously or 15000 // else willDeleteListener gets called when there wasn't actually a 15001 // listener (e.g., onClick={null}) 15002 deleteListener(this, propKey); 15003 } 15004 } else if (isCustomComponent(this._tag, lastProps)) { 15005 if (!RESERVED_PROPS.hasOwnProperty(propKey)) { 15006 DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey); 15007 } 15008 } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { 15009 DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey); 15010 } 15011 } 15012 for (propKey in nextProps) { 15013 var nextProp = nextProps[propKey]; 15014 var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined; 15015 if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) { 15016 continue; 15017 } 15018 if (propKey === STYLE) { 15019 if (nextProp) { 15020 if (process.env.NODE_ENV !== 'production') { 15021 checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this); 15022 this._previousStyle = nextProp; 15023 } 15024 nextProp = this._previousStyleCopy = _assign({}, nextProp); 15025 } else { 15026 this._previousStyleCopy = null; 15027 } 15028 if (lastProp) { 15029 // Unset styles on `lastProp` but not on `nextProp`. 15030 for (styleName in lastProp) { 15031 if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) { 15032 styleUpdates = styleUpdates || {}; 15033 styleUpdates[styleName] = ''; 15034 } 15035 } 15036 // Update styles that changed since `lastProp`. 15037 for (styleName in nextProp) { 15038 if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) { 15039 styleUpdates = styleUpdates || {}; 15040 styleUpdates[styleName] = nextProp[styleName]; 15041 } 15042 } 15043 } else { 15044 // Relies on `updateStylesByID` not mutating `styleUpdates`. 15045 styleUpdates = nextProp; 15046 } 15047 } else if (registrationNameModules.hasOwnProperty(propKey)) { 15048 if (nextProp) { 15049 enqueuePutListener(this, propKey, nextProp, transaction); 15050 } else if (lastProp) { 15051 deleteListener(this, propKey); 15052 } 15053 } else if (isCustomComponent(this._tag, nextProps)) { 15054 if (!RESERVED_PROPS.hasOwnProperty(propKey)) { 15055 DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp); 15056 } 15057 } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { 15058 var node = getNode(this); 15059 // If we're updating to null or undefined, we should remove the property 15060 // from the DOM node instead of inadvertently setting to a string. This 15061 // brings us in line with the same behavior we have on initial render. 15062 if (nextProp != null) { 15063 DOMPropertyOperations.setValueForProperty(node, propKey, nextProp); 15064 } else { 15065 DOMPropertyOperations.deleteValueForProperty(node, propKey); 15066 } 15067 } 15068 } 15069 if (styleUpdates) { 15070 CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this); 15071 } 15072 }, 15073 15074 /** 15075 * Reconciles the children with the various properties that affect the 15076 * children content. 15077 * 15078 * @param {object} lastProps 15079 * @param {object} nextProps 15080 * @param {ReactReconcileTransaction} transaction 15081 * @param {object} context 15082 */ 15083 _updateDOMChildren: function (lastProps, nextProps, transaction, context) { 15084 var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null; 15085 var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null; 15086 15087 var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html; 15088 var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html; 15089 15090 // Note the use of `!=` which checks for null or undefined. 15091 var lastChildren = lastContent != null ? null : lastProps.children; 15092 var nextChildren = nextContent != null ? null : nextProps.children; 15093 15094 // If we're switching from children to content/html or vice versa, remove 15095 // the old content
15096 var lastHasContentOrHtml = lastContent != null || lastHtml != null; 15097 var nextHasContentOrHtml = nextContent != null || nextHtml != null; 15098 if (lastChildren != null && nextChildren == null) { 15099 this.updateChildren(null, transaction, context); 15100 } else if (lastHasContentOrHtml && !nextHasContentOrHtml) { 15101 this.updateTextContent(''); 15102 if (process.env.NODE_ENV !== 'production') { 15103 ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); 15104 } 15105 } 15106 15107 if (nextContent != null) { 15108 if (lastContent !== nextContent) { 15109 this.updateTextContent('' + nextContent); 15110 if (process.env.NODE_ENV !== 'production') { 15111 setAndValidateContentChildDev.call(this, nextContent); 15112 } 15113 } 15114 } else if (nextHtml != null) { 15115 if (lastHtml !== nextHtml) { 15116 this.updateMarkup('' + nextHtml); 15117 } 15118 if (process.env.NODE_ENV !== 'production') { 15119 ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); 15120 } 15121 } else if (nextChildren != null) { 15122 if (process.env.NODE_ENV !== 'production') { 15123 setAndValidateContentChildDev.call(this, null); 15124 } 15125 15126 this.updateChildren(nextChildren, transaction, context); 15127 } 15128 }, 15129 15130 getHostNode: function () { 15131 return getNode(this); 15132 }, 15133 15134 /** 15135 * Destroys all event registrations for this instance. Does not remove from 15136 * the DOM. That must be done by the parent. 15137 * 15138 * @internal 15139 */ 15140 unmountComponent: function (safely) { 15141 switch (this._tag) { 15142 case 'audio': 15143 case 'form': 15144 case 'iframe': 15145 case 'img': 15146 case 'link': 15147 case 'object': 15148 case 'source': 15149 case 'video': 15150 var listeners = this._wrapperState.listeners; 15151 if (listeners) { 15152 for (var i = 0; i < listeners.length; i++) { 15153 listeners[i].remove(); 15154 } 15155 } 15156 break; 15157 case 'html': 15158 case 'head': 15159 case 'body': 15160 /** 15161 * Components like <html> <head> and <body> can't be removed or added 15162 * easily in a cross-browser way, however it's valuable to be able to 15163 * take advantage of React's reconciliation for styling and <title> 15164 * management. So we just document it and throw in dangerous cases. 15165 */ 15166 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; 15167 break; 15168 } 15169 15170 this.unmountChildren(safely); 15171 ReactDOMComponentTree.uncacheNode(this); 15172 EventPluginHub.deleteAllListeners(this); 15173 this._rootNodeID = 0; 15174 this._domID = 0; 15175 this._wrapperState = null; 15176 15177 if (process.env.NODE_ENV !== 'production') { 15178 setAndValidateContentChildDev.call(this, null); 15179 } 15180 }, 15181 15182 getPublicInstance: function () { 15183 return getNode(this); 15184 } 15185 15186}; 15187 15188_assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin); 15189 15190module.exports = ReactDOMComponent; 15191/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 15192 15193/***/ }), 15194/* 120 */ 15195/***/ (function(module, exports, __webpack_require__) { 15196 15197"use strict"; 15198/* WEBPACK VAR INJECTION */(function(process) {/** 15199 * Copyright 2013-present, Facebook, Inc. 15200 * All rights reserved. 15201 * 15202 * This source code is licensed under the BSD-style license found in the 15203 * LICENSE file in the root directory of this source tree. An additional grant 15204 * of patent rights can be found in the PATENTS file in the same directory. 15205 * 15206 */ 15207 15208 15209 15210var validateDOMNesting = __webpack_require__(48); 15211 15212var DOC_NODE_TYPE = 9; 15213 15214function ReactDOMContainerInfo(topLevelWrapper, node) { 15215 var info = { 15216 _topLevelWrapper: topLevelWrapper, 15217 _idCounter: 1, 15218 _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null, 15219 _node: node, 15220 _tag: node ? node.nodeName.toLowerCase() : null, 15221 _namespaceURI: node ? node.namespaceURI : null 15222 }; 15223 if (process.env.NODE_ENV !== 'production') { 15224 info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null; 15225 } 15226 return info; 15227} 15228 15229module.exports = ReactDOMContainerInfo;
15230/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 15231 15232/***/ }), 15233/* 121 */ 15234/***/ (function(module, exports, __webpack_require__) { 15235 15236"use strict"; 15237/** 15238 * Copyright 2014-present, Facebook, Inc. 15239 * All rights reserved. 15240 * 15241 * This source code is licensed under the BSD-style license found in the 15242 * LICENSE file in the root directory of this source tree. An additional grant 15243 * of patent rights can be found in the PATENTS file in the same directory. 15244 * 15245 */ 15246 15247 15248 15249var _assign = __webpack_require__(4); 15250 15251var DOMLazyTree = __webpack_require__(17); 15252var ReactDOMComponentTree = __webpack_require__(5); 15253 15254var ReactDOMEmptyComponent = function (instantiate) { 15255 // ReactCompositeComponent uses this: 15256 this._currentElement = null; 15257 // ReactDOMComponentTree uses these: 15258 this._hostNode = null; 15259 this._hostParent = null; 15260 this._hostContainerInfo = null; 15261 this._domID = 0; 15262}; 15263_assign(ReactDOMEmptyComponent.prototype, { 15264 mountComponent: function (transaction, hostParent, hostContainerInfo, context) { 15265 var domID = hostContainerInfo._idCounter++; 15266 this._domID = domID; 15267 this._hostParent = hostParent; 15268 this._hostContainerInfo = hostContainerInfo; 15269 15270 var nodeValue = ' react-empty: ' + this._domID + ' '; 15271 if (transaction.useCreateElement) { 15272 var ownerDocument = hostContainerInfo._ownerDocument; 15273 var node = ownerDocument.createComment(nodeValue); 15274 ReactDOMComponentTree.precacheNode(this, node); 15275 return DOMLazyTree(node); 15276 } else { 15277 if (transaction.renderToStaticMarkup) { 15278 // Normally we'd insert a comment node, but since this is a situation 15279 // where React won't take over (static pages), we can simply return 15280 // nothing. 15281 return ''; 15282 } 15283 return '<!--' + nodeValue + '-->'; 15284 } 15285 }, 15286 receiveComponent: function () {}, 15287 getHostNode: function () { 15288 return ReactDOMComponentTree.getNodeFromInstance(this); 15289 }, 15290 unmountComponent: function () { 15291 ReactDOMComponentTree.uncacheNode(this); 15292 } 15293}); 15294 15295module.exports = ReactDOMEmptyComponent; 15296 15297/***/ }), 15298/* 122 */ 15299/***/ (function(module, exports, __webpack_require__) { 15300 15301"use strict"; 15302/** 15303 * Copyright 2013-present, Facebook, Inc. 15304 * All rights reserved. 15305 * 15306 * This source code is licensed under the BSD-style license found in the 15307 * LICENSE file in the root directory of this source tree. An additional grant 15308 * of patent rights can be found in the PATENTS file in the same directory. 15309 * 15310 */ 15311 15312 15313 15314var ReactDOMFeatureFlags = { 15315 useCreateElement: true, 15316 useFiber: false 15317}; 15318 15319module.exports = ReactDOMFeatureFlags; 15320 15321/***/ }), 15322/* 123 */ 15323/***/ (function(module, exports, __webpack_require__) { 15324 15325"use strict"; 15326/** 15327 * Copyright 2013-present, Facebook, Inc. 15328 * All rights reserved. 15329 * 15330 * This source code is licensed under the BSD-style license found in the 15331 * LICENSE file in the root directory of this source tree. An additional grant 15332 * of patent rights can be found in the PATENTS file in the same directory. 15333 * 15334 */ 15335 15336 15337 15338var DOMChildrenOperations = __webpack_require__(34); 15339var ReactDOMComponentTree = __webpack_require__(5); 15340 15341/** 15342 * Operations used to process updates to DOM nodes. 15343 */ 15344var ReactDOMIDOperations = { 15345 15346 /** 15347 * Updates a component's children by processing a series of updates. 15348 * 15349 * @param {array<object>} updates List of update configurations. 15350 * @internal 15351 */ 15352 dangerouslyProcessChildrenUpdates: function (parentInst, updates) { 15353 var node = ReactDOMComponentTree.getNodeFromInstance(parentInst); 15354 DOMChildrenOperations.processUpdates(node, updates); 15355 } 15356}; 15357 15358module.exports = ReactDOMIDOperations; 15359 15360/***/ }), 15361/* 124 */ 15362/***/ (function(module, exports, __webpack_require__) { 15363 15364"use strict"; 15365/* WEBPACK VAR INJECTION */(function(process) {/** 15366 * Copyright 2013-present, Facebook, Inc. 15367 * All rights reserved. 15368 * 15369 * This source code is licensed under the BSD-style license found in the 15370 * LICENSE file in the root directory of this source tree. An additional grant 15371 * of patent rights can be found in the PATENTS file in the same directory. 15372 * 15373 */ 15374 15375 15376 15377var _prodInvariant = __webpack_require__(3), 15378 _assign = __webpack_require__(4); 15379 15380var DOMPropertyOperations = __webpack_require__(58); 15381var LinkedValueUtils = __webpack_require__(38); 15382var ReactDOMComponentTree = __webpack_require__(5); 15383var ReactUpdates = __webpack_require__(10); 15384 15385var invariant = __webpack_require__(1); 15386var warning = __webpack_require__(2); 15387 15388var didWarnValueLink = false;
15389var didWarnCheckedLink = false; 15390var didWarnValueDefaultValue = false; 15391var didWarnCheckedDefaultChecked = false; 15392var didWarnControlledToUncontrolled = false; 15393var didWarnUncontrolledToControlled = false; 15394 15395function forceUpdateIfMounted() { 15396 if (this._rootNodeID) { 15397 // DOM component is still mounted; update 15398 ReactDOMInput.updateWrapper(this); 15399 } 15400} 15401 15402function isControlled(props) { 15403 var usesChecked = props.type === 'checkbox' || props.type === 'radio'; 15404 return usesChecked ? props.checked != null : props.value != null; 15405} 15406 15407/** 15408 * Implements an <input> host component that allows setting these optional 15409 * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. 15410 * 15411 * If `checked` or `value` are not supplied (or null/undefined), user actions 15412 * that affect the checked state or value will trigger updates to the element. 15413 * 15414 * If they are supplied (and not null/undefined), the rendered element will not 15415 * trigger updates to the element. Instead, the props must change in order for 15416 * the rendered element to be updated. 15417 * 15418 * The rendered element will be initialized as unchecked (or `defaultChecked`) 15419 * with an empty value (or `defaultValue`). 15420 * 15421 * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html 15422 */ 15423var ReactDOMInput = { 15424 getHostProps: function (inst, props) { 15425 var value = LinkedValueUtils.getValue(props); 15426 var checked = LinkedValueUtils.getChecked(props); 15427 15428 var hostProps = _assign({ 15429 // Make sure we set .type before any other properties (setting .value 15430 // before .type means .value is lost in IE11 and below) 15431 type: undefined, 15432 // Make sure we set .step before .value (setting .value before .step 15433 // means .value is rounded on mount, based upon step precision) 15434 step: undefined, 15435 // Make sure we set .min & .max before .value (to ensure proper order 15436 // in corner cases such as min or max deriving from value, e.g. Issue #7170) 15437 min: undefined, 15438 max: undefined 15439 }, props, { 15440 defaultChecked: undefined, 15441 defaultValue: undefined, 15442 value: value != null ? value : inst._wrapperState.initialValue, 15443 checked: checked != null ? checked : inst._wrapperState.initialChecked, 15444 onChange: inst._wrapperState.onChange 15445 }); 15446 15447 return hostProps; 15448 }, 15449 15450 mountWrapper: function (inst, props) { 15451 if (process.env.NODE_ENV !== 'production') { 15452 LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner); 15453 15454 var owner = inst._currentElement._owner; 15455 15456 if (props.valueLink !== undefined && !didWarnValueLink) { 15457 process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0; 15458 didWarnValueLink = true; 15459 } 15460 if (props.checkedLink !== undefined && !didWarnCheckedLink) { 15461 process.env.NODE_ENV !== 'production' ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0; 15462 didWarnCheckedLink = true; 15463 } 15464 if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) { 15465 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 c
15465omponent', props.type) : void 0; 15466 didWarnCheckedDefaultChecked = true; 15467 } 15468 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { 15469 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; 15470 didWarnValueDefaultValue = true; 15471 } 15472 } 15473 15474 var defaultValue = props.defaultValue; 15475 inst._wrapperState = { 15476 initialChecked: props.checked != null ? props.checked : props.defaultChecked, 15477 initialValue: props.value != null ? props.value : defaultValue, 15478 listeners: null, 15479 onChange: _handleChange.bind(inst), 15480 controlled: isControlled(props) 15481 }; 15482 }, 15483 15484 updateWrapper: function (inst) { 15485 var props = inst._currentElement.props; 15486 15487 if (process.env.NODE_ENV !== 'production') { 15488 var controlled = isControlled(props); 15489 var owner = inst._currentElement._owner; 15490 15491 if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { 15492 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 c
15492omponent', props.type) : void 0; 15493 didWarnUncontrolledToControlled = true; 15494 } 15495 if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { 15496 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; 15497 didWarnControlledToUncontrolled = true; 15498 } 15499 } 15500 15501 // TODO: Shouldn't this be getChecked(props)? 15502 var checked = props.checked; 15503 if (checked != null) { 15504 DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false); 15505 } 15506 15507 var node = ReactDOMComponentTree.getNodeFromInstance(inst); 15508 var value = LinkedValueUtils.getValue(props); 15509 if (value != null) { 15510 if (value === 0 && node.value === '') { 15511 node.value = '0'; 15512 // Note: IE9 reports a number inputs as 'text', so check props instead. 15513 } else if (props.type === 'number') { 15514 // Simulate `input.valueAsNumber`. IE9 does not support it 15515 var valueAsNumber = parseFloat(node.value, 10) || 0; 15516 15517 // eslint-disable-next-line 15518 if (value != valueAsNumber) { 15519 // Cast `value` to a string to ensure the value is set correctly. While 15520 // browsers typically do this as necessary, jsdom doesn't. 15521 node.value = '' + value; 15522 } 15523 // eslint-disable-next-line 15524 } else if (value != node.value) { 15525 // Cast `value` to a string to ensure the value is set correctly. While 15526 // browsers typically do this as necessary, jsdom doesn't. 15527 node.value = '' + value; 15528 } 15529 } else { 15530 if (props.value == null && props.defaultValue != null) { 15531 // In Chrome, assigning defaultValue to certain input types triggers input validation. 15532 // For number inputs, the display value loses trailing decimal points. For email inputs, 15533 // Chrome raises "The specified value <x> is not a valid email address". 15534 // 15535 // Here we check to see if the defaultValue has actually changed, avoiding these problems 15536 // when the user is inputting text 15537 // 15538 // https://github.com/facebook/react/issues/7253 15539 if (node.defaultValue !== '' + props.defaultValue) { 15540 node.defaultValue = '' + props.defaultValue; 15541 } 15542 } 15543 if (props.checked == null && props.defaultChecked != null) { 15544 node.defaultChecked = !!props.defaultChecked; 15545 } 15546 } 15547 }, 15548 15549 postMountWrapper: function (inst) { 15550 var props = inst._currentElement.props; 15551 15552 // This is in postMount because we need access to the DOM node, which is not 15553 // available until after the component has mounted. 15554 var node = ReactDOMComponentTree.getNodeFromInstance(inst); 15555 15556 // Detach value from defaultValue. We won't do anything if we're working on 15557 // submit or reset inputs as those values & defaultValues are linked. They 15558 // are not resetable nodes so this operation doesn't matter and actually 15559 // removes browser-default values (eg "Submit Query") when no value is 15560 // provided. 15561 15562 switch (props.type) { 15563 case 'submit': 15564 case 'reset': 15565 break; 15566 case 'color': 15567 case 'date': 15568 case 'datetime': 15569 case 'datetime-local': 15570 case 'month': 15571 case 'time': 15572 case 'week': 15573 // This fixes the no-show issue on iOS Safari and Android Chrome: 15574 // https://github.com/facebook/react/issues/7233 15575 node.value = ''; 15576 node.value = node.defaultValue; 15577 break; 15578 default: 15579 node.value = node.value; 15580 break; 15581 } 15582 15583 // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug 15584 // this is needed to work around a chrome bug where setting defaultChecked 15585 // will sometimes influence the value of checked (even after detachment). 15586 // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 15587 // We need to temporarily unset name to avoid disrupting radio button groups. 15588 var name = node.name; 15589 if (name !== '') { 15590 node.name = ''; 15591 } 15592 node.defaultChecked = !node.defaultChecked; 15593 node.defaultChecked = !node.defaultChecked; 15594 if (name !== '') { 15595 node.name = name; 15596 } 15597 } 15598}; 15599 15600function _handleChange(event) { 15601 var props = this._currentElement.props; 15602 15603 var returnValue = LinkedValueUtils.executeOnChange(props, event); 15604 15605 // Here we use asap to wait until all updates have propagated, which 15606 // is important when using controlled components within layers: 15607 // https://github.com/facebook/react/issues/1698 15608 ReactUpdates.asap(forceUpdateIfMounted, this); 15609 15610 var name = props.name; 15611 if (props.type === 'radio' && name != null) { 15612 var rootNode = ReactDOMComponentTree.getNodeFromInstance(this); 15613 var queryRoot = rootNode; 15614 15615 while (queryRoot.parentNode) { 15616 queryRoot = queryRoot.parentNode; 15617 } 15618 15619 // If `rootNode.form` was non-null, then we could try `form.elements`, 15620 // but that sometimes behaves strangely in IE8. We could also try using 15621 // `form.getElementsByName`, but that will only return direct children 15622 // and won't include inputs that use the HTML5 `form=` attribute. Since 15623 // the input might not even be in a form, let's just use the global 15624 // `querySelectorAll` to ensure we don't miss anything. 15625 var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]'); 15626 15627 for (var i = 0; i < group.length; i++) { 15628 var otherNode = group[i];
15629 if (otherNode === rootNode || otherNode.form !== rootNode.form) { 15630 continue; 15631 } 15632 // This will throw if radio buttons rendered by different copies of React 15633 // and the same name are rendered into the same form (same as #1939). 15634 // That's probably okay; we don't support it just as we don't support 15635 // mixing React radio buttons with non-React ones. 15636 var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode); 15637 !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; 15638 // If this is a controlled radio button group, forcing the input that 15639 // was previously checked to update will cause it to be come re-checked 15640 // as appropriate. 15641 ReactUpdates.asap(forceUpdateIfMounted, otherInstance); 15642 } 15643 } 15644 15645 return returnValue; 15646} 15647 15648module.exports = ReactDOMInput; 15649/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 15650 15651/***/ }), 15652/* 125 */ 15653/***/ (function(module, exports, __webpack_require__) { 15654 15655"use strict"; 15656/* WEBPACK VAR INJECTION */(function(process) {/** 15657 * Copyright 2013-present, Facebook, Inc. 15658 * All rights reserved. 15659 * 15660 * This source code is licensed under the BSD-style license found in the 15661 * LICENSE file in the root directory of this source tree. An additional grant 15662 * of patent rights can be found in the PATENTS file in the same directory. 15663 * 15664 */ 15665 15666 15667 15668var DOMProperty = __webpack_require__(13); 15669var ReactComponentTreeHook = __webpack_require__(7); 15670 15671var warning = __webpack_require__(2); 15672 15673var warnedProperties = {}; 15674var rARIA = new RegExp('^(aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$'); 15675 15676function validateProperty(tagName, name, debugID) { 15677 if (warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { 15678 return true; 15679 } 15680 15681 if (rARIA.test(name)) { 15682 var lowerCasedName = name.toLowerCase(); 15683 var standardName = DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null; 15684 15685 // If this is an aria-* attribute, but is not listed in the known DOM 15686 // DOM properties, then it is an invalid aria-* attribute. 15687 if (standardName == null) { 15688 warnedProperties[name] = true; 15689 return false; 15690 } 15691 // aria-* attributes should be lowercase; suggest the lowercase version. 15692 if (name !== standardName) { 15693 process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown ARIA attribute %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; 15694 warnedProperties[name] = true; 15695 return true; 15696 } 15697 } 15698 15699 return true; 15700} 15701 15702function warnInvalidARIAProps(debugID, element) { 15703 var invalidProps = []; 15704 15705 for (var key in element.props) { 15706 var isValid = validateProperty(element.type, key, debugID); 15707 if (!isValid) { 15708 invalidProps.push(key); 15709 } 15710 } 15711 15712 var unknownPropString = invalidProps.map(function (prop) { 15713 return '`' + prop + '`'; 15714 }).join(', '); 15715 15716 if (invalidProps.length === 1) { 15717 process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; 15718 } else if (invalidProps.length > 1) { 15719 process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; 15720 } 15721} 15722 15723function handleElement(debugID, element) { 15724 if (element == null || typeof element.type !== 'string') { 15725 return; 15726 } 15727 if (element.type.indexOf('-') >= 0 || element.props.is) { 15728 return; 15729 } 15730 15731 warnInvalidARIAProps(debugID, element); 15732} 15733 15734var ReactDOMInvalidARIAHook = { 15735 onBeforeMountComponent: function (debugID, element) { 15736 if (process.env.NODE_ENV !== 'production') { 15737 handleElement(debugID, element); 15738 } 15739 }, 15740 onBeforeUpdateComponent: function (debugID, element) { 15741 if (process.env.NODE_ENV !== 'production') { 15742 handleElement(debugID, element); 15743 } 15744 } 15745}; 15746 15747module.exports = ReactDOMInvalidARIAHook; 15748/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 15749 15750/***/ }), 15751/* 126 */ 15752/***/ (function(module, exports, __webpack_require__) { 15753 15754"use strict"; 15755/* WEBPACK VAR INJECTION */(function(process) {/** 15756 * Copyright 2013-present, Facebook, Inc. 15757 * All rights reserved. 15758 * 15759 * This source code is licensed under the BSD-style license found in the 15760 * LICENSE file in the root directory of this source tree. An additional grant 15761 * of patent rights can be found in the PATENTS file in the same directory. 15762 * 15763 */ 15764 15765 15766 15767var ReactComponentTreeHook = __webpack_require__(7); 15768 15769var warning = __webpack_require__(2); 15770 15771var didWarnValueNull = false;
15772 15773function handleElement(debugID, element) { 15774 if (element == null) { 15775 return; 15776 } 15777 if (element.type !== 'input' && element.type !== 'textarea' && element.type !== 'select') { 15778 return; 15779 } 15780 if (element.props != null && element.props.value === null && !didWarnValueNull) { 15781 process.env.NODE_ENV !== 'production' ? warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using the empty string to clear the component or `undefined` ' + 'for uncontrolled components.%s', element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; 15782 15783 didWarnValueNull = true; 15784 } 15785} 15786 15787var ReactDOMNullInputValuePropHook = { 15788 onBeforeMountComponent: function (debugID, element) { 15789 handleElement(debugID, element); 15790 }, 15791 onBeforeUpdateComponent: function (debugID, element) { 15792 handleElement(debugID, element); 15793 } 15794}; 15795 15796module.exports = ReactDOMNullInputValuePropHook; 15797/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 15798 15799/***/ }), 15800/* 127 */ 15801/***/ (function(module, exports, __webpack_require__) { 15802 15803"use strict"; 15804/* WEBPACK VAR INJECTION */(function(process) {/** 15805 * Copyright 2013-present, Facebook, Inc. 15806 * All rights reserved. 15807 * 15808 * This source code is licensed under the BSD-style license found in the 15809 * LICENSE file in the root directory of this source tree. An additional grant 15810 * of patent rights can be found in the PATENTS file in the same directory. 15811 * 15812 */ 15813 15814 15815 15816var _assign = __webpack_require__(4); 15817 15818var React = __webpack_require__(19); 15819var ReactDOMComponentTree = __webpack_require__(5); 15820var ReactDOMSelect = __webpack_require__(60); 15821 15822var warning = __webpack_require__(2); 15823var didWarnInvalidOptionChildren = false; 15824 15825function flattenChildren(children) { 15826 var content = ''; 15827 15828 // Flatten children and warn if they aren't strings or numbers; 15829 // invalid types are ignored. 15830 React.Children.forEach(children, function (child) { 15831 if (child == null) { 15832 return; 15833 } 15834 if (typeof child === 'string' || typeof child === 'number') { 15835 content += child; 15836 } else if (!didWarnInvalidOptionChildren) { 15837 didWarnInvalidOptionChildren = true; 15838 process.env.NODE_ENV !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0; 15839 } 15840 }); 15841 15842 return content; 15843} 15844 15845/** 15846 * Implements an <option> host component that warns when `selected` is set. 15847 */ 15848var ReactDOMOption = { 15849 mountWrapper: function (inst, props, hostParent) { 15850 // TODO (yungsters): Remove support for `selected` in <option>. 15851 if (process.env.NODE_ENV !== 'production') { 15852 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; 15853 } 15854 15855 // Look up whether this option is 'selected' 15856 var selectValue = null; 15857 if (hostParent != null) { 15858 var selectParent = hostParent; 15859 15860 if (selectParent._tag === 'optgroup') { 15861 selectParent = selectParent._hostParent; 15862 } 15863 15864 if (selectParent != null && selectParent._tag === 'select') { 15865 selectValue = ReactDOMSelect.getSelectValueContext(selectParent); 15866 } 15867 } 15868 15869 // If the value is null (e.g., no specified value or after initial mount) 15870 // or missing (e.g., for <datalist>), we don't change props.selected 15871 var selected = null; 15872 if (selectValue != null) { 15873 var value; 15874 if (props.value != null) { 15875 value = props.value + ''; 15876 } else { 15877 value = flattenChildren(props.children); 15878 } 15879 selected = false; 15880 if (Array.isArray(selectValue)) { 15881 // multiple 15882 for (var i = 0; i < selectValue.length; i++) { 15883 if ('' + selectValue[i] === value) { 15884 selected = true; 15885 break; 15886 } 15887 } 15888 } else { 15889 selected = '' + selectValue === value; 15890 } 15891 } 15892 15893 inst._wrapperState = { selected: selected }; 15894 }, 15895 15896 postMountWrapper: function (inst) { 15897 // value="" should make a value attribute (#6219) 15898 var props = inst._currentElement.props; 15899 if (props.value != null) { 15900 var node = ReactDOMComponentTree.getNodeFromInstance(inst); 15901 node.setAttribute('value', props.value); 15902 } 15903 }, 15904 15905 getHostProps: function (inst, props) { 15906 var hostProps = _assign({ selected: undefined, children: undefined }, props); 15907 15908 // Read state only from initial mount because <select> updates value 15909 // manually; we need the initial state only for server rendering 15910 if (inst._wrapperState.selected != null) { 15911 hostProps.selected = inst._wrapperState.selected; 15912 } 15913 15914 var content = flattenChildren(props.children); 15915 15916 if (content) { 15917 hostProps.children = content; 15918 } 15919 15920 return hostProps; 15921 } 15922 15923}; 15924 15925module.exports = ReactDOMOption;
15926/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 15927 15928/***/ }), 15929/* 128 */ 15930/***/ (function(module, exports, __webpack_require__) { 15931 15932"use strict"; 15933/** 15934 * Copyright 2013-present, Facebook, Inc. 15935 * All rights reserved. 15936 * 15937 * This source code is licensed under the BSD-style license found in the 15938 * LICENSE file in the root directory of this source tree. An additional grant 15939 * of patent rights can be found in the PATENTS file in the same directory. 15940 * 15941 */ 15942 15943 15944 15945var ExecutionEnvironment = __webpack_require__(6); 15946 15947var getNodeForCharacterOffset = __webpack_require__(171); 15948var getTextContentAccessor = __webpack_require__(72); 15949 15950/** 15951 * While `isCollapsed` is available on the Selection object and `collapsed` 15952 * is available on the Range object, IE11 sometimes gets them wrong. 15953 * If the anchor/focus nodes and offsets are the same, the range is collapsed. 15954 */ 15955function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) { 15956 return anchorNode === focusNode && anchorOffset === focusOffset; 15957} 15958 15959/** 15960 * Get the appropriate anchor and focus node/offset pairs for IE. 15961 * 15962 * The catch here is that IE's selection API doesn't provide information 15963 * about whether the selection is forward or backward, so we have to 15964 * behave as though it's always forward. 15965 * 15966 * IE text differs from modern selection in that it behaves as though 15967 * block elements end with a new line. This means character offsets will 15968 * differ between the two APIs. 15969 * 15970 * @param {DOMElement} node 15971 * @return {object} 15972 */ 15973function getIEOffsets(node) { 15974 var selection = document.selection; 15975 var selectedRange = selection.createRange(); 15976 var selectedLength = selectedRange.text.length; 15977 15978 // Duplicate selection so we can move range without breaking user selection. 15979 var fromStart = selectedRange.duplicate(); 15980 fromStart.moveToElementText(node); 15981 fromStart.setEndPoint('EndToStart', selectedRange); 15982 15983 var startOffset = fromStart.text.length; 15984 var endOffset = startOffset + selectedLength; 15985 15986 return { 15987 start: startOffset, 15988 end: endOffset 15989 }; 15990} 15991 15992/** 15993 * @param {DOMElement} node 15994 * @return {?object} 15995 */ 15996function getModernOffsets(node) { 15997 var selection = window.getSelection && window.getSelection(); 15998 15999 if (!selection || selection.rangeCount === 0) { 16000 return null; 16001 } 16002 16003 var anchorNode = selection.anchorNode; 16004 var anchorOffset = selection.anchorOffset; 16005 var focusNode = selection.focusNode; 16006 var focusOffset = selection.focusOffset; 16007 16008 var currentRange = selection.getRangeAt(0); 16009 16010 // In Firefox, range.startContainer and range.endContainer can be "anonymous 16011 // divs", e.g. the up/down buttons on an <input type="number">. Anonymous 16012 // divs do not seem to expose properties, triggering a "Permission denied 16013 // error" if any of its properties are accessed. The only seemingly possible 16014 // way to avoid erroring is to access a property that typically works for 16015 // non-anonymous divs and catch any error that may otherwise arise. See 16016 // https://bugzilla.mozilla.org/show_bug.cgi?id=208427 16017 try { 16018 /* eslint-disable no-unused-expressions */ 16019 currentRange.startContainer.nodeType; 16020 currentRange.endContainer.nodeType; 16021 /* eslint-enable no-unused-expressions */ 16022 } catch (e) { 16023 return null; 16024 } 16025 16026 // If the node and offset values are the same, the selection is collapsed. 16027 // `Selection.isCollapsed` is available natively, but IE sometimes gets 16028 // this value wrong. 16029 var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset); 16030 16031 var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length; 16032 16033 var tempRange = currentRange.cloneRange(); 16034 tempRange.selectNodeContents(node); 16035 tempRange.setEnd(currentRange.startContainer, currentRange.startOffset); 16036 16037 var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset); 16038 16039 var start = isTempRangeCollapsed ? 0 : tempRange.toString().length; 16040 var end = start + rangeLength; 16041 16042 // Detect whether the selection is backward. 16043 var detectionRange = document.createRange(); 16044 detectionRange.setStart(anchorNode, anchorOffset); 16045 detectionRange.setEnd(focusNode, focusOffset); 16046 var isBackward = detectionRange.collapsed; 16047 16048 return { 16049 start: isBackward ? end : start, 16050 end: isBackward ? start : end 16051 }; 16052} 16053 16054/** 16055 * @param {DOMElement|DOMTextNode} node 16056 * @param {object} offsets 16057 */ 16058function setIEOffsets(node, offsets) { 16059 var range = document.selection.createRange().duplicate(); 16060 var start, end; 16061 16062 if (offsets.end === undefined) { 16063 start = offsets.start; 16064 end = start; 16065 } else if (offsets.start > offsets.end) { 16066 start = offsets.end; 16067 end = offsets.start; 16068 } else { 16069 start = offsets.start; 16070 end = offsets.end; 16071 } 16072 16073 range.moveToElementText(node); 16074 range.moveStart('character', start); 16075 range.setEndPoint('EndToStart', range); 16076 range.moveEnd('character', end - start); 16077 range.select(); 16078} 16079 16080/** 16081 * In modern non-IE browsers, we can support both forward and backward 16082 * selections. 16083 *
16084 * Note: IE10+ supports the Selection object, but it does not support 16085 * the `extend` method, which means that even in modern IE, it's not possible 16086 * to programmatically create a backward selection. Thus, for all IE 16087 * versions, we use the old IE API to create our selections. 16088 * 16089 * @param {DOMElement|DOMTextNode} node 16090 * @param {object} offsets 16091 */ 16092function setModernOffsets(node, offsets) { 16093 if (!window.getSelection) { 16094 return; 16095 } 16096 16097 var selection = window.getSelection(); 16098 var length = node[getTextContentAccessor()].length; 16099 var start = Math.min(offsets.start, length); 16100 var end = offsets.end === undefined ? start : Math.min(offsets.end, length); 16101 16102 // IE 11 uses modern selection, but doesn't support the extend method. 16103 // Flip backward selections, so we can set with a single range. 16104 if (!selection.extend && start > end) { 16105 var temp = end; 16106 end = start; 16107 start = temp; 16108 } 16109 16110 var startMarker = getNodeForCharacterOffset(node, start); 16111 var endMarker = getNodeForCharacterOffset(node, end); 16112 16113 if (startMarker && endMarker) { 16114 var range = document.createRange(); 16115 range.setStart(startMarker.node, startMarker.offset); 16116 selection.removeAllRanges(); 16117 16118 if (start > end) { 16119 selection.addRange(range); 16120 selection.extend(endMarker.node, endMarker.offset); 16121 } else { 16122 range.setEnd(endMarker.node, endMarker.offset); 16123 selection.addRange(range); 16124 } 16125 } 16126} 16127 16128var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window); 16129 16130var ReactDOMSelection = { 16131 /** 16132 * @param {DOMElement} node 16133 */ 16134 getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets, 16135 16136 /** 16137 * @param {DOMElement|DOMTextNode} node 16138 * @param {object} offsets 16139 */ 16140 setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets 16141}; 16142 16143module.exports = ReactDOMSelection; 16144 16145/***/ }), 16146/* 129 */ 16147/***/ (function(module, exports, __webpack_require__) { 16148 16149"use strict"; 16150/* WEBPACK VAR INJECTION */(function(process) {/** 16151 * Copyright 2013-present, Facebook, Inc. 16152 * All rights reserved. 16153 * 16154 * This source code is licensed under the BSD-style license found in the 16155 * LICENSE file in the root directory of this source tree. An additional grant 16156 * of patent rights can be found in the PATENTS file in the same directory. 16157 * 16158 */ 16159 16160 16161 16162var _prodInvariant = __webpack_require__(3), 16163 _assign = __webpack_require__(4); 16164 16165var DOMChildrenOperations = __webpack_require__(34); 16166var DOMLazyTree = __webpack_require__(17); 16167var ReactDOMComponentTree = __webpack_require__(5); 16168 16169var escapeTextContentForBrowser = __webpack_require__(30); 16170var invariant = __webpack_require__(1); 16171var validateDOMNesting = __webpack_require__(48); 16172 16173/** 16174 * Text nodes violate a couple assumptions that React makes about components: 16175 * 16176 * - When mounting text into the DOM, adjacent text nodes are merged. 16177 * - Text nodes cannot be assigned a React root ID. 16178 * 16179 * This component is used to wrap strings between comment nodes so that they 16180 * can undergo the same reconciliation that is applied to elements. 16181 * 16182 * TODO: Investigate representing React components in the DOM with text nodes. 16183 * 16184 * @class ReactDOMTextComponent 16185 * @extends ReactComponent 16186 * @internal 16187 */ 16188var ReactDOMTextComponent = function (text) { 16189 // TODO: This is really a ReactText (ReactNode), not a ReactElement 16190 this._currentElement = text; 16191 this._stringText = '' + text; 16192 // ReactDOMComponentTree uses these: 16193 this._hostNode = null; 16194 this._hostParent = null; 16195 16196 // Properties 16197 this._domID = 0; 16198 this._mountIndex = 0; 16199 this._closingComment = null; 16200 this._commentNodes = null; 16201}; 16202 16203_assign(ReactDOMTextComponent.prototype, { 16204 16205 /** 16206 * Creates the markup for this text node. This node is not intended to have 16207 * any features besides containing text content. 16208 * 16209 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction 16210 * @return {string} Markup for this text node. 16211 * @internal 16212 */ 16213 mountComponent: function (transaction, hostParent, hostContainerInfo, context) { 16214 if (process.env.NODE_ENV !== 'production') { 16215 var parentInfo; 16216 if (hostParent != null) { 16217 parentInfo = hostParent._ancestorInfo; 16218 } else if (hostContainerInfo != null) { 16219 parentInfo = hostContainerInfo._ancestorInfo; 16220 } 16221 if (parentInfo) { 16222 // parentInfo should always be present except for the top-level 16223 // component when server rendering 16224 validateDOMNesting(null, this._stringText, this, parentInfo); 16225 } 16226 } 16227 16228 var domID = hostContainerInfo._idCounter++; 16229 var openingValue = ' react-text: ' + domID + ' '; 16230 var closingValue = ' /react-text '; 16231 this._domID = domID; 16232 this._hostParent = hostParent; 16233 if (transaction.useCreateElement) { 16234 var ownerDocument = hostContainerInfo._ownerDocument; 16235 var openingComment = ownerDocument.createComment(openingValue); 16236 var closingComment = ownerDocument.createComment(closingValue); 16237 var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment()); 16238 DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment)); 16239 if (this._stringText) { 16240 DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText))); 16241 } 16242 DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment)); 16243 ReactDOMComponentTree.precacheNode(this, openingComment); 16244 this._closingComment = closingComment; 16245 return lazyTree; 16246 } else { 16247 var escapedText = escapeTextContentForBrowser(this._stringText); 16248 16249 if (transaction.renderToStaticMarkup) { 16250 // Normally we'd wrap this between comment nodes for the reasons stated 16251 // above, but since this is a situation where React won't take over 16252 // (static pages), we can simply return the text as it is. 16253 return escapedText; 16254 } 16255 16256 return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->'; 16257 } 16258 }, 16259 16260 /** 16261 * Updates this component by updating the text content. 16262 * 16263 * @param {ReactText} nextText The next text content 16264 * @param {ReactReconcileTransaction} transaction 16265 * @internal 16266 */ 16267 receiveComponent: function (nextText, transaction) { 16268 if (nextText !== this._currentElement) { 16269 this._currentElement = nextText; 16270 var nextStringText = '' + nextText; 16271 if (nextStringText !== this._stringText) { 16272 // TODO: Save this as pending props and use performUpdateIfNecessary 16273 // and/or updateComponent to do the actual update for consistency with 16274 // other component types? 16275 this._stringText = nextStringText; 16276 var commentNodes = this.getHostNode(); 16277 DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText); 16278 } 16279 } 16280 }, 16281 16282 getHostNode: function () { 16283 var hostNode = this._commentNodes; 16284 if (hostNode) { 16285 return hostNode; 16286 } 16287 if (!this._closingComment) { 16288 var openingComment = ReactDOMComponentTree.getNodeFromInstance(this);
16289 var node = openingComment.nextSibling; 16290 while (true) { 16291 !(node != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0; 16292 if (node.nodeType === 8 && node.nodeValue === ' /react-text ') { 16293 this._closingComment = node; 16294 break; 16295 } 16296 node = node.nextSibling; 16297 } 16298 } 16299 hostNode = [this._hostNode, this._closingComment]; 16300 this._commentNodes = hostNode; 16301 return hostNode; 16302 }, 16303 16304 unmountComponent: function () { 16305 this._closingComment = null; 16306 this._commentNodes = null; 16307 ReactDOMComponentTree.uncacheNode(this); 16308 } 16309 16310}); 16311 16312module.exports = ReactDOMTextComponent; 16313/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 16314 16315/***/ }), 16316/* 130 */ 16317/***/ (function(module, exports, __webpack_require__) { 16318 16319"use strict"; 16320/* WEBPACK VAR INJECTION */(function(process) {/** 16321 * Copyright 2013-present, Facebook, Inc. 16322 * All rights reserved. 16323 * 16324 * This source code is licensed under the BSD-style license found in the 16325 * LICENSE file in the root directory of this source tree. An additional grant 16326 * of patent rights can be found in the PATENTS file in the same directory. 16327 * 16328 */ 16329 16330 16331 16332var _prodInvariant = __webpack_require__(3), 16333 _assign = __webpack_require__(4); 16334 16335var LinkedValueUtils = __webpack_require__(38); 16336var ReactDOMComponentTree = __webpack_require__(5); 16337var ReactUpdates = __webpack_require__(10); 16338 16339var invariant = __webpack_require__(1); 16340var warning = __webpack_require__(2); 16341 16342var didWarnValueLink = false; 16343var didWarnValDefaultVal = false; 16344 16345function forceUpdateIfMounted() { 16346 if (this._rootNodeID) { 16347 // DOM component is still mounted; update 16348 ReactDOMTextarea.updateWrapper(this); 16349 } 16350} 16351 16352/** 16353 * Implements a <textarea> host component that allows setting `value`, and 16354 * `defaultValue`. This differs from the traditional DOM API because value is 16355 * usually set as PCDATA children. 16356 * 16357 * If `value` is not supplied (or null/undefined), user actions that affect the 16358 * value will trigger updates to the element. 16359 * 16360 * If `value` is supplied (and not null/undefined), the rendered element will 16361 * not trigger updates to the element. Instead, the `value` prop must change in 16362 * order for the rendered element to be updated. 16363 * 16364 * The rendered element will be initialized with an empty value, the prop 16365 * `defaultValue` if specified, or the children content (deprecated). 16366 */ 16367var ReactDOMTextarea = { 16368 getHostProps: function (inst, props) { 16369 !(props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0; 16370 16371 // Always set children to the same thing. In IE9, the selection range will 16372 // get reset if `textContent` is mutated. We could add a check in setTextContent 16373 // to only set the value if/when the value differs from the node value (which would 16374 // completely solve this IE9 bug), but Sebastian+Ben seemed to like this solution. 16375 // The value can be a boolean or object so that's why it's forced to be a string. 16376 var hostProps = _assign({}, props, { 16377 value: undefined, 16378 defaultValue: undefined, 16379 children: '' + inst._wrapperState.initialValue, 16380 onChange: inst._wrapperState.onChange 16381 }); 16382 16383 return hostProps; 16384 }, 16385 16386 mountWrapper: function (inst, props) { 16387 if (process.env.NODE_ENV !== 'production') { 16388 LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner); 16389 if (props.valueLink !== undefined && !didWarnValueLink) { 16390 process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0; 16391 didWarnValueLink = true; 16392 } 16393 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) { 16394 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; 16395 didWarnValDefaultVal = true; 16396 } 16397 } 16398 16399 var value = LinkedValueUtils.getValue(props); 16400 var initialValue = value; 16401 16402 // Only bother fetching default value if we're going to use it 16403 if (value == null) { 16404 var defaultValue = props.defaultValue; 16405 // TODO (yungsters): Remove support for children content in <textarea>. 16406 var children = props.children; 16407 if (children != null) { 16408 if (process.env.NODE_ENV !== 'production') { 16409 process.env.NODE_ENV !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0; 16410 } 16411 !(defaultValue == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0; 16412 if (Array.isArray(children)) { 16413 !(children.length <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0; 16414 children = children[0]; 16415 } 16416 16417 defaultValue = '' + children; 16418 } 16419 if (defaultValue == null) { 16420 defaultValue = ''; 16421 } 16422 initialValue = defaultValue; 16423 } 16424 16425 inst._wrapperState = { 16426 initialValue: '' + initialValue, 16427 listeners: null, 16428 onChange: _handleChange.bind(inst) 16429 }; 16430 }, 16431 16432 updateWrapper: function (inst) { 16433 var props = inst._currentElement.props; 16434 16435 var node = ReactDOMComponentTree.getNodeFromInstance(inst); 16436 var value = LinkedValueUtils.getValue(props); 16437 if (value != null) { 16438 // Cast `value` to a string to ensure the value is set correctly. While 16439 // browsers typically do this as necessary, jsdom doesn't. 16440 var newValue = '' + value; 16441 16442 // To avoid side effects (such as losing text selection), only set value if changed 16443 if (newValue !== node.value) { 16444 node.value = newValue; 16445 } 16446 if (props.defaultValue == null) { 16447 node.defaultValue = newValue; 16448 } 16449 } 16450 if (props.defaultValue != null) { 16451 node.defaultValue = props.defaultValue; 16452 } 16453 }, 16454 16455 postMountWrapper: function (inst) { 16456 // This is in postMount because we need access to the DOM node, which is not 16457 // available until after the component has mounted. 16458 var node = ReactDOMComponentTree.getNodeFromInstance(inst); 16459 var textContent = node.textContent; 16460 16461 // Only set node.value if textContent is equal to the expected 16462 // initial value. In IE10/IE11 there is a bug where the placeholder attribute 16463 // will populate textContent as well. 16464 // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/ 16465 if (textContent === inst._wrapperState.initialValue) { 16466 node.value = textContent; 16467 } 16468 } 16469}; 16470 16471function _handleChange(event) { 16472 var props = this._currentElement.props; 16473 var returnValue = LinkedValueUtils.executeOnChange(props, event); 16474 ReactUpdates.asap(forceUpdateIfMounted, this); 16475 return returnValue; 16476} 16477 16478module.exports = ReactDOMTextarea;
16479/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 16480 16481/***/ }), 16482/* 131 */ 16483/***/ (function(module, exports, __webpack_require__) { 16484 16485"use strict"; 16486/* WEBPACK VAR INJECTION */(function(process) {/** 16487 * Copyright 2015-present, Facebook, Inc. 16488 * All rights reserved. 16489 * 16490 * This source code is licensed under the BSD-style license found in the 16491 * LICENSE file in the root directory of this source tree. An additional grant 16492 * of patent rights can be found in the PATENTS file in the same directory. 16493 * 16494 */ 16495 16496 16497 16498var _prodInvariant = __webpack_require__(3); 16499 16500var invariant = __webpack_require__(1); 16501 16502/** 16503 * Return the lowest common ancestor of A and B, or null if they are in 16504 * different trees. 16505 */ 16506function getLowestCommonAncestor(instA, instB) { 16507 !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; 16508 !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; 16509 16510 var depthA = 0; 16511 for (var tempA = instA; tempA; tempA = tempA._hostParent) { 16512 depthA++; 16513 } 16514 var depthB = 0; 16515 for (var tempB = instB; tempB; tempB = tempB._hostParent) { 16516 depthB++; 16517 } 16518 16519 // If A is deeper, crawl up. 16520 while (depthA - depthB > 0) { 16521 instA = instA._hostParent; 16522 depthA--; 16523 } 16524 16525 // If B is deeper, crawl up. 16526 while (depthB - depthA > 0) { 16527 instB = instB._hostParent; 16528 depthB--; 16529 } 16530 16531 // Walk in lockstep until we find a match. 16532 var depth = depthA; 16533 while (depth--) { 16534 if (instA === instB) { 16535 return instA; 16536 } 16537 instA = instA._hostParent; 16538 instB = instB._hostParent; 16539 } 16540 return null; 16541} 16542 16543/** 16544 * Return if A is an ancestor of B. 16545 */ 16546function isAncestor(instA, instB) { 16547 !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0; 16548 !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0; 16549 16550 while (instB) { 16551 if (instB === instA) { 16552 return true; 16553 } 16554 instB = instB._hostParent; 16555 } 16556 return false; 16557} 16558 16559/** 16560 * Return the parent instance of the passed-in instance. 16561 */ 16562function getParentInstance(inst) { 16563 !('_hostNode' in inst) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0; 16564 16565 return inst._hostParent; 16566} 16567 16568/** 16569 * Simulates the traversal of a two-phase, capture/bubble event dispatch. 16570 */ 16571function traverseTwoPhase(inst, fn, arg) { 16572 var path = []; 16573 while (inst) { 16574 path.push(inst); 16575 inst = inst._hostParent; 16576 } 16577 var i; 16578 for (i = path.length; i-- > 0;) { 16579 fn(path[i], 'captured', arg); 16580 } 16581 for (i = 0; i < path.length; i++) { 16582 fn(path[i], 'bubbled', arg); 16583 } 16584} 16585 16586/** 16587 * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that 16588 * should would receive a `mouseEnter` or `mouseLeave` event. 16589 * 16590 * Does not invoke the callback on the nearest common ancestor because nothing 16591 * "entered" or "left" that element. 16592 */ 16593function traverseEnterLeave(from, to, fn, argFrom, argTo) { 16594 var common = from && to ? getLowestCommonAncestor(from, to) : null; 16595 var pathFrom = []; 16596 while (from && from !== common) { 16597 pathFrom.push(from); 16598 from = from._hostParent; 16599 } 16600 var pathTo = []; 16601 while (to && to !== common) { 16602 pathTo.push(to); 16603 to = to._hostParent; 16604 } 16605 var i; 16606 for (i = 0; i < pathFrom.length; i++) { 16607 fn(pathFrom[i], 'bubbled', argFrom); 16608 } 16609 for (i = pathTo.length; i-- > 0;) { 16610 fn(pathTo[i], 'captured', argTo); 16611 } 16612} 16613 16614module.exports = { 16615 isAncestor: isAncestor, 16616 getLowestCommonAncestor: getLowestCommonAncestor, 16617 getParentInstance: getParentInstance, 16618 traverseTwoPhase: traverseTwoPhase, 16619 traverseEnterLeave: traverseEnterLeave 16620}; 16621/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 16622 16623/***/ }), 16624/* 132 */ 16625/***/ (function(module, exports, __webpack_require__) { 16626 16627"use strict"; 16628/* WEBPACK VAR INJECTION */(function(process) {/** 16629 * Copyright 2013-present, Facebook, Inc. 16630 * All rights reserved. 16631 * 16632 * This source code is licensed under the BSD-style license found in the 16633 * LICENSE file in the root directory of this source tree. An additional grant 16634 * of patent rights can be found in the PATENTS file in the same directory. 16635 * 16636 */ 16637 16638 16639 16640var DOMProperty = __webpack_require__(13); 16641var EventPluginRegistry = __webpack_require__(26); 16642var ReactComponentTreeHook = __webpack_require__(7); 16643 16644var warning = __webpack_require__(2); 16645 16646if (process.env.NODE_ENV !== 'production') { 16647 var reactProps = { 16648 children: true, 16649 dangerouslySetInnerHTML: true, 16650 key: true, 16651 ref: true, 16652 16653 autoFocus: true, 16654 defaultValue: true, 16655 valueLink: true, 16656 defaultChecked: true, 16657 checkedLink: true, 16658 innerHTML: true, 16659 suppressContentEditableWarning: true, 16660 onFocusIn: true, 16661 onFocusOut: true 16662 }; 16663 var warnedProperties = {}; 16664
16665 var validateProperty = function (tagName, name, debugID) { 16666 if (DOMProperty.properties.hasOwnProperty(name) || DOMProperty.isCustomAttribute(name)) { 16667 return true; 16668 } 16669 if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { 16670 return true; 16671 } 16672 if (EventPluginRegistry.registrationNameModules.hasOwnProperty(name)) { 16673 return true; 16674 } 16675 warnedProperties[name] = true; 16676 var lowerCasedName = name.toLowerCase(); 16677 16678 // data-* attributes should be lowercase; suggest the lowercase version 16679 var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null; 16680 16681 var registrationName = EventPluginRegistry.possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? EventPluginRegistry.possibleRegistrationNames[lowerCasedName] : null; 16682 16683 if (standardName != null) { 16684 process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown DOM property %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; 16685 return true; 16686 } else if (registrationName != null) { 16687 process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown event handler property %s. Did you mean `%s`?%s', name, registrationName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; 16688 return true; 16689 } else { 16690 // We were unable to guess which prop the user intended. 16691 // It is likely that the user was just blindly spreading/forwarding props 16692 // Components should be careful to only render valid props/attributes. 16693 // Warning will be invoked in warnUnknownProperties to allow grouping. 16694 return false; 16695 } 16696 }; 16697} 16698 16699var warnUnknownProperties = function (debugID, element) { 16700 var unknownProps = []; 16701 for (var key in element.props) { 16702 var isValid = validateProperty(element.type, key, debugID); 16703 if (!isValid) { 16704 unknownProps.push(key); 16705 } 16706 } 16707 16708 var unknownPropString = unknownProps.map(function (prop) { 16709 return '`' + prop + '`'; 16710 }).join(', '); 16711 16712 if (unknownProps.length === 1) { 16713 process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown prop %s on <%s> tag. Remove this prop from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; 16714 } else if (unknownProps.length > 1) { 16715 process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown props %s on <%s> tag. Remove these props from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; 16716 } 16717}; 16718 16719function handleElement(debugID, element) { 16720 if (element == null || typeof element.type !== 'string') { 16721 return; 16722 } 16723 if (element.type.indexOf('-') >= 0 || element.props.is) { 16724 return; 16725 } 16726 warnUnknownProperties(debugID, element); 16727} 16728 16729var ReactDOMUnknownPropertyHook = { 16730 onBeforeMountComponent: function (debugID, element) { 16731 handleElement(debugID, element); 16732 }, 16733 onBeforeUpdateComponent: function (debugID, element) { 16734 handleElement(debugID, element); 16735 } 16736}; 16737 16738module.exports = ReactDOMUnknownPropertyHook; 16739/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 16740 16741/***/ }), 16742/* 133 */ 16743/***/ (function(module, exports, __webpack_require__) { 16744 16745"use strict"; 16746/* WEBPACK VAR INJECTION */(function(process) {/** 16747 * Copyright 2016-present, Facebook, Inc. 16748 * All rights reserved. 16749 * 16750 * This source code is licensed under the BSD-style license found in the 16751 * LICENSE file in the root directory of this source tree. An additional grant 16752 * of patent rights can be found in the PATENTS file in the same directory. 16753 * 16754 * 16755 */ 16756 16757 16758 16759var ReactInvalidSetStateWarningHook = __webpack_require__(141); 16760var ReactHostOperationHistoryHook = __webpack_require__(139); 16761var ReactComponentTreeHook = __webpack_require__(7); 16762var ExecutionEnvironment = __webpack_require__(6); 16763 16764var performanceNow = __webpack_require__(101); 16765var warning = __webpack_require__(2); 16766 16767var hooks = []; 16768var didHookThrowForEvent = {}; 16769 16770function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) { 16771 try { 16772 fn.call(context, arg1, arg2, arg3, arg4, arg5); 16773 } catch (e) { 16774 process.env.NODE_ENV !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0; 16775 didHookThrowForEvent[event] = true; 16776 } 16777} 16778 16779function emitEvent(event, arg1, arg2, arg3, arg4, arg5) { 16780 for (var i = 0; i < hooks.length; i++) { 16781 var hook = hooks[i]; 16782 var fn = hook[event]; 16783 if (fn) { 16784 callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5); 16785 } 16786 } 16787} 16788 16789var isProfiling = false;
16790var flushHistory = []; 16791var lifeCycleTimerStack = []; 16792var currentFlushNesting = 0; 16793var currentFlushMeasurements = []; 16794var currentFlushStartTime = 0; 16795var currentTimerDebugID = null; 16796var currentTimerStartTime = 0; 16797var currentTimerNestedFlushDuration = 0; 16798var currentTimerType = null; 16799 16800var lifeCycleTimerHasWarned = false; 16801 16802function clearHistory() { 16803 ReactComponentTreeHook.purgeUnmountedComponents(); 16804 ReactHostOperationHistoryHook.clearHistory(); 16805} 16806 16807function getTreeSnapshot(registeredIDs) { 16808 return registeredIDs.reduce(function (tree, id) { 16809 var ownerID = ReactComponentTreeHook.getOwnerID(id); 16810 var parentID = ReactComponentTreeHook.getParentID(id); 16811 tree[id] = { 16812 displayName: ReactComponentTreeHook.getDisplayName(id), 16813 text: ReactComponentTreeHook.getText(id), 16814 updateCount: ReactComponentTreeHook.getUpdateCount(id), 16815 childIDs: ReactComponentTreeHook.getChildIDs(id), 16816 // Text nodes don't have owners but this is close enough. 16817 ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0, 16818 parentID: parentID 16819 }; 16820 return tree; 16821 }, {}); 16822} 16823 16824function resetMeasurements() { 16825 var previousStartTime = currentFlushStartTime; 16826 var previousMeasurements = currentFlushMeasurements; 16827 var previousOperations = ReactHostOperationHistoryHook.getHistory(); 16828 16829 if (currentFlushNesting === 0) { 16830 currentFlushStartTime = 0; 16831 currentFlushMeasurements = []; 16832 clearHistory(); 16833 return; 16834 } 16835 16836 if (previousMeasurements.length || previousOperations.length) { 16837 var registeredIDs = ReactComponentTreeHook.getRegisteredIDs(); 16838 flushHistory.push({ 16839 duration: performanceNow() - previousStartTime, 16840 measurements: previousMeasurements || [], 16841 operations: previousOperations || [], 16842 treeSnapshot: getTreeSnapshot(registeredIDs) 16843 }); 16844 } 16845 16846 clearHistory(); 16847 currentFlushStartTime = performanceNow(); 16848 currentFlushMeasurements = []; 16849} 16850 16851function checkDebugID(debugID) { 16852 var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; 16853 16854 if (allowRoot && debugID === 0) { 16855 return; 16856 } 16857 if (!debugID) { 16858 process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0; 16859 } 16860} 16861 16862function beginLifeCycleTimer(debugID, timerType) { 16863 if (currentFlushNesting === 0) { 16864 return; 16865 } 16866 if (currentTimerType && !lifeCycleTimerHasWarned) { 16867 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; 16868 lifeCycleTimerHasWarned = true; 16869 } 16870 currentTimerStartTime = performanceNow(); 16871 currentTimerNestedFlushDuration = 0; 16872 currentTimerDebugID = debugID; 16873 currentTimerType = timerType; 16874} 16875 16876function endLifeCycleTimer(debugID, timerType) { 16877 if (currentFlushNesting === 0) { 16878 return; 16879 } 16880 if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) { 16881 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; 16882 lifeCycleTimerHasWarned = true; 16883 } 16884 if (isProfiling) { 16885 currentFlushMeasurements.push({ 16886 timerType: timerType, 16887 instanceID: debugID, 16888 duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration 16889 }); 16890 } 16891 currentTimerStartTime = 0; 16892 currentTimerNestedFlushDuration = 0; 16893 currentTimerDebugID = null; 16894 currentTimerType = null; 16895} 16896 16897function pauseCurrentLifeCycleTimer() { 16898 var currentTimer = { 16899 startTime: currentTimerStartTime, 16900 nestedFlushStartTime: performanceNow(), 16901 debugID: currentTimerDebugID, 16902 timerType: currentTimerType 16903 }; 16904 lifeCycleTimerStack.push(currentTimer); 16905 currentTimerStartTime = 0; 16906 currentTimerNestedFlushDuration = 0; 16907 currentTimerDebugID = null; 16908 currentTimerType = null; 16909} 16910 16911function resumeCurrentLifeCycleTimer() { 16912 var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(), 16913 startTime = _lifeCycleTimerStack$.startTime, 16914 nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime, 16915 debugID = _lifeCycleTimerStack$.debugID,
16916 timerType = _lifeCycleTimerStack$.timerType; 16917 16918 var nestedFlushDuration = performanceNow() - nestedFlushStartTime; 16919 currentTimerStartTime = startTime; 16920 currentTimerNestedFlushDuration += nestedFlushDuration; 16921 currentTimerDebugID = debugID; 16922 currentTimerType = timerType; 16923} 16924 16925var lastMarkTimeStamp = 0; 16926var canUsePerformanceMeasure = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function'; 16927 16928function shouldMark(debugID) { 16929 if (!isProfiling || !canUsePerformanceMeasure) { 16930 return false; 16931 } 16932 var element = ReactComponentTreeHook.getElement(debugID); 16933 if (element == null || typeof element !== 'object') { 16934 return false; 16935 } 16936 var isHostElement = typeof element.type === 'string'; 16937 if (isHostElement) { 16938 return false; 16939 } 16940 return true; 16941} 16942 16943function markBegin(debugID, markType) { 16944 if (!shouldMark(debugID)) { 16945 return; 16946 } 16947 16948 var markName = debugID + '::' + markType; 16949 lastMarkTimeStamp = performanceNow(); 16950 performance.mark(markName); 16951} 16952 16953function markEnd(debugID, markType) { 16954 if (!shouldMark(debugID)) { 16955 return; 16956 } 16957 16958 var markName = debugID + '::' + markType; 16959 var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown'; 16960 16961 // Chrome has an issue of dropping markers recorded too fast: 16962 // https://bugs.chromium.org/p/chromium/issues/detail?id=640652 16963 // To work around this, we will not report very small measurements. 16964 // I determined the magic number by tweaking it back and forth. 16965 // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe. 16966 // When the bug is fixed, we can `measure()` unconditionally if we want to. 16967 var timeStamp = performanceNow(); 16968 if (timeStamp - lastMarkTimeStamp > 0.1) { 16969 var measurementName = displayName + ' [' + markType + ']'; 16970 performance.measure(measurementName, markName); 16971 } 16972 16973 performance.clearMarks(markName); 16974 performance.clearMeasures(measurementName); 16975} 16976 16977var ReactDebugTool = { 16978 addHook: function (hook) { 16979 hooks.push(hook); 16980 }, 16981 removeHook: function (hook) { 16982 for (var i = 0; i < hooks.length; i++) { 16983 if (hooks[i] === hook) { 16984 hooks.splice(i, 1); 16985 i--; 16986 } 16987 } 16988 }, 16989 isProfiling: function () { 16990 return isProfiling; 16991 }, 16992 beginProfiling: function () { 16993 if (isProfiling) { 16994 return; 16995 } 16996 16997 isProfiling = true; 16998 flushHistory.length = 0; 16999 resetMeasurements(); 17000 ReactDebugTool.addHook(ReactHostOperationHistoryHook); 17001 }, 17002 endProfiling: function () { 17003 if (!isProfiling) { 17004 return; 17005 } 17006 17007 isProfiling = false; 17008 resetMeasurements(); 17009 ReactDebugTool.removeHook(ReactHostOperationHistoryHook); 17010 }, 17011 getFlushHistory: function () { 17012 return flushHistory; 17013 }, 17014 onBeginFlush: function () { 17015 currentFlushNesting++; 17016 resetMeasurements(); 17017 pauseCurrentLifeCycleTimer(); 17018 emitEvent('onBeginFlush'); 17019 }, 17020 onEndFlush: function () { 17021 resetMeasurements(); 17022 currentFlushNesting--; 17023 resumeCurrentLifeCycleTimer(); 17024 emitEvent('onEndFlush'); 17025 }, 17026 onBeginLifeCycleTimer: function (debugID, timerType) { 17027 checkDebugID(debugID); 17028 emitEvent('onBeginLifeCycleTimer', debugID, timerType); 17029 markBegin(debugID, timerType); 17030 beginLifeCycleTimer(debugID, timerType); 17031 }, 17032 onEndLifeCycleTimer: function (debugID, timerType) { 17033 checkDebugID(debugID); 17034 endLifeCycleTimer(debugID, timerType); 17035 markEnd(debugID, timerType); 17036 emitEvent('onEndLifeCycleTimer', debugID, timerType); 17037 }, 17038 onBeginProcessingChildContext: function () { 17039 emitEvent('onBeginProcessingChildContext'); 17040 }, 17041 onEndProcessingChildContext: function () { 17042 emitEvent('onEndProcessingChildContext'); 17043 }, 17044 onHostOperation: function (operation) { 17045 checkDebugID(operation.instanceID); 17046 emitEvent('onHostOperation', operation); 17047 }, 17048 onSetState: function () { 17049 emitEvent('onSetState'); 17050 }, 17051 onSetChildren: function (debugID, childDebugIDs) { 17052 checkDebugID(debugID); 17053 childDebugIDs.forEach(checkDebugID); 17054 emitEvent('onSetChildren', debugID, childDebugIDs); 17055 }, 17056 onBeforeMountComponent: function (debugID, element, parentDebugID) { 17057 checkDebugID(debugID); 17058 checkDebugID(parentDebugID, true); 17059 emitEvent('onBeforeMountComponent', debugID, element, parentDebugID); 17060 markBegin(debugID, 'mount'); 17061 }, 17062 onMountComponent: function (debugID) { 17063 checkDebugID(debugID); 17064 markEnd(debugID, 'mount'); 17065 emitEvent('onMountComponent', debugID); 17066 }, 17067 onBeforeUpdateComponent: function (debugID, element) { 17068 checkDebugID(debugID); 17069 emitEvent('onBeforeUpdateComponent', debugID, element); 17070 markBegin(debugID, 'update'); 17071 }, 17072 onUpdateComponent: function (debugID) { 17073 checkDebugID(debugID); 17074 markEnd(debugID, 'update'); 17075 emitEvent('onUpdateComponent', debugID); 17076 }, 17077 onBeforeUnmountComponent: function (debugID) { 17078 checkDebugID(debugID); 17079 emitEvent('onBeforeUnmountComponent', debugID); 17080 markBegin(debugID, 'unmount'); 17081 }, 17082 onUnmountComponent: function (debugID) { 17083 checkDebugID(debugID); 17084 markEnd(debugID, 'unmount'); 17085 emitEvent('onUnmountComponent', debugID); 17086 }, 17087 onTestEvent: function () { 17088 emitEvent('onTestEvent'); 17089 } 17090}; 17091 17092// TODO remove these when RN/www gets updated 17093ReactDebugTool.addDevtool = ReactDebugTool.addHook; 17094ReactDebugTool.removeDevtool = ReactDebugTool.removeHook; 17095 17096ReactDebugTool.addHook(ReactInvalidSetStateWarningHook); 17097ReactDebugTool.addHook(ReactComponentTreeHook); 17098var url = ExecutionEnvironment.canUseDOM && window.location.href || ''; 17099if (/[?&]react_perf\b/.test(url)) { 17100 ReactDebugTool.beginProfiling(); 17101} 17102 17103module.exports = ReactDebugTool; 17104/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 17105 17106/***/ }), 17107/* 134 */ 17108/***/ (function(module, exports, __webpack_require__) { 17109 17110"use strict"; 17111/** 17112 * Copyright 2013-present, Facebook, Inc. 17113 * All rights reserved. 17114 * 17115 * This source code is licensed under the BSD-style license found in the 17116 * LICENSE file in the root directory of this source tree. An additional grant 17117 * of patent rights can be found in the PATENTS file in the same directory. 17118 * 17119 */ 17120 17121 17122 17123var _assign = __webpack_require__(4); 17124 17125var ReactUpdates = __webpack_require__(10); 17126var Transaction = __webpack_require__(29); 17127 17128var emptyFunction = __webpack_require__(9); 17129 17130var RESET_BATCHED_UPDATES = { 17131 initialize: emptyFunction, 17132 close: function () { 17133 ReactDefaultBatchingStrategy.isBatchingUpdates = false;
17134 } 17135}; 17136 17137var FLUSH_BATCHED_UPDATES = { 17138 initialize: emptyFunction, 17139 close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates) 17140}; 17141 17142var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES]; 17143 17144function ReactDefaultBatchingStrategyTransaction() { 17145 this.reinitializeTransaction(); 17146} 17147 17148_assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, { 17149 getTransactionWrappers: function () { 17150 return TRANSACTION_WRAPPERS; 17151 } 17152}); 17153 17154var transaction = new ReactDefaultBatchingStrategyTransaction(); 17155 17156var ReactDefaultBatchingStrategy = { 17157 isBatchingUpdates: false, 17158 17159 /** 17160 * Call the provided function in a context within which calls to `setState` 17161 * and friends are batched such that components aren't updated unnecessarily. 17162 */ 17163 batchedUpdates: function (callback, a, b, c, d, e) { 17164 var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates; 17165 17166 ReactDefaultBatchingStrategy.isBatchingUpdates = true; 17167 17168 // The code is written this way to avoid extra allocations 17169 if (alreadyBatchingUpdates) { 17170 return callback(a, b, c, d, e); 17171 } else { 17172 return transaction.perform(callback, null, a, b, c, d, e); 17173 } 17174 } 17175}; 17176 17177module.exports = ReactDefaultBatchingStrategy; 17178 17179/***/ }), 17180/* 135 */ 17181/***/ (function(module, exports, __webpack_require__) { 17182 17183"use strict"; 17184/** 17185 * Copyright 2013-present, Facebook, Inc. 17186 * All rights reserved. 17187 * 17188 * This source code is licensed under the BSD-style license found in the 17189 * LICENSE file in the root directory of this source tree. An additional grant 17190 * of patent rights can be found in the PATENTS file in the same directory. 17191 * 17192 */ 17193 17194 17195 17196var ARIADOMPropertyConfig = __webpack_require__(105); 17197var BeforeInputEventPlugin = __webpack_require__(107); 17198var ChangeEventPlugin = __webpack_require__(109); 17199var DefaultEventPluginOrder = __webpack_require__(111); 17200var EnterLeaveEventPlugin = __webpack_require__(112); 17201var HTMLDOMPropertyConfig = __webpack_require__(114); 17202var ReactComponentBrowserEnvironment = __webpack_require__(116); 17203var ReactDOMComponent = __webpack_require__(119); 17204var ReactDOMComponentTree = __webpack_require__(5); 17205var ReactDOMEmptyComponent = __webpack_require__(121); 17206var ReactDOMTreeTraversal = __webpack_require__(131); 17207var ReactDOMTextComponent = __webpack_require__(129); 17208var ReactDefaultBatchingStrategy = __webpack_require__(134); 17209var ReactEventListener = __webpack_require__(138); 17210var ReactInjection = __webpack_require__(140); 17211var ReactReconcileTransaction = __webpack_require__(146); 17212var SVGDOMPropertyConfig = __webpack_require__(151); 17213var SelectEventPlugin = __webpack_require__(152); 17214var SimpleEventPlugin = __webpack_require__(153); 17215 17216var alreadyInjected = false; 17217 17218function inject() { 17219 if (alreadyInjected) { 17220 // TODO: This is currently true because these injections are shared between 17221 // the client and the server package. They should be built independently 17222 // and not share any injection state. Then this problem will be solved. 17223 return; 17224 } 17225 alreadyInjected = true; 17226 17227 ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener); 17228 17229 /** 17230 * Inject modules for resolving DOM hierarchy and plugin ordering. 17231 */ 17232 ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder); 17233 ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree); 17234 ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal); 17235 17236 /** 17237 * Some important event plugins included by default (without having to require 17238 * them). 17239 */ 17240 ReactInjection.EventPluginHub.injectEventPluginsByName({ 17241 SimpleEventPlugin: SimpleEventPlugin, 17242 EnterLeaveEventPlugin: EnterLeaveEventPlugin, 17243 ChangeEventPlugin: ChangeEventPlugin, 17244 SelectEventPlugin: SelectEventPlugin, 17245 BeforeInputEventPlugin: BeforeInputEventPlugin 17246 }); 17247 17248 ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent); 17249 17250 ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent); 17251 17252 ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig); 17253 ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); 17254 ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); 17255 17256 ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) { 17257 return new ReactDOMEmptyComponent(instantiate); 17258 }); 17259 17260 ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction); 17261 ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy); 17262 17263 ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); 17264} 17265 17266module.exports = { 17267 inject: inject 17268}; 17269 17270/***/ }), 17271/* 136 */ 17272/***/ (function(module, exports, __webpack_require__) { 17273 17274"use strict"; 17275/** 17276 * Copyright 2014-present, Facebook, Inc. 17277 * All rights reserved. 17278 * 17279 * This source code is licensed under the BSD-style license found in the 17280 * LICENSE file in the root directory of this source tree. An additional grant 17281 * of patent rights can be found in the PATENTS file in the same directory. 17282 * 17283 * 17284 */ 17285 17286 17287 17288// The Symbol used to tag the ReactElement type. If there is no native Symbol 17289// nor polyfill, then a plain number is used for performance. 17290 17291var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; 17292 17293module.exports = REACT_ELEMENT_TYPE; 17294 17295/***/ }), 17296/* 137 */ 17297/***/ (function(module, exports, __webpack_require__) { 17298 17299"use strict"; 17300/** 17301 * Copyright 2013-present, Facebook, Inc. 17302 * All rights reserved. 17303 * 17304 * This source code is licensed under the BSD-style license found in the 17305 * LICENSE file in the root directory of this source tree. An additional grant 17306 * of patent rights can be found in the PATENTS file in the same directory. 17307 * 17308 */ 17309 17310 17311 17312var EventPluginHub = __webpack_require__(21); 17313 17314function runEventQueueInBatch(events) { 17315 EventPluginHub.enqueueEvents(events); 17316 EventPluginHub.processEventQueue(false); 17317} 17318 17319var ReactEventEmitterMixin = { 17320 17321 /** 17322 * Streams a fired top-level event to `EventPluginHub` where plugins have the 17323 * opportunity to create `ReactEvent`s to be dispatched. 17324 */ 17325 handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { 17326 var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); 17327 runEventQueueInBatch(events); 17328 } 17329}; 17330 17331module.exports = ReactEventEmitterMixin; 17332 17333/***/ }), 17334/* 138 */ 17335/***/ (function(module, exports, __webpack_require__) { 17336 17337"use strict"; 17338/** 17339 * Copyright 2013-present, Facebook, Inc. 17340 * All rights reserved. 17341 * 17342 * This source code is licensed under the BSD-style license found in the 17343 * LICENSE file in the root directory of this source tree. An additional grant 17344 * of patent rights can be found in the PATENTS file in the same directory. 17345 * 17346 */ 17347 17348 17349 17350var _assign = __webpack_require__(4); 17351 17352var EventListener = __webpack_require__(51); 17353var ExecutionEnvironment = __webpack_require__(6); 17354var PooledClass = __webpack_require__(14); 17355var ReactDOMComponentTree = __webpack_require__(5); 17356var ReactUpdates = __webpack_require__(10); 17357 17358var getEventTarget = __webpack_require__(45);
17359var getUnboundedScrollPosition = __webpack_require__(94); 17360 17361/** 17362 * Find the deepest React component completely containing the root of the 17363 * passed-in instance (for use when entire React trees are nested within each 17364 * other). If React trees are not nested, returns null. 17365 */ 17366function findParent(inst) { 17367 // TODO: It may be a good idea to cache this to prevent unnecessary DOM 17368 // traversal, but caching is difficult to do correctly without using a 17369 // mutation observer to listen for all DOM changes. 17370 while (inst._hostParent) { 17371 inst = inst._hostParent; 17372 } 17373 var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst); 17374 var container = rootNode.parentNode; 17375 return ReactDOMComponentTree.getClosestInstanceFromNode(container); 17376} 17377 17378// Used to store ancestor hierarchy in top level callback 17379function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) { 17380 this.topLevelType = topLevelType; 17381 this.nativeEvent = nativeEvent; 17382 this.ancestors = []; 17383} 17384_assign(TopLevelCallbackBookKeeping.prototype, { 17385 destructor: function () { 17386 this.topLevelType = null; 17387 this.nativeEvent = null; 17388 this.ancestors.length = 0; 17389 } 17390}); 17391PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler); 17392 17393function handleTopLevelImpl(bookKeeping) { 17394 var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent); 17395 var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget); 17396 17397 // Loop through the hierarchy, in case there's any nested components. 17398 // It's important that we build the array of ancestors before calling any 17399 // event handlers, because event handlers can modify the DOM, leading to 17400 // inconsistencies with ReactMount's node cache. See #1105. 17401 var ancestor = targetInst; 17402 do { 17403 bookKeeping.ancestors.push(ancestor); 17404 ancestor = ancestor && findParent(ancestor); 17405 } while (ancestor); 17406 17407 for (var i = 0; i < bookKeeping.ancestors.length; i++) { 17408 targetInst = bookKeeping.ancestors[i]; 17409 ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); 17410 } 17411} 17412 17413function scrollValueMonitor(cb) { 17414 var scrollPosition = getUnboundedScrollPosition(window); 17415 cb(scrollPosition); 17416} 17417 17418var ReactEventListener = { 17419 _enabled: true, 17420 _handleTopLevel: null, 17421 17422 WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null, 17423 17424 setHandleTopLevel: function (handleTopLevel) { 17425 ReactEventListener._handleTopLevel = handleTopLevel; 17426 }, 17427 17428 setEnabled: function (enabled) { 17429 ReactEventListener._enabled = !!enabled; 17430 }, 17431 17432 isEnabled: function () { 17433 return ReactEventListener._enabled; 17434 }, 17435 17436 /** 17437 * Traps top-level events by using event bubbling. 17438 * 17439 * @param {string} topLevelType Record from `EventConstants`. 17440 * @param {string} handlerBaseName Event name (e.g. "click"). 17441 * @param {object} element Element on which to attach listener. 17442 * @return {?object} An object with a remove function which will forcefully 17443 * remove the listener. 17444 * @internal 17445 */ 17446 trapBubbledEvent: function (topLevelType, handlerBaseName, element) { 17447 if (!element) { 17448 return null; 17449 } 17450 return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); 17451 }, 17452 17453 /** 17454 * Traps a top-level event by using event capturing. 17455 * 17456 * @param {string} topLevelType Record from `EventConstants`. 17457 * @param {string} handlerBaseName Event name (e.g. "click"). 17458 * @param {object} element Element on which to attach listener. 17459 * @return {?object} An object with a remove function which will forcefully 17460 * remove the listener. 17461 * @internal 17462 */ 17463 trapCapturedEvent: function (topLevelType, handlerBaseName, element) { 17464 if (!element) { 17465 return null; 17466 } 17467 return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); 17468 }, 17469 17470 monitorScrollValue: function (refresh) { 17471 var callback = scrollValueMonitor.bind(null, refresh); 17472 EventListener.listen(window, 'scroll', callback); 17473 }, 17474 17475 dispatchEvent: function (topLevelType, nativeEvent) { 17476 if (!ReactEventListener._enabled) { 17477 return; 17478 } 17479 17480 var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent); 17481 try { 17482 // Event queue being processed in the same cycle allows 17483 // `preventDefault`. 17484 ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping); 17485 } finally { 17486 TopLevelCallbackBookKeeping.release(bookKeeping); 17487 } 17488 } 17489}; 17490 17491module.exports = ReactEventListener; 17492 17493/***/ }), 17494/* 139 */ 17495/***/ (function(module, exports, __webpack_require__) { 17496 17497"use strict"; 17498/** 17499 * Copyright 2016-present, Facebook, Inc. 17500 * All rights reserved. 17501 * 17502 * This source code is licensed under the BSD-style license found in the 17503 * LICENSE file in the root directory of this source tree. An additional grant 17504 * of patent rights can be found in the PATENTS file in the same directory. 17505 * 17506 * 17507 */ 17508 17509 17510 17511var history = []; 17512 17513var ReactHostOperationHistoryHook = { 17514 onHostOperation: function (operation) { 17515 history.push(operation); 17516 }, 17517 clearHistory: function () { 17518 if (ReactHostOperationHistoryHook._preventClearing) { 17519 // Should only be used for tests. 17520 return; 17521 } 17522 17523 history = []; 17524 }, 17525 getHistory: function () { 17526 return history; 17527 } 17528}; 17529 17530module.exports = ReactHostOperationHistoryHook; 17531 17532/***/ }), 17533/* 140 */ 17534/***/ (function(module, exports, __webpack_require__) { 17535 17536"use strict"; 17537/** 17538 * Copyright 2013-present, Facebook, Inc. 17539 * All rights reserved. 17540 * 17541 * This source code is licensed under the BSD-style license found in the 17542 * LICENSE file in the root directory of this source tree. An additional grant 17543 * of patent rights can be found in the PATENTS file in the same directory. 17544 * 17545 */ 17546 17547 17548 17549var DOMProperty = __webpack_require__(13); 17550var EventPluginHub = __webpack_require__(21); 17551var EventPluginUtils = __webpack_require__(36); 17552var ReactComponentEnvironment = __webpack_require__(39); 17553var ReactEmptyComponent = __webpack_require__(61); 17554var ReactBrowserEventEmitter = __webpack_require__(27); 17555var ReactHostComponent = __webpack_require__(63); 17556var ReactUpdates = __webpack_require__(10); 17557 17558var ReactInjection = { 17559 Component: ReactComponentEnvironment.injection, 17560 DOMProperty: DOMProperty.injection, 17561 EmptyComponent: ReactEmptyComponent.injection, 17562 EventPluginHub: EventPluginHub.injection, 17563 EventPluginUtils: EventPluginUtils.injection, 17564 EventEmitter: ReactBrowserEventEmitter.injection, 17565 HostComponent: ReactHostComponent.injection, 17566 Updates: ReactUpdates.injection 17567}; 17568 17569module.exports = ReactInjection; 17570 17571/***/ }), 17572/* 141 */ 17573/***/ (function(module, exports, __webpack_require__) { 17574 17575"use strict"; 17576/* WEBPACK VAR INJECTION */(function(process) {/** 17577 * Copyright 2016-present, Facebook, Inc. 17578 * All rights reserved. 17579 * 17580 * This source code is licensed under the BSD-style license found in the 17581 * LICENSE file in the root directory of this source tree. An additional grant 17582 * of patent rights can be found in the PATENTS file in the same directory. 17583 * 17584 * 17585 */ 17586 17587 17588 17589var warning = __webpack_require__(2); 17590 17591if (process.env.NODE_ENV !== 'production') { 17592 var processingChildContext = false;
17593 17594 var warnInvalidSetState = function () { 17595 process.env.NODE_ENV !== 'production' ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0; 17596 }; 17597} 17598 17599var ReactInvalidSetStateWarningHook = { 17600 onBeginProcessingChildContext: function () { 17601 processingChildContext = true; 17602 }, 17603 onEndProcessingChildContext: function () { 17604 processingChildContext = false; 17605 }, 17606 onSetState: function () { 17607 warnInvalidSetState(); 17608 } 17609}; 17610 17611module.exports = ReactInvalidSetStateWarningHook; 17612/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 17613 17614/***/ }), 17615/* 142 */ 17616/***/ (function(module, exports, __webpack_require__) { 17617 17618"use strict"; 17619/** 17620 * Copyright 2013-present, Facebook, Inc. 17621 * All rights reserved. 17622 * 17623 * This source code is licensed under the BSD-style license found in the 17624 * LICENSE file in the root directory of this source tree. An additional grant 17625 * of patent rights can be found in the PATENTS file in the same directory. 17626 * 17627 */ 17628 17629 17630 17631var adler32 = __webpack_require__(164); 17632 17633var TAG_END = /\/?>/; 17634var COMMENT_START = /^<\!\-\-/; 17635 17636var ReactMarkupChecksum = { 17637 CHECKSUM_ATTR_NAME: 'data-react-checksum', 17638 17639 /** 17640 * @param {string} markup Markup string 17641 * @return {string} Markup string with checksum attribute attached 17642 */ 17643 addChecksumToMarkup: function (markup) { 17644 var checksum = adler32(markup); 17645 17646 // Add checksum (handle both parent tags, comments and self-closing tags) 17647 if (COMMENT_START.test(markup)) { 17648 return markup; 17649 } else { 17650 return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&'); 17651 } 17652 }, 17653 17654 /** 17655 * @param {string} markup to use 17656 * @param {DOMElement} element root React element 17657 * @returns {boolean} whether or not the markup is the same 17658 */ 17659 canReuseMarkup: function (markup, element) { 17660 var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); 17661 existingChecksum = existingChecksum && parseInt(existingChecksum, 10); 17662 var markupChecksum = adler32(markup); 17663 return markupChecksum === existingChecksum; 17664 } 17665}; 17666 17667module.exports = ReactMarkupChecksum; 17668 17669/***/ }), 17670/* 143 */ 17671/***/ (function(module, exports, __webpack_require__) { 17672 17673"use strict"; 17674/* WEBPACK VAR INJECTION */(function(process) {/** 17675 * Copyright 2013-present, Facebook, Inc. 17676 * All rights reserved. 17677 * 17678 * This source code is licensed under the BSD-style license found in the 17679 * LICENSE file in the root directory of this source tree. An additional grant 17680 * of patent rights can be found in the PATENTS file in the same directory. 17681 * 17682 */ 17683 17684 17685 17686var _prodInvariant = __webpack_require__(3); 17687 17688var ReactComponentEnvironment = __webpack_require__(39); 17689var ReactInstanceMap = __webpack_require__(23); 17690var ReactInstrumentation = __webpack_require__(8); 17691 17692var ReactCurrentOwner = __webpack_require__(11); 17693var ReactReconciler = __webpack_require__(18); 17694var ReactChildReconciler = __webpack_require__(115); 17695 17696var emptyFunction = __webpack_require__(9); 17697var flattenChildren = __webpack_require__(168); 17698var invariant = __webpack_require__(1); 17699 17700/** 17701 * Make an update for markup to be rendered and inserted at a supplied index. 17702 * 17703 * @param {string} markup Markup that renders into an element. 17704 * @param {number} toIndex Destination index. 17705 * @private 17706 */ 17707function makeInsertMarkup(markup, afterNode, toIndex) { 17708 // NOTE: Null values reduce hidden classes. 17709 return { 17710 type: 'INSERT_MARKUP', 17711 content: markup, 17712 fromIndex: null, 17713 fromNode: null, 17714 toIndex: toIndex, 17715 afterNode: afterNode 17716 }; 17717} 17718 17719/** 17720 * Make an update for moving an existing element to another index. 17721 * 17722 * @param {number} fromIndex Source index of the existing element. 17723 * @param {number} toIndex Destination index of the element. 17724 * @private 17725 */ 17726function makeMove(child, afterNode, toIndex) { 17727 // NOTE: Null values reduce hidden classes. 17728 return { 17729 type: 'MOVE_EXISTING', 17730 content: null, 17731 fromIndex: child._mountIndex, 17732 fromNode: ReactReconciler.getHostNode(child), 17733 toIndex: toIndex, 17734 afterNode: afterNode 17735 }; 17736} 17737 17738/** 17739 * Make an update for removing an element at an index. 17740 * 17741 * @param {number} fromIndex Index of the element to remove. 17742 * @private 17743 */ 17744function makeRemove(child, node) { 17745 // NOTE: Null values reduce hidden classes. 17746 return { 17747 type: 'REMOVE_NODE', 17748 content: null, 17749 fromIndex: child._mountIndex, 17750 fromNode: node, 17751 toIndex: null, 17752 afterNode: null 17753 }; 17754} 17755 17756/** 17757 * Make an update for setting the markup of a node. 17758 * 17759 * @param {string} markup Markup that renders into an element. 17760 * @private 17761 */ 17762function makeSetMarkup(markup) { 17763 // NOTE: Null values reduce hidden classes. 17764 return { 17765 type: 'SET_MARKUP', 17766 content: markup, 17767 fromIndex: null, 17768 fromNode: null, 17769 toIndex: null, 17770 afterNode: null 17771 }; 17772} 17773 17774/** 17775 * Make an update for setting the text content. 17776 * 17777 * @param {string} textContent Text content to set. 17778 * @private 17779 */ 17780function makeTextContent(textContent) { 17781 // NOTE: Null values reduce hidden classes. 17782 return { 17783 type: 'TEXT_CONTENT', 17784 content: textContent, 17785 fromIndex: null, 17786 fromNode: null, 17787 toIndex: null, 17788 afterNode: null 17789 }; 17790} 17791 17792/** 17793 * Push an update, if any, onto the queue. Creates a new queue if none is 17794 * passed and always returns the queue. Mutative. 17795 */ 17796function enqueue(queue, update) { 17797 if (update) { 17798 queue = queue || []; 17799 queue.push(update); 17800 } 17801 return queue; 17802} 17803 17804/** 17805 * Processes any enqueued updates. 17806 * 17807 * @private 17808 */ 17809function processQueue(inst, updateQueue) { 17810 ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue); 17811} 17812 17813var setChildrenForInstrumentation = emptyFunction; 17814if (process.env.NODE_ENV !== 'production') { 17815 var getDebugID = function (inst) { 17816 if (!inst._debugID) { 17817 // Check for ART-like instances. TODO: This is silly/gross. 17818 var internal; 17819 if (internal = ReactInstanceMap.get(inst)) { 17820 inst = internal; 17821 } 17822 } 17823 return inst._debugID; 17824 }; 17825 setChildrenForInstrumentation = function (children) { 17826 var debugID = getDebugID(this);
17827 // TODO: React Native empty components are also multichild. 17828 // This means they still get into this method but don't have _debugID. 17829 if (debugID !== 0) { 17830 ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) { 17831 return children[key]._debugID; 17832 }) : []); 17833 } 17834 }; 17835} 17836 17837/** 17838 * ReactMultiChild are capable of reconciling multiple children. 17839 * 17840 * @class ReactMultiChild 17841 * @internal 17842 */ 17843var ReactMultiChild = { 17844 17845 /** 17846 * Provides common functionality for components that must reconcile multiple 17847 * children. This is used by `ReactDOMComponent` to mount, update, and 17848 * unmount child components. 17849 * 17850 * @lends {ReactMultiChild.prototype} 17851 */ 17852 Mixin: { 17853 17854 _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) { 17855 if (process.env.NODE_ENV !== 'production') { 17856 var selfDebugID = getDebugID(this); 17857 if (this._currentElement) { 17858 try { 17859 ReactCurrentOwner.current = this._currentElement._owner; 17860 return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID); 17861 } finally { 17862 ReactCurrentOwner.current = null; 17863 } 17864 } 17865 } 17866 return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context); 17867 }, 17868 17869 _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) { 17870 var nextChildren; 17871 var selfDebugID = 0; 17872 if (process.env.NODE_ENV !== 'production') { 17873 selfDebugID = getDebugID(this); 17874 if (this._currentElement) { 17875 try { 17876 ReactCurrentOwner.current = this._currentElement._owner; 17877 nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); 17878 } finally { 17879 ReactCurrentOwner.current = null; 17880 } 17881 ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID); 17882 return nextChildren; 17883 } 17884 } 17885 nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); 17886 ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID); 17887 return nextChildren; 17888 }, 17889 17890 /** 17891 * Generates a "mount image" for each of the supplied children. In the case 17892 * of `ReactDOMComponent`, a mount image is a string of markup. 17893 * 17894 * @param {?object} nestedChildren Nested child maps. 17895 * @return {array} An array of mounted representations. 17896 * @internal 17897 */ 17898 mountChildren: function (nestedChildren, transaction, context) { 17899 var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context); 17900 this._renderedChildren = children; 17901 17902 var mountImages = []; 17903 var index = 0; 17904 for (var name in children) { 17905 if (children.hasOwnProperty(name)) { 17906 var child = children[name]; 17907 var selfDebugID = 0; 17908 if (process.env.NODE_ENV !== 'production') { 17909 selfDebugID = getDebugID(this); 17910 } 17911 var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID); 17912 child._mountIndex = index++; 17913 mountImages.push(mountImage); 17914 } 17915 } 17916 17917 if (process.env.NODE_ENV !== 'production') { 17918 setChildrenForInstrumentation.call(this, children); 17919 } 17920 17921 return mountImages; 17922 }, 17923 17924 /** 17925 * Replaces any rendered children with a text content string. 17926 * 17927 * @param {string} nextContent String of content. 17928 * @internal 17929 */ 17930 updateTextContent: function (nextContent) { 17931 var prevChildren = this._renderedChildren; 17932 // Remove any rendered children. 17933 ReactChildReconciler.unmountChildren(prevChildren, false); 17934 for (var name in prevChildren) { 17935 if (prevChildren.hasOwnProperty(name)) { 17936 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0; 17937 } 17938 } 17939 // Set new text content. 17940 var updates = [makeTextContent(nextContent)]; 17941 processQueue(this, updates); 17942 }, 17943 17944 /** 17945 * Replaces any rendered children with a markup string. 17946 * 17947 * @param {string} nextMarkup String of markup. 17948 * @internal 17949 */ 17950 updateMarkup: function (nextMarkup) { 17951 var prevChildren = this._renderedChildren; 17952 // Remove any rendered children. 17953 ReactChildReconciler.unmountChildren(prevChildren, false); 17954 for (var name in prevChildren) { 17955 if (prevChildren.hasOwnProperty(name)) { 17956 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0; 17957 } 17958 } 17959 var updates = [makeSetMarkup(nextMarkup)]; 17960 processQueue(this, updates); 17961 }, 17962 17963 /** 17964 * Updates the rendered children with new children. 17965 * 17966 * @param {?object} nextNestedChildrenElements Nested child element maps. 17967 * @param {ReactReconcileTransaction} transaction 17968 * @internal 17969 */ 17970 updateChildren: function (nextNestedChildrenElements, transaction, context) { 17971 // Hook used by React ART 17972 this._updateChildren(nextNestedChildrenElements, transaction, context); 17973 }, 17974 17975 /** 17976 * @param {?object} nextNestedChildrenElements Nested child element maps. 17977 * @param {ReactReconcileTransaction} transaction 17978 * @final 17979 * @protected 17980 */ 17981 _updateChildren: function (nextNestedChildrenElements, transaction, context) { 17982 var prevChildren = this._renderedChildren; 17983 var removedNodes = {}; 17984 var mountImages = []; 17985 var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context); 17986 if (!nextChildren && !prevChildren) { 17987 return; 17988 } 17989 var updates = null; 17990 var name; 17991 // `nextIndex` will increment for each child in `nextChildren`, but 17992 // `lastIndex` will be the last index visited in `prevChildren`. 17993 var nextIndex = 0; 17994 var lastIndex = 0; 17995 // `nextMountIndex` will increment for each newly mounted child. 17996 var nextMountIndex = 0; 17997 var lastPlacedNode = null; 17998 for (name in nextChildren) { 17999 if (!nextChildren.hasOwnProperty(name)) { 18000 continue; 18001 } 18002 var prevChild = prevChildren && prevChildren[name]; 18003 var nextChild = nextChildren[name]; 18004 if (prevChild === nextChild) { 18005 updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex)); 18006 lastIndex = Math.max(prevChild._mountIndex, lastIndex); 18007 prevChild._mountIndex = nextIndex; 18008 } else { 18009 if (prevChild) { 18010 // Update `lastIndex` before `_mountIndex` gets unset by unmounting. 18011 lastIndex = Math.max(prevChild._mountIndex, lastIndex); 18012 // The `removedNodes` loop below will actually remove the child. 18013 } 18014 // The child must be instantiated before it's mounted. 18015 updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context)); 18016 nextMountIndex++; 18017 } 18018 nextIndex++; 18019 lastPlacedNode = ReactReconciler.getHostNode(nextChild); 18020 } 18021 // Remove children that are no longer present.
18022 for (name in removedNodes) { 18023 if (removedNodes.hasOwnProperty(name)) { 18024 updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name])); 18025 } 18026 } 18027 if (updates) { 18028 processQueue(this, updates); 18029 } 18030 this._renderedChildren = nextChildren; 18031 18032 if (process.env.NODE_ENV !== 'production') { 18033 setChildrenForInstrumentation.call(this, nextChildren); 18034 } 18035 }, 18036 18037 /** 18038 * Unmounts all rendered children. This should be used to clean up children 18039 * when this component is unmounted. It does not actually perform any 18040 * backend operations. 18041 * 18042 * @internal 18043 */ 18044 unmountChildren: function (safely) { 18045 var renderedChildren = this._renderedChildren; 18046 ReactChildReconciler.unmountChildren(renderedChildren, safely); 18047 this._renderedChildren = null; 18048 }, 18049 18050 /** 18051 * Moves a child component to the supplied index. 18052 * 18053 * @param {ReactComponent} child Component to move. 18054 * @param {number} toIndex Destination index of the element. 18055 * @param {number} lastIndex Last index visited of the siblings of `child`. 18056 * @protected 18057 */ 18058 moveChild: function (child, afterNode, toIndex, lastIndex) { 18059 // If the index of `child` is less than `lastIndex`, then it needs to 18060 // be moved. Otherwise, we do not need to move it because a child will be 18061 // inserted or moved before `child`. 18062 if (child._mountIndex < lastIndex) { 18063 return makeMove(child, afterNode, toIndex); 18064 } 18065 }, 18066 18067 /** 18068 * Creates a child component. 18069 * 18070 * @param {ReactComponent} child Component to create. 18071 * @param {string} mountImage Markup to insert. 18072 * @protected 18073 */ 18074 createChild: function (child, afterNode, mountImage) { 18075 return makeInsertMarkup(mountImage, afterNode, child._mountIndex); 18076 }, 18077 18078 /** 18079 * Removes a child component. 18080 * 18081 * @param {ReactComponent} child Child to remove. 18082 * @protected 18083 */ 18084 removeChild: function (child, node) { 18085 return makeRemove(child, node); 18086 }, 18087 18088 /** 18089 * Mounts a child with the supplied name. 18090 * 18091 * NOTE: This is part of `updateChildren` and is here for readability. 18092 * 18093 * @param {ReactComponent} child Component to mount. 18094 * @param {string} name Name of the child. 18095 * @param {number} index Index at which to insert the child. 18096 * @param {ReactReconcileTransaction} transaction 18097 * @private 18098 */ 18099 _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) { 18100 child._mountIndex = index; 18101 return this.createChild(child, afterNode, mountImage); 18102 }, 18103 18104 /** 18105 * Unmounts a rendered child. 18106 * 18107 * NOTE: This is part of `updateChildren` and is here for readability. 18108 * 18109 * @param {ReactComponent} child Component to unmount. 18110 * @private 18111 */ 18112 _unmountChild: function (child, node) { 18113 var update = this.removeChild(child, node); 18114 child._mountIndex = null; 18115 return update; 18116 } 18117 18118 } 18119 18120}; 18121 18122module.exports = ReactMultiChild; 18123/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 18124 18125/***/ }), 18126/* 144 */ 18127/***/ (function(module, exports, __webpack_require__) { 18128 18129"use strict"; 18130/* WEBPACK VAR INJECTION */(function(process) {/** 18131 * Copyright 2013-present, Facebook, Inc. 18132 * All rights reserved. 18133 * 18134 * This source code is licensed under the BSD-style license found in the 18135 * LICENSE file in the root directory of this source tree. An additional grant 18136 * of patent rights can be found in the PATENTS file in the same directory. 18137 * 18138 * 18139 */ 18140 18141 18142 18143var _prodInvariant = __webpack_require__(3); 18144 18145var invariant = __webpack_require__(1); 18146 18147/** 18148 * @param {?object} object 18149 * @return {boolean} True if `object` is a valid owner. 18150 * @final 18151 */ 18152function isValidOwner(object) { 18153 return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function'); 18154} 18155 18156/** 18157 * ReactOwners are capable of storing references to owned components. 18158 * 18159 * All components are capable of //being// referenced by owner components, but 18160 * only ReactOwner components are capable of //referencing// owned components. 18161 * The named reference is known as a "ref". 18162 * 18163 * Refs are available when mounted and updated during reconciliation. 18164 * 18165 * var MyComponent = React.createClass({ 18166 * render: function() { 18167 * return ( 18168 * <div onClick={this.handleClick}> 18169 * <CustomComponent ref="custom" /> 18170 * </div> 18171 * ); 18172 * }, 18173 * handleClick: function() { 18174 * this.refs.custom.handleClick(); 18175 * }, 18176 * componentDidMount: function() { 18177 * this.refs.custom.initialize(); 18178 * } 18179 * }); 18180 * 18181 * Refs should rarely be used. When refs are used, they should only be done to 18182 * control data that is not handled by React's data flow. 18183 * 18184 * @class ReactOwner 18185 */ 18186var ReactOwner = { 18187 /** 18188 * Adds a component by ref to an owner component. 18189 * 18190 * @param {ReactComponent} component Component to reference. 18191 * @param {string} ref Name by which to refer to the component. 18192 * @param {ReactOwner} owner Component on which to record the ref. 18193 * @final 18194 * @internal 18195 */ 18196 addComponentAsRefTo: function (component, ref, owner) { 18197 !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; 18198 owner.attachRef(ref, component); 18199 }, 18200 18201 /** 18202 * Removes a component by ref from an owner component. 18203 * 18204 * @param {ReactComponent} component Component to dereference. 18205 * @param {string} ref Name of the ref to remove. 18206 * @param {ReactOwner} owner Component on which the ref is recorded. 18207 * @final 18208 * @internal 18209 */ 18210 removeComponentAsRefFrom: function (component, ref, owner) { 18211 !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('12
182110') : void 0; 18212 var ownerPublicInstance = owner.getPublicInstance(); 18213 // Check that `component`'s owner is still alive and that `component` is still the current ref 18214 // because we do not want to detach the ref if another component stole it. 18215 if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) { 18216 owner.detachRef(ref); 18217 } 18218 } 18219 18220}; 18221 18222module.exports = ReactOwner; 18223/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 18224 18225/***/ }), 18226/* 145 */ 18227/***/ (function(module, exports, __webpack_require__) { 18228 18229"use strict"; 18230/* WEBPACK VAR INJECTION */(function(process) {/** 18231 * Copyright 2013-present, Facebook, Inc. 18232 * All rights reserved. 18233 * 18234 * This source code is licensed under the BSD-style license found in the 18235 * LICENSE file in the root directory of this source tree. An additional grant 18236 * of patent rights can be found in the PATENTS file in the same directory. 18237 * 18238 * 18239 */ 18240 18241 18242 18243var ReactPropTypeLocationNames = {}; 18244 18245if (process.env.NODE_ENV !== 'production') { 18246 ReactPropTypeLocationNames = { 18247 prop: 'prop', 18248 context: 'context', 18249 childContext: 'child context' 18250 }; 18251} 18252 18253module.exports = ReactPropTypeLocationNames; 18254/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 18255 18256/***/ }), 18257/* 146 */ 18258/***/ (function(module, exports, __webpack_require__) { 18259 18260"use strict"; 18261/* WEBPACK VAR INJECTION */(function(process) {/** 18262 * Copyright 2013-present, Facebook, Inc. 18263 * All rights reserved. 18264 * 18265 * This source code is licensed under the BSD-style license found in the 18266 * LICENSE file in the root directory of this source tree. An additional grant 18267 * of patent rights can be found in the PATENTS file in the same directory. 18268 * 18269 */ 18270 18271 18272 18273var _assign = __webpack_require__(4); 18274 18275var CallbackQueue = __webpack_require__(57); 18276var PooledClass = __webpack_require__(14); 18277var ReactBrowserEventEmitter = __webpack_require__(27); 18278var ReactInputSelection = __webpack_require__(64); 18279var ReactInstrumentation = __webpack_require__(8); 18280var Transaction = __webpack_require__(29); 18281var ReactUpdateQueue = __webpack_require__(41); 18282 18283/** 18284 * Ensures that, when possible, the selection range (currently selected text 18285 * input) is not disturbed by performing the transaction. 18286 */ 18287var SELECTION_RESTORATION = { 18288 /** 18289 * @return {Selection} Selection information. 18290 */ 18291 initialize: ReactInputSelection.getSelectionInformation, 18292 /** 18293 * @param {Selection} sel Selection information returned from `initialize`. 18294 */ 18295 close: ReactInputSelection.restoreSelection 18296}; 18297 18298/** 18299 * Suppresses events (blur/focus) that could be inadvertently dispatched due to 18300 * high level DOM manipulations (like temporarily removing a text input from the 18301 * DOM). 18302 */ 18303var EVENT_SUPPRESSION = { 18304 /** 18305 * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before 18306 * the reconciliation. 18307 */ 18308 initialize: function () { 18309 var currentlyEnabled = ReactBrowserEventEmitter.isEnabled(); 18310 ReactBrowserEventEmitter.setEnabled(false); 18311 return currentlyEnabled; 18312 }, 18313 18314 /** 18315 * @param {boolean} previouslyEnabled Enabled status of 18316 * `ReactBrowserEventEmitter` before the reconciliation occurred. `close` 18317 * restores the previous value. 18318 */ 18319 close: function (previouslyEnabled) { 18320 ReactBrowserEventEmitter.setEnabled(previouslyEnabled); 18321 } 18322}; 18323 18324/** 18325 * Provides a queue for collecting `componentDidMount` and 18326 * `componentDidUpdate` callbacks during the transaction. 18327 */ 18328var ON_DOM_READY_QUEUEING = { 18329 /** 18330 * Initializes the internal `onDOMReady` queue. 18331 */ 18332 initialize: function () { 18333 this.reactMountReady.reset(); 18334 }, 18335 18336 /** 18337 * After DOM is flushed, invoke all registered `onDOMReady` callbacks. 18338 */ 18339 close: function () { 18340 this.reactMountReady.notifyAll(); 18341 } 18342}; 18343 18344/** 18345 * Executed within the scope of the `Transaction` instance. Consider these as 18346 * being member methods, but with an implied ordering while being isolated from 18347 * each other. 18348 */ 18349var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING]; 18350 18351if (process.env.NODE_ENV !== 'production') { 18352 TRANSACTION_WRAPPERS.push({ 18353 initialize: ReactInstrumentation.debugTool.onBeginFlush, 18354 close: ReactInstrumentation.debugTool.onEndFlush 18355 }); 18356} 18357 18358/** 18359 * Currently: 18360 * - The order that these are listed in the transaction is critical: 18361 * - Suppresses events. 18362 * - Restores selection range. 18363 * 18364 * Future: 18365 * - Restore document/overflow scroll positions that were unintentionally 18366 * modified via DOM insertions above the top viewport boundary. 18367 * - Implement/integrate with customized constraint based layout system and keep 18368 * track of which dimensions must be remeasured. 18369 * 18370 * @class ReactReconcileTransaction 18371 */ 18372function ReactReconcileTransaction(useCreateElement) { 18373 this.reinitializeTransaction(); 18374 // Only server-side rendering really needs this option (see 18375 // `ReactServerRendering`), but server-side uses 18376 // `ReactServerRenderingTransaction` instead. This option is here so that it's 18377 // accessible and defaults to false when `ReactDOMComponent` and 18378 // `ReactDOMTextComponent` checks it in `mountComponent`.` 18379 this.renderToStaticMarkup = false;
18380 this.reactMountReady = CallbackQueue.getPooled(null); 18381 this.useCreateElement = useCreateElement; 18382} 18383 18384var Mixin = { 18385 /** 18386 * @see Transaction 18387 * @abstract 18388 * @final 18389 * @return {array<object>} List of operation wrap procedures. 18390 * TODO: convert to array<TransactionWrapper> 18391 */ 18392 getTransactionWrappers: function () { 18393 return TRANSACTION_WRAPPERS; 18394 }, 18395 18396 /** 18397 * @return {object} The queue to collect `onDOMReady` callbacks with. 18398 */ 18399 getReactMountReady: function () { 18400 return this.reactMountReady; 18401 }, 18402 18403 /** 18404 * @return {object} The queue to collect React async events. 18405 */ 18406 getUpdateQueue: function () { 18407 return ReactUpdateQueue; 18408 }, 18409 18410 /** 18411 * Save current transaction state -- if the return value from this method is 18412 * passed to `rollback`, the transaction will be reset to that state. 18413 */ 18414 checkpoint: function () { 18415 // reactMountReady is the our only stateful wrapper 18416 return this.reactMountReady.checkpoint(); 18417 }, 18418 18419 rollback: function (checkpoint) { 18420 this.reactMountReady.rollback(checkpoint); 18421 }, 18422 18423 /** 18424 * `PooledClass` looks for this, and will invoke this before allowing this 18425 * instance to be reused. 18426 */ 18427 destructor: function () { 18428 CallbackQueue.release(this.reactMountReady); 18429 this.reactMountReady = null; 18430 } 18431}; 18432 18433_assign(ReactReconcileTransaction.prototype, Transaction, Mixin); 18434 18435PooledClass.addPoolingTo(ReactReconcileTransaction); 18436 18437module.exports = ReactReconcileTransaction; 18438/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 18439 18440/***/ }), 18441/* 147 */ 18442/***/ (function(module, exports, __webpack_require__) { 18443 18444"use strict"; 18445/** 18446 * Copyright 2013-present, Facebook, Inc. 18447 * All rights reserved. 18448 * 18449 * This source code is licensed under the BSD-style license found in the 18450 * LICENSE file in the root directory of this source tree. An additional grant 18451 * of patent rights can be found in the PATENTS file in the same directory. 18452 * 18453 * 18454 */ 18455 18456 18457 18458var ReactOwner = __webpack_require__(144); 18459 18460var ReactRef = {}; 18461 18462function attachRef(ref, component, owner) { 18463 if (typeof ref === 'function') { 18464 ref(component.getPublicInstance()); 18465 } else { 18466 // Legacy ref 18467 ReactOwner.addComponentAsRefTo(component, ref, owner); 18468 } 18469} 18470 18471function detachRef(ref, component, owner) { 18472 if (typeof ref === 'function') { 18473 ref(null); 18474 } else { 18475 // Legacy ref 18476 ReactOwner.removeComponentAsRefFrom(component, ref, owner); 18477 } 18478} 18479 18480ReactRef.attachRefs = function (instance, element) { 18481 if (element === null || typeof element !== 'object') { 18482 return; 18483 } 18484 var ref = element.ref; 18485 if (ref != null) { 18486 attachRef(ref, instance, element._owner); 18487 } 18488}; 18489 18490ReactRef.shouldUpdateRefs = function (prevElement, nextElement) { 18491 // If either the owner or a `ref` has changed, make sure the newest owner 18492 // has stored a reference to `this`, and the previous owner (if different) 18493 // has forgotten the reference to `this`. We use the element instead 18494 // of the public this.props because the post processing cannot determine 18495 // a ref. The ref conceptually lives on the element. 18496 18497 // TODO: Should this even be possible? The owner cannot change because 18498 // it's forbidden by shouldUpdateReactComponent. The ref can change 18499 // if you swap the keys of but not the refs. Reconsider where this check 18500 // is made. It probably belongs where the key checking and 18501 // instantiateReactComponent is done. 18502 18503 var prevRef = null; 18504 var prevOwner = null; 18505 if (prevElement !== null && typeof prevElement === 'object') { 18506 prevRef = prevElement.ref; 18507 prevOwner = prevElement._owner; 18508 } 18509 18510 var nextRef = null; 18511 var nextOwner = null; 18512 if (nextElement !== null && typeof nextElement === 'object') { 18513 nextRef = nextElement.ref; 18514 nextOwner = nextElement._owner; 18515 } 18516 18517 return prevRef !== nextRef || 18518 // If owner changes but we have an unchanged function ref, don't update refs 18519 typeof nextRef === 'string' && nextOwner !== prevOwner; 18520}; 18521 18522ReactRef.detachRefs = function (instance, element) { 18523 if (element === null || typeof element !== 'object') { 18524 return; 18525 } 18526 var ref = element.ref; 18527 if (ref != null) { 18528 detachRef(ref, instance, element._owner); 18529 } 18530}; 18531 18532module.exports = ReactRef; 18533 18534/***/ }), 18535/* 148 */ 18536/***/ (function(module, exports, __webpack_require__) { 18537 18538"use strict"; 18539/* WEBPACK VAR INJECTION */(function(process) {/** 18540 * Copyright 2014-present, Facebook, Inc. 18541 * All rights reserved. 18542 * 18543 * This source code is licensed under the BSD-style license found in the 18544 * LICENSE file in the root directory of this source tree. An additional grant 18545 * of patent rights can be found in the PATENTS file in the same directory. 18546 * 18547 */ 18548 18549 18550 18551var _assign = __webpack_require__(4); 18552 18553var PooledClass = __webpack_require__(14); 18554var Transaction = __webpack_require__(29); 18555var ReactInstrumentation = __webpack_require__(8); 18556var ReactServerUpdateQueue = __webpack_require__(149); 18557 18558/** 18559 * Executed within the scope of the `Transaction` instance. Consider these as 18560 * being member methods, but with an implied ordering while being isolated from 18561 * each other. 18562 */ 18563var TRANSACTION_WRAPPERS = []; 18564 18565if (process.env.NODE_ENV !== 'production') { 18566 TRANSACTION_WRAPPERS.push({ 18567 initialize: ReactInstrumentation.debugTool.onBeginFlush, 18568 close: ReactInstrumentation.debugTool.onEndFlush 18569 }); 18570} 18571 18572var noopCallbackQueue = { 18573 enqueue: function () {} 18574}; 18575 18576/** 18577 * @class ReactServerRenderingTransaction 18578 * @param {boolean} renderToStaticMarkup 18579 */ 18580function ReactServerRenderingTransaction(renderToStaticMarkup) { 18581 this.reinitializeTransaction(); 18582 this.renderToStaticMarkup = renderToStaticMarkup; 18583 this.useCreateElement = false;
18584 this.updateQueue = new ReactServerUpdateQueue(this); 18585} 18586 18587var Mixin = { 18588 /** 18589 * @see Transaction 18590 * @abstract 18591 * @final 18592 * @return {array} Empty list of operation wrap procedures. 18593 */ 18594 getTransactionWrappers: function () { 18595 return TRANSACTION_WRAPPERS; 18596 }, 18597 18598 /** 18599 * @return {object} The queue to collect `onDOMReady` callbacks with. 18600 */ 18601 getReactMountReady: function () { 18602 return noopCallbackQueue; 18603 }, 18604 18605 /** 18606 * @return {object} The queue to collect React async events. 18607 */ 18608 getUpdateQueue: function () { 18609 return this.updateQueue; 18610 }, 18611 18612 /** 18613 * `PooledClass` looks for this, and will invoke this before allowing this 18614 * instance to be reused. 18615 */ 18616 destructor: function () {}, 18617 18618 checkpoint: function () {}, 18619 18620 rollback: function () {} 18621}; 18622 18623_assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin); 18624 18625PooledClass.addPoolingTo(ReactServerRenderingTransaction); 18626 18627module.exports = ReactServerRenderingTransaction; 18628/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 18629 18630/***/ }), 18631/* 149 */ 18632/***/ (function(module, exports, __webpack_require__) { 18633 18634"use strict"; 18635/* WEBPACK VAR INJECTION */(function(process) {/** 18636 * Copyright 2015-present, Facebook, Inc. 18637 * All rights reserved. 18638 * 18639 * This source code is licensed under the BSD-style license found in the 18640 * LICENSE file in the root directory of this source tree. An additional grant 18641 * of patent rights can be found in the PATENTS file in the same directory. 18642 * 18643 * 18644 */ 18645 18646 18647 18648function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 18649 18650var ReactUpdateQueue = __webpack_require__(41); 18651 18652var warning = __webpack_require__(2); 18653 18654function warnNoop(publicInstance, callerName) { 18655 if (process.env.NODE_ENV !== 'production') { 18656 var constructor = publicInstance.constructor; 18657 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; 18658 } 18659} 18660 18661/** 18662 * This is the update queue used for server rendering. 18663 * It delegates to ReactUpdateQueue while server rendering is in progress and 18664 * switches to ReactNoopUpdateQueue after the transaction has completed. 18665 * @class ReactServerUpdateQueue 18666 * @param {Transaction} transaction 18667 */ 18668 18669var ReactServerUpdateQueue = function () { 18670 function ReactServerUpdateQueue(transaction) { 18671 _classCallCheck(this, ReactServerUpdateQueue); 18672 18673 this.transaction = transaction; 18674 } 18675 18676 /** 18677 * Checks whether or not this composite component is mounted. 18678 * @param {ReactClass} publicInstance The instance we want to test. 18679 * @return {boolean} True if mounted, false otherwise. 18680 * @protected 18681 * @final 18682 */ 18683 18684 18685 ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) { 18686 return false; 18687 }; 18688 18689 /** 18690 * Enqueue a callback that will be executed after all the pending updates 18691 * have processed. 18692 * 18693 * @param {ReactClass} publicInstance The instance to use as `this` context. 18694 * @param {?function} callback Called after state is updated. 18695 * @internal 18696 */ 18697 18698 18699 ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) { 18700 if (this.transaction.isInTransaction()) { 18701 ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName); 18702 } 18703 }; 18704 18705 /** 18706 * Forces an update. This should only be invoked when it is known with 18707 * certainty that we are **not** in a DOM transaction. 18708 * 18709 * You may want to call this when you know that some deeper aspect of the 18710 * component's state has changed but `setState` was not called. 18711 * 18712 * This will not invoke `shouldComponentUpdate`, but it will invoke 18713 * `componentWillUpdate` and `componentDidUpdate`. 18714 * 18715 * @param {ReactClass} publicInstance The instance that should rerender. 18716 * @internal 18717 */ 18718 18719 18720 ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) { 18721 if (this.transaction.isInTransaction()) { 18722 ReactUpdateQueue.enqueueForceUpdate(publicInstance); 18723 } else { 18724 warnNoop(publicInstance, 'forceUpdate'); 18725 } 18726 }; 18727 18728 /** 18729 * Replaces all of the state. Always use this or `setState` to mutate state. 18730 * You should treat `this.state` as immutable. 18731 * 18732 * There is no guarantee that `this.state` will be immediately updated, so 18733 * accessing `this.state` after calling this method may return the old value. 18734 * 18735 * @param {ReactClass} publicInstance The instance that should rerender. 18736 * @param {object|function} completeState Next state. 18737 * @internal 18738 */ 18739 18740 18741 ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) { 18742 if (this.transaction.isInTransaction()) { 18743 ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState); 18744 } else { 18745 warnNoop(publicInstance, 'replaceState'); 18746 } 18747 }; 18748 18749 /** 18750 * Sets a subset of the state. This only exists because _pendingState is 18751 * internal. This provides a merging strategy that is not available to deep 18752 * properties which is confusing. TODO: Expose pendingState or don't use it 18753 * during the merge. 18754 * 18755 * @param {ReactClass} publicInstance The instance that should rerender. 18756 * @param {object|function} partialState Next partial state to be merged with state. 18757 * @internal 18758 */ 18759 18760 18761 ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) { 18762 if (this.transaction.isInTransaction()) { 18763 ReactUpdateQueue.enqueueSetState(publicInstance, partialState); 18764 } else { 18765 warnNoop(publicInstance, 'setState'); 18766 } 18767 }; 18768 18769 return ReactServerUpdateQueue; 18770}(); 18771 18772module.exports = ReactServerUpdateQueue; 18773/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 18774 18775/***/ }), 18776/* 150 */ 18777/***/ (function(module, exports, __webpack_require__) { 18778 18779"use strict"; 18780/** 18781 * Copyright 2013-present, Facebook, Inc. 18782 * All rights reserved. 18783 * 18784 * This source code is licensed under the BSD-style license found in the 18785 * LICENSE file in the root directory of this source tree. An additional grant 18786 * of patent rights can be found in the PATENTS file in the same directory. 18787 * 18788 */ 18789 18790 18791 18792module.exports = '15.5.4'; 18793 18794/***/ }), 18795/* 151 */ 18796/***/ (function(module, exports, __webpack_require__) { 18797 18798"use strict"; 18799/** 18800 * Copyright 2013-present, Facebook, Inc. 18801 * All rights reserved. 18802 * 18803 * This source code is licensed under the BSD-style license found in the 18804 * LICENSE file in the root directory of this source tree. An additional grant 18805 * of patent rights can be found in the PATENTS file in the same directory. 18806 * 18807 */ 18808 18809 18810 18811var NS = { 18812 xlink: 'http://www.w3.org/1999/xlink', 18813 xml: 'http://www.w3.org/XML/1998/namespace' 18814}; 18815 18816// We use attributes for everything SVG so let's avoid some duplication and run 18817// code instead. 18818// The following are all specified in the HTML config already so we exclude here. 18819// - class (as className) 18820// - color 18821// - height 18822// - id
18823// - lang 18824// - max 18825// - media 18826// - method 18827// - min 18828// - name 18829// - style 18830// - target 18831// - type 18832// - width 18833var ATTRS = { 18834 accentHeight: 'accent-height', 18835 accumulate: 0, 18836 additive: 0, 18837 alignmentBaseline: 'alignment-baseline', 18838 allowReorder: 'allowReorder', 18839 alphabetic: 0, 18840 amplitude: 0, 18841 arabicForm: 'arabic-form', 18842 ascent: 0, 18843 attributeName: 'attributeName', 18844 attributeType: 'attributeType', 18845 autoReverse: 'autoReverse', 18846 azimuth: 0, 18847 baseFrequency: 'baseFrequency', 18848 baseProfile: 'baseProfile', 18849 baselineShift: 'baseline-shift', 18850 bbox: 0, 18851 begin: 0, 18852 bias: 0, 18853 by: 0, 18854 calcMode: 'calcMode', 18855 capHeight: 'cap-height', 18856 clip: 0, 18857 clipPath: 'clip-path', 18858 clipRule: 'clip-rule', 18859 clipPathUnits: 'clipPathUnits', 18860 colorInterpolation: 'color-interpolation', 18861 colorInterpolationFilters: 'color-interpolation-filters', 18862 colorProfile: 'color-profile', 18863 colorRendering: 'color-rendering', 18864 contentScriptType: 'contentScriptType', 18865 contentStyleType: 'contentStyleType', 18866 cursor: 0, 18867 cx: 0, 18868 cy: 0, 18869 d: 0, 18870 decelerate: 0, 18871 descent: 0, 18872 diffuseConstant: 'diffuseConstant', 18873 direction: 0, 18874 display: 0, 18875 divisor: 0, 18876 dominantBaseline: 'dominant-baseline', 18877 dur: 0, 18878 dx: 0, 18879 dy: 0, 18880 edgeMode: 'edgeMode', 18881 elevation: 0, 18882 enableBackground: 'enable-background', 18883 end: 0, 18884 exponent: 0, 18885 externalResourcesRequired: 'externalResourcesRequired', 18886 fill: 0, 18887 fillOpacity: 'fill-opacity', 18888 fillRule: 'fill-rule', 18889 filter: 0, 18890 filterRes: 'filterRes', 18891 filterUnits: 'filterUnits', 18892 floodColor: 'flood-color', 18893 floodOpacity: 'flood-opacity', 18894 focusable: 0, 18895 fontFamily: 'font-family', 18896 fontSize: 'font-size', 18897 fontSizeAdjust: 'font-size-adjust', 18898 fontStretch: 'font-stretch', 18899 fontStyle: 'font-style', 18900 fontVariant: 'font-variant', 18901 fontWeight: 'font-weight', 18902 format: 0, 18903 from: 0, 18904 fx: 0, 18905 fy: 0, 18906 g1: 0, 18907 g2: 0, 18908 glyphName: 'glyph-name', 18909 glyphOrientationHorizontal: 'glyph-orientation-horizontal', 18910 glyphOrientationVertical: 'glyph-orientation-vertical', 18911 glyphRef: 'glyphRef', 18912 gradientTransform: 'gradientTransform', 18913 gradientUnits: 'gradientUnits', 18914 hanging: 0, 18915 horizAdvX: 'horiz-adv-x', 18916 horizOriginX: 'horiz-origin-x', 18917 ideographic: 0, 18918 imageRendering: 'image-rendering', 18919 'in': 0, 18920 in2: 0, 18921 intercept: 0, 18922 k: 0, 18923 k1: 0, 18924 k2: 0, 18925 k3: 0, 18926 k4: 0, 18927 kernelMatrix: 'kernelMatrix', 18928 kernelUnitLength: 'kernelUnitLength', 18929 kerning: 0, 18930 keyPoints: 'keyPoints', 18931 keySplines: 'keySplines', 18932 keyTimes: 'keyTimes', 18933 lengthAdjust: 'lengthAdjust', 18934 letterSpacing: 'letter-spacing', 18935 lightingColor: 'lighting-color', 18936 limitingConeAngle: 'limitingConeAngle', 18937 local: 0, 18938 markerEnd: 'marker-end', 18939 markerMid: 'marker-mid', 18940 markerStart: 'marker-start', 18941 markerHeight: 'markerHeight', 18942 markerUnits: 'markerUnits', 18943 markerWidth: 'markerWidth', 18944 mask: 0, 18945 maskContentUnits: 'maskContentUnits', 18946 maskUnits: 'maskUnits', 18947 mathematical: 0, 18948 mode: 0, 18949 numOctaves: 'numOctaves', 18950 offset: 0, 18951 opacity: 0, 18952 operator: 0, 18953 order: 0, 18954 orient: 0, 18955 orientation: 0, 18956 origin: 0, 18957 overflow: 0, 18958 overlinePosition: 'overline-position', 18959 overlineThickness: 'overline-thickness', 18960 paintOrder: 'paint-order', 18961 panose1: 'panose-1', 18962 pathLength: 'pathLength', 18963 patternContentUnits: 'patternContentUnits', 18964 patternTransform: 'patternTransform', 18965 patternUnits: 'patternUnits', 18966 pointerEvents: 'pointer-events', 18967 points: 0, 18968 pointsAtX: 'pointsAtX', 18969 pointsAtY: 'pointsAtY', 18970 pointsAtZ: 'pointsAtZ', 18971 preserveAlpha: 'preserveAlpha', 18972 preserveAspectRatio: 'preserveAspectRatio', 18973 primitiveUnits: 'primitiveUnits', 18974 r: 0, 18975 radius: 0, 18976 refX: 'refX', 18977 refY: 'refY', 18978 renderingIntent: 'rendering-intent', 18979 repeatCount: 'repeatCount', 18980 repeatDur: 'repeatDur', 18981 requiredExtensions: 'requiredExtensions', 18982 requiredFeatures: 'requiredFeatures', 18983 restart: 0, 18984 result: 0, 18985 rotate: 0, 18986 rx: 0, 18987 ry: 0, 18988 scale: 0, 18989 seed: 0, 18990 shapeRendering: 'shape-rendering', 18991 slope: 0, 18992 spacing: 0, 18993 specularConstant: 'specularConstant', 18994 specularExponent: 'specularExponent', 18995 speed: 0, 18996 spreadMethod: 'spreadMethod', 18997 startOffset: 'startOffset', 18998 stdDeviation: 'stdDeviation', 18999 stemh: 0, 19000 stemv: 0, 19001 stitchTiles: 'stitchTiles', 19002 stopColor: 'stop-color', 19003 stopOpacity: 'stop-opacity', 19004 strikethroughPosition: 'strikethrough-position', 19005 strikethroughThickness: 'strikethrough-thickness', 19006 string: 0, 19007 stroke: 0, 19008 strokeDasharray: 'stroke-dasharray', 19009 strokeDashoffset: 'stroke-dashoffset', 19010 strokeLinecap: 'stroke-linecap', 19011 strokeLinejoin: 'stroke-linejoin', 19012 strokeMiterlimit: 'stroke-miterlimit', 19013 strokeOpacity: 'stroke-opacity', 19014 strokeWidth: 'stroke-width', 19015 surfaceScale: 'surfaceScale', 19016 systemLanguage: 'systemLanguage', 19017 tableValues: 'tableValues', 19018 targetX: 'targetX', 19019 targetY: 'targetY', 19020 textAnchor: 'text-anchor', 19021 textDecoration: 'text-decoration', 19022 textRendering: 'text-rendering', 19023 textLength: 'textLength', 19024 to: 0, 19025 transform: 0, 19026 u1: 0, 19027 u2: 0, 19028 underlinePosition: 'underline-position', 19029 underlineThickness: 'underline-thickness', 19030 unicode: 0,
19031 unicodeBidi: 'unicode-bidi', 19032 unicodeRange: 'unicode-range', 19033 unitsPerEm: 'units-per-em', 19034 vAlphabetic: 'v-alphabetic', 19035 vHanging: 'v-hanging', 19036 vIdeographic: 'v-ideographic', 19037 vMathematical: 'v-mathematical', 19038 values: 0, 19039 vectorEffect: 'vector-effect', 19040 version: 0, 19041 vertAdvY: 'vert-adv-y', 19042 vertOriginX: 'vert-origin-x', 19043 vertOriginY: 'vert-origin-y', 19044 viewBox: 'viewBox', 19045 viewTarget: 'viewTarget', 19046 visibility: 0, 19047 widths: 0, 19048 wordSpacing: 'word-spacing', 19049 writingMode: 'writing-mode', 19050 x: 0, 19051 xHeight: 'x-height', 19052 x1: 0, 19053 x2: 0, 19054 xChannelSelector: 'xChannelSelector', 19055 xlinkActuate: 'xlink:actuate', 19056 xlinkArcrole: 'xlink:arcrole', 19057 xlinkHref: 'xlink:href', 19058 xlinkRole: 'xlink:role', 19059 xlinkShow: 'xlink:show', 19060 xlinkTitle: 'xlink:title', 19061 xlinkType: 'xlink:type', 19062 xmlBase: 'xml:base', 19063 xmlns: 0, 19064 xmlnsXlink: 'xmlns:xlink', 19065 xmlLang: 'xml:lang', 19066 xmlSpace: 'xml:space', 19067 y: 0, 19068 y1: 0, 19069 y2: 0, 19070 yChannelSelector: 'yChannelSelector', 19071 z: 0, 19072 zoomAndPan: 'zoomAndPan' 19073}; 19074 19075var SVGDOMPropertyConfig = { 19076 Properties: {}, 19077 DOMAttributeNamespaces: { 19078 xlinkActuate: NS.xlink, 19079 xlinkArcrole: NS.xlink, 19080 xlinkHref: NS.xlink, 19081 xlinkRole: NS.xlink, 19082 xlinkShow: NS.xlink, 19083 xlinkTitle: NS.xlink, 19084 xlinkType: NS.xlink, 19085 xmlBase: NS.xml, 19086 xmlLang: NS.xml, 19087 xmlSpace: NS.xml 19088 }, 19089 DOMAttributeNames: {} 19090}; 19091 19092Object.keys(ATTRS).forEach(function (key) { 19093 SVGDOMPropertyConfig.Properties[key] = 0; 19094 if (ATTRS[key]) { 19095 SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key]; 19096 } 19097}); 19098 19099module.exports = SVGDOMPropertyConfig; 19100 19101/***/ }), 19102/* 152 */ 19103/***/ (function(module, exports, __webpack_require__) { 19104 19105"use strict"; 19106/** 19107 * Copyright 2013-present, Facebook, Inc. 19108 * All rights reserved. 19109 * 19110 * This source code is licensed under the BSD-style license found in the 19111 * LICENSE file in the root directory of this source tree. An additional grant 19112 * of patent rights can be found in the PATENTS file in the same directory. 19113 * 19114 */ 19115 19116 19117 19118var EventPropagators = __webpack_require__(22); 19119var ExecutionEnvironment = __webpack_require__(6); 19120var ReactDOMComponentTree = __webpack_require__(5); 19121var ReactInputSelection = __webpack_require__(64); 19122var SyntheticEvent = __webpack_require__(12); 19123 19124var getActiveElement = __webpack_require__(53); 19125var isTextInputElement = __webpack_require__(74); 19126var shallowEqual = __webpack_require__(33); 19127 19128var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11; 19129 19130var eventTypes = { 19131 select: { 19132 phasedRegistrationNames: { 19133 bubbled: 'onSelect', 19134 captured: 'onSelectCapture' 19135 }, 19136 dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange'] 19137 } 19138}; 19139 19140var activeElement = null; 19141var activeElementInst = null; 19142var lastSelection = null; 19143var mouseDown = false; 19144 19145// Track whether a listener exists for this plugin. If none exist, we do 19146// not extract events. See #3639. 19147var hasListener = false;
19148 19149/** 19150 * Get an object which is a unique representation of the current selection. 19151 * 19152 * The return value will not be consistent across nodes or browsers, but 19153 * two identical selections on the same node will return identical objects. 19154 * 19155 * @param {DOMElement} node 19156 * @return {object} 19157 */ 19158function getSelection(node) { 19159 if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) { 19160 return { 19161 start: node.selectionStart, 19162 end: node.selectionEnd 19163 }; 19164 } else if (window.getSelection) { 19165 var selection = window.getSelection(); 19166 return { 19167 anchorNode: selection.anchorNode, 19168 anchorOffset: selection.anchorOffset, 19169 focusNode: selection.focusNode, 19170 focusOffset: selection.focusOffset 19171 }; 19172 } else if (document.selection) { 19173 var range = document.selection.createRange(); 19174 return { 19175 parentElement: range.parentElement(), 19176 text: range.text, 19177 top: range.boundingTop, 19178 left: range.boundingLeft 19179 }; 19180 } 19181} 19182 19183/** 19184 * Poll selection to see whether it's changed. 19185 * 19186 * @param {object} nativeEvent 19187 * @return {?SyntheticEvent} 19188 */ 19189function constructSelectEvent(nativeEvent, nativeEventTarget) { 19190 // Ensure we have the right element, and that the user is not dragging a 19191 // selection (this matches native `select` event behavior). In HTML5, select 19192 // fires only on input and textarea thus if there's no focused element we 19193 // won't dispatch. 19194 if (mouseDown || activeElement == null || activeElement !== getActiveElement()) { 19195 return null; 19196 } 19197 19198 // Only fire when selection has actually changed. 19199 var currentSelection = getSelection(activeElement); 19200 if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { 19201 lastSelection = currentSelection; 19202 19203 var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget); 19204 19205 syntheticEvent.type = 'select'; 19206 syntheticEvent.target = activeElement; 19207 19208 EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent); 19209 19210 return syntheticEvent; 19211 } 19212 19213 return null; 19214} 19215 19216/** 19217 * This plugin creates an `onSelect` event that normalizes select events 19218 * across form elements. 19219 * 19220 * Supported elements are: 19221 * - input (see `isTextInputElement`) 19222 * - textarea 19223 * - contentEditable 19224 * 19225 * This differs from native browser implementations in the following ways: 19226 * - Fires on contentEditable fields as well as inputs. 19227 * - Fires for collapsed selection. 19228 * - Fires after user input. 19229 */ 19230var SelectEventPlugin = { 19231 19232 eventTypes: eventTypes, 19233 19234 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { 19235 if (!hasListener) { 19236 return null; 19237 } 19238 19239 var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; 19240 19241 switch (topLevelType) { 19242 // Track the input node that has focus. 19243 case 'topFocus': 19244 if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') { 19245 activeElement = targetNode; 19246 activeElementInst = targetInst; 19247 lastSelection = null; 19248 } 19249 break; 19250 case 'topBlur': 19251 activeElement = null; 19252 activeElementInst = null; 19253 lastSelection = null; 19254 break; 19255 19256 // Don't fire the event while the user is dragging. This matches the 19257 // semantics of the native select event. 19258 case 'topMouseDown': 19259 mouseDown = true; 19260 break; 19261 case 'topContextMenu': 19262 case 'topMouseUp': 19263 mouseDown = false; 19264 return constructSelectEvent(nativeEvent, nativeEventTarget); 19265 19266 // Chrome and IE fire non-standard event when selection is changed (and 19267 // sometimes when it hasn't). IE's event fires out of order with respect 19268 // to key and input events on deletion, so we discard it. 19269 // 19270 // Firefox doesn't support selectionchange, so check selection status 19271 // after each key entry. The selection changes after keydown and before 19272 // keyup, but we check on keydown as well in the case of holding down a 19273 // key, when multiple keydown events are fired but only one keyup is. 19274 // This is also our approach for IE handling, for the reason above. 19275 case 'topSelectionChange': 19276 if (skipSelectionChangeEvent) { 19277 break; 19278 } 19279 // falls through 19280 case 'topKeyDown': 19281 case 'topKeyUp': 19282 return constructSelectEvent(nativeEvent, nativeEventTarget); 19283 } 19284 19285 return null; 19286 }, 19287 19288 didPutListener: function (inst, registrationName, listener) { 19289 if (registrationName === 'onSelect') { 19290 hasListener = true; 19291 } 19292 } 19293}; 19294 19295module.exports = SelectEventPlugin; 19296 19297/***/ }), 19298/* 153 */ 19299/***/ (function(module, exports, __webpack_require__) { 19300 19301"use strict"; 19302/* WEBPACK VAR INJECTION */(function(process) {/** 19303 * Copyright 2013-present, Facebook, Inc. 19304 * All rights reserved. 19305 * 19306 * This source code is licensed under the BSD-style license found in the 19307 * LICENSE file in the root directory of this source tree. An additional grant 19308 * of patent rights can be found in the PATENTS file in the same directory. 19309 * 19310 * 19311 */ 19312 19313 19314 19315var _prodInvariant = __webpack_require__(3); 19316 19317var EventListener = __webpack_require__(51); 19318var EventPropagators = __webpack_require__(22); 19319var ReactDOMComponentTree = __webpack_require__(5); 19320var SyntheticAnimationEvent = __webpack_require__(154); 19321var SyntheticClipboardEvent = __webpack_require__(155); 19322var SyntheticEvent = __webpack_require__(12); 19323var SyntheticFocusEvent = __webpack_require__(158); 19324var SyntheticKeyboardEvent = __webpack_require__(160); 19325var SyntheticMouseEvent = __webpack_require__(28); 19326var SyntheticDragEvent = __webpack_require__(157); 19327var SyntheticTouchEvent = __webpack_require__(161); 19328var SyntheticTransitionEvent = __webpack_require__(162); 19329var SyntheticUIEvent = __webpack_require__(24); 19330var SyntheticWheelEvent = __webpack_require__(163); 19331 19332var emptyFunction = __webpack_require__(9);
19333var getEventCharCode = __webpack_require__(43); 19334var invariant = __webpack_require__(1); 19335 19336/** 19337 * Turns 19338 * ['abort', ...] 19339 * into 19340 * eventTypes = { 19341 * 'abort': { 19342 * phasedRegistrationNames: { 19343 * bubbled: 'onAbort', 19344 * captured: 'onAbortCapture', 19345 * }, 19346 * dependencies: ['topAbort'], 19347 * }, 19348 * ... 19349 * }; 19350 * topLevelEventsToDispatchConfig = { 19351 * 'topAbort': { sameConfig } 19352 * }; 19353 */ 19354var eventTypes = {}; 19355var topLevelEventsToDispatchConfig = {}; 19356['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) { 19357 var capitalizedEvent = event[0].toUpperCase() + event.slice(1); 19358 var onEvent = 'on' + capitalizedEvent; 19359 var topEvent = 'top' + capitalizedEvent; 19360 19361 var type = { 19362 phasedRegistrationNames: { 19363 bubbled: onEvent, 19364 captured: onEvent + 'Capture' 19365 }, 19366 dependencies: [topEvent] 19367 }; 19368 eventTypes[event] = type; 19369 topLevelEventsToDispatchConfig[topEvent] = type; 19370}); 19371 19372var onClickListeners = {}; 19373 19374function getDictionaryKey(inst) { 19375 // Prevents V8 performance issue: 19376 // https://github.com/facebook/react/pull/7232 19377 return '.' + inst._rootNodeID; 19378} 19379 19380function isInteractive(tag) { 19381 return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; 19382} 19383 19384var SimpleEventPlugin = { 19385 19386 eventTypes: eventTypes, 19387 19388 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { 19389 var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; 19390 if (!dispatchConfig) { 19391 return null; 19392 } 19393 var EventConstructor; 19394 switch (topLevelType) { 19395 case 'topAbort': 19396 case 'topCanPlay': 19397 case 'topCanPlayThrough': 19398 case 'topDurationChange': 19399 case 'topEmptied': 19400 case 'topEncrypted': 19401 case 'topEnded': 19402 case 'topError': 19403 case 'topInput': 19404 case 'topInvalid': 19405 case 'topLoad': 19406 case 'topLoadedData': 19407 case 'topLoadedMetadata': 19408 case 'topLoadStart': 19409 case 'topPause': 19410 case 'topPlay': 19411 case 'topPlaying': 19412 case 'topProgress': 19413 case 'topRateChange': 19414 case 'topReset': 19415 case 'topSeeked': 19416 case 'topSeeking': 19417 case 'topStalled': 19418 case 'topSubmit': 19419 case 'topSuspend': 19420 case 'topTimeUpdate': 19421 case 'topVolumeChange': 19422 case 'topWaiting': 19423 // HTML Events 19424 // @see http://www.w3.org/TR/html5/index.html#events-0 19425 EventConstructor = SyntheticEvent; 19426 break; 19427 case 'topKeyPress': 19428 // Firefox creates a keypress event for function keys too. This removes 19429 // the unwanted keypress events. Enter is however both printable and 19430 // non-printable. One would expect Tab to be as well (but it isn't). 19431 if (getEventCharCode(nativeEvent) === 0) { 19432 return null; 19433 } 19434 /* falls through */ 19435 case 'topKeyDown': 19436 case 'topKeyUp': 19437 EventConstructor = SyntheticKeyboardEvent; 19438 break; 19439 case 'topBlur': 19440 case 'topFocus': 19441 EventConstructor = SyntheticFocusEvent; 19442 break; 19443 case 'topClick': 19444 // Firefox creates a click event on right mouse clicks. This removes the 19445 // unwanted click events. 19446 if (nativeEvent.button === 2) { 19447 return null; 19448 } 19449 /* falls through */ 19450 case 'topDoubleClick': 19451 case 'topMouseDown': 19452 case 'topMouseMove': 19453 case 'topMouseUp': 19454 // TODO: Disabled elements should not respond to mouse events 19455 /* falls through */ 19456 case 'topMouseOut': 19457 case 'topMouseOver': 19458 case 'topContextMenu': 19459 EventConstructor = SyntheticMouseEvent; 19460 break; 19461 case 'topDrag': 19462 case 'topDragEnd': 19463 case 'topDragEnter': 19464 case 'topDragExit': 19465 case 'topDragLeave': 19466 case 'topDragOver': 19467 case 'topDragStart': 19468 case 'topDrop': 19469 EventConstructor = SyntheticDragEvent; 19470 break; 19471 case 'topTouchCancel': 19472 case 'topTouchEnd': 19473 case 'topTouchMove': 19474 case 'topTouchStart': 19475 EventConstructor = SyntheticTouchEvent; 19476 break; 19477 case 'topAnimationEnd': 19478 case 'topAnimationIteration': 19479 case 'topAnimationStart': 19480 EventConstructor = SyntheticAnimationEvent; 19481 break; 19482 case 'topTransitionEnd': 19483 EventConstructor = SyntheticTransitionEvent; 19484 break; 19485 case 'topScroll': 19486 EventConstructor = SyntheticUIEvent; 19487 break; 19488 case 'topWheel': 19489 EventConstructor = SyntheticWheelEvent; 19490 break; 19491 case 'topCopy': 19492 case 'topCut': 19493 case 'topPaste': 19494 EventConstructor = SyntheticClipboardEvent; 19495 break; 19496 } 19497 !EventConstructor ? process.env.NODE_ENV !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0;
19498 var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget); 19499 EventPropagators.accumulateTwoPhaseDispatches(event); 19500 return event; 19501 }, 19502 19503 didPutListener: function (inst, registrationName, listener) { 19504 // Mobile Safari does not fire properly bubble click events on 19505 // non-interactive elements, which means delegated click listeners do not 19506 // fire. The workaround for this bug involves attaching an empty click 19507 // listener on the target node. 19508 // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html 19509 if (registrationName === 'onClick' && !isInteractive(inst._tag)) { 19510 var key = getDictionaryKey(inst); 19511 var node = ReactDOMComponentTree.getNodeFromInstance(inst); 19512 if (!onClickListeners[key]) { 19513 onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction); 19514 } 19515 } 19516 }, 19517 19518 willDeleteListener: function (inst, registrationName) { 19519 if (registrationName === 'onClick' && !isInteractive(inst._tag)) { 19520 var key = getDictionaryKey(inst); 19521 onClickListeners[key].remove(); 19522 delete onClickListeners[key]; 19523 } 19524 } 19525 19526}; 19527 19528module.exports = SimpleEventPlugin; 19529/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 19530 19531/***/ }), 19532/* 154 */ 19533/***/ (function(module, exports, __webpack_require__) { 19534 19535"use strict"; 19536/** 19537 * Copyright 2013-present, Facebook, Inc. 19538 * All rights reserved. 19539 * 19540 * This source code is licensed under the BSD-style license found in the 19541 * LICENSE file in the root directory of this source tree. An additional grant 19542 * of patent rights can be found in the PATENTS file in the same directory. 19543 * 19544 */ 19545 19546 19547 19548var SyntheticEvent = __webpack_require__(12); 19549 19550/** 19551 * @interface Event 19552 * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface 19553 * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent 19554 */ 19555var AnimationEventInterface = { 19556 animationName: null, 19557 elapsedTime: null, 19558 pseudoElement: null 19559}; 19560 19561/** 19562 * @param {object} dispatchConfig Configuration used to dispatch this event. 19563 * @param {string} dispatchMarker Marker identifying the event target. 19564 * @param {object} nativeEvent Native browser event. 19565 * @extends {SyntheticEvent} 19566 */ 19567function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { 19568 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); 19569} 19570 19571SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface); 19572 19573module.exports = SyntheticAnimationEvent; 19574 19575/***/ }), 19576/* 155 */ 19577/***/ (function(module, exports, __webpack_require__) { 19578 19579"use strict"; 19580/** 19581 * Copyright 2013-present, Facebook, Inc. 19582 * All rights reserved. 19583 * 19584 * This source code is licensed under the BSD-style license found in the 19585 * LICENSE file in the root directory of this source tree. An additional grant 19586 * of patent rights can be found in the PATENTS file in the same directory. 19587 * 19588 */ 19589 19590 19591 19592var SyntheticEvent = __webpack_require__(12); 19593 19594/** 19595 * @interface Event 19596 * @see http://www.w3.org/TR/clipboard-apis/ 19597 */ 19598var ClipboardEventInterface = { 19599 clipboardData: function (event) { 19600 return 'clipboardData' in event ? event.clipboardData : window.clipboardData; 19601 } 19602}; 19603 19604/** 19605 * @param {object} dispatchConfig Configuration used to dispatch this event. 19606 * @param {string} dispatchMarker Marker identifying the event target. 19607 * @param {object} nativeEvent Native browser event. 19608 * @extends {SyntheticUIEvent} 19609 */ 19610function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { 19611 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); 19612} 19613 19614SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface); 19615 19616module.exports = SyntheticClipboardEvent; 19617 19618/***/ }), 19619/* 156 */ 19620/***/ (function(module, exports, __webpack_require__) { 19621 19622"use strict"; 19623/** 19624 * Copyright 2013-present, Facebook, Inc. 19625 * All rights reserved. 19626 * 19627 * This source code is licensed under the BSD-style license found in the 19628 * LICENSE file in the root directory of this source tree. An additional grant 19629 * of patent rights can be found in the PATENTS file in the same directory. 19630 * 19631 */ 19632 19633 19634 19635var SyntheticEvent = __webpack_require__(12); 19636 19637/** 19638 * @interface Event 19639 * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents 19640 */ 19641var CompositionEventInterface = { 19642 data: null 19643}; 19644 19645/** 19646 * @param {object} dispatchConfig Configuration used to dispatch this event. 19647 * @param {string} dispatchMarker Marker identifying the event target. 19648 * @param {object} nativeEvent Native browser event. 19649 * @extends {SyntheticUIEvent} 19650 */
19651function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { 19652 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); 19653} 19654 19655SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface); 19656 19657module.exports = SyntheticCompositionEvent; 19658 19659/***/ }), 19660/* 157 */ 19661/***/ (function(module, exports, __webpack_require__) { 19662 19663"use strict"; 19664/** 19665 * Copyright 2013-present, Facebook, Inc. 19666 * All rights reserved. 19667 * 19668 * This source code is licensed under the BSD-style license found in the 19669 * LICENSE file in the root directory of this source tree. An additional grant 19670 * of patent rights can be found in the PATENTS file in the same directory. 19671 * 19672 */ 19673 19674 19675 19676var SyntheticMouseEvent = __webpack_require__(28); 19677 19678/** 19679 * @interface DragEvent 19680 * @see http://www.w3.org/TR/DOM-Level-3-Events/ 19681 */ 19682var DragEventInterface = { 19683 dataTransfer: null 19684}; 19685 19686/** 19687 * @param {object} dispatchConfig Configuration used to dispatch this event. 19688 * @param {string} dispatchMarker Marker identifying the event target. 19689 * @param {object} nativeEvent Native browser event. 19690 * @extends {SyntheticUIEvent} 19691 */ 19692function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { 19693 return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); 19694} 19695 19696SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface); 19697 19698module.exports = SyntheticDragEvent; 19699 19700/***/ }), 19701/* 158 */ 19702/***/ (function(module, exports, __webpack_require__) { 19703 19704"use strict"; 19705/** 19706 * Copyright 2013-present, Facebook, Inc. 19707 * All rights reserved. 19708 * 19709 * This source code is licensed under the BSD-style license found in the 19710 * LICENSE file in the root directory of this source tree. An additional grant 19711 * of patent rights can be found in the PATENTS file in the same directory. 19712 * 19713 */ 19714 19715 19716 19717var SyntheticUIEvent = __webpack_require__(24); 19718 19719/** 19720 * @interface FocusEvent 19721 * @see http://www.w3.org/TR/DOM-Level-3-Events/ 19722 */ 19723var FocusEventInterface = { 19724 relatedTarget: null 19725}; 19726 19727/** 19728 * @param {object} dispatchConfig Configuration used to dispatch this event. 19729 * @param {string} dispatchMarker Marker identifying the event target. 19730 * @param {object} nativeEvent Native browser event. 19731 * @extends {SyntheticUIEvent} 19732 */ 19733function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { 19734 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); 19735} 19736 19737SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface); 19738 19739module.exports = SyntheticFocusEvent; 19740 19741/***/ }), 19742/* 159 */ 19743/***/ (function(module, exports, __webpack_require__) { 19744 19745"use strict"; 19746/** 19747 * Copyright 2013-present, Facebook, Inc. 19748 * All rights reserved. 19749 * 19750 * This source code is licensed under the BSD-style license found in the 19751 * LICENSE file in the root directory of this source tree. An additional grant 19752 * of patent rights can be found in the PATENTS file in the same directory. 19753 * 19754 */ 19755 19756 19757 19758var SyntheticEvent = __webpack_require__(12); 19759 19760/** 19761 * @interface Event 19762 * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 19763 * /#events-inputevents 19764 */ 19765var InputEventInterface = { 19766 data: null 19767}; 19768 19769/** 19770 * @param {object} dispatchConfig Configuration used to dispatch this event. 19771 * @param {string} dispatchMarker Marker identifying the event target. 19772 * @param {object} nativeEvent Native browser event. 19773 * @extends {SyntheticUIEvent} 19774 */ 19775function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { 19776 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); 19777} 19778 19779SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface); 19780 19781module.exports = SyntheticInputEvent; 19782 19783/***/ }), 19784/* 160 */ 19785/***/ (function(module, exports, __webpack_require__) { 19786 19787"use strict"; 19788/** 19789 * Copyright 2013-present, Facebook, Inc. 19790 * All rights reserved. 19791 * 19792 * This source code is licensed under the BSD-style license found in the 19793 * LICENSE file in the root directory of this source tree. An additional grant 19794 * of patent rights can be found in the PATENTS file in the same directory. 19795 * 19796 */ 19797 19798 19799 19800var SyntheticUIEvent = __webpack_require__(24); 19801
19802var getEventCharCode = __webpack_require__(43); 19803var getEventKey = __webpack_require__(169); 19804var getEventModifierState = __webpack_require__(44); 19805 19806/** 19807 * @interface KeyboardEvent 19808 * @see http://www.w3.org/TR/DOM-Level-3-Events/ 19809 */ 19810var KeyboardEventInterface = { 19811 key: getEventKey, 19812 location: null, 19813 ctrlKey: null, 19814 shiftKey: null, 19815 altKey: null, 19816 metaKey: null, 19817 repeat: null, 19818 locale: null, 19819 getModifierState: getEventModifierState, 19820 // Legacy Interface 19821 charCode: function (event) { 19822 // `charCode` is the result of a KeyPress event and represents the value of 19823 // the actual printable character. 19824 19825 // KeyPress is deprecated, but its replacement is not yet final and not 19826 // implemented in any major browser. Only KeyPress has charCode. 19827 if (event.type === 'keypress') { 19828 return getEventCharCode(event); 19829 } 19830 return 0; 19831 }, 19832 keyCode: function (event) { 19833 // `keyCode` is the result of a KeyDown/Up event and represents the value of 19834 // physical keyboard key. 19835 19836 // The actual meaning of the value depends on the users' keyboard layout 19837 // which cannot be detected. Assuming that it is a US keyboard layout 19838 // provides a surprisingly accurate mapping for US and European users. 19839 // Due to this, it is left to the user to implement at this time. 19840 if (event.type === 'keydown' || event.type === 'keyup') { 19841 return event.keyCode; 19842 } 19843 return 0; 19844 }, 19845 which: function (event) { 19846 // `which` is an alias for either `keyCode` or `charCode` depending on the 19847 // type of the event. 19848 if (event.type === 'keypress') { 19849 return getEventCharCode(event); 19850 } 19851 if (event.type === 'keydown' || event.type === 'keyup') { 19852 return event.keyCode; 19853 } 19854 return 0; 19855 } 19856}; 19857 19858/** 19859 * @param {object} dispatchConfig Configuration used to dispatch this event. 19860 * @param {string} dispatchMarker Marker identifying the event target. 19861 * @param {object} nativeEvent Native browser event. 19862 * @extends {SyntheticUIEvent} 19863 */ 19864function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { 19865 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); 19866} 19867 19868SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface); 19869 19870module.exports = SyntheticKeyboardEvent; 19871 19872/***/ }), 19873/* 161 */ 19874/***/ (function(module, exports, __webpack_require__) { 19875 19876"use strict"; 19877/** 19878 * Copyright 2013-present, Facebook, Inc. 19879 * All rights reserved. 19880 * 19881 * This source code is licensed under the BSD-style license found in the 19882 * LICENSE file in the root directory of this source tree. An additional grant 19883 * of patent rights can be found in the PATENTS file in the same directory. 19884 * 19885 */ 19886 19887 19888 19889var SyntheticUIEvent = __webpack_require__(24); 19890 19891var getEventModifierState = __webpack_require__(44); 19892 19893/** 19894 * @interface TouchEvent 19895 * @see http://www.w3.org/TR/touch-events/ 19896 */ 19897var TouchEventInterface = { 19898 touches: null, 19899 targetTouches: null, 19900 changedTouches: null, 19901 altKey: null, 19902 metaKey: null, 19903 ctrlKey: null, 19904 shiftKey: null, 19905 getModifierState: getEventModifierState 19906}; 19907 19908/** 19909 * @param {object} dispatchConfig Configuration used to dispatch this event. 19910 * @param {string} dispatchMarker Marker identifying the event target. 19911 * @param {object} nativeEvent Native browser event. 19912 * @extends {SyntheticUIEvent} 19913 */ 19914function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { 19915 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); 19916} 19917 19918SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface); 19919 19920module.exports = SyntheticTouchEvent; 19921 19922/***/ }), 19923/* 162 */ 19924/***/ (function(module, exports, __webpack_require__) { 19925 19926"use strict"; 19927/** 19928 * Copyright 2013-present, Facebook, Inc. 19929 * All rights reserved. 19930 * 19931 * This source code is licensed under the BSD-style license found in the 19932 * LICENSE file in the root directory of this source tree. An additional grant 19933 * of patent rights can be found in the PATENTS file in the same directory. 19934 * 19935 */ 19936 19937 19938 19939var SyntheticEvent = __webpack_require__(12); 19940 19941/** 19942 * @interface Event 19943 * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events- 19944 * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent 19945 */ 19946var TransitionEventInterface = { 19947 propertyName: null, 19948 elapsedTime: null, 19949 pseudoElement: null 19950}; 19951 19952/** 19953 * @param {object} dispatchConfig Configuration used to dispatch this event. 19954 * @param {string} dispatchMarker Marker identifying the event target. 19955 * @param {object} nativeEvent Native browser event. 19956 * @extends {SyntheticEvent} 19957 */
19958function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { 19959 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); 19960} 19961 19962SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface); 19963 19964module.exports = SyntheticTransitionEvent; 19965 19966/***/ }), 19967/* 163 */ 19968/***/ (function(module, exports, __webpack_require__) { 19969 19970"use strict"; 19971/** 19972 * Copyright 2013-present, Facebook, Inc. 19973 * All rights reserved. 19974 * 19975 * This source code is licensed under the BSD-style license found in the 19976 * LICENSE file in the root directory of this source tree. An additional grant 19977 * of patent rights can be found in the PATENTS file in the same directory. 19978 * 19979 */ 19980 19981 19982 19983var SyntheticMouseEvent = __webpack_require__(28); 19984 19985/** 19986 * @interface WheelEvent 19987 * @see http://www.w3.org/TR/DOM-Level-3-Events/ 19988 */ 19989var WheelEventInterface = { 19990 deltaX: function (event) { 19991 return 'deltaX' in event ? event.deltaX : 19992 // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). 19993 'wheelDeltaX' in event ? -event.wheelDeltaX : 0; 19994 }, 19995 deltaY: function (event) { 19996 return 'deltaY' in event ? event.deltaY : 19997 // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). 19998 'wheelDeltaY' in event ? -event.wheelDeltaY : 19999 // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). 20000 'wheelDelta' in event ? -event.wheelDelta : 0; 20001 }, 20002 deltaZ: null, 20003 20004 // Browsers without "deltaMode" is reporting in raw wheel delta where one 20005 // notch on the scroll is always +/- 120, roughly equivalent to pixels. 20006 // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or 20007 // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. 20008 deltaMode: null 20009}; 20010 20011/** 20012 * @param {object} dispatchConfig Configuration used to dispatch this event. 20013 * @param {string} dispatchMarker Marker identifying the event target. 20014 * @param {object} nativeEvent Native browser event. 20015 * @extends {SyntheticMouseEvent} 20016 */ 20017function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { 20018 return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); 20019} 20020 20021SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface); 20022 20023module.exports = SyntheticWheelEvent; 20024 20025/***/ }), 20026/* 164 */ 20027/***/ (function(module, exports, __webpack_require__) { 20028 20029"use strict"; 20030/** 20031 * Copyright 2013-present, Facebook, Inc. 20032 * All rights reserved. 20033 * 20034 * This source code is licensed under the BSD-style license found in the 20035 * LICENSE file in the root directory of this source tree. An additional grant 20036 * of patent rights can be found in the PATENTS file in the same directory. 20037 * 20038 * 20039 */ 20040 20041 20042 20043var MOD = 65521; 20044 20045// adler32 is not cryptographically strong, and is only used to sanity check that 20046// markup generated on the server matches the markup generated on the client. 20047// This implementation (a modified version of the SheetJS version) has been optimized 20048// for our use case, at the expense of conforming to the adler32 specification 20049// for non-ascii inputs. 20050function adler32(data) { 20051 var a = 1; 20052 var b = 0; 20053 var i = 0; 20054 var l = data.length; 20055 var m = l & ~0x3; 20056 while (i < m) { 20057 var n = Math.min(i + 4096, m); 20058 for (; i < n; i += 4) { 20059 b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3)); 20060 } 20061 a %= MOD; 20062 b %= MOD; 20063 } 20064 for (; i < l; i++) { 20065 b += a += data.charCodeAt(i); 20066 } 20067 a %= MOD; 20068 b %= MOD; 20069 return a | b << 16; 20070} 20071 20072module.exports = adler32; 20073 20074/***/ }), 20075/* 165 */ 20076/***/ (function(module, exports, __webpack_require__) { 20077 20078"use strict"; 20079/* WEBPACK VAR INJECTION */(function(process) {/** 20080 * Copyright 2013-present, Facebook, Inc. 20081 * All rights reserved. 20082 * 20083 * This source code is licensed under the BSD-style license found in the 20084 * LICENSE file in the root directory of this source tree. An additional grant 20085 * of patent rights can be found in the PATENTS file in the same directory. 20086 * 20087 */ 20088 20089 20090 20091var _prodInvariant = __webpack_require__(3); 20092 20093var ReactPropTypeLocationNames = __webpack_require__(145); 20094var ReactPropTypesSecret = __webpack_require__(67); 20095 20096var invariant = __webpack_require__(1); 20097var warning = __webpack_require__(2); 20098 20099var ReactComponentTreeHook; 20100 20101if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { 20102 // Temporary hack. 20103 // Inline requires don't work well with Jest: 20104 // https://github.com/facebook/react/issues/7240 20105 // Remove the inline requires when we don't need them anymore: 20106 // https://github.com/facebook/react/pull/7178 20107 ReactComponentTreeHook = __webpack_require__(7); 20108} 20109 20110var loggedTypeFailures = {}; 20111 20112/** 20113 * Assert that the values match with the type specs. 20114 * Error messages are memorized and will only be shown once. 20115 * 20116 * @param {object} typeSpecs Map of name to a ReactPropType 20117 * @param {object} values Runtime values that need to be type-checked 20118 * @param {string} location e.g. "prop", "context", "child context" 20119 * @param {string} componentName Name of the component for error messages. 20120 * @param {?object} element The React element that is being type-checked 20121 * @param {?number} debugID The React component instance that is being type-checked 20122 * @private 20123 */ 20124function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) { 20125 for (var typeSpecName in typeSpecs) { 20126 if (typeSpecs.hasOwnProperty(typeSpecName)) { 20127 var error; 20128 // Prop type validation may throw. In case they do, we don't want to 20129 // fail the render phase where it didn't fail before. So we log it. 20130 // After these have been cleaned up, we'll let them throw.
20131 try { 20132 // This is intentionally an invariant that gets caught. It's the same 20133 // behavior as without this statement except with a better message. 20134 !(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; 20135 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); 20136 } catch (ex) { 20137 error = ex; 20138 } 20139 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; 20140 if (error instanceof Error && !(error.message in loggedTypeFailures)) { 20141 // Only monitor this failure once because there tends to be a lot of the 20142 // same error. 20143 loggedTypeFailures[error.message] = true; 20144 20145 var componentStackInfo = ''; 20146 20147 if (process.env.NODE_ENV !== 'production') { 20148 if (!ReactComponentTreeHook) { 20149 ReactComponentTreeHook = __webpack_require__(7); 20150 } 20151 if (debugID !== null) { 20152 componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); 20153 } else if (element !== null) { 20154 componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); 20155 } 20156 } 20157 20158 process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0; 20159 } 20160 } 20161 } 20162} 20163 20164module.exports = checkReactTypeSpec; 20165/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 20166 20167/***/ }), 20168/* 166 */ 20169/***/ (function(module, exports, __webpack_require__) { 20170 20171"use strict"; 20172/* WEBPACK VAR INJECTION */(function(process) {/** 20173 * Copyright 2013-present, Facebook, Inc. 20174 * All rights reserved. 20175 * 20176 * This source code is licensed under the BSD-style license found in the 20177 * LICENSE file in the root directory of this source tree. An additional grant 20178 * of patent rights can be found in the PATENTS file in the same directory. 20179 * 20180 */ 20181 20182 20183 20184var CSSProperty = __webpack_require__(56); 20185var warning = __webpack_require__(2); 20186 20187var isUnitlessNumber = CSSProperty.isUnitlessNumber; 20188var styleWarnings = {}; 20189 20190/** 20191 * Convert a value into the proper css writable value. The style name `name` 20192 * should be logical (no hyphens), as specified 20193 * in `CSSProperty.isUnitlessNumber`. 20194 * 20195 * @param {string} name CSS property name such as `topMargin`. 20196 * @param {*} value CSS property value such as `10px`. 20197 * @param {ReactDOMComponent} component 20198 * @return {string} Normalized style value with dimensions applied. 20199 */ 20200function dangerousStyleValue(name, value, component) { 20201 // Note that we've removed escapeTextForBrowser() calls here since the 20202 // whole string will be escaped when the attribute is injected into 20203 // the markup. If you provide unsafe user data here they can inject 20204 // arbitrary CSS which may be problematic (I couldn't repro this): 20205 // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet 20206 // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ 20207 // This is not an XSS hole but instead a potential CSS injection issue 20208 // which has lead to a greater discussion about how we're going to 20209 // trust URLs moving forward. See #2115901 20210 20211 var isEmpty = value == null || typeof value === 'boolean' || value === ''; 20212 if (isEmpty) { 20213 return ''; 20214 } 20215 20216 var isNonNumeric = isNaN(value); 20217 if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { 20218 return '' + value; // cast to string 20219 } 20220 20221 if (typeof value === 'string') { 20222 if (process.env.NODE_ENV !== 'production') { 20223 // Allow '0' to pass through without warning. 0 is already special and 20224 // doesn't require units, so we don't need to warn about it. 20225 if (component && value !== '0') { 20226 var owner = component._currentElement._owner; 20227 var ownerName = owner ? owner.getName() : null; 20228 if (ownerName && !styleWarnings[ownerName]) { 20229 styleWarnings[ownerName] = {}; 20230 } 20231 var warned = false;
20232 if (ownerName) { 20233 var warnings = styleWarnings[ownerName]; 20234 warned = warnings[name]; 20235 if (!warned) { 20236 warnings[name] = true; 20237 } 20238 } 20239 if (!warned) { 20240 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; 20241 } 20242 } 20243 } 20244 value = value.trim(); 20245 } 20246 return value + 'px'; 20247} 20248 20249module.exports = dangerousStyleValue; 20250/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 20251 20252/***/ }), 20253/* 167 */ 20254/***/ (function(module, exports, __webpack_require__) { 20255 20256"use strict"; 20257/* WEBPACK VAR INJECTION */(function(process) {/** 20258 * Copyright 2013-present, Facebook, Inc. 20259 * All rights reserved. 20260 * 20261 * This source code is licensed under the BSD-style license found in the 20262 * LICENSE file in the root directory of this source tree. An additional grant 20263 * of patent rights can be found in the PATENTS file in the same directory. 20264 * 20265 */ 20266 20267 20268 20269var _prodInvariant = __webpack_require__(3); 20270 20271var ReactCurrentOwner = __webpack_require__(11); 20272var ReactDOMComponentTree = __webpack_require__(5); 20273var ReactInstanceMap = __webpack_require__(23); 20274 20275var getHostComponentFromComposite = __webpack_require__(71); 20276var invariant = __webpack_require__(1); 20277var warning = __webpack_require__(2); 20278 20279/** 20280 * Returns the DOM node rendered by this element. 20281 * 20282 * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.finddomnode 20283 * 20284 * @param {ReactComponent|DOMElement} componentOrElement 20285 * @return {?DOMElement} The root node of this element. 20286 */ 20287function findDOMNode(componentOrElement) { 20288 if (process.env.NODE_ENV !== 'production') { 20289 var owner = ReactCurrentOwner.current; 20290 if (owner !== null) { 20291 process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A c
20291omponent') : void 0; 20292 owner._warnedAboutRefsInRender = true; 20293 } 20294 } 20295 if (componentOrElement == null) { 20296 return null; 20297 } 20298 if (componentOrElement.nodeType === 1) { 20299 return componentOrElement; 20300 } 20301 20302 var inst = ReactInstanceMap.get(componentOrElement); 20303 if (inst) { 20304 inst = getHostComponentFromComposite(inst); 20305 return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null; 20306 } 20307 20308 if (typeof componentOrElement.render === 'function') { 20309 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'findDOMNode was called on an unmounted component.') : _prodInvariant('44') : void 0; 20310 } else { 20311 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : _prodInvariant('45', Object.keys(componentOrElement)) : void 0; 20312 } 20313} 20314 20315module.exports = findDOMNode; 20316/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 20317 20318/***/ }), 20319/* 168 */ 20320/***/ (function(module, exports, __webpack_require__) { 20321 20322"use strict"; 20323/* WEBPACK VAR INJECTION */(function(process) {/** 20324 * Copyright 2013-present, Facebook, Inc. 20325 * All rights reserved. 20326 * 20327 * This source code is licensed under the BSD-style license found in the 20328 * LICENSE file in the root directory of this source tree. An additional grant 20329 * of patent rights can be found in the PATENTS file in the same directory. 20330 * 20331 * 20332 */ 20333 20334 20335 20336var KeyEscapeUtils = __webpack_require__(37); 20337var traverseAllChildren = __webpack_require__(76); 20338var warning = __webpack_require__(2); 20339 20340var ReactComponentTreeHook; 20341 20342if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { 20343 // Temporary hack. 20344 // Inline requires don't work well with Jest: 20345 // https://github.com/facebook/react/issues/7240 20346 // Remove the inline requires when we don't need them anymore: 20347 // https://github.com/facebook/react/pull/7178 20348 ReactComponentTreeHook = __webpack_require__(7); 20349} 20350 20351/** 20352 * @param {function} traverseContext Context passed through traversal. 20353 * @param {?ReactComponent} child React child component. 20354 * @param {!string} name String name of key path to child. 20355 * @param {number=} selfDebugID Optional debugID of the current internal instance. 20356 */ 20357function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) { 20358 // We found a component instance. 20359 if (traverseContext && typeof traverseContext === 'object') { 20360 var result = traverseContext; 20361 var keyUnique = result[name] === undefined; 20362 if (process.env.NODE_ENV !== 'production') { 20363 if (!ReactComponentTreeHook) { 20364 ReactComponentTreeHook = __webpack_require__(7); 20365 } 20366 if (!keyUnique) { 20367 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; 20368 } 20369 } 20370 if (keyUnique && child != null) { 20371 result[name] = child; 20372 } 20373 } 20374} 20375 20376/** 20377 * Flattens children that are typically specified as `props.children`. Any null 20378 * children will not be included in the resulting object. 20379 * @return {!object} flattened children keyed by name. 20380 */ 20381function flattenChildren(children, selfDebugID) { 20382 if (children == null) { 20383 return children; 20384 } 20385 var result = {}; 20386 20387 if (process.env.NODE_ENV !== 'production') { 20388 traverseAllChildren(children, function (traverseContext, child, name) { 20389 return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID); 20390 }, result); 20391 } else { 20392 traverseAllChildren(children, flattenSingleChildIntoContext, result); 20393 } 20394 return result; 20395} 20396 20397module.exports = flattenChildren; 20398/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 20399 20400/***/ }), 20401/* 169 */ 20402/***/ (function(module, exports, __webpack_require__) { 20403 20404"use strict"; 20405/** 20406 * Copyright 2013-present, Facebook, Inc. 20407 * All rights reserved. 20408 * 20409 * This source code is licensed under the BSD-style license found in the 20410 * LICENSE file in the root directory of this source tree. An additional grant 20411 * of patent rights can be found in the PATENTS file in the same directory. 20412 * 20413 */ 20414 20415 20416
vendor: 8,079 bytes, lines 20417-20724
20417var getEventCharCode = __webpack_require__(43); 20418 20419/** 20420 * Normalization of deprecated HTML5 `key` values 20421 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names 20422 */ 20423var normalizeKey = { 20424 'Esc': 'Escape', 20425 'Spacebar': ' ', 20426 'Left': 'ArrowLeft', 20427 'Up': 'ArrowUp', 20428 'Right': 'ArrowRight', 20429 'Down': 'ArrowDown', 20430 'Del': 'Delete', 20431 'Win': 'OS', 20432 'Menu': 'ContextMenu', 20433 'Apps': 'ContextMenu', 20434 'Scroll': 'ScrollLock', 20435 'MozPrintableKey': 'Unidentified' 20436}; 20437 20438/** 20439 * Translation from legacy `keyCode` to HTML5 `key` 20440 * Only special keys supported, all others depend on keyboard layout or browser 20441 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names 20442 */ 20443var translateToKey = { 20444 8: 'Backspace', 20445 9: 'Tab', 20446 12: 'Clear', 20447 13: 'Enter', 20448 16: 'Shift', 20449 17: 'Control', 20450 18: 'Alt', 20451 19: 'Pause', 20452 20: 'CapsLock', 20453 27: 'Escape', 20454 32: ' ', 20455 33: 'PageUp', 20456 34: 'PageDown', 20457 35: 'End', 20458 36: 'Home', 20459 37: 'ArrowLeft', 20460 38: 'ArrowUp', 20461 39: 'ArrowRight', 20462 40: 'ArrowDown', 20463 45: 'Insert', 20464 46: 'Delete', 20465 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6', 20466 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12', 20467 144: 'NumLock', 20468 145: 'ScrollLock', 20469 224: 'Meta' 20470}; 20471 20472/** 20473 * @param {object} nativeEvent Native browser event. 20474 * @return {string} Normalized `key` property. 20475 */ 20476function getEventKey(nativeEvent) { 20477 if (nativeEvent.key) { 20478 // Normalize inconsistent values reported by browsers due to 20479 // implementations of a working draft specification. 20480 20481 // FireFox implements `key` but returns `MozPrintableKey` for all 20482 // printable characters (normalized to `Unidentified`), ignore it. 20483 var key = normalizeKey[nativeEvent.key] || nativeEvent.key; 20484 if (key !== 'Unidentified') { 20485 return key; 20486 } 20487 } 20488 20489 // Browser does not implement `key`, polyfill as much of it as we can. 20490 if (nativeEvent.type === 'keypress') { 20491 var charCode = getEventCharCode(nativeEvent); 20492 20493 // The enter-key is technically both printable and non-printable and can 20494 // thus be captured by `keypress`, no other non-printable key should. 20495 return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); 20496 } 20497 if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { 20498 // While user keyboard layout determines the actual meaning of each 20499 // `keyCode` value, almost all function keys have a universal value. 20500 return translateToKey[nativeEvent.keyCode] || 'Unidentified'; 20501 } 20502 return ''; 20503} 20504 20505module.exports = getEventKey; 20506 20507/***/ }), 20508/* 170 */ 20509/***/ (function(module, exports, __webpack_require__) { 20510 20511"use strict"; 20512/** 20513 * Copyright 2013-present, Facebook, Inc. 20514 * All rights reserved. 20515 * 20516 * This source code is licensed under the BSD-style license found in the 20517 * LICENSE file in the root directory of this source tree. An additional grant 20518 * of patent rights can be found in the PATENTS file in the same directory. 20519 * 20520 * 20521 */ 20522 20523 20524 20525/* global Symbol */ 20526 20527var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; 20528var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. 20529 20530/** 20531 * Returns the iterator method function contained on the iterable object. 20532 * 20533 * Be sure to invoke the function with the iterable as context: 20534 * 20535 * var iteratorFn = getIteratorFn(myIterable); 20536 * if (iteratorFn) { 20537 * var iterator = iteratorFn.call(myIterable); 20538 * ... 20539 * } 20540 * 20541 * @param {?object} maybeIterable 20542 * @return {?function} 20543 */ 20544function getIteratorFn(maybeIterable) { 20545 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); 20546 if (typeof iteratorFn === 'function') { 20547 return iteratorFn; 20548 } 20549} 20550 20551module.exports = getIteratorFn; 20552 20553/***/ }), 20554/* 171 */ 20555/***/ (function(module, exports, __webpack_require__) { 20556 20557"use strict"; 20558/** 20559 * Copyright 2013-present, Facebook, Inc. 20560 * All rights reserved. 20561 * 20562 * This source code is licensed under the BSD-style license found in the 20563 * LICENSE file in the root directory of this source tree. An additional grant 20564 * of patent rights can be found in the PATENTS file in the same directory. 20565 * 20566 */ 20567 20568 20569 20570/** 20571 * Given any node return the first leaf node without children. 20572 * 20573 * @param {DOMElement|DOMTextNode} node 20574 * @return {DOMElement|DOMTextNode} 20575 */ 20576 20577function getLeafNode(node) { 20578 while (node && node.firstChild) { 20579 node = node.firstChild; 20580 } 20581 return node; 20582} 20583 20584/** 20585 * Get the next sibling within a container. This will walk up the 20586 * DOM if a node's siblings have been exhausted. 20587 * 20588 * @param {DOMElement|DOMTextNode} node 20589 * @return {?DOMElement|DOMTextNode} 20590 */ 20591function getSiblingNode(node) { 20592 while (node) { 20593 if (node.nextSibling) { 20594 return node.nextSibling; 20595 } 20596 node = node.parentNode; 20597 } 20598} 20599 20600/** 20601 * Get object describing the nodes which contain characters at offset. 20602 * 20603 * @param {DOMElement|DOMTextNode} root 20604 * @param {number} offset 20605 * @return {?object} 20606 */ 20607function getNodeForCharacterOffset(root, offset) { 20608 var node = getLeafNode(root); 20609 var nodeStart = 0; 20610 var nodeEnd = 0; 20611 20612 while (node) { 20613 if (node.nodeType === 3) { 20614 nodeEnd = nodeStart + node.textContent.length; 20615 20616 if (nodeStart <= offset && nodeEnd >= offset) { 20617 return { 20618 node: node, 20619 offset: offset - nodeStart 20620 }; 20621 } 20622 20623 nodeStart = nodeEnd; 20624 } 20625 20626 node = getLeafNode(getSiblingNode(node)); 20627 } 20628} 20629 20630module.exports = getNodeForCharacterOffset; 20631 20632/***/ }), 20633/* 172 */ 20634/***/ (function(module, exports, __webpack_require__) { 20635 20636"use strict"; 20637/** 20638 * Copyright 2013-present, Facebook, Inc. 20639 * All rights reserved. 20640 * 20641 * This source code is licensed under the BSD-style license found in the 20642 * LICENSE file in the root directory of this source tree. An additional grant 20643 * of patent rights can be found in the PATENTS file in the same directory. 20644 * 20645 */ 20646 20647 20648 20649var ExecutionEnvironment = __webpack_require__(6); 20650 20651/** 20652 * Generate a mapping of standard vendor prefixes using the defined style property and event name. 20653 * 20654 * @param {string} styleProp 20655 * @param {string} eventName 20656 * @returns {object} 20657 */ 20658function makePrefixMap(styleProp, eventName) { 20659 var prefixes = {}; 20660 20661 prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); 20662 prefixes['Webkit' + styleProp] = 'webkit' + eventName; 20663 prefixes['Moz' + styleProp] = 'moz' + eventName; 20664 prefixes['ms' + styleProp] = 'MS' + eventName; 20665 prefixes['O' + styleProp] = 'o' + eventName.toLowerCase(); 20666 20667 return prefixes; 20668} 20669 20670/** 20671 * A list of event names to a configurable list of vendor prefixes. 20672 */ 20673var vendorPrefixes = { 20674 animationend: makePrefixMap('Animation', 'AnimationEnd'), 20675 animationiteration: makePrefixMap('Animation', 'AnimationIteration'), 20676 animationstart: makePrefixMap('Animation', 'AnimationStart'), 20677 transitionend: makePrefixMap('Transition', 'TransitionEnd') 20678}; 20679 20680/** 20681 * Event names that have already been detected and prefixed (if applicable). 20682 */ 20683var prefixedEventNames = {}; 20684 20685/** 20686 * Element to check for prefixes on. 20687 */ 20688var style = {}; 20689 20690/** 20691 * Bootstrap if a DOM exists. 20692 */ 20693if (ExecutionEnvironment.canUseDOM) { 20694 style = document.createElement('div').style; 20695 20696 // On some platforms, in particular some releases of Android 4.x, 20697 // the un-prefixed "animation" and "transition" properties are defined on the 20698 // style object but the events that fire will still be prefixed, so we need 20699 // to check if the un-prefixed events are usable, and if not remove them from the map. 20700 if (!('AnimationEvent' in window)) { 20701 delete vendorPrefixes.animationend.animation; 20702 delete vendorPrefixes.animationiteration.animation; 20703 delete vendorPrefixes.animationstart.animation; 20704 } 20705 20706 // Same as above 20707 if (!('TransitionEvent' in window)) { 20708 delete vendorPrefixes.transitionend.transition; 20709 } 20710} 20711 20712/** 20713 * Attempts to determine the correct vendor prefixed event name. 20714 * 20715 * @param {string} eventName 20716 * @returns {string} 20717 */ 20718function getVendorPrefixedEventName(eventName) { 20719 if (prefixedEventNames[eventName]) { 20720 return prefixedEventNames[eventName]; 20721 } else if (!vendorPrefixes[eventName]) { 20722 return eventName; 20723 } 20724
20725 var prefixMap = vendorPrefixes[eventName]; 20726 20727 for (var styleProp in prefixMap) { 20728 if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { 20729 return prefixedEventNames[eventName] = prefixMap[styleProp]; 20730 } 20731 } 20732 20733 return ''; 20734} 20735 20736module.exports = getVendorPrefixedEventName; 20737 20738/***/ }), 20739/* 173 */ 20740/***/ (function(module, exports, __webpack_require__) { 20741 20742"use strict"; 20743/** 20744 * Copyright 2013-present, Facebook, Inc. 20745 * All rights reserved. 20746 * 20747 * This source code is licensed under the BSD-style license found in the 20748 * LICENSE file in the root directory of this source tree. An additional grant 20749 * of patent rights can be found in the PATENTS file in the same directory. 20750 * 20751 */ 20752 20753 20754 20755var escapeTextContentForBrowser = __webpack_require__(30); 20756 20757/** 20758 * Escapes attribute value to prevent scripting attacks. 20759 * 20760 * @param {*} value Value to escape. 20761 * @return {string} An escaped string. 20762 */ 20763function quoteAttributeValueForBrowser(value) { 20764 return '"' + escapeTextContentForBrowser(value) + '"'; 20765} 20766 20767module.exports = quoteAttributeValueForBrowser; 20768 20769/***/ }), 20770/* 174 */ 20771/***/ (function(module, exports, __webpack_require__) { 20772 20773"use strict"; 20774/** 20775 * Copyright 2013-present, Facebook, Inc. 20776 * All rights reserved. 20777 * 20778 * This source code is licensed under the BSD-style license found in the 20779 * LICENSE file in the root directory of this source tree. An additional grant 20780 * of patent rights can be found in the PATENTS file in the same directory. 20781 * 20782 */ 20783 20784 20785 20786var ReactMount = __webpack_require__(65); 20787 20788module.exports = ReactMount.renderSubtreeIntoContainer; 20789 20790/***/ }), 20791/* 175 */ 20792/***/ (function(module, exports, __webpack_require__) { 20793 20794"use strict"; 20795/** 20796 * Copyright 2013-present, Facebook, Inc. 20797 * All rights reserved. 20798 * 20799 * This source code is licensed under the BSD-style license found in the 20800 * LICENSE file in the root directory of this source tree. An additional grant 20801 * of patent rights can be found in the PATENTS file in the same directory. 20802 * 20803 * 20804 */ 20805 20806 20807 20808/** 20809 * Escape and wrap key so it is safe to use as a reactid 20810 * 20811 * @param {string} key to be escaped. 20812 * @return {string} the escaped key. 20813 */ 20814 20815function escape(key) { 20816 var escapeRegex = /[=:]/g; 20817 var escaperLookup = { 20818 '=': '=0', 20819 ':': '=2' 20820 }; 20821 var escapedString = ('' + key).replace(escapeRegex, function (match) { 20822 return escaperLookup[match]; 20823 }); 20824 20825 return '$' + escapedString; 20826} 20827 20828/** 20829 * Unescape and unwrap key for human-readable display 20830 * 20831 * @param {string} key to unescape. 20832 * @return {string} the unescaped key. 20833 */ 20834function unescape(key) { 20835 var unescapeRegex = /(=0|=2)/g; 20836 var unescaperLookup = { 20837 '=0': '=', 20838 '=2': ':' 20839 }; 20840 var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); 20841 20842 return ('' + keySubstring).replace(unescapeRegex, function (match) { 20843 return unescaperLookup[match]; 20844 }); 20845} 20846 20847var KeyEscapeUtils = { 20848 escape: escape, 20849 unescape: unescape 20850}; 20851 20852module.exports = KeyEscapeUtils; 20853 20854/***/ }), 20855/* 176 */ 20856/***/ (function(module, exports, __webpack_require__) { 20857 20858"use strict"; 20859/* WEBPACK VAR INJECTION */(function(process) {/** 20860 * Copyright 2013-present, Facebook, Inc. 20861 * All rights reserved. 20862 * 20863 * This source code is licensed under the BSD-style license found in the 20864 * LICENSE file in the root directory of this source tree. An additional grant 20865 * of patent rights can be found in the PATENTS file in the same directory. 20866 * 20867 * 20868 */ 20869 20870 20871 20872var _prodInvariant = __webpack_require__(16); 20873 20874var invariant = __webpack_require__(1); 20875 20876/** 20877 * Static poolers. Several custom versions for each potential number of 20878 * arguments. A completely generic pooler is easy to implement, but would 20879 * require accessing the `arguments` object. In each of these, `this` refers to 20880 * the Class itself, not an instance. If any others are needed, simply add them
20881 * here, or in their own files. 20882 */ 20883var oneArgumentPooler = function (copyFieldsFrom) { 20884 var Klass = this; 20885 if (Klass.instancePool.length) { 20886 var instance = Klass.instancePool.pop(); 20887 Klass.call(instance, copyFieldsFrom); 20888 return instance; 20889 } else { 20890 return new Klass(copyFieldsFrom); 20891 } 20892}; 20893 20894var twoArgumentPooler = function (a1, a2) { 20895 var Klass = this; 20896 if (Klass.instancePool.length) { 20897 var instance = Klass.instancePool.pop(); 20898 Klass.call(instance, a1, a2); 20899 return instance; 20900 } else { 20901 return new Klass(a1, a2); 20902 } 20903}; 20904 20905var threeArgumentPooler = function (a1, a2, a3) { 20906 var Klass = this; 20907 if (Klass.instancePool.length) { 20908 var instance = Klass.instancePool.pop(); 20909 Klass.call(instance, a1, a2, a3); 20910 return instance; 20911 } else { 20912 return new Klass(a1, a2, a3); 20913 } 20914}; 20915 20916var fourArgumentPooler = function (a1, a2, a3, a4) { 20917 var Klass = this; 20918 if (Klass.instancePool.length) { 20919 var instance = Klass.instancePool.pop(); 20920 Klass.call(instance, a1, a2, a3, a4); 20921 return instance; 20922 } else { 20923 return new Klass(a1, a2, a3, a4); 20924 } 20925}; 20926 20927var standardReleaser = function (instance) { 20928 var Klass = this; 20929 !(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; 20930 instance.destructor(); 20931 if (Klass.instancePool.length < Klass.poolSize) { 20932 Klass.instancePool.push(instance); 20933 } 20934}; 20935 20936var DEFAULT_POOL_SIZE = 10; 20937var DEFAULT_POOLER = oneArgumentPooler; 20938 20939/** 20940 * Augments `CopyConstructor` to be a poolable class, augmenting only the class 20941 * itself (statically) not adding any prototypical fields. Any CopyConstructor 20942 * you give this may have a `poolSize` property, and will look for a 20943 * prototypical `destructor` on instances. 20944 * 20945 * @param {Function} CopyConstructor Constructor that can be used to reset. 20946 * @param {Function} pooler Customizable pooler. 20947 */ 20948var addPoolingTo = function (CopyConstructor, pooler) { 20949 // Casting as any so that flow ignores the actual implementation and trusts 20950 // it to match the type we declared 20951 var NewKlass = CopyConstructor; 20952 NewKlass.instancePool = []; 20953 NewKlass.getPooled = pooler || DEFAULT_POOLER; 20954 if (!NewKlass.poolSize) { 20955 NewKlass.poolSize = DEFAULT_POOL_SIZE; 20956 } 20957 NewKlass.release = standardReleaser; 20958 return NewKlass; 20959}; 20960 20961var PooledClass = { 20962 addPoolingTo: addPoolingTo, 20963 oneArgumentPooler: oneArgumentPooler, 20964 twoArgumentPooler: twoArgumentPooler, 20965 threeArgumentPooler: threeArgumentPooler, 20966 fourArgumentPooler: fourArgumentPooler 20967}; 20968 20969module.exports = PooledClass; 20970/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 20971 20972/***/ }), 20973/* 177 */ 20974/***/ (function(module, exports, __webpack_require__) { 20975 20976"use strict"; 20977/** 20978 * Copyright 2013-present, Facebook, Inc. 20979 * All rights reserved. 20980 * 20981 * This source code is licensed under the BSD-style license found in the 20982 * LICENSE file in the root directory of this source tree. An additional grant 20983 * of patent rights can be found in the PATENTS file in the same directory. 20984 * 20985 */ 20986 20987 20988 20989var PooledClass = __webpack_require__(176); 20990var ReactElement = __webpack_require__(15); 20991 20992var emptyFunction = __webpack_require__(9); 20993var traverseAllChildren = __webpack_require__(187); 20994 20995var twoArgumentPooler = PooledClass.twoArgumentPooler; 20996var fourArgumentPooler = PooledClass.fourArgumentPooler; 20997 20998var userProvidedKeyEscapeRegex = /\/+/g; 20999function escapeUserProvidedKey(text) { 21000 return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); 21001} 21002 21003/** 21004 * PooledClass representing the bookkeeping associated with performing a child 21005 * traversal. Allows avoiding binding callbacks. 21006 * 21007 * @constructor ForEachBookKeeping 21008 * @param {!function} forEachFunction Function to perform traversal with. 21009 * @param {?*} forEachContext Context to perform context with. 21010 */
21011function ForEachBookKeeping(forEachFunction, forEachContext) { 21012 this.func = forEachFunction; 21013 this.context = forEachContext; 21014 this.count = 0; 21015} 21016ForEachBookKeeping.prototype.destructor = function () { 21017 this.func = null; 21018 this.context = null; 21019 this.count = 0; 21020}; 21021PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler); 21022 21023function forEachSingleChild(bookKeeping, child, name) { 21024 var func = bookKeeping.func, 21025 context = bookKeeping.context; 21026 21027 func.call(context, child, bookKeeping.count++); 21028} 21029 21030/** 21031 * Iterates through children that are typically specified as `props.children`. 21032 * 21033 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach 21034 * 21035 * The provided forEachFunc(child, index) will be called for each 21036 * leaf child. 21037 * 21038 * @param {?*} children Children tree container. 21039 * @param {function(*, int)} forEachFunc 21040 * @param {*} forEachContext Context for forEachContext. 21041 */ 21042function forEachChildren(children, forEachFunc, forEachContext) { 21043 if (children == null) { 21044 return children; 21045 } 21046 var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext); 21047 traverseAllChildren(children, forEachSingleChild, traverseContext); 21048 ForEachBookKeeping.release(traverseContext); 21049} 21050 21051/** 21052 * PooledClass representing the bookkeeping associated with performing a child 21053 * mapping. Allows avoiding binding callbacks. 21054 * 21055 * @constructor MapBookKeeping 21056 * @param {!*} mapResult Object containing the ordered map of results. 21057 * @param {!function} mapFunction Function to perform mapping with. 21058 * @param {?*} mapContext Context to perform mapping with. 21059 */ 21060function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { 21061 this.result = mapResult; 21062 this.keyPrefix = keyPrefix; 21063 this.func = mapFunction; 21064 this.context = mapContext; 21065 this.count = 0; 21066} 21067MapBookKeeping.prototype.destructor = function () { 21068 this.result = null; 21069 this.keyPrefix = null; 21070 this.func = null; 21071 this.context = null; 21072 this.count = 0; 21073}; 21074PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler); 21075 21076function mapSingleChildIntoContext(bookKeeping, child, childKey) { 21077 var result = bookKeeping.result, 21078 keyPrefix = bookKeeping.keyPrefix, 21079 func = bookKeeping.func, 21080 context = bookKeeping.context; 21081 21082 21083 var mappedChild = func.call(context, child, bookKeeping.count++); 21084 if (Array.isArray(mappedChild)) { 21085 mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument); 21086 } else if (mappedChild != null) { 21087 if (ReactElement.isValidElement(mappedChild)) { 21088 mappedChild = ReactElement.cloneAndReplaceKey(mappedChild, 21089 // Keep both the (mapped) and old keys if they differ, just as 21090 // traverseAllChildren used to do for objects as children 21091 keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); 21092 } 21093 result.push(mappedChild); 21094 } 21095} 21096 21097function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { 21098 var escapedPrefix = ''; 21099 if (prefix != null) { 21100 escapedPrefix = escapeUserProvidedKey(prefix) + '/'; 21101 } 21102 var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context); 21103 traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); 21104 MapBookKeeping.release(traverseContext); 21105} 21106 21107/** 21108 * Maps children that are typically specified as `props.children`. 21109 * 21110 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map 21111 * 21112 * The provided mapFunction(child, key, index) will be called for each 21113 * leaf child. 21114 * 21115 * @param {?*} children Children tree container. 21116 * @param {function(*, int)} func The map function. 21117 * @param {*} context Context for mapFunction. 21118 * @return {object} Object containing the ordered map of results. 21119 */ 21120function mapChildren(children, func, context) { 21121 if (children == null) { 21122 return children; 21123 } 21124 var result = []; 21125 mapIntoWithKeyPrefixInternal(children, result, null, func, context); 21126 return result; 21127} 21128 21129function forEachSingleChildDummy(traverseContext, child, name) { 21130 return null; 21131} 21132 21133/** 21134 * Count the number of children that are typically specified as 21135 * `props.children`. 21136 * 21137 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count 21138 * 21139 * @param {?*} children Children tree container. 21140 * @return {number} The number of children. 21141 */ 21142function countChildren(children, context) {
21143 return traverseAllChildren(children, forEachSingleChildDummy, null); 21144} 21145 21146/** 21147 * Flatten a children object (typically specified as `props.children`) and 21148 * return an array with appropriately re-keyed children. 21149 * 21150 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray 21151 */ 21152function toArray(children) { 21153 var result = []; 21154 mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument); 21155 return result; 21156} 21157 21158var ReactChildren = { 21159 forEach: forEachChildren, 21160 map: mapChildren, 21161 mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal, 21162 count: countChildren, 21163 toArray: toArray 21164}; 21165 21166module.exports = ReactChildren; 21167 21168/***/ }), 21169/* 178 */ 21170/***/ (function(module, exports, __webpack_require__) { 21171 21172"use strict"; 21173/* WEBPACK VAR INJECTION */(function(process) {/** 21174 * Copyright 2013-present, Facebook, Inc. 21175 * All rights reserved. 21176 * 21177 * This source code is licensed under the BSD-style license found in the 21178 * LICENSE file in the root directory of this source tree. An additional grant 21179 * of patent rights can be found in the PATENTS file in the same directory. 21180 * 21181 */ 21182 21183 21184 21185var _prodInvariant = __webpack_require__(16), 21186 _assign = __webpack_require__(4); 21187 21188var ReactComponent = __webpack_require__(49); 21189var ReactElement = __webpack_require__(15); 21190var ReactPropTypeLocationNames = __webpack_require__(79); 21191var ReactNoopUpdateQueue = __webpack_require__(50); 21192 21193var emptyObject = __webpack_require__(20); 21194var invariant = __webpack_require__(1); 21195var warning = __webpack_require__(2); 21196 21197var MIXINS_KEY = 'mixins'; 21198 21199// Helper function to allow the creation of anonymous functions which do not 21200// have .name set to the name of the variable being assigned to. 21201function identity(fn) { 21202 return fn; 21203} 21204 21205/** 21206 * Policies that describe methods in `ReactClassInterface`. 21207 */ 21208 21209 21210var injectedMixins = []; 21211 21212/** 21213 * Composite components are higher-level components that compose other composite 21214 * or host components. 21215 * 21216 * To create a new type of `ReactClass`, pass a specification of 21217 * your new class to `React.createClass`. The only requirement of your class 21218 * specification is that you implement a `render` method. 21219 * 21220 * var MyComponent = React.createClass({ 21221 * render: function() { 21222 * return <div>Hello World</div>; 21223 * } 21224 * }); 21225 * 21226 * The class specification supports a specific protocol of methods that have 21227 * special meaning (e.g. `render`). See `ReactClassInterface` for 21228 * more the comprehensive protocol. Any other properties and methods in the 21229 * class specification will be available on the prototype. 21230 * 21231 * @interface ReactClassInterface 21232 * @internal 21233 */ 21234var ReactClassInterface = { 21235 21236 /** 21237 * An array of Mixin objects to include when defining your component. 21238 * 21239 * @type {array} 21240 * @optional 21241 */ 21242 mixins: 'DEFINE_MANY', 21243 21244 /** 21245 * An object containing properties and methods that should be defined on 21246 * the component's constructor instead of its prototype (static methods). 21247 * 21248 * @type {object} 21249 * @optional 21250 */ 21251 statics: 'DEFINE_MANY', 21252 21253 /** 21254 * Definition of prop types for this component. 21255 * 21256 * @type {object} 21257 * @optional 21258 */ 21259 propTypes: 'DEFINE_MANY', 21260 21261 /** 21262 * Definition of context types for this component. 21263 * 21264 * @type {object} 21265 * @optional 21266 */ 21267 contextTypes: 'DEFINE_MANY', 21268 21269 /** 21270 * Definition of context types this component sets for its children. 21271 * 21272 * @type {object} 21273 * @optional 21274 */ 21275 childContextTypes: 'DEFINE_MANY', 21276 21277 // ==== Definition methods ==== 21278 21279 /** 21280 * Invoked when the component is mounted. Values in the mapping will be set on 21281 * `this.props` if that prop is not specified (i.e. using an `in` check). 21282 * 21283 * This method is invoked before `getInitialState` and therefore cannot rely 21284 * on `this.state` or use `this.setState`. 21285 * 21286 * @return {object} 21287 * @optional 21288 */ 21289 getDefaultProps: 'DEFINE_MANY_MERGED', 21290 21291 /** 21292 * Invoked once before the component is mounted. The return value will be used 21293 * as the initial value of `this.state`. 21294 * 21295 * getInitialState: function() { 21296 * return { 21297 * isOn: false, 21298 * fooBaz: new BazFoo() 21299 * } 21300 * } 21301 * 21302 * @return {object} 21303 * @optional 21304 */ 21305 getInitialState: 'DEFINE_MANY_MERGED', 21306 21307 /** 21308 * @return {object} 21309 * @optional 21310 */ 21311 getChildContext: 'DEFINE_MANY_MERGED', 21312 21313 /** 21314 * Uses props from `this.props` and state from `this.state` to render the 21315 * structure of the component. 21316 * 21317 * No guarantees are made about when or how often this method is invoked, so 21318 * it must not have side effects. 21319 * 21320 * render: function() { 21321 * var name = this.props.name; 21322 * return <div>Hello, {name}!</div>; 21323 * } 21324 * 21325 * @return {ReactComponent} 21326 * @required 21327 */ 21328 render: 'DEFINE_ONCE', 21329 21330 // ==== Delegate methods ==== 21331 21332 /** 21333 * Invoked when the component is initially created and about to be mou
21333nted. 21334 * This may have side effects, but any external subscriptions or data created 21335 * by this method must be cleaned up in `componentWillUnmount`. 21336 * 21337 * @optional 21338 */ 21339 componentWillMount: 'DEFINE_MANY', 21340 21341 /** 21342 * Invoked when the component has been mounted and has a DOM representation. 21343 * However, there is no guarantee that the DOM node is in the document. 21344 * 21345 * Use this as an opportunity to operate on the DOM when the component has 21346 * been mounted (initialized and rendered) for the first time. 21347 * 21348 * @param {DOMElement} rootNode DOM element representing the component. 21349 * @optional 21350 */ 21351 componentDidMount: 'DEFINE_MANY', 21352 21353 /** 21354 * Invoked before the component receives new props. 21355 * 21356 * Use this as an opportunity to react to a prop transition by updating the 21357 * state using `this.setState`. Current props are accessed via `this.props`. 21358 * 21359 * componentWillReceiveProps: function(nextProps, nextContext) { 21360 * this.setState({ 21361 * likesIncreasing: nextProps.likeCount > this.props.likeCount 21362 * }); 21363 * } 21364 * 21365 * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop 21366 * transition may cause a state change, but the opposite is not true. If you 21367 * need it, you are probably looking for `componentWillUpdate`. 21368 * 21369 * @param {object} nextProps 21370 * @optional 21371 */ 21372 componentWillReceiveProps: 'DEFINE_MANY', 21373 21374 /** 21375 * Invoked while deciding if the component should be updated as a result of 21376 * receiving new props, state and/or context. 21377 * 21378 * Use this as an opportunity to `return false` when you're certain that the 21379 * transition to the new props/state/context will not require a component 21380 * update. 21381 * 21382 * shouldComponentUpdate: function(nextProps, nextState, nextContext) { 21383 * return !equal(nextProps, this.props) || 21384 * !equal(nextState, this.state) || 21385 * !equal(nextContext, this.context); 21386 * } 21387 * 21388 * @param {object} nextProps 21389 * @param {?object} nextState 21390 * @param {?object} nextContext 21391 * @return {boolean} True if the component should update. 21392 * @optional 21393 */ 21394 shouldComponentUpdate: 'DEFINE_ONCE', 21395 21396 /** 21397 * Invoked when the component is about to update due to a transition from 21398 * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` 21399 * and `nextContext`. 21400 * 21401 * Use this as an opportunity to perform preparation before an update occurs. 21402 * 21403 * NOTE: You **cannot** use `this.setState()` in this method. 21404 * 21405 * @param {object} nextProps 21406 * @param {?object} nextState 21407 * @param {?object} nextContext 21408 * @param {ReactReconcileTransaction} transaction 21409 * @optional 21410 */ 21411 componentWillUpdate: 'DEFINE_MANY', 21412 21413 /** 21414 * Invoked when the component's DOM representation has been updated. 21415 * 21416 * Use this as an opportunity to operate on the DOM when the component has 21417 * been updated. 21418 * 21419 * @param {object} prevProps 21420 * @param {?object} prevState 21421 * @param {?object} prevContext 21422 * @param {DOMElement} rootNode DOM element representing the component. 21423 * @optional 21424 */ 21425 componentDidUpdate: 'DEFINE_MANY', 21426 21427 /** 21428 * Invoked when the component is about to be removed from its parent and have 21429 * its DOM representation destroyed. 21430 * 21431 * Use this as an opportunity to deallocate any external resources. 21432 * 21433 * NOTE: There is no `componentDidUnmount` since your component will have been 21434 * destroyed by that point. 21435 * 21436 * @optional 21437 */ 21438 componentWillUnmount: 'DEFINE_MANY', 21439 21440 // ==== Advanced methods ==== 21441 21442 /** 21443 * Updates the component's currently mounted DOM representation. 21444 * 21445 * By default, this implements React's rendering and reconciliation algorithm. 21446 * Sophisticated clients may wish to override this. 21447 * 21448 * @param {ReactReconcileTransaction} transaction 21449 * @internal 21450 * @overridable 21451 */ 21452 updateComponent: 'OVERRIDE_BASE' 21453 21454}; 21455 21456/** 21457 * Mapping from class specification keys to special processing functions. 21458 * 21459 * Although these are declared like instance properties in the specification 21460 * when defining classes using `React.createClass`, they are actually static 21461 * and are accessible on the constructor instead of the prototype. Despite 21462 * being static, they must be defined outside of the "statics" key under 21463 * which all other static methods are defined. 21464 */ 21465var RESERVED_SPEC_KEYS = { 21466 displayName: function (Constructor, displayName) { 21467 Constructor.displayName = displayName; 21468 }, 21469 mixins: function (Constructor, mixins) { 21470 if (mixins) { 21471 for (var i = 0; i < mixins.length; i++) { 21472 mixSpecIntoComponent(Constructor, mixins[i]); 21473 } 21474 } 21475 }, 21476 childContextTypes: function (Constructor, childContextTypes) { 21477 if (process.env.NODE_ENV !== 'production') { 21478 validateTypeDef(Constructor, childContextTypes, 'childContext'); 21479 } 21480 Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes); 21481 }, 21482 contextTypes: function (Constructor, contextTypes) { 21483 if (process.env.NODE_ENV !== 'production') { 21484 validateTypeDef(Constructor, contextTypes, 'context'); 21485 } 21486 Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes); 21487 }, 21488 /** 21489 * Special case getDefaultProps which should move into statics but requires 21490 * automatic merging. 21491 */ 21492 getDefaultProps: function (Constructor, getDefaultProps) { 21493 if (Constructor.getDefaultProps) { 21494 Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps); 21495 } else { 21496 Constructor.getDefaultProps = getDefaultProps; 21497 } 21498 }, 21499 propTypes: function (Constructor, propTypes) { 21500 if (process.env.NODE_ENV !== 'production') { 21501 validateTypeDef(Constructor, propTypes, 'prop'); 21502 } 21503 Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); 21504 }, 21505 statics: function (Constructor, statics) { 21506 mixStaticSpecIntoComponent(Constructor, statics); 21507 }, 21508 autobind: function () {} }; 21509 21510function validateTypeDef(Constructor, typeDef, location) { 21511 for (var propName in typeDef) { 21512 if (typeDef.hasOwnProperty(propName)) { 21513 // use a warning instead of an invariant so components 21514 // don't show up in prod but only in __DEV__ 21515 process.env.NODE_ENV !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invali
21515d; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0; 21516 } 21517 } 21518} 21519 21520function validateMethodOverride(isAlreadyDefined, name) { 21521 var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; 21522 21523 // Disallow overriding of base class methods unless explicitly allowed. 21524 if (ReactClassMixin.hasOwnProperty(name)) { 21525 !(specPolicy === 'OVERRIDE_BASE') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.', name) : _prodInvariant('73', name) : void 0; 21526 } 21527 21528 // Disallow defining methods more than once unless explicitly allowed. 21529 if (isAlreadyDefined) { 21530 !(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('74', name) : void 0; 21531 } 21532} 21533 21534/** 21535 * Mixin helper which handles policy validation and reserved 21536 * specification keys when building React classes. 21537 */ 21538function mixSpecIntoComponent(Constructor, spec) { 21539 if (!spec) { 21540 if (process.env.NODE_ENV !== 'production') { 21541 var typeofSpec = typeof spec; 21542 var isMixinValid = typeofSpec === 'object' && spec !== null; 21543 21544 process.env.NODE_ENV !== 'production' ? warning(isMixinValid, '%s: You\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0; 21545 } 21546 21547 return; 21548 } 21549 21550 !(typeof spec !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component class or function as a mixin. Instead, just use a regular object.') : _prodInvariant('75') : void 0; 21551 !!ReactElement.isValidElement(spec) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component as a mixin. Instead, just use a regular object.') : _prodInvariant('76') : void 0; 21552 21553 var proto = Constructor.prototype; 21554 var autoBindPairs = proto.__reactAutoBindPairs; 21555 21556 // By handling mixins before any other properties, we ensure the same 21557 // chaining order is applied to methods with DEFINE_MANY policy, whether 21558 // mixins are listed before or after these methods in the spec. 21559 if (spec.hasOwnProperty(MIXINS_KEY)) { 21560 RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); 21561 } 21562 21563 for (var name in spec) { 21564 if (!spec.hasOwnProperty(name)) { 21565 continue; 21566 } 21567 21568 if (name === MIXINS_KEY) { 21569 // We have already handled mixins in a special case above. 21570 continue; 21571 } 21572 21573 var property = spec[name]; 21574 var isAlreadyDefined = proto.hasOwnProperty(name); 21575 validateMethodOverride(isAlreadyDefined, name); 21576 21577 if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { 21578 RESERVED_SPEC_KEYS[name](Constructor, property); 21579 } else { 21580 // Setup methods on prototype: 21581 // The following member methods should not be automatically bound: 21582 // 1. Expected ReactClass methods (in the "interface"). 21583 // 2. Overridden methods (that were mixed in). 21584 var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); 21585 var isFunction = typeof property === 'function'; 21586 var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; 21587 21588 if (shouldAutoBind) { 21589 autoBindPairs.push(name, property); 21590 proto[name] = property; 21591 } else { 21592 if (isAlreadyDefined) { 21593 var specPolicy = ReactClassInterface[name]; 21594 21595 // These cases should already be caught by validateMethodOverride. 21596 !(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.', specPolicy, name) : _prodInvariant('77', specPolicy, name) : void 0; 21597 21598 // For methods which are defined more than once, call the existing 21599 // methods before calling the new property, merging if appropriate. 21600 if (specPolicy === 'DEFINE_MANY_MERGED') { 21601 proto[name] = createMergedResultFunction(proto[name], property); 21602 } else if (specPolicy === 'DEFINE_MANY') { 21603 proto[name] = createChainedFunction(proto[name], property); 21604 } 21605 } else { 21606 proto[name] = property; 21607 if (process.env.NODE_ENV !== 'production') { 21608 // Add verbose displayName to the function, which helps when looking 21609 // at profiling tools. 21610 if (typeof property === 'function' && spec.displayName) { 21611 proto[name].displayName = spec.displayName + '_' + name; 21612 } 21613 } 21614 } 21615 } 21616 } 21617 } 21618} 21619 21620function mixStaticSpecIntoComponent(Constructor, statics) { 21621 if (!statics) { 21622 return; 21623 } 21624 for (var name in statics) { 21625 var property = statics[name]; 21626 if (!statics.hasOwnProperty(name)) { 21627 continue; 21628 } 21629 21630 var isReserved = name in RESERVED_SPEC_KEYS; 21631 !!isReserved ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.', name) : _prodInvariant('78', name) : void 0; 21632 21633 var isInherited = name in Constructor; 21634 !!isInherited ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('79', name) : void 0; 21635 Constructor[name] = property; 21636 } 21637} 21638 21639/** 21640 * Merge two objects, but throw if both contain the same key. 21641 * 21642 * @param {object} one The first object, which is mutated. 21643 * @param {object} two The second object 21644 * @return {object} one after it has been mutated to contain everything in two. 21645 */ 21646function mergeIntoWithNoDuplicateKeys(one, two) { 21647 !(one && two && typeof one === 'object' && typeof two === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : _prodInvariant('80') : void 0; 21648 21649 for (var key in two) { 21650 if (two.hasOwnProperty(key)) { 21651 !(one[key] === undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.', key) : _prodInvariant('81', key) : void 0; 21652 one[key] = two[key]; 21653 } 21654 } 21655 return one; 21656} 21657 21658/** 21659 * Creates a function that invokes two functions and merges their return values. 21660 * 21661 * @param {function} one Function to invoke first. 21662 * @param {function} two Function to invoke second. 21663 * @return {function} Function that invokes the two argument functions. 21664 * @private 21665 */ 21666function createMergedResultFunction(one, two) { 21667 return function mergedResult() { 21668 var a = one.apply(this, arguments); 21669 var b = two.apply(this, arguments); 21670 if (a == null) { 21671 return b; 21672 } else if (b == null) { 21673 return a; 21674 } 21675 var c = {}; 21676 mergeIntoWithNoDuplicateKeys(c, a); 21677 mergeIntoWithNoDuplicateKeys(c, b); 21678 return c; 21679 }; 21680} 21681 21682/** 21683 * Creates a function that invokes two functions and ignores their return vales. 21684 * 21685 * @param {function} one Function to invoke first. 21686 * @param {function} two Function to invoke second. 21687 * @return {function} Function that invokes the two argument functions. 21688 * @private 21689 */ 21690function createChainedFunction(one, two) { 21691 return function chainedFunction() { 21692 one.apply(this, arguments); 21693 two.apply(this, arguments); 21694 }; 21695} 21696 21697/** 21698 * Binds a method to the component. 21699 * 21700 * @param {object} component Component whose method is going to be bound. 21701 * @param {function} method Method to be bound. 21702 * @return {function} The bound method. 21703 */ 21704function bindAutoBindMethod(component, method) { 21705 var boundMethod = method.bind(component); 21706 if (process.env.NODE_ENV !== 'production') { 21707 boundMethod.__reactBoundContext = component; 21708 boundMethod.__reactBoundMethod = method; 21709 boundMethod.__reactBoundArguments = null; 21710 var componentName = component.constructor.displayName; 21711 var _bind = boundMethod.bind; 21712 boundMethod.bind = function (newThis) { 21713 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 21714 args[_key - 1] = arguments[_key]; 21715 } 21716 21717 // User is trying to bind() an autobound method; we effectively will 21718 // ignore the value of "this" that the user is trying to use, so 21719 // let's warn. 21720 if (newThis !== component && newThis !== null) { 21721 process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0; 21722 } else if (!args.length) { 21723 process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0; 21724 return boundMethod; 21725 } 21726 var reboundMethod = _bind.apply(boundMethod, arguments); 21727 reboundMethod.__reactBoundContext = component; 21728 reboundMethod.__reactBoundMethod = method; 21729 reboundMethod.__reactBoundArguments = args; 21730 return reboundMethod; 21731 }; 21732 } 21733 return boundMethod; 21734} 21735 21736/** 21737 * Binds all auto-bound methods in a component. 21738 * 21739 * @param {object} component Component whose method is going to be bound. 21740 */ 21741function bindAutoBindMethods(component) { 21742 var pairs = component.__reactAutoBindPairs; 21743 for (var i = 0; i < pairs.length; i += 2) { 21744 var autoBindKey = pairs[i]; 21745 var method = pairs[i + 1]; 21746 component[autoBindKey] = bindAutoBindMethod(component, method); 21747 } 21748} 21749 21750/** 21751 * Add more to the ReactClass base class. These are all legacy features and 21752 * therefore not already part of the modern ReactComponent. 21753 */ 21754var ReactClassMixin = { 21755 21756 /** 21757 * TODO: This will be deprecated because state should always keep a consistent 21758 * type signature and the only use case for this, is to avoid that. 21759 */ 21760 replaceState: function (newState, callback) { 21761 this.updater.enqueueReplaceState(this, newState); 21762 if (callback) { 21763 this.updater.enqueueCallback(this, callback, 'replaceState'); 21764 } 21765 }, 21766 21767 /** 21768 * Checks whether or not this composite component is mounted. 21769 * @return {boolean} True if mounted, false otherwise. 21770 * @protected 21771 * @final 21772 */ 21773 isMounted: function () { 21774 return this.updater.isMounted(this); 21775 } 21776}; 21777 21778var ReactClassComponent = function () {}; 21779_assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); 21780 21781var didWarnDeprecated = false;
21782 21783/** 21784 * Module for creating composite components. 21785 * 21786 * @class ReactClass 21787 */ 21788var ReactClass = { 21789 21790 /** 21791 * Creates a composite component class given a class specification. 21792 * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass 21793 * 21794 * @param {object} spec Class specification (which must define `render`). 21795 * @return {function} Component constructor function. 21796 * @public 21797 */ 21798 createClass: function (spec) { 21799 if (process.env.NODE_ENV !== 'production') { 21800 process.env.NODE_ENV !== 'production' ? warning(didWarnDeprecated, '%s: React.createClass is deprecated and will be removed in version 16. ' + 'Use plain JavaScript classes instead. If you\'re not yet ready to ' + 'migrate, create-react-class is available on npm as a ' + 'drop-in replacement.', spec && spec.displayName || 'A Component') : void 0; 21801 didWarnDeprecated = true; 21802 } 21803 21804 // To keep our warnings more understandable, we'll use a little hack here to 21805 // ensure that Constructor.name !== 'Constructor'. This makes sure we don't 21806 // unnecessarily identify a class without displayName as 'Constructor'. 21807 var Constructor = identity(function (props, context, updater) { 21808 // This constructor gets overridden by mocks. The argument is used 21809 // by mocks to assert on what gets mounted. 21810 21811 if (process.env.NODE_ENV !== 'production') { 21812 process.env.NODE_ENV !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0; 21813 } 21814 21815 // Wire up auto-binding 21816 if (this.__reactAutoBindPairs.length) { 21817 bindAutoBindMethods(this); 21818 } 21819 21820 this.props = props; 21821 this.context = context; 21822 this.refs = emptyObject; 21823 this.updater = updater || ReactNoopUpdateQueue; 21824 21825 this.state = null; 21826 21827 // ReactClasses doesn't have constructors. Instead, they use the 21828 // getInitialState and componentWillMount methods for initialization. 21829 21830 var initialState = this.getInitialState ? this.getInitialState() : null; 21831 if (process.env.NODE_ENV !== 'production') { 21832 // We allow auto-mocks to proceed as if they're returning null. 21833 if (initialState === undefined && this.getInitialState._isMockFunction) { 21834 // This is probably bad practice. Consider warning here and 21835 // deprecating this convenience. 21836 initialState = null; 21837 } 21838 } 21839 !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : _prodInvariant('82', Constructor.displayName || 'ReactCompositeComponent') : void 0; 21840 21841 this.state = initialState; 21842 }); 21843 Constructor.prototype = new ReactClassComponent(); 21844 Constructor.prototype.constructor = Constructor; 21845 Constructor.prototype.__reactAutoBindPairs = []; 21846 21847 injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); 21848 21849 mixSpecIntoComponent(Constructor, spec); 21850 21851 // Initialize the defaultProps property after all mixins have been merged. 21852 if (Constructor.getDefaultProps) { 21853 Constructor.defaultProps = Constructor.getDefaultProps(); 21854 } 21855 21856 if (process.env.NODE_ENV !== 'production') { 21857 // This is a tag to indicate that the use of these method names is ok, 21858 // since it's used with createClass. If it's not, then it's likely a 21859 // mistake so we'll warn you to use the static property, property 21860 // initializer or constructor respectively. 21861 if (Constructor.getDefaultProps) { 21862 Constructor.getDefaultProps.isReactClassApproved = {}; 21863 } 21864 if (Constructor.prototype.getInitialState) { 21865 Constructor.prototype.getInitialState.isReactClassApproved = {}; 21866 } 21867 } 21868 21869 !Constructor.prototype.render ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : _prodInvariant('83') : void 0; 21870 21871 if (process.env.NODE_ENV !== 'production') { 21872 process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%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.', spec.displayName || 'A component') : void 0; 21873 process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did
21873you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0; 21874 } 21875 21876 // Reduce time spent doing lookups by setting these on the prototype. 21877 for (var methodName in ReactClassInterface) { 21878 if (!Constructor.prototype[methodName]) { 21879 Constructor.prototype[methodName] = null; 21880 } 21881 } 21882 21883 return Constructor; 21884 }, 21885 21886 injection: { 21887 injectMixin: function (mixin) { 21888 injectedMixins.push(mixin); 21889 } 21890 } 21891 21892}; 21893 21894module.exports = ReactClass; 21895/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 21896 21897/***/ }), 21898/* 179 */ 21899/***/ (function(module, exports, __webpack_require__) { 21900 21901"use strict"; 21902/* WEBPACK VAR INJECTION */(function(process) {/** 21903 * Copyright 2013-present, Facebook, Inc. 21904 * All rights reserved. 21905 * 21906 * This source code is licensed under the BSD-style license found in the 21907 * LICENSE file in the root directory of this source tree. An additional grant 21908 * of patent rights can be found in the PATENTS file in the same directory. 21909 * 21910 */ 21911 21912 21913 21914var ReactElement = __webpack_require__(15); 21915 21916/** 21917 * Create a factory that creates HTML tag elements. 21918 * 21919 * @private 21920 */ 21921var createDOMFactory = ReactElement.createFactory; 21922if (process.env.NODE_ENV !== 'production') { 21923 var ReactElementValidator = __webpack_require__(78); 21924 createDOMFactory = ReactElementValidator.createFactory; 21925} 21926 21927/** 21928 * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. 21929 * This is also accessible via `React.DOM`. 21930 * 21931 * @public 21932 */ 21933var ReactDOMFactories = { 21934 a: createDOMFactory('a'), 21935 abbr: createDOMFactory('abbr'), 21936 address: createDOMFactory('address'), 21937 area: createDOMFactory('area'), 21938 article: createDOMFactory('article'), 21939 aside: createDOMFactory('aside'), 21940 audio: createDOMFactory('audio'), 21941 b: createDOMFactory('b'), 21942 base: createDOMFactory('base'), 21943 bdi: createDOMFactory('bdi'),
21944 bdo: createDOMFactory('bdo'), 21945 big: createDOMFactory('big'), 21946 blockquote: createDOMFactory('blockquote'), 21947 body: createDOMFactory('body'), 21948 br: createDOMFactory('br'), 21949 button: createDOMFactory('button'), 21950 canvas: createDOMFactory('canvas'), 21951 caption: createDOMFactory('caption'), 21952 cite: createDOMFactory('cite'), 21953 code: createDOMFactory('code'), 21954 col: createDOMFactory('col'), 21955 colgroup: createDOMFactory('colgroup'), 21956 data: createDOMFactory('data'), 21957 datalist: createDOMFactory('datalist'), 21958 dd: createDOMFactory('dd'), 21959 del: createDOMFactory('del'), 21960 details: createDOMFactory('details'), 21961 dfn: createDOMFactory('dfn'), 21962 dialog: createDOMFactory('dialog'), 21963 div: createDOMFactory('div'), 21964 dl: createDOMFactory('dl'), 21965 dt: createDOMFactory('dt'), 21966 em: createDOMFactory('em'), 21967 embed: createDOMFactory('embed'), 21968 fieldset: createDOMFactory('fieldset'), 21969 figcaption: createDOMFactory('figcaption'), 21970 figure: createDOMFactory('figure'), 21971 footer: createDOMFactory('footer'), 21972 form: createDOMFactory('form'), 21973 h1: createDOMFactory('h1'), 21974 h2: createDOMFactory('h2'), 21975 h3: createDOMFactory('h3'), 21976 h4: createDOMFactory('h4'), 21977 h5: createDOMFactory('h5'), 21978 h6: createDOMFactory('h6'), 21979 head: createDOMFactory('head'), 21980 header: createDOMFactory('header'), 21981 hgroup: createDOMFactory('hgroup'), 21982 hr: createDOMFactory('hr'), 21983 html: createDOMFactory('html'), 21984 i: createDOMFactory('i'), 21985 iframe: createDOMFactory('iframe'), 21986 img: createDOMFactory('img'), 21987 input: createDOMFactory('input'), 21988 ins: createDOMFactory('ins'), 21989 kbd: createDOMFactory('kbd'), 21990 keygen: createDOMFactory('keygen'), 21991 label: createDOMFactory('label'), 21992 legend: createDOMFactory('legend'), 21993 li: createDOMFactory('li'), 21994 link: createDOMFactory('link'), 21995 main: createDOMFactory('main'), 21996 map: createDOMFactory('map'), 21997 mark: createDOMFactory('mark'), 21998 menu: createDOMFactory('menu'), 21999 menuitem: createDOMFactory('menuitem'), 22000 meta: createDOMFactory('meta'), 22001 meter: createDOMFactory('meter'), 22002 nav: createDOMFactory('nav'), 22003 noscript: createDOMFactory('noscript'), 22004 object: createDOMFactory('object'), 22005 ol: createDOMFactory('ol'), 22006 optgroup: createDOMFactory('optgroup'), 22007 option: createDOMFactory('option'), 22008 output: createDOMFactory('output'), 22009 p: createDOMFactory('p'), 22010 param: createDOMFactory('param'), 22011 picture: createDOMFactory('picture'), 22012 pre: createDOMFactory('pre'), 22013 progress: createDOMFactory('progress'), 22014 q: createDOMFactory('q'), 22015 rp: createDOMFactory('rp'), 22016 rt: createDOMFactory('rt'), 22017 ruby: createDOMFactory('ruby'), 22018 s: createDOMFactory('s'), 22019 samp: createDOMFactory('samp'), 22020 script: createDOMFactory('script'), 22021 section: createDOMFactory('section'), 22022 select: createDOMFactory('select'), 22023 small: createDOMFactory('small'), 22024 source: createDOMFactory('source'), 22025 span: createDOMFactory('span'), 22026 strong: createDOMFactory('strong'), 22027 style: createDOMFactory('style'), 22028 sub: createDOMFactory('sub'), 22029 summary: createDOMFactory('summary'), 22030 sup: createDOMFactory('sup'), 22031 table: createDOMFactory('table'), 22032 tbody: createDOMFactory('tbody'), 22033 td: createDOMFactory('td'), 22034 textarea: createDOMFactory('textarea'), 22035 tfoot: createDOMFactory('tfoot'), 22036 th: createDOMFactory('th'), 22037 thead: createDOMFactory('thead'), 22038 time: createDOMFactory('time'), 22039 title: createDOMFactory('title'), 22040 tr: createDOMFactory('tr'), 22041 track: createDOMFactory('track'), 22042 u: createDOMFactory('u'), 22043 ul: createDOMFactory('ul'), 22044 'var': createDOMFactory('var'), 22045 video: createDOMFactory('video'), 22046 wbr: createDOMFactory('wbr'), 22047 22048 // SVG 22049 circle: createDOMFactory('circle'), 22050 clipPath: createDOMFactory('clipPath'), 22051 defs: createDOMFactory('defs'), 22052 ellipse: createDOMFactory('ellipse'), 22053 g: createDOMFactory('g'), 22054 image: createDOMFactory('image'), 22055 line: createDOMFactory('line'), 22056 linearGradient: createDOMFactory('linearGradient'), 22057 mask: createDOMFactory('mask'), 22058 path: createDOMFactory('path'), 22059 pattern: createDOMFactory('pattern'), 22060 polygon: createDOMFactory('polygon'), 22061 polyline: createDOMFactory('polyline'), 22062 radialGradient: createDOMFactory('radialGradient'), 22063 rect: createDOMFactory('rect'), 22064 stop: createDOMFactory('stop'), 22065 svg: createDOMFactory('svg'), 22066 text: createDOMFactory('text'), 22067 tspan: createDOMFactory('tspan') 22068}; 22069 22070module.exports = ReactDOMFactories; 22071/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 22072 22073/***/ }), 22074/* 180 */ 22075/***/ (function(module, exports, __webpack_require__) { 22076 22077"use strict"; 22078/** 22079 * Copyright 2013-present, Facebook, Inc. 22080 * All rights reserved. 22081 * 22082 * This source code is licensed under the BSD-style license found in the 22083 * LICENSE file in the root directory of this source tree. An additional grant 22084 * of patent rights can be found in the PATENTS file in the same directory. 22085 * 22086 */ 22087 22088 22089 22090var _require = __webpack_require__(15), 22091 isValidElement = _require.isValidElement; 22092 22093var factory = __webpack_require__(54); 22094 22095module.exports = factory(isValidElement); 22096 22097/***/ }), 22098/* 181 */ 22099/***/ (function(module, exports, __webpack_require__) { 22100 22101"use strict"; 22102/** 22103 * Copyright 2013-present, Facebook, Inc. 22104 * All rights reserved. 22105 * 22106 * This source code is licensed under the BSD-style license found in the 22107 * LICENSE file in the root directory of this source tree. An additional grant 22108 * of patent rights can be found in the PATENTS file in the same directory. 22109 * 22110 * 22111 */ 22112 22113 22114 22115var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; 22116 22117module.exports = ReactPropTypesSecret; 22118 22119/***/ }), 22120/* 182 */ 22121/***/ (function(module, exports, __webpack_require__) { 22122 22123"use strict"; 22124/** 22125 * Copyright 2013-present, Facebook, Inc. 22126 * All rights reserved. 22127 * 22128 * This source code is licensed under the BSD-style license found in the 22129 * LICENSE file in the root directory of this source tree. An additional grant 22130 * of patent rights can be found in the PATENTS file in the same directory. 22131 * 22132 */ 22133 22134 22135 22136var _assign = __webpack_require__(4); 22137 22138var ReactComponent = __webpack_require__(49); 22139var ReactNoopUpdateQueue = __webpack_require__(50); 22140 22141var emptyObject = __webpack_require__(20); 22142 22143/** 22144 * Base class helpers for the updating state of a component. 22145 */ 22146function ReactPureComponent(props, context, updater) { 22147 // Duplicated from ReactComponent. 22148 this.props = props; 22149 this.context = context; 22150 this.refs = emptyObject; 22151 // We initialize the default updater but the real one gets injected by the 22152 // renderer. 22153 this.updater = updater || ReactNoopUpdateQueue; 22154} 22155 22156function ComponentDummy() {} 22157ComponentDummy.prototype = ReactComponent.prototype; 22158ReactPureComponent.prototype = new ComponentDummy(); 22159ReactPureComponent.prototype.constructor = ReactPureComponent; 22160// Avoid an extra prototype jump for these methods. 22161_assign(ReactPureComponent.prototype, ReactComponent.prototype); 22162ReactPureComponent.prototype.isPureReactComponent = true; 22163 22164module.exports = ReactPureComponent; 22165 22166/***/ }), 22167/* 183 */ 22168/***/ (function(module, exports, __webpack_require__) { 22169 22170"use strict"; 22171/** 22172 * Copyright 2013-present, Facebook, Inc. 22173 * All rights reserved. 22174 * 22175 * This source code is licensed under the BSD-style license found in the 22176 * LICENSE file in the root directory of this source tree. An additional grant 22177 * of patent rights can be found in the PATENTS file in the same directory. 22178 * 22179 */ 22180 22181 22182 22183module.exports = '15.5.4'; 22184 22185/***/ }), 22186/* 184 */ 22187/***/ (function(module, exports, __webpack_require__) { 22188 22189"use strict"; 22190/* WEBPACK VAR INJECTION */(function(process) {/** 22191 * Copyright 2013-present, Facebook, Inc. 22192 * All rights reserved. 22193 * 22194 * This source code is licensed under the BSD-style license found in the 22195 * LICENSE file in the root directory of this source tree. An additional grant 22196 * of patent rights can be found in the PATENTS file in the same directory. 22197 * 22198 */ 22199 22200 22201 22202var _prodInvariant = __webpack_require__(16); 22203 22204var ReactPropTypeLocationNames = __webpack_require__(79); 22205var ReactPropTypesSecret = __webpack_require__(181); 22206 22207var invariant = __webpack_require__(1); 22208var warning = __webpack_require__(2); 22209 22210var ReactComponentTreeHook; 22211 22212if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { 22213 // Temporary hack. 22214 // Inline requires don't work well with Jest: 22215 // https://github.com/facebook/react/issues/7240 22216 // Remove the inline requires when we don't need them anymore: 22217 // https://github.com/facebook/react/pull/7178 22218 ReactComponentTreeHook = __webpack_require__(7); 22219} 22220 22221var loggedTypeFailures = {}; 22222 22223/** 22224 * Assert that the values match with the type specs. 22225 * Error messages are memorized and will only be shown once. 22226 * 22227 * @param {object} typeSpecs Map of name to a ReactPropType 22228 * @param {object} values Runtime values that need to be type-checked 22229 * @param {string} location e.g. "prop", "context", "child context" 22230 * @param {string} componentName Name of the component for error messages. 22231 * @param {?object} element The React element that is being type-checked 22232 * @param {?number} debugID The React component instance that is being type-checked 22233 * @private 22234 */ 22235function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) { 22236 for (var typeSpecName in typeSpecs) { 22237 if (typeSpecs.hasOwnProperty(typeSpecName)) { 22238 var error; 22239 // Prop type validation may throw. In case they do, we don't want to 22240 // fail the render phase where it didn't fail before. So we log it. 22241 // After these have been cleaned up, we'll let them throw.
22242 try { 22243 // This is intentionally an invariant that gets caught. It's the same 22244 // behavior as without this statement except with a better message. 22245 !(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; 22246 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); 22247 } catch (ex) { 22248 error = ex; 22249 } 22250 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; 22251 if (error instanceof Error && !(error.message in loggedTypeFailures)) { 22252 // Only monitor this failure once because there tends to be a lot of the 22253 // same error. 22254 loggedTypeFailures[error.message] = true; 22255 22256 var componentStackInfo = ''; 22257 22258 if (process.env.NODE_ENV !== 'production') { 22259 if (!ReactComponentTreeHook) { 22260 ReactComponentTreeHook = __webpack_require__(7); 22261 } 22262 if (debugID !== null) { 22263 componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); 22264 } else if (element !== null) { 22265 componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); 22266 } 22267 } 22268 22269 process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0; 22270 } 22271 } 22272 } 22273} 22274 22275module.exports = checkReactTypeSpec; 22276/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 22277 22278/***/ }), 22279/* 185 */ 22280/***/ (function(module, exports, __webpack_require__) { 22281 22282"use strict"; 22283/** 22284 * Copyright 2013-present, Facebook, Inc. 22285 * All rights reserved. 22286 * 22287 * This source code is licensed under the BSD-style license found in the 22288 * LICENSE file in the root directory of this source tree. An additional grant 22289 * of patent rights can be found in the PATENTS file in the same directory. 22290 * 22291 * 22292 */ 22293 22294 22295 22296var nextDebugID = 1; 22297 22298function getNextDebugID() { 22299 return nextDebugID++; 22300} 22301 22302module.exports = getNextDebugID; 22303 22304/***/ }), 22305/* 186 */ 22306/***/ (function(module, exports, __webpack_require__) { 22307 22308"use strict"; 22309/* WEBPACK VAR INJECTION */(function(process) {/** 22310 * Copyright 2013-present, Facebook, Inc. 22311 * All rights reserved. 22312 * 22313 * This source code is licensed under the BSD-style license found in the 22314 * LICENSE file in the root directory of this source tree. An additional grant 22315 * of patent rights can be found in the PATENTS file in the same directory. 22316 * 22317 */ 22318 22319 22320var _prodInvariant = __webpack_require__(16); 22321 22322var ReactElement = __webpack_require__(15); 22323 22324var invariant = __webpack_require__(1); 22325 22326/** 22327 * Returns the first child in a collection of children and verifies that there 22328 * is only one child in the collection. 22329 * 22330 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only 22331 * 22332 * The current implementation of this function assumes that a single child gets 22333 * passed without a wrapper, but the purpose of this helper function is to 22334 * abstract away the particular structure of children. 22335 * 22336 * @param {?object} children Child collection structure. 22337 * @return {ReactElement} The first and only `ReactElement` contained in the 22338 * structure. 22339 */ 22340function onlyChild(children) { 22341 !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; 22342 return children; 22343} 22344 22345module.exports = onlyChild; 22346/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 22347 22348/***/ }), 22349/* 187 */ 22350/***/ (function(module, exports, __webpack_require__) { 22351 22352"use strict"; 22353/* WEBPACK VAR INJECTION */(function(process) {/** 22354 * Copyright 2013-present, Facebook, Inc. 22355 * All rights reserved. 22356 * 22357 * This source code is licensed under the BSD-style license found in the 22358 * LICENSE file in the root directory of this source tree. An additional grant 22359 * of patent rights can be found in the PATENTS file in the same directory. 22360 * 22361 */ 22362 22363 22364 22365var _prodInvariant = __webpack_require__(16); 22366 22367var ReactCurrentOwner = __webpack_require__(11); 22368var REACT_ELEMENT_TYPE = __webpack_require__(77); 22369 22370var getIteratorFn = __webpack_require__(80); 22371var invariant = __webpack_require__(1); 22372var KeyEscapeUtils = __webpack_require__(175); 22373var warning = __webpack_require__(2); 22374 22375var SEPARATOR = '.'; 22376var SUBSEPARATOR = ':'; 22377 22378/** 22379 * This is inlined from ReactElement since this file is shared between 22380 * isomorphic and renderers. We could extract this to a 22381 * 22382 */ 22383 22384/** 22385 * TODO: Test that a single child and an array with one item have the same key 22386 * pattern. 22387 */ 22388 22389var didWarnAboutMaps = false;
22390 22391/** 22392 * Generate a key string that identifies a component within a set. 22393 * 22394 * @param {*} component A component that could contain a manual key. 22395 * @param {number} index Index that is used if a manual key is not provided. 22396 * @return {string} 22397 */ 22398function getComponentKey(component, index) { 22399 // Do some typechecking here since we call this blindly. We want to ensure 22400 // that we don't block potential future ES APIs. 22401 if (component && typeof component === 'object' && component.key != null) { 22402 // Explicit key 22403 return KeyEscapeUtils.escape(component.key); 22404 } 22405 // Implicit key determined by the index in the set 22406 return index.toString(36); 22407} 22408 22409/** 22410 * @param {?*} children Children tree container. 22411 * @param {!string} nameSoFar Name of the key path so far. 22412 * @param {!function} callback Callback to invoke with each child found. 22413 * @param {?*} traverseContext Used to pass information throughout the traversal 22414 * process. 22415 * @return {!number} The number of children in this subtree. 22416 */ 22417function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { 22418 var type = typeof children; 22419 22420 if (type === 'undefined' || type === 'boolean') { 22421 // All of the above are perceived as null. 22422 children = null; 22423 } 22424 22425 if (children === null || type === 'string' || type === 'number' || 22426 // The following is inlined from ReactElement. This means we can optimize 22427 // some checks. React Fiber also inlines this logic for similar purposes. 22428 type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { 22429 callback(traverseContext, children, 22430 // If it's the only child, treat the name as if it was wrapped in an array 22431 // so that it's consistent if the number of children grows. 22432 nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); 22433 return 1; 22434 } 22435 22436 var child; 22437 var nextName; 22438 var subtreeCount = 0; // Count of children found in the current subtree.
22439 var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; 22440 22441 if (Array.isArray(children)) { 22442 for (var i = 0; i < children.length; i++) { 22443 child = children[i]; 22444 nextName = nextNamePrefix + getComponentKey(child, i); 22445 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); 22446 } 22447 } else { 22448 var iteratorFn = getIteratorFn(children); 22449 if (iteratorFn) { 22450 var iterator = iteratorFn.call(children); 22451 var step; 22452 if (iteratorFn !== children.entries) { 22453 var ii = 0; 22454 while (!(step = iterator.next()).done) { 22455 child = step.value; 22456 nextName = nextNamePrefix + getComponentKey(child, ii++); 22457 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); 22458 } 22459 } else { 22460 if (process.env.NODE_ENV !== 'production') { 22461 var mapsAsChildrenAddendum = ''; 22462 if (ReactCurrentOwner.current) { 22463 var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); 22464 if (mapsAsChildrenOwnerName) { 22465 mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; 22466 } 22467 } 22468 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; 22469 didWarnAboutMaps = true; 22470 } 22471 // Iterator will provide entry [k,v] tuples rather than values. 22472 while (!(step = iterator.next()).done) { 22473 var entry = step.value; 22474 if (entry) { 22475 child = entry[1]; 22476 nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); 22477 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); 22478 } 22479 } 22480 } 22481 } else if (type === 'object') { 22482 var addendum = ''; 22483 if (process.env.NODE_ENV !== 'production') { 22484 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.'; 22485 if (children._isReactElement) { 22486 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.'; 22487 } 22488 if (ReactCurrentOwner.current) { 22489 var name = ReactCurrentOwner.current.getName(); 22490 if (name) { 22491 addendum += ' Check the render method of `' + name + '`.'; 22492 } 22493 } 22494 } 22495 var childrenString = String(children); 22496 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; 22497 } 22498 } 22499 22500 return subtreeCount; 22501} 22502 22503/** 22504 * Traverses children that are typically specified as `props.children`, but 22505 * might also be specified through attributes: 22506 * 22507 * - `traverseAllChildren(this.props.children, ...)` 22508 * - `traverseAllChildren(this.props.leftPanelChildren, ...)` 22509 * 22510 * The `traverseContext` is an optional argument that is passed through the 22511 * entire traversal. It can be used to store accumulations or anything else that 22512 * the callback might find relevant. 22513 * 22514 * @param {?*} children Children tree object. 22515 * @param {!function} callback To invoke upon traversing each child. 22516 * @param {?*} traverseContext Context for traversal. 22517 * @return {!number} The number of children in this subtree. 22518 */ 22519function traverseAllChildren(children, callback, traverseContext) { 22520 if (children == null) { 22521 return 0; 22522 } 22523 22524 return traverseAllChildrenImpl(children, '', callback, traverseContext); 22525} 22526 22527module.exports = traverseAllChildren; 22528/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) 22529 22530/***/ }), 22531/* 188 */ 22532/***/ (function(module, exports, __webpack_require__) { 22533 22534// style-loader: Adds some css to the DOM by adding a <style> tag 22535 22536// load the styles
vendor: 9,551 bytes, lines 22537-22907
22537var content = __webpack_require__(86); 22538if(typeof content === 'string') content = [[module.i, content, '']]; 22539// Prepare cssTransformation 22540var transform; 22541 22542var options = {} 22543options.transform = transform 22544// add the styles to the DOM 22545var update = __webpack_require__(189)(content, options); 22546if(content.locals) module.exports = content.locals; 22547// Hot Module Replacement 22548if(false) { 22549 // When the styles change, update the <style> tags 22550 if(!content.locals) { 22551 module.hot.accept("!!../node_modules/css-loader/index.js!../node_modules/sass-loader/lib/loader.js??ref--0-2!./App.scss", function() { 22552 var newContent = require("!!../node_modules/css-loader/index.js!../node_modules/sass-loader/lib/loader.js??ref--0-2!./App.scss"); 22553 if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; 22554 update(newContent); 22555 }); 22556 } 22557 // When the module is disposed, remove the <style> tags 22558 module.hot.dispose(function() { update(); }); 22559} 22560 22561/***/ }), 22562/* 189 */ 22563/***/ (function(module, exports, __webpack_require__) { 22564 22565/* 22566 MIT License http://www.opensource.org/licenses/mit-license.php 22567 Author Tobias Koppers @sokra 22568*/ 22569 22570var stylesInDom = {}; 22571 22572var memoize = function (fn) { 22573 var memo; 22574 22575 return function () { 22576 if (typeof memo === "undefined") memo = fn.apply(this, arguments); 22577 return memo; 22578 }; 22579}; 22580 22581var isOldIE = memoize(function () { 22582 // Test for IE <= 9 as proposed by Browserhacks 22583 // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 22584 // Tests for existence of standard globals is to allow style-loader 22585 // to operate correctly into non-standard environments 22586 // @see https://github.com/webpack-contrib/style-loader/issues/177 22587 return window && document && document.all && !window.atob; 22588}); 22589 22590var getElement = (function (fn) { 22591 var memo = {}; 22592 22593 return function(selector) { 22594 if (typeof memo[selector] === "undefined") { 22595 memo[selector] = fn.call(this, selector); 22596 } 22597 22598 return memo[selector] 22599 }; 22600})(function (target) { 22601 return document.querySelector(target) 22602}); 22603 22604var singleton = null; 22605var singletonCounter = 0; 22606var stylesInsertedAtTop = []; 22607 22608var fixUrls = __webpack_require__(190); 22609 22610module.exports = function(list, options) { 22611 if (typeof DEBUG !== "undefined" && DEBUG) { 22612 if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); 22613 } 22614 22615 options = options || {}; 22616 22617 options.attrs = typeof options.attrs === "object" ? options.attrs : {}; 22618 22619 // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> 22620 // tags it will allow on a page 22621 if (!options.singleton) options.singleton = isOldIE(); 22622 22623 // By default, add <style> tags to the <head> element 22624 if (!options.insertInto) options.insertInto = "head"; 22625 22626 // By default, add <style> tags to the bottom of the target 22627 if (!options.insertAt) options.insertAt = "bottom"; 22628 22629 var styles = listToStyles(list, options); 22630 22631 addStylesToDom(styles, options); 22632 22633 return function update (newList) { 22634 var mayRemove = []; 22635 22636 for (var i = 0; i < styles.length; i++) { 22637 var item = styles[i]; 22638 var domStyle = stylesInDom[item.id]; 22639 22640 domStyle.refs--; 22641 mayRemove.push(domStyle); 22642 } 22643 22644 if(newList) { 22645 var newStyles = listToStyles(newList, options); 22646 addStylesToDom(newStyles, options); 22647 } 22648 22649 for (var i = 0; i < mayRemove.length; i++) { 22650 var domStyle = mayRemove[i]; 22651 22652 if(domStyle.refs === 0) { 22653 for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j](); 22654 22655 delete stylesInDom[domStyle.id]; 22656 } 22657 } 22658 }; 22659}; 22660 22661function addStylesToDom (styles, options) { 22662 for (var i = 0; i < styles.length; i++) { 22663 var item = styles[i]; 22664 var domStyle = stylesInDom[item.id]; 22665 22666 if(domStyle) { 22667 domStyle.refs++; 22668 22669 for(var j = 0; j < domStyle.parts.length; j++) { 22670 domStyle.parts[j](item.parts[j]); 22671 } 22672 22673 for(; j < item.parts.length; j++) { 22674 domStyle.parts.push(addStyle(item.parts[j], options)); 22675 } 22676 } else { 22677 var parts = []; 22678 22679 for(var j = 0; j < item.parts.length; j++) { 22680 parts.push(addStyle(item.parts[j], options)); 22681 } 22682 22683 stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts}; 22684 } 22685 } 22686} 22687 22688function listToStyles (list, options) { 22689 var styles = []; 22690 var newStyles = {}; 22691 22692 for (var i = 0; i < list.length; i++) { 22693 var item = list[i]; 22694 var id = options.base ? item[0] + options.base : item[0]; 22695 var css = item[1]; 22696 var media = item[2]; 22697 var sourceMap = item[3]; 22698 var part = {css: css, media: media, sourceMap: sourceMap}; 22699 22700 if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]}); 22701 else newStyles[id].parts.push(part); 22702 } 22703 22704 return styles; 22705} 22706 22707function insertStyleElement (options, style) { 22708 var target = getElement(options.insertInto) 22709 22710 if (!target) { 22711 throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid."); 22712 } 22713 22714 var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1]; 22715 22716 if (options.insertAt === "top") { 22717 if (!lastStyleElementInsertedAtTop) { 22718 target.insertBefore(style, target.firstChild); 22719 } else if (lastStyleElementInsertedAtTop.nextSibling) { 22720 target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling); 22721 } else { 22722 target.appendChild(style); 22723 } 22724 stylesInsertedAtTop.push(style); 22725 } else if (options.insertAt === "bottom") { 22726 target.appendChild(style); 22727 } else { 22728 throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'."); 22729 } 22730} 22731 22732function removeStyleElement (style) { 22733 if (style.parentNode === null) return false; 22734 style.parentNode.removeChild(style); 22735 22736 var idx = stylesInsertedAtTop.indexOf(style); 22737 if(idx >= 0) { 22738 stylesInsertedAtTop.splice(idx, 1); 22739 } 22740} 22741 22742function createStyleElement (options) { 22743 var style = document.createElement("style"); 22744 22745 options.attrs.type = "text/css"; 22746 22747 addAttrs(style, options.attrs); 22748 insertStyleElement(options, style); 22749 22750 return style; 22751} 22752 22753function createLinkElement (options) { 22754 var link = document.createElement("link"); 22755 22756 options.attrs.type = "text/css"; 22757 options.attrs.rel = "stylesheet"; 22758 22759 addAttrs(link, options.attrs); 22760 insertStyleElement(options, link); 22761 22762 return link; 22763} 22764 22765function addAttrs (el, attrs) { 22766 Object.keys(attrs).forEach(function (key) { 22767 el.setAttribute(key, attrs[key]); 22768 }); 22769} 22770 22771function addStyle (obj, options) { 22772 var style, update, remove, result; 22773 22774 // If a transform function was defined, run it on the css 22775 if (options.transform && obj.css) { 22776 result = options.transform(obj.css); 22777 22778 if (result) { 22779 // If transform returns a value, use that instead of the original css. 22780 // This allows running runtime transformations on the css. 22781 obj.css = result; 22782 } else { 22783 // If the transform function returns a falsy value, don't add this css. 22784 // This allows conditional loading of css 22785 return function() { 22786 // noop 22787 }; 22788 } 22789 } 22790 22791 if (options.singleton) { 22792 var styleIndex = singletonCounter++; 22793 22794 style = singleton || (singleton = createStyleElement(options)); 22795 22796 update = applyToSingletonTag.bind(null, style, styleIndex, false); 22797 remove = applyToSingletonTag.bind(null, style, styleIndex, true); 22798 22799 } else if ( 22800 obj.sourceMap && 22801 typeof URL === "function" && 22802 typeof URL.createObjectURL === "function" && 22803 typeof URL.revokeObjectURL === "function" && 22804 typeof Blob === "function" && 22805 typeof btoa === "function" 22806 ) { 22807 style = createLinkElement(options); 22808 update = updateLink.bind(null, style, options); 22809 remove = function () { 22810 removeStyleElement(style); 22811 22812 if(style.href) URL.revokeObjectURL(style.href); 22813 }; 22814 } else { 22815 style = createStyleElement(options); 22816 update = applyToTag.bind(null, style); 22817 remove = function () { 22818 removeStyleElement(style); 22819 }; 22820 } 22821 22822 update(obj); 22823 22824 return function updateStyle (newObj) { 22825 if (newObj) { 22826 if ( 22827 newObj.css === obj.css && 22828 newObj.media === obj.media && 22829 newObj.sourceMap === obj.sourceMap 22830 ) { 22831 return; 22832 } 22833 22834 update(obj = newObj); 22835 } else { 22836 remove(); 22837 } 22838 }; 22839} 22840 22841var replaceText = (function () { 22842 var textStore = []; 22843 22844 return function (index, replacement) { 22845 textStore[index] = replacement; 22846 22847 return textStore.filter(Boolean).join('\n'); 22848 }; 22849})(); 22850 22851function applyToSingletonTag (style, index, remove, obj) { 22852 var css = remove ? "" : obj.css; 22853 22854 if (style.styleSheet) { 22855 style.styleSheet.cssText = replaceText(index, css); 22856 } else { 22857 var cssNode = document.createTextNode(css); 22858 var childNodes = style.childNodes; 22859 22860 if (childNodes[index]) style.removeChild(childNodes[index]); 22861 22862 if (childNodes.length) { 22863 style.insertBefore(cssNode, childNodes[index]); 22864 } else { 22865 style.appendChild(cssNode); 22866 } 22867 } 22868} 22869 22870function applyToTag (style, obj) { 22871 var css = obj.css; 22872 var media = obj.media; 22873 22874 if(media) { 22875 style.setAttribute("media", media) 22876 } 22877 22878 if(style.styleSheet) { 22879 style.styleSheet.cssText = css; 22880 } else { 22881 while(style.firstChild) { 22882 style.removeChild(style.firstChild); 22883 } 22884 22885 style.appendChild(document.createTextNode(css)); 22886 } 22887} 22888 22889function updateLink (link, options, obj) { 22890 var css = obj.css; 22891 var sourceMap = obj.sourceMap; 22892 22893 /* 22894 If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled 22895 and there is no publicPath defined then lets turn convertToAbsoluteUrls 22896 on by default. Otherwise default to the convertToAbsoluteUrls option 22897 directly 22898 */ 22899 var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap; 22900 22901 if (options.convertToAbsoluteUrls || autoFixUrls) { 22902 css = fixUrls(css); 22903 } 22904 22905 if (sourceMap) { 22906 // http://stackoverflow.com/a/26603875 22907 css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)
22907))) + " */"; 22908 } 22909 22910 var blob = new Blob([css], { type: "text/css" }); 22911 22912 var oldSrc = link.href; 22913 22914 link.href = URL.createObjectURL(blob); 22915 22916 if(oldSrc) URL.revokeObjectURL(oldSrc); 22917} 22918 22919 22920/***/ }), 22921/* 190 */ 22922/***/ (function(module, exports) { 22923 22924 22925/** 22926 * When source maps are enabled, `style-loader` uses a link element with a data-uri to 22927 * embed the css on the page. This breaks all relative urls because now they are relative to a 22928 * bundle instead of the current page. 22929 * 22930 * One solution is to only use full urls, but that may be impossible. 22931 * 22932 * Instead, this function "fixes" the relative urls to be absolute according to the current page location. 22933 * 22934 * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command. 22935 * 22936 */ 22937 22938module.exports = function (css) { 22939 // get current location 22940 var location = typeof window !== "undefined" && window.location; 22941 22942 if (!location) { 22943 throw new Error("fixUrls requires window.location"); 22944 } 22945 22946 // blank or null? 22947 if (!css || typeof css !== "string") { 22948 return css; 22949 } 22950 22951 var baseUrl = location.protocol + "//" + location.host; 22952 var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/"); 22953 22954 // convert each url(...) 22955 /* 22956 This regular expression is just a way to recursively match brackets within 22957 a string. 22958 22959 /url\s*\( = Match on the word "url" with any whitespace after it and then a parens 22960 ( = Start a capturing group 22961 (?: = Start a non-capturing group 22962 [^)(] = Match anything that isn't a parentheses 22963 | = OR 22964 \( = Match a start parentheses 22965 (?: = Start another non-capturing groups 22966 [^)(]+ = Match anything that isn't a parentheses 22967 | = OR 22968 \( = Match a start parentheses 22969 [^)(]* = Match anything that isn't a parentheses 22970 \) = Match a end parentheses 22971 ) = End Group 22972 *\) = Match anything and then a close parens 22973 ) = Close non-capturing group 22974 * = Match anything 22975 ) = Close capturing group 22976 \) = Match a close parens 22977 22978 /gi = Get all matches, not the first. Be case insensitive. 22979 */ 22980 var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) { 22981 // strip quotes (if they exist) 22982 var unquotedOrigUrl = origUrl 22983 .trim() 22984 .replace(/^"(.*)"$/, function(o, $1){ return $1; }) 22985 .replace(/^'(.*)'$/, function(o, $1){ return $1; }); 22986 22987 // already a full url? no change 22988 if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(unquotedOrigUrl)) { 22989 return fullMatch; 22990 } 22991 22992 // convert the url to a full url 22993 var newUrl; 22994 22995 if (unquotedOrigUrl.indexOf("//") === 0) { 22996 //TODO: should we add protocol? 22997 newUrl = unquotedOrigUrl; 22998 } else if (unquotedOrigUrl.indexOf("/") === 0) { 22999 // path should be relative to the base url 23000 newUrl = baseUrl + unquotedOrigUrl; // already starts with '/' 23001 } else { 23002 // path should be relative to current directory 23003 newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './' 23004 } 23005 23006 // send back the fixed url(...) 23007 return "url(" + JSON.stringify(newUrl) + ")"; 23008 }); 23009 23010 // send back the fixed css 23011 return fixedCss; 23012}; 23013 23014 23015/***/ }), 23016/* 191 */ 23017/***/ (function(module, exports) { 23018 23019(function(self) { 23020 'use strict'; 23021 23022 if (self.fetch) { 23023 return 23024 } 23025 23026 var support = { 23027 searchParams: 'URLSearchParams' in self, 23028 iterable: 'Symbol' in self && 'iterator' in Symbol, 23029 blob: 'FileReader' in self && 'Blob' in self && (function() { 23030 try { 23031 new Blob() 23032 return true 23033 } catch(e) { 23034 return false 23035 } 23036 })(), 23037 formData: 'FormData' in self, 23038 arrayBuffer: 'ArrayBuffer' in self 23039 } 23040 23041 if (support.arrayBuffer) { 23042 var viewClasses = [ 23043 '[object Int8Array]', 23044 '[object Uint8Array]', 23045 '[object Uint8ClampedArray]', 23046 '[object Int16Array]', 23047 '[object Uint16Array]', 23048 '[object Int32Array]', 23049 '[object Uint32Array]', 23050 '[object Float32Array]', 23051 '[object Float64Array]' 23052 ] 23053 23054 var isDataView = function(obj) { 23055 return obj && DataView.prototype.isPrototypeOf(obj) 23056 } 23057 23058 var isArrayBufferView = ArrayBuffer.isView || function(obj) { 23059 return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1 23060 } 23061 } 23062 23063 function normalizeName(name) { 23064 if (typeof name !== 'string') { 23065 name = String(name) 23066 } 23067 if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) { 23068 throw new TypeError('Invalid character in header field name') 23069 } 23070 return name.toLowerCase() 23071 } 23072 23073 function normalizeValue(value) { 23074 if (typeof value !== 'string') {
vendor: 11,034 bytes, lines 23075-23470
23075 value = String(value) 23076 } 23077 return value 23078 } 23079 23080 // Build a destructive iterator for the value list 23081 function iteratorFor(items) { 23082 var iterator = { 23083 next: function() { 23084 var value = items.shift() 23085 return {done: value === undefined, value: value} 23086 } 23087 } 23088 23089 if (support.iterable) { 23090 iterator[Symbol.iterator] = function() { 23091 return iterator 23092 } 23093 } 23094 23095 return iterator 23096 } 23097 23098 function Headers(headers) { 23099 this.map = {} 23100 23101 if (headers instanceof Headers) { 23102 headers.forEach(function(value, name) { 23103 this.append(name, value) 23104 }, this) 23105 } else if (Array.isArray(headers)) { 23106 headers.forEach(function(header) { 23107 this.append(header[0], header[1]) 23108 }, this) 23109 } else if (headers) { 23110 Object.getOwnPropertyNames(headers).forEach(function(name) { 23111 this.append(name, headers[name]) 23112 }, this) 23113 } 23114 } 23115 23116 Headers.prototype.append = function(name, value) { 23117 name = normalizeName(name) 23118 value = normalizeValue(value) 23119 var oldValue = this.map[name] 23120 this.map[name] = oldValue ? oldValue+','+value : value 23121 } 23122 23123 Headers.prototype['delete'] = function(name) { 23124 delete this.map[normalizeName(name)] 23125 } 23126 23127 Headers.prototype.get = function(name) { 23128 name = normalizeName(name) 23129 return this.has(name) ? this.map[name] : null 23130 } 23131 23132 Headers.prototype.has = function(name) { 23133 return this.map.hasOwnProperty(normalizeName(name)) 23134 } 23135 23136 Headers.prototype.set = function(name, value) { 23137 this.map[normalizeName(name)] = normalizeValue(value) 23138 } 23139 23140 Headers.prototype.forEach = function(callback, thisArg) { 23141 for (var name in this.map) { 23142 if (this.map.hasOwnProperty(name)) { 23143 callback.call(thisArg, this.map[name], name, this) 23144 } 23145 } 23146 } 23147 23148 Headers.prototype.keys = function() { 23149 var items = [] 23150 this.forEach(function(value, name) { items.push(name) }) 23151 return iteratorFor(items) 23152 } 23153 23154 Headers.prototype.values = function() { 23155 var items = [] 23156 this.forEach(function(value) { items.push(value) }) 23157 return iteratorFor(items) 23158 } 23159 23160 Headers.prototype.entries = function() { 23161 var items = [] 23162 this.forEach(function(value, name) { items.push([name, value]) }) 23163 return iteratorFor(items) 23164 } 23165 23166 if (support.iterable) { 23167 Headers.prototype[Symbol.iterator] = Headers.prototype.entries 23168 } 23169 23170 function consumed(body) { 23171 if (body.bodyUsed) { 23172 return Promise.reject(new TypeError('Already read')) 23173 } 23174 body.bodyUsed = true 23175 } 23176 23177 function fileReaderReady(reader) { 23178 return new Promise(function(resolve, reject) { 23179 reader.onload = function() { 23180 resolve(reader.result) 23181 } 23182 reader.onerror = function() { 23183 reject(reader.error) 23184 } 23185 }) 23186 } 23187 23188 function readBlobAsArrayBuffer(blob) { 23189 var reader = new FileReader() 23190 var promise = fileReaderReady(reader) 23191 reader.readAsArrayBuffer(blob) 23192 return promise 23193 } 23194 23195 function readBlobAsText(blob) { 23196 var reader = new FileReader() 23197 var promise = fileReaderReady(reader) 23198 reader.readAsText(blob) 23199 return promise 23200 } 23201 23202 function readArrayBufferAsText(buf) { 23203 var view = new Uint8Array(buf) 23204 var chars = new Array(view.length) 23205 23206 for (var i = 0; i < view.length; i++) { 23207 chars[i] = String.fromCharCode(view[i]) 23208 } 23209 return chars.join('') 23210 } 23211 23212 function bufferClone(buf) { 23213 if (buf.slice) { 23214 return buf.slice(0) 23215 } else { 23216 var view = new Uint8Array(buf.byteLength) 23217 view.set(new Uint8Array(buf)) 23218 return view.buffer 23219 } 23220 } 23221 23222 function Body() { 23223 this.bodyUsed = false 23224 23225 this._initBody = function(body) { 23226 this._bodyInit = body 23227 if (!body) { 23228 this._bodyText = '' 23229 } else if (typeof body === 'string') { 23230 this._bodyText = body 23231 } else if (support.blob && Blob.prototype.isPrototypeOf(body)) { 23232 this._bodyBlob = body 23233 } else if (support.formData && FormData.prototype.isPrototypeOf(body)) { 23234 this._bodyFormData = body 23235 } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { 23236 this._bodyText = body.toString() 23237 } else if (support.arrayBuffer && support.blob && isDataView(body)) { 23238 this._bodyArrayBuffer = bufferClone(body.buffer) 23239 // IE 10-11 can't handle a DataView body. 23240 this._bodyInit = new Blob([this._bodyArrayBuffer]) 23241 } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) { 23242 this._bodyArrayBuffer = bufferClone(body) 23243 } else { 23244 throw new Error('unsupported BodyInit type') 23245 } 23246 23247 if (!this.headers.get('content-type')) { 23248 if (typeof body === 'string') { 23249 this.headers.set('content-type', 'text/plain;charset=UTF-8') 23250 } else if (this._bodyBlob && this._bodyBlob.type) { 23251 this.headers.set('content-type', this._bodyBlob.type) 23252 } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { 23253 this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8') 23254 } 23255 } 23256 } 23257 23258 if (support.blob) { 23259 this.blob = function() { 23260 var rejected = consumed(this) 23261 if (rejected) { 23262 return rejected 23263 } 23264 23265 if (this._bodyBlob) { 23266 return Promise.resolve(this._bodyBlob) 23267 } else if (this._bodyArrayBuffer) { 23268 return Promise.resolve(new Blob([this._bodyArrayBuffer])) 23269 } else if (this._bodyFormData) { 23270 throw new Error('could not read FormData body as blob') 23271 } else { 23272 return Promise.resolve(new Blob([this._bodyText])) 23273 } 23274 } 23275 23276 this.arrayBuffer = function() { 23277 if (this._bodyArrayBuffer) { 23278 return consumed(this) || Promise.resolve(this._bodyArrayBuffer) 23279 } else { 23280 return this.blob().then(readBlobAsArrayBuffer) 23281 } 23282 } 23283 } 23284 23285 this.text = function() { 23286 var rejected = consumed(this) 23287 if (rejected) { 23288 return rejected 23289 } 23290 23291 if (this._bodyBlob) { 23292 return readBlobAsText(this._bodyBlob) 23293 } else if (this._bodyArrayBuffer) { 23294 return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer)) 23295 } else if (this._bodyFormData) { 23296 throw new Error('could not read FormData body as text') 23297 } else { 23298 return Promise.resolve(this._bodyText) 23299 } 23300 } 23301 23302 if (support.formData) { 23303 this.formData = function() { 23304 return this.text().then(decode) 23305 } 23306 } 23307 23308 this.json = function() { 23309 return this.text().then(JSON.parse) 23310 } 23311 23312 return this 23313 } 23314 23315 // HTTP methods whose capitalization should be normalized 23316 var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'] 23317 23318 function normalizeMethod(method) { 23319 var upcased = method.toUpperCase() 23320 return (methods.indexOf(upcased) > -1) ? upcased : method 23321 } 23322 23323 function Request(input, options) { 23324 options = options || {} 23325 var body = options.body 23326 23327 if (input instanceof Request) { 23328 if (input.bodyUsed) { 23329 throw new TypeError('Already read') 23330 } 23331 this.url = input.url 23332 this.credentials = input.credentials 23333 if (!options.headers) { 23334 this.headers = new Headers(input.headers) 23335 } 23336 this.method = input.method 23337 this.mode = input.mode 23338 if (!body && input._bodyInit != null) { 23339 body = input._bodyInit 23340 input.bodyUsed = true 23341 } 23342 } else { 23343 this.url = String(input) 23344 } 23345 23346 this.credentials = options.credentials || this.credentials || 'omit' 23347 if (options.headers || !this.headers) { 23348 this.headers = new Headers(options.headers) 23349 } 23350 this.method = normalizeMethod(options.method || this.method || 'GET') 23351 this.mode = options.mode || this.mode || null 23352 this.referrer = null 23353 23354 if ((this.method === 'GET' || this.method === 'HEAD') && body) { 23355 throw new TypeError('Body not allowed for GET or HEAD requests') 23356 } 23357 this._initBody(body) 23358 } 23359 23360 Request.prototype.clone = function() { 23361 return new Request(this, { body: this._bodyInit }) 23362 } 23363 23364 function decode(body) { 23365 var form = new FormData() 23366 body.trim().split('&').forEach(function(bytes) { 23367 if (bytes) { 23368 var split = bytes.split('=') 23369 var name = split.shift().replace(/\+/g, ' ') 23370 var value = split.join('=').replace(/\+/g, ' ') 23371 form.append(decodeURIComponent(name), decodeURIComponent(value)) 23372 } 23373 }) 23374 return form 23375 } 23376 23377 function parseHeaders(rawHeaders) { 23378 var headers = new Headers() 23379 rawHeaders.split(/\r?\n/).forEach(function(line) { 23380 var parts = line.split(':') 23381 var key = parts.shift().trim() 23382 if (key) { 23383 var value = parts.join(':').trim() 23384 headers.append(key, value) 23385 } 23386 }) 23387 return headers 23388 } 23389 23390 Body.call(Request.prototype) 23391 23392 function Response(bodyInit, options) { 23393 if (!options) { 23394 options = {} 23395 } 23396 23397 this.type = 'default' 23398 this.status = 'status' in options ? options.status : 200 23399 this.ok = this.status >= 200 && this.status < 300 23400 this.statusText = 'statusText' in options ? options.statusText : 'OK' 23401 this.headers = new Headers(options.headers) 23402 this.url = options.url || '' 23403 this._initBody(bodyInit) 23404 } 23405 23406 Body.call(Response.prototype) 23407 23408 Response.prototype.clone = function() { 23409 return new Response(this._bodyInit, { 23410 status: this.status, 23411 statusText: this.statusText, 23412 headers: new Headers(this.headers), 23413 url: this.url 23414 }) 23415 } 23416 23417 Response.error = function() { 23418 var response = new Response(null, {status: 0, statusText: ''}) 23419 response.type = 'error' 23420 return response 23421 } 23422 23423 var redirectStatuses = [301, 302, 303, 307, 308] 23424 23425 Response.redirect = function(url, status) { 23426 if (redirectStatuses.indexOf(status) === -1) { 23427 throw new RangeError('Invalid status code') 23428 } 23429 23430 return new Response(null, {status: status, headers: {location: url}}) 23431 } 23432 23433 self.Headers = Headers 23434 self.Request = Request 23435 self.Response = Response 23436 23437 self.fetch = function(input, init) { 23438 return new Promise(function(resolve, reject) { 23439 var request = new Request(input, init) 23440 var xhr = new XMLHttpRequest() 23441 23442 xhr.onload = function() { 23443 var options = { 23444 status: xhr.status, 23445 statusText: xhr.statusText, 23446 headers: parseHeaders(xhr.getAllResponseHeaders() || '') 23447 } 23448 options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL') 23449 var body = 'response' in xhr ? xhr.response : xhr.responseText 23450 resolve(new Response(body, options)) 23451 } 23452 23453 xhr.onerror = function() { 23454 reject(new TypeError('Network request failed')) 23455 } 23456 23457 xhr.ontimeout = function() { 23458 reject(new TypeError('Network request failed')) 23459 } 23460 23461 xhr.open(request.method, request.url, true) 23462 23463 if (request.credentials === 'include') { 23464 xhr.withCredentials = true 23465 } 23466 23467 if ('responseType' in xhr && support.blob) { 23468 xhr.responseType = 'blob' 23469 } 23470
23471 request.headers.forEach(function(value, name) { 23472 xhr.setRequestHeader(name, value) 23473 }) 23474 23475 xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit) 23476 }) 23477 } 23478 self.fetch.polyfill = true 23479})(typeof self !== 'undefined' ? self : this); 23480 23481 23482/***/ }) 23483/******/ ]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.