diff --git a/docs/assets/fonts/icons-16.eot b/docs/assets/fonts/icons-16.eot index 8f0c897e0b..79a5a7009a 100644 Binary files a/docs/assets/fonts/icons-16.eot and b/docs/assets/fonts/icons-16.eot differ diff --git a/docs/assets/fonts/icons-16.ttf b/docs/assets/fonts/icons-16.ttf index 8a45912b35..7a13f8b38a 100644 Binary files a/docs/assets/fonts/icons-16.ttf and b/docs/assets/fonts/icons-16.ttf differ diff --git a/docs/assets/fonts/icons-16.woff b/docs/assets/fonts/icons-16.woff index 5c20fd5773..b386e76419 100644 Binary files a/docs/assets/fonts/icons-16.woff and b/docs/assets/fonts/icons-16.woff differ diff --git a/docs/assets/fonts/icons-20.eot b/docs/assets/fonts/icons-20.eot index a8e5373bd9..d44c08bcc6 100644 Binary files a/docs/assets/fonts/icons-20.eot and b/docs/assets/fonts/icons-20.eot differ diff --git a/docs/assets/fonts/icons-20.ttf b/docs/assets/fonts/icons-20.ttf index fa955731e5..1f457c22d3 100644 Binary files a/docs/assets/fonts/icons-20.ttf and b/docs/assets/fonts/icons-20.ttf differ diff --git a/docs/assets/fonts/icons-20.woff b/docs/assets/fonts/icons-20.woff index 1e5c26e8f3..25c06d8396 100644 Binary files a/docs/assets/fonts/icons-20.woff and b/docs/assets/fonts/icons-20.woff differ diff --git a/docs/blueprint-landing.css b/docs/blueprint-landing.css index 8c20994cb9..86235bfada 100644 --- a/docs/blueprint-landing.css +++ b/docs/blueprint-landing.css @@ -1442,6 +1442,18 @@ span.pt-icon { .pt-icon-numerical::before { content: "\E756"; } +.pt-icon-key-tab::before { + content: "\E757"; } + +.pt-icon-regression-chart::before { + content: "\E758"; } + +.pt-icon-translate::before { + content: "\E759"; } + +.pt-icon-eye-on::before { + content: "\E75A"; } + :focus { outline: rgba(19, 124, 189, 0.5) auto 2px; outline-offset: 2px; @@ -2796,10 +2808,9 @@ a.pt-button { .pt-control-group .pt-button:focus, .pt-control-group select:focus { position: relative; } - .pt-control-group .pt-input-group .pt-button:focus { - position: absolute; } .pt-control-group .pt-input-group > .pt-icon, .pt-control-group .pt-input-group > .pt-button, + .pt-control-group .pt-input-group > .pt-input-action, .pt-control-group .pt-select::after { z-index: 3; } .pt-control-group .pt-input-group .pt-button { @@ -3919,18 +3930,11 @@ button.pt-menu-item { .pt-non-ideal-state-action { margin-top: 15px; } -.pt-overlay-scroll-container.pt-overlay-open { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - overflow: auto; } - .pt-overlay-scroll-container.pt-overlay-open .pt-overlay-backdrop { - position: fixed; } +body.pt-overlay-open { + overflow: hidden; } .pt-overlay-backdrop { - position: absolute; + position: fixed; top: 0; right: 0; bottom: 0; @@ -3958,6 +3962,24 @@ button.pt-menu-item { .pt-overlay-backdrop:focus { outline: none; } +.pt-overlay-content { + position: fixed; } + +.pt-overlay-inline .pt-overlay-backdrop, +.pt-overlay-inline .pt-overlay-content { + position: absolute; } + +.pt-overlay-scroll-container.pt-overlay-open { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 20; + overflow: auto; } + .pt-overlay-scroll-container.pt-overlay-open .pt-overlay-content { + position: absolute; } + .pt-popover { box-shadow: 0 0 0 1px rgba(16, 22, 26, 0.1), 0 2px 4px rgba(16, 22, 26, 0.2), 0 8px 24px rgba(16, 22, 26, 0.2); -webkit-transform: scale(1); @@ -4276,6 +4298,7 @@ button.pt-menu-item { position: relative; cursor: default; width: 100%; + min-width: 150px; height: 40px; outline: none; -webkit-user-select: none; @@ -4633,23 +4656,23 @@ table.pt-table { .pt-tabs.pt-vertical { display: -webkit-flex; display: flex; } - .pt-tabs.pt-vertical .pt-tab-list { + .pt-tabs.pt-vertical > .pt-tab-list { -webkit-flex-direction: column; flex-direction: column; -webkit-align-items: flex-start; align-items: flex-start; } - .pt-tabs.pt-vertical .pt-tab { - width: 100%; - padding: 0 10px; } - .pt-tabs.pt-vertical .pt-tab-indicator-wrapper .pt-tab-indicator { - top: 0; - right: 0; - bottom: 0; - left: 0; - border-radius: 3px; - background-color: rgba(19, 124, 189, 0.2); - height: auto; } - .pt-tabs.pt-vertical .pt-tab-panel { + .pt-tabs.pt-vertical > .pt-tab-list .pt-tab { + width: 100%; + padding: 0 10px; } + .pt-tabs.pt-vertical > .pt-tab-list .pt-tab-indicator-wrapper .pt-tab-indicator { + top: 0; + right: 0; + bottom: 0; + left: 0; + border-radius: 3px; + background-color: rgba(19, 124, 189, 0.2); + height: auto; } + .pt-tabs.pt-vertical > .pt-tab-panel { margin-top: 0; padding-left: 20px; } diff --git a/docs/blueprint-landing.js b/docs/blueprint-landing.js index 2de95f3807..53a8d9cb34 100644 --- a/docs/blueprint-landing.js +++ b/docs/blueprint-landing.js @@ -93,9 +93,9 @@ "use strict"; var core_1 = __webpack_require__(17); core_1.FocusStyleManager.onlyShowFocusOnTabs(); - var Logo = __webpack_require__(273); + var Logo = __webpack_require__(257); Logo.init(document.querySelector("header canvas.pt-logo"), document.querySelector("header canvas.pt-logo-background")); - var SVGs = __webpack_require__(274); + var SVGs = __webpack_require__(258); SVGs.init(document.querySelector(".pt-wireframes")); var copyright = ".pt-copyright .pt-container > div:first-child"; document.querySelector(copyright).innerHTML = "\u00A9 2014\u2013" + new Date().getFullYear() + " Palantir Technologies"; @@ -116,12 +116,12 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } __export(__webpack_require__(18)); - __export(__webpack_require__(59)); - var iconClasses_1 = __webpack_require__(270); + __export(__webpack_require__(65)); + var iconClasses_1 = __webpack_require__(254); exports.IconClasses = iconClasses_1.IconClasses; - var iconStrings_1 = __webpack_require__(271); + var iconStrings_1 = __webpack_require__(255); exports.IconContents = iconStrings_1.IconContents; - var interactionMode_1 = __webpack_require__(272); + var interactionMode_1 = __webpack_require__(256); exports.FOCUS_DISABLED_CLASS = "pt-focus-disabled"; var focusEngine = new interactionMode_1.InteractionModeEngine(document.documentElement, exports.FOCUS_DISABLED_CLASS); exports.FocusStyleManager = { @@ -148,14 +148,14 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } __export(__webpack_require__(19)); - __export(__webpack_require__(51)); - __export(__webpack_require__(52)); - __export(__webpack_require__(53)); - __export(__webpack_require__(54)); - __export(__webpack_require__(56)); - var classes = __webpack_require__(57); - var keys = __webpack_require__(58); - var utils = __webpack_require__(55); + __export(__webpack_require__(57)); + __export(__webpack_require__(58)); + __export(__webpack_require__(59)); + __export(__webpack_require__(60)); + __export(__webpack_require__(62)); + var classes = __webpack_require__(63); + var keys = __webpack_require__(64); + var utils = __webpack_require__(61); exports.Classes = classes; exports.Keys = keys; exports.Utils = utils; @@ -235,6 +235,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule React */ 'use strict'; @@ -242,23 +243,22 @@ var _assign = __webpack_require__(23); var ReactChildren = __webpack_require__(24); - var ReactComponent = __webpack_require__(37); - var ReactPureComponent = __webpack_require__(40); - var ReactClass = __webpack_require__(41); - var ReactDOMFactories = __webpack_require__(43); - var ReactElement = __webpack_require__(28); - var ReactPropTypes = __webpack_require__(48); - var ReactVersion = __webpack_require__(49); + var ReactComponent = __webpack_require__(35); + var ReactClass = __webpack_require__(46); + var ReactDOMFactories = __webpack_require__(51); + var ReactElement = __webpack_require__(27); + var ReactElementValidator = __webpack_require__(52); + var ReactPropTypes = __webpack_require__(54); + var ReactVersion = __webpack_require__(55); - var onlyChild = __webpack_require__(50); - var warning = __webpack_require__(30); + var onlyChild = __webpack_require__(56); + var warning = __webpack_require__(29); var createElement = ReactElement.createElement; var createFactory = ReactElement.createFactory; var cloneElement = ReactElement.cloneElement; if (process.env.NODE_ENV !== 'production') { - var ReactElementValidator = __webpack_require__(44); createElement = ReactElementValidator.createElement; createFactory = ReactElementValidator.createFactory; cloneElement = ReactElementValidator.cloneElement; @@ -288,7 +288,6 @@ }, Component: ReactComponent, - PureComponent: ReactPureComponent, createElement: createElement, cloneElement: cloneElement, @@ -604,15 +603,16 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule ReactChildren */ 'use strict'; var PooledClass = __webpack_require__(25); - var ReactElement = __webpack_require__(28); + var ReactElement = __webpack_require__(27); - var emptyFunction = __webpack_require__(31); - var traverseAllChildren = __webpack_require__(34); + var emptyFunction = __webpack_require__(30); + var traverseAllChildren = __webpack_require__(32); var twoArgumentPooler = PooledClass.twoArgumentPooler; var fourArgumentPooler = PooledClass.fourArgumentPooler; @@ -643,8 +643,8 @@ PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler); function forEachSingleChild(bookKeeping, child, name) { - var func = bookKeeping.func, - context = bookKeeping.context; + var func = bookKeeping.func; + var context = bookKeeping.context; func.call(context, child, bookKeeping.count++); } @@ -696,10 +696,10 @@ PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler); function mapSingleChildIntoContext(bookKeeping, child, childKey) { - var result = bookKeeping.result, - keyPrefix = bookKeeping.keyPrefix, - func = bookKeeping.func, - context = bookKeeping.context; + var result = bookKeeping.result; + var keyPrefix = bookKeeping.keyPrefix; + var func = bookKeeping.func; + var context = bookKeeping.context; var mappedChild = func.call(context, child, bookKeeping.count++); @@ -799,14 +799,12 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * + * @providesModule PooledClass */ 'use strict'; - var _prodInvariant = __webpack_require__(26); - - var invariant = __webpack_require__(27); + var invariant = __webpack_require__(26); /** * Static poolers. Several custom versions for each potential number of @@ -872,7 +870,7 @@ var standardReleaser = function (instance) { var Klass = this; - !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; + !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : invariant(false) : void 0; instance.destructor(); if (Klass.instancePool.length < Klass.poolSize) { Klass.instancePool.push(instance); @@ -886,14 +884,12 @@ * Augments `CopyConstructor` to be a poolable class, augmenting only the class * itself (statically) not adding any prototypical fields. Any CopyConstructor * you give this may have a `poolSize` property, and will look for a - * prototypical `destructor` on instances. + * prototypical `destructor` on instances (optional). * * @param {Function} CopyConstructor Constructor that can be used to reset. * @param {Function} pooler Customizable pooler. */ var addPoolingTo = function (CopyConstructor, pooler) { - // Casting as any so that flow ignores the actual implementation and trusts - // it to match the type we declared var NewKlass = CopyConstructor; NewKlass.instancePool = []; NewKlass.getPooled = pooler || DEFAULT_POOLER; @@ -918,49 +914,6 @@ /***/ }, /* 26 */ -/***/ function(module, exports) { - - /** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - 'use strict'; - - /** - * WARNING: DO NOT manually require this module. - * This is a replacement for `invariant(...)` used by the error code system - * and will _only_ be required by the corresponding babel pass. - * It always throws. - */ - - function reactProdInvariant(code) { - var argCount = arguments.length - 1; - - var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; - - for (var argIdx = 0; argIdx < argCount; argIdx++) { - message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); - } - - message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; - - var error = new Error(message); - error.name = 'Invariant Violation'; - error.framesToPop = 1; // we don't care about reactProdInvariant's own frame - - throw error; - } - - module.exports = reactProdInvariant; - -/***/ }, -/* 27 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -1015,7 +968,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 28 */ +/* 27 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -1026,19 +979,21 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule ReactElement */ 'use strict'; var _assign = __webpack_require__(23); - var ReactCurrentOwner = __webpack_require__(29); + var ReactCurrentOwner = __webpack_require__(28); - var warning = __webpack_require__(30); - var canDefineProperty = __webpack_require__(32); - var hasOwnProperty = Object.prototype.hasOwnProperty; + var warning = __webpack_require__(29); + var canDefineProperty = __webpack_require__(31); - var REACT_ELEMENT_TYPE = __webpack_require__(33); + // The Symbol used to tag the ReactElement type. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; var RESERVED_PROPS = { key: true, @@ -1049,58 +1004,6 @@ var specialPropKeyWarningShown, specialPropRefWarningShown; - function hasValidRef(config) { - if (process.env.NODE_ENV !== 'production') { - if (hasOwnProperty.call(config, 'ref')) { - var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; - if (getter && getter.isReactWarning) { - return false; - } - } - } - return config.ref !== undefined; - } - - function hasValidKey(config) { - if (process.env.NODE_ENV !== 'production') { - if (hasOwnProperty.call(config, 'key')) { - var getter = Object.getOwnPropertyDescriptor(config, 'key').get; - if (getter && getter.isReactWarning) { - return false; - } - } - } - return config.key !== undefined; - } - - function defineKeyPropWarningGetter(props, displayName) { - var warnAboutAccessingKey = function () { - if (!specialPropKeyWarningShown) { - specialPropKeyWarningShown = true; - process.env.NODE_ENV !== 'production' ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; - } - }; - warnAboutAccessingKey.isReactWarning = true; - Object.defineProperty(props, 'key', { - get: warnAboutAccessingKey, - configurable: true - }); - } - - function defineRefPropWarningGetter(props, displayName) { - var warnAboutAccessingRef = function () { - if (!specialPropRefWarningShown) { - specialPropRefWarningShown = true; - process.env.NODE_ENV !== 'production' ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; - } - }; - warnAboutAccessingRef.isReactWarning = true; - Object.defineProperty(props, 'ref', { - get: warnAboutAccessingRef, - configurable: true - }); - } - /** * Factory method to create a new React element. This no longer adheres to * the class pattern, so do not use new to call it. Also, no instanceof check @@ -1199,18 +1102,23 @@ var source = null; if (config != null) { - if (hasValidRef(config)) { - ref = config.ref; - } - if (hasValidKey(config)) { - key = '' + config.key; + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning( + /* eslint-disable no-proto */ + config.__proto__ == null || config.__proto__ === Object.prototype, + /* eslint-enable no-proto */ + 'React.createElement(...): Expected props argument to be a plain object. ' + 'Properties defined in its prototype chain will be ignored.') : void 0; + ref = !config.hasOwnProperty('ref') || Object.getOwnPropertyDescriptor(config, 'ref').get ? null : config.ref; + key = !config.hasOwnProperty('key') || Object.getOwnPropertyDescriptor(config, 'key').get ? null : '' + config.key; + } else { + ref = config.ref === undefined ? null : config.ref; + key = config.key === undefined ? null : '' + config.key; } - self = config.__self === undefined ? null : config.__self; source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { props[propName] = config[propName]; } } @@ -1226,11 +1134,6 @@ for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 2]; } - if (process.env.NODE_ENV !== 'production') { - if (Object.freeze) { - Object.freeze(childArray); - } - } props.children = childArray; } @@ -1244,15 +1147,32 @@ } } if (process.env.NODE_ENV !== 'production') { - if (key || ref) { - if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) { - var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; - if (key) { - defineKeyPropWarningGetter(props, displayName); - } - if (ref) { - defineRefPropWarningGetter(props, displayName); - } + // Create dummy `key` and `ref` property to `props` to warn users + // against its use + if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) { + if (!props.hasOwnProperty('key')) { + Object.defineProperty(props, 'key', { + get: function () { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + process.env.NODE_ENV !== 'production' ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', typeof type === 'function' && 'displayName' in type ? type.displayName : 'Element') : void 0; + } + return undefined; + }, + configurable: true + }); + } + if (!props.hasOwnProperty('ref')) { + Object.defineProperty(props, 'ref', { + get: function () { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + process.env.NODE_ENV !== 'production' ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', typeof type === 'function' && 'displayName' in type ? type.displayName : 'Element') : void 0; + } + return undefined; + }, + configurable: true + }); } } } @@ -1304,22 +1224,28 @@ var owner = element._owner; if (config != null) { - if (hasValidRef(config)) { + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning( + /* eslint-disable no-proto */ + config.__proto__ == null || config.__proto__ === Object.prototype, + /* eslint-enable no-proto */ + 'React.cloneElement(...): Expected props argument to be a plain object. ' + 'Properties defined in its prototype chain will be ignored.') : void 0; + } + if (config.ref !== undefined) { // Silently steal the ref from the parent. ref = config.ref; owner = ReactCurrentOwner.current; } - if (hasValidKey(config)) { + if (config.key !== undefined) { key = '' + config.key; } - // Remaining properties override existing props var defaultProps; if (element.type && element.type.defaultProps) { defaultProps = element.type.defaultProps; } for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { if (config[propName] === undefined && defaultProps !== undefined) { // Resolve default props props[propName] = defaultProps[propName]; @@ -1361,7 +1287,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 29 */ +/* 28 */ /***/ function(module, exports) { /** @@ -1372,7 +1298,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * + * @providesModule ReactCurrentOwner */ 'use strict'; @@ -1383,6 +1309,7 @@ * The current owner is the component who should own any components that are * currently being constructed. */ + var ReactCurrentOwner = { /** @@ -1396,7 +1323,7 @@ module.exports = ReactCurrentOwner; /***/ }, -/* 30 */ +/* 29 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -1411,7 +1338,7 @@ 'use strict'; - var emptyFunction = __webpack_require__(31); + var emptyFunction = __webpack_require__(30); /** * Similar to invariant but only logs a warning if the condition is not met. @@ -1468,7 +1395,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 31 */ +/* 30 */ /***/ function(module, exports) { "use strict"; @@ -1511,7 +1438,7 @@ module.exports = emptyFunction; /***/ }, -/* 32 */ +/* 31 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -1522,7 +1449,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * + * @providesModule canDefineProperty */ 'use strict'; @@ -1530,7 +1457,6 @@ var canDefineProperty = false; if (process.env.NODE_ENV !== 'production') { try { - // $FlowFixMe https://github.com/facebook/flow/issues/285 Object.defineProperty({}, 'x', { get: function () {} }); canDefineProperty = true; } catch (x) { @@ -1542,31 +1468,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 33 */ -/***/ function(module, exports) { - - /** - * Copyright 2014-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - - 'use strict'; - - // The Symbol used to tag the ReactElement type. If there is no native Symbol - // nor polyfill, then a plain number is used for performance. - - var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; - - module.exports = REACT_ELEMENT_TYPE; - -/***/ }, -/* 34 */ +/* 32 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -1577,29 +1479,22 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule traverseAllChildren */ 'use strict'; - var _prodInvariant = __webpack_require__(26); - - var ReactCurrentOwner = __webpack_require__(29); - var REACT_ELEMENT_TYPE = __webpack_require__(33); + var ReactCurrentOwner = __webpack_require__(28); + var ReactElement = __webpack_require__(27); - var getIteratorFn = __webpack_require__(35); - var invariant = __webpack_require__(27); - var KeyEscapeUtils = __webpack_require__(36); - var warning = __webpack_require__(30); + var getIteratorFn = __webpack_require__(33); + var invariant = __webpack_require__(26); + var KeyEscapeUtils = __webpack_require__(34); + var warning = __webpack_require__(29); var SEPARATOR = '.'; var SUBSEPARATOR = ':'; - /** - * This is inlined from ReactElement since this file is shared between - * isomorphic and renderers. We could extract this to a - * - */ - /** * TODO: Test that a single child and an array with one item have the same key * pattern. @@ -1641,10 +1536,7 @@ children = null; } - if (children === null || type === 'string' || type === 'number' || - // The following is inlined from ReactElement. This means we can optimize - // some checks. React Fiber also inlines this logic for similar purposes. - type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { + 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. @@ -1677,14 +1569,7 @@ } } else { if (process.env.NODE_ENV !== 'production') { - var mapsAsChildrenAddendum = ''; - if (ReactCurrentOwner.current) { - var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); - if (mapsAsChildrenOwnerName) { - mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; - } - } - process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0; + process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.') : void 0; didWarnAboutMaps = true; } // Iterator will provide entry [k,v] tuples rather than values. @@ -1712,7 +1597,7 @@ } } var childrenString = String(children); - true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0; + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : invariant(false) : void 0; } } @@ -1747,7 +1632,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 35 */ +/* 33 */ /***/ function(module, exports) { /** @@ -1758,7 +1643,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * + * @providesModule getIteratorFn */ 'use strict'; @@ -1792,7 +1677,7 @@ module.exports = getIteratorFn; /***/ }, -/* 36 */ +/* 34 */ /***/ function(module, exports) { /** @@ -1803,7 +1688,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * + * @providesModule KeyEscapeUtils */ 'use strict'; @@ -1811,7 +1696,7 @@ /** * Escape and wrap key so it is safe to use as a reactid * - * @param {string} key to be escaped. + * @param {*} key to be escaped. * @return {string} the escaped key. */ @@ -1855,7 +1740,7 @@ module.exports = KeyEscapeUtils; /***/ }, -/* 37 */ +/* 35 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -1866,18 +1751,18 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule ReactComponent */ 'use strict'; - var _prodInvariant = __webpack_require__(26); + var ReactNoopUpdateQueue = __webpack_require__(36); + var ReactInstrumentation = __webpack_require__(37); - var ReactNoopUpdateQueue = __webpack_require__(38); - - var canDefineProperty = __webpack_require__(32); - var emptyObject = __webpack_require__(39); - var invariant = __webpack_require__(27); - var warning = __webpack_require__(30); + var canDefineProperty = __webpack_require__(31); + var emptyObject = __webpack_require__(45); + var invariant = __webpack_require__(26); + var warning = __webpack_require__(29); /** * Base class helpers for the updating state of a component. @@ -1919,7 +1804,11 @@ * @protected */ ReactComponent.prototype.setState = function (partialState, callback) { - !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0; + !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.') : invariant(false) : void 0; + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onSetState(); + process.env.NODE_ENV !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0; + } this.updater.enqueueSetState(this, partialState); if (callback) { this.updater.enqueueCallback(this, callback, 'setState'); @@ -1978,7 +1867,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 38 */ +/* 36 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -1989,16 +1878,16 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule ReactNoopUpdateQueue */ 'use strict'; - var warning = __webpack_require__(30); + var warning = __webpack_require__(29); - function warnNoop(publicInstance, callerName) { + function warnTDZ(publicInstance, callerName) { if (process.env.NODE_ENV !== 'production') { - var constructor = publicInstance.constructor; - process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0; + process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, publicInstance.constructor && publicInstance.constructor.displayName || '') : void 0; } } @@ -2042,7 +1931,7 @@ * @internal */ enqueueForceUpdate: function (publicInstance) { - warnNoop(publicInstance, 'forceUpdate'); + warnTDZ(publicInstance, 'forceUpdate'); }, /** @@ -2057,7 +1946,7 @@ * @internal */ enqueueReplaceState: function (publicInstance, completeState) { - warnNoop(publicInstance, 'replaceState'); + warnTDZ(publicInstance, 'replaceState'); }, /** @@ -2071,7 +1960,7 @@ * @internal */ enqueueSetState: function (publicInstance, partialState) { - warnNoop(publicInstance, 'setState'); + warnTDZ(publicInstance, 'setState'); } }; @@ -2079,1571 +1968,1382 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 39 */ +/* 37 */ /***/ function(module, exports, __webpack_require__) { - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright (c) 2013-present, Facebook, Inc. + /** + * Copyright 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule ReactInstrumentation */ 'use strict'; - var emptyObject = {}; - - if (process.env.NODE_ENV !== 'production') { - Object.freeze(emptyObject); - } + var ReactDebugTool = __webpack_require__(38); - module.exports = emptyObject; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + module.exports = { debugTool: ReactDebugTool }; /***/ }, -/* 40 */ +/* 38 */ /***/ function(module, exports, __webpack_require__) { - /** - * Copyright 2013-present, Facebook, Inc. + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule ReactDebugTool */ 'use strict'; - var _assign = __webpack_require__(23); + var ExecutionEnvironment = __webpack_require__(39); - var ReactComponent = __webpack_require__(37); - var ReactNoopUpdateQueue = __webpack_require__(38); + var performanceNow = __webpack_require__(40); + var warning = __webpack_require__(29); - var emptyObject = __webpack_require__(39); + var eventHandlers = []; + var handlerDoesThrowForEvent = {}; - /** - * Base class helpers for the updating state of a component. - */ - function ReactPureComponent(props, context, updater) { - // Duplicated from ReactComponent. - this.props = props; - this.context = context; - this.refs = emptyObject; - // We initialize the default updater but the real one gets injected by the - // renderer. - this.updater = updater || ReactNoopUpdateQueue; + function emitEvent(handlerFunctionName, arg1, arg2, arg3, arg4, arg5) { + if (process.env.NODE_ENV !== 'production') { + eventHandlers.forEach(function (handler) { + try { + if (handler[handlerFunctionName]) { + handler[handlerFunctionName](arg1, arg2, arg3, arg4, arg5); + } + } catch (e) { + process.env.NODE_ENV !== 'production' ? warning(!handlerDoesThrowForEvent[handlerFunctionName], 'exception thrown by devtool while handling %s: %s', handlerFunctionName, e.message) : void 0; + handlerDoesThrowForEvent[handlerFunctionName] = true; + } + }); + } } - function ComponentDummy() {} - ComponentDummy.prototype = ReactComponent.prototype; - ReactPureComponent.prototype = new ComponentDummy(); - ReactPureComponent.prototype.constructor = ReactPureComponent; - // Avoid an extra prototype jump for these methods. - _assign(ReactPureComponent.prototype, ReactComponent.prototype); - ReactPureComponent.prototype.isPureReactComponent = true; - - module.exports = ReactPureComponent; - -/***/ }, -/* 41 */ -/***/ function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - 'use strict'; + var isProfiling = false; + var flushHistory = []; + var currentFlushNesting = 0; + var currentFlushMeasurements = null; + var currentFlushStartTime = null; + var currentTimerDebugID = null; + var currentTimerStartTime = null; + var currentTimerType = null; - var _prodInvariant = __webpack_require__(26), - _assign = __webpack_require__(23); + function clearHistory() { + ReactComponentTreeDevtool.purgeUnmountedComponents(); + ReactNativeOperationHistoryDevtool.clearHistory(); + } - var ReactComponent = __webpack_require__(37); - var ReactElement = __webpack_require__(28); - var ReactPropTypeLocationNames = __webpack_require__(42); - var ReactNoopUpdateQueue = __webpack_require__(38); + function getTreeSnapshot(registeredIDs) { + return registeredIDs.reduce(function (tree, id) { + var ownerID = ReactComponentTreeDevtool.getOwnerID(id); + var parentID = ReactComponentTreeDevtool.getParentID(id); + tree[id] = { + displayName: ReactComponentTreeDevtool.getDisplayName(id), + text: ReactComponentTreeDevtool.getText(id), + updateCount: ReactComponentTreeDevtool.getUpdateCount(id), + childIDs: ReactComponentTreeDevtool.getChildIDs(id), + // Text nodes don't have owners but this is close enough. + ownerID: ownerID || ReactComponentTreeDevtool.getOwnerID(parentID), + parentID: parentID + }; + return tree; + }, {}); + } - var emptyObject = __webpack_require__(39); - var invariant = __webpack_require__(27); - var warning = __webpack_require__(30); + function resetMeasurements() { + if (process.env.NODE_ENV !== 'production') { + var previousStartTime = currentFlushStartTime; + var previousMeasurements = currentFlushMeasurements || []; + var previousOperations = ReactNativeOperationHistoryDevtool.getHistory(); + + if (!isProfiling || currentFlushNesting === 0) { + currentFlushStartTime = null; + currentFlushMeasurements = null; + clearHistory(); + return; + } - var MIXINS_KEY = 'mixins'; + if (previousMeasurements.length || previousOperations.length) { + var registeredIDs = ReactComponentTreeDevtool.getRegisteredIDs(); + flushHistory.push({ + duration: performanceNow() - previousStartTime, + measurements: previousMeasurements || [], + operations: previousOperations || [], + treeSnapshot: getTreeSnapshot(registeredIDs) + }); + } - // Helper function to allow the creation of anonymous functions which do not - // have .name set to the name of the variable being assigned to. - function identity(fn) { - return fn; + clearHistory(); + currentFlushStartTime = performanceNow(); + currentFlushMeasurements = []; + } } - /** - * Policies that describe methods in `ReactClassInterface`. - */ + function checkDebugID(debugID) { + process.env.NODE_ENV !== 'production' ? warning(debugID, 'ReactDebugTool: debugID may not be empty.') : void 0; + } + var ReactDebugTool = { + addDevtool: function (devtool) { + eventHandlers.push(devtool); + }, + removeDevtool: function (devtool) { + for (var i = 0; i < eventHandlers.length; i++) { + if (eventHandlers[i] === devtool) { + eventHandlers.splice(i, 1); + i--; + } + } + }, + beginProfiling: function () { + if (process.env.NODE_ENV !== 'production') { + if (isProfiling) { + return; + } - var injectedMixins = []; + isProfiling = true; + flushHistory.length = 0; + resetMeasurements(); + } + }, + endProfiling: function () { + if (process.env.NODE_ENV !== 'production') { + if (!isProfiling) { + return; + } - /** - * Composite components are higher-level components that compose other composite - * or host components. - * - * To create a new type of `ReactClass`, pass a specification of - * your new class to `React.createClass`. The only requirement of your class - * specification is that you implement a `render` method. - * - * var MyComponent = React.createClass({ - * render: function() { - * return
Hello World
; - * } - * }); - * - * The class specification supports a specific protocol of methods that have - * special meaning (e.g. `render`). See `ReactClassInterface` for - * more the comprehensive protocol. Any other properties and methods in the - * class specification will be available on the prototype. + isProfiling = false; + resetMeasurements(); + } + }, + getFlushHistory: function () { + if (process.env.NODE_ENV !== 'production') { + return flushHistory; + } + }, + onBeginFlush: function () { + if (process.env.NODE_ENV !== 'production') { + currentFlushNesting++; + resetMeasurements(); + } + emitEvent('onBeginFlush'); + }, + onEndFlush: function () { + if (process.env.NODE_ENV !== 'production') { + resetMeasurements(); + currentFlushNesting--; + } + emitEvent('onEndFlush'); + }, + onBeginLifeCycleTimer: function (debugID, timerType) { + checkDebugID(debugID); + emitEvent('onBeginLifeCycleTimer', debugID, timerType); + if (process.env.NODE_ENV !== 'production') { + if (isProfiling && currentFlushNesting > 0) { + process.env.NODE_ENV !== 'production' ? warning(!currentTimerType, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0; + currentTimerStartTime = performanceNow(); + currentTimerDebugID = debugID; + currentTimerType = timerType; + } + } + }, + onEndLifeCycleTimer: function (debugID, timerType) { + checkDebugID(debugID); + if (process.env.NODE_ENV !== 'production') { + if (isProfiling && currentFlushNesting > 0) { + process.env.NODE_ENV !== 'production' ? warning(currentTimerType === timerType, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0; + currentFlushMeasurements.push({ + timerType: timerType, + instanceID: debugID, + duration: performanceNow() - currentTimerStartTime + }); + currentTimerStartTime = null; + currentTimerDebugID = null; + currentTimerType = null; + } + } + emitEvent('onEndLifeCycleTimer', debugID, timerType); + }, + onBeginReconcilerTimer: function (debugID, timerType) { + checkDebugID(debugID); + emitEvent('onBeginReconcilerTimer', debugID, timerType); + }, + onEndReconcilerTimer: function (debugID, timerType) { + checkDebugID(debugID); + emitEvent('onEndReconcilerTimer', debugID, timerType); + }, + onBeginProcessingChildContext: function () { + emitEvent('onBeginProcessingChildContext'); + }, + onEndProcessingChildContext: function () { + emitEvent('onEndProcessingChildContext'); + }, + onNativeOperation: function (debugID, type, payload) { + checkDebugID(debugID); + emitEvent('onNativeOperation', debugID, type, payload); + }, + onSetState: function () { + emitEvent('onSetState'); + }, + onSetDisplayName: function (debugID, displayName) { + checkDebugID(debugID); + emitEvent('onSetDisplayName', debugID, displayName); + }, + onSetChildren: function (debugID, childDebugIDs) { + checkDebugID(debugID); + emitEvent('onSetChildren', debugID, childDebugIDs); + }, + onSetOwner: function (debugID, ownerDebugID) { + checkDebugID(debugID); + emitEvent('onSetOwner', debugID, ownerDebugID); + }, + onSetText: function (debugID, text) { + checkDebugID(debugID); + emitEvent('onSetText', debugID, text); + }, + onMountRootComponent: function (debugID) { + checkDebugID(debugID); + emitEvent('onMountRootComponent', debugID); + }, + onMountComponent: function (debugID) { + checkDebugID(debugID); + emitEvent('onMountComponent', debugID); + }, + onUpdateComponent: function (debugID) { + checkDebugID(debugID); + emitEvent('onUpdateComponent', debugID); + }, + onUnmountComponent: function (debugID) { + checkDebugID(debugID); + emitEvent('onUnmountComponent', debugID); + } + }; + + if (process.env.NODE_ENV !== 'production') { + var ReactInvalidSetStateWarningDevTool = __webpack_require__(42); + var ReactNativeOperationHistoryDevtool = __webpack_require__(43); + var ReactComponentTreeDevtool = __webpack_require__(44); + ReactDebugTool.addDevtool(ReactInvalidSetStateWarningDevTool); + ReactDebugTool.addDevtool(ReactComponentTreeDevtool); + ReactDebugTool.addDevtool(ReactNativeOperationHistoryDevtool); + var url = ExecutionEnvironment.canUseDOM && window.location.href || ''; + if (/[?&]react_perf\b/.test(url)) { + ReactDebugTool.beginProfiling(); + } + } + + module.exports = ReactDebugTool; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + +/***/ }, +/* 39 */ +/***/ function(module, exports) { + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * @interface ReactClassInterface - * @internal */ - var ReactClassInterface = { - /** - * An array of Mixin objects to include when defining your component. - * - * @type {array} - * @optional - */ - mixins: 'DEFINE_MANY', + 'use strict'; - /** - * An object containing properties and methods that should be defined on - * the component's constructor instead of its prototype (static methods). - * - * @type {object} - * @optional - */ - statics: 'DEFINE_MANY', + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); - /** - * Definition of prop types for this component. - * - * @type {object} - * @optional - */ - propTypes: 'DEFINE_MANY', + /** + * Simple, lightweight module assisting with the detection and context of + * Worker. Helps avoid circular dependencies and allows code to reason about + * whether or not they are in a Worker, even if they never include the main + * `ReactWorker` dependency. + */ + var ExecutionEnvironment = { - /** - * Definition of context types for this component. - * - * @type {object} - * @optional - */ - contextTypes: 'DEFINE_MANY', + canUseDOM: canUseDOM, - /** - * Definition of context types this component sets for its children. - * - * @type {object} - * @optional - */ - childContextTypes: 'DEFINE_MANY', + canUseWorkers: typeof Worker !== 'undefined', - // ==== Definition methods ==== + canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), - /** - * Invoked when the component is mounted. Values in the mapping will be set on - * `this.props` if that prop is not specified (i.e. using an `in` check). - * - * This method is invoked before `getInitialState` and therefore cannot rely - * on `this.state` or use `this.setState`. - * - * @return {object} - * @optional - */ - getDefaultProps: 'DEFINE_MANY_MERGED', + canUseViewport: canUseDOM && !!window.screen, - /** - * Invoked once before the component is mounted. The return value will be used - * as the initial value of `this.state`. - * - * getInitialState: function() { - * return { - * isOn: false, - * fooBaz: new BazFoo() - * } - * } - * - * @return {object} - * @optional - */ - getInitialState: 'DEFINE_MANY_MERGED', + isInWorker: !canUseDOM // For now, this is true - might change in the future. - /** - * @return {object} - * @optional - */ - getChildContext: 'DEFINE_MANY_MERGED', + }; - /** - * Uses props from `this.props` and state from `this.state` to render the - * structure of the component. - * - * No guarantees are made about when or how often this method is invoked, so - * it must not have side effects. - * - * render: function() { - * var name = this.props.name; - * return
Hello, {name}!
; - * } - * - * @return {ReactComponent} - * @nosideeffects - * @required - */ - render: 'DEFINE_ONCE', + module.exports = ExecutionEnvironment; - // ==== Delegate methods ==== +/***/ }, +/* 40 */ +/***/ function(module, exports, __webpack_require__) { - /** - * Invoked when the component is initially created and about to be mounted. - * This may have side effects, but any external subscriptions or data created - * by this method must be cleaned up in `componentWillUnmount`. - * - * @optional - */ - componentWillMount: 'DEFINE_MANY', + 'use strict'; - /** - * Invoked when the component has been mounted and has a DOM representation. - * However, there is no guarantee that the DOM node is in the document. - * - * Use this as an opportunity to operate on the DOM when the component has - * been mounted (initialized and rendered) for the first time. - * - * @param {DOMElement} rootNode DOM element representing the component. - * @optional - */ - componentDidMount: 'DEFINE_MANY', + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ - /** - * Invoked before the component receives new props. - * - * Use this as an opportunity to react to a prop transition by updating the - * state using `this.setState`. Current props are accessed via `this.props`. - * - * componentWillReceiveProps: function(nextProps, nextContext) { - * this.setState({ - * likesIncreasing: nextProps.likeCount > this.props.likeCount - * }); - * } - * - * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop - * transition may cause a state change, but the opposite is not true. If you - * need it, you are probably looking for `componentWillUpdate`. - * - * @param {object} nextProps - * @optional - */ - componentWillReceiveProps: 'DEFINE_MANY', + var performance = __webpack_require__(41); - /** - * Invoked while deciding if the component should be updated as a result of - * receiving new props, state and/or context. - * - * Use this as an opportunity to `return false` when you're certain that the - * transition to the new props/state/context will not require a component - * update. - * - * shouldComponentUpdate: function(nextProps, nextState, nextContext) { - * return !equal(nextProps, this.props) || - * !equal(nextState, this.state) || - * !equal(nextContext, this.context); - * } - * - * @param {object} nextProps - * @param {?object} nextState - * @param {?object} nextContext - * @return {boolean} True if the component should update. - * @optional - */ - shouldComponentUpdate: 'DEFINE_ONCE', + var performanceNow; - /** - * Invoked when the component is about to update due to a transition from - * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` - * and `nextContext`. - * - * Use this as an opportunity to perform preparation before an update occurs. - * - * NOTE: You **cannot** use `this.setState()` in this method. - * - * @param {object} nextProps - * @param {?object} nextState - * @param {?object} nextContext - * @param {ReactReconcileTransaction} transaction - * @optional - */ - componentWillUpdate: 'DEFINE_MANY', + /** + * Detect if we can use `window.performance.now()` and gracefully fallback to + * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now + * because of Facebook's testing infrastructure. + */ + if (performance.now) { + performanceNow = function performanceNow() { + return performance.now(); + }; + } else { + performanceNow = function performanceNow() { + return Date.now(); + }; + } - /** - * Invoked when the component's DOM representation has been updated. - * - * Use this as an opportunity to operate on the DOM when the component has - * been updated. - * - * @param {object} prevProps - * @param {?object} prevState - * @param {?object} prevContext - * @param {DOMElement} rootNode DOM element representing the component. - * @optional - */ - componentDidUpdate: 'DEFINE_MANY', + module.exports = performanceNow; - /** - * Invoked when the component is about to be removed from its parent and have - * its DOM representation destroyed. - * - * Use this as an opportunity to deallocate any external resources. - * - * NOTE: There is no `componentDidUnmount` since your component will have been - * destroyed by that point. - * - * @optional - */ - componentWillUnmount: 'DEFINE_MANY', +/***/ }, +/* 41 */ +/***/ function(module, exports, __webpack_require__) { - // ==== Advanced methods ==== + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ - /** - * Updates the component's currently mounted DOM representation. - * - * By default, this implements React's rendering and reconciliation algorithm. - * Sophisticated clients may wish to override this. - * - * @param {ReactReconcileTransaction} transaction - * @internal - * @overridable - */ - updateComponent: 'OVERRIDE_BASE' + 'use strict'; - }; + var ExecutionEnvironment = __webpack_require__(39); - /** - * Mapping from class specification keys to special processing functions. + var performance; + + if (ExecutionEnvironment.canUseDOM) { + performance = window.performance || window.msPerformance || window.webkitPerformance; + } + + module.exports = performance || {}; + +/***/ }, +/* 42 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. * - * Although these are declared like instance properties in the specification - * when defining classes using `React.createClass`, they are actually static - * and are accessible on the constructor instead of the prototype. Despite - * being static, they must be defined outside of the "statics" key under - * which all other static methods are defined. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactInvalidSetStateWarningDevTool */ - var RESERVED_SPEC_KEYS = { - displayName: function (Constructor, displayName) { - Constructor.displayName = displayName; - }, - mixins: function (Constructor, mixins) { - if (mixins) { - for (var i = 0; i < mixins.length; i++) { - mixSpecIntoComponent(Constructor, mixins[i]); - } - } - }, - childContextTypes: function (Constructor, childContextTypes) { - if (process.env.NODE_ENV !== 'production') { - validateTypeDef(Constructor, childContextTypes, 'childContext'); - } - Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes); - }, - contextTypes: function (Constructor, contextTypes) { - if (process.env.NODE_ENV !== 'production') { - validateTypeDef(Constructor, contextTypes, 'context'); - } - Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes); - }, - /** - * Special case getDefaultProps which should move into statics but requires - * automatic merging. - */ - getDefaultProps: function (Constructor, getDefaultProps) { - if (Constructor.getDefaultProps) { - Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps); - } else { - Constructor.getDefaultProps = getDefaultProps; - } - }, - propTypes: function (Constructor, propTypes) { - if (process.env.NODE_ENV !== 'production') { - validateTypeDef(Constructor, propTypes, 'prop'); - } - Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); - }, - statics: function (Constructor, statics) { - mixStaticSpecIntoComponent(Constructor, statics); - }, - autobind: function () {} }; - function validateTypeDef(Constructor, typeDef, location) { - for (var propName in typeDef) { - if (typeDef.hasOwnProperty(propName)) { - // use a warning instead of an invariant so components - // don't show up in prod but only in __DEV__ - process.env.NODE_ENV !== 'production' ? 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) : void 0; - } - } - } + 'use strict'; - function validateMethodOverride(isAlreadyDefined, name) { - var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; + var warning = __webpack_require__(29); - // Disallow overriding of base class methods unless explicitly allowed. - if (ReactClassMixin.hasOwnProperty(name)) { - !(specPolicy === 'OVERRIDE_BASE') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.', name) : _prodInvariant('73', name) : void 0; - } + if (process.env.NODE_ENV !== 'production') { + var processingChildContext = false; - // Disallow defining methods more than once unless explicitly allowed. - if (isAlreadyDefined) { - !(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('74', name) : void 0; - } + var warnInvalidSetState = function () { + process.env.NODE_ENV !== 'production' ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0; + }; } + var ReactInvalidSetStateWarningDevTool = { + onBeginProcessingChildContext: function () { + processingChildContext = true; + }, + onEndProcessingChildContext: function () { + processingChildContext = false; + }, + onSetState: function () { + warnInvalidSetState(); + } + }; + + module.exports = ReactInvalidSetStateWarningDevTool; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + +/***/ }, +/* 43 */ +/***/ function(module, exports) { + /** - * Mixin helper which handles policy validation and reserved - * specification keys when building React classes. + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactNativeOperationHistoryDevtool */ - function mixSpecIntoComponent(Constructor, spec) { - if (!spec) { - if (process.env.NODE_ENV !== 'production') { - var typeofSpec = typeof spec; - var isMixinValid = typeofSpec === 'object' && spec !== null; - process.env.NODE_ENV !== 'production' ? warning(isMixinValid, '%s: You\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0; + 'use strict'; + + var history = []; + + var ReactNativeOperationHistoryDevtool = { + onNativeOperation: function (debugID, type, payload) { + history.push({ + instanceID: debugID, + type: type, + payload: payload + }); + }, + clearHistory: function () { + if (ReactNativeOperationHistoryDevtool._preventClearing) { + // Should only be used for tests. + return; } - return; + history = []; + }, + getHistory: function () { + return history; } + }; - !(typeof spec !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component class or function as a mixin. Instead, just use a regular object.') : _prodInvariant('75') : void 0; - !!ReactElement.isValidElement(spec) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component as a mixin. Instead, just use a regular object.') : _prodInvariant('76') : void 0; + module.exports = ReactNativeOperationHistoryDevtool; - var proto = Constructor.prototype; - var autoBindPairs = proto.__reactAutoBindPairs; +/***/ }, +/* 44 */ +/***/ function(module, exports, __webpack_require__) { - // By handling mixins before any other properties, we ensure the same - // chaining order is applied to methods with DEFINE_MANY policy, whether - // mixins are listed before or after these methods in the spec. - if (spec.hasOwnProperty(MIXINS_KEY)) { - RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); - } + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactComponentTreeDevtool + */ - for (var name in spec) { - if (!spec.hasOwnProperty(name)) { - continue; - } + 'use strict'; - if (name === MIXINS_KEY) { - // We have already handled mixins in a special case above. - continue; - } + var invariant = __webpack_require__(26); - var property = spec[name]; - var isAlreadyDefined = proto.hasOwnProperty(name); - validateMethodOverride(isAlreadyDefined, name); + var tree = {}; + var rootIDs = []; - if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { - RESERVED_SPEC_KEYS[name](Constructor, property); - } else { - // Setup methods on prototype: - // 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 isFunction = typeof property === 'function'; - var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; + function updateTree(id, update) { + if (!tree[id]) { + tree[id] = { + parentID: null, + ownerID: null, + text: null, + childIDs: [], + displayName: 'Unknown', + isMounted: false, + updateCount: 0 + }; + } + update(tree[id]); + } - if (shouldAutoBind) { - autoBindPairs.push(name, property); - proto[name] = property; - } else { - if (isAlreadyDefined) { - var specPolicy = ReactClassInterface[name]; + function purgeDeep(id) { + var item = tree[id]; + if (item) { + var childIDs = item.childIDs; - // These cases should already be caught by validateMethodOverride. - !(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.', specPolicy, name) : _prodInvariant('77', specPolicy, name) : void 0; + delete tree[id]; + childIDs.forEach(purgeDeep); + } + } - // For methods which are defined more than once, call the existing - // methods before calling the new property, merging if appropriate. - if (specPolicy === 'DEFINE_MANY_MERGED') { - proto[name] = createMergedResultFunction(proto[name], property); - } else if (specPolicy === 'DEFINE_MANY') { - proto[name] = createChainedFunction(proto[name], property); - } - } else { - proto[name] = property; - if (process.env.NODE_ENV !== 'production') { - // Add verbose displayName to the function, which helps when looking - // at profiling tools. - if (typeof property === 'function' && spec.displayName) { - proto[name].displayName = spec.displayName + '_' + name; - } - } + var ReactComponentTreeDevtool = { + onSetDisplayName: function (id, displayName) { + updateTree(id, function (item) { + return item.displayName = displayName; + }); + }, + onSetChildren: function (id, nextChildIDs) { + updateTree(id, function (item) { + var prevChildIDs = item.childIDs; + item.childIDs = nextChildIDs; + + nextChildIDs.forEach(function (nextChildID) { + var nextChild = tree[nextChildID]; + !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected devtool events to fire for the child ' + 'before its parent includes it in onSetChildren().') : invariant(false) : void 0; + !(nextChild.displayName != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetDisplayName() to fire for the child ' + 'before its parent includes it in onSetChildren().') : invariant(false) : void 0; + !(nextChild.childIDs != null || nextChild.text != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() or onSetText() to fire for the child ' + 'before its parent includes it in onSetChildren().') : invariant(false) : void 0; + !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child ' + 'before its parent includes it in onSetChildren().') : invariant(false) : void 0; + + if (prevChildIDs.indexOf(nextChildID) === -1) { + nextChild.parentID = id; } - } + }); + }); + }, + onSetOwner: function (id, ownerID) { + updateTree(id, function (item) { + return item.ownerID = ownerID; + }); + }, + onSetText: function (id, text) { + updateTree(id, function (item) { + return item.text = text; + }); + }, + onMountComponent: function (id) { + updateTree(id, function (item) { + return item.isMounted = true; + }); + }, + onMountRootComponent: function (id) { + rootIDs.push(id); + }, + onUpdateComponent: function (id) { + updateTree(id, function (item) { + return item.updateCount++; + }); + }, + onUnmountComponent: function (id) { + updateTree(id, function (item) { + return item.isMounted = false; + }); + rootIDs = rootIDs.filter(function (rootID) { + return rootID !== id; + }); + }, + purgeUnmountedComponents: function () { + if (ReactComponentTreeDevtool._preventPurging) { + // Should only be used for testing. + return; } - } - } - function mixStaticSpecIntoComponent(Constructor, statics) { - if (!statics) { - return; + Object.keys(tree).filter(function (id) { + return !tree[id].isMounted; + }).forEach(purgeDeep); + }, + isMounted: function (id) { + var item = tree[id]; + return item ? item.isMounted : false; + }, + getChildIDs: function (id) { + var item = tree[id]; + return item ? item.childIDs : []; + }, + getDisplayName: function (id) { + var item = tree[id]; + return item ? item.displayName : 'Unknown'; + }, + getOwnerID: function (id) { + var item = tree[id]; + return item ? item.ownerID : null; + }, + getParentID: function (id) { + var item = tree[id]; + return item ? item.parentID : null; + }, + getText: function (id) { + var item = tree[id]; + return item ? item.text : null; + }, + getUpdateCount: function (id) { + var item = tree[id]; + return item ? item.updateCount : 0; + }, + getRootIDs: function () { + return rootIDs; + }, + getRegisteredIDs: function () { + return Object.keys(tree); } - for (var name in statics) { - var property = statics[name]; - if (!statics.hasOwnProperty(name)) { - continue; - } + }; - var isReserved = name in RESERVED_SPEC_KEYS; - !!isReserved ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.', name) : _prodInvariant('78', name) : void 0; + module.exports = ReactComponentTreeDevtool; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) - var isInherited = name in Constructor; - !!isInherited ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('79', name) : void 0; - Constructor[name] = property; - } - } +/***/ }, +/* 45 */ +/***/ function(module, exports, __webpack_require__) { - /** - * Merge two objects, but throw if both contain the same key. + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * @param {object} one The first object, which is mutated. - * @param {object} two The second object - * @return {object} one after it has been mutated to contain everything in two. */ - function mergeIntoWithNoDuplicateKeys(one, two) { - !(one && two && typeof one === 'object' && typeof two === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : _prodInvariant('80') : void 0; - for (var key in two) { - if (two.hasOwnProperty(key)) { - !(one[key] === undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.', key) : _prodInvariant('81', key) : void 0; - one[key] = two[key]; - } - } - return one; - } + 'use strict'; - /** - * Creates a function that invokes two functions and merges their return values. - * - * @param {function} one Function to invoke first. - * @param {function} two Function to invoke second. - * @return {function} Function that invokes the two argument functions. - * @private - */ - function createMergedResultFunction(one, two) { - return function mergedResult() { - var a = one.apply(this, arguments); - var b = two.apply(this, arguments); - if (a == null) { - return b; - } else if (b == null) { - return a; - } - var c = {}; - mergeIntoWithNoDuplicateKeys(c, a); - mergeIntoWithNoDuplicateKeys(c, b); - return c; - }; - } + var emptyObject = {}; - /** - * Creates a function that invokes two functions and ignores their return vales. - * - * @param {function} one Function to invoke first. - * @param {function} two Function to invoke second. - * @return {function} Function that invokes the two argument functions. - * @private - */ - function createChainedFunction(one, two) { - return function chainedFunction() { - one.apply(this, arguments); - two.apply(this, arguments); - }; + if (process.env.NODE_ENV !== 'production') { + Object.freeze(emptyObject); } - /** - * Binds a method to the component. - * - * @param {object} component Component whose method is going to be bound. - * @param {function} method Method to be bound. - * @return {function} The bound method. - */ - function bindAutoBindMethod(component, method) { - var boundMethod = method.bind(component); - if (process.env.NODE_ENV !== 'production') { - boundMethod.__reactBoundContext = component; - boundMethod.__reactBoundMethod = method; - boundMethod.__reactBoundArguments = null; - var componentName = component.constructor.displayName; - var _bind = boundMethod.bind; - boundMethod.bind = function (newThis) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } + module.exports = emptyObject; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) - // 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) { - process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0; - } else if (!args.length) { - process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0; - return boundMethod; - } - var reboundMethod = _bind.apply(boundMethod, arguments); - reboundMethod.__reactBoundContext = component; - reboundMethod.__reactBoundMethod = method; - reboundMethod.__reactBoundArguments = args; - return reboundMethod; - }; - } - return boundMethod; - } +/***/ }, +/* 46 */ +/***/ function(module, exports, __webpack_require__) { - /** - * Binds all auto-bound methods in a component. + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. * - * @param {object} component Component whose method is going to be bound. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactClass */ - function bindAutoBindMethods(component) { - var pairs = component.__reactAutoBindPairs; - for (var i = 0; i < pairs.length; i += 2) { - var autoBindKey = pairs[i]; - var method = pairs[i + 1]; - component[autoBindKey] = bindAutoBindMethod(component, method); - } - } + + 'use strict'; + + var _assign = __webpack_require__(23); + + var ReactComponent = __webpack_require__(35); + var ReactElement = __webpack_require__(27); + var ReactPropTypeLocations = __webpack_require__(47); + var ReactPropTypeLocationNames = __webpack_require__(49); + var ReactNoopUpdateQueue = __webpack_require__(36); + + var emptyObject = __webpack_require__(45); + var invariant = __webpack_require__(26); + var keyMirror = __webpack_require__(48); + var keyOf = __webpack_require__(50); + var warning = __webpack_require__(29); + + var MIXINS_KEY = keyOf({ mixins: null }); /** - * Add more to the ReactClass base class. These are all legacy features and - * therefore not already part of the modern ReactComponent. + * Policies that describe methods in `ReactClassInterface`. */ - var ReactClassMixin = { - + var SpecPolicy = keyMirror({ /** - * 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. + * These methods may be defined only once by the class specification or mixin. */ - replaceState: function (newState, callback) { - this.updater.enqueueReplaceState(this, newState); - if (callback) { - this.updater.enqueueCallback(this, callback, 'replaceState'); - } - }, - + DEFINE_ONCE: null, /** - * Checks whether or not this composite component is mounted. - * @return {boolean} True if mounted, false otherwise. - * @protected - * @final + * These methods may be defined by both the class specification and mixins. + * Subsequent definitions will be chained. These methods must return void. */ - isMounted: function () { - return this.updater.isMounted(this); - } - }; - - var ReactClassComponent = function () {}; - _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); + DEFINE_MANY: null, + /** + * These methods are overriding the base class. + */ + OVERRIDE_BASE: null, + /** + * These methods are similar to DEFINE_MANY, except we assume they return + * objects. We try to merge the keys of the return values of all the mixed in + * functions. If there is a key conflict we throw. + */ + DEFINE_MANY_MERGED: null + }); + + var injectedMixins = []; /** - * Module for creating composite components. + * Composite components are higher-level components that compose other composite + * or native components. * - * @class ReactClass + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return
Hello World
; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal */ - var ReactClass = { + var ReactClassInterface = { /** - * Creates a composite component class given a class specification. - * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * An array of Mixin objects to include when defining your component. * - * @param {object} spec Class specification (which must define `render`). - * @return {function} Component constructor function. - * @public + * @type {array} + * @optional */ - createClass: function (spec) { - // To keep our warnings more understandable, we'll use a little hack here to - // ensure that Constructor.name !== 'Constructor'. This makes sure we don't - // unnecessarily identify a class without displayName as 'Constructor'. - var Constructor = identity(function (props, context, updater) { - // This constructor gets overridden by mocks. The argument is used - // by mocks to assert on what gets mounted. - - if (process.env.NODE_ENV !== 'production') { - process.env.NODE_ENV !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0; - } - - // Wire up auto-binding - if (this.__reactAutoBindPairs.length) { - bindAutoBindMethods(this); - } - - this.props = props; - this.context = context; - this.refs = emptyObject; - this.updater = updater || ReactNoopUpdateQueue; - - this.state = null; + mixins: SpecPolicy.DEFINE_MANY, - // ReactClasses doesn't have constructors. Instead, they use the - // getInitialState and componentWillMount methods for initialization. + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: SpecPolicy.DEFINE_MANY, - var initialState = this.getInitialState ? this.getInitialState() : null; - if (process.env.NODE_ENV !== 'production') { - // We allow auto-mocks to proceed as if they're returning null. - if (initialState === undefined && this.getInitialState._isMockFunction) { - // This is probably bad practice. Consider warning here and - // deprecating this convenience. - initialState = null; - } - } - !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : _prodInvariant('82', Constructor.displayName || 'ReactCompositeComponent') : void 0; + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: SpecPolicy.DEFINE_MANY, - this.state = initialState; - }); - Constructor.prototype = new ReactClassComponent(); - Constructor.prototype.constructor = Constructor; - Constructor.prototype.__reactAutoBindPairs = []; + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: SpecPolicy.DEFINE_MANY, - injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: SpecPolicy.DEFINE_MANY, - mixSpecIntoComponent(Constructor, spec); + // ==== Definition methods ==== - // Initialize the defaultProps property after all mixins have been merged. - if (Constructor.getDefaultProps) { - Constructor.defaultProps = Constructor.getDefaultProps(); - } + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: SpecPolicy.DEFINE_MANY_MERGED, - if (process.env.NODE_ENV !== 'production') { - // This is a tag to indicate that the use of these method names is ok, - // since it's used with createClass. If it's not, then it's likely a - // mistake so we'll warn you to use the static property, property - // initializer or constructor respectively. - if (Constructor.getDefaultProps) { - Constructor.getDefaultProps.isReactClassApproved = {}; - } - if (Constructor.prototype.getInitialState) { - Constructor.prototype.getInitialState.isReactClassApproved = {}; - } - } + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: SpecPolicy.DEFINE_MANY_MERGED, - !Constructor.prototype.render ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : _prodInvariant('83') : void 0; + /** + * @return {object} + * @optional + */ + getChildContext: SpecPolicy.DEFINE_MANY_MERGED, - if (process.env.NODE_ENV !== 'production') { - process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : void 0; - process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0; - } + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return
Hello, {name}!
; + * } + * + * @return {ReactComponent} + * @nosideeffects + * @required + */ + render: SpecPolicy.DEFINE_ONCE, - // Reduce time spent doing lookups by setting these on the prototype. - for (var methodName in ReactClassInterface) { - if (!Constructor.prototype[methodName]) { - Constructor.prototype[methodName] = null; - } - } + // ==== Delegate methods ==== - return Constructor; - }, + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: SpecPolicy.DEFINE_MANY, - injection: { - injectMixin: function (mixin) { - injectedMixins.push(mixin); - } - } + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: SpecPolicy.DEFINE_MANY, - }; + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: SpecPolicy.DEFINE_MANY, - module.exports = ReactClass; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: SpecPolicy.DEFINE_ONCE, -/***/ }, -/* 42 */ -/***/ function(module, exports, __webpack_require__) { + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: SpecPolicy.DEFINE_MANY, - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - - 'use strict'; + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: SpecPolicy.DEFINE_MANY, - var ReactPropTypeLocationNames = {}; + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: SpecPolicy.DEFINE_MANY, - if (process.env.NODE_ENV !== 'production') { - ReactPropTypeLocationNames = { - prop: 'prop', - context: 'context', - childContext: 'child context' - }; - } + // ==== Advanced methods ==== - module.exports = ReactPropTypeLocationNames; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: SpecPolicy.OVERRIDE_BASE -/***/ }, -/* 43 */ -/***/ function(module, exports, __webpack_require__) { + }; - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + /** + * Mapping from class specification keys to special processing functions. * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. */ + var RESERVED_SPEC_KEYS = { + displayName: function (Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function (Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function (Constructor, childContextTypes) { + if (process.env.NODE_ENV !== 'production') { + validateTypeDef(Constructor, childContextTypes, ReactPropTypeLocations.childContext); + } + Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes); + }, + contextTypes: function (Constructor, contextTypes) { + if (process.env.NODE_ENV !== 'production') { + validateTypeDef(Constructor, contextTypes, ReactPropTypeLocations.context); + } + Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function (Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function (Constructor, propTypes) { + if (process.env.NODE_ENV !== 'production') { + validateTypeDef(Constructor, propTypes, ReactPropTypeLocations.prop); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function (Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function () {} }; - 'use strict'; + // noop + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an invariant so components + // don't show up in prod but only in __DEV__ + process.env.NODE_ENV !== 'production' ? 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) : void 0; + } + } + } - var ReactElement = __webpack_require__(28); + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; - /** - * Create a factory that creates HTML tag elements. - * - * @private - */ - var createDOMFactory = ReactElement.createFactory; - if (process.env.NODE_ENV !== 'production') { - var ReactElementValidator = __webpack_require__(44); - createDOMFactory = ReactElementValidator.createFactory; + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + !(specPolicy === SpecPolicy.OVERRIDE_BASE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name) : invariant(false) : void 0; + } + + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + !(specPolicy === SpecPolicy.DEFINE_MANY || specPolicy === SpecPolicy.DEFINE_MANY_MERGED) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name) : invariant(false) : void 0; + } } /** - * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. - * This is also accessible via `React.DOM`. - * - * @public + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. */ - var ReactDOMFactories = { - a: createDOMFactory('a'), - abbr: createDOMFactory('abbr'), - address: createDOMFactory('address'), - area: createDOMFactory('area'), - article: createDOMFactory('article'), - aside: createDOMFactory('aside'), - audio: createDOMFactory('audio'), - b: createDOMFactory('b'), - base: createDOMFactory('base'), - bdi: createDOMFactory('bdi'), - bdo: createDOMFactory('bdo'), - big: createDOMFactory('big'), - blockquote: createDOMFactory('blockquote'), - body: createDOMFactory('body'), - br: createDOMFactory('br'), - button: createDOMFactory('button'), - canvas: createDOMFactory('canvas'), - caption: createDOMFactory('caption'), - cite: createDOMFactory('cite'), - code: createDOMFactory('code'), - col: createDOMFactory('col'), - colgroup: createDOMFactory('colgroup'), - data: createDOMFactory('data'), - datalist: createDOMFactory('datalist'), - dd: createDOMFactory('dd'), - del: createDOMFactory('del'), - details: createDOMFactory('details'), - dfn: createDOMFactory('dfn'), - dialog: createDOMFactory('dialog'), - div: createDOMFactory('div'), - dl: createDOMFactory('dl'), - dt: createDOMFactory('dt'), - em: createDOMFactory('em'), - embed: createDOMFactory('embed'), - fieldset: createDOMFactory('fieldset'), - figcaption: createDOMFactory('figcaption'), - figure: createDOMFactory('figure'), - footer: createDOMFactory('footer'), - form: createDOMFactory('form'), - h1: createDOMFactory('h1'), - h2: createDOMFactory('h2'), - h3: createDOMFactory('h3'), - h4: createDOMFactory('h4'), - h5: createDOMFactory('h5'), - h6: createDOMFactory('h6'), - head: createDOMFactory('head'), - header: createDOMFactory('header'), - hgroup: createDOMFactory('hgroup'), - hr: createDOMFactory('hr'), - html: createDOMFactory('html'), - i: createDOMFactory('i'), - iframe: createDOMFactory('iframe'), - img: createDOMFactory('img'), - input: createDOMFactory('input'), - ins: createDOMFactory('ins'), - kbd: createDOMFactory('kbd'), - keygen: createDOMFactory('keygen'), - label: createDOMFactory('label'), - legend: createDOMFactory('legend'), - li: createDOMFactory('li'), - link: createDOMFactory('link'), - main: createDOMFactory('main'), - map: createDOMFactory('map'), - mark: createDOMFactory('mark'), - menu: createDOMFactory('menu'), - menuitem: createDOMFactory('menuitem'), - meta: createDOMFactory('meta'), - meter: createDOMFactory('meter'), - nav: createDOMFactory('nav'), - noscript: createDOMFactory('noscript'), - object: createDOMFactory('object'), - ol: createDOMFactory('ol'), - optgroup: createDOMFactory('optgroup'), - option: createDOMFactory('option'), - output: createDOMFactory('output'), - p: createDOMFactory('p'), - param: createDOMFactory('param'), - picture: createDOMFactory('picture'), - pre: createDOMFactory('pre'), - progress: createDOMFactory('progress'), - q: createDOMFactory('q'), - rp: createDOMFactory('rp'), - rt: createDOMFactory('rt'), - ruby: createDOMFactory('ruby'), - s: createDOMFactory('s'), - samp: createDOMFactory('samp'), - script: createDOMFactory('script'), - section: createDOMFactory('section'), - select: createDOMFactory('select'), - small: createDOMFactory('small'), - source: createDOMFactory('source'), - span: createDOMFactory('span'), - strong: createDOMFactory('strong'), - style: createDOMFactory('style'), - sub: createDOMFactory('sub'), - summary: createDOMFactory('summary'), - sup: createDOMFactory('sup'), - table: createDOMFactory('table'), - tbody: createDOMFactory('tbody'), - td: createDOMFactory('td'), - textarea: createDOMFactory('textarea'), - tfoot: createDOMFactory('tfoot'), - th: createDOMFactory('th'), - thead: createDOMFactory('thead'), - time: createDOMFactory('time'), - title: createDOMFactory('title'), - tr: createDOMFactory('tr'), - track: createDOMFactory('track'), - u: createDOMFactory('u'), - ul: createDOMFactory('ul'), - 'var': createDOMFactory('var'), - video: createDOMFactory('video'), - wbr: createDOMFactory('wbr'), + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + return; + } - // SVG - circle: createDOMFactory('circle'), - clipPath: createDOMFactory('clipPath'), - defs: createDOMFactory('defs'), - ellipse: createDOMFactory('ellipse'), - g: createDOMFactory('g'), - image: createDOMFactory('image'), - line: createDOMFactory('line'), - linearGradient: createDOMFactory('linearGradient'), - mask: createDOMFactory('mask'), - path: createDOMFactory('path'), - pattern: createDOMFactory('pattern'), - polygon: createDOMFactory('polygon'), - polyline: createDOMFactory('polyline'), - radialGradient: createDOMFactory('radialGradient'), - rect: createDOMFactory('rect'), - stop: createDOMFactory('stop'), - svg: createDOMFactory('svg'), - text: createDOMFactory('text'), - tspan: createDOMFactory('tspan') - }; + !(typeof spec !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to ' + 'use a component class or function as a mixin. Instead, just use a ' + 'regular object.') : invariant(false) : void 0; + !!ReactElement.isValidElement(spec) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to ' + 'use a component as a mixin. Instead, just use a regular object.') : invariant(false) : void 0; - module.exports = ReactDOMFactories; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; -/***/ }, -/* 44 */ -/***/ function(module, exports, __webpack_require__) { + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2014-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } - /** - * ReactElementValidator provides a wrapper around a element factory - * which validates the props passed to the element. This is intended to be - * used only in DEV and could be replaced by a static type checker for languages - * that support it. - */ + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; + } - 'use strict'; + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); - var ReactCurrentOwner = __webpack_require__(29); - var ReactComponentTreeHook = __webpack_require__(45); - var ReactElement = __webpack_require__(28); + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // 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 isFunction = typeof property === 'function'; + var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; - var checkReactTypeSpec = __webpack_require__(46); + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; - var canDefineProperty = __webpack_require__(32); - var getIteratorFn = __webpack_require__(35); - var warning = __webpack_require__(30); + // These cases should already be caught by validateMethodOverride. + !(isReactClassMethod && (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name) : invariant(false) : void 0; - function getDeclarationErrorAddendum() { - if (ReactCurrentOwner.current) { - var name = ReactCurrentOwner.current.getName(); - if (name) { - return ' Check the render method of `' + name + '`.'; + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === SpecPolicy.DEFINE_MANY_MERGED) { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === SpecPolicy.DEFINE_MANY) { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if (process.env.NODE_ENV !== 'production') { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } } } - return ''; } - /** - * Warn if there's no key explicitly set on dynamic arrays of children or - * object keys are not valid. This allows us to keep track of children between - * updates. - */ - var ownerHasKeyUseWarning = {}; + function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } - function getCurrentComponentErrorInfo(parentType) { - var info = getDeclarationErrorAddendum(); + var isReserved = name in RESERVED_SPEC_KEYS; + !!isReserved ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name) : invariant(false) : void 0; - if (!info) { - var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; - if (parentName) { - info = ' Check the top-level render call using <' + parentName + '>.'; - } + var isInherited = name in Constructor; + !!isInherited ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name) : invariant(false) : void 0; + Constructor[name] = property; } - return info; } /** - * Warn if the element doesn't have an explicit key assigned to it. - * This element is in an array. The array could grow and shrink or be - * reordered. All children that haven't already been validated are required to - * have a "key" property assigned to it. Error statuses are cached so a warning - * will only be shown once. + * Merge two objects, but throw if both contain the same key. * - * @internal - * @param {ReactElement} element Element that requires a key. - * @param {*} parentType element's parent's type. + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. */ - function validateExplicitKey(element, parentType) { - if (!element._store || element._store.validated || element.key != null) { - return; - } - element._store.validated = true; - - var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {}); + function mergeIntoWithNoDuplicateKeys(one, two) { + !(one && two && typeof one === 'object' && typeof two === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : invariant(false) : void 0; - var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); - if (memoizer[currentComponentErrorInfo]) { - return; + for (var key in two) { + if (two.hasOwnProperty(key)) { + !(one[key] === undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key) : invariant(false) : void 0; + one[key] = two[key]; + } } - memoizer[currentComponentErrorInfo] = true; + return one; + } - // 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 childOwner = ''; - if (element && element._owner && element._owner !== ReactCurrentOwner.current) { - // Give the component that originally created this child. - childOwner = ' It was passed a child from ' + element._owner.getName() + '.'; - } + /** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; + } - process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0; + /** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; } /** - * Ensure that every element either is passed in a static location, in an - * array with an explicit keys property defined, or in an object literal - * with valid key property. + * Binds a method to the component. * - * @internal - * @param {ReactNode} node Statically passed child of any type. - * @param {*} parentType node's parent's type. + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. */ - function validateChildKeys(node, parentType) { - if (typeof node !== 'object') { - return; - } - if (Array.isArray(node)) { - for (var i = 0; i < node.length; i++) { - var child = node[i]; - if (ReactElement.isValidElement(child)) { - validateExplicitKey(child, parentType); + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if (process.env.NODE_ENV !== 'production') { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function (newThis) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; } - } - } else if (ReactElement.isValidElement(node)) { - // This element was passed in a valid location. - if (node._store) { - node._store.validated = true; - } - } else if (node) { - var iteratorFn = getIteratorFn(node); - // Entry iterators provide implicit keys. - if (iteratorFn) { - if (iteratorFn !== node.entries) { - var iterator = iteratorFn.call(node); - var step; - while (!(step = iterator.next()).done) { - if (ReactElement.isValidElement(step.value)) { - validateExplicitKey(step.value, parentType); - } - } + + // 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) { + process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0; + } else if (!args.length) { + process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0; + return boundMethod; } - } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; } + return boundMethod; } /** - * Given an element, validate that its props follow the propTypes definition, - * provided by the type. + * Binds all auto-bound methods in a component. * - * @param {ReactElement} element + * @param {object} component Component whose method is going to be bound. */ - function validatePropTypes(element) { - var componentClass = element.type; - if (typeof componentClass !== 'function') { - return; - } - var name = componentClass.displayName || componentClass.name; - if (componentClass.propTypes) { - checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null); - } - if (typeof componentClass.getDefaultProps === 'function') { - process.env.NODE_ENV !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0; + function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); } } - var ReactElementValidator = { - - createElement: function (type, props, children) { - var validType = typeof type === 'string' || typeof type === 'function'; - // We warn in this case but don't throw. We expect the element creation to - // succeed and there will likely be errors in render. - if (!validType) { - process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : void 0; - } - - var element = ReactElement.createElement.apply(this, arguments); + /** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ + var ReactClassMixin = { - // The result can be nullish if a mock or a custom function is used. - // TODO: Drop this when these are no longer allowed as the type argument. - if (element == null) { - return element; + /** + * 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 (newState, callback) { + this.updater.enqueueReplaceState(this, newState); + if (callback) { + this.updater.enqueueCallback(this, callback, 'replaceState'); } + }, - // Skip key warning if the type isn't valid since our key validation logic - // doesn't expect a non-string/function type and can throw confusing errors. - // We don't want exception behavior to differ between dev and prod. - // (Rendering will throw with a helpful message and as soon as the type is - // fixed, the key warnings will appear.) - if (validType) { - for (var i = 2; i < arguments.length; i++) { - validateChildKeys(arguments[i], type); - } - } + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function () { + return this.updater.isMounted(this); + } + }; - validatePropTypes(element); + var ReactClassComponent = function () {}; + _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); - return element; - }, + /** + * Module for creating composite components. + * + * @class ReactClass + */ + var ReactClass = { - createFactory: function (type) { - var validatedFactory = ReactElementValidator.createElement.bind(null, type); - // Legacy hook TODO: Warn if this is accessed - validatedFactory.type = type; + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + createClass: function (spec) { + var Constructor = function (props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. - if (process.env.NODE_ENV !== 'production') { - if (canDefineProperty) { - Object.defineProperty(validatedFactory, 'type', { - enumerable: false, - get: function () { - process.env.NODE_ENV !== 'production' ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : void 0; - Object.defineProperty(this, 'type', { - value: type - }); - return type; - } - }); + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0; } - } - return validatedFactory; - }, + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } - 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); - } - validatePropTypes(newElement); - return newElement; - } + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; - }; + this.state = null; - module.exports = ReactElementValidator; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) - -/***/ }, -/* 45 */ -/***/ function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - - 'use strict'; - - var _prodInvariant = __webpack_require__(26); - - var ReactCurrentOwner = __webpack_require__(29); - - var invariant = __webpack_require__(27); - var warning = __webpack_require__(30); - - function isNative(fn) { - // Based on isNative() from Lodash - var funcToString = Function.prototype.toString; - var hasOwnProperty = Object.prototype.hasOwnProperty; - var reIsNative = RegExp('^' + funcToString - // Take an example native function source for comparison - .call(hasOwnProperty) - // Strip regex characters so we can use it for regex - .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') - // Remove hasOwnProperty from the template to make it generic - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); - try { - var source = funcToString.call(fn); - return reIsNative.test(source); - } catch (err) { - return false; - } - } - - var canUseCollections = - // Array.from - typeof Array.from === 'function' && - // Map - typeof Map === 'function' && isNative(Map) && - // Map.prototype.keys - Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) && - // Set - typeof Set === 'function' && isNative(Set) && - // Set.prototype.keys - Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys); - - if (canUseCollections) { - var itemMap = new Map(); - var rootIDSet = new Set(); - - var setItem = function (id, item) { - itemMap.set(id, item); - }; - var getItem = function (id) { - return itemMap.get(id); - }; - var removeItem = function (id) { - itemMap['delete'](id); - }; - var getItemIDs = function () { - return Array.from(itemMap.keys()); - }; - - var addRoot = function (id) { - rootIDSet.add(id); - }; - var removeRoot = function (id) { - rootIDSet['delete'](id); - }; - var getRootIDs = function () { - return Array.from(rootIDSet.keys()); - }; - } else { - var itemByKey = {}; - var rootByKey = {}; - - // Use non-numeric keys to prevent V8 performance issues: - // https://github.com/facebook/react/pull/7232 - var getKeyFromID = function (id) { - return '.' + id; - }; - var getIDFromKey = function (key) { - return parseInt(key.substr(1), 10); - }; - - var setItem = function (id, item) { - var key = getKeyFromID(id); - itemByKey[key] = item; - }; - var getItem = function (id) { - var key = getKeyFromID(id); - return itemByKey[key]; - }; - var removeItem = function (id) { - var key = getKeyFromID(id); - delete itemByKey[key]; - }; - var getItemIDs = function () { - return Object.keys(itemByKey).map(getIDFromKey); - }; + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. - var addRoot = function (id) { - var key = getKeyFromID(id); - rootByKey[key] = true; - }; - var removeRoot = function (id) { - var key = getKeyFromID(id); - delete rootByKey[key]; - }; - var getRootIDs = function () { - return Object.keys(rootByKey).map(getIDFromKey); - }; - } + var initialState = this.getInitialState ? this.getInitialState() : null; + if (process.env.NODE_ENV !== 'production') { + // We allow auto-mocks to proceed as if they're returning null. + if (initialState === undefined && this.getInitialState._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : invariant(false) : void 0; - var unmountedIDs = []; + this.state = initialState; + }; + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; - function purgeDeep(id) { - var item = getItem(id); - if (item) { - var childIDs = item.childIDs; + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); - removeItem(id); - childIDs.forEach(purgeDeep); - } - } + mixSpecIntoComponent(Constructor, spec); - function describeComponentFrame(name, source, ownerName) { - return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : ''); - } + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } - function getDisplayName(element) { - if (element == null) { - return '#empty'; - } else if (typeof element === 'string' || typeof element === 'number') { - return '#text'; - } else if (typeof element.type === 'string') { - return element.type; - } else { - return element.type.displayName || element.type.name || 'Unknown'; - } - } + if (process.env.NODE_ENV !== 'production') { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } - function describeID(id) { - var name = ReactComponentTreeHook.getDisplayName(id); - var element = ReactComponentTreeHook.getElement(id); - var ownerID = ReactComponentTreeHook.getOwnerID(id); - var ownerName; - if (ownerID) { - ownerName = ReactComponentTreeHook.getDisplayName(ownerID); - } - process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0; - return describeComponentFrame(name, element && element._source, ownerName); - } + !Constructor.prototype.render ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : invariant(false) : void 0; - var ReactComponentTreeHook = { - onSetChildren: function (id, nextChildIDs) { - var item = getItem(id); - !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0; - item.childIDs = nextChildIDs; - - for (var i = 0; i < nextChildIDs.length; i++) { - var nextChildID = nextChildIDs[i]; - var nextChild = getItem(nextChildID); - !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0; - !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0; - !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0; - if (nextChild.parentID == null) { - nextChild.parentID = id; - // TODO: This shouldn't be necessary but mounting a new root during in - // componentWillMount currently causes not-yet-mounted components to - // be purged from our tree data so their parent id is missing. - } - !(nextChild.parentID === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0; - } - }, - onBeforeMountComponent: function (id, element, parentID) { - var item = { - element: element, - parentID: parentID, - text: null, - childIDs: [], - isMounted: false, - updateCount: 0 - }; - setItem(id, item); - }, - onBeforeUpdateComponent: function (id, element) { - var item = getItem(id); - if (!item || !item.isMounted) { - // We may end up here as a result of setState() in componentWillUnmount(). - // In this case, ignore the element. - return; - } - item.element = element; - }, - onMountComponent: function (id) { - var item = getItem(id); - !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0; - item.isMounted = true; - var isRoot = item.parentID === 0; - if (isRoot) { - addRoot(id); - } - }, - onUpdateComponent: function (id) { - var item = getItem(id); - if (!item || !item.isMounted) { - // We may end up here as a result of setState() in componentWillUnmount(). - // In this case, ignore the element. - return; + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0; } - item.updateCount++; - }, - onUnmountComponent: function (id) { - var item = getItem(id); - if (item) { - // We need to check if it exists. - // `item` might not exist if it is inside an error boundary, and a sibling - // error boundary child threw while mounting. Then this instance never - // got a chance to mount, but it still gets an unmounting event during - // the error boundary cleanup. - item.isMounted = false; - var isRoot = item.parentID === 0; - if (isRoot) { - removeRoot(id); + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; } } - unmountedIDs.push(id); - }, - purgeUnmountedComponents: function () { - if (ReactComponentTreeHook._preventPurging) { - // Should only be used for testing. - return; - } - for (var i = 0; i < unmountedIDs.length; i++) { - var id = unmountedIDs[i]; - purgeDeep(id); - } - unmountedIDs.length = 0; - }, - isMounted: function (id) { - var item = getItem(id); - return item ? item.isMounted : false; + return Constructor; }, - getCurrentStackAddendum: function (topElement) { - var info = ''; - if (topElement) { - var name = getDisplayName(topElement); - var owner = topElement._owner; - info += describeComponentFrame(name, topElement._source, owner && owner.getName()); - } - - var currentOwner = ReactCurrentOwner.current; - var id = currentOwner && currentOwner._debugID; - info += ReactComponentTreeHook.getStackAddendumByID(id); - return info; - }, - getStackAddendumByID: function (id) { - var info = ''; - while (id) { - info += describeID(id); - id = ReactComponentTreeHook.getParentID(id); - } - return info; - }, - getChildIDs: function (id) { - var item = getItem(id); - return item ? item.childIDs : []; - }, - getDisplayName: function (id) { - var element = ReactComponentTreeHook.getElement(id); - if (!element) { - return null; - } - return getDisplayName(element); - }, - getElement: function (id) { - var item = getItem(id); - return item ? item.element : null; - }, - getOwnerID: function (id) { - var element = ReactComponentTreeHook.getElement(id); - if (!element || !element._owner) { - return null; - } - return element._owner._debugID; - }, - getParentID: function (id) { - var item = getItem(id); - return item ? item.parentID : null; - }, - getSource: function (id) { - var item = getItem(id); - var element = item ? item.element : null; - var source = element != null ? element._source : null; - return source; - }, - getText: function (id) { - var element = ReactComponentTreeHook.getElement(id); - if (typeof element === 'string') { - return element; - } else if (typeof element === 'number') { - return '' + element; - } else { - return null; + injection: { + injectMixin: function (mixin) { + injectedMixins.push(mixin); } - }, - getUpdateCount: function (id) { - var item = getItem(id); - return item ? item.updateCount : 0; - }, - + } - getRootIDs: getRootIDs, - getRegisteredIDs: getItemIDs }; - module.exports = ReactComponentTreeHook; + module.exports = ReactClass; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 46 */ +/* 47 */ /***/ function(module, exports, __webpack_require__) { - /* WEBPACK VAR INJECTION */(function(process) {/** + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -3651,109 +3351,76 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule ReactPropTypeLocations */ 'use strict'; - var _prodInvariant = __webpack_require__(26); - - var ReactPropTypeLocationNames = __webpack_require__(42); - var ReactPropTypesSecret = __webpack_require__(47); - - var invariant = __webpack_require__(27); - var warning = __webpack_require__(30); - - var ReactComponentTreeHook; - - if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { - // Temporary hack. - // Inline requires don't work well with Jest: - // https://github.com/facebook/react/issues/7240 - // Remove the inline requires when we don't need them anymore: - // https://github.com/facebook/react/pull/7178 - ReactComponentTreeHook = __webpack_require__(45); - } - - var loggedTypeFailures = {}; - - /** - * Assert that the values match with the type specs. - * Error messages are memorized and will only be shown once. - * - * @param {object} typeSpecs Map of name to a ReactPropType - * @param {object} values Runtime values that need to be type-checked - * @param {string} location e.g. "prop", "context", "child context" - * @param {string} componentName Name of the component for error messages. - * @param {?object} element The React element that is being type-checked - * @param {?number} debugID The React component instance that is being type-checked - * @private - */ - function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) { - for (var typeSpecName in typeSpecs) { - if (typeSpecs.hasOwnProperty(typeSpecName)) { - var error; - // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0; - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); - } catch (ex) { - error = ex; - } - process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0; - if (error instanceof Error && !(error.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error.message] = true; - - var componentStackInfo = ''; - - if (process.env.NODE_ENV !== 'production') { - if (!ReactComponentTreeHook) { - ReactComponentTreeHook = __webpack_require__(45); - } - if (debugID !== null) { - componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); - } else if (element !== null) { - componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); - } - } + var keyMirror = __webpack_require__(48); - process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0; - } - } - } - } + var ReactPropTypeLocations = keyMirror({ + prop: null, + context: null, + childContext: null + }); - module.exports = checkReactTypeSpec; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + module.exports = ReactPropTypeLocations; /***/ }, -/* 47 */ -/***/ function(module, exports) { +/* 48 */ +/***/ function(module, exports, __webpack_require__) { - /** - * Copyright 2013-present, Facebook, Inc. + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * + * @typechecks static-only */ 'use strict'; - var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + var invariant = __webpack_require__(26); + + /** + * Constructs an enumeration with keys equal to their value. + * + * For example: + * + * var COLORS = keyMirror({blue: null, red: null}); + * var myColor = COLORS.blue; + * var isColorValid = !!COLORS[myColor]; + * + * The last line could not be performed if the values of the generated enum were + * not equal to their keys. + * + * Input: {key1: val1, key2: val2} + * Output: {key1: key1, key2: key2} + * + * @param {object} obj + * @return {object} + */ + var keyMirror = function keyMirror(obj) { + var ret = {}; + var key; + !(obj instanceof Object && !Array.isArray(obj)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'keyMirror(...): Argument must be an object.') : invariant(false) : void 0; + for (key in obj) { + if (!obj.hasOwnProperty(key)) { + continue; + } + ret[key] = key; + } + return ret; + }; - module.exports = ReactPropTypesSecret; + module.exports = keyMirror; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 48 */ +/* 49 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -3764,439 +3431,538 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule ReactPropTypeLocationNames */ 'use strict'; - var ReactElement = __webpack_require__(28); - var ReactPropTypeLocationNames = __webpack_require__(42); - var ReactPropTypesSecret = __webpack_require__(47); + var ReactPropTypeLocationNames = {}; - var emptyFunction = __webpack_require__(31); - var getIteratorFn = __webpack_require__(35); - var warning = __webpack_require__(30); + if (process.env.NODE_ENV !== 'production') { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context' + }; + } - /** - * Collection of methods that allow declaration and validation of props that are - * supplied to React components. Example usage: - * - * var Props = require('ReactPropTypes'); - * var MyArticle = React.createClass({ - * propTypes: { - * // An optional string prop named "description". - * description: Props.string, - * - * // A required enum prop named "category". - * category: Props.oneOf(['News','Photos']).isRequired, - * - * // A prop named "dialog" that requires an instance of Dialog. - * dialog: Props.instanceOf(Dialog).isRequired - * }, - * render: function() { ... } - * }); - * - * A more formal specification of how these methods are used: + module.exports = ReactPropTypeLocationNames; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + +/***/ }, +/* 50 */ +/***/ function(module, exports) { + + "use strict"; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. * - * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) - * decl := ReactPropTypes.{type}(.isRequired)? + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * Each and every declaration produces a function with the same signature. This - * allows the creation of custom validation functions. For example: + */ + + /** + * Allows extraction of a minified key. Let's the build system minify keys + * without losing the ability to dynamically use key strings as values + * themselves. Pass in an object with a single key/val pair and it will return + * you the string key of that single record. Suppose you want to grab the + * value for a key 'className' inside of an object. Key/val minification may + * have aliased that key to be 'xa12'. keyOf({className: null}) will return + * 'xa12' in that case. Resolve keys you want to use once at startup time, then + * reuse those resolutions. + */ + var keyOf = function keyOf(oneKeyObj) { + var key; + for (key in oneKeyObj) { + if (!oneKeyObj.hasOwnProperty(key)) { + continue; + } + return key; + } + return null; + }; + + module.exports = keyOf; + +/***/ }, +/* 51 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. * - * var MyLink = React.createClass({ - * propTypes: { - * // An optional string or URI prop named "href". - * href: function(props, propName, componentName) { - * var propValue = props[propName]; - * if (propValue != null && typeof propValue !== 'string' && - * !(propValue instanceof URI)) { - * return new Error( - * 'Expected a string or an URI for ' + propName + ' in ' + - * componentName - * ); - * } - * } - * }, - * render: function() {...} - * }); + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * @internal + * @providesModule ReactDOMFactories */ - var ANONYMOUS = '<>'; + 'use strict'; - var ReactPropTypes = { - array: createPrimitiveTypeChecker('array'), - bool: createPrimitiveTypeChecker('boolean'), - func: createPrimitiveTypeChecker('function'), - number: createPrimitiveTypeChecker('number'), - object: createPrimitiveTypeChecker('object'), - string: createPrimitiveTypeChecker('string'), - symbol: createPrimitiveTypeChecker('symbol'), + var ReactElement = __webpack_require__(27); + var ReactElementValidator = __webpack_require__(52); - any: createAnyTypeChecker(), - arrayOf: createArrayOfTypeChecker, - element: createElementTypeChecker(), - instanceOf: createInstanceTypeChecker, - node: createNodeChecker(), - objectOf: createObjectOfTypeChecker, - oneOf: createEnumTypeChecker, - oneOfType: createUnionTypeChecker, - shape: createShapeTypeChecker - }; + var mapObject = __webpack_require__(53); /** - * inlined Object.is polyfill to avoid requiring consumers ship their own - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + * Create a factory that creates HTML tag elements. + * + * @param {string} tag Tag name (e.g. `div`). + * @private */ - /*eslint-disable no-self-compare*/ - function is(x, y) { - // SameValue algorithm - if (x === y) { - // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - return x !== 0 || 1 / x === 1 / y; - } else { - // Step 6.a: NaN == NaN - return x !== x && y !== y; + function createDOMFactory(tag) { + if (process.env.NODE_ENV !== 'production') { + return ReactElementValidator.createFactory(tag); } + return ReactElement.createFactory(tag); } - /*eslint-enable no-self-compare*/ /** - * We use an Error-like object for backward compatibility as people may call - * PropTypes directly and inspect their output. However we don't use real - * Errors anymore. We don't inspect their stack anyway, and creating them - * is prohibitively expensive if they are created too often, such as what - * happens in oneOfType() for any type before the one that matched. + * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. + * This is also accessible via `React.DOM`. + * + * @public */ - function PropTypeError(message) { - this.message = message; - this.stack = ''; - } - // Make `instanceof Error` still work for returned errors. - PropTypeError.prototype = Error.prototype; + var ReactDOMFactories = mapObject({ + a: 'a', + abbr: 'abbr', + address: 'address', + area: 'area', + article: 'article', + aside: 'aside', + audio: 'audio', + b: 'b', + base: 'base', + bdi: 'bdi', + bdo: 'bdo', + big: 'big', + blockquote: 'blockquote', + body: 'body', + br: 'br', + button: 'button', + canvas: 'canvas', + caption: 'caption', + cite: 'cite', + code: 'code', + col: 'col', + colgroup: 'colgroup', + data: 'data', + datalist: 'datalist', + dd: 'dd', + del: 'del', + details: 'details', + dfn: 'dfn', + dialog: 'dialog', + div: 'div', + dl: 'dl', + dt: 'dt', + em: 'em', + embed: 'embed', + fieldset: 'fieldset', + figcaption: 'figcaption', + figure: 'figure', + footer: 'footer', + form: 'form', + h1: 'h1', + h2: 'h2', + h3: 'h3', + h4: 'h4', + h5: 'h5', + h6: 'h6', + head: 'head', + header: 'header', + hgroup: 'hgroup', + hr: 'hr', + html: 'html', + i: 'i', + iframe: 'iframe', + img: 'img', + input: 'input', + ins: 'ins', + kbd: 'kbd', + keygen: 'keygen', + label: 'label', + legend: 'legend', + li: 'li', + link: 'link', + main: 'main', + map: 'map', + mark: 'mark', + menu: 'menu', + menuitem: 'menuitem', + meta: 'meta', + meter: 'meter', + nav: 'nav', + noscript: 'noscript', + object: 'object', + ol: 'ol', + optgroup: 'optgroup', + option: 'option', + output: 'output', + p: 'p', + param: 'param', + picture: 'picture', + pre: 'pre', + progress: 'progress', + q: 'q', + rp: 'rp', + rt: 'rt', + ruby: 'ruby', + s: 's', + samp: 'samp', + script: 'script', + section: 'section', + select: 'select', + small: 'small', + source: 'source', + span: 'span', + strong: 'strong', + style: 'style', + sub: 'sub', + summary: 'summary', + sup: 'sup', + table: 'table', + tbody: 'tbody', + td: 'td', + textarea: 'textarea', + tfoot: 'tfoot', + th: 'th', + thead: 'thead', + time: 'time', + title: 'title', + tr: 'tr', + track: 'track', + u: 'u', + ul: 'ul', + 'var': 'var', + video: 'video', + wbr: 'wbr', - function createChainableTypeChecker(validate) { - if (process.env.NODE_ENV !== 'production') { - var manualPropTypeCallCache = {}; - } - function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { - componentName = componentName || ANONYMOUS; - propFullName = propFullName || propName; - if (process.env.NODE_ENV !== 'production') { - if (secret !== ReactPropTypesSecret && typeof console !== 'undefined') { - var cacheKey = componentName + ':' + propName; - if (!manualPropTypeCallCache[cacheKey]) { - process.env.NODE_ENV !== 'production' ? warning(false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will not work in production with the next major version. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName) : void 0; - manualPropTypeCallCache[cacheKey] = true; - } - } - } - if (props[propName] == null) { - var locationName = ReactPropTypeLocationNames[location]; - if (isRequired) { - if (props[propName] === null) { - return new PropTypeError('The ' + locationName + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); - } - return new PropTypeError('The ' + locationName + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); - } - return null; - } else { - return validate(props, propName, componentName, location, propFullName); - } - } + // SVG + circle: 'circle', + clipPath: 'clipPath', + defs: 'defs', + ellipse: 'ellipse', + g: 'g', + image: 'image', + line: 'line', + linearGradient: 'linearGradient', + mask: 'mask', + path: 'path', + pattern: 'pattern', + polygon: 'polygon', + polyline: 'polyline', + radialGradient: 'radialGradient', + rect: 'rect', + stop: 'stop', + svg: 'svg', + text: 'text', + tspan: 'tspan' + + }, createDOMFactory); - var chainedCheckType = checkType.bind(null, false); - chainedCheckType.isRequired = checkType.bind(null, true); + module.exports = ReactDOMFactories; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) - return chainedCheckType; - } +/***/ }, +/* 52 */ +/***/ function(module, exports, __webpack_require__) { - function createPrimitiveTypeChecker(expectedType) { - function validate(props, propName, componentName, location, propFullName, secret) { - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== expectedType) { - var locationName = ReactPropTypeLocationNames[location]; - // `propValue` being instance of, say, date/regexp, pass the 'object' - // check, but we can offer a more precise error message here rather than - // 'of type `object`'. - var preciseType = getPreciseType(propValue); + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactElementValidator + */ + + /** + * ReactElementValidator provides a wrapper around a element factory + * which validates the props passed to the element. This is intended to be + * used only in DEV and could be replaced by a static type checker for languages + * that support it. + */ + + 'use strict'; + + var ReactElement = __webpack_require__(27); + var ReactPropTypeLocations = __webpack_require__(47); + var ReactPropTypeLocationNames = __webpack_require__(49); + var ReactCurrentOwner = __webpack_require__(28); - return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); + var canDefineProperty = __webpack_require__(31); + var getIteratorFn = __webpack_require__(33); + var invariant = __webpack_require__(26); + var warning = __webpack_require__(29); + + function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; } - return null; } - return createChainableTypeChecker(validate); + return ''; } - function createAnyTypeChecker() { - return createChainableTypeChecker(emptyFunction.thatReturns(null)); - } + /** + * Warn if there's no key explicitly set on dynamic arrays of children or + * object keys are not valid. This allows us to keep track of children between + * updates. + */ + var ownerHasKeyUseWarning = {}; - function createArrayOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); - } - var propValue = props[propName]; - if (!Array.isArray(propValue)) { - var locationName = ReactPropTypeLocationNames[location]; - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); - } - for (var i = 0; i < propValue.length; i++) { - var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); - if (error instanceof Error) { - return error; - } - } - return null; + var loggedTypeFailures = {}; + + /** + * Warn if the element doesn't have an explicit key assigned to it. + * This element is in an array. The array could grow and shrink or be + * reordered. All children that haven't already been validated are required to + * have a "key" property assigned to it. + * + * @internal + * @param {ReactElement} element Element that requires a key. + * @param {*} parentType element's parent's type. + */ + function validateExplicitKey(element, parentType) { + if (!element._store || element._store.validated || element.key != null) { + return; } - return createChainableTypeChecker(validate); - } + element._store.validated = true; - function createElementTypeChecker() { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - if (!ReactElement.isValidElement(propValue)) { - var locationName = ReactPropTypeLocationNames[location]; - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); - } - return null; + var addenda = getAddendaForKeyUse('uniqueKey', element, parentType); + if (addenda === null) { + // we already showed the warning + return; } - return createChainableTypeChecker(validate); + process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s%s', addenda.parentOrOwner || '', addenda.childOwner || '', addenda.url || '') : void 0; } - function createInstanceTypeChecker(expectedClass) { - function validate(props, propName, componentName, location, propFullName) { - if (!(props[propName] instanceof expectedClass)) { - var locationName = ReactPropTypeLocationNames[location]; - var expectedClassName = expectedClass.name || ANONYMOUS; - var actualClassName = getClassName(props[propName]); - return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); + /** + * Shared warning and monitoring code for the key warnings. + * + * @internal + * @param {string} messageType A key used for de-duping warnings. + * @param {ReactElement} element Component that requires a key. + * @param {*} parentType element's parent's type. + * @returns {?object} A set of addenda to use in the warning message, or null + * if the warning has already been shown before (and shouldn't be shown again). + */ + function getAddendaForKeyUse(messageType, element, parentType) { + var addendum = getDeclarationErrorAddendum(); + if (!addendum) { + var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; + if (parentName) { + addendum = ' Check the top-level render call using <' + parentName + '>.'; } - return null; } - return createChainableTypeChecker(validate); - } - function createEnumTypeChecker(expectedValues) { - if (!Array.isArray(expectedValues)) { - process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0; - return emptyFunction.thatReturnsNull; + var memoizer = ownerHasKeyUseWarning[messageType] || (ownerHasKeyUseWarning[messageType] = {}); + if (memoizer[addendum]) { + return null; } + memoizer[addendum] = true; - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - for (var i = 0; i < expectedValues.length; i++) { - if (is(propValue, expectedValues[i])) { - return null; - } - } + var addenda = { + parentOrOwner: addendum, + url: ' See https://fb.me/react-warning-keys for more information.', + childOwner: null + }; - var locationName = ReactPropTypeLocationNames[location]; - var valuesString = JSON.stringify(expectedValues); - return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); + // 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. + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + // Give the component that originally created this child. + addenda.childOwner = ' It was passed a child from ' + element._owner.getName() + '.'; } - return createChainableTypeChecker(validate); + + return addenda; } - function createObjectOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); + /** + * Ensure that every element either is passed in a static location, in an + * array with an explicit keys property defined, or in an object literal + * with valid key property. + * + * @internal + * @param {ReactNode} node Statically passed child of any type. + * @param {*} parentType node's parent's type. + */ + function validateChildKeys(node, parentType) { + if (typeof node !== 'object') { + return; + } + if (Array.isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + if (ReactElement.isValidElement(child)) { + validateExplicitKey(child, parentType); + } } - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== 'object') { - var locationName = ReactPropTypeLocationNames[location]; - return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); + } else if (ReactElement.isValidElement(node)) { + // This element was passed in a valid location. + if (node._store) { + node._store.validated = true; } - for (var key in propValue) { - if (propValue.hasOwnProperty(key)) { - var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); - if (error instanceof Error) { - return error; + } else if (node) { + var iteratorFn = getIteratorFn(node); + // Entry iterators provide implicit keys. + if (iteratorFn) { + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + while (!(step = iterator.next()).done) { + if (ReactElement.isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } } } } - return null; } - return createChainableTypeChecker(validate); } - function createUnionTypeChecker(arrayOfTypeCheckers) { - if (!Array.isArray(arrayOfTypeCheckers)) { - process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; - return emptyFunction.thatReturnsNull; - } + /** + * Assert that the props are valid + * + * @param {string} componentName Name of the component for error messages. + * @param {object} propTypes Map of prop name to a ReactPropType + * @param {object} props + * @param {string} location e.g. "prop", "context", "child context" + * @private + */ + function checkPropTypes(componentName, propTypes, props, location) { + for (var propName in propTypes) { + if (propTypes.hasOwnProperty(propName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + !(typeof propTypes[propName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], propName) : invariant(false) : void 0; + error = propTypes[propName](props, propName, componentName, location); + } catch (ex) { + error = ex; + } + process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], propName, typeof error) : void 0; + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; - function validate(props, propName, componentName, location, propFullName) { - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { - var checker = arrayOfTypeCheckers[i]; - if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { - return null; + var addendum = getDeclarationErrorAddendum(); + process.env.NODE_ENV !== 'production' ? warning(false, 'Failed propType: %s%s', error.message, addendum) : void 0; } } - - var locationName = ReactPropTypeLocationNames[location]; - return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); } - return createChainableTypeChecker(validate); } - function createNodeChecker() { - function validate(props, propName, componentName, location, propFullName) { - if (!isNode(props[propName])) { - var locationName = ReactPropTypeLocationNames[location]; - return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); - } - return null; + /** + * Given an element, validate that its props follow the propTypes definition, + * provided by the type. + * + * @param {ReactElement} element + */ + function validatePropTypes(element) { + var componentClass = element.type; + if (typeof componentClass !== 'function') { + return; + } + var name = componentClass.displayName || componentClass.name; + if (componentClass.propTypes) { + checkPropTypes(name, componentClass.propTypes, element.props, ReactPropTypeLocations.prop); + } + if (typeof componentClass.getDefaultProps === 'function') { + process.env.NODE_ENV !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0; } - return createChainableTypeChecker(validate); } - function createShapeTypeChecker(shapeTypes) { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== 'object') { - var locationName = ReactPropTypeLocationNames[location]; - return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); + var ReactElementValidator = { + + createElement: function (type, props, children) { + var validType = typeof type === 'string' || typeof type === 'function'; + // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + process.env.NODE_ENV !== 'production' ? warning(validType, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : void 0; + + var element = ReactElement.createElement.apply(this, arguments); + + // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + if (element == null) { + return element; } - for (var key in shapeTypes) { - var checker = shapeTypes[key]; - if (!checker) { - continue; - } - var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); - if (error) { - return error; + + // Skip key warning if the type isn't valid since our key validation logic + // doesn't expect a non-string/function type and can throw confusing errors. + // We don't want exception behavior to differ between dev and prod. + // (Rendering will throw with a helpful message and as soon as the type is + // fixed, the key warnings will appear.) + if (validType) { + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); } } - return null; - } - return createChainableTypeChecker(validate); - } - function isNode(propValue) { - switch (typeof propValue) { - case 'number': - case 'string': - case 'undefined': - return true; - case 'boolean': - return !propValue; - case 'object': - if (Array.isArray(propValue)) { - return propValue.every(isNode); - } - if (propValue === null || ReactElement.isValidElement(propValue)) { - return true; - } + validatePropTypes(element); - var iteratorFn = getIteratorFn(propValue); - if (iteratorFn) { - var iterator = iteratorFn.call(propValue); - var step; - if (iteratorFn !== propValue.entries) { - while (!(step = iterator.next()).done) { - if (!isNode(step.value)) { - return false; - } - } - } else { - // Iterator will provide entry [k,v] tuples rather than values. - while (!(step = iterator.next()).done) { - var entry = step.value; - if (entry) { - if (!isNode(entry[1])) { - return false; - } - } + return element; + }, + + createFactory: function (type) { + var validatedFactory = ReactElementValidator.createElement.bind(null, type); + // Legacy hook TODO: Warn if this is accessed + validatedFactory.type = type; + + if (process.env.NODE_ENV !== 'production') { + if (canDefineProperty) { + Object.defineProperty(validatedFactory, 'type', { + enumerable: false, + get: function () { + process.env.NODE_ENV !== 'production' ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : void 0; + Object.defineProperty(this, 'type', { + value: type + }); + return type; } - } - } else { - return false; + }); } + } - return true; - default: - return false; - } - } - - function isSymbol(propType, propValue) { - // Native Symbol. - if (propType === 'symbol') { - return true; - } + return validatedFactory; + }, - // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' - if (propValue['@@toStringTag'] === 'Symbol') { - return true; + 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); + } + validatePropTypes(newElement); + return newElement; } - // Fallback for non-spec compliant Symbols which are polyfilled. - if (typeof Symbol === 'function' && propValue instanceof Symbol) { - return true; - } + }; - return false; - } + module.exports = ReactElementValidator; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) - // Equivalent of `typeof` but with special handling for array and regexp. - function getPropType(propValue) { - var propType = typeof propValue; - if (Array.isArray(propValue)) { - return 'array'; - } - if (propValue instanceof RegExp) { - // Old webkits (at least until Android 4.0) return 'function' rather than - // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ - // passes PropTypes.object. - return 'object'; - } - if (isSymbol(propType, propValue)) { - return 'symbol'; - } - return propType; - } - - // This handles more types than `getPropType`. Only used for error messages. - // See `createPrimitiveTypeChecker`. - function getPreciseType(propValue) { - var propType = getPropType(propValue); - if (propType === 'object') { - if (propValue instanceof Date) { - return 'date'; - } else if (propValue instanceof RegExp) { - return 'regexp'; - } - } - return propType; - } - - // Returns class name of the object, if any. - function getClassName(propValue) { - if (!propValue.constructor || !propValue.constructor.name) { - return ANONYMOUS; - } - return propValue.constructor.name; - } - - module.exports = ReactPropTypes; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) - -/***/ }, -/* 49 */ -/***/ function(module, exports) { +/***/ }, +/* 53 */ +/***/ function(module, exports) { /** - * Copyright 2013-present, Facebook, Inc. + * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -4207,13 +3973,50 @@ 'use strict'; - module.exports = '15.4.0'; + var hasOwnProperty = Object.prototype.hasOwnProperty; + + /** + * Executes the provided `callback` once for each enumerable own property in the + * object and constructs a new object from the results. The `callback` is + * invoked with three arguments: + * + * - the property value + * - the property name + * - the object being traversed + * + * Properties that are added after the call to `mapObject` will not be visited + * by `callback`. If the values of existing properties are changed, the value + * passed to `callback` will be the value at the time `mapObject` visits them. + * Properties that are deleted before being visited are not visited. + * + * @grep function objectMap() + * @grep function objMap() + * + * @param {?object} object + * @param {function} callback + * @param {*} context + * @return {?object} + */ + function mapObject(object, callback, context) { + if (!object) { + return null; + } + var result = {}; + for (var name in object) { + if (hasOwnProperty.call(object, name)) { + result[name] = callback.call(context, object[name], name, object); + } + } + return result; + } + + module.exports = mapObject; /***/ }, -/* 50 */ +/* 54 */ /***/ function(module, exports, __webpack_require__) { - /* WEBPACK VAR INJECTION */(function(process) {/** + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -4221,1532 +4024,1148 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule ReactPropTypes */ - 'use strict'; - var _prodInvariant = __webpack_require__(26); + 'use strict'; - var ReactElement = __webpack_require__(28); + var ReactElement = __webpack_require__(27); + var ReactPropTypeLocationNames = __webpack_require__(49); - var invariant = __webpack_require__(27); + var emptyFunction = __webpack_require__(30); + var getIteratorFn = __webpack_require__(33); /** - * Returns the first child in a collection of children and verifies that there - * is only one child in the collection. + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: * - * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, * - * The current implementation of this function assumes that a single child gets - * passed without a wrapper, but the purpose of this helper function is to - * abstract away the particular structure of children. + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, * - * @param {?object} children Child collection structure. - * @return {ReactElement} The first and only `ReactElement` contained in the - * structure. + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal */ - function onlyChild(children) { - !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0; - return children; - } - module.exports = onlyChild; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + var ANONYMOUS = '<>'; -/***/ }, -/* 51 */ -/***/ function(module, exports) { + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), - /* - * Copyright 2016 Palantir Technologies, Inc. All rights reserved. - * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy - * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE - * and https://github.com/palantir/blueprint/blob/master/PATENTS - */ - "use strict"; - exports.Colors = { - BLACK: "#10161A", - BLUE1: "#0E5A8A", - BLUE2: "#106BA3", - BLUE3: "#137CBD", - BLUE4: "#2B95D6", - BLUE5: "#48AFF0", - COBALT1: "#1F4B99", - COBALT2: "#2458B3", - COBALT3: "#2965CC", - COBALT4: "#4580E6", - COBALT5: "#669EFF", - DARK_GRAY1: "#182026", - DARK_GRAY2: "#202B33", - DARK_GRAY3: "#293742", - DARK_GRAY4: "#30404D", - DARK_GRAY5: "#394B59", - FOREST1: "#1D7324", - FOREST2: "#238C2C", - FOREST3: "#29A634", - FOREST4: "#43BF4D", - FOREST5: "#62D96B", - GOLD1: "#A67908", - GOLD2: "#BF8C0A", - GOLD3: "#D99E0B", - GOLD4: "#F2B824", - GOLD5: "#FFC940", - GRAY1: "#5C7080", - GRAY2: "#738694", - GRAY3: "#8A9BA8", - GRAY4: "#A7B6C2", - GRAY5: "#BFCCD6", - GREEN1: "#0A6640", - GREEN2: "#0D8050", - GREEN3: "#0F9960", - GREEN4: "#15B371", - GREEN5: "#3DCC91", - INDIGO1: "#5642A6", - INDIGO2: "#634DBF", - INDIGO3: "#7157D9", - INDIGO4: "#9179F2", - INDIGO5: "#AD99FF", - LIGHT_GRAY1: "#CED9E0", - LIGHT_GRAY2: "#D8E1E8", - LIGHT_GRAY3: "#E1E8ED", - LIGHT_GRAY4: "#EBF1F5", - LIGHT_GRAY5: "#F5F8FA", - LIME1: "#728C23", - LIME2: "#87A629", - LIME3: "#9BBF30", - LIME4: "#B6D94C", - LIME5: "#D1F26D", - ORANGE1: "#A66321", - ORANGE2: "#BF7326", - ORANGE3: "#D9822B", - ORANGE4: "#F29D49", - ORANGE5: "#FFB366", - RED1: "#A82A2A", - RED2: "#C23030", - RED3: "#DB3737", - RED4: "#F55656", - RED5: "#FF7373", - ROSE1: "#A82255", - ROSE2: "#C22762", - ROSE3: "#DB2C6F", - ROSE4: "#F5498B", - ROSE5: "#FF66A1", - SEPIA1: "#63411E", - SEPIA2: "#7D5125", - SEPIA3: "#96622D", - SEPIA4: "#B07B46", - SEPIA5: "#C99765", - TURQUOISE1: "#008075", - TURQUOISE2: "#00998C", - TURQUOISE3: "#00B3A4", - TURQUOISE4: "#14CCBD", - TURQUOISE5: "#2EE6D6", - VERMILION1: "#9E2B0E", - VERMILION2: "#B83211", - VERMILION3: "#D13913", - VERMILION4: "#EB532D", - VERMILION5: "#FF6E4A", - VIOLET1: "#5C255C", - VIOLET2: "#752F75", - VIOLET3: "#8F398F", - VIOLET4: "#A854A8", - VIOLET5: "#C274C2", - WHITE: "#FFFFFF", + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker }; - //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24vY29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FFXCIsXG4gICAgU0VQSUEyOiBcIiM3RDUxMjVcIixcbiAgICBTRVBJQTM6IFwiIzk2NjIyRFwiLFxuICAgIFNFUElBNDogXCIjQjA3QjQ2XCIsXG4gICAgU0VQSUE1OiBcIiNDOTk3NjVcIixcblxuICAgIFRVUlFVT0lTRTE6IFwiIzAwODA3NVwiLFxuICAgIFRVUlFVT0lTRTI6IFwiIzAwOTk4Q1wiLFxuICAgIFRVUlFVT0lTRTM6IFwiIzAwQjNBNFwiLFxuICAgIFRVUlFVT0lTRTQ6IFwiIzE0Q0NCRFwiLFxuICAgIFRVUlFVT0lTRTU6IFwiIzJFRTZENlwiLFxuXG4gICAgVkVSTUlMSU9OMTogXCIjOUUyQjBFXCIsXG4gICAgVkVSTUlMSU9OMjogXCIjQjgzMjExXCIsXG4gICAgVkVSTUlMSU9OMzogXCIjRDEzOTEzXCIsXG4gICAgVkVSTUlMSU9ONDogXCIjRUI1MzJEXCIsXG4gICAgVkVSTUlMSU9ONTogXCIjRkY2RTRBXCIsXG5cbiAgICBWSU9MRVQxOiBcIiM1QzI1NUNcIixcbiAgICBWSU9MRVQyOiBcIiM3NTJGNzVcIixcbiAgICBWSU9MRVQzOiBcIiM4RjM5OEZcIixcbiAgICBWSU9MRVQ0OiBcIiNBODU0QThcIixcbiAgICBWSU9MRVQ1OiBcIiNDMjc0QzJcIixcblxuICAgIFdISVRFOiBcIiNGRkZGRkZcIixcbn07XG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= - - -/***/ }, -/* 52 */ -/***/ function(module, exports) { - - /* - * Copyright 2015 Palantir Technologies, Inc. All rights reserved. - * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy - * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE - * and https://github.com/palantir/blueprint/blob/master/PATENTS - */ - "use strict"; /** - * The four basic intents. + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is */ - (function (Intent) { - Intent[Intent["NONE"] = -1] = "NONE"; - Intent[Intent["PRIMARY"] = 0] = "PRIMARY"; - Intent[Intent["SUCCESS"] = 1] = "SUCCESS"; - Intent[Intent["WARNING"] = 2] = "WARNING"; - Intent[Intent["DANGER"] = 3] = "DANGER"; - })(exports.Intent || (exports.Intent = {})); - var Intent = exports.Intent; - - //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24vaW50ZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7OztHQUtHOztBQUVIOztHQUVHO0FBQ0gsV0FBWSxNQUFNO0lBQ2Qsb0NBQVMsQ0FBQTtJQUNULHlDQUFPLENBQUE7SUFDUCx5Q0FBTyxDQUFBO0lBQ1AseUNBQU8sQ0FBQTtJQUNQLHVDQUFNLENBQUE7QUFDVixDQUFDLEVBTlcsY0FBTSxLQUFOLGNBQU0sUUFNakI7QUFORCxJQUFZLE1BQU0sR0FBTixjQU1YLENBQUEiLCJmaWxlIjoiY29tbW9uL2ludGVudC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBDb3B5cmlnaHQgMjAxNSBQYWxhbnRpciBUZWNobm9sb2dpZXMsIEluYy4gQWxsIHJpZ2h0cyByZXNlcnZlZC5cbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBCU0QtMyBMaWNlbnNlIGFzIG1vZGlmaWVkICh0aGUg4oCcTGljZW5zZeKAnSk7IHlvdSBtYXkgb2J0YWluIGEgY29weVxuICogb2YgdGhlIGxpY2Vuc2UgYXQgaHR0cHM6Ly9naXRodWIuY29tL3BhbGFudGlyL2JsdWVwcmludC9ibG9iL21hc3Rlci9MSUNFTlNFXG4gKiBhbmQgaHR0cHM6Ly9naXRodWIuY29tL3BhbGFudGlyL2JsdWVwcmludC9ibG9iL21hc3Rlci9QQVRFTlRTXG4gKi9cblxuLyoqXG4gKiBUaGUgZm91ciBiYXNpYyBpbnRlbnRzLlxuICovXG5leHBvcnQgZW51bSBJbnRlbnQge1xuICAgIE5PTkUgPSAtMSxcbiAgICBQUklNQVJZLFxuICAgIFNVQ0NFU1MsXG4gICAgV0FSTklORyxcbiAgICBEQU5HRVIsXG59XG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= - - -/***/ }, -/* 53 */ -/***/ function(module, exports) { - - /* - * Copyright 2015 Palantir Technologies, Inc. All rights reserved. - * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy - * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE - * and https://github.com/palantir/blueprint/blob/master/PATENTS - */ - "use strict"; - (function (Position) { - Position[Position["TOP_LEFT"] = 0] = "TOP_LEFT"; - Position[Position["TOP"] = 1] = "TOP"; - Position[Position["TOP_RIGHT"] = 2] = "TOP_RIGHT"; - Position[Position["RIGHT_TOP"] = 3] = "RIGHT_TOP"; - Position[Position["RIGHT"] = 4] = "RIGHT"; - Position[Position["RIGHT_BOTTOM"] = 5] = "RIGHT_BOTTOM"; - Position[Position["BOTTOM_RIGHT"] = 6] = "BOTTOM_RIGHT"; - Position[Position["BOTTOM"] = 7] = "BOTTOM"; - Position[Position["BOTTOM_LEFT"] = 8] = "BOTTOM_LEFT"; - Position[Position["LEFT_BOTTOM"] = 9] = "LEFT_BOTTOM"; - Position[Position["LEFT"] = 10] = "LEFT"; - Position[Position["LEFT_TOP"] = 11] = "LEFT_TOP"; - })(exports.Position || (exports.Position = {})); - var Position = exports.Position; - function isPositionHorizontal(position) { - /* istanbul ignore next */ - return position === Position.TOP || position === Position.TOP_LEFT || position === Position.TOP_RIGHT - || position === Position.BOTTOM || position === Position.BOTTOM_LEFT || position === Position.BOTTOM_RIGHT; - } - exports.isPositionHorizontal = isPositionHorizontal; - function isPositionVertical(position) { - /* istanbul ignore next */ - return position === Position.LEFT || position === Position.LEFT_TOP || position === Position.LEFT_BOTTOM - || position === Position.RIGHT || position === Position.RIGHT_TOP || position === Position.RIGHT_BOTTOM; + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } } - exports.isPositionVertical = isPositionVertical; - - //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24vcG9zaXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7O0dBS0c7O0FBRUgsV0FBWSxRQUFRO0lBQ2hCLCtDQUFRLENBQUE7SUFDUixxQ0FBRyxDQUFBO0lBQ0gsaURBQVMsQ0FBQTtJQUNULGlEQUFTLENBQUE7SUFDVCx5Q0FBSyxDQUFBO0lBQ0wsdURBQVksQ0FBQTtJQUNaLHVEQUFZLENBQUE7SUFDWiwyQ0FBTSxDQUFBO0lBQ04scURBQVcsQ0FBQTtJQUNYLHFEQUFXLENBQUE7SUFDWCx3Q0FBSSxDQUFBO0lBQ0osZ0RBQVEsQ0FBQTtBQUNaLENBQUMsRUFiVyxnQkFBUSxLQUFSLGdCQUFRLFFBYW5CO0FBYkQsSUFBWSxRQUFRLEdBQVIsZ0JBYVgsQ0FBQTtBQUVELDhCQUFxQyxRQUFrQjtJQUNuRCwwQkFBMEI7SUFDMUIsTUFBTSxDQUFDLFFBQVEsS0FBSyxRQUFRLENBQUMsR0FBRyxJQUFJLFFBQVEsS0FBSyxRQUFRLENBQUMsUUFBUSxJQUFJLFFBQVEsS0FBSyxRQUFRLENBQUMsU0FBUztXQUM5RixRQUFRLEtBQUssUUFBUSxDQUFDLE1BQU0sSUFBSSxRQUFRLEtBQUssUUFBUSxDQUFDLFdBQVcsSUFBSSxRQUFRLEtBQUssUUFBUSxDQUFDLFlBQVksQ0FBQztBQUNuSCxDQUFDO0FBSmUsNEJBQW9CLHVCQUluQyxDQUFBO0FBR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G4gICAgTEVGVCxcbiAgICBMRUZUX1RPUCxcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGlzUG9zaXRpb25Ib3Jpem9udGFsKHBvc2l0aW9uOiBQb3NpdGlvbikge1xuICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgcmV0dXJuIHBvc2l0aW9uID09PSBQb3NpdGlvbi5UT1AgfHwgcG9zaXRpb24gPT09IFBvc2l0aW9uLlRPUF9MRUZUIHx8IHBvc2l0aW9uID09PSBQb3NpdGlvbi5UT1BfUklHSFRcbiAgICAgICAgfHwgcG9zaXRpb24gPT09IFBvc2l0aW9uLkJPVFRPTSB8fCBwb3NpdGlvbiA9PT0gUG9zaXRpb24uQk9UVE9NX0xFRlQgfHwgcG9zaXRpb24gPT09IFBvc2l0aW9uLkJPVFRPTV9SSUdIVDtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGlzUG9zaXRpb25WZXJ0aWNhbChwb3NpdGlvbjogUG9zaXRpb24pIHtcbiAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuICAgIHJldHVybiBwb3NpdGlvbiA9PT0gUG9zaXRpb24uTEVGVCB8fCBwb3NpdGlvbiA9PT0gUG9zaXRpb24uTEVGVF9UT1AgfHwgcG9zaXRpb24gPT09IFBvc2l0aW9uLkxFRlRfQk9UVE9NXG4gICAgICAgIHx8IHBvc2l0aW9uID09PSBQb3NpdGlvbi5SSUdIVCB8fCBwb3NpdGlvbiA9PT0gUG9zaXRpb24uUklHSFRfVE9QIHx8IHBvc2l0aW9uID09PSBQb3NpdGlvbi5SSUdIVF9CT1RUT007XG59XG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= + /*eslint-enable no-self-compare*/ + function createChainableTypeChecker(validate) { + function checkType(isRequired, props, propName, componentName, location, propFullName) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + if (props[propName] == null) { + var locationName = ReactPropTypeLocationNames[location]; + if (isRequired) { + return new Error('Required ' + locationName + ' `' + propFullName + '` was not specified in ' + ('`' + componentName + '`.')); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } -/***/ }, -/* 54 */ -/***/ function(module, exports, __webpack_require__) { + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); - /* - * Copyright 2015 Palantir Technologies, Inc. All rights reserved. - * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy - * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE - * and https://github.com/palantir/blueprint/blob/master/PATENTS - */ - "use strict"; - var utils_1 = __webpack_require__(55); - /** A collection of curated prop keys used across our Components which are not valid HTMLElement props. */ - var INVALID_PROPS = [ - "containerRef", - "defaultIndeterminate", - "elementRef", - "iconName", - "inputRef", - "intent", - "leftIconName", - "onChildrenMount", - "onRemove", - "rightElement", - "rightIconName", - "text", - ]; - /** - * Typically applied to HTMLElements to filter out blacklisted props. When applied to a Component, - * can filter props from being passed down to the children. Can also filter by a combined list of - * supplied prop keys and the blacklist (only appropriate for HTMLElements). - * @param props The original props object to filter down. - * @param {string[]} invalidProps If supplied, overwrites the default blacklist. - * @param {boolean} shouldMerge If true, will merge supplied invalidProps and blacklist together. - */ - function removeNonHTMLProps(props, invalidProps, shouldMerge) { - if (invalidProps === void 0) { invalidProps = INVALID_PROPS; } - if (shouldMerge === void 0) { shouldMerge = false; } - if (shouldMerge) { - invalidProps = invalidProps.concat(INVALID_PROPS); - } - return invalidProps.reduce(function (prev, curr) { - if (prev.hasOwnProperty(curr)) { - delete prev[curr]; - } - return prev; - }, utils_1.shallowClone(props)); + return chainedCheckType; } - exports.removeNonHTMLProps = removeNonHTMLProps; - - //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24vcHJvcHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7O0dBS0c7O0FBS0gsc0JBQTZCLFNBQ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IElmIHRydWUsIHdpbGwgbWVyZ2Ugc3VwcGxpZWQgaW52YWxpZFByb3BzIGFuZCBibGFja2xpc3QgdG9nZXRoZXIuXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiByZW1vdmVOb25IVE1MUHJvcHM8VCBleHRlbmRzIFUsIFU+KHByb3BzOiBULCBpbnZhbGlkUHJvcHMgPSBJTlZBTElEX1BST1BTLCBzaG91bGRNZXJnZSA9IGZhbHNlKTogVSB7XG4gICAgaWYgKHNob3VsZE1lcmdlKSB7XG4gICAgICAgIGludmFsaWRQcm9wcyA9IGludmFsaWRQcm9wcy5jb25jYXQoSU5WQUxJRF9QUk9QUyk7XG4gICAgfVxuXG4gICAgcmV0dXJuIGludmFsaWRQcm9wcy5yZWR1Y2UoKHByZXYsIGN1cnIpID0+IHtcbiAgICAgICAgaWYgKHByZXYuaGFzT3duUHJvcGVydHkoY3VycikpIHtcbiAgICAgICAgICAgIGRlbGV0ZSAocHJldiBhcyBhbnkpW2N1cnJdO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBwcmV2O1xuICAgIH0sIHNoYWxsb3dDbG9uZShwcm9wcykpO1xufVxuIl0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9 + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + var locationName = ReactPropTypeLocationNames[location]; + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); -/***/ }, -/* 55 */ -/***/ function(module, exports) { + return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); + } - /* - * Copyright 2015 Palantir Technologies, Inc. All rights reserved. - * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy - * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE - * and https://github.com/palantir/blueprint/blob/master/PATENTS - */ - "use strict"; - /** Returns whether the value is a function. Acts as a type guard. */ - function isFunction(value) { - return typeof value === "function"; + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction.thatReturns(null)); } - exports.isFunction = isFunction; - function safeInvoke(func) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new Error('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); } - if (isFunction(func)) { - return func.apply(void 0, args); + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var locationName = ReactPropTypeLocationNames[location]; + var propType = getPropType(propValue); + return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); } - } - exports.safeInvoke = safeInvoke; - function elementIsOrContains(element, testElement) { - return element === testElement || element.contains(testElement); - } - exports.elementIsOrContains = elementIsOrContains; - /** - * Returns the difference in length between two arrays. A `null` argument is considered an empty list. - * The return value will be positive if `a` is longer than `b`, negative if the opposite is true, - * and zero if their lengths are equal. - */ - function arrayLengthCompare(a, b) { - if (a === void 0) { a = []; } - if (b === void 0) { b = []; } - return a.length - b.length; - } - exports.arrayLengthCompare = arrayLengthCompare; - /** - * Returns true if the two numbers are within the given tolerance of each other. - * This is useful to correct for floating point precision issues, less useful for integers. - */ - function approxEqual(a, b, tolerance) { - if (tolerance === void 0) { tolerance = 0.00001; } - return Math.abs(a - b) <= tolerance; - } - exports.approxEqual = approxEqual; - /* Clamps the given number between min and max values. Returns value if within range, or closest bound. */ - function clamp(val, min, max) { - if (max < min) { - throw new Error("clamp: max cannot be less than min"); + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']'); + if (error instanceof Error) { + return error; + } } - return Math.min(Math.max(val, min), max); + return null; + } + return createChainableTypeChecker(validate); } - exports.clamp = clamp; - /** Return a new object with the same keys as the given object (values are copied, not cloned). */ - function shallowClone(object) { - var clonedObject = {}; - for (var key in object) { - if (object.hasOwnProperty(key)) { - clonedObject[key] = object[key]; - } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!ReactElement.isValidElement(props[propName])) { + var locationName = ReactPropTypeLocationNames[location]; + return new Error('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a single ReactElement.')); } - return clonedObject; + return null; + } + return createChainableTypeChecker(validate); } - exports.shallowClone = shallowClone; - /** - * Throttle an event on an EventTarget by wrapping it in `requestAnimationFrame` call. - * Returns the event handler that was bound to given eventName so you can clean up after yourself. - * @see https://developer.mozilla.org/en-US/docs/Web/Events/scroll - */ - function throttleEvent(target, eventName, newEventName) { - var running = false; - /* istanbul ignore next: borrowed directly from MDN */ - var func = function (event) { - if (running) { - return; - } - running = true; - requestAnimationFrame(function () { - target.dispatchEvent(new CustomEvent(newEventName, event)); - running = false; - }); - }; - target.addEventListener(eventName, func); - return func; + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var locationName = ReactPropTypeLocationNames[location]; + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); } - exports.throttleEvent = throttleEvent; - ; - //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24vdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7O0dBS0c7O0FBRUgscUVBQXFFO0FBQ3JFLG9CQUEyQixLQUFVO0lB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W5jdGlvbiB0aHJvdHRsZUV2ZW50KHRhcmdldDogRXZlbnRUYXJnZXQsIGV2ZW50TmFtZTogc3RyaW5nLCBuZXdFdmVudE5hbWU6IHN0cmluZykge1xuICAgIGxldCBydW5uaW5nID0gZmFsc2U7XG4gICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQ6IGJvcnJvd2VkIGRpcmVjdGx5IGZyb20gTUROICovXG4gICAgbGV0IGZ1bmMgPSAoZXZlbnQ6IEV2ZW50KSA9PiB7XG4gICAgICAgIGlmIChydW5uaW5nKSB7IHJldHVybjsgfVxuICAgICAgICBydW5uaW5nID0gdHJ1ZTtcbiAgICAgICAgcmVxdWVzdEFuaW1hdGlvbkZyYW1lKCgpID0+IHtcbiAgICAgICAgICAgIHRhcmdldC5kaXNwYXRjaEV2ZW50KG5ldyBDdXN0b21FdmVudChuZXdFdmVudE5hbWUsIGV2ZW50KSk7XG4gICAgICAgICAgICBydW5uaW5nID0gZmFsc2U7XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgdGFyZ2V0LmFkZEV2ZW50TGlzdGVuZXIoZXZlbnROYW1lLCBmdW5jKTtcbiAgICByZXR1cm4gZnVuYztcbn07XG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + return createChainableTypeChecker(function () { + return new Error('Invalid argument supplied to oneOf, expected an instance of array.'); + }); + } + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } -/***/ }, -/* 56 */ -/***/ function(module, exports, __webpack_require__) { + var locationName = ReactPropTypeLocationNames[location]; + var valuesString = JSON.stringify(expectedValues); + return new Error('Invalid ' + locationName + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); + } + return createChainableTypeChecker(validate); + } - /* - * Copyright 2015 Palantir Technologies, Inc. All rights reserved. - * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy - * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE - * and https://github.com/palantir/blueprint/blob/master/PATENTS - */ - "use strict"; - var position_1 = __webpack_require__(53); - var DEFAULT_CONSTRAINTS = { - attachment: "together", - to: "scrollParent", - }; - /** @internal */ - function createTetherOptions(element, target, position, useSmartPositioning, constraints) { - if (constraints == null && useSmartPositioning) { - constraints = [DEFAULT_CONSTRAINTS]; + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new Error('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); } - var options = { - attachment: getPopoverAttachment(position), - classPrefix: "pt-tether", - constraints: constraints, - element: element, - target: target, - targetAttachment: getTargetAttachment(position), - }; - return options; + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + var locationName = ReactPropTypeLocationNames[location]; + return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); + } + for (var key in propValue) { + if (propValue.hasOwnProperty(key)) { + var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); } - exports.createTetherOptions = createTetherOptions; - /** @internal */ - function getTargetAttachment(position) { - var attachments = (_a = {}, - _a[position_1.Position.TOP_LEFT] = "top left", - _a[position_1.Position.TOP] = "top center", - _a[position_1.Position.TOP_RIGHT] = "top right", - _a[position_1.Position.RIGHT_TOP] = "top right", - _a[position_1.Position.RIGHT] = "middle right", - _a[position_1.Position.RIGHT_BOTTOM] = "bottom right", - _a[position_1.Position.BOTTOM_RIGHT] = "bottom right", - _a[position_1.Position.BOTTOM] = "bottom center", - _a[position_1.Position.BOTTOM_LEFT] = "bottom left", - _a[position_1.Position.LEFT_BOTTOM] = "bottom left", - _a[position_1.Position.LEFT] = "middle left", - _a[position_1.Position.LEFT_TOP] = "top left", - _a - ); - return attachments[position]; - var _a; + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + return createChainableTypeChecker(function () { + return new Error('Invalid argument supplied to oneOfType, expected an instance of array.'); + }); + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (checker(props, propName, componentName, location, propFullName) == null) { + return null; + } + } + + var locationName = ReactPropTypeLocationNames[location]; + return new Error('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); + } + return createChainableTypeChecker(validate); } - exports.getTargetAttachment = getTargetAttachment; - /** @internal */ - function getPopoverAttachment(position) { - var attachments = (_a = {}, - _a[position_1.Position.TOP_LEFT] = "bottom left", - _a[position_1.Position.TOP] = "bottom center", - _a[position_1.Position.TOP_RIGHT] = "bottom right", - _a[position_1.Position.RIGHT_TOP] = "top left", - _a[position_1.Position.RIGHT] = "middle left", - _a[position_1.Position.RIGHT_BOTTOM] = "bottom left", - _a[position_1.Position.BOTTOM_RIGHT] = "top right", - _a[position_1.Position.BOTTOM] = "top center", - _a[position_1.Position.BOTTOM_LEFT] = "top left", - _a[position_1.Position.LEFT_BOTTOM] = "bottom right", - _a[position_1.Position.LEFT] = "middle right", - _a[position_1.Position.LEFT_TOP] = "top right", - _a - ); - return attachments[position]; - var _a; + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + var locationName = ReactPropTypeLocationNames[location]; + return new Error('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); + } + return null; + } + return createChainableTypeChecker(validate); } - exports.getPopoverAttachment = getPopoverAttachment; - /** @internal */ - function getAttachmentClasses(position) { - // this essentially reimplements the Tether logic for attachment classes so the same styles - // can be reused outside of Tether-based popovers. - return expandAttachmentClasses(getPopoverAttachment(position), "pt-tether-element-attached").concat(expandAttachmentClasses(getTargetAttachment(position), "pt-tether-target-attached")); + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + var locationName = ReactPropTypeLocationNames[location]; + return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker(propValue, key, componentName, location, propFullName + '.' + key); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); } - exports.getAttachmentClasses = getAttachmentClasses; - function expandAttachmentClasses(attachments, prefix) { - var _a = attachments.split(" "), verticalAlign = _a[0], horizontalAlign = _a[1]; - return [(prefix + "-" + verticalAlign), (prefix + "-" + horizontalAlign)]; + + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || ReactElement.isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } } - //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24vdGV0aGVyVXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7O0dBS0c7O0FBSUgseUJBQXlCLFlBQVksQ0FBQyxDQUFBO0FBRXRDLElBQU0sbUJBQW1CLEdBQUc7SUFDeEIsVUF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24uUklHSFRfQk9UVE9NXTogXCJib3R0b20gcmlnaHRcIixcbiAgICAgICAgW1Bvc2l0aW9uLkJPVFRPTV9SSUdIVF06IFwiYm90dG9tIHJpZ2h0XCIsXG4gICAgICAgIFtQb3NpdGlvbi5CT1RUT01dOiAgICAgICBcImJvdHRvbSBjZW50ZXJcIixcbiAgICAgICAgW1Bvc2l0aW9uLkJPVFRPTV9MRUZUXTogIFwiYm90dG9tIGxlZnRcIixcbiAgICAgICAgW1Bvc2l0aW9uLkxFRlRfQk9UVE9NXTogIFwiYm90dG9tIGxlZnRcIixcbiAgICAgICAgW1Bvc2l0aW9uLkxFRlRdOiAgICAgICAgIFwibWlkZGxlIGxlZnRcIixcbiAgICAgICAgW1Bvc2l0aW9uLkxFRlRfVE9QXTogICAgIFwidG9wIGxlZnRcIixcbiAgICB9O1xuICAgIHJldHVybiBhdHRhY2htZW50c1twb3NpdGlvbl07XG59XG5cbi8qKiBAaW50ZXJuYWwgKi9cbmV4cG9ydCBmdW5jdGlvbiBnZXRQb3BvdmVyQXR0YWNobWVudChwb3NpdGlvbjogUG9zaXRpb24pIHtcbiAgICBjb25zdCBhdHRhY2htZW50czoge1twOiBudW1iZXJdOiBzdHJpbmd9ID0ge1xuICAgICAgICBbUG9zaXRpb24uVE9QX0xFRlRdOiAgICAgXCJib3R0b20gbGVmdFwiLFxuICAgICAgICBbUG9zaXRpb24uVE9QXTogICAgICAgICAgXCJib3R0b20gY2VudGVyXCIsXG4gICAgICAgIFtQb3NpdGlvbi5UT1BfUklHSFRdOiAgICBcImJvdHRvbSByaWdodFwiLFxuICAgICAgICBbUG9zaXRpb24uUklHSFRfVE9QXTogICAgXCJ0b3AgbGVmdFwiLFxuICAgICAgICBbUG9zaXRpb24uUklHSFRdOiAgICAgICAgXCJtaWRkbGUgbGVmdFwiLFxuICAgICAgICBbUG9zaXRpb24uUklHSFRfQk9UVE9NXTogXCJib3R0b20gbGVmdFwiLFxuICAgICAgICBbUG9zaXRpb24uQk9UVE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NlcyhhdHRhY2htZW50czogc3RyaW5nLCBwcmVmaXg6IHN0cmluZykge1xuICAgIGNvbnN0IFt2ZXJ0aWNhbEFsaWduLCBob3Jpem9udGFsQWxpZ25dID0gYXR0YWNobWVudHMuc3BsaXQoXCIgXCIpO1xuICAgIHJldHVybiBbYCR7cHJlZml4fS0ke3ZlcnRpY2FsQWxpZ259YCwgYCR7cHJlZml4fS0ke2hvcml6b250YWxBbGlnbn1gXTtcbn1cbiJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ== + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + return propType; + } + + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } + module.exports = ReactPropTypes; /***/ }, -/* 57 */ -/***/ function(module, exports, __webpack_require__) { +/* 55 */ +/***/ function(module, exports) { - /* - * Copyright 2015 Palantir Technologies, Inc. All rights reserved. - * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy - * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE - * and https://github.com/palantir/blueprint/blob/master/PATENTS + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactVersion */ - "use strict"; - var intent_1 = __webpack_require__(52); - // modifiers - exports.DARK = "pt-dark"; - exports.ACTIVE = "pt-active"; - exports.MINIMAL = "pt-minimal"; - exports.DISABLED = "pt-disabled"; - exports.SMALL = "pt-small"; - exports.LARGE = "pt-large"; - exports.INTERACTIVE = "pt-interactive"; - exports.ALIGN_LEFT = "pt-align-left"; - exports.ALIGN_RIGHT = "pt-align-right"; - exports.INLINE = "pt-inline"; - exports.FILL = "pt-fill"; - // components - exports.ALERT = "pt-alert"; - exports.ALERT_BODY = "pt-alert-body"; - exports.ALERT_CONTENTS = "pt-alert-contents"; - exports.ALERT_FOOTER = "pt-alert-footer"; - exports.BREADCRUMB = "pt-breadcrumb"; - exports.BREADCRUMB_CURRENT = "pt-breadcrumb-current"; - exports.BREADCRUMBS = "pt-breadcrumbs"; - exports.BREADCRUMBS_COLLAPSED = "pt-breadcrumbs-collapsed"; - exports.BUTTON = "pt-button"; - exports.BUTTON_GROUP = "pt-button-group"; - exports.CARD = "pt-card"; - exports.COLLAPSE = "pt-collapse"; - exports.COLLAPSIBLE_LIST = "pt-collapse-list"; - exports.CONTEXT_MENU = "pt-context-menu"; - exports.CONTEXT_MENU_POPOVER_TARGET = "pt-context-menu-popover-target"; - exports.DIALOG = "pt-dialog"; - exports.DIALOG_BODY = "pt-dialog-body"; - exports.DIALOG_CLOSE_BUTTON = "pt-dialog-close-button"; - exports.DIALOG_FOOTER = "pt-dialog-footer"; - exports.DIALOG_FOOTER_ACTIONS = "pt-dialog-footer-actions"; - exports.DIALOG_HEADER = "pt-dialog-header"; - exports.EDITABLE_TEXT = "pt-editable-text"; - exports.ELEVATION_0 = "pt-elevation-0"; - exports.ELEVATION_1 = "pt-elevation-1"; - exports.ELEVATION_2 = "pt-elevation-2"; - exports.ELEVATION_3 = "pt-elevation-3"; - exports.ELEVATION_4 = "pt-elevation-4"; - exports.INPUT = "pt-input"; - exports.INPUT_GROUP = "pt-input-group"; - exports.LABEL = "pt-label"; - exports.MENU = "pt-menu"; - exports.MENU_ITEM = "pt-menu-item"; - exports.MENU_SUBMENU = "pt-submenu"; - exports.MENU_DIVIDER = "pt-menu-divider"; - exports.MENU_HEADER = "pt-menu-header"; - exports.NON_IDEAL_STATE = "pt-non-ideal-state"; - exports.NON_IDEAL_STATE_ACTION = "pt-non-ideal-state-action"; - exports.NON_IDEAL_STATE_DESCRIPTION = "pt-non-ideal-state-description"; - exports.NON_IDEAL_STATE_ICON = "pt-non-ideal-state-icon"; - exports.NON_IDEAL_STATE_TITLE = "pt-non-ideal-state-title"; - exports.NON_IDEAL_STATE_VISUAL = "pt-non-ideal-state-visual"; - exports.OVERLAY_BACKDROP = "pt-overlay-backdrop"; - exports.OVERLAY_OPEN = "pt-overlay-open"; - exports.OVERLAY_SCROLL_CONTAINER = "pt-overlay-scroll-container"; - exports.POPOVER = "pt-popover"; - exports.POPOVER_ARROW = "pt-popover-arrow"; - exports.POPOVER_BACKDROP = "pt-popover-backdrop"; - exports.POPOVER_CONTENT = "pt-popover-content"; - exports.POPOVER_DISMISS = "pt-popover-dismiss"; - exports.POPOVER_DISMISS_OVERRIDE = "pt-popover-dismiss-override"; - exports.POPOVER_OPEN = "pt-popover-open"; - exports.POPOVER_TARGET = "pt-popover-target"; - exports.TRANSITION_CONTAINER = "pt-transition-container"; - exports.PORTAL = "pt-portal"; - exports.SELECT = "pt-select"; - exports.SLIDER = "pt-slider"; - exports.SLIDER_HANDLE = exports.SLIDER + "-handle"; - exports.SLIDER_LABEL = exports.SLIDER + "-label"; - exports.RANGE_SLIDER = "pt-range-slider"; - exports.SPINNER = "pt-spinner"; - exports.SVG_SPINNER = "pt-svg-spinner"; - exports.TAB = "pt-tab"; - exports.TAB_LIST = "pt-tab-list"; - exports.TAB_PANEL = "pt-tab-panel"; - exports.TABS = "pt-tabs"; - exports.TAG = "pt-tag"; - exports.TAG_REMOVABLE = "pt-tag-removable"; - exports.TAG_REMOVE = "pt-tag-remove"; - exports.TOAST = "pt-toast"; - exports.TOAST_CONTAINER = "pt-toast-container"; - exports.TOAST_MESSAGE = "pt-toast-message"; - exports.TOOLTIP = "pt-tooltip"; - exports.TREE = "pt-tree"; - exports.TREE_NODE = "pt-tree-node"; - exports.TREE_NODE_CARET = "pt-tree-node-caret"; - exports.TREE_NODE_CARET_CLOSED = "pt-tree-node-caret-closed"; - exports.TREE_NODE_CARET_NONE = "pt-tree-node-caret-none"; - exports.TREE_NODE_CARET_OPEN = "pt-tree-node-caret-open"; - exports.TREE_NODE_CONTENT = "pt-tree-node-content"; - exports.TREE_NODE_EXPANDED = "pt-tree-node-expanded"; - exports.TREE_NODE_ICON = "pt-tree-node-icon"; - exports.TREE_NODE_LABEL = "pt-tree-node-label"; - exports.TREE_NODE_LIST = "pt-tree-node-list"; - exports.TREE_NODE_SECONDARY_LABEL = "pt-tree-node-secondary-label"; - exports.TREE_NODE_SELECTED = "pt-tree-node-selected"; - exports.TREE_ROOT = "pt-tree-root"; - exports.ICON_STANDARD = "pt-icon-standard"; - exports.ICON_LARGE = "pt-icon-large"; - /** Return CSS class for icon, whether or not 'pt-icon-' prefix is included */ - function iconClass(iconName) { - if (iconName == null) { - return undefined; - } - return iconName.indexOf("pt-icon-") === 0 ? iconName : "pt-icon-" + iconName; - } - exports.iconClass = iconClass; - function intentClass(intent) { - if (intent === void 0) { intent = intent_1.Intent.NONE; } - if (intent === intent_1.Intent.NONE || intent_1.Intent[intent] == null) { - return undefined; - } - return "pt-intent-" + intent_1.Intent[intent].toLowerCase(); - } - exports.intentClass = intentClass; - //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24vY2xhc3Nlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7R0FLRzs7QUFFSCx1QkFBdUIsVUFBVSxDQUFDLENBQUE7QUFFbEMsWUFBWTtBQUNDLFlBQUksR0FBRyxTQUFTLENBQUM7QUFDakIsY0FBTSxHQUFHLFdBQVcsQ0FBQztBQUNyQixlQUFPLEdBQUcsWUFBWSxDQUF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GlvbiBpY29uQ2xhc3MoaWNvbk5hbWU6IHN0cmluZykge1xuICAgIGlmIChpY29uTmFtZSA9PSBudWxsKSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgfVxuICAgIHJldHVybiBpY29uTmFtZS5pbmRleE9mKFwicHQtaWNvbi1cIikgPT09IDAgPyBpY29uTmFtZSA6IGBwdC1pY29uLSR7aWNvbk5hbWV9YDtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGludGVudENsYXNzKGludGVudCA9IEludGVudC5OT05FKSB7XG4gICAgaWYgKGludGVudCA9PT0gSW50ZW50Lk5PTkUgfHwgSW50ZW50W2ludGVudF0gPT0gbnVsbCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgIH1cbiAgICByZXR1cm4gYHB0LWludGVudC0ke0ludGVudFtpbnRlbnRdLnRvTG93ZXJDYXNlKCl9YDtcbn1cbiJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ== + 'use strict'; + module.exports = '15.1.0'; /***/ }, -/* 58 */ +/* 56 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule onlyChild + */ + 'use strict'; + + var ReactElement = __webpack_require__(27); + + var invariant = __webpack_require__(26); + + /** + * Returns the first child in a collection of children and verifies that there + * is only one child in the collection. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only + * + * The current implementation of this function assumes that a single child gets + * passed without a wrapper, but the purpose of this helper function is to + * abstract away the particular structure of children. + * + * @param {?object} children Child collection structure. + * @return {ReactElement} The first and only `ReactElement` contained in the + * structure. + */ + function onlyChild(children) { + !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'onlyChild must be passed a children with exactly one child.') : invariant(false) : void 0; + return children; + } + + module.exports = onlyChild; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + +/***/ }, +/* 57 */ /***/ function(module, exports) { /* - * Copyright 2015 Palantir Technologies, Inc. All rights reserved. + * Copyright 2016 Palantir Technologies, Inc. All rights reserved. * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE * and https://github.com/palantir/blueprint/blob/master/PATENTS */ "use strict"; - exports.ARROW_DOWN = 40; - exports.ARROW_LEFT = 37; - exports.ARROW_RIGHT = 39; - exports.ARROW_UP = 38; - exports.ENTER = 13; - exports.ESCAPE = 27; - exports.SPACE = 32; + exports.Colors = { + BLACK: "#10161A", + BLUE1: "#0E5A8A", + BLUE2: "#106BA3", + BLUE3: "#137CBD", + BLUE4: "#2B95D6", + BLUE5: "#48AFF0", + COBALT1: "#1F4B99", + COBALT2: "#2458B3", + COBALT3: "#2965CC", + COBALT4: "#4580E6", + COBALT5: "#669EFF", + DARK_GRAY1: "#182026", + DARK_GRAY2: "#202B33", + DARK_GRAY3: "#293742", + DARK_GRAY4: "#30404D", + DARK_GRAY5: "#394B59", + FOREST1: "#1D7324", + FOREST2: "#238C2C", + FOREST3: "#29A634", + FOREST4: "#43BF4D", + FOREST5: "#62D96B", + GOLD1: "#A67908", + GOLD2: "#BF8C0A", + GOLD3: "#D99E0B", + GOLD4: "#F2B824", + GOLD5: "#FFC940", + GRAY1: "#5C7080", + GRAY2: "#738694", + GRAY3: "#8A9BA8", + GRAY4: "#A7B6C2", + GRAY5: "#BFCCD6", + GREEN1: "#0A6640", + GREEN2: "#0D8050", + GREEN3: "#0F9960", + GREEN4: "#15B371", + GREEN5: "#3DCC91", + INDIGO1: "#5642A6", + INDIGO2: "#634DBF", + INDIGO3: "#7157D9", + INDIGO4: "#9179F2", + INDIGO5: "#AD99FF", + LIGHT_GRAY1: "#CED9E0", + LIGHT_GRAY2: "#D8E1E8", + LIGHT_GRAY3: "#E1E8ED", + LIGHT_GRAY4: "#EBF1F5", + LIGHT_GRAY5: "#F5F8FA", + LIME1: "#728C23", + LIME2: "#87A629", + LIME3: "#9BBF30", + LIME4: "#B6D94C", + LIME5: "#D1F26D", + ORANGE1: "#A66321", + ORANGE2: "#BF7326", + ORANGE3: "#D9822B", + ORANGE4: "#F29D49", + ORANGE5: "#FFB366", + RED1: "#A82A2A", + RED2: "#C23030", + RED3: "#DB3737", + RED4: "#F55656", + RED5: "#FF7373", + ROSE1: "#A82255", + ROSE2: "#C22762", + ROSE3: "#DB2C6F", + ROSE4: "#F5498B", + ROSE5: "#FF66A1", + SEPIA1: "#63411E", + SEPIA2: "#7D5125", + SEPIA3: "#96622D", + SEPIA4: "#B07B46", + SEPIA5: "#C99765", + TURQUOISE1: "#008075", + TURQUOISE2: "#00998C", + TURQUOISE3: "#00B3A4", + TURQUOISE4: "#14CCBD", + TURQUOISE5: "#2EE6D6", + VERMILION1: "#9E2B0E", + VERMILION2: "#B83211", + VERMILION3: "#D13913", + VERMILION4: "#EB532D", + VERMILION5: "#FF6E4A", + VIOLET1: "#5C255C", + VIOLET2: "#752F75", + VIOLET3: "#8F398F", + VIOLET4: "#A854A8", + VIOLET5: "#C274C2", + WHITE: "#FFFFFF", + }; - //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24va2V5cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7R0FLRzs7QUFFVSxrQkFBVSxHQUFHLEVBQUUsQ0FBQztBQUNoQixrQkFBVSxHQUFHLEVBQUUsQ0FBQztBQUNoQixtQkFBVyxHQUFHLEVBQUUsQ0FBQztBQUNqQixnQkFBUSxHQUFHLEVBQUUsQ0FBQztBQUNkLGFBQUssR0FBRyxFQUFFLENBQUM7QUFDWCxjQUFNLEdBQUcsRUFBRSxDQUFDO0FBQ1osYUFBSyxHQUFHLEVBQUUsQ0FBQyIsImZpbG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1wiLFxuICAgIFRVUlFVT0lTRTM6IFwiIzAwQjNBNFwiLFxuICAgIFRVUlFVT0lTRTQ6IFwiIzE0Q0NCRFwiLFxuICAgIFRVUlFVT0lTRTU6IFwiIzJFRTZENlwiLFxuXG4gICAgVkVSTUlMSU9OMTogXCIjOUUyQjBFXCIsXG4gICAgVkVSTUlMSU9OMjogXCIjQjgzMjExXCIsXG4gICAgVkVSTUlMSU9OMzogXCIjRDEzOTEzXCIsXG4gICAgVkVSTUlMSU9ONDogXCIjRUI1MzJEXCIsXG4gICAgVkVSTUlMSU9ONTogXCIjRkY2RTRBXCIsXG5cbiAgICBWSU9MRVQxOiBcIiM1QzI1NUNcIixcbiAgICBWSU9MRVQyOiBcIiM3NTJGNzVcIixcbiAgICBWSU9MRVQzOiBcIiM4RjM5OEZcIixcbiAgICBWSU9MRVQ0OiBcIiNBODU0QThcIixcbiAgICBWSU9MRVQ1OiBcIiNDMjc0QzJcIixcblxuICAgIFdISVRFOiBcIiNGRkZGRkZcIixcbn07XG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= /***/ }, -/* 59 */ -/***/ function(module, exports, __webpack_require__) { +/* 58 */ +/***/ function(module, exports) { /* - * Copyright 2016 Palantir Technologies, Inc. All rights reserved. + * Copyright 2015 Palantir Technologies, Inc. All rights reserved. * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE * and https://github.com/palantir/blueprint/blob/master/PATENTS */ "use strict"; - function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; - } - __webpack_require__(60); - var contextMenu = __webpack_require__(61); - exports.ContextMenu = contextMenu; - __export(__webpack_require__(230)); - __export(__webpack_require__(233)); - __export(__webpack_require__(231)); - __export(__webpack_require__(234)); - __export(__webpack_require__(235)); - __export(__webpack_require__(238)); - __export(__webpack_require__(232)); - __export(__webpack_require__(239)); - __export(__webpack_require__(240)); - __export(__webpack_require__(241)); - __export(__webpack_require__(242)); - __export(__webpack_require__(243)); - __export(__webpack_require__(236)); - __export(__webpack_require__(250)); - __export(__webpack_require__(237)); - __export(__webpack_require__(251)); - __export(__webpack_require__(213)); - __export(__webpack_require__(208)); - __export(__webpack_require__(252)); - __export(__webpack_require__(227)); - __export(__webpack_require__(253)); - __export(__webpack_require__(254)); - __export(__webpack_require__(255)); - __export(__webpack_require__(258)); - __export(__webpack_require__(259)); - __export(__webpack_require__(260)); - __export(__webpack_require__(261)); - __export(__webpack_require__(262)); - __export(__webpack_require__(263)); - __export(__webpack_require__(264)); - __export(__webpack_require__(265)); - __export(__webpack_require__(266)); - __export(__webpack_require__(267)); - __export(__webpack_require__(228)); - __export(__webpack_require__(268)); - __export(__webpack_require__(269)); + /** + * The four basic intents. + */ + (function (Intent) { + Intent[Intent["NONE"] = -1] = "NONE"; + Intent[Intent["PRIMARY"] = 0] = "PRIMARY"; + Intent[Intent["SUCCESS"] = 1] = "SUCCESS"; + Intent[Intent["WARNING"] = 2] = "WARNING"; + Intent[Intent["DANGER"] = 3] = "DANGER"; + })(exports.Intent || (exports.Intent = {})); + var Intent = exports.Intent; - //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21wb25lbnRzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7OztHQUtHOzs7OztBQUVILFFBQU8sTUFBTSxDQUFDLENBQUE7QUFFZCxJQUFZLFdBQVcsV0FBTSw0QkFBNEIsQ0FBQyxDQUFBO0FBQzdDLG1CQUFXLEdBQUcsV0FBVyxDQUFDO0FBRXZDLGlCQUFjLGVBQWUsQ0FBQyxFQUFBO0FBQzlCLGlCQUFjLDBCQUEwQixDQUFDLEVBQUE7QUFDekMsaUJBQWMsa0JBQWtCLENBQUMsRUFBQTtBQUNqQyxpQkFBYyxxQkFBcUIsQ0FBQyxFQUFBO0FBQ3BDLGlCQUFjLG9DQUFvQyxDQU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WxsIHJpZ2h0cyByZXNlcnZlZC5cbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBCU0QtMyBMaWNlbnNlIGFzIG1vZGlmaWVkICh0aGUg4oCcTGljZW5zZeKAnSk7IHlvdSBtYXkgb2J0YWluIGEgY29weVxuICogb2YgdGhlIGxpY2Vuc2UgYXQgaHR0cHM6Ly9naXRodWIuY29tL3BhbGFudGlyL2JsdWVwcmludC9ibG9iL21hc3Rlci9MSUNFTlNFXG4gKiBhbmQgaHR0cHM6Ly9naXRodWIuY29tL3BhbGFudGlyL2JsdWVwcmludC9ibG9iL21hc3Rlci9QQVRFTlRTXG4gKi9cblxuLyoqXG4gKiBUaGUgZm91ciBiYXNpYyBpbnRlbnRzLlxuICovXG5leHBvcnQgZW51bSBJbnRlbnQge1xuICAgIE5PTkUgPSAtMSxcbiAgICBQUklNQVJZLFxuICAgIFNVQ0NFU1MsXG4gICAgV0FSTklORyxcbiAgICBEQU5HRVIsXG59XG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= /***/ }, -/* 60 */ +/* 59 */ /***/ function(module, exports) { - /*! - Copyright (C) 2013-2015 by Andrea Giammarchi - @WebReflection + /* + * Copyright 2015 Palantir Technologies, Inc. All rights reserved. + * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy + * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE + * and https://github.com/palantir/blueprint/blob/master/PATENTS + */ + "use strict"; + (function (Position) { + Position[Position["TOP_LEFT"] = 0] = "TOP_LEFT"; + Position[Position["TOP"] = 1] = "TOP"; + Position[Position["TOP_RIGHT"] = 2] = "TOP_RIGHT"; + Position[Position["RIGHT_TOP"] = 3] = "RIGHT_TOP"; + Position[Position["RIGHT"] = 4] = "RIGHT"; + Position[Position["RIGHT_BOTTOM"] = 5] = "RIGHT_BOTTOM"; + Position[Position["BOTTOM_RIGHT"] = 6] = "BOTTOM_RIGHT"; + Position[Position["BOTTOM"] = 7] = "BOTTOM"; + Position[Position["BOTTOM_LEFT"] = 8] = "BOTTOM_LEFT"; + Position[Position["LEFT_BOTTOM"] = 9] = "LEFT_BOTTOM"; + Position[Position["LEFT"] = 10] = "LEFT"; + Position[Position["LEFT_TOP"] = 11] = "LEFT_TOP"; + })(exports.Position || (exports.Position = {})); + var Position = exports.Position; + function isPositionHorizontal(position) { + /* istanbul ignore next */ + return position === Position.TOP || position === Position.TOP_LEFT || position === Position.TOP_RIGHT + || position === Position.BOTTOM || position === Position.BOTTOM_LEFT || position === Position.BOTTOM_RIGHT; + } + exports.isPositionHorizontal = isPositionHorizontal; + function isPositionVertical(position) { + /* istanbul ignore next */ + return position === Position.LEFT || position === Position.LEFT_TOP || position === Position.LEFT_BOTTOM + || position === Position.RIGHT || position === Position.RIGHT_TOP || position === Position.RIGHT_BOTTOM; + } + exports.isPositionVertical = isPositionVertical; - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24vcG9zaXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7O0dBS0c7O0FBRUgsV0FBWSxRQUFRO0lBQ2hCLCtDQUFRLENBQUE7SUFDUixxQ0FBRyxDQUFBO0lBQ0gsaURBQVMsQ0FBQTtJQUNULGlEQUFTLENBQUE7SUFDVCx5Q0FBSyxDQUFBO0lBQ0wsdURBQVksQ0FBQTtJQUNaLHVEQUFZLENBQUE7SUFDWiwyQ0FBTSxDQUFBO0lBQ04scURBQVcsQ0FBQTtJQUNYLHFEQUFXLENBQUE7SUFDWCx3Q0FBSSxDQUFBO0lBQ0osZ0RBQVEsQ0FBQTtBQUNaLENBQUMsRUFiVyxnQkFBUSxLQUFSLGdCQUFRL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9PT0gUG9zaXRpb24uTEVGVF9UT1AgfHwgcG9zaXRpb24gPT09IFBvc2l0aW9uLkxFRlRfQk9UVE9NXG4gICAgICAgIHx8IHBvc2l0aW9uID09PSBQb3NpdGlvbi5SSUdIVCB8fCBwb3NpdGlvbiA9PT0gUG9zaXRpb24uUklHSFRfVE9QIHx8IHBvc2l0aW9uID09PSBQb3NpdGlvbi5SSUdIVF9CT1RUT007XG59XG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. +/***/ }, +/* 60 */ +/***/ function(module, exports, __webpack_require__) { - */ - (function(window){'use strict'; - /* jshint loopfunc: true, noempty: false*/ - // http://www.w3.org/TR/dom/#element + /* + * Copyright 2015 Palantir Technologies, Inc. All rights reserved. + * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy + * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE + * and https://github.com/palantir/blueprint/blob/master/PATENTS + */ + "use strict"; + var utils_1 = __webpack_require__(61); + /** A collection of curated prop keys used across our Components which are not valid HTMLElement props. */ + var INVALID_PROPS = [ + "containerRef", + "defaultIndeterminate", + "elementRef", + "iconName", + "inputRef", + "intent", + "leftIconName", + "onChildrenMount", + "onRemove", + "rightElement", + "rightIconName", + "text", + ]; + /** + * Typically applied to HTMLElements to filter out blacklisted props. When applied to a Component, + * can filter props from being passed down to the children. Can also filter by a combined list of + * supplied prop keys and the blacklist (only appropriate for HTMLElements). + * @param props The original props object to filter down. + * @param {string[]} invalidProps If supplied, overwrites the default blacklist. + * @param {boolean} shouldMerge If true, will merge supplied invalidProps and blacklist together. + */ + function removeNonHTMLProps(props, invalidProps, shouldMerge) { + if (invalidProps === void 0) { invalidProps = INVALID_PROPS; } + if (shouldMerge === void 0) { shouldMerge = false; } + if (shouldMerge) { + invalidProps = invalidProps.concat(INVALID_PROPS); + } + return invalidProps.reduce(function (prev, curr) { + if (prev.hasOwnProperty(curr)) { + delete prev[curr]; + } + return prev; + }, utils_1.shallowClone(props)); + } + exports.removeNonHTMLProps = removeNonHTMLProps; - function createDocumentFragment() { - return document.createDocumentFragment(); - } + //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24vcHJvcHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7O0dBS0c7O0FBS0gsc0JBQTZCLFNBQVMsQ0FBQyxDQUFBO0FBdUV2QywwR0FBMEc7QUFDMUcsSUFBTSxhQUFhLEdBQUc7SUFDbEIsY0FBYztJQUNkLHNCQUFzQjtJQUN0QixZQUFZO0lBQ1osVUFBVTtJQUNWLFVBQVU7SUFDVixRQUFRO0lBQ1IsY0FBYztJQUNkLGlCQUFpQjtJQUNqQixVQUFVO0lBQ1YsY0FBYztJQUNkLGVBQWU7SUFDZixNQUFNO0NBQ1QsQ0FBQztBQUVGOzs7Ozs7O0dBT0c7QUFDSCw0QkFBbUQsS0FBUSxFQUFFLFlBQTRCLEVBQUUsV0FBbUI7SUFBakQsNEJBQTRCLEdBQTVCLDRCQUE0QjtJQUFFLDJCQUFtQixHQUFuQixtQkFBbUI7SUFDMUcsRUFBRSxDQUFDLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FBQztRQUNkLFlBQVksR0FBRyxZQUFZLENBQUMsTUFBTSxD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ICAgICAgIGRlbGV0ZSAocHJldiBhcyBhbnkpW2N1cnJdO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBwcmV2O1xuICAgIH0sIHNoYWxsb3dDbG9uZShwcm9wcykpO1xufVxuIl0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9 - function createElement(nodeName) { - return document.createElement(nodeName); - } - function enoughArguments(length, name) { - if (!length) throw new Error( - 'Failed to construct ' + - name + - ': 1 argument required, but only 0 present.' - ); - } +/***/ }, +/* 61 */ +/***/ function(module, exports) { - function mutationMacro(nodes) { - if (nodes.length === 1) { - return textNodeIfString(nodes[0]); + /* + * Copyright 2015 Palantir Technologies, Inc. All rights reserved. + * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy + * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE + * and https://github.com/palantir/blueprint/blob/master/PATENTS + */ + "use strict"; + /** Returns whether the value is a function. Acts as a type guard. */ + function isFunction(value) { + return typeof value === "function"; + } + exports.isFunction = isFunction; + function safeInvoke(func) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; } - for (var - fragment = createDocumentFragment(), - list = slice.call(nodes), - i = 0; i < nodes.length; i++ - ) { - fragment.appendChild(textNodeIfString(list[i])); + if (isFunction(func)) { + return func.apply(void 0, args); } - return fragment; - } + } + exports.safeInvoke = safeInvoke; + function elementIsOrContains(element, testElement) { + return element === testElement || element.contains(testElement); + } + exports.elementIsOrContains = elementIsOrContains; + /** + * Returns the difference in length between two arrays. A `null` argument is considered an empty list. + * The return value will be positive if `a` is longer than `b`, negative if the opposite is true, + * and zero if their lengths are equal. + */ + function arrayLengthCompare(a, b) { + if (a === void 0) { a = []; } + if (b === void 0) { b = []; } + return a.length - b.length; + } + exports.arrayLengthCompare = arrayLengthCompare; + /** + * Returns true if the two numbers are within the given tolerance of each other. + * This is useful to correct for floating point precision issues, less useful for integers. + */ + function approxEqual(a, b, tolerance) { + if (tolerance === void 0) { tolerance = 0.00001; } + return Math.abs(a - b) <= tolerance; + } + exports.approxEqual = approxEqual; + /* Clamps the given number between min and max values. Returns value if within range, or closest bound. */ + function clamp(val, min, max) { + if (max < min) { + throw new Error("clamp: max cannot be less than min"); + } + return Math.min(Math.max(val, min), max); + } + exports.clamp = clamp; + /** Return a new object with the same keys as the given object (values are copied, not cloned). */ + function shallowClone(object) { + var clonedObject = {}; + for (var key in object) { + if (object.hasOwnProperty(key)) { + clonedObject[key] = object[key]; + } + } + return clonedObject; + } + exports.shallowClone = shallowClone; + /** + * Throttle an event on an EventTarget by wrapping it in `requestAnimationFrame` call. + * Returns the event handler that was bound to given eventName so you can clean up after yourself. + * @see https://developer.mozilla.org/en-US/docs/Web/Events/scroll + */ + function throttleEvent(target, eventName, newEventName) { + var running = false; + /* istanbul ignore next: borrowed directly from MDN */ + var func = function (event) { + if (running) { + return; + } + running = true; + requestAnimationFrame(function () { + target.dispatchEvent(new CustomEvent(newEventName, event)); + running = false; + }); + }; + target.addEventListener(eventName, func); + return func; + } + exports.throttleEvent = throttleEvent; + ; - function textNodeIfString(node) { - return typeof node === 'string' ? document.createTextNode(node) : node; - } + //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24vdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7O0dBS0c7O0FBRUgscUVBQXFFO0FBQ3JFLG9CQUEyQixLQUFVO0lBQ2pDLE1BQU0sQ0FBQyxPQUFPLEtBQUssS0FBSyxVQUFVLENBQUM7QUFDdkMsQ0FBQztBQUZlLGtCQUFVLGFBRXpCLENBQUE7QUFPRCxvQkFBMkIsSUFBYztJQUFFLGNBQWM7U0FBZCxXQUFjLENBQWQsc0JBQWMsQ0FBZCxJQUFjO1FBQWQsNkJBQWM7O0lBQ3JELEVBQUUsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM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AgICAgIGlmIChydW5uaW5nKSB7IHJldHVybjsgfVxuICAgICAgICBydW5uaW5nID0gdHJ1ZTtcbiAgICAgICAgcmVxdWVzdEFuaW1hdGlvbkZyYW1lKCgpID0+IHtcbiAgICAgICAgICAgIHRhcmdldC5kaXNwYXRjaEV2ZW50KG5ldyBDdXN0b21FdmVudChuZXdFdmVudE5hbWUsIGV2ZW50KSk7XG4gICAgICAgICAgICBydW5uaW5nID0gZmFsc2U7XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgdGFyZ2V0LmFkZEV2ZW50TGlzdGVuZXIoZXZlbnROYW1lLCBmdW5jKTtcbiAgICByZXR1cm4gZnVuYztcbn07XG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= - for(var - head, - property, - TemporaryPrototype, - TemporaryTokenList, - wrapVerifyToken, - document = window.document, - hOP = Object.prototype.hasOwnProperty, - defineProperty = Object.defineProperty || function (object, property, descriptor) { - if (hOP.call(descriptor, 'value')) { - object[property] = descriptor.value; - } else { - if (hOP.call(descriptor, 'get')) - object.__defineGetter__(property, descriptor.get); - if (hOP.call(descriptor, 'set')) - object.__defineSetter__(property, descriptor.set); - } - return object; - }, - indexOf = [].indexOf || function indexOf(value){ - var length = this.length; - while(length--) { - if (this[length] === value) { - break; - } - } - return length; - }, - // http://www.w3.org/TR/domcore/#domtokenlist - verifyToken = function (token) { - if (!token) { - throw 'SyntaxError'; - } else if (spaces.test(token)) { - throw 'InvalidCharacterError'; - } - return token; - }, - DOMTokenList = function (node) { - var - noClassName = typeof node.className === 'undefined', - className = noClassName ? - (node.getAttribute('class') || '') : node.className, - isSVG = noClassName || typeof className === 'object', - value = (isSVG ? - (noClassName ? className : className.baseVal) : - className - ).replace(trim, '') - ; - if (value.length) { - properties.push.apply( - this, - value.split(spaces) - ); - } - this._isSVG = isSVG; - this._ = node; - }, - classListDescriptor = { - get: function get() { - return new DOMTokenList(this); - }, - set: function(){} - }, - uid = 'dom4-tmp-'.concat(Math.random() * +new Date()).replace('.','-'), - trim = /^\s+|\s+$/g, - spaces = /\s+/, - SPACE = '\x20', - CLASS_LIST = 'classList', - toggle = function toggle(token, force) { - if (this.contains(token)) { - if (!force) { - // force is not true (either false or omitted) - this.remove(token); - } - } else if(force === undefined || force) { - force = true; - this.add(token); - } - return !!force; - }, - DocumentFragmentPrototype = window.DocumentFragment && DocumentFragment.prototype, - Node = window.Node, - NodePrototype = (Node || Element).prototype, - CharacterData = window.CharacterData || Node, - CharacterDataPrototype = CharacterData && CharacterData.prototype, - DocumentType = window.DocumentType, - DocumentTypePrototype = DocumentType && DocumentType.prototype, - ElementPrototype = (window.Element || Node || window.HTMLElement).prototype, - HTMLSelectElement = window.HTMLSelectElement || createElement('select').constructor, - selectRemove = HTMLSelectElement.prototype.remove, - ShadowRoot = window.ShadowRoot, - SVGElement = window.SVGElement, - // normalizes multiple ids as CSS query - idSpaceFinder = / /g, - idSpaceReplacer = '\\ ', - createQueryMethod = function (methodName) { - var createArray = methodName === 'querySelectorAll'; - return function (css) { - var a, i, id, query, nl, selectors, node = this.parentNode; - if (node) { - for ( - id = this.getAttribute('id') || uid, - query = id === uid ? id : id.replace(idSpaceFinder, idSpaceReplacer), - selectors = css.split(','), - i = 0; i < selectors.length; i++ - ) { - selectors[i] = '#' + query + ' ' + selectors[i]; - } - css = selectors.join(','); - } - if (id === uid) this.setAttribute('id', id); - nl = (node || this)[methodName](css); - if (id === uid) this.removeAttribute('id'); - // return a list - if (createArray) { - i = nl.length; - a = new Array(i); - while (i--) a[i] = nl[i]; - } - // return node or null - else { - a = nl; - } - return a; - }; - }, - addQueryAndAll = function (where) { - if (!('query' in where)) { - where.query = ElementPrototype.query; - } - if (!('queryAll' in where)) { - where.queryAll = ElementPrototype.queryAll; - } - }, - properties = [ - 'matches', ( - ElementPrototype.matchesSelector || - ElementPrototype.webkitMatchesSelector || - ElementPrototype.khtmlMatchesSelector || - ElementPrototype.mozMatchesSelector || - ElementPrototype.msMatchesSelector || - ElementPrototype.oMatchesSelector || - function matches(selector) { - var parentNode = this.parentNode; - return !!parentNode && -1 < indexOf.call( - parentNode.querySelectorAll(selector), - this - ); - } - ), - 'closest', function closest(selector) { - var parentNode = this, matches; - while ( - // document has no .matches - (matches = parentNode && parentNode.matches) && - !parentNode.matches(selector) - ) { - parentNode = parentNode.parentNode; - } - return matches ? parentNode : null; - }, - 'prepend', function prepend() { - var firstChild = this.firstChild, - node = mutationMacro(arguments); - if (firstChild) { - this.insertBefore(node, firstChild); - } else { - this.appendChild(node); - } - }, - 'append', function append() { - this.appendChild(mutationMacro(arguments)); - }, - 'before', function before() { - var parentNode = this.parentNode; - if (parentNode) { - parentNode.insertBefore( - mutationMacro(arguments), this - ); - } - }, - 'after', function after() { - var parentNode = this.parentNode, - nextSibling = this.nextSibling, - node = mutationMacro(arguments); - if (parentNode) { - if (nextSibling) { - parentNode.insertBefore(node, nextSibling); - } else { - parentNode.appendChild(node); - } - } - }, - // WARNING - DEPRECATED - use .replaceWith() instead - 'replace', function replace() { - this.replaceWith.apply(this, arguments); - }, - 'replaceWith', function replaceWith() { - var parentNode = this.parentNode; - if (parentNode) { - parentNode.replaceChild( - mutationMacro(arguments), - this - ); - } - }, - 'remove', function remove() { - var parentNode = this.parentNode; - if (parentNode) { - parentNode.removeChild(this); - } - }, - 'query', createQueryMethod('querySelector'), - 'queryAll', createQueryMethod('querySelectorAll') - ], - slice = properties.slice, - i = properties.length; i; i -= 2 - ) { - property = properties[i - 2]; - if (!(property in ElementPrototype)) { - ElementPrototype[property] = properties[i - 1]; - } - if (property === 'remove') { - // see https://github.com/WebReflection/dom4/issues/19 - HTMLSelectElement.prototype[property] = function () { - return 0 < arguments.length ? - selectRemove.apply(this, arguments) : - ElementPrototype.remove.call(this); - }; - } - // see https://github.com/WebReflection/dom4/issues/18 - if (/^(?:before|after|replace|replaceWith|remove)$/.test(property)) { - if (CharacterData && !(property in CharacterDataPrototype)) { - CharacterDataPrototype[property] = properties[i - 1]; - } - if (DocumentType && !(property in DocumentTypePrototype)) { - DocumentTypePrototype[property] = properties[i - 1]; - } - } - // see https://github.com/WebReflection/dom4/pull/26 - if (/^(?:append|prepend)$/.test(property)) { - if (DocumentFragmentPrototype) { - if (!(property in DocumentFragmentPrototype)) { - DocumentFragmentPrototype[property] = properties[i - 1]; - } - } else { - try { - createDocumentFragment().constructor.prototype[property] = properties[i - 1]; - } catch(o_O) {} - } - } - } - // bring query and queryAll to the document too - addQueryAndAll(document); +/***/ }, +/* 62 */ +/***/ function(module, exports, __webpack_require__) { - // brings query and queryAll to fragments as well - if (DocumentFragmentPrototype) { - addQueryAndAll(DocumentFragmentPrototype); - } else { - try { - addQueryAndAll(createDocumentFragment().constructor.prototype); - } catch(o_O) {} - } - - // bring query and queryAll to the ShadowRoot too - if (ShadowRoot) { - addQueryAndAll(ShadowRoot.prototype); - } - - // most likely an IE9 only issue - // see https://github.com/WebReflection/dom4/issues/6 - if (!createElement('a').matches('a')) { - ElementPrototype[property] = function(matches){ - return function (selector) { - return matches.call( - this.parentNode ? - this : - createDocumentFragment().appendChild(this), - selector - ); - }; - }(ElementPrototype[property]); - } - - // used to fix both old webkit and SVG - DOMTokenList.prototype = { - length: 0, - add: function add() { - for(var j = 0, token; j < arguments.length; j++) { - token = arguments[j]; - if(!this.contains(token)) { - properties.push.call(this, property); - } - } - if (this._isSVG) { - this._.setAttribute('class', '' + this); - } else { - this._.className = '' + this; - } - }, - contains: (function(indexOf){ - return function contains(token) { - i = indexOf.call(this, property = verifyToken(token)); - return -1 < i; - }; - }([].indexOf || function (token) { - i = this.length; - while(i-- && this[i] !== token){} - return i; - })), - item: function item(i) { - return this[i] || null; - }, - remove: function remove() { - for(var j = 0, token; j < arguments.length; j++) { - token = arguments[j]; - if(this.contains(token)) { - properties.splice.call(this, i, 1); - } - } - if (this._isSVG) { - this._.setAttribute('class', '' + this); - } else { - this._.className = '' + this; - } - }, - toggle: toggle, - toString: function toString() { - return properties.join.call(this, SPACE); - } - }; - - if (SVGElement && !(CLASS_LIST in SVGElement.prototype)) { - defineProperty(SVGElement.prototype, CLASS_LIST, classListDescriptor); - } - - // http://www.w3.org/TR/dom/#domtokenlist - // iOS 5.1 has completely screwed this property - // classList in ElementPrototype is false - // but it's actually there as getter - if (!(CLASS_LIST in document.documentElement)) { - defineProperty(ElementPrototype, CLASS_LIST, classListDescriptor); - } else { - // iOS 5.1 and Nokia ASHA do not support multiple add or remove - // trying to detect and fix that in here - TemporaryTokenList = createElement('div')[CLASS_LIST]; - TemporaryTokenList.add('a', 'b', 'a'); - if ('a\x20b' != TemporaryTokenList) { - // no other way to reach original methods in iOS 5.1 - TemporaryPrototype = TemporaryTokenList.constructor.prototype; - if (!('add' in TemporaryPrototype)) { - // ASHA double fails in here - TemporaryPrototype = window.TemporaryTokenList.prototype; - } - wrapVerifyToken = function (original) { - return function () { - var i = 0; - while (i < arguments.length) { - original.call(this, arguments[i++]); - } - }; - }; - TemporaryPrototype.add = wrapVerifyToken(TemporaryPrototype.add); - TemporaryPrototype.remove = wrapVerifyToken(TemporaryPrototype.remove); - // toggle is broken too ^_^ ... let's fix it - TemporaryPrototype.toggle = toggle; + /* + * Copyright 2015 Palantir Technologies, Inc. All rights reserved. + * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy + * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE + * and https://github.com/palantir/blueprint/blob/master/PATENTS + */ + "use strict"; + var position_1 = __webpack_require__(59); + var DEFAULT_CONSTRAINTS = { + attachment: "together", + to: "scrollParent", + }; + /** @internal */ + function createTetherOptions(element, target, position, useSmartPositioning, constraints) { + if (constraints == null && useSmartPositioning) { + constraints = [DEFAULT_CONSTRAINTS]; } - } - - if (!('contains' in NodePrototype)) { - defineProperty(NodePrototype, 'contains', { - value: function (el) { - while (el && el !== this) el = el.parentNode; - return this === el; - } - }); - } + var options = { + attachment: getPopoverAttachment(position), + classPrefix: "pt-tether", + constraints: constraints, + element: element, + target: target, + targetAttachment: getTargetAttachment(position), + }; + return options; + } + exports.createTetherOptions = createTetherOptions; + /** @internal */ + function getTargetAttachment(position) { + var attachments = (_a = {}, + _a[position_1.Position.TOP_LEFT] = "top left", + _a[position_1.Position.TOP] = "top center", + _a[position_1.Position.TOP_RIGHT] = "top right", + _a[position_1.Position.RIGHT_TOP] = "top right", + _a[position_1.Position.RIGHT] = "middle right", + _a[position_1.Position.RIGHT_BOTTOM] = "bottom right", + _a[position_1.Position.BOTTOM_RIGHT] = "bottom right", + _a[position_1.Position.BOTTOM] = "bottom center", + _a[position_1.Position.BOTTOM_LEFT] = "bottom left", + _a[position_1.Position.LEFT_BOTTOM] = "bottom left", + _a[position_1.Position.LEFT] = "middle left", + _a[position_1.Position.LEFT_TOP] = "top left", + _a + ); + return attachments[position]; + var _a; + } + exports.getTargetAttachment = getTargetAttachment; + /** @internal */ + function getPopoverAttachment(position) { + var attachments = (_a = {}, + _a[position_1.Position.TOP_LEFT] = "bottom left", + _a[position_1.Position.TOP] = "bottom center", + _a[position_1.Position.TOP_RIGHT] = "bottom right", + _a[position_1.Position.RIGHT_TOP] = "top left", + _a[position_1.Position.RIGHT] = "middle left", + _a[position_1.Position.RIGHT_BOTTOM] = "bottom left", + _a[position_1.Position.BOTTOM_RIGHT] = "top right", + _a[position_1.Position.BOTTOM] = "top center", + _a[position_1.Position.BOTTOM_LEFT] = "top left", + _a[position_1.Position.LEFT_BOTTOM] = "bottom right", + _a[position_1.Position.LEFT] = "middle right", + _a[position_1.Position.LEFT_TOP] = "top right", + _a + ); + return attachments[position]; + var _a; + } + exports.getPopoverAttachment = getPopoverAttachment; + /** @internal */ + function getAttachmentClasses(position) { + // this essentially reimplements the Tether logic for attachment classes so the same styles + // can be reused outside of Tether-based popovers. + return expandAttachmentClasses(getPopoverAttachment(position), "pt-tether-element-attached").concat(expandAttachmentClasses(getTargetAttachment(position), "pt-tether-target-attached")); + } + exports.getAttachmentClasses = getAttachmentClasses; + function expandAttachmentClasses(attachments, prefix) { + var _a = attachments.split(" "), verticalAlign = _a[0], horizontalAlign = _a[1]; + return [(prefix + "-" + verticalAlign), (prefix + "-" + horizontalAlign)]; + } - if (!('head' in document)) { - defineProperty(document, 'head', { - get: function () { - return head || ( - head = document.getElementsByTagName('head')[0] - ); - } - }); - } + //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24vdGV0aGVyVXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7O0dBS0c7O0FBSUgseUJBQXlCLFlBQVksQ0FBQyxDQUFBO0FBRXRDLElBQU0sbUJBQW1CLEdBQUc7SUFDeEIsVUFBVSxFQUFFLFVBQVU7SUFDdEIsRUFBRSxFQUFFLGNBQWM7Q0FDckIsQ0FBQztBQVVGLGdCQUFnQjtBQUNoQiw2QkFBb0MsT0FBZ0IsRUFDaEIsTUFBWSxFQUNaLFFBQWtCLEVBQ2xCLG1CQUE0QixFQUM1QixXQUFnQztJQUNoRSxFQUFFLENBQUMsQ0FBQyxXQUFXLElBQUksSUFBSSxJQUFJLG1CQUFtQixDQUFDLENBQUMsQ0FBQztRQUM3QyxXQUFXLEdBQUcsQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDO0lBQ3hDLENBQUM7SUFFRCxJQUFNLE9BQU8sR0FBMEI7UUFDbkMsVUFBVSxFQUFFLG9CQUFvQixDQUFDLFFBQVEsQ0FBQztRQUMxQyxXQUFXLEVBQUUsV0FBVztRQUN4Qix3QkFBVztRQUNYLGdCQUFPO1FBQ1AsY0FBTTtRQUNOLGdCQUFnQixFQUFFLG1CQUFtQixDQUFDLFFBQVEsQ0FBQztLQUNsRCxDQUFDO0lBQ0YsTUFBTSxDQUFDLE9BQU8sQ0FBQztBQUNuQixDQUFDO0FBbEJlLDJCQUFtQixzQkFrQmxDLENBQUE7QUFFRCxnQkFBZ0I7QUFDaEIsNkJBQW9DLFFBQWtCO0lBQ2xELElBQU0sV0FBVyxHQUEwQjtRQUN2QyxHQUFDLG1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W50IHwgbnVtYmVyW107XG59XG5cbi8qKiBAaW50ZXJuYWwgKi9cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVUZXRoZXJPcHRpb25zKGVsZW1lbnQ6IEVsZW1lbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXQ6IE5vZGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogUG9zaXRpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1c2VTbWFydFBvc2l0aW9uaW5nOiBib29sZWFuLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHM6IElUZXRoZXJDb25zdHJhaW50W10pIHtcbiAgICBpZiAoY29uc3RyYWludHMgPT0gbnVsbCAmJiB1c2VTbWFydFBvc2l0aW9uaW5nKSB7XG4gICAgICAgIGNvbnN0cmFpbnRzID0gW0RFRkFVTFRfQ09OU1RSQUlOVFNdO1xuICAgIH1cblxuICAgIGNvbnN0IG9wdGlvbnM6IFRldGhlci5JVGV0aGVyT3B0aW9ucyA9IHtcbiAgICAgICAgYXR0YWNobWVudDogZ2V0UG9wb3ZlckF0dGFjaG1lbnQocG9zaXRpb24pLFxuICAgICAgICBjbGFzc1ByZWZpeDogXCJwdC10ZXRoZXJcIixcbiAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgIGVsZW1lbnQsXG4gICAgICAgIHRhcmdldCxcbiAgICAgICAgdGFyZ2V0QXR0YWNobWVudDogZ2V0VGFyZ2V0QXR0YWNobWVudChwb3NpdGlvbiksXG4gICAgfTtcbiAgICByZXR1cm4gb3B0aW9ucztcbn1cblxuLyoqIEBpbnRlcm5hbCAqL1xuZXhwb3J0IGZ1bmN0aW9uIGdldFRhcmdldEF0dGFjaG1lbnQocG9zaXRpb246IFBvc2l0aW9uKSB7XG4gICAgY29uc3QgYXR0YWNobWVudHM6IHtbcDogbnVtYmVyXTogc3RyaW5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BvcG92ZXJzLlxuICAgIHJldHVybiBbXG4gICAgICAgIC4uLmV4cGFuZEF0dGFjaG1lbnRDbGFzc2VzKGdldFBvcG92ZXJBdHRhY2htZW50KHBvc2l0aW9uKSwgXCJwdC10ZXRoZXItZWxlbWVudC1hdHRhY2hlZFwiKSxcbiAgICAgICAgLi4uZXhwYW5kQXR0YWNobWVudENsYXNzZXMoZ2V0VGFyZ2V0QXR0YWNobWVudChwb3NpdGlvbiksIFwicHQtdGV0aGVyLXRhcmdldC1hdHRhY2hlZFwiKSxcbiAgICBdO1xufVxuXG5mdW5jdGlvbiBleHBhbmRBdHRhY2htZW50Q2xhc3NlcyhhdHRhY2htZW50czogc3RyaW5nLCBwcmVmaXg6IHN0cmluZykge1xuICAgIGNvbnN0IFt2ZXJ0aWNhbEFsaWduLCBob3Jpem9udGFsQWxpZ25dID0gYXR0YWNobWVudHMuc3BsaXQoXCIgXCIpO1xuICAgIHJldHVybiBbYCR7cHJlZml4fS0ke3ZlcnRpY2FsQWxpZ259YCwgYCR7cHJlZml4fS0ke2hvcml6b250YWxBbGlnbn1gXTtcbn1cbiJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ== - // requestAnimationFrame partial polyfill - (function () { - for (var - raf, - rAF = window.requestAnimationFrame, - cAF = window.cancelAnimationFrame, - prefixes = ['o', 'ms', 'moz', 'webkit'], - i = prefixes.length; - !cAF && i--; - ) { - rAF = rAF || window[prefixes[i] + 'RequestAnimationFrame']; - cAF = window[prefixes[i] + 'CancelAnimationFrame'] || - window[prefixes[i] + 'CancelRequestAnimationFrame']; - } - if (!cAF) { - // some FF apparently implemented rAF but no cAF - if (rAF) { - raf = rAF; - rAF = function (callback) { - var goOn = true; - raf(function () { - if (goOn) callback.apply(this, arguments); - }); - return function () { - goOn = false; - }; - }; - cAF = function (id) { - id(); - }; - } else { - rAF = function (callback) { - return setTimeout(callback, 15, 15); - }; - cAF = function (id) { - clearTimeout(id); - }; - } - } - window.requestAnimationFrame = rAF; - window.cancelAnimationFrame = cAF; - }()); - // http://www.w3.org/TR/dom/#customevent - try{new window.CustomEvent('?');}catch(o_O){ - window.CustomEvent = function( - eventName, - defaultInitDict - ){ +/***/ }, +/* 63 */ +/***/ function(module, exports, __webpack_require__) { - // the infamous substitute - function CustomEvent(type, eventInitDict) { - /*jshint eqnull:true */ - var event = document.createEvent(eventName); - if (typeof type != 'string') { - throw new Error('An event name must be provided'); - } - if (eventName == 'Event') { - event.initCustomEvent = initCustomEvent; - } - if (eventInitDict == null) { - eventInitDict = defaultInitDict; - } - event.initCustomEvent( - type, - eventInitDict.bubbles, - eventInitDict.cancelable, - eventInitDict.detail - ); - return event; - } + /* + * Copyright 2015 Palantir Technologies, Inc. All rights reserved. + * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy + * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE + * and https://github.com/palantir/blueprint/blob/master/PATENTS + */ + "use strict"; + var intent_1 = __webpack_require__(58); + // modifiers + exports.DARK = "pt-dark"; + exports.ACTIVE = "pt-active"; + exports.MINIMAL = "pt-minimal"; + exports.DISABLED = "pt-disabled"; + exports.SMALL = "pt-small"; + exports.LARGE = "pt-large"; + exports.INTERACTIVE = "pt-interactive"; + exports.ALIGN_LEFT = "pt-align-left"; + exports.ALIGN_RIGHT = "pt-align-right"; + exports.INLINE = "pt-inline"; + exports.FILL = "pt-fill"; + // components + exports.ALERT = "pt-alert"; + exports.ALERT_BODY = "pt-alert-body"; + exports.ALERT_CONTENTS = "pt-alert-contents"; + exports.ALERT_FOOTER = "pt-alert-footer"; + exports.BREADCRUMB = "pt-breadcrumb"; + exports.BREADCRUMB_CURRENT = "pt-breadcrumb-current"; + exports.BREADCRUMBS = "pt-breadcrumbs"; + exports.BREADCRUMBS_COLLAPSED = "pt-breadcrumbs-collapsed"; + exports.BUTTON = "pt-button"; + exports.BUTTON_GROUP = "pt-button-group"; + exports.CARD = "pt-card"; + exports.COLLAPSE = "pt-collapse"; + exports.COLLAPSIBLE_LIST = "pt-collapse-list"; + exports.CONTEXT_MENU = "pt-context-menu"; + exports.CONTEXT_MENU_POPOVER_TARGET = "pt-context-menu-popover-target"; + exports.DIALOG = "pt-dialog"; + exports.DIALOG_BODY = "pt-dialog-body"; + exports.DIALOG_CLOSE_BUTTON = "pt-dialog-close-button"; + exports.DIALOG_FOOTER = "pt-dialog-footer"; + exports.DIALOG_FOOTER_ACTIONS = "pt-dialog-footer-actions"; + exports.DIALOG_HEADER = "pt-dialog-header"; + exports.EDITABLE_TEXT = "pt-editable-text"; + exports.ELEVATION_0 = "pt-elevation-0"; + exports.ELEVATION_1 = "pt-elevation-1"; + exports.ELEVATION_2 = "pt-elevation-2"; + exports.ELEVATION_3 = "pt-elevation-3"; + exports.ELEVATION_4 = "pt-elevation-4"; + exports.INPUT = "pt-input"; + exports.INPUT_GROUP = "pt-input-group"; + exports.LABEL = "pt-label"; + exports.MENU = "pt-menu"; + exports.MENU_ITEM = "pt-menu-item"; + exports.MENU_SUBMENU = "pt-submenu"; + exports.MENU_DIVIDER = "pt-menu-divider"; + exports.MENU_HEADER = "pt-menu-header"; + exports.NON_IDEAL_STATE = "pt-non-ideal-state"; + exports.NON_IDEAL_STATE_ACTION = "pt-non-ideal-state-action"; + exports.NON_IDEAL_STATE_DESCRIPTION = "pt-non-ideal-state-description"; + exports.NON_IDEAL_STATE_ICON = "pt-non-ideal-state-icon"; + exports.NON_IDEAL_STATE_TITLE = "pt-non-ideal-state-title"; + exports.NON_IDEAL_STATE_VISUAL = "pt-non-ideal-state-visual"; + exports.OVERLAY = "pt-overlay"; + exports.OVERLAY_BACKDROP = "pt-overlay-backdrop"; + exports.OVERLAY_CONTENT = "pt-overlay-content"; + exports.OVERLAY_INLINE = "pt-overlay-inline"; + exports.OVERLAY_OPEN = "pt-overlay-open"; + exports.OVERLAY_SCROLL_CONTAINER = "pt-overlay-scroll-container"; + exports.POPOVER = "pt-popover"; + exports.POPOVER_ARROW = "pt-popover-arrow"; + exports.POPOVER_BACKDROP = "pt-popover-backdrop"; + exports.POPOVER_CONTENT = "pt-popover-content"; + exports.POPOVER_DISMISS = "pt-popover-dismiss"; + exports.POPOVER_DISMISS_OVERRIDE = "pt-popover-dismiss-override"; + exports.POPOVER_OPEN = "pt-popover-open"; + exports.POPOVER_TARGET = "pt-popover-target"; + exports.TRANSITION_CONTAINER = "pt-transition-container"; + exports.PORTAL = "pt-portal"; + exports.SELECT = "pt-select"; + exports.SLIDER = "pt-slider"; + exports.SLIDER_HANDLE = exports.SLIDER + "-handle"; + exports.SLIDER_LABEL = exports.SLIDER + "-label"; + exports.RANGE_SLIDER = "pt-range-slider"; + exports.SPINNER = "pt-spinner"; + exports.SVG_SPINNER = "pt-svg-spinner"; + exports.TAB = "pt-tab"; + exports.TAB_LIST = "pt-tab-list"; + exports.TAB_PANEL = "pt-tab-panel"; + exports.TABS = "pt-tabs"; + exports.TAG = "pt-tag"; + exports.TAG_REMOVABLE = "pt-tag-removable"; + exports.TAG_REMOVE = "pt-tag-remove"; + exports.TOAST = "pt-toast"; + exports.TOAST_CONTAINER = "pt-toast-container"; + exports.TOAST_MESSAGE = "pt-toast-message"; + exports.TOOLTIP = "pt-tooltip"; + exports.TREE = "pt-tree"; + exports.TREE_NODE = "pt-tree-node"; + exports.TREE_NODE_CARET = "pt-tree-node-caret"; + exports.TREE_NODE_CARET_CLOSED = "pt-tree-node-caret-closed"; + exports.TREE_NODE_CARET_NONE = "pt-tree-node-caret-none"; + exports.TREE_NODE_CARET_OPEN = "pt-tree-node-caret-open"; + exports.TREE_NODE_CONTENT = "pt-tree-node-content"; + exports.TREE_NODE_EXPANDED = "pt-tree-node-expanded"; + exports.TREE_NODE_ICON = "pt-tree-node-icon"; + exports.TREE_NODE_LABEL = "pt-tree-node-label"; + exports.TREE_NODE_LIST = "pt-tree-node-list"; + exports.TREE_NODE_SECONDARY_LABEL = "pt-tree-node-secondary-label"; + exports.TREE_NODE_SELECTED = "pt-tree-node-selected"; + exports.TREE_ROOT = "pt-tree-root"; + exports.ICON_STANDARD = "pt-icon-standard"; + exports.ICON_LARGE = "pt-icon-large"; + /** Return CSS class for icon, whether or not 'pt-icon-' prefix is included */ + function iconClass(iconName) { + if (iconName == null) { + return undefined; + } + return iconName.indexOf("pt-icon-") === 0 ? iconName : "pt-icon-" + iconName; + } + exports.iconClass = iconClass; + function intentClass(intent) { + if (intent === void 0) { intent = intent_1.Intent.NONE; } + if (intent === intent_1.Intent.NONE || intent_1.Intent[intent] == null) { + return undefined; + } + return "pt-intent-" + intent_1.Intent[intent].toLowerCase(); + } + exports.intentClass = intentClass; - // attached at runtime - function initCustomEvent( - type, bubbles, cancelable, detail - ) { - /*jshint validthis:true*/ - this.initEvent(type, bubbles, cancelable); - this.detail = detail; - } + //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24vY2xhc3Nlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7R0FLRzs7QUFFSCx1QkFBdUIsVUFBVSxDQUFDLENBQUE7QUFFbEMsWUFBWTtBQUNDLFlBQUksR0FBRyxTQUFTLENBQUM7QUFDakIsY0FBTSxHQUFHLFdBQVcsQ0FBQztBQUNyQixlQUFPLEdBQUcsWUFBWSxDQUFDO0FBQ3ZCLGdCQUFRLEdBQUcsYUFBYSxDQUFDO0FBQ3pCLGFBQUssR0FBRyxVQUFVLENBQUM7QUFDbkIsYUFBSyxHQUFHLFVBQVUsQ0FBQztBQUNuQixtQkFBVyxHQUFHLGdCQUFnQixDQUFDO0FBQy9CLGtCQUFVLEdBQUcsZUFBZSxDQUFDO0FBQzdCLG1CQUFXLEdBQUcsZ0JBQWdCLENBQUM7QUFDL0IsY0FBTSxHQUFHLFdBQVcsQ0FBQztBQUNyQixZQUFJLEdBQUcsU0FBUyxDQUFDO0FBRTlCLGFBQWE7QUFDQSxhQUFLLEdBQUcsVUFBVSxDQUFDO0FBQ25CLGtCQUFVLEdBQU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ZSA9PSBudWxsKSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgfVxuICAgIHJldHVybiBpY29uTmFtZS5pbmRleE9mKFwicHQtaWNvbi1cIikgPT09IDAgPyBpY29uTmFtZSA6IGBwdC1pY29uLSR7aWNvbk5hbWV9YDtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGludGVudENsYXNzKGludGVudCA9IEludGVudC5OT05FKSB7XG4gICAgaWYgKGludGVudCA9PT0gSW50ZW50Lk5PTkUgfHwgSW50ZW50W2ludGVudF0gPT0gbnVsbCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgIH1cbiAgICByZXR1cm4gYHB0LWludGVudC0ke0ludGVudFtpbnRlbnRdLnRvTG93ZXJDYXNlKCl9YDtcbn1cbiJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ== - // that's it - return CustomEvent; - }( - // is this IE9 or IE10 ? - // where CustomEvent is there - // but not usable as construtor ? - window.CustomEvent ? - // use the CustomEvent interface in such case - 'CustomEvent' : 'Event', - // otherwise the common compatible one - { - bubbles: false, - cancelable: false, - detail: null - } - ); - } - // window.Event as constructor - try { new Event('_'); } catch (o_O) { - /* jshint -W022 */ - o_O = (function ($Event) { - function Event(type, init) { - enoughArguments(arguments.length, 'Event'); - var out = document.createEvent('Event'); - if (!init) init = {}; - out.initEvent( - type, - !!init.bubbles, - !!init.cancelable - ); - return out; - } - Event.prototype = $Event.prototype; - return Event; - }(window.Event || function Event() {})); - defineProperty(window, 'Event', {value: o_O}); - // Android 4 gotcha - if (Event !== o_O) Event = o_O; - } +/***/ }, +/* 64 */ +/***/ function(module, exports) { - // window.KeyboardEvent as constructor - try { new KeyboardEvent('_', {}); } catch (o_O) { - /* jshint -W022 */ - o_O = (function ($KeyboardEvent) { - // code inspired by https://gist.github.com/termi/4654819 - var - initType = 0, - defaults = { - char: '', - key: '', - location: 0, - ctrlKey: false, - shiftKey: false, - altKey: false, - metaKey: false, - altGraphKey: false, - repeat: false, - locale: navigator.language, - detail: 0, - bubbles: false, - cancelable: false, - keyCode: 0, - charCode: 0, - which: 0 - }, - eventType - ; - try { - var e = document.createEvent('KeyboardEvent'); - e.initKeyboardEvent( - 'keyup', false, false, window, '+', 3, - true, false, true, false, false - ); - initType = ( - (e.keyIdentifier || e.key) == '+' && - (e.keyLocation || e.location) == 3 - ) && ( - e.ctrlKey ? e.altKey ? 1 : 3 : e.shiftKey ? 2 : 4 - ) || 9; - } catch(o_O) {} - eventType = 0 < initType ? 'KeyboardEvent' : 'Event'; + /* + * Copyright 2015 Palantir Technologies, Inc. All rights reserved. + * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy + * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE + * and https://github.com/palantir/blueprint/blob/master/PATENTS + */ + "use strict"; + exports.ARROW_DOWN = 40; + exports.ARROW_LEFT = 37; + exports.ARROW_RIGHT = 39; + exports.ARROW_UP = 38; + exports.ENTER = 13; + exports.ESCAPE = 27; + exports.SPACE = 32; - function getModifier(init) { - for (var - out = [], - keys = [ - 'ctrlKey', - 'Control', - 'shiftKey', - 'Shift', - 'altKey', - 'Alt', - 'metaKey', - 'Meta', - 'altGraphKey', - 'AltGraph' - ], - i = 0; i < keys.length; i += 2 - ) { - if (init[keys[i]]) - out.push(keys[i + 1]); - } - return out.join(' '); - } - - function withDefaults(target, source) { - for (var key in source) { - if ( - source.hasOwnProperty(key) && - !source.hasOwnProperty.call(target, key) - ) target[key] = source[key]; - } - return target; - } + //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21tb24va2V5cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7R0FLRzs7QUFFVSxrQkFBVSxHQUFHLEVBQUUsQ0FBQztBQUNoQixrQkFBVSxHQUFHLEVBQUUsQ0FBQztBQUNoQixtQkFBVyxHQUFHLEVBQUUsQ0FBQztBQUNqQixnQkFBUSxHQUFHLEVBQUUsQ0FBQztBQUNkLGFBQUssR0FBRyxFQUFFLENBQUM7QUFDWCxjQUFNLEdBQUcsRUFBRSxDQUFDO0FBQ1osYUFBSyxHQUFHLEVBQUUsQ0FBQyIsImZpbGUiOiJjb21tb24va2V5cy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBDb3B5cmlnaHQgMjAxNSBQYWxhbnRpciBUZWNobm9sb2dpZXMsIEluYy4gQWxsIHJpZ2h0cyByZXNlcnZlZC5cbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBCU0QtMyBMaWNlbnNlIGFzIG1vZGlmaWVkICh0aGUg4oCcTGljZW5zZeKAnSk7IHlvdSBtYXkgb2J0YWluIGEgY29weVxuICogb2YgdGhlIGxpY2Vuc2UgYXQgaHR0cHM6Ly9naXRodWIuY29tL3BhbGFudGlyL2JsdWVwcmludC9ibG9iL21hc3Rlci9MSUNFTlNFXG4gKiBhbmQgaHR0cHM6Ly9naXRodWIuY29tL3BhbGFudGlyL2JsdWVwcmludC9ibG9iL21hc3Rlci9QQVRFTlRTXG4gKi9cblxuZXhwb3J0IGNvbnN0IEFSUk9XX0RPV04gPSA0MDtcbmV4cG9ydCBjb25zdCBBUlJPV19MRUZUID0gMzc7XG5leHBvcnQgY29uc3QgQVJST1dfUklHSFQgPSAzOTtcbmV4cG9ydCBjb25zdCBBUlJPV19VUCA9IDM4O1xuZXhwb3J0IGNvbnN0IEVOVEVSID0gMTM7XG5leHBvcnQgY29uc3QgRVNDQVBFID0gMjc7XG5leHBvcnQgY29uc3QgU1BBQ0UgPSAzMjtcbiJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ== - function withInitValues(key, out, init) { - try { - out[key] = init[key]; - } catch(o_O) {} - } - function KeyboardEvent(type, init) { - enoughArguments(arguments.length, 'KeyboardEvent'); - init = withDefaults(init || {}, defaults); - var - out = document.createEvent(eventType), - ctrlKey = init.ctrlKey, - shiftKey = init.shiftKey, - altKey = init.altKey, - metaKey = init.metaKey, - altGraphKey = init.altGraphKey, - modifiers = initType > 3 ? getModifier(init) : null, - key = String(init.key), - chr = String(init.char), - location = init.location, - keyCode = init.keyCode || ( - (init.keyCode = key) && - key.charCodeAt(0) - ) || 0, - charCode = init.charCode || ( - (init.charCode = chr) && - chr.charCodeAt(0) - ) || 0, - bubbles = init.bubbles, - cancelable = init.cancelable, - repeat = init.repeat, - locale = init.locale, - view = init.view || window, - args - ; - if (!init.which) init.which = init.keyCode; - if ('initKeyEvent' in out) { - out.initKeyEvent( - type, bubbles, cancelable, view, - ctrlKey, altKey, shiftKey, metaKey, keyCode, charCode - ); - } else if (0 < initType && 'initKeyboardEvent' in out) { - args = [type, bubbles, cancelable, view]; - switch (initType) { - case 1: - args.push(key, location, ctrlKey, shiftKey, altKey, metaKey, altGraphKey); - break; - case 2: - args.push(ctrlKey, altKey, shiftKey, metaKey, keyCode, charCode); - break; - case 3: - args.push(key, location, ctrlKey, altKey, shiftKey, metaKey, altGraphKey); - break; - case 4: - args.push(key, location, modifiers, repeat, locale); - break; - default: - args.push(char, key, location, modifiers, repeat, locale); - } - out.initKeyboardEvent.apply(out, args); - } else { - out.initEvent(type, bubbles, cancelable); - } - for (key in out) { - if (defaults.hasOwnProperty(key) && out[key] !== init[key]) { - withInitValues(key, out, init); - } - } - return out; - } - KeyboardEvent.prototype = $KeyboardEvent.prototype; - return KeyboardEvent; - }(window.KeyboardEvent || function KeyboardEvent() {})); - defineProperty(window, 'KeyboardEvent', {value: o_O}); - // Android 4 gotcha - if (KeyboardEvent !== o_O) KeyboardEvent = o_O; - } +/***/ }, +/* 65 */ +/***/ function(module, exports, __webpack_require__) { - // window.MouseEvent as constructor - try { new MouseEvent('_', {}); } catch (o_O) { - /* jshint -W022 */ - o_O = (function ($MouseEvent) { - function MouseEvent(type, init) { - enoughArguments(arguments.length, 'MouseEvent'); - var out = document.createEvent('MouseEvent'); - if (!init) init = {}; - out.initMouseEvent( - type, - !!init.bubbles, - !!init.cancelable, - init.view || window, - init.detail || 1, - init.screenX || 0, - init.screenY || 0, - init.clientX || 0, - init.clientY || 0, - !!init.ctrlKey, - !!init.altKey, - !!init.shiftKey, - !!init.metaKey, - init.button || 0, - init.relatedTarget || null - ); - return out; - } - MouseEvent.prototype = $MouseEvent.prototype; - return MouseEvent; - }(window.MouseEvent || function MouseEvent() {})); - defineProperty(window, 'MouseEvent', {value: o_O}); - // Android 4 gotcha - if (MouseEvent !== o_O) MouseEvent = o_O; - } + /* + * Copyright 2016 Palantir Technologies, Inc. All rights reserved. + * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy + * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE + * and https://github.com/palantir/blueprint/blob/master/PATENTS + */ + "use strict"; + function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; + } + __webpack_require__(66); + var contextMenu = __webpack_require__(67); + exports.ContextMenu = contextMenu; + __export(__webpack_require__(214)); + __export(__webpack_require__(217)); + __export(__webpack_require__(215)); + __export(__webpack_require__(218)); + __export(__webpack_require__(219)); + __export(__webpack_require__(222)); + __export(__webpack_require__(216)); + __export(__webpack_require__(223)); + __export(__webpack_require__(224)); + __export(__webpack_require__(225)); + __export(__webpack_require__(226)); + __export(__webpack_require__(227)); + __export(__webpack_require__(220)); + __export(__webpack_require__(234)); + __export(__webpack_require__(221)); + __export(__webpack_require__(235)); + __export(__webpack_require__(203)); + __export(__webpack_require__(198)); + __export(__webpack_require__(236)); + __export(__webpack_require__(211)); + __export(__webpack_require__(237)); + __export(__webpack_require__(238)); + __export(__webpack_require__(239)); + __export(__webpack_require__(242)); + __export(__webpack_require__(243)); + __export(__webpack_require__(244)); + __export(__webpack_require__(245)); + __export(__webpack_require__(246)); + __export(__webpack_require__(247)); + __export(__webpack_require__(248)); + __export(__webpack_require__(249)); + __export(__webpack_require__(250)); + __export(__webpack_require__(251)); + __export(__webpack_require__(212)); + __export(__webpack_require__(252)); + __export(__webpack_require__(253)); - }(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Map = global.WeakMap || (function () { - var - counter = 0, - dispatched = false, - drop = false, - value - ; +/***/ }, +/* 66 */ +/***/ function(module, exports) { - function dispatch(key, ce, shouldDrop) { - drop = shouldDrop; - dispatched = false; - value = undefined; - key.dispatchEvent(ce); - } + /*! + Copyright (C) 2013-2015 by Andrea Giammarchi - @WebReflection - function Handler(value) { - this.value = value; - } + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: - Handler.prototype.handleEvent = function handleEvent(e) { - dispatched = true; - if (drop) { - e.currentTarget.removeEventListener(e.type, this, false); - } else { - value = this.value; - } - }; + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. - function DOMMap() { - counter++; // make id clashing highly improbable - this.__ce__ = new Event(('@DOMMap:' + counter) + Math.random()); - } + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. - DOMMap.prototype = { - 'constructor': DOMMap, - 'delete': function del(key) { - return dispatch(key, this.__ce__, true), dispatched; - }, - 'get': function get(key) { - dispatch(key, this.__ce__, false); - var v = value; - value = undefined; - return v; - }, - 'has': function has(key) { - return dispatch(key, this.__ce__, false), dispatched; - }, - 'set': function set(key, value) { - dispatch(key, this.__ce__, true); - key.addEventListener(this.__ce__.type, new Handler(value), false); - return this; - }, - }; + */ + (function(window){'use strict'; + /* jshint loopfunc: true, noempty: false*/ + // http://www.w3.org/TR/dom/#element - return DOMMap; + function createDocumentFragment() { + return document.createDocumentFragment(); + } - }()); + function createElement(nodeName) { + return document.createElement(nodeName); + } - function Dict() {} - Dict.prototype = (Object.create || Object)(null); + function enoughArguments(length, name) { + if (!length) throw new Error( + 'Failed to construct ' + + name + + ': 1 argument required, but only 0 present.' + ); + } - // https://dom.spec.whatwg.org/#interface-eventtarget - - function createEventListener(type, callback, options) { - function eventListener(e) { - if (eventListener.once) { - e.currentTarget.removeEventListener( - e.type, - callback, - eventListener - ); - eventListener.removed = true; - } - if (eventListener.passive) { - e.preventDefault = createEventListener.preventDefault; - } - if (typeof eventListener.callback === 'function') { - /* jshint validthis: true */ - eventListener.callback.call(this, e); - } else if (eventListener.callback) { - eventListener.callback.handleEvent(e); - } - if (eventListener.passive) { - delete e.preventDefault; - } + function mutationMacro(nodes) { + if (nodes.length === 1) { + return textNodeIfString(nodes[0]); } - eventListener.type = type; - eventListener.callback = callback; - eventListener.capture = !!options.capture; - eventListener.passive = !!options.passive; - eventListener.once = !!options.once; - // currently pointless but specs say to use it, so ... - eventListener.removed = false; - return eventListener; + for (var + fragment = createDocumentFragment(), + list = slice.call(nodes), + i = 0; i < nodes.length; i++ + ) { + fragment.appendChild(textNodeIfString(list[i])); + } + return fragment; } - createEventListener.preventDefault = function preventDefault() {}; + function textNodeIfString(node) { + return typeof node === 'string' ? document.createTextNode(node) : node; + } - var - Event = global.CustomEvent, + for(var + head, + property, + TemporaryPrototype, + TemporaryTokenList, + wrapVerifyToken, + document = window.document, hOP = Object.prototype.hasOwnProperty, - dE = global.dispatchEvent, - aEL = global.addEventListener, - rEL = global.removeEventListener, - counter = 0, - increment = function () { counter++; }, + defineProperty = Object.defineProperty || function (object, property, descriptor) { + if (hOP.call(descriptor, 'value')) { + object[property] = descriptor.value; + } else { + if (hOP.call(descriptor, 'get')) + object.__defineGetter__(property, descriptor.get); + if (hOP.call(descriptor, 'set')) + object.__defineSetter__(property, descriptor.set); + } + return object; + }, indexOf = [].indexOf || function indexOf(value){ var length = this.length; while(length--) { @@ -5756,817 +5175,1018 @@ } return length; }, - getListenerKey = function (options) { - return ''.concat( - options.capture ? '1' : '0', - options.passive ? '1' : '0', - options.once ? '1' : '0' - ); + // http://www.w3.org/TR/domcore/#domtokenlist + verifyToken = function (token) { + if (!token) { + throw 'SyntaxError'; + } else if (spaces.test(token)) { + throw 'InvalidCharacterError'; + } + return token; }, - augment, proto - ; - - try { - aEL('_', increment, {once: true}); - dE(new Event('_')); - dE(new Event('_')); - rEL('_', increment, {once: true}); - } catch(o_O) {} - - if (counter !== 1) { - (function () { - var dm = new DOMMap(); - function createAEL(aEL) { - return function addEventListener(type, handler, options) { - if (options && typeof options !== 'boolean') { - var - info = dm.get(this), - key = getListenerKey(options), - i, tmp, wrap - ; - if (!info) dm.set(this, (info = new Dict())); - if (!(type in info)) info[type] = { - handler: [], - wrap: [] - }; - tmp = info[type]; - i = indexOf.call(tmp.handler, handler); - if (i < 0) { - i = tmp.handler.push(handler) - 1; - tmp.wrap[i] = (wrap = new Dict()); - } else { - wrap = tmp.wrap[i]; - } - if (!(key in wrap)) { - wrap[key] = createEventListener(type, handler, options); - aEL.call(this, type, wrap[key], wrap[key].capture); - } - } else { - aEL.call(this, type, handler, options); - } - }; + DOMTokenList = function (node) { + var + noClassName = typeof node.className === 'undefined', + className = noClassName ? + (node.getAttribute('class') || '') : node.className, + isSVG = noClassName || typeof className === 'object', + value = (isSVG ? + (noClassName ? className : className.baseVal) : + className + ).replace(trim, '') + ; + if (value.length) { + properties.push.apply( + this, + value.split(spaces) + ); } - function createREL(rEL) { - return function removeEventListener(type, handler, options) { - if (options && typeof options !== 'boolean') { - var - info = dm.get(this), - key, i, tmp, wrap - ; - if (info && (type in info)) { - tmp = info[type]; - i = indexOf.call(tmp.handler, handler); - if (-1 < i) { - key = getListenerKey(options); - wrap = tmp.wrap[i]; - if (key in wrap) { - rEL.call(this, type, wrap[key], wrap[key].capture); - delete wrap[key]; - // return if there are other wraps - for (key in wrap) return; - // otherwise remove all the things - tmp.handler.splice(i, 1); - tmp.wrap.splice(i, 1); - // if there are no other handlers - if (tmp.handler.length === 0) - // drop the info[type] entirely - delete info[type]; - } - } - } - } else { - rEL.call(this, type, handler, options); - } - }; + this._isSVG = isSVG; + this._ = node; + }, + classListDescriptor = { + get: function get() { + return new DOMTokenList(this); + }, + set: function(){} + }, + uid = 'dom4-tmp-'.concat(Math.random() * +new Date()).replace('.','-'), + trim = /^\s+|\s+$/g, + spaces = /\s+/, + SPACE = '\x20', + CLASS_LIST = 'classList', + toggle = function toggle(token, force) { + if (this.contains(token)) { + if (!force) { + // force is not true (either false or omitted) + this.remove(token); + } + } else if(force === undefined || force) { + force = true; + this.add(token); } - - augment = function (Constructor) { - if (!Constructor) return; - var proto = Constructor.prototype; - proto.addEventListener = createAEL(proto.addEventListener); - proto.removeEventListener = createREL(proto.removeEventListener); + return !!force; + }, + DocumentFragmentPrototype = window.DocumentFragment && DocumentFragment.prototype, + Node = window.Node, + NodePrototype = (Node || Element).prototype, + CharacterData = window.CharacterData || Node, + CharacterDataPrototype = CharacterData && CharacterData.prototype, + DocumentType = window.DocumentType, + DocumentTypePrototype = DocumentType && DocumentType.prototype, + ElementPrototype = (window.Element || Node || window.HTMLElement).prototype, + HTMLSelectElement = window.HTMLSelectElement || createElement('select').constructor, + selectRemove = HTMLSelectElement.prototype.remove, + ShadowRoot = window.ShadowRoot, + SVGElement = window.SVGElement, + // normalizes multiple ids as CSS query + idSpaceFinder = / /g, + idSpaceReplacer = '\\ ', + createQueryMethod = function (methodName) { + var createArray = methodName === 'querySelectorAll'; + return function (css) { + var a, i, id, query, nl, selectors, node = this.parentNode; + if (node) { + for ( + id = this.getAttribute('id') || uid, + query = id === uid ? id : id.replace(idSpaceFinder, idSpaceReplacer), + selectors = css.split(','), + i = 0; i < selectors.length; i++ + ) { + selectors[i] = '#' + query + ' ' + selectors[i]; + } + css = selectors.join(','); + } + if (id === uid) this.setAttribute('id', id); + nl = (node || this)[methodName](css); + if (id === uid) this.removeAttribute('id'); + // return a list + if (createArray) { + i = nl.length; + a = new Array(i); + while (i--) a[i] = nl[i]; + } + // return node or null + else { + a = nl; + } + return a; }; - - if (global.EventTarget) { - augment(EventTarget); - } else { - augment(global.Text); - augment(global.Element || global.HTMLElement); - augment(global.HTMLDocument); - augment(global.Window || {prototype:global}); - augment(global.XMLHttpRequest); + }, + addQueryAndAll = function (where) { + if (!('query' in where)) { + where.query = ElementPrototype.query; } - - }()); - } - - }(self)); - -/***/ }, -/* 61 */ -/***/ function(module, exports, __webpack_require__) { - - /* - * Copyright 2016 Palantir Technologies, Inc. All rights reserved. - * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy - * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE - * and https://github.com/palantir/blueprint/blob/master/PATENTS - */ - "use strict"; - var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - var React = __webpack_require__(20); - var ReactDOM = __webpack_require__(62); - var Classes = __webpack_require__(57); - var position_1 = __webpack_require__(53); - var utils_1 = __webpack_require__(55); - var popover_1 = __webpack_require__(208); - var CONSTRAINTS = [{ attachment: "together", pin: true, to: "window" }]; - var TRANSITION_DURATION = 100; - var ContextMenu = (function (_super) { - __extends(ContextMenu, _super); - function ContextMenu() { - var _this = this; - _super.apply(this, arguments); - this.state = { - isOpen: false, - }; - this.cancelContextMenu = function (e) { return e.preventDefault(); }; - this.handleBackdropContextMenu = function (e) { - // HACKHACK: React function to remove from the event pool (not sure why it's not in typings #66) - e.persist(); - e.preventDefault(); - // wait for backdrop to disappear so we can find the "real" element at event coordinates. - // timeout duration is equivalent to transition duration so we know it's animated out. - setTimeout(function () { - // retrigger context menu event at the element beneath the backdrop. - // if it has a `contextmenu` event handler then it'll be invoked. - // if it doesn't, no native menu will show (at least on OSX) :( - var newTarget = document.elementFromPoint(e.clientX, e.clientY); - newTarget.dispatchEvent(new MouseEvent("contextmenu", e)); - }, TRANSITION_DURATION); - }; - this.handlePopoverInteraction = function (nextOpenState) { - if (!nextOpenState) { - _this.hide(); - } - }; + if (!('queryAll' in where)) { + where.queryAll = ElementPrototype.queryAll; + } + }, + properties = [ + 'matches', ( + ElementPrototype.matchesSelector || + ElementPrototype.webkitMatchesSelector || + ElementPrototype.khtmlMatchesSelector || + ElementPrototype.mozMatchesSelector || + ElementPrototype.msMatchesSelector || + ElementPrototype.oMatchesSelector || + function matches(selector) { + var parentNode = this.parentNode; + return !!parentNode && -1 < indexOf.call( + parentNode.querySelectorAll(selector), + this + ); + } + ), + 'closest', function closest(selector) { + var parentNode = this, matches; + while ( + // document has no .matches + (matches = parentNode && parentNode.matches) && + !parentNode.matches(selector) + ) { + parentNode = parentNode.parentNode; + } + return matches ? parentNode : null; + }, + 'prepend', function prepend() { + var firstChild = this.firstChild, + node = mutationMacro(arguments); + if (firstChild) { + this.insertBefore(node, firstChild); + } else { + this.appendChild(node); + } + }, + 'append', function append() { + this.appendChild(mutationMacro(arguments)); + }, + 'before', function before() { + var parentNode = this.parentNode; + if (parentNode) { + parentNode.insertBefore( + mutationMacro(arguments), this + ); + } + }, + 'after', function after() { + var parentNode = this.parentNode, + nextSibling = this.nextSibling, + node = mutationMacro(arguments); + if (parentNode) { + if (nextSibling) { + parentNode.insertBefore(node, nextSibling); + } else { + parentNode.appendChild(node); + } + } + }, + // WARNING - DEPRECATED - use .replaceWith() instead + 'replace', function replace() { + this.replaceWith.apply(this, arguments); + }, + 'replaceWith', function replaceWith() { + var parentNode = this.parentNode; + if (parentNode) { + parentNode.replaceChild( + mutationMacro(arguments), + this + ); + } + }, + 'remove', function remove() { + var parentNode = this.parentNode; + if (parentNode) { + parentNode.removeChild(this); + } + }, + 'query', createQueryMethod('querySelector'), + 'queryAll', createQueryMethod('querySelectorAll') + ], + slice = properties.slice, + i = properties.length; i; i -= 2 + ) { + property = properties[i - 2]; + if (!(property in ElementPrototype)) { + ElementPrototype[property] = properties[i - 1]; } - ContextMenu.prototype.render = function () { - // prevent right-clicking in a context menu - var content = React.createElement("div", {onContextMenu: this.cancelContextMenu}, this.state.menu); - return (React.createElement(popover_1.Popover, {backdropProps: { onContextMenu: this.handleBackdropContextMenu }, constraints: CONSTRAINTS, content: content, enforceFocus: false, isModal: true, isOpen: this.state.isOpen, onInteraction: this.handlePopoverInteraction, position: position_1.Position.RIGHT_TOP, popoverClassName: Classes.MINIMAL, useSmartArrowPositioning: false, transitionDuration: TRANSITION_DURATION}, - React.createElement("div", {className: Classes.CONTEXT_MENU_POPOVER_TARGET, style: this.state.offset}) - )); - }; - ContextMenu.prototype.show = function (menu, offset, onClose) { - this.setState({ isOpen: true, menu: menu, offset: offset, onClose: onClose }); - }; - ContextMenu.prototype.hide = function () { - var onClose = this.state.onClose; - this.setState({ isOpen: false, onClose: null }); - utils_1.safeInvoke(onClose); - }; - return ContextMenu; - }(React.Component)); - var contextMenu; - /** - * Show the given menu element at the given offset from the top-left corner of the viewport. - * The menu will appear below-right of this point and will flip to below-left if there is not enough - * room onscreen. The optional callback will be invoked when this menu closes. - */ - function show(menu, offset, onClose) { - if (contextMenu == null) { - var contextMenuElement = document.createElement("div"); - contextMenuElement.classList.add(Classes.CONTEXT_MENU); - document.body.appendChild(contextMenuElement); - contextMenu = ReactDOM.render(React.createElement(ContextMenu, null), contextMenuElement); + if (property === 'remove') { + // see https://github.com/WebReflection/dom4/issues/19 + HTMLSelectElement.prototype[property] = function () { + return 0 < arguments.length ? + selectRemove.apply(this, arguments) : + ElementPrototype.remove.call(this); + }; } - contextMenu.show(menu, offset, onClose); - } - exports.show = show; - /** Hide the open context menu. */ - function hide() { - if (contextMenu != null) { - contextMenu.hide(); + // see https://github.com/WebReflection/dom4/issues/18 + if (/^(?:before|after|replace|replaceWith|remove)$/.test(property)) { + if (CharacterData && !(property in CharacterDataPrototype)) { + CharacterDataPrototype[property] = properties[i - 1]; + } + if (DocumentType && !(property in DocumentTypePrototype)) { + DocumentTypePrototype[property] = properties[i - 1]; + } } - } - exports.hide = hide; - /** Return whether a context menu is currently open. */ - function isOpen() { - return contextMenu != null && contextMenu.state.isOpen; - } - exports.isOpen = isOpen; + // see https://github.com/WebReflection/dom4/pull/26 + if (/^(?:append|prepend)$/.test(property)) { + if (DocumentFragmentPrototype) { + if (!(property in DocumentFragmentPrototype)) { + DocumentFragmentPrototype[property] = properties[i - 1]; + } + } else { + try { + createDocumentFragment().constructor.prototype[property] = properties[i - 1]; + } catch(o_O) {} + } + } + } - //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21wb25lbnRzL2NvbnRleHQtbWVudS9jb250ZXh0TWVudS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7O0dBS0c7Ozs7Ozs7QUFFSCxJQUFZLEtBQUssV0FBTSxPQUFPLENBQUMsQ0FBQTtBQUMvQixJQUFZLFFBQVEsV0FBTSxXQUFXLENBQUMsQ0FBQTtBQUV0QyxJQUFZLE9BQU8sV0FBTSxzQkFBc0IsQ0FBQyxDQUFBO0FBQ2hELHlCQUF5Qix1QkFBdUIsQ0FBQyxDQUFBO0FBQ2pELHNCQUEyQixvQkFBb0IsQ0FBQyxDQUFBO0FBQ2hELHdCQUF3QixvQkFBb0IsQ0FBQyxDQUFBO0FBYzdDLElBQU0sV0FBVyxHQUFHLENBQUUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLEdBQUcsRUFBRSxJQUFJLEVBQUUsRUFBRSxFQUFFLFFBQVEsRUFBRSxDQUFFLENBQUM7QUFDNUUsSUFBTSxtQkFBbUIsR0FBRyxHQUFHLENBQUM7QUFFaEM7SUFBMEIsK0JBQXNDO0lBQWhFO1FBQUEsaUJBMkRDO1FBM0R5Qiw4QkFBc0M7UUF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YXBwZW5kQ2hpbGQoY29udGV4dE1lbnVFbGVtZW50KTtcbiAgICAgICAgY29udGV4dE1lbnUgPSBSZWFjdERPTS5yZW5kZXIoPENvbnRleHRNZW51IC8+LCBjb250ZXh0TWVudUVsZW1lbnQpIGFzIENvbnRleHRNZW51O1xuICAgIH1cblxuICAgIGNvbnRleHRNZW51LnNob3cobWVudSwgb2Zmc2V0LCBvbkNsb3NlKTtcbn1cblxuLyoqIEhpZGUgdGhlIG9wZW4gY29udGV4dCBtZW51LiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGhpZGUoKSB7XG4gICAgaWYgKGNvbnRleHRNZW51ICE9IG51bGwpIHtcbiAgICAgICAgY29udGV4dE1lbnUuaGlkZSgpO1xuICAgIH1cbn1cblxuLyoqIFJldHVybiB3aGV0aGVyIGEgY29udGV4dCBtZW51IGlzIGN1cnJlbnRseSBvcGVuLiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGlzT3BlbigpIHtcbiAgICByZXR1cm4gY29udGV4dE1lbnUgIT0gbnVsbCAmJiBjb250ZXh0TWVudS5zdGF0ZS5pc09wZW47XG59XG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= + // bring query and queryAll to the document too + addQueryAndAll(document); + // brings query and queryAll to fragments as well + if (DocumentFragmentPrototype) { + addQueryAndAll(DocumentFragmentPrototype); + } else { + try { + addQueryAndAll(createDocumentFragment().constructor.prototype); + } catch(o_O) {} + } -/***/ }, -/* 62 */ -/***/ function(module, exports, __webpack_require__) { + // bring query and queryAll to the ShadowRoot too + if (ShadowRoot) { + addQueryAndAll(ShadowRoot.prototype); + } - 'use strict'; + // most likely an IE9 only issue + // see https://github.com/WebReflection/dom4/issues/6 + if (!createElement('a').matches('a')) { + ElementPrototype[property] = function(matches){ + return function (selector) { + return matches.call( + this.parentNode ? + this : + createDocumentFragment().appendChild(this), + selector + ); + }; + }(ElementPrototype[property]); + } - module.exports = __webpack_require__(63); - - -/***/ }, -/* 63 */ -/***/ function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - /* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/ - - 'use strict'; - - var ReactDOMComponentTree = __webpack_require__(64); - var ReactDefaultInjection = __webpack_require__(68); - var ReactMount = __webpack_require__(196); - var ReactReconciler = __webpack_require__(89); - var ReactUpdates = __webpack_require__(86); - var ReactVersion = __webpack_require__(201); - - var findDOMNode = __webpack_require__(202); - var getHostComponentFromComposite = __webpack_require__(203); - var renderSubtreeIntoContainer = __webpack_require__(204); - var warning = __webpack_require__(30); - - ReactDefaultInjection.inject(); - - var ReactDOM = { - findDOMNode: findDOMNode, - render: ReactMount.render, - unmountComponentAtNode: ReactMount.unmountComponentAtNode, - version: ReactVersion, - - /* eslint-disable camelcase */ - unstable_batchedUpdates: ReactUpdates.batchedUpdates, - unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer - }; - - // 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') { - __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ - ComponentTree: { - getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode, - getNodeFromInstance: function (inst) { - // inst is an internal instance (but could be a composite) - if (inst._renderedComponent) { - inst = getHostComponentFromComposite(inst); + // used to fix both old webkit and SVG + DOMTokenList.prototype = { + length: 0, + add: function add() { + for(var j = 0, token; j < arguments.length; j++) { + token = arguments[j]; + if(!this.contains(token)) { + properties.push.call(this, property); } - if (inst) { - return ReactDOMComponentTree.getNodeFromInstance(inst); - } else { - return null; + } + if (this._isSVG) { + this._.setAttribute('class', '' + this); + } else { + this._.className = '' + this; + } + }, + contains: (function(indexOf){ + return function contains(token) { + i = indexOf.call(this, property = verifyToken(token)); + return -1 < i; + }; + }([].indexOf || function (token) { + i = this.length; + while(i-- && this[i] !== token){} + return i; + })), + item: function item(i) { + return this[i] || null; + }, + remove: function remove() { + for(var j = 0, token; j < arguments.length; j++) { + token = arguments[j]; + if(this.contains(token)) { + properties.splice.call(this, i, 1); } } + if (this._isSVG) { + this._.setAttribute('class', '' + this); + } else { + this._.className = '' + this; + } }, - Mount: ReactMount, - Reconciler: ReactReconciler - }); - } + toggle: toggle, + toString: function toString() { + return properties.join.call(this, SPACE); + } + }; - if (process.env.NODE_ENV !== 'production') { - var ExecutionEnvironment = __webpack_require__(78); - if (ExecutionEnvironment.canUseDOM && window.top === window.self) { + if (SVGElement && !(CLASS_LIST in SVGElement.prototype)) { + defineProperty(SVGElement.prototype, CLASS_LIST, classListDescriptor); + } - // First check if devtools is not installed - if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { - // If we're in Chrome or Firefox, provide a download link if not installed. - if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) { - // Firefox does not have the issue with devtools loaded over file:// - var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1; - console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools'); + // http://www.w3.org/TR/dom/#domtokenlist + // iOS 5.1 has completely screwed this property + // classList in ElementPrototype is false + // but it's actually there as getter + if (!(CLASS_LIST in document.documentElement)) { + defineProperty(ElementPrototype, CLASS_LIST, classListDescriptor); + } else { + // iOS 5.1 and Nokia ASHA do not support multiple add or remove + // trying to detect and fix that in here + TemporaryTokenList = createElement('div')[CLASS_LIST]; + TemporaryTokenList.add('a', 'b', 'a'); + if ('a\x20b' != TemporaryTokenList) { + // no other way to reach original methods in iOS 5.1 + TemporaryPrototype = TemporaryTokenList.constructor.prototype; + if (!('add' in TemporaryPrototype)) { + // ASHA double fails in here + TemporaryPrototype = window.TemporaryTokenList.prototype; } + wrapVerifyToken = function (original) { + return function () { + var i = 0; + while (i < arguments.length) { + original.call(this, arguments[i++]); + } + }; + }; + TemporaryPrototype.add = wrapVerifyToken(TemporaryPrototype.add); + TemporaryPrototype.remove = wrapVerifyToken(TemporaryPrototype.remove); + // toggle is broken too ^_^ ... let's fix it + TemporaryPrototype.toggle = toggle; } + } - var testFunc = function testFn() {}; - process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, 'It looks like you\'re using a minified copy of the development build ' + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0; - - // If we're in IE8, check to see if we are in compatibility mode and provide - // information on preventing compatibility mode - var ieCompatibilityMode = document.documentMode && document.documentMode < 8; - - process.env.NODE_ENV !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '') : void 0; - - 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.trim]; + if (!('contains' in NodePrototype)) { + defineProperty(NodePrototype, 'contains', { + value: function (el) { + while (el && el !== this) el = el.parentNode; + return this === el; + } + }); + } - for (var i = 0; i < expectedFeatures.length; i++) { - if (!expectedFeatures[i]) { - process.env.NODE_ENV !== 'production' ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0; - break; + if (!('head' in document)) { + defineProperty(document, 'head', { + get: function () { + return head || ( + head = document.getElementsByTagName('head')[0] + ); } - } + }); } - } - if (process.env.NODE_ENV !== 'production') { - var ReactInstrumentation = __webpack_require__(92); - var ReactDOMUnknownPropertyHook = __webpack_require__(205); - var ReactDOMNullInputValuePropHook = __webpack_require__(206); - var ReactDOMInvalidARIAHook = __webpack_require__(207); + // requestAnimationFrame partial polyfill + (function () { + for (var + raf, + rAF = window.requestAnimationFrame, + cAF = window.cancelAnimationFrame, + prefixes = ['o', 'ms', 'moz', 'webkit'], + i = prefixes.length; + !cAF && i--; + ) { + rAF = rAF || window[prefixes[i] + 'RequestAnimationFrame']; + cAF = window[prefixes[i] + 'CancelAnimationFrame'] || + window[prefixes[i] + 'CancelRequestAnimationFrame']; + } + if (!cAF) { + // some FF apparently implemented rAF but no cAF + if (rAF) { + raf = rAF; + rAF = function (callback) { + var goOn = true; + raf(function () { + if (goOn) callback.apply(this, arguments); + }); + return function () { + goOn = false; + }; + }; + cAF = function (id) { + id(); + }; + } else { + rAF = function (callback) { + return setTimeout(callback, 15, 15); + }; + cAF = function (id) { + clearTimeout(id); + }; + } + } + window.requestAnimationFrame = rAF; + window.cancelAnimationFrame = cAF; + }()); - ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook); - ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook); - ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook); - } + // http://www.w3.org/TR/dom/#customevent + try{new window.CustomEvent('?');}catch(o_O){ + window.CustomEvent = function( + eventName, + defaultInitDict + ){ - module.exports = ReactDOM; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + // the infamous substitute + function CustomEvent(type, eventInitDict) { + /*jshint eqnull:true */ + var event = document.createEvent(eventName); + if (typeof type != 'string') { + throw new Error('An event name must be provided'); + } + if (eventName == 'Event') { + event.initCustomEvent = initCustomEvent; + } + if (eventInitDict == null) { + eventInitDict = defaultInitDict; + } + event.initCustomEvent( + type, + eventInitDict.bubbles, + eventInitDict.cancelable, + eventInitDict.detail + ); + return event; + } -/***/ }, -/* 64 */ -/***/ function(module, exports, __webpack_require__) { + // attached at runtime + function initCustomEvent( + type, bubbles, cancelable, detail + ) { + /*jshint validthis:true*/ + this.initEvent(type, bubbles, cancelable); + this.detail = detail; + } - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + // that's it + return CustomEvent; + }( + // is this IE9 or IE10 ? + // where CustomEvent is there + // but not usable as construtor ? + window.CustomEvent ? + // use the CustomEvent interface in such case + 'CustomEvent' : 'Event', + // otherwise the common compatible one + { + bubbles: false, + cancelable: false, + detail: null + } + ); + } - 'use strict'; + // window.Event as constructor + try { new Event('_'); } catch (o_O) { + /* jshint -W022 */ + o_O = (function ($Event) { + function Event(type, init) { + enoughArguments(arguments.length, 'Event'); + var out = document.createEvent('Event'); + if (!init) init = {}; + out.initEvent( + type, + !!init.bubbles, + !!init.cancelable + ); + return out; + } + Event.prototype = $Event.prototype; + return Event; + }(window.Event || function Event() {})); + defineProperty(window, 'Event', {value: o_O}); + // Android 4 gotcha + if (Event !== o_O) Event = o_O; + } - var _prodInvariant = __webpack_require__(65); + // window.KeyboardEvent as constructor + try { new KeyboardEvent('_', {}); } catch (o_O) { + /* jshint -W022 */ + o_O = (function ($KeyboardEvent) { + // code inspired by https://gist.github.com/termi/4654819 + var + initType = 0, + defaults = { + char: '', + key: '', + location: 0, + ctrlKey: false, + shiftKey: false, + altKey: false, + metaKey: false, + altGraphKey: false, + repeat: false, + locale: navigator.language, + detail: 0, + bubbles: false, + cancelable: false, + keyCode: 0, + charCode: 0, + which: 0 + }, + eventType + ; + try { + var e = document.createEvent('KeyboardEvent'); + e.initKeyboardEvent( + 'keyup', false, false, window, '+', 3, + true, false, true, false, false + ); + initType = ( + (e.keyIdentifier || e.key) == '+' && + (e.keyLocation || e.location) == 3 + ) && ( + e.ctrlKey ? e.altKey ? 1 : 3 : e.shiftKey ? 2 : 4 + ) || 9; + } catch(o_O) {} + eventType = 0 < initType ? 'KeyboardEvent' : 'Event'; - var DOMProperty = __webpack_require__(66); - var ReactDOMComponentFlags = __webpack_require__(67); + function getModifier(init) { + for (var + out = [], + keys = [ + 'ctrlKey', + 'Control', + 'shiftKey', + 'Shift', + 'altKey', + 'Alt', + 'metaKey', + 'Meta', + 'altGraphKey', + 'AltGraph' + ], + i = 0; i < keys.length; i += 2 + ) { + if (init[keys[i]]) + out.push(keys[i + 1]); + } + return out.join(' '); + } - var invariant = __webpack_require__(27); + function withDefaults(target, source) { + for (var key in source) { + if ( + source.hasOwnProperty(key) && + !source.hasOwnProperty.call(target, key) + ) target[key] = source[key]; + } + return target; + } - var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; - var Flags = ReactDOMComponentFlags; + function withInitValues(key, out, init) { + try { + out[key] = init[key]; + } catch(o_O) {} + } - var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2); + function KeyboardEvent(type, init) { + enoughArguments(arguments.length, 'KeyboardEvent'); + init = withDefaults(init || {}, defaults); + var + out = document.createEvent(eventType), + ctrlKey = init.ctrlKey, + shiftKey = init.shiftKey, + altKey = init.altKey, + metaKey = init.metaKey, + altGraphKey = init.altGraphKey, + modifiers = initType > 3 ? getModifier(init) : null, + key = String(init.key), + chr = String(init.char), + location = init.location, + keyCode = init.keyCode || ( + (init.keyCode = key) && + key.charCodeAt(0) + ) || 0, + charCode = init.charCode || ( + (init.charCode = chr) && + chr.charCodeAt(0) + ) || 0, + bubbles = init.bubbles, + cancelable = init.cancelable, + repeat = init.repeat, + locale = init.locale, + view = init.view || window, + args + ; + if (!init.which) init.which = init.keyCode; + if ('initKeyEvent' in out) { + out.initKeyEvent( + type, bubbles, cancelable, view, + ctrlKey, altKey, shiftKey, metaKey, keyCode, charCode + ); + } else if (0 < initType && 'initKeyboardEvent' in out) { + args = [type, bubbles, cancelable, view]; + switch (initType) { + case 1: + args.push(key, location, ctrlKey, shiftKey, altKey, metaKey, altGraphKey); + break; + case 2: + args.push(ctrlKey, altKey, shiftKey, metaKey, keyCode, charCode); + break; + case 3: + args.push(key, location, ctrlKey, altKey, shiftKey, metaKey, altGraphKey); + break; + case 4: + args.push(key, location, modifiers, repeat, locale); + break; + default: + args.push(char, key, location, modifiers, repeat, locale); + } + out.initKeyboardEvent.apply(out, args); + } else { + out.initEvent(type, bubbles, cancelable); + } + for (key in out) { + if (defaults.hasOwnProperty(key) && out[key] !== init[key]) { + withInitValues(key, out, init); + } + } + return out; + } + KeyboardEvent.prototype = $KeyboardEvent.prototype; + return KeyboardEvent; + }(window.KeyboardEvent || function KeyboardEvent() {})); + defineProperty(window, 'KeyboardEvent', {value: o_O}); + // Android 4 gotcha + if (KeyboardEvent !== o_O) KeyboardEvent = o_O; + } - /** - * Drill down (through composites and empty components) until we get a host or - * host text component. - * - * This is pretty polymorphic but unavoidable with the current structure we have - * for `_renderedChildren`. - */ - function getRenderedHostOrTextFromComponent(component) { - var rendered; - while (rendered = component._renderedComponent) { - component = rendered; + // window.MouseEvent as constructor + try { new MouseEvent('_', {}); } catch (o_O) { + /* jshint -W022 */ + o_O = (function ($MouseEvent) { + function MouseEvent(type, init) { + enoughArguments(arguments.length, 'MouseEvent'); + var out = document.createEvent('MouseEvent'); + if (!init) init = {}; + out.initMouseEvent( + type, + !!init.bubbles, + !!init.cancelable, + init.view || window, + init.detail || 1, + init.screenX || 0, + init.screenY || 0, + init.clientX || 0, + init.clientY || 0, + !!init.ctrlKey, + !!init.altKey, + !!init.shiftKey, + !!init.metaKey, + init.button || 0, + init.relatedTarget || null + ); + return out; + } + MouseEvent.prototype = $MouseEvent.prototype; + return MouseEvent; + }(window.MouseEvent || function MouseEvent() {})); + defineProperty(window, 'MouseEvent', {value: o_O}); + // Android 4 gotcha + if (MouseEvent !== o_O) MouseEvent = o_O; } - return component; - } - /** - * Populate `_hostNode` on the rendered host/text component with the given - * DOM node. The passed `inst` can be a composite. - */ - function precacheNode(inst, node) { - var hostInst = getRenderedHostOrTextFromComponent(inst); - hostInst._hostNode = node; - node[internalInstanceKey] = hostInst; - } + }(window));(function (global){'use strict'; - function uncacheNode(inst) { - var node = inst._hostNode; - if (node) { - delete node[internalInstanceKey]; - inst._hostNode = null; - } - } + // a WeakMap fallback for DOM nodes only used as key + var DOMMap = global.WeakMap || (function () { - /** - * Populate `_hostNode` on each child of `inst`, assuming that the children - * match up with the DOM (element) children of `node`. - * - * We cache entire levels at once to avoid an n^2 problem where we access the - * children of a node sequentially and have to walk from the start to our target - * node every time. - * - * Since we update `_renderedChildren` and the actual DOM at (slightly) - * different times, we could race here and see a newer `_renderedChildren` than - * the DOM nodes we see. To avoid this, ReactMultiChild calls - * `prepareToManageChildren` before we change `_renderedChildren`, at which - * time the container's child nodes are always cached (until it unmounts). - */ - function precacheChildNodes(inst, node) { - if (inst._flags & Flags.hasCachedChildNodes) { - return; - } - var children = inst._renderedChildren; - var childNode = node.firstChild; - outer: for (var name in children) { - if (!children.hasOwnProperty(name)) { - continue; - } - var childInst = children[name]; - var childID = getRenderedHostOrTextFromComponent(childInst)._domID; - if (childID === 0) { - // We're currently unmounting this child in ReactMultiChild; skip it. - continue; - } - // We assume the child nodes are in the same order as the child instances. - for (; childNode !== null; childNode = childNode.nextSibling) { - if (childNode.nodeType === 1 && childNode.getAttribute(ATTR_NAME) === String(childID) || childNode.nodeType === 8 && childNode.nodeValue === ' react-text: ' + childID + ' ' || childNode.nodeType === 8 && childNode.nodeValue === ' react-empty: ' + childID + ' ') { - precacheNode(childInst, childNode); - continue outer; - } - } - // We reached the end of the DOM children without finding an ID match. - true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0; - } - inst._flags |= Flags.hasCachedChildNodes; - } - - /** - * Given a DOM node, return the closest ReactDOMComponent or - * ReactDOMTextComponent instance ancestor. - */ - function getClosestInstanceFromNode(node) { - if (node[internalInstanceKey]) { - return node[internalInstanceKey]; - } + var + counter = 0, + dispatched = false, + drop = false, + value + ; - // Walk up the tree until we find an ancestor whose instance we have cached. - var parents = []; - while (!node[internalInstanceKey]) { - parents.push(node); - if (node.parentNode) { - node = node.parentNode; - } else { - // Top of the tree. This node must not be part of a React tree (or is - // unmounted, potentially). - return null; + function dispatch(key, ce, shouldDrop) { + drop = shouldDrop; + dispatched = false; + value = undefined; + key.dispatchEvent(ce); } - } - var closest; - var inst; - for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) { - closest = inst; - if (parents.length) { - precacheChildNodes(inst, node); + function Handler(value) { + this.value = value; } - } - - return closest; - } - - /** - * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent - * instance, or null if the node was not rendered by this React. - */ - function getInstanceFromNode(node) { - var inst = getClosestInstanceFromNode(node); - if (inst != null && inst._hostNode === node) { - return inst; - } else { - return null; - } - } - - /** - * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding - * DOM node. - */ - function getNodeFromInstance(inst) { - // Without this first invariant, passing a non-DOM-component triggers the next - // invariant for a missing parent, which is super confusing. - !(inst._hostNode !== undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; - if (inst._hostNode) { - return inst._hostNode; - } - - // Walk up the tree until we find an ancestor whose DOM node we have cached. - var parents = []; - while (!inst._hostNode) { - parents.push(inst); - !inst._hostParent ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0; - inst = inst._hostParent; - } - - // Now parents contains each ancestor that does *not* have a cached native - // node, and `inst` is the deepest ancestor that does. - for (; parents.length; inst = parents.pop()) { - precacheChildNodes(inst, inst._hostNode); - } - - return inst._hostNode; - } - - var ReactDOMComponentTree = { - getClosestInstanceFromNode: getClosestInstanceFromNode, - getInstanceFromNode: getInstanceFromNode, - getNodeFromInstance: getNodeFromInstance, - precacheChildNodes: precacheChildNodes, - precacheNode: precacheNode, - uncacheNode: uncacheNode - }; + Handler.prototype.handleEvent = function handleEvent(e) { + dispatched = true; + if (drop) { + e.currentTarget.removeEventListener(e.type, this, false); + } else { + value = this.value; + } + }; - module.exports = ReactDOMComponentTree; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + function DOMMap() { + counter++; // make id clashing highly improbable + this.__ce__ = new Event(('@DOMMap:' + counter) + Math.random()); + } -/***/ }, -/* 65 */ -/***/ function(module, exports) { + DOMMap.prototype = { + 'constructor': DOMMap, + 'delete': function del(key) { + return dispatch(key, this.__ce__, true), dispatched; + }, + 'get': function get(key) { + dispatch(key, this.__ce__, false); + var v = value; + value = undefined; + return v; + }, + 'has': function has(key) { + return dispatch(key, this.__ce__, false), dispatched; + }, + 'set': function set(key, value) { + dispatch(key, this.__ce__, true); + key.addEventListener(this.__ce__.type, new Handler(value), false); + return this; + }, + }; - /** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - 'use strict'; + return DOMMap; - /** - * WARNING: DO NOT manually require this module. - * This is a replacement for `invariant(...)` used by the error code system - * and will _only_ be required by the corresponding babel pass. - * It always throws. - */ + }()); - function reactProdInvariant(code) { - var argCount = arguments.length - 1; + function Dict() {} + Dict.prototype = (Object.create || Object)(null); - var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; + // https://dom.spec.whatwg.org/#interface-eventtarget - for (var argIdx = 0; argIdx < argCount; argIdx++) { - message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + function createEventListener(type, callback, options) { + function eventListener(e) { + if (eventListener.once) { + e.currentTarget.removeEventListener( + e.type, + callback, + eventListener + ); + eventListener.removed = true; + } + if (eventListener.passive) { + e.preventDefault = createEventListener.preventDefault; + } + if (typeof eventListener.callback === 'function') { + /* jshint validthis: true */ + eventListener.callback.call(this, e); + } else if (eventListener.callback) { + eventListener.callback.handleEvent(e); + } + if (eventListener.passive) { + delete e.preventDefault; + } + } + eventListener.type = type; + eventListener.callback = callback; + eventListener.capture = !!options.capture; + eventListener.passive = !!options.passive; + eventListener.once = !!options.once; + // currently pointless but specs say to use it, so ... + eventListener.removed = false; + return eventListener; } - message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; - - var error = new Error(message); - error.name = 'Invariant Violation'; - error.framesToPop = 1; // we don't care about reactProdInvariant's own frame - - throw error; - } - - module.exports = reactProdInvariant; - -/***/ }, -/* 66 */ -/***/ function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + createEventListener.preventDefault = function preventDefault() {}; - 'use strict'; + var + Event = global.CustomEvent, + hOP = Object.prototype.hasOwnProperty, + dE = global.dispatchEvent, + aEL = global.addEventListener, + rEL = global.removeEventListener, + counter = 0, + increment = function () { counter++; }, + indexOf = [].indexOf || function indexOf(value){ + var length = this.length; + while(length--) { + if (this[length] === value) { + break; + } + } + return length; + }, + getListenerKey = function (options) { + return ''.concat( + options.capture ? '1' : '0', + options.passive ? '1' : '0', + options.once ? '1' : '0' + ); + }, + augment, proto + ; - var _prodInvariant = __webpack_require__(65); + try { + aEL('_', increment, {once: true}); + dE(new Event('_')); + dE(new Event('_')); + rEL('_', increment, {once: true}); + } catch(o_O) {} - var invariant = __webpack_require__(27); + if (counter !== 1) { + (function () { + var dm = new DOMMap(); + function createAEL(aEL) { + return function addEventListener(type, handler, options) { + if (options && typeof options !== 'boolean') { + var + info = dm.get(this), + key = getListenerKey(options), + i, tmp, wrap + ; + if (!info) dm.set(this, (info = new Dict())); + if (!(type in info)) info[type] = { + handler: [], + wrap: [] + }; + tmp = info[type]; + i = indexOf.call(tmp.handler, handler); + if (i < 0) { + i = tmp.handler.push(handler) - 1; + tmp.wrap[i] = (wrap = new Dict()); + } else { + wrap = tmp.wrap[i]; + } + if (!(key in wrap)) { + wrap[key] = createEventListener(type, handler, options); + aEL.call(this, type, wrap[key], wrap[key].capture); + } + } else { + aEL.call(this, type, handler, options); + } + }; + } + function createREL(rEL) { + return function removeEventListener(type, handler, options) { + if (options && typeof options !== 'boolean') { + var + info = dm.get(this), + key, i, tmp, wrap + ; + if (info && (type in info)) { + tmp = info[type]; + i = indexOf.call(tmp.handler, handler); + if (-1 < i) { + key = getListenerKey(options); + wrap = tmp.wrap[i]; + if (key in wrap) { + rEL.call(this, type, wrap[key], wrap[key].capture); + delete wrap[key]; + // return if there are other wraps + for (key in wrap) return; + // otherwise remove all the things + tmp.handler.splice(i, 1); + tmp.wrap.splice(i, 1); + // if there are no other handlers + if (tmp.handler.length === 0) + // drop the info[type] entirely + delete info[type]; + } + } + } + } else { + rEL.call(this, type, handler, options); + } + }; + } - function checkMask(value, bitmask) { - return (value & bitmask) === bitmask; - } + augment = function (Constructor) { + if (!Constructor) return; + var proto = Constructor.prototype; + proto.addEventListener = createAEL(proto.addEventListener); + proto.removeEventListener = createREL(proto.removeEventListener); + }; - var DOMPropertyInjection = { - /** - * Mapping from normalized, camelcased property names to a configuration that - * specifies how the associated DOM property should be accessed or rendered. - */ - MUST_USE_PROPERTY: 0x1, - HAS_BOOLEAN_VALUE: 0x4, - HAS_NUMERIC_VALUE: 0x8, - HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8, - HAS_OVERLOADED_BOOLEAN_VALUE: 0x20, + if (global.EventTarget) { + augment(EventTarget); + } else { + augment(global.Text); + augment(global.Element || global.HTMLElement); + augment(global.HTMLDocument); + augment(global.Window || {prototype:global}); + augment(global.XMLHttpRequest); + } - /** - * Inject some specialized knowledge about the DOM. This takes a config object - * with the following properties: - * - * isCustomAttribute: function that given an attribute name will return true - * if it can be inserted into the DOM verbatim. Useful for data-* or aria-* - * attributes where it's impossible to enumerate all of the possible - * attribute names, - * - * Properties: object mapping DOM property name to one of the - * DOMPropertyInjection constants or null. If your attribute isn't in here, - * it won't get written to the DOM. - * - * DOMAttributeNames: object mapping React attribute name to the DOM - * attribute name. Attribute names not specified use the **lowercase** - * normalized name. - * - * DOMAttributeNamespaces: object mapping React attribute name to the DOM - * attribute namespace URL. (Attribute names not specified use no namespace.) - * - * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. - * Property names not specified use the normalized name. - * - * DOMMutationMethods: Properties that require special mutation methods. If - * `value` is undefined, the mutation method should unset the property. - * - * @param {object} domPropertyConfig the config as described above. - */ - injectDOMPropertyConfig: function (domPropertyConfig) { - var Injection = DOMPropertyInjection; - var Properties = domPropertyConfig.Properties || {}; - var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}; - var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; - var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; - var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; + }()); + } - if (domPropertyConfig.isCustomAttribute) { - DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); + }(self)); + +/***/ }, +/* 67 */ +/***/ function(module, exports, __webpack_require__) { + + /* + * Copyright 2016 Palantir Technologies, Inc. All rights reserved. + * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy + * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE + * and https://github.com/palantir/blueprint/blob/master/PATENTS + */ + "use strict"; + var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + var React = __webpack_require__(20); + var ReactDOM = __webpack_require__(68); + var Classes = __webpack_require__(63); + var position_1 = __webpack_require__(59); + var utils_1 = __webpack_require__(61); + var popover_1 = __webpack_require__(198); + var CONSTRAINTS = [{ attachment: "together", pin: true, to: "window" }]; + var TRANSITION_DURATION = 100; + var ContextMenu = (function (_super) { + __extends(ContextMenu, _super); + function ContextMenu() { + var _this = this; + _super.apply(this, arguments); + this.state = { + isOpen: false, + }; + this.cancelContextMenu = function (e) { return e.preventDefault(); }; + this.handleBackdropContextMenu = function (e) { + // HACKHACK: React function to remove from the event pool (not sure why it's not in typings #66) + e.persist(); + e.preventDefault(); + // wait for backdrop to disappear so we can find the "real" element at event coordinates. + // timeout duration is equivalent to transition duration so we know it's animated out. + setTimeout(function () { + // retrigger context menu event at the element beneath the backdrop. + // if it has a `contextmenu` event handler then it'll be invoked. + // if it doesn't, no native menu will show (at least on OSX) :( + var newTarget = document.elementFromPoint(e.clientX, e.clientY); + newTarget.dispatchEvent(new MouseEvent("contextmenu", e)); + }, TRANSITION_DURATION); + }; + this.handlePopoverInteraction = function (nextOpenState) { + if (!nextOpenState) { + _this.hide(); + } + }; + } + ContextMenu.prototype.render = function () { + // prevent right-clicking in a context menu + var content = React.createElement("div", {onContextMenu: this.cancelContextMenu}, this.state.menu); + return (React.createElement(popover_1.Popover, {backdropProps: { onContextMenu: this.handleBackdropContextMenu }, constraints: CONSTRAINTS, content: content, enforceFocus: false, isModal: true, isOpen: this.state.isOpen, onInteraction: this.handlePopoverInteraction, position: position_1.Position.RIGHT_TOP, popoverClassName: Classes.MINIMAL, useSmartArrowPositioning: false, transitionDuration: TRANSITION_DURATION}, + React.createElement("div", {className: Classes.CONTEXT_MENU_POPOVER_TARGET, style: this.state.offset}) + )); + }; + ContextMenu.prototype.show = function (menu, offset, onClose) { + this.setState({ isOpen: true, menu: menu, offset: offset, onClose: onClose }); + }; + ContextMenu.prototype.hide = function () { + var onClose = this.state.onClose; + this.setState({ isOpen: false, onClose: null }); + utils_1.safeInvoke(onClose); + }; + return ContextMenu; + }(React.Component)); + var contextMenu; + /** + * Show the given menu element at the given offset from the top-left corner of the viewport. + * The menu will appear below-right of this point and will flip to below-left if there is not enough + * room onscreen. The optional callback will be invoked when this menu closes. + */ + function show(menu, offset, onClose) { + if (contextMenu == null) { + var contextMenuElement = document.createElement("div"); + contextMenuElement.classList.add(Classes.CONTEXT_MENU); + document.body.appendChild(contextMenuElement); + contextMenu = ReactDOM.render(React.createElement(ContextMenu, null), contextMenuElement); + } + contextMenu.show(menu, offset, onClose); + } + exports.show = show; + /** Hide the open context menu. */ + function hide() { + if (contextMenu != null) { + contextMenu.hide(); } + } + exports.hide = hide; + /** Return whether a context menu is currently open. */ + function isOpen() { + return contextMenu != null && contextMenu.state.isOpen; + } + exports.isOpen = isOpen; - for (var propName in Properties) { - !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0; + //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21wb25lbnRzL2NvbnRleHQtbWVudS9jb250ZXh0TWVudS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7O0dBS0c7Ozs7Ozs7QUFFSCxJQUFZLEtBQUssV0FBTSxPQUFPLENBQUMsQ0FBQTtBQUMvQixJQUFZLFFBQVEsV0FBTSxXQUFXLENBQUMsQ0FBQTtBQUV0QyxJQUFZLE9BQU8sV0FBTSxzQkFBc0IsQ0FBQyxDQUFBO0FBQ2hELHlCQUF5Qix1QkFBdUIsQ0FBQyxDQUFBO0FBQ2pELHNCQUEyQixvQkFBb0IsQ0FBQyxDQUFBO0FBQ2hELHdCQUF3QixvQkFBb0IsQ0FBQyxDQUFBO0FBYzdDLElBQU0sV0FBVyxHQUFHLENBQUUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLEdBQUcsRUFBRSxJQUFJLEVBQUUsRUFBRSxFQUFFLFFBQVEsRUFBRSxDQUFFLENBQUM7QUFDNUUsSUFBTSxtQkFBbUIsR0FBRyxHQUFHLENBQUM7QUFFaEM7SUFBMEIsK0JBQ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VzLkNPTlRFWFRfTUVOVSk7XG4gICAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQoY29udGV4dE1lbnVFbGVtZW50KTtcbiAgICAgICAgY29udGV4dE1lbnUgPSBSZWFjdERPTS5yZW5kZXIoPENvbnRleHRNZW51IC8+LCBjb250ZXh0TWVudUVsZW1lbnQpIGFzIENvbnRleHRNZW51O1xuICAgIH1cblxuICAgIGNvbnRleHRNZW51LnNob3cobWVudSwgb2Zmc2V0LCBvbkNsb3NlKTtcbn1cblxuLyoqIEhpZGUgdGhlIG9wZW4gY29udGV4dCBtZW51LiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGhpZGUoKSB7XG4gICAgaWYgKGNvbnRleHRNZW51ICE9IG51bGwpIHtcbiAgICAgICAgY29udGV4dE1lbnUuaGlkZSgpO1xuICAgIH1cbn1cblxuLyoqIFJldHVybiB3aGV0aGVyIGEgY29udGV4dCBtZW51IGlzIGN1cnJlbnRseSBvcGVuLiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGlzT3BlbigpIHtcbiAgICByZXR1cm4gY29udGV4dE1lbnUgIT0gbnVsbCAmJiBjb250ZXh0TWVudS5zdGF0ZS5pc09wZW47XG59XG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= - var lowerCased = propName.toLowerCase(); - var propConfig = Properties[propName]; - var propertyInfo = { - attributeName: lowerCased, - attributeNamespace: null, - propertyName: propName, - mutationMethod: null, +/***/ }, +/* 68 */ +/***/ function(module, exports, __webpack_require__) { - mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY), - hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE), - hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE), - hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE), - hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE) - }; - !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0; + 'use strict'; - if (process.env.NODE_ENV !== 'production') { - DOMProperty.getPossibleStandardName[lowerCased] = propName; - } + module.exports = __webpack_require__(69); - if (DOMAttributeNames.hasOwnProperty(propName)) { - var attributeName = DOMAttributeNames[propName]; - propertyInfo.attributeName = attributeName; - if (process.env.NODE_ENV !== 'production') { - DOMProperty.getPossibleStandardName[attributeName] = propName; - } - } - - if (DOMAttributeNamespaces.hasOwnProperty(propName)) { - propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]; - } - - if (DOMPropertyNames.hasOwnProperty(propName)) { - propertyInfo.propertyName = DOMPropertyNames[propName]; - } - - if (DOMMutationMethods.hasOwnProperty(propName)) { - propertyInfo.mutationMethod = DOMMutationMethods[propName]; - } - - DOMProperty.properties[propName] = propertyInfo; - } - } - }; - - /* eslint-disable max-len */ - var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; - /* eslint-enable max-len */ - - /** - * DOMProperty exports lookup objects that can be used like functions: - * - * > DOMProperty.isValid['id'] - * true - * > DOMProperty.isValid['foobar'] - * undefined - * - * Although this may be confusing, it performs better in general. - * - * @see http://jsperf.com/key-exists - * @see http://jsperf.com/key-missing - */ - var DOMProperty = { - - ID_ATTRIBUTE_NAME: 'data-reactid', - ROOT_ATTRIBUTE_NAME: 'data-reactroot', - - ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR, - ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040', - - /** - * Map from property "standard name" to an object with info about how to set - * the property in the DOM. Each object contains: - * - * attributeName: - * Used when rendering markup or with `*Attribute()`. - * attributeNamespace - * propertyName: - * Used on DOM node instances. (This includes properties that mutate due to - * external factors.) - * mutationMethod: - * If non-null, used instead of the property or `setAttribute()` after - * initial render. - * mustUseProperty: - * Whether the property must be accessed and mutated as an object property. - * hasBooleanValue: - * Whether the property should be removed when set to a falsey value. - * hasNumericValue: - * Whether the property must be numeric or parse as a numeric and should be - * removed when set to a falsey value. - * hasPositiveNumericValue: - * Whether the property must be positive numeric or parse as a positive - * numeric and should be removed when set to a falsey value. - * hasOverloadedBooleanValue: - * Whether the property can be used as a flag as well as with a value. - * Removed when strictly equal to false; present without a value when - * strictly equal to true; present with a value otherwise. - */ - properties: {}, - - /** - * Mapping from lowercase property names to the properly cased version, used - * to warn in the case of missing properties. Available only in __DEV__. - * - * autofocus is predefined, because adding it to the property whitelist - * causes unintended side effects. - * - * @type {Object} - */ - getPossibleStandardName: process.env.NODE_ENV !== 'production' ? { autofocus: 'autoFocus' } : null, - - /** - * All of the isCustomAttribute() functions that have been injected. - */ - _isCustomAttributeFunctions: [], - - /** - * Checks whether a property name is a custom attribute. - * @method - */ - isCustomAttribute: function (attributeName) { - for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { - var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; - if (isCustomAttributeFn(attributeName)) { - return true; - } - } - return false; - }, - - injection: DOMPropertyInjection - }; - - module.exports = DOMProperty; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) - -/***/ }, -/* 67 */ -/***/ function(module, exports) { - - /** - * Copyright 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - 'use strict'; - - var ReactDOMComponentFlags = { - hasCachedChildNodes: 1 << 0 - }; - - module.exports = ReactDOMComponentFlags; /***/ }, -/* 68 */ +/* 69 */ /***/ function(module, exports, __webpack_require__) { - /** + /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -6574,89 +6194,106 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule ReactDOM */ + /* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/ + 'use strict'; - var ARIADOMPropertyConfig = __webpack_require__(69); - var BeforeInputEventPlugin = __webpack_require__(70); - var ChangeEventPlugin = __webpack_require__(85); - var DefaultEventPluginOrder = __webpack_require__(102); - var EnterLeaveEventPlugin = __webpack_require__(103); - var HTMLDOMPropertyConfig = __webpack_require__(108); - var ReactComponentBrowserEnvironment = __webpack_require__(109); - var ReactDOMComponent = __webpack_require__(122); - var ReactDOMComponentTree = __webpack_require__(64); - var ReactDOMEmptyComponent = __webpack_require__(167); - var ReactDOMTreeTraversal = __webpack_require__(168); - var ReactDOMTextComponent = __webpack_require__(169); - var ReactDefaultBatchingStrategy = __webpack_require__(170); - var ReactEventListener = __webpack_require__(171); - var ReactInjection = __webpack_require__(174); - var ReactReconcileTransaction = __webpack_require__(175); - var SVGDOMPropertyConfig = __webpack_require__(183); - var SelectEventPlugin = __webpack_require__(184); - var SimpleEventPlugin = __webpack_require__(185); + var ReactDOMComponentTree = __webpack_require__(70); + var ReactDefaultInjection = __webpack_require__(73); + var ReactMount = __webpack_require__(190); + var ReactReconciler = __webpack_require__(92); + var ReactUpdates = __webpack_require__(89); + var ReactVersion = __webpack_require__(55); - var alreadyInjected = false; + var findDOMNode = __webpack_require__(195); + var getNativeComponentFromComposite = __webpack_require__(196); + var renderSubtreeIntoContainer = __webpack_require__(197); + var warning = __webpack_require__(29); - function inject() { - if (alreadyInjected) { - // TODO: This is currently true because these injections are shared between - // the client and the server package. They should be built independently - // and not share any injection state. Then this problem will be solved. - return; - } - alreadyInjected = true; + ReactDefaultInjection.inject(); - ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener); + var React = { + findDOMNode: findDOMNode, + render: ReactMount.render, + unmountComponentAtNode: ReactMount.unmountComponentAtNode, + version: ReactVersion, - /** - * Inject modules for resolving DOM hierarchy and plugin ordering. - */ - ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder); - ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree); - ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal); + /* eslint-disable camelcase */ + unstable_batchedUpdates: ReactUpdates.batchedUpdates, + unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer + }; - /** - * Some important event plugins included by default (without having to require - * them). - */ - ReactInjection.EventPluginHub.injectEventPluginsByName({ - SimpleEventPlugin: SimpleEventPlugin, - EnterLeaveEventPlugin: EnterLeaveEventPlugin, - ChangeEventPlugin: ChangeEventPlugin, - SelectEventPlugin: SelectEventPlugin, - BeforeInputEventPlugin: BeforeInputEventPlugin + // Inject the runtime into a devtools global hook regardless of browser. + // Allows for debugging when the hook is injected on the page. + /* eslint-enable camelcase */ + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { + __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ + ComponentTree: { + getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode, + getNodeFromInstance: function (inst) { + // inst is an internal instance (but could be a composite) + if (inst._renderedComponent) { + inst = getNativeComponentFromComposite(inst); + } + if (inst) { + return ReactDOMComponentTree.getNodeFromInstance(inst); + } else { + return null; + } + } + }, + Mount: ReactMount, + Reconciler: ReactReconciler }); + } - ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent); + if (process.env.NODE_ENV !== 'production') { + var ExecutionEnvironment = __webpack_require__(39); + if (ExecutionEnvironment.canUseDOM && window.top === window.self) { + + // First check if devtools is not installed + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { + // If we're in Chrome or Firefox, provide a download link if not installed. + if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) { + // Firefox does not have the issue with devtools loaded over file:// + var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1; + console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools'); + } + } - ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent); + var testFunc = function testFn() {}; + process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, 'It looks like you\'re using a minified copy of the development build ' + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0; - ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig); - ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); - ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); + // If we're in IE8, check to see if we are in compatibility mode and provide + // information on preventing compatibility mode + var ieCompatibilityMode = document.documentMode && document.documentMode < 8; - ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) { - return new ReactDOMEmptyComponent(instantiate); - }); + process.env.NODE_ENV !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '') : void 0; - ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction); - ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy); + 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]; - ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); + for (var i = 0; i < expectedFeatures.length; i++) { + if (!expectedFeatures[i]) { + process.env.NODE_ENV !== 'production' ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0; + break; + } + } + } } - module.exports = { - inject: inject - }; + module.exports = React; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 69 */ -/***/ function(module, exports) { +/* 70 */ +/***/ function(module, exports, __webpack_require__) { - /** + /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -6664,605 +6301,433 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule ReactDOMComponentTree */ 'use strict'; - var ARIADOMPropertyConfig = { - Properties: { - // Global States and Properties - 'aria-current': 0, // state - 'aria-details': 0, - 'aria-disabled': 0, // state - 'aria-hidden': 0, // state - 'aria-invalid': 0, // state - 'aria-keyshortcuts': 0, - 'aria-label': 0, - 'aria-roledescription': 0, - // Widget Attributes - 'aria-autocomplete': 0, - 'aria-checked': 0, - 'aria-expanded': 0, - 'aria-haspopup': 0, - 'aria-level': 0, - 'aria-modal': 0, - 'aria-multiline': 0, - 'aria-multiselectable': 0, - 'aria-orientation': 0, - 'aria-placeholder': 0, - 'aria-pressed': 0, - 'aria-readonly': 0, - 'aria-required': 0, - 'aria-selected': 0, - 'aria-sort': 0, - 'aria-valuemax': 0, - 'aria-valuemin': 0, - 'aria-valuenow': 0, - 'aria-valuetext': 0, - // Live Region Attributes - 'aria-atomic': 0, - 'aria-busy': 0, - 'aria-live': 0, - 'aria-relevant': 0, - // Drag-and-Drop Attributes - 'aria-dropeffect': 0, - 'aria-grabbed': 0, - // Relationship Attributes - 'aria-activedescendant': 0, - 'aria-colcount': 0, - 'aria-colindex': 0, - 'aria-colspan': 0, - 'aria-controls': 0, - 'aria-describedby': 0, - 'aria-errormessage': 0, - 'aria-flowto': 0, - 'aria-labelledby': 0, - 'aria-owns': 0, - 'aria-posinset': 0, - 'aria-rowcount': 0, - 'aria-rowindex': 0, - 'aria-rowspan': 0, - 'aria-setsize': 0 - }, - DOMAttributeNames: {}, - DOMPropertyNames: {} - }; + var DOMProperty = __webpack_require__(71); + var ReactDOMComponentFlags = __webpack_require__(72); - module.exports = ARIADOMPropertyConfig; + var invariant = __webpack_require__(26); -/***/ }, -/* 70 */ -/***/ function(module, exports, __webpack_require__) { + var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; + var Flags = ReactDOMComponentFlags; + + var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2); /** - * Copyright 2013-present Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * Drill down (through composites and empty components) until we get a native or + * native text component. * + * This is pretty polymorphic but unavoidable with the current structure we have + * for `_renderedChildren`. */ - - 'use strict'; - - var EventPropagators = __webpack_require__(71); - var ExecutionEnvironment = __webpack_require__(78); - var FallbackCompositionState = __webpack_require__(79); - var SyntheticCompositionEvent = __webpack_require__(82); - var SyntheticInputEvent = __webpack_require__(84); - - var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space - var START_KEYCODE = 229; - - var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window; - - var documentMode = null; - if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { - documentMode = document.documentMode; + function getRenderedNativeOrTextFromComponent(component) { + var rendered; + while (rendered = component._renderedComponent) { + component = rendered; + } + return component; } - // Webkit offers a very useful `textInput` event that can be used to - // directly represent `beforeInput`. The IE `textinput` event is not as - // useful, so we don't use it. - var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto(); - - // In IE9+, we have access to composition events, but the data supplied - // by the native compositionend event may be incorrect. Japanese ideographic - // spaces, for instance (\u3000) are not recorded correctly. - var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11); - /** - * Opera <= 12 includes TextEvent in window, but does not fire - * text input events. Rely on keypress instead. + * Populate `_nativeNode` on the rendered native/text component with the given + * DOM node. The passed `inst` can be a composite. */ - function isPresto() { - var opera = window.opera; - return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12; + function precacheNode(inst, node) { + var nativeInst = getRenderedNativeOrTextFromComponent(inst); + nativeInst._nativeNode = node; + node[internalInstanceKey] = nativeInst; } - var SPACEBAR_CODE = 32; - var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); - - // Events and their corresponding property names. - var eventTypes = { - beforeInput: { - phasedRegistrationNames: { - bubbled: 'onBeforeInput', - captured: 'onBeforeInputCapture' - }, - dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste'] - }, - compositionEnd: { - phasedRegistrationNames: { - bubbled: 'onCompositionEnd', - captured: 'onCompositionEndCapture' - }, - dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] - }, - compositionStart: { - phasedRegistrationNames: { - bubbled: 'onCompositionStart', - captured: 'onCompositionStartCapture' - }, - dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] - }, - compositionUpdate: { - phasedRegistrationNames: { - bubbled: 'onCompositionUpdate', - captured: 'onCompositionUpdateCapture' - }, - dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] + function uncacheNode(inst) { + var node = inst._nativeNode; + if (node) { + delete node[internalInstanceKey]; + inst._nativeNode = null; } - }; - - // Track whether we've ever handled a keypress on the space key. - var hasSpaceKeypress = false; - - /** - * Return whether a native keypress event is assumed to be a command. - * This is required because Firefox fires `keypress` events for key commands - * (cut, copy, select-all, etc.) even though no character is inserted. - */ - function isKeypressCommand(nativeEvent) { - return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && - // ctrlKey && altKey is equivalent to AltGr, and is not a command. - !(nativeEvent.ctrlKey && nativeEvent.altKey); } /** - * Translate native top level events into event types. + * Populate `_nativeNode` on each child of `inst`, assuming that the children + * match up with the DOM (element) children of `node`. * - * @param {string} topLevelType - * @return {object} + * We cache entire levels at once to avoid an n^2 problem where we access the + * children of a node sequentially and have to walk from the start to our target + * node every time. + * + * Since we update `_renderedChildren` and the actual DOM at (slightly) + * different times, we could race here and see a newer `_renderedChildren` than + * the DOM nodes we see. To avoid this, ReactMultiChild calls + * `prepareToManageChildren` before we change `_renderedChildren`, at which + * time the container's child nodes are always cached (until it unmounts). */ - function getCompositionEventType(topLevelType) { - switch (topLevelType) { - case 'topCompositionStart': - return eventTypes.compositionStart; - case 'topCompositionEnd': - return eventTypes.compositionEnd; - case 'topCompositionUpdate': - return eventTypes.compositionUpdate; + function precacheChildNodes(inst, node) { + if (inst._flags & Flags.hasCachedChildNodes) { + return; + } + var children = inst._renderedChildren; + var childNode = node.firstChild; + outer: for (var name in children) { + if (!children.hasOwnProperty(name)) { + continue; + } + var childInst = children[name]; + var childID = getRenderedNativeOrTextFromComponent(childInst)._domID; + if (childID == null) { + // We're currently unmounting this child in ReactMultiChild; skip it. + continue; + } + // We assume the child nodes are in the same order as the child instances. + for (; childNode !== null; childNode = childNode.nextSibling) { + if (childNode.nodeType === 1 && childNode.getAttribute(ATTR_NAME) === String(childID) || childNode.nodeType === 8 && childNode.nodeValue === ' react-text: ' + childID + ' ' || childNode.nodeType === 8 && childNode.nodeValue === ' react-empty: ' + childID + ' ') { + precacheNode(childInst, childNode); + continue outer; + } + } + // We reached the end of the DOM children without finding an ID match. + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unable to find element with ID %s.', childID) : invariant(false) : void 0; } + inst._flags |= Flags.hasCachedChildNodes; } /** - * Does our fallback best-guess model think this event signifies that - * composition has begun? - * - * @param {string} topLevelType - * @param {object} nativeEvent - * @return {boolean} + * Given a DOM node, return the closest ReactDOMComponent or + * ReactDOMTextComponent instance ancestor. */ - function isFallbackCompositionStart(topLevelType, nativeEvent) { - return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE; - } + function getClosestInstanceFromNode(node) { + if (node[internalInstanceKey]) { + return node[internalInstanceKey]; + } - /** - * Does our fallback mode think that this event is the end of composition? - * - * @param {string} topLevelType - * @param {object} nativeEvent - * @return {boolean} - */ - function isFallbackCompositionEnd(topLevelType, nativeEvent) { - switch (topLevelType) { - case 'topKeyUp': - // Command keys insert or clear IME input. - return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; - case 'topKeyDown': - // Expect IME keyCode on each keydown. If we get any other - // code we must have exited earlier. - return nativeEvent.keyCode !== START_KEYCODE; - case 'topKeyPress': - case 'topMouseDown': - case 'topBlur': - // Events are not possible without cancelling IME. - return true; - default: - return false; + // Walk up the tree until we find an ancestor whose instance we have cached. + var parents = []; + while (!node[internalInstanceKey]) { + parents.push(node); + if (node.parentNode) { + node = node.parentNode; + } else { + // Top of the tree. This node must not be part of a React tree (or is + // unmounted, potentially). + return null; + } + } + + var closest; + var inst; + for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) { + closest = inst; + if (parents.length) { + precacheChildNodes(inst, node); + } } + + return closest; } /** - * Google Input Tools provides composition data via a CustomEvent, - * with the `data` property populated in the `detail` object. If this - * is available on the event object, use it. If not, this is a plain - * composition event and we have nothing special to extract. - * - * @param {object} nativeEvent - * @return {?string} + * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent + * instance, or null if the node was not rendered by this React. */ - function getDataFromCustomEvent(nativeEvent) { - var detail = nativeEvent.detail; - if (typeof detail === 'object' && 'data' in detail) { - return detail.data; + function getInstanceFromNode(node) { + var inst = getClosestInstanceFromNode(node); + if (inst != null && inst._nativeNode === node) { + return inst; + } else { + return null; } - return null; } - // Track the current IME composition fallback object, if any. - var currentComposition = null; - /** - * @return {?object} A SyntheticCompositionEvent. + * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding + * DOM node. */ - function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { - var eventType; - var fallbackData; + function getNodeFromInstance(inst) { + // Without this first invariant, passing a non-DOM-component triggers the next + // invariant for a missing parent, which is super confusing. + !(inst._nativeNode !== undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0; - if (canUseCompositionEvent) { - eventType = getCompositionEventType(topLevelType); - } else if (!currentComposition) { - if (isFallbackCompositionStart(topLevelType, nativeEvent)) { - eventType = eventTypes.compositionStart; - } - } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { - eventType = eventTypes.compositionEnd; + if (inst._nativeNode) { + return inst._nativeNode; } - if (!eventType) { - return null; + // Walk up the tree until we find an ancestor whose DOM node we have cached. + var parents = []; + while (!inst._nativeNode) { + parents.push(inst); + !inst._nativeParent ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React DOM tree root should always have a node reference.') : invariant(false) : void 0; + inst = inst._nativeParent; } - if (useFallbackCompositionData) { - // The current composition is stored statically and must not be - // overwritten while composition continues. - if (!currentComposition && eventType === eventTypes.compositionStart) { - currentComposition = FallbackCompositionState.getPooled(nativeEventTarget); - } else if (eventType === eventTypes.compositionEnd) { - if (currentComposition) { - fallbackData = currentComposition.getData(); - } - } + // Now parents contains each ancestor that does *not* have a cached native + // node, and `inst` is the deepest ancestor that does. + for (; parents.length; inst = parents.pop()) { + precacheChildNodes(inst, inst._nativeNode); } - var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget); + return inst._nativeNode; + } - if (fallbackData) { - // Inject data generated from fallback path into the synthetic event. - // This matches the property of native CompositionEventInterface. - event.data = fallbackData; - } else { - var customData = getDataFromCustomEvent(nativeEvent); - if (customData !== null) { - event.data = customData; - } - } + var ReactDOMComponentTree = { + getClosestInstanceFromNode: getClosestInstanceFromNode, + getInstanceFromNode: getInstanceFromNode, + getNodeFromInstance: getNodeFromInstance, + precacheChildNodes: precacheChildNodes, + precacheNode: precacheNode, + uncacheNode: uncacheNode + }; - EventPropagators.accumulateTwoPhaseDispatches(event); - return event; - } + module.exports = ReactDOMComponentTree; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) - /** - * @param {string} topLevelType Record from `EventConstants`. - * @param {object} nativeEvent Native browser event. - * @return {?string} The string corresponding to this `beforeInput` event. - */ - function getNativeBeforeInputChars(topLevelType, nativeEvent) { - switch (topLevelType) { - case 'topCompositionEnd': - return getDataFromCustomEvent(nativeEvent); - case 'topKeyPress': - /** - * If native `textInput` events are available, our goal is to make - * use of them. However, there is a special case: the spacebar key. - * In Webkit, preventing default on a spacebar `textInput` event - * cancels character insertion, but it *also* causes the browser - * to fall back to its default spacebar behavior of scrolling the - * page. - * - * Tracking at: - * https://code.google.com/p/chromium/issues/detail?id=355103 - * - * To avoid this issue, use the keypress event as if no `textInput` - * event is available. - */ - var which = nativeEvent.which; - if (which !== SPACEBAR_CODE) { - return null; - } - - hasSpaceKeypress = true; - return SPACEBAR_CHAR; +/***/ }, +/* 71 */ +/***/ function(module, exports, __webpack_require__) { - case 'topTextInput': - // Record the characters to be added to the DOM. - var chars = nativeEvent.data; + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DOMProperty + */ - // If it's a spacebar character, assume that we have already handled - // it at the keypress level and bail immediately. Android Chrome - // doesn't give us keycodes, so we need to blacklist it. - if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { - return null; - } + 'use strict'; - return chars; + var invariant = __webpack_require__(26); - default: - // For other native event types, do nothing. - return null; - } + function checkMask(value, bitmask) { + return (value & bitmask) === bitmask; } - /** - * For browsers that do not provide the `textInput` event, extract the - * appropriate string to use for SyntheticInputEvent. - * - * @param {string} topLevelType Record from `EventConstants`. - * @param {object} nativeEvent Native browser event. - * @return {?string} The fallback string for this `beforeInput` event. - */ - function getFallbackBeforeInputChars(topLevelType, nativeEvent) { - // If we are currently composing (IME) and using a fallback to do so, - // try to extract the composed characters from the fallback object. - // If composition event is available, we extract a string only at - // compositionevent, otherwise extract it at fallback events. - if (currentComposition) { - if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) { - var chars = currentComposition.getData(); - FallbackCompositionState.release(currentComposition); - currentComposition = null; - return chars; + var DOMPropertyInjection = { + /** + * Mapping from normalized, camelcased property names to a configuration that + * specifies how the associated DOM property should be accessed or rendered. + */ + MUST_USE_PROPERTY: 0x1, + HAS_SIDE_EFFECTS: 0x2, + HAS_BOOLEAN_VALUE: 0x4, + HAS_NUMERIC_VALUE: 0x8, + HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8, + HAS_OVERLOADED_BOOLEAN_VALUE: 0x20, + + /** + * Inject some specialized knowledge about the DOM. This takes a config object + * with the following properties: + * + * isCustomAttribute: function that given an attribute name will return true + * if it can be inserted into the DOM verbatim. Useful for data-* or aria-* + * attributes where it's impossible to enumerate all of the possible + * attribute names, + * + * Properties: object mapping DOM property name to one of the + * DOMPropertyInjection constants or null. If your attribute isn't in here, + * it won't get written to the DOM. + * + * DOMAttributeNames: object mapping React attribute name to the DOM + * attribute name. Attribute names not specified use the **lowercase** + * normalized name. + * + * DOMAttributeNamespaces: object mapping React attribute name to the DOM + * attribute namespace URL. (Attribute names not specified use no namespace.) + * + * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. + * Property names not specified use the normalized name. + * + * DOMMutationMethods: Properties that require special mutation methods. If + * `value` is undefined, the mutation method should unset the property. + * + * @param {object} domPropertyConfig the config as described above. + */ + injectDOMPropertyConfig: function (domPropertyConfig) { + var Injection = DOMPropertyInjection; + var Properties = domPropertyConfig.Properties || {}; + var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}; + var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; + var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; + var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; + + if (domPropertyConfig.isCustomAttribute) { + DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); } - return null; - } - switch (topLevelType) { - case 'topPaste': - // If a paste event occurs after a keypress, throw out the input - // chars. Paste events should not lead to BeforeInput events. - return null; - case 'topKeyPress': - /** - * As of v27, Firefox may fire keypress events even when no character - * will be inserted. A few possibilities: - * - * - `which` is `0`. Arrow keys, Esc key, etc. - * - * - `which` is the pressed key code, but no char is available. - * Ex: 'AltGr + d` in Polish. There is no modified character for - * this key combination and no character is inserted into the - * document, but FF fires the keypress for char code `100` anyway. - * No `input` event will occur. - * - * - `which` is the pressed key code, but a command combination is - * being used. Ex: `Cmd+C`. No character is inserted, and no - * `input` event will occur. - */ - if (nativeEvent.which && !isKeypressCommand(nativeEvent)) { - return String.fromCharCode(nativeEvent.which); - } - return null; - case 'topCompositionEnd': - return useFallbackCompositionData ? null : nativeEvent.data; - default: - return null; - } - } + for (var propName in Properties) { + !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' + '\'%s\' which has already been injected. You may be accidentally ' + 'injecting the same DOM property config twice, or you may be ' + 'injecting two configs that have conflicting property names.', propName) : invariant(false) : void 0; - /** - * Extract a SyntheticInputEvent for `beforeInput`, based on either native - * `textInput` or fallback behavior. - * - * @return {?object} A SyntheticInputEvent. - */ - function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { - var chars; + var lowerCased = propName.toLowerCase(); + var propConfig = Properties[propName]; - if (canUseTextInputEvent) { - chars = getNativeBeforeInputChars(topLevelType, nativeEvent); - } else { - chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); - } + var propertyInfo = { + attributeName: lowerCased, + attributeNamespace: null, + propertyName: propName, + mutationMethod: null, - // If no characters are being inserted, no BeforeInput event should - // be fired. - if (!chars) { - return null; - } + mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY), + hasSideEffects: checkMask(propConfig, Injection.HAS_SIDE_EFFECTS), + hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE), + hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE), + hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE), + hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE) + }; - var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget); + !(propertyInfo.mustUseProperty || !propertyInfo.hasSideEffects) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Properties that have side effects must use property: %s', propName) : invariant(false) : void 0; + !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or ' + 'numeric value, but not a combination: %s', propName) : invariant(false) : void 0; - event.data = chars; - EventPropagators.accumulateTwoPhaseDispatches(event); - return event; - } + if (process.env.NODE_ENV !== 'production') { + DOMProperty.getPossibleStandardName[lowerCased] = propName; + } - /** - * Create an `onBeforeInput` event to match - * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. - * - * This event plugin is based on the native `textInput` event - * available in Chrome, Safari, Opera, and IE. This event fires after - * `onKeyPress` and `onCompositionEnd`, but before `onInput`. - * - * `beforeInput` is spec'd but not implemented in any browsers, and - * the `input` event does not provide any useful information about what has - * actually been added, contrary to the spec. Thus, `textInput` is the best - * available event to identify the characters that have actually been inserted - * into the target node. - * - * This plugin is also responsible for emitting `composition` events, thus - * allowing us to share composition fallback code for both `beforeInput` and - * `composition` event types. - */ - var BeforeInputEventPlugin = { + if (DOMAttributeNames.hasOwnProperty(propName)) { + var attributeName = DOMAttributeNames[propName]; + propertyInfo.attributeName = attributeName; + if (process.env.NODE_ENV !== 'production') { + DOMProperty.getPossibleStandardName[attributeName] = propName; + } + } - eventTypes: eventTypes, + if (DOMAttributeNamespaces.hasOwnProperty(propName)) { + propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]; + } - extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { - return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)]; + if (DOMPropertyNames.hasOwnProperty(propName)) { + propertyInfo.propertyName = DOMPropertyNames[propName]; + } + + if (DOMMutationMethods.hasOwnProperty(propName)) { + propertyInfo.mutationMethod = DOMMutationMethods[propName]; + } + + DOMProperty.properties[propName] = propertyInfo; + } } }; - module.exports = BeforeInputEventPlugin; - -/***/ }, -/* 71 */ -/***/ function(module, exports, __webpack_require__) { + /* eslint-disable max-len */ + var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; + /* eslint-enable max-len */ - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. + /** + * DOMProperty exports lookup objects that can be used like functions: * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * > DOMProperty.isValid['id'] + * true + * > DOMProperty.isValid['foobar'] + * undefined + * + * Although this may be confusing, it performs better in general. * + * @see http://jsperf.com/key-exists + * @see http://jsperf.com/key-missing */ + var DOMProperty = { - 'use strict'; - - var EventPluginHub = __webpack_require__(72); - var EventPluginUtils = __webpack_require__(74); - - var accumulateInto = __webpack_require__(76); - var forEachAccumulated = __webpack_require__(77); - var warning = __webpack_require__(30); + ID_ATTRIBUTE_NAME: 'data-reactid', + ROOT_ATTRIBUTE_NAME: 'data-reactroot', - var getListener = EventPluginHub.getListener; + ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR, + ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\uB7\\u0300-\\u036F\\u203F-\\u2040', - /** - * Some event types have a notion of different registration names for different - * "phases" of propagation. This finds listeners by a given phase. - */ - function listenerAtPhase(inst, event, propagationPhase) { - var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; - return getListener(inst, registrationName); - } - - /** - * Tags a `SyntheticEvent` with dispatched listeners. Creating this function - * here, allows us to not have to bind or create functions for each event. - * Mutating the event's members allows us to not have to create a wrapping - * "dispatch" object that pairs the event with the listener. - */ - function accumulateDirectionalDispatches(inst, phase, event) { - if (process.env.NODE_ENV !== 'production') { - process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0; - } - var listener = listenerAtPhase(inst, event, phase); - if (listener) { - event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); - event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); - } - } + /** + * Map from property "standard name" to an object with info about how to set + * the property in the DOM. Each object contains: + * + * attributeName: + * Used when rendering markup or with `*Attribute()`. + * attributeNamespace + * propertyName: + * Used on DOM node instances. (This includes properties that mutate due to + * external factors.) + * mutationMethod: + * If non-null, used instead of the property or `setAttribute()` after + * initial render. + * mustUseProperty: + * Whether the property must be accessed and mutated as an object property. + * hasSideEffects: + * Whether or not setting a value causes side effects such as triggering + * resources to be loaded or text selection changes. If true, we read from + * the DOM before updating to ensure that the value is only set if it has + * changed. + * hasBooleanValue: + * Whether the property should be removed when set to a falsey value. + * hasNumericValue: + * Whether the property must be numeric or parse as a numeric and should be + * removed when set to a falsey value. + * hasPositiveNumericValue: + * Whether the property must be positive numeric or parse as a positive + * numeric and should be removed when set to a falsey value. + * hasOverloadedBooleanValue: + * Whether the property can be used as a flag as well as with a value. + * Removed when strictly equal to false; present without a value when + * strictly equal to true; present with a value otherwise. + */ + properties: {}, - /** - * Collect dispatches (must be entirely collected before dispatching - see unit - * tests). Lazily allocate the array to conserve memory. We must loop through - * each event and perform the traversal for each one. We cannot perform a - * single traversal for the entire collection of events because each event may - * have a different target. - */ - function accumulateTwoPhaseDispatchesSingle(event) { - if (event && event.dispatchConfig.phasedRegistrationNames) { - EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); - } - } + /** + * Mapping from lowercase property names to the properly cased version, used + * to warn in the case of missing properties. Available only in __DEV__. + * @type {Object} + */ + getPossibleStandardName: process.env.NODE_ENV !== 'production' ? {} : null, - /** - * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID. - */ - function accumulateTwoPhaseDispatchesSingleSkipTarget(event) { - if (event && event.dispatchConfig.phasedRegistrationNames) { - var targetInst = event._targetInst; - var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null; - EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event); - } - } + /** + * All of the isCustomAttribute() functions that have been injected. + */ + _isCustomAttributeFunctions: [], - /** - * Accumulates without regard to direction, does not look for phased - * registration names. Same as `accumulateDirectDispatchesSingle` but without - * requiring that the `dispatchMarker` be the same as the dispatched ID. - */ - function accumulateDispatches(inst, ignoredDirection, event) { - if (event && event.dispatchConfig.registrationName) { - var registrationName = event.dispatchConfig.registrationName; - var listener = getListener(inst, registrationName); - if (listener) { - event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); - event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + /** + * Checks whether a property name is a custom attribute. + * @method + */ + isCustomAttribute: function (attributeName) { + for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { + var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; + if (isCustomAttributeFn(attributeName)) { + return true; + } } - } - } - - /** - * Accumulates dispatches on an `SyntheticEvent`, but only for the - * `dispatchMarker`. - * @param {SyntheticEvent} event - */ - function accumulateDirectDispatchesSingle(event) { - if (event && event.dispatchConfig.registrationName) { - accumulateDispatches(event._targetInst, null, event); - } - } - - function accumulateTwoPhaseDispatches(events) { - forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); - } + return false; + }, - function accumulateTwoPhaseDispatchesSkipTarget(events) { - forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget); - } + injection: DOMPropertyInjection + }; - function accumulateEnterLeaveDispatches(leave, enter, from, to) { - EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter); - } + module.exports = DOMProperty; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) - function accumulateDirectDispatches(events) { - forEachAccumulated(events, accumulateDirectDispatchesSingle); - } +/***/ }, +/* 72 */ +/***/ function(module, exports) { /** - * A small set of propagation patterns, each of which will accept a small amount - * of information, and generate a set of "dispatch ready event objects" - which - * are sets of events that have already been annotated with a set of dispatched - * listener functions/ids. The API is designed this way to discourage these - * propagation strategies from actually executing the dispatches, since we - * always want to collect the entire set of dispatches before executing event a - * single one. + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. * - * @constructor EventPropagators + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMComponentFlags */ - var EventPropagators = { - accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches, - accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget, - accumulateDirectDispatches: accumulateDirectDispatches, - accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches + + 'use strict'; + + var ReactDOMComponentFlags = { + hasCachedChildNodes: 1 << 0 }; - module.exports = EventPropagators; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + module.exports = ReactDOMComponentFlags; /***/ }, -/* 72 */ +/* 73 */ /***/ function(module, exports, __webpack_require__) { - /* WEBPACK VAR INJECTION */(function(process) {/** + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -7270,743 +6735,580 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule ReactDefaultInjection */ 'use strict'; - var _prodInvariant = __webpack_require__(65); + var BeforeInputEventPlugin = __webpack_require__(74); + var ChangeEventPlugin = __webpack_require__(88); + var DefaultEventPluginOrder = __webpack_require__(99); + var EnterLeaveEventPlugin = __webpack_require__(100); + var HTMLDOMPropertyConfig = __webpack_require__(105); + var ReactComponentBrowserEnvironment = __webpack_require__(106); + var ReactDOMComponent = __webpack_require__(120); + var ReactDOMComponentTree = __webpack_require__(70); + var ReactDOMEmptyComponent = __webpack_require__(161); + var ReactDOMTreeTraversal = __webpack_require__(162); + var ReactDOMTextComponent = __webpack_require__(163); + var ReactDefaultBatchingStrategy = __webpack_require__(164); + var ReactEventListener = __webpack_require__(165); + var ReactInjection = __webpack_require__(168); + var ReactReconcileTransaction = __webpack_require__(169); + var SVGDOMPropertyConfig = __webpack_require__(177); + var SelectEventPlugin = __webpack_require__(178); + var SimpleEventPlugin = __webpack_require__(179); - var EventPluginRegistry = __webpack_require__(73); - var EventPluginUtils = __webpack_require__(74); - var ReactErrorUtils = __webpack_require__(75); + var alreadyInjected = false; - var accumulateInto = __webpack_require__(76); - var forEachAccumulated = __webpack_require__(77); - var invariant = __webpack_require__(27); + function inject() { + if (alreadyInjected) { + // TODO: This is currently true because these injections are shared between + // the client and the server package. They should be built independently + // and not share any injection state. Then this problem will be solved. + return; + } + alreadyInjected = true; - /** - * Internal store for event listeners - */ - var listenerBank = {}; + ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener); - /** - * Internal queue of events that have accumulated their dispatches and are - * waiting to have their dispatches executed. - */ - var eventQueue = null; + /** + * Inject modules for resolving DOM hierarchy and plugin ordering. + */ + ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder); + ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree); + ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal); - /** - * Dispatches an event and releases it back into the pool, unless persistent. - * - * @param {?object} event Synthetic event to be dispatched. - * @param {boolean} simulated If the event is simulated (changes exn behavior) - * @private - */ - var executeDispatchesAndRelease = function (event, simulated) { - if (event) { - EventPluginUtils.executeDispatchesInOrder(event, simulated); + /** + * Some important event plugins included by default (without having to require + * them). + */ + ReactInjection.EventPluginHub.injectEventPluginsByName({ + SimpleEventPlugin: SimpleEventPlugin, + EnterLeaveEventPlugin: EnterLeaveEventPlugin, + ChangeEventPlugin: ChangeEventPlugin, + SelectEventPlugin: SelectEventPlugin, + BeforeInputEventPlugin: BeforeInputEventPlugin + }); - if (!event.isPersistent()) { - event.constructor.release(event); - } - } - }; - var executeDispatchesAndReleaseSimulated = function (e) { - return executeDispatchesAndRelease(e, true); - }; - var executeDispatchesAndReleaseTopLevel = function (e) { - return executeDispatchesAndRelease(e, false); - }; + ReactInjection.NativeComponent.injectGenericComponentClass(ReactDOMComponent); + + ReactInjection.NativeComponent.injectTextComponentClass(ReactDOMTextComponent); + + ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); + ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); + + ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) { + return new ReactDOMEmptyComponent(instantiate); + }); + + ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction); + ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy); + + ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); + } - var getDictionaryKey = function (inst) { - // Prevents V8 performance issue: - // https://github.com/facebook/react/pull/7232 - return '.' + inst._rootNodeID; + module.exports = { + inject: inject }; +/***/ }, +/* 74 */ +/***/ function(module, exports, __webpack_require__) { + /** - * This is a unified interface for event plugins to be installed and configured. + * Copyright 2013-present Facebook, Inc. + * All rights reserved. * - * Event plugins can implement the following properties: + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * `extractEvents` {function(string, DOMEventTarget, string, object): *} - * Required. When a top-level event is fired, this method is expected to - * extract synthetic events that will in turn be queued and dispatched. - * - * `eventTypes` {object} - * Optional, plugins that fire events must publish a mapping of registration - * names that are used to register listeners. Values of this mapping must - * be objects that contain `registrationName` or `phasedRegistrationNames`. - * - * `executeDispatch` {function(object, function, string)} - * Optional, allows plugins to override how an event gets dispatched. By - * default, the listener is simply invoked. - * - * Each plugin that is injected into `EventsPluginHub` is immediately operable. - * - * @public + * @providesModule BeforeInputEventPlugin */ - var EventPluginHub = { - - /** - * Methods for injecting dependencies. - */ - injection: { - - /** - * @param {array} InjectedEventPluginOrder - * @public - */ - injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder, - - /** - * @param {object} injectedNamesToPlugins Map from names to plugin modules. - */ - injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName - }, - - /** - * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent. - * - * @param {object} inst The instance, which is the source of events. - * @param {string} registrationName Name of listener (e.g. `onClick`). - * @param {function} listener The callback to store. - */ - putListener: function (inst, registrationName, listener) { - !(typeof listener === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0; + 'use strict'; - var key = getDictionaryKey(inst); - var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {}); - bankForRegistrationName[key] = listener; + var EventConstants = __webpack_require__(75); + var EventPropagators = __webpack_require__(76); + var ExecutionEnvironment = __webpack_require__(39); + var FallbackCompositionState = __webpack_require__(83); + var SyntheticCompositionEvent = __webpack_require__(85); + var SyntheticInputEvent = __webpack_require__(87); - var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; - if (PluginModule && PluginModule.didPutListener) { - PluginModule.didPutListener(inst, registrationName, listener); - } - }, + var keyOf = __webpack_require__(50); - /** - * @param {object} inst The instance, which is the source of events. - * @param {string} registrationName Name of listener (e.g. `onClick`). - * @return {?function} The stored callback. - */ - getListener: function (inst, registrationName) { - var bankForRegistrationName = listenerBank[registrationName]; - var key = getDictionaryKey(inst); - return bankForRegistrationName && bankForRegistrationName[key]; - }, + var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space + var START_KEYCODE = 229; - /** - * Deletes a listener from the registration bank. - * - * @param {object} inst The instance, which is the source of events. - * @param {string} registrationName Name of listener (e.g. `onClick`). - */ - deleteListener: function (inst, registrationName) { - var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; - if (PluginModule && PluginModule.willDeleteListener) { - PluginModule.willDeleteListener(inst, registrationName); - } + var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window; - var bankForRegistrationName = listenerBank[registrationName]; - // TODO: This should never be null -- when is it? - if (bankForRegistrationName) { - var key = getDictionaryKey(inst); - delete bankForRegistrationName[key]; - } - }, + var documentMode = null; + if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { + documentMode = document.documentMode; + } - /** - * Deletes all listeners for the DOM element with the supplied ID. - * - * @param {object} inst The instance, which is the source of events. - */ - deleteAllListeners: function (inst) { - var key = getDictionaryKey(inst); - for (var registrationName in listenerBank) { - if (!listenerBank.hasOwnProperty(registrationName)) { - continue; - } + // Webkit offers a very useful `textInput` event that can be used to + // directly represent `beforeInput`. The IE `textinput` event is not as + // useful, so we don't use it. + var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto(); - if (!listenerBank[registrationName][key]) { - continue; - } + // In IE9+, we have access to composition events, but the data supplied + // by the native compositionend event may be incorrect. Japanese ideographic + // spaces, for instance (\u3000) are not recorded correctly. + var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11); - var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; - if (PluginModule && PluginModule.willDeleteListener) { - PluginModule.willDeleteListener(inst, registrationName); - } + /** + * Opera <= 12 includes TextEvent in window, but does not fire + * text input events. Rely on keypress instead. + */ + function isPresto() { + var opera = window.opera; + return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12; + } - delete listenerBank[registrationName][key]; - } - }, + var SPACEBAR_CODE = 32; + var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); - /** - * Allows registered plugins an opportunity to extract events from top-level - * native browser events. - * - * @return {*} An accumulation of synthetic events. - * @internal - */ - extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { - var events; - var plugins = EventPluginRegistry.plugins; - for (var i = 0; i < plugins.length; i++) { - // Not every plugin in the ordering may be loaded at runtime. - var possiblePlugin = plugins[i]; - if (possiblePlugin) { - var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); - if (extractedEvents) { - events = accumulateInto(events, extractedEvents); - } - } - } - return events; - }, + var topLevelTypes = EventConstants.topLevelTypes; - /** - * Enqueues a synthetic event that should be dispatched when - * `processEventQueue` is invoked. - * - * @param {*} events An accumulation of synthetic events. - * @internal - */ - enqueueEvents: function (events) { - if (events) { - eventQueue = accumulateInto(eventQueue, events); - } + // Events and their corresponding property names. + var eventTypes = { + beforeInput: { + phasedRegistrationNames: { + bubbled: keyOf({ onBeforeInput: null }), + captured: keyOf({ onBeforeInputCapture: null }) + }, + dependencies: [topLevelTypes.topCompositionEnd, topLevelTypes.topKeyPress, topLevelTypes.topTextInput, topLevelTypes.topPaste] }, - - /** - * Dispatches all synthetic events on the event queue. - * - * @internal - */ - processEventQueue: function (simulated) { - // Set `eventQueue` to null before processing it so that we can tell if more - // events get enqueued while processing. - var processingEventQueue = eventQueue; - eventQueue = null; - if (simulated) { - forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated); - } else { - forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); - } - !!eventQueue ? process.env.NODE_ENV !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0; - // This would be a good time to rethrow if any of the event handlers threw. - ReactErrorUtils.rethrowCaughtError(); + compositionEnd: { + phasedRegistrationNames: { + bubbled: keyOf({ onCompositionEnd: null }), + captured: keyOf({ onCompositionEndCapture: null }) + }, + dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionEnd, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown] }, - - /** - * These are needed for tests only. Do not use! - */ - __purge: function () { - listenerBank = {}; + compositionStart: { + phasedRegistrationNames: { + bubbled: keyOf({ onCompositionStart: null }), + captured: keyOf({ onCompositionStartCapture: null }) + }, + dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionStart, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown] }, - - __getListenerBank: function () { - return listenerBank; + compositionUpdate: { + phasedRegistrationNames: { + bubbled: keyOf({ onCompositionUpdate: null }), + captured: keyOf({ onCompositionUpdateCapture: null }) + }, + dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionUpdate, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown] } - }; - module.exports = EventPluginHub; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) - -/***/ }, -/* 73 */ -/***/ function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - - 'use strict'; - - var _prodInvariant = __webpack_require__(65); - - var invariant = __webpack_require__(27); + // Track whether we've ever handled a keypress on the space key. + var hasSpaceKeypress = false; /** - * Injectable ordering of event plugins. + * Return whether a native keypress event is assumed to be a command. + * This is required because Firefox fires `keypress` events for key commands + * (cut, copy, select-all, etc.) even though no character is inserted. */ - var eventPluginOrder = null; + function isKeypressCommand(nativeEvent) { + return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && + // ctrlKey && altKey is equivalent to AltGr, and is not a command. + !(nativeEvent.ctrlKey && nativeEvent.altKey); + } /** - * Injectable mapping from names to event plugin modules. + * Translate native top level events into event types. + * + * @param {string} topLevelType + * @return {object} */ - var namesToPlugins = {}; + function getCompositionEventType(topLevelType) { + switch (topLevelType) { + case topLevelTypes.topCompositionStart: + return eventTypes.compositionStart; + case topLevelTypes.topCompositionEnd: + return eventTypes.compositionEnd; + case topLevelTypes.topCompositionUpdate: + return eventTypes.compositionUpdate; + } + } /** - * Recomputes the plugin list using the injected plugins and plugin ordering. + * Does our fallback best-guess model think this event signifies that + * composition has begun? * - * @private + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} */ - function recomputePluginOrdering() { - if (!eventPluginOrder) { - // Wait until an `eventPluginOrder` is injected. - return; - } - for (var pluginName in namesToPlugins) { - var pluginModule = namesToPlugins[pluginName]; - var pluginIndex = eventPluginOrder.indexOf(pluginName); - !(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0; - if (EventPluginRegistry.plugins[pluginIndex]) { - continue; - } - !pluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0; - EventPluginRegistry.plugins[pluginIndex] = pluginModule; - var publishedEvents = pluginModule.eventTypes; - for (var eventName in publishedEvents) { - !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0; - } - } + function isFallbackCompositionStart(topLevelType, nativeEvent) { + return topLevelType === topLevelTypes.topKeyDown && nativeEvent.keyCode === START_KEYCODE; } /** - * Publishes an event so that it can be dispatched by the supplied plugin. + * Does our fallback mode think that this event is the end of composition? * - * @param {object} dispatchConfig Dispatch configuration for the event. - * @param {object} PluginModule Plugin publishing the event. - * @return {boolean} True if the event was successfully published. - * @private + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} */ - function publishEventForPlugin(dispatchConfig, pluginModule, eventName) { - !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0; - EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig; - - var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; - if (phasedRegistrationNames) { - for (var phaseName in phasedRegistrationNames) { - if (phasedRegistrationNames.hasOwnProperty(phaseName)) { - var phasedRegistrationName = phasedRegistrationNames[phaseName]; - publishRegistrationName(phasedRegistrationName, pluginModule, eventName); - } - } - return true; - } else if (dispatchConfig.registrationName) { - publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName); - return true; + function isFallbackCompositionEnd(topLevelType, nativeEvent) { + switch (topLevelType) { + case topLevelTypes.topKeyUp: + // Command keys insert or clear IME input. + return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; + case topLevelTypes.topKeyDown: + // Expect IME keyCode on each keydown. If we get any other + // code we must have exited earlier. + return nativeEvent.keyCode !== START_KEYCODE; + case topLevelTypes.topKeyPress: + case topLevelTypes.topMouseDown: + case topLevelTypes.topBlur: + // Events are not possible without cancelling IME. + return true; + default: + return false; } - return false; } /** - * Publishes a registration name that is used to identify dispatched events and - * can be used with `EventPluginHub.putListener` to register listeners. + * Google Input Tools provides composition data via a CustomEvent, + * with the `data` property populated in the `detail` object. If this + * is available on the event object, use it. If not, this is a plain + * composition event and we have nothing special to extract. * - * @param {string} registrationName Registration name to add. - * @param {object} PluginModule Plugin publishing the event. - * @private + * @param {object} nativeEvent + * @return {?string} */ - function publishRegistrationName(registrationName, pluginModule, eventName) { - !!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0; - EventPluginRegistry.registrationNameModules[registrationName] = pluginModule; - EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies; - - if (process.env.NODE_ENV !== 'production') { - var lowerCasedName = registrationName.toLowerCase(); - EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName; - - if (registrationName === 'onDoubleClick') { - EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName; - } + function getDataFromCustomEvent(nativeEvent) { + var detail = nativeEvent.detail; + if (typeof detail === 'object' && 'data' in detail) { + return detail.data; } + return null; } + // Track the current IME composition fallback object, if any. + var currentComposition = null; + /** - * Registers plugins so that they can extract and dispatch events. - * - * @see {EventPluginHub} + * @return {?object} A SyntheticCompositionEvent. */ - var EventPluginRegistry = { - - /** - * Ordered list of injected plugins. - */ - plugins: [], - - /** - * Mapping from event name to dispatch config - */ - eventNameDispatchConfigs: {}, - - /** - * Mapping from registration name to plugin module - */ - registrationNameModules: {}, - - /** - * Mapping from registration name to event name - */ - registrationNameDependencies: {}, - - /** - * Mapping from lowercase registration names to the properly cased version, - * used to warn in the case of missing event handlers. Available - * only in __DEV__. - * @type {Object} - */ - possibleRegistrationNames: process.env.NODE_ENV !== 'production' ? {} : null, - // Trust the developer to only use possibleRegistrationNames in __DEV__ - - /** - * Injects an ordering of plugins (by plugin name). This allows the ordering - * to be decoupled from injection of the actual plugins so that ordering is - * always deterministic regardless of packaging, on-the-fly injection, etc. - * - * @param {array} InjectedEventPluginOrder - * @internal - * @see {EventPluginHub.injection.injectEventPluginOrder} - */ - injectEventPluginOrder: function (injectedEventPluginOrder) { - !!eventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0; - // Clone the ordering so it cannot be dynamically mutated. - eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder); - recomputePluginOrdering(); - }, - - /** - * Injects plugins to be used by `EventPluginHub`. The plugin names must be - * in the ordering injected by `injectEventPluginOrder`. - * - * Plugins can be injected as part of page initialization or on-the-fly. - * - * @param {object} injectedNamesToPlugins Map from names to plugin modules. - * @internal - * @see {EventPluginHub.injection.injectEventPluginsByName} - */ - injectEventPluginsByName: function (injectedNamesToPlugins) { - var isOrderingDirty = false; - for (var pluginName in injectedNamesToPlugins) { - if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { - continue; - } - var pluginModule = injectedNamesToPlugins[pluginName]; - if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) { - !!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0; - namesToPlugins[pluginName] = pluginModule; - isOrderingDirty = true; - } - } - if (isOrderingDirty) { - recomputePluginOrdering(); - } - }, + function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var eventType; + var fallbackData; - /** - * Looks up the plugin for the supplied event. - * - * @param {object} event A synthetic event. - * @return {?object} The plugin that created the supplied event. - * @internal - */ - getPluginModuleForEvent: function (event) { - var dispatchConfig = event.dispatchConfig; - if (dispatchConfig.registrationName) { - return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null; + if (canUseCompositionEvent) { + eventType = getCompositionEventType(topLevelType); + } else if (!currentComposition) { + if (isFallbackCompositionStart(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionStart; } - if (dispatchConfig.phasedRegistrationNames !== undefined) { - // pulling phasedRegistrationNames out of dispatchConfig helps Flow see - // that it is not undefined. - var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionEnd; + } - for (var phase in phasedRegistrationNames) { - if (!phasedRegistrationNames.hasOwnProperty(phase)) { - continue; - } - var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]]; - if (pluginModule) { - return pluginModule; - } - } - } + if (!eventType) { return null; - }, - - /** - * Exposed for unit testing. - * @private - */ - _resetEventPlugins: function () { - eventPluginOrder = null; - for (var pluginName in namesToPlugins) { - if (namesToPlugins.hasOwnProperty(pluginName)) { - delete namesToPlugins[pluginName]; - } - } - EventPluginRegistry.plugins.length = 0; + } - var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs; - for (var eventName in eventNameDispatchConfigs) { - if (eventNameDispatchConfigs.hasOwnProperty(eventName)) { - delete eventNameDispatchConfigs[eventName]; + if (useFallbackCompositionData) { + // The current composition is stored statically and must not be + // overwritten while composition continues. + if (!currentComposition && eventType === eventTypes.compositionStart) { + currentComposition = FallbackCompositionState.getPooled(nativeEventTarget); + } else if (eventType === eventTypes.compositionEnd) { + if (currentComposition) { + fallbackData = currentComposition.getData(); } } + } - var registrationNameModules = EventPluginRegistry.registrationNameModules; - for (var registrationName in registrationNameModules) { - if (registrationNameModules.hasOwnProperty(registrationName)) { - delete registrationNameModules[registrationName]; - } - } + var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget); - if (process.env.NODE_ENV !== 'production') { - var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames; - for (var lowerCasedName in possibleRegistrationNames) { - if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) { - delete possibleRegistrationNames[lowerCasedName]; - } - } + if (fallbackData) { + // Inject data generated from fallback path into the synthetic event. + // This matches the property of native CompositionEventInterface. + event.data = fallbackData; + } else { + var customData = getDataFromCustomEvent(nativeEvent); + if (customData !== null) { + event.data = customData; } } - }; - - module.exports = EventPluginRegistry; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) - -/***/ }, -/* 74 */ -/***/ function(module, exports, __webpack_require__) { + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + } - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * + /** + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The string corresponding to this `beforeInput` event. */ + function getNativeBeforeInputChars(topLevelType, nativeEvent) { + switch (topLevelType) { + case topLevelTypes.topCompositionEnd: + return getDataFromCustomEvent(nativeEvent); + case topLevelTypes.topKeyPress: + /** + * If native `textInput` events are available, our goal is to make + * use of them. However, there is a special case: the spacebar key. + * In Webkit, preventing default on a spacebar `textInput` event + * cancels character insertion, but it *also* causes the browser + * to fall back to its default spacebar behavior of scrolling the + * page. + * + * Tracking at: + * https://code.google.com/p/chromium/issues/detail?id=355103 + * + * To avoid this issue, use the keypress event as if no `textInput` + * event is available. + */ + var which = nativeEvent.which; + if (which !== SPACEBAR_CODE) { + return null; + } - 'use strict'; - - var _prodInvariant = __webpack_require__(65); - - var ReactErrorUtils = __webpack_require__(75); + hasSpaceKeypress = true; + return SPACEBAR_CHAR; - var invariant = __webpack_require__(27); - var warning = __webpack_require__(30); + case topLevelTypes.topTextInput: + // Record the characters to be added to the DOM. + var chars = nativeEvent.data; - /** - * Injected dependencies: - */ - - /** - * - `ComponentTree`: [required] Module that can convert between React instances - * and actual node references. - */ - var ComponentTree; - var TreeTraversal; - var injection = { - injectComponentTree: function (Injected) { - ComponentTree = Injected; - if (process.env.NODE_ENV !== 'production') { - process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0; - } - }, - injectTreeTraversal: function (Injected) { - TreeTraversal = Injected; - if (process.env.NODE_ENV !== 'production') { - process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0; - } - } - }; - - function isEndish(topLevelType) { - return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel'; - } - - function isMoveish(topLevelType) { - return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove'; - } - function isStartish(topLevelType) { - return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart'; - } - - var validateEventDispatches; - if (process.env.NODE_ENV !== 'production') { - validateEventDispatches = function (event) { - var dispatchListeners = event._dispatchListeners; - var dispatchInstances = event._dispatchInstances; - - var listenersIsArr = Array.isArray(dispatchListeners); - var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0; - - var instancesIsArr = Array.isArray(dispatchInstances); - var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0; + // If it's a spacebar character, assume that we have already handled + // it at the keypress level and bail immediately. Android Chrome + // doesn't give us keycodes, so we need to blacklist it. + if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { + return null; + } - process.env.NODE_ENV !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0; - }; - } + return chars; - /** - * Dispatch the event to the listener. - * @param {SyntheticEvent} event SyntheticEvent to handle - * @param {boolean} simulated If the event is simulated (changes exn behavior) - * @param {function} listener Application-level callback - * @param {*} inst Internal component instance - */ - function executeDispatch(event, simulated, listener, inst) { - var type = event.type || 'unknown-event'; - event.currentTarget = EventPluginUtils.getNodeFromInstance(inst); - if (simulated) { - ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event); - } else { - ReactErrorUtils.invokeGuardedCallback(type, listener, event); + default: + // For other native event types, do nothing. + return null; } - event.currentTarget = null; } /** - * Standard/simple iteration through an event's collected dispatches. + * For browsers that do not provide the `textInput` event, extract the + * appropriate string to use for SyntheticInputEvent. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The fallback string for this `beforeInput` event. */ - function executeDispatchesInOrder(event, simulated) { - var dispatchListeners = event._dispatchListeners; - var dispatchInstances = event._dispatchInstances; - if (process.env.NODE_ENV !== 'production') { - validateEventDispatches(event); + function getFallbackBeforeInputChars(topLevelType, nativeEvent) { + // If we are currently composing (IME) and using a fallback to do so, + // try to extract the composed characters from the fallback object. + if (currentComposition) { + if (topLevelType === topLevelTypes.topCompositionEnd || isFallbackCompositionEnd(topLevelType, nativeEvent)) { + var chars = currentComposition.getData(); + FallbackCompositionState.release(currentComposition); + currentComposition = null; + return chars; + } + return null; } - if (Array.isArray(dispatchListeners)) { - for (var i = 0; i < dispatchListeners.length; i++) { - if (event.isPropagationStopped()) { - break; + + switch (topLevelType) { + case topLevelTypes.topPaste: + // If a paste event occurs after a keypress, throw out the input + // chars. Paste events should not lead to BeforeInput events. + return null; + case topLevelTypes.topKeyPress: + /** + * As of v27, Firefox may fire keypress events even when no character + * will be inserted. A few possibilities: + * + * - `which` is `0`. Arrow keys, Esc key, etc. + * + * - `which` is the pressed key code, but no char is available. + * Ex: 'AltGr + d` in Polish. There is no modified character for + * this key combination and no character is inserted into the + * document, but FF fires the keypress for char code `100` anyway. + * No `input` event will occur. + * + * - `which` is the pressed key code, but a command combination is + * being used. Ex: `Cmd+C`. No character is inserted, and no + * `input` event will occur. + */ + if (nativeEvent.which && !isKeypressCommand(nativeEvent)) { + return String.fromCharCode(nativeEvent.which); } - // Listeners and Instances are two parallel arrays that are always in sync. - executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]); - } - } else if (dispatchListeners) { - executeDispatch(event, simulated, dispatchListeners, dispatchInstances); + return null; + case topLevelTypes.topCompositionEnd: + return useFallbackCompositionData ? null : nativeEvent.data; + default: + return null; } - event._dispatchListeners = null; - event._dispatchInstances = null; } /** - * Standard/simple iteration through an event's collected dispatches, but stops - * at the first dispatch execution returning true, and returns that id. + * Extract a SyntheticInputEvent for `beforeInput`, based on either native + * `textInput` or fallback behavior. * - * @return {?string} id of the first dispatch execution who's listener returns - * true, or null if no listener returned true. + * @return {?object} A SyntheticInputEvent. */ - function executeDispatchesInOrderStopAtTrueImpl(event) { - var dispatchListeners = event._dispatchListeners; - var dispatchInstances = event._dispatchInstances; - if (process.env.NODE_ENV !== 'production') { - validateEventDispatches(event); + function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var chars; + + if (canUseTextInputEvent) { + chars = getNativeBeforeInputChars(topLevelType, nativeEvent); + } else { + chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); } - if (Array.isArray(dispatchListeners)) { - for (var i = 0; i < dispatchListeners.length; i++) { - if (event.isPropagationStopped()) { - break; - } - // Listeners and Instances are two parallel arrays that are always in sync. - if (dispatchListeners[i](event, dispatchInstances[i])) { - return dispatchInstances[i]; - } - } - } else if (dispatchListeners) { - if (dispatchListeners(event, dispatchInstances)) { - return dispatchInstances; - } + + // If no characters are being inserted, no BeforeInput event should + // be fired. + if (!chars) { + return null; } - return null; - } - /** - * @see executeDispatchesInOrderStopAtTrueImpl - */ - function executeDispatchesInOrderStopAtTrue(event) { - var ret = executeDispatchesInOrderStopAtTrueImpl(event); - event._dispatchInstances = null; - event._dispatchListeners = null; - return ret; + var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget); + + event.data = chars; + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; } /** - * Execution of a "direct" dispatch - there must be at most one dispatch - * accumulated on the event or it is considered an error. It doesn't really make - * sense for an event with multiple dispatches (bubbled) to keep track of the - * return values at each dispatch execution, but it does tend to make sense when - * dealing with "direct" dispatches. + * Create an `onBeforeInput` event to match + * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. * - * @return {*} The return value of executing the single dispatch. + * This event plugin is based on the native `textInput` event + * available in Chrome, Safari, Opera, and IE. This event fires after + * `onKeyPress` and `onCompositionEnd`, but before `onInput`. + * + * `beforeInput` is spec'd but not implemented in any browsers, and + * the `input` event does not provide any useful information about what has + * actually been added, contrary to the spec. Thus, `textInput` is the best + * available event to identify the characters that have actually been inserted + * into the target node. + * + * This plugin is also responsible for emitting `composition` events, thus + * allowing us to share composition fallback code for both `beforeInput` and + * `composition` event types. */ - function executeDirectDispatch(event) { - if (process.env.NODE_ENV !== 'production') { - validateEventDispatches(event); + var BeforeInputEventPlugin = { + + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)]; } - var dispatchListener = event._dispatchListeners; - var dispatchInstance = event._dispatchInstances; - !!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0; - event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null; - var res = dispatchListener ? dispatchListener(event) : null; - event.currentTarget = null; - event._dispatchListeners = null; - event._dispatchInstances = null; - return res; - } + }; - /** - * @param {SyntheticEvent} event - * @return {boolean} True iff number of dispatches accumulated is greater than 0. - */ - function hasDispatches(event) { - return !!event._dispatchListeners; - } + module.exports = BeforeInputEventPlugin; + +/***/ }, +/* 75 */ +/***/ function(module, exports, __webpack_require__) { /** - * General utilities that are useful in creating custom Event Plugins. + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule EventConstants */ - var EventPluginUtils = { - isEndish: isEndish, - isMoveish: isMoveish, - isStartish: isStartish, - executeDirectDispatch: executeDirectDispatch, - executeDispatchesInOrder: executeDispatchesInOrder, - executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue, - hasDispatches: hasDispatches, + 'use strict'; - getInstanceFromNode: function (node) { - return ComponentTree.getInstanceFromNode(node); - }, - getNodeFromInstance: function (node) { - return ComponentTree.getNodeFromInstance(node); - }, - isAncestor: function (a, b) { - return TreeTraversal.isAncestor(a, b); - }, - getLowestCommonAncestor: function (a, b) { - return TreeTraversal.getLowestCommonAncestor(a, b); - }, - getParentInstance: function (inst) { - return TreeTraversal.getParentInstance(inst); - }, - traverseTwoPhase: function (target, fn, arg) { - return TreeTraversal.traverseTwoPhase(target, fn, arg); - }, - traverseEnterLeave: function (from, to, fn, argFrom, argTo) { - return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo); - }, + var keyMirror = __webpack_require__(48); - injection: injection + var PropagationPhases = keyMirror({ bubbled: null, captured: null }); + + /** + * Types of raw signals from the browser caught at the top level. + */ + var topLevelTypes = keyMirror({ + topAbort: null, + topAnimationEnd: null, + topAnimationIteration: null, + topAnimationStart: null, + topBlur: null, + topCanPlay: null, + topCanPlayThrough: null, + topChange: null, + topClick: null, + topCompositionEnd: null, + topCompositionStart: null, + topCompositionUpdate: null, + topContextMenu: null, + topCopy: null, + topCut: null, + topDoubleClick: null, + topDrag: null, + topDragEnd: null, + topDragEnter: null, + topDragExit: null, + topDragLeave: null, + topDragOver: null, + topDragStart: null, + topDrop: null, + topDurationChange: null, + topEmptied: null, + topEncrypted: null, + topEnded: null, + topError: null, + topFocus: null, + topInput: null, + topInvalid: null, + topKeyDown: null, + topKeyPress: null, + topKeyUp: null, + topLoad: null, + topLoadedData: null, + topLoadedMetadata: null, + topLoadStart: null, + topMouseDown: null, + topMouseMove: null, + topMouseOut: null, + topMouseOver: null, + topMouseUp: null, + topPaste: null, + topPause: null, + topPlay: null, + topPlaying: null, + topProgress: null, + topRateChange: null, + topReset: null, + topScroll: null, + topSeeked: null, + topSeeking: null, + topSelectionChange: null, + topStalled: null, + topSubmit: null, + topSuspend: null, + topTextInput: null, + topTimeUpdate: null, + topTouchCancel: null, + topTouchEnd: null, + topTouchMove: null, + topTouchStart: null, + topTransitionEnd: null, + topVolumeChange: null, + topWaiting: null, + topWheel: null + }); + + var EventConstants = { + topLevelTypes: topLevelTypes, + PropagationPhases: PropagationPhases }; - module.exports = EventPluginUtils; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + module.exports = EventConstants; /***/ }, -/* 75 */ +/* 76 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -8017,219 +7319,383 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * + * @providesModule EventPropagators */ 'use strict'; - var caughtError = null; + var EventConstants = __webpack_require__(75); + var EventPluginHub = __webpack_require__(77); + var EventPluginUtils = __webpack_require__(79); + + var accumulateInto = __webpack_require__(81); + var forEachAccumulated = __webpack_require__(82); + var warning = __webpack_require__(29); + + var PropagationPhases = EventConstants.PropagationPhases; + var getListener = EventPluginHub.getListener; /** - * Call a function while guarding against errors that happens within it. - * - * @param {String} name of the guard to use for logging or debugging - * @param {Function} func The function to invoke - * @param {*} a First argument - * @param {*} b Second argument + * Some event types have a notion of different registration names for different + * "phases" of propagation. This finds listeners by a given phase. */ - function invokeGuardedCallback(name, func, a) { - try { - func(a); - } catch (x) { - if (caughtError === null) { - caughtError = x; - } + function listenerAtPhase(inst, event, propagationPhase) { + var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; + return getListener(inst, registrationName); + } + + /** + * Tags a `SyntheticEvent` with dispatched listeners. Creating this function + * here, allows us to not have to bind or create functions for each event. + * Mutating the event's members allows us to not have to create a wrapping + * "dispatch" object that pairs the event with the listener. + */ + function accumulateDirectionalDispatches(inst, upwards, event) { + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0; + } + var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured; + var listener = listenerAtPhase(inst, event, phase); + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); } } - var ReactErrorUtils = { - invokeGuardedCallback: invokeGuardedCallback, + /** + * Collect dispatches (must be entirely collected before dispatching - see unit + * tests). Lazily allocate the array to conserve memory. We must loop through + * each event and perform the traversal for each one. We cannot perform a + * single traversal for the entire collection of events because each event may + * have a different target. + */ + function accumulateTwoPhaseDispatchesSingle(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); + } + } - /** - * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event - * handler are sure to be rethrown by rethrowCaughtError. - */ - invokeGuardedCallbackWithCatch: invokeGuardedCallback, + /** + * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID. + */ + function accumulateTwoPhaseDispatchesSingleSkipTarget(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + var targetInst = event._targetInst; + var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null; + EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event); + } + } - /** - * During execution of guarded functions we will capture the first error which - * we will rethrow to be handled by the top level error handler. - */ - rethrowCaughtError: function () { - if (caughtError) { - var error = caughtError; - caughtError = null; - throw error; + /** + * Accumulates without regard to direction, does not look for phased + * registration names. Same as `accumulateDirectDispatchesSingle` but without + * requiring that the `dispatchMarker` be the same as the dispatched ID. + */ + function accumulateDispatches(inst, ignoredDirection, event) { + if (event && event.dispatchConfig.registrationName) { + var registrationName = event.dispatchConfig.registrationName; + var listener = getListener(inst, registrationName); + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); } } - }; + } - if (process.env.NODE_ENV !== 'production') { - /** - * To help development we can get better devtools integration by simulating a - * real browser event. - */ - if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') { - var fakeNode = document.createElement('react'); - ReactErrorUtils.invokeGuardedCallback = function (name, func, a) { - var boundFunc = func.bind(null, a); - var evtType = 'react-' + name; - fakeNode.addEventListener(evtType, boundFunc, false); - var evt = document.createEvent('Event'); - // $FlowFixMe https://github.com/facebook/flow/issues/2336 - evt.initEvent(evtType, false, false); - fakeNode.dispatchEvent(evt); - fakeNode.removeEventListener(evtType, boundFunc, false); - }; + /** + * Accumulates dispatches on an `SyntheticEvent`, but only for the + * `dispatchMarker`. + * @param {SyntheticEvent} event + */ + function accumulateDirectDispatchesSingle(event) { + if (event && event.dispatchConfig.registrationName) { + accumulateDispatches(event._targetInst, null, event); } } - module.exports = ReactErrorUtils; + function accumulateTwoPhaseDispatches(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); + } + + function accumulateTwoPhaseDispatchesSkipTarget(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget); + } + + function accumulateEnterLeaveDispatches(leave, enter, from, to) { + EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter); + } + + function accumulateDirectDispatches(events) { + forEachAccumulated(events, accumulateDirectDispatchesSingle); + } + + /** + * A small set of propagation patterns, each of which will accept a small amount + * of information, and generate a set of "dispatch ready event objects" - which + * are sets of events that have already been annotated with a set of dispatched + * listener functions/ids. The API is designed this way to discourage these + * propagation strategies from actually executing the dispatches, since we + * always want to collect the entire set of dispatches before executing event a + * single one. + * + * @constructor EventPropagators + */ + var EventPropagators = { + accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches, + accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget, + accumulateDirectDispatches: accumulateDirectDispatches, + accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches + }; + + module.exports = EventPropagators; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 76 */ +/* 77 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2014-present, Facebook, Inc. + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * + * @providesModule EventPluginHub */ 'use strict'; - var _prodInvariant = __webpack_require__(65); + var EventPluginRegistry = __webpack_require__(78); + var EventPluginUtils = __webpack_require__(79); + var ReactErrorUtils = __webpack_require__(80); - var invariant = __webpack_require__(27); + var accumulateInto = __webpack_require__(81); + var forEachAccumulated = __webpack_require__(82); + var invariant = __webpack_require__(26); /** - * Accumulates items that must not be null or undefined into the first one. This - * is used to conserve memory by avoiding array allocations, and thus sacrifices - * API cleanness. Since `current` can be null before being passed in and not - * null after this function, make sure to assign it back to `current`: - * - * `a = accumulateInto(a, b);` - * - * This API should be sparingly used. Try `accumulate` for something cleaner. - * - * @return {*|array<*>} An accumulation of items. + * Internal store for event listeners */ + var listenerBank = {}; - function accumulateInto(current, next) { - !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0; + /** + * Internal queue of events that have accumulated their dispatches and are + * waiting to have their dispatches executed. + */ + var eventQueue = null; - if (current == null) { - return next; - } + /** + * Dispatches an event and releases it back into the pool, unless persistent. + * + * @param {?object} event Synthetic event to be dispatched. + * @param {boolean} simulated If the event is simulated (changes exn behavior) + * @private + */ + var executeDispatchesAndRelease = function (event, simulated) { + if (event) { + EventPluginUtils.executeDispatchesInOrder(event, simulated); - // Both are not empty. Warning: Never call x.concat(y) when you are not - // certain that x is an Array (x could be a string with concat method). - if (Array.isArray(current)) { - if (Array.isArray(next)) { - current.push.apply(current, next); - return current; + if (!event.isPersistent()) { + event.constructor.release(event); } - current.push(next); - return current; - } - - if (Array.isArray(next)) { - // A bit too dangerous to mutate `next`. - return [current].concat(next); } - - return [current, next]; - } - - module.exports = accumulateInto; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) - -/***/ }, -/* 77 */ -/***/ function(module, exports) { + }; + var executeDispatchesAndReleaseSimulated = function (e) { + return executeDispatchesAndRelease(e, true); + }; + var executeDispatchesAndReleaseTopLevel = function (e) { + return executeDispatchesAndRelease(e, false); + }; /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. + * This is a unified interface for event plugins to be installed and configured. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * Event plugins can implement the following properties: * - * + * `extractEvents` {function(string, DOMEventTarget, string, object): *} + * Required. When a top-level event is fired, this method is expected to + * extract synthetic events that will in turn be queued and dispatched. + * + * `eventTypes` {object} + * Optional, plugins that fire events must publish a mapping of registration + * names that are used to register listeners. Values of this mapping must + * be objects that contain `registrationName` or `phasedRegistrationNames`. + * + * `executeDispatch` {function(object, function, string)} + * Optional, allows plugins to override how an event gets dispatched. By + * default, the listener is simply invoked. + * + * Each plugin that is injected into `EventsPluginHub` is immediately operable. + * + * @public */ + var EventPluginHub = { - 'use strict'; + /** + * Methods for injecting dependencies. + */ + injection: { - /** - * @param {array} arr an "accumulation" of items which is either an Array or - * a single item. Useful when paired with the `accumulate` module. This is a - * simple utility that allows us to reason about a collection of items, but - * handling the case when there is exactly one item (and we do not need to - * allocate an array). - */ + /** + * @param {array} InjectedEventPluginOrder + * @public + */ + injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder, - function forEachAccumulated(arr, cb, scope) { - if (Array.isArray(arr)) { - arr.forEach(cb, scope); - } else if (arr) { - cb.call(scope, arr); - } - } + /** + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + */ + injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName - module.exports = forEachAccumulated; + }, -/***/ }, -/* 78 */ -/***/ function(module, exports) { + /** + * Stores `listener` at `listenerBank[registrationName][id]`. Is idempotent. + * + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {function} listener The callback to store. + */ + putListener: function (inst, registrationName, listener) { + !(typeof listener === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : invariant(false) : void 0; - /** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {}); + bankForRegistrationName[inst._rootNodeID] = listener; - 'use strict'; + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.didPutListener) { + PluginModule.didPutListener(inst, registrationName, listener); + } + }, - var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + /** + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @return {?function} The stored callback. + */ + getListener: function (inst, registrationName) { + var bankForRegistrationName = listenerBank[registrationName]; + return bankForRegistrationName && bankForRegistrationName[inst._rootNodeID]; + }, - /** - * Simple, lightweight module assisting with the detection and context of - * Worker. Helps avoid circular dependencies and allows code to reason about - * whether or not they are in a Worker, even if they never include the main - * `ReactWorker` dependency. - */ - var ExecutionEnvironment = { + /** + * Deletes a listener from the registration bank. + * + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + */ + deleteListener: function (inst, registrationName) { + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.willDeleteListener) { + PluginModule.willDeleteListener(inst, registrationName); + } - canUseDOM: canUseDOM, + var bankForRegistrationName = listenerBank[registrationName]; + // TODO: This should never be null -- when is it? + if (bankForRegistrationName) { + delete bankForRegistrationName[inst._rootNodeID]; + } + }, - canUseWorkers: typeof Worker !== 'undefined', + /** + * Deletes all listeners for the DOM element with the supplied ID. + * + * @param {object} inst The instance, which is the source of events. + */ + deleteAllListeners: function (inst) { + for (var registrationName in listenerBank) { + if (!listenerBank[registrationName][inst._rootNodeID]) { + continue; + } - canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.willDeleteListener) { + PluginModule.willDeleteListener(inst, registrationName); + } - canUseViewport: canUseDOM && !!window.screen, + delete listenerBank[registrationName][inst._rootNodeID]; + } + }, - isInWorker: !canUseDOM // For now, this is true - might change in the future. + /** + * Allows registered plugins an opportunity to extract events from top-level + * native browser events. + * + * @return {*} An accumulation of synthetic events. + * @internal + */ + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var events; + var plugins = EventPluginRegistry.plugins; + for (var i = 0; i < plugins.length; i++) { + // Not every plugin in the ordering may be loaded at runtime. + var possiblePlugin = plugins[i]; + if (possiblePlugin) { + var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); + if (extractedEvents) { + events = accumulateInto(events, extractedEvents); + } + } + } + return events; + }, + + /** + * Enqueues a synthetic event that should be dispatched when + * `processEventQueue` is invoked. + * + * @param {*} events An accumulation of synthetic events. + * @internal + */ + enqueueEvents: function (events) { + if (events) { + eventQueue = accumulateInto(eventQueue, events); + } + }, + + /** + * Dispatches all synthetic events on the event queue. + * + * @internal + */ + processEventQueue: function (simulated) { + // Set `eventQueue` to null before processing it so that we can tell if more + // events get enqueued while processing. + var processingEventQueue = eventQueue; + eventQueue = null; + if (simulated) { + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated); + } else { + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); + } + !!eventQueue ? process.env.NODE_ENV !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing ' + 'an event queue. Support for this has not yet been implemented.') : invariant(false) : void 0; + // This would be a good time to rethrow if any of the event handlers threw. + ReactErrorUtils.rethrowCaughtError(); + }, + + /** + * These are needed for tests only. Do not use! + */ + __purge: function () { + listenerBank = {}; + }, + + __getListenerBank: function () { + return listenerBank; + } }; - module.exports = ExecutionEnvironment; + module.exports = EventPluginHub; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 79 */ +/* 78 */ /***/ function(module, exports, __webpack_require__) { - /** + /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -8237,95 +7703,243 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule EventPluginRegistry */ 'use strict'; - var _assign = __webpack_require__(23); - - var PooledClass = __webpack_require__(80); - - var getTextContentAccessor = __webpack_require__(81); + var invariant = __webpack_require__(26); /** - * This helper class stores information about text content of a target node, - * allowing comparison of content before and after a given event. + * Injectable ordering of event plugins. + */ + var EventPluginOrder = null; + + /** + * Injectable mapping from names to event plugin modules. + */ + var namesToPlugins = {}; + + /** + * Recomputes the plugin list using the injected plugins and plugin ordering. * - * Identify the node where selection currently begins, then observe - * both its text content and its current position in the DOM. Since the - * browser may natively replace the target node during composition, we can - * use its position to find its replacement. + * @private + */ + function recomputePluginOrdering() { + if (!EventPluginOrder) { + // Wait until an `EventPluginOrder` is injected. + return; + } + for (var pluginName in namesToPlugins) { + var PluginModule = namesToPlugins[pluginName]; + var pluginIndex = EventPluginOrder.indexOf(pluginName); + !(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in ' + 'the plugin ordering, `%s`.', pluginName) : invariant(false) : void 0; + if (EventPluginRegistry.plugins[pluginIndex]) { + continue; + } + !PluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` ' + 'method, but `%s` does not.', pluginName) : invariant(false) : void 0; + EventPluginRegistry.plugins[pluginIndex] = PluginModule; + var publishedEvents = PluginModule.eventTypes; + for (var eventName in publishedEvents) { + !publishEventForPlugin(publishedEvents[eventName], PluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : invariant(false) : void 0; + } + } + } + + /** + * Publishes an event so that it can be dispatched by the supplied plugin. * - * @param {DOMEventTarget} root + * @param {object} dispatchConfig Dispatch configuration for the event. + * @param {object} PluginModule Plugin publishing the event. + * @return {boolean} True if the event was successfully published. + * @private */ - function FallbackCompositionState(root) { - this._root = root; - this._startText = this.getText(); - this._fallbackText = null; + function publishEventForPlugin(dispatchConfig, PluginModule, eventName) { + !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'event name, `%s`.', eventName) : invariant(false) : void 0; + EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig; + + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + if (phasedRegistrationNames) { + for (var phaseName in phasedRegistrationNames) { + if (phasedRegistrationNames.hasOwnProperty(phaseName)) { + var phasedRegistrationName = phasedRegistrationNames[phaseName]; + publishRegistrationName(phasedRegistrationName, PluginModule, eventName); + } + } + return true; + } else if (dispatchConfig.registrationName) { + publishRegistrationName(dispatchConfig.registrationName, PluginModule, eventName); + return true; + } + return false; } - _assign(FallbackCompositionState.prototype, { - destructor: function () { - this._root = null; - this._startText = null; - this._fallbackText = null; + /** + * Publishes a registration name that is used to identify dispatched events and + * can be used with `EventPluginHub.putListener` to register listeners. + * + * @param {string} registrationName Registration name to add. + * @param {object} PluginModule Plugin publishing the event. + * @private + */ + function publishRegistrationName(registrationName, PluginModule, eventName) { + !!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName) : invariant(false) : void 0; + EventPluginRegistry.registrationNameModules[registrationName] = PluginModule; + EventPluginRegistry.registrationNameDependencies[registrationName] = PluginModule.eventTypes[eventName].dependencies; + + if (process.env.NODE_ENV !== 'production') { + var lowerCasedName = registrationName.toLowerCase(); + EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName; + } + } + + /** + * Registers plugins so that they can extract and dispatch events. + * + * @see {EventPluginHub} + */ + var EventPluginRegistry = { + + /** + * Ordered list of injected plugins. + */ + plugins: [], + + /** + * Mapping from event name to dispatch config + */ + eventNameDispatchConfigs: {}, + + /** + * Mapping from registration name to plugin module + */ + registrationNameModules: {}, + + /** + * Mapping from registration name to event name + */ + registrationNameDependencies: {}, + + /** + * Mapping from lowercase registration names to the properly cased version, + * used to warn in the case of missing event handlers. Available + * only in __DEV__. + * @type {Object} + */ + possibleRegistrationNames: process.env.NODE_ENV !== 'production' ? {} : null, + + /** + * Injects an ordering of plugins (by plugin name). This allows the ordering + * to be decoupled from injection of the actual plugins so that ordering is + * always deterministic regardless of packaging, on-the-fly injection, etc. + * + * @param {array} InjectedEventPluginOrder + * @internal + * @see {EventPluginHub.injection.injectEventPluginOrder} + */ + injectEventPluginOrder: function (InjectedEventPluginOrder) { + !!EventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than ' + 'once. You are likely trying to load more than one copy of React.') : invariant(false) : void 0; + // Clone the ordering so it cannot be dynamically mutated. + EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder); + recomputePluginOrdering(); }, /** - * Get current text of input. + * Injects plugins to be used by `EventPluginHub`. The plugin names must be + * in the ordering injected by `injectEventPluginOrder`. * - * @return {string} + * Plugins can be injected as part of page initialization or on-the-fly. + * + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + * @internal + * @see {EventPluginHub.injection.injectEventPluginsByName} */ - getText: function () { - if ('value' in this._root) { - return this._root.value; + injectEventPluginsByName: function (injectedNamesToPlugins) { + var isOrderingDirty = false; + for (var pluginName in injectedNamesToPlugins) { + if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { + continue; + } + var PluginModule = injectedNamesToPlugins[pluginName]; + if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== PluginModule) { + !!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins ' + 'using the same name, `%s`.', pluginName) : invariant(false) : void 0; + namesToPlugins[pluginName] = PluginModule; + isOrderingDirty = true; + } + } + if (isOrderingDirty) { + recomputePluginOrdering(); } - return this._root[getTextContentAccessor()]; }, /** - * Determine the differing substring between the initially stored - * text content and the current content. + * Looks up the plugin for the supplied event. * - * @return {string} + * @param {object} event A synthetic event. + * @return {?object} The plugin that created the supplied event. + * @internal */ - getData: function () { - if (this._fallbackText) { - return this._fallbackText; + getPluginModuleForEvent: function (event) { + var dispatchConfig = event.dispatchConfig; + if (dispatchConfig.registrationName) { + return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null; + } + for (var phase in dispatchConfig.phasedRegistrationNames) { + if (!dispatchConfig.phasedRegistrationNames.hasOwnProperty(phase)) { + continue; + } + var PluginModule = EventPluginRegistry.registrationNameModules[dispatchConfig.phasedRegistrationNames[phase]]; + if (PluginModule) { + return PluginModule; + } } + return null; + }, - var start; - var startValue = this._startText; - var startLength = startValue.length; - var end; - var endValue = this.getText(); - var endLength = endValue.length; + /** + * Exposed for unit testing. + * @private + */ + _resetEventPlugins: function () { + EventPluginOrder = null; + for (var pluginName in namesToPlugins) { + if (namesToPlugins.hasOwnProperty(pluginName)) { + delete namesToPlugins[pluginName]; + } + } + EventPluginRegistry.plugins.length = 0; - for (start = 0; start < startLength; start++) { - if (startValue[start] !== endValue[start]) { - break; + var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs; + for (var eventName in eventNameDispatchConfigs) { + if (eventNameDispatchConfigs.hasOwnProperty(eventName)) { + delete eventNameDispatchConfigs[eventName]; } } - var minEnd = startLength - start; - for (end = 1; end <= minEnd; end++) { - if (startValue[startLength - end] !== endValue[endLength - end]) { - break; + var registrationNameModules = EventPluginRegistry.registrationNameModules; + for (var registrationName in registrationNameModules) { + if (registrationNameModules.hasOwnProperty(registrationName)) { + delete registrationNameModules[registrationName]; } } - var sliceTail = end > 1 ? 1 - end : undefined; - this._fallbackText = endValue.slice(start, sliceTail); - return this._fallbackText; + if (process.env.NODE_ENV !== 'production') { + var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames; + for (var lowerCasedName in possibleRegistrationNames) { + if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) { + delete possibleRegistrationNames[lowerCasedName]; + } + } + } } - }); - PooledClass.addPoolingTo(FallbackCompositionState); + }; - module.exports = FallbackCompositionState; + module.exports = EventPluginRegistry; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 80 */ +/* 79 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -8336,128 +7950,232 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * + * @providesModule EventPluginUtils */ 'use strict'; - var _prodInvariant = __webpack_require__(65); + var EventConstants = __webpack_require__(75); + var ReactErrorUtils = __webpack_require__(80); - var invariant = __webpack_require__(27); + var invariant = __webpack_require__(26); + var warning = __webpack_require__(29); /** - * Static poolers. Several custom versions for each potential number of - * arguments. A completely generic pooler is easy to implement, but would - * require accessing the `arguments` object. In each of these, `this` refers to - * the Class itself, not an instance. If any others are needed, simply add them - * here, or in their own files. + * Injected dependencies: */ - var oneArgumentPooler = function (copyFieldsFrom) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, copyFieldsFrom); - return instance; - } else { - return new Klass(copyFieldsFrom); + + /** + * - `ComponentTree`: [required] Module that can convert between React instances + * and actual node references. + */ + var ComponentTree; + var TreeTraversal; + var injection = { + injectComponentTree: function (Injected) { + ComponentTree = Injected; + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0; + } + }, + injectTreeTraversal: function (Injected) { + TreeTraversal = Injected; + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0; + } } }; - var twoArgumentPooler = function (a1, a2) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2); - return instance; - } else { - return new Klass(a1, a2); - } - }; + var topLevelTypes = EventConstants.topLevelTypes; - var threeArgumentPooler = function (a1, a2, a3) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2, a3); - return instance; - } else { - return new Klass(a1, a2, a3); - } - }; + function isEndish(topLevelType) { + return topLevelType === topLevelTypes.topMouseUp || topLevelType === topLevelTypes.topTouchEnd || topLevelType === topLevelTypes.topTouchCancel; + } - var fourArgumentPooler = function (a1, a2, a3, a4) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2, a3, a4); - return instance; + function isMoveish(topLevelType) { + return topLevelType === topLevelTypes.topMouseMove || topLevelType === topLevelTypes.topTouchMove; + } + function isStartish(topLevelType) { + return topLevelType === topLevelTypes.topMouseDown || topLevelType === topLevelTypes.topTouchStart; + } + + var validateEventDispatches; + if (process.env.NODE_ENV !== 'production') { + validateEventDispatches = function (event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + + var listenersIsArr = Array.isArray(dispatchListeners); + var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0; + + var instancesIsArr = Array.isArray(dispatchInstances); + var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0; + + process.env.NODE_ENV !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0; + }; + } + + /** + * Dispatch the event to the listener. + * @param {SyntheticEvent} event SyntheticEvent to handle + * @param {boolean} simulated If the event is simulated (changes exn behavior) + * @param {function} listener Application-level callback + * @param {*} inst Internal component instance + */ + function executeDispatch(event, simulated, listener, inst) { + var type = event.type || 'unknown-event'; + event.currentTarget = EventPluginUtils.getNodeFromInstance(inst); + if (simulated) { + ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event); } else { - return new Klass(a1, a2, a3, a4); + ReactErrorUtils.invokeGuardedCallback(type, listener, event); } - }; + event.currentTarget = null; + } - var fiveArgumentPooler = function (a1, a2, a3, a4, a5) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2, a3, a4, a5); - return instance; - } else { - return new Klass(a1, a2, a3, a4, a5); + /** + * Standard/simple iteration through an event's collected dispatches. + */ + function executeDispatchesInOrder(event, simulated) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + if (process.env.NODE_ENV !== 'production') { + validateEventDispatches(event); } - }; + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } + // Listeners and Instances are two parallel arrays that are always in sync. + executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]); + } + } else if (dispatchListeners) { + executeDispatch(event, simulated, dispatchListeners, dispatchInstances); + } + event._dispatchListeners = null; + event._dispatchInstances = null; + } - var standardReleaser = function (instance) { - var Klass = this; - !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; - instance.destructor(); - if (Klass.instancePool.length < Klass.poolSize) { - Klass.instancePool.push(instance); + /** + * Standard/simple iteration through an event's collected dispatches, but stops + * at the first dispatch execution returning true, and returns that id. + * + * @return {?string} id of the first dispatch execution who's listener returns + * true, or null if no listener returned true. + */ + function executeDispatchesInOrderStopAtTrueImpl(event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + if (process.env.NODE_ENV !== 'production') { + validateEventDispatches(event); } - }; + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } + // Listeners and Instances are two parallel arrays that are always in sync. + if (dispatchListeners[i](event, dispatchInstances[i])) { + return dispatchInstances[i]; + } + } + } else if (dispatchListeners) { + if (dispatchListeners(event, dispatchInstances)) { + return dispatchInstances; + } + } + return null; + } - var DEFAULT_POOL_SIZE = 10; - var DEFAULT_POOLER = oneArgumentPooler; + /** + * @see executeDispatchesInOrderStopAtTrueImpl + */ + function executeDispatchesInOrderStopAtTrue(event) { + var ret = executeDispatchesInOrderStopAtTrueImpl(event); + event._dispatchInstances = null; + event._dispatchListeners = null; + return ret; + } /** - * Augments `CopyConstructor` to be a poolable class, augmenting only the class - * itself (statically) not adding any prototypical fields. Any CopyConstructor - * you give this may have a `poolSize` property, and will look for a - * prototypical `destructor` on instances. + * Execution of a "direct" dispatch - there must be at most one dispatch + * accumulated on the event or it is considered an error. It doesn't really make + * sense for an event with multiple dispatches (bubbled) to keep track of the + * return values at each dispatch execution, but it does tend to make sense when + * dealing with "direct" dispatches. * - * @param {Function} CopyConstructor Constructor that can be used to reset. - * @param {Function} pooler Customizable pooler. + * @return {*} The return value of executing the single dispatch. */ - var addPoolingTo = function (CopyConstructor, pooler) { - // Casting as any so that flow ignores the actual implementation and trusts - // it to match the type we declared - var NewKlass = CopyConstructor; - NewKlass.instancePool = []; - NewKlass.getPooled = pooler || DEFAULT_POOLER; - if (!NewKlass.poolSize) { - NewKlass.poolSize = DEFAULT_POOL_SIZE; + function executeDirectDispatch(event) { + if (process.env.NODE_ENV !== 'production') { + validateEventDispatches(event); } - NewKlass.release = standardReleaser; - return NewKlass; - }; + var dispatchListener = event._dispatchListeners; + var dispatchInstance = event._dispatchInstances; + !!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : invariant(false) : void 0; + event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null; + var res = dispatchListener ? dispatchListener(event) : null; + event.currentTarget = null; + event._dispatchListeners = null; + event._dispatchInstances = null; + return res; + } - var PooledClass = { - addPoolingTo: addPoolingTo, - oneArgumentPooler: oneArgumentPooler, - twoArgumentPooler: twoArgumentPooler, - threeArgumentPooler: threeArgumentPooler, - fourArgumentPooler: fourArgumentPooler, - fiveArgumentPooler: fiveArgumentPooler + /** + * @param {SyntheticEvent} event + * @return {boolean} True iff number of dispatches accumulated is greater than 0. + */ + function hasDispatches(event) { + return !!event._dispatchListeners; + } + + /** + * General utilities that are useful in creating custom Event Plugins. + */ + var EventPluginUtils = { + isEndish: isEndish, + isMoveish: isMoveish, + isStartish: isStartish, + + executeDirectDispatch: executeDirectDispatch, + executeDispatchesInOrder: executeDispatchesInOrder, + executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue, + hasDispatches: hasDispatches, + + getInstanceFromNode: function (node) { + return ComponentTree.getInstanceFromNode(node); + }, + getNodeFromInstance: function (node) { + return ComponentTree.getNodeFromInstance(node); + }, + isAncestor: function (a, b) { + return TreeTraversal.isAncestor(a, b); + }, + getLowestCommonAncestor: function (a, b) { + return TreeTraversal.getLowestCommonAncestor(a, b); + }, + getParentInstance: function (inst) { + return TreeTraversal.getParentInstance(inst); + }, + traverseTwoPhase: function (target, fn, arg) { + return TreeTraversal.traverseTwoPhase(target, fn, arg); + }, + traverseEnterLeave: function (from, to, fn, argFrom, argTo) { + return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo); + }, + + injection: injection }; - module.exports = PooledClass; + module.exports = EventPluginUtils; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 81 */ +/* 80 */ /***/ function(module, exports, __webpack_require__) { - /** + /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -8465,76 +8183,146 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule ReactErrorUtils */ 'use strict'; - var ExecutionEnvironment = __webpack_require__(78); - - var contentKey = null; + var caughtError = null; /** - * Gets the key used to access text content on a DOM node. + * Call a function while guarding against errors that happens within it. * - * @return {?string} Key used to access text content. - * @internal + * @param {?String} name of the guard to use for logging or debugging + * @param {Function} func The function to invoke + * @param {*} a First argument + * @param {*} b Second argument */ - function getTextContentAccessor() { - if (!contentKey && ExecutionEnvironment.canUseDOM) { - // Prefer textContent to innerText because many browsers support both but - // SVG elements don't support innerText even when
does. - contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText'; + function invokeGuardedCallback(name, func, a, b) { + try { + return func(a, b); + } catch (x) { + if (caughtError === null) { + caughtError = x; + } + return undefined; } - return contentKey; } - module.exports = getTextContentAccessor; - -/***/ }, -/* 82 */ -/***/ function(module, exports, __webpack_require__) { + var ReactErrorUtils = { + invokeGuardedCallback: invokeGuardedCallback, - /** - * Copyright 2013-present, Facebook, Inc. + /** + * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event + * handler are sure to be rethrown by rethrowCaughtError. + */ + invokeGuardedCallbackWithCatch: invokeGuardedCallback, + + /** + * During execution of guarded functions we will capture the first error which + * we will rethrow to be handled by the top level error handler. + */ + rethrowCaughtError: function () { + if (caughtError) { + var error = caughtError; + caughtError = null; + throw error; + } + } + }; + + if (process.env.NODE_ENV !== 'production') { + /** + * To help development we can get better devtools integration by simulating a + * real browser event. + */ + if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') { + var fakeNode = document.createElement('react'); + ReactErrorUtils.invokeGuardedCallback = function (name, func, a, b) { + var boundFunc = func.bind(null, a, b); + var evtType = 'react-' + name; + fakeNode.addEventListener(evtType, boundFunc, false); + var evt = document.createEvent('Event'); + evt.initEvent(evtType, false, false); + fakeNode.dispatchEvent(evt); + fakeNode.removeEventListener(evtType, boundFunc, false); + }; + } + } + + module.exports = ReactErrorUtils; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + +/***/ }, +/* 81 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule accumulateInto */ 'use strict'; - var SyntheticEvent = __webpack_require__(83); + var invariant = __webpack_require__(26); /** - * @interface Event - * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents + * + * Accumulates items that must not be null or undefined into the first one. This + * is used to conserve memory by avoiding array allocations, and thus sacrifices + * API cleanness. Since `current` can be null before being passed in and not + * null after this function, make sure to assign it back to `current`: + * + * `a = accumulateInto(a, b);` + * + * This API should be sparingly used. Try `accumulate` for something cleaner. + * + * @return {*|array<*>} An accumulation of items. */ - var CompositionEventInterface = { - data: null - }; - /** - * @param {object} dispatchConfig Configuration used to dispatch this event. - * @param {string} dispatchMarker Marker identifying the event target. - * @param {object} nativeEvent Native browser event. - * @extends {SyntheticUIEvent} - */ - function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { - return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); - } + function accumulateInto(current, next) { + !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : invariant(false) : void 0; + if (current == null) { + return next; + } - SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface); + // Both are not empty. Warning: Never call x.concat(y) when you are not + // certain that x is an Array (x could be a string with concat method). + var currentIsArray = Array.isArray(current); + var nextIsArray = Array.isArray(next); - module.exports = SyntheticCompositionEvent; + if (currentIsArray && nextIsArray) { + current.push.apply(current, next); + return current; + } + + if (currentIsArray) { + current.push(next); + return current; + } + + if (nextIsArray) { + // A bit too dangerous to mutate `next`. + return [current].concat(next); + } + + return [current, next]; + } + + module.exports = accumulateInto; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 83 */ -/***/ function(module, exports, __webpack_require__) { +/* 82 */ +/***/ function(module, exports) { - /* WEBPACK VAR INJECTION */(function(process) {/** + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -8542,138 +8330,345 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule forEachAccumulated */ 'use strict'; - var _assign = __webpack_require__(23); - - var PooledClass = __webpack_require__(80); - - var emptyFunction = __webpack_require__(31); - var warning = __webpack_require__(30); - - var didWarnForAddedNewProperty = false; - var isProxySupported = typeof Proxy === 'function'; - - var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances']; - /** - * @interface Event - * @see http://www.w3.org/TR/DOM-Level-3-Events/ + * @param {array} arr an "accumulation" of items which is either an Array or + * a single item. Useful when paired with the `accumulate` module. This is a + * simple utility that allows us to reason about a collection of items, but + * handling the case when there is exactly one item (and we do not need to + * allocate an array). */ - var EventInterface = { - type: null, - target: null, - // currentTarget is set when dispatching; no use in copying it here - currentTarget: emptyFunction.thatReturnsNull, - eventPhase: null, - bubbles: null, - cancelable: null, - timeStamp: function (event) { - return event.timeStamp || Date.now(); - }, - defaultPrevented: null, - isTrusted: null + + var forEachAccumulated = function (arr, cb, scope) { + if (Array.isArray(arr)) { + arr.forEach(cb, scope); + } else if (arr) { + cb.call(scope, arr); + } }; + module.exports = forEachAccumulated; + +/***/ }, +/* 83 */ +/***/ function(module, exports, __webpack_require__) { + /** - * Synthetic events are dispatched by event plugins, typically in response to a - * top-level event delegation handler. - * - * These systems should generally use pooling to reduce the frequency of garbage - * collection. The system should check `isPersistent` to determine whether the - * event should be released into the pool after being dispatched. Users that - * need a persisted event should invoke `persist`. + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. * - * Synthetic events (and subclasses) implement the DOM Level 3 Events API by - * normalizing browser quirks. Subclasses do not necessarily have to implement a - * DOM interface; custom application-specific events can also subclass this. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * @param {object} dispatchConfig Configuration used to dispatch this event. - * @param {*} targetInst Marker identifying the event target. - * @param {object} nativeEvent Native browser event. - * @param {DOMEventTarget} nativeEventTarget Target node. + * @providesModule FallbackCompositionState */ - function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) { - if (process.env.NODE_ENV !== 'production') { - // these have a getter/setter for warnings - delete this.nativeEvent; - delete this.preventDefault; - delete this.stopPropagation; - } - this.dispatchConfig = dispatchConfig; - this._targetInst = targetInst; - this.nativeEvent = nativeEvent; + 'use strict'; - var Interface = this.constructor.Interface; - for (var propName in Interface) { - if (!Interface.hasOwnProperty(propName)) { - continue; - } - if (process.env.NODE_ENV !== 'production') { - delete this[propName]; // this has a getter/setter for warnings - } - var normalize = Interface[propName]; - if (normalize) { - this[propName] = normalize(nativeEvent); - } else { - if (propName === 'target') { - this.target = nativeEventTarget; - } else { - this[propName] = nativeEvent[propName]; - } - } - } + var _assign = __webpack_require__(23); - var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false; - if (defaultPrevented) { - this.isDefaultPrevented = emptyFunction.thatReturnsTrue; - } else { - this.isDefaultPrevented = emptyFunction.thatReturnsFalse; - } - this.isPropagationStopped = emptyFunction.thatReturnsFalse; - return this; - } + var PooledClass = __webpack_require__(25); - _assign(SyntheticEvent.prototype, { + var getTextContentAccessor = __webpack_require__(84); - preventDefault: function () { - this.defaultPrevented = true; - var event = this.nativeEvent; - if (!event) { - return; - } + /** + * This helper class stores information about text content of a target node, + * allowing comparison of content before and after a given event. + * + * Identify the node where selection currently begins, then observe + * both its text content and its current position in the DOM. Since the + * browser may natively replace the target node during composition, we can + * use its position to find its replacement. + * + * @param {DOMEventTarget} root + */ + function FallbackCompositionState(root) { + this._root = root; + this._startText = this.getText(); + this._fallbackText = null; + } - if (event.preventDefault) { - event.preventDefault(); - } else if (typeof event.returnValue !== 'unknown') { - // eslint-disable-line valid-typeof - event.returnValue = false; - } - this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + _assign(FallbackCompositionState.prototype, { + destructor: function () { + this._root = null; + this._startText = null; + this._fallbackText = null; }, - stopPropagation: function () { - var event = this.nativeEvent; - if (!event) { - return; - } - - if (event.stopPropagation) { - event.stopPropagation(); - } else if (typeof event.cancelBubble !== 'unknown') { - // eslint-disable-line valid-typeof - // The ChangeEventPlugin registers a "propertychange" event for - // IE. This event does not support bubbling or cancelling, and - // any references to cancelBubble throw "Member not found". A - // typeof check of "unknown" circumvents this issue (and is also - // IE specific). - event.cancelBubble = true; + /** + * Get current text of input. + * + * @return {string} + */ + getText: function () { + if ('value' in this._root) { + return this._root.value; } - - this.isPropagationStopped = emptyFunction.thatReturnsTrue; + return this._root[getTextContentAccessor()]; + }, + + /** + * Determine the differing substring between the initially stored + * text content and the current content. + * + * @return {string} + */ + getData: function () { + if (this._fallbackText) { + return this._fallbackText; + } + + var start; + var startValue = this._startText; + var startLength = startValue.length; + var end; + var endValue = this.getText(); + var endLength = endValue.length; + + for (start = 0; start < startLength; start++) { + if (startValue[start] !== endValue[start]) { + break; + } + } + + var minEnd = startLength - start; + for (end = 1; end <= minEnd; end++) { + if (startValue[startLength - end] !== endValue[endLength - end]) { + break; + } + } + + var sliceTail = end > 1 ? 1 - end : undefined; + this._fallbackText = endValue.slice(start, sliceTail); + return this._fallbackText; + } + }); + + PooledClass.addPoolingTo(FallbackCompositionState); + + module.exports = FallbackCompositionState; + +/***/ }, +/* 84 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getTextContentAccessor + */ + + 'use strict'; + + var ExecutionEnvironment = __webpack_require__(39); + + var contentKey = null; + + /** + * Gets the key used to access text content on a DOM node. + * + * @return {?string} Key used to access text content. + * @internal + */ + function getTextContentAccessor() { + if (!contentKey && ExecutionEnvironment.canUseDOM) { + // Prefer textContent to innerText because many browsers support both but + // SVG elements don't support innerText even when
does. + contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText'; + } + return contentKey; + } + + module.exports = getTextContentAccessor; + +/***/ }, +/* 85 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticCompositionEvent + */ + + 'use strict'; + + var SyntheticEvent = __webpack_require__(86); + + /** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents + */ + var CompositionEventInterface = { + data: null + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface); + + module.exports = SyntheticCompositionEvent; + +/***/ }, +/* 86 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticEvent + */ + + 'use strict'; + + var _assign = __webpack_require__(23); + + var PooledClass = __webpack_require__(25); + + var emptyFunction = __webpack_require__(30); + var warning = __webpack_require__(29); + + var didWarnForAddedNewProperty = false; + var isProxySupported = typeof Proxy === 'function'; + + var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances']; + + /** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + var EventInterface = { + type: null, + target: null, + // currentTarget is set when dispatching; no use in copying it here + currentTarget: emptyFunction.thatReturnsNull, + eventPhase: null, + bubbles: null, + cancelable: null, + timeStamp: function (event) { + return event.timeStamp || Date.now(); + }, + defaultPrevented: null, + isTrusted: null + }; + + /** + * Synthetic events are dispatched by event plugins, typically in response to a + * top-level event delegation handler. + * + * These systems should generally use pooling to reduce the frequency of garbage + * collection. The system should check `isPersistent` to determine whether the + * event should be released into the pool after being dispatched. Users that + * need a persisted event should invoke `persist`. + * + * Synthetic events (and subclasses) implement the DOM Level 3 Events API by + * normalizing browser quirks. Subclasses do not necessarily have to implement a + * DOM interface; custom application-specific events can also subclass this. + * + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {*} targetInst Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @param {DOMEventTarget} nativeEventTarget Target node. + */ + function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) { + if (process.env.NODE_ENV !== 'production') { + // these have a getter/setter for warnings + delete this.nativeEvent; + delete this.preventDefault; + delete this.stopPropagation; + } + + this.dispatchConfig = dispatchConfig; + this._targetInst = targetInst; + this.nativeEvent = nativeEvent; + + var Interface = this.constructor.Interface; + for (var propName in Interface) { + if (!Interface.hasOwnProperty(propName)) { + continue; + } + if (process.env.NODE_ENV !== 'production') { + delete this[propName]; // this has a getter/setter for warnings + } + var normalize = Interface[propName]; + if (normalize) { + this[propName] = normalize(nativeEvent); + } else { + if (propName === 'target') { + this.target = nativeEventTarget; + } else { + this[propName] = nativeEvent[propName]; + } + } + } + + var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false; + if (defaultPrevented) { + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + } else { + this.isDefaultPrevented = emptyFunction.thatReturnsFalse; + } + this.isPropagationStopped = emptyFunction.thatReturnsFalse; + return this; + } + + _assign(SyntheticEvent.prototype, { + + preventDefault: function () { + this.defaultPrevented = true; + var event = this.nativeEvent; + if (!event) { + return; + } + + if (event.preventDefault) { + event.preventDefault(); + } else { + event.returnValue = false; + } + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + }, + + stopPropagation: function () { + var event = this.nativeEvent; + if (!event) { + return; + } + + if (event.stopPropagation) { + event.stopPropagation(); + } else { + event.cancelBubble = true; + } + this.isPropagationStopped = emptyFunction.thatReturnsTrue; }, /** @@ -8708,9 +8703,10 @@ this[shouldBeReleasedProperties[i]] = null; } if (process.env.NODE_ENV !== 'production') { + var noop = __webpack_require__(30); Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null)); - Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction)); - Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction)); + Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', noop)); + Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', noop)); } } @@ -8804,7 +8800,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 84 */ +/* 87 */ /***/ function(module, exports, __webpack_require__) { /** @@ -8815,11 +8811,12 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule SyntheticInputEvent */ 'use strict'; - var SyntheticEvent = __webpack_require__(83); + var SyntheticEvent = __webpack_require__(86); /** * @interface Event @@ -8845,7 +8842,7 @@ module.exports = SyntheticInputEvent; /***/ }, -/* 85 */ +/* 88 */ /***/ function(module, exports, __webpack_require__) { /** @@ -8856,28 +8853,33 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule ChangeEventPlugin */ 'use strict'; - var EventPluginHub = __webpack_require__(72); - var EventPropagators = __webpack_require__(71); - var ExecutionEnvironment = __webpack_require__(78); - var ReactDOMComponentTree = __webpack_require__(64); - var ReactUpdates = __webpack_require__(86); - var SyntheticEvent = __webpack_require__(83); + var EventConstants = __webpack_require__(75); + var EventPluginHub = __webpack_require__(77); + var EventPropagators = __webpack_require__(76); + var ExecutionEnvironment = __webpack_require__(39); + var ReactDOMComponentTree = __webpack_require__(70); + var ReactUpdates = __webpack_require__(89); + var SyntheticEvent = __webpack_require__(86); - var getEventTarget = __webpack_require__(99); - var isEventSupported = __webpack_require__(100); - var isTextInputElement = __webpack_require__(101); + var getEventTarget = __webpack_require__(96); + var isEventSupported = __webpack_require__(97); + var isTextInputElement = __webpack_require__(98); + var keyOf = __webpack_require__(50); + + var topLevelTypes = EventConstants.topLevelTypes; var eventTypes = { change: { phasedRegistrationNames: { - bubbled: 'onChange', - captured: 'onChangeCapture' + bubbled: keyOf({ onChange: null }), + captured: keyOf({ onChangeCapture: null }) }, - dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange'] + dependencies: [topLevelTypes.topBlur, topLevelTypes.topChange, topLevelTypes.topClick, topLevelTypes.topFocus, topLevelTypes.topInput, topLevelTypes.topKeyDown, topLevelTypes.topKeyUp, topLevelTypes.topSelectionChange] } }; @@ -8900,7 +8902,7 @@ var doesChangeEventBubble = false; if (ExecutionEnvironment.canUseDOM) { // See `handleChange` comment below - doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8); + doesChangeEventBubble = isEventSupported('change') && (!('documentMode' in document) || document.documentMode > 8); } function manualDispatchChangeEvent(nativeEvent) { @@ -8942,17 +8944,17 @@ } function getTargetInstForChangeEvent(topLevelType, targetInst) { - if (topLevelType === 'topChange') { + if (topLevelType === topLevelTypes.topChange) { return targetInst; } } function handleEventsForChangeEventIE8(topLevelType, target, targetInst) { - if (topLevelType === 'topFocus') { + if (topLevelType === topLevelTypes.topFocus) { // stopWatching() should be a noop here but we call it just in case we // missed a blur event somehow. stopWatchingForChangeEventIE8(); startWatchingForChangeEventIE8(target, targetInst); - } else if (topLevelType === 'topBlur') { + } else if (topLevelType === topLevelTypes.topBlur) { stopWatchingForChangeEventIE8(); } } @@ -8966,7 +8968,7 @@ // deleting text, so we ignore its input events. // IE10+ fire input events to often, such when a placeholder // changes or when an input with a placeholder is focused. - isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11); + isInputEventSupported = isEventSupported('input') && (!('documentMode' in document) || document.documentMode > 11); } /** @@ -9050,7 +9052,7 @@ * If a `change` event should be fired, returns the target's ID. */ function getTargetInstForInputEvent(topLevelType, targetInst) { - if (topLevelType === 'topInput') { + if (topLevelType === topLevelTypes.topInput) { // In modern browsers (i.e., not IE8 or IE9), the input event is exactly // what we want so fall through here and trigger an abstract event return targetInst; @@ -9058,7 +9060,7 @@ } function handleEventsForInputEventIE(topLevelType, target, targetInst) { - if (topLevelType === 'topFocus') { + if (topLevelType === topLevelTypes.topFocus) { // In IE8, we can capture almost all .value changes by adding a // propertychange handler and looking for events with propertyName // equal to 'value' @@ -9074,14 +9076,14 @@ // missed a blur event somehow. stopWatchingForValueChange(); startWatchingForValueChange(target, targetInst); - } else if (topLevelType === 'topBlur') { + } else if (topLevelType === topLevelTypes.topBlur) { stopWatchingForValueChange(); } } // For IE8 and IE9. function getTargetInstForInputEventIE(topLevelType, targetInst) { - if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') { + if (topLevelType === topLevelTypes.topSelectionChange || topLevelType === topLevelTypes.topKeyUp || topLevelType === topLevelTypes.topKeyDown) { // On the selectionchange event, the target is just document which isn't // helpful for us so just check activeElement instead. // @@ -9110,7 +9112,7 @@ } function getTargetInstForClickEvent(topLevelType, targetInst) { - if (topLevelType === 'topClick') { + if (topLevelType === topLevelTypes.topClick) { return targetInst; } } @@ -9170,7 +9172,7 @@ module.exports = ChangeEventPlugin; /***/ }, -/* 86 */ +/* 89 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -9181,20 +9183,21 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule ReactUpdates */ 'use strict'; - var _prodInvariant = __webpack_require__(65), - _assign = __webpack_require__(23); + var _assign = __webpack_require__(23); - var CallbackQueue = __webpack_require__(87); - var PooledClass = __webpack_require__(80); - var ReactFeatureFlags = __webpack_require__(88); - var ReactReconciler = __webpack_require__(89); - var Transaction = __webpack_require__(98); + var CallbackQueue = __webpack_require__(90); + var PooledClass = __webpack_require__(25); + var ReactFeatureFlags = __webpack_require__(91); + var ReactInstrumentation = __webpack_require__(37); + var ReactReconciler = __webpack_require__(92); + var Transaction = __webpack_require__(95); - var invariant = __webpack_require__(27); + var invariant = __webpack_require__(26); var dirtyComponents = []; var updateBatchNumber = 0; @@ -9204,7 +9207,7 @@ var batchingStrategy = null; function ensureInjected() { - !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0; + !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching ' + 'strategy') : invariant(false) : void 0; } var NESTED_UPDATES = { @@ -9245,7 +9248,7 @@ /* useCreateElement */true); } - _assign(ReactUpdatesFlushTransaction.prototype, Transaction, { + _assign(ReactUpdatesFlushTransaction.prototype, Transaction.Mixin, { getTransactionWrappers: function () { return TRANSACTION_WRAPPERS; }, @@ -9261,7 +9264,7 @@ perform: function (method, scope, a) { // Essentially calls `this.reconcileTransaction.perform(method, scope, a)` // with this transaction's wrappers around it. - return Transaction.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); } }); @@ -9269,7 +9272,7 @@ function batchedUpdates(callback, a, b, c, d, e) { ensureInjected(); - return batchingStrategy.batchedUpdates(callback, a, b, c, d, e); + batchingStrategy.batchedUpdates(callback, a, b, c, d, e); } /** @@ -9285,7 +9288,7 @@ function runBatchedUpdates(transaction) { var len = transaction.dirtyComponentsLength; - !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0; + !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to ' + 'match dirty-components array length (%s).', len, dirtyComponents.length) : invariant(false) : void 0; // Since reconciling a component higher in the owner hierarchy usually (not // always -- see shouldComponentUpdate()) will reconcile children, reconcile @@ -9315,7 +9318,7 @@ if (ReactFeatureFlags.logTopLevelRenders) { var namedComponent = component; // Duck type TopLevelWrapper. This is probably always true. - if (component._currentElement.type.isReactTopLevelWrapper) { + if (component._currentElement.props === component._renderedComponent._currentElement) { namedComponent = component._renderedComponent; } markerName = 'React update: ' + namedComponent.getName(); @@ -9337,6 +9340,10 @@ } var flushBatchedUpdates = function () { + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onBeginFlush(); + } + // 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 @@ -9356,6 +9363,10 @@ CallbackQueue.release(queue); } } + + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onEndFlush(); + } }; /** @@ -9368,7 +9379,7 @@ // Various parts of our code (such as ReactCompositeComponent's // _renderValidatedComponent) assume that calls to render aren't nested; // verify that that's the case. (This is called by each top-level update - // function, like setState, forceUpdate, etc.; creation and + // function, like setProps, setState, forceUpdate, etc.; creation and // destruction of top-level components is guarded in ReactMount.) if (!batchingStrategy.isBatchingUpdates) { @@ -9387,21 +9398,21 @@ * if no updates are currently being performed. */ function asap(callback, context) { - !batchingStrategy.isBatchingUpdates ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0; + !batchingStrategy.isBatchingUpdates ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where' + 'updates are not being batched.') : invariant(false) : void 0; asapCallbackQueue.enqueue(callback, context); asapEnqueued = true; } var ReactUpdatesInjection = { injectReconcileTransaction: function (ReconcileTransaction) { - !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0; + !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : invariant(false) : void 0; ReactUpdates.ReactReconcileTransaction = ReconcileTransaction; }, injectBatchingStrategy: function (_batchingStrategy) { - !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0; - !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0; - !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0; + !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : invariant(false) : void 0; + !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : invariant(false) : void 0; + !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : invariant(false) : void 0; batchingStrategy = _batchingStrategy; } }; @@ -9426,7 +9437,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 87 */ +/* 90 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -9437,18 +9448,16 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * + * @providesModule CallbackQueue */ 'use strict'; - var _prodInvariant = __webpack_require__(65); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var _assign = __webpack_require__(23); - var PooledClass = __webpack_require__(80); + var PooledClass = __webpack_require__(25); - var invariant = __webpack_require__(27); + var invariant = __webpack_require__(26); /** * A specialized pseudo-event module to help keep track of components waiting to @@ -9461,15 +9470,12 @@ * @implements PooledClass * @internal */ + function CallbackQueue() { + this._callbacks = null; + this._contexts = null; + } - var CallbackQueue = function () { - function CallbackQueue(arg) { - _classCallCheck(this, CallbackQueue); - - this._callbacks = null; - this._contexts = null; - this._arg = arg; - } + _assign(CallbackQueue.prototype, { /** * Enqueues a callback to be invoked when `notifyAll` is invoked. @@ -9478,14 +9484,12 @@ * @param {?object} context Context to call `callback` with. * @internal */ - - - CallbackQueue.prototype.enqueue = function enqueue(callback, context) { + enqueue: function (callback, context) { this._callbacks = this._callbacks || []; - this._callbacks.push(callback); this._contexts = this._contexts || []; + this._callbacks.push(callback); this._contexts.push(context); - }; + }, /** * Invokes all enqueued callbacks and clears the queue. This is invoked after @@ -9493,64 +9497,58 @@ * * @internal */ - - - CallbackQueue.prototype.notifyAll = function notifyAll() { + notifyAll: function () { var callbacks = this._callbacks; var contexts = this._contexts; - var arg = this._arg; - if (callbacks && contexts) { - !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0; + if (callbacks) { + !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : invariant(false) : void 0; this._callbacks = null; this._contexts = null; for (var i = 0; i < callbacks.length; i++) { - callbacks[i].call(contexts[i], arg); + callbacks[i].call(contexts[i]); } callbacks.length = 0; contexts.length = 0; } - }; + }, - CallbackQueue.prototype.checkpoint = function checkpoint() { + checkpoint: function () { return this._callbacks ? this._callbacks.length : 0; - }; + }, - CallbackQueue.prototype.rollback = function rollback(len) { - if (this._callbacks && this._contexts) { + rollback: function (len) { + if (this._callbacks) { this._callbacks.length = len; this._contexts.length = len; } - }; + }, /** * Resets the internal queue. * * @internal */ - - - CallbackQueue.prototype.reset = function reset() { + reset: function () { this._callbacks = null; this._contexts = null; - }; + }, /** * `PooledClass` looks for this. */ - - - CallbackQueue.prototype.destructor = function destructor() { + destructor: function () { this.reset(); - }; + } + + }); - return CallbackQueue; - }(); + PooledClass.addPoolingTo(CallbackQueue); - module.exports = PooledClass.addPoolingTo(CallbackQueue); + module.exports = CallbackQueue; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 88 */ +/* 91 */ /***/ function(module, exports) { /** @@ -9561,7 +9559,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * + * @providesModule ReactFeatureFlags */ 'use strict'; @@ -9576,7 +9574,7 @@ module.exports = ReactFeatureFlags; /***/ }, -/* 89 */ +/* 92 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -9587,14 +9585,15 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule ReactReconciler */ 'use strict'; - var ReactRef = __webpack_require__(90); - var ReactInstrumentation = __webpack_require__(92); + var ReactRef = __webpack_require__(93); + var ReactInstrumentation = __webpack_require__(37); - var warning = __webpack_require__(30); + var invariant = __webpack_require__(26); /** * Helper to call ReactRef.attachRefs with this composite component, split out @@ -9611,25 +9610,25 @@ * * @param {ReactComponent} internalInstance * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction - * @param {?object} the containing host component instance - * @param {?object} info about the host container + * @param {?object} the containing native component instance + * @param {?object} info about the native container * @return {?string} Rendered markup to be inserted into the DOM. * @final * @internal */ - mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots - ) { + mountComponent: function (internalInstance, transaction, nativeParent, nativeContainerInfo, context) { if (process.env.NODE_ENV !== 'production') { if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID); + ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'mountComponent'); } } - var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID); + var markup = internalInstance.mountComponent(transaction, nativeParent, nativeContainerInfo, context); if (internalInstance._currentElement && internalInstance._currentElement.ref != null) { transaction.getReactMountReady().enqueue(attachRefs, internalInstance); } if (process.env.NODE_ENV !== 'production') { if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'mountComponent'); ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID); } } @@ -9640,8 +9639,8 @@ * Returns a value that can be passed to * ReactComponentEnvironment.replaceNodeWithMarkup. */ - getHostNode: function (internalInstance) { - return internalInstance.getHostNode(); + getNativeNode: function (internalInstance) { + return internalInstance.getNativeNode(); }, /** @@ -9653,13 +9652,14 @@ unmountComponent: function (internalInstance, safely) { if (process.env.NODE_ENV !== 'production') { if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID); + ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'unmountComponent'); } } ReactRef.detachRefs(internalInstance, internalInstance._currentElement); internalInstance.unmountComponent(safely); if (process.env.NODE_ENV !== 'production') { if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'unmountComponent'); ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID); } } @@ -9693,7 +9693,7 @@ if (process.env.NODE_ENV !== 'production') { if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement); + ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'receiveComponent'); } } @@ -9711,6 +9711,7 @@ if (process.env.NODE_ENV !== 'production') { if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'receiveComponent'); ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); } } @@ -9727,17 +9728,18 @@ if (internalInstance._updateBatchNumber !== updateBatchNumber) { // The component's enqueued batch number should always be the current // batch or the following one. - process.env.NODE_ENV !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0; + !(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : invariant(false) : void 0; return; } if (process.env.NODE_ENV !== 'production') { if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement); + ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'performUpdateIfNecessary'); } } internalInstance.performUpdateIfNecessary(transaction); if (process.env.NODE_ENV !== 'production') { if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'performUpdateIfNecessary'); ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); } } @@ -9749,7 +9751,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 90 */ +/* 93 */ /***/ function(module, exports, __webpack_require__) { /** @@ -9760,12 +9762,12 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * + * @providesModule ReactRef */ 'use strict'; - var ReactOwner = __webpack_require__(91); + var ReactOwner = __webpack_require__(94); var ReactRef = {}; @@ -9788,7 +9790,7 @@ } ReactRef.attachRefs = function (instance, element) { - if (element === null || typeof element !== 'object') { + if (element === null || element === false) { return; } var ref = element.ref; @@ -9810,27 +9812,17 @@ // is made. It probably belongs where the key checking and // instantiateReactComponent is done. - var prevRef = null; - var prevOwner = null; - if (prevElement !== null && typeof prevElement === 'object') { - prevRef = prevElement.ref; - prevOwner = prevElement._owner; - } - - var nextRef = null; - var nextOwner = null; - if (nextElement !== null && typeof nextElement === 'object') { - nextRef = nextElement.ref; - nextOwner = nextElement._owner; - } + var prevEmpty = prevElement === null || prevElement === false; + var nextEmpty = nextElement === null || nextElement === false; - return prevRef !== nextRef || - // If owner changes but we have an unchanged function ref, don't update refs - typeof nextRef === 'string' && nextOwner !== prevOwner; + return( + // This has a few false positives w/r/t empty components. + prevEmpty || nextEmpty || nextElement._owner !== prevElement._owner || nextElement.ref !== prevElement.ref + ); }; ReactRef.detachRefs = function (instance, element) { - if (element === null || typeof element !== 'object') { + if (element === null || element === false) { return; } var ref = element.ref; @@ -9842,7 +9834,7 @@ module.exports = ReactRef; /***/ }, -/* 91 */ +/* 94 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -9853,23 +9845,12 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * + * @providesModule ReactOwner */ 'use strict'; - var _prodInvariant = __webpack_require__(65); - - var invariant = __webpack_require__(27); - - /** - * @param {?object} object - * @return {boolean} True if `object` is a valid owner. - * @final - */ - function isValidOwner(object) { - return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function'); - } + var invariant = __webpack_require__(26); /** * ReactOwners are capable of storing references to owned components. @@ -9902,6 +9883,16 @@ * @class ReactOwner */ var ReactOwner = { + + /** + * @param {?object} object + * @return {boolean} True if `object` is a valid owner. + * @final + */ + isValidOwner: function (object) { + return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function'); + }, + /** * Adds a component by ref to an owner component. * @@ -9912,7 +9903,7 @@ * @internal */ addComponentAsRefTo: function (component, ref, owner) { - !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0; + !ReactOwner.isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might ' + 'be adding a ref to a component that was not created inside a component\'s ' + '`render` method, or you have multiple copies of React loaded ' + '(details: https://fb.me/react-refs-must-have-owner).') : invariant(false) : void 0; owner.attachRef(ref, component); }, @@ -9926,7 +9917,7 @@ * @internal */ removeComponentAsRefFrom: function (component, ref, owner) { - !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0; + !ReactOwner.isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might ' + 'be removing a ref to a component that was not created inside a component\'s ' + '`render` method, or you have multiple copies of React loaded ' + '(details: https://fb.me/react-refs-must-have-owner).') : invariant(false) : void 0; var ownerPublicInstance = owner.getPublicInstance(); // Check that `component`'s owner is still alive and that `component` is still the current ref // because we do not want to detach the ref if another component stole it. @@ -9941,550 +9932,398 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 92 */ +/* 95 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2016-present, Facebook, Inc. + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * + * @providesModule Transaction */ 'use strict'; - // Trust the developer to only use ReactInstrumentation with a __DEV__ check - - var debugTool = null; - - if (process.env.NODE_ENV !== 'production') { - var ReactDebugTool = __webpack_require__(93); - debugTool = ReactDebugTool; - } - - module.exports = { debugTool: debugTool }; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) - -/***/ }, -/* 93 */ -/***/ function(module, exports, __webpack_require__) { + var invariant = __webpack_require__(26); - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2016-present, Facebook, Inc. - * All rights reserved. + /** + * `Transaction` creates a black box that is able to wrap any method such that + * certain invariants are maintained before and after the method is invoked + * (Even if an exception is thrown while invoking the wrapped method). Whoever + * instantiates a transaction can provide enforcers of the invariants at + * creation time. The `Transaction` class itself will supply one additional + * automatic invariant for you - the invariant that any transaction instance + * should not be run while it is already being run. You would typically create a + * single instance of a `Transaction` for reuse multiple times, that potentially + * is used to wrap several different methods. Wrappers are extremely simple - + * they only require implementing two methods. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + *
+	 *                       wrappers (injected at creation time)
+	 *                                      +        +
+	 *                                      |        |
+	 *                    +-----------------|--------|--------------+
+	 *                    |                 v        |              |
+	 *                    |      +---------------+   |              |
+	 *                    |   +--|    wrapper1   |---|----+         |
+	 *                    |   |  +---------------+   v    |         |
+	 *                    |   |          +-------------+  |         |
+	 *                    |   |     +----|   wrapper2  |--------+   |
+	 *                    |   |     |    +-------------+  |     |   |
+	 *                    |   |     |                     |     |   |
+	 *                    |   v     v                     v     v   | wrapper
+	 *                    | +---+ +---+   +---------+   +---+ +---+ | invariants
+	 * perform(anyMethod) | |   | |   |   |         |   |   | |   | | maintained
+	 * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->
+	 *                    | |   | |   |   |         |   |   | |   | |
+	 *                    | |   | |   |   |         |   |   | |   | |
+	 *                    | |   | |   |   |         |   |   | |   | |
+	 *                    | +---+ +---+   +---------+   +---+ +---+ |
+	 *                    |  initialize                    close    |
+	 *                    +-----------------------------------------+
+	 * 
* - * + * Use cases: + * - Preserving the input selection ranges before/after reconciliation. + * Restoring selection even in the event of an unexpected error. + * - Deactivating events while rearranging the DOM, preventing blurs/focuses, + * while guaranteeing that afterwards, the event system is reactivated. + * - Flushing a queue of collected DOM mutations to the main UI thread after a + * reconciliation takes place in a worker thread. + * - Invoking any collected `componentDidUpdate` callbacks after rendering new + * content. + * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue + * to preserve the `scrollTop` (an automatic scroll aware DOM). + * - (Future use case): Layout calculations before and after DOM updates. + * + * Transactional plugin API: + * - A module that has an `initialize` method that returns any precomputation. + * - and a `close` method that accepts the precomputation. `close` is invoked + * when the wrapped process is completed, or has failed. + * + * @param {Array} transactionWrapper Wrapper modules + * that implement `initialize` and `close`. + * @return {Transaction} Single transaction for reuse in thread. + * + * @class Transaction */ + var Mixin = { + /** + * Sets up this instance so that it is prepared for collecting metrics. Does + * so such that this setup method may be used on an instance that is already + * initialized, in a way that does not consume additional memory upon reuse. + * That can be useful if you decide to make your subclass of this mixin a + * "PooledClass". + */ + reinitializeTransaction: function () { + this.transactionWrappers = this.getTransactionWrappers(); + if (this.wrapperInitData) { + this.wrapperInitData.length = 0; + } else { + this.wrapperInitData = []; + } + this._isInTransaction = false; + }, - 'use strict'; - - var ReactInvalidSetStateWarningHook = __webpack_require__(94); - var ReactHostOperationHistoryHook = __webpack_require__(95); - var ReactComponentTreeHook = __webpack_require__(45); - var ExecutionEnvironment = __webpack_require__(78); - - var performanceNow = __webpack_require__(96); - var warning = __webpack_require__(30); + _isInTransaction: false, - var hooks = []; - var didHookThrowForEvent = {}; + /** + * @abstract + * @return {Array} Array of transaction wrappers. + */ + getTransactionWrappers: null, - function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) { - try { - fn.call(context, arg1, arg2, arg3, arg4, arg5); - } catch (e) { - process.env.NODE_ENV !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0; - didHookThrowForEvent[event] = true; - } - } + isInTransaction: function () { + return !!this._isInTransaction; + }, - function emitEvent(event, arg1, arg2, arg3, arg4, arg5) { - for (var i = 0; i < hooks.length; i++) { - var hook = hooks[i]; - var fn = hook[event]; - if (fn) { - callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5); + /** + * Executes the function within a safety window. Use this for the top level + * methods that result in large amounts of computation/mutations that would + * need to be safety checked. The optional arguments helps prevent the need + * to bind in many cases. + * + * @param {function} method Member of scope to call. + * @param {Object} scope Scope to invoke from. + * @param {Object?=} a Argument to pass to the method. + * @param {Object?=} b Argument to pass to the method. + * @param {Object?=} c Argument to pass to the method. + * @param {Object?=} d Argument to pass to the method. + * @param {Object?=} e Argument to pass to the method. + * @param {Object?=} f Argument to pass to the method. + * + * @return {*} Return value from `method`. + */ + perform: function (method, scope, a, b, c, d, e, f) { + !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there ' + 'is already an outstanding transaction.') : invariant(false) : void 0; + var errorThrown; + var ret; + try { + this._isInTransaction = true; + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // one of these calls threw. + errorThrown = true; + this.initializeAll(0); + ret = method.call(scope, a, b, c, d, e, f); + errorThrown = false; + } finally { + try { + if (errorThrown) { + // If `method` throws, prefer to show that stack trace over any thrown + // by invoking `closeAll`. + try { + this.closeAll(0); + } catch (err) {} + } else { + // Since `method` didn't throw, we don't want to silence the exception + // here. + this.closeAll(0); + } + } finally { + this._isInTransaction = false; + } } - } - } - - var isProfiling = false; - var flushHistory = []; - var lifeCycleTimerStack = []; - var currentFlushNesting = 0; - var currentFlushMeasurements = []; - var currentFlushStartTime = 0; - var currentTimerDebugID = null; - var currentTimerStartTime = 0; - var currentTimerNestedFlushDuration = 0; - var currentTimerType = null; - - var lifeCycleTimerHasWarned = false; - - function clearHistory() { - ReactComponentTreeHook.purgeUnmountedComponents(); - ReactHostOperationHistoryHook.clearHistory(); - } + return ret; + }, - function getTreeSnapshot(registeredIDs) { - return registeredIDs.reduce(function (tree, id) { - var ownerID = ReactComponentTreeHook.getOwnerID(id); - var parentID = ReactComponentTreeHook.getParentID(id); - tree[id] = { - displayName: ReactComponentTreeHook.getDisplayName(id), - text: ReactComponentTreeHook.getText(id), - updateCount: ReactComponentTreeHook.getUpdateCount(id), - childIDs: ReactComponentTreeHook.getChildIDs(id), - // Text nodes don't have owners but this is close enough. - ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0, - parentID: parentID - }; - return tree; - }, {}); - } - - function resetMeasurements() { - var previousStartTime = currentFlushStartTime; - var previousMeasurements = currentFlushMeasurements; - var previousOperations = ReactHostOperationHistoryHook.getHistory(); - - if (currentFlushNesting === 0) { - currentFlushStartTime = 0; - currentFlushMeasurements = []; - clearHistory(); - return; - } - - if (previousMeasurements.length || previousOperations.length) { - var registeredIDs = ReactComponentTreeHook.getRegisteredIDs(); - flushHistory.push({ - duration: performanceNow() - previousStartTime, - measurements: previousMeasurements || [], - operations: previousOperations || [], - treeSnapshot: getTreeSnapshot(registeredIDs) - }); - } - - clearHistory(); - currentFlushStartTime = performanceNow(); - currentFlushMeasurements = []; - } - - function checkDebugID(debugID) { - var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (allowRoot && debugID === 0) { - return; - } - if (!debugID) { - process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0; - } - } - - function beginLifeCycleTimer(debugID, timerType) { - if (currentFlushNesting === 0) { - return; - } - if (currentTimerType && !lifeCycleTimerHasWarned) { - process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0; - lifeCycleTimerHasWarned = true; - } - currentTimerStartTime = performanceNow(); - currentTimerNestedFlushDuration = 0; - currentTimerDebugID = debugID; - currentTimerType = timerType; - } - - function endLifeCycleTimer(debugID, timerType) { - if (currentFlushNesting === 0) { - return; - } - if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) { - process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0; - lifeCycleTimerHasWarned = true; - } - if (isProfiling) { - currentFlushMeasurements.push({ - timerType: timerType, - instanceID: debugID, - duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration - }); - } - currentTimerStartTime = 0; - currentTimerNestedFlushDuration = 0; - currentTimerDebugID = null; - currentTimerType = null; - } - - function pauseCurrentLifeCycleTimer() { - var currentTimer = { - startTime: currentTimerStartTime, - nestedFlushStartTime: performanceNow(), - debugID: currentTimerDebugID, - timerType: currentTimerType - }; - lifeCycleTimerStack.push(currentTimer); - currentTimerStartTime = 0; - currentTimerNestedFlushDuration = 0; - currentTimerDebugID = null; - currentTimerType = null; - } - - function resumeCurrentLifeCycleTimer() { - var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(), - startTime = _lifeCycleTimerStack$.startTime, - nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime, - debugID = _lifeCycleTimerStack$.debugID, - timerType = _lifeCycleTimerStack$.timerType; - - var nestedFlushDuration = performanceNow() - nestedFlushStartTime; - currentTimerStartTime = startTime; - currentTimerNestedFlushDuration += nestedFlushDuration; - currentTimerDebugID = debugID; - currentTimerType = timerType; - } - - var lastMarkTimeStamp = 0; - var canUsePerformanceMeasure = - // $FlowFixMe https://github.com/facebook/flow/issues/2345 - typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function'; - - function shouldMark(debugID) { - if (!isProfiling || !canUsePerformanceMeasure) { - return false; - } - var element = ReactComponentTreeHook.getElement(debugID); - if (element == null || typeof element !== 'object') { - return false; - } - var isHostElement = typeof element.type === 'string'; - if (isHostElement) { - return false; - } - return true; - } - - function markBegin(debugID, markType) { - if (!shouldMark(debugID)) { - return; - } - - var markName = debugID + '::' + markType; - lastMarkTimeStamp = performanceNow(); - performance.mark(markName); - } - - function markEnd(debugID, markType) { - if (!shouldMark(debugID)) { - return; - } - - var markName = debugID + '::' + markType; - var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown'; - - // Chrome has an issue of dropping markers recorded too fast: - // https://bugs.chromium.org/p/chromium/issues/detail?id=640652 - // To work around this, we will not report very small measurements. - // I determined the magic number by tweaking it back and forth. - // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe. - // When the bug is fixed, we can `measure()` unconditionally if we want to. - var timeStamp = performanceNow(); - if (timeStamp - lastMarkTimeStamp > 0.1) { - var measurementName = displayName + ' [' + markType + ']'; - performance.measure(measurementName, markName); - } - - performance.clearMarks(markName); - performance.clearMeasures(measurementName); - } - - var ReactDebugTool = { - addHook: function (hook) { - hooks.push(hook); - }, - removeHook: function (hook) { - for (var i = 0; i < hooks.length; i++) { - if (hooks[i] === hook) { - hooks.splice(i, 1); - i--; + initializeAll: function (startIndex) { + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + try { + // Catching errors makes debugging more difficult, so we start with the + // OBSERVED_ERROR state before overwriting it with the real return value + // 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; + } finally { + if (this.wrapperInitData[i] === Transaction.OBSERVED_ERROR) { + // The initializer for wrapper i threw an error; initialize the + // remaining wrappers but silence any exceptions from them to ensure + // that the first error is the one to bubble up. + try { + this.initializeAll(i + 1); + } catch (err) {} + } } } }, - isProfiling: function () { - return isProfiling; - }, - beginProfiling: function () { - if (isProfiling) { - return; - } - isProfiling = true; - flushHistory.length = 0; - resetMeasurements(); - ReactDebugTool.addHook(ReactHostOperationHistoryHook); - }, - endProfiling: function () { - if (!isProfiling) { - return; + /** + * Invokes each of `this.transactionWrappers.close[i]` functions, passing into + * them the respective return values of `this.transactionWrappers.init[i]` + * (`close`rs that correspond to initializers that failed will not be + * invoked). + */ + closeAll: function (startIndex) { + !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : invariant(false) : void 0; + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + var initData = this.wrapperInitData[i]; + var errorThrown; + try { + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // wrapper.close threw. + errorThrown = true; + if (initData !== Transaction.OBSERVED_ERROR && wrapper.close) { + wrapper.close.call(this, initData); + } + errorThrown = false; + } finally { + if (errorThrown) { + // The closer for wrapper i threw an error; close the remaining + // wrappers but silence any exceptions from them to ensure that the + // first error is the one to bubble up. + try { + this.closeAll(i + 1); + } catch (e) {} + } + } } - - isProfiling = false; - resetMeasurements(); - ReactDebugTool.removeHook(ReactHostOperationHistoryHook); - }, - getFlushHistory: function () { - return flushHistory; - }, - onBeginFlush: function () { - currentFlushNesting++; - resetMeasurements(); - pauseCurrentLifeCycleTimer(); - emitEvent('onBeginFlush'); - }, - onEndFlush: function () { - resetMeasurements(); - currentFlushNesting--; - resumeCurrentLifeCycleTimer(); - emitEvent('onEndFlush'); - }, - onBeginLifeCycleTimer: function (debugID, timerType) { - checkDebugID(debugID); - emitEvent('onBeginLifeCycleTimer', debugID, timerType); - markBegin(debugID, timerType); - beginLifeCycleTimer(debugID, timerType); - }, - onEndLifeCycleTimer: function (debugID, timerType) { - checkDebugID(debugID); - endLifeCycleTimer(debugID, timerType); - markEnd(debugID, timerType); - emitEvent('onEndLifeCycleTimer', debugID, timerType); - }, - onBeginProcessingChildContext: function () { - emitEvent('onBeginProcessingChildContext'); - }, - onEndProcessingChildContext: function () { - emitEvent('onEndProcessingChildContext'); - }, - onHostOperation: function (operation) { - checkDebugID(operation.instanceID); - emitEvent('onHostOperation', operation); - }, - onSetState: function () { - emitEvent('onSetState'); - }, - onSetChildren: function (debugID, childDebugIDs) { - checkDebugID(debugID); - childDebugIDs.forEach(checkDebugID); - emitEvent('onSetChildren', debugID, childDebugIDs); - }, - onBeforeMountComponent: function (debugID, element, parentDebugID) { - checkDebugID(debugID); - checkDebugID(parentDebugID, true); - emitEvent('onBeforeMountComponent', debugID, element, parentDebugID); - markBegin(debugID, 'mount'); - }, - onMountComponent: function (debugID) { - checkDebugID(debugID); - markEnd(debugID, 'mount'); - emitEvent('onMountComponent', debugID); - }, - onBeforeUpdateComponent: function (debugID, element) { - checkDebugID(debugID); - emitEvent('onBeforeUpdateComponent', debugID, element); - markBegin(debugID, 'update'); - }, - onUpdateComponent: function (debugID) { - checkDebugID(debugID); - markEnd(debugID, 'update'); - emitEvent('onUpdateComponent', debugID); - }, - onBeforeUnmountComponent: function (debugID) { - checkDebugID(debugID); - emitEvent('onBeforeUnmountComponent', debugID); - markBegin(debugID, 'unmount'); - }, - onUnmountComponent: function (debugID) { - checkDebugID(debugID); - markEnd(debugID, 'unmount'); - emitEvent('onUnmountComponent', debugID); - }, - onTestEvent: function () { - emitEvent('onTestEvent'); + this.wrapperInitData.length = 0; } }; - // TODO remove these when RN/www gets updated - ReactDebugTool.addDevtool = ReactDebugTool.addHook; - ReactDebugTool.removeDevtool = ReactDebugTool.removeHook; - - ReactDebugTool.addHook(ReactInvalidSetStateWarningHook); - ReactDebugTool.addHook(ReactComponentTreeHook); - var url = ExecutionEnvironment.canUseDOM && window.location.href || ''; - if (/[?&]react_perf\b/.test(url)) { - ReactDebugTool.beginProfiling(); - } - - module.exports = ReactDebugTool; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) - -/***/ }, -/* 94 */ -/***/ function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - - 'use strict'; - - var warning = __webpack_require__(30); + var Transaction = { - if (process.env.NODE_ENV !== 'production') { - var processingChildContext = false; + Mixin: Mixin, - var warnInvalidSetState = function () { - process.env.NODE_ENV !== 'production' ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0; - }; - } + /** + * Token to look for to determine if an error occurred. + */ + OBSERVED_ERROR: {} - var ReactInvalidSetStateWarningHook = { - onBeginProcessingChildContext: function () { - processingChildContext = true; - }, - onEndProcessingChildContext: function () { - processingChildContext = false; - }, - onSetState: function () { - warnInvalidSetState(); - } }; - module.exports = ReactInvalidSetStateWarningHook; + module.exports = Transaction; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 95 */ +/* 96 */ /***/ function(module, exports) { /** - * Copyright 2016-present, Facebook, Inc. + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * + * @providesModule getEventTarget */ 'use strict'; - var history = []; + /** + * Gets the target node from a native browser event by accounting for + * inconsistencies in browser DOM APIs. + * + * @param {object} nativeEvent Native browser event. + * @return {DOMEventTarget} Target node. + */ - var ReactHostOperationHistoryHook = { - onHostOperation: function (operation) { - history.push(operation); - }, - clearHistory: function () { - if (ReactHostOperationHistoryHook._preventClearing) { - // Should only be used for tests. - return; - } + function getEventTarget(nativeEvent) { + var target = nativeEvent.target || nativeEvent.srcElement || window; - history = []; - }, - getHistory: function () { - return history; + // Normalize SVG element events #4963 + if (target.correspondingUseElement) { + target = target.correspondingUseElement; } - }; - module.exports = ReactHostOperationHistoryHook; + // Safari may fire events on text nodes (Node.TEXT_NODE is 3). + // @see http://www.quirksmode.org/js/events_properties.html + return target.nodeType === 3 ? target.parentNode : target; + } + + module.exports = getEventTarget; /***/ }, -/* 96 */ +/* 97 */ /***/ function(module, exports, __webpack_require__) { - 'use strict'; - /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @typechecks + * @providesModule isEventSupported */ - var performance = __webpack_require__(97); + 'use strict'; - var performanceNow; + var ExecutionEnvironment = __webpack_require__(39); + + var useHasFeature; + if (ExecutionEnvironment.canUseDOM) { + useHasFeature = document.implementation && document.implementation.hasFeature && + // always returns true in newer browsers as per the standard. + // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature + document.implementation.hasFeature('', '') !== true; + } /** - * Detect if we can use `window.performance.now()` and gracefully fallback to - * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now - * because of Facebook's testing infrastructure. + * Checks if an event is supported in the current execution environment. + * + * NOTE: This will not work correctly for non-generic events such as `change`, + * `reset`, `load`, `error`, and `select`. + * + * Borrows from Modernizr. + * + * @param {string} eventNameSuffix Event name, e.g. "click". + * @param {?boolean} capture Check if the capture phase is supported. + * @return {boolean} True if the event is supported. + * @internal + * @license Modernizr 3.0.0pre (Custom Build) | MIT */ - if (performance.now) { - performanceNow = function performanceNow() { - return performance.now(); - }; - } else { - performanceNow = function performanceNow() { - return Date.now(); - }; + function isEventSupported(eventNameSuffix, capture) { + if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) { + return false; + } + + var eventName = 'on' + eventNameSuffix; + var isSupported = eventName in document; + + if (!isSupported) { + var element = document.createElement('div'); + element.setAttribute(eventName, 'return;'); + isSupported = typeof element[eventName] === 'function'; + } + + if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') { + // This is the only way to test support for the `wheel` event in IE9+. + isSupported = document.implementation.hasFeature('Events.wheel', '3.0'); + } + + return isSupported; } - module.exports = performanceNow; + module.exports = isEventSupported; /***/ }, -/* 97 */ -/***/ function(module, exports, __webpack_require__) { +/* 98 */ +/***/ function(module, exports) { /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @typechecks + * @providesModule isTextInputElement */ 'use strict'; - var ExecutionEnvironment = __webpack_require__(78); + /** + * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary + */ - var performance; + var supportedInputTypes = { + 'color': true, + 'date': true, + 'datetime': true, + 'datetime-local': true, + 'email': true, + 'month': true, + 'number': true, + 'password': true, + 'range': true, + 'search': true, + 'tel': true, + 'text': true, + 'time': true, + 'url': true, + 'week': true + }; - if (ExecutionEnvironment.canUseDOM) { - performance = window.performance || window.msPerformance || window.webkitPerformance; + function isTextInputElement(elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName && (nodeName === 'input' && supportedInputTypes[elem.type] || nodeName === 'textarea'); } - module.exports = performance || {}; + module.exports = isTextInputElement; /***/ }, -/* 98 */ +/* 99 */ /***/ function(module, exports, __webpack_require__) { - /* WEBPACK VAR INJECTION */(function(process) {/** + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -10492,227 +10331,139 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * + * @providesModule DefaultEventPluginOrder */ 'use strict'; - var _prodInvariant = __webpack_require__(65); + var keyOf = __webpack_require__(50); + + /** + * Module that is injectable into `EventPluginHub`, that specifies a + * deterministic ordering of `EventPlugin`s. A convenient way to reason about + * plugins, without having to package every one of them. This is better than + * having plugins be ordered in the same order that they are injected because + * that ordering would be influenced by the packaging order. + * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that + * preventing default on events is convenient in `SimpleEventPlugin` handlers. + */ + var DefaultEventPluginOrder = [keyOf({ ResponderEventPlugin: null }), keyOf({ SimpleEventPlugin: null }), keyOf({ TapEventPlugin: null }), keyOf({ EnterLeaveEventPlugin: null }), keyOf({ ChangeEventPlugin: null }), keyOf({ SelectEventPlugin: null }), keyOf({ BeforeInputEventPlugin: null })]; - var invariant = __webpack_require__(27); + module.exports = DefaultEventPluginOrder; - var OBSERVED_ERROR = {}; +/***/ }, +/* 100 */ +/***/ function(module, exports, __webpack_require__) { /** - * `Transaction` creates a black box that is able to wrap any method such that - * certain invariants are maintained before and after the method is invoked - * (Even if an exception is thrown while invoking the wrapped method). Whoever - * instantiates a transaction can provide enforcers of the invariants at - * creation time. The `Transaction` class itself will supply one additional - * automatic invariant for you - the invariant that any transaction instance - * should not be run while it is already being run. You would typically create a - * single instance of a `Transaction` for reuse multiple times, that potentially - * is used to wrap several different methods. Wrappers are extremely simple - - * they only require implementing two methods. - * - *
-	 *                       wrappers (injected at creation time)
-	 *                                      +        +
-	 *                                      |        |
-	 *                    +-----------------|--------|--------------+
-	 *                    |                 v        |              |
-	 *                    |      +---------------+   |              |
-	 *                    |   +--|    wrapper1   |---|----+         |
-	 *                    |   |  +---------------+   v    |         |
-	 *                    |   |          +-------------+  |         |
-	 *                    |   |     +----|   wrapper2  |--------+   |
-	 *                    |   |     |    +-------------+  |     |   |
-	 *                    |   |     |                     |     |   |
-	 *                    |   v     v                     v     v   | wrapper
-	 *                    | +---+ +---+   +---------+   +---+ +---+ | invariants
-	 * perform(anyMethod) | |   | |   |   |         |   |   | |   | | maintained
-	 * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->
-	 *                    | |   | |   |   |         |   |   | |   | |
-	 *                    | |   | |   |   |         |   |   | |   | |
-	 *                    | |   | |   |   |         |   |   | |   | |
-	 *                    | +---+ +---+   +---------+   +---+ +---+ |
-	 *                    |  initialize                    close    |
-	 *                    +-----------------------------------------+
-	 * 
- * - * Use cases: - * - Preserving the input selection ranges before/after reconciliation. - * Restoring selection even in the event of an unexpected error. - * - Deactivating events while rearranging the DOM, preventing blurs/focuses, - * while guaranteeing that afterwards, the event system is reactivated. - * - Flushing a queue of collected DOM mutations to the main UI thread after a - * reconciliation takes place in a worker thread. - * - Invoking any collected `componentDidUpdate` callbacks after rendering new - * content. - * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue - * to preserve the `scrollTop` (an automatic scroll aware DOM). - * - (Future use case): Layout calculations before and after DOM updates. - * - * Transactional plugin API: - * - A module that has an `initialize` method that returns any precomputation. - * - and a `close` method that accepts the precomputation. `close` is invoked - * when the wrapped process is completed, or has failed. + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. * - * @param {Array} transactionWrapper Wrapper modules - * that implement `initialize` and `close`. - * @return {Transaction} Single transaction for reuse in thread. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * @class Transaction + * @providesModule EnterLeaveEventPlugin */ - var TransactionImpl = { + + 'use strict'; + + var EventConstants = __webpack_require__(75); + var EventPropagators = __webpack_require__(76); + var ReactDOMComponentTree = __webpack_require__(70); + var SyntheticMouseEvent = __webpack_require__(101); + + var keyOf = __webpack_require__(50); + + var topLevelTypes = EventConstants.topLevelTypes; + + var eventTypes = { + mouseEnter: { + registrationName: keyOf({ onMouseEnter: null }), + dependencies: [topLevelTypes.topMouseOut, topLevelTypes.topMouseOver] + }, + mouseLeave: { + registrationName: keyOf({ onMouseLeave: null }), + dependencies: [topLevelTypes.topMouseOut, topLevelTypes.topMouseOver] + } + }; + + var EnterLeaveEventPlugin = { + + eventTypes: eventTypes, + /** - * Sets up this instance so that it is prepared for collecting metrics. Does - * so such that this setup method may be used on an instance that is already - * initialized, in a way that does not consume additional memory upon reuse. - * That can be useful if you decide to make your subclass of this mixin a - * "PooledClass". + * For almost every interaction we care about, there will be both a top-level + * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that + * we do not extract duplicate events. However, moving the mouse into the + * browser from outside will not fire a `mouseout` event. In this case, we use + * the `mouseover` top-level event. */ - reinitializeTransaction: function () { - this.transactionWrappers = this.getTransactionWrappers(); - if (this.wrapperInitData) { - this.wrapperInitData.length = 0; + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + if (topLevelType === topLevelTypes.topMouseOver && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { + return null; + } + if (topLevelType !== topLevelTypes.topMouseOut && topLevelType !== topLevelTypes.topMouseOver) { + // Must not be a mouse in or mouse out - ignoring. + return null; + } + + var win; + if (nativeEventTarget.window === nativeEventTarget) { + // `nativeEventTarget` is probably a window object. + win = nativeEventTarget; } else { - this.wrapperInitData = []; + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + var doc = nativeEventTarget.ownerDocument; + if (doc) { + win = doc.defaultView || doc.parentWindow; + } else { + win = window; + } } - this._isInTransaction = false; - }, - _isInTransaction: false, + var from; + var to; + if (topLevelType === topLevelTypes.topMouseOut) { + from = targetInst; + var related = nativeEvent.relatedTarget || nativeEvent.toElement; + to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null; + } else { + // Moving to a node from outside the window. + from = null; + to = targetInst; + } - /** - * @abstract - * @return {Array} Array of transaction wrappers. - */ - getTransactionWrappers: null, + if (from === to) { + // Nothing pertains to our managed components. + return null; + } - isInTransaction: function () { - return !!this._isInTransaction; - }, + var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from); + var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to); - /** - * Executes the function within a safety window. Use this for the top level - * methods that result in large amounts of computation/mutations that would - * need to be safety checked. The optional arguments helps prevent the need - * to bind in many cases. - * - * @param {function} method Member of scope to call. - * @param {Object} scope Scope to invoke from. - * @param {Object?=} a Argument to pass to the method. - * @param {Object?=} b Argument to pass to the method. - * @param {Object?=} c Argument to pass to the method. - * @param {Object?=} d Argument to pass to the method. - * @param {Object?=} e Argument to pass to the method. - * @param {Object?=} f Argument to pass to the method. - * - * @return {*} Return value from `method`. - */ - perform: function (method, scope, a, b, c, d, e, f) { - !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0; - var errorThrown; - var ret; - try { - this._isInTransaction = true; - // Catching errors makes debugging more difficult, so we start with - // errorThrown set to true before setting it to false after calling - // close -- if it's still set to true in the finally block, it means - // one of these calls threw. - errorThrown = true; - this.initializeAll(0); - ret = method.call(scope, a, b, c, d, e, f); - errorThrown = false; - } finally { - try { - if (errorThrown) { - // If `method` throws, prefer to show that stack trace over any thrown - // by invoking `closeAll`. - try { - this.closeAll(0); - } catch (err) {} - } else { - // Since `method` didn't throw, we don't want to silence the exception - // here. - this.closeAll(0); - } - } finally { - this._isInTransaction = false; - } - } - return ret; - }, + var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget); + leave.type = 'mouseleave'; + leave.target = fromNode; + leave.relatedTarget = toNode; - initializeAll: function (startIndex) { - var transactionWrappers = this.transactionWrappers; - for (var i = startIndex; i < transactionWrappers.length; i++) { - var wrapper = transactionWrappers[i]; - try { - // Catching errors makes debugging more difficult, so we start with the - // OBSERVED_ERROR state before overwriting it with the real return value - // of initialize -- if it's still set to OBSERVED_ERROR in the finally - // block, it means wrapper.initialize threw. - this.wrapperInitData[i] = OBSERVED_ERROR; - this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null; - } finally { - if (this.wrapperInitData[i] === OBSERVED_ERROR) { - // The initializer for wrapper i threw an error; initialize the - // remaining wrappers but silence any exceptions from them to ensure - // that the first error is the one to bubble up. - try { - this.initializeAll(i + 1); - } catch (err) {} - } - } - } - }, + var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget); + enter.type = 'mouseenter'; + enter.target = toNode; + enter.relatedTarget = fromNode; - /** - * Invokes each of `this.transactionWrappers.close[i]` functions, passing into - * them the respective return values of `this.transactionWrappers.init[i]` - * (`close`rs that correspond to initializers that failed will not be - * invoked). - */ - closeAll: function (startIndex) { - !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0; - var transactionWrappers = this.transactionWrappers; - for (var i = startIndex; i < transactionWrappers.length; i++) { - var wrapper = transactionWrappers[i]; - var initData = this.wrapperInitData[i]; - var errorThrown; - try { - // Catching errors makes debugging more difficult, so we start with - // errorThrown set to true before setting it to false after calling - // close -- if it's still set to true in the finally block, it means - // wrapper.close threw. - errorThrown = true; - if (initData !== OBSERVED_ERROR && wrapper.close) { - wrapper.close.call(this, initData); - } - errorThrown = false; - } finally { - if (errorThrown) { - // The closer for wrapper i threw an error; close the remaining - // wrappers but silence any exceptions from them to ensure that the - // first error is the one to bubble up. - try { - this.closeAll(i + 1); - } catch (e) {} - } - } - } - this.wrapperInitData.length = 0; + EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to); + + return [leave, enter]; } + }; - module.exports = TransactionImpl; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + module.exports = EnterLeaveEventPlugin; /***/ }, -/* 99 */ -/***/ function(module, exports) { +/* 101 */ +/***/ function(module, exports, __webpack_require__) { /** * Copyright 2013-present, Facebook, Inc. @@ -10722,35 +10473,73 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule SyntheticMouseEvent */ 'use strict'; - /** - * Gets the target node from a native browser event by accounting for - * inconsistencies in browser DOM APIs. - * - * @param {object} nativeEvent Native browser event. - * @return {DOMEventTarget} Target node. - */ + var SyntheticUIEvent = __webpack_require__(102); + var ViewportMetrics = __webpack_require__(103); - function getEventTarget(nativeEvent) { - var target = nativeEvent.target || nativeEvent.srcElement || window; + var getEventModifierState = __webpack_require__(104); - // Normalize SVG element events #4963 - if (target.correspondingUseElement) { - target = target.correspondingUseElement; + /** + * @interface MouseEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + var MouseEventInterface = { + screenX: null, + screenY: null, + clientX: null, + clientY: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + getModifierState: getEventModifierState, + button: function (event) { + // Webkit, Firefox, IE9+ + // which: 1 2 3 + // button: 0 1 2 (standard) + var button = event.button; + if ('which' in event) { + return button; + } + // IE<9 + // which: undefined + // button: 0 0 0 + // button: 1 4 2 (onmouseup) + return button === 2 ? 2 : button === 4 ? 1 : 0; + }, + buttons: null, + relatedTarget: function (event) { + return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement); + }, + // "Proprietary" Interface. + pageX: function (event) { + return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft; + }, + pageY: function (event) { + return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop; } + }; - // Safari may fire events on text nodes (Node.TEXT_NODE is 3). - // @see http://www.quirksmode.org/js/events_properties.html - return target.nodeType === 3 ? target.parentNode : target; + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); } - module.exports = getEventTarget; + SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface); + + module.exports = SyntheticMouseEvent; /***/ }, -/* 100 */ +/* 102 */ /***/ function(module, exports, __webpack_require__) { /** @@ -10761,60 +10550,60 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule SyntheticUIEvent */ 'use strict'; - var ExecutionEnvironment = __webpack_require__(78); + var SyntheticEvent = __webpack_require__(86); - var useHasFeature; - if (ExecutionEnvironment.canUseDOM) { - useHasFeature = document.implementation && document.implementation.hasFeature && - // always returns true in newer browsers as per the standard. - // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature - document.implementation.hasFeature('', '') !== true; - } + var getEventTarget = __webpack_require__(96); /** - * Checks if an event is supported in the current execution environment. - * - * NOTE: This will not work correctly for non-generic events such as `change`, - * `reset`, `load`, `error`, and `select`. - * - * Borrows from Modernizr. - * - * @param {string} eventNameSuffix Event name, e.g. "click". - * @param {?boolean} capture Check if the capture phase is supported. - * @return {boolean} True if the event is supported. - * @internal - * @license Modernizr 3.0.0pre (Custom Build) | MIT + * @interface UIEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ */ - function isEventSupported(eventNameSuffix, capture) { - if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) { - return false; - } - - var eventName = 'on' + eventNameSuffix; - var isSupported = eventName in document; + var UIEventInterface = { + view: function (event) { + if (event.view) { + return event.view; + } - if (!isSupported) { - var element = document.createElement('div'); - element.setAttribute(eventName, 'return;'); - isSupported = typeof element[eventName] === 'function'; - } + var target = getEventTarget(event); + if (target != null && target.window === target) { + // target is a window object + return target; + } - if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') { - // This is the only way to test support for the `wheel` event in IE9+. - isSupported = document.implementation.hasFeature('Events.wheel', '3.0'); + var doc = target.ownerDocument; + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + if (doc) { + return doc.defaultView || doc.parentWindow; + } else { + return window; + } + }, + detail: function (event) { + return event.detail || 0; } + }; - return isSupported; + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ + function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); } - module.exports = isEventSupported; + SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); + + module.exports = SyntheticUIEvent; /***/ }, -/* 101 */ +/* 103 */ /***/ function(module, exports) { /** @@ -10825,51 +10614,28 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * + * @providesModule ViewportMetrics */ 'use strict'; - /** - * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary - */ - - var supportedInputTypes = { - 'color': true, - 'date': true, - 'datetime': true, - 'datetime-local': true, - 'email': true, - 'month': true, - 'number': true, - 'password': true, - 'range': true, - 'search': true, - 'tel': true, - 'text': true, - 'time': true, - 'url': true, - 'week': true - }; + var ViewportMetrics = { - function isTextInputElement(elem) { - var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + currentScrollLeft: 0, - if (nodeName === 'input') { - return !!supportedInputTypes[elem.type]; - } + currentScrollTop: 0, - if (nodeName === 'textarea') { - return true; + refreshScrollValues: function (scrollPosition) { + ViewportMetrics.currentScrollLeft = scrollPosition.x; + ViewportMetrics.currentScrollTop = scrollPosition.y; } - return false; - } + }; - module.exports = isTextInputElement; + module.exports = ViewportMetrics; /***/ }, -/* 102 */ +/* 104 */ /***/ function(module, exports) { /** @@ -10880,203 +10646,41 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule getEventModifierState */ 'use strict'; /** - * Module that is injectable into `EventPluginHub`, that specifies a - * deterministic ordering of `EventPlugin`s. A convenient way to reason about - * plugins, without having to package every one of them. This is better than - * having plugins be ordered in the same order that they are injected because - * that ordering would be influenced by the packaging order. - * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that - * preventing default on events is convenient in `SimpleEventPlugin` handlers. - */ - - var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin']; - - module.exports = DefaultEventPluginOrder; - -/***/ }, -/* 103 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * + * Translation from modifier key to the associated property in the event. + * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers */ - 'use strict'; - - var EventPropagators = __webpack_require__(71); - var ReactDOMComponentTree = __webpack_require__(64); - var SyntheticMouseEvent = __webpack_require__(104); - - var eventTypes = { - mouseEnter: { - registrationName: 'onMouseEnter', - dependencies: ['topMouseOut', 'topMouseOver'] - }, - mouseLeave: { - registrationName: 'onMouseLeave', - dependencies: ['topMouseOut', 'topMouseOver'] - } - }; - - var EnterLeaveEventPlugin = { - - eventTypes: eventTypes, - - /** - * For almost every interaction we care about, there will be both a top-level - * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that - * we do not extract duplicate events. However, moving the mouse into the - * browser from outside will not fire a `mouseout` event. In this case, we use - * the `mouseover` top-level event. - */ - extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { - if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { - return null; - } - if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') { - // Must not be a mouse in or mouse out - ignoring. - return null; - } - - var win; - if (nativeEventTarget.window === nativeEventTarget) { - // `nativeEventTarget` is probably a window object. - win = nativeEventTarget; - } else { - // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. - var doc = nativeEventTarget.ownerDocument; - if (doc) { - win = doc.defaultView || doc.parentWindow; - } else { - win = window; - } - } - - var from; - var to; - if (topLevelType === 'topMouseOut') { - from = targetInst; - var related = nativeEvent.relatedTarget || nativeEvent.toElement; - to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null; - } else { - // Moving to a node from outside the window. - from = null; - to = targetInst; - } - - if (from === to) { - // Nothing pertains to our managed components. - return null; - } - - var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from); - var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to); - - var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget); - leave.type = 'mouseleave'; - leave.target = fromNode; - leave.relatedTarget = toNode; - - var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget); - enter.type = 'mouseenter'; - enter.target = toNode; - enter.relatedTarget = fromNode; - - EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to); - - return [leave, enter]; - } - + var modifierKeyToProp = { + 'Alt': 'altKey', + 'Control': 'ctrlKey', + 'Meta': 'metaKey', + 'Shift': 'shiftKey' }; - module.exports = EnterLeaveEventPlugin; - -/***/ }, -/* 104 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - 'use strict'; - - var SyntheticUIEvent = __webpack_require__(105); - var ViewportMetrics = __webpack_require__(106); - - var getEventModifierState = __webpack_require__(107); - - /** - * @interface MouseEvent - * @see http://www.w3.org/TR/DOM-Level-3-Events/ - */ - var MouseEventInterface = { - screenX: null, - screenY: null, - clientX: null, - clientY: null, - ctrlKey: null, - shiftKey: null, - altKey: null, - metaKey: null, - getModifierState: getEventModifierState, - button: function (event) { - // Webkit, Firefox, IE9+ - // which: 1 2 3 - // button: 0 1 2 (standard) - var button = event.button; - if ('which' in event) { - return button; - } - // IE<9 - // which: undefined - // button: 0 0 0 - // button: 1 4 2 (onmouseup) - return button === 2 ? 2 : button === 4 ? 1 : 0; - }, - buttons: null, - relatedTarget: function (event) { - return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement); - }, - // "Proprietary" Interface. - pageX: function (event) { - return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft; - }, - pageY: function (event) { - return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop; + // IE8 does not implement getModifierState so we simply map it to the only + // modifier keys exposed by the event itself, does not support Lock-keys. + // Currently, all major browsers except Chrome seems to support Lock-keys. + function modifierStateGetter(keyArg) { + var syntheticEvent = this; + var nativeEvent = syntheticEvent.nativeEvent; + if (nativeEvent.getModifierState) { + return nativeEvent.getModifierState(keyArg); } - }; - - /** - * @param {object} dispatchConfig Configuration used to dispatch this event. - * @param {string} dispatchMarker Marker identifying the event target. - * @param {object} nativeEvent Native browser event. - * @extends {SyntheticUIEvent} - */ - function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { - return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + var keyProp = modifierKeyToProp[keyArg]; + return keyProp ? !!nativeEvent[keyProp] : false; } - SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface); + function getEventModifierState(nativeEvent) { + return modifierStateGetter; + } - module.exports = SyntheticMouseEvent; + module.exports = getEventModifierState; /***/ }, /* 105 */ @@ -11090,158 +10694,19 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule HTMLDOMPropertyConfig */ 'use strict'; - var SyntheticEvent = __webpack_require__(83); - - var getEventTarget = __webpack_require__(99); - - /** - * @interface UIEvent - * @see http://www.w3.org/TR/DOM-Level-3-Events/ - */ - var UIEventInterface = { - view: function (event) { - if (event.view) { - return event.view; - } + var DOMProperty = __webpack_require__(71); - var target = getEventTarget(event); - if (target.window === target) { - // target is a window object - return target; - } - - var doc = target.ownerDocument; - // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. - if (doc) { - return doc.defaultView || doc.parentWindow; - } else { - return window; - } - }, - detail: function (event) { - return event.detail || 0; - } - }; - - /** - * @param {object} dispatchConfig Configuration used to dispatch this event. - * @param {string} dispatchMarker Marker identifying the event target. - * @param {object} nativeEvent Native browser event. - * @extends {SyntheticEvent} - */ - function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { - return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); - } - - SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); - - module.exports = SyntheticUIEvent; - -/***/ }, -/* 106 */ -/***/ function(module, exports) { - - /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - 'use strict'; - - var ViewportMetrics = { - - currentScrollLeft: 0, - - currentScrollTop: 0, - - refreshScrollValues: function (scrollPosition) { - ViewportMetrics.currentScrollLeft = scrollPosition.x; - ViewportMetrics.currentScrollTop = scrollPosition.y; - } - - }; - - module.exports = ViewportMetrics; - -/***/ }, -/* 107 */ -/***/ function(module, exports) { - - /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - 'use strict'; - - /** - * Translation from modifier key to the associated property in the event. - * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers - */ - - var modifierKeyToProp = { - 'Alt': 'altKey', - 'Control': 'ctrlKey', - 'Meta': 'metaKey', - 'Shift': 'shiftKey' - }; - - // IE8 does not implement getModifierState so we simply map it to the only - // modifier keys exposed by the event itself, does not support Lock-keys. - // Currently, all major browsers except Chrome seems to support Lock-keys. - function modifierStateGetter(keyArg) { - var syntheticEvent = this; - var nativeEvent = syntheticEvent.nativeEvent; - if (nativeEvent.getModifierState) { - return nativeEvent.getModifierState(keyArg); - } - var keyProp = modifierKeyToProp[keyArg]; - return keyProp ? !!nativeEvent[keyProp] : false; - } - - function getEventModifierState(nativeEvent) { - return modifierStateGetter; - } - - module.exports = getEventModifierState; - -/***/ }, -/* 108 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - 'use strict'; - - var DOMProperty = __webpack_require__(66); - - var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; - var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; - var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE; - var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE; - var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE; + var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; + var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; + var HAS_SIDE_EFFECTS = DOMProperty.injection.HAS_SIDE_EFFECTS; + var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE; + var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE; + var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE; var HTMLDOMPropertyConfig = { isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')), @@ -11256,8 +10721,6 @@ allowFullScreen: HAS_BOOLEAN_VALUE, allowTransparency: 0, alt: 0, - // specifies target context for links with `preload` type - as: 0, async: HAS_BOOLEAN_VALUE, autoComplete: 0, // autoFocus is polyfilled/normalized by AutoFocusUtils @@ -11338,13 +10801,11 @@ optimum: 0, pattern: 0, placeholder: 0, - playsInline: HAS_BOOLEAN_VALUE, poster: 0, preload: 0, profile: 0, radioGroup: 0, readOnly: HAS_BOOLEAN_VALUE, - referrerPolicy: 0, rel: 0, required: HAS_BOOLEAN_VALUE, reversed: HAS_BOOLEAN_VALUE, @@ -11376,7 +10837,7 @@ // Setting .type throws on non- tags type: 0, useMap: 0, - value: 0, + value: MUST_USE_PROPERTY | HAS_SIDE_EFFECTS, width: 0, wmode: 0, wrap: 0, @@ -11436,7 +10897,7 @@ module.exports = HTMLDOMPropertyConfig; /***/ }, -/* 109 */ +/* 106 */ /***/ function(module, exports, __webpack_require__) { /** @@ -11447,12 +10908,13 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule ReactComponentBrowserEnvironment */ 'use strict'; - var DOMChildrenOperations = __webpack_require__(110); - var ReactDOMIDOperations = __webpack_require__(121); + var DOMChildrenOperations = __webpack_require__(107); + var ReactDOMIDOperations = __webpack_require__(119); /** * Abstracts away all functionality of the reconciler that requires knowledge of @@ -11463,14 +10925,23 @@ processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, - replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup + replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup, + + /** + * If a particular environment requires that some resources be cleaned up, + * specify this in the injected Mixin. In the DOM, we would likely want to + * purge any cached node ID lookups. + * + * @private + */ + unmountIDFromEnvironment: function (rootNodeID) {} }; module.exports = ReactComponentBrowserEnvironment; /***/ }, -/* 110 */ +/* 107 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -11481,22 +10952,24 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule DOMChildrenOperations */ 'use strict'; - var DOMLazyTree = __webpack_require__(111); - var Danger = __webpack_require__(117); - var ReactDOMComponentTree = __webpack_require__(64); - var ReactInstrumentation = __webpack_require__(92); + var DOMLazyTree = __webpack_require__(108); + var Danger = __webpack_require__(114); + var ReactMultiChildUpdateTypes = __webpack_require__(118); + var ReactDOMComponentTree = __webpack_require__(70); + var ReactInstrumentation = __webpack_require__(37); - var createMicrosoftUnsafeLocalFunction = __webpack_require__(114); + var createMicrosoftUnsafeLocalFunction = __webpack_require__(110); var setInnerHTML = __webpack_require__(113); - var setTextContent = __webpack_require__(115); + var setTextContent = __webpack_require__(111); function getNodeAfter(parentNode, node) { // Special case for text components, which return [open, close] comments - // from getHostNode. + // from getNativeNode. if (Array.isArray(node)) { node = node[1]; } @@ -11585,11 +11058,7 @@ } if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onHostOperation({ - instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID, - type: 'replace text', - payload: stringText - }); + ReactInstrumentation.debugTool.onNativeOperation(ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID, 'replace text', stringText); } } @@ -11598,19 +11067,11 @@ dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) { Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup); if (prevInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onHostOperation({ - instanceID: prevInstance._debugID, - type: 'replace with', - payload: markup.toString() - }); + ReactInstrumentation.debugTool.onNativeOperation(prevInstance._debugID, 'replace with', markup.toString()); } else { var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node); if (nextInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onHostOperation({ - instanceID: nextInstance._debugID, - type: 'mount', - payload: markup.toString() - }); + ReactInstrumentation.debugTool.onNativeOperation(nextInstance._debugID, 'mount', markup.toString()); } } }; @@ -11640,54 +11101,34 @@ for (var k = 0; k < updates.length; k++) { var update = updates[k]; switch (update.type) { - case 'INSERT_MARKUP': + case ReactMultiChildUpdateTypes.INSERT_MARKUP: insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode)); if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onHostOperation({ - instanceID: parentNodeDebugID, - type: 'insert child', - payload: { toIndex: update.toIndex, content: update.content.toString() } - }); + ReactInstrumentation.debugTool.onNativeOperation(parentNodeDebugID, 'insert child', { toIndex: update.toIndex, content: update.content.toString() }); } break; - case 'MOVE_EXISTING': + case ReactMultiChildUpdateTypes.MOVE_EXISTING: moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode)); if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onHostOperation({ - instanceID: parentNodeDebugID, - type: 'move child', - payload: { fromIndex: update.fromIndex, toIndex: update.toIndex } - }); + ReactInstrumentation.debugTool.onNativeOperation(parentNodeDebugID, 'move child', { fromIndex: update.fromIndex, toIndex: update.toIndex }); } break; - case 'SET_MARKUP': + case ReactMultiChildUpdateTypes.SET_MARKUP: setInnerHTML(parentNode, update.content); if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onHostOperation({ - instanceID: parentNodeDebugID, - type: 'replace children', - payload: update.content.toString() - }); + ReactInstrumentation.debugTool.onNativeOperation(parentNodeDebugID, 'replace children', update.content.toString()); } break; - case 'TEXT_CONTENT': + case ReactMultiChildUpdateTypes.TEXT_CONTENT: setTextContent(parentNode, update.content); if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onHostOperation({ - instanceID: parentNodeDebugID, - type: 'replace text', - payload: update.content.toString() - }); + ReactInstrumentation.debugTool.onNativeOperation(parentNodeDebugID, 'replace text', update.content.toString()); } break; - case 'REMOVE_NODE': + case ReactMultiChildUpdateTypes.REMOVE_NODE: removeChild(parentNode, update.fromNode); if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onHostOperation({ - instanceID: parentNodeDebugID, - type: 'remove child', - payload: { fromIndex: update.fromIndex } - }); + ReactInstrumentation.debugTool.onNativeOperation(parentNodeDebugID, 'remove child', { fromIndex: update.fromIndex }); } break; } @@ -11700,7 +11141,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) /***/ }, -/* 111 */ +/* 108 */ /***/ function(module, exports, __webpack_require__) { /** @@ -11711,15 +11152,15 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule DOMLazyTree */ 'use strict'; - var DOMNamespaces = __webpack_require__(112); - var setInnerHTML = __webpack_require__(113); + var DOMNamespaces = __webpack_require__(109); - var createMicrosoftUnsafeLocalFunction = __webpack_require__(114); - var setTextContent = __webpack_require__(115); + var createMicrosoftUnsafeLocalFunction = __webpack_require__(110); + var setTextContent = __webpack_require__(111); var ELEMENT_NODE_TYPE = 1; var DOCUMENT_FRAGMENT_NODE_TYPE = 11; @@ -11748,7 +11189,7 @@ insertTreeBefore(node, children[i], null); } } else if (tree.html != null) { - setInnerHTML(node, tree.html); + node.innerHTML = tree.html; } else if (tree.text != null) { setTextContent(node, tree.text); } @@ -11787,7 +11228,7 @@ if (enableLazy) { tree.html = html; } else { - setInnerHTML(tree.node, html); + tree.node.innerHTML = html; } } @@ -11822,7 +11263,7 @@ module.exports = DOMLazyTree; /***/ }, -/* 112 */ +/* 109 */ /***/ function(module, exports) { /** @@ -11833,6 +11274,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule DOMNamespaces */ 'use strict'; @@ -11846,109 +11288,7 @@ module.exports = DOMNamespaces; /***/ }, -/* 113 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - 'use strict'; - - var ExecutionEnvironment = __webpack_require__(78); - var DOMNamespaces = __webpack_require__(112); - - var WHITESPACE_TEST = /^[ \r\n\t\f]/; - var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; - - var createMicrosoftUnsafeLocalFunction = __webpack_require__(114); - - // SVG temp container for IE lacking innerHTML - var reusableSVGContainer; - - /** - * Set the innerHTML property of a node, ensuring that whitespace is preserved - * even in IE8. - * - * @param {DOMElement} node - * @param {string} html - * @internal - */ - var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) { - // IE does not have innerHTML for SVG nodes, so instead we inject the - // new markup in a temp node and then move the child nodes across into - // the target node - if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) { - reusableSVGContainer = reusableSVGContainer || document.createElement('div'); - reusableSVGContainer.innerHTML = '' + html + ''; - var svgNode = reusableSVGContainer.firstChild; - while (svgNode.firstChild) { - node.appendChild(svgNode.firstChild); - } - } else { - node.innerHTML = html; - } - }); - - if (ExecutionEnvironment.canUseDOM) { - // IE8: When updating a just created node with innerHTML only leading - // whitespace is removed. When updating an existing node with innerHTML - // whitespace in root TextNodes is also collapsed. - // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html - - // Feature detection; only IE8 is known to behave improperly like this. - var testElement = document.createElement('div'); - testElement.innerHTML = ' '; - if (testElement.innerHTML === '') { - setInnerHTML = function (node, html) { - // Magic theory: IE8 supposedly differentiates between added and updated - // nodes when processing innerHTML, innerHTML on updated nodes suffers - // from worse whitespace behavior. Re-adding a node like this triggers - // the initial and more favorable whitespace behavior. - // TODO: What to do on a detached node? - if (node.parentNode) { - node.parentNode.replaceChild(node, node); - } - - // We also implement a workaround for non-visible tags disappearing into - // thin air on IE8, this only happens if there is no visible text - // in-front of the non-visible tags. Piggyback on the whitespace fix - // and simply check if any non-visible tags appear in the source. - if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) { - // Recover leading whitespace by temporarily prepending any character. - // \uFEFF has the potential advantage of being zero-width/invisible. - // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode - // in hopes that this is preserved even if "\uFEFF" is transformed to - // the actual Unicode character (by Babel, for example). - // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216 - node.innerHTML = String.fromCharCode(0xFEFF) + html; - - // deleteData leaves an empty `TextNode` which offsets the index of all - // children. Definitely want to avoid this. - var textNode = node.firstChild; - if (textNode.data.length === 1) { - node.removeChild(textNode); - } else { - textNode.deleteData(0, 1); - } - } else { - node.innerHTML = html; - } - }; - } - testElement = null; - } - - module.exports = setInnerHTML; - -/***/ }, -/* 114 */ +/* 110 */ /***/ function(module, exports) { /** @@ -11959,6 +11299,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule createMicrosoftUnsafeLocalFunction */ /* globals MSApp */ @@ -11984,7 +11325,7 @@ module.exports = createMicrosoftUnsafeLocalFunction; /***/ }, -/* 115 */ +/* 111 */ /***/ function(module, exports, __webpack_require__) { /** @@ -11995,12 +11336,13 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule setTextContent */ 'use strict'; - var ExecutionEnvironment = __webpack_require__(78); - var escapeTextContentForBrowser = __webpack_require__(116); + var ExecutionEnvironment = __webpack_require__(39); + var escapeTextContentForBrowser = __webpack_require__(112); var setInnerHTML = __webpack_require__(113); /** @@ -12014,24 +11356,12 @@ * @internal */ var setTextContent = function (node, text) { - if (text) { - var firstChild = node.firstChild; - - if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) { - firstChild.nodeValue = text; - return; - } - } node.textContent = text; }; if (ExecutionEnvironment.canUseDOM) { if (!('textContent' in document.documentElement)) { setTextContent = function (node, text) { - if (node.nodeType === 3) { - node.nodeValue = text; - return; - } setInnerHTML(node, escapeTextContentForBrowser(text)); }; } @@ -12040,134 +11370,137 @@ module.exports = setTextContent; /***/ }, -/* 116 */ +/* 112 */ /***/ function(module, exports) { /** - * Copyright 2016-present, Facebook, Inc. + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * Based on the escape-html library, which is used under the MIT License below: - * - * Copyright (c) 2012-2013 TJ Holowaychuk - * Copyright (c) 2015 Andreas Lubbe - * Copyright (c) 2015 Tiancheng "Timothy" Gu - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * 'Software'), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * + * @providesModule escapeTextContentForBrowser */ 'use strict'; - // code copied and modified from escape-html - /** - * Module variables. - * @private - */ + var ESCAPE_LOOKUP = { + '&': '&', + '>': '>', + '<': '<', + '"': '"', + '\'': ''' + }; - var matchHtmlRegExp = /["'&<>]/; + var ESCAPE_REGEX = /[&><"']/g; + + function escaper(match) { + return ESCAPE_LOOKUP[match]; + } /** - * Escape special characters in the given string of html. + * Escapes text to prevent scripting attacks. * - * @param {string} string The string to escape for inserting into HTML - * @return {string} - * @public - */ - - function escapeHtml(string) { - var str = '' + string; - var match = matchHtmlRegExp.exec(str); + * @param {*} text Text value to escape. + * @return {string} An escaped string. + */ + function escapeTextContentForBrowser(text) { + return ('' + text).replace(ESCAPE_REGEX, escaper); + } - if (!match) { - return str; - } + module.exports = escapeTextContentForBrowser; - var escape; - var html = ''; - var index = 0; - var lastIndex = 0; +/***/ }, +/* 113 */ +/***/ function(module, exports, __webpack_require__) { - for (index = match.index; index < str.length; index++) { - switch (str.charCodeAt(index)) { - case 34: - // " - escape = '"'; - break; - case 38: - // & - escape = '&'; - break; - case 39: - // ' - escape = '''; // modified from escape-html; used to be ''' - break; - case 60: - // < - escape = '<'; - break; - case 62: - // > - escape = '>'; - break; - default: - continue; - } + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule setInnerHTML + */ - if (lastIndex !== index) { - html += str.substring(lastIndex, index); - } + 'use strict'; - lastIndex = index + 1; - html += escape; - } + var ExecutionEnvironment = __webpack_require__(39); - return lastIndex !== index ? html + str.substring(lastIndex, index) : html; - } - // end code copied and modified from escape-html + var WHITESPACE_TEST = /^[ \r\n\t\f]/; + var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; + var createMicrosoftUnsafeLocalFunction = __webpack_require__(110); /** - * Escapes text to prevent scripting attacks. + * Set the innerHTML property of a node, ensuring that whitespace is preserved + * even in IE8. * - * @param {*} text Text value to escape. - * @return {string} An escaped string. + * @param {DOMElement} node + * @param {string} html + * @internal */ - function escapeTextContentForBrowser(text) { - if (typeof text === 'boolean' || typeof text === 'number') { - // this shortcircuit helps perf for types that we know will never have - // special characters, especially given that this function is used often - // for numeric dom ids. - return '' + text; + var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) { + node.innerHTML = html; + }); + + if (ExecutionEnvironment.canUseDOM) { + // IE8: When updating a just created node with innerHTML only leading + // whitespace is removed. When updating an existing node with innerHTML + // whitespace in root TextNodes is also collapsed. + // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html + + // Feature detection; only IE8 is known to behave improperly like this. + var testElement = document.createElement('div'); + testElement.innerHTML = ' '; + if (testElement.innerHTML === '') { + setInnerHTML = function (node, html) { + // Magic theory: IE8 supposedly differentiates between added and updated + // nodes when processing innerHTML, innerHTML on updated nodes suffers + // from worse whitespace behavior. Re-adding a node like this triggers + // the initial and more favorable whitespace behavior. + // TODO: What to do on a detached node? + if (node.parentNode) { + node.parentNode.replaceChild(node, node); + } + + // We also implement a workaround for non-visible tags disappearing into + // thin air on IE8, this only happens if there is no visible text + // in-front of the non-visible tags. Piggyback on the whitespace fix + // and simply check if any non-visible tags appear in the source. + if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) { + // Recover leading whitespace by temporarily prepending any character. + // \uFEFF has the potential advantage of being zero-width/invisible. + // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode + // in hopes that this is preserved even if "\uFEFF" is transformed to + // the actual Unicode character (by Babel, for example). + // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216 + node.innerHTML = String.fromCharCode(0xFEFF) + html; + + // deleteData leaves an empty `TextNode` which offsets the index of all + // children. Definitely want to avoid this. + var textNode = node.firstChild; + if (textNode.data.length === 1) { + node.removeChild(textNode); + } else { + textNode.deleteData(0, 1); + } + } else { + node.innerHTML = html; + } + }; } - return escapeHtml(text); + testElement = null; } - module.exports = escapeTextContentForBrowser; + module.exports = setInnerHTML; /***/ }, -/* 117 */ +/* 114 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -12178,21 +11511,118 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule Danger */ 'use strict'; - var _prodInvariant = __webpack_require__(65); + var DOMLazyTree = __webpack_require__(108); + var ExecutionEnvironment = __webpack_require__(39); + + var createNodesFromMarkup = __webpack_require__(115); + var emptyFunction = __webpack_require__(30); + var getMarkupWrap = __webpack_require__(117); + var invariant = __webpack_require__(26); - var DOMLazyTree = __webpack_require__(111); - var ExecutionEnvironment = __webpack_require__(78); + var OPEN_TAG_NAME_EXP = /^(<[^ \/>]+)/; + var RESULT_INDEX_ATTR = 'data-danger-index'; - var createNodesFromMarkup = __webpack_require__(118); - var emptyFunction = __webpack_require__(31); - var invariant = __webpack_require__(27); + /** + * Extracts the `nodeName` from a string of markup. + * + * NOTE: Extracting the `nodeName` does not require a regular expression match + * because we make assumptions about React-generated markup (i.e. there are no + * spaces surrounding the opening tag and there is at least one attribute). + * + * @param {string} markup String of markup. + * @return {string} Node name of the supplied markup. + * @see http://jsperf.com/extract-nodename + */ + function getNodeName(markup) { + return markup.substring(1, markup.indexOf(' ')); + } var Danger = { + /** + * Renders markup into an array of nodes. The markup is expected to render + * into a list of root nodes. Also, the length of `resultList` and + * `markupList` should be the same. + * + * @param {array} markupList List of markup strings to render. + * @return {array} List of rendered nodes. + * @internal + */ + dangerouslyRenderMarkup: function (markupList) { + !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + 'thread. Make sure `window` and `document` are available globally ' + 'before requiring React when unit testing or use ' + 'ReactDOMServer.renderToString for server rendering.') : invariant(false) : void 0; + var nodeName; + var markupByNodeName = {}; + // Group markup by `nodeName` if a wrap is necessary, else by '*'. + for (var i = 0; i < markupList.length; i++) { + !markupList[i] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyRenderMarkup(...): Missing markup.') : invariant(false) : void 0; + nodeName = getNodeName(markupList[i]); + nodeName = getMarkupWrap(nodeName) ? nodeName : '*'; + markupByNodeName[nodeName] = markupByNodeName[nodeName] || []; + markupByNodeName[nodeName][i] = markupList[i]; + } + var resultList = []; + var resultListAssignmentCount = 0; + for (nodeName in markupByNodeName) { + if (!markupByNodeName.hasOwnProperty(nodeName)) { + continue; + } + var markupListByNodeName = markupByNodeName[nodeName]; + + // This for-in loop skips the holes of the sparse array. The order of + // iteration should follow the order of assignment, which happens to match + // numerical index order, but we don't rely on that. + var resultIndex; + for (resultIndex in markupListByNodeName) { + if (markupListByNodeName.hasOwnProperty(resultIndex)) { + var markup = markupListByNodeName[resultIndex]; + + // 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 + '" '); + } + } + + // Render each group of markup with similar wrapping `nodeName`. + var renderNodes = createNodesFromMarkup(markupListByNodeName.join(''), emptyFunction // Do nothing special with