does.
+ contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';
+ }
+ return contentKey;
+}
+
+module.exports = getTextContentAccessor;
+
+/***/ }),
+/* 73 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* 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.
+ *
+ */
+
+
+
+var _prodInvariant = __webpack_require__(3),
+ _assign = __webpack_require__(4);
+
+var ReactCompositeComponent = __webpack_require__(119);
+var ReactEmptyComponent = __webpack_require__(61);
+var ReactHostComponent = __webpack_require__(63);
+
+var getNextDebugID = __webpack_require__(187);
+var invariant = __webpack_require__(1);
+var warning = __webpack_require__(2);
+
+// To avoid a cyclic dependency, we create the final class in this module
+var ReactCompositeComponentWrapper = function (element) {
+ this.construct(element);
+};
+
+function getDeclarationErrorAddendum(owner) {
+ if (owner) {
+ var name = owner.getName();
+ if (name) {
+ return ' Check the render method of `' + name + '`.';
+ }
+ }
+ return '';
+}
+
+/**
+ * Check if the type reference is a known internal type. I.e. not a user
+ * provided composite type.
+ *
+ * @param {function} type
+ * @return {boolean} Returns true if this is a valid internal type.
+ */
+function isInternalComponentType(type) {
+ return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function';
+}
+
+/**
+ * Given a ReactNode, create an instance that will actually be mounted.
+ *
+ * @param {ReactNode} node
+ * @param {boolean} shouldHaveDebugID
+ * @return {object} A new instance of the element's constructor.
+ * @protected
+ */
+function instantiateReactComponent(node, shouldHaveDebugID) {
+ var instance;
+
+ if (node === null || node === false) {
+ instance = ReactEmptyComponent.create(instantiateReactComponent);
+ } else if (typeof node === 'object') {
+ var element = node;
+ var type = element.type;
+ if (typeof type !== 'function' && typeof type !== 'string') {
+ var info = '';
+ if (process.env.NODE_ENV !== 'production') {
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
+ info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
+ }
+ }
+ info += getDeclarationErrorAddendum(element._owner);
+ true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info) : _prodInvariant('130', type == null ? type : typeof type, info) : void 0;
+ }
+
+ // Special case string values
+ if (typeof element.type === 'string') {
+ instance = ReactHostComponent.createInternalComponent(element);
+ } else if (isInternalComponentType(element.type)) {
+ // This is temporarily available for custom components that are not string
+ // representations. I.e. ART. Once those are updated to use the string
+ // representation, we can drop this code path.
+ instance = new element.type(element);
+
+ // We renamed this. Allow the old name for compat. :(
+ if (!instance.getHostNode) {
+ instance.getHostNode = instance.getNativeNode;
+ }
+ } else {
+ instance = new ReactCompositeComponentWrapper(element);
+ }
+ } else if (typeof node === 'string' || typeof node === 'number') {
+ instance = ReactHostComponent.createInstanceForText(node);
+ } else {
+ true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0;
+ }
+
+ if (process.env.NODE_ENV !== 'production') {
+ process.env.NODE_ENV !== 'production' ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0;
+ }
+
+ // These two fields are used by the DOM and ART diffing algorithms
+ // respectively. Instead of using expandos on components, we should be
+ // storing the state needed by the diffing algorithms elsewhere.
+ instance._mountIndex = 0;
+ instance._mountImage = null;
+
+ if (process.env.NODE_ENV !== 'production') {
+ instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0;
+ }
+
+ // Internal instances should fully constructed at this point, so they should
+ // not get any new fields added to them at this point.
+ if (process.env.NODE_ENV !== 'production') {
+ if (Object.preventExtensions) {
+ Object.preventExtensions(instance);
+ }
+ }
+
+ return instance;
+}
+
+_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, {
+ _instantiateReactComponent: instantiateReactComponent
+});
+
+module.exports = instantiateReactComponent;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 74 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * 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.
+ *
+ *
+ */
+
+
+
+/**
+ * @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
+};
+
+function isTextInputElement(elem) {
+ var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
+
+ if (nodeName === 'input') {
+ return !!supportedInputTypes[elem.type];
+ }
+
+ if (nodeName === 'textarea') {
+ return true;
+ }
+
+ return false;
+}
+
+module.exports = isTextInputElement;
+
+/***/ }),
+/* 75 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * 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.
+ *
+ */
+
+
+
+var ExecutionEnvironment = __webpack_require__(6);
+var escapeTextContentForBrowser = __webpack_require__(30);
+var setInnerHTML = __webpack_require__(31);
+
+/**
+ * Set the textContent property of a node, ensuring that whitespace is preserved
+ * even in IE8. innerText is a poor substitute for textContent and, among many
+ * issues, inserts
instead of the literal newline chars. innerHTML behaves
+ * as it should.
+ *
+ * @param {DOMElement} node
+ * @param {string} text
+ * @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));
+ };
+ }
+}
+
+module.exports = setTextContent;
+
+/***/ }),
+/* 76 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* 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.
+ *
+ */
+
+
+
+var _prodInvariant = __webpack_require__(3);
+
+var ReactCurrentOwner = __webpack_require__(11);
+var REACT_ELEMENT_TYPE = __webpack_require__(138);
+
+var getIteratorFn = __webpack_require__(172);
+var invariant = __webpack_require__(1);
+var KeyEscapeUtils = __webpack_require__(37);
+var warning = __webpack_require__(2);
+
+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.
+ */
+
+var didWarnAboutMaps = false;
+
+/**
+ * Generate a key string that identifies a component within a set.
+ *
+ * @param {*} component A component that could contain a manual key.
+ * @param {number} index Index that is used if a manual key is not provided.
+ * @return {string}
+ */
+function getComponentKey(component, index) {
+ // Do some typechecking here since we call this blindly. We want to ensure
+ // that we don't block potential future ES APIs.
+ if (component && typeof component === 'object' && component.key != null) {
+ // Explicit key
+ return KeyEscapeUtils.escape(component.key);
+ }
+ // Implicit key determined by the index in the set
+ return index.toString(36);
+}
+
+/**
+ * @param {?*} children Children tree container.
+ * @param {!string} nameSoFar Name of the key path so far.
+ * @param {!function} callback Callback to invoke with each child found.
+ * @param {?*} traverseContext Used to pass information throughout the traversal
+ * process.
+ * @return {!number} The number of children in this subtree.
+ */
+function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
+ var type = typeof children;
+
+ if (type === 'undefined' || type === 'boolean') {
+ // All of the above are perceived as null.
+ 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) {
+ callback(traverseContext, children,
+ // If it's the only child, treat the name as if it was wrapped in an array
+ // so that it's consistent if the number of children grows.
+ nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
+ return 1;
+ }
+
+ var child;
+ var nextName;
+ var subtreeCount = 0; // Count of children found in the current subtree.
+ var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
+
+ if (Array.isArray(children)) {
+ for (var i = 0; i < children.length; i++) {
+ child = children[i];
+ nextName = nextNamePrefix + getComponentKey(child, i);
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
+ }
+ } else {
+ var iteratorFn = getIteratorFn(children);
+ if (iteratorFn) {
+ var iterator = iteratorFn.call(children);
+ var step;
+ if (iteratorFn !== children.entries) {
+ var ii = 0;
+ while (!(step = iterator.next()).done) {
+ child = step.value;
+ nextName = nextNamePrefix + getComponentKey(child, ii++);
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
+ }
+ } 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;
+ didWarnAboutMaps = true;
+ }
+ // Iterator will provide entry [k,v] tuples rather than values.
+ while (!(step = iterator.next()).done) {
+ var entry = step.value;
+ if (entry) {
+ child = entry[1];
+ nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
+ }
+ }
+ }
+ } else if (type === 'object') {
+ var addendum = '';
+ if (process.env.NODE_ENV !== 'production') {
+ addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
+ if (children._isReactElement) {
+ addendum = ' It looks like you\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.';
+ }
+ if (ReactCurrentOwner.current) {
+ var name = ReactCurrentOwner.current.getName();
+ if (name) {
+ addendum += ' Check the render method of `' + name + '`.';
+ }
+ }
+ }
+ 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;
+ }
+ }
+
+ return subtreeCount;
+}
+
+/**
+ * Traverses children that are typically specified as `props.children`, but
+ * might also be specified through attributes:
+ *
+ * - `traverseAllChildren(this.props.children, ...)`
+ * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
+ *
+ * The `traverseContext` is an optional argument that is passed through the
+ * entire traversal. It can be used to store accumulations or anything else that
+ * the callback might find relevant.
+ *
+ * @param {?*} children Children tree object.
+ * @param {!function} callback To invoke upon traversing each child.
+ * @param {?*} traverseContext Context for traversal.
+ * @return {!number} The number of children in this subtree.
+ */
+function traverseAllChildren(children, callback, traverseContext) {
+ if (children == null) {
+ return 0;
+ }
+
+ return traverseAllChildrenImpl(children, '', callback, traverseContext);
+}
+
+module.exports = traverseAllChildren;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 77 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * 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.
+ *
+ *
+ */
+
+
+
+// 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;
+
+/***/ }),
+/* 78 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* 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.
+ *
+ */
+
+/**
+ * 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.
+ */
+
+
+
+var ReactCurrentOwner = __webpack_require__(11);
+var ReactComponentTreeHook = __webpack_require__(7);
+var ReactElement = __webpack_require__(16);
+
+var checkReactTypeSpec = __webpack_require__(186);
+
+var canDefineProperty = __webpack_require__(32);
+var getIteratorFn = __webpack_require__(80);
+var warning = __webpack_require__(2);
+
+function getDeclarationErrorAddendum() {
+ if (ReactCurrentOwner.current) {
+ var name = ReactCurrentOwner.current.getName();
+ if (name) {
+ return ' Check the render method of `' + name + '`.';
+ }
+ }
+ return '';
+}
+
+function getSourceInfoErrorAddendum(elementProps) {
+ if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
+ var source = elementProps.__source;
+ var fileName = source.fileName.replace(/^.*[\\\/]/, '');
+ var lineNumber = source.lineNumber;
+ return ' Check your code at ' + fileName + ':' + lineNumber + '.';
+ }
+ 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 getCurrentComponentErrorInfo(parentType) {
+ var info = getDeclarationErrorAddendum();
+
+ if (!info) {
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
+ if (parentName) {
+ info = ' Check the top-level render call using <' + parentName + '>.';
+ }
+ }
+ 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.
+ *
+ * @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;
+ }
+ element._store.validated = true;
+
+ var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {});
+
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
+ if (memoizer[currentComponentErrorInfo]) {
+ return;
+ }
+ memoizer[currentComponentErrorInfo] = true;
+
+ // 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() + '.';
+ }
+
+ 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;
+}
+
+/**
+ * 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);
+ }
+ }
+ } 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);
+ }
+ }
+ }
+ }
+ }
+}
+
+/**
+ * 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) {
+ 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;
+ }
+}
+
+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) {
+ if (typeof type !== 'function' && typeof type !== 'string') {
+ var info = '';
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
+ info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
+ }
+
+ var sourceInfo = getSourceInfoErrorAddendum(props);
+ if (sourceInfo) {
+ info += sourceInfo;
+ } else {
+ info += getDeclarationErrorAddendum();
+ }
+
+ info += ReactComponentTreeHook.getCurrentStackAddendum();
+
+ process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;
+ }
+ }
+
+ 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;
+ }
+
+ // 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);
+ }
+ }
+
+ validatePropTypes(element);
+
+ 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;
+ }
+ });
+ }
+ }
+
+ return validatedFactory;
+ },
+
+ 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;
+ }
+
+};
+
+module.exports = ReactElementValidator;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 79 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* 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.
+ *
+ *
+ */
+
+
+
+var ReactPropTypeLocationNames = {};
+
+if (process.env.NODE_ENV !== 'production') {
+ ReactPropTypeLocationNames = {
+ prop: 'prop',
+ context: 'context',
+ childContext: 'child context'
+ };
+}
+
+module.exports = ReactPropTypeLocationNames;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 80 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * 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.
+ *
+ *
+ */
+
+
+
+/* global Symbol */
+
+var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
+var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
+
+/**
+ * Returns the iterator method function contained on the iterable object.
+ *
+ * Be sure to invoke the function with the iterable as context:
+ *
+ * var iteratorFn = getIteratorFn(myIterable);
+ * if (iteratorFn) {
+ * var iterator = iteratorFn.call(myIterable);
+ * ...
+ * }
+ *
+ * @param {?object} maybeIterable
+ * @return {?function}
+ */
+function getIteratorFn(maybeIterable) {
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
+ if (typeof iteratorFn === 'function') {
+ return iteratorFn;
+ }
+}
+
+module.exports = getIteratorFn;
+
+/***/ }),
+/* 81 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _react = __webpack_require__(12);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _Search = __webpack_require__(87);
+
+var _Search2 = _interopRequireDefault(_Search);
+
+var _EntryList = __webpack_require__(84);
+
+var _EntryList2 = _interopRequireDefault(_EntryList);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var App = function (_React$Component) {
+ _inherits(App, _React$Component);
+
+ function App(props) {
+ _classCallCheck(this, App);
+
+ // will hold state of all entries in database and current search values
+ var _this = _possibleConstructorReturn(this, (App.__proto__ || Object.getPrototypeOf(App)).call(this, props));
+
+ _this.state = {
+ viewingEntry: '',
+ allEntries: [],
+ searchResults: [],
+ currentUser: ''
+ };
+ return _this;
+ }
+ // when the component loads successfully
+
+
+ _createClass(App, [{
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ // load all of the user's data
+ this.getUserEntries();
+ }
+ }, {
+ key: 'getUserEntries',
+ value: function getUserEntries() {
+ var _this2 = this;
+
+ $.ajax({
+ url: '/querydb',
+ type: 'GET',
+ success: function success(response) {
+ // sets state of all entries
+ // sets current user name
+ if (response.length) {
+ _this2.setState({
+ allEntries: response,
+ currentUser: response[0].user
+ });
+ }
+ },
+ error: function error(_error) {
+ console.log(_error);
+ throw _error;
+ }
+ });
+ }
+ }, {
+ key: 'greetUser',
+
+ // generates greeting in banner
+ value: function greetUser() {
+ // if current user is identified
+ if (this.state.currentUser) {
+ // greet them by name
+ return 'Hello, ' + this.state.currentUser + '!';
+ } else {
+ // new users are greetedwith Hello
+ return 'Hello!';
+ }
+ }
+ // deletes a listening instance from the db
+
+ }, {
+ key: 'deleteUserEntries',
+ value: function deleteUserEntries(id, date, callback) {
+ $.ajax({
+ url: '/querydb/delete',
+ type: 'POST',
+ data: {
+ impressionId: id,
+ date: date
+ },
+ success: function success(response) {
+ console.log(response);
+ callback();
+ },
+ error: function error(_error2) {
+ console.log(_error2);
+ throw _error2;
+ }
+ });
+ }
+ // updates a user entry
+
+ }, {
+ key: 'updateUserEntries',
+ value: function updateUserEntries(id, rating, impression, callback) {
+ $.ajax({
+ url: '/querydb/update',
+ type: 'POST',
+ data: {
+ id: id,
+ rating: rating,
+ impression: impression
+ },
+ success: function success(response) {
+ callback();
+ },
+ error: function error(_error3) {
+ console.log(_error3);
+ throw _error3;
+ }
+ });
+ }
+
+ // renders the app to the DOM
+
+ }, {
+ key: 'render',
+ value: function render() {
+ return _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(
+ 'div',
+ { className: 'container-fluid app' },
+ _react2.default.createElement(
+ 'header',
+ { className: 'navbar' },
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(
+ 'h2',
+ { className: 'greeting' },
+ this.greetUser()
+ )
+ ),
+ _react2.default.createElement(
+ 'a',
+ { href: '/signout', className: 'navbar-right signout' },
+ _react2.default.createElement(
+ 'button',
+ { className: 'btn btn-default landing' },
+ _react2.default.createElement(
+ 'span',
+ null,
+ 'Sign Out'
+ )
+ )
+ ),
+ _react2.default.createElement('img', { className: 'navbar-center header logo', src: 'styles/logo.svg' })
+ ),
+ _react2.default.createElement(
+ 'div',
+ { className: 'col-md-2 search' },
+ _react2.default.createElement(_Search2.default, { getUserEntries: this.getUserEntries.bind(this) })
+ ),
+ _react2.default.createElement(
+ 'div',
+ { className: 'col-md-10' },
+ _react2.default.createElement(
+ 'table',
+ { className: 'table-responsive table' },
+ _react2.default.createElement(_EntryList2.default, { allEntries: this.state.allEntries,
+ updateUserEntries: this.updateUserEntries.bind(this),
+ getUserEntries: this.getUserEntries.bind(this),
+ deleteUserEntries: this.deleteUserEntries.bind(this) })
+ )
+ )
+ )
+ );
+ }
+ }]);
+
+ return App;
+}(_react2.default.Component);
+
+exports.default = App;
+
+/***/ }),
+/* 82 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+module.exports = __webpack_require__(120);
+
+
+/***/ }),
+/* 83 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _react = __webpack_require__(12);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _UpdateBox = __webpack_require__(89);
+
+var _UpdateBox2 = _interopRequireDefault(_UpdateBox);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Entry = function (_React$Component) {
+ _inherits(Entry, _React$Component);
+
+ function Entry(props) {
+ _classCallCheck(this, Entry);
+
+ var _this = _possibleConstructorReturn(this, (Entry.__proto__ || Object.getPrototypeOf(Entry)).call(this, props));
+
+ _this.state = {
+ months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
+ month: ''
+ };
+ return _this;
+ }
+
+ _createClass(Entry, [{
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ this.setState({
+ month: this.props.date.slice(5, 7)
+ });
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ return _react2.default.createElement(
+ 'tr',
+ { className: 'entry row' },
+ _react2.default.createElement(
+ 'td',
+ { className: 'listenDate col-md-1' },
+ _react2.default.createElement(
+ 'span',
+ { className: 'month' },
+ _react2.default.createElement(
+ 'h4',
+ null,
+ moment.months(this.state.month - 1)
+ ),
+ ' '
+ ),
+ _react2.default.createElement(
+ 'span',
+ { className: 'day' },
+ _react2.default.createElement(
+ 'h4',
+ null,
+ this.props.date.slice(8, 10)
+ )
+ ),
+ _react2.default.createElement(
+ 'span',
+ { className: 'year' },
+ this.props.date.slice(0, 4)
+ )
+ ),
+ _react2.default.createElement(
+ 'td',
+ { className: 'col-md-1' },
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement('img', { className: 'albumArt', src: this.props.art_url100 })
+ )
+ ),
+ _react2.default.createElement(
+ 'td',
+ { className: 'albumInfo col-md-2' },
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(
+ 'h3',
+ null,
+ this.props.title
+ ),
+ _react2.default.createElement(
+ 'h4',
+ null,
+ this.props.artist
+ ),
+ _react2.default.createElement(
+ 'p',
+ null,
+ this.props.year
+ ),
+ _react2.default.createElement(
+ 'p',
+ null,
+ this.props.genre
+ )
+ )
+ ),
+ _react2.default.createElement(
+ 'td',
+ { className: 'impression col-md-4' },
+ _react2.default.createElement(
+ 'div',
+ null,
+ this.props.impression
+ )
+ ),
+ _react2.default.createElement(
+ 'td',
+ { className: 'rating col-md-1' },
+ _react2.default.createElement(
+ 'h3',
+ null,
+ this.props.rating
+ )
+ ),
+ _react2.default.createElement(_UpdateBox2.default, { impressionId: this.props.impressionId,
+ date: this.props.date,
+ impression: this.props.impression,
+ rating: this.props.rating,
+ updateUserEntries: this.props.updateUserEntries,
+ getUserEntries: this.props.getUserEntries,
+ deleteUserEntries: this.props.deleteUserEntries })
+ );
+ }
+ }]);
+
+ return Entry;
+}(_react2.default.Component);
+
+exports.default = Entry;
+
+/***/ }),
+/* 84 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _react = __webpack_require__(12);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _Entry = __webpack_require__(83);
+
+var _Entry2 = _interopRequireDefault(_Entry);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var EntryList = function (_React$Component) {
+ _inherits(EntryList, _React$Component);
+
+ function EntryList(props) {
+ _classCallCheck(this, EntryList);
+
+ return _possibleConstructorReturn(this, (EntryList.__proto__ || Object.getPrototypeOf(EntryList)).call(this, props));
+ }
+
+ _createClass(EntryList, [{
+ key: 'render',
+ value: function render() {
+ var _this2 = this;
+
+ return _react2.default.createElement(
+ 'tbody',
+ { className: 'container-fluid entryList' },
+ _react2.default.createElement(
+ 'tr',
+ { className: 'row' },
+ _react2.default.createElement(
+ 'th',
+ { className: 'col-md-1' },
+ _react2.default.createElement('span', { className: 'glyphicon glyphicon-calendar' })
+ ),
+ _react2.default.createElement(
+ 'th',
+ { className: 'col-md-1' },
+ _react2.default.createElement(
+ 'h5',
+ null,
+ 'Album'
+ )
+ ),
+ _react2.default.createElement('th', { className: 'col-md-2' }),
+ _react2.default.createElement(
+ 'th',
+ { className: 'impression col-md-4' },
+ _react2.default.createElement(
+ 'h5',
+ null,
+ 'Impression'
+ )
+ ),
+ _react2.default.createElement(
+ 'th',
+ { className: 'rating col-md-1' },
+ _react2.default.createElement(
+ 'h5',
+ null,
+ 'Rating'
+ )
+ ),
+ _react2.default.createElement('th', { className: 'col-md-2' })
+ ),
+ this.props.allEntries.map(function (entry) {
+ return _react2.default.createElement(_Entry2.default, { date: entry.date.slice(0, 10),
+ title: entry.title,
+ artist: entry.name,
+ genre: entry.genre,
+ year: entry.year,
+ rating: entry.rating,
+ impression: entry.impression,
+ art_url60: entry.art_url60,
+ art_url100: entry.art_url100,
+ impressionId: entry.id,
+ updateUserEntries: _this2.props.updateUserEntries,
+ getUserEntries: _this2.props.getUserEntries,
+ deleteUserEntries: _this2.props.deleteUserEntries,
+ key: entry.date + entry.id
+ });
+ })
+ );
+ }
+ }]);
+
+ return EntryList;
+}(_react2.default.Component);
+
+;
+
+exports.default = EntryList;
+
+/***/ }),
+/* 85 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _react = __webpack_require__(12);
+
+var _react2 = _interopRequireDefault(_react);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Result = function (_React$Component) {
+ _inherits(Result, _React$Component);
+
+ function Result(props) {
+ _classCallCheck(this, Result);
+
+ return _possibleConstructorReturn(this, (Result.__proto__ || Object.getPrototypeOf(Result)).call(this, props));
+ }
+
+ _createClass(Result, [{
+ key: "render",
+ value: function render() {
+ var _this2 = this;
+
+ return _react2.default.createElement(
+ "div",
+ { onClick: function onClick() {
+ _this2.props.setSelected(_this2.props.album);
+ }, className: "search-result" },
+ _react2.default.createElement("img", { src: this.props.album.artworkUrl100 }),
+ _react2.default.createElement(
+ "div",
+ null,
+ this.props.album.artistName
+ ),
+ _react2.default.createElement(
+ "div",
+ null,
+ this.props.album.collectionName
+ ),
+ _react2.default.createElement(
+ "div",
+ null,
+ this.props.album.releaseDate.substring(0, 4)
+ )
+ );
+ }
+ }]);
+
+ return Result;
+}(_react2.default.Component);
+
+exports.default = Result;
+
+/***/ }),
+/* 86 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _react = __webpack_require__(12);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _Result = __webpack_require__(85);
+
+var _Result2 = _interopRequireDefault(_Result);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+// Component generatees each search result entry
+var ResultsList = function (_React$Component) {
+ _inherits(ResultsList, _React$Component);
+
+ function ResultsList(props) {
+ _classCallCheck(this, ResultsList);
+
+ return _possibleConstructorReturn(this, (ResultsList.__proto__ || Object.getPrototypeOf(ResultsList)).call(this, props));
+ }
+
+ _createClass(ResultsList, [{
+ key: 'render',
+ value: function render() {
+ var _this2 = this;
+
+ return _react2.default.createElement(
+ 'div',
+ null,
+ this.props.albums.map(function (album) {
+ return _react2.default.createElement(_Result2.default, { addNewEntry: _this2.props.addNewEntry,
+ setSelected: _this2.props.setSelected,
+ key: album.collectionId,
+ album: album });
+ })
+ );
+ }
+ }]);
+
+ return ResultsList;
+}(_react2.default.Component);
+
+exports.default = ResultsList;
+
+/***/ }),
+/* 87 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _react = __webpack_require__(12);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _SearchBar = __webpack_require__(88);
+
+var _SearchBar2 = _interopRequireDefault(_SearchBar);
+
+var _ResultsList = __webpack_require__(86);
+
+var _ResultsList2 = _interopRequireDefault(_ResultsList);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Search = function (_React$Component) {
+ _inherits(Search, _React$Component);
+
+ function Search(props) {
+ _classCallCheck(this, Search);
+
+ var _this = _possibleConstructorReturn(this, (Search.__proto__ || Object.getPrototypeOf(Search)).call(this, props));
+
+ _this.state = {
+ term: '',
+ results: [],
+ selectedListenDate: null
+ };
+ return _this;
+ }
+ // sets default date for calendar input field
+
+
+ _createClass(Search, [{
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ this.setState({
+ selectedListenDate: this.setDate()
+ });
+ }
+ // gets and formats the current date
+
+ }, {
+ key: 'setDate',
+ value: function setDate() {
+ // generates current date
+ var todayDate = new Date();
+ // uses moment.js to format date
+ var formattedDate = moment(todayDate).format('YYYY-MM-DD');
+ // return the date
+ return formattedDate;
+ }
+ // displays only the clicked album
+
+ }, {
+ key: 'setSelected',
+ value: function setSelected(album) {
+ // date defaults to current date
+ var date = $('input').val() || this.state.selectedListenDate;
+ // sets state to display one album and sets state of listen date
+ this.setState({
+ results: [album],
+ selectedListenDate: date
+ });
+ }
+ // sends request to iTunes api
+
+ }, {
+ key: 'iTunesSearch',
+ value: function iTunesSearch(term) {
+ var _this2 = this;
+
+ this.setState({ term: term });
+ // used percent encoding for iTunes API search
+ var query = this.state.term.split(' ').join('%20');
+ // creates search URL with limit of four results
+ var searchUrl = 'https://itunes.apple.com/search?term=?$' + query + '&entity=album&limit=4';
+
+ $.ajax({
+ url: searchUrl,
+ data: {
+ format: 'json'
+ },
+ type: 'GET',
+ dataType: 'jsonp',
+ success: function success(data) {
+ console.log(data);
+ // changes state of results, triggering view change
+ _this2.setState({ results: data.results });
+ },
+ error: function error(_error) {
+ console.log(_error);
+ return;
+ }
+ });
+ }
+
+ // send selected album and listen date to db via post request
+
+ }, {
+ key: 'addNewEntry',
+ value: function addNewEntry(album, date) {
+ var _this3 = this;
+
+ // send object with keys album and date
+ var newEntry = { album: album, date: date.slice(0, 10) };
+ // user can only submit one album
+ if (this.state.results.length === 1) {
+ $.ajax({
+ url: '/querydb',
+ type: 'POST',
+ dataType: 'text',
+ contentType: 'application/json',
+ data: JSON.stringify(newEntry),
+ success: function success(results) {
+ console.log('SUCCESS!');
+ // assigns current date to state
+ // clears previously set state
+ var date = _this3.setDate();
+ _this3.setState({
+ term: '',
+ results: [],
+ selectedListenDate: date
+ });
+ // gets user entries from db and rerenders entry list
+ _this3.props.getUserEntries();
+ // clear the search bar
+ $('.search-bar').val('');
+ },
+ error: function error(_error2) {
+ console.log(_error2);
+ return;
+ }
+ });
+ }
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _this4 = this;
+
+ // only renders the add album button if one album is selected
+ if (this.state.results.length === 1) {
+ $('#add-album-btn').show();
+ } else {
+ $('#add-album-btn').hide();
+ }
+
+ return _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(
+ 'div',
+ { className: 'search-container' },
+ _react2.default.createElement(
+ 'h3',
+ { className: 'search-prompt' },
+ 'Add an album:'
+ ),
+ _react2.default.createElement('input', { type: 'date', name: 'date', className: 'form-group search-bar' }),
+ _react2.default.createElement('br', null),
+ _react2.default.createElement(_SearchBar2.default, { search: _.debounce(this.iTunesSearch.bind(this), 300),
+ className: 'search-bar' }),
+ _react2.default.createElement(
+ 'div',
+ { id: 'add-album-btn', onClick: function onClick() {
+ _this4.addNewEntry(_this4.state.results[0], _this4.state.selectedListenDate);
+ } },
+ _react2.default.createElement(
+ 'button',
+ { type: 'button', className: 'btn btn-default' },
+ 'Add this album'
+ )
+ )
+ ),
+ _react2.default.createElement(
+ 'div',
+ { className: 'results-container' },
+ _react2.default.createElement(_ResultsList2.default, { albums: this.state.results,
+ addNewEntry: this.props.addNewEntry,
+ setSelected: this.setSelected.bind(this),
+ className: 'results-container' })
+ )
+ );
+ }
+ }]);
+
+ return Search;
+}(_react2.default.Component);
+
+;
+
+exports.default = Search;
+
+/***/ }),
+/* 88 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _react = __webpack_require__(12);
+
+var _react2 = _interopRequireDefault(_react);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+// Searches iTunes
+var SearchBar = function (_React$Component) {
+ _inherits(SearchBar, _React$Component);
+
+ function SearchBar(props) {
+ _classCallCheck(this, SearchBar);
+
+ return _possibleConstructorReturn(this, (SearchBar.__proto__ || Object.getPrototypeOf(SearchBar)).call(this, props));
+ }
+
+ _createClass(SearchBar, [{
+ key: 'render',
+ value: function render() {
+ var _this2 = this;
+
+ return _react2.default.createElement('input', { type: 'text', className: 'search-bar form-group', placeholder: 'Search for an album...',
+ onKeyUp: function onKeyUp(event) {
+ return _this2.props.search(event.target.value);
+ }
+ });
+ }
+ }]);
+
+ return SearchBar;
+}(_react2.default.Component);
+
+exports.default = SearchBar;
+
+/***/ }),
+/* 89 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _react = __webpack_require__(12);
+
+var _react2 = _interopRequireDefault(_react);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var UpdateBox = function (_React$Component) {
+ _inherits(UpdateBox, _React$Component);
+
+ function UpdateBox(props) {
+ _classCallCheck(this, UpdateBox);
+
+ var _this = _possibleConstructorReturn(this, (UpdateBox.__proto__ || Object.getPrototypeOf(UpdateBox)).call(this, props));
+
+ _this.state = {
+ modalActive: false,
+ rating: '',
+ impression: ''
+ };
+ return _this;
+ }
+
+ //show updateBox
+
+
+ _createClass(UpdateBox, [{
+ key: 'openModal',
+ value: function openModal() {
+ this.setState({ modalActive: true });
+ }
+
+ //hide updateBox
+
+ }, {
+ key: 'closeModal',
+ value: function closeModal() {
+ this.setState({ modalActive: false });
+ }
+
+ // handles all form value changes
+
+ }, {
+ key: 'handleInputChange',
+ value: function handleInputChange(e) {
+ var target = e.target;
+ var value = target.value;
+ var name = target.name;
+
+ this.setState(_defineProperty({}, name, value));
+ }
+
+ //handles submiting form
+
+ }, {
+ key: 'handleSubmit',
+ value: function handleSubmit(e) {
+ e.preventDefault();
+ this.props.updateUserEntries(this.props.impressionId, this.state.rating, this.state.impression, this.props.getUserEntries);
+ this.closeModal();
+ }
+
+ // handles deleting whole entry from the database
+
+ }, {
+ key: 'handleDelete',
+ value: function handleDelete(e) {
+ e.preventDefault();
+ this.props.deleteUserEntries(this.props.impressionId, this.props.date, this.props.getUserEntries);
+ this.closeModal();
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ return (
+ // td
+ _react2.default.createElement(
+ 'td',
+ { className: 'col-md-3' },
+ !this.state.modalActive && _react2.default.createElement(
+ 'div',
+ { className: 'btn-group', role: 'group' },
+ _react2.default.createElement(
+ 'a',
+ { onClick: this.openModal.bind(this) },
+ _react2.default.createElement(
+ 'button',
+ { className: 'update btn btn-default' },
+ _react2.default.createElement('span', { className: 'glyphicon glyphicon-pencil' })
+ )
+ ),
+ _react2.default.createElement(
+ 'a',
+ { onClick: this.handleDelete.bind(this) },
+ _react2.default.createElement(
+ 'button',
+ { className: 'remove btn btn-default' },
+ _react2.default.createElement('span', { className: 'glyphicon glyphicon-remove-circle' })
+ )
+ )
+ ),
+ this.state.modalActive && _react2.default.createElement(
+ 'div',
+ { className: 'update' },
+ _react2.default.createElement('span', { className: 'close glyphicon glyphicon-remove', onClick: this.closeModal.bind(this) }),
+ _react2.default.createElement(
+ 'form',
+ { id: 'update', onSubmit: this.handleSubmit.bind(this) },
+ _react2.default.createElement('textarea', { className: 'form-control', id: 'impression', name: 'impression',
+ cols: '25',
+ rows: '4',
+ value: this.state.impression,
+ onChange: this.handleInputChange.bind(this),
+ placeholder: 'Write your impression...' }),
+ _react2.default.createElement('br', null),
+ _react2.default.createElement(
+ 'div',
+ { className: 'input-group' },
+ _react2.default.createElement(
+ 'select',
+ { className: 'form-control', name: 'rating', id: 'rating', value: this.state.rating, onChange: this.handleInputChange.bind(this) },
+ _react2.default.createElement(
+ 'option',
+ { value: null },
+ 'Rating'
+ ),
+ _react2.default.createElement(
+ 'option',
+ { value: 1 },
+ '1'
+ ),
+ _react2.default.createElement(
+ 'option',
+ { value: 2 },
+ '2'
+ ),
+ _react2.default.createElement(
+ 'option',
+ { value: 3 },
+ '3'
+ ),
+ _react2.default.createElement(
+ 'option',
+ { value: 4 },
+ '4'
+ ),
+ _react2.default.createElement(
+ 'option',
+ { value: 5 },
+ '5'
+ ),
+ _react2.default.createElement(
+ 'option',
+ { value: 6 },
+ '6'
+ ),
+ _react2.default.createElement(
+ 'option',
+ { value: 7 },
+ '7'
+ ),
+ _react2.default.createElement(
+ 'option',
+ { value: 8 },
+ '8'
+ ),
+ _react2.default.createElement(
+ 'option',
+ { value: 9 },
+ '9'
+ ),
+ _react2.default.createElement(
+ 'option',
+ { value: 10 },
+ '10'
+ )
+ ),
+ _react2.default.createElement(
+ 'span',
+ { className: 'input-group-btn' },
+ _react2.default.createElement('button', { className: 'btn btn-default', type: 'submit', id: 'submit', name: 'button', value: 'Save' })
+ )
+ )
+ )
+ )
+ )
+ );
+ }
+ }]);
+
+ return UpdateBox;
+}(_react2.default.Component);
+
+exports.default = UpdateBox;
+
+/***/ }),
+/* 90 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _react = __webpack_require__(12);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _reactDom = __webpack_require__(82);
+
+var _reactDom2 = _interopRequireDefault(_reactDom);
+
+var _app = __webpack_require__(81);
+
+var _app2 = _interopRequireDefault(_app);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+_reactDom2.default.render(_react2.default.createElement(_app2.default, null), document.getElementById('app')); // Render the app to the DOM
+// search function passes the itunes api query
+// getUserEntries queries the database for user data
+
+/***/ }),
+/* 91 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/**
+ * 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
+ */
+
+var _hyphenPattern = /-(.)/g;
+
+/**
+ * Camelcases a hyphenated string, for example:
+ *
+ * > camelize('background-color')
+ * < "backgroundColor"
+ *
+ * @param {string} string
+ * @return {string}
+ */
+function camelize(string) {
+ return string.replace(_hyphenPattern, function (_, character) {
+ return character.toUpperCase();
+ });
+}
+
+module.exports = camelize;
+
+/***/ }),
+/* 92 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * 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
+ */
+
+
+
+var camelize = __webpack_require__(91);
+
+var msPattern = /^-ms-/;
+
+/**
+ * Camelcases a hyphenated CSS property name, for example:
+ *
+ * > camelizeStyleName('background-color')
+ * < "backgroundColor"
+ * > camelizeStyleName('-moz-transition')
+ * < "MozTransition"
+ * > camelizeStyleName('-ms-transition')
+ * < "msTransition"
+ *
+ * As Andi Smith suggests
+ * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
+ * is converted to lowercase `ms`.
+ *
+ * @param {string} string
+ * @return {string}
+ */
+function camelizeStyleName(string) {
+ return camelize(string.replace(msPattern, 'ms-'));
+}
+
+module.exports = camelizeStyleName;
+
+/***/ }),
+/* 93 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/**
+ * 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 isTextNode = __webpack_require__(101);
+
+/*eslint-disable no-bitwise */
+
+/**
+ * Checks if a given DOM node contains or is another DOM node.
+ */
+function containsNode(outerNode, innerNode) {
+ if (!outerNode || !innerNode) {
+ return false;
+ } else if (outerNode === innerNode) {
+ return true;
+ } else if (isTextNode(outerNode)) {
+ return false;
+ } else if (isTextNode(innerNode)) {
+ return containsNode(outerNode, innerNode.parentNode);
+ } else if ('contains' in outerNode) {
+ return outerNode.contains(innerNode);
+ } else if (outerNode.compareDocumentPosition) {
+ return !!(outerNode.compareDocumentPosition(innerNode) & 16);
+ } else {
+ return false;
+ }
+}
+
+module.exports = containsNode;
+
+/***/ }),
+/* 94 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* 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
+ */
+
+var invariant = __webpack_require__(1);
+
+/**
+ * Convert array-like objects to arrays.
+ *
+ * This API assumes the caller knows the contents of the data type. For less
+ * well defined inputs use createArrayFromMixed.
+ *
+ * @param {object|function|filelist} obj
+ * @return {array}
+ */
+function toArray(obj) {
+ var length = obj.length;
+
+ // Some browsers builtin objects can report typeof 'function' (e.g. NodeList
+ // in old versions of Safari).
+ !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;
+
+ !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;
+
+ !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;
+
+ !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0;
+
+ // Old IE doesn't give collections access to hasOwnProperty. Assume inputs
+ // without method will throw during the slice call and skip straight to the
+ // fallback.
+ if (obj.hasOwnProperty) {
+ try {
+ return Array.prototype.slice.call(obj);
+ } catch (e) {
+ // IE < 9 does not support Array#slice on collections objects
+ }
+ }
+
+ // Fall back to copying key by key. This assumes all keys have a value,
+ // so will not preserve sparsely populated inputs.
+ var ret = Array(length);
+ for (var ii = 0; ii < length; ii++) {
+ ret[ii] = obj[ii];
+ }
+ return ret;
+}
+
+/**
+ * Perform a heuristic test to determine if an object is "array-like".
+ *
+ * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?"
+ * Joshu replied: "Mu."
+ *
+ * This function determines if its argument has "array nature": it returns
+ * true if the argument is an actual array, an `arguments' object, or an
+ * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).
+ *
+ * It will return false for other array-like objects like Filelist.
+ *
+ * @param {*} obj
+ * @return {boolean}
+ */
+function hasArrayNature(obj) {
+ return (
+ // not null/false
+ !!obj && (
+ // arrays are objects, NodeLists are functions in Safari
+ typeof obj == 'object' || typeof obj == 'function') &&
+ // quacks like an array
+ 'length' in obj &&
+ // not window
+ !('setInterval' in obj) &&
+ // no DOM node should be considered an array-like
+ // a 'select' element has 'length' and 'item' properties on IE8
+ typeof obj.nodeType != 'number' && (
+ // a real array
+ Array.isArray(obj) ||
+ // arguments
+ 'callee' in obj ||
+ // HTMLCollection/NodeList
+ 'item' in obj)
+ );
+}
+
+/**
+ * Ensure that the argument is an array by wrapping it in an array if it is not.
+ * Creates a copy of the argument if it is already an array.
+ *
+ * This is mostly useful idiomatically:
+ *
+ * var createArrayFromMixed = require('createArrayFromMixed');
+ *
+ * function takesOneOrMoreThings(things) {
+ * things = createArrayFromMixed(things);
+ * ...
+ * }
+ *
+ * This allows you to treat `things' as an array, but accept scalars in the API.
+ *
+ * If you need to convert an array-like object, like `arguments`, into an array
+ * use toArray instead.
+ *
+ * @param {*} obj
+ * @return {array}
+ */
+function createArrayFromMixed(obj) {
+ if (!hasArrayNature(obj)) {
+ return [obj];
+ } else if (Array.isArray(obj)) {
+ return obj.slice();
+ } else {
+ return toArray(obj);
+ }
+}
+
+module.exports = createArrayFromMixed;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 95 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* 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
+ */
+
+/*eslint-disable fb-www/unsafe-html*/
+
+var ExecutionEnvironment = __webpack_require__(6);
+
+var createArrayFromMixed = __webpack_require__(94);
+var getMarkupWrap = __webpack_require__(96);
+var invariant = __webpack_require__(1);
+
+/**
+ * Dummy container used to render all markup.
+ */
+var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
+
+/**
+ * Pattern used by `getNodeName`.
+ */
+var nodeNamePattern = /^\s*<(\w+)/;
+
+/**
+ * Extracts the `nodeName` of the first element in a string of markup.
+ *
+ * @param {string} markup String of markup.
+ * @return {?string} Node name of the supplied markup.
+ */
+function getNodeName(markup) {
+ var nodeNameMatch = markup.match(nodeNamePattern);
+ return nodeNameMatch && nodeNameMatch[1].toLowerCase();
+}
+
+/**
+ * Creates an array containing the nodes rendered from the supplied markup. The
+ * optionally supplied `handleScript` function will be invoked once for each
+ *
@@ -11,19 +11,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+