diff --git a/bundle.js b/bundle.js index c966c70..b2ac4d7 100644 --- a/bundle.js +++ b/bundle.js @@ -44,24 +44,23 @@ /* 0 */ /***/ function(module, exports, __webpack_require__) { - 'use strict'; - var React = __webpack_require__(1), Slider = __webpack_require__(157); - var App = React.createClass({ - displayName: 'App', + var App = React.createClass({displayName: "App", - getInitialState: function getInitialState() { + getInitialState: function() { return { value: 5, - max: 10 + min: 1, + max : 10, + step: 2 }; }, - increment: function increment(event) { + increment: function(event) { var value = this.state.value; - if (value >= this.state.max) { + if(value >= this.state.max) { value = this.state.max - 1; } this.setState({ @@ -69,22 +68,22 @@ }); }, - didChange: function didChange(event) { + didChange: function(event) { var value = event.value || event; this.setState({ value: value }); }, - render: function render() { - return React.createElement( - 'div', - null, - React.createElement(Slider, { min: 0, max: this.state.max, step: 1, value: this.state.value, toolTip: false, onSlide: this.didChange }), - React.createElement( - 'button', - { onClick: this.increment }, - 'Increment' + render: function() { + return ( + React.createElement("div", null, + React.createElement(Slider, {onSlide: this.didChange, + min: this.state.min, + max: this.state.max, + step: this.state.step, + value: this.state.value}), + React.createElement("button", {onClick: this.increment}, "Increment") ) ); } @@ -92,14 +91,14 @@ React.render(React.createElement(App, null), document.body); + /***/ }, /* 1 */ /***/ function(module, exports, __webpack_require__) { - 'use strict'; - module.exports = __webpack_require__(2); + /***/ }, /* 2 */ /***/ function(module, exports, __webpack_require__) { @@ -165,14 +164,14 @@ Component: ReactComponent, DOM: ReactDOM, PropTypes: ReactPropTypes, - initializeTouchEvents: function initializeTouchEvents(shouldUseTouch) { + initializeTouchEvents: function(shouldUseTouch) { EventPluginUtils.useTouchEvents = shouldUseTouch; }, createClass: ReactClass.createClass, createElement: createElement, cloneElement: cloneElement, createFactory: createFactory, - createMixin: function createMixin(mixin) { + createMixin: function(mixin) { // Currently a noop. Will be used to validate and trace mixins. return mixin; }, @@ -192,7 +191,9 @@ // Inject the runtime into a devtools global hook regardless of browser. // Allows for debugging when the hook is injected on the page. - if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { + if ( + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ CurrentOwner: ReactCurrentOwner, InstanceHandles: ReactInstanceHandles, @@ -210,20 +211,37 @@ // link if not installed. if (navigator.userAgent.indexOf('Chrome') > -1) { if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { - console.debug('Download the React DevTools for a better development experience: ' + 'https://fb.me/react-devtools'); + console.debug( + 'Download the React DevTools for a better development experience: ' + + 'https://fb.me/react-devtools' + ); } } var expectedFeatures = [ - // shims - Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.split, String.prototype.trim, - - // shams - Object.create, Object.freeze]; + // shims + Array.isArray, + Array.prototype.every, + Array.prototype.forEach, + Array.prototype.indexOf, + Array.prototype.map, + Date.now, + Function.prototype.bind, + Object.keys, + String.prototype.split, + String.prototype.trim, + + // shams + Object.create, + Object.freeze + ]; for (var i = 0; i < expectedFeatures.length; i++) { if (!expectedFeatures[i]) { - console.error('One or more ES5 shim/shams expected by React are not available: ' + 'https://fb.me/react-warning-polyfills'); + console.error( + 'One or more ES5 shim/shams expected by React are not available: ' + + 'https://fb.me/react-warning-polyfills' + ); break; } } @@ -233,6 +251,7 @@ React.version = '0.13.3'; module.exports = React; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -240,16 +259,83 @@ /***/ function(module, exports) { // shim for using process in browser + var process = module.exports = {}; - 'use strict'; + // cached from whatever global is present so that test runners that stub it + // don't break things. But we need to wrap it in a try catch in case it is + // wrapped in strict mode code which doesn't define any globals. It's inside a + // function because try/catches deoptimize in certain engines. - var process = module.exports = {}; + var cachedSetTimeout; + var cachedClearTimeout; + + (function () { + try { + cachedSetTimeout = setTimeout; + } catch (e) { + cachedSetTimeout = function () { + throw new Error('setTimeout is not defined'); + } + } + try { + cachedClearTimeout = clearTimeout; + } catch (e) { + cachedClearTimeout = function () { + throw new Error('clearTimeout is not defined'); + } + } + } ()) + function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // 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 + return cachedSetTimeout.call(this, fun, 0); + } + } + + + } + function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // 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. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + + } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); @@ -265,11 +351,11 @@ if (draining) { return; } - var timeout = setTimeout(cleanUpNextTick); + var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; - while (len) { + while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { @@ -282,7 +368,7 @@ } currentQueue = null; draining = false; - clearTimeout(timeout); + runClearTimeout(timeout); } process.nextTick = function (fun) { @@ -294,7 +380,7 @@ } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { - setTimeout(drainQueue, 0); + runTimeout(drainQueue); } }; @@ -327,15 +413,12 @@ throw new Error('process.binding is not supported'); }; - process.cwd = function () { - return '/'; - }; + process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; - process.umask = function () { - return 0; - }; + process.umask = function() { return 0; }; + /***/ }, /* 4 */ @@ -368,10 +451,14 @@ */ var injection = { Mount: null, - injectMount: function injectMount(InjectedMount) { + injectMount: function(InjectedMount) { injection.Mount = InjectedMount; if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? invariant(InjectedMount && InjectedMount.getNode, 'EventPluginUtils.injection.injectMount(...): Injected Mount module ' + 'is missing getNode.') : invariant(InjectedMount && InjectedMount.getNode); + ("production" !== process.env.NODE_ENV ? invariant( + InjectedMount && InjectedMount.getNode, + 'EventPluginUtils.injection.injectMount(...): Injected Mount module ' + + 'is missing getNode.' + ) : invariant(InjectedMount && InjectedMount.getNode)); } } }; @@ -379,28 +466,38 @@ var topLevelTypes = EventConstants.topLevelTypes; function isEndish(topLevelType) { - return topLevelType === topLevelTypes.topMouseUp || topLevelType === topLevelTypes.topTouchEnd || topLevelType === topLevelTypes.topTouchCancel; + return topLevelType === topLevelTypes.topMouseUp || + topLevelType === topLevelTypes.topTouchEnd || + topLevelType === topLevelTypes.topTouchCancel; } function isMoveish(topLevelType) { - return topLevelType === topLevelTypes.topMouseMove || topLevelType === topLevelTypes.topTouchMove; + return topLevelType === topLevelTypes.topMouseMove || + topLevelType === topLevelTypes.topTouchMove; } function isStartish(topLevelType) { - return topLevelType === topLevelTypes.topMouseDown || topLevelType === topLevelTypes.topTouchStart; + return topLevelType === topLevelTypes.topMouseDown || + topLevelType === topLevelTypes.topTouchStart; } + var validateEventDispatches; if ("production" !== process.env.NODE_ENV) { - validateEventDispatches = function (event) { + validateEventDispatches = function(event) { var dispatchListeners = event._dispatchListeners; var dispatchIDs = event._dispatchIDs; var listenersIsArr = Array.isArray(dispatchListeners); var idsIsArr = Array.isArray(dispatchIDs); var IDsLen = idsIsArr ? dispatchIDs.length : dispatchIDs ? 1 : 0; - var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0; - - "production" !== process.env.NODE_ENV ? invariant(idsIsArr === listenersIsArr && IDsLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : invariant(idsIsArr === listenersIsArr && IDsLen === listenersLen); + var listenersLen = listenersIsArr ? + dispatchListeners.length : + dispatchListeners ? 1 : 0; + + ("production" !== process.env.NODE_ENV ? invariant( + idsIsArr === listenersIsArr && IDsLen === listenersLen, + 'EventPluginUtils: Invalid `event`.' + ) : invariant(idsIsArr === listenersIsArr && IDsLen === listenersLen)); }; } @@ -506,8 +603,13 @@ } var dispatchListener = event._dispatchListeners; var dispatchID = event._dispatchIDs; - "production" !== process.env.NODE_ENV ? invariant(!Array.isArray(dispatchListener), 'executeDirectDispatch(...): Invalid `event`.') : invariant(!Array.isArray(dispatchListener)); - var res = dispatchListener ? dispatchListener(event, dispatchID) : null; + ("production" !== process.env.NODE_ENV ? invariant( + !Array.isArray(dispatchListener), + 'executeDirectDispatch(...): Invalid `event`.' + ) : invariant(!Array.isArray(dispatchListener))); + var res = dispatchListener ? + dispatchListener(event, dispatchID) : + null; event._dispatchListeners = null; event._dispatchIDs = null; return res; @@ -539,6 +641,7 @@ }; module.exports = EventPluginUtils; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -560,7 +663,7 @@ var keyMirror = __webpack_require__(6); - var PropagationPhases = keyMirror({ bubbled: null, captured: null }); + var PropagationPhases = keyMirror({bubbled: null, captured: null}); /** * Types of raw signals from the browser caught at the top level. @@ -616,6 +719,7 @@ module.exports = EventConstants; + /***/ }, /* 6 */ /***/ function(module, exports, __webpack_require__) { @@ -654,10 +758,13 @@ * @param {object} obj * @return {object} */ - var keyMirror = function keyMirror(obj) { + var keyMirror = function(obj) { var ret = {}; var key; - "production" !== process.env.NODE_ENV ? invariant(obj instanceof Object && !Array.isArray(obj), 'keyMirror(...): Argument must be an object.') : invariant(obj instanceof Object && !Array.isArray(obj)); + ("production" !== process.env.NODE_ENV ? invariant( + obj instanceof Object && !Array.isArray(obj), + 'keyMirror(...): Argument must be an object.' + ) : invariant(obj instanceof Object && !Array.isArray(obj))); for (key in obj) { if (!obj.hasOwnProperty(key)) { continue; @@ -668,6 +775,7 @@ }; module.exports = keyMirror; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -698,7 +806,7 @@ * will remain to ensure logic does not differ in production. */ - var invariant = function invariant(condition, format, a, b, c, d, e, f) { + var invariant = function(condition, format, a, b, c, d, e, f) { if ("production" !== process.env.NODE_ENV) { if (format === undefined) { throw new Error('invariant requires an error message argument'); @@ -708,13 +816,17 @@ if (!condition) { var error; if (format === undefined) { - error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; - error = new Error('Invariant Violation: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - })); + error = new Error( + 'Invariant Violation: ' + + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); } error.framesToPop = 1; // we don't care about invariant's own frame @@ -723,6 +835,7 @@ }; module.exports = invariant; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -767,7 +880,8 @@ function forEachSingleChild(traverseContext, child, name, i) { var forEachBookKeeping = traverseContext; - forEachBookKeeping.forEachFunction.call(forEachBookKeeping.forEachContext, child, i); + forEachBookKeeping.forEachFunction.call( + forEachBookKeeping.forEachContext, child, i); } /** @@ -785,7 +899,8 @@ return children; } - var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext); + var traverseContext = + ForEachBookKeeping.getPooled(forEachFunc, forEachContext); traverseAllChildren(children, forEachSingleChild, traverseContext); ForEachBookKeeping.release(traverseContext); } @@ -812,11 +927,18 @@ var keyUnique = !mapResult.hasOwnProperty(name); if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? warning(keyUnique, 'ReactChildren.map(...): 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.', name) : null; + ("production" !== process.env.NODE_ENV ? warning( + keyUnique, + 'ReactChildren.map(...): 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.', + name + ) : null); } if (keyUnique) { - var mappedChild = mapBookKeeping.mapFunction.call(mapBookKeeping.mapContext, child, i); + var mappedChild = + mapBookKeeping.mapFunction.call(mapBookKeeping.mapContext, child, i); mapResult[name] = mappedChild; } } @@ -869,6 +991,7 @@ }; module.exports = ReactChildren; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -897,7 +1020,7 @@ * the Class itself, not an instance. If any others are needed, simply add them * here, or in their own files. */ - var oneArgumentPooler = function oneArgumentPooler(copyFieldsFrom) { + var oneArgumentPooler = function(copyFieldsFrom) { var Klass = this; if (Klass.instancePool.length) { var instance = Klass.instancePool.pop(); @@ -908,7 +1031,7 @@ } }; - var twoArgumentPooler = function twoArgumentPooler(a1, a2) { + var twoArgumentPooler = function(a1, a2) { var Klass = this; if (Klass.instancePool.length) { var instance = Klass.instancePool.pop(); @@ -919,7 +1042,7 @@ } }; - var threeArgumentPooler = function threeArgumentPooler(a1, a2, a3) { + var threeArgumentPooler = function(a1, a2, a3) { var Klass = this; if (Klass.instancePool.length) { var instance = Klass.instancePool.pop(); @@ -930,7 +1053,7 @@ } }; - var fiveArgumentPooler = function fiveArgumentPooler(a1, a2, a3, a4, a5) { + var fiveArgumentPooler = function(a1, a2, a3, a4, a5) { var Klass = this; if (Klass.instancePool.length) { var instance = Klass.instancePool.pop(); @@ -941,9 +1064,12 @@ } }; - var standardReleaser = function standardReleaser(instance) { + var standardReleaser = function(instance) { var Klass = this; - "production" !== process.env.NODE_ENV ? invariant(instance instanceof Klass, 'Trying to release an instance into a pool of a different type.') : invariant(instance instanceof Klass); + ("production" !== process.env.NODE_ENV ? invariant( + instance instanceof Klass, + 'Trying to release an instance into a pool of a different type.' + ) : invariant(instance instanceof Klass)); if (instance.destructor) { instance.destructor(); } @@ -964,7 +1090,7 @@ * @param {Function} CopyConstructor Constructor that can be used to reset. * @param {Function} pooler Customizable pooler. */ - var addPoolingTo = function addPoolingTo(CopyConstructor, pooler) { + var addPoolingTo = function(CopyConstructor, pooler) { var NewKlass = CopyConstructor; NewKlass.instancePool = []; NewKlass.getPooled = pooler || DEFAULT_POOLER; @@ -984,6 +1110,7 @@ }; module.exports = PooledClass; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -1024,27 +1151,44 @@ // Feature test. Don't even try to issue this warning if we can't use // enumerable: false. - var dummy = function dummy() { + var dummy = function() { return 1; }; - Object.defineProperty({}, fragmentKey, { enumerable: false, value: true }); + Object.defineProperty( + {}, + fragmentKey, + {enumerable: false, value: true} + ); - Object.defineProperty({}, 'key', { enumerable: true, get: dummy }); + Object.defineProperty( + {}, + 'key', + {enumerable: true, get: dummy} + ); canWarnForReactFragment = true; - } catch (x) {} + } catch (x) { } - var proxyPropertyAccessWithWarning = function proxyPropertyAccessWithWarning(obj, key) { + var proxyPropertyAccessWithWarning = function(obj, key) { Object.defineProperty(obj, key, { enumerable: true, - get: function get() { - "production" !== process.env.NODE_ENV ? warning(this[didWarnKey], 'A ReactFragment is an opaque type. Accessing any of its ' + 'properties is deprecated. Pass it to one of the React.Children ' + 'helpers.') : null; + get: function() { + ("production" !== process.env.NODE_ENV ? warning( + this[didWarnKey], + 'A ReactFragment is an opaque type. Accessing any of its ' + + 'properties is deprecated. Pass it to one of the React.Children ' + + 'helpers.' + ) : null); this[didWarnKey] = true; return this[fragmentKey][key]; }, - set: function set(value) { - "production" !== process.env.NODE_ENV ? warning(this[didWarnKey], 'A ReactFragment is an immutable opaque type. Mutating its ' + 'properties is deprecated.') : null; + set: function(value) { + ("production" !== process.env.NODE_ENV ? warning( + this[didWarnKey], + 'A ReactFragment is an immutable opaque type. Mutating its ' + + 'properties is deprecated.' + ) : null); this[didWarnKey] = true; this[fragmentKey][key] = value; } @@ -1053,12 +1197,12 @@ var issuedWarnings = {}; - var didWarnForFragment = function didWarnForFragment(fragment) { + var didWarnForFragment = function(fragment) { // We use the keys and the type of the value as a heuristic to dedupe the // warning to avoid spamming too much. var fragmentCacheKey = ''; for (var key in fragment) { - fragmentCacheKey += key + ':' + typeof fragment[key] + ','; + fragmentCacheKey += key + ':' + (typeof fragment[key]) + ','; } var alreadyWarnedOnce = !!issuedWarnings[fragmentCacheKey]; issuedWarnings[fragmentCacheKey] = true; @@ -1069,14 +1213,22 @@ var ReactFragment = { // Wrap a keyed object in an opaque proxy that warns you if you access any // of its properties. - create: function create(object) { + create: function(object) { if ("production" !== process.env.NODE_ENV) { if (typeof object !== 'object' || !object || Array.isArray(object)) { - "production" !== process.env.NODE_ENV ? warning(false, 'React.addons.createFragment only accepts a single object.', object) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + 'React.addons.createFragment only accepts a single object.', + object + ) : null); return object; } if (ReactElement.isValidElement(object)) { - "production" !== process.env.NODE_ENV ? warning(false, 'React.addons.createFragment does not accept a ReactElement ' + 'without a wrapper object.') : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + 'React.addons.createFragment does not accept a ReactElement ' + + 'without a wrapper object.' + ) : null); return object; } if (canWarnForReactFragment) { @@ -1101,11 +1253,16 @@ }, // Extract the original keyed object from the fragment opaque type. Warn if // a plain object is passed here. - extract: function extract(fragment) { + extract: function(fragment) { if ("production" !== process.env.NODE_ENV) { if (canWarnForReactFragment) { if (!fragment[fragmentKey]) { - "production" !== process.env.NODE_ENV ? warning(didWarnForFragment(fragment), 'Any use of a keyed object should be wrapped in ' + 'React.addons.createFragment(object) before being passed as a ' + 'child.') : null; + ("production" !== process.env.NODE_ENV ? warning( + didWarnForFragment(fragment), + 'Any use of a keyed object should be wrapped in ' + + 'React.addons.createFragment(object) before being passed as a ' + + 'child.' + ) : null); return fragment; } return fragment[fragmentKey]; @@ -1116,7 +1273,7 @@ // Check if this is a fragment and if so, extract the keyed object. If it // is a fragment-like object, warn that it should be wrapped. Ignore if we // can't determine what kind of object this is. - extractIfFragment: function extractIfFragment(fragment) { + extractIfFragment: function(fragment) { if ("production" !== process.env.NODE_ENV) { if (canWarnForReactFragment) { // If it is the opaque type, return the keyed object. @@ -1127,7 +1284,8 @@ // it is probably meant as a fragment, so we can warn early. Defer, // the warning to extract. for (var key in fragment) { - if (fragment.hasOwnProperty(key) && ReactElement.isValidElement(fragment[key])) { + if (fragment.hasOwnProperty(key) && + ReactElement.isValidElement(fragment[key])) { // This looks like a fragment object, we should provide an // early warning. return ReactFragment.extract(fragment); @@ -1140,6 +1298,7 @@ }; module.exports = ReactFragment; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -1183,15 +1342,20 @@ configurable: false, enumerable: true, - get: function get() { + get: function() { if (!this._store) { return null; } return this._store[key]; }, - set: function set(value) { - "production" !== process.env.NODE_ENV ? warning(false, 'Don\'t set the %s property of the React element. Instead, ' + 'specify the correct value when initially creating the element.', key) : null; + set: function(value) { + ("production" !== process.env.NODE_ENV ? warning( + false, + 'Don\'t set the %s property of the React element. Instead, ' + + 'specify the correct value when initially creating the element.', + key + ) : null); this._store[key] = value; } @@ -1233,7 +1397,7 @@ * @param {*} props * @internal */ - var ReactElement = function ReactElement(type, key, ref, owner, context, props) { + var ReactElement = function(type, key, ref, owner, context, props) { // Built-in properties that belong on the element this.type = type; this.key = key; @@ -1251,7 +1415,7 @@ // an external backing store so that we can freeze the whole object. // This can be replaced with a WeakMap once they are implemented in // commonly used development environments. - this._store = { props: props, originalProps: assign({}, props) }; + this._store = {props: props, originalProps: assign({}, props)}; // To make comparing ReactElements easier for testing purposes, we make // the validation flag non-enumerable (where possible, which should @@ -1263,7 +1427,8 @@ enumerable: false, writable: true }); - } catch (x) {} + } catch (x) { + } this._store.validated = false; // We're not allowed to set props directly on the object so we early @@ -1288,7 +1453,7 @@ defineMutationMembrane(ReactElement.prototype); } - ReactElement.createElement = function (type, config, children) { + ReactElement.createElement = function(type, config, children) { var propName; // Reserved names are extracted @@ -1302,7 +1467,8 @@ key = config.key === undefined ? null : '' + config.key; // Remaining properties are added to a new props object for (propName in config) { - if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config.hasOwnProperty(propName) && + !RESERVED_PROPS.hasOwnProperty(propName)) { props[propName] = config[propName]; } } @@ -1331,10 +1497,17 @@ } } - return new ReactElement(type, key, ref, ReactCurrentOwner.current, ReactContext.current, props); + return new ReactElement( + type, + key, + ref, + ReactCurrentOwner.current, + ReactContext.current, + props + ); }; - ReactElement.createFactory = function (type) { + ReactElement.createFactory = function(type) { var factory = ReactElement.createElement.bind(null, type); // Expose the type on the factory and the prototype so that it can be // easily accessed on elements. E.g. .type === Foo.type. @@ -1345,8 +1518,15 @@ return factory; }; - ReactElement.cloneAndReplaceProps = function (oldElement, newProps) { - var newElement = new ReactElement(oldElement.type, oldElement.key, oldElement.ref, oldElement._owner, oldElement._context, newProps); + ReactElement.cloneAndReplaceProps = function(oldElement, newProps) { + var newElement = new ReactElement( + oldElement.type, + oldElement.key, + oldElement.ref, + oldElement._owner, + oldElement._context, + newProps + ); if ("production" !== process.env.NODE_ENV) { // If the key on the original is valid, then the clone is valid @@ -1355,7 +1535,7 @@ return newElement; }; - ReactElement.cloneElement = function (element, config, children) { + ReactElement.cloneElement = function(element, config, children) { var propName; // Original props are copied @@ -1379,7 +1559,8 @@ } // Remaining properties override existing props for (propName in config) { - if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config.hasOwnProperty(propName) && + !RESERVED_PROPS.hasOwnProperty(propName)) { props[propName] = config[propName]; } } @@ -1398,7 +1579,14 @@ props.children = childArray; } - return new ReactElement(element.type, key, ref, owner, element._context, props); + return new ReactElement( + element.type, + key, + ref, + owner, + element._context, + props + ); }; /** @@ -1406,7 +1594,7 @@ * @return {boolean} True if `object` is a valid component. * @final */ - ReactElement.isValidElement = function (object) { + ReactElement.isValidElement = function(object) { // ReactTestUtils is often used outside of beforeEach where as React is // within it. This leads to two different instances of React on the same // page. To identify a element from a different React instance we use @@ -1421,6 +1609,7 @@ }; module.exports = ReactElement; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -1476,9 +1665,13 @@ * @param {function} scopedCallback Callback to run with the new context * @return {ReactComponent|array} */ - withContext: function withContext(newContext, scopedCallback) { + withContext: function(newContext, scopedCallback) { if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? warning(didWarn, 'withContext is deprecated and will be removed in a future version. ' + 'Use a wrapper component with getChildContext instead.') : null; + ("production" !== process.env.NODE_ENV ? warning( + didWarn, + 'withContext is deprecated and will be removed in a future version. ' + + 'Use a wrapper component with getChildContext instead.' + ) : null); didWarn = true; } @@ -1497,6 +1690,7 @@ }; module.exports = ReactContext; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -1551,6 +1745,7 @@ module.exports = assign; + /***/ }, /* 14 */ /***/ function(module, exports, __webpack_require__) { @@ -1575,6 +1770,7 @@ } module.exports = emptyObject; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -1606,14 +1802,19 @@ var warning = emptyFunction; if ("production" !== process.env.NODE_ENV) { - warning = function (condition, format) { - for (var args = [], $__0 = 2, $__1 = arguments.length; $__0 < $__1; $__0++) args.push(arguments[$__0]); + warning = function(condition, format ) {for (var args=[],$__0=2,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]); if (format === undefined) { - throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); } if (format.length < 10 || /^[s\W]*$/.test(format)) { - throw new Error('The warning format should be able to uniquely identify this ' + 'warning. Please, use a more descriptive format than: ' + format); + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + format + ); } if (format.indexOf('Failed Composite propType: ') === 0) { @@ -1622,21 +1823,20 @@ if (!condition) { var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); + var message = 'Warning: ' + format.replace(/%s/g, function() {return args[argIndex++];}); console.warn(message); try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); - } catch (x) {} + } catch(x) {} } }; } module.exports = warning; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -1654,10 +1854,8 @@ * @providesModule emptyFunction */ - "use strict"; - function makeEmptyFunction(arg) { - return function () { + return function() { return arg; }; } @@ -1673,15 +1871,12 @@ emptyFunction.thatReturnsFalse = makeEmptyFunction(false); emptyFunction.thatReturnsTrue = makeEmptyFunction(true); emptyFunction.thatReturnsNull = makeEmptyFunction(null); - emptyFunction.thatReturnsThis = function () { - return this; - }; - emptyFunction.thatReturnsArgument = function (arg) { - return arg; - }; + emptyFunction.thatReturnsThis = function() { return this; }; + emptyFunction.thatReturnsArgument = function(arg) { return arg; }; module.exports = emptyFunction; + /***/ }, /* 17 */ /***/ function(module, exports) { @@ -1719,6 +1914,7 @@ module.exports = ReactCurrentOwner; + /***/ }, /* 18 */ /***/ function(module, exports, __webpack_require__) { @@ -1789,7 +1985,10 @@ * @return {string} An escaped string. */ function escapeUserProvidedKey(text) { - return ('' + text).replace(userProvidedKeyEscapeRegex, userProvidedKeyEscaper); + return ('' + text).replace( + userProvidedKeyEscapeRegex, + userProvidedKeyEscaper + ); } /** @@ -1812,7 +2011,13 @@ * process. * @return {!number} The number of children in this subtree. */ - function traverseAllChildrenImpl(children, nameSoFar, indexSoFar, callback, traverseContext) { + function traverseAllChildrenImpl( + children, + nameSoFar, + indexSoFar, + callback, + traverseContext + ) { var type = typeof children; if (type === 'undefined' || type === 'boolean') { @@ -1820,11 +2025,18 @@ children = null; } - if (children === null || type === 'string' || type === 'number' || ReactElement.isValidElement(children)) { - callback(traverseContext, children, - // If it's the only child, treat the name as if it was wrapped in an array - // so that it's consistent if the number of children grows. - nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar, indexSoFar); + if (children === null || + type === 'string' || + type === 'number' || + ReactElement.isValidElement(children)) { + callback( + traverseContext, + children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar, + indexSoFar + ); return 1; } @@ -1834,9 +2046,18 @@ if (Array.isArray(children)) { for (var i = 0; i < children.length; i++) { child = children[i]; - nextName = (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + getComponentKey(child, i); + nextName = ( + (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + + getComponentKey(child, i) + ); nextIndex = indexSoFar + subtreeCount; - subtreeCount += traverseAllChildrenImpl(child, nextName, nextIndex, callback, traverseContext); + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + nextIndex, + callback, + traverseContext + ); } } else { var iteratorFn = getIteratorFn(children); @@ -1847,13 +2068,27 @@ var ii = 0; while (!(step = iterator.next()).done) { child = step.value; - nextName = (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + getComponentKey(child, ii++); + nextName = ( + (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + + getComponentKey(child, ii++) + ); nextIndex = indexSoFar + subtreeCount; - subtreeCount += traverseAllChildrenImpl(child, nextName, nextIndex, callback, traverseContext); + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + nextIndex, + callback, + traverseContext + ); } } else { if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? 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.') : null; + ("production" !== process.env.NODE_ENV ? 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.' + ) : null); didWarnAboutMaps = true; } // Iterator will provide entry [k,v] tuples rather than values. @@ -1861,21 +2096,45 @@ var entry = step.value; if (entry) { child = entry[1]; - nextName = (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + wrapUserProvidedKey(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); + nextName = ( + (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + + wrapUserProvidedKey(entry[0]) + SUBSEPARATOR + + getComponentKey(child, 0) + ); nextIndex = indexSoFar + subtreeCount; - subtreeCount += traverseAllChildrenImpl(child, nextName, nextIndex, callback, traverseContext); + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + nextIndex, + callback, + traverseContext + ); } } } } else if (type === 'object') { - "production" !== process.env.NODE_ENV ? invariant(children.nodeType !== 1, 'traverseAllChildren(...): Encountered an invalid child; DOM ' + 'elements are not valid children of React components.') : invariant(children.nodeType !== 1); + ("production" !== process.env.NODE_ENV ? invariant( + children.nodeType !== 1, + 'traverseAllChildren(...): Encountered an invalid child; DOM ' + + 'elements are not valid children of React components.' + ) : invariant(children.nodeType !== 1)); var fragment = ReactFragment.extract(children); for (var key in fragment) { if (fragment.hasOwnProperty(key)) { child = fragment[key]; - nextName = (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + wrapUserProvidedKey(key) + SUBSEPARATOR + getComponentKey(child, 0); + nextName = ( + (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + + wrapUserProvidedKey(key) + SUBSEPARATOR + + getComponentKey(child, 0) + ); nextIndex = indexSoFar + subtreeCount; - subtreeCount += traverseAllChildrenImpl(child, nextName, nextIndex, callback, traverseContext); + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + nextIndex, + callback, + traverseContext + ); } } } @@ -1909,6 +2168,7 @@ } module.exports = traverseAllChildren; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -1972,7 +2232,9 @@ * @private */ function isValidID(id) { - return id === '' || id.charAt(0) === SEPARATOR && id.charAt(id.length - 1) !== SEPARATOR; + return id === '' || ( + id.charAt(0) === SEPARATOR && id.charAt(id.length - 1) !== SEPARATOR + ); } /** @@ -1984,7 +2246,10 @@ * @internal */ function isAncestorIDOf(ancestorID, descendantID) { - return descendantID.indexOf(ancestorID) === 0 && isBoundary(descendantID, ancestorID.length); + return ( + descendantID.indexOf(ancestorID) === 0 && + isBoundary(descendantID, ancestorID.length) + ); } /** @@ -2008,8 +2273,19 @@ * @private */ function getNextDescendantID(ancestorID, destinationID) { - "production" !== process.env.NODE_ENV ? invariant(isValidID(ancestorID) && isValidID(destinationID), 'getNextDescendantID(%s, %s): Received an invalid React DOM ID.', ancestorID, destinationID) : invariant(isValidID(ancestorID) && isValidID(destinationID)); - "production" !== process.env.NODE_ENV ? invariant(isAncestorIDOf(ancestorID, destinationID), 'getNextDescendantID(...): React has made an invalid assumption about ' + 'the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.', ancestorID, destinationID) : invariant(isAncestorIDOf(ancestorID, destinationID)); + ("production" !== process.env.NODE_ENV ? invariant( + isValidID(ancestorID) && isValidID(destinationID), + 'getNextDescendantID(%s, %s): Received an invalid React DOM ID.', + ancestorID, + destinationID + ) : invariant(isValidID(ancestorID) && isValidID(destinationID))); + ("production" !== process.env.NODE_ENV ? invariant( + isAncestorIDOf(ancestorID, destinationID), + 'getNextDescendantID(...): React has made an invalid assumption about ' + + 'the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.', + ancestorID, + destinationID + ) : invariant(isAncestorIDOf(ancestorID, destinationID))); if (ancestorID === destinationID) { return ancestorID; } @@ -2051,7 +2327,13 @@ } } var longestCommonID = oneID.substr(0, lastCommonMarkerIndex); - "production" !== process.env.NODE_ENV ? invariant(isValidID(longestCommonID), 'getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s', oneID, twoID, longestCommonID) : invariant(isValidID(longestCommonID)); + ("production" !== process.env.NODE_ENV ? invariant( + isValidID(longestCommonID), + 'getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s', + oneID, + twoID, + longestCommonID + ) : invariant(isValidID(longestCommonID))); return longestCommonID; } @@ -2070,13 +2352,23 @@ function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) { start = start || ''; stop = stop || ''; - "production" !== process.env.NODE_ENV ? invariant(start !== stop, 'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.', start) : invariant(start !== stop); + ("production" !== process.env.NODE_ENV ? invariant( + start !== stop, + 'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.', + start + ) : invariant(start !== stop)); var traverseUp = isAncestorIDOf(stop, start); - "production" !== process.env.NODE_ENV ? invariant(traverseUp || isAncestorIDOf(start, stop), 'traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do ' + 'not have a parent path.', start, stop) : invariant(traverseUp || isAncestorIDOf(start, stop)); + ("production" !== process.env.NODE_ENV ? invariant( + traverseUp || isAncestorIDOf(start, stop), + 'traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do ' + + 'not have a parent path.', + start, + stop + ) : invariant(traverseUp || isAncestorIDOf(start, stop))); // Traverse from `start` to `stop` one depth at a time. var depth = 0; var traverse = traverseUp ? getParentID : getNextDescendantID; - for (var id = start;; /* until break */id = traverse(id, stop)) { + for (var id = start; /* until break */; id = traverse(id, stop)) { var ret; if ((!skipFirst || id !== start) && (!skipLast || id !== stop)) { ret = cb(id, traverseUp, arg); @@ -2085,7 +2377,12 @@ // Only break //after// visiting `stop`. break; } - "production" !== process.env.NODE_ENV ? invariant(depth++ < MAX_TREE_DEPTH, 'traverseParentPath(%s, %s, ...): Detected an infinite loop while ' + 'traversing the React DOM ID tree. This may be due to malformed IDs: %s', start, stop) : invariant(depth++ < MAX_TREE_DEPTH); + ("production" !== process.env.NODE_ENV ? invariant( + depth++ < MAX_TREE_DEPTH, + 'traverseParentPath(%s, %s, ...): Detected an infinite loop while ' + + 'traversing the React DOM ID tree. This may be due to malformed IDs: %s', + start, stop + ) : invariant(depth++ < MAX_TREE_DEPTH)); } } @@ -2102,7 +2399,7 @@ * Constructs a React root ID * @return {string} A React root ID. */ - createReactRootID: function createReactRootID() { + createReactRootID: function() { return getReactRootIDString(ReactRootIndex.createReactRootIndex()); }, @@ -2114,7 +2411,7 @@ * @return {string} A React ID. * @internal */ - createReactID: function createReactID(rootID, name) { + createReactID: function(rootID, name) { return rootID + name; }, @@ -2126,7 +2423,7 @@ * @return {?string} DOM ID of the React component that is the root. * @internal */ - getReactRootIDFromNodeID: function getReactRootIDFromNodeID(id) { + getReactRootIDFromNodeID: function(id) { if (id && id.charAt(0) === SEPARATOR && id.length > 1) { var index = id.indexOf(SEPARATOR, 1); return index > -1 ? id.substr(0, index) : id; @@ -2148,7 +2445,7 @@ * @param {*} downArg Argument to invoke the callback with on entered IDs. * @internal */ - traverseEnterLeave: function traverseEnterLeave(leaveID, enterID, cb, upArg, downArg) { + traverseEnterLeave: function(leaveID, enterID, cb, upArg, downArg) { var ancestorID = getFirstCommonAncestorID(leaveID, enterID); if (ancestorID !== leaveID) { traverseParentPath(leaveID, ancestorID, cb, upArg, false, true); @@ -2168,7 +2465,7 @@ * @param {*} arg Argument to invoke the callback with. * @internal */ - traverseTwoPhase: function traverseTwoPhase(targetID, cb, arg) { + traverseTwoPhase: function(targetID, cb, arg) { if (targetID) { traverseParentPath('', targetID, cb, arg, true, false); traverseParentPath(targetID, '', cb, arg, false, true); @@ -2187,7 +2484,7 @@ * @param {*} arg Argument to invoke the callback with. * @internal */ - traverseAncestors: function traverseAncestors(targetID, cb, arg) { + traverseAncestors: function(targetID, cb, arg) { traverseParentPath('', targetID, cb, arg, true, false); }, @@ -2210,6 +2507,7 @@ }; module.exports = ReactInstanceHandles; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -2234,7 +2532,7 @@ /** * @param {function} _createReactRootIndex */ - injectCreateReactRootIndex: function injectCreateReactRootIndex(_createReactRootIndex) { + injectCreateReactRootIndex: function(_createReactRootIndex) { ReactRootIndex.createReactRootIndex = _createReactRootIndex; } }; @@ -2246,6 +2544,7 @@ module.exports = ReactRootIndex; + /***/ }, /* 21 */ /***/ function(module, exports) { @@ -2283,7 +2582,9 @@ * @return {?function} */ function getIteratorFn(maybeIterable) { - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + var iteratorFn = maybeIterable && ( + (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]) + ); if (typeof iteratorFn === 'function') { return iteratorFn; } @@ -2291,6 +2592,7 @@ module.exports = getIteratorFn; + /***/ }, /* 22 */ /***/ function(module, exports, __webpack_require__) { @@ -2346,10 +2648,22 @@ * @final * @protected */ - ReactComponent.prototype.setState = function (partialState, callback) { - "production" !== process.env.NODE_ENV ? invariant(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null, 'setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.') : invariant(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null); + ReactComponent.prototype.setState = function(partialState, callback) { + ("production" !== process.env.NODE_ENV ? invariant( + typeof partialState === 'object' || + typeof partialState === 'function' || + partialState == null, + 'setState(...): takes an object of state variables to update or a ' + + 'function which returns an object of state variables.' + ) : invariant(typeof partialState === 'object' || + typeof partialState === 'function' || + partialState == null)); if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : null; + ("production" !== process.env.NODE_ENV ? warning( + partialState != null, + 'setState(...): You passed an undefined or null state object; ' + + 'instead, use forceUpdate().' + ) : null); } ReactUpdateQueue.enqueueSetState(this, partialState); if (callback) { @@ -2371,7 +2685,7 @@ * @final * @protected */ - ReactComponent.prototype.forceUpdate = function (callback) { + ReactComponent.prototype.forceUpdate = function(callback) { ReactUpdateQueue.enqueueForceUpdate(this); if (callback) { ReactUpdateQueue.enqueueCallback(this, callback); @@ -2385,17 +2699,39 @@ */ if ("production" !== process.env.NODE_ENV) { var deprecatedAPIs = { - getDOMNode: ['getDOMNode', 'Use React.findDOMNode(component) instead.'], - isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], - replaceProps: ['replaceProps', 'Instead, call React.render again at the top level.'], - replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'], - setProps: ['setProps', 'Instead, call React.render again at the top level.'] + getDOMNode: [ + 'getDOMNode', + 'Use React.findDOMNode(component) instead.' + ], + isMounted: [ + 'isMounted', + 'Instead, make sure to clean up subscriptions and pending requests in ' + + 'componentWillUnmount to prevent memory leaks.' + ], + replaceProps: [ + 'replaceProps', + 'Instead, call React.render again at the top level.' + ], + replaceState: [ + 'replaceState', + 'Refactor your code to use setState instead (see ' + + 'https://github.com/facebook/react/issues/3236).' + ], + setProps: [ + 'setProps', + 'Instead, call React.render again at the top level.' + ] }; - var defineDeprecationWarning = function defineDeprecationWarning(methodName, info) { + var defineDeprecationWarning = function(methodName, info) { try { Object.defineProperty(ReactComponent.prototype, methodName, { - get: function get() { - "production" !== process.env.NODE_ENV ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : null; + get: function() { + ("production" !== process.env.NODE_ENV ? warning( + false, + '%s(...) is deprecated in plain JavaScript React classes. %s', + info[0], + info[1] + ) : null); return undefined; } }); @@ -2411,6 +2747,7 @@ } module.exports = ReactComponent; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -2451,7 +2788,13 @@ } function getInternalInstanceReadyForUpdate(publicInstance, callerName) { - "production" !== process.env.NODE_ENV ? invariant(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition ' + '(such as within `render`). Render methods should be a pure function ' + 'of props and state.', callerName) : invariant(ReactCurrentOwner.current == null); + ("production" !== process.env.NODE_ENV ? invariant( + ReactCurrentOwner.current == null, + '%s(...): Cannot update during an existing state transition ' + + '(such as within `render`). Render methods should be a pure function ' + + 'of props and state.', + callerName + ) : invariant(ReactCurrentOwner.current == null)); var internalInstance = ReactInstanceMap.get(publicInstance); if (!internalInstance) { @@ -2459,7 +2802,14 @@ // Only warn when we have a callerName. Otherwise we should be silent. // We're probably calling from enqueueCallback. We don't want to warn // there because we already warned for the corresponding lifecycle method. - "production" !== process.env.NODE_ENV ? 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.', callerName, callerName) : null; + ("production" !== process.env.NODE_ENV ? 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.', + callerName, + callerName + ) : null); } return null; } @@ -2485,8 +2835,13 @@ * @param {?function} callback Called after state is updated. * @internal */ - enqueueCallback: function enqueueCallback(publicInstance, callback) { - "production" !== process.env.NODE_ENV ? invariant(typeof callback === 'function', 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + 'isn\'t callable.') : invariant(typeof callback === 'function'); + enqueueCallback: function(publicInstance, callback) { + ("production" !== process.env.NODE_ENV ? invariant( + typeof callback === 'function', + 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + + 'isn\'t callable.' + ) : invariant(typeof callback === 'function')); var internalInstance = getInternalInstanceReadyForUpdate(publicInstance); // Previously we would throw an error if we didn't have an internal @@ -2494,7 +2849,8 @@ // behavior we have in other enqueue* methods. // We also need to ignore callbacks in componentWillMount. See // enqueueUpdates. - if (!internalInstance || internalInstance === ReactLifeCycle.currentlyMountingInstance) { + if (!internalInstance || + internalInstance === ReactLifeCycle.currentlyMountingInstance) { return null; } @@ -2510,8 +2866,13 @@ enqueueUpdate(internalInstance); }, - enqueueCallbackInternal: function enqueueCallbackInternal(internalInstance, callback) { - "production" !== process.env.NODE_ENV ? invariant(typeof callback === 'function', 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + 'isn\'t callable.') : invariant(typeof callback === 'function'); + enqueueCallbackInternal: function(internalInstance, callback) { + ("production" !== process.env.NODE_ENV ? invariant( + typeof callback === 'function', + 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + + 'isn\'t callable.' + ) : invariant(typeof callback === 'function')); if (internalInstance._pendingCallbacks) { internalInstance._pendingCallbacks.push(callback); } else { @@ -2533,8 +2894,11 @@ * @param {ReactClass} publicInstance The instance that should rerender. * @internal */ - enqueueForceUpdate: function enqueueForceUpdate(publicInstance) { - var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate'); + enqueueForceUpdate: function(publicInstance) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'forceUpdate' + ); if (!internalInstance) { return; @@ -2556,8 +2920,11 @@ * @param {object} completeState Next state. * @internal */ - enqueueReplaceState: function enqueueReplaceState(publicInstance, completeState) { - var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState'); + enqueueReplaceState: function(publicInstance, completeState) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'replaceState' + ); if (!internalInstance) { return; @@ -2579,14 +2946,19 @@ * @param {object} partialState Next partial state to be merged with state. * @internal */ - enqueueSetState: function enqueueSetState(publicInstance, partialState) { - var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState'); + enqueueSetState: function(publicInstance, partialState) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'setState' + ); if (!internalInstance) { return; } - var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []); + var queue = + internalInstance._pendingStateQueue || + (internalInstance._pendingStateQueue = []); queue.push(partialState); enqueueUpdate(internalInstance); @@ -2599,20 +2971,34 @@ * @param {object} partialProps Subset of the next props. * @internal */ - enqueueSetProps: function enqueueSetProps(publicInstance, partialProps) { - var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setProps'); + enqueueSetProps: function(publicInstance, partialProps) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'setProps' + ); if (!internalInstance) { return; } - "production" !== process.env.NODE_ENV ? invariant(internalInstance._isTopLevel, 'setProps(...): You called `setProps` on a ' + 'component with a parent. This is an anti-pattern since props will ' + 'get reactively updated when rendered. Instead, change the owner\'s ' + '`render` method to pass the correct value as props to the component ' + 'where it is created.') : invariant(internalInstance._isTopLevel); + ("production" !== process.env.NODE_ENV ? invariant( + internalInstance._isTopLevel, + 'setProps(...): You called `setProps` on a ' + + 'component with a parent. This is an anti-pattern since props will ' + + 'get reactively updated when rendered. Instead, change the owner\'s ' + + '`render` method to pass the correct value as props to the component ' + + 'where it is created.' + ) : invariant(internalInstance._isTopLevel)); // Merge with the pending element if it exists, otherwise with existing // element props. - var element = internalInstance._pendingElement || internalInstance._currentElement; + var element = internalInstance._pendingElement || + internalInstance._currentElement; var props = assign({}, element.props, partialProps); - internalInstance._pendingElement = ReactElement.cloneAndReplaceProps(element, props); + internalInstance._pendingElement = ReactElement.cloneAndReplaceProps( + element, + props + ); enqueueUpdate(internalInstance); }, @@ -2624,24 +3010,38 @@ * @param {object} props New props. * @internal */ - enqueueReplaceProps: function enqueueReplaceProps(publicInstance, props) { - var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceProps'); + enqueueReplaceProps: function(publicInstance, props) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'replaceProps' + ); if (!internalInstance) { return; } - "production" !== process.env.NODE_ENV ? invariant(internalInstance._isTopLevel, 'replaceProps(...): You called `replaceProps` on a ' + 'component with a parent. This is an anti-pattern since props will ' + 'get reactively updated when rendered. Instead, change the owner\'s ' + '`render` method to pass the correct value as props to the component ' + 'where it is created.') : invariant(internalInstance._isTopLevel); + ("production" !== process.env.NODE_ENV ? invariant( + internalInstance._isTopLevel, + 'replaceProps(...): You called `replaceProps` on a ' + + 'component with a parent. This is an anti-pattern since props will ' + + 'get reactively updated when rendered. Instead, change the owner\'s ' + + '`render` method to pass the correct value as props to the component ' + + 'where it is created.' + ) : invariant(internalInstance._isTopLevel)); // Merge with the pending element if it exists, otherwise with existing // element props. - var element = internalInstance._pendingElement || internalInstance._currentElement; - internalInstance._pendingElement = ReactElement.cloneAndReplaceProps(element, props); + var element = internalInstance._pendingElement || + internalInstance._currentElement; + internalInstance._pendingElement = ReactElement.cloneAndReplaceProps( + element, + props + ); enqueueUpdate(internalInstance); }, - enqueueElementInternal: function enqueueElementInternal(internalInstance, newElement) { + enqueueElementInternal: function(internalInstance, newElement) { internalInstance._pendingElement = newElement; enqueueUpdate(internalInstance); } @@ -2649,6 +3049,7 @@ }; module.exports = ReactUpdateQueue; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -2691,6 +3092,7 @@ module.exports = ReactLifeCycle; + /***/ }, /* 25 */ /***/ function(module, exports) { @@ -2723,19 +3125,19 @@ * transform these to strings for IE support. When this transform is fully * supported we can rename it. */ - remove: function remove(key) { + remove: function(key) { key._reactInternalInstance = undefined; }, - get: function get(key) { + get: function(key) { return key._reactInternalInstance; }, - has: function has(key) { + has: function(key) { return key._reactInternalInstance !== undefined; }, - set: function set(key, value) { + set: function(key, value) { key._reactInternalInstance = value; } @@ -2743,6 +3145,7 @@ module.exports = ReactInstanceMap; + /***/ }, /* 26 */ /***/ function(module, exports, __webpack_require__) { @@ -2778,14 +3181,18 @@ var batchingStrategy = null; function ensureInjected() { - "production" !== process.env.NODE_ENV ? invariant(ReactUpdates.ReactReconcileTransaction && batchingStrategy, 'ReactUpdates: must inject a reconcile transaction class and batching ' + 'strategy') : invariant(ReactUpdates.ReactReconcileTransaction && batchingStrategy); + ("production" !== process.env.NODE_ENV ? invariant( + ReactUpdates.ReactReconcileTransaction && batchingStrategy, + 'ReactUpdates: must inject a reconcile transaction class and batching ' + + 'strategy' + ) : invariant(ReactUpdates.ReactReconcileTransaction && batchingStrategy)); } var NESTED_UPDATES = { - initialize: function initialize() { + initialize: function() { this.dirtyComponentsLength = dirtyComponents.length; }, - close: function close() { + close: function() { if (this.dirtyComponentsLength !== dirtyComponents.length) { // Additional updates were enqueued by componentDidUpdate handlers or // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run @@ -2801,10 +3208,10 @@ }; var UPDATE_QUEUEING = { - initialize: function initialize() { + initialize: function() { this.callbackQueue.reset(); }, - close: function close() { + close: function() { this.callbackQueue.notifyAll(); } }; @@ -2815,15 +3222,18 @@ this.reinitializeTransaction(); this.dirtyComponentsLength = null; this.callbackQueue = CallbackQueue.getPooled(); - this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(); + this.reconcileTransaction = + ReactUpdates.ReactReconcileTransaction.getPooled(); } - assign(ReactUpdatesFlushTransaction.prototype, Transaction.Mixin, { - getTransactionWrappers: function getTransactionWrappers() { + assign( + ReactUpdatesFlushTransaction.prototype, + Transaction.Mixin, { + getTransactionWrappers: function() { return TRANSACTION_WRAPPERS; }, - destructor: function destructor() { + destructor: function() { this.dirtyComponentsLength = null; CallbackQueue.release(this.callbackQueue); this.callbackQueue = null; @@ -2831,10 +3241,17 @@ this.reconcileTransaction = null; }, - perform: function perform(method, scope, a) { + perform: function(method, scope, a) { // Essentially calls `this.reconcileTransaction.perform(method, scope, a)` // with this transaction's wrappers around it. - return Transaction.Mixin.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a); + return Transaction.Mixin.perform.call( + this, + this.reconcileTransaction.perform, + this.reconcileTransaction, + method, + scope, + a + ); } }); @@ -2858,7 +3275,13 @@ function runBatchedUpdates(transaction) { var len = transaction.dirtyComponentsLength; - "production" !== process.env.NODE_ENV ? invariant(len === dirtyComponents.length, 'Expected flush transaction\'s stored dirty-components length (%s) to ' + 'match dirty-components array length (%s).', len, dirtyComponents.length) : invariant(len === dirtyComponents.length); + ("production" !== process.env.NODE_ENV ? invariant( + len === dirtyComponents.length, + 'Expected flush transaction\'s stored dirty-components length (%s) to ' + + 'match dirty-components array length (%s).', + len, + dirtyComponents.length + ) : invariant(len === dirtyComponents.length)); // Since reconciling a component higher in the owner hierarchy usually (not // always -- see shouldComponentUpdate()) will reconcile children, reconcile @@ -2877,17 +3300,23 @@ var callbacks = component._pendingCallbacks; component._pendingCallbacks = null; - ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction); + ReactReconciler.performUpdateIfNecessary( + component, + transaction.reconcileTransaction + ); if (callbacks) { for (var j = 0; j < callbacks.length; j++) { - transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance()); + transaction.callbackQueue.enqueue( + callbacks[j], + component.getPublicInstance() + ); } } } } - var flushBatchedUpdates = function flushBatchedUpdates() { + var flushBatchedUpdates = function() { // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents // array and perform any updates enqueued by mount-ready handlers (i.e., // componentDidUpdate) but we need to check here too in order to catch @@ -2908,7 +3337,11 @@ } } }; - flushBatchedUpdates = ReactPerf.measure('ReactUpdates', 'flushBatchedUpdates', flushBatchedUpdates); + flushBatchedUpdates = ReactPerf.measure( + 'ReactUpdates', + 'flushBatchedUpdates', + flushBatchedUpdates + ); /** * Mark a component as needing a rerender, adding an optional callback to a @@ -2922,7 +3355,13 @@ // verify that that's the case. (This is called by each top-level update // function, like setProps, setState, forceUpdate, etc.; creation and // destruction of top-level components is guarded in ReactMount.) - "production" !== process.env.NODE_ENV ? warning(ReactCurrentOwner.current == null, 'enqueueUpdate(): 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.') : null; + ("production" !== process.env.NODE_ENV ? warning( + ReactCurrentOwner.current == null, + 'enqueueUpdate(): 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.' + ) : null); if (!batchingStrategy.isBatchingUpdates) { batchingStrategy.batchedUpdates(enqueueUpdate, component); @@ -2937,21 +3376,37 @@ * if no updates are currently being performed. */ function asap(callback, context) { - "production" !== process.env.NODE_ENV ? invariant(batchingStrategy.isBatchingUpdates, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where' + 'updates are not being batched.') : invariant(batchingStrategy.isBatchingUpdates); + ("production" !== process.env.NODE_ENV ? invariant( + batchingStrategy.isBatchingUpdates, + 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where' + + 'updates are not being batched.' + ) : invariant(batchingStrategy.isBatchingUpdates)); asapCallbackQueue.enqueue(callback, context); asapEnqueued = true; } var ReactUpdatesInjection = { - injectReconcileTransaction: function injectReconcileTransaction(ReconcileTransaction) { - "production" !== process.env.NODE_ENV ? invariant(ReconcileTransaction, 'ReactUpdates: must provide a reconcile transaction class') : invariant(ReconcileTransaction); + injectReconcileTransaction: function(ReconcileTransaction) { + ("production" !== process.env.NODE_ENV ? invariant( + ReconcileTransaction, + 'ReactUpdates: must provide a reconcile transaction class' + ) : invariant(ReconcileTransaction)); ReactUpdates.ReactReconcileTransaction = ReconcileTransaction; }, - injectBatchingStrategy: function injectBatchingStrategy(_batchingStrategy) { - "production" !== process.env.NODE_ENV ? invariant(_batchingStrategy, 'ReactUpdates: must provide a batching strategy') : invariant(_batchingStrategy); - "production" !== process.env.NODE_ENV ? invariant(typeof _batchingStrategy.batchedUpdates === 'function', 'ReactUpdates: must provide a batchedUpdates() function') : invariant(typeof _batchingStrategy.batchedUpdates === 'function'); - "production" !== process.env.NODE_ENV ? invariant(typeof _batchingStrategy.isBatchingUpdates === 'boolean', 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : invariant(typeof _batchingStrategy.isBatchingUpdates === 'boolean'); + injectBatchingStrategy: function(_batchingStrategy) { + ("production" !== process.env.NODE_ENV ? invariant( + _batchingStrategy, + 'ReactUpdates: must provide a batching strategy' + ) : invariant(_batchingStrategy)); + ("production" !== process.env.NODE_ENV ? invariant( + typeof _batchingStrategy.batchedUpdates === 'function', + 'ReactUpdates: must provide a batchedUpdates() function' + ) : invariant(typeof _batchingStrategy.batchedUpdates === 'function')); + ("production" !== process.env.NODE_ENV ? invariant( + typeof _batchingStrategy.isBatchingUpdates === 'boolean', + 'ReactUpdates: must provide an isBatchingUpdates boolean attribute' + ) : invariant(typeof _batchingStrategy.isBatchingUpdates === 'boolean')); batchingStrategy = _batchingStrategy; } }; @@ -2973,6 +3428,7 @@ }; module.exports = ReactUpdates; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -3022,7 +3478,7 @@ * @param {?object} context Context to call `callback` with. * @internal */ - enqueue: function enqueue(callback, context) { + enqueue: function(callback, context) { this._callbacks = this._callbacks || []; this._contexts = this._contexts || []; this._callbacks.push(callback); @@ -3035,11 +3491,14 @@ * * @internal */ - notifyAll: function notifyAll() { + notifyAll: function() { var callbacks = this._callbacks; var contexts = this._contexts; if (callbacks) { - "production" !== process.env.NODE_ENV ? invariant(callbacks.length === contexts.length, 'Mismatched list of contexts in callback queue') : invariant(callbacks.length === contexts.length); + ("production" !== process.env.NODE_ENV ? invariant( + callbacks.length === contexts.length, + 'Mismatched list of contexts in callback queue' + ) : invariant(callbacks.length === contexts.length)); this._callbacks = null; this._contexts = null; for (var i = 0, l = callbacks.length; i < l; i++) { @@ -3055,7 +3514,7 @@ * * @internal */ - reset: function reset() { + reset: function() { this._callbacks = null; this._contexts = null; }, @@ -3063,7 +3522,7 @@ /** * `PooledClass` looks for this. */ - destructor: function destructor() { + destructor: function() { this.reset(); } @@ -3072,6 +3531,7 @@ PooledClass.addPoolingTo(CallbackQueue); module.exports = CallbackQueue; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -3114,13 +3574,17 @@ * @param {string} objectName * @param {object} methodNames */ - measureMethods: function measureMethods(object, objectName, methodNames) { + measureMethods: function(object, objectName, methodNames) { if ("production" !== process.env.NODE_ENV) { for (var key in methodNames) { if (!methodNames.hasOwnProperty(key)) { continue; } - object[key] = ReactPerf.measure(objectName, methodNames[key], object[key]); + object[key] = ReactPerf.measure( + objectName, + methodNames[key], + object[key] + ); } } }, @@ -3133,10 +3597,10 @@ * @param {function} func * @return {function} */ - measure: function measure(objName, fnName, func) { + measure: function(objName, fnName, func) { if ("production" !== process.env.NODE_ENV) { var measuredFunc = null; - var wrapper = function wrapper() { + var wrapper = function() { if (ReactPerf.enableMeasure) { if (!measuredFunc) { measuredFunc = ReactPerf.storedMeasure(objName, fnName, func); @@ -3155,7 +3619,7 @@ /** * @param {function} measure */ - injectMeasure: function injectMeasure(measure) { + injectMeasure: function(measure) { ReactPerf.storedMeasure = measure; } } @@ -3174,6 +3638,7 @@ } module.exports = ReactPerf; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -3216,10 +3681,12 @@ * @final * @internal */ - mountComponent: function mountComponent(internalInstance, rootID, transaction, context) { + mountComponent: function(internalInstance, rootID, transaction, context) { var markup = internalInstance.mountComponent(rootID, transaction, context); if ("production" !== process.env.NODE_ENV) { - ReactElementValidator.checkAndWarnForMutatedProps(internalInstance._currentElement); + ReactElementValidator.checkAndWarnForMutatedProps( + internalInstance._currentElement + ); } transaction.getReactMountReady().enqueue(attachRefs, internalInstance); return markup; @@ -3231,7 +3698,7 @@ * @final * @internal */ - unmountComponent: function unmountComponent(internalInstance) { + unmountComponent: function(internalInstance) { ReactRef.detachRefs(internalInstance, internalInstance._currentElement); internalInstance.unmountComponent(); }, @@ -3245,7 +3712,9 @@ * @param {object} context * @internal */ - receiveComponent: function receiveComponent(internalInstance, nextElement, transaction, context) { + receiveComponent: function( + internalInstance, nextElement, transaction, context + ) { var prevElement = internalInstance._currentElement; if (nextElement === prevElement && nextElement._owner != null) { @@ -3263,7 +3732,10 @@ ReactElementValidator.checkAndWarnForMutatedProps(nextElement); } - var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement); + var refsChanged = ReactRef.shouldUpdateRefs( + prevElement, + nextElement + ); if (refsChanged) { ReactRef.detachRefs(internalInstance, prevElement); @@ -3283,13 +3755,17 @@ * @param {ReactReconcileTransaction} transaction * @internal */ - performUpdateIfNecessary: function performUpdateIfNecessary(internalInstance, transaction) { + performUpdateIfNecessary: function( + internalInstance, + transaction + ) { internalInstance.performUpdateIfNecessary(transaction); } }; module.exports = ReactReconciler; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -3331,14 +3807,14 @@ } } - ReactRef.attachRefs = function (instance, element) { + ReactRef.attachRefs = function(instance, element) { var ref = element.ref; if (ref != null) { attachRef(ref, instance, element._owner); } }; - ReactRef.shouldUpdateRefs = function (prevElement, nextElement) { + ReactRef.shouldUpdateRefs = function(prevElement, nextElement) { // If either the owner or a `ref` has changed, make sure the newest owner // has stored a reference to `this`, and the previous owner (if different) // has forgotten the reference to `this`. We use the element instead @@ -3351,10 +3827,13 @@ // is made. It probably belongs where the key checking and // instantiateReactComponent is done. - return nextElement._owner !== prevElement._owner || nextElement.ref !== prevElement.ref; + return ( + nextElement._owner !== prevElement._owner || + nextElement.ref !== prevElement.ref + ); }; - ReactRef.detachRefs = function (instance, element) { + ReactRef.detachRefs = function(instance, element) { var ref = element.ref; if (ref != null) { detachRef(ref, instance, element._owner); @@ -3363,6 +3842,7 @@ module.exports = ReactRef; + /***/ }, /* 31 */ /***/ function(module, exports, __webpack_require__) { @@ -3419,8 +3899,11 @@ * @return {boolean} True if `object` is a valid owner. * @final */ - isValidOwner: function isValidOwner(object) { - return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function'); + isValidOwner: function(object) { + return !!( + (object && + typeof object.attachRef === 'function' && typeof object.detachRef === 'function') + ); }, /** @@ -3432,8 +3915,15 @@ * @final * @internal */ - addComponentAsRefTo: function addComponentAsRefTo(component, ref, owner) { - "production" !== process.env.NODE_ENV ? invariant(ReactOwner.isValidOwner(owner), 'addComponentAsRefTo(...): Only a ReactOwner can have refs. This ' + 'usually means that you\'re trying to add a ref to a component that ' + 'doesn\'t have an owner (that is, was not created inside of another ' + 'component\'s `render` method). Try rendering this component inside of ' + 'a new top-level component which will hold the ref.') : invariant(ReactOwner.isValidOwner(owner)); + addComponentAsRefTo: function(component, ref, owner) { + ("production" !== process.env.NODE_ENV ? invariant( + ReactOwner.isValidOwner(owner), + 'addComponentAsRefTo(...): Only a ReactOwner can have refs. This ' + + 'usually means that you\'re trying to add a ref to a component that ' + + 'doesn\'t have an owner (that is, was not created inside of another ' + + 'component\'s `render` method). Try rendering this component inside of ' + + 'a new top-level component which will hold the ref.' + ) : invariant(ReactOwner.isValidOwner(owner))); owner.attachRef(ref, component); }, @@ -3446,8 +3936,15 @@ * @final * @internal */ - removeComponentAsRefFrom: function removeComponentAsRefFrom(component, ref, owner) { - "production" !== process.env.NODE_ENV ? invariant(ReactOwner.isValidOwner(owner), 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This ' + 'usually means that you\'re trying to remove a ref to a component that ' + 'doesn\'t have an owner (that is, was not created inside of another ' + 'component\'s `render` method). Try rendering this component inside of ' + 'a new top-level component which will hold the ref.') : invariant(ReactOwner.isValidOwner(owner)); + removeComponentAsRefFrom: function(component, ref, owner) { + ("production" !== process.env.NODE_ENV ? invariant( + ReactOwner.isValidOwner(owner), + 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This ' + + 'usually means that you\'re trying to remove a ref to a component that ' + + 'doesn\'t have an owner (that is, was not created inside of another ' + + 'component\'s `render` method). Try rendering this component inside of ' + + 'a new top-level component which will hold the ref.' + ) : invariant(ReactOwner.isValidOwner(owner))); // Check that `component` is still the current ref because we do not want to // detach the ref if another component stole it. if (owner.getPublicInstance().refs[ref] === component.getPublicInstance()) { @@ -3458,6 +3955,7 @@ }; module.exports = ReactOwner; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -3542,7 +4040,9 @@ */ function getCurrentOwnerDisplayName() { var current = ReactCurrentOwner.current; - return current && getName(current) || undefined; + return ( + current && getName(current) || undefined + ); } /** @@ -3561,7 +4061,11 @@ } element._store.validated = true; - warnAndMonitorForKeyUse('Each child in an array or iterator should have a unique "key" prop.', element, parentType); + warnAndMonitorForKeyUse( + 'Each child in an array or iterator should have a unique "key" prop.', + element, + parentType + ); } /** @@ -3577,7 +4081,11 @@ if (!NUMERIC_PROPERTY_REGEX.test(name)) { return; } - warnAndMonitorForKeyUse('Child objects should have non-numeric keys so ordering is preserved.', element, parentType); + warnAndMonitorForKeyUse( + 'Child objects should have non-numeric keys so ordering is preserved.', + element, + parentType + ); } /** @@ -3590,29 +4098,42 @@ */ function warnAndMonitorForKeyUse(message, element, parentType) { var ownerName = getCurrentOwnerDisplayName(); - var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; + var parentName = typeof parentType === 'string' ? + parentType : parentType.displayName || parentType.name; var useName = ownerName || parentName; - var memoizer = ownerHasKeyUseWarning[message] || (ownerHasKeyUseWarning[message] = {}); + var memoizer = ownerHasKeyUseWarning[message] || ( + (ownerHasKeyUseWarning[message] = {}) + ); if (memoizer.hasOwnProperty(useName)) { return; } memoizer[useName] = true; - var parentOrOwnerAddendum = ownerName ? " Check the render method of " + ownerName + "." : parentName ? " Check the React.render call using <" + parentName + ">." : ''; + var parentOrOwnerAddendum = + ownerName ? (" Check the render method of " + ownerName + ".") : + parentName ? (" Check the React.render call using <" + parentName + ">.") : + ''; // Usually the current owner is the offender, but if it accepts children as a // property, it may be the creator of the child that's responsible for // assigning it a key. var childOwnerAddendum = ''; - if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + if (element && + element._owner && + element._owner !== ReactCurrentOwner.current) { // Name of the component that originally created this child. var childOwnerName = getName(element._owner); - childOwnerAddendum = " It was passed a child from " + childOwnerName + "."; + childOwnerAddendum = (" It was passed a child from " + childOwnerName + "."); } - "production" !== process.env.NODE_ENV ? warning(false, message + '%s%s See https://fb.me/react-warning-keys for more information.', parentOrOwnerAddendum, childOwnerAddendum) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + message + '%s%s See https://fb.me/react-warning-keys for more information.', + parentOrOwnerAddendum, + childOwnerAddendum + ) : null); } /** @@ -3678,7 +4199,14 @@ try { // This is intentionally an invariant that gets caught. It's the same // behavior as without this statement except with a better message. - "production" !== process.env.NODE_ENV ? invariant(typeof propTypes[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], propName) : invariant(typeof propTypes[propName] === 'function'); + ("production" !== process.env.NODE_ENV ? invariant( + typeof propTypes[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + componentName || 'React class', + ReactPropTypeLocationNames[location], + propName + ) : invariant(typeof propTypes[propName] === 'function')); error = propTypes[propName](props, propName, componentName, location); } catch (ex) { error = ex; @@ -3689,7 +4217,7 @@ loggedTypeFailures[error.message] = true; var addendum = getDeclarationErrorAddendum(this); - "production" !== process.env.NODE_ENV ? warning(false, 'Failed propType: %s%s', error.message, addendum) : null; + ("production" !== process.env.NODE_ENV ? warning(false, 'Failed propType: %s%s', error.message, addendum) : null); } } } @@ -3706,7 +4234,8 @@ function warnForPropsMutation(propName, element) { var type = element.type; var elementName = typeof type === 'string' ? type : type.displayName; - var ownerName = element._owner ? element._owner.getPublicInstance().constructor.displayName : null; + var ownerName = element._owner ? + element._owner.getPublicInstance().constructor.displayName : null; var warningKey = propName + '|' + elementName + '|' + ownerName; if (warnedPropsMutations.hasOwnProperty(warningKey)) { @@ -3723,7 +4252,15 @@ ownerInfo = ' The element was created by ' + ownerName + '.'; } - "production" !== process.env.NODE_ENV ? warning(false, 'Don\'t set .props.%s of the React component%s. Instead, specify the ' + 'correct value when initially creating the element or use ' + 'React.cloneElement to make a new element with updated props.%s', propName, elementInfo, ownerInfo) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + 'Don\'t set .props.%s of the React component%s. Instead, specify the ' + + 'correct value when initially creating the element or use ' + + 'React.cloneElement to make a new element with updated props.%s', + propName, + elementInfo, + ownerInfo + ) : null); } // Inline Object.is polyfill @@ -3759,7 +4296,8 @@ for (var propName in props) { if (props.hasOwnProperty(propName)) { - if (!originalProps.hasOwnProperty(propName) || !is(originalProps[propName], props[propName])) { + if (!originalProps.hasOwnProperty(propName) || + !is(originalProps[propName], props[propName])) { warnForPropsMutation(propName, element); // Copy over the new value so that the two props objects match again @@ -3784,13 +4322,24 @@ // to a composite class which may have propTypes. // TODO: Validating a string's propTypes is not decoupled from the // rendering target which is problematic. - var componentClass = ReactNativeComponent.getComponentClassForElement(element); + var componentClass = ReactNativeComponent.getComponentClassForElement( + element + ); var name = componentClass.displayName || componentClass.name; if (componentClass.propTypes) { - checkPropTypes(name, componentClass.propTypes, element.props, ReactPropTypeLocations.prop); + checkPropTypes( + name, + componentClass.propTypes, + element.props, + ReactPropTypeLocations.prop + ); } if (typeof componentClass.getDefaultProps === 'function') { - "production" !== process.env.NODE_ENV ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : null; + ("production" !== process.env.NODE_ENV ? warning( + componentClass.getDefaultProps.isReactClassApproved, + 'getDefaultProps is only used on classic React.createClass ' + + 'definitions. Use a static property named `defaultProps` instead.' + ) : null); } } @@ -3798,10 +4347,15 @@ checkAndWarnForMutatedProps: checkAndWarnForMutatedProps, - createElement: function createElement(type, props, children) { + createElement: function(type, props, children) { // We warn in this case but don't throw. We expect the element creation to // succeed and there will likely be errors in render. - "production" !== process.env.NODE_ENV ? warning(type != null, 'React.createElement: type should not be null or undefined. It should ' + 'be a string (for DOM elements) or a ReactClass (for composite ' + 'components).') : null; + ("production" !== process.env.NODE_ENV ? warning( + type != null, + 'React.createElement: type should not be null or undefined. It should ' + + 'be a string (for DOM elements) or a ReactClass (for composite ' + + 'components).' + ) : null); var element = ReactElement.createElement.apply(this, arguments); @@ -3820,32 +4374,44 @@ return element; }, - createFactory: function createFactory(type) { - var validatedFactory = ReactElementValidator.createElement.bind(null, type); + createFactory: function(type) { + var validatedFactory = ReactElementValidator.createElement.bind( + null, + type + ); // Legacy hook TODO: Warn if this is accessed validatedFactory.type = type; if ("production" !== process.env.NODE_ENV) { try { - Object.defineProperty(validatedFactory, 'type', { - enumerable: false, - get: function get() { - "production" !== process.env.NODE_ENV ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : null; - Object.defineProperty(this, 'type', { - value: type - }); - return type; + Object.defineProperty( + validatedFactory, + 'type', + { + enumerable: false, + get: function() { + ("production" !== process.env.NODE_ENV ? warning( + false, + 'Factory.type is deprecated. Access the class directly ' + + 'before passing it to createFactory.' + ) : null); + Object.defineProperty(this, 'type', { + value: type + }); + return type; + } } - }); + ); } catch (x) { // IE will fail on defineProperty (es5-shim/sham too) } } + return validatedFactory; }, - cloneElement: function cloneElement(element, props, children) { + cloneElement: function(element, props, children) { var newElement = ReactElement.cloneElement.apply(this, arguments); for (var i = 2; i < arguments.length; i++) { validateChildKeys(arguments[i], newElement.type); @@ -3857,6 +4423,7 @@ }; module.exports = ReactElementValidator; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -3886,6 +4453,7 @@ module.exports = ReactPropTypeLocations; + /***/ }, /* 34 */ /***/ function(module, exports, __webpack_require__) { @@ -3914,6 +4482,7 @@ } module.exports = ReactPropTypeLocationNames; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -3945,22 +4514,22 @@ var ReactNativeComponentInjection = { // This accepts a class that receives the tag string. This is a catch all // that can render any kind of tag. - injectGenericComponentClass: function injectGenericComponentClass(componentClass) { + injectGenericComponentClass: function(componentClass) { genericComponentClass = componentClass; }, // This accepts a text component class that takes the text string to be // rendered as props. - injectTextComponentClass: function injectTextComponentClass(componentClass) { + injectTextComponentClass: function(componentClass) { textComponentClass = componentClass; }, // This accepts a keyed object with classes as values. Each key represents a // tag. That particular tag will use this class instead of the generic one. - injectComponentClasses: function injectComponentClasses(componentClasses) { + injectComponentClasses: function(componentClasses) { assign(tagToComponentClass, componentClasses); }, // Temporary hack since we expect DOM refs to behave like composites, // for this release. - injectAutoWrapper: function injectAutoWrapper(wrapperFactory) { + injectAutoWrapper: function(wrapperFactory) { autoGenerateWrapperClass = wrapperFactory; } }; @@ -3990,7 +4559,11 @@ * @return {function} The internal class constructor function. */ function createInternalComponent(element) { - "production" !== process.env.NODE_ENV ? invariant(genericComponentClass, 'There is no registered component for the tag %s', element.type) : invariant(genericComponentClass); + ("production" !== process.env.NODE_ENV ? invariant( + genericComponentClass, + 'There is no registered component for the tag %s', + element.type + ) : invariant(genericComponentClass)); return new genericComponentClass(element.type, element.props); } @@ -4019,6 +4592,7 @@ }; module.exports = ReactNativeComponent; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -4109,7 +4683,7 @@ * That can be useful if you decide to make your subclass of this mixin a * "PooledClass". */ - reinitializeTransaction: function reinitializeTransaction() { + reinitializeTransaction: function() { this.transactionWrappers = this.getTransactionWrappers(); if (!this.wrapperInitData) { this.wrapperInitData = []; @@ -4127,7 +4701,7 @@ */ getTransactionWrappers: null, - isInTransaction: function isInTransaction() { + isInTransaction: function() { return !!this._isInTransaction; }, @@ -4142,8 +4716,12 @@ * Helps prevent need to bind in many cases. * @return Return value from `method`. */ - perform: function perform(method, scope, a, b, c, d, e, f) { - "production" !== process.env.NODE_ENV ? invariant(!this.isInTransaction(), 'Transaction.perform(...): Cannot initialize a transaction when there ' + 'is already an outstanding transaction.') : invariant(!this.isInTransaction()); + perform: function(method, scope, a, b, c, d, e, f) { + ("production" !== process.env.NODE_ENV ? invariant( + !this.isInTransaction(), + 'Transaction.perform(...): Cannot initialize a transaction when there ' + + 'is already an outstanding transaction.' + ) : invariant(!this.isInTransaction())); var errorThrown; var ret; try { @@ -4163,7 +4741,8 @@ // by invoking `closeAll`. try { this.closeAll(0); - } catch (err) {} + } catch (err) { + } } else { // Since `method` didn't throw, we don't want to silence the exception // here. @@ -4176,7 +4755,7 @@ return ret; }, - initializeAll: function initializeAll(startIndex) { + initializeAll: function(startIndex) { var transactionWrappers = this.transactionWrappers; for (var i = startIndex; i < transactionWrappers.length; i++) { var wrapper = transactionWrappers[i]; @@ -4186,7 +4765,9 @@ // of initialize -- if it's still set to OBSERVED_ERROR in the finally // block, it means wrapper.initialize threw. this.wrapperInitData[i] = Transaction.OBSERVED_ERROR; - this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null; + this.wrapperInitData[i] = wrapper.initialize ? + wrapper.initialize.call(this) : + null; } finally { if (this.wrapperInitData[i] === Transaction.OBSERVED_ERROR) { // The initializer for wrapper i threw an error; initialize the @@ -4194,7 +4775,8 @@ // that the first error is the one to bubble up. try { this.initializeAll(i + 1); - } catch (err) {} + } catch (err) { + } } } } @@ -4206,8 +4788,11 @@ * (`close`rs that correspond to initializers that failed will not be * invoked). */ - closeAll: function closeAll(startIndex) { - "production" !== process.env.NODE_ENV ? invariant(this.isInTransaction(), 'Transaction.closeAll(): Cannot close transaction when none are open.') : invariant(this.isInTransaction()); + closeAll: function(startIndex) { + ("production" !== process.env.NODE_ENV ? invariant( + this.isInTransaction(), + 'Transaction.closeAll(): Cannot close transaction when none are open.' + ) : invariant(this.isInTransaction())); var transactionWrappers = this.transactionWrappers; for (var i = startIndex; i < transactionWrappers.length; i++) { var wrapper = transactionWrappers[i]; @@ -4230,7 +4815,8 @@ // first error is the one to bubble up. try { this.closeAll(i + 1); - } catch (e) {} + } catch (e) { + } } } } @@ -4250,6 +4836,7 @@ }; module.exports = Transaction; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -4285,7 +4872,7 @@ var keyOf = __webpack_require__(39); var warning = __webpack_require__(15); - var MIXINS_KEY = keyOf({ mixins: null }); + var MIXINS_KEY = keyOf({mixins: null}); /** * Policies that describe methods in `ReactClassInterface`. @@ -4312,6 +4899,7 @@ DEFINE_MANY_MERGED: null }); + var injectedMixins = []; /** @@ -4433,6 +5021,8 @@ */ render: SpecPolicy.DEFINE_ONCE, + + // ==== Delegate methods ==== /** @@ -4543,6 +5133,8 @@ */ componentWillUnmount: SpecPolicy.DEFINE_MANY, + + // ==== Advanced methods ==== /** @@ -4569,47 +5161,74 @@ * which all other static methods are defined. */ var RESERVED_SPEC_KEYS = { - displayName: function displayName(Constructor, _displayName) { - Constructor.displayName = _displayName; + displayName: function(Constructor, displayName) { + Constructor.displayName = displayName; }, - mixins: function mixins(Constructor, _mixins) { - if (_mixins) { - for (var i = 0; i < _mixins.length; i++) { - mixSpecIntoComponent(Constructor, _mixins[i]); + mixins: function(Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); } } }, - childContextTypes: function childContextTypes(Constructor, _childContextTypes) { + childContextTypes: function(Constructor, childContextTypes) { if ("production" !== process.env.NODE_ENV) { - validateTypeDef(Constructor, _childContextTypes, ReactPropTypeLocations.childContext); + validateTypeDef( + Constructor, + childContextTypes, + ReactPropTypeLocations.childContext + ); } - Constructor.childContextTypes = assign({}, Constructor.childContextTypes, _childContextTypes); + Constructor.childContextTypes = assign( + {}, + Constructor.childContextTypes, + childContextTypes + ); }, - contextTypes: function contextTypes(Constructor, _contextTypes) { + contextTypes: function(Constructor, contextTypes) { if ("production" !== process.env.NODE_ENV) { - validateTypeDef(Constructor, _contextTypes, ReactPropTypeLocations.context); + validateTypeDef( + Constructor, + contextTypes, + ReactPropTypeLocations.context + ); } - Constructor.contextTypes = assign({}, Constructor.contextTypes, _contextTypes); + Constructor.contextTypes = assign( + {}, + Constructor.contextTypes, + contextTypes + ); }, /** * Special case getDefaultProps which should move into statics but requires * automatic merging. */ - getDefaultProps: function getDefaultProps(Constructor, _getDefaultProps) { + getDefaultProps: function(Constructor, getDefaultProps) { if (Constructor.getDefaultProps) { - Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, _getDefaultProps); + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps + ); } else { - Constructor.getDefaultProps = _getDefaultProps; + Constructor.getDefaultProps = getDefaultProps; } }, - propTypes: function propTypes(Constructor, _propTypes) { + propTypes: function(Constructor, propTypes) { if ("production" !== process.env.NODE_ENV) { - validateTypeDef(Constructor, _propTypes, ReactPropTypeLocations.prop); + validateTypeDef( + Constructor, + propTypes, + ReactPropTypeLocations.prop + ); } - Constructor.propTypes = assign({}, Constructor.propTypes, _propTypes); + Constructor.propTypes = assign( + {}, + Constructor.propTypes, + propTypes + ); }, - statics: function statics(Constructor, _statics) { - mixStaticSpecIntoComponent(Constructor, _statics); + statics: function(Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); } }; @@ -4618,22 +5237,45 @@ if (typeDef.hasOwnProperty(propName)) { // use a warning instead of an invariant so components // don't show up in prod but not in __DEV__ - "production" !== process.env.NODE_ENV ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : null; + ("production" !== process.env.NODE_ENV ? warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName + ) : null); } } } function validateMethodOverride(proto, name) { - var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? + ReactClassInterface[name] : + null; // Disallow overriding of base class methods unless explicitly allowed. if (ReactClassMixin.hasOwnProperty(name)) { - "production" !== process.env.NODE_ENV ? invariant(specPolicy === SpecPolicy.OVERRIDE_BASE, 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name) : invariant(specPolicy === SpecPolicy.OVERRIDE_BASE); + ("production" !== process.env.NODE_ENV ? invariant( + specPolicy === SpecPolicy.OVERRIDE_BASE, + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name + ) : invariant(specPolicy === SpecPolicy.OVERRIDE_BASE)); } // Disallow defining methods more than once unless explicitly allowed. if (proto.hasOwnProperty(name)) { - "production" !== process.env.NODE_ENV ? invariant(specPolicy === SpecPolicy.DEFINE_MANY || specPolicy === SpecPolicy.DEFINE_MANY_MERGED, 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name) : invariant(specPolicy === SpecPolicy.DEFINE_MANY || specPolicy === SpecPolicy.DEFINE_MANY_MERGED); + ("production" !== process.env.NODE_ENV ? invariant( + specPolicy === SpecPolicy.DEFINE_MANY || + specPolicy === SpecPolicy.DEFINE_MANY_MERGED, + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name + ) : invariant(specPolicy === SpecPolicy.DEFINE_MANY || + specPolicy === SpecPolicy.DEFINE_MANY_MERGED)); } } @@ -4646,8 +5288,16 @@ return; } - "production" !== process.env.NODE_ENV ? invariant(typeof spec !== 'function', 'ReactClass: You\'re attempting to ' + 'use a component class as a mixin. Instead, just use a regular object.') : invariant(typeof spec !== 'function'); - "production" !== process.env.NODE_ENV ? invariant(!ReactElement.isValidElement(spec), 'ReactClass: You\'re attempting to ' + 'use a component as a mixin. Instead, just use a regular object.') : invariant(!ReactElement.isValidElement(spec)); + ("production" !== process.env.NODE_ENV ? invariant( + typeof spec !== 'function', + 'ReactClass: You\'re attempting to ' + + 'use a component class as a mixin. Instead, just use a regular object.' + ) : invariant(typeof spec !== 'function')); + ("production" !== process.env.NODE_ENV ? invariant( + !ReactElement.isValidElement(spec), + 'ReactClass: You\'re attempting to ' + + 'use a component as a mixin. Instead, just use a regular object.' + ) : invariant(!ReactElement.isValidElement(spec))); var proto = Constructor.prototype; @@ -4678,11 +5328,16 @@ // The following member methods should not be automatically bound: // 1. Expected ReactClass methods (in the "interface"). // 2. Overridden methods (that were mixed in). - var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isReactClassMethod = + ReactClassInterface.hasOwnProperty(name); var isAlreadyDefined = proto.hasOwnProperty(name); var markedDontBind = property && property.__reactDontBind; var isFunction = typeof property === 'function'; - var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && !markedDontBind; + var shouldAutoBind = + isFunction && + !isReactClassMethod && + !isAlreadyDefined && + !markedDontBind; if (shouldAutoBind) { if (!proto.__reactAutoBindMap) { @@ -4695,7 +5350,17 @@ var specPolicy = ReactClassInterface[name]; // These cases should already be caught by validateMethodOverride - "production" !== process.env.NODE_ENV ? invariant(isReactClassMethod && (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY), 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name) : invariant(isReactClassMethod && (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY)); + ("production" !== process.env.NODE_ENV ? invariant( + isReactClassMethod && ( + (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY) + ), + 'ReactClass: Unexpected spec policy %s for key %s ' + + 'when mixing in component specs.', + specPolicy, + name + ) : invariant(isReactClassMethod && ( + (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY) + ))); // For methods which are defined more than once, call the existing // methods before calling the new property, merging if appropriate. @@ -4729,11 +5394,24 @@ continue; } - var isReserved = (name in RESERVED_SPEC_KEYS); - "production" !== process.env.NODE_ENV ? invariant(!isReserved, '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) : invariant(!isReserved); - - var isInherited = (name in Constructor); - "production" !== process.env.NODE_ENV ? invariant(!isInherited, 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name) : invariant(!isInherited); + var isReserved = name in RESERVED_SPEC_KEYS; + ("production" !== process.env.NODE_ENV ? invariant( + !isReserved, + '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 + ) : invariant(!isReserved)); + + var isInherited = name in Constructor; + ("production" !== process.env.NODE_ENV ? invariant( + !isInherited, + 'ReactClass: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name + ) : invariant(!isInherited)); Constructor[name] = property; } } @@ -4746,11 +5424,22 @@ * @return {object} one after it has been mutated to contain everything in two. */ function mergeIntoWithNoDuplicateKeys(one, two) { - "production" !== process.env.NODE_ENV ? invariant(one && two && typeof one === 'object' && typeof two === 'object', 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : invariant(one && two && typeof one === 'object' && typeof two === 'object'); + ("production" !== process.env.NODE_ENV ? invariant( + one && two && typeof one === 'object' && typeof two === 'object', + 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' + ) : invariant(one && two && typeof one === 'object' && typeof two === 'object')); for (var key in two) { if (two.hasOwnProperty(key)) { - "production" !== process.env.NODE_ENV ? invariant(one[key] === undefined, '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) : invariant(one[key] === undefined); + ("production" !== process.env.NODE_ENV ? invariant( + one[key] === undefined, + '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 + ) : invariant(one[key] === undefined)); one[key] = two[key]; } } @@ -4812,15 +5501,25 @@ var componentName = component.constructor.displayName; var _bind = boundMethod.bind; /* eslint-disable block-scoped-var, no-undef */ - boundMethod.bind = function (newThis) { - for (var args = [], $__0 = 1, $__1 = arguments.length; $__0 < $__1; $__0++) args.push(arguments[$__0]); + boundMethod.bind = function(newThis ) {for (var args=[],$__0=1,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]); // User is trying to bind() an autobound method; we effectively will // ignore the value of "this" that the user is trying to use, so // let's warn. if (newThis !== component && newThis !== null) { - "production" !== process.env.NODE_ENV ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName + ) : null); } else if (!args.length) { - "production" !== process.env.NODE_ENV ? 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) : null; + ("production" !== process.env.NODE_ENV ? 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 + ) : null); return boundMethod; } var reboundMethod = _bind.apply(boundMethod, arguments); @@ -4843,16 +5542,27 @@ for (var autoBindKey in component.__reactAutoBindMap) { if (component.__reactAutoBindMap.hasOwnProperty(autoBindKey)) { var method = component.__reactAutoBindMap[autoBindKey]; - component[autoBindKey] = bindAutoBindMethod(component, ReactErrorUtils.guard(method, component.constructor.displayName + '.' + autoBindKey)); + component[autoBindKey] = bindAutoBindMethod( + component, + ReactErrorUtils.guard( + method, + component.constructor.displayName + '.' + autoBindKey + ) + ); } } } var typeDeprecationDescriptor = { enumerable: false, - get: function get() { + get: function() { var displayName = this.displayName || this.name || 'Component'; - "production" !== process.env.NODE_ENV ? warning(false, '%s.type is deprecated. Use %s directly to access the class.', displayName, displayName) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + '%s.type is deprecated. Use %s directly to access the class.', + displayName, + displayName + ) : null); Object.defineProperty(this, 'type', { value: this }); @@ -4870,7 +5580,7 @@ * TODO: This will be deprecated because state should always keep a consistent * type signature and the only use case for this, is to avoid that. */ - replaceState: function replaceState(newState, callback) { + replaceState: function(newState, callback) { ReactUpdateQueue.enqueueReplaceState(this, newState); if (callback) { ReactUpdateQueue.enqueueCallback(this, callback); @@ -4883,16 +5593,27 @@ * @protected * @final */ - isMounted: function isMounted() { + isMounted: function() { if ("production" !== process.env.NODE_ENV) { var owner = ReactCurrentOwner.current; if (owner !== null) { - "production" !== process.env.NODE_ENV ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : null; + ("production" !== process.env.NODE_ENV ? warning( + owner._warnedAboutRefsInRender, + '%s is accessing isMounted inside its render() function. ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + owner.getName() || 'A component' + ) : null); owner._warnedAboutRefsInRender = true; } } var internalInstance = ReactInstanceMap.get(this); - return internalInstance && internalInstance !== ReactLifeCycle.currentlyMountingInstance; + return ( + internalInstance && + internalInstance !== ReactLifeCycle.currentlyMountingInstance + ); }, /** @@ -4904,7 +5625,7 @@ * @public * @deprecated */ - setProps: function setProps(partialProps, callback) { + setProps: function(partialProps, callback) { ReactUpdateQueue.enqueueSetProps(this, partialProps); if (callback) { ReactUpdateQueue.enqueueCallback(this, callback); @@ -4920,7 +5641,7 @@ * @public * @deprecated */ - replaceProps: function replaceProps(newProps, callback) { + replaceProps: function(newProps, callback) { ReactUpdateQueue.enqueueReplaceProps(this, newProps); if (callback) { ReactUpdateQueue.enqueueCallback(this, callback); @@ -4928,8 +5649,12 @@ } }; - var ReactClassComponent = function ReactClassComponent() {}; - assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); + var ReactClassComponent = function() {}; + assign( + ReactClassComponent.prototype, + ReactComponent.prototype, + ReactClassMixin + ); /** * Module for creating composite components. @@ -4945,13 +5670,17 @@ * @return {function} Component constructor function. * @public */ - createClass: function createClass(spec) { - var Constructor = function Constructor(props, context) { + createClass: function(spec) { + var Constructor = function(props, context) { // This constructor is overridden by mocks. The argument is used // by mocks to assert on what gets mounted. if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : null; + ("production" !== process.env.NODE_ENV ? warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: https://fb.me/react-legacyfactory' + ) : null); } // Wire up auto-binding @@ -4969,20 +5698,27 @@ var initialState = this.getInitialState ? this.getInitialState() : null; if ("production" !== process.env.NODE_ENV) { // We allow auto-mocks to proceed as if they're returning null. - if (typeof initialState === 'undefined' && this.getInitialState._isMockFunction) { + if (typeof initialState === 'undefined' && + this.getInitialState._isMockFunction) { // This is probably bad practice. Consider warning here and // deprecating this convenience. initialState = null; } } - "production" !== process.env.NODE_ENV ? invariant(typeof initialState === 'object' && !Array.isArray(initialState), '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : invariant(typeof initialState === 'object' && !Array.isArray(initialState)); + ("production" !== process.env.NODE_ENV ? invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent' + ) : invariant(typeof initialState === 'object' && !Array.isArray(initialState))); this.state = initialState; }; Constructor.prototype = new ReactClassComponent(); Constructor.prototype.constructor = Constructor; - injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + injectedMixins.forEach( + mixSpecIntoComponent.bind(null, Constructor) + ); mixSpecIntoComponent(Constructor, spec); @@ -5004,10 +5740,20 @@ } } - "production" !== process.env.NODE_ENV ? invariant(Constructor.prototype.render, 'createClass(...): Class specification must implement a `render` method.') : invariant(Constructor.prototype.render); + ("production" !== process.env.NODE_ENV ? invariant( + Constructor.prototype.render, + 'createClass(...): Class specification must implement a `render` method.' + ) : invariant(Constructor.prototype.render)); if ("production" !== process.env.NODE_ENV) { - "production" !== process.env.NODE_ENV ? 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') : null; + ("production" !== process.env.NODE_ENV ? 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' + ) : null); } // Reduce time spent doing lookups by setting these on the prototype. @@ -5031,7 +5777,7 @@ }, injection: { - injectMixin: function injectMixin(mixin) { + injectMixin: function(mixin) { injectedMixins.push(mixin); } } @@ -5039,6 +5785,7 @@ }; module.exports = ReactClass; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -5069,13 +5816,14 @@ * @param {string} name The name of the guard * @return {function} */ - guard: function guard(func, name) { + guard: function(func, name) { return func; } }; module.exports = ReactErrorUtils; + /***/ }, /* 39 */ /***/ function(module, exports) { @@ -5101,9 +5849,7 @@ * 'xa12' in that case. Resolve keys you want to use once at startup time, then * reuse those resolutions. */ - "use strict"; - - var keyOf = function keyOf(oneKeyObj) { + var keyOf = function(oneKeyObj) { var key; for (key in oneKeyObj) { if (!oneKeyObj.hasOwnProperty(key)) { @@ -5114,8 +5860,10 @@ return null; }; + module.exports = keyOf; + /***/ }, /* 40 */ /***/ function(module, exports, __webpack_require__) { @@ -5295,6 +6043,7 @@ }, createDOMFactory); module.exports = ReactDOM; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -5353,6 +6102,7 @@ module.exports = mapObject; + /***/ }, /* 42 */ /***/ function(module, exports, __webpack_require__) { @@ -5372,7 +6122,8 @@ 'use strict'; var DOMPropertyOperations = __webpack_require__(43); - var ReactComponentBrowserEnvironment = __webpack_require__(47); + var ReactComponentBrowserEnvironment = + __webpack_require__(47); var ReactDOMComponent = __webpack_require__(87); var assign = __webpack_require__(13); @@ -5393,7 +6144,7 @@ * @extends ReactComponent * @internal */ - var ReactDOMTextComponent = function ReactDOMTextComponent(props) { + var ReactDOMTextComponent = function(props) { // This constructor and its argument is currently used by mocks. }; @@ -5403,7 +6154,7 @@ * @param {ReactText} text * @internal */ - construct: function construct(text) { + construct: function(text) { // TODO: This is really a ReactText (ReactNode), not a ReactElement this._currentElement = text; this._stringText = '' + text; @@ -5422,7 +6173,7 @@ * @return {string} Markup for this text node. * @internal */ - mountComponent: function mountComponent(rootID, transaction, context) { + mountComponent: function(rootID, transaction, context) { this._rootNodeID = rootID; var escapedText = escapeTextContentForBrowser(this._stringText); @@ -5433,7 +6184,11 @@ return escapedText; } - return '' + escapedText + ''; + return ( + '' + + escapedText + + '' + ); }, /** @@ -5443,7 +6198,7 @@ * @param {ReactReconcileTransaction} transaction * @internal */ - receiveComponent: function receiveComponent(nextText, transaction) { + receiveComponent: function(nextText, transaction) { if (nextText !== this._currentElement) { this._currentElement = nextText; var nextStringText = '' + nextText; @@ -5452,12 +6207,15 @@ // and/or updateComponent to do the actual update for consistency with // other component types? this._stringText = nextStringText; - ReactDOMComponent.BackendIDOperations.updateTextContentByID(this._rootNodeID, nextStringText); + ReactDOMComponent.BackendIDOperations.updateTextContentByID( + this._rootNodeID, + nextStringText + ); } } }, - unmountComponent: function unmountComponent() { + unmountComponent: function() { ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID); } @@ -5465,6 +6223,7 @@ module.exports = ReactDOMTextComponent; + /***/ }, /* 43 */ /***/ function(module, exports, __webpack_require__) { @@ -5489,7 +6248,11 @@ var warning = __webpack_require__(15); function shouldIgnoreValue(name, value) { - return value == null || DOMProperty.hasBooleanValue[name] && !value || DOMProperty.hasNumericValue[name] && isNaN(value) || DOMProperty.hasPositiveNumericValue[name] && value < 1 || DOMProperty.hasOverloadedBooleanValue[name] && value === false; + return value == null || + (DOMProperty.hasBooleanValue[name] && !value) || + (DOMProperty.hasNumericValue[name] && isNaN(value)) || + (DOMProperty.hasPositiveNumericValue[name] && (value < 1)) || + (DOMProperty.hasOverloadedBooleanValue[name] && value === false); } if ("production" !== process.env.NODE_ENV) { @@ -5501,8 +6264,9 @@ }; var warnedProperties = {}; - var warnUnknownProperty = function warnUnknownProperty(name) { - if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { + var warnUnknownProperty = function(name) { + if (reactProps.hasOwnProperty(name) && reactProps[name] || + warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { return; } @@ -5510,11 +6274,23 @@ var lowerCasedName = name.toLowerCase(); // data-* attributes should be lowercase; suggest the lowercase version - var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null; + var standardName = ( + DOMProperty.isCustomAttribute(lowerCasedName) ? + lowerCasedName : + DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? + DOMProperty.getPossibleStandardName[lowerCasedName] : + null + ); // For now, only warn when we have a suggested correction. This prevents // logging too much when using transferPropsTo. - "production" !== process.env.NODE_ENV ? warning(standardName == null, 'Unknown DOM property %s. Did you mean %s?', name, standardName) : null; + ("production" !== process.env.NODE_ENV ? warning( + standardName == null, + 'Unknown DOM property %s. Did you mean %s?', + name, + standardName + ) : null); + }; } @@ -5529,8 +6305,9 @@ * @param {string} id Unescaped ID. * @return {string} Markup string. */ - createMarkupForID: function createMarkupForID(id) { - return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id); + createMarkupForID: function(id) { + return DOMProperty.ID_ATTRIBUTE_NAME + '=' + + quoteAttributeValueForBrowser(id); }, /** @@ -5540,13 +6317,15 @@ * @param {*} value * @return {?string} Markup string, or null if the property was invalid. */ - createMarkupForProperty: function createMarkupForProperty(name, value) { - if (DOMProperty.isStandardName.hasOwnProperty(name) && DOMProperty.isStandardName[name]) { + createMarkupForProperty: function(name, value) { + if (DOMProperty.isStandardName.hasOwnProperty(name) && + DOMProperty.isStandardName[name]) { if (shouldIgnoreValue(name, value)) { return ''; } var attributeName = DOMProperty.getAttributeName[name]; - if (DOMProperty.hasBooleanValue[name] || DOMProperty.hasOverloadedBooleanValue[name] && value === true) { + if (DOMProperty.hasBooleanValue[name] || + (DOMProperty.hasOverloadedBooleanValue[name] && value === true)) { return attributeName; } return attributeName + '=' + quoteAttributeValueForBrowser(value); @@ -5568,8 +6347,9 @@ * @param {string} name * @param {*} value */ - setValueForProperty: function setValueForProperty(node, name, value) { - if (DOMProperty.isStandardName.hasOwnProperty(name) && DOMProperty.isStandardName[name]) { + setValueForProperty: function(node, name, value) { + if (DOMProperty.isStandardName.hasOwnProperty(name) && + DOMProperty.isStandardName[name]) { var mutationMethod = DOMProperty.getMutationMethod[name]; if (mutationMethod) { mutationMethod(node, value); @@ -5583,7 +6363,8 @@ var propName = DOMProperty.getPropertyName[name]; // Must explicitly cast values for HAS_SIDE_EFFECTS-properties to the // property type before comparing; only `value` does and is string. - if (!DOMProperty.hasSideEffects[name] || '' + node[propName] !== '' + value) { + if (!DOMProperty.hasSideEffects[name] || + ('' + node[propName]) !== ('' + value)) { // Contrary to `setAttribute`, object properties are properly // `toString`ed by IE8/9. node[propName] = value; @@ -5606,8 +6387,9 @@ * @param {DOMElement} node * @param {string} name */ - deleteValueForProperty: function deleteValueForProperty(node, name) { - if (DOMProperty.isStandardName.hasOwnProperty(name) && DOMProperty.isStandardName[name]) { + deleteValueForProperty: function(node, name) { + if (DOMProperty.isStandardName.hasOwnProperty(name) && + DOMProperty.isStandardName[name]) { var mutationMethod = DOMProperty.getMutationMethod[name]; if (mutationMethod) { mutationMethod(node, undefined); @@ -5615,8 +6397,12 @@ node.removeAttribute(DOMProperty.getAttributeName[name]); } else { var propName = DOMProperty.getPropertyName[name]; - var defaultValue = DOMProperty.getDefaultValueForProperty(node.nodeName, propName); - if (!DOMProperty.hasSideEffects[name] || '' + node[propName] !== defaultValue) { + var defaultValue = DOMProperty.getDefaultValueForProperty( + node.nodeName, + propName + ); + if (!DOMProperty.hasSideEffects[name] || + ('' + node[propName]) !== defaultValue) { node[propName] = defaultValue; } } @@ -5630,6 +6416,7 @@ }; module.exports = DOMPropertyOperations; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -5696,18 +6483,27 @@ * * @param {object} domPropertyConfig the config as described above. */ - injectDOMPropertyConfig: function injectDOMPropertyConfig(domPropertyConfig) { + injectDOMPropertyConfig: function(domPropertyConfig) { var Properties = domPropertyConfig.Properties || {}; var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; if (domPropertyConfig.isCustomAttribute) { - DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); + DOMProperty._isCustomAttributeFunctions.push( + domPropertyConfig.isCustomAttribute + ); } for (var propName in Properties) { - "production" !== process.env.NODE_ENV ? invariant(!DOMProperty.isStandardName.hasOwnProperty(propName), '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) : invariant(!DOMProperty.isStandardName.hasOwnProperty(propName)); + ("production" !== process.env.NODE_ENV ? invariant( + !DOMProperty.isStandardName.hasOwnProperty(propName), + '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 + ) : invariant(!DOMProperty.isStandardName.hasOwnProperty(propName))); DOMProperty.isStandardName[propName] = true; @@ -5722,7 +6518,10 @@ DOMProperty.getAttributeName[propName] = lowerCased; } - DOMProperty.getPropertyName[propName] = DOMPropertyNames.hasOwnProperty(propName) ? DOMPropertyNames[propName] : propName; + DOMProperty.getPropertyName[propName] = + DOMPropertyNames.hasOwnProperty(propName) ? + DOMPropertyNames[propName] : + propName; if (DOMMutationMethods.hasOwnProperty(propName)) { DOMProperty.getMutationMethod[propName] = DOMMutationMethods[propName]; @@ -5731,17 +6530,45 @@ } var propConfig = Properties[propName]; - DOMProperty.mustUseAttribute[propName] = checkMask(propConfig, DOMPropertyInjection.MUST_USE_ATTRIBUTE); - DOMProperty.mustUseProperty[propName] = checkMask(propConfig, DOMPropertyInjection.MUST_USE_PROPERTY); - DOMProperty.hasSideEffects[propName] = checkMask(propConfig, DOMPropertyInjection.HAS_SIDE_EFFECTS); - DOMProperty.hasBooleanValue[propName] = checkMask(propConfig, DOMPropertyInjection.HAS_BOOLEAN_VALUE); - DOMProperty.hasNumericValue[propName] = checkMask(propConfig, DOMPropertyInjection.HAS_NUMERIC_VALUE); - DOMProperty.hasPositiveNumericValue[propName] = checkMask(propConfig, DOMPropertyInjection.HAS_POSITIVE_NUMERIC_VALUE); - DOMProperty.hasOverloadedBooleanValue[propName] = checkMask(propConfig, DOMPropertyInjection.HAS_OVERLOADED_BOOLEAN_VALUE); - - "production" !== process.env.NODE_ENV ? invariant(!DOMProperty.mustUseAttribute[propName] || !DOMProperty.mustUseProperty[propName], 'DOMProperty: Cannot require using both attribute and property: %s', propName) : invariant(!DOMProperty.mustUseAttribute[propName] || !DOMProperty.mustUseProperty[propName]); - "production" !== process.env.NODE_ENV ? invariant(DOMProperty.mustUseProperty[propName] || !DOMProperty.hasSideEffects[propName], 'DOMProperty: Properties that have side effects must use property: %s', propName) : invariant(DOMProperty.mustUseProperty[propName] || !DOMProperty.hasSideEffects[propName]); - "production" !== process.env.NODE_ENV ? invariant(!!DOMProperty.hasBooleanValue[propName] + !!DOMProperty.hasNumericValue[propName] + !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1, 'DOMProperty: Value can be one of boolean, overloaded boolean, or ' + 'numeric value, but not a combination: %s', propName) : invariant(!!DOMProperty.hasBooleanValue[propName] + !!DOMProperty.hasNumericValue[propName] + !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1); + DOMProperty.mustUseAttribute[propName] = + checkMask(propConfig, DOMPropertyInjection.MUST_USE_ATTRIBUTE); + DOMProperty.mustUseProperty[propName] = + checkMask(propConfig, DOMPropertyInjection.MUST_USE_PROPERTY); + DOMProperty.hasSideEffects[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_SIDE_EFFECTS); + DOMProperty.hasBooleanValue[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_BOOLEAN_VALUE); + DOMProperty.hasNumericValue[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_NUMERIC_VALUE); + DOMProperty.hasPositiveNumericValue[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_POSITIVE_NUMERIC_VALUE); + DOMProperty.hasOverloadedBooleanValue[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_OVERLOADED_BOOLEAN_VALUE); + + ("production" !== process.env.NODE_ENV ? invariant( + !DOMProperty.mustUseAttribute[propName] || + !DOMProperty.mustUseProperty[propName], + 'DOMProperty: Cannot require using both attribute and property: %s', + propName + ) : invariant(!DOMProperty.mustUseAttribute[propName] || + !DOMProperty.mustUseProperty[propName])); + ("production" !== process.env.NODE_ENV ? invariant( + DOMProperty.mustUseProperty[propName] || + !DOMProperty.hasSideEffects[propName], + 'DOMProperty: Properties that have side effects must use property: %s', + propName + ) : invariant(DOMProperty.mustUseProperty[propName] || + !DOMProperty.hasSideEffects[propName])); + ("production" !== process.env.NODE_ENV ? invariant( + !!DOMProperty.hasBooleanValue[propName] + + !!DOMProperty.hasNumericValue[propName] + + !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1, + 'DOMProperty: Value can be one of boolean, overloaded boolean, or ' + + 'numeric value, but not a combination: %s', + propName + ) : invariant(!!DOMProperty.hasBooleanValue[propName] + + !!DOMProperty.hasNumericValue[propName] + + !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1)); } } }; @@ -5856,7 +6683,7 @@ * Checks whether a property name is a custom attribute. * @method */ - isCustomAttribute: function isCustomAttribute(attributeName) { + isCustomAttribute: function(attributeName) { for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; if (isCustomAttributeFn(attributeName)) { @@ -5874,7 +6701,7 @@ * TODO: Is it better to grab all the possible properties when creating an * element to avoid having to create the same element twice? */ - getDefaultValueForProperty: function getDefaultValueForProperty(nodeName, prop) { + getDefaultValueForProperty: function(nodeName, prop) { var nodeDefaults = defaultValueCache[nodeName]; var testElement; if (!nodeDefaults) { @@ -5891,6 +6718,7 @@ }; module.exports = DOMProperty; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -5924,6 +6752,7 @@ module.exports = quoteAttributeValueForBrowser; + /***/ }, /* 46 */ /***/ function(module, exports) { @@ -5967,6 +6796,7 @@ module.exports = escapeTextContentForBrowser; + /***/ }, /* 47 */ /***/ function(module, exports, __webpack_require__) { @@ -5996,9 +6826,11 @@ */ var ReactComponentBrowserEnvironment = { - processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, + processChildrenUpdates: + ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, - replaceNodeWithMarkupByID: ReactDOMIDOperations.dangerouslyReplaceNodeWithMarkupByID, + replaceNodeWithMarkupByID: + ReactDOMIDOperations.dangerouslyReplaceNodeWithMarkupByID, /** * If a particular environment requires that some resources be cleaned up, @@ -6007,7 +6839,7 @@ * * @private */ - unmountIDFromEnvironment: function unmountIDFromEnvironment(rootNodeID) { + unmountIDFromEnvironment: function(rootNodeID) { ReactMount.purgeID(rootNodeID); } @@ -6015,6 +6847,7 @@ module.exports = ReactComponentBrowserEnvironment; + /***/ }, /* 48 */ /***/ function(module, exports, __webpack_require__) { @@ -6051,7 +6884,8 @@ * @private */ var INVALID_PROPERTY_ERRORS = { - dangerouslySetInnerHTML: '`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.', + dangerouslySetInnerHTML: + '`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.', style: '`style` must be set using `updateStylesByID()`.' }; @@ -6070,9 +6904,13 @@ * @param {*} value New value of the property. * @internal */ - updatePropertyByID: function updatePropertyByID(id, name, value) { + updatePropertyByID: function(id, name, value) { var node = ReactMount.getNode(id); - "production" !== process.env.NODE_ENV ? invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name), 'updatePropertyByID(...): %s', INVALID_PROPERTY_ERRORS[name]) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name)); + ("production" !== process.env.NODE_ENV ? invariant( + !INVALID_PROPERTY_ERRORS.hasOwnProperty(name), + 'updatePropertyByID(...): %s', + INVALID_PROPERTY_ERRORS[name] + ) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name))); // If we're updating to null or undefined, we should remove the property // from the DOM node instead of inadvertantly setting to a string. This @@ -6092,9 +6930,13 @@ * @param {string} name A property name to remove, see `DOMProperty`. * @internal */ - deletePropertyByID: function deletePropertyByID(id, name, value) { + deletePropertyByID: function(id, name, value) { var node = ReactMount.getNode(id); - "production" !== process.env.NODE_ENV ? invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name), 'updatePropertyByID(...): %s', INVALID_PROPERTY_ERRORS[name]) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name)); + ("production" !== process.env.NODE_ENV ? invariant( + !INVALID_PROPERTY_ERRORS.hasOwnProperty(name), + 'updatePropertyByID(...): %s', + INVALID_PROPERTY_ERRORS[name] + ) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name))); DOMPropertyOperations.deleteValueForProperty(node, name, value); }, @@ -6106,7 +6948,7 @@ * @param {object} styles Mapping from styles to values. * @internal */ - updateStylesByID: function updateStylesByID(id, styles) { + updateStylesByID: function(id, styles) { var node = ReactMount.getNode(id); CSSPropertyOperations.setValueForStyles(node, styles); }, @@ -6118,7 +6960,7 @@ * @param {string} html An HTML string. * @internal */ - updateInnerHTMLByID: function updateInnerHTMLByID(id, html) { + updateInnerHTMLByID: function(id, html) { var node = ReactMount.getNode(id); setInnerHTML(node, html); }, @@ -6130,7 +6972,7 @@ * @param {string} content Text content. * @internal */ - updateTextContentByID: function updateTextContentByID(id, content) { + updateTextContentByID: function(id, content) { var node = ReactMount.getNode(id); DOMChildrenOperations.updateTextContent(node, content); }, @@ -6143,7 +6985,7 @@ * @internal * @see {Danger.dangerouslyReplaceNodeWithMarkup} */ - dangerouslyReplaceNodeWithMarkupByID: function dangerouslyReplaceNodeWithMarkupByID(id, markup) { + dangerouslyReplaceNodeWithMarkupByID: function(id, markup) { var node = ReactMount.getNode(id); DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup); }, @@ -6155,7 +6997,7 @@ * @param {array} markup List of markup strings. * @internal */ - dangerouslyProcessChildrenUpdates: function dangerouslyProcessChildrenUpdates(updates, markup) { + dangerouslyProcessChildrenUpdates: function(updates, markup) { for (var i = 0; i < updates.length; i++) { updates[i].parentNode = ReactMount.getNode(updates[i].parentID); } @@ -6174,6 +7016,7 @@ }); module.exports = ReactDOMIDOperations; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -6203,7 +7046,7 @@ var memoizeStringOnly = __webpack_require__(57); var warning = __webpack_require__(15); - var processStyleName = memoizeStringOnly(function (styleName) { + var processStyleName = memoizeStringOnly(function(styleName) { return hyphenateStyleName(styleName); }); @@ -6225,38 +7068,54 @@ var warnedStyleNames = {}; var warnedStyleValues = {}; - var warnHyphenatedStyleName = function warnHyphenatedStyleName(name) { + var warnHyphenatedStyleName = function(name) { if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { return; } warnedStyleNames[name] = true; - "production" !== process.env.NODE_ENV ? warning(false, 'Unsupported style property %s. Did you mean %s?', name, camelizeStyleName(name)) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + 'Unsupported style property %s. Did you mean %s?', + name, + camelizeStyleName(name) + ) : null); }; - var warnBadVendoredStyleName = function warnBadVendoredStyleName(name) { + var warnBadVendoredStyleName = function(name) { if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { return; } warnedStyleNames[name] = true; - "production" !== process.env.NODE_ENV ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1)) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + 'Unsupported vendor-prefixed style property %s. Did you mean %s?', + name, + name.charAt(0).toUpperCase() + name.slice(1) + ) : null); }; - var warnStyleValueWithSemicolon = function warnStyleValueWithSemicolon(name, value) { + var warnStyleValueWithSemicolon = function(name, value) { if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { return; } warnedStyleValues[value] = true; - "production" !== process.env.NODE_ENV ? warning(false, 'Style property values shouldn\'t contain a semicolon. ' + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, '')) : null; + ("production" !== process.env.NODE_ENV ? warning( + false, + 'Style property values shouldn\'t contain a semicolon. ' + + 'Try "%s: %s" instead.', + name, + value.replace(badStyleValueWithSemicolonPattern, '') + ) : null); }; /** * @param {string} name * @param {*} value */ - var warnValidStyle = function warnValidStyle(name, value) { + var warnValidStyle = function(name, value) { if (name.indexOf('-') > -1) { warnHyphenatedStyleName(name); } else if (badVendoredStyleNamePattern.test(name)) { @@ -6284,7 +7143,7 @@ * @param {object} styles * @return {?string} */ - createMarkupForStyles: function createMarkupForStyles(styles) { + createMarkupForStyles: function(styles) { var serialized = ''; for (var styleName in styles) { if (!styles.hasOwnProperty(styleName)) { @@ -6309,7 +7168,7 @@ * @param {DOMElement} node * @param {object} styles */ - setValueForStyles: function setValueForStyles(node, styles) { + setValueForStyles: function(node, styles) { var style = node.style; for (var styleName in styles) { if (!styles.hasOwnProperty(styleName)) { @@ -6342,6 +7201,7 @@ }; module.exports = CSSPropertyOperations; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -6408,8 +7268,8 @@ // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an // infinite loop, because it iterates over the newly added props too. - Object.keys(isUnitlessNumber).forEach(function (prop) { - prefixes.forEach(function (prefix) { + Object.keys(isUnitlessNumber).forEach(function(prop) { + prefixes.forEach(function(prefix) { isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; }); }); @@ -6472,6 +7332,7 @@ module.exports = CSSProperty; + /***/ }, /* 51 */ /***/ function(module, exports) { @@ -6491,7 +7352,10 @@ "use strict"; - var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + var canUseDOM = !!( + (typeof window !== 'undefined' && + window.document && window.document.createElement) + ); /** * Simple, lightweight module assisting with the detection and context of @@ -6505,7 +7369,8 @@ canUseWorkers: typeof Worker !== 'undefined', - canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), + canUseEventListeners: + canUseDOM && !!(window.addEventListener || window.attachEvent), canUseViewport: canUseDOM && !!window.screen, @@ -6515,6 +7380,7 @@ module.exports = ExecutionEnvironment; + /***/ }, /* 52 */ /***/ function(module, exports, __webpack_require__) { @@ -6560,6 +7426,7 @@ module.exports = camelizeStyleName; + /***/ }, /* 53 */ /***/ function(module, exports) { @@ -6576,8 +7443,6 @@ * @typechecks */ - "use strict"; - var _hyphenPattern = /-(.)/g; /** @@ -6590,13 +7455,14 @@ * @return {string} */ function camelize(string) { - return string.replace(_hyphenPattern, function (_, character) { + return string.replace(_hyphenPattern, function(_, character) { return character.toUpperCase(); }); } module.exports = camelize; + /***/ }, /* 54 */ /***/ function(module, exports, __webpack_require__) { @@ -6645,7 +7511,8 @@ } var isNonNumeric = isNaN(value); - if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { + if (isNonNumeric || value === 0 || + isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { return '' + value; // cast to string } @@ -6657,6 +7524,7 @@ module.exports = dangerousStyleValue; + /***/ }, /* 55 */ /***/ function(module, exports, __webpack_require__) { @@ -6701,6 +7569,7 @@ module.exports = hyphenateStyleName; + /***/ }, /* 56 */ /***/ function(module, exports) { @@ -6717,8 +7586,6 @@ * @typechecks */ - 'use strict'; - var _uppercasePattern = /([A-Z])/g; /** @@ -6739,6 +7606,7 @@ module.exports = hyphenate; + /***/ }, /* 57 */ /***/ function(module, exports) { @@ -6765,7 +7633,7 @@ */ function memoizeStringOnly(callback) { var cache = {}; - return function (string) { + return function(string) { if (!cache.hasOwnProperty(string)) { cache[string] = callback.call(this, string); } @@ -6775,6 +7643,7 @@ module.exports = memoizeStringOnly; + /***/ }, /* 58 */ /***/ function(module, exports, __webpack_require__) { @@ -6812,7 +7681,10 @@ // rely exclusively on `insertBefore(node, null)` instead of also using // `appendChild(node)`. However, using `undefined` is not allowed by all // browsers so we must replace it with `null`. - parentNode.insertBefore(childNode, parentNode.childNodes[index] || null); + parentNode.insertBefore( + childNode, + parentNode.childNodes[index] || null + ); } /** @@ -6832,7 +7704,7 @@ * @param {array} markupList List of markup strings. * @internal */ - processUpdates: function processUpdates(updates, markupList) { + processUpdates: function(updates, markupList) { var update; // Mapping from parent IDs to initial child orderings. var initialChildren = null; @@ -6841,12 +7713,23 @@ for (var i = 0; i < updates.length; i++) { update = updates[i]; - if (update.type === ReactMultiChildUpdateTypes.MOVE_EXISTING || update.type === ReactMultiChildUpdateTypes.REMOVE_NODE) { + if (update.type === ReactMultiChildUpdateTypes.MOVE_EXISTING || + update.type === ReactMultiChildUpdateTypes.REMOVE_NODE) { var updatedIndex = update.fromIndex; var updatedChild = update.parentNode.childNodes[updatedIndex]; var parentID = update.parentID; - "production" !== process.env.NODE_ENV ? invariant(updatedChild, 'processUpdates(): Unable to find child %s of element. This ' + 'probably means the DOM was unexpectedly mutated (e.g., by the ' + 'browser), usually due to forgetting a when using tables, ' + 'nesting tags like , , or , or using non-SVG elements ' + 'in an parent. Try inspecting the child nodes of the element ' + 'with React ID `%s`.', updatedIndex, parentID) : invariant(updatedChild); + ("production" !== process.env.NODE_ENV ? invariant( + updatedChild, + 'processUpdates(): Unable to find child %s of element. This ' + + 'probably means the DOM was unexpectedly mutated (e.g., by the ' + + 'browser), usually due to forgetting a when using tables, ' + + 'nesting tags like , , or , or using non-SVG elements ' + + 'in an parent. Try inspecting the child nodes of the element ' + + 'with React ID `%s`.', + updatedIndex, + parentID + ) : invariant(updatedChild)); initialChildren = initialChildren || {}; initialChildren[parentID] = initialChildren[parentID] || []; @@ -6870,13 +7753,24 @@ update = updates[k]; switch (update.type) { case ReactMultiChildUpdateTypes.INSERT_MARKUP: - insertChildAt(update.parentNode, renderedMarkup[update.markupIndex], update.toIndex); + insertChildAt( + update.parentNode, + renderedMarkup[update.markupIndex], + update.toIndex + ); break; case ReactMultiChildUpdateTypes.MOVE_EXISTING: - insertChildAt(update.parentNode, initialChildren[update.parentID][update.fromIndex], update.toIndex); + insertChildAt( + update.parentNode, + initialChildren[update.parentID][update.fromIndex], + update.toIndex + ); break; case ReactMultiChildUpdateTypes.TEXT_CONTENT: - setTextContent(update.parentNode, update.textContent); + setTextContent( + update.parentNode, + update.textContent + ); break; case ReactMultiChildUpdateTypes.REMOVE_NODE: // Already removed by the for-loop above. @@ -6888,6 +7782,7 @@ }; module.exports = DOMChildrenOperations; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -6946,13 +7841,22 @@ * @return {array} List of rendered nodes. * @internal */ - dangerouslyRenderMarkup: function dangerouslyRenderMarkup(markupList) { - "production" !== process.env.NODE_ENV ? invariant(ExecutionEnvironment.canUseDOM, 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + 'thread. Make sure `window` and `document` are available globally ' + 'before requiring React when unit testing or use ' + 'React.renderToString for server rendering.') : invariant(ExecutionEnvironment.canUseDOM); + dangerouslyRenderMarkup: function(markupList) { + ("production" !== process.env.NODE_ENV ? invariant( + ExecutionEnvironment.canUseDOM, + 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + + 'thread. Make sure `window` and `document` are available globally ' + + 'before requiring React when unit testing or use ' + + 'React.renderToString for server rendering.' + ) : invariant(ExecutionEnvironment.canUseDOM)); var nodeName; var markupByNodeName = {}; // Group markup by `nodeName` if a wrap is necessary, else by '*'. for (var i = 0; i < markupList.length; i++) { - "production" !== process.env.NODE_ENV ? invariant(markupList[i], 'dangerouslyRenderMarkup(...): Missing markup.') : invariant(markupList[i]); + ("production" !== process.env.NODE_ENV ? invariant( + markupList[i], + 'dangerouslyRenderMarkup(...): Missing markup.' + ) : invariant(markupList[i])); nodeName = getNodeName(markupList[i]); nodeName = getMarkupWrap(nodeName) ? nodeName : '*'; markupByNodeName[nodeName] = markupByNodeName[nodeName] || []; @@ -6977,41 +7881,61 @@ // Push the requested markup with an additional RESULT_INDEX_ATTR // attribute. If the markup does not start with a < character, it // will be discarded below (with an appropriate console.error). - markupListByNodeName[resultIndex] = markup.replace(OPEN_TAG_NAME_EXP, - // This index will be parsed back out below. - '$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" '); + markupListByNodeName[resultIndex] = markup.replace( + OPEN_TAG_NAME_EXP, + // This index will be parsed back out below. + '$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" ' + ); } } // Render each group of markup with similar wrapping `nodeName`. - var renderNodes = createNodesFromMarkup(markupListByNodeName.join(''), emptyFunction // Do nothing special with
, or , or using non-SVG elements ' + 'in an parent. Try inspecting the child nodes of the element ' + 'with React ID `%s`.', updatedIndex, parentID) : invariant(updatedChild); + ("production" !== process.env.NODE_ENV ? invariant( + updatedChild, + 'processUpdates(): Unable to find child %s of element. This ' + + 'probably means the DOM was unexpectedly mutated (e.g., by the ' + + 'browser), usually due to forgetting a when using tables, ' + + 'nesting tags like , , or , or using non-SVG elements ' + + 'in an parent. Try inspecting the child nodes of the element ' + + 'with React ID `%s`.', + updatedIndex, + parentID + ) : invariant(updatedChild)); initialChildren = initialChildren || {}; initialChildren[parentID] = initialChildren[parentID] || []; @@ -6870,13 +7753,24 @@ update = updates[k]; switch (update.type) { case ReactMultiChildUpdateTypes.INSERT_MARKUP: - insertChildAt(update.parentNode, renderedMarkup[update.markupIndex], update.toIndex); + insertChildAt( + update.parentNode, + renderedMarkup[update.markupIndex], + update.toIndex + ); break; case ReactMultiChildUpdateTypes.MOVE_EXISTING: - insertChildAt(update.parentNode, initialChildren[update.parentID][update.fromIndex], update.toIndex); + insertChildAt( + update.parentNode, + initialChildren[update.parentID][update.fromIndex], + update.toIndex + ); break; case ReactMultiChildUpdateTypes.TEXT_CONTENT: - setTextContent(update.parentNode, update.textContent); + setTextContent( + update.parentNode, + update.textContent + ); break; case ReactMultiChildUpdateTypes.REMOVE_NODE: // Already removed by the for-loop above. @@ -6888,6 +7782,7 @@ }; module.exports = DOMChildrenOperations; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -6946,13 +7841,22 @@ * @return {array} List of rendered nodes. * @internal */ - dangerouslyRenderMarkup: function dangerouslyRenderMarkup(markupList) { - "production" !== process.env.NODE_ENV ? invariant(ExecutionEnvironment.canUseDOM, 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + 'thread. Make sure `window` and `document` are available globally ' + 'before requiring React when unit testing or use ' + 'React.renderToString for server rendering.') : invariant(ExecutionEnvironment.canUseDOM); + dangerouslyRenderMarkup: function(markupList) { + ("production" !== process.env.NODE_ENV ? invariant( + ExecutionEnvironment.canUseDOM, + 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + + 'thread. Make sure `window` and `document` are available globally ' + + 'before requiring React when unit testing or use ' + + 'React.renderToString for server rendering.' + ) : invariant(ExecutionEnvironment.canUseDOM)); var nodeName; var markupByNodeName = {}; // Group markup by `nodeName` if a wrap is necessary, else by '*'. for (var i = 0; i < markupList.length; i++) { - "production" !== process.env.NODE_ENV ? invariant(markupList[i], 'dangerouslyRenderMarkup(...): Missing markup.') : invariant(markupList[i]); + ("production" !== process.env.NODE_ENV ? invariant( + markupList[i], + 'dangerouslyRenderMarkup(...): Missing markup.' + ) : invariant(markupList[i])); nodeName = getNodeName(markupList[i]); nodeName = getMarkupWrap(nodeName) ? nodeName : '*'; markupByNodeName[nodeName] = markupByNodeName[nodeName] || []; @@ -6977,41 +7881,61 @@ // Push the requested markup with an additional RESULT_INDEX_ATTR // attribute. If the markup does not start with a < character, it // will be discarded below (with an appropriate console.error). - markupListByNodeName[resultIndex] = markup.replace(OPEN_TAG_NAME_EXP, - // This index will be parsed back out below. - '$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" '); + markupListByNodeName[resultIndex] = markup.replace( + OPEN_TAG_NAME_EXP, + // This index will be parsed back out below. + '$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" ' + ); } } // Render each group of markup with similar wrapping `nodeName`. - var renderNodes = createNodesFromMarkup(markupListByNodeName.join(''), emptyFunction // Do nothing special with
, or , or using non-SVG elements ' + + 'in an parent. Try inspecting the child nodes of the element ' + + 'with React ID `%s`.', + updatedIndex, + parentID + ) : invariant(updatedChild)); initialChildren = initialChildren || {}; initialChildren[parentID] = initialChildren[parentID] || []; @@ -6870,13 +7753,24 @@ update = updates[k]; switch (update.type) { case ReactMultiChildUpdateTypes.INSERT_MARKUP: - insertChildAt(update.parentNode, renderedMarkup[update.markupIndex], update.toIndex); + insertChildAt( + update.parentNode, + renderedMarkup[update.markupIndex], + update.toIndex + ); break; case ReactMultiChildUpdateTypes.MOVE_EXISTING: - insertChildAt(update.parentNode, initialChildren[update.parentID][update.fromIndex], update.toIndex); + insertChildAt( + update.parentNode, + initialChildren[update.parentID][update.fromIndex], + update.toIndex + ); break; case ReactMultiChildUpdateTypes.TEXT_CONTENT: - setTextContent(update.parentNode, update.textContent); + setTextContent( + update.parentNode, + update.textContent + ); break; case ReactMultiChildUpdateTypes.REMOVE_NODE: // Already removed by the for-loop above. @@ -6888,6 +7782,7 @@ }; module.exports = DOMChildrenOperations; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }, @@ -6946,13 +7841,22 @@ * @return {array} List of rendered nodes. * @internal */ - dangerouslyRenderMarkup: function dangerouslyRenderMarkup(markupList) { - "production" !== process.env.NODE_ENV ? invariant(ExecutionEnvironment.canUseDOM, 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + 'thread. Make sure `window` and `document` are available globally ' + 'before requiring React when unit testing or use ' + 'React.renderToString for server rendering.') : invariant(ExecutionEnvironment.canUseDOM); + dangerouslyRenderMarkup: function(markupList) { + ("production" !== process.env.NODE_ENV ? invariant( + ExecutionEnvironment.canUseDOM, + 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + + 'thread. Make sure `window` and `document` are available globally ' + + 'before requiring React when unit testing or use ' + + 'React.renderToString for server rendering.' + ) : invariant(ExecutionEnvironment.canUseDOM)); var nodeName; var markupByNodeName = {}; // Group markup by `nodeName` if a wrap is necessary, else by '*'. for (var i = 0; i < markupList.length; i++) { - "production" !== process.env.NODE_ENV ? invariant(markupList[i], 'dangerouslyRenderMarkup(...): Missing markup.') : invariant(markupList[i]); + ("production" !== process.env.NODE_ENV ? invariant( + markupList[i], + 'dangerouslyRenderMarkup(...): Missing markup.' + ) : invariant(markupList[i])); nodeName = getNodeName(markupList[i]); nodeName = getMarkupWrap(nodeName) ? nodeName : '*'; markupByNodeName[nodeName] = markupByNodeName[nodeName] || []; @@ -6977,41 +7881,61 @@ // Push the requested markup with an additional RESULT_INDEX_ATTR // attribute. If the markup does not start with a < character, it // will be discarded below (with an appropriate console.error). - markupListByNodeName[resultIndex] = markup.replace(OPEN_TAG_NAME_EXP, - // This index will be parsed back out below. - '$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" '); + markupListByNodeName[resultIndex] = markup.replace( + OPEN_TAG_NAME_EXP, + // This index will be parsed back out below. + '$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" ' + ); } } // Render each group of markup with similar wrapping `nodeName`. - var renderNodes = createNodesFromMarkup(markupListByNodeName.join(''), emptyFunction // Do nothing special with